@momentum-design/components 0.102.4 → 0.102.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/browser/index.js +2 -2
- package/dist/browser/index.js.map +3 -3
- package/dist/components/input/input.component.d.ts +1 -0
- package/dist/components/input/input.component.js +2 -0
- package/dist/components/input/input.types.d.ts +7 -3
- package/dist/components/searchfield/searchfield.component.d.ts +7 -2
- package/dist/components/searchfield/searchfield.component.js +8 -3
- package/dist/components/searchfield/searchfield.types.d.ts +2 -0
- package/dist/components/searchfield/searchfield.types.js +1 -0
- package/dist/custom-elements.json +233 -201
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/input/index.d.ts +3 -1
- package/dist/react/input/index.js +2 -0
- package/dist/react/password/index.d.ts +2 -1
- package/dist/react/password/index.js +1 -0
- package/dist/react/searchfield/index.d.ts +9 -3
- package/dist/react/searchfield/index.js +8 -2
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
@@ -3161,7 +3161,7 @@
|
|
3161
3161
|
>
|
3162
3162
|
${this.prefixText.slice(0,$u.MAX_LENGTH)}
|
3163
3163
|
</mdc-text>
|
3164
|
-
`:W}clearInputText(){var t;this.value="",(t=this.inputElement)==null||t.focus()}renderTrailingButton(t=!1){let o=t||this.value&&this.trailingButton;return o?C`
|
3164
|
+
`:W}clearInputText(){var t;this.value="",(t=this.inputElement)==null||t.focus(),this.dispatchEvent(new CustomEvent("clear",{bubbles:!0,composed:!0}))}renderTrailingButton(t=!1){let o=t||this.value&&this.trailingButton;return o?C`
|
3165
3165
|
<mdc-button
|
3166
3166
|
part="trailing-button"
|
3167
3167
|
class="own-focus-ring ${o?"":"hidden"}"
|
@@ -4554,7 +4554,7 @@
|
|
4554
4554
|
position: relative;
|
4555
4555
|
scrollbar-width: none;
|
4556
4556
|
}
|
4557
|
-
`,$f=[tT];var zf=Y.constructTagName("searchfield"),Ma={TYPE:ls.SEARCH,ICON:"search-bold",CLOSE_BTN:!0,INPUT_CHIP_TAG:dl};var To=class extends ri{constructor(){super(...arguments);this.isInputFocused=!1;this.hasInputChips=!1}handleKeyDown(t){super.handleKeyDown(t),t.key===
|
4557
|
+
`,$f=[tT];var zf=Y.constructTagName("searchfield"),Ma={TYPE:ls.SEARCH,ICON:"search-bold",CLOSE_BTN:!0,INPUT_CHIP_TAG:dl};var To=class extends ri{constructor(){super(...arguments);this.isInputFocused=!1;this.hasInputChips=!1}handleKeyDown(t){super.handleKeyDown(t),t.key===J.ESCAPE&&this.clearInputText()}connectedCallback(){super.connectedCallback(),this.leadingIcon=Ma.ICON,this.trailingButton=Ma.CLOSE_BTN,this.helpText=void 0,this.helpTextType=void 0,this.required=void 0,this.validationMessage=void 0,this.prefixText=void 0}renderInputChips(){var t;this.hasInputChips=!!((t=this.inputChips)!=null&&t.length),this.inputChips&&this.inputChips.forEach(o=>{o.matches(Ma.INPUT_CHIP_TAG)||o.remove()})}firstUpdated(){this.inputElement.onfocus=()=>{this.isInputFocused=!0},this.inputElement.onblur=()=>{this.isInputFocused=!1}}clearInputText(){var t;super.clearInputText(),(t=this.inputChips)==null||t.forEach(o=>{o.dispatchEvent(new CustomEvent("remove",{bubbles:!0,composed:!0}))})}render(){return C`
|
4558
4558
|
${this.renderLabelElement()}
|
4559
4559
|
<div
|
4560
4560
|
class="${kr({"input-container":!0,"mdc-focus-ring":this.isInputFocused})}"
|