@cgi-learning-hub/ui 1.3.4-dev.1734368837 → 1.3.4-dev.1734425595

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";const n=require("react/jsx-runtime"),t=require("../../createSvgIcon-eUfAcV0x.cjs"),i=require("@mui/material"),a=require("../../Dialog-qbfcFmb5.cjs"),u=t.createSvgIcon(n.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),r=({children:c,showCloseButton:l=!0,...e})=>{const o=()=>{var s;return(s=e.onClose)==null?void 0:s.call(e,{},"escapeKeyDown")};return n.jsxs(a.Dialog,{...e,children:[l?n.jsx(i.IconButton,{"aria-label":"close",onClick:o,sx:{position:"absolute",right:16,top:16},children:n.jsx(u,{})}):null,c]})};module.exports=r;
1
+ "use strict";const n=require("react/jsx-runtime"),t=require("../../createSvgIcon-eUfAcV0x.cjs"),i=require("@mui/material"),a=require("../../Dialog-qbfcFmb5.cjs"),u=t.createSvgIcon(n.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),r=({children:s,showCloseButton:l=!0,...e})=>{const o=()=>{var c;return(c=e.onClose)==null?void 0:c.call(e,{},"escapeKeyDown")};return n.jsxs(a.Dialog,{...e,children:[l?n.jsx(i.IconButton,{"aria-label":"close",onClick:o,sx:{position:"absolute",right:16,top:16},children:n.jsx(u,{})}):null,s]})};module.exports=r;
@@ -1,16 +1,16 @@
1
- import { jsx as l, jsxs as s } from "react/jsx-runtime";
2
- import { c as t } from "../../createSvgIcon-CeuAoIMQ.js";
3
- import { IconButton as c } from "@mui/material";
1
+ import { jsx as l, jsxs as c } from "react/jsx-runtime";
2
+ import { c as s } from "../../createSvgIcon-CeuAoIMQ.js";
3
+ import { IconButton as t } from "@mui/material";
4
4
  import { D as i } from "../../Dialog-DPCCWdDJ.js";
