@janiscommerce/ui-web 0.6.0 → 0.6.2
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/index.umd.js +15 -4
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -19401,10 +19401,20 @@
|
|
|
19401
19401
|
Chip: styled__default["default"].button.withConfig({
|
|
19402
19402
|
displayName: "styles__Chip",
|
|
19403
19403
|
componentId: "sc-1vnh4co-0"
|
|
19404
|
-
})(["padding:
|
|
19404
|
+
})(["padding:", ";cursor:", ";font-size:13px;color:", ";height:", ";width:", ";min-width:36px;max-width:150px;border-radius:", ";display:inline-flex;justify-content:center;align-items:center;pointer-events:", ";white-space:nowrap;.chip-icon{", ";}", " ", ";", " ", " ", " ", ""], function (props) {
|
|
19405
|
+
return !props.onlyIcon ? '0 12px' : '0';
|
|
19406
|
+
}, function (props) {
|
|
19405
19407
|
return props.clickable ? 'pointer' : 'default';
|
|
19406
19408
|
}, palette.black.main, function (props) {
|
|
19409
|
+
return !props.onlyIcon ? '32px' : '36px';
|
|
19410
|
+
}, function (props) {
|
|
19411
|
+
return props.onlyIcon && '36px';
|
|
19412
|
+
}, function (props) {
|
|
19413
|
+
return !props.onlyIcon ? '50px' : '50%';
|
|
19414
|
+
}, function (props) {
|
|
19407
19415
|
return props.clickable || props.hasLink ? 'auto' : 'none';
|
|
19416
|
+
}, function (props) {
|
|
19417
|
+
return !props.onlyIcon && 'margin-right: 8px';
|
|
19408
19418
|
}, function (props) {
|
|
19409
19419
|
switch (props.variant) {
|
|
19410
19420
|
case 'outlined':
|
|
@@ -19457,7 +19467,7 @@
|
|
|
19457
19467
|
hasLink = _ref.hasLink,
|
|
19458
19468
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
19459
19469
|
|
|
19460
|
-
if (!children) return null;
|
|
19470
|
+
if (!children && !icon) return null;
|
|
19461
19471
|
return /*#__PURE__*/React__default["default"].createElement(styled$8.Chip, _extends$1({
|
|
19462
19472
|
as: props.onClick ? 'button' : 'div',
|
|
19463
19473
|
backgroundColor: backgroundColor,
|
|
@@ -19470,13 +19480,14 @@
|
|
|
19470
19480
|
textColor: textColor,
|
|
19471
19481
|
variant: variant,
|
|
19472
19482
|
iconColor: iconColor,
|
|
19473
|
-
hasLink: hasLink
|
|
19483
|
+
hasLink: hasLink,
|
|
19484
|
+
onlyIcon: !children && icon
|
|
19474
19485
|
}, props), icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
19475
19486
|
className: "chip-icon",
|
|
19476
19487
|
name: icon,
|
|
19477
19488
|
color: iconColor,
|
|
19478
19489
|
pathStyles: styled$8.iconPathStyles
|
|
19479
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
19490
|
+
}), children && /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
19480
19491
|
type: "button",
|
|
19481
19492
|
onClick: onDelete
|
|
19482
19493
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|