@lerianstudio/sindarian-ui 1.1.1-beta.1 → 1.1.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/components/form/combo-box-field/index.d.ts +2 -2
- package/dist/components/form/combo-box-field/index.d.ts.map +1 -1
- package/dist/components/form/country-field/index.d.ts +3 -2
- package/dist/components/form/country-field/index.d.ts.map +1 -1
- package/dist/components/form/date-picker-field/index.d.ts +2 -2
- package/dist/components/form/date-picker-field/index.d.ts.map +1 -1
- package/dist/components/form/date-range-field/index.d.ts +2 -2
- package/dist/components/form/date-range-field/index.d.ts.map +1 -1
- package/dist/components/form/input-field/index.d.ts +2 -2
- package/dist/components/form/input-field/index.d.ts.map +1 -1
- package/dist/components/form/input-field/index.js +1 -1
- package/dist/components/form/select-field/index.d.ts +2 -2
- package/dist/components/form/select-field/index.d.ts.map +1 -1
- package/dist/components/form/state-field/index.d.ts +3 -2
- package/dist/components/form/state-field/index.d.ts.map +1 -1
- package/dist/components/form/state-field/index.js +1 -1
- package/dist/components/form/switch-field/index.d.ts +2 -2
- package/dist/components/form/switch-field/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type ComboBoxFieldProps<T extends FieldValues = FieldValues> = React.PropsWithChildren & {
|
|
4
|
-
name:
|
|
4
|
+
name: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
emptyMessage?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/combo-box-field/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/combo-box-field/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAiB5D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAChE,KAAK,CAAC,iBAAiB,GAAG;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAEH,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,qFAShE,kBAAkB,CAAC,CAAC,CAAC,4CA0FvB,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
1
2
|
import { ComboBoxFieldProps } from '../combo-box-field';
|
|
2
|
-
export type CountryFieldProps = Omit<ComboBoxFieldProps
|
|
3
|
-
export declare const CountryField: ({ ...others }: CountryFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type CountryFieldProps<T extends FieldValues = FieldValues> = Omit<ComboBoxFieldProps<T>, 'children'>;
|
|
4
|
+
export declare const CountryField: <T extends FieldValues = FieldValues>({ ...others }: CountryFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/country-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/country-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAA;AAGtE,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,IAAI,CACvE,kBAAkB,CAAC,CAAC,CAAC,EACrB,UAAU,CACX,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,eAE/D,iBAAiB,CAAC,CAAC,CAAC,4CAUtB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type DatePickerFieldProps<T extends FieldValues = FieldValues> = {
|
|
4
|
-
name:
|
|
4
|
+
name: string;
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
labelExtra?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/date-picker-field/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/date-picker-field/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,oJAelE,oBAAoB,CAAC,CAAC,CAAC,4CAsFzB,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type DateRangeFieldProps<T extends FieldValues = FieldValues> = {
|
|
4
|
-
name:
|
|
4
|
+
name: string;
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
labelExtra?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/date-range-field/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/date-range-field/index.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IACrE,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,qJAejE,mBAAmB,CAAC,CAAC,CAAC,4CAoExB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HTMLInputTypeAttribute, ReactNode } from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type InputFieldProps<T extends FieldValues = FieldValues> = {
|
|
4
4
|
className?: string;
|
|
5
|
-
name:
|
|
5
|
+
name: string;
|
|
6
6
|
type?: HTMLInputTypeAttribute;
|
|
7
7
|
label?: ReactNode;
|
|
8
8
|
tooltip?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/input-field/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,cAAc,CAAC,EAAE,SAAS,CAAA;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,CACT,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,KACzD,IAAI,CAAA;CACV,CAAA;AACD,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,gMAkB7D,eAAe,CAAC,CAAC,CAAC,4CAmDpB,CAAA"}
|
|
@@ -6,7 +6,7 @@ const autosize_textarea_1 = require("../../../components/ui/autosize-textarea");
|
|
|
6
6
|
const form_1 = require("../../../components/ui/form");
|
|
7
7
|
const input_1 = require("../../../components/ui/input");
|
|
8
8
|
const InputField = ({ className, type, label, tooltip, labelExtra, placeholder, description, startAdornment, endAdornment, required, readOnly, minHeight, maxHeight, textArea, defaultValue, onChange, ...others }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : labelExtra, children: label })), (0, jsx_runtime_1.jsx)(form_1.FormControl, { children: textArea ? ((0, jsx_runtime_1.jsx)(autosize_textarea_1.AutosizeTextarea, { className: className, placeholder: placeholder, readOnly: readOnly, minHeight: minHeight, maxHeight: maxHeight, defaultValue: defaultValue, "data-testid": others['data-testid'], ...field, onChange: (e) => {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, name: others.name, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && ((0, jsx_runtime_1.jsx)(form_1.FormLabel, { extra: tooltip ? (0, jsx_runtime_1.jsx)(form_1.FormTooltip, { children: tooltip }) : labelExtra, children: label })), (0, jsx_runtime_1.jsx)(form_1.FormControl, { children: textArea ? ((0, jsx_runtime_1.jsx)(autosize_textarea_1.AutosizeTextarea, { className: className, placeholder: placeholder, readOnly: readOnly, minHeight: minHeight, maxHeight: maxHeight, defaultValue: defaultValue, "data-testid": others['data-testid'], ...field, onChange: (e) => {
|
|
10
10
|
field.onChange(e);
|
|
11
11
|
onChange?.(e);
|
|
12
12
|
} })) : ((0, jsx_runtime_1.jsx)(input_1.Input, { className: className, type: type, placeholder: placeholder, readOnly: readOnly, startAdornment: startAdornment, endAdornment: endAdornment, "data-testid": others['data-testid'], ...field })) }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {}), description && (0, jsx_runtime_1.jsx)(form_1.FormDescription, { children: description })] })) }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type SelectFieldProps<T extends FieldValues = FieldValues> = PropsWithChildren & {
|
|
4
|
-
name:
|
|
4
|
+
name: string;
|
|
5
5
|
label?: ReactNode;
|
|
6
6
|
tooltip?: string;
|
|
7
7
|
labelExtra?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/select-field/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/select-field/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAC9D,iBAAiB,GAAG;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAEH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,2JAgB9D,gBAAgB,CAAC,CAAC,CAAC,4CAmErB,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
1
2
|
import { SelectFieldProps } from '../select-field';
|
|
2
|
-
export type StateFieldProps = Omit<SelectFieldProps
|
|
3
|
+
export type StateFieldProps<T extends FieldValues = FieldValues> = Omit<SelectFieldProps<T>, 'children'> & {
|
|
3
4
|
countryName?: string;
|
|
4
5
|
emptyMessage?: string;
|
|
5
6
|
readOnly?: boolean;
|
|
6
7
|
};
|
|
7
|
-
export declare const StateField: ({ countryName, label, placeholder, emptyMessage, required, readOnly, ...others }: StateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const StateField: <T extends FieldValues = FieldValues>({ countryName, label, placeholder, emptyMessage, required, readOnly, ...others }: StateFieldProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/state-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAsHlD,MAAM,MAAM,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/state-field/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAsHlD,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,IAAI,CACrE,gBAAgB,CAAC,CAAC,CAAC,EACnB,UAAU,CACX,GAAG;IACF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,kFAQ7D,eAAe,CAAC,CAAC,CAAC,4CAoBpB,CAAA"}
|
|
@@ -37,6 +37,6 @@ function StateComboBox({ value, placeholder, onChange, countryName, emptyMessage
|
|
|
37
37
|
}, children: option.label }, option.value))) })] })] }) })] }));
|
|
38
38
|
}
|
|
39
39
|
const StateField = ({ countryName = 'address.country', label, placeholder, emptyMessage, required, readOnly, ...others }) => {
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && (0, jsx_runtime_1.jsx)(form_1.FormLabel, { children: label }), (0, jsx_runtime_1.jsx)(StateComboBox, { countryName: countryName, placeholder: placeholder, emptyMessage: emptyMessage, readOnly: readOnly, ...field }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {})] })) }));
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(form_1.FormField, { ...others, name: others.name, render: ({ field }) => ((0, jsx_runtime_1.jsxs)(form_1.FormItem, { required: required, children: [label && (0, jsx_runtime_1.jsx)(form_1.FormLabel, { children: label }), (0, jsx_runtime_1.jsx)(StateComboBox, { countryName: countryName, placeholder: placeholder, emptyMessage: emptyMessage, readOnly: readOnly, ...field }), (0, jsx_runtime_1.jsx)(form_1.FormMessage, {})] })) }));
|
|
41
41
|
};
|
|
42
42
|
exports.StateField = StateField;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Control, FieldValues
|
|
2
|
+
import { Control, FieldValues } from 'react-hook-form';
|
|
3
3
|
export type SwitchFieldProps<T extends FieldValues = FieldValues> = {
|
|
4
4
|
label?: string;
|
|
5
|
-
name:
|
|
5
|
+
name: string;
|
|
6
6
|
control: Control<T>;
|
|
7
7
|
labelExtra?: ReactNode;
|
|
8
8
|
tooltip?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/switch-field/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/switch-field/index.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAQ,MAAM,iBAAiB,CAAA;AAE5D,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,WAAW,GAAG,WAAW,EAAE,+GAU9D,gBAAgB,CAAC,CAAC,CAAC,4CAiDrB,CAAA"}
|