@scania/tegel 1.27.0-toast-aria-live.0 → 1.28.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 (197) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/tds-dropdown_2.cjs.entry.js +8 -8
  3. package/dist/cjs/tds-footer-group.cjs.entry.js +27 -5
  4. package/dist/cjs/tds-footer-item.cjs.entry.js +2 -2
  5. package/dist/cjs/tds-footer.cjs.entry.js +1 -1
  6. package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +6 -2
  7. package/dist/cjs/tds-header-dropdown.cjs.entry.js +26 -3
  8. package/dist/cjs/tds-header-hamburger.cjs.entry.js +7 -1
  9. package/dist/cjs/tds-header-launcher-button.cjs.entry.js +2 -1
  10. package/dist/cjs/tds-header-launcher.cjs.entry.js +23 -2
  11. package/dist/cjs/tds-icon.cjs.entry.js +3 -2
  12. package/dist/cjs/tds-inline-tabs.cjs.entry.js +1 -1
  13. package/dist/cjs/tds-modal.cjs.entry.js +1 -1
  14. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
  15. package/dist/cjs/tds-popover-canvas.cjs.entry.js +3 -2
  16. package/dist/cjs/tds-popover-core.cjs.entry.js +55 -11
  17. package/dist/cjs/tds-popover-menu-item.cjs.entry.js +2 -2
  18. package/dist/cjs/tds-popover-menu.cjs.entry.js +1 -1
  19. package/dist/cjs/tds-radio-button.cjs.entry.js +3 -1
  20. package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
  21. package/dist/cjs/tds-step.cjs.entry.js +2 -1
  22. package/dist/cjs/tds-stepper.cjs.entry.js +2 -1
  23. package/dist/cjs/tds-text-field.cjs.entry.js +31 -16
  24. package/dist/cjs/tds-textarea.cjs.entry.js +9 -3
  25. package/dist/cjs/tds-toast.cjs.entry.js +3 -3
  26. package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
  28. package/dist/cjs/tegel.cjs.js +1 -1
  29. package/dist/collection/components/dropdown/dropdown.js +8 -8
  30. package/dist/collection/components/footer/footer-group/footer-group.css +23 -21
  31. package/dist/collection/components/footer/footer-group/footer-group.js +55 -5
  32. package/dist/collection/components/footer/footer-item/footer-item.css +17 -17
  33. package/dist/collection/components/footer/footer-item/footer-item.js +2 -2
  34. package/dist/collection/components/footer/footer.css +1 -1
  35. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.css +1 -1
  36. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +6 -2
  37. package/dist/collection/components/header/header-dropdown/header-dropdown.js +49 -3
  38. package/dist/collection/components/header/header-hamburger/header-hamburger.js +30 -1
  39. package/dist/collection/components/header/header-launcher/header-launcher.js +50 -2
  40. package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +19 -1
  41. package/dist/collection/components/icon/icon.js +21 -2
  42. package/dist/collection/components/modal/modal.css +48 -43
  43. package/dist/collection/components/popover-canvas/popover-canvas.js +21 -2
  44. package/dist/collection/components/popover-core/popover-core.js +63 -10
  45. package/dist/collection/components/popover-core/tds-popover-core.css +31 -40
  46. package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.js +2 -2
  47. package/dist/collection/components/popover-menu/popover-menu.js +1 -1
  48. package/dist/collection/components/radio-button/radio-button.js +37 -1
  49. package/dist/collection/components/spinner/spinner.css +62 -39
  50. package/dist/collection/components/stepper/step/step.js +19 -1
  51. package/dist/collection/components/stepper/stepper.js +20 -1
  52. package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +0 -1
  53. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -3
  54. package/dist/collection/components/text-field/text-field.css +21 -9
  55. package/dist/collection/components/text-field/text-field.js +48 -15
  56. package/dist/collection/components/textarea/textarea.js +26 -3
  57. package/dist/collection/components/toast/toast.js +3 -3
  58. package/dist/collection/components/toggle/toggle.js +2 -2
  59. package/dist/collection/components/tooltip/tooltip.js +2 -2
  60. package/dist/components/{p-2d93a742.js → p-1c606f82.js} +1 -1
  61. package/dist/components/{p-e71e3b2e.js → p-252f3d4d.js} +59 -13
  62. package/dist/components/{p-17338bcb.js → p-3dcfe1f4.js} +3 -3
  63. package/dist/components/{p-60ff84f2.js → p-789bb453.js} +5 -3
  64. package/dist/components/{p-4487c541.js → p-92fb75a7.js} +4 -2
  65. package/dist/components/{p-663b8e51.js → p-c0b84c59.js} +9 -9
  66. package/dist/components/{p-83db8b35.js → p-f8a36676.js} +5 -3
  67. package/dist/components/tds-accordion-item.js +1 -1
  68. package/dist/components/tds-banner.js +1 -1
  69. package/dist/components/tds-datetime.js +1 -1
  70. package/dist/components/tds-dropdown-option.js +1 -1
  71. package/dist/components/tds-dropdown.js +1 -1
  72. package/dist/components/tds-folder-tabs.js +1 -1
  73. package/dist/components/tds-footer-group.js +32 -8
  74. package/dist/components/tds-footer-item.js +3 -3
  75. package/dist/components/tds-footer.js +1 -1
  76. package/dist/components/tds-header-brand-symbol.js +6 -2
  77. package/dist/components/tds-header-cell.js +1 -1
  78. package/dist/components/tds-header-dropdown.js +31 -7
  79. package/dist/components/tds-header-hamburger.js +11 -3
  80. package/dist/components/tds-header-launcher-button.js +1 -1
  81. package/dist/components/tds-header-launcher.js +29 -7
  82. package/dist/components/tds-icon.js +1 -1
  83. package/dist/components/tds-inline-tabs.js +2 -2
  84. package/dist/components/tds-message.js +1 -1
  85. package/dist/components/tds-modal.js +2 -2
  86. package/dist/components/tds-navigation-tabs.js +2 -2
  87. package/dist/components/tds-popover-canvas.js +1 -1
  88. package/dist/components/tds-popover-core.js +1 -1
  89. package/dist/components/tds-popover-menu-item.js +2 -2
  90. package/dist/components/tds-popover-menu.js +2 -2
  91. package/dist/components/tds-radio-button.js +6 -2
  92. package/dist/components/tds-side-menu-close-button.js +1 -1
  93. package/dist/components/tds-side-menu-dropdown.js +1 -1
  94. package/dist/components/tds-slider.js +1 -1
  95. package/dist/components/tds-spinner.js +1 -1
  96. package/dist/components/tds-step.js +4 -2
  97. package/dist/components/tds-stepper.js +4 -2
  98. package/dist/components/tds-table-body-input-wrapper.js +1 -1
  99. package/dist/components/tds-table-footer.js +3 -3
  100. package/dist/components/tds-table-header-input-wrapper.js +1 -1
  101. package/dist/components/tds-table-toolbar.js +1 -1
  102. package/dist/components/tds-text-field.js +33 -17
  103. package/dist/components/tds-textarea.js +13 -6
  104. package/dist/components/tds-toast.js +4 -4
  105. package/dist/components/tds-toggle.js +2 -2
  106. package/dist/components/tds-tooltip.js +1 -1
  107. package/dist/esm/loader.js +1 -1
  108. package/dist/esm/tds-dropdown_2.entry.js +8 -8
  109. package/dist/esm/tds-footer-group.entry.js +27 -5
  110. package/dist/esm/tds-footer-item.entry.js +3 -3
  111. package/dist/esm/tds-footer.entry.js +1 -1
  112. package/dist/esm/tds-header-brand-symbol.entry.js +6 -2
  113. package/dist/esm/tds-header-dropdown.entry.js +26 -3
  114. package/dist/esm/tds-header-hamburger.entry.js +7 -1
  115. package/dist/esm/tds-header-launcher-button.entry.js +2 -1
  116. package/dist/esm/tds-header-launcher.entry.js +23 -2
  117. package/dist/esm/tds-icon.entry.js +3 -2
  118. package/dist/esm/tds-inline-tabs.entry.js +1 -1
  119. package/dist/esm/tds-modal.entry.js +1 -1
  120. package/dist/esm/tds-navigation-tabs.entry.js +1 -1
  121. package/dist/esm/tds-popover-canvas.entry.js +3 -2
  122. package/dist/esm/tds-popover-core.entry.js +55 -11
  123. package/dist/esm/tds-popover-menu-item.entry.js +2 -2
  124. package/dist/esm/tds-popover-menu.entry.js +1 -1
  125. package/dist/esm/tds-radio-button.entry.js +3 -1
  126. package/dist/esm/tds-spinner.entry.js +1 -1
  127. package/dist/esm/tds-step.entry.js +2 -1
  128. package/dist/esm/tds-stepper.entry.js +2 -1
  129. package/dist/esm/tds-text-field.entry.js +31 -16
  130. package/dist/esm/tds-textarea.entry.js +9 -3
  131. package/dist/esm/tds-toast.entry.js +3 -3
  132. package/dist/esm/tds-toggle.entry.js +2 -2
  133. package/dist/esm/tds-tooltip.entry.js +2 -2
  134. package/dist/esm/tegel.js +1 -1
  135. package/dist/tegel/{p-ad9a2141.entry.js → p-033d991e.entry.js} +1 -1
  136. package/dist/tegel/p-24db6b5b.entry.js +1 -0
  137. package/dist/tegel/p-27a4a7d0.entry.js +1 -0
  138. package/dist/tegel/p-28cf7204.entry.js +1 -0
  139. package/dist/tegel/p-302fea99.entry.js +1 -0
  140. package/dist/tegel/p-31bc440c.entry.js +1 -0
  141. package/dist/tegel/p-3e9ca19a.entry.js +1 -0
  142. package/dist/tegel/p-44ac6a20.entry.js +1 -0
  143. package/dist/tegel/{p-769d0503.entry.js → p-46205cfb.entry.js} +1 -1
  144. package/dist/tegel/p-54a20280.entry.js +1 -0
  145. package/dist/tegel/p-5a3ff0d3.entry.js +1 -0
  146. package/dist/tegel/p-660176d6.entry.js +1 -0
  147. package/dist/tegel/{p-eaa279dd.entry.js → p-81111221.entry.js} +1 -1
  148. package/dist/tegel/{p-668b7662.entry.js → p-8d7bf652.entry.js} +1 -1
  149. package/dist/tegel/p-b58f68f0.entry.js +1 -0
  150. package/dist/tegel/{p-5ba254ee.entry.js → p-c10be10e.entry.js} +1 -1
  151. package/dist/tegel/p-c71acb02.entry.js +1 -0
  152. package/dist/tegel/p-ceab8f75.entry.js +1 -0
  153. package/dist/tegel/p-e1abd593.entry.js +1 -0
  154. package/dist/tegel/p-e3c3bdac.entry.js +1 -0
  155. package/dist/tegel/p-e46744bc.entry.js +1 -0
  156. package/dist/tegel/p-ea9e7345.entry.js +1 -0
  157. package/dist/tegel/{p-97f10223.entry.js → p-eec22b6b.entry.js} +1 -1
  158. package/dist/tegel/p-f034fc0c.entry.js +1 -0
  159. package/dist/tegel/p-fa342278.entry.js +1 -0
  160. package/dist/tegel/{p-b9f81e53.entry.js → p-fc6196c4.entry.js} +1 -1
  161. package/dist/tegel/tegel.css +2 -2
  162. package/dist/tegel/tegel.esm.js +1 -1
  163. package/dist/types/components/footer/footer-group/footer-group.d.ts +7 -0
  164. package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +1 -1
  165. package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +4 -0
  166. package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +3 -0
  167. package/dist/types/components/header/header-launcher/header-launcher.d.ts +4 -0
  168. package/dist/types/components/header/header-launcher-button/header-launcher-button.d.ts +2 -0
  169. package/dist/types/components/icon/icon.d.ts +2 -0
  170. package/dist/types/components/popover-canvas/popover-canvas.d.ts +2 -0
  171. package/dist/types/components/popover-core/popover-core.d.ts +4 -0
  172. package/dist/types/components/radio-button/radio-button.d.ts +4 -0
  173. package/dist/types/components/stepper/step/step.d.ts +1 -0
  174. package/dist/types/components/stepper/stepper.d.ts +2 -0
  175. package/dist/types/components/text-field/text-field.d.ts +6 -4
  176. package/dist/types/components/textarea/textarea.d.ts +3 -0
  177. package/dist/types/components.d.ts +98 -0
  178. package/package.json +1 -1
  179. package/dist/tegel/p-035e58e6.entry.js +0 -1
  180. package/dist/tegel/p-125a6b06.entry.js +0 -1
  181. package/dist/tegel/p-28517288.entry.js +0 -1
  182. package/dist/tegel/p-288a09ef.entry.js +0 -1
  183. package/dist/tegel/p-4f5f152a.entry.js +0 -1
  184. package/dist/tegel/p-542d7b3e.entry.js +0 -1
  185. package/dist/tegel/p-5a7110b8.entry.js +0 -1
  186. package/dist/tegel/p-5db5c8f4.entry.js +0 -1
  187. package/dist/tegel/p-654785d2.entry.js +0 -1
  188. package/dist/tegel/p-746e2927.entry.js +0 -1
  189. package/dist/tegel/p-754a4921.entry.js +0 -1
  190. package/dist/tegel/p-843413ba.entry.js +0 -1
  191. package/dist/tegel/p-aef6b130.entry.js +0 -1
  192. package/dist/tegel/p-b114ec3d.entry.js +0 -1
  193. package/dist/tegel/p-b39ffad4.entry.js +0 -1
  194. package/dist/tegel/p-c56be8d1.entry.js +0 -1
  195. package/dist/tegel/p-dfbbaefd.entry.js +0 -1
  196. package/dist/tegel/p-ea3e071f.entry.js +0 -1
  197. package/dist/tegel/p-ee7f07ae.entry.js +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @slot <default> - <b>Unnamed slot.</b> For a link.
