lkd-web-kit 0.3.5 → 0.3.8

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 (165) hide show
  1. package/dist/index.cjs.js +118 -0
  2. package/dist/index.cjs10.js +16 -0
  3. package/dist/index.cjs11.js +16 -0
  4. package/dist/index.cjs12.js +16 -0
  5. package/dist/index.cjs13.js +16 -0
  6. package/dist/index.cjs14.js +118 -0
  7. package/dist/index.cjs15.js +16 -0
  8. package/dist/index.cjs16.js +19 -0
  9. package/dist/index.cjs17.js +70 -0
  10. package/dist/index.cjs18.js +14 -0
  11. package/dist/index.cjs19.js +66 -0
  12. package/dist/index.cjs2.js +43 -0
  13. package/dist/index.cjs20.js +21 -0
  14. package/dist/index.cjs21.js +30 -0
  15. package/dist/index.cjs22.js +23 -0
  16. package/dist/index.cjs23.js +15 -0
  17. package/dist/index.cjs24.js +16 -0
  18. package/dist/index.cjs25.js +16 -0
  19. package/dist/index.cjs26.js +18 -0
  20. package/dist/index.cjs27.js +17 -0
  21. package/dist/index.cjs28.js +17 -0
  22. package/dist/index.cjs29.js +17 -0
  23. package/dist/index.cjs3.js +12 -0
  24. package/dist/index.cjs30.js +17 -0
  25. package/dist/index.cjs31.js +17 -0
  26. package/dist/index.cjs32.js +17 -0
  27. package/dist/index.cjs33.js +17 -0
  28. package/dist/index.cjs34.js +17 -0
  29. package/dist/index.cjs35.js +29 -0
  30. package/dist/index.cjs36.js +17 -0
  31. package/dist/index.cjs37.js +17 -0
  32. package/dist/index.cjs38.js +51 -0
  33. package/dist/index.cjs39.js +38 -0
  34. package/dist/index.cjs4.js +40 -0
  35. package/dist/index.cjs40.js +15 -0
  36. package/dist/index.cjs41.js +23 -0
  37. package/dist/index.cjs42.js +39 -0
  38. package/dist/index.cjs43.js +24 -0
  39. package/dist/index.cjs44.js +14 -0
  40. package/dist/index.cjs45.js +19 -0
  41. package/dist/index.cjs46.js +43 -0
  42. package/dist/index.cjs47.js +14 -0
  43. package/dist/index.cjs48.js +20 -0
  44. package/dist/index.cjs49.js +11 -0
  45. package/dist/index.cjs5.js +54 -0
  46. package/dist/index.cjs50.js +45 -0
  47. package/dist/index.cjs51.js +19 -0
  48. package/dist/index.cjs52.js +24 -0
  49. package/dist/index.cjs53.js +7 -0
  50. package/dist/index.cjs54.js +65 -0
  51. package/dist/index.cjs6.js +19 -0
  52. package/dist/index.cjs7.js +19 -0
  53. package/dist/index.cjs8.js +17 -0
  54. package/dist/index.cjs9.js +16 -0
  55. package/dist/{main.d.ts → index.d.ts} +3 -3
  56. package/dist/index.es.js +52 -0
  57. package/dist/index.es10.js +12 -0
  58. package/dist/index.es11.js +12 -0
  59. package/dist/index.es12.js +12 -0
  60. package/dist/index.es13.js +12 -0
  61. package/dist/index.es14.js +114 -0
  62. package/dist/index.es15.js +12 -0
  63. package/dist/index.es16.js +15 -0
  64. package/dist/index.es17.js +66 -0
  65. package/dist/index.es18.js +10 -0
  66. package/dist/index.es19.js +60 -0
  67. package/dist/index.es2.js +39 -0
  68. package/dist/index.es20.js +16 -0
  69. package/dist/index.es21.js +26 -0
  70. package/dist/index.es22.js +19 -0
  71. package/dist/index.es23.js +11 -0
  72. package/dist/index.es24.js +12 -0
  73. package/dist/index.es25.js +12 -0
  74. package/dist/index.es26.js +14 -0
  75. package/dist/index.es27.js +13 -0
  76. package/dist/index.es28.js +13 -0
  77. package/dist/index.es29.js +13 -0
  78. package/dist/index.es3.js +8 -0
  79. package/dist/index.es30.js +13 -0
  80. package/dist/index.es31.js +13 -0
  81. package/dist/index.es32.js +13 -0
  82. package/dist/index.es33.js +13 -0
  83. package/dist/index.es34.js +13 -0
  84. package/dist/index.es35.js +23 -0
  85. package/dist/index.es36.js +13 -0
  86. package/dist/index.es37.js +13 -0
  87. package/dist/index.es38.js +47 -0
  88. package/dist/index.es39.js +34 -0
  89. package/dist/index.es4.js +36 -0
  90. package/dist/index.es40.js +11 -0
  91. package/dist/index.es41.js +19 -0
  92. package/dist/index.es42.js +35 -0
  93. package/dist/index.es43.js +20 -0
  94. package/dist/{src/mantine/breakpoints-with-px.js → index.es44.js} +4 -5
  95. package/dist/index.es45.js +15 -0
  96. package/dist/index.es46.js +39 -0
  97. package/dist/index.es47.js +10 -0
  98. package/dist/index.es48.js +15 -0
  99. package/dist/index.es49.js +7 -0
  100. package/dist/index.es5.js +50 -0
  101. package/dist/index.es50.js +40 -0
  102. package/dist/index.es51.js +15 -0
  103. package/dist/index.es52.js +20 -0
  104. package/dist/index.es53.js +3 -0
  105. package/dist/index.es54.js +63 -0
  106. package/dist/index.es6.js +15 -0
  107. package/dist/index.es7.js +15 -0
  108. package/dist/index.es8.js +13 -0
  109. package/dist/index.es9.js +12 -0
  110. package/dist/node_modules/@mantine/notifications/styles.css +42 -0
  111. package/package.json +15 -5
  112. package/dist/lkd-web-kit.css +0 -1
  113. package/dist/src/components/EmptyState/index.js +0 -36
  114. package/dist/src/components/Icon.js +0 -47
  115. package/dist/src/components/InfinityLoader/index.js +0 -9
  116. package/dist/src/components/MyDatePickerInput/CalendarIcon.js +0 -61
  117. package/dist/src/components/MyDatePickerInput/index.js +0 -14
  118. package/dist/src/components/MyDateTimePicker/index.js +0 -14
  119. package/dist/src/components/MyMonthPickerInput/index.js +0 -14
  120. package/dist/src/components/MyMultiSelect/index.js +0 -12
  121. package/dist/src/components/MyNotifications/index.js +0 -13
  122. package/dist/src/components/MyNumberInput/index.js +0 -12
  123. package/dist/src/components/MySelect/index.js +0 -12
  124. package/dist/src/components/MyTextInput/index.js +0 -12
  125. package/dist/src/components/MyTextarea/index.js +0 -12
  126. package/dist/src/components/MyTimeInput/index.js +0 -12
  127. package/dist/src/components/NavItems.js +0 -36
  128. package/dist/src/components/SelectInfinity/index.js +0 -106
  129. package/dist/src/consts/http-status.js +0 -4
  130. package/dist/src/consts/revalidate.js +0 -4
  131. package/dist/src/contexts/NavigationHistoryContext/index.js +0 -47
  132. package/dist/src/contexts/PageDataContext/index.js +0 -15
  133. package/dist/src/form/Form.js +0 -23
  134. package/dist/src/form/FormButtonSubmit.js +0 -18
  135. package/dist/src/form/base/FormCheckbox.js +0 -15
  136. package/dist/src/form/base/FormDatePickerInput.js +0 -21
  137. package/dist/src/form/base/FormDateTimePicker.js +0 -21
  138. package/dist/src/form/base/FormMonthPickerInput.js +0 -21
  139. package/dist/src/form/base/FormMultiSelect.js +0 -21
  140. package/dist/src/form/base/FormNumberInput.js +0 -21
  141. package/dist/src/form/base/FormRadioGroup.js +0 -14
  142. package/dist/src/form/base/FormSelect.js +0 -21
  143. package/dist/src/form/base/FormSelectInfinity.js +0 -21
  144. package/dist/src/form/base/FormTextInput.js +0 -21
  145. package/dist/src/form/base/FormTextarea.js +0 -21
  146. package/dist/src/form/base/FormTimeInput.js +0 -29
  147. package/dist/src/form/utils/nullable-but-required.js +0 -10
  148. package/dist/src/form/utils/optional-but-required.js +0 -10
  149. package/dist/src/form/utils/zodValidator.js +0 -9
  150. package/dist/src/hocs/withForm.js +0 -59
  151. package/dist/src/hocs/withModalManager.js +0 -29
  152. package/dist/src/hooks/useBreakpoint.js +0 -8
  153. package/dist/src/hooks/useFetchNextPageOnScroll.js +0 -19
  154. package/dist/src/hooks/useOnScrollProgress.js +0 -25
  155. package/dist/src/hooks/useUpdateSearchParams.js +0 -19
  156. package/dist/src/main.js +0 -113
  157. package/dist/src/mantine/my-default-theme.js +0 -39
  158. package/dist/src/mantine/to-tailwind-colors.js +0 -10
  159. package/dist/src/utils/array/groupBy.js +0 -36
  160. package/dist/src/utils/array/shuffleArray.js +0 -13
  161. package/dist/src/utils/formatBytes.js +0 -8
  162. package/dist/src/utils/isInfinityEmpty.js +0 -4
  163. package/dist/src/utils/ky/addBodyJsonHook.js +0 -12
  164. package/dist/src/utils/ky/parseJson.js +0 -6
  165. package/dist/src/utils/newHref.js +0 -20
