@elliemae/ds-left-navigation-tree 0.0.0-stage → 3.80.0-next.38
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/dist/cjs/DSLeftNavigationTree.js +46 -0
- package/dist/cjs/DSLeftNavigationTree.js.map +7 -0
- package/dist/cjs/config/store.js +63 -0
- package/dist/cjs/config/store.js.map +7 -0
- package/dist/cjs/config/treeModel.js +178 -0
- package/dist/cjs/config/treeModel.js.map +7 -0
- package/dist/cjs/config/useAutoCalculated.js +37 -0
- package/dist/cjs/config/useAutoCalculated.js.map +7 -0
- package/dist/cjs/config/useFocusTracker.js +63 -0
- package/dist/cjs/config/useFocusTracker.js.map +7 -0
- package/dist/cjs/config/useTreeHandlers.js +157 -0
- package/dist/cjs/config/useTreeHandlers.js.map +7 -0
- package/dist/cjs/config/useTreeModel.js +110 -0
- package/dist/cjs/config/useTreeModel.js.map +7 -0
- package/dist/cjs/config/useValidateProps.js +40 -0
- package/dist/cjs/config/useValidateProps.js.map +7 -0
- package/dist/cjs/constants/index.js +79 -0
- package/dist/cjs/constants/index.js.map +7 -0
- package/dist/cjs/index.js +46 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/package.json +7 -0
- package/dist/cjs/parts/Footer.js +83 -0
- package/dist/cjs/parts/Footer.js.map +7 -0
- package/dist/cjs/parts/Header.js +114 -0
- package/dist/cjs/parts/Header.js.map +7 -0
- package/dist/cjs/parts/MainContent.js +95 -0
- package/dist/cjs/parts/MainContent.js.map +7 -0
- package/dist/cjs/parts/RailItem.js +109 -0
- package/dist/cjs/parts/RailItem.js.map +7 -0
- package/dist/cjs/parts/TreeContext.js +37 -0
- package/dist/cjs/parts/TreeContext.js.map +7 -0
- package/dist/cjs/parts/TreeItem.js +171 -0
- package/dist/cjs/parts/TreeItem.js.map +7 -0
- package/dist/cjs/parts/TreeRoot.js +76 -0
- package/dist/cjs/parts/TreeRoot.js.map +7 -0
- package/dist/cjs/parts/styled.js +221 -0
- package/dist/cjs/parts/styled.js.map +7 -0
- package/dist/cjs/react-desc-prop-types.js +125 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/typescript-testing/DSLeftNavigationTreeNamespace.js +172 -0
- package/dist/cjs/typescript-testing/DSLeftNavigationTreeNamespace.js.map +7 -0
- package/dist/cjs/typescript-testing/slot-props.js +82 -0
- package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
- package/dist/esm/DSLeftNavigationTree.js +16 -0
- package/dist/esm/DSLeftNavigationTree.js.map +7 -0
- package/dist/esm/config/store.js +33 -0
- package/dist/esm/config/store.js.map +7 -0
- package/dist/esm/config/treeModel.js +148 -0
- package/dist/esm/config/treeModel.js.map +7 -0
- package/dist/esm/config/useAutoCalculated.js +7 -0
- package/dist/esm/config/useAutoCalculated.js.map +7 -0
- package/dist/esm/config/useFocusTracker.js +33 -0
- package/dist/esm/config/useFocusTracker.js.map +7 -0
- package/dist/esm/config/useTreeHandlers.js +133 -0
- package/dist/esm/config/useTreeHandlers.js.map +7 -0
- package/dist/esm/config/useTreeModel.js +90 -0
- package/dist/esm/config/useTreeModel.js.map +7 -0
- package/dist/esm/config/useValidateProps.js +10 -0
- package/dist/esm/config/useValidateProps.js.map +7 -0
- package/dist/esm/constants/index.js +49 -0
- package/dist/esm/constants/index.js.map +7 -0
- package/dist/esm/index.js +25 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/package.json +7 -0
- package/dist/esm/parts/Footer.js +53 -0
- package/dist/esm/parts/Footer.js.map +7 -0
- package/dist/esm/parts/Header.js +91 -0
- package/dist/esm/parts/Header.js.map +7 -0
- package/dist/esm/parts/MainContent.js +69 -0
- package/dist/esm/parts/MainContent.js.map +7 -0
- package/dist/esm/parts/RailItem.js +79 -0
- package/dist/esm/parts/RailItem.js.map +7 -0
- package/dist/esm/parts/TreeContext.js +7 -0
- package/dist/esm/parts/TreeContext.js.map +7 -0
- package/dist/esm/parts/TreeItem.js +149 -0
- package/dist/esm/parts/TreeItem.js.map +7 -0
- package/dist/esm/parts/TreeRoot.js +46 -0
- package/dist/esm/parts/TreeRoot.js.map +7 -0
- package/dist/esm/parts/styled.js +191 -0
- package/dist/esm/parts/styled.js.map +7 -0
- package/dist/esm/react-desc-prop-types.js +105 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/typescript-testing/DSLeftNavigationTreeNamespace.js +149 -0
- package/dist/esm/typescript-testing/DSLeftNavigationTreeNamespace.js.map +7 -0
- package/dist/esm/typescript-testing/slot-props.js +59 -0
- package/dist/esm/typescript-testing/slot-props.js.map +7 -0
- package/dist/types/DSLeftNavigationTree.d.ts +4 -0
- package/dist/types/config/store.d.ts +38 -0
- package/dist/types/config/treeModel.d.ts +69 -0
- package/dist/types/config/useAutoCalculated.d.ts +1 -0
- package/dist/types/config/useFocusTracker.d.ts +11 -0
- package/dist/types/config/useTreeHandlers.d.ts +11 -0
- package/dist/types/config/useTreeModel.d.ts +22 -0
- package/dist/types/config/useValidateProps.d.ts +3 -0
- package/dist/types/constants/index.d.ts +54 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/parts/Footer.d.ts +2 -0
- package/dist/types/parts/Header.d.ts +2 -0
- package/dist/types/parts/MainContent.d.ts +2 -0
- package/dist/types/parts/RailItem.d.ts +8 -0
- package/dist/types/parts/TreeContext.d.ts +11 -0
- package/dist/types/parts/TreeItem.d.ts +4 -0
- package/dist/types/parts/TreeRoot.d.ts +9 -0
- package/dist/types/parts/styled.d.ts +46 -0
- package/dist/types/react-desc-prop-types.d.ts +99 -0
- package/package.json +72 -4
- package/README.md +0 -3
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React2, { useCallback, useContext } from "react";
|
|
4
|
+
import { ArrowheadDown, ArrowheadRight, ChevronSmallDown, ChevronSmallRight } from "@elliemae/ds-icons";
|
|
5
|
+
import { ROW_PADDING, hasChildren, hasLeadingArrow } from "../config/treeModel.js";
|
|
6
|
+
import { useItemFocusState } from "../config/useTreeModel.js";
|
|
7
|
+
import { TreeContext } from "./TreeContext.js";
|
|
8
|
+
import {
|
|
9
|
+
StyledArrowContainer,
|
|
10
|
+
StyledGroup,
|
|
11
|
+
StyledItem,
|
|
12
|
+
StyledItemLabel,
|
|
13
|
+
StyledItemRow,
|
|
14
|
+
StyledLeftContainer,
|
|
15
|
+
StyledRightContainer
|
|
16
|
+
} from "./styled.js";
|
|
17
|
+
const ARROW_COLOR = ["brand-primary", "800"];
|
|
18
|
+
const TreeItemArrow = ({
|
|
19
|
+
isLeading,
|
|
20
|
+
isOpen,
|
|
21
|
+
getOwnerProps,
|
|
22
|
+
getOwnerPropsArguments
|
|
23
|
+
}) => {
|
|
24
|
+
const Arrowhead = isOpen ? ArrowheadDown : ArrowheadRight;
|
|
25
|
+
const Chevron = isOpen ? ChevronSmallDown : ChevronSmallRight;
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
StyledArrowContainer,
|
|
28
|
+
{
|
|
29
|
+
"aria-hidden": "true",
|
|
30
|
+
isLeading,
|
|
31
|
+
getOwnerProps,
|
|
32
|
+
getOwnerPropsArguments,
|
|
33
|
+
children: isLeading ? /* @__PURE__ */ jsx(Arrowhead, { size: "s", color: ARROW_COLOR }) : /* @__PURE__ */ jsx(Chevron, { size: "m", color: ARROW_COLOR })
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
const TreeItem = React2.memo(({ id }) => {
|
|
38
|
+
const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);
|
|
39
|
+
const info = model.index.get(id);
|
|
40
|
+
const isParent = hasChildren(info);
|
|
41
|
+
const isOpen = model.openIds.has(id);
|
|
42
|
+
const isCurrent = model.currentLeafId === id;
|
|
43
|
+
const isSelectedParent = model.selectedParentIds.has(id);
|
|
44
|
+
const focusState = useItemFocusState(model, id);
|
|
45
|
+
const level = info?.level ?? 1;
|
|
46
|
+
const item = info?.item;
|
|
47
|
+
const focusRef = useCallback(
|
|
48
|
+
(node) => {
|
|
49
|
+
if (node && focusState === "focus-target") node.focus();
|
|
50
|
+
},
|
|
51
|
+
[focusState]
|
|
52
|
+
);
|
|
53
|
+
const handleClick = useCallback((e) => handlers.activate(id, e), [handlers, id]);
|
|
54
|
+
const getOwnerPropsArguments = useCallback(
|
|
55
|
+
() => ({ item, level, isOpen, isCurrent }),
|
|
56
|
+
[item, level, isOpen, isCurrent]
|
|
57
|
+
);
|
|
58
|
+
if (!info || !item) return null;
|
|
59
|
+
const { label, RightComponent } = item.itemOpts ?? {};
|
|
60
|
+
const { CollapsedComponent } = item;
|
|
61
|
+
const labelId = getElementId("label", id);
|
|
62
|
+
const leadingArrow = hasLeadingArrow(info);
|
|
63
|
+
const isOpenSection = level === 1 && isParent && isOpen && !!CollapsedComponent;
|
|
64
|
+
const descriptionId = getElementId("description", id);
|
|
65
|
+
return /* @__PURE__ */ jsxs(
|
|
66
|
+
StyledItem,
|
|
67
|
+
{
|
|
68
|
+
isOpenSection,
|
|
69
|
+
role: "treeitem",
|
|
70
|
+
"aria-level": level,
|
|
71
|
+
"aria-expanded": isParent ? isOpen : void 0,
|
|
72
|
+
"aria-current": isCurrent ? "page" : void 0,
|
|
73
|
+
"aria-labelledby": labelId,
|
|
74
|
+
"aria-describedby": RightComponent ? descriptionId : void 0,
|
|
75
|
+
tabIndex: focusState === "none" ? -1 : 0,
|
|
76
|
+
"data-dsid": id,
|
|
77
|
+
"data-type": item.type,
|
|
78
|
+
"data-selected": isCurrent,
|
|
79
|
+
"data-selectedparent": isSelectedParent,
|
|
80
|
+
"data-opened": isParent ? isOpen : void 0,
|
|
81
|
+
innerRef: focusRef,
|
|
82
|
+
getOwnerProps,
|
|
83
|
+
getOwnerPropsArguments,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsxs(
|
|
86
|
+
StyledItemRow,
|
|
87
|
+
{
|
|
88
|
+
"data-row": true,
|
|
89
|
+
rowPadding: model.rowPaddings.get(id) ?? ROW_PADDING,
|
|
90
|
+
isTall: level === 1 && !!CollapsedComponent,
|
|
91
|
+
isSticky: isOpenSection,
|
|
92
|
+
isCurrent,
|
|
93
|
+
isSelectedParent,
|
|
94
|
+
onClick: handleClick,
|
|
95
|
+
getOwnerProps,
|
|
96
|
+
getOwnerPropsArguments,
|
|
97
|
+
children: [
|
|
98
|
+
CollapsedComponent ? /* @__PURE__ */ jsx(StyledLeftContainer, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ jsx(CollapsedComponent, { item }) }) : null,
|
|
99
|
+
leadingArrow ? /* @__PURE__ */ jsx(
|
|
100
|
+
TreeItemArrow,
|
|
101
|
+
{
|
|
102
|
+
isLeading: leadingArrow,
|
|
103
|
+
isOpen,
|
|
104
|
+
getOwnerProps,
|
|
105
|
+
getOwnerPropsArguments
|
|
106
|
+
}
|
|
107
|
+
) : null,
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
StyledItemLabel,
|
|
110
|
+
{
|
|
111
|
+
id: labelId,
|
|
112
|
+
isTall: level === 1 && !!CollapsedComponent,
|
|
113
|
+
labelOverflow: item.itemOpts?.labelOverflow ?? labelOverflow,
|
|
114
|
+
getOwnerProps,
|
|
115
|
+
getOwnerPropsArguments,
|
|
116
|
+
children: label
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
RightComponent ? /* @__PURE__ */ jsx(
|
|
120
|
+
StyledRightContainer,
|
|
121
|
+
{
|
|
122
|
+
id: descriptionId,
|
|
123
|
+
getOwnerProps,
|
|
124
|
+
getOwnerPropsArguments,
|
|
125
|
+
children: /* @__PURE__ */ jsx(RightComponent, { item })
|
|
126
|
+
}
|
|
127
|
+
) : null,
|
|
128
|
+
isParent && !leadingArrow ? /* @__PURE__ */ jsx(
|
|
129
|
+
TreeItemArrow,
|
|
130
|
+
{
|
|
131
|
+
isLeading: leadingArrow,
|
|
132
|
+
isOpen,
|
|
133
|
+
getOwnerProps,
|
|
134
|
+
getOwnerPropsArguments
|
|
135
|
+
}
|
|
136
|
+
) : null
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
isParent && isOpen ? /* @__PURE__ */ jsx(StyledGroup, { role: "group", getOwnerProps, getOwnerPropsArguments, children: info.childIds.map((childId) => /* @__PURE__ */ jsx(TreeItem, { id: childId }, childId)) }) : null
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
});
|
|
145
|
+
TreeItem.displayName = "DSLeftNavigationTree.TreeItem";
|
|
146
|
+
export {
|
|
147
|
+
TreeItem
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=TreeItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/TreeItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\nimport React, { useCallback, useContext } from 'react';\nimport { ArrowheadDown, ArrowheadRight, ChevronSmallDown, ChevronSmallRight } from '@elliemae/ds-icons';\nimport { ROW_PADDING, hasChildren, hasLeadingArrow } from '../config/treeModel.js';\nimport { useItemFocusState } from '../config/useTreeModel.js';\nimport { TreeContext } from './TreeContext.js';\nimport {\n StyledArrowContainer,\n StyledGroup,\n StyledItem,\n StyledItemLabel,\n StyledItemRow,\n StyledLeftContainer,\n StyledRightContainer,\n} from './styled.js';\n\nconst ARROW_COLOR = ['brand-primary', '800'] as ['brand-primary', '800'];\n\n/** Parents without an icon lead with an arrowhead; parents with an icon trail a chevron (spec \"forward chevron\"). */\nconst TreeItemArrow = ({\n isLeading,\n isOpen,\n getOwnerProps,\n getOwnerPropsArguments,\n}: {\n isLeading: boolean;\n isOpen: boolean;\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n}) => {\n const Arrowhead = isOpen ? ArrowheadDown : ArrowheadRight;\n const Chevron = isOpen ? ChevronSmallDown : ChevronSmallRight;\n return (\n <StyledArrowContainer\n aria-hidden=\"true\"\n isLeading={isLeading}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {isLeading ? <Arrowhead size=\"s\" color={ARROW_COLOR} /> : <Chevron size=\"m\" color={ARROW_COLOR} />}\n </StyledArrowContainer>\n );\n};\n\nexport const TreeItem = React.memo(({ id }: { id: string }) => {\n const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);\n const info = model.index.get(id);\n const isParent = hasChildren(info);\n const isOpen = model.openIds.has(id);\n const isCurrent = model.currentLeafId === id;\n const isSelectedParent = model.selectedParentIds.has(id);\n const focusState = useItemFocusState(model, id);\n const level = info?.level ?? 1;\n const item = info?.item;\n\n const focusRef = useCallback(\n (node: HTMLElement | null) => {\n if (node && focusState === 'focus-target') node.focus();\n },\n [focusState],\n );\n const handleClick = useCallback((e: React.MouseEvent<HTMLElement>) => handlers.activate(id, e), [handlers, id]);\n const getOwnerPropsArguments = useCallback(\n () => ({ item, level, isOpen, isCurrent }),\n [item, level, isOpen, isCurrent],\n );\n\n if (!info || !item) return null;\n const { label, RightComponent } = item.itemOpts ?? {};\n const { CollapsedComponent } = item;\n const labelId = getElementId('label', id);\n const leadingArrow = hasLeadingArrow(info);\n /** Spec \"Expand in place\": an open root section (a parent with an icon) and its children show the full-height bar. */\n const isOpenSection = level === 1 && isParent && isOpen && !!CollapsedComponent;\n const descriptionId = getElementId('description', id);\n\n return (\n <StyledItem\n isOpenSection={isOpenSection}\n role=\"treeitem\"\n aria-level={level}\n aria-expanded={isParent ? isOpen : undefined}\n aria-current={isCurrent ? 'page' : undefined}\n aria-labelledby={labelId}\n aria-describedby={RightComponent ? descriptionId : undefined}\n tabIndex={focusState === 'none' ? -1 : 0}\n data-dsid={id}\n data-type={item.type}\n data-selected={isCurrent}\n data-selectedparent={isSelectedParent}\n data-opened={isParent ? isOpen : undefined}\n innerRef={focusRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledItemRow\n data-row\n rowPadding={model.rowPaddings.get(id) ?? ROW_PADDING}\n isTall={level === 1 && !!CollapsedComponent}\n isSticky={isOpenSection}\n isCurrent={isCurrent}\n isSelectedParent={isSelectedParent}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {CollapsedComponent ? (\n <StyledLeftContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <CollapsedComponent item={item} />\n </StyledLeftContainer>\n ) : null}\n {leadingArrow ? (\n <TreeItemArrow\n isLeading={leadingArrow}\n isOpen={isOpen}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ) : null}\n <StyledItemLabel\n id={labelId}\n isTall={level === 1 && !!CollapsedComponent}\n labelOverflow={item.itemOpts?.labelOverflow ?? labelOverflow}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {label}\n </StyledItemLabel>\n {RightComponent ? (\n <StyledRightContainer\n id={descriptionId}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <RightComponent item={item} />\n </StyledRightContainer>\n ) : null}\n {isParent && !leadingArrow ? (\n <TreeItemArrow\n isLeading={leadingArrow}\n isOpen={isOpen}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n ) : null}\n </StyledItemRow>\n {isParent && isOpen ? (\n <StyledGroup role=\"group\" getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n {info.childIds.map((childId) => (\n <TreeItem key={childId} id={childId} />\n ))}\n </StyledGroup>\n ) : null}\n </StyledItem>\n );\n});\n\nTreeItem.displayName = 'DSLeftNavigationTree.TreeItem';\n"],
|
|
5
|
+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ACC;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW;AAAA,kBACX;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACF,IACE;AAAA,cACJ;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAI;AAAA,kBACJ,QAAQ,UAAU,KAAK,CAAC,CAAC;AAAA,kBACzB,eAAe,KAAK,UAAU,iBAAiB;AAAA,kBAC/C;AAAA,kBACA;AAAA,kBAEC;AAAA;AAAA,cACH;AAAA,cACC,iBACC;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAI;AAAA,kBACJ;AAAA,kBACA;AAAA,kBAEA,8BAAC,kBAAe,MAAY;AAAA;AAAA,cAC9B,IACE;AAAA,cACH,YAAY,CAAC,eACZ;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW;AAAA,kBACX;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACF,IACE;AAAA;AAAA;AAAA,QACN;AAAA,QACC,YAAY,SACX,oBAAC,eAAY,MAAK,SAAQ,eAA8B,wBACrD,eAAK,SAAS,IAAI,CAAC,YAClB,oBAAC,YAAuB,IAAI,WAAb,OAAsB,CACtC,GACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ,CAAC;AAED,SAAS,cAAc;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import { LEFT_NAVIGATION_TREE_ITEM_TYPES } from "../constants/index.js";
|
|
5
|
+
import { TreeContext } from "./TreeContext.js";
|
|
6
|
+
import { TreeItem } from "./TreeItem.js";
|
|
7
|
+
import { RailItem } from "./RailItem.js";
|
|
8
|
+
import { StyledItemSeparator, StyledSectionContainer, StyledSectionLabel, StyledTree } from "./styled.js";
|
|
9
|
+
const TreeRoot = ({ nameProps }) => {
|
|
10
|
+
const { model, handlers, getOwnerProps, getElementId } = useContext(TreeContext);
|
|
11
|
+
if (model.visibleIds.length === 0) return null;
|
|
12
|
+
const isHeaderContent = !!model.headerItem && model.isHeaderOpen && !model.isRail;
|
|
13
|
+
const treeNameProps = isHeaderContent && model.headerItem ? { "aria-labelledby": getElementId("label", model.headerItem.dsId) } : nameProps;
|
|
14
|
+
const renderRootEntries = () => model.items.map((item) => {
|
|
15
|
+
if (item.type === LEFT_NAVIGATION_TREE_ITEM_TYPES.SEPARATOR) {
|
|
16
|
+
return /* @__PURE__ */ jsx("li", { role: "none", children: /* @__PURE__ */ jsx(StyledItemSeparator, { "aria-hidden": "true", getOwnerProps }) }, item.dsId);
|
|
17
|
+
}
|
|
18
|
+
if (item.type === LEFT_NAVIGATION_TREE_ITEM_TYPES.SECTION) {
|
|
19
|
+
const sectionLabelId = getElementId("section", item.dsId);
|
|
20
|
+
const childIds = (item.itemOpts?.items ?? []).map((child) => child.dsId).filter((id) => model.index.has(id));
|
|
21
|
+
return /* @__PURE__ */ jsxs("li", { role: "none", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(StyledSectionLabel, { id: sectionLabelId, "aria-hidden": "true", getOwnerProps, children: item.itemOpts?.label }),
|
|
23
|
+
/* @__PURE__ */ jsx(StyledSectionContainer, { role: "group", "aria-labelledby": sectionLabelId, getOwnerProps, children: childIds.map((id) => /* @__PURE__ */ jsx(TreeItem, { id }, id)) })
|
|
24
|
+
] }, item.dsId);
|
|
25
|
+
}
|
|
26
|
+
return model.index.has(item.dsId) ? /* @__PURE__ */ jsx(TreeItem, { id: item.dsId }, item.dsId) : null;
|
|
27
|
+
});
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
StyledTree,
|
|
30
|
+
{
|
|
31
|
+
id: getElementId("tree", "root"),
|
|
32
|
+
role: "tree",
|
|
33
|
+
isHeaderContent,
|
|
34
|
+
...treeNameProps,
|
|
35
|
+
onKeyDown: handlers.onTreeKeyDown,
|
|
36
|
+
onFocus: handlers.onTreeFocus,
|
|
37
|
+
onBlur: handlers.onTreeBlur,
|
|
38
|
+
getOwnerProps,
|
|
39
|
+
children: model.isRail ? model.visibleIds.map((id) => /* @__PURE__ */ jsx(RailItem, { id }, id)) : renderRootEntries()
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
TreeRoot
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=TreeRoot.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/TreeRoot.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport { LEFT_NAVIGATION_TREE_ITEM_TYPES } from '../constants/index.js';\nimport { TreeContext } from './TreeContext.js';\nimport { TreeItem } from './TreeItem.js';\nimport { RailItem } from './RailItem.js';\nimport { StyledItemSeparator, StyledSectionContainer, StyledSectionLabel, StyledTree } from './styled.js';\n\ntype NameProps = { 'aria-label'?: string; 'aria-labelledby'?: string };\n\nexport const TreeRoot = ({ nameProps }: { nameProps: NameProps }) => {\n const { model, handlers, getOwnerProps, getElementId } = useContext(TreeContext);\n if (model.visibleIds.length === 0) return null;\n /** While the header is open the tree shows its content, so it takes the header's name instead of the landmark's. */\n const isHeaderContent = !!model.headerItem && model.isHeaderOpen && !model.isRail;\n const treeNameProps =\n isHeaderContent && model.headerItem\n ? { 'aria-labelledby': getElementId('label', model.headerItem.dsId) }\n : nameProps;\n\n const renderRootEntries = () =>\n model.items.map((item) => {\n if (item.type === LEFT_NAVIGATION_TREE_ITEM_TYPES.SEPARATOR) {\n return (\n <li key={item.dsId} role=\"none\">\n <StyledItemSeparator aria-hidden=\"true\" getOwnerProps={getOwnerProps} />\n </li>\n );\n }\n if (item.type === LEFT_NAVIGATION_TREE_ITEM_TYPES.SECTION) {\n const sectionLabelId = getElementId('section', item.dsId);\n const childIds = (item.itemOpts?.items ?? []).map((child) => child.dsId).filter((id) => model.index.has(id));\n return (\n <li key={item.dsId} role=\"none\">\n <StyledSectionLabel id={sectionLabelId} aria-hidden=\"true\" getOwnerProps={getOwnerProps}>\n {item.itemOpts?.label}\n </StyledSectionLabel>\n <StyledSectionContainer role=\"group\" aria-labelledby={sectionLabelId} getOwnerProps={getOwnerProps}>\n {childIds.map((id) => (\n <TreeItem key={id} id={id} />\n ))}\n </StyledSectionContainer>\n </li>\n );\n }\n return model.index.has(item.dsId) ? <TreeItem key={item.dsId} id={item.dsId} /> : null;\n });\n\n return (\n <StyledTree\n id={getElementId('tree', 'root')}\n role=\"tree\"\n isHeaderContent={isHeaderContent}\n {...treeNameProps}\n onKeyDown={handlers.onTreeKeyDown}\n onFocus={handlers.onTreeFocus}\n onBlur={handlers.onTreeBlur}\n getOwnerProps={getOwnerProps}\n >\n {model.isRail ? model.visibleIds.map((id) => <RailItem key={id} id={id} />) : renderRootEntries()}\n </StyledTree>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwBX,cAQF,YARE;AAxBZ,SAAgB,kBAAkB;AAClC,SAAS,uCAAuC;AAChD,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAS,qBAAqB,wBAAwB,oBAAoB,kBAAkB;AAIrF,MAAM,WAAW,CAAC,EAAE,UAAU,MAAgC;AACnE,QAAM,EAAE,OAAO,UAAU,eAAe,aAAa,IAAI,WAAW,WAAW;AAC/E,MAAI,MAAM,WAAW,WAAW,EAAG,QAAO;AAE1C,QAAM,kBAAkB,CAAC,CAAC,MAAM,cAAc,MAAM,gBAAgB,CAAC,MAAM;AAC3E,QAAM,gBACJ,mBAAmB,MAAM,aACrB,EAAE,mBAAmB,aAAa,SAAS,MAAM,WAAW,IAAI,EAAE,IAClE;AAEN,QAAM,oBAAoB,MACxB,MAAM,MAAM,IAAI,CAAC,SAAS;AACxB,QAAI,KAAK,SAAS,gCAAgC,WAAW;AAC3D,aACE,oBAAC,QAAmB,MAAK,QACvB,8BAAC,uBAAoB,eAAY,QAAO,eAA8B,KAD/D,KAAK,IAEd;AAAA,IAEJ;AACA,QAAI,KAAK,SAAS,gCAAgC,SAAS;AACzD,YAAM,iBAAiB,aAAa,WAAW,KAAK,IAAI;AACxD,YAAM,YAAY,KAAK,UAAU,SAAS,CAAC,GAAG,IAAI,CAAC,UAAU,MAAM,IAAI,EAAE,OAAO,CAAC,OAAO,MAAM,MAAM,IAAI,EAAE,CAAC;AAC3G,aACE,qBAAC,QAAmB,MAAK,QACvB;AAAA,4BAAC,sBAAmB,IAAI,gBAAgB,eAAY,QAAO,eACxD,eAAK,UAAU,OAClB;AAAA,QACA,oBAAC,0BAAuB,MAAK,SAAQ,mBAAiB,gBAAgB,eACnE,mBAAS,IAAI,CAAC,OACb,oBAAC,YAAkB,MAAJ,EAAY,CAC5B,GACH;AAAA,WARO,KAAK,IASd;AAAA,IAEJ;AACA,WAAO,MAAM,MAAM,IAAI,KAAK,IAAI,IAAI,oBAAC,YAAyB,IAAI,KAAK,QAApB,KAAK,IAAqB,IAAK;AAAA,EACpF,CAAC;AAEH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,aAAa,QAAQ,MAAM;AAAA,MAC/B,MAAK;AAAA,MACL;AAAA,MACC,GAAG;AAAA,MACJ,WAAW,SAAS;AAAA,MACpB,SAAS,SAAS;AAAA,MAClB,QAAQ,SAAS;AAAA,MACjB;AAAA,MAEC,gBAAM,SAAS,MAAM,WAAW,IAAI,CAAC,OAAO,oBAAC,YAAkB,MAAJ,EAAY,CAAE,IAAI,kBAAkB;AAAA;AAAA,EAClG;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { styled } from "@elliemae/ds-system";
|
|
3
|
+
import { DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_SLOTS } from "../constants/index.js";
|
|
4
|
+
const SLOTS = LEFT_NAVIGATION_TREE_SLOTS;
|
|
5
|
+
const name = DSLeftNavigationTreeName;
|
|
6
|
+
const StyledRoot = styled("nav", { name, slot: SLOTS.ROOT })`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
width: ${({ expanded, expandedWidth }) => expanded ? expandedWidth : "48px"};
|
|
10
|
+
transition: width ${({ expanded }) => expanded ? "ease-out" : "ease-in"} 350ms;
|
|
11
|
+
height: 100%;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
border: 1px solid ${({ theme }) => theme.colors.neutral[100]};
|
|
14
|
+
box-shadow: -1px 0 0 0 ${({ theme }) => theme.colors.neutral[100]};
|
|
15
|
+
background: ${({ theme }) => theme.colors.neutral["000"]};
|
|
16
|
+
`;
|
|
17
|
+
const StyledTree = styled("ul", { name, slot: SLOTS.TREE })`
|
|
18
|
+
list-style: none;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
${({ isHeaderContent, theme }) => isHeaderContent ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
|
|
23
|
+
`;
|
|
24
|
+
const StyledGroup = styled("ul", { name, slot: SLOTS.GROUP })`
|
|
25
|
+
list-style: none;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
`;
|
|
29
|
+
const StyledSectionContainer = styled("ul", { name, slot: SLOTS.SECTION_CONTAINER })`
|
|
30
|
+
list-style: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
`;
|
|
34
|
+
const StyledSectionLabel = styled("span", { name, slot: SLOTS.SECTION_LABEL })`
|
|
35
|
+
display: block;
|
|
36
|
+
padding: 8px 12px 4px;
|
|
37
|
+
font-size: 1rem;
|
|
38
|
+
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
39
|
+
color: ${({ theme }) => theme.colors.neutral[700]};
|
|
40
|
+
`;
|
|
41
|
+
const StyledItemSeparator = styled("div", { name, slot: SLOTS.ITEM_SEPARATOR })`
|
|
42
|
+
height: 1px;
|
|
43
|
+
margin: 4px 12px;
|
|
44
|
+
background: ${({ theme }) => theme.colors.neutral[100]};
|
|
45
|
+
`;
|
|
46
|
+
const StyledItem = styled("li", { name, slot: SLOTS.ITEM })`
|
|
47
|
+
list-style: none;
|
|
48
|
+
outline: none;
|
|
49
|
+
${({ isOpenSection, theme }) => isOpenSection ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
|
|
50
|
+
&:focus-visible > [data-row] {
|
|
51
|
+
outline: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
52
|
+
outline-offset: -2px;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
const StyledItemRow = styled("div", { name, slot: SLOTS.ITEM_ROW })`
|
|
56
|
+
/** Labels wrap: side content aligns to the first line (spec "date is pinned on the right side of the first line"). */
|
|
57
|
+
--row-first-line: ${({ isTall }) => isTall ? "24px" : "16px"};
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: flex-start;
|
|
60
|
+
column-gap: 8px;
|
|
61
|
+
min-height: ${({ isTall }) => isTall ? "48px" : "32px"};
|
|
62
|
+
padding-block: ${({ isTall }) => isTall ? "12px" : "8px"};
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
padding-left: ${({ rowPadding }) => `${rowPadding}px`};
|
|
65
|
+
${({ isSticky }) => isSticky ? "position: sticky; top: 0; z-index: 1;" : ""}
|
|
66
|
+
padding-right: 8px;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
background: ${({ isCurrent, theme }) => isCurrent ? theme.colors.brand[200] : theme.colors.neutral["000"]};
|
|
69
|
+
box-shadow: inset 4px 0 0 0
|
|
70
|
+
${({ isCurrent, isSelectedParent, theme }) => isCurrent || isSelectedParent ? theme.colors.brand[500] : "transparent"};
|
|
71
|
+
${({ isCurrent, theme }) => isCurrent ? `outline: 1px solid ${theme.colors.brand[500]}; outline-offset: -1px;` : ""}
|
|
72
|
+
&:hover {
|
|
73
|
+
background: ${({ theme }) => theme.colors.brand[200]};
|
|
74
|
+
box-shadow: inset 4px 0 0 0
|
|
75
|
+
${({ isCurrent, isSelectedParent, theme }) => isCurrent || isSelectedParent ? theme.colors.brand[500] : theme.colors.brand[300]};
|
|
76
|
+
}
|
|
77
|
+
`;
|
|
78
|
+
const StyledItemLabel = styled("span", { name, slot: SLOTS.ITEM_LABEL })`
|
|
79
|
+
font-size: ${({ isTall }) => isTall ? "1.0769rem" : "1rem"};
|
|
80
|
+
line-height: ${({ isTall }) => isTall ? "17px" : "16px"};
|
|
81
|
+
padding-block: ${({ isTall }) => isTall ? "3.5px" : "0"};
|
|
82
|
+
color: ${({ theme }) => theme.colors.neutral[800]};
|
|
83
|
+
word-break: ${({ labelOverflow }) => labelOverflow === "wrapAll" ? "break-all" : "normal"};
|
|
84
|
+
overflow-wrap: anywhere;
|
|
85
|
+
flex: 1;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
`;
|
|
88
|
+
const StyledLeftContainer = styled("span", { name, slot: SLOTS.LEFT_CONTAINER })`
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
min-height: var(--row-first-line, auto);
|
|
92
|
+
`;
|
|
93
|
+
const StyledCollapsedContainer = styled("span", { name, slot: SLOTS.COLLAPSED_CONTAINER })`
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
min-height: var(--row-first-line, auto);
|
|
98
|
+
`;
|
|
99
|
+
const StyledRightContainer = styled("span", { name, slot: SLOTS.RIGHT_CONTAINER })`
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
min-height: var(--row-first-line, auto);
|
|
103
|
+
`;
|
|
104
|
+
const StyledArrowContainer = styled("span", { name, slot: SLOTS.ARROW_CONTAINER })`
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
flex: none;
|
|
109
|
+
min-height: var(--row-first-line, auto);
|
|
110
|
+
${({ isLeading }) => isLeading ? "width: 16px; margin-inline-end: -8px;" : ""}
|
|
111
|
+
`;
|
|
112
|
+
const StyledHeaderDisclosure = styled("button", { name, slot: SLOTS.HEADER_DISCLOSURE })`
|
|
113
|
+
--row-first-line: 24px;
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
column-gap: 8px;
|
|
117
|
+
width: 100%;
|
|
118
|
+
min-height: 48px;
|
|
119
|
+
padding: 0 8px 0 12px;
|
|
120
|
+
border: none;
|
|
121
|
+
border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[100]};
|
|
122
|
+
background: ${({ theme }) => theme.colors.neutral["000"]};
|
|
123
|
+
box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => isOpen ? theme.colors.brand[500] : "transparent"};
|
|
124
|
+
text-align: left;
|
|
125
|
+
font-size: 1.0769rem;
|
|
126
|
+
color: ${({ theme }) => theme.colors.neutral[800]};
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
&:hover {
|
|
129
|
+
background: ${({ theme }) => theme.colors.brand[200]};
|
|
130
|
+
box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => isOpen ? theme.colors.brand[500] : theme.colors.brand[300]};
|
|
131
|
+
}
|
|
132
|
+
&:focus-visible {
|
|
133
|
+
outline: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
134
|
+
outline-offset: -2px;
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
137
|
+
const StyledFooterMenu = styled("div", { name, slot: SLOTS.FOOTER_MENU })`
|
|
138
|
+
display: grid;
|
|
139
|
+
grid-template-columns: ${({ expanded }) => expanded ? "1fr auto auto" : "1fr"};
|
|
140
|
+
align-items: center;
|
|
141
|
+
column-gap: 8px;
|
|
142
|
+
margin-top: auto;
|
|
143
|
+
min-height: 48px;
|
|
144
|
+
padding: 0 4px 0 12px;
|
|
145
|
+
border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
|
|
146
|
+
`;
|
|
147
|
+
const StyledFooterLabel = styled("span", { name, slot: SLOTS.FOOTER_LABEL })`
|
|
148
|
+
font-size: 11px;
|
|
149
|
+
line-height: 14px;
|
|
150
|
+
color: ${({ theme }) => theme.colors.neutral[500]};
|
|
151
|
+
`;
|
|
152
|
+
const StyledFooterSeparator = styled("span", { name, slot: SLOTS.FOOTER_SEPARATOR })`
|
|
153
|
+
width: 1px;
|
|
154
|
+
height: 16px;
|
|
155
|
+
background: ${({ theme }) => theme.colors.neutral[100]};
|
|
156
|
+
`;
|
|
157
|
+
const StyledFooterButton = styled("button", { name, slot: SLOTS.FOOTER_MENU_COLLAPSE })`
|
|
158
|
+
display: inline-flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
justify-content: center;
|
|
161
|
+
width: 32px;
|
|
162
|
+
height: 32px;
|
|
163
|
+
padding: 0;
|
|
164
|
+
border: none;
|
|
165
|
+
background: transparent;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
&:focus-visible {
|
|
168
|
+
outline: 2px solid ${({ theme }) => theme.colors.brand[700]};
|
|
169
|
+
}
|
|
170
|
+
`;
|
|
171
|
+
export {
|
|
172
|
+
StyledArrowContainer,
|
|
173
|
+
StyledCollapsedContainer,
|
|
174
|
+
StyledFooterButton,
|
|
175
|
+
StyledFooterLabel,
|
|
176
|
+
StyledFooterMenu,
|
|
177
|
+
StyledFooterSeparator,
|
|
178
|
+
StyledGroup,
|
|
179
|
+
StyledHeaderDisclosure,
|
|
180
|
+
StyledItem,
|
|
181
|
+
StyledItemLabel,
|
|
182
|
+
StyledItemRow,
|
|
183
|
+
StyledItemSeparator,
|
|
184
|
+
StyledLeftContainer,
|
|
185
|
+
StyledRightContainer,
|
|
186
|
+
StyledRoot,
|
|
187
|
+
StyledSectionContainer,
|
|
188
|
+
StyledSectionLabel,
|
|
189
|
+
StyledTree
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/styled.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport { styled } from '@elliemae/ds-system';\nimport { DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_SLOTS } from '../constants/index.js';\nimport type { DSLeftNavigationTreeT } from '../react-desc-prop-types.js';\n\nconst SLOTS = LEFT_NAVIGATION_TREE_SLOTS;\nconst name = DSLeftNavigationTreeName;\n\nexport const StyledRoot = styled('nav', { name, slot: SLOTS.ROOT })<{ expanded: boolean; expandedWidth: string }>`\n display: flex;\n flex-direction: column;\n width: ${({ expanded, expandedWidth }) => (expanded ? expandedWidth : '48px')};\n transition: width ${({ expanded }) => (expanded ? 'ease-out' : 'ease-in')} 350ms;\n height: 100%;\n overflow: hidden;\n border: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n box-shadow: -1px 0 0 0 ${({ theme }) => theme.colors.neutral[100]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n`;\n\nexport const StyledTree = styled('ul', { name, slot: SLOTS.TREE })<{ isHeaderContent: boolean }>`\n list-style: none;\n margin: 0;\n padding: 0;\n overflow-y: auto;\n ${({ isHeaderContent, theme }) =>\n isHeaderContent\n ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }`\n : ''}\n`;\n\nexport const StyledGroup = styled('ul', { name, slot: SLOTS.GROUP })`\n list-style: none;\n margin: 0;\n padding: 0;\n`;\n\nexport const StyledSectionContainer = styled('ul', { name, slot: SLOTS.SECTION_CONTAINER })`\n list-style: none;\n margin: 0;\n padding: 0;\n`;\n\nexport const StyledSectionLabel = styled('span', { name, slot: SLOTS.SECTION_LABEL })`\n display: block;\n padding: 8px 12px 4px;\n font-size: 1rem;\n font-weight: ${({ theme }) => theme.fontWeights.semibold};\n color: ${({ theme }) => theme.colors.neutral[700]};\n`;\n\nexport const StyledItemSeparator = styled('div', { name, slot: SLOTS.ITEM_SEPARATOR })`\n height: 1px;\n margin: 4px 12px;\n background: ${({ theme }) => theme.colors.neutral[100]};\n`;\n\n/**\n * The focus ring is drawn on the row of the focused treeitem only: the `li` holds the whole\n * expanded subtree, so an outline on it would surround every descendant row.\n */\nexport const StyledItem = styled('li', { name, slot: SLOTS.ITEM })<{ isOpenSection: boolean }>`\n list-style: none;\n outline: none;\n ${({ isOpenSection, theme }) =>\n isOpenSection ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ''}\n &:focus-visible > [data-row] {\n outline: 2px solid ${({ theme }) => theme.colors.brand[700]};\n outline-offset: -2px;\n }\n`;\n\nexport const StyledItemRow = styled('div', { name, slot: SLOTS.ITEM_ROW })<{\n rowPadding: number;\n isTall: boolean;\n isSticky: boolean;\n isCurrent: boolean;\n isSelectedParent: boolean;\n}>`\n /** Labels wrap: side content aligns to the first line (spec \"date is pinned on the right side of the first line\"). */\n --row-first-line: ${({ isTall }) => (isTall ? '24px' : '16px')};\n display: flex;\n align-items: flex-start;\n column-gap: 8px;\n min-height: ${({ isTall }) => (isTall ? '48px' : '32px')};\n padding-block: ${({ isTall }) => (isTall ? '12px' : '8px')};\n box-sizing: border-box;\n padding-left: ${({ rowPadding }) => `${rowPadding}px`};\n ${({ isSticky }) => (isSticky ? 'position: sticky; top: 0; z-index: 1;' : '')}\n padding-right: 8px;\n cursor: pointer;\n background: ${({ isCurrent, theme }) => (isCurrent ? theme.colors.brand[200] : theme.colors.neutral['000'])};\n box-shadow: inset 4px 0 0 0\n ${({ isCurrent, isSelectedParent, theme }) =>\n isCurrent || isSelectedParent ? theme.colors.brand[500] : 'transparent'};\n ${({ isCurrent, theme }) => (isCurrent ? `outline: 1px solid ${theme.colors.brand[500]}; outline-offset: -1px;` : '')}\n &:hover {\n background: ${({ theme }) => theme.colors.brand[200]};\n box-shadow: inset 4px 0 0 0\n ${({ isCurrent, isSelectedParent, theme }) =>\n isCurrent || isSelectedParent ? theme.colors.brand[500] : theme.colors.brand[300]};\n }\n`;\n\nexport const StyledItemLabel = styled('span', { name, slot: SLOTS.ITEM_LABEL })<{\n isTall: boolean;\n labelOverflow: DSLeftNavigationTreeT.LabelOverflowT;\n}>`\n font-size: ${({ isTall }) => (isTall ? '1.0769rem' : '1rem')};\n line-height: ${({ isTall }) => (isTall ? '17px' : '16px')};\n padding-block: ${({ isTall }) => (isTall ? '3.5px' : '0')};\n color: ${({ theme }) => theme.colors.neutral[800]};\n word-break: ${({ labelOverflow }) => (labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n overflow-wrap: anywhere;\n flex: 1;\n min-width: 0;\n`;\n\nexport const StyledLeftContainer = styled('span', { name, slot: SLOTS.LEFT_CONTAINER })`\n display: inline-flex;\n align-items: center;\n min-height: var(--row-first-line, auto);\n`;\n\nexport const StyledCollapsedContainer = styled('span', { name, slot: SLOTS.COLLAPSED_CONTAINER })`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-height: var(--row-first-line, auto);\n`;\n\nexport const StyledRightContainer = styled('span', { name, slot: SLOTS.RIGHT_CONTAINER })`\n display: inline-flex;\n align-items: center;\n min-height: var(--row-first-line, auto);\n`;\n\nexport const StyledArrowContainer = styled('span', { name, slot: SLOTS.ARROW_CONTAINER })<{ isLeading: boolean }>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n min-height: var(--row-first-line, auto);\n ${({ isLeading }) => (isLeading ? 'width: 16px; margin-inline-end: -8px;' : '')}\n`;\n\nexport const StyledHeaderDisclosure = styled('button', { name, slot: SLOTS.HEADER_DISCLOSURE })<{\n isRail: boolean;\n isOpen: boolean;\n}>`\n --row-first-line: 24px;\n display: flex;\n align-items: center;\n column-gap: 8px;\n width: 100%;\n min-height: 48px;\n padding: 0 8px 0 12px;\n border: none;\n border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n background: ${({ theme }) => theme.colors.neutral['000']};\n box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => (isOpen ? theme.colors.brand[500] : 'transparent')};\n text-align: left;\n font-size: 1.0769rem;\n color: ${({ theme }) => theme.colors.neutral[800]};\n cursor: pointer;\n &:hover {\n background: ${({ theme }) => theme.colors.brand[200]};\n box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => (isOpen ? theme.colors.brand[500] : theme.colors.brand[300])};\n }\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand[700]};\n outline-offset: -2px;\n }\n`;\nexport const StyledFooterMenu = styled('div', { name, slot: SLOTS.FOOTER_MENU })<{ expanded: boolean }>`\n display: grid;\n grid-template-columns: ${({ expanded }) => (expanded ? '1fr auto auto' : '1fr')};\n align-items: center;\n column-gap: 8px;\n margin-top: auto;\n min-height: 48px;\n padding: 0 4px 0 12px;\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n`;\n\nexport const StyledFooterLabel = styled('span', { name, slot: SLOTS.FOOTER_LABEL })`\n font-size: 11px;\n line-height: 14px;\n color: ${({ theme }) => theme.colors.neutral[500]};\n`;\n\nexport const StyledFooterSeparator = styled('span', { name, slot: SLOTS.FOOTER_SEPARATOR })`\n width: 1px;\n height: 16px;\n background: ${({ theme }) => theme.colors.neutral[100]};\n`;\n\nexport const StyledFooterButton = styled('button', { name, slot: SLOTS.FOOTER_MENU_COLLAPSE })`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand[700]};\n }\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,cAAc;AACvB,SA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
+
describe,
|
|
5
|
+
getPropsPerSlotPropTypes,
|
|
6
|
+
globalAttributesPropTypes,
|
|
7
|
+
xstyledPropTypes
|
|
8
|
+
} from "@elliemae/ds-props-helpers";
|
|
9
|
+
import {
|
|
10
|
+
DSLeftNavigationTreeName,
|
|
11
|
+
LEFT_NAVIGATION_TREE_ITEM_TYPES,
|
|
12
|
+
LEFT_NAVIGATION_TREE_SLOTS
|
|
13
|
+
} from "./constants/index.js";
|
|
14
|
+
const noop = () => null;
|
|
15
|
+
const defaultProps = {
|
|
16
|
+
items: [],
|
|
17
|
+
expanded: false,
|
|
18
|
+
expandedWidth: "240px",
|
|
19
|
+
labelOverflow: "wrap",
|
|
20
|
+
footerLabel: "",
|
|
21
|
+
disableDefaultSelection: false,
|
|
22
|
+
openedItem: null,
|
|
23
|
+
onItemClick: noop,
|
|
24
|
+
onItemOpenedChange: noop,
|
|
25
|
+
onSelectedChange: noop,
|
|
26
|
+
onFocusChange: noop,
|
|
27
|
+
onFooterExpand: noop,
|
|
28
|
+
onFooterClose: noop
|
|
29
|
+
};
|
|
30
|
+
const DSLeftNavigationTreePropTypes = {
|
|
31
|
+
...getPropsPerSlotPropTypes(DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_SLOTS),
|
|
32
|
+
...globalAttributesPropTypes,
|
|
33
|
+
...xstyledPropTypes,
|
|
34
|
+
items: PropTypes.arrayOf(PropTypes.object).description(
|
|
35
|
+
"The navigation tree with its full hierarchy: parents and sections hold their children in itemOpts.items. Children that are not in the data cannot be reached"
|
|
36
|
+
).defaultValue([]),
|
|
37
|
+
expanded: PropTypes.bool.description("Whether the panel is expanded or collapsed to the icon-only rail").defaultValue(false),
|
|
38
|
+
expandedWidth: PropTypes.string.description("Width of the panel when expanded").defaultValue("240px"),
|
|
39
|
+
labelOverflow: PropTypes.oneOf(["wrap", "wrapAll"]).description("How labels wrap").defaultValue("wrap"),
|
|
40
|
+
footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description("Text shown in the footer next to the collapse button").defaultValue(""),
|
|
41
|
+
selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([null])]).description(
|
|
42
|
+
'Id of the current page, exposed as aria-current="page" (aria-selected is never set). null means no current page; undefined lets the component track it'
|
|
43
|
+
),
|
|
44
|
+
selectedParent: PropTypes.string.description(
|
|
45
|
+
"Id of the item that shows the selected-parent indicator. When undefined, every ancestor of the current page shows it"
|
|
46
|
+
),
|
|
47
|
+
disableDefaultSelection: PropTypes.bool.description("Whether opening a parent should only expand it, without making its first page the current page").defaultValue(false),
|
|
48
|
+
HeaderComponent: PropTypes.object.description(
|
|
49
|
+
"Item rendered as the header disclosure button above the tree. While it is open, pass its content as items (selecting its first item is up to you), and clear openedItem when the panel collapses so the rail shows your root items. Only dsId, label, CollapsedComponent, RightComponent and labelOverflow are used"
|
|
50
|
+
),
|
|
51
|
+
openedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([null])]).description("Id of the header item when the header is open. Other ids are ignored").defaultValue(null),
|
|
52
|
+
onItemClick: PropTypes.func.description(
|
|
53
|
+
"Called when an item or the header is activated with click, Enter or Space. In the collapsed rail, expand the panel from here when the item is a parent. After a page activation, move focus to your content if needed; after a parent activation, leave focus on the parent"
|
|
54
|
+
).signature("((item: DSLeftNavigationTreeT.Item, e: React.MouseEvent | React.KeyboardEvent) => void)").defaultValue(() => null),
|
|
55
|
+
onItemOpenedChange: PropTypes.func.description("Called when a parent requests to open or close").signature(
|
|
56
|
+
"((item: DSLeftNavigationTreeT.Item, nextIsOpened: boolean, e: React.MouseEvent | React.KeyboardEvent) => void)"
|
|
57
|
+
).defaultValue(() => null),
|
|
58
|
+
onSelectedChange: PropTypes.func.description("Called with the id of the item that becomes the current page").signature("((id: string) => void)").defaultValue(() => null),
|
|
59
|
+
onFocusChange: PropTypes.func.description("Called with the id of the item that receives focus").signature("((id: string) => void)").defaultValue(() => null),
|
|
60
|
+
onFooterExpand: PropTypes.func.description("Called when the footer button expands the panel").signature("((e: React.MouseEvent | React.KeyboardEvent) => void)").defaultValue(() => null),
|
|
61
|
+
onFooterClose: PropTypes.func.description("Called when the footer button collapses the panel. Clear openedItem here if the header is open").signature("((e: React.MouseEvent | React.KeyboardEvent) => void)").defaultValue(() => null)
|
|
62
|
+
};
|
|
63
|
+
const DSLeftNavigationTreePropTypesSchema = DSLeftNavigationTreePropTypes;
|
|
64
|
+
const itemTypes = Object.values(LEFT_NAVIGATION_TREE_ITEM_TYPES);
|
|
65
|
+
const DSLeftNavigationTreeItemPropTypes = {
|
|
66
|
+
dsId: PropTypes.string.description("Unique identifier of the item").isRequired,
|
|
67
|
+
type: PropTypes.oneOf(itemTypes).description("Item type: leaf, parent, section or separator").isRequired,
|
|
68
|
+
CollapsedComponent: PropTypes.func.description(
|
|
69
|
+
"Icon rendered next to the label and alone in the collapsed rail; root items without it do not appear in the rail. Receives { item }"
|
|
70
|
+
).signature("React.ComponentType<{ item: DSLeftNavigationTreeT.Item }>"),
|
|
71
|
+
itemOpts: PropTypes.object.description("Item options")
|
|
72
|
+
};
|
|
73
|
+
const DSLeftNavigationTreeItemOptsPropTypes = {
|
|
74
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description(
|
|
75
|
+
"Visible label and accessible name of the item. Type-ahead only matches labels passed as strings"
|
|
76
|
+
),
|
|
77
|
+
items: PropTypes.arrayOf(PropTypes.object).description("Children of a parent or a section"),
|
|
78
|
+
isOpened: PropTypes.bool.description(
|
|
79
|
+
"Controlled open state of a parent. When defined, the component only requests changes through onItemOpenedChange. Keep it defined (or undefined) for the whole life of the item"
|
|
80
|
+
),
|
|
81
|
+
startOpened: PropTypes.bool.description("Open state of an uncontrolled parent until the user opens or closes it"),
|
|
82
|
+
selectable: PropTypes.bool.description("Whether the leaf can become the current page").defaultValue(true),
|
|
83
|
+
labelOverflow: PropTypes.oneOf(["wrap", "wrapAll"]).description("Overrides the component labelOverflow"),
|
|
84
|
+
RightComponent: PropTypes.func.description(
|
|
85
|
+
"Non-interactive content after the label, exposed as the item description, so it must contain text (give an icon-only badge a visually hidden text). Receives { item }"
|
|
86
|
+
).signature("React.ComponentType<{ item: DSLeftNavigationTreeT.Item }>")
|
|
87
|
+
};
|
|
88
|
+
const LeftNavigationTreeItem = () => null;
|
|
89
|
+
LeftNavigationTreeItem.displayName = "LeftNavigationTreeItem";
|
|
90
|
+
const DSLeftNavigationTreeItemSchema = describe(LeftNavigationTreeItem);
|
|
91
|
+
DSLeftNavigationTreeItemSchema.propTypes = DSLeftNavigationTreeItemPropTypes;
|
|
92
|
+
const LeftNavigationTreeItemOpts = () => null;
|
|
93
|
+
LeftNavigationTreeItemOpts.displayName = "LeftNavigationTreeItemOpts";
|
|
94
|
+
const DSLeftNavigationTreeItemOptsSchema = describe(LeftNavigationTreeItemOpts);
|
|
95
|
+
DSLeftNavigationTreeItemOptsSchema.propTypes = DSLeftNavigationTreeItemOptsPropTypes;
|
|
96
|
+
export {
|
|
97
|
+
DSLeftNavigationTreeItemOptsPropTypes,
|
|
98
|
+
DSLeftNavigationTreeItemOptsSchema,
|
|
99
|
+
DSLeftNavigationTreeItemPropTypes,
|
|
100
|
+
DSLeftNavigationTreeItemSchema,
|
|
101
|
+
DSLeftNavigationTreePropTypes,
|
|
102
|
+
DSLeftNavigationTreePropTypesSchema,
|
|
103
|
+
defaultProps
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable @typescript-eslint/no-empty-interface */\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema, ValidationMap } from '@elliemae/ds-props-helpers';\nimport {\n PropTypes,\n describe,\n getPropsPerSlotPropTypes,\n globalAttributesPropTypes,\n xstyledPropTypes,\n} from '@elliemae/ds-props-helpers';\nimport { type TypescriptHelpersT } from '@elliemae/ds-typescript-helpers';\nimport type { ZustandT } from '@elliemae/ds-zustand-helpers';\nimport {\n DSLeftNavigationTreeName,\n LEFT_NAVIGATION_TREE_ITEM_TYPES,\n LEFT_NAVIGATION_TREE_SLOTS,\n} from './constants/index.js';\nimport type { LEFT_NAVIGATION_TREE_REGION_FOCUSES } from './constants/index.js';\nimport type { useAutoCalculated } from './config/useAutoCalculated.js';\n\nexport declare namespace DSLeftNavigationTreeT {\n export type ItemType = (typeof LEFT_NAVIGATION_TREE_ITEM_TYPES)[keyof typeof LEFT_NAVIGATION_TREE_ITEM_TYPES];\n\n export type LabelOverflowT = 'wrap' | 'wrapAll';\n\n export type InteractionEvent = React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>;\n\n export interface ItemComponentProps {\n item: Item;\n }\n\n export interface ItemOpts {\n label?: string | JSX.Element;\n items?: readonly Item[];\n isOpened?: boolean;\n startOpened?: boolean;\n selectable?: boolean;\n labelOverflow?: LabelOverflowT;\n RightComponent?: React.ComponentType<ItemComponentProps>;\n }\n\n export interface Item {\n dsId: string;\n type: ItemType;\n CollapsedComponent?: React.ComponentType<ItemComponentProps> | null;\n itemOpts?: ItemOpts;\n }\n\n export interface RequiredProps {}\n\n export interface DefaultProps {\n items: readonly Item[];\n expanded: boolean;\n expandedWidth: string;\n labelOverflow: LabelOverflowT;\n footerLabel: React.ReactNode;\n disableDefaultSelection: boolean;\n openedItem: string | null;\n onItemClick: (item: Item, e: InteractionEvent) => void;\n onItemOpenedChange: (item: Item, nextIsOpened: boolean, e: InteractionEvent) => void;\n onSelectedChange: (id: string) => void;\n onFocusChange: (id: string) => void;\n onFooterExpand: (e: InteractionEvent) => void;\n onFooterClose: (e: InteractionEvent) => void;\n }\n\n export interface OptionalProps extends TypescriptHelpersT.PropsForGlobalOnSlots<\n typeof DSLeftNavigationTreeName,\n typeof LEFT_NAVIGATION_TREE_SLOTS\n > {\n selectedItem?: string | null;\n selectedParent?: string;\n HeaderComponent?: Item;\n }\n\n export interface Props\n extends\n Partial<DefaultProps>,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface InternalProps\n extends\n DefaultProps,\n OptionalProps,\n Omit<GlobalAttributesT<HTMLElement>, keyof DefaultProps | keyof XstyledProps>,\n XstyledProps,\n RequiredProps {}\n\n export interface ItemSlotArguments {\n item: Item;\n level: number;\n isOpen: boolean;\n isCurrent: boolean;\n }\n\n export type SlotFunctionArguments = {\n dsLeftnavigationtreeRoot: () => object;\n dsLeftnavigationtreeTree: () => object;\n dsLeftnavigationtreeItem: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeItemRow: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeItemLabel: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeLeftContainer: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeCollapsedContainer: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeRightContainer: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeArrowContainer: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeGroup: (args: ItemSlotArguments) => object;\n dsLeftnavigationtreeSectionContainer: () => object;\n dsLeftnavigationtreeSectionLabel: () => object;\n dsLeftnavigationtreeItemSeparator: () => object;\n dsLeftnavigationtreeHeaderDisclosure: () => object;\n dsLeftnavigationtreeFooterMenu: () => object;\n dsLeftnavigationtreeFooterLabel: () => object;\n dsLeftnavigationtreeFooterSeparator: () => object;\n dsLeftnavigationtreeFooterMenuCollapse: () => object;\n };\n\n export type FocusRegion =\n (typeof LEFT_NAVIGATION_TREE_REGION_FOCUSES)[keyof typeof LEFT_NAVIGATION_TREE_REGION_FOCUSES];\n\n export type InternalAtoms = {\n focusRegion: FocusRegion;\n focusedItemId: string | null;\n toggles: Record<string, boolean>;\n internalSelectedItem: string | null;\n };\n\n export type UseAutoCalculatedT = ReturnType<typeof useAutoCalculated>;\n\n export type Selectors = Record<string, never>;\n export type Reducers = Record<string, never>;\n export type InternalStore = ZustandT.InternalStore<InternalAtoms, Selectors, Reducers>;\n}\n\nconst noop = () => null;\n\nexport const defaultProps: DSLeftNavigationTreeT.DefaultProps = {\n items: [],\n expanded: false,\n expandedWidth: '240px',\n labelOverflow: 'wrap',\n footerLabel: '',\n disableDefaultSelection: false,\n openedItem: null,\n onItemClick: noop,\n onItemOpenedChange: noop,\n onSelectedChange: noop,\n onFocusChange: noop,\n onFooterExpand: noop,\n onFooterClose: noop,\n};\n\nexport const DSLeftNavigationTreePropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.Props> = {\n ...getPropsPerSlotPropTypes(DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_SLOTS),\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n items: PropTypes.arrayOf(PropTypes.object)\n .description(\n 'The navigation tree with its full hierarchy: parents and sections hold their children in itemOpts.items. Children that are not in the data cannot be reached',\n )\n .defaultValue([]),\n expanded: PropTypes.bool\n .description('Whether the panel is expanded or collapsed to the icon-only rail')\n .defaultValue(false),\n expandedWidth: PropTypes.string.description('Width of the panel when expanded').defaultValue('240px'),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrapAll']).description('How labels wrap').defaultValue('wrap'),\n footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string])\n .description('Text shown in the footer next to the collapse button')\n .defaultValue(''),\n selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([null])]).description(\n 'Id of the current page, exposed as aria-current=\"page\" (aria-selected is never set). null means no current page; undefined lets the component track it',\n ),\n selectedParent: PropTypes.string.description(\n 'Id of the item that shows the selected-parent indicator. When undefined, every ancestor of the current page shows it',\n ),\n disableDefaultSelection: PropTypes.bool\n .description('Whether opening a parent should only expand it, without making its first page the current page')\n .defaultValue(false),\n HeaderComponent: PropTypes.object.description(\n 'Item rendered as the header disclosure button above the tree. While it is open, pass its content as items (selecting its first item is up to you), and clear openedItem when the panel collapses so the rail shows your root items. Only dsId, label, CollapsedComponent, RightComponent and labelOverflow are used',\n ),\n openedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([null])])\n .description('Id of the header item when the header is open. Other ids are ignored')\n .defaultValue(null),\n onItemClick: PropTypes.func\n .description(\n 'Called when an item or the header is activated with click, Enter or Space. In the collapsed rail, expand the panel from here when the item is a parent. After a page activation, move focus to your content if needed; after a parent activation, leave focus on the parent',\n )\n .signature('((item: DSLeftNavigationTreeT.Item, e: React.MouseEvent | React.KeyboardEvent) => void)')\n .defaultValue(() => null),\n onItemOpenedChange: PropTypes.func\n .description('Called when a parent requests to open or close')\n .signature(\n '((item: DSLeftNavigationTreeT.Item, nextIsOpened: boolean, e: React.MouseEvent | React.KeyboardEvent) => void)',\n )\n .defaultValue(() => null),\n onSelectedChange: PropTypes.func\n .description('Called with the id of the item that becomes the current page')\n .signature('((id: string) => void)')\n .defaultValue(() => null),\n onFocusChange: PropTypes.func\n .description('Called with the id of the item that receives focus')\n .signature('((id: string) => void)')\n .defaultValue(() => null),\n onFooterExpand: PropTypes.func\n .description('Called when the footer button expands the panel')\n .signature('((e: React.MouseEvent | React.KeyboardEvent) => void)')\n .defaultValue(() => null),\n onFooterClose: PropTypes.func\n .description('Called when the footer button collapses the panel. Clear openedItem here if the header is open')\n .signature('((e: React.MouseEvent | React.KeyboardEvent) => void)')\n .defaultValue(() => null),\n};\n\nexport const DSLeftNavigationTreePropTypesSchema =\n DSLeftNavigationTreePropTypes as unknown as ValidationMap<DSLeftNavigationTreeT.Props>;\n\nconst itemTypes = Object.values(LEFT_NAVIGATION_TREE_ITEM_TYPES);\n\nexport const DSLeftNavigationTreeItemPropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.Item> = {\n dsId: PropTypes.string.description('Unique identifier of the item').isRequired,\n type: PropTypes.oneOf(itemTypes).description('Item type: leaf, parent, section or separator').isRequired,\n CollapsedComponent: PropTypes.func\n .description(\n 'Icon rendered next to the label and alone in the collapsed rail; root items without it do not appear in the rail. Receives { item }',\n )\n .signature('React.ComponentType<{ item: DSLeftNavigationTreeT.Item }>'),\n itemOpts: PropTypes.object.description('Item options'),\n};\n\nexport const DSLeftNavigationTreeItemOptsPropTypes: DSPropTypesSchema<DSLeftNavigationTreeT.ItemOpts> = {\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).description(\n 'Visible label and accessible name of the item. Type-ahead only matches labels passed as strings',\n ),\n items: PropTypes.arrayOf(PropTypes.object).description('Children of a parent or a section'),\n isOpened: PropTypes.bool.description(\n 'Controlled open state of a parent. When defined, the component only requests changes through onItemOpenedChange. Keep it defined (or undefined) for the whole life of the item',\n ),\n startOpened: PropTypes.bool.description('Open state of an uncontrolled parent until the user opens or closes it'),\n selectable: PropTypes.bool.description('Whether the leaf can become the current page').defaultValue(true),\n labelOverflow: PropTypes.oneOf(['wrap', 'wrapAll']).description('Overrides the component labelOverflow'),\n RightComponent: PropTypes.func\n .description(\n 'Non-interactive content after the label, exposed as the item description, so it must contain text (give an icon-only badge a visually hidden text). Receives { item }',\n )\n .signature('React.ComponentType<{ item: DSLeftNavigationTreeT.Item }>'),\n};\n\nconst LeftNavigationTreeItem = () => null;\nLeftNavigationTreeItem.displayName = 'LeftNavigationTreeItem';\nexport const DSLeftNavigationTreeItemSchema = describe(LeftNavigationTreeItem);\nDSLeftNavigationTreeItemSchema.propTypes =\n DSLeftNavigationTreeItemPropTypes as unknown as ValidationMap<DSLeftNavigationTreeT.Item>;\n\nconst LeftNavigationTreeItemOpts = () => null;\nLeftNavigationTreeItemOpts.displayName = 'LeftNavigationTreeItemOpts';\nexport const DSLeftNavigationTreeItemOptsSchema = describe(LeftNavigationTreeItemOpts);\nDSLeftNavigationTreeItemOptsSchema.propTypes =\n DSLeftNavigationTreeItemOptsPropTypes as unknown as ValidationMap<DSLeftNavigationTreeT.ItemOpts>;\n"],
|
|
5
|
+
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