5
- const m = t(/* @__PURE__ */ l("path", {
6
- d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
7
- }), "Close"), g = ({
5
+ const d = s(/* @__PURE__ */ l("path", {
6
+ d: "M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"
7
+ }), "CloseRounded"), g = ({
8
8
  children: e,
9
9
  showCloseButton: a = !0,
10
10
  ...o
11
- }) => /* @__PURE__ */ s(i, { ...o, children: [
11
+ }) => /* @__PURE__ */ c(i, { ...o, children: [
12
12
  a ? /* @__PURE__ */ l(
13
- c,
13
+ t,
14
14
  {
15
15
  "aria-label": "close",
16
16
  onClick: () => {
@@ -18,7 +18,7 @@ const m = t(/* @__PURE__ */ l("path", {
18
18
  return (n = o.onClose) == null ? void 0 : n.call(o, {}, "escapeKeyDown");
19
19
  },
20
20
  sx: { position: "absolute", right: 16, top: 16 },
21
- children: /* @__PURE__ */ l(m, {})
21
+ children: /* @__PURE__ */ l(d, {})
22
22
  }
23
23
  ) : null,
24
24
  e
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("react"),o=require("../Button/Button.cjs.js"),u=require("../Dialog/Dialog.cjs.js"),i=require("../../DialogTitle-kTwRLVKr.cjs"),l=require("../../DialogContent-C8YTQP0Y.cjs"),d=a=>{const[s,t]=c.useState(!1),r=()=>t(!0),n=()=>t(!1);return e.jsxs(e.Fragment,{children:[e.jsx(o,{variant:"outlined",onClick:r,children:"Open dialog"}),e.jsxs(u,{...a,open:s,onClose:n,children:[e.jsx(i.DialogTitle,{children:"Dialog title"}),e.jsx(l.DialogContent,{children:e.jsxs(i.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(l.DialogActions,{children:[e.jsx(o,{variant:"text",onClick:n,children:"Cancel"}),e.jsx(o,{variant:"contained",onClick:()=>!0,children:"Save"})]})]})]})},m={title:"Components/Dialog",component:d,argTypes:{disableEscapeKeyDown:{control:"boolean"},fullScreen:{control:"boolean"},fullWidth:{control:"boolean"},maxWidth:{control:"select",options:["xs","sm","md","lg","xl",!1]},showCloseButton:{control:"boolean"}}},p={args:{disableEscapeKeyDown:!1,fullScreen:!1,fullWidth:!1,maxWidth:"sm",showCloseButton:!0}};exports.Default=p;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("react"),o=require("../Button/Button.cjs.js"),u=require("../Dialog/Dialog.cjs.js"),n=require("../../DialogTitle-kTwRLVKr.cjs"),l=require("../../DialogContent-C8YTQP0Y.cjs"),d=a=>{const[s,t]=c.useState(!1),r=()=>t(!0),i=()=>t(!1);return e.jsxs(e.Fragment,{children:[e.jsx(o,{variant:"outlined",onClick:r,children:"Open dialog"}),e.jsxs(u,{...a,open:s,onClose:i,children:[e.jsx(n.DialogTitle,{children:"Dialog title"}),e.jsx(l.DialogContent,{children:e.jsxs(n.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(l.DialogActions,{children:[e.jsx(o,{variant:"text",onClick:i,children:"Cancel"}),e.jsx(o,{variant:"contained",onClick:()=>!0,children:"Save"})]})]})]})},m={title:"Components/Dialog",component:d,parameters:{docs:{description:{component:"This example is made with DialogTitle, DialogContent, DialogContentText and DialogActions but the dialog children are entirely up to you."}}},argTypes:{disableEscapeKeyDown:{control:"boolean"},fullScreen:{control:"boolean"},fullWidth:{control:"boolean"},maxWidth:{control:"select",options:["xs","sm","md","lg","xl",!1]},showCloseButton:{control:"boolean"}}},p={args:{disableEscapeKeyDown:!1,fullScreen:!1,fullWidth:!1,maxWidth:"sm",showCloseButton:!0}};exports.Default=p;exports.default=m;
@@ -1,30 +1,37 @@
1
- import { jsxs as e, Fragment as s, jsx as o } 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
3
  import t from "../Button/Button.es.js";
4
4
  import u from "../Dialog/Dialog.es.js";
5
5
  import { a as d, D as m } from "../../DialogTitle-BeUT_vuo.js";
6
- import { a as p, D as f } from "../../DialogContent-BD5Ba5iS.js";
7
- const g = (l) => {
6
+ import { a as p, D as g } from "../../DialogContent-BD5Ba5iS.js";
7
+ const f = (l) => {
8
8
  const [a, i] = c(!1), r = () => i(!0), n = () => i(!1);
9
- return /* @__PURE__ */ e(s, { children: [
10
- /* @__PURE__ */ o(t, { variant: "outlined", onClick: r, children: "Open dialog" }),
11
- /* @__PURE__ */ e(u, { ...l, open: a, onClose: n, children: [
12
- /* @__PURE__ */ o(d, { children: "Dialog title" }),
13
- /* @__PURE__ */ o(p, { children: /* @__PURE__ */ e(m, { children: [
9
+ return /* @__PURE__ */ o(s, { children: [
10
+ /* @__PURE__ */ e(t, { variant: "outlined", onClick: r, children: "Open dialog" }),
11
+ /* @__PURE__ */ o(u, { ...l, open: a, onClose: n, children: [
12
+ /* @__PURE__ */ e(d, { children: "Dialog title" }),
13
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ o(m, { children: [
14
14
  "Dialog content text",
15
- /* @__PURE__ */ o("br", {}),
16
- /* @__PURE__ */ o("br", {}),
15
+ /* @__PURE__ */ e("br", {}),
16
+ /* @__PURE__ */ e("br", {}),
17
17
  "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."
18
18
  ] }) }),
19
- /* @__PURE__ */ e(f, { children: [
20
- /* @__PURE__ */ o(t, { variant: "text", onClick: n, children: "Cancel" }),
21
- /* @__PURE__ */ o(t, { variant: "contained", onClick: () => !0, children: "Save" })
19
+ /* @__PURE__ */ o(g, { children: [
20
+ /* @__PURE__ */ e(t, { variant: "text", onClick: n, children: "Cancel" }),
21
+ /* @__PURE__ */ e(t, { variant: "contained", onClick: () => !0, children: "Save" })
22
22
  ] })
23
23
  ] })
24
24
  ] });
25
- }, q = {
25
+ }, T = {
26
26
  title: "Components/Dialog",
27
- component: g,
27
+ component: f,
28
+ parameters: {
29
+ docs: {
30
+ description: {
31
+ component: "This example is made with DialogTitle, DialogContent, DialogContentText and DialogActions but the dialog children are entirely up to you."
32
+ }
33
+ }
34
+ },
28
35
  argTypes: {
29
36
  disableEscapeKeyDown: {
30
37
  control: "boolean"
@@ -43,7 +50,7 @@ const g = (l) => {
43
50
  control: "boolean"
44
51
  }
45
52
  }
46
- }, w = {
53
+ }, q = {
47
54
  args: {
48
55
  disableEscapeKeyDown: !1,
49
56
  fullScreen: !1,
@@ -53,6 +60,6 @@ const g = (l) => {
53
60
  }
54
61
  };
55
62
  export {
56
- w as Default,
57
- q as default
63
+ q as Default,
64
+ T as default
58
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cgi-learning-hub/ui",
3
- "version": "1.3.4-dev.1734368837",
3
+ "version": "1.3.4-dev.1734425595",
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",