@ni/nimble-components 11.1.0 → 11.3.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.
Files changed (33) hide show
  1. package/dist/all-components-bundle.js +785 -80
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1088 -969
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/number-field/index.d.ts +3 -0
  9. package/dist/esm/number-field/index.js +37 -3
  10. package/dist/esm/number-field/index.js.map +1 -1
  11. package/dist/esm/number-field/styles.js +50 -23
  12. package/dist/esm/number-field/styles.js.map +1 -1
  13. package/dist/esm/number-field/types.d.ts +9 -0
  14. package/dist/esm/number-field/types.js +9 -0
  15. package/dist/esm/number-field/types.js.map +1 -0
  16. package/dist/esm/text-field/styles.js +0 -1
  17. package/dist/esm/text-field/styles.js.map +1 -1
  18. package/dist/esm/theme-provider/design-token-comments.js +1 -0
  19. package/dist/esm/theme-provider/design-token-comments.js.map +1 -1
  20. package/dist/esm/theme-provider/design-token-names.js +1 -0
  21. package/dist/esm/theme-provider/design-token-names.js.map +1 -1
  22. package/dist/esm/theme-provider/design-tokens.d.ts +1 -0
  23. package/dist/esm/theme-provider/design-tokens.js +1 -0
  24. package/dist/esm/theme-provider/design-tokens.js.map +1 -1
  25. package/dist/esm/tooltip/index.d.ts +11 -0
  26. package/dist/esm/tooltip/index.js +15 -0
  27. package/dist/esm/tooltip/index.js.map +1 -0
  28. package/dist/esm/tooltip/styles.d.ts +1 -0
  29. package/dist/esm/tooltip/styles.js +27 -0
  30. package/dist/esm/tooltip/styles.js.map +1 -0
  31. package/dist/tokens-internal.scss +6 -0
  32. package/dist/tokens.scss +3 -0
  33. package/package.json +1 -1
@@ -13138,6 +13138,607 @@
13138
13138
  applyMixins(DelegatesARIAToolbar, ARIAGlobalStatesAndProperties);
13139
13139
  applyMixins(Toolbar$1, StartEnd, DelegatesARIAToolbar);
13140
13140
 
