new-sales-page-component 0.0.1 → 0.0.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/index.d.mts +19 -1
- package/dist/index.d.ts +19 -1
- package/dist/index.js +469 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +477 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -5
package/dist/index.d.mts
CHANGED
|
@@ -42,6 +42,24 @@ interface IEmployment {
|
|
|
42
42
|
sourceOfIncome?: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
interface AddressProps {
|
|
46
|
+
value?: IAddress;
|
|
47
|
+
onChange?: (value: IAddress) => void;
|
|
48
|
+
}
|
|
49
|
+
declare const Address: ({ value, onChange }: AddressProps) => react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface PersonalInfoProps {
|
|
52
|
+
value?: IPersonalInfo;
|
|
53
|
+
onChange?: (value: IPersonalInfo) => void;
|
|
54
|
+
}
|
|
55
|
+
declare const PersonalInfo: ({ value, onChange }: PersonalInfoProps) => react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
interface EmploymentProps {
|
|
58
|
+
value?: IEmployment;
|
|
59
|
+
onChange?: (value: IEmployment) => void;
|
|
60
|
+
}
|
|
61
|
+
declare const Employment: ({ value }: EmploymentProps) => react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
45
63
|
interface FloatingLabelInputProps extends InputProps {
|
|
46
64
|
label: React.ReactNode;
|
|
47
65
|
value?: string;
|
|
@@ -50,4 +68,4 @@ interface FloatingLabelInputProps extends InputProps {
|
|
|
50
68
|
}
|
|
51
69
|
declare const FloatingLabelInput: (props: FloatingLabelInputProps) => react_jsx_runtime.JSX.Element;
|
|
52
70
|
|
|
53
|
-
export { FloatingLabelInput, type IAddress, type IEmployment, type IPersonalInfo };
|
|
71
|
+
export { Address, Employment, FloatingLabelInput, type IAddress, type IEmployment, type IPersonalInfo, PersonalInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,24 @@ interface IEmployment {
|
|
|
42
42
|
sourceOfIncome?: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
interface AddressProps {
|
|
46
|
+
value?: IAddress;
|
|
47
|
+
onChange?: (value: IAddress) => void;
|
|
48
|
+
}
|
|
49
|
+
declare const Address: ({ value, onChange }: AddressProps) => react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface PersonalInfoProps {
|
|
52
|
+
value?: IPersonalInfo;
|
|
53
|
+
onChange?: (value: IPersonalInfo) => void;
|
|
54
|
+
}
|
|
55
|
+
declare const PersonalInfo: ({ value, onChange }: PersonalInfoProps) => react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
interface EmploymentProps {
|
|
58
|
+
value?: IEmployment;
|
|
59
|
+
onChange?: (value: IEmployment) => void;
|
|
60
|
+
}
|
|
61
|
+
declare const Employment: ({ value }: EmploymentProps) => react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
45
63
|
interface FloatingLabelInputProps extends InputProps {
|
|
46
64
|
label: React.ReactNode;
|
|
47
65
|
value?: string;
|
|
@@ -50,4 +68,4 @@ interface FloatingLabelInputProps extends InputProps {
|
|
|
50
68
|
}
|
|
51
69
|
declare const FloatingLabelInput: (props: FloatingLabelInputProps) => react_jsx_runtime.JSX.Element;
|
|
52
70
|
|
|
53
|
-
export { FloatingLabelInput, type IAddress, type IEmployment, type IPersonalInfo };
|
|
71
|
+
export { Address, Employment, FloatingLabelInput, type IAddress, type IEmployment, type IPersonalInfo, PersonalInfo };
|
package/dist/index.js
CHANGED
|
@@ -20,14 +20,17 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
23
|
+
Address: () => Address_default,
|
|
24
|
+
Employment: () => Employment_default,
|
|
25
|
+
FloatingLabelInput: () => FloatingLabelInput,
|
|
26
|
+
PersonalInfo: () => PersonalInfo_default
|
|
24
27
|
});
|
|
25
28
|
module.exports = __toCommonJS(index_exports);
|
|
26
29
|
|
|
27
|
-
// src/NewSaleForm/
|
|
30
|
+
// src/NewSaleForm/Address.tsx
|
|
28
31
|
var import_react3 = require("@chakra-ui/react");
|
|
29
|
-
var import_react4 = require("react");
|
|
30
32
|
var import_st_peter_ui = require("st-peter-ui");
|
|
33
|
+
var import_react4 = require("react");
|
|
31
34
|
|
|
32
35
|
// src/NewSaleForm/ui/floating-label-input.tsx
|
|
33
36
|
var import_react = require("react");
|
|
@@ -82,21 +85,10 @@ var floatingStyles = (0, import_react2.defineStyle)({
|
|
|
82
85
|
color: "fg"
|
|
83
86
|
}
|
|
84
87
|
});
|
|
85
|
-
|
|
86
|
-
// src/NewSaleForm/PersonalInfo.tsx
|
|
87
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
88
|
-
|
|
89
|
-
// src/NewSaleForm/Employment.tsx
|
|
90
|
-
var import_st_peter_ui2 = require("st-peter-ui");
|
|
91
|
-
var import_react5 = require("react");
|
|
92
|
-
var import_react6 = require("@chakra-ui/react");
|
|
93
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
88
|
+
var floating_label_input_default = FloatingLabelInput;
|
|
94
89
|
|
|
95
90
|
// src/NewSaleForm/Address.tsx
|
|
96
|
-
var
|
|
97
|
-
var import_st_peter_ui3 = require("st-peter-ui");
|
|
98
|
-
var import_react8 = require("react");
|
|
99
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
91
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
100
92
|
var provinceOptions = [
|
|
101
93
|
"Abra",
|
|
102
94
|
"Agusan del Norte",
|
|
@@ -196,23 +188,470 @@ var cityOptions = [
|
|
|
196
188
|
].map((city) => ({ label: city, value: city }));
|
|
197
189
|
var districtOptions = cityOptions;
|
|
198
190
|
var barangayOptions = cityOptions;
|
|
199
|
-
var provinceCollection = (0,
|
|
200
|
-
var cityCollection = (0,
|
|
201
|
-
var districtCollection = (0,
|
|
202
|
-
var barangayCollection = (0,
|
|
191
|
+
var provinceCollection = (0, import_react3.createListCollection)({ items: provinceOptions });
|
|
192
|
+
var cityCollection = (0, import_react3.createListCollection)({ items: cityOptions });
|
|
193
|
+
var districtCollection = (0, import_react3.createListCollection)({ items: districtOptions });
|
|
194
|
+
var barangayCollection = (0, import_react3.createListCollection)({ items: barangayOptions });
|
|
195
|
+
var Address = ({ value, onChange }) => {
|
|
196
|
+
const [form, setForm] = (0, import_react4.useState)({
|
|
197
|
+
lot: value?.lot ?? "",
|
|
198
|
+
street: value?.street ?? "",
|
|
199
|
+
city: value?.city ?? "",
|
|
200
|
+
province: value?.province ?? "",
|
|
201
|
+
district: value?.district ?? "",
|
|
202
|
+
barangay: value?.barangay ?? ""
|
|
203
|
+
});
|
|
204
|
+
const update = (next) => {
|
|
205
|
+
setForm(next);
|
|
206
|
+
onChange?.(next);
|
|
207
|
+
};
|
|
208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.VStack, { align: "stretch", gap: 4, mb: 4, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Box, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_st_peter_ui.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Span, { fontWeight: "bold", children: "Residential Address" }) }) }) }),
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react3.SimpleGrid, { columns: { base: 1, md: 2 }, gap: 4, children: [
|
|
211
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
212
|
+
floating_label_input_default,
|
|
213
|
+
{
|
|
214
|
+
id: "lotNumber",
|
|
215
|
+
label: "Lot #",
|
|
216
|
+
value: form.lot ?? "",
|
|
217
|
+
onChange: (e) => update({ ...form, lot: e.target.value })
|
|
218
|
+
}
|
|
219
|
+
) }),
|
|
220
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
221
|
+
floating_label_input_default,
|
|
222
|
+
{
|
|
223
|
+
id: "street",
|
|
224
|
+
label: "Street",
|
|
225
|
+
value: form.street ?? "",
|
|
226
|
+
onChange: (e) => update({ ...form, street: e.target.value })
|
|
227
|
+
}
|
|
228
|
+
) }),
|
|
229
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
230
|
+
import_react3.Select.Root,
|
|
231
|
+
{
|
|
232
|
+
value: form.province ? [form.province] : [],
|
|
233
|
+
onValueChange: (details) => update({ ...form, province: details.value[0] ?? "" }),
|
|
234
|
+
collection: provinceCollection,
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.HiddenSelect, {}),
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.ValueText, { placeholder: "Select Province" }) }) }),
|
|
238
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Content, { children: provinceCollection.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Item, { item, children: item.label }, item.value)) }) }) })
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
),
|
|
242
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
243
|
+
import_react3.Select.Root,
|
|
244
|
+
{
|
|
245
|
+
value: form.city ? [form.city] : [],
|
|
246
|
+
onValueChange: (details) => update({ ...form, city: details.value[0] ?? "" }),
|
|
247
|
+
collection: cityCollection,
|
|
248
|
+
children: [
|
|
249
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.HiddenSelect, {}),
|
|
250
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.ValueText, { placeholder: "Select City" }) }) }),
|
|
251
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Content, { children: cityCollection.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Item, { item, children: item.label }, item.value)) }) }) })
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
),
|
|
255
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
256
|
+
import_react3.Select.Root,
|
|
257
|
+
{
|
|
258
|
+
value: form.district ? [form.district] : [],
|
|
259
|
+
onValueChange: (details) => update({ ...form, district: details.value[0] ?? "" }),
|
|
260
|
+
collection: districtCollection,
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.HiddenSelect, {}),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.ValueText, { placeholder: "Select District" }) }) }),
|
|
264
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Content, { children: districtCollection.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Item, { item, children: item.label }, item.value)) }) }) })
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
269
|
+
import_react3.Select.Root,
|
|
270
|
+
{
|
|
271
|
+
value: form.barangay ? [form.barangay] : [],
|
|
272
|
+
onValueChange: (details) => update({ ...form, barangay: details.value[0] ?? "" }),
|
|
273
|
+
collection: barangayCollection,
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.HiddenSelect, {}),
|
|
276
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.ValueText, { placeholder: "Select Barangay" }) }) }),
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Content, { children: barangayCollection.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.Select.Item, { item, children: item.label }, item.value)) }) }) })
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] })
|
|
282
|
+
] });
|
|
283
|
+
};
|
|
284
|
+
var Address_default = Address;
|
|
203
285
|
|
|
204
|
-
// src/NewSaleForm/
|
|
205
|
-
var
|
|
206
|
-
var
|
|
207
|
-
var
|
|
208
|
-
var
|
|
209
|
-
var
|
|
210
|
-
|
|
286
|
+
// src/NewSaleForm/PersonalInfo.tsx
|
|
287
|
+
var import_react5 = require("@chakra-ui/react");
|
|
288
|
+
var import_react6 = require("react");
|
|
289
|
+
var import_st_peter_ui2 = require("st-peter-ui");
|
|
290
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
291
|
+
var PersonalInfo = ({ value, onChange }) => {
|
|
292
|
+
const idCollection = (0, import_react5.createListCollection)({
|
|
293
|
+
items: [
|
|
294
|
+
{ label: "Passport", value: "passport" },
|
|
295
|
+
{ label: "Driver's License", value: "driver_license" },
|
|
296
|
+
{ label: "Philippine Identification Card", value: "national_id" }
|
|
297
|
+
]
|
|
298
|
+
});
|
|
299
|
+
const [formData, setFormData] = (0, import_react6.useState)({
|
|
300
|
+
firstName: value?.firstName ?? "",
|
|
301
|
+
middleName: value?.middleName ?? "",
|
|
302
|
+
lastName: value?.lastName ?? "",
|
|
303
|
+
suffix: value?.suffix ?? "",
|
|
304
|
+
birthDate: value?.birthDate ?? "",
|
|
305
|
+
idType: value?.idType ?? "",
|
|
306
|
+
idNumber: value?.idNumber ?? "",
|
|
307
|
+
height: value?.height ?? 0,
|
|
308
|
+
weight: value?.weight ?? 0,
|
|
309
|
+
gender: value?.gender ?? "",
|
|
310
|
+
civilStatus: value?.civilStatus ?? "",
|
|
311
|
+
nationality: value?.nationality ?? "",
|
|
312
|
+
mobileNumber: value?.mobileNumber ?? "",
|
|
313
|
+
emailAddress: value?.emailAddress ?? "",
|
|
314
|
+
mailingAddress: value?.mailingAddress ?? "",
|
|
315
|
+
landLineNumber: value?.landLineNumber ?? ""
|
|
316
|
+
// addressLine1: initialData?.addressLine1 ?? "",
|
|
317
|
+
});
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.VStack, { mb: 4, align: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_st_peter_ui2.Body, { fontWeight: "bold", children: "Identification" }) }),
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.VStack, { gap: 6, align: "stretch", w: "full", children: [
|
|
321
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
322
|
+
import_react5.Select.Root,
|
|
323
|
+
{
|
|
324
|
+
collection: idCollection,
|
|
325
|
+
value: formData.idType ? [formData.idType] : [],
|
|
326
|
+
onValueChange: (details) => setFormData({ ...formData, idType: details.value[0] ?? "" }),
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.HiddenSelect, {}),
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Control, { children: [
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Trigger, { children: [
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ValueText, { placeholder: "Select ID Type" }),
|
|
332
|
+
formData.idType && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Box, { fontSize: "sm", color: "fg.default", hidden: true, children: idCollection.items.find(
|
|
333
|
+
(item) => item.value === formData.idType
|
|
334
|
+
)?.label })
|
|
335
|
+
] }),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.IndicatorGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Indicator, {}) })
|
|
337
|
+
] }),
|
|
338
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Content, { children: idCollection.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Item, { item, children: item.label }, item.value)) }) })
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
) }),
|
|
342
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Separator, {}),
|
|
343
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_st_peter_ui2.Body, { fontWeight: "bold", children: "Full Name" }),
|
|
344
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: [
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
346
|
+
floating_label_input_default,
|
|
347
|
+
{
|
|
348
|
+
id: "lastName",
|
|
349
|
+
type: "text",
|
|
350
|
+
label: "Last Name",
|
|
351
|
+
value: formData.lastName || ""
|
|
352
|
+
}
|
|
353
|
+
) }),
|
|
354
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
355
|
+
floating_label_input_default,
|
|
356
|
+
{
|
|
357
|
+
id: "firstName",
|
|
358
|
+
type: "text",
|
|
359
|
+
label: "First Name",
|
|
360
|
+
value: formData.firstName || ""
|
|
361
|
+
}
|
|
362
|
+
) })
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: [
|
|
365
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
366
|
+
floating_label_input_default,
|
|
367
|
+
{
|
|
368
|
+
id: "middleName",
|
|
369
|
+
type: "text",
|
|
370
|
+
label: "Middle Name",
|
|
371
|
+
value: formData.middleName || ""
|
|
372
|
+
}
|
|
373
|
+
) }),
|
|
374
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
375
|
+
floating_label_input_default,
|
|
376
|
+
{
|
|
377
|
+
id: "suffix",
|
|
378
|
+
type: "text",
|
|
379
|
+
label: "Suffix (Optional)",
|
|
380
|
+
value: formData.suffix || ""
|
|
381
|
+
}
|
|
382
|
+
) })
|
|
383
|
+
] }),
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Separator, {}),
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_st_peter_ui2.Body, { fontWeight: "bold", children: "Personal Details" }),
|
|
386
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: [
|
|
387
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Field.Root, { children: [
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Label, { children: "Date of Birth" }),
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
390
|
+
import_react5.Input,
|
|
391
|
+
{
|
|
392
|
+
id: "dateOfBirth",
|
|
393
|
+
type: "date",
|
|
394
|
+
value: formData.birthDate || "",
|
|
395
|
+
onChange: (e) => setFormData({ ...formData, birthDate: e.target.value })
|
|
396
|
+
}
|
|
397
|
+
)
|
|
398
|
+
] }),
|
|
399
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Field.Root, { children: [
|
|
400
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Label, { children: "Date of Neutralization" }),
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Input, { id: "dateOfNeutralization", type: "date" })
|
|
402
|
+
] }),
|
|
403
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
404
|
+
floating_label_input_default,
|
|
405
|
+
{
|
|
406
|
+
id: "height",
|
|
407
|
+
label: "Height (ft)",
|
|
408
|
+
onChange: (e) => setFormData({ ...formData, height: parseFloat(e.target.value) })
|
|
409
|
+
}
|
|
410
|
+
) }),
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
412
|
+
floating_label_input_default,
|
|
413
|
+
{
|
|
414
|
+
id: "weight",
|
|
415
|
+
label: "Weight (lbs)",
|
|
416
|
+
onChange: (e) => setFormData({ ...formData, weight: parseFloat(e.target.value) })
|
|
417
|
+
}
|
|
418
|
+
) })
|
|
419
|
+
] }),
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Separator, {}),
|
|
421
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_st_peter_ui2.Body, { fontWeight: "bold", children: "Demographics" }),
|
|
422
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2 , 1fr)" }, gap: 8, children: [
|
|
423
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
424
|
+
import_react5.Select.Root,
|
|
425
|
+
{
|
|
426
|
+
collection: (0, import_react5.createListCollection)({
|
|
427
|
+
items: [
|
|
428
|
+
{ label: "Male", value: "male" },
|
|
429
|
+
{ label: "Female", value: "female" }
|
|
430
|
+
]
|
|
431
|
+
}),
|
|
432
|
+
children: [
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.HiddenSelect, { id: "gender" }),
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Control, { children: [
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ValueText, { placeholder: "Gender" }) }),
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.IndicatorGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Indicator, {}) })
|
|
437
|
+
] }),
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Content, { children: (0, import_react5.createListCollection)({
|
|
439
|
+
items: [
|
|
440
|
+
{ label: "Male", value: "male" },
|
|
441
|
+
{ label: "Female", value: "female" }
|
|
442
|
+
]
|
|
443
|
+
}).items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Item, { item, children: item.label }, item.value)) }) })
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
) }),
|
|
447
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
448
|
+
import_react5.Select.Root,
|
|
449
|
+
{
|
|
450
|
+
collection: (0, import_react5.createListCollection)({
|
|
451
|
+
items: [
|
|
452
|
+
{ label: "Single", value: "single" },
|
|
453
|
+
{ label: "Married", value: "married" },
|
|
454
|
+
{ label: "Widowed", value: "widowed" },
|
|
455
|
+
{ label: "Divorced", value: "divorced" },
|
|
456
|
+
{ label: "Separated", value: "separated" },
|
|
457
|
+
{ label: "Annulled", value: "annulled" }
|
|
458
|
+
]
|
|
459
|
+
}),
|
|
460
|
+
children: [
|
|
461
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.HiddenSelect, { id: "civilStatus" }),
|
|
462
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Select.Control, { children: [
|
|
463
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.ValueText, { placeholder: "Civil Status" }) }),
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.IndicatorGroup, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Indicator, {}) })
|
|
465
|
+
] }),
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Content, { children: (0, import_react5.createListCollection)({
|
|
467
|
+
items: [
|
|
468
|
+
{ label: "Single", value: "single" },
|
|
469
|
+
{ label: "Married", value: "married" },
|
|
470
|
+
{ label: "Widowed", value: "widowed" },
|
|
471
|
+
{ label: "Divorced", value: "divorced" },
|
|
472
|
+
{ label: "Separated", value: "separated" },
|
|
473
|
+
{ label: "Annulled", value: "annulled" }
|
|
474
|
+
]
|
|
475
|
+
}).items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Select.Item, { item, children: item.label }, item.value)) }) })
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
) }),
|
|
479
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
480
|
+
floating_label_input_default,
|
|
481
|
+
{
|
|
482
|
+
id: "nationality",
|
|
483
|
+
type: "text",
|
|
484
|
+
label: "Nationality",
|
|
485
|
+
onChange: (e) => setFormData({ ...formData, nationality: e.target.value })
|
|
486
|
+
}
|
|
487
|
+
) })
|
|
488
|
+
] }),
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Separator, {}),
|
|
490
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_st_peter_ui2.Body, { fontWeight: "bold", children: "Contact Information" }),
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: [
|
|
492
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
493
|
+
floating_label_input_default,
|
|
494
|
+
{
|
|
495
|
+
id: "mobileNumber",
|
|
496
|
+
type: "text",
|
|
497
|
+
label: "Mobile Number",
|
|
498
|
+
onChange: (e) => setFormData({ ...formData, mobileNumber: e.target.value })
|
|
499
|
+
}
|
|
500
|
+
) }),
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
502
|
+
floating_label_input_default,
|
|
503
|
+
{
|
|
504
|
+
id: "landlineNumber",
|
|
505
|
+
type: "text",
|
|
506
|
+
label: "Landline Number",
|
|
507
|
+
onChange: (e) => setFormData({ ...formData, landLineNumber: e.target.value })
|
|
508
|
+
}
|
|
509
|
+
) })
|
|
510
|
+
] }),
|
|
511
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: [
|
|
512
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
513
|
+
floating_label_input_default,
|
|
514
|
+
{
|
|
515
|
+
id: "email",
|
|
516
|
+
type: "email",
|
|
517
|
+
label: "Email Address",
|
|
518
|
+
onChange: (e) => setFormData({ ...formData, emailAddress: e.target.value })
|
|
519
|
+
}
|
|
520
|
+
) }),
|
|
521
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
522
|
+
floating_label_input_default,
|
|
523
|
+
{
|
|
524
|
+
id: "mailingAddress",
|
|
525
|
+
type: "text",
|
|
526
|
+
label: "Mailing Address",
|
|
527
|
+
onChange: (e) => setFormData({ ...formData, mailingAddress: e.target.value })
|
|
528
|
+
}
|
|
529
|
+
) })
|
|
530
|
+
] }),
|
|
531
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Separator, {}),
|
|
532
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Grid, { templateColumns: { base: "1fr", md: "repeat(2, 1fr)" }, gap: 8, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react5.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
533
|
+
floating_label_input_default,
|
|
534
|
+
{
|
|
535
|
+
id: "insurability",
|
|
536
|
+
type: "text",
|
|
537
|
+
label: "Insurability",
|
|
538
|
+
value: "Insurable",
|
|
539
|
+
readOnly: true
|
|
540
|
+
}
|
|
541
|
+
) }) })
|
|
542
|
+
] })
|
|
543
|
+
] });
|
|
544
|
+
};
|
|
545
|
+
var PersonalInfo_default = PersonalInfo;
|
|
211
546
|
|
|
212
|
-
// src/NewSaleForm/
|
|
213
|
-
var
|
|
547
|
+
// src/NewSaleForm/Employment.tsx
|
|
548
|
+
var import_st_peter_ui3 = require("st-peter-ui");
|
|
549
|
+
var import_react7 = require("react");
|
|
550
|
+
var import_react8 = require("@chakra-ui/react");
|
|
551
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
552
|
+
var Employment = ({ value }) => {
|
|
553
|
+
const [formData, setFormData] = (0, import_react7.useState)({
|
|
554
|
+
occupation: value?.occupation ?? "",
|
|
555
|
+
employerName: value?.employerName ?? "",
|
|
556
|
+
employmentStatus: value?.employmentStatus ?? "",
|
|
557
|
+
officeAddress: value?.officeAddress ?? "",
|
|
558
|
+
TIN: value?.TIN ?? "",
|
|
559
|
+
SSS: value?.SSS ?? "",
|
|
560
|
+
sourceOfIncome: value?.sourceOfIncome ?? ""
|
|
561
|
+
});
|
|
562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
563
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.VStack, { align: "stretch", gap: 4, mb: 4, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_st_peter_ui3.Body, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Span, { fontWeight: "bold", children: "Employment" }) }) }),
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.SimpleGrid, { columns: { base: 1, md: 2 }, gap: 4, mb: 4, children: [
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
566
|
+
floating_label_input_default,
|
|
567
|
+
{
|
|
568
|
+
id: "occupation",
|
|
569
|
+
label: "Occupation",
|
|
570
|
+
value: formData.occupation ?? "",
|
|
571
|
+
onChange: (e) => {
|
|
572
|
+
setFormData({ ...formData, occupation: e.target.value });
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
) }),
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
577
|
+
floating_label_input_default,
|
|
578
|
+
{
|
|
579
|
+
id: "employerName",
|
|
580
|
+
label: "Employer Name",
|
|
581
|
+
value: formData.employerName ?? "",
|
|
582
|
+
onChange: (e) => {
|
|
583
|
+
setFormData({ ...formData, employerName: e.target.value });
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
) })
|
|
587
|
+
] }),
|
|
588
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.SimpleGrid, { columns: { base: 1, md: 2 }, gap: 4, mb: 4, children: [
|
|
589
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
590
|
+
floating_label_input_default,
|
|
591
|
+
{
|
|
592
|
+
id: "employmentStatus",
|
|
593
|
+
label: "Employment Status",
|
|
594
|
+
value: formData.employmentStatus ?? "",
|
|
595
|
+
onChange: (e) => {
|
|
596
|
+
setFormData({ ...formData, employmentStatus: e.target.value });
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
) }),
|
|
600
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
601
|
+
floating_label_input_default,
|
|
602
|
+
{
|
|
603
|
+
id: "officeAddress",
|
|
604
|
+
label: "Office Address",
|
|
605
|
+
value: formData.officeAddress ?? "",
|
|
606
|
+
onChange: (e) => {
|
|
607
|
+
setFormData({ ...formData, officeAddress: e.target.value });
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
) })
|
|
611
|
+
] }),
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_react8.SimpleGrid, { columns: { base: 1, md: 2 }, gap: 4, mb: 4, children: [
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
614
|
+
floating_label_input_default,
|
|
615
|
+
{
|
|
616
|
+
id: "tin",
|
|
617
|
+
label: "TIN",
|
|
618
|
+
value: formData.TIN ?? "",
|
|
619
|
+
onChange: (e) => {
|
|
620
|
+
setFormData({ ...formData, TIN: e.target.value });
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
) }),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
625
|
+
floating_label_input_default,
|
|
626
|
+
{
|
|
627
|
+
id: "sssGsis",
|
|
628
|
+
label: "SSS",
|
|
629
|
+
value: formData.SSS ?? "",
|
|
630
|
+
onChange: (e) => {
|
|
631
|
+
setFormData({ ...formData, SSS: e.target.value });
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
) })
|
|
635
|
+
] }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.SimpleGrid, { columns: { base: 1, md: 2 }, gap: 4, mb: 4, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react8.Field.Root, { w: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
637
|
+
floating_label_input_default,
|
|
638
|
+
{
|
|
639
|
+
id: "otherSourceOfFund",
|
|
640
|
+
label: "Other Source of Fund",
|
|
641
|
+
value: formData.sourceOfIncome ?? "",
|
|
642
|
+
onChange: (e) => {
|
|
643
|
+
setFormData({ ...formData, sourceOfIncome: e.target.value });
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
) }) })
|
|
647
|
+
] });
|
|
648
|
+
};
|
|
649
|
+
var Employment_default = Employment;
|
|
214
650
|
// Annotate the CommonJS export names for ESM import in node:
|
|
215
651
|
0 && (module.exports = {
|
|
216
|
-
|
|
652
|
+
Address,
|
|
653
|
+
Employment,
|
|
654
|
+
FloatingLabelInput,
|
|
655
|
+
PersonalInfo
|
|
217
656
|
});
|
|
218
657
|
//# sourceMappingURL=index.js.map
|