@ni/ok-components 0.4.0 → 0.4.2

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.
@@ -2336,7 +2336,7 @@ Xm("icon-check",class extends Ym{constructor(){super(Ou)}})
2336
2336
  const tg="nimble-icon-check",eg="Close",ng="Decrement",ig="Increment",og="Error",rg="Warning",sg="Completed",ag="Current",lg="Information",cg="Search",dg="No items found",hg="Loading…",ug="Scroll backward",pg="Scroll forward",fg="Remove",mg=xi.create({name:"popup-dismiss-label",cssCustomPropertyName:null}).withDefault(eg),gg=xi.create({name:"numeric-decrement-label",cssCustomPropertyName:null}).withDefault(ng),vg=xi.create({name:"numeric-increment-label",cssCustomPropertyName:null}).withDefault(ig),bg=xi.create({name:"popup-icon-error-label",cssCustomPropertyName:null}).withDefault(og),yg=xi.create({name:"popup-icon-warning-label",cssCustomPropertyName:null}).withDefault(rg),wg=xi.create({name:"popup-icon-completed-label",cssCustomPropertyName:null}).withDefault(sg),xg=xi.create({name:"popup-icon-current-label",cssCustomPropertyName:null}).withDefault(ag),Cg=xi.create({name:"popup-icon-information-label",cssCustomPropertyName:null}).withDefault(lg),kg=xi.create({name:"filter-search-label",cssCustomPropertyName:null}).withDefault(cg),Sg=xi.create({name:"filter-no-results-label",cssCustomPropertyName:null}).withDefault(dg),$g=xi.create({name:"loading-label",cssCustomPropertyName:null}).withDefault(hg),_g=xi.create({name:"scroll-backward-label",cssCustomPropertyName:null}).withDefault(ug),Mg=xi.create({name:"scroll-forward-label",cssCustomPropertyName:null}).withDefault(pg),Ig=xi.create({name:"item-remove-label",cssCustomPropertyName:null}).withDefault(fg),Eg=We
2337
2337
  class Ag{constructor(){this.orientation=Eg.horizontal,this.last=!1,this.position=1}}t([C],Ag.prototype,"orientation",void 0),t([C],Ag.prototype,"last",void 0),t([C],Ag.prototype,"position",void 0)
2338
2338
  const Tg=$h
2339
- class Dg extends(_h(Vo)){constructor(){super(...arguments),this.severity=Tg.default,this.disabled=!1,this.readOnly=!1,this.selected=!1,this.stepInternals=new Ag}onClick(t){(this.disabled||this.readOnly)&&(t.preventDefault(),t.stopImmediatePropagation())}}t([pt()],Dg.prototype,"severity",void 0),t([pt({mode:"boolean"})],Dg.prototype,"disabled",void 0),t([pt({attribute:"readonly",mode:"boolean"})],Dg.prototype,"readOnly",void 0),t([pt({mode:"boolean"})],Dg.prototype,"selected",void 0),t([pt({attribute:"tabindex",converter:ht})],Dg.prototype,"tabIndex",void 0)
2339
+ class Dg extends(_h(Vo)){constructor(){super(...arguments),this.severity=Tg.default,this.disabled=!1,this.readOnly=!1,this.selected=!1,this.stepInternals=new Ag}onClick(t){return!this.disabled&&!this.readOnly||(t.stopImmediatePropagation(),!1)}}t([pt()],Dg.prototype,"severity",void 0),t([pt({mode:"boolean"})],Dg.prototype,"disabled",void 0),t([pt({attribute:"readonly",mode:"boolean"})],Dg.prototype,"readOnly",void 0),t([pt({mode:"boolean"})],Dg.prototype,"selected",void 0),t([pt({attribute:"tabindex",converter:ht})],Dg.prototype,"tabIndex",void 0)
2340
2340
  const Og=Dg.compose({baseName:"anchor-step",template:(t,e)=>J`
2341
2341
  <template slot="step">
2342
2342
  <li class="
@@ -11157,7 +11157,7 @@ const pL=_t`
11157
11157
  }
11158
11158
  }