13141
+ /**
13142
+ * Creates a template for the {@link @microsoft/fast-foundation#(Tooltip:class)} component using the provided prefix.
13143
+ * @public
13144
+ */
13145
+ const tooltipTemplate = (context, definition) => {
13146
+ return html `
13147
+ ${when(x => x.tooltipVisible, html `
13148
+ <${context.tagFor(AnchoredRegion$1)}
13149
+ fixed-placement="true"
13150
+ auto-update-mode="${x => x.autoUpdateMode}"
13151
+ vertical-positioning-mode="${x => x.verticalPositioningMode}"
13152
+ vertical-default-position="${x => x.verticalDefaultPosition}"
13153
+ vertical-inset="${x => x.verticalInset}"
13154
+ vertical-scaling="${x => x.verticalScaling}"
13155
+ horizontal-positioning-mode="${x => x.horizontalPositioningMode}"
13156
+ horizontal-default-position="${x => x.horizontalDefaultPosition}"
13157
+ horizontal-scaling="${x => x.horizontalScaling}"
13158
+ horizontal-inset="${x => x.horizontalInset}"
13159
+ vertical-viewport-lock="${x => x.horizontalViewportLock}"
13160
+ horizontal-viewport-lock="${x => x.verticalViewportLock}"
13161
+ dir="${x => x.currentDirection}"
13162
+ ${ref("region")}
13163
+ >
13164
+ <div class="tooltip" part="tooltip" role="tooltip">
13165
+ <slot></slot>
13166
+ </div>
13167
+ </${context.tagFor(AnchoredRegion$1)}>
13168
+ `)}
13169
+ `;
13170
+ };
13171
+
13172
+ /**
13173
+ * Enumerates possible tooltip positions
13174
+ *
13175
+ * @public
13176
+ */
13177
+ const TooltipPosition = {
13178
+ /**
13179
+ * The tooltip is positioned above the element
13180
+ */
13181
+ top: "top",
13182
+ /**
13183
+ * The tooltip is positioned to the right of the element
13184
+ */
13185
+ right: "right",
13186
+ /**
13187
+ * The tooltip is positioned below the element
13188
+ */
13189
+ bottom: "bottom",
13190
+ /**
13191
+ * The tooltip is positioned to the left of the element
13192
+ */
13193
+ left: "left",
13194
+ /**
13195
+ * The tooltip is positioned before the element
13196
+ */
13197
+ start: "start",
13198
+ /**
13199
+ * The tooltip is positioned after the element
13200
+ */
13201
+ end: "end",
13202
+ /**
13203
+ * The tooltip is positioned above the element and to the left
13204
+ */
13205
+ topLeft: "top-left",
13206
+ /**
13207
+ * The tooltip is positioned above the element and to the right
13208
+ */
13209
+ topRight: "top-right",
13210
+ /**
13211
+ * The tooltip is positioned below the element and to the left
13212
+ */
13213
+ bottomLeft: "bottom-left",
13214
+ /**
13215
+ * The tooltip is positioned below the element and to the right
13216
+ */
13217
+ bottomRight: "bottom-right",
13218
+ /**
13219
+ * The tooltip is positioned above the element and to the left
13220
+ */
13221
+ topStart: "top-start",
13222
+ /**
13223
+ * The tooltip is positioned above the element and to the right
13224
+ */
13225
+ topEnd: "top-end",
13226
+ /**
13227
+ * The tooltip is positioned below the element and to the left
13228
+ */
13229
+ bottomStart: "bottom-start",
13230
+ /**
13231
+ * The tooltip is positioned below the element and to the right
13232
+ */
13233
+ bottomEnd: "bottom-end",
13234
+ };
13235
+
13236
+ /**
13237
+ * An Tooltip Custom HTML Element.
13238
+ *
13239
+ * @slot - The default slot for the tooltip content
13240
+ * @csspart tooltip - The tooltip element
13241
+ * @fires dismiss - Fires a custom 'dismiss' event when the tooltip is visible and escape key is pressed
13242
+ *
13243
+ * @public
13244
+ */
13245
+ class Tooltip$1 extends FoundationElement {
13246
+ constructor() {
13247
+ super(...arguments);
13248
+ /**
13249
+ * The id of the element the tooltip is anchored to
13250
+ *
13251
+ * @defaultValue - undefined
13252
+ * @public
13253
+ * HTML Attribute: anchor
13254
+ */
13255
+ this.anchor = "";
13256
+ /**
13257
+ * The delay in milliseconds before a tooltip is shown after a hover event
13258
+ *
13259
+ * @defaultValue - 300
13260
+ * @public
13261
+ * HTML Attribute: delay
13262
+ */
13263
+ this.delay = 300;
13264
+ /**
13265
+ * Controls when the tooltip updates its position, default is 'anchor' which only updates when
13266
+ * the anchor is resized. 'auto' will update on scroll/resize events.
13267
+ * Corresponds to anchored-region auto-update-mode.
13268
+ * @public
13269
+ * @remarks
13270
+ * HTML Attribute: auto-update-mode
13271
+ */
13272
+ this.autoUpdateMode = "anchor";
13273
+ /**
13274
+ * the html element currently being used as anchor.
13275
+ * Setting this directly overrides the anchor attribute.
13276
+ *
13277
+ * @public
13278
+ */
13279
+ this.anchorElement = null;
13280
+ /**
13281
+ * The current viewport element instance
13282
+ *
13283
+ * @internal
13284
+ */
13285
+ this.viewportElement = null;
13286
+ /**
13287
+ * @internal
13288
+ * @defaultValue "dynamic"
13289
+ */
13290
+ this.verticalPositioningMode = "dynamic";
13291
+ /**
13292
+ * @internal
13293
+ * @defaultValue "dynamic"
13294
+ */
13295
+ this.horizontalPositioningMode = "dynamic";
13296
+ /**
13297
+ * @internal
13298
+ */
13299
+ this.horizontalInset = "false";
13300
+ /**
13301
+ * @internal
13302
+ */
13303
+ this.verticalInset = "false";
13304
+ /**
13305
+ * @internal
13306
+ */
13307
+ this.horizontalScaling = "content";
13308
+ /**
13309
+ * @internal
13310
+ */
13311
+ this.verticalScaling = "content";
13312
+ /**
13313
+ * @internal
13314
+ */
13315
+ this.verticalDefaultPosition = undefined;
13316
+ /**
13317
+ * @internal
13318
+ */
13319
+ this.horizontalDefaultPosition = undefined;
13320
+ /**
13321
+ * @internal
13322
+ */
13323
+ this.tooltipVisible = false;
13324
+ /**
13325
+ * Track current direction to pass to the anchored region
13326
+ * updated when tooltip is shown
13327
+ *
13328
+ * @internal
13329
+ */
13330
+ this.currentDirection = Direction.ltr;
13331
+ /**
13332
+ * The timer that tracks delay time before the tooltip is shown on hover
13333
+ */
13334
+ this.showDelayTimer = null;
13335
+ /**
13336
+ * The timer that tracks delay time before the tooltip is hidden
13337
+ */
13338
+ this.hideDelayTimer = null;
13339
+ /**
13340
+ * Indicates whether the anchor is currently being hovered or has focus
13341
+ */
13342
+ this.isAnchorHoveredFocused = false;
13343
+ /**
13344
+ * Indicates whether the region is currently being hovered
13345
+ */
13346
+ this.isRegionHovered = false;
13347
+ /**
13348
+ * invoked when the anchored region's position relative to the anchor changes
13349
+ *
13350
+ * @internal
13351
+ */
13352
+ this.handlePositionChange = (ev) => {
13353
+ this.classList.toggle("top", this.region.verticalPosition === "start");
13354
+ this.classList.toggle("bottom", this.region.verticalPosition === "end");
13355
+ this.classList.toggle("inset-top", this.region.verticalPosition === "insetStart");
13356
+ this.classList.toggle("inset-bottom", this.region.verticalPosition === "insetEnd");
13357
+ this.classList.toggle("center-vertical", this.region.verticalPosition === "center");
13358
+ this.classList.toggle("left", this.region.horizontalPosition === "start");
13359
+ this.classList.toggle("right", this.region.horizontalPosition === "end");
13360
+ this.classList.toggle("inset-left", this.region.horizontalPosition === "insetStart");
13361
+ this.classList.toggle("inset-right", this.region.horizontalPosition === "insetEnd");
13362
+ this.classList.toggle("center-horizontal", this.region.horizontalPosition === "center");
13363
+ };
13364
+ /**
13365
+ * mouse enters region
13366
+ */
13367
+ this.handleRegionMouseOver = (ev) => {
13368
+ this.isRegionHovered = true;
13369
+ };
13370
+ /**
13371
+ * mouse leaves region
13372
+ */
13373
+ this.handleRegionMouseOut = (ev) => {
13374
+ this.isRegionHovered = false;
13375
+ this.startHideDelayTimer();
13376
+ };
13377
+ /**
13378
+ * mouse enters anchor
13379
+ */
13380
+ this.handleAnchorMouseOver = (ev) => {
13381
+ if (this.tooltipVisible) {
13382
+ // tooltip is already visible, just set the anchor hover flag
13383
+ this.isAnchorHoveredFocused = true;
13384
+ return;
13385
+ }
13386
+ this.startShowDelayTimer();
13387
+ };
13388
+ /**
13389
+ * mouse leaves anchor
13390
+ */
13391
+ this.handleAnchorMouseOut = (ev) => {
13392
+ this.isAnchorHoveredFocused = false;
13393
+ this.clearShowDelayTimer();
13394
+ this.startHideDelayTimer();
13395
+ };
13396
+ /**
13397
+ * anchor gets focus
13398
+ */
13399
+ this.handleAnchorFocusIn = (ev) => {
13400
+ this.startShowDelayTimer();
13401
+ };
13402
+ /**
13403
+ * anchor loses focus
13404
+ */
13405
+ this.handleAnchorFocusOut = (ev) => {
13406
+ this.isAnchorHoveredFocused = false;
13407
+ this.clearShowDelayTimer();
13408
+ this.startHideDelayTimer();
13409
+ };
13410
+ /**
13411
+ * starts the hide timer
13412
+ */
13413
+ this.startHideDelayTimer = () => {
13414
+ this.clearHideDelayTimer();
13415
+ if (!this.tooltipVisible) {
13416
+ return;
13417
+ }
13418
+ // allow 60 ms for account for pointer to move between anchor/tooltip
13419
+ // without hiding tooltip
13420
+ this.hideDelayTimer = window.setTimeout(() => {
13421
+ this.updateTooltipVisibility();
13422
+ }, 60);
13423
+ };
13424
+ /**
13425
+ * clears the hide delay
13426
+ */
13427
+ this.clearHideDelayTimer = () => {
13428
+ if (this.hideDelayTimer !== null) {
13429
+ clearTimeout(this.hideDelayTimer);
13430
+ this.hideDelayTimer = null;
13431
+ }
13432
+ };
13433
+ /**
13434
+ * starts the show timer if not currently running
13435
+ */
13436
+ this.startShowDelayTimer = () => {
13437
+ if (this.isAnchorHoveredFocused) {
13438
+ return;
13439
+ }
13440
+ if (this.delay > 1) {
13441
+ if (this.showDelayTimer === null)
13442
+ this.showDelayTimer = window.setTimeout(() => {
13443
+ this.startHover();
13444
+ }, this.delay);
13445
+ return;
13446
+ }
13447
+ this.startHover();
13448
+ };
13449
+ /**
13450
+ * start hover
13451
+ */
13452
+ this.startHover = () => {
13453
+ this.isAnchorHoveredFocused = true;
13454
+ this.updateTooltipVisibility();
13455
+ };
13456
+ /**
13457
+ * clears the show delay
13458
+ */
13459
+ this.clearShowDelayTimer = () => {
13460
+ if (this.showDelayTimer !== null) {
13461
+ clearTimeout(this.showDelayTimer);
13462
+ this.showDelayTimer = null;
13463
+ }
13464
+ };
13465
+ /**
13466
+ * Gets the anchor element by id
13467
+ */
13468
+ this.getAnchor = () => {
13469
+ const rootNode = this.getRootNode();
13470
+ if (rootNode instanceof ShadowRoot) {
13471
+ return rootNode.getElementById(this.anchor);
13472
+ }
13473
+ return document.getElementById(this.anchor);
13474
+ };
13475
+ /**
13476
+ * handles key down events to check for dismiss
13477
+ */
13478
+ this.handleDocumentKeydown = (e) => {
13479
+ if (!e.defaultPrevented && this.tooltipVisible) {
13480
+ switch (e.key) {
13481
+ case keyEscape:
13482
+ this.isAnchorHoveredFocused = false;
13483
+ this.updateTooltipVisibility();
13484
+ this.$emit("dismiss");
13485
+ break;
13486
+ }
13487
+ }
13488
+ };
13489
+ /**
13490
+ * determines whether to show or hide the tooltip based on current state
13491
+ */
13492
+ this.updateTooltipVisibility = () => {
13493
+ if (this.visible === false) {
13494
+ this.hideTooltip();
13495
+ }
13496
+ else if (this.visible === true) {
13497
+ this.showTooltip();
13498
+ return;
13499
+ }
13500
+ else {
13501
+ if (this.isAnchorHoveredFocused || this.isRegionHovered) {
13502
+ this.showTooltip();
13503
+ return;
13504
+ }
13505
+ this.hideTooltip();
13506
+ }
13507
+ };
13508
+ /**
13509
+ * shows the tooltip
13510
+ */
13511
+ this.showTooltip = () => {
13512
+ if (this.tooltipVisible) {
13513
+ return;
13514
+ }
13515
+ this.currentDirection = getDirection(this);
13516
+ this.tooltipVisible = true;
13517
+ document.addEventListener("keydown", this.handleDocumentKeydown);
13518
+ DOM.queueUpdate(this.setRegionProps);
13519
+ };
13520
+ /**
13521
+ * hides the tooltip
13522
+ */
13523
+ this.hideTooltip = () => {
13524
+ if (!this.tooltipVisible) {
13525
+ return;
13526
+ }
13527
+ this.clearHideDelayTimer();
13528
+ if (this.region !== null && this.region !== undefined) {
13529
+ this.region.removeEventListener("positionchange", this.handlePositionChange);
13530
+ this.region.viewportElement = null;
13531
+ this.region.anchorElement = null;
13532
+ this.region.removeEventListener("mouseover", this.handleRegionMouseOver);
13533
+ this.region.removeEventListener("mouseout", this.handleRegionMouseOut);
13534
+ }
13535
+ document.removeEventListener("keydown", this.handleDocumentKeydown);
13536
+ this.tooltipVisible = false;
13537
+ };
13538
+ /**
13539
+ * updates the tooltip anchored region props after it has been
13540
+ * added to the DOM
13541
+ */
13542
+ this.setRegionProps = () => {
13543
+ if (!this.tooltipVisible) {
13544
+ return;
13545
+ }
13546
+ this.region.viewportElement = this.viewportElement;
13547
+ this.region.anchorElement = this.anchorElement;
13548
+ this.region.addEventListener("positionchange", this.handlePositionChange);
13549
+ this.region.addEventListener("mouseover", this.handleRegionMouseOver, {
13550
+ passive: true,
13551
+ });
13552
+ this.region.addEventListener("mouseout", this.handleRegionMouseOut, {
13553
+ passive: true,
13554
+ });
13555
+ };
13556
+ }
13557
+ visibleChanged() {
13558
+ if (this.$fastController.isConnected) {
13559
+ this.updateTooltipVisibility();
13560
+ this.updateLayout();
13561
+ }
13562
+ }
13563
+ anchorChanged() {
13564
+ if (this.$fastController.isConnected) {
13565
+ this.anchorElement = this.getAnchor();
13566
+ }
13567
+ }
13568
+ positionChanged() {
13569
+ if (this.$fastController.isConnected) {
13570
+ this.updateLayout();
13571
+ }
13572
+ }
13573
+ anchorElementChanged(oldValue) {
13574
+ if (this.$fastController.isConnected) {
13575
+ if (oldValue !== null && oldValue !== undefined) {
13576
+ oldValue.removeEventListener("mouseover", this.handleAnchorMouseOver);
13577
+ oldValue.removeEventListener("mouseout", this.handleAnchorMouseOut);
13578
+ oldValue.removeEventListener("focusin", this.handleAnchorFocusIn);
13579
+ oldValue.removeEventListener("focusout", this.handleAnchorFocusOut);
13580
+ }
13581
+ if (this.anchorElement !== null && this.anchorElement !== undefined) {
13582
+ this.anchorElement.addEventListener("mouseover", this.handleAnchorMouseOver, { passive: true });
13583
+ this.anchorElement.addEventListener("mouseout", this.handleAnchorMouseOut, { passive: true });
13584
+ this.anchorElement.addEventListener("focusin", this.handleAnchorFocusIn, {
13585
+ passive: true,
13586
+ });
13587
+ this.anchorElement.addEventListener("focusout", this.handleAnchorFocusOut, { passive: true });
13588
+ const anchorId = this.anchorElement.id;
13589
+ if (this.anchorElement.parentElement !== null) {
13590
+ this.anchorElement.parentElement
13591
+ .querySelectorAll(":hover")
13592
+ .forEach(element => {
13593
+ if (element.id === anchorId) {
13594
+ this.startShowDelayTimer();
13595
+ }
13596
+ });
13597
+ }
13598
+ }
13599
+ if (this.region !== null &&
13600
+ this.region !== undefined &&
13601
+ this.tooltipVisible) {
13602
+ this.region.anchorElement = this.anchorElement;
13603
+ }
13604
+ this.updateLayout();
13605
+ }
13606
+ }
13607
+ viewportElementChanged() {
13608
+ if (this.region !== null && this.region !== undefined) {
13609
+ this.region.viewportElement = this.viewportElement;
13610
+ }
13611
+ this.updateLayout();
13612
+ }
13613
+ connectedCallback() {
13614
+ super.connectedCallback();
13615
+ this.anchorElement = this.getAnchor();
13616
+ this.updateTooltipVisibility();
13617
+ }
13618
+ disconnectedCallback() {
13619
+ this.hideTooltip();
13620
+ this.clearShowDelayTimer();
13621
+ this.clearHideDelayTimer();
13622
+ super.disconnectedCallback();
13623
+ }
13624
+ /**
13625
+ * updated the properties being passed to the anchored region
13626
+ */
13627
+ updateLayout() {
13628
+ this.verticalPositioningMode = "locktodefault";
13629
+ this.horizontalPositioningMode = "locktodefault";
13630
+ switch (this.position) {
13631
+ case TooltipPosition.top:
13632
+ case TooltipPosition.bottom:
13633
+ this.verticalDefaultPosition = this.position;
13634
+ this.horizontalDefaultPosition = "center";
13635
+ break;
13636
+ case TooltipPosition.right:
13637
+ case TooltipPosition.left:
13638
+ case TooltipPosition.start:
13639
+ case TooltipPosition.end:
13640
+ this.verticalDefaultPosition = "center";
13641
+ this.horizontalDefaultPosition = this.position;
13642
+ break;
13643
+ case TooltipPosition.topLeft:
13644
+ this.verticalDefaultPosition = "top";
13645
+ this.horizontalDefaultPosition = "left";
13646
+ break;
13647
+ case TooltipPosition.topRight:
13648
+ this.verticalDefaultPosition = "top";
13649
+ this.horizontalDefaultPosition = "right";
13650
+ break;
13651
+ case TooltipPosition.bottomLeft:
13652
+ this.verticalDefaultPosition = "bottom";
13653
+ this.horizontalDefaultPosition = "left";
13654
+ break;
13655
+ case TooltipPosition.bottomRight:
13656
+ this.verticalDefaultPosition = "bottom";
13657
+ this.horizontalDefaultPosition = "right";
13658
+ break;
13659
+ case TooltipPosition.topStart:
13660
+ this.verticalDefaultPosition = "top";
13661
+ this.horizontalDefaultPosition = "start";
13662
+ break;
13663
+ case TooltipPosition.topEnd:
13664
+ this.verticalDefaultPosition = "top";
13665
+ this.horizontalDefaultPosition = "end";
13666
+ break;
13667
+ case TooltipPosition.bottomStart:
13668
+ this.verticalDefaultPosition = "bottom";
13669
+ this.horizontalDefaultPosition = "start";
13670
+ break;
13671
+ case TooltipPosition.bottomEnd:
13672
+ this.verticalDefaultPosition = "bottom";
13673
+ this.horizontalDefaultPosition = "end";
13674
+ break;
13675
+ default:
13676
+ this.verticalPositioningMode = "dynamic";
13677
+ this.horizontalPositioningMode = "dynamic";
13678
+ this.verticalDefaultPosition = void 0;
13679
+ this.horizontalDefaultPosition = "center";
13680
+ break;
13681
+ }
13682
+ }
13683
+ }
13684
+ __decorate$1([
13685
+ attr({ mode: "boolean" })
13686
+ ], Tooltip$1.prototype, "visible", void 0);
13687
+ __decorate$1([
13688
+ attr
13689
+ ], Tooltip$1.prototype, "anchor", void 0);
13690
+ __decorate$1([
13691
+ attr
13692
+ ], Tooltip$1.prototype, "delay", void 0);
13693
+ __decorate$1([
13694
+ attr
13695
+ ], Tooltip$1.prototype, "position", void 0);
13696
+ __decorate$1([
13697
+ attr({ attribute: "auto-update-mode" })
13698
+ ], Tooltip$1.prototype, "autoUpdateMode", void 0);
13699
+ __decorate$1([
13700
+ attr({ attribute: "horizontal-viewport-lock" })
13701
+ ], Tooltip$1.prototype, "horizontalViewportLock", void 0);
13702
+ __decorate$1([
13703
+ attr({ attribute: "vertical-viewport-lock" })
13704
+ ], Tooltip$1.prototype, "verticalViewportLock", void 0);
13705
+ __decorate$1([
13706
+ observable
13707
+ ], Tooltip$1.prototype, "anchorElement", void 0);
13708
+ __decorate$1([
13709
+ observable
13710
+ ], Tooltip$1.prototype, "viewportElement", void 0);
13711
+ __decorate$1([
13712
+ observable
13713
+ ], Tooltip$1.prototype, "verticalPositioningMode", void 0);
13714
+ __decorate$1([
13715
+ observable
13716
+ ], Tooltip$1.prototype, "horizontalPositioningMode", void 0);
13717
+ __decorate$1([
13718
+ observable
13719
+ ], Tooltip$1.prototype, "horizontalInset", void 0);
13720
+ __decorate$1([
13721
+ observable
13722
+ ], Tooltip$1.prototype, "verticalInset", void 0);
13723
+ __decorate$1([
13724
+ observable
13725
+ ], Tooltip$1.prototype, "horizontalScaling", void 0);
13726
+ __decorate$1([
13727
+ observable
13728
+ ], Tooltip$1.prototype, "verticalScaling", void 0);
13729
+ __decorate$1([
13730
+ observable
13731
+ ], Tooltip$1.prototype, "verticalDefaultPosition", void 0);
13732
+ __decorate$1([
13733
+ observable
13734
+ ], Tooltip$1.prototype, "horizontalDefaultPosition", void 0);
13735
+ __decorate$1([
13736
+ observable
13737
+ ], Tooltip$1.prototype, "tooltipVisible", void 0);
13738
+ __decorate$1([
13739
+ observable
13740
+ ], Tooltip$1.prototype, "currentDirection", void 0);
13741
+
13141
13742
  /**
13142
13743
  * The template for the {@link @microsoft/fast-foundation#(TreeItem:class)} component.
13143
13744
  * @public
@@ -13692,7 +14293,7 @@
13692
14293
  */
