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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11121,10 +11121,7 @@ table {
11121
11121
  position: relative;
11122
11122
  display: flex;
11123
11123
  }
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) {
11124
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11128
11125
  position: relative;
11129
11126
  display: flex;
11130
11127
  align-items: center;
@@ -11138,7 +11135,7 @@ table {
11138
11135
  transition-duration: 150ms;
11139
11136
  transition-property: border-radius, background-color, color;
11140
11137
  }
11141
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11138
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11142
11139
  position: absolute;
11143
11140
  top: 0;
11144
11141
  right: 0;
@@ -11153,76 +11150,76 @@ table {
11153
11150
  transition-property: border-radius, border-width, border-color;
11154
11151
  }
11155
11152
  @media (hover: hover) {
11156
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11153
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11157
11154
  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);
11158
11155
  }}
11159
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11156
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11160
11157
  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);
11161
11158
  }
11162
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) i {
11159
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) i {
11163
11160
  margin-right: 8px;
11164
11161
  }
11165
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) span {
11162
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) span {
11166
11163
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11167
11164
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11168
11165
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11169
11166
  text-transform: var(--lumx-material-button-text-transform);
11170
11167
  }
11171
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11168
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11172
11169
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-color);
11173
11170
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-background-color);
11174
11171
  }
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 {
11172
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11176
11173
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-border-color);
11177
11174
  }
11178
11175
  @media (hover: 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 {
11176
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11180
11177
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-color);
11181
11178
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-background-color);
11182
11179
  }}
11183
11180
  @media (hover: hover) {
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 {
11181
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11185
11182
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-border-color);
11186
11183
  }}
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 {
11184
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11188
11185
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-color);
11189
11186
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-background-color);
11190
11187
  }
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 {
11188
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11192
11189
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-border-color);
11193
11190
  }
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] {
11191
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11195
11192
  outline: 2px solid var(--lumx-color-dark-N);
11196
11193
  outline-offset: 2px;
11197
11194
  }
11198
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11195
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11199
11196
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-color);
11200
11197
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-background-color);
11201
11198
  }
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 {
11199
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11203
11200
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-border-color);
11204
11201
  }
11205
11202
  @media (hover: 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 {
11203
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11207
11204
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-color);
11208
11205
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-background-color);
11209
11206
  }}
11210
11207
  @media (hover: hover) {
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 {
11208
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11212
11209
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-border-color);
11213
11210
  }}
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 {
11211
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11215
11212
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-color);
11216
11213
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-background-color);
11217
11214
  }
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 {
11215
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11219
11216
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-border-color);
11220
11217
  }
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] {
11218
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11222
11219
  outline: 2px solid var(--lumx-color-light-N);
11223
11220
  outline-offset: 2px;
11224
11221
  }
