@ni/nimble-components 10.0.4 → 10.0.5

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.
@@ -4422,6 +4422,7 @@
4422
4422
  * This set of exported strings reference https://developer.mozilla.org/en-US/docs/Web/Events
4423
4423
  * and should include all non-deprecated and non-experimental Standard events
4424
4424
  */
4425
+ const eventChange = "change";
4425
4426
  const eventResize = "resize";
4426
4427
  const eventScroll = "scroll";
4427
4428
 
@@ -13058,7 +13059,7 @@
13058
13059
  */
13059
13060
  const focusVisible$1 = canUseFocusVisible() ? "focus-visible" : "focus";
13060
13061
 
13061
- const styles$o = css `
13062
+ const styles$p = css `
13062
13063
  :host {
13063
13064
  contain: layout;
13064
13065
  display: block;
@@ -13082,7 +13083,7 @@
13082
13083
  baseName: 'anchored-region',
13083
13084
  baseClass: AnchoredRegion$1,
13084
13085
  template: anchoredRegionTemplate,
13085
- styles: styles$o
13086
+ styles: styles$p
13086
13087
  });
13087
13088
  DesignSystem.getOrCreate()
13088
13089
  .withPrefix('nimble')
@@ -13417,9 +13418,9 @@
13417
13418
  return c > 3 && r && Object.defineProperty(target, key, r), r;
13418
13419
  }
13419
13420
 
13420
- const template$4 = html `<slot></slot>`;
13421
+ const template$5 = html `<slot></slot>`;
13421
13422
 
13422
- const styles$n = css `
13423
+ const styles$o = css `
13423
13424
  :host {
13424
13425
  display: contents;
13425
13426
  }
@@ -13475,8 +13476,8 @@
13475
13476
  ], ThemeProvider.prototype, "theme", void 0);
13476
13477
  const nimbleDesignSystemProvider = ThemeProvider.compose({
13477
13478
  baseName: 'theme-provider',
13478
- styles: styles$n,
13479
- template: template$4
13479
+ styles: styles$o,
13480
+ template: template$5
13480
13481
  });
13481
13482
  DesignSystem.getOrCreate()
13482
13483
  .withPrefix('nimble')
@@ -13724,7 +13725,7 @@
13724
13725
  */
13725
13726
  const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias);
13726
13727
 
13727
- const styles$m = css `
13728
+ const styles$n = css `
13728
13729
  ${display('inline-block')}
13729
13730
 
13730
13731
  :host {
@@ -13787,7 +13788,7 @@
13787
13788
  baseName: 'breadcrumb',
13788
13789
  baseClass: Breadcrumb$1,
13789
13790
  template: breadcrumbTemplate,
13790
- styles: styles$m
13791
+ styles: styles$n
13791
13792
  });
13792
13793
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
13793
13794
 
@@ -14373,7 +14374,7 @@
14373
14374
  */
14374
14375
  const focusVisible = `:${focusVisible$1}`;
14375
14376
 
14376
- const styles$l = css `
14377
+ const styles$m = css `
14377
14378
  ${display('inline-flex')}
14378
14379
 
14379
14380
  :host {
@@ -14453,7 +14454,7 @@
14453
14454
  baseName: 'breadcrumb-item',
14454
14455
  baseClass: BreadcrumbItem$1,
14455
14456
  template: breadcrumbItemTemplate,
14456
- styles: styles$l,
14457
+ styles: styles$m,
14457
14458
  separator: forwardSlash16X16.data
14458
14459
  });
14459
14460
  DesignSystem.getOrCreate()
@@ -14483,7 +14484,7 @@
14483
14484
  block: 'block'
14484
14485
  };
14485
14486
 
14486
- const styles$k = css `
14487
+ const styles$l = css `
14487
14488
  ${display('inline-flex')}
14488
14489
 
