@terraware/web-components 2.16.4-rc.0 → 2.16.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormBottomBar/index.tsx"],"names":[],"mappings":";AA4CA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACzC,UAAU,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC;CACvD;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,sBAAsB,GACvB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA8CrB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormBottomBar/index.tsx"],"names":[],"mappings":";AAKA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACzC,UAAU,CAAC,EAAE,SAAS,GAAG,YAAY,GAAG,aAAa,CAAC;CACvD;AAED,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC;CACvC;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,MAAM,EACN,sBAAsB,GACvB,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CA4ErB"}
@@ -8,34 +8,7 @@ exports.default = FormBottomBar;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _material = require("@mui/material");
10
10
  var _Button = _interopRequireDefault(require("../Button/Button"));
11
- var _styles = require("@mui/styles");
12
11
  var _useDeviceInfo = _interopRequireDefault(require("../../utils/useDeviceInfo"));
13
- const useStyles = (0, _styles.makeStyles)(theme => ({
14
- bottomBar: {
15
- background: "linear-gradient(to right, ".concat(theme.palette.TwClrBaseGray025, "00,") + "".concat(theme.palette.TwClrBaseGray025, "80, ").concat(theme.palette.TwClrBaseGray025, "80,") + "".concat(theme.palette.TwClrBaseGray025, "00)"),
16
- backdropFilter: 'blur(16px)',
17
- borderTop: '1px solid',
18
- borderImage: "linear-gradient(to right, ".concat(theme.palette.TwClrBaseGray300, "00,") + "".concat(theme.palette.TwClrBaseGray300, "FF, ").concat(theme.palette.TwClrBaseGray300, "FF,") + "".concat(theme.palette.TwClrBaseGray300, "FF, ").concat(theme.palette.TwClrBaseGray300, "00) 1"),
19
- boxShadow: 'none',
20
- justifyContent: 'space-between',
21
- display: 'flex',
22
- flexDirection: props => props.isMobile ? 'column-reverse' : 'row',
23
- padding: props => props.isDesktop ? '16px 24px' : "16px 24px ".concat(theme.spacing(5)),
24
- width: props => props.isDesktop ? 'calc(100% - 200px)' : '100%',
25
- zIndex: 1000
26
- },
27
- button: {
28
- marginTop: props => props.isMobile ? theme.spacing(1) : 'auto'
29
- },
30
- rightButtons: {
31
- marginTop: props => props.isMobile ? theme.spacing(1) : 'auto',
32
- marginRight: theme.spacing(1)
33
- },
34
- rightButtonGroup: {
35
- display: 'flex',
36
- flexDirection: props => props.isMobile ? 'column-reverse' : 'row'
37
- }
38
- }));
39
12
  function FormBottomBar(_ref) {
40
13
  let {
41
14
  cancelID,
@@ -51,10 +24,7 @@ function FormBottomBar(_ref) {
51
24
  isMobile,
52
25
  isDesktop
53
26
  } = (0, _useDeviceInfo.default)();
54
- const classes = useStyles({
55
- isMobile,
56
- isDesktop
57
- });
27
+ const theme = (0, _material.useTheme)();
58
28
  return /*#__PURE__*/_react.default.createElement(_material.AppBar, {
59
29
  position: "fixed",
60
30
  color: "primary",
@@ -64,7 +34,19 @@ function FormBottomBar(_ref) {
64
34
  right: 'auto',
65
35
  left: isDesktop ? 'auto' : 0
66
36
  },
67
- className: classes.bottomBar
37
+ sx: {
38
+ background: "linear-gradient(to right, ".concat(theme.palette.TwClrBaseGray025, "00,") + "".concat(theme.palette.TwClrBaseGray025, "80, ").concat(theme.palette.TwClrBaseGray025, "80,") + "".concat(theme.palette.TwClrBaseGray025, "00)"),
39
+ backdropFilter: 'blur(16px)',
40
+ borderTop: '1px solid',
41
+ borderImage: "linear-gradient(to right, ".concat(theme.palette.TwClrBaseGray300, "00,") + "".concat(theme.palette.TwClrBaseGray300, "FF, ").concat(theme.palette.TwClrBaseGray300, "FF,") + "".concat(theme.palette.TwClrBaseGray300, "FF, ").concat(theme.palette.TwClrBaseGray300, "00) 1"),
42
+ boxShadow: 'none',
43
+ justifyContent: 'space-between',
44
+ display: 'flex',
45
+ flexDirection: isMobile ? 'column-reverse' : 'row',
46
+ padding: isDesktop ? '16px 24px' : "16px 24px ".concat(theme.spacing(5)),
47
+ width: isDesktop ? 'calc(100% - 200px)' : '100%',
48
+ zIndex: 1000
49
+ }
68
50
  }, /*#__PURE__*/_react.default.createElement(_Button.default, {
69
51
  id: cancelID || 'cancelBottomBar',
70
52
  size: "medium",
@@ -72,9 +54,15 @@ function FormBottomBar(_ref) {
72
54
  onClick: onCancel,
73
55
  priority: "secondary",
74
56
  type: "passive",
75
- className: classes.button
76
- }), /*#__PURE__*/_react.default.createElement("div", {
77
- className: classes.rightButtonGroup
57
+ style: {
58
+ marginTop: isMobile ? theme.spacing(1) : 'auto',
59
+ marginRight: theme.spacing(1)
60
+ }
61
+ }), /*#__PURE__*/_react.default.createElement(_material.Box, {
62
+ sx: {
63
+ display: 'flex',
64
+ flexDirection: isMobile ? 'column-reverse' : 'row'
65
+ }
78
66
  }, additionalRightButtons && additionalRightButtons.map(btn => /*#__PURE__*/_react.default.createElement(_Button.default, {
79
67
  id: btn.id,
80
68
  key: btn.id,
@@ -83,14 +71,18 @@ function FormBottomBar(_ref) {
83
71
  size: "medium",
84
72
  label: btn.text,
85
73
  onClick: btn.onClick,
86
- className: classes.rightButtons,
87
- disabled: btn.disabled
74
+ disabled: btn.disabled,
75
+ style: {
76
+ marginTop: isMobile ? theme.spacing(1) : 'auto'
77
+ }
88
78
  })), /*#__PURE__*/_react.default.createElement(_Button.default, {
89
79
  id: saveID || 'saveBottomBar',
90
80
  size: "medium",
91
81
  label: saveButtonText,
92
82
  onClick: onSave,
93
- className: classes.button,
94
- disabled: saveDisabled
83
+ disabled: saveDisabled,
84
+ style: {
85
+ marginTop: isMobile ? theme.spacing(1) : 'auto'
86
+ }
95
87
  })));
96
88
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
2
  import { FormButton } from '../FormBottomBar';
3
3
  export type PageFormProps = {
4
4
  children: React.ReactNode;
@@ -12,6 +12,7 @@ export type PageFormProps = {
12
12
  className?: string;
13
13
  hideEdit?: boolean;
14
14
  additionalRightButtons?: FormButton[];
15
+ style?: CSSProperties;
15
16
  };
16
17
  export default function PageForm(props: PageFormProps): JSX.Element;
17
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAsB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC;CACvC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAqBlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAY,MAAM,OAAO,CAAC;AAGvD,OAAsB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG7D,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,UAAU,EAAE,CAAC;IACtC,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAyBlE"}
@@ -17,6 +17,7 @@ function PageForm(props) {
17
17
  className,
18
18
  hideEdit,
19
19
  onSave,
20
+ style,
20
21
  ...bottomBarProps
21
22
  } = props;
22
23
  const theme = (0, _material.useTheme)();
@@ -33,7 +34,8 @@ function PageForm(props) {
33
34
  withSkrim: true
34
35
  }), /*#__PURE__*/_react.default.createElement(_material.Box, {
35
36
  className: className,
36
- paddingBottom: hideEdit ? theme.spacing(4) : theme.spacing(isMobile ? 25 : 15)
37
+ paddingBottom: hideEdit ? theme.spacing(4) : theme.spacing(isMobile ? 25 : 15),
38
+ style: style
37
39
  }, children), !hideEdit && /*#__PURE__*/_react.default.createElement(_FormBottomBar.default, Object.assign({
38
40
  onSave: handleSave
39
41
  }, bottomBarProps)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraware/web-components",
3
- "version": "2.16.4-rc.0",
3
+ "version": "2.16.4",
4
4
  "author": "Terraformation Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {