@terraware/web-components 3.0.21-rc.2 → 3.0.22-rc.1

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.
@@ -8,6 +8,7 @@ export type PopoverProps = {
8
8
  setAnchorElement: (anchorEl: HTMLElement | null) => void;
9
9
  itemRenderer?: (item: DropdownItem) => React.ReactNode;
10
10
  menuAlign?: 'left' | 'center' | 'right';
11
+ selectedValue?: any;
11
12
  };
12
13
  export default function PopoverDropdown(props: PopoverProps): JSX.Element;
13
14
  //# sourceMappingURL=Popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/PopoverMenu/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CA6ExE"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/PopoverMenu/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,WAAW,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,gBAAgB,EAAE,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CA8ExE"}
@@ -14,7 +14,8 @@ function PopoverDropdown(props) {
14
14
  anchorElement,
15
15
  setAnchorElement,
16
16
  itemRenderer,
17
- menuAlign
17
+ menuAlign,
18
+ selectedValue
18
19
  } = props;
19
20
  const theme = (0, _material.useTheme)();
20
21
  const handleClose = () => {
@@ -72,7 +73,8 @@ function PopoverDropdown(props) {
72
73
  key: "option-".concat(itemIndex),
73
74
  sx: itemStyles(item.type),
74
75
  disableRipple: true,
75
- disabled: item.disabled
76
+ disabled: item.disabled,
77
+ selected: item.value === selectedValue
76
78
  }, itemRenderer ? itemRenderer(item) : item.label);
77
79
  })];
78
80
  return elements;
@@ -5,6 +5,8 @@ export type PopoverMenuProps = {
5
5
  anchor: React.ReactNode;
6
6
  menuSections: Section[];
7
7
  onClick?: (selected: DropdownItem) => void;
8
+ showChevron?: boolean;
9
+ selectedValue?: any;
8
10
  };
9
- export default function PopoverMenu({ anchor, menuSections, onClick }: PopoverMenuProps): JSX.Element;
11
+ export default function PopoverMenu({ anchor, menuSections, onClick, showChevron, selectedValue }: PopoverMenuProps): JSX.Element;
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PopoverMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAgB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA+CpG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PopoverMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAgB,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,WAAkB,EAAE,aAAa,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAgDvI"}
@@ -14,7 +14,9 @@ function PopoverMenu(_ref) {
14
14
  let {
15
15
  anchor,
16
16
  menuSections,
17
- onClick
17
+ onClick,
18
+ showChevron = true,
19
+ selectedValue
18
20
  } = _ref;
19
21
  const theme = (0, _material.useTheme)();
20
22
  const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
@@ -38,7 +40,7 @@ function PopoverMenu(_ref) {
38
40
  borderRadius: '16px',
39
41
  padding: theme.spacing(1.5, 2)
40
42
  }
41
- }, anchor, /*#__PURE__*/_react.default.createElement(_Icon.default, {
43
+ }, anchor, showChevron && /*#__PURE__*/_react.default.createElement(_Icon.default, {
42
44
  name: "chevronDown",
43
45
  size: "medium",
44
46
  style: {
@@ -49,6 +51,7 @@ function PopoverMenu(_ref) {
49
51
  sections: menuSections,
50
52
  handleClick: onItemClick,
51
53
  anchorElement: anchorEl,
52
- setAnchorElement: setAnchorEl
54
+ setAnchorElement: setAnchorEl,
55
+ selectedValue: selectedValue
53
56
  }));
54
57
  }
@@ -19,7 +19,7 @@ const defaultStyles = theme => ({
19
19
  '&.MuiTableCell-root': {
20
20
  paddingTop: '0px',
21
21
  paddingBottom: '0px',
22
- borderBottom: "1px solid ".concat(theme.palette.TwClrBrdrSecondary),
22
+ borderBottom: "1px solid ".concat(theme.palette.TwClrBgSecondary),
23
23
  fontVariantNumeric: 'tabular-nums'
24
24
  }
25
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "3.0.21-rc.2",
3
+ "version": "3.0.22-rc.1",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {