@lumx/core 4.9.0-alpha.1 → 4.9.0-alpha.3
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.
- package/components-and-utils.css +1 -1
- package/js/components/Combobox/ComboboxInput.d.ts +2 -2
- package/js/components/Combobox/ComboboxOption.d.ts +3 -1
- package/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +2 -0
- package/js/components/Combobox/ComboboxOptionSkeleton.d.ts +6 -0
- package/js/components/Combobox/ComboboxSection.d.ts +2 -2
- package/js/components/Combobox/ComboboxState.d.ts +6 -0
- package/js/components/Combobox/index.d.ts +2 -0
- package/js/components/Combobox/setupCombobox.d.ts +1 -1
- package/js/components/Combobox/setupComboboxInput.d.ts +4 -5
- package/js/components/Combobox/subscribeComboboxState.d.ts +23 -0
- package/js/components/Combobox/types.d.ts +2 -2
- package/js/components/ExpansionPanel/Tests.d.ts +12 -0
- package/js/components/ExpansionPanel/index.d.ts +70 -0
- package/js/components/Mosaic/Tests.d.ts +13 -0
- package/js/components/Tabs/TabList.d.ts +39 -0
- package/js/components/Tabs/TabListTests.d.ts +12 -0
- package/js/components/Tabs/TabPanelTests.d.ts +11 -0
- package/js/components/Tabs/TabProviderTestUtils.d.ts +17 -0
- package/js/components/Tabs/state.d.ts +34 -0
- package/lumx.css +1 -1
- package/package.json +2 -2
- package/scss/components/list/_mixins.scss +6 -4
package/components-and-utils.css
CHANGED
|
@@ -8233,7 +8233,7 @@ table {
|
|
|
8233
8233
|
|
|
8234
8234
|
/* Section
|
|
8235
8235
|
========================================================================== */
|
|
8236
|
-
.lumx-list-section:not(
|
|
8236
|
+
.lumx-list-section:not([hidden]) ~ .lumx-list-section:not(.lumx-list-section:not([hidden]) + .lumx-list-section):not(.lumx-list-divider + .lumx-list-section)::before {
|
|
8237
8237
|
content: "";
|
|
8238
8238
|
display: block;
|
|
8239
8239
|
height: 1px;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { CommonRef, HasClassName, LumxClassName } from '../../types';
|
|
1
|
+
import type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Defines the props for the core ComboboxInput template.
|
|
4
4
|
*/
|
|
5
|
-
export interface ComboboxInputProps extends HasClassName {
|
|
5
|
+
export interface ComboboxInputProps extends HasClassName, HasTheme {
|
|
6
6
|
/** The ID of the listbox element (for aria-controls). */
|
|
7
7
|
listboxId?: string;
|
|
8
8
|
/** Whether the combobox is open. */
|
|
@@ -41,6 +41,8 @@ export interface ComboboxOptionProps extends HasClassName {
|
|
|
41
41
|
hidden?: boolean;
|
|
42
42
|
/** On click callback. */
|
|
43
43
|
handleClick?(): void;
|
|
44
|
+
/** Extra props forwarded to the inner action element (e.g. link props when as="a"). */
|
|
45
|
+
actionProps?: Record<string, any>;
|
|
44
46
|
/** ref to the root <li> element. */
|
|
45
47
|
ref?: CommonRef;
|
|
46
48
|
/** The value for this option (used for selection). */
|
|
@@ -50,7 +52,7 @@ export interface ComboboxOptionProps extends HasClassName {
|
|
|
50
52
|
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
51
53
|
* Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.
|
|
52
54
|
*/
|
|
53
|
-
export type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps';
|
|
55
|
+
export type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';
|
|
54
56
|
/**
|
|
55
57
|
* Component display name.
|
|
56
58
|
*/
|
|
@@ -15,6 +15,8 @@ export interface ComboboxOptionMoreInfoProps extends HasClassName {
|
|
|
15
15
|
onMouseEnter?(): void;
|
|
16
16
|
/** Mouse leave callback. */
|
|
17
17
|
onMouseLeave?(): void;
|
|
18
|
+
/** Props forwarded to the IconButton. */
|
|
19
|
+
buttonProps?: Record<string, any>;
|
|
18
20
|
}
|
|
19
21
|
/**
|
|
20
22
|
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
@@ -13,6 +13,12 @@ export interface ComboboxOptionSkeletonProps extends HasClassName {
|
|
|
13
13
|
children?: JSXElement;
|
|
14
14
|
/** ref to the root <li> element. */
|
|
15
15
|
ref?: CommonRef;
|
|
16
|
+
/**
|
|
17
|
+
* Number of skeleton `<li>` elements to render.
|
|
18
|
+
* Each is an independent element with `:nth-child` width cycling applied by SCSS.
|
|
19
|
+
* @default 1
|
|
20
|
+
*/
|
|
21
|
+
count?: number;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
@@ -3,8 +3,8 @@ import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../t
|
|
|
3
3
|
* Defines the props for the core ComboboxSection template.
|
|
4
4
|
*/
|
|
5
5
|
export interface ComboboxSectionProps extends HasClassName {
|
|
6
|
-
/** Section label displayed as the group title. */
|
|
7
|
-
label?: string;
|
|
6
|
+
/** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
|
|
7
|
+
label?: string | JSXElement;
|
|
8
8
|
/** Section icon */
|
|
9
9
|
icon?: string;
|
|
10
10
|
/** Section content (should be ComboboxOption elements). */
|
|
@@ -53,6 +53,12 @@ export interface ComboboxStateProps {
|
|
|
53
53
|
* Used to suppress false "empty" state while data is loading.
|
|
54
54
|
*/
|
|
55
55
|
isLoading?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the combobox popover is open.
|
|
58
|
+
* Used to gate live region content so screen readers announce messages
|
|
59
|
+
* when the popover opens (content insertion triggers `aria-live` announcement).
|
|
60
|
+
*/
|
|
61
|
+
isOpen?: boolean;
|
|
56
62
|
};
|
|
57
63
|
}
|
|
58
64
|
/**
|
|
@@ -21,3 +21,5 @@ export { ComboboxSection } from './ComboboxSection';
|
|
|
21
21
|
export type { ComboboxSectionProps, ComboboxSectionPropsToOverride, ComboboxSectionComponents, } from './ComboboxSection';
|
|
22
22
|
export { ComboboxState } from './ComboboxState';
|
|
23
23
|
export type { ComboboxStateProps } from './ComboboxState';
|
|
24
|
+
export { subscribeComboboxState } from './subscribeComboboxState';
|
|
25
|
+
export type { ComboboxStateSetters } from './subscribeComboboxState';
|
|
@@ -13,7 +13,7 @@ interface ComboboxOptions {
|
|
|
13
13
|
*
|
|
14
14
|
* @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
|
|
15
15
|
*
|
|
16
|
-
* @param callbacks Callbacks
|
|
16
|
+
* @param callbacks Callbacks invoked on combobox events (e.g. option selection).
|
|
17
17
|
* @param options Options for configuring the shared combobox behavior.
|
|
18
18
|
* @param onTriggerAttach Optional callback invoked when the trigger is registered and the signal is ready.
|
|
19
19
|
* Used by mode-specific wrappers (setupComboboxInput/Button) to automatically
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComboboxCallbacks, ComboboxHandle } from './types';
|
|
2
2
|
/** Options for configuring the input-mode combobox controller. */
|
|
3
|
-
export interface SetupComboboxInputOptions {
|
|
3
|
+
export interface SetupComboboxInputOptions extends ComboboxCallbacks {
|
|
4
4
|
/**
|
|
5
5
|
* When true (default), the combobox automatically filters options as the user types.
|
|
6
6
|
* Each registered `Combobox.Option` receives filter state updates and hides itself
|
|
@@ -21,9 +21,8 @@ export interface SetupComboboxInputOptions {
|
|
|
21
21
|
* Handles: Home/End (text cursor), ArrowLeft/Right (clear active descendant),
|
|
22
22
|
* filtering (on input and on open), and focus behavior.
|
|
23
23
|
*
|
|
24
|
-
* @param input
|
|
25
|
-
* @param callbacks
|
|
26
|
-
* @param options Options for configuring the input-mode controller.
|
|
24
|
+
* @param input The input element to use as the combobox trigger.
|
|
25
|
+
* @param options Options and callbacks for configuring the input-mode controller.
|
|
27
26
|
* @returns A ComboboxHandle for interacting with the combobox.
|
|
28
27
|
*/
|
|
29
|
-
export declare function setupComboboxInput(input: HTMLInputElement,
|
|
28
|
+
export declare function setupComboboxInput(input: HTMLInputElement, options: SetupComboboxInputOptions): ComboboxHandle;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComboboxHandle } from './types';
|
|
2
|
+
/** Setters invoked by `subscribeComboboxState` when handle events fire. */
|
|
3
|
+
export interface ComboboxStateSetters {
|
|
4
|
+
/** Called immediately with the current loading state, then on every `loadingChange` event. */
|
|
5
|
+
setIsLoading: (value: boolean) => void;
|
|
6
|
+
/** Called on every `loadingAnnouncement` event (debounced 500ms after skeletons mount). */
|
|
7
|
+
setShouldAnnounce: (value: boolean) => void;
|
|
8
|
+
/** Called with `true` after a short delay when the combobox opens, and `false` immediately on close. */
|
|
9
|
+
setIsOpen: (value: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Subscribe to the combobox handle events needed by `ComboboxState`.
|
|
13
|
+
*
|
|
14
|
+
* Manages three subscriptions:
|
|
15
|
+
* - `loadingChange` → `setIsLoading` (+ synchronous initial read of `handle.isLoading`)
|
|
16
|
+
* - `loadingAnnouncement` → `setShouldAnnounce`
|
|
17
|
+
* - `open` → `setIsOpen` (deferred by {@link OPEN_ANNOUNCEMENT_DELAY}ms on open, immediate on close)
|
|
18
|
+
*
|
|
19
|
+
* @param handle The combobox handle to subscribe to.
|
|
20
|
+
* @param setters Framework-specific state setters.
|
|
21
|
+
* @returns A cleanup function that unsubscribes all events and clears timers.
|
|
22
|
+
*/
|
|
23
|
+
export declare function subscribeComboboxState(handle: ComboboxHandle, setters: ComboboxStateSetters): () => void;
|
|
@@ -41,10 +41,10 @@ export interface ComboboxEventMap {
|
|
|
41
41
|
}
|
|
42
42
|
/** Callbacks provided by the consumer (React/Vue) to react to combobox state changes. */
|
|
43
43
|
export interface ComboboxCallbacks {
|
|
44
|
-
/** Called when an option is selected (click or keyboard). */
|
|
44
|
+
/** Called when an option is selected (click or keyboard). Receives the combobox handle for post-selection side effects. */
|
|
45
45
|
onSelect(option: {
|
|
46
46
|
value: string;
|
|
47
|
-
}): void;
|
|
47
|
+
}, handle: ComboboxHandle): void;
|
|
48
48
|
}
|
|
49
49
|
/** Handle returned by `setupCombobox`. Used by framework wrappers and mode controllers. */
|
|
50
50
|
export interface ComboboxHandle {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SetupOptions } from '../../../testing';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
|
|
6
|
+
element: HTMLElement;
|
|
7
|
+
header: HTMLElement | null;
|
|
8
|
+
props: any;
|
|
9
|
+
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: (renderOptions: SetupOptions<any>) => void;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { HasClassName, LumxClassName, HasCloseMode, HasTheme, CommonRef, GenericProps, JSXElement } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the props of the component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ExpansionPanelProps extends HasClassName, HasCloseMode, HasTheme {
|
|
6
|
+
/** Whether the expansion panel has a background. */
|
|
7
|
+
hasBackground?: boolean;
|
|
8
|
+
/** Whether the header has a divider. */
|
|
9
|
+
hasHeaderDivider?: boolean;
|
|
10
|
+
/** Whether the component is open or not. */
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/** Label text (overwritten if a `<header>` is provided in the children). */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** On open callback. */
|
|
15
|
+
handleOpen?: (event: any) => void;
|
|
16
|
+
/** On close callback. */
|
|
17
|
+
handleClose?: (event: any) => void;
|
|
18
|
+
/** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
|
|
19
|
+
toggleButtonProps: any;
|
|
20
|
+
/** On toggle open or close callback. */
|
|
21
|
+
handleToggleOpen?(shouldOpen: boolean, event: any): void;
|
|
22
|
+
/** Children */
|
|
23
|
+
children?: JSXElement;
|
|
24
|
+
/** Ref forwarded to the root `<section>` element. */
|
|
25
|
+
ref?: CommonRef;
|
|
26
|
+
/** Ref forwarded to the collapsible wrapper `<div>`. */
|
|
27
|
+
wrapperRef?: CommonRef;
|
|
28
|
+
/** Props spread onto the header content `<div>` (e.g. `aria-*`, `data-*`). */
|
|
29
|
+
headerProps: GenericProps;
|
|
30
|
+
/** Content rendered inside the header content area. */
|
|
31
|
+
headerContent?: JSXElement;
|
|
32
|
+
/** Optional drag handle element rendered at the start of the header. */
|
|
33
|
+
dragHandle?: JSXElement;
|
|
34
|
+
/** Content rendered inside the collapsible content area. */
|
|
35
|
+
content?: JSXElement;
|
|
36
|
+
/** Optional footer element rendered below the content. */
|
|
37
|
+
footer?: JSXElement;
|
|
38
|
+
/** IconButton component injected by the framework wrapper (React or Vue). */
|
|
39
|
+
IconButton: any;
|
|
40
|
+
/** Whether the children should remain mounted (visible in the DOM) while the panel is closed. */
|
|
41
|
+
isChildrenVisible?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export type ExpansionPanelPropsToOverride = 'handleOpen' | 'handleClose' | 'toggleButtonProps' | 'handleToggleOpen' | 'wrapperRef' | 'headerProps' | 'headerContent' | 'dragHandle' | 'content' | 'IconButton' | 'isChildrenVisible' | 'footer';
|
|
44
|
+
/**
|
|
45
|
+
* Component display name.
|
|
46
|
+
*/
|
|
47
|
+
export declare const COMPONENT_NAME = "ExpansionPanel";
|
|
48
|
+
/**
|
|
49
|
+
* Component default class name and class prefix.
|
|
50
|
+
*/
|
|
51
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
52
|
+
export declare const block: {
|
|
53
|
+
(additionalClasses: import("classnames/types").ClassValue[]): string;
|
|
54
|
+
(modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
|
|
55
|
+
}, element: {
|
|
56
|
+
(elem: string, additionalClasses: import("classnames/types").ClassValue[]): string;
|
|
57
|
+
(elem: string, modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Component default props.
|
|
61
|
+
*/
|
|
62
|
+
export declare const DEFAULT_PROPS: Partial<ExpansionPanelProps>;
|
|
63
|
+
/**
|
|
64
|
+
* ExpansionPanel component.
|
|
65
|
+
*
|
|
66
|
+
* @param props Component props.
|
|
67
|
+
* @param ref Component ref.
|
|
68
|
+
* @return React element.
|
|
69
|
+
*/
|
|
70
|
+
export declare const ExpansionPanel: (props: ExpansionPanelProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SetupOptions } from '../../../testing';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
|
|
6
|
+
props: any;
|
|
7
|
+
mosaic: HTMLElement;
|
|
8
|
+
thumbnails: HTMLElement[];
|
|
9
|
+
overlay: HTMLElement | null;
|
|
10
|
+
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: (renderOptions: SetupOptions<any>) => void;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Alignment } from '../../constants';
|
|
2
|
+
import { CommonRef, HasClassName, HasTheme, JSXElement } from '../../types';
|
|
3
|
+
export declare enum TabListLayout {
|
|
4
|
+
clustered = "clustered",
|
|
5
|
+
fixed = "fixed"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines the props of the component.
|
|
9
|
+
*/
|
|
10
|
+
export interface TabListProps extends HasClassName, HasTheme {
|
|
11
|
+
/** ARIA label (purpose of the set of tabs). */
|
|
12
|
+
['aria-label']: string;
|
|
13
|
+
/** Tab list. */
|
|
14
|
+
children: JSXElement;
|
|
15
|
+
/** Layout of the tabs in the list. */
|
|
16
|
+
layout?: TabListLayout;
|
|
17
|
+
/** Position of the tabs in the list (requires 'clustered' layout). */
|
|
18
|
+
position?: Alignment;
|
|
19
|
+
/** ref to the wrapper element */
|
|
20
|
+
ref?: CommonRef;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Component display name.
|
|
24
|
+
*/
|
|
25
|
+
export declare const COMPONENT_NAME = "TabList";
|
|
26
|
+
/**
|
|
27
|
+
* Component default props.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DEFAULT_PROPS: Partial<TabListProps>;
|
|
30
|
+
/**
|
|
31
|
+
* TabList component.
|
|
32
|
+
*
|
|
33
|
+
* Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
34
|
+
*
|
|
35
|
+
* @param props Component props.
|
|
36
|
+
* @param ref Component ref.
|
|
37
|
+
* @return React element.
|
|
38
|
+
*/
|
|
39
|
+
export declare const TabList: (props: TabListProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SetupOptions } from '../../../testing';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
|
|
6
|
+
props: any;
|
|
7
|
+
tabList: HTMLElement;
|
|
8
|
+
links: HTMLElement | null;
|
|
9
|
+
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: (renderOptions: SetupOptions<any>) => void;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SetupOptions } from '../../../testing';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
|
|
6
|
+
props: any;
|
|
7
|
+
tabPanel: HTMLElement;
|
|
8
|
+
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: (renderOptions: SetupOptions<any>) => void;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test util module. Do not import in production code!
|
|
3
|
+
*/
|
|
4
|
+
export declare const createTabTestUtils: ({ screen, within }: {
|
|
5
|
+
screen: any;
|
|
6
|
+
within: any;
|
|
7
|
+
}) => {
|
|
8
|
+
query: {
|
|
9
|
+
tabList: (name: string) => any;
|
|
10
|
+
tabs: (tabList?: any) => any;
|
|
11
|
+
tab: (name: string, tabList?: any) => any;
|
|
12
|
+
tabPanel: (name: string) => any;
|
|
13
|
+
};
|
|
14
|
+
checkTabActive: (activeTabName: string, { isLazy }?: {
|
|
15
|
+
isLazy?: boolean | undefined;
|
|
16
|
+
}) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type TabType = 'tab' | 'tabPanel';
|
|
2
|
+
export interface State {
|
|
3
|
+
isLazy: boolean;
|
|
4
|
+
shouldActivateOnFocus: boolean;
|
|
5
|
+
activeTabIndex: number;
|
|
6
|
+
ids: Record<TabType, string[]>;
|
|
7
|
+
}
|
|
8
|
+
export declare const INIT_STATE: State;
|
|
9
|
+
export type Action = {
|
|
10
|
+
type: 'update';
|
|
11
|
+
payload: Partial<State>;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'setActiveTabIndex';
|
|
14
|
+
payload: number;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'register';
|
|
17
|
+
payload: {
|
|
18
|
+
type: TabType;
|
|
19
|
+
id: string;
|
|
20
|
+
};
|
|
21
|
+
} | {
|
|
22
|
+
type: 'unregister';
|
|
23
|
+
payload: {
|
|
24
|
+
type: TabType;
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const reducer: (state: State, action: Action) => State;
|
|
29
|
+
export type TabState = Pick<Required<State>, 'isLazy' | 'shouldActivateOnFocus'> & {
|
|
30
|
+
isActive: boolean;
|
|
31
|
+
tabId: string;
|
|
32
|
+
tabPanelId: string;
|
|
33
|
+
changeToTab(): void;
|
|
34
|
+
};
|
package/lumx.css
CHANGED
|
@@ -8914,7 +8914,7 @@ table {
|
|
|
8914
8914
|
|
|
8915
8915
|
/* Section
|
|
8916
8916
|
========================================================================== */
|
|
8917
|
-
.lumx-list-section:not(
|
|
8917
|
+
.lumx-list-section:not([hidden]) ~ .lumx-list-section:not(.lumx-list-section:not([hidden]) + .lumx-list-section):not(.lumx-list-divider + .lumx-list-section)::before {
|
|
8918
8918
|
content: "";
|
|
8919
8919
|
display: block;
|
|
8920
8920
|
height: 1px;
|
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.9.0-alpha.
|
|
10
|
+
"@lumx/icons": "^4.9.0-alpha.3",
|
|
11
11
|
"classnames": "^2.3.2",
|
|
12
12
|
"focus-visible": "^5.0.2",
|
|
13
13
|
"lodash": "4.17.23",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": false,
|
|
72
|
-
"version": "4.9.0-alpha.
|
|
72
|
+
"version": "4.9.0-alpha.3",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
75
75
|
"@testing-library/dom": "^10.4.1",
|
|
@@ -144,10 +144,12 @@
|
|
|
144
144
|
$divider: '.#{$lumx-base-prefix}-list-divider';
|
|
145
145
|
$section: &;
|
|
146
146
|
|
|
147
|
-
// Insert a divider before each section
|
|
148
|
-
//
|
|
149
|
-
//
|
|
150
|
-
|
|
147
|
+
// Insert a divider before each section that:
|
|
148
|
+
// 1. Is not directly following another visible section (avoids double dividers)
|
|
149
|
+
// 2. Is not directly following an explicit divider
|
|
150
|
+
// 3. Has at least one preceding visible section (uses `~` general sibling combinator
|
|
151
|
+
// so hidden-first-sections don't get a spurious top divider)
|
|
152
|
+
#{$section}:not([hidden]) ~ &:not(#{$section}:not([hidden]) + &):not(#{$divider} + &) {
|
|
151
153
|
&::before {
|
|
152
154
|
content: '';
|
|
153
155
|
display: block;
|