@arkyn/components 3.0.1-beta.1 → 3.0.1-beta.3
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/bundle.js +6355 -6992
- package/dist/bundle.umd.cjs +61 -90
- package/dist/components/Breadcrumb/BreadcrumbLink/index.js +1 -1
- package/dist/components/Form/FormController/index.d.ts.map +1 -1
- package/dist/components/Form/FormController/index.js +2 -2
- package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +1 -3
- package/dist/components/Input/CpfCpnjInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/CurrencyInput/getConfig.d.ts +1 -3
- package/dist/components/Input/CurrencyInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/MaskInput/getConfig.d.ts +1 -3
- package/dist/components/Input/MaskInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/SimpleInput/getConfig.d.ts +1 -3
- package/dist/components/Input/SimpleInput/getConfig.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Select/getConfig.d.ts +2 -4
- package/dist/components/Select/getConfig.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +26 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/context/FormKeyContext.d.ts +3 -0
- package/dist/context/FormKeyContext.d.ts.map +1 -0
- package/dist/context/FormKeyContext.js +3 -0
- package/dist/context/ToastContext.d.ts +2 -1
- package/dist/context/ToastContext.d.ts.map +1 -1
- package/dist/context/ToastContext.js +2 -2
- package/dist/hooks/useAutomation.js +1 -1
- package/dist/hooks/useFieldErrors.d.ts.map +1 -1
- package/dist/hooks/useFieldErrors.js +5 -28
- package/dist/hooks/useFormKey.d.ts +3 -0
- package/dist/hooks/useFormKey.d.ts.map +1 -0
- package/dist/hooks/useFormKey.js +7 -0
- package/dist/hooks/useScopedParams.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/provider/FormKeyProvider.d.ts +6 -0
- package/dist/provider/FormKeyProvider.d.ts.map +1 -0
- package/dist/provider/FormKeyProvider.js +7 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Select/getConfig.tsx +1 -1
- package/src/components/Select/index.tsx +38 -4
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useLocation, Link } from "
|
2
|
+
import { useLocation, Link } from "react-router";
|
3
3
|
import { ChevronRight } from "lucide-react";
|
4
4
|
import "./styles.css";
|
5
5
|
function BreadcrumbLink(args) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormController/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormController/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAI/E,OAAO,cAAc,CAAC;AAItB,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CA4BjD;AAED,iBAAS,iBAAiB,+BAEzB;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { createContext, useContext, useId, useRef
|
3
|
-
import "./styles.css";
|
2
|
+
import { createContext, useContext, useId, useRef } from "react";
|
4
3
|
import { useFieldErrors } from "../../../hooks/useFieldErrors";
|
4
|
+
import "./styles.css";
|
5
5
|
const FormControllerContext = createContext({});
|
6
6
|
function FormController(props) {
|
7
7
|
const { children, className: baseClassName, id: formControllerId, ...rest } = props;
|
@@ -118,7 +118,7 @@ declare function getConfig(props: CpfCnpjInputProps, isFocused: boolean): {
|
|
118
118
|
onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
119
119
|
onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
120
120
|
onChangeCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
121
|
-
onBeforeInput?: import("react").
|
121
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLInputElement>;
|
122
122
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
123
123
|
onInput?: import("react").FormEventHandler<HTMLInputElement>;
|
124
124
|
onInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
@@ -168,8 +168,6 @@ declare function getConfig(props: CpfCnpjInputProps, isFocused: boolean): {
|
|
168
168
|
onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
169
169
|
onRateChange?: import("react").ReactEventHandler<HTMLInputElement>;
|
170
170
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
171
|
-
onResize?: import("react").ReactEventHandler<HTMLInputElement>;
|
172
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
173
171
|
onSeeked?: import("react").ReactEventHandler<HTMLInputElement>;
|
174
172
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
175
173
|
onSeeking?: import("react").ReactEventHandler<HTMLInputElement>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CpfCpnjInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMtD,iBAAS,SAAS,CAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CpfCpnjInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAMtD,iBAAS,SAAS,CAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkE9D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -118,7 +118,7 @@ declare function getConfig(props: CurrencyInputProps, isFocused: boolean): {
|
|
118
118
|
onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
119
119
|
onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
120
120
|
onChangeCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
121
|
-
onBeforeInput?: import("react").
|
121
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLInputElement>;
|
122
122
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
123
123
|
onInput?: import("react").FormEventHandler<HTMLInputElement>;
|
124
124
|
onInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
@@ -168,8 +168,6 @@ declare function getConfig(props: CurrencyInputProps, isFocused: boolean): {
|
|
168
168
|
onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
169
169
|
onRateChange?: import("react").ReactEventHandler<HTMLInputElement>;
|
170
170
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
171
|
-
onResize?: import("react").ReactEventHandler<HTMLInputElement>;
|
172
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
173
171
|
onSeeked?: import("react").ReactEventHandler<HTMLInputElement>;
|
174
172
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
175
173
|
onSeeking?: import("react").ReactEventHandler<HTMLInputElement>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKvD,iBAAS,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKvD,iBAAS,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0D/D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -120,7 +120,7 @@ declare function getConfig(props: MaskedInputProps, isFocused: boolean): {
|
|
120
120
|
onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
121
121
|
onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
122
122
|
onChangeCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
123
|
-
onBeforeInput?: import("react").
|
123
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLInputElement>;
|
124
124
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
125
125
|
onInput?: import("react").FormEventHandler<HTMLInputElement>;
|
126
126
|
onInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
@@ -170,8 +170,6 @@ declare function getConfig(props: MaskedInputProps, isFocused: boolean): {
|
|
170
170
|
onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
171
171
|
onRateChange?: import("react").ReactEventHandler<HTMLInputElement>;
|
172
172
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
173
|
-
onResize?: import("react").ReactEventHandler<HTMLInputElement>;
|
174
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
175
173
|
onSeeked?: import("react").ReactEventHandler<HTMLInputElement>;
|
176
174
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
177
175
|
onSeeking?: import("react").ReactEventHandler<HTMLInputElement>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuD7D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -121,7 +121,7 @@ declare function getConfig(props: SimpleInputProps, isFocused: boolean): {
|
|
121
121
|
onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
122
122
|
onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
123
123
|
onChangeCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
124
|
-
onBeforeInput?: import("react").
|
124
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLInputElement>;
|
125
125
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
126
126
|
onInput?: import("react").FormEventHandler<HTMLInputElement>;
|
127
127
|
onInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
@@ -171,8 +171,6 @@ declare function getConfig(props: SimpleInputProps, isFocused: boolean): {
|
|
171
171
|
onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
172
172
|
onRateChange?: import("react").ReactEventHandler<HTMLInputElement>;
|
173
173
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
174
|
-
onResize?: import("react").ReactEventHandler<HTMLInputElement>;
|
175
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
176
174
|
onSeeked?: import("react").ReactEventHandler<HTMLInputElement>;
|
177
175
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
178
176
|
onSeeking?: import("react").ReactEventHandler<HTMLInputElement>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/SimpleInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/SimpleInput/getConfig.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoD7D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useNavigate } from "@remix-run/react";
|
3
2
|
import { ChevronLeft, ChevronRight, Ellipsis } from "lucide-react";
|
3
|
+
import { useNavigate } from "react-router";
|
4
4
|
import { useScopedParams } from "../../hooks/useScopedParams";
|
5
5
|
import "./styles.css";
|
6
6
|
function generatePagesArray(from, to) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SelectProps } from "
|
1
|
+
import { SelectProps } from ".";
|
2
2
|
declare function getConfig(props: SelectProps, isFocused: boolean): {
|
3
3
|
isSearchable?: boolean;
|
4
4
|
onSearch?: (value: string) => void;
|
@@ -133,7 +133,7 @@ declare function getConfig(props: SelectProps, isFocused: boolean): {
|
|
133
133
|
onFocusCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
134
134
|
onBlurCapture?: import("react").FocusEventHandler<HTMLInputElement>;
|
135
135
|
onChangeCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
136
|
-
onBeforeInput?: import("react").
|
136
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLInputElement>;
|
137
137
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
138
138
|
onInput?: import("react").FormEventHandler<HTMLInputElement>;
|
139
139
|
onInputCapture?: import("react").FormEventHandler<HTMLInputElement>;
|
@@ -183,8 +183,6 @@ declare function getConfig(props: SelectProps, isFocused: boolean): {
|
|
183
183
|
onProgressCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
184
184
|
onRateChange?: import("react").ReactEventHandler<HTMLInputElement>;
|
185
185
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
186
|
-
onResize?: import("react").ReactEventHandler<HTMLInputElement>;
|
187
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
188
186
|
onSeeked?: import("react").ReactEventHandler<HTMLInputElement>;
|
189
187
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLInputElement>;
|
190
188
|
onSeeking?: import("react").ReactEventHandler<HTMLInputElement>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../src/components/Select/getConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../src/components/Select/getConfig.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC;AAEhC,iBAAS,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CxD;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -1,5 +1,30 @@
|
|
1
|
-
import type {
|
1
|
+
import type { InputHTMLAttributes } from "react";
|
2
|
+
import { LucideIcon } from "lucide-react";
|
2
3
|
import "./styles.css";
|
4
|
+
export type SelectProps = {
|
5
|
+
isLoading?: boolean;
|
6
|
+
isError?: boolean;
|
7
|
+
isSearchable?: boolean;
|
8
|
+
onSearch?: (value: string) => void;
|
9
|
+
closeOnSelect?: boolean;
|
10
|
+
size?: "md" | "lg";
|
11
|
+
variant?: "solid" | "outline" | "underline";
|
12
|
+
prefix?: string | LucideIcon;
|
13
|
+
leftIcon?: LucideIcon;
|
14
|
+
name: string;
|
15
|
+
value?: string;
|
16
|
+
defaultValue?: string;
|
17
|
+
searchPlaceholder?: string;
|
18
|
+
optionMaxHeight?: number;
|
19
|
+
options: {
|
20
|
+
label: string;
|
21
|
+
value: string;
|
22
|
+
}[];
|
23
|
+
onSelect?: (value: {
|
24
|
+
label: string;
|
25
|
+
value: string;
|
26
|
+
}) => void;
|
27
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "prefix" | "type" | "name" | "defaultValue" | "value" | "onChange" | "onSelect">;
|
3
28
|
declare function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
|
4
29
|
export { Select };
|
5
30
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAsB,UAAU,EAAU,MAAM,cAAc,CAAC;AAOtE,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IAE5C,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,QAAQ,CAAC,EAAE,UAAU,CAAC;IAEtB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC9D,GAAG,IAAI,CACN,mBAAmB,CAAC,gBAAgB,CAAC,EACnC,MAAM,GACN,QAAQ,GACR,MAAM,GACN,MAAM,GACN,cAAc,GACd,OAAO,GACP,UAAU,GACV,UAAU,CACb,CAAC;AAEF,iBAAS,MAAM,CAAC,KAAK,EAAE,WAAW,2CA2KjC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
@@ -12,7 +12,7 @@ function Select(props) {
|
|
12
12
|
const baseRef = useRef(null);
|
13
13
|
const ref = inputRef || baseRef;
|
14
14
|
const isError = props.isError || !!error;
|
15
|
-
const { disabled, title, style, className, prefix, iconSize, isLoading, LeftIcon, value: baseValue = null, defaultValue = "", onFocus, onBlur, Spinner, name,
|
15
|
+
const { disabled, title, style, className, prefix, iconSize, isLoading, LeftIcon, value: baseValue = null, defaultValue = "", onFocus, onBlur, Spinner, name, placeholder, searchPlaceholder, onSelect, options, optionMaxHeight, closeOnSelect, isSearchable, onSearch, ...rest } = getConfig({ ...props, id, isError }, isFocused);
|
16
16
|
const [selectedValue, setSelectedValue] = useState(defaultValue);
|
17
17
|
function handleSectionClick() {
|
18
18
|
if (disabled || !ref?.current || isFocused)
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FormKeyContext.d.ts","sourceRoot":"","sources":["../../src/context/FormKeyContext.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,cAAc,iCAA0C,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { ToastContextProps } from "@arkyn/types";
|
2
|
-
|
2
|
+
import * as React from "react";
|
3
|
+
declare const ToastContext: React.Context<ToastContextProps>;
|
3
4
|
export { ToastContext };
|
4
5
|
//# sourceMappingURL=ToastContext.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ToastContext.d.ts","sourceRoot":"","sources":["../../src/context/ToastContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"ToastContext.d.ts","sourceRoot":"","sources":["../../src/context/ToastContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,YAAY,kCAA+C,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import
|
2
|
-
const ToastContext = createContext({});
|
1
|
+
import * as React from "react";
|
2
|
+
const ToastContext = React.createContext({});
|
3
3
|
export { ToastContext };
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { useActionData, useFetchers, useLocation, useNavigate, } from "@remix-run/react";
|
2
1
|
import { useContext, useEffect } from "react";
|
2
|
+
import { useActionData, useFetchers, useLocation, useNavigate, } from "react-router";
|
3
3
|
import { animateScroll } from "react-scroll";
|
4
4
|
import { ModalContext } from "../context/ModalContext";
|
5
5
|
import { useScopedParams } from "./useScopedParams";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useFieldErrors.d.ts","sourceRoot":"","sources":["../../src/hooks/useFieldErrors.ts"],"names":[],"mappings":"AAGA,iBAAS,cAAc;;
|
1
|
+
{"version":3,"file":"useFieldErrors.d.ts","sourceRoot":"","sources":["../../src/hooks/useFieldErrors.ts"],"names":[],"mappings":"AAGA,iBAAS,cAAc;;EAkBtB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
@@ -1,33 +1,10 @@
|
|
1
|
-
import { useActionData,
|
2
|
-
import {
|
1
|
+
import { useActionData, useFetcher } from "react-router";
|
2
|
+
import { useFormKey } from "./useFormKey";
|
3
3
|
function useFieldErrors() {
|
4
4
|
const actionData = useActionData();
|
5
|
-
const
|
6
|
-
const
|
7
|
-
const
|
8
|
-
function compareObjects(obj1, obj2) {
|
9
|
-
return JSON.stringify(obj1) === JSON.stringify(obj2);
|
10
|
-
}
|
11
|
-
function handleClearFields() {
|
12
|
-
if (fetcherFieldErrors)
|
13
|
-
setFetcherFieldErrors(null);
|
14
|
-
return;
|
15
|
-
}
|
16
|
-
// create field errors
|
17
|
-
useEffect(() => {
|
18
|
-
let newFieldErrors = fetchers[0]?.data?.fieldErrors || {};
|
19
|
-
if (!compareObjects(fetcherFieldErrors, newFieldErrors)) {
|
20
|
-
if (Object.entries(newFieldErrors).length !== 0) {
|
21
|
-
setFetcherFieldErrors(newFieldErrors);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}, [fetchers, actionData]);
|
25
|
-
// clear field errors
|
26
|
-
useEffect(() => {
|
27
|
-
if (fetchers[0]?.state === "submitting")
|
28
|
-
handleClearFields();
|
29
|
-
}, [fetchers, navigation]);
|
30
|
-
const responseFieldErrors = actionData?.fieldErrors || fetcherFieldErrors;
|
5
|
+
const formKey = useFormKey();
|
6
|
+
const fetcher = useFetcher({ key: formKey });
|
7
|
+
const responseFieldErrors = actionData?.fieldErrors || fetcher?.data?.fieldErrors;
|
31
8
|
let mappedResponse = {};
|
32
9
|
Object.entries(responseFieldErrors || {}).forEach(([key, value]) => {
|
33
10
|
if (typeof value === "string" && typeof key === "string") {
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFormKey.d.ts","sourceRoot":"","sources":["../../src/hooks/useFormKey.ts"],"names":[],"mappings":"AAGA,iBAAS,UAAU,WAGlB;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -32,11 +32,13 @@ export { useFormController } from "./components/Form/FormController";
|
|
32
32
|
export { useAutomation } from "./hooks/useAutomation";
|
33
33
|
export { useDrawer } from "./hooks/useDrawer";
|
34
34
|
export { useFieldErrors } from "./hooks/useFieldErrors";
|
35
|
+
export { useFormKey } from "./hooks/useFormKey";
|
35
36
|
export { useHydrated } from "./hooks/useHydrated";
|
36
37
|
export { useModal } from "./hooks/useModal";
|
37
38
|
export { useScopedParams } from "./hooks/useScopedParams";
|
38
39
|
export { useToast } from "./hooks/useToast";
|
39
40
|
export { DrawerProvider } from "./provider/DrawerProvider";
|
41
|
+
export { FormKeyProvider } from "./provider/FormKeyProvider";
|
40
42
|
export { GoogleProvider } from "./provider/GoogleProvider";
|
41
43
|
export { ModalProvider } from "./provider/ModalProvider";
|
42
44
|
export { ToastProvider } from "./provider/ToastProvider";
|
package/dist/index.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,SAAS,EACT,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,o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ks/useAutomation";
|
38
38
|
export { useDrawer } from "./hooks/useDrawer";
|
39
39
|
export { useFieldErrors } from "./hooks/useFieldErrors";
|
40
|
+
export { useFormKey } from "./hooks/useFormKey";
|
40
41
|
export { useHydrated } from "./hooks/useHydrated";
|
41
42
|
export { useModal } from "./hooks/useModal";
|
42
43
|
export { useScopedParams } from "./hooks/useScopedParams";
|
43
44
|
export { useToast } from "./hooks/useToast";
|
44
45
|
// Providers
|
45
46
|
export { DrawerProvider } from "./provider/DrawerProvider";
|
47
|
+
export { FormKeyProvider } from "./provider/FormKeyProvider";
|
46
48
|
export { GoogleProvider } from "./provider/GoogleProvider";
|
47
49
|
export { ModalProvider } from "./provider/ModalProvider";
|
48
50
|
export { ToastProvider } from "./provider/ToastProvider";
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FormKeyProvider.d.ts","sourceRoot":"","sources":["../../src/provider/FormKeyProvider.tsx"],"names":[],"mappings":"AAEA,iBAAS,eAAe,CAAC,IAAI,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,2CAM3E;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { FormKeyContext } from "../context/FormKeyContext";
|
3
|
+
function FormKeyProvider(args) {
|
4
|
+
const { children, rawKey } = args;
|
5
|
+
return (_jsx(FormKeyContext.Provider, { value: rawKey, children: children }));
|
6
|
+
}
|
7
|
+
export { FormKeyProvider };
|