@max-ts/kit 0.10.1 → 0.11.0
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/lib/form/Form/Form.d.ts +45 -0
- package/lib/form/Form/index.d.ts +1 -0
- package/lib/form/FormMaskField/FormMaskField.d.ts +4 -0
- package/lib/form/FormMaskField/index.d.ts +2 -0
- package/lib/form/FormMaskField/types.d.ts +4 -0
- package/lib/form/FormSubmitButton/FormSubmitButton.d.ts +6 -0
- package/lib/form/FormSubmitButton/index.d.ts +1 -0
- package/lib/form/FormTextField/FormTextField.d.ts +7 -0
- package/lib/form/FormTextField/index.d.ts +2 -0
- package/lib/form/FormTextField/types.d.ts +4 -0
- package/lib/form/external.d.ts +1 -0
- package/lib/form/hooks/index.d.ts +2 -0
- package/lib/form/hooks/useForm/index.d.ts +1 -0
- package/lib/form/hooks/useForm/useForm.d.ts +4 -0
- package/lib/form/hooks/useFormContext/index.d.ts +1 -0
- package/lib/form/index.d.ts +7 -0
- package/lib/form/types.d.ts +7 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.mjs +1 -1
- package/package.json +2 -1
- package/src/index.ts +1 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FormHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { UseFormReturn } from '../hooks';
|
|
3
|
+
export type FormProps<FormValues extends object> = FormHTMLAttributes<HTMLFormElement> & {
|
|
4
|
+
/**
|
|
5
|
+
* @description Значение, которое возвращвет useForm. Необходимо для передачи в FormContext
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* import { Form, useForm } from 'form';
|
|
9
|
+
*
|
|
10
|
+
* function App() {
|
|
11
|
+
* const form = useForm();
|
|
12
|
+
* const onSubmit = data => console.log(data);
|
|
13
|
+
*
|
|
14
|
+
* return (
|
|
15
|
+
* <Form onSubmit={handleSubmit(onSubmit)} form={form}>
|
|
16
|
+
* <input defaultValue="test" {...form.register("example")} />
|
|
17
|
+
* <input type="submit" />
|
|
18
|
+
* </form>
|
|
19
|
+
* );
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
form: UseFormReturn<FormValues>;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* @description Компонент, инкапсулирующий FormProvider
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { Form, useForm } from 'form';
|
|
31
|
+
*
|
|
32
|
+
* function App() {
|
|
33
|
+
* const form = useForm();
|
|
34
|
+
* const onSubmit = data => console.log(data);
|
|
35
|
+
*
|
|
36
|
+
* return (
|
|
37
|
+
* <Form onSubmit={handleSubmit(onSubmit)} form={form}>
|
|
38
|
+
* <input defaultValue="test" {...form.register("example")} />
|
|
39
|
+
* <input type="submit" />
|
|
40
|
+
* </form>
|
|
41
|
+
* );
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const Form: <FormValues extends object>({ form, children, ...props }: FormProps<FormValues>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Form';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type MaskFieldProps } from '../../components';
|
|
2
|
+
import type { WithFormFieldProps } from '../types';
|
|
3
|
+
export type FormMaskFieldProps<FieldValues extends object> = WithFormFieldProps<MaskFieldProps, FieldValues>;
|
|
4
|
+
export declare function FormMaskField<T extends object>({ name, control, ref, ...props }: FormMaskFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ButtonProps } from '../../components';
|
|
2
|
+
export type FormSubmitButtonProps = Omit<ButtonProps, 'type'>;
|
|
3
|
+
/**
|
|
4
|
+
* @description Используется для форм, отображает состояние загрузки, когда форма isSubmitting
|
|
5
|
+
*/
|
|
6
|
+
export declare const FormSubmitButton: ({ children, isLoading, ...props }: FormSubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FormSubmitButton';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TextFieldProps } from '../../components';
|
|
2
|
+
import type { WithFormFieldProps } from '../types';
|
|
3
|
+
export type FormTextFieldProps<FieldValues extends object> = WithFormFieldProps<TextFieldProps, FieldValues> & {
|
|
4
|
+
trimmed?: boolean;
|
|
5
|
+
gridArea?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function FormTextField<T extends object>({ name, control, gridArea, ...props }: FormTextFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Controller as FormController, FormProvider, useController as useFormController, useFieldArray as useFormFieldArray, useWatch as useFormWatch, } from 'react-hook-form';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useForm';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type UseFormProps, type UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import type { FieldValues } from '../../types';
|
|
3
|
+
export declare const useForm: <TFieldValues extends FieldValues = FieldValues, TContext = unknown>({ mode, ...params }?: UseFormProps<TFieldValues, TContext>) => UseFormReturn<TFieldValues, TContext>;
|
|
4
|
+
export type { UseFormProps, UseFormReturn };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useFormContext } from 'react-hook-form';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './external';
|
|
2
|
+
export * from './Form';
|
|
3
|
+
export * from './FormMaskField';
|
|
4
|
+
export * from './FormSubmitButton';
|
|
5
|
+
export * from './FormTextField';
|
|
6
|
+
export { useForm, useFormContext, type UseFormProps, type UseFormReturn, } from './hooks';
|
|
7
|
+
export * from './types';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UseControllerProps } from 'react-hook-form';
|
|
2
|
+
/**
|
|
3
|
+
* @description Добавляет к переданным пропсам типы для react-hook-form. Позволяет переиспользовать логику типизации для филдов формы.
|
|
4
|
+
* @example WithFormFieldProps<TextFieldProps, FieldValues>;
|
|
5
|
+
*/
|
|
6
|
+
export type WithFormFieldProps<Props extends object, FieldValues extends object> = Omit<Props, 'name' | 'error'> & Omit<UseControllerProps<FieldValues>, 'rules'>;
|
|
7
|
+
export type { ControllerProps as FormControllerProps, Field as FormField, FieldArray as FormFieldArray, FieldArrayPath as FormFieldArrayPath, FieldArrayWithId as FormFieldArrayWithId, FieldError as FormFieldError, FieldErrors as FormFieldErrors, FieldPath as FormFieldPath, FieldValues as FormFieldValues, FieldValues, Path as FormPath, RegisterOptions as FormRegisterOptions, Resolver as FormResolver, SubmitHandler, UseControllerProps as UseFormControllerProps, UseFormGetValues, UseWatchProps as UseFormWatchProps, } from 'react-hook-form';
|
package/lib/index.d.ts
CHANGED
package/lib/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as e,jsx as l,jsxs as a}from"react/jsx-runtime";import{Slot as t}from"@radix-ui/react-slot";import r,{clsx as s}from"clsx";import{Root as i}from"@radix-ui/react-label";import{ArrowDownNarrowWide as n,ArrowDownUp as o,ArrowDownWideNarrow as c,Calendar1 as d,Check as _,ChevronDown as m,ChevronLeft as h,ChevronRight as u,ChevronUp as y,Circle as p,CircleIcon as g,Copy as v,Ellipsis as b,EllipsisVertical as N,PanelLeftClose as f,PanelLeftOpen as w,X as k}from"lucide-react";import x,{createContext as z,createElement as C,useCallback as S,useContext as D,useEffect as I,useId as P,useLayoutEffect as T,useMemo as M,useRef as R,useState as L}from"react";import q from"embla-carousel-react";import{Indicator as O,Root as A}from"@radix-ui/react-checkbox";import{Content as $,Popover as F,PopoverTrigger as B,Portal as j}from"@radix-ui/react-popover";import{Arrow as E,Content as H,Portal as V,Provider as G,Root as W,Trigger as Y}from"@radix-ui/react-tooltip";import{CheckboxItem as K,Content as J,Group as U,Item as X,ItemIndicator as Q,Label as Z,Portal as ee,RadioGroup as el,RadioItem as ea,Root as et,Separator as er,Sub as es,SubContent as ei,SubTrigger as en,Trigger as eo}from"@radix-ui/react-dropdown-menu";import{Virtuoso as ec}from"react-virtuoso";import{Close as ed,Content as e_,Description as em,Overlay as eh,Portal as eu,Root as ey,Title as ep,Trigger as eg}from"@radix-ui/react-dialog";import{Drawer as ev,Root as eb}from"vaul";import{OTPInput as eN}from"input-otp";import{useMask as ef}from"@react-input/mask";import{Indicator as ew,Item as ek,Root as ex}from"@radix-ui/react-radio-group";import{Range as ez,Root as eC,Thumb as eS,Track as eD}from"@radix-ui/react-slider";import{Content as eI,Group as eP,Icon as eT,Item as eM,ItemIndicator as eR,ItemText as eL,Label as eq,Portal as eO,Root as eA,ScrollDownButton as e$,ScrollUpButton as eF,Separator as eB,Trigger as ej,Value as eE,Viewport as eH}from"@radix-ui/react-select";import{Content as eV,List as eG,Tabs as eW,Trigger as eY}from"@radix-ui/react-tabs";import{createTheme as eK,globalKeyframes as eJ,globalStyle as eU,keyframes as eX,style as eQ,styleVariants as eZ}from"@vanilla-extract/css";var e1={default:"default__1af895x1",secondary:"secondary__1af895x2",destructive:"destructive__1af895x3",outline:"outline__1af895x4"};function e0({className:e,variant:a="default",asChild:r=!1,...i}){return l(r?t:"span",{"data-slot":"badge",className:s("style__1af895x0",e1[a],e),...i})}var e2="style__1ersxw10",e6={sm:"sm__1ersxw19",md:"md__1ersxw1a",lg:"lg__1ersxw1b",icon:"icon__1ersxw1c",iconSm:"iconSm__1ersxw1d"},e5={default:"default__1ersxw14",destructive:"destructive__1ersxw15",outline:"outline__1ersxw16",ghost:"ghost__1ersxw17",link:"link__1ersxw18"};let e8=({className:e,variant:a="default",size:r="md",asChild:i=!1,isLoading:n=!1,fullWidth:o,...c})=>l(i?t:"button",{className:s(e2,e5[a],e6[r],{style__1ersxw13:o,style__1ersxw12:n},e),...c}),e3=({className:e,disabled:a,...t})=>l(i,{className:s("style__c31e140",{style__c31e141:a},e),...t}),e4=({value:e,onChange:t,options:r,size:i,className:n,label:o,multiple:c})=>{let d=!0===c;return a("div",{className:s("style__1iqvz720",n),children:[o&&l(e3,{className:"style__1iqvz723",children:o}),l("div",{className:"style__1iqvz721",children:r.map(a=>{var r;return l(e8,{size:i,className:"style__1iqvz722",disabled:a.disabled,onClick:()=>{var l;return l=a.value,void(d?e.includes(l)?t(e.filter(e=>e!==l)):t([...e,l]):t(l))},variant:(r=a.value,d?e.includes(r):e===r)?"default":"outline",children:a.label},a.value)})})]})},e9=({className:e,...a})=>l("div",{className:s("style__oyalw00",e),...a}),e7=({className:e,...a})=>l("div",{className:s("style__oyalw01",e),...a}),le=({className:e,...a})=>l("h3",{className:s("style__oyalw02",e),...a}),ll=({className:e,...a})=>l("p",{className:s("style__oyalw03",e),...a}),la=({className:e,...a})=>l("div",{className:s("style__oyalw04",e),...a}),lt=({className:e,...a})=>l("div",{className:s("style__oyalw05",e),...a}),lr=x.createContext(null);function ls(){let e=x.useContext(lr);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}var li={horizontal:"horizontal__2d6ocq3",vertical:"vertical__2d6ocq4"};function ln({className:t,...r}){let{orientation:i="horizontal",canScrollNext:n,scrollNext:o,canScrollPrev:c,scrollPrev:d}=ls();return a(e,{children:[l("button",{className:s("style__2d6ocq1 style__2d6ocq0",li[i]),type:"button","data-slot":"carousel-next",disabled:!n,onClick:o,...r,children:"horizontal"===i?l(u,{}):l(m,{})}),l("button",{type:"button",className:s("style__2d6ocq2 style__2d6ocq0",li[i]),"data-slot":"carousel-previous",disabled:!c,onClick:d,...r,children:"horizontal"===i?l(h,{}):l(y,{})})]})}var lo={horizontal:"horizontal__i1lems1",vertical:"vertical__i1lems2"};function lc(e){let{carouselRef:a,orientation:t="horizontal"}=ls();return l("div",{className:"style__i1lems0",ref:a,"data-slot":"carousel-content",children:l("div",{className:lo[t],...e})})}var ld={horizontal:"horizontal__e2zpp61 style__e2zpp60",vertical:"vertical__e2zpp62 style__e2zpp60"},l_={horizontal:"horizontal__e2zpp64 style__e2zpp63",vertical:"vertical__e2zpp65 style__e2zpp63"};let lm=({api:e,orientation:a})=>{let{selectedIndex:t,scrollSnaps:r,onDotButtonClick:i}=(e=>{let[l,a]=L(0),[t,r]=L([]),s=S(l=>{e&&e.scrollTo(l)},[e]),i=S(e=>{e&&r(e.scrollSnapList())},[]),n=S(e=>{e&&a(e.selectedScrollSnap())},[]);return I(()=>{e&&(i(e),n(e),e.on("reInit",i).on("reInit",n).on("select",n))},[e,i,n]),{selectedIndex:l,scrollSnaps:t,onDotButtonClick:s}})(e);return l("div",{className:ld[a],children:r.map((e,r)=>l("button",{type:"button",className:s(l_[a],{style__e2zpp66:r===t}),onClick:()=>i(r)},e))})};function lh(e){return l("div",{className:"style__1gif6yr0",role:"group","aria-roledescription":"slide","data-slot":"carousel-item",...e})}function lu({width:e="100%",height:t="100%",...r}){let{canScrollNext:i,canScrollPrev:n,scrollNext:o,scrollPrev:c,api:d,opts:_,orientation:m,carouselRef:h,handleKeyDown:u,data:y,isShowButtons:p,isShowDots:g}=(({orientation:e="horizontal",opts:l,setApi:a,plugins:t,data:r,showDots:s,showArrows:i})=>{let[n,o]=q({...l,axis:"horizontal"===e?"x":"y"},t),[c,d]=L(!1),[_,m]=L(!1),h=!!(i&&r.length>1),u=!!(s&&r.length>1),y=S(e=>{e&&(d(e.canScrollPrev()),m(e.canScrollNext()))},[]),p=S(e=>{o&&o.scrollTo(e)},[o]),g=S(()=>{o?.scrollPrev()},[o]),v=S(()=>{o?.scrollNext()},[o]),b=S(e=>{"ArrowLeft"===e.key?(e.preventDefault(),g()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[g,v]);return I(()=>{o&&a&&a(o)},[o,a]),I(()=>{if(o)return y(o),o.on("reInit",y),o.on("select",y),()=>{o?.off("select",y)}},[o,y]),{carouselRef:n,api:o,scrollPrev:g,scrollNext:v,canScrollPrev:c,canScrollNext:_,handleKeyDown:b,opts:l,orientation:e,onDotButtonClick:p,isShowButtons:h,isShowDots:u,data:r}})(r);return l(lr.Provider,{value:{carouselRef:h,api:d,opts:_,orientation:m||(_?.axis==="y"?"vertical":"horizontal"),scrollPrev:c,scrollNext:o,canScrollPrev:n,canScrollNext:i},children:a("div",{onKeyDownCapture:u,className:s("Carousel__1jbydv50",r.className),"data-slot":"carousel",style:{width:e,height:t},children:[l(lc,{style:{width:e,height:t},children:y.map(e=>l(lh,{children:r.renderItem(e)},`${e[r.keyId]}`))}),p&&l(ln,{}),g&&l(lm,{api:d,orientation:m})]})})}let ly=({className:e,...a})=>l(A,{className:s("style__b7yo4k0",e),...a,children:l(O,{className:"style__b7yo4k1",children:l(_,{className:"style__b7yo4k2"})})});var lp={determinate:"determinate__m6b9n25",indeterminate:"indeterminate__m6b9n26"},lg={primary:"primary__m6b9n27",secondary:"secondary__m6b9n28",inherit:"inherit__m6b9n29"};let lv=({size:e=30,thickness:t=2.6,color:s="primary",value:i=0,variant:n="indeterminate",className:o})=>{let c=(e-t)/2,d=2*Math.PI*c;return l("div",{className:r("style__m6b9n22",lp[n],lg[s],o),style:{width:e,height:e},children:a("svg",{className:"style__m6b9n23",viewBox:`0 0 ${e} ${e}`,children:[l("title",{children:"Progress bar"}),l("circle",{className:r("style__m6b9n24","determinate"===n&&lp.determinate),cx:e/2,cy:e/2,r:c,fill:"none",strokeWidth:t,strokeDasharray:d,strokeDashoffset:"determinate"===n?d*(1-i/100):.25*d})]})})},lb=({className:e,align:a="center",sideOffset:t=4,...r})=>l(j,{children:l($,{align:a,sideOffset:t,className:s("style__1xy4jvu2",e),...r})});var lN={left:"left__1sba6zok",center:"center__1sba6zol",right:"right__1sba6zom",justify:"justify__1sba6zon"},lf={primary:"primary__1sba6zoc",secondary:"secondary__1sba6zod",disabled:"disabled__1sba6zoe",success:"success__1sba6zof",error:"error__1sba6zog",warning:"warning__1sba6zoh",info:"info__1sba6zoi",muted:"muted__1sba6zoj"},lw={h1:"h1__1sba6zo0",h2:"h2__1sba6zo1",h3:"h3__1sba6zo2",h4:"h4__1sba6zo3",h5:"h5__1sba6zo4",h6:"h6__1sba6zo5",subtitle1:"subtitle1__1sba6zo6",subtitle2:"subtitle2__1sba6zo7",body1:"body1__1sba6zo8",body2:"body2__1sba6zo9",caption:"caption__1sba6zoa",overline:"overline__1sba6zob"},lk={lowercase:"lowercase__1sba6zou",uppercase:"uppercase__1sba6zov",capitalize:"capitalize__1sba6zow"},lx={block:"block__1sba6zoo",inline:"inline__1sba6zop"},lz={none:"none__1sba6zox",underline:"underline__1sba6zoy",lineThrough:"lineThrough__1sba6zoz"},lC={normal:"normal__1sba6zoq",medium:"medium__1sba6zor",semibold:"semibold__1sba6zos",bold:"bold__1sba6zot"};let lS={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",caption:"span",overline:"span"},lD=({className:e,variant:a="body1",component:t,color:r="primary",align:i="left",display:n="inline",weight:o="normal",transform:c,decoration:d="none",gutterBottom:_,children:m,...h})=>l(t||lS[a||"body1"],{className:s(lz[d],lw[a],lf[r],lC[o],c&&lk[c],lx[n],lN[i],{style__1sba6zo10:_},e),...h,children:m}),lI=e=>{let{open:t,onActionComponentClick:r,onCancel:i,confirmButtonProps:n,onOpenChange:o}=(({skipConfirm:e,onConfirm:l,confirmButtonProps:a})=>{let[t,r]=L(!1);return{open:t,onActionComponentClick:()=>{e?l():r(!0)},confirmButtonProps:{variant:a?.isAccented?"destructive":"default",size:"sm",onClick:()=>{r(!1),l()}},onCancel:()=>{r(!1)},onOpenChange:e=>{r(e)}}})(e),{text:c,confirmButtonProps:d,popoverProps:_,actionComponent:m}=e,{text:h="Подтвердить"}=d||{},{side:u="bottom",align:y="center"}=_||{};return a(F,{open:t,onOpenChange:o,children:[l(B,{asChild:!0,children:m({onClick:r})}),l(lb,{side:u,align:y,className:s("style__1q1uhgp2",{style__1q1uhgp3:!!c}),children:a("div",{className:"style__1q1uhgp1",children:[c&&l(lD,{children:c}),a("div",{className:"style__1q1uhgp0",children:[l(e8,{size:"sm",variant:"ghost",onClick:i,children:"Отмена"}),l(e8,{...n,children:h})]})]})})]})};var lP={sm:"sm__1o97kvm1",md:"md__1o97kvm2",lg:"lg__1o97kvm3"};let lT=e=>l("img",{alt:e.alt,src:e.src,className:r("style__1o97kvm0",lP[e.size||"md"],e.className),width:e.width,height:e.height}),lM={sm:"239px",md:"323px",lg:"458px"},lR={sm:"119px",md:"161px",lg:"229px"},lL={sm:"384px",md:"400px",lg:"460px"},lq={sm:"subtitle1",md:"h6",lg:"h5"};var lO={sm:"sm__1nenzg01",md:"md__1nenzg02",lg:"lg__1nenzg03"};let lA=({className:e,title:t,imgSrc:s,imgAlt:i,description:n,actions:o,size:c="sm",renderImage:d})=>{let _=M(()=>d||lT,[d]);return a("div",{className:r("style__1nenzg00",lO[c],e),children:[a("div",{className:"style__1nenzg04",style:{maxWidth:lL[c]},children:[s&&l(_,{src:s,alt:i,width:lM[c],height:lR[c],size:c}),l(lD,{align:"center",color:"secondary",variant:lq[c],children:t}),n&&l(lD,{className:"style__1nenzg05",component:"div",variant:"body1",children:n})]}),o&&l("footer",{className:"style__1nenzg06",children:o})]})},l$=({isLoading:e,isError:a,isCustom:t,errorState:r,customState:s,children:i,loadingContent:n=l(lv,{color:"primary"})})=>{if(e)return l("div",{className:"style__nan0ao0",children:n});if(t&&s)return l(lA,{...s});if(a&&r){let{title:e="Произошла ошибка",imgAlt:a,imgSrc:t,errorList:s,onRetry:i,actions:n=l(e8,{onClick:i,children:"Попробовать снова"})}=r,o=s.map(e=>l(lD,{component:"p",children:e},e));return l(lA,{title:e,description:o,imgAlt:a,imgSrc:t,actions:n})}return i},lF=({sideOffset:e=4,alignOffset:a,ref:t,...r})=>l(H,{ref:t,sideOffset:e,...r}),lB=({text:e,content:t,children:s,side:i="top",sideOffset:n,alignOffset:o,delayDuration:c=0,className:d,ref:_,...m})=>l(G,{delayDuration:c,children:a(W,{...m,children:[l(Y,{ref:_,asChild:!0,children:s}),t||e?l(V,{children:a(lF,{className:r("style__izacrl2",d),alignOffset:o,sideOffset:n,hideWhenDetached:!0,side:i,children:[t??l("p",{className:"style__izacrl3",children:e}),m.arrow&&l(E,{className:"style__izacrl4"})]})}):null]})}),lj=e=>{let{children:t,copyPosition:r="right",copyText:i,isShowCopyText:n,color:o,className:c,...d}=e,_=()=>l(v,{className:"style__1wpx85c1"}),{tooltipOpen:m,handleMouseEnter:h,handleMouseLeave:u,handleClick:y,tooltipTitle:p,isIconOnLeft:g}=(({children:e,copyText:l,isShowCopyText:a,copyPosition:t})=>{let[r,s]=L("Скопировать"),[i,n]=L(!1);return{handleMouseLeave:()=>{"Скопировать"!==r&&setTimeout(()=>{s("Скопировать")},100),n(!1)},handleClick:a=>{a.stopPropagation(),navigator.clipboard.writeText(l||("string"==typeof e?e:"")).then(()=>s("Скопировано")).catch(()=>s("Ошибка копирования"))},tooltipTitle:a?`${r}: ${l}`:r,isIconOnLeft:"left"===t,tooltipOpen:i,handleMouseEnter:()=>{n(!0)}}})(e);return l(lB,{open:m,arrow:!0,text:p,side:"bottom",children:a(lD,{onMouseLeave:u,onMouseEnter:h,onClick:y,component:"div",color:o,className:s("style__1wpx85c0",c),...d,children:[g&&_(),t,!g&&_()]})})},lE=z({pinned:!0,hovered:!1,togglePinned:()=>{}}),lH=()=>D(lE),lV="16rem",lG=({children:e,className:a})=>{let{pinned:t,togglePinned:r}=(()=>{let[e,l]=((e,l,a)=>{if(void 0===window)return[l,()=>{},()=>{}];if(!e)throw Error("useLocalStorage key may not be falsy");let t=JSON.parse,r=R(e=>{try{let a=(0,JSON.stringify),r=localStorage.getItem(e);if(null!==r)return t(r);return l&&localStorage.setItem(e,a(l)),l}catch{return l}}),[s,i]=L(()=>r.current(e));T(()=>i(r.current(e)),[e]);let n=S(l=>{try{let r,n="function"==typeof l?l(s):l;if(void 0===n)return;r=a?a.raw?"string"==typeof n?n:JSON.stringify(n):a.serializer?a.serializer(n):JSON.stringify(n):JSON.stringify(n),localStorage.setItem(e,r),i(t(r))}catch{}},[e,i]);return[s,n,S(()=>{try{localStorage.removeItem(e),i(void 0)}catch{}},[e,i])]})("dashboard::pinned",!1);return{pinned:e,togglePinned:()=>l(!e)}})();return l(lE.Provider,{value:{pinned:t,togglePinned:r},children:l("div",{className:s("DashboardLayout__113u7x50",a),children:e})})};function lW({row:e,column:a,rowIndex:t,height:r}){let{align:i,cellColor:n,isDisabled:o}=a;return l("td",{align:i??"left",style:{backgroundColor:n?.(e),height:r,width:a.width},className:s("style__1047swj0",{style__1047swj1:o},a.cellClassName?.(e)),children:l(()=>a.renderCell?a.renderCell(e,t):a.format?a.format(e)||"—":a.field?`${e[a.field]||"—"}`:"—",{})})}function lY({row:e,rowHeight:a,onRowClick:t,columns:r,rowIndex:i,rowId:n}){let o=S(()=>{t?.(e)},[t,e]);return l("tr",{onClick:o,onKeyDown:o,className:s("style__gsm9mv0",{style__gsm9mv1:!!t}),children:r.map((t,r)=>l(lW,{row:e,rowIndex:i,column:t,height:a},`${n}-${r}`))})}function lK({isLoading:e,isEmpty:a,columnsLength:t,emptyState:r={text:"Нет данных"},errorState:s={text:"Произошла ошибка"},isError:i,onRetry:n}){let o=({children:e})=>l("tr",{className:"style__15m2ib80",children:l("td",{colSpan:t,align:"center",children:e})});if(e)return l(o,{children:l("span",{className:"style__15m2ib81",children:l(lv,{})})});if(a){let{imgSrc:e,imgAlt:a,text:t}=r;return l(o,{children:l(lA,{title:t,imgSrc:e,imgAlt:a})})}if(i){let{imgSrc:e,imgAlt:a,text:t}=s;return l(o,{children:l(lA,{title:t,imgSrc:e,imgAlt:a,actions:n?l(e8,{variant:"outline",onClick:n,children:"Попробовать снова"}):void 0})})}return null}lG.Sidebar=({width:e=lV,header:t,footer:r,content:i,className:n})=>{let{pinned:o}=lH();return a("div",{style:{width:o?e:0},className:"style__1low90p0",children:[l("span",{className:"SidebarTrigger__1low90p1"}),a("aside",{style:{width:e},className:s("SidebarContainer__1low90p2",{style__1low90p3:!o},n),children:[t&&l("header",{className:"SidebarHeader__1low90p4",children:t}),l("div",{className:"SidebarContent__1low90p6",children:i}),r&&l("footer",{className:"SidebarFooter__1low90p5",children:r})]})]})},lG.Main=({children:e,className:a})=>l("main",{className:s("style__whkxou0",a),children:e});var lJ="style__82af400";function lU({isError:e,isLoading:a,emptyState:t,errorState:r,columns:s,rows:i,rowHeight:n,keyId:o,onRowClick:c}){let d=0===i.length;return e||a||d?l("tbody",{className:lJ,children:l(lK,{emptyState:t,errorState:r,isEmpty:d,isError:e,isLoading:a,columnsLength:s.length})}):l("tbody",{className:lJ,children:i.map((e,a)=>{let t=String(e[o]);return l(lY,{row:e,rowId:t,rowHeight:n,columns:s,onRowClick:c,rowIndex:a},e[o])})})}function lX({children:e,className:a}){return l("footer",{className:s("style__2s55b60",a),children:e})}function lQ({column:e,height:a,width:t}){return l("th",{style:{color:e.color,height:a,width:t},align:e.align??"left",title:e.title,className:"style__uma6hu0",children:e.renderHeaderCell?.(e)||e.title})}function lZ({columns:e,height:a,sticky:t}){return l("thead",{children:l("tr",{className:s({style__fkgoub0:t}),children:e.map(e=>l(lQ,{column:e,height:a,width:e.width},e.title))})})}function l1({rows:e,columns:t,height:r="100%",className:i,rowHeight:n=40,headerHeight:o=40,keyId:c,onRowClick:d,isLoading:_,isDisabled:m,isError:h,emptyState:u,errorState:y,footer:p,title:g,stickyHeader:v,onRetry:b}){let N=_||h||0===e.length;return a("div",{"data-slot":"data-grid",style:{height:r},className:s("style__1gqvluf0",i),children:[a("table",{className:s("style__1gqvluf1",{style__1gqvluf3:m,style__1gqvluf4:_,style__1gqvluf2:N},i),children:[g&&l("caption",{className:"style__1gqvluf5",children:g}),l(lZ,{columns:t,height:o,sticky:v}),l(lU,{rows:e,columns:t,rowHeight:n,keyId:c,onRowClick:d,isLoading:_,emptyState:u,errorState:y,isError:h,onRetry:b})]}),p&&l(lX,{children:p})]})}var l0="style__1ib8wkt3";let l2=et,l6=eo,l5=U,l8=ee,l3=es,l4=el,l9=({className:e,inset:t,children:s,...i})=>a(en,{className:r("style__1ib8wkt2",{inset:t},e),...i,children:[s,l(u,{className:l0})]}),l7=({className:e,...a})=>l(ei,{className:r("style__1ib8wkt4",e),...a}),ae=({className:e,sideOffset:a=4,...t})=>l(ee,{children:l(J,{sideOffset:a,className:r("style__1ib8wkt5",e),...t})}),al=({className:e,inset:a,...t})=>l(X,{className:r("style__1ib8wkt6",{inset:a},e),...t}),aa=({className:e,children:t,checked:s,...i})=>a(K,{className:r("style__1ib8wkt7",e),checked:s,...i,children:[l("span",{className:"style__1ib8wkt9",children:l(Q,{children:l(_,{className:l0})})}),t]}),at=({className:e,children:t,...s})=>a(ea,{className:r("style__1ib8wkt8",e),...s,children:[l("span",{className:"style__1ib8wkta",children:l(Q,{children:l(p,{className:l0})})}),t]}),ar=({className:e,inset:a,...t})=>l(Z,{className:r("style__1ib8wktb",{inset:a},e),...t}),as=({className:e,...a})=>l(er,{className:r("style__1ib8wktc",e),...a}),ai=({className:e,...a})=>l("span",{className:r("style__1ib8wktd",e),...a}),an=a=>{let{tooltipProps:t}=(({action:e})=>{let{isLoading:l,disabledReason:a,name:t}=e,[r,s]=L(!1);return I(()=>{l&&s(!1)},[l]),{tooltipProps:{text:a||t,open:r,onOpenChange:e=>s(e)}}})(a),{action:r,onActionClick:s,isDisabled:i,tooltipPlacement:n}=a,{name:o,icon:c,needConfirm:d,confirmText:_,confirmButtonProps:m,disabled:h,isLoading:u,onClick:y}=r,p=e=>l(lB,{arrow:!0,side:n,...t,children:l(e8,{disabled:i||h,isLoading:u,variant:"ghost",size:"icon",...e,children:c})},o);return l(e,{children:d?l(lI,{text:_,confirmButtonProps:m,actionComponent:e=>p(e),onConfirm:s(y)}):p({onClick:s(y)})})},ao=({action:e,onActionClick:t,isDisabled:r,tooltipPlacement:s})=>{if("actions"in e){let{disabled:i,icon:n,name:o,disabledReason:c,actions:d,isLoading:_}=e;return a(l2,{children:[l(l6,{asChild:!0,children:l(lB,{text:c||o,side:s,arrow:!0,children:l(e8,{variant:"ghost",size:"icon",isLoading:_,disabled:r||i,children:n})},o)}),l(ae,{children:d.map(({name:e,onClick:a,...r})=>C(al,{...r,key:e,asChild:!0},l(e8,{size:"sm",onClick:t(a),children:e})))})]})}return l(an,{action:e,onActionClick:t,isDisabled:r,tooltipPlacement:s})},ac=({actions:e,onActionClick:t,tooltipPlacement:r,isDisabled:s})=>a(l2,{children:[l(l6,{asChild:!0,children:l(e8,{disabled:s,variant:"ghost",size:"icon",children:l(N,{})})}),l(ae,{children:e.map(e=>{let{onClick:a,name:s,disabledReason:i,isLoading:n}=e;return l(al,{asChild:!0,children:l(lB,{arrow:!0,side:r,text:i,children:l(e8,{onClick:t(a),isLoading:n,variant:"ghost",size:"sm",fullWidth:!0,children:s})})},s)})})]}),ad=e=>{let{isDisabledAction:t,handleWrapperClick:r,handleActionClick:s}=(({row:e,actions:l})=>{let{main:a,secondary:t}=l,r=[...a,...t||[]].find(e=>e.isBlockingOperation&&e.isLoading);return{isDisabledAction:!!r,handleActionClick:S(l=>()=>{l?.(e)},[e]),handleWrapperClick:e=>{e.stopPropagation()}}})(e),{actions:i}=e,{main:n,secondary:o}=i;return a("div",{onClick:r,onKeyDown:r,className:"style__y44ln70",children:[n.map(e=>l(ao,{action:e,onActionClick:s,isDisabled:t,tooltipPlacement:"top"},e.name)),o&&l(ac,{actions:o,onActionClick:s,tooltipPlacement:"left",isDisabled:t})]})};var a_={left:"left__o752f01",center:"center__o752f02",right:"right__o752f03",justify:"justify__o752f04"};function am({sorting:e,setSorting:t,column:{title:r,field:i,align:d="left"},className:_}){return i?a("button",{type:"button",className:s("style__o752f00",a_[d],_),onClick:()=>{e.key===i?t({key:i,order:"asc"===e.order?"desc":"asc"}):t({key:i,order:"asc"})},children:[r,e.key===i?"asc"===e.order?l(n,{size:16}):l(c,{size:16}):l(o,{size:16})]}):null}let ah="Вы достигли конца списка",au=({endOfScrollMsg:e=ah})=>l("li",{className:"style__1syvw5e0",children:l(lD,{children:e})}),ay=({onRetry:e})=>a("li",{className:"style__qlujai0",children:[l(lD,{align:"center",children:"Ошибка загрузки"}),l(e8,{size:"sm",onClick:e,children:"Попробовать снова"})]}),ap=()=>l("li",{className:"style__111czea0",children:l(lv,{color:"primary"})}),ag=({noDataImgSrc:e})=>l(lA,{title:"Нет данных",imgSrc:e}),av=({onClick:e,isVisible:a})=>l(e8,{onClick:e,size:"icon",variant:"outline",className:s("style__1jg5nd90",{style__1jg5nd91:a}),children:l(y,{})}),ab=({data:t,keyId:r,className:i,itemContent:n,noDataPlaceholder:o,endOfScrollMsg:c,errorState:d,isLoading:_,isError:m,isEndReached:h,onRetry:u,onEndReached:y,scrollTopIsDataChanged:p})=>{let g=R(null),[v,b]=L(!1),N=S(e=>{e.startIndex>2?b(!0):b(!1)},[]),f=S(()=>g.current?.scrollToIndex({index:0,align:"start",behavior:"smooth"}),[g]),w=S(()=>{!h&&y&&y()},[h,y]),k=!!t?.length;return k||_||m?(I(()=>{p&&g.current?.scrollToIndex({index:0,align:"start"})},[p,t]),a(l$,{isLoading:_&&!k,isError:m&&!k,errorState:d,children:[l(ec,{className:s("style__1ezen7g0",i),style:{height:"100%"},data:t,ref:g,overscan:30,endReached:w,rangeChanged:N,itemContent:(e,a)=>l("li",{children:n?.(a,{index:e,className:s("style__1ezen7g1","datalist_item")})},a[r]),components:{Footer:()=>a(e,{children:[_&&l(ap,{}),m&&l(ay,{onRetry:u}),h&&l(au,{endOfScrollMsg:c})]})}}),l(av,{isVisible:v,onClick:f})]})):o?l(e,{children:o}):l(ag,{})},aN=":",af="—",aw="descriptionRoot",ak=z({leader:!1,separator:aN,direction:"default"}),ax=({children:e,leader:a,separator:t,direction:r})=>l(ak.Provider,{value:{leader:a,separator:t,direction:r},children:e});var az={row:"row__1lociyw1",column:"column__1lociyw2"},aC={spaceBetween:"spaceBetween__1lociyw3",start:"start__1lociyw4"},aS="style__sdcsnp2";let aD=e=>{let{descriptionContextProviderProps:a,direction:t}=(({direction:e="row",separator:l=aN})=>({descriptionContextProviderProps:{separator:"column"===e?"":l},direction:e}))(e),{justifyContent:r="start",component:i="dl",children:n,leader:o=!1,className:c}=e;return l(ax,{leader:o,direction:t,...a,children:l(i,{className:s("style__1lociyw0",az[t],aC[r],aw,c),children:n})})};aD.Name=({children:t,color:r="secondary",...i})=>{let{leader:n,separator:o}=D(ak);return a(e,{children:[l("dt",{className:s("style__1tsgk1i0",{style__1tsgk1i1:n}),children:a(lD,{...i,color:r,children:[t,!n&&o]})}),n&&l("div",{className:"style__1tsgk1i2"})]})},aD.Value=e=>{let{valueToRender:a,isDefaultValueRender:t,leader:s}=(({canCopy:e,children:l,stub:a="—"})=>{let{leader:t,direction:r}=D(ak);return{valueToRender:l||a,isDefaultValueRender:!e||!l,leader:t,direction:r}})(e),{copyPosition:i="right",copyText:n,canCopy:o,children:c,stub:d,..._}=e;return t?l(lD,{className:r("style__sdcsnp1",{[aS]:s}),component:"dd",..._,children:a}):l("dd",{className:"style__sdcsnp0",children:l(lj,{className:r({[aS]:s}),copyPosition:i,copyText:n,..._,children:a})})};let aI=({title:e,description:t="",trigger:s,className:i,footer:n,children:o,...c})=>a(ey,{...c,children:[s&&l(eg,{asChild:!0,children:s}),a(eu,{children:[l(eh,{className:r("style__8bkmbe2")}),a(e_,{className:r("style__8bkmbe5",i),children:[a("div",{className:r("style__8bkmbe8",{style__8bkmbe9:!!t}),children:[l(ep,{className:"style__8bkmbeb",children:e}),l(em,{className:"style__8bkmbec",children:t}),c.onOpenChange&&a(ed,{className:"style__8bkmbe6",children:[l(k,{size:24}),l("span",{className:"style__8bkmbe7",children:"Close"})]})]}),o,n&&l("div",{className:"style__8bkmbea",children:n})]})]})]}),aP=({children:e,trigger:t,className:r,title:i,description:n="",footer:o,closeButton:c,...d})=>a(eb,{...d,children:[t&&l(ev.Trigger,{"data-slot":"drawer-trigger",asChild:!0,children:t}),a(ev.Portal,{"data-slot":"drawer-portal",children:[l(ev.Overlay,{"data-slot":"drawer-overlay",className:s("style__ccss502",r)}),a(ev.Content,{"data-slot":"drawer-content",className:s("group/drawer-content","style__ccss503",r),children:[l("div",{className:"style__ccss504"}),a("div",{"data-slot":"drawer-header",className:s("style__ccss505",r),children:[l(ev.Title,{"data-slot":"drawer-title",className:s("style__ccss507",r),children:i}),l(ev.Description,{"data-slot":"drawer-description",className:s("style__ccss508",r),children:n})]}),e,a("div",{"data-slot":"drawer-footer",className:s("style__ccss506",r),children:[o,c&&l(ev.Close,{"data-slot":"drawer-close",asChild:!0,children:c})]})]})]})]});var aT="style__a5l83v0",aM="style__a5l83v4";let aR=({images:t=[],autoPlay:r=!1,interval:i=5e3})=>{let[n,o]=L(0);return(I(()=>{if(!r)return;let e=setInterval(()=>{o(e=>e===t.length-1?0:e+1)},i);return()=>clearInterval(e)},[r,t.length,i]),0===t.length)?l("div",{className:aT,children:"Нет изображений для отображения"}):a("div",{className:aT,children:[l("div",{className:"style__a5l83v1",style:{transform:`translateX(-${100*n}%)`},children:t.map((e,a)=>l("div",{className:"style__a5l83v2",children:l("img",{src:e.src,alt:e.alt||`Slide ${a+1}`,className:"style__a5l83v3"})},e.src))}),t.length>1&&a(e,{children:[l("button",{type:"button",className:s(aM,"style__a5l83v5"),onClick:()=>{o(e=>0===e?t.length-1:e-1)},children:l(h,{size:24})}),l("button",{type:"button",className:s(aM,"style__a5l83v6"),onClick:()=>{o(e=>e===t.length-1?0:e+1)},children:l(u,{size:24})}),l("div",{className:"style__a5l83v7",children:t.map(({src:e},a)=>l("button",{type:"button",className:`style__a5l83v8 ${n===a?"active":""}`,onClick:()=>{o(a)}},e))})]})]})};var aL={sm:"sm__1blk89u9",md:"md__1blk89ua",lg:"lg__1blk89ub"},aq="style__1blk89uc",aO={outlined:"outlined__1blk89u1",standard:"standard__1blk89u2"},aA="style__1blk89u6";let a$=({error:e,variant:t="outlined",size:r="md",startAdornment:i,endAdornment:n,className:o,disabled:c,fullWidth:d,value:_,ref:m,...h})=>a("div",{className:s("Input__1blk89u0",aO[t],{style__1blk89u7:e},{[aA]:c},{style__1blk89u3:d},o),children:[i&&l("span",{className:aq,children:i}),l("input",{className:s("style__1blk89u8",aL[r],{[aA]:c,style__1blk89ud:!!i,style__1blk89ue:!!n}),ref:m,disabled:c,value:_||"",...h}),n&&l("span",{className:aq,children:n})]}),aF=({separator:e="•",...a})=>l("div",{...a,children:l("span",{className:"style__te1pgr0",children:e})}),aB=({char:e,hasFakeCaret:t,isActive:r,...i})=>a("div",{className:s("style__rtks2g0",{style__rtks2g1:r}),...i,children:[e,t&&l("div",{className:"style__rtks2g2",children:l("div",{className:"style__rtks2g4"})})]});var aj="style__1iixe0l2";let aE=({className:t,containerClassName:r,disabled:i,...n})=>l(eN,{containerClassName:s("style__1iixe0l0",{style__1iixe0l3:i},r),className:s("style__1iixe0l1",t),render:({slots:t})=>t.length%2!=0?l("div",{className:aj,children:t.map((e,a)=>l(aB,{...e},`${a}-${e.char}`))}):a(e,{children:[l("div",{className:aj,children:t.slice(0,t.length/2).map((e,a)=>l(aB,{...e},`${a}-${e.char}`))}),l(aF,{}),l("div",{className:aj,children:t.slice(t.length/2).map((e,a)=>l(aB,{...e},`${a}-${e.char}`))})]}),...n}),aH=({label:e,helperText:t,className:r,disabled:i,fullWidth:n,ref:o,labelClassName:c,...d})=>a("div",{className:s("style__kqu4y20",{style__kqu4y25:n},r),children:[e&&l(e3,{htmlFor:d.id||e,disabled:i,className:s("style__kqu4y21",c),children:e}),l(a$,{ref:o,disabled:i,fullWidth:n,id:d.id||e,...d}),t&&l(lD,{variant:"caption",className:s("style__kqu4y22",{style__kqu4y24:d.error,style__kqu4y23:i}),children:t})]}),aV=({maskProps:e,...a})=>l(aH,{ref:ef(e),...a}),aG=({children:e,className:a})=>l("div",{className:s("style__adrl250",a),children:e});aG.Header=e=>{let{title:t,subtitle:r,breadcrumbs:i,actions:n,backButton:o,className:c}=e,{pinned:d,togglePinned:_}=lH();return I(()=>{"string"==typeof t&&(document.title=t)},[t]),a("header",{className:s("page_header","style__nvcxbd1",c),children:[a("div",{className:"style__nvcxbd2",children:[l(lB,{text:d?"Развернуть":"Свернуть",children:l(e8,{variant:"ghost",size:"icon",onClick:_,children:d?l(w,{}):l(f,{})})}),o&&l(lB,{text:"Назад",children:l(e8,{...o,variant:"ghost",children:l(h,{})})})]}),i&&l("div",{className:"Breadcrumbs__nvcxbd0",children:i}),l("div",{className:"style__nvcxbd3",children:n}),"string"==typeof t?l(lD,{className:"style__nvcxbd4",component:"h1",variant:"h3","aria-level":1,children:t}):l("div",{className:"style__nvcxbd5",children:t}),r&&"string"==typeof r&&l(lD,{className:"style__nvcxbd6","aria-level":2,children:r}),r&&"string"!=typeof r&&l("div",{className:"style__nvcxbd7",children:r})]})},aG.Content=e=>{let{className:a,children:t,isFullHeight:r=!0}=e;return l("article",{className:s("page-content","style__1hr0uh00",{style__1hr0uh01:r},a),children:t})},aG.Footer=e=>{let{children:a,className:t}=e;return l("footer",{className:s("style__1bd8jnw0",t),children:a})},aG.Aside=({children:e,className:a})=>l("aside",{className:s("PageLayoutAside__1un4hm80",a,"page_aside"),children:e});let aW=(e,l)=>Array.from({length:l-e+1},(l,a)=>a+e);function aY(e){let{onPageChange:t,totalCount:r,siblingCount:s=1,currentPage:i,pageSize:n,size:o="icon"}=e,c=(({totalCount:e,pageSize:l,siblingCount:a=1,currentPage:t})=>M(()=>{if(l<=0||e<=0)return[];let r=Math.ceil(e/l);if(a+5>=r)return aW(1,r);let s=Math.max(t-a,1),i=Math.min(t+a,r),n=s>2,o=i<r-2;return!n&&o?[...aW(1,3+2*a),null,r]:n&&!o?[1,null,...aW(r-(3+2*a)+1,r)]:n&&o?[1,null,...aW(s,i),null,r]:[]},[e,l,a,t]))({currentPage:i,totalCount:r,siblingCount:s,pageSize:n});if(0===i||c&&c.length<2)return null;let d=c.at(-1);return a("nav",{className:"style__p708oq0",children:[l(e8,{variant:"ghost",size:o,onClick:()=>{t(i-1)},disabled:1===i,children:l(h,{})}),c?.map((e,a)=>e?l(e8,{size:o,variant:e===i?"default":"outline",onClick:()=>t(+e),children:e},`${e}${a.toString()}`):l("span",{className:"style__p708oq1",children:l(b,{})})),l(e8,{variant:"ghost",size:o,onClick:()=>{t(i+1)},disabled:i===d,children:l(u,{})})]})}let aK=["Янв.","Фев.","Мар.","Апр.","Май","Июн.","Июл.","Авг.","Сен.","Окт.","Ноя.","Дек."],aJ=["I квартал","II квартал","III квартал","IV квартал"],aU=e=>Math.ceil(e/3);function aX({year:e,onSelect:t,minDate:r,maxDate:s}){let i=Array.from({length:s.getFullYear()-r.getFullYear()+1},(e,l)=>r.getFullYear()+l);return a(tl,{onValueChange:e=>{t?.(Number(e))},value:e.toString(),children:[l(tr,{children:l(tt,{placeholder:e.toString()})}),l(tn,{children:i.map(e=>l(tc,{value:e.toString(),children:l(lD,{align:"center",variant:"subtitle1",transform:"capitalize",children:e})},e))})]})}let aQ=e=>{let{label:t,disabled:r=!1,value:s,onSelect:i,type:n="month",placeholder:o="month"===n?"Выберите месяц":"Выберите квартал",error:c,helperText:_,max:m=new Date(2050,0,1),min:h=new Date(2e3,0,1),className:u,size:y,fullWidth:p,name:g}=e,v=new Date,[b,N]=L(!1),[f,w]=L(v.getFullYear()),k=e=>{i?.(e),N(!1)},x="month"===n?s?.toLocaleDateString("ru-RU",{month:"long",year:"numeric"}):s?`${aJ[aU(s.getMonth())]} ${s.getFullYear()}`:"";return I(()=>{s&&w(s.getFullYear())},[s]),a(F,{open:b,onOpenChange:N,children:[l(aH,{label:t,value:x,disabled:r,size:y,fullWidth:p,name:g,endAdornment:l(B,{asChild:!0,children:l(e8,{disabled:r,variant:"ghost",size:"icon",children:l(d,{})})}),placeholder:o,error:c,helperText:_,className:u}),l(lb,{align:"end",alignOffset:-10,side:"bottom",children:a("div",{className:"style__1izfmw30",children:[l(aX,{year:f,onSelect:w,minDate:h,maxDate:m}),"month"===n?l("div",{className:"style__1izfmw31",children:aK.map((e,a)=>{let t=new Date(f,a,s?.getDate()||1);return l(e8,{variant:s?.getMonth()===a&&s.getFullYear()===t.getFullYear()?"default":"ghost",disabled:t<h||t>m,onClick:()=>k(t),children:e},e)})}):l("div",{className:"style__1izfmw32",children:aJ.map((e,a)=>{let t=new Date(f,3*a,1);return l(e8,{variant:s&&[aU(s.getMonth())===a,s.getFullYear()===t.getFullYear()].every(Boolean)?"default":"ghost",disabled:t<h||t>m,onClick:()=>k(t),children:e},e)})})]})})]})},aZ=({className:e,...a})=>l(ex,{"data-slot":"radio-group",className:r("RadioGroup__ia95d10",e),...a}),a1=({className:e,label:t,...r})=>a("div",{className:"style__ia95d11",children:[l(ek,{"data-slot":"radio-group-item",id:r.id||r.value,className:s("style__ia95d12",e),...r,children:l(ew,{"data-slot":"radio-group-indicator",className:"style__ia95d13",children:l(g,{className:"style__ia95d14"})})}),l(e3,{htmlFor:r.id||r.value,"data-slot":"radio-group-label",children:t})]});var a0="style__h9oy583";let a2=({className:e,...t})=>a(eC,{className:s("style__h9oy580",e),...t,children:[l(eD,{className:"style__h9oy581",children:l(ez,{className:"style__h9oy582"})}),l(eS,{className:a0}),t.value?.length===2&&l(eS,{className:a0})]});var a6={sm:"sm__1pnwkko2",md:"md__1pnwkko3",lg:"lg__1pnwkko4"},a5="style__1pnwkko6",a8="style__1pnwkko5";function a3({min:e,max:t,onChange:r,minValue:i,maxValue:n,width:o=150,label:c="",unit:d="",size:_="md",className:m,isActive:h,minInputRef:u,maxInputRef:y}){let{onMinValueChange:p,onMaxValueChange:g,minVal:v,maxVal:b,onKeyDown:N,onValueChange:f,onConfirm:w,id:k}=(({min:e,max:l,maxValue:a,minValue:t,onChange:r})=>{let s=P(),[i,n]=L(e),[o,c]=L(l);return I(()=>{n(t||e),c(a||l)},[t,a,e,l]),{id:s,minVal:i,maxVal:o,onValueChange:e=>{if(e[0]===e[1])return void r(e[0],e[1]);n(e[0]),c(e[1])},onMinValueChange:e=>{let{value:l}=e.target;Number.isNaN(+l)||n(+l)},onMaxValueChange:e=>{let{value:l}=e.target;Number.isNaN(l)||c(+l)},onKeyDown:a=>{"Enter"===a.key&&r(i>=e&&i<=l?i:e,o>=e&&o<=l?o:l)},onConfirm:e=>{r(e[0],e[1])}}})({min:e,max:t,maxValue:n,minValue:i,onChange:r});return a("div",{className:s("style__1pnwkko0",a6[_],{style__1pnwkko1:h},m),style:{width:o},children:[l(lD,{className:a8,color:"disabled",variant:"body2",children:c}),l(lD,{className:a8,color:"disabled",variant:"body2",children:"от"}),l("input",{className:a5,type:"text",id:k,value:v,onChange:p,onKeyDown:N,ref:u}),l(lD,{className:a8,color:"disabled",variant:"body2",children:"до"}),l("input",{className:a5,type:"text",id:k,value:b,onChange:g,onKeyDown:N,ref:y}),l(lD,{className:a8,color:"disabled",variant:"body2",children:d}),l("div",{className:"style__1pnwkko7",children:l(a2,{min:e,max:t,value:[Number(v),Number(b)],onValueChange:f,onValueCommit:w})})]})}function a4({onClick:e,variant:a="outline",...t}){let[r,i]=L(!1),n=()=>{window.scrollY>400?i(!0):i(!1)};return I(()=>(window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}),[]),l(e8,{type:"button",variant:a,className:s("style__1ou2vjc0",{style__1ou2vjc1:r}),onClick:e||(()=>{window.scrollTo({top:0,left:0,behavior:"auto"})}),...t,children:l(y,{})})}var a9={sm:"sm__5ilg7o3",md:"md__5ilg7o4",lg:"lg__5ilg7o5"},a7="style__5ilg7od",te="style__5ilg7o6";let tl=eA,ta=eP,tt=eE,tr=({className:e,children:t,size:r="md",...i})=>a(ej,{className:s("style__5ilg7o2",a9[r],e),...i,children:[t,l(eT,{asChild:!0,children:l(m,{className:"style__5ilg7oe"})})]}),ts=({className:e,...a})=>l(eF,{className:s(te,e),...a,children:l(y,{className:a7})}),ti=({className:e,...a})=>l(e$,{className:s(te,e),...a,children:l(m,{className:a7})}),tn=({className:e,children:t,position:r="popper",...i})=>l(eO,{children:a(eI,{className:s("style__5ilg7o7",e),position:r,...i,children:[l(ts,{}),l(eH,{className:"style__5ilg7o8",children:t}),l(ti,{})]})}),to=({className:e,...a})=>l(eq,{className:`style__5ilg7o9 ${e||""}`,...a}),tc=({className:e,children:t,...r})=>a(eM,{className:`style__5ilg7oa ${e||""}`,...r,children:[l("span",{className:"style__5ilg7ob",children:l(eR,{children:l(_,{className:a7})})}),l(eL,{children:t})]}),td=({className:e,...a})=>l(eB,{className:`style__5ilg7oc ${e||""}`,...a});var t_={sm:"sm__hworoa2",md:"md__hworoa3",lg:"lg__hworoa4"};let tm=e=>l(eW,{...e});tm.Content=({className:e,...a})=>l(eV,{className:s("style__hworoa5",e),...a}),tm.List=({className:e,...a})=>l(eG,{className:s("style__hworoa0",e),...a}),tm.Trigger=({className:e,size:a="md",...t})=>l(eY,{className:s("style__hworoa1",t_[a],e),...t});var th={colors:{primary:"var(--colors-primary)",secondary:"var(--colors-secondary)",warning:"var(--colors-warning)",error:"var(--colors-error)",success:"var(--colors-success)",border:"var(--colors-border)",info:"var(--colors-info)",background:{tooltip:"var(--colors-background-tooltip)",paper:"var(--colors-background-paper)",element:"var(--colors-background-element)",elementHover:"var(--colors-background-elementHover)",sidebar:"var(--colors-background-sidebar)"},foreground:{primary:"var(--colors-foreground-primary)",secondary:"var(--colors-foreground-secondary)"},text:{primary:"var(--colors-text-primary)",secondary:"var(--colors-text-secondary)",disabled:"var(--colors-text-disabled)",hint:"var(--colors-text-hint)"}},spacing:{1:"var(--spacing-1)",2:"var(--spacing-2)",3:"var(--spacing-3)",4:"var(--spacing-4)",5:"var(--spacing-5)",6:"var(--spacing-6)",8:"var(--spacing-8)",10:"var(--spacing-10)",12:"var(--spacing-12)",16:"var(--spacing-16)",20:"var(--spacing-20)"},fontSize:{xs:"var(--fontSize-xs)",sm:"var(--fontSize-sm)",base:"var(--fontSize-base)",lg:"var(--fontSize-lg)",xl:"var(--fontSize-xl)","2xl":"var(--fontSize-2xl)","3xl":"var(--fontSize-3xl)","4xl":"var(--fontSize-4xl)"},fontWeight:{normal:"var(--fontWeight-normal)",medium:"var(--fontWeight-medium)",semibold:"var(--fontWeight-semibold)",bold:"var(--fontWeight-bold)"},lineHeight:{none:"var(--lineHeight-none)",tight:"var(--lineHeight-tight)",snug:"var(--lineHeight-snug)",normal:"var(--lineHeight-normal)",relaxed:"var(--lineHeight-relaxed)",loose:"var(--lineHeight-loose)"},borderRadius:{sm:"var(--borderRadius-sm)",md:"var(--borderRadius-md)",lg:"var(--borderRadius-lg)"},boxShadow:{sm:"var(--boxShadow-sm)",default:"var(--boxShadow-default)",md:"var(--boxShadow-md)",lg:"var(--boxShadow-lg)",xl:"var(--boxShadow-xl)"}};export{e0 as Badge,e8 as Button,e4 as ButtonGroup,e9 as Card,la as CardContent,ll as CardDescription,lt as CardFooter,e7 as CardHeader,le as CardTitle,lu as Carousel,ly as Checkbox,lv as CircularProgress,lI as ConfirmAction,l$ as ContentState,lj as CopyTypography,aN as DEFAULT_SEPARATOR,af as DEFAULT_SYMBOL,aw as DESCRIPTION_ROOT_CLASSNAME,lG as DashboardLayout,l1 as DataGrid,ad as DataGridActionCell,am as DataGridSortHeader,ab as DataList,aD as Description,aI as Dialog,aP as Drawer,l2 as DropdownMenu,aa as DropdownMenuCheckboxItem,ae as DropdownMenuContent,l5 as DropdownMenuGroup,al as DropdownMenuItem,ar as DropdownMenuLabel,l8 as DropdownMenuPortal,l4 as DropdownMenuRadioGroup,at as DropdownMenuRadioItem,as as DropdownMenuSeparator,ai as DropdownMenuShortcut,l3 as DropdownMenuSub,l7 as DropdownMenuSubContent,l9 as DropdownMenuSubTrigger,l6 as DropdownMenuTrigger,lT as Image,aR as ImageCarousel,a$ as Input,aE as InputOTP,e3 as Label,aV as MaskField,aG as PageLayout,aY as Pagination,aQ as PeriodPicker,lA as Placeholder,F as Popover,lb as PopoverContent,B as PopoverTrigger,aZ as RadioGroup,a1 as RadioGroupItem,a3 as RangeInput,a4 as ScrollTopButton,tl as Select,tn as SelectContent,ta as SelectGroup,tc as SelectItem,to as SelectLabel,ti as SelectScrollDownButton,ts as SelectScrollUpButton,td as SelectSeparator,tr as SelectTrigger,tt as SelectValue,a2 as Slider,tm as Tabs,aH as TextField,lB as Tooltip,lD as Typography,lN as alignments,e1 as badgeVariants,e2 as buttonBaseClass,e6 as buttonSizes,e5 as buttonVariants,lf as colors,eK as createTheme,lx as displays,eJ as globalKeyframes,eU as globalStyle,eX as keyframes,eQ as style,eZ as styleVariants,lk as transforms,lH as useDashboard,lw as variants,th as vars,lC as weights};
|
|
1
|
+
import{Fragment as e,jsx as l,jsxs as t}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import r,{clsx as s}from"clsx";import{Root as n}from"@radix-ui/react-label";import{ArrowDownNarrowWide as i,ArrowDownUp as o,ArrowDownWideNarrow as c,Calendar1 as d,Check as _,ChevronDown as m,ChevronLeft as h,ChevronRight as u,ChevronUp as y,Circle as p,CircleIcon as g,Copy as v,Ellipsis as b,EllipsisVertical as f,PanelLeftClose as N,PanelLeftOpen as w,X as k}from"lucide-react";import x,{createContext as C,createElement as z,useCallback as S,useContext as D,useEffect as I,useId as T,useLayoutEffect as P,useMemo as F,useRef as M,useState as R}from"react";import L from"embla-carousel-react";import{Indicator as q,Root as A}from"@radix-ui/react-checkbox";import{Content as O,Popover as $,PopoverTrigger as B,Portal as j}from"@radix-ui/react-popover";import{Arrow as E,Content as H,Portal as V,Provider as W,Root as G,Trigger as Y}from"@radix-ui/react-tooltip";import{CheckboxItem as K,Content as J,Group as U,Item as X,ItemIndicator as Q,Label as Z,Portal as ee,RadioGroup as el,RadioItem as et,Root as ea,Separator as er,Sub as es,SubContent as en,SubTrigger as ei,Trigger as eo}from"@radix-ui/react-dropdown-menu";import{Virtuoso as ec}from"react-virtuoso";import{Close as ed,Content as e_,Description as em,Overlay as eh,Portal as eu,Root as ey,Title as ep,Trigger as eg}from"@radix-ui/react-dialog";import{Drawer as ev,Root as eb}from"vaul";import{OTPInput as ef}from"input-otp";import{useMask as eN}from"@react-input/mask";import{Indicator as ew,Item as ek,Root as ex}from"@radix-ui/react-radio-group";import{Range as eC,Root as ez,Thumb as eS,Track as eD}from"@radix-ui/react-slider";import{Content as eI,Group as eT,Icon as eP,Item as eF,ItemIndicator as eM,ItemText as eR,Label as eL,Portal as eq,Root as eA,ScrollDownButton as eO,ScrollUpButton as e$,Separator as eB,Trigger as ej,Value as eE,Viewport as eH}from"@radix-ui/react-select";import{Content as eV,List as eW,Tabs as eG,Trigger as eY}from"@radix-ui/react-tabs";import{Controller as eK,FormProvider as eJ,useController as eU,useFieldArray as eX,useForm as eQ,useFormContext as eZ,useWatch as e1}from"react-hook-form";import{createTheme as e0,globalKeyframes as e2,globalStyle as e6,keyframes as e5,style as e8,styleVariants as e3}from"@vanilla-extract/css";var e4={default:"default__1af895x1",secondary:"secondary__1af895x2",destructive:"destructive__1af895x3",outline:"outline__1af895x4"};function e9({className:e,variant:t="default",asChild:r=!1,...n}){return l(r?a:"span",{"data-slot":"badge",className:s("style__1af895x0",e4[t],e),...n})}var e7="style__1ersxw10",le={sm:"sm__1ersxw19",md:"md__1ersxw1a",lg:"lg__1ersxw1b",icon:"icon__1ersxw1c",iconSm:"iconSm__1ersxw1d"},ll={default:"default__1ersxw14",destructive:"destructive__1ersxw15",outline:"outline__1ersxw16",ghost:"ghost__1ersxw17",link:"link__1ersxw18"};let lt=({className:e,variant:t="default",size:r="md",asChild:n=!1,isLoading:i=!1,fullWidth:o,...c})=>l(n?a:"button",{className:s(e7,ll[t],le[r],{style__1ersxw13:o,style__1ersxw12:i},e),...c}),la=({className:e,disabled:t,...a})=>l(n,{className:s("style__c31e140",{style__c31e141:t},e),...a}),lr=({value:e,onChange:a,options:r,size:n,className:i,label:o,multiple:c})=>{let d=!0===c;return t("div",{className:s("style__1iqvz720",i),children:[o&&l(la,{className:"style__1iqvz723",children:o}),l("div",{className:"style__1iqvz721",children:r.map(t=>{var r;return l(lt,{size:n,className:"style__1iqvz722",disabled:t.disabled,onClick:()=>{var l;return l=t.value,void(d?e.includes(l)?a(e.filter(e=>e!==l)):a([...e,l]):a(l))},variant:(r=t.value,d?e.includes(r):e===r)?"default":"outline",children:t.label},t.value)})})]})},ls=({className:e,...t})=>l("div",{className:s("style__oyalw00",e),...t}),ln=({className:e,...t})=>l("div",{className:s("style__oyalw01",e),...t}),li=({className:e,...t})=>l("h3",{className:s("style__oyalw02",e),...t}),lo=({className:e,...t})=>l("p",{className:s("style__oyalw03",e),...t}),lc=({className:e,...t})=>l("div",{className:s("style__oyalw04",e),...t}),ld=({className:e,...t})=>l("div",{className:s("style__oyalw05",e),...t}),l_=x.createContext(null);function lm(){let e=x.useContext(l_);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}var lh={horizontal:"horizontal__2d6ocq3",vertical:"vertical__2d6ocq4"};function lu({className:a,...r}){let{orientation:n="horizontal",canScrollNext:i,scrollNext:o,canScrollPrev:c,scrollPrev:d}=lm();return t(e,{children:[l("button",{className:s("style__2d6ocq1 style__2d6ocq0",lh[n]),type:"button","data-slot":"carousel-next",disabled:!i,onClick:o,...r,children:"horizontal"===n?l(u,{}):l(m,{})}),l("button",{type:"button",className:s("style__2d6ocq2 style__2d6ocq0",lh[n]),"data-slot":"carousel-previous",disabled:!c,onClick:d,...r,children:"horizontal"===n?l(h,{}):l(y,{})})]})}var ly={horizontal:"horizontal__i1lems1",vertical:"vertical__i1lems2"};function lp(e){let{carouselRef:t,orientation:a="horizontal"}=lm();return l("div",{className:"style__i1lems0",ref:t,"data-slot":"carousel-content",children:l("div",{className:ly[a],...e})})}var lg={horizontal:"horizontal__e2zpp61 style__e2zpp60",vertical:"vertical__e2zpp62 style__e2zpp60"},lv={horizontal:"horizontal__e2zpp64 style__e2zpp63",vertical:"vertical__e2zpp65 style__e2zpp63"};let lb=({api:e,orientation:t})=>{let{selectedIndex:a,scrollSnaps:r,onDotButtonClick:n}=(e=>{let[l,t]=R(0),[a,r]=R([]),s=S(l=>{e&&e.scrollTo(l)},[e]),n=S(e=>{e&&r(e.scrollSnapList())},[]),i=S(e=>{e&&t(e.selectedScrollSnap())},[]);return I(()=>{e&&(n(e),i(e),e.on("reInit",n).on("reInit",i).on("select",i))},[e,n,i]),{selectedIndex:l,scrollSnaps:a,onDotButtonClick:s}})(e);return l("div",{className:lg[t],children:r.map((e,r)=>l("button",{type:"button",className:s(lv[t],{style__e2zpp66:r===a}),onClick:()=>n(r)},e))})};function lf(e){return l("div",{className:"style__1gif6yr0",role:"group","aria-roledescription":"slide","data-slot":"carousel-item",...e})}function lN({width:e="100%",height:a="100%",...r}){let{canScrollNext:n,canScrollPrev:i,scrollNext:o,scrollPrev:c,api:d,opts:_,orientation:m,carouselRef:h,handleKeyDown:u,data:y,isShowButtons:p,isShowDots:g}=(({orientation:e="horizontal",opts:l,setApi:t,plugins:a,data:r,showDots:s,showArrows:n})=>{let[i,o]=L({...l,axis:"horizontal"===e?"x":"y"},a),[c,d]=R(!1),[_,m]=R(!1),h=!!(n&&r.length>1),u=!!(s&&r.length>1),y=S(e=>{e&&(d(e.canScrollPrev()),m(e.canScrollNext()))},[]),p=S(e=>{o&&o.scrollTo(e)},[o]),g=S(()=>{o?.scrollPrev()},[o]),v=S(()=>{o?.scrollNext()},[o]),b=S(e=>{"ArrowLeft"===e.key?(e.preventDefault(),g()):"ArrowRight"===e.key&&(e.preventDefault(),v())},[g,v]);return I(()=>{o&&t&&t(o)},[o,t]),I(()=>{if(o)return y(o),o.on("reInit",y),o.on("select",y),()=>{o?.off("select",y)}},[o,y]),{carouselRef:i,api:o,scrollPrev:g,scrollNext:v,canScrollPrev:c,canScrollNext:_,handleKeyDown:b,opts:l,orientation:e,onDotButtonClick:p,isShowButtons:h,isShowDots:u,data:r}})(r);return l(l_.Provider,{value:{carouselRef:h,api:d,opts:_,orientation:m||(_?.axis==="y"?"vertical":"horizontal"),scrollPrev:c,scrollNext:o,canScrollPrev:i,canScrollNext:n},children:t("div",{onKeyDownCapture:u,className:s("Carousel__1jbydv50",r.className),"data-slot":"carousel",style:{width:e,height:a},children:[l(lp,{style:{width:e,height:a},children:y.map(e=>l(lf,{children:r.renderItem(e)},`${e[r.keyId]}`))}),p&&l(lu,{}),g&&l(lb,{api:d,orientation:m})]})})}let lw=({className:e,...t})=>l(A,{className:s("style__b7yo4k0",e),...t,children:l(q,{className:"style__b7yo4k1",children:l(_,{className:"style__b7yo4k2"})})});var lk={determinate:"determinate__m6b9n25",indeterminate:"indeterminate__m6b9n26"},lx={primary:"primary__m6b9n27",secondary:"secondary__m6b9n28",inherit:"inherit__m6b9n29"};let lC=({size:e=30,thickness:a=2.6,color:s="primary",value:n=0,variant:i="indeterminate",className:o})=>{let c=(e-a)/2,d=2*Math.PI*c;return l("div",{className:r("style__m6b9n22",lk[i],lx[s],o),style:{width:e,height:e},children:t("svg",{className:"style__m6b9n23",viewBox:`0 0 ${e} ${e}`,children:[l("title",{children:"Progress bar"}),l("circle",{className:r("style__m6b9n24","determinate"===i&&lk.determinate),cx:e/2,cy:e/2,r:c,fill:"none",strokeWidth:a,strokeDasharray:d,strokeDashoffset:"determinate"===i?d*(1-n/100):.25*d})]})})},lz=({className:e,align:t="center",sideOffset:a=4,...r})=>l(j,{children:l(O,{align:t,sideOffset:a,className:s("style__1xy4jvu2",e),...r})});var lS={left:"left__1sba6zok",center:"center__1sba6zol",right:"right__1sba6zom",justify:"justify__1sba6zon"},lD={primary:"primary__1sba6zoc",secondary:"secondary__1sba6zod",disabled:"disabled__1sba6zoe",success:"success__1sba6zof",error:"error__1sba6zog",warning:"warning__1sba6zoh",info:"info__1sba6zoi",muted:"muted__1sba6zoj"},lI={h1:"h1__1sba6zo0",h2:"h2__1sba6zo1",h3:"h3__1sba6zo2",h4:"h4__1sba6zo3",h5:"h5__1sba6zo4",h6:"h6__1sba6zo5",subtitle1:"subtitle1__1sba6zo6",subtitle2:"subtitle2__1sba6zo7",body1:"body1__1sba6zo8",body2:"body2__1sba6zo9",caption:"caption__1sba6zoa",overline:"overline__1sba6zob"},lT={lowercase:"lowercase__1sba6zou",uppercase:"uppercase__1sba6zov",capitalize:"capitalize__1sba6zow"},lP={block:"block__1sba6zoo",inline:"inline__1sba6zop"},lF={none:"none__1sba6zox",underline:"underline__1sba6zoy",lineThrough:"lineThrough__1sba6zoz"},lM={normal:"normal__1sba6zoq",medium:"medium__1sba6zor",semibold:"semibold__1sba6zos",bold:"bold__1sba6zot"};let lR={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",caption:"span",overline:"span"},lL=({className:e,variant:t="body1",component:a,color:r="primary",align:n="left",display:i="inline",weight:o="normal",transform:c,decoration:d="none",gutterBottom:_,children:m,...h})=>l(a||lR[t||"body1"],{className:s(lF[d],lI[t],lD[r],lM[o],c&&lT[c],lP[i],lS[n],{style__1sba6zo10:_},e),...h,children:m}),lq=e=>{let{open:a,onActionComponentClick:r,onCancel:n,confirmButtonProps:i,onOpenChange:o}=(({skipConfirm:e,onConfirm:l,confirmButtonProps:t})=>{let[a,r]=R(!1);return{open:a,onActionComponentClick:()=>{e?l():r(!0)},confirmButtonProps:{variant:t?.isAccented?"destructive":"default",size:"sm",onClick:()=>{r(!1),l()}},onCancel:()=>{r(!1)},onOpenChange:e=>{r(e)}}})(e),{text:c,confirmButtonProps:d,popoverProps:_,actionComponent:m}=e,{text:h="Подтвердить"}=d||{},{side:u="bottom",align:y="center"}=_||{};return t($,{open:a,onOpenChange:o,children:[l(B,{asChild:!0,children:m({onClick:r})}),l(lz,{side:u,align:y,className:s("style__1q1uhgp2",{style__1q1uhgp3:!!c}),children:t("div",{className:"style__1q1uhgp1",children:[c&&l(lL,{children:c}),t("div",{className:"style__1q1uhgp0",children:[l(lt,{size:"sm",variant:"ghost",onClick:n,children:"Отмена"}),l(lt,{...i,children:h})]})]})})]})};var lA={sm:"sm__1o97kvm1",md:"md__1o97kvm2",lg:"lg__1o97kvm3"};let lO=e=>l("img",{alt:e.alt,src:e.src,className:r("style__1o97kvm0",lA[e.size||"md"],e.className),width:e.width,height:e.height}),l$={sm:"239px",md:"323px",lg:"458px"},lB={sm:"119px",md:"161px",lg:"229px"},lj={sm:"384px",md:"400px",lg:"460px"},lE={sm:"subtitle1",md:"h6",lg:"h5"};var lH={sm:"sm__1nenzg01",md:"md__1nenzg02",lg:"lg__1nenzg03"};let lV=({className:e,title:a,imgSrc:s,imgAlt:n,description:i,actions:o,size:c="sm",renderImage:d})=>{let _=F(()=>d||lO,[d]);return t("div",{className:r("style__1nenzg00",lH[c],e),children:[t("div",{className:"style__1nenzg04",style:{maxWidth:lj[c]},children:[s&&l(_,{src:s,alt:n,width:l$[c],height:lB[c],size:c}),l(lL,{align:"center",color:"secondary",variant:lE[c],children:a}),i&&l(lL,{className:"style__1nenzg05",component:"div",variant:"body1",children:i})]}),o&&l("footer",{className:"style__1nenzg06",children:o})]})},lW=({isLoading:e,isError:t,isCustom:a,errorState:r,customState:s,children:n,loadingContent:i=l(lC,{color:"primary"})})=>{if(e)return l("div",{className:"style__nan0ao0",children:i});if(a&&s)return l(lV,{...s});if(t&&r){let{title:e="Произошла ошибка",imgAlt:t,imgSrc:a,errorList:s,onRetry:n,actions:i=l(lt,{onClick:n,children:"Попробовать снова"})}=r,o=s.map(e=>l(lL,{component:"p",children:e},e));return l(lV,{title:e,description:o,imgAlt:t,imgSrc:a,actions:i})}return n},lG=({sideOffset:e=4,alignOffset:t,ref:a,...r})=>l(H,{ref:a,sideOffset:e,...r}),lY=({text:e,content:a,children:s,side:n="top",sideOffset:i,alignOffset:o,delayDuration:c=0,className:d,ref:_,...m})=>l(W,{delayDuration:c,children:t(G,{...m,children:[l(Y,{ref:_,asChild:!0,children:s}),a||e?l(V,{children:t(lG,{className:r("style__izacrl2",d),alignOffset:o,sideOffset:i,hideWhenDetached:!0,side:n,children:[a??l("p",{className:"style__izacrl3",children:e}),m.arrow&&l(E,{className:"style__izacrl4"})]})}):null]})}),lK=e=>{let{children:a,copyPosition:r="right",copyText:n,isShowCopyText:i,color:o,className:c,...d}=e,_=()=>l(v,{className:"style__1wpx85c1"}),{tooltipOpen:m,handleMouseEnter:h,handleMouseLeave:u,handleClick:y,tooltipTitle:p,isIconOnLeft:g}=(({children:e,copyText:l,isShowCopyText:t,copyPosition:a})=>{let[r,s]=R("Скопировать"),[n,i]=R(!1);return{handleMouseLeave:()=>{"Скопировать"!==r&&setTimeout(()=>{s("Скопировать")},100),i(!1)},handleClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(l||("string"==typeof e?e:"")).then(()=>s("Скопировано")).catch(()=>s("Ошибка копирования"))},tooltipTitle:t?`${r}: ${l}`:r,isIconOnLeft:"left"===a,tooltipOpen:n,handleMouseEnter:()=>{i(!0)}}})(e);return l(lY,{open:m,arrow:!0,text:p,side:"bottom",children:t(lL,{onMouseLeave:u,onMouseEnter:h,onClick:y,component:"div",color:o,className:s("style__1wpx85c0",c),...d,children:[g&&_(),a,!g&&_()]})})},lJ=C({pinned:!0,hovered:!1,togglePinned:()=>{}}),lU=()=>D(lJ),lX="16rem",lQ=({children:e,className:t})=>{let{pinned:a,togglePinned:r}=(()=>{let[e,l]=((e,l,t)=>{if(void 0===window)return[l,()=>{},()=>{}];if(!e)throw Error("useLocalStorage key may not be falsy");let a=JSON.parse,r=M(e=>{try{let t=(0,JSON.stringify),r=localStorage.getItem(e);if(null!==r)return a(r);return l&&localStorage.setItem(e,t(l)),l}catch{return l}}),[s,n]=R(()=>r.current(e));P(()=>n(r.current(e)),[e]);let i=S(l=>{try{let r,i="function"==typeof l?l(s):l;if(void 0===i)return;r=t?t.raw?"string"==typeof i?i:JSON.stringify(i):t.serializer?t.serializer(i):JSON.stringify(i):JSON.stringify(i),localStorage.setItem(e,r),n(a(r))}catch{}},[e,n]);return[s,i,S(()=>{try{localStorage.removeItem(e),n(void 0)}catch{}},[e,n])]})("dashboard::pinned",!1);return{pinned:e,togglePinned:()=>l(!e)}})();return l(lJ.Provider,{value:{pinned:a,togglePinned:r},children:l("div",{className:s("DashboardLayout__113u7x50",t),children:e})})};function lZ({row:e,column:t,rowIndex:a,height:r}){let{align:n,cellColor:i,isDisabled:o}=t;return l("td",{align:n??"left",style:{backgroundColor:i?.(e),height:r,width:t.width},className:s("style__1047swj0",{style__1047swj1:o},t.cellClassName?.(e)),children:l(()=>t.renderCell?t.renderCell(e,a):t.format?t.format(e)||"—":t.field?`${e[t.field]||"—"}`:"—",{})})}function l1({row:e,rowHeight:t,onRowClick:a,columns:r,rowIndex:n,rowId:i}){let o=S(()=>{a?.(e)},[a,e]);return l("tr",{onClick:o,onKeyDown:o,className:s("style__gsm9mv0",{style__gsm9mv1:!!a}),children:r.map((a,r)=>l(lZ,{row:e,rowIndex:n,column:a,height:t},`${i}-${r}`))})}function l0({isLoading:e,isEmpty:t,columnsLength:a,emptyState:r={text:"Нет данных"},errorState:s={text:"Произошла ошибка"},isError:n,onRetry:i}){let o=({children:e})=>l("tr",{className:"style__15m2ib80",children:l("td",{colSpan:a,align:"center",children:e})});if(e)return l(o,{children:l("span",{className:"style__15m2ib81",children:l(lC,{})})});if(t){let{imgSrc:e,imgAlt:t,text:a}=r;return l(o,{children:l(lV,{title:a,imgSrc:e,imgAlt:t})})}if(n){let{imgSrc:e,imgAlt:t,text:a}=s;return l(o,{children:l(lV,{title:a,imgSrc:e,imgAlt:t,actions:i?l(lt,{variant:"outline",onClick:i,children:"Попробовать снова"}):void 0})})}return null}lQ.Sidebar=({width:e=lX,header:a,footer:r,content:n,className:i})=>{let{pinned:o}=lU();return t("div",{style:{width:o?e:0},className:"style__1low90p0",children:[l("span",{className:"SidebarTrigger__1low90p1"}),t("aside",{style:{width:e},className:s("SidebarContainer__1low90p2",{style__1low90p3:!o},i),children:[a&&l("header",{className:"SidebarHeader__1low90p4",children:a}),l("div",{className:"SidebarContent__1low90p6",children:n}),r&&l("footer",{className:"SidebarFooter__1low90p5",children:r})]})]})},lQ.Main=({children:e,className:t})=>l("main",{className:s("style__whkxou0",t),children:e});var l2="style__82af400";function l6({isError:e,isLoading:t,emptyState:a,errorState:r,columns:s,rows:n,rowHeight:i,keyId:o,onRowClick:c}){let d=0===n.length;return e||t||d?l("tbody",{className:l2,children:l(l0,{emptyState:a,errorState:r,isEmpty:d,isError:e,isLoading:t,columnsLength:s.length})}):l("tbody",{className:l2,children:n.map((e,t)=>{let a=String(e[o]);return l(l1,{row:e,rowId:a,rowHeight:i,columns:s,onRowClick:c,rowIndex:t},e[o])})})}function l5({children:e,className:t}){return l("footer",{className:s("style__2s55b60",t),children:e})}function l8({column:e,height:t,width:a}){return l("th",{style:{color:e.color,height:t,width:a},align:e.align??"left",title:e.title,className:"style__uma6hu0",children:e.renderHeaderCell?.(e)||e.title})}function l3({columns:e,height:t,sticky:a}){return l("thead",{children:l("tr",{className:s({style__fkgoub0:a}),children:e.map(e=>l(l8,{column:e,height:t,width:e.width},e.title))})})}function l4({rows:e,columns:a,height:r="100%",className:n,rowHeight:i=40,headerHeight:o=40,keyId:c,onRowClick:d,isLoading:_,isDisabled:m,isError:h,emptyState:u,errorState:y,footer:p,title:g,stickyHeader:v,onRetry:b}){let f=_||h||0===e.length;return t("div",{"data-slot":"data-grid",style:{height:r},className:s("style__1gqvluf0",n),children:[t("table",{className:s("style__1gqvluf1",{style__1gqvluf3:m,style__1gqvluf4:_,style__1gqvluf2:f},n),children:[g&&l("caption",{className:"style__1gqvluf5",children:g}),l(l3,{columns:a,height:o,sticky:v}),l(l6,{rows:e,columns:a,rowHeight:i,keyId:c,onRowClick:d,isLoading:_,emptyState:u,errorState:y,isError:h,onRetry:b})]}),p&&l(l5,{children:p})]})}var l9="style__1ib8wkt3";let l7=ea,te=eo,tl=U,tt=ee,ta=es,tr=el,ts=({className:e,inset:a,children:s,...n})=>t(ei,{className:r("style__1ib8wkt2",{inset:a},e),...n,children:[s,l(u,{className:l9})]}),tn=({className:e,...t})=>l(en,{className:r("style__1ib8wkt4",e),...t}),ti=({className:e,sideOffset:t=4,...a})=>l(ee,{children:l(J,{sideOffset:t,className:r("style__1ib8wkt5",e),...a})}),to=({className:e,inset:t,...a})=>l(X,{className:r("style__1ib8wkt6",{inset:t},e),...a}),tc=({className:e,children:a,checked:s,...n})=>t(K,{className:r("style__1ib8wkt7",e),checked:s,...n,children:[l("span",{className:"style__1ib8wkt9",children:l(Q,{children:l(_,{className:l9})})}),a]}),td=({className:e,children:a,...s})=>t(et,{className:r("style__1ib8wkt8",e),...s,children:[l("span",{className:"style__1ib8wkta",children:l(Q,{children:l(p,{className:l9})})}),a]}),t_=({className:e,inset:t,...a})=>l(Z,{className:r("style__1ib8wktb",{inset:t},e),...a}),tm=({className:e,...t})=>l(er,{className:r("style__1ib8wktc",e),...t}),th=({className:e,...t})=>l("span",{className:r("style__1ib8wktd",e),...t}),tu=t=>{let{tooltipProps:a}=(({action:e})=>{let{isLoading:l,disabledReason:t,name:a}=e,[r,s]=R(!1);return I(()=>{l&&s(!1)},[l]),{tooltipProps:{text:t||a,open:r,onOpenChange:e=>s(e)}}})(t),{action:r,onActionClick:s,isDisabled:n,tooltipPlacement:i}=t,{name:o,icon:c,needConfirm:d,confirmText:_,confirmButtonProps:m,disabled:h,isLoading:u,onClick:y}=r,p=e=>l(lY,{arrow:!0,side:i,...a,children:l(lt,{disabled:n||h,isLoading:u,variant:"ghost",size:"icon",...e,children:c})},o);return l(e,{children:d?l(lq,{text:_,confirmButtonProps:m,actionComponent:e=>p(e),onConfirm:s(y)}):p({onClick:s(y)})})},ty=({action:e,onActionClick:a,isDisabled:r,tooltipPlacement:s})=>{if("actions"in e){let{disabled:n,icon:i,name:o,disabledReason:c,actions:d,isLoading:_}=e;return t(l7,{children:[l(te,{asChild:!0,children:l(lY,{text:c||o,side:s,arrow:!0,children:l(lt,{variant:"ghost",size:"icon",isLoading:_,disabled:r||n,children:i})},o)}),l(ti,{children:d.map(({name:e,onClick:t,...r})=>z(to,{...r,key:e,asChild:!0},l(lt,{size:"sm",onClick:a(t),children:e})))})]})}return l(tu,{action:e,onActionClick:a,isDisabled:r,tooltipPlacement:s})},tp=({actions:e,onActionClick:a,tooltipPlacement:r,isDisabled:s})=>t(l7,{children:[l(te,{asChild:!0,children:l(lt,{disabled:s,variant:"ghost",size:"icon",children:l(f,{})})}),l(ti,{children:e.map(e=>{let{onClick:t,name:s,disabledReason:n,isLoading:i}=e;return l(to,{asChild:!0,children:l(lY,{arrow:!0,side:r,text:n,children:l(lt,{onClick:a(t),isLoading:i,variant:"ghost",size:"sm",fullWidth:!0,children:s})})},s)})})]}),tg=e=>{let{isDisabledAction:a,handleWrapperClick:r,handleActionClick:s}=(({row:e,actions:l})=>{let{main:t,secondary:a}=l,r=[...t,...a||[]].find(e=>e.isBlockingOperation&&e.isLoading);return{isDisabledAction:!!r,handleActionClick:S(l=>()=>{l?.(e)},[e]),handleWrapperClick:e=>{e.stopPropagation()}}})(e),{actions:n}=e,{main:i,secondary:o}=n;return t("div",{onClick:r,onKeyDown:r,className:"style__y44ln70",children:[i.map(e=>l(ty,{action:e,onActionClick:s,isDisabled:a,tooltipPlacement:"top"},e.name)),o&&l(tp,{actions:o,onActionClick:s,tooltipPlacement:"left",isDisabled:a})]})};var tv={left:"left__o752f01",center:"center__o752f02",right:"right__o752f03",justify:"justify__o752f04"};function tb({sorting:e,setSorting:a,column:{title:r,field:n,align:d="left"},className:_}){return n?t("button",{type:"button",className:s("style__o752f00",tv[d],_),onClick:()=>{e.key===n?a({key:n,order:"asc"===e.order?"desc":"asc"}):a({key:n,order:"asc"})},children:[r,e.key===n?"asc"===e.order?l(i,{size:16}):l(c,{size:16}):l(o,{size:16})]}):null}let tf="Вы достигли конца списка",tN=({endOfScrollMsg:e=tf})=>l("li",{className:"style__1syvw5e0",children:l(lL,{children:e})}),tw=({onRetry:e})=>t("li",{className:"style__qlujai0",children:[l(lL,{align:"center",children:"Ошибка загрузки"}),l(lt,{size:"sm",onClick:e,children:"Попробовать снова"})]}),tk=()=>l("li",{className:"style__111czea0",children:l(lC,{color:"primary"})}),tx=({noDataImgSrc:e})=>l(lV,{title:"Нет данных",imgSrc:e}),tC=({onClick:e,isVisible:t})=>l(lt,{onClick:e,size:"icon",variant:"outline",className:s("style__1jg5nd90",{style__1jg5nd91:t}),children:l(y,{})}),tz=({data:a,keyId:r,className:n,itemContent:i,noDataPlaceholder:o,endOfScrollMsg:c,errorState:d,isLoading:_,isError:m,isEndReached:h,onRetry:u,onEndReached:y,scrollTopIsDataChanged:p})=>{let g=M(null),[v,b]=R(!1),f=S(e=>{e.startIndex>2?b(!0):b(!1)},[]),N=S(()=>g.current?.scrollToIndex({index:0,align:"start",behavior:"smooth"}),[g]),w=S(()=>{!h&&y&&y()},[h,y]),k=!!a?.length;return k||_||m?(I(()=>{p&&g.current?.scrollToIndex({index:0,align:"start"})},[p,a]),t(lW,{isLoading:_&&!k,isError:m&&!k,errorState:d,children:[l(ec,{className:s("style__1ezen7g0",n),style:{height:"100%"},data:a,ref:g,overscan:30,endReached:w,rangeChanged:f,itemContent:(e,t)=>l("li",{children:i?.(t,{index:e,className:s("style__1ezen7g1","datalist_item")})},t[r]),components:{Footer:()=>t(e,{children:[_&&l(tk,{}),m&&l(tw,{onRetry:u}),h&&l(tN,{endOfScrollMsg:c})]})}}),l(tC,{isVisible:v,onClick:N})]})):o?l(e,{children:o}):l(tx,{})},tS=":",tD="—",tI="descriptionRoot",tT=C({leader:!1,separator:tS,direction:"default"}),tP=({children:e,leader:t,separator:a,direction:r})=>l(tT.Provider,{value:{leader:t,separator:a,direction:r},children:e});var tF={row:"row__1lociyw1",column:"column__1lociyw2"},tM={spaceBetween:"spaceBetween__1lociyw3",start:"start__1lociyw4"},tR="style__sdcsnp2";let tL=e=>{let{descriptionContextProviderProps:t,direction:a}=(({direction:e="row",separator:l=tS})=>({descriptionContextProviderProps:{separator:"column"===e?"":l},direction:e}))(e),{justifyContent:r="start",component:n="dl",children:i,leader:o=!1,className:c}=e;return l(tP,{leader:o,direction:a,...t,children:l(n,{className:s("style__1lociyw0",tF[a],tM[r],tI,c),children:i})})};tL.Name=({children:a,color:r="secondary",...n})=>{let{leader:i,separator:o}=D(tT);return t(e,{children:[l("dt",{className:s("style__1tsgk1i0",{style__1tsgk1i1:i}),children:t(lL,{...n,color:r,children:[a,!i&&o]})}),i&&l("div",{className:"style__1tsgk1i2"})]})},tL.Value=e=>{let{valueToRender:t,isDefaultValueRender:a,leader:s}=(({canCopy:e,children:l,stub:t="—"})=>{let{leader:a,direction:r}=D(tT);return{valueToRender:l||t,isDefaultValueRender:!e||!l,leader:a,direction:r}})(e),{copyPosition:n="right",copyText:i,canCopy:o,children:c,stub:d,..._}=e;return a?l(lL,{className:r("style__sdcsnp1",{[tR]:s}),component:"dd",..._,children:t}):l("dd",{className:"style__sdcsnp0",children:l(lK,{className:r({[tR]:s}),copyPosition:n,copyText:i,..._,children:t})})};let tq=({title:e,description:a="",trigger:s,className:n,footer:i,children:o,...c})=>t(ey,{...c,children:[s&&l(eg,{asChild:!0,children:s}),t(eu,{children:[l(eh,{className:r("style__8bkmbe2")}),t(e_,{className:r("style__8bkmbe5",n),children:[t("div",{className:r("style__8bkmbe8",{style__8bkmbe9:!!a}),children:[l(ep,{className:"style__8bkmbeb",children:e}),l(em,{className:"style__8bkmbec",children:a}),c.onOpenChange&&t(ed,{className:"style__8bkmbe6",children:[l(k,{size:24}),l("span",{className:"style__8bkmbe7",children:"Close"})]})]}),o,i&&l("div",{className:"style__8bkmbea",children:i})]})]})]}),tA=({children:e,trigger:a,className:r,title:n,description:i="",footer:o,closeButton:c,...d})=>t(eb,{...d,children:[a&&l(ev.Trigger,{"data-slot":"drawer-trigger",asChild:!0,children:a}),t(ev.Portal,{"data-slot":"drawer-portal",children:[l(ev.Overlay,{"data-slot":"drawer-overlay",className:s("style__ccss502",r)}),t(ev.Content,{"data-slot":"drawer-content",className:s("group/drawer-content","style__ccss503",r),children:[l("div",{className:"style__ccss504"}),t("div",{"data-slot":"drawer-header",className:s("style__ccss505",r),children:[l(ev.Title,{"data-slot":"drawer-title",className:s("style__ccss507",r),children:n}),l(ev.Description,{"data-slot":"drawer-description",className:s("style__ccss508",r),children:i})]}),e,t("div",{"data-slot":"drawer-footer",className:s("style__ccss506",r),children:[o,c&&l(ev.Close,{"data-slot":"drawer-close",asChild:!0,children:c})]})]})]})]});var tO="style__a5l83v0",t$="style__a5l83v4";let tB=({images:a=[],autoPlay:r=!1,interval:n=5e3})=>{let[i,o]=R(0);return(I(()=>{if(!r)return;let e=setInterval(()=>{o(e=>e===a.length-1?0:e+1)},n);return()=>clearInterval(e)},[r,a.length,n]),0===a.length)?l("div",{className:tO,children:"Нет изображений для отображения"}):t("div",{className:tO,children:[l("div",{className:"style__a5l83v1",style:{transform:`translateX(-${100*i}%)`},children:a.map((e,t)=>l("div",{className:"style__a5l83v2",children:l("img",{src:e.src,alt:e.alt||`Slide ${t+1}`,className:"style__a5l83v3"})},e.src))}),a.length>1&&t(e,{children:[l("button",{type:"button",className:s(t$,"style__a5l83v5"),onClick:()=>{o(e=>0===e?a.length-1:e-1)},children:l(h,{size:24})}),l("button",{type:"button",className:s(t$,"style__a5l83v6"),onClick:()=>{o(e=>e===a.length-1?0:e+1)},children:l(u,{size:24})}),l("div",{className:"style__a5l83v7",children:a.map(({src:e},t)=>l("button",{type:"button",className:`style__a5l83v8 ${i===t?"active":""}`,onClick:()=>{o(t)}},e))})]})]})};var tj={sm:"sm__1blk89u9",md:"md__1blk89ua",lg:"lg__1blk89ub"},tE="style__1blk89uc",tH={outlined:"outlined__1blk89u1",standard:"standard__1blk89u2"},tV="style__1blk89u6";let tW=({error:e,variant:a="outlined",size:r="md",startAdornment:n,endAdornment:i,className:o,disabled:c,fullWidth:d,value:_,ref:m,...h})=>t("div",{className:s("Input__1blk89u0",tH[a],{style__1blk89u7:e},{[tV]:c},{style__1blk89u3:d},o),children:[n&&l("span",{className:tE,children:n}),l("input",{className:s("style__1blk89u8",tj[r],{[tV]:c,style__1blk89ud:!!n,style__1blk89ue:!!i}),ref:m,disabled:c,value:_||"",...h}),i&&l("span",{className:tE,children:i})]}),tG=({separator:e="•",...t})=>l("div",{...t,children:l("span",{className:"style__te1pgr0",children:e})}),tY=({char:e,hasFakeCaret:a,isActive:r,...n})=>t("div",{className:s("style__rtks2g0",{style__rtks2g1:r}),...n,children:[e,a&&l("div",{className:"style__rtks2g2",children:l("div",{className:"style__rtks2g4"})})]});var tK="style__1iixe0l2";let tJ=({className:a,containerClassName:r,disabled:n,...i})=>l(ef,{containerClassName:s("style__1iixe0l0",{style__1iixe0l3:n},r),className:s("style__1iixe0l1",a),render:({slots:a})=>a.length%2!=0?l("div",{className:tK,children:a.map((e,t)=>l(tY,{...e},`${t}-${e.char}`))}):t(e,{children:[l("div",{className:tK,children:a.slice(0,a.length/2).map((e,t)=>l(tY,{...e},`${t}-${e.char}`))}),l(tG,{}),l("div",{className:tK,children:a.slice(a.length/2).map((e,t)=>l(tY,{...e},`${t}-${e.char}`))})]}),...i}),tU=({label:e,helperText:a,className:r,disabled:n,fullWidth:i,ref:o,labelClassName:c,...d})=>t("div",{className:s("style__kqu4y20",{style__kqu4y25:i},r),children:[e&&l(la,{htmlFor:d.id||e,disabled:n,className:s("style__kqu4y21",c),children:e}),l(tW,{ref:o,disabled:n,fullWidth:i,id:d.id||e,...d}),a&&l(lL,{variant:"caption",className:s("style__kqu4y22",{style__kqu4y24:d.error,style__kqu4y23:n}),children:a})]}),tX=({maskProps:e,...t})=>l(tU,{ref:eN(e),...t}),tQ=({children:e,className:t})=>l("div",{className:s("style__adrl250",t),children:e});tQ.Header=e=>{let{title:a,subtitle:r,breadcrumbs:n,actions:i,backButton:o,className:c}=e,{pinned:d,togglePinned:_}=lU();return I(()=>{"string"==typeof a&&(document.title=a)},[a]),t("header",{className:s("page_header","style__nvcxbd1",c),children:[t("div",{className:"style__nvcxbd2",children:[l(lY,{text:d?"Развернуть":"Свернуть",children:l(lt,{variant:"ghost",size:"icon",onClick:_,children:d?l(w,{}):l(N,{})})}),o&&l(lY,{text:"Назад",children:l(lt,{...o,variant:"ghost",children:l(h,{})})})]}),n&&l("div",{className:"Breadcrumbs__nvcxbd0",children:n}),l("div",{className:"style__nvcxbd3",children:i}),"string"==typeof a?l(lL,{className:"style__nvcxbd4",component:"h1",variant:"h3","aria-level":1,children:a}):l("div",{className:"style__nvcxbd5",children:a}),r&&"string"==typeof r&&l(lL,{className:"style__nvcxbd6","aria-level":2,children:r}),r&&"string"!=typeof r&&l("div",{className:"style__nvcxbd7",children:r})]})},tQ.Content=e=>{let{className:t,children:a,isFullHeight:r=!0}=e;return l("article",{className:s("page-content","style__1hr0uh00",{style__1hr0uh01:r},t),children:a})},tQ.Footer=e=>{let{children:t,className:a}=e;return l("footer",{className:s("style__1bd8jnw0",a),children:t})},tQ.Aside=({children:e,className:t})=>l("aside",{className:s("PageLayoutAside__1un4hm80",t,"page_aside"),children:e});let tZ=(e,l)=>Array.from({length:l-e+1},(l,t)=>t+e);function t1(e){let{onPageChange:a,totalCount:r,siblingCount:s=1,currentPage:n,pageSize:i,size:o="icon"}=e,c=(({totalCount:e,pageSize:l,siblingCount:t=1,currentPage:a})=>F(()=>{if(l<=0||e<=0)return[];let r=Math.ceil(e/l);if(t+5>=r)return tZ(1,r);let s=Math.max(a-t,1),n=Math.min(a+t,r),i=s>2,o=n<r-2;return!i&&o?[...tZ(1,3+2*t),null,r]:i&&!o?[1,null,...tZ(r-(3+2*t)+1,r)]:i&&o?[1,null,...tZ(s,n),null,r]:[]},[e,l,t,a]))({currentPage:n,totalCount:r,siblingCount:s,pageSize:i});if(0===n||c&&c.length<2)return null;let d=c.at(-1);return t("nav",{className:"style__p708oq0",children:[l(lt,{variant:"ghost",size:o,onClick:()=>{a(n-1)},disabled:1===n,children:l(h,{})}),c?.map((e,t)=>e?l(lt,{size:o,variant:e===n?"default":"outline",onClick:()=>a(+e),children:e},`${e}${t.toString()}`):l("span",{className:"style__p708oq1",children:l(b,{})})),l(lt,{variant:"ghost",size:o,onClick:()=>{a(n+1)},disabled:n===d,children:l(u,{})})]})}let t0=["Янв.","Фев.","Мар.","Апр.","Май","Июн.","Июл.","Авг.","Сен.","Окт.","Ноя.","Дек."],t2=["I квартал","II квартал","III квартал","IV квартал"],t6=e=>Math.ceil(e/3);function t5({year:e,onSelect:a,minDate:r,maxDate:s}){let n=Array.from({length:s.getFullYear()-r.getFullYear()+1},(e,l)=>r.getFullYear()+l);return t(ao,{onValueChange:e=>{a?.(Number(e))},value:e.toString(),children:[l(a_,{children:l(ad,{placeholder:e.toString()})}),l(au,{children:n.map(e=>l(ap,{value:e.toString(),children:l(lL,{align:"center",variant:"subtitle1",transform:"capitalize",children:e})},e))})]})}let t8=e=>{let{label:a,disabled:r=!1,value:s,onSelect:n,type:i="month",placeholder:o="month"===i?"Выберите месяц":"Выберите квартал",error:c,helperText:_,max:m=new Date(2050,0,1),min:h=new Date(2e3,0,1),className:u,size:y,fullWidth:p,name:g}=e,v=new Date,[b,f]=R(!1),[N,w]=R(v.getFullYear()),k=e=>{n?.(e),f(!1)},x="month"===i?s?.toLocaleDateString("ru-RU",{month:"long",year:"numeric"}):s?`${t2[t6(s.getMonth())]} ${s.getFullYear()}`:"";return I(()=>{s&&w(s.getFullYear())},[s]),t($,{open:b,onOpenChange:f,children:[l(tU,{label:a,value:x,disabled:r,size:y,fullWidth:p,name:g,endAdornment:l(B,{asChild:!0,children:l(lt,{disabled:r,variant:"ghost",size:"icon",children:l(d,{})})}),placeholder:o,error:c,helperText:_,className:u}),l(lz,{align:"end",alignOffset:-10,side:"bottom",children:t("div",{className:"style__1izfmw30",children:[l(t5,{year:N,onSelect:w,minDate:h,maxDate:m}),"month"===i?l("div",{className:"style__1izfmw31",children:t0.map((e,t)=>{let a=new Date(N,t,s?.getDate()||1);return l(lt,{variant:s?.getMonth()===t&&s.getFullYear()===a.getFullYear()?"default":"ghost",disabled:a<h||a>m,onClick:()=>k(a),children:e},e)})}):l("div",{className:"style__1izfmw32",children:t2.map((e,t)=>{let a=new Date(N,3*t,1);return l(lt,{variant:s&&[t6(s.getMonth())===t,s.getFullYear()===a.getFullYear()].every(Boolean)?"default":"ghost",disabled:a<h||a>m,onClick:()=>k(a),children:e},e)})})]})})]})},t3=({className:e,...t})=>l(ex,{"data-slot":"radio-group",className:r("RadioGroup__ia95d10",e),...t}),t4=({className:e,label:a,...r})=>t("div",{className:"style__ia95d11",children:[l(ek,{"data-slot":"radio-group-item",id:r.id||r.value,className:s("style__ia95d12",e),...r,children:l(ew,{"data-slot":"radio-group-indicator",className:"style__ia95d13",children:l(g,{className:"style__ia95d14"})})}),l(la,{htmlFor:r.id||r.value,"data-slot":"radio-group-label",children:a})]});var t9="style__h9oy583";let t7=({className:e,...a})=>t(ez,{className:s("style__h9oy580",e),...a,children:[l(eD,{className:"style__h9oy581",children:l(eC,{className:"style__h9oy582"})}),l(eS,{className:t9}),a.value?.length===2&&l(eS,{className:t9})]});var ae={sm:"sm__1pnwkko2",md:"md__1pnwkko3",lg:"lg__1pnwkko4"},al="style__1pnwkko6",at="style__1pnwkko5";function aa({min:e,max:a,onChange:r,minValue:n,maxValue:i,width:o=150,label:c="",unit:d="",size:_="md",className:m,isActive:h,minInputRef:u,maxInputRef:y}){let{onMinValueChange:p,onMaxValueChange:g,minVal:v,maxVal:b,onKeyDown:f,onValueChange:N,onConfirm:w,id:k}=(({min:e,max:l,maxValue:t,minValue:a,onChange:r})=>{let s=T(),[n,i]=R(e),[o,c]=R(l);return I(()=>{i(a||e),c(t||l)},[a,t,e,l]),{id:s,minVal:n,maxVal:o,onValueChange:e=>{if(e[0]===e[1])return void r(e[0],e[1]);i(e[0]),c(e[1])},onMinValueChange:e=>{let{value:l}=e.target;Number.isNaN(+l)||i(+l)},onMaxValueChange:e=>{let{value:l}=e.target;Number.isNaN(l)||c(+l)},onKeyDown:t=>{"Enter"===t.key&&r(n>=e&&n<=l?n:e,o>=e&&o<=l?o:l)},onConfirm:e=>{r(e[0],e[1])}}})({min:e,max:a,maxValue:i,minValue:n,onChange:r});return t("div",{className:s("style__1pnwkko0",ae[_],{style__1pnwkko1:h},m),style:{width:o},children:[l(lL,{className:at,color:"disabled",variant:"body2",children:c}),l(lL,{className:at,color:"disabled",variant:"body2",children:"от"}),l("input",{className:al,type:"text",id:k,value:v,onChange:p,onKeyDown:f,ref:u}),l(lL,{className:at,color:"disabled",variant:"body2",children:"до"}),l("input",{className:al,type:"text",id:k,value:b,onChange:g,onKeyDown:f,ref:y}),l(lL,{className:at,color:"disabled",variant:"body2",children:d}),l("div",{className:"style__1pnwkko7",children:l(t7,{min:e,max:a,value:[Number(v),Number(b)],onValueChange:N,onValueCommit:w})})]})}function ar({onClick:e,variant:t="outline",...a}){let[r,n]=R(!1),i=()=>{window.scrollY>400?n(!0):n(!1)};return I(()=>(window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}),[]),l(lt,{type:"button",variant:t,className:s("style__1ou2vjc0",{style__1ou2vjc1:r}),onClick:e||(()=>{window.scrollTo({top:0,left:0,behavior:"auto"})}),...a,children:l(y,{})})}var as={sm:"sm__5ilg7o3",md:"md__5ilg7o4",lg:"lg__5ilg7o5"},an="style__5ilg7od",ai="style__5ilg7o6";let ao=eA,ac=eT,ad=eE,a_=({className:e,children:a,size:r="md",...n})=>t(ej,{className:s("style__5ilg7o2",as[r],e),...n,children:[a,l(eP,{asChild:!0,children:l(m,{className:"style__5ilg7oe"})})]}),am=({className:e,...t})=>l(e$,{className:s(ai,e),...t,children:l(y,{className:an})}),ah=({className:e,...t})=>l(eO,{className:s(ai,e),...t,children:l(m,{className:an})}),au=({className:e,children:a,position:r="popper",...n})=>l(eq,{children:t(eI,{className:s("style__5ilg7o7",e),position:r,...n,children:[l(am,{}),l(eH,{className:"style__5ilg7o8",children:a}),l(ah,{})]})}),ay=({className:e,...t})=>l(eL,{className:`style__5ilg7o9 ${e||""}`,...t}),ap=({className:e,children:a,...r})=>t(eF,{className:`style__5ilg7oa ${e||""}`,...r,children:[l("span",{className:"style__5ilg7ob",children:l(eM,{children:l(_,{className:an})})}),l(eR,{children:a})]}),ag=({className:e,...t})=>l(eB,{className:`style__5ilg7oc ${e||""}`,...t});var av={sm:"sm__hworoa2",md:"md__hworoa3",lg:"lg__hworoa4"};let ab=e=>l(eG,{...e});ab.Content=({className:e,...t})=>l(eV,{className:s("style__hworoa5",e),...t}),ab.List=({className:e,...t})=>l(eW,{className:s("style__hworoa0",e),...t}),ab.Trigger=({className:e,size:t="md",...a})=>l(eY,{className:s("style__hworoa1",av[t],e),...a});let af=({form:e,children:t,...a})=>l(eJ,{...e,children:l("form",{noValidate:!0,...a,children:t})});function aN({name:e,control:t,ref:a,...r}){return l(eK,{control:t,name:e,render:({field:e,fieldState:t})=>l(tX,{...r,...e,error:!!t.error,helperText:t.error?.message})})}let aw=({mode:e="onBlur",...l}={})=>eQ({...l,mode:e}),ak=({children:e,isLoading:t,...a})=>{let{formState:r}=eZ();return l(lt,{type:"submit",isLoading:t||r.isSubmitting,...a,children:e})};function ax({name:e,control:t,gridArea:a,...r}){return l(eK,{control:t,name:e,render:({field:e,fieldState:t})=>l(tU,{...r,...e,style:{gridArea:a},value:e.value||"",error:!!t.error,helperText:t.error?.message})})}var aC={colors:{primary:"var(--colors-primary)",secondary:"var(--colors-secondary)",warning:"var(--colors-warning)",error:"var(--colors-error)",success:"var(--colors-success)",border:"var(--colors-border)",info:"var(--colors-info)",background:{tooltip:"var(--colors-background-tooltip)",paper:"var(--colors-background-paper)",element:"var(--colors-background-element)",elementHover:"var(--colors-background-elementHover)",sidebar:"var(--colors-background-sidebar)"},foreground:{primary:"var(--colors-foreground-primary)",secondary:"var(--colors-foreground-secondary)"},text:{primary:"var(--colors-text-primary)",secondary:"var(--colors-text-secondary)",disabled:"var(--colors-text-disabled)",hint:"var(--colors-text-hint)"}},spacing:{1:"var(--spacing-1)",2:"var(--spacing-2)",3:"var(--spacing-3)",4:"var(--spacing-4)",5:"var(--spacing-5)",6:"var(--spacing-6)",8:"var(--spacing-8)",10:"var(--spacing-10)",12:"var(--spacing-12)",16:"var(--spacing-16)",20:"var(--spacing-20)"},fontSize:{xs:"var(--fontSize-xs)",sm:"var(--fontSize-sm)",base:"var(--fontSize-base)",lg:"var(--fontSize-lg)",xl:"var(--fontSize-xl)","2xl":"var(--fontSize-2xl)","3xl":"var(--fontSize-3xl)","4xl":"var(--fontSize-4xl)"},fontWeight:{normal:"var(--fontWeight-normal)",medium:"var(--fontWeight-medium)",semibold:"var(--fontWeight-semibold)",bold:"var(--fontWeight-bold)"},lineHeight:{none:"var(--lineHeight-none)",tight:"var(--lineHeight-tight)",snug:"var(--lineHeight-snug)",normal:"var(--lineHeight-normal)",relaxed:"var(--lineHeight-relaxed)",loose:"var(--lineHeight-loose)"},borderRadius:{sm:"var(--borderRadius-sm)",md:"var(--borderRadius-md)",lg:"var(--borderRadius-lg)"},boxShadow:{sm:"var(--boxShadow-sm)",default:"var(--boxShadow-default)",md:"var(--boxShadow-md)",lg:"var(--boxShadow-lg)",xl:"var(--boxShadow-xl)"}};export{e9 as Badge,lt as Button,lr as ButtonGroup,ls as Card,lc as CardContent,lo as CardDescription,ld as CardFooter,ln as CardHeader,li as CardTitle,lN as Carousel,lw as Checkbox,lC as CircularProgress,lq as ConfirmAction,lW as ContentState,lK as CopyTypography,tS as DEFAULT_SEPARATOR,tD as DEFAULT_SYMBOL,tI as DESCRIPTION_ROOT_CLASSNAME,lQ as DashboardLayout,l4 as DataGrid,tg as DataGridActionCell,tb as DataGridSortHeader,tz as DataList,tL as Description,tq as Dialog,tA as Drawer,l7 as DropdownMenu,tc as DropdownMenuCheckboxItem,ti as DropdownMenuContent,tl as DropdownMenuGroup,to as DropdownMenuItem,t_ as DropdownMenuLabel,tt as DropdownMenuPortal,tr as DropdownMenuRadioGroup,td as DropdownMenuRadioItem,tm as DropdownMenuSeparator,th as DropdownMenuShortcut,ta as DropdownMenuSub,tn as DropdownMenuSubContent,ts as DropdownMenuSubTrigger,te as DropdownMenuTrigger,af as Form,eK as FormController,aN as FormMaskField,eJ as FormProvider,ak as FormSubmitButton,ax as FormTextField,lO as Image,tB as ImageCarousel,tW as Input,tJ as InputOTP,la as Label,tX as MaskField,tQ as PageLayout,t1 as Pagination,t8 as PeriodPicker,lV as Placeholder,$ as Popover,lz as PopoverContent,B as PopoverTrigger,t3 as RadioGroup,t4 as RadioGroupItem,aa as RangeInput,ar as ScrollTopButton,ao as Select,au as SelectContent,ac as SelectGroup,ap as SelectItem,ay as SelectLabel,ah as SelectScrollDownButton,am as SelectScrollUpButton,ag as SelectSeparator,a_ as SelectTrigger,ad as SelectValue,t7 as Slider,ab as Tabs,tU as TextField,lY as Tooltip,lL as Typography,lS as alignments,e4 as badgeVariants,e7 as buttonBaseClass,le as buttonSizes,ll as buttonVariants,lD as colors,e0 as createTheme,lP as displays,e2 as globalKeyframes,e6 as globalStyle,e5 as keyframes,e8 as style,e3 as styleVariants,lT as transforms,lU as useDashboard,aw as useForm,eZ as useFormContext,eU as useFormController,eX as useFormFieldArray,e1 as useFormWatch,lI as variants,aC as vars,lM as weights};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@max-ts/kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"browser": "./src/index.ts",
|
|
5
5
|
"main": "./lib/index.mjs",
|
|
6
6
|
"module": "./lib/index.mjs",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"input-otp": "^1.4.2",
|
|
39
39
|
"lucide-react": "^0.542.0",
|
|
40
40
|
"react-day-picker": "^9.9.0",
|
|
41
|
+
"react-hook-form": "^7.62.0",
|
|
41
42
|
"react-virtuoso": "^4.14.0",
|
|
42
43
|
"vaul": "^1.1.2"
|
|
43
44
|
},
|
package/src/index.ts
CHANGED