@digital-ai/dot-components 2.17.3 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.umd.js CHANGED
@@ -2141,6 +2141,14 @@
2141
2141
  }), void 0);
2142
2142
  };
2143
2143
 
2144
+ var CreateUUID = function CreateUUID() {
2145
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
2146
+ var r = Math.random() * 16 | 0,
2147
+ v = c === 'x' ? r : r & 0x3 | 0x8;
2148
+ return v.toString(16);
2149
+ });
2150
+ };
2151
+
2144
2152
  var rootClassName$$ = 'dot-list';
2145
2153
  var listItemRootClass = 'dot-list-item';
2146
2154
  var nestedListClassName = 'dot-nested-list';
@@ -2150,7 +2158,7 @@
2150
2158
  componentId: "wxwqwr-0"
2151
2159
  })(templateObject_2$10 || (templateObject_2$10 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2152
2160
  var theme = _a.theme;
2153
- return styled.css(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .", ".expandable {\n flex-direction: column;\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .", ".expandable {\n flex-direction: column;\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$$, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), listItemRootClass, theme.spacing(1), theme.spacing(-1), theme.spacing(1));
2161
+ return styled.css(templateObject_1$14 || (templateObject_1$14 = __makeTemplateObject(["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n\n .MuiCollapse-wrapper {\n margin: ", ";\n overflow: hidden;\n width: calc(100% - ", ");\n }\n\n .MuiListSubheader-root .MuiTypography-root {\n padding: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "], ["\n &.", " {\n background: ", ";\n\n .dot-icon {\n color: ", ";\n }\n\n &.", " .", " {\n padding-left: ", ";\n }\n\n .MuiCollapse-root {\n padding-top: ", ";\n margin-bottom: ", ";\n\n .MuiCollapse-wrapper {\n margin: ", ";\n overflow: hidden;\n width: calc(100% - ", ");\n }\n\n .MuiListSubheader-root .MuiTypography-root {\n padding: ", ";\n }\n }\n\n .MuiListSubheader-root {\n padding: 0;\n\n .MuiTypography-root {\n padding: ", ";\n }\n }\n }\n "])), rootClassName$$, theme.palette.layer.n0, theme.palette.layer.n700, nestedListClassName, listItemRootClass, theme.spacing(4), theme.spacing(1), theme.spacing(-1), theme.spacing(0, 2), theme.spacing(4), theme.spacing(1, 0), theme.spacing(1));
2154
2162
  });
2155
2163
  var templateObject_1$14, templateObject_2$10;
2156
2164
 
@@ -2163,29 +2171,48 @@
2163
2171
  }
2164
2172
  return 'chevron-down';
2165
2173
  };
