@ni/nimble-components 9.0.2 → 10.0.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 +79 -86
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +798 -807
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/button/index.js +1 -1
- package/dist/esm/button/styles.js +2 -2
- package/dist/esm/button/types.d.ts +0 -1
- package/dist/esm/button/types.js.map +1 -1
- package/dist/esm/drawer/index.js +16 -16
- package/dist/esm/drawer/types.d.ts +12 -12
- package/dist/esm/drawer/types.js +10 -12
- package/dist/esm/drawer/types.js.map +1 -1
- package/dist/esm/icon-base/types.d.ts +7 -7
- package/dist/esm/icon-base/types.js +6 -7
- package/dist/esm/icon-base/types.js.map +1 -1
- package/dist/esm/menu-button/index.js +1 -1
- package/dist/esm/menu-button/template.d.ts +3 -1
- package/dist/esm/menu-button/template.js +7 -5
- package/dist/esm/menu-button/template.js.map +1 -1
- package/dist/esm/menu-button/types.d.ts +0 -1
- package/dist/esm/menu-button/types.js +4 -1
- package/dist/esm/menu-button/types.js.map +1 -1
- package/dist/esm/nimble-components/src/button/types.d.ts +0 -1
- package/dist/esm/nimble-components/src/drawer/types.d.ts +12 -12
- package/dist/esm/nimble-components/src/icon-base/types.d.ts +7 -7
- package/dist/esm/nimble-components/src/menu-button/template.d.ts +3 -1
- package/dist/esm/nimble-components/src/menu-button/types.d.ts +0 -1
- package/dist/esm/nimble-components/src/patterns/button/types.d.ts +6 -6
- package/dist/esm/nimble-components/src/text-area/types.d.ts +5 -6
- package/dist/esm/nimble-components/src/text-field/types.d.ts +7 -14
- package/dist/esm/nimble-components/src/theme-provider/types.d.ts +6 -6
- package/dist/esm/nimble-components/src/toggle-button/types.d.ts +0 -1
- package/dist/esm/nimble-components/src/tree-view/types.d.ts +6 -6
- package/dist/esm/nimble-components/src/utilities/style/theme.d.ts +5 -5
- package/dist/esm/patterns/button/styles.js +3 -3
- package/dist/esm/patterns/button/types.d.ts +6 -6
- package/dist/esm/patterns/button/types.js +5 -6
- package/dist/esm/patterns/button/types.js.map +1 -1
- package/dist/esm/text-area/index.js +1 -1
- package/dist/esm/text-area/styles.js +2 -2
- package/dist/esm/text-area/types.d.ts +5 -6
- package/dist/esm/text-area/types.js +4 -5
- package/dist/esm/text-area/types.js.map +1 -1
- package/dist/esm/text-field/index.js +1 -1
- package/dist/esm/text-field/styles.js +5 -5
- package/dist/esm/text-field/types.d.ts +7 -14
- package/dist/esm/text-field/types.js +6 -7
- package/dist/esm/text-field/types.js.map +1 -1
- package/dist/esm/theme-provider/design-tokens.js +3 -3
- package/dist/esm/theme-provider/index.js +2 -2
- package/dist/esm/theme-provider/types.d.ts +6 -6
- package/dist/esm/theme-provider/types.js +5 -6
- package/dist/esm/theme-provider/types.js.map +1 -1
- package/dist/esm/toggle-button/index.js +1 -1
- package/dist/esm/toggle-button/types.d.ts +0 -1
- package/dist/esm/toggle-button/types.js +4 -0
- package/dist/esm/toggle-button/types.js.map +1 -1
- package/dist/esm/tree-view/index.js +4 -4
- package/dist/esm/tree-view/types.d.ts +6 -6
- package/dist/esm/tree-view/types.js +5 -6
- package/dist/esm/tree-view/types.js.map +1 -1
- package/dist/esm/utilities/style/theme.d.ts +5 -5
- package/dist/esm/utilities/style/theme.js +3 -3
- package/dist/esm/utilities/style/theme.js.map +1 -1
- package/dist/tokens.scss +1 -1
- package/package.json +1 -1
|
@@ -13223,12 +13223,11 @@
|
|
|
13223
13223
|
return {red, green, blue, alpha};
|
|
13224
13224
|
}
|
|
13225
13225
|
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
})(Theme || (Theme = {}));
|
|
13226
|
+
const Theme = {
|
|
13227
|
+
light: 'light',
|
|
13228
|
+
dark: 'dark',
|
|
13229
|
+
color: 'color'
|
|
13230
|
+
};
|
|
13232
13231
|
|
|
13233
13232
|
/**
|
|
13234
13233
|
* Design token names should follow the token naming convention:
|
|
@@ -13435,7 +13434,7 @@
|
|
|
13435
13434
|
const theme = DesignToken.create({
|
|
13436
13435
|
name: 'theme',
|
|
13437
13436
|
cssCustomPropertyName: null
|
|
13438
|
-
}).withDefault(Theme.
|
|
13437
|
+
}).withDefault(Theme.light);
|
|
13439
13438
|
/**
|
|
13440
13439
|
* The ThemeProvider implementation. Add this component to the page and set its `theme` attribute to control
|
|
13441
13440
|
* the values of design tokens that provide colors and fonts as CSS custom properties to any descendant components.
|
|
@@ -13445,7 +13444,7 @@
|
|
|
13445
13444
|
constructor() {
|
|
13446
13445
|
super(...arguments);
|
|
13447
13446
|
this.direction = Direction.ltr;
|
|
13448
|
-
this.theme = Theme.
|
|
13447
|
+
this.theme = Theme.light;
|
|
13449
13448
|
}
|
|
13450
13449
|
directionChanged(_prev, next) {
|
|
13451
13450
|
if (next !== undefined && next !== null) {
|
|
@@ -13586,11 +13585,11 @@
|
|
|
13586
13585
|
}
|
|
13587
13586
|
function getColorForTheme(element, lightThemeColor, darkThemeColor, colorThemeColor) {
|
|
13588
13587
|
switch (theme.getValueFor(element)) {
|
|
13589
|
-
case Theme.
|
|
13588
|
+
case Theme.light:
|
|
13590
13589
|
return lightThemeColor;
|
|
13591
|
-
case Theme.
|
|
13590
|
+
case Theme.dark:
|
|
13592
13591
|
return darkThemeColor;
|
|
13593
|
-
case Theme.
|
|
13592
|
+
case Theme.color:
|
|
13594
13593
|
return colorThemeColor;
|
|
13595
13594
|
default:
|
|
13596
13595
|
return lightThemeColor;
|
|
@@ -13717,9 +13716,9 @@
|
|
|
13717
13716
|
* css`
|
|
13718
13717
|
* // ...
|
|
13719
13718
|
* `.withBehaviors(new ThemeStyleSheetBehavior(
|
|
13720
|
-
* css`:host { ... Theme.
|
|
13721
|
-
* null, // No style needed for Theme.
|
|
13722
|
-
* Theme.
|
|
13719
|
+
* css`:host { ... Theme.light style... }`),
|
|
13720
|
+
* null, // No style needed for Theme.dark style
|
|
13721
|
+
* Theme.light // For the Theme.color style, re-use the previously set Theme.light style
|
|
13723
13722
|
* )
|
|
13724
13723
|
* ```
|
|
13725
13724
|
*/
|
|
@@ -14478,12 +14477,11 @@
|
|
|
14478
14477
|
* Types of button appearance.
|
|
14479
14478
|
* @public
|
|
14480
14479
|
*/
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
})(ButtonAppearance || (ButtonAppearance = {}));
|
|
14480
|
+
const ButtonAppearance = {
|
|
14481
|
+
outline: 'outline',
|
|
14482
|
+
ghost: 'ghost',
|
|
14483
|
+
block: 'block'
|
|
14484
|
+
};
|
|
14487
14485
|
|
|
14488
14486
|
const styles$k = css `
|
|
14489
14487
|
${display('inline-flex')}
|
|
@@ -14606,7 +14604,7 @@
|
|
|
14606
14604
|
}
|
|
14607
14605
|
`
|
|
14608
14606
|
// prettier-ignore
|
|
14609
|
-
.withBehaviors(appearanceBehavior(ButtonAppearance.
|
|
14607
|
+
.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
14610
14608
|
.control {
|
|
14611
14609
|
background-color: transparent;
|
|
14612
14610
|
border-color: rgba(${actionRgbPartialColor}, 0.3);
|
|
@@ -14631,7 +14629,7 @@
|
|
|
14631
14629
|
background-color: transparent;
|
|
14632
14630
|
border-color: rgba(${borderRgbPartialColor}, 0.2);
|
|
14633
14631
|
}
|
|
14634
|
-
`), appearanceBehavior(ButtonAppearance.
|
|
14632
|
+
`), appearanceBehavior(ButtonAppearance.ghost, css `
|
|
14635
14633
|
.control {
|
|
14636
14634
|
background-color: transparent;
|
|
14637
14635
|
border-color: transparent;
|
|
@@ -14656,7 +14654,7 @@
|
|
|
14656
14654
|
background-color: transparent;
|
|
14657
14655
|
border-color: transparent;
|
|
14658
14656
|
}
|
|
14659
|
-
`), appearanceBehavior(ButtonAppearance.
|
|
14657
|
+
`), appearanceBehavior(ButtonAppearance.block, css `
|
|
14660
14658
|
.control {
|
|
14661
14659
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
14662
14660
|
border-color: transparent;
|
|
@@ -14689,7 +14687,7 @@
|
|
|
14689
14687
|
|
|
14690
14688
|
// prettier-ignore
|
|
14691
14689
|
const styles$j = styles$k
|
|
14692
|
-
.withBehaviors(appearanceBehavior(ButtonAppearance.
|
|
14690
|
+
.withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
|
|
14693
14691
|
:host(.primary) .control {
|
|
14694
14692
|
box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
|
|
14695
14693
|
}
|
|
@@ -14709,7 +14707,7 @@
|
|
|
14709
14707
|
:host(.primary) .control[disabled] {
|
|
14710
14708
|
box-shadow: none;
|
|
14711
14709
|
}
|
|
14712
|
-
`), appearanceBehavior(ButtonAppearance.
|
|
14710
|
+
`), appearanceBehavior(ButtonAppearance.block, css `
|
|
14713
14711
|
:host(.primary) .control {
|
|
14714
14712
|
background-clip: padding-box;
|
|
14715
14713
|
border-color: rgba(${actionRgbPartialColor}, 0.3);
|
|
@@ -14774,7 +14772,7 @@
|
|
|
14774
14772
|
* @remarks
|
|
14775
14773
|
* HTML Attribute: appearance
|
|
14776
14774
|
*/
|
|
14777
|
-
this.appearance = ButtonAppearance.
|
|
14775
|
+
this.appearance = ButtonAppearance.outline;
|
|
14778
14776
|
/**
|
|
14779
14777
|
* @public
|
|
14780
14778
|
* @remarks
|
|
@@ -16133,18 +16131,16 @@
|
|
|
16133
16131
|
}
|
|
16134
16132
|
`;
|
|
16135
16133
|
|
|
16136
|
-
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
|
|
16140
|
-
|
|
16141
|
-
|
|
16142
|
-
|
|
16143
|
-
|
|
16144
|
-
|
|
16145
|
-
|
|
16146
|
-
DrawerState["Closed"] = "closed";
|
|
16147
|
-
})(DrawerState || (DrawerState = {}));
|
|
16134
|
+
const DrawerLocation = {
|
|
16135
|
+
left: 'left',
|
|
16136
|
+
right: 'right'
|
|
16137
|
+
};
|
|
16138
|
+
const DrawerState = {
|
|
16139
|
+
opening: 'opening',
|
|
16140
|
+
opened: 'opened',
|
|
16141
|
+
closing: 'closing',
|
|
16142
|
+
closed: 'closed'
|
|
16143
|
+
};
|
|
16148
16144
|
|
|
16149
16145
|
const animationDurationWhenDisabledMilliseconds = 0.001;
|
|
16150
16146
|
/**
|
|
@@ -16155,8 +16151,8 @@
|
|
|
16155
16151
|
class Drawer extends Dialog {
|
|
16156
16152
|
constructor() {
|
|
16157
16153
|
super(...arguments);
|
|
16158
|
-
this.location = DrawerLocation.
|
|
16159
|
-
this.state = DrawerState.
|
|
16154
|
+
this.location = DrawerLocation.left;
|
|
16155
|
+
this.state = DrawerState.closed;
|
|
16160
16156
|
/**
|
|
16161
16157
|
* True to prevent dismissing the drawer when the overlay outside the drawer is clicked.
|
|
16162
16158
|
* Only applicable when 'modal' is set to true (i.e. when the overlay is used).
|
|
@@ -16200,11 +16196,11 @@
|
|
|
16200
16196
|
}
|
|
16201
16197
|
show() {
|
|
16202
16198
|
// Not calling super.show() as that will immediately show the drawer, whereas 'Opening' state will animate
|
|
16203
|
-
this.state = DrawerState.
|
|
16199
|
+
this.state = DrawerState.opening;
|
|
16204
16200
|
}
|
|
16205
16201
|
hide() {
|
|
16206
16202
|
// Not calling super.hide() as that will immediately hide the drawer, whereas 'Closing' state will animate
|
|
16207
|
-
this.state = DrawerState.
|
|
16203
|
+
this.state = DrawerState.closing;
|
|
16208
16204
|
}
|
|
16209
16205
|
/**
|
|
16210
16206
|
* Handler for overlay clicks (user-initiated dismiss requests) only.
|
|
@@ -16235,11 +16231,11 @@
|
|
|
16235
16231
|
}
|
|
16236
16232
|
}
|
|
16237
16233
|
onHiddenChanged() {
|
|
16238
|
-
if (this.hidden && this.state !== DrawerState.
|
|
16239
|
-
this.state = DrawerState.
|
|
16234
|
+
if (this.hidden && this.state !== DrawerState.closed) {
|
|
16235
|
+
this.state = DrawerState.closed;
|
|
16240
16236
|
}
|
|
16241
|
-
else if (!this.hidden && this.state === DrawerState.
|
|
16242
|
-
this.state = DrawerState.
|
|
16237
|
+
else if (!this.hidden && this.state === DrawerState.closed) {
|
|
16238
|
+
this.state = DrawerState.opened;
|
|
16243
16239
|
}
|
|
16244
16240
|
}
|
|
16245
16241
|
onLocationChanged() {
|
|
@@ -16249,18 +16245,18 @@
|
|
|
16249
16245
|
if (this.isConnected) {
|
|
16250
16246
|
this.cancelCurrentAnimation();
|
|
16251
16247
|
switch (this.state) {
|
|
16252
|
-
case DrawerState.
|
|
16248
|
+
case DrawerState.opening:
|
|
16253
16249
|
this.animateOpening();
|
|
16254
16250
|
this.hidden = false;
|
|
16255
16251
|
break;
|
|
16256
|
-
case DrawerState.
|
|
16252
|
+
case DrawerState.opened:
|
|
16257
16253
|
this.hidden = false;
|
|
16258
16254
|
break;
|
|
16259
|
-
case DrawerState.
|
|
16255
|
+
case DrawerState.closing:
|
|
16260
16256
|
this.hidden = false;
|
|
16261
16257
|
this.animateClosing();
|
|
16262
16258
|
break;
|
|
16263
|
-
case DrawerState.
|
|
16259
|
+
case DrawerState.closed:
|
|
16264
16260
|
this.hidden = true;
|
|
16265
16261
|
break;
|
|
16266
16262
|
default:
|
|
@@ -16289,7 +16285,7 @@
|
|
|
16289
16285
|
this.animateOpenClose(false);
|
|
16290
16286
|
}
|
|
16291
16287
|
else {
|
|
16292
|
-
this.state = DrawerState.
|
|
16288
|
+
this.state = DrawerState.closed;
|
|
16293
16289
|
}
|
|
16294
16290
|
}
|
|
16295
16291
|
animateOpenClose(drawerOpening) {
|
|
@@ -16299,7 +16295,7 @@
|
|
|
16299
16295
|
: animationConfig.slideOutOptions),
|
|
16300
16296
|
duration: this.animationDurationMilliseconds
|
|
16301
16297
|
};
|
|
16302
|
-
const drawerKeyframes = this.location === DrawerLocation.
|
|
16298
|
+
const drawerKeyframes = this.location === DrawerLocation.right
|
|
16303
16299
|
? animationConfig.slideRightKeyframes
|
|
16304
16300
|
: animationConfig.slideLeftKeyframes;
|
|
16305
16301
|
const dialogAnimation = new dist.AnimateTo(this.dialog, undefined, options);
|
|
@@ -16314,8 +16310,8 @@
|
|
|
16314
16310
|
const animationGroup = new dist.AnimateGroup(animations);
|
|
16315
16311
|
animationGroup.onFinish = () => {
|
|
16316
16312
|
this.state = drawerOpening
|
|
16317
|
-
? DrawerState.
|
|
16318
|
-
: DrawerState.
|
|
16313
|
+
? DrawerState.opened
|
|
16314
|
+
: DrawerState.closed;
|
|
16319
16315
|
};
|
|
16320
16316
|
this.animationGroup = animationGroup;
|
|
16321
16317
|
animationGroup.play();
|
|
@@ -18944,11 +18940,10 @@
|
|
|
18944
18940
|
});
|
|
18945
18941
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
|
|
18946
18942
|
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
})(TextAreaAppearance || (TextAreaAppearance = {}));
|
|
18943
|
+
const TextAreaAppearance = {
|
|
18944
|
+
outline: 'outline',
|
|
18945
|
+
block: 'block'
|
|
18946
|
+
};
|
|
18952
18947
|
|
|
18953
18948
|
const styles$5 = css `
|
|
18954
18949
|
${display('inline-flex')}
|
|
@@ -19049,12 +19044,12 @@
|
|
|
19049
19044
|
}
|
|
19050
19045
|
`
|
|
19051
19046
|
// prettier-ignore
|
|
19052
|
-
.withBehaviors(appearanceBehavior(TextAreaAppearance.
|
|
19047
|
+
.withBehaviors(appearanceBehavior(TextAreaAppearance.outline, css `
|
|
19053
19048
|
.control {
|
|
19054
19049
|
border-color: rgba(${borderRgbPartialColor}, 0.3);
|
|
19055
19050
|
background-color: transparent;
|
|
19056
19051
|
}
|
|
19057
|
-
`), appearanceBehavior(TextAreaAppearance.
|
|
19052
|
+
`), appearanceBehavior(TextAreaAppearance.block, css `
|
|
19058
19053
|
.control {
|
|
19059
19054
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
19060
19055
|
}
|
|
@@ -19082,7 +19077,7 @@
|
|
|
19082
19077
|
* @remarks
|
|
19083
19078
|
* HTML Attribute: appearance
|
|
19084
19079
|
*/
|
|
19085
|
-
this.appearance = TextAreaAppearance.
|
|
19080
|
+
this.appearance = TextAreaAppearance.outline;
|
|
19086
19081
|
}
|
|
19087
19082
|
}
|
|
19088
19083
|
__decorate([
|
|
@@ -19102,13 +19097,12 @@
|
|
|
19102
19097
|
/**
|
|
19103
19098
|
* Values for the 'appearance' property of the text field
|
|
19104
19099
|
*/
|
|
19105
|
-
|
|
19106
|
-
|
|
19107
|
-
|
|
19108
|
-
|
|
19109
|
-
|
|
19110
|
-
|
|
19111
|
-
})(TextFieldAppearance || (TextFieldAppearance = {}));
|
|
19100
|
+
const TextFieldAppearance = {
|
|
19101
|
+
underline: 'underline',
|
|
19102
|
+
outline: 'outline',
|
|
19103
|
+
block: 'block',
|
|
19104
|
+
frameless: 'frameless'
|
|
19105
|
+
};
|
|
19112
19106
|
|
|
19113
19107
|
const styles$4 = css `
|
|
19114
19108
|
${display('inline-block')}
|
|
@@ -19335,7 +19329,7 @@
|
|
|
19335
19329
|
slot[name='actions']::slotted(*) {
|
|
19336
19330
|
${controlHeight.cssCustomProperty}: 24px;
|
|
19337
19331
|
}
|
|
19338
|
-
`.withBehaviors(appearanceBehavior(TextFieldAppearance.
|
|
19332
|
+
`.withBehaviors(appearanceBehavior(TextFieldAppearance.underline, css `
|
|
19339
19333
|
.root {
|
|
19340
19334
|
--ni-private-bottom-border-width: 1px;
|
|
19341
19335
|
padding-top: ${borderWidth};
|
|
@@ -19350,7 +19344,7 @@
|
|
|
19350
19344
|
:host([disabled]) .root:hover {
|
|
19351
19345
|
--ni-private-bottom-border-width: 1px;
|
|
19352
19346
|
}
|
|
19353
|
-
`), appearanceBehavior(TextFieldAppearance.
|
|
19347
|
+
`), appearanceBehavior(TextFieldAppearance.block, css `
|
|
19354
19348
|
.root {
|
|
19355
19349
|
background-color: rgba(${borderRgbPartialColor}, 0.1);
|
|
19356
19350
|
--ni-private-bottom-border-width: 0px;
|
|
@@ -19395,7 +19389,7 @@
|
|
|
19395
19389
|
:host(.invalid[disabled]) .root {
|
|
19396
19390
|
--ni-private-bottom-border-width: 1px;
|
|
19397
19391
|
}
|
|
19398
|
-
`), appearanceBehavior(TextFieldAppearance.
|
|
19392
|
+
`), appearanceBehavior(TextFieldAppearance.outline, css `
|
|
19399
19393
|
.root {
|
|
19400
19394
|
--ni-private-bottom-border-width: 1px;
|
|
19401
19395
|
border-width: ${borderWidth};
|
|
@@ -19405,7 +19399,7 @@
|
|
|
19405
19399
|
:host(.invalid) .errortext {
|
|
19406
19400
|
top: calc(${controlHeight} - ${borderWidth});
|
|
19407
19401
|
}
|
|
19408
|
-
`), appearanceBehavior(TextFieldAppearance.
|
|
19402
|
+
`), appearanceBehavior(TextFieldAppearance.frameless, css `
|
|
19409
19403
|
.root {
|
|
19410
19404
|
--ni-private-bottom-border-width: 0px;
|
|
19411
19405
|
padding-top: ${borderWidth};
|
|
@@ -19432,7 +19426,7 @@
|
|
|
19432
19426
|
}
|
|
19433
19427
|
`,
|
|
19434
19428
|
// Color theme
|
|
19435
|
-
Theme.
|
|
19429
|
+
Theme.dark));
|
|
19436
19430
|
|
|
19437
19431
|
/**
|
|
19438
19432
|
* A nimble-styed HTML text input
|
|
@@ -19447,7 +19441,7 @@
|
|
|
19447
19441
|
* @remarks
|
|
19448
19442
|
* HTML Attribute: appearance
|
|
19449
19443
|
*/
|
|
19450
|
-
this.appearance = TextFieldAppearance.
|
|
19444
|
+
this.appearance = TextFieldAppearance.underline;
|
|
19451
19445
|
}
|
|
19452
19446
|
connectedCallback() {
|
|
19453
19447
|
super.connectedCallback();
|
|
@@ -19569,7 +19563,7 @@
|
|
|
19569
19563
|
* @remarks
|
|
19570
19564
|
* HTML Attribute: appearance
|
|
19571
19565
|
*/
|
|
19572
|
-
this.appearance = ButtonAppearance.
|
|
19566
|
+
this.appearance = ButtonAppearance.outline;
|
|
19573
19567
|
/**
|
|
19574
19568
|
* @public
|
|
19575
19569
|
* @remarks
|
|
@@ -19638,12 +19632,11 @@
|
|
|
19638
19632
|
DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToolbar());
|
|
19639
19633
|
|
|
19640
19634
|
const groupSelectedAttribute = 'group-selected';
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
})(TreeViewSelectionMode || (TreeViewSelectionMode = {}));
|
|
19635
|
+
const TreeViewSelectionMode = {
|
|
19636
|
+
all: 'all',
|
|
19637
|
+
leavesOnly: 'leaves-only',
|
|
19638
|
+
none: 'none'
|
|
19639
|
+
};
|
|
19647
19640
|
|
|
19648
19641
|
/* eslint-disable */
|
|
19649
19642
|
/**
|
|
@@ -20008,7 +20001,7 @@
|
|
|
20008
20001
|
class TreeView extends TreeView$1 {
|
|
20009
20002
|
constructor() {
|
|
20010
20003
|
super(...arguments);
|
|
20011
|
-
this.selectionMode = TreeViewSelectionMode.
|
|
20004
|
+
this.selectionMode = TreeViewSelectionMode.all;
|
|
20012
20005
|
}
|
|
20013
20006
|
handleClick(e) {
|
|
20014
20007
|
if (e.defaultPrevented) {
|
|
@@ -20033,11 +20026,11 @@
|
|
|
20033
20026
|
}
|
|
20034
20027
|
canSelect(item) {
|
|
20035
20028
|
switch (this.selectionMode) {
|
|
20036
|
-
case TreeViewSelectionMode.
|
|
20029
|
+
case TreeViewSelectionMode.all:
|
|
20037
20030
|
return true;
|
|
20038
|
-
case TreeViewSelectionMode.
|
|
20031
|
+
case TreeViewSelectionMode.none:
|
|
20039
20032
|
return false;
|
|
20040
|
-
case TreeViewSelectionMode.
|
|
20033
|
+
case TreeViewSelectionMode.leavesOnly:
|
|
20041
20034
|
return !this.itemHasChildren(item);
|
|
20042
20035
|
default:
|
|
20043
20036
|
return true;
|