14489
14490
  :host {
@@ -14690,7 +14691,7 @@
14690
14691
  `));
14691
14692
 
14692
14693
  // prettier-ignore
14693
- const styles$j = styles$k
14694
+ const styles$k = styles$l
14694
14695
  .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
14695
14696
  :host(.primary) .control {
14696
14697
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
@@ -14804,14 +14805,14 @@
14804
14805
  baseName: 'button',
14805
14806
  baseClass: Button$1,
14806
14807
  template: buttonTemplate,
14807
- styles: styles$j,
14808
+ styles: styles$k,
14808
14809
  shadowOptions: {
14809
14810
  delegatesFocus: true
14810
14811
  }
14811
14812
  });
14812
14813
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
14813
14814
 
14814
- const styles$i = css `
14815
+ const styles$j = css `
14815
14816
  ${display('inline-flex')}
14816
14817
 
14817
14818
  :host {
@@ -14929,7 +14930,7 @@
14929
14930
  baseName: 'checkbox',
14930
14931
  baseClass: Checkbox$1,
14931
14932
  template: checkboxTemplate,
14932
- styles: styles$i,
14933
+ styles: styles$j,
14933
14934
  checkedIndicator: check16X16.data,
14934
14935
  indeterminateIndicator: minus16X16.data
14935
14936
  });
@@ -16024,7 +16025,7 @@
16024
16025
  slideOutOptions
16025
16026
  };
16026
16027
 
16027
- const styles$h = css `
16028
+ const styles$i = css `
16028
16029
  ${display('block')}
16029
16030
 
16030
16031
  :host {
@@ -16336,17 +16337,17 @@
16336
16337
  const nimbleDrawer = Drawer.compose({
16337
16338
  baseName: 'drawer',
16338
16339
  template: dialogTemplate,
16339
- styles: styles$h
16340
+ styles: styles$i
16340
16341
  });
16341
16342
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
16342
16343
 
16343
- const template$3 = html `
16344
+ const template$4 = html `
16344
16345
  <template>
16345
16346
  <div class="icon" :innerHTML=${x => x.icon.data}></div>
16346
16347
  </template
16347
16348
  `;
16348
16349
 
16349
- const styles$g = css `
16350
+ const styles$h = css `
16350
16351
  ${display('inline-flex')}
16351
16352
 
16352
16353
  :host {
@@ -16392,8 +16393,8 @@
16392
16393
  const registerIcon = (baseName, iconClass) => {
16393
16394
  const composedIcon = iconClass.compose({
16394
16395
  baseName,
16395
- template: template$3,
16396
- styles: styles$g,
16396
+ template: template$4,
16397
+ styles: styles$h,
16397
16398
  baseClass: iconClass
16398
16399
  });
16399
16400
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -17961,7 +17962,7 @@
17961
17962
  }
17962
17963
  registerIcon('xmark-check-icon', XmarkCheckIcon);
17963
17964
 
17964
- const styles$f = css `
17965
+ const styles$g = css `
17965
17966
  ${display('flex')}
17966
17967
 
17967
17968
  :host {
@@ -18040,11 +18041,11 @@
18040
18041
  baseName: 'list-option',
18041
18042
  baseClass: ListboxOption,
18042
18043
  template: listboxOptionTemplate,
18043
- styles: styles$f
18044
+ styles: styles$g
18044
18045
  });
18045
18046
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
18046
18047
 
18047
- const styles$e = css `
18048
+ const styles$f = css `
18048
18049
  ${display('grid')}
18049
18050
 
18050
18051
  :host {
@@ -18099,11 +18100,356 @@
18099
18100
  baseName: 'menu',
18100
18101
  baseClass: Menu$1,
18101
18102
  template: menuTemplate,
18102
- styles: styles$e
18103
+ styles: styles$f
18103
18104
  });
18104
18105
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
18105
18106
 
