@janiscommerce/ui-web 0.10.0 → 0.11.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/CHANGELOG.md CHANGED
@@ -7,19 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.10.0] - 2022-03-12
10
+ ## [0.11.0] - 2024-03-21
11
+
12
+ ### Added
13
+
14
+ - Props component documentation
15
+
16
+ ## [0.10.0] - 2024-03-12
11
17
 
12
18
  ### Added
13
19
 
14
20
  - Added Drawer component
15
21
 
16
- ## [0.9.1] - 2022-02-29
22
+ ## [0.9.1] - 2024-02-29
17
23
 
18
24
  ### Fixed
19
25
 
20
26
  - Fixed fontcolor of buttons
21
27
 
22
- ## [0.9.0] - 2022-02-19
28
+ ## [0.9.0] - 2024-02-19
23
29
 
24
30
  ### Changed
25
31
 
@@ -36,7 +42,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
36
42
 
37
43
  - Added controls in storybooks
38
44
 
39
- ## [0.8.0] - 2022-01-23
45
+ ## [0.8.0] - 2024-01-23
40
46
 
41
47
  ### Changed
42
48
 
package/dist/index.umd.js CHANGED
@@ -1878,7 +1878,7 @@
1878
1878
  })(["margin-bottom:10px;padding:5px;"])
1879
1879
  });
1880
1880
 
1881
- var _excluded$7 = ["color", "name", "size", "styles", "pathStyles", "width", "height", "viewBox"];
1881
+ var _excluded$8 = ["color", "name", "size", "styles", "pathStyles", "width", "height", "viewBox"];
1882
1882
 
1883
1883
  var Icon = function Icon(_ref) {
1884
1884
  var color = _ref.color,
@@ -1889,7 +1889,7 @@
1889
1889
  width = _ref.width,
1890
1890
  height = _ref.height,
1891
1891
  viewBox = _ref.viewBox,
1892
- props = _objectWithoutProperties(_ref, _excluded$7);
1892
+ props = _objectWithoutProperties(_ref, _excluded$8);
1893
1893
 
1894
1894
  if (!icons[name]) return null;
1895
1895
  var _icons$name = icons[name],
@@ -1990,7 +1990,7 @@
1990
1990
  })
1991
1991
  };
1992
1992
 
1993
- var _excluded$6 = ["children", "color", "hideLabel", "icon", "iconColor", "iconSize", "fontColor", "rounded", "styles", "variant", "disabled"];
1993
+ var _excluded$7 = ["children", "color", "hideLabel", "icon", "iconColor", "iconSize", "fontColor", "rounded", "styles", "variant", "disabled"];
1994
1994
 
1995
1995
  var Button = function Button(_ref) {
1996
1996
  var children = _ref.children,
@@ -2004,7 +2004,7 @@
2004
2004
  styles = _ref.styles,
2005
2005
  variant = _ref.variant,
2006
2006
  disabled = _ref.disabled,
2007
- props = _objectWithoutProperties(_ref, _excluded$6);
2007
+ props = _objectWithoutProperties(_ref, _excluded$7);
2008
2008
 
2009
2009
  return /*#__PURE__*/React__default["default"].createElement(styled$b.Button, _extends$1({
2010
2010
  color: color,
@@ -2053,7 +2053,7 @@
2053
2053
  })
2054
2054
  };
2055
2055
 
2056
- var _excluded$5 = ["autoComplete", "disabled", "defaultChecked", "onChange", "rounded", "styles", "value"];
2056
+ var _excluded$6 = ["autoComplete", "disabled", "defaultChecked", "onChange", "rounded", "styles", "value"];
2057
2057
 
2058
2058
  var Checkbox = function Checkbox(_ref) {
2059
2059
  var autoComplete = _ref.autoComplete,
@@ -2063,7 +2063,7 @@
2063
2063
  rounded = _ref.rounded,
2064
2064
  styles = _ref.styles,
2065
2065
  value = _ref.value,
2066
- props = _objectWithoutProperties(_ref, _excluded$5);
2066
+ props = _objectWithoutProperties(_ref, _excluded$6);
2067
2067
 
2068
2068
  var _useState = React.useState(!!value || defaultChecked),
2069
2069
  _useState2 = _slicedToArray(_useState, 2),
@@ -2155,7 +2155,7 @@
2155
2155
  })(["text-overflow:ellipsis;overflow:hidden;"])
