@adyen/kyc-components 2.67.1 → 2.68.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.
@@ -21,10 +21,7 @@ class UserEvents {
21
21
  };
22
22
  this.baseTrackingPayload = {
23
23
  category: "onboarding",
24
- subCategory: "hosted onboarding",
25
- countryCode: void 0,
26
- capabilities: void 0,
27
- task: void 0
24
+ subCategory: "hosted onboarding"
28
25
  };
29
26
  this.sharedEventProperties = {};
30
27
  }
@@ -42,7 +39,7 @@ class UserEvents {
42
39
  */
43
40
  addEvent(eventName, properties) {
44
41
  const completeEvent = { ...this.baseTrackingPayload, ...properties };
45
- this.add({ type: "add_event", name: eventName, properties: { ...completeEvent } });
42
+ this.add({ type: "add_event", name: eventName, properties: completeEvent });
46
43
  this.notifySubscribers();
47
44
  }
48
45
  /**
@@ -99,7 +96,9 @@ class UserEvents {
99
96
  subscribe(callback) {
100
97
  this.subscriptions.add(callback);
101
98
  }
102
- /** Sets params that are sent on every event */
99
+ /**
100
+ * Sets params that are sent on every event
101
+ * */
103
102
  updateBaseTrackingPayload(baseTrackingPayload) {
104
103
  this.baseTrackingPayload = { ...this.baseTrackingPayload, ...baseTrackingPayload };
105
104
  }
@@ -2554,6 +2553,23 @@ const Button = ({
2554
2553
  );
2555
2554
  };
2556
2555
  const Divider = () => /* @__PURE__ */ jsx("hr", { className: "adyen-kyc-divider" });
2556
+ const Typography = ({
2557
+ el = "p",
2558
+ variant = "body",
2559
+ color = "primary",
2560
+ className,
2561
+ children,
2562
+ ...props
2563
+ }) => {
2564
+ const TypographyElement = el;
2565
+ const classNames = cx(
2566
+ className,
2567
+ "adyen-kyc-typography",
2568
+ `adyen-kyc-typography--${color}`,
2569
+ `adyen-kyc-typography--${variant}`
2570
+ );
2571
+ return /* @__PURE__ */ jsx(TypographyElement, { ...props, className: classNames, children });
2572
+ };
2557
2573
  const Accordion = ({
2558
2574
  title,
2559
2575
  children,
@@ -2580,7 +2596,7 @@ const Accordion = ({
2580
2596
  /* @__PURE__ */ jsxs("summary", { className: "adyen-kyc-accordion__summary", children: [
2581
2597
  expandOnLeft && /* @__PURE__ */ jsx(Icon, { name: "chevron-down", className: "adyen-kyc-accordion__arrow" }),
2582
2598
  icon,
2583
- title,
2599
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", children: title }),
2584
2600
  !expandOnLeft && /* @__PURE__ */ jsx(
2585
2601
  Icon,
2586
2602
  {
@@ -2589,7 +2605,7 @@ const Accordion = ({
2589
2605
  }
2590
2606
  )
2591
2607
  ] }),
2592
- /* @__PURE__ */ jsx("section", { className: "adyen-kyc-accordion__content", children })
2608
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-accordion__content", children })
2593
2609
  ]
2594
2610
  }
2595
2611
  );
@@ -2650,7 +2666,7 @@ const Alert = ({
2650
2666
  children: [
2651
2667
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-alert__header", children: [
2652
2668
  renderedIcon,
2653
- title && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-alert__title", children: title }),
2669
+ title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: "adyen-kyc-alert__title", children: title }),
2654
2670
  !!actions && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-alert__actions", children: actions })
2655
2671
  ] }),
2656
2672
  !!children && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-alert__explanation", children })
@@ -2669,7 +2685,7 @@ const Alert = ({
2669
2685
  children: [
2670
2686
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-alert__header", children: [
2671
2687
  renderedIcon,
2672
- title && /* @__PURE__ */ jsx("span", { className: "adyen-kyc-alert__title", children: title }),
2688
+ title && /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "body-strongest", className: "adyen-kyc-alert__title", children: title }),
2673
2689
  type === "dismissible" && /* @__PURE__ */ jsx(
2674
2690
  Button,
2675
2691
  {
@@ -4025,23 +4041,6 @@ const SelectButtonContentSingle = ({
4025
4041
  ] });
4026
4042
  };
4027
4043
  const SelectButtonContentMulti = ({ active, placeholder }) => active && active.length > 0 ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-dropdown-selected-items", children: active.map((item) => /* @__PURE__ */ jsx(Tag, { className: item.className, variant: "grey", children: (item == null ? void 0 : item.selectedOptionName) || (item == null ? void 0 : item.name) || placeholder }, item.id)) }) : /* @__PURE__ */ jsx("span", { className: "adyen-kyc-dropdown-button__text adyen-kyc-dropdown-button__text--placeholder", children: placeholder });
4028
- const Typography = ({
4029
- el = "p",
4030
- variant = "body",
4031
- color = "primary",
4032
- className,
4033
- children,
4034
- ...props
4035
- }) => {
4036
- const TypographyElement = el;
4037
- const classNames = cx(
4038
- className,
4039
- "adyen-kyc-typography",
4040
- `adyen-kyc-typography--${color}`,
4041
- `adyen-kyc-typography--${variant}`
4042
- );
4043
- return /* @__PURE__ */ jsx(TypographyElement, { ...props, className: classNames, children });
4044
- };
4045
4044
  function Checkbox({
4046
4045
  classNameModifiers = [],
4047
4046
  label,
@@ -21570,7 +21569,6 @@ function Card({
21570
21569
  active,
21571
21570
  disabled,
21572
21571
  fetching,
21573
- warning,
21574
21572
  warningMessage,
21575
21573
  title,
21576
21574
  subTitle,
@@ -21619,7 +21617,7 @@ function Card({
21619
21617
  headerButton && headerButton
21620
21618
  ] }),
21621
21619
  children && /* @__PURE__ */ jsx("div", { role: "region", className: "adyen-kyc-card__body", children }),
21622
- warning && /* @__PURE__ */ jsx(Alert, { className: "adyen-kyc-card__warning", title: warningMessage, variant: "warning" })
21620
+ !!warningMessage && /* @__PURE__ */ jsx(Alert, { className: "adyen-kyc-card__warning", title: warningMessage, variant: "warning" })
21623
21621
  ]
21624
21622
  }
21625
21623
  );
@@ -23160,7 +23158,7 @@ function TrustRegistrationDetailsComponent(props) {
23160
23158
  Alert,
23161
23159
  {
23162
23160
  variant: "info",
23163
- title: /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: i18n.get("makeSureToHaveYourTrustDeed") }),
23161
+ title: i18n.get("makeSureToHaveYourTrustDeed"),
23164
23162
  className: "adyen-kyc-u-margin-bottom-16"
23165
23163
  }
23166
23164
  ),
@@ -29636,9 +29634,7 @@ const splitAtFirstOccurrence = (str, separator) => {
29636
29634
  };
29637
29635
  const getTrustMemberOwnerId = (trustMemberId, entityAssociations) => {
29638
29636
  var _a;
29639
- return (_a = entityAssociations.find(
29640
- (association) => association.associatorId === trustMemberId && association.type === TrustMemberTypes.TRUSTEE
29641
- )) == null ? void 0 : _a.legalEntityId;
29637
+ return (_a = entityAssociations.find((association) => association.associatorId === trustMemberId)) == null ? void 0 : _a.legalEntityId;
29642
29638
  };
29643
29639
  const getFallbackName = (exemptSettlorAssociation) => {
29644
29640
  const [firstName, lastName] = splitAtFirstOccurrence(exemptSettlorAssociation.name ?? "", " ");
@@ -31635,7 +31631,6 @@ const TaskListItem = ({
31635
31631
  info,
31636
31632
  loading = false,
31637
31633
  showErrorAlerts = "onErrorStatus",
31638
- showWarningAlert = false,
31639
31634
  warningMessage,
31640
31635
  removeEntity,
31641
31636
  isRemoveDisabled = false,
@@ -31661,7 +31656,6 @@ const TaskListItem = ({
31661
31656
  Card,
31662
31657
  {
31663
31658
  stateful: onNavigateToTask && !loading && !disabled,
31664
- warning: showWarningAlert,
31665
31659
  warningMessage,
31666
31660
  onClick: loading ? void 0 : handleNavigateToTask,
31667
31661
  onKeyDown: handleKeys(["Enter"], handleNavigateToTask ?? noop),
@@ -31977,7 +31971,6 @@ function TaskListComponent({
31977
31971
  legalEntityResponse,
31978
31972
  getOwnDecisionMakersLegalEntityIds(legalEntityResponse)
31979
31973
  ) : TaskStatus.DETAILS_REQUIRED,
31980
- showWarningAlert: showDecisionMakersWarning,
31981
31974
  warningMessage: remediationMessages[TaskTypes.DECISION_MAKER]
31982
31975
  }
31983
31976
  )
@@ -39322,12 +39315,8 @@ const convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
39322
39315
  ...sessionData
39323
39316
  };
39324
39317
  };
39325
- const useAnalytics = async ({
39326
- onUserEvent,
39327
- legalEntityId,
39328
- sdkVersion,
39329
- componentName
39330
- }) => {
39318
+ const useAnalytics = ({ onUserEvent, legalEntityId, componentName }) => {
39319
+ const sdkVersion = "2.68.1";
39331
39320
  const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
39332
39321
  const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
39333
39322
  useEffect(() => {
@@ -39353,10 +39342,7 @@ const useAnalytics = async ({
39353
39342
  }
39354
39343
  } else if (onUserEvent) {
39355
39344
  userEvents.subscribe((data) => {
39356
- onUserEvent({
39357
- ...data,
39358
- properties: { ...sessionData, ...data.properties || {} }
39359
- });
39345
+ onUserEvent(data);
39360
39346
  });
39361
39347
  }
39362
39348
  })();
@@ -39656,11 +39642,9 @@ const ConfigurationApiProvider = ({
39656
39642
  }) => {
39657
39643
  const authContext = useAuthContext();
39658
39644
  const { isEmbeddedDropin, loadingContext } = authContext;
39659
- const sdkVersion = "2.67.1";
39660
39645
  useAnalytics({
39661
39646
  onUserEvent,
39662
39647
  legalEntityId: rootLegalEntityId,
39663
- sdkVersion,
39664
39648
  componentName
39665
39649
  });
39666
39650
  const contextValue = useMemo(
@@ -39674,7 +39658,7 @@ const ConfigurationApiProvider = ({
39674
39658
  [authContext, rootLegalEntityId]
39675
39659
  );
39676
39660
  return /* @__PURE__ */ jsxs(ConfigurationApiContext.Provider, { value: contextValue, children: [
39677
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: sdkVersion }),
39661
+ /* @__PURE__ */ jsx("span", { className: "adyen-kyc__sdk-version", hidden: true, children: "2.68.1" }),
39678
39662
  children
39679
39663
  ] });
39680
39664
  };
@@ -40290,7 +40274,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40290
40274
  };
40291
40275
  const copyToClipboard = async () => {
40292
40276
  const toCopy = {
40293
- sdkVersion: "2.67.1",
40277
+ sdkVersion: "2.68.1",
40294
40278
  experiments: Object.fromEntries(allExperimentsWithValues),
40295
40279
  settings: Object.fromEntries(allSettingsWithValues)
40296
40280
  };
@@ -40355,7 +40339,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
40355
40339
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx("table", { children: /* @__PURE__ */ jsxs("tbody", { children: [
40356
40340
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40357
40341
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "SDK version" }),
40358
- /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.67.1" })
40342
+ /* @__PURE__ */ jsx(Tag, { variant: "green", className: "adyen-kyc-tag--large", children: "2.68.1" })
40359
40343
  ] }) }),
40360
40344
  /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsxs("td", { children: [
40361
40345
  /* @__PURE__ */ jsx("span", { className: "adyen-kyc-debug-modal__table-key", children: "rootLegalEntityId" }),
@@ -40497,7 +40481,12 @@ class UIElement extends BaseElement {
40497
40481
  const baseTracking = getBaseTracking(
40498
40482
  this.props.componentProps
40499
40483
  );
40500
- userEvents.updateBaseTrackingPayload(baseTracking);
40484
+ userEvents.updateBaseTrackingPayload({
40485
+ ...baseTracking,
40486
+ componentName: this.props.componentName,
40487
+ sdkVersion: "2.68.1",
40488
+ userAgent: navigator.userAgent
40489
+ });
40501
40490
  return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
40502
40491
  AuthProvider,
40503
40492
  {
package/dist/style.css CHANGED
@@ -256,9 +256,9 @@ button[disabled]:hover {
256
256
  }
257
257
  .adyen-kyc-link:focus {
258
258
  box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
259
- border-radius: var(--adyen-sdk-border-radius-xs, 2px);
260
259
  transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
261
260
  transition-property: box-shadow;
261
+ border-radius: var(--adyen-sdk-border-radius-xs, 2px);
262
262
  }
263
263
  .adyen-kyc-link:visited {
264
264
  color: var(--adyen-sdk-color-link-primary, #00112c);
@@ -460,11 +460,7 @@ button[disabled]:hover {
460
460
  }
461
461
 
462
462
  .adyen-kyc-alert__title {
463
- color: var(--adyen-sdk-color-label-primary, #00112c);
464
463
  flex-grow: 1;
465
- font-size: var(--adyen-sdk-text-body-font-size, 14px);
466
- font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
467
- line-height: var(--adyen-sdk-text-body-line-height, 20px);
468
464
  margin-left: var(--adyen-sdk-spacer-070, 16px);
469
465
  }
470
466
 
@@ -559,6 +555,131 @@ button[disabled]:hover {
559
555
  .adyen-kyc-accordion[open] summary {
560
556
  margin-bottom: var(--adyen-sdk-spacer-020, 4px);
561
557
  user-select: auto;
558
+ }/* #region Borders */
559
+ /* #endregion */
560
+ /* for container queries */
561
+ /* #region Z-index */
562
+ /* #endregion */
563
+ /* #region Timing functions */
564
+ /* #endregion */
565
+ /* #region Inline components */
566
+ /* #endregion */
567
+ .adyen-kyc-typography {
568
+ color: var(--adyen-sdk-color-label-primary, #00112c);
569
+ font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
570
+ font-size: var(--adyen-sdk-text-body-font-size, 14px);
571
+ font-weight: var(--adyen-sdk-text-body-font-weight, 400);
572
+ line-height: var(--adyen-sdk-text-body-line-height, 20px);
573
+ -webkit-font-smoothing: antialiased;
574
+ -moz-osx-font-smoothing: grayscale;
575
+ display: block;
576
+ margin: var(--adyen-sdk-spacer-000, 0px);
577
+ }
578
+ .adyen-kyc-typography--body {
579
+ font-size: var(--adyen-sdk-text-body-font-size, 14px);
580
+ font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
581
+ line-height: var(--adyen-sdk-text-body-line-height, 20px);
582
+ letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
583
+ font-weight: var(--adyen-sdk-text-body-font-weight, 400);
584
+ }
585
+ .adyen-kyc-typography--body-stronger {
586
+ font-size: var(--adyen-sdk-text-body-font-size, 14px);
587
+ font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
588
+ line-height: var(--adyen-sdk-text-body-line-height, 20px);
589
+ letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
590
+ font-weight: var(--adyen-sdk-text-body-stronger-font-weight, 500);
591
+ }
592
+ .adyen-kyc-typography--body-strongest {
593
+ font-size: var(--adyen-sdk-text-body-font-size, 14px);
594
+ font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
595
+ line-height: var(--adyen-sdk-text-body-line-height, 20px);
596
+ letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
597
+ font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
598
+ }
599
+ .adyen-kyc-typography--caption {
600
+ font-size: var(--adyen-sdk-text-caption-font-size, 12px);
601
+ font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
602
+ font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
603
+ line-height: var(--adyen-sdk-text-caption-line-height, 18px);
604
+ letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
605
+ font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
606
+ }
607
+ .adyen-kyc-typography--caption-stronger {
608
+ font-size: var(--adyen-sdk-text-caption-font-size, 12px);
609
+ font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
610
+ font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
611
+ line-height: var(--adyen-sdk-text-caption-line-height, 18px);
612
+ letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
613
+ font-weight: var(--adyen-sdk-text-caption-stronger-font-weight, 500);
614
+ }
615
+ .adyen-kyc-typography--title {
616
+ font-size: var(--adyen-sdk-text-title-font-size, 16px);
617
+ font-family: var(--adyen-sdk-text-title-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
618
+ font-weight: var(--adyen-sdk-text-title-font-weight, 600);
619
+ line-height: var(--adyen-sdk-text-title-line-height, 26px);
620
+ letter-spacing: var(--adyen-sdk-text-title-letter-spacing, 0);
621
+ }
622
+ @container main (max-width: 680px) {
623
+ .adyen-kyc-typography--title {
624
+ font-size: var(--adyen-sdk-text-title-mobile-font-size, 16px);
625
+ line-height: var(--adyen-sdk-text-title-mobile-line-height, 26px);
626
+ }
627
+ }
628
+ .adyen-kyc-typography--title-m {
629
+ font-size: var(--adyen-sdk-text-title-m-font-size, 20px);
630
+ font-family: var(--adyen-sdk-text-title-m-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
631
+ font-weight: var(--adyen-sdk-text-title-m-font-weight, 600);
632
+ line-height: var(--adyen-sdk-text-title-m-line-height, 30px);
633
+ letter-spacing: var(--adyen-sdk-text-title-m-letter-spacing, 0);
634
+ }
635
+ @container main (max-width: 680px) {
636
+ .adyen-kyc-typography--title-m {
637
+ font-size: var(--adyen-sdk-text-title-m-mobile-font-size, 18px);
638
+ line-height: var(--adyen-sdk-text-title-m-mobile-line-height, 28px);
639
+ }
640
+ }
641
+ .adyen-kyc-typography--title-l {
642
+ font-size: var(--adyen-sdk-text-title-l-font-size, 24px);
643
+ font-family: var(--adyen-sdk-text-title-l-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
644
+ font-weight: var(--adyen-sdk-text-title-l-font-weight, 600);
645
+ line-height: var(--adyen-sdk-text-title-l-line-height, 34px);
646
+ letter-spacing: var(--adyen-sdk-text-title-l-letter-spacing, 0);
647
+ }
648
+ @container main (max-width: 680px) {
649
+ .adyen-kyc-typography--title-l {
650
+ font-size: var(--adyen-sdk-text-title-l-mobile-font-size, 20px);
651
+ line-height: var(--adyen-sdk-text-title-l-mobile-line-height, 30px);
652
+ }
653
+ }
654
+ .adyen-kyc-typography--primary {
655
+ color: var(--adyen-sdk-color-label-primary, #00112c);
656
+ }
657
+ .adyen-kyc-typography--secondary {
658
+ color: var(--adyen-sdk-color-label-secondary, #5c687c);
659
+ }
660
+ .adyen-kyc-typography--tertiary {
661
+ color: var(--adyen-sdk-color-label-tertiary, #8d95a3);
662
+ }
663
+ .adyen-kyc-typography--disabled {
664
+ color: var(--adyen-sdk-color-label-disabled, #8d95a3);
665
+ }
666
+ .adyen-kyc-typography--success {
667
+ color: var(--adyen-sdk-color-label-success, #07893c);
668
+ }
669
+ .adyen-kyc-typography--warning {
670
+ color: var(--adyen-sdk-color-label-warning, #b06300);
671
+ }
672
+ .adyen-kyc-typography--critical {
673
+ color: var(--adyen-sdk-color-label-critical, #e22d2d);
674
+ }
675
+ .adyen-kyc-typography--highlight {
676
+ color: var(--adyen-sdk-color-label-highlight, #0070f5);
677
+ }
678
+ .adyen-kyc-typography--inverse-primary {
679
+ color: var(--adyen-sdk-color-label-inverse-primary, #ffffff);
680
+ }
681
+ .adyen-kyc-typography--inverse-secondary {
682
+ color: var(--adyen-sdk-color-label-inverse-secondary, #9ea6b1);
562
683
  }.adyen-kyc-individual .adyen-kyc-form {
563
684
  margin-bottom: var(--adyen-sdk-spacer-070, 16px);
564
685
  }.adyen-kyc-field {
@@ -1015,123 +1136,7 @@ button[disabled]:hover {
1015
1136
  /* #endregion */
1016
1137
  /* #region Inline components */
1017
1138
  /* #endregion */
1018
- .adyen-kyc-typography {
1019
- color: var(--adyen-sdk-color-label-primary, #00112c);
1020
- font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1021
- font-size: var(--adyen-sdk-text-body-font-size, 14px);
1022
- font-weight: var(--adyen-sdk-text-body-font-weight, 400);
1023
- line-height: var(--adyen-sdk-text-body-line-height, 20px);
1024
- -webkit-font-smoothing: antialiased;
1025
- -moz-osx-font-smoothing: grayscale;
1026
- display: block;
1027
- margin: var(--adyen-sdk-spacer-000, 0px);
1028
- }
1029
- .adyen-kyc-typography--body {
1030
- font-size: var(--adyen-sdk-text-body-font-size, 14px);
1031
- font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1032
- line-height: var(--adyen-sdk-text-body-line-height, 20px);
1033
- letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
1034
- font-weight: var(--adyen-sdk-text-body-font-weight, 400);
1035
- }
1036
- .adyen-kyc-typography--body-stronger {
1037
- font-size: var(--adyen-sdk-text-body-font-size, 14px);
1038
- font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1039
- line-height: var(--adyen-sdk-text-body-line-height, 20px);
1040
- letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
1041
- font-weight: var(--adyen-sdk-text-body-stronger-font-weight, 500);
1042
- }
1043
- .adyen-kyc-typography--body-strongest {
1044
- font-size: var(--adyen-sdk-text-body-font-size, 14px);
1045
- font-family: var(--adyen-sdk-text-body-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1046
- line-height: var(--adyen-sdk-text-body-line-height, 20px);
1047
- letter-spacing: var(--adyen-sdk-text-body-letter-spacing, 0);
1048
- font-weight: var(--adyen-sdk-text-body-strongest-font-weight, 600);
1049
- }
1050
- .adyen-kyc-typography--caption {
1051
- font-size: var(--adyen-sdk-text-caption-font-size, 12px);
1052
- font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1053
- font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
1054
- line-height: var(--adyen-sdk-text-caption-line-height, 18px);
1055
- letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
1056
- font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
1057
- }
1058
- .adyen-kyc-typography--caption-stronger {
1059
- font-size: var(--adyen-sdk-text-caption-font-size, 12px);
1060
- font-family: var(--adyen-sdk-text-caption-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1061
- font-weight: var(--adyen-sdk-text-caption-font-weight, 400);
1062
- line-height: var(--adyen-sdk-text-caption-line-height, 18px);
1063
- letter-spacing: var(--adyen-sdk-text-caption-letter-spacing, 0);
1064
- font-weight: var(--adyen-sdk-text-caption-stronger-font-weight, 500);
1065
- }
1066
- .adyen-kyc-typography--title {
1067
- font-size: var(--adyen-sdk-text-title-font-size, 16px);
1068
- font-family: var(--adyen-sdk-text-title-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1069
- font-weight: var(--adyen-sdk-text-title-font-weight, 600);
1070
- line-height: var(--adyen-sdk-text-title-line-height, 26px);
1071
- letter-spacing: var(--adyen-sdk-text-title-letter-spacing, 0);
1072
- }
1073
- @container main (max-width: 680px) {
1074
- .adyen-kyc-typography--title {
1075
- font-size: var(--adyen-sdk-text-title-mobile-font-size, 16px);
1076
- line-height: var(--adyen-sdk-text-title-mobile-line-height, 26px);
1077
- }
1078
- }
1079
- .adyen-kyc-typography--title-m {
1080
- font-size: var(--adyen-sdk-text-title-m-font-size, 20px);
1081
- font-family: var(--adyen-sdk-text-title-m-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1082
- font-weight: var(--adyen-sdk-text-title-m-font-weight, 600);
1083
- line-height: var(--adyen-sdk-text-title-m-line-height, 30px);
1084
- letter-spacing: var(--adyen-sdk-text-title-m-letter-spacing, 0);
1085
- }
1086
- @container main (max-width: 680px) {
1087
- .adyen-kyc-typography--title-m {
1088
- font-size: var(--adyen-sdk-text-title-m-mobile-font-size, 18px);
1089
- line-height: var(--adyen-sdk-text-title-m-mobile-line-height, 28px);
1090
- }
1091
- }
1092
- .adyen-kyc-typography--title-l {
1093
- font-size: var(--adyen-sdk-text-title-l-font-size, 24px);
1094
- font-family: var(--adyen-sdk-text-title-l-font-family, 'Adyen Variable', Roboto, Oxygen, 'Open Sans', 'Helvetica Neue', Arial, sans-serif);
1095
- font-weight: var(--adyen-sdk-text-title-l-font-weight, 600);
1096
- line-height: var(--adyen-sdk-text-title-l-line-height, 34px);
1097
- letter-spacing: var(--adyen-sdk-text-title-l-letter-spacing, 0);
1098
- }
1099
- @container main (max-width: 680px) {
1100
- .adyen-kyc-typography--title-l {
1101
- font-size: var(--adyen-sdk-text-title-l-mobile-font-size, 20px);
1102
- line-height: var(--adyen-sdk-text-title-l-mobile-line-height, 30px);
1103
- }
1104
- }
1105
- .adyen-kyc-typography--primary {
1106
- color: var(--adyen-sdk-color-label-primary, #00112c);
1107
- }
1108
- .adyen-kyc-typography--secondary {
1109
- color: var(--adyen-sdk-color-label-secondary, #5c687c);
1110
- }
1111
- .adyen-kyc-typography--tertiary {
1112
- color: var(--adyen-sdk-color-label-tertiary, #8d95a3);
1113
- }
1114
- .adyen-kyc-typography--disabled {
1115
- color: var(--adyen-sdk-color-label-disabled, #8d95a3);
1116
- }
1117
- .adyen-kyc-typography--success {
1118
- color: var(--adyen-sdk-color-label-success, #07893c);
1119
- }
1120
- .adyen-kyc-typography--warning {
1121
- color: var(--adyen-sdk-color-label-warning, #b06300);
1122
- }
1123
- .adyen-kyc-typography--critical {
1124
- color: var(--adyen-sdk-color-label-critical, #e22d2d);
1125
- }
1126
- .adyen-kyc-typography--highlight {
1127
- color: var(--adyen-sdk-color-label-highlight, #0070f5);
1128
- }
1129
- .adyen-kyc-typography--inverse-primary {
1130
- color: var(--adyen-sdk-color-label-inverse-primary, #ffffff);
1131
- }
1132
- .adyen-kyc-typography--inverse-secondary {
1133
- color: var(--adyen-sdk-color-label-inverse-secondary, #9ea6b1);
1134
- }.adyen-kyc-checkbox {
1139
+ .adyen-kyc-checkbox {
1135
1140
  display: block;
1136
1141
  }
1137
1142
  .adyen-kyc-checkbox__label {
@@ -1160,6 +1165,11 @@ button[disabled]:hover {
1160
1165
  /* Check */
1161
1166
  /* Box */
1162
1167
  }
1168
+ .adyen-kyc-checkbox__input:focus-visible + .adyen-kyc-checkbox__label::after {
1169
+ box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
1170
+ transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
1171
+ transition-property: box-shadow;
1172
+ }
1163
1173
  .adyen-kyc-checkbox__input:hover + .adyen-kyc-checkbox__label::after {
1164
1174
  background-color: var(--adyen-sdk-color-background-primary-hover, #f7f7f8);
1165
1175
  }
@@ -1498,7 +1508,6 @@ button[disabled]:hover {
1498
1508
  }
1499
1509
  .adyen-kyc-input-radio__input:focus {
1500
1510
  box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
1501
- border-radius: var(--adyen-sdk-border-radius-xs, 2px);
1502
1511
  transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
1503
1512
  transition-property: box-shadow;
1504
1513
  }
@@ -2323,6 +2332,11 @@ fieldset {
2323
2332
  z-index: 2;
2324
2333
  box-shadow: var(--adyen-sdk-shadow-medium, 0px 6px 12px rgba(0, 17, 44, 0.08), 0px 2px 4px rgba(0, 17, 44, 0.04));
2325
2334
  }
2335
+ .adyen-kyc-card.adyen-kyc-card--stateful:focus-visible {
2336
+ box-shadow: 0 0 0 var(--adyen-sdk-focus-ring-spacer, 1px) var(--adyen-sdk-color-background-primary, #ffffff), 0 0 0 var(--adyen-sdk-focus-ring-outline, 3px) var(--adyen-sdk-focus-ring-color, rgba(0, 112, 245, 0.8));
2337
+ transition: var(--adyen-sdk-animation-duration-fast, 100ms) var(--adyen-sdk-animation-easing-standard, cubic-bezier(0.2, 0, 0.4, 0.9));
2338
+ transition-property: box-shadow;
2339
+ }
2326
2340
 
2327
2341
  .adyen-kyc-card.adyen-kyc-card--active {
2328
2342
  border-color: var(--adyen-sdk-color-outline-primary, #dbdee2);
@@ -1,4 +1,4 @@
1
1
  import '../TaskListItem.scss';
2
2
  import type { TaskListItemProps } from '../types';
3
- declare const TaskListItem: ({ titleKey, title, icon, status, statusLabel, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts, showWarningAlert, warningMessage, removeEntity, isRemoveDisabled, handleIsRemoveDisabled, testId, enableTracking, }: TaskListItemProps) => import("preact").JSX.Element;
3
+ declare const TaskListItem: ({ titleKey, title, icon, status, statusLabel, onNavigateToTask, disabled, problems, downloadHandler, info, loading, showErrorAlerts, warningMessage, removeEntity, isRemoveDisabled, handleIsRemoveDisabled, testId, enableTracking, }: TaskListItemProps) => import("preact").JSX.Element;
4
4
  export default TaskListItem;
@@ -85,7 +85,6 @@ export interface TaskListItemProps extends TaskStatusProps {
85
85
  onNavigateToTask?: () => void;
86
86
  loading?: boolean;
87
87
  showErrorAlerts?: 'onErrorStatus' | 'always';
88
- showWarningAlert?: boolean;
89
88
  warningMessage?: string;
90
89
  removeEntity?: () => void;
91
90
  isRemoveDisabled?: boolean;
@@ -1,4 +1,4 @@
1
1
  import './_card.component.scss';
2
2
  import type { JSX } from 'preact';
3
3
  import type { CardProps } from './types';
4
- export declare function Card({ className, children, stateful, active, disabled, fetching, warning, warningMessage, title, subTitle, headerButton, background, onClick, onKeyDown, }: CardProps): JSX.Element;
4
+ export declare function Card({ className, children, stateful, active, disabled, fetching, warningMessage, title, subTitle, headerButton, background, onClick, onKeyDown, }: CardProps): JSX.Element;
@@ -6,7 +6,6 @@ export interface CardProps {
6
6
  active?: boolean;
7
7
  disabled?: boolean;
8
8
  fetching?: boolean;
9
- warning?: boolean;
10
9
  warningMessage?: string;
11
10
  title?: string;
12
11
  subTitle?: string;
@@ -1,17 +1,16 @@
1
1
  import type { ComponentMap } from '../../components';
2
2
  import type { EmbeddedAnalyticsSessionRequest } from '../models/api/analytics';
3
- import type { AnalyticsEventPayload, EventProperty, EventQueueItem, EventType, UserEventCallback } from '../user-events';
3
+ import type { AnalyticsEventPayload, EventQueueItem, EventType, MixpanelProperty, UserEventCallback } from '../user-events';
4
4
  export type UseAnalyticsProps = {
5
5
  legalEntityId: string;
6
6
  onUserEvent?: UserEventCallback;
7
- sdkVersion: string;
8
7
  componentName: keyof ComponentMap;
9
8
  };
10
9
  type EmbeddedEventItem = {
11
10
  eventType: EventType;
12
11
  eventName: string;
13
- eventData: AnalyticsEventPayload | Record<string, EventProperty>;
12
+ eventData: AnalyticsEventPayload | Record<string, MixpanelProperty>;
14
13
  };
15
14
  export declare const convertToEmbeddedEvent: (eventQueueItem: EventQueueItem, sessionData: EmbeddedAnalyticsSessionRequest) => EmbeddedEventItem & EmbeddedAnalyticsSessionRequest;
16
- export declare const useAnalytics: ({ onUserEvent, legalEntityId, sdkVersion, componentName, }: UseAnalyticsProps) => Promise<void>;
15
+ export declare const useAnalytics: ({ onUserEvent, legalEntityId, componentName }: UseAnalyticsProps) => void;
17
16
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { SetOptional } from 'type-fest';
2
2
  import type { TaskTypes } from '../components/TaskList/types';
3
3
  import type { LegalEntityType } from './models/api/legal-entity-type';
4
- export type EventProperty = string | number | boolean | any[] | null | undefined;
4
+ export type MixpanelProperty = string | number | boolean | any[] | null | undefined;
5
5
  /**
6
6
  * Level of the funnel that is relevant for this event
7
7
  */
@@ -13,14 +13,17 @@ export type ActionType = 'start' | 'submit' | 'save' | 'add' | 'edit' | 'remove'
13
13
  /**
14
14
  * The base event properties that are sent with every event
15
15
  */
16
- type BaseEventProperties = {
16
+ export type BaseEventProperties = {
17
17
  category: 'onboarding';
18
18
  subCategory: 'hosted onboarding';
19
- countryCode?: string;
20
19
  capabilities?: string[];
20
+ componentName?: string;
21
+ countryCode?: string;
21
22
  entityType?: LegalEntityType;
22
- task?: TaskTypes;
23
23
  locale?: string;
24
+ sdkVersion?: string;
25
+ task?: TaskTypes;
26
+ userAgent?: string;
24
27
  };
25
28
  /**
26
29
  * Additional event properties
@@ -34,14 +37,14 @@ export interface AdditionalEventProperties {
34
37
  returnType?: 'backend' | 'validation' | (string & {});
35
38
  returnValue?: string | string[];
36
39
  label?: string;
37
- [key: string]: EventProperty;
40
+ [key: string]: MixpanelProperty;
38
41
  }
39
42
  /**
40
43
  * Name of the tracked event
41
44
  * Can be either a custom name or one of the pre-defined values
42
45
  */
43
46
  export type EventName = 'Clicked button' | 'Clicked accordion' | 'Success' | 'Encountered error' | 'Landed on page' | 'Interacted with form field' | (string & {});
44
- export type AnalyticsEventPayload = BaseEventProperties & AdditionalEventProperties;
47
+ export type AnalyticsEventPayload = Required<BaseEventProperties> & AdditionalEventProperties;
45
48
  export type EventType = 'add_event' | 'start_event';
46
49
  export type EventQueueItem = {
47
50
  type: EventType;
@@ -57,7 +60,7 @@ declare class UserEvents {
57
60
  /** properties not set with every event but that may be shared between some events
58
61
  * ex. `page` value for `Interacted with form field` events
59
62
  */
60
- sharedEventProperties: Partial<AdditionalEventProperties>;
63
+ private sharedEventProperties;
61
64
  constructor();
62
65
  protected add(...args: EventQueueItem[]): void;
63
66
  protected notifySubscribers(): void;
@@ -99,10 +102,14 @@ declare class UserEvents {
99
102
  * ```
100
103
  */
101
104
  subscribe(callback: UserEventCallback): void;
102
- /** Sets params that are sent on every event */
105
+ /**
106
+ * Sets params that are sent on every event
107
+ * */
103
108
  updateBaseTrackingPayload(baseTrackingPayload: Partial<BaseEventProperties>): void;
104
- /** Sets params that may be shared between events */
105
- updateSharedEventProperties: (props: Record<string, EventProperty>) => void;
109
+ /**
110
+ * Sets params that may be shared between events
111
+ * */
112
+ updateSharedEventProperties: (props: Record<string, MixpanelProperty>) => void;
106
113
  /**
107
114
  * Removes a subscribed callback
108
115
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.67.1",
3
+ "version": "2.68.1",
4
4
  "keywords": [
5
5
  "adyen",
6
6
  "adyen-kyc",