18107
+ const styles$e = css `
18108
+ ${display('inline-block')}
18109
+
18110
+ :host {
18111
+ height: ${controlHeight};
18112
+ }
18113
+
18114
+ [part='button'] {
18115
+ width: 100%;
18116
+ height: 100%;
18117
+ }
18118
+
18119
+ slot[name='menu']::slotted(*) {
18120
+ margin-top: ${smallPadding};
18121
+ margin-bottom: ${smallPadding};
18122
+ }
18123
+ `;
18124
+
18106
18125
  const styles$d = css `
18126
+ ${styles$l}
18127
+
18128
+ .control[aria-pressed='true'] {
18129
+ background-color: ${fillSelectedColor};
18130
+ border-color: ${fillSelectedColor};
18131
+ }
18132
+
18133
+ .control[aria-pressed='true']:hover {
18134
+ background-color: ${fillSelectedColor};
18135
+ }
18136
+
18137
+ .control[aria-pressed='true']${focusVisible} {
18138
+ background-color: ${fillSelectedColor};
18139
+ }
18140
+
18141
+ .control[aria-pressed='true'][disabled] {
18142
+ background-color: ${fillSelectedColor};
18143
+ border-color: ${fillSelectedColor};
18144
+ }
18145
+
18146
+ .control[aria-pressed='true'][disabled]:hover {
18147
+ background-color: ${fillSelectedColor};
18148
+ border-color: ${fillSelectedColor};
18149
+ }
18150
+ `;
18151
+
18152
+ const template$3 = (context, definition) => html `
18153
+ <div
18154
+ role="button"
18155
+ part="control"
18156
+ tabindex="${x => (x.disabled ? null : 0)}"
18157
+ @keypress="${(x, c) => x.keypressHandler(c.event)}"
18158
+ @click="${(x, c) => x.clickHandler(c.event)}"
18159
+ class="control ${x => (x.checked ? 'checked' : '')}"
18160
+ ?disabled="${x => x.disabled}"
18161
+ ${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
18162
+ toggle button's state to keep the ARIA attributes consistent with the component's
18163
+ state without a client having to configure ARIA attributes directly */}
18164
+ aria-disabled="${x => x.disabled}"
18165
+ aria-readonly="${x => x.readOnly}"
18166
+ aria-pressed="${x => x.checked}"
18167
+ ${'' /* Configure all other ARIA attributes based on the aria attributes
18168
+ configured on the toggle button */}
18169
+ aria-atomic="${x => x.ariaAtomic}"
18170
+ aria-busy="${x => x.ariaBusy}"
18171
+ aria-controls="${x => x.ariaControls}"
18172
+ aria-current="${x => x.ariaCurrent}"
18173
+ aria-describedby="${x => x.ariaDescribedby}"
18174
+ aria-details="${x => x.ariaDetails}"
18175
+ aria-errormessage="${x => x.ariaErrormessage}"
18176
+ aria-expanded="${x => x.ariaExpanded}"
18177
+ aria-flowto="${x => x.ariaFlowto}"
18178
+ aria-haspopup="${x => x.ariaHaspopup}"
18179
+ aria-hidden="${x => x.ariaHidden}"
18180
+ aria-invalid="${x => x.ariaInvalid}"
18181
+ aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
18182
+ aria-label="${x => x.ariaLabel}"
18183
+ aria-labelledby="${x => x.ariaLabelledby}"
18184
+ aria-live="${x => x.ariaLive}"
18185
+ aria-owns="${x => x.ariaOwns}"
18186
+ aria-relevant="${x => x.ariaRelevant}"
18187
+ aria-roledescription="${x => x.ariaRoledescription}"
18188
+ ${ref('control')}
18189
+ >
18190
+ ${startSlotTemplate(context, definition)}
18191
+ <span class="content" part="content">
18192
+ <slot></slot>
18193
+ </span>
18194
+ ${endSlotTemplate(context, definition)}
18195
+ </div>
18196
+ `;
18197
+
18198
+ /**
18199
+ * A nimble-styled toggle button control.
18200
+ */
18201
+ class ToggleButton extends Switch$1 {
18202
+ constructor() {
18203
+ super(...arguments);
18204
+ /**
18205
+ * @public
18206
+ * @remarks
18207
+ * HTML Attribute: appearance
18208
+ */
18209
+ this.appearance = ButtonAppearance.outline;
18210
+ /**
18211
+ * @public
18212
+ * @remarks
18213
+ * HTML Attribute: content-hidden
18214
+ */
18215
+ this.contentHidden = false;
18216
+ }
18217
+ }
18218
+ __decorate([
18219
+ attr
18220
+ ], ToggleButton.prototype, "appearance", void 0);
18221
+ __decorate([
18222
+ attr({ attribute: 'content-hidden', mode: 'boolean' })
18223
+ ], ToggleButton.prototype, "contentHidden", void 0);
18224
+ applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
18225
+ const nimbleToggleButton = ToggleButton.compose({
18226
+ baseName: 'toggle-button',
18227
+ template: template$3,
18228
+ styles: styles$d,
18229
+ shadowOptions: {
18230
+ delegatesFocus: true
18231
+ }
18232
+ });
18233
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
18234
+
18235
+ // prettier-ignore
18236
+ const template$2 = context => html `
18237
+ <template
18238
+ ?open="${x => x.open}"
18239
+ @focusout="${(x, c) => x.focusoutHandler(c.event)}"
18240
+ >
18241
+ <${context.tagFor(ToggleButton)}
18242
+ part="button"
18243
+ appearance="${x => x.appearance}"
18244
+ content-hidden="${x => x.contentHidden}"
18245
+ ?checked="${x => x.open}"
18246
+ ?disabled="${x => x.disabled}"
18247
+ aria-haspopup="true"
18248
+ aria-expanded="${x => x.open}"
18249
+ @change="${(x, c) => x.toggleButtonCheckedChangeHandler(c.event)}"
18250
+ @keydown="${(x, c) => x.toggleButtonKeyDownHandler(c.event)}"
18251
+ ${ref('toggleButton')}
18252
+ exportparts="start,end"
18253
+ >
18254
+ ${'' /* Forward the contents of the 'start', 'end', and default slots to the toggle button */}
18255
+ <slot slot="start" name="start"></slot>
18256
+ <slot></slot>
18257
+ <slot slot="end" name="end"></slot>
18258
+ </${context.tagFor(ToggleButton)}>
18259
+ ${when(x => x.open, html `
18260
+ <${context.tagFor(AnchoredRegion)}
18261
+ fixed-placement="true"
18262
+ auto-update-mode="auto"
18263
+ horizontal-inset="true"
18264
+ horizontal-positioning-mode="dynamic"
18265
+ vertical-positioning-mode="${x => (x.position === 'auto' ? 'dynamic' : 'locktodefault')}"
18266
+ vertical-default-position="${x => (x.position === 'above' ? 'top' : 'bottom')}"
18267
+ @loaded="${x => x.regionLoadedHandler()}"
18268
+ @keydown="${(x, c) => x.menuKeyDownHandler(c.event)}"
18269
+ ${ref('region')}
18270
+ >
18271
+ <span part="menu">
18272
+ <slot name="menu" ${slotted({ property: 'slottedMenus', filter: elements('[role=menu]') })}></slot>
18273
+ </span>
18274
+ </${context.tagFor(AnchoredRegion)}>
18275
+ `)}
18276
+ </template>
18277
+ `;
18278
+
18279
+ /**
18280
+ * Types of menu button appearance.
18281
+ * @public
18282
+ */
18283
+ /**
18284
+ * The options of where to position the menu relative to the menu button.
18285
+ */
18286
+ const MenuButtonPosition = {
18287
+ above: 'above',
18288
+ below: 'below',
18289
+ auto: 'auto'
18290
+ };
18291
+
18292
+ /**
18293
+ * A nimble-styled menu button control.
18294
+ */
18295
+ class MenuButton extends FoundationElement {
18296
+ constructor() {
18297
+ super(...arguments);
18298
+ this.appearance = ButtonAppearance.outline;
18299
+ this.disabled = false;
18300
+ this.contentHidden = false;
18301
+ /**
18302
+ * Specifies whether or not the menu is open.
18303
+ */
18304
+ this.open = false;
18305
+ /**
18306
+ * Configures where the menu should be placed relative to the button that opens the menu.
18307
+ */
18308
+ this.position = MenuButtonPosition.auto;
18309
+ /**
18310
+ * Used to maintain the internal state of whether the last menu item should be focused instead
18311
+ * of the first menu item the next time the menu is opened.
18312
+ */
18313
+ this.focusLastItemWhenOpened = false;
18314
+ this.menuChangeHandler = () => {
18315
+ this.open = false;
18316
+ this.toggleButton.focus();
18317
+ };
18318
+ }
18319
+ disconnectedCallback() {
18320
+ super.disconnectedCallback();
18321
+ if (this.region) {
18322
+ this.region.removeEventListener(eventChange, this.menuChangeHandler);
18323
+ }
18324
+ }
18325
+ toggleButtonChanged(_prev, _next) {
18326
+ if (this.region && this.toggleButton) {
18327
+ this.region.anchorElement = this.toggleButton;
18328
+ }
18329
+ }
18330
+ regionChanged(prev, _next) {
18331
+ if (prev) {
18332
+ prev.removeEventListener(eventChange, this.menuChangeHandler);
18333
+ }
18334
+ if (this.region) {
18335
+ if (this.toggleButton) {
18336
+ this.region.anchorElement = this.toggleButton;
18337
+ }
18338
+ this.region.addEventListener(eventChange, this.menuChangeHandler, {
18339
+ capture: true
18340
+ });
18341
+ }
18342
+ }
18343
+ openChanged(_prev, _next) {
18344
+ if (this.toggleButton) {
18345
+ this.toggleButton.checked = this.open;
18346
+ }
18347
+ if (!this.open) {
18348
+ // Only fire an event here if the menu is changing to being closed. Otherwise,
18349
+ // wait until the menu is actually opened before firing the event.
18350
+ this.$emit('open-change');
18351
+ }
18352
+ }
18353
+ regionLoadedHandler() {
18354
+ if (this.focusLastItemWhenOpened) {
18355
+ this.focusLastMenuItem();
18356
+ this.focusLastItemWhenOpened = false;
18357
+ }
18358
+ else {
18359
+ this.focusMenu();
18360
+ }
18361
+ this.$emit('open-change');
18362
+ }
18363
+ focusoutHandler(e) {
18364
+ if (!this.open) {
18365
+ return true;
18366
+ }
18367
+ const focusTarget = e.relatedTarget;
18368
+ if (!this.contains(focusTarget)) {
18369
+ this.open = false;
18370
+ return false;
18371
+ }
18372
+ return true;
18373
+ }
18374
+ toggleButtonCheckedChangeHandler(e) {
18375
+ this.open = this.toggleButton.checked;
18376
+ // Don't bubble the 'change' event from the toggle button because
18377
+ // the menu button has its own 'open-change' event.
18378
+ e.stopPropagation();
18379
+ return false;
18380
+ }
18381
+ toggleButtonKeyDownHandler(e) {
18382
+ switch (e.key) {
18383
+ case keyArrowUp:
18384
+ this.focusLastItemWhenOpened = true;
18385
+ this.open = true;
18386
+ return false;
18387
+ case keyArrowDown:
18388
+ this.open = true;
18389
+ return false;
18390
+ default:
18391
+ return true;
18392
+ }
18393
+ }
18394
+ menuKeyDownHandler(e) {
18395
+ switch (e.key) {
18396
+ case keyEscape:
18397
+ this.open = false;
18398
+ this.toggleButton.focus();
18399
+ return false;
18400
+ default:
18401
+ return true;
18402
+ }
18403
+ }
18404
+ get menu() {
18405
+ return this.slottedMenus?.length ? this.slottedMenus[0] : undefined;
18406
+ }
18407
+ focusMenu() {
18408
+ this.menu?.focus();
18409
+ }
18410
+ focusLastMenuItem() {
18411
+ const menuItems = this.menu?.querySelectorAll('[role=menuitem]');
18412
+ if (menuItems?.length) {
18413
+ const lastMenuItem = menuItems[menuItems.length - 1];
18414
+ lastMenuItem.focus();
18415
+ }
18416
+ }
18417
+ }
18418
+ __decorate([
18419
+ attr
18420
+ ], MenuButton.prototype, "appearance", void 0);
18421
+ __decorate([
18422
+ attr({ mode: 'boolean' })
18423
+ ], MenuButton.prototype, "disabled", void 0);
18424
+ __decorate([
18425
+ attr({ attribute: 'content-hidden', mode: 'boolean' })
18426
+ ], MenuButton.prototype, "contentHidden", void 0);
18427
+ __decorate([
18428
+ attr({ mode: 'boolean' })
18429
+ ], MenuButton.prototype, "open", void 0);
18430
+ __decorate([
18431
+ attr({ attribute: 'position' })
18432
+ ], MenuButton.prototype, "position", void 0);
18433
+ __decorate([
18434
+ observable
18435
+ ], MenuButton.prototype, "toggleButton", void 0);
18436
+ __decorate([
18437
+ observable
18438
+ ], MenuButton.prototype, "region", void 0);
18439
+ __decorate([
18440
+ observable
18441
+ ], MenuButton.prototype, "slottedMenus", void 0);
18442
+ const nimbleMenuButton = MenuButton.compose({
18443
+ baseName: 'menu-button',
18444
+ template: template$2,
18445
+ styles: styles$e,
18446
+ shadowOptions: {
18447
+ delegatesFocus: true
18448
+ }
18449
+ });
18450
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
18451
+
18452
+ const styles$c = css `
18107
18453
  ${display('grid')}
18108
18454
 
18109
18455
  :host {
@@ -18201,12 +18547,12 @@
18201
18547
  baseName: 'menu-item',
18202
18548
  baseClass: MenuItem$1,
18203
18549
  template: menuItemTemplate,
18204
- styles: styles$d,
18550
+ styles: styles$c,
18205
18551
  expandCollapseGlyph: arrowExpanderRight16X16.data
18206
18552
  });
18207
18553
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
18208
18554
 
18209
- const styles$c = css `
18555
+ const styles$b = css `
18210
18556
  ${display('inline-block')}
18211
18557
 
18212
18558
  :host {
@@ -18332,7 +18678,7 @@
18332
18678
  baseName: 'number-field',
18333
18679
  baseClass: NumberField$1,
18334
18680
  template: numberFieldTemplate,
18335
- styles: styles$c,
18681
+ styles: styles$b,
18336
18682
  shadowOptions: {
18337
18683
  delegatesFocus: true
18338
18684
  },
@@ -18341,7 +18687,7 @@
18341
18687
  });
18342
18688
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
18343
18689
 
18344
- const styles$b = css `
18690
+ const styles$a = css `
18345
18691
  ${display('inline-flex')}
18346
18692
 
18347
18693
  :host {
@@ -18509,12 +18855,12 @@
18509
18855
  baseName: 'select',
18510
18856
  baseClass: Select$1,
18511
18857
  template: selectTemplate,
18512
- styles: styles$b,
18858
+ styles: styles$a,
18513
18859
  indicator: arrowExpanderDown16X16.data
18514
18860
  });
18515
18861
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
18516
18862
 
18517
- const styles$a = css `
18863
+ const styles$9 = css `
18518
18864
  ${display('inline-flex')}
18519
18865
 
18520
18866
  :host {
@@ -18682,7 +19028,7 @@
18682
19028
  `));
