@documedis/react-components 1.0.0-RC.2 → 1.0.0-RC.4

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.
@@ -4,7 +4,7 @@ interface PrescriptionSignReactProps {
4
4
  environment: Environment;
5
5
  chmed: string;
6
6
  sessionToken?: string;
7
- shouldGeneratePdf?: boolean;
7
+ generatePdf?: boolean;
8
8
  }
9
9
  /**
10
10
  * Props for the usePrescriptionSign hook
@@ -34,9 +34,9 @@ export type UsePrescriptionSigningProps = {
34
34
  * Optional callback invoked when prescription signing succeeds.
35
35
  * Receives the signed CHMED data as a base64-encoded string.
36
36
  * Optionally receives the generatedPdf if the option
37
- * shouldGeneratePdf is set to true.
37
+ * generatePdf is set to true.
38
38
  *
39
- * @see shouldGeneratePdf
39
+ * @see generatePdf
40
40
  */
41
41
  onSuccess?: (signedCHMED: string, generatedPdf?: string) => void;
42
42
  /**
@@ -47,7 +47,7 @@ export type UsePrescriptionSigningProps = {
47
47
  /**
48
48
  * Flag to generate PDF after signing.
49
49
  */
50
- shouldGeneratePdf: boolean;
50
+ generatePdf: boolean;
51
51
  };
52
52
  /**
53
53
  * Props for the PrescriptionSign React component
@@ -4,7 +4,7 @@ import { UsePrescriptionSigningProps } from './types';
4
4
  */