11225
- .lumx-tabs__link--is-active, .lumx-tabs__link[aria-current=page] {
11222
+ .lumx-tabs__link--is-active {
11226
11223
  position: relative;
11227
11224
  display: flex;
11228
11225
  align-items: center;
@@ -11236,7 +11233,7 @@ table {
11236
11233
  transition-duration: 150ms;
11237
11234
  transition-property: border-radius, background-color, color;
11238
11235
  }
11239
- .lumx-tabs__link--is-active::after, .lumx-tabs__link[aria-current=page]::after {
11236
+ .lumx-tabs__link--is-active::after {
11240
11237
  position: absolute;
11241
11238
  top: 0;
11242
11239
  right: 0;
@@ -11251,72 +11248,72 @@ table {
11251
11248
  transition-property: border-radius, border-width, border-color;
11252
11249
  }
11253
11250
  @media (hover: hover) {
11254
- .lumx-tabs__link--is-active:hover::after, .lumx-tabs__link[aria-current=page]:hover::after {
11251
+ .lumx-tabs__link--is-active:hover::after {
11255
11252
  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);
11256
11253
  }}
11257
- .lumx-tabs__link--is-active:active::after, .lumx-tabs__link[aria-current=page]:active::after {
11254
+ .lumx-tabs__link--is-active:active::after {
11258
11255
  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);
11259
11256
  }
11260
- .lumx-tabs__link--is-active i, .lumx-tabs__link[aria-current=page] i {
11257
+ .lumx-tabs__link--is-active i {
11261
11258
  margin-right: 8px;
11262
11259
  }
11263
- .lumx-tabs__link--is-active span, .lumx-tabs__link[aria-current=page] span {
11260
+ .lumx-tabs__link--is-active span {
11264
11261
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11265
11262
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11266
11263
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11267
11264
  text-transform: var(--lumx-material-button-text-transform);
11268
11265
  }
11269
- .lumx-tabs--theme-light .lumx-tabs__link--is-active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page] {
11266
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active {
11270
11267
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-color);
11271
11268
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-background-color);
11272
11269
  }
11273
- .lumx-tabs--theme-light .lumx-tabs__link--is-active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]::after {
11270
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active::after {
11274
11271
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-border-color);
11275
11272
  }
11276
11273
  @media (hover: hover) {
11277
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover {
11274
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover {
11278
11275
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-color);
11279
11276
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-background-color);
11280
11277
  }}
11281
11278
  @media (hover: hover) {
11282
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover::after {
11279
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after {
11283
11280
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-border-color);
11284
11281
  }}
11285
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active {
11282
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active {
11286
11283
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-color);
11287
11284
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-background-color);
11288
11285
  }
11289
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active::after {
11286
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after {
11290
11287
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-border-color);
11291
11288
  }
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] {
11289
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added] {
11293
11290
  outline: 2px solid var(--lumx-color-dark-N);
11294
11291
  outline-offset: 2px;
11295
11292
  }
11296
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page] {
11293
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active {
11297
11294
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-color);
11298
11295
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-background-color);
11299
11296
  }
11300
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]::after {
11297
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after {
11301
11298
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-border-color);
11302
11299
  }
11303
11300
  @media (hover: hover) {
11304
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover {
11301
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover {
11305
11302
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-color);
11306
11303
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-background-color);
11307
11304
  }}
11308
11305
  @media (hover: hover) {
11309
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover::after {
11306
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after {
11310
11307
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-border-color);
11311
11308
  }}
11312
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active {
11309
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active {
11313
11310
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-color);
11314
11311
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-background-color);
11315
11312
  }
11316
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active::after {
11313
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after {
11317
11314
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-border-color);
11318
11315
  }
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] {
11316
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added] {
11320
11317
  outline: 2px solid var(--lumx-color-light-N);
11321
11318
  outline-offset: 2px;
11322
11319
  }
@@ -1,14 +1,9 @@
1
- import { CommonRef, ElementType, HasClassName, HasRequiredLinkHref, JSXElement } from '../../types';
1
+ import { CommonRef, HasClassName, JSXElement } from '../../types';
2
2
  import { IconProps } from '../Icon';
