@ni/nimble-components 11.5.0 → 11.6.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.
- package/dist/all-components-bundle.js +51 -6
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +102 -73
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/patterns/dropdown/styles.js +1 -4
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/patterns/dropdown/types.d.ts +6 -0
- package/dist/esm/patterns/dropdown/types.js +5 -0
- package/dist/esm/patterns/dropdown/types.js.map +1 -1
- package/dist/esm/select/index.d.ts +3 -1
- package/dist/esm/select/index.js +11 -1
- package/dist/esm/select/index.js.map +1 -1
- package/dist/esm/select/styles.js +35 -1
- package/dist/esm/select/styles.js.map +1 -1
- package/dist/esm/select/types.d.ts +5 -0
- package/dist/esm/select/types.js +6 -0
- package/dist/esm/select/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -1696,10 +1696,7 @@ const Hh=mt`
|
|
|
1696
1696
|
:host::before {
|
|
1697
1697
|
content: '';
|
|
1698
1698
|
position: absolute;
|
|
1699
|
-
bottom: calc(
|
|
1700
|
-
var(--ni-private-hover-indicator-width) +
|
|
1701
|
-
var(--ni-private-indicator-lines-gap)
|
|
1702
|
-
);
|
|
1699
|
+
bottom: calc(${Jn} + var(--ni-private-indicator-lines-gap));
|
|
1703
1700
|
width: 0px;
|
|
1704
1701
|
height: 0px;
|
|
1705
1702
|
justify-self: center;
|
|
@@ -3178,11 +3175,43 @@ const tu=Zd.compose({baseName:"number-field",baseClass:fi,template:(t,e)=>X`
|
|
|
3178
3175
|
${Ih}
|
|
3179
3176
|
`})
|
|
3180
3177
|
js.getOrCreate().withPrefix("nimble").register(tu())
|
|
3181
|
-
const eu=mt`
|
|
3178
|
+
const eu="underline",su="outline",iu="block",ou=mt`
|
|
3182
3179
|
${Hh}
|
|
3183
|
-
`
|
|
3184
|
-
|
|
3185
|
-
|
|
3180
|
+
`.withBehaviors(fh(eu,mt`
|
|
3181
|
+
.control {
|
|
3182
|
+
padding-top: ${Jn};
|
|
3183
|
+
padding-left: calc(${Jn} + ${Gn} / 2);
|
|
3184
|
+
padding-right: ${Jn};
|
|
3185
|
+
}
|
|
3186
|
+
|
|
3187
|
+
:host([disabled]) .control {
|
|
3188
|
+
border-color: rgba(${Dn}, 0.1);
|
|
3189
|
+
}
|
|
3190
|
+
`),fh(su,mt`
|
|
3191
|
+
.control {
|
|
3192
|
+
border: ${Jn} solid rgba(${Dn}, 0.3);
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
:host(.invalid) .errortext {
|
|
3196
|
+
top: calc(${Xn} - ${Jn});
|
|
3197
|
+
}
|
|
3198
|
+
`),fh(iu,mt`
|
|
3199
|
+
.control {
|
|
3200
|
+
background-color: rgba(${Dn}, 0.1);
|
|
3201
|
+
padding-left: calc(${Jn} + ${Gn} / 2);
|
|
3202
|
+
padding-right: ${Jn};
|
|
3203
|
+
padding-bottom: calc(${Jn});
|
|
3204
|
+
border-bottom: ${Jn}
|
|
3205
|
+
rgba(${Dn}, 0.07);
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
:host([disabled]) .control {
|
|
3209
|
+
background-color: rgba(${Dn}, 0.07);
|
|
3210
|
+
}
|
|
3211
|
+
`))
|
|
3212
|
+
class nu extends yi{constructor(){super(...arguments),this.appearance=eu}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(t,e){const s=this.value
|
|
3213
|
+
super.slottedOptionsChanged(t,e),s&&(this.value=s)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}kn([ot],nu.prototype,"appearance",void 0)
|
|
3214
|
+
const ru=nu.compose({baseName:"select",baseClass:yi,template:(t,e)=>X`
|
|
3186
3215
|
<template
|
|
3187
3216
|
class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
|
|
3188
3217
|
aria-activedescendant="${t=>t.ariaActiveDescendant}"
|
|
@@ -3235,9 +3264,9 @@ super.slottedOptionsChanged(t,e),s&&(this.value=s)}maxHeightChanged(){this.updat
|
|
|
3235
3264
|
></slot>
|
|
3236
3265
|
</div>
|
|
3237
3266
|
</template>
|
|
3238
|
-
`,styles:
|
|
3239
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3240
|
-
const
|
|
3267
|
+
`,styles:ou,indicator:Ta.data})
|
|
3268
|
+
js.getOrCreate().withPrefix("nimble").register(ru())
|
|
3269
|
+
const au=mt`
|
|
3241
3270
|
${so("inline-flex")}
|
|
3242
3271
|
|
|
3243
3272
|
:host {
|
|
@@ -3402,7 +3431,7 @@ const iu=mt`
|
|
|
3402
3431
|
--ni-private-switch-indicator-border-color: ${po};
|
|
3403
3432
|
--ni-private-switch-indicator-border-disabled-color: ${En(po,.3)};
|
|
3404
3433
|
}
|
|
3405
|
-
`)),
|
|
3434
|
+
`)),lu=X`
|
|
3406
3435
|
<template
|
|
3407
3436
|
role="switch"
|
|
3408
3437
|
aria-checked="${t=>t.checked}"
|
|
@@ -3437,9 +3466,9 @@ const iu=mt`
|
|
|
3437
3466
|
</div>
|
|
3438
3467
|
</template>
|
|
3439
3468
|
`
|
|
3440
|
-
const
|
|
3441
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3442
|
-
const
|
|
3469
|
+
const cu=class extends _i{}.compose({baseClass:_i,baseName:"switch",template:lu,styles:au})
|
|
3470
|
+
js.getOrCreate().withPrefix("nimble").register(cu())
|
|
3471
|
+
const hu=mt`
|
|
3443
3472
|
${so("inline-flex")}
|
|
3444
3473
|
|
|
3445
3474
|
:host {
|
|
@@ -3533,13 +3562,13 @@ const ru=mt`
|
|
|
3533
3562
|
width: 100%;
|
|
3534
3563
|
}
|
|
3535
3564
|
`
|
|
3536
|
-
const
|
|
3565
|
+
const du=class extends Ii{}.compose({baseName:"tab",baseClass:Ii,template:(t,e)=>X`
|
|
3537
3566
|
<template slot="tab" role="tab" aria-disabled="${t=>t.disabled}">
|
|
3538
3567
|
<slot></slot>
|
|
3539
3568
|
</template>
|
|
3540
|
-
`,styles:
|
|
3541
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3542
|
-
const
|
|
3569
|
+
`,styles:hu})
|
|
3570
|
+
js.getOrCreate().withPrefix("nimble").register(du())
|
|
3571
|
+
const uu=mt`
|
|
3543
3572
|
${so("block")}
|
|
3544
3573
|
|
|
3545
3574
|
:host {
|
|
@@ -3549,13 +3578,13 @@ const lu=mt`
|
|
|
3549
3578
|
padding-top: ${Gn};
|
|
3550
3579
|
}
|
|
3551
3580
|
`
|
|
3552
|
-
const
|
|
3581
|
+
const pu=class extends zi{}.compose({baseName:"tab-panel",baseClass:zi,template:(t,e)=>X`
|
|
3553
3582
|
<template slot="tabpanel" role="tabpanel">
|
|
3554
3583
|
<slot></slot>
|
|
3555
3584
|
</template>
|
|
3556
|
-
`,styles:
|
|
3557
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3558
|
-
const
|
|
3585
|
+
`,styles:uu})
|
|
3586
|
+
js.getOrCreate().withPrefix("nimble").register(pu())
|
|
3587
|
+
const vu=mt`
|
|
3559
3588
|
${so("grid")}
|
|
3560
3589
|
|
|
3561
3590
|
:host {
|
|
@@ -3578,7 +3607,7 @@ const hu=mt`
|
|
|
3578
3607
|
grid-column-end: 4;
|
|
3579
3608
|
}
|
|
3580
3609
|
`
|
|
3581
|
-
const
|
|
3610
|
+
const gu=class extends Si{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:Si,template:(t,e)=>X`
|
|
3582
3611
|
<template class="${t=>t.orientation}">
|
|
3583
3612
|
${It(0,e)}
|
|
3584
3613
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -3597,9 +3626,9 @@ const du=class extends Si{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
3597
3626
|
<slot name="tabpanel" part="tabpanel" ${Ct("tabpanels")}></slot>
|
|
3598
3627
|
</div>
|
|
3599
3628
|
</template>
|
|
3600
|
-
`,styles:
|
|
3601
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3602
|
-
const
|
|
3629
|
+
`,styles:vu})
|
|
3630
|
+
js.getOrCreate().withPrefix("nimble").register(gu())
|
|
3631
|
+
const mu=mt`
|
|
3603
3632
|
${so("flex")}
|
|
3604
3633
|
|
|
3605
3634
|
:host {
|
|
@@ -3617,15 +3646,15 @@ const uu=mt`
|
|
|
3617
3646
|
rgba(${Dn}, 0.3);
|
|
3618
3647
|
margin: calc(${Gn} / 4) calc(${Gn} / 2);
|
|
3619
3648
|
}
|
|
3620
|
-
`,
|
|
3649
|
+
`,fu=X`
|
|
3621
3650
|
<template slot="end">
|
|
3622
3651
|
<div class="separator"></div>
|
|
3623
3652
|
<slot></slot>
|
|
3624
3653
|
</template>
|
|
3625
3654
|
`
|
|
3626
|
-
const
|
|
3627
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3628
|
-
const
|
|
3655
|
+
const bu=class extends de{}.compose({baseName:"tabs-toolbar",template:fu,styles:mu})
|
|
3656
|
+
js.getOrCreate().withPrefix("nimble").register(bu())
|
|
3657
|
+
const wu="outline",xu="block",yu=mt`
|
|
3629
3658
|
${so("inline-flex")}
|
|
3630
3659
|
|
|
3631
3660
|
:host {
|
|
@@ -3722,12 +3751,12 @@ const gu="outline",mu="block",fu=mt`
|
|
|
3722
3751
|
:host([resize='vertical']) .control {
|
|
3723
3752
|
resize: vertical;
|
|
3724
3753
|
}
|
|
3725
|
-
`.withBehaviors(fh(
|
|
3754
|
+
`.withBehaviors(fh(wu,mt`
|
|
3726
3755
|
.control {
|
|
3727
3756
|
border-color: rgba(${Dn}, 0.3);
|
|
3728
3757
|
background-color: transparent;
|
|
3729
3758
|
}
|
|
3730
|
-
`),fh(
|
|
3759
|
+
`),fh(xu,mt`
|
|
3731
3760
|
.control {
|
|
3732
3761
|
background-color: rgba(${Dn}, 0.1);
|
|
3733
3762
|
}
|
|
@@ -3741,8 +3770,8 @@ const gu="outline",mu="block",fu=mt`
|
|
|
3741
3770
|
background-color: rgba(${Dn}, 0.1);
|
|
3742
3771
|
}
|
|
3743
3772
|
`))
|
|
3744
|
-
class
|
|
3745
|
-
const
|
|
3773
|
+
class $u extends Mi{constructor(){super(...arguments),this.appearance=wu}}kn([ot],$u.prototype,"appearance",void 0)
|
|
3774
|
+
const Cu=$u.compose({baseName:"text-area",baseClass:Mi,template:(t,e)=>X`
|
|
3746
3775
|
<template
|
|
3747
3776
|
class="
|
|
3748
3777
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -3797,9 +3826,9 @@ const wu=bu.compose({baseName:"text-area",baseClass:Mi,template:(t,e)=>X`
|
|
|
3797
3826
|
${bt("control")}
|
|
3798
3827
|
></textarea>
|
|
3799
3828
|
</template>
|
|
3800
|
-
`,styles:
|
|
3801
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
3802
|
-
const
|
|
3829
|
+
`,styles:yu,shadowOptions:{delegatesFocus:!0}})
|
|
3830
|
+
js.getOrCreate().withPrefix("nimble").register(Cu())
|
|
3831
|
+
const ku="underline",_u="outline",zu="block",Iu="frameless",Ou=mt`
|
|
3803
3832
|
${so("inline-block")}
|
|
3804
3833
|
${Mh}
|
|
3805
3834
|
|
|
@@ -3977,12 +4006,12 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
|
|
|
3977
4006
|
slot[name='actions']::slotted(*) {
|
|
3978
4007
|
${Xn.cssCustomProperty}: 24px;
|
|
3979
4008
|
}
|
|
3980
|
-
`.withBehaviors(fh(
|
|
4009
|
+
`.withBehaviors(fh(ku,mt`
|
|
3981
4010
|
.root {
|
|
3982
4011
|
border-bottom-width: ${Jn};
|
|
3983
4012
|
padding-bottom: 0;
|
|
3984
4013
|
}
|
|
3985
|
-
`),fh(
|
|
4014
|
+
`),fh(zu,mt`
|
|
3986
4015
|
.root {
|
|
3987
4016
|
background-color: rgba(${Dn}, 0.1);
|
|
3988
4017
|
}
|
|
@@ -4010,12 +4039,12 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
|
|
|
4010
4039
|
:host([disabled]) .root {
|
|
4011
4040
|
background-color: rgba(${Dn}, 0.07);
|
|
4012
4041
|
}
|
|
4013
|
-
`),fh(
|
|
4042
|
+
`),fh(_u,mt`
|
|
4014
4043
|
.root {
|
|
4015
4044
|
border-width: ${Jn};
|
|
4016
4045
|
padding: 0;
|
|
4017
4046
|
}
|
|
4018
|
-
`),fh(
|
|
4047
|
+
`),fh(Iu,mt`
|
|
4019
4048
|
.control {
|
|
4020
4049
|
padding-left: ${Jn};
|
|
4021
4050
|
padding-right: ${Jn};
|
|
@@ -4035,8 +4064,8 @@ const xu="underline",yu="outline",$u="block",Cu="frameless",ku=mt`
|
|
|
4035
4064
|
filter: invert(100%);
|
|
4036
4065
|
}
|
|
4037
4066
|
`,Io))
|
|
4038
|
-
class
|
|
4039
|
-
const
|
|
4067
|
+
class Su extends pi{constructor(){super(...arguments),this.appearance=ku}connectedCallback(){super.connectedCallback(),this.control.setAttribute("aria-errormessage","errortext")}}kn([ot],Su.prototype,"appearance",void 0),kn([ot({attribute:"error-text"})],Su.prototype,"errorText",void 0)
|
|
4068
|
+
const Au=Su.compose({baseName:"text-field",baseClass:pi,template:(t,e)=>X`
|
|
4040
4069
|
<template
|
|
4041
4070
|
class="
|
|
4042
4071
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -4096,7 +4125,7 @@ const zu=_u.compose({baseName:"text-field",baseClass:pi,template:(t,e)=>X`
|
|
|
4096
4125
|
${zt(0,e)}
|
|
4097
4126
|
</div>
|
|
4098
4127
|
</template>
|
|
4099
|
-
`,styles:
|
|
4128
|
+
`,styles:Ou,shadowOptions:{delegatesFocus:!0},end:X`
|
|
4100
4129
|
<nimble-icon-exclamation-mark
|
|
4101
4130
|
class="error-icon fail"
|
|
4102
4131
|
></nimble-icon-exclamation-mark>
|
|
@@ -4105,8 +4134,8 @@ const zu=_u.compose({baseName:"text-field",baseClass:pi,template:(t,e)=>X`
|
|
|
4105
4134
|
</span>
|
|
4106
4135
|
${Ih}
|
|
4107
4136
|
`})
|
|
4108
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
4109
|
-
const
|
|
4137
|
+
js.getOrCreate().withPrefix("nimble").register(Au())
|
|
4138
|
+
const Eu=mt`
|
|
4110
4139
|
.positioning-region {
|
|
4111
4140
|
display: flex;
|
|
4112
4141
|
padding: ${Yn} ${Gn};
|
|
@@ -4131,7 +4160,7 @@ const Iu=mt`
|
|
|
4131
4160
|
margin-left: auto;
|
|
4132
4161
|
}
|
|
4133
4162
|
`
|
|
4134
|
-
const
|
|
4163
|
+
const Hu=class extends Li{}.compose({baseName:"toolbar",baseClass:Li,template:(t,e)=>X`
|
|
4135
4164
|
<template
|
|
4136
4165
|
aria-label="${t=>t.ariaLabel}"
|
|
4137
4166
|
aria-labelledby="${t=>t.ariaLabelledby}"
|
|
@@ -4151,9 +4180,9 @@ const Ou=class extends Li{}.compose({baseName:"toolbar",baseClass:Li,template:(t
|
|
|
4151
4180
|
${zt(0,e)}
|
|
4152
4181
|
</div>
|
|
4153
4182
|
</template>
|
|
4154
|
-
`,styles:
|
|
4155
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
4156
|
-
const
|
|
4183
|
+
`,styles:Eu,shadowOptions:{delegatesFocus:!0}})
|
|
4184
|
+
js.getOrCreate().withPrefix("nimble").register(Hu())
|
|
4185
|
+
const Mu=mt`
|
|
4157
4186
|
${so("inline-flex")}
|
|
4158
4187
|
|
|
4159
4188
|
:host {
|
|
@@ -4176,7 +4205,7 @@ const Su=mt`
|
|
|
4176
4205
|
display: inline-flex;
|
|
4177
4206
|
}
|
|
4178
4207
|
`
|
|
4179
|
-
const
|
|
4208
|
+
const Vu=class extends Qi{}.compose({baseName:"tooltip",baseClass:Qi,template:(t,e)=>X`
|
|
4180
4209
|
${wt((t=>t.tooltipVisible),X`
|
|
4181
4210
|
<${t.tagFor(je)}
|
|
4182
4211
|
fixed-placement="true"
|
|
@@ -4199,16 +4228,16 @@ const Au=class extends Qi{}.compose({baseName:"tooltip",baseClass:Qi,template:(t
|
|
|
4199
4228
|
</div>
|
|
4200
4229
|
</${t.tagFor(je)}>
|
|
4201
4230
|
`)}
|
|
4202
|
-
`,styles:
|
|
4203
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
4204
|
-
const
|
|
4205
|
-
class
|
|
4206
|
-
e&&In.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
4207
|
-
In.subscribe(e),e.attach(s),this.cache.set(t,e)}}class
|
|
4208
|
-
t?.forEach((t=>t.removeAttribute(
|
|
4231
|
+
`,styles:Mu})
|
|
4232
|
+
js.getOrCreate().withPrefix("nimble").register(Vu())
|
|
4233
|
+
const Lu="group-selected",Tu="all",Pu="leaves-only",Ru="none"
|
|
4234
|
+
class Du{constructor(t,e){this.cache=new WeakMap,this.ltr=t,this.rtl=e}bind(t){this.attach(t)}unbind(t){const e=this.cache.get(t)
|
|
4235
|
+
e&&In.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new Fu(this.ltr,this.rtl,t),s=In.getValueFor(t)
|
|
4236
|
+
In.subscribe(e),e.attach(s),this.cache.set(t,e)}}class Fu{constructor(t,e,s){this.ltr=t,this.rtl=e,this.source=s,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const Bu=class extends Zi{constructor(){super(...arguments),this.treeView=null,this.handleSelectedChange=t=>{t.target===this&&this.selected&&this.setGroupSelectionOnRootParentTreeItem(this)}}connectedCallback(){super.connectedCallback(),this.addEventListener("selected-change",this.handleSelectedChange),this.treeView=this.getParentTreeView(),this.treeView&&this.selected&&this.setGroupSelectionOnRootParentTreeItem(this)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("selected-change",this.handleSelectedChange),this.treeView=null}clearTreeGroupSelection(){const t=this.treeView?.querySelectorAll("[group-selected]")
|
|
4237
|
+
t?.forEach((t=>t.removeAttribute(Lu)))}setGroupSelectionOnRootParentTreeItem(t){this.clearTreeGroupSelection()
|
|
4209
4238
|
let e=t
|
|
4210
4239
|
for(;e?.parentElement!==this.treeView;)e=e?.parentElement
|
|
4211
|
-
e&&e.setAttribute(
|
|
4240
|
+
e&&e.setAttribute(Lu,"true")}getParentTreeView(){return this.parentElement.closest("[role='tree']")}}.compose({baseName:"tree-item",baseClass:Zi,template:(t,e)=>{return X`
|
|
4212
4241
|
<template
|
|
4213
4242
|
role="treeitem"
|
|
4214
4243
|
slot="${t=>t.isNestedItem()?"item":void 0}"
|
|
@@ -4265,7 +4294,7 @@ var s},styles:(t,e)=>mt`
|
|
|
4265
4294
|
}
|
|
4266
4295
|
|
|
4267
4296
|
${""}
|
|
4268
|
-
:host([${
|
|
4297
|
+
:host([${Lu}])::after {
|
|
4269
4298
|
background: ${jn};
|
|
4270
4299
|
border-radius: 0px;
|
|
4271
4300
|
content: '';
|
|
@@ -4287,7 +4316,7 @@ var s},styles:(t,e)=>mt`
|
|
|
4287
4316
|
background: ${Pn};
|
|
4288
4317
|
}
|
|
4289
4318
|
|
|
4290
|
-
:host([${
|
|
4319
|
+
:host([${Lu}]) .positioning-region:hover {
|
|
4291
4320
|
background: ${Tn};
|
|
4292
4321
|
}
|
|
4293
4322
|
|
|
@@ -4397,7 +4426,7 @@ var s},styles:(t,e)=>mt`
|
|
|
4397
4426
|
:host([expanded]) .items {
|
|
4398
4427
|
display: block;
|
|
4399
4428
|
}
|
|
4400
|
-
`.withBehaviors(new
|
|
4429
|
+
`.withBehaviors(new Du(mt`
|
|
4401
4430
|
${""}
|
|
4402
4431
|
.expand-collapse-button {
|
|
4403
4432
|
left: var(
|
|
@@ -4430,8 +4459,8 @@ var s},styles:(t,e)=>mt`
|
|
|
4430
4459
|
transform: rotate(135deg);
|
|
4431
4460
|
}
|
|
4432
4461
|
`)),expandCollapseGlyph:Da.data})
|
|
4433
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
4434
|
-
const
|
|
4462
|
+
js.getOrCreate().withPrefix("nimble").register(Bu())
|
|
4463
|
+
const Nu=mt`
|
|
4435
4464
|
${so("flex")}
|
|
4436
4465
|
|
|
4437
4466
|
:host {
|
|
@@ -4444,14 +4473,14 @@ const Ru=mt`
|
|
|
4444
4473
|
outline: none;
|
|
4445
4474
|
}
|
|
4446
4475
|
`
|
|
4447
|
-
class
|
|
4476
|
+
class ju extends to{constructor(){super(...arguments),this.selectionMode=Tu}handleClick(t){if(t.defaultPrevented)return!1
|
|
4448
4477
|
if(!(t.target instanceof Element&&Ji(t.target)))return!0
|
|
4449
4478
|
const e=t.target
|
|
4450
|
-
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case
|
|
4451
|
-
case
|
|
4452
|
-
case
|
|
4453
|
-
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}}kn([ot({attribute:"selection-mode"})],
|
|
4454
|
-
const
|
|
4479
|
+
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case Tu:return!0
|
|
4480
|
+
case Ru:return!1
|
|
4481
|
+
case Pu:return!this.itemHasChildren(t)
|
|
4482
|
+
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}}kn([ot({attribute:"selection-mode"})],ju.prototype,"selectionMode",void 0)
|
|
4483
|
+
const qu=ju.compose({baseName:"tree-view",baseClass:to,template:(t,e)=>X`
|
|
4455
4484
|
<template
|
|
4456
4485
|
role="tree"
|
|
4457
4486
|
${bt("treeView")}
|
|
@@ -4463,6 +4492,6 @@ const Fu=Du.compose({baseName:"tree-view",baseClass:to,template:(t,e)=>X`
|
|
|
4463
4492
|
>
|
|
4464
4493
|
<slot ${Ct("slottedTreeItems")}></slot>
|
|
4465
4494
|
</template>
|
|
4466
|
-
`,styles:
|
|
4467
|
-
js.getOrCreate().withPrefix("nimble").register(
|
|
4495
|
+
`,styles:Nu})
|
|
4496
|
+
js.getOrCreate().withPrefix("nimble").register(qu())}()
|
|
4468
4497
|
//# sourceMappingURL=all-components-bundle.min.js.map
|