@itcase/ui-web 1.10.30 → 1.10.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/Response.js +1 -1
- package/dist/components/Response.js +1 -1
- package/dist/types/components/Response/Response.constant.js +9 -9
- package/dist/types/components/Response/Response.interface.d.ts +3 -2
- package/dist/types/components/Response/appearance/responseShape.d.ts +21 -0
- package/dist/types/components/Response/appearance/responseShape.js +21 -0
- package/package.json +5 -5
|
@@ -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_D0Fa5AsR.js"),n=require("../../Group_cjs_CiLUYKP7.js"),c=require("../../primitives_cjs_EVP_2N_A.js");require("@itcase/ui-core/utils"),require("../../Loader_cjs_4kGh3xPd.js"),require("axios"),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"}},
|
|
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_D0Fa5AsR.js"),n=require("../../Group_cjs_CiLUYKP7.js"),c=require("../../primitives_cjs_EVP_2N_A.js");require("@itcase/ui-core/utils"),require("../../Loader_cjs_4kGh3xPd.js"),require("axios"),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"}},B={...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"}},S={appearance:B,setAppearance:e=>{S.appearance=e}},g=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:B,secondaryButton:g,showPrimaryButton:X=!0,showSecondaryButton:z=!0,before:T,after:L,isSkeleton:h,isBottomButton:P,onClickPrimaryButton:b,onClickSecondaryButton:A}=e,_=i.useAppearanceConfig(l,S),v=i.useDevicePropsGenerator(e,_),{fillClass:C,fillHoverClass:F,titleTextColor:w,titleTextSize:j,titleTextWeight:I,descTextColor:q,descTextSize:N,descTextWeight:$,borderColorClass:D,borderColorHoverClass:W,borderTypeClass:k,borderWidthClass:E,heightClass:H,imageSrc:Q,primaryButtonAfter:R,primaryButtonAppearance:G,primaryButtonBefore:U,primaryButtonFill:M,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:Be}=v,Se=a.useMemo(()=>{const e=Q||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},[Q,xe,me,y,m]),{styles:ge,wrapper:Xe}=i.useStyles(e);return r.jsxs("div",{className:t(d,"response",P&&"response_bottom-button",D&&`border-color_${D}`,W&&`border-color_hover_${W}`,k&&`border_type_${k}`,E&&`border-width_${E}`,C&&`fill_${C}`,F&&`fill_hover_${F}`,H&&`height_${H}`,pe&&`shape_${pe}`,Be&&`width_${Be}`,h&&"skeleton"),ref:o,"data-testid":u,"data-tour":p,style:ge,children:[T,r.jsxs("div",{className:"response__wrapper",style:Xe,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(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:$,children:x})]})]}),(J||B||se||g||_)&&r.jsxs(n.Group,{className:"response__button",width:"fill",children:[J&&X?r.jsx(s.Button,{appearance:G,className:"response__button-item",width:ee||"fill",size:Z,fill:M,fillHover:O,label:J,labelTextColor:K,labelTextSize:V,shape:Y,before:U,after:R,onClick:b}):B,se&&z?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}):g]}),L]})})),X={error:{appearance:"error",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData",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",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.responseIcon.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},success:{appearance:"success",title:"Готово",desc:"Операция успешно выполнена",code:"200",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};exports.responseIcon=e.responseIcon,exports.RESPONSE_MESSAGES=X,exports.Response=g,exports.responseAppearance=B,exports.responseConfig=S;
|
|
@@ -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
|
|
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 i}from"react";import o 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_DvzjOfyQ.js";import{G as u}from"../Group_es_DIuSNHx3.js";import{T as p}from"../primitives_es_D7LYOijE.js";import"@itcase/ui-core/utils";import"../Loader_es_CdWc_Prk.js";import"axios";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"}},x={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"}},g={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"}},X={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"}},z={...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"}},...g,...B,...x,...X,...{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"}},T={appearance:z,setAppearance:e=>{T.appearance=e}},L=n(t(function(e,t){const{appearance:n,className:m,dataTestId:y,dataTour:f,width:x,height:B,title:g,desc:S,primaryButton:X,secondaryButton:z,showPrimaryButton:L=!0,showSecondaryButton:h=!0,before:P,after:b,isSkeleton:_,isBottomButton:A,onClickPrimaryButton:v,onClickSecondaryButton:C}=e,F=s(n,T),w=l(e,F),{fillClass:N,fillHoverClass:$,titleTextColor:k,titleTextSize:D,titleTextWeight:W,descTextColor:j,descTextSize:H,descTextWeight:Q,borderColorClass:U,borderColorHoverClass:E,borderTypeClass:G,borderWidthClass:I,heightClass:R,imageSrc:q,primaryButtonAfter:J,primaryButtonAppearance:K,primaryButtonBefore:M,primaryButtonFill:O,primaryButtonFillHover:V,primaryButtonLabel:Y,primaryButtonLabelTextColor:Z,primaryButtonLabelTextSize:ee,primaryButtonShape:re,primaryButtonSize:ae,primaryButtonWidth:te,secondaryButtonAfter:ie,secondaryButtonAppearance:oe,secondaryButtonBefore:ne,secondaryButtonFill:se,secondaryButtonFillHover:le,secondaryButtonLabel:ce,secondaryButtonLabelTextColor:de,secondaryButtonLabelTextSize:ue,secondaryButtonShape:pe,secondaryButtonSize:me,secondaryButtonWidth:ye,shapeClass:fe,svgFillClass:xe,SvgImage:Be,svgPathFillClass:ge,svgSrc:Se,widthClass:Xe}=w,ze=i(()=>{const e=q||Se,a=Be;if(a){const e={};return x&&(e.width=x),B&&(e.height=B),r(a,{...e})}return e?r("img",{src:e}):null},[q,Se,Be,x,B]),{styles:Te,wrapper:Le}=c(e);return a("div",{className:o(m,"response",A&&"response_bottom-button",U&&`border-color_${U}`,E&&`border-color_hover_${E}`,G&&`border_type_${G}`,I&&`border-width_${I}`,N&&`fill_${N}`,$&&`fill_hover_${$}`,R&&`height_${R}`,fe&&`shape_${fe}`,Xe&&`width_${Xe}`,_&&"skeleton"),ref:t,"data-testid":y,"data-tour":f,style:Te,children:[P,a("div",{className:"response__wrapper",style:Le,children:[ze&&r("div",{className:o("response__image",xe&&`svg_fill_${xe}`,ge&&`svg_path_fill_${ge}`),children:ze}),a("div",{className:"response__wrapper-inner",children:[g&&r(p,{className:"response__title",size:D,textColor:k,textWeight:W,children:g}),S&&r(p,{className:"response__desc",size:H,textColor:j,textWeight:Q,children:S})]})]}),(Y||X||ce||z||F)&&a(u,{className:"response__button",width:"fill",children:[Y&&L?r(d,{appearance:K,className:"response__button-item",width:te||"fill",size:ae,fill:O,fillHover:V,label:Y,labelTextColor:Z,labelTextSize:ee,shape:re,before:M,after:J,onClick:v}):X,ce&&h?r(d,{appearance:oe,className:"response__button-item",width:ye||"fill",size:me,fill:se,fillHover:le,label:ce,labelTextColor:de,labelTextSize:ue,shape:pe,before:ne,after:ie,onClick:C}):z]}),b]})})),h={error:{appearance:"error",title:"Ошибка",desc:"Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com",primaryButtonAppearance:"errorPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},errorAccessDenied:{appearance:"unableLoadData",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",title:"Ошибка соединения",desc:"Не удалось подключиться. Проверьте интернет-соединение и повторите попытку",imageSrc:e.UnableLoadData,primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Обновить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},fail:{appearance:"fail",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},nothingFound:{appearance:"nothingFound",title:"Ничего не найдено",desc:"Нет данных по заданным параметрам",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"Сбросить",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},confirm:{appearance:"confirm",title:"Вы уверены?",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"Да",secondaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"},empty:{appearance:"empty",title:"Список пуст",desc:"Нет данных по заданным параметрам",code:"200",primaryButtonAppearance:"surfaceSecondary sizeXXL solid rounded",primaryButtonLabel:"ОК"},success:{appearance:"success",title:"Готово",desc:"Операция успешно выполнена",code:"200",primaryButtonAppearance:"accentPrimary sizeXXL solid rounded",primaryButtonLabel:"ОК"},warning:{appearance:"warning",title:"Внимание",primaryButtonAppearance:"warningPrimary sizeXXL solid rounded",primaryButtonLabel:"Повторить",secondaryButtonAppearance:"warningPrimary sizeXXL solid rounded",secondaryButtonLabel:"Отмена"}};export{h as RESPONSE_MESSAGES,L as Response,z as responseAppearance,T as responseConfig,e as responseIcon};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { responseIcon } from './index';
|
|
2
2
|
const RESPONSE_MESSAGES = {
|
|
3
3
|
error: {
|
|
4
|
-
appearance: 'error
|
|
4
|
+
appearance: 'error',
|
|
5
5
|
title: 'Ошибка',
|
|
6
6
|
desc: 'Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com',
|
|
7
7
|
// code: '500',
|
|
@@ -11,7 +11,7 @@ const RESPONSE_MESSAGES = {
|
|
|
11
11
|
secondaryButtonLabel: 'Отмена',
|
|
12
12
|
},
|
|
13
13
|
errorAccessDenied: {
|
|
14
|
-
appearance: 'unableLoadData
|
|
14
|
+
appearance: 'unableLoadData',
|
|
15
15
|
title: 'Доступ ограничен',
|
|
16
16
|
desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
|
|
17
17
|
code: '401/403',
|
|
@@ -22,7 +22,7 @@ const RESPONSE_MESSAGES = {
|
|
|
22
22
|
secondaryButtonLabel: 'Отмена',
|
|
23
23
|
},
|
|
24
24
|
errorNetwork: {
|
|
25
|
-
appearance: 'unableLoadData
|
|
25
|
+
appearance: 'unableLoadData',
|
|
26
26
|
title: 'Ошибка соединения',
|
|
27
27
|
desc: 'Не удалось подключиться. Проверьте интернет-соединение и повторите попытку',
|
|
28
28
|
// code: null,
|
|
@@ -33,13 +33,13 @@ const RESPONSE_MESSAGES = {
|
|
|
33
33
|
secondaryButtonLabel: 'Отмена',
|
|
34
34
|
},
|
|
35
35
|
fail: {
|
|
36
|
-
appearance: 'fail
|
|
36
|
+
appearance: 'fail',
|
|
37
37
|
// code: '500',
|
|
38
38
|
primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
|
|
39
39
|
primaryButtonLabel: 'ОК',
|
|
40
40
|
},
|
|
41
41
|
nothingFound: {
|
|
42
|
-
appearance: 'nothingFound
|
|
42
|
+
appearance: 'nothingFound',
|
|
43
43
|
title: 'Ничего не найдено',
|
|
44
44
|
desc: 'Нет данных по заданным параметрам',
|
|
45
45
|
// code: '500',
|
|
@@ -49,7 +49,7 @@ const RESPONSE_MESSAGES = {
|
|
|
49
49
|
secondaryButtonLabel: 'Отмена',
|
|
50
50
|
},
|
|
51
51
|
confirm: {
|
|
52
|
-
appearance: 'confirm
|
|
52
|
+
appearance: 'confirm',
|
|
53
53
|
title: 'Вы уверены?',
|
|
54
54
|
primaryButtonAppearance: 'accentPrimary sizeXXL solid rounded',
|
|
55
55
|
primaryButtonLabel: 'Да',
|
|
@@ -57,7 +57,7 @@ const RESPONSE_MESSAGES = {
|
|
|
57
57
|
secondaryButtonLabel: 'Отмена',
|
|
58
58
|
},
|
|
59
59
|
empty: {
|
|
60
|
-
appearance: 'empty
|
|
60
|
+
appearance: 'empty',
|
|
61
61
|
title: 'Список пуст',
|
|
62
62
|
desc: 'Нет данных по заданным параметрам',
|
|
63
63
|
code: '200',
|
|
@@ -65,7 +65,7 @@ const RESPONSE_MESSAGES = {
|
|
|
65
65
|
primaryButtonLabel: 'ОК',
|
|
66
66
|
},
|
|
67
67
|
success: {
|
|
68
|
-
appearance: 'success
|
|
68
|
+
appearance: 'success',
|
|
69
69
|
title: 'Готово',
|
|
70
70
|
desc: 'Операция успешно выполнена',
|
|
71
71
|
code: '200',
|
|
@@ -73,7 +73,7 @@ const RESPONSE_MESSAGES = {
|
|
|
73
73
|
primaryButtonLabel: 'ОК',
|
|
74
74
|
},
|
|
75
75
|
warning: {
|
|
76
|
-
appearance: 'warning
|
|
76
|
+
appearance: 'warning',
|
|
77
77
|
title: 'Внимание',
|
|
78
78
|
primaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
|
|
79
79
|
primaryButtonLabel: 'Повторить',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, CSSProperties, ReactNode, SVGProps } from 'react';
|
|
2
|
-
import { AppearanceConfig, AppearanceKeysResponse, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceResponseKeys, FillHoverProps, FillProps, ShapeProps, SvgFillProps } from '@itcase/types-ui';
|
|
2
|
+
import { AppearanceConfig, AppearanceKeysResponse, AppearanceShapeKey, AppearanceStyleKey, BorderColorHoverProps, BorderColorProps, BorderTypeProps, BorderWidthProps, CompositeAppearanceResponseKeys, FillHoverProps, FillProps, ShapeProps, SvgFillProps } from '@itcase/types-ui';
|
|
3
3
|
import type { AppearanceRecord } from '@itcase/types-ui';
|
|
4
4
|
import { StyleAttributes } from '@itcase/ui-core/hooks';
|
|
5
5
|
import { ButtonProps } from 'src/components/Button/Button.interface';
|
|
@@ -69,4 +69,5 @@ type ResponseProps = ResponseAppearanceProps & StyleAttributes & {
|
|
|
69
69
|
type ResponseConfig = AppearanceConfig<AppearanceKeysResponse, ResponseAppearanceProps>;
|
|
70
70
|
type ResponseAppearance = ResponseConfig['appearance'];
|
|
71
71
|
type ResponseAppearanceStyle = AppearanceRecord<AppearanceStyleKey, ResponseAppearanceProps, 'borderColor' | 'fill'>;
|
|
72
|
-
|
|
72
|
+
type ResponseAppearanceShape = Partial<Record<AppearanceShapeKey, Partial<Pick<ResponseAppearanceProps, 'shape'>>>>;
|
|
73
|
+
export type { ResponseAppearance, ResponseAppearanceShape, ResponseAppearanceStyle, ResponseConfig, ResponseProps, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const responseAppearanceShape: {
|
|
2
|
+
circular: {
|
|
3
|
+
shape: "circular";
|
|
4
|
+
};
|
|
5
|
+
rounded: {
|
|
6
|
+
shape: "rounded";
|
|
7
|
+
};
|
|
8
|
+
roundedXL: {
|
|
9
|
+
shape: "roundedXL";
|
|
10
|
+
};
|
|
11
|
+
roundedL: {
|
|
12
|
+
shape: "roundedL";
|
|
13
|
+
};
|
|
14
|
+
roundedM: {
|
|
15
|
+
shape: "roundedM";
|
|
16
|
+
};
|
|
17
|
+
roundedS: {
|
|
18
|
+
shape: "roundedS";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export { responseAppearanceShape };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const responseAppearanceShape = {
|
|
2
|
+
circular: {
|
|
3
|
+
shape: 'circular',
|
|
4
|
+
},
|
|
5
|
+
rounded: {
|
|
6
|
+
shape: 'rounded',
|
|
7
|
+
},
|
|
8
|
+
roundedXL: {
|
|
9
|
+
shape: 'roundedXL',
|
|
10
|
+
},
|
|
11
|
+
roundedL: {
|
|
12
|
+
shape: 'roundedL',
|
|
13
|
+
},
|
|
14
|
+
roundedM: {
|
|
15
|
+
shape: 'roundedM',
|
|
16
|
+
},
|
|
17
|
+
roundedS: {
|
|
18
|
+
shape: 'roundedS',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export { responseAppearanceShape };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui-web",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.31",
|
|
4
4
|
"description": "UI components",
|
|
5
5
|
"keywords": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@itcase/tokens-am": "^1.1.57",
|
|
54
54
|
"@itcase/tokens-baikal": "^1.1.54",
|
|
55
55
|
"@itcase/tokens-palette": "^1.1.50",
|
|
56
|
-
"@itcase/ui-core": "^1.10.
|
|
56
|
+
"@itcase/ui-core": "^1.10.31",
|
|
57
57
|
"@rc-component/tooltip": "^1.4.0",
|
|
58
58
|
"axios": "^1.17.0",
|
|
59
59
|
"clsx": "^2.1.1",
|
|
@@ -87,9 +87,9 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@babel/core": "^7.29.7",
|
|
89
89
|
"@babel/preset-react": "^7.29.7",
|
|
90
|
-
"@itcase/storybook-config": "^1.2.
|
|
90
|
+
"@itcase/storybook-config": "^1.2.75",
|
|
91
91
|
"@itcase/types-core": "^1.1.74",
|
|
92
|
-
"@itcase/types-ui": "^1.1.
|
|
92
|
+
"@itcase/types-ui": "^1.1.82",
|
|
93
93
|
"@rollup/plugin-alias": "^6.0.0",
|
|
94
94
|
"@rollup/plugin-babel": "^7.1.0",
|
|
95
95
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"storybook": "^10.4.2",
|
|
117
117
|
"typescript": "^6.0.3"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "4eb54785632316f94d294a19e74ad3c689095dec"
|
|
120
120
|
}
|