@itcase/ui-web 1.10.2 → 1.10.3

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.
@@ -1 +1 @@
1
- "use strict";var e=require("./Response/img.js"),r=require("react/jsx-runtime"),a=require("react"),t=require("clsx"),o=require("@itcase/ui-core/hoc"),i=require("@itcase/ui-core/hooks"),s=require("../../Button_cjs_CDr9zTdB.js"),n=require("../../Group_cjs_CiLUYKP7.js"),l=require("../../primitives_cjs_ocTnUpml.js");require("@itcase/ui-core/utils"),require("../../Loader_cjs_nwF8h8Ku.js"),require("@itcase/common"),require("@rc-component/tooltip"),require("react-inlinesvg");const c={confirm:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Confirm),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},d={danger:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Danger),primaryButtonAppearance:"dangerPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"dangerPrimary",svgPathFill:"dangerPrimary"}},u={empty:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Empty),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},p={error:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Error),primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"errorPrimary",svgPathFill:"errorPrimary"}},y={fail:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Fail),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},m={nothingFound:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.NothingFound),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},f={refresh:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Refresh),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},x={success:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Success),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"accentPrimary",svgPathFill:"accentPrimary"}},g={...c,...u,...d,...f,...{unableLoadData:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.UnableLoadData),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},...m,...y,...p,...x,...{warning:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Warning),primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",svgFill:"warningPrimary",svgPathFill:"warningPrimary"}},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},S={appearance:g,setAppearance:e=>{S.appearance=e}},B=o.urlWithAssetPrefix(a.forwardRef(function(e,o){const{appearance:c,className:d,dataTestId:u,dataTour:p,width:y,height:m,title:f,desc:x,primaryButton:g,secondaryButton:B,showPrimaryButton:z=!0,showSecondaryButton:h=!0,before:X,after:T,isSkeleton:L,isBottomButton:P,onClickPrimaryButton:b,onClickSecondaryButton:A}=e,_=i.useAppearanceConfig(c,S),v=i.useDevicePropsGenerator(e,_),{fillClass:C,fillHoverClass:F,titleTextColor:w,titleTextSize:j,titleTextWeight:I,descTextColor:q,descTextSize:N,descTextWeight:$,borderColorClass:M,borderColorHoverClass:D,borderTypeClass:W,borderWidthClass:k,heightClass:E,imageSrc:H,primaryButtonAfter:Q,primaryButtonAppearance:R,primaryButtonBefore:G,primaryButtonFill:U,primaryButtonFillHover:O,primaryButtonLabel:J,primaryButtonLabelTextColor:K,primaryButtonLabelTextSize:V,primaryButtonShape:Y,primaryButtonSize:Z,primaryButtonWidth:ee,secondaryButtonAfter:re,secondaryButtonAppearance:ae,secondaryButtonBefore:te,secondaryButtonFill:oe,secondaryButtonFillHover:ie,secondaryButtonLabel:se,secondaryButtonLabelTextColor:ne,secondaryButtonLabelTextSize:le,secondaryButtonShape:ce,secondaryButtonSize:de,secondaryButtonWidth:ue,shapeClass:pe,svgFillClass:ye,SvgImage:me,svgPathFillClass:fe,svgSrc:xe,widthClass:ge}=v,Se=a.useMemo(()=>{const e=H||xe,a=me;if(a){const e={};return y&&(e.width=y),m&&(e.height=m),r.jsx(a,{...e})}return e?r.jsx("img",{src:e}):null},[H,xe,me,y,m]),{styles:Be,wrapper:ze}=i.useStyles(e);return r.jsxs("div",{className:t(d,"response",P&&"response_bottom-button",M&&`border-color_${M}`,D&&`border-color_hover_${D}`,W&&`border_type_${W}`,k&&`border-width_${k}`,C&&`fill_${C}`,F&&`fill_hover_${F}`,E&&`height_${E}`,pe&&`shape_${pe}`,ge&&`width_${ge}`,L&&"skeleton"),ref:o,"data-testid":u,"data-tour":p,style:Be,children:[X,r.jsxs("div",{className:"response__wrapper",style:ze,children:[Se&&r.jsx("div",{className:t("response__image",ye&&`svg_fill_${ye}`,fe&&`svg_path_fill_${fe}`),children:Se}),r.jsxs("div",{className:"response__wrapper-inner",children:[f&&r.jsx(l.Text,{className:"response__title",size:j,textColor:w,textWeight:I,children:f}),x&&r.jsx(l.Text,{className:"response__desc",size:N,textColor:q,textWeight:$,children:x})]})]}),(J||g||se||B||_)&&r.jsxs(n.Group,{className:"response__button",width:"fill",children:[J&&z?r.jsx(s.Button,{appearance:R,className:"response__button-item",width:ee||"fill",size:Z,fill:U,fillHover:O,label:J,labelTextColor:K,labelTextSize:V,shape:Y,before:G,after:Q,onClick:b}):g,se&&h?r.jsx(s.Button,{appearance:ae,className:"response__button-item",width:ue||"fill",size:de,fill:oe,fillHover:ie,label:se,labelTextColor:ne,labelTextSize:le,shape:ce,before:te,after:re,onClick:A}):B]}),T]})})),z={error:{appearance:"error sizeM ghost rounded",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData sizeM ghost rounded",title:"Доступ ограничен",desc:"Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com",code:"401/403",imageSrc:e.responseIcon.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorNetwork:{appearance:"unableLoadData sizeM ghost rounded",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.responseIcon.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail sizeM ghost rounded",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound sizeM ghost rounded",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm sizeM ghost rounded",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty sizeM ghost rounded",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning sizeM ghost rounded",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};exports.responseIcon=e.responseIcon,exports.RESPONSE_MESSAGES=z,exports.Response=B,exports.responseAppearance=g,exports.responseConfig=S;
1
+ "use strict";var e=require("./Response/img.js"),r=require("react/jsx-runtime"),a=require("react"),t=require("clsx"),o=require("@itcase/ui-core/hoc"),i=require("@itcase/ui-core/hooks"),s=require("../../Button_cjs_CDr9zTdB.js"),n=require("../../Group_cjs_CiLUYKP7.js"),c=require("../../primitives_cjs_ocTnUpml.js");require("@itcase/ui-core/utils"),require("../../Loader_cjs_nwF8h8Ku.js"),require("@itcase/common"),require("@rc-component/tooltip"),require("react-inlinesvg");const l={confirm:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Confirm),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},d={danger:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Danger),primaryButtonAppearance:"dangerPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"dangerPrimary",svgPathFill:"dangerPrimary"}},u={empty:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Empty),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},p={error:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Error),primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"errorPrimary",svgPathFill:"errorPrimary"}},y={fail:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Fail),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},m={nothingFound:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.NothingFound),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},f={refresh:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Refresh),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},x={success:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Success),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"accentPrimary",svgPathFill:"accentPrimary"}},g={...l,...u,...d,...f,...{unableLoadData:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.UnableLoadData),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},...m,...y,...p,...x,...{warning:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.responseIcon.Warning),primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",svgFill:"warningPrimary",svgPathFill:"warningPrimary"}},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},B={appearance:g,setAppearance:e=>{B.appearance=e}},S=o.urlWithAssetPrefix(a.forwardRef(function(e,o){const{appearance:l,className:d,dataTestId:u,dataTour:p,width:y,height:m,title:f,desc:x,primaryButton:g,secondaryButton:S,showPrimaryButton:z=!0,showSecondaryButton:h=!0,before:X,after:T,isSkeleton:L,isBottomButton:P,onClickPrimaryButton:b,onClickSecondaryButton:A}=e,_=i.useAppearanceConfig(l,B),v=i.useDevicePropsGenerator(e,_),{fillClass:C,fillHoverClass:F,titleTextColor:w,titleTextSize:j,titleTextWeight:I,descTextColor:q,descTextSize:N,descTextWeight:M,borderColorClass:$,borderColorHoverClass:D,borderTypeClass:W,borderWidthClass:k,heightClass:E,imageSrc:H,primaryButtonAfter:Q,primaryButtonAppearance:R,primaryButtonBefore:G,primaryButtonFill:U,primaryButtonFillHover:O,primaryButtonLabel:J,primaryButtonLabelTextColor:K,primaryButtonLabelTextSize:V,primaryButtonShape:Y,primaryButtonSize:Z,primaryButtonWidth:ee,secondaryButtonAfter:re,secondaryButtonAppearance:ae,secondaryButtonBefore:te,secondaryButtonFill:oe,secondaryButtonFillHover:ie,secondaryButtonLabel:se,secondaryButtonLabelTextColor:ne,secondaryButtonLabelTextSize:ce,secondaryButtonShape:le,secondaryButtonSize:de,secondaryButtonWidth:ue,shapeClass:pe,svgFillClass:ye,SvgImage:me,svgPathFillClass:fe,svgSrc:xe,widthClass:ge}=v,Be=a.useMemo(()=>{const e=H||xe,a=me;if(a){const e={};return y&&(e.width=y),m&&(e.height=m),r.jsx(a,{...e})}return e?r.jsx("img",{src:e}):null},[H,xe,me,y,m]),{styles:Se,wrapper:ze}=i.useStyles(e);return r.jsxs("div",{className:t(d,"response",P&&"response_bottom-button",$&&`border-color_${$}`,D&&`border-color_hover_${D}`,W&&`border_type_${W}`,k&&`border-width_${k}`,C&&`fill_${C}`,F&&`fill_hover_${F}`,E&&`height_${E}`,pe&&`shape_${pe}`,ge&&`width_${ge}`,L&&"skeleton"),ref:o,"data-testid":u,"data-tour":p,style:Se,children:[X,r.jsxs("div",{className:"response__wrapper",style:ze,children:[Be&&r.jsx("div",{className:t("response__image",ye&&`svg_fill_${ye}`,fe&&`svg_path_fill_${fe}`),children:Be}),r.jsxs("div",{className:"response__wrapper-inner",children:[f&&r.jsx(c.Text,{className:"response__title",size:j,textColor:w,textWeight:I,children:f}),x&&r.jsx(c.Text,{className:"response__desc",size:N,textColor:q,textWeight:M,children:x})]})]}),(J||g||se||S||_)&&r.jsxs(n.Group,{className:"response__button",width:"fill",children:[J&&z?r.jsx(s.Button,{appearance:R,className:"response__button-item",width:ee||"fill",size:Z,fill:U,fillHover:O,label:J,labelTextColor:K,labelTextSize:V,shape:Y,before:G,after:Q,onClick:b}):g,se&&h?r.jsx(s.Button,{appearance:ae,className:"response__button-item",width:ue||"fill",size:de,fill:oe,fillHover:ie,label:se,labelTextColor:ne,labelTextSize:ce,shape:le,before:te,after:re,onClick:A}):S]}),T]})})),z={error:{appearance:"error sizeM ghost rounded",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData sizeM ghost rounded",title:"Доступ ограничен",desc:"Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com",code:"401/403",imageSrc:e.responseIcon.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorNetwork:{appearance:"unableLoadData sizeM ghost rounded",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.responseIcon.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail sizeM ghost rounded",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound sizeM ghost rounded",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm sizeM ghost rounded",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty sizeM ghost rounded",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},success:{appearance:"success sizeM ghost rounded",title:"Готово",desc:"Операция успешно выполнена",code:"200",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning sizeM ghost rounded",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};exports.responseIcon=e.responseIcon,exports.RESPONSE_MESSAGES=z,exports.Response=S,exports.responseAppearance=g,exports.responseConfig=B;
@@ -1 +1 @@
1
- import{responseIcon as e}from"./Response/img.js";import{jsx as r,jsxs as a}from"react/jsx-runtime";import{forwardRef as t,useMemo as o}from"react";import i from"clsx";import{urlWithAssetPrefix as n}from"@itcase/ui-core/hoc";import{useAppearanceConfig as s,useDevicePropsGenerator as l,useStyles as c}from"@itcase/ui-core/hooks";import{B as d}from"../Button_es_M2ryMLoI.js";import{G as u}from"../Group_es_DIuSNHx3.js";import{T as p}from"../primitives_es_BQqNcRQk.js";import"@itcase/ui-core/utils";import"../Loader_es_CwVQZ1L0.js";import"@itcase/common";import"@rc-component/tooltip";import"react-inlinesvg";const m={confirm:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Confirm),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},y={danger:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Danger),primaryButtonAppearance:"dangerPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"dangerPrimary",svgPathFill:"dangerPrimary"}},f={empty:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Empty),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},g={error:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Error),primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"errorPrimary",svgPathFill:"errorPrimary"}},x={fail:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Fail),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},B={nothingFound:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.NothingFound),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},S={refresh:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Refresh),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},z={success:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Success),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"accentPrimary",svgPathFill:"accentPrimary"}},h={...m,...f,...y,...S,...{unableLoadData:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.UnableLoadData),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},...B,...x,...g,...z,...{warning:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Warning),primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",svgFill:"warningPrimary",svgPathFill:"warningPrimary"}},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},X={appearance:h,setAppearance:e=>{X.appearance=e}},T=n(t(function(e,t){const{appearance:n,className:m,dataTestId:y,dataTour:f,width:g,height:x,title:B,desc:S,primaryButton:z,secondaryButton:h,showPrimaryButton:T=!0,showSecondaryButton:L=!0,before:P,after:b,isSkeleton:_,isBottomButton:v,onClickPrimaryButton:A,onClickSecondaryButton:C}=e,F=s(n,X),w=l(e,F),{fillClass:N,fillHoverClass:$,titleTextColor:k,titleTextSize:D,titleTextWeight:M,descTextColor:W,descTextSize:j,descTextWeight:H,borderColorClass:Q,borderColorHoverClass:U,borderTypeClass:E,borderWidthClass:G,heightClass:I,imageSrc:R,primaryButtonAfter:q,primaryButtonAppearance:J,primaryButtonBefore:K,primaryButtonFill:O,primaryButtonFillHover:V,primaryButtonLabel:Y,primaryButtonLabelTextColor:Z,primaryButtonLabelTextSize:ee,primaryButtonShape:re,primaryButtonSize:ae,primaryButtonWidth:te,secondaryButtonAfter:oe,secondaryButtonAppearance:ie,secondaryButtonBefore:ne,secondaryButtonFill:se,secondaryButtonFillHover:le,secondaryButtonLabel:ce,secondaryButtonLabelTextColor:de,secondaryButtonLabelTextSize:ue,secondaryButtonShape:pe,secondaryButtonSize:me,secondaryButtonWidth:ye,shapeClass:fe,svgFillClass:ge,SvgImage:xe,svgPathFillClass:Be,svgSrc:Se,widthClass:ze}=w,he=o(()=>{const e=R||Se,a=xe;if(a){const e={};return g&&(e.width=g),x&&(e.height=x),r(a,{...e})}return e?r("img",{src:e}):null},[R,Se,xe,g,x]),{styles:Xe,wrapper:Te}=c(e);return a("div",{className:i(m,"response",v&&"response_bottom-button",Q&&`border-color_${Q}`,U&&`border-color_hover_${U}`,E&&`border_type_${E}`,G&&`border-width_${G}`,N&&`fill_${N}`,$&&`fill_hover_${$}`,I&&`height_${I}`,fe&&`shape_${fe}`,ze&&`width_${ze}`,_&&"skeleton"),ref:t,"data-testid":y,"data-tour":f,style:Xe,children:[P,a("div",{className:"response__wrapper",style:Te,children:[he&&r("div",{className:i("response__image",ge&&`svg_fill_${ge}`,Be&&`svg_path_fill_${Be}`),children:he}),a("div",{className:"response__wrapper-inner",children:[B&&r(p,{className:"response__title",size:D,textColor:k,textWeight:M,children:B}),S&&r(p,{className:"response__desc",size:j,textColor:W,textWeight:H,children:S})]})]}),(Y||z||ce||h||F)&&a(u,{className:"response__button",width:"fill",children:[Y&&T?r(d,{appearance:J,className:"response__button-item",width:te||"fill",size:ae,fill:O,fillHover:V,label:Y,labelTextColor:Z,labelTextSize:ee,shape:re,before:K,after:q,onClick:A}):z,ce&&L?r(d,{appearance:ie,className:"response__button-item",width:ye||"fill",size:me,fill:se,fillHover:le,label:ce,labelTextColor:de,labelTextSize:ue,shape:pe,before:ne,after:oe,onClick:C}):h]}),b]})})),L={error:{appearance:"error sizeM ghost rounded",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData sizeM ghost rounded",title:"Доступ ограничен",desc:"Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com",code:"401/403",imageSrc:e.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorNetwork:{appearance:"unableLoadData sizeM ghost rounded",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail sizeM ghost rounded",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound sizeM ghost rounded",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm sizeM ghost rounded",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty sizeM ghost rounded",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning sizeM ghost rounded",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};export{L as RESPONSE_MESSAGES,T as Response,h as responseAppearance,X as responseConfig,e as responseIcon};
1
+ import{responseIcon as e}from"./Response/img.js";import{jsx as r,jsxs as a}from"react/jsx-runtime";import{forwardRef as t,useMemo as o}from"react";import i from"clsx";import{urlWithAssetPrefix as n}from"@itcase/ui-core/hoc";import{useAppearanceConfig as s,useDevicePropsGenerator as l,useStyles as c}from"@itcase/ui-core/hooks";import{B as d}from"../Button_es_M2ryMLoI.js";import{G as u}from"../Group_es_DIuSNHx3.js";import{T as p}from"../primitives_es_BQqNcRQk.js";import"@itcase/ui-core/utils";import"../Loader_es_CwVQZ1L0.js";import"@itcase/common";import"@rc-component/tooltip";import"react-inlinesvg";const m={confirm:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Confirm),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},y={danger:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Danger),primaryButtonAppearance:"dangerPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"dangerPrimary",svgPathFill:"dangerPrimary"}},f={empty:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Empty),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},g={error:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Error),primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"errorPrimary",svgPathFill:"errorPrimary"}},B={fail:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Fail),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},x={nothingFound:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.NothingFound),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},S={refresh:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Refresh),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},z={success:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Success),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"accentPrimary",svgPathFill:"accentPrimary"}},h={...m,...f,...y,...S,...{unableLoadData:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.UnableLoadData),primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",svgFill:"surfaceTertiary",svgPathFill:"surfaceQuaternary"}},...x,...B,...g,...z,...{warning:{fill:"surfacePrimary",titleTextColor:"surfaceTextPrimary",titleTextSize:"xxl",descTextSize:"m",imageSrc:String(e.Warning),primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",svgFill:"warningPrimary",svgPathFill:"warningPrimary"}},solid:{borderColor:"none"},outlined:{fill:"none"},full:{},ghost:{fill:"none",borderColor:"none"}},X={appearance:h,setAppearance:e=>{X.appearance=e}},T=n(t(function(e,t){const{appearance:n,className:m,dataTestId:y,dataTour:f,width:g,height:B,title:x,desc:S,primaryButton:z,secondaryButton:h,showPrimaryButton:T=!0,showSecondaryButton:L=!0,before:P,after:b,isSkeleton:_,isBottomButton:A,onClickPrimaryButton:v,onClickSecondaryButton:C}=e,F=s(n,X),w=l(e,F),{fillClass:N,fillHoverClass:$,titleTextColor:M,titleTextSize:k,titleTextWeight:D,descTextColor:W,descTextSize:j,descTextWeight:H,borderColorClass:Q,borderColorHoverClass:U,borderTypeClass:E,borderWidthClass:G,heightClass:I,imageSrc:R,primaryButtonAfter:q,primaryButtonAppearance:J,primaryButtonBefore:K,primaryButtonFill:O,primaryButtonFillHover:V,primaryButtonLabel:Y,primaryButtonLabelTextColor:Z,primaryButtonLabelTextSize:ee,primaryButtonShape:re,primaryButtonSize:ae,primaryButtonWidth:te,secondaryButtonAfter:oe,secondaryButtonAppearance:ie,secondaryButtonBefore:ne,secondaryButtonFill:se,secondaryButtonFillHover:le,secondaryButtonLabel:ce,secondaryButtonLabelTextColor:de,secondaryButtonLabelTextSize:ue,secondaryButtonShape:pe,secondaryButtonSize:me,secondaryButtonWidth:ye,shapeClass:fe,svgFillClass:ge,SvgImage:Be,svgPathFillClass:xe,svgSrc:Se,widthClass:ze}=w,he=o(()=>{const e=R||Se,a=Be;if(a){const e={};return g&&(e.width=g),B&&(e.height=B),r(a,{...e})}return e?r("img",{src:e}):null},[R,Se,Be,g,B]),{styles:Xe,wrapper:Te}=c(e);return a("div",{className:i(m,"response",A&&"response_bottom-button",Q&&`border-color_${Q}`,U&&`border-color_hover_${U}`,E&&`border_type_${E}`,G&&`border-width_${G}`,N&&`fill_${N}`,$&&`fill_hover_${$}`,I&&`height_${I}`,fe&&`shape_${fe}`,ze&&`width_${ze}`,_&&"skeleton"),ref:t,"data-testid":y,"data-tour":f,style:Xe,children:[P,a("div",{className:"response__wrapper",style:Te,children:[he&&r("div",{className:i("response__image",ge&&`svg_fill_${ge}`,xe&&`svg_path_fill_${xe}`),children:he}),a("div",{className:"response__wrapper-inner",children:[x&&r(p,{className:"response__title",size:k,textColor:M,textWeight:D,children:x}),S&&r(p,{className:"response__desc",size:j,textColor:W,textWeight:H,children:S})]})]}),(Y||z||ce||h||F)&&a(u,{className:"response__button",width:"fill",children:[Y&&T?r(d,{appearance:J,className:"response__button-item",width:te||"fill",size:ae,fill:O,fillHover:V,label:Y,labelTextColor:Z,labelTextSize:ee,shape:re,before:K,after:q,onClick:v}):z,ce&&L?r(d,{appearance:ie,className:"response__button-item",width:ye||"fill",size:me,fill:se,fillHover:le,label:ce,labelTextColor:de,labelTextSize:ue,shape:pe,before:ne,after:oe,onClick:C}):h]}),b]})})),L={error:{appearance:"error sizeM ghost rounded",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData sizeM ghost rounded",title:"Доступ ограничен",desc:"Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com",code:"401/403",imageSrc:e.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorNetwork:{appearance:"unableLoadData sizeM ghost rounded",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail sizeM ghost rounded",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound sizeM ghost rounded",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm sizeM ghost rounded",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty sizeM ghost rounded",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},success:{appearance:"success sizeM ghost rounded",title:"Готово",desc:"Операция успешно выполнена",code:"200",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning sizeM ghost rounded",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};export{L as RESPONSE_MESSAGES,T as Response,h as responseAppearance,X as responseConfig,e as responseIcon};
@@ -59,6 +59,14 @@ declare const RESPONSE_MESSAGES: {
59
59
  primaryButtonAppearance: string;
60
60
  primaryButtonLabel: string;
61
61
  };
62
+ success: {
63
+ appearance: string;
64
+ title: string;
65
+ desc: string;
66
+ code: string;
67
+ primaryButtonAppearance: string;
68
+ primaryButtonLabel: string;
69
+ };
62
70
  warning: {
63
71
  appearance: string;
64
72
  title: string;
@@ -64,6 +64,14 @@ const RESPONSE_MESSAGES = {
64
64
  primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
65
65
  primaryButtonLabel: 'ОК',
66
66
  },
67
+ success: {
68
+ appearance: 'success sizeM ghost rounded',
69
+ title: 'Готово',
70
+ desc: 'Операция успешно выполнена',
71
+ code: '200',
72
+ primaryButtonAppearance: 'accentPrimary sizeXXL solid rounded',
73
+ primaryButtonLabel: 'ОК',
74
+ },
67
75
  warning: {
68
76
  appearance: 'warning sizeM ghost rounded',
69
77
  title: 'Внимание',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui-web",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "UI components",
5
5
  "keywords": "",
6
6
  "license": "MIT",
@@ -114,5 +114,5 @@
114
114
  "storybook": "^10.4.0",
115
115
  "typescript": "^6.0.3"
116
116
  },
117
- "gitHead": "9f4196ce2a51940669bc5529f615253ab8c1f2f9"
117
+ "gitHead": "f6e8298b248d91b7f28963f93af9078fb21ff525"
118
118
  }