13693
14294
  const focusVisible$1 = canUseFocusVisible() ? "focus-visible" : "focus";
13694
14295
 
13695
- const styles$s = css `
14296
+ const styles$t = css `
13696
14297
  :host {
13697
14298
  contain: layout;
13698
14299
  display: block;
@@ -13716,7 +14317,7 @@
13716
14317
  baseName: 'anchored-region',
13717
14318
  baseClass: AnchoredRegion$1,
13718
14319
  template: anchoredRegionTemplate,
13719
- styles: styles$s
14320
+ styles: styles$t
13720
14321
  });
13721
14322
  DesignSystem.getOrCreate()
13722
14323
  .withPrefix('nimble')
@@ -14017,6 +14618,7 @@
14017
14618
  tooltipCaptionFontWeight: 'tooltip-caption-font-weight',
14018
14619
  tooltipCaptionFontLineHeight: 'tooltip-caption-font-line-height',
14019
14620
  tooltipCaptionFallbackFontFamily: 'tooltip-caption-fallback-font-family',
14621
+ tooltipBackgroundColor: 'tooltip-background-color',
14020
14622
  errorTextFont: 'error-text-font',
14021
14623
  errorTextFontColor: 'error-text-font-color',
14022
14624
  errorTextDisabledFontColor: 'error-text-disabled-font-color',