2166
-
2167
- var flyoutListItemClassName = 'dot-flyout-list-item';
2168
- var flyoutItemLinkClassName = 'dot-flyout-item-link';
2169
- var listItemLinkClassName = 'dot-list-item-link';
2170
- var styledListItemElement = function styledListItemElement(elementType) {
2171
- return styled__default["default"](elementType).withConfig({
2172
- displayName: "ListItemstyles",
2173
- componentId: "sc-1fawh8v-0"
2174
- })(templateObject_2$$ || (templateObject_2$$ = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), function (_a) {
2175
- var theme = _a.theme;
2176
- return styled.css(templateObject_1$13 || (templateObject_1$13 = __makeTemplateObject(["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "])), listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary);
2174
+ // Used in DotSidebar, DotList, DotListItem to determine
2175
+ // if the sidebar should be open or closed based on what target the user clicks
2176
+ var excludedClassNames = ['MuiPaper-root', 'MuiTypography-overline'];
2177
+ var shouldToggleOpen = function shouldToggleOpen(classNames) {
2178
+ return !excludedClassNames.some(function (className) {
2179
+ return classNames.includes(className);
2177
2180
  });
2178
2181
  };
2179
- var StyledListItem = styledListItemElement(material.ListItem);
2180
- var StyledListItemButton = styledListItemElement(material.ListItemButton);
2181
- var templateObject_1$13, templateObject_2$$;
2182
+
2183
+ var DEFAULT_TOOLTIP_PLACEMENT = 'top-start';
2184
+
2185
+ var DotListDivider = function DotListDivider(_a) {
2186
+ var item = _a.item,
2187
+ index = _a.index;
2188
+ if (item.text) {
2189
+ return jsxRuntime.jsx(material.ListSubheader, __assign({
2190
+ disableSticky: true
2191
+ }, {
2192
+ children: jsxRuntime.jsx(DotTypography, __assign({
2193
+ ariaRole: "heading",
2194
+ ariaLevel: 3,
2195
+ variant: "overline"
2196
+ }, {
2197
+ children: item.text
2198
+ }), void 0)
2199
+ }), void 0);
2200
+ }
2201
+ return jsxRuntime.jsx("li", {
2202
+ children: jsxRuntime.jsx(material.Divider, {
2203
+ "aria-hidden": true,
2204
+ "data-testid": "divider-" + index,
2205
+ role: "separator"
2206
+ }, void 0)
2207
+ }, void 0);
2208
+ };
2182
2209
 
2183
2210
  var rootClassName$_ = 'dot-progress';
2184
2211
  var StyledCircularProgress = styled__default["default"](material.CircularProgress).withConfig({
2185
2212
  displayName: "Progressstyles__StyledCircularProgress",
2186
2213
  componentId: "sc-1gs77rb-0"
2187
- })(templateObject_1$12 || (templateObject_1$12 = __makeTemplateObject(["\n &.", " {\n &.MuiCircularProgress-colorSecondary {\n color: #649a3d;\n }\n }\n"], ["\n &.", " {\n &.MuiCircularProgress-colorSecondary {\n color: #649a3d;\n }\n }\n"])), rootClassName$_);
2188
- var templateObject_1$12;
2214
+ })(templateObject_1$13 || (templateObject_1$13 = __makeTemplateObject(["\n &.", " {\n &.MuiCircularProgress-colorSecondary {\n color: #649a3d;\n }\n }\n"], ["\n &.", " {\n &.MuiCircularProgress-colorSecondary {\n color: #649a3d;\n }\n }\n"])), rootClassName$_);
2215
+ var templateObject_1$13;
2189
2216
 
2190
2217
  var DotProgress = function DotProgress(_a) {
2191
2218
  var ariaLabel = _a.ariaLabel,
@@ -2248,11 +2275,11 @@
2248
2275
  var StyledPopper$1 = styled__default["default"](material.Popper).withConfig({
2249
2276
  displayName: "Popperstyles__StyledPopper",
2250
2277
  componentId: "sd1h8p-0"
2251
- })(templateObject_2$_ || (templateObject_2$_ = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2278
+ })(templateObject_2$$ || (templateObject_2$$ = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2252
2279
  var theme = _a.theme;
2253
- return styled.css(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n }\n "], ["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n }\n "])), rootClassName$Z, theme.typography.fontFamily, theme.typography.body1.fontSize);
2280
+ return styled.css(templateObject_1$12 || (templateObject_1$12 = __makeTemplateObject(["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n }\n "], ["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n }\n "])), rootClassName$Z, theme.typography.fontFamily, theme.typography.body1.fontSize);
2254
2281
  });
2255
- var templateObject_1$11, templateObject_2$_;
2282
+ var templateObject_1$12, templateObject_2$$;
2256
2283
 
2257
2284
  var flyoutMenuClassName = 'dot-flyout-menu';
2258
2285
  var rootClassName$Y = 'dot-menu';
@@ -2262,14 +2289,14 @@
2262
2289
  var StyledPopper = styled__default["default"](material.Popper).withConfig({
2263
2290
  displayName: "Menustyles__StyledPopper",
2264
2291
  componentId: "sc-134fmqu-0"
2265
- })(templateObject_2$Z || (templateObject_2$Z = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2292
+ })(templateObject_2$_ || (templateObject_2$_ = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2266
2293
  var theme = _a.theme;
2267
- return styled.css(templateObject_1$10 || (templateObject_1$10 = __makeTemplateObject(["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n z-index: ", ";\n }\n &.", ", &.", " {\n &.loading .MuiPaper-root {\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 200px;\n min-width: 200px;\n }\n\n ul,\n .dot-action-item {\n .dot-action-item-text {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n }\n\n ul {\n box-sizing: content-box;\n min-width: 112px;\n overflow: auto;\n\n /* Conditionally setting 'max-height' with transient prop */\n ", "\n\n .dot-li {\n min-height: auto;\n }\n }\n\n .dot-action-item {\n height: ", ";\n border-top: 1px solid ", ";\n line-height: inherit;\n\n button.dot-button {\n border-radius: ", ";\n justify-content: flex-start;\n height: 100%;\n margin: 0;\n\n &:focus-visible {\n background-color: ", ";\n }\n\n .MuiButton-label {\n gap: ", ";\n\n .MuiButton-startIcon {\n margin-left: 0;\n\n .dot-icon {\n flex-shrink: 0;\n }\n }\n }\n }\n }\n }\n "], ["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n z-index: ", ";\n }\n &.", ", &.", " {\n &.loading .MuiPaper-root {\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 200px;\n min-width: 200px;\n }\n\n ul,\n .dot-action-item {\n .dot-action-item-text {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n }\n\n ul {\n box-sizing: content-box;\n min-width: 112px;\n overflow: auto;\n\n /* Conditionally setting 'max-height' with transient prop */\n ", "\n\n .dot-li {\n min-height: auto;\n }\n }\n\n .dot-action-item {\n height: ", ";\n border-top: 1px solid ", ";\n line-height: inherit;\n\n button.dot-button {\n border-radius: ", ";\n justify-content: flex-start;\n height: 100%;\n margin: 0;\n\n &:focus-visible {\n background-color: ", ";\n }\n\n .MuiButton-label {\n gap: ", ";\n\n .MuiButton-startIcon {\n margin-left: 0;\n\n .dot-icon {\n flex-shrink: 0;\n }\n }\n }\n }\n }\n }\n "])), rootClassName$Z, theme.typography.fontFamily, theme.typography.body1.fontSize, levelSecond, rootClassName$Y, rootClassName$Z, function (_a) {
2294
+ return styled.css(templateObject_1$11 || (templateObject_1$11 = __makeTemplateObject(["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n z-index: ", ";\n }\n &.", ", &.", " {\n &.loading .MuiPaper-root {\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 200px;\n min-width: 200px;\n }\n\n ul,\n .dot-action-item {\n .dot-action-item-text {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n }\n\n ul {\n box-sizing: content-box;\n min-width: 112px;\n overflow: auto;\n\n /* Conditionally setting 'max-height' with transient prop */\n ", "\n\n .dot-li {\n min-height: auto;\n }\n }\n\n .dot-action-item {\n height: ", ";\n border-top: 1px solid ", ";\n line-height: inherit;\n\n button.dot-button {\n border-radius: ", ";\n justify-content: flex-start;\n height: 100%;\n margin: 0;\n\n &:focus-visible {\n background-color: ", ";\n }\n\n .MuiButton-label {\n gap: ", ";\n\n .MuiButton-startIcon {\n margin-left: 0;\n\n .dot-icon {\n flex-shrink: 0;\n }\n }\n }\n }\n }\n }\n "], ["\n &.", " {\n font-family: ", ";\n font-size: ", "px;\n z-index: ", ";\n }\n &.", ", &.", " {\n &.loading .MuiPaper-root {\n align-items: center;\n display: flex;\n justify-content: center;\n min-height: 200px;\n min-width: 200px;\n }\n\n ul,\n .dot-action-item {\n .dot-action-item-text {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n }\n }\n\n ul {\n box-sizing: content-box;\n min-width: 112px;\n overflow: auto;\n\n /* Conditionally setting 'max-height' with transient prop */\n ", "\n\n .dot-li {\n min-height: auto;\n }\n }\n\n .dot-action-item {\n height: ", ";\n border-top: 1px solid ", ";\n line-height: inherit;\n\n button.dot-button {\n border-radius: ", ";\n justify-content: flex-start;\n height: 100%;\n margin: 0;\n\n &:focus-visible {\n background-color: ", ";\n }\n\n .MuiButton-label {\n gap: ", ";\n\n .MuiButton-startIcon {\n margin-left: 0;\n\n .dot-icon {\n flex-shrink: 0;\n }\n }\n }\n }\n }\n }\n "])), rootClassName$Z, theme.typography.fontFamily, theme.typography.body1.fontSize, levelSecond, rootClassName$Y, rootClassName$Z, function (_a) {
2268
2295
  var $maxHeight = _a.$maxHeight;
2269
2296
  return $maxHeight !== undefined && "\n max-height: " + getListMaxHeight($maxHeight) + ";\n ";
2270
2297
  }, theme.spacing(7), theme.palette.grey[100], theme.spacing(0, 0, 0.5, 0.5), theme.palette.layer.n100, theme.spacing(3));
2271
2298
  });
2272
- var templateObject_1$10, templateObject_2$Z;
2299
+ var templateObject_1$11, templateObject_2$_;
2273
2300
 
2274
2301
  var MENU_ITEM_HEIGHT_NORMAL = 48;
2275
2302
  var MENU_ITEM_HEIGHT_DENSE = 36;
@@ -2281,11 +2308,11 @@
2281
2308
  var StyledMenuList = styled__default["default"](material.MenuList).withConfig({
2282
2309
  displayName: "MenuListstyles__StyledMenuList",
2283
2310
  componentId: "yqdwwg-0"
2284
- })(templateObject_2$Y || (templateObject_2$Y = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2311
+ })(templateObject_2$Z || (templateObject_2$Z = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2285
2312
  var theme = _a.theme;
2286
- return styled.css(templateObject_1$$ || (templateObject_1$$ = __makeTemplateObject(["\n &.", " {\n .dot-li {\n font-size: ", "px;\n justify-content: space-between;\n gap: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &.Mui-selected,\n &.Mui-selected:hover {\n background: ", ";\n }\n\n &.", " {\n padding-right: ", ";\n }\n }\n }\n "], ["\n &.", " {\n .dot-li {\n font-size: ", "px;\n justify-content: space-between;\n gap: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &.Mui-selected,\n &.Mui-selected:hover {\n background: ", ";\n }\n\n &.", " {\n padding-right: ", ";\n }\n }\n }\n "])), rootClassName$X, theme.typography.body1.fontSize, theme.spacing(3), hoverGray, lightSelectedGray, listItemWithSubmenuClassName, theme.spacing(0.5));
2313
+ return styled.css(templateObject_1$10 || (templateObject_1$10 = __makeTemplateObject(["\n &.", " {\n .dot-li {\n font-size: ", "px;\n justify-content: space-between;\n gap: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &.Mui-selected,\n &.Mui-selected:hover {\n background: ", ";\n }\n\n &.", " {\n padding-right: ", ";\n }\n }\n }\n "], ["\n &.", " {\n .dot-li {\n font-size: ", "px;\n justify-content: space-between;\n gap: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &.Mui-selected,\n &.Mui-selected:hover {\n background: ", ";\n }\n\n &.", " {\n padding-right: ", ";\n }\n }\n }\n "])), rootClassName$X, theme.typography.body1.fontSize, theme.spacing(3), hoverGray, lightSelectedGray, listItemWithSubmenuClassName, theme.spacing(0.5));
2287
2314
  });
2288
- var templateObject_1$$, templateObject_2$Y;
2315
+ var templateObject_1$10, templateObject_2$Z;
2289
2316
 
2290
2317
  var getDefaultItemHeight = function getDefaultItemHeight(isDense) {
2291
2318
  return isDense ? MENU_ITEM_HEIGHT_DENSE : MENU_ITEM_HEIGHT_NORMAL;
@@ -2576,21 +2603,13 @@
2576
2603
  }), void 0);
2577
2604
  };
