@luminati-io/uikit 3.0.8-beta.1 → 3.0.9
Sign up to get free protection for your applications and to get access to all the features.
@@ -20009,16 +20009,18 @@ var Badge = function Badge(props) {
|
|
20009
20009
|
"default": _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.gray_3,
|
20010
20010
|
negative: _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.red_3,
|
20011
20011
|
positive: _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.green_3,
|
20012
|
+
gold: _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.yellow_3,
|
20012
20013
|
blue: _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.blue_3
|
20013
|
-
}[variant];
|
20014
|
+
}[variant] || _theme__WEBPACK_IMPORTED_MODULE_5__["default"].color.gray_3;
|
20014
20015
|
}, [variant]);
|
20015
20016
|
var color = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(function () {
|
20016
20017
|
return {
|
20017
20018
|
"default": 'gray_11_25',
|
20018
20019
|
negative: 'red_11',
|
20019
20020
|
positive: 'green_11',
|
20021
|
+
gold: 'yellow_11',
|
20020
20022
|
blue: 'blue_11'
|
20021
|
-
}[variant];
|
20023
|
+
}[variant] || 'gray_11_25';
|
20022
20024
|
}, [variant]);
|
20023
20025
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(BadgeWrapper, {
|
20024
20026
|
className: className,
|
@@ -20040,7 +20042,7 @@ Badge.defaultProps = {
|
|
20040
20042
|
};
|
20041
20043
|
Badge.propTypes = {
|
20042
20044
|
shape: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['rounded', 'square']),
|
20043
|
-
variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'negative', 'positive', 'blue']),
|
20045
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'negative', 'positive', 'gold', 'blue']),
|
20044
20046
|
icon: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_7__.iconNames),
|
20045
20047
|
iconPlacement: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['left', 'right'])
|
20046
20048
|
};
|
@@ -22082,13 +22084,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
22082
22084
|
/* harmony import */ var prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_python__WEBPACK_IMPORTED_MODULE_15__);
|
22083
22085
|
/* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! prismjs/components/prism-json */ "./node_modules/prismjs/components/prism-json.js");
|
22084
22086
|
/* harmony import */ var prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(prismjs_components_prism_json__WEBPACK_IMPORTED_MODULE_16__);
|
22085
|
-
/* harmony import */ var
|
22086
|
-
/* harmony import */ var
|
22087
|
-
/* harmony import */ var
|
22088
|
-
/* harmony import */ var
|
22089
|
-
/* harmony import */ var
|
22090
|
-
/* harmony import */ var
|
22091
|
-
/* harmony import */ var
|
22087
|
+
/* harmony import */ var prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! prismjs/plugins/line-numbers/prism-line-numbers */ "./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js");
|
22088
|
+
/* harmony import */ var prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(prismjs_plugins_line_numbers_prism_line_numbers__WEBPACK_IMPORTED_MODULE_17__);
|
22089
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! prop-types */ "prop-types");
|
22090
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_18__);
|
22091
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! styled-components */ "styled-components");
|
22092
|
+
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_19__);
|
22093
|
+
/* harmony import */ var _theme__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../theme */ "./src/theme.js");
|
22092
22094
|
// LICENSE_CODE ZON
|
22093
22095
|
|
22094
22096
|
|
@@ -22113,6 +22115,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
22113
22115
|
|
22114
22116
|
|
22115
22117
|
|
22118
|
+
|
22119
|
+
(prismjs_components_prism_core__WEBPACK_IMPORTED_MODULE_1___default().manual) = true;
|
22120
|
+
|
22121
|
+
// import 'prismjs/plugins/line-numbers/prism-line-numbers';
|
22116
22122
|
|
22117
22123
|
var Code = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, ref) {
|
22118
22124
|
var text = props.text,
|
@@ -22135,23 +22141,23 @@ Code.defaultProps = {
|
|
22135
22141
|
theme: 'white'
|
22136
22142
|
};
|
22137
22143
|
Code.propTypes = {
|
22138
|
-
text: (
|
22139
|
-
lang:
|
22140
|
-
theme:
|
22141
|
-
lineNumbers: (
|
22144
|
+
text: (prop_types__WEBPACK_IMPORTED_MODULE_18___default().string),
|
22145
|
+
lang: prop_types__WEBPACK_IMPORTED_MODULE_18___default().oneOf(['js', 'javascript', 'css', 'markup', 'shell', 'java', 'csharp', 'vbnet', 'php', 'ruby', 'perl', 'python', 'json']),
|
22146
|
+
theme: prop_types__WEBPACK_IMPORTED_MODULE_18___default().oneOf(['black', 'white']),
|
22147
|
+
lineNumbers: (prop_types__WEBPACK_IMPORTED_MODULE_18___default().bool)
|
22142
22148
|
};
|
22143
|
-
var CodeWrapper =
|
22149
|
+
var CodeWrapper = styled_components__WEBPACK_IMPORTED_MODULE_19___default().pre.withConfig({
|
22144
22150
|
displayName: "CodeWrapper",
|
22145
22151
|
componentId: "sc-1kleg7y-0"
|
22146
|
-
})(["&&&{font-family:", ";margin:0;border:none;background-color:transparent;width:100%;white-space:pre-wrap !important;font-size:", ";line-height:", ";tab-size:4;text-align:left;word-spacing:normal;word-break:break-word;word-wrap:normal;hyphens:none;max-height:none !important;code.content{all:inherit;margin:0;padding:0;border:none;background-color:transparent;text-shadow:none;}&.line-numbers{position:relative;padding-left:3.8rem;counter-reset:linenumber;& > code{position:relative;white-space:inherit;}.line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8rem;width:3rem;letter-spacing:-1px;border-right:1px solid ", ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;& > span{display:block;counter-increment:linenumber;&:before{content:counter(linenumber);color:", ";display:block;padding-right:0.8rem;text-align:right;}}}}", "}"],
|
22152
|
+
})(["&&&{font-family:", ";margin:0;border:none;background-color:transparent;width:100%;white-space:pre-wrap !important;font-size:", ";line-height:", ";tab-size:4;text-align:left;word-spacing:normal;word-break:break-word;word-wrap:normal;hyphens:none;max-height:none !important;code.content{all:inherit;margin:0;padding:0;border:none;background-color:transparent;text-shadow:none;}&.line-numbers{position:relative;padding-left:3.8rem;counter-reset:linenumber;& > code{position:relative;white-space:inherit;}.line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8rem;width:3rem;letter-spacing:-1px;border-right:1px solid ", ";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;& > span{display:block;counter-increment:linenumber;&:before{content:counter(linenumber);color:", ";display:block;padding-right:0.8rem;text-align:right;}}}}", "}"], _theme__WEBPACK_IMPORTED_MODULE_20__["default"].font_family.mono, _theme__WEBPACK_IMPORTED_MODULE_20__["default"].font_size.sm, _theme__WEBPACK_IMPORTED_MODULE_20__["default"].line_height.loose, function (props) {
|
22147
22153
|
return props.$theme == 'white' ? '#5F6364' : '#999';
|
22148
22154
|
}, function (props) {
|
22149
22155
|
return props.$theme == 'white' ? '#5F6364' : '#999';
|
22150
22156
|
}, function (props) {
|
22151
22157
|
if (props.$theme == 'white') {
|
22152
|
-
return (0,
|
22158
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_19__.css)(["code.content{color:#c92c2c;}.token.comment,.token.block-comment,.token.prolog,.token.doctype,.token.cdata{color:#7D8B99;}.token.punctuation{color:#5F6364;}.token.property,.token.tag,.token.boolean,.token.number,.token.function-name,.token.constant,.token.symbol,.token.deleted{color:#c92c2c;}.token.selector,.token.attr-name,.token.string,.token.char,.token.function,.token.builtin,.token.inserted{color:#2f9c0a;}.token.operator,.token.entity,.token.url,.token.variable{color:#a67f59;background:rgba(255,255,255,0.5);}.token.atrule,.token.attr-value,.token.keyword,.token.class-name{color:#1990b8;}.token.regex,.token.important{color:#e90;}.language-css .token.string,.style .token.string{color:#a67f59;background:rgba(255,255,255,0.5);}.token.important{font-weight:normal;}.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}.token.namespace{opacity:.7;}"]);
|
22153
22159
|
}
|
22154
|
-
return (0,
|
22160
|
+
return (0,styled_components__WEBPACK_IMPORTED_MODULE_19__.css)(["code.content{color:", ";}.token.comment,.token.prolog,.token.doctype,.token.cdata{color:slategray;}.token.punctuation{color:#999;}.token.namespace{opacity:.7;}.token.property,.token.tag,.token.boolean,.token.constant,.token.symbol,.token.deleted{color:#f8c555;}.token.selector,.token.attr-name,.token.string,.token.char,.token.builtin,.token.inserted{color:#7ec699;}.token.operator,.token.entity,.token.url,.language-css .token.string,.style .token.string{color:#67cdcc;}.token.atrule,.token.attr-value,.token.keyword{color:#cc99cd;}.token.function,.token.number,.token.class-name{color:#f08d49;}.token.regex,.token.important,.token.variable{color:#e90;}.token.important,.token.bold{font-weight:bold;}.token.italic{font-style:italic;}.token.entity{cursor:help;}"], _theme__WEBPACK_IMPORTED_MODULE_20__["default"].color.gray_8);
|
22155
22161
|
});
|
22156
22162
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Code);
|
22157
22163
|
|
@@ -22188,14 +22194,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
22188
22194
|
|
22189
22195
|
|
22190
22196
|
var CodeBlock = function CodeBlock(props) {
|
22191
|
-
var
|
22197
|
+
var className = props.className,
|
22198
|
+
header = props.header,
|
22192
22199
|
code = props.code,
|
22193
22200
|
lang = props.lang,
|
22194
22201
|
max_height = props.max_height,
|
22195
22202
|
themeProp = props.theme,
|
22196
22203
|
lineNumbers = props.lineNumbers,
|
22197
|
-
copyButton = props.copyButton
|
22204
|
+
copyButton = props.copyButton,
|
22205
|
+
onCopy = props.onCopy;
|
22198
22206
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockWrapper, {
|
22207
|
+
className: className,
|
22199
22208
|
"data-testid": "code_block"
|
22200
22209
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockHeader, {
|
22201
22210
|
$theme: themeProp
|
@@ -22205,7 +22214,8 @@ var CodeBlock = function CodeBlock(props) {
|
|
22205
22214
|
code: code,
|
22206
22215
|
theme: themeProp,
|
22207
22216
|
lineNumbers: lineNumbers,
|
22208
|
-
copyButton: copyButton
|
22217
|
+
copyButton: copyButton,
|
22218
|
+
onCopy: onCopy
|
22209
22219
|
}));
|
22210
22220
|
};
|
22211
22221
|
CodeBlock.displayName = 'CodeBlock';
|
@@ -22285,7 +22295,8 @@ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
|
|
22285
22295
|
themeProp = props.theme,
|
22286
22296
|
lineNumbers = props.lineNumbers,
|
22287
22297
|
copyButton = props.copyButton,
|
22288
|
-
loading = props.loading
|
22298
|
+
loading = props.loading,
|
22299
|
+
onCopy = props.onCopy;
|
22289
22300
|
var codeRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
22290
22301
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CodeBlockBody, {
|
22291
22302
|
ref: ref,
|
@@ -22301,7 +22312,8 @@ var CodeSnippet = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)
|
|
22301
22312
|
}), !!copyButton && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_copy_button__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
22302
22313
|
code: code,
|
22303
22314
|
theme: themeProp,
|
22304
|
-
codeRef: codeRef
|
22315
|
+
codeRef: codeRef,
|
22316
|
+
onCopy: onCopy
|
22305
22317
|
})), !!loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_skeleton__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
22306
22318
|
theme: themeProp
|
22307
22319
|
}));
|
@@ -22389,7 +22401,8 @@ var icon = _icons__WEBPACK_IMPORTED_MODULE_2__["default"].Copy;
|
|
22389
22401
|
var CopyButton = function CopyButton(props) {
|
22390
22402
|
var code = props.code,
|
22391
22403
|
themeProp = props.theme,
|
22392
|
-
codeRef = props.codeRef
|
22404
|
+
codeRef = props.codeRef,
|
22405
|
+
onCopy = props.onCopy;
|
22393
22406
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(STATE.READY),
|
22394
22407
|
_useState2 = _slicedToArray(_useState, 2),
|
22395
22408
|
state = _useState2[0],
|
@@ -22407,6 +22420,7 @@ var CopyButton = function CopyButton(props) {
|
|
22407
22420
|
success: function success() {
|
22408
22421
|
setState(STATE.SUCCESS);
|
22409
22422
|
resetText();
|
22423
|
+
onCopy === null || onCopy === void 0 ? void 0 : onCopy();
|
22410
22424
|
},
|
22411
22425
|
error: function error() {
|
22412
22426
|
setState(STATE.ERROR);
|
@@ -31064,6 +31078,7 @@ var Label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef
|
|
31064
31078
|
var t = (0,_translation__WEBPACK_IMPORTED_MODULE_2__.useReactTranslate)();
|
31065
31079
|
var typographyProps = _objectSpread(_objectSpread({}, (0,_utils__WEBPACK_IMPORTED_MODULE_3__.getTypographyProps)(props)), {}, {
|
31066
31080
|
font_size: {
|
31081
|
+
xxs: 'xxs',
|
31067
31082
|
xs: 'xs',
|
31068
31083
|
sm: 'sm'
|
31069
31084
|
}[props.variant] || 'md',
|
@@ -31078,7 +31093,7 @@ Label.defaultProps = {
|
|
31078
31093
|
variant: 'base'
|
31079
31094
|
};
|
31080
31095
|
Label.propTypes = {
|
31081
|
-
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'base', 'lg'])
|
31096
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xxs', 'xs', 'sm', 'base', 'lg'])
|
31082
31097
|
};
|
31083
31098
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Label);
|
31084
31099
|
|
@@ -31184,19 +31199,16 @@ var Style = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef
|
|
31184
31199
|
var typographyProps = _objectSpread(_objectSpread({}, (0,_utils__WEBPACK_IMPORTED_MODULE_2__.getTypographyProps)(props)), {}, {
|
31185
31200
|
font_size: {
|
31186
31201
|
italic_sm: 'sm',
|
31187
|
-
code: 'sm',
|
31188
31202
|
italic_xs: 'xs',
|
31189
|
-
|
31203
|
+
code: 'sm',
|
31204
|
+
code_xxs: 'xxs',
|
31205
|
+
capitals: 'xs',
|
31206
|
+
capitals_xxs: 'xxs'
|
31190
31207
|
}[props.variant] || 'md',
|
31191
|
-
line_height:
|
31192
|
-
|
31193
|
-
italic_sm: 'snug'
|
31194
|
-
}[props.variant] || 'none',
|
31195
|
-
font_family: {
|
31196
|
-
code: 'mono'
|
31197
|
-
}[props.variant] || 'sans',
|
31208
|
+
line_height: ['italic_lg', 'italic_sm'].includes(props.variant) ? 'snug' : 'none',
|
31209
|
+
font_family: ['code', 'code_xxs'].includes(props.variant) ? 'mono' : 'sans',
|
31198
31210
|
italic: ['italic_lg', 'italic_sm', 'italic_xs'].includes(props.variant),
|
31199
|
-
uppercase: props.variant
|
31211
|
+
uppercase: ['capitals', 'capitals_xxs'].includes(props.variant)
|
31200
31212
|
});
|
31201
31213
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__["default"], _extends({
|
31202
31214
|
ref: ref
|
@@ -31207,7 +31219,7 @@ Style.defaultProps = {
|
|
31207
31219
|
variant: 'italic_lg'
|
31208
31220
|
};
|
31209
31221
|
Style.propTypes = {
|
31210
|
-
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code', 'capitals']),
|
31222
|
+
variant: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['italic_lg', 'italic_sm', 'italic_xs', 'code', 'code_xxs', 'capitals', 'capitals_xxs']),
|
31211
31223
|
whiteSpace: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(_utils__WEBPACK_IMPORTED_MODULE_2__.whiteSpaces)
|
31212
31224
|
};
|
31213
31225
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Style);
|