@@ -14053,7 +14655,7 @@
14053
14655
 
14054
14656
  const template$5 = html `<slot></slot>`;
14055
14657
 
14056
- const styles$r = css `
14658
+ const styles$s = css `
14057
14659
  :host {
14058
14660
  display: contents;
14059
14661
  }
@@ -14109,7 +14711,7 @@
14109
14711
  ], ThemeProvider.prototype, "theme", void 0);
14110
14712
  const nimbleDesignSystemProvider = ThemeProvider.compose({
14111
14713
  baseName: 'theme-provider',
14112
- styles: styles$r,
14714
+ styles: styles$s,
14113
14715
  template: template$5
14114
14716
  });
14115
14717
  DesignSystem.getOrCreate()
@@ -14148,6 +14750,7 @@
14148
14750
  const iconColor = DesignToken.create(styleNameFromTokenName(tokenNames.iconColor)).withDefault((element) => getColorForTheme(element, Black91, Black15, White));
14149
14751
  const popupBoxShadowColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBoxShadowColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black75, Black85, Black85), 0.3));
14150
14752
  const popupBorderColor = DesignToken.create(styleNameFromTokenName(tokenNames.popupBorderColor)).withDefault((element) => hexToRgbaCssColor(getColorForTheme(element, Black91, Black15, White), 0.3));
