@thecb/components 4.0.18-beta.0 → 4.0.22-beta.0

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.
package/dist/index.cjs.js CHANGED
@@ -14004,6 +14004,16 @@ var NotFoundIcon = function NotFoundIcon() {
14004
14004
  strokeWidth: "8",
14005
14005
  strokeLinecap: "round",
14006
14006
  strokeLinejoin: "round"
14007
+ }), /*#__PURE__*/React__default.createElement("line", {
14008
+ x1: "399.988281",
14009
+ y1: "213.830078",
14010
+ x2: "416.9162",
14011
+ y2: "196.8489",
14012
+ id: "right-right---bottom",
14013
+ stroke: "#45B770",
14014
+ strokeWidth: "8",
14015
+ strokeLinecap: "round",
14016
+ strokeLinejoin: "round"
14007
14017
  }), /*#__PURE__*/React__default.createElement("path", {
14008
14018
  d: "M151.969,73 L391.69,73 C395.538,73 398.658,76.12 398.658,79.969 L398.658,258.366 C398.658,262.214 395.538,265.334 391.69,265.334 L151.969,265.334 C148.12,265.334 145,262.214 145,258.366 L145,79.969 C145,76.12 148.12,73 151.969,73 Z",
14009
14019
  id: "browser-border",
@@ -14029,16 +14039,6 @@ var NotFoundIcon = function NotFoundIcon() {
14029
14039
  strokeWidth: "8",
14030
14040
  strokeLinecap: "round",
14031
14041
  strokeLinejoin: "round"
14032
- }), /*#__PURE__*/React__default.createElement("line", {
14033
- x1: "399.988281",
14034
- y1: "213.830078",
14035
- x2: "416.9162",
14036
- y2: "196.8489",
14037
- id: "right-right---bottom",
14038
- stroke: "#45B770",
14039
- strokeWidth: "8",
14040
- strokeLinecap: "round",
14041
- strokeLinejoin: "round"
14042
14042
  }), /*#__PURE__*/React__default.createElement("path", {
14043
14043
  d: "M344.1914,160.9806 C346.1454,156.3596 347.2264,151.2786 347.2264,145.9456 C347.2264,143.5286 347.0044,141.1636 346.5794,138.8686",
14044
14044
  id: "hand-left",
@@ -33897,6 +33897,8 @@ var EditableList = function EditableList(_ref) {
33897
33897
  title = _ref$title === void 0 ? "" : _ref$title,
33898
33898
  _ref$titleWeight = _ref.titleWeight,
33899
33899
  titleWeight = _ref$titleWeight === void 0 ? "400" : _ref$titleWeight,
33900
+ _ref$canAdd = _ref.canAdd,
33901
+ canAdd = _ref$canAdd === void 0 ? true : _ref$canAdd,
33900
33902
  addItem = _ref.addItem,
33901
33903
  removeItem = _ref.removeItem,
33902
33904
  editItem = _ref.editItem,
@@ -33980,7 +33982,7 @@ var EditableList = function EditableList(_ref) {
33980
33982
  },
33981
33983
  extraStyles: "min-width: 0;"
33982
33984
  }))));
33983
- })), (!maxItems || items.length < maxItems) && /*#__PURE__*/React__default.createElement(Box, {
33985
+ })), canAdd && (!maxItems || items.length < maxItems) && /*#__PURE__*/React__default.createElement(Box, {
33984
33986
  padding: items.length === 0 ? "0" : "1rem 0 0"
33985
33987
  }, /*#__PURE__*/React__default.createElement(Placeholder$1, {
33986
33988
  text: "Add a".concat(itemName[0].match(/[aieouAIEOU]/) ? "n" : "", " ").concat(itemName),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.0.18-beta.0",
3
+ "version": "4.0.22-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -191,6 +191,17 @@ const NotFoundIcon = () => (
191
191
  strokeLinecap="round"
192
192
  strokeLinejoin="round"
193
193
  ></line>
194
+ <line
195
+ x1="399.988281"
196
+ y1="213.830078"
197
+ x2="416.9162"
198
+ y2="196.8489"
199
+ id="right-right---bottom"
200
+ stroke="#45B770"
201
+ strokeWidth="8"
202
+ strokeLinecap="round"
203
+ strokeLinejoin="round"
204
+ ></line>
194
205
  <path
195
206
  d="M151.969,73 L391.69,73 C395.538,73 398.658,76.12 398.658,79.969 L398.658,258.366 C398.658,262.214 395.538,265.334 391.69,265.334 L151.969,265.334 C148.12,265.334 145,262.214 145,258.366 L145,79.969 C145,76.12 148.12,73 151.969,73 Z"
196
207
  id="browser-border"
@@ -219,17 +230,6 @@ const NotFoundIcon = () => (
219
230
  strokeLinecap="round"
220
231
  strokeLinejoin="round"
221
232
  ></line>
222
- <line
223
- x1="399.988281"
224
- y1="213.830078"
225
- x2="416.9162"
226
- y2="196.8489"
227
- id="right-right---bottom"
228
- stroke="#45B770"
229
- strokeWidth="8"
230
- strokeLinecap="round"
231
- strokeLinejoin="round"
232
- ></line>
233
233
  <path
234
234
  d="M344.1914,160.9806 C346.1454,156.3596 347.2264,151.2786 347.2264,145.9456 C347.2264,143.5286 347.0044,141.1636 346.5794,138.8686"
235
235
  id="hand-left"
@@ -18,6 +18,7 @@ import {
18
18
  const EditableList = ({
19
19
  title = "",
20
20
  titleWeight = "400",
21
+ canAdd = true,
21
22
  addItem,
22
23
  removeItem,
23
24
  editItem,
@@ -123,7 +124,7 @@ const EditableList = ({
123
124
  );
124
125
  })}
125
126
  </Box>
126
- {(!maxItems || items.length < maxItems) && (
127
+ {canAdd && (!maxItems || items.length < maxItems) && (
127
128
  <Box padding={items.length === 0 ? "0" : "1rem 0 0"}>
128
129
  <Placeholder
129
130
  text={`Add a${