@descope/web-components-ui 1.0.39 → 1.0.41
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +35 -18
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1128 -481
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/101.js +148 -0
- package/dist/umd/208.js +2 -0
- package/dist/umd/208.js.LICENSE.txt +5 -0
- package/dist/umd/211.js +312 -0
- package/dist/umd/211.js.LICENSE.txt +5 -0
- package/dist/umd/233.js +573 -0
- package/dist/umd/{511.js.LICENSE.txt → 233.js.LICENSE.txt} +0 -6
- package/dist/umd/422.js +2 -0
- package/dist/umd/422.js.LICENSE.txt +5 -0
- package/dist/umd/437.js +19 -0
- package/dist/umd/437.js.LICENSE.txt +5 -0
- package/dist/umd/513.js +1 -0
- package/dist/umd/515.js +202 -0
- package/dist/umd/515.js.LICENSE.txt +11 -0
- package/dist/umd/54.js +4 -4
- package/dist/umd/56.js +48 -0
- package/dist/umd/56.js.LICENSE.txt +5 -0
- package/dist/umd/599.js +1 -1
- package/dist/umd/63.js +1 -0
- package/dist/umd/725.js +37 -0
- package/dist/umd/725.js.LICENSE.txt +11 -0
- package/dist/umd/729.js +1 -1
- package/dist/umd/767.js +2 -0
- package/dist/umd/{9.js.LICENSE.txt → 767.js.LICENSE.txt} +0 -6
- package/dist/umd/786.js +2 -0
- package/dist/umd/786.js.LICENSE.txt +17 -0
- package/dist/umd/789.js +1 -0
- package/dist/umd/806.js +109 -0
- package/dist/umd/806.js.LICENSE.txt +5 -0
- package/dist/umd/938.js +1 -0
- package/dist/umd/97.js +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-checkbox-index-js.js +1 -0
- package/dist/umd/descope-combo-index-js.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/descope-email-field-index-js.js +1 -0
- package/dist/umd/descope-number-field-index-js.js +1 -0
- package/dist/umd/descope-password-field-index-js.js +1 -0
- package/dist/umd/descope-switch-toggle-index-js.js +1 -0
- package/dist/umd/descope-text-area-index-js.js +1 -0
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +9 -2
- package/src/components/descope-button/Button.js +90 -30
- package/src/components/descope-button/index.js +3 -3
- package/src/components/descope-checkbox/Checkbox.js +33 -0
- package/src/components/descope-checkbox/index.js +6 -0
- package/src/components/descope-combo/index.js +12 -12
- package/src/components/descope-container/Container.js +57 -51
- package/src/components/descope-container/index.js +1 -1
- package/src/components/descope-date-picker/index.js +13 -7
- package/src/components/descope-email-field/EmailField.js +72 -0
- package/src/components/descope-email-field/index.js +6 -0
- package/src/components/descope-number-field/NumberField.js +72 -0
- package/src/components/descope-number-field/index.js +6 -0
- package/src/components/descope-password-field/PasswordField.js +79 -0
- package/src/components/descope-password-field/index.js +6 -0
- package/src/components/descope-switch-toggle/SwitchToggle.js +81 -0
- package/src/components/descope-switch-toggle/index.js +6 -0
- package/src/components/descope-text-area/TextArea.js +66 -0
- package/src/components/descope-text-area/index.js +6 -0
- package/src/components/descope-text-field/TextField.js +98 -28
- package/src/components/descope-text-field/index.js +3 -3
- package/src/componentsHelpers/componentNameValidationMixin.js +21 -17
- package/src/componentsHelpers/createProxy/helpers.js +31 -27
- package/src/componentsHelpers/createProxy/index.js +27 -17
- package/src/componentsHelpers/createStyleMixin/helpers.js +65 -47
- package/src/componentsHelpers/createStyleMixin/index.js +64 -55
- package/src/componentsHelpers/draggableMixin.js +25 -26
- package/src/componentsHelpers/index.js +12 -9
- package/src/componentsHelpers/inputMixin.js +38 -37
- package/src/constants.js +1 -1
- package/src/dev/index.js +4 -3
- package/src/helpers.js +8 -6
- package/src/index.cjs.js +1 -1
- package/src/index.js +16 -8
- package/src/index.umd.js +11 -5
- package/src/theme/components/button.js +32 -21
- package/src/theme/components/checkbox.js +9 -0
- package/src/theme/components/container.js +32 -27
- package/src/theme/components/emailField.js +8 -0
- package/src/theme/components/index.js +19 -7
- package/src/theme/components/input.js +106 -0
- package/src/theme/components/numberField.js +8 -0
- package/src/theme/components/passwordField.js +11 -0
- package/src/theme/components/switchToggle.js +10 -0
- package/src/theme/components/textArea.js +44 -0
- package/src/theme/components/textField.js +69 -45
- package/src/theme/globals.js +27 -26
- package/src/theme/index.js +2 -2
- package/src/themeHelpers/index.js +45 -30
- package/src/themeHelpers/processColors.js +10 -7
- package/dist/umd/221.js +0 -37
- package/dist/umd/511.js +0 -573
- package/dist/umd/9.js +0 -312
- /package/dist/umd/{221.js.LICENSE.txt → 101.js.LICENSE.txt} +0 -0
package/dist/umd/786.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see 786.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[786],{6634:(e,t,n)=>{n.d(t,{B:()=>i});var s=n(1014),o=n(2527),a=n(4062);const i=(0,s.o)((e=>class extends((0,o.W)((0,a.N)(e))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&(this.focusElement.focus(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(e,t){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):t&&this._removeFocusListeners(t)}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus)}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(e){return e.target===this.focusElement}_disabledChanged(e,t){super._disabledChanged(e,t),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur()}_tabindexChanged(e){this.__forwardTabIndex(e)}__forwardTabIndex(e){void 0!==e&&this.focusElement&&(this.focusElement.tabIndex=e,-1!==e&&(this.tabindex=void 0)),this.disabled&&e&&(-1!==e&&(this._lastTabIndex=e),this.tabindex=void 0)}}))},6328:(e,t,n)=>{n.d(t,{A:()=>s});const s=(0,n(1014).o)((e=>class extends e{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((e=>{this._delegateAttribute(e,this[e])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((e=>{this._delegateProperty(e,this[e])}))}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach(((t,n)=>{this._delegateAttribute(t,e[n])}))}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach(((t,n)=>{this._delegateProperty(t,e[n])}))}_delegateAttribute(e,t){this.stateTarget&&("invalid"===e&&this._delegateAttribute("aria-invalid",!!t&&"true"),"boolean"==typeof t?this.stateTarget.toggleAttribute(e,t):t?this.stateTarget.setAttribute(e,t):this.stateTarget.removeAttribute(e))}_delegateProperty(e,t){this.stateTarget&&(this.stateTarget[e]=t)}}))},2604:(e,t,n)=>{n.d(t,{v:()=>o});var s=n(4271);class o extends s.n{constructor(e,t,n,s={}){super(e,t,n,{...s,useUniqueId:!0})}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((e=>{e.forEach((e=>{const t=e.target,n=t===this.node;"attributes"===e.type?n&&this.__updateNodeId(t):(n||t.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&""!==e.textContent.trim())}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType===Node.ELEMENT_NODE&&t&&!e.id&&(e.id=this.defaultId)}}},6326:(e,t,n)=>{n.d(t,{J:()=>s});const s=(0,n(1014).o)((e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}}))},6821:(e,t,n)=>{n.d(t,{h:()=>r});var s=n(1014),o=n(6155),a=n(2604);class i extends a.v{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&""!==e.trim()){const e=this.attachDefaultNode();this.observeNode(e)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}const r=(0,s.o)((e=>class extends((0,o.k)(e)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new i(this),this._labelController.addEventListener("slot-content-changed",(e=>{this.toggleAttribute("has-label",e.detail.hasContent)}))}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(e){this._labelController.setLabel(e)}}))},6729:(e,t,n)=>{n.d(t,{v:()=>s});class s{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",(e=>{this.__initLabel(e.detail.node)})),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}},1735:(e,t,n)=>{n(4407);const s=document.createElement("template");s.innerHTML='\n <style>\n @font-face {\n font-family: \'lumo-icons\';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvV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jER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==) format(\'woff\');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n',document.head.appendChild(s.content)}}]);
|
@@ -0,0 +1,17 @@
|
|
1
|
+
/**
|
2
|
+
* @license
|
3
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* @license
|
9
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
10
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
11
|
+
*/
|
12
|
+
|
13
|
+
/**
|
14
|
+
* @license
|
15
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
16
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
17
|
+
*/
|
package/dist/umd/789.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[789],{9789:(e,s,c)=>{c(8725),c(8005)}}]);
|
package/dist/umd/806.js
ADDED
@@ -0,0 +1,109 @@
|
|
1
|
+
/*! For license information please see 806.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[806],{5806:(e,t,n)=>{n(3787),n(9098);var i=n(4398),s=n(2279),a=n(5128);const r=a.iv`
|
3
|
+
:host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {
|
4
|
+
text-align: center;
|
5
|
+
}
|
6
|
+
|
7
|
+
[part$='button'][disabled] {
|
8
|
+
opacity: 0.2;
|
9
|
+
}
|
10
|
+
|
11
|
+
:host([step-buttons-visible]) [part='input-field'] {
|
12
|
+
padding: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
[part\$='button'] {
|
16
|
+
cursor: pointer;
|
17
|
+
font-size: var(--lumo-icon-size-s);
|
18
|
+
width: 1.6em;
|
19
|
+
height: 1.6em;
|
20
|
+
}
|
21
|
+
|
22
|
+
[part\$='button']::before {
|
23
|
+
margin-top: 0.3em;
|
24
|
+
}
|
25
|
+
|
26
|
+
[part='decrease-button']::before {
|
27
|
+
content: var(--lumo-icons-minus);
|
28
|
+
}
|
29
|
+
|
30
|
+
[part='increase-button']::before {
|
31
|
+
content: var(--lumo-icons-plus);
|
32
|
+
}
|
33
|
+
|
34
|
+
/* RTL specific styles */
|
35
|
+
:host([dir='rtl']:not([theme~='align-right'])) ::slotted(input) {
|
36
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
37
|
+
}
|
38
|
+
`;(0,a.hC)("vaadin-number-field",[s.J,i.q,r],{moduleId:"lumo-number-field"}),n(3130);var l=n(4241),o=n(1402),u=n(4463),h=n(2743),d=n(3208),p=n(422),c=n(6729);const m=e=>class extends((0,p.j)(e)){static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},stepButtonsVisible:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_stepChanged(step, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"min","max"]}static get constraints(){return[...super.constraints,"min","max","step"]}constructor(){super(),this._setType("number")}get slotStyles(){const e=this.localName;return[`\n ${e} input[type="number"]::-webkit-outer-spin-button,\n ${e} input[type="number"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n ${e} input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ${e}[dir='rtl'] input[type="number"]::placeholder {\n direction: rtl;\n }\n\n ${e}[dir='rtl']:not([step-buttons-visible]) input[type="number"]::placeholder {\n text-align: left;\n }\n `]}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new d.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new c.v(this.inputElement,this._labelController))}checkValidity(){return this.inputElement?this.inputElement.checkValidity():!this.invalid}_onDecreaseButtonTouchend(e){e.preventDefault(),this._decreaseValue()}_onIncreaseButtonTouchend(e){e.preventDefault(),this._increaseValue()}_onDecreaseButtonClick(){this._decreaseValue()}_onIncreaseButtonClick(){this._increaseValue()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;const t=this.step||1;let n=parseFloat(this.value);this.value?n<this.min?(e=0,n=this.min):n>this.max&&(e=0,n=this.max):0===this.min&&e<0||0===this.max&&e>0||0===this.max&&0===this.min?(e=0,n=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?n=0:this.min>0?(n=this.min,this.max<0&&e<0&&(n=this.max),e=0):this.max<0&&(n=this.max,e<0?e=0:this._getIncrement(1,n-t)>this.max?n-=2*t:n-=t);const i=this._getIncrement(e,n);this.value&&0!==e&&!this._incrementIsInsideTheLimits(e,n)||this._setValue(i)}_setValue(e){this.value=this.inputElement.value=String(parseFloat(e)),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_getIncrement(e,t){let n=this.step||1,i=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(n),this._getMultiplier(i));n*=s,i*=s;const a=((t=Math.round(t*s))-i)%n;return e>0?(t-a+n)/s:e<0?(t-(a||n))/s:t/s}_getDecimalCount(e){const t=String(e),n=t.indexOf(".");return-1===n?1:t.length-n-1}_getMultiplier(e){if(!isNaN(e))return 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}_isButtonEnabled(e){const t=e*(this.step||1),n=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,n)}_stepChanged(e,t){t&&(t.step=e||"any")}_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){"ArrowUp"===e.key?(e.preventDefault(),this._increaseValue()):"ArrowDown"===e.key&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0||t.validity.badInput}},b=n(9897).iv`
|
39
|
+
:host([readonly]) [part$='button'] {
|
40
|
+
pointer-events: none;
|
41
|
+
}
|
42
|
+
|
43
|
+
[part='decrease-button']::before {
|
44
|
+
content: '\\2212';
|
45
|
+
}
|
46
|
+
|
47
|
+
[part='increase-button']::before {
|
48
|
+
content: '+';
|
49
|
+
}
|
50
|
+
|
51
|
+
[part='decrease-button'],
|
52
|
+
[part='increase-button'] {
|
53
|
+
-webkit-user-select: none;
|
54
|
+
-moz-user-select: none;
|
55
|
+
user-select: none;
|
56
|
+
}
|
57
|
+
|
58
|
+
:host([dir='rtl']) [part='input-field'] {
|
59
|
+
direction: ltr;
|
60
|
+
}
|
61
|
+
`;(0,a.hC)("vaadin-number-field",[h.J,b],{moduleId:"vaadin-number-field-styles"});class v extends(m((0,a.Tb)((0,o.S)(l.H3)))){static get is(){return"vaadin-number-field"}static get template(){return l.dy`
|
62
|
+
<div class="vaadin-field-container">
|
63
|
+
<div part="label">
|
64
|
+
<slot name="label"></slot>
|
65
|
+
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<vaadin-input-container
|
69
|
+
part="input-field"
|
70
|
+
readonly="[[readonly]]"
|
71
|
+
disabled="[[disabled]]"
|
72
|
+
invalid="[[invalid]]"
|
73
|
+
theme$="[[_theme]]"
|
74
|
+
>
|
75
|
+
<div
|
76
|
+
disabled$="[[!_isButtonEnabled(-1, value, min, max, step)]]"
|
77
|
+
part="decrease-button"
|
78
|
+
on-click="_onDecreaseButtonClick"
|
79
|
+
on-touchend="_onDecreaseButtonTouchend"
|
80
|
+
hidden$="[[!stepButtonsVisible]]"
|
81
|
+
aria-hidden="true"
|
82
|
+
slot="prefix"
|
83
|
+
></div>
|
84
|
+
<slot name="prefix" slot="prefix"></slot>
|
85
|
+
<slot name="input"></slot>
|
86
|
+
<slot name="suffix" slot="suffix"></slot>
|
87
|
+
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
88
|
+
<div
|
89
|
+
disabled$="[[!_isButtonEnabled(1, value, min, max, step)]]"
|
90
|
+
part="increase-button"
|
91
|
+
on-click="_onIncreaseButtonClick"
|
92
|
+
on-touchend="_onIncreaseButtonTouchend"
|
93
|
+
hidden$="[[!stepButtonsVisible]]"
|
94
|
+
aria-hidden="true"
|
95
|
+
slot="suffix"
|
96
|
+
></div>
|
97
|
+
</vaadin-input-container>
|
98
|
+
|
99
|
+
<div part="helper-text">
|
100
|
+
<slot name="helper"></slot>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
<div part="error-message">
|
104
|
+
<slot name="error-message"></slot>
|
105
|
+
</div>
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<slot name="tooltip"></slot>
|
109
|
+
`}ready(){super.ready(),this._tooltipController=new u.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top")}}customElements.define(v.is,v)}}]);
|
package/dist/umd/938.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[938],{3938:(t,e,i)=>{i.d(e,{y:()=>s});const s=t=>class extends t{static get formAssociated(){return!0}#t;constructor(){super(),this.#t=this.attachInternals()}formAssociatedCallback(){this.setValidity?.()}connectedCallback(){super.connectedCallback?.(),this.hasAttribute("tabindex")||this.setAttribute("tabindex",0);const t=this.proxyElement.querySelector("input")||this.proxyElement.querySelector("textarea");if(!t)throw Error("no input was found");this.checkValidity=()=>t.checkValidity(),this.reportValidity=()=>t.reportValidity(),this.validity=t.validity,this.setValidity=()=>{this.#t.setValidity(t.validity,t.validationMessage)},t.oninput=()=>{this.value=t.value,this.setValidity()}}}}}]);
|
package/dist/umd/97.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[97],{3097:(t,e,
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[97],{3097:(t,e,o)=>{o.d(e,{D:()=>r});const s=(t,e,o)=>{e(...Array.from(t.attributes).map((t=>t.name))),new MutationObserver((t=>{for(const s of t)"attributes"!==s.type||o.includes(s.attributeName)||e(s.attributeName)})).observe(t,{attributes:!0})},n=(t,e)=>(...o)=>{o.forEach((o=>{const s=t.getAttribute(o);null!==s?e.getAttribute(o)!==s&&e.setAttribute(o,s):e.removeAttribute(o)}))},r=({componentName:t,wrappedEleName:e,slots:o=[],style:r,excludeAttrsSync:i=[]})=>{const a=`\n\t\t<style id="create-proxy"></style>\n\t\t<${e}>\n\t\t<slot></slot>\n\t\t${o.map((t=>`<slot name="${t}" slot="${t}"></slot>`)).join("")}\n\t\t</${e}>\n\t`;class h extends HTMLElement{static get componentName(){return t}constructor(){super().attachShadow({mode:"open"}).innerHTML=a,this.hostElement=this.shadowRoot.host,this.componentName=this.hostElement.tagName.toLowerCase(),this.baseSelector=e,this.shadowRoot.getElementById("create-proxy").innerHTML="function"==typeof r?r():r}connectedCallback(){var t,o,r;this.shadowRoot.isConnected&&(this.proxyElement=this.shadowRoot.querySelector(e),this.setAttribute("tabindex","0"),this.onfocus=t=>{this.proxyElement.focus()},this.proxyElement.onkeydown=t=>{t.shiftKey&&9===t.keyCode&&(this.removeAttribute("tabindex"),setTimeout((()=>this.setAttribute("tabindex","0")),0))},this.mouseoverCbRef=()=>{this.proxyElement.setAttribute("hover",""),this.proxyElement.addEventListener("mouseleave",(()=>this.proxyElement.removeAttribute("hover")),{once:!0})},this.proxyElement.addEventListener("mouseover",this.mouseoverCbRef),this.addEventListener=this.proxyElement.addEventListener,t=this.proxyElement,o=this.hostElement,r=i,s(t,n(t,o),r),s(o,n(o,t),r))}disconnectedCallback(){this.proxyElement.removeEventListener("mouseover",this.mouseoverCbRef)}attributeChangedCallback(){this.proxyElement}}return h}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[662],{3029:(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[662],{3029:(t,n,a)=>{a.r(n),a.d(n,{Button:()=>g}),a(729);var e=a(2788),r=a(4599),i=a(2089),o=a(8237),s=a(3097),l=a(3535);const c=(0,e.iY)("button"),d="::part(label)",b=(0,e.qC)((0,r.y)({mappings:{backgroundColor:{},borderRadius:{},color:{selector:d},borderColor:{},borderStyle:{},borderWidth:{},fontSize:{},height:{},width:[(0,l.zy)()],cursor:{},padding:[(0,l.zy)(),{selector:d}],textDecoration:{selector:d}}}),i.e,o.A)((0,s.D)({slots:["prefix","label","suffix"],wrappedEleName:"vaadin-button",style:()=>`\n\tvaadin-button { margin: 0; }\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n vaadin-button::part(label) { pointer-events: none; } \n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tgap: 5px;\n\t}\n ${p}`,excludeAttrsSync:["tabindex"],componentName:c})),p=`\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading]) ::before {\n\t\t--marginRatio: 1.35;\n\t\tcolor: var(${b.cssVarList.color});\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\ttop: calc(50% - calc((var(${b.cssVarList.height}) / var(--marginRatio)) / 2));\n\t\tleft: calc(50% - calc((var(${b.cssVarList.height}) / var(--marginRatio)) / 2));\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-width: calc(var(${b.cssVarList.height}) / 12);\n\t\tborder-style: solid;\n\t\twidth: calc(var(${b.cssVarList.height}) / var(--marginRatio));\n\t\theight: calc(var(${b.cssVarList.height}) / var(--marginRatio));\n\t}\n\t:host([loading])::part(prefix),\n\t:host([loading])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`,g=b;customElements.define(c,g)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[761],{7904:(e,c,s)=>{s.r(c),s.d(c,{Checkbox:()=>b}),s(9515);var t=s(2788),o=s(4599),a=s(2089),n=s(3938),l=s(8237),p=s(3097);const r=(0,t.iY)("checkbox"),b=(0,t.qC)((0,o.y)({mappings:{width:{},cursor:[{},{selector:"> label"}]}}),a.e,n.y,l.A)((0,p.D)({slots:[],wrappedEleName:"vaadin-checkbox",style:"",excludeAttrsSync:["tabindex"],componentName:r}));customElements.define(r,b)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[247],{2798:(e,t,o)=>{o.r(t),o.d(t,{Combo:()=>d});var n=o(2788);o(3029),o(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[247],{2798:(e,t,o)=>{o.r(t),o.d(t,{Combo:()=>d});var n=o(2788);o(3029),o(9357);const c=document.createElement("template"),s=(0,n.iY)("combo");c.innerHTML="\n <descope-button></descope-button>\n <descope-text-field></descope-text-field>\n";class d extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(c.content.cloneNode(!0))}}customElements.define(s,d)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[317],{147:(e,t,o)=>{o.r(t),o.d(t,{Container:()=>p});var n=o(2788),r=o(
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[317],{147:(e,t,o)=>{o.r(t),o.d(t,{Container:()=>p});var n=o(2788),r=o(4599),d=o(2089),s=o(8237);const a=(0,n.iY)("container");class i extends HTMLElement{static get componentName(){return a}constructor(){super();const e=document.createElement("template");e.innerHTML="<slot></slot>",this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(e.content.cloneNode(!0)),this.baseSelector=":host > slot"}}const p=(0,n.qC)((0,r.y)({mappings:{height:{},width:{},verticalPadding:[{property:"padding-top"},{property:"padding-bottom"}],horizontalPadding:[{property:"padding-left"},{property:"padding-right"}],display:{},flexDirection:{},justifyContent:{},alignItems:{},gap:{},backgroundColor:{},borderRadius:{},borderColor:{},borderStyle:{},borderWidth:{},boxShadow:{}}}),d.e,s.A)(i);customElements.define(a,p)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[760],{689:(t,i,e)=>{e.r(i),e.d(i,{EmailField:()=>u}),e(9437);var a=e(2788),n=e(4599),l=e(2089),d=e(3938),o=e(8237),r=e(3097),s=e(9063);const f=(0,a.iY)("email-field");let c="";const p=(0,a.qC)((0,n.y)({mappings:{...s.AT}}),l.e,d.y,o.A)((0,r.D)({slots:["suffix"],wrappedEleName:"vaadin-email-field",style:()=>c,excludeAttrsSync:["tabindex"],componentName:f}));c=`\n\tvaadin-email-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-email-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-email-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-email-field input:-webkit-autofill,\n\tvaadin-email-field input:-webkit-autofill::first-line,\n\tvaadin-email-field input:-webkit-autofill:hover,\n\tvaadin-email-field input:-webkit-autofill:active,\n\tvaadin-email-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${p.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${p.cssVarList.height}) var(${p.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-email-field > label,\n\tvaadin-email-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${p.cssVarList.color});\n\t}\n\tvaadin-email-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-email-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${p.cssVarList.color});\n\t}\n\tvaadin-email-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const u=p;customElements.define(f,u)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[142],{4951:(t,n,e)=>{e.r(n),e.d(n,{NumberField:()=>p}),e(5806);var i=e(2788),a=e(4599),r=e(2089),l=e(3938),d=e(8237),o=e(3097),u=e(9063);const s=(0,i.iY)("number-field");let f="";const c=(0,i.qC)((0,a.y)({mappings:{...u.AT}}),r.e,l.y,d.A)((0,o.D)({slots:["prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>f,excludeAttrsSync:["tabindex"],componentName:s}));f=`\n\tvaadin-number-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-number-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-number-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-number-field input:-webkit-autofill,\n\tvaadin-number-field input:-webkit-autofill::first-line,\n\tvaadin-number-field input:-webkit-autofill:hover,\n\tvaadin-number-field input:-webkit-autofill:active,\n\tvaadin-number-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${c.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${c.cssVarList.height}) var(${c.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-number-field > label,\n\tvaadin-number-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-number-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-number-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-number-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const p=c;customElements.define(s,p)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[320],{1721:(t,a,n)=>{n.r(a),n.d(a,{PasswordField:()=>u}),n(7056);var e=n(2788),i=n(4599),s=n(2089),r=n(3938),o=n(8237),d=n(3097),l=n(9063);const p=(0,e.iY)("password-field");let f="";const c=(0,e.qC)((0,i.y)({mappings:{...l.AT,revealCursor:[{selector:"::part(reveal-button)::before",property:"cursor"}]}}),s.e,r.y,o.A)((0,d.D)({slots:["suffix"],wrappedEleName:"vaadin-password-field",style:()=>f,excludeAttrsSync:["tabindex"],componentName:p}));f=`\n\tvaadin-password-field {\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n\tvaadin-password-field::part(input-field) {\n\t\toverflow: hidden;\n\t}\n\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\topacity: 1;\n\t}\n\tvaadin-password-field input:-webkit-autofill,\n\tvaadin-password-field input:-webkit-autofill::first-line,\n\tvaadin-password-field input:-webkit-autofill:hover,\n\tvaadin-password-field input:-webkit-autofill:active,\n\tvaadin-password-field input:-webkit-autofill:focus {\n\t\t-webkit-text-fill-color: var(${c.cssVarList.color});\n\t\tbox-shadow: 0 0 0 var(${c.cssVarList.height}) var(${c.cssVarList.backgroundColor}) inset;\n\t}\n\tvaadin-password-field > label,\n\tvaadin-password-field::part(input-field) {\n\t\tcursor: pointer;\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-password-field::part(input-field):focus {\n\t\tcursor: text;\n\t}\n\tvaadin-password-field[required]::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t\tcolor: var(${c.cssVarList.color});\n\t}\n\tvaadin-password-field[readonly]::part(input-field)::after {\n\t\tborder: 0 solid;\n\t}\n`;const u=c;customElements.define(p,u)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[739],{3774:(t,n,e)=>{e.r(n),e.d(n,{SwitchToggle:()=>b}),e(9515);var a=e(2788),i=e(4599),r=e(2089),o=e(3938),c=e(8237),s=e(3097);const h=(0,a.iY)("switch-toggle");let l="";const d=(0,a.qC)((0,i.y)({mappings:{width:{},cursor:[{},{selector:"> label"}]}}),r.e,o.y,c.A)((0,s.D)({slots:[],wrappedEleName:"vaadin-checkbox",style:()=>l,excludeAttrsSync:["tabindex"],componentName:h}));l=`\n\t:host {\n\t\t--margin: 7px;\n\t\t--width: var(${d.cssVarList.width});\n\t\t--height: calc(var(--width) / 2);\n\t\t--radius: var(--height);\n\t\t--knobSize: calc(var(--height) - 5px);\n\t\t--bgColor: #fff;\n\t\t--knobBgColor: #000;\n\t}\n\tvaadin-checkbox>label {\n\t\tcursor: pointer;\n\t\tborder: 1px solid;\n\t\ttext-indent: -99999px;\n\t\tdisplay: block;\n\t\tposition: relative;\t\t\t\n\t\twidth: var(--width);\n\t\theight: var(--height);\n\t\tbackground: var(--bgColor);\n\t\tborder-radius: var(--radius);\n\t}\n\tvaadin-checkbox>label::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttransition: 0.3s;\n\t\ttop: var(--margin);\n\t\tleft: var(--margin);\n\t\twidth: var(--knobSize);\n\t\theight: var(--knobSize);\n\t\tbackground: var(--knobBgColor);\n\t\tborder-radius: var(--knobSize);\n\t}\n\tvaadin-checkbox::part(checkbox) {\n\t\theight: 0;\n\t\twidth: 0;\n\t\tvisibility: hidden;\n\t}\n\tvaadin-checkbox[checked]>label::after {\n\t\ttransform: translateX(-100%);\n\t\tleft: calc(100% - var(--margin));\n\t}\n\tvaadin-checkbox[active]>label::after {\n\t\twidth: calc(var(--knobSize) + 15px);\n\t}\n`;const b=d;customElements.define(h,b)}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[322],{178:(e,t,r)=>{r.r(t),r.d(t,{TextArea:()=>x}),r(7101);var a=r(2788),n=r(4599),o=r(2089),s=r(3938),c=r(8237),l=r(3097);const i=(0,a.iY)("text-area"),d=":not([disabled])::part(input-field)";let p="";const u=(0,a.qC)((0,n.y)({mappings:{resize:{selector:"> textarea"},color:{selector:"::part(label)"},cursor:{},width:{},backgroundColor:{selector:d},borderWidth:{selector:d},borderStyle:{selector:d},borderColor:{selector:d},borderRadius:{selector:d},outline:{selector:d},outlineOffset:{selector:d}}}),o.e,s.y,c.A)((0,l.D)({slots:[],wrappedEleName:"vaadin-text-area",style:()=>p,excludeAttrsSync:["tabindex"],componentName:i}));p='\n\tvaadin-text-area {\n\t\tmargin: 0;\n\t}\n\tvaadin-text-area > label,\n\tvaadin-text-area::part(input-field) {\n\t\tcursor: pointer;\n\t}\n\tvaadin-text-area[focused] input:focus {\n\t\tcursor: text;\n\t}\n\tvaadin-text-area::part(required-indicator)::after {\n\t\tfont-size: "12px";\n\t\tcontent: "*";\n\t}\t\n';const x=u;customElements.define(i,x)}}]);
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[934],{
|
1
|
+
"use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[934],{9357:(e,s,c)=>{c.r(s),c.d(s,{TextField:()=>p.ZP}),c(9789);var p=c(9063);customElements.define(p.fm,p.ZP)}}]);
|
package/dist/umd/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DescopeUI=t():e.DescopeUI=t()}(self,(()=>(()=>{var e,t,r,o={534:(e,t,r)=>{var o={"./descope-button/index.js":[3029,840,767,211,513,729,313,599,97,662],"./descope-checkbox/index.js":[7904,840,786,208,767,515,313,599,97,938,761],"./descope-combo/index.js":[2798,840,786,208,233,767,422,211,725,513,789,729,313,599,97,938,63,662,934,247],"./descope-container/index.js":[147,313,599,317],"./descope-date-picker/index.js":[2552,840,786,208,233,767,211,513,54,313,97,17],"./descope-email-field/index.js":[689,840,786,208,233,422,725,437,313,599,97,938,63,760],"./descope-number-field/index.js":[4951,840,786,208,233,422,806,313,599,97,938,63,142],"./descope-password-field/index.js":[1721,840,786,208,233,767,422,211,725,56,313,599,97,938,63,320],"./descope-switch-toggle/index.js":[3774,840,786,208,767,515,313,599,97,938,739],"./descope-text-area/index.js":[178,840,786,233,422,101,313,599,97,938,322],"./descope-text-field/index.js":[9357,840,786,208,233,422,725,789,313,599,97,938,63,934]};function n(e){if(!r.o(o,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=o[e],n=t[0];return Promise.all(t.slice(1).map(r.e)).then((()=>r(n)))}n.keys=()=>Object.keys(o),n.id=534,e.exports=n},7507:(e,t,r)=>{const o=r(534);e.exports=o.keys().reduce(((e,t)=>(e[t.replace(/.*?([^\/]+)\/index\.js$/,"$1")]=()=>o(t),e)),{})}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,e=[],i.O=(t,r,o,n)=>{if(!r){var s=1/0;for(p=0;p<e.length;p++){for(var[r,o,n]=e[p],d=!0,c=0;c<r.length;c++)(!1&n||s>=n)&&Object.keys(i.O).every((e=>i.O[e](r[c])))?r.splice(c--,1):(d=!1,n<s&&(s=n));if(d){e.splice(p--,1);var a=o();void 0!==a&&(t=a)}}return t}n=n||0;for(var p=e.length;p>0&&e[p-1][2]>n;p--)e[p]=e[p-1];e[p]=[r,o,n]},i.F={},i.E=e=>{Object.keys(i.F).map((t=>{i.F[t](e)}))},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,r)=>(i.f[r](e,t),t)),[])),i.u=e=>(({17:"descope-date-picker-index-js",142:"descope-number-field-index-js",247:"descope-combo-index-js",317:"descope-container-index-js",320:"descope-password-field-index-js",322:"descope-text-area-index-js",662:"descope-button-index-js",739:"descope-switch-toggle-index-js",760:"descope-email-field-index-js",761:"descope-checkbox-index-js",934:"descope-text-field-index-js"}[e]||e)+".js"),i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="DescopeUI:",i.l=(e,o,n,s)=>{if(t[e])t[e].push(o);else{var d,c;if(void 0!==n)for(var a=document.getElementsByTagName("script"),p=0;p<a.length;p++){var l=a[p];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==r+n){d=l;break}}d||(c=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,i.nc&&d.setAttribute("nonce",i.nc),d.setAttribute("data-webpack",r+n),d.src=e),t[e]=[o];var u=(r,o)=>{d.onerror=d.onload=null,clearTimeout(f);var n=t[e];if(delete t[e],d.parentNode&&d.parentNode.removeChild(d),n&&n.forEach((e=>e(o))),r)return r(o)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=u.bind(null,d.onerror),d.onload=u.bind(null,d.onload),c&&document.head.appendChild(d)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={826:0};i.f.j=(t,r)=>{var o=i.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var n=new Promise(((r,n)=>o=e[t]=[r,n]));r.push(o[2]=n);var s=i.p+i.u(t),d=new Error;i.l(s,(r=>{if(i.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var n=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;d.message="Loading chunk "+t+" failed.\n("+n+": "+s+")",d.name="ChunkLoadError",d.type=n,d.request=s,o[1](d)}}),"chunk-"+t,t)}},i.F.j=t=>{if(!i.o(e,t)||void 0===e[t]){e[t]=null;var r=document.createElement("link");i.nc&&r.setAttribute("nonce",i.nc),r.rel="prefetch",r.as="script",r.href=i.p+i.u(t),document.head.appendChild(r)}},i.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[s,d,c]=r,a=0;if(s.some((t=>0!==e[t]))){for(o in d)i.o(d,o)&&(i.m[o]=d[o]);if(c)var p=c(i)}for(t&&t(r);a<s.length;a++)n=s[a],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(p)},r=self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),i.O(0,[826],(()=>{[840,767,211,513,729,313,599,97,662,786,208,515,938,761,233,422,725,789,63,934,247,317,54,17,437,760,806,142,56,320,739,101,322].map(i.E)}),5);var s=i(7507);return i.O(s)})()));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@descope/web-components-ui",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.41",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/cjs/index.cjs.js",
|
6
6
|
"module": "dist/index.esm.js",
|
@@ -15,7 +15,8 @@
|
|
15
15
|
"build:umd": "webpack -c webpack.prod.js",
|
16
16
|
"build:lib": "rollup -c",
|
17
17
|
"build": "npm run build:umd && npm run build:lib",
|
18
|
-
"start": "webpack serve -c webpack.dev.js --port=8888"
|
18
|
+
"start": "webpack serve -c webpack.dev.js --port=8888",
|
19
|
+
"format": "prettier . -w --ignore-path .gitignore"
|
19
20
|
},
|
20
21
|
"files": [
|
21
22
|
"dist",
|
@@ -28,6 +29,7 @@
|
|
28
29
|
"html-webpack-plugin": "^5.5.1",
|
29
30
|
"jest": "^29.5.0",
|
30
31
|
"jest-environment-jsdom": "^29.5.0",
|
32
|
+
"prettier": "^2.8.8",
|
31
33
|
"rollup": "^3.21.4",
|
32
34
|
"webpack": "^5.79.0",
|
33
35
|
"webpack-cli": "^5.0.1",
|
@@ -35,7 +37,12 @@
|
|
35
37
|
},
|
36
38
|
"dependencies": {
|
37
39
|
"@vaadin/button": "24.0.4",
|
40
|
+
"@vaadin/checkbox": "24.0.0",
|
38
41
|
"@vaadin/date-picker": "24.0.4",
|
42
|
+
"@vaadin/email-field": "24.0.0",
|
43
|
+
"@vaadin/number-field": "24.0.0",
|
44
|
+
"@vaadin/password-field": "24.0.0",
|
45
|
+
"@vaadin/text-area": "24.0.0",
|
39
46
|
"@vaadin/text-field": "24.0.4",
|
40
47
|
"color": "^4.2.3",
|
41
48
|
"lodash.merge": "4.6.2",
|
@@ -1,37 +1,97 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import {
|
2
|
+
getComponentName,
|
3
|
+
createStyleMixin,
|
4
|
+
draggableMixin,
|
5
|
+
createProxy,
|
6
|
+
compose,
|
7
|
+
componentNameValidationMixin
|
8
|
+
} from '../../componentsHelpers';
|
9
|
+
import { matchHostStyle } from '../../componentsHelpers/createStyleMixin/helpers';
|
10
|
+
|
11
|
+
export const componentName = getComponentName('button');
|
3
12
|
|
4
13
|
const editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;
|
14
|
+
const resetStyles = `
|
15
|
+
vaadin-button { margin: 0; }
|
16
|
+
vaadin-button::part(prefix) {
|
17
|
+
margin-left: 0;
|
18
|
+
margin-right: 0;
|
19
|
+
}
|
20
|
+
`;
|
21
|
+
const iconStyles = `
|
22
|
+
vaadin-button::part(prefix),
|
23
|
+
vaadin-button::part(label) {
|
24
|
+
display: flex;
|
25
|
+
justify-content: center;
|
26
|
+
align-items: center;
|
27
|
+
gap: 5px;
|
28
|
+
}
|
29
|
+
`;
|
30
|
+
|
31
|
+
let overrides = ``;
|
5
32
|
|
6
|
-
|
33
|
+
const selectors = {
|
34
|
+
label: '::part(label)'
|
35
|
+
};
|
7
36
|
|
8
37
|
const Button = compose(
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
38
|
+
createStyleMixin({
|
39
|
+
// todo: do we want to change the mapping structure to this? ['aa', 'aaa', {'color': [{ selector: '::part(label)' }]}],
|
40
|
+
mappings: {
|
41
|
+
backgroundColor: {},
|
42
|
+
borderRadius: {},
|
43
|
+
color: { selector: selectors.label },
|
44
|
+
borderColor: {},
|
45
|
+
borderStyle: {},
|
46
|
+
borderWidth: {},
|
47
|
+
fontSize: {},
|
48
|
+
height: {},
|
49
|
+
width: [matchHostStyle()],
|
50
|
+
cursor: {},
|
51
|
+
padding: [matchHostStyle(), { selector: selectors.label }],
|
52
|
+
textDecoration: { selector: selectors.label }
|
53
|
+
}
|
54
|
+
}),
|
55
|
+
draggableMixin,
|
56
|
+
componentNameValidationMixin
|
27
57
|
)(
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
)
|
58
|
+
createProxy({
|
59
|
+
slots: ['prefix', 'label', 'suffix'],
|
60
|
+
wrappedEleName: 'vaadin-button',
|
61
|
+
style: () =>
|
62
|
+
`${resetStyles} ${editorOverrides} ${iconStyles} ${loadingIndicatorStyles}`,
|
63
|
+
excludeAttrsSync: ['tabindex'],
|
64
|
+
componentName
|
65
|
+
})
|
66
|
+
);
|
67
|
+
|
68
|
+
const loadingIndicatorStyles = `
|
69
|
+
@keyframes spin {
|
70
|
+
0% { -webkit-transform: rotate(0deg); }
|
71
|
+
100% { -webkit-transform: rotate(360deg); }
|
72
|
+
}
|
73
|
+
:host([loading]) ::before {
|
74
|
+
--marginRatio: 1.35;
|
75
|
+
color: var(${Button.cssVarList.color});
|
76
|
+
animation: spin 2s linear infinite;
|
77
|
+
position: absolute;
|
78
|
+
top: calc(50% - calc((var(${Button.cssVarList.height}) / var(--marginRatio)) / 2));
|
79
|
+
left: calc(50% - calc((var(${Button.cssVarList.height}) / var(--marginRatio)) / 2));
|
80
|
+
content: '';
|
81
|
+
z-index: 1;
|
82
|
+
box-sizing: border-box;
|
83
|
+
border-radius: 50%;
|
84
|
+
border-bottom-color: transparent;
|
85
|
+
border-left-color: transparent;
|
86
|
+
border-width: calc(var(${Button.cssVarList.height}) / 12);
|
87
|
+
border-style: solid;
|
88
|
+
width: calc(var(${Button.cssVarList.height}) / var(--marginRatio));
|
89
|
+
height: calc(var(${Button.cssVarList.height}) / var(--marginRatio));
|
90
|
+
}
|
91
|
+
:host([loading])::part(prefix),
|
92
|
+
:host([loading])::part(label) {
|
93
|
+
visibility: hidden;
|
94
|
+
}
|
95
|
+
`;
|
36
96
|
|
37
|
-
export default Button
|
97
|
+
export default Button;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import {
|
2
|
+
getComponentName,
|
3
|
+
createStyleMixin,
|
4
|
+
draggableMixin,
|
5
|
+
createProxy,
|
6
|
+
inputMixin,
|
7
|
+
compose,
|
8
|
+
componentNameValidationMixin
|
9
|
+
} from '../../componentsHelpers';
|
10
|
+
|
11
|
+
export const componentName = getComponentName('checkbox');
|
12
|
+
|
13
|
+
const Checkbox = compose(
|
14
|
+
createStyleMixin({
|
15
|
+
mappings: {
|
16
|
+
width: {},
|
17
|
+
cursor: [{}, { selector: '> label' }]
|
18
|
+
}
|
19
|
+
}),
|
20
|
+
draggableMixin,
|
21
|
+
inputMixin,
|
22
|
+
componentNameValidationMixin
|
23
|
+
)(
|
24
|
+
createProxy({
|
25
|
+
slots: [],
|
26
|
+
wrappedEleName: 'vaadin-checkbox',
|
27
|
+
style: ``,
|
28
|
+
excludeAttrsSync: ['tabindex'],
|
29
|
+
componentName
|
30
|
+
})
|
31
|
+
);
|
32
|
+
|
33
|
+
export default Checkbox;
|
@@ -1,26 +1,26 @@
|
|
1
1
|
import { getComponentName } from '../../componentsHelpers';
|
2
|
-
import '../descope-button'
|
3
|
-
import '../descope-text-field'
|
2
|
+
import '../descope-button';
|
3
|
+
import '../descope-text-field';
|
4
4
|
|
5
|
-
const template = document.createElement('template')
|
5
|
+
const template = document.createElement('template');
|
6
6
|
|
7
|
-
const componentName = getComponentName(
|
7
|
+
const componentName = getComponentName('combo');
|
8
8
|
|
9
9
|
template.innerHTML = `
|
10
10
|
<descope-button></descope-button>
|
11
11
|
<descope-text-field></descope-text-field>
|
12
|
-
|
12
|
+
`;
|
13
13
|
|
14
14
|
class Combo extends HTMLElement {
|
15
|
-
|
16
|
-
|
15
|
+
constructor() {
|
16
|
+
super();
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
this.attachShadow({ mode: 'open' }).appendChild(
|
19
|
+
template.content.cloneNode(true)
|
20
|
+
);
|
21
|
+
}
|
22
22
|
}
|
23
23
|
|
24
24
|
customElements.define(componentName, Combo);
|
25
25
|
|
26
|
-
export { Combo }
|
26
|
+
export { Combo };
|