14753
+ const tooltipBackgroundColor = DesignToken.create(styleNameFromTokenName(tokenNames.tooltipBackgroundColor)).withDefault((element) => getColorForTheme(element, Black15, Black85, ForestGreen));
14151
14754
  // Component Sizing Tokens
14152
14755
  const controlHeight = DesignToken.create(styleNameFromTokenName(tokenNames.controlHeight)).withDefault('32px');
14153
14756
  const smallPadding = DesignToken.create(styleNameFromTokenName(tokenNames.smallPadding)).withDefault('4px');
@@ -14171,7 +14774,7 @@
14171
14774
  const [groupHeaderFont, groupHeaderFontColor, groupHeaderDisabledFontColor, groupHeaderFontFamily, groupHeaderFontWeight, groupHeaderFontSize, groupHeaderFontLineHeight, groupHeaderFallbackFontFamily] = createFontTokens(tokenNames.groupHeaderFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), GroupLabel1Family, GroupLabel1Weight, GroupLabel1Size, GroupLabel1LineHeight, 'sans-serif');
14172
14775
  const [controlLabelFont, controlLabelFontColor, controlLabelDisabledFontColor, controlLabelFontFamily, controlLabelFontWeight, controlLabelFontSize, controlLabelFontLineHeight, controlLabelFallbackFontFamily] = createFontTokens(tokenNames.controlLabelFont, (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.6), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), ControlLabel1Family, ControlLabel1Weight, ControlLabel1Size, ControlLabel1LineHeight, 'sans-serif');
14173
14776
  const [buttonLabelFont, buttonLabelFontColor, buttonLabelDisabledFontColor, buttonLabelFontFamily, buttonLabelFontWeight, buttonLabelFontSize, buttonLabelFontLineHeight, buttonLabelFallbackFontFamily] = createFontTokens(tokenNames.buttonLabelFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), ButtonLabel1Family, ButtonLabel1Weight, ButtonLabel1Size, ButtonLabel1LineHeight, 'sans-serif');
14174
- createFontTokens(tokenNames.tooltipCaptionFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), TooltipCaptionFamily, TooltipCaptionWeight, TooltipCaptionSize, TooltipCaptionLineHeight, 'sans-serif');
14777
+ const [tooltipCaptionFont, tooltipCaptionFontColor, tooltipCaptionDisabledFontColor, tooltipCaptionFontFamily, tooltipCaptionFontWeight, tooltipCaptionFontSize, tooltipCaptionFontLineHeight, tooltipCaptionFallbackFontFamily] = createFontTokens(tokenNames.tooltipCaptionFont, (element) => getDefaultFontColorForTheme(element), (element) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), TooltipCaptionFamily, TooltipCaptionWeight, TooltipCaptionSize, TooltipCaptionLineHeight, 'sans-serif');
14175
14778
  const [errorTextFont, errorTextFontColor, errorTextDisabledFontColor, errorTextFontFamily, errorTextFontWeight, errorTextFontSize, errorTextFontLineHeight, errorTextFallbackFontFamily] = createFontTokens(tokenNames.errorTextFont, (element) => getFailColorForTheme(element), (element) => hexToRgbaCssColor(getFailColorForTheme(element), 0.3), ErrorLightUiFamily, ErrorLightUiWeight, ErrorLightUiSize, TooltipCaptionLineHeight, 'sans-serif');
14176
14779
  // Font Transform Tokens
14177
14780
  const groupHeaderTextTransform = DesignToken.create(styleNameFromTokenName(tokenNames.groupHeaderTextTransform)).withDefault('uppercase');
@@ -14358,7 +14961,7 @@
14358
14961
  */
14359
14962
  const themeBehavior = (lightStyle, darkStyleOrAlias, colorStyleOrAlias) => new ThemeStyleSheetBehavior(lightStyle, darkStyleOrAlias, colorStyleOrAlias);
14360
14963
 
14361
- const styles$q = css `
14964
+ const styles$r = css `
14362
14965
  ${display('inline-block')}
14363
14966
 
14364
14967
  :host {
@@ -14421,7 +15024,7 @@
14421
15024
  baseName: 'breadcrumb',
14422
15025
  baseClass: Breadcrumb$1,
14423
15026
  template: breadcrumbTemplate,
14424
- styles: styles$q
15027
+ styles: styles$r
14425
15028
  });
14426
15029
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleBreadcrumb());
14427
15030
 
@@ -15007,7 +15610,7 @@
15007
15610
  */
15008
15611
  const focusVisible = `:${focusVisible$1}`;
15009
15612
 
15010
- const styles$p = css `
15613
+ const styles$q = css `
15011
15614
  ${display('inline-flex')}
15012
15615
 
15013
15616
  :host {
@@ -15087,7 +15690,7 @@
15087
15690
  baseName: 'breadcrumb-item',
15088
15691
  baseClass: BreadcrumbItem$1,
15089
15692
  template: breadcrumbItemTemplate,
15090
- styles: styles$p,
15693
+ styles: styles$q,
15091
15694
  separator: forwardSlash16X16.data
15092
15695
  });
15093
15696
  DesignSystem.getOrCreate()
@@ -15117,7 +15720,7 @@
15117
15720
  block: 'block'
15118
15721
  };
15119
15722
 
15120
- const styles$o = css `
15723
+ const styles$p = css `
15121
15724
  ${display('inline-flex')}
15122
15725
 
