@darajs/core 1.5.1 → 1.5.3
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.
|
Binary file
|
|
@@ -34743,34 +34743,44 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
34743
34743
|
(function() {
|
|
34744
34744
|
var hasOwn = {}.hasOwnProperty;
|
|
34745
34745
|
function classNames() {
|
|
34746
|
-
var classes =
|
|
34746
|
+
var classes = "";
|
|
34747
34747
|
for (var i2 = 0; i2 < arguments.length; i2++) {
|
|
34748
34748
|
var arg = arguments[i2];
|
|
34749
|
-
if (
|
|
34750
|
-
|
|
34751
|
-
|
|
34752
|
-
|
|
34753
|
-
|
|
34754
|
-
|
|
34755
|
-
|
|
34756
|
-
|
|
34757
|
-
|
|
34758
|
-
|
|
34759
|
-
|
|
34760
|
-
|
|
34761
|
-
|
|
34762
|
-
|
|
34763
|
-
|
|
34764
|
-
|
|
34765
|
-
|
|
34766
|
-
|
|
34767
|
-
|
|
34768
|
-
|
|
34769
|
-
|
|
34770
|
-
|
|
34749
|
+
if (arg) {
|
|
34750
|
+
classes = appendClass(classes, parseValue(arg));
|
|
34751
|
+
}
|
|
34752
|
+
}
|
|
34753
|
+
return classes;
|
|
34754
|
+
}
|
|
34755
|
+
function parseValue(arg) {
|
|
34756
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
34757
|
+
return arg;
|
|
34758
|
+
}
|
|
34759
|
+
if (typeof arg !== "object") {
|
|
34760
|
+
return "";
|
|
34761
|
+
}
|
|
34762
|
+
if (Array.isArray(arg)) {
|
|
34763
|
+
return classNames.apply(null, arg);
|
|
34764
|
+
}
|
|
34765
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
34766
|
+
return arg.toString();
|
|
34767
|
+
}
|
|
34768
|
+
var classes = "";
|
|
34769
|
+
for (var key in arg) {
|
|
34770
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
34771
|
+
classes = appendClass(classes, key);
|
|
34771
34772
|
}
|
|
34772
34773
|
}
|
|
34773
|
-
return classes
|
|
34774
|
+
return classes;
|
|
34775
|
+
}
|
|
34776
|
+
function appendClass(value, newClass) {
|
|
34777
|
+
if (!newClass) {
|
|
34778
|
+
return value;
|
|
34779
|
+
}
|
|
34780
|
+
if (value) {
|
|
34781
|
+
return value + " " + newClass;
|
|
34782
|
+
}
|
|
34783
|
+
return value + newClass;
|
|
34774
34784
|
}
|
|
34775
34785
|
if (module2.exports) {
|
|
34776
34786
|
classNames.default = classNames;
|
|
@@ -36773,21 +36783,21 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
36773
36783
|
throw new TypeError("Cannot call a class as a function");
|
|
36774
36784
|
}
|
|
36775
36785
|
}
|
|
36776
|
-
function
|
|
36777
|
-
if (
|
|
36778
|
-
return
|
|
36779
|
-
var
|
|
36780
|
-
if (
|
|
36781
|
-
var
|
|
36782
|
-
if (
|
|
36783
|
-
return
|
|
36786
|
+
function toPrimitive(t2, r2) {
|
|
36787
|
+
if ("object" != _typeof(t2) || !t2)
|
|
36788
|
+
return t2;
|
|
36789
|
+
var e3 = t2[Symbol.toPrimitive];
|
|
36790
|
+
if (void 0 !== e3) {
|
|
36791
|
+
var i2 = e3.call(t2, r2 || "default");
|
|
36792
|
+
if ("object" != _typeof(i2))
|
|
36793
|
+
return i2;
|
|
36784
36794
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
36785
36795
|
}
|
|
36786
|
-
return (
|
|
36796
|
+
return ("string" === r2 ? String : Number)(t2);
|
|
36787
36797
|
}
|
|
36788
|
-
function
|
|
36789
|
-
var
|
|
36790
|
-
return _typeof(
|
|
36798
|
+
function toPropertyKey(t2) {
|
|
36799
|
+
var i2 = toPrimitive(t2, "string");
|
|
36800
|
+
return "symbol" == _typeof(i2) ? i2 : String(i2);
|
|
36791
36801
|
}
|
|
36792
36802
|
function _defineProperties$1(target, props) {
|
|
36793
36803
|
for (var i2 = 0; i2 < props.length; i2++) {
|
|
@@ -36796,7 +36806,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
36796
36806
|
descriptor.configurable = true;
|
|
36797
36807
|
if ("value" in descriptor)
|
|
36798
36808
|
descriptor.writable = true;
|
|
36799
|
-
Object.defineProperty(target,
|
|
36809
|
+
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
|
|
36800
36810
|
}
|
|
36801
36811
|
}
|
|
36802
36812
|
function _createClass$1(Constructor, protoProps, staticProps) {
|
|
@@ -36810,7 +36820,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
36810
36820
|
return Constructor;
|
|
36811
36821
|
}
|
|
36812
36822
|
function _defineProperty$4(obj, key, value) {
|
|
36813
|
-
key =
|
|
36823
|
+
key = toPropertyKey(key);
|
|
36814
36824
|
if (key in obj) {
|
|
36815
36825
|
Object.defineProperty(obj, key, {
|
|
36816
36826
|
value,
|
|
@@ -43473,11 +43483,12 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
43473
43483
|
}
|
|
43474
43484
|
};
|
|
43475
43485
|
const onKeyDown = (e3) => {
|
|
43476
|
-
var _a;
|
|
43486
|
+
var _a, _b;
|
|
43487
|
+
(_a = props.onKeyDown) === null || _a === void 0 ? void 0 : _a.call(props, e3);
|
|
43477
43488
|
if (!props.stepper) {
|
|
43478
43489
|
return;
|
|
43479
43490
|
}
|
|
43480
|
-
const stepSkip = Math.abs((
|
|
43491
|
+
const stepSkip = Math.abs((_b = props.stepSkip) !== null && _b !== void 0 ? _b : 1);
|
|
43481
43492
|
if (e3.key === Key.UP) {
|
|
43482
43493
|
step(stepSkip);
|
|
43483
43494
|
}
|
|
@@ -43500,7 +43511,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
43500
43511
|
}
|
|
43501
43512
|
(_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, parsed, e3);
|
|
43502
43513
|
},
|
|
43503
|
-
[props.integerOnly, props.value]
|
|
43514
|
+
[props.integerOnly, props.value, props.onChange]
|
|
43504
43515
|
);
|
|
43505
43516
|
React.useEffect(() => {
|
|
43506
43517
|
setInput(getInitialValue(props.value, props.initialValue));
|
|
@@ -57567,12 +57578,12 @@ Inferred class string: "${iconClasses}."`
|
|
|
57567
57578
|
error,
|
|
57568
57579
|
resetErrorBoundary: this.resetErrorBoundary
|
|
57569
57580
|
};
|
|
57570
|
-
if (
|
|
57571
|
-
childToRender = fallback;
|
|
57572
|
-
} else if (typeof fallbackRender === "function") {
|
|
57581
|
+
if (typeof fallbackRender === "function") {
|
|
57573
57582
|
childToRender = fallbackRender(props);
|
|
57574
57583
|
} else if (FallbackComponent) {
|
|
57575
57584
|
childToRender = React.createElement(FallbackComponent, props);
|
|
57585
|
+
} else if (fallback === null || React.isValidElement(fallback)) {
|
|
57586
|
+
childToRender = fallback;
|
|
57576
57587
|
} else {
|
|
57577
57588
|
throw error;
|
|
57578
57589
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darajs/core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "Dara Framework core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"@babel/preset-env": "^7.23.0",
|
|
36
36
|
"@babel/preset-react": "^7.22.15",
|
|
37
37
|
"@babel/preset-typescript": "^7.23.0",
|
|
38
|
-
"@darajs/eslint-config": "~1.4.
|
|
39
|
-
"@darajs/prettier-config": "~1.4.
|
|
40
|
-
"@darajs/stylelint-config": "~1.4.
|
|
38
|
+
"@darajs/eslint-config": "~1.4.4",
|
|
39
|
+
"@darajs/prettier-config": "~1.4.4",
|
|
40
|
+
"@darajs/stylelint-config": "~1.4.4",
|
|
41
41
|
"@rollup/plugin-inject": "^4.0.4",
|
|
42
42
|
"@testing-library/dom": "^9.3.0",
|
|
43
43
|
"@testing-library/jest-dom": "^5.16.5",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"whatwg-fetch": "^3.6.2"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@darajs/styled-components": "~1.4.
|
|
78
|
-
"@darajs/ui-components": "~1.4.
|
|
79
|
-
"@darajs/ui-notifications": "~1.4.
|
|
80
|
-
"@darajs/ui-utils": "~1.4.
|
|
77
|
+
"@darajs/styled-components": "~1.4.4",
|
|
78
|
+
"@darajs/ui-components": "~1.4.4",
|
|
79
|
+
"@darajs/ui-notifications": "~1.4.4",
|
|
80
|
+
"@darajs/ui-utils": "~1.4.4",
|
|
81
81
|
"@fortawesome/fontawesome-free": "~6.4.0",
|
|
82
82
|
"@recoiljs/refine": "^0.1.1",
|
|
83
83
|
"@tanstack/query-core": "^4.0.0",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"publishConfig": {
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "b4bbed8994a87b24b637765544b43851adb3219e"
|
|
117
117
|
}
|