2578
2605
 
2579
- var CreateUUID = function CreateUUID() {
2580
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
2581
- var r = Math.random() * 16 | 0,
2582
- v = c === 'x' ? r : r & 0x3 | 0x8;
2583
- return v.toString(16);
2584
- });
2585
- };
2586
-
2587
2606
  var rootClassName$W = 'dot-drawer';
2588
2607
  var StyledDrawer = styled__default["default"](material.Drawer).withConfig({
2589
2608
  displayName: "Drawerstyles__StyledDrawer",
2590
2609
  componentId: "sc-1uiowy0-0"
2591
- })(templateObject_2$X || (templateObject_2$X = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2610
+ })(templateObject_2$Y || (templateObject_2$Y = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2592
2611
  var theme = _a.theme;
2593
- return styled.css(templateObject_1$_ || (templateObject_1$_ = __makeTemplateObject(["\n &.", " .MuiBackdrop-root {\n background-color: ", ";\n }\n\n .dot-drawer-paper {\n height: ", ";\n padding: ", ";\n width: ", ";\n }\n "], ["\n &.", " .MuiBackdrop-root {\n background-color: ", ";\n }\n\n .dot-drawer-paper {\n height: ", ";\n padding: ", ";\n width: ", ";\n }\n "])), rootClassName$W, styles.alpha(theme.palette.grey[900], 0.7), function (_a) {
2612
+ return styled.css(templateObject_1$$ || (templateObject_1$$ = __makeTemplateObject(["\n &.", " .MuiBackdrop-root {\n background-color: ", ";\n }\n\n .dot-drawer-paper {\n height: ", ";\n padding: ", ";\n width: ", ";\n }\n "], ["\n &.", " .MuiBackdrop-root {\n background-color: ", ";\n }\n\n .dot-drawer-paper {\n height: ", ";\n padding: ", ";\n width: ", ";\n }\n "])), rootClassName$W, styles.alpha(theme.palette.grey[900], 0.7), function (_a) {
2594
2613
  var height = _a.height,
2595
2614
  anchor = _a.anchor;
2596
2615
  return anchor === 'left' || anchor === 'right' ? '100%' : height;
@@ -2600,27 +2619,27 @@
2600
2619
  return anchor === 'bottom' || anchor === 'top' ? 'auto' : width;
2601
2620
  });
2602
2621
  });
2603
- var templateObject_1$_, templateObject_2$X;
2622
+ var templateObject_1$$, templateObject_2$Y;
2604
2623
 
2605
2624
  var rootClassName$V = 'dot-drawer-header';
2606
2625
  var StyleDrawerHeader = styled__default["default"].div.withConfig({
2607
2626
  displayName: "DrawerHeaderstyles__StyleDrawerHeader",
2608
2627
  componentId: "sc-2d2xd3-0"
2609
- })(templateObject_2$W || (templateObject_2$W = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2628
+ })(templateObject_2$X || (templateObject_2$X = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2610
2629
  var theme = _a.theme;
2611
- return styled.css(templateObject_1$Z || (templateObject_1$Z = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n display: flex;\n align-items: center;\n .close-button {\n margin-left: auto;\n }\n }\n "], ["\n &.", " {\n padding: ", ";\n display: flex;\n align-items: center;\n .close-button {\n margin-left: auto;\n }\n }\n "])), rootClassName$V, theme.spacing(0, 0, 2));
2630
+ return styled.css(templateObject_1$_ || (templateObject_1$_ = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n display: flex;\n align-items: center;\n .close-button {\n margin-left: auto;\n }\n }\n "], ["\n &.", " {\n padding: ", ";\n display: flex;\n align-items: center;\n .close-button {\n margin-left: auto;\n }\n }\n "])), rootClassName$V, theme.spacing(0, 0, 2));
2612
2631
  });
2613
- var templateObject_1$Z, templateObject_2$W;
2632
+ var templateObject_1$_, templateObject_2$X;
2614
2633
 
2615
2634
  var rootClassName$U = 'dot-icon-btn';
2616
2635
  var StyledIconButton = styled__default["default"](material.IconButton).withConfig({
2617
2636
  displayName: "IconButtonstyles__StyledIconButton",
2618
2637
  componentId: "eko0kb-0"
2619
- })(templateObject_2$V || (templateObject_2$V = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2638
+ })(templateObject_2$W || (templateObject_2$W = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2620
2639
  var theme = _a.theme;
2621
- return styled.css(templateObject_1$Y || (templateObject_1$Y = __makeTemplateObject(["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "], ["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "])), rootClassName$U, theme.palette.grey[300], theme.spacing(1), hoverGray);
2640
+ return styled.css(templateObject_1$Z || (templateObject_1$Z = __makeTemplateObject(["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "], ["\n &.", " {\n font-size: inherit;\n padding: 10px;\n\n &.shape-square {\n border-radius: 4px;\n border: 1px solid ", ";\n padding: ", ";\n }\n\n .dot-icon.MuiIcon-fontSizeSmall {\n padding: 1px;\n }\n\n &.MuiIconButton-sizeSmall {\n padding: 3px;\n }\n\n &.ripple-disabled {\n &:hover, &:active, &:focus {\n background: ", ";\n }\n }\n "])), rootClassName$U, theme.palette.grey[300], theme.spacing(1), hoverGray);
2622
2641
  });
2623
- var templateObject_1$Y, templateObject_2$V;
2642
+ var templateObject_1$Z, templateObject_2$W;
2624
2643
 
2625
2644
  var DotIconButton = function DotIconButton(_a) {
2626
2645
  var ariaLabel = _a.ariaLabel,
@@ -2702,10 +2721,10 @@
2702
2721
  var StyleDrawerBody = styled__default["default"].div.withConfig({
2703
2722
  displayName: "DrawerBodystyles__StyleDrawerBody",
2704
2723
  componentId: "sc-1mpmjdk-0"
2705
- })(templateObject_2$U || (templateObject_2$U = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
2706
- return styled.css(templateObject_1$X || (templateObject_1$X = __makeTemplateObject(["\n &.", " {\n display: flex;\n .dot-drawer-close-button {\n align-self: self-start;\n padding: 0;\n margin-left: auto;\n }\n }\n "], ["\n &.", " {\n display: flex;\n .dot-drawer-close-button {\n align-self: self-start;\n padding: 0;\n margin-left: auto;\n }\n }\n "])), rootClassName$T);
2724
+ })(templateObject_2$V || (templateObject_2$V = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function () {
2725
+ return styled.css(templateObject_1$Y || (templateObject_1$Y = __makeTemplateObject(["\n &.", " {\n display: flex;\n .dot-drawer-close-button {\n align-self: self-start;\n padding: 0;\n margin-left: auto;\n }\n }\n "], ["\n &.", " {\n display: flex;\n .dot-drawer-close-button {\n align-self: self-start;\n padding: 0;\n margin-left: auto;\n }\n }\n "])), rootClassName$T);
2707
2726
  });
2708
- var templateObject_1$X, templateObject_2$U;
2727
+ var templateObject_1$Y, templateObject_2$V;
2709
2728
 
2710
2729
  var DotDrawerBody = function DotDrawerBody(_a) {
2711
2730
  var ariaLabel = _a.ariaLabel,
@@ -2737,11 +2756,11 @@
2737
2756
  var StyleDrawerFooter = styled__default["default"].div.withConfig({
2738
2757
  displayName: "DrawerFooterstyles__StyleDrawerFooter",
2739
2758
  componentId: "sc-1ki05ze-0"
2740
- })(templateObject_2$T || (templateObject_2$T = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2759
+ })(templateObject_2$U || (templateObject_2$U = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2741
2760
  var theme = _a.theme;
2742
- return styled.css(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n }\n "], ["\n &.", " {\n padding: ", ";\n }\n "])), rootClassName$S, theme.spacing(2, 0, 0));
2761
+ return styled.css(templateObject_1$X || (templateObject_1$X = __makeTemplateObject(["\n &.", " {\n padding: ", ";\n }\n "], ["\n &.", " {\n padding: ", ";\n }\n "])), rootClassName$S, theme.spacing(2, 0, 0));
2743
2762
  });
2744
- var templateObject_1$W, templateObject_2$T;
2763
+ var templateObject_1$X, templateObject_2$U;
2745
2764
 
2746
2765
  var DotDrawerFooter = function DotDrawerFooter(_a) {
2747
2766
  var ariaLabel = _a.ariaLabel,
@@ -2841,257 +2860,32 @@
2841
2860
  }), void 0);
2842
2861
  };
2843
2862
 
2844
- var fadeIn = styled.keyframes(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
2863
+ var fadeIn = styled.keyframes(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
2845
2864
  var StyledDotDrawer = styled__default["default"](DotDrawer).withConfig({
2846
2865
  displayName: "NestedListstyles__StyledDotDrawer",
2847
2866
  componentId: "sc-1wwoqos-0"
2848
2867
  })(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2849
2868
  var open = _a.open;
2850
- return styled.css(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n &.", " {\n .dot-drawer-paper {\n z-index: ", ";\n animation: ", ";\n }\n }\n "], ["\n &.", " {\n .dot-drawer-paper {\n z-index: ", ";\n animation: ", ";\n }\n }\n "])), nestedDrawerClassName, open ? levelFirst : levelBottom, open && styled.css(templateObject_2$S || (templateObject_2$S = __makeTemplateObject(["\n ", " 0.2s cubic-bezier(1,0,1,.01);\n "], ["\n ", " 0.2s cubic-bezier(1,0,1,.01);\n "])), fadeIn));
2869
+ return styled.css(templateObject_3$b || (templateObject_3$b = __makeTemplateObject(["\n &.", " {\n .dot-drawer-paper {\n z-index: ", ";\n animation: ", ";\n }\n }\n "], ["\n &.", " {\n .dot-drawer-paper {\n z-index: ", ";\n animation: ", ";\n }\n }\n "])), nestedDrawerClassName, open ? levelFirst : levelBottom, open && styled.css(templateObject_2$T || (templateObject_2$T = __makeTemplateObject(["\n ", " 0.2s cubic-bezier(1,0,1,.01);\n "], ["\n ", " 0.2s cubic-bezier(1,0,1,.01);\n "])), fadeIn));
2851
2870
  });
2852
- var templateObject_1$V, templateObject_2$S, templateObject_3$b, templateObject_4$9;
2871
+ var templateObject_1$W, templateObject_2$T, templateObject_3$b, templateObject_4$9;
2853
2872
 
2854
- var DEFAULT_TOOLTIP_PLACEMENT = 'top-start';
2855
- var DotListDivider = function DotListDivider(_a) {
2856
- var item = _a.item,
2857
- index = _a.index;
2858
- if (item.text) {
2859
- return jsxRuntime.jsx(material.ListSubheader, __assign({
2860
- disableSticky: true
2861
- }, {
2862
- children: jsxRuntime.jsx(DotTypography, __assign({
2863
- ariaRole: "heading",
2864
- ariaLevel: 3,
2865
- variant: "overline"
2866
- }, {
2867
- children: item.text
2868
- }), void 0)
2869
- }), void 0);
2870
- }
2871
- return jsxRuntime.jsx("li", {
2872
- children: jsxRuntime.jsx(material.Divider, {
2873
- "aria-hidden": true,
2874
- "data-testid": "divider-" + index,
2875
- role: "separator"
2876
- }, void 0)
2877
- }, void 0);
2878
- };
2879
- var DotList = function DotList(_a) {
2880
- var ariaLabel = _a.ariaLabel,
2881
- _b = _a.ariaRole,
2882
- ariaRole = _b === void 0 ? 'list' : _b,
2883
- children = _a.children,
2884
- className = _a.className,
2885
- _c = _a.component,
2886
- component = _c === void 0 ? 'ul' : _c,
2887
- dataTestId = _a["data-testid"],
2888
- _d = _a.dense,
2889
- dense = _d === void 0 ? false : _d,
2890
- _e = _a.disablePadding,
2891
- disablePadding = _e === void 0 ? false : _e,
2892
- _f = _a.items,
2893
- items = _f === void 0 ? [] : _f,
2894
- _g = _a.menuPlacement,
2895
- menuPlacement = _g === void 0 ? 'right-start' : _g,
2896
- _h = _a.nestedDrawerLeftSpacing,
2897
- nestedDrawerLeftSpacing = _h === void 0 ? 240 : _h,
2898
- _j = _a.nestedListType,
2899
- nestedListType = _j === void 0 ? 'expandable' : _j,
2900
- _k = _a.width,
2901
- width = _k === void 0 ? 240 : _k;
2902
- var rootClasses = useStylesWithRootClass(rootClassName$$, className);
2903
- var listWidth = typeof width === 'number' ? width + "px" : width;
2904
- var listRef = React.useRef();
2905
- var _l = React.useState(null),
2906
- listItemIndex = _l[0],
2907
- setListItemIndex = _l[1];
2908
- var updateSelectedListItem = function updateSelectedListItem(currentIndex) {
2909
- currentIndex === listItemIndex ? setListItemIndex(null) : setListItemIndex(currentIndex);
2910
- };
2911
- return jsxRuntime.jsxs(StyledList, __assign({
2912
- "aria-label": ariaLabel,
2913
- classes: {
2914
- root: rootClasses
2915
- },
2916
- component: component,
2917
- "data-testid": dataTestId,
2918
- dense: dense,
2919
- disablePadding: disablePadding,
2920
- ref: listRef,
2921
- role: ariaRole,
2922
- style: {
2923
- width: listWidth
2924
- }
2925
- }, {
2926
- children: [items.map(function (item, index) {
2927
- var handleListItemClick = function handleListItemClick(e) {
2928
- var _a;
2929
- updateSelectedListItem(index);
2930
- (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, e);
2931
- };
2932
- var handleMenuLeave = function handleMenuLeave(event) {
2933
- var _a, _b;
2934
- // Remove index only if clicked element is not found within the list
2935
- if (!((_a = listRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
2936
- setListItemIndex(null);
2937
- (_b = item.onMenuLeave) === null || _b === void 0 ? void 0 : _b.call(item, event);
2938
- }
2939
- };
2940
- if (item.child) {
2941
- return jsxRuntime.jsx("div", __assign({
2942
- role: "listitem"
2943
- }, {
2944
- children: item.child
2945
- }), "item-child-" + index);
2946
- }
2947
- if (item.divider) {
2948
- return jsxRuntime.jsx(DotListDivider, {
2949
- index: index,
2950
- item: item
2951
- }, "divider-" + index);
2952
- }
2953
- return jsxRuntime.jsx(DotListItem, {
2954
- ariaLabel: item.text || item.primaryText,
2955
- className: item.className,
2956
- component: item.component,
2957
- "data-testid": dataTestId + "-item-" + index,
2958
- endIcon: item.endIcon,
2959
- href: item.href,
2960
- isOpened: listItemIndex === index,
2961
- items: item.items,
2962
- menuPlacement: menuPlacement,
2963
- nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
2964
- nestedListType: nestedListType,
2965
- onClick: item.href && !item.onClick ? null : handleListItemClick,
2966
- onMenuLeave: handleMenuLeave,
2967
- primaryText: item.primaryText,
2968
- secondaryText: item.secondaryText,
2969
- selected: item.selected,
2970
- startIcon: item.startIcon,
2971
- target: item.target,
2972
- text: item.text,
2973
- tooltip: item.tooltip,
2974
- tooltipPlacement: item.tooltipPlacement || DEFAULT_TOOLTIP_PLACEMENT
2975
- }, index);
2976
- }), children]
2977
- }), void 0);
2978
- };
2979
- var DotListItem = function DotListItem(_a) {
2980
- var ariaLabel = _a.ariaLabel,
2981
- _b = _a.ariaRole,
2982
- ariaRole = _b === void 0 ? 'listitem' : _b,
2983
- className = _a.className,
2984
- _c = _a.component,
2985
- component = _c === void 0 ? 'li' : _c,
2986
- dataTestId = _a["data-testid"],
2987
- _d = _a.divider,
2988
- divider = _d === void 0 ? false : _d,
2989
- endIcon = _a.endIcon,
2990
- href = _a.href,
2991
- isOpened = _a.isOpened,
2992
- onClick = _a.onClick,
2993
- onMenuLeave = _a.onMenuLeave,
2994
- _e = _a.items,
2995
- items = _e === void 0 ? [] : _e,
2996
- menuPlacement = _a.menuPlacement,
2997
- nestedDrawerLeftSpacing = _a.nestedDrawerLeftSpacing,
2998
- nestedListType = _a.nestedListType,
2999
- primaryText = _a.primaryText,
3000
- secondaryText = _a.secondaryText,
3001
- selected = _a.selected,
3002
- startIcon = _a.startIcon,
3003
- target = _a.target,
3004
- text = _a.text,
3005
- tooltip = _a.tooltip,
3006
- _f = _a.tooltipPlacement,
3007
- tooltipPlacement = _f === void 0 ? DEFAULT_TOOLTIP_PLACEMENT : _f;
3008
- var hasChildren = items.length > 0;
3009
- var isFlyout = nestedListType === 'menu' && hasChildren;
3010
- var _g = React.useState(null),
3011
- anchorEl = _g[0],
3012
- setAnchorEl = _g[1];
3013
- var showEndIcon = endIcon || hasChildren;
3014
- var rootClasses = useStylesWithRootClass(listItemRootClass, className, nestedListType === 'expandable' && hasChildren ? 'expandable' : '', isOpened ? 'open' : '');
3015
- var toggleOpen = function toggleOpen(event) {
3016
- return setAnchorEl(event.currentTarget);
3017
- };
3018
- var handleClick = function handleClick(event) {
3019
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
3020
- toggleOpen(event);
3021
- };
3022
- var handleMenuLeave = function handleMenuLeave(event) {
3023
- return onMenuLeave(event);
3024
- };
3025
- var renderListItemText = function renderListItemText() {
3026
- return primaryText && secondaryText ? jsxRuntime.jsx(material.ListItemText, {
3027
- primary: primaryText,
3028
- secondary: secondaryText
3029
- }, void 0) : jsxRuntime.jsx(DotTypography, __assign({
3030
- variant: "body1"
3031
- }, {
3032
- children: text
3033
- }), void 0);
3034
- };
3035
- var renderListItemEndIcon = function renderListItemEndIcon() {
3036
- if (hasChildren || !endIcon) {
3037
- return jsxRuntime.jsx(DotIcon, {
3038
- iconId: hasChildren && getChevronIcon(nestedListType, isOpened)
3039
- }, void 0);
3040
- }
3041
- return endIcon;
3042
- };
3043
- var renderListItemLink = jsxRuntime.jsxs(DotLink, __assign({
3044
- className: listItemLinkClassName,
3045
- href: href,
3046
- target: target,
3047
- underline: "none"
3048
- }, {
3049
- children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
3050
- children: startIcon
3051
- }, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
3052
- }), void 0);
3053
- var ListItem = onClick || href ? StyledListItemButton : StyledListItem;
3054
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
3055
- children: [jsxRuntime.jsx(ListItem, __assign({
3056
- "aria-label": ariaLabel || tooltip,
3057
- classes: {
3058
- root: rootClasses
3059
- },
3060
- component: component,
3061
- "data-testid": dataTestId,
3062
- divider: divider,
3063
- href: onClick ? null : href,
3064
- onClick: onClick || !href ? handleClick : null,
3065
- role: ariaRole,
3066
- selected: isFlyout ? isOpened : selected,
3067
- target: target
3068
- }, {
3069
- children: jsxRuntime.jsx(jsxRuntime.Fragment, {
3070
- children: jsxRuntime.jsx(DotTooltip, __assign({
3071
- "data-testid": dataTestId + "-tooltip",
3072
- placement: tooltipPlacement,
3073
- title: tooltip
3074
- }, {
3075
- children: href && !onClick ? renderListItemLink : jsxRuntime.jsxs(jsxRuntime.Fragment, {
3076
- children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
3077
- children: startIcon
3078
- }, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
3079
- }, void 0)
3080
- }), void 0)
3081
- }, void 0)
3082
- }), void 0), hasChildren && jsxRuntime.jsx(NestedList, {
3083
- anchorEl: anchorEl,
3084
- ariaLabel: "nested list",
3085
- "data-testid": "nestedList",
3086
- items: items,
3087
- menuPlacement: menuPlacement,
3088
- nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
3089
- onMenuLeave: handleMenuLeave,
3090
- open: isOpened,
3091
- type: nestedListType
3092
- }, void 0)]
3093
- }, void 0);
2873
+ var flyoutListItemClassName = 'dot-flyout-list-item';
2874
+ var flyoutItemLinkClassName = 'dot-flyout-item-link';
2875
+ var listItemLinkClassName = 'dot-list-item-link';
2876
+ var styledListItemElement = function styledListItemElement(elementType) {
2877
+ return styled__default["default"](elementType).withConfig({
2878
+ displayName: "ListItemstyles",
2879
+ componentId: "sc-1fawh8v-0"
2880
+ })(templateObject_2$S || (templateObject_2$S = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), function (_a) {
2881
+ var theme = _a.theme;
2882
+ return styled.css(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "], ["\n &.", " {\n &.", " {\n padding: 0;\n }\n\n .dot-tooltip {\n display: flex;\n width: 100%;\n }\n\n p.MuiTypography-root {\n flex-grow: 2;\n margin-bottom: 0;\n }\n\n .", " {\n align-items: center;\n display: flex;\n flex-grow: 2;\n }\n\n .", " .MuiIcon-root {\n margin-right: ", ";\n }\n\n .dot-icon i:before {\n color: ", ";\n }\n }\n "])), listItemRootClass, flyoutListItemClassName, listItemLinkClassName, flyoutItemLinkClassName, theme.spacing(4), theme.palette.text.primary);
2883
+ });
3094
2884
  };
2885
+ var StyledListItem = styledListItemElement(material.ListItem);
2886
+ var StyledListItemButton = styledListItemElement(material.ListItemButton);
2887
+ var templateObject_1$V, templateObject_2$S;
2888
+
3095
2889
  var NestedList = function NestedList(_a) {
3096
2890
  var ariaLabel = _a.ariaLabel,
3097
2891
  anchorEl = _a.anchorEl,
@@ -3117,7 +2911,8 @@
3117
2911
  component: "div",
3118
2912
  "data-testid": dataTestId,
3119
2913
  disablePadding: true,
3120
- items: items
2914
+ items: items,
2915
+ width: '100%'
3121
2916
  }, parentItemIndex)
3122
2917
  }), void 0);
3123
2918
  }
@@ -3152,8 +2947,8 @@
3152
2947
  children: text
3153
2948
  }), void 0)]
