@asante-org/atlascopco-vt-litesitegenerator 1.6.41 → 3.0.1
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.esm.js +534 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.scss +1296 -0
- package/dist/index.js +534 -2
- package/dist/index.js.map +1 -1
- package/dist/index.scss +1296 -0
- package/dist/src/components/lsg/LsgFormContainer/LsgFormContainer.d.ts +16 -0
- package/dist/src/components/lsg/LsgFormContainer/LsgFormContainer.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormContainer/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldConsent/LsgFormFieldConsent.d.ts +12 -0
- package/dist/src/components/lsg/LsgFormFieldConsent/LsgFormFieldConsent.stories.d.ts +9 -0
- package/dist/src/components/lsg/LsgFormFieldConsent/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldCountry/LsgFormFieldCountry.d.ts +19 -0
- package/dist/src/components/lsg/LsgFormFieldCountry/LsgFormFieldCountry.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldCountry/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldEmail/LsgFormFieldEmail.d.ts +15 -0
- package/dist/src/components/lsg/LsgFormFieldEmail/LsgFormFieldEmail.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldEmail/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldSelect/LsgFormFieldSelect.d.ts +19 -0
- package/dist/src/components/lsg/LsgFormFieldSelect/LsgFormFieldSelect.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldSelect/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldTel/LsgFormFieldTel.d.ts +17 -0
- package/dist/src/components/lsg/LsgFormFieldTel/LsgFormFieldTel.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldTel/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldText/LsgFormFieldText.d.ts +18 -0
- package/dist/src/components/lsg/LsgFormFieldText/LsgFormFieldText.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldText/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormFieldTextarea/LsgFormFieldTextarea.d.ts +17 -0
- package/dist/src/components/lsg/LsgFormFieldTextarea/LsgFormFieldTextarea.stories.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormFieldTextarea/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgFormStep/LsgFormStep.d.ts +10 -0
- package/dist/src/components/lsg/LsgFormStep/LsgFormStep.stories.d.ts +7 -0
- package/dist/src/components/lsg/LsgFormStep/index.d.ts +2 -0
- package/dist/src/components/lsg/LsgHero/LsgHero.d.ts +31 -0
- package/dist/src/components/lsg/LsgHero/LsgHero.stories.d.ts +36 -0
- package/dist/src/components/lsg/LsgHero/LsgHeroController.d.ts +40 -0
- package/dist/src/components/lsg/LsgHero/index.d.ts +4 -0
- package/dist/src/components/lsg/LsgHeroCard/LsgHeroCard.d.ts +37 -0
- package/dist/src/components/lsg/LsgHeroCard/LsgHeroCard.stories.d.ts +20 -0
- package/dist/src/components/lsg/LsgHeroCard/index.d.ts +2 -0
- package/dist/src/components/lsg/index.d.ts +18 -0
- package/dist/src/themes/createThemeComponents.d.ts +9 -0
- package/dist/src/themes/theme-1/components.d.ts +10 -1
- package/dist/src/themes/theme-2/components.d.ts +10 -1
- package/dist/src/themes/theme-3/components.d.ts +10 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lsg-clientlib.css +0 -2106
- package/dist/lsg-clientlib.css.map +0 -1
- package/dist/lsg-clientlib.js +0 -524
- package/dist/lsg-clientlib.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1333,6 +1333,490 @@ var LsgFooter = function (_a) {
|
|
|
1333
1333
|
}))))), bottomBar);
|
|
1334
1334
|
};
|
|
1335
1335
|
|
|
1336
|
+
var LsgFormFieldText = function (_a) {
|
|
1337
|
+
var _b = _a.id,
|
|
1338
|
+
id = _b === void 0 ? "field-text" : _b,
|
|
1339
|
+
label = _a.label,
|
|
1340
|
+
helpText = _a.helpText,
|
|
1341
|
+
placeholder = _a.placeholder,
|
|
1342
|
+
_c = _a.defaultValue,
|
|
1343
|
+
defaultValue = _c === void 0 ? "" : _c,
|
|
1344
|
+
_d = _a.required,
|
|
1345
|
+
required = _d === void 0 ? false : _d,
|
|
1346
|
+
_e = _a.disabled,
|
|
1347
|
+
disabled = _e === void 0 ? false : _e,
|
|
1348
|
+
error = _a.error,
|
|
1349
|
+
autocomplete = _a.autocomplete,
|
|
1350
|
+
minLength = _a.minLength,
|
|
1351
|
+
maxLength = _a.maxLength,
|
|
1352
|
+
name = _a.name;
|
|
1353
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1354
|
+
var errorId = "".concat(id, "-error");
|
|
1355
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1356
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1357
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--text"
|
|
1358
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1359
|
+
className: "cmp-vtba-form__label",
|
|
1360
|
+
htmlFor: id
|
|
1361
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1362
|
+
className: "cmp-vtba-form__required",
|
|
1363
|
+
title: "required"
|
|
1364
|
+
}, "*")), /*#__PURE__*/React.createElement("input", {
|
|
1365
|
+
type: "text",
|
|
1366
|
+
className: "cmp-vtba-form__input",
|
|
1367
|
+
id: id,
|
|
1368
|
+
name: name,
|
|
1369
|
+
defaultValue: defaultValue,
|
|
1370
|
+
placeholder: placeholder,
|
|
1371
|
+
autoComplete: autocomplete,
|
|
1372
|
+
minLength: minLength,
|
|
1373
|
+
maxLength: maxLength,
|
|
1374
|
+
"aria-describedby": ariaDescribedBy,
|
|
1375
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1376
|
+
required: required,
|
|
1377
|
+
disabled: disabled
|
|
1378
|
+
}), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1379
|
+
className: "cmp-vtba-form__help",
|
|
1380
|
+
id: helpId
|
|
1381
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1382
|
+
className: "cmp-vtba-form__field-error",
|
|
1383
|
+
id: errorId,
|
|
1384
|
+
role: "alert",
|
|
1385
|
+
"aria-live": "assertive",
|
|
1386
|
+
hidden: !error
|
|
1387
|
+
}, error));
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
var LsgFormFieldEmail = function (_a) {
|
|
1391
|
+
var _b = _a.id,
|
|
1392
|
+
id = _b === void 0 ? "field-email" : _b,
|
|
1393
|
+
label = _a.label,
|
|
1394
|
+
helpText = _a.helpText,
|
|
1395
|
+
placeholder = _a.placeholder,
|
|
1396
|
+
_c = _a.defaultValue,
|
|
1397
|
+
defaultValue = _c === void 0 ? "" : _c,
|
|
1398
|
+
_d = _a.required,
|
|
1399
|
+
required = _d === void 0 ? false : _d,
|
|
1400
|
+
_e = _a.disabled,
|
|
1401
|
+
disabled = _e === void 0 ? false : _e,
|
|
1402
|
+
error = _a.error,
|
|
1403
|
+
maxLength = _a.maxLength,
|
|
1404
|
+
name = _a.name;
|
|
1405
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1406
|
+
var errorId = "".concat(id, "-error");
|
|
1407
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1408
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1409
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--email"
|
|
1410
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1411
|
+
className: "cmp-vtba-form__label",
|
|
1412
|
+
htmlFor: id
|
|
1413
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1414
|
+
className: "cmp-vtba-form__required",
|
|
1415
|
+
title: "required"
|
|
1416
|
+
}, "*")), /*#__PURE__*/React.createElement("input", {
|
|
1417
|
+
type: "email",
|
|
1418
|
+
className: "cmp-vtba-form__input",
|
|
1419
|
+
id: id,
|
|
1420
|
+
name: name,
|
|
1421
|
+
defaultValue: defaultValue,
|
|
1422
|
+
placeholder: placeholder,
|
|
1423
|
+
autoComplete: "email",
|
|
1424
|
+
maxLength: maxLength,
|
|
1425
|
+
"aria-describedby": ariaDescribedBy,
|
|
1426
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1427
|
+
required: required,
|
|
1428
|
+
disabled: disabled
|
|
1429
|
+
}), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1430
|
+
className: "cmp-vtba-form__help",
|
|
1431
|
+
id: helpId
|
|
1432
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1433
|
+
className: "cmp-vtba-form__field-error",
|
|
1434
|
+
id: errorId,
|
|
1435
|
+
role: "alert",
|
|
1436
|
+
"aria-live": "assertive",
|
|
1437
|
+
hidden: !error
|
|
1438
|
+
}, error));
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
var LsgFormFieldTel = function (_a) {
|
|
1442
|
+
var _b = _a.id,
|
|
1443
|
+
id = _b === void 0 ? "field-tel" : _b,
|
|
1444
|
+
label = _a.label,
|
|
1445
|
+
helpText = _a.helpText,
|
|
1446
|
+
placeholder = _a.placeholder,
|
|
1447
|
+
_c = _a.defaultValue,
|
|
1448
|
+
defaultValue = _c === void 0 ? "" : _c,
|
|
1449
|
+
_d = _a.required,
|
|
1450
|
+
required = _d === void 0 ? false : _d,
|
|
1451
|
+
_e = _a.disabled,
|
|
1452
|
+
disabled = _e === void 0 ? false : _e,
|
|
1453
|
+
error = _a.error,
|
|
1454
|
+
minLength = _a.minLength,
|
|
1455
|
+
maxLength = _a.maxLength,
|
|
1456
|
+
pattern = _a.pattern,
|
|
1457
|
+
name = _a.name;
|
|
1458
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1459
|
+
var errorId = "".concat(id, "-error");
|
|
1460
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1461
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1462
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--tel"
|
|
1463
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1464
|
+
className: "cmp-vtba-form__label",
|
|
1465
|
+
htmlFor: id
|
|
1466
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1467
|
+
className: "cmp-vtba-form__required",
|
|
1468
|
+
title: "required"
|
|
1469
|
+
}, "*")), /*#__PURE__*/React.createElement("input", {
|
|
1470
|
+
type: "tel",
|
|
1471
|
+
className: "cmp-vtba-form__input",
|
|
1472
|
+
id: id,
|
|
1473
|
+
name: name,
|
|
1474
|
+
defaultValue: defaultValue,
|
|
1475
|
+
placeholder: placeholder,
|
|
1476
|
+
autoComplete: "tel",
|
|
1477
|
+
minLength: minLength,
|
|
1478
|
+
maxLength: maxLength,
|
|
1479
|
+
pattern: pattern,
|
|
1480
|
+
"aria-describedby": ariaDescribedBy,
|
|
1481
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1482
|
+
required: required,
|
|
1483
|
+
disabled: disabled
|
|
1484
|
+
}), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1485
|
+
className: "cmp-vtba-form__help",
|
|
1486
|
+
id: helpId
|
|
1487
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1488
|
+
className: "cmp-vtba-form__field-error",
|
|
1489
|
+
id: errorId,
|
|
1490
|
+
role: "alert",
|
|
1491
|
+
"aria-live": "assertive",
|
|
1492
|
+
hidden: !error
|
|
1493
|
+
}, error));
|
|
1494
|
+
};
|
|
1495
|
+
|
|
1496
|
+
var LsgFormFieldSelect = function (_a) {
|
|
1497
|
+
var _b = _a.id,
|
|
1498
|
+
id = _b === void 0 ? "field-select" : _b,
|
|
1499
|
+
label = _a.label,
|
|
1500
|
+
helpText = _a.helpText,
|
|
1501
|
+
_c = _a.placeholder,
|
|
1502
|
+
placeholder = _c === void 0 ? "Please select" : _c,
|
|
1503
|
+
_d = _a.defaultValue,
|
|
1504
|
+
defaultValue = _d === void 0 ? "" : _d,
|
|
1505
|
+
_e = _a.options,
|
|
1506
|
+
options = _e === void 0 ? [] : _e,
|
|
1507
|
+
_f = _a.required,
|
|
1508
|
+
required = _f === void 0 ? false : _f,
|
|
1509
|
+
_g = _a.disabled,
|
|
1510
|
+
disabled = _g === void 0 ? false : _g,
|
|
1511
|
+
error = _a.error,
|
|
1512
|
+
name = _a.name;
|
|
1513
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1514
|
+
var errorId = "".concat(id, "-error");
|
|
1515
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1516
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1517
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--select"
|
|
1518
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1519
|
+
className: "cmp-vtba-form__label",
|
|
1520
|
+
htmlFor: id
|
|
1521
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1522
|
+
className: "cmp-vtba-form__required",
|
|
1523
|
+
title: "required"
|
|
1524
|
+
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
1525
|
+
className: "cmp-vtba-form__select-wrapper"
|
|
1526
|
+
}, /*#__PURE__*/React.createElement("select", {
|
|
1527
|
+
className: "cmp-vtba-form__select",
|
|
1528
|
+
id: id,
|
|
1529
|
+
name: name,
|
|
1530
|
+
defaultValue: defaultValue,
|
|
1531
|
+
"aria-describedby": ariaDescribedBy,
|
|
1532
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1533
|
+
required: required,
|
|
1534
|
+
disabled: disabled
|
|
1535
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
1536
|
+
value: ""
|
|
1537
|
+
}, placeholder), options.map(function (opt) {
|
|
1538
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
1539
|
+
key: opt.value,
|
|
1540
|
+
value: opt.value
|
|
1541
|
+
}, opt.label);
|
|
1542
|
+
}))), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1543
|
+
className: "cmp-vtba-form__help",
|
|
1544
|
+
id: helpId
|
|
1545
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1546
|
+
className: "cmp-vtba-form__field-error",
|
|
1547
|
+
id: errorId,
|
|
1548
|
+
role: "alert",
|
|
1549
|
+
"aria-live": "assertive",
|
|
1550
|
+
hidden: !error
|
|
1551
|
+
}, error));
|
|
1552
|
+
};
|
|
1553
|
+
|
|
1554
|
+
var COUNTRY_FIXTURE = [{
|
|
1555
|
+
value: "us",
|
|
1556
|
+
label: "United States"
|
|
1557
|
+
}, {
|
|
1558
|
+
value: "gb",
|
|
1559
|
+
label: "United Kingdom"
|
|
1560
|
+
}, {
|
|
1561
|
+
value: "de",
|
|
1562
|
+
label: "Germany"
|
|
1563
|
+
}, {
|
|
1564
|
+
value: "fr",
|
|
1565
|
+
label: "France"
|
|
1566
|
+
}, {
|
|
1567
|
+
value: "se",
|
|
1568
|
+
label: "Sweden"
|
|
1569
|
+
}, {
|
|
1570
|
+
value: "jp",
|
|
1571
|
+
label: "Japan"
|
|
1572
|
+
}, {
|
|
1573
|
+
value: "cn",
|
|
1574
|
+
label: "China"
|
|
1575
|
+
}, {
|
|
1576
|
+
value: "in",
|
|
1577
|
+
label: "India"
|
|
1578
|
+
}, {
|
|
1579
|
+
value: "br",
|
|
1580
|
+
label: "Brazil"
|
|
1581
|
+
}, {
|
|
1582
|
+
value: "au",
|
|
1583
|
+
label: "Australia"
|
|
1584
|
+
}];
|
|
1585
|
+
var LsgFormFieldCountry = function (_a) {
|
|
1586
|
+
var _b = _a.id,
|
|
1587
|
+
id = _b === void 0 ? "field-country" : _b,
|
|
1588
|
+
label = _a.label,
|
|
1589
|
+
helpText = _a.helpText,
|
|
1590
|
+
_c = _a.defaultValue,
|
|
1591
|
+
defaultValue = _c === void 0 ? "" : _c,
|
|
1592
|
+
_d = _a.countries,
|
|
1593
|
+
countries = _d === void 0 ? COUNTRY_FIXTURE : _d,
|
|
1594
|
+
_e = _a.required,
|
|
1595
|
+
required = _e === void 0 ? false : _e,
|
|
1596
|
+
_f = _a.disabled,
|
|
1597
|
+
disabled = _f === void 0 ? false : _f,
|
|
1598
|
+
error = _a.error,
|
|
1599
|
+
name = _a.name;
|
|
1600
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1601
|
+
var errorId = "".concat(id, "-error");
|
|
1602
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1603
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1604
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--country"
|
|
1605
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1606
|
+
className: "cmp-vtba-form__label",
|
|
1607
|
+
htmlFor: id
|
|
1608
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1609
|
+
className: "cmp-vtba-form__required",
|
|
1610
|
+
title: "required"
|
|
1611
|
+
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
1612
|
+
className: "cmp-vtba-form__select-wrapper"
|
|
1613
|
+
}, /*#__PURE__*/React.createElement("select", {
|
|
1614
|
+
className: "cmp-vtba-form__select",
|
|
1615
|
+
id: id,
|
|
1616
|
+
name: name,
|
|
1617
|
+
defaultValue: defaultValue,
|
|
1618
|
+
"data-country-list": "true",
|
|
1619
|
+
"aria-describedby": ariaDescribedBy,
|
|
1620
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1621
|
+
required: required,
|
|
1622
|
+
disabled: disabled
|
|
1623
|
+
}, /*#__PURE__*/React.createElement("option", {
|
|
1624
|
+
value: ""
|
|
1625
|
+
}, "Select a country"), countries.map(function (c) {
|
|
1626
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
1627
|
+
key: c.value,
|
|
1628
|
+
value: c.value
|
|
1629
|
+
}, c.label);
|
|
1630
|
+
}))), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1631
|
+
className: "cmp-vtba-form__help",
|
|
1632
|
+
id: helpId
|
|
1633
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1634
|
+
className: "cmp-vtba-form__field-error",
|
|
1635
|
+
id: errorId,
|
|
1636
|
+
role: "alert",
|
|
1637
|
+
"aria-live": "assertive",
|
|
1638
|
+
hidden: !error
|
|
1639
|
+
}, error));
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1642
|
+
var LsgFormFieldTextarea = function (_a) {
|
|
1643
|
+
var _b = _a.id,
|
|
1644
|
+
id = _b === void 0 ? "field-textarea" : _b,
|
|
1645
|
+
label = _a.label,
|
|
1646
|
+
helpText = _a.helpText,
|
|
1647
|
+
placeholder = _a.placeholder,
|
|
1648
|
+
_c = _a.defaultValue,
|
|
1649
|
+
defaultValue = _c === void 0 ? "" : _c,
|
|
1650
|
+
_d = _a.required,
|
|
1651
|
+
required = _d === void 0 ? false : _d,
|
|
1652
|
+
_e = _a.disabled,
|
|
1653
|
+
disabled = _e === void 0 ? false : _e,
|
|
1654
|
+
error = _a.error,
|
|
1655
|
+
autocomplete = _a.autocomplete,
|
|
1656
|
+
maxLength = _a.maxLength,
|
|
1657
|
+
_f = _a.rows,
|
|
1658
|
+
rows = _f === void 0 ? 4 : _f,
|
|
1659
|
+
name = _a.name;
|
|
1660
|
+
var helpId = helpText ? "".concat(id, "-help") : undefined;
|
|
1661
|
+
var errorId = "".concat(id, "-error");
|
|
1662
|
+
var ariaDescribedBy = [helpId, error ? errorId : undefined].filter(Boolean).join(" ") || undefined;
|
|
1663
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1664
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--textarea"
|
|
1665
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
1666
|
+
className: "cmp-vtba-form__label",
|
|
1667
|
+
htmlFor: id
|
|
1668
|
+
}, label, required && /*#__PURE__*/React.createElement("abbr", {
|
|
1669
|
+
className: "cmp-vtba-form__required",
|
|
1670
|
+
title: "required"
|
|
1671
|
+
}, "*")), /*#__PURE__*/React.createElement("textarea", {
|
|
1672
|
+
className: "cmp-vtba-form__textarea",
|
|
1673
|
+
id: id,
|
|
1674
|
+
name: name,
|
|
1675
|
+
defaultValue: defaultValue,
|
|
1676
|
+
placeholder: placeholder,
|
|
1677
|
+
autoComplete: autocomplete,
|
|
1678
|
+
maxLength: maxLength,
|
|
1679
|
+
rows: rows,
|
|
1680
|
+
"aria-describedby": ariaDescribedBy,
|
|
1681
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1682
|
+
required: required,
|
|
1683
|
+
disabled: disabled
|
|
1684
|
+
}), helpText && /*#__PURE__*/React.createElement("span", {
|
|
1685
|
+
className: "cmp-vtba-form__help",
|
|
1686
|
+
id: helpId
|
|
1687
|
+
}, helpText), /*#__PURE__*/React.createElement("span", {
|
|
1688
|
+
className: "cmp-vtba-form__field-error",
|
|
1689
|
+
id: errorId,
|
|
1690
|
+
role: "alert",
|
|
1691
|
+
"aria-live": "assertive",
|
|
1692
|
+
hidden: !error
|
|
1693
|
+
}, error));
|
|
1694
|
+
};
|
|
1695
|
+
|
|
1696
|
+
var LsgFormFieldConsent = function (_a) {
|
|
1697
|
+
var _b = _a.id,
|
|
1698
|
+
id = _b === void 0 ? "field-consent" : _b,
|
|
1699
|
+
label = _a.label,
|
|
1700
|
+
_c = _a.required,
|
|
1701
|
+
required = _c === void 0 ? false : _c,
|
|
1702
|
+
_d = _a.disabled,
|
|
1703
|
+
disabled = _d === void 0 ? false : _d,
|
|
1704
|
+
error = _a.error,
|
|
1705
|
+
name = _a.name;
|
|
1706
|
+
var errorId = "".concat(id, "-error");
|
|
1707
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1708
|
+
className: "cmp-vtba-form__field cmp-vtba-form__field--consent"
|
|
1709
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1710
|
+
className: "cmp-vtba-form__consent"
|
|
1711
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1712
|
+
type: "checkbox",
|
|
1713
|
+
className: "cmp-vtba-form__checkbox",
|
|
1714
|
+
id: id,
|
|
1715
|
+
name: name,
|
|
1716
|
+
value: "true",
|
|
1717
|
+
"data-consent": "",
|
|
1718
|
+
"aria-describedby": error ? errorId : undefined,
|
|
1719
|
+
"aria-invalid": error ? "true" : undefined,
|
|
1720
|
+
required: required,
|
|
1721
|
+
disabled: disabled
|
|
1722
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
1723
|
+
className: "cmp-vtba-form__consent-label",
|
|
1724
|
+
htmlFor: id,
|
|
1725
|
+
dangerouslySetInnerHTML: {
|
|
1726
|
+
__html: label
|
|
1727
|
+
}
|
|
1728
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
1729
|
+
className: "cmp-vtba-form__field-error",
|
|
1730
|
+
id: errorId,
|
|
1731
|
+
role: "alert",
|
|
1732
|
+
"aria-live": "assertive",
|
|
1733
|
+
hidden: !error
|
|
1734
|
+
}, error));
|
|
1735
|
+
};
|
|
1736
|
+
|
|
1737
|
+
var LsgFormStep = function (_a) {
|
|
1738
|
+
var title = _a.title,
|
|
1739
|
+
description = _a.description,
|
|
1740
|
+
children = _a.children,
|
|
1741
|
+
stepId = _a.stepId;
|
|
1742
|
+
return /*#__PURE__*/React.createElement("fieldset", {
|
|
1743
|
+
className: "cmp-vtba-form__step",
|
|
1744
|
+
"data-form-step": "",
|
|
1745
|
+
"data-step-id": stepId
|
|
1746
|
+
}, title && /*#__PURE__*/React.createElement("legend", {
|
|
1747
|
+
className: "cmp-vtba-form__step-legend"
|
|
1748
|
+
}, title), description && /*#__PURE__*/React.createElement("p", {
|
|
1749
|
+
className: "cmp-vtba-form__step-description"
|
|
1750
|
+
}, description), /*#__PURE__*/React.createElement("div", {
|
|
1751
|
+
className: "cmp-vtba-form__fields"
|
|
1752
|
+
}, children));
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
var LsgFormContainer = function (_a) {
|
|
1756
|
+
var title = _a.title,
|
|
1757
|
+
_b = _a.multiStep,
|
|
1758
|
+
multiStep = _b === void 0 ? false : _b,
|
|
1759
|
+
_c = _a.currentStep,
|
|
1760
|
+
currentStep = _c === void 0 ? 1 : _c,
|
|
1761
|
+
_d = _a.steps,
|
|
1762
|
+
steps = _d === void 0 ? [] : _d,
|
|
1763
|
+
children = _a.children,
|
|
1764
|
+
formError = _a.formError,
|
|
1765
|
+
successMessage = _a.successMessage;
|
|
1766
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1767
|
+
className: "cmp-vtba-form",
|
|
1768
|
+
"data-vtba-form": ""
|
|
1769
|
+
}, /*#__PURE__*/React.createElement("form", {
|
|
1770
|
+
className: "cmp-vtba-form__form",
|
|
1771
|
+
method: "post",
|
|
1772
|
+
noValidate: true,
|
|
1773
|
+
"aria-label": title
|
|
1774
|
+
}, title && /*#__PURE__*/React.createElement("h2", {
|
|
1775
|
+
className: "cmp-vtba-form__title"
|
|
1776
|
+
}, title), multiStep && steps.length > 0 && /*#__PURE__*/React.createElement("nav", {
|
|
1777
|
+
className: "cmp-vtba-form__progress",
|
|
1778
|
+
"aria-label": "Form progress"
|
|
1779
|
+
}, /*#__PURE__*/React.createElement("ol", {
|
|
1780
|
+
className: "cmp-vtba-form__progress-list"
|
|
1781
|
+
}, steps.map(function (stepTitle, i) {
|
|
1782
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
1783
|
+
key: i,
|
|
1784
|
+
className: "cmp-vtba-form__progress-step",
|
|
1785
|
+
"data-step-index": i,
|
|
1786
|
+
"aria-current": i + 1 === currentStep ? "step" : undefined
|
|
1787
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1788
|
+
className: "cmp-vtba-form__progress-number"
|
|
1789
|
+
}, i + 1), /*#__PURE__*/React.createElement("span", {
|
|
1790
|
+
className: "cmp-vtba-form__progress-title"
|
|
1791
|
+
}, stepTitle));
|
|
1792
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1793
|
+
className: "cmp-vtba-form__steps"
|
|
1794
|
+
}, children), /*#__PURE__*/React.createElement("div", {
|
|
1795
|
+
className: "cmp-vtba-form__actions"
|
|
1796
|
+
}, multiStep && /*#__PURE__*/React.createElement("button", {
|
|
1797
|
+
type: "button",
|
|
1798
|
+
className: "cmp-vtba-form__prev",
|
|
1799
|
+
"data-form-prev": "",
|
|
1800
|
+
hidden: currentStep <= 1
|
|
1801
|
+
}, "Back"), multiStep && currentStep < (steps.length || 1) ? /*#__PURE__*/React.createElement("button", {
|
|
1802
|
+
type: "button",
|
|
1803
|
+
className: "cmp-vtba-form__next",
|
|
1804
|
+
"data-form-next": ""
|
|
1805
|
+
}, "Continue") : /*#__PURE__*/React.createElement("button", {
|
|
1806
|
+
type: "submit",
|
|
1807
|
+
className: "cmp-vtba-form__submit",
|
|
1808
|
+
"data-form-submit": ""
|
|
1809
|
+
}, "Submit")), formError && /*#__PURE__*/React.createElement("p", {
|
|
1810
|
+
className: "cmp-vtba-form__error",
|
|
1811
|
+
role: "alert",
|
|
1812
|
+
"aria-live": "assertive"
|
|
1813
|
+
}, formError), successMessage && /*#__PURE__*/React.createElement("div", {
|
|
1814
|
+
className: "cmp-vtba-form__success",
|
|
1815
|
+
role: "status",
|
|
1816
|
+
"aria-live": "polite"
|
|
1817
|
+
}, successMessage)));
|
|
1818
|
+
};
|
|
1819
|
+
|
|
1336
1820
|
var BASE_COMPONENTS = {
|
|
1337
1821
|
LsgButton: LsgButton,
|
|
1338
1822
|
LsgBanner: LsgBanner,
|
|
@@ -1346,7 +1830,16 @@ var BASE_COMPONENTS = {
|
|
|
1346
1830
|
LsgHeader: LsgHeader,
|
|
1347
1831
|
LsgQuickLinks: LsgQuickLinks,
|
|
1348
1832
|
LsgSocialMediaIcons: LsgSocialMediaIcons,
|
|
1349
|
-
LsgFooter: LsgFooter
|
|
1833
|
+
LsgFooter: LsgFooter,
|
|
1834
|
+
LsgFormContainer: LsgFormContainer,
|
|
1835
|
+
LsgFormFieldText: LsgFormFieldText,
|
|
1836
|
+
LsgFormFieldEmail: LsgFormFieldEmail,
|
|
1837
|
+
LsgFormFieldTel: LsgFormFieldTel,
|
|
1838
|
+
LsgFormFieldSelect: LsgFormFieldSelect,
|
|
1839
|
+
LsgFormFieldCountry: LsgFormFieldCountry,
|
|
1840
|
+
LsgFormFieldTextarea: LsgFormFieldTextarea,
|
|
1841
|
+
LsgFormFieldConsent: LsgFormFieldConsent,
|
|
1842
|
+
LsgFormStep: LsgFormStep
|
|
1350
1843
|
};
|
|
1351
1844
|
function createThemeComponent(themeName, componentName, Component) {
|
|
1352
1845
|
var WrappedComponent = function (props) {
|
|
@@ -1371,7 +1864,16 @@ function createThemeComponents(themeName) {
|
|
|
1371
1864
|
LsgHeader: createThemeComponent(themeName, "header", BASE_COMPONENTS.LsgHeader),
|
|
1372
1865
|
LsgQuickLinks: createThemeComponent(themeName, "quick-links", BASE_COMPONENTS.LsgQuickLinks),
|
|
1373
1866
|
LsgSocialMediaIcons: createThemeComponent(themeName, "social-media-icons", BASE_COMPONENTS.LsgSocialMediaIcons),
|
|
1374
|
-
LsgFooter: createThemeComponent(themeName, "footer", BASE_COMPONENTS.LsgFooter)
|
|
1867
|
+
LsgFooter: createThemeComponent(themeName, "footer", BASE_COMPONENTS.LsgFooter),
|
|
1868
|
+
LsgFormContainer: createThemeComponent(themeName, "form-container", BASE_COMPONENTS.LsgFormContainer),
|
|
1869
|
+
LsgFormFieldText: createThemeComponent(themeName, "form-field-text", BASE_COMPONENTS.LsgFormFieldText),
|
|
1870
|
+
LsgFormFieldEmail: createThemeComponent(themeName, "form-field-email", BASE_COMPONENTS.LsgFormFieldEmail),
|
|
1871
|
+
LsgFormFieldTel: createThemeComponent(themeName, "form-field-tel", BASE_COMPONENTS.LsgFormFieldTel),
|
|
1872
|
+
LsgFormFieldSelect: createThemeComponent(themeName, "form-field-select", BASE_COMPONENTS.LsgFormFieldSelect),
|
|
1873
|
+
LsgFormFieldCountry: createThemeComponent(themeName, "form-field-country", BASE_COMPONENTS.LsgFormFieldCountry),
|
|
1874
|
+
LsgFormFieldTextarea: createThemeComponent(themeName, "form-field-textarea", BASE_COMPONENTS.LsgFormFieldTextarea),
|
|
1875
|
+
LsgFormFieldConsent: createThemeComponent(themeName, "form-field-consent", BASE_COMPONENTS.LsgFormFieldConsent),
|
|
1876
|
+
LsgFormStep: createThemeComponent(themeName, "form-step", BASE_COMPONENTS.LsgFormStep)
|
|
1375
1877
|
};
|
|
1376
1878
|
}
|
|
1377
1879
|
|
|
@@ -1389,6 +1891,16 @@ var Theme1LsgButton = theme1Components.LsgButton,
|
|
|
1389
1891
|
Theme1LsgQuickLinks = theme1Components.LsgQuickLinks,
|
|
1390
1892
|
Theme1LsgSocialMediaIcons = theme1Components.LsgSocialMediaIcons,
|
|
1391
1893
|
Theme1LsgFooter = theme1Components.LsgFooter;
|
|
1894
|
+
// Form components
|
|
1895
|
+
theme1Components.LsgFormContainer;
|
|
1896
|
+
theme1Components.LsgFormFieldText;
|
|
1897
|
+
theme1Components.LsgFormFieldEmail;
|
|
1898
|
+
theme1Components.LsgFormFieldTel;
|
|
1899
|
+
theme1Components.LsgFormFieldTextarea;
|
|
1900
|
+
theme1Components.LsgFormFieldSelect;
|
|
1901
|
+
theme1Components.LsgFormFieldCountry;
|
|
1902
|
+
theme1Components.LsgFormFieldConsent;
|
|
1903
|
+
theme1Components.LsgFormStep;
|
|
1392
1904
|
|
|
1393
1905
|
var theme2Components = createThemeComponents("theme-2");
|
|
1394
1906
|
var Theme2LsgButton = theme2Components.LsgButton,
|
|
@@ -1404,6 +1916,16 @@ var Theme2LsgButton = theme2Components.LsgButton,
|
|
|
1404
1916
|
Theme2LsgQuickLinks = theme2Components.LsgQuickLinks,
|
|
1405
1917
|
Theme2LsgSocialMediaIcons = theme2Components.LsgSocialMediaIcons,
|
|
1406
1918
|
Theme2LsgFooter = theme2Components.LsgFooter;
|
|
1919
|
+
// Form components
|
|
1920
|
+
theme2Components.LsgFormContainer;
|
|
1921
|
+
theme2Components.LsgFormFieldText;
|
|
1922
|
+
theme2Components.LsgFormFieldEmail;
|
|
1923
|
+
theme2Components.LsgFormFieldTel;
|
|
1924
|
+
theme2Components.LsgFormFieldTextarea;
|
|
1925
|
+
theme2Components.LsgFormFieldSelect;
|
|
1926
|
+
theme2Components.LsgFormFieldCountry;
|
|
1927
|
+
theme2Components.LsgFormFieldConsent;
|
|
1928
|
+
theme2Components.LsgFormStep;
|
|
1407
1929
|
|
|
1408
1930
|
var theme3Components = createThemeComponents("theme-3");
|
|
1409
1931
|
var Theme3LsgButton = theme3Components.LsgButton,
|
|
@@ -1419,6 +1941,16 @@ var Theme3LsgButton = theme3Components.LsgButton,
|
|
|
1419
1941
|
Theme3LsgQuickLinks = theme3Components.LsgQuickLinks,
|
|
1420
1942
|
Theme3LsgSocialMediaIcons = theme3Components.LsgSocialMediaIcons,
|
|
1421
1943
|
Theme3LsgFooter = theme3Components.LsgFooter;
|
|
1944
|
+
// Form components
|
|
1945
|
+
theme3Components.LsgFormContainer;
|
|
1946
|
+
theme3Components.LsgFormFieldText;
|
|
1947
|
+
theme3Components.LsgFormFieldEmail;
|
|
1948
|
+
theme3Components.LsgFormFieldTel;
|
|
1949
|
+
theme3Components.LsgFormFieldTextarea;
|
|
1950
|
+
theme3Components.LsgFormFieldSelect;
|
|
1951
|
+
theme3Components.LsgFormFieldCountry;
|
|
1952
|
+
theme3Components.LsgFormFieldConsent;
|
|
1953
|
+
theme3Components.LsgFormStep;
|
|
1422
1954
|
|
|
1423
1955
|
export { LsgBanner, LsgButton, LsgCard, LsgCards, LsgFooter, LsgHeader, LsgLanguageSwitcher, LsgLogo, LsgNavigation, LsgQuickLinks, LsgSearchOverlay, LsgSearchTrigger, LsgSocialMediaIcons, Theme1LsgBanner, Theme1LsgButton, Theme1LsgCard, Theme1LsgCards, Theme1LsgFooter, Theme1LsgHeader, Theme1LsgLanguageSwitcher, Theme1LsgLogo, Theme1LsgNavigation, Theme1LsgQuickLinks, Theme1LsgSearchOverlay, Theme1LsgSearchTrigger, Theme1LsgSocialMediaIcons, Theme2LsgBanner, Theme2LsgButton, Theme2LsgCard, Theme2LsgCards, Theme2LsgFooter, Theme2LsgHeader, Theme2LsgLanguageSwitcher, Theme2LsgLogo, Theme2LsgNavigation, Theme2LsgQuickLinks, Theme2LsgSearchOverlay, Theme2LsgSearchTrigger, Theme2LsgSocialMediaIcons, Theme3LsgBanner, Theme3LsgButton, Theme3LsgCard, Theme3LsgCards, Theme3LsgFooter, Theme3LsgHeader, Theme3LsgLanguageSwitcher, Theme3LsgLogo, Theme3LsgNavigation, Theme3LsgQuickLinks, Theme3LsgSearchOverlay, Theme3LsgSearchTrigger, Theme3LsgSocialMediaIcons, theme1Components, theme2Components, theme3Components };
|
|
1424
1956
|
//# sourceMappingURL=index.esm.js.map
|