@tylertech/forge 3.5.0 → 3.6.0-dev.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 (66) hide show
  1. package/custom-elements.json +1171 -1128
  2. package/dist/checkbox/forge-checkbox.css +1 -0
  3. package/dist/lib.js +27 -19
  4. package/dist/lib.js.map +4 -4
  5. package/dist/list/forge-list.css +1 -0
  6. package/dist/radio/forge-radio.css +2 -0
  7. package/dist/switch/forge-switch.css +2 -0
  8. package/dist/vscode.css-custom-data.json +15 -0
  9. package/dist/vscode.html-custom-data.json +81 -106
  10. package/esm/app-bar/profile-button/app-bar-profile-button.js +5 -2
  11. package/esm/avatar/avatar-constants.d.ts +0 -7
  12. package/esm/avatar/avatar-constants.js +1 -10
  13. package/esm/avatar/avatar.d.ts +24 -21
  14. package/esm/avatar/avatar.js +68 -45
  15. package/esm/avatar/index.d.ts +1 -3
  16. package/esm/avatar/index.js +4 -6
  17. package/esm/button/base/base-button-adapter.js +1 -1
  18. package/esm/button-area/button-area.js +1 -1
  19. package/esm/checkbox/checkbox.d.ts +1 -0
  20. package/esm/checkbox/checkbox.js +2 -1
  21. package/esm/dialog/dialog-adapter.d.ts +7 -0
  22. package/esm/dialog/dialog-adapter.js +43 -19
  23. package/esm/dialog/dialog-constants.d.ts +6 -0
  24. package/esm/dialog/dialog-constants.js +6 -2
  25. package/esm/dialog/dialog-core.d.ts +8 -0
  26. package/esm/dialog/dialog-core.js +20 -0
  27. package/esm/dialog/dialog.d.ts +14 -0
  28. package/esm/dialog/dialog.js +13 -1
  29. package/esm/icon-button/icon-button-constants.d.ts +4 -0
  30. package/esm/icon-button/icon-button-constants.js +2 -0
  31. package/esm/icon-button/icon-button-core.d.ts +4 -4
  32. package/esm/icon-button/icon-button-core.js +16 -14
  33. package/esm/icon-button/icon-button.d.ts +32 -29
  34. package/esm/icon-button/icon-button.js +5 -30
  35. package/esm/index.d.ts +3 -0
  36. package/esm/index.js +152 -156
  37. package/esm/list/list-item/list-item.js +1 -1
  38. package/esm/profile-card/profile-card.js +5 -2
  39. package/esm/radio/radio/radio.d.ts +1 -0
  40. package/esm/radio/radio/radio.js +2 -1
  41. package/esm/split-view/split-view/split-view-adapter.js +1 -0
  42. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  43. package/esm/switch/switch.d.ts +1 -0
  44. package/esm/switch/switch.js +2 -1
  45. package/esm/table/table-utils.js +6 -6
  46. package/esm/tabs/tab-bar/tab-bar-adapter.d.ts +0 -5
  47. package/esm/tabs/tab-bar/tab-bar-adapter.js +3 -11
  48. package/esm/tabs/tab-bar/tab-bar-constants.d.ts +0 -3
  49. package/esm/tabs/tab-bar/tab-bar-constants.js +0 -4
  50. package/esm/tabs/tab-bar/tab-bar-core.js +7 -7
  51. package/esm/tabs/tab-bar/tab-bar.d.ts +6 -3
  52. package/esm/tabs/tab-bar/tab-bar.js +6 -3
  53. package/package.json +2 -2
  54. package/sass/button-area/_core.scss +3 -0
  55. package/sass/checkbox/_core.scss +2 -2
  56. package/sass/core/styles/tokens/checkbox/_tokens.scss +1 -0
  57. package/sass/core/styles/tokens/radio/_tokens.scss +1 -0
  58. package/sass/core/styles/tokens/switch/_tokens.scss +1 -0
  59. package/sass/dialog/dialog.scss +5 -0
  60. package/sass/list/list-item/_core.scss +3 -0
  61. package/sass/radio/radio/_core.scss +2 -2
  62. package/sass/switch/_core.scss +2 -2
  63. package/esm/avatar/avatar-adapter.d.ts +0 -36
  64. package/esm/avatar/avatar-adapter.js +0 -55
  65. package/esm/avatar/avatar-core.d.ts +0 -38
  66. package/esm/avatar/avatar-core.js +0 -101
@@ -9,7 +9,7 @@ import { ProfileCardAdapter } from './profile-card-adapter';
9
9
  import { ProfileCardCore } from './profile-card-core';
10
10
  import { PROFILE_CARD_CONSTANTS } from './profile-card-constants';
11
11
  import { ButtonComponent } from '../button';
12
- import { AvatarComponent } from '../avatar';
12
+ import { defineAvatarComponent } from '../avatar';
13
13
  import { IconComponent } from '../icon/icon';
14
14
  import { ToolbarComponent } from '../toolbar';
15
15
  import { BaseComponent } from '../core/base/base-component';
@@ -79,6 +79,9 @@ let ProfileCardComponent = class ProfileCardComponent extends BaseComponent {
79
79
  this._core.focus(options);
80
80
  }
81
81
  };
82
+ (() => {
83
+ defineAvatarComponent();
84
+ })();
82
85
  __decorate([
83
86
  coreProperty()
84
87
  ], ProfileCardComponent.prototype, "fullName", void 0);
