@superdispatch/ui-lab 0.21.6 → 0.21.11

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.
@@ -3,7 +3,7 @@ import { Accordion, AccordionSummary } from '@material-ui/core';
3
3
  import { ExpandMore } from '@material-ui/icons';
4
4
  import { Color, useUID } from '@superdispatch/ui';
5
5
  import { useEffect, useState } from 'react';
6
- import styled, { css } from 'styled-components';
6
+ import styled from 'styled-components';
7
7
  import { useNavbarContext } from "./NavbarContext.js";
8
8
  import { NavbarItem } from "./NavbarItem.js";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -16,12 +16,7 @@ export var NavbarAccordionLabel = /*#__PURE__*/styled.span.withConfig({
16
16
  var NavbarAccordionRoot = /*#__PURE__*/styled(Accordion).withConfig({
17
17
  displayName: "NavbarAccordion__NavbarAccordionRoot",
18
18
  componentId: "SD__sc-1s7g3kw-1"
19
- })(_ref => {
20
- var {
21
- gutter
22
- } = _ref;
23
- return css(["width:100%;color:#c2c4c9;font-size:14px;font-weight:400;line-height:20px;text-decoration:none;outline:none;cursor:pointer;background-color:#1b2638;margin-top:", ";&[aria-current]{background-color:#2f394a;color:", ";}&.MuiAccordion-root:before{background-color:#1b2638;}&.MuiPaper-elevation0{border:0px;}&.MuiAccordion-root.Mui-expanded{margin-top:", ";}"], gutter ? '16px' : '0', Color.White, gutter ? '16px' : '0');
24
- });
19
+ })(["width:100%;color:#c2c4c9;font-size:14px;font-weight:400;line-height:20px;text-decoration:none;outline:none;cursor:pointer;background-color:#1b2638;&[aria-current]{background-color:#2f394a;color:", ";}&.MuiAccordion-root:before{background-color:#1b2638;}&.MuiPaper-elevation0{border:0px;}&[data-gutter]{margin-top:16px;}&[data-gutter].MuiAccordion-root.Mui-expanded{margin-top:16px;}"], Color.White);
25
20
  var NavbarAccordionSummary = /*#__PURE__*/styled(AccordionSummary).withConfig({
26
21
  displayName: "NavbarAccordion__NavbarAccordionSummary",
27
22
  componentId: "SD__sc-1s7g3kw-2"
@@ -30,14 +25,14 @@ var IconWrapper = /*#__PURE__*/styled.div.withConfig({
30
25
  displayName: "NavbarAccordion__IconWrapper",
31
26
  componentId: "SD__sc-1s7g3kw-3"
32
27
  })(["width:24px;margin-right:8px;& svg{font-size:24px;}"]);
33
- export function NavbarAccordion(_ref2) {
28
+ export function NavbarAccordion(_ref) {
34
29
  var {
35
30
  label,
36
31
  icon,
37
32
  gutter,
38
33
  items,
39
34
  onClick: _onClick
40
- } = _ref2;
35
+ } = _ref;
41
36
  var uid = useUID();
42
37
  var {
43
38
  setDrawerOpen,
@@ -50,7 +45,7 @@ export function NavbarAccordion(_ref2) {
50
45
  }, [isNavbarExpanded]);
51
46
  return /*#__PURE__*/_jsxs(NavbarAccordionRoot, {
52
47
  square: true,
53
- gutter: !!gutter,
48
+ "data-gutter": !gutter,
54
49
  "aria-labelledby": uid,
55
50
  expanded: isExpanded,
56
51
  onClick: event => {
@@ -1,4 +1,6 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["active", "hasBadge"];
2
4
  import { BottomNavigation, BottomNavigationAction } from '@material-ui/core';
3
5
  import { Menu } from '@material-ui/icons';
4
6
  import { Color } from '@superdispatch/ui';
@@ -46,12 +48,20 @@ export function NavbarBottomBar(_ref) {
46
48
  }
47
49
  }
48
50
  },
49
- children: [items.map(item => /*#__PURE__*/_createElement(StyledBottomNavigationAction, _objectSpread(_objectSpread({}, item), {}, {
50
- key: item.value,
51
- icon: item.hasBadge ? /*#__PURE__*/_jsxs(IconWrapper, {
52
- children: [/*#__PURE__*/_jsx(IconLabel, {}), item.icon]
53
- }) : item.icon
54
- }))), /*#__PURE__*/_jsx(StyledBottomNavigationAction, {
51
+ children: [items.map(_ref2 => {
52
+ var {
53
+ active,
54
+ hasBadge
55
+ } = _ref2,
56
+ item = _objectWithoutProperties(_ref2, _excluded);
57
+
58
+ return /*#__PURE__*/_createElement(StyledBottomNavigationAction, _objectSpread(_objectSpread({}, item), {}, {
59
+ key: item.value,
60
+ icon: hasBadge ? /*#__PURE__*/_jsxs(IconWrapper, {
61
+ children: [/*#__PURE__*/_jsx(IconLabel, {}), item.icon]
62
+ }) : item.icon
63
+ }));
64
+ }), /*#__PURE__*/_jsx(StyledBottomNavigationAction, {
55
65
  value: "menu",
56
66
  label: "Menu",
57
67
  icon: hasMenuBadge ? /*#__PURE__*/_jsxs(IconWrapper, {