@epam/ai-dial-share 1.3.0-dev.16 → 1.3.0-dev.160
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.css +2 -1
- package/index.js +16 -29
- package/models/share-link-data.d.ts +2 -0
- package/models/share-link-data.d.ts.map +1 -1
- package/package.json +3 -3
package/index.css
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
._accessTriggerBtn_3r1q2_2{background-color:var(--shp-access-trigger-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--shp-access-trigger-border,transparent)}button._accessTriggerBtn_3r1q2_2[aria-expanded=true]{border-color:var(--shp-access-trigger-border-focus,var(--stroke-accent,#1d4ed8))}@media (hover:hover){button._accessTriggerBtn_3r1q2_2:hover{background-color:var(--shp-access-trigger-bg,var(--bg-layer-raised,#fcfcfc));border-color:var(--shp-access-trigger-border-hover,var(--stroke-accent,#1d4ed8))}}button._accessTriggerBtn_3r1q2_2:active{background-color:var(--shp-access-trigger-bg,var(--bg-layer-raised,#fcfcfc))}button._accessTriggerBtn_3r1q2_2>svg{color:var(--shp-access-chevron,var(--text-tertiary,#848e9c));transition:transform .15s}@media (prefers-reduced-motion:reduce){button._accessTriggerBtn_3r1q2_2>svg{transition:none}}button._accessTriggerBtn_3r1q2_2:focus-visible{outline:1px solid var(--shp-access-trigger-border-focus,var(--stroke-accent,#1d4ed8));outline-offset:-1px;border-color:#0000}._accessTriggerLabel_3r1q2_40{color:var(--shp-access-trigger-text,var(--text-primary,#161b2d))}._title_3r1q2_44{color:var(--shp-title-text,var(--text-primary,#161b2d))}._linkIconBadge_3r1q2_48{background:var(--shp-link-icon-bg,var(--bg-control-accent-alpha-active,#2764d933));color:var(--shp-link-icon-text,var(--text-accent,#1d4ed8))}._anyoneWithLinkTitle_3r1q2_53{color:var(--shp-anyone-title,var(--text-primary,#161b2d))}._anyoneWithLinkSubtitle_3r1q2_57{color:var(--shp-anyone-subtitle,var(--text-secondary,#57647a))}._accessMenuItem_3r1q2_66>span{color:var(--shp-menu-item-label,var(--text-primary,#161b2d))}._linkRow_3r1q2_70{background:var(--shp-link-row-bg,var(--bg-layer-base,#f5f7fa))}._linkRow_3r1q2_70 input{color:var(--shp-link-text,var(--text-primary,#161b2d))!important}._errorText_3r1q2_77{color:var(--shp-error-text,var(--text-error,#ae2f2f))}._note_3r1q2_81{color:var(--shp-note-text,var(--text-secondary,#57647a))}._divider_3r1q2_85{background:var(--shp-divider,var(--stroke-tertiary,#e0e6f0))}._container_hzzl6_1{border-color:var(--qr-border,var(--stroke-tertiary,#e0e6f0));background:var(--qr-bg,var(--bg-layer-sunken,#eef1f7))}._qrColor_hzzl6_6{color:var(--qr-color,var(--text-primary,#161b2d))}
|
|
2
|
-
/*$vite$:1
|
|
2
|
+
/*$vite$:1*//*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
3
|
+
@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-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}}}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.static{position:static}.ms-auto{margin-inline-start:auto}.-mt-1\.5{margin-top:-.375rem}.flex{display:flex}.size-8{width:2rem;height:2rem}.size-40{width:10rem;height:10rem}.size-full{width:100%;height:100%}.h-10{height:2.5rem}.h-px{height:1px}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0}.min-w-\[160px\]{min-width:160px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rounded{border-radius:4px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.bg-layer-raised{background-color:var(--bg-layer-raised,#fcfcfc)}.bg-transparent{background-color:#0000}.p-3{padding:.75rem}.px-0{padding-inline:0}.px-3{padding-inline:.75rem}.px-4{padding-inline:1rem}.px-6{padding-inline:1.5rem}.py-2{padding-block:.5rem}.py-6{padding-block:1.5rem}.pt-4{padding-top:1rem}.pb-6{padding-bottom:1.5rem}.text-center{text-align:center}.whitespace-nowrap{white-space:nowrap}.shadow-lg{--tw-shadow:0 8px 44px 0 var(--tw-shadow-color,var(--shadow-lg,#2764d914));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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}
|
package/index.js
CHANGED
|
@@ -4,13 +4,13 @@ import { DIAL_ICON_SIZE as d, DIAL_KIT_ICON_STROKE as f, GhostButton as p, Ghost
|
|
|
4
4
|
import { IconCheck as b, IconCopy as x, IconDownload as S, IconLink as C, IconQrcode as w, IconWorld as T } from "@tabler/icons-react";
|
|
5
5
|
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M = Object.getOwnPropertyNames, N = Object.getPrototypeOf, P = Object.prototype.hasOwnProperty, F = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), I = (e, t, n, r) => {
|
|
7
|
+
var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescriptor, M = Object.getOwnPropertyNames, N = Object.getPrototypeOf, P = Object.prototype.hasOwnProperty, F = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), I = (e, t, n, r) => {
|
|
8
8
|
if (t && typeof t == "object" || typeof t == "function") for (var i = M(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !P.call(e, s) && s !== n && A(e, s, {
|
|
9
9
|
get: ((e) => t[e]).bind(null, s),
|
|
10
10
|
enumerable: !(r = j(t, s)) || r.enumerable
|
|
11
11
|
});
|
|
12
12
|
return e;
|
|
13
|
-
}, L = (e, t, n) => (n = e == null ? {} : k(N(e)), I(t || !e || !e.__esModule ? A(n, "default", {
|
|
13
|
+
}, L = (e, t, n) => (n = e == null ? {} : k(N(e)), I(t || !e || !e.__esModule || !P.call(e, "default") ? A(n, "default", {
|
|
14
14
|
value: e,
|
|
15
15
|
enumerable: !0
|
|
16
16
|
}) : n, e)), ee = { popover: "dial-share-popover" }, R = /* @__PURE__ */ function(e) {
|
|
@@ -83,7 +83,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
83
83
|
triggerLabelClassName: n(B.accessTriggerLabel, v)
|
|
84
84
|
}) : /* @__PURE__ */ D("span", {
|
|
85
85
|
"aria-label": s,
|
|
86
|
-
className: n("flex h-10 shrink-0 items-center
|
|
86
|
+
className: n("flex h-10 shrink-0 items-center rounded-full px-3 whitespace-nowrap", B.accessTriggerBtn),
|
|
87
87
|
children: /* @__PURE__ */ D("span", {
|
|
88
88
|
className: n(B.accessTriggerLabel, v),
|
|
89
89
|
children: a
|
|
@@ -98,7 +98,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
98
98
|
value: e,
|
|
99
99
|
"aria-label": t,
|
|
100
100
|
containerClassName: "min-w-0 flex-1",
|
|
101
|
-
wrapperClassName: "border-0 bg-transparent px-0 outline-
|
|
101
|
+
wrapperClassName: "border-0 bg-transparent px-0 outline-hidden"
|
|
102
102
|
}), /* @__PURE__ */ D(m, {
|
|
103
103
|
icon: D(r ? b : x, {
|
|
104
104
|
size: d.LG,
|
|
@@ -129,11 +129,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
129
129
|
if (o == null) throw Error("Canvas 2D context is not available.");
|
|
130
130
|
return o.fillStyle = ue, o.fillRect(0, 0, t, t), o.drawImage(i, n, n, r, r), new Promise((e, t) => {
|
|
131
131
|
a.toBlob((n) => {
|
|
132
|
-
|
|
133
|
-
t(/* @__PURE__ */ Error("Failed to encode the QR code as PNG."));
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
e(n);
|
|
132
|
+
n == null ? t(/* @__PURE__ */ Error("Failed to encode the QR code as PNG.")) : e(n);
|
|
137
133
|
}, "image/png");
|
|
138
134
|
});
|
|
139
135
|
}, fe = () => typeof navigator < "u" && typeof navigator.clipboard?.write == "function" && typeof ClipboardItem < "u", pe = (e) => {
|
|
@@ -322,7 +318,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
322
318
|
e.AsyncMode = S, e.ConcurrentMode = C, e.ContextConsumer = w, e.ContextProvider = T, e.Element = E, e.ForwardRef = D, e.Fragment = O, e.Lazy = k, e.Memo = A, e.Portal = j, e.Profiler = M, e.StrictMode = N, e.Suspense = P, e.isAsyncMode = I, e.isConcurrentMode = L, e.isContextConsumer = ee, e.isContextProvider = R, e.isElement = z, e.isForwardRef = te, e.isFragment = ne, e.isLazy = re, e.isMemo = B, e.isPortal = ie, e.isProfiler = ae, e.isStrictMode = oe, e.isSuspense = se, e.isValidElementType = b, e.typeOf = x;
|
|
323
319
|
})();
|
|
324
320
|
})), U = /* @__PURE__ */ F(((e, t) => {
|
|
325
|
-
process.env.NODE_ENV === "production" ?
|
|
321
|
+
t.exports = process.env.NODE_ENV === "production" ? ge() : _e();
|
|
326
322
|
})), W = /* @__PURE__ */ F(((e, t) => {
|
|
327
323
|
var n = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
328
324
|
function a(e) {
|
|
@@ -449,7 +445,8 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
449
445
|
if (t) {
|
|
450
446
|
var m = /* @__PURE__ */ Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
|
|
451
447
|
throw m.name = "Invariant Violation", m;
|
|
452
|
-
}
|
|
448
|
+
}
|
|
449
|
+
if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
453
450
|
var g = l + ":" + c;
|
|
454
451
|
!n[g] && r < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + d + "` prop on `" + l + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), n[g] = !0, r++);
|
|
455
452
|
}
|
|
@@ -858,7 +855,8 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
858
855
|
if (r <= t && t < i && r <= n && n < i) {
|
|
859
856
|
let i = Math.floor((t - r) / e), a = Math.floor((n - r) / e);
|
|
860
857
|
return +!c.isDark(a, i);
|
|
861
|
-
}
|
|
858
|
+
}
|
|
859
|
+
return 1;
|
|
862
860
|
});
|
|
863
861
|
}, c.createImgTag = function(e, t, n) {
|
|
864
862
|
e ||= 2, t = t === void 0 ? e * 4 : t;
|
|
@@ -882,9 +880,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
882
880
|
case "\"":
|
|
883
881
|
t += """;
|
|
884
882
|
break;
|
|
885
|
-
default:
|
|
886
|
-
t += r;
|
|
887
|
-
break;
|
|
883
|
+
default: t += r;
|
|
888
884
|
}
|
|
889
885
|
}
|
|
890
886
|
return t;
|
|
@@ -1295,7 +1291,7 @@ var J = {
|
|
|
1295
1291
|
let t = e.getModuleCount(), n = 0;
|
|
1296
1292
|
for (let r = 0; r < t; r += 1) for (let i = 0; i < t; i += 1) {
|
|
1297
1293
|
let a = 0, o = e.isDark(r, i);
|
|
1298
|
-
for (let n = -1; n <= 1; n += 1) if (!(r + n < 0 || t <= r + n)) for (let s = -1; s <= 1; s += 1) i + s < 0 || t <= i + s || n
|
|
1294
|
+
for (let n = -1; n <= 1; n += 1) if (!(r + n < 0 || t <= r + n)) for (let s = -1; s <= 1; s += 1) i + s < 0 || t <= i + s || (n != 0 || s != 0) && o == e.isDark(r + n, i + s) && (a += 1);
|
|
1299
1295
|
a > 5 && (n += 3 + a - 5);
|
|
1300
1296
|
}
|
|
1301
1297
|
for (let r = 0; r < t - 1; r += 1) for (let i = 0; i < t - 1; i += 1) {
|
|
@@ -2560,7 +2556,8 @@ var J = {
|
|
|
2560
2556
|
return n.getBuffer = function() {
|
|
2561
2557
|
return e;
|
|
2562
2558
|
}, n.getAt = function(t) {
|
|
2563
|
-
|
|
2559
|
+
let n = Math.floor(t / 8);
|
|
2560
|
+
return (e[n] >>> 7 - t % 8 & 1) == 1;
|
|
2564
2561
|
}, n.put = function(e, t) {
|
|
2565
2562
|
for (let r = 0; r < t; r += 1) n.putBit((e >>> t - r - 1 & 1) == 1);
|
|
2566
2563
|
}, n.getLengthInBits = function() {
|
|
@@ -3043,19 +3040,9 @@ var He = {
|
|
|
3043
3040
|
"aria-label": b,
|
|
3044
3041
|
tabIndex: -1,
|
|
3045
3042
|
style: v,
|
|
3046
|
-
className: n("flex w-96 flex-col gap-3 rounded-xl bg-layer-raised px-6 pb-6
|
|
3043
|
+
className: n("flex w-96 flex-col gap-3 rounded-xl bg-layer-raised px-6 pt-4 pb-6 shadow-lg outline-hidden", m, ee.popover),
|
|
3047
3044
|
onKeyDownCapture: (e) => {
|
|
3048
|
-
|
|
3049
|
-
ve(e);
|
|
3050
|
-
return;
|
|
3051
|
-
}
|
|
3052
|
-
if (e.key === "Escape") {
|
|
3053
|
-
if (e.stopPropagation(), ge) {
|
|
3054
|
-
e.preventDefault(), U(!1);
|
|
3055
|
-
return;
|
|
3056
|
-
}
|
|
3057
|
-
V === z.Qr ? (e.preventDefault(), H(z.Link)) : f();
|
|
3058
|
-
}
|
|
3045
|
+
e.key === "Tab" ? ve(e) : e.key === "Escape" && (e.stopPropagation(), ge ? (e.preventDefault(), U(!1)) : V === z.Qr ? (e.preventDefault(), H(z.Link)) : f());
|
|
3059
3046
|
},
|
|
3060
3047
|
children: [
|
|
3061
3048
|
/* @__PURE__ */ D(Je, {
|
|
@@ -5,6 +5,8 @@ export interface ShareLinkData {
|
|
|
5
5
|
url: string;
|
|
6
6
|
/** Number of days the link stays active before expiring; omitted when the host cannot determine the expiry. */
|
|
7
7
|
expiresInDays?: number;
|
|
8
|
+
/** Number of hours the link stays active before expiring, rounded up; lets the host describe a lifetime shorter than a day. Omitted when the host cannot determine the expiry. */
|
|
9
|
+
expiresInHours?: number;
|
|
8
10
|
/** Access levels granted to anyone with the link. */
|
|
9
11
|
access: ShareLinkAccess[];
|
|
10
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"share-link-data.d.ts","sourceRoot":"","sources":["../../src/models/share-link-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qDAAqD;IACrD,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
|
1
|
+
{"version":3,"file":"share-link-data.d.ts","sourceRoot":"","sources":["../../src/models/share-link-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,gFAAgF;AAChF,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,+GAA+G;IAC/G,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kLAAkL;IAClL,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-share",
|
|
3
3
|
"description": "Share popover UI component and share-link types for AI DIAL catalog deployments",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.160",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"react-qr-code": "^2.2.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
24
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.160",
|
|
25
25
|
"react": "^19.2.8",
|
|
26
|
-
"@epam/ai-dial-ui-kit": "^0.
|
|
26
|
+
"@epam/ai-dial-ui-kit": "^0.16.0-dev.33"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|