2156
2156
  };
2157
2157
 
2158
- var _excluded$4 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "textColor", "variant", "hasLink"];
2158
+ var _excluded$5 = ["backgroundColor", "borderColor", "children", "disabled", "icon", "iconColor", "onClick", "onDelete", "selected", "textColor", "variant", "hasLink"];
2159
2159
 
2160
2160
  var Chip = function Chip(_ref) {
2161
2161
  var backgroundColor = _ref.backgroundColor,
@@ -2170,7 +2170,7 @@
2170
2170
  textColor = _ref.textColor,
2171
2171
  variant = _ref.variant,
2172
2172
  hasLink = _ref.hasLink,
2173
- props = _objectWithoutProperties(_ref, _excluded$4);
2173
+ props = _objectWithoutProperties(_ref, _excluded$5);
2174
2174
 
2175
2175
  if (!children && !icon) return null;
2176
2176
  return /*#__PURE__*/React__default["default"].createElement(styled$9.Chip, _extends$1({
@@ -2303,7 +2303,7 @@
2303
2303
  iconCheckStyles: iconCheckStyles
2304
2304
  };
2305
2305
 
2306
- var _excluded$3 = ["autoComplete", "defaultChecked", "disabled", "id", "name", "onChange", "value"];
2306
+ var _excluded$4 = ["autoComplete", "defaultChecked", "disabled", "id", "name", "onChange", "value"];
2307
2307
 
2308
2308
  var Switch = function Switch(_ref) {
2309
2309
  var autoComplete = _ref.autoComplete,
@@ -2313,7 +2313,7 @@
2313
2313
  name = _ref.name,
2314
2314
  onChange = _ref.onChange,
2315
2315
  value = _ref.value,
2316
- props = _objectWithoutProperties(_ref, _excluded$3);
2316
+ props = _objectWithoutProperties(_ref, _excluded$4);
2317
2317
 
2318
2318
  var _useState = React.useState(!!value || defaultChecked),
2319
2319
  _useState2 = _slicedToArray(_useState, 2),
@@ -2477,7 +2477,7 @@
2477
2477
  })(["position:absolute;flex-shrink:0;flex-grow:0;margin-right:8px;height:100%;"])
2478
2478
  };
2479
2479
 
2480
- var _excluded$2 = ["icon", "error", "disabled", "placeholder", "errorMessage", "autoComplete", "hasFloatingLabel", "value", "isTranslateActive", "defaultValue"];
2480
+ var _excluded$3 = ["icon", "error", "disabled", "placeholder", "errorMessage", "autoComplete", "hasFloatingLabel", "value", "isTranslateActive", "defaultValue"];
2481
2481
 
2482
2482
  var Input = /*#__PURE__*/function (_PureComponent) {
2483
2483
  _inherits$2(Input, _PureComponent);
@@ -2573,7 +2573,7 @@
2573
2573
  value = _this$props$value === void 0 ? stateValue : _this$props$value,
2574
2574
  isTranslateActive = _this$props.isTranslateActive;
2575
2575
  _this$props.defaultValue;
2576
- var props = _objectWithoutProperties(_this$props, _excluded$2);
2576
+ var props = _objectWithoutProperties(_this$props, _excluded$3);
2577
2577
 
2578
2578
  var autoCompleteOff = props.type === 'password' ? 'new-password' : 'off';
2579
2579
  var isFloating = isFocused || !!value.toString();
@@ -2698,7 +2698,7 @@
2698
2698
  })(["color:", ";font-size:12px;line-height:14px;display:block;word-break:break-word;"], viewsPalette.statusRed)
