lkd-web-kit 0.3.17 → 0.3.18
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.d.ts +5 -12
- package/dist/index.mjs +1 -1
- package/dist/index48.mjs +1 -8
- package/package.json +2 -10
- package/dist/index.cjs +0 -118
- package/dist/index10.cjs +0 -16
- package/dist/index11.cjs +0 -16
- package/dist/index12.cjs +0 -16
- package/dist/index13.cjs +0 -16
- package/dist/index14.cjs +0 -118
- package/dist/index15.cjs +0 -16
- package/dist/index16.cjs +0 -19
- package/dist/index17.cjs +0 -70
- package/dist/index18.cjs +0 -14
- package/dist/index19.cjs +0 -66
- package/dist/index2.cjs +0 -43
- package/dist/index20.cjs +0 -21
- package/dist/index21.cjs +0 -30
- package/dist/index22.cjs +0 -24
- package/dist/index23.cjs +0 -15
- package/dist/index24.cjs +0 -16
- package/dist/index25.cjs +0 -16
- package/dist/index26.cjs +0 -18
- package/dist/index27.cjs +0 -17
- package/dist/index28.cjs +0 -17
- package/dist/index29.cjs +0 -17
- package/dist/index3.cjs +0 -46
- package/dist/index30.cjs +0 -17
- package/dist/index31.cjs +0 -17
- package/dist/index32.cjs +0 -17
- package/dist/index33.cjs +0 -17
- package/dist/index34.cjs +0 -17
- package/dist/index35.cjs +0 -29
- package/dist/index36.cjs +0 -17
- package/dist/index37.cjs +0 -17
- package/dist/index38.cjs +0 -51
- package/dist/index39.cjs +0 -38
- package/dist/index4.cjs +0 -40
- package/dist/index40.cjs +0 -15
- package/dist/index41.cjs +0 -23
- package/dist/index42.cjs +0 -39
- package/dist/index43.cjs +0 -24
- package/dist/index44.cjs +0 -14
- package/dist/index45.cjs +0 -19
- package/dist/index46.cjs +0 -43
- package/dist/index47.cjs +0 -14
- package/dist/index48.cjs +0 -20
- package/dist/index49.cjs +0 -11
- package/dist/index5.cjs +0 -54
- package/dist/index50.cjs +0 -45
- package/dist/index51.cjs +0 -19
- package/dist/index52.cjs +0 -24
- package/dist/index53.cjs +0 -7
- package/dist/index54.cjs +0 -65
- package/dist/index6.cjs +0 -19
- package/dist/index7.cjs +0 -19
- package/dist/index8.cjs +0 -17
- package/dist/index9.cjs +0 -16
package/dist/index46.cjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const core = require('@mantine/core');
|
|
6
|
-
const breakpointsWithPx = require('./index44.cjs');
|
|
7
|
-
|
|
8
|
-
const myDefaultTheme = {
|
|
9
|
-
breakpoints: breakpointsWithPx.breakpointsWithPx,
|
|
10
|
-
cursorType: "pointer",
|
|
11
|
-
components: {
|
|
12
|
-
Notification: core.Notification.extend({
|
|
13
|
-
defaultProps: {
|
|
14
|
-
withBorder: true
|
|
15
|
-
}
|
|
16
|
-
}),
|
|
17
|
-
AppShell: core.AppShell.extend({
|
|
18
|
-
defaultProps: {
|
|
19
|
-
padding: 0
|
|
20
|
-
}
|
|
21
|
-
}),
|
|
22
|
-
Select: core.Select.extend({
|
|
23
|
-
defaultProps: {
|
|
24
|
-
allowDeselect: false,
|
|
25
|
-
withCheckIcon: false,
|
|
26
|
-
clearable: true
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
Menu: core.Menu.extend({
|
|
30
|
-
defaultProps: {
|
|
31
|
-
position: "bottom-end"
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
Tooltip: core.Tooltip.extend({
|
|
35
|
-
defaultProps: {
|
|
36
|
-
multiline: true,
|
|
37
|
-
maw: 300
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
exports.myDefaultTheme = myDefaultTheme;
|
package/dist/index47.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
function formatBytes(bytes, decimals = 2) {
|
|
6
|
-
if (!+bytes) return "0 Bytes";
|
|
7
|
-
const k = 1024;
|
|
8
|
-
const dm = decimals < 0 ? 0 : decimals;
|
|
9
|
-
const sizes = ["Bytes", "KB", "MB"];
|
|
10
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
11
|
-
return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.formatBytes = formatBytes;
|
package/dist/index48.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const ky = require('ky');
|
|
6
|
-
const parseJson = require('./index49.cjs');
|
|
7
|
-
|
|
8
|
-
class KyError extends ky.HTTPError {
|
|
9
|
-
constructor(response, request, options, bodyJson) {
|
|
10
|
-
super(response, request, options);
|
|
11
|
-
this.response.bodyJson = bodyJson;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
const addBodyJsonHook = async (error) => {
|
|
15
|
-
error.response.bodyJson = await parseJson.parseJSON(error.response);
|
|
16
|
-
return error;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
exports.KyError = KyError;
|
|
20
|
-
exports.addBodyJsonHook = addBodyJsonHook;
|
package/dist/index49.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const parseJSON = async (response) => {
|
|
6
|
-
return response.text().then(function(text) {
|
|
7
|
-
return text ? JSON.parse(text) : {};
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
exports.parseJSON = parseJSON;
|
package/dist/index5.cjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
-
|
|
6
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const clsx = require('clsx');
|
|
8
|
-
|
|
9
|
-
const Icon = ({ i: I, size = "md", style, rotate, className, ...rest }) => {
|
|
10
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
-
I,
|
|
12
|
-
{
|
|
13
|
-
...typeof size === "number" ? {
|
|
14
|
-
height: size,
|
|
15
|
-
width: size
|
|
16
|
-
} : stylesBySize[size],
|
|
17
|
-
viewBox: "0 0 24 24",
|
|
18
|
-
style: {
|
|
19
|
-
...style,
|
|
20
|
-
transform: `rotate(${rotate}deg)`
|
|
21
|
-
},
|
|
22
|
-
className: clsx("shrink-0", className),
|
|
23
|
-
...rest
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
const stylesBySize = {
|
|
28
|
-
xs: {
|
|
29
|
-
height: 16,
|
|
30
|
-
width: 16
|
|
31
|
-
},
|
|
32
|
-
sm: {
|
|
33
|
-
height: 20,
|
|
34
|
-
width: 20
|
|
35
|
-
},
|
|
36
|
-
md: {
|
|
37
|
-
height: 24,
|
|
38
|
-
width: 24
|
|
39
|
-
},
|
|
40
|
-
lg: {
|
|
41
|
-
height: 28,
|
|
42
|
-
width: 28
|
|
43
|
-
},
|
|
44
|
-
xl: {
|
|
45
|
-
height: 32,
|
|
46
|
-
width: 32
|
|
47
|
-
},
|
|
48
|
-
["2xl"]: {
|
|
49
|
-
height: 40,
|
|
50
|
-
width: 40
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.Icon = Icon;
|
package/dist/index50.cjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
function indexBy(arr, getKey, getValue) {
|
|
6
|
-
if (getValue)
|
|
7
|
-
return arr.reduce(
|
|
8
|
-
(acc, item) => {
|
|
9
|
-
const key = getKey(item);
|
|
10
|
-
if (key === void 0) return acc;
|
|
11
|
-
acc[key] = getValue(item);
|
|
12
|
-
return acc;
|
|
13
|
-
},
|
|
14
|
-
{}
|
|
15
|
-
);
|
|
16
|
-
return arr.reduce(
|
|
17
|
-
(acc, item) => {
|
|
18
|
-
const key = getKey(item);
|
|
19
|
-
if (key === void 0) return acc;
|
|
20
|
-
acc[key] = item;
|
|
21
|
-
return acc;
|
|
22
|
-
},
|
|
23
|
-
{}
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
const groupBy = (arr, getKey) => {
|
|
27
|
-
const groups = {};
|
|
28
|
-
arr?.forEach((item) => {
|
|
29
|
-
const key = getKey(item);
|
|
30
|
-
if (key === null) return;
|
|
31
|
-
if (Array.isArray(key)) {
|
|
32
|
-
key.forEach((k) => {
|
|
33
|
-
if (!groups[k]) groups[k] = [];
|
|
34
|
-
groups[k]?.push(item);
|
|
35
|
-
});
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (!groups[key]) groups[key] = [];
|
|
39
|
-
groups[key]?.push(item);
|
|
40
|
-
});
|
|
41
|
-
return groups;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
exports.groupBy = groupBy;
|
|
45
|
-
exports.indexBy = indexBy;
|
package/dist/index51.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const shuffleArray = (array) => {
|
|
6
|
-
const shuffledArray = [...array];
|
|
7
|
-
let currentIndex = shuffledArray.length, randomIndex;
|
|
8
|
-
while (currentIndex > 0) {
|
|
9
|
-
randomIndex = Math.floor(Math.random() * currentIndex);
|
|
10
|
-
currentIndex--;
|
|
11
|
-
[shuffledArray[currentIndex], shuffledArray[randomIndex]] = [
|
|
12
|
-
shuffledArray[randomIndex],
|
|
13
|
-
shuffledArray[currentIndex]
|
|
14
|
-
];
|
|
15
|
-
}
|
|
16
|
-
return shuffledArray;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
exports.shuffleArray = shuffleArray;
|
package/dist/index52.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const queryString = require('query-string');
|
|
6
|
-
|
|
7
|
-
const newHref = (fn) => (args) => {
|
|
8
|
-
const href = typeof fn === "string" ? fn : fn(
|
|
9
|
-
args ?? {
|
|
10
|
-
params: {},
|
|
11
|
-
searchParams: {}
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
if (args?.searchParams) {
|
|
15
|
-
const qs = queryString.stringify(args.searchParams, {
|
|
16
|
-
skipEmptyString: true,
|
|
17
|
-
skipNull: true
|
|
18
|
-
});
|
|
19
|
-
return `${href}${qs ? `?${qs}` : ""}`;
|
|
20
|
-
}
|
|
21
|
-
return href;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.newHref = newHref;
|
package/dist/index53.cjs
DELETED
package/dist/index54.cjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
|
|
5
|
-
const CalendarIcon = ({ size = "sm", ...props }) => {
|
|
6
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7
|
-
"svg",
|
|
8
|
-
{
|
|
9
|
-
viewBox: "0 0 24 24",
|
|
10
|
-
fill: "none",
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
width: size === "sm" ? 20 : 24,
|
|
13
|
-
height: size === "sm" ? 20 : 24,
|
|
14
|
-
children: [
|
|
15
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
-
"path",
|
|
17
|
-
{
|
|
18
|
-
fillRule: "evenodd",
|
|
19
|
-
clipRule: "evenodd",
|
|
20
|
-
d: "M6 5.5C5.66848 5.5 5.35054 5.6317 5.11612 5.86612C4.8817 6.10054 4.75 6.41848 4.75 6.75V18.75C4.75 19.0815 4.8817 19.3995 5.11612 19.6339C5.35054 19.8683 5.66848 20 6 20H18C18.3315 20 18.6495 19.8683 18.8839 19.6339C19.1183 19.3995 19.25 19.0815 19.25 18.75V6.75C19.25 6.41848 19.1183 6.10054 18.8839 5.86612C18.6495 5.6317 18.3315 5.5 18 5.5H6ZM4.05546 4.80546C4.57118 4.28973 5.27065 4 6 4H18C18.7293 4 19.4288 4.28973 19.9445 4.80546C20.4603 5.32118 20.75 6.02065 20.75 6.75V18.75C20.75 19.4793 20.4603 20.1788 19.9445 20.6945C19.4288 21.2103 18.7293 21.5 18 21.5H6C5.27065 21.5 4.57118 21.2103 4.05546 20.6945C3.53973 20.1788 3.25 19.4793 3.25 18.75V6.75C3.25 6.02065 3.53973 5.32118 4.05546 4.80546Z",
|
|
21
|
-
fill: "currentColor"
|
|
22
|
-
}
|
|
23
|
-
),
|
|
24
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
-
"path",
|
|
26
|
-
{
|
|
27
|
-
fillRule: "evenodd",
|
|
28
|
-
clipRule: "evenodd",
|
|
29
|
-
d: "M16 2C16.4142 2 16.75 2.33579 16.75 2.75V6.75C16.75 7.16421 16.4142 7.5 16 7.5C15.5858 7.5 15.25 7.16421 15.25 6.75V2.75C15.25 2.33579 15.5858 2 16 2Z",
|
|
30
|
-
fill: "currentColor"
|
|
31
|
-
}
|
|
32
|
-
),
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
-
"path",
|
|
35
|
-
{
|
|
36
|
-
fillRule: "evenodd",
|
|
37
|
-
clipRule: "evenodd",
|
|
38
|
-
d: "M8 2C8.41421 2 8.75 2.33579 8.75 2.75V6.75C8.75 7.16421 8.41421 7.5 8 7.5C7.58579 7.5 7.25 7.16421 7.25 6.75V2.75C7.25 2.33579 7.58579 2 8 2Z",
|
|
39
|
-
fill: "currentColor"
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
-
"path",
|
|
44
|
-
{
|
|
45
|
-
fillRule: "evenodd",
|
|
46
|
-
clipRule: "evenodd",
|
|
47
|
-
d: "M3.25 10.75C3.25 10.3358 3.58579 10 4 10H20C20.4142 10 20.75 10.3358 20.75 10.75C20.75 11.1642 20.4142 11.5 20 11.5H4C3.58579 11.5 3.25 11.1642 3.25 10.75Z",
|
|
48
|
-
fill: "currentColor"
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
-
"path",
|
|
53
|
-
{
|
|
54
|
-
fillRule: "evenodd",
|
|
55
|
-
clipRule: "evenodd",
|
|
56
|
-
d: "M7 14.3929C7 14.0378 7.28782 13.75 7.64286 13.75H9.35714C9.71218 13.75 10 14.0378 10 14.3929V16.1071C10 16.4622 9.71218 16.75 9.35714 16.75H7.64286C7.28782 16.75 7 16.4622 7 16.1071V14.3929Z",
|
|
57
|
-
fill: "currentColor"
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
]
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
module.exports = CalendarIcon;
|
package/dist/index6.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const dates = require('@mantine/dates');
|
|
7
|
-
const CalendarIcon = require('./index54.cjs');
|
|
8
|
-
|
|
9
|
-
const MyDatePickerInput = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
dates.DatePickerInput,
|
|
11
|
-
{
|
|
12
|
-
leftSection: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, { size: props.size }),
|
|
13
|
-
leftSectionPointerEvents: "none",
|
|
14
|
-
variant: props.readOnly ? "filled" : "default",
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
exports.MyDatePickerInput = MyDatePickerInput;
|
package/dist/index7.cjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const dates = require('@mantine/dates');
|
|
7
|
-
const CalendarIcon = require('./index54.cjs');
|
|
8
|
-
|
|
9
|
-
const MyDateTimePicker = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
dates.DateTimePicker,
|
|
11
|
-
{
|
|
12
|
-
leftSection: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, { size: props.size }),
|
|
13
|
-
leftSectionPointerEvents: "none",
|
|
14
|
-
variant: props.readOnly ? "filled" : "default",
|
|
15
|
-
...props
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
exports.MyDateTimePicker = MyDateTimePicker;
|
package/dist/index8.cjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const notifications = require('@mantine/notifications');
|
|
7
|
-
;/* empty css */
|
|
8
|
-
|
|
9
|
-
const MyNotifications = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
notifications.Notifications,
|
|
11
|
-
{
|
|
12
|
-
position: "top-center",
|
|
13
|
-
...props
|
|
14
|
-
}
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
exports.MyNotifications = MyNotifications;
|
package/dist/index9.cjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
const core = require('@mantine/core');
|
|
7
|
-
|
|
8
|
-
const MyNumberInput = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
-
core.NumberInput,
|
|
10
|
-
{
|
|
11
|
-
variant: props.readOnly ? "filled" : "default",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
exports.MyNumberInput = MyNumberInput;
|