callix-dialer-widget 1.1.6 → 1.1.7
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.
|
@@ -53046,7 +53046,7 @@ const MIN_DIALER_WIDTH = 280;
|
|
|
53046
53046
|
const MIN_DIALER_HEIGHT = 420;
|
|
53047
53047
|
const MAX_DIALER_WIDTH = 1024;
|
|
53048
53048
|
const MAX_DIALER_HEIGHT = 960;
|
|
53049
|
-
const MIN_DIALER_SCALE = 0.
|
|
53049
|
+
const MIN_DIALER_SCALE = 0.55;
|
|
53050
53050
|
const MAX_DIALER_SCALE = 2.5;
|
|
53051
53051
|
const VIEWPORT_MARGIN_SMALL = 12;
|
|
53052
53052
|
const VIEWPORT_MARGIN_DEFAULT = 16;
|
|
@@ -53413,6 +53413,8 @@ function FloatingDialer({
|
|
|
53413
53413
|
}
|
|
53414
53414
|
);
|
|
53415
53415
|
const scale = Number.isFinite(contentScale) && contentScale > 0 ? contentScale : 1;
|
|
53416
|
+
const scaledWidth = DEFAULT_DIALER_DIMENSIONS.width / scale;
|
|
53417
|
+
const scaledHeight = DEFAULT_DIALER_DIMENSIONS.height / scale;
|
|
53416
53418
|
const cardStyle = {
|
|
53417
53419
|
width: manualSize ? `${manualSize.width}px` : void 0,
|
|
53418
53420
|
height: manualSize ? `${manualSize.height}px` : void 0,
|
|
@@ -53421,10 +53423,21 @@ function FloatingDialer({
|
|
|
53421
53423
|
maxWidth: `min(${MAX_DIALER_WIDTH}px, calc(100vw - 1.5rem))`,
|
|
53422
53424
|
maxHeight: `calc(100vh - 3rem)`
|
|
53423
53425
|
};
|
|
53424
|
-
const
|
|
53426
|
+
const scaledWrapperStyle = {
|
|
53427
|
+
flex: 1,
|
|
53428
|
+
display: "flex",
|
|
53429
|
+
flexDirection: "column",
|
|
53430
|
+
transform: `scale(${scale})`,
|
|
53431
|
+
transformOrigin: "top left",
|
|
53432
|
+
width: `${scaledWidth}px`,
|
|
53433
|
+
minHeight: `${scaledHeight}px`
|
|
53434
|
+
};
|
|
53425
53435
|
const cardContentStyle = {
|
|
53426
|
-
|
|
53427
|
-
|
|
53436
|
+
flex: 1,
|
|
53437
|
+
display: "flex",
|
|
53438
|
+
flexDirection: "column",
|
|
53439
|
+
width: `${DEFAULT_DIALER_DIMENSIONS.width}px`,
|
|
53440
|
+
minHeight: `${DEFAULT_DIALER_DIMENSIONS.height}px`
|
|
53428
53441
|
};
|
|
53429
53442
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53430
53443
|
"div",
|
|
@@ -53444,35 +53457,43 @@ function FloatingDialer({
|
|
|
53444
53457
|
className: tw`relative flex flex-col items-start overflow-hidden rounded-3xl border border-slate-200/60 bg-gradient-to-br from-white/95 via-slate-50/95 to-white/90 shadow-2xl backdrop-blur-lg transition-all duration-300 w-[min(32rem,calc(100vw-1.5rem))] max-w-[calc(100vw-1.5rem)] sm:w-[28rem] md:w-[30rem] max-h-[calc(100vh-3rem)] sm:max-h-none`,
|
|
53445
53458
|
style: cardStyle,
|
|
53446
53459
|
children: [
|
|
53447
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
53448
|
-
|
|
53449
|
-
|
|
53450
|
-
|
|
53451
|
-
|
|
53452
|
-
|
|
53453
|
-
|
|
53454
|
-
|
|
53455
|
-
|
|
53456
|
-
|
|
53457
|
-
|
|
53458
|
-
|
|
53459
|
-
|
|
53460
|
-
|
|
53461
|
-
|
|
53462
|
-
|
|
53463
|
-
|
|
53464
|
-
|
|
53465
|
-
|
|
53466
|
-
|
|
53467
|
-
|
|
53468
|
-
|
|
53469
|
-
|
|
53470
|
-
|
|
53471
|
-
|
|
53472
|
-
|
|
53473
|
-
|
|
53474
|
-
|
|
53475
|
-
|
|
53460
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex flex-1 flex-col overflow-hidden`, style: scaledWrapperStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
53461
|
+
"div",
|
|
53462
|
+
{
|
|
53463
|
+
"data-floating-dialer-content": true,
|
|
53464
|
+
className: tw`flex flex-1 flex-col rounded-3xl overflow-hidden`,
|
|
53465
|
+
style: cardContentStyle,
|
|
53466
|
+
children: [
|
|
53467
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
53468
|
+
"div",
|
|
53469
|
+
{
|
|
53470
|
+
className: tw`cursor-grab touch-none active:cursor-grabbing flex items-center justify-between bg-gradient-to-r from-primary to-primaryDark px-4 py-3 text-white shadow-sm`,
|
|
53471
|
+
onPointerDown: beginDrag,
|
|
53472
|
+
children: [
|
|
53473
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`flex items-center gap-3`, children: [
|
|
53474
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: tw`inline-flex h-10 w-10 items-center justify-center rounded-2xl bg-white/15 shadow-inner`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiPhoneCall, { className: tw`text-xl` }) }),
|
|
53475
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: tw`space-y-0.5`, children: [
|
|
53476
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-[11px] uppercase tracking-[0.2em] text-white/70`, children: "Discadora" }),
|
|
53477
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: tw`text-base font-semibold`, children: username ?? "Visitante" })
|
|
53478
|
+
] })
|
|
53479
|
+
] }),
|
|
53480
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53481
|
+
"button",
|
|
53482
|
+
{
|
|
53483
|
+
type: "button",
|
|
53484
|
+
className: tw`rounded-full p-2 text-white/80 transition hover:bg-white/15 hover:text-white`,
|
|
53485
|
+
onClick: () => setIsOpen(false),
|
|
53486
|
+
"aria-label": "Fechar discadora",
|
|
53487
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiX, { className: tw`text-lg` })
|
|
53488
|
+
}
|
|
53489
|
+
)
|
|
53490
|
+
]
|
|
53491
|
+
}
|
|
53492
|
+
),
|
|
53493
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: tw`flex-1 overflow-y-auto p-3`, children: dialerContent })
|
|
53494
|
+
]
|
|
53495
|
+
}
|
|
53496
|
+
) }),
|
|
53476
53497
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
53477
53498
|
"div",
|
|
53478
53499
|
{
|
|
@@ -55036,31 +55057,26 @@ function InlineDialer(props) {
|
|
|
55036
55057
|
inset: auto !important;
|
|
55037
55058
|
transform: none !important;
|
|
55038
55059
|
width: 100% !important;
|
|
55039
|
-
max-width: 100% !important;
|
|
55040
|
-
min-width: 0 !important;
|
|
55041
55060
|
height: 100% !important;
|
|
55042
|
-
max-height: 100% !important;
|
|
55043
|
-
min-height: 0 !important;
|
|
55044
55061
|
}
|
|
55045
55062
|
.callix-inline-wrapper [data-floating-dialer-card] {
|
|
55046
55063
|
position: relative !important;
|
|
55047
55064
|
inset: auto !important;
|
|
55048
55065
|
transform: none !important;
|
|
55049
55066
|
width: 100% !important;
|
|
55050
|
-
max-width: 100% !important;
|
|
55051
|
-
min-width: 0 !important;
|
|
55052
55067
|
height: 100% !important;
|
|
55053
|
-
max-height: 100% !important;
|
|
55054
|
-
min-height: 0 !important;
|
|
55055
55068
|
box-shadow: none !important;
|
|
55056
55069
|
backdrop-filter: none !important;
|
|
55057
55070
|
}
|
|
55058
|
-
.callix-inline-wrapper [data-floating-dialer-card] > div {
|
|
55071
|
+
.callix-inline-wrapper [data-floating-dialer-card] > div:first-child {
|
|
55059
55072
|
width: 100% !important;
|
|
55060
55073
|
height: 100% !important;
|
|
55074
|
+
transform-origin: top left !important;
|
|
55061
55075
|
}
|
|
55062
|
-
.callix-inline-wrapper [data-floating-dialer-card]
|
|
55063
|
-
|
|
55076
|
+
.callix-inline-wrapper [data-floating-dialer-card] [data-floating-dialer-content] {
|
|
55077
|
+
width: auto !important;
|
|
55078
|
+
min-width: 448px !important;
|
|
55079
|
+
min-height: 640px !important;
|
|
55064
55080
|
}
|
|
55065
55081
|
.callix-inline-wrapper [data-floating-dialer-resize] {
|
|
55066
55082
|
display: none !important;
|