@lumx/core 4.19.1-alpha.5 → 4.19.1-alpha.6

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.
@@ -11121,7 +11121,10 @@ table {
11121
11121
  position: relative;
11122
11122
  display: flex;
11123
11123
  }
11124
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11124
+ .lumx-tabs__link {
11125
+ text-decoration: none;
11126
+ }
11127
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11125
11128
  position: relative;
11126
11129
  display: flex;
11127
11130
  align-items: center;
@@ -11135,7 +11138,7 @@ table {
11135
11138
  transition-duration: 150ms;
11136
11139
  transition-property: border-radius, background-color, color;
11137
11140
  }
11138
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11141
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11139
11142
  position: absolute;
11140
11143
  top: 0;
11141
11144
  right: 0;
@@ -11150,76 +11153,76 @@ table {
11150
11153
  transition-property: border-radius, border-width, border-color;
11151
11154
  }
11152
11155
  @media (hover: hover) {
11153
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11156
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11154
11157
  border-width: var(--lumx-tabs-link-emphasis-low-state-hover-border-top-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-right-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-bottom-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-left-width);
11155
11158
  }}
11156
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11159
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11157
11160
  border-width: var(--lumx-tabs-link-emphasis-low-state-active-border-top-width) var(--lumx-tabs-link-emphasis-low-state-active-border-right-width) var(--lumx-tabs-link-emphasis-low-state-active-border-bottom-width) var(--lumx-tabs-link-emphasis-low-state-active-border-left-width);
11158
11161
  }
11159
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) i {
11162
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) i {
11160
11163
  margin-right: 8px;
11161
11164
  }
11162
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) span {
11165
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) span {
11163
11166
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11164
11167
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11165
11168
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11166
11169
  text-transform: var(--lumx-material-button-text-transform);
11167
11170
  }
11168
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11171
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11169
11172
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-color);
11170
11173
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-background-color);
11171
11174
  }
11172
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11175
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11173
11176
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-border-color);
11174
11177
  }
11175
11178
  @media (hover: hover) {
11176
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11179
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover {
11177
11180
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-color);
11178
11181
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-background-color);
11179
11182
  }}
11180
11183
  @media (hover: hover) {
11181
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11184
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11182
11185
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-border-color);
11183
11186
  }}
11184
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11187
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active {
11185
11188
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-color);
11186
11189
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-background-color);
11187
11190
  }
11188
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11191
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11189
11192
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-border-color);
11190
11193
  }
11191
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11194
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11192
11195
  outline: 2px solid var(--lumx-color-dark-N);
11193
11196
  outline-offset: 2px;
11194
11197
  }
11195
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11198
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11196
11199
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-color);
11197
11200
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-background-color);
11198
11201
  }
11199
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11202
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11200
11203
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-border-color);
11201
11204
  }
11202
11205
  @media (hover: hover) {
11203
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11206
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover {
11204
11207
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-color);
11205
11208
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-background-color);
11206
11209
  }}
11207
11210
  @media (hover: hover) {
11208
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11211
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11209
11212
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-border-color);
11210
11213
  }}
11211
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11214
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active {
11212
11215
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-color);
11213
11216
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-background-color);
11214
11217
  }
11215
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11218
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11216
11219
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-border-color);
11217
11220
  }
11218
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11221
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11219
11222
  outline: 2px solid var(--lumx-color-light-N);
11220
11223
  outline-offset: 2px;
11221
11224
  }
11222
- .lumx-tabs__link--is-active {
11225
+ .lumx-tabs__link--is-active, .lumx-tabs__link[aria-current=page] {
11223
11226
  position: relative;
11224
11227
  display: flex;
11225
11228
  align-items: center;
@@ -11233,7 +11236,7 @@ table {
11233
11236
  transition-duration: 150ms;
11234
11237
  transition-property: border-radius, background-color, color;
11235
11238
  }
11236
- .lumx-tabs__link--is-active::after {
11239
+ .lumx-tabs__link--is-active::after, .lumx-tabs__link[aria-current=page]::after {
11237
11240
  position: absolute;
11238
11241
  top: 0;
11239
11242
  right: 0;
@@ -11248,72 +11251,72 @@ table {
11248
11251
  transition-property: border-radius, border-width, border-color;
11249
11252
  }
11250
11253
  @media (hover: hover) {
11251
- .lumx-tabs__link--is-active:hover::after {
11254
+ .lumx-tabs__link--is-active:hover::after, .lumx-tabs__link[aria-current=page]:hover::after {
11252
11255
  border-width: var(--lumx-tabs-link-emphasis-selected-state-hover-border-top-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-right-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-bottom-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-left-width);
11253
11256
  }}
11254
- .lumx-tabs__link--is-active:active::after {
11257
+ .lumx-tabs__link--is-active:active::after, .lumx-tabs__link[aria-current=page]:active::after {
11255
11258
  border-width: var(--lumx-tabs-link-emphasis-selected-state-active-border-top-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-right-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-bottom-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-left-width);
11256
11259
  }
11257
- .lumx-tabs__link--is-active i {
11260
+ .lumx-tabs__link--is-active i, .lumx-tabs__link[aria-current=page] i {
11258
11261
  margin-right: 8px;
11259
11262
  }
11260
- .lumx-tabs__link--is-active span {
11263
+ .lumx-tabs__link--is-active span, .lumx-tabs__link[aria-current=page] span {
11261
11264
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11262
11265
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11263
11266
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11264
11267
  text-transform: var(--lumx-material-button-text-transform);
11265
11268
  }
11266
- .lumx-tabs--theme-light .lumx-tabs__link--is-active {
11269
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page] {
11267
11270
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-color);
11268
11271
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-background-color);
11269
11272
  }
11270
- .lumx-tabs--theme-light .lumx-tabs__link--is-active::after {
11273
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]::after {
11271
11274
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-border-color);
11272
11275
  }
11273
11276
  @media (hover: hover) {
11274
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover {
11277
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover {
11275
11278
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-color);
11276
11279
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-background-color);
11277
11280
  }}
11278
11281
  @media (hover: hover) {
11279
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after {
11282
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover::after {
11280
11283
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-border-color);
11281
11284
  }}
11282
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active {
11285
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active {
11283
11286
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-color);
11284
11287
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-background-color);
11285
11288
  }
11286
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after {
11289
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active::after {
11287
11290
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-border-color);
11288
11291
  }
11289
- .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added] {
11292
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added], .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page][data-focus-visible-added] {
11290
11293
  outline: 2px solid var(--lumx-color-dark-N);
11291
11294
  outline-offset: 2px;
11292
11295
  }
11293
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active {
11296
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page] {
11294
11297
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-color);
11295
11298
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-background-color);
11296
11299
  }
11297
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after {
11300
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]::after {
11298
11301
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-border-color);
11299
11302
  }
11300
11303
  @media (hover: hover) {
11301
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover {
11304
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover {
11302
11305
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-color);
11303
11306
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-background-color);
11304
11307
  }}
11305
11308
  @media (hover: hover) {
11306
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after {
11309
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover::after {
11307
11310
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-border-color);
11308
11311
  }}
11309
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active {
11312
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active {
11310
11313
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-color);
11311
11314
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-background-color);
11312
11315
  }
11313
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after {
11316
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active::after {
11314
11317
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-border-color);
11315
11318
  }
11316
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added] {
11319
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added], .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page][data-focus-visible-added] {
11317
11320
  outline: 2px solid var(--lumx-color-light-N);
11318
11321
  outline-offset: 2px;
11319
11322
  }
@@ -1,6 +1,6 @@
1
1
  import { Kind } from '../../constants';
2
2
  import type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';
3
- import { DialogProps } from '../Dialog';
3
+ import { DialogShellProps } from '../Dialog';
4
4
  export interface BaseAlertDialogProps {
5
5
  /** Message variant. */
6
6
  kind?: Kind;
@@ -11,7 +11,7 @@ export interface BaseAlertDialogProps {
11
11
  */
12
12
  children?: JSXElement;
13
13
  }
14
- export interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogProps, 'size'> {
14
+ export interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogShellProps, 'size'> {
15
15
  /** Props forwarded to the confirm button */
16
16
  confirmProps: any;
17
17
  /**
@@ -169,10 +169,10 @@ export declare function setup({ component: IconButton, decorators: { withCombina
169
169
  isActive?: boolean | undefined;
170
170
  isFocused?: boolean | undefined;
171
171
  isHovered?: boolean | undefined;
172
+ 'aria-label'?: string | undefined;
172
173
  'aria-expanded'?: boolean | "true" | "false" | undefined;
173
174
  'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
174
175
  'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
175
- 'aria-label'?: string | undefined;
176
176
  className?: string | undefined;
177
177
  theme?: import("@lumx/core/js/constants").Theme | undefined;
178
178
  'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
@@ -243,10 +243,10 @@ export declare function setup({ component: Button, decorators: { withCombination
243
243
  isActive?: boolean | undefined;
244
244
  isFocused?: boolean | undefined;
245
245
  isHovered?: boolean | undefined;
246
+ 'aria-label'?: string | undefined;
246
247
  'aria-expanded'?: boolean | "true" | "false" | undefined;
247
248
  'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
248
249
  'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
249
- 'aria-label'?: string | undefined;
250
250
  className?: string | undefined;
251
251
  theme?: Theme | undefined;
252
252
  'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
@@ -1,2 +1,3 @@
1
1
  import { VHSize } from '../../utils/browser/css/types';
2
2
  export declare const DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT: VHSize;
3
+ export declare const COMBOBOX_PROVIDER_COMPONENT_NAME = "ComboboxProvider";
@@ -0,0 +1,61 @@
1
+ import type { CommonRef, GenericProps, JSXElement } from '../../types';
2
+ import type { BaseDialogProps } from './types';
3
+ /**
4
+ * Component display name.
5
+ */
6
+ export declare const COMPONENT_NAME = "DialogContent";
7
+ /**
8
+ * Props of the dialog content: the `role="dialog"` element (which carries `aria-labelledby`) and
9
+ * everything inside it (header, body, footer). It is meant to be rendered by a framework component
10
+ * that has resolved `labelId` from the ids registry.
11
+ */
12
+ export interface DialogContentProps extends BaseDialogProps {
13
+ /**
14
+ * Id of the heading naming this dialog (read from the ids registry by the framework), applied as
15
+ * `aria-labelledby`. Overridden by an explicit `aria-label`/`aria-labelledby` set via `dialogProps`.
16
+ */
17
+ labelId?: string;
18
+ /** Additional props for the dialog container element. */
19
+ dialogProps?: GenericProps;
20
+ /** On close callback. */
21
+ handleClose?(): void;
22
+ /** Whether to prevent closing on click away. */
23
+ shouldPreventCloseOnClickAway?: boolean;
24
+ /** Refs used for click-away detection. */
25
+ clickAwayRefs?: any;
26
+ /** Ref for the root wrapper element. */
27
+ rootRef?: CommonRef;
28
+ /** Ref for the inner section element. */
29
+ wrapperRef?: CommonRef;
30
+ /** Reference to the dialog content element. */
31
+ contentRef?: CommonRef;
32
+ /** Props forwarded from a child <header> element. */
33
+ headerChildProps?: GenericProps;
34
+ /** Content extracted from a child <header> element. */
35
+ headerChildContent?: JSXElement;
36
+ /** Whether the header sentinel is out of view (controls header divider). */
37
+ hasTopIntersection: boolean | null;
38
+ /** Dialog body content. */
39
+ content?: JSXElement;
40
+ /** Ref setter for the top scroll sentinel element. */
41
+ setSentinelTop?: any;
42
+ /** Ref setter for the bottom scroll sentinel element. */
43
+ setSentinelBottom?: any;
44
+ /** Props forwarded from a child <footer> element. */
45
+ footerChildProps?: GenericProps;
46
+ /** Content extracted from a child <footer> element. */
47
+ footerChildContent?: JSXElement;
48
+ /** Whether the footer sentinel is out of view (controls footer divider). */
49
+ hasBottomIntersection: boolean | null;
50
+ /** ProgressCircular component. */
51
+ ProgressCircular: any;
52
+ /** ClickAwayProvider component. */
53
+ ClickAwayProvider: any;
54
+ }
55
+ /**
56
+ * Dialog content: the `role="dialog"` element + header/body/footer.
57
+ *
58
+ * @param props Component props.
59
+ * @return React element.
60
+ */
61
+ export declare const DialogContent: (props: DialogContentProps) => import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
+ /**
3
+ * Core stories for DialogHeading, shared by React and Vue.
4
+ *
5
+ * Framework-agnostic on purpose: it defines no JSX `render` and no `play`, relying on Storybook's
6
+ * default rendering of the injected `component` from `args`. Each framework only injects its own
7
+ * `DialogHeading` component.
8
+ */
9
+ export declare function setup({ component: DialogHeading }: SetupStoriesOptions): {
10
+ meta: {
11
+ component: any;
12
+ render: ({ children, ...args }: any) => import("react").JSX.Element;
13
+ args: {
14
+ children: string;
15
+ };
16
+ };
17
+ /**
18
+ * `DialogHeading` renders a `Heading` defaulting to the `title` typography.
19
+ *
20
+ * Rendered inside a `Dialog`, `Lightbox` or `PopoverDialog` it also names the container via
21
+ * `aria-labelledby` — see those components' stories for the integration.
22
+ */
23
+ Default: {
24
+ args: {};
25
+ };
26
+ /** The default `title` typography can be overridden with the `typography` prop. */
27
+ CustomTypography: {
28
+ args: {
29
+ typography: "headline";
30
+ };
31
+ };
32
+ };
@@ -0,0 +1,18 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ /**
3
+ * Mounts a standalone DialogHeading and returns the rendered heading element.
4
+ *
5
+ * The framework-specific `render` adapter receives `{ children, ...props }` and is responsible for
6
+ * mounting `<DialogHeading {...props}>{children}</DialogHeading>` in its own idiom.
7
+ */
8
+ export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
9
+ props: any;
10
+ dialogHeading: HTMLElement;
11
+ wrapper: Partial<import("../../../testing").SetupResult>;
12
+ };
13
+ /**
14
+ * Shared assertions for the standalone rendering of `DialogHeading` (no enclosing container).
15
+ * Registry wiring lives in `labelRegistryTests`; framework-specific prop/ref forwarding stays in the
16
+ * per-package `commonTestsSuite`.
17
+ */
18
+ export declare const DialogHeadingTests: (renderOptions: SetupOptions<any>) => void;
@@ -0,0 +1,42 @@
1
+ import type { CommonRef, HasClassName } from '../../types';
2
+ import type { DialogSizes } from './types';
3
+ /**
4
+ * Props of the outer shell: the overlay + the context providers (theme, heading level, and the
5
+ * internal ids registry). It renders `children` - typically a framework component that reads the
6
+ * registered label id and renders a `DialogContent`.
7
+ */
8
+ export interface DialogShellProps extends HasClassName {
9
+ /** Reference to the root element. */
10
+ ref?: CommonRef;
11
+ /** Whether the component is open or not. */
12
+ isOpen?: boolean;
13
+ /** Whether the indefinite progress indicator is displayed (drives the loading class). */
14
+ isLoading?: boolean;
15
+ /** Whether the component is still visible (e.g. during close animation). */
16
+ isVisible?: boolean;
17
+ /** Size variant. */
18
+ size?: DialogSizes;
19
+ /** Z-axis position. */
20
+ zIndex?: number;
21
+ /** Content rendered inside the overlay + providers (typically a framework `DialogContent` reader). */
22
+ children?: any;
23
+ /** Portal component for rendering outside the DOM hierarchy. */
24
+ Portal: any;
25
+ /** HeadingLevelProvider component. */
26
+ HeadingLevelProvider: any;
27
+ /** ThemeProvider component. */
28
+ ThemeProvider: any;
29
+ /** Provides the ids registry so a `DialogHeading` in the subtree can be linked via `aria-labelledby`. */
30
+ IdsRegistryProvider: any;
31
+ }
32
+ /**
33
+ * Component default props.
34
+ */
35
+ export declare const DEFAULT_PROPS: Partial<Pick<DialogShellProps, 'size'>>;
36
+ /**
37
+ * Dialog shell: overlay + context providers (theme, heading level, ids registry).
38
+ *
39
+ * @param props Component props.
40
+ * @return React element.
41
+ */
42
+ export declare const DialogShell: (props: DialogShellProps) => import("react").JSX.Element;
@@ -19,7 +19,7 @@ export declare function setup({ component: Dialog, render, decorators: { withChr
19
19
  };
20
20
  };
21
21
  decorators: ((story: any, context: any) => any)[];
22
- args: Partial<import(".").DialogProps>;
22
+ args: Partial<Pick<import("./DialogShell").DialogShellProps, "size">>;
23
23
  argTypes: {
24
24
  size: {
25
25
  control: {
@@ -0,0 +1,24 @@
1
+ import type { LumxClassName } from '../../types';
2
+ /**
3
+ * Dialog label id key in IdsRegistry
4
+ */
5
+ export declare const DIALOG_LABEL_KEY = "dialog-label";
6
+ /**
7
+ * Component display name.
8
+ */
9
+ export declare const COMPONENT_NAME = "Dialog";
10
+ /**
11
+ * `DialogHeading` component display name.
12
+ */
13
+ export declare const DIALOG_HEADING_COMPONENT_NAME = "DialogHeading";
14
+ /**
15
+ * Component default class name and class prefix. Shared by the shell and the container modules.
16
+ */
17
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
18
+ export declare const block: {
19
+ (additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
20
+ (modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
21
+ }, element: {
22
+ (elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
23
+ (elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
24
+ };
@@ -1,99 +1,4 @@
1
- import type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps } from '../../types';
2
- import { Size } from '../../constants';
3
- export interface BaseDialogProps {
4
- /** Footer content. */
5
- footer?: JSXElement;
6
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
7
- forceFooterDivider?: boolean;
8
- /** Header content. */
9
- header?: JSXElement;
10
- /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
11
- forceHeaderDivider?: boolean;
12
- /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
13
- isLoading?: boolean;
14
- /** Whether the component is open or not. */
15
- isOpen?: boolean;
16
- }
17
- /**
18
- * Defines the props of the component.
19
- */
20
- export interface DialogProps extends HasClassName, BaseDialogProps {
21
- /** Reference to the root element. */
22
- ref?: CommonRef;
23
- /** Whether the component is still visible (e.g. during close animation). */
24
- isVisible?: boolean;
25
- /** Reference to the dialog content element. */
26
- contentRef?: CommonRef;
27
- /** Size variant. */
28
- size?: DialogSizes;
29
- /** Z-axis position. */
30
- zIndex?: number;
31
- /** Additional props for the dialog container element. */
32
- dialogProps?: GenericProps;
33
- /** On close callback. */
34
- handleClose?(): void;
35
- /** Whether to prevent closing on click away. */
36
- shouldPreventCloseOnClickAway?: boolean;
37
- /** Refs used for click-away detection. */
38
- clickAwayRefs?: any;
39
- /** Ref for the root wrapper element. */
40
- rootRef?: CommonRef;
41
- /** Ref for the inner section element. */
42
- wrapperRef?: CommonRef;
43
- /** Whether the header sentinel is out of view (controls header divider). */
44
- hasTopIntersection: boolean | null;
45
- /** Whether the footer sentinel is out of view (controls footer divider). */
46
- hasBottomIntersection: boolean | null;
47
- /** Props forwarded from a child <header> element. */
48
- headerChildProps?: GenericProps;
49
- /** Content extracted from a child <header> element. */
50
- headerChildContent?: JSXElement;
51
- /** Props forwarded from a child <footer> element. */
52
- footerChildProps?: GenericProps;
53
- /** Content extracted from a child <footer> element. */
54
- footerChildContent?: JSXElement;
55
- /** Dialog body content. */
56
- content?: JSXElement;
57
- /** Ref setter for the top scroll sentinel element. */
58
- setSentinelTop?: any;
59
- /** Ref setter for the bottom scroll sentinel element. */
60
- setSentinelBottom?: any;
61
- /** Portal component for rendering outside the DOM hierarchy. */
62
- Portal: any;
63
- /** HeadingLevelProvider component. */
64
- HeadingLevelProvider: any;
65
- /** ThemeProvider component. */
66
- ThemeProvider: any;
67
- /** ClickAwayProvider component. */
68
- ClickAwayProvider: any;
69
- /** ProgressCircular component */
70
- ProgressCircular: any;
71
- }
72
- export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
73
- /**
74
- * Component display name.
75
- */
76
- export declare const COMPONENT_NAME = "Dialog";
77
- /**
78
- * Component default class name and class prefix.
79
- */
80
- export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
81
- export declare const block: {
82
- (additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
83
- (modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
84
- }, element: {
85
- (elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
86
- (elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
87
- };
88
- /**
89
- * Component default props.
90
- */
91
- export declare const DEFAULT_PROPS: Partial<DialogProps>;
92
- /**
93
- * Dialog component.
94
- *
95
- * @param props Component props.
96
- * @param ref Component ref.
97
- * @return React element.
98
- */
99
- export declare const Dialog: (props: DialogProps) => import("react").JSX.Element;
1
+ export { COMPONENT_NAME, CLASSNAME, block, element, DIALOG_LABEL_KEY } from './constants';
2
+ export { type BaseDialogProps, type DialogSizes } from './types';
3
+ export { DialogShell, DEFAULT_PROPS, type DialogShellProps } from './DialogShell';
4
+ export { DialogContent, type DialogContentProps } from './DialogContent';
@@ -0,0 +1,19 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ export interface LabelRegistrySetupOptions extends SetupOptions<any> {
3
+ /** Framework factory producing a DialogHeading child carrying the given accessible name. */
4
+ makeDialogHeading: (name: string) => any;
5
+ }
6
+ /**
7
+ * Shared assertions proving a dialog-like container (`Dialog`, `Lightbox`, `PopoverDialog`) wires the
8
+ * ids registry: it links itself to a rendered `DialogHeading` via `aria-labelledby`, and stays
9
+ * unlabelled when none is present.
10
+ *
11
+ * The container's own precedence rules (explicit `aria-label`/`aria-labelledby`/`label` props), the
12
+ * unmount behaviour, and any framework-specific concerns (e.g. Vue stray-attribute leaks) stay in the
13
+ * per-package test files. Registry mechanics (last-wins, fallback) are covered by the IdsRegistry
14
+ * tests.
15
+ *
16
+ * `aria-label` is forced to `undefined` because some containers default it, which would otherwise win
17
+ * over the registry-provided `aria-labelledby`.
18
+ */
19
+ export declare const DialogLabelRegistryTests: (renderOptions: LabelRegistrySetupOptions) => void;
@@ -0,0 +1,17 @@
1
+ import type { JSXElement } from '../../types';
2
+ import type { Size } from '../../constants';
3
+ export interface BaseDialogProps {
4
+ /** Footer content. */
5
+ footer?: JSXElement;
6
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
7
+ forceFooterDivider?: boolean;
8
+ /** Header content. */
9
+ header?: JSXElement;
10
+ /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
11
+ forceHeaderDivider?: boolean;
12
+ /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
13
+ isLoading?: boolean;
14
+ /** Whether the component is open or not. */
15
+ isOpen?: boolean;
16
+ }
17
+ export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
@@ -32,6 +32,7 @@ export declare const getHeadingProps: (props: HeadingProps, contextHeadingElemen
32
32
  as: HeadingElement;
33
33
  className: string;
34
34
  typography: import("../../constants").Typography;
35
+ id?: string | undefined;
35
36
  color?: import("../../constants").ColorWithVariants | undefined;
36
37
  colorVariant?: import("../../constants").ColorVariant | undefined;
37
38
  truncate?: boolean | {
@@ -27,6 +27,12 @@ export interface LightboxProps extends BaseLightboxProps {
27
27
  parentElement?: CommonRef;
28
28
  /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */
29
29
  focusElement?: CommonRef;
30
+ /**
31
+ * Id of the heading naming this lightbox (via the internal ids registry), applied as
32
+ * `aria-labelledby` on the lightbox container. Overridden by an explicit `aria-label`/
33
+ * `aria-labelledby`.
34
+ */
35
+ labelId?: string;
30
36
  /** On close callback. */
31
37
  handleClose?(): void;
32
38
  /** Children */
@@ -0,0 +1 @@
1
+ export declare const MENU_PROVIDER_COMPONENT_NAME = "MenuProvider";
@@ -1,10 +1,13 @@
1
- import type { HasAriaLabelOrLabelledBy, LumxClassName } from '../../types';
1
+ import type { AriaAttributes, LumxClassName } from '../../types';
2
2
  import type { PopoverProps } from '../Popover';
3
3
  /**
4
4
  * PopoverDialog props.
5
- * The PopoverDialog has the same props as the Popover but requires an accessible label.
5
+ * The PopoverDialog has the same props as the Popover, plus optional accessible-name props.
6
+ * An accessible name can be provided via `label`, `aria-label`, `aria-labelledby`, or by
7
+ * rendering a `DialogHeading` inside the dialog (which names it via the internal label
8
+ * registry) - at least one of these should be used.
6
9
  */
7
- export type PopoverDialogProps = PopoverProps & HasAriaLabelOrLabelledBy & {
10
+ export type PopoverDialogProps = PopoverProps & Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> & {
8
11
  /** Accessible label for the dialog (alternative to aria-label prop). */
9
12
  label?: string;
10
13
  };
@@ -1,9 +1,14 @@
1
- import { CommonRef, HasClassName, JSXElement } from '../../types';
1
+ import { CommonRef, ElementType, HasClassName, HasRequiredLinkHref, JSXElement } from '../../types';
2
2
  import { IconProps } from '../Icon';
3
3
  /**
4
- * Defines the props of the component.
4
+ * Element a `Tab` can render as: `'button'` (default, classic tab), `'a'` (nav-link, `href`
5
+ * required via {@link HasRequiredLinkHref}), or any `ElementType` (nav-link, e.g. a router `Link`).
5
6
  */
6
- export interface TabProps extends HasClassName {
7
+ export type TabElement = 'a' | 'button' | ElementType;
8
+ /**
9
+ * Defines the props of the component (independent of the `as` element).
10
+ */
11
+ export interface CommonTabProps extends HasClassName {
7
12
  /** Children are not supported. */
8
13
  children?: never;
9
14
  /** Icon (SVG path). */
@@ -14,6 +19,11 @@ export interface TabProps extends HasClassName {
14
19
  id?: string;
15
20
  /** Whether the tab is active or not. */
16
21
  isActive?: boolean;
22
+ /**
23
+ * WAI-ARIA `tab` role, resolved by the framework wrapper from `TabProvider` presence:
24
+ * `'tab'` inside a provider (classic tab mode), `undefined` outside (nav-link mode).
25
+ */
26
+ role?: 'tab';
17
27
  /** Whether the component is disabled or not. */
18
28
  isDisabled?: boolean;
19
29
  /** Label content. */
@@ -34,18 +44,31 @@ export interface TabProps extends HasClassName {
34
44
  tabIndexProp?: string;
35
45
  /** Name of the prop used to attach the keypress event (framework-dependent). */
36
46
  keyPressProp?: string;
37
- /** ID applied to the tab button element (for aria-labelledby on the panel). */
38
- tabId?: string;
39
47
  /** ID of the associated tab panel (for aria-controls). */
40
48
  tabPanelId?: string;
41
49
  /** Icon component injected by the framework wrapper. */
42
50
  Icon: any;
43
51
  /** Text component injected by the framework wrapper. */
44
52
  Text: any;
45
- /** Forward ref to the underlying button element. */
53
+ /** Forward ref to the underlying element. */
46
54
  ref?: CommonRef;
47
55
  }
48
- export type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
56
+ /**
57
+ * Polymorphic `as` surface for `Tab`. Not `HasPolymorphicAs<E>`: core JSX is type-checked under
58
+ * both the React and Vue namespaces, so spreading React DOM prop types would break the Vue
59
+ * cross-check. `href` is required at compile time when `as === 'a'` (via {@link HasRequiredLinkHref}).
60
+ */
61
+ export type TabAsProps<E extends TabElement = 'button'> = {
62
+ as?: E;
63
+ } & (E extends 'a' ? HasRequiredLinkHref<'a'> : unknown);
64
+ /**
65
+ * Props of the `Tab` component. Polymorphic on `as` (element selection only): `as` picks the
66
+ * rendered element, while **mode is driven by `TabProvider` presence** (via the wrapper-resolved
67
+ * `role`), not by `as`. The `href` conditional's false branch is `unknown` (not a record) to avoid
68
+ * widening `keyof TabProps`.
69
+ */
70
+ export type TabProps<E extends TabElement = 'button'> = CommonTabProps & TabAsProps<E>;
71
+ export type TabPropsToOverride = 'as' | 'role' | 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabPanelId' | 'Icon' | 'Text';
49
72
  /**
50
73
  * Component display name.
51
74
  */
@@ -59,12 +82,14 @@ export declare const DEFAULT_PROPS: Partial<TabProps>;
59
82
  */
60
83
  export declare const CLASSNAME = "lumx-tabs__link";
61
84
  /**
62
- * Tab component.
63
- *
64
- * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
85
+ * Tab component. Two modes keyed on `TabProvider` presence (via the wrapper-resolved `role`):
86
+ * tab mode (`role === 'tab'`, inside a provider) implements the WAI-ARIA `tab` role
87
+ * {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label};
88
+ * nav-link mode (no provider) renders plain link semantics (`aria-current`, no tab role/aria).
89
+ * `as` only selects the rendered element and applies in both modes.
65
90
  *
66
91
  * @param props Component props.
67
92
  * @param ref Component ref.
68
93
  * @return React element.
69
94
  */
70
- export declare const Tab: (props: TabProps) => import("react").JSX.Element;
95
+ export declare const Tab: <E extends TabElement = "button">(props: TabProps<E>) => import("react").JSX.Element;
@@ -16,9 +16,12 @@ export interface TabListProps extends HasClassName, HasTheme {
16
16
  layout?: TabListLayout;
17
17
  /** Position of the tabs in the list (requires 'clustered' layout). */
18
18
  position?: Alignment;
19
+ /** `role` applied to the inner `__links` container */
20
+ role?: 'navigation' | 'tablist';
19
21
  /** ref to the wrapper element */
20
22
  ref?: CommonRef;
21
23
  }
24
+ export type TabListPropsToOverride = 'role';
22
25
  /**
23
26
  * Component display name.
24
27
  */
@@ -2,3 +2,4 @@
2
2
  * Component default class name and class prefix.
3
3
  */
4
4
  export declare const TABS_CLASSNAME = "lumx-tabs";
5
+ export declare const TAB_PROVIDER_COMPONENT_NAME = "TabProvider";
@@ -5,6 +5,10 @@ import { ColorWithVariants, ColorVariant, Typography, WhiteSpace } from '../../c
5
5
  * Defines the props of the component.
6
6
  */
7
7
  export interface TextProps extends HasClassName {
8
+ /**
9
+ * HTML id.
10
+ */
11
+ id?: string;
8
12
  /**
9
13
  * Color variant.
10
14
  */
@@ -15,11 +15,11 @@ export interface ToolbarProps extends HasClassName {
15
15
  /**
16
16
  * Component display name.
17
17
  */
18
- export declare const TOOLBAR_NAME = "Toolbar";
18
+ export declare const COMPONENT_NAME = "Toolbar";
19
19
  /**
20
20
  * Component default class name and class prefix.
21
21
  */
22
- export declare const CLASSNAME: LumxClassName<typeof TOOLBAR_NAME>;
22
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
23
23
  /**
24
24
  * Component default props.
25
25
  */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Picks the accessible-name prop (`aria-label` or `aria-labelledby`).
3
+ */
4
+ export declare function resolveAccessibleNameProps(ariaLabel: string | undefined, ariaLabelledBy: string | undefined): {
5
+ 'aria-label': string;
6
+ } | {
7
+ 'aria-labelledby': string;
8
+ } | undefined;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * `IdsRegistryProvider` component display name.
3
+ */
4
+ export declare const COMPONENT_NAME = "IdsRegistryProvider";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Internal "ids registry" contract shared between framework wrappers (`@lumx/react`, `@lumx/vue`).
3
+ */
4
+ export interface IdsRegistry {
5
+ /** Get the id currently registered under `key` (the most recently registered one still holding it), if any. */
6
+ getId(key: string): string | undefined;
7
+ /**
8
+ * Register (or clear, when `id` is `undefined`) the id held by `token` under `key`. `token` identifies the
9
+ * registrant (e.g. one per component instance) so that clearing/overwriting only ever affects its own
10
+ * registration: if it wasn't the most recent registrant, clearing it falls back to whichever other
11
+ * registrant is still holding the key. Notifies its listeners when the id returned by `getId` changes.
12
+ */
13
+ setId(key: string, token: unknown, id: string | undefined): void;
14
+ /** Subscribe to changes of the id registered under `key`. Returns an unsubscribe function. */
15
+ subscribe(key: string, listener: (key: string) => void): () => void;
16
+ }
17
+ /**
18
+ * Create a standalone ids registry.
19
+ *
20
+ * Can be used to store ids for 'aria-labelledby' or 'aria-describedby'. Registrations under the same key are
21
+ * kept as a stack (most recently registered wins); a registrant clearing itself only affects the top of the
22
+ * stack if it put itself there, so an older still-registered registrant is restored instead of the key going
23
+ * empty.
24
+ */
25
+ export declare function createIdsRegistry(): IdsRegistry;
package/lumx.css CHANGED
@@ -11802,7 +11802,10 @@ table {
11802
11802
  position: relative;
11803
11803
  display: flex;
11804
11804
  }
11805
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11805
+ .lumx-tabs__link {
11806
+ text-decoration: none;
11807
+ }
11808
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11806
11809
  position: relative;
11807
11810
  display: flex;
11808
11811
  align-items: center;
@@ -11816,7 +11819,7 @@ table {
11816
11819
  transition-duration: 150ms;
11817
11820
  transition-property: border-radius, background-color, color;
11818
11821
  }
11819
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11822
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11820
11823
  position: absolute;
11821
11824
  top: 0;
11822
11825
  right: 0;
@@ -11831,76 +11834,76 @@ table {
11831
11834
  transition-property: border-radius, border-width, border-color;
11832
11835
  }
11833
11836
  @media (hover: hover) {
11834
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11837
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11835
11838
  border-width: var(--lumx-tabs-link-emphasis-low-state-hover-border-top-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-right-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-bottom-width) var(--lumx-tabs-link-emphasis-low-state-hover-border-left-width);
11836
11839
  }}
11837
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11840
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11838
11841
  border-width: var(--lumx-tabs-link-emphasis-low-state-active-border-top-width) var(--lumx-tabs-link-emphasis-low-state-active-border-right-width) var(--lumx-tabs-link-emphasis-low-state-active-border-bottom-width) var(--lumx-tabs-link-emphasis-low-state-active-border-left-width);
11839
11842
  }
11840
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) i {
11843
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) i {
11841
11844
  margin-right: 8px;
11842
11845
  }
11843
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) span {
11846
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) span {
11844
11847
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11845
11848
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11846
11849
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11847
11850
  text-transform: var(--lumx-material-button-text-transform);
11848
11851
  }
11849
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11852
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11850
11853
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-color);
11851
11854
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-background-color);
11852
11855
  }
11853
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11856
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11854
11857
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-border-color);
11855
11858
  }
11856
11859
  @media (hover: hover) {
11857
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11860
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover {
11858
11861
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-color);
11859
11862
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-background-color);
11860
11863
  }}
11861
11864
  @media (hover: hover) {
11862
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11865
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11863
11866
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-border-color);
11864
11867
  }}
11865
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11868
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active {
11866
11869
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-color);
11867
11870
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-background-color);
11868
11871
  }
11869
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11872
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11870
11873
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-border-color);
11871
11874
  }
11872
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11875
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11873
11876
  outline: 2px solid var(--lumx-color-dark-N);
11874
11877
  outline-offset: 2px;
11875
11878
  }
11876
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11879
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11877
11880
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-color);
11878
11881
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-background-color);
11879
11882
  }
11880
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11883
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11881
11884
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-border-color);
11882
11885
  }