18683
19029
 
18684
19030
  // prettier-ignore
18685
- const template$2 = html `
19031
+ const template$1 = html `
18686
19032
  <template
18687
19033
  role="switch"
18688
19034
  aria-checked="${x => x.checked}"
@@ -18726,12 +19072,12 @@
18726
19072
  const nimbleSwitch = Switch.compose({
18727
19073
  baseClass: Switch$1,
18728
19074
  baseName: 'switch',
18729
- template: template$2,
18730
- styles: styles$a
19075
+ template: template$1,
19076
+ styles: styles$9
18731
19077
  });
18732
19078
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
18733
19079
 
18734
- const styles$9 = css `
19080
+ const styles$8 = css `
18735
19081
  ${display('inline-flex')}
18736
19082
 
18737
19083
  :host {
@@ -18835,11 +19181,11 @@
18835
19181
  baseName: 'tab',
18836
19182
  baseClass: Tab$1,
18837
19183
  template: tabTemplate,
18838
- styles: styles$9
19184
+ styles: styles$8
18839
19185
  });
18840
19186
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
18841
19187
 
18842
- const styles$8 = css `
19188
+ const styles$7 = css `
18843
19189
  ${display('block')}
18844
19190
 
18845
19191
  :host {
@@ -18859,11 +19205,11 @@
18859
19205
  baseName: 'tab-panel',
18860
19206
  baseClass: TabPanel$1,
18861
19207
  template: tabPanelTemplate,
18862
- styles: styles$8
19208
+ styles: styles$7
18863
19209
  });
