@cgi-learning-hub/ui 1.3.5-dev.1739377644 → 1.3.5-dev.1739381298
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/ToggleButtonGroup-BwIIYgZY.cjs +99 -0
- package/dist/{TableSortLabel-BXto8Tc7.js → ToggleButtonGroup-CdKu5hQa.js} +2140 -1665
- package/dist/components/Alert/Alert.es.js +13 -4
- package/dist/components/FileList/FileList.cjs.js +1 -1
- package/dist/components/FileList/FileList.es.js +8 -9
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -1
- package/dist/components/ImagePicker/ImagePicker.es.js +46 -22
- package/dist/components/Loader/Loader.d.ts +1 -2
- package/dist/components/LoaderBackdrop/LoaderBackdrop.d.ts +1 -2
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +1 -1
- package/dist/components/QueryError/QueryError.d.ts +2 -2
- package/dist/components/ResourceCard/ResourceCard.cjs.js +1 -1
- package/dist/components/ResourceCard/ResourceCard.d.ts +2 -2
- package/dist/components/ResourceCard/ResourceCard.es.js +73 -79
- package/dist/components/ResourceCard/style.es.js +65 -57
- package/dist/components/SearchInput/SearchInput.d.ts +1 -2
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.es.js +285 -279
- package/dist/components/stories/ResourceCard.stories.cjs.js +1 -1
- package/dist/components/stories/ResourceCard.stories.es.js +9 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +285 -279
- package/package.json +1 -1
- package/dist/TableSortLabel-h3un69IU.cjs +0 -98
|
@@ -4,10 +4,19 @@ const d = l(i)(() => ({
|
|
|
4
4
|
"& .MuiAlertTitle-root": {
|
|
5
5
|
fontWeight: 600
|
|
6
6
|
}
|
|
7
|
-
})), s = (t) => /* @__PURE__ */ e(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
})), s = (t) => /* @__PURE__ */ e(
|
|
8
|
+
d,
|
|
9
|
+
{
|
|
10
|
+
...t,
|
|
11
|
+
severity: t.severity,
|
|
12
|
+
color: t.severity,
|
|
13
|
+
variant: "standard",
|
|
14
|
+
children: [
|
|
15
|
+
t.title && /* @__PURE__ */ r(n, { children: t.title }),
|
|
16
|
+
t.children
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
11
20
|
export {
|
|
12
21
|
s as default
|
|
13
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),c=require("@mui/material")
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("@mui/material"),l=require("./FileListItem.cjs.js"),x=require("../../Box-CVaz7diG.cjs"),m=({files:i,onDelete:r,onClick:s,onDownload:n})=>e.jsx(x.Box,{sx:{display:"flex",flexDirection:"column"},children:i.map((o,t)=>e.jsxs(e.Fragment,{children:[e.jsx(l,{file:o,onClick:s,onDelete:r,onDownload:n},t),t<i.length-1&&e.jsx(c.Divider,{variant:"middle"})]}))});module.exports=m;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s, Fragment as a } from "react/jsx-runtime";
|
|
2
2
|
import { Divider as n } from "@mui/material";
|
|
3
|
-
import "react";
|
|
4
3
|
import p from "./FileListItem.es.js";
|
|
5
4
|
import { B as d } from "../../Box-Cpg9IWKr.js";
|
|
6
|
-
const
|
|
5
|
+
const u = ({
|
|
7
6
|
files: i,
|
|
8
|
-
onDelete:
|
|
9
|
-
onClick:
|
|
10
|
-
onDownload:
|
|
7
|
+
onDelete: e,
|
|
8
|
+
onClick: m,
|
|
9
|
+
onDownload: o
|
|
11
10
|
}) => /* @__PURE__ */ r(d, { sx: { display: "flex", flexDirection: "column" }, children: i.map((l, t) => /* @__PURE__ */ s(a, { children: [
|
|
12
11
|
/* @__PURE__ */ r(
|
|
13
12
|
p,
|
|
14
13
|
{
|
|
15
14
|
file: l,
|
|
16
|
-
onClick:
|
|
17
|
-
onDelete:
|
|
18
|
-
onDownload:
|
|
15
|
+
onClick: m,
|
|
16
|
+
onDelete: e,
|
|
17
|
+
onDownload: o
|
|
19
18
|
},
|
|
20
19
|
t
|
|
21
20
|
),
|
|
22
21
|
t < i.length - 1 && /* @__PURE__ */ r(n, { variant: "middle" })
|
|
23
22
|
] })) });
|
|
24
23
|
export {
|
|
25
|
-
|
|
24
|
+
u as default
|
|
26
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),c=require("../../createSvgIcon-CWNQW6u6.cjs"),o=require("@mui/material"),I=require("react"),S=require("../../index-BUATG6-f.cjs"),C=require("../../Stack-B68ooSQ-.cjs"),i=require("../../Typography-Y-OGmT9M.cjs"),p=c.createSvgIcon(e.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),F=c.createSvgIcon(e.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),w=c.createSvgIcon(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),D=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez-déposez"})," ou ",e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"cliquez"})," pour choisir une image"]}),A=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez"})," une image"]}),P=({defaultLabel:h=e.jsx(D,{}),dragLabel:g=e.jsx(A,{}),information:n,onFileChange:s=t=>{},width:x="160px",height:m="160px",initialFile:u=null,...j})=>{const[t,l]=I.useState(u),y=r=>{const d=r[0]||null;l(d),s(d)},f=r=>{r.stopPropagation(),l(null),s(null)},b=r=>{r.stopPropagation(),a()},{open:a,getRootProps:k,getInputProps:z,isDragActive:v}=S.useDropzone({...j,maxFiles:1,onDropAccepted:y,accept:{"image/*":[".png",".jpeg",".jpg",".gif"]},noClick:!0});return e.jsxs(C.Stack,{direction:"column",justifyContent:"center",alignItems:"center",width:x,minWidth:"150px",minHeight:"150px",height:m,borderRadius:1,sx:{cursor:"pointer",position:"relative",background:`${!t&&"linear-gradient(180deg, #F5F7F9 0%, #FFF 100%)"}`,border:`${!t&&"1px dashed"}`,borderColor:r=>!t&&r.palette.grey.main},...k({onClick:a}),children:[e.jsx("input",{...z()}),t?e.jsxs(e.Fragment,{children:[e.jsxs(o.Box,{sx:{position:"absolute",top:"0.5rem",right:"0.5rem",display:"flex",gap:"0.3rem"},children:[e.jsx(o.Box,{onClick:b,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",justifyContent:"center",boxShadow:1,width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(F,{fontSize:"small"})}),e.jsx(o.Box,{onClick:f,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",boxShadow:1,justifyContent:"center",width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(w,{fontSize:"small"})})]}),e.jsx("img",{src:typeof t=="string"?t:URL.createObjectURL(t),alt:typeof t=="string"?t:t.name,style:{width:"100%",height:"100%",maxWidth:"100%",objectFit:"cover",borderRadius:"5px"}})]}):e.jsx(e.Fragment,{children:v?e.jsxs(e.Fragment,{children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),g,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]}):e.jsxs(o.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0.5rem",gap:"0.3rem"},children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),h,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]})})]})};module.exports=P;
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),c=require("../../createSvgIcon-CWNQW6u6.cjs"),o=require("@mui/material"),I=require("react"),S=require("../../index-BUATG6-f.cjs"),C=require("../../Stack-B68ooSQ-.cjs"),i=require("../../Typography-Y-OGmT9M.cjs"),p=c.createSvgIcon(e.jsx("path",{d:"M19 7v2.99s-1.99.01-2 0V7h-3s.01-1.99 0-2h3V2h2v3h3v2zm-3 4V8h-3V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-8zM5 19l3-4 2 3 3-4 4 5z"}),"AddPhotoAlternate"),F=c.createSvgIcon(e.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Create"),w=c.createSvgIcon(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),D=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez-déposez"})," ","ou"," ",e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"cliquez"})," ","pour choisir une image"]}),A=()=>e.jsxs(i.Typography,{textAlign:"center",fontSize:"14px",color:"grey.darker",children:[e.jsx(o.Box,{component:"span",fontWeight:"bold",children:"Glissez"})," ","une image"]}),P=({defaultLabel:h=e.jsx(D,{}),dragLabel:g=e.jsx(A,{}),information:n,onFileChange:s=t=>{},width:x="160px",height:m="160px",initialFile:u=null,...j})=>{const[t,l]=I.useState(u),y=r=>{const d=r[0]||null;l(d),s(d)},f=r=>{r.stopPropagation(),l(null),s(null)},b=r=>{r.stopPropagation(),a()},{open:a,getRootProps:k,getInputProps:z,isDragActive:v}=S.useDropzone({...j,maxFiles:1,onDropAccepted:y,accept:{"image/*":[".png",".jpeg",".jpg",".gif"]},noClick:!0});return e.jsxs(C.Stack,{direction:"column",justifyContent:"center",alignItems:"center",width:x,minWidth:"150px",minHeight:"150px",height:m,borderRadius:1,sx:{cursor:"pointer",position:"relative",background:`${!t&&"linear-gradient(180deg, #F5F7F9 0%, #FFF 100%)"}`,border:`${!t&&"1px dashed"}`,borderColor:r=>!t&&r.palette.grey.main},...k({onClick:a}),children:[e.jsx("input",{...z()}),t?e.jsxs(e.Fragment,{children:[e.jsxs(o.Box,{sx:{position:"absolute",top:"0.5rem",right:"0.5rem",display:"flex",gap:"0.3rem"},children:[e.jsx(o.Box,{onClick:b,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",justifyContent:"center",boxShadow:1,width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(F,{fontSize:"small"})}),e.jsx(o.Box,{onClick:f,sx:{backgroundColor:"common.white",display:"flex",borderRadius:"3px",alignItems:"center",boxShadow:1,justifyContent:"center",width:"2rem",height:"2rem",cursor:"pointer","&:hover":{backgroundColor:"grey.darker","& .MuiSvgIcon-root":{fill:r=>r.palette.common.white}}},children:e.jsx(w,{fontSize:"small"})})]}),e.jsx("img",{src:typeof t=="string"?t:URL.createObjectURL(t),alt:typeof t=="string"?t:t.name,style:{width:"100%",height:"100%",maxWidth:"100%",objectFit:"cover",borderRadius:"5px"}})]}):e.jsx(e.Fragment,{children:v?e.jsxs(e.Fragment,{children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),g,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]}):e.jsxs(o.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",padding:"0.5rem",gap:"0.3rem"},children:[e.jsx(p,{color:"primary",style:{width:"2.5rem",height:"2.5rem"}}),h,n&&e.jsx(i.Typography,{textAlign:"center",fontSize:"12px",color:"grey",children:n})]})})]})};module.exports=P;
|
|
@@ -13,12 +13,16 @@ const m = a(/* @__PURE__ */ e("path", {
|
|
|
13
13
|
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"
|
|
14
14
|
}), "Delete"), P = () => /* @__PURE__ */ o(l, { textAlign: "center", fontSize: "14px", color: "grey.darker", children: [
|
|
15
15
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "Glissez-déposez" }),
|
|
16
|
-
"
|
|
16
|
+
" ",
|
|
17
|
+
"ou",
|
|
18
|
+
" ",
|
|
17
19
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "cliquez" }),
|
|
18
|
-
"
|
|
20
|
+
" ",
|
|
21
|
+
"pour choisir une image"
|
|
19
22
|
] }), M = () => /* @__PURE__ */ o(l, { textAlign: "center", fontSize: "14px", color: "grey.darker", children: [
|
|
20
23
|
/* @__PURE__ */ e(n, { component: "span", fontWeight: "bold", children: "Glissez" }),
|
|
21
|
-
"
|
|
24
|
+
" ",
|
|
25
|
+
"une image"
|
|
22
26
|
] }), U = ({
|
|
23
27
|
defaultLabel: g = /* @__PURE__ */ e(P, {}),
|
|
24
28
|
dragLabel: u = /* @__PURE__ */ e(M, {}),
|
|
@@ -30,7 +34,9 @@ const m = a(/* @__PURE__ */ e("path", {
|
|
|
30
34
|
initialFile: y = null,
|
|
31
35
|
...b
|
|
32
36
|
}) => {
|
|
33
|
-
const [t, d] = w(
|
|
37
|
+
const [t, d] = w(
|
|
38
|
+
y
|
|
39
|
+
), z = (r) => {
|
|
34
40
|
const h = r[0] || null;
|
|
35
41
|
d(h), s(h);
|
|
36
42
|
}, k = (r) => {
|
|
@@ -147,26 +153,44 @@ const m = a(/* @__PURE__ */ e("path", {
|
|
|
147
153
|
}
|
|
148
154
|
)
|
|
149
155
|
] }) : /* @__PURE__ */ e(c, { children: S ? /* @__PURE__ */ o(c, { children: [
|
|
150
|
-
/* @__PURE__ */ e(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
156
|
+
/* @__PURE__ */ e(
|
|
157
|
+
m,
|
|
158
|
+
{
|
|
159
|
+
color: "primary",
|
|
160
|
+
style: {
|
|
161
|
+
width: "2.5rem",
|
|
162
|
+
height: "2.5rem"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
),
|
|
154
166
|
u,
|
|
155
167
|
i && /* @__PURE__ */ e(l, { textAlign: "center", fontSize: "12px", color: "grey", children: i })
|
|
156
|
-
] }) : /* @__PURE__ */ o(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
] }) : /* @__PURE__ */ o(
|
|
169
|
+
n,
|
|
170
|
+
{
|
|
171
|
+
sx: {
|
|
172
|
+
display: "flex",
|
|
173
|
+
flexDirection: "column",
|
|
174
|
+
alignItems: "center",
|
|
175
|
+
padding: "0.5rem",
|
|
176
|
+
gap: "0.3rem"
|
|
177
|
+
},
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ e(
|
|
180
|
+
m,
|
|
181
|
+
{
|
|
182
|
+
color: "primary",
|
|
183
|
+
style: {
|
|
184
|
+
width: "2.5rem",
|
|
185
|
+
height: "2.5rem"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
g,
|
|
190
|
+
i && /* @__PURE__ */ e(l, { textAlign: "center", fontSize: "12px", color: "grey", children: i })
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
) })
|
|
170
194
|
]
|
|
171
195
|
}
|
|
172
196
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../../assets/styles2.css');require('../../assets/styles.css');const e=require("react/jsx-runtime"),u=require("react")
|
|
1
|
+
"use strict";require('../../assets/styles2.css');require('../../assets/styles.css');const e=require("react/jsx-runtime"),u=require("react");require("../Alert/Alert.cjs.js");require("../../Button-C-bZSJCq.cjs");require("../../fr-JE-1WKP6.cjs");require("@mui/material");;/* empty css */;/* empty css */require("../ResourceCard/style.cjs.js");require("../SearchInput/SearchInput.cjs.js");const l=require("../TextInput/TextInput.cjs.js"),a=require("../../InputAdornment-CLIvW7Gk.cjs"),d=require("../../IconButton-BUCTqOFa.cjs"),r=require("../../createSvgIcon-CWNQW6u6.cjs"),p=r.createSvgIcon(e.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),q=r.createSvgIcon(e.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),w=s=>{const[n,i]=u.useState(!1),o=()=>i(t=>!t),c=t=>{t.preventDefault()};return e.jsx(l,{...s,variant:"outlined",label:s.label,type:n?"text":"password",InputProps:{endAdornment:e.jsx(a.InputAdornment,{position:"end",children:e.jsx(d.IconButton,{"aria-label":"toggle password visibility",onClick:o,onMouseDown:c,edge:"end",children:n?e.jsx(q,{}):e.jsx(p,{})})})}})};module.exports=w;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a } from "react";
|
|
3
|
-
import p from "../TextInput/TextInput.es.js";
|
|
4
3
|
import "../Alert/Alert.es.js";
|
|
5
4
|
import "../../Button-CSNPv43f.js";
|
|
6
5
|
import "../../fr-B3qrCNcK.js";
|
|
@@ -9,6 +8,7 @@ import '../../assets/styles2.css';import '../../assets/styles.css';/* empty css
|
|
|
9
8
|
/* empty css */
|
|
10
9
|
import "../ResourceCard/style.es.js";
|
|
11
10
|
import "../SearchInput/SearchInput.es.js";
|
|
11
|
+
import p from "../TextInput/TextInput.es.js";
|
|
12
12
|
import { I as c } from "../../InputAdornment-XfxRdI9K.js";
|
|
13
13
|
import { I as m } from "../../IconButton-CZvDgqOc.js";
|
|
14
14
|
import { c as r } from "../../createSvgIcon-Cd6y8E9W.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SerializedError } from '@reduxjs/toolkit';
|
|
2
2
|
import { FetchBaseQueryError } from '@reduxjs/toolkit/query';
|
|
3
|
-
export
|
|
3
|
+
export type QueryErrorProps = {
|
|
4
4
|
error: FetchBaseQueryError | SerializedError | undefined;
|
|
5
5
|
statusPrefix?: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
declare const QueryError: React.FunctionComponent<QueryErrorProps>;
|
|
8
8
|
export default QueryError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),m=require("../../createSvgIcon-CWNQW6u6.cjs"),d=require("@mui/material"),b=require("../EllipsisWithTooltip/EllipsisWithTooltip.cjs.js"),o=require("./style.cjs.js"),j=m.createSvgIcon(r.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),g=({isSelected:l=!1,onSelect:x=()=>{},image:u,title:n,defaultImage:h,propertyItems:i=[],infoIcons:s=[],size:t="md",width:p,onClick:c=()=>{}})=>(s=s.slice(0,3),r.jsx(d.Box,{sx:{width:p&&t==="md"?p:"320px"},children:r.jsxs(o.StyledCard,{selected:l,size:t,onClick:c,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),c==null||c())},role:"button",tabIndex:0,"aria-label":`Resource card for ${n}`,children:[r.jsx(o.SelectedIcon,{onClick:e=>{e.preventDefault(),e.stopPropagation(),x()},onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),x())},className:"selected-icon",selected:l,role:"button",tabIndex:0,"aria-label":l?"Unselect card":"Select card",children:r.jsx(j,{})}),r.jsx(d.Stack,{sx:{width:t=="sm"?110:"100%",display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},children:r.jsx(o.ResourceCardImage,{image:u,defaultImage:h,size:t,role:"img","aria-label":`Image for ${n}`})}),r.jsxs(o.ResourceCardBody,{size:t,children:[r.jsx(b,{typographyProps:{fontWeight:"700",fontSize:"1.1rem"},tooltipProps:{placement:"bottom",arrow:!0},children:n}),i.length>0&&i.map((e,a)=>r.jsxs(o.ResourcePropertyItem,{size:t,role:"group","aria-label":`Property ${a}`,children:[e.icon,r.jsx(o.ResourcePropertyText,{isLast:a===i.length-1,size:t,width:p,children:e.text})]},`property-${a}`)),r.jsx(o.PublicIconWrapper,{size:t,children:s.length>0&&s.map((e,a)=>r.jsx(d.Tooltip,{title:e.text,placement:"top",arrow:!0,children:r.jsx(o.ResourceIconItem,{size:t,role:"button",tabIndex:0,"aria-label":e.text,children:e.icon})},`info-${a}`))})]})]})}));module.exports=g;
|
|
@@ -8,7 +8,7 @@ export type InfoItem = {
|
|
|
8
8
|
icon: ReactNode;
|
|
9
9
|
};
|
|
10
10
|
export type ResourceCardSize = "md" | "sm";
|
|
11
|
-
export
|
|
11
|
+
export type ResourceCardProps = {
|
|
12
12
|
isSelected?: boolean;
|
|
13
13
|
onSelect?: () => void;
|
|
14
14
|
image?: string;
|
|
@@ -19,6 +19,6 @@ export interface ResourceCardProps {
|
|
|
19
19
|
size?: ResourceCardSize;
|
|
20
20
|
width?: string;
|
|
21
21
|
onClick?: () => void;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
declare const ResourceCard: React.FunctionComponent<ResourceCardProps>;
|
|
24
24
|
export default ResourceCard;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import w from "
|
|
6
|
-
const S =
|
|
2
|
+
import { c as h } from "../../createSvgIcon-Cd6y8E9W.js";
|
|
3
|
+
import { Box as b, Stack as x, Tooltip as f } from "@mui/material";
|
|
4
|
+
import g from "../EllipsisWithTooltip/EllipsisWithTooltip.es.js";
|
|
5
|
+
import { StyledCard as y, SelectedIcon as P, ResourceCardImage as R, ResourceCardBody as I, ResourcePropertyItem as D, ResourcePropertyText as $, PublicIconWrapper as v, ResourceIconItem as w } from "./style.es.js";
|
|
6
|
+
const S = h(/* @__PURE__ */ r("path", {
|
|
7
7
|
d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
|
|
8
8
|
}), "MoreVert"), B = ({
|
|
9
9
|
isSelected: c = !1,
|
|
@@ -18,8 +18,8 @@ const S = f(/* @__PURE__ */ r("path", {
|
|
|
18
18
|
width: d,
|
|
19
19
|
onClick: l = () => {
|
|
20
20
|
}
|
|
21
|
-
}) => (a = a.slice(0, 3), /* @__PURE__ */ r(
|
|
22
|
-
|
|
21
|
+
}) => (a = a.slice(0, 3), /* @__PURE__ */ r(b, { sx: { width: d && t === "md" ? d : "320px" }, children: /* @__PURE__ */ i(
|
|
22
|
+
y,
|
|
23
23
|
{
|
|
24
24
|
selected: c,
|
|
25
25
|
size: t,
|
|
@@ -32,7 +32,7 @@ const S = f(/* @__PURE__ */ r("path", {
|
|
|
32
32
|
"aria-label": `Resource card for ${n}`,
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ r(
|
|
35
|
-
|
|
35
|
+
P,
|
|
36
36
|
{
|
|
37
37
|
onClick: (e) => {
|
|
38
38
|
e.preventDefault(), e.stopPropagation(), m();
|
|
@@ -48,84 +48,78 @@ const S = f(/* @__PURE__ */ r("path", {
|
|
|
48
48
|
children: /* @__PURE__ */ r(S, {})
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */ r(
|
|
52
|
-
|
|
53
|
-
display: "flex",
|
|
54
|
-
alignItems: "center",
|
|
55
|
-
justifyContent: "center",
|
|
56
|
-
boxSizing: "border-box"
|
|
57
|
-
}, children: /* @__PURE__ */ r(
|
|
58
|
-
P,
|
|
51
|
+
/* @__PURE__ */ r(
|
|
52
|
+
x,
|
|
59
53
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
sx: {
|
|
55
|
+
width: t == "sm" ? 110 : "100%",
|
|
56
|
+
display: "flex",
|
|
57
|
+
alignItems: "center",
|
|
58
|
+
justifyContent: "center",
|
|
59
|
+
boxSizing: "border-box"
|
|
60
|
+
},
|
|
61
|
+
children: /* @__PURE__ */ r(
|
|
62
|
+
R,
|
|
63
|
+
{
|
|
64
|
+
image: s,
|
|
65
|
+
defaultImage: u,
|
|
66
|
+
size: t,
|
|
67
|
+
role: "img",
|
|
68
|
+
"aria-label": `Image for ${n}`
|
|
69
|
+
}
|
|
70
|
+
)
|
|
65
71
|
}
|
|
66
|
-
)
|
|
67
|
-
/* @__PURE__ */ i(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ i(I, { size: t, children: [
|
|
74
|
+
/* @__PURE__ */ r(
|
|
75
|
+
g,
|
|
76
|
+
{
|
|
77
|
+
typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
|
|
78
|
+
tooltipProps: { placement: "bottom", arrow: !0 },
|
|
79
|
+
children: n
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
p.length > 0 && p.map((e, o) => /* @__PURE__ */ i(
|
|
83
|
+
D,
|
|
84
|
+
{
|
|
85
|
+
size: t,
|
|
86
|
+
role: "group",
|
|
87
|
+
"aria-label": `Property ${o}`,
|
|
88
|
+
children: [
|
|
89
|
+
e.icon,
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
$,
|
|
92
|
+
{
|
|
93
|
+
isLast: o === p.length - 1,
|
|
94
|
+
size: t,
|
|
95
|
+
width: d,
|
|
96
|
+
children: e.text
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
`property-${o}`
|
|
102
|
+
)),
|
|
103
|
+
/* @__PURE__ */ r(v, { size: t, children: a.length > 0 && a.map((e, o) => /* @__PURE__ */ r(
|
|
104
|
+
f,
|
|
105
|
+
{
|
|
106
|
+
title: e.text,
|
|
107
|
+
placement: "top",
|
|
108
|
+
arrow: !0,
|
|
109
|
+
children: /* @__PURE__ */ r(
|
|
73
110
|
w,
|
|
74
|
-
{
|
|
75
|
-
typographyProps: { fontWeight: "700", fontSize: "1.1rem" },
|
|
76
|
-
tooltipProps: { placement: "bottom", arrow: !0 },
|
|
77
|
-
children: n
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
p.length > 0 && p.map((e, o) => /* @__PURE__ */ i(
|
|
81
|
-
I,
|
|
82
|
-
{
|
|
83
|
-
size: t,
|
|
84
|
-
role: "group",
|
|
85
|
-
"aria-label": `Property ${o}`,
|
|
86
|
-
children: [
|
|
87
|
-
e.icon,
|
|
88
|
-
/* @__PURE__ */ r(
|
|
89
|
-
D,
|
|
90
|
-
{
|
|
91
|
-
isLast: o === p.length - 1,
|
|
92
|
-
size: t,
|
|
93
|
-
width: d,
|
|
94
|
-
children: e.text
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
]
|
|
98
|
-
},
|
|
99
|
-
`property-${o}`
|
|
100
|
-
)),
|
|
101
|
-
/* @__PURE__ */ r(
|
|
102
|
-
$,
|
|
103
111
|
{
|
|
104
112
|
size: t,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
placement: "top",
|
|
110
|
-
arrow: !0,
|
|
111
|
-
children: /* @__PURE__ */ r(
|
|
112
|
-
v,
|
|
113
|
-
{
|
|
114
|
-
size: t,
|
|
115
|
-
role: "button",
|
|
116
|
-
tabIndex: 0,
|
|
117
|
-
"aria-label": e.text,
|
|
118
|
-
children: e.icon
|
|
119
|
-
}
|
|
120
|
-
)
|
|
121
|
-
},
|
|
122
|
-
`info-${o}`
|
|
123
|
-
))
|
|
113
|
+
role: "button",
|
|
114
|
+
tabIndex: 0,
|
|
115
|
+
"aria-label": e.text,
|
|
116
|
+
children: e.icon
|
|
124
117
|
}
|
|
125
118
|
)
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
119
|
+
},
|
|
120
|
+
`info-${o}`
|
|
121
|
+
)) })
|
|
122
|
+
] })
|
|
129
123
|
]
|
|
130
124
|
}
|
|
131
125
|
) }));
|
|
@@ -19,35 +19,37 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
|
|
|
19
19
|
visibility: "visible"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
})), m = t(r)(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
22
|
+
})), m = t(r)(
|
|
23
|
+
({ theme: e, selected: o }) => ({
|
|
24
|
+
position: "absolute",
|
|
25
|
+
top: 0,
|
|
26
|
+
right: 0,
|
|
27
|
+
width: "2rem",
|
|
28
|
+
height: "2rem",
|
|
29
|
+
background: e.palette.common.white,
|
|
30
|
+
display: "flex",
|
|
31
|
+
justifyContent: "center",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
padding: ".8rem",
|
|
34
|
+
borderRadius: ".5rem",
|
|
35
|
+
visibility: "visible",
|
|
36
|
+
opacity: 0,
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
transition: "opacity 0.2s ease-in-out, visibility 0.2s ease-in-out",
|
|
39
|
+
...o && {
|
|
40
|
+
background: e.palette.primary.lighter,
|
|
41
|
+
opacity: 1,
|
|
42
|
+
visibility: "visible"
|
|
43
|
+
},
|
|
44
|
+
"&:hover, &:focus": {
|
|
45
|
+
background: e.palette.primary.lighter,
|
|
46
|
+
opacity: 1
|
|
47
|
+
},
|
|
48
|
+
"& .MuiSvgIcon-root": {
|
|
49
|
+
color: e.palette.primary.main
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
), d = t(p)(({ size: e, image: o, defaultImage: i }) => ({
|
|
51
53
|
height: e == "sm" ? 85 : 180,
|
|
52
54
|
width: e == "sm" ? 85 : "calc(100% - 2rem)",
|
|
53
55
|
objectFit: "cover",
|
|
@@ -63,17 +65,19 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
|
|
|
63
65
|
})), l = t(n)(({ size: e }) => ({
|
|
64
66
|
padding: e == "sm" ? ".7rem 5px .7rem 0 !important" : "0 16px 16px 16px !important",
|
|
65
67
|
width: e === "sm" ? "calc(100% - 110px)" : "100%"
|
|
66
|
-
})), g = t(r)(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
})), g = t(r)(
|
|
69
|
+
({ size: e }) => ({
|
|
70
|
+
display: "flex",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
marginTop: "0.5rem",
|
|
73
|
+
...e === "sm" && {
|
|
74
|
+
svg: {
|
|
75
|
+
width: ".8em",
|
|
76
|
+
height: ".8em"
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
79
|
+
})
|
|
80
|
+
), x = t(r)(({ size: e, width: o, isLast: i }) => ({
|
|
77
81
|
marginLeft: e === "sm" ? ".3rem" : ".5rem",
|
|
78
82
|
fontSize: e === "sm" ? "12px" : "15px",
|
|
79
83
|
"& .MuiTypography-root": {
|
|
@@ -86,25 +90,29 @@ const c = t(a)(({ theme: e, selected: o, size: i }) => ({
|
|
|
86
90
|
overflow: "hidden",
|
|
87
91
|
maxWidth: e === "sm" ? "110px" : "172px"
|
|
88
92
|
}
|
|
89
|
-
})), u = t(r)(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
93
|
+
})), u = t(r)(
|
|
94
|
+
({ size: e }) => ({
|
|
95
|
+
display: "inline-flex",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
justifyContent: "center",
|
|
98
|
+
width: "fit-content",
|
|
99
|
+
height: "fit-content",
|
|
100
|
+
...e === "sm" && {
|
|
101
|
+
svg: {
|
|
102
|
+
width: ".8em",
|
|
103
|
+
height: ".8em"
|
|
104
|
+
}
|
|
99
105
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
})
|
|
107
|
+
), h = t(r)(
|
|
108
|
+
({ size: e }) => ({
|
|
109
|
+
position: "absolute",
|
|
110
|
+
bottom: e === "sm" ? ".65rem" : "16px",
|
|
111
|
+
right: e === "sm" ? "8px" : "16px",
|
|
112
|
+
display: "flex",
|
|
113
|
+
gap: ".2rem"
|
|
114
|
+
})
|
|
115
|
+
);
|
|
108
116
|
export {
|
|
109
117
|
h as PublicIconWrapper,
|
|
110
118
|
l as ResourceCardBody,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
2
|
-
export
|
|
3
|
-
}
|
|
2
|
+
export type SearchInputProps = InputBaseProps & {};
|
|
4
3
|
declare const SearchInput: React.FunctionComponent<SearchInputProps>;
|
|
5
4
|
export default SearchInput;
|