@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.
- package/dist/components/stories/Dialog.stories.cjs.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +37 -17
- package/dist/components/stories/IconButton.stories.cjs.js +1 -1
- package/dist/components/stories/IconButton.stories.es.js +47 -11
- package/dist/components/stories/TabList.stories.cjs.js +1 -1
- package/dist/components/stories/TabList.stories.es.js +139 -89
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
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
|
|
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
|
|
4
|
-
import { D as u, b as
|
|
5
|
-
import { a as p, D as
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */ e(
|
|
10
|
-
/* @__PURE__ */
|
|
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(
|
|
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__ */
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
24
|
+
}, v = {
|
|
25
25
|
title: "Components/Dialog",
|
|
26
|
-
component:
|
|
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
|
-
|
|
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"),
|
|
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
|
|
2
|
-
import { c as
|
|
3
|
-
import { I as
|
|
4
|
-
const s =
|
|
5
|
-
d: "
|
|
6
|
-
}), "
|
|
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:
|
|
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__ */
|
|
12
|
-
|
|
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
|
-
|
|
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"),
|
|
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
|
|
1
|
+
import { jsx as l, jsxs as v } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import {
|
|
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
|
|
6
|
-
import { u as
|
|
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,
|
|
10
|
+
function j() {
|
|
11
|
+
const [e, t] = r.useState(null);
|
|
11
12
|
return r.useEffect(() => {
|
|
12
|
-
|
|
13
|
+
t(`mui-p-${Math.round(Math.random() * 1e5)}`);
|
|
13
14
|
}, []), e;
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function h(e) {
|
|
16
17
|
const {
|
|
17
|
-
children:
|
|
18
|
-
value:
|
|
19
|
-
} = e, a =
|
|
18
|
+
children: t,
|
|
19
|
+
value: n
|
|
20
|
+
} = e, a = j(), i = r.useMemo(() => ({
|
|
20
21
|
idPrefix: a,
|
|
21
|
-
value:
|
|
22
|
-
}), [a,
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
value:
|
|
25
|
-
children:
|
|
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" && (
|
|
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:
|
|
37
|
+
children: o.node,
|
|
37
38
|
/**
|
|
38
39
|
* The value of the currently selected `Tab`.
|
|
39
40
|
*/
|
|
40
|
-
value:
|
|
41
|
+
value: o.oneOfType([o.number, o.string]).isRequired
|
|
41
42
|
});
|
|
42
|
-
function
|
|
43
|
+
function T() {
|
|
43
44
|
return r.useContext(b);
|
|
44
45
|
}
|
|
45
|
-
function
|
|
46
|
+
function y(e, t) {
|
|
46
47
|
const {
|
|
47
|
-
idPrefix:
|
|
48
|
+
idPrefix: n
|
|
48
49
|
} = e;
|
|
49
|
-
return
|
|
50
|
+
return n === null ? null : `${e.idPrefix}-P-${t}`;
|
|
50
51
|
}
|
|
51
|
-
function x(e,
|
|
52
|
+
function x(e, t) {
|
|
52
53
|
const {
|
|
53
|
-
idPrefix:
|
|
54
|
+
idPrefix: n
|
|
54
55
|
} = e;
|
|
55
|
-
return
|
|
56
|
+
return n === null ? null : `${e.idPrefix}-T-${t}`;
|
|
56
57
|
}
|
|
57
|
-
const
|
|
58
|
+
const C = /* @__PURE__ */ r.forwardRef(function(t, n) {
|
|
58
59
|
const {
|
|
59
60
|
children: a,
|
|
60
|
-
...
|
|
61
|
-
} =
|
|
62
|
-
if (
|
|
61
|
+
...i
|
|
62
|
+
} = t, s = T();
|
|
63
|
+
if (s === null)
|
|
63
64
|
throw new TypeError("No TabContext provided");
|
|
64
|
-
const
|
|
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":
|
|
67
|
-
id: x(
|
|
67
|
+
"aria-controls": y(s, u.props.value),
|
|
68
|
+
id: x(s, u.props.value)
|
|
68
69
|
}) : null);
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
...
|
|
71
|
-
ref:
|
|
72
|
-
value:
|
|
73
|
-
children:
|
|
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" && (
|
|
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:
|
|
85
|
+
children: o.node
|
|
85
86
|
});
|
|
86
|
-
function
|
|
87
|
-
return
|
|
87
|
+
function D(e) {
|
|
88
|
+
return M("MuiTabPanel", e);
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
-
const
|
|
90
|
+
I("MuiTabPanel", ["root", "hidden"]);
|
|
91
|
+
const U = (e) => {
|
|
91
92
|
const {
|
|
92
|
-
classes:
|
|
93
|
-
hidden:
|
|
93
|
+
classes: t,
|
|
94
|
+
hidden: n
|
|
94
95
|
} = e;
|
|
95
|
-
return
|
|
96
|
-
root: ["root",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
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,
|
|
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(
|
|
107
|
-
const a =
|
|
108
|
-
props:
|
|
107
|
+
})), p = /* @__PURE__ */ r.forwardRef(function(t, n) {
|
|
108
|
+
const a = $({
|
|
109
|
+
props: t,
|
|
109
110
|
name: "MuiTabPanel"
|
|
110
111
|
}), {
|
|
111
|
-
children:
|
|
112
|
-
className:
|
|
113
|
-
value:
|
|
112
|
+
children: i,
|
|
113
|
+
className: s,
|
|
114
|
+
value: c,
|
|
114
115
|
keepMounted: u = !1,
|
|
115
|
-
...
|
|
116
|
+
...P
|
|
116
117
|
} = a, m = {
|
|
117
118
|
...a
|
|
118
|
-
},
|
|
119
|
+
}, g = U(m), d = T();
|
|
119
120
|
if (d === null)
|
|
120
121
|
throw new TypeError("No TabContext provided");
|
|
121
|
-
const
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
"aria-labelledby":
|
|
124
|
-
className:
|
|
125
|
-
hidden:
|
|
126
|
-
id:
|
|
127
|
-
ref:
|
|
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
|
-
...
|
|
131
|
-
children: (u ||
|
|
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:
|
|
143
|
+
children: o.node,
|
|
143
144
|
/**
|
|
144
145
|
* Override or extend the styles applied to the component.
|
|
145
146
|
*/
|
|
146
|
-
classes:
|
|
147
|
+
classes: o.object,
|
|
147
148
|
/**
|
|
148
149
|
* @ignore
|
|
149
150
|
*/
|
|
150
|
-
className:
|
|
151
|
+
className: o.string,
|
|
151
152
|
/**
|
|
152
153
|
* Always keep the children in the DOM.
|
|
153
154
|
* @default false
|
|
154
155
|
*/
|
|
155
|
-
keepMounted:
|
|
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:
|
|
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:
|
|
165
|
+
value: o.oneOfType([o.number, o.string]).isRequired
|
|
165
166
|
});
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
185
|
-
|
|
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.
|
|
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",
|