@councilbox/councilbox-ui 0.4.6 → 0.4.8

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.
@@ -19,12 +19,15 @@ var _TableRow = _interopRequireDefault(require("@mui/material/TableRow"));
19
19
 
20
20
  var _TableSortLabel = _interopRequireDefault(require("@mui/material/TableSortLabel"));
21
21
 
22
- var _excluded = ["children", "component", "hover", "selected", "onClick", "className"],
23
- _excluded2 = ["children", "component"],
22
+ require("./Table.css");
23
+
24
+ var _excluded = ["lastResponsive"],
25
+ _excluded2 = ["children", "component", "hover", "selected", "onClick", "className"],
24
26
  _excluded3 = ["children", "component"],
25
- _excluded4 = ["children", "active", "direction", "onClick", "hideSortIcon", "IconComponent"],
26
- _excluded5 = ["children", "component", "padding", "scope", "size", "sortDirection", "variant", "align", "style", "sx"],
27
- _excluded6 = ["children", "component"];
27
+ _excluded4 = ["children", "component"],
28
+ _excluded5 = ["children", "active", "direction", "onClick", "hideSortIcon", "IconComponent"],
29
+ _excluded6 = ["children", "component", "padding", "scope", "size", "sortDirection", "variant", "align", "sx"],
30
+ _excluded7 = ["children", "component"];
28
31
 
29
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
30
33
 
@@ -34,16 +37,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
34
37
 
35
38
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
36
39
 
40
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
+
37
42
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
38
43
 
39
44
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
40
45
 
41
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
42
-
43
46
  var Table = function Table(_ref) {
44
- var props = _extends({}, _ref);
47
+ var lastResponsive = _ref.lastResponsive,
48
+ props = _objectWithoutProperties(_ref, _excluded);
45
49
 
46
- return /*#__PURE__*/React.createElement(_Table.default, props);
50
+ return /*#__PURE__*/React.createElement(_Table.default, _extends({
51
+ className: lastResponsive ? 'cbx-table lastResponsive' : 'cbx-table'
52
+ }, props));
47
53
  };
48
54
 
49
55
  exports.Table = Table;