2
+ * @slot <default> - <b>Unnamed slot.</b> For a link. When using an <a> tag, use the aria-label attribute for accessibility.
3
3
  */
4
4
  export declare class TdsHeaderBrandSymbol {
5
5
  host: HTMLElement;
@@ -12,11 +12,15 @@ export declare class TdsHeaderDropdown {
12
12
  noDropdownIcon: boolean;
13
13
  /** If the button that opens the dropdown should appear selected. */
14
14
  selected: boolean;
15
+ /** Value to be used by the aria-label attribute */
16
+ tdsAriaLabel: string;
15
17
  open: boolean;
16
18
  buttonEl?: HTMLButtonElement;
17
19
  private uuid;
18
20
  onAnyClick(event: MouseEvent): void;
21
+ handleKeyDown(event: KeyboardEvent): void;
19
22
  toggleDropdown(): void;
20
23
  handleSlottedItemClick: (event: MouseEvent | KeyboardEvent) => void;
24
+ connectedCallback(): void;
21
25
  render(): any;
22
26
  }
@@ -1,4 +1,7 @@
1
1
  export declare class TdsHeaderHamburger {
2
2
  host: HTMLElement;
3
+ /** Value to be used by the aria-label attribute */
4
+ tdsAriaLabel: string;
5
+ connectedCallback(): void;
3
6
  render(): any;
4
7
  }
@@ -6,10 +6,14 @@ export declare class TdsHeaderLauncher {
6
6
  open: boolean;
7
7
  buttonEl?: HTMLTdsHeaderLauncherButtonElement;
8
8
  hasListTypeMenu: boolean;
9
+ /** Value to be used by the aria-label attribute of the launcher button */
10
+ tdsAriaLabel: string;
9
11
  private uuid;
10
12
  private ariaAttributes;
11
13
  onAnyClick(event: MouseEvent): void;
14
+ handleKeyDown(event: KeyboardEvent): void;
12
15
  componentDidLoad(): void;
13
16
  toggleLauncher(): void;
17
+ connectedCallback(): void;
14
18
  render(): any;
15
19
  }
@@ -3,6 +3,8 @@ export declare class TdsHeaderLauncherButton {
3
3
  /** If the button should appear active. Can be used when the button is
4
4
  * triggering a dropdown, and the dropdown is open, for example. */
5
5
  active: boolean;
6
+ /** Value to be used by the aria-label attribute */
7
+ tdsAriaLabel: string;
6
8
  private ariaAttributes;
7
9
  render(): any;
8
10
  }
@@ -7,6 +7,8 @@ export declare class Icon {
7
7
  size: string;
8
8
  /** Override the default title for the svg. Also used by aria-labelledby. */
9
9
  svgTitle?: string;
10
+ /** Set aria-hidden attribute on svg */
11
+ tdsAriaHidden: boolean;
10
12
  /** Set description for the svg. Also used by aria-describedby. */
11
13
  svgDescription?: string;
12
14
  icons_object: string;
@@ -26,6 +26,8 @@ export declare class TdsPopoverCanvas {
26
26
  offsetDistance: number;
27
27
  /** Array of modifier objects to pass to popper.js. See https://popper.js.org/docs/v2/modifiers/ */
28
28
  modifiers: Object[];
29
+ /** Role of the popover canvas component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages. */
30
+ tdsAlertDialog: 'alertdialog' | 'dialog';
29
31
  /** Property for closing popover programmatically */
30
32
  close(): Promise<void>;
31
33
  childRef?: HTMLTdsPopoverCoreElement;
@@ -34,6 +34,7 @@ export declare class TdsPopoverCore {
34
34
  isShown: boolean;
35
35
  disableLogic: boolean;
36
36
  hasShownAtLeastOnce: boolean;
37
+ openedByKeyboard: boolean;
37
38
  /** Property for closing popover programmatically */
38
39
  close(): Promise<void>;
39
40
  private uuid;
@@ -43,9 +44,12 @@ export declare class TdsPopoverCore {
43
44
  internalTdsClose: EventEmitter<{}>;
44
45
  onAnyClick(event: MouseEvent): void;
45
46
  onTdsShow(event: Event): void;
47
+ handleKeydown(event: KeyboardEvent): void;
46
48
  onShowChange(newValue: boolean): void;
47
49
  onReferenceElChanged(newValue: HTMLElement, oldValue: HTMLElement): void;
48
50
  onTriggerChanged(newValue: 'click' | 'hover' | 'hover-popover'): void;
51
+ onIsShownChange(newValue: boolean): void;
52
+ private focusFirstElement;
49
53
  private setIsShown;
50
54
  private onClickTarget;
51
55
  private handleShow;
@@ -16,6 +16,10 @@ export declare class TdsRadioButton {
16
16
  required: boolean;
17
17
  /** Decides if the Radio Button is disabled or not. */
18
18
  disabled: boolean;
19
+ /** Provides an accessible name for the component */
20
+ tdsAriaLabel: string;
21
+ /** Provides a tabindex used when radio buttons are grouped */
22
+ tdsTabIndex: number;
19
23
  /** Sends unique Radio Button identifier and status when it is checked.
20
24
  * If no ID is specified, a random one will be generated.
21
25
  * To use this listener, don't use the randomized ID, use a specific one of your choosing. */
@@ -7,6 +7,7 @@ export declare class TdsStep {
7
7
  index: string;
8
8
  /** State of the Step */
9
9
  state: 'current' | 'error' | 'success' | 'upcoming';
10
+ tdsAriaCurrent: string;
10
11
  hideLabels: boolean;
11
12
  size: 'sm' | 'lg';
12
13
  orientation: 'horizontal' | 'vertical';
@@ -28,6 +28,8 @@ export declare class TdsStepper {
28
28
  * as the default ID is random and will be different every time.
29
29
  */
30
30
  stepperId: string;
31
+ /** Label for the stepper component, for screen reader users */
32
+ ariaLabel: string;
31
33
  componentWillLoad(): void;
32
34
  /** @internal Broadcasts changes in props to the Stepper children */
33
35
  internalTdsPropsChange: EventEmitter<InternalTdsStepperPropChange>;
@@ -27,6 +27,8 @@ export declare class TdsTextField {
27
27
  disabled: boolean;
28
28
  /** Set input in readonly state */
29
29
  readOnly: boolean;
30
+ /** Hides the read-only icon in the Text Field. Requires Read Only to be enabled. */
31
+ hideReadOnlyIcon: boolean;
30
32
  /** Size of the input */
31
33
  size: 'sm' | 'md' | 'lg';
32
34
  /** Mode variant of the Text Field */
@@ -44,17 +46,17 @@ export declare class TdsTextField {
44
46
  /** Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true. */
45
47
  tdsAriaLabel: string;
46
48
  /** Listen to the focus state of the input */
47
- focusInput: any;
49
+ focusInput: boolean;
48
50
  /** Change event for the Text Field */
49
51
  tdsChange: EventEmitter;
50
- handleChange(event: any): void;
52
+ handleChange(event: Event): void;
51
53
  /** Input event for the Text Field */
52
54
  tdsInput: EventEmitter<InputEvent>;
53
- handleInput(event: any): void;
55
+ handleInput(event: InputEvent): void;
54
56
  /** Focus event for the Text Field */
55
57
  tdsFocus: EventEmitter<FocusEvent>;
56
58
  /** Set the input as focus when clicking the whole Text Field with suffix/prefix */
57
- handleFocus(event: any): void;
59
+ handleFocus(event: FocusEvent): void;
58
60
  /** Blur event for the Text Field */
59
61
  tdsBlur: EventEmitter<FocusEvent>;
60
62
  /** Set the input as focus when clicking the whole Text Field with suffix/prefix */
@@ -34,6 +34,8 @@ export declare class TdsTextarea {
34
34
  autofocus: boolean;
35
35
  /** Unset minimum width of 208px. */
36
36
  noMinWidth: boolean;
37
+ /** Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true. */
38
+ tdsAriaLabel: string;
37
39
  /** Listen to the focus state of the input */
38
40
  focusInput: boolean;
39
41
  /** Change event for the Textarea */
@@ -49,5 +51,6 @@ export declare class TdsTextarea {
49
51
  tdsFocus: EventEmitter<FocusEvent>;
50
52
  handleFocus(event: FocusEvent): void;
51
53
  setModeVariant(modeVariant: 'primary' | 'secondary'): string | null;
54
+ connectedCallback(): void;
52
55
  render(): any;
53
56
  }
@@ -535,6 +535,10 @@ export namespace Components {
535
535
  "modeVariant": 'primary' | 'secondary';
536
536
  }
537
537
  interface TdsFooterGroup {
538
+ /**
539
+ * Value to be used for the aria-label attribute for the nav element wrapping the list. Should be unique for accessibility.
540
+ */
541
+ "tdsListAriaLabel": string;
538
542
  /**
539
543
  * Title text for the link group, only valid on top part of Footer.
540
544
  */
@@ -585,6 +589,10 @@ export namespace Components {
585
589
  * If the button that opens the dropdown should appear selected.
586
590
  */
587
591
  "selected": boolean;
592
+ /**
593
+ * Value to be used by the aria-label attribute
594
+ */
595
+ "tdsAriaLabel": string;
588
596
  }
589
597
  interface TdsHeaderDropdownList {
590
598
  /**
@@ -621,6 +629,10 @@ export namespace Components {
621
629
  "subheader": string;
622
630
  }
623
631
  interface TdsHeaderHamburger {
632
+ /**
633
+ * Value to be used by the aria-label attribute
634
+ */
635
+ "tdsAriaLabel": string;
624
636
  }
625
637
  interface TdsHeaderItem {
626
638
  /**
@@ -633,12 +645,20 @@ export namespace Components {
633
645
  "selected": boolean;
634
646
  }
635
647
  interface TdsHeaderLauncher {
648
+ /**
649
+ * Value to be used by the aria-label attribute of the launcher button
650
+ */
651
+ "tdsAriaLabel": string;
636
652
  }
637
653
  interface TdsHeaderLauncherButton {
638
654
  /**
639
655
  * If the button should appear active. Can be used when the button is triggering a dropdown, and the dropdown is open, for example.
640
656
  */
641
657
  "active": boolean;
658
+ /**
659
+ * Value to be used by the aria-label attribute
660
+ */
661
+ "tdsAriaLabel": string;
642
662
  }
643
663
  interface TdsHeaderLauncherGrid {
644
664
  }
@@ -671,6 +691,10 @@ export namespace Components {
671
691
  * Override the default title for the svg. Also used by aria-labelledby.
672
692
  */
673
693
  "svgTitle"?: string;
694
+ /**
695
+ * Set aria-hidden attribute on svg
696
+ */
697
+ "tdsAriaHidden": boolean;
674
698
  }
675
699
  interface TdsInlineTab {
676
700
  /**
@@ -893,6 +917,10 @@ export namespace Components {
893
917
  * Controls whether the Popover is shown or not. If this is set hiding and showing will be decided by this prop and will need to be controlled from the outside. This also means that clicking outside of the popover won't close it. Takes precedence over `defaultShow` prop.
894
918
  */
895
919
  "show": boolean;
920
+ /**
921
+ * Role of the popover canvas component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages.
922
+ */
923
+ "tdsAlertDialog": 'alertdialog' | 'dialog';
896
924
  }
897
925
  interface TdsPopoverCore {
898
926
  /**
@@ -1013,6 +1041,14 @@ export namespace Components {
1013
1041
  * Decides if the Radio Button is required or not.
1014
1042
  */
1015
1043
  "required": boolean;
1044
+ /**
1045
+ * Provides an accessible name for the component
1046
+ */
1047
+ "tdsAriaLabel": string;
1048
+ /**
1049
+ * Provides a tabindex used when radio buttons are grouped
1050
+ */
1051
+ "tdsTabIndex": number;
1016
1052
  /**
1017
1053
  * Value of input.
1018
1054
  */
@@ -1201,8 +1237,13 @@ export namespace Components {
1201
1237
  * State of the Step
1202
1238
  */
1203
1239
  "state": 'current' | 'error' | 'success' | 'upcoming';
1240
+ "tdsAriaCurrent": string;
1204
1241
  }
1205
1242
  interface TdsStepper {
1243
+ /**
1244
+ * Label for the stepper component, for screen reader users
1245
+ */
1246
+ "ariaLabel": string;
1206
1247
  /**
1207
1248
  * Hides the label for the child components if true.
1208
1249
  */
@@ -1404,6 +1445,10 @@ export namespace Components {
1404
1445
  * Helper text
1405
1446
  */
1406
1447
  "helper": string;
1448
+ /**
1449
+ * Hides the read-only icon in the Text Field. Requires Read Only to be enabled.
1450
+ */
1451
+ "hideReadOnlyIcon": boolean;
1407
1452
  /**
1408
1453
  * Label text
1409
1454
  */
@@ -1526,6 +1571,10 @@ export namespace Components {
1526
1571
  * Error state of input
1527
1572
  */
1528
1573
  "state": 'error' | 'success' | 'default';
1574
+ /**
1575
+ * Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true.
1576
+ */
1577
+ "tdsAriaLabel": string;
1529
1578
  /**
1530
1579
  * Value of the input text
1531
1580
  */
@@ -3359,6 +3408,10 @@ declare namespace LocalJSX {
3359
3408
  "modeVariant"?: 'primary' | 'secondary';
3360
3409
  }
3361
3410
  interface TdsFooterGroup {
3411
+ /**
3412
+ * Value to be used for the aria-label attribute for the nav element wrapping the list. Should be unique for accessibility.
3413
+ */
3414
+ "tdsListAriaLabel"?: string;
3362
3415
  /**
3363
3416
  * Title text for the link group, only valid on top part of Footer.
3364
3417
  */
@@ -3417,6 +3470,10 @@ declare namespace LocalJSX {
3417
3470
  * If the button that opens the dropdown should appear selected.
3418
3471
  */
3419
3472
  "selected"?: boolean;
3473
+ /**
3474
+ * Value to be used by the aria-label attribute
3475
+ */
3476
+ "tdsAriaLabel"?: string;
3420
3477
  }
3421
3478
  interface TdsHeaderDropdownList {
3422
3479
  /**
@@ -3453,6 +3510,10 @@ declare namespace LocalJSX {
3453
3510
  "subheader"?: string;
3454
3511
  }
3455
3512
  interface TdsHeaderHamburger {
3513
+ /**
3514
+ * Value to be used by the aria-label attribute
3515
+ */
3516
+ "tdsAriaLabel"?: string;
3456
3517
  }
3457
3518
  interface TdsHeaderItem {
3458
3519
  /**
@@ -3465,12 +3526,20 @@ declare namespace LocalJSX {
3465
3526
  "selected"?: boolean;
3466
3527
  }
3467
3528
  interface TdsHeaderLauncher {
3529
+ /**
3530
+ * Value to be used by the aria-label attribute of the launcher button
3531
+ */
3532
+ "tdsAriaLabel"?: string;
3468
3533
  }
3469
3534
  interface TdsHeaderLauncherButton {
3470
3535
  /**
3471
3536
  * If the button should appear active. Can be used when the button is triggering a dropdown, and the dropdown is open, for example.
3472
3537
  */
3473
3538
  "active"?: boolean;
3539
+ /**
3540
+ * Value to be used by the aria-label attribute
3541
+ */
3542
+ "tdsAriaLabel"?: string;
3474
3543
  }
3475
3544
  interface TdsHeaderLauncherGrid {
3476
3545
  }
@@ -3503,6 +3572,10 @@ declare namespace LocalJSX {
3503
3572
  * Override the default title for the svg. Also used by aria-labelledby.
3504
3573
  */
3505
3574
  "svgTitle"?: string;
3575
+ /**
3576
+ * Set aria-hidden attribute on svg
3577
+ */
3578
+ "tdsAriaHidden"?: boolean;
3506
3579
  }
3507
3580
  interface TdsInlineTab {
3508
3581
  /**
@@ -3703,6 +3776,10 @@ declare namespace LocalJSX {
3703
3776
  * Controls whether the Popover is shown or not. If this is set hiding and showing will be decided by this prop and will need to be controlled from the outside. This also means that clicking outside of the popover won't close it. Takes precedence over `defaultShow` prop.
3704
3777
  */
3705
3778
  "show"?: boolean;
3779
+ /**
3780
+ * Role of the popover canvas component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages.
3781
+ */
3782
+ "tdsAlertDialog"?: 'alertdialog' | 'dialog';
3706
3783
  }
3707
3784
  interface TdsPopoverCore {
3708
3785
  /**
@@ -3822,6 +3899,14 @@ declare namespace LocalJSX {
3822
3899
  * Decides if the Radio Button is required or not.
3823
3900
  */
3824
3901
  "required"?: boolean;
3902
+ /**
3903
+ * Provides an accessible name for the component
3904
+ */
3905
+ "tdsAriaLabel"?: string;
3906
+ /**
3907
+ * Provides a tabindex used when radio buttons are grouped
3908
+ */
3909
+ "tdsTabIndex"?: number;
3825
3910
  /**
3826
3911
  * Value of input.
3827
3912
  */
@@ -4026,8 +4111,13 @@ declare namespace LocalJSX {
4026
4111
  * State of the Step
4027
4112
  */
4028
4113
  "state"?: 'current' | 'error' | 'success' | 'upcoming';
4114
+ "tdsAriaCurrent"?: string;
4029
4115
  }
4030
4116
  interface TdsStepper {
4117
+ /**
4118
+ * Label for the stepper component, for screen reader users
4119
+ */
4120
+ "ariaLabel"?: string;
4031
4121
  /**
4032
4122
  * Hides the label for the child components if true.
4033
4123
  */
@@ -4260,6 +4350,10 @@ declare namespace LocalJSX {
4260
4350
  * Helper text
4261
4351
  */
4262
4352
  "helper"?: string;
4353
+ /**
4354
+ * Hides the read-only icon in the Text Field. Requires Read Only to be enabled.
4355
+ */
4356
+ "hideReadOnlyIcon"?: boolean;
4263
4357
  /**
4264
4358
  * Label text
4265
4359
  */
@@ -4414,6 +4508,10 @@ declare namespace LocalJSX {
4414
4508
  * Error state of input
4415
4509
  */
4416
4510
  "state"?: 'error' | 'success' | 'default';
4511
+ /**
4512
+ * Value to be used for the aria-label attribute. Can be used for announcing that readOnly prop is set to true.
4513
+ */
4514
+ "tdsAriaLabel"?: string;
4417
4515
  /**
4418
4516
  * Value of the input text
4419
4517
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scania/tegel",
3
- "version": "1.27.0-toast-aria-live.0",
3
+ "version": "1.28.0",
4
4
  "description": "Tegel Design System",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as s,g as a}from"./p-2049fab2.js";import{i as o}from"./p-0bd4c19c.js";import"./p-3fe9cbbf.js";const r=class{constructor(t){e(this,t)}render(){const e=Object.assign({},o(this.host));return t(s,{key:"f2f230c8349ca3b5fdcfd7de67555b12888bd9d9"},t("tds-header-item",{key:"7db87ae4ad59bea1040399a33fdf77aa490ae1ca"},t("button",Object.assign({key:"bf5e3103c23c02e42db7e99a423348efb4488ed7"},e),t("tds-icon",{key:"306b78525304ac2f30a4bcb0be37c0ed7998b01f",class:"icon",name:"burger",size:"20px"}))))}get host(){return a(this)}};r.style=":host{color:var(--tds-white)}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:background 0.2s ease-in-out, color 0.2s ease-in-out}@media screen and (min-width: 992px){:host tds-header-item{display:none}:host([persistent]) tds-header-item{display:block}}";export{r as tds_header_hamburger}
@@ -1 +0,0 @@
1
- import{r as t,c as d,h as s,H as o,g as a}from"./p-2049fab2.js";import{h as i}from"./p-ae110fc2.js";import{g as e}from"./p-11648030.js";const l=class{constructor(s){t(this,s),this.tdsClose=d(this,"tdsClose",7),this.handleClose=t=>{const d=this.tdsClose.emit(t);this.returnFocusOnClose(),d.defaultPrevented||(this.isShown=!1)},this.handleShow=()=>{this.isShown=!0},this.handleOverlayClick=t=>{const d=t.composedPath()[0];("tds-modal-close"===d.classList[0]||"tds-modal-backdrop"===d.classList[0]&&!1===this.prevent)&&this.handleClose(t)},this.handleReferenceElementClick=t=>{this.isShown?this.handleClose(t):this.handleShow()},this.setShowButton=()=>{var t;if(this.selector||this.referenceEl){const d=null!==(t=this.referenceEl)&&void 0!==t?t:document.querySelector(this.selector);d&&this.initializeReferenceElement(d)}},this.initializeReferenceElement=t=>{t&&t.addEventListener("click",this.handleReferenceElementClick)},this.header=void 0,this.prevent=!1,this.size="md",this.actionsPosition="static",this.selector=void 0,this.referenceEl=void 0,this.show=void 0,this.closable=!0,this.tdsAlertDialog="dialog",this.isShown=!1,this.activeElementIndex=0}async showModal(){this.isShown=!0,requestAnimationFrame((()=>{const t=this.getFocusableElements();t.length>0&&(t[0].focus(),this.activeElementIndex=0)}))}async closeModal(){this.isShown=!1,this.returnFocusOnClose()}connectedCallback(){void 0===this.closable&&(this.closable=!0),void 0!==this.show&&(this.isShown=this.show),this.initializeModal(),this.header&&i("header",this.host)&&console.warn("Tegel Modal component: Using both header prop and header slot might break modal's design. Please use just one of them. ")}componentWillLoad(){this.initializeModal()}disconnectedCallback(){this.cleanupModal()}async initializeModal(){this.setDismissButtons(),this.setShowButton()}async cleanupModal(){var t;if(this.selector||this.referenceEl){const d=null!==(t=this.referenceEl)&&void 0!==t?t:document.querySelector(this.selector);d&&d.removeEventListener("click",this.handleReferenceElementClick)}this.host.querySelectorAll("[data-dismiss-modal]").forEach((t=>{t.removeEventListener("click",this.handleClose)}))}returnFocusOnClose(){var t;let d=null!==(t=this.referenceEl)&&void 0!==t?t:document.querySelector(this.selector);const s=["BUTTON","A","INPUT"];s.indexOf(d.tagName)<0&&(d=d.querySelectorAll(s.join(","))[0]),d.focus()}getFocusableElements(){const t=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(",");return[...Array.from(this.host.shadowRoot.querySelectorAll(t)),...Array.from(this.host.querySelectorAll(t))]}handleFocusTrap(t){if("Escape"===t.key&&this.isShown&&!this.prevent)return void this.handleClose(t);if(!this.isShown)return;if("Tab"!==t.key)return;const d=this.getFocusableElements();0!==d.length&&(t.preventDefault(),t.shiftKey&&(this.activeElementIndex-=1,-1===this.activeElementIndex&&(this.activeElementIndex=d.length-1)),t.shiftKey||(this.activeElementIndex+=1,this.activeElementIndex===d.length&&(this.activeElementIndex=0)),d[this.activeElementIndex].focus())}setDismissButtons(){this.host.querySelectorAll("[data-dismiss-modal]").forEach((t=>{t.addEventListener("click",this.handleClose)}))}render(){const t=i("header",this.host),d=i("actions",this.host),a=this.header?`tds-modal-header-${e()}`:void 0,l=`tds-modal-body-${e()}`;return s(o,{key:"398809ea45126dd70b95422f2f7a08a481a22d53",role:this.tdsAlertDialog,"aria-modal":"true","aria-describedby":l,"aria-labelledby":a,class:{show:this.isShown,hide:!this.isShown},onClick:t=>this.handleOverlayClick(t)},s("div",{key:"96e964cc4f3c6d9613fb53e340e0aa5dcd8b6d81",class:"tds-modal-backdrop"}),s("div",{key:"af7ddc896ef35b6116ae70524d10c4b7b952e20a",class:`tds-modal tds-modal__actions-${this.actionsPosition} tds-modal-${this.size}`},s("div",{key:"9dfcf95fcc8925cd5c97f10f29edc6cef183a0ca",id:a,class:"header"},this.header&&s("div",{key:"42533c25b07e696a0c61504556150018f8d3583a",class:"header-text"},this.header),t&&s("slot",{key:"d9855a20e1763ad17d6c8b80df85796d8f6027a8",name:"header"}),this.closable&&s("button",{key:"3e99b76da7bcf39eaecbe2906e0674fd20ebe9a6",class:"tds-modal-close","aria-label":"close",onClick:t=>this.handleClose(t)},s("tds-icon",{key:"f6463437fb98ae280afe358d50a2f960914014ea",name:"cross",size:"20px"}))),s("div",{key:"ba8ca2e65f5eac8103e6f3c431e3ae9aab2b5f72",id:l,class:"body"},s("slot",{key:"9e08cbdd00e1a60826588b15cb6ed23fc4b5b0d7",name:"body"})),d&&s("slot",{key:"aeb50dfcbf6c12e80a8904d149bb15892c691d88",name:"actions"})))}get host(){return a(this)}};l.style=".tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;max-height:85vh;overflow-y:auto;pointer-events:auto;}.tds-modal *{box-sizing:border-box}.tds-modal::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-track{background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500);border-radius:0 1em 1em 0}.tds-modal__actions-sticky{overflow:hidden;display:flex;flex-direction:column}.tds-modal__actions-sticky .body{font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{bottom:-1px;left:0;right:0;background-color:var(--tds-modal-background);padding:var(--tds-spacing-element-24) var(--tds-spacing-element-16) var(--tds-spacing-element-16);display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--tds-modal-background);display:flex;gap:16px;padding:24px 16px 16px}@media (min-width: 320px){.tds-modal-xs{width:100%}.tds-modal-sm{width:100%}.tds-modal-md{width:100%}.tds-modal-lg{width:100%}}@media (min-width: 672px){.tds-modal-xs{width:50%}.tds-modal-sm{width:62.5%}.tds-modal-md{width:75%}.tds-modal-lg{width:100%}}@media (min-width: 1056px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:43.75%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1312px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1584px){.tds-modal-xs{width:25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:50%}.tds-modal-lg{width:75%}}@media (max-width: 320px){.tds-modal-md,.tds-modal-lg,.tds-modal-sm{height:100%}.tds-modal-md slot[name=actions]::slotted(*),.tds-modal-lg slot[name=actions]::slotted(*),.tds-modal-sm slot[name=actions]::slotted(*){display:flex}}.header{display:flex;padding:var(--tds-spacing-element-16);position:sticky;top:0;background-color:var(--tds-modal-background);z-index:1}.header,slot[name=header]::slotted(*){color:var(--tds-modal-text);font:var(--tds-headline-05) !important;letter-spacing:var(--tds-headline-05-ls) !important;margin:0;flex:1}.body{color:var(--tds-modal-text);font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);overflow-y:visible;padding:0 var(--tds-spacing-element-16) var(--tds-spacing-element-16);}.body::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-track{background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500)}.tds-modal-backdrop{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--tds-modal-backdrop);pointer-events:auto}.tds-modal-backdrop *{box-sizing:border-box}button.tds-modal-close{margin:0 0 auto auto;background-color:transparent;border:0;padding:0;appearance:unset}.tds-modal-close{display:inline-block;height:auto;color:var(--tds-modal-icon);cursor:pointer}.tds-modal-close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}@media (min-width: 320px){.tds-modal-close{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn{display:inline-block;height:auto;background-repeat:no-repeat;cursor:pointer}@media (min-width: 320px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn svg{fill:var(--tds-modal-icon)}.tds-modal-overflow{overflow:hidden}:host{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;padding:0 16px;z-index:700;pointer-events:none}:host *{box-sizing:border-box}:host .tds-modal-close{border:none;background-color:transparent}:host .tds-modal-close-btn{border:none;background-color:transparent}@media (max-width: 320px){:host{padding:0}}:host.show{display:flex}:host.hide{display:none}:host(.show){display:flex}:host(.hide){display:none}";export{l as tds_modal}