15123
15726
  :host {
@@ -15324,7 +15927,7 @@
15324
15927
  `));
15325
15928
 
15326
15929
  // prettier-ignore
15327
- const styles$n = styles$o
15930
+ const styles$o = styles$p
15328
15931
  .withBehaviors(appearanceBehavior(ButtonAppearance.outline, css `
15329
15932
  :host(.primary) .control {
15330
15933
  box-shadow: 0px 0px 0px ${borderWidth} rgba(${actionRgbPartialColor}, 0.3) inset;
@@ -15438,14 +16041,14 @@
15438
16041
  baseName: 'button',
15439
16042
  baseClass: Button$1,
15440
16043
  template: buttonTemplate,
15441
- styles: styles$n,
16044
+ styles: styles$o,
15442
16045
  shadowOptions: {
15443
16046
  delegatesFocus: true
15444
16047
  }
15445
16048
  });
15446
16049
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleButton());
15447
16050
 
15448
- const styles$m = css `
16051
+ const styles$n = css `
15449
16052
  ${display('inline-flex')}
15450
16053
 
15451
16054
  :host {
@@ -15563,7 +16166,7 @@
15563
16166
  baseName: 'checkbox',
15564
16167
  baseClass: Checkbox$1,
15565
16168
  template: checkboxTemplate,
15566
- styles: styles$m,
16169
+ styles: styles$n,
15567
16170
  checkedIndicator: check16X16.data,
15568
16171
  indeterminateIndicator: minus16X16.data
15569
16172
  });
@@ -15581,7 +16184,7 @@
15581
16184
  </template
15582
16185
  `;
15583
16186
 
15584
- const styles$l = css `
16187
+ const styles$m = css `
15585
16188
  ${display('inline-flex')}
15586
16189
 
15587
16190
  :host {
@@ -15628,7 +16231,7 @@
15628
16231
  const composedIcon = iconClass.compose({
15629
16232
  baseName,
15630
16233
  template: template$4,
15631
- styles: styles$l,
16234
+ styles: styles$m,
15632
16235
  baseClass: iconClass
15633
16236
  });
15634
16237
  DesignSystem.getOrCreate().withPrefix('nimble').register(composedIcon());
@@ -15656,7 +16259,7 @@
15656
16259
  }
15657
16260
  registerIcon('icon-arrow-expander-down', IconArrowExpanderDown);
15658
16261
 
15659
- const styles$k = css `
16262
+ const styles$l = css `
15660
16263
  ${display('inline-flex')}
15661
16264
 
15662
16265
  :host {
@@ -15845,7 +16448,7 @@
15845
16448
  }
15846
16449
  `;
15847
16450
 
15848
- const styles$j = css `
16451
+ const styles$k = css `
15849
16452
  .error-icon {
15850
16453
  display: none;
15851
16454
  }
@@ -15883,9 +16486,9 @@
15883
16486
  }
15884
16487
  `;
15885
16488
 
15886
- const styles$i = css `
16489
+ const styles$j = css `
16490
+ ${styles$l}
15887
16491
  ${styles$k}
15888
- ${styles$j}
15889
16492
 
15890
16493
  :host {
15891
16494
  --ni-private-hover-bottom-border-width: 2px;
@@ -16057,7 +16660,7 @@
16057
16660
  baseName: 'combobox',
16058
16661
  baseClass: Combobox$1,
16059
16662
  template: comboboxTemplate,
16060
- styles: styles$i,
16663
+ styles: styles$j,
16061
16664
  shadowOptions: {
16062
16665
  delegatesFocus: true
16063
16666
  },
@@ -17182,7 +17785,7 @@
17182
17785
  slideOutOptions
17183
17786
  };
17184
17787
 
17185
- const styles$h = css `
17788
+ const styles$i = css `
17186
17789
  ${display('block')}
17187
17790
 
17188
17791
  :host {
@@ -17494,7 +18097,7 @@
17494
18097
  const nimbleDrawer = Drawer.compose({
17495
18098
  baseName: 'drawer',
17496
18099
  template: dialogTemplate,
17497
- styles: styles$h
18100
+ styles: styles$i
17498
18101
  });
17499
18102
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleDrawer());
17500
18103
 
@@ -19038,7 +19641,7 @@
19038
19641
  }
19039
19642
  registerIcon('icon-xmark-check', IconXmarkCheck);
19040
19643
 
19041
- const styles$g = css `
19644
+ const styles$h = css `
19042
19645
  ${display('flex')}
19043
19646
 
19044
19647
  :host {
@@ -19117,11 +19720,11 @@
19117
19720
  baseName: 'list-option',
19118
19721
  baseClass: ListboxOption,
19119
19722
  template: listboxOptionTemplate,
19120
- styles: styles$g
19723
+ styles: styles$h
19121
19724
  });
19122
19725
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleListOption());
19123
19726
 
19124
- const styles$f = css `
19727
+ const styles$g = css `
19125
19728
  ${display('grid')}
19126
19729
 
19127
19730
  :host {
@@ -19176,11 +19779,11 @@
19176
19779
  baseName: 'menu',
19177
19780
  baseClass: Menu$1,
19178
19781
  template: menuTemplate,
19179
- styles: styles$f
19782
+ styles: styles$g
19180
19783
  });
19181
19784
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenu());
19182
19785
 
19183
- const styles$e = css `
19786
+ const styles$f = css `
19184
19787
  ${display('inline-block')}
19185
19788
 
19186
19789
  :host {
@@ -19198,8 +19801,8 @@
19198
19801
  }
19199
19802
  `;
19200
19803
 
19201
- const styles$d = css `
19202
- ${styles$o}
19804
+ const styles$e = css `
19805
+ ${styles$p}
19203
19806
 
19204
19807
  .control[aria-pressed='true'] {
19205
19808
  background-color: ${fillSelectedColor};
@@ -19301,7 +19904,7 @@
19301
19904
  const nimbleToggleButton = ToggleButton.compose({
19302
19905
  baseName: 'toggle-button',
19303
19906
  template: template$3,
19304
- styles: styles$d,
19907
+ styles: styles$e,
19305
19908
  shadowOptions: {
19306
19909
  delegatesFocus: true
19307
19910
  }
@@ -19518,14 +20121,14 @@
19518
20121
  const nimbleMenuButton = MenuButton.compose({
19519
20122
  baseName: 'menu-button',
19520
20123
  template: template$2,
19521
- styles: styles$e,
20124
+ styles: styles$f,
19522
20125
  shadowOptions: {
19523
20126
  delegatesFocus: true
19524
20127
  }
19525
20128
  });
19526
20129
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuButton());
19527
20130
 
19528
- const styles$c = css `
20131
+ const styles$d = css `
19529
20132
  ${display('grid')}
19530
20133
 
19531
20134
  :host {
@@ -19623,12 +20226,21 @@
19623
20226
  baseName: 'menu-item',
19624
20227
  baseClass: MenuItem$1,
19625
20228
  template: menuItemTemplate,
19626
- styles: styles$c,
20229
+ styles: styles$d,
19627
20230
  expandCollapseGlyph: arrowExpanderRight16X16.data
19628
20231
  });
19629
20232
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleMenuItem());
19630
20233
 