@@ -1,19 +0,0 @@
1
- "use client";
2
- import { useSearchParams as c } from "next/navigation";
3
- const i = () => {
4
- const a = c();
5
- return { updateSearchParams: (n) => {
6
- var t;
7
- const r = new URLSearchParams(a.toString());
8
- Object.entries(n).forEach(([e, s]) => {
9
- if (s === null) {
10
- r.delete(e);
11
- return;
12
- }
13
- r.set(e, String(s));
14
- }), (t = window == null ? void 0 : window.history) == null || t.pushState(null, "", `?${r.toString()}`);
15
- }, searchParams: a };
16
- };
17
- export {
18
- i as useUpdateSearchParams
19
- };
package/dist/src/main.js DELETED
@@ -1,113 +0,0 @@
1
- import { EmptyState as e } from "./components/EmptyState/index.js";
2
- import { InfinityLoader as m } from "./components/InfinityLoader/index.js";
3
- import { NavItems as f } from "./components/NavItems.js";
4
- import { Icon as i } from "./components/Icon.js";
5
- import { MyDatePickerInput as n } from "./components/MyDatePickerInput/index.js";
6
- import { MyDateTimePicker as y } from "./components/MyDateTimePicker/index.js";
7
- import { MyNotifications as s } from "./components/MyNotifications/index.js";
8
- import { MyNumberInput as I } from "./components/MyNumberInput/index.js";
9
- import { MySelect as d } from "./components/MySelect/index.js";
10
- import { MyTextarea as P } from "./components/MyTextarea/index.js";
11
- import { MyTextInput as T } from "./components/MyTextInput/index.js";
12
- import { MyTimeInput as k } from "./components/MyTimeInput/index.js";
13
- import { SelectInfinity as B } from "./components/SelectInfinity/index.js";
14
- import { MyMultiSelect as g } from "./components/MyMultiSelect/index.js";
15
- import { MyMonthPickerInput as v } from "./components/MyMonthPickerInput/index.js";
16
- import { HttpStatus as R } from "./consts/http-status.js";
17
- import { Revalidate as E } from "./consts/revalidate.js";
18
- import { NavigationHistoryProvider as C, QP_BACK_URL_NAME as O, useNavigationHistory as _ } from "./contexts/NavigationHistoryContext/index.js";
19
- import { PageDataProvider as J, usePageData as K } from "./contexts/PageDataContext/index.js";
20
- import { Form as U } from "./form/Form.js";
21
- import { FormButtonSubmit as G } from "./form/FormButtonSubmit.js";
22
- import { zodValidator as V } from "./form/utils/zodValidator.js";
23
- import { nullableButRequired as j } from "./form/utils/nullable-but-required.js";
24
- import { optionalButRequired as Y } from "./form/utils/optional-but-required.js";
25
- import { FormCheckbox as $ } from "./form/base/FormCheckbox.js";
26
- import { FormDatePickerInput as or } from "./form/base/FormDatePickerInput.js";
27
- import { FormDateTimePicker as tr } from "./form/base/FormDateTimePicker.js";
28
- import { FormNumberInput as pr } from "./form/base/FormNumberInput.js";
29
- import { FormRadioGroup as xr } from "./form/base/FormRadioGroup.js";
30
- import { FormSelect as ar } from "./form/base/FormSelect.js";
31
- import { FormSelectInfinity as ur } from "./form/base/FormSelectInfinity.js";
32
- import { FormTextarea as lr } from "./form/base/FormTextarea.js";
33
- import { FormTextInput as cr } from "./form/base/FormTextInput.js";
34
- import { FormTimeInput as Mr, numberToTimeInput as dr, timeInputToNumber as Fr } from "./form/base/FormTimeInput.js";
35
- import { FormMultiSelect as Sr } from "./form/base/FormMultiSelect.js";
36
- import { FormMonthPickerInput as hr } from "./form/base/FormMonthPickerInput.js";
37
- import { withForm as Nr } from "./hocs/withForm.js";
38
- import { withModalManager as br } from "./hocs/withModalManager.js";
39
- import { useBreakpoint as Dr } from "./hooks/useBreakpoint.js";
40
- import { useFetchNextPageOnScroll as Hr } from "./hooks/useFetchNextPageOnScroll.js";
41
- import { useOnScrollProgress as wr } from "./hooks/useOnScrollProgress.js";
42
- import { useUpdateSearchParams as Ar } from "./hooks/useUpdateSearchParams.js";
43
- import { breakpointsWithPx as Or } from "./mantine/breakpoints-with-px.js";
44
- import { toTailwindColors as qr } from "./mantine/to-tailwind-colors.js";
45
- import { myDefaultTheme as Kr } from "./mantine/my-default-theme.js";
46
- import { formatBytes as Ur } from "./utils/formatBytes.js";
47
- import { KyError as Gr, addBodyJsonHook as Qr } from "./utils/ky/addBodyJsonHook.js";
48
- import { parseJSON as Wr } from "./utils/ky/parseJson.js";
49
- import { groupBy as Xr, indexBy as Yr } from "./utils/array/groupBy.js";
50
- import { shuffleArray as $r } from "./utils/array/shuffleArray.js";
51
- import { newHref as oo } from "./utils/newHref.js";
52
- import { isInfinityEmpty as to } from "./utils/isInfinityEmpty.js";
53
- export {
54
- e as EmptyState,
55
- U as Form,
56
- G as FormButtonSubmit,
57
- $ as FormCheckbox,
58
- or as FormDatePickerInput,
59
- tr as FormDateTimePicker,
60
- hr as FormMonthPickerInput,
61
- Sr as FormMultiSelect,
62
- pr as FormNumberInput,
63
- xr as FormRadioGroup,
64
- ar as FormSelect,
65
- ur as FormSelectInfinity,
66
- cr as FormTextInput,
67
- lr as FormTextarea,
68
- Mr as FormTimeInput,
69
- R as HttpStatus,
70
- i as Icon,
71
- m as InfinityLoader,
72
- Gr as KyError,
73
- n as MyDatePickerInput,
74
- y as MyDateTimePicker,
75
- v as MyMonthPickerInput,
76
- g as MyMultiSelect,
77
- s as MyNotifications,
78
- I as MyNumberInput,
79
- d as MySelect,
80
- T as MyTextInput,
81
- P as MyTextarea,
82
- k as MyTimeInput,
83
- f as NavItems,
84
- C as NavigationHistoryProvider,
85
- J as PageDataProvider,
86
- O as QP_BACK_URL_NAME,
87
- E as Revalidate,
88
- B as SelectInfinity,
89
- Qr as addBodyJsonHook,
90
- Or as breakpointsWithPx,
91
- Ur as formatBytes,
92
- Xr as groupBy,
93
- Yr as indexBy,
94
- to as isInfinityEmpty,
95
- Kr as myDefaultTheme,
96
- oo as newHref,
97
- j as nullableButRequired,
98
- dr as numberToTimeInput,
99
- Y as optionalButRequired,
100
- Wr as parseJSON,
101
- $r as shuffleArray,
102
- Fr as timeInputToNumber,
103
- qr as toTailwindColors,
104
- Dr as useBreakpoint,
105
- Hr as useFetchNextPageOnScroll,
106
- _ as useNavigationHistory,
107
- wr as useOnScrollProgress,
108
- K as usePageData,
109
- Ar as useUpdateSearchParams,
110
- Nr as withForm,
111
- br as withModalManager,
112
- V as zodValidator
113
- };
@@ -1,39 +0,0 @@
1
- import { Tooltip as e, Menu as t, Select as o, AppShell as l, Notification as i } from "@mantine/core";
2
- import { breakpointsWithPx as p } from "./breakpoints-with-px.js";
3
- const a = {
4
- breakpoints: p,
5
- cursorType: "pointer",
6
- components: {
7
- Notification: i.extend({
8
- defaultProps: {
9
- withBorder: !0
10
- }
11
- }),
12
- AppShell: l.extend({
13
- defaultProps: {
14
- padding: 0
15
- }
16
- }),
17
- Select: o.extend({
18
- defaultProps: {
19
- allowDeselect: !1,
20
- withCheckIcon: !1,
21
- clearable: !0
22
- }
23
- }),
24
- Menu: t.extend({
25
- defaultProps: {
26
- position: "bottom-end"
27
- }
28
- }),
29
- Tooltip: e.extend({
30
- defaultProps: {
31
- multiline: !0,
32
- w: 300
33
- }
34
- })
35
- }
36
- };
37
- export {
38
- a as myDefaultTheme
39
- };
@@ -1,10 +0,0 @@
1
- const i = (t) => Object.entries(t).reduce(
2
- (e, [n, o]) => (e[n] = o.reduce(
3
- (r, u, d) => (r[d] = u, r),
4
- {}
5
- ), e),
6
- {}
7
- );
8
- export {
9
- i as toTailwindColors
10
- };
@@ -1,36 +0,0 @@
1
- function i(e, f, u) {
2
- return u ? e.reduce(
3
- (n, r) => {
4
- const o = f(r);
5
- return o === void 0 || (n[o] = u(r)), n;
6
- },
7
- {}
8
- ) : e.reduce(
9
- (n, r) => {
10
- const o = f(r);
11
- return o === void 0 || (n[o] = r), n;
12
- },
13
- {}
14
- );
15
- }
16
- const y = (e, f) => {
17
- const u = {};
18
- return e == null || e.forEach((n) => {
19
- var o;
20
- const r = f(n);
21
- if (r !== null) {
22
- if (Array.isArray(r)) {
23
- r.forEach((t) => {
24
- var s;
25
- u[t] || (u[t] = []), (s = u[t]) == null || s.push(n);
26
- });
27
- return;
28
- }
29
- u[r] || (u[r] = []), (o = u[r]) == null || o.push(n);
30
- }
31
- }), u;
32
- };
33
- export {
34
- y as groupBy,
35
- i as indexBy
36
- };
@@ -1,13 +0,0 @@
1
- const o = (t) => {
2
- const r = [...t];
3
- let e = r.length, n;
4
- for (; e > 0; )
5
- n = Math.floor(Math.random() * e), e--, [r[e], r[n]] = [
6
- r[n],
7
- r[e]
8
- ];
9
- return r;
10
- };
11
- export {
12
- o as shuffleArray
13
- };
@@ -1,8 +0,0 @@
1
- function e(t, o = 2) {
2
- if (!+t) return "0 Bytes";
3
- const n = 1024, s = o < 0 ? 0 : o, a = ["Bytes", "KB", "MB"], r = Math.floor(Math.log(t) / Math.log(n));
4
- return `${parseFloat((t / Math.pow(n, r)).toFixed(s))} ${a[r]}`;
5
- }
6
- export {
7
- e as formatBytes
8
- };
@@ -1,4 +0,0 @@
1
- const e = (n) => (n == null ? void 0 : n.pages[0].data.length) === 0;
2
- export {
3
- e as isInfinityEmpty
4
- };
@@ -1,12 +0,0 @@
1
- import { HTTPError as t } from "ky";
2
- import { parseJSON as p } from "./parseJson.js";
3
- class c extends t {
4
- constructor(s, r, n, e) {
5
- super(s, r, n), this.response.bodyJson = e;
6
- }
7
- }
8
- const y = async (o) => (o.response.bodyJson = await p(o.response), o);
9
- export {
10
- c as KyError,
11
- y as addBodyJsonHook
12
- };
@@ -1,6 +0,0 @@
1
- const e = async (r) => r.text().then(function(n) {
2
- return n ? JSON.parse(n) : {};
3
- });
4
- export {
5
- e as parseJSON
6
- };
@@ -1,20 +0,0 @@
1
- import s from "query-string";
2
- const m = (t) => (r) => {
3
- const e = typeof t == "string" ? t : t(
4
- r ?? {
5
- params: {},
6
- searchParams: {}
7
- }
8
- );
9
- if (r != null && r.searchParams) {
10
- const i = s.stringify(r.searchParams, {
11
- skipEmptyString: !0,
12
- skipNull: !0
13
- });
14
- return `${e}${i ? `?${i}` : ""}`;
15
- }
16
- return e;
17
- };
18
- export {
19
- m as newHref
20
- };