3
3
  /**
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`).
4
+ * Defines the props of the component.
6
5
  */
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 {
6
+ export interface TabProps extends HasClassName {
12
7
  /** Children are not supported. */
13
8
  children?: never;
14
9
  /** Icon (SVG path). */
@@ -19,8 +14,6 @@ export interface CommonTabProps extends HasClassName {
19
14
  id?: string;
20
15
  /** Whether the tab is active or not. */
21
16
  isActive?: boolean;
22
- /** Synonym for `isActive` — `'page'` marks the tab as active (WAI-ARIA nav-link convention). */
23
- 'aria-current'?: 'page' | boolean;
24
17
  /** Whether the component is disabled or not. */
25
18
  isDisabled?: boolean;
26
19
  /** Label content. */
@@ -49,24 +42,10 @@ export interface CommonTabProps extends HasClassName {
49
42
  Icon: any;
50
43
  /** Text component injected by the framework wrapper. */
51
44
  Text: any;
52
- /** Forward ref to the underlying element. */
45
+ /** Forward ref to the underlying button element. */
53
46
  ref?: CommonRef;
54
47
  }
55
- /**
56
- * Polymorphic `as` surface for `Tab`. Not `HasPolymorphicAs<E>`: core JSX is type-checked under
57
- * both the React and Vue namespaces, so spreading React DOM prop types would break the Vue
58
- * cross-check. `href` is required at compile time when `as === 'a'` (via {@link HasRequiredLinkHref}).
59
- */
60
- export type TabAsProps<E extends TabElement = 'button'> = {
61
- as?: E;
62
- } & (E extends 'a' ? HasRequiredLinkHref<'a'> : unknown);
63
- /**
64
- * Props of the `Tab` component. Polymorphic on `as`: setting it enters **nav-link mode**,
65
- * rendering that element instead of a `<button role="tab">`. The `href` conditional's false
66
- * branch is `unknown` (not a record) to avoid widening `keyof TabProps`.
67
- */
68
- export type TabProps<E extends TabElement = 'button'> = CommonTabProps & TabAsProps<E>;
69
- export type TabPropsToOverride = 'as' | 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
48
+ export type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
70
49
  /**
71
50
  * Component display name.
72
51
  */
@@ -80,13 +59,12 @@ export declare const DEFAULT_PROPS: Partial<TabProps>;
80
59
  */
81
60
  export declare const CLASSNAME = "lumx-tabs__link";
82
61
  /**
83
- * Tab component. Two modes keyed on `as`: classic (no `as`) implements the WAI-ARIA `tab` role
84
- * {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label};
85
- * nav-link (`as` set) renders plain link semantics (`aria-current`, no tab role/aria), decoupled
86
- * from the TabProvider.
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}
87
65
  *
88
66
  * @param props Component props.
89
67
  * @param ref Component ref.
90
68
  * @return React element.
91
69
  */
92
- export declare const Tab: <E extends TabElement = "button">(props: TabProps<E>) => import("react").JSX.Element;
70
+ export declare const Tab: (props: TabProps) => import("react").JSX.Element;
@@ -16,12 +16,9 @@ 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';
21
19
  /** ref to the wrapper element */
22
20
  ref?: CommonRef;
23
21
  }
24
- export type TabListPropsToOverride = 'role';
25
22
  /**
26
23
  * Component display name.
27
24
  */
@@ -2,8 +2,12 @@ import type { CommonRef } from '../../types';
2
2
  export { setupInfiniteScrollObserver } from './setupInfiniteScrollObserver';
3
3
  export declare const INFINITE_SCROLL_CLASSNAME = "lumx-infinite-scroll-anchor";
4
4
  export interface InfiniteScrollProps {
5
- /** Callback when infinite scroll component is in view */
6
- callback: (evt?: Event) => void;
5
+ /**
6
+ * Callback when infinite scroll component is in view.
7
+ * Omit (e.g. while loading) to temporarily disable without changing the callback's
8
+ * identity when re-enabled — keeps the underlying observer stable.
9
+ */
10
+ callback?(evt?: Event): void;
7
11
  /** Customize intersection observer option */
8
12
  options?: IntersectionObserverInit;
9
13
  }
package/lumx.css CHANGED
@@ -11802,10 +11802,7 @@ table {
11802
11802
  position: relative;
11803
11803
  display: flex;
11804
11804
  }
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) {
11805
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11809
11806
  position: relative;
11810
11807
  display: flex;
11811
11808
  align-items: center;
@@ -11819,7 +11816,7 @@ table {
11819
11816
  transition-duration: 150ms;
11820
11817
  transition-property: border-radius, background-color, color;
11821
11818
  }
11822
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled)::after {
11819
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11823
11820
  position: absolute;
11824
11821
  top: 0;
11825
11822
  right: 0;
@@ -11834,76 +11831,76 @@ table {
11834
11831
  transition-property: border-radius, border-width, border-color;
11835
11832
  }
11836
11833
  @media (hover: hover) {
11837
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):hover::after {
11834
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11838
11835
  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);
11839
11836
  }}
11840
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled):active::after {
11837
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11841
11838
  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);
11842
11839
  }
11843
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) i {
11840
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) i {
11844
11841
  margin-right: 8px;
11845
11842
  }