5
5
  export interface UsePrescriptionSignReturn {
6
6
  /** Function to initiate the signing process with CHMED data */
7
- start: (encodedCHMED: string, shouldGeneratePdf: boolean) => void;
7
+ start: (encodedCHMED: string, generatePdf: boolean) => void;
8
8
  /** Function to terminate the signing process at any time */
9
9
  interrupt: () => void;
10
10
  /** Raw XState machine state (for advanced usage) */
package/index.mjs CHANGED
@@ -11597,7 +11597,29 @@ class $t extends Error {
11597
11597
  * @param cause - Original error for debugging (included in logs, not serialized)
11598
11598
  */
11599
11599
  constructor(n, i, l, f) {
11600
- super(n), this.code = i, this.userMessage = l, this.cause = f, this.name = this.constructor.name, this.id = this.generateErrorId(), this.timestamp = /* @__PURE__ */ new Date(), Error.captureStackTrace?.(this, this.constructor);
11600
+ super(n), this.code = i, this.userMessage = l, this.cause = f, this.name = this.constructor.name, this.id = this.generateErrorId(), this.timestamp = /* @__PURE__ */ new Date(), Error.captureStackTrace?.(this, this.constructor), this.shouldLogInDevelopment() && console.error(`[${this.name}] ${this.code}:`, {
11601
+ message: this.message,
11602
+ userMessage: this.userMessage,
11603
+ id: this.id,
11604
+ cause: this.cause,
11605
+ stack: this.stack
11606
+ });
11607
+ }
11608
+ /**
11609
+ * Determines if errors should be logged to console in current environment.
11610
+ * Only logs in dev/int/demo, not in production.
11611
+ * Returns false if environment cannot be determined (safe default).
11612
+ *
11613
+ * @private
11614
+ * @returns true if should log to console
11615
+ */
11616
+ shouldLogInDevelopment() {
11617
+ try {
11618
+ const n = typeof process < "u" && process.env?.APP_ENV;
11619
+ return n ? n !== "prod" : !1;
11620
+ } catch {
11621
+ return !1;
11622
+ }
11601
11623
  }
11602
11624
  /**
11603
11625
  * Generates a unique error ID for this error instance.
@@ -16756,13 +16778,16 @@ const bF = "opener_origin", wF = "st", Tx = {
16756
16778
  }
16757
16779
  }
16758
16780
  }, kF = Wc(({ input: o, sendBack: n }) => {
16759
- const i = window.location.origin, l = Tx.addOriginParam(
16781
+ const i = window.location.origin;
16782
+ let l = Tx.addOriginParam(
16760
16783
  `${o.hinClient.backendUrl}/login/popup/hin`,
16761
16784
  btoa(i)
16762
- ), f = Tx.addSessionTokenParam(
16785
+ );
16786
+ o.sessionToken && o.sessionToken.length > 0 && (l = Tx.addSessionTokenParam(
16763
16787
  l,
16764
- o.sessionToken || ""
16765
- ), h = window.open(f.toString(), "_blank");
16788
+ o.sessionToken
16789
+ ));
16790
+ const f = l, h = window.open(f.toString(), "_blank");
16766
16791
  if (h)
16767
16792
  n({
16768
16793
  type: "OPEN_POPUP",
@@ -17253,7 +17278,7 @@ const bF = "opener_origin", wF = "st", Tx = {
17253
17278
  const i = await o.hinClient.signPrescription(
17254
17279
  o.sessionToken,
17255
17280
  n,
17256
- o.shouldGeneratePdf
17281
+ o.generatePdf
17257
17282
  );
17258
17283
  return {
17259
17284
  signedPrescription: i.SignedPrescriptionData,
@@ -17317,7 +17342,7 @@ const bF = "opener_origin", wF = "st", Tx = {
17317
17342
  encodedCHMED: void 0,
17318
17343
  signedCHMED: void 0,
17319
17344
  generatedPdf: void 0,
17320
- shouldGeneratePdf: !1,
17345
+ generatePdf: o.generatePdf,
17321
17346
  sessionToken: o.sessionToken,
17322
17347
  accessToken: o.accessToken,
17323
17348
  hinClient: new vF({
@@ -17334,7 +17359,7 @@ const bF = "opener_origin", wF = "st", Tx = {
17334
17359
  target: "Started",
17335
17360
  actions: gi(({ event: o }) => ({
17336
17361
  encodedCHMED: o.encodedCHMED,
17337
- shouldGeneratePdf: o.shouldGeneratePdf
17362
+ generatePdf: o.generatePdf
17338
17363
  }))
17339
17364
  }
17340
17365
  }
@@ -17349,7 +17374,7 @@ const bF = "opener_origin", wF = "st", Tx = {
17349
17374
  generatedPdf: void 0,
17350
17375
  popupRef: null,
17351
17376
  error: void 0,
17352
- shouldGeneratePdf: !1
17377
+ generatePdf: !1
17353
17378
  })
17354
17379
  },
17355
17380
  states: {
@@ -17674,7 +17699,7 @@ const bF = "opener_origin", wF = "st", Tx = {
17674
17699
  hinClient: o.hinClient,
17675
17700
  sessionToken: o.sessionToken,
17676
17701
  recover: n.recoverable || !1,
17677
- shouldGeneratePdf: o.shouldGeneratePdf
17702
+ generatePdf: o.generatePdf
17678
17703
  }),
17679
17704
  onDone: {
17680
17705
  target: "Success",
@@ -17786,11 +17811,11 @@ const FF = (o) => o.replace(/-./g, (n) => n.charAt(1).toUpperCase()), SR = (o) =
17786
17811
  i[f] = y;
17787
17812
  break;
17788
17813
  case "boolean":
17789
- i[l] = y === "" || y === "true";
17814
+ i[f] = y === "" || y === "true";
17790
17815
  break;
17791
17816
  case "number":
17792
17817
  const w = Number(y);
17793
- isNaN(w) || (i[l] = w);
17818
+ isNaN(w) || (i[f] = w);
17794
17819
  break;
17795
17820
  }
17796
17821
  }), i;
@@ -18182,7 +18207,7 @@ const c4 = function(o) {
18182
18207
  };
18183
18208
  xR.type = "pharmacy-selected";
18184
18209
  let vE = xR;
18185
- const f4 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-leading: initial;--tw-font-weight: initial}}}@layer base;@layer theme{:root,:host{--hci-spacing: .25rem;--hci-font-weight-medium: 500;--hci-radius-lg: .5rem;--hci-color-primary: #2d4e9b;--hci-color-surface: #fff;--hci-color-disabled-surface: #adb5bd}}@layer components{.hci\\:btn{cursor:pointer;border-radius:var(--hci-radius-lg);border-style:var(--tw-border-style);padding-inline:calc(var(--hci-spacing) * 4);padding-block:calc(var(--hci-spacing) * 2);text-align:center;--tw-leading: calc(var(--hci-spacing) * 6);line-height:calc(var(--hci-spacing) * 6);--tw-font-weight: var(--hci-font-weight-medium);font-weight:var(--hci-font-weight-medium);white-space:nowrap;--tw-outline-style: none;-webkit-user-select:none;user-select:none;border-width:0;outline-style:none;justify-content:center;align-items:center;transition:filter .15s ease-in-out;display:inline-flex}}@layer utilities{.hci\\:bg-primary{background-color:var(--hci-color-primary)}.hci\\:text-surface{color:var(--hci-color-surface)}@media(hover:hover){.hci\\:hover\\:not-disabled\\:\\[filter\\:brightness\\(0\\.9\\)\\]:hover:not(:disabled){filter:brightness(.9)}}.hci\\:focus-visible\\:focus-outline-2:focus-visible{outline-offset:2;outline:2px}.hci\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.hci\\:disabled\\:bg-disabled-surface:disabled{background-color:var(--hci-color-disabled-surface)}.hci\\:disabled\\:text-surface:disabled{color:var(--hci-color-surface)}.hci\\:disabled\\:opacity-65:disabled{opacity:.65}}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-leading{syntax: "*"; inherits: false}@property --tw-font-weight{syntax: "*"; inherits: false}', CR = me.forwardRef(
18210
+ const f4 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial}}}@layer base;@layer theme{:root,:host{--hci-spacing:.25rem;--hci-font-weight-medium:500;--hci-radius-lg:.5rem;--hci-color-primary:#2d4e9b;--hci-color-surface:#fff;--hci-color-disabled-surface:#adb5bd}}@layer components{.hci\\:btn{cursor:pointer;border-radius:var(--hci-radius-lg);border-style:var(--tw-border-style);padding-inline:calc(var(--hci-spacing)*4);padding-block:calc(var(--hci-spacing)*2);text-align:center;--tw-leading:calc(var(--hci-spacing)*6);line-height:calc(var(--hci-spacing)*6);--tw-font-weight:var(--hci-font-weight-medium);font-weight:var(--hci-font-weight-medium);white-space:nowrap;--tw-outline-style:none;-webkit-user-select:none;user-select:none;border-width:0;outline-style:none;justify-content:center;align-items:center;transition:filter .15s ease-in-out;display:inline-flex}}@layer utilities{.hci\\:bg-primary{background-color:var(--hci-color-primary)}.hci\\:text-surface{color:var(--hci-color-surface)}@media(hover:hover){.hci\\:hover\\:not-disabled\\:\\[filter\\:brightness\\(0\\.9\\)\\]:hover:not(:disabled){filter:brightness(.9)}}.hci\\:focus-visible\\:focus-outline-2:focus-visible{outline-offset:2;outline:2px}.hci\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.hci\\:disabled\\:bg-disabled-surface:disabled{background-color:var(--hci-color-disabled-surface)}.hci\\:disabled\\:text-surface:disabled{color:var(--hci-color-surface)}.hci\\:disabled\\:opacity-65:disabled{opacity:.65}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}', CR = me.forwardRef(
18186
18211
  ({ color: o, className: n, children: i, ...l }, f) => /* @__PURE__ */ Ge.jsxs(Ge.Fragment, { children: [
18187
18212
  /* @__PURE__ */ Ge.jsx("style", { children: f4 }),
18188
18213
  /* @__PURE__ */ Ge.jsx(
@@ -18232,7 +18257,7 @@ const d4 = (o) => /* @__PURE__ */ Ge.jsx(
18232
18257
  "data-testid": "CancelIcon",
18233
18258
  children: /* @__PURE__ */ Ge.jsx("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z" })
18234
18259
  }
18235
- ), m4 = ({ type: o = "item" }) => /* @__PURE__ */ Ge.jsx(Ge.Fragment, {}), y4 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-content: "";--tw-gradient-position: initial;--tw-gradient-from: #0000;--tw-gradient-via: #0000;--tw-gradient-to: #0000;--tw-gradient-stops: initial;--tw-gradient-via-stops: initial;--tw-gradient-from-position: 0%;--tw-gradient-via-position: 50%;--tw-gradient-to-position: 100%}}}@layer base;@layer theme{:root,:host{--hci-color-gray-200: oklch(92.8% .006 264.531);--hci-color-black: #000;--hci-spacing: .25rem;--hci-text-base: 1rem;--hci-leading-normal: 1.5;--hci-radius-lg: .5rem;--hci-color-primary: #2d4e9b;--hci-animate-loading: 2s linear .5s infinite normal none running loading-translate}}@layer components{.hci\\:loading-box{height:calc(var(--hci-spacing) * 5);border-radius:var(--hci-radius-lg);background-color:var(--hci-color-black);display:block}@supports (color: color-mix(in lab,red,red)){.hci\\:loading-box{background-color:color-mix(in oklab,var(--hci-color-black) 10%,transparent)}}.hci\\:loading-box{-webkit-mask:-webkit-radial-gradient(center,white,black);mask:-webkit-radial-gradient(center,white,black)}.hci\\:loading-box-animation{position:relative}.hci\\:loading-box-animation:after{inset:calc(var(--hci-spacing) * 0);animation:var(--hci-animate-loading);--tw-gradient-position: to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops));--tw-gradient-from: transparent;--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));--tw-gradient-via: #0000000a;--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);content:var(--tw-content);--tw-gradient-to: transparent;display:block;position:absolute}}@layer utilities{.hci\\:flex{display:flex}.hci\\:h-empty-item{height:calc(var(--text-base) * var(--leading-normal))}.hci\\:w-3\\/5{width:60%}.hci\\:w-4\\/5{width:80%}.hci\\:cursor-pointer{cursor:pointer}.hci\\:items-center{align-items:center}.hci\\:bg-gray-200{background-color:var(--hci-color-gray-200)}.hci\\:px-items{padding-inline:calc(var(--hci-spacing) * 4)}.hci\\:py-2{padding-block:calc(var(--hci-spacing) * 2)}.hci\\:py-items{padding-block:calc(var(--hci-spacing) * 1.5)}.hci\\:text-base\\/normal{font-size:var(--hci-text-base);line-height:var(--hci-leading-normal)}.hci\\:focus-within\\:outline-primary:focus-within{outline-color:var(--hci-color-primary)}@media(hover:hover){.hci\\:hover\\:bg-gray-200:hover{background-color:var(--hci-color-gray-200)}}}@property --tw-content{syntax: "*"; inherits: false; initial-value: "";}@property --tw-gradient-position{syntax: "*"; inherits: false}@property --tw-gradient-from{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-via{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-to{syntax: "<color>"; inherits: false; initial-value: #0000;}@property --tw-gradient-stops{syntax: "*"; inherits: false}@property --tw-gradient-via-stops{syntax: "*"; inherits: false}@property --tw-gradient-from-position{syntax: "<length-percentage>"; inherits: false; initial-value: 0%;}@property --tw-gradient-via-position{syntax: "<length-percentage>"; inherits: false; initial-value: 50%;}@property --tw-gradient-to-position{syntax: "<length-percentage>"; inherits: false; initial-value: 100%;}@keyframes loading-translate{0%{transform:translate(-100%)}50%{transform:translate(100%)}to{transform:translate(100%)}}', g4 = ({ size: o }) => /* @__PURE__ */ Ge.jsx(Ge.Fragment, { children: Array.from({ length: o }).map((n, i) => /* @__PURE__ */ Ge.jsxs(me.Fragment, { children: [
18260
+ ), m4 = ({ type: o = "item" }) => /* @__PURE__ */ Ge.jsx(Ge.Fragment, {}), y4 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-content:"";--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%}}}@layer base;@layer theme{:root,:host{--hci-color-gray-200:oklch(92.8% .006 264.531);--hci-color-black:#000;--hci-spacing:.25rem;--hci-text-base:1rem;--hci-leading-normal:1.5;--hci-radius-lg:.5rem;--hci-color-primary:#2d4e9b;--hci-animate-loading:2s linear .5s infinite normal none running loading-translate}}@layer components{.hci\\:loading-box{height:calc(var(--hci-spacing)*5);border-radius:var(--hci-radius-lg);background-color:var(--hci-color-black);display:block}@supports (color:color-mix(in lab,red,red)){.hci\\:loading-box{background-color:color-mix(in oklab,var(--hci-color-black)10%,transparent)}}.hci\\:loading-box{-webkit-mask:-webkit-radial-gradient(center,white,black);mask:-webkit-radial-gradient(center,white,black)}.hci\\:loading-box-animation{position:relative}.hci\\:loading-box-animation:after{inset:calc(var(--hci-spacing)*0);animation:var(--hci-animate-loading);--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops));--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position));--tw-gradient-via:#0000000a;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);content:var(--tw-content);--tw-gradient-to:transparent;display:block;position:absolute}}@layer utilities{.hci\\:flex{display:flex}.hci\\:h-empty-item{height:calc(var(--text-base)*var(--leading-normal))}.hci\\:w-3\\/5{width:60%}.hci\\:w-4\\/5{width:80%}.hci\\:cursor-pointer{cursor:pointer}.hci\\:items-center{align-items:center}.hci\\:bg-gray-200{background-color:var(--hci-color-gray-200)}.hci\\:px-items{padding-inline:calc(var(--hci-spacing)*4)}.hci\\:py-2{padding-block:calc(var(--hci-spacing)*2)}.hci\\:py-items{padding-block:calc(var(--hci-spacing)*1.5)}.hci\\:text-base\\/normal{font-size:var(--hci-text-base);line-height:var(--hci-leading-normal)}.hci\\:focus-within\\:outline-primary:focus-within{outline-color:var(--hci-color-primary)}@media(hover:hover){.hci\\:hover\\:bg-gray-200:hover{background-color:var(--hci-color-gray-200)}}}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@keyframes loading-translate{0%{transform:translate(-100%)}50%{transform:translate(100%)}to{transform:translate(100%)}}', g4 = ({ size: o }) => /* @__PURE__ */ Ge.jsx(Ge.Fragment, { children: Array.from({ length: o }).map((n, i) => /* @__PURE__ */ Ge.jsxs(me.Fragment, { children: [
18236
18261
  /* @__PURE__ */ Ge.jsx(Px, {}),
18237
18262
  /* @__PURE__ */ Ge.jsx(Px, { isShortLength: !0 })
18238
18263
  ] }, `loading-fragment-${i}`)) }), Px = ({ isShortLength: o }) => /* @__PURE__ */ Ge.jsx("div", { className: "hci:px-items hci:py-items", children: /* @__PURE__ */ Ge.jsx("div", { className: "hci:h-empty-item hci:flex hci:items-center", children: /* @__PURE__ */ Ge.jsx(
@@ -19748,7 +19773,7 @@ const y3 = function(o, {
19748
19773
  selectedItem: y,
19749
19774
  items: h
19750
19775
  };
19751
- }, x3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}@layer base;@layer theme{:root,:host{--hci-spacing: .25rem;--hci-radius-lg: .5rem;--hci-color-surface: #fff}}@layer components;@layer utilities{.hci\\:absolute{position:absolute}.hci\\:-bottom-2{bottom:calc(var(--hci-spacing) * -2)}.hci\\:left-0{left:calc(var(--hci-spacing) * 0)}.hci\\:z-10{z-index:10}.hci\\:mt-2{margin-top:calc(var(--hci-spacing) * 2)}.hci\\:w-full{width:100%}.hci\\:min-w-64{min-width:calc(var(--hci-spacing) * 64)}.hci\\:translate-y-full{--tw-translate-y: 100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.hci\\:rounded-lg{border-radius:var(--hci-radius-lg)}.hci\\:bg-surface{background-color:var(--hci-color-surface)}.hci\\:shadow-surface{--tw-shadow: 0 2px 8px var(--tw-shadow-color, #00000029), 0 1px 4px var(--tw-shadow-color, #00000014), 0 0 2px var(--tw-shadow-color, #0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}', O3 = me.forwardRef(({ children: o, onCloseRequest: n, ...i }, l) => {
19776
+ }, x3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base;@layer theme{:root,:host{--hci-spacing:.25rem;--hci-radius-lg:.5rem;--hci-color-surface:#fff}}@layer components;@layer utilities{.hci\\:absolute{position:absolute}.hci\\:-bottom-2{bottom:calc(var(--hci-spacing)*-2)}.hci\\:left-0{left:calc(var(--hci-spacing)*0)}.hci\\:z-10{z-index:10}.hci\\:mt-2{margin-top:calc(var(--hci-spacing)*2)}.hci\\:w-full{width:100%}.hci\\:min-w-64{min-width:calc(var(--hci-spacing)*64)}.hci\\:translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.hci\\:rounded-lg{border-radius:var(--hci-radius-lg)}.hci\\:bg-surface{background-color:var(--hci-color-surface)}.hci\\:shadow-surface{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000029),0 1px 4px var(--tw-shadow-color,#00000014),0 0 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}', O3 = me.forwardRef(({ children: o, onCloseRequest: n, ...i }, l) => {
19752
19777
  const f = me.useRef(null), h = jF(i), y = l || f, w = (b) => {
19753
19778
  b.key === "Escape" && n?.();
19754
19779
  };
@@ -19769,7 +19794,7 @@ const y3 = function(o, {
19769
19794
  }
19770
19795
  )
19771
19796
  ] });
19772
- }), C3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-translate-x: 0;--tw-translate-y: 0;--tw-translate-z: 0}}}@layer base;@layer theme{:root,:host{--hci-color-black: #000;--hci-spacing: .25rem;--hci-radius-lg: .5rem;--hci-color-primary: #2d4e9b;--hci-color-reset-button: #2d4e9b}}@layer components{.hci\\:input-icon{top:50%;right:calc(var(--hci-spacing) * 2);height:calc(var(--hci-spacing) * 6);width:calc(var(--hci-spacing) * 6);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y);position:absolute}}@layer utilities{.hci\\:relative{position:relative}.hci\\:z-10{z-index:10}.hci\\:block{display:block}.hci\\:w-full{width:100%}.hci\\:cursor-pointer{cursor:pointer}.hci\\:rounded-full{border-radius:3.40282e38px}.hci\\:rounded-lg{border-radius:var(--hci-radius-lg)}.hci\\:border{border-style:var(--tw-border-style);border-width:1px}.hci\\:border-solid{--tw-border-style: solid;border-style:solid}.hci\\:border-black\\/20{border-color:var(--hci-color-black)}@supports (color: color-mix(in lab,red,red)){.hci\\:border-black\\/20{border-color:color-mix(in oklab,var(--hci-color-black) 20%,transparent)}}.hci\\:fill-reset-button{fill:var(--hci-color-reset-button)}.hci\\:p-3{padding:calc(var(--hci-spacing) * 3)}.hci\\:text-black{color:var(--hci-color-black)}.hci\\:opacity-68{opacity:.68}.hci\\:focus-within\\:outline-reset-button:focus-within{outline-color:var(--hci-color-reset-button)}@media(hover:hover){.hci\\:hover\\:border-black\\/90:hover{border-color:var(--hci-color-black)}@supports (color: color-mix(in lab,red,red)){.hci\\:hover\\:border-black\\/90:hover{border-color:color-mix(in oklab,var(--hci-color-black) 90%,transparent)}}}.hci\\:focus\\:-m-px:focus{margin:-1px}.hci\\:focus\\:border-2:focus{border-style:var(--tw-border-style);border-width:2px}.hci\\:focus\\:border-primary:focus{border-color:var(--hci-color-primary)}}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-translate-x{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-y{syntax: "*"; inherits: false; initial-value: 0;}@property --tw-translate-z{syntax: "*"; inherits: false; initial-value: 0;}', R3 = function({
19797
+ }), C3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer base;@layer theme{:root,:host{--hci-color-black:#000;--hci-spacing:.25rem;--hci-radius-lg:.5rem;--hci-color-primary:#2d4e9b;--hci-color-reset-button:#2d4e9b}}@layer components{.hci\\:input-icon{top:50%;right:calc(var(--hci-spacing)*2);height:calc(var(--hci-spacing)*6);width:calc(var(--hci-spacing)*6);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);position:absolute}}@layer utilities{.hci\\:relative{position:relative}.hci\\:z-10{z-index:10}.hci\\:block{display:block}.hci\\:w-full{width:100%}.hci\\:cursor-pointer{cursor:pointer}.hci\\:rounded-full{border-radius:3.40282e38px}.hci\\:rounded-lg{border-radius:var(--hci-radius-lg)}.hci\\:border{border-style:var(--tw-border-style);border-width:1px}.hci\\:border-solid{--tw-border-style:solid;border-style:solid}.hci\\:border-black\\/20{border-color:var(--hci-color-black)}@supports (color:color-mix(in lab,red,red)){.hci\\:border-black\\/20{border-color:color-mix(in oklab,var(--hci-color-black)20%,transparent)}}.hci\\:fill-reset-button{fill:var(--hci-color-reset-button)}.hci\\:p-3{padding:calc(var(--hci-spacing)*3)}.hci\\:text-black{color:var(--hci-color-black)}.hci\\:opacity-68{opacity:.68}.hci\\:focus-within\\:outline-reset-button:focus-within{outline-color:var(--hci-color-reset-button)}@media(hover:hover){.hci\\:hover\\:border-black\\/90:hover{border-color:var(--hci-color-black)}@supports (color:color-mix(in lab,red,red)){.hci\\:hover\\:border-black\\/90:hover{border-color:color-mix(in oklab,var(--hci-color-black)90%,transparent)}}}.hci\\:focus\\:-m-px:focus{margin:-1px}.hci\\:focus\\:border-2:focus{border-style:var(--tw-border-style);border-width:2px}.hci\\:focus\\:border-primary:focus{border-color:var(--hci-color-primary)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}', R3 = function({
19773
19798
  state: o,
19774
19799
  isLoading: n,
19775
19800
  showLoadingState: i = !0,
@@ -45086,7 +45111,7 @@ const X3 = ({
45086
45111
  sessionToken: l,
45087
45112
  environment: o,
45088
45113
  accessToken: n,
45089
- shouldGeneratePdf: f
45114
+ generatePdf: f
45090
45115
  }
45091
45116
  }), k = me.useCallback(
45092
45117
  (U, ee) => {
@@ -45106,7 +45131,7 @@ const X3 = ({
45106
45131
  document.dispatchEvent(re);
45107
45132
  return;
45108
45133
  }
45109
- w({ type: "START", encodedCHMED: U, shouldGeneratePdf: ee });
45134
+ w({ type: "START", encodedCHMED: U, generatePdf: ee });
45110
45135
  },
45111
45136
  [w]
45112
45137
  ), x = me.useCallback(() => {
@@ -45213,6 +45238,8 @@ Z3(() => MouseEvent);
45213
45238
  const ej = (o) => o.replace(/[A-Z]/g, (n) => `-${n.toLowerCase()}`), tj = (o) => {
45214
45239
  const n = {};
45215
45240
  return Object.entries(o).forEach(([i, l]) => {
45241
+ if (l == null)
45242
+ return;
45216
45243
  const f = ej(i);
45217
45244
  n[f] = String(l);
45218
45245
  }), n;
@@ -46216,17 +46243,17 @@ function Dj(o) {
46216
46243
  onSessionTokenUpdate: f,
46217
46244
  onSuccess: h,
46218
46245
  onError: y,
46219
- shouldGeneratePdf: w
46246
+ generatePdf: w
46220
46247
  } = o, [b, k, x] = Tj(kR, {
46221
46248
  input: {
46222
46249
  sessionToken: l,
46223
46250
  environment: n,
46224
46251
  accessToken: i,
46225
- shouldGeneratePdf: w
46252
+ generatePdf: w
46226
46253
  }
46227
46254
  }), _ = Ld(
46228
46255
  (T, N) => {
46229
- k({ type: "START", encodedCHMED: T, shouldGeneratePdf: N });
46256
+ k({ type: "START", encodedCHMED: T, generatePdf: N });
46230
46257
  },
46231
46258
  [k]
46232
46259
  ), E = Ld(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@documedis/react-components",
3
- "version": "1.0.0-RC.2",
3
+ "version": "1.0.0-RC.4",
4
4
  "description": "React components for Documedis healthcare applications - prescription signing, pharmacy selection, and more",
5
5
  "keywords": [
6
6
  "react",