@@ -56,7 +62,7 @@ var TableRow = function TableRow(_ref2) {
56
62
  selected = _ref2.selected,
57
63
  onClick = _ref2.onClick,
58
64
  className = _ref2.className,
59
- props = _objectWithoutProperties(_ref2, _excluded);
65
+ props = _objectWithoutProperties(_ref2, _excluded2);
60
66
 
61
67
  return /*#__PURE__*/React.createElement(_TableRow.default, _extends({
62
68
  className: className,
@@ -73,7 +79,7 @@ TableRow.displayName = "TableRow";
73
79
  var TableBody = function TableBody(_ref3) {
74
80
  var children = _ref3.children,
75
81
  component = _ref3.component,
76
- props = _objectWithoutProperties(_ref3, _excluded2);
82
+ props = _objectWithoutProperties(_ref3, _excluded3);
77
83
 
78
84
  return /*#__PURE__*/React.createElement(_TableBody.default, _extends({
79
85
  component: component
@@ -86,7 +92,7 @@ TableBody.displayName = "TableBody";
86
92
  var TableHead = function TableHead(_ref4) {
87
93
  var children = _ref4.children,
88
94
  component = _ref4.component,
89
- props = _objectWithoutProperties(_ref4, _excluded3);
95
+ props = _objectWithoutProperties(_ref4, _excluded4);
90
96
 
91
97
  return /*#__PURE__*/React.createElement(_TableHead.default, _extends({
92
98
  component: component
@@ -103,7 +109,7 @@ var TableSortLabel = function TableSortLabel(_ref5) {
103
109
  onClick = _ref5.onClick,
104
110
  hideSortIcon = _ref5.hideSortIcon,
105
111
  IconComponent = _ref5.IconComponent,
106
- props = _objectWithoutProperties(_ref5, _excluded4);
112
+ props = _objectWithoutProperties(_ref5, _excluded5);
107
113
 
108
114
  return /*#__PURE__*/React.createElement(_TableSortLabel.default, _extends({
109
115
  onClick: onClick,
@@ -126,10 +132,8 @@ var TableCell = function TableCell(_ref6) {
126
132
  sortDirection = _ref6.sortDirection,
127
133
  variant = _ref6.variant,
128
134
  align = _ref6.align,
129
- _ref6$style = _ref6.style,
130
- style = _ref6$style === void 0 ? {} : _ref6$style,
131
135
  sx = _ref6.sx,
132
- props = _objectWithoutProperties(_ref6, _excluded5);
136
+ props = _objectWithoutProperties(_ref6, _excluded6);
133
137
 
134
138
  return /*#__PURE__*/React.createElement(_TableCell.default, _extends({
135
139
  component: component,
@@ -140,12 +144,8 @@ var TableCell = function TableCell(_ref6) {
140
144
  variant: variant,
141
145
  align: align,
142
146
  sx: _objectSpread({
143
- padding: '1rem',
144
147
  color: 'var(--gray3)'
145
- }, sx),
146
- style: _objectSpread({
147
- zIndex: '10'
148
- }, style)
148
+ }, sx)
149
149
  }, props), children);
150
150
  };
151
151
 
@@ -155,7 +155,7 @@ TableCell.displayName = "TableCell";
155
155
  var TableContainer = function TableContainer(_ref7) {
156
156
  var children = _ref7.children,
157
157
  component = _ref7.component,
158
- props = _objectWithoutProperties(_ref7, _excluded6);
158
+ props = _objectWithoutProperties(_ref7, _excluded7);
159
159
 
160
160
  return /*#__PURE__*/React.createElement(_TableContainer.default, _extends({
161
161
  component: component
@@ -17,19 +17,20 @@ var _default = {
17
17
  title: 'Components/Table',
18
18
  component: _Table.default,
19
19
  argTypes: {
20
- text: {
20
+ stickyHeader: {
21
+ options: [true, false],
21
22
  control: {
22
- type: 'text'
23
+ type: 'radio'
23
24
  }
24
25
  },
25
- label: {
26
+ lastResponsive: {
27
+ options: [true, false],
26
28
  control: {
27
- type: 'text'
29
+ type: 'radio'
28
30
  }
29
31
  }
30
32
  }
31
- }; // const Template = args => <Table {...args} />;
32
-
33
+ };
33
34
  exports.default = _default;
34
35
 
35
36
  var TemplateTable = function TemplateTable(args) {
@@ -37,13 +38,9 @@ var TemplateTable = function TemplateTable(args) {
37
38
  };
38
39
 
39
40
  TemplateTable.displayName = "TemplateTable";
40
- // export const Default = Template.bind({});
41
- // Default.args = {
42
- // };
43
41
  var DesignTemplateTable = TemplateTable.bind({});
44
42
  exports.DesignTemplateTable = DesignTemplateTable;
45
43
  DesignTemplateTable.parameters = {
46
- controls: {
47
- disable: true
48
- }
44
+ stickyHeader: false,
45
+ lastResponsive: false
49
46
  };
@@ -96,13 +96,13 @@ var Typography = function Typography(_ref) {
96
96
  props = _objectWithoutProperties(_ref, _excluded);
97
97
 
98
98
  return /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({
99
- sx: _objectSpread(_objectSpread({}, stylesVariants[variant || 'M']), {}, {
99
+ sx: _objectSpread(_objectSpread({}, stylesVariants[(variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M']), {}, {
100
100
  color: color || 'var(--gray5)',
101
101
  fontWeight: fontWeight || '400',
102
102
  textAlign: textAlign,
103
103
  fontFamily: secondaryFont && 'var(--font-secondary)'
104
104
  }, styles),
105
- variant: nameVariant[variant || 'M'],
105
+ variant: nameVariant[(variant === null || variant === void 0 ? void 0 : variant.toUpperCase()) || 'M'],
106
106
  component: component
107
107
  }, props), children);
108
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",
@@ -16,7 +16,7 @@
16
16
  "@emotion/react": "^11.7.1",
17
17
  "@emotion/styled": "^11.6.0",
18
18
  "@mui/icons-material": "^5.4.4",
19
- "@mui/material": "^5.2.8",
19
+ "@mui/material": "^5.11.13",
20
20
  "cross-env": "^7.0.3",
21
21
  "prop-types": "^15.8.1",
22
22
  "react-custom-scrollbars-cbx": "^4.2.2",