11846
- .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) span {
11843
+ .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) span {
11847
11844
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11848
11845
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11849
11846
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11850
11847
  text-transform: var(--lumx-material-button-text-transform);
11851
11848
  }
11852
- .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11849
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11853
11850
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-color);
11854
11851
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-background-color);
11855
11852
  }
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 {
11853
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11857
11854
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-light-border-color);
11858
11855
  }
11859
11856
  @media (hover: 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 {
11857
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11861
11858
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-color);
11862
11859
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-background-color);
11863
11860
  }}
11864
11861
  @media (hover: hover) {
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 {
11862
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11866
11863
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-light-border-color);
11867
11864
  }}
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 {
11865
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11869
11866
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-color);
11870
11867
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-background-color);
11871
11868
  }
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 {
11869
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11873
11870
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-light-border-color);
11874
11871
  }
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] {
11872
+ .lumx-tabs--theme-light .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11876
11873
  outline: 2px solid var(--lumx-color-dark-N);
11877
11874
  outline-offset: 2px;
11878
11875
  }
11879
- .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not([aria-current=page]):not(.lumx-tabs__link--is-disabled) {
11876
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled) {
11880
11877
  color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-color);
11881
11878
  background-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-background-color);
11882
11879
  }
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 {
11880
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)::after {
11884
11881
  border-color: var(--lumx-tabs-link-emphasis-low-state-default-theme-dark-border-color);
11885
11882
  }
11886
11883
  @media (hover: 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 {
11884
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover {
11888
11885
  color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-color);
11889
11886
  background-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-background-color);
11890
11887
  }}
11891
11888
  @media (hover: hover) {
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 {
11889
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):hover::after {
11893
11890
  border-color: var(--lumx-tabs-link-emphasis-low-state-hover-theme-dark-border-color);
11894
11891
  }}
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 {
11892
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active {
11896
11893
  color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-color);
11897
11894
  background-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-background-color);
11898
11895
  }
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 {
11896
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled):active::after {
11900
11897
  border-color: var(--lumx-tabs-link-emphasis-low-state-active-theme-dark-border-color);
11901
11898
  }
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] {
11899
+ .lumx-tabs--theme-dark .lumx-tabs__link:not(.lumx-tabs__link--is-active):not(.lumx-tabs__link--is-disabled)[data-focus-visible-added] {
11903
11900
  outline: 2px solid var(--lumx-color-light-N);
11904
11901
  outline-offset: 2px;
11905
11902
  }
11906
- .lumx-tabs__link--is-active, .lumx-tabs__link[aria-current=page] {
11903
+ .lumx-tabs__link--is-active {
11907
11904
  position: relative;
11908
11905
  display: flex;
11909
11906
  align-items: center;
@@ -11917,7 +11914,7 @@ table {
11917
11914
  transition-duration: 150ms;
11918
11915
  transition-property: border-radius, background-color, color;
11919
11916
  }
11920
- .lumx-tabs__link--is-active::after, .lumx-tabs__link[aria-current=page]::after {
11917
+ .lumx-tabs__link--is-active::after {
11921
11918
  position: absolute;
11922
11919
  top: 0;
11923
11920
  right: 0;
@@ -11932,72 +11929,72 @@ table {
11932
11929
  transition-property: border-radius, border-width, border-color;
11933
11930
  }
11934
11931
  @media (hover: hover) {
11935
- .lumx-tabs__link--is-active:hover::after, .lumx-tabs__link[aria-current=page]:hover::after {
11932
+ .lumx-tabs__link--is-active:hover::after {
11936
11933
  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);
11937
11934
  }}
11938
- .lumx-tabs__link--is-active:active::after, .lumx-tabs__link[aria-current=page]:active::after {
11935
+ .lumx-tabs__link--is-active:active::after {
11939
11936
  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);
11940
11937
  }
11941
- .lumx-tabs__link--is-active i, .lumx-tabs__link[aria-current=page] i {
11938
+ .lumx-tabs__link--is-active i {
11942
11939
  margin-right: 8px;
11943
11940
  }
11944
- .lumx-tabs__link--is-active span, .lumx-tabs__link[aria-current=page] span {
11941
+ .lumx-tabs__link--is-active span {
11945
11942
  font-family: var(--lumx-typography-custom-button-size-m-font-family);
11946
11943
  font-size: var(--lumx-typography-custom-button-size-m-font-size);
11947
11944
  font-weight: var(--lumx-typography-custom-button-size-m-font-weight);
11948
11945
  text-transform: var(--lumx-material-button-text-transform);
11949
11946
  }
11950
- .lumx-tabs--theme-light .lumx-tabs__link--is-active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page] {
11947
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active {
11951
11948
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-color);
11952
11949
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-background-color);
11953
11950
  }
11954
- .lumx-tabs--theme-light .lumx-tabs__link--is-active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]::after {
11951
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active::after {
11955
11952
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-light-border-color);
11956
11953
  }
11957
11954
  @media (hover: hover) {
11958
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover {
11955
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover {
11959
11956
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-color);
11960
11957
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-background-color);
11961
11958
  }}
11962
11959
  @media (hover: hover) {
11963
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:hover::after {
11960
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:hover::after {
11964
11961
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-light-border-color);
11965
11962
  }}
11966
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active {
11963
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active {
11967
11964
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-color);
11968
11965
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-background-color);
11969
11966
  }
11970
- .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-light .lumx-tabs__link[aria-current=page]:active::after {
11967
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active:active::after {
11971
11968
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-light-border-color);
11972
11969
  }
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] {
11970
+ .lumx-tabs--theme-light .lumx-tabs__link--is-active[data-focus-visible-added] {
11974
11971
  outline: 2px solid var(--lumx-color-dark-N);
11975
11972
  outline-offset: 2px;
11976
11973
  }
11977
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page] {
11974
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active {
11978
11975
  color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-color);
11979
11976
  background-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-background-color);
11980
11977
  }