11883
11886
  @media (hover: hover) {
11884
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11887
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover {
11885
11888
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-color);
11886
11889
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-background-color);
11887
11890
  }}
11888
11891
  @media (hover: hover) {
11889
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11892
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11890
11893
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-border-color);
11891
11894
  }}
11892
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11895
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active {
11893
11896
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-color);
11894
11897
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-background-color);
11895
11898
  }
11896
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11899
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11897
11900
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-border-color);
11898
11901
  }
11899
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11902
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11900
11903
  outline: 2px solid var(--lumx-color-light-N);
11901
11904
  outline-offset: 2px;
11902
11905
  }
11903
- .lumx-tabs__link--is-active {
11906
+ .lumx-tabs__link--is-active, .lumx-tabs__link[aria-current=page] {
11904
11907
  position: relative;
11905
11908
  display: flex;
11906
11909
  align-items: center;
@@ -11914,7 +11917,7 @@ table {
11914
11917
  transition-duration: 150ms;
11915
11918
  transition-property: border-radius, background-color, color;
11916
11919
  }
11917
- .lumx-tabs__link--is-active::after {
11920
+ .lumx-tabs__link--is-active::after, .lumx-tabs__link[aria-current=page]::after {
11918
11921
  position: absolute;
11919
11922
  top: 0;
11920
11923
  right: 0;
@@ -11929,72 +11932,72 @@ table {
11929
11932
  transition-property: border-radius, border-width, border-color;
11930
11933
  }
11931
11934
  @media (hover: hover) {
11932
- .lumx-tabs__link--is-active:hover::after {
11935
+ .lumx-tabs__link--is-active:hover::after, .lumx-tabs__link[aria-current=page]:hover::after {
11933
11936
  border-width: var(--lumx-tabs-link-emphasis-selected-state-hover-border-top-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-right-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-bottom-width) var(--lumx-tabs-link-emphasis-selected-state-hover-border-left-width);
11934
11937
  }}
11935
- .lumx-tabs__link--is-active:active::after {
11938
+ .lumx-tabs__link--is-active:active::after, .lumx-tabs__link[aria-current=page]:active::after {
11936
11939
  border-width: var(--lumx-tabs-link-emphasis-selected-state-active-border-top-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-right-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-bottom-width) var(--lumx-tabs-link-emphasis-selected-state-active-border-left-width);
11937
11940
  }
11938
- .lumx-tabs__link--is-active i {
11941
+ .lumx-tabs__link--is-active i, .lumx-tabs__link[aria-current=page] i {
11939
11942
  margin-right: 8px;
11940
11943
  }
11941
- .lumx-tabs__link--is-active span {
11944
+ .lumx-tabs__link--is-active span, .lumx-tabs__link[aria-current=page] span {
11942
11945
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11943
11946
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11944
11947
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11945
11948
  text-transform: var(--lumx-material-button-text-transform);
11946
11949
  }
11947
- .lumx-tabs--theme-light .lumx-tabs__link--is-active {
11950
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page] {
11948
11951
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-color);
11949
11952
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-background-color);
11950
11953
  }
11951
- .lumx-tabs--theme-light .lumx-tabs__link--is-active::after {
11954
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]::after {
11952
11955
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-border-color);
11953
11956
  }
11954
11957
  @media (hover: hover) {
11955
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover {
11958
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover {
11956
11959
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-color);
11957
11960
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-background-color);
11958
11961
  }}
11959
11962
  @media (hover: hover) {
11960
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after {
11963
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover::after {
11961
11964
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-border-color);
11962
11965
  }}
11963
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active {
11966
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active {
11964
11967
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-color);
11965
11968
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-background-color);
11966
11969
  }
11967
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after {
11970
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active::after {
11968
11971
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-border-color);
11969
11972
  }
11970
- .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added] {
11973
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added], .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page][data-focus-visible-added] {
11971
11974
  outline: 2px solid var(--lumx-color-dark-N);
11972
11975
  outline-offset: 2px;
11973
11976
  }
11974
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active {
11977
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page] {
11975
11978
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-color);
11976
11979
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-background-color);
11977
11980
  }