11159
11159
  `,fL=$h
11160
- class mL extends(_h(Nn)){constructor(){super(...arguments),this.severity=fL.default,this.readOnly=!1,this.selected=!1,this.stepInternals=new Ag}onClick(t){(this.disabled||this.readOnly)&&(t.preventDefault(),t.stopImmediatePropagation())}}t([pt()],mL.prototype,"severity",void 0),t([pt({attribute:"readonly",mode:"boolean"})],mL.prototype,"readOnly",void 0),t([pt({mode:"boolean"})],mL.prototype,"selected",void 0),t([pt({attribute:"tabindex",converter:ht})],mL.prototype,"tabIndex",void 0)
11160
+ class mL extends(_h(Nn)){constructor(){super(...arguments),this.severity=fL.default,this.readOnly=!1,this.selected=!1,this.stepInternals=new Ag}onClick(t){return!this.disabled&&!this.readOnly||(t.stopImmediatePropagation(),!1)}}t([pt()],mL.prototype,"severity",void 0),t([pt({attribute:"readonly",mode:"boolean"})],mL.prototype,"readOnly",void 0),t([pt({mode:"boolean"})],mL.prototype,"selected",void 0),t([pt({attribute:"tabindex",converter:ht})],mL.prototype,"tabIndex",void 0)
11161
11161
  const gL=mL.compose({baseName:"step",template:(t,e)=>J`
11162
11162
  <template slot="step">
11163
11163
  <li class="