11981
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]::after {
11978
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active::after {
11982
11979
  border-color: var(--lumx-tabs-link-emphasis-selected-state-default-theme-dark-border-color);
11983
11980
  }
11984
11981
  @media (hover: hover) {
11985
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover {
11982
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover {
11986
11983
  color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-color);
11987
11984
  background-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-background-color);
11988
11985
  }}
11989
11986
  @media (hover: hover) {
11990
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:hover::after {
11987
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:hover::after {
11991
11988
  border-color: var(--lumx-tabs-link-emphasis-selected-state-hover-theme-dark-border-color);
11992
11989
  }}
11993
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active {
11990
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active {
11994
11991
  color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-color);
11995
11992
  background-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-background-color);
11996
11993
  }
11997
- .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after, .lumx-tabs--theme-dark .lumx-tabs__link[aria-current=page]:active::after {
11994
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active:active::after {
11998
11995
  border-color: var(--lumx-tabs-link-emphasis-selected-state-active-theme-dark-border-color);
11999
11996
  }
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] {
11997
+ .lumx-tabs--theme-dark .lumx-tabs__link--is-active[data-focus-visible-added] {
12001
11998
  outline: 2px solid var(--lumx-color-light-N);
12002
11999
  outline-offset: 2px;
12003
12000
  }
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.3",
10
+ "@lumx/icons": "^4.19.1-alpha.5",
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.3",
69
+ "version": "4.19.1-alpha.5",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -16,9 +16,7 @@
16
16
  }
17
17
 
18
18
  &__link {
19
- text-decoration: none;
20
-
21
- &:not(&--is-active):not([aria-current="page"]):not(&--is-disabled) {
19
+ &:not(&--is-active):not(&--is-disabled) {
22
20
  @include lumx-tabs-link(lumx-base-const("emphasis", "LOW"));
23
21
 
24
22
  #{$self}--theme-light & {
@@ -30,8 +28,7 @@
30
28
  }
31
29
  }
32
30
 
33
- &--is-active,
34
- &[aria-current="page"] {
31
+ &--is-active {
35
32
  @include lumx-tabs-link(lumx-base-const("emphasis", "SELECTED"));
36
33
 
37
34
  #{$self}--theme-light & {