@incodetech/web 0.0.0-dev-20260609-6cfe5bbe → 0.0.0-dev-20260609-155c16bf

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.
@@ -10,6 +10,18 @@
10
10
  }
11
11
  }
12
12
 
13
+ .IncodeSignature .IncodeSrOnly {
14
+ clip-path: inset(50%);
15
+ white-space: nowrap;
16
+ border-width: 0;
17
+ width: 1px;
18
+ height: 1px;
19
+ margin: -1px;
20
+ padding: 0;
21
+ position: absolute;
22
+ overflow: hidden;
23
+ }
24
+
13
25
  .IncodeSignature .IncodeSignatureContent {
14
26
  width: 100%;
15
27
  height: 100%;
@@ -28,10 +40,6 @@
28
40
  animation-fill-mode: both;
29
41
  }
30
42
 
31
- .IncodeSignature .IncodeSignatureButtonContainer .IncodeButton.IncodeButtonPrimary {
32
- transition: background-color .35s ease-out, color .35s ease-out, border-color .35s ease-out, opacity .35s ease-out, box-shadow .35s ease-out;
33
- }
34
-
35
43
  .IncodeSignature .SignatureCanvasContainer {
36
44
  width: 100%;
37
45
  padding-inline: var(--spacing-16, var(--spacing-16, 16px));
@@ -7623,7 +7623,7 @@
7623
7623
  display: flex;
7624
7624
  }
7625
7625
 
7626
- .IncodeDynamicFormsPage .IncodeSrOnly {
7626
+ .IncodeDynamicFormsPage .IncodeSrOnly, .IncodeSignature .IncodeSrOnly {
7627
7627
  clip-path: inset(50%);
7628
7628
  white-space: nowrap;
7629
7629
  border-width: 0;
@@ -7653,10 +7653,6 @@
7653
7653
  animation-fill-mode: both;
7654
7654
  }
7655
7655
 
7656
- .IncodeSignature .IncodeSignatureButtonContainer .IncodeButton.IncodeButtonPrimary {
7657
- transition: background-color .35s ease-out, color .35s ease-out, border-color .35s ease-out, opacity .35s ease-out, box-shadow .35s ease-out;
7658
- }
7659
-
7660
7656
  .IncodeSignature .SignatureCanvasContainer {
7661
7657
  width: 100%;
7662
7658
  padding-inline: var(--spacing-16, var(--spacing-16, 16px));
@@ -696,7 +696,7 @@ var canvasToBlob = (canvas, mimeType, quality) => {
696
696
  }, mimeType, mimeType === "image/jpeg" || mimeType === "image/webp" ? quality : void 0);
697
697
  });
698
698
  };
