@g4rcez/components 0.1.0 → 0.2.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/index.css +1 -1
- package/dist/index.js +77 -117
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18002 -16413
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +77 -117
- package/dist/index.umd.js.map +1 -1
- package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/src/components/core/render-on-view.d.ts.map +1 -1
- package/dist/src/components/core/resizable.d.ts.map +1 -1
- package/dist/src/components/core/tag.d.ts +1 -1
- package/dist/src/components/core/tag.js +2 -2
- package/dist/src/components/display/alert.d.ts.map +1 -1
- package/dist/src/components/display/alert.js +1 -1
- package/dist/src/components/display/calendar.d.ts +7 -16
- package/dist/src/components/display/calendar.d.ts.map +1 -1
- package/dist/src/components/display/calendar.js +27 -25
- package/dist/src/components/display/card.d.ts.map +1 -1
- package/dist/src/components/display/card.js +1 -1
- package/dist/src/components/display/empty.d.ts.map +1 -1
- package/dist/src/components/display/empty.js +1 -1
- package/dist/src/components/display/list.d.ts +1 -1
- package/dist/src/components/display/list.d.ts.map +1 -1
- package/dist/src/components/display/list.js +1 -1
- package/dist/src/components/display/notifications.d.ts.map +1 -1
- package/dist/src/components/display/notifications.js +1 -1
- package/dist/src/components/display/stats.d.ts +3 -1
- package/dist/src/components/display/stats.d.ts.map +1 -1
- package/dist/src/components/display/stats.js +1 -1
- package/dist/src/components/display/step.d.ts.map +1 -1
- package/dist/src/components/display/step.js +1 -1
- package/dist/src/components/display/tabs.d.ts.map +1 -1
- package/dist/src/components/display/tabs.js +2 -2
- package/dist/src/components/display/timeline.d.ts +8 -30
- package/dist/src/components/display/timeline.d.ts.map +1 -1
- package/dist/src/components/display/timeline.js +11 -14
- package/dist/src/components/floating/dropdown.d.ts.map +1 -1
- package/dist/src/components/floating/expand.d.ts.map +1 -1
- package/dist/src/components/floating/modal.d.ts +5 -2
- package/dist/src/components/floating/modal.d.ts.map +1 -1
- package/dist/src/components/floating/modal.js +20 -14
- package/dist/src/components/floating/toolbar.d.ts.map +1 -1
- package/dist/src/components/floating/tooltip.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.d.ts.map +1 -1
- package/dist/src/components/form/autocomplete.js +4 -4
- package/dist/src/components/form/date-picker.d.ts +2 -66
- package/dist/src/components/form/date-picker.d.ts.map +1 -1
- package/dist/src/components/form/date-picker.js +3 -2
- package/dist/src/components/form/file-upload.d.ts.map +1 -1
- package/dist/src/components/form/form.d.ts +0 -1
- package/dist/src/components/form/form.d.ts.map +1 -1
- package/dist/src/components/form/form.js +0 -17
- package/dist/src/components/form/formReset.d.ts +2 -0
- package/dist/src/components/form/formReset.d.ts.map +1 -0
- package/dist/src/components/form/formReset.js +17 -0
- package/dist/src/components/form/free-text.d.ts +4 -5
- package/dist/src/components/form/free-text.d.ts.map +1 -1
- package/dist/src/components/form/input-field.d.ts.map +1 -1
- package/dist/src/components/form/input-field.js +2 -1
- package/dist/src/components/form/input.d.ts +2 -2
- package/dist/src/components/form/input.d.ts.map +1 -1
- package/dist/src/components/form/multi-select.d.ts +19 -0
- package/dist/src/components/form/multi-select.d.ts.map +1 -0
- package/dist/src/components/form/{multi-combobox.js → multi-select.js} +26 -19
- package/dist/src/components/form/radiobox.d.ts.map +1 -1
- package/dist/src/components/form/select.js +1 -1
- package/dist/src/components/form/task-list.d.ts.map +1 -1
- package/dist/src/components/form/textarea.d.ts +2 -1
- package/dist/src/components/form/textarea.d.ts.map +1 -1
- package/dist/src/components/form/transfer-list.d.ts.map +1 -1
- package/dist/src/components/index.d.ts +3 -1
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +3 -1
- package/dist/src/components/table/filter.d.ts +7 -7
- package/dist/src/components/table/filter.d.ts.map +1 -1
- package/dist/src/components/table/filter.js +1 -1
- package/dist/src/components/table/group.d.ts +3 -3
- package/dist/src/components/table/group.d.ts.map +1 -1
- package/dist/src/components/table/group.js +1 -1
- package/dist/src/components/table/index.d.ts +9 -8
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/metadata.d.ts +2 -1
- package/dist/src/components/table/metadata.d.ts.map +1 -1
- package/dist/src/components/table/pagination.d.ts.map +1 -1
- package/dist/src/components/table/pagination.js +7 -7
- package/dist/src/components/table/sort.d.ts +8 -8
- package/dist/src/components/table/sort.d.ts.map +1 -1
- package/dist/src/components/table/sort.js +2 -2
- package/dist/src/components/table/table-lib.d.ts +3 -3
- package/dist/src/components/table/table-lib.d.ts.map +1 -1
- package/dist/src/components/table/thead.d.ts +2 -2
- package/dist/src/components/table/thead.d.ts.map +1 -1
- package/dist/src/components/table/thead.js +12 -10
- package/dist/src/config/context.d.ts +17 -0
- package/dist/src/config/context.d.ts.map +1 -0
- package/dist/src/config/context.js +10 -0
- package/dist/src/config/default-translations.d.ts +59 -0
- package/dist/src/config/default-translations.d.ts.map +1 -0
- package/dist/src/config/default-translations.js +52 -0
- package/dist/src/config/default-tweaks.d.ts +7 -0
- package/dist/src/config/default-tweaks.d.ts.map +1 -0
- package/dist/src/config/default-tweaks.js +5 -0
- package/dist/src/hooks/use-click-outside.d.ts.map +1 -1
- package/dist/src/hooks/use-color-parser.d.ts +2 -0
- package/dist/src/hooks/use-color-parser.d.ts.map +1 -0
- package/dist/src/hooks/use-color-parser.js +9 -0
- package/dist/src/hooks/use-components-provider.d.ts +8 -127
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -1
- package/dist/src/hooks/use-components-provider.js +5 -89
- package/dist/src/hooks/use-debounce.d.ts +1 -0
- package/dist/src/hooks/use-debounce.d.ts.map +1 -1
- package/dist/src/hooks/use-debounce.js +1 -1
- package/dist/src/hooks/use-form.d.ts +21 -4
- package/dist/src/hooks/use-form.d.ts.map +1 -1
- package/dist/src/hooks/use-hover.d.ts.map +1 -1
- package/dist/src/hooks/use-locale.d.ts +3 -0
- package/dist/src/hooks/use-locale.d.ts.map +1 -0
- package/dist/src/hooks/use-locale.js +10 -0
- package/dist/src/hooks/use-media-query.d.ts.map +1 -1
- package/dist/src/hooks/use-on-event.d.ts.map +1 -1
- package/dist/src/hooks/use-on-event.js +1 -1
- package/dist/src/hooks/use-parent.d.ts.map +1 -1
- package/dist/src/hooks/use-previous.d.ts.map +1 -1
- package/dist/src/hooks/use-previous.js +1 -1
- package/dist/src/hooks/use-reactive.d.ts +1 -1
- package/dist/src/hooks/use-reactive.d.ts.map +1 -1
- package/dist/src/hooks/use-remove-scroll.d.ts +2 -0
- package/dist/src/hooks/use-remove-scroll.d.ts.map +1 -0
- package/dist/src/hooks/use-remove-scroll.js +30 -0
- package/dist/src/hooks/use-stable-ref.d.ts +1 -1
- package/dist/src/hooks/use-stable-ref.d.ts.map +1 -1
- package/dist/src/hooks/use-swipe.d.ts +8 -0
- package/dist/src/hooks/use-swipe.d.ts.map +1 -0
- package/dist/src/hooks/use-swipe.js +16 -0
- package/dist/src/hooks/use-translations.d.ts +57 -0
- package/dist/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/src/hooks/use-translations.js +9 -0
- package/dist/src/hooks/use-tweaks.d.ts +3 -0
- package/dist/src/hooks/use-tweaks.d.ts.map +1 -0
- package/dist/src/hooks/use-tweaks.js +9 -0
- package/dist/src/index.d.ts +12 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +11 -5
- package/dist/src/lib/dict.d.ts +2 -2
- package/dist/src/lib/dict.d.ts.map +1 -1
- package/dist/src/lib/dict.js +8 -6
- package/dist/src/lib/dom.d.ts +4 -3
- package/dist/src/lib/dom.d.ts.map +1 -1
- package/dist/src/lib/dom.js +2 -1
- package/dist/src/lib/fns.d.ts +3 -2
- package/dist/src/lib/fns.d.ts.map +1 -1
- package/dist/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/src/types.d.ts +9 -2
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +36 -26
- package/dist/src/components/form/multi-combobox.d.ts +0 -24
- package/dist/src/components/form/multi-combobox.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-tweaks.d.ts","sourceRoot":"","sources":["../../../src/config/default-tweaks.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACjB,KAAK,EAAE;QACH,YAAY,EAAE,OAAO,CAAC;KACzB,CAAC;CACL,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAI3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-click-outside.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-click-outside.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,WAAW,
|
|
1
|
+
{"version":3,"file":"use-click-outside.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-click-outside.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,WAAW,EAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,SAclI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-color-parser.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-color-parser.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,wCAI1B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { Context } from "../config/context";
|
|
3
|
+
import { parsers } from "../styles/design-tokens";
|
|
4
|
+
export const useColorParser = () => {
|
|
5
|
+
const ctx = useContext(Context);
|
|
6
|
+
if (!ctx)
|
|
7
|
+
return parsers.hsla;
|
|
8
|
+
return ctx.parser;
|
|
9
|
+
};
|
|
@@ -1,133 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { parsers } from "../../preset.tailwind";
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
3
2
|
import { Locales } from "the-mask-input";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
tableGroupLabel: string;
|
|
12
|
-
tableGroupLabelWithCount: string;
|
|
13
|
-
tableSortAsc: string;
|
|
14
|
-
tableSortOrderByLabel: string;
|
|
15
|
-
tableSortOrderInputPlaceholder: string;
|
|
16
|
-
tableSortOrderInputTitle: string;
|
|
17
|
-
tableSortTypeInputPlaceholder: string;
|
|
18
|
-
tableSortTypeInputTitle: string;
|
|
19
|
-
tableSortAddButton: string;
|
|
20
|
-
tableSortDropdownTitle: string;
|
|
21
|
-
tableSortDesc: string;
|
|
22
|
-
tableColumnResizer: string;
|
|
23
|
-
tableFilterTypeContains: string;
|
|
24
|
-
tableFilterTypeIs: string;
|
|
25
|
-
tableFilterTypeIsNot: string;
|
|
26
|
-
tableFilterTypeNotContains: string;
|
|
27
|
-
tableFilterTypeLessThan: string;
|
|
28
|
-
tableFilterTypeGreaterThan: string;
|
|
29
|
-
tableFilterTypeStartsWith: string;
|
|
30
|
-
tableFilterTypeEndsWith: string;
|
|
31
|
-
tableFilterNewFilter: string;
|
|
32
|
-
tableFilterColumnTitle: string;
|
|
33
|
-
tableFilterColumnPlaceholder: string;
|
|
34
|
-
tableFilterOperatorTitle: string;
|
|
35
|
-
tableFilterOperatorPlaceholder: string;
|
|
36
|
-
tableFilterValueTitle: string;
|
|
37
|
-
tableFilterValuePlaceholder: string;
|
|
38
|
-
tableFilterLabel: string;
|
|
39
|
-
tableFilterDropdownTitle: string;
|
|
40
|
-
tableFilterDropdownTitleUnique: string;
|
|
41
|
-
tablePaginationPrevious: string;
|
|
42
|
-
tablePaginationNext: string;
|
|
43
|
-
tablePaginationSelectLabel: string;
|
|
44
|
-
tablePaginationFooter: (pagination: {
|
|
45
|
-
pages: number;
|
|
46
|
-
totalItems: number;
|
|
47
|
-
sizes?: number[];
|
|
48
|
-
current: number;
|
|
49
|
-
select: React.ReactNode;
|
|
50
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
calendarFromDate: string;
|
|
52
|
-
calendarToDate: string;
|
|
53
|
-
calendarToday: string;
|
|
54
|
-
calendarBackMonth: string;
|
|
55
|
-
calendarNextMonth: string;
|
|
56
|
-
calendarMonthLabel: string;
|
|
57
|
-
multiComboboxSelectedLabel: string;
|
|
58
|
-
multiComboboxInnerPlaceholder: string;
|
|
59
|
-
};
|
|
60
|
-
export type Translations = typeof defaultTranslations;
|
|
61
|
-
export type Tweaks = {
|
|
62
|
-
input: {
|
|
63
|
-
iconFeedback: boolean;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
type ContextProps = Partial<{
|
|
67
|
-
tweaks: Partial<Tweaks>;
|
|
68
|
-
map: Partial<Translations>;
|
|
3
|
+
import { parsers } from "../../preset.tailwind";
|
|
4
|
+
import { ContextProps } from "../config/context";
|
|
5
|
+
import { Translations } from "../config/default-translations";
|
|
6
|
+
import { Tweaks } from "../config/default-tweaks";
|
|
7
|
+
export type ContextType = Partial<{
|
|
8
|
+
tweaks: Tweaks;
|
|
9
|
+
map: Translations;
|
|
69
10
|
locale: Locales | undefined;
|
|
70
11
|
parser: typeof parsers.hsla;
|
|
71
12
|
}>;
|
|
72
13
|
export declare const ComponentsProvider: (props: PropsWithChildren<ContextProps>) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
-
export declare const useLocale: (locale?: Locales) => Locales | undefined;
|
|
74
|
-
export declare const useTranslations: () => {
|
|
75
|
-
emptyDataMessage: string;
|
|
76
|
-
inputCaretDown: string;
|
|
77
|
-
inputCloseValue: string;
|
|
78
|
-
datePickerCalendarButtonLabel: string;
|
|
79
|
-
inputOptionalLabel: string;
|
|
80
|
-
autocompleteEmpty: string;
|
|
81
|
-
tableGroupLabel: string;
|
|
82
|
-
tableGroupLabelWithCount: string;
|
|
83
|
-
tableSortAsc: string;
|
|
84
|
-
tableSortOrderByLabel: string;
|
|
85
|
-
tableSortOrderInputPlaceholder: string;
|
|
86
|
-
tableSortOrderInputTitle: string;
|
|
87
|
-
tableSortTypeInputPlaceholder: string;
|
|
88
|
-
tableSortTypeInputTitle: string;
|
|
89
|
-
tableSortAddButton: string;
|
|
90
|
-
tableSortDropdownTitle: string;
|
|
91
|
-
tableSortDesc: string;
|
|
92
|
-
tableColumnResizer: string;
|
|
93
|
-
tableFilterTypeContains: string;
|
|
94
|
-
tableFilterTypeIs: string;
|
|
95
|
-
tableFilterTypeIsNot: string;
|
|
96
|
-
tableFilterTypeNotContains: string;
|
|
97
|
-
tableFilterTypeLessThan: string;
|
|
98
|
-
tableFilterTypeGreaterThan: string;
|
|
99
|
-
tableFilterTypeStartsWith: string;
|
|
100
|
-
tableFilterTypeEndsWith: string;
|
|
101
|
-
tableFilterNewFilter: string;
|
|
102
|
-
tableFilterColumnTitle: string;
|
|
103
|
-
tableFilterColumnPlaceholder: string;
|
|
104
|
-
tableFilterOperatorTitle: string;
|
|
105
|
-
tableFilterOperatorPlaceholder: string;
|
|
106
|
-
tableFilterValueTitle: string;
|
|
107
|
-
tableFilterValuePlaceholder: string;
|
|
108
|
-
tableFilterLabel: string;
|
|
109
|
-
tableFilterDropdownTitle: string;
|
|
110
|
-
tableFilterDropdownTitleUnique: string;
|
|
111
|
-
tablePaginationPrevious: string;
|
|
112
|
-
tablePaginationNext: string;
|
|
113
|
-
tablePaginationSelectLabel: string;
|
|
114
|
-
tablePaginationFooter: (pagination: {
|
|
115
|
-
pages: number;
|
|
116
|
-
totalItems: number;
|
|
117
|
-
sizes?: number[];
|
|
118
|
-
current: number;
|
|
119
|
-
select: React.ReactNode;
|
|
120
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
121
|
-
calendarFromDate: string;
|
|
122
|
-
calendarToDate: string;
|
|
123
|
-
calendarToday: string;
|
|
124
|
-
calendarBackMonth: string;
|
|
125
|
-
calendarNextMonth: string;
|
|
126
|
-
calendarMonthLabel: string;
|
|
127
|
-
multiComboboxSelectedLabel: string;
|
|
128
|
-
multiComboboxInnerPlaceholder: string;
|
|
129
|
-
};
|
|
130
|
-
export declare const useColorParser: () => (v: string) => `hsla(${string})`;
|
|
131
|
-
export declare const useTweaks: () => Tweaks;
|
|
132
|
-
export {};
|
|
133
14
|
//# sourceMappingURL=use-components-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-components-provider.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-components-provider.tsx"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"use-components-provider.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-components-provider.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAW,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAuB,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAiB,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEjE,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,YAAY,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC;CAC/B,CAAC,CAAC;AAEH,eAAO,MAAM,kBAAkB,GAAI,OAAO,iBAAiB,CAAC,YAAY,CAAC,4CAWxE,CAAC"}
|
|
@@ -1,68 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
4
|
import { parsers } from "../../preset.tailwind";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
inputCloseValue: "Click to clear the value",
|
|
9
|
-
datePickerCalendarButtonLabel: "Click to open a date picker",
|
|
10
|
-
inputOptionalLabel: "Optional",
|
|
11
|
-
autocompleteEmpty: "Nothing here...",
|
|
12
|
-
tableGroupLabel: "Group",
|
|
13
|
-
tableGroupLabelWithCount: "Group",
|
|
14
|
-
tableSortAsc: "Ascending",
|
|
15
|
-
tableSortOrderByLabel: "Order by",
|
|
16
|
-
tableSortOrderInputPlaceholder: "Order by",
|
|
17
|
-
tableSortOrderInputTitle: "Order by",
|
|
18
|
-
tableSortTypeInputPlaceholder: "Ascending",
|
|
19
|
-
tableSortTypeInputTitle: "Sort type",
|
|
20
|
-
tableSortAddButton: "Add sort",
|
|
21
|
-
tableSortDropdownTitle: "Order by",
|
|
22
|
-
tableSortDesc: "Descending",
|
|
23
|
-
tableColumnResizer: "Resize column",
|
|
24
|
-
tableFilterTypeContains: "Contains",
|
|
25
|
-
tableFilterTypeIs: "Is",
|
|
26
|
-
tableFilterTypeIsNot: "Is not",
|
|
27
|
-
tableFilterTypeNotContains: "Not contains",
|
|
28
|
-
tableFilterTypeLessThan: "Less than",
|
|
29
|
-
tableFilterTypeGreaterThan: "Greater than",
|
|
30
|
-
tableFilterTypeStartsWith: "Starts with",
|
|
31
|
-
tableFilterTypeEndsWith: "Ends with",
|
|
32
|
-
tableFilterNewFilter: "New filter",
|
|
33
|
-
tableFilterColumnTitle: "Filter by",
|
|
34
|
-
tableFilterColumnPlaceholder: "Filter by",
|
|
35
|
-
tableFilterOperatorTitle: "Operation",
|
|
36
|
-
tableFilterOperatorPlaceholder: "Equals to...",
|
|
37
|
-
tableFilterValueTitle: "Value",
|
|
38
|
-
tableFilterValuePlaceholder: "Something...",
|
|
39
|
-
tableFilterLabel: "Filters",
|
|
40
|
-
tableFilterDropdownTitle: "Filters",
|
|
41
|
-
tableFilterDropdownTitleUnique: "Filter by",
|
|
42
|
-
tablePaginationPrevious: "Previous",
|
|
43
|
-
tablePaginationNext: "Next",
|
|
44
|
-
tablePaginationSelectLabel: "Select the size of page",
|
|
45
|
-
tablePaginationFooter: (pagination) => (_jsxs(Fragment, { children: [pagination.current, " to ", pagination.pages, " of ", pagination.totalItems, " items.", Array.isArray(pagination.sizes) ? pagination.select : null, " per page."] })),
|
|
46
|
-
calendarFromDate: "From",
|
|
47
|
-
calendarToDate: "To",
|
|
48
|
-
calendarToday: "Today",
|
|
49
|
-
calendarBackMonth: "Back month",
|
|
50
|
-
calendarNextMonth: "Next month",
|
|
51
|
-
calendarMonthLabel: "Month",
|
|
52
|
-
multiComboboxSelectedLabel: "Selected",
|
|
53
|
-
multiComboboxInnerPlaceholder: "Search...",
|
|
54
|
-
};
|
|
55
|
-
const defaultTweaks = {
|
|
56
|
-
input: {
|
|
57
|
-
iconFeedback: true,
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
const Context = createContext({
|
|
61
|
-
tweaks: defaultTweaks,
|
|
62
|
-
parser: parsers.hsla,
|
|
63
|
-
map: defaultTranslations,
|
|
64
|
-
locale: undefined,
|
|
65
|
-
});
|
|
5
|
+
import { Context } from "../config/context";
|
|
6
|
+
import { defaultTranslations } from "../config/default-translations";
|
|
7
|
+
import { defaultTweaks } from "../config/default-tweaks";
|
|
66
8
|
export const ComponentsProvider = (props) => {
|
|
67
9
|
const memoMap = useMemo(() => ({
|
|
68
10
|
locale: props.locale,
|
|
@@ -72,29 +14,3 @@ export const ComponentsProvider = (props) => {
|
|
|
72
14
|
}), [props]);
|
|
73
15
|
return _jsx(Context.Provider, { value: memoMap, children: props.children });
|
|
74
16
|
};
|
|
75
|
-
export const useLocale = (locale) => {
|
|
76
|
-
if (!!locale)
|
|
77
|
-
return locale;
|
|
78
|
-
const ctx = useContext(Context);
|
|
79
|
-
if (!ctx)
|
|
80
|
-
return undefined;
|
|
81
|
-
return ctx.locale || locale;
|
|
82
|
-
};
|
|
83
|
-
export const useTranslations = () => {
|
|
84
|
-
const ctx = useContext(Context);
|
|
85
|
-
if (!ctx)
|
|
86
|
-
return defaultTranslations;
|
|
87
|
-
return ctx.map;
|
|
88
|
-
};
|
|
89
|
-
export const useColorParser = () => {
|
|
90
|
-
const ctx = useContext(Context);
|
|
91
|
-
if (!ctx)
|
|
92
|
-
return parsers.hsla;
|
|
93
|
-
return ctx.parser;
|
|
94
|
-
};
|
|
95
|
-
export const useTweaks = () => {
|
|
96
|
-
const ctx = useContext(Context);
|
|
97
|
-
if (!ctx)
|
|
98
|
-
return defaultTweaks;
|
|
99
|
-
return ctx.tweaks;
|
|
100
|
-
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
type Fn = (...a: any[]) => any;
|
|
2
|
+
export declare const debounce: <T extends Fn>(fn: Fn, ms?: number) => (...args: Parameters<T>) => void;
|
|
2
3
|
export declare function useDebounce<T extends Fn>(fn: T, delay: number): (...args: any[]) => void;
|
|
3
4
|
export {};
|
|
4
5
|
//# sourceMappingURL=use-debounce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-debounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-debounce.ts"],"names":[],"mappings":"AAEA,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"use-debounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-debounce.ts"],"names":[],"mappings":"AAEA,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAE/B,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,WAAM,MAEvB,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC,SAInD,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,4BAG7D"}
|
|
@@ -34,7 +34,7 @@ export type UseFormOptions<T> = Partial<{
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare const createFormStorage: (name: string) => Interceptor<any>;
|
|
36
36
|
export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName: string, opts?: UseFormOptions<z.infer<T>>) => {
|
|
37
|
-
get: (p: AllPaths<z.TypeOf<T>>) =>
|
|
37
|
+
get: (p: AllPaths<z.TypeOf<T>>) => import("..").Any | "";
|
|
38
38
|
input: <Props extends InputProps>(name: AllPaths<z.TypeOf<T>>, props?: Props) => Props;
|
|
39
39
|
state: z.TypeOf<T>;
|
|
40
40
|
errors: Record<string, any> | null;
|
|
@@ -47,10 +47,10 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
47
47
|
controller: (props?: ComponentProps<"form">) => {
|
|
48
48
|
id: string;
|
|
49
49
|
name: string;
|
|
50
|
-
ref?: React.
|
|
50
|
+
ref?: React.Ref<HTMLFormElement> | undefined;
|
|
51
51
|
key?: React.Key | null | undefined;
|
|
52
52
|
acceptCharset?: string | undefined;
|
|
53
|
-
action?: string | undefined | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
|
53
|
+
action?: string | undefined | ((formData: FormData) => void | Promise<void>) | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
|
54
54
|
autoComplete?: string | undefined;
|
|
55
55
|
encType?: string | undefined;
|
|
56
56
|
method?: string | undefined;
|
|
@@ -61,12 +61,14 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
61
61
|
suppressContentEditableWarning?: boolean | undefined;
|
|
62
62
|
suppressHydrationWarning?: boolean | undefined;
|
|
63
63
|
accessKey?: string | undefined;
|
|
64
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
64
65
|
autoFocus?: boolean | undefined;
|
|
65
66
|
className?: string | undefined;
|
|
66
67
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
67
68
|
contextMenu?: string | undefined;
|
|
68
69
|
dir?: string | undefined;
|
|
69
70
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
70
72
|
hidden?: boolean | undefined;
|
|
71
73
|
lang?: string | undefined;
|
|
72
74
|
nonce?: string | undefined;
|
|
@@ -89,7 +91,6 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
89
91
|
rev?: string | undefined;
|
|
90
92
|
typeof?: string | undefined;
|
|
91
93
|
vocab?: string | undefined;
|
|
92
|
-
autoCapitalize?: string | undefined;
|
|
93
94
|
autoCorrect?: string | undefined;
|
|
94
95
|
autoSave?: string | undefined;
|
|
95
96
|
color?: string | undefined;
|
|
@@ -101,8 +102,14 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
101
102
|
results?: number | undefined;
|
|
102
103
|
security?: string | undefined;
|
|
103
104
|
unselectable?: "on" | "off" | undefined;
|
|
105
|
+
popover?: "" | "auto" | "manual" | undefined;
|
|
106
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
107
|
+
popoverTarget?: string | undefined;
|
|
108
|
+
inert?: boolean | undefined;
|
|
104
109
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
105
110
|
is?: string | undefined;
|
|
111
|
+
exportparts?: string | undefined;
|
|
112
|
+
part?: string | undefined;
|
|
106
113
|
"aria-activedescendant"?: string | undefined;
|
|
107
114
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
108
115
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
@@ -310,6 +317,8 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
310
317
|
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLFormElement> | undefined;
|
|
311
318
|
onScroll?: React.UIEventHandler<HTMLFormElement> | undefined;
|
|
312
319
|
onScrollCapture?: React.UIEventHandler<HTMLFormElement> | undefined;
|
|
320
|
+
onScrollEnd?: React.UIEventHandler<HTMLFormElement> | undefined;
|
|
321
|
+
onScrollEndCapture?: React.UIEventHandler<HTMLFormElement> | undefined;
|
|
313
322
|
onWheel?: React.WheelEventHandler<HTMLFormElement> | undefined;
|
|
314
323
|
onWheelCapture?: React.WheelEventHandler<HTMLFormElement> | undefined;
|
|
315
324
|
onAnimationStart?: React.AnimationEventHandler<HTMLFormElement> | undefined;
|
|
@@ -318,8 +327,16 @@ export declare const useForm: <T extends z.ZodObject<any>>(schema: T, formName:
|
|
|
318
327
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLFormElement> | undefined;
|
|
319
328
|
onAnimationIteration?: React.AnimationEventHandler<HTMLFormElement> | undefined;
|
|
320
329
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLFormElement> | undefined;
|
|
330
|
+
onToggle?: React.ToggleEventHandler<HTMLFormElement> | undefined;
|
|
331
|
+
onBeforeToggle?: React.ToggleEventHandler<HTMLFormElement> | undefined;
|
|
332
|
+
onTransitionCancel?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
333
|
+
onTransitionCancelCapture?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
321
334
|
onTransitionEnd?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
322
335
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
336
|
+
onTransitionRun?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
337
|
+
onTransitionRunCapture?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
338
|
+
onTransitionStart?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
339
|
+
onTransitionStartCapture?: React.TransitionEventHandler<HTMLFormElement> | undefined;
|
|
323
340
|
};
|
|
324
341
|
datepicker: <Props extends DatePickerProps>(name: AllPaths<z.TypeOf<T>>, props?: Props) => Props;
|
|
325
342
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,KAAK,cAAc,EAA4C,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAE,KAAK,QAAQ,EAAe,MAAM,YAAY,CAAC;AAExD,OAAO,EAAE,CAAC,EAAa,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAwGlJ,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-form.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-hover.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"use-hover.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,eAAO,MAAM,QAAQ,GAAI,KAAK,SAAS,CAAC,WAAW,CAAC,YAiBnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-locale.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-locale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,SAAS,GAAI,SAAS,OAAO,KAAG,OAAO,GAAG,SAKtD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-media-query.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-media-query.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"use-media-query.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-media-query.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,eAAc,OAAc,YAkBxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-on-event.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-on-event.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAEnF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"use-on-event.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-on-event.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAEnF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,SAKrF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-parent.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"use-parent.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,eAAO,MAAM,eAAe,GAAI,KAAK,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,WAiBhE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-previous.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-previous.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"use-previous.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-previous.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,CAOzC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useReactive: <T
|
|
1
|
+
export declare const useReactive: <T>(t: T, initial?: T) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>];
|
|
2
2
|
//# sourceMappingURL=use-reactive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-reactive.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-reactive.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"use-reactive.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-reactive.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,8EAM/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-remove-scroll.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-remove-scroll.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,GAAI,QAAQ,OAAO,SAyB9C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
import { hasVerticalScroll } from "../lib/dom";
|
|
3
|
+
import { isSsr } from "../lib/fns";
|
|
4
|
+
export const useRemoveScroll = (remove) => {
|
|
5
|
+
const prev = useRef(isSsr() ? "" : document.documentElement.style.overflowY);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const html = document.documentElement;
|
|
8
|
+
if (remove) {
|
|
9
|
+
prev.current = document.documentElement.style.overflowY;
|
|
10
|
+
html.style.overflowY = "hidden";
|
|
11
|
+
html.style.padding = hasVerticalScroll(html) ? "0 15px 0 0" : "";
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
html.style.padding = "";
|
|
15
|
+
document.documentElement.style.overflowY = prev.current;
|
|
16
|
+
}
|
|
17
|
+
}, [remove]);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!remove)
|
|
20
|
+
return;
|
|
21
|
+
const controller = new AbortController();
|
|
22
|
+
const html = document.documentElement;
|
|
23
|
+
const removeScroll = (e) => (e.target === html && remove ? e.preventDefault() : undefined);
|
|
24
|
+
html.addEventListener("wheel", removeScroll, { signal: controller.signal, passive: false });
|
|
25
|
+
html.addEventListener("scroll", removeScroll, { signal: controller.signal, passive: false });
|
|
26
|
+
return () => {
|
|
27
|
+
controller.abort();
|
|
28
|
+
};
|
|
29
|
+
}, [remove]);
|
|
30
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useStableRef: <T>(value: T) => import("react").
|
|
1
|
+
export declare const useStableRef: <T>(value: T) => import("react").RefObject<T>;
|
|
2
2
|
//# sourceMappingURL=use-stable-ref.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-stable-ref.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-stable-ref.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"use-stable-ref.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-stable-ref.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,OAAO,CAAC,iCAQvC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type SwipeDirection = "left" | "right";
|
|
3
|
+
export declare function useSwipe(onSwipe: (e: React.TouchEvent, direction: SwipeDirection) => void, threshold: number): {
|
|
4
|
+
onTouchStart: (e: React.TouchEvent) => number;
|
|
5
|
+
onTouchEnd: (e: React.TouchEvent) => void;
|
|
6
|
+
};
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=use-swipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-swipe.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-swipe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAEtC,KAAK,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvC,wBAAgB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,KAAK,IAAI,EAAE,SAAS,EAAE,MAAM;sBAGhF,KAAK,CAAC,UAAU;oBAElB,KAAK,CAAC,UAAU;EAU1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef } from "react";
|
|
2
|
+
export function useSwipe(onSwipe, threshold) {
|
|
3
|
+
const touchStartX = useRef(null);
|
|
4
|
+
const onTouchStart = (e) => (touchStartX.current = e.touches[0].clientX);
|
|
5
|
+
const onTouchEnd = (e) => {
|
|
6
|
+
if (touchStartX.current === null)
|
|
7
|
+
return;
|
|
8
|
+
const touchEndX = e.changedTouches[0].clientX;
|
|
9
|
+
const diff = touchEndX - touchStartX.current;
|
|
10
|
+
if (Math.abs(diff) > threshold) {
|
|
11
|
+
onSwipe(e, diff > 0 ? "right" : "left");
|
|
12
|
+
}
|
|
13
|
+
touchStartX.current = null;
|
|
14
|
+
};
|
|
15
|
+
return { onTouchStart, onTouchEnd };
|
|
16
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const useTranslations: () => {
|
|
2
|
+
emptyDataMessage: string;
|
|
3
|
+
inputCaretDown: string;
|
|
4
|
+
inputCloseValue: string;
|
|
5
|
+
datePickerCalendarButtonLabel: string;
|
|
6
|
+
inputOptionalLabel: string;
|
|
7
|
+
autocompleteEmpty: string;
|
|
8
|
+
tableGroupLabel: string;
|
|
9
|
+
tableGroupLabelWithCount: string;
|
|
10
|
+
tableSortAsc: string;
|
|
11
|
+
tableSortOrderByLabel: string;
|
|
12
|
+
tableSortOrderInputPlaceholder: string;
|
|
13
|
+
tableSortOrderInputTitle: string;
|
|
14
|
+
tableSortTypeInputPlaceholder: string;
|
|
15
|
+
tableSortTypeInputTitle: string;
|
|
16
|
+
tableSortAddButton: string;
|
|
17
|
+
tableSortDropdownTitle: string;
|
|
18
|
+
tableSortDesc: string;
|
|
19
|
+
tableColumnResizer: string;
|
|
20
|
+
tableFilterTypeContains: string;
|
|
21
|
+
tableFilterTypeIs: string;
|
|
22
|
+
tableFilterTypeIsNot: string;
|
|
23
|
+
tableFilterTypeNotContains: string;
|
|
24
|
+
tableFilterTypeLessThan: string;
|
|
25
|
+
tableFilterTypeGreaterThan: string;
|
|
26
|
+
tableFilterTypeStartsWith: string;
|
|
27
|
+
tableFilterTypeEndsWith: string;
|
|
28
|
+
tableFilterNewFilter: string;
|
|
29
|
+
tableFilterColumnTitle: string;
|
|
30
|
+
tableFilterColumnPlaceholder: string;
|
|
31
|
+
tableFilterOperatorTitle: string;
|
|
32
|
+
tableFilterOperatorPlaceholder: string;
|
|
33
|
+
tableFilterValueTitle: string;
|
|
34
|
+
tableFilterValuePlaceholder: string;
|
|
35
|
+
tableFilterLabel: string;
|
|
36
|
+
tableFilterDropdownTitle: string;
|
|
37
|
+
tableFilterDropdownTitleUnique: string;
|
|
38
|
+
tablePaginationPrevious: string;
|
|
39
|
+
tablePaginationNext: string;
|
|
40
|
+
tablePaginationSelectLabel: string;
|
|
41
|
+
tablePaginationFooter: (pagination: {
|
|
42
|
+
pages: number;
|
|
43
|
+
totalItems: number;
|
|
44
|
+
sizes?: number[];
|
|
45
|
+
current: number;
|
|
46
|
+
select: React.ReactNode;
|
|
47
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
calendarFromDate: string;
|
|
49
|
+
calendarToDate: string;
|
|
50
|
+
calendarToday: string;
|
|
51
|
+
calendarBackMonth: string;
|
|
52
|
+
calendarNextMonth: string;
|
|
53
|
+
calendarMonthLabel: string;
|
|
54
|
+
multiSelectSelectedLabel: string;
|
|
55
|
+
multiSelectInnerPlaceholder: string;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=use-translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-translations.d.ts","sourceRoot":"","sources":["../../../src/hooks/use-translations.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAKs+C,CAAC;;gBAAoD,MAAO,SAAS;;;;;;;;;;CADtkD,CAAC"}
|