@intlayer/design-system 3.2.2 → 3.3.2
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/.vite/manifest.json +9 -8
- package/dist/Form-CQpKjeW6.js +301 -0
- package/dist/Form-CQpKjeW6.js.map +1 -0
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs +14 -0
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.cjs.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs +15 -1
- package/dist/components/Auth/ChangePasswordForm/ChangePasswordForm.mjs.map +1 -1
- package/dist/components/Auth/ResetPasswordForm/ResetPasswordForm.mjs +1 -1
- package/dist/components/Auth/SignInForm/SignInForm.mjs +1 -1
- package/dist/components/Auth/SignUpForm/SignUpForm.mjs +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Command/index.d.ts +9 -9
- package/dist/components/Container/index.d.ts +2 -2
- package/dist/components/DictionaryEditor/ValidDictionaryChangeButtons.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionariesSelector/DictionariesSelector.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryFormSchema.d.ts +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -1
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -2
- package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsSchema.d.ts +4 -4
- package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/EditorView.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/EditorView/TextEditor.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +1 -1
- package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +1 -1
- package/dist/components/Form/Form.mjs +1 -1
- package/dist/components/Form/elements/CheckboxElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldInputElement.mjs +1 -1
- package/dist/components/Form/elements/EditableFieldTextAreaElement.mjs +2 -2
- package/dist/components/Form/elements/FormElement.mjs +2 -2
- package/dist/components/Form/elements/InputElement.mjs +1 -1
- package/dist/components/Form/elements/InputPasswordElement.mjs +2 -2
- package/dist/components/Form/elements/MultiselectElement.mjs +1 -1
- package/dist/components/Form/elements/SelectElement.mjs +1 -1
- package/dist/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/components/Form/elements/TextAreaElement.mjs +1 -1
- package/dist/components/Form/elements/index.mjs +4 -4
- package/dist/components/Form/index.mjs +1 -1
- package/dist/components/Form/layout/FormItemLayout.mjs +2 -2
- package/dist/components/Form/layout/index.mjs +2 -2
- package/dist/components/Input/Checkbox.d.ts +1 -1
- package/dist/components/Select/Multiselect.d.ts +2 -2
- package/dist/components/Tag/index.cjs +2 -1
- package/dist/components/Tag/index.cjs.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.mjs +2 -1
- package/dist/components/Tag/index.mjs.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/index.cjs +1 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +2 -1
- package/dist/hooks/intlayerAPIHooks.cjs +13 -2
- package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
- package/dist/hooks/intlayerAPIHooks.d.ts +1 -0
- package/dist/hooks/intlayerAPIHooks.d.ts.map +1 -1
- package/dist/hooks/intlayerAPIHooks.mjs +13 -2
- package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.cjs +1 -1
- package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
- package/dist/hooks/useAsync/useAsync.mjs +1 -1
- package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
- package/dist/hooks/useIntlayerAPI.d.ts +1 -0
- package/dist/hooks/useIntlayerAPI.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.cjs +3 -2
- package/dist/hooks/usePersistedStore.cjs.map +1 -1
- package/dist/hooks/usePersistedStore.d.ts.map +1 -1
- package/dist/hooks/usePersistedStore.mjs +3 -2
- package/dist/hooks/usePersistedStore.mjs.map +1 -1
- package/dist/libs/intlayer-api/index.cjs +1 -1
- package/dist/libs/intlayer-api/index.cjs.map +1 -1
- package/dist/libs/intlayer-api/index.d.ts +2 -0
- package/dist/libs/intlayer-api/index.d.ts.map +1 -1
- package/dist/libs/intlayer-api/index.mjs +1 -1
- package/dist/libs/intlayer-api/index.mjs.map +1 -1
- package/dist/libs/intlayer-api/stripe.cjs +12 -3
- package/dist/libs/intlayer-api/stripe.cjs.map +1 -1
- package/dist/libs/intlayer-api/stripe.d.ts +1 -0
- package/dist/libs/intlayer-api/stripe.d.ts.map +1 -1
- package/dist/libs/intlayer-api/stripe.mjs +12 -3
- package/dist/libs/intlayer-api/stripe.mjs.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +15 -15
package/dist/.vite/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_Form-
|
|
3
|
-
"file": "Form-
|
|
2
|
+
"_Form-CQpKjeW6.js": {
|
|
3
|
+
"file": "Form-CQpKjeW6.js",
|
|
4
4
|
"name": "Form",
|
|
5
5
|
"imports": [
|
|
6
6
|
"src/components/Button/Button.tsx",
|
|
7
|
-
"_jsx-runtime-
|
|
7
|
+
"_jsx-runtime-BgSF1HG2.js",
|
|
8
8
|
"src/components/Input/Input.tsx",
|
|
9
9
|
"src/components/Input/InputPassword.tsx",
|
|
10
10
|
"src/components/Input/Checkbox.tsx",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"src/components/Form/FormLabel.tsx"
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
|
-
"_Form-
|
|
28
|
-
"file": "Form-
|
|
27
|
+
"_Form-DERuauvB.cjs": {
|
|
28
|
+
"file": "Form-DERuauvB.cjs",
|
|
29
29
|
"name": "Form",
|
|
30
30
|
"imports": [
|
|
31
31
|
"src/components/Button/Button.tsx",
|
|
32
|
-
"_jsx-runtime-
|
|
32
|
+
"_jsx-runtime-DvCoRj5u.cjs",
|
|
33
33
|
"src/components/Input/Input.tsx",
|
|
34
34
|
"src/components/Input/InputPassword.tsx",
|
|
35
35
|
"src/components/Input/Checkbox.tsx",
|
|
@@ -168,6 +168,7 @@
|
|
|
168
168
|
"src/components/Form/FormBase.tsx",
|
|
169
169
|
"src/components/Form/FormField.tsx",
|
|
170
170
|
"_Form-DERuauvB.cjs",
|
|
171
|
+
"src/components/Auth/useUser/index.ts",
|
|
171
172
|
"src/components/Auth/ChangePasswordForm/ChangePasswordSchema.ts",
|
|
172
173
|
"src/components/Auth/ChangePasswordForm/index.content.ts"
|
|
173
174
|
]
|
|
@@ -750,8 +751,8 @@
|
|
|
750
751
|
"_Form-DERuauvB.cjs",
|
|
751
752
|
"src/hooks/useScrollBlockage/useScrollBlockageStore.ts",
|
|
752
753
|
"src/hooks/useAsync/useAsyncStateStore.ts",
|
|
753
|
-
"src/components/Modal/Modal.tsx",
|
|
754
754
|
"src/components/Auth/useAuth/index.tsx",
|
|
755
|
+
"src/components/Modal/Modal.tsx",
|
|
755
756
|
"src/components/Select/Multiselect.tsx",
|
|
756
757
|
"src/components/Select/Select.tsx",
|
|
757
758
|
"src/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.ts",
|
|
@@ -786,8 +787,8 @@
|
|
|
786
787
|
"src/components/Form/FormBase.tsx",
|
|
787
788
|
"src/components/Form/FormField.tsx",
|
|
788
789
|
"_Form-DERuauvB.cjs",
|
|
789
|
-
"src/components/Modal/Modal.tsx",
|
|
790
790
|
"src/components/Auth/useAuth/index.tsx",
|
|
791
|
+
"src/components/Modal/Modal.tsx",
|
|
791
792
|
"src/components/Select/Multiselect.tsx",
|
|
792
793
|
"src/components/Select/Select.tsx",
|
|
793
794
|
"src/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.tsx",
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "./components/Button/Button.mjs";
|
|
3
|
+
import { j as jsxRuntimeExports } from "./jsx-runtime-BgSF1HG2.js";
|
|
4
|
+
import { useFormContext } from "react-hook-form";
|
|
5
|
+
import { Input } from "./components/Input/Input.mjs";
|
|
6
|
+
import { InputPassword } from "./components/Input/InputPassword.mjs";
|
|
7
|
+
import { Checkbox } from "./components/Input/Checkbox.mjs";
|
|
8
|
+
import { TextArea } from "./components/TextArea/TextArea.mjs";
|
|
9
|
+
import { EditableFieldInput } from "./components/EditableField/EditableFieldInput.mjs";
|
|
10
|
+
import { EditableFieldTextArea } from "./components/EditableField/EditableFieldTextArea.mjs";
|
|
11
|
+
import { forwardRef } from "react";
|
|
12
|
+
import { MultiSelect } from "./components/Select/Multiselect.mjs";
|
|
13
|
+
import { useFormField, FormField } from "./components/Form/FormField.mjs";
|
|
14
|
+
import { FormLabelLayout } from "./components/Form/layout/FormLabelLayout.mjs";
|
|
15
|
+
import { Select } from "./components/Select/Select.mjs";
|
|
16
|
+
import { SwitchSelector } from "./components/SwitchSelector/index.mjs";
|
|
17
|
+
import { Form as Form$1 } from "./components/Form/FormBase.mjs";
|
|
18
|
+
import { FormControl } from "./components/Form/FormControl.mjs";
|
|
19
|
+
import { FormDescription } from "./components/Form/FormDescription.mjs";
|
|
20
|
+
import { FormItem } from "./components/Form/FormItem.mjs";
|
|
21
|
+
import { FormMessage } from "./components/Form/FormMessage.mjs";
|
|
22
|
+
import "clsx";
|
|
23
|
+
import "tailwind-merge";
|
|
24
|
+
import "./components/Form/FormLabel.mjs";
|
|
25
|
+
const FormItemLayout = ({
|
|
26
|
+
label,
|
|
27
|
+
description,
|
|
28
|
+
isRequired,
|
|
29
|
+
info,
|
|
30
|
+
children,
|
|
31
|
+
showErrorMessage = true,
|
|
32
|
+
htmlFor
|
|
33
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Form.Item, { className: "w-full space-y-2", children: [
|
|
34
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1 leading-none", children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(FormLabelLayout, { isRequired, info, htmlFor, children: label }),
|
|
36
|
+
description && /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Description, { children: description })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Form.Control, { children }),
|
|
39
|
+
showErrorMessage && /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Message, { "data-testid": "error-message" })
|
|
40
|
+
] });
|
|
41
|
+
const FormFieldElement = ({
|
|
42
|
+
field,
|
|
43
|
+
name,
|
|
44
|
+
label,
|
|
45
|
+
Element,
|
|
46
|
+
isRequired = false,
|
|
47
|
+
info,
|
|
48
|
+
description,
|
|
49
|
+
showErrorMessage = true,
|
|
50
|
+
...props
|
|
51
|
+
}) => {
|
|
52
|
+
const { error } = useFormField();
|
|
53
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54
|
+
FormItemLayout,
|
|
55
|
+
{
|
|
56
|
+
htmlFor: name,
|
|
57
|
+
label,
|
|
58
|
+
description,
|
|
59
|
+
isRequired,
|
|
60
|
+
info,
|
|
61
|
+
showErrorMessage,
|
|
62
|
+
"aria-invalid": !!error,
|
|
63
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Element, { "data-testid": "element", id: name, ...field, ...props, children: props.children })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
const FormElement = (props) => {
|
|
68
|
+
const { control } = useFormContext();
|
|
69
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
70
|
+
Form.Field,
|
|
71
|
+
{
|
|
72
|
+
control,
|
|
73
|
+
name: props.name,
|
|
74
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntimeExports.jsx(FormFieldElement, { ...props, field })
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
const InputElement = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
79
|
+
FormElement,
|
|
80
|
+
{
|
|
81
|
+
id: props.name,
|
|
82
|
+
"data-testid": props.name,
|
|
83
|
+
Element: Input,
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
const InputPasswordElement = ({
|
|
88
|
+
autoComplete,
|
|
89
|
+
...props
|
|
90
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
91
|
+
FormElement,
|
|
92
|
+
{
|
|
93
|
+
Element: InputPassword,
|
|
94
|
+
id: props.name,
|
|
95
|
+
"data-testid": props.name,
|
|
96
|
+
autoComplete,
|
|
97
|
+
minLength: 6,
|
|
98
|
+
maxLength: 255,
|
|
99
|
+
...props
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
const TextAreaElement = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
103
|
+
FormElement,
|
|
104
|
+
{
|
|
105
|
+
Element: TextArea,
|
|
106
|
+
id: props.name,
|
|
107
|
+
"data-testid": props.name,
|
|
108
|
+
...props
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
const EditableFieldInputElement = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
112
|
+
FormElement,
|
|
113
|
+
{
|
|
114
|
+
id: props.name,
|
|
115
|
+
"data-testid": props.name,
|
|
116
|
+
Element: EditableFieldInput,
|
|
117
|
+
...props
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
const EditableFieldTextAreaElement = (props) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
121
|
+
FormElement,
|
|
122
|
+
{
|
|
123
|
+
id: props.name,
|
|
124
|
+
"data-testid": props.name,
|
|
125
|
+
Element: EditableFieldTextArea,
|
|
126
|
+
...props
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
const CheckboxComponent = forwardRef(
|
|
130
|
+
({ inputLabel, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { ref, ...props, label: inputLabel })
|
|
131
|
+
);
|
|
132
|
+
CheckboxComponent.displayName = "CheckboxComponent";
|
|
133
|
+
const CheckboxElement = ({
|
|
134
|
+
autoComplete,
|
|
135
|
+
...props
|
|
136
|
+
}) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
137
|
+
FormElement,
|
|
138
|
+
{
|
|
139
|
+
Element: CheckboxComponent,
|
|
140
|
+
id: props.name,
|
|
141
|
+
"data-testid": props.name,
|
|
142
|
+
autoComplete,
|
|
143
|
+
minLength: 6,
|
|
144
|
+
maxLength: 255,
|
|
145
|
+
...props
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
const MultiSelectElement = ({
|
|
149
|
+
name,
|
|
150
|
+
description,
|
|
151
|
+
label,
|
|
152
|
+
isRequired,
|
|
153
|
+
info,
|
|
154
|
+
showErrorMessage,
|
|
155
|
+
children,
|
|
156
|
+
...props
|
|
157
|
+
}) => {
|
|
158
|
+
const { control } = useFormContext();
|
|
159
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
160
|
+
Form.Field,
|
|
161
|
+
{
|
|
162
|
+
control,
|
|
163
|
+
name,
|
|
164
|
+
render: ({ field }) => {
|
|
165
|
+
const { error } = useFormField();
|
|
166
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
167
|
+
FormItemLayout,
|
|
168
|
+
{
|
|
169
|
+
htmlFor: name,
|
|
170
|
+
label,
|
|
171
|
+
description,
|
|
172
|
+
isRequired,
|
|
173
|
+
info,
|
|
174
|
+
showErrorMessage,
|
|
175
|
+
"aria-invalid": !!error,
|
|
176
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
177
|
+
MultiSelect,
|
|
178
|
+
{
|
|
179
|
+
onValueChange: field.onChange,
|
|
180
|
+
values: field.value,
|
|
181
|
+
...props,
|
|
182
|
+
children
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
};
|
|
191
|
+
const SelectElement = ({
|
|
192
|
+
name,
|
|
193
|
+
description,
|
|
194
|
+
label,
|
|
195
|
+
isRequired,
|
|
196
|
+
info,
|
|
197
|
+
showErrorMessage,
|
|
198
|
+
children,
|
|
199
|
+
...props
|
|
200
|
+
}) => {
|
|
201
|
+
const { control } = useFormContext();
|
|
202
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
203
|
+
Form.Field,
|
|
204
|
+
{
|
|
205
|
+
control,
|
|
206
|
+
name,
|
|
207
|
+
render: ({ field }) => {
|
|
208
|
+
const { error } = useFormField();
|
|
209
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
210
|
+
FormItemLayout,
|
|
211
|
+
{
|
|
212
|
+
htmlFor: name,
|
|
213
|
+
label,
|
|
214
|
+
description,
|
|
215
|
+
isRequired,
|
|
216
|
+
info,
|
|
217
|
+
showErrorMessage,
|
|
218
|
+
"aria-invalid": !!error,
|
|
219
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
220
|
+
Select,
|
|
221
|
+
{
|
|
222
|
+
onValueChange: field.onChange,
|
|
223
|
+
defaultValue: field.value,
|
|
224
|
+
...props,
|
|
225
|
+
children
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
};
|
|
234
|
+
const SwitchSelectorElement = ({
|
|
235
|
+
name,
|
|
236
|
+
description,
|
|
237
|
+
label,
|
|
238
|
+
isRequired,
|
|
239
|
+
info,
|
|
240
|
+
showErrorMessage,
|
|
241
|
+
children,
|
|
242
|
+
...props
|
|
243
|
+
}) => {
|
|
244
|
+
const { control } = useFormContext();
|
|
245
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
246
|
+
Form.Field,
|
|
247
|
+
{
|
|
248
|
+
control,
|
|
249
|
+
name,
|
|
250
|
+
render: ({ field }) => {
|
|
251
|
+
const { error } = useFormField();
|
|
252
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
253
|
+
FormItemLayout,
|
|
254
|
+
{
|
|
255
|
+
htmlFor: name,
|
|
256
|
+
label,
|
|
257
|
+
description,
|
|
258
|
+
isRequired,
|
|
259
|
+
info,
|
|
260
|
+
showErrorMessage,
|
|
261
|
+
"aria-invalid": !!error,
|
|
262
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchSelector, { ...field, ...props, children })
|
|
263
|
+
}
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
};
|
|
269
|
+
const Form = Form$1;
|
|
270
|
+
Form.Description = FormDescription;
|
|
271
|
+
Form.Control = FormControl;
|
|
272
|
+
Form.Field = FormField;
|
|
273
|
+
Form.Item = FormItem;
|
|
274
|
+
Form.Label = FormLabelLayout;
|
|
275
|
+
Form.Message = FormMessage;
|
|
276
|
+
Form.Element = FormElement;
|
|
277
|
+
Form.Input = InputElement;
|
|
278
|
+
Form.InputPassword = InputPasswordElement;
|
|
279
|
+
Form.Checkbox = CheckboxElement;
|
|
280
|
+
Form.TextArea = TextAreaElement;
|
|
281
|
+
Form.Button = Button;
|
|
282
|
+
Form.Select = SelectElement;
|
|
283
|
+
Form.MultiSelect = MultiSelectElement;
|
|
284
|
+
Form.EditableFieldInput = EditableFieldInputElement;
|
|
285
|
+
Form.EditableFieldTextArea = EditableFieldTextAreaElement;
|
|
286
|
+
Form.SwitchSelector = SwitchSelectorElement;
|
|
287
|
+
export {
|
|
288
|
+
CheckboxElement as C,
|
|
289
|
+
EditableFieldInputElement as E,
|
|
290
|
+
Form as F,
|
|
291
|
+
InputElement as I,
|
|
292
|
+
MultiSelectElement as M,
|
|
293
|
+
SelectElement as S,
|
|
294
|
+
TextAreaElement as T,
|
|
295
|
+
FormElement as a,
|
|
296
|
+
InputPasswordElement as b,
|
|
297
|
+
EditableFieldTextAreaElement as c,
|
|
298
|
+
FormItemLayout as d,
|
|
299
|
+
SwitchSelectorElement as e
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=Form-CQpKjeW6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form-CQpKjeW6.js","sources":["../src/components/Form/layout/FormItemLayout.tsx","../src/components/Form/elements/FormElement.tsx","../src/components/Form/elements/InputElement.tsx","../src/components/Form/elements/InputPasswordElement.tsx","../src/components/Form/elements/TextAreaElement.tsx","../src/components/Form/elements/EditableFieldInputElement.tsx","../src/components/Form/elements/EditableFieldTextAreaElement.tsx","../src/components/Form/elements/CheckboxElement.tsx","../src/components/Form/elements/MultiselectElement.tsx","../src/components/Form/elements/SelectElement.tsx","../src/components/Form/elements/SwitchSelectorElement.tsx","../src/components/Form/Form.tsx"],"sourcesContent":["/* eslint-disable import/no-cycle */\nimport type { FC, ReactNode } from 'react';\nimport { Form } from '../Form';\nimport { FormLabelLayout, type FormLabelLayoutProps } from './FormLabelLayout';\n\nexport type FormItemLayoutProps = Omit<FormLabelLayoutProps, 'children'> & {\n label?: ReactNode;\n description?: ReactNode;\n children: ReactNode;\n showErrorMessage?: boolean;\n};\n\nexport const FormItemLayout: FC<FormItemLayoutProps> = ({\n label,\n description,\n isRequired,\n info,\n children,\n showErrorMessage = true,\n htmlFor,\n}) => (\n <Form.Item className=\"w-full space-y-2\">\n <div className=\"space-y-1 leading-none\">\n <FormLabelLayout isRequired={isRequired} info={info} htmlFor={htmlFor}>\n {label}\n </FormLabelLayout>\n {description && <Form.Description>{description}</Form.Description>}\n </div>\n <Form.Control>{children}</Form.Control>\n\n {showErrorMessage && <Form.Message data-testid=\"error-message\" />}\n </Form.Item>\n);\n","/* eslint-disable import/no-cycle */\n'use client';\n\nimport type { ComponentProps, ElementType, ReactNode } from 'react';\nimport {\n useFormContext,\n type ControllerRenderProps,\n type FieldValues,\n} from 'react-hook-form';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout, FormItemLayoutProps } from '../layout';\n\nexport type FormElementProps<T extends ElementType> = {\n name: string;\n Element: T;\n label?: ReactNode;\n isRequired?: boolean;\n info?: string;\n showErrorMessage?: boolean;\n focus?: boolean;\n} & Omit<FormItemLayoutProps, 'children'>;\n\ntype FormFieldElementProps<T extends ElementType> = FormElementProps<T> &\n ComponentProps<T> & {\n field: ControllerRenderProps<FieldValues, string>;\n };\n\nconst FormFieldElement = <T extends ElementType>({\n field,\n name,\n label,\n Element,\n isRequired = false,\n info,\n description,\n showErrorMessage = true,\n ...props\n}: FormFieldElementProps<T>) => {\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Element data-testid=\"element\" id={name} {...field} {...props}>\n {props.children}\n </Element>\n </FormItemLayout>\n );\n};\n\n/**\n * FormElement is a component that allows you to create a form element with a label, description, error message, and validation.\n *\n * The Element prop is the type of the element that will be rendered.\n * This element will interact with the FormContext and will be controlled by the FormControl component.\n * The props used to control the element will be `value` and `onChange`.\n */\nexport const FormElement = <T extends ElementType>(\n props: FormElementProps<T> & ComponentProps<T>\n) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={props.name}\n render={({ field }) => <FormFieldElement {...props} field={field} />}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { Input } from '../../../components/Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputElementProps = Omit<FormElementProps<typeof Input>, 'Element'> &\n ComponentProps<typeof Input> & {\n name: string;\n };\n\nexport const InputElement: FC<InputElementProps> = (props) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={Input}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, FC } from 'react';\nimport { InputPassword } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype InputPasswordElementProps = Omit<\n FormElementProps<typeof InputPassword>,\n 'Element'\n> &\n ComponentProps<typeof InputPassword> & {\n name: string;\n autoComplete: 'current-password' | 'new-password';\n };\n\nexport const InputPasswordElement: FC<InputPasswordElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={InputPassword}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { FC } from 'react';\nimport { TextArea } from '../../TextArea/TextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype TextAreaElementsProps = Omit<\n FormElementProps<typeof TextArea>,\n 'Element'\n> &\n React.ComponentProps<typeof TextArea> & {\n name: string;\n };\n\nexport const TextAreaElement: FC<TextAreaElementsProps> = (props) => (\n <FormElement\n Element={TextArea}\n id={props.name}\n data-testid={props.name}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldInput } from '../../EditableField/EditableFieldInput';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldInputElementProps = Omit<\n FormElementProps<typeof EditableFieldInput>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldInput>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldInputElement = (\n props: EditableFieldInputElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldInput}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { EditableFieldTextArea } from '../../EditableField/EditableFieldTextArea';\nimport { FormElement, type FormElementProps } from './FormElement';\n\ntype EditableFieldTextAreaElementProps = Omit<\n FormElementProps<typeof EditableFieldTextArea>,\n 'Element'\n> &\n Omit<ComponentProps<typeof EditableFieldTextArea>, 'onChange'> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const EditableFieldTextAreaElement = (\n props: EditableFieldTextAreaElementProps\n) => (\n <FormElement\n id={props.name}\n data-testid={props.name}\n Element={EditableFieldTextArea}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport { forwardRef, type ComponentProps, type FC } from 'react';\nimport { Checkbox } from '../../Input';\nimport { FormElementProps, FormElement } from './FormElement';\n\ntype CheckboxElementProps = Omit<FormElementProps<typeof Checkbox>, 'Element'> &\n ComponentProps<typeof Checkbox> & {\n name: string;\n inputLabel?: string;\n };\n\ntype CheckboxComponentProps = Omit<ComponentProps<typeof Checkbox>, 'label'> & {\n name: string;\n inputLabel?: ComponentProps<typeof Checkbox>['label'];\n};\n\nconst CheckboxComponent = forwardRef<HTMLInputElement, CheckboxComponentProps>(\n ({ inputLabel, ...props }, ref) => (\n <Checkbox ref={ref} {...props} label={inputLabel} />\n )\n);\nCheckboxComponent.displayName = 'CheckboxComponent';\n\nexport const CheckboxElement: FC<CheckboxElementProps> = ({\n autoComplete,\n ...props\n}) => (\n <FormElement\n Element={CheckboxComponent}\n id={props.name}\n data-testid={props.name}\n autoComplete={autoComplete}\n minLength={6}\n maxLength={255}\n {...props}\n />\n);\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { MultiSelect } from '../../Select/Multiselect';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<\n FormElementProps<typeof MultiSelect>,\n 'Element'\n> &\n ComponentProps<typeof MultiSelect> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const MultiSelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <MultiSelect\n onValueChange={field.onChange}\n values={field.value}\n {...props}\n >\n {children}\n </MultiSelect>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../../Select/Select';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SelectElementsProps = Omit<FormElementProps<typeof Select>, 'Element'> &\n ComponentProps<typeof Select> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SelectElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SelectElementsProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks, sonarjs/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <Select\n onValueChange={field.onChange}\n defaultValue={field.value}\n {...props}\n >\n {children}\n </Select>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport type { ComponentProps, ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { SwitchSelector } from '../../SwitchSelector';\nimport { Form } from '../Form';\nimport { useFormField } from '../FormField';\nimport { FormItemLayout } from '../layout/FormItemLayout';\nimport type { FormElementProps } from './FormElement';\n\ntype SwitchSelectorElementProps = Omit<\n FormElementProps<typeof SwitchSelector>,\n 'Element'\n> &\n ComponentProps<typeof SwitchSelector> & {\n name: string;\n description?: string;\n placeholder?: string;\n className?: string;\n children?: ReactNode;\n };\n\nexport const SwitchSelectorElement = ({\n name,\n description,\n label,\n isRequired,\n info,\n showErrorMessage,\n children,\n ...props\n}: SwitchSelectorElementProps) => {\n const { control } = useFormContext();\n\n return (\n <Form.Field\n control={control}\n name={name}\n render={({ field }) => {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const { error } = useFormField();\n\n return (\n <FormItemLayout\n htmlFor={name}\n label={label}\n description={description}\n isRequired={isRequired}\n info={info}\n showErrorMessage={showErrorMessage}\n aria-invalid={!!error}\n >\n <SwitchSelector {...field} {...props}>\n {children}\n </SwitchSelector>\n </FormItemLayout>\n );\n }}\n />\n );\n};\n","/* eslint-disable import/no-cycle */\nimport { Button } from '../Button';\nimport {\n FormElement,\n InputElement,\n InputPasswordElement,\n TextAreaElement,\n} from './elements';\nimport { CheckboxElement } from './elements/CheckboxElement';\nimport { EditableFieldInputElement } from './elements/EditableFieldInputElement';\nimport { EditableFieldTextAreaElement } from './elements/EditableFieldTextAreaElement';\nimport { MultiSelectElement } from './elements/MultiselectElement';\nimport { SelectElement } from './elements/SelectElement';\nimport { SwitchSelectorElement } from './elements/SwitchSelectorElement';\nimport { Form as FormRoot } from './FormBase';\nimport { FormControl } from './FormControl';\nimport { FormDescription } from './FormDescription';\nimport { FormField } from './FormField';\nimport { FormItem } from './FormItem';\nimport { FormMessage } from './FormMessage';\nimport { FormLabelLayout } from './layout';\n\ntype FormType = typeof FormRoot & {\n Description: typeof FormDescription;\n Control: typeof FormControl;\n Field: typeof FormField;\n Item: typeof FormItem;\n Label: typeof FormLabelLayout;\n Message: typeof FormMessage;\n Element: typeof FormElement;\n Button: typeof Button;\n Input: typeof InputElement;\n InputPassword: typeof InputPasswordElement;\n Checkbox: typeof CheckboxElement;\n TextArea: typeof TextAreaElement;\n MultiSelect: typeof MultiSelectElement;\n Select: typeof SelectElement;\n EditableFieldInput: typeof EditableFieldInputElement;\n EditableFieldTextArea: typeof EditableFieldTextAreaElement;\n SwitchSelector: typeof SwitchSelectorElement;\n};\n\n/**\n * Form components\n *\n * Example of usage:\n * ```jsx\n * <Form\n * schema={ZodSchema}\n * onSubmitSuccess={onSubmitSuccess}\n * onSubmitError={onSubmitError}\n * autoComplete\n * >\n * <Form.Input name=\"name\" label=\"Name\" />\n * <Form.Button type=\"submit\" label=\"Click to submit\">\n * Submit\n * </Form.Button>\n * </Form>\n * ```\n */\nexport const Form = FormRoot as FormType;\nForm.Description = FormDescription;\nForm.Control = FormControl;\nForm.Field = FormField;\nForm.Item = FormItem;\nForm.Label = FormLabelLayout;\nForm.Message = FormMessage;\nForm.Element = FormElement;\nForm.Input = InputElement;\nForm.InputPassword = InputPasswordElement;\nForm.Checkbox = CheckboxElement;\nForm.TextArea = TextAreaElement;\nForm.Button = Button;\nForm.Select = SelectElement;\nForm.MultiSelect = MultiSelectElement;\nForm.EditableFieldInput = EditableFieldInputElement;\nForm.EditableFieldTextArea = EditableFieldTextAreaElement;\nForm.SwitchSelector = SwitchSelectorElement;\n"],"names":["jsxs","jsx","FormRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAYO,MAAM,iBAA0C,CAAC;AAAA,EACtD;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A,gBACrB,cAAc,MAAM;AAAA,gBACnB,GAAG;AAAA,gBAEH;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAGN;AAAA,IAAA;AAAA,EAAA;AAGN;ACvCO,MAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAC1B,QAAA,EAAE,YAAY;AAGlB,SAAAA,kCAAA;AAAA,IAAC,KAAK;AAAA,IAAL;AAAA,MACC;AAAA,MACA;AAAA,MACA,QAAQ,CAAC,EAAE,YAAY;AAEf,cAAA,EAAE,UAAU;AAGhB,eAAAA,kCAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,gBAAc,CAAC,CAAC;AAAA,YAEhB,gDAAC,gBAAgB,EAAA,GAAG,OAAQ,GAAG,OAC5B,UACH;AAAA,UAAA;AAAA,QAAA;AAAA,MAGN;AAAA,IAAA;AAAA,EAAA;AAGN;ACCO,MAAM,OAAOC;AACpB,KAAK,cAAc;AACnB,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,OAAO;AACZ,KAAK,QAAQ;AACb,KAAK,UAAU;AACf,KAAK,UAAU;AACf,KAAK,QAAQ;AACb,KAAK,gBAAgB;AACrB,KAAK,WAAW;AAChB,KAAK,WAAW;AAChB,KAAK,SAAS;AACd,KAAK,SAAS;AACd,KAAK,cAAc;AACnB,KAAK,qBAAqB;AAC1B,KAAK,wBAAwB;AAC7B,KAAK,iBAAiB;"}
|
|
@@ -4,6 +4,7 @@ const jsxRuntime = require("../../../jsx-runtime-DvCoRj5u.cjs");
|
|
|
4
4
|
const components_Form_FormBase = require("../../Form/FormBase.cjs");
|
|
5
5
|
require("../../Form/FormField.cjs");
|
|
6
6
|
const components_Form_layout_FormItemLayout = require("../../../Form-DERuauvB.cjs");
|
|
7
|
+
const components_Auth_useUser_index = require("../useUser/index.cjs");
|
|
7
8
|
const components_Auth_ChangePasswordForm_ChangePasswordSchema = require("./ChangePasswordSchema.cjs");
|
|
8
9
|
const components_Auth_ChangePasswordForm_index_content = require("./index.content.cjs");
|
|
9
10
|
const ChangePasswordForm = ({
|
|
@@ -18,6 +19,7 @@ const ChangePasswordForm = ({
|
|
|
18
19
|
changePasswordButton,
|
|
19
20
|
backToHomeButton
|
|
20
21
|
} = components_Auth_ChangePasswordForm_index_content.getChangePasswordContent();
|
|
22
|
+
const { user } = components_Auth_useUser_index.useUser();
|
|
21
23
|
const ChangePasswordSchema = components_Auth_ChangePasswordForm_ChangePasswordSchema.getChangePasswordSchema();
|
|
22
24
|
const { form, isSubmitting, isSubmitted, isValid } = components_Form_FormBase.useForm(ChangePasswordSchema);
|
|
23
25
|
return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(
|
|
@@ -31,6 +33,18 @@ const ChangePasswordForm = ({
|
|
|
31
33
|
...form,
|
|
32
34
|
children: [
|
|
33
35
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-y-6", children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
37
|
+
components_Form_layout_FormItemLayout.Form.Input,
|
|
38
|
+
{
|
|
39
|
+
type: "text",
|
|
40
|
+
name: "email",
|
|
41
|
+
value: user?.email ?? "",
|
|
42
|
+
autoComplete: "username email",
|
|
43
|
+
disabled: true,
|
|
44
|
+
hidden: true,
|
|
45
|
+
className: "hidden"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
34
48
|
/* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
|
|
35
49
|
components_Form_layout_FormItemLayout.Form.InputPassword,
|
|
36
50
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getChangePasswordContent","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.cjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const { user } = useUser();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["getChangePasswordContent","useUser","getChangePasswordSchema","useForm","jsxs","Form","jsx"],"mappings":";;;;;;;;;AAeO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACEA,iDAAyB,yBAAA;AACvB,QAAA,EAAE,SAASC,8BAAAA;AACjB,QAAM,uBAAuBC,wDAAAA;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvCC,yBAAAA,QAAQ,oBAAoB;AAG5B,SAAAC,2BAAA,kBAAA;AAAA,IAACC,sCAAA;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MACT,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACD,2BAAAA,kBAAAA,KAAA,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,UAAAE,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,MAAK;AAAA,cACL,OAAO,MAAM,SAAS;AAAA,cACtB,cAAa;AAAA,cACb,UAAQ;AAAA,cACR,QAAM;AAAA,cACN,WAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,iBAAiB;AAAA,cACxB,aAAa,iBAAiB;AAAA,cAC9B,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,UACAC,2BAAA,kBAAA;AAAA,YAACD,sCAAAA,KAAK;AAAA,YAAL;AAAA,cACC,MAAK;AAAA,cACL,OAAO,qBAAqB;AAAA,cAC5B,aAAa,qBAAqB;AAAA,cAClC,cAAa;AAAA,cACb,YAAU;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GACF;AAAA,QAEAC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,OAAM;AAAA,YACN,WAAW;AAAA,YACX,UAAU,CAAC;AAAA,YACX,SAAS,cAAc,YAAY;AAAA,YACnC,OAAO,qBAAqB;AAAA,YAE3B,UAAqB,qBAAA;AAAA,UAAA;AAAA,QACxB;AAAA,QACC,eACCC,2BAAA,kBAAA;AAAA,UAACD,sCAAAA,KAAK;AAAA,UAAL;AAAA,YACC,WAAU;AAAA,YACV,OAAO,iBAAiB;AAAA,YACxB,SAAS;AAAA,YAER,UAAiB,iBAAA;AAAA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAGhC,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAkF1D,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
|
|
2
2
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
3
3
|
import "../../Form/FormField.mjs";
|
|
4
|
-
import { F as Form } from "../../../Form-
|
|
4
|
+
import { F as Form } from "../../../Form-CQpKjeW6.js";
|
|
5
|
+
import { useUser } from "../useUser/index.mjs";
|
|
5
6
|
import { getChangePasswordSchema } from "./ChangePasswordSchema.mjs";
|
|
6
7
|
import { getChangePasswordContent } from "./index.content.mjs";
|
|
7
8
|
const ChangePasswordForm = ({
|
|
@@ -16,6 +17,7 @@ const ChangePasswordForm = ({
|
|
|
16
17
|
changePasswordButton,
|
|
17
18
|
backToHomeButton
|
|
18
19
|
} = getChangePasswordContent();
|
|
20
|
+
const { user } = useUser();
|
|
19
21
|
const ChangePasswordSchema = getChangePasswordSchema();
|
|
20
22
|
const { form, isSubmitting, isSubmitted, isValid } = useForm(ChangePasswordSchema);
|
|
21
23
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
@@ -29,6 +31,18 @@ const ChangePasswordForm = ({
|
|
|
29
31
|
...form,
|
|
30
32
|
children: [
|
|
31
33
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-y-6", children: [
|
|
34
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
35
|
+
Form.Input,
|
|
36
|
+
{
|
|
37
|
+
type: "text",
|
|
38
|
+
name: "email",
|
|
39
|
+
value: user?.email ?? "",
|
|
40
|
+
autoComplete: "username email",
|
|
41
|
+
disabled: true,
|
|
42
|
+
hidden: true,
|
|
43
|
+
className: "hidden"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
32
46
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33
47
|
Form.InputPassword,
|
|
34
48
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.mjs","sources":["../../../../src/components/Auth/ChangePasswordForm/ChangePasswordForm.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Form, useForm } from '../../Form';\nimport { useUser } from '../useUser';\nimport {\n getChangePasswordSchema,\n type ChangePassword,\n} from './ChangePasswordSchema';\nimport { getChangePasswordContent } from './index.content';\n\ntype ChangePasswordFormProps = {\n onSubmitSuccess: (data: ChangePassword) => Promise<void>;\n onClickBackToHome: () => void;\n onSubmitError?: (error: Error) => void;\n};\n\nexport const ChangePasswordForm: FC<ChangePasswordFormProps> = ({\n onSubmitSuccess,\n onSubmitError,\n onClickBackToHome,\n}) => {\n const {\n currentPasswordInput,\n newPasswordInput,\n confirmPasswordInput,\n changePasswordButton,\n backToHomeButton,\n } = getChangePasswordContent();\n const { user } = useUser();\n const ChangePasswordSchema = getChangePasswordSchema();\n\n const { form, isSubmitting, isSubmitted, isValid } =\n useForm(ChangePasswordSchema);\n\n return (\n <Form\n schema={ChangePasswordSchema}\n onSubmitSuccess={onSubmitSuccess}\n onSubmitError={onSubmitError}\n autoComplete\n className=\"gap-y-0\"\n {...form}\n >\n <div className=\"flex flex-col gap-y-6\">\n <Form.Input\n type=\"text\"\n name=\"email\"\n value={user?.email ?? ''}\n autoComplete=\"username email\"\n disabled\n hidden\n className=\"hidden\"\n />\n <Form.InputPassword\n name=\"currentPassword\"\n label={currentPasswordInput.label}\n placeholder={currentPasswordInput.placeholder}\n autoComplete=\"current-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPassword\"\n label={newPasswordInput.label}\n placeholder={newPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n <Form.InputPassword\n name=\"newPasswordConfirmation\"\n label={confirmPasswordInput.label}\n placeholder={confirmPasswordInput.placeholder}\n autoComplete=\"new-password\"\n isRequired\n />\n </div>\n\n <Form.Button\n className=\"mt-12 w-full\"\n type=\"submit\"\n color=\"text\"\n isLoading={isSubmitting}\n disabled={!isValid}\n variant={isSubmitted ? 'outline' : 'default'}\n label={changePasswordButton.ariaLabel}\n >\n {changePasswordButton.text}\n </Form.Button>\n {isSubmitted && (\n <Form.Button\n className=\"mt-4 w-full\"\n label={backToHomeButton.ariaLabel}\n onClick={onClickBackToHome}\n >\n {backToHomeButton.text}\n </Form.Button>\n )}\n </Form>\n );\n};\n"],"names":["jsxs","jsx"],"mappings":";;;;;;;AAeO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACE,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,yBAAyB;AACvB,QAAA,EAAE,SAAS;AACjB,QAAM,uBAAuB;AAE7B,QAAM,EAAE,MAAM,cAAc,aAAa,YACvC,QAAQ,oBAAoB;AAG5B,SAAAA,kCAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,cAAY;AAAA,MACZ,WAAU;AAAA,MAC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AA,UAAA;AAAA,QACpB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
|
|
@@ -3,7 +3,7 @@ import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
|
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
4
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
5
5
|
import "../../Form/FormField.mjs";
|
|
6
|
-
import { F as Form } from "../../../Form-
|
|
6
|
+
import { F as Form } from "../../../Form-CQpKjeW6.js";
|
|
7
7
|
import { getResetPasswordContent } from "./index.content.mjs";
|
|
8
8
|
import { getResetPasswordSchema } from "./ResetPasswordSchema.mjs";
|
|
9
9
|
const ResetPasswordForm = ({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
|
|
3
3
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
4
4
|
import "../../Form/FormField.mjs";
|
|
5
|
-
import { F as Form } from "../../../Form-
|
|
5
|
+
import { F as Form } from "../../../Form-CQpKjeW6.js";
|
|
6
6
|
import { ExternalsLoginButtons } from "../ExternalsLoginButtons/ExternalsLoginButtons.mjs";
|
|
7
7
|
import { getSignInContent } from "./index.content.mjs";
|
|
8
8
|
import { getSignInSchema } from "./SignInSchema.mjs";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as jsxRuntimeExports } from "../../../jsx-runtime-BgSF1HG2.js";
|
|
3
3
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
4
4
|
import "../../Form/FormField.mjs";
|
|
5
|
-
import { F as Form } from "../../../Form-
|
|
5
|
+
import { F as Form } from "../../../Form-CQpKjeW6.js";
|
|
6
6
|
import { getSignUpContent } from "./index.content.mjs";
|
|
7
7
|
import { getSignUpSchema } from "./SignUpSchema.mjs";
|
|
8
8
|
const SignUpForm = ({
|
|
@@ -4,8 +4,8 @@ import { ButtonHTMLAttributes, DetailedHTMLProps, FC } from 'react';
|
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
5
|
size?: "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg" | "icon-xl" | null | undefined;
|
|
6
6
|
variant?: "default" | "link" | "none" | "outline" | "invisible-link" | "hoverable" | null | undefined;
|
|
7
|
-
color?: "
|
|
8
|
-
textAlign?: "left" | "
|
|
7
|
+
color?: "text" | "error" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark" | "text-inverse" | "success" | "custom" | null | undefined;
|
|
8
|
+
textAlign?: "left" | "right" | "center" | null | undefined;
|
|
9
9
|
isFullWidth?: boolean | null | undefined;
|
|
10
10
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
11
11
|
export type ButtonProps = DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|