@luminati-io/uikit 3.0.20 → 3.0.21
Sign up to get free protection for your applications and to get access to all the features.
@@ -26544,20 +26544,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
26544
26544
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
26545
26545
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
26546
26546
|
/* harmony export */ });
|
26547
|
-
/* harmony import */ var
|
26548
|
-
/* harmony import */ var
|
26549
|
-
/* harmony import */ var
|
26550
|
-
/* harmony import */ var
|
26551
|
-
/* harmony import */ var
|
26552
|
-
/* harmony import */ var
|
26553
|
-
/* harmony import */ var
|
26554
|
-
/* harmony import */ var
|
26555
|
-
/* harmony import */ var
|
26556
|
-
/* harmony import */ var
|
26547
|
+
/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/omit */ "./node_modules/lodash/omit.js");
|
26548
|
+
/* harmony import */ var lodash_omit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_omit__WEBPACK_IMPORTED_MODULE_0__);
|
26549
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types");
|
26550
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
26551
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
26552
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
26553
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! styled-components */ "styled-components");
|
26554
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_3__);
|
26555
|
+
/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon */ "./src/icon.js");
|
26556
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
26557
|
+
/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
|
26558
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils */ "./src/utils.js");
|
26557
26559
|
// LICENSE_CODE ZON
|
26558
26560
|
|
26559
26561
|
|
26560
26562
|
/*jslint react:true*/
|
26563
|
+
|
26561
26564
|
var _excluded = ["text", "variant", "size", "icon"],
|
26562
26565
|
_excluded2 = ["isLeft", "isRight"];
|
26563
26566
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
@@ -26570,18 +26573,18 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
26570
26573
|
|
26571
26574
|
|
26572
26575
|
|
26573
|
-
var Link = /*#__PURE__*/
|
26576
|
+
var Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().forwardRef(function (props, ref) {
|
26574
26577
|
var text = props.text,
|
26575
26578
|
variant = props.variant,
|
26576
26579
|
size = props.size,
|
26577
26580
|
icon = props.icon,
|
26578
26581
|
rest = _objectWithoutProperties(props, _excluded);
|
26579
26582
|
if (variant == 'inline') {
|
26580
|
-
return /*#__PURE__*/
|
26583
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(InlineLink, _extends({
|
26581
26584
|
ref: ref
|
26582
|
-
}, rest, (0,
|
26585
|
+
}, rest, (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getLinkProps)(props)), text);
|
26583
26586
|
}
|
26584
|
-
var _getIconProps = (0,
|
26587
|
+
var _getIconProps = (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getIconProps)('Link', props),
|
26585
26588
|
isLeft = _getIconProps.isLeft,
|
26586
26589
|
isRight = _getIconProps.isRight,
|
26587
26590
|
iconProps = _objectWithoutProperties(_getIconProps, _excluded2);
|
@@ -26589,17 +26592,17 @@ var Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(
|
|
26589
26592
|
lg: 'lg',
|
26590
26593
|
sm: 'xs'
|
26591
26594
|
}[size] || 'base';
|
26592
|
-
return /*#__PURE__*/
|
26595
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(StyledLink, _extends({
|
26593
26596
|
ref: ref
|
26594
|
-
}, rest, (0,
|
26595
|
-
variant: variant,
|
26596
|
-
size: size,
|
26597
|
-
noIcon: !icon
|
26598
|
-
}), isLeft && /*#__PURE__*/
|
26597
|
+
}, lodash_omit__WEBPACK_IMPORTED_MODULE_0___default()(rest, 'iconPlacement', 'newTab'), (0,_utils__WEBPACK_IMPORTED_MODULE_7__.getLinkProps)(props), {
|
26598
|
+
$variant: variant,
|
26599
|
+
$size: size,
|
26600
|
+
$noIcon: !icon
|
26601
|
+
}), isLeft && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__["default"], iconProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Label, {
|
26599
26602
|
variant: labelVariant,
|
26600
26603
|
no_wrap: true,
|
26601
26604
|
"data-label": true
|
26602
|
-
}, text), isRight && /*#__PURE__*/
|
26605
|
+
}, text), isRight && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_4__["default"], iconProps));
|
26603
26606
|
});
|
26604
26607
|
Link.displayName = 'Link';
|
26605
26608
|
Link.defaultProps = {
|
@@ -26608,33 +26611,33 @@ Link.defaultProps = {
|
|
26608
26611
|
iconPlacement: 'left'
|
26609
26612
|
};
|
26610
26613
|
Link.propTypes = {
|
26611
|
-
text: (
|
26612
|
-
variant:
|
26613
|
-
size:
|
26614
|
-
icon:
|
26615
|
-
iconPlacement:
|
26616
|
-
href: (
|
26617
|
-
newTab: (
|
26614
|
+
text: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string).isRequired,
|
26615
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['primary', 'secondary', 'inline']),
|
26616
|
+
size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['sm', 'md', 'lg']),
|
26617
|
+
icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_7__.iconNames),
|
26618
|
+
iconPlacement: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['left', 'right']),
|
26619
|
+
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
26620
|
+
newTab: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)
|
26618
26621
|
};
|
26619
|
-
var InlineLink =
|
26622
|
+
var InlineLink = styled_components__WEBPACK_IMPORTED_MODULE_3___default().a.withConfig({
|
26620
26623
|
displayName: "InlineLink",
|
26621
26624
|
componentId: "sc-1ilmd36-0"
|
26622
26625
|
})(["justify-content:center;text-decoration:underline;background:0 none;border:0 none;padding:0;cursor:pointer;&:disabled{cursor:not-allowed;}&:hover,:visited,:focus{text-decoration:underline;}"]);
|
26623
26626
|
InlineLink.displayName = 'InlineLink';
|
26624
|
-
var StyledLink =
|
26627
|
+
var StyledLink = styled_components__WEBPACK_IMPORTED_MODULE_3___default().a.withConfig({
|
26625
26628
|
displayName: "StyledLink",
|
26626
26629
|
componentId: "sc-1ilmd36-1"
|
26627
26630
|
})(["display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:0 none;border:0 none;padding:0;gap:", ";[data-label]{color:", ";text-decoration:", ";}[data-icon]{color:", ";}cursor:pointer;&:disabled{cursor:not-allowed;}&:hover:not(:disabled){[data-label]{color:", ";text-decoration:", ";}[data-icon]{color:", ";}}&:hover,:visited,:focus{text-decoration:none;}"], function (props) {
|
26628
|
-
return (0,
|
26631
|
+
return (0,_utils__WEBPACK_IMPORTED_MODULE_7__.toPixel)(props.$size == 'lg' ? 8 : 4);
|
26629
26632
|
}, function (props) {
|
26630
|
-
return props
|
26633
|
+
return props.$variant == 'primary' ? _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.blue_11 : _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.gray_11_50;
|
26631
26634
|
}, function (props) {
|
26632
|
-
return props
|
26635
|
+
return props.$variant == 'secondary' && props.$noIcon ? 'underline' : 'none';
|
26633
26636
|
}, function (props) {
|
26634
|
-
return props
|
26635
|
-
},
|
26636
|
-
return props
|
26637
|
-
},
|
26637
|
+
return props.$variant == 'primary' ? _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.blue_11 : _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.gray_11;
|
26638
|
+
}, _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.blue_11, function (props) {
|
26639
|
+
return props.$variant == 'secondary' && props.$noIcon ? 'underline' : 'none';
|
26640
|
+
}, _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.blue_11);
|
26638
26641
|
StyledLink.displayName = 'StyledLink';
|
26639
26642
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Link);
|
26640
26643
|
|