19631
- const styles$b = css `
20234
+ /**
20235
+ * Values for the 'appearance' property of the number field
20236
+ */
20237
+ const NumberFieldAppearance = {
20238
+ underline: 'underline',
20239
+ outline: 'outline',
20240
+ block: 'block'
20241
+ };
20242
+
20243
+ const styles$c = css `
19632
20244
  ${display('inline-block')}
19633
20245
 
19634
20246
  :host {
@@ -19651,6 +20263,10 @@
19651
20263
  font: ${controlLabelFont};
19652
20264
  }
19653
20265
 
20266
+ :host([disabled]) .label {
20267
+ color: ${controlLabelDisabledFontColor};
20268
+ }
20269
+
19654
20270
  .root {
19655
20271
  box-sizing: border-box;
19656
20272
  position: relative;
@@ -19658,7 +20274,7 @@
19658
20274
  flex-direction: row;
19659
20275
  justify-content: center;
19660
20276
  border-radius: 0px;
19661
- border-bottom: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
20277
+ border: 0px solid rgba(${borderRgbPartialColor}, 0.3);
19662
20278
  gap: calc(${standardPadding} / 2);
19663
20279
  }
19664
20280
 
@@ -19666,9 +20282,8 @@
19666
20282
  border-bottom-color: ${borderHoverColor};
19667
20283
  }
19668
20284
 
