@soul-refiner/design-system 2.14.71 → 2.14.73

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,5 +1,5 @@
1
1
  "use client";
2
- "use strict";var e=require("react/jsx-runtime"),r=require("next/image"),i=require("styled-components"),s=require("../../atoms/typography/heading.js"),t=require("../../atoms/typography/paragraph.js"),l=require("../../actions/button/button.js"),a=require("../../iconography/avatar/avatar.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=o(r);const n=i.styled.div`
2
+ "use strict";var e=require("react/jsx-runtime"),r=require("next/image"),i=require("styled-components"),t=require("../../atoms/typography/heading.js"),a=require("../../atoms/typography/paragraph.js"),s=require("../../actions/button/button.js"),o=require("../../iconography/avatar/avatar.js");require("../../feedback/badge/badge.js"),require("../../feedback/banner/banner.js"),require("../../feedback/loader/loader.js"),require("../../feedback/notification/notification.js"),require("../../feedback/progress/progress.js"),require("../../feedback/toast/toast.js");var l=require("../../feedback/tooltip/tooltip.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../feedback/animated_toast/animated_toast.js"),require("../../feedback/emojiPicker/emoji-picker.js"),require("../../feedback/emojiPicker/emoji-reactions.js"),require("../../feedback/videoLoader/videoLoader.js");var n=d(r);const c=i.styled.div`
3
3
  position: relative;
4
4
  display: flex;
5
5
  flex-direction: column;
@@ -17,7 +17,7 @@
17
17
  }
18
18
 
19
19
  ${({$sx:e})=>e||""};
20
- `,x=i.styled.div`
20
+ `,p=i.styled.div`
21
21
  position: relative;
22
22
  width: 100%;
23
23
  min-height: 219.375px;
@@ -27,13 +27,13 @@
27
27
  img {
28
28
  border-radius: 16px 16px 0 0;
29
29
  }
30
- `,p=i.styled.div`
30
+ `,x=i.styled.div`
31
31
  padding: 8px 8px 16px 8px;
32
32
  display: flex;
33
33
  flex-direction: column;
34
34
  gap: 8px;
35
35
  flex: 1;
36
- `,c=i.styled(s.H)`
36
+ `,f=i.styled(t.H)`
37
37
  font-size: 18px;
38
38
  font-weight: 500;
39
39
  color: var(--color-grey-2);
@@ -46,12 +46,12 @@
46
46
  color: ${({$isOverAssigned:e})=>e?"var(--color-red-3)":"var(--color-grey-2)"};
47
47
  font-weight: ${({$isOverAssigned:e})=>e?"600":"500"};
48
48
  margin-left: 16px;
49
- `,f=i.styled.div`
49
+ `,u=i.styled.div`
50
50
  min-height: 32px;
51
51
  display: flex;
52
52
  align-items: flex-start;
53
53
  flex: 1;
54
- `,u=i.styled.div`
54
+ `,j=i.styled.div`
55
55
  display: flex;
56
56
  align-items: center;
57
57
  flex-wrap: wrap;
@@ -77,4 +77,26 @@
77
77
  display: flex;
78
78
  gap: 12px;
79
79
  margin-top: auto;
80
- `;exports.CourseSeatsCard=({courseId:r,courseName:i,alert:s,courseImage:o,assignedSeats:j,totalSeats:b,assignedUsers:w,onManageSeats:$,onAddSeats:z,sx:S})=>e.jsxs(n,{$sx:S,children:[s,e.jsx(x,{children:e.jsx(d.default,{alt:i,src:o,fill:!0,style:{objectFit:"cover"}})}),e.jsxs(p,{children:[e.jsx(c,{children:i}),e.jsx(g,{children:e.jsxs(t.P,{$fontSize:14,$color:"grey-3",children:["Seat:",e.jsxs(h,{$isOverAssigned:j>b,children:[j,"/",b," Available"]})]})}),e.jsx(f,{children:w.length>0&&e.jsxs(u,{children:[w.slice(0,8).map((r,i)=>e.jsx(v,{children:e.jsx(a.Avatar,{image:r.imageUrl||"/images/default_avatar.png",size:24})},`${r.id}-${i}`)),w.length>8&&e.jsxs(y,{children:["+",w.length-8]})]})}),e.jsxs(m,{children:[e.jsx(l.Button,{type:"outlined",size:"small",fluid:!0,onClick:()=>$(r),sx:"font-size: 14px;",children:"Manage Seats"}),e.jsx(l.Button,{type:"primary",fluid:!0,sx:"font-size: 14px;",size:"small",onClick:()=>z(r),children:"Add Seats"})]})]})]});
80
+ `,b=i.styled.a`
81
+ display: block;
82
+ width: 100%;
83
+ height: 100%;
84
+ cursor: pointer;
85
+ text-decoration: none;
86
+
87
+ &:hover {
88
+ opacity: 0.9;
89
+ }
90
+ `,k=i.styled.a`
91
+ display: block;
92
+ cursor: pointer;
93
+ text-decoration: none;
94
+ border-radius: 50%;
95
+
96
+ &:hover {
97
+ opacity: 0.8;
98
+ transform: scale(1.05);
99
+ }
100
+
101
+ transition: all 0.2s ease;
102
+ `;exports.CourseSeatsCard=({courseId:r,courseName:i,alert:t,courseImage:d,href:q,assignedSeats:w,totalSeats:$,assignedUsers:z,onManageSeats:S,onAddSeats:A,sx:C})=>e.jsxs(c,{$sx:C,children:[t,e.jsx(p,{children:q?e.jsx(b,{href:q,children:e.jsx(n.default,{alt:i,src:d,fill:!0,style:{objectFit:"cover"}})}):e.jsx(n.default,{alt:i,src:d,fill:!0,style:{objectFit:"cover"}})}),e.jsxs(x,{children:[e.jsx(f,{children:i}),e.jsx(g,{children:e.jsxs(a.P,{$fontSize:14,$color:"grey-3",children:["Seat:",e.jsxs(h,{$isOverAssigned:w>$,children:[w,"/",$," Available"]})]})}),e.jsx(u,{children:z.length>0&&e.jsxs(j,{children:[z.slice(0,8).map((r,i)=>e.jsx(l.Tooltip,{content:r.name,place:"top",children:e.jsx(v,{children:r.url?e.jsx(k,{href:`/people/${r.url}/post`,children:e.jsx(o.Avatar,{image:r.imageUrl||"/images/default_avatar.png",size:24})}):e.jsx(o.Avatar,{image:r.imageUrl||"/images/default_avatar.png",size:24})},`${r.id}-${i}`)},`${r.id}-${i}`)),z.length>8&&e.jsxs(y,{children:["+",z.length-8]})]})}),e.jsxs(m,{children:[e.jsx(s.Button,{type:"outlined",size:"small",fluid:!0,onClick:()=>S(r),sx:"font-size: 14px;",children:"Manage Seats"}),e.jsx(s.Button,{type:"primary",fluid:!0,sx:"font-size: 14px;",size:"small",onClick:()=>A(r),children:"Add Seats"})]})]})]});
@@ -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 n=o.styled.div`
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
- `,i=o.styled.label`
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: 500;
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-3);
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:h=0,max:x=999,step:$=1,disabled:b=!1,size:v="medium",variant:f="default",allowDirectInput:y=!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(h,Math.min(x,e));r!==o&&g(r),F(!1)},P=()=>{if(b)return;const e=Math.max(h,o-$);K(e)},U=()=>{if(b)return;const e=Math.min(x,o+$);K(e)},G=()=>{if(E(!1),""===I)return void T(o.toString());const e=parseInt(I,10);if(isNaN(e)||e<h||e>x)return T(o.toString()),void F(!1);K(e)},H=b||o<=h,J=b||o>=x,L=k||B,O=S&&!L;return e.jsxs(n,{className:D,$sx:W,children:[w&&e.jsx(i,{$size:v,$disabled:b,children:w}),e.jsxs(a,{$size:v,$variant:f,$disabled:b,$error:L,$success:O,$width:N,$maxWidth:q,$height:C,children:[e.jsx(s,{onClick:P,disabled:H,$size:v,$variant:f,type:"button",children:e.jsx(l.Minus,{color:"grey-3",size:"small"===v?16:"large"===v?20:16})}),y?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<h||o>x)},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:b,placeholder:m,$size:v,$error:L,$success:O,$variant:f}):e.jsx(d,{$size:v,$variant:f,children:e.jsx("span",{style:{fontSize:"small"===v?14:16,fontWeight:500,color:"var(--color-grey-2)",margin:0},children:o})}),e.jsx(u,{onClick:U,disabled:J,$size:v,$variant:f,type:"button",children:e.jsx(t.Plus,{color:"white",size:"small"===v?16:"large"===v?20:16})})]}),(z||j||M)&&e.jsxs(p,{$size:v,$error:L,$success:O,children:[L&&j,O&&M,!L&&!O&&z]})]})};
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]})]})};
@@ -3,16 +3,19 @@ export interface CourseSeatsCardProps {
3
3
  courseId: string;
4
4
  courseName: string;
5
5
  courseImage: string;
6
+ href?: string;
6
7
  assignedSeats: number;
7
8
  totalSeats: number;
8
9
  alert: React.ReactNode;
9
10
  assignedUsers: {
10
11
  id: string;
11
12
  imageUrl: string;
13
+ url?: string;
14
+ name: string;
12
15
  }[];
13
16
  onManageSeats: (courseId: string) => void;
14
17
  onAddSeats: (courseId: string) => void;
15
18
  sx?: string;
16
19
  }
17
- export declare const CourseSeatsCard: ({ courseId, courseName, alert, courseImage, assignedSeats, totalSeats, assignedUsers, onManageSeats, onAddSeats, sx, }: CourseSeatsCardProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const CourseSeatsCard: ({ courseId, courseName, alert, courseImage, href, assignedSeats, totalSeats, assignedUsers, onManageSeats, onAddSeats, sx, }: CourseSeatsCardProps) => import("react/jsx-runtime").JSX.Element;
18
21
  //# sourceMappingURL=course-seats.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"course-seats.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/course-seats/course-seats.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,aAAa,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KAClB,EAAE,CAAC;IACJ,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,eAAe,2HAWzB,oBAAoB,4CAoEtB,CAAC"}
1
+ {"version":3,"file":"course-seats.d.ts","sourceRoot":"","sources":["../../../../../src/components/card/course-seats/course-seats.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,aAAa,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACJ,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,eAAe,iIAYzB,oBAAoB,4CA8FtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "2.14.71",
3
+ "version": "2.14.73",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "license": "MIT",