@ni/ok-components 0.2.6 → 0.2.8
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/all-components-bundle.js +425 -341
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +33 -9
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/all-components.d.ts +1 -0
- package/dist/esm/all-components.js +1 -0
- package/dist/esm/all-components.js.map +1 -1
- package/dist/esm/icon-dynamic/index.d.ts +23 -0
- package/dist/esm/icon-dynamic/index.js +59 -0
- package/dist/esm/icon-dynamic/index.js.map +1 -0
- package/dist/esm/icon-dynamic/styles.d.ts +1 -0
- package/dist/esm/icon-dynamic/styles.js +20 -0
- package/dist/esm/icon-dynamic/styles.js.map +1 -0
- package/dist/esm/icon-dynamic/template.d.ts +2 -0
- package/dist/esm/icon-dynamic/template.js +3 -0
- package/dist/esm/icon-dynamic/template.js.map +1 -0
- package/dist/esm/utilities/style/user-select.d.ts +5 -0
- package/dist/esm/utilities/style/user-select.js +10 -0
- package/dist/esm/utilities/style/user-select.js.map +1 -0
- package/package.json +2 -2
|
@@ -15866,6 +15866,7 @@ const LQ=Mt`
|
|
|
15866
15866
|
placeholder="${t=>t.placeholder}"
|
|
15867
15867
|
rows="1"
|
|
15868
15868
|
tabindex="${t=>t.tabIndex}"
|
|
15869
|
+
maxlength="${t=>t.maxLength}"
|
|
15869
15870
|
@keydown="${(t,e)=>t.textAreaKeydownHandler(e.event)}"
|
|
15870
15871
|
@input="${t=>t.textAreaInputHandler()}"
|
|
15871
15872
|
></textarea>
|
|
@@ -15883,9 +15884,9 @@ const LQ=Mt`
|
|
|
15883
15884
|
<${lv} slot="start"><${lv}/>
|
|
15884
15885
|
</${Rd}>
|
|
15885
15886
|
</div>`
|
|
15886
|
-
class PQ extends Ve{constructor(){super(...arguments),this.value="",this.disableSendButton=!0}textAreaKeydownHandler(t){return!(t.key===rn&&!t.shiftKey)||(this.sendButtonClickHandler(),!1)}textAreaInputHandler(){this.value=this.textArea.value,this.disableSendButton=this.shouldDisableSendButton()}valueChanged(){this.textArea&&(this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton())}connectedCallback(){super.connectedCallback(),this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton()}sendButtonClickHandler(){if(this.shouldDisableSendButton())return
|
|
15887
|
+
class PQ extends Ve{constructor(){super(...arguments),this.value="",this.maxLength=-1,this.disableSendButton=!0}textAreaKeydownHandler(t){return!(t.key===rn&&!t.shiftKey)||(this.sendButtonClickHandler(),!1)}textAreaInputHandler(){this.value=this.textArea.value,this.disableSendButton=this.shouldDisableSendButton()}valueChanged(){this.textArea&&(this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton())}connectedCallback(){super.connectedCallback(),this.textArea.value=this.value,this.disableSendButton=this.shouldDisableSendButton()}sendButtonClickHandler(){if(this.shouldDisableSendButton())return
|
|
15887
15888
|
const t={text:this.textArea.value}
|
|
15888
|
-
this.resetInput(),this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}resetInput(){this.value="",this.disableSendButton=!0,this.textArea&&(this.textArea.value="",this.textArea.focus())}}t([ft],PQ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],PQ.prototype,"sendButtonLabel",void 0),t([ft],PQ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],PQ.prototype,"tabIndex",void 0),t([C],PQ.prototype,"textArea",void 0),t([C],PQ.prototype,"disableSendButton",void 0)
|
|
15889
|
+
this.resetInput(),this.$emit("send",t)}shouldDisableSendButton(){return 0===this.textArea.value.length}resetInput(){this.value="",this.disableSendButton=!0,this.textArea&&(this.textArea.value="",this.textArea.focus())}}t([ft],PQ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],PQ.prototype,"sendButtonLabel",void 0),t([ft],PQ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],PQ.prototype,"tabIndex",void 0),t([ft({attribute:"maxlength",converter:ut})],PQ.prototype,"maxLength",void 0),t([C],PQ.prototype,"textArea",void 0),t([C],PQ.prototype,"disableSendButton",void 0)
|
|
15889
15890
|
const zQ=PQ.compose({baseName:"chat-input",template:BQ,styles:LQ,shadowOptions:{delegatesFocus:!0}})
|
|
15890
15891
|
Mi.getOrCreate().withPrefix("spright").register(zQ())
|
|
15891
15892
|
const VQ={system:void 0,outbound:"outbound",inbound:"inbound"},HQ=Mt`
|
|
@@ -16153,8 +16154,8 @@ const JQ=Mt`
|
|
|
16153
16154
|
`,QQ=Q`<slot></slot>`
|
|
16154
16155
|
const t0=class extends Ve{}.compose({baseName:"rectangle",template:QQ,styles:JQ})
|
|
16155
16156
|
Mi.getOrCreate().withPrefix("spright").register(t0())
|
|
16156
|
-
const e0=Mt`
|
|
16157
|
-
${
|
|
16157
|
+
const e0=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`,n0=Mt`
|
|
16158
|
+
${e0("inline-block")}
|
|
16158
16159
|
|
|
16159
16160
|
:host {
|
|
16160
16161
|
border: 2px solid ${$l};
|
|
@@ -16176,9 +16177,32 @@ const e0=Mt`
|
|
|
16176
16177
|
:host([disabled]) slot {
|
|
16177
16178
|
color: ${yc};
|
|
16178
16179
|
}
|
|
16179
|
-
|
|
16180
|
-
|
|
16181
|
-
|
|
16182
|
-
const
|
|
16183
|
-
|
|
16180
|
+
`,i0=Q`<slot></slot>`
|
|
16181
|
+
const o0=class extends Ve{}.compose({baseName:"button",template:i0,styles:n0})
|
|
16182
|
+
Mi.getOrCreate().withPrefix("ok").register(o0())
|
|
16183
|
+
const s0=Et`
|
|
16184
|
+
user-select: none;
|
|
16185
|
+
-webkit-user-select: none;
|
|
16186
|
+
`,r0=Mt`
|
|
16187
|
+
${e0("inline-flex")}
|
|
16188
|
+
|
|
16189
|
+
:host {
|
|
16190
|
+
align-items: center;
|
|
16191
|
+
${s0}
|
|
16192
|
+
width: ${jl};
|
|
16193
|
+
height: ${jl};
|
|
16194
|
+
}
|
|
16195
|
+
|
|
16196
|
+
img {
|
|
16197
|
+
width: 100%;
|
|
16198
|
+
height: 100%;
|
|
16199
|
+
}
|
|
16200
|
+
`,a0=Q`<img aria-hidden="true" src=${t=>t.url}>`
|
|
16201
|
+
class l0 extends im{constructor(t){super(),this.url=t}static registerIconDynamic(t,e){const n="ok-icon-dynamic-"
|
|
16202
|
+
if(!t.startsWith(n))throw new Error(`Icon tag name must start with '${n}', provided name: ${t}`)
|
|
16203
|
+
const i=t.substring(16)
|
|
16204
|
+
if(!/^[a-z][a-z]+$/.test(i))throw new Error(`Icon name must be lowercase [a-z] and at least two characters long, provided name: ${i}`)
|
|
16205
|
+
const o=`IconDynamic${i.charAt(0).toUpperCase()+i.slice(1)}`,s=`icon-dynamic-${i}`,r={[o]:class extends l0{constructor(){super(e)}}}[o].compose({baseName:s,template:a0,styles:r0})
|
|
16206
|
+
Mi.getOrCreate().withPrefix("ok").register(r())}}const c0=l0.compose({baseName:"icon-dynamic",template:Q`<template></template>`,styles:Mt`${e0("none")}`})
|
|
16207
|
+
Mi.getOrCreate().withPrefix("ok").register(c0())}()
|
|
16184
16208
|
//# sourceMappingURL=all-components-bundle.min.js.map
|