@documedis/react-components 1.0.0-RC.2 → 1.0.0-RC.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +27 -5
- package/package.json +1 -1
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.
|
|
@@ -18182,7 +18204,7 @@ const c4 = function(o) {
|
|
|
18182
18204
|
};
|
|
18183
18205
|
xR.type = "pharmacy-selected";
|
|
18184
18206
|
let vE = xR;
|
|
18185
|
-
const f4 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:
|
|
18207
|
+
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
18208
|
({ color: o, className: n, children: i, ...l }, f) => /* @__PURE__ */ Ge.jsxs(Ge.Fragment, { children: [
|
|
18187
18209
|
/* @__PURE__ */ Ge.jsx("style", { children: f4 }),
|
|
18188
18210
|
/* @__PURE__ */ Ge.jsx(
|
|
@@ -18232,7 +18254,7 @@ const d4 = (o) => /* @__PURE__ */ Ge.jsx(
|
|
|
18232
18254
|
"data-testid": "CancelIcon",
|
|
18233
18255
|
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
18256
|
}
|
|
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:
|
|
18257
|
+
), 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
18258
|
/* @__PURE__ */ Ge.jsx(Px, {}),
|
|
18237
18259
|
/* @__PURE__ */ Ge.jsx(Px, { isShortLength: !0 })
|
|
18238
18260
|
] }, `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 +19770,7 @@ const y3 = function(o, {
|
|
|
19748
19770
|
selectedItem: y,
|
|
19749
19771
|
items: h
|
|
19750
19772
|
};
|
|
19751
|
-
}, x3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:
|
|
19773
|
+
}, 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
19774
|
const f = me.useRef(null), h = jF(i), y = l || f, w = (b) => {
|
|
19753
19775
|
b.key === "Escape" && n?.();
|
|
19754
19776
|
};
|
|
@@ -19769,7 +19791,7 @@ const y3 = function(o, {
|
|
|
19769
19791
|
}
|
|
19770
19792
|
)
|
|
19771
19793
|
] });
|
|
19772
|
-
}), C3 = '/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:
|
|
19794
|
+
}), 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
19795
|
state: o,
|
|
19774
19796
|
isLoading: n,
|
|
19775
19797
|
showLoadingState: i = !0,
|
package/package.json
CHANGED