@design-system-rte/core 1.5.0 → 1.6.1
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/assets/icons/arrow_compare.svg +3 -0
- package/assets/icons/company.svg +3 -0
- package/assets/icons/contact_filled.svg +3 -0
- package/assets/icons/contact_outlined.svg +3 -0
- package/assets/icons/export_xls_filled.svg +3 -0
- package/assets/icons/export_xls_outlined.svg +6 -0
- package/assets/icons/handshake_filled.svg +3 -0
- package/assets/icons/handshake_outlined.svg +3 -0
- package/assets/icons/swap_horiz.svg +3 -0
- package/assets/icons/swap_vert.svg +3 -0
- package/common/animation.d.ts +1 -1
- package/common/animation.d.ts.map +1 -1
- package/common/animation.js +12 -2
- package/common/index.d.ts +1 -0
- package/common/index.d.ts.map +1 -1
- package/common/svg.d.ts +10 -0
- package/components/accordion/accordion.constants.d.ts +5 -0
- package/components/accordion/accordion.constants.d.ts.map +1 -0
- package/components/accordion/accordion.constants.js +4 -0
- package/components/accordion/accordion.interface.d.ts +15 -0
- package/components/accordion/index.d.ts +3 -0
- package/components/accordion/index.d.ts.map +1 -0
- package/components/accordion/index.js +1 -0
- package/components/avatar/avatar.constants.d.ts +4 -0
- package/components/avatar/avatar.constants.d.ts.map +1 -0
- package/components/avatar/avatar.constants.js +13 -0
- package/components/avatar/avatar.interface.d.ts +23 -0
- package/components/avatar/avatar.size.constants.d.ts +5 -0
- package/components/avatar/avatar.size.constants.d.ts.map +1 -0
- package/components/avatar/avatar.size.constants.js +39 -0
- package/components/avatar/avatar.utils.d.ts +6 -0
- package/components/avatar/avatar.utils.d.ts.map +1 -0
- package/components/avatar/avatar.utils.js +34 -0
- package/components/avatar/index.d.ts +4 -0
- package/components/avatar/index.d.ts.map +1 -0
- package/components/avatar/index.js +2 -0
- package/components/avatar/type.d.ts +4 -0
- package/components/button/button.interface.d.ts +3 -0
- package/components/card/card.constants.d.ts +2 -0
- package/components/card/card.constants.d.ts.map +1 -0
- package/components/card/card.constants.js +1 -0
- package/components/card/card.interface.d.ts +1 -3
- package/components/card/card.stories.shared.d.ts +5 -8
- package/components/card/card.stories.shared.d.ts.map +1 -1
- package/components/card/card.stories.shared.js +11 -11
- package/components/card/index.d.ts +1 -1
- package/components/card/index.d.ts.map +1 -1
- package/components/card/index.js +1 -1
- package/components/common/common-types.d.ts +1 -0
- package/components/common/common-types.d.ts.map +1 -1
- package/components/drawer/drawer.constants.d.ts +3 -0
- package/components/drawer/drawer.constants.d.ts.map +1 -0
- package/components/drawer/drawer.constants.js +2 -0
- package/components/drawer/drawer.interface.d.ts +19 -0
- package/components/drawer/drawer.utils.d.ts +14 -0
- package/components/drawer/drawer.utils.d.ts.map +1 -0
- package/components/drawer/drawer.utils.js +36 -0
- package/components/drawer/index.d.ts +4 -0
- package/components/drawer/index.d.ts.map +1 -0
- package/components/drawer/index.js +2 -0
- package/components/toast/toast.utils.d.ts +1 -1
- package/components/treeview/index.d.ts +4 -0
- package/components/treeview/index.d.ts.map +1 -0
- package/components/treeview/index.js +2 -0
- package/components/treeview/treeview-item.interface.d.ts +41 -0
- package/components/treeview/treeview.constants.d.ts +11 -0
- package/components/treeview/treeview.constants.d.ts.map +1 -0
- package/components/treeview/treeview.constants.js +72 -0
- package/components/treeview/treeview.utils.d.ts +52 -0
- package/components/treeview/treeview.utils.d.ts.map +1 -0
- package/components/treeview/treeview.utils.js +285 -0
- package/constants/keyboard/keyboard.constants.d.ts +1 -0
- package/constants/keyboard/keyboard.constants.d.ts.map +1 -1
- package/constants/keyboard/keyboard.constants.js +1 -0
- package/design-tokens/abstract/mixins/_typography.scss +18 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/package.json +5 -1
- package/components/card/card.constats.d.ts +0 -3
- package/components/card/card.constats.d.ts.map +0 -1
- package/components/card/card.constats.js +0 -7
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
const CONFIGURATION_ISSUES = {
|
|
2
|
+
MISSING_HEADER_OR_TITLE: "Drawer: You must provide either a title or a custom header.",
|
|
3
|
+
MISSING_FOOTER_OR_PRIMARY: "Drawer: You must provide either a primaryButtonLabel or a custom footer.",
|
|
4
|
+
RESPONSIVE_NEEDS_MAIN_CONTENT: "Drawer: You should provide your content as children when using responsive position to avoid empty space next to the drawer.",
|
|
5
|
+
MODAL_MUST_NOT_HAVE_MAIN_CONTENT: "Drawer: You should not provide children when using modal position.",
|
|
6
|
+
};
|
|
7
|
+
const VALIDATION_RULES = [
|
|
8
|
+
{
|
|
9
|
+
condition: (input) => !input.hasCustomHeader && !input.hasTitle,
|
|
10
|
+
issue: CONFIGURATION_ISSUES.MISSING_HEADER_OR_TITLE,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
condition: (input) => !input.hasCustomFooter && !input.hasPrimaryButtonLabel,
|
|
14
|
+
issue: CONFIGURATION_ISSUES.MISSING_FOOTER_OR_PRIMARY,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
condition: (input) => input.position === "responsive" && !input.hasMainContent,
|
|
18
|
+
issue: CONFIGURATION_ISSUES.RESPONSIVE_NEEDS_MAIN_CONTENT,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
condition: (input) => input.position === "modal" && input.hasMainContent,
|
|
22
|
+
issue: CONFIGURATION_ISSUES.MODAL_MUST_NOT_HAVE_MAIN_CONTENT,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
export function getDrawerConfigurationIssues(input) {
|
|
26
|
+
return VALIDATION_RULES.find(({ condition }) => condition(input))?.issue;
|
|
27
|
+
}
|
|
28
|
+
export function shouldUseDrawerDefaultHeader(header, title) {
|
|
29
|
+
return !header && !!title;
|
|
30
|
+
}
|
|
31
|
+
export function shouldUseDrawerDefaultFooter(footer, primaryButtonLabel) {
|
|
32
|
+
return !footer && !!primaryButtonLabel;
|
|
33
|
+
}
|
|
34
|
+
export const computeTransform = (isAnimating, drawerLeftPosition, padding = 0) => {
|
|
35
|
+
return isAnimating ? `translateX(-${drawerLeftPosition + padding}px)` : "none";
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/drawer/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,oBAAoB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const getToastPriority: (toast: {
|
|
2
2
|
hasActionButton: boolean;
|
|
3
3
|
type: "info" | "success" | "warning" | "error" | "neutral";
|
|
4
|
-
}) => 3 | 2 | 1 |
|
|
4
|
+
}) => 3 | 2 | 1 | 4 | 9 | 5 | 6 | 7 | 8 | 10;
|
|
5
5
|
//# sourceMappingURL=toast.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/treeview/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,2BAA2B,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export type TreeviewBorderType = "vertical" | "branch" | "corner" | "horizontal" | "spacer";
|
|
2
|
+
|
|
3
|
+
export type TreeviewNodePath = number[];
|
|
4
|
+
|
|
5
|
+
export interface TreeviewItemProps {
|
|
6
|
+
id?: string;
|
|
7
|
+
labelText: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
isCompact?: boolean;
|
|
11
|
+
hasCheckbox?: boolean;
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
hasIcon?: boolean;
|
|
14
|
+
hasBadge?: boolean;
|
|
15
|
+
items?: TreeviewItemProps[];
|
|
16
|
+
borderTypes?: TreeviewBorderType[];
|
|
17
|
+
actionIcon?: string;
|
|
18
|
+
actionMenuItems?: TreeviewActionMenuItem[];
|
|
19
|
+
depth?: number;
|
|
20
|
+
treeId?: string;
|
|
21
|
+
onActionIconClick?: (itemId: string) => void;
|
|
22
|
+
}
|
|
23
|
+
export interface TreeviewActionMenuItem {
|
|
24
|
+
id?: string;
|
|
25
|
+
label: string;
|
|
26
|
+
leftIcon?: string;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
hasSeparator?: boolean;
|
|
29
|
+
children?: TreeviewActionMenuItem[];
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface TreeviewOpenChangeEvent {
|
|
34
|
+
id: string;
|
|
35
|
+
open: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface TreeviewSelectionChangeEvent {
|
|
39
|
+
id?: string;
|
|
40
|
+
selected: boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SvgConfig } from "../../common/svg";
|
|
2
|
+
import type { TreeviewBorderType } from "./treeview-item.interface";
|
|
3
|
+
export declare const TREEVIEW_FOCUSABLE_ATTRIBUTE = "data-treeview-focusable";
|
|
4
|
+
export declare const TREEVIEW_FOCUSABLE_ORDER: readonly ["checkbox", "chevron", "content", "action"];
|
|
5
|
+
export declare const TREEVIEW_EXPAND_COLLAPSE_DURATION_MS = 140;
|
|
6
|
+
export declare const TREEVIEW_BORDER_WIDTH_PX = 16;
|
|
7
|
+
export declare const TREEVIEW_ROW_HEIGHT_PX = 32;
|
|
8
|
+
export declare const TREEVIEW_ROW_HEIGHT_COMPACT_PX = 24;
|
|
9
|
+
export declare const TREEVIEW_BORDER_SVG_MAP: Record<TreeviewBorderType, SvgConfig>;
|
|
10
|
+
export declare const TREEVIEW_BORDER_SVG_MAP_COMPACT: Record<TreeviewBorderType, SvgConfig>;
|
|
11
|
+
//# sourceMappingURL=treeview.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeview.constants.d.ts","sourceRoot":"","sources":["../../../components/treeview/treeview.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AAEtE,eAAO,MAAM,wBAAwB,uDAAwD,CAAC;AAE9F,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAExD,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAQjD,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,kBAAkB,EAAE,SAAS,CA2BzE,CAAC;AAQF,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,kBAAkB,EAAE,SAAS,CA2BjF,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const TREEVIEW_FOCUSABLE_ATTRIBUTE = "data-treeview-focusable";
|
|
2
|
+
export const TREEVIEW_FOCUSABLE_ORDER = ["checkbox", "chevron", "content", "action"];
|
|
3
|
+
export const TREEVIEW_EXPAND_COLLAPSE_DURATION_MS = 140;
|
|
4
|
+
export const TREEVIEW_BORDER_WIDTH_PX = 16;
|
|
5
|
+
export const TREEVIEW_ROW_HEIGHT_PX = 32;
|
|
6
|
+
export const TREEVIEW_ROW_HEIGHT_COMPACT_PX = 24;
|
|
7
|
+
const baseBorderSvgConfig = {
|
|
8
|
+
viewBox: "0 0 16 32",
|
|
9
|
+
width: TREEVIEW_BORDER_WIDTH_PX,
|
|
10
|
+
height: TREEVIEW_ROW_HEIGHT_PX,
|
|
11
|
+
};
|
|
12
|
+
export const TREEVIEW_BORDER_SVG_MAP = {
|
|
13
|
+
vertical: {
|
|
14
|
+
...baseBorderSvgConfig,
|
|
15
|
+
elements: [{ kind: "path", d: "M8 32L8 0" }],
|
|
16
|
+
},
|
|
17
|
+
branch: {
|
|
18
|
+
...baseBorderSvgConfig,
|
|
19
|
+
elements: [
|
|
20
|
+
{ kind: "path", d: "M8 32L8 0" },
|
|
21
|
+
{ kind: "line", x1: 8, y1: 15.5, x2: 16, y2: 15.5 },
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
corner: {
|
|
25
|
+
...baseBorderSvgConfig,
|
|
26
|
+
elements: [
|
|
27
|
+
{ kind: "path", d: "M8 16L8 0" },
|
|
28
|
+
{ kind: "line", x1: 8, y1: 15.5, x2: 16, y2: 15.5 },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
horizontal: {
|
|
32
|
+
...baseBorderSvgConfig,
|
|
33
|
+
elements: [{ kind: "line", x1: 0, y1: 15.5, x2: 16, y2: 15.5 }],
|
|
34
|
+
},
|
|
35
|
+
spacer: {
|
|
36
|
+
...baseBorderSvgConfig,
|
|
37
|
+
elements: [],
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const baseBorderSvgConfigCompact = {
|
|
41
|
+
viewBox: "0 0 16 24",
|
|
42
|
+
width: TREEVIEW_BORDER_WIDTH_PX,
|
|
43
|
+
height: TREEVIEW_ROW_HEIGHT_COMPACT_PX,
|
|
44
|
+
};
|
|
45
|
+
export const TREEVIEW_BORDER_SVG_MAP_COMPACT = {
|
|
46
|
+
vertical: {
|
|
47
|
+
...baseBorderSvgConfigCompact,
|
|
48
|
+
elements: [{ kind: "path", d: "M8 24L8 0" }],
|
|
49
|
+
},
|
|
50
|
+
branch: {
|
|
51
|
+
...baseBorderSvgConfigCompact,
|
|
52
|
+
elements: [
|
|
53
|
+
{ kind: "path", d: "M8 24L8 0" },
|
|
54
|
+
{ kind: "line", x1: 8, y1: 11.5, x2: 16, y2: 11.5 },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
corner: {
|
|
58
|
+
...baseBorderSvgConfigCompact,
|
|
59
|
+
elements: [
|
|
60
|
+
{ kind: "path", d: "M8 12L8 0" },
|
|
61
|
+
{ kind: "line", x1: 8, y1: 11.5, x2: 16, y2: 11.5 },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
horizontal: {
|
|
65
|
+
...baseBorderSvgConfigCompact,
|
|
66
|
+
elements: [{ kind: "line", x1: 0, y1: 11.5, x2: 16, y2: 11.5 }],
|
|
67
|
+
},
|
|
68
|
+
spacer: {
|
|
69
|
+
...baseBorderSvgConfigCompact,
|
|
70
|
+
elements: [],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { TreeviewBorderType, TreeviewItemProps, TreeviewNodePath } from "./treeview-item.interface";
|
|
2
|
+
export interface TreeviewVisibleRow {
|
|
3
|
+
rowElement: HTMLElement;
|
|
4
|
+
focusables: HTMLElement[];
|
|
5
|
+
}
|
|
6
|
+
export interface TreeviewFocusPosition {
|
|
7
|
+
rowIndex: number;
|
|
8
|
+
focusableIndex: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function getVisibleFocusableRows(treeElement: HTMLElement): TreeviewVisibleRow[];
|
|
11
|
+
export declare function isTreeitemVisible(treeitem: HTMLElement): boolean;
|
|
12
|
+
export declare function getFocusablesForRow(treeitem: HTMLElement): HTMLElement[];
|
|
13
|
+
export declare function isTreeviewFocusable(element: HTMLElement): boolean;
|
|
14
|
+
export declare function isTreeitemDisabled(element: HTMLElement): boolean;
|
|
15
|
+
export declare function findFocusedPosition(rows: TreeviewVisibleRow[], target: HTMLElement): TreeviewFocusPosition;
|
|
16
|
+
export declare function getContentOrFirstFocusable(row: TreeviewVisibleRow): HTMLElement | null;
|
|
17
|
+
export declare function getNextFocusTarget(rows: TreeviewVisibleRow[], current: TreeviewFocusPosition, direction: -1 | 1, isVertical: boolean): TreeviewFocusPosition | null;
|
|
18
|
+
export declare function getFocusableElementsFromTreeview(treeElement: HTMLElement): HTMLElement[];
|
|
19
|
+
export declare function setMovingTabindex(treeElement: HTMLElement, focusedElement: HTMLElement): void;
|
|
20
|
+
export declare function resetMovingTabIndex(treeElement: HTMLElement): void;
|
|
21
|
+
export declare function hasChildren(items: TreeviewItemProps[] | undefined): boolean;
|
|
22
|
+
export declare function hasNestedItemsInTree(items: TreeviewItemProps[] | undefined): boolean;
|
|
23
|
+
export interface ComputeBorderTypesConfig {
|
|
24
|
+
depth?: number;
|
|
25
|
+
isCompact?: boolean;
|
|
26
|
+
resolvedBorderTypes?: TreeviewBorderType[];
|
|
27
|
+
hasChildren?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare function computeConnectorBorderTypes(config: ComputeBorderTypesConfig): TreeviewBorderType[];
|
|
30
|
+
export declare function getChildBorderTypes(resolvedBorderTypes: TreeviewBorderType[], isLastChild: boolean): TreeviewBorderType[];
|
|
31
|
+
export declare function isItemSelected(itemId: string | undefined, selectedId: string | undefined): boolean;
|
|
32
|
+
export declare function canToggleOpen(hasChildren: boolean, disabled: boolean): boolean;
|
|
33
|
+
export declare function getTreeviewItemKey(item: TreeviewItemProps): string;
|
|
34
|
+
export declare function getItemId(item: TreeviewItemProps): string;
|
|
35
|
+
export declare function getDescendantIds(item: TreeviewItemProps): string[];
|
|
36
|
+
export declare function removeOrphanedParentIds(checkedIds: ReadonlySet<string>, items: TreeviewItemProps[]): Set<string>;
|
|
37
|
+
export declare function computeCheckedIdsAfterToggle(currentChecked: ReadonlySet<string>, node: TreeviewItemProps, rootItems?: TreeviewItemProps[]): Set<string>;
|
|
38
|
+
export declare function isNodeIndeterminate(node: TreeviewItemProps, checkedIds: ReadonlySet<string>): boolean;
|
|
39
|
+
export declare function allDescendantsChecked(node: TreeviewItemProps, checkedIds: ReadonlySet<string>): boolean;
|
|
40
|
+
export declare function findNodeById(items: TreeviewItemProps[], itemId: string): TreeviewItemProps | undefined;
|
|
41
|
+
export declare function mergeChildItemWithParent(child: TreeviewItemProps, parent: Partial<Pick<TreeviewItemProps, "isCompact">>): TreeviewItemProps;
|
|
42
|
+
export declare function computeCheckboxId(baseId: string): string;
|
|
43
|
+
export declare function updateBorderTypeForAncestor(type: TreeviewBorderType): TreeviewBorderType;
|
|
44
|
+
export interface BuildTreeviewNodeIdParams {
|
|
45
|
+
treeId: string;
|
|
46
|
+
path: TreeviewNodePath;
|
|
47
|
+
itemId?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function buildTreeviewNodeId({ treeId, path, itemId }: BuildTreeviewNodeIdParams): string;
|
|
50
|
+
export declare function parsePathString(pathString: string): number[];
|
|
51
|
+
export declare function getNodeAtPath(items: TreeviewItemProps[], pathIndices: TreeviewNodePath): TreeviewItemProps | undefined;
|
|
52
|
+
//# sourceMappingURL=treeview.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeview.utils.d.ts","sourceRoot":"","sources":["../../../components/treeview/treeview.utils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { TREEVIEW_FOCUSABLE_ATTRIBUTE, TREEVIEW_FOCUSABLE_ORDER } from "./treeview.constants";
|
|
2
|
+
export function getVisibleFocusableRows(treeElement) {
|
|
3
|
+
const treeitems = Array.from(treeElement.querySelectorAll("li.treeview-item[role='treeitem']"));
|
|
4
|
+
return treeitems
|
|
5
|
+
.filter(isTreeitemVisible)
|
|
6
|
+
.map((treeitem) => ({ rowElement: treeitem, focusables: getFocusablesForRow(treeitem) }));
|
|
7
|
+
}
|
|
8
|
+
export function isTreeitemVisible(treeitem) {
|
|
9
|
+
let current = treeitem;
|
|
10
|
+
while (current) {
|
|
11
|
+
const parentElement = current.parentElement;
|
|
12
|
+
if (!parentElement) {
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
if (parentElement.classList.contains("treeview-item-children") &&
|
|
16
|
+
!parentElement.classList.contains("treeview-item-children-open")) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
current = parentElement;
|
|
20
|
+
}
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function getFocusablesForRow(treeitem) {
|
|
24
|
+
return TREEVIEW_FOCUSABLE_ORDER.map((type) => treeitem.querySelector(`[${TREEVIEW_FOCUSABLE_ATTRIBUTE}="${type}"]`)).filter((element) => element !== null);
|
|
25
|
+
}
|
|
26
|
+
export function isTreeviewFocusable(element) {
|
|
27
|
+
return element.hasAttribute(TREEVIEW_FOCUSABLE_ATTRIBUTE);
|
|
28
|
+
}
|
|
29
|
+
export function isTreeitemDisabled(element) {
|
|
30
|
+
const treeitem = element.closest("li.treeview-item");
|
|
31
|
+
return !!treeitem?.classList.contains("disabled");
|
|
32
|
+
}
|
|
33
|
+
export function findFocusedPosition(rows, target) {
|
|
34
|
+
const defaultPosition = { rowIndex: -1, focusableIndex: -1 };
|
|
35
|
+
const found = rows
|
|
36
|
+
.map((row, rowIndex) => ({
|
|
37
|
+
rowIndex,
|
|
38
|
+
focusableIndex: row.focusables.indexOf(target),
|
|
39
|
+
}))
|
|
40
|
+
.find((result) => result.focusableIndex !== -1);
|
|
41
|
+
return found ?? defaultPosition;
|
|
42
|
+
}
|
|
43
|
+
export function getContentOrFirstFocusable(row) {
|
|
44
|
+
const content = row.focusables.find((element) => element.getAttribute(TREEVIEW_FOCUSABLE_ATTRIBUTE) === "content");
|
|
45
|
+
if (content && !isTreeitemDisabled(content)) {
|
|
46
|
+
return content;
|
|
47
|
+
}
|
|
48
|
+
const firstEnabled = row.focusables.find((element) => !isTreeitemDisabled(element));
|
|
49
|
+
return firstEnabled ?? null;
|
|
50
|
+
}
|
|
51
|
+
export function getNextFocusTarget(rows, current, direction, isVertical) {
|
|
52
|
+
if (isVertical) {
|
|
53
|
+
let targetRowIndex = current.rowIndex + direction;
|
|
54
|
+
while (targetRowIndex >= 0 && targetRowIndex < rows.length) {
|
|
55
|
+
const targetRow = rows[targetRowIndex];
|
|
56
|
+
const isTargetDisabled = targetRow.rowElement.classList.contains("disabled");
|
|
57
|
+
if (!isTargetDisabled) {
|
|
58
|
+
const contentOrFirst = getContentOrFirstFocusable(targetRow);
|
|
59
|
+
return contentOrFirst
|
|
60
|
+
? {
|
|
61
|
+
rowIndex: targetRowIndex,
|
|
62
|
+
focusableIndex: targetRow.focusables.indexOf(contentOrFirst),
|
|
63
|
+
}
|
|
64
|
+
: null;
|
|
65
|
+
}
|
|
66
|
+
targetRowIndex += direction;
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
const row = rows[current.rowIndex];
|
|
71
|
+
if (!row)
|
|
72
|
+
return null;
|
|
73
|
+
let targetFocusableIndex = current.focusableIndex + direction;
|
|
74
|
+
while (targetFocusableIndex >= 0 && targetFocusableIndex < row.focusables.length) {
|
|
75
|
+
const candidate = row.focusables[targetFocusableIndex];
|
|
76
|
+
if (!isTreeitemDisabled(candidate)) {
|
|
77
|
+
return { rowIndex: current.rowIndex, focusableIndex: targetFocusableIndex };
|
|
78
|
+
}
|
|
79
|
+
targetFocusableIndex += direction;
|
|
80
|
+
}
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
export function getFocusableElementsFromTreeview(treeElement) {
|
|
84
|
+
return Array.from(treeElement.querySelectorAll(`[${TREEVIEW_FOCUSABLE_ATTRIBUTE}]`));
|
|
85
|
+
}
|
|
86
|
+
export function setMovingTabindex(treeElement, focusedElement) {
|
|
87
|
+
getFocusableElementsFromTreeview(treeElement).forEach((element) => element.setAttribute("tabindex", element === focusedElement ? "0" : "-1"));
|
|
88
|
+
}
|
|
89
|
+
export function resetMovingTabIndex(treeElement) {
|
|
90
|
+
getFocusableElementsFromTreeview(treeElement).forEach((element) => element.setAttribute("tabindex", "-1"));
|
|
91
|
+
const rows = getVisibleFocusableRows(treeElement);
|
|
92
|
+
if (rows.length) {
|
|
93
|
+
const firstContent = getContentOrFirstFocusable(rows[0]);
|
|
94
|
+
if (firstContent) {
|
|
95
|
+
firstContent.setAttribute("tabindex", "0");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
export function hasChildren(items) {
|
|
100
|
+
return (items?.length ?? 0) > 0;
|
|
101
|
+
}
|
|
102
|
+
export function hasNestedItemsInTree(items) {
|
|
103
|
+
if (!items?.length)
|
|
104
|
+
return false;
|
|
105
|
+
return items.some((item) => {
|
|
106
|
+
if (hasChildren(item.items))
|
|
107
|
+
return true;
|
|
108
|
+
return hasNestedItemsInTree(item.items);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
export function computeConnectorBorderTypes(config) {
|
|
112
|
+
const { depth = 0, isCompact, resolvedBorderTypes = [], hasChildren } = config;
|
|
113
|
+
if (isCompact) {
|
|
114
|
+
return Array(depth).fill("spacer");
|
|
115
|
+
}
|
|
116
|
+
const outputBorders = [];
|
|
117
|
+
for (let index = 0; index < resolvedBorderTypes.length; index++) {
|
|
118
|
+
const isLastBorder = index === resolvedBorderTypes.length - 1;
|
|
119
|
+
outputBorders.push(isLastBorder ? resolvedBorderTypes[index] : updateBorderTypeForAncestor(resolvedBorderTypes[index]));
|
|
120
|
+
}
|
|
121
|
+
if (depth && outputBorders.length && !hasChildren) {
|
|
122
|
+
outputBorders.push("horizontal");
|
|
123
|
+
}
|
|
124
|
+
return outputBorders;
|
|
125
|
+
}
|
|
126
|
+
export function getChildBorderTypes(resolvedBorderTypes, isLastChild) {
|
|
127
|
+
const nextType = isLastChild ? "corner" : "branch";
|
|
128
|
+
return [...resolvedBorderTypes, nextType];
|
|
129
|
+
}
|
|
130
|
+
export function isItemSelected(itemId, selectedId) {
|
|
131
|
+
return itemId !== undefined && selectedId === itemId;
|
|
132
|
+
}
|
|
133
|
+
export function canToggleOpen(hasChildren, disabled) {
|
|
134
|
+
return hasChildren && !disabled;
|
|
135
|
+
}
|
|
136
|
+
export function getTreeviewItemKey(item) {
|
|
137
|
+
return item.id ?? item.labelText;
|
|
138
|
+
}
|
|
139
|
+
export function getItemId(item) {
|
|
140
|
+
return item.id ?? item.labelText;
|
|
141
|
+
}
|
|
142
|
+
export function getDescendantIds(item) {
|
|
143
|
+
const ids = [getItemId(item)];
|
|
144
|
+
const children = item.items ?? [];
|
|
145
|
+
for (const child of children) {
|
|
146
|
+
ids.push(...getDescendantIds(child));
|
|
147
|
+
}
|
|
148
|
+
return ids;
|
|
149
|
+
}
|
|
150
|
+
function isNodeChecked(node, checkedIds) {
|
|
151
|
+
const nodeHasChildren = hasChildren(node.items);
|
|
152
|
+
return allDescendantsChecked(node, checkedIds) || (checkedIds.has(getItemId(node)) && !nodeHasChildren);
|
|
153
|
+
}
|
|
154
|
+
function addFullyCheckedAncestors(next, items) {
|
|
155
|
+
for (const item of items) {
|
|
156
|
+
if (hasChildren(item.items)) {
|
|
157
|
+
addFullyCheckedAncestors(next, item.items);
|
|
158
|
+
}
|
|
159
|
+
const itemId = getItemId(item);
|
|
160
|
+
if (!hasChildren(item.items))
|
|
161
|
+
continue;
|
|
162
|
+
const childDescendantIds = getDescendantIds(item).slice(1);
|
|
163
|
+
const allChildrenInSet = childDescendantIds.every((id) => next.has(id));
|
|
164
|
+
if (allChildrenInSet) {
|
|
165
|
+
next.add(itemId);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
function removeOrphanedRecursive(next, items) {
|
|
170
|
+
for (const item of items) {
|
|
171
|
+
if (hasChildren(item.items)) {
|
|
172
|
+
removeOrphanedRecursive(next, item.items);
|
|
173
|
+
}
|
|
174
|
+
const itemId = getItemId(item);
|
|
175
|
+
if (!next.has(itemId) || !hasChildren(item.items))
|
|
176
|
+
continue;
|
|
177
|
+
const childDescendantIds = getDescendantIds(item).slice(1);
|
|
178
|
+
const anyChildInSet = childDescendantIds.some((id) => next.has(id));
|
|
179
|
+
if (!anyChildInSet) {
|
|
180
|
+
next.delete(itemId);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
export function removeOrphanedParentIds(checkedIds, items) {
|
|
185
|
+
const next = new Set(checkedIds);
|
|
186
|
+
removeOrphanedRecursive(next, items);
|
|
187
|
+
return next;
|
|
188
|
+
}
|
|
189
|
+
export function computeCheckedIdsAfterToggle(currentChecked, node, rootItems) {
|
|
190
|
+
const descendantIds = getDescendantIds(node);
|
|
191
|
+
const next = new Set(currentChecked);
|
|
192
|
+
const nodeId = getItemId(node);
|
|
193
|
+
if (descendantIds.length > 0) {
|
|
194
|
+
if (isNodeChecked(node, currentChecked)) {
|
|
195
|
+
descendantIds.forEach((id) => next.delete(id));
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
descendantIds.forEach((id) => next.add(id));
|
|
199
|
+
if (rootItems && rootItems.length > 0) {
|
|
200
|
+
addFullyCheckedAncestors(next, rootItems);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
if (currentChecked.has(nodeId)) {
|
|
206
|
+
next.delete(nodeId);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
next.add(nodeId);
|
|
210
|
+
if (rootItems && rootItems.length > 0) {
|
|
211
|
+
addFullyCheckedAncestors(next, rootItems);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (rootItems && rootItems.length > 0) {
|
|
216
|
+
return removeOrphanedParentIds(next, rootItems);
|
|
217
|
+
}
|
|
218
|
+
return next;
|
|
219
|
+
}
|
|
220
|
+
export function isNodeIndeterminate(node, checkedIds) {
|
|
221
|
+
const descendantIds = getDescendantIds(node);
|
|
222
|
+
const childDescendantIds = descendantIds.slice(1);
|
|
223
|
+
if (childDescendantIds.length === 0)
|
|
224
|
+
return false;
|
|
225
|
+
const checkedCount = childDescendantIds.filter((id) => checkedIds.has(id)).length;
|
|
226
|
+
return checkedCount > 0 && checkedCount < childDescendantIds.length;
|
|
227
|
+
}
|
|
228
|
+
export function allDescendantsChecked(node, checkedIds) {
|
|
229
|
+
const descendantIds = getDescendantIds(node);
|
|
230
|
+
const childDescendantIds = descendantIds.slice(1);
|
|
231
|
+
return childDescendantIds.length > 0 && childDescendantIds.every((id) => checkedIds.has(id));
|
|
232
|
+
}
|
|
233
|
+
export function findNodeById(items, itemId) {
|
|
234
|
+
for (const item of items) {
|
|
235
|
+
if (getItemId(item) === itemId) {
|
|
236
|
+
return item;
|
|
237
|
+
}
|
|
238
|
+
const found = findNodeById(item.items ?? [], itemId);
|
|
239
|
+
if (found) {
|
|
240
|
+
return found;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return undefined;
|
|
244
|
+
}
|
|
245
|
+
export function mergeChildItemWithParent(child, parent) {
|
|
246
|
+
return {
|
|
247
|
+
...child,
|
|
248
|
+
isCompact: child.isCompact ?? parent.isCompact,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
export function computeCheckboxId(baseId) {
|
|
252
|
+
return `treeview-checkbox-${baseId}`;
|
|
253
|
+
}
|
|
254
|
+
export function updateBorderTypeForAncestor(type) {
|
|
255
|
+
return type === "corner" ? "spacer" : "vertical";
|
|
256
|
+
}
|
|
257
|
+
export function buildTreeviewNodeId({ treeId, path, itemId }) {
|
|
258
|
+
const pathPart = path.join("-");
|
|
259
|
+
const base = `${treeId}__${pathPart}`;
|
|
260
|
+
return itemId ? `${base}__${itemId}` : base;
|
|
261
|
+
}
|
|
262
|
+
export function parsePathString(pathString) {
|
|
263
|
+
if (!pathString.trim()) {
|
|
264
|
+
return [];
|
|
265
|
+
}
|
|
266
|
+
return pathString
|
|
267
|
+
.split("-")
|
|
268
|
+
.map((segment) => parseInt(segment.trim(), 10))
|
|
269
|
+
.filter((index) => !Number.isNaN(index) && index >= 0);
|
|
270
|
+
}
|
|
271
|
+
export function getNodeAtPath(items, pathIndices) {
|
|
272
|
+
if (pathIndices.length === 0 || items.length === 0) {
|
|
273
|
+
return undefined;
|
|
274
|
+
}
|
|
275
|
+
const [headIndex, ...restIndices] = pathIndices;
|
|
276
|
+
const node = items[headIndex];
|
|
277
|
+
if (node === undefined) {
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
if (restIndices.length === 0) {
|
|
281
|
+
return node;
|
|
282
|
+
}
|
|
283
|
+
const children = node.items ?? [];
|
|
284
|
+
return getNodeAtPath(children, restIndices);
|
|
285
|
+
}
|
|
@@ -8,4 +8,5 @@ export declare const ARROW_RIGHT_KEY = "ArrowRight";
|
|
|
8
8
|
export declare const ARROW_UP_KEY = "ArrowUp";
|
|
9
9
|
export declare const ARROW_DOWN_KEY = "ArrowDown";
|
|
10
10
|
export declare const ESCAPE_KEY = "Escape";
|
|
11
|
+
export declare const ARROW_KEYS: string[];
|
|
11
12
|
//# sourceMappingURL=keyboard.constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.constants.d.ts","sourceRoot":"","sources":["../../../constants/keyboard/keyboard.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"keyboard.constants.d.ts","sourceRoot":"","sources":["../../../constants/keyboard/keyboard.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,SAAS,UAAU,CAAC;AACjC,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,aAAa,cAAc,CAAC;AACzC,eAAO,MAAM,UAAU,WAAW,CAAC;AACnC,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,cAAc,cAAc,CAAC;AAC1C,eAAO,MAAM,UAAU,WAAW,CAAC;AAEnC,eAAO,MAAM,UAAU,UAAkE,CAAC"}
|
|
@@ -143,6 +143,15 @@
|
|
|
143
143
|
font-style: normal;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
@mixin typography-heading-2xs {
|
|
147
|
+
@include typography-heading;
|
|
148
|
+
font-family: $heading-2xs-semibold-font-family;
|
|
149
|
+
font-weight: $heading-2xs-semibold-font-weight;
|
|
150
|
+
font-size: $heading-2xs-semibold-font-size;
|
|
151
|
+
line-height: $heading-2xs-semibold-line-height;
|
|
152
|
+
letter-spacing: $heading-2xs-semibold-letter-spacing;
|
|
153
|
+
}
|
|
154
|
+
|
|
146
155
|
@mixin typography-heading-xs {
|
|
147
156
|
@include typography-heading;
|
|
148
157
|
font-family: $heading-xs-semibold-font-family;
|
|
@@ -188,6 +197,15 @@
|
|
|
188
197
|
letter-spacing: $heading-xl-semibold-letter-spacing;
|
|
189
198
|
}
|
|
190
199
|
|
|
200
|
+
@mixin typography-heading-2xl {
|
|
201
|
+
@include typography-heading;
|
|
202
|
+
font-family: $heading-2xl-semibold-font-family;
|
|
203
|
+
font-weight: $heading-2xl-semibold-font-weight;
|
|
204
|
+
font-size: $heading-2xl-semibold-font-size;
|
|
205
|
+
line-height: $heading-2xl-semibold-line-height;
|
|
206
|
+
letter-spacing: $heading-2xl-semibold-letter-spacing;
|
|
207
|
+
}
|
|
208
|
+
|
|
191
209
|
@mixin typography-checkbox-error {
|
|
192
210
|
@include typography-text-s;
|
|
193
211
|
font-weight: $text-s-bold-font-weight;
|
package/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./components/checkbox";
|
|
|
16
16
|
export * from "./components/checkbox-group";
|
|
17
17
|
export * from "./components/chip";
|
|
18
18
|
export * from "./components/divider";
|
|
19
|
+
export * from "./components/drawer";
|
|
19
20
|
export * from "./components/dropdown";
|
|
20
21
|
export * from "./components/grid";
|
|
21
22
|
export * from "./components/icon";
|
|
@@ -37,8 +38,11 @@ export * from "./components/tag";
|
|
|
37
38
|
export * from "./components/text-input";
|
|
38
39
|
export * from "./components/textarea";
|
|
39
40
|
export * from "./components/toast";
|
|
41
|
+
export * from "./components/treeview";
|
|
40
42
|
export * from "./components/tooltip";
|
|
41
43
|
export * from "./components/utils";
|
|
42
44
|
export * from "./components/stepper";
|
|
45
|
+
export * from "./components/accordion";
|
|
46
|
+
export * from "./components/avatar";
|
|
43
47
|
export * from "./utils";
|
|
44
48
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -16,6 +16,7 @@ export * from "./components/checkbox";
|
|
|
16
16
|
export * from "./components/checkbox-group";
|
|
17
17
|
export * from "./components/chip";
|
|
18
18
|
export * from "./components/divider";
|
|
19
|
+
export * from "./components/drawer";
|
|
19
20
|
export * from "./components/dropdown";
|
|
20
21
|
export * from "./components/grid";
|
|
21
22
|
export * from "./components/icon";
|
|
@@ -37,7 +38,10 @@ export * from "./components/tag";
|
|
|
37
38
|
export * from "./components/text-input";
|
|
38
39
|
export * from "./components/textarea";
|
|
39
40
|
export * from "./components/toast";
|
|
41
|
+
export * from "./components/treeview";
|
|
40
42
|
export * from "./components/tooltip";
|
|
41
43
|
export * from "./components/utils";
|
|
42
44
|
export * from "./components/stepper";
|
|
45
|
+
export * from "./components/accordion";
|
|
46
|
+
export * from "./components/avatar";
|
|
43
47
|
export * from "./utils";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-system-rte/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
"./design-tokens/*": "./design-tokens/*",
|
|
31
31
|
"./assets/*": "./assets/*",
|
|
32
32
|
"./css/*": "./css/*",
|
|
33
|
+
"./components/*": {
|
|
34
|
+
"types": "./components/*/index.d.ts",
|
|
35
|
+
"default": "./components/*/index.js"
|
|
36
|
+
},
|
|
33
37
|
"./*": {
|
|
34
38
|
"types": "./*.d.ts",
|
|
35
39
|
"default": "./*.js"
|