@janiscommerce/ui-web 0.5.0 → 0.6.1
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 +9 -14
- package/index.umd.js.map +1 -1
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -19401,10 +19401,14 @@
|
|
|
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:32px;min-width:36px;max-width:150px;border-radius:50px;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) {
|
|
19407
19409
|
return props.clickable || props.hasLink ? 'auto' : 'none';
|
|
19410
|
+
}, function (props) {
|
|
19411
|
+
return !props.onlyIcon && 'margin-right: 8px';
|
|
19408
19412
|
}, function (props) {
|
|
19409
19413
|
switch (props.variant) {
|
|
19410
19414
|
case 'outlined':
|
|
@@ -19457,7 +19461,7 @@
|
|
|
19457
19461
|
hasLink = _ref.hasLink,
|
|
19458
19462
|
props = _objectWithoutProperties(_ref, _excluded$4);
|
|
19459
19463
|
|
|
19460
|
-
if (!children) return null;
|
|
19464
|
+
if (!children && !icon) return null;
|
|
19461
19465
|
return /*#__PURE__*/React__default["default"].createElement(styled$8.Chip, _extends$1({
|
|
19462
19466
|
as: props.onClick ? 'button' : 'div',
|
|
19463
19467
|
backgroundColor: backgroundColor,
|
|
@@ -19470,13 +19474,14 @@
|
|
|
19470
19474
|
textColor: textColor,
|
|
19471
19475
|
variant: variant,
|
|
19472
19476
|
iconColor: iconColor,
|
|
19473
|
-
hasLink: hasLink
|
|
19477
|
+
hasLink: hasLink,
|
|
19478
|
+
onlyIcon: !children && icon
|
|
19474
19479
|
}, props), icon && /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
19475
19480
|
className: "chip-icon",
|
|
19476
19481
|
name: icon,
|
|
19477
19482
|
color: iconColor,
|
|
19478
19483
|
pathStyles: styled$8.iconPathStyles
|
|
19479
|
-
}), /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
19484
|
+
}), children && /*#__PURE__*/React__default["default"].createElement(styled$8.Children, null, children), onDelete && /*#__PURE__*/React__default["default"].createElement(styled$8.DeleteButton, {
|
|
19480
19485
|
type: "button",
|
|
19481
19486
|
onClick: onDelete
|
|
19482
19487
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -19517,16 +19522,6 @@
|
|
|
19517
19522
|
return /#/.test(props.color) ? 'uppercase' : 'initial';
|
|
19518
19523
|
})
|
|
19519
19524
|
};
|
|
19520
|
-
({
|
|
19521
|
-
Grid: styled__default["default"].div.withConfig({
|
|
19522
|
-
displayName: "styles__Grid",
|
|
19523
|
-
componentId: "sc-zbd85t-3"
|
|
19524
|
-
})(["display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));grid-gap:15px;"]),
|
|
19525
|
-
Item: styled__default["default"].div.withConfig({
|
|
19526
|
-
displayName: "styles__Item",
|
|
19527
|
-
componentId: "sc-zbd85t-4"
|
|
19528
|
-
})(["padding:5px;border:1px dashed #ccc;cursor:default;display:grid;justify-items:center;justify-content:center;grid-row-gap:5px;"])
|
|
19529
|
-
});
|
|
19530
19525
|
|
|
19531
19526
|
var Color = function Color(_ref) {
|
|
19532
19527
|
var color = _ref.color,
|