@cgi-learning-hub/ui 1.3.3-dev.1732633701 → 1.3.3-dev.1732634114

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";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),t=require("../Button/Button.cjs.js"),i=require("../../DialogContent-C0L4r0-p.cjs"),l=require("../../DialogTitle-DemSKN6H.cjs"),c=a=>{const[s,o]=u.useState(!1),r=()=>o(!0),n=()=>o(!1);return e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"outlined",onClick:r,children:"Open dialog"}),e.jsxs(i.Dialog,{...a,open:s,onClose:n,children:[e.jsx(l.DialogTitle,{children:"Dialog title"}),e.jsx(i.DialogContent,{children:e.jsxs(l.DialogContentText,{children:["Dialog content text",e.jsx("br",{}),e.jsx("br",{}),"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."]})}),e.jsxs(i.DialogActions,{children:[e.jsx(t,{variant:"text",onClick:n,children:"Cancel"}),e.jsx(t,{variant:"text",onClick:()=>!0,children:"Save"})]})]})]})},d={title:"Components/Dialog",component:c},m={args:{}};exports.Default=m;exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("react"),t=require("../Button/Button.cjs.js"),o=require("../../DialogContent-C0L4r0-p.cjs"),l=require("../../DialogTitle-DemSKN6H.cjs"),u=a=>{const[s,i]=c.useState(!1),r=()=>i(!0),n=()=>i(!1);return e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"outlined",onClick:r,children:"Open dialog"}),e.jsxs(o.Dialog,{...a,open:s,onClose:n,children:[e.jsx(l.DialogTitle,{children:"Dialog title"}),e.jsx(o.DialogContent,{children:e.jsxs(l.DialogContentText,{children:["Dialog content text",e.jsx("br",{}),e.jsx("br",{}),"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."]})}),e.jsxs(o.DialogActions,{children:[e.jsx(t,{variant:"text",onClick:n,children:"Cancel"}),e.jsx(t,{variant:"text",onClick:()=>!0,children:"Save"})]})]})]})},d={title:"Components/Dialog",component:u,argTypes:{disableEscapeKeyDown:{control:"boolean"},fullScreen:{control:"boolean"},fullWidth:{control:"boolean"},maxWidth:{control:"select",options:["xs","sm","md","lg","xl",!1]}}},m={args:{disableEscapeKeyDown:!1,fullScreen:!1,fullWidth:!1,maxWidth:"sm"}};exports.Default=m;exports.default=d;
@@ -1,33 +1,53 @@
1
- import { jsxs as t, Fragment as s, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as o, Fragment as s, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as c } from "react";
3
- import i from "../Button/Button.es.js";
4
- import { D as u, b as m, a as d } from "../../DialogContent-B_NH_if8.js";
5
- import { a as p, D as g } from "../../DialogTitle-Bx7712Li.js";
6
- const D = (a) => {
7
- const [l, o] = c(!1), r = () => o(!0), n = () => o(!1);
8
- return /* @__PURE__ */ t(s, { children: [
9
- /* @__PURE__ */ e(i, { variant: "outlined", onClick: r, children: "Open dialog" }),
10
- /* @__PURE__ */ t(u, { ...a, open: l, onClose: n, children: [
3
+ import t from "../Button/Button.es.js";
4
+ import { D as u, b as d, a as m } from "../../DialogContent-B_NH_if8.js";
5
+ import { a as p, D as f } from "../../DialogTitle-Bx7712Li.js";
6
+ const g = (a) => {
7
+ const [n, i] = c(!1), r = () => i(!0), l = () => i(!1);
8
+ return /* @__PURE__ */ o(s, { children: [
9
+ /* @__PURE__ */ e(t, { variant: "outlined", onClick: r, children: "Open dialog" }),
10
+ /* @__PURE__ */ o(u, { ...a, open: n, onClose: l, children: [
11
11
  /* @__PURE__ */ e(p, { children: "Dialog title" }),
12
- /* @__PURE__ */ e(m, { children: /* @__PURE__ */ t(g, { children: [
12
+ /* @__PURE__ */ e(d, { children: /* @__PURE__ */ o(f, { children: [
13
13
  "Dialog content text",
14
14
  /* @__PURE__ */ e("br", {}),
15
15
  /* @__PURE__ */ e("br", {}),
16
16
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
17
17
  ] }) }),
18
- /* @__PURE__ */ t(d, { children: [
19
- /* @__PURE__ */ e(i, { variant: "text", onClick: n, children: "Cancel" }),
20
- /* @__PURE__ */ e(i, { variant: "text", onClick: () => !0, children: "Save" })
18
+ /* @__PURE__ */ o(m, { children: [
19
+ /* @__PURE__ */ e(t, { variant: "text", onClick: l, children: "Cancel" }),
20
+ /* @__PURE__ */ e(t, { variant: "text", onClick: () => !0, children: "Save" })
21
21
  ] })
22
22
  ] })
23
23
  ] });
24
- }, b = {
24
+ }, v = {
25
25
  title: "Components/Dialog",
26
- component: D
26
+ component: g,
27
+ argTypes: {
28
+ disableEscapeKeyDown: {
29
+ control: "boolean"
30
+ },
31
+ fullScreen: {
32
+ control: "boolean"
33
+ },
34
+ fullWidth: {
35
+ control: "boolean"
36
+ },
37
+ maxWidth: {
38
+ control: "select",
39
+ options: ["xs", "sm", "md", "lg", "xl", !1]
40
+ }
41
+ }
27
42
  }, q = {
28
- args: {}
43
+ args: {
44
+ disableEscapeKeyDown: !1,
45
+ fullScreen: !1,
46
+ fullWidth: !1,
47
+ maxWidth: "sm"
48
+ }
29
49
  };
30
50
  export {
31
51
  q as Default,
32
- b as default
52
+ v as default
33
53
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../../createSvgIcon-DQqazotA.cjs"),t=require("../../IconButton-5LMERRPL.cjs"),n=c.createSvgIcon(e.jsx("path",{d:"M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7s-.54.11-.7-.12c-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21m6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12M14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38"}),"Fingerprint"),s={title:"Components/IconButton",component:t.IconButton},o={args:{children:e.jsx(n,{}),onClick:()=>alert("Alert"),disabled:!1}};exports.Default=o;exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("../../createSvgIcon-DQqazotA.cjs"),l=require("../../IconButton-5LMERRPL.cjs"),t=o.createSvgIcon(e.jsx("path",{d:"M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"}),"School"),n={title:"Components/IconButton",component:l.IconButton,argTypes:{color:{control:"select",options:["inherit","default","primary","secondary","error","info","success","warning"]},disabled:{control:"boolean"},disableFocusRipple:{control:"boolean"},disableRipple:{control:"boolean"},edge:{control:"radio",options:["end","start",!1]},size:{control:"radio",options:["small","medium","large"]}}},s={args:{children:e.jsx(t,{}),color:"default",disabled:!1,disableFocusRipple:!1,disableRipple:!1,edge:!1,size:"medium"}};exports.Default=s;exports.default=n;
@@ -1,19 +1,55 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { c as t } from "../../createSvgIcon-BS0Qe85N.js";
3
- import { I as o } from "../../IconButton-DLcGpM1F.js";
4
- const s = t(/* @__PURE__ */ c("path", {
5
- d: "M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7s-.54.11-.7-.12c-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21m6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12M14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38"
6
- }), "Fingerprint"), a = {
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as e } from "../../createSvgIcon-BS0Qe85N.js";
3
+ import { I as l } from "../../IconButton-DLcGpM1F.js";
4
+ const s = e(/* @__PURE__ */ o("path", {
5
+ d: "M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3 1 9l11 6 9-4.91V17h2V9z"
6
+ }), "School"), r = {
7
7
  title: "Components/IconButton",
8
- component: o
8
+ component: l,
9
+ argTypes: {
10
+ color: {
11
+ control: "select",
12
+ options: [
13
+ "inherit",
14
+ "default",
15
+ "primary",
16
+ "secondary",
17
+ "error",
18
+ "info",
19
+ "success",
20
+ "warning"
21
+ ]
22
+ },
23
+ disabled: {
24
+ control: "boolean"
25
+ },
26
+ disableFocusRipple: {
27
+ control: "boolean"
28
+ },
29
+ disableRipple: {
30
+ control: "boolean"
31
+ },
32
+ edge: {
33
+ control: "radio",
34
+ options: ["end", "start", !1]
35
+ },
36
+ size: {
37
+ control: "radio",
38
+ options: ["small", "medium", "large"]
39
+ }
40
+ }
9
41
  }, i = {
10
42
  args: {
11
- children: /* @__PURE__ */ c(s, {}),
12
- onClick: () => alert("Alert"),
13
- disabled: !1
43
+ children: /* @__PURE__ */ o(s, {}),
44
+ color: "default",
45
+ disabled: !1,
46
+ disableFocusRipple: !1,
47
+ disableRipple: !1,
48
+ edge: !1,
49
+ size: "medium"
14
50
  }
15
51
  };
16
52
  export {
17
53
  i as Default,
18
- a as default
54
+ r as default
19
55
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),O=require("react"),r=require("../../identifier-DTh6b5Gz.cjs"),d=require("../../Tabs-CUpcnsPl.cjs"),P=require("../../DefaultPropsProvider-eVMpAUQg.cjs"),E=require("../../useThemeProps-BoO3MMZc.cjs");function M(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const a=M(O),f=a.createContext(null);process.env.NODE_ENV!=="production"&&(f.displayName="TabContext");function D(){const[e,n]=a.useState(null);return a.useEffect(()=>{n(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function y(e){const{children:n,value:t}=e,o=D(),p=a.useMemo(()=>({idPrefix:o,value:t}),[o,t]);return s.jsx(f.Provider,{value:p,children:n})}process.env.NODE_ENV!=="production"&&(y.propTypes={children:r.PropTypes.node,value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).isRequired});function v(){return a.useContext(f)}function x(e,n){const{idPrefix:t}=e;return t===null?null:`${e.idPrefix}-P-${n}`}function m(e,n){const{idPrefix:t}=e;return t===null?null:`${e.idPrefix}-T-${n}`}const h=a.forwardRef(function(n,t){const{children:o,...p}=n,i=v();if(i===null)throw new TypeError("No TabContext provided");const l=a.Children.map(o,u=>a.isValidElement(u)?a.cloneElement(u,{"aria-controls":x(i,u.props.value),id:m(i,u.props.value)}):null);return s.jsx(d.Tabs,{...p,ref:t,value:i.value,children:l})});process.env.NODE_ENV!=="production"&&(h.propTypes={children:r.PropTypes.node});function R(e){return r.generateUtilityClass("MuiTabPanel",e)}r.generateUtilityClasses("MuiTabPanel",["root","hidden"]);const q=e=>{const{classes:n,hidden:t}=e,o={root:["root",t&&"hidden"]};return P.composeClasses(o,R,n)},w=P.styled("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,n)=>n.root})(({theme:e})=>({padding:e.spacing(3)})),T=a.forwardRef(function(n,t){const o=E.useThemeProps({props:n,name:"MuiTabPanel"}),{children:p,className:i,value:l,keepMounted:u=!1,...j}=o,b={...o},g=q(b),c=v();if(c===null)throw new TypeError("No TabContext provided");const C=x(c,l),N=m(c,l);return s.jsx(w,{"aria-labelledby":N,className:r.clsx(g.root,i),hidden:l!==c.value,id:C,ref:t,role:"tabpanel",ownerState:b,...j,children:(u||l===c.value)&&p})});process.env.NODE_ENV!=="production"&&(T.propTypes={children:r.PropTypes.node,classes:r.PropTypes.object,className:r.PropTypes.string,keepMounted:r.PropTypes.bool,sx:r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.oneOfType([r.PropTypes.func,r.PropTypes.object,r.PropTypes.bool])),r.PropTypes.func,r.PropTypes.object]),value:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).isRequired});const _=e=>s.jsxs(y,{value:"1",children:[s.jsxs(h,{...e,"aria-label":"lab API tabs example",children:[s.jsx(d.Tab,{label:"Utilisateurs",value:"1"}),s.jsx(d.Tab,{label:"Groupes",value:"2"}),s.jsx(d.Tab,{label:"Demandes d'inscription",value:"3"})]}),s.jsx(T,{value:"1",children:"Utilisateurs"}),s.jsx(T,{value:"2",children:"Groupes"}),s.jsx(T,{value:"3",children:"Demandes d'inscription"})]}),S={title:"Components/TabList",component:_},U={args:{}};exports.Default=U;exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),y=require("react"),o=require("../../identifier-DTh6b5Gz.cjs"),d=require("../../Tabs-CUpcnsPl.cjs"),P=require("../../DefaultPropsProvider-eVMpAUQg.cjs"),M=require("../../useThemeProps-BoO3MMZc.cjs");function w(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const l=w(y),T=l.createContext(null);process.env.NODE_ENV!=="production"&&(T.displayName="TabContext");function E(){const[e,t]=l.useState(null);return l.useEffect(()=>{t(`mui-p-${Math.round(Math.random()*1e5)}`)},[]),e}function v(e){const{children:t,value:r}=e,n=E(),i=l.useMemo(()=>({idPrefix:n,value:r}),[n,r]);return s.jsx(T.Provider,{value:i,children:t})}process.env.NODE_ENV!=="production"&&(v.propTypes={children:o.PropTypes.node,value:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]).isRequired});function m(){return l.useContext(T)}function h(e,t){const{idPrefix:r}=e;return r===null?null:`${e.idPrefix}-P-${t}`}function x(e,t){const{idPrefix:r}=e;return r===null?null:`${e.idPrefix}-T-${t}`}const g=l.forwardRef(function(t,r){const{children:n,...i}=t,a=m();if(a===null)throw new TypeError("No TabContext provided");const c=l.Children.map(n,u=>l.isValidElement(u)?l.cloneElement(u,{"aria-controls":h(a,u.props.value),id:x(a,u.props.value)}):null);return s.jsx(d.Tabs,{...i,ref:r,value:a.value,children:c})});process.env.NODE_ENV!=="production"&&(g.propTypes={children:o.PropTypes.node});function S(e){return o.generateUtilityClass("MuiTabPanel",e)}o.generateUtilityClasses("MuiTabPanel",["root","hidden"]);const I=e=>{const{classes:t,hidden:r}=e,n={root:["root",r&&"hidden"]};return P.composeClasses(n,S,t)},R=P.styled("div",{name:"MuiTabPanel",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({padding:e.spacing(3)})),b=l.forwardRef(function(t,r){const n=M.useThemeProps({props:t,name:"MuiTabPanel"}),{children:i,className:a,value:c,keepMounted:u=!1,...C}=n,f={...n},j=I(f),p=m();if(p===null)throw new TypeError("No TabContext provided");const N=h(p,c),O=x(p,c);return s.jsx(R,{"aria-labelledby":O,className:o.clsx(j.root,a),hidden:c!==p.value,id:N,ref:r,role:"tabpanel",ownerState:f,...C,children:(u||c===p.value)&&i})});process.env.NODE_ENV!=="production"&&(b.propTypes={children:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,keepMounted:o.PropTypes.bool,sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object]),value:o.PropTypes.oneOfType([o.PropTypes.number,o.PropTypes.string]).isRequired});const q=e=>{const[t,r]=y.useState("1"),n=(i,a)=>r(a);return s.jsxs(v,{value:t,children:[s.jsxs(g,{...e,onChange:n,"aria-label":"lib tablist example",children:[s.jsx(d.Tab,{label:"Item one",value:"1"}),s.jsx(d.Tab,{label:"Item two",value:"2"}),s.jsx(d.Tab,{label:"Item three",value:"3"})]}),s.jsx(b,{value:"1",children:"Item one"}),s.jsx(b,{value:"2",children:"Item two"}),s.jsx(b,{value:"3",children:"Item three"})]})},D={title:"Components/TabList",component:q,argTypes:{allowScrollButtonsMobile:{control:"boolean"},centered:{control:"boolean"},indicatorColor:{control:"radio",options:["primary","secondary"]},orientation:{control:"radio",options:["horizontal","vertical"]},scrollButtons:{control:"radio",options:["auto",!0,!1]},textColor:{control:"radio",options:["inherit","primary","secondary"]},variant:{control:"radio",options:["fullWidth","scrollable","standard"]},visibleScrollbar:{control:"boolean"}}},_={args:{allowScrollButtonsMobile:!1,centered:!1,indicatorColor:"primary",orientation:"horizontal",scrollButtons:"auto",textColor:"primary",variant:"standard",visibleScrollbar:!1}};exports.Default=_;exports.default=D;
@@ -1,31 +1,32 @@
1
- import { jsx as s, jsxs as T } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as v } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
- import { P as n, I as M, H as O, G as w } from "../../identifier-B7MO0PvI.js";
3
+ import { useState as w } from "react";
4
+ import { P as o, I, H as M, G as O } from "../../identifier-B7MO0PvI.js";
4
5
  import { a as R, T as f } from "../../Tabs-BqJSX1la.js";
5
- import { s as D, c as U } from "../../DefaultPropsProvider-BYFwNPLt.js";
6
- import { u as I } from "../../useThemeProps-B9UyPpzT.js";
6
+ import { s as S, c as V } from "../../DefaultPropsProvider-BYFwNPLt.js";
7
+ import { u as $ } from "../../useThemeProps-B9UyPpzT.js";
7
8
  const b = /* @__PURE__ */ r.createContext(null);
8
9
  process.env.NODE_ENV !== "production" && (b.displayName = "TabContext");
9
- function $() {
10
- const [e, o] = r.useState(null);
10
+ function j() {
11
+ const [e, t] = r.useState(null);
11
12
  return r.useEffect(() => {
12
- o(`mui-p-${Math.round(Math.random() * 1e5)}`);
13
+ t(`mui-p-${Math.round(Math.random() * 1e5)}`);
13
14
  }, []), e;
14
15
  }
15
- function v(e) {
16
+ function h(e) {
16
17
  const {
17
- children: o,
18
- value: t
19
- } = e, a = $(), c = r.useMemo(() => ({
18
+ children: t,
19
+ value: n
20
+ } = e, a = j(), i = r.useMemo(() => ({
20
21
  idPrefix: a,
21
- value: t
22
- }), [a, t]);
23
- return /* @__PURE__ */ s(b.Provider, {
24
- value: c,
25
- children: o
22
+ value: n
23
+ }), [a, n]);
24
+ return /* @__PURE__ */ l(b.Provider, {
25
+ value: i,
26
+ children: t
26
27
  });
27
28
  }
28
- process.env.NODE_ENV !== "production" && (v.propTypes = {
29
+ process.env.NODE_ENV !== "production" && (h.propTypes = {
29
30
  // ┌────────────────────────────── Warning ──────────────────────────────┐
30
31
  // │ These PropTypes are generated from the TypeScript type definitions. │
31
32
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -33,47 +34,47 @@ process.env.NODE_ENV !== "production" && (v.propTypes = {
33
34
  /**
34
35
  * The content of the component.
35
36
  */
36
- children: n.node,
37
+ children: o.node,
37
38
  /**
38
39
  * The value of the currently selected `Tab`.
39
40
  */
40
- value: n.oneOfType([n.number, n.string]).isRequired
41
+ value: o.oneOfType([o.number, o.string]).isRequired
41
42
  });
42
- function h() {
43
+ function T() {
43
44
  return r.useContext(b);
44
45
  }
45
- function P(e, o) {
46
+ function y(e, t) {
46
47
  const {
47
- idPrefix: t
48
+ idPrefix: n
48
49
  } = e;
49
- return t === null ? null : `${e.idPrefix}-P-${o}`;
50
+ return n === null ? null : `${e.idPrefix}-P-${t}`;
50
51
  }
51
- function x(e, o) {
52
+ function x(e, t) {
52
53
  const {
53
- idPrefix: t
54
+ idPrefix: n
54
55
  } = e;
55
- return t === null ? null : `${e.idPrefix}-T-${o}`;
56
+ return n === null ? null : `${e.idPrefix}-T-${t}`;
56
57
  }
57
- const y = /* @__PURE__ */ r.forwardRef(function(o, t) {
58
+ const C = /* @__PURE__ */ r.forwardRef(function(t, n) {
58
59
  const {
59
60
  children: a,
60
- ...c
61
- } = o, i = h();
62
- if (i === null)
61
+ ...i
62
+ } = t, s = T();
63
+ if (s === null)
63
64
  throw new TypeError("No TabContext provided");
64
- const l = r.Children.map(a, (u) => /* @__PURE__ */ r.isValidElement(u) ? /* @__PURE__ */ r.cloneElement(u, {
65
+ const c = r.Children.map(a, (u) => /* @__PURE__ */ r.isValidElement(u) ? /* @__PURE__ */ r.cloneElement(u, {
65
66
  // SOMEDAY: `Tabs` will set those themselves
66
- "aria-controls": P(i, u.props.value),
67
- id: x(i, u.props.value)
67
+ "aria-controls": y(s, u.props.value),
68
+ id: x(s, u.props.value)
68
69
  }) : null);
69
- return /* @__PURE__ */ s(R, {
70
- ...c,
71
- ref: t,
72
- value: i.value,
73
- children: l
70
+ return /* @__PURE__ */ l(R, {
71
+ ...i,
72
+ ref: n,
73
+ value: s.value,
74
+ children: c
74
75
  });
75
76
  });
76
- process.env.NODE_ENV !== "production" && (y.propTypes = {
77
+ process.env.NODE_ENV !== "production" && (C.propTypes = {
77
78
  // ┌────────────────────────────── Warning ──────────────────────────────┐
78
79
  // │ These PropTypes are generated from the TypeScript type definitions. │
79
80
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -81,54 +82,54 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
81
82
  /**
82
83
  * A list of `<Tab />` elements.
83
84
  */
84
- children: n.node
85
+ children: o.node
85
86
  });
86
- function j(e) {
87
- return O("MuiTabPanel", e);
87
+ function D(e) {
88
+ return M("MuiTabPanel", e);
88
89
  }
89
- M("MuiTabPanel", ["root", "hidden"]);
90
- const V = (e) => {
90
+ I("MuiTabPanel", ["root", "hidden"]);
91
+ const U = (e) => {
91
92
  const {
92
- classes: o,
93
- hidden: t
93
+ classes: t,
94
+ hidden: n
94
95
  } = e;
95
- return U({
96
- root: ["root", t && "hidden"]
97
- }, j, o);
98
- }, L = D("div", {
96
+ return V({
97
+ root: ["root", n && "hidden"]
98
+ }, D, t);
99
+ }, B = S("div", {
99
100
  name: "MuiTabPanel",
100
101
  slot: "Root",
101
- overridesResolver: (e, o) => o.root
102
+ overridesResolver: (e, t) => t.root
102
103
  })(({
103
104
  theme: e
104
105
  }) => ({
105
106
  padding: e.spacing(3)
106
- })), p = /* @__PURE__ */ r.forwardRef(function(o, t) {
107
- const a = I({
108
- props: o,
107
+ })), p = /* @__PURE__ */ r.forwardRef(function(t, n) {
108
+ const a = $({
109
+ props: t,
109
110
  name: "MuiTabPanel"
110
111
  }), {
111
- children: c,
112
- className: i,
113
- value: l,
112
+ children: i,
113
+ className: s,
114
+ value: c,
114
115
  keepMounted: u = !1,
115
- ...C
116
+ ...P
116
117
  } = a, m = {
117
118
  ...a
118
- }, N = V(m), d = h();
119
+ }, g = U(m), d = T();
119
120
  if (d === null)
120
121
  throw new TypeError("No TabContext provided");
121
- const E = P(d, l), g = x(d, l);
122
- return /* @__PURE__ */ s(L, {
123
- "aria-labelledby": g,
124
- className: w(N.root, i),
125
- hidden: l !== d.value,
126
- id: E,
127
- ref: t,
122
+ const N = y(d, c), E = x(d, c);
123
+ return /* @__PURE__ */ l(B, {
124
+ "aria-labelledby": E,
125
+ className: O(g.root, s),
126
+ hidden: c !== d.value,
127
+ id: N,
128
+ ref: n,
128
129
  role: "tabpanel",
129
130
  ownerState: m,
130
- ...C,
131
- children: (u || l === d.value) && c
131
+ ...P,
132
+ children: (u || c === d.value) && i
132
133
  });
133
134
  });
134
135
  process.env.NODE_ENV !== "production" && (p.propTypes = {
@@ -139,48 +140,97 @@ process.env.NODE_ENV !== "production" && (p.propTypes = {
139
140
  /**
140
141
  * The content of the component.
141
142
  */
142
- children: n.node,
143
+ children: o.node,
143
144
  /**
144
145
  * Override or extend the styles applied to the component.
145
146
  */
146
- classes: n.object,
147
+ classes: o.object,
147
148
  /**
148
149
  * @ignore
149
150
  */
150
- className: n.string,
151
+ className: o.string,
151
152
  /**
152
153
  * Always keep the children in the DOM.
153
154
  * @default false
154
155
  */
155
- keepMounted: n.bool,
156
+ keepMounted: o.bool,
156
157
  /**
157
158
  * The system prop that allows defining system overrides as well as additional CSS styles.
158
159
  */
159
- sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
160
+ sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
160
161
  /**
161
162
  * The `value` of the corresponding `Tab`. Must use the index of the `Tab` when
162
163
  * no `value` was passed to `Tab`.
163
164
  */
164
- value: n.oneOfType([n.number, n.string]).isRequired
165
+ value: o.oneOfType([o.number, o.string]).isRequired
165
166
  });
166
- const _ = (e) => /* @__PURE__ */ T(v, { value: "1", children: [
167
- /* @__PURE__ */ T(y, { ...e, "aria-label": "lab API tabs example", children: [
168
- /* @__PURE__ */ s(f, { label: "Utilisateurs", value: "1" }),
169
- /* @__PURE__ */ s(f, { label: "Groupes", value: "2" }),
170
- /* @__PURE__ */ s(f, { label: "Demandes d'inscription", value: "3" })
171
- ] }),
172
- /* @__PURE__ */ s(p, { value: "1", children: "Utilisateurs" }),
173
- /* @__PURE__ */ s(p, { value: "2", children: "Groupes" }),
174
- /* @__PURE__ */ s(p, { value: "3", children: "Demandes d'inscription" })
175
- ] }), H = {
167
+ const L = (e) => {
168
+ const [t, n] = w("1");
169
+ return /* @__PURE__ */ v(h, { value: t, children: [
170
+ /* @__PURE__ */ v(
171
+ C,
172
+ {
173
+ ...e,
174
+ onChange: (i, s) => n(s),
175
+ "aria-label": "lib tablist example",
176
+ children: [
177
+ /* @__PURE__ */ l(f, { label: "Item one", value: "1" }),
178
+ /* @__PURE__ */ l(f, { label: "Item two", value: "2" }),
179
+ /* @__PURE__ */ l(f, { label: "Item three", value: "3" })
180
+ ]
181
+ }
182
+ ),
183
+ /* @__PURE__ */ l(p, { value: "1", children: "Item one" }),
184
+ /* @__PURE__ */ l(p, { value: "2", children: "Item two" }),
185
+ /* @__PURE__ */ l(p, { value: "3", children: "Item three" })
186
+ ] });
187
+ }, W = {
176
188
  title: "Components/TabList",
177
- component: _
178
- }, z = {
189
+ component: L,
190
+ argTypes: {
191
+ allowScrollButtonsMobile: {
192
+ control: "boolean"
193
+ },
194
+ centered: {
195
+ control: "boolean"
196
+ },
197
+ indicatorColor: {
198
+ control: "radio",
199
+ options: ["primary", "secondary"]
200
+ },
201
+ orientation: {
202
+ control: "radio",
203
+ options: ["horizontal", "vertical"]
204
+ },
205
+ scrollButtons: {
206
+ control: "radio",
207
+ options: ["auto", !0, !1]
208
+ },
209
+ textColor: {
210
+ control: "radio",
211
+ options: ["inherit", "primary", "secondary"]
212
+ },
213
+ variant: {
214
+ control: "radio",
215
+ options: ["fullWidth", "scrollable", "standard"]
216
+ },
217
+ visibleScrollbar: {
218
+ control: "boolean"
219
+ }
220
+ }
221
+ }, A = {
179
222
  args: {
180
- //handleChange: (event: SyntheticEvent, value: number) => true,
223
+ allowScrollButtonsMobile: !1,
224
+ centered: !1,
225
+ indicatorColor: "primary",
226
+ orientation: "horizontal",
227
+ scrollButtons: "auto",
228
+ textColor: "primary",
229
+ variant: "standard",
230
+ visibleScrollbar: !1
181
231
  }
182
232
  };
183
233
  export {
184
- z as Default,
185
- H as default
234
+ A as Default,
235
+ W as default
186
236
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.3.3-dev.1732633701",
3
+ "version": "1.3.3-dev.1732634114",
4
4
  "private": false,
5
5
  "author": "CGI Learning-hub Team",
6
6
  "description": "@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features",