lkd-web-kit 0.8.0 → 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 -17
  25. package/dist/components/MyNotifications/index.js +10 -13
  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 -10
  67. package/dist/form/base/FormMultiSelect.js +9 -6
  68. package/dist/form/base/FormNumberInput.cjs +12 -12
  69. package/dist/form/base/FormNumberInput.js +10 -8
  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 +13 -13
  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 -42
  108. package/dist/mantine/my-default-theme.js +22 -38
  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 -870
  114. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +701 -863
  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 -14
  126. package/dist/utils/ky/addBodyJsonHook.js +8 -10
  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 +17 -16
@@ -1,44 +1,25 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const core = require('@mantine/core');
6
- const breakpointsWithPx = require('./breakpoints-with-px.cjs');
7
-
8
- const myDefaultTheme = {
9
- breakpoints: breakpointsWithPx.breakpointsWithPx,
10
- cursorType: "pointer",
11
- defaultRadius: "sm",
12
- components: {
13
- Notification: core.Notification.extend({
14
- defaultProps: {
15
- withBorder: true
16
- }
17
- }),
18
- AppShell: core.AppShell.extend({
19
- defaultProps: {
20
- padding: 0
21
- }
22
- }),
23
- Select: core.Select.extend({
24
- defaultProps: {
25
- allowDeselect: false,
26
- withCheckIcon: false,
27
- clearable: true
28
- }
29
- }),
30
- Menu: core.Menu.extend({
31
- defaultProps: {
32
- position: "bottom-end"
33
- }
34
- }),
35
- Tooltip: core.Tooltip.extend({
36
- defaultProps: {
37
- multiline: true,
38
- maw: 300
39
- }
40
- })
41
- }
1
+ require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_breakpoints_with_px = require("./breakpoints-with-px.cjs");
3
+ let _mantine_core = require("@mantine/core");
4
+ //#region src/mantine/my-default-theme.ts
5
+ var myDefaultTheme = {
6
+ breakpoints: require_breakpoints_with_px.breakpointsWithPx,
7
+ cursorType: "pointer",
8
+ defaultRadius: "sm",
9
+ components: {
10
+ Notification: _mantine_core.Notification.extend({ defaultProps: { withBorder: true } }),
11
+ AppShell: _mantine_core.AppShell.extend({ defaultProps: { padding: 0 } }),
12
+ Select: _mantine_core.Select.extend({ defaultProps: {
13
+ allowDeselect: false,
14
+ withCheckIcon: false,
15
+ clearable: true
16
+ } }),
17
+ Menu: _mantine_core.Menu.extend({ defaultProps: { position: "bottom-end" } }),
18
+ Tooltip: _mantine_core.Tooltip.extend({ defaultProps: {
19
+ multiline: true,
20
+ maw: 300
21
+ } })
22
+ }
42
23
  };
43
-
24
+ //#endregion
44
25
  exports.myDefaultTheme = myDefaultTheme;
@@ -1,40 +1,24 @@
1
- import { Tooltip, Menu, Select, AppShell, Notification } from '@mantine/core';
2
- import { breakpointsWithPx } from './breakpoints-with-px.js';
3
-
4
- const myDefaultTheme = {
5
- breakpoints: breakpointsWithPx,
6
- cursorType: "pointer",
7
- defaultRadius: "sm",
8
- components: {
9
- Notification: Notification.extend({
10
- defaultProps: {
11
- withBorder: true
12
- }
13
- }),
14
- AppShell: AppShell.extend({
15
- defaultProps: {
16
- padding: 0
17
- }
18
- }),
19
- Select: Select.extend({
20
- defaultProps: {
21
- allowDeselect: false,
22
- withCheckIcon: false,
23
- clearable: true
24
- }
25
- }),
26
- Menu: Menu.extend({
27
- defaultProps: {
28
- position: "bottom-end"
29
- }
30
- }),
31
- Tooltip: Tooltip.extend({
32
- defaultProps: {
33
- multiline: true,
34
- maw: 300
35
- }
36
- })
37
- }
1
+ import { breakpointsWithPx } from "./breakpoints-with-px.js";
2
+ import { AppShell, Menu, Notification, Select, Tooltip } from "@mantine/core";
3
+ //#region src/mantine/my-default-theme.ts
4
+ var myDefaultTheme = {
5
+ breakpoints: breakpointsWithPx,
6
+ cursorType: "pointer",
7
+ defaultRadius: "sm",
8
+ components: {
9
+ Notification: Notification.extend({ defaultProps: { withBorder: true } }),
10
+ AppShell: AppShell.extend({ defaultProps: { padding: 0 } }),
11
+ Select: Select.extend({ defaultProps: {
12
+ allowDeselect: false,
13
+ withCheckIcon: false,
14
+ clearable: true
15
+ } }),
16
+ Menu: Menu.extend({ defaultProps: { position: "bottom-end" } }),
17
+ Tooltip: Tooltip.extend({ defaultProps: {
18
+ multiline: true,
19
+ maw: 300
20
+ } })
21
+ }
38
22
  };
39
-
23
+ //#endregion
40
24
  export { myDefaultTheme };
@@ -1,19 +1,10 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const toTailwindColors = (colors) => Object.entries(colors).reduce(
6
- (acc, [key, value]) => {
7
- acc[key] = value.reduce(
8
- (acc2, color, index) => {
9
- acc2[index] = color;
10
- return acc2;
11
- },
12
- {}
13
- );
14
- return acc;
15
- },
16
- {}
17
- );
18
-
1
+ //#region src/mantine/to-tailwind-colors.ts
2
+ var toTailwindColors = (colors) => Object.entries(colors).reduce((acc, [key, value]) => {
3
+ acc[key] = value.reduce((acc, color, index) => {
4
+ acc[index] = color;
5
+ return acc;
6
+ }, {});
7
+ return acc;
8
+ }, {});
9
+ //#endregion
19
10
  exports.toTailwindColors = toTailwindColors;
@@ -1,15 +1,10 @@
1
- const toTailwindColors = (colors) => Object.entries(colors).reduce(
2
- (acc, [key, value]) => {
3
- acc[key] = value.reduce(
4
- (acc2, color, index) => {
5
- acc2[index] = color;
6
- return acc2;
7
- },
8
- {}
9
- );
10
- return acc;
11
- },
12
- {}
13
- );
14
-
1
+ //#region src/mantine/to-tailwind-colors.ts
2
+ var toTailwindColors = (colors) => Object.entries(colors).reduce((acc, [key, value]) => {
3
+ acc[key] = value.reduce((acc, color, index) => {
4
+ acc[index] = color;
5
+ return acc;
6
+ }, {});
7
+ return acc;
8
+ }, {});
9
+ //#endregion
15
10
  export { toTailwindColors };
@@ -1,74 +1,39 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const React = require('react');
6
- const reactDom = require('react-dom');
7
- const index = require('../../../virtual-core/dist/esm/index.cjs');
8
-
9
- function _interopNamespaceDefault(e) {
10
- const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
11
- if (e) {
12
- for (const k in e) {
13
- if (k !== 'default') {
14
- const d = Object.getOwnPropertyDescriptor(e, k);
15
- Object.defineProperty(n, k, d.get ? d : {
16
- enumerable: true,
17
- get: () => e[k]
18
- });
19
- }
20
- }
21
- }
22
- n.default = e;
23
- return Object.freeze(n);
24
- }
25
-
26
- const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
27
-
28
- const useIsomorphicLayoutEffect = typeof document !== "undefined" ? React__namespace.useLayoutEffect : React__namespace.useEffect;
29
- function useVirtualizerBase({
30
- useFlushSync = true,
31
- ...options
32
- }) {
33
- const rerender = React__namespace.useReducer(() => ({}), {})[1];
34
- const resolvedOptions = {
35
- ...options,
36
- onChange: (instance2, sync) => {
37
- var _a;
38
- if (useFlushSync && sync) {
39
- reactDom.flushSync(rerender);
40
- } else {
41
- rerender();
42
- }
43
- (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
44
- }
45
- };
46
- const [instance] = React__namespace.useState(
47
- () => new index.Virtualizer(resolvedOptions)
48
- );
49
- instance.setOptions(resolvedOptions);
50
- useIsomorphicLayoutEffect(() => {
51
- return instance._didMount();
52
- }, []);
53
- useIsomorphicLayoutEffect(() => {
54
- return instance._willUpdate();
55
- });
56
- return instance;
1
+ const require_runtime = require("../../../../../_virtual/_rolldown/runtime.cjs");
2
+ require("../../../virtual-core/dist/esm/utils.cjs");
3
+ const require_index = require("../../../virtual-core/dist/esm/index.cjs");
4
+ let react = require("react");
5
+ react = require_runtime.__toESM(react, 1);
6
+ let react_dom = require("react-dom");
7
+ //#region node_modules/@tanstack/react-virtual/dist/esm/index.js
8
+ var useIsomorphicLayoutEffect = typeof document !== "undefined" ? react.useLayoutEffect : react.useEffect;
9
+ function useVirtualizerBase({ useFlushSync = true, ...options }) {
10
+ const rerender = react.useReducer(() => ({}), {})[1];
11
+ const resolvedOptions = {
12
+ ...options,
13
+ onChange: (instance2, sync) => {
14
+ var _a;
15
+ if (useFlushSync && sync) (0, react_dom.flushSync)(rerender);
16
+ else rerender();
17
+ (_a = options.onChange) == null || _a.call(options, instance2, sync);
18
+ }
19
+ };
20
+ const [instance] = react.useState(() => new require_index.Virtualizer(resolvedOptions));
21
+ instance.setOptions(resolvedOptions);
22
+ useIsomorphicLayoutEffect(() => {
23
+ return instance._didMount();
24
+ }, []);
25
+ useIsomorphicLayoutEffect(() => {
26
+ return instance._willUpdate();
27
+ });
28
+ return instance;
57
29
  }
58
30
  function useVirtualizer(options) {
59
- return useVirtualizerBase({
60
- observeElementRect: index.observeElementRect,
61
- observeElementOffset: index.observeElementOffset,
62
- scrollToFn: index.elementScroll,
63
- ...options
64
- });
31
+ return useVirtualizerBase({
32
+ observeElementRect: require_index.observeElementRect,
33
+ observeElementOffset: require_index.observeElementOffset,
34
+ scrollToFn: require_index.elementScroll,
35
+ ...options
36
+ });
65
37
  }
66
-
67
- exports.Virtualizer = index.Virtualizer;
68
- exports.defaultKeyExtractor = index.defaultKeyExtractor;
69
- exports.defaultRangeExtractor = index.defaultRangeExtractor;
70
- exports.elementScroll = index.elementScroll;
71
- exports.measureElement = index.measureElement;
72
- exports.observeElementOffset = index.observeElementOffset;
73
- exports.observeElementRect = index.observeElementRect;
38
+ //#endregion
74
39
  exports.useVirtualizer = useVirtualizer;
@@ -1,45 +1,37 @@
1
- import * as React from 'react';
2
- import { flushSync } from 'react-dom';
3
- import { Virtualizer, elementScroll, observeElementOffset, observeElementRect } from '../../../virtual-core/dist/esm/index.js';
4
- export { defaultKeyExtractor, defaultRangeExtractor, measureElement } from '../../../virtual-core/dist/esm/index.js';
5
-
6
- const useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
7
- function useVirtualizerBase({
8
- useFlushSync = true,
9
- ...options
10
- }) {
11
- const rerender = React.useReducer(() => ({}), {})[1];
12
- const resolvedOptions = {
13
- ...options,
14
- onChange: (instance2, sync) => {
15
- var _a;
16
- if (useFlushSync && sync) {
17
- flushSync(rerender);
18
- } else {
19
- rerender();
20
- }
21
- (_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
22
- }
23
- };
24
- const [instance] = React.useState(
25
- () => new Virtualizer(resolvedOptions)
26
- );
27
- instance.setOptions(resolvedOptions);
28
- useIsomorphicLayoutEffect(() => {
29
- return instance._didMount();
30
- }, []);
31
- useIsomorphicLayoutEffect(() => {
32
- return instance._willUpdate();
33
- });
34
- return instance;
1
+ import "../../../virtual-core/dist/esm/utils.js";
2
+ import { Virtualizer, elementScroll, observeElementOffset, observeElementRect } from "../../../virtual-core/dist/esm/index.js";
3
+ import * as React from "react";
4
+ import { flushSync } from "react-dom";
5
+ //#region node_modules/@tanstack/react-virtual/dist/esm/index.js
6
+ var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
7
+ function useVirtualizerBase({ useFlushSync = true, ...options }) {
8
+ const rerender = React.useReducer(() => ({}), {})[1];
9
+ const resolvedOptions = {
10
+ ...options,
11
+ onChange: (instance2, sync) => {
12
+ var _a;
13
+ if (useFlushSync && sync) flushSync(rerender);
14
+ else rerender();
15
+ (_a = options.onChange) == null || _a.call(options, instance2, sync);
16
+ }
17
+ };
18
+ const [instance] = React.useState(() => new Virtualizer(resolvedOptions));
19
+ instance.setOptions(resolvedOptions);
20
+ useIsomorphicLayoutEffect(() => {
21
+ return instance._didMount();
22
+ }, []);
23
+ useIsomorphicLayoutEffect(() => {
24
+ return instance._willUpdate();
25
+ });
26
+ return instance;
35
27
  }
36
28
  function useVirtualizer(options) {
37
- return useVirtualizerBase({
38
- observeElementRect,
39
- observeElementOffset,
40
- scrollToFn: elementScroll,
41
- ...options
42
- });
29
+ return useVirtualizerBase({
30
+ observeElementRect,
31
+ observeElementOffset,
32
+ scrollToFn: elementScroll,
33
+ ...options
34
+ });
43
35
  }
44
-
45
- export { Virtualizer, elementScroll, observeElementOffset, observeElementRect, useVirtualizer };
36
+ //#endregion
37
+ export { useVirtualizer };