@ni/nimble-components 11.8.5 → 11.9.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 +151 -41
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +219 -192
- 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/dialog/index.d.ts +64 -0
- package/dist/esm/dialog/index.js +90 -0
- package/dist/esm/dialog/index.js.map +1 -0
- package/dist/esm/dialog/styles.d.ts +1 -0
- package/dist/esm/dialog/styles.js +14 -0
- package/dist/esm/dialog/styles.js.map +1 -0
- package/dist/esm/dialog/template.d.ts +2 -0
- package/dist/esm/dialog/template.js +15 -0
- package/dist/esm/dialog/template.js.map +1 -0
- package/package.json +1 -1
|
@@ -2226,7 +2226,34 @@ const Nh=Bh.compose({baseName:"combobox",baseClass:mi,template:(t,e)=>q`
|
|
|
2226
2226
|
${Hh}
|
|
2227
2227
|
`})
|
|
2228
2228
|
Bi.getOrCreate().withPrefix("nimble").register(Nh())
|
|
2229
|
-
|
|
2229
|
+
const jh=ut`
|
|
2230
|
+
${Zs("grid")}
|
|
2231
|
+
|
|
2232
|
+
dialog {
|
|
2233
|
+
background-color: ${Ln};
|
|
2234
|
+
border: ${Zn} solid ${Xn};
|
|
2235
|
+
box-shadow: 0px 2px 3px ${Wn};
|
|
2236
|
+
max-width: 50%;
|
|
2237
|
+
}
|
|
2238
|
+
`,qh=q`
|
|
2239
|
+
<template>
|
|
2240
|
+
<dialog
|
|
2241
|
+
${vt("dialogElement")}
|
|
2242
|
+
role="alertdialog"
|
|
2243
|
+
aria-label="${t=>t.ariaLabel}"
|
|
2244
|
+
@cancel="${(t,e)=>t.cancelHandler(e.event)}"
|
|
2245
|
+
@close="${t=>t.closeHandler()}"
|
|
2246
|
+
>
|
|
2247
|
+
<slot></slot>
|
|
2248
|
+
</dialog>
|
|
2249
|
+
</template>
|
|
2250
|
+
`,Uh=Symbol("user dismissed")
|
|
2251
|
+
class Kh extends le{constructor(){super(...arguments),this.preventDismiss=!1}get open(){return void 0!==this.resolveShow}async show(){if(this.open)throw new Error("Dialog is already open")
|
|
2252
|
+
return this.dialogElement.showModal(),new Promise(((t,e)=>{this.resolveShow=t}))}close(t){if(!this.open)throw new Error("Dialog is not open")
|
|
2253
|
+
this.closeReason=t,this.dialogElement.close()}closeHandler(){return this.resolveShow(this.closeReason),this.resolveShow=void 0,!0}cancelHandler(t){return this.preventDismiss?t.preventDefault():this.closeReason=Uh,!0}}zn([tt({attribute:"prevent-dismiss",mode:"boolean"})],Kh.prototype,"preventDismiss",void 0),de(Kh,Te)
|
|
2254
|
+
const Wh=Kh.compose({baseName:"dialog",template:qh,styles:jh,baseClass:Kh,shadowOptions:{delegatesFocus:!0}})
|
|
2255
|
+
Bi.getOrCreate().withPrefix("nimble").register(Wh())
|
|
2256
|
+
var Xh="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yh={},Gh={},Qh={}
|
|
2230
2257
|
!function(t){var e
|
|
2231
2258
|
Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationMode=void 0,function(t){t[t.animateTo=0]="animateTo",t[t.animateFrom=1]="animateFrom"}(e=t.AnimationMode||(t.AnimationMode={}))
|
|
2232
2259
|
var i=function(){function t(t,e,i){var s=this
|
|
@@ -2255,104 +2282,104 @@ return t.forEach((function(t){t.forEach((function(t,i){var s=t.offset
|
|
|
2255
2282
|
void 0===s&&(s=0===i?0:1,t.offset=s)
|
|
2256
2283
|
var o=s.toString()
|
|
2257
2284
|
e[o]=void 0===e[o]?t:Object.assign(e[o],t)}))})),this.sortOffsets(Object.keys(e)).map((function(t){return e[t]}))},Object.defineProperty(t.prototype,"keyframes",{get:function(){return this.consolidateKeyframes(this._keyframes.concat([this.getOptionKeyframes()]))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyframeEffect",{get:function(){return new KeyframeEffect(this.animationTarget,this.keyframes,this.effectTiming)},enumerable:!1,configurable:!0}),t.propertyMap={opacity:["opacity"],transform:["x","y","rotate","scale"],top:["top"],left:["left"],bottom:["bottom"],right:["right"]},t}()
|
|
2258
|
-
t.default=i}(
|
|
2259
|
-
var
|
|
2260
|
-
function i(){this.constructor=t}
|
|
2261
|
-
Object.defineProperty(
|
|
2262
|
-
var
|
|
2263
|
-
return e.mode=
|
|
2264
|
-
|
|
2265
|
-
var
|
|
2285
|
+
t.default=i}(Qh)
|
|
2286
|
+
var Jh,Zh=Xh&&Xh.__extends||(Jh=function(t,e){return(Jh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null")
|
|
2287
|
+
function i(){this.constructor=t}Jh(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})
|
|
2288
|
+
Object.defineProperty(Gh,"__esModule",{value:!0})
|
|
2289
|
+
var td=Qh,ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this
|
|
2290
|
+
return e.mode=td.AnimationMode.animateTo,e}return Zh(e,t),e}(td.default)
|
|
2291
|
+
Gh.default=ed
|
|
2292
|
+
var id={},sd=Xh&&Xh.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)}
|
|
2266
2293
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2267
2294
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2268
|
-
Object.defineProperty(
|
|
2269
|
-
var
|
|
2270
|
-
return e.mode=
|
|
2271
|
-
|
|
2272
|
-
var
|
|
2273
|
-
Object.defineProperty(
|
|
2274
|
-
var
|
|
2275
|
-
this.pause=function(){(0,
|
|
2295
|
+
Object.defineProperty(id,"__esModule",{value:!0})
|
|
2296
|
+
var od=Qh,nd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this
|
|
2297
|
+
return e.mode=od.AnimationMode.animateFrom,e}return sd(e,t),e}(od.default)
|
|
2298
|
+
id.default=nd
|
|
2299
|
+
var rd={},ad={}
|
|
2300
|
+
Object.defineProperty(ad,"__esModule",{value:!0}),ad.invokeFunctionForEach=void 0,ad.invokeFunctionForEach=function(t,e){t.forEach((function(t){return t[e]()}))},Object.defineProperty(rd,"__esModule",{value:!0})
|
|
2301
|
+
var ld=ad,cd=function(){function t(t){var e=this
|
|
2302
|
+
this.pause=function(){(0,ld.invokeFunctionForEach)(e.animations,"pause")},this.finish=function(){(0,ld.invokeFunctionForEach)(e.animations,"finish")},this.cancel=function(){(0,ld.invokeFunctionForEach)(e.animations,"cancel")},this.animations=t}return Object.defineProperty(t.prototype,"onFinish",{get:function(){return this._onFinish},set:function(t){var e=this
|
|
2276
2303
|
this._onFinish=t
|
|
2277
2304
|
var i=this.getLongestAnimation()
|
|
2278
2305
|
if("function"==typeof i.onFinish){var s=i.onFinish
|
|
2279
|
-
i.onFinish=function(){s(),e._onFinish()}}else i.onFinish=this._onFinish},enumerable:!1,configurable:!0}),t.prototype.play=function(){(0,
|
|
2306
|
+
i.onFinish=function(){s(),e._onFinish()}}else i.onFinish=this._onFinish},enumerable:!1,configurable:!0}),t.prototype.play=function(){(0,ld.invokeFunctionForEach)(this.animations,"play")},t.prototype.reverse=function(){(0,ld.invokeFunctionForEach)(this.animations,"reverse")},t.prototype.getLongestAnimation=function(){var t=this
|
|
2280
2307
|
return this.animations.reduce((function(e,i){var s=t.getAnimationDuration(e.effectTiming)
|
|
2281
2308
|
return t.getAnimationDuration(i.effectTiming)>=s?i:e}))},t.prototype.getAnimationDuration=function(t){var e=t.duration,i="string"==typeof e?parseFloat(e):e
|
|
2282
2309
|
return(t.delay||0)+(i||0)},t}()
|
|
2283
|
-
|
|
2284
|
-
var
|
|
2285
|
-
Object.defineProperty(
|
|
2286
|
-
var
|
|
2287
|
-
this.play=function(){e.applySequencedCallback(e.animations,"play")},this.reverse=function(){e.applySequencedCallback(e.animations.reverse(),"reverse")},this.pause=function(){(0,
|
|
2310
|
+
rd.default=cd
|
|
2311
|
+
var hd={}
|
|
2312
|
+
Object.defineProperty(hd,"__esModule",{value:!0})
|
|
2313
|
+
var dd=ad,ud=function(){function t(t){var e=this
|
|
2314
|
+
this.play=function(){e.applySequencedCallback(e.animations,"play")},this.reverse=function(){e.applySequencedCallback(e.animations.reverse(),"reverse")},this.pause=function(){(0,dd.invokeFunctionForEach)(e.animations,"pause")},this.finish=function(){(0,dd.invokeFunctionForEach)(e.animations,"finish")},this.cancel=function(){(0,dd.invokeFunctionForEach)(e.animations,"cancel")},this.animations=t}return t.prototype.applySequencedCallback=function(t,e){var i=this,s=t.length
|
|
2288
2315
|
s<=0||(t.forEach((function(t,o){t.onFinish=o<s-1?i.animations[o+1][e]:i.onFinish||void 0})),t[0][e]())},t}()
|
|
2289
|
-
|
|
2290
|
-
var
|
|
2316
|
+
hd.default=ud
|
|
2317
|
+
var pd={}
|
|
2291
2318
|
!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.fadeOut=t.fadeIn=t.applyFade=t.fadeEffectTiming=t.fadeOutKeyframes=t.fadeInKeyframes=void 0
|
|
2292
|
-
var e=
|
|
2319
|
+
var e=Gh
|
|
2293
2320
|
function i(i,s,o){void 0===o&&(o={})
|
|
2294
2321
|
var n=Object.assign({},t.fadeEffectTiming,o),r=new e.default(i,null,n)
|
|
2295
|
-
return r.addKeyframes(s),r}t.fadeInKeyframes=[{opacity:"0.01"},{opacity:"1"}],t.fadeOutKeyframes=[{opacity:"1"},{opacity:"0"}],t.fadeEffectTiming={easing:"linear",duration:500},t.applyFade=i,t.fadeIn=function(e,s){return void 0===s&&(s={}),i(e,t.fadeInKeyframes,s)},t.fadeOut=function(e,s){return void 0===s&&(s={}),i(e,t.fadeOutKeyframes,s)}}(
|
|
2296
|
-
var
|
|
2297
|
-
Object.defineProperty(
|
|
2298
|
-
var
|
|
2299
|
-
function
|
|
2322
|
+
return r.addKeyframes(s),r}t.fadeInKeyframes=[{opacity:"0.01"},{opacity:"1"}],t.fadeOutKeyframes=[{opacity:"1"},{opacity:"0"}],t.fadeEffectTiming={easing:"linear",duration:500},t.applyFade=i,t.fadeIn=function(e,s){return void 0===s&&(s={}),i(e,t.fadeInKeyframes,s)},t.fadeOut=function(e,s){return void 0===s&&(s={}),i(e,t.fadeOutKeyframes,s)}}(pd)
|
|
2323
|
+
var vd={},gd={}
|
|
2324
|
+
Object.defineProperty(gd,"__esModule",{value:!0}),gd.navPane=gd.exponentialReversed=gd.fastInFortySevenPercent=gd.exponential=gd.fastInOut=gd.fastOut=gd.fastIn=gd.appToApp=gd.backToApp=gd.drillIn=gd.easeIn=gd.easeOutSmooth=gd.easeOut=gd.linear=void 0,gd.linear=[[0,0],[1,1]],gd.easeOut=[[0,0],[.58,1]],gd.easeOutSmooth=[[0,.35],[.15,1]],gd.easeIn=[[.25,.1],[.25,1]],gd.drillIn=[[.17,.17],[0,1]],gd.backToApp=[[.5,0],[.6,1]],gd.appToApp=[[.5,0],[1,.9]],gd.fastIn=[[.1,.9],[.2,1]],gd.fastOut=[[.9,.1],[1,.2]],gd.fastInOut=[[.8,0],[.2,1]],gd.exponential=[[.1,.25],[.75,.9]],gd.fastInFortySevenPercent=[[.11,.5],[.24,.96]],gd.exponentialReversed=[[.25,.1],[.9,.75]],gd.navPane=[[.1,.7],[.1,1]],Object.defineProperty(vd,"__esModule",{value:!0}),vd.cubicBezier=vd.formatCubicBezier=void 0
|
|
2325
|
+
var md=gd
|
|
2326
|
+
function fd(t){if(!Array.isArray(t)||!Array.isArray(t[0])||!Array.isArray(t[1]))return""
|
|
2300
2327
|
var e=t[0],i=t[1]
|
|
2301
|
-
return"cubic-bezier(".concat(e[0],", ").concat(e[1],", ").concat(i[0],", ").concat(i[1],")")}
|
|
2302
|
-
var
|
|
2303
|
-
Object.defineProperty(
|
|
2328
|
+
return"cubic-bezier(".concat(e[0],", ").concat(e[1],", ").concat(i[0],", ").concat(i[1],")")}vd.formatCubicBezier=fd,vd.cubicBezier=function(t){return t in md?fd(md[t]):""}
|
|
2329
|
+
var bd={},wd={}
|
|
2330
|
+
Object.defineProperty(wd,"__esModule",{value:!0}),wd.default=function(t){var e=t.getBoundingClientRect()
|
|
2304
2331
|
return e.bottom>=0&&e.right>=0&&e.top<=window.innerHeight&&e.left<=window.innerWidth}
|
|
2305
|
-
var
|
|
2306
|
-
Object.defineProperty(
|
|
2307
|
-
var
|
|
2308
|
-
this.subscriptions=[],this.scrollDistance=0,this.requestFrame=function(){t.requestedFrame&&cancelAnimationFrame(t.requestedFrame),t.requestedFrame=requestAnimationFrame(t.update)},this.lastScrollY=(0,
|
|
2332
|
+
var xd={},yd={}
|
|
2333
|
+
Object.defineProperty(yd,"__esModule",{value:!0}),yd.default=function(){return"undefined"==typeof window?NaN:void 0!==window.scrollY?window.scrollY:window.pageYOffset},Object.defineProperty(xd,"__esModule",{value:!0})
|
|
2334
|
+
var $d=wd,Cd=yd,kd=function(){function t(){var t=this
|
|
2335
|
+
this.subscriptions=[],this.scrollDistance=0,this.requestFrame=function(){t.requestedFrame&&cancelAnimationFrame(t.requestedFrame),t.requestedFrame=requestAnimationFrame(t.update)},this.lastScrollY=(0,Cd.default)(),this.update=this.update.bind(this)}return t.prototype.subscribe=function(t,e){t instanceof HTMLElement&&"function"==typeof e&&!this.isSubscribed(t,e)&&(0===this.subscriptions.length&&window.addEventListener("scroll",this.requestFrame),this.subscriptions.push({element:t,callback:e,inView:(0,$d.default)(t)}))},t.prototype.unsubscribe=function(t,e){this.subscriptions=this.subscriptions.filter((function(i){return!(t===i.element&&e===i.callback)})),0===this.subscriptions.length&&window.removeEventListener("scroll",this.requestFrame)},t.prototype.update=function(){var t=(0,Cd.default)()
|
|
2309
2336
|
this.scrollDistance=t-this.lastScrollY,this.lastScrollY=t},t.prototype.isSubscribed=function(t,e){return!!this.subscriptions.filter((function(i){return t===i.element&&e===i.callback})).length},t}()
|
|
2310
|
-
|
|
2311
|
-
var
|
|
2337
|
+
xd.default=kd
|
|
2338
|
+
var _d=Xh&&Xh.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)}
|
|
2312
2339
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2313
2340
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2314
|
-
Object.defineProperty(
|
|
2315
|
-
var
|
|
2316
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t){var i=(0,
|
|
2317
|
-
i&&t.callback(e.scrollDistance),i!==t.inView&&(t.inView=i)}))},e}(
|
|
2318
|
-
|
|
2319
|
-
var
|
|
2341
|
+
Object.defineProperty(bd,"__esModule",{value:!0})
|
|
2342
|
+
var zd=wd,Id=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _d(e,t),e.prototype.update=function(){var e=this
|
|
2343
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t){var i=(0,zd.default)(t.element)
|
|
2344
|
+
i&&t.callback(e.scrollDistance),i!==t.inView&&(t.inView=i)}))},e}(xd.default)
|
|
2345
|
+
bd.default=Id
|
|
2346
|
+
var Od={},Ad=Xh&&Xh.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)}
|
|
2320
2347
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2321
2348
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2322
|
-
Object.defineProperty(
|
|
2323
|
-
var
|
|
2324
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,
|
|
2325
|
-
s&&!t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(
|
|
2326
|
-
|
|
2327
|
-
var
|
|
2349
|
+
Object.defineProperty(Od,"__esModule",{value:!0})
|
|
2350
|
+
var Sd=wd,Ed=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ad(e,t),e.prototype.update=function(){var e=this
|
|
2351
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,Sd.default)(t.element)
|
|
2352
|
+
s&&!t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(xd.default)
|
|
2353
|
+
Od.default=Ed
|
|
2354
|
+
var Hd={},Md=Xh&&Xh.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(e,i)}
|
|
2328
2355
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2329
2356
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2330
|
-
Object.defineProperty(
|
|
2331
|
-
var
|
|
2332
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,
|
|
2333
|
-
!s&&t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(
|
|
2334
|
-
|
|
2335
|
-
var e=
|
|
2357
|
+
Object.defineProperty(Hd,"__esModule",{value:!0})
|
|
2358
|
+
var Vd=wd,Ld=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Md(e,t),e.prototype.update=function(){var e=this
|
|
2359
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,Vd.default)(t.element)
|
|
2360
|
+
!s&&t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(xd.default)
|
|
2361
|
+
Hd.default=Ld,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewExitTrigger=t.ViewEnterTrigger=t.ScrollTrigger=t.fadeOut=t.fadeIn=t.cubicBezier=t.AnimateTo=t.AnimateSequence=t.AnimateGroup=t.AnimateFrom=t.Animate=void 0
|
|
2362
|
+
var e=Gh
|
|
2336
2363
|
t.AnimateTo=e.default
|
|
2337
|
-
var i=
|
|
2364
|
+
var i=id
|
|
2338
2365
|
t.AnimateFrom=i.default
|
|
2339
|
-
var s=
|
|
2366
|
+
var s=rd
|
|
2340
2367
|
t.AnimateGroup=s.default
|
|
2341
|
-
var o=
|
|
2368
|
+
var o=hd
|
|
2342
2369
|
t.AnimateSequence=o.default
|
|
2343
|
-
var n=
|
|
2370
|
+
var n=Qh
|
|
2344
2371
|
t.Animate=n.default
|
|
2345
|
-
var r=
|
|
2372
|
+
var r=pd
|
|
2346
2373
|
Object.defineProperty(t,"fadeIn",{enumerable:!0,get:function(){return r.fadeIn}}),Object.defineProperty(t,"fadeOut",{enumerable:!0,get:function(){return r.fadeOut}})
|
|
2347
|
-
var a=
|
|
2374
|
+
var a=vd
|
|
2348
2375
|
Object.defineProperty(t,"cubicBezier",{enumerable:!0,get:function(){return a.cubicBezier}})
|
|
2349
|
-
var l=
|
|
2376
|
+
var l=bd
|
|
2350
2377
|
t.ScrollTrigger=l.default
|
|
2351
|
-
var c=
|
|
2378
|
+
var c=Od
|
|
2352
2379
|
t.ViewEnterTrigger=c.default
|
|
2353
|
-
var h=
|
|
2354
|
-
t.ViewExitTrigger=h.default}(
|
|
2355
|
-
const
|
|
2380
|
+
var h=Hd
|
|
2381
|
+
t.ViewExitTrigger=h.default}(Yh)
|
|
2382
|
+
const Td=window.matchMedia("(prefers-reduced-motion: reduce)"),Pd={slideLeftKeyframes:[{transform:"translateX(-100%)",visibility:"hidden",offset:0},{transform:"translateX(-100%)",visibility:"visible",offset:.01},{transform:"translateX(0%)",visibility:"visible",offset:1}],slideRightKeyframes:[{transform:"translateX(100%)",visibility:"hidden",offset:0},{transform:"translateX(100%)",visibility:"visible",offset:.01},{transform:"translateX(0%)",visibility:"visible",offset:1}],fadeOverlayKeyframes:[{opacity:0},{opacity:1}],slideInOptions:{duration:1,easing:"ease-out"},slideOutOptions:{duration:1,easing:"ease-in",direction:"reverse"}},Rd=ut`
|
|
2356
2383
|
${Zs("block")}
|
|
2357
2384
|
|
|
2358
2385
|
:host {
|
|
@@ -2457,30 +2484,30 @@ const Ed=window.matchMedia("(prefers-reduced-motion: reduce)"),Hd={slideLeftKeyf
|
|
|
2457
2484
|
justify-content: flex-end;
|
|
2458
2485
|
border-top: ${Zn} solid ${Xn};
|
|
2459
2486
|
}
|
|
2460
|
-
`,
|
|
2461
|
-
class
|
|
2487
|
+
`,Dd="left",Fd="right",Bd="opening",Nd="opened",jd="closing",qd="closed"
|
|
2488
|
+
class Ud extends ts{constructor(){super(...arguments),this.location=Dd,this.state=qd,this.preventDismiss=!1,this.propertiesToWatch=["hidden","location","state"],this.animationDurationMilliseconds=.001}connectedCallback(){this.trapFocus=!1,super.connectedCallback(),this.updateAnimationDuration(),this.animationsEnabledChangedHandler=()=>this.updateAnimationDuration(),Td.addEventListener("change",this.animationsEnabledChangedHandler),this.onStateChanged()
|
|
2462
2489
|
const t=p.getNotifier(this),e={handleChange:(t,e)=>this.onPropertyChange(e)}
|
|
2463
|
-
this.propertiesToWatch.forEach((i=>t.subscribe(e,i))),this.propertyChangeSubscriber=e,this.propertyChangeNotifier=t}disconnectedCallback(){super.disconnectedCallback(),this.cancelCurrentAnimation(),this.propertyChangeNotifier&&this.propertyChangeSubscriber&&(this.propertiesToWatch.forEach((t=>this.propertyChangeNotifier.unsubscribe(this.propertyChangeSubscriber,t))),this.propertyChangeNotifier=void 0,this.propertyChangeSubscriber=void 0),this.animationsEnabledChangedHandler&&(
|
|
2490
|
+
this.propertiesToWatch.forEach((i=>t.subscribe(e,i))),this.propertyChangeSubscriber=e,this.propertyChangeNotifier=t}disconnectedCallback(){super.disconnectedCallback(),this.cancelCurrentAnimation(),this.propertyChangeNotifier&&this.propertyChangeSubscriber&&(this.propertiesToWatch.forEach((t=>this.propertyChangeNotifier.unsubscribe(this.propertyChangeSubscriber,t))),this.propertyChangeNotifier=void 0,this.propertyChangeSubscriber=void 0),this.animationsEnabledChangedHandler&&(Td.removeEventListener("change",this.animationsEnabledChangedHandler),this.animationsEnabledChangedHandler=void 0)}show(){this.state=Bd}hide(){this.state=jd}dismiss(){this.$emit("cancel",{},{bubbles:!1,cancelable:!0,composed:!1})&&!this.preventDismiss&&(this.$emit("dismiss"),this.hide())}onPropertyChange(t){switch(t){case"hidden":this.onHiddenChanged()
|
|
2464
2491
|
break
|
|
2465
2492
|
case"location":this.onLocationChanged()
|
|
2466
2493
|
break
|
|
2467
|
-
case"state":this.onStateChanged()}}onHiddenChanged(){this.hidden&&this.state!==
|
|
2494
|
+
case"state":this.onStateChanged()}}onHiddenChanged(){this.hidden&&this.state!==qd?this.state=qd:this.hidden||this.state!==qd||(this.state=Nd)}onLocationChanged(){this.cancelCurrentAnimation()}onStateChanged(){if(this.isConnected){switch(this.cancelCurrentAnimation(),this.state){case Bd:this.animateOpening(),this.hidden=!1
|
|
2468
2495
|
break
|
|
2469
|
-
case
|
|
2496
|
+
case Nd:this.hidden=!1
|
|
2470
2497
|
break
|
|
2471
|
-
case
|
|
2498
|
+
case jd:this.hidden=!1,this.animateClosing()
|
|
2472
2499
|
break
|
|
2473
|
-
case
|
|
2500
|
+
case qd:this.hidden=!0
|
|
2474
2501
|
break
|
|
2475
|
-
default:throw new Error("Unsupported state value. Expected: opening/opened/closing/closed")}this.$emit("state-change")}}updateAnimationDuration(){if(
|
|
2502
|
+
default:throw new Error("Unsupported state value. Expected: opening/opened/closing/closed")}this.$emit("state-change")}}updateAnimationDuration(){if(Td.matches)this.animationDurationMilliseconds=.001
|
|
2476
2503
|
else{const t=$a.getValueFor(this),e=parseFloat(t)
|
|
2477
|
-
this.animationDurationMilliseconds=1e3*e}}animateOpening(){this.animateOpenClose(!0)}animateClosing(){this.hidden?this.state=
|
|
2504
|
+
this.animationDurationMilliseconds=1e3*e}}animateOpening(){this.animateOpenClose(!0)}animateClosing(){this.hidden?this.state=qd:this.animateOpenClose(!1)}animateOpenClose(t){const e={...t?Pd.slideInOptions:Pd.slideOutOptions,duration:this.animationDurationMilliseconds},i=this.location===Fd?Pd.slideRightKeyframes:Pd.slideLeftKeyframes,s=new Yh.AnimateTo(this.dialog,void 0,e)
|
|
2478
2505
|
s.addKeyframes(i)
|
|
2479
2506
|
const o=[s],n=this.shadowRoot?.querySelector(".overlay")
|
|
2480
|
-
if(n){const t=new
|
|
2481
|
-
t.addKeyframes(
|
|
2482
|
-
r.onFinish=()=>{this.state=t?
|
|
2483
|
-
const
|
|
2507
|
+
if(n){const t=new Yh.AnimateTo(n,void 0,e)
|
|
2508
|
+
t.addKeyframes(Pd.fadeOverlayKeyframes),o.push(t)}const r=new Yh.AnimateGroup(o)
|
|
2509
|
+
r.onFinish=()=>{this.state=t?Nd:qd},this.animationGroup=r,r.play()}cancelCurrentAnimation(){this.animationGroup?.cancel()}}zn([tt],Ud.prototype,"location",void 0),zn([tt],Ud.prototype,"state",void 0),zn([tt({attribute:"prevent-dismiss",mode:"boolean"})],Ud.prototype,"preventDismiss",void 0)
|
|
2510
|
+
const Kd=Ud.compose({baseName:"drawer",template:(t,e)=>q`
|
|
2484
2511
|
<div class="positioning-region" part="positioning-region">
|
|
2485
2512
|
${gt((t=>t.modal),q`
|
|
2486
2513
|
<div
|
|
@@ -2504,8 +2531,8 @@ const Bd=Fd.compose({baseName:"drawer",template:(t,e)=>q`
|
|
|
2504
2531
|
<slot></slot>
|
|
2505
2532
|
</div>
|
|
2506
2533
|
</div>
|
|
2507
|
-
`,styles:
|
|
2508
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2534
|
+
`,styles:Rd})
|
|
2535
|
+
Bi.getOrCreate().withPrefix("nimble").register(Kd())
|
|
2509
2536
|
Th("icon-add",class extends Lh{constructor(){super(La)}})
|
|
2510
2537
|
Th("icon-arrow-down-right-and-arrow-up-left",class extends Lh{constructor(){super(Ta)}})
|
|
2511
2538
|
Th("icon-arrow-expander-left",class extends Lh{constructor(){super(Ra)}})
|
|
@@ -2587,7 +2614,7 @@ Th("icon-hashtag",class extends Lh{constructor(){super(rc)}})
|
|
|
2587
2614
|
Th("icon-home",class extends Lh{constructor(){super(ac)}})
|
|
2588
2615
|
Th("icon-hourglass",class extends Lh{constructor(){super(lc)}})
|
|
2589
2616
|
Th("icon-indeterminant-checkbox",class extends Lh{constructor(){super(cc)}})
|
|
2590
|
-
class
|
|
2617
|
+
class Wd extends Lh{constructor(){super(hc)}}Th("icon-info",Wd)
|
|
2591
2618
|
Th("icon-info-circle",class extends Lh{constructor(){super(dc)}})
|
|
2592
2619
|
Th("icon-key",class extends Lh{constructor(){super(uc)}})
|
|
2593
2620
|
Th("icon-laptop",class extends Lh{constructor(){super(pc)}})
|
|
@@ -2646,7 +2673,7 @@ Th("icon-window-text",class extends Lh{constructor(){super(dh)}})
|
|
|
2646
2673
|
Th("icon-wrench-hammer",class extends Lh{constructor(){super(uh)}})
|
|
2647
2674
|
Th("icon-xmark",class extends Lh{constructor(){super(ph)}})
|
|
2648
2675
|
Th("icon-xmark-check",class extends Lh{constructor(){super(vh)}})
|
|
2649
|
-
const
|
|
2676
|
+
const Xd=ut`
|
|
2650
2677
|
${Zs("flex")}
|
|
2651
2678
|
|
|
2652
2679
|
:host {
|
|
@@ -2701,7 +2728,7 @@ const jd=ut`
|
|
|
2701
2728
|
outline: none;
|
|
2702
2729
|
}
|
|
2703
2730
|
`
|
|
2704
|
-
const
|
|
2731
|
+
const Yd=class extends oi{get value(){return super.value}set value(t){super.value=`${t}`,this.$fastController.isConnected&&this.setAttribute("value",this.value)}connectedCallback(){super.connectedCallback(),this.setAttribute("value",this.value)}}.compose({baseName:"list-option",baseClass:oi,template:(t,e)=>q`
|
|
2705
2732
|
<template
|
|
2706
2733
|
aria-checked="${t=>t.ariaChecked}"
|
|
2707
2734
|
aria-disabled="${t=>t.ariaDisabled}"
|
|
@@ -2717,9 +2744,9 @@ const qd=class extends oi{get value(){return super.value}set value(t){super.valu
|
|
|
2717
2744
|
</span>
|
|
2718
2745
|
${Ct(0,e)}
|
|
2719
2746
|
</template>
|
|
2720
|
-
`,styles:
|
|
2721
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2722
|
-
const
|
|
2747
|
+
`,styles:Xd})
|
|
2748
|
+
Bi.getOrCreate().withPrefix("nimble").register(Yd())
|
|
2749
|
+
const Gd=ut`
|
|
2723
2750
|
${Zs("grid")}
|
|
2724
2751
|
|
|
2725
2752
|
:host {
|
|
@@ -2755,7 +2782,7 @@ const Ud=ut`
|
|
|
2755
2782
|
padding-bottom: ${Gn};
|
|
2756
2783
|
}
|
|
2757
2784
|
`
|
|
2758
|
-
const
|
|
2785
|
+
const Qd=class extends as{}.compose({baseName:"menu",baseClass:as,template:(t,e)=>q`
|
|
2759
2786
|
<template
|
|
2760
2787
|
slot="${t=>t.slot?t.slot:t.isNestedMenu()?"submenu":void 0}"
|
|
2761
2788
|
role="menu"
|
|
@@ -2764,9 +2791,9 @@ const Kd=class extends as{}.compose({baseName:"menu",baseClass:as,template:(t,e)
|
|
|
2764
2791
|
>
|
|
2765
2792
|
<slot ${wt("items")}></slot>
|
|
2766
2793
|
</template>
|
|
2767
|
-
`,styles:
|
|
2768
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2769
|
-
const
|
|
2794
|
+
`,styles:Gd})
|
|
2795
|
+
Bi.getOrCreate().withPrefix("nimble").register(Qd())
|
|
2796
|
+
const Jd=ut`
|
|
2770
2797
|
${Zs("inline-block")}
|
|
2771
2798
|
|
|
2772
2799
|
:host {
|
|
@@ -2782,7 +2809,7 @@ const Wd=ut`
|
|
|
2782
2809
|
margin-top: ${Gn};
|
|
2783
2810
|
margin-bottom: ${Gn};
|
|
2784
2811
|
}
|
|
2785
|
-
`,
|
|
2812
|
+
`,Zd=ut`
|
|
2786
2813
|
${Ch}
|
|
2787
2814
|
|
|
2788
2815
|
.control[aria-pressed='true'] {
|
|
@@ -2808,8 +2835,8 @@ const Wd=ut`
|
|
|
2808
2835
|
border-color: ${Tn};
|
|
2809
2836
|
}
|
|
2810
2837
|
`
|
|
2811
|
-
class
|
|
2812
|
-
const
|
|
2838
|
+
class tu extends Cs{constructor(){super(...arguments),this.appearance=xh,this.contentHidden=!1}}zn([tt],tu.prototype,"appearance",void 0),zn([tt({attribute:"content-hidden",mode:"boolean"})],tu.prototype,"contentHidden",void 0),de(tu,$t,Ze)
|
|
2839
|
+
const eu=tu.compose({baseName:"toggle-button",template:(t,e)=>q`
|
|
2813
2840
|
<div
|
|
2814
2841
|
role="button"
|
|
2815
2842
|
part="control"
|
|
@@ -2850,22 +2877,22 @@ const Gd=Yd.compose({baseName:"toggle-button",template:(t,e)=>q`
|
|
|
2850
2877
|
</span>
|
|
2851
2878
|
${Ct(0,e)}
|
|
2852
2879
|
</div>
|
|
2853
|
-
`,styles:
|
|
2854
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2855
|
-
const
|
|
2856
|
-
class
|
|
2880
|
+
`,styles:Zd,shadowOptions:{delegatesFocus:!0}})
|
|
2881
|
+
Bi.getOrCreate().withPrefix("nimble").register(eu())
|
|
2882
|
+
const iu="auto"
|
|
2883
|
+
class su extends le{constructor(){super(...arguments),this.appearance=xh,this.disabled=!1,this.contentHidden=!1,this.open=!1,this.position=iu,this.focusLastItemWhenOpened=!1,this.menuChangeHandler=()=>{this.open=!1,this.toggleButton.focus()}}disconnectedCallback(){super.disconnectedCallback(),this.region&&this.region.removeEventListener(me,this.menuChangeHandler)}toggleButtonChanged(t,e){this.region&&this.toggleButton&&(this.region.anchorElement=this.toggleButton)}regionChanged(t,e){t&&t.removeEventListener(me,this.menuChangeHandler),this.region&&(this.toggleButton&&(this.region.anchorElement=this.toggleButton),this.region.addEventListener(me,this.menuChangeHandler,{capture:!0}))}openChanged(t,e){this.toggleButton&&(this.toggleButton.checked=this.open),this.open||this.$emit("open-change")}regionLoadedHandler(){this.focusLastItemWhenOpened?(this.focusLastMenuItem(),this.focusLastItemWhenOpened=!1):this.focusMenu(),this.$emit("open-change")}focusoutHandler(t){if(!this.open)return!0
|
|
2857
2884
|
const e=t.relatedTarget
|
|
2858
2885
|
return!!this.contains(e)||(this.open=!1,!1)}toggleButtonCheckedChangeHandler(t){return this.open=this.toggleButton.checked,t.stopPropagation(),!1}toggleButtonKeyDownHandler(t){switch(t.key){case Ce:return this.focusLastItemWhenOpened=!0,this.open=!0,!1
|
|
2859
2886
|
case xe:return this.open=!0,!1
|
|
2860
2887
|
default:return!0}}menuKeyDownHandler(t){switch(t.key){case _e:return this.open=!1,this.toggleButton.focus(),!1
|
|
2861
2888
|
default:return!0}}get menu(){return this.slottedMenus?.length?this.slottedMenus[0]:void 0}focusMenu(){this.menu?.focus()}focusLastMenuItem(){const t=this.menu?.querySelectorAll("[role=menuitem]")
|
|
2862
|
-
if(t?.length){t[t.length-1].focus()}}}zn([tt],
|
|
2863
|
-
const
|
|
2889
|
+
if(t?.length){t[t.length-1].focus()}}}zn([tt],su.prototype,"appearance",void 0),zn([tt({mode:"boolean"})],su.prototype,"disabled",void 0),zn([tt({attribute:"content-hidden",mode:"boolean"})],su.prototype,"contentHidden",void 0),zn([tt({mode:"boolean"})],su.prototype,"open",void 0),zn([tt({attribute:"position"})],su.prototype,"position",void 0),zn([v],su.prototype,"toggleButton",void 0),zn([v],su.prototype,"region",void 0),zn([v],su.prototype,"slottedMenus",void 0)
|
|
2890
|
+
const ou=su.compose({baseName:"menu-button",template:t=>q`
|
|
2864
2891
|
<template
|
|
2865
2892
|
?open="${t=>t.open}"
|
|
2866
2893
|
@focusout="${(t,e)=>t.focusoutHandler(e.event)}"
|
|
2867
2894
|
>
|
|
2868
|
-
<${t.tagFor(
|
|
2895
|
+
<${t.tagFor(tu)}
|
|
2869
2896
|
part="button"
|
|
2870
2897
|
appearance="${t=>t.appearance}"
|
|
2871
2898
|
?content-hidden="${t=>t.contentHidden}"
|
|
@@ -2882,7 +2909,7 @@ const Zd=Jd.compose({baseName:"menu-button",template:t=>q`
|
|
|
2882
2909
|
<slot slot="start" name="start"></slot>
|
|
2883
2910
|
<slot></slot>
|
|
2884
2911
|
<slot slot="end" name="end"></slot>
|
|
2885
|
-
</${t.tagFor(
|
|
2912
|
+
</${t.tagFor(tu)}>
|
|
2886
2913
|
${gt((t=>t.open),q`
|
|
2887
2914
|
<${t.tagFor(io)}
|
|
2888
2915
|
fixed-placement="true"
|
|
@@ -2901,9 +2928,9 @@ const Zd=Jd.compose({baseName:"menu-button",template:t=>q`
|
|
|
2901
2928
|
</${t.tagFor(io)}>
|
|
2902
2929
|
`)}
|
|
2903
2930
|
</template>
|
|
2904
|
-
`,styles:
|
|
2905
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2906
|
-
const
|
|
2931
|
+
`,styles:Jd,shadowOptions:{delegatesFocus:!0}})
|
|
2932
|
+
Bi.getOrCreate().withPrefix("nimble").register(ou())
|
|
2933
|
+
const nu=ut`
|
|
2907
2934
|
${Zs("grid")}
|
|
2908
2935
|
|
|
2909
2936
|
:host {
|
|
@@ -2982,7 +3009,7 @@ const tu=ut`
|
|
|
2982
3009
|
grid-column: 3;
|
|
2983
3010
|
}
|
|
2984
3011
|
`
|
|
2985
|
-
const
|
|
3012
|
+
const ru=class extends rs{}.compose({baseName:"menu-item",baseClass:rs,template:(t,e)=>q`
|
|
2986
3013
|
<template
|
|
2987
3014
|
role="${t=>t.role}"
|
|
2988
3015
|
aria-haspopup="${t=>t.hasSubmenu?"menu":void 0}"
|
|
@@ -3049,9 +3076,9 @@ const eu=class extends rs{}.compose({baseName:"menu-item",baseClass:rs,template:
|
|
|
3049
3076
|
</${t.tagFor(Fe)}>
|
|
3050
3077
|
`)}
|
|
3051
3078
|
</template>
|
|
3052
|
-
`,styles:
|
|
3053
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3054
|
-
const
|
|
3079
|
+
`,styles:nu,expandCollapseGlyph:Da.data})
|
|
3080
|
+
Bi.getOrCreate().withPrefix("nimble").register(ru())
|
|
3081
|
+
const au="underline",lu="outline",cu="block",hu=ut`
|
|
3055
3082
|
${Zs("inline-block")}
|
|
3056
3083
|
${Dh}
|
|
3057
3084
|
|
|
@@ -3200,12 +3227,12 @@ const iu="underline",su="outline",ou="block",nu=ut`
|
|
|
3200
3227
|
order: 1;
|
|
3201
3228
|
padding-right: calc(${Qn} / 4);
|
|
3202
3229
|
}
|
|
3203
|
-
`.withBehaviors(wh(
|
|
3230
|
+
`.withBehaviors(wh(au,ut`
|
|
3204
3231
|
.root {
|
|
3205
3232
|
border-bottom-width: ${Zn};
|
|
3206
3233
|
padding-bottom: 0;
|
|
3207
3234
|
}
|
|
3208
|
-
`),wh(
|
|
3235
|
+
`),wh(cu,ut`
|
|
3209
3236
|
.root {
|
|
3210
3237
|
background-color: rgba(${Fn}, 0.1);
|
|
3211
3238
|
}
|
|
@@ -3223,14 +3250,14 @@ const iu="underline",su="outline",ou="block",nu=ut`
|
|
|
3223
3250
|
:host([disabled]) .root {
|
|
3224
3251
|
background-color: rgba(${Fn}, 0.07);
|
|
3225
3252
|
}
|
|
3226
|
-
`),wh(
|
|
3253
|
+
`),wh(lu,ut`
|
|
3227
3254
|
.root {
|
|
3228
3255
|
border-width: ${Zn};
|
|
3229
3256
|
padding: 0;
|
|
3230
3257
|
}
|
|
3231
3258
|
`))
|
|
3232
|
-
class
|
|
3233
|
-
const
|
|
3259
|
+
class du extends gs{constructor(){super(...arguments),this.appearance=au}connectedCallback(){super.connectedCallback(),this.control.setAttribute("role","spinbutton")}}zn([tt],du.prototype,"appearance",void 0),zn([tt({attribute:"error-text"})],du.prototype,"errorText",void 0)
|
|
3260
|
+
const uu=du.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
3234
3261
|
<template class="${t=>t.readOnly?"readonly":""}">
|
|
3235
3262
|
<label
|
|
3236
3263
|
part="label"
|
|
@@ -3305,7 +3332,7 @@ const au=ru.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
|
3305
3332
|
${Ct(0,e)}
|
|
3306
3333
|
</div>
|
|
3307
3334
|
</template>
|
|
3308
|
-
`,styles:
|
|
3335
|
+
`,styles:hu,shadowOptions:{delegatesFocus:!0},stepDownGlyph:q`
|
|
3309
3336
|
<nimble-button
|
|
3310
3337
|
class="step-up-down-button"
|
|
3311
3338
|
appearance="ghost"
|
|
@@ -3331,10 +3358,10 @@ const au=ru.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
|
3331
3358
|
></nimble-icon-exclamation-mark>
|
|
3332
3359
|
${Hh}
|
|
3333
3360
|
`})
|
|
3334
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3335
|
-
const
|
|
3361
|
+
Bi.getOrCreate().withPrefix("nimble").register(uu())
|
|
3362
|
+
const pu="underline",vu="outline",gu="block",mu=ut`
|
|
3336
3363
|
${Rh}
|
|
3337
|
-
`.withBehaviors(wh(
|
|
3364
|
+
`.withBehaviors(wh(pu,ut`
|
|
3338
3365
|
.control {
|
|
3339
3366
|
padding-top: ${Zn};
|
|
3340
3367
|
padding-left: calc(${Zn} + ${Qn} / 2);
|
|
@@ -3344,7 +3371,7 @@ const lu="underline",cu="outline",hu="block",du=ut`
|
|
|
3344
3371
|
:host([disabled]) .control {
|
|
3345
3372
|
border-color: rgba(${Fn}, 0.1);
|
|
3346
3373
|
}
|
|
3347
|
-
`),wh(
|
|
3374
|
+
`),wh(vu,ut`
|
|
3348
3375
|
.control {
|
|
3349
3376
|
border: ${Zn} solid rgba(${Fn}, 0.3);
|
|
3350
3377
|
}
|
|
@@ -3352,7 +3379,7 @@ const lu="underline",cu="outline",hu="block",du=ut`
|
|
|
3352
3379
|
:host(.invalid) .errortext {
|
|
3353
3380
|
top: calc(${Yn} - ${Zn});
|
|
3354
3381
|
}
|
|
3355
|
-
`),wh(
|
|
3382
|
+
`),wh(gu,ut`
|
|
3356
3383
|
.control {
|
|
3357
3384
|
background-color: rgba(${Fn}, 0.1);
|
|
3358
3385
|
padding-left: calc(${Zn} + ${Qn} / 2);
|
|
@@ -3366,9 +3393,9 @@ const lu="underline",cu="outline",hu="block",du=ut`
|
|
|
3366
3393
|
background-color: rgba(${Fn}, 0.07);
|
|
3367
3394
|
}
|
|
3368
3395
|
`))
|
|
3369
|
-
class
|
|
3370
|
-
super.slottedOptionsChanged(t,e),i&&(this.value=i)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}zn([tt],
|
|
3371
|
-
const
|
|
3396
|
+
class fu extends ws{constructor(){super(...arguments),this.appearance=pu}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(t,e){const i=this.value
|
|
3397
|
+
super.slottedOptionsChanged(t,e),i&&(this.value=i)}maxHeightChanged(){this.updateListboxMaxHeightCssVariable()}updateListboxMaxHeightCssVariable(){this.listbox&&this.listbox.style.setProperty("--ni-private-select-max-height",`${this.maxHeight}px`)}}zn([tt],fu.prototype,"appearance",void 0)
|
|
3398
|
+
const bu=fu.compose({baseName:"select",baseClass:ws,template:(t,e)=>q`
|
|
3372
3399
|
<template
|
|
3373
3400
|
class="${t=>[t.collapsible&&"collapsible",t.collapsible&&t.open&&"open",t.disabled&&"disabled",t.collapsible&&t.position].filter(Boolean).join(" ")}"
|
|
3374
3401
|
aria-activedescendant="${t=>t.ariaActiveDescendant}"
|
|
@@ -3421,9 +3448,9 @@ const pu=uu.compose({baseName:"select",baseClass:ws,template:(t,e)=>q`
|
|
|
3421
3448
|
></slot>
|
|
3422
3449
|
</div>
|
|
3423
3450
|
</template>
|
|
3424
|
-
`,styles:
|
|
3425
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3426
|
-
const
|
|
3451
|
+
`,styles:mu,indicator:Pa.data})
|
|
3452
|
+
Bi.getOrCreate().withPrefix("nimble").register(bu())
|
|
3453
|
+
const wu=ut`
|
|
3427
3454
|
${Zs("inline-flex")}
|
|
3428
3455
|
|
|
3429
3456
|
:host {
|
|
@@ -3585,7 +3612,7 @@ const vu=ut`
|
|
|
3585
3612
|
--ni-private-switch-indicator-border-color: ${uo};
|
|
3586
3613
|
--ni-private-switch-indicator-border-disabled-color: ${Mn(uo,.3)};
|
|
3587
3614
|
}
|
|
3588
|
-
`)),
|
|
3615
|
+
`)),xu=q`
|
|
3589
3616
|
<template
|
|
3590
3617
|
role="switch"
|
|
3591
3618
|
aria-checked="${t=>t.checked}"
|
|
@@ -3620,9 +3647,9 @@ const vu=ut`
|
|
|
3620
3647
|
</div>
|
|
3621
3648
|
</template>
|
|
3622
3649
|
`
|
|
3623
|
-
const
|
|
3624
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3625
|
-
const
|
|
3650
|
+
const yu=class extends Cs{}.compose({baseClass:Cs,baseName:"switch",template:xu,styles:wu})
|
|
3651
|
+
Bi.getOrCreate().withPrefix("nimble").register(yu())
|
|
3652
|
+
const $u=ut`
|
|
3626
3653
|
${Zs("inline-flex")}
|
|
3627
3654
|
|
|
3628
3655
|
:host {
|
|
@@ -3716,13 +3743,13 @@ const fu=ut`
|
|
|
3716
3743
|
width: 100%;
|
|
3717
3744
|
}
|
|
3718
3745
|
`
|
|
3719
|
-
const
|
|
3746
|
+
const Cu=class extends _s{}.compose({baseName:"tab",baseClass:_s,template:(t,e)=>q`
|
|
3720
3747
|
<template slot="tab" role="tab" aria-disabled="${t=>t.disabled}">
|
|
3721
3748
|
<slot></slot>
|
|
3722
3749
|
</template>
|
|
3723
|
-
`,styles
|
|
3724
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3725
|
-
const
|
|
3750
|
+
`,styles:$u})
|
|
3751
|
+
Bi.getOrCreate().withPrefix("nimble").register(Cu())
|
|
3752
|
+
const ku=ut`
|
|
3726
3753
|
${Zs("block")}
|
|
3727
3754
|
|
|
3728
3755
|
:host {
|
|
@@ -3732,13 +3759,13 @@ const wu=ut`
|
|
|
3732
3759
|
padding-top: ${Qn};
|
|
3733
3760
|
}
|
|
3734
3761
|
`
|
|
3735
|
-
const
|
|
3762
|
+
const _u=class extends ks{}.compose({baseName:"tab-panel",baseClass:ks,template:(t,e)=>q`
|
|
3736
3763
|
<template slot="tabpanel" role="tabpanel">
|
|
3737
3764
|
<slot></slot>
|
|
3738
3765
|
</template>
|
|
3739
|
-
`,styles:
|
|
3740
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3741
|
-
const
|
|
3766
|
+
`,styles:ku})
|
|
3767
|
+
Bi.getOrCreate().withPrefix("nimble").register(_u())
|
|
3768
|
+
const zu=ut`
|
|
3742
3769
|
${Zs("grid")}
|
|
3743
3770
|
|
|
3744
3771
|
:host {
|
|
@@ -3761,7 +3788,7 @@ const yu=ut`
|
|
|
3761
3788
|
grid-column-end: 4;
|
|
3762
3789
|
}
|
|
3763
3790
|
`
|
|
3764
|
-
const
|
|
3791
|
+
const Iu=class extends Is{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:Is,template:(t,e)=>q`
|
|
3765
3792
|
<template class="${t=>t.orientation}">
|
|
3766
3793
|
${kt(0,e)}
|
|
3767
3794
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -3780,9 +3807,9 @@ const $u=class extends Is{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
3780
3807
|
<slot name="tabpanel" part="tabpanel" ${wt("tabpanels")}></slot>
|
|
3781
3808
|
</div>
|
|
3782
3809
|
</template>
|
|
3783
|
-
`,styles:
|
|
3784
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3785
|
-
const
|
|
3810
|
+
`,styles:zu})
|
|
3811
|
+
Bi.getOrCreate().withPrefix("nimble").register(Iu())
|
|
3812
|
+
const Ou=ut`
|
|
3786
3813
|
${Zs("flex")}
|
|
3787
3814
|
|
|
3788
3815
|
:host {
|
|
@@ -3800,15 +3827,15 @@ const Cu=ut`
|
|
|
3800
3827
|
rgba(${Fn}, 0.3);
|
|
3801
3828
|
margin: calc(${Qn} / 4) calc(${Qn} / 2);
|
|
3802
3829
|
}
|
|
3803
|
-
`,
|
|
3830
|
+
`,Au=q`
|
|
3804
3831
|
<template slot="end">
|
|
3805
3832
|
<div class="separator"></div>
|
|
3806
3833
|
<slot></slot>
|
|
3807
3834
|
</template>
|
|
3808
3835
|
`
|
|
3809
|
-
const
|
|
3810
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3811
|
-
const
|
|
3836
|
+
const Su=class extends le{}.compose({baseName:"tabs-toolbar",template:Au,styles:Ou})
|
|
3837
|
+
Bi.getOrCreate().withPrefix("nimble").register(Su())
|
|
3838
|
+
const Eu="outline",Hu="block",Mu=ut`
|
|
3812
3839
|
${Zs("inline-flex")}
|
|
3813
3840
|
|
|
3814
3841
|
:host {
|
|
@@ -3900,12 +3927,12 @@ const zu="outline",Iu="block",Ou=ut`
|
|
|
3900
3927
|
:host([resize='vertical']) .control {
|
|
3901
3928
|
resize: vertical;
|
|
3902
3929
|
}
|
|
3903
|
-
`.withBehaviors(wh(
|
|
3930
|
+
`.withBehaviors(wh(Eu,ut`
|
|
3904
3931
|
.control {
|
|
3905
3932
|
border-color: rgba(${Fn}, 0.3);
|
|
3906
3933
|
background-color: transparent;
|
|
3907
3934
|
}
|
|
3908
|
-
`),wh(
|
|
3935
|
+
`),wh(Hu,ut`
|
|
3909
3936
|
.control {
|
|
3910
3937
|
background-color: rgba(${Fn}, 0.1);
|
|
3911
3938
|
}
|
|
@@ -3919,8 +3946,8 @@ const zu="outline",Iu="block",Ou=ut`
|
|
|
3919
3946
|
background-color: rgba(${Fn}, 0.1);
|
|
3920
3947
|
}
|
|
3921
3948
|
`))
|
|
3922
|
-
class
|
|
3923
|
-
const
|
|
3949
|
+
class Vu extends Es{constructor(){super(...arguments),this.appearance=Eu}}zn([tt],Vu.prototype,"appearance",void 0)
|
|
3950
|
+
const Lu=Vu.compose({baseName:"text-area",baseClass:Es,template:(t,e)=>q`
|
|
3924
3951
|
<template
|
|
3925
3952
|
class="
|
|
3926
3953
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -3975,9 +4002,9 @@ const Su=Au.compose({baseName:"text-area",baseClass:Es,template:(t,e)=>q`
|
|
|
3975
4002
|
${vt("control")}
|
|
3976
4003
|
></textarea>
|
|
3977
4004
|
</template>
|
|
3978
|
-
`,styles:
|
|
3979
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3980
|
-
const
|
|
4005
|
+
`,styles:Mu,shadowOptions:{delegatesFocus:!0}})
|
|
4006
|
+
Bi.getOrCreate().withPrefix("nimble").register(Lu())
|
|
4007
|
+
const Tu="underline",Pu="outline",Ru="block",Du="frameless",Fu=ut`
|
|
3981
4008
|
${Zs("inline-block")}
|
|
3982
4009
|
${Dh}
|
|
3983
4010
|
|
|
@@ -4150,12 +4177,12 @@ const Eu="underline",Hu="outline",Mu="block",Vu="frameless",Lu=ut`
|
|
|
4150
4177
|
slot[name='actions']::slotted(*) {
|
|
4151
4178
|
${Yn.cssCustomProperty}: 24px;
|
|
4152
4179
|
}
|
|
4153
|
-
`.withBehaviors(wh(
|
|
4180
|
+
`.withBehaviors(wh(Tu,ut`
|
|
4154
4181
|
.root {
|
|
4155
4182
|
border-bottom-width: ${Zn};
|
|
4156
4183
|
padding-bottom: 0;
|
|
4157
4184
|
}
|
|
4158
|
-
`),wh(
|
|
4185
|
+
`),wh(Ru,ut`
|
|
4159
4186
|
.root {
|
|
4160
4187
|
background-color: rgba(${Fn}, 0.1);
|
|
4161
4188
|
}
|
|
@@ -4183,12 +4210,12 @@ const Eu="underline",Hu="outline",Mu="block",Vu="frameless",Lu=ut`
|
|
|
4183
4210
|
:host([disabled]) .root {
|
|
4184
4211
|
background-color: rgba(${Fn}, 0.07);
|
|
4185
4212
|
}
|
|
4186
|
-
`),wh(
|
|
4213
|
+
`),wh(Pu,ut`
|
|
4187
4214
|
.root {
|
|
4188
4215
|
border-width: ${Zn};
|
|
4189
4216
|
padding: 0;
|
|
4190
4217
|
}
|
|
4191
|
-
`),wh(
|
|
4218
|
+
`),wh(Du,ut`
|
|
4192
4219
|
.control {
|
|
4193
4220
|
padding-left: ${Zn};
|
|
4194
4221
|
padding-right: ${Zn};
|
|
@@ -4206,8 +4233,8 @@ const Eu="underline",Hu="outline",Mu="block",Vu="frameless",Lu=ut`
|
|
|
4206
4233
|
filter: invert(100%);
|
|
4207
4234
|
}
|
|
4208
4235
|
`))
|
|
4209
|
-
class
|
|
4210
|
-
const
|
|
4236
|
+
class Bu extends ds{constructor(){super(...arguments),this.appearance=Tu}connectedCallback(){super.connectedCallback(),this.control.setAttribute("aria-errormessage","errortext")}}zn([tt],Bu.prototype,"appearance",void 0),zn([tt({attribute:"error-text"})],Bu.prototype,"errorText",void 0)
|
|
4237
|
+
const Nu=Bu.compose({baseName:"text-field",baseClass:ds,template:(t,e)=>q`
|
|
4211
4238
|
<template
|
|
4212
4239
|
class="
|
|
4213
4240
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -4267,7 +4294,7 @@ const Pu=Tu.compose({baseName:"text-field",baseClass:ds,template:(t,e)=>q`
|
|
|
4267
4294
|
${Ct(0,e)}
|
|
4268
4295
|
</div>
|
|
4269
4296
|
</template>
|
|
4270
|
-
`,styles:
|
|
4297
|
+
`,styles:Fu,shadowOptions:{delegatesFocus:!0},end:q`
|
|
4271
4298
|
<nimble-icon-exclamation-mark
|
|
4272
4299
|
class="error-icon fail"
|
|
4273
4300
|
></nimble-icon-exclamation-mark>
|
|
@@ -4276,8 +4303,8 @@ const Pu=Tu.compose({baseName:"text-field",baseClass:ds,template:(t,e)=>q`
|
|
|
4276
4303
|
</span>
|
|
4277
4304
|
${Hh}
|
|
4278
4305
|
`})
|
|
4279
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
4280
|
-
const
|
|
4306
|
+
Bi.getOrCreate().withPrefix("nimble").register(Nu())
|
|
4307
|
+
const ju=ut`
|
|
4281
4308
|
.positioning-region {
|
|
4282
4309
|
display: flex;
|
|
4283
4310
|
padding: ${Gn} ${Qn};
|
|
@@ -4302,7 +4329,7 @@ const Ru=ut`
|
|
|
4302
4329
|
margin-left: auto;
|
|
4303
4330
|
}
|
|
4304
4331
|
`
|
|
4305
|
-
const
|
|
4332
|
+
const qu=class extends Ms{}.compose({baseName:"toolbar",baseClass:Ms,template:(t,e)=>q`
|
|
4306
4333
|
<template
|
|
4307
4334
|
aria-label="${t=>t.ariaLabel}"
|
|
4308
4335
|
aria-labelledby="${t=>t.ariaLabelledby}"
|
|
@@ -4323,9 +4350,9 @@ const Du=class extends Ms{}.compose({baseName:"toolbar",baseClass:Ms,template:(t
|
|
|
4323
4350
|
${Ct(0,e)}
|
|
4324
4351
|
</div>
|
|
4325
4352
|
</template>
|
|
4326
|
-
`,styles:
|
|
4327
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
4328
|
-
const
|
|
4353
|
+
`,styles:ju,shadowOptions:{delegatesFocus:!0}})
|
|
4354
|
+
Bi.getOrCreate().withPrefix("nimble").register(qu())
|
|
4355
|
+
const Uu=ut`
|
|
4329
4356
|
${Zs("inline-flex")}
|
|
4330
4357
|
|
|
4331
4358
|
:host {
|
|
@@ -4411,7 +4438,7 @@ const Fu=ut`
|
|
|
4411
4438
|
opacity: 0.6;
|
|
4412
4439
|
}
|
|
4413
4440
|
`))
|
|
4414
|
-
const
|
|
4441
|
+
const Ku=class extends Ys{}.compose({baseName:"tooltip",baseClass:Ys,template:t=>q`
|
|
4415
4442
|
${gt((t=>t.tooltipVisible),q`
|
|
4416
4443
|
<${t.tagFor(io)}
|
|
4417
4444
|
class="anchored-region"
|
|
@@ -4432,21 +4459,21 @@ const Bu=class extends Ys{}.compose({baseName:"tooltip",baseClass:Ys,template:t=
|
|
|
4432
4459
|
>
|
|
4433
4460
|
<div class="tooltip" part="tooltip" role="tooltip">
|
|
4434
4461
|
<${t.tagFor(Ph)} class="fail status-icon"></${t.tagFor(Ph)}>
|
|
4435
|
-
<${t.tagFor(
|
|
4462
|
+
<${t.tagFor(Wd)} class="information status-icon"></${t.tagFor(Wd)}>
|
|
4436
4463
|
<slot></slot>
|
|
4437
4464
|
</div>
|
|
4438
4465
|
</${t.tagFor(io)}>
|
|
4439
4466
|
`)}
|
|
4440
|
-
`,styles:
|
|
4441
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
4442
|
-
const
|
|
4443
|
-
class
|
|
4444
|
-
e&&An.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
4445
|
-
An.subscribe(e),e.attach(i),this.cache.set(t,e)}}class
|
|
4446
|
-
t?.forEach((t=>t.removeAttribute(
|
|
4467
|
+
`,styles:Uu})
|
|
4468
|
+
Bi.getOrCreate().withPrefix("nimble").register(Ku())
|
|
4469
|
+
const Wu="group-selected",Xu="all",Yu="leaves-only",Gu="none"
|
|
4470
|
+
class Qu{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)
|
|
4471
|
+
e&&An.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new Ju(this.ltr,this.rtl,t),i=An.getValueFor(t)
|
|
4472
|
+
An.subscribe(e),e.attach(i),this.cache.set(t,e)}}class Ju{constructor(t,e,i){this.ltr=t,this.rtl=e,this.source=i,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 Zu=class extends Qs{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]")
|
|
4473
|
+
t?.forEach((t=>t.removeAttribute(Wu)))}setGroupSelectionOnRootParentTreeItem(t){this.clearTreeGroupSelection()
|
|
4447
4474
|
let e=t
|
|
4448
4475
|
for(;e?.parentElement!==this.treeView;)e=e?.parentElement
|
|
4449
|
-
e&&e.setAttribute(
|
|
4476
|
+
e&&e.setAttribute(Wu,"true")}getParentTreeView(){return this.parentElement.closest("[role='tree']")}}.compose({baseName:"tree-item",baseClass:Qs,template:(t,e)=>q`
|
|
4450
4477
|
<template
|
|
4451
4478
|
role="treeitem"
|
|
4452
4479
|
slot="${t=>t.isNestedItem()?"item":void 0}"
|
|
@@ -4502,7 +4529,7 @@ e&&e.setAttribute(Nu,"true")}getParentTreeView(){return this.parentElement.close
|
|
|
4502
4529
|
}
|
|
4503
4530
|
|
|
4504
4531
|
${""}
|
|
4505
|
-
:host([${
|
|
4532
|
+
:host([${Wu}])::after {
|
|
4506
4533
|
background: ${Un};
|
|
4507
4534
|
border-radius: 0px;
|
|
4508
4535
|
content: '';
|
|
@@ -4524,7 +4551,7 @@ e&&e.setAttribute(Nu,"true")}getParentTreeView(){return this.parentElement.close
|
|
|
4524
4551
|
background: ${Rn};
|
|
4525
4552
|
}
|
|
4526
4553
|
|
|
4527
|
-
:host([${
|
|
4554
|
+
:host([${Wu}]) .positioning-region:hover {
|
|
4528
4555
|
background: ${Pn};
|
|
4529
4556
|
}
|
|
4530
4557
|
|
|
@@ -4634,7 +4661,7 @@ e&&e.setAttribute(Nu,"true")}getParentTreeView(){return this.parentElement.close
|
|
|
4634
4661
|
:host([expanded]) .items {
|
|
4635
4662
|
display: block;
|
|
4636
4663
|
}
|
|
4637
|
-
`.withBehaviors(new
|
|
4664
|
+
`.withBehaviors(new Qu(ut`
|
|
4638
4665
|
${""}
|
|
4639
4666
|
.expand-collapse-button {
|
|
4640
4667
|
left: var(
|
|
@@ -4667,8 +4694,8 @@ e&&e.setAttribute(Nu,"true")}getParentTreeView(){return this.parentElement.close
|
|
|
4667
4694
|
transform: rotate(135deg);
|
|
4668
4695
|
}
|
|
4669
4696
|
`)),expandCollapseGlyph:Fa.data})
|
|
4670
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
4671
|
-
const
|
|
4697
|
+
Bi.getOrCreate().withPrefix("nimble").register(Zu())
|
|
4698
|
+
const tp=ut`
|
|
4672
4699
|
${Zs("flex")}
|
|
4673
4700
|
|
|
4674
4701
|
:host {
|
|
@@ -4681,14 +4708,14 @@ const Yu=ut`
|
|
|
4681
4708
|
outline: none;
|
|
4682
4709
|
}
|
|
4683
4710
|
`
|
|
4684
|
-
class
|
|
4711
|
+
class ep extends Js{constructor(){super(...arguments),this.selectionMode=Xu}handleClick(t){if(t.defaultPrevented)return!1
|
|
4685
4712
|
if(!(t.target instanceof Element&&Gs(t.target)))return!0
|
|
4686
4713
|
const e=t.target
|
|
4687
|
-
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case
|
|
4688
|
-
case
|
|
4689
|
-
case
|
|
4690
|
-
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}}zn([tt({attribute:"selection-mode"})],
|
|
4691
|
-
const
|
|
4714
|
+
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case Xu:return!0
|
|
4715
|
+
case Gu:return!1
|
|
4716
|
+
case Yu:return!this.itemHasChildren(t)
|
|
4717
|
+
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}}zn([tt({attribute:"selection-mode"})],ep.prototype,"selectionMode",void 0)
|
|
4718
|
+
const ip=ep.compose({baseName:"tree-view",baseClass:Js,template:(t,e)=>q`
|
|
4692
4719
|
<template
|
|
4693
4720
|
role="tree"
|
|
4694
4721
|
${vt("treeView")}
|
|
@@ -4700,6 +4727,6 @@ const Qu=Gu.compose({baseName:"tree-view",baseClass:Js,template:(t,e)=>q`
|
|
|
4700
4727
|
>
|
|
4701
4728
|
<slot ${wt("slottedTreeItems")}></slot>
|
|
4702
4729
|
</template>
|
|
4703
|
-
`,styles:
|
|
4704
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
4730
|
+
`,styles:tp})
|
|
4731
|
+
Bi.getOrCreate().withPrefix("nimble").register(ip())}()
|
|
4705
4732
|
//# sourceMappingURL=all-components-bundle.min.js.map
|