@superdispatch/ui-lab 0.50.8 → 0.50.10

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.
@@ -1436,6 +1436,7 @@ function NavbarItem(_ref) {
1436
1436
  label,
1437
1437
  gutter,
1438
1438
  badge,
1439
+ badgeIcon,
1439
1440
  icon,
1440
1441
  component,
1441
1442
  onClick,
@@ -1458,10 +1459,10 @@ function NavbarItem(_ref) {
1458
1459
  }), /*#__PURE__*/jsxRuntime.jsx(NavbarLabel, {
1459
1460
  id: uid,
1460
1461
  children: label
1461
- }), badge != null && /*#__PURE__*/jsxRuntime.jsx(NavbarBadge, {
1462
+ }), badge != null && !badgeIcon && /*#__PURE__*/jsxRuntime.jsx(NavbarBadge, {
1462
1463
  "data-variant": variant,
1463
1464
  children: badge
1464
- })]
1465
+ }), badgeIcon]
1465
1466
  });
1466
1467
  }
1467
1468
 
@@ -1481,7 +1482,7 @@ var NavbarAccordionRoot = /*#__PURE__*/styled__default(core.Accordion).withConfi
1481
1482
  var NavbarAccordionSummary = /*#__PURE__*/styled__default(core.AccordionSummary).withConfig({
1482
1483
  displayName: "NavbarAccordion__NavbarAccordionSummary",
1483
1484
  componentId: "SD__sc-1s7g3kw-2"
1484
- })(["border-left:4px solid transparent;padding-left:20px;&.MuiAccordionSummary-root{max-height:40px;min-height:40px;}&.MuiAccordionSummary-content{align-items:center;}&:hover,&[aria-current],&[data-active='true']{color:", ";background-color:", ";border-left-color:", ";}&[data-expanded='false']{.MuiAccordionSummary-expandIcon{display:none;}}"], ui.Color.White, ui.Color.White10, ui.ColorDynamic.Blue300);
1485
+ })(["border-left:4px solid transparent;padding-left:20px;&.MuiAccordionSummary-root,&.MuiAccordionSummary-root.Mui-expanded{max-height:40px;min-height:40px;}& .MuiAccordionSummary-content{align-items:center;}&:hover,&[aria-current],&[data-active='true']{color:", ";background-color:", ";border-left-color:", ";}&[data-expanded='false']{.MuiAccordionSummary-expandIcon{display:none;}}"], ui.Color.White, ui.Color.White10, ui.ColorDynamic.Blue300);
1485
1486
  var IconWrapper$2 = /*#__PURE__*/styled__default.div.withConfig({
1486
1487
  displayName: "NavbarAccordion__IconWrapper",
1487
1488
  componentId: "SD__sc-1s7g3kw-3"
@@ -1558,7 +1559,7 @@ var Header = /*#__PURE__*/styled__default.div.withConfig({
1558
1559
  var Wrapper = /*#__PURE__*/styled__default.div.withConfig({
1559
1560
  displayName: "NavbarList__Wrapper",
1560
1561
  componentId: "SD__sc-19zrmxc-1"
1561
- })(["display:flex;flex:1;flex-direction:column;overflow:hidden;padding-top:16px;background:", ";transition:width 0.3s linear;height:100%;width:", ";&[data-expanded='true']{width:", ";}&[data-expanded='false']{width:", ";& > ", "{justify-content:center;}}"], _ref => {
1562
+ })(["display:flex;flex:1;flex-direction:column;overflow:hidden;padding-top:16px;background:", ";transition:width 0.3s linear;height:100%;--_SdNavbar-width:", ";width:var(--_SdNavbar-width);&[data-expanded='true']{--_SdNavbar-width:", ";}&[data-expanded='false']{--_SdNavbar-width:", ";& > ", "{justify-content:center;}}"], _ref => {
1562
1563
  var {
1563
1564
  theme
1564
1565
  } = _ref;
@@ -1614,6 +1615,10 @@ var Content$1 = /*#__PURE__*/styled__default.div.withConfig({
1614
1615
  displayName: "NavbarList__Content",
1615
1616
  componentId: "SD__sc-19zrmxc-5"
1616
1617
  })(["height:100%;min-height:50px;overflow-y:auto;overflow-x:hidden;&[aria-expanded='false']{", ",", "{display:none;}}&::-webkit-scrollbar{width:10px;height:10px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:100vw;margin-bottom:100px;}"], NavbarBadge, NavbarLabel, ui.ColorDark.Silver500);
1618
+ var ContentInner = /*#__PURE__*/styled__default.div.withConfig({
1619
+ displayName: "NavbarList__ContentInner",
1620
+ componentId: "SD__sc-19zrmxc-6"
1621
+ })(["width:var(--_SdNavbar-width);transition:width 0.3s linear;"]);
1617
1622
  function NavbarList(_ref6) {
1618
1623
  var {
1619
1624
  header,
@@ -1650,28 +1655,30 @@ function NavbarList(_ref6) {
1650
1655
  })]
1651
1656
  }), /*#__PURE__*/jsxRuntime.jsx(Content$1, {
1652
1657
  "aria-expanded": isSidebarOpened,
1653
- children: filteredItems.map(item => {
1654
- var index = filteredItems.indexOf(item);
1655
- var prev = filteredItems[index - 1];
1656
- if ('items' in item) {
1657
- return /*#__PURE__*/react.createElement(NavbarAccordion, _objectSpread(_objectSpread({}, item), {}, {
1658
+ children: /*#__PURE__*/jsxRuntime.jsx(ContentInner, {
1659
+ children: filteredItems.map(item => {
1660
+ var index = filteredItems.indexOf(item);
1661
+ var prev = filteredItems[index - 1];
1662
+ if ('items' in item) {
1663
+ return /*#__PURE__*/react.createElement(NavbarAccordion, _objectSpread(_objectSpread({}, item), {}, {
1664
+ key: item.key,
1665
+ gutter: prev && prev.groupKey !== item.groupKey,
1666
+ onClick: item.onClick,
1667
+ groupKey: item.groupKey || item.key
1668
+ }));
1669
+ }
1670
+ return /*#__PURE__*/react.createElement(NavbarItem, _objectSpread(_objectSpread({}, item), {}, {
1658
1671
  key: item.key,
1659
1672
  gutter: prev && prev.groupKey !== item.groupKey,
1660
- onClick: item.onClick,
1661
- groupKey: item.groupKey || item.key
1662
- }));
1663
- }
1664
- return /*#__PURE__*/react.createElement(NavbarItem, _objectSpread(_objectSpread({}, item), {}, {
1665
- key: item.key,
1666
- gutter: prev && prev.groupKey !== item.groupKey,
1667
- onClick: event => {
1668
- var _item$onClick;
1669
- (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item, event);
1670
- if (!event.isDefaultPrevented()) {
1671
- setDrawerOpen(false);
1673
+ onClick: event => {
1674
+ var _item$onClick;
1675
+ (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item, event);
1676
+ if (!event.isDefaultPrevented()) {
1677
+ setDrawerOpen(false);
1678
+ }
1672
1679
  }
1673
- }
1674
- }));
1680
+ }));
1681
+ })
1675
1682
  })
1676
1683
  }), /*#__PURE__*/jsxRuntime.jsx(Footer, {
1677
1684
  children: footer