@soul-refiner/design-system 2.14.72 → 2.14.74
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,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),o=require("styled-components"),t=require("../../../icons/basic/plus.js"),l=require("../../../icons/basic/minus.js");const
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),o=require("styled-components"),t=require("../../../icons/basic/plus.js"),l=require("../../../icons/basic/minus.js");const i=o.styled.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: 8px;
|
|
6
6
|
width: fit-content;
|
|
7
7
|
|
|
8
8
|
${({$sx:e})=>e||""}
|
|
9
|
-
`,
|
|
9
|
+
`,n=o.styled.label`
|
|
10
10
|
font-family: var(--font-inter);
|
|
11
11
|
font-size: ${({$size:e})=>"small"===e?12:"large"===e?16:14}px;
|
|
12
12
|
font-weight: 500;
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
border-right: 1px solid var(--color-grey-8);
|
|
71
71
|
color: var(--color-grey-2);
|
|
72
72
|
font-family: var(--font-inter);
|
|
73
|
-
font-size: ${({$size:e})=>"small"===e?14:16}px;
|
|
74
|
-
font-weight:
|
|
73
|
+
font-size: ${({$size:e})=>"small"===e?14:"large"===e?18:16}px;
|
|
74
|
+
font-weight: 700;
|
|
75
75
|
line-height: ${({$size:e})=>"small"===e?20:"large"===e?24:22}px;
|
|
76
76
|
outline: none;
|
|
77
77
|
text-align: center;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
display: flex;
|
|
115
115
|
align-items: center;
|
|
116
116
|
justify-content: center;
|
|
117
|
-
background-color: var(--color-blue-
|
|
117
|
+
background-color: var(--color-primary-blue-2);
|
|
118
118
|
border: none;
|
|
119
119
|
border-radius: 0 8px 8px 0;
|
|
120
120
|
cursor: pointer;
|
|
@@ -123,10 +123,6 @@
|
|
|
123
123
|
min-width: ${({$size:e})=>{switch(e){case"small":return"32px";case"large":return"48px";default:return"40px"}}};
|
|
124
124
|
height: 100%;
|
|
125
125
|
|
|
126
|
-
&:hover:not(:disabled) {
|
|
127
|
-
background-color: var(--color-blue-2);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
126
|
&:active:not(:disabled) {
|
|
131
127
|
background-color: var(--color-blue-1);
|
|
132
128
|
}
|
|
@@ -148,4 +144,4 @@
|
|
|
148
144
|
|
|
149
145
|
${({$error:e})=>e&&"color: var(--color-red-4);"}
|
|
150
146
|
${({$success:e})=>e&&"color: var(--color-green-3);"}
|
|
151
|
-
`;exports.Counter=({value:o,onChange:g,min:
|
|
147
|
+
`;exports.Counter=({value:o,onChange:g,min:x=0,max:h=999,step:$=1,disabled:v=!1,size:b="medium",variant:y="default",allowDirectInput:f=!0,placeholder:m="0",label:w,helperText:z,error:k=!1,errorText:j,success:S=!1,successText:M,width:N,maxWidth:q,height:C,className:D,sx:W})=>{const[I,T]=r.useState(o.toString()),[A,E]=r.useState(!1),[B,F]=r.useState(!1);r.useEffect(()=>{A||T(o.toString())},[o,A]);const K=e=>{const r=Math.max(x,Math.min(h,e));r!==o&&g(r),F(!1)},P=()=>{if(v)return;const e=Math.max(x,o-$);K(e)},U=()=>{if(v)return;const e=Math.min(h,o+$);K(e)},G=()=>{if(E(!1),""===I)return void T(o.toString());const e=parseInt(I,10);if(isNaN(e)||e<x||e>h)return T(o.toString()),void F(!1);K(e)},H=v||o<=x,J=v||o>=h,L=k||B,O=S&&!L;return e.jsxs(i,{className:D,$sx:W,children:[w&&e.jsx(n,{$size:b,$disabled:v,children:w}),e.jsxs(a,{$size:b,$variant:y,$disabled:v,$error:L,$success:O,$width:N,$maxWidth:q,$height:C,children:[e.jsx(s,{onClick:P,disabled:H,$size:b,$variant:y,type:"button",children:e.jsx(l.Minus,{color:"grey-3",size:"small"===b?16:"large"===b?24:16})}),f?e.jsx(c,{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:I,onChange:e=>{const r=e.target.value;if(T(r),""===r)return void F(!1);const o=parseInt(r,10);isNaN(o)?F(!0):F(o<x||o>h)},onFocus:()=>{E(!0),F(!1)},onBlur:G,onKeyDown:e=>{"Enter"===e.key&&G(),"ArrowUp"===e.key&&(e.preventDefault(),U()),"ArrowDown"===e.key&&(e.preventDefault(),P())},disabled:v,placeholder:m,$size:b,$error:L,$success:O,$variant:y}):e.jsx(d,{$size:b,$variant:y,children:e.jsx("span",{style:{fontSize:"small"===b?14:16,fontWeight:500,color:"var(--color-grey-2)",margin:0},children:o})}),e.jsx(u,{onClick:U,disabled:J,$size:b,$variant:y,type:"button",children:e.jsx(t.Plus,{color:"white",size:"small"===b?16:"large"===b?24:16})})]}),(z||j||M)&&e.jsxs(p,{$size:b,$error:L,$success:O,children:[L&&j,O&&M,!L&&!O&&z]})]})};
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
background-color: var(--color-primary-blue-2);
|
|
55
55
|
color: var(--color-white);
|
|
56
56
|
border: none;
|
|
57
|
-
border-radius:
|
|
57
|
+
border-radius: 32px;
|
|
58
58
|
padding: 8px 20px;
|
|
59
59
|
font-size: 14px;
|
|
60
60
|
font-weight: 600;
|
|
@@ -62,4 +62,5 @@
|
|
|
62
62
|
transition: background-color 0.2s ease;
|
|
63
63
|
margin: 0 auto;
|
|
64
64
|
display: block;
|
|
65
|
-
|
|
65
|
+
width: 143px;
|
|
66
|
+
`;exports.SuccessModal=({onClose:i,title:t,message:d,actionText:x,onAction:g})=>r.jsx(n,{children:r.jsxs(a,{children:[r.jsx(s,{onClick:i,children:r.jsx(o.Close,{})}),r.jsx(e.P,{sx:"font-size:40px;font-weight:600;color:var(--color-grey-2);text-align:center;margin:0 0 30px 0;line-height:1.2;",children:t}),r.jsx(l,{children:r.jsx(c,{viewBox:"0 0 24 24",children:r.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19l12-12-1.41-1.41z"})})}),r.jsx(e.P,{$fontSize:16,sx:"font-weight:400;color:var(--color-grey-3);text-align:center;margin:0 0 20px 0;line-height:24px;",children:d}),r.jsx(p,{onClick:g,children:x})]})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success-modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/surfaces/success_modal/success-modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"success-modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/surfaces/success_modal/success-modal.tsx"],"names":[],"mappings":"AAoFA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,uDAMtB,iBAAiB,4CAyBnB,CAAC"}
|