3154
2949
  }), void 0)
3155
- }), parentItemIndex + "-" + index + "-tooltip")
3156
- }), parentItemIndex + "-" + index),
2950
+ }), parentItemIndex + "-" + CreateUUID() + "-tooltip")
2951
+ }), parentItemIndex + "-" + CreateUUID()),
3157
2952
  classes: '',
3158
2953
  key: String(index)
3159
2954
  };
@@ -3197,6 +2992,261 @@
3197
2992
  }
3198
2993
  };
3199
2994
 
2995
+ var DotListItem = function DotListItem(_a) {
2996
+ var ariaLabel = _a.ariaLabel,
2997
+ _b = _a.ariaRole,
2998
+ ariaRole = _b === void 0 ? 'listitem' : _b,
2999
+ className = _a.className,
3000
+ _c = _a.component,
3001
+ component = _c === void 0 ? 'li' : _c,
3002
+ dataTestId = _a["data-testid"],
3003
+ _d = _a.divider,
3004
+ divider = _d === void 0 ? false : _d,
3005
+ endIcon = _a.endIcon,
3006
+ href = _a.href,
3007
+ _e = _a.isOpened,
3008
+ isOpened = _e === void 0 ? false : _e,
3009
+ onClick = _a.onClick,
3010
+ onMenuLeave = _a.onMenuLeave,
3011
+ _f = _a.items,
3012
+ items = _f === void 0 ? [] : _f,
3013
+ menuPlacement = _a.menuPlacement,
3014
+ nestedDrawerLeftSpacing = _a.nestedDrawerLeftSpacing,
3015
+ nestedListType = _a.nestedListType,
3016
+ primaryText = _a.primaryText,
3017
+ secondaryText = _a.secondaryText,
3018
+ selected = _a.selected,
3019
+ startIcon = _a.startIcon,
3020
+ target = _a.target,
3021
+ text = _a.text,
3022
+ tooltip = _a.tooltip,
3023
+ _g = _a.tooltipPlacement,
3024
+ tooltipPlacement = _g === void 0 ? DEFAULT_TOOLTIP_PLACEMENT : _g;
3025
+ var _h = React.useState(null),
3026
+ anchorEl = _h[0],
3027
+ setAnchorEl = _h[1];
3028
+ var _j = React.useState(isOpened),
3029
+ navIsOpened = _j[0],
3030
+ setNavIsOpened = _j[1];
3031
+ var hasChildren = items.length > 0;
3032
+ var isFlyout = nestedListType === 'menu' && hasChildren;
3033
+ var showEndIcon = endIcon || hasChildren;
3034
+ var rootClasses = useStylesWithRootClass(listItemRootClass, className, nestedListType === 'expandable' && hasChildren ? 'expandable' : '', navIsOpened ? 'open' : '');
3035
+ var toggleOpen = function toggleOpen(event) {
3036
+ setAnchorEl(event.currentTarget);
3037
+ setNavIsOpened(!navIsOpened);
3038
+ };
3039
+ var handleClick = function handleClick(event) {
3040
+ var eventTarget = event.target;
3041
+ event.stopPropagation();
3042
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
3043
+ // only toggle open if clicking on a link
3044
+ if (shouldToggleOpen(eventTarget.className)) {
3045
+ toggleOpen(event);
3046
+ }
3047
+ };
3048
+ var handleMenuLeave = function handleMenuLeave(event) {
3049
+ onMenuLeave(event);
3050
+ };
3051
+ var renderListItemText = function renderListItemText() {
3052
+ return primaryText && secondaryText ? jsxRuntime.jsx(material.ListItemText, {
3053
+ primary: primaryText,
3054
+ secondary: secondaryText
3055
+ }, void 0) : jsxRuntime.jsx(DotTypography, __assign({
3056
+ variant: "body1"
3057
+ }, {
3058
+ children: text
3059
+ }), void 0);
3060
+ };
3061
+ var renderListItemEndIcon = function renderListItemEndIcon() {
3062
+ if (hasChildren || !endIcon) {
3063
+ return jsxRuntime.jsx(DotIcon, {
3064
+ iconId: hasChildren && getChevronIcon(nestedListType, navIsOpened)
3065
+ }, void 0);
3066
+ }
3067
+ return endIcon;
3068
+ };
3069
+ var renderListItemLink = jsxRuntime.jsxs(DotLink, __assign({
3070
+ ariaLabel: ariaLabel || tooltip,
3071
+ className: listItemLinkClassName,
3072
+ href: href,
3073
+ target: target,
3074
+ underline: "none"
3075
+ }, {
3076
+ children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
3077
+ children: startIcon
3078
+ }, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
3079
+ }), void 0);
3080
+ var ListItem = onClick || href ? StyledListItemButton : StyledListItem;
3081
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
3082
+ children: [jsxRuntime.jsx(ListItem, __assign({
3083
+ "aria-label": ariaLabel || tooltip,
3084
+ classes: {
3085
+ root: rootClasses
3086
+ },
3087
+ component: component,
3088
+ "data-testid": dataTestId,
3089
+ divider: divider,
3090
+ href: onClick ? null : href,
3091
+ onClick: onClick || !href ? handleClick : null,
3092
+ role: ariaRole,
3093
+ selected: isFlyout ? navIsOpened : selected,
3094
+ target: target
3095
+ }, {
3096
+ children: jsxRuntime.jsx(DotTooltip, __assign({
3097
+ "data-testid": dataTestId + "-tooltip",
3098
+ placement: tooltipPlacement,
3099
+ title: tooltip
3100
+ }, {
3101
+ children: href && !onClick ? renderListItemLink : jsxRuntime.jsxs(jsxRuntime.Fragment, {
3102
+ children: [startIcon && jsxRuntime.jsx(material.ListItemIcon, {
3103
+ children: startIcon
3104
+ }, void 0), renderListItemText(), showEndIcon && renderListItemEndIcon()]
3105
+ }, void 0)
3106
+ }), void 0)
3107
+ }), void 0), hasChildren && jsxRuntime.jsx(NestedList, {
3108
+ anchorEl: anchorEl,
3109
+ ariaLabel: "nested list",
3110
+ "data-testid": "nestedList",
3111
+ items: items,
3112
+ menuPlacement: menuPlacement,
3113
+ nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
3114
+ onMenuLeave: handleMenuLeave,
3115
+ open: navIsOpened,
3116
+ type: nestedListType
3117
+ }, void 0)]
3118
+ }, void 0);
3119
+ };
3120
+
3121
+ var DotClickAwayListener = function DotClickAwayListener(_a) {
3122
+ var children = _a.children,
3123
+ _b = _a.disableReactTree,
3124
+ disableReactTree = _b === void 0 ? false : _b,
3125
+ onClickAway = _a.onClickAway;
3126
+ return jsxRuntime.jsx(material.ClickAwayListener, {
3127
+ children: children,
3128
+ disableReactTree: disableReactTree,
3129
+ onClickAway: onClickAway
3130
+ }, void 0);
3131
+ };
3132
+
3133
+ var DotList = function DotList(_a) {
3134
+ var ariaLabel = _a.ariaLabel,
3135
+ _b = _a.ariaRole,
3136
+ ariaRole = _b === void 0 ? 'list' : _b,
3137
+ children = _a.children,
3138
+ className = _a.className,
3139
+ _c = _a.component,
3140
+ component = _c === void 0 ? 'ul' : _c,
3141
+ dataTestId = _a["data-testid"],
3142
+ _d = _a.dense,
3143
+ dense = _d === void 0 ? false : _d,
3144
+ _e = _a.disablePadding,
3145
+ disablePadding = _e === void 0 ? false : _e,
3146
+ _f = _a.items,
3147
+ items = _f === void 0 ? [] : _f,
3148
+ _g = _a.menuPlacement,
3149
+ menuPlacement = _g === void 0 ? 'right-start' : _g,
3150
+ _h = _a.nestedDrawerLeftSpacing,
3151
+ nestedDrawerLeftSpacing = _h === void 0 ? 240 : _h,
3152
+ _j = _a.nestedListType,
3153
+ nestedListType = _j === void 0 ? 'expandable' : _j,
3154
+ _k = _a.width,
3155
+ width = _k === void 0 ? 240 : _k;
3156
+ var rootClasses = useStylesWithRootClass(rootClassName$$, className);
3157
+ var listWidth = typeof width === 'number' ? width + "px" : width;
3158
+ var listRef = React.useRef();
3159
+ var _l = React.useState(null),
3160
+ listItemIndex = _l[0],
3161
+ setListItemIndex = _l[1];
3162
+ var updateSelectedListItem = function updateSelectedListItem(currentIndex) {
3163
+ currentIndex === listItemIndex ? setListItemIndex(null) : setListItemIndex(currentIndex);
3164
+ };
3165
+ var handleClickAway = function handleClickAway() {
3166
+ setListItemIndex(null);
3167
+ };
3168
+ return jsxRuntime.jsx(DotClickAwayListener, __assign({
3169
+ onClickAway: handleClickAway
3170
+ }, {
3171
+ children: jsxRuntime.jsxs(StyledList, __assign({
3172
+ "aria-label": ariaLabel,
3173
+ classes: {
3174
+ root: rootClasses
3175
+ },
3176
+ component: component,
3177
+ "data-testid": dataTestId,
3178
+ dense: dense,
3179
+ disablePadding: disablePadding,
3180
+ ref: listRef,
3181
+ role: ariaRole,
3182
+ style: {
3183
+ width: listWidth
3184
+ }
3185
+ }, {
3186
+ children: [items.map(function (item, index) {
3187
+ var handleListItemClick = function handleListItemClick(e) {
3188
+ var _a;
3189
+ var target = e.target;
3190
+ e.stopPropagation();
3191
+ (_a = item.onClick) === null || _a === void 0 ? void 0 : _a.call(item, e);
3192
+ // If clicking on a nested list item, don't update the selected index
3193
+ // Do nothing if clicking on the drawer itself
3194
+ if (shouldToggleOpen(target.className)) {
3195
+ updateSelectedListItem(index);
3196
+ }
3197
+ };
3198
+ var determineOnClick = item.href && !item.onClick ? null : handleListItemClick;
3199
+ var handleMenuLeave = function handleMenuLeave(event) {
3200
+ // TODO: Need to apply animation to open/close
3201
+ var _a, _b;
3202
+ // Remove index only if clicked element is not found within the list
3203
+ if (!((_a = listRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
3204
+ setListItemIndex(null);
3205
+ (_b = item.onMenuLeave) === null || _b === void 0 ? void 0 : _b.call(item, event);
3206
+ }
3207
+ };
3208
+ if (item.child) {
3209
+ return jsxRuntime.jsx("div", __assign({
3210
+ onClick: item.onClick,
3211
+ role: "listitem"
3212
+ }, {
3213
+ children: item.child
3214
+ }), "item-child-" + CreateUUID());
3215
+ }
3216
+ if (item.divider) {
3217
+ return jsxRuntime.jsx(DotListDivider, {
3218
+ index: index,
3219
+ item: item
3220
+ }, "divider-" + CreateUUID());
3221
+ }
3222
+ return jsxRuntime.jsx(DotListItem, {
3223
+ ariaLabel: item.text || item.primaryText,
3224
+ className: item.className,
3225
+ component: item.component,
3226
+ "data-testid": dataTestId + "-item-" + index,
3227
+ endIcon: item.endIcon,
3228
+ href: item.href,
3229
+ isOpened: listItemIndex === index,
3230
+ items: item.items,
3231
+ menuPlacement: menuPlacement,
3232
+ nestedDrawerLeftSpacing: nestedDrawerLeftSpacing,
3233
+ nestedListType: nestedListType,
3234
+ onClick: determineOnClick,
3235
+ onMenuLeave: handleMenuLeave,
3236
+ primaryText: item.primaryText,
3237
+ secondaryText: item.secondaryText,
3238
+ selected: item.selected,
3239
+ startIcon: item.startIcon,
3240
+ target: item.target,
3241
+ text: item.text,
3242
+ tooltip: item.tooltip,
3243
+ tooltipPlacement: item.tooltipPlacement || DEFAULT_TOOLTIP_PLACEMENT
3244
+ }, CreateUUID());
3245
+ }), children]
3246
+ }), void 0)
3247
+ }), void 0);
3248
+ };
3249
+
3200
3250
  var DotInputLabel = function DotInputLabel(_a) {
3201
3251
  var dataTestId = _a["data-testid"],
3202
3252
  _b = _a.disabled,
@@ -9466,22 +9516,24 @@
9466
9516
  * to determine the functionality of the table.
9467
9517
  */
9468
9518
  var DotTableBody = function DotTableBody(_a) {
9469
- var collapsibleTableBody = _a.collapsibleTableBody,
9519
+ var _b = _a.actionsMenuPlacement,
9520
+ actionsMenuPlacement = _b === void 0 ? 'bottom-end' : _b,
9521
+ collapsibleTableBody = _a.collapsibleTableBody,
9470
9522
  columns = _a.columns,
9471
9523
  data = _a.data,
9472
9524
  emptyMessage = _a.emptyMessage,
9473
9525
  multiSelectBody = _a.multiSelectBody,
9474
9526
  onRowClick = _a.onRowClick,
9475
9527
  typography = _a.typography;
9476
- var _b = React.useState(null),
9477
- anchorEl = _b[0],
9478
- setAnchorEl = _b[1];
9479
- var _c = React.useState([]),
9480
- menuProps = _c[0],
9481
- setMenuProps = _c[1];
9482
- var _d = React.useState(false),
9483
- open = _d[0],
9484
- setOpen = _d[1];
9528
+ var _c = React.useState(null),
9529
+ anchorEl = _c[0],
9530
+ setAnchorEl = _c[1];
9531
+ var _d = React.useState([]),
9532
+ menuProps = _d[0],
9533
+ setMenuProps = _d[1];
9534
+ var _e = React.useState(false),
9535
+ open = _e[0],
9536
+ setOpen = _e[1];
9485
9537
  var handleActionMenuTrigger = function handleActionMenuTrigger(el, menuItem) {
9486
9538
  setAnchorEl(el);
9487
9539
  setMenuProps(menuItem);
@@ -9524,7 +9576,7 @@
9524
9576
  disablePortal: true,
9525
9577
  id: menuId,
9526
9578
  menuItems: menuProps,
9527
- menuPlacement: "bottom-end",
9579
+ menuPlacement: actionsMenuPlacement,
9528
9580
  onLeave: onLeave,
9529
9581
  open: open
9530
9582
  }, void 0)]
@@ -9808,9 +9860,11 @@
9808
9860
  * creating a common structure for tables in the system.
9809
9861
  */
9810
9862
  var DotTable = function DotTable(_a) {
9811
- var ariaLabel = _a.ariaLabel,
9812
- _b = _a.bodyTypography,
9813
- bodyTypography = _b === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _b,
9863
+ var _b = _a.actionsMenuPlacement,
9864
+ actionsMenuPlacement = _b === void 0 ? 'bottom-end' : _b,
9865
+ ariaLabel = _a.ariaLabel,
9866
+ _c = _a.bodyTypography,
9867
+ bodyTypography = _c === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _c,
9814
9868
  className = _a.className,
9815
9869
  collapsibleTableOptions = _a.collapsibleTableOptions,
9816
9870
  columns = _a.columns,
@@ -9818,53 +9872,53 @@
9818
9872
  data = _a.data,
9819
9873
  dataTestId = _a["data-testid"],
9820
9874
  emptyMessage = _a.emptyMessage,
9821
- _c = _a.footerTypography,
9822
- footerTypography = _c === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _c,
9823
- _d = _a.headerTypography,
9824
- headerTypography = _d === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _d,
9875
+ _d = _a.footerTypography,
9876
+ footerTypography = _d === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _d,
9877
+ _e = _a.headerTypography,
9878
+ headerTypography = _e === void 0 ? TABLE_TYPOGRAPHY_VARIANT : _e,
9825
9879
  labelRowsPerPage = _a.labelRowsPerPage,
9826
- _e = _a.loading,
9827
- loading = _e === void 0 ? false : _e,
9880
+ _f = _a.loading,
9881
+ loading = _f === void 0 ? false : _f,
9828
9882
  maxHeight = _a.maxHeight,
9829
9883
  multiSelect = _a.multiSelect,
9830
- _f = _a.order,
9831
- order = _f === void 0 ? 'asc' : _f,
9884
+ _g = _a.order,
9885
+ order = _g === void 0 ? 'asc' : _g,
9832
9886
  orderBy = _a.orderBy,
9833
9887
  onRowClick = _a.onRowClick,
9834
9888
  onUpdateData = _a.onUpdateData,
9835
- _g = _a.page,
9836
- page = _g === void 0 ? 0 : _g,
9889
+ _h = _a.page,
9890
+ page = _h === void 0 ? 0 : _h,
9837
9891
  rowsPerPage = _a.rowsPerPage,
9838
9892
  rowsPerPageOptions = _a.rowsPerPageOptions,
9839
- _h = _a.stickyHeader,
9840
- stickyHeader = _h === void 0 ? true : _h,
9841
- _j = _a.sortable,
9842
- sortable = _j === void 0 ? true : _j,
9893
+ _j = _a.stickyHeader,
9894
+ stickyHeader = _j === void 0 ? true : _j,
9895
+ _k = _a.sortable,
9896
+ sortable = _k === void 0 ? true : _k,
9843
9897
  toolbar = _a.toolbar;
9844
- var _k = React.useState(order),
9845
- tableOrder = _k[0],
9846
- setOrder = _k[1];
9847
- var _l = React.useState(orderBy),
9848
- tableOrderBy = _l[0],
9849
- setOrderBy = _l[1];
9850
- var _m = React.useState(page),
9851
- tablePage = _m[0],
9852
- setPage = _m[1];
9853
- var _o = React.useState(rowsPerPage),
9854
- tableRowsPerPage = _o[0],
9855
- setRowsPerPage = _o[1];
9856
- var _p = React.useState([]),
9857
- selectedRowIds = _p[0],
9858
- setSelectedRowIds = _p[1];
9898
+ var _l = React.useState(order),
9899
+ tableOrder = _l[0],
9900
+ setOrder = _l[1];
9901
+ var _m = React.useState(orderBy),
9902
+ tableOrderBy = _m[0],
9903
+ setOrderBy = _m[1];
9904
+ var _o = React.useState(page),
9905
+ tablePage = _o[0],
9906
+ setPage = _o[1];
9907
+ var _p = React.useState(rowsPerPage),
9908
+ tableRowsPerPage = _p[0],
9909
+ setRowsPerPage = _p[1];
9859
9910
  var _q = React.useState([]),
9860
- expandedRowIds = _q[0],
9861
- setExpandedRowIds = _q[1];
9911
+ selectedRowIds = _q[0],
9912
+ setSelectedRowIds = _q[1];
9913
+ var _r = React.useState([]),
9914
+ expandedRowIds = _r[0],
9915
+ setExpandedRowIds = _r[1];
9862
9916
  var getSortedData = function getSortedData() {
9863
9917
  return onUpdateData ? data : stableSort(data, getComparator(order, orderBy));
9864
9918
  };
9865
- var _r = React.useState(getSortedData().slice(0, rowsPerPage ? rowsPerPage : data.length)),
9866
- pageData = _r[0],
9867
- setPageData = _r[1];
9919
+ var _s = React.useState(getSortedData().slice(0, rowsPerPage ? rowsPerPage : data.length)),
9920
+ pageData = _s[0],
9921
+ setPageData = _s[1];
9868
9922
  var rootClasses = useStylesWithRootClass(rootClassName$i, className, loading ? 'loading' : '');
9869
9923
  var updateData = function updateData(newOrder, newOrderBy, newPage, newRowsPerPage) {
9870
9924
  var newData = stableSort(data, getComparator(newOrder, newOrderBy));
@@ -10008,6 +10062,7 @@
10008
10062
  sortable: sortable,
10009
10063
  typography: headerTypography
10010
10064
  }, void 0), jsxRuntime.jsx(DotTableBody, {
10065
+ actionsMenuPlacement: actionsMenuPlacement,
10011
10066
  collapsibleTableBody: collapsibleTableBody,
10012
10067
  columns: columns,
10013
10068
  data: tableData,
@@ -11547,18 +11602,6 @@
11547
11602
  }), void 0);
11548
11603
  };
11549
11604
 
11550
- var DotClickAwayListener = function DotClickAwayListener(_a) {
11551
- var children = _a.children,
11552
- _b = _a.disableReactTree,
11553
- disableReactTree = _b === void 0 ? false : _b,
11554
- onClickAway = _a.onClickAway;
11555
- return jsxRuntime.jsx(material.ClickAwayListener, {
11556
- children: children,
11557
- disableReactTree: disableReactTree,
11558
- onClickAway: onClickAway
11559
- }, void 0);
11560
- };
11561
-
11562
11605
  exports.Cell = Cell;
11563
11606
  exports.CreateUUID = CreateUUID;
11564
11607
  exports.CssCell = CssCell;