@ni/spright-components 6.2.0 → 6.3.0

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.
@@ -15201,6 +15201,11 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
15201
15201
  border: ${Vl} solid ${dl};
15202
15202
  }
15203
15203
 
15204
+ :host([appearance='overlay']) {
15205
+ background: none;
15206
+ border-color: transparent;
15207
+ }
15208
+
15204
15209
  .messages {
15205
15210
  flex: 1;
15206
15211
  display: flex;
@@ -15213,6 +15218,10 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
15213
15218
  overflow-y: auto;
15214
15219
  }
15215
15220
 
15221
+ :host([appearance='overlay']) .messages {
15222
+ background: none;
15223
+ }
15224
+
15216
15225
  .input {
15217
15226
  padding: ${Vl} ${Bl} ${Bl}
15218
15227
  ${Bl};
@@ -15227,22 +15236,24 @@ const SJ=t=>`${Hs(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
15227
15236
  <slot name="input" ${ie({property:"slottedInputElements"})}>
15228
15237
  </slot>
15229
15238
  </div>
15230
- `
15231
- class MJ extends je{constructor(){super(...arguments),this.inputEmpty=!0}slottedInputElementsChanged(t,e){this.inputEmpty=!e?.length}}t([C],MJ.prototype,"inputEmpty",void 0),t([C],MJ.prototype,"slottedInputElements",void 0)
15232
- const $J=MJ.compose({baseName:"chat-conversation",template:IJ,styles:_J})
15233
- Di.getOrCreate().withPrefix("spright").register($J())
15234
- const DJ=Mt`
15239
+ `,MJ={default:void 0}
15240
+ class $J extends je{constructor(){super(...arguments),this.appearance=MJ.default,this.inputEmpty=!0}slottedInputElementsChanged(t,e){this.inputEmpty=!e?.length}}t([ft],$J.prototype,"appearance",void 0),t([C],$J.prototype,"inputEmpty",void 0),t([C],$J.prototype,"slottedInputElements",void 0)
15241
+ const DJ=$J.compose({baseName:"chat-conversation",template:IJ,styles:_J})
15242
+ Di.getOrCreate().withPrefix("spright").register(DJ())
15243
+ const EJ=Mt`
15235
15244
  ${SJ("flex")}
15236
15245
 
15237
15246
  :host {
15238
15247
  width: 100%;
15239
15248
  height: auto;
15249
+ outline: none;
15250
+ --ni-private-hover-indicator-width: calc(${Vl} + 1px);
15240
15251
  }
15241
15252
 
15242
15253
  .container {
15243
- display: grid;
15244
- grid-template-rows: auto 1fr;
15245
- grid-template-columns: 1fr auto;
15254
+ display: flex;
15255
+ flex-direction: column;
15256
+ position: relative;
15246
15257
  width: 100%;
15247
15258
  height: 100%;
15248
15259
 
@@ -15251,10 +15262,34 @@ const DJ=Mt`
15251
15262
  box-shadow: ${Kl};
15252
15263
  }
15253
15264
 