19669
- :host([disabled]) .root,
19670
- :host([disabled]) .root:hover {
19671
- border-bottom: ${borderWidth} solid ${bodyDisabledFontColor};
20285
+ :host([disabled]) .root {
20286
+ border-color: rgba(${borderRgbPartialColor}, 0.1);
19672
20287
  }
19673
20288
 
19674
20289
  .root::before {
@@ -19682,7 +20297,6 @@
19682
20297
  .root::after {
19683
20298
  content: '';
19684
20299
  position: absolute;
19685
- left: 0px;
19686
20300
  bottom: calc(-1 * ${borderWidth});
19687
20301
  width: 0px;
19688
20302
  height: 0px;
@@ -19718,7 +20332,7 @@
19718
20332
  font: inherit;
19719
20333
  background: transparent;
19720
20334
  color: inherit;
19721
- height: calc(${controlHeight} - ${borderWidth});
20335
+ height: ${controlHeight};
19722
20336
  width: 100%;
19723
20337
  border: none;
19724
20338
  padding: 0px;
@@ -19750,32 +20364,67 @@
19750
20364
 
19751
20365
  .controls {
19752
20366
  display: flex;
19753
- flex-direction: column;
19754
- }
19755
-
19756
- .step-up,
19757
- .step-down {
19758
- display: inline-flex;
19759
- height: 15px;
19760
- width: 15px;
19761
- cursor: pointer;
20367
+ flex-direction: row-reverse;
19762
20368
  justify-content: center;
19763
20369
  align-items: center;
19764
20370
  }
19765
20371
 
19766
- .step-up svg,
19767
- .step-down svg {
19768
- height: ${iconSize};
19769
- width: ${iconSize};
19770
- fill: ${borderColor};
20372
+ .step-up-down-button {
20373
+ ${controlHeight.cssCustomProperty}: 24px;
19771
20374
  }
19772
- `;
20375
+ `.withBehaviors(appearanceBehavior(NumberFieldAppearance.underline, css `
20376
+ .root {
20377
+ border-bottom-width: ${borderWidth};
20378
+ padding-top: ${borderWidth};
20379
+ padding-left: ${borderWidth};
20380
+ padding-right: ${borderWidth};
20381
+ }
20382
+
20383
+ .control {
20384
+ height: calc(${controlHeight} - 2 * ${borderWidth});
20385
+ }
20386
+ `), appearanceBehavior(NumberFieldAppearance.block, css `
20387
+ .root {
20388
+ background-color: rgba(${borderRgbPartialColor}, 0.1);
20389
+ padding-left: ${borderWidth};
20390
+ padding-right: ${borderWidth};
20391
+ }
20392
+
20393
+ .root:focus-within,
20394
+ :host(.invalid) .root {
20395
+ border-bottom-width: ${borderWidth};
20396
+ }
20397
+
20398
+ :host([disabled]) .root {
20399
+ background-color: rgba(${borderRgbPartialColor}, 0.07);
20400
+ }
20401
+ `), appearanceBehavior(NumberFieldAppearance.outline, css `
20402
+ .root {
20403
+ border-width: ${borderWidth};
20404
+ }
20405
+
20406
+ .control {
20407
+ height: calc(${controlHeight} - 2 * ${borderWidth});
20408
+ }
20409
+ `));
19773
20410
 
19774
20411
  /**
19775
20412
  * A nimble-styled HTML number input
19776
20413
  */
19777
20414
  class NumberField extends NumberField$1 {
20415
+ constructor() {
20416
+ super(...arguments);
20417
+ this.appearance = NumberFieldAppearance.underline;
20418
+ }
20419
+ connectedCallback() {
20420
+ super.connectedCallback();
20421
+ // This is a workaround for FAST issue: https://github.com/microsoft/fast/issues/6148
20422
+ this.control.setAttribute('role', 'spinbutton');
20423
+ }
19778
20424
  }
20425
+ __decorate([
20426
+ attr
20427
+ ], NumberField.prototype, "appearance", void 0);
19779
20428
  /**
19780
20429
  * A function that returns a number-field registration for configuring the component with a DesignSystem.
19781
20430
  *
@@ -19788,17 +20437,37 @@
19788
20437
  baseName: 'number-field',
19789
20438
  baseClass: NumberField$1,
19790
20439
  template: numberFieldTemplate,
19791
- styles: styles$b,
20440
+ styles: styles$c,
19792
20441
  shadowOptions: {
19793
20442
  delegatesFocus: true
19794
20443
  },
19795
- stepDownGlyph: arrowExpanderDown16X16.data,
19796
- stepUpGlyph: arrowExpanderUp16X16.data
20444
+ stepDownGlyph: html `
20445
+ <nimble-button
20446
+ class="step-up-down-button"
20447
+ appearance="ghost"
20448
+ content-hidden
20449
+ tabindex="-1"
20450
+ >
20451
+ "Decrement"
20452
+ <nimble-icon-minus-wide slot="start"></nimble-icon-minus-wide>
20453
+ </nimble-button>
20454
+ `,
20455
+ stepUpGlyph: html `
20456
+ <nimble-button
20457
+ class="step-up-down-button"
20458
+ appearance="ghost"
20459
+ content-hidden
20460
+ tabindex="-1"
20461
+ >
20462
+ "Increment"
20463
+ <nimble-icon-add slot="start"></nimble-icon-add>
20464
+ </nimble-button>
20465
+ `
19797
20466
  });
19798
20467
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleNumberField());
19799
20468
 
19800
- const styles$a = css `
19801
- ${styles$k}
20469
+ const styles$b = css `
20470
+ ${styles$l}
19802
20471
  `;
19803
20472
 
19804
20473
  /**
@@ -19836,12 +20505,12 @@
19836
20505
  baseName: 'select',
19837
20506
  baseClass: Select$1,
19838
20507
  template: selectTemplate,
19839
- styles: styles$a,
20508
+ styles: styles$b,
19840
20509
  indicator: arrowExpanderDown16X16.data
19841
20510
  });
19842
20511
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSelect());
19843
20512
 
19844
- const styles$9 = css `
20513
+ const styles$a = css `
19845
20514
  ${display('inline-flex')}
19846
20515
 
19847
20516
  :host {
@@ -20054,11 +20723,11 @@
20054
20723
  baseClass: Switch$1,
20055
20724
  baseName: 'switch',
20056
20725
  template: template$1,
20057
- styles: styles$9
20726
+ styles: styles$a
20058
20727
  });
20059
20728
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleSwitch());
20060
20729
 
20061
- const styles$8 = css `
20730
+ const styles$9 = css `
20062
20731
  ${display('inline-flex')}
20063
20732
 
20064
20733
  :host {
@@ -20162,11 +20831,11 @@
20162
20831
  baseName: 'tab',
20163
20832
  baseClass: Tab$1,
20164
20833
  template: tabTemplate,
20165
- styles: styles$8
20834
+ styles: styles$9
20166
20835
  });
20167
20836
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTab());
20168
20837
 
20169
- const styles$7 = css `
20838
+ const styles$8 = css `
20170
20839
  ${display('block')}
20171
20840
 
20172
20841
  :host {
@@ -20186,11 +20855,11 @@
20186
20855
  baseName: 'tab-panel',
20187
20856
  baseClass: TabPanel$1,
20188
20857
  template: tabPanelTemplate,
20189
- styles: styles$7
20858
+ styles: styles$8
20190
20859
  });
20191
20860
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabPanel());
20192
20861
 
20193
- const styles$6 = css `
20862
+ const styles$7 = css `
20194
20863
  ${display('grid')}
20195
20864
 
20196
20865
  :host {
@@ -20228,11 +20897,11 @@
20228
20897
  baseName: 'tabs',
20229
20898
  baseClass: Tabs$1,
20230
20899
  template: tabsTemplate,
20231
- styles: styles$6
20900
+ styles: styles$7
20232
20901
  });
20233
20902
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabs());
20234
20903
 
20235
- const styles$5 = css `
20904
+ const styles$6 = css `
20236
20905
  ${display('flex')}
20237
20906
 
20238
20907
  :host {
@@ -20267,7 +20936,7 @@
20267
20936
  const nimbleTabsToolbar = TabsToolbar.compose({
20268
20937
  baseName: 'tabs-toolbar',
20269
20938
  template,
20270
- styles: styles$5
20939
+ styles: styles$6
20271
20940
  });
20272
20941
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTabsToolbar());
20273
20942
 
@@ -20276,7 +20945,7 @@
20276
20945
  block: 'block'
20277
20946
  };
20278
20947
 
20279
- const styles$4 = css `
20948
+ const styles$5 = css `
20280
20949
  ${display('inline-flex')}
20281
20950
 
20282
20951
  :host {
@@ -20418,7 +21087,7 @@
20418
21087
  baseName: 'text-area',
20419
21088
  baseClass: TextArea$1,
20420
21089
  template: textAreaTemplate,
20421
- styles: styles$4,
21090
+ styles: styles$5,
20422
21091
  shadowOptions: {
20423
21092
  delegatesFocus: true
20424
21093
  }
@@ -20435,9 +21104,9 @@
20435
21104
  frameless: 'frameless'
20436
21105
  };
20437
21106
 
20438
- const styles$3 = css `
21107
+ const styles$4 = css `
20439
21108
  ${display('inline-block')}
20440
- ${styles$j}
21109
+ ${styles$k}
20441
21110
 
20442
21111
  :host {
20443
21112
  font: ${bodyFont};
@@ -20585,7 +21254,6 @@
20585
21254
  [part='end']::after {
20586
21255
  content: '';
20587
21256
  position: absolute;
20588
- left: 0px;
20589
21257
  bottom: calc(-1 * ${borderWidth});
20590
21258
  width: 0px;
20591
21259
  height: 0px;
@@ -20720,7 +21388,7 @@
20720
21388
  baseName: 'text-field',
20721
21389
  baseClass: TextField$1,
20722
21390
  template: textFieldTemplate,
20723
- styles: styles$3,
21391
+ styles: styles$4,
20724
21392
  shadowOptions: {
20725
21393
  delegatesFocus: true
20726
21394
  },
@@ -20736,7 +21404,7 @@
20736
21404
  });
20737
21405
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTextField());
20738
21406
 
20739
- const styles$2 = css `
21407
+ const styles$3 = css `
20740
21408
  .positioning-region {
20741
21409
  display: flex;
20742
21410
  padding: ${smallPadding} ${standardPadding};
@@ -20771,13 +21439,50 @@
20771
21439
  baseName: 'toolbar',
20772
21440
  baseClass: Toolbar$1,
20773
21441
  template: toolbarTemplate,
20774
- styles: styles$2,
21442
+ styles: styles$3,
20775
21443
  shadowOptions: {
20776
21444
  delegatesFocus: true
20777
21445
  }
20778
21446
  });
20779
21447
  DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleToolbar());
20780
21448
 
21449
+ const styles$2 = css `
21450
+ ${display('inline-flex')}
21451
+
21452
+ :host {
21453
+ font: ${tooltipCaptionFont};
21454
+ color: ${tooltipCaptionFontColor};
21455
+ text-align: left;
21456
+ }
21457
+
21458
+ .tooltip {
21459
+ box-sizing: border-box;
21460
+ flex-shrink: 0;
21461
+ max-width: 440px;
21462
+ border: ${borderWidth} solid rgba(${borderRgbPartialColor}, 0.3);
21463
+ box-shadow: 0px 3px 4px ${popupBoxShadowColor};
21464
+ background-color: ${tooltipBackgroundColor};
21465
+ padding-bottom: 6px;
21466
+ padding-left: calc(${standardPadding} / 2);
21467
+ padding-right: calc(${standardPadding} / 2);
21468
+ padding-top: ${smallPadding};
21469
+ display: inline-flex;
21470
+ }
21471
+ `;
21472
+
21473
+ /**
21474
+ * A nimble-styled tooltip control.
21475
+ */
21476
+ class Tooltip extends Tooltip$1 {
21477
+ }
21478
+ const nimbleTooltip = Tooltip.compose({
21479
+ baseName: 'tooltip',
21480
+ baseClass: Tooltip$1,
21481
+ template: tooltipTemplate,
21482
+ styles: styles$2
21483
+ });
21484
+ DesignSystem.getOrCreate().withPrefix('nimble').register(nimbleTooltip());
21485
+
20781
21486
  const groupSelectedAttribute = 'group-selected';
20782
21487
  const TreeViewSelectionMode = {
20783
21488
  all: 'all',