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