15254
- textarea {
15255
- grid-row: 1;
15256
- grid-column: 1 / 3;
15265
+ .container::after {
15266
+ content: '';
15267
+ position: absolute;
15268
+ bottom: calc(-1 * ${Vl});
15269
+ width: 0px;
15270
+ height: 0px;
15271
+ align-self: center;
15272
+ border-bottom: ${Cl}
15273
+ var(--ni-private-hover-indicator-width) solid;
15274
+ transition: width ${nh} ease-in;
15275
+ }
15257
15276
 
15277
+ :host(:hover) .container::after {
15278
+ width: 100%;
15279
+ transition: width ${nh} ease-in;
15280
+ }
15281
+
15282
+ :host(:focus-within) .container {
15283
+ border-bottom-color: ${Cl};
15284
+ }
15285
+
15286
+ @media (prefers-reduced-motion) {
15287
+ .container::after {
15288
+ transition-duration: 0s;
15289
+ }
15290
+ }
15291
+
15292
+ textarea {
15258
15293
  font: ${Qc};
15259
15294
  color: ${td};
15260
15295
  background-color: transparent;
@@ -15275,12 +15310,11 @@ const DJ=Mt`
15275
15310
  }
15276
15311
 
15277
15312
  .send-button {
15278
- grid-row: 2;
15279
- grid-column: 2;
15313
+ align-self: flex-end;
15280
15314
  width: 80px;
15281
15315
  margin: ${Ll};
15282
15316
  }
15283
- `,EJ=Q`
15317
+ `,AJ=Q`
15284
15318
  <div class="container">
15285
15319
  <textarea
15286
15320
  ${Ut("textArea")}
@@ -15304,12 +15338,12 @@ const DJ=Mt`
15304
15338
  <${ob} slot="start"><${ob}/>
15305
15339
  </${zh}>
15306
15340
  </div>`
15307
- class AJ extends je{constructor(){super(...arguments),this.value="",this.disableSendButton=!0}textAreaKeydownHandler(t){return!(t.key===dn&&!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
15341
+ class OJ extends je{constructor(){super(...arguments),this.value="",this.disableSendButton=!0}textAreaKeydownHandler(t){return!(t.key===dn&&!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
15308
15342
  const t={text:this.textArea.value}
15309
- 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],AJ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],AJ.prototype,"sendButtonLabel",void 0),t([ft],AJ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],AJ.prototype,"tabIndex",void 0),t([C],AJ.prototype,"textArea",void 0),t([C],AJ.prototype,"disableSendButton",void 0)
15310
- const OJ=AJ.compose({baseName:"chat-input",template:EJ,styles:DJ,shadowOptions:{delegatesFocus:!0}})
15311
- Di.getOrCreate().withPrefix("spright").register(OJ())
15312
- const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
15343
+ 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],OJ.prototype,"placeholder",void 0),t([ft({attribute:"send-button-label"})],OJ.prototype,"sendButtonLabel",void 0),t([ft],OJ.prototype,"value",void 0),t([ft({attribute:"tabindex",converter:ut})],OJ.prototype,"tabIndex",void 0),t([C],OJ.prototype,"textArea",void 0),t([C],OJ.prototype,"disableSendButton",void 0)
15344
+ const TJ=OJ.compose({baseName:"chat-input",template:AJ,styles:EJ,shadowOptions:{delegatesFocus:!0}})
15345
+ Di.getOrCreate().withPrefix("spright").register(TJ())
15346
+ const RJ={system:void 0,outbound:"outbound",inbound:"inbound"},FJ=Mt`
15313
15347
  ${SJ("flex")}
15314
15348
 
15315
15349
  :host {
@@ -15323,11 +15357,11 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
15323
15357
  color: ${td};
15324
15358
  }
15325
15359
 
15326
- :host([message-type='${TJ.outbound}']) {
15360
+ :host([message-type='${RJ.outbound}']) {
15327
15361
  justify-content: flex-end;
15328
15362
  }
15329
15363
 
15330
- :host([message-type='${TJ.inbound}']) {
15364
+ :host([message-type='${RJ.inbound}']) {
15331
15365
  justify-content: flex-start;
15332
15366
  }
15333
15367
 
@@ -15347,7 +15381,7 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
15347
15381
  overflow-x: auto;
15348
15382
  }
15349
15383
 
15350
- :host([message-type='${TJ.outbound}']) .message-content {
15384
+ :host([message-type='${RJ.outbound}']) .message-content {
15351
15385
  background: ${ul};
15352
15386
  border: ${Vl} solid ${Cl};
15353
15387
  border-radius: ${Ll} ${Ll} 0px ${Ll};
@@ -15358,7 +15392,7 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
15358
15392
  display: none;
15359
15393
  }
15360
15394
 
15361
- :host([message-type='${TJ.inbound}'])
15395
+ :host([message-type='${RJ.inbound}'])
15362
15396
  .footer-actions.has-content {
15363
15397
  display: flex;
15364
15398
  column-gap: ${Bl};
@@ -15376,14 +15410,14 @@ const TJ={system:void 0,outbound:"outbound",inbound:"inbound"},RJ=Mt`
15376
15410
  display: none;
15377
15411
  }
15378
15412
 
15379
- :host([message-type='${TJ.inbound}']) .end {
15413
+ :host([message-type='${RJ.inbound}']) .end {
15380
15414
  display: flex;
15381
15415
  column-gap: ${Bl};
15382
15416
  margin-top: ${zl};
15383
15417
  }
15384
15418
  `
15385
- class FJ extends je{constructor(){super(...arguments),this.messageType=TJ.system,this.footerActionsIsEmpty=!0}slottedFooterActionsElementsChanged(t,e){this.footerActionsIsEmpty=!e?.length}}t([ft({attribute:"message-type"})],FJ.prototype,"messageType",void 0),t([C],FJ.prototype,"footerActionsIsEmpty",void 0),t([C],FJ.prototype,"slottedFooterActionsElements",void 0),Ze(FJ,re)
15386
- const NJ=FJ.compose({baseName:"chat-message",template:(t,e)=>Q`
15419
+ class NJ extends je{constructor(){super(...arguments),this.messageType=RJ.system,this.footerActionsIsEmpty=!0}slottedFooterActionsElementsChanged(t,e){this.footerActionsIsEmpty=!e?.length}}t([ft({attribute:"message-type"})],NJ.prototype,"messageType",void 0),t([C],NJ.prototype,"footerActionsIsEmpty",void 0),t([C],NJ.prototype,"slottedFooterActionsElements",void 0),Ze(NJ,re)
15420
+ const LJ=NJ.compose({baseName:"chat-message",template:(t,e)=>Q`
15387
15421
  <div class="container">
15388
15422
  ${le(0,e)}
15389
15423
  <section class="message-content">
@@ -15397,9 +15431,9 @@ const NJ=FJ.compose({baseName:"chat-message",template:(t,e)=>Q`
15397
15431
  </section>
15398
15432
  ${ae(0,e)}
15399
15433
  </div>
15400
- `,styles:RJ})
15401
- Di.getOrCreate().withPrefix("spright").register(NJ())
15402
- const LJ=Mt`
15434
+ `,styles:FJ})
15435
+ Di.getOrCreate().withPrefix("spright").register(LJ())
15436
+ const BJ=Mt`
15403
15437
  ${SJ("inline-block")}
15404
15438
 
15405
15439
  :host {
@@ -15422,7 +15456,7 @@ const LJ=Mt`
15422
15456
  :host([disabled]) slot {
15423
15457
  color: ${ed};
15424
15458
  }
15425
- `,BJ=Q`<slot></slot>`
15426
- const zJ=class extends je{}.compose({baseName:"rectangle",template:BJ,styles:LJ})
15427
- Di.getOrCreate().withPrefix("spright").register(zJ())}()
15459
+ `,zJ=Q`<slot></slot>`
15460
+ const VJ=class extends je{}.compose({baseName:"rectangle",template:zJ,styles:BJ})
15461
+ Di.getOrCreate().withPrefix("spright").register(VJ())}()
15428
15462
  //# sourceMappingURL=all-components-bundle.min.js.map