@@ -17153,60 +17153,156 @@ const v1=class extends He{}.compose({baseName:"chat-message-system",template:()=
17153
17153
  `,styles:g1})
17154
17154
  Mi.getOrCreate().withPrefix("spright").register(v1())
17155
17155
  const b1=_t`
17156
+ ${X0("flex")}
17157
+
17158
+ :host {
17159
+ min-width: ${Ac};
17160
+ min-height: ${Ac};
17161
+
17162
+ flex-direction: row;
17163
+ justify-content: center;
17164
+ flex-shrink: 0;
17165
+ font: ${sd};
17166
+ color: ${ad};
17167
+ }
17168
+
17169
+ .container {
17170
+ display: flex;
17171
+ flex-direction: column;
17172
+ align-items: center;
17173
+ max-width: calc(90%);
17174
+ gap: ${Ec};
17175
+ }
17176
+
17177
+ .brand-icon {
17178
+ display: flex;
17179
+ align-items: center;
17180
+ justify-content: center;
17181
+ }
17182
+
17183
+ slot[name='brand-icon']::slotted(*),
17184
+ slot[name='brand-icon'] > * {
17185
+ width: 48px;
17186
+ height: 48px;
17187
+ }
17188
+
17189
+ .title {
17190
+ font: ${qc};
17191
+ color: ${jc};
17192
+ text-align: center;
17193
+ }
17194
+
17195
+ .subtitle {
17196
+ font: ${Gc};
17197
+ color: ${Zc};
17198
+ text-align: center;
17199
+ }
17200
+
17201
+ .message-content {
17202
+ display: flex;
17203
+ flex-direction: column;
17204
+ align-items: center;
17205
+ width: fit-content;
17206
+ height: fit-content;
17207
+ overflow-x: auto;
17208
+ gap: ${Ec};
17209
+ }
17210
+ `,y1=J`
17211
+ <div class="icon light-icon" aria-hidden="true" :innerHTML="${()=>'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><linearGradient id="nigelChatGradient" gradientUnits="userSpaceOnUse" x1="24" y1="0.1611" x2="24" y2="48.1611"><stop offset="0" stop-color="#008557"/><stop offset="1" stop-color="#00C07E"/></linearGradient></defs><path fill="url(#nigelChatGradient)" d="M36.654,11.338c-1.63-1.626-3.685-2.512-5.797-2.766c2.107-0.256,4.157-1.153,5.783-2.776C38.273,4.167,39.175,2.112,39.429,0c0.251,2.115,1.139,4.174,2.774,5.805c1.63,1.626,3.685,2.512,5.797,2.766c-2.108,0.256-4.158,1.153-5.784,2.776c-1.632,1.629-2.534,3.684-2.787,5.796C39.177,15.027,38.289,12.969,36.654,11.338z M18,24v-0.5c0-1.003,0.274-1.941,0.746-2.752c0.473-0.901,1.172-1.589,2.081-2.05c0.198-0.111,0.404-0.208,0.616-0.294c0.005-0.002,0.011-0.004,0.016-0.006C22.09,18.144,22.778,18,23.5,18H28V6.5C28,4.575,26.425,3,24.5,3h-21C1.575,3,0,4.575,0,6.5v14C0,22.425,1.575,24,3.5,24h1.75L3.5,31L18,24z M20,23.5v14c0,1.925,1.575,3.5,3.5,3.5h7l14,7l-1.75-7h1.75c1.925,0,3.5-1.575,3.5-3.5V23c0-1.925-1.575-3-3.5-3h-21C21.575,20,20,21.575,20,23.5z"/></svg>'}"></div>
17212
+ <div class="icon dark-icon" aria-hidden="true" :innerHTML="${()=>'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 48 48"><defs><linearGradient id="nigelChatGradientDark" gradientUnits="userSpaceOnUse" x1="24" y1="47.8389" x2="24" y2="-0.1611"><stop offset="0" stop-color="#008557"/><stop offset="1" stop-color="#00C07E"/></linearGradient></defs><path fill="url(#nigelChatGradientDark)" d="M36.654,11.338c-1.63-1.626-3.685-2.512-5.797-2.766c2.107-0.256,4.157-1.153,5.783-2.776C38.273,4.167,39.175,2.112,39.429,0c0.251,2.115,1.139,4.174,2.774,5.805c1.63,1.626,3.685,2.512,5.797,2.766c-2.108,0.256-4.158,1.153-5.784,2.776c-1.632,1.629-2.534,3.684-2.787,5.796C39.177,15.027,38.289,12.969,36.654,11.338z M18,24v-0.5c0-1.003,0.274-1.941,0.746-2.752c0.473-0.901,1.172-1.589,2.081-2.05c0.198-0.111,0.404-0.208,0.616-0.294c0.005-0.002,0.011-0.004,0.016-0.006C22.09,18.144,22.778,18,23.5,18H28V6.5C28,4.575,26.425,3,24.5,3h-21C1.575,3,0,4.575,0,6.5v14C0,22.425,1.575,24,3.5,24h1.75L3.5,31L18,24z M20,23.5v14c0,1.925,1.575,3.5,3.5,3.5h7l14,7l-1.75-7h1.75c1.925,0,3.5-1.575,3.5-3.5V23c0-1.925-1.575-3-3.5-3h-21C21.575,20,20,21.575,20,23.5z"/></svg>'}"></div>
17213
+ `,w1=_t`
17214
+ ${Zm}
17215
+
17216
+ .dark-icon {
17217
+ display: none;
17218
+ }
17219
+ `.withBehaviors(yh(jo,_t`
17220
+ .light-icon {
17221
+ display: none;
17222
+ }
17223
+
17224
+ .dark-icon {
17225
+ display: contents;
17226
+ }
17227
+ `))
17228
+ const x1=class extends Km{}.compose({baseName:"icon-nigel-chat",template:y1,styles:w1})
17229
+ Mi.getOrCreate().withPrefix("spright").register(x1())
17230
+ const C1="spright-icon-nigel-chat"
17231
+ class k1 extends He{}t([pt({attribute:"welcome-title"})],k1.prototype,"welcomeTitle",void 0),t([pt],k1.prototype,"subtitle",void 0)
17232
+ const S1=k1.compose({baseName:"chat-message-welcome",template:()=>J`
17233
+ <div class="container">
17234
+ <div class="brand-icon">
17235
+ <slot name="brand-icon">
17236
+ <${C1}></${C1}>
17237
+ </slot>
17238
+ </div>
17239
+ ${Ut(t=>t.welcomeTitle,J`
17240
+ <div class="title">${t=>t.welcomeTitle}</div>
17241
+ `)}
17242
+ ${Ut(t=>t.subtitle,J`
17243
+ <div class="subtitle">${t=>t.subtitle}</div>
17244
+ `)}
17245
+ <section class="message-content">
17246
+ <slot></slot>
17247
+ </section>
17248
+ </div>
17249
+ `,styles:b1})
17250
+ Mi.getOrCreate().withPrefix("spright").register(S1())
17251
+ const $1=_t`
17156
17252
  ${Zm}
17157
17253
 
17158
17254
  .icon svg {
17159
17255
  fill: ${Sc};
17160
17256
  }
17161
17257
  `
17162
- const y1=class extends Ym{constructor(){super(_u)}}.compose({baseName:"icon-work-item-calendar-week",template:Gm,styles:b1})
17163
- Mi.getOrCreate().withPrefix("spright").register(y1())
17164
- const w1=_t`
17258
+ const _1=class extends Ym{constructor(){super(_u)}}.compose({baseName:"icon-work-item-calendar-week",template:Gm,styles:$1})
17259
+ Mi.getOrCreate().withPrefix("spright").register(_1())
17260
+ const M1=_t`
17165
17261
  ${Zm}
17166
17262
 
17167
17263
  .icon svg {
17168
17264
  fill: ${kc};
17169
17265
  }
17170
17266
  `
17171
- const x1=class extends Ym{constructor(){super(Mu)}}.compose({baseName:"icon-work-item-calipers",template:Gm,styles:w1})
17172
- Mi.getOrCreate().withPrefix("spright").register(x1())
17173
- const C1=_t`
17267
+ const I1=class extends Ym{constructor(){super(Mu)}}.compose({baseName:"icon-work-item-calipers",template:Gm,styles:M1})
17268
+ Mi.getOrCreate().withPrefix("spright").register(I1())
17269
+ const E1=_t`
17174
17270
  ${Zm}
17175
17271
 
17176
17272
  .icon svg {
17177
17273
  fill: ${$c};
17178
17274
  }
17179
17275
  `
17180
- const k1=class extends Ym{constructor(){super(Bp)}}.compose({baseName:"icon-work-item-forklift",template:Gm,styles:C1})
17181
- Mi.getOrCreate().withPrefix("spright").register(k1())
17182
- const S1=_t`
17276
+ const A1=class extends Ym{constructor(){super(Bp)}}.compose({baseName:"icon-work-item-forklift",template:Gm,styles:E1})
17277
+ Mi.getOrCreate().withPrefix("spright").register(A1())
17278
+ const T1=_t`
17183
17279
  ${Zm}
17184
17280
 
17185
17281
  .icon svg {
17186
17282
  fill: ${wc};
17187
17283
  }
17188
17284
  `
17189
- const $1=class extends Ym{constructor(){super(zf)}}.compose({baseName:"icon-work-item-rectangle-check-lines",template:Gm,styles:S1})
17190
- Mi.getOrCreate().withPrefix("spright").register($1())
17191
- const _1=_t`
17285
+ const D1=class extends Ym{constructor(){super(zf)}}.compose({baseName:"icon-work-item-rectangle-check-lines",template:Gm,styles:T1})
17286
+ Mi.getOrCreate().withPrefix("spright").register(D1())
17287
+ const O1=_t`
17192
17288
  ${Zm}
17193
17289
 
17194
17290
  .icon svg {
17195
17291
  fill: ${xc};
17196
17292
  }
17197
17293
  `
17198
- const M1=class extends Ym{constructor(){super(Fm)}}.compose({baseName:"icon-work-item-user-helmet-safety",template:Gm,styles:_1})
17199
- Mi.getOrCreate().withPrefix("spright").register(M1())
17200
- const I1=_t`
17294
+ const R1=class extends Ym{constructor(){super(Fm)}}.compose({baseName:"icon-work-item-user-helmet-safety",template:Gm,styles:O1})
17295
+ Mi.getOrCreate().withPrefix("spright").register(R1())
17296
+ const F1=_t`
17201
17297
  ${Zm}
17202
17298
 
17203
17299
  .icon svg {
17204
17300
  fill: ${Cc};
17205
17301
  }
17206
17302
  `
17207
- const E1=class extends Ym{constructor(){super(qm)}}.compose({baseName:"icon-work-item-wrench-hammer",template:Gm,styles:I1})
17208
- Mi.getOrCreate().withPrefix("spright").register(E1())
17209
- const A1=_t`
17303
+ const N1=class extends Ym{constructor(){super(qm)}}.compose({baseName:"icon-work-item-wrench-hammer",template:Gm,styles:F1})
17304
+ Mi.getOrCreate().withPrefix("spright").register(N1())
17305
+ const L1=_t`
17210
17306
  ${X0("inline-block")}
17211
17307
 
17212
17308
  :host {
@@ -17229,17 +17325,17 @@ const A1=_t`
17229
17325
  :host([disabled]) slot {
17230
17326
  color: ${ld};
17231
17327
  }
17232
- `,T1=J`<slot></slot>`
17233
- const D1=class extends He{}.compose({baseName:"rectangle",template:T1,styles:A1})
17234
- Mi.getOrCreate().withPrefix("spright").register(D1())
17235
- const O1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`,R1=It`
17328
+ `,B1=J`<slot></slot>`
17329
+ const P1=class extends He{}.compose({baseName:"rectangle",template:B1,styles:L1})
17330
+ Mi.getOrCreate().withPrefix("spright").register(P1())
17331
+ const z1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`,V1=It`
17236
17332
  user-select: none;
17237
17333
  -webkit-user-select: none;
17238
- `,F1="outline",N1="ghost",L1="block",B1=_t`
17334
+ `,H1="outline",U1="ghost",q1="block",j1=_t`
17239
17335
  @layer base, hover, focusVisible, active, disabled, top;
17240
17336
 
17241
17337
  @layer base {
17242
- ${O1("block")}
17338
+ ${z1("block")}
17243
17339
 
17244
17340
  :host {
17245
17341
  border-bottom: ${Oc} solid transparent;
@@ -17256,7 +17352,7 @@ const O1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
17256
17352
  outline-offset: -1px;
17257
17353
  list-style: none;
17258
17354
  cursor: pointer;
17259
- ${R1}
17355
+ ${V1}
17260
17356
  transition:
17261
17357
  border-color ${qd} ease-in,
17262
17358
  outline-color ${qd} ease-in;
@@ -17319,14 +17415,14 @@ const O1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
17319
17415
  outline-offset: -2px;
17320
17416
  }
17321
17417
  }
17322
- `.withBehaviors(oh(F1,_t`
17418
+ `.withBehaviors(oh(H1,_t`
17323
17419
  @layer base {
17324
17420
  :host {
17325
17421
  border-bottom: ${Oc} solid rgba(${nc}, 0.2);
17326
17422
  border-bottom-color: rgba(${nc}, 0.2);
17327
17423
  }
17328
17424
  }
17329
- `),oh(L1,_t`
17425
+ `),oh(q1,_t`
17330
17426
  @layer base {
17331
17427
  .accordion-item-details > .accordion-item-summary {
17332
17428
  background-color: rgba(${nc}, 0.1);
@@ -17339,7 +17435,7 @@ const O1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
17339
17435
  outline-color: ${lc};
17340
17436
  }
17341
17437
  }
17342
- `)),P1=J`
17438
+ `)),W1=J`
17343
17439
  <details
17344
17440
  class="accordion-item-details"
17345
17441
  ?open="${t=>t.expanded}"
@@ -17361,11 +17457,11 @@ const O1=t=>`${Po(t)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host
17361
17457
  </div>
17362
17458
  </details>
17363
17459
  `
17364
- class z1 extends He{constructor(){super(...arguments),this.header="",this.expanded=!1,this.appearance=N1}handleToggle(t){return this.expanded=t.target.open,!0}}t([pt],z1.prototype,"header",void 0),t([pt({mode:"boolean"})],z1.prototype,"expanded",void 0),t([pt()],z1.prototype,"appearance",void 0)
17365
- const V1=z1.compose({baseName:"fv-accordion-item",template:P1,styles:B1})
17366
- Mi.getOrCreate().withPrefix("ok").register(V1())
17367
- const H1=_t`
17368
- ${O1("inline-block")}
17460
+ class G1 extends He{constructor(){super(...arguments),this.header="",this.expanded=!1,this.appearance=U1}handleToggle(t){return this.expanded=t.target.open,!0}}t([pt],G1.prototype,"header",void 0),t([pt({mode:"boolean"})],G1.prototype,"expanded",void 0),t([pt()],G1.prototype,"appearance",void 0)
17461
+ const Z1=G1.compose({baseName:"fv-accordion-item",template:W1,styles:j1})
17462
+ Mi.getOrCreate().withPrefix("ok").register(Z1())
17463
+ const K1=_t`
17464
+ ${z1("inline-block")}
17369
17465
 
17370
17466
  :host {
17371
17467
  border: 2px solid ${lc};
@@ -17387,15 +17483,15 @@ const H1=_t`
17387
17483
  :host([disabled]) slot {
17388
17484
  color: ${ld};
17389
17485
  }
17390
- `,U1=J`<slot></slot>`
17391
- const q1=class extends He{}.compose({baseName:"button",template:U1,styles:H1})
17392
- Mi.getOrCreate().withPrefix("ok").register(q1())
17393
- const j1=_t`
17394
- ${O1("inline-flex")}
17486
+ `,Y1=J`<slot></slot>`
17487
+ const X1=class extends He{}.compose({baseName:"button",template:Y1,styles:K1})
17488
+ Mi.getOrCreate().withPrefix("ok").register(X1())
17489
+ const J1=_t`
17490
+ ${z1("inline-flex")}
17395
17491
 
17396
17492
  :host {
17397
17493
  align-items: center;
17398
- ${R1}
17494
+ ${V1}
17399
17495
  width: ${Rc};
17400
17496
  height: ${Rc};
17401
17497
  }
@@ -17404,12 +17500,12 @@ const j1=_t`
17404
17500
  width: 100%;
17405
17501
  height: 100%;
17406
17502
  }
17407
- `,W1=J`<img aria-hidden="true" src=${t=>t.url}>`
17408
- class G1 extends Km{constructor(t){super(),this.url=t}static registerIconDynamic(t,e){const n="ok-icon-dynamic-"
17503
+ `,Q1=J`<img aria-hidden="true" src=${t=>t.url}>`
17504
+ class t2 extends Km{constructor(t){super(),this.url=t}static registerIconDynamic(t,e){const n="ok-icon-dynamic-"
17409
17505
  if(!t.startsWith(n))throw new Error(`Icon tag name must start with '${n}', provided name: ${t}`)
17410
17506
  const i=t.substring(16)
17411
17507
  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}`)
17412
- const o=`IconDynamic${i.charAt(0).toUpperCase()+i.slice(1)}`,r=`icon-dynamic-${i}`,s={[o]:class extends G1{constructor(){super(e)}}}[o].compose({baseName:r,template:W1,styles:j1})
17413
- Mi.getOrCreate().withPrefix("ok").register(s())}}const Z1=G1.compose({baseName:"icon-dynamic",template:J`<template></template>`,styles:_t`${O1("none")}`})
17414
- Mi.getOrCreate().withPrefix("ok").register(Z1())}()
17508
+ const o=`IconDynamic${i.charAt(0).toUpperCase()+i.slice(1)}`,r=`icon-dynamic-${i}`,s={[o]:class extends t2{constructor(){super(e)}}}[o].compose({baseName:r,template:Q1,styles:J1})
17509
+ Mi.getOrCreate().withPrefix("ok").register(s())}}const e2=t2.compose({baseName:"icon-dynamic",template:J`<template></template>`,styles:_t`${z1("none")}`})
17510
+ Mi.getOrCreate().withPrefix("ok").register(e2())}()
17415
17511
  //# sourceMappingURL=all-components-bundle.min.js.map