699
- var SignatureCanvas = D(({ onBeginStroke, hasDrawing, placeholder, customPenColor, customPenStrokeWidth, customBackgroundColor, customBorderColor }, ref) => {
699
+ var SignatureCanvas = D(({ onBeginStroke, hasDrawing, placeholder, ariaLabel, customPenColor, customPenStrokeWidth, customBackgroundColor, customBorderColor }, ref) => {
700
700
  const containerRef = A(null);
701
701
  const canvasRef = A(null);
702
702
  const signaturePadRef = A(null);
@@ -785,9 +785,11 @@ var SignatureCanvas = D(({ onBeginStroke, hasDrawing, placeholder, customPenColo
785
785
  children: [/* @__PURE__ */ u("canvas", {
786
786
  class: "SignatureCanvas",
787
787
  ref: canvasRef,
788
- "aria-label": placeholder
788
+ role: "img",
789
+ "aria-label": ariaLabel ?? placeholder
789
790
  }), !hasDrawing && /* @__PURE__ */ u("p", {
790
791
  class: "SignatureCanvasPlaceholder",
792
+ "aria-hidden": "true",
791
793
  children: placeholder
792
794
  })]
793
795
  });
@@ -799,6 +801,7 @@ var SignatureContent = ({ config, onFinish, onError }) => {
799
801
  const { t } = useTranslation();
800
802
  const [state, manager] = useManager(() => createSignatureManager({ config }), { autoLoad: true });
801
803
  const [hasDrawing, setHasDrawing] = d(false);
804
+ const [announcement, setAnnouncement] = d("");
802
805
  const signatureRef = A(null);
803
806
  const error = state.status === "error" ? state.error : void 0;
804
807
  const isSubmitting = state.status === "submitting";
@@ -808,8 +811,9 @@ var SignatureContent = ({ config, onFinish, onError }) => {
808
811
  signatureRef.current.on();
809
812
  signatureRef.current.clear();
810
813
  setHasDrawing(false);
814
+ setAnnouncement(t("signature.cleared"));
811
815
  manager.setSignatureValid(false);
812
- }, [manager]);
816
+ }, [manager, t]);
813
817
  useModuleTerminalCallbacks({
814
818
  status: state.status === "finished" ? "finished" : "loading",
815
819
  onFinish
@@ -869,9 +873,11 @@ var SignatureContent = ({ config, onFinish, onError }) => {
869
873
  hasDrawing,
870
874
  onBeginStroke: () => {
871
875
  setHasDrawing(true);
876
+ setAnnouncement(t("signature.captured"));
872
877
  manager.setSignatureValid(true);
873
878
  },
874
879
  placeholder: t("signature.fullSignaturePlaceholder"),
880
+ ariaLabel: t("signature.canvasAriaLabel"),
875
881
  customBackgroundColor: config.canvasBackgroundColor,
876
882
  customBorderColor: config.canvasBorderColor,
877
883
  customPenColor: config.penColor,
@@ -879,15 +885,22 @@ var SignatureContent = ({ config, onFinish, onError }) => {
879
885
  }),
880
886
  /* @__PURE__ */ u(Spacer, { size: 8 }),
881
887
  /* @__PURE__ */ u(Button, {
882
- variant: "link",
888
+ variant: "secondary",
883
889
  disabled: !hasDrawing || isSubmitting,
884
890
  onClick: clearCanvas,
885
891
  children: t("signature.clear")
892
+ }),
893
+ /* @__PURE__ */ u("span", {
894
+ class: "IncodeSrOnly",
895
+ "aria-live": "polite",
896
+ "aria-atomic": "true",
897
+ children: announcement
886
898
  })
887
899
  ]
888
900
  }), /* @__PURE__ */ u("div", {
889
901
  class: "IncodeSignatureButtonContainer",
890
902
  children: /* @__PURE__ */ u(Button, {
903
+ variant: "primary",
891
904
  disabled: !canContinue,
892
905
  isLoading: isSubmitting,
893
906
  onClick: handleContinue,
@@ -6764,6 +6764,18 @@
6764
6764
  margin-top: 0;
6765
6765
  }
6766
6766
 
6767
+ .IncodeSignature .IncodeSrOnly {
6768
+ clip-path: inset(50%);
6769
+ white-space: nowrap;
6770
+ border-width: 0;
6771
+ width: 1px;
6772
+ height: 1px;
6773
+ margin: -1px;
6774
+ padding: 0;
6775
+ position: absolute;
6776
+ overflow: hidden;
6777
+ }
6778
+
6767
6779
  .IncodeSignature .IncodeSignatureContent {
6768
6780
  width: 100%;
6769
6781
  height: 100%;
@@ -6782,10 +6794,6 @@
6782
6794
  animation-fill-mode: both;
6783
6795
  }
6784
6796
 
6785
- .IncodeSignature .IncodeSignatureButtonContainer .IncodeButton.IncodeButtonPrimary {
6786
- transition: background-color .35s ease-out, color .35s ease-out, border-color .35s ease-out, opacity .35s ease-out, box-shadow .35s ease-out;
6787
- }
6788
-
6789
6797
  .IncodeSignature .SignatureCanvasContainer {
6790
6798
  width: 100%;
6791
6799
  padding-inline: var(--spacing-16, var(--spacing-16, 16px));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260609-6cfe5bbe",
3
+ "version": "0.0.0-dev-20260609-155c16bf",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -255,7 +255,7 @@
255
255
  "qrcode": "^1.5.4",
256
256
  "signature_pad": "^5.1.3",
257
257
  "tailwindcss": "^4.1.17",
258
- "@incodetech/core": "0.0.0-dev-20260609-6cfe5bbe"
258
+ "@incodetech/core": "0.0.0-dev-20260609-155c16bf"
259
259
  },
260
260
  "devDependencies": {
261
261
  "@microsoft/api-extractor": "^7.53.3",