lkd-web-kit 0.7.31 → 0.8.1
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/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/components/EmptyState/index.cjs +38 -52
- package/dist/components/EmptyState/index.js +37 -48
- package/dist/components/Icon.cjs +46 -50
- package/dist/components/Icon.js +44 -46
- package/dist/components/InfinityLoadMoreButton/index.cjs +30 -42
- package/dist/components/InfinityLoadMoreButton/index.js +28 -38
- package/dist/components/InfinitySelect/index.cjs +126 -168
- package/dist/components/InfinitySelect/index.js +125 -164
- package/dist/components/MyCheckboxGroup/index.cjs +14 -22
- package/dist/components/MyCheckboxGroup/index.js +13 -18
- package/dist/components/MyDateInput/index.cjs +12 -18
- package/dist/components/MyDateInput/index.js +11 -14
- package/dist/components/MyDatePickerInput/CalendarIcon.cjs +45 -64
- package/dist/components/MyDatePickerInput/CalendarIcon.js +43 -61
- package/dist/components/MyDatePickerInput/index.cjs +12 -18
- package/dist/components/MyDatePickerInput/index.js +11 -14
- package/dist/components/MyDateTimePicker/index.cjs +12 -18
- package/dist/components/MyDateTimePicker/index.js +11 -14
- package/dist/components/MyMonthPickerInput/index.cjs +12 -18
- package/dist/components/MyMonthPickerInput/index.js +11 -14
- package/dist/components/MyMultiSelect/index.cjs +9 -9
- package/dist/components/MyMultiSelect/index.js +8 -5
- package/dist/components/MyNotifications/index.cjs +11 -16
- package/dist/components/MyNotifications/index.js +10 -12
- package/dist/components/MyNumberInput/index.cjs +9 -15
- package/dist/components/MyNumberInput/index.js +8 -11
- package/dist/components/MyRadioGroup/index.cjs +14 -22
- package/dist/components/MyRadioGroup/index.js +13 -18
- package/dist/components/MySelect/index.cjs +9 -15
- package/dist/components/MySelect/index.js +8 -11
- package/dist/components/MyTextInput/index.cjs +9 -15
- package/dist/components/MyTextInput/index.js +8 -11
- package/dist/components/MyTextarea/index.cjs +9 -15
- package/dist/components/MyTextarea/index.js +8 -11
- package/dist/components/MyTimeInput/index.cjs +9 -15
- package/dist/components/MyTimeInput/index.js +8 -11
- package/dist/components/NavItems.cjs +28 -38
- package/dist/components/NavItems.js +26 -34
- package/dist/consts/http-status.cjs +66 -69
- package/dist/consts/http-status.js +66 -65
- package/dist/consts/revalidate.cjs +10 -13
- package/dist/consts/revalidate.js +10 -9
- package/dist/contexts/NavigationHistoryContext/hook.cjs +41 -42
- package/dist/contexts/NavigationHistoryContext/hook.js +40 -38
- package/dist/contexts/NavigationHistoryContext/index.cjs +31 -28
- package/dist/contexts/NavigationHistoryContext/index.js +30 -24
- package/dist/contexts/PageDataContext/index.cjs +15 -18
- package/dist/contexts/PageDataContext/index.js +14 -14
- package/dist/form/Form.cjs +19 -28
- package/dist/form/Form.js +18 -24
- package/dist/form/FormSubmitButton.cjs +15 -27
- package/dist/form/FormSubmitButton.js +14 -23
- package/dist/form/base/FormCheckbox.cjs +15 -23
- package/dist/form/base/FormCheckbox.js +14 -19
- package/dist/form/base/FormCheckboxGroup.cjs +10 -16
- package/dist/form/base/FormCheckboxGroup.js +9 -12
- package/dist/form/base/FormDateInput.cjs +10 -16
- package/dist/form/base/FormDateInput.js +9 -12
- package/dist/form/base/FormDatePickerInput.cjs +10 -16
- package/dist/form/base/FormDatePickerInput.js +9 -12
- package/dist/form/base/FormDateTimePicker.cjs +10 -16
- package/dist/form/base/FormDateTimePicker.js +9 -12
- package/dist/form/base/FormMonthPickerInput.cjs +10 -16
- package/dist/form/base/FormMonthPickerInput.js +9 -12
- package/dist/form/base/FormMultiSelect.cjs +10 -16
- package/dist/form/base/FormMultiSelect.js +9 -12
- package/dist/form/base/FormNumberInput.cjs +12 -16
- package/dist/form/base/FormNumberInput.js +10 -12
- package/dist/form/base/FormRadioGroup.cjs +10 -16
- package/dist/form/base/FormRadioGroup.js +9 -12
- package/dist/form/base/FormSelect.cjs +10 -16
- package/dist/form/base/FormSelect.js +9 -12
- package/dist/form/base/FormSelectInfinity.cjs +15 -21
- package/dist/form/base/FormSelectInfinity.js +14 -17
- package/dist/form/base/FormTextInput.cjs +10 -16
- package/dist/form/base/FormTextInput.js +9 -12
- package/dist/form/base/FormTextarea.cjs +10 -10
- package/dist/form/base/FormTextarea.js +9 -6
- package/dist/form/base/FormTimeInput.cjs +18 -24
- package/dist/form/base/FormTimeInput.js +17 -20
- package/dist/form/utils/nullable-but-required.cjs +14 -17
- package/dist/form/utils/nullable-but-required.js +13 -13
- package/dist/form/utils/optional-but-required.cjs +14 -17
- package/dist/form/utils/optional-but-required.js +13 -13
- package/dist/form/utils/zodValidator.cjs +9 -13
- package/dist/form/utils/zodValidator.js +9 -9
- package/dist/hocs/withController.cjs +43 -54
- package/dist/hocs/withController.js +42 -50
- package/dist/hocs/withModalManager.cjs +29 -35
- package/dist/hocs/withModalManager.js +28 -31
- package/dist/hooks/useBreakpoint.cjs +8 -12
- package/dist/hooks/useBreakpoint.js +7 -8
- package/dist/hooks/useFetchNextPageOnScroll.cjs +13 -21
- package/dist/hooks/useFetchNextPageOnScroll.js +13 -17
- package/dist/hooks/useOnScrollProgress.cjs +33 -37
- package/dist/hooks/useOnScrollProgress.js +32 -33
- package/dist/hooks/useUpdateSearchParams.cjs +22 -22
- package/dist/hooks/useUpdateSearchParams.js +21 -18
- package/dist/hooks/useZodConfig.cjs +14 -19
- package/dist/hooks/useZodConfig.js +12 -15
- package/dist/index.cjs +130 -136
- package/dist/index.d.ts +14 -16
- package/dist/index.js +62 -61
- package/dist/mantine/breakpoints-with-px.cjs +9 -12
- package/dist/mantine/breakpoints-with-px.js +9 -8
- package/dist/mantine/my-default-theme.cjs +23 -41
- package/dist/mantine/my-default-theme.js +22 -37
- package/dist/mantine/to-tailwind-colors.cjs +9 -18
- package/dist/mantine/to-tailwind-colors.js +9 -14
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.cjs +35 -70
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +34 -42
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.cjs +700 -811
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +701 -804
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.cjs +44 -64
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +44 -60
- package/dist/utils/array/groupBy.cjs +30 -40
- package/dist/utils/array/groupBy.js +30 -36
- package/dist/utils/array/shuffleArray.cjs +11 -17
- package/dist/utils/array/shuffleArray.js +11 -13
- package/dist/utils/formatBytes.cjs +12 -11
- package/dist/utils/formatBytes.js +12 -7
- package/dist/utils/isInfinityEmpty.cjs +3 -6
- package/dist/utils/isInfinityEmpty.js +3 -2
- package/dist/utils/ky/addBodyJsonHook.cjs +9 -10
- package/dist/utils/ky/addBodyJsonHook.js +8 -6
- package/dist/utils/ky/parseJson.cjs +6 -9
- package/dist/utils/ky/parseJson.js +6 -5
- package/dist/utils/new-route.cjs +30 -39
- package/dist/utils/new-route.js +30 -35
- package/dist/utils/query-stringify.cjs +5 -8
- package/dist/utils/query-stringify.js +5 -4
- package/dist/utils/virtual-styles.cjs +21 -26
- package/dist/utils/virtual-styles.js +21 -22
- package/package.json +67 -65
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import { NumberInput } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { NumberInput } from "@mantine/core";
|
|
3
|
+
//#region src/components/MyNumberInput/index.tsx
|
|
4
|
+
var MyNumberInput = (props) => /* @__PURE__ */ jsx(NumberInput, {
|
|
5
|
+
variant: props.readOnly ? "filled" : "default",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
12
9
|
export { MyNumberInput };
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
const Container = orientation === "horizontal" ? core.Group : core.Stack;
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(core.Radio.Group, { ...radioGroupProps, children: /* @__PURE__ */ jsxRuntime.jsx(Container, { gap, children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
-
core.Radio,
|
|
17
|
-
{
|
|
18
|
-
...option
|
|
19
|
-
},
|
|
20
|
-
String(option.value) || String(index)
|
|
21
|
-
)) }) });
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let _mantine_core = require("@mantine/core");
|
|
4
|
+
//#region src/components/MyRadioGroup/index.tsx
|
|
5
|
+
var MyRadioGroup = ({ options, orientation = "horizontal", gap = "md", ...radioGroupProps }) => {
|
|
6
|
+
const Container = orientation === "horizontal" ? _mantine_core.Group : _mantine_core.Stack;
|
|
7
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Radio.Group, {
|
|
8
|
+
...radioGroupProps,
|
|
9
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Container, {
|
|
10
|
+
gap,
|
|
11
|
+
children: options.map((option, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Radio, { ...option }, String(option.value) || String(index)))
|
|
12
|
+
})
|
|
13
|
+
});
|
|
22
14
|
};
|
|
23
|
-
|
|
15
|
+
//#endregion
|
|
24
16
|
exports.MyRadioGroup = MyRadioGroup;
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{
|
|
14
|
-
...option
|
|
15
|
-
},
|
|
16
|
-
String(option.value) || String(index)
|
|
17
|
-
)) }) });
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Group, Radio, Stack } from "@mantine/core";
|
|
3
|
+
//#region src/components/MyRadioGroup/index.tsx
|
|
4
|
+
var MyRadioGroup = ({ options, orientation = "horizontal", gap = "md", ...radioGroupProps }) => {
|
|
5
|
+
const Container = orientation === "horizontal" ? Group : Stack;
|
|
6
|
+
return /* @__PURE__ */ jsx(Radio.Group, {
|
|
7
|
+
...radioGroupProps,
|
|
8
|
+
children: /* @__PURE__ */ jsx(Container, {
|
|
9
|
+
gap,
|
|
10
|
+
children: options.map((option, index) => /* @__PURE__ */ jsx(Radio, { ...option }, String(option.value) || String(index)))
|
|
11
|
+
})
|
|
12
|
+
});
|
|
18
13
|
};
|
|
19
|
-
|
|
14
|
+
//#endregion
|
|
20
15
|
export { MyRadioGroup };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
variant: props.readOnly ? "filled" : "default",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let _mantine_core = require("@mantine/core");
|
|
4
|
+
//#region src/components/MySelect/index.tsx
|
|
5
|
+
var MySelect = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Select, {
|
|
6
|
+
variant: props.readOnly ? "filled" : "default",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
16
10
|
exports.MySelect = MySelect;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import { Select } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Select } from "@mantine/core";
|
|
3
|
+
//#region src/components/MySelect/index.tsx
|
|
4
|
+
var MySelect = (props) => /* @__PURE__ */ jsx(Select, {
|
|
5
|
+
variant: props.readOnly ? "filled" : "default",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
12
9
|
export { MySelect };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
variant: props.readOnly ? "filled" : "default",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let _mantine_core = require("@mantine/core");
|
|
4
|
+
//#region src/components/MyTextInput/index.tsx
|
|
5
|
+
var MyTextInput = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.TextInput, {
|
|
6
|
+
variant: props.readOnly ? "filled" : "default",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
16
10
|
exports.MyTextInput = MyTextInput;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import { TextInput } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TextInput } from "@mantine/core";
|
|
3
|
+
//#region src/components/MyTextInput/index.tsx
|
|
4
|
+
var MyTextInput = (props) => /* @__PURE__ */ jsx(TextInput, {
|
|
5
|
+
variant: props.readOnly ? "filled" : "default",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
12
9
|
export { MyTextInput };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
variant: props.readOnly ? "filled" : "default",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let _mantine_core = require("@mantine/core");
|
|
4
|
+
//#region src/components/MyTextarea/index.tsx
|
|
5
|
+
var MyTextarea = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Textarea, {
|
|
6
|
+
variant: props.readOnly ? "filled" : "default",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
16
10
|
exports.MyTextarea = MyTextarea;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import { Textarea } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Textarea } from "@mantine/core";
|
|
3
|
+
//#region src/components/MyTextarea/index.tsx
|
|
4
|
+
var MyTextarea = (props) => /* @__PURE__ */ jsx(Textarea, {
|
|
5
|
+
variant: props.readOnly ? "filled" : "default",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
12
9
|
export { MyTextarea };
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
variant: props.readOnly ? "filled" : "default",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
15
|
-
|
|
1
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let _mantine_core = require("@mantine/core");
|
|
4
|
+
//#region src/components/MyTimeInput/index.tsx
|
|
5
|
+
var MyTimeInput = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.TextInput, {
|
|
6
|
+
variant: props.readOnly ? "filled" : "default",
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
16
10
|
exports.MyTimeInput = MyTimeInput;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { jsx } from
|
|
2
|
-
import { TextInput } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
);
|
|
11
|
-
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TextInput } from "@mantine/core";
|
|
3
|
+
//#region src/components/MyTimeInput/index.tsx
|
|
4
|
+
var MyTimeInput = (props) => /* @__PURE__ */ jsx(TextInput, {
|
|
5
|
+
variant: props.readOnly ? "filled" : "default",
|
|
6
|
+
...props
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
12
9
|
export { MyTimeInput };
|
|
@@ -1,40 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
core.NavLink,
|
|
30
|
-
{
|
|
31
|
-
active: isActive,
|
|
32
|
-
component: "button",
|
|
33
|
-
...navLinkProps
|
|
34
|
-
},
|
|
35
|
-
navLinkProps.label
|
|
36
|
-
);
|
|
37
|
-
}) });
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
|
+
let _mantine_core = require("@mantine/core");
|
|
5
|
+
let next_link = require("next/link");
|
|
6
|
+
next_link = require_runtime.__toESM(next_link, 1);
|
|
7
|
+
let next_navigation = require("next/navigation");
|
|
8
|
+
//#region src/components/NavItems.tsx
|
|
9
|
+
var NavItems = ({ items, activeStrategy = "includes" }) => {
|
|
10
|
+
const pathname = (0, next_navigation.usePathname)();
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.Stack, {
|
|
12
|
+
gap: 0,
|
|
13
|
+
children: items.map(({ href, isActive, ...navLinkProps }) => {
|
|
14
|
+
if (href) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NavLink, {
|
|
15
|
+
active: isActive ?? (activeStrategy === "equals" ? href === pathname : href.includes(pathname)),
|
|
16
|
+
component: next_link.default,
|
|
17
|
+
prefetch: false,
|
|
18
|
+
href,
|
|
19
|
+
...navLinkProps
|
|
20
|
+
}, navLinkProps.label);
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mantine_core.NavLink, {
|
|
22
|
+
active: isActive,
|
|
23
|
+
component: "button",
|
|
24
|
+
...navLinkProps
|
|
25
|
+
}, navLinkProps.label);
|
|
26
|
+
})
|
|
27
|
+
});
|
|
38
28
|
};
|
|
39
|
-
|
|
29
|
+
//#endregion
|
|
40
30
|
exports.NavItems = NavItems;
|
|
@@ -1,36 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx } from
|
|
3
|
-
import {
|
|
4
|
-
import Link from
|
|
5
|
-
import { usePathname } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
active: isActive,
|
|
28
|
-
component: "button",
|
|
29
|
-
...navLinkProps
|
|
30
|
-
},
|
|
31
|
-
navLinkProps.label
|
|
32
|
-
);
|
|
33
|
-
}) });
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { NavLink, Stack } from "@mantine/core";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { usePathname } from "next/navigation";
|
|
6
|
+
//#region src/components/NavItems.tsx
|
|
7
|
+
var NavItems = ({ items, activeStrategy = "includes" }) => {
|
|
8
|
+
const pathname = usePathname();
|
|
9
|
+
return /* @__PURE__ */ jsx(Stack, {
|
|
10
|
+
gap: 0,
|
|
11
|
+
children: items.map(({ href, isActive, ...navLinkProps }) => {
|
|
12
|
+
if (href) return /* @__PURE__ */ jsx(NavLink, {
|
|
13
|
+
active: isActive ?? (activeStrategy === "equals" ? href === pathname : href.includes(pathname)),
|
|
14
|
+
component: Link,
|
|
15
|
+
prefetch: false,
|
|
16
|
+
href,
|
|
17
|
+
...navLinkProps
|
|
18
|
+
}, navLinkProps.label);
|
|
19
|
+
return /* @__PURE__ */ jsx(NavLink, {
|
|
20
|
+
active: isActive,
|
|
21
|
+
component: "button",
|
|
22
|
+
...navLinkProps
|
|
23
|
+
}, navLinkProps.label);
|
|
24
|
+
})
|
|
25
|
+
});
|
|
34
26
|
};
|
|
35
|
-
|
|
27
|
+
//#endregion
|
|
36
28
|
export { NavItems };
|
|
@@ -1,70 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return HttpStatus2;
|
|
68
|
-
})(HttpStatus || {});
|
|
69
|
-
|
|
1
|
+
//#region src/consts/http-status.ts
|
|
2
|
+
var HttpStatus = /* @__PURE__ */ function(HttpStatus) {
|
|
3
|
+
HttpStatus[HttpStatus["Continue"] = 100] = "Continue";
|
|
4
|
+
HttpStatus[HttpStatus["SwitchingProtocols"] = 101] = "SwitchingProtocols";
|
|
5
|
+
HttpStatus[HttpStatus["Processing"] = 102] = "Processing";
|
|
6
|
+
HttpStatus[HttpStatus["EarlyHints"] = 103] = "EarlyHints";
|
|
7
|
+
HttpStatus[HttpStatus["Ok"] = 200] = "Ok";
|
|
8
|
+
HttpStatus[HttpStatus["Created"] = 201] = "Created";
|
|
9
|
+
HttpStatus[HttpStatus["Accepted"] = 202] = "Accepted";
|
|
10
|
+
HttpStatus[HttpStatus["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
|
|
11
|
+
HttpStatus[HttpStatus["NoContent"] = 204] = "NoContent";
|
|
12
|
+
HttpStatus[HttpStatus["ResetContent"] = 205] = "ResetContent";
|
|
13
|
+
HttpStatus[HttpStatus["PartialContent"] = 206] = "PartialContent";
|
|
14
|
+
HttpStatus[HttpStatus["MultiStatus"] = 207] = "MultiStatus";
|
|
15
|
+
HttpStatus[HttpStatus["AlreadyReported"] = 208] = "AlreadyReported";
|
|
16
|
+
HttpStatus[HttpStatus["ImUsed"] = 226] = "ImUsed";
|
|
17
|
+
HttpStatus[HttpStatus["MultipleChoices"] = 300] = "MultipleChoices";
|
|
18
|
+
HttpStatus[HttpStatus["MovedPermanently"] = 301] = "MovedPermanently";
|
|
19
|
+
HttpStatus[HttpStatus["Found"] = 302] = "Found";
|
|
20
|
+
HttpStatus[HttpStatus["SeeOther"] = 303] = "SeeOther";
|
|
21
|
+
HttpStatus[HttpStatus["NotModified"] = 304] = "NotModified";
|
|
22
|
+
HttpStatus[HttpStatus["UseProxy"] = 305] = "UseProxy";
|
|
23
|
+
HttpStatus[HttpStatus["TemporaryRedirect"] = 307] = "TemporaryRedirect";
|
|
24
|
+
HttpStatus[HttpStatus["PermanentRedirect"] = 308] = "PermanentRedirect";
|
|
25
|
+
HttpStatus[HttpStatus["BadRequest"] = 400] = "BadRequest";
|
|
26
|
+
HttpStatus[HttpStatus["Unauthorized"] = 401] = "Unauthorized";
|
|
27
|
+
HttpStatus[HttpStatus["PaymentRequired"] = 402] = "PaymentRequired";
|
|
28
|
+
HttpStatus[HttpStatus["Forbidden"] = 403] = "Forbidden";
|
|
29
|
+
HttpStatus[HttpStatus["NotFound"] = 404] = "NotFound";
|
|
30
|
+
HttpStatus[HttpStatus["MethodNotAllowed"] = 405] = "MethodNotAllowed";
|
|
31
|
+
HttpStatus[HttpStatus["NotAcceptable"] = 406] = "NotAcceptable";
|
|
32
|
+
HttpStatus[HttpStatus["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
|
|
33
|
+
HttpStatus[HttpStatus["RequestTimeout"] = 408] = "RequestTimeout";
|
|
34
|
+
HttpStatus[HttpStatus["Conflict"] = 409] = "Conflict";
|
|
35
|
+
HttpStatus[HttpStatus["Gone"] = 410] = "Gone";
|
|
36
|
+
HttpStatus[HttpStatus["LengthRequired"] = 411] = "LengthRequired";
|
|
37
|
+
HttpStatus[HttpStatus["PreconditionFailed"] = 412] = "PreconditionFailed";
|
|
38
|
+
HttpStatus[HttpStatus["PayloadTooLarge"] = 413] = "PayloadTooLarge";
|
|
39
|
+
HttpStatus[HttpStatus["UriTooLong"] = 414] = "UriTooLong";
|
|
40
|
+
HttpStatus[HttpStatus["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
|
|
41
|
+
HttpStatus[HttpStatus["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
|
|
42
|
+
HttpStatus[HttpStatus["ExpectationFailed"] = 417] = "ExpectationFailed";
|
|
43
|
+
HttpStatus[HttpStatus["MisdirectedRequest"] = 421] = "MisdirectedRequest";
|
|
44
|
+
HttpStatus[HttpStatus["UnprocessableEntity"] = 422] = "UnprocessableEntity";
|
|
45
|
+
HttpStatus[HttpStatus["Locked"] = 423] = "Locked";
|
|
46
|
+
HttpStatus[HttpStatus["FailedDependency"] = 424] = "FailedDependency";
|
|
47
|
+
HttpStatus[HttpStatus["TooEarly"] = 425] = "TooEarly";
|
|
48
|
+
HttpStatus[HttpStatus["UpgradeRequired"] = 426] = "UpgradeRequired";
|
|
49
|
+
HttpStatus[HttpStatus["PreconditionRequired"] = 428] = "PreconditionRequired";
|
|
50
|
+
HttpStatus[HttpStatus["TooManyRequests"] = 429] = "TooManyRequests";
|
|
51
|
+
HttpStatus[HttpStatus["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
|
|
52
|
+
HttpStatus[HttpStatus["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
|
|
53
|
+
HttpStatus[HttpStatus["InternalServerError"] = 500] = "InternalServerError";
|
|
54
|
+
HttpStatus[HttpStatus["NotImplemented"] = 501] = "NotImplemented";
|
|
55
|
+
HttpStatus[HttpStatus["BadGateway"] = 502] = "BadGateway";
|
|
56
|
+
HttpStatus[HttpStatus["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
|
57
|
+
HttpStatus[HttpStatus["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
58
|
+
HttpStatus[HttpStatus["HttpVersionNotSupported"] = 505] = "HttpVersionNotSupported";
|
|
59
|
+
HttpStatus[HttpStatus["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
|
|
60
|
+
HttpStatus[HttpStatus["InsufficientStorage"] = 507] = "InsufficientStorage";
|
|
61
|
+
HttpStatus[HttpStatus["LoopDetected"] = 508] = "LoopDetected";
|
|
62
|
+
HttpStatus[HttpStatus["NotExtended"] = 510] = "NotExtended";
|
|
63
|
+
HttpStatus[HttpStatus["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
|
|
64
|
+
return HttpStatus;
|
|
65
|
+
}({});
|
|
66
|
+
//#endregion
|
|
70
67
|
exports.HttpStatus = HttpStatus;
|