@splpi/estore-shared-components 0.0.2 → 0.0.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/index.d.mts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +51 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -227,8 +227,7 @@ var STANDARD_ICON_BUTTON_STYLES = {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
-
// src/NewSaleForm/ui/
|
|
231
|
-
import { useState } from "react";
|
|
230
|
+
// src/NewSaleForm/ui/FloatingLabelInput.tsx
|
|
232
231
|
import {
|
|
233
232
|
Box,
|
|
234
233
|
Field,
|
|
@@ -236,6 +235,7 @@ import {
|
|
|
236
235
|
defineStyle,
|
|
237
236
|
useControllableState
|
|
238
237
|
} from "@chakra-ui/react";
|
|
238
|
+
import { useState } from "react";
|
|
239
239
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
240
240
|
var FloatingLabelInput = (props) => {
|
|
241
241
|
const { label, onValueChange, value, defaultValue = "", ...rest } = props;
|
|
@@ -251,6 +251,14 @@ var FloatingLabelInput = (props) => {
|
|
|
251
251
|
Input,
|
|
252
252
|
{
|
|
253
253
|
...rest,
|
|
254
|
+
h: "12",
|
|
255
|
+
pt: shouldFloat ? "5" : "2",
|
|
256
|
+
pb: "1",
|
|
257
|
+
fontSize: "sm",
|
|
258
|
+
fontWeight: "semibold",
|
|
259
|
+
borderWidth: "1.5px",
|
|
260
|
+
borderRadius: "lg",
|
|
261
|
+
_placeholder: { color: "transparent" },
|
|
254
262
|
onFocus: (e) => {
|
|
255
263
|
props.onFocus?.(e);
|
|
256
264
|
setFocused(true);
|
|
@@ -271,22 +279,28 @@ var FloatingLabelInput = (props) => {
|
|
|
271
279
|
] });
|
|
272
280
|
};
|
|
273
281
|
var floatingStyles = defineStyle({
|
|
282
|
+
/* placeholder state — vertically centred inside the input */
|
|
274
283
|
pos: "absolute",
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
top: "2.5",
|
|
284
|
+
top: "50%",
|
|
285
|
+
transform: "translateY(-50%)",
|
|
278
286
|
insetStart: "3",
|
|
287
|
+
fontSize: "sm",
|
|
279
288
|
fontWeight: "normal",
|
|
289
|
+
color: "gray.400",
|
|
290
|
+
bg: "bg",
|
|
291
|
+
px: "0.5",
|
|
280
292
|
pointerEvents: "none",
|
|
281
|
-
transition: "
|
|
282
|
-
|
|
293
|
+
transition: "top 0.15s ease, font-size 0.15s ease, color 0.15s ease, transform 0.15s ease",
|
|
294
|
+
/* floated state — sits above the border, clearly a label */
|
|
283
295
|
"&[data-float]": {
|
|
284
|
-
top: "-
|
|
285
|
-
|
|
286
|
-
|
|
296
|
+
top: "-2",
|
|
297
|
+
transform: "translateY(0)",
|
|
298
|
+
fontSize: "xs",
|
|
299
|
+
fontWeight: "medium",
|
|
300
|
+
color: "gray.400",
|
|
301
|
+
insetStart: "2.5"
|
|
287
302
|
}
|
|
288
303
|
});
|
|
289
|
-
var floating_label_input_default = FloatingLabelInput;
|
|
290
304
|
|
|
291
305
|
// src/NewSaleForm/LifePlanApplication1.tsx
|
|
292
306
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -399,7 +413,7 @@ var LifePlanApplication1 = ({
|
|
|
399
413
|
}
|
|
400
414
|
) }),
|
|
401
415
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
402
|
-
|
|
416
|
+
FloatingLabelInput,
|
|
403
417
|
{
|
|
404
418
|
id: "idNumber",
|
|
405
419
|
type: "text",
|
|
@@ -409,7 +423,7 @@ var LifePlanApplication1 = ({
|
|
|
409
423
|
}
|
|
410
424
|
) }),
|
|
411
425
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
412
|
-
|
|
426
|
+
FloatingLabelInput,
|
|
413
427
|
{
|
|
414
428
|
id: "lastName",
|
|
415
429
|
type: "text",
|
|
@@ -419,7 +433,7 @@ var LifePlanApplication1 = ({
|
|
|
419
433
|
}
|
|
420
434
|
) }),
|
|
421
435
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
422
|
-
|
|
436
|
+
FloatingLabelInput,
|
|
423
437
|
{
|
|
424
438
|
id: "firstName",
|
|
425
439
|
type: "text",
|
|
@@ -429,7 +443,7 @@ var LifePlanApplication1 = ({
|
|
|
429
443
|
}
|
|
430
444
|
) }),
|
|
431
445
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
432
|
-
|
|
446
|
+
FloatingLabelInput,
|
|
433
447
|
{
|
|
434
448
|
id: "middleName",
|
|
435
449
|
type: "text",
|
|
@@ -439,7 +453,7 @@ var LifePlanApplication1 = ({
|
|
|
439
453
|
}
|
|
440
454
|
) }),
|
|
441
455
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
442
|
-
|
|
456
|
+
FloatingLabelInput,
|
|
443
457
|
{
|
|
444
458
|
id: "suffix",
|
|
445
459
|
type: "text",
|
|
@@ -465,7 +479,7 @@ var LifePlanApplication1 = ({
|
|
|
465
479
|
/* @__PURE__ */ jsx2(Input2, { id: "dateOfNeutralization", type: "date" })
|
|
466
480
|
] }),
|
|
467
481
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
468
|
-
|
|
482
|
+
FloatingLabelInput,
|
|
469
483
|
{
|
|
470
484
|
id: "height",
|
|
471
485
|
label: "Height (ft)",
|
|
@@ -477,7 +491,7 @@ var LifePlanApplication1 = ({
|
|
|
477
491
|
}
|
|
478
492
|
) }),
|
|
479
493
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
480
|
-
|
|
494
|
+
FloatingLabelInput,
|
|
481
495
|
{
|
|
482
496
|
id: "weight",
|
|
483
497
|
label: "Weight (lbs)",
|
|
@@ -526,7 +540,7 @@ var LifePlanApplication1 = ({
|
|
|
526
540
|
}
|
|
527
541
|
) }),
|
|
528
542
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
529
|
-
|
|
543
|
+
FloatingLabelInput,
|
|
530
544
|
{
|
|
531
545
|
id: "nationality",
|
|
532
546
|
type: "text",
|
|
@@ -536,7 +550,7 @@ var LifePlanApplication1 = ({
|
|
|
536
550
|
}
|
|
537
551
|
) }),
|
|
538
552
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
539
|
-
|
|
553
|
+
FloatingLabelInput,
|
|
540
554
|
{
|
|
541
555
|
id: "mobileNumber",
|
|
542
556
|
type: "text",
|
|
@@ -546,7 +560,7 @@ var LifePlanApplication1 = ({
|
|
|
546
560
|
}
|
|
547
561
|
) }),
|
|
548
562
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
549
|
-
|
|
563
|
+
FloatingLabelInput,
|
|
550
564
|
{
|
|
551
565
|
id: "landlineNumber",
|
|
552
566
|
type: "text",
|
|
@@ -559,7 +573,7 @@ var LifePlanApplication1 = ({
|
|
|
559
573
|
}
|
|
560
574
|
) }),
|
|
561
575
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
562
|
-
|
|
576
|
+
FloatingLabelInput,
|
|
563
577
|
{
|
|
564
578
|
id: "email",
|
|
565
579
|
type: "email",
|
|
@@ -569,7 +583,7 @@ var LifePlanApplication1 = ({
|
|
|
569
583
|
}
|
|
570
584
|
) }),
|
|
571
585
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
572
|
-
|
|
586
|
+
FloatingLabelInput,
|
|
573
587
|
{
|
|
574
588
|
id: "mailingAddress",
|
|
575
589
|
type: "text",
|
|
@@ -579,7 +593,7 @@ var LifePlanApplication1 = ({
|
|
|
579
593
|
}
|
|
580
594
|
) }),
|
|
581
595
|
/* @__PURE__ */ jsx2(Field2.Root, { children: /* @__PURE__ */ jsx2(
|
|
582
|
-
|
|
596
|
+
FloatingLabelInput,
|
|
583
597
|
{
|
|
584
598
|
id: "insurability",
|
|
585
599
|
type: "text",
|
|
@@ -900,7 +914,7 @@ var LifePlanApplication2 = ({
|
|
|
900
914
|
}
|
|
901
915
|
) }),
|
|
902
916
|
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */ jsx3(
|
|
903
|
-
|
|
917
|
+
FloatingLabelInput,
|
|
904
918
|
{
|
|
905
919
|
id: "street",
|
|
906
920
|
label: "Street",
|
|
@@ -909,7 +923,7 @@ var LifePlanApplication2 = ({
|
|
|
909
923
|
}
|
|
910
924
|
) }),
|
|
911
925
|
/* @__PURE__ */ jsx3(Field3.Root, { children: /* @__PURE__ */ jsx3(
|
|
912
|
-
|
|
926
|
+
FloatingLabelInput,
|
|
913
927
|
{
|
|
914
928
|
id: "lotNumber",
|
|
915
929
|
label: "Lot #",
|
|
@@ -925,13 +939,13 @@ var LifePlanApplication2_default = LifePlanApplication2;
|
|
|
925
939
|
|
|
926
940
|
// src/NewSaleForm/LifePlanApplication3.tsx
|
|
927
941
|
import { Box as Box3, Field as Field4, SimpleGrid as SimpleGrid2, VStack as VStack2 } from "@chakra-ui/react";
|
|
928
|
-
import
|
|
942
|
+
import React from "react";
|
|
929
943
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
930
944
|
var LifePlanApplication3 = ({
|
|
931
945
|
initialData,
|
|
932
946
|
onUpdate
|
|
933
947
|
}) => {
|
|
934
|
-
const [formData, setFormData] =
|
|
948
|
+
const [formData, setFormData] = React.useState({
|
|
935
949
|
occupation: initialData?.occupation ?? "Software Engineer",
|
|
936
950
|
employerName: initialData?.employerName ?? "ABC Technologies Inc.",
|
|
937
951
|
employmentStatus: initialData?.employmentStatus ?? "Regular",
|
|
@@ -1309,7 +1323,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1309
1323
|
children: [
|
|
1310
1324
|
/* @__PURE__ */ jsxs6(Field5.Root, { children: [
|
|
1311
1325
|
/* @__PURE__ */ jsx6(
|
|
1312
|
-
|
|
1326
|
+
FloatingLabelInput,
|
|
1313
1327
|
{
|
|
1314
1328
|
id: "firstName",
|
|
1315
1329
|
type: "text",
|
|
@@ -1325,7 +1339,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1325
1339
|
] }),
|
|
1326
1340
|
/* @__PURE__ */ jsxs6(Field5.Root, { children: [
|
|
1327
1341
|
/* @__PURE__ */ jsx6(
|
|
1328
|
-
|
|
1342
|
+
FloatingLabelInput,
|
|
1329
1343
|
{
|
|
1330
1344
|
id: "lastName",
|
|
1331
1345
|
type: "text",
|
|
@@ -1341,7 +1355,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1341
1355
|
] }),
|
|
1342
1356
|
/* @__PURE__ */ jsxs6(Field5.Root, { children: [
|
|
1343
1357
|
/* @__PURE__ */ jsx6(
|
|
1344
|
-
|
|
1358
|
+
FloatingLabelInput,
|
|
1345
1359
|
{
|
|
1346
1360
|
id: "middleInitial",
|
|
1347
1361
|
type: "text",
|
|
@@ -1360,7 +1374,7 @@ var Beneficiary = ({ onUpdate }) => {
|
|
|
1360
1374
|
),
|
|
1361
1375
|
/* @__PURE__ */ jsxs6(Field5.Root, { children: [
|
|
1362
1376
|
/* @__PURE__ */ jsx6(
|
|
1363
|
-
|
|
1377
|
+
FloatingLabelInput,
|
|
1364
1378
|
{
|
|
1365
1379
|
id: "address",
|
|
1366
1380
|
type: "text",
|
|
@@ -3168,7 +3182,7 @@ var LifePlanApplicationStepWrapper = () => {
|
|
|
3168
3182
|
var LifePlanApplicationStepWrapper_default = LifePlanApplicationStepWrapper;
|
|
3169
3183
|
|
|
3170
3184
|
// src/Generic/BottomQuickActions.tsx
|
|
3171
|
-
import
|
|
3185
|
+
import React5 from "react";
|
|
3172
3186
|
import {
|
|
3173
3187
|
Box as Box15,
|
|
3174
3188
|
Drawer,
|
|
@@ -3229,7 +3243,7 @@ var SUBTITLE_COLOR = BRAND_COLORS.grey;
|
|
|
3229
3243
|
var LABEL_COLOR = BRAND_COLORS.neutralText;
|
|
3230
3244
|
var DESC_COLOR = BRAND_COLORS.grey;
|
|
3231
3245
|
var CHEVRON_COLOR = BRAND_COLORS.ashWhite;
|
|
3232
|
-
var QuickActionsHeaderCard =
|
|
3246
|
+
var QuickActionsHeaderCard = React5.memo(
|
|
3233
3247
|
({
|
|
3234
3248
|
initials,
|
|
3235
3249
|
avatarBg = AVATAR_DEFAULT_BG,
|
|
@@ -3305,7 +3319,7 @@ var QuickActionsHeaderCard = React6.memo(
|
|
|
3305
3319
|
var ITEM_TRANSITION = {
|
|
3306
3320
|
transition: "background 0.15s ease, transform 0.1s ease"
|
|
3307
3321
|
};
|
|
3308
|
-
var ActionItem =
|
|
3322
|
+
var ActionItem = React5.memo(({ action }) => {
|
|
3309
3323
|
const iconBg = action.iconBg ?? DEFAULT_ICON_BG;
|
|
3310
3324
|
const iconColor = action.iconColor ?? DEFAULT_ICON_COLOR;
|
|
3311
3325
|
const inner = /* @__PURE__ */ jsxs15(
|
|
@@ -5214,7 +5228,6 @@ var UserProfile_default = ReusableProfile;
|
|
|
5214
5228
|
export {
|
|
5215
5229
|
beneficiary_default as Beneficiary,
|
|
5216
5230
|
BottomQuickActions_default as BottomQuickActions,
|
|
5217
|
-
floating_label_input_default as FloatingLabelInput,
|
|
5218
5231
|
HealthDeclaration_default as HealthDeclaration,
|
|
5219
5232
|
LifePlanApplication1_default as LifePlanApplication1,
|
|
5220
5233
|
LifePlanApplication2_default as LifePlanApplication2,
|