2699
2699
  };
2700
2700
 
2701
- var _excluded$1 = ["label", "error", "disabled", "placeholder", "autoComplete", "errorMessage", "hasFloatingLabel", "isTranslateActive", "value", "defaultValue"];
2701
+ var _excluded$2 = ["label", "error", "disabled", "placeholder", "autoComplete", "errorMessage", "hasFloatingLabel", "isTranslateActive", "value", "defaultValue"];
2702
2702
 
2703
2703
  var Textarea = /*#__PURE__*/function (_PureComponent) {
2704
2704
  _inherits$2(Textarea, _PureComponent);
@@ -2800,7 +2800,7 @@
2800
2800
  _this$props$value = _this$props.value,
2801
2801
  value = _this$props$value === void 0 ? stateValue : _this$props$value;
2802
2802
  _this$props.defaultValue;
2803
- var props = _objectWithoutProperties(_this$props, _excluded$1);
2803
+ var props = _objectWithoutProperties(_this$props, _excluded$2);
2804
2804
 
2805
2805
  var isFloating = isFocused || !!value;
2806
2806
  return /*#__PURE__*/React__default["default"].createElement(styled$5.Container, {
@@ -4319,14 +4319,14 @@
4319
4319
  })(["margin-right:8px;"])
4320
4320
  };
4321
4321
 
4322
- var _excluded = ["href", "children", "target", "icon"];
4322
+ var _excluded$1 = ["href", "children", "target", "icon"];
4323
4323
 
4324
4324
  var Link = function Link(_ref) {
4325
4325
  var href = _ref.href,
4326
4326
  children = _ref.children,
4327
4327
  target = _ref.target,
4328
4328
  icon = _ref.icon,
4329
- props = _objectWithoutProperties(_ref, _excluded);
4329
+ props = _objectWithoutProperties(_ref, _excluded$1);
4330
4330
 
4331
4331
  var renderIcon = function renderIcon() {
4332
4332
  return icon ? /*#__PURE__*/React__default["default"].createElement(styled$1.StyledIcon, {
@@ -4450,6 +4450,8 @@
4450
4450
  Overlay: Overlay
4451
4451
  };
4452
4452
 
4453
+ var _excluded = ["open", "position", "handleClose", "transitionDuration", "fullScreen", "closeOnClickAway", "children"];
4454
+
4453
4455
  var Drawer = function Drawer(_ref) {
4454
4456
  var open = _ref.open,
4455
4457
  position = _ref.position,
@@ -4457,18 +4459,20 @@
4457
4459
  transitionDuration = _ref.transitionDuration,
4458
4460
  fullScreen = _ref.fullScreen,
4459
4461
  closeOnClickAway = _ref.closeOnClickAway,
4460
- children = _ref.children;
4462
+ children = _ref.children,
4463
+ props = _objectWithoutProperties(_ref, _excluded);
4464
+
4461
4465
  var drawerRef = React.useRef(null);
4462
4466
  return /*#__PURE__*/React__default["default"].createElement(ClickAwayListener, {
4463
4467
  onClickAway: closeOnClickAway && open && handleClose
4464
- }, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled.Drawer, {
4468
+ }, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(styled.Drawer, _extends$1({
4465
4469
  open: open,
4466
4470
  position: position,
4467
4471
  transitionDuration: transitionDuration,
4468
4472
  fullScreen: fullScreen,
4469
4473
  className: "drawer",
4470
4474
  ref: drawerRef
4471
- }, /*#__PURE__*/React__default["default"].createElement(styled.Content, {
4475
+ }, props), /*#__PURE__*/React__default["default"].createElement(styled.Content, {
4472
4476
  className: "drawer__content"
4473
4477
  }, /*#__PURE__*/React__default["default"].createElement(styled.Header, null, handleClose && typeof handleClose === 'function' && /*#__PURE__*/React__default["default"].createElement(styled.CloseBtn, {
4474
4478
  onClick: handleClose