18864
19210
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
18865
19211
 
18866
- const styles$7 = css `
19212
+ const styles$6 = css `
18867
19213
  ${display('grid')}
18868
19214
 
18869
19215
  :host {
@@ -18901,11 +19247,11 @@
18901
19247
  baseName: 'tabs',
18902
19248
  baseClass: Tabs$1,
18903
19249
  template: tabsTemplate,
18904
- styles: styles$7
19250
+ styles: styles$6
18905
19251
  });
18906
19252
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabs());
18907
19253
 
18908
- const styles$6 = css `
19254
+ const styles$5 = css `
18909
19255
  ${display('flex')}
18910
19256
 
18911
19257
  :host {
@@ -18925,7 +19271,7 @@
18925
19271
  }
18926
19272
  `;
18927
19273
 
18928
- const template$1 = html `
19274
+ const template = html `
18929
19275
  <template slot="end">
18930
19276
  <div class="separator"></div>
18931
19277
  <slot></slot>
@@ -18939,8 +19285,8 @@
18939
19285
  }
18940
19286
  const nimbleTabsToolbar = TabsToolbar.compose({
18941
19287
  baseName: 'tabs-toolbar',
18942
- template: template$1,
18943
- styles: styles$6
19288
+ template,
19289
+ styles: styles$5
18944
19290
  });
18945
19291
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
18946
19292
 
@@ -18949,7 +19295,7 @@
18949
19295
  block: 'block'
18950
19296
  };
18951
19297
 
18952
- const styles$5 = css `
19298
+ const styles$4 = css `
18953
19299
  ${display('inline-flex')}
18954
19300
 
18955
19301
  :host {
@@ -19091,7 +19437,7 @@
19091
19437
  baseName: 'text-area',
19092
19438
  baseClass: TextArea$1,
19093
19439
  template: textAreaTemplate,
19094
- styles: styles$5,
19440
+ styles: styles$4,
19095
19441
  shadowOptions: {
19096
19442
  delegatesFocus: true
19097
19443
  }
@@ -19108,7 +19454,7 @@
19108
19454
  frameless: 'frameless'
19109
19455
  };
19110
19456
 
19111
- const styles$4 = css `
19457
+ const styles$3 = css `
19112
19458
  ${display('inline-block')}
19113
19459
 
19114
19460
  :host {
@@ -19462,7 +19808,7 @@
19462
19808
  baseName: 'text-field',
19463
19809
  baseClass: TextField$1,
19464
19810
  template: textFieldTemplate,
19465
- styles: styles$4,
19811
+ styles: styles$3,
19466
19812
  shadowOptions: {
19467
19813
  delegatesFocus: true
19468
19814
  },
@@ -19483,116 +19829,6 @@
19483
19829
  });
19484
19830
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTextField());
19485
19831
 
19486
- const styles$3 = css `
19487
- ${styles$k}
19488
-
19489
- .control[aria-pressed='true'] {
19490
- background-color: ${fillSelectedColor};
19491
- border-color: ${fillSelectedColor};
19492
- }
19493
-
19494
- .control[aria-pressed='true']:hover {
19495
- background-color: ${fillSelectedColor};
19496
- }
19497
-
19498
- .control[aria-pressed='true']${focusVisible} {
19499
- background-color: ${fillSelectedColor};
19500
- }
19501
-
19502
- .control[aria-pressed='true'][disabled] {
19503
- background-color: ${fillSelectedColor};
19504
- border-color: ${fillSelectedColor};
19505
- }
19506
-
19507
- .control[aria-pressed='true'][disabled]:hover {
19508
- background-color: ${fillSelectedColor};
19509
- border-color: ${fillSelectedColor};
19510
- }
19511
- `;
19512
-
19513
- const template = (context, definition) => html `
19514
- <div
19515
- role="button"
19516
- part="control"
19517
- tabindex="${x => (x.disabled ? null : 0)}"
19518
- @keypress="${(x, c) => x.keypressHandler(c.event)}"
19519
- @click="${(x, c) => x.clickHandler(c.event)}"
19520
- class="control ${x => (x.checked ? 'checked' : '')}"
19521
- ?disabled="${x => x.disabled}"
19522
- ${'' /* Configure aria-disabled, aria-readonly, and aria-pressed based on the
19523
- toggle button's state to keep the ARIA attributes consistent with the component's
19524
- state without a client having to configure ARIA attributes directly */}
19525
- aria-disabled="${x => x.disabled}"
19526
- aria-readonly="${x => x.readOnly}"
19527
- aria-pressed="${x => x.checked}"
19528
- ${'' /* Configure all other ARIA attributes based on the aria attributes
19529
- configured on the toggle button */}
19530
- aria-atomic="${x => x.ariaAtomic}"
19531
- aria-busy="${x => x.ariaBusy}"
19532
- aria-controls="${x => x.ariaControls}"
19533
- aria-current="${x => x.ariaCurrent}"
19534
- aria-describedby="${x => x.ariaDescribedby}"
19535
- aria-details="${x => x.ariaDetails}"
19536
- aria-errormessage="${x => x.ariaErrormessage}"
19537
- aria-expanded="${x => x.ariaExpanded}"
19538
- aria-flowto="${x => x.ariaFlowto}"
19539
- aria-haspopup="${x => x.ariaHaspopup}"
19540
- aria-hidden="${x => x.ariaHidden}"
19541
- aria-invalid="${x => x.ariaInvalid}"
19542
- aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
19543
- aria-label="${x => x.ariaLabel}"
19544
- aria-labelledby="${x => x.ariaLabelledby}"
19545
- aria-live="${x => x.ariaLive}"
19546
- aria-owns="${x => x.ariaOwns}"
19547
- aria-relevant="${x => x.ariaRelevant}"
19548
- aria-roledescription="${x => x.ariaRoledescription}"
19549
- ${ref('control')}
19550
- >
19551
- ${startSlotTemplate(context, definition)}
19552
- <span class="content" part="content">
19553
- <slot></slot>
19554
- </span>
19555
- ${endSlotTemplate(context, definition)}
19556
- </div>
19557
- `;
19558
-
19559
- /**
19560
- * A nimble-styled toggle button control.
19561
- */
19562
- class ToggleButton extends Switch$1 {
19563
- constructor() {
19564
- super(...arguments);
19565
- /**
19566
- * @public
19567
- * @remarks
19568
- * HTML Attribute: appearance
19569
- */
19570
- this.appearance = ButtonAppearance.outline;
19571
- /**
19572
- * @public
19573
- * @remarks
19574
- * HTML Attribute: content-hidden
19575
- */
19576
- this.contentHidden = false;
19577
- }
19578
- }
19579
- __decorate([
19580
- attr
19581
- ], ToggleButton.prototype, "appearance", void 0);
19582
- __decorate([
19583
- attr({ attribute: 'content-hidden', mode: 'boolean' })
19584
- ], ToggleButton.prototype, "contentHidden", void 0);
19585
- applyMixins(ToggleButton, StartEnd, DelegatesARIAButton);
19586
- const nimbleToggleButton = ToggleButton.compose({
19587
- baseName: 'toggle-button',
19588
- template,
19589
- styles: styles$3,
19590
- shadowOptions: {
19591
- delegatesFocus: true
19592
- }
19593
- });
19594
- DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToggleButton());
19595
-
19596
19832
  const styles$2 = css `
19597
19833
  .positioning-region {
19598
19834
  display: flex;