@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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useMemo as useMemo$1, createContext, useState, useCallback, useEffect, useContext, useRef, memo, version, isValidElement, useLayoutEffect as useLayoutEffect$1,
|
|
2
|
+
import React__default, { useMemo as useMemo$1, createContext, useState, useCallback, useEffect, useContext, useRef, memo, version, isValidElement, useLayoutEffect as useLayoutEffect$1, cloneElement, useReducer, useImperativeHandle } from 'react';
|
|
3
3
|
import camelCase from 'lodash/camelCase';
|
|
4
|
-
import
|
|
4
|
+
import s$1 from 'lodash/castArray';
|
|
5
5
|
import i$2 from 'lodash/upperFirst';
|
|
6
6
|
import { axiosInstanceITCase, formatURL } from '@itcase/common';
|
|
7
|
-
import r$
|
|
7
|
+
import r$3 from 'lodash/maxBy';
|
|
8
8
|
import { createPortal, flushSync } from 'react-dom';
|
|
9
9
|
|
|
10
10
|
function getDefaultExportFromCjs (x) {
|
|
@@ -1376,7 +1376,7 @@ var jsxRuntimeExports = requireJsxRuntime();
|
|
|
1376
1376
|
|
|
1377
1377
|
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}
|
|
1378
1378
|
|
|
1379
|
-
const e$1=(e,r,p)=>useMemo$1(()=>{if(e){const a=e.split(" ").reduce((a,e)=>(
|
|
1379
|
+
const e$1=(e,r,p)=>useMemo$1(()=>{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]);
|
|
1380
1380
|
|
|
1381
1381
|
const byteToHex = [];
|
|
1382
1382
|
for (let i = 0; i < 256; ++i) {
|
|
@@ -1405,21 +1405,17 @@ function unsafeStringify(arr, offset = 0) {
|
|
|
1405
1405
|
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
1406
1406
|
}
|
|
1407
1407
|
|
|
1408
|
-
let getRandomValues;
|
|
1409
1408
|
const rnds8 = new Uint8Array(16);
|
|
1410
1409
|
function rng() {
|
|
1411
|
-
|
|
1412
|
-
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
1413
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1414
|
-
}
|
|
1415
|
-
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
1416
|
-
}
|
|
1417
|
-
return getRandomValues(rnds8);
|
|
1410
|
+
return crypto.getRandomValues(rnds8);
|
|
1418
1411
|
}
|
|
1419
1412
|
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1413
|
+
function v4(options, buf, offset) {
|
|
1414
|
+
if (crypto.randomUUID) {
|
|
1415
|
+
return crypto.randomUUID();
|
|
1416
|
+
}
|
|
1417
|
+
return _v4(options);
|
|
1418
|
+
}
|
|
1423
1419
|
function _v4(options, buf, offset) {
|
|
1424
1420
|
options = options || {};
|
|
1425
1421
|
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
@@ -1430,14 +1426,8 @@ function _v4(options, buf, offset) {
|
|
|
1430
1426
|
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
1431
1427
|
return unsafeStringify(rnds);
|
|
1432
1428
|
}
|
|
1433
|
-
function v4(options, buf, offset) {
|
|
1434
|
-
if (native.randomUUID && true && !options) {
|
|
1435
|
-
return native.randomUUID();
|
|
1436
|
-
}
|
|
1437
|
-
return _v4(options);
|
|
1438
|
-
}
|
|
1439
1429
|
|
|
1440
|
-
const l$1={error:"error",info:"info",success:"success",warning:"warning"},u$
|
|
1430
|
+
const l$1={error:"error",info:"info",success:"success",warning:"warning"},u$3=createContext([]),d$1=createContext({hideNotifications:e=>{},showNotification:(e,o)=>{},notificationStatuses:l$1});function m$2(o){const{initialNotificationsList:s=[],isLogRequestsErrors:c,children:m}=o,[f,g]=useState(()=>(s||[]).map(e=>y$1(e,e.onClose))),p=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=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=useMemo$1(()=>({hideNotifications:p,notificationStatuses:l$1,showNotification:T}),[]);return useEffect(()=>{f.forEach(e=>{e.closeByTime&&setTimeout(()=>p(e.id),e.closeByTime);}),c&&(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 useContext(u$3)}function g$1(){return 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}}
|
|
1441
1431
|
|
|
1442
1432
|
var cssMediaquery = {};
|
|
1443
1433
|
|
|
@@ -3088,7 +3078,7 @@ var i$1={"mobile-tiny":"15em","mobile-super-extra-large":"40em",tablet:"48em","d
|
|
|
3088
3078
|
|
|
3089
3079
|
const e=()=>{const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",`${e}px`);};
|
|
3090
3080
|
|
|
3091
|
-
const a$
|
|
3081
|
+
const a$2=createContext({isMobile:false,isTablet:false,isDesktop:false,deviceCurrentMainType:"",deviceCurrentType:"",deviceTypesList:[]}),d=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]=useMemo$1(()=>{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=useMemo$1(()=>({...d,deviceCurrentMainType:f,deviceCurrentType:y,deviceTypesList:b}),[d,f,y,b]);return useEffect(()=>{e(),window.addEventListener("resize",e);},[]),jsxRuntimeExports.jsx(a$2.Provider,{value:T,children:o})});function u$2(){const e=useContext(a$2);if(!e)throw new Error("useUserDeviceContext is not defined");return e}
|
|
3092
3082
|
|
|
3093
3083
|
const i=createContext({assetPrefix:void 0,ignorePathsList:void 0});
|
|
3094
3084
|
|
|
@@ -3096,9 +3086,9 @@ var o$1=["alignContent","alignItems","alignSelf","aspectRatio","border","borderB
|
|
|
3096
3086
|
|
|
3097
3087
|
const r$1=r=>Array.isArray(r)?r[0]:r;
|
|
3098
3088
|
|
|
3099
|
-
function
|
|
3089
|
+
function u$1(i,c){const{deviceCurrentMainType:u}=u$2(),l=useRef(i);l.current=i;const f=useRef(u);f.current=u;const g=useRef(c);g.current=c;const d=useMemo$1(()=>new Map,[c,u]),y=useRef(d);y.current=d;return useMemo$1(()=>{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)));
|
|
3100
3090
|
|
|
3101
|
-
function
|
|
3091
|
+
function c$1(r){const{deviceCurrentMainType:o,deviceCurrentType:n,deviceTypesList:c}=u$2(),a=useMemo$1(()=>Object.entries(r).reduce((e,[t,r])=>(p(t,r)&&(e[t]=r),e),{}),[r]);return useMemo$1(()=>{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};
|
|
3102
3092
|
|
|
3103
3093
|
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(" ")};
|
|
3104
3094
|
|
|
@@ -7392,11 +7382,6 @@ async function request(url, options) {
|
|
|
7392
7382
|
}
|
|
7393
7383
|
return response.text();
|
|
7394
7384
|
}
|
|
7395
|
-
function sleep(seconds = 1) {
|
|
7396
|
-
return new Promise((resolve) => {
|
|
7397
|
-
setTimeout(resolve, seconds * 1e3);
|
|
7398
|
-
});
|
|
7399
|
-
}
|
|
7400
7385
|
function supportsInlineSVG() {
|
|
7401
7386
|
if (!document) {
|
|
7402
7387
|
return false;
|
|
@@ -7409,20 +7394,16 @@ function supportsInlineSVG() {
|
|
|
7409
7394
|
|
|
7410
7395
|
// src/modules/cache.ts
|
|
7411
7396
|
var CacheStore = class {
|
|
7412
|
-
constructor() {
|
|
7397
|
+
constructor(options = {}) {
|
|
7413
7398
|
__publicField(this, "cacheApi");
|
|
7414
7399
|
__publicField(this, "cacheStore");
|
|
7415
7400
|
__publicField(this, "subscribers", []);
|
|
7416
7401
|
__publicField(this, "isReady", false);
|
|
7402
|
+
const { name = CACHE_NAME, persistent = false } = options;
|
|
7417
7403
|
this.cacheStore = /* @__PURE__ */ new Map();
|
|
7418
|
-
|
|
7419
|
-
let usePersistentCache = false;
|
|
7420
|
-
if (canUseDOM()) {
|
|
7421
|
-
cacheName = window.REACT_INLINESVG_CACHE_NAME ?? CACHE_NAME;
|
|
7422
|
-
usePersistentCache = !!window.REACT_INLINESVG_PERSISTENT_CACHE && "caches" in window;
|
|
7423
|
-
}
|
|
7404
|
+
const usePersistentCache = persistent && canUseDOM() && "caches" in window;
|
|
7424
7405
|
if (usePersistentCache) {
|
|
7425
|
-
caches.open(
|
|
7406
|
+
caches.open(name).then((cache) => {
|
|
7426
7407
|
this.cacheApi = cache;
|
|
7427
7408
|
}).catch((error) => {
|
|
7428
7409
|
console.error(`Failed to open cache: ${error.message}`);
|
|
@@ -7446,12 +7427,30 @@ var CacheStore = class {
|
|
|
7446
7427
|
onReady(callback) {
|
|
7447
7428
|
if (this.isReady) {
|
|
7448
7429
|
callback();
|
|
7449
|
-
|
|
7450
|
-
|
|
7430
|
+
return () => {
|
|
7431
|
+
};
|
|
7451
7432
|
}
|
|
7433
|
+
this.subscribers.push(callback);
|
|
7434
|
+
return () => {
|
|
7435
|
+
const index = this.subscribers.indexOf(callback);
|
|
7436
|
+
if (index >= 0) {
|
|
7437
|
+
this.subscribers.splice(index, 1);
|
|
7438
|
+
}
|
|
7439
|
+
};
|
|
7440
|
+
}
|
|
7441
|
+
waitForReady() {
|
|
7442
|
+
if (this.isReady) {
|
|
7443
|
+
return Promise.resolve();
|
|
7444
|
+
}
|
|
7445
|
+
return new Promise((resolve) => {
|
|
7446
|
+
this.onReady(resolve);
|
|
7447
|
+
});
|
|
7452
7448
|
}
|
|
7453
7449
|
async get(url, fetchOptions) {
|
|
7454
|
-
await
|
|
7450
|
+
await this.fetchAndCache(url, fetchOptions);
|
|
7451
|
+
return this.cacheStore.get(url)?.content ?? "";
|
|
7452
|
+
}
|
|
7453
|
+
getContent(url) {
|
|
7455
7454
|
return this.cacheStore.get(url)?.content ?? "";
|
|
7456
7455
|
}
|
|
7457
7456
|
set(url, data) {
|
|
@@ -7460,57 +7459,44 @@ var CacheStore = class {
|
|
|
7460
7459
|
isCached(url) {
|
|
7461
7460
|
return this.cacheStore.get(url)?.status === STATUS.LOADED;
|
|
7462
7461
|
}
|
|
7463
|
-
async
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
await this.handleLoading(url, async () => {
|
|
7467
|
-
this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
|
|
7468
|
-
await this.fetchAndAddToInternalCache(url, fetchOptions);
|
|
7469
|
-
});
|
|
7470
|
-
return;
|
|
7462
|
+
async fetchAndCache(url, fetchOptions) {
|
|
7463
|
+
if (!this.isReady) {
|
|
7464
|
+
await this.waitForReady();
|
|
7471
7465
|
}
|
|
7472
|
-
if (!cache?.content) {
|
|
7473
|
-
this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
|
|
7474
|
-
try {
|
|
7475
|
-
const content = await request(url, fetchOptions);
|
|
7476
|
-
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7477
|
-
} catch (error) {
|
|
7478
|
-
this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
|
|
7479
|
-
throw error;
|
|
7480
|
-
}
|
|
7481
|
-
}
|
|
7482
|
-
}
|
|
7483
|
-
async fetchAndAddToPersistentCache(url, fetchOptions) {
|
|
7484
7466
|
const cache = this.cacheStore.get(url);
|
|
7485
7467
|
if (cache?.status === STATUS.LOADED) {
|
|
7486
7468
|
return;
|
|
7487
7469
|
}
|
|
7488
7470
|
if (cache?.status === STATUS.LOADING) {
|
|
7489
|
-
await this.handleLoading(url, async () => {
|
|
7471
|
+
await this.handleLoading(url, fetchOptions?.signal || void 0, async () => {
|
|
7490
7472
|
this.cacheStore.set(url, { content: "", status: STATUS.IDLE });
|
|
7491
|
-
await this.
|
|
7473
|
+
await this.fetchAndCache(url, fetchOptions);
|
|
7492
7474
|
});
|
|
7493
7475
|
return;
|
|
7494
7476
|
}
|
|
7495
7477
|
this.cacheStore.set(url, { content: "", status: STATUS.LOADING });
|
|
7496
|
-
const data = await this.cacheApi?.match(url);
|
|
7497
|
-
if (data) {
|
|
7498
|
-
const content = await data.text();
|
|
7499
|
-
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7500
|
-
return;
|
|
7501
|
-
}
|
|
7502
7478
|
try {
|
|
7503
|
-
await this.
|
|
7504
|
-
const response = await this.cacheApi?.match(url);
|
|
7505
|
-
const content = await response?.text() ?? "";
|
|
7479
|
+
const content = this.cacheApi ? await this.fetchFromPersistentCache(url, fetchOptions) : await request(url, fetchOptions);
|
|
7506
7480
|
this.cacheStore.set(url, { content, status: STATUS.LOADED });
|
|
7507
7481
|
} catch (error) {
|
|
7508
7482
|
this.cacheStore.set(url, { content: "", status: STATUS.FAILED });
|
|
7509
7483
|
throw error;
|
|
7510
7484
|
}
|
|
7511
7485
|
}
|
|
7512
|
-
async
|
|
7486
|
+
async fetchFromPersistentCache(url, fetchOptions) {
|
|
7487
|
+
const data = await this.cacheApi?.match(url);
|
|
7488
|
+
if (data) {
|
|
7489
|
+
return data.text();
|
|
7490
|
+
}
|
|
7491
|
+
await this.cacheApi?.add(new Request(url, fetchOptions));
|
|
7492
|
+
const response = await this.cacheApi?.match(url);
|
|
7493
|
+
return await response?.text() ?? "";
|
|
7494
|
+
}
|
|
7495
|
+
async handleLoading(url, signal, callback) {
|
|
7513
7496
|
for (let retryCount = 0; retryCount < CACHE_MAX_RETRIES; retryCount++) {
|
|
7497
|
+
if (signal?.aborted) {
|
|
7498
|
+
throw signal.reason instanceof Error ? signal.reason : new DOMException("The operation was aborted.", "AbortError");
|
|
7499
|
+
}
|
|
7514
7500
|
if (this.cacheStore.get(url)?.status !== STATUS.LOADING) {
|
|
7515
7501
|
return;
|
|
7516
7502
|
}
|
|
@@ -7538,6 +7524,14 @@ var CacheStore = class {
|
|
|
7538
7524
|
this.cacheStore.clear();
|
|
7539
7525
|
}
|
|
7540
7526
|
};
|
|
7527
|
+
function sleep(seconds = 1) {
|
|
7528
|
+
return new Promise((resolve) => {
|
|
7529
|
+
setTimeout(resolve, seconds * 1e3);
|
|
7530
|
+
});
|
|
7531
|
+
}
|
|
7532
|
+
function useMount(effect) {
|
|
7533
|
+
useEffect(effect, []);
|
|
7534
|
+
}
|
|
7541
7535
|
function usePrevious(state) {
|
|
7542
7536
|
const ref = useRef(void 0);
|
|
7543
7537
|
useEffect(() => {
|
|
@@ -7545,6 +7539,29 @@ function usePrevious(state) {
|
|
|
7545
7539
|
});
|
|
7546
7540
|
return ref.current;
|
|
7547
7541
|
}
|
|
7542
|
+
function uniquifyStyleIds(svgText, hash, baseURL) {
|
|
7543
|
+
const idMatches = svgText.matchAll(/\bid=(["'])([^"']+)\1/g);
|
|
7544
|
+
const ids = [...new Set([...idMatches].map((m) => m[2]))];
|
|
7545
|
+
if (!ids.length) {
|
|
7546
|
+
return svgText;
|
|
7547
|
+
}
|
|
7548
|
+
ids.sort((a, b) => b.length - a.length);
|
|
7549
|
+
return svgText.replace(/<style[^>]*>([\S\s]*?)<\/style>/gi, (fullMatch, cssContent) => {
|
|
7550
|
+
let modified = cssContent;
|
|
7551
|
+
for (const id of ids) {
|
|
7552
|
+
const escaped = id.replace(/[$()*+.?[\\\]^{|}]/g, "\\$&");
|
|
7553
|
+
modified = modified.replace(
|
|
7554
|
+
new RegExp(`url\\((['"]?)#${escaped}\\1\\)`, "g"),
|
|
7555
|
+
`url($1${baseURL}#${id}__${hash}$1)`
|
|
7556
|
+
);
|
|
7557
|
+
modified = modified.replace(
|
|
7558
|
+
new RegExp(`#${escaped}(?![a-zA-Z0-9_-])`, "g"),
|
|
7559
|
+
`#${id}__${hash}`
|
|
7560
|
+
);
|
|
7561
|
+
}
|
|
7562
|
+
return fullMatch.replace(cssContent, modified);
|
|
7563
|
+
});
|
|
7564
|
+
}
|
|
7548
7565
|
function getNode(options) {
|
|
7549
7566
|
const {
|
|
7550
7567
|
baseURL,
|
|
@@ -7557,7 +7574,10 @@ function getNode(options) {
|
|
|
7557
7574
|
uniquifyIDs = false
|
|
7558
7575
|
} = options;
|
|
7559
7576
|
try {
|
|
7560
|
-
|
|
7577
|
+
let svgText = processSVG(content, preProcessor);
|
|
7578
|
+
if (uniquifyIDs) {
|
|
7579
|
+
svgText = uniquifyStyleIds(svgText, hash, baseURL ?? "");
|
|
7580
|
+
}
|
|
7561
7581
|
const node = convert(svgText, { nodeOnly: true });
|
|
7562
7582
|
if (!node || !(node instanceof SVGSVGElement)) {
|
|
7563
7583
|
throw new Error("Could not convert the src to a DOM Node");
|
|
@@ -7627,22 +7647,30 @@ function updateSVGAttributes(node, options) {
|
|
|
7627
7647
|
return node;
|
|
7628
7648
|
}
|
|
7629
7649
|
|
|
7630
|
-
// src/
|
|
7631
|
-
|
|
7632
|
-
function ReactInlineSVG(props) {
|
|
7650
|
+
// src/modules/useInlineSVG.ts
|
|
7651
|
+
function useInlineSVG(props, cacheStore2) {
|
|
7633
7652
|
const {
|
|
7653
|
+
baseURL,
|
|
7634
7654
|
cacheRequests = true,
|
|
7635
|
-
children = null,
|
|
7636
7655
|
description,
|
|
7637
7656
|
fetchOptions,
|
|
7638
|
-
innerRef,
|
|
7639
|
-
loader = null,
|
|
7640
7657
|
onError,
|
|
7641
7658
|
onLoad,
|
|
7659
|
+
preProcessor,
|
|
7642
7660
|
src,
|
|
7643
7661
|
title,
|
|
7644
|
-
uniqueHash
|
|
7662
|
+
uniqueHash,
|
|
7663
|
+
uniquifyIDs
|
|
7645
7664
|
} = props;
|
|
7665
|
+
const hash = useRef(uniqueHash ?? randomString(8));
|
|
7666
|
+
const fetchOptionsRef = useRef(fetchOptions);
|
|
7667
|
+
const onErrorRef = useRef(onError);
|
|
7668
|
+
const onLoadRef = useRef(onLoad);
|
|
7669
|
+
const preProcessorRef = useRef(preProcessor);
|
|
7670
|
+
fetchOptionsRef.current = fetchOptions;
|
|
7671
|
+
onErrorRef.current = onError;
|
|
7672
|
+
onLoadRef.current = onLoad;
|
|
7673
|
+
preProcessorRef.current = preProcessor;
|
|
7646
7674
|
const [state, setState] = useReducer(
|
|
7647
7675
|
(previousState2, nextState) => ({
|
|
7648
7676
|
...previousState2,
|
|
@@ -7651,43 +7679,71 @@ function ReactInlineSVG(props) {
|
|
|
7651
7679
|
{
|
|
7652
7680
|
content: "",
|
|
7653
7681
|
element: null,
|
|
7654
|
-
isCached:
|
|
7682
|
+
isCached: false,
|
|
7655
7683
|
status: STATUS.IDLE
|
|
7684
|
+
},
|
|
7685
|
+
(initial) => {
|
|
7686
|
+
const cached = cacheRequests && cacheStore2.isCached(src);
|
|
7687
|
+
if (!cached) {
|
|
7688
|
+
return initial;
|
|
7689
|
+
}
|
|
7690
|
+
const cachedContent = cacheStore2.getContent(src);
|
|
7691
|
+
try {
|
|
7692
|
+
const node = getNode({
|
|
7693
|
+
...props,
|
|
7694
|
+
handleError: () => {
|
|
7695
|
+
},
|
|
7696
|
+
hash: hash.current,
|
|
7697
|
+
content: cachedContent
|
|
7698
|
+
});
|
|
7699
|
+
if (!node) {
|
|
7700
|
+
return { ...initial, content: cachedContent, isCached: true, status: STATUS.LOADED };
|
|
7701
|
+
}
|
|
7702
|
+
const convertedElement = convert(node);
|
|
7703
|
+
if (convertedElement && isValidElement(convertedElement)) {
|
|
7704
|
+
return {
|
|
7705
|
+
content: cachedContent,
|
|
7706
|
+
element: convertedElement,
|
|
7707
|
+
isCached: true,
|
|
7708
|
+
status: STATUS.READY
|
|
7709
|
+
};
|
|
7710
|
+
}
|
|
7711
|
+
} catch {
|
|
7712
|
+
}
|
|
7713
|
+
return {
|
|
7714
|
+
...initial,
|
|
7715
|
+
content: cachedContent,
|
|
7716
|
+
isCached: true,
|
|
7717
|
+
status: STATUS.LOADED
|
|
7718
|
+
};
|
|
7656
7719
|
}
|
|
7657
7720
|
);
|
|
7658
7721
|
const { content, element, isCached, status } = state;
|
|
7659
7722
|
const previousProps = usePrevious(props);
|
|
7660
7723
|
const previousState = usePrevious(state);
|
|
7661
|
-
const hash = useRef(uniqueHash ?? randomString(8));
|
|
7662
7724
|
const isActive = useRef(false);
|
|
7663
7725
|
const isInitialized = useRef(false);
|
|
7664
|
-
const handleError = useCallback(
|
|
7665
|
-
(error) => {
|
|
7666
|
-
if (isActive.current) {
|
|
7667
|
-
setState({
|
|
7668
|
-
status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
|
|
7669
|
-
});
|
|
7670
|
-
onError?.(error);
|
|
7671
|
-
}
|
|
7672
|
-
},
|
|
7673
|
-
[onError]
|
|
7674
|
-
);
|
|
7675
|
-
const handleLoad = useCallback((loadedContent, hasCache = false) => {
|
|
7726
|
+
const handleError = useCallback((error) => {
|
|
7676
7727
|
if (isActive.current) {
|
|
7677
7728
|
setState({
|
|
7678
|
-
|
|
7679
|
-
isCached: hasCache,
|
|
7680
|
-
status: STATUS.LOADED
|
|
7729
|
+
status: error.message === "Browser does not support SVG" ? STATUS.UNSUPPORTED : STATUS.FAILED
|
|
7681
7730
|
});
|
|
7731
|
+
onErrorRef.current?.(error);
|
|
7682
7732
|
}
|
|
7683
7733
|
}, []);
|
|
7684
|
-
const fetchContent = useCallback(async () => {
|
|
7685
|
-
const responseContent = await request(src, fetchOptions);
|
|
7686
|
-
handleLoad(responseContent);
|
|
7687
|
-
}, [fetchOptions, handleLoad, src]);
|
|
7688
7734
|
const getElement = useCallback(() => {
|
|
7689
7735
|
try {
|
|
7690
|
-
const node = getNode({
|
|
7736
|
+
const node = getNode({
|
|
7737
|
+
baseURL,
|
|
7738
|
+
content,
|
|
7739
|
+
description,
|
|
7740
|
+
handleError,
|
|
7741
|
+
hash: hash.current,
|
|
7742
|
+
preProcessor: preProcessorRef.current,
|
|
7743
|
+
src,
|
|
7744
|
+
title,
|
|
7745
|
+
uniquifyIDs
|
|
7746
|
+
});
|
|
7691
7747
|
const convertedElement = convert(node);
|
|
7692
7748
|
if (!convertedElement || !isValidElement(convertedElement)) {
|
|
7693
7749
|
throw new Error("Could not convert the src to a React element");
|
|
@@ -7699,67 +7755,32 @@ function ReactInlineSVG(props) {
|
|
|
7699
7755
|
} catch (error) {
|
|
7700
7756
|
handleError(error);
|
|
7701
7757
|
}
|
|
7702
|
-
}, [content, handleError,
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
|
|
7708
|
-
} else if (src.includes("<svg")) {
|
|
7709
|
-
inlineSrc = src;
|
|
7710
|
-
}
|
|
7711
|
-
if (inlineSrc) {
|
|
7712
|
-
handleLoad(inlineSrc);
|
|
7713
|
-
return;
|
|
7758
|
+
}, [baseURL, content, description, handleError, src, title, uniquifyIDs]);
|
|
7759
|
+
useMount(() => {
|
|
7760
|
+
isActive.current = true;
|
|
7761
|
+
if (!canUseDOM() || isInitialized.current) {
|
|
7762
|
+
return void 0;
|
|
7714
7763
|
}
|
|
7715
7764
|
try {
|
|
7716
|
-
if (
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7765
|
+
if (status === STATUS.READY) {
|
|
7766
|
+
onLoadRef.current?.(src, isCached);
|
|
7767
|
+
} else if (status === STATUS.IDLE) {
|
|
7768
|
+
if (!isSupportedEnvironment()) {
|
|
7769
|
+
throw new Error("Browser does not support SVG");
|
|
7770
|
+
}
|
|
7771
|
+
if (!src) {
|
|
7772
|
+
throw new Error("Missing src");
|
|
7773
|
+
}
|
|
7774
|
+
setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
|
|
7721
7775
|
}
|
|
7722
7776
|
} catch (error) {
|
|
7723
7777
|
handleError(error);
|
|
7724
7778
|
}
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
element: null,
|
|
7731
|
-
isCached: false,
|
|
7732
|
-
status: STATUS.LOADING
|
|
7733
|
-
});
|
|
7734
|
-
}
|
|
7735
|
-
}, []);
|
|
7736
|
-
useEffect(
|
|
7737
|
-
() => {
|
|
7738
|
-
isActive.current = true;
|
|
7739
|
-
if (!canUseDOM() || isInitialized.current) {
|
|
7740
|
-
return void 0;
|
|
7741
|
-
}
|
|
7742
|
-
try {
|
|
7743
|
-
if (status === STATUS.IDLE) {
|
|
7744
|
-
if (!isSupportedEnvironment()) {
|
|
7745
|
-
throw new Error("Browser does not support SVG");
|
|
7746
|
-
}
|
|
7747
|
-
if (!src) {
|
|
7748
|
-
throw new Error("Missing src");
|
|
7749
|
-
}
|
|
7750
|
-
load();
|
|
7751
|
-
}
|
|
7752
|
-
} catch (error) {
|
|
7753
|
-
handleError(error);
|
|
7754
|
-
}
|
|
7755
|
-
isInitialized.current = true;
|
|
7756
|
-
return () => {
|
|
7757
|
-
isActive.current = false;
|
|
7758
|
-
};
|
|
7759
|
-
},
|
|
7760
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7761
|
-
[]
|
|
7762
|
-
);
|
|
7779
|
+
isInitialized.current = true;
|
|
7780
|
+
return () => {
|
|
7781
|
+
isActive.current = false;
|
|
7782
|
+
};
|
|
7783
|
+
});
|
|
7763
7784
|
useEffect(() => {
|
|
7764
7785
|
if (!canUseDOM() || !previousProps) {
|
|
7765
7786
|
return;
|
|
@@ -7769,14 +7790,58 @@ function ReactInlineSVG(props) {
|
|
|
7769
7790
|
handleError(new Error("Missing src"));
|
|
7770
7791
|
return;
|
|
7771
7792
|
}
|
|
7772
|
-
|
|
7793
|
+
setState({ content: "", element: null, isCached: false, status: STATUS.LOADING });
|
|
7773
7794
|
}
|
|
7774
|
-
}, [handleError,
|
|
7795
|
+
}, [handleError, previousProps, src]);
|
|
7775
7796
|
useEffect(() => {
|
|
7776
|
-
if (status
|
|
7797
|
+
if (status !== STATUS.LOADING) {
|
|
7798
|
+
return void 0;
|
|
7799
|
+
}
|
|
7800
|
+
const controller = new AbortController();
|
|
7801
|
+
let active = true;
|
|
7802
|
+
(async () => {
|
|
7803
|
+
try {
|
|
7804
|
+
const dataURI = /^data:image\/svg[^,]*?(;base64)?,(.*)/.exec(src);
|
|
7805
|
+
let inlineSrc;
|
|
7806
|
+
if (dataURI) {
|
|
7807
|
+
inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);
|
|
7808
|
+
} else if (src.includes("<svg")) {
|
|
7809
|
+
inlineSrc = src;
|
|
7810
|
+
}
|
|
7811
|
+
if (inlineSrc) {
|
|
7812
|
+
if (active) {
|
|
7813
|
+
setState({ content: inlineSrc, isCached: false, status: STATUS.LOADED });
|
|
7814
|
+
}
|
|
7815
|
+
return;
|
|
7816
|
+
}
|
|
7817
|
+
const fetchParameters = { ...fetchOptionsRef.current, signal: controller.signal };
|
|
7818
|
+
let loadedContent;
|
|
7819
|
+
let hasCache = false;
|
|
7820
|
+
if (cacheRequests) {
|
|
7821
|
+
hasCache = cacheStore2.isCached(src);
|
|
7822
|
+
loadedContent = await cacheStore2.get(src, fetchParameters);
|
|
7823
|
+
} else {
|
|
7824
|
+
loadedContent = await request(src, fetchParameters);
|
|
7825
|
+
}
|
|
7826
|
+
if (active) {
|
|
7827
|
+
setState({ content: loadedContent, isCached: hasCache, status: STATUS.LOADED });
|
|
7828
|
+
}
|
|
7829
|
+
} catch (error) {
|
|
7830
|
+
if (active && error.name !== "AbortError") {
|
|
7831
|
+
handleError(error);
|
|
7832
|
+
}
|
|
7833
|
+
}
|
|
7834
|
+
})();
|
|
7835
|
+
return () => {
|
|
7836
|
+
active = false;
|
|
7837
|
+
controller.abort();
|
|
7838
|
+
};
|
|
7839
|
+
}, [cacheRequests, cacheStore2, handleError, src, status]);
|
|
7840
|
+
useEffect(() => {
|
|
7841
|
+
if (status === STATUS.LOADED && content) {
|
|
7777
7842
|
getElement();
|
|
7778
7843
|
}
|
|
7779
|
-
}, [
|
|
7844
|
+
}, [content, getElement, status]);
|
|
7780
7845
|
useEffect(() => {
|
|
7781
7846
|
if (!canUseDOM() || !previousProps || previousProps.src !== src) {
|
|
7782
7847
|
return;
|
|
@@ -7789,51 +7854,47 @@ function ReactInlineSVG(props) {
|
|
|
7789
7854
|
if (!previousState) {
|
|
7790
7855
|
return;
|
|
7791
7856
|
}
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
if (previousState.status !== STATUS.LOADING) {
|
|
7795
|
-
getContent();
|
|
7796
|
-
}
|
|
7797
|
-
break;
|
|
7798
|
-
}
|
|
7799
|
-
case STATUS.LOADED: {
|
|
7800
|
-
if (previousState.status !== STATUS.LOADED) {
|
|
7801
|
-
getElement();
|
|
7802
|
-
}
|
|
7803
|
-
break;
|
|
7804
|
-
}
|
|
7805
|
-
case STATUS.READY: {
|
|
7806
|
-
if (previousState.status !== STATUS.READY) {
|
|
7807
|
-
onLoad?.(src, isCached);
|
|
7808
|
-
}
|
|
7809
|
-
break;
|
|
7810
|
-
}
|
|
7857
|
+
if (status === STATUS.READY && previousState.status !== STATUS.READY) {
|
|
7858
|
+
onLoadRef.current?.(src, isCached);
|
|
7811
7859
|
}
|
|
7812
|
-
}, [
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
"uniqueHash",
|
|
7828
|
-
"uniquifyIDs"
|
|
7829
|
-
);
|
|
7860
|
+
}, [isCached, previousState, src, status]);
|
|
7861
|
+
return { element, status };
|
|
7862
|
+
}
|
|
7863
|
+
var CacheContext = createContext(null);
|
|
7864
|
+
function useCacheStore() {
|
|
7865
|
+
return useContext(CacheContext);
|
|
7866
|
+
}
|
|
7867
|
+
|
|
7868
|
+
// src/index.tsx
|
|
7869
|
+
var cacheStore = new CacheStore();
|
|
7870
|
+
function InlineSVG(props) {
|
|
7871
|
+
const { children = null, innerRef, loader = null } = props;
|
|
7872
|
+
const contextStore = useCacheStore();
|
|
7873
|
+
const store = contextStore ?? cacheStore;
|
|
7874
|
+
const { element, status } = useInlineSVG(props, store);
|
|
7830
7875
|
if (!canUseDOM()) {
|
|
7831
7876
|
return loader;
|
|
7832
7877
|
}
|
|
7833
7878
|
if (element) {
|
|
7834
7879
|
return cloneElement(element, {
|
|
7835
7880
|
ref: innerRef,
|
|
7836
|
-
...
|
|
7881
|
+
...omit(
|
|
7882
|
+
props,
|
|
7883
|
+
"baseURL",
|
|
7884
|
+
"cacheRequests",
|
|
7885
|
+
"children",
|
|
7886
|
+
"description",
|
|
7887
|
+
"fetchOptions",
|
|
7888
|
+
"innerRef",
|
|
7889
|
+
"loader",
|
|
7890
|
+
"onError",
|
|
7891
|
+
"onLoad",
|
|
7892
|
+
"preProcessor",
|
|
7893
|
+
"src",
|
|
7894
|
+
"title",
|
|
7895
|
+
"uniqueHash",
|
|
7896
|
+
"uniquifyIDs"
|
|
7897
|
+
)
|
|
7837
7898
|
});
|
|
7838
7899
|
}
|
|
7839
7900
|
if ([STATUS.UNSUPPORTED, STATUS.FAILED].includes(status)) {
|
|
@@ -7841,36 +7902,17 @@ function ReactInlineSVG(props) {
|
|
|
7841
7902
|
}
|
|
7842
7903
|
return loader;
|
|
7843
7904
|
}
|
|
7844
|
-
function InlineSVG(props) {
|
|
7845
|
-
if (!cacheStore) {
|
|
7846
|
-
cacheStore = new CacheStore();
|
|
7847
|
-
}
|
|
7848
|
-
const { loader } = props;
|
|
7849
|
-
const [isReady, setReady] = useState(cacheStore.isReady);
|
|
7850
|
-
useEffect(() => {
|
|
7851
|
-
if (isReady) {
|
|
7852
|
-
return;
|
|
7853
|
-
}
|
|
7854
|
-
cacheStore.onReady(() => {
|
|
7855
|
-
setReady(true);
|
|
7856
|
-
});
|
|
7857
|
-
}, [isReady]);
|
|
7858
|
-
if (!isReady) {
|
|
7859
|
-
return loader;
|
|
7860
|
-
}
|
|
7861
|
-
return /* @__PURE__ */ React__default.createElement(ReactInlineSVG, { ...props });
|
|
7862
|
-
}
|
|
7863
7905
|
|
|
7864
7906
|
const o=["src","imageSrc","svgSrc","placeholderUrl"],f$1=(f,...a)=>React__default.forwardRef(function(r,a){const{assetPrefix:c,ignorePathsList:m}=useContext(i),p=o.reduce((t,e)=>{let i=r[e];if(i&&"string"==typeof i){if(c){if(n(i,c,m)){i=`${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(formatURL(t).startsWith(formatURL(r)))return false;return true};
|
|
7865
7907
|
|
|
7866
|
-
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__default.Children.toArray(s).filter(Boolean).map(e=>React__default.isValidElement(e)?React__default.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=useMemo$1(()=>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__default.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=useRef(null),H=useRef(null),A=useRef(null),B=useRef(false),[F,X]=useState(x),I=useCallback(()=>{B.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&(B.current=true),false));},v);},[v]),N=useCallback(()=>{B.current=false;},[]);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__default.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=useMemo$1(()=>{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=""');
|
|
7908
|
+
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__default.Children.toArray(s).filter(Boolean).map(e=>React__default.isValidElement(e)?React__default.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=useMemo$1(()=>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__default.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=useRef(null),H=useRef(null),A=useRef(null),$=useRef(false),[F,X]=useState(x),I=useCallback(()=>{$.current||(H.current&&clearTimeout(H.current),A.current=setTimeout(()=>{X(true);},C));},[C]),k=useCallback(()=>{A.current&&clearTimeout(A.current),H.current=setTimeout(()=>{X(e=>(true===e&&($.current=true),false));},v);},[v]),N=useCallback(()=>{$.current=false;},[]);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__default.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=useMemo$1(()=>{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=""');
|
|
7867
7909
|
|
|
7868
|
-
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
|
|
7910
|
+
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})]})}
|
|
7869
7911
|
|
|
7870
|
-
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__default.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=useRef(null),s=useRef(t),[m,f]=useState(P$1),y=useRef(0);s.current=t,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=useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=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]})})});
|
|
7912
|
+
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__default.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=useRef(null),s=useRef(c),[m,f]=useState(P$1),y=useRef(0);s.current=c,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=useCallback(e=>{a&&("touch"!==e.pointerType&&0!==e.button||f(I));},[a]),p=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]})})});
|
|
7871
7913
|
|
|
7872
7914
|
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.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",stroke:"none"},e),_||(_=React.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"})))}}};
|
|
7873
7915
|
|
|
7874
|
-
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"
|
|
7916
|
+
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))})})}
|
|
7875
7917
|
|
|
7876
|
-
export { P, d, m$
|
|
7918
|
+
export { P, d, m$2 as m };
|