@symbo.ls/uikit 2.11.16 → 2.11.19
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/dist/index.cjs.js +32 -11
- package/dist/index.cjs.js.map +3 -3
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -3120,7 +3120,7 @@ var require_object = __commonJS({
|
|
|
3120
3120
|
overwrite: () => overwrite,
|
|
3121
3121
|
overwriteDeep: () => overwriteDeep2,
|
|
3122
3122
|
overwriteObj: () => overwriteObj,
|
|
3123
|
-
overwriteShallow: () =>
|
|
3123
|
+
overwriteShallow: () => overwriteShallow3,
|
|
3124
3124
|
removeFromObject: () => removeFromObject2
|
|
3125
3125
|
});
|
|
3126
3126
|
module2.exports = __toCommonJS2(object_exports);
|
|
@@ -3374,7 +3374,7 @@ var require_object = __commonJS({
|
|
|
3374
3374
|
}
|
|
3375
3375
|
return changes;
|
|
3376
3376
|
};
|
|
3377
|
-
var
|
|
3377
|
+
var overwriteShallow3 = (obj, params, excludeFrom = []) => {
|
|
3378
3378
|
for (const e2 in params) {
|
|
3379
3379
|
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
3380
3380
|
continue;
|
|
@@ -6942,7 +6942,7 @@ var require_cjs10 = __commonJS({
|
|
|
6942
6942
|
__export22(types_exports, {
|
|
6943
6943
|
TYPES: () => TYPES,
|
|
6944
6944
|
is: () => is2,
|
|
6945
|
-
isArray: () =>
|
|
6945
|
+
isArray: () => isArray62,
|
|
6946
6946
|
isBoolean: () => isBoolean,
|
|
6947
6947
|
isDefined: () => isDefined2,
|
|
6948
6948
|
isFunction: () => isFunction22,
|
|
@@ -6969,21 +6969,21 @@ var require_cjs10 = __commonJS({
|
|
|
6969
6969
|
var isFunction22 = (arg) => typeof arg === "function";
|
|
6970
6970
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
6971
6971
|
var isNull = (arg) => arg === null;
|
|
6972
|
-
var
|
|
6972
|
+
var isArray62 = (arg) => Array.isArray(arg);
|
|
6973
6973
|
var isObjectLike32 = (arg) => {
|
|
6974
6974
|
if (arg === null)
|
|
6975
6975
|
return false;
|
|
6976
6976
|
return typeof arg === "object";
|
|
6977
6977
|
};
|
|
6978
6978
|
var isDefined2 = (arg) => {
|
|
6979
|
-
return isObject72(arg) || isObjectLike32(arg) || isString8(arg) || isNumber(arg) || isFunction22(arg) ||
|
|
6979
|
+
return isObject72(arg) || isObjectLike32(arg) || isString8(arg) || isNumber(arg) || isFunction22(arg) || isArray62(arg) || isObjectLike32(arg) || isBoolean(arg) || isNull(arg);
|
|
6980
6980
|
};
|
|
6981
6981
|
var isUndefined2 = (arg) => {
|
|
6982
6982
|
return arg === void 0;
|
|
6983
6983
|
};
|
|
6984
6984
|
var TYPES = {
|
|
6985
6985
|
boolean: isBoolean,
|
|
6986
|
-
array:
|
|
6986
|
+
array: isArray62,
|
|
6987
6987
|
object: isObject72,
|
|
6988
6988
|
string: isString8,
|
|
6989
6989
|
number: isNumber,
|
|
@@ -7047,7 +7047,7 @@ var require_cjs10 = __commonJS({
|
|
|
7047
7047
|
overwrite: () => overwrite,
|
|
7048
7048
|
overwriteDeep: () => overwriteDeep2,
|
|
7049
7049
|
overwriteObj: () => overwriteObj,
|
|
7050
|
-
overwriteShallow: () =>
|
|
7050
|
+
overwriteShallow: () => overwriteShallow3,
|
|
7051
7051
|
removeFromObject: () => removeFromObject2
|
|
7052
7052
|
});
|
|
7053
7053
|
module22.exports = __toCommonJS22(object_exports);
|
|
@@ -7301,7 +7301,7 @@ var require_cjs10 = __commonJS({
|
|
|
7301
7301
|
}
|
|
7302
7302
|
return changes;
|
|
7303
7303
|
};
|
|
7304
|
-
var
|
|
7304
|
+
var overwriteShallow3 = (obj, params, excludeFrom = []) => {
|
|
7305
7305
|
for (const e2 in params) {
|
|
7306
7306
|
if (excludeFrom.includes(e2) || e2.includes("__"))
|
|
7307
7307
|
continue;
|
|
@@ -8315,12 +8315,26 @@ var require_cjs10 = __commonJS({
|
|
|
8315
8315
|
return acc;
|
|
8316
8316
|
}, {});
|
|
8317
8317
|
};
|
|
8318
|
+
var replaceIdsAndUrls = (code, key) => {
|
|
8319
|
+
const idRegex = /id="([^"]*)"/;
|
|
8320
|
+
const urlRegex = /url\(#([^)]*)\)/g;
|
|
8321
|
+
const matches = code.match(/id="([^"]*)"/g);
|
|
8322
|
+
let replacedCode = code;
|
|
8323
|
+
if ((0, import_utils72.isArray)(matches)) {
|
|
8324
|
+
matches.forEach(() => {
|
|
8325
|
+
const randomKey = Math.floor(Math.random() * 1e5);
|
|
8326
|
+
replacedCode = code.replace(idRegex, `id="${key}-${randomKey}"`).replace(urlRegex, `url(#${key}-${randomKey})`);
|
|
8327
|
+
});
|
|
8328
|
+
}
|
|
8329
|
+
return replacedCode;
|
|
8330
|
+
};
|
|
8318
8331
|
var convertSvgToSymbol = (key, code) => {
|
|
8319
8332
|
const extractAttrs = parseRootAttributes(code);
|
|
8320
8333
|
const { width, height } = extractAttrs;
|
|
8321
8334
|
const viewBox = extractAttrs.viewBox || `0 0 ${width || 24} ${height || 24}`;
|
|
8322
8335
|
const xmlns = "http://www.w3.org/2000/svg";
|
|
8323
|
-
|
|
8336
|
+
const replacedCode = replaceIdsAndUrls(code, key);
|
|
8337
|
+
let symbol = replacedCode.replace(
|
|
8324
8338
|
"<svg",
|
|
8325
8339
|
`<symbol id="${key}" xmlns="${xmlns}" viewBox="${viewBox}"`
|
|
8326
8340
|
);
|
|
@@ -12623,7 +12637,7 @@ var applyCaseProps = (key, props3, result, element) => {
|
|
|
12623
12637
|
};
|
|
12624
12638
|
var applyConditionalCaseProps = (key, props3, result, element) => {
|
|
12625
12639
|
const caseKey = key.slice(1);
|
|
12626
|
-
const isPropTrue = element.props[caseKey] || element.state[caseKey]
|
|
12640
|
+
const isPropTrue = element.props[caseKey] || element.state[caseKey];
|
|
12627
12641
|
if (!isPropTrue)
|
|
12628
12642
|
return;
|
|
12629
12643
|
return (0, import_utils.merge)(result, convertPropsToClass(props3, result, element));
|
|
@@ -12647,7 +12661,7 @@ var beforeClassAssign = (element, s) => {
|
|
|
12647
12661
|
if (setter)
|
|
12648
12662
|
setter(key, props3[key], CLASS_NAMES, element);
|
|
12649
12663
|
}
|
|
12650
|
-
(0, import_utils.
|
|
12664
|
+
(0, import_utils.overwriteShallow)(className, CLASS_NAMES);
|
|
12651
12665
|
};
|
|
12652
12666
|
var initUpdate = (changes, element) => {
|
|
12653
12667
|
const { props: props3, context, class: className } = element;
|
|
@@ -12693,6 +12707,13 @@ var initUpdate = (changes, element) => {
|
|
|
12693
12707
|
}
|
|
12694
12708
|
};
|
|
12695
12709
|
var Media = {
|
|
12710
|
+
class: {
|
|
12711
|
+
case: (el, s) => {
|
|
12712
|
+
return {
|
|
12713
|
+
//
|
|
12714
|
+
};
|
|
12715
|
+
}
|
|
12716
|
+
},
|
|
12696
12717
|
on: { beforeClassAssign, initUpdate }
|
|
12697
12718
|
};
|
|
12698
12719
|
|