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