@elliemae/ds-left-navigation-tree 3.80.0-next.67 → 3.80.0-next.69

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.
@@ -34,7 +34,6 @@ module.exports = __toCommonJS(RailItem_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = __toESM(require("react"));
37
- var import_treeModel = require("../config/treeModel.js");
38
37
  var import_useTreeModel = require("../config/useTreeModel.js");
39
38
  var import_TreeContext = require("./TreeContext.js");
40
39
  var import_styled = require("./styled.js");
@@ -77,7 +76,8 @@ const RailItem = import_react.default.memo(({ id }) => {
77
76
  import_styled.StyledItemRow,
78
77
  {
79
78
  "data-row": true,
80
- rowPadding: import_treeModel.ROW_PADDING,
79
+ rowPadding: 0,
80
+ isRailRow: true,
81
81
  isTall: true,
82
82
  isSticky: false,
83
83
  isCurrent,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/RailItem.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback, useContext } from 'react';\nimport { ROW_PADDING } from '../config/treeModel.js';\nimport { useItemFocusState } from '../config/useTreeModel.js';\nimport { TreeContext } from './TreeContext.js';\nimport { StyledCollapsedContainer, StyledItem, StyledItemLabel, StyledItemRow } from './styled.js';\n\nconst HIDDEN_LABEL_STYLE = { display: 'none' };\n\n/**\n * Collapsed-rail node: an icon-only end treeitem. The label stays in the DOM with display: none\n * because it is the aria-labelledby target (hidden targets still name the element, and are not read twice).\n */\nexport const RailItem = React.memo(({ id }: { id: string }) => {\n const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);\n const info = model.index.get(id);\n const isCurrent = model.currentLeafId === id;\n const isSelectedParent = model.selectedParentIds.has(id);\n const focusState = useItemFocusState(model, id);\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(() => ({ item, level: 1, isOpen: false, isCurrent }), [item, isCurrent]);\n\n if (!info || !item?.CollapsedComponent) return null;\n const { CollapsedComponent } = item;\n const labelId = getElementId('label', id);\n\n return (\n <StyledItem\n isOpenSection={false}\n role=\"treeitem\"\n aria-level={1}\n aria-current={isCurrent ? 'page' : undefined}\n aria-labelledby={labelId}\n tabIndex={focusState === 'none' ? -1 : 0}\n data-dsid={id}\n data-type={item.type}\n data-selected={isCurrent}\n data-selectedparent={isSelectedParent}\n innerRef={focusRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledItemRow\n data-row\n rowPadding={ROW_PADDING}\n isTall\n isSticky={false}\n isCurrent={isCurrent}\n isSelectedParent={isSelectedParent}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCollapsedContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <CollapsedComponent item={item} />\n </StyledCollapsedContainer>\n <StyledItemLabel\n id={labelId}\n isTall\n labelOverflow={labelOverflow}\n style={HIDDEN_LABEL_STYLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {item.itemOpts?.label}\n </StyledItemLabel>\n </StyledItemRow>\n </StyledItem>\n );\n});\n\nRailItem.displayName = 'DSLeftNavigationTree.RailItem';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiDjB;AAjDN,mBAA+C;AAC/C,uBAA4B;AAC5B,0BAAkC;AAClC,yBAA4B;AAC5B,oBAAqF;AAErF,MAAM,qBAAqB,EAAE,SAA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UACA;AAAA,UAEA;AAAA,wDAAC,0CAAyB,eAA8B,wBACtD,sDAAC,sBAAmB,MAAY,GAClC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI;AAAA,gBACJ,QAAM;AAAA,gBACN;AAAA,gBACA,OAAO;AAAA,gBACP;AAAA,gBACA;AAAA,gBAEC,eAAK,UAAU;AAAA;AAAA,YAClB;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,SAAS,cAAc;",
4
+ "sourcesContent": ["import React, { useCallback, useContext } from 'react';\nimport { useItemFocusState } from '../config/useTreeModel.js';\nimport { TreeContext } from './TreeContext.js';\nimport { StyledCollapsedContainer, StyledItem, StyledItemLabel, StyledItemRow } from './styled.js';\n\nconst HIDDEN_LABEL_STYLE = { display: 'none' };\n\n/**\n * Collapsed-rail node: an icon-only end treeitem. The label stays in the DOM with display: none\n * because it is the aria-labelledby target (hidden targets still name the element, and are not read twice).\n */\nexport const RailItem = React.memo(({ id }: { id: string }) => {\n const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);\n const info = model.index.get(id);\n const isCurrent = model.currentLeafId === id;\n const isSelectedParent = model.selectedParentIds.has(id);\n const focusState = useItemFocusState(model, id);\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(() => ({ item, level: 1, isOpen: false, isCurrent }), [item, isCurrent]);\n\n if (!info || !item?.CollapsedComponent) return null;\n const { CollapsedComponent } = item;\n const labelId = getElementId('label', id);\n\n return (\n <StyledItem\n isOpenSection={false}\n role=\"treeitem\"\n aria-level={1}\n aria-current={isCurrent ? 'page' : undefined}\n aria-labelledby={labelId}\n tabIndex={focusState === 'none' ? -1 : 0}\n data-dsid={id}\n data-type={item.type}\n data-selected={isCurrent}\n data-selectedparent={isSelectedParent}\n innerRef={focusRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledItemRow\n data-row\n rowPadding={0}\n isRailRow\n isTall\n isSticky={false}\n isCurrent={isCurrent}\n isSelectedParent={isSelectedParent}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCollapsedContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <CollapsedComponent item={item} />\n </StyledCollapsedContainer>\n <StyledItemLabel\n id={labelId}\n isTall\n labelOverflow={labelOverflow}\n style={HIDDEN_LABEL_STYLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {item.itemOpts?.label}\n </StyledItemLabel>\n </StyledItemRow>\n </StyledItem>\n );\n});\n\nRailItem.displayName = 'DSLeftNavigationTree.RailItem';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADgDjB;AAhDN,mBAA+C;AAC/C,0BAAkC;AAClC,yBAA4B;AAC5B,oBAAqF;AAErF,MAAM,qBAAqB,EAAE,SAAS,OAAO;AAMtC,MAAM,WAAW,aAAAA,QAAM,KAAK,CAAC,EAAE,GAAG,MAAsB;AAC7D,QAAM,EAAE,OAAO,UAAU,eAAe,eAAe,aAAa,QAAI,yBAAW,8BAAW;AAC9F,QAAM,OAAO,MAAM,MAAM,IAAI,EAAE;AAC/B,QAAM,YAAY,MAAM,kBAAkB;AAC1C,QAAM,mBAAmB,MAAM,kBAAkB,IAAI,EAAE;AACvD,QAAM,iBAAa,uCAAkB,OAAO,EAAE;AAC9C,QAAM,OAAO,MAAM;AAEnB,QAAM,eAAW;AAAA,IACf,CAAC,SAA6B;AAC5B,UAAI,QAAQ,eAAe,eAAgB,MAAK,MAAM;AAAA,IACxD;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AACA,QAAM,kBAAc,0BAAY,CAAC,MAAqC,SAAS,SAAS,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;AAC9G,QAAM,6BAAyB,0BAAY,OAAO,EAAE,MAAM,OAAO,GAAG,QAAQ,OAAO,UAAU,IAAI,CAAC,MAAM,SAAS,CAAC;AAElH,MAAI,CAAC,QAAQ,CAAC,MAAM,mBAAoB,QAAO;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,UAAU,aAAa,SAAS,EAAE;AAExC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe;AAAA,MACf,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,gBAAc,YAAY,SAAS;AAAA,MACnC,mBAAiB;AAAA,MACjB,UAAU,eAAe,SAAS,KAAK;AAAA,MACvC,aAAW;AAAA,MACX,aAAW,KAAK;AAAA,MAChB,iBAAe;AAAA,MACf,uBAAqB;AAAA,MACrB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,YAAQ;AAAA,UACR,YAAY;AAAA,UACZ,WAAS;AAAA,UACT,QAAM;AAAA,UACN,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT;AAAA,UACA;AAAA,UAEA;AAAA,wDAAC,0CAAyB,eAA8B,wBACtD,sDAAC,sBAAmB,MAAY,GAClC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI;AAAA,gBACJ,QAAM;AAAA,gBACN;AAAA,gBACA,OAAO;AAAA,gBACP;AAAA,gBACA;AAAA,gBAEC,eAAK,UAAU;AAAA;AAAA,YAClB;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,SAAS,cAAc;",
6
6
  "names": ["React"]
7
7
  }
@@ -53,14 +53,26 @@ var import_ds_system = require("@elliemae/ds-system");
53
53
  var import_constants = require("../constants/index.js");
54
54
  const SLOTS = import_constants.LEFT_NAVIGATION_TREE_SLOTS;
55
55
  const name = import_constants.DSLeftNavigationTreeName;
56
+ const ABSOLUTE_LENGTH = /^\s*(\d+|\d*\.\d+)(px|rem|vw|vh|vmin|vmax)\s*$/;
57
+ const ROOT_BORDER = 1;
58
+ const ROOT_BORDER_TOTAL = `${ROOT_BORDER * 2}px`;
59
+ const getContentWidth = (expanded, expandedWidth) => {
60
+ if (!expanded) return `calc(48px - ${ROOT_BORDER_TOTAL})`;
61
+ return ABSOLUTE_LENGTH.test(expandedWidth) ? `calc(${expandedWidth} - ${ROOT_BORDER_TOTAL})` : "100%";
62
+ };
56
63
  const StyledRoot = (0, import_ds_system.styled)("nav", { name, slot: SLOTS.ROOT })`
57
64
  display: flex;
58
65
  flex-direction: column;
66
+ box-sizing: border-box;
59
67
  width: ${({ expanded, expandedWidth }) => expanded ? expandedWidth : "48px"};
68
+ && > * {
69
+ box-sizing: border-box;
70
+ width: ${({ expanded, expandedWidth }) => getContentWidth(expanded, expandedWidth)};
71
+ }
60
72
  transition: width ${({ expanded }) => expanded ? "ease-out" : "ease-in"} 350ms;
61
73
  height: 100%;
62
74
  overflow: hidden;
63
- border: 1px solid ${({ theme }) => theme.colors.neutral[100]};
75
+ border: ${ROOT_BORDER}px solid ${({ theme }) => theme.colors.neutral[100]};
64
76
  box-shadow: -1px 0 0 0 ${({ theme }) => theme.colors.neutral[100]};
65
77
  background: ${({ theme }) => theme.colors.neutral["000"]};
66
78
  `;
@@ -69,7 +81,13 @@ const StyledTree = (0, import_ds_system.styled)("ul", { name, slot: SLOTS.TREE }
69
81
  margin: 0;
70
82
  padding: 0;
71
83
  overflow-y: auto;
72
- ${({ isHeaderContent, theme }) => isHeaderContent ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
84
+ /**
85
+ * While the header is open the bar runs the full height of the list, like in LeftNavigation. The rows draw it on
86
+ * themselves, but the section labels and the separators are not rows: the list paints it behind them, so the bar has
87
+ * no gaps. The rows keep their own bar because their background covers the one of the list.
88
+ */
89
+ ${({ isHeaderContent, theme }) => isHeaderContent ? `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]};
90
+ & [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
73
91
  `;
74
92
  const StyledGroup = (0, import_ds_system.styled)("ul", { name, slot: SLOTS.GROUP })`
75
93
  list-style: none;
@@ -87,6 +105,9 @@ const StyledSectionLabel = (0, import_ds_system.styled)("span", { name, slot: SL
87
105
  font-size: 1rem;
88
106
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
89
107
  color: ${({ theme }) => theme.colors.neutral[700]};
108
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
109
+ font-size: 0.8125rem;
110
+ }
90
111
  `;
91
112
  const StyledItemSeparator = (0, import_ds_system.styled)("div", { name, slot: SLOTS.ITEM_SEPARATOR })`
92
113
  height: 1px;
@@ -104,8 +125,12 @@ const StyledItem = (0, import_ds_system.styled)("li", { name, slot: SLOTS.ITEM }
104
125
  `;
105
126
  const StyledItemRow = (0, import_ds_system.styled)("div", { name, slot: SLOTS.ITEM_ROW })`
106
127
  /** Labels wrap: side content aligns to the first line (spec "date is pinned on the right side of the first line"). */
107
- --row-first-line: ${({ isTall }) => isTall ? "24px" : "16px"};
128
+ --row-first-line: ${({ isTall }) => isTall ? "1.8462rem" : "1.2308rem"};
129
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
130
+ --row-first-line: ${({ isTall }) => isTall ? "1.5rem" : "1rem"};
131
+ }
108
132
  display: flex;
133
+ flex-wrap: wrap;
109
134
  align-items: flex-start;
110
135
  column-gap: 8px;
111
136
  min-height: ${({ isTall }) => isTall ? "48px" : "32px"};
@@ -114,6 +139,7 @@ const StyledItemRow = (0, import_ds_system.styled)("div", { name, slot: SLOTS.IT
114
139
  padding-left: ${({ rowPadding }) => `${rowPadding}px`};
115
140
  ${({ isSticky }) => isSticky ? "position: sticky; top: 0; z-index: 1;" : ""}
116
141
  padding-right: 8px;
142
+ ${({ isRailRow }) => isRailRow ? "padding-inline: 0; justify-content: center;" : ""}
117
143
  cursor: pointer;
118
144
  background: ${({ isCurrent, theme }) => isCurrent ? theme.colors.brand[200] : theme.colors.neutral["000"]};
119
145
  box-shadow: inset 4px 0 0 0
@@ -127,13 +153,19 @@ const StyledItemRow = (0, import_ds_system.styled)("div", { name, slot: SLOTS.IT
127
153
  `;
128
154
  const StyledItemLabel = (0, import_ds_system.styled)("span", { name, slot: SLOTS.ITEM_LABEL })`
129
155
  font-size: ${({ isTall }) => isTall ? "1.0769rem" : "1rem"};
130
- line-height: ${({ isTall }) => isTall ? "17px" : "16px"};
131
- padding-block: ${({ isTall }) => isTall ? "3.5px" : "0"};
156
+ line-height: ${({ isTall }) => isTall ? "1.3077rem" : "1.2308rem"};
157
+ padding-block: ${({ isTall }) => isTall ? "0.2692rem" : "0"};
158
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
159
+ font-size: ${({ isTall }) => isTall ? "0.875rem" : "0.8125rem"};
160
+ line-height: ${({ isTall }) => isTall ? "1.0625rem" : "1rem"};
161
+ padding-block: ${({ isTall }) => isTall ? "0.21875rem" : "0"};
162
+ }
132
163
  color: ${({ theme }) => theme.colors.neutral[800]};
133
164
  word-break: ${({ labelOverflow }) => labelOverflow === "wrapAll" ? "break-all" : "normal"};
134
- overflow-wrap: anywhere;
135
- flex: 1;
136
- min-width: 0;
165
+ overflow-wrap: break-word;
166
+ flex: 1 1 0;
167
+ min-width: min(min-content, 100%);
168
+ max-width: 100%;
137
169
  `;
138
170
  const StyledLeftContainer = (0, import_ds_system.styled)("span", { name, slot: SLOTS.LEFT_CONTAINER })`
139
171
  display: inline-flex;
@@ -149,6 +181,7 @@ const StyledCollapsedContainer = (0, import_ds_system.styled)("span", { name, sl
149
181
  const StyledRightContainer = (0, import_ds_system.styled)("span", { name, slot: SLOTS.RIGHT_CONTAINER })`
150
182
  display: inline-flex;
151
183
  align-items: center;
184
+ margin-left: auto;
152
185
  min-height: var(--row-first-line, auto);
153
186
  `;
154
187
  const StyledArrowContainer = (0, import_ds_system.styled)("span", { name, slot: SLOTS.ARROW_CONTAINER })`
@@ -157,22 +190,32 @@ const StyledArrowContainer = (0, import_ds_system.styled)("span", { name, slot:
157
190
  justify-content: center;
158
191
  flex: none;
159
192
  min-height: var(--row-first-line, auto);
160
- ${({ isLeading }) => isLeading ? "width: 16px; margin-inline-end: -8px;" : ""}
193
+ ${({ isLeading }) => isLeading ? "width: 1.2308rem; margin-inline-end: -8px;" : ""}
194
+ ${({ isLeading, theme }) => isLeading ? `@media (max-width: ${theme.breakpoints.small}) { width: 1rem; }` : ""}
161
195
  `;
162
196
  const StyledHeaderDisclosure = (0, import_ds_system.styled)("button", { name, slot: SLOTS.HEADER_DISCLOSURE })`
163
- --row-first-line: 24px;
197
+ flex-shrink: 0;
198
+ flex-wrap: wrap;
199
+ --row-first-line: 1.8462rem;
200
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
201
+ --row-first-line: 1.5rem;
202
+ }
164
203
  display: flex;
165
204
  align-items: center;
166
205
  column-gap: 8px;
167
206
  width: 100%;
168
207
  min-height: 48px;
169
208
  padding: 0 8px 0 12px;
209
+ ${({ isRail }) => isRail ? "padding: 0; justify-content: center;" : ""}
170
210
  border: none;
171
211
  border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[100]};
172
212
  background: ${({ theme }) => theme.colors.neutral["000"]};
173
213
  box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => isOpen ? theme.colors.brand[500] : "transparent"};
174
214
  text-align: left;
175
215
  font-size: 1.0769rem;
216
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
217
+ font-size: 0.875rem;
218
+ }
176
219
  color: ${({ theme }) => theme.colors.neutral[800]};
177
220
  cursor: pointer;
178
221
  &:hover {
@@ -185,31 +228,46 @@ const StyledHeaderDisclosure = (0, import_ds_system.styled)("button", { name, sl
185
228
  }
186
229
  `;
187
230
  const StyledFooterMenu = (0, import_ds_system.styled)("div", { name, slot: SLOTS.FOOTER_MENU })`
231
+ flex-shrink: 0;
188
232
  display: grid;
189
- grid-template-columns: ${({ expanded }) => expanded ? "1fr auto auto" : "1fr"};
233
+ grid-template-columns: ${({ expanded }) => expanded ? "1fr auto auto" : "minmax(0, 1fr)"};
190
234
  align-items: center;
191
235
  column-gap: 8px;
192
236
  margin-top: auto;
193
237
  min-height: 48px;
194
238
  padding: 0 4px 0 12px;
239
+ ${({ expanded }) => expanded ? `& > [data-dimsum-slot='dsLeftnavigationtreeFooterMenuCollapse'] { grid-column: 3; }` : "padding: 0; justify-items: center;"}
195
240
  border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
196
241
  `;
197
242
  const StyledFooterLabel = (0, import_ds_system.styled)("span", { name, slot: SLOTS.FOOTER_LABEL })`
198
- font-size: 11px;
199
- line-height: 14px;
243
+ min-width: 0;
244
+ overflow-wrap: break-word;
245
+ font-size: 0.8462rem;
246
+ line-height: 1.0769rem;
200
247
  color: ${({ theme }) => theme.colors.neutral[500]};
248
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
249
+ font-size: 0.6875rem;
250
+ line-height: 0.875rem;
251
+ }
201
252
  `;
202
253
  const StyledFooterSeparator = (0, import_ds_system.styled)("span", { name, slot: SLOTS.FOOTER_SEPARATOR })`
203
254
  width: 1px;
204
- height: 16px;
255
+ height: 1.2308rem;
205
256
  background: ${({ theme }) => theme.colors.neutral[100]};
257
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
258
+ height: 1rem;
259
+ }
206
260
  `;
207
261
  const StyledFooterButton = (0, import_ds_system.styled)("button", { name, slot: SLOTS.FOOTER_MENU_COLLAPSE })`
208
262
  display: inline-flex;
209
263
  align-items: center;
210
264
  justify-content: center;
211
- width: 32px;
212
- height: 32px;
265
+ width: 2.4615rem;
266
+ height: 2.4615rem;
267
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
268
+ width: 2rem;
269
+ height: 2rem;
270
+ }
213
271
  padding: 0;
214
272
  border: none;
215
273
  background: transparent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/parts/styled.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAA;",
4
+ "sourcesContent": ["/* 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\n/** A plain length that means the same in every element: the children can reuse it as it is. */\nconst ABSOLUTE_LENGTH = /^\\s*(\\d+|\\d*\\.\\d+)(px|rem|vw|vh|vmin|vmax)\\s*$/;\n\n/** Border of the root, in px. The root clips its content, so the children take the width that is inside the border. */\nconst ROOT_BORDER = 1;\nconst ROOT_BORDER_TOTAL = `${ROOT_BORDER * 2}px`;\n\nconst getContentWidth = (expanded: boolean, expandedWidth: string) => {\n if (!expanded) return `calc(48px - ${ROOT_BORDER_TOTAL})`;\n return ABSOLUTE_LENGTH.test(expandedWidth) ? `calc(${expandedWidth} - ${ROOT_BORDER_TOTAL})` : '100%';\n};\n\n/**\n * While the panel expands or collapses only its own width animates, and it clips what it holds. The header, the tree\n * and the footer have the final width (the rail is 48px) from the first frame: the labels are not squeezed (one\n * character per line) when it grows, and the icons of the rail are already where they stay when it shrinks. The\n * selector is doubled to win over the `width: 100%` that the header declares for itself.\n *\n * Only a plain length that means the same in every element (`px`, `rem`, viewport units) is reused by the children.\n * Any other width is relative to something that is not the same for them: a percentage (`50%`, `calc(100% - 80px)`)\n * to the host of the panel, `em` to the font size of each element, `var()` to whatever it resolves to there. The\n * children would not get the width of the panel, so they follow it (`100%`) and, for those widths only, the content\n * is squeezed while the panel animates. The width of the root includes its border (`border-box`, whatever the page\n * says), so the children are narrower than it by the border: if they had the width of the root, the right edge of the\n * focus ring of a row, which is drawn inside the row, would be cut by the root.\n */\nexport const StyledRoot = styled('nav', { name, slot: SLOTS.ROOT })<{ expanded: boolean; expandedWidth: string }>`\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: ${({ expanded, expandedWidth }) => (expanded ? expandedWidth : '48px')};\n && > * {\n box-sizing: border-box;\n width: ${({ expanded, expandedWidth }) => getContentWidth(expanded, expandedWidth)};\n }\n transition: width ${({ expanded }) => (expanded ? 'ease-out' : 'ease-in')} 350ms;\n height: 100%;\n overflow: hidden;\n border: ${ROOT_BORDER}px 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 /**\n * While the header is open the bar runs the full height of the list, like in LeftNavigation. The rows draw it on\n * themselves, but the section labels and the separators are not rows: the list paints it behind them, so the bar has\n * no gaps. The rows keep their own bar because their background covers the one of the list.\n */\n ${({ isHeaderContent, theme }) =>\n isHeaderContent\n ? `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]};\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 @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.8125rem;\n }\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 isRailRow?: 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 ? '1.8462rem' : '1.2308rem')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n --row-first-line: ${({ isTall }) => (isTall ? '1.5rem' : '1rem')};\n }\n display: flex;\n flex-wrap: wrap;\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 ${({ isRailRow }) => (isRailRow ? 'padding-inline: 0; justify-content: center;' : '')}\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\n/**\n * The rows wrap by content: the label never goes narrower than its longest word, so what does not fit beside it (the\n * icons, the right content) goes down to the next row instead of breaking the word. A word longer than the whole row\n * (a URL, an identifier) is the exception: the minimum is capped to the row, `min(min-content, 100%)`, and\n * `overflow-wrap` breaks that word. `labelOverflow=\"wrapAll\"` keeps breaking anywhere.\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 ? '1.3077rem' : '1.2308rem')};\n padding-block: ${({ isTall }) => (isTall ? '0.2692rem' : '0')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${({ isTall }) => (isTall ? '0.875rem' : '0.8125rem')};\n line-height: ${({ isTall }) => (isTall ? '1.0625rem' : '1rem')};\n padding-block: ${({ isTall }) => (isTall ? '0.21875rem' : '0')};\n }\n color: ${({ theme }) => theme.colors.neutral[800]};\n word-break: ${({ labelOverflow }) => (labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n overflow-wrap: break-word;\n flex: 1 1 0;\n min-width: min(min-content, 100%);\n max-width: 100%;\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 margin-left: auto;\n min-height: var(--row-first-line, auto);\n`;\n\n/**\n * The leading arrow is 16px at the 13px root (1.2308rem), so it grows with the icon. Its negative margin cancels the\n * row column-gap, which is a fixed 8px, so the label always starts at the arrow's right edge: do not scale the margin.\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: 1.2308rem; margin-inline-end: -8px;' : '')}\n ${({ isLeading, theme }) => (isLeading ? `@media (max-width: ${theme.breakpoints.small}) { width: 1rem; }` : '')}\n`;\n\nexport const StyledHeaderDisclosure = styled('button', { name, slot: SLOTS.HEADER_DISCLOSURE })<{\n isRail: boolean;\n isOpen: boolean;\n}>`\n flex-shrink: 0;\n flex-wrap: wrap;\n --row-first-line: 1.8462rem;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n --row-first-line: 1.5rem;\n }\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 ${({ isRail }) => (isRail ? 'padding: 0; justify-content: center;' : '')}\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 @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.875rem;\n }\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`;\n/**\n * The footer text is optional and flexible: without it the collapse button is the only child and the grid would put it\n * in the first column, on the left. The button is always in the last column, at the right end of the expanded footer.\n */\nexport const StyledFooterMenu = styled('div', { name, slot: SLOTS.FOOTER_MENU })<{ expanded: boolean }>`\n flex-shrink: 0;\n display: grid;\n grid-template-columns: ${({ expanded }) => (expanded ? '1fr auto auto' : 'minmax(0, 1fr)')};\n align-items: center;\n column-gap: 8px;\n margin-top: auto;\n min-height: 48px;\n padding: 0 4px 0 12px;\n ${({ expanded }) =>\n expanded\n ? `& > [data-dimsum-slot='dsLeftnavigationtreeFooterMenuCollapse'] { grid-column: 3; }`\n : 'padding: 0; justify-items: center;'}\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n`;\n\n/**\n * The label can shrink below its longest word: a footer text without spaces (an account name, an identifier) is\n * broken inside the label, so the collapse button never leaves the panel. Ordinary text still wraps at the spaces.\n */\nexport const StyledFooterLabel = styled('span', { name, slot: SLOTS.FOOTER_LABEL })`\n min-width: 0;\n overflow-wrap: break-word;\n font-size: 0.8462rem;\n line-height: 1.0769rem;\n color: ${({ theme }) => theme.colors.neutral[500]};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.6875rem;\n line-height: 0.875rem;\n }\n`;\n\nexport const StyledFooterSeparator = styled('span', { name, slot: SLOTS.FOOTER_SEPARATOR })`\n width: 1px;\n height: 1.2308rem;\n background: ${({ theme }) => theme.colors.neutral[100]};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n height: 1rem;\n }\n`;\n\n/** The box follows the icon it holds, so it grows with it when the text is enlarged. */\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: 2.4615rem;\n height: 2.4615rem;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n width: 2rem;\n height: 2rem;\n }\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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AAM,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAC;AAAA,uBACjC,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAMtD,MAAM,yBAAqB,yBAAO,UAAU,EAAE,MAAM,MAAM,MAAM,qBAAqB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAMtE,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBASpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -64,7 +64,9 @@ const DSLeftNavigationTreePropTypes = {
64
64
  "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"
65
65
  ).defaultValue([]),
66
66
  expanded: import_ds_props_helpers.PropTypes.bool.description("Whether the panel is expanded or collapsed to the icon-only rail").defaultValue(false),
67
- expandedWidth: import_ds_props_helpers.PropTypes.string.description("Width of the panel when expanded").defaultValue("240px"),
67
+ expandedWidth: import_ds_props_helpers.PropTypes.string.description(
68
+ "Width of the panel when expanded. A plain length in px, rem or viewport units is applied to the content from the first frame of the transition. Any other width (a percentage, em, var(), calc()) is relative to its context, so the content follows the panel while it animates and its labels are squeezed during the transition."
69
+ ).defaultValue("240px"),
68
70
  labelOverflow: import_ds_props_helpers.PropTypes.oneOf(["wrap", "wrapAll"]).description("How labels wrap").defaultValue("wrap"),
69
71
  footerLabel: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.node, import_ds_props_helpers.PropTypes.string]).description("Text shown in the footer next to the collapse button").defaultValue(""),
70
72
  selectedItem: import_ds_props_helpers.PropTypes.oneOfType([import_ds_props_helpers.PropTypes.string, import_ds_props_helpers.PropTypes.oneOf([null])]).description(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* 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", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADGvB,8BAMO;AAGP,uBAIO;AAwHP,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAmD;AAAA,EAC9D,OAAO,CAAC;AAAA,EACR,UAAU;AAAA,EACV,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AACjB;AAEO,MAAM,gCAAgF;AAAA,EAC3F,OAAG,kDAAyB,2CAA0B,2CAA0B;AAAA,EAChF,GAAG;AAAA,EACH,GAAG;AAAA,EACH,OAAO,kCAAU,QAAQ,kCAAU,MAAM,EACtC;AAAA,IACC;AAAA,EACF,EACC,aAAa,CAAC,CAAC;AAAA,EAClB,UAAU,kCAAU,KACjB,YAAY,kEAAkE,EAC9E,aAAa,KAAK;AAAA,EACrB,eAAe,kCAAU,OAAO,YAAY,kCAAkC,EAAE,aAAa,OAAO;AAAA,EACpG,eAAe,kCAAU,MAAM,CAAC,QAAQ,SAAS,CAAC,EAAE,YAAY,iBAAiB,EAAE,aAAa,MAAM;AAAA,EACtG,aAAa,kCAAU,UAAU,CAAC,kCAAU,MAAM,kCAAU,MAAM,CAAC,EAChE,YAAY,sDAAsD,EAClE,aAAa,EAAE;AAAA,EAClB,cAAc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AA,IACC;AAAA,EACF,EACC,UAAU,2DAA2D;AAAA,EACxE,UAAU,kCAAU,OAAO,YAAY,cAAc;AACvD;AAEO,MAAM,wCAA2F;AAAA,EACtG,OAAO,kCAAU,UAAU,CAAC,kCAAU,QAAQ,kCAAU,IAAI,CAAC,EAAE;AAAA,IAC7D;AAAA,EACF;AAAA,EACA,OAAO,kCAAU,QAAQ,kCAAU,MAAM,EAAE,YAAY,mCAAmC;AAAA,EAC1F,UAAU,kCAAU,KAAK;AAAA,IACvB;AAAA,EACF;AAAA,EACA,aAAa,kCAAU,KAAK,YAAY,wEAAwE;AAAA,EAChH,YAAY,kCAAU,KAAK,YAAY,8CAA8C,EAAE,aAAa,IAAI;AAAA,EACxG,eAAe,kCAAU,MAAM,CAAC,QAAQ,SAAS,CAAC,EAAE,YAAY,uCAAuC;AAAA,EACvG,gBAAgB,kCAAU,KACvB;AAAA,IACC;AAAA,EACF,EACC,UAAU,2DAA2D;AAC1E;AAEA,MAAM,yBAAyB,MAAM;AACrC,uBAAuB,cAAc;AAC9B,MAAM,qCAAiC,kCAAS,sBAAsB;AAC7E,+BAA+B,YAC7B;AAEF,MAAM,6BAA6B,MAAM;AACzC,2BAA2B,cAAc;AAClC,MAAM,yCAAqC,kCAAS,0BAA0B;AACrF,mCAAmC,YACjC;",
4
+ "sourcesContent": ["/* 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\n .description(\n 'Width of the panel when expanded. A plain length in px, rem or viewport units is applied to the content from the first frame of the transition. Any other width (a percentage, em, var(), calc()) is relative to its context, so the content follows the panel while it animates and its labels are squeezed during the transition.',\n )\n .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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACA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AU,KAAK,YAAY,wEAAwE;AAAA,EAChH,YAAY,kCAAU,KAAK,YAAY,8CAA8C,EAAE,aAAa,IAAI;AAAA,EACxG,eAAe,kCAAU,MAAM,CAAC,QAAQ,SAAS,CAAC,EAAE,YAAY,uCAAuC;AAAA,EACvG,gBAAgB,kCAAU,KACvB;AAAA,IACC;AAAA,EACF,EACC,UAAU,2DAA2D;AAC1E;AAEA,MAAM,yBAAyB,MAAM;AACrC,uBAAuB,cAAc;AAC9B,MAAM,qCAAiC,kCAAS,sBAAsB;AAC7E,+BAA+B,YAC7B;AAEF,MAAM,6BAA6B,MAAM;AACzC,2BAA2B,cAAc;AAClC,MAAM,yCAAqC,kCAAS,0BAA0B;AACrF,mCAAmC,YACjC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React2, { useCallback, useContext } from "react";
4
- import { ROW_PADDING } from "../config/treeModel.js";
5
4
  import { useItemFocusState } from "../config/useTreeModel.js";
6
5
  import { TreeContext } from "./TreeContext.js";
7
6
  import { StyledCollapsedContainer, StyledItem, StyledItemLabel, StyledItemRow } from "./styled.js";
@@ -44,7 +43,8 @@ const RailItem = React2.memo(({ id }) => {
44
43
  StyledItemRow,
45
44
  {
46
45
  "data-row": true,
47
- rowPadding: ROW_PADDING,
46
+ rowPadding: 0,
47
+ isRailRow: true,
48
48
  isTall: true,
49
49
  isSticky: false,
50
50
  isCurrent,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/RailItem.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useContext } from 'react';\nimport { ROW_PADDING } from '../config/treeModel.js';\nimport { useItemFocusState } from '../config/useTreeModel.js';\nimport { TreeContext } from './TreeContext.js';\nimport { StyledCollapsedContainer, StyledItem, StyledItemLabel, StyledItemRow } from './styled.js';\n\nconst HIDDEN_LABEL_STYLE = { display: 'none' };\n\n/**\n * Collapsed-rail node: an icon-only end treeitem. The label stays in the DOM with display: none\n * because it is the aria-labelledby target (hidden targets still name the element, and are not read twice).\n */\nexport const RailItem = React.memo(({ id }: { id: string }) => {\n const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);\n const info = model.index.get(id);\n const isCurrent = model.currentLeafId === id;\n const isSelectedParent = model.selectedParentIds.has(id);\n const focusState = useItemFocusState(model, id);\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(() => ({ item, level: 1, isOpen: false, isCurrent }), [item, isCurrent]);\n\n if (!info || !item?.CollapsedComponent) return null;\n const { CollapsedComponent } = item;\n const labelId = getElementId('label', id);\n\n return (\n <StyledItem\n isOpenSection={false}\n role=\"treeitem\"\n aria-level={1}\n aria-current={isCurrent ? 'page' : undefined}\n aria-labelledby={labelId}\n tabIndex={focusState === 'none' ? -1 : 0}\n data-dsid={id}\n data-type={item.type}\n data-selected={isCurrent}\n data-selectedparent={isSelectedParent}\n innerRef={focusRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledItemRow\n data-row\n rowPadding={ROW_PADDING}\n isTall\n isSticky={false}\n isCurrent={isCurrent}\n isSelectedParent={isSelectedParent}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCollapsedContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <CollapsedComponent item={item} />\n </StyledCollapsedContainer>\n <StyledItemLabel\n id={labelId}\n isTall\n labelOverflow={labelOverflow}\n style={HIDDEN_LABEL_STYLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {item.itemOpts?.label}\n </StyledItemLabel>\n </StyledItemRow>\n </StyledItem>\n );\n});\n\nRailItem.displayName = 'DSLeftNavigationTree.RailItem';\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACiDjB,SAYI,KAZJ;AAjDN,OAAOA,UAAS,aAAa,kBAAkB;AAC/C,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B,YAAY,iBAAiB,qBAAqB;AAErF,MAAM,qBAAqB,EAAE,SAAS,OAAO;AAMtC,MAAM,WAAWA,OAAM,KAAK,CAAC,EAAE,GAAG,MAAsB;AAC7D,QAAM,EAAE,OAAO,UAAU,eAAe,eAAe,aAAa,IAAI,WAAW,WAAW;AAC9F,QAAM,OAAO,MAAM,MAAM,IAAI,EAAE;AAC/B,QAAM,YAAY,MAAM,kBAAkB;AAC1C,QAAM,mBAAmB,MAAM,kBAAkB,IAAI,EAAE;AACvD,QAAM,aAAa,kBAAkB,OAAO,EAAE;AAC9C,QAAM,OAAO,MAAM;AAEnB,QAAM,WAAW;AAAA,IACf,CAAC,SAA6B;AAC5B,UAAI,QAAQ,eAAe,eAAgB,MAAK,MAAM;AAAA,IACxD;AAAA,IACA,CAAC,UAAU;AAAA,EACb;AACA,QAAM,cAAc,YAAY,CAAC,MAAqC,SAAS,SAAS,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;AAC9G,QAAM,yBAAyB,YAAY,OAAO,EAAE,MAAM,OAAO,GAAG,QAAQ,OAAO,UAAU,IAAI,CAAC,MAAM,SAAS,CAAC;AAElH,MAAI,CAAC,QAAQ,CAAC,MAAM,mBAAoB,QAAO;AAC/C,QAAM,EAAE,mBAAmB,IAAI;AAC/B,QAAM,UAAU,aAAa,SAAS,EAAE;AAExC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAe;AAAA,MACf,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,gBAAc,YAAY,SAAS;AAAA,MACnC,mBAAiB;AAAA,MACjB,UAAU,eAAe,SAAS,KAAK;AAAA,MACvC,aAAW;AAAA,MACX,aAAW,KAAK;AAAA,MAChB,iBAAe;AAAA,MACf,uBAAqB;AAAA,MACrB,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,YAAQ;AAAA,UACR,YAAY;AAAA,UACZ,QAAM;AAAA,UACN,UAAU;AAAA,UACV;AAAA,UACA;AAAA,UACA,SAAS;AAAA,UACT;AAAA,UACA;AAAA,UAEA;AAAA,gCAAC,4BAAyB,eAA8B,wBACtD,8BAAC,sBAAmB,MAAY,GAClC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI;AAAA,gBACJ,QAAM;AAAA,gBACN;AAAA,gBACA,OAAO;AAAA,gBACP;AAAA,gBACA;AAAA,gBAEC,eAAK,UAAU;AAAA;AAAA,YAClB;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,SAAS,cAAc;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback, useContext } from 'react';\nimport { useItemFocusState } from '../config/useTreeModel.js';\nimport { TreeContext } from './TreeContext.js';\nimport { StyledCollapsedContainer, StyledItem, StyledItemLabel, StyledItemRow } from './styled.js';\n\nconst HIDDEN_LABEL_STYLE = { display: 'none' };\n\n/**\n * Collapsed-rail node: an icon-only end treeitem. The label stays in the DOM with display: none\n * because it is the aria-labelledby target (hidden targets still name the element, and are not read twice).\n */\nexport const RailItem = React.memo(({ id }: { id: string }) => {\n const { model, handlers, getOwnerProps, labelOverflow, getElementId } = useContext(TreeContext);\n const info = model.index.get(id);\n const isCurrent = model.currentLeafId === id;\n const isSelectedParent = model.selectedParentIds.has(id);\n const focusState = useItemFocusState(model, id);\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(() => ({ item, level: 1, isOpen: false, isCurrent }), [item, isCurrent]);\n\n if (!info || !item?.CollapsedComponent) return null;\n const { CollapsedComponent } = item;\n const labelId = getElementId('label', id);\n\n return (\n <StyledItem\n isOpenSection={false}\n role=\"treeitem\"\n aria-level={1}\n aria-current={isCurrent ? 'page' : undefined}\n aria-labelledby={labelId}\n tabIndex={focusState === 'none' ? -1 : 0}\n data-dsid={id}\n data-type={item.type}\n data-selected={isCurrent}\n data-selectedparent={isSelectedParent}\n innerRef={focusRef}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledItemRow\n data-row\n rowPadding={0}\n isRailRow\n isTall\n isSticky={false}\n isCurrent={isCurrent}\n isSelectedParent={isSelectedParent}\n onClick={handleClick}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <StyledCollapsedContainer getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <CollapsedComponent item={item} />\n </StyledCollapsedContainer>\n <StyledItemLabel\n id={labelId}\n isTall\n labelOverflow={labelOverflow}\n style={HIDDEN_LABEL_STYLE}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {item.itemOpts?.label}\n </StyledItemLabel>\n </StyledItemRow>\n </StyledItem>\n );\n});\n\nRailItem.displayName = 'DSLeftNavigationTree.RailItem';\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACgDjB,SAaI,KAbJ;AAhDN,OAAOA,UAAS,aAAa,kBAAkB;AAC/C,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B,YAAY,iBAAiB,qBAAqB;AAErF,MAAM,qBAAqB,EAAE,SAAS,OAAO;AAMtC,MAAM,WAAWA,OAAM,KAAK,CAAC,EAAE,G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D,8BAAC,sBAAmB,MAAY,GAClC;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,IAAI;AAAA,gBACJ,QAAM;AAAA,gBACN;AAAA,gBACA,OAAO;AAAA,gBACP;AAAA,gBACA;AAAA,gBAEC,eAAK,UAAU;AAAA;AAAA,YAClB;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,SAAS,cAAc;",
6
6
  "names": ["React"]
7
7
  }
@@ -3,14 +3,26 @@ import { styled } from "@elliemae/ds-system";
3
3
  import { DSLeftNavigationTreeName, LEFT_NAVIGATION_TREE_SLOTS } from "../constants/index.js";
4
4
  const SLOTS = LEFT_NAVIGATION_TREE_SLOTS;
5
5
  const name = DSLeftNavigationTreeName;
6
+ const ABSOLUTE_LENGTH = /^\s*(\d+|\d*\.\d+)(px|rem|vw|vh|vmin|vmax)\s*$/;
7
+ const ROOT_BORDER = 1;
8
+ const ROOT_BORDER_TOTAL = `${ROOT_BORDER * 2}px`;
9
+ const getContentWidth = (expanded, expandedWidth) => {
10
+ if (!expanded) return `calc(48px - ${ROOT_BORDER_TOTAL})`;
11
+ return ABSOLUTE_LENGTH.test(expandedWidth) ? `calc(${expandedWidth} - ${ROOT_BORDER_TOTAL})` : "100%";
12
+ };
6
13
  const StyledRoot = styled("nav", { name, slot: SLOTS.ROOT })`
7
14
  display: flex;
8
15
  flex-direction: column;
16
+ box-sizing: border-box;
9
17
  width: ${({ expanded, expandedWidth }) => expanded ? expandedWidth : "48px"};
18
+ && > * {
19
+ box-sizing: border-box;
20
+ width: ${({ expanded, expandedWidth }) => getContentWidth(expanded, expandedWidth)};
21
+ }
10
22
  transition: width ${({ expanded }) => expanded ? "ease-out" : "ease-in"} 350ms;
11
23
  height: 100%;
12
24
  overflow: hidden;
13
- border: 1px solid ${({ theme }) => theme.colors.neutral[100]};
25
+ border: ${ROOT_BORDER}px solid ${({ theme }) => theme.colors.neutral[100]};
14
26
  box-shadow: -1px 0 0 0 ${({ theme }) => theme.colors.neutral[100]};
15
27
  background: ${({ theme }) => theme.colors.neutral["000"]};
16
28
  `;
@@ -19,7 +31,13 @@ const StyledTree = styled("ul", { name, slot: SLOTS.TREE })`
19
31
  margin: 0;
20
32
  padding: 0;
21
33
  overflow-y: auto;
22
- ${({ isHeaderContent, theme }) => isHeaderContent ? `& [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
34
+ /**
35
+ * While the header is open the bar runs the full height of the list, like in LeftNavigation. The rows draw it on
36
+ * themselves, but the section labels and the separators are not rows: the list paints it behind them, so the bar has
37
+ * no gaps. The rows keep their own bar because their background covers the one of the list.
38
+ */
39
+ ${({ isHeaderContent, theme }) => isHeaderContent ? `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]};
40
+ & [data-row], & [data-row]:hover { box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]}; }` : ""}
23
41
  `;
24
42
  const StyledGroup = styled("ul", { name, slot: SLOTS.GROUP })`
25
43
  list-style: none;
@@ -37,6 +55,9 @@ const StyledSectionLabel = styled("span", { name, slot: SLOTS.SECTION_LABEL })`
37
55
  font-size: 1rem;
38
56
  font-weight: ${({ theme }) => theme.fontWeights.semibold};
39
57
  color: ${({ theme }) => theme.colors.neutral[700]};
58
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
59
+ font-size: 0.8125rem;
60
+ }
40
61
  `;
41
62
  const StyledItemSeparator = styled("div", { name, slot: SLOTS.ITEM_SEPARATOR })`
42
63
  height: 1px;
@@ -54,8 +75,12 @@ const StyledItem = styled("li", { name, slot: SLOTS.ITEM })`
54
75
  `;
55
76
  const StyledItemRow = styled("div", { name, slot: SLOTS.ITEM_ROW })`
56
77
  /** 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"};
78
+ --row-first-line: ${({ isTall }) => isTall ? "1.8462rem" : "1.2308rem"};
79
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
80
+ --row-first-line: ${({ isTall }) => isTall ? "1.5rem" : "1rem"};
81
+ }
58
82
  display: flex;
83
+ flex-wrap: wrap;
59
84
  align-items: flex-start;
60
85
  column-gap: 8px;
61
86
  min-height: ${({ isTall }) => isTall ? "48px" : "32px"};
@@ -64,6 +89,7 @@ const StyledItemRow = styled("div", { name, slot: SLOTS.ITEM_ROW })`
64
89
  padding-left: ${({ rowPadding }) => `${rowPadding}px`};
65
90
  ${({ isSticky }) => isSticky ? "position: sticky; top: 0; z-index: 1;" : ""}
66
91
  padding-right: 8px;
92
+ ${({ isRailRow }) => isRailRow ? "padding-inline: 0; justify-content: center;" : ""}
67
93
  cursor: pointer;
68
94
  background: ${({ isCurrent, theme }) => isCurrent ? theme.colors.brand[200] : theme.colors.neutral["000"]};
69
95
  box-shadow: inset 4px 0 0 0
@@ -77,13 +103,19 @@ const StyledItemRow = styled("div", { name, slot: SLOTS.ITEM_ROW })`
77
103
  `;
78
104
  const StyledItemLabel = styled("span", { name, slot: SLOTS.ITEM_LABEL })`
79
105
  font-size: ${({ isTall }) => isTall ? "1.0769rem" : "1rem"};
80
- line-height: ${({ isTall }) => isTall ? "17px" : "16px"};
81
- padding-block: ${({ isTall }) => isTall ? "3.5px" : "0"};
106
+ line-height: ${({ isTall }) => isTall ? "1.3077rem" : "1.2308rem"};
107
+ padding-block: ${({ isTall }) => isTall ? "0.2692rem" : "0"};
108
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
109
+ font-size: ${({ isTall }) => isTall ? "0.875rem" : "0.8125rem"};
110
+ line-height: ${({ isTall }) => isTall ? "1.0625rem" : "1rem"};
111
+ padding-block: ${({ isTall }) => isTall ? "0.21875rem" : "0"};
112
+ }
82
113
  color: ${({ theme }) => theme.colors.neutral[800]};
83
114
  word-break: ${({ labelOverflow }) => labelOverflow === "wrapAll" ? "break-all" : "normal"};
84
- overflow-wrap: anywhere;
85
- flex: 1;
86
- min-width: 0;
115
+ overflow-wrap: break-word;
116
+ flex: 1 1 0;
117
+ min-width: min(min-content, 100%);
118
+ max-width: 100%;
87
119
  `;
88
120
  const StyledLeftContainer = styled("span", { name, slot: SLOTS.LEFT_CONTAINER })`
89
121
  display: inline-flex;
@@ -99,6 +131,7 @@ const StyledCollapsedContainer = styled("span", { name, slot: SLOTS.COLLAPSED_CO
99
131
  const StyledRightContainer = styled("span", { name, slot: SLOTS.RIGHT_CONTAINER })`
100
132
  display: inline-flex;
101
133
  align-items: center;
134
+ margin-left: auto;
102
135
  min-height: var(--row-first-line, auto);
103
136
  `;
104
137
  const StyledArrowContainer = styled("span", { name, slot: SLOTS.ARROW_CONTAINER })`
@@ -107,22 +140,32 @@ const StyledArrowContainer = styled("span", { name, slot: SLOTS.ARROW_CONTAINER
107
140
  justify-content: center;
108
141
  flex: none;
109
142
  min-height: var(--row-first-line, auto);
110
- ${({ isLeading }) => isLeading ? "width: 16px; margin-inline-end: -8px;" : ""}
143
+ ${({ isLeading }) => isLeading ? "width: 1.2308rem; margin-inline-end: -8px;" : ""}
144
+ ${({ isLeading, theme }) => isLeading ? `@media (max-width: ${theme.breakpoints.small}) { width: 1rem; }` : ""}
111
145
  `;
112
146
  const StyledHeaderDisclosure = styled("button", { name, slot: SLOTS.HEADER_DISCLOSURE })`
113
- --row-first-line: 24px;
147
+ flex-shrink: 0;
148
+ flex-wrap: wrap;
149
+ --row-first-line: 1.8462rem;
150
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
151
+ --row-first-line: 1.5rem;
152
+ }
114
153
  display: flex;
115
154
  align-items: center;
116
155
  column-gap: 8px;
117
156
  width: 100%;
118
157
  min-height: 48px;
119
158
  padding: 0 8px 0 12px;
159
+ ${({ isRail }) => isRail ? "padding: 0; justify-content: center;" : ""}
120
160
  border: none;
121
161
  border-bottom: 1px solid ${({ theme }) => theme.colors.neutral[100]};
122
162
  background: ${({ theme }) => theme.colors.neutral["000"]};
123
163
  box-shadow: inset 4px 0 0 0 ${({ isOpen, theme }) => isOpen ? theme.colors.brand[500] : "transparent"};
124
164
  text-align: left;
125
165
  font-size: 1.0769rem;
166
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
167
+ font-size: 0.875rem;
168
+ }
126
169
  color: ${({ theme }) => theme.colors.neutral[800]};
127
170
  cursor: pointer;
128
171
  &:hover {
@@ -135,31 +178,46 @@ const StyledHeaderDisclosure = styled("button", { name, slot: SLOTS.HEADER_DISCL
135
178
  }
136
179
  `;
137
180
  const StyledFooterMenu = styled("div", { name, slot: SLOTS.FOOTER_MENU })`
181
+ flex-shrink: 0;
138
182
  display: grid;
139
- grid-template-columns: ${({ expanded }) => expanded ? "1fr auto auto" : "1fr"};
183
+ grid-template-columns: ${({ expanded }) => expanded ? "1fr auto auto" : "minmax(0, 1fr)"};
140
184
  align-items: center;
141
185
  column-gap: 8px;
142
186
  margin-top: auto;
143
187
  min-height: 48px;
144
188
  padding: 0 4px 0 12px;
189
+ ${({ expanded }) => expanded ? `& > [data-dimsum-slot='dsLeftnavigationtreeFooterMenuCollapse'] { grid-column: 3; }` : "padding: 0; justify-items: center;"}
145
190
  border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};
146
191
  `;
147
192
  const StyledFooterLabel = styled("span", { name, slot: SLOTS.FOOTER_LABEL })`
148
- font-size: 11px;
149
- line-height: 14px;
193
+ min-width: 0;
194
+ overflow-wrap: break-word;
195
+ font-size: 0.8462rem;
196
+ line-height: 1.0769rem;
150
197
  color: ${({ theme }) => theme.colors.neutral[500]};
198
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
199
+ font-size: 0.6875rem;
200
+ line-height: 0.875rem;
201
+ }
151
202
  `;
152
203
  const StyledFooterSeparator = styled("span", { name, slot: SLOTS.FOOTER_SEPARATOR })`
153
204
  width: 1px;
154
- height: 16px;
205
+ height: 1.2308rem;
155
206
  background: ${({ theme }) => theme.colors.neutral[100]};
207
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
208
+ height: 1rem;
209
+ }
156
210
  `;
157
211
  const StyledFooterButton = styled("button", { name, slot: SLOTS.FOOTER_MENU_COLLAPSE })`
158
212
  display: inline-flex;
159
213
  align-items: center;
160
214
  justify-content: center;
161
- width: 32px;
162
- height: 32px;
215
+ width: 2.4615rem;
216
+ height: 2.4615rem;
217
+ @media (max-width: ${({ theme }) => theme.breakpoints.small}) {
218
+ width: 2rem;
219
+ height: 2rem;
220
+ }
163
221
  padding: 0;
164
222
  border: none;
165
223
  background: transparent;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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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,MAAM,GAAG,CAAC;AAAA;AAAA;",
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\n/** A plain length that means the same in every element: the children can reuse it as it is. */\nconst ABSOLUTE_LENGTH = /^\\s*(\\d+|\\d*\\.\\d+)(px|rem|vw|vh|vmin|vmax)\\s*$/;\n\n/** Border of the root, in px. The root clips its content, so the children take the width that is inside the border. */\nconst ROOT_BORDER = 1;\nconst ROOT_BORDER_TOTAL = `${ROOT_BORDER * 2}px`;\n\nconst getContentWidth = (expanded: boolean, expandedWidth: string) => {\n if (!expanded) return `calc(48px - ${ROOT_BORDER_TOTAL})`;\n return ABSOLUTE_LENGTH.test(expandedWidth) ? `calc(${expandedWidth} - ${ROOT_BORDER_TOTAL})` : '100%';\n};\n\n/**\n * While the panel expands or collapses only its own width animates, and it clips what it holds. The header, the tree\n * and the footer have the final width (the rail is 48px) from the first frame: the labels are not squeezed (one\n * character per line) when it grows, and the icons of the rail are already where they stay when it shrinks. The\n * selector is doubled to win over the `width: 100%` that the header declares for itself.\n *\n * Only a plain length that means the same in every element (`px`, `rem`, viewport units) is reused by the children.\n * Any other width is relative to something that is not the same for them: a percentage (`50%`, `calc(100% - 80px)`)\n * to the host of the panel, `em` to the font size of each element, `var()` to whatever it resolves to there. The\n * children would not get the width of the panel, so they follow it (`100%`) and, for those widths only, the content\n * is squeezed while the panel animates. The width of the root includes its border (`border-box`, whatever the page\n * says), so the children are narrower than it by the border: if they had the width of the root, the right edge of the\n * focus ring of a row, which is drawn inside the row, would be cut by the root.\n */\nexport const StyledRoot = styled('nav', { name, slot: SLOTS.ROOT })<{ expanded: boolean; expandedWidth: string }>`\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: ${({ expanded, expandedWidth }) => (expanded ? expandedWidth : '48px')};\n && > * {\n box-sizing: border-box;\n width: ${({ expanded, expandedWidth }) => getContentWidth(expanded, expandedWidth)};\n }\n transition: width ${({ expanded }) => (expanded ? 'ease-out' : 'ease-in')} 350ms;\n height: 100%;\n overflow: hidden;\n border: ${ROOT_BORDER}px 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 /**\n * While the header is open the bar runs the full height of the list, like in LeftNavigation. The rows draw it on\n * themselves, but the section labels and the separators are not rows: the list paints it behind them, so the bar has\n * no gaps. The rows keep their own bar because their background covers the one of the list.\n */\n ${({ isHeaderContent, theme }) =>\n isHeaderContent\n ? `box-shadow: inset 4px 0 0 0 ${theme.colors.brand[500]};\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 @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.8125rem;\n }\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 isRailRow?: 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 ? '1.8462rem' : '1.2308rem')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n --row-first-line: ${({ isTall }) => (isTall ? '1.5rem' : '1rem')};\n }\n display: flex;\n flex-wrap: wrap;\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 ${({ isRailRow }) => (isRailRow ? 'padding-inline: 0; justify-content: center;' : '')}\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\n/**\n * The rows wrap by content: the label never goes narrower than its longest word, so what does not fit beside it (the\n * icons, the right content) goes down to the next row instead of breaking the word. A word longer than the whole row\n * (a URL, an identifier) is the exception: the minimum is capped to the row, `min(min-content, 100%)`, and\n * `overflow-wrap` breaks that word. `labelOverflow=\"wrapAll\"` keeps breaking anywhere.\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 ? '1.3077rem' : '1.2308rem')};\n padding-block: ${({ isTall }) => (isTall ? '0.2692rem' : '0')};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: ${({ isTall }) => (isTall ? '0.875rem' : '0.8125rem')};\n line-height: ${({ isTall }) => (isTall ? '1.0625rem' : '1rem')};\n padding-block: ${({ isTall }) => (isTall ? '0.21875rem' : '0')};\n }\n color: ${({ theme }) => theme.colors.neutral[800]};\n word-break: ${({ labelOverflow }) => (labelOverflow === 'wrapAll' ? 'break-all' : 'normal')};\n overflow-wrap: break-word;\n flex: 1 1 0;\n min-width: min(min-content, 100%);\n max-width: 100%;\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 margin-left: auto;\n min-height: var(--row-first-line, auto);\n`;\n\n/**\n * The leading arrow is 16px at the 13px root (1.2308rem), so it grows with the icon. Its negative margin cancels the\n * row column-gap, which is a fixed 8px, so the label always starts at the arrow's right edge: do not scale the margin.\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: 1.2308rem; margin-inline-end: -8px;' : '')}\n ${({ isLeading, theme }) => (isLeading ? `@media (max-width: ${theme.breakpoints.small}) { width: 1rem; }` : '')}\n`;\n\nexport const StyledHeaderDisclosure = styled('button', { name, slot: SLOTS.HEADER_DISCLOSURE })<{\n isRail: boolean;\n isOpen: boolean;\n}>`\n flex-shrink: 0;\n flex-wrap: wrap;\n --row-first-line: 1.8462rem;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n --row-first-line: 1.5rem;\n }\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 ${({ isRail }) => (isRail ? 'padding: 0; justify-content: center;' : '')}\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 @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.875rem;\n }\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`;\n/**\n * The footer text is optional and flexible: without it the collapse button is the only child and the grid would put it\n * in the first column, on the left. The button is always in the last column, at the right end of the expanded footer.\n */\nexport const StyledFooterMenu = styled('div', { name, slot: SLOTS.FOOTER_MENU })<{ expanded: boolean }>`\n flex-shrink: 0;\n display: grid;\n grid-template-columns: ${({ expanded }) => (expanded ? '1fr auto auto' : 'minmax(0, 1fr)')};\n align-items: center;\n column-gap: 8px;\n margin-top: auto;\n min-height: 48px;\n padding: 0 4px 0 12px;\n ${({ expanded }) =>\n expanded\n ? `& > [data-dimsum-slot='dsLeftnavigationtreeFooterMenuCollapse'] { grid-column: 3; }`\n : 'padding: 0; justify-items: center;'}\n border-top: 1px solid ${({ theme }) => theme.colors.neutral[100]};\n`;\n\n/**\n * The label can shrink below its longest word: a footer text without spaces (an account name, an identifier) is\n * broken inside the label, so the collapse button never leaves the panel. Ordinary text still wraps at the spaces.\n */\nexport const StyledFooterLabel = styled('span', { name, slot: SLOTS.FOOTER_LABEL })`\n min-width: 0;\n overflow-wrap: break-word;\n font-size: 0.8462rem;\n line-height: 1.0769rem;\n color: ${({ theme }) => theme.colors.neutral[500]};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 0.6875rem;\n line-height: 0.875rem;\n }\n`;\n\nexport const StyledFooterSeparator = styled('span', { name, slot: SLOTS.FOOTER_SEPARATOR })`\n width: 1px;\n height: 1.2308rem;\n background: ${({ theme }) => theme.colors.neutral[100]};\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n height: 1rem;\n }\n`;\n\n/** The box follows the icon it holds, so it grows with it when the text is enlarged. */\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: 2.4615rem;\n height: 2.4615rem;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n width: 2rem;\n height: 2rem;\n }\n padding: 0;\n border: none;\n background: transparent;\n cursor: pointer;\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,UAAU,EAAE,MAAM,MAAM,MAAM,qBAAqB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAMtE,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBASpC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG,CAAC;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -35,7 +35,9 @@ const DSLeftNavigationTreePropTypes = {
35
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
36
  ).defaultValue([]),
37
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"),
38
+ expandedWidth: PropTypes.string.description(
39
+ "Width of the panel when expanded. A plain length in px, rem or viewport units is applied to the content from the first frame of the transition. Any other width (a percentage, em, var(), calc()) is relative to its context, so the content follows the panel while it animates and its labels are squeezed during the transition."
40
+ ).defaultValue("240px"),
39
41
  labelOverflow: PropTypes.oneOf(["wrap", "wrapAll"]).description("How labels wrap").defaultValue("wrap"),
40
42
  footerLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.string]).description("Text shown in the footer next to the collapse button").defaultValue(""),
41
43
  selectedItem: PropTypes.oneOfType([PropTypes.string, PropTypes.oneOf([null])]).description(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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
- "mappings": "AAAA,YAAY,WAAW;ACGv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B;AAAA,EACF;AAAA,EACA,aAAa,UAAU,KAAK,YAAY,wEAAwE;AAAA,EAChH,YAAY,UAAU,KAAK,YAAY,8CAA8C,EAAE,aAAa,IAAI;AAAA,EACxG,eAAe,UAAU,MAAM,CAAC,QAAQ,SAAS,CAAC,EAAE,YAAY,uCAAuC;AAAA,EACvG,gBAAgB,UAAU,KACvB;AAAA,IACC;AAAA,EACF,EACC,UAAU,2DAA2D;AAC1E;AAEA,MAAM,yBAAyB,MAAM;AACrC,uBAAuB,cAAc;AAC9B,MAAM,iCAAiC,SAAS,sBAAsB;AAC7E,+BAA+B,YAC7B;AAEF,MAAM,6BAA6B,MAAM;AACzC,2BAA2B,cAAc;AAClC,MAAM,qCAAqC,SAAS,0BAA0B;AACrF,mCAAmC,YACjC;",
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\n .description(\n 'Width of the panel when expanded. A plain length in px, rem or viewport units is applied to the content from the first frame of the transition. Any other width (a percentage, em, var(), calc()) is relative to its context, so the content follows the panel while it animates and its labels are squeezed during the transition.',\n )\n .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
+ "mappings": "AAAA,YAAY,WAAW;ACGvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAwHP,MAAM,OAAO,MAAM;AAEZ,MAAM,eAAmD;AAAA,EAC9D,OAAO,CAAC;AAAA,EACR,UAAU;AAAA,EACV,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe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6B,MAAM;AACzC,2BAA2B,cAAc;AAClC,MAAM,qCAAqC,SAAS,0BAA0B;AACrF,mCAAmC,YACjC;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,18 @@
1
1
  import type { DSLeftNavigationTreeT } from '../react-desc-prop-types.js';
2
+ /**
3
+ * While the panel expands or collapses only its own width animates, and it clips what it holds. The header, the tree
4
+ * and the footer have the final width (the rail is 48px) from the first frame: the labels are not squeezed (one
5
+ * character per line) when it grows, and the icons of the rail are already where they stay when it shrinks. The
6
+ * selector is doubled to win over the `width: 100%` that the header declares for itself.
7
+ *
8
+ * Only a plain length that means the same in every element (`px`, `rem`, viewport units) is reused by the children.
9
+ * Any other width is relative to something that is not the same for them: a percentage (`50%`, `calc(100% - 80px)`)
10
+ * to the host of the panel, `em` to the font size of each element, `var()` to whatever it resolves to there. The
11
+ * children would not get the width of the panel, so they follow it (`100%`) and, for those widths only, the content
12
+ * is squeezed while the panel animates. The width of the root includes its border (`border-box`, whatever the page
13
+ * says), so the children are narrower than it by the border: if they had the width of the root, the right edge of the
14
+ * focus ring of a row, which is drawn inside the row, would be cut by the root.
15
+ */
2
16
  export declare const StyledRoot: import("styled-components").StyledComponent<"nav", import("@elliemae/ds-system").Theme, {
3
17
  expanded: boolean;
4
18
  expandedWidth: string;
@@ -23,7 +37,14 @@ export declare const StyledItemRow: import("styled-components").StyledComponent<
23
37
  isSticky: boolean;
24
38
  isCurrent: boolean;
25
39
  isSelectedParent: boolean;
40
+ isRailRow?: boolean;
26
41
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
42
+ /**
43
+ * The rows wrap by content: the label never goes narrower than its longest word, so what does not fit beside it (the
44
+ * icons, the right content) goes down to the next row instead of breaking the word. A word longer than the whole row
45
+ * (a URL, an identifier) is the exception: the minimum is capped to the row, `min(min-content, 100%)`, and
46
+ * `overflow-wrap` breaks that word. `labelOverflow="wrapAll"` keeps breaking anywhere.
47
+ */
27
48
  export declare const StyledItemLabel: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
28
49
  isTall: boolean;
29
50
  labelOverflow: DSLeftNavigationTreeT.LabelOverflowT;
@@ -31,6 +52,10 @@ export declare const StyledItemLabel: import("styled-components").StyledComponen
31
52
  export declare const StyledLeftContainer: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
32
53
  export declare const StyledCollapsedContainer: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
33
54
  export declare const StyledRightContainer: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
55
+ /**
56
+ * The leading arrow is 16px at the 13px root (1.2308rem), so it grows with the icon. Its negative margin cancels the
57
+ * row column-gap, which is a fixed 8px, so the label always starts at the arrow's right edge: do not scale the margin.
58
+ */
34
59
  export declare const StyledArrowContainer: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, {
35
60
  isLeading: boolean;
36
61
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
@@ -38,9 +63,18 @@ export declare const StyledHeaderDisclosure: import("styled-components").StyledC
38
63
  isRail: boolean;
39
64
  isOpen: boolean;
40
65
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"button">, never>;
66
+ /**
67
+ * The footer text is optional and flexible: without it the collapse button is the only child and the grid would put it
68
+ * in the first column, on the left. The button is always in the last column, at the right end of the expanded footer.
69
+ */
41
70
  export declare const StyledFooterMenu: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, {
42
71
  expanded: boolean;
43
72
  } & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
73
+ /**
74
+ * The label can shrink below its longest word: a footer text without spaces (an account name, an identifier) is
75
+ * broken inside the label, so the collapse button never leaves the panel. Ordinary text still wraps at the spaces.
76
+ */
44
77
  export declare const StyledFooterLabel: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
45
78
  export declare const StyledFooterSeparator: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
79
+ /** The box follows the icon it holds, so it grows with it when the text is enlarged. */
46
80
  export declare const StyledFooterButton: import("styled-components").StyledComponent<"button", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"button">, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-left-navigation-tree",
3
- "version": "3.80.0-next.67",
3
+ "version": "3.80.0-next.69",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Left Navigation Tree",
6
6
  "files": [
@@ -36,16 +36,16 @@
36
36
  "indent": 4
37
37
  },
38
38
  "dependencies": {
39
- "@elliemae/ds-icons": "3.80.0-next.67",
40
- "@elliemae/ds-props-helpers": "3.80.0-next.67",
41
- "@elliemae/ds-system": "3.80.0-next.67",
42
- "@elliemae/ds-zustand-helpers": "3.80.0-next.67",
39
+ "@elliemae/ds-icons": "3.80.0-next.69",
40
+ "@elliemae/ds-props-helpers": "3.80.0-next.69",
41
+ "@elliemae/ds-system": "3.80.0-next.69",
42
+ "@elliemae/ds-zustand-helpers": "3.80.0-next.69",
43
43
  "@xstyled/styled-components": "~3.8.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@elliemae/ds-monorepo-devops": "3.80.0-next.67",
47
- "@elliemae/ds-test-utils": "3.80.0-next.67",
48
- "@elliemae/ds-typescript-helpers": "3.80.0-next.67",
46
+ "@elliemae/ds-monorepo-devops": "3.80.0-next.69",
47
+ "@elliemae/ds-test-utils": "3.80.0-next.69",
48
+ "@elliemae/ds-typescript-helpers": "3.80.0-next.69",
49
49
  "@playwright/experimental-ct-react": "1.61.1",
50
50
  "@testing-library/jest-dom": "^6.6.3",
51
51
  "@testing-library/react": "^16.0.1",