@itcase/storybook-config 1.2.50 → 1.2.52
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/dist/{Notification-DPozMFZR.js → Notification-BonAwYec.js} +265 -223
- package/dist/{Notification-Dr6__aPv.js → Notification-DCiRKK0H.js} +266 -224
- package/dist/cjs/decorators/withFigmaSourceLink.js +2 -2
- package/dist/cjs/decorators/withNextDecorator.js +1 -1
- package/dist/cjs/decorators/withUiDecorator.js +1 -1
- package/dist/cjs/decorators.js +1 -1
- package/dist/config/config/mainConfigNextJsVite.js +6 -0
- package/dist/decorators/withFigmaSourceLink.js +2 -2
- package/dist/decorators/withNextDecorator.js +1 -1
- package/dist/decorators/withUiDecorator.js +1 -1
- package/dist/decorators.js +1 -1
- package/package.json +53 -53
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var camelCase = require('lodash/camelCase');
|
|
5
|
-
var
|
|
5
|
+
var s$1 = require('lodash/castArray');
|
|
6
6
|
var i$2 = require('lodash/upperFirst');
|
|
7
7
|
var common = require('@itcase/common');
|
|
8
|
-
var r$
|
|
8
|
+
var r$3 = require('lodash/maxBy');
|
|
9
9
|
var reactDom = require('react-dom');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
@@ -1396,7 +1396,7 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
1396
1396
|
|
|
1397
1397
|
function r$2(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$2(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$2(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1398
1398
|
|
|
1399
|
-
const e$1=(e,r,p)=>React.useMemo(()=>{if(e){const a=e.split(" ").reduce((a,e)=>(
|
|
1399
|
+
const e$1=(e,r,p)=>React.useMemo(()=>{if(e){const a=e.split(" ").reduce((a,e)=>Object.assign(a,r?.appearance?.[e]),{});return p&&(r?.appearance?.disabled||r?.appearance?.disabledPrimary)&&Object.assign(a,r?.appearance?.disabled||r?.appearance?.disabledPrimary),a}return p?r?.appearance?.disabled||r?.appearance?.disabledPrimary:{}},[e,r?.appearance,p]);
|
|
1400
1400
|
|
|
1401
1401
|
const byteToHex = [];
|
|
1402
1402
|
for (let i = 0; i < 256; ++i) {
|
|
@@ -1425,21 +1425,17 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
1425
1425
|
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
|
-
let getRandomValues;
|
|
1429
1428
|
const rnds8 = new Uint8Array(16);
|
|
1430
1429
|
function rng() {
|
|
1431
|
-
|
|
1432
|
-
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
1433
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1434
|
-
}
|
|
1435
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
1436
|
-
}
|
|
1437
|
-
return getRandomValues(rnds8);
|
|
1430
|
+
return crypto.getRandomValues(rnds8);
|
|
1438
1431
|
}
|
|
1439
1432
|
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1433
|
+
function v4(options, buf, offset) {
|
|
1434
|
+
if (crypto.randomUUID) {
|
|
1435
|
+
return crypto.randomUUID();
|
|
1436
|
+
}
|
|
1437
|
+
return _v4(options);
|
|
1438
|
+
}
|
|
1443
1439
|
function _v4(options, buf, offset) {
|
|
1444
1440
|
options = options || {};
|
|
1445
1441
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
@@ -1450,14 +1446,8 @@ function _v4(options, buf, offset) {
|
|
|
1450
1446
|
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
1451
1447
|
return unsafeStringify(rnds);
|
|
1452
1448
|
}
|
|
1453
|
-
function v4(options, buf, offset) {
|
|
1454
|
-
if (native.randomUUID && true && !options) {
|
|
1455
|
-
return native.randomUUID();
|
|
1456
|
-
}
|
|
1457
|
-
return _v4(options);
|
|
1458
|
-
}
|
|
1459
1449
|
|
|
1460
|
-
const l$1={error:"error",info:"info",success:"success",warning:"warning"},u$
|
|
1450
|
+
const l$1={error:"error",info:"info",success:"success",warning:"warning"},u$3=React.createContext([]),d$1=React.createContext({hideNotifications:e=>{},showNotification:(e,o)=>{},notificationStatuses:l$1});function m$2(o){const{initialNotificationsList:s=[],isLogRequestsErrors:c,children:m}=o,[f,g]=React.useState(()=>(s||[]).map(e=>y$1(e,e.onClose))),p=React.useCallback(e=>{e&&g(o=>o.filter(o=>{const i=String(o.id)===String(e);return i&&(clearTimeout(o._closeTimeout),o.onClose&&o.onClose()),!i}));},[]),T=React.useCallback((e,o)=>{const i=y$1(e,o);return g(e=>{const o=e.slice(),t=o.findIndex(e=>String(e.id)===String(i.id));if(-1===t)return [...o,i];const r=o[t];return clearTimeout(r._closeTimeout),r._closeTimeout=void 0,o[t]=i,o}),i.closeByTime&&(i._closeTimeout=setTimeout(()=>p(i.id),i.closeByTime)),i},[]),S=React.useMemo(()=>({hideNotifications:p,notificationStatuses:l$1,showNotification:T}),[]);return React.useEffect(()=>{f.forEach(e=>{e.closeByTime&&setTimeout(()=>p(e.id),e.closeByTime);}),c&&(common.axiosInstanceITCase.responseErrorHandler.loggerManager={log:e=>{if(e.message){const o=["network"].includes(e.key)?e.key:void 0;T({id:o,title:e.message,status:"error",closeByTime:4e3});}}});},[]),jsxRuntimeExports.jsx(d$1.Provider,{value:S,children:jsxRuntimeExports.jsx(u$3.Provider,{value:f,children:m})})}function f$2(){return React.useContext(u$3)}function g$1(){return React.useContext(d$1)}const p$2={error:"errorPrimary sizeS solid rounded",info:"infoPrimary sizeS solid rounded",success:"successPrimary sizeS solid rounded",warning:"warningPrimary sizeS solid rounded"};function y$1(e,o){let i=v4().split("-")[0],t="",r="",n="",s="",a="float",u="",d=l$1.warning,m=4500,f=p$2[d],g=null,y=false,T="",S=()=>{};return "string"==typeof e?r=e:"object"==typeof e&&(i=String(e.id??i),t=e.title??t,r=e.text??r,T=e.closeIconAppearance??T,a=e.type??a,n=e.closeIcon??n,s=e.closeIconSrc??s,u=e.buttonLabel??u,S=e.onClickButton??S,d=e.status??d,m=e.closeByTime??m,y=e.isLoading??y,g=e.after??g,f=e.appearance??p$2[e.status]??f),{id:i,appearance:f,type:a,title:t,status:d,text:r,buttonLabel:u,after:g,closeByTime:m,closeIcon:n,closeIconAppearance:T,closeIconSrc:s,isLoading:y,onClickButton:S,onClose:o}}
|
|
1461
1451
|
|
|
1462
1452
|
var cssMediaquery = {};
|
|
1463
1453
|
|
|
@@ -3108,7 +3098,7 @@ var i$1={"mobile-tiny":"15em","mobile-super-extra-large":"40em",tablet:"48em","d
|
|
|
3108
3098
|
|
|
3109
3099
|
const e=()=>{const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",`${e}px`);};
|
|
3110
3100
|
|
|
3111
|
-
const a$
|
|
3101
|
+
const a$2=React.createContext({isMobile:false,isTablet:false,isDesktop:false,deviceCurrentMainType:"",deviceCurrentType:"",deviceTypesList:[]}),d=React.memo(function(r){const{userDeviceState:i={},children:o}=r,d=s(i),{isMobile:u,isTablet:l,isDesktop:m,...v}=d,f=(u?"mobile":l&&"tablet")||m&&"desktop"||"",[y,b]=React.useMemo(()=>{const e=Object.keys(d).map(e=>camelCase(e.replace("is","")));let r=Object.keys(v).find(e=>v[e]);return r||(r=f),r=camelCase(r.replace("is","")),[r||"_none_",e]},[d,f,v]),T=React.useMemo(()=>({...d,deviceCurrentMainType:f,deviceCurrentType:y,deviceTypesList:b}),[d,f,y,b]);return React.useEffect(()=>{e(),window.addEventListener("resize",e);},[]),jsxRuntimeExports.jsx(a$2.Provider,{value:T,children:o})});function u$2(){const e=React.useContext(a$2);if(!e)throw new Error("useUserDeviceContext is not defined");return e}
|
|
3112
3102
|
|
|
3113
3103
|
const i=React.createContext({assetPrefix:void 0,ignorePathsList:void 0});
|
|
3114
3104
|
|
|
@@ -3116,9 +3106,9 @@ var o$1=["alignContent","alignItems","alignSelf","aspectRatio","border","borderB
|
|
|
3116
3106
|
|
|
3117
3107
|
const r$1=r=>Array.isArray(r)?r[0]:r;
|
|
3118
3108
|
|
|
3119
|
-
function
|
|
3109
|
+
function u$1(i,c){const{deviceCurrentMainType:u}=u$2(),l=React.useRef(i);l.current=i;const f=React.useRef(u);f.current=u;const g=React.useRef(c);g.current=c;const d=React.useMemo(()=>new Map,[c,u]),y=React.useRef(d);y.current=d;return React.useMemo(()=>{let t,r;const n={getProp(e){const s=f.current;t!==s&&(t=s,r=i$2(s));const n=e+r;return l.current[n]||l.current[e]||g.current?.[n]||g.current?.[e]},getClassName(t,r){let o="",n=p$1;r&&(o=r.prefix??"",n=r.replace??p$1);const i=this.getProp(t);if(!i)return "";const c=`${o}_${n===p$1?a$1:String(n)}_${t}_${i}`,u=y.current.get(c);if(void 0!==u)return u;if(m$1.has(t)&&("number"==typeof i||"string"==typeof i&&!isNaN(parseFloat(i)))){const t="";return y.current.set(c,t),t}let l=String(i);if(l.includes(".")||(l=camelCase(l)),n){const t=s$1(n);l=l.replace(t[0],t[1]||"");}const f=`${o}${l}`.toLowerCase();return y.current.set(c,f),f}},i={get(t,r,e,...s){if("string"==typeof r){if("getProp"!==r&&"getClassName"!==r){if(r.endsWith("Class")){const t=r.substring(0,r.lastIndexOf("Class"));return n.getClassName(t)}return n.getProp(r)}return Reflect.get(t,r,e,...s)}return r}};return new Proxy(n,i)},[])}const p$1=[/([A-Z])/g,"-$1"],a$1=String(p$1),m$1=new Set(o$1.map(t=>r$1(t)));
|
|
3120
3110
|
|
|
3121
|
-
function
|
|
3111
|
+
function c$1(r){const{deviceCurrentMainType:o,deviceCurrentType:n,deviceTypesList:c}=u$2(),a=React.useMemo(()=>Object.entries(r).reduce((e,[t,r])=>(p(t,r)&&(e[t]=r),e),{}),[r]);return React.useMemo(()=>{const e={};for(const[s,m]of Object.entries(a)){let a=null;const u=p(s,m),f=s.toLowerCase().endsWith(n.toLowerCase()),d=l(s.replace(u,""),c),j=camelCase(d)||"styles";if(e[j]||(e[j]={}),f)a=m;else {const t=`${u}${d}`,s=`${t}${i$2(o)}`,n=r[s]||r[t];let c=e[j][u];if(t.includes("Horizontal")){const t=u.replace("Horizontal","Left");c=e[j][t];}else if(t.includes("Vertical")){const t=u.replace("Vertical","Top");c=e[j][t];}c||(a=n);}if(a){if(/\D/.test(a)){if(/\d+\.?\d*m\s?(?![a-zA-Z]+)/.test(a)){const e=a.split(" ").map(e=>{const t=e.replace(/[a-z]/gi,"");return `${8*parseFloat(t)}px`},[]);a=e.join(" ");}}else {["zIndex","order","flexGrow","opacity"].includes(u)||(a=`${a}px`);}if(u.includes("Horizontal")){const t=u.replace("Horizontal","Right"),r=u.replace("Horizontal","Left"),i=a.split(" "),s=i[0],o=i[1]||i[0];e[j][t]=s,e[j][r]=o;}else if(u.includes("Vertical")){const t=u.replace("Vertical","Top"),r=u.replace("Vertical","Bottom"),i=a.split(" "),s=i[0],o=i[1]||i[0];e[j][t]=s,e[j][r]=o;}else e[j][u]=a;}}return e},[o,n,...Object.values(a)])}const l=(e,t)=>t.reduce((e,t)=>e.endsWith(i$2(t))?e.replace(i$2(t),""):e,e),a=new Map,p=(e,t="")=>{const i=`${e}_${t}`;if(a.has(i))return a.get(i);const s=o$1.filter(r=>{if(Array.isArray(r)){const i=r[0],s=r[1]||{};return !!e.startsWith(i)&&(!s.validate||s.validate(t))}return e.startsWith(String(r))}),c=r$3(s,e=>r$1(e).length),l=r$1(c);return a.set(i,l),l};
|
|
3122
3112
|
|
|
3123
3113
|
const r=(...r)=>{const t=r.map(r=>r?.trim()).filter(Boolean);if(t.length<2)return t[0]??"";return Array.from(new Set(t)).join(" ")};
|
|
3124
3114
|
|
|
@@ -7412,11 +7402,6 @@ async function request(url, options) {
|
|
|
7412
7402
|
}
|
|
7413
7403
|
return response.text();
|
|
7414
7404
|
}
|
|
7415
|
-
function sleep(seconds = 1) {
|
|
7416
|
-
return new Promise((resolve) => {
|
|
7417
|
-
setTimeout(resolve, seconds * 1e3);
|
|
7418
|
-
});
|
|
7419
|
-
}
|
|
7420
7405
|
function supportsInlineSVG() {
|
|
7421
7406
|
if (!document) {
|
|
7422
7407
|
return false;
|
|
@@ -7429,20 +7414,16 @@ function supportsInlineSVG() {
|
|
|
7429
7414
|
|
|
7430
7415
|
// src/modules/cache.ts
|
|
7431
7416
|
var CacheStore = class {
|
|
7432
|
-
constructor() {
|
|
7417
|
+
constructor(options = {}) {
|
|
7433
7418
|
__publicField(this, "cacheApi");
|
|
7434
7419
|
__publicField(this, "cacheStore");
|
|
7435
7420
|
__publicField(this, "subscribers", []);
|
|
7436
7421
|
__publicField(this, "isReady", false);
|
|
7422
|
+
const { name = CACHE_NAME, persistent = false } = options;
|
|
7437
7423
|
this.cacheStore = /* @__PURE__ */ new Map();
|
|
7438
|
-
|
|
7439
|
-
let usePersistentCache = false;
|
|
7440
|
-
if (canUseDOM()) {
|
|
7441
|
-
cacheName = window.REACT_INLINESVG_CACHE_NAME ?? CACHE_NAME;
|
|
7442
|
-
usePersistentCache = !!window.REACT_INLINESVG_PERSISTENT_CACHE && "caches" in window;
|
|
7443
|
-
}
|
|
7424
|
+
const usePersistentCache = persistent && canUseDOM() && "caches" in window;
|
|
7444
7425
|
if (usePersistentCache) {
|
|
7445
|
-
caches.open(
|
|
7426
|
+
caches.open(name).then((cache) => {
|
|
7446
7427
|
this.cacheApi = cache;
|
|
7447
7428
|
}).catch((error) => {
|
|
7448
7429
|
console.error(`Failed to open cache: ${error.message}`);
|
|
@@ -7466,12 +7447,30 @@ var CacheStore = class {
|
|
|
7466
7447
|
onReady(callback) {
|
|
7467
7448
|
if (this.isReady) {
|
|
7468
7449
|
callback();
|
|
7469
|
-
|
|
7470
|
-
|
|
7450
|
+
return () => {
|
|
7451
|
+
};
|
|
7471
7452
|
}
|
|
7453
|
+
this.subscribers.push(callback);
|
|
7454
|
+
return () => {
|
|
7455
|
+
const index = this.subscribers.indexOf(callback);
|
|
7456
|
+
if (index >= 0) {
|
|
7457
|
+
this.subscribers.splice(index, 1);
|
|
7458
|
+
}
|
|
7459
|
+
};
|
|
7460
|
+
}
|
|
7461
|
+
waitForReady() {
|
|
7462
|
+
if (this.isReady) {
|
|
7463
|
+
return Promise.resolve();
|
|
7464
|
+
}
|
|
7465
|
+
return new Promise((resolve) => {
|
|
7466
|
+
this.onReady(resolve);
|
|
7467
|
+
});
|
|
7472
7468
|
}
|
|
7473
7469
|
async get(url, fetchOptions) {
|
|
7474
|
-
await
|
|
7470
|
+
await this.fetchAndCache(url, fetchOptions);
|
|
7471
|
+
return this.cacheStore.get(url)?.content ?? "";
|
|
7472
|
+
}
|
|
7473
|
+
getContent(url) {
|
|
7475
7474
|
return this.cacheStore.get(url)?.content ?? "";
|
|
7476
7475
|
}
|
|
7477
7476
|
set(url, data) {
|
|
@@ -7480,57 +7479,44 @@ var CacheStore = class {
|
|
|
7480
7479
|
isCached(url) {
|
|
7481
7480
|
return this.cacheStore.get(url)?.status === STATUS.LOADED;
|
|
7482
7481
|
}
|
|
7483
|
-
async
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
await this.handleLoading(url, async () => {
|
|
7487
|
-
this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
|
|
7488
|
-
await this.fetchAndAddToInternalCache(url, fetchOptions);
|
|
7489
|
-
});
|
|
7490
|
-
return;
|
|
7482
|
+
async fetchAndCache(url, fetchOptions) {
|
|
7483
|
+
if (!this.isReady) {
|
|
7484
|
+
await this.waitForReady();
|
|
7491
7485
|
}
|
|
7492
|
-
if (!cache?.content) {
|
|
7493
|
-
this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
|
|
7494
|
-
try {
|
|
7495
|
-
const content = await request(url, fetchOptions);
|
|
7496
|
-
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7497
|
-
} catch (error) {
|
|
7498
|
-
this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
|
|
7499
|
-
throw error;
|
|
7500
|
-
}
|
|
7501
|
-
}
|
|
7502
|
-
}
|
|
7503
|
-
async fetchAndAddToPersistentCache(url, fetchOptions) {
|
|
7504
7486
|
const cache = this.cacheStore.get(url);
|
|
7505
7487
|
if (cache?.status === STATUS.LOADED) {
|
|
7506
7488
|
return;
|
|
7507
7489
|
}
|
|
7508
7490
|
if (cache?.status === STATUS.LOADING) {
|
|
7509
|
-
await this.handleLoading(url, async () => {
|
|
7491
|
+
await this.handleLoading(url, fetchOptions?.signal || void 0, async () => {
|
|
7510
7492
|
this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
|
|
7511
|
-
await this.
|
|
7493
|
+
await this.fetchAndCache(url, fetchOptions);
|
|
7512
7494
|
});
|
|
7513
7495
|
return;
|
|
7514
7496
|
}
|
|
7515
7497
|
this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
|
|
7516
|
-
const data = await this.cacheApi?.match(url);
|
|
7517
|
-
if (data) {
|
|
7518
|
-
const content = await data.text();
|
|
7519
|
-
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7520
|
-
return;
|
|
7521
|
-
}
|
|
7522
7498
|
try {
|
|
7523
|
-
await this.
|
|
7524
|
-
const response = await this.cacheApi?.match(url);
|
|
7525
|
-
const content = await response?.text() ?? "";
|
|
7499
|
+
const content = this.cacheApi ? await this.fetchFromPersistentCache(url, fetchOptions) : await request(url, fetchOptions);
|
|
7526
7500
|
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7527
7501
|
} catch (error) {
|
|
7528
7502
|
this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
|
|
7529
7503
|
throw error;
|
|
7530
7504
|
}
|
|
7531
7505
|
}
|
|
7532
|
-
async
|
|
7506
|
+
async fetchFromPersistentCache(url, fetchOptions) {
|
|
7507
|
+
const data = await this.cacheApi?.match(url);
|
|
7508
|
+
if (data) {
|
|
7509
|
+
return data.text();
|
|
7510
|
+
}
|
|
7511
|
+
await this.cacheApi?.add(new Request(url, fetchOptions));
|
|
7512
|
+
const response = await this.cacheApi?.match(url);
|
|
7513
|
+
return await response?.text() ?? "";
|
|
7514
|
+
}
|
|
7515
|
+
async handleLoading(url, signal, callback) {
|
|
7533
7516
|
for (let retryCount = 0; retryCount < CACHE_MAX_RETRIES; retryCount++) {
|
|
7517
|
+
if (signal?.aborted) {
|
|
7518
|
+
throw signal.reason instanceof Error ? signal.reason : new DOMException("The operation was aborted.", "AbortError");
|
|
7519
|
+
}
|
|
7534
7520
|
if (this.cacheStore.get(url)?.status !== STATUS.LOADING) {
|
|
7535
7521
|
return;
|
|
7536
7522
|
}
|
|
@@ -7558,6 +7544,14 @@ var CacheStore = class {
|
|
|
7558
7544
|
this.cacheStore.clear();
|
|
7559
7545
|
}
|
|
7560
7546
|
};
|
|
7547
|
+
function sleep(seconds = 1) {
|
|
7548
|
+
return new Promise((resolve) => {
|
|
7549
|
+
setTimeout(resolve, seconds * 1e3);
|
|
7550
|
+
});
|
|
7551
|
+
}
|
|
7552
|
+
function useMount(effect) {
|
|
7553
|
+
React.useEffect(effect, []);
|
|
7554
|
+
}
|
|
7561
7555
|
function usePrevious(state) {
|
|
7562
7556
|
const ref = React.useRef(void 0);
|
|
7563
7557
|
React.useEffect(() => {
|
|
@@ -7565,6 +7559,29 @@ function usePrevious(state) {
|
|
|
7565
7559
|
});
|
|
7566
7560
|
return ref.current;
|
|
7567
7561
|
}
|
|
7562
|
+
function uniquifyStyleIds(svgText, hash, baseURL) {
|
|
7563
|
+
const idMatches = svgText.matchAll(/\bid=(["'])([^"']+)\1/g);
|
|
7564
|
+
const ids = [...new Set([...idMatches].map((m) => m[2]))];
|
|
7565
|
+
if (!ids.length) {
|
|
7566
|
+
return svgText;
|
|
7567
|
+
}
|
|
7568
|
+
ids.sort((a, b) => b.length - a.length);
|
|
7569
|
+
return svgText.replace(/<style[^>]*>([\S\s]*?)<\/style>/gi, (fullMatch, cssContent) => {
|
|
7570
|
+
let modified = cssContent;
|
|
7571
|
+
for (const id of ids) {
|
|
7572
|
+
const escaped = id.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
7573
|
+
modified = modified.replace(
|
|
7574
|
+
new RegExp(`url\\((['"]?)#${escaped}\\1\\)`, "g"),
|
|
7575
|
+
`url($1${baseURL}#${id}__${hash}$1)`
|
|
7576
|
+
);
|
|
7577
|
+
modified = modified.replace(
|
|
7578
|
+
new RegExp(`#${escaped}(?![a-zA-Z0-9_-])`, "g"),
|
|
7579
|
+
`#${id}__${hash}`
|
|
7580
|
+
);
|
|
7581
|
+
}
|
|
7582
|
+
return fullMatch.replace(cssContent, modified);
|
|
7583
|
+
});
|
|
7584
|
+
}
|
|
7568
7585
|
function getNode(options) {
|
|
7569
7586
|
const {
|
|
7570
7587
|
baseURL,
|
|
@@ -7577,7 +7594,10 @@ function getNode(options) {
|
|
|
7577
7594
|
uniquifyIDs = false
|
|
7578
7595
|
} = options;
|
|
7579
7596
|
try {
|
|
7580
|
-
|
|
7597
|
+
let svgText = processSVG(content, preProcessor);
|
|
7598
|
+
if (uniquifyIDs) {
|
|
7599
|
+
svgText = uniquifyStyleIds(svgText, hash, baseURL ?? "");
|
|
7600
|
+
}
|
|
7581
7601
|
const node = convert(svgText, { nodeOnly: true });
|
|
7582
7602
|
if (!node || !(node instanceof SVGSVGElement)) {
|
|
7583
7603
|
throw new Error("Could not convert the src to a DOM Node");
|
|
@@ -7647,22 +7667,30 @@ function updateSVGAttributes(node, options) {
|
|
|
7647
7667
|
return node;
|
|
7648
7668
|
}
|
|
7649
7669
|
|
|
7650
|
-
// src/
|
|
7651
|
-
|
|
7652
|
-
function ReactInlineSVG(props) {
|
|
7670
|
+
// src/modules/useInlineSVG.ts
|
|
7671
|
+
function useInlineSVG(props, cacheStore2) {
|
|
7653
7672
|
const {
|
|
7673
|
+
baseURL,
|
|
7654
7674
|
cacheRequests = true,
|
|
7655
|
-
children = null,
|
|
7656
7675
|
description,
|
|
7657
7676
|
fetchOptions,
|
|
7658
|
-
innerRef,
|
|
7659
|
-
loader = null,
|
|
7660
7677
|
onError,
|
|
7661
7678
|
onLoad,
|
|
7679
|
+
preProcessor,
|
|
7662
7680
|
src,
|
|
7663
7681
|
title,
|
|
7664
|
-
uniqueHash
|
|
7682
|
+
uniqueHash,
|
|
7683
|
+
uniquifyIDs
|
|
7665
7684
|
} = props;
|
|
7685
|
+
const hash = React.useRef(uniqueHash ?? randomString(8));
|
|
7686
|
+
const fetchOptionsRef = React.useRef(fetchOptions);
|
|
7687
|
+
const onErrorRef = React.useRef(onError);
|
|
7688
|
+
const onLoadRef = React.useRef(onLoad);
|
|
7689
|
+
const preProcessorRef = React.useRef(preProcessor);
|
|
7690
|
+
fetchOptionsRef.current = fetchOptions;
|
|
7691
|
+
onErrorRef.current = onError;
|
|
7692
|
+
onLoadRef.current = onLoad;
|
|
7693
|
+
preProcessorRef.current = preProcessor;
|
|
7666
7694
|
const [state, setState] = React.useReducer(
|
|
7667
7695
|
(previousState2, nextState) => ({
|
|
7668
7696
|
...previousState2,
|
|
@@ -7671,43 +7699,71 @@ function ReactInlineSVG(props) {
|
|
|
7671
7699
|
{
|
|
7672
7700
|
content: "",
|
|
7673
7701
|
element: null,
|
|
7674
|
-
isCached:
|
|
7702
|
+
isCached: false,
|
|
7675
7703
|
status: STATUS.IDLE
|
|
7704
|
+
},
|
|
7705
|
+
(initial) => {
|
|
7706
|
+
const cached = cacheRequests && cacheStore2.isCached(src);
|
|
7707
|
+
if (!cached) {
|
|
7708
|
+
return initial;
|
|
7709
|
+
}
|
|
7710
|
+
const cachedContent = cacheStore2.getContent(src);
|
|
7711
|
+
try {
|
|
7712
|
+
const node = getNode({
|
|
7713
|
+
...props,
|
|
7714
|
+
handleError: () => {
|
|
7715
|
+
},
|
|
7716
|
+
hash: hash.current,
|
|
7717
|
+
content: cachedContent
|
|
7718
|
+
});
|
|
7719
|
+
if (!node) {
|
|
7720
|
+
return { ...initial, content: cachedContent, isCached: true, status: STATUS.LOADED };
|
|
7721
|
+
}
|
|
7722
|
+
const convertedElement = convert(node);
|
|
7723
|
+
if (convertedElement && React.isValidElement(convertedElement)) {
|
|
7724
|
+
return {
|
|
7725
|
+
content: cachedContent,
|
|
7726
|
+
element: convertedElement,
|
|
7727
|
+
isCached: true,
|
|
7728
|
+
status: STATUS.READY
|
|
7729
|
+
};
|
|
7730
|
+
}
|
|
7731
|
+
} catch {
|
|
7732
|
+
}
|
|
7733
|
+
return {
|
|
7734
|
+
...initial,
|
|
7735
|
+
content: cachedContent,
|
|
7736
|
+
isCached: true,
|
|
7737
|
+
status: STATUS.LOADED
|
|
7738
|
+
};
|
|
7676
7739
|
}
|
|
7677
7740
|
);
|
|
7678
7741
|
const { content, element, isCached, status } = state;
|
|
7679
7742
|
const previousProps = usePrevious(props);
|
|
7680
7743
|
const previousState = usePrevious(state);
|
|
7681
|
-
const hash = React.useRef(uniqueHash ?? randomString(8));
|
|
7682
7744
|
const isActive = React.useRef(false);
|
|
7683
7745
|
const isInitialized = React.useRef(false);
|
|
7684
|
-
const handleError = React.useCallback(
|
|
7685
|
-
(error) => {
|
|
7686
|
-
if (isActive.current) {
|
|
7687
|
-
setState({
|
|
7688
|
-
status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
|
|
7689
|
-
});
|
|
7690
|
-
onError?.(error);
|
|
7691
|
-
}
|
|
7692
|
-
},
|
|
7693
|
-
[onError]
|
|
7694
|
-
);
|
|
7695
|
-
const handleLoad = React.useCallback((loadedContent, hasCache = false) => {
|
|
7746
|
+
const handleError = React.useCallback((error) => {
|
|
7696
7747
|
if (isActive.current) {
|
|
7697
7748
|
setState({
|
|
7698
|
-
|
|
7699
|
-
isCached: hasCache,
|
|
7700
|
-
status: STATUS.LOADED
|
|
7749
|
+
status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
|
|
7701
7750
|
});
|
|
7751
|
+
onErrorRef.current?.(error);
|
|
7702
7752
|
}
|
|
7703
7753
|
}, []);
|
|
7704
|
-
const fetchContent = React.useCallback(async () => {
|
|
7705
|
-
const responseContent = await request(src, fetchOptions);
|
|
7706
|
-
handleLoad(responseContent);
|
|
7707
|
-
}, [fetchOptions, handleLoad, src]);
|
|
7708
7754
|
const getElement = React.useCallback(() => {
|
|
7709
7755
|
try {
|
|
7710
|
-
const node = getNode({
|
|
7756
|
+
const node = getNode({
|
|
7757
|
+
baseURL,
|
|
7758
|
+
content,
|
|
7759
|
+
description,
|
|
7760
|
+
handleError,
|
|
7761
|
+
hash: hash.current,
|
|
7762
|
+
preProcessor: preProcessorRef.current,
|
|
7763
|
+
src,
|
|
7764
|
+
title,
|
|
7765
|
+
uniquifyIDs
|
|
7766
|
+
});
|
|
7711
7767
|
const convertedElement = convert(node);
|
|
7712
7768
|
if (!convertedElement || !React.isValidElement(convertedElement)) {
|
|
7713
7769
|
throw new Error("Could not convert the src to a React element");
|
|
@@ -7719,67 +7775,32 @@ function ReactInlineSVG(props) {
|
|
|
7719
7775
|
} catch (error) {
|
|
7720
7776
|
handleError(error);
|
|
7721
7777
|
}
|
|
7722
|
-
}, [content, handleError,
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
|
|
7728
|
-
} else if (src.includes("<svg")) {
|
|
7729
|
-
inlineSrc = src;
|
|
7730
|
-
}
|
|
7731
|
-
if (inlineSrc) {
|
|
7732
|
-
handleLoad(inlineSrc);
|
|
7733
|
-
return;
|
|
7778
|
+
}, [baseURL, content, description, handleError, src, title, uniquifyIDs]);
|
|
7779
|
+
useMount(() => {
|
|
7780
|
+
isActive.current = true;
|
|
7781
|
+
if (!canUseDOM() || isInitialized.current) {
|
|
7782
|
+
return void 0;
|
|
7734
7783
|
}
|
|
7735
7784
|
try {
|
|
7736
|
-
if (
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7785
|
+
if (status === STATUS.READY) {
|
|
7786
|
+
onLoadRef.current?.(src, isCached);
|
|
7787
|
+
} else if (status === STATUS.IDLE) {
|
|
7788
|
+
if (!isSupportedEnvironment()) {
|
|
7789
|
+
throw new Error("Browser does not support SVG");
|
|
7790
|
+
}
|
|
7791
|
+
if (!src) {
|
|
7792
|
+
throw new Error("Missing src");
|
|
7793
|
+
}
|
|
7794
|
+
setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
|
|
7741
7795
|
}
|
|
7742
7796
|
} catch (error) {
|
|
7743
7797
|
handleError(error);
|
|
7744
7798
|
}
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
element: null,
|
|
7751
|
-
isCached: false,
|
|
7752
|
-
status: STATUS.LOADING
|
|
7753
|
-
});
|
|
7754
|
-
}
|
|
7755
|
-
}, []);
|
|
7756
|
-
React.useEffect(
|
|
7757
|
-
() => {
|
|
7758
|
-
isActive.current = true;
|
|
7759
|
-
if (!canUseDOM() || isInitialized.current) {
|
|
7760
|
-
return void 0;
|
|
7761
|
-
}
|
|
7762
|
-
try {
|
|
7763
|
-
if (status === STATUS.IDLE) {
|
|
7764
|
-
if (!isSupportedEnvironment()) {
|
|
7765
|
-
throw new Error("Browser does not support SVG");
|
|
7766
|
-
}
|
|
7767
|
-
if (!src) {
|
|
7768
|
-
throw new Error("Missing src");
|
|
7769
|
-
}
|
|
7770
|
-
load();
|
|
7771
|
-
}
|
|
7772
|
-
} catch (error) {
|
|
7773
|
-
handleError(error);
|
|
7774
|
-
}
|
|
7775
|
-
isInitialized.current = true;
|
|
7776
|
-
return () => {
|
|
7777
|
-
isActive.current = false;
|
|
7778
|
-
};
|
|
7779
|
-
},
|
|
7780
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7781
|
-
[]
|
|
7782
|
-
);
|
|
7799
|
+
isInitialized.current = true;
|
|
7800
|
+
return () => {
|
|
7801
|
+
isActive.current = false;
|
|
7802
|
+
};
|
|
7803
|
+
});
|
|
7783
7804
|
React.useEffect(() => {
|
|
7784
7805
|
if (!canUseDOM() || !previousProps) {
|
|
7785
7806
|
return;
|
|
@@ -7789,14 +7810,58 @@ function ReactInlineSVG(props) {
|
|
|
7789
7810
|
handleError(new Error("Missing src"));
|
|
7790
7811
|
return;
|
|
7791
7812
|
}
|
|
7792
|
-
|
|
7813
|
+
setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
|
|
7793
7814
|
}
|
|
7794
|
-
}, [handleError,
|
|
7815
|
+
}, [handleError, previousProps, src]);
|
|
7795
7816
|
React.useEffect(() => {
|
|
7796
|
-
if (status
|
|
7817
|
+
if (status !== STATUS.LOADING) {
|
|
7818
|
+
return void 0;
|
|
7819
|
+
}
|
|
7820
|
+
const controller = new AbortController();
|
|
7821
|
+
let active = true;
|
|
7822
|
+
(async () => {
|
|
7823
|
+
try {
|
|
7824
|
+
const dataURI = /^data:image\/svg[^,]*?(;base64)?,(.*)/.exec(src);
|
|
7825
|
+
let inlineSrc;
|
|
7826
|
+
if (dataURI) {
|
|
7827
|
+
inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
|
|
7828
|
+
} else if (src.includes("<svg")) {
|
|
7829
|
+
inlineSrc = src;
|
|
7830
|
+
}
|
|
7831
|
+
if (inlineSrc) {
|
|
7832
|
+
if (active) {
|
|
7833
|
+
setState({ content: inlineSrc, isCached: false, status: STATUS.LOADED });
|
|
7834
|
+
}
|
|
7835
|
+
return;
|
|
7836
|
+
}
|
|
7837
|
+
const fetchParameters = { ...fetchOptionsRef.current, signal: controller.signal };
|
|
7838
|
+
let loadedContent;
|
|
7839
|
+
let hasCache = false;
|
|
7840
|
+
if (cacheRequests) {
|
|
7841
|
+
hasCache = cacheStore2.isCached(src);
|
|
7842
|
+
loadedContent = await cacheStore2.get(src, fetchParameters);
|
|
7843
|
+
} else {
|
|
7844
|
+
loadedContent = await request(src, fetchParameters);
|
|
7845
|
+
}
|
|
7846
|
+
if (active) {
|
|
7847
|
+
setState({ content: loadedContent, isCached: hasCache, status: STATUS.LOADED });
|
|
7848
|
+
}
|
|
7849
|
+
} catch (error) {
|
|
7850
|
+
if (active && error.name !== "AbortError") {
|
|
7851
|
+
handleError(error);
|
|
7852
|
+
}
|
|
7853
|
+
}
|
|
7854
|
+
})();
|
|
7855
|
+
return () => {
|
|
7856
|
+
active = false;
|
|
7857
|
+
controller.abort();
|
|
7858
|
+
};
|
|
7859
|
+
}, [cacheRequests, cacheStore2, handleError, src, status]);
|
|
7860
|
+
React.useEffect(() => {
|
|
7861
|
+
if (status === STATUS.LOADED && content) {
|
|
7797
7862
|
getElement();
|
|
7798
7863
|
}
|
|
7799
|
-
}, [
|
|
7864
|
+
}, [content, getElement, status]);
|
|
7800
7865
|
React.useEffect(() => {
|
|
7801
7866
|
if (!canUseDOM() || !previousProps || previousProps.src !== src) {
|
|
7802
7867
|
return;
|
|
@@ -7809,51 +7874,47 @@ function ReactInlineSVG(props) {
|
|
|
7809
7874
|
if (!previousState) {
|
|
7810
7875
|
return;
|
|
7811
7876
|
}
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
if (previousState.status !== STATUS.LOADING) {
|
|
7815
|
-
getContent();
|
|
7816
|
-
}
|
|
7817
|
-
break;
|
|
7818
|
-
}
|
|
7819
|
-
case STATUS.LOADED: {
|
|
7820
|
-
if (previousState.status !== STATUS.LOADED) {
|
|
7821
|
-
getElement();
|
|
7822
|
-
}
|
|
7823
|
-
break;
|
|
7824
|
-
}
|
|
7825
|
-
case STATUS.READY: {
|
|
7826
|
-
if (previousState.status !== STATUS.READY) {
|
|
7827
|
-
onLoad?.(src, isCached);
|
|
7828
|
-
}
|
|
7829
|
-
break;
|
|
7830
|
-
}
|
|
7877
|
+
if (status === STATUS.READY && previousState.status !== STATUS.READY) {
|
|
7878
|
+
onLoadRef.current?.(src, isCached);
|
|
7831
7879
|
}
|
|
7832
|
-
}, [
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
"uniqueHash",
|
|
7848
|
-
"uniquifyIDs"
|
|
7849
|
-
);
|
|
7880
|
+
}, [isCached, previousState, src, status]);
|
|
7881
|
+
return { element, status };
|
|
7882
|
+
}
|
|
7883
|
+
var CacheContext = React.createContext(null);
|
|
7884
|
+
function useCacheStore() {
|
|
7885
|
+
return React.useContext(CacheContext);
|
|
7886
|
+
}
|
|
7887
|
+
|
|
7888
|
+
// src/index.tsx
|
|
7889
|
+
var cacheStore = new CacheStore();
|
|
7890
|
+
function InlineSVG(props) {
|
|
7891
|
+
const { children = null, innerRef, loader = null } = props;
|
|
7892
|
+
const contextStore = useCacheStore();
|
|
7893
|
+
const store = contextStore ?? cacheStore;
|
|
7894
|
+
const { element, status } = useInlineSVG(props, store);
|
|
7850
7895
|
if (!canUseDOM()) {
|
|
7851
7896
|
return loader;
|
|
7852
7897
|
}
|
|
7853
7898
|
if (element) {
|
|
7854
7899
|
return React.cloneElement(element, {
|
|
7855
7900
|
ref: innerRef,
|
|
7856
|
-
...
|
|
7901
|
+
...omit(
|
|
7902
|
+
props,
|
|
7903
|
+
"baseURL",
|
|
7904
|
+
"cacheRequests",
|
|
7905
|
+
"children",
|
|
7906
|
+
"description",
|
|
7907
|
+
"fetchOptions",
|
|
7908
|
+
"innerRef",
|
|
7909
|
+
"loader",
|
|
7910
|
+
"onError",
|
|
7911
|
+
"onLoad",
|
|
7912
|
+
"preProcessor",
|
|
7913
|
+
"src",
|
|
7914
|
+
"title",
|
|
7915
|
+
"uniqueHash",
|
|
7916
|
+
"uniquifyIDs"
|
|
7917
|
+
)
|
|
7857
7918
|
});
|
|
7858
7919
|
}
|
|
7859
7920
|
if ([STATUS.UNSUPPORTED, STATUS.FAILED].includes(status)) {
|
|
@@ -7861,38 +7922,19 @@ function ReactInlineSVG(props) {
|
|
|
7861
7922
|
}
|
|
7862
7923
|
return loader;
|
|
7863
7924
|
}
|
|
7864
|
-
function InlineSVG(props) {
|
|
7865
|
-
if (!cacheStore) {
|
|
7866
|
-
cacheStore = new CacheStore();
|
|
7867
|
-
}
|
|
7868
|
-
const { loader } = props;
|
|
7869
|
-
const [isReady, setReady] = React.useState(cacheStore.isReady);
|
|
7870
|
-
React.useEffect(() => {
|
|
7871
|
-
if (isReady) {
|
|
7872
|
-
return;
|
|
7873
|
-
}
|
|
7874
|
-
cacheStore.onReady(() => {
|
|
7875
|
-
setReady(true);
|
|
7876
|
-
});
|
|
7877
|
-
}, [isReady]);
|
|
7878
|
-
if (!isReady) {
|
|
7879
|
-
return loader;
|
|
7880
|
-
}
|
|
7881
|
-
return /* @__PURE__ */ React.createElement(ReactInlineSVG, { ...props });
|
|
7882
|
-
}
|
|
7883
7925
|
|
|
7884
7926
|
const o=["src","imageSrc","svgSrc","placeholderUrl"],f$1=(f,...a)=>React.forwardRef(function(r,a){const{assetPrefix:c,ignorePathsList:m}=React.useContext(i),p=o.reduce((t,e)=>{let i=r[e];if(i&&"string"==typeof i){if(c){if(n(i,c,m)){i=`${common.formatURL(c).slice(0,-1)}${i}`;}}t[e]=i;}return t},{});return jsxRuntimeExports.jsx(f,{...r,...p,ref:a})}),n=(t,r,e=[])=>{if(t.startsWith("http:")||t.startsWith("https:")||t.startsWith("data:")||t.startsWith(r))return false;for(const r of e)if(r instanceof RegExp){if(r.test(t))return false}else if(common.formatURL(t).startsWith(common.formatURL(r)))return false;return true};
|
|
7885
7927
|
|
|
7886
|
-
const z={sizeXXL:{size:"xxl"},sizeXL:{size:"xl"},sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},sizeXS:{size:"xs"},sizeXXS:{size:"xxs"}},u={appearance:z};function _$1(r){const{appearance:i,className:a,dataTestId:o,dataTour:l$1,cursor:t,style:s,tag:n="span",before:c,after:p$1,isActive:S,isDisabled:x,isSkeleton:z,onClick:_,onDoubleClick:g,children:b}=r,C=e$1(i,u,x),v=p(r,C),{textAlignClass:P,textColorActiveClass:h,textColorActiveHoverClass:T,textColorClass:H,textColorDisabledClass:A,textColorHoverClass:$,textFontClass:B,textStyleClass:w,textTruncateClass:F,textWeightClass:X,textWrapClass:I,cursorClass:k,sizeClass:N,widthClass:Q}=v,{styles:L}=l(r);return jsxRuntimeExports.jsxs(n,{className:clsx(a,"text",N&&`text_size_${N}`,X&&`text-weight_${X}`,P&&`text-align_${P}`,x&&A&&`text-color_${A}`,!S&&!x&&H&&`text-color_${H}`,!S&&!x&&$&&`text-color_hover_${$}`,S&&!x&&T&&`text-color_active_hover_${T}`,S&&!x&&h&&`text-color_active_${h}`,B&&`text-font_${B}`,w&&`text-style_${w}`,I&&`word-wrap_${I}`,F&&`text-truncate_${F}`,z&&"skeleton",Q&&`width_${Q}`,k&&`cursor_${k}`,_&&(t||"cursor_type_pointer")),"data-testid":o,"data-tour":l$1,style:Object.assign({},L,s),onClick:_,onDoubleClick:g,children:[c,b,p$1]})}const g={sizeXXL:{size:"xxl",textSize:"xl",iconSize:"24"},sizeXL:{size:"xl",textSize:"l",iconSize:"24"},sizeL:{size:"l",textSize:"l",iconSize:"24"},sizeM:{size:"m",textSize:"m",iconSize:"24"},sizeS:{size:"s",textSize:"s",iconSize:"24"},sizeXS:{size:"xs",textSize:"xs",iconSize:"24"},sizeXXS:{size:"xxs",textSize:"xs",iconSize:"24"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded",shapeStrength:"2m"},roundedL:{shape:"rounded",shapeStrength:"1_5m"},roundedM:{shape:"rounded",shapeStrength:"1m"},roundedS:{shape:"rounded",shapeStrength:"0_5m"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentQuaternary:{fill:"accentQuaternary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentSecondary",borderColor:"accentBorderQuaternary",textColor:"accentTextQuaternary",dotFill:"accentItemQuaternary",iconFill:"accentItemQuaternary"},accentTertiary:{fill:"accentTertiary",borderColor:"accentBorderSecondary",textColor:"accentTextSecondary",dotFill:"accentItemSecondary",iconFill:"accentItemSecondary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"dangerBorderPrimary",textColor:"dangerTextPrimary",dotFill:"dangerItemPrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderSecondary",textColor:"infoTextPrimary",dotFill:"infoItemPrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"infoSecondary",borderColor:"infoBorderSecondary",textColor:"infoTextSecondary",dotFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"specialBorderSecondary",textColor:"specialTextPrimary",dotFill:"specialItemPrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",borderColor:"extraBorderSecondary",textColor:"extraTextPrimary",dotFill:"extraItemPrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",dotFill:"successItemPrimary",iconFill:"successItemPrimary"},disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",iconFill:"surfaceItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary",dotFill:"surfaceItemPrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"accentPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderSecondary",textColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary",dotFill:"warningItemPrimary",iconFill:"warningItemPrimary"}},b$1={appearance:g};function C(i){const{appearance:a,className:o,dataTestId:l$1,dataTour:t,dot:s,icon:n,iconSrc:c,value:p$1,isSkeleton:S,children:x}=i,z=e$1(a,b$1),u=p(i,z),{fillClass:g,fillHoverClass:C,borderColorClass:v,borderColorHoverClass:P,borderTypeClass:h,borderWidthClass:T,textColor:H,textSize:A,dotFillClass:$,iconFill:B,iconShape:w,iconSize:F,shapeClass:X,shapeStrengthClass:I,sizeClass:k}=u,{styles:Q}=l(i);return jsxRuntimeExports.jsxs("div",{className:clsx(o,"badge",v&&`border-color_${v}`,P&&`border-color_hover_${P}`,T&&`border-width_${T}`,h&&`border_type_${h}`,g&&`fill_${g}`,C&&`fill_hover_${C}`,k&&`badge_size_${k}`,X&&`shape_${X}`,I&&`shape-strength_${I}`,p$1?n?s?"badge_type_dot-icon-counter":"badge_type_icon-counter":"badge_type_counter":n?"badge_type_icon":s?"badge_type_dot":"badge_type_fill",S&&"skeleton"),"data-testid":l$1,"data-tour":t,style:Q,children:[s&&jsxRuntimeExports.jsx("div",{className:clsx("badge__dot",$&&`svg_fill_${$}`),children:jsxRuntimeExports.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("rect",{width:"6",height:"6",rx:"50"})})}),n&&jsxRuntimeExports.jsx(N,{className:"badge__icon",size:F,iconFill:B,imageSrc:c,shape:w,SvgImage:n}),x||p$1&&jsxRuntimeExports.jsx(_$1,{className:"badge__value",size:A,textColor:H,children:p$1})]})}const P$2={LinkComponent:"a"};function T$1(e){const{href:i,LinkComponent:o,rel:l,target:t,children:s,...n}=e;if(i){const e=o||P$2.LinkComponent;return jsxRuntimeExports.jsx(e,{href:i,rel:l,target:t,...n,children:s})}else if(o)return jsxRuntimeExports.jsx(o,{...n,children:s});return React.Children.toArray(s).filter(Boolean).map(e=>React.isValidElement(e)?React.cloneElement(e,n):e)}const H={h1:{size:"h1",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h2:{size:"h2",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h3:{size:"h3",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h4:{size:"h4",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h5:{size:"h5",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},h6:{size:"h6",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},disabledPrimary:{fill:"surfacePrimary",borderColor:"errorBorderQuaternary",borderHover:"errorBorderHoverQuaternary",textColor:"surfaceTextQuaternary",iconBeforeFill:"errorQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderHoverQuaternary",iconBeforeFill:"surfaceQuaternary"},solid:{},outlined:{fill:"none"},full:{},ghost:{fill:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",textColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",textColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",textColor:"warningTextSecondary",textColorHover:"warningTextSecondary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",borderHover:"warningBorderQuaternary",textColor:"surfaceTextPrimary",iconBeforeFill:"warningQuaternary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderQuaternary",iconBeforeFill:"surfaceQuaternary"}},A={appearance:H};function $(i){const{appearance:a,className:l$1,dataTestId:t,dataTour:s,text:n,afterWrapper:c,beforeWrapper:p$1,style:S,tag:x="span",before:z,after:u,isActive:_,isDisabled:g,isSkeleton:b,onClick:C,children:v}=i,P=e$1(a,A,g),h=p(i,P),{directionClass:T,size:H,fillClass:$,fillHoverClass:B,textAlignClass:w,textColorActiveClass:F,textColorActiveHoverClass:X,textColorClass:I,textColorDisabledClass:k,textColorHoverClass:Q,textFontClass:L,textStyleClass:D,textTruncateClass:M,textWeightClass:W,textWrap:V,heightClass:E,iconAfter:O,iconAfterFill:j,iconAfterFillIcon:q,iconAfterFillSize:G,iconAfterShape:R,iconAfterSize:U,iconAfterSrc:J,iconBadgeAppearance:K,iconBadgeShape:Y,iconBadgeSize:Z,iconBadgeTextColor:ee,iconBadgeTextSize:re,iconBadgeValue:ie,iconBefore:ae,iconBeforeFill:oe,iconBeforeFillIcon:le,iconBeforeFillSize:te,iconBeforeShape:se,iconBeforeSize:ne,iconBeforeSrc:ce,svgFillClass:de,svgFillHoverClass:fe,widthClass:me,wrapperDirectionClass:ye,onClickIconAfter:pe,onClickIconBefore:Se}=h,{styles:xe,wrapper:ze}=l(i),ue=React.useMemo(()=>x||(H||"span"),[x,H]);return jsxRuntimeExports.jsxs(ue,{className:clsx(l$1,"title",$&&`fill_${$}`,B&&`fill_hover_${B}`,de&&`svg_fill_${de}`,fe&&`svg_fill_hover_${fe}`,me&&`width_${me}`,E&&`height_${E}`,H&&`title_size_${H}`,T&&`title_direction_${T}`,g&&k&&`text-color_${k}`,!_&&!g&&I&&`text text-color_${I}`,_&&!g&&F&&`text-color_active_${F}`,!_&&!g&&Q&&`text-color_hover_${Q}`,_&&!g&&X&&`text-color_active_hover${X}`,L&&`text-font_${L}`,D&&`text-style_${D}`,W&&`text-weight_${W}`,V&&`word-wrap_${V}`,ie&&"title_badge",b&&"skeleton"),"data-testid":t,"data-tour":s,style:Object.assign({},xe,S),onClick:C,children:[z,jsxRuntimeExports.jsxs("span",{className:clsx(w&&`text-align_${w}`,ye&&`title_direction_${ye}`,"title__wrapper",M&&`text-truncate_${M}`),style:ze,children:[(ae||ce)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_before",ie&&"title__icon_before-badge"),fill:oe,fillSize:te,badgeAppearance:K,badgeClass:"title__icon_before_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:le,iconSize:ne,imageSrc:ce,shape:se,SvgImage:ae,onClick:Se}),p$1,v||n,c,(O||J)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_after",ie&&"title__icon_after-badge"),fill:j,fillSize:G,badgeAppearance:K,badgeClass:"title__icon_after_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:q,iconSize:U,imageSrc:J,shape:R,SvgImage:O,onClick:pe})]}),u]})}const B={defaultPrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",titleColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},sizeL:{size:"l",titleSize:"h5",textSize:"s"},sizeM:{size:"m",titleSize:"h5",textSize:"s"},sizeS:{size:"s",titleSize:"h5",textSize:"s"},disabledPrimary:{fill:"disabledPrimary",fillHover:"disabledHoverPrimary",titleColor:"surfaceTextPrimary",textColor:"surfaceTextPrimary"},requirePrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",titleColor:"warningTextPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded",shapeStrength:"2m"},roundedL:{shape:"rounded",shapeStrength:"1_5m"},roundedM:{shape:"rounded",shapeStrength:"1m"},roundedS:{shape:"rounded",shapeStrength:"0_5m"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",titleColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",titleColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary"}},w={appearance:B},F=React.forwardRef(function(i,a){const{appearance:o,className:c,dataTestId:p$1,dataTour:S,initialIsVisible:x,title:z,text:u,before:g,after:b,openTimeoutDelay:C=500,closeTimeoutDelay:v=250,isSkeleton:P,children:h}=i,T=React.useRef(null),H=React.useRef(null),A=React.useRef(null),B=React.useRef(false),[F,X]=React.useState(x),I=React.useCallback(()=>{B.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=React.useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&(B.current=true),false));},v);},[v]),N=React.useCallback(()=>{B.current=false;},[]);React.useImperativeHandle(a,()=>({get tooltipElement(){return T.current},openTooltip:I,closeTooltip:k,isTooltipVisible:F}),[F,I,k]);const Q=e$1(o,w),L=p(i,Q),{alignClass:D,alignDirectionClass:M,alignmentClass:W,alignPosition:V,fillClass:E,titleColor:O,titleSize:j,titleWeight:q,borderColorClass:G,borderTypeClass:R,borderWidthClass:U,textColor:J,textSize:K,textWeight:Y,arrowPosition:Z,elevationClass:ee,shapeClass:re,shapeStrengthClass:ie,sizeClass:ae,widthClass:oe}=L,{styles:le}=l(i);return jsxRuntimeExports.jsxs("div",{className:clsx(c,"tooltip",V&&`tooltip_align-position_${V}`,M&&`align_${M}`,D&&`align_${D}`,ee&&`elevation_${ee}`,W&&`alignment_${W}`,ae&&`tooltip_size_${ae}`,P&&"skeleton",oe&&`width_${oe}`),ref:T,"data-testid":p$1,"data-tour":S,style:le,onAnimationEnd:N,children:[Z&&jsxRuntimeExports.jsx("div",{className:clsx("tooltip__arrow",Z&&`tooltip__arrow_position_${Z}`,E&&`fill_${E}`),children:" "}),g,jsxRuntimeExports.jsxs("div",{className:clsx("tooltip__inner",U&&`border-width_${U}`,G&&`border-color_${G}`,R&&`border_type_${R}`,E&&`fill_${E}`,re&&`shape_${re}`,ie&&`shape-strength_${ie}`),children:[z&&jsxRuntimeExports.jsx($,{className:"tooltip__title text",size:j,textColor:O,textWeight:q,children:z}),u&&jsxRuntimeExports.jsx(_$1,{className:"tooltip__text",size:K,textColor:J,textWeight:Y,children:u}),h]}),b]})}),I$1={disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemQuaternary"},size12_12:{fillSize:"12",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_12:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_14:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_12:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size16_14:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_16:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_12:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size20_14:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size20_16:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_20:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_12:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size24_14:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size24_16:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size24_20:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_24:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_12:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size32_14:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size32_16:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size32_20:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size32_24:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_32:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_12:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size40_14:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size40_16:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size40_20:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size40_24:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size40_32:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_40:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"40"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"accentItemPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded",shapeStrength:"2m"},roundedL:{shape:"rounded",shapeStrength:"1_5m"},roundedM:{shape:"rounded",shapeStrength:"1m"},roundedS:{shape:"rounded",shapeStrength:"0_5m"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",borderColor:"dangerBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",borderColor:"errorBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",borderColor:"specialBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",borderColor:"extraBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",borderColor:"successBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"successItemPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverSecondary",borderColor:"surfaceBorderTertiary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary",badgeAppearance:"accentPrimary solid rounded",iconFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",borderColor:"warningBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"warningItemPrimary"}},k={appearance:I$1},N=f$1(React.forwardRef(function(i,a){const{id:l$1,appearance:t,className:s,dataTestId:n,dataTour:c,width:S,height:z,badgeClass:u,href:_,imageSrc:g,link:b,linkRel:v,linkTarget:P,notification:h,saveFillStroke:H,showTooltip:A,SvgImage:$,svgImageStyles:B,before:w,after:X,isActive:I,isDisabled:N,isSkeleton:L,onClick:D,onMouseEnter:M,onMouseLeave:W}=i,V=React.useMemo(()=>{if($){const e=$,i={};return S&&(i.width=S),z&&(i.height=z),jsxRuntimeExports.jsx(e,{...i,...B})}return g?g.endsWith(".svg")?jsxRuntimeExports.jsx(InlineSVG,H?{src:g}:{src:g,preProcessor:Q}):jsxRuntimeExports.jsx("img",{src:g}):null},[$,g,S,z,B,H]),E=e$1(t,k,N),O=p(i,E),{alignmentClass:j,fillActiveClass:q,fillActiveHoverClass:G,fillClass:R,fillDisabledClass:U,fillHoverClass:J,fillSizeClass:K,borderColorClass:Y,borderColorHoverClass:Z,borderTypeClass:ee,borderWidthClass:re,badgeAppearance:ie,badgeAppearanceSize:ae,badgeShape:oe,badgeSize:le,badgeTextColor:te,badgeTextSize:se,badgeValue:ne,centeringClass:ce,iconFillActiveClass:de,iconFillActiveHoverClass:fe,iconFillClass:me,iconFillDisabledClass:ye,iconFillHoverClass:pe,iconSizeClass:Se,shapeClass:xe,shapeStrengthClass:ze,tooltipAppearance:ue,tooltipText:_e,tooltipTextSize:ge,tooltipTitle:be,tooltipTitleSize:Ce}=O,{styles:ve}=l(i);return jsxRuntimeExports.jsxs("div",{id:l$1,className:clsx(s,"icon",I?q&&`fill_active_${q}`:R&&`fill_${R}`,I?G&&`fill_active_hover_${G}`:J&&`fill_hover_${J}`,K&&`icon_fill_size_${K}`,U&&`fill_disabled_${U}`,I?de&&`icon_fill_active_${de}`:me&&`icon_fill_${me}`,I?fe&&`icon_fill_active_hover_${fe}`:pe&&`icon_fill_hover_${pe}`,N&&ye&&`icon_fill_disabled_${ye}`,xe&&`shape_${xe}`,ze&&`shape-strength_${ze}`,Y&&`border-color_${Y}`,Z&&`border-color_hover_${Z}`,re&&`border-width_${re}`,ee&&`border_type_${ee}`,ne&&"icon_with-badge",ce&&`centering_${ce}`,D&&"cursor_type_pointer",L&&"skeleton"),ref:a,"data-testid":n,"data-tour":c,style:ve,onClick:D,onMouseEnter:M,onMouseLeave:W,children:[w,jsxRuntimeExports.jsxs(T$1,{className:clsx((b||_||D)&&"cursor_type_pointer",b||_?"icon__link":"icon__item",Se&&`icon_size_${Se}`),href:b||_,LinkComponent:"div",rel:v,target:P,children:[V,(ne||h)&&jsxRuntimeExports.jsx(C,{appearance:r(ie,ae),className:clsx(u,"icon__badge"),size:le,textColor:te,textSize:se,shape:oe,value:ne}),A&&jsxRuntimeExports.jsx(F,{appearance:ue,className:clsx(s,"icon__tooltip",j&&`alignment_${j}`),title:be,titleSize:Ce,text:_e,textSize:ge})]}),X]})})),Q=e=>e.replace(/fill=".*?"/g,'fill=""').replace(/stroke=".*?"/g,'stroke=""');
|
|
7928
|
+
const z={sizeXXL:{size:"xxl"},sizeXL:{size:"xl"},sizeL:{size:"l"},sizeM:{size:"m"},sizeS:{size:"s"},sizeXS:{size:"xs"},sizeXXS:{size:"xxs"}},u={appearance:z};function _$1(r){const{appearance:i,className:a,dataTestId:o,dataTour:l,cursor:t,style:s,tag:n="span",before:c,after:S,isActive:p,isDisabled:x,isSkeleton:z,onClick:_,onDoubleClick:b,children:g}=r,C=e$1(i,u,x),v=u$1(r,C),{textAlignClass:P,textColorActiveClass:T,textColorActiveHoverClass:h,textColorClass:H,textColorDisabledClass:A,textColorHoverClass:B,textFontClass:$,textStyleClass:w,textTruncateClass:F,textWeightClass:X,textWrapClass:I,cursorClass:k,sizeClass:N,widthClass:Q}=v,{styles:L}=c$1(r);return jsxRuntimeExports.jsxs(n,{className:clsx(a,"text",N&&`text_size_${N}`,X&&`text-weight_${X}`,P&&`text-align_${P}`,x&&A&&`text-color_${A}`,!p&&!x&&H&&`text-color_${H}`,!p&&!x&&B&&`text-color_hover_${B}`,p&&!x&&h&&`text-color_active_hover_${h}`,p&&!x&&T&&`text-color_active_${T}`,$&&`text-font_${$}`,w&&`text-style_${w}`,I&&`word-wrap_${I}`,F&&`text-truncate_${F}`,z&&"skeleton",Q&&`width_${Q}`,k&&`cursor_${k}`,_&&(t||"cursor_type_pointer")),"data-testid":o,"data-tour":l,style:Object.assign({},L,s),onClick:_,onDoubleClick:b,children:[c,g,S]})}const b$1={sizeXXL:{size:"xxl",textSize:"xl",iconSize:"24"},sizeXL:{size:"xl",textSize:"l",iconSize:"24"},sizeL:{size:"l",textSize:"l",iconSize:"24"},sizeM:{size:"m",textSize:"m",iconSize:"24"},sizeS:{size:"s",textSize:"s",iconSize:"24"},sizeXS:{size:"xs",textSize:"xxs",iconSize:"24"},sizeXXS:{size:"xxs",textSize:"xxs",iconSize:"24"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentQuaternary:{fill:"accentQuaternary",borderColor:"accentBorderQuaternary",textColor:"accentTextPrimary",dotFill:"accentItemPrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentSecondary",borderColor:"accentBorderQuaternary",textColor:"accentTextQuaternary",dotFill:"accentItemQuaternary",iconFill:"accentItemQuaternary"},accentTertiary:{fill:"accentTertiary",borderColor:"accentBorderSecondary",textColor:"accentTextSecondary",dotFill:"accentItemSecondary",iconFill:"accentItemSecondary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"dangerBorderPrimary",textColor:"dangerTextPrimary",dotFill:"dangerItemPrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderSecondary",textColor:"infoTextPrimary",dotFill:"infoItemPrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"infoSecondary",borderColor:"infoBorderSecondary",textColor:"infoTextSecondary",dotFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"specialBorderSecondary",textColor:"specialTextPrimary",dotFill:"specialItemPrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",borderColor:"extraBorderSecondary",textColor:"extraTextPrimary",dotFill:"extraItemPrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",dotFill:"successItemPrimary",iconFill:"successItemPrimary"},disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",iconFill:"surfaceItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary",dotFill:"surfaceItemPrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"accentPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderSecondary",textColor:"surfaceTextPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderTertiary",textColor:"surfaceTextPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary",dotFill:"warningItemPrimary",iconFill:"warningItemPrimary"}},g={appearance:b$1};function C(i){const{appearance:a,className:o,dataTestId:l,dataTour:t,dot:s,icon:n,iconSrc:c,value:S,isSkeleton:p,children:x}=i,z=e$1(a,g),u=u$1(i,z),{fillClass:b,fillHoverClass:C,borderColorClass:v,borderColorHoverClass:P,borderTypeClass:T,borderWidthClass:h,textColor:H,textSize:A,dotFillClass:B,iconFill:$,iconShape:w,iconSize:F,shapeClass:X,sizeClass:I}=u,{styles:k}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(o,"badge",v&&`border-color_${v}`,P&&`border-color_hover_${P}`,h&&`border-width_${h}`,T&&`border_type_${T}`,b&&`fill_${b}`,C&&`fill_hover_${C}`,I&&`badge_size_${I}`,X&&`shape_${X}`,S?n?s?"badge_type_dot-icon-counter":"badge_type_icon-counter":"badge_type_counter":n?"badge_type_icon":s?"badge_type_dot":"badge_type_fill",p&&"skeleton"),"data-testid":l,"data-tour":t,style:k,children:[s&&jsxRuntimeExports.jsx("div",{className:clsx("badge__dot",B&&`svg_fill_${B}`),children:jsxRuntimeExports.jsx("svg",{width:"6",height:"6",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("rect",{width:"6",height:"6",rx:"50"})})}),n&&jsxRuntimeExports.jsx(N,{className:"badge__icon",size:F,iconFill:$,imageSrc:c,shape:w,SvgImage:n}),x||S&&jsxRuntimeExports.jsx(_$1,{className:"badge__value",size:A,textColor:H,children:S})]})}const P$2={LinkComponent:"a"};function h(e){const{href:i,LinkComponent:o,rel:l,target:t,children:s,...n}=e;if(i){const e=o||P$2.LinkComponent;return jsxRuntimeExports.jsx(e,{href:i,rel:l,target:t,...n,children:s})}else if(o)return jsxRuntimeExports.jsx(o,{...n,children:s});return React.Children.toArray(s).filter(Boolean).map(e=>React.isValidElement(e)?React.cloneElement(e,n):e)}const H={h1:{size:"h1",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h2:{size:"h2",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h3:{size:"h3",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h4:{size:"h4",iconAfterFillSize:"24",iconAfterSize:"24",iconBeforeFillSize:"24",iconBeforeSize:"24"},h5:{size:"h5",iconAfterFillSize:"20",iconAfterSize:"20",iconBeforeFillSize:"20",iconBeforeSize:"20"},h6:{size:"h6",iconAfterFillSize:"16",iconAfterSize:"16",iconBeforeFillSize:"16",iconBeforeSize:"16"},disabledPrimary:{fill:"surfacePrimary",borderColor:"errorBorderQuaternary",borderHover:"errorBorderHoverQuaternary",textColor:"surfaceTextQuaternary",iconBeforeFill:"errorQuaternary"},disabledSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderHoverQuaternary",iconBeforeFill:"surfaceQuaternary"},solid:{},outlined:{fill:"none"},full:{},ghost:{fill:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",textColor:"errorTextPrimary",textColorHover:"errorTextPrimary"},infoPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",textColor:"extraTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverSecondary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",textColor:"warningTextSecondary",textColorHover:"warningTextSecondary"},requirePrimary:{fill:"warningTertiary",borderColor:"warningBorderQuaternary",borderHover:"warningBorderQuaternary",textColor:"surfaceTextPrimary",iconBeforeFill:"warningQuaternary"},requireSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderTertiary",borderHover:"surfaceBorderQuaternary",iconBeforeFill:"surfaceQuaternary"}},A={appearance:H};function B(i){const{appearance:a,className:l,dataTestId:t,dataTour:s,text:n,afterWrapper:c,beforeWrapper:S,style:p,tag:x="span",before:z,after:u,isActive:_,isDisabled:b,isSkeleton:g,onClick:C,children:v}=i,P=e$1(a,A,b),T=u$1(i,P),{directionClass:h,size:H,fillClass:B,fillHoverClass:$,textAlignClass:w,textColorActiveClass:F,textColorActiveHoverClass:X,textColorClass:I,textColorDisabledClass:k,textColorHoverClass:Q,textFontClass:L,textStyleClass:D,textTruncateClass:M,textWeightClass:W,textWrap:V,heightClass:E,iconAfter:O,iconAfterFill:j,iconAfterFillIcon:q,iconAfterFillSize:G,iconAfterShape:R,iconAfterSize:U,iconAfterSrc:J,iconBadgeAppearance:K,iconBadgeShape:Y,iconBadgeSize:Z,iconBadgeTextColor:ee,iconBadgeTextSize:re,iconBadgeValue:ie,iconBefore:ae,iconBeforeFill:oe,iconBeforeFillIcon:le,iconBeforeFillSize:te,iconBeforeShape:se,iconBeforeSize:ne,iconBeforeSrc:ce,svgFillClass:de,svgFillHoverClass:fe,widthClass:ye,wrapperDirectionClass:me,onClickIconAfter:Se,onClickIconBefore:pe}=T,{styles:xe,wrapper:ze}=c$1(i),ue=React.useMemo(()=>x||(H||"span"),[x,H]);return jsxRuntimeExports.jsxs(ue,{className:clsx(l,"title",B&&`fill_${B}`,$&&`fill_hover_${$}`,de&&`svg_fill_${de}`,fe&&`svg_fill_hover_${fe}`,ye&&`width_${ye}`,E&&`height_${E}`,H&&`title_size_${H}`,h&&`title_direction_${h}`,b&&k&&`text-color_${k}`,!_&&!b&&I&&`text text-color_${I}`,_&&!b&&F&&`text-color_active_${F}`,!_&&!b&&Q&&`text-color_hover_${Q}`,_&&!b&&X&&`text-color_active_hover${X}`,L&&`text-font_${L}`,D&&`text-style_${D}`,W&&`text-weight_${W}`,V&&`word-wrap_${V}`,ie&&"title_badge",g&&"skeleton"),"data-testid":t,"data-tour":s,style:Object.assign({},xe,p),onClick:C,children:[z,jsxRuntimeExports.jsxs("span",{className:clsx(w&&`text-align_${w}`,me&&`title_direction_${me}`,"title__wrapper",M&&`text-truncate_${M}`),style:ze,children:[(ae||ce)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_before",ie&&"title__icon_before-badge"),fill:oe,fillSize:te,badgeAppearance:K,badgeClass:"title__icon_before_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:le,iconSize:ne,imageSrc:ce,shape:se,SvgImage:ae,onClick:pe}),S,v||n,c,(O||J)&&jsxRuntimeExports.jsx(N,{className:clsx("title__icon_after",ie&&"title__icon_after-badge"),fill:j,fillSize:G,badgeAppearance:K,badgeClass:"title__icon_after_badge",badgeShape:Y,badgeSize:Z,badgeTextColor:ee,badgeTextSize:re,badgeValue:ie,iconFill:q,iconSize:U,imageSrc:J,shape:R,SvgImage:O,onClick:Se})]}),u]})}const $={defaultPrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverPrimary",titleColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary"},sizeL:{size:"l",titleSize:"h5",textSize:"s"},sizeM:{size:"m",titleSize:"h5",textSize:"s"},sizeS:{size:"s",titleSize:"h5",textSize:"s"},disabledPrimary:{fill:"disabledPrimary",fillHover:"disabledHoverPrimary",titleColor:"surfaceTextPrimary",textColor:"surfaceTextPrimary"},requirePrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",titleColor:"warningTextPrimary",borderColor:"warningBorderPrimary",textColor:"warningTextPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",titleColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",titleColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary"}},w={appearance:$},F=React.forwardRef(function(i,a){const{appearance:o,className:c,dataTestId:S,dataTour:p,initialIsVisible:x,title:z,text:u,before:b,after:g,openTimeoutDelay:C=500,closeTimeoutDelay:v=250,isSkeleton:P,children:T}=i,h=React.useRef(null),H=React.useRef(null),A=React.useRef(null),$=React.useRef(false),[F,X]=React.useState(x),I=React.useCallback(()=>{$.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=React.useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&($.current=true),false));},v);},[v]),N=React.useCallback(()=>{$.current=false;},[]);React.useImperativeHandle(a,()=>({get tooltipElement(){return h.current},openTooltip:I,closeTooltip:k,isTooltipVisible:F}),[F,I,k]);const Q=e$1(o,w),L=u$1(i,Q),{alignClass:D,alignDirectionClass:M,alignmentClass:W,alignPosition:V,fillClass:E,titleColor:O,titleSize:j,titleWeight:q,borderColorClass:G,borderTypeClass:R,borderWidthClass:U,textColor:J,textSize:K,textWeight:Y,arrowPosition:Z,elevationClass:ee,shapeClass:re,sizeClass:ie,widthClass:ae}=L,{styles:oe}=c$1(i);return jsxRuntimeExports.jsxs("div",{className:clsx(c,"tooltip",V&&`tooltip_align-position_${V}`,M&&`align_${M}`,D&&`align_${D}`,ee&&`elevation_${ee}`,W&&`alignment_${W}`,ie&&`tooltip_size_${ie}`,P&&"skeleton",ae&&`width_${ae}`),ref:h,"data-testid":S,"data-tour":p,style:oe,onAnimationEnd:N,children:[Z&&jsxRuntimeExports.jsx("div",{className:clsx("tooltip__arrow",Z&&`tooltip__arrow_position_${Z}`,E&&`fill_${E}`),children:" "}),b,jsxRuntimeExports.jsxs("div",{className:clsx("tooltip__inner",U&&`border-width_${U}`,G&&`border-color_${G}`,R&&`border_type_${R}`,E&&`fill_${E}`,re&&`shape_${re}`),children:[z&&jsxRuntimeExports.jsx(B,{className:"tooltip__title text",size:j,textColor:O,textWeight:q,children:z}),u&&jsxRuntimeExports.jsx(_$1,{className:"tooltip__text",size:K,textColor:J,textWeight:Y,children:u}),T]}),g]})}),I$1={disabledPrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemQuaternary"},size12_12:{fillSize:"12",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_12:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size14_14:{fillSize:"14",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_12:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size16_14:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size16_16:{fillSize:"16",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_12:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size20_14:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size20_16:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size20_20:{fillSize:"20",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_12:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size24_14:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size24_16:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size24_20:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size24_24:{fillSize:"24",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_12:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size32_14:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size32_16:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size32_20:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size32_24:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size32_32:{fillSize:"32",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_12:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"12"},size40_14:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"14"},size40_16:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"16"},size40_20:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"20"},size40_24:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"24"},size40_32:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"32"},size40_40:{fillSize:"40",badgeAppearanceSize:"sizeXXS",badgeSize:"xxs",iconSize:"40"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"accentItemPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"accentItemPrimary"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",borderColor:"dangerBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",borderColor:"errorBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"errorItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"infoBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"infoItemPrimary"},infoSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",borderColor:"accentBorderPrimary",iconFill:"infoItemSecondary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",borderColor:"specialBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"specialItemPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",borderColor:"extraBorderQuaternary",badgeAppearance:"surfacePrimary",iconFill:"extraItemPrimary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",borderColor:"successBorderPrimary",badgeAppearance:"surfacePrimary",iconFill:"successItemPrimary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceHoverSecondary",borderColor:"surfaceBorderTertiary",badgeAppearance:"surfacePrimary",iconFill:"surfaceItemPrimary"},surfaceQuaternary:{fill:"surfaceQuaternary",fillHover:"surfaceHoverQuaternary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary solid rounded",iconFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceHoverTertiary",badgeAppearance:"accentPrimary",iconFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",borderColor:"warningBorderSecondary",badgeAppearance:"surfacePrimary",iconFill:"warningItemPrimary"}},k={appearance:I$1},N=f$1(React.forwardRef(function(i,a){const{id:l,appearance:t,className:s,dataTestId:n,dataTour:c,width:p,height:z,badgeClass:u,href:_,imageSrc:b,link:g,linkRel:v,linkTarget:P,notification:T,saveFillStroke:H,showTooltip:A,SvgImage:B,svgImageStyles:$,before:w,after:X,isActive:I,isDisabled:N,isSkeleton:L,onClick:D,onMouseEnter:M,onMouseLeave:W}=i,V=React.useMemo(()=>{if(B){const e=B,i={};return p&&(i.width=p),z&&(i.height=z),jsxRuntimeExports.jsx(e,{...i,...$})}return b?b.endsWith(".svg")?jsxRuntimeExports.jsx(InlineSVG,H?{src:b}:{src:b,preProcessor:Q}):jsxRuntimeExports.jsx("img",{src:b}):null},[B,b,p,z,$,H]),E=e$1(t,k,N),O=u$1(i,E),{alignmentClass:j,fillActiveClass:q,fillActiveHoverClass:G,fillClass:R,fillDisabledClass:U,fillHoverClass:J,fillSizeClass:K,borderColorClass:Y,borderColorHoverClass:Z,borderTypeClass:ee,borderWidthClass:re,badgeAppearance:ie,badgeAppearanceSize:ae,badgeShape:oe,badgeSize:le,badgeTextColor:te,badgeTextSize:se,badgeValue:ne,centeringClass:ce,iconFillActiveClass:de,iconFillActiveHoverClass:fe,iconFillClass:ye,iconFillDisabledClass:me,iconFillHoverClass:Se,iconSizeClass:pe,shapeClass:xe,tooltipAppearance:ze,tooltipText:ue,tooltipTextSize:_e,tooltipTitle:be,tooltipTitleSize:ge}=O,{styles:Ce}=c$1(i);return jsxRuntimeExports.jsxs("div",{id:l,className:clsx(s,"icon",I?q&&`fill_active_${q}`:R&&`fill_${R}`,I?G&&`fill_active_hover_${G}`:J&&`fill_hover_${J}`,K&&`icon_fill_size_${K}`,U&&`fill_disabled_${U}`,I?de&&`icon_fill_active_${de}`:ye&&`icon_fill_${ye}`,I?fe&&`icon_fill_active_hover_${fe}`:Se&&`icon_fill_hover_${Se}`,N&&me&&`icon_fill_disabled_${me}`,xe&&`shape_${xe}`,Y&&`border-color_${Y}`,Z&&`border-color_hover_${Z}`,re&&`border-width_${re}`,ee&&`border_type_${ee}`,ne&&"icon_with-badge",ce&&`centering_${ce}`,D&&"cursor_type_pointer",L&&"skeleton"),ref:a,"data-testid":n,"data-tour":c,style:Ce,onClick:D,onMouseEnter:M,onMouseLeave:W,children:[w,jsxRuntimeExports.jsxs(h,{className:clsx((g||_||D)&&"cursor_type_pointer",g||_?"icon__link":"icon__item",pe&&`icon_size_${pe}`),href:g||_,LinkComponent:"div",rel:v,target:P,children:[V,(ne||T)&&jsxRuntimeExports.jsx(C,{appearance:r(ie,ae),className:clsx(u,"icon__badge"),size:le,textColor:te,textSize:se,shape:oe,value:ne}),A&&jsxRuntimeExports.jsx(F,{appearance:ze,className:clsx(s,"icon__tooltip",j&&`alignment_${j}`),title:be,titleSize:ge,text:ue,textSize:_e})]}),X]})})),Q=e=>e.replace(/fill=".*?"/g,'fill=""').replace(/stroke=".*?"/g,'stroke=""');
|
|
7887
7929
|
|
|
7888
|
-
const t={accentPrimary:{fill:"accentPrimary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemPrimary"},accentTertiary:{fill:"accentTertiary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"surfaceBorderSecondary",itemFill:"specialItemPrimary"},sizeL:{size:"l",textSize:"m"},sizeM:{size:"m",textSize:"s"},sizeS:{size:"s",textSize:"xs"},extraPrimary:{fill:"extraPrimary",borderColor:"surfaceBorderSecondary",itemFill:"extraItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"surfaceBorderSecondary",itemFill:"warningItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"surfaceBorderSecondary",itemFill:"successItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"surfaceBorderSecondary",itemFill:"infoItemPrimary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"surfaceBorderSecondary",itemFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",borderColor:"surfaceBorderSecondary",itemFill:"errorItemPrimary"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},c={appearance:t};function m(t){const{appearance:m,className:d,dataTestId:n,dataTour:y,type:f="dot",text:u,isDisabled:P,isSkeleton:p
|
|
7930
|
+
const t={accentPrimary:{fill:"accentPrimary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemPrimary"},accentTertiary:{fill:"accentTertiary",borderColor:"surfaceBorderSecondary",itemFill:"accentItemSecondary"},specialPrimary:{fill:"specialPrimary",borderColor:"surfaceBorderSecondary",itemFill:"specialItemPrimary"},sizeL:{size:"l",textSize:"m"},sizeM:{size:"m",textSize:"s"},sizeS:{size:"s",textSize:"xs"},extraPrimary:{fill:"extraPrimary",borderColor:"surfaceBorderSecondary",itemFill:"extraItemPrimary"},surfacePrimary:{fill:"surfacePrimary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceSecondary:{fill:"surfaceSecondary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},surfaceTertiary:{fill:"surfaceTertiary",borderColor:"surfaceBorderPrimary",itemFill:"surfaceItemPrimary"},warningPrimary:{fill:"warningPrimary",borderColor:"surfaceBorderSecondary",itemFill:"warningItemPrimary"},successPrimary:{fill:"successPrimary",borderColor:"surfaceBorderSecondary",itemFill:"successItemPrimary"},infoPrimary:{fill:"infoPrimary",borderColor:"surfaceBorderSecondary",itemFill:"infoItemPrimary"},dangerPrimary:{fill:"dangerPrimary",borderColor:"surfaceBorderSecondary",itemFill:"dangerItemPrimary"},errorPrimary:{fill:"errorPrimary",borderColor:"surfaceBorderSecondary",itemFill:"errorItemPrimary"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},c={appearance:t};function m(t){const{appearance:m,className:d,dataTestId:n,dataTour:y,type:f="dot",text:u,isDisabled:P,isSkeleton:p,children:C}=t,_=e$1(m,c,P),S=u$1(t,_),{fillClass:b,borderColorClass:h,textColor:x,textSize:z,heightClass:F,itemFillClass:I,shapeClass:B,sizeClass:$,widthClass:g}=S,{styles:N}=c$1(t);return jsxRuntimeExports.jsxs("div",{className:clsx("loader",d,g&&`width_${g}`,F&&`height_${F}`,b&&`fill_${b}`,$&&`loader_size_${$}`,p&&"skeleton",f&&`loader_type_${f}`,B&&`shape_${B}`),"data-testid":n,"data-tour":y,style:N,children:[C||jsxRuntimeExports.jsxs("div",{className:"loader__inner",children:[jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`,"circular"===f&&`border-color_${h}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "}),jsxRuntimeExports.jsx("span",{className:clsx("loader__item",I&&`fill_${I}`),children:" "})]}),u&&jsxRuntimeExports.jsx(_$1,{className:"loader__text",size:z,textColor:x,children:u})]})}
|
|
7889
7931
|
|
|
7890
|
-
const I="holding",P$1="idle";const T={sizeXXL:{size:"xxl",labelTextSize:"xl",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeXL:{size:"xl",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeL:{size:"l",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeM:{size:"m",labelTextSize:"m",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeS:{size:"s",labelTextSize:"s",iconAfterAppearanceSize:"size20_20",iconBeforeAppearanceSize:"size20_20",loaderAppearanceSize:"sizeL"},sizeXS:{size:"xs",labelTextSize:"xs",iconAfterAppearanceSize:"size16_16",iconBeforeAppearanceSize:"size16_16",loaderAppearanceSize:"sizeL"},sizeXXS:{size:"xxs",labelTextSize:"xs",iconAfterAppearanceSize:"size14_14",iconBeforeAppearanceSize:"size14_14",loaderAppearanceSize:"sizeL"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded",shapeStrength:"2m"},roundedL:{shape:"rounded",shapeStrength:"1_5m"},roundedM:{shape:"rounded",shapeStrength:"1m"},roundedS:{shape:"rounded",shapeStrength:"0_5m"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentMutedPrimary:{fill:"accentTertiary",fillHover:"accentHoverTertiary",labelTextColor:"accentTextQuaternary",labelTextColorHover:"accentTextQuaternary",borderColor:"accentBorderSecondary",iconAfterFillIcon:"accentItemQuaternary",iconBeforeFillIcon:"accentItemQuaternary",iconFillIcon:"accentItemQuaternary",loaderAppearance:"accentTertiary"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},dangerMutedPrimary:{fill:"dangerTertiary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextQuaternary",labelTextColorHover:"dangerTextQuaternary",borderColor:"dangerBorderSecondary",iconAfterFillIcon:"dangerItemQuaternary",iconBeforeFillIcon:"dangerItemQuaternary",iconFillIcon:"dangerItemQuaternary",loaderAppearance:"dangerTertiary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextPrimary",labelTextColorHover:"dangerTextPrimary",iconAfterFillIcon:"dangerItemPrimary",iconBeforeFillIcon:"dangerItemPrimary",iconFillIcon:"dangerItemPrimary",loaderAppearance:"dangerPrimary"},errorMutedPrimary:{fill:"errorTertiary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextQuaternary",labelTextColorHover:"errorTextQuaternary",borderColor:"errorBorderSecondary",iconAfterFillIcon:"errorItemQuaternary",iconBeforeFillIcon:"errorItemQuaternary",iconFillIcon:"errorItemQuaternary",loaderAppearance:"errorTertiary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextPrimary",labelTextColorHover:"errorTextPrimary",iconAfterFillIcon:"errorItemPrimary",iconBeforeFillIcon:"errorItemPrimary",iconFillIcon:"errorItemPrimary",loaderAppearance:"errorPrimary"},infoMutedPrimary:{fill:"infoTertiary",fillHover:"infoHoverTertiary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderSecondary",iconAfterFillIcon:"infoItemSecondary",iconBeforeFillIcon:"infoItemSecondary",iconFillIcon:"infoItemSecondary",loaderAppearance:"infoTertiary"},infoPrimary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextPrimary",labelTextColorHover:"infoTextPrimary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},infoSecondary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},specialMutedPrimary:{fill:"specialTertiary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextSecondary",borderColor:"specialBorderTertiary",iconAfterFillIcon:"specialItemSecondary",iconBeforeFillIcon:"specialItemSecondary",iconFillIcon:"specialItemSecondary",loaderAppearance:"specialTertiary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextPrimary",iconAfterFillIcon:"specialItemPrimary",iconBeforeFillIcon:"specialItemPrimary",iconFillIcon:"specialItemPrimary",loaderAppearance:"specialPrimary"},extraMutedPrimary:{fill:"extraTertiary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextQuaternary",borderColor:"extraBorderSecondary",iconAfterFillIcon:"extraItemQuaternary",iconBeforeFillIcon:"extraItemQuaternary",iconFillIcon:"extraItemQuaternary",loaderAppearance:"extraPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextPrimary",iconAfterFillIcon:"extraItemPrimary",iconBeforeFillIcon:"extraItemPrimary",iconFillIcon:"extraItemPrimary",loaderAppearance:"extraPrimary"},successMutedPrimary:{fill:"successTertiary",fillHover:"successHoverPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextQuaternary",borderColor:"successBorderQuaternary",iconAfterFillIcon:"successItemQuaternary",iconBeforeFillIcon:"successItemQuaternary",iconFillIcon:"successItemQuaternary",loaderAppearance:"successTertiary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",labelTextColor:"successTextPrimary",labelTextColorHover:"successTextPrimary",iconAfterFillIcon:"successItemPrimary",iconBeforeFillIcon:"successItemPrimary",iconFillIcon:"successItemPrimary",loaderAppearance:"successPrimary"},surfaceMutedPrimary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderQuaternary",iconAfterFillIcon:"surfaceItemQuaternary",iconBeforeFillIcon:"surfaceItemQuaternary",iconFillIcon:"surfaceItemQuaternary",loaderAppearance:"surfaceTertiary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceQuaternary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},warningMutedPrimary:{fill:"warningTertiary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextPrimary",borderColor:"warningBorderPrimary",iconAfterFillIcon:"warningItemSecondary",iconBeforeFillIcon:"warningItemSecondary",iconFillIcon:"warningItemSecondary",loaderAppearance:"warningTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextPrimary",labelTextColorHover:"warningTextPrimary",iconAfterFillIcon:"warningItemPrimary",iconBeforeFillIcon:"warningItemPrimary",iconFillIcon:"warningItemPrimary",loaderAppearance:"warningPrimary"}},x$1={appearance:T},b=React.forwardRef(function(a,T){const{appearance:b,className:S,dataTestId:A,dataTour:F,label:z,Badge:C,href:_,htmlType:g="button",link:v,rel:H,target:B,tooltip:h,before:Q,after:w,isDisabled:L,isHolding:M,isLoading:$=false,onClick:N$1,onHoldComplete:k,onMouseDown:X,children:D}=a,W=e$1(b,x$1,L),j=p(a,W),{fillClass:q,fillHoverClass:E,labelTextColor:G,labelTextColorHover:R,labelTextSize:U,labelTextTruncate:J,labelTextWeight:K,labelTextWidth:O,labelTextWrap:V,borderColorClass:Y,borderTypeClass:Z,borderWidthClass:ee,elevationClass:re,icon:ae,iconAfter:oe,iconAfterAppearance:ie,iconAfterAppearanceSize:le,iconAfterFill:ne,iconAfterFillIcon:te,iconAfterFillSize:ce,iconAfterShape:se,iconAfterSize:me,iconAfterSrc:fe,iconAppearance:ye,iconAppearanceSize:de,iconBefore:pe,iconBeforeAppearance:ue,iconBeforeAppearanceSize:Ie,iconBeforeFill:Pe,iconBeforeFillIcon:Te,iconBeforeFillSize:xe,iconBeforeShape:be,iconBeforeSize:Se,iconBeforeSrc:Ae,iconFill:Fe,iconFillIcon:ze,iconFillSize:Ce,iconShape:_e,iconSize:ge,iconSrc:ve,loaderAppearance:He,loaderAppearanceSize:Be,loaderFill:he,loaderItemFill:Qe,loaderSize:we,loaderType:Le="dot",shapeClass:Me,shapeStrengthClass:$e,sizeClass:Ne,widthClass:ke,zeroGap:Xe,zeroPadding:De,isSkeleton:We}=j,{label:je,styles:qe}=l(a),{holdState:Ee,onHoldEnd:Ge,onHoldStart:Re}=function(e){const{holdDurationMs:r=500,isHolding:a,onHoldComplete:t}=e,c=React.useRef(null),s=React.useRef(t),[m,f]=React.useState(P$1),y=React.useRef(0);s.current=t,React.useEffect(()=>(c.current=requestAnimationFrame(function e(){if(m===I&&1===y.current&&s.current&&s.current(),m===I&&y.current<1){const a=y.current,o=Math.min(a+16/r,1);y.current=o,c.current=requestAnimationFrame(e);}if(m===P$1&&y.current>0){const a=y.current,o=Math.max(a-16/r,0);y.current=o,c.current=requestAnimationFrame(e);}}),()=>{c.current&&cancelAnimationFrame(c.current);}),[m,r]);const d=React.useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=React.useCallback(e=>{f(P$1);},[]);return {holdState:m,onHoldEnd:p,onHoldStart:d}}({holdDurationMs:500,isHolding:M,onHoldComplete:k}),Ue=w||Q||ae||oe||fe||pe||Ae||ve;return jsxRuntimeExports.jsx(T$1,{className:clsx(S,"button",z&&Ue?"button_type_default":z?"button_type_label":Ue?"button_type_icon":"",ee&&`border-width_${ee}`,Y&&`border-color_${Y}`,Z&&`border_type_${Z}`,q&&`fill_${q}`,E&&!L&&`fill_hover_${E}`,Me&&`shape_${Me}`,$e&&`shape-strength_${$e}`,Ne&&`button_size_${Ne}`,ke&&`button_width_${ke}`,re&&`elevation_${re}`,N$1&&"cursor_type_pointer",L&&"button_state_disabled cursor_type_default",C&&"button_type_badge",De&&"button_reset-padding",Xe&&"button_reset-gap",$&&"button_state_loading",We&&"skeleton",M&&"button_holding",Ee&&`button_state_${Ee}`),type:g,title:h,"data-testid":A&&`${A}-button`,"data-tour":F,disabled:L,href:v||_,LinkComponent:"button",rel:H,style:qe,target:B,onClick:N$1,onMouseDown:X,onPointerCancel:Ge,onPointerDown:Re,onPointerLeave:Ge,onPointerUp:Ge,children:jsxRuntimeExports.jsxs("div",{className:"button__wrapper",ref:T,children:[M&&jsxRuntimeExports.jsx("div",{className:clsx("button__indication",`button__indication_${Ee}`),children:jsxRuntimeExports.jsx("div",{className:"button__indication-item",children:" "})}),$&&jsxRuntimeExports.jsx(m,{appearance:r(He,Be),className:clsx(S,"button__loader"),type:Le,size:we,fill:he,itemFill:Qe}),Q,(pe||Ae)&&jsxRuntimeExports.jsx(N,{appearance:r(ue,Ie),className:"button__icon_before",fill:Pe,fillSize:xe,iconFill:Te,iconSize:Se,imageSrc:Ae,shape:be,SvgImage:pe}),(ae||ve)&&jsxRuntimeExports.jsx(N,{appearance:r(ye,de),className:"button__icon",fill:Fe,fillSize:Ce,iconFill:ze,iconSize:ge,imageSrc:ve,shape:_e,SvgImage:ae}),(D||z)&&jsxRuntimeExports.jsx(_$1,{className:"button__label",width:O,size:U,textColor:G,textColorHover:R,textTruncate:J,textWeight:K,textWrap:V,style:je,children:D||z}),(oe||fe)&&jsxRuntimeExports.jsx(N,{appearance:r(ie,le),className:"button__icon_after",fill:ne,fillSize:ce,iconFill:te,iconSize:me,imageSrc:fe,shape:se,SvgImage:oe}),C,w]})})});
|
|
7932
|
+
const I="holding",P$1="idle";const T={sizeXXL:{size:"xxl",labelTextSize:"xl",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeXL:{size:"xl",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeL:{size:"l",labelTextSize:"l",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeM:{size:"m",labelTextSize:"m",iconAfterAppearanceSize:"size24_24",iconBeforeAppearanceSize:"size24_24",loaderAppearanceSize:"sizeL"},sizeS:{size:"s",labelTextSize:"s",iconAfterAppearanceSize:"size20_20",iconBeforeAppearanceSize:"size20_20",loaderAppearanceSize:"sizeL"},sizeXS:{size:"xs",labelTextSize:"xs",iconAfterAppearanceSize:"size16_16",iconBeforeAppearanceSize:"size16_16",loaderAppearanceSize:"sizeL"},sizeXXS:{size:"xxs",labelTextSize:"xs",iconAfterAppearanceSize:"size14_14",iconBeforeAppearanceSize:"size14_14",loaderAppearanceSize:"sizeL"},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},accentMutedPrimary:{fill:"accentTertiary",fillHover:"accentHoverTertiary",labelTextColor:"accentTextQuaternary",labelTextColorHover:"accentTextQuaternary",borderColor:"accentBorderSecondary",iconAfterFillIcon:"accentItemQuaternary",iconBeforeFillIcon:"accentItemQuaternary",iconFillIcon:"accentItemQuaternary",loaderAppearance:"accentTertiary"},accentPrimary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextPrimary",labelTextColorHover:"accentTextPrimary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},accentSecondary:{fill:"accentPrimary",fillHover:"accentHoverPrimary",labelTextColor:"accentTextSecondary",labelTextColorHover:"accentTextSecondary",borderColor:"accentBorderPrimary",iconAfterFillIcon:"accentItemPrimary",iconBeforeFillIcon:"accentItemPrimary",iconFillIcon:"accentItemPrimary",loaderAppearance:"accentPrimary"},dangerMutedPrimary:{fill:"dangerTertiary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextQuaternary",labelTextColorHover:"dangerTextQuaternary",borderColor:"dangerBorderSecondary",iconAfterFillIcon:"dangerItemQuaternary",iconBeforeFillIcon:"dangerItemQuaternary",iconFillIcon:"dangerItemQuaternary",loaderAppearance:"dangerTertiary"},dangerPrimary:{fill:"dangerPrimary",fillHover:"dangerHoverPrimary",labelTextColor:"dangerTextPrimary",labelTextColorHover:"dangerTextPrimary",iconAfterFillIcon:"dangerItemPrimary",iconBeforeFillIcon:"dangerItemPrimary",iconFillIcon:"dangerItemPrimary",loaderAppearance:"dangerPrimary"},errorMutedPrimary:{fill:"errorTertiary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextQuaternary",labelTextColorHover:"errorTextQuaternary",borderColor:"errorBorderSecondary",iconAfterFillIcon:"errorItemQuaternary",iconBeforeFillIcon:"errorItemQuaternary",iconFillIcon:"errorItemQuaternary",loaderAppearance:"errorTertiary"},errorPrimary:{fill:"errorPrimary",fillHover:"errorHoverPrimary",labelTextColor:"errorTextPrimary",labelTextColorHover:"errorTextPrimary",iconAfterFillIcon:"errorItemPrimary",iconBeforeFillIcon:"errorItemPrimary",iconFillIcon:"errorItemPrimary",loaderAppearance:"errorPrimary"},infoMutedPrimary:{fill:"infoTertiary",fillHover:"infoHoverTertiary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderSecondary",iconAfterFillIcon:"infoItemSecondary",iconBeforeFillIcon:"infoItemSecondary",iconFillIcon:"infoItemSecondary",loaderAppearance:"infoTertiary"},infoPrimary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextPrimary",labelTextColorHover:"infoTextPrimary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},infoSecondary:{fill:"infoPrimary",fillHover:"infoHoverPrimary",labelTextColor:"infoTextSecondary",labelTextColorHover:"infoTextSecondary",borderColor:"infoBorderPrimary",iconAfterFillIcon:"infoItemPrimary",iconBeforeFillIcon:"infoItemPrimary",iconFillIcon:"infoItemPrimary",loaderAppearance:"infoPrimary"},specialMutedPrimary:{fill:"specialTertiary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextSecondary",borderColor:"specialBorderTertiary",iconAfterFillIcon:"specialItemSecondary",iconBeforeFillIcon:"specialItemSecondary",iconFillIcon:"specialItemSecondary",loaderAppearance:"specialTertiary"},specialPrimary:{fill:"specialPrimary",fillHover:"specialHoverPrimary",labelTextColor:"specialTextPrimary",iconAfterFillIcon:"specialItemPrimary",iconBeforeFillIcon:"specialItemPrimary",iconFillIcon:"specialItemPrimary",loaderAppearance:"specialPrimary"},extraMutedPrimary:{fill:"extraTertiary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextQuaternary",borderColor:"extraBorderSecondary",iconAfterFillIcon:"extraItemQuaternary",iconBeforeFillIcon:"extraItemQuaternary",iconFillIcon:"extraItemQuaternary",loaderAppearance:"extraPrimary"},extraPrimary:{fill:"extraPrimary",fillHover:"extraHoverPrimary",labelTextColor:"extraTextPrimary",iconAfterFillIcon:"extraItemPrimary",iconBeforeFillIcon:"extraItemPrimary",iconFillIcon:"extraItemPrimary",loaderAppearance:"extraPrimary"},successMutedPrimary:{fill:"successTertiary",fillHover:"successHoverPrimary",labelTextColor:"successTextQuaternary",labelTextColorHover:"successTextQuaternary",borderColor:"successBorderQuaternary",iconAfterFillIcon:"successItemQuaternary",iconBeforeFillIcon:"successItemQuaternary",iconFillIcon:"successItemQuaternary",loaderAppearance:"successTertiary"},successPrimary:{fill:"successPrimary",fillHover:"successHoverPrimary",labelTextColor:"successTextPrimary",labelTextColorHover:"successTextPrimary",iconAfterFillIcon:"successItemPrimary",iconBeforeFillIcon:"successItemPrimary",iconFillIcon:"successItemPrimary",loaderAppearance:"successPrimary"},surfaceMutedPrimary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextQuaternary",borderColor:"surfaceBorderQuaternary",iconAfterFillIcon:"surfaceItemQuaternary",iconBeforeFillIcon:"surfaceItemQuaternary",iconFillIcon:"surfaceItemQuaternary",loaderAppearance:"surfaceTertiary"},surfacePrimary:{fill:"surfacePrimary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceQuaternary:{fill:"surfaceTertiary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceSecondary:{fill:"surfaceSecondary",fillHover:"surfaceTertiary",labelTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderTertiary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},surfaceTertiary:{fill:"surfaceTertiary",fillHover:"surfaceSecondary",labelTextColor:"surfaceTextPrimary",iconAfterFillIcon:"surfaceItemPrimary",iconBeforeFillIcon:"surfaceItemPrimary",iconFillIcon:"surfaceItemPrimary",loaderAppearance:"surfacePrimary"},warningMutedPrimary:{fill:"warningTertiary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextSecondary",labelTextColorHover:"warningTextPrimary",borderColor:"warningBorderPrimary",iconAfterFillIcon:"warningItemSecondary",iconBeforeFillIcon:"warningItemSecondary",iconFillIcon:"warningItemSecondary",loaderAppearance:"warningTertiary"},warningPrimary:{fill:"warningPrimary",fillHover:"warningHoverPrimary",labelTextColor:"warningTextPrimary",labelTextColorHover:"warningTextPrimary",iconAfterFillIcon:"warningItemPrimary",iconBeforeFillIcon:"warningItemPrimary",iconFillIcon:"warningItemPrimary",loaderAppearance:"warningPrimary"}},x$1={appearance:T},b=React.forwardRef(function(a,T){const{appearance:b,className:A,dataTestId:S,dataTour:F,label:z,Badge:C,href:_,htmlType:v="button",link:H,rel:g,target:B,tooltip:h$1,before:Q,after:w,isDisabled:L,isHolding:M,isLoading:$=false,onClick:N$1,onHoldComplete:k,onMouseDown:X,children:D}=a,W=e$1(b,x$1,L),j=u$1(a,W),{fillClass:q,fillHoverClass:E,labelTextColor:G,labelTextColorHover:R,labelTextSize:U,labelTextTruncate:J,labelTextWeight:K,labelTextWidth:O,labelTextWrap:V,borderColorClass:Y,borderTypeClass:Z,borderWidthClass:ee,elevationClass:re,icon:ae,iconAfter:oe,iconAfterAppearance:ie,iconAfterAppearanceSize:le,iconAfterFill:ne,iconAfterFillIcon:ce,iconAfterFillSize:te,iconAfterShape:se,iconAfterSize:me,iconAfterSrc:fe,iconAppearance:ye,iconAppearanceSize:de,iconBefore:pe,iconBeforeAppearance:ue,iconBeforeAppearanceSize:Ie,iconBeforeFill:Pe,iconBeforeFillIcon:Te,iconBeforeFillSize:xe,iconBeforeShape:be,iconBeforeSize:Ae,iconBeforeSrc:Se,iconFill:Fe,iconFillIcon:ze,iconFillSize:Ce,iconShape:_e,iconSize:ve,iconSrc:He,loaderAppearance:ge,loaderAppearanceSize:Be,loaderFill:he,loaderItemFill:Qe,loaderSize:we,loaderType:Le="dot",shapeClass:Me,sizeClass:$e,widthClass:Ne,zeroGap:ke,zeroPadding:Xe,isSkeleton:De}=j,{label:We,styles:je}=c$1(a),{holdState:qe,onHoldEnd:Ee,onHoldStart:Ge}=function(e){const{holdDurationMs:r=500,isHolding:a,onHoldComplete:c}=e,t=React.useRef(null),s=React.useRef(c),[m,f]=React.useState(P$1),y=React.useRef(0);s.current=c,React.useEffect(()=>(t.current=requestAnimationFrame(function e(){if(m===I&&1===y.current&&s.current&&s.current(),m===I&&y.current<1){const a=y.current,o=Math.min(a+16/r,1);y.current=o,t.current=requestAnimationFrame(e);}if(m===P$1&&y.current>0){const a=y.current,o=Math.max(a-16/r,0);y.current=o,t.current=requestAnimationFrame(e);}}),()=>{t.current&&cancelAnimationFrame(t.current);}),[m,r]);const d=React.useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=React.useCallback(e=>{f(P$1);},[]);return {holdState:m,onHoldEnd:p,onHoldStart:d}}({holdDurationMs:500,isHolding:M,onHoldComplete:k}),Re=w||Q||ae||oe||fe||pe||Se||He;return jsxRuntimeExports.jsx(h,{className:clsx(A,"button",z&&Re?"button_type_default":z?"button_type_label":Re?"button_type_icon":"",ee&&`border-width_${ee}`,Y&&`border-color_${Y}`,Z&&`border_type_${Z}`,q&&`fill_${q}`,E&&!L&&`fill_hover_${E}`,Me&&`shape_${Me}`,$e&&`button_size_${$e}`,Ne&&`button_width_${Ne}`,re&&`elevation_${re}`,N$1&&"cursor_type_pointer",L&&"button_state_disabled cursor_type_default",C&&"button_type_badge",Xe&&"button_reset-padding",ke&&"button_reset-gap",$&&"button_state_loading",De&&"skeleton",M&&"button_holding",qe&&`button_state_${qe}`),type:v,title:h$1,"data-testid":S&&`${S}-button`,"data-tour":F,disabled:L,href:H??_,LinkComponent:H??_?"a":"button",rel:g,style:je,target:B,onClick:N$1,onMouseDown:X,onPointerCancel:Ee,onPointerDown:Ge,onPointerLeave:Ee,onPointerUp:Ee,children:jsxRuntimeExports.jsxs("div",{className:"button__wrapper",ref:T,children:[M&&jsxRuntimeExports.jsx("div",{className:clsx("button__indication",`button__indication_${qe}`),children:jsxRuntimeExports.jsx("div",{className:"button__indication-item",children:" "})}),$&&jsxRuntimeExports.jsx(m,{appearance:r(ge,Be),className:clsx(A,"button__loader"),type:Le,size:we,fill:he,itemFill:Qe}),Q,(pe||Se)&&jsxRuntimeExports.jsx(N,{appearance:r(ue,Ie),className:"button__icon_before",fill:Pe,fillSize:xe,iconFill:Te,iconSize:Ae,imageSrc:Se,shape:be,SvgImage:pe}),(ae||He)&&jsxRuntimeExports.jsx(N,{appearance:r(ye,de),className:"button__icon",fill:Fe,fillSize:Ce,iconFill:ze,iconSize:ve,imageSrc:He,shape:_e,SvgImage:ae}),(D||z)&&jsxRuntimeExports.jsx(_$1,{className:"button__label",width:O,size:U,textColor:G,textColorHover:R,textTruncate:J,textWeight:K,textWrap:V,style:We,children:D||z}),(oe||fe)&&jsxRuntimeExports.jsx(N,{appearance:r(ie,le),className:"button__icon_after",fill:ne,fillSize:te,iconFill:ce,iconSize:me,imageSrc:fe,shape:se,SvgImage:oe}),C,w]})})});
|
|
7891
7933
|
|
|
7892
7934
|
var _;function nn(){return nn=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r]);}return n},nn.apply(null,arguments)}const Vn={Action:{Close:function(e){return React__namespace.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"none"},e),_||(_=React__namespace.createElement("path",{d:"M19.722 4.703a.95.95 0 0 0-1.343 0L12 11.082l-6.379-6.38a.95.95 0 1 0-1.343 1.344l6.38 6.379-6.38 6.378a.95.95 0 1 0 1.343 1.343L12 13.767l6.379 6.38a.95.95 0 1 0 1.343-1.343l-6.38-6.38 6.38-6.378a.95.95 0 0 0 0-1.343"})))}}};
|
|
7893
7935
|
|
|
7894
|
-
const f={...{defaultPrimary:{fill:"surfacePrimary",fillHover:"surfacePrimary",titleTextColor:"surfaceTextPrimary",descTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",buttonAppearance:"accentPrimary sizeXXL solid rounded",loaderAppearance:"accentTertiary sizeS ghost rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary ghost circular"}},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"
|
|
7936
|
+
const f={...{defaultPrimary:{fill:"surfacePrimary",fillHover:"surfacePrimary",titleTextColor:"surfaceTextPrimary",descTextColor:"surfaceTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"surfaceTextPrimary",buttonAppearance:"accentPrimary sizeXXL solid rounded",loaderAppearance:"accentTertiary sizeS ghost rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary ghost circular"}},circular:{shape:"circular"},rounded:{shape:"rounded"},roundedXL:{shape:"rounded"},roundedL:{shape:"rounded"},roundedM:{shape:"rounded"},roundedS:{shape:"rounded"},sizeM:{size:"m",titleTextSize:"xxl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},sizeS:{size:"m",titleTextSize:"xl",descTextSize:"m",loaderAppearanceSize:"sizeS",closeIconAppearanceSize:"size24_24"},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"},...{errorPrimary:{fill:"errorPrimary",fillHover:"errorPrimary",titleTextColor:"errorTextPrimary",descTextColor:"errorTextPrimary",borderColor:"errorBorderPrimary",textColor:"errorTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"errorPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{infoPrimary:{fill:"infoPrimary",fillHover:"infoPrimary",titleTextColor:"infoTextPrimary",descTextColor:"infoTextPrimary",borderColor:"infoBorderPrimary",textColor:"infoTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"infoPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}},...{successPrimary:{fill:"successPrimary",fillHover:"successPrimary",titleTextColor:"successTextPrimary",descTextColor:"successTextPrimary",borderColor:"successBorderPrimary",textColor:"successTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"successPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"successPrimary ghost circular"}},...{warningPrimary:{fill:"warningPrimary",fillHover:"warningPrimary",titleTextColor:"warningTextPrimary",descTextColor:"warningTextPrimary",borderColor:"surfaceBorderPrimary",textColor:"warningTextPrimary",buttonAppearance:"surfacePrimary sizeXXL solid rounded",loaderAppearance:"warningPrimary sizeS solid rounded",closeIcon:Vn.Action.Close,closeIconAppearance:"surfacePrimary solid circular"}}},y={appearance:f};function x(m$1){const{id:p,appearance:u,className:f,dataTestId:x,dataTour:P,type:C="float",title:_,text:T,before:z,after:A,isSkeleton:S,isLoading:I,onClickButton:h,onClickClose:b$1}=m$1,g=e$1(u,y),v=u$1(m$1,g),{fillClass:L,fillHoverClass:w,titleTextColor:N$1,titleTextSize:X,descTextColor:k,descTextSize:B,buttonAppearance:$,buttonLabel:H,elevationClass:j,loaderAppearance:F,loaderAppearanceSize:M,loaderFill:q,loaderItemFill:D,loaderSize:E,loaderType:G="dot",shapeClass:J,sizeClass:K,widthClass:O,closeIcon:Q,closeIconAppearance:R,closeIconAppearanceSize:U,closeIconSrc:V}=v,{styles:W}=c$1(m$1);return jsxRuntimeExports.jsxs("div",{className:clsx("notification__item",`notification__item_${C}`,O&&`width_${O}`,j&&`elevation_${j}`,L&&`fill_${L}`,K&&`notification__item_size_${K}`,C&&`notification__item_type_${C}`,w&&`fill_${w}`,S&&"skeleton",J&&`shape_${J}`),"data-testid":x,"data-tour":P,style:W,children:[z,jsxRuntimeExports.jsxs("div",{className:clsx(f,"notification__item-wrapper"),children:[_&&jsxRuntimeExports.jsx(_$1,{className:"notification__item-title",size:X,textColor:N$1,children:_}),T&&jsxRuntimeExports.jsx(_$1,{className:"notification__item-text",size:B,textColor:k,children:T}),I&&jsxRuntimeExports.jsx(m,{appearance:r(F,M),className:clsx(f,"button__loader"),type:G,size:E,fill:q,itemFill:D}),b$1&&jsxRuntimeExports.jsx(N,{appearance:r(R,U),className:clsx("notification__item-close","cursor_type_pointer"),imageSrc:V,SvgImage:Q,onClick:()=>b$1&&b$1(p)}),h&&H&&jsxRuntimeExports.jsx(b,{appearance:$,className:"notification__item-button",width:"fill",label:H,onClick:h})]}),A]})}function P(e){const i=f$2(),{hideNotifications:a}=g$1(),{className:t,dataTestId:s,dataTour:c}=e;return jsxRuntimeExports.jsx("div",{className:clsx("notification",t),"data-testid":s,"data-tour":c,children:jsxRuntimeExports.jsx("div",{className:"notification__wrapper",children:i.map(e=>jsxRuntimeExports.jsx(x,{id:e.id,appearance:e.appearance,type:e.type,title:e.title,status:e.status,text:e.text,buttonLabel:e.buttonLabel,after:e.after,closeIcon:e.closeIcon,closeIconSrc:e.closeIconSrc,isLoading:e.isLoading,onClickButton:e.onClickButton,onClickClose:a},e.id))})})}
|
|
7895
7937
|
|
|
7896
7938
|
exports.P = P;
|
|
7897
7939
|
exports.d = d;
|
|
7898
|
-
exports.m = m$
|
|
7940
|
+
exports.m = m$2;
|