11978
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after {
11981
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]::after {
11979
11982
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-border-color);
11980
11983
  }
11981
11984
  @media (hover: hover) {
11982
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover {
11985
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover {
11983
11986
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-color);
11984
11987
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-background-color);
11985
11988
  }}
11986
11989
  @media (hover: hover) {
11987
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after {
11990
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover::after {
11988
11991
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-border-color);
11989
11992
  }}
11990
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active {
11993
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active {
11991
11994
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-color);
11992
11995
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-background-color);
11993
11996
  }
11994
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after {
11997
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active::after {
11995
11998
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-border-color);
11996
11999
  }
11997
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added] {
12000
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added], .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page][data-focus-visible-added] {
11998
12001
  outline: 2px solid var(--lumx-color-light-N);
11999
12002
  outline-offset: 2px;
12000
12003
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/dom": "^1.7.5",
10
- "@lumx/icons": "^4.19.1-alpha.5",
10
+ "@lumx/icons": "^4.19.1-alpha.6",
11
11
  "classnames": "^2.3.2",
12
12
  "focus-visible": "^5.0.2",
13
13
  "lodash": "4.18.1",
@@ -66,7 +66,7 @@
66
66
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "4.19.1-alpha.5",
69
+ "version": "4.19.1-alpha.6",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -16,7 +16,9 @@
16
16
  }
17
17
 
18
18
  &__link {
19
- &:not(&--is-active):not(&--is-disabled) {
19
+ text-decoration: none;
20
+
21
+ &:not(&--is-active):not([aria-current="page"]):not(&--is-disabled) {
20
22
  @include lumx-tabs-link(lumx-base-const("emphasis", "LOW"));
21
23
 
22
24
  #{$self}--theme-light & {
@@ -28,7 +30,8 @@
28
30
  }
29
31
  }
30
32
 
31
- &--is-active {
33
+ &--is-active,
34
+ &[aria-current="page"] {
32
35
  @include lumx-tabs-link(lumx-base-const("emphasis", "SELECTED"));
33
36
 
34
37
  #{$self}--theme-light & {