@ni/nimble-components 11.9.0 → 11.10.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.
- package/dist/all-components-bundle.js +69 -58
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +195 -185
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/combobox/index.d.ts +2 -0
- package/dist/esm/combobox/index.js +5 -0
- package/dist/esm/combobox/index.js.map +1 -1
- package/dist/esm/combobox/styles.js +20 -5
- package/dist/esm/combobox/styles.js.map +1 -1
- package/dist/esm/dialog/index.js +1 -4
- package/dist/esm/dialog/index.js.map +1 -1
- package/dist/esm/patterns/dropdown/styles.js +39 -9
- package/dist/esm/patterns/dropdown/styles.js.map +1 -1
- package/dist/esm/select/styles.js +1 -35
- package/dist/esm/select/styles.js.map +1 -1
- package/package.json +3 -2
|
@@ -1822,7 +1822,7 @@ class Lh extends le{constructor(t){super(),this.icon=t}}const Th=(t,e)=>{const i
|
|
|
1822
1822
|
Bi.getOrCreate().withPrefix("nimble").register(i())}
|
|
1823
1823
|
class Ph extends Lh{constructor(){super(Bl)}}Th("icon-exclamation-mark",Ph)
|
|
1824
1824
|
Th("icon-arrow-expander-down",class extends Lh{constructor(){super(Pa)}})
|
|
1825
|
-
const Rh=ut`
|
|
1825
|
+
const Rh="underline",Dh="outline",Fh="block",Bh=ut`
|
|
1826
1826
|
${Zs("inline-flex")}
|
|
1827
1827
|
|
|
1828
1828
|
:host {
|
|
@@ -1875,10 +1875,6 @@ const Rh=ut`
|
|
|
1875
1875
|
transition: width ${ya} ease-in;
|
|
1876
1876
|
}
|
|
1877
1877
|
|
|
1878
|
-
:host(.invalid)::after {
|
|
1879
|
-
border-bottom-color: ${Bn};
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
1878
|
@media (prefers-reduced-motion) {
|
|
1883
1879
|
:host::after {
|
|
1884
1880
|
transition-duration: 0s;
|
|
@@ -1901,10 +1897,9 @@ const Rh=ut`
|
|
|
1901
1897
|
display: flex;
|
|
1902
1898
|
min-height: 100%;
|
|
1903
1899
|
width: 100%;
|
|
1904
|
-
border
|
|
1900
|
+
border: 0px solid rgba(${Fn}, 0.3);
|
|
1905
1901
|
background-color: transparent;
|
|
1906
|
-
padding
|
|
1907
|
-
padding-bottom: 1px;
|
|
1902
|
+
padding: ${Zn};
|
|
1908
1903
|
}
|
|
1909
1904
|
|
|
1910
1905
|
:host(.open:not(:hover)) .control {
|
|
@@ -1967,6 +1962,12 @@ const Rh=ut`
|
|
|
1967
1962
|
white-space: nowrap;
|
|
1968
1963
|
text-overflow: ellipsis;
|
|
1969
1964
|
overflow: hidden;
|
|
1965
|
+
padding: 0px;
|
|
1966
|
+
padding-left: calc(${Qn} / 2);
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
.selected-value[disabled]::placeholder {
|
|
1970
|
+
color: ${Or};
|
|
1970
1971
|
}
|
|
1971
1972
|
|
|
1972
1973
|
.indicator {
|
|
@@ -2006,7 +2007,34 @@ const Rh=ut`
|
|
|
2006
2007
|
::slotted(option) {
|
|
2007
2008
|
flex: none;
|
|
2008
2009
|
}
|
|
2009
|
-
|
|
2010
|
+
`.withBehaviors(wh(Rh,ut`
|
|
2011
|
+
.control {
|
|
2012
|
+
border-bottom-width: ${Zn};
|
|
2013
|
+
padding-bottom: 0;
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
:host([disabled]) .control {
|
|
2017
|
+
border-color: rgba(${Fn}, 0.1);
|
|
2018
|
+
}
|
|
2019
|
+
`),wh(Dh,ut`
|
|
2020
|
+
.control {
|
|
2021
|
+
border-width: ${Zn};
|
|
2022
|
+
padding: 0;
|
|
2023
|
+
}
|
|
2024
|
+
`),wh(Fh,ut`
|
|
2025
|
+
.control {
|
|
2026
|
+
background-color: rgba(${Fn}, 0.1);
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
.control:focus-within {
|
|
2030
|
+
border-bottom-width: ${Zn};
|
|
2031
|
+
padding-bottom: 0;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
:host([disabled]) .control {
|
|
2035
|
+
background-color: rgba(${Fn}, 0.07);
|
|
2036
|
+
}
|
|
2037
|
+
`)),Nh=ut`
|
|
2010
2038
|
.error-icon {
|
|
2011
2039
|
display: none;
|
|
2012
2040
|
}
|
|
@@ -2042,13 +2070,16 @@ const Rh=ut`
|
|
|
2042
2070
|
:host(.invalid) .error-text:empty {
|
|
2043
2071
|
display: none;
|
|
2044
2072
|
}
|
|
2045
|
-
`,
|
|
2046
|
-
${
|
|
2047
|
-
${
|
|
2073
|
+
`,jh=ut`
|
|
2074
|
+
${Bh}
|
|
2075
|
+
${Nh}
|
|
2048
2076
|
|
|
2049
2077
|
:host {
|
|
2050
2078
|
--ni-private-hover-bottom-border-width: 2px;
|
|
2051
2079
|
--ni-private-bottom-border-width: 1px;
|
|
2080
|
+
--ni-private-height-within-border: calc(
|
|
2081
|
+
${Yn} - 2 * ${Zn}
|
|
2082
|
+
);
|
|
2052
2083
|
}
|
|
2053
2084
|
|
|
2054
2085
|
:host([disabled]) *,
|
|
@@ -2057,6 +2088,10 @@ const Rh=ut`
|
|
|
2057
2088
|
color: ${Or};
|
|
2058
2089
|
}
|
|
2059
2090
|
|
|
2091
|
+
:host(.invalid)::after {
|
|
2092
|
+
border-bottom-color: ${Bn};
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2060
2095
|
.control {
|
|
2061
2096
|
bottom-border-width: var(--ni-private-bottom-border-width);
|
|
2062
2097
|
}
|
|
@@ -2073,8 +2108,9 @@ const Rh=ut`
|
|
|
2073
2108
|
border-color: rgba(${Fn}, 0.1);
|
|
2074
2109
|
}
|
|
2075
2110
|
|
|
2076
|
-
:host(.invalid[disabled]) .control
|
|
2077
|
-
|
|
2111
|
+
:host(.invalid[disabled]) .control,
|
|
2112
|
+
:host(.open.invalid) .control {
|
|
2113
|
+
border-bottom-color: ${Bn};
|
|
2078
2114
|
}
|
|
2079
2115
|
|
|
2080
2116
|
.selected-value {
|
|
@@ -2085,7 +2121,7 @@ const Rh=ut`
|
|
|
2085
2121
|
margin: auto 0;
|
|
2086
2122
|
width: 100%;
|
|
2087
2123
|
font-size: inherit;
|
|
2088
|
-
|
|
2124
|
+
height: var(--ni-private-height-within-border);
|
|
2089
2125
|
}
|
|
2090
2126
|
|
|
2091
2127
|
.selected-value:hover,
|
|
@@ -2126,8 +2162,13 @@ const Rh=ut`
|
|
|
2126
2162
|
:host(:empty) .listbox {
|
|
2127
2163
|
display: none;
|
|
2128
2164
|
}
|
|
2129
|
-
`
|
|
2130
|
-
|
|
2165
|
+
`.withBehaviors(wh(Fh,ut`
|
|
2166
|
+
:host(.invalid) .control {
|
|
2167
|
+
border-bottom-width: ${Zn};
|
|
2168
|
+
padding-bottom: 0;
|
|
2169
|
+
}
|
|
2170
|
+
`))
|
|
2171
|
+
class qh extends mi{constructor(){super(...arguments),this.appearance=Rh,this.valueUpdatedByInput=!1}setPositioning(){this.$fastController.isConnected&&super.setPositioning()}slottedOptionsChanged(t,e){const i=this.value
|
|
2131
2172
|
super.slottedOptionsChanged(t,e),i&&(this.value=i)}connectedCallback(){super.connectedCallback(),this.setPositioning(),this.updateInputAriaLabel()}toggleButtonClickHandler(t){t.stopImmediatePropagation()}toggleButtonChangeHandler(t){this.open=this.dropdownButton.checked,t.stopImmediatePropagation()}toggleButtonKeyDownHandler(t){switch(t.key){case Ce:case xe:case Oe:case ke:return this.open=!0,this.stopPropagation(t),!1
|
|
2132
2173
|
default:return!0}}filterOptions(){super.filterOptions()
|
|
2133
2174
|
const t=this.filteredOptions.filter((t=>!t.disabled))
|
|
@@ -2140,8 +2181,8 @@ case xe:case Ce:this.open&&this.valueUpdatedByInput&&(this.valueUpdatedByInput=!
|
|
|
2140
2181
|
break
|
|
2141
2182
|
default:return e}return e}focusoutHandler(t){const e=super.focusoutHandler(t)
|
|
2142
2183
|
return this.open=!1,this.emitChangeIfValueUpdated(),e}openChanged(){super.openChanged(),this.dropdownButton&&(this.dropdownButton.checked=this.open)}ariaLabelChanged(t,e){this.updateInputAriaLabel()}updateInputAriaLabel(){const t=this.shadowRoot?.querySelector(".selected-value")
|
|
2143
|
-
this.ariaLabel?t?.setAttribute("aria-label",this.ariaLabel):t?.removeAttribute("aria-label")}emitChangeIfValueUpdated(){this.valueUpdatedByInput&&(this.value!==this.valueBeforeTextUpdate&&this.$emit("change"),this.valueUpdatedByInput=!1)}}zn([v],
|
|
2144
|
-
const
|
|
2184
|
+
this.ariaLabel?t?.setAttribute("aria-label",this.ariaLabel):t?.removeAttribute("aria-label")}emitChangeIfValueUpdated(){this.valueUpdatedByInput&&(this.value!==this.valueBeforeTextUpdate&&this.$emit("change"),this.valueUpdatedByInput=!1)}}zn([tt],qh.prototype,"appearance",void 0),zn([v],qh.prototype,"dropdownButton",void 0),zn([tt({attribute:"error-text"})],qh.prototype,"errorText",void 0)
|
|
2185
|
+
const Uh=qh.compose({baseName:"combobox",baseClass:mi,template:(t,e)=>q`
|
|
2145
2186
|
<template
|
|
2146
2187
|
aria-disabled="${t=>t.ariaDisabled}"
|
|
2147
2188
|
autocomplete="${t=>t.autocomplete}"
|
|
@@ -2195,7 +2236,7 @@ const Nh=Bh.compose({baseName:"combobox",baseClass:mi,template:(t,e)=>q`
|
|
|
2195
2236
|
></slot>
|
|
2196
2237
|
</div>
|
|
2197
2238
|
</template>
|
|
2198
|
-
`,styles:
|
|
2239
|
+
`,styles:jh,shadowOptions:{delegatesFocus:!0},end:q`
|
|
2199
2240
|
<div class="end-slot-container">
|
|
2200
2241
|
<nimble-icon-exclamation-mark
|
|
2201
2242
|
class="error-icon fail"
|
|
@@ -2225,8 +2266,8 @@ const Nh=Bh.compose({baseName:"combobox",baseClass:mi,template:(t,e)=>q`
|
|
|
2225
2266
|
</div>
|
|
2226
2267
|
${Hh}
|
|
2227
2268
|
`})
|
|
2228
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2229
|
-
const
|
|
2269
|
+
Bi.getOrCreate().withPrefix("nimble").register(Uh())
|
|
2270
|
+
const Kh=ut`
|
|
2230
2271
|
${Zs("grid")}
|
|
2231
2272
|
|
|
2232
2273
|
dialog {
|
|
@@ -2235,7 +2276,7 @@ const jh=ut`
|
|
|
2235
2276
|
box-shadow: 0px 2px 3px ${Wn};
|
|
2236
2277
|
max-width: 50%;
|
|
2237
2278
|
}
|
|
2238
|
-
`,
|
|
2279
|
+
`,Wh=q`
|
|
2239
2280
|
<template>
|
|
2240
2281
|
<dialog
|
|
2241
2282
|
${vt("dialogElement")}
|
|
@@ -2247,13 +2288,13 @@ const jh=ut`
|
|
|
2247
2288
|
<slot></slot>
|
|
2248
2289
|
</dialog>
|
|
2249
2290
|
</template>
|
|
2250
|
-
`,
|
|
2251
|
-
class
|
|
2291
|
+
`,Xh=Symbol("user dismissed")
|
|
2292
|
+
class Yh 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
2293
|
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=
|
|
2254
|
-
const
|
|
2255
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2256
|
-
var
|
|
2294
|
+
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=Xh,!0}}zn([tt({attribute:"prevent-dismiss",mode:"boolean"})],Yh.prototype,"preventDismiss",void 0),de(Yh,Te)
|
|
2295
|
+
const Gh=Yh.compose({baseName:"dialog",template:Wh,styles:Kh,baseClass:Yh})
|
|
2296
|
+
Bi.getOrCreate().withPrefix("nimble").register(Gh())
|
|
2297
|
+
var Qh="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Jh={},Zh={},td={}
|
|
2257
2298
|
!function(t){var e
|
|
2258
2299
|
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={}))
|
|
2259
2300
|
var i=function(){function t(t,e,i){var s=this
|
|
@@ -2282,104 +2323,104 @@ return t.forEach((function(t){t.forEach((function(t,i){var s=t.offset
|
|
|
2282
2323
|
void 0===s&&(s=0===i?0:1,t.offset=s)
|
|
2283
2324
|
var o=s.toString()
|
|
2284
2325
|
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}()
|
|
2285
|
-
t.default=i}(
|
|
2286
|
-
var
|
|
2287
|
-
function i(){this.constructor=t}
|
|
2288
|
-
Object.defineProperty(
|
|
2289
|
-
var td
|
|
2290
|
-
return e.mode=
|
|
2291
|
-
|
|
2292
|
-
var
|
|
2326
|
+
t.default=i}(td)
|
|
2327
|
+
var ed,id=Qh&&Qh.__extends||(ed=function(t,e){return(ed=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")
|
|
2328
|
+
function i(){this.constructor=t}ed(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)})
|
|
2329
|
+
Object.defineProperty(Zh,"__esModule",{value:!0})
|
|
2330
|
+
var sd=td,od=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this
|
|
2331
|
+
return e.mode=sd.AnimationMode.animateTo,e}return id(e,t),e}(sd.default)
|
|
2332
|
+
Zh.default=od
|
|
2333
|
+
var nd={},rd=Qh&&Qh.__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)}
|
|
2293
2334
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2294
2335
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2295
|
-
Object.defineProperty(
|
|
2296
|
-
var
|
|
2297
|
-
return e.mode=
|
|
2298
|
-
|
|
2299
|
-
var
|
|
2300
|
-
Object.defineProperty(
|
|
2301
|
-
var
|
|
2302
|
-
this.pause=function(){(0,
|
|
2336
|
+
Object.defineProperty(nd,"__esModule",{value:!0})
|
|
2337
|
+
var ad=td,ld=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this
|
|
2338
|
+
return e.mode=ad.AnimationMode.animateFrom,e}return rd(e,t),e}(ad.default)
|
|
2339
|
+
nd.default=ld
|
|
2340
|
+
var cd={},hd={}
|
|
2341
|
+
Object.defineProperty(hd,"__esModule",{value:!0}),hd.invokeFunctionForEach=void 0,hd.invokeFunctionForEach=function(t,e){t.forEach((function(t){return t[e]()}))},Object.defineProperty(cd,"__esModule",{value:!0})
|
|
2342
|
+
var dd=hd,ud=function(){function t(t){var e=this
|
|
2343
|
+
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 Object.defineProperty(t.prototype,"onFinish",{get:function(){return this._onFinish},set:function(t){var e=this
|
|
2303
2344
|
this._onFinish=t
|
|
2304
2345
|
var i=this.getLongestAnimation()
|
|
2305
2346
|
if("function"==typeof i.onFinish){var s=i.onFinish
|
|
2306
|
-
i.onFinish=function(){s(),e._onFinish()}}else i.onFinish=this._onFinish},enumerable:!1,configurable:!0}),t.prototype.play=function(){(0,
|
|
2347
|
+
i.onFinish=function(){s(),e._onFinish()}}else i.onFinish=this._onFinish},enumerable:!1,configurable:!0}),t.prototype.play=function(){(0,dd.invokeFunctionForEach)(this.animations,"play")},t.prototype.reverse=function(){(0,dd.invokeFunctionForEach)(this.animations,"reverse")},t.prototype.getLongestAnimation=function(){var t=this
|
|
2307
2348
|
return this.animations.reduce((function(e,i){var s=t.getAnimationDuration(e.effectTiming)
|
|
2308
2349
|
return t.getAnimationDuration(i.effectTiming)>=s?i:e}))},t.prototype.getAnimationDuration=function(t){var e=t.duration,i="string"==typeof e?parseFloat(e):e
|
|
2309
2350
|
return(t.delay||0)+(i||0)},t}()
|
|
2310
|
-
|
|
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
|
|
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}()
|
|
2316
|
-
hd.default=ud
|
|
2351
|
+
cd.default=ud
|
|
2317
2352
|
var pd={}
|
|
2353
|
+
Object.defineProperty(pd,"__esModule",{value:!0})
|
|
2354
|
+
var vd=hd,gd=function(){function t(t){var e=this
|
|
2355
|
+
this.play=function(){e.applySequencedCallback(e.animations,"play")},this.reverse=function(){e.applySequencedCallback(e.animations.reverse(),"reverse")},this.pause=function(){(0,vd.invokeFunctionForEach)(e.animations,"pause")},this.finish=function(){(0,vd.invokeFunctionForEach)(e.animations,"finish")},this.cancel=function(){(0,vd.invokeFunctionForEach)(e.animations,"cancel")},this.animations=t}return t.prototype.applySequencedCallback=function(t,e){var i=this,s=t.length
|
|
2356
|
+
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}()
|
|
2357
|
+
pd.default=gd
|
|
2358
|
+
var md={}
|
|
2318
2359
|
!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.fadeOut=t.fadeIn=t.applyFade=t.fadeEffectTiming=t.fadeOutKeyframes=t.fadeInKeyframes=void 0
|
|
2319
|
-
var e=
|
|
2360
|
+
var e=Zh
|
|
2320
2361
|
function i(i,s,o){void 0===o&&(o={})
|
|
2321
2362
|
var n=Object.assign({},t.fadeEffectTiming,o),r=new e.default(i,null,n)
|
|
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)}}(
|
|
2323
|
-
var
|
|
2324
|
-
Object.defineProperty(
|
|
2325
|
-
var
|
|
2326
|
-
function
|
|
2363
|
+
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)}}(md)
|
|
2364
|
+
var fd={},bd={}
|
|
2365
|
+
Object.defineProperty(bd,"__esModule",{value:!0}),bd.navPane=bd.exponentialReversed=bd.fastInFortySevenPercent=bd.exponential=bd.fastInOut=bd.fastOut=bd.fastIn=bd.appToApp=bd.backToApp=bd.drillIn=bd.easeIn=bd.easeOutSmooth=bd.easeOut=bd.linear=void 0,bd.linear=[[0,0],[1,1]],bd.easeOut=[[0,0],[.58,1]],bd.easeOutSmooth=[[0,.35],[.15,1]],bd.easeIn=[[.25,.1],[.25,1]],bd.drillIn=[[.17,.17],[0,1]],bd.backToApp=[[.5,0],[.6,1]],bd.appToApp=[[.5,0],[1,.9]],bd.fastIn=[[.1,.9],[.2,1]],bd.fastOut=[[.9,.1],[1,.2]],bd.fastInOut=[[.8,0],[.2,1]],bd.exponential=[[.1,.25],[.75,.9]],bd.fastInFortySevenPercent=[[.11,.5],[.24,.96]],bd.exponentialReversed=[[.25,.1],[.9,.75]],bd.navPane=[[.1,.7],[.1,1]],Object.defineProperty(fd,"__esModule",{value:!0}),fd.cubicBezier=fd.formatCubicBezier=void 0
|
|
2366
|
+
var wd=bd
|
|
2367
|
+
function xd(t){if(!Array.isArray(t)||!Array.isArray(t[0])||!Array.isArray(t[1]))return""
|
|
2327
2368
|
var e=t[0],i=t[1]
|
|
2328
|
-
return"cubic-bezier(".concat(e[0],", ").concat(e[1],", ").concat(i[0],", ").concat(i[1],")")}
|
|
2329
|
-
var
|
|
2330
|
-
Object.defineProperty(
|
|
2369
|
+
return"cubic-bezier(".concat(e[0],", ").concat(e[1],", ").concat(i[0],", ").concat(i[1],")")}fd.formatCubicBezier=xd,fd.cubicBezier=function(t){return t in wd?xd(wd[t]):""}
|
|
2370
|
+
var yd={},$d={}
|
|
2371
|
+
Object.defineProperty($d,"__esModule",{value:!0}),$d.default=function(t){var e=t.getBoundingClientRect()
|
|
2331
2372
|
return e.bottom>=0&&e.right>=0&&e.top<=window.innerHeight&&e.left<=window.innerWidth}
|
|
2332
|
-
var
|
|
2333
|
-
Object.defineProperty(
|
|
2334
|
-
var
|
|
2335
|
-
this.subscriptions=[],this.scrollDistance=0,this.requestFrame=function(){t.requestedFrame&&cancelAnimationFrame(t.requestedFrame),t.requestedFrame=requestAnimationFrame(t.update)},this.lastScrollY=(0,
|
|
2373
|
+
var Cd={},kd={}
|
|
2374
|
+
Object.defineProperty(kd,"__esModule",{value:!0}),kd.default=function(){return"undefined"==typeof window?NaN:void 0!==window.scrollY?window.scrollY:window.pageYOffset},Object.defineProperty(Cd,"__esModule",{value:!0})
|
|
2375
|
+
var _d=$d,zd=kd,Id=function(){function t(){var t=this
|
|
2376
|
+
this.subscriptions=[],this.scrollDistance=0,this.requestFrame=function(){t.requestedFrame&&cancelAnimationFrame(t.requestedFrame),t.requestedFrame=requestAnimationFrame(t.update)},this.lastScrollY=(0,zd.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,zd.default)()
|
|
2336
2377
|
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}()
|
|
2337
|
-
|
|
2338
|
-
var
|
|
2378
|
+
Cd.default=Id
|
|
2379
|
+
var Od=Qh&&Qh.__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)}
|
|
2339
2380
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2340
2381
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2341
|
-
Object.defineProperty(
|
|
2342
|
-
var
|
|
2343
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t){var i=(0,
|
|
2344
|
-
i&&t.callback(e.scrollDistance),i!==t.inView&&(t.inView=i)}))},e}(
|
|
2345
|
-
|
|
2346
|
-
var
|
|
2382
|
+
Object.defineProperty(yd,"__esModule",{value:!0})
|
|
2383
|
+
var Ad=$d,Sd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Od(e,t),e.prototype.update=function(){var e=this
|
|
2384
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t){var i=(0,Ad.default)(t.element)
|
|
2385
|
+
i&&t.callback(e.scrollDistance),i!==t.inView&&(t.inView=i)}))},e}(Cd.default)
|
|
2386
|
+
yd.default=Sd
|
|
2387
|
+
var Ed={},Hd=Qh&&Qh.__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)}
|
|
2347
2388
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2348
2389
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2349
|
-
Object.defineProperty(
|
|
2350
|
-
var
|
|
2351
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,
|
|
2352
|
-
s&&!t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(
|
|
2353
|
-
|
|
2354
|
-
var
|
|
2390
|
+
Object.defineProperty(Ed,"__esModule",{value:!0})
|
|
2391
|
+
var Md=$d,Vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Hd(e,t),e.prototype.update=function(){var e=this
|
|
2392
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,Md.default)(t.element)
|
|
2393
|
+
s&&!t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(Cd.default)
|
|
2394
|
+
Ed.default=Vd
|
|
2395
|
+
var Ld={},Td=Qh&&Qh.__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)}
|
|
2355
2396
|
return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null")
|
|
2356
2397
|
function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}()
|
|
2357
|
-
Object.defineProperty(
|
|
2358
|
-
var
|
|
2359
|
-
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,
|
|
2360
|
-
!s&&t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(
|
|
2361
|
-
|
|
2362
|
-
var e=
|
|
2398
|
+
Object.defineProperty(Ld,"__esModule",{value:!0})
|
|
2399
|
+
var Pd=$d,Rd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Td(e,t),e.prototype.update=function(){var e=this
|
|
2400
|
+
t.prototype.update.call(this),this.subscriptions.forEach((function(t,i){var s=(0,Pd.default)(t.element)
|
|
2401
|
+
!s&&t.inView&&t.callback(e.scrollDistance),s!==t.inView&&(t.inView=s)}))},e}(Cd.default)
|
|
2402
|
+
Ld.default=Rd,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
|
|
2403
|
+
var e=Zh
|
|
2363
2404
|
t.AnimateTo=e.default
|
|
2364
|
-
var i=
|
|
2405
|
+
var i=nd
|
|
2365
2406
|
t.AnimateFrom=i.default
|
|
2366
|
-
var s=
|
|
2407
|
+
var s=cd
|
|
2367
2408
|
t.AnimateGroup=s.default
|
|
2368
|
-
var o=
|
|
2409
|
+
var o=pd
|
|
2369
2410
|
t.AnimateSequence=o.default
|
|
2370
|
-
var n=
|
|
2411
|
+
var n=td
|
|
2371
2412
|
t.Animate=n.default
|
|
2372
|
-
var r=
|
|
2413
|
+
var r=md
|
|
2373
2414
|
Object.defineProperty(t,"fadeIn",{enumerable:!0,get:function(){return r.fadeIn}}),Object.defineProperty(t,"fadeOut",{enumerable:!0,get:function(){return r.fadeOut}})
|
|
2374
|
-
var a=
|
|
2415
|
+
var a=fd
|
|
2375
2416
|
Object.defineProperty(t,"cubicBezier",{enumerable:!0,get:function(){return a.cubicBezier}})
|
|
2376
|
-
var l=
|
|
2417
|
+
var l=yd
|
|
2377
2418
|
t.ScrollTrigger=l.default
|
|
2378
|
-
var c=
|
|
2419
|
+
var c=Ed
|
|
2379
2420
|
t.ViewEnterTrigger=c.default
|
|
2380
|
-
var h=
|
|
2381
|
-
t.ViewExitTrigger=h.default}(
|
|
2382
|
-
const
|
|
2421
|
+
var h=Ld
|
|
2422
|
+
t.ViewExitTrigger=h.default}(Jh)
|
|
2423
|
+
const Dd=window.matchMedia("(prefers-reduced-motion: reduce)"),Fd={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"}},Bd=ut`
|
|
2383
2424
|
${Zs("block")}
|
|
2384
2425
|
|
|
2385
2426
|
:host {
|
|
@@ -2484,30 +2525,30 @@ const Td=window.matchMedia("(prefers-reduced-motion: reduce)"),Pd={slideLeftKeyf
|
|
|
2484
2525
|
justify-content: flex-end;
|
|
2485
2526
|
border-top: ${Zn} solid ${Xn};
|
|
2486
2527
|
}
|
|
2487
|
-
`,
|
|
2488
|
-
class
|
|
2528
|
+
`,Nd="left",jd="right",qd="opening",Ud="opened",Kd="closing",Wd="closed"
|
|
2529
|
+
class Xd extends ts{constructor(){super(...arguments),this.location=Nd,this.state=Wd,this.preventDismiss=!1,this.propertiesToWatch=["hidden","location","state"],this.animationDurationMilliseconds=.001}connectedCallback(){this.trapFocus=!1,super.connectedCallback(),this.updateAnimationDuration(),this.animationsEnabledChangedHandler=()=>this.updateAnimationDuration(),Dd.addEventListener("change",this.animationsEnabledChangedHandler),this.onStateChanged()
|
|
2489
2530
|
const t=p.getNotifier(this),e={handleChange:(t,e)=>this.onPropertyChange(e)}
|
|
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&&(
|
|
2531
|
+
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&&(Dd.removeEventListener("change",this.animationsEnabledChangedHandler),this.animationsEnabledChangedHandler=void 0)}show(){this.state=qd}hide(){this.state=Kd}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()
|
|
2491
2532
|
break
|
|
2492
2533
|
case"location":this.onLocationChanged()
|
|
2493
2534
|
break
|
|
2494
|
-
case"state":this.onStateChanged()}}onHiddenChanged(){this.hidden&&this.state!==
|
|
2535
|
+
case"state":this.onStateChanged()}}onHiddenChanged(){this.hidden&&this.state!==Wd?this.state=Wd:this.hidden||this.state!==Wd||(this.state=Ud)}onLocationChanged(){this.cancelCurrentAnimation()}onStateChanged(){if(this.isConnected){switch(this.cancelCurrentAnimation(),this.state){case qd:this.animateOpening(),this.hidden=!1
|
|
2495
2536
|
break
|
|
2496
|
-
case
|
|
2537
|
+
case Ud:this.hidden=!1
|
|
2497
2538
|
break
|
|
2498
|
-
case
|
|
2539
|
+
case Kd:this.hidden=!1,this.animateClosing()
|
|
2499
2540
|
break
|
|
2500
|
-
case
|
|
2541
|
+
case Wd:this.hidden=!0
|
|
2501
2542
|
break
|
|
2502
|
-
default:throw new Error("Unsupported state value. Expected: opening/opened/closing/closed")}this.$emit("state-change")}}updateAnimationDuration(){if(
|
|
2543
|
+
default:throw new Error("Unsupported state value. Expected: opening/opened/closing/closed")}this.$emit("state-change")}}updateAnimationDuration(){if(Dd.matches)this.animationDurationMilliseconds=.001
|
|
2503
2544
|
else{const t=$a.getValueFor(this),e=parseFloat(t)
|
|
2504
|
-
this.animationDurationMilliseconds=1e3*e}}animateOpening(){this.animateOpenClose(!0)}animateClosing(){this.hidden?this.state=
|
|
2545
|
+
this.animationDurationMilliseconds=1e3*e}}animateOpening(){this.animateOpenClose(!0)}animateClosing(){this.hidden?this.state=Wd:this.animateOpenClose(!1)}animateOpenClose(t){const e={...t?Fd.slideInOptions:Fd.slideOutOptions,duration:this.animationDurationMilliseconds},i=this.location===jd?Fd.slideRightKeyframes:Fd.slideLeftKeyframes,s=new Jh.AnimateTo(this.dialog,void 0,e)
|
|
2505
2546
|
s.addKeyframes(i)
|
|
2506
2547
|
const o=[s],n=this.shadowRoot?.querySelector(".overlay")
|
|
2507
|
-
if(n){const t=new
|
|
2508
|
-
t.addKeyframes(
|
|
2509
|
-
r.onFinish=()=>{this.state=t?
|
|
2510
|
-
const
|
|
2548
|
+
if(n){const t=new Jh.AnimateTo(n,void 0,e)
|
|
2549
|
+
t.addKeyframes(Fd.fadeOverlayKeyframes),o.push(t)}const r=new Jh.AnimateGroup(o)
|
|
2550
|
+
r.onFinish=()=>{this.state=t?Ud:Wd},this.animationGroup=r,r.play()}cancelCurrentAnimation(){this.animationGroup?.cancel()}}zn([tt],Xd.prototype,"location",void 0),zn([tt],Xd.prototype,"state",void 0),zn([tt({attribute:"prevent-dismiss",mode:"boolean"})],Xd.prototype,"preventDismiss",void 0)
|
|
2551
|
+
const Yd=Xd.compose({baseName:"drawer",template:(t,e)=>q`
|
|
2511
2552
|
<div class="positioning-region" part="positioning-region">
|
|
2512
2553
|
${gt((t=>t.modal),q`
|
|
2513
2554
|
<div
|
|
@@ -2531,8 +2572,8 @@ const Kd=Ud.compose({baseName:"drawer",template:(t,e)=>q`
|
|
|
2531
2572
|
<slot></slot>
|
|
2532
2573
|
</div>
|
|
2533
2574
|
</div>
|
|
2534
|
-
`,styles:
|
|
2535
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2575
|
+
`,styles:Bd})
|
|
2576
|
+
Bi.getOrCreate().withPrefix("nimble").register(Yd())
|
|
2536
2577
|
Th("icon-add",class extends Lh{constructor(){super(La)}})
|
|
2537
2578
|
Th("icon-arrow-down-right-and-arrow-up-left",class extends Lh{constructor(){super(Ta)}})
|
|
2538
2579
|
Th("icon-arrow-expander-left",class extends Lh{constructor(){super(Ra)}})
|
|
@@ -2614,7 +2655,7 @@ Th("icon-hashtag",class extends Lh{constructor(){super(rc)}})
|
|
|
2614
2655
|
Th("icon-home",class extends Lh{constructor(){super(ac)}})
|
|
2615
2656
|
Th("icon-hourglass",class extends Lh{constructor(){super(lc)}})
|
|
2616
2657
|
Th("icon-indeterminant-checkbox",class extends Lh{constructor(){super(cc)}})
|
|
2617
|
-
class
|
|
2658
|
+
class Gd extends Lh{constructor(){super(hc)}}Th("icon-info",Gd)
|
|
2618
2659
|
Th("icon-info-circle",class extends Lh{constructor(){super(dc)}})
|
|
2619
2660
|
Th("icon-key",class extends Lh{constructor(){super(uc)}})
|
|
2620
2661
|
Th("icon-laptop",class extends Lh{constructor(){super(pc)}})
|
|
@@ -2673,7 +2714,7 @@ Th("icon-window-text",class extends Lh{constructor(){super(dh)}})
|
|
|
2673
2714
|
Th("icon-wrench-hammer",class extends Lh{constructor(){super(uh)}})
|
|
2674
2715
|
Th("icon-xmark",class extends Lh{constructor(){super(ph)}})
|
|
2675
2716
|
Th("icon-xmark-check",class extends Lh{constructor(){super(vh)}})
|
|
2676
|
-
const
|
|
2717
|
+
const Qd=ut`
|
|
2677
2718
|
${Zs("flex")}
|
|
2678
2719
|
|
|
2679
2720
|
:host {
|
|
@@ -2728,7 +2769,7 @@ const Xd=ut`
|
|
|
2728
2769
|
outline: none;
|
|
2729
2770
|
}
|
|
2730
2771
|
`
|
|
2731
|
-
const
|
|
2772
|
+
const Jd=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`
|
|
2732
2773
|
<template
|
|
2733
2774
|
aria-checked="${t=>t.ariaChecked}"
|
|
2734
2775
|
aria-disabled="${t=>t.ariaDisabled}"
|
|
@@ -2744,9 +2785,9 @@ const Yd=class extends oi{get value(){return super.value}set value(t){super.valu
|
|
|
2744
2785
|
</span>
|
|
2745
2786
|
${Ct(0,e)}
|
|
2746
2787
|
</template>
|
|
2747
|
-
`,styles:
|
|
2748
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2749
|
-
const
|
|
2788
|
+
`,styles:Qd})
|
|
2789
|
+
Bi.getOrCreate().withPrefix("nimble").register(Jd())
|
|
2790
|
+
const Zd=ut`
|
|
2750
2791
|
${Zs("grid")}
|
|
2751
2792
|
|
|
2752
2793
|
:host {
|
|
@@ -2782,7 +2823,7 @@ const Gd=ut`
|
|
|
2782
2823
|
padding-bottom: ${Gn};
|
|
2783
2824
|
}
|
|
2784
2825
|
`
|
|
2785
|
-
const
|
|
2826
|
+
const tu=class extends as{}.compose({baseName:"menu",baseClass:as,template:(t,e)=>q`
|
|
2786
2827
|
<template
|
|
2787
2828
|
slot="${t=>t.slot?t.slot:t.isNestedMenu()?"submenu":void 0}"
|
|
2788
2829
|
role="menu"
|
|
@@ -2791,9 +2832,9 @@ const Qd=class extends as{}.compose({baseName:"menu",baseClass:as,template:(t,e)
|
|
|
2791
2832
|
>
|
|
2792
2833
|
<slot ${wt("items")}></slot>
|
|
2793
2834
|
</template>
|
|
2794
|
-
`,styles:
|
|
2795
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2796
|
-
const
|
|
2835
|
+
`,styles:Zd})
|
|
2836
|
+
Bi.getOrCreate().withPrefix("nimble").register(tu())
|
|
2837
|
+
const eu=ut`
|
|
2797
2838
|
${Zs("inline-block")}
|
|
2798
2839
|
|
|
2799
2840
|
:host {
|
|
@@ -2809,7 +2850,7 @@ const Jd=ut`
|
|
|
2809
2850
|
margin-top: ${Gn};
|
|
2810
2851
|
margin-bottom: ${Gn};
|
|
2811
2852
|
}
|
|
2812
|
-
`,
|
|
2853
|
+
`,iu=ut`
|
|
2813
2854
|
${Ch}
|
|
2814
2855
|
|
|
2815
2856
|
.control[aria-pressed='true'] {
|
|
@@ -2835,8 +2876,8 @@ const Jd=ut`
|
|
|
2835
2876
|
border-color: ${Tn};
|
|
2836
2877
|
}
|
|
2837
2878
|
`
|
|
2838
|
-
class
|
|
2839
|
-
const
|
|
2879
|
+
class su extends Cs{constructor(){super(...arguments),this.appearance=xh,this.contentHidden=!1}}zn([tt],su.prototype,"appearance",void 0),zn([tt({attribute:"content-hidden",mode:"boolean"})],su.prototype,"contentHidden",void 0),de(su,$t,Ze)
|
|
2880
|
+
const ou=su.compose({baseName:"toggle-button",template:(t,e)=>q`
|
|
2840
2881
|
<div
|
|
2841
2882
|
role="button"
|
|
2842
2883
|
part="control"
|
|
@@ -2877,22 +2918,22 @@ const eu=tu.compose({baseName:"toggle-button",template:(t,e)=>q`
|
|
|
2877
2918
|
</span>
|
|
2878
2919
|
${Ct(0,e)}
|
|
2879
2920
|
</div>
|
|
2880
|
-
`,styles:
|
|
2881
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2882
|
-
const
|
|
2883
|
-
class
|
|
2921
|
+
`,styles:iu,shadowOptions:{delegatesFocus:!0}})
|
|
2922
|
+
Bi.getOrCreate().withPrefix("nimble").register(ou())
|
|
2923
|
+
const nu="auto"
|
|
2924
|
+
class ru extends le{constructor(){super(...arguments),this.appearance=xh,this.disabled=!1,this.contentHidden=!1,this.open=!1,this.position=nu,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
|
|
2884
2925
|
const e=t.relatedTarget
|
|
2885
2926
|
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
|
|
2886
2927
|
case xe:return this.open=!0,!1
|
|
2887
2928
|
default:return!0}}menuKeyDownHandler(t){switch(t.key){case _e:return this.open=!1,this.toggleButton.focus(),!1
|
|
2888
2929
|
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]")
|
|
2889
|
-
if(t?.length){t[t.length-1].focus()}}}zn([tt],
|
|
2890
|
-
const
|
|
2930
|
+
if(t?.length){t[t.length-1].focus()}}}zn([tt],ru.prototype,"appearance",void 0),zn([tt({mode:"boolean"})],ru.prototype,"disabled",void 0),zn([tt({attribute:"content-hidden",mode:"boolean"})],ru.prototype,"contentHidden",void 0),zn([tt({mode:"boolean"})],ru.prototype,"open",void 0),zn([tt({attribute:"position"})],ru.prototype,"position",void 0),zn([v],ru.prototype,"toggleButton",void 0),zn([v],ru.prototype,"region",void 0),zn([v],ru.prototype,"slottedMenus",void 0)
|
|
2931
|
+
const au=ru.compose({baseName:"menu-button",template:t=>q`
|
|
2891
2932
|
<template
|
|
2892
2933
|
?open="${t=>t.open}"
|
|
2893
2934
|
@focusout="${(t,e)=>t.focusoutHandler(e.event)}"
|
|
2894
2935
|
>
|
|
2895
|
-
<${t.tagFor(
|
|
2936
|
+
<${t.tagFor(su)}
|
|
2896
2937
|
part="button"
|
|
2897
2938
|
appearance="${t=>t.appearance}"
|
|
2898
2939
|
?content-hidden="${t=>t.contentHidden}"
|
|
@@ -2909,7 +2950,7 @@ const ou=su.compose({baseName:"menu-button",template:t=>q`
|
|
|
2909
2950
|
<slot slot="start" name="start"></slot>
|
|
2910
2951
|
<slot></slot>
|
|
2911
2952
|
<slot slot="end" name="end"></slot>
|
|
2912
|
-
</${t.tagFor(
|
|
2953
|
+
</${t.tagFor(su)}>
|
|
2913
2954
|
${gt((t=>t.open),q`
|
|
2914
2955
|
<${t.tagFor(io)}
|
|
2915
2956
|
fixed-placement="true"
|
|
@@ -2928,9 +2969,9 @@ const ou=su.compose({baseName:"menu-button",template:t=>q`
|
|
|
2928
2969
|
</${t.tagFor(io)}>
|
|
2929
2970
|
`)}
|
|
2930
2971
|
</template>
|
|
2931
|
-
`,styles:
|
|
2932
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
2933
|
-
const
|
|
2972
|
+
`,styles:eu,shadowOptions:{delegatesFocus:!0}})
|
|
2973
|
+
Bi.getOrCreate().withPrefix("nimble").register(au())
|
|
2974
|
+
const lu=ut`
|
|
2934
2975
|
${Zs("grid")}
|
|
2935
2976
|
|
|
2936
2977
|
:host {
|
|
@@ -3009,7 +3050,7 @@ const nu=ut`
|
|
|
3009
3050
|
grid-column: 3;
|
|
3010
3051
|
}
|
|
3011
3052
|
`
|
|
3012
|
-
const
|
|
3053
|
+
const cu=class extends rs{}.compose({baseName:"menu-item",baseClass:rs,template:(t,e)=>q`
|
|
3013
3054
|
<template
|
|
3014
3055
|
role="${t=>t.role}"
|
|
3015
3056
|
aria-haspopup="${t=>t.hasSubmenu?"menu":void 0}"
|
|
@@ -3076,11 +3117,11 @@ const ru=class extends rs{}.compose({baseName:"menu-item",baseClass:rs,template:
|
|
|
3076
3117
|
</${t.tagFor(Fe)}>
|
|
3077
3118
|
`)}
|
|
3078
3119
|
</template>
|
|
3079
|
-
`,styles:
|
|
3080
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3081
|
-
const
|
|
3120
|
+
`,styles:lu,expandCollapseGlyph:Da.data})
|
|
3121
|
+
Bi.getOrCreate().withPrefix("nimble").register(cu())
|
|
3122
|
+
const hu="underline",du="outline",uu="block",pu=ut`
|
|
3082
3123
|
${Zs("inline-block")}
|
|
3083
|
-
${
|
|
3124
|
+
${Nh}
|
|
3084
3125
|
|
|
3085
3126
|
:host {
|
|
3086
3127
|
font: ${zr};
|
|
@@ -3227,12 +3268,12 @@ const au="underline",lu="outline",cu="block",hu=ut`
|
|
|
3227
3268
|
order: 1;
|
|
3228
3269
|
padding-right: calc(${Qn} / 4);
|
|
3229
3270
|
}
|
|
3230
|
-
`.withBehaviors(wh(
|
|
3271
|
+
`.withBehaviors(wh(hu,ut`
|
|
3231
3272
|
.root {
|
|
3232
3273
|
border-bottom-width: ${Zn};
|
|
3233
3274
|
padding-bottom: 0;
|
|
3234
3275
|
}
|
|
3235
|
-
`),wh(
|
|
3276
|
+
`),wh(uu,ut`
|
|
3236
3277
|
.root {
|
|
3237
3278
|
background-color: rgba(${Fn}, 0.1);
|
|
3238
3279
|
}
|
|
@@ -3250,14 +3291,14 @@ const au="underline",lu="outline",cu="block",hu=ut`
|
|
|
3250
3291
|
:host([disabled]) .root {
|
|
3251
3292
|
background-color: rgba(${Fn}, 0.07);
|
|
3252
3293
|
}
|
|
3253
|
-
`),wh(
|
|
3294
|
+
`),wh(du,ut`
|
|
3254
3295
|
.root {
|
|
3255
3296
|
border-width: ${Zn};
|
|
3256
3297
|
padding: 0;
|
|
3257
3298
|
}
|
|
3258
3299
|
`))
|
|
3259
|
-
class
|
|
3260
|
-
const
|
|
3300
|
+
class vu extends gs{constructor(){super(...arguments),this.appearance=hu}connectedCallback(){super.connectedCallback(),this.control.setAttribute("role","spinbutton")}}zn([tt],vu.prototype,"appearance",void 0),zn([tt({attribute:"error-text"})],vu.prototype,"errorText",void 0)
|
|
3301
|
+
const gu=vu.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
3261
3302
|
<template class="${t=>t.readOnly?"readonly":""}">
|
|
3262
3303
|
<label
|
|
3263
3304
|
part="label"
|
|
@@ -3332,7 +3373,7 @@ const uu=du.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
|
3332
3373
|
${Ct(0,e)}
|
|
3333
3374
|
</div>
|
|
3334
3375
|
</template>
|
|
3335
|
-
`,styles:
|
|
3376
|
+
`,styles:pu,shadowOptions:{delegatesFocus:!0},stepDownGlyph:q`
|
|
3336
3377
|
<nimble-button
|
|
3337
3378
|
class="step-up-down-button"
|
|
3338
3379
|
appearance="ghost"
|
|
@@ -3358,42 +3399,11 @@ const uu=du.compose({baseName:"number-field",baseClass:gs,template:(t,e)=>q`
|
|
|
3358
3399
|
></nimble-icon-exclamation-mark>
|
|
3359
3400
|
${Hh}
|
|
3360
3401
|
`})
|
|
3361
|
-
Bi.getOrCreate().withPrefix("nimble").register(
|
|
3362
|
-
const
|
|
3363
|
-
${
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
padding-top: ${Zn};
|
|
3367
|
-
padding-left: calc(${Zn} + ${Qn} / 2);
|
|
3368
|
-
padding-right: ${Zn};
|
|
3369
|
-
}
|
|
3370
|
-
|
|
3371
|
-
:host([disabled]) .control {
|
|
3372
|
-
border-color: rgba(${Fn}, 0.1);
|
|
3373
|
-
}
|
|
3374
|
-
`),wh(vu,ut`
|
|
3375
|
-
.control {
|
|
3376
|
-
border: ${Zn} solid rgba(${Fn}, 0.3);
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
:host(.invalid) .errortext {
|
|
3380
|
-
top: calc(${Yn} - ${Zn});
|
|
3381
|
-
}
|
|
3382
|
-
`),wh(gu,ut`
|
|
3383
|
-
.control {
|
|
3384
|
-
background-color: rgba(${Fn}, 0.1);
|
|
3385
|
-
padding-left: calc(${Zn} + ${Qn} / 2);
|
|
3386
|
-
padding-right: ${Zn};
|
|
3387
|
-
padding-bottom: calc(${Zn});
|
|
3388
|
-
border-bottom: ${Zn}
|
|
3389
|
-
rgba(${Fn}, 0.07);
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
:host([disabled]) .control {
|
|
3393
|
-
background-color: rgba(${Fn}, 0.07);
|
|
3394
|
-
}
|
|
3395
|
-
`))
|
|
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
|
|
3402
|
+
Bi.getOrCreate().withPrefix("nimble").register(gu())
|
|
3403
|
+
const mu=ut`
|
|
3404
|
+
${Bh}
|
|
3405
|
+
`
|
|
3406
|
+
class fu extends ws{constructor(){super(...arguments),this.appearance=Rh}setPositioning(){this.$fastController.isConnected&&(super.setPositioning(),this.updateListboxMaxHeightCssVariable())}slottedOptionsChanged(t,e){const i=this.value
|
|
3397
3407
|
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
3408
|
const bu=fu.compose({baseName:"select",baseClass:ws,template:(t,e)=>q`
|
|
3399
3409
|
<template
|
|
@@ -4006,7 +4016,7 @@ const Lu=Vu.compose({baseName:"text-area",baseClass:Es,template:(t,e)=>q`
|
|
|
4006
4016
|
Bi.getOrCreate().withPrefix("nimble").register(Lu())
|
|
4007
4017
|
const Tu="underline",Pu="outline",Ru="block",Du="frameless",Fu=ut`
|
|
4008
4018
|
${Zs("inline-block")}
|
|
4009
|
-
${
|
|
4019
|
+
${Nh}
|
|
4010
4020
|
|
|
4011
4021
|
:host {
|
|
4012
4022
|
font: ${zr};
|
|
@@ -4459,7 +4469,7 @@ const Ku=class extends Ys{}.compose({baseName:"tooltip",baseClass:Ys,template:t=
|
|
|
4459
4469
|
>
|
|
4460
4470
|
<div class="tooltip" part="tooltip" role="tooltip">
|
|
4461
4471
|
<${t.tagFor(Ph)} class="fail status-icon"></${t.tagFor(Ph)}>
|
|
4462
|
-
<${t.tagFor(
|
|
4472
|
+
<${t.tagFor(Gd)} class="information status-icon"></${t.tagFor(Gd)}>
|
|
4463
4473
|
<slot></slot>
|
|
4464
4474
|
</div>
|
|
4465
4475
|
</${t.tagFor(io)}>
|