@@ -112,7 +115,7 @@ __decorate([
112
115
  ProfileCardComponent = __decorate([
113
116
  customElement({
114
117
  name: PROFILE_CARD_CONSTANTS.elementName,
115
- dependencies: [ToolbarComponent, ButtonComponent, IconComponent, AvatarComponent]
118
+ dependencies: [ToolbarComponent, ButtonComponent, IconComponent]
116
119
  })
117
120
  ], ProfileCardComponent);
118
121
  export { ProfileCardComponent };
@@ -48,6 +48,7 @@ declare const RadioComponent_base: import("../../constants").AbstractConstructor
48
48
  * @cssproperty --forge-radio-mark-color - The color of the radio button's mark.
49
49
  * @cssproperty --forge-radio-gap - The gap between the radio button and its label.
50
50
  * @cssproperty --forge-radio-justify - The alignment of the radio button and its label in the inline direction.
51
+ * @cssproperty --forge-radio-align - The alignment of the radio button and its label in the block direction.
51
52
  * @cssproperty --forge-radio-direction - The direction of the radio button and its label.
52
53
  * @cssproperty --forge-radio-state-layer-size - The size of the radio button's state layer in the inline and block directions.
53
54
  * @cssproperty --forge-radio-state-layer-width - The width of the radio button's state layer.
@@ -19,7 +19,7 @@ import { RadioAdapter } from './radio-adapter';
19
19
  import { RADIO_CONSTANTS, tryCheck } from './radio-constants';
20
20
  import { RadioCore } from './radio-core';
21
21
  const template = '<template><div id=\"radio\" class=\"forge-radio\" part=\"root\"><div id=\"container\" class=\"container\" aria-hidden=\"true\"><div id=\"background\" class=\"background\" part=\"background\"></div><forge-focus-indicator target=\":host\" part=\"focus-indicator\"></forge-focus-indicator><forge-state-layer exportparts=\"surface:state-layer\"></forge-state-layer></div><span id=\"label\" class=\"label\" for=\"input\" part=\"label\"><slot></slot></span></div></template>';
22
- const styles = ':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);flex-shrink:0;align-items:center;justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}';
22
+ const styles = ':host{display:inline-block;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}:host(:focus){outline:0}.forge-radio{--_radio-primary-color:var(--forge-radio-primary-color, var(--forge-theme-tertiary, #3d5afe));--_radio-inactive-color:var(--forge-radio-inactive-color, var(--forge-theme-surface-container-high, #9e9e9e));--_radio-size:var(--forge-radio-size, 20px);--_radio-mark-size:var(--forge-radio-mark-size, 75%);--_radio-state-layer-size:var(--forge-radio-state-layer-size, 40px);--_radio-state-layer-dense-size:var(--forge-radio-state-layer-dense-size, 24px);--_radio-width:var(--forge-radio-width, var(--_radio-size));--_radio-height:var(--forge-radio-height, var(--_radio-size));--_radio-border-width:var(--forge-radio-border-width, var(--forge-border-medium, 2px));--_radio-unchecked-border-color:var(--forge-radio-unchecked-border-color, var(--_radio-inactive-color));--_radio-checked-border-color:var(--forge-radio-checked-border-color, var(--_radio-primary-color));--_radio-background:var(--forge-radio-background, transparent);--_radio-shape:var(--forge-radio-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_radio-mark-width:var(--forge-radio-mark-width, var(--_radio-mark-size));--_radio-mark-height:var(--forge-radio-mark-height, var(--_radio-mark-size));--_radio-mark-color:var(--forge-radio-mark-color, var(--_radio-primary-color));--_radio-gap:var(--forge-radio-gap, 0);--_radio-justify:var(--forge-radio-justify, start);--_radio-align:var(--forge-radio-align, center);--_radio-direction:var(--forge-radio-direction, initial);--_radio-state-layer-width:var(--forge-radio-state-layer-width, var(--_radio-state-layer-size));--_radio-state-layer-height:var(--forge-radio-state-layer-height, var(--_radio-state-layer-size));--_radio-state-layer-unchecked-color:var(--forge-radio-state-layer-unchecked-color, var(--_radio-color));--_radio-state-layer-checked-color:var(--forge-radio-state-layer-checked-color, var(--_radio-primary-color));--_radio-state-layer-shape:var(--forge-radio-state-layer-shape, var(--_radio-shape));--_radio-state-layer-dense-width:var(--forge-radio-state-layer-dense-width, var(--_radio-state-layer-dense-size));--_radio-state-layer-dense-height:var(--forge-radio-state-layer-dense-height, var(--_radio-state-layer-dense-size));--_radio-disabled-opacity:var(--forge-radio-disabled-opacity, 0.38);--_radio-animation-duration:var(--forge-radio-animation-duration, var(--forge-animation-duration-short4, 200ms));--_radio-animation-timing-function:var(--forge-radio-animation-timing-function, var(--forge-animation-easing-decelerate, cubic-bezier(0, 0, 0, 1)));--_radio-animation-delay:var(--forge-radio-animation-delay, 0ms)}.forge-radio{position:relative;flex-direction:var(--_radio-direction);align-items:var(--_radio-align);justify-content:var(--_radio-justify);gap:var(--_radio-gap);display:flex}.forge-radio .container{position:relative;align-items:center;justify-content:center;display:flex;flex-shrink:0;border-radius:var(--_radio-shape);inline-size:var(--_radio-state-layer-width);block-size:var(--_radio-state-layer-height);cursor:pointer}.forge-radio .background{position:relative;display:inline block;overflow:hidden;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:border-color;box-sizing:border-box;border-radius:var(--_radio-shape);border-width:var(--_radio-border-width);border-style:solid;border-color:var(--_radio-unchecked-border-color);inline-size:var(--_radio-width);block-size:var(--_radio-height);background:var(--_radio-background)}.forge-radio .background::after{content:\"\";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:top left;transition-duration:var(--_radio-animation-duration);transition-delay:var(--_radio-animation-delay);transition-timing-function:var(--_radio-animation-timing-function);transition-property:opacity,scale;border-radius:var(--_radio-shape);inline-size:var(--_radio-mark-width);block-size:var(--_radio-mark-height);background:var(--_radio-mark-color);scale:0.5;opacity:0}.forge-radio .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit);cursor:default}.forge-radio .label:empty{display:none}:host([checked]) .forge-radio .background{border-color:var(--_radio-checked-border-color)}:host([checked]) .forge-radio .background::after{scale:1;opacity:1}:host([checked]) forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-checked-color)}:host([dense]) .forge-radio .container{inline-size:var(--_radio-state-layer-dense-width);block-size:var(--_radio-state-layer-dense-height)}:host([disabled]) .forge-radio .container{opacity:var(--_radio-disabled-opacity);cursor:not-allowed}:host([readonly]) .forge-radio .container{cursor:not-allowed}forge-focus-indicator{--forge-focus-indicator-color:var(--_radio-primary-color);--forge-focus-indicator-outward-offset:0px;--forge-focus-indicator-shape:var(--_radio-state-layer-shape)}forge-state-layer{--forge-state-layer-color:var(--_radio-state-layer-unchecked-color)}';
23
23
  /**
24
24
  * @tag forge-radio
25
25
  *
@@ -42,6 +42,7 @@ const styles = ':host{display:inline-block;-webkit-tap-highlight-color:transpare
42
42
  * @cssproperty --forge-radio-mark-color - The color of the radio button's mark.
43
43
  * @cssproperty --forge-radio-gap - The gap between the radio button and its label.
44
44
  * @cssproperty --forge-radio-justify - The alignment of the radio button and its label in the inline direction.
45
+ * @cssproperty --forge-radio-align - The alignment of the radio button and its label in the block direction.
45
46
  * @cssproperty --forge-radio-direction - The direction of the radio button and its label.
46
47
  * @cssproperty --forge-radio-state-layer-size - The size of the radio button's state layer in the inline and block directions.
47
48
  * @cssproperty --forge-radio-state-layer-width - The width of the radio button's state layer.
@@ -58,6 +58,7 @@ export class SplitViewAdapter extends BaseAdapter {
58
58
  panels
59
59
  .slice()
60
60
  .reverse()
61
+ .filter(panel => panel.open)
61
62
  .forEach(panel => {
62
63
  if (diff <= 0) {
63
64
  return;
@@ -13,7 +13,7 @@ import { SplitViewPanelCore } from './split-view-panel-core';
13
13
  import { SplitViewPanelAdapter } from './split-view-panel-adapter';
14
14
  import { IconComponent, IconRegistry } from '../../icon';
15
15
  const template = '<template><div class=\"forge-split-view-panel\" id=\"root\" part=\"root\"><div class=\"forge-split-view-panel__handle\" id=\"handle\" part=\"handle\" role=\"separator\" aria-controls=\"content\" aria-grabbed=\"false\" tabindex=\"0\"><forge-icon class=\"forge-split-view-panel__icon\" id=\"icon\" part=\"icon\"></forge-icon><forge-state-layer target=\"handle\" id=\"state-layer\" exportparts=\"surface:state-layer\"></forge-state-layer><forge-focus-indicator inward target=\"handle\" part=\"focus-indicator\"></forge-focus-indicator></div><div class=\"forge-split-view-panel__content\" id=\"content\" part=\"content\" role=\"group\"><slot></slot></div></div></template>';
16
- const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u5bwqam;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u5bwqam{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:u5bwqbl;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u5bwqbl{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u5bwqbz;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u5bwqbz{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:u5bwqcx;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u5bwqcx{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:u5bwqdh;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u5bwqdh{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u5bwqdw;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes u5bwqdw{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:u5bwqeg;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u5bwqeg{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:u5bwqer;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes u5bwqer{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}';
16
+ const styles = '.forge-split-view-panel{display:flex;width:100%;height:100%;overflow:hidden}.forge-split-view-panel__handle{color:var(--forge-theme-text-medium,rgba(0,0,0,.6));background-color:var(--forge-theme-outline,#e0e0e0);position:relative;display:flex;flex-shrink:0;justify-content:center;align-items:center;outline:0}.forge-split-view-panel__content{flex:1;overflow:hidden}.forge-split-view-panel--closed{display:none}.forge-split-view-panel--disabled #handle{pointer-events:none}.forge-split-view-panel--disabled .forge-split-view-panel__icon{display:none}.forge-split-view-panel[orientation=horizontal]{min-width:var(--forge-split-view-handle-width,8px);width:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:row}.forge-split-view-panel[orientation=horizontal] .forge-split-view-panel__handle{width:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:utgfdhj;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes utgfdhj{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--closing[resizable=start]{position:absolute;top:0;right:0;animation-name:utgfdif;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes utgfdif{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:utgfdiv;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes utgfdiv{from{transform:none}to{transform:translateX(-100%)}}.forge-split-view-panel[orientation=horizontal].forge-split-view-panel--opening[resizable=start]{position:absolute;top:0;right:0;animation-name:utgfdiz;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes utgfdiz{from{transform:none}to{transform:translateX(100%)}}.forge-split-view-panel[orientation=vertical]{min-height:var(--forge-split-view-handle-width,8px);height:calc(var(--forge-split-view-panel-size,unset) + var(--forge-split-view-handle-width,8px));flex-direction:column}.forge-split-view-panel[orientation=vertical] .forge-split-view-panel__handle{height:var(--forge-split-view-handle-width,8px);cursor:var(--forge-split-view-panel-cursor)}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=end]{position:absolute;top:0;left:0;animation-name:utgfdjk;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes utgfdjk{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--closing[resizable=start]{position:absolute;bottom:0;left:0;animation-name:utgfdkb;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1))}@keyframes utgfdkb{from{transform:none}to{transform:translateY(100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=end]{position:absolute;top:0;left:0;animation-name:utgfdkq;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes utgfdkq{from{transform:none}to{transform:translateY(-100%)}}.forge-split-view-panel[orientation=vertical].forge-split-view-panel--opening[resizable=start]{position:absolute;bottom:0;left:0;animation-name:utgfdlo;animation-duration:var(--forge-animation-duration-medium2, 300ms);animation-timing-function:var(--forge-animation-easing-standard,cubic-bezier(0.2,0,0,1));animation-direction:reverse}@keyframes utgfdlo{from{transform:none}to{transform:translateY(100%)}}:host{z-index:var(--forge-split-view-animating-layer)!important;display:block;position:relative;height:100%;width:100%;flex:0}:host([hidden]){display:none}:host(:not([resizable=start],[resizable=end])){flex:1}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel{width:100%;height:100%;min-width:0;min-height:0}:host(:not([resizable=start],[resizable=end])) .forge-split-view-panel__handle{display:none}forge-focus-indicator{--forge-focus-indicator-active-width:2px}';
17
17
  import { StateLayerComponent } from '../../state-layer';
18
18
  import { FocusIndicatorComponent } from '../../focus-indicator';
19
19
  /**
@@ -103,6 +103,7 @@ declare const SwitchComponent_base: import("../constants").AbstractConstructor<i
103
103
  * @cssproperty --forge-switch-icon-active-off-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its off state.
104
104
  * @cssproperty --forge-switch-gap - The space between the switch and label.
105
105
  * @cssproperty --forge-switch-justify - How the switch and label are distributed along their main axis.
106
+ * @cssproperty --forge-switch-align - How the switch and label are distributed along their cross axis.
106
107
  * @cssproperty --forge-switch-direction - Whether the switch and label are arranged along the inline or block axis.
107
108
  * @cssproperty --forge-switch-state-layer-size - The inline and block size of the handle's state layer.
108
109
  * @cssproperty --forge-switch-state-layer-width - The inline size of the handle's state layer.
@@ -18,7 +18,7 @@ import { SwitchAdapter } from './switch-adapter';
18
18
  import { SWITCH_CONSTANTS } from './switch-constants';
19
19
  import { SwitchCore } from './switch-core';
20
20
  const template = '<template><div class=\"forge-switch\" part=\"switch\"><div id=\"container\" class=\"container\"><div class=\"track\" part=\"track\"></div><div class=\"handle\" part=\"handle\"><div id=\"icon-off\" class=\"icon icon__off\" part=\"icon-off\"><slot name=\"icon-off\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M20 13H4v-2h16v2z\"/></svg></slot></div><div id=\"icon-on\" class=\"icon icon__on\" part=\"icon-on\"><slot name=\"icon-on\"><svg aria-hidden=\"true\" viewBox=\"0 0 24 24\"><path d=\"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\"/></svg></slot></div><forge-state-layer target=\":host\" exportparts=\"surface:state-layer\"></forge-state-layer></div><forge-focus-indicator target=\":host\" part=\"focus-indicator\"></forge-focus-indicator></div><label id=\"label\" class=\"label\" part=\"label\"><slot></slot></label></div></template>';
21
- const styles = ':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);flex-shrink:0;align-items:center;justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:\"\";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}';
21
+ const styles = ':host{display:inline-block;outline:0;-webkit-tap-highlight-color:transparent}:host([hidden]){display:none}.forge-switch{--_switch-handle-size:var(--forge-switch-handle-size, 20px);--_switch-handle-scale:var(--forge-switch-handle-scale, 1);--_switch-handle-elevation:var(--forge-switch-handle-elevation, 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12));--_switch-track-border-width:var(--forge-switch-track-border-width, 0);--_switch-track-border-color:var(--forge-switch-track-border-color, transparent);--_switch-icon-color:var(--forge-switch-icon-color, var(--forge-theme-on-tertiary, #ffffff));--_switch-icon-size:var(--forge-switch-icon-size, 16px);--_switch-icon-scale:var(--forge-switch-icon-scale, 1);--_switch-state-layer-size:var(--forge-switch-state-layer-size, 40px);--_switch-state-layer-dense-size:var(--forge-switch-state-layer-dense-size, 28px);--_switch-handle-on-color:var(--forge-switch-handle-on-color, var(--forge-theme-tertiary, #3d5afe));--_switch-handle-off-color:var(--forge-switch-handle-off-color, var(--forge-theme-surface-container-high, #9e9e9e));--_switch-handle-width:var(--forge-switch-handle-width, var(--_switch-handle-size));--_switch-handle-height:var(--forge-switch-handle-height, var(--_switch-handle-size));--_switch-handle-on-scale:var(--forge-switch-handle-on-scale, var(--_switch-handle-scale));--_switch-handle-off-scale:var(--forge-switch-handle-off-scale, var(--_switch-handle-scale));--_switch-handle-shape:var(--forge-switch-handle-shape, calc(var(--forge-shape-round, 50%) * var(--forge-shape-factor, 1)));--_switch-handle-on-elevation:var(--forge-switch-handle-on-elevation, var(--_switch-handle-elevation));--_switch-handle-off-elevation:var(--forge-switch-handle-off-elevation, var(--_switch-handle-elevation));--_switch-track-on-color:var(--forge-switch-track-on-color, var(--forge-theme-tertiary-container, #d0d7ff));--_switch-track-off-color:var(--forge-switch-track-off-color, var(--forge-theme-surface-container, #e0e0e0));--_switch-track-width:var(--forge-switch-track-width, 36px);--_switch-track-height:var(--forge-switch-track-height, 14px);--_switch-track-shape:var(--forge-switch-track-shape, calc(var(--forge-shape-full, 9999px) * var(--forge-shape-factor, 1)));--_switch-track-on-border-width:var(--forge-switch-track-on-border-width, var(--_switch-track-border-width));--_switch-track-off-border-width:var(--forge-switch-track-off-border-width, var(--_switch-track-border-width));--_switch-track-on-border-color:var(--forge-switch-track-on-border-color, var(--_switch-track-border-color));--_switch-track-off-border-color:var(--forge-switch-track-off-border-color, var(--_switch-track-border-color));--_switch-icon-on-color:var(--forge-switch-icon-on-color, var(--_switch-icon-color));--_switch-icon-off-color:var(--forge-switch-icon-off-color, var(--_switch-icon-color));--_switch-icon-on-size:var(--forge-switch-icon-on-size, var(--_switch-icon-size));--_switch-icon-off-size:var(--forge-switch-icon-off-size, var(--_switch-icon-size));--_switch-icon-on-scale:var(--forge-switch-icon-on-scale, var(--_switch-icon-scale));--_switch-icon-off-scale:var(--forge-switch-icon-off-scale, var(--_switch-icon-scale));--_switch-gap:var(--forge-switch-gap, 0);--_switch-justify:var(--forge-switch-justify, start);--_switch-align:var(--forge-switch-align, center);--_switch-direction:var(--forge-switch-direction, initial);--_switch-state-layer-width:var(--forge-switch-state-layer-width, var(--_switch-state-layer-size));--_switch-state-layer-height:var(--forge-switch-state-layer-height, var(--_switch-state-layer-size));--_switch-state-layer-on-color:var(--forge-switch-state-layer-on-color, var(--_switch-handle-on-color));--_switch-state-layer-off-color:var(--forge-switch-state-layer-off-color, var(--_switch-color));--_switch-state-layer-dense-width:var(--forge-switch-state-layer-dense-width, var(--_switch-state-layer-dense-size));--_switch-state-layer-dense-height:var(--forge-switch-state-layer-dense-height, var(--_switch-state-layer-dense-size));--_switch-disabled-opacity:var(--forge-switch-disabled-opacity, 0.38);--_switch-handle-active-on-color:var(--forge-switch-handle-active-on-color, var(--_switch-handle-on-color));--_switch-handle-active-off-color:var(--forge-switch-handle-active-off-color, var(--_switch-handle-off-color));--_switch-handle-active-scale:var(--forge-switch-handle-active-scale, 1.2);--_switch-handle-active-on-scale:var(--forge-switch-handle-active-on-scale, var(--_switch-handle-active-scale));--_switch-handle-active-off-scale:var(--forge-switch-handle-active-off-scale, var(--_switch-handle-active-scale));--_switch-handle-active-elevation:var(--forge-switch-handle-active-elevation, var(--_switch-handle-elevation));--_switch-handle-active-on-elevation:var(--forge-switch-handle-active-on-elevation, var(--_switch-handle-active-elevation));--_switch-handle-active-off-elevation:var(--forge-switch-handle-active-off-elevation, var(--_switch-handle-active-elevation));--_switch-track-active-on-color:var(--forge-switch-track-active-on-color, var(--_switch-track-on-color));--_switch-track-active-off-color:var(--forge-switch-track-active-off-color, var(--_switch-track-off-color));--_switch-track-active-on-border-width:var(--forge-switch-track-active-on-border-width, var(--_switch-track-on-border-width));--_switch-track-active-off-border-width:var(--forge-switch-track-active-off-border-width, var(--_switch-track-off-border-width));--_switch-track-active-on-border-color:var(--forge-switch-track-active-on-border-color, var(--_switch-track-on-border-color));--_switch-track-active-off-border-color:var(--forge-switch-track-active-off-border-color, var(--_switch-track-off-border-color));--_switch-icon-active-on-color:var(--forge-switch-icon-active-on-color, var(--_switch-icon-on-color));--_switch-icon-active-off-color:var(--forge-switch-icon-active-off-color, var(--_switch-icon-off-color));--_switch-icon-active-on-scale:var(--forge-switch-icon-active-on-scale, var(--_switch-icon-on-scale));--_switch-icon-active-off-scale:var(--forge-switch-icon-active-off-scale, var(--_switch-icon-off-scale));--_switch-animation-duration:var(--forge-switch-animation-duration, var(--forge-animation-duration-short2, 100ms));--_switch-animation-timing:var(--forge-switch-animation-timing, var(--forge-animation-easing-standard, cubic-bezier(0.2, 0, 0, 1)));--_switch-active-animation-timing:var(--forge-switch-active-animation-timing, var(--forge-animation-easing-linear, cubic-bezier(0, 0, 1, 1)))}.forge-switch{display:flex;position:relative;flex-direction:var(--_switch-direction);align-items:var(--_switch-align);justify-content:var(--_switch-justify);gap:var(--_switch-gap);--_switch-current-state-layer-width:var(--_switch-state-layer-width);--_switch-current-state-layer-height:var(--_switch-state-layer-height)}.forge-switch .container{position:relative;align-items:center;display:flex;flex-shrink:0;block-size:max(var(--_switch-handle-height),var(--_switch-track-height),var(--_switch-current-state-layer-height));cursor:pointer}.forge-switch .input{position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}.forge-switch .track{transition-property:background-color,border-color,border-width;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);box-sizing:border-box;margin-inline:calc(max(var(--_switch-handle-width),var(--_switch-current-state-layer-width))/ 2 - calc(var(--_switch-track-height)/ 2));border-width:var(--_switch-track-off-border-width);border-color:var(--_switch-track-off-border-color);border-style:solid;border-radius:var(--_switch-track-shape);inline-size:var(--_switch-track-width);block-size:var(--_switch-track-height);background-color:var(--_switch-track-off-color)}.forge-switch .handle{position:absolute;justify-content:center;align-items:center;display:flex;transition-property:translate;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-current-state-layer-width);block-size:var(--_switch-current-state-layer-height)}.forge-switch .handle::before{content:\"\";position:relative;display:block;scale:var(--_switch-handle-off-scale);transition:background-color var(--_switch-animation-duration) var(--_switch-animation-timing),box-shadow var(--_switch-animation-duration) var(--_switch-animation-timing),scale var(--_switch-animation-duration) var(--_switch-active-animation-timing);box-shadow:var(--_switch-handle-off-elevation);border-radius:var(--_switch-handle-shape);inline-size:var(--_switch-handle-width);block-size:var(--_switch-handle-height);background-color:var(--_switch-handle-off-color)}.forge-switch .icon{position:absolute;align-items:center;justify-content:center;display:flex;transition-property:opacity,scale;transition-duration:var(--_switch-animation-duration);transition-timing-function:var(--_switch-animation-timing);inline-size:var(--_switch-icon-off-size);block-size:var(--_switch-icon-off-size);color:var(--_switch-icon-off-color);fill:var(--_switch-icon-off-color);font-size:var(--_switch-icon-off-size);--forge-icon-font-size:var(--_switch-icon-off-size)}.forge-switch .icon__on{--forge-icon-font-size:var(--_switch-icon-on-size);inline-size:var(--_switch-icon-on-size);block-size:var(--_switch-icon-on-size);color:var(--_switch-icon-on-color);fill:var(--_switch-icon-on-color);font-size:var(--_switch-icon-on-size);opacity:0;scale:0.4}.forge-switch .icon__off{opacity:1;scale:var(--_switch-icon-off-scale)}.forge-switch .label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--forge-typography-label2-font-family, var(--forge-typography-font-family, \"Roboto\", sans-serif));font-size:var(--forge-typography-label2-font-size, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-font-size-scale, .8125)));font-weight:var(--forge-typography-label2-font-weight,400);line-height:var(--forge-typography-label2-line-height, calc(var(--forge-typography-font-size, 1rem) * var(--forge-typography-label-line-height-scale, 1.25)));letter-spacing:var(--forge-typography-label2-letter-spacing, .0096153846em);text-transform:var(--forge-typography-label2-text-transform,inherit);text-decoration:var(--forge-typography-label2-text-decoration,inherit)}.forge-switch .label:empty{display:none}.forge-switch .hidden{display:none}.forge-switch ::slotted([slot=input]){position:absolute;z-index:1;appearance:none;outline:0;margin:0;inline-size:100%;block-size:100%;cursor:unset}:host([on]) .track{border-width:var(--_switch-track-on-border-width);border-color:var(--_switch-track-on-border-color);background-color:var(--_switch-track-on-color)}:host([on]) .handle{translate:calc(var(--_switch-track-width) - calc(var(--_switch-track-height)/ 2) * 2)}:host([on]) .handle::before{scale:var(--_switch-handle-on-scale);box-shadow:var(--_switch-handle-on-elevation);background-color:var(--_switch-handle-on-color)}:host([on]) .handle .icon__on{opacity:1;scale:var(--_switch-icon-on-scale)}:host([on]) .handle .icon__off{opacity:0;scale:0.4}:host([on]) forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-on-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .track{border-width:var(--_switch-track-active-off-border-width);border-color:var(--_switch-track-active-off-border-color);background-color:var(--_switch-track-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-off-scale);box-shadow:var(--_switch-handle-active-off-elevation);background-color:var(--_switch-handle-active-off-color)}:host(:not([disabled]):not([readonly])) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-off-scale);color:var(--_switch-icon-active-off-color);fill:var(--_switch-icon-active-off-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .track{border-width:var(--_switch-track-active-on-border-width);border-color:var(--_switch-track-active-on-border-color);background-color:var(--_switch-track-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle::before{scale:var(--_switch-handle-active-on-scale);box-shadow:var(--_switch-handle-active-on-elevation);background-color:var(--_switch-handle-active-on-color)}:host(:not([disabled]):not([readonly])[on]) .forge-switch .container:active .handle .icon{scale:var(--_switch-icon-active-on-scale);color:var(--_switch-icon-active-on-color);fill:var(--_switch-icon-active-on-color)}:host([dense]) .forge-switch{--_switch-current-state-layer-width:var(--_switch-state-layer-dense-width);--_switch-current-state-layer-height:var(--_switch-state-layer-dense-height)}:host([disabled]) .forge-switch .container{opacity:var(--_switch-disabled-opacity);cursor:not-allowed}:host([disabled]) .forge-switch .handle::before{box-shadow:none}:host([readonly]) .forge-switch .container{cursor:not-allowed}@media (prefers-reduced-motion){.switch{--_switch-animation-duration:var(--forge-switch-animation-duration, 0s)}}forge-state-layer{--forge-state-layer-color:var(--_switch-state-layer-off-color)}forge-focus-indicator{--forge-focus-indicator-shape:var(--_switch-track-shape);--forge-focus-indicator-outward-offset:0px}';
22
22
  /**
23
23
  * @tag forge-switch
24
24
  *
@@ -86,6 +86,7 @@ const styles = ':host{display:inline-block;outline:0;-webkit-tap-highlight-color
86
86
  * @cssproperty --forge-switch-icon-active-off-scale - The scale transformation applied to the handle icons when the switch is active (pressed) in its off state.
87
87
  * @cssproperty --forge-switch-gap - The space between the switch and label.
88
88
  * @cssproperty --forge-switch-justify - How the switch and label are distributed along their main axis.
89
+ * @cssproperty --forge-switch-align - How the switch and label are distributed along their cross axis.
89
90
  * @cssproperty --forge-switch-direction - Whether the switch and label are arranged along the inline or block axis.
90
91
  * @cssproperty --forge-switch-state-layer-size - The inline and block size of the handle's state layer.
91
92
  * @cssproperty --forge-switch-state-layer-width - The inline size of the handle's state layer.
@@ -177,12 +177,6 @@ export class TableUtils {
177
177
  Object.assign(th.style, columnConfig.headerCellStyle);
178
178
  Object.assign(cellContainer.style, columnConfig.headerCellStyle);
179
179
  }
180
- const span = document.createElement('span');
181
- span.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_TEXT);
182
- span.textContent = columnConfig.header && typeof columnConfig.header === 'string' ? columnConfig.header.trim() : '';
183
- if (span.textContent.trim().length === 0) {
184
- th.setAttribute('aria-hidden', 'true');
185
- }
186
180
  // Add the sort icon if this column is sortable
187
181
  if (columnConfig.sortable) {
188
182
  th.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_SORTABLE);
@@ -231,6 +225,12 @@ export class TableUtils {
231
225
  });
232
226
  }
233
227
  else {
228
+ const span = document.createElement('span');
229
+ span.classList.add(TABLE_CONSTANTS.classes.TABLE_HEAD_CELL_TEXT);
230
+ span.textContent = columnConfig.header && typeof columnConfig.header === 'string' ? columnConfig.header.trim() : '';
231
+ if (span.textContent.trim().length === 0) {
232
+ th.setAttribute('aria-hidden', 'true');
233
+ }
234
234
  TableUtils._prepend(span, cellContainer);
235
235
  }
236
236
  th.appendChild(cellContainer);
@@ -7,8 +7,6 @@ import { BaseAdapter, IBaseAdapter } from '../../core/base/base-adapter';
7
7
  import { ITabComponent } from '../tab/tab';
8
8
  import { ITabBarComponent } from './tab-bar';
9
9
  export interface ITabBarAdapter extends IBaseAdapter {
10
- initialize(): void;
11
- destroy(): void;
12
10
  initializeContainerSizeObserver(listener: () => void): void;
13
11
  destroyContainerSizeObserver(): void;
14
12
  initializeScrollObserver(listener: EventListener): void;
@@ -41,10 +39,7 @@ export declare class TabBarAdapter extends BaseAdapter<ITabBarComponent> impleme
41
39
  private _resizeObserver;
42
40
  private _backwardScrollButton;
43
41
  private _forwardScrollButton;
44
- private _forwardObserver?;
45
42
  constructor(component: ITabBarComponent);
46
- initialize(): void;
47
- destroy(): void;
48
43
  initializeContainerSizeObserver(listener: () => void): void;
49
44
  initializeScrollObserver(listener: EventListener): void;
50
45
  destroyContainerSizeObserver(): void;
@@ -8,7 +8,6 @@ import { tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconKeyboardArr
8
8
  import { BaseAdapter } from '../../core/base/base-adapter';
9
9
  import { TAB_CONSTANTS } from '../tab/tab-constants';
10
10
  import { TAB_BAR_CONSTANTS } from './tab-bar-constants';
11
- import { forwardAttributes } from '../../core/utils/reflect-utils';
12
11
  export class TabBarAdapter extends BaseAdapter {
13
12
  constructor(component) {
14
13
  super(component);
@@ -16,15 +15,6 @@ export class TabBarAdapter extends BaseAdapter {
16
15
  this._rootElement = getShadowElement(this._component, TAB_BAR_CONSTANTS.selectors.ROOT);
17
16
  this._scrollContainer = getShadowElement(this._component, TAB_BAR_CONSTANTS.selectors.SCROLL_CONTAINER);
18
17
  }
19
- initialize() {
20
- this._forwardObserver = forwardAttributes(this._component, Object.keys(TAB_BAR_CONSTANTS.forwardedAttributes), (name, value) => {
21
- toggleAttribute(this._scrollContainer, !!value, TAB_BAR_CONSTANTS.forwardedAttributes[name], value ?? undefined);
22
- });
23
- }
24
- destroy() {
25
- this._forwardObserver?.disconnect();
26
- this._forwardObserver = undefined;
27
- }
28
18
  initializeContainerSizeObserver(listener) {
29
19
  this._resizeObserver = new ResizeObserver(() => listener());
30
20
  this._resizeObserver.observe(this._component);
@@ -40,7 +30,7 @@ export class TabBarAdapter extends BaseAdapter {
40
30
  this._scrollContainer.removeEventListener('scroll', listener, { passive: true });
41
31
  }
42
32
  setVertical(value) {
43
- toggleAttribute(this._scrollContainer, !!value, 'aria-orientation', 'vertical');
33
+ toggleAttribute(this._component, !!value, 'aria-orientation', 'vertical');
44
34
  }
45
35
  setScrollBackwardButtonListener(listener) {
46
36
  this._backwardScrollButton?.addEventListener('click', listener);
@@ -109,6 +99,7 @@ export class TabBarAdapter extends BaseAdapter {
109
99
  this._forwardScrollButton?.focus();
110
100
  }
111
101
  this._backwardScrollButton.disabled = disabled;
102
+ this._backwardScrollButton.tabIndex = -1;
112
103
  }
113
104
  if (this._forwardScrollButton) {
114
105
  const disabled = !forwardEnabled;
@@ -116,6 +107,7 @@ export class TabBarAdapter extends BaseAdapter {
116
107
  this._backwardScrollButton?.focus();
117
108
  }
118
109
  this._forwardScrollButton.disabled = disabled;
110
+ this._forwardScrollButton.tabIndex = -1;
119
111
  }
120
112
  }
121
113
  scroll(which) {
@@ -27,9 +27,6 @@ export declare const TAB_BAR_CONSTANTS: {
27
27
  AUTO_ACTIVATE: string;
28
28
  SCROLL_BUTTONS: string;
29
29
  };
30
- forwardedAttributes: {
31
- 'data-aria-label': string;
32
- };
33
30
  events: {
34
31
  CHANGE: string;
35
32
  };
@@ -19,9 +19,6 @@ const observedAttributes = {
19
19
  const attributes = {
20
20
  ...observedAttributes
21
21
  };
22
- const forwardedAttributes = {
23
- 'data-aria-label': 'aria-label'
24
- };
25
22
  const selectors = {
26
23
  ROOT: '.forge-tab-bar',
27
24
  SCROLL_CONTAINER: '.scroll-container',
@@ -40,7 +37,6 @@ export const TAB_BAR_CONSTANTS = {
40
37
  elementName,
41
38
  observedAttributes,
42
39
  attributes,
43
- forwardedAttributes,
44
40
  events,
45
41
  selectors,
46
42
  classes,
@@ -29,7 +29,6 @@ export class TabBarCore {
29
29
  this._scrollForwardButtonListener = () => this._onScrollForward();
30
30
  }
31
31
  initialize() {
32
- this._adapter.initialize();
33
32
  this._adapter.addSlotListener(this._tabsChangedListener);
34
33
  this._adapter.addHostListener(TAB_CONSTANTS.events.SELECT, this._tabSelectedListener);
35
34
  this._adapter.addHostListener('keydown', this._keydownListener);
@@ -43,7 +42,6 @@ export class TabBarCore {
43
42
  this._isInitialized = true;
44
43
  }
45
44
  destroy() {
46
- this._adapter.destroy();
47
45
  this._adapter.destroyContainerSizeObserver();
48
46
  this._adapter.destroyScrollObserver(this._scrollListener);
49
47
  this._isInitialized = false;
@@ -54,7 +52,7 @@ export class TabBarCore {
54
52
  this._tryScrollActiveTabIntoView();
55
53
  }
56
54
  _onTabSelected(evt) {
57
- this._selectTab(evt.target);
55
+ this._selectTab({ tab: evt.target, focusTab: true });
58
56
  }
59
57
  async _onKeydown(evt) {
60
58
  const orientation = this._vertical ? 'vertical' : 'horizontal';
@@ -91,14 +89,14 @@ export class TabBarCore {
91
89
  return;
92
90
  }
93
91
  if (this._autoActivate) {
94
- this._selectTab(this._tabs[index]);
92
+ this._selectTab({ tab: this._tabs[index], focusTab: true });
95
93
  }
96
94
  else {
97
95
  this._tabs[index].focus({ preventScroll: true, focusVisible: true });
98
96
  await this._adapter.tryScrollTabIntoView(this._tabs[index]);
99
97
  }
100
98
  }
101
- async _selectTab(tab, emitEvent = true) {
99
+ async _selectTab({ tab, emitEvent = true, focusTab = false }) {
102
100
  if (!tab || tab.disabled) {
103
101
  return;
104
102
  }
@@ -121,7 +119,9 @@ export class TabBarCore {
121
119
  }
122
120
  // Selecting a tab causes an animation of the indicator to start relative to the currently selected tab
123
121
  tab.selected = true;
124
- tab.focus({ preventScroll: true });
122
+ if (focusTab) {
123
+ tab.focus({ preventScroll: true });
124
+ }
125
125
  await this._adapter.tryScrollTabIntoView(tab);
126
126
  // Always deselect the currently selected tab after selecting a new tab to allow
127
127
  // for the tab indicator animation to run properly (the newly selected tab attempts
@@ -223,7 +223,7 @@ export class TabBarCore {
223
223
  this._activeTab = value ?? undefined;
224
224
  if (typeof this._activeTab === 'number') {
225
225
  const newSelectedTab = this._tabs[this._activeTab];
226
- this._selectTab(newSelectedTab, false);
226
+ this._selectTab({ tab: newSelectedTab, emitEvent: false, focusTab: false });
227
227
  this._adapter.setHostAttribute(TAB_BAR_CONSTANTS.attributes.ACTIVE_TAB, String(this._activeTab));
228
228
  }
229
229
  else {
@@ -5,7 +5,9 @@
5
5
  */
6
6
  import { BaseComponent, IBaseComponent } from '../../core/base/base-component';
7
7
  import { ITabBarChangeEventData } from './tab-bar-constants';
8
- export interface ITabBarComponent extends IBaseComponent {
8
+ import { IWithElementInternals } from '../../core/mixins/internals/with-element-internals';
9
+ import { IWithDefaultAria } from '../../core/mixins/internals/with-default-aria';
10
+ export interface ITabBarComponent extends IBaseComponent, IWithDefaultAria, IWithElementInternals {
9
11
  disabled: boolean;
10
12
  activeTab: number | null | undefined;
11
13
  vertical: boolean;
@@ -25,6 +27,7 @@ declare global {
25
27
  'forge-tab-bar-change': CustomEvent<ITabBarChangeEventData>;
26
28
  }
27
29
  }
30
+ declare const TabBarComponent_base: import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-default-aria").WithDefaultAriaContract> & import("../../constants").AbstractConstructor<import("../../core/mixins/internals/with-element-internals").WithElementInternalsContract> & typeof BaseComponent;
28
31
  /**
29
32
  * @tag forge-tab-bar
30
33
  *
@@ -57,7 +60,6 @@ declare global {
57
60
  * @attribute {boolean} [secondary=false] - Deprecated. Controls whether the tabs are styled as secondary tab navigation.
58
61
  * @attribute {boolean} [auto-activate=false] - Controls whether the tabs are automatically activated when receiving focus.
59
62
  * @attribute {boolean} [scroll-buttons=false] - Controls whether scroll buttons are displayed when the tabs overflow their container.
60
- * @attribute {string} [data-aria-label] - The ARIA label to forward to the internal tablist element.
61
63
  *
62
64
  * @event {CustomEvent<ITabBarChangeEventData>} forge-tab-bar-change - Dispatches when the active tab changes.
63
65
  *
@@ -69,7 +71,7 @@ declare global {
69
71
  * @csspart container - The container element.
70
72
  * @csspart scroll-container - The scroll container element.
71
73
  */
72
- export declare class TabBarComponent extends BaseComponent implements ITabBarComponent {
74
+ export declare class TabBarComponent extends TabBarComponent_base implements ITabBarComponent {
73
75
  static get observedAttributes(): string[];
74
76
  private _core;
75
77
  constructor();
@@ -87,3 +89,4 @@ export declare class TabBarComponent extends BaseComponent implements ITabBarCom
87
89
  autoActivate: boolean;
88
90
  scrollButtons: boolean;
89
91
  }
92
+ export {};
@@ -13,7 +13,10 @@ import { TabBarAdapter } from './tab-bar-adapter';
13
13
  import { TAB_BAR_CONSTANTS } from './tab-bar-constants';
14
14
  import { TabBarCore } from './tab-bar-core';
15
15
  import { tylIconKeyboardArrowLeft, tylIconKeyboardArrowRight, tylIconKeyboardArrowUp, tylIconKeyboardArrowDown } from '@tylertech/tyler-icons/standard';
16
- const template = '<template><div class=\"forge-tab-bar\" part=\"container\"><div role=\"tablist\" class=\"scroll-container\" part=\"scroll-container\"><slot></slot></div></div></template>';
16
+ import { WithElementInternals } from '../../core/mixins/internals/with-element-internals';
17
+ import { WithDefaultAria } from '../../core/mixins/internals/with-default-aria';
18
+ import { setDefaultAria } from '../../constants';
19
+ const template = '<template><div class=\"forge-tab-bar\" part=\"container\"><div class=\"scroll-container\" part=\"scroll-container\"><slot></slot></div></div></template>';
17
20
  const styles = ':host{position:relative;display:block}:host([hidden]){display:none}.forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, space-between);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 1);--_tab-bar-divider-color:var(--forge-tab-bar-divider-color, var(--forge-theme-outline, #e0e0e0));--_tab-bar-divider-thickness:var(--forge-tab-bar-divider-thickness, 1px)}.forge-tab-bar{position:relative;display:grid;grid-template-columns:auto 1fr auto;max-width:100%;max-height:100%;align-items:center;border-bottom:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}.scroll-container{position:relative;display:flex;justify-content:var(--_tab-bar-justify);align-items:flex-end;box-sizing:border-box;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;grid-column:2}.scroll-container::-webkit-scrollbar{display:none}::slotted(*){flex:var(--_tab-bar-stretch);align-self:stretch}::slotted([selected]){z-index:1}forge-icon-button{--forge-icon-button-shape-squared:0px}:host([vertical]) .forge-tab-bar{grid-template-columns:none;grid-template-rows:auto 1fr auto;align-items:initial;border-bottom:none;border-right:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color);height:100%}:host([vertical]) .scroll-container{display:inline-flex;flex-direction:column;align-items:stretch;gap:0;grid-column:auto;grid-row:2}:host([vertical]) .scroll-button{justify-self:center}:host([inverted]:not([vertical])) .forge-tab-bar{border-bottom:none;border-top:variale(divider-thickness) solid var(--_tab-bar-divider-color)}:host([inverted][vertical]) .forge-tab-bar{border-bottom:none;border-top:var(--_tab-bar-divider-thickness) solid var(--_tab-bar-divider-color)}:host([clustered]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start);--_tab-bar-stretch:var(--forge-tab-bar-stretch, 0)}:host([clustered=start]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-start)}:host([clustered=center]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, center)}:host([clustered=end]) .forge-tab-bar{--_tab-bar-justify:var(--forge-tab-bar-justify, flex-end)}';
18
21
  /**
19
22
  * @tag forge-tab-bar
@@ -47,7 +50,6 @@ const styles = ':host{position:relative;display:block}:host([hidden]){display:no
47
50
  * @attribute {boolean} [secondary=false] - Deprecated. Controls whether the tabs are styled as secondary tab navigation.
48
51
  * @attribute {boolean} [auto-activate=false] - Controls whether the tabs are automatically activated when receiving focus.
49
52
  * @attribute {boolean} [scroll-buttons=false] - Controls whether scroll buttons are displayed when the tabs overflow their container.
50
- * @attribute {string} [data-aria-label] - The ARIA label to forward to the internal tablist element.
51
53
  *
52
54
  * @event {CustomEvent<ITabBarChangeEventData>} forge-tab-bar-change - Dispatches when the active tab changes.
53
55
  *
@@ -59,7 +61,7 @@ const styles = ':host{position:relative;display:block}:host([hidden]){display:no
59
61
  * @csspart container - The container element.
60
62
  * @csspart scroll-container - The scroll container element.
61
63
  */
62
- let TabBarComponent = class TabBarComponent extends BaseComponent {
64
+ let TabBarComponent = class TabBarComponent extends WithDefaultAria(WithElementInternals(BaseComponent)) {
63
65
  static get observedAttributes() {
64
66
  return Object.values(TAB_BAR_CONSTANTS.observedAttributes);
65
67
  }
@@ -70,6 +72,7 @@ let TabBarComponent = class TabBarComponent extends BaseComponent {
70
72
  this._core = new TabBarCore(new TabBarAdapter(this));
71
73
  }
72
74
  connectedCallback() {
75
+ this[setDefaultAria]({ role: 'tablist' }, { setAttribute: true });
73
76
  this._core.initialize();
74
77
  }
75
78
  disconnectedCallback() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tylertech/forge",
3
3
  "description": "Tyler Forge™ Web Components library",
4
- "version": "3.5.0",
4
+ "version": "3.6.0-dev.0",
5
5
  "author": "Tyler Technologies, Inc.",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -21,4 +21,4 @@
21
21
  "tslib": "^2.8.1"
22
22
  },
23
23
  "customElements": "custom-elements.json"
24
- }
24
+ }
@@ -15,11 +15,14 @@
15
15
  @mixin base {
16
16
  position: relative;
17
17
  overflow: hidden;
18
+ block-size: 100%;
19
+ inline-size: 100%;
18
20
  }
19
21
 
20
22
  @mixin enabled {
21
23
  cursor: #{token(cursor)};
22
24
  }
25
+
23
26
  @mixin disabled {
24
27
  cursor: #{token(disabled-cursor)};
25
28
  }
@@ -17,8 +17,7 @@
17
17
  @mixin checkbox {
18
18
  position: relative;
19
19
  flex-direction: #{token(direction)};
20
- flex-shrink: 0;
21
- align-items: center;
20
+ align-items: #{token(align)};
22
21
  justify-content: #{token(justify)};
23
22
  gap: #{token(gap)};
24
23
 
@@ -39,6 +38,7 @@
39
38
  justify-content: center;
40
39
 
41
40
  display: flex;
41
+ flex-shrink: 0;
42
42
 
43
43
  border-radius: #{token(state-layer-shape)};
44
44
  inline-size: #{token(state-layer-width)};
@@ -38,6 +38,7 @@ $tokens: (
38
38
  // Label
39
39
  gap: utils.module-val(checkbox, gap, 0),
40
40
  justify: utils.module-val(checkbox, justify, start),
41
+ align: utils.module-val(checkbox, align, center),
41
42
  direction: utils.module-val(checkbox, direction, initial),
42
43
  // State layer
43
44
  state-layer-width: utils.module-ref(checkbox, state-layer-width, state-layer-size),
@@ -33,6 +33,7 @@ $tokens: (
33
33
  // Label
34
34
  gap: utils.module-val(radio, gap, 0),
35
35
  justify: utils.module-val(radio, justify, start),
36
+ align: utils.module-val(radio, align, center),
36
37
  direction: utils.module-val(radio, direction, initial),
37
38
  // State layer
38
39
  state-layer-width: utils.module-ref(radio, state-layer-width, state-layer-size),
@@ -52,6 +52,7 @@ $tokens: (
52
52
  // Label
53
53
  gap: utils.module-val(switch, gap, 0),
54
54
  justify: utils.module-val(switch, justify, start),
55
+ align: utils.module-val(switch, align, center),
55
56
  direction: utils.module-val(switch, direction, initial),
56
57
  // State layer
57
58
  state-layer-width: utils.module-ref(switch, state-layer-width, state-layer-size),
@@ -4,6 +4,7 @@
4
4
  * License: Apache-2.0
5
5
  */
6
6
  @use './core' as *;
7
+ @use '../utils/mixins' as utils;
7
8
  @use './animations';
8
9
  @use '../backdrop';
9
10
  @use '../core/styles/theme';
@@ -55,6 +56,10 @@ $can-animate: '[visible]:not([animation-type=none])';
55
56
  @include surface;
56
57
  }
57
58
 
59
+ .visually-hidden {
60
+ @include utils.visually-hidden;
61
+ }
62
+
58
63
  //
59
64
  // Backdrop
60
65
  //
@@ -94,6 +94,7 @@
94
94
  border-radius: inherit;
95
95
  opacity: #{token(selected-opacity)};
96
96
  background-color: #{token(selected-background)};
97
+ pointer-events: none;
97
98
  }
98
99
  }
99
100
 
@@ -111,6 +112,8 @@
111
112
 
112
113
  @mixin start-end-selected {
113
114
  color: #{token(selected-color)};
115
+
116
+ isolation: isolate;
114
117
  }
115
118
 
116
119
  @mixin text {
@@ -16,8 +16,7 @@
16
16
  @mixin radio {
17
17
  position: relative;
18
18
  flex-direction: #{token(direction)};
19
- flex-shrink: 0;
20
- align-items: center;
19
+ align-items: #{token(align)};
21
20
  justify-content: #{token(justify)};
22
21
  gap: #{token(gap)};
23
22
 
@@ -34,6 +33,7 @@
34
33
  justify-content: center;
35
34
 
36
35
  display: flex;
36
+ flex-shrink: 0;
37
37
 
38
38
  border-radius: #{token(shape)};
39
39
  inline-size: #{token(state-layer-width)};
@@ -36,8 +36,7 @@ $_handle-on-translate: calc(#{token(track-width)} - #{$_track-border-radius} * 2
36
36
  position: relative;
37
37
 
38
38
  flex-direction: #{token(direction)};
39
- flex-shrink: 0;
40
- align-items: center;
39
+ align-items: #{token(align)};
41
40
  justify-content: #{token(justify)};
42
41
  gap: #{token(gap)};
43
42
  }
@@ -65,6 +64,7 @@ $_handle-on-translate: calc(#{token(track-width)} - #{$_track-border-radius} * 2
65
64
  align-items: center;
66
65
 
67
66
  display: flex;
67
+ flex-shrink: 0;
68
68
 
69
69
  block-size: #{$_container-block-size};
70
70