@cgi-learning-hub/ui 0.0.1-dev.1708424596 → 0.0.1-dev.1708424719
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/Button-8coRSZ3M.cjs +1 -0
- package/dist/Button-BJMp7Tz3.js +355 -0
- package/dist/ButtonBase-DfYGPVje.js +892 -0
- package/dist/ButtonBase-xIJbOm-V.cjs +75 -0
- package/dist/Input-DS9hzPC3.js +322 -0
- package/dist/Input-DWEaLJ-2.cjs +1 -0
- package/dist/InputBase-B31rEvBe.js +854 -0
- package/dist/InputBase-BuseI3Oe.cjs +4 -0
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +7 -6
- package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +1 -1
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -98
- package/dist/components/BasicButtons/BasicButtons.es.js +103 -1897
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.d.ts +12 -0
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +47 -0
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -0
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.d.ts +9 -0
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +143 -0
- package/dist/components/buttons/DefaultButton/index.cjs.js +1 -0
- package/dist/components/buttons/DefaultButton/index.d.ts +2 -0
- package/dist/components/buttons/DefaultButton/index.es.js +4 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.d.ts +5 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +11 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.d.ts +4 -0
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +24 -0
- package/dist/components/buttons/PrimaryButton/index.cjs.js +1 -0
- package/dist/components/buttons/PrimaryButton/index.d.ts +2 -0
- package/dist/components/buttons/PrimaryButton/index.es.js +4 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.d.ts +5 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +11 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.d.ts +4 -0
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +24 -0
- package/dist/components/buttons/SecondaryButton/index.cjs.js +1 -0
- package/dist/components/buttons/SecondaryButton/index.d.ts +2 -0
- package/dist/components/buttons/SecondaryButton/index.es.js +4 -0
- package/dist/components/buttons/index.cjs.js +1 -0
- package/dist/components/buttons/index.d.ts +3 -0
- package/dist/components/buttons/index.es.js +8 -0
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.es.js +14 -4
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -0
- package/dist/components/inputs/SearchInput/SearchInput.d.ts +5 -0
- package/dist/components/inputs/SearchInput/SearchInput.es.js +345 -0
- package/dist/components/inputs/SearchInput/index.cjs.js +1 -0
- package/dist/components/inputs/SearchInput/index.d.ts +2 -0
- package/dist/components/inputs/SearchInput/index.es.js +4 -0
- package/dist/components/inputs/TextInput/TextInput.cjs.js +14 -0
- package/dist/components/inputs/TextInput/TextInput.d.ts +5 -0
- package/dist/components/inputs/TextInput/TextInput.es.js +5577 -0
- package/dist/components/inputs/TextInput/index.cjs.js +1 -0
- package/dist/components/inputs/TextInput/index.d.ts +2 -0
- package/dist/components/inputs/TextInput/index.es.js +4 -0
- package/dist/components/inputs/index.cjs.js +1 -0
- package/dist/components/inputs/index.d.ts +2 -0
- package/dist/components/inputs/index.es.js +6 -0
- package/dist/createSvgIcon-BPyRt0N5.js +182 -0
- package/dist/createSvgIcon-Cz9hf1Fl.cjs +1 -0
- package/dist/extendSxProp-DzGZiKZk.js +29 -0
- package/dist/extendSxProp-LEI89AMt.cjs +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +14 -4
- package/dist/useForkRef-C0Hk1SEc.js +44 -0
- package/dist/useForkRef-YQvz-OME.cjs +1 -0
- package/dist/useTheme-BzgwMQvX.cjs +1 -0
- package/dist/useTheme-D1_U7jx5.js +65 -0
- package/dist/useThemeProps-Aqe6oH65.cjs +65 -0
- package/dist/useThemeProps-Dkkbtzcg.js +2696 -0
- package/package.json +3 -1
- package/dist/useTheme-CEi3JABy.cjs +0 -42
- package/dist/useTheme-DVWKQU4F.js +0 -2235
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime");require("react");const n=require("./DefaultButtonIcon.cjs.js"),l=require("../../../useThemeProps-Aqe6oH65.cjs"),d=require("../../../Button-8coRSZ3M.cjs"),i=require("../../../useTheme-BzgwMQvX.cjs"),a=l.styled(d.Button,{shouldForwardProp:t=>t!=="contentColor"})(t=>({justifyContent:"center",alignItems:"center",columnGap:8,minHeight:38,paddingLeft:12,paddingRight:12,textTransform:"none",color:t.contentColor,borderColor:t.contentColor,borderRadius:5,borderWidth:2,"&:hover":{borderColor:t.contentColor,borderWidth:2}})),c=({icon:t,text:u,...r})=>{const s=i.useTheme(),e=r.contentColor??s.palette.primary.main;return o.jsxs(a,{...r,variant:"outlined",contentColor:e,children:[(t==null?void 0:t.position)==="left"?o.jsx(n,{...t,color:e}):null,u,(t==null?void 0:t.position)==="right"?o.jsx(n,{...t,color:e}):null]})};module.exports=c;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ButtonProps } from "@mui/material/Button";
|
|
2
|
+
import { DefaultButtonIconProps } from "./DefaultButtonIcon";
|
|
3
|
+
export interface DefaultButtonProps extends Omit<ButtonProps, "color"> {
|
|
4
|
+
contentColor?: string;
|
|
5
|
+
icon?: Omit<DefaultButtonIconProps, "color">;
|
|
6
|
+
text?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface StyledButtonProps {
|
|
9
|
+
contentColor: string;
|
|
10
|
+
}
|
|
11
|
+
declare const DefaultButton: React.FunctionComponent<DefaultButtonProps>;
|
|
12
|
+
export default DefaultButton;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import n from "./DefaultButtonIcon.es.js";
|
|
4
|
+
import { s as m } from "../../../useThemeProps-Dkkbtzcg.js";
|
|
5
|
+
import { B as s } from "../../../Button-BJMp7Tz3.js";
|
|
6
|
+
import { u } from "../../../useTheme-D1_U7jx5.js";
|
|
7
|
+
const i = m(s, {
|
|
8
|
+
shouldForwardProp: (t) => t !== "contentColor"
|
|
9
|
+
})((t) => ({
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
columnGap: 8,
|
|
13
|
+
minHeight: 38,
|
|
14
|
+
paddingLeft: 12,
|
|
15
|
+
paddingRight: 12,
|
|
16
|
+
textTransform: "none",
|
|
17
|
+
color: t.contentColor,
|
|
18
|
+
borderColor: t.contentColor,
|
|
19
|
+
borderRadius: 5,
|
|
20
|
+
borderWidth: 2,
|
|
21
|
+
"&:hover": {
|
|
22
|
+
borderColor: t.contentColor,
|
|
23
|
+
borderWidth: 2
|
|
24
|
+
}
|
|
25
|
+
})), b = ({
|
|
26
|
+
icon: t,
|
|
27
|
+
text: l,
|
|
28
|
+
...r
|
|
29
|
+
}) => {
|
|
30
|
+
const a = u(), o = r.contentColor ?? a.palette.primary.main;
|
|
31
|
+
return /* @__PURE__ */ d(
|
|
32
|
+
i,
|
|
33
|
+
{
|
|
34
|
+
...r,
|
|
35
|
+
variant: "outlined",
|
|
36
|
+
contentColor: o,
|
|
37
|
+
children: [
|
|
38
|
+
(t == null ? void 0 : t.position) === "left" ? /* @__PURE__ */ e(n, { ...t, color: o }) : null,
|
|
39
|
+
l,
|
|
40
|
+
(t == null ? void 0 : t.position) === "right" ? /* @__PURE__ */ e(n, { ...t, color: o }) : null
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
b as default
|
|
47
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),m=require("react"),o=require("../../../useThemeProps-Aqe6oH65.cjs");function T(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const P=T(m);function g(e){return o.generateUtilityClass("MuiIcon",e)}o.generateUtilityClasses("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S=["baseClassName","className","color","component","fontSize"],b=e=>{const{color:r,fontSize:n,classes:s}=e,t={root:["root",r!=="inherit"&&`color${o.capitalize(r)}`,`fontSize${o.capitalize(n)}`]};return o.composeClasses(t,g,s)},z=o.styled("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.color!=="inherit"&&r[`color${o.capitalize(n.color)}`],r[`fontSize${o.capitalize(n.fontSize)}`]]}})(({theme:e,ownerState:r})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[r.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[r.color]})),a=P.forwardRef(function(r,n){const s=o.useThemeProps({props:r,name:"MuiIcon"}),{baseClassName:t="material-icons",className:l,color:u="inherit",component:c="span",fontSize:y="medium"}=s,f=o._objectWithoutPropertiesLoose(s,S),p=o._extends({},s,{baseClassName:t,color:u,component:c,fontSize:y}),d=b(p);return i.jsx(z,o._extends({as:c,className:o.clsx(t,"notranslate",d.root,l),ownerState:p,"aria-hidden":!0,ref:n},f))});process.env.NODE_ENV!=="production"&&(a.propTypes={baseClassName:o.PropTypes.string,children:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),o.PropTypes.string]),component:o.PropTypes.elementType,fontSize:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","large","medium","small"]),o.PropTypes.string]),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])});a.muiName="Icon";const x=a,v=({color:e,Component:r,name:n})=>n?i.jsx(x,{sx:{color:e},children:n}):i.jsx(r,{sx:{color:e}});module.exports=v;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SvgIconComponent } from "@mui/icons-material";
|
|
2
|
+
export interface DefaultButtonIconProps {
|
|
3
|
+
color: string;
|
|
4
|
+
position: "left" | "right";
|
|
5
|
+
Component?: SvgIconComponent;
|
|
6
|
+
name?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const DefaultButtonIcon: React.FunctionComponent<DefaultButtonIconProps>;
|
|
9
|
+
export default DefaultButtonIcon;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as S from "react";
|
|
3
|
+
import { b, g as v, s as z, f as t, u as x, _ as I, a as f, h as T, P as e, e as N } from "../../../useThemeProps-Dkkbtzcg.js";
|
|
4
|
+
function C(o) {
|
|
5
|
+
return b("MuiIcon", o);
|
|
6
|
+
}
|
|
7
|
+
v("MuiIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8
|
+
const w = ["baseClassName", "className", "color", "component", "fontSize"], O = (o) => {
|
|
9
|
+
const {
|
|
10
|
+
color: n,
|
|
11
|
+
fontSize: r,
|
|
12
|
+
classes: s
|
|
13
|
+
} = o, a = {
|
|
14
|
+
root: ["root", n !== "inherit" && `color${t(n)}`, `fontSize${t(r)}`]
|
|
15
|
+
};
|
|
16
|
+
return N(a, C, s);
|
|
17
|
+
}, R = z("span", {
|
|
18
|
+
name: "MuiIcon",
|
|
19
|
+
slot: "Root",
|
|
20
|
+
overridesResolver: (o, n) => {
|
|
21
|
+
const {
|
|
22
|
+
ownerState: r
|
|
23
|
+
} = o;
|
|
24
|
+
return [n.root, r.color !== "inherit" && n[`color${t(r.color)}`], n[`fontSize${t(r.fontSize)}`]];
|
|
25
|
+
}
|
|
26
|
+
})(({
|
|
27
|
+
theme: o,
|
|
28
|
+
ownerState: n
|
|
29
|
+
}) => ({
|
|
30
|
+
userSelect: "none",
|
|
31
|
+
width: "1em",
|
|
32
|
+
height: "1em",
|
|
33
|
+
// Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541
|
|
34
|
+
// To remove at some point.
|
|
35
|
+
overflow: "hidden",
|
|
36
|
+
display: "inline-block",
|
|
37
|
+
// allow overflow hidden to take action
|
|
38
|
+
textAlign: "center",
|
|
39
|
+
// support non-square icon
|
|
40
|
+
flexShrink: 0,
|
|
41
|
+
fontSize: {
|
|
42
|
+
inherit: "inherit",
|
|
43
|
+
small: o.typography.pxToRem(20),
|
|
44
|
+
medium: o.typography.pxToRem(24),
|
|
45
|
+
large: o.typography.pxToRem(36)
|
|
46
|
+
}[n.fontSize],
|
|
47
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
48
|
+
color: {
|
|
49
|
+
primary: (o.vars || o).palette.primary.main,
|
|
50
|
+
secondary: (o.vars || o).palette.secondary.main,
|
|
51
|
+
info: (o.vars || o).palette.info.main,
|
|
52
|
+
success: (o.vars || o).palette.success.main,
|
|
53
|
+
warning: (o.vars || o).palette.warning.main,
|
|
54
|
+
action: (o.vars || o).palette.action.active,
|
|
55
|
+
error: (o.vars || o).palette.error.main,
|
|
56
|
+
disabled: (o.vars || o).palette.action.disabled,
|
|
57
|
+
inherit: void 0
|
|
58
|
+
}[n.color]
|
|
59
|
+
})), c = /* @__PURE__ */ S.forwardRef(function(n, r) {
|
|
60
|
+
const s = x({
|
|
61
|
+
props: n,
|
|
62
|
+
name: "MuiIcon"
|
|
63
|
+
}), {
|
|
64
|
+
baseClassName: a = "material-icons",
|
|
65
|
+
className: d,
|
|
66
|
+
color: u = "inherit",
|
|
67
|
+
component: l = "span",
|
|
68
|
+
fontSize: m = "medium"
|
|
69
|
+
} = s, y = I(s, w), p = f({}, s, {
|
|
70
|
+
baseClassName: a,
|
|
71
|
+
color: u,
|
|
72
|
+
component: l,
|
|
73
|
+
fontSize: m
|
|
74
|
+
}), g = O(p);
|
|
75
|
+
return /* @__PURE__ */ i(R, f({
|
|
76
|
+
as: l,
|
|
77
|
+
className: T(
|
|
78
|
+
a,
|
|
79
|
+
// Prevent the translation of the text content.
|
|
80
|
+
// The font relies on the exact text content to render the icon.
|
|
81
|
+
"notranslate",
|
|
82
|
+
g.root,
|
|
83
|
+
d
|
|
84
|
+
),
|
|
85
|
+
ownerState: p,
|
|
86
|
+
"aria-hidden": !0,
|
|
87
|
+
ref: r
|
|
88
|
+
}, y));
|
|
89
|
+
});
|
|
90
|
+
process.env.NODE_ENV !== "production" && (c.propTypes = {
|
|
91
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
92
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
93
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
94
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
95
|
+
/**
|
|
96
|
+
* The base class applied to the icon. Defaults to 'material-icons', but can be changed to any
|
|
97
|
+
* other base class that suits the icon font you're using (e.g. material-icons-rounded, fas, etc).
|
|
98
|
+
* @default 'material-icons'
|
|
99
|
+
*/
|
|
100
|
+
baseClassName: e.string,
|
|
101
|
+
/**
|
|
102
|
+
* The name of the icon font ligature.
|
|
103
|
+
*/
|
|
104
|
+
children: e.node,
|
|
105
|
+
/**
|
|
106
|
+
* Override or extend the styles applied to the component.
|
|
107
|
+
*/
|
|
108
|
+
classes: e.object,
|
|
109
|
+
/**
|
|
110
|
+
* @ignore
|
|
111
|
+
*/
|
|
112
|
+
className: e.string,
|
|
113
|
+
/**
|
|
114
|
+
* The color of the component.
|
|
115
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
116
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
117
|
+
* @default 'inherit'
|
|
118
|
+
*/
|
|
119
|
+
color: e.oneOfType([e.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
120
|
+
/**
|
|
121
|
+
* The component used for the root node.
|
|
122
|
+
* Either a string to use a HTML element or a component.
|
|
123
|
+
*/
|
|
124
|
+
component: e.elementType,
|
|
125
|
+
/**
|
|
126
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
127
|
+
* @default 'medium'
|
|
128
|
+
*/
|
|
129
|
+
fontSize: e.oneOfType([e.oneOf(["inherit", "large", "medium", "small"]), e.string]),
|
|
130
|
+
/**
|
|
131
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
132
|
+
*/
|
|
133
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
134
|
+
});
|
|
135
|
+
c.muiName = "Icon";
|
|
136
|
+
const h = c, P = ({
|
|
137
|
+
color: o,
|
|
138
|
+
Component: n,
|
|
139
|
+
name: r
|
|
140
|
+
}) => r ? /* @__PURE__ */ i(h, { sx: { color: o }, children: r }) : /* @__PURE__ */ i(n, { sx: { color: o } });
|
|
141
|
+
export {
|
|
142
|
+
P as default
|
|
143
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./DefaultButton.cjs.js");exports.DefaultButton=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime");require("react");const n=require("../DefaultButton/DefaultButton.cjs.js"),o=require("../../../useTheme-BzgwMQvX.cjs"),u=e=>{const t=o.useTheme();return r.jsx(n,{contentColor:t.palette.primary.main,...e})};module.exports=u;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import e from "../DefaultButton/DefaultButton.es.js";
|
|
4
|
+
import { u as m } from "../../../useTheme-D1_U7jx5.js";
|
|
5
|
+
const u = (t) => {
|
|
6
|
+
const o = m();
|
|
7
|
+
return /* @__PURE__ */ r(e, { contentColor: o.palette.primary.main, ...t });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
u as default
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./PrimaryButton.cjs.js"),r=require("../../../createSvgIcon-Cz9hf1Fl.cjs"),s=r.createSvgIcon(t.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),c={title:"Components/Buttons/PrimaryButton",component:e,argTypes:{}},i=n=>t.jsx(e,{...n}),o=i.bind({});o.args={text:"Save",icon:{Component:s,position:"left"},onClick:()=>alert("Alert")};exports.Primary=o;exports.default=c;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import o from "./PrimaryButton.es.js";
|
|
3
|
+
import { c as r } from "../../../createSvgIcon-BPyRt0N5.js";
|
|
4
|
+
const n = r(/* @__PURE__ */ t("path", {
|
|
5
|
+
d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"
|
|
6
|
+
}), "Save"), p = {
|
|
7
|
+
title: "Components/Buttons/PrimaryButton",
|
|
8
|
+
component: o,
|
|
9
|
+
argTypes: {
|
|
10
|
+
// Définissez ici vos paramètres d'histoires spécifiques aux arguments (args).
|
|
11
|
+
}
|
|
12
|
+
}, a = (e) => /* @__PURE__ */ t(o, { ...e }), m = a.bind({});
|
|
13
|
+
m.args = {
|
|
14
|
+
text: "Save",
|
|
15
|
+
icon: {
|
|
16
|
+
Component: n,
|
|
17
|
+
position: "left"
|
|
18
|
+
},
|
|
19
|
+
onClick: () => alert("Alert")
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
m as Primary,
|
|
23
|
+
p as default
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./PrimaryButton.cjs.js");exports.PrimaryButton=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime");require("react");const o=require("../DefaultButton/DefaultButton.cjs.js"),r=require("../../../useTheme-BzgwMQvX.cjs"),s=e=>{const t=r.useTheme();return n.jsx(o,{contentColor:t.palette.secondary.main,...e})};module.exports=s;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import r from "../DefaultButton/DefaultButton.es.js";
|
|
4
|
+
import { u as m } from "../../../useTheme-D1_U7jx5.js";
|
|
5
|
+
const p = (t) => {
|
|
6
|
+
const o = m();
|
|
7
|
+
return /* @__PURE__ */ e(r, { contentColor: o.palette.secondary.main, ...t });
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
p as default
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),t=require("./SecondaryButton.cjs.js"),r=require("../../../createSvgIcon-Cz9hf1Fl.cjs"),s=r.createSvgIcon(e.jsx("path",{d:"M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonAdd"),c={title:"Components/Buttons/SecondaryButton",component:t,argTypes:{}},i=n=>e.jsx(t,{...n}),o=i.bind({});o.args={text:"Add user",icon:{Component:s,position:"left"},onClick:()=>alert("Alert")};exports.Primary=o;exports.default=c;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "./SecondaryButton.es.js";
|
|
3
|
+
import { c as e } from "../../../createSvgIcon-BPyRt0N5.js";
|
|
4
|
+
const r = e(/* @__PURE__ */ o("path", {
|
|
5
|
+
d: "M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m-9-2V7H4v3H1v2h3v3h2v-3h3v-2zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
|
|
6
|
+
}), "PersonAdd"), i = {
|
|
7
|
+
title: "Components/Buttons/SecondaryButton",
|
|
8
|
+
component: t,
|
|
9
|
+
argTypes: {
|
|
10
|
+
// Définissez ici vos paramètres d'histoires spécifiques aux arguments (args).
|
|
11
|
+
}
|
|
12
|
+
}, s = (n) => /* @__PURE__ */ o(t, { ...n }), c = s.bind({});
|
|
13
|
+
c.args = {
|
|
14
|
+
text: "Add user",
|
|
15
|
+
icon: {
|
|
16
|
+
Component: r,
|
|
17
|
+
position: "left"
|
|
18
|
+
},
|
|
19
|
+
onClick: () => alert("Alert")
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
c as Primary,
|
|
23
|
+
i as default
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./SecondaryButton.cjs.js");exports.SecondaryButton=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./DefaultButton/DefaultButton.cjs.js"),o=require("./PrimaryButton/PrimaryButton.cjs.js"),n=require("./SecondaryButton/SecondaryButton.cjs.js");exports.DefaultButton=t;exports.PrimaryButton=o;exports.SecondaryButton=n;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as a } from "./DefaultButton/DefaultButton.es.js";
|
|
2
|
+
import { default as e } from "./PrimaryButton/PrimaryButton.es.js";
|
|
3
|
+
import { default as u } from "./SecondaryButton/SecondaryButton.es.js";
|
|
4
|
+
export {
|
|
5
|
+
a as DefaultButton,
|
|
6
|
+
e as PrimaryButton,
|
|
7
|
+
u as SecondaryButton
|
|
8
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./AnotherComponent/AnotherComponent.cjs.js"),n=require("./BasicButtons/BasicButtons.cjs.js"),o=require("./buttons/DefaultButton/DefaultButton.cjs.js"),e=require("./buttons/PrimaryButton/PrimaryButton.cjs.js"),u=require("./buttons/SecondaryButton/SecondaryButton.cjs.js"),r=require("./inputs/SearchInput/SearchInput.cjs.js"),s=require("./inputs/TextInput/TextInput.cjs.js");exports.AnotherComponent=t;exports.BasicButtons=n;exports.DefaultButton=o;exports.PrimaryButton=e;exports.SecondaryButton=u;exports.SearchInput=r;exports.TextInput=s;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import { default as e } from "./
|
|
2
|
-
import { default as r } from "./
|
|
1
|
+
import { default as e } from "./AnotherComponent/AnotherComponent.es.js";
|
|
2
|
+
import { default as r } from "./BasicButtons/BasicButtons.es.js";
|
|
3
|
+
import { default as u } from "./buttons/DefaultButton/DefaultButton.es.js";
|
|
4
|
+
import { default as p } from "./buttons/PrimaryButton/PrimaryButton.es.js";
|
|
5
|
+
import { default as s } from "./buttons/SecondaryButton/SecondaryButton.es.js";
|
|
6
|
+
import { default as l } from "./inputs/SearchInput/SearchInput.es.js";
|
|
7
|
+
import { default as B } from "./inputs/TextInput/TextInput.es.js";
|
|
3
8
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
e as AnotherComponent,
|
|
10
|
+
r as BasicButtons,
|
|
11
|
+
u as DefaultButton,
|
|
12
|
+
p as PrimaryButton,
|
|
13
|
+
l as SearchInput,
|
|
14
|
+
s as SecondaryButton,
|
|
15
|
+
B as TextInput
|
|
6
16
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("react/jsx-runtime"),E=require("react"),e=require("../../../useThemeProps-Aqe6oH65.cjs"),v=require("../../../InputBase-BuseI3Oe.cjs"),_=require("../../../extendSxProp-LEI89AMt.cjs"),M=require("../../../createSvgIcon-Cz9hf1Fl.cjs");function N(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>o[n]})}}return t.default=o,Object.freeze(t)}const f=N(E),R=M.createSvgIcon(p.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function B(o){return e.generateUtilityClass("MuiTypography",o)}e.generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const A=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],S=o=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:s,variant:a,classes:c}=o,l={root:["root",a,o.align!=="inherit"&&`align${e.capitalize(t)}`,n&&"gutterBottom",r&&"noWrap",s&&"paragraph"]};return e.composeClasses(l,B,c)},z=e.styled("span",{name:"MuiTypography",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:n}=o;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${e.capitalize(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:o,ownerState:t})=>e._extends({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&o.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),P={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},L=o=>$[o]||o,j=f.forwardRef(function(t,n){const r=e.useThemeProps({props:t,name:"MuiTypography"}),s=L(r.color),a=_.extendSxProp(e._extends({},r,{color:s})),{align:c="inherit",className:l,component:h,gutterBottom:y=!1,noWrap:u=!1,paragraph:g=!1,variant:i="body1",variantMapping:d=P}=a,m=e._objectWithoutPropertiesLoose(a,A),T=e._extends({},a,{align:c,color:s,className:l,component:h,gutterBottom:y,noWrap:u,paragraph:g,variant:i,variantMapping:d}),O=h||(g?"p":d[i]||P[i])||"span",I=S(T);return p.jsx(z,e._extends({as:O,ref:n,ownerState:T,className:e.clsx(I.root,l)},m))});process.env.NODE_ENV!=="production"&&(j.propTypes={align:e.PropTypes.oneOf(["center","inherit","justify","left","right"]),children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,gutterBottom:e.PropTypes.bool,noWrap:e.PropTypes.bool,paragraph:e.PropTypes.bool,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),variant:e.PropTypes.oneOfType([e.PropTypes.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),e.PropTypes.string]),variantMapping:e.PropTypes.object});const W=j;function U(o){return e.generateUtilityClass("MuiInputAdornment",o)}const q=e.generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),b=q;var x;const D=["children","className","component","disablePointerEvents","disableTypography","position","variant"],w=(o,t)=>{const{ownerState:n}=o;return[t.root,t[`position${e.capitalize(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},F=o=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:s,size:a,variant:c}=o,l={root:["root",n&&"disablePointerEvents",s&&`position${e.capitalize(s)}`,c,r&&"hiddenLabel",a&&`size${e.capitalize(a)}`]};return e.composeClasses(l,U,t)},V=e.styled("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:w})(({theme:o,ownerState:t})=>e._extends({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(o.vars||o).palette.action.active},t.variant==="filled"&&{[`&.${b.positionStart}&:not(.${b.hiddenLabel})`]:{marginTop:16}},t.position==="start"&&{marginRight:8},t.position==="end"&&{marginLeft:8},t.disablePointerEvents===!0&&{pointerEvents:"none"})),C=f.forwardRef(function(t,n){const r=e.useThemeProps({props:t,name:"MuiInputAdornment"}),{children:s,className:a,component:c="div",disablePointerEvents:l=!1,disableTypography:h=!1,position:y,variant:u}=r,g=e._objectWithoutPropertiesLoose(r,D),i=v.useFormControl()||{};let d=u;u&&i.variant&&process.env.NODE_ENV!=="production"&&u===i.variant&&console.error("MUI: The `InputAdornment` variant infers the variant prop you do not have to provide one."),i&&!d&&(d=i.variant);const m=e._extends({},r,{hiddenLabel:i.hiddenLabel,size:i.size,disablePointerEvents:l,position:y,variant:d}),T=F(m);return p.jsx(v.FormControlContext.Provider,{value:null,children:p.jsx(V,e._extends({as:c,ownerState:m,className:e.clsx(T.root,a),ref:n},g,{children:typeof s=="string"&&!h?p.jsx(W,{color:"text.secondary",children:s}):p.jsxs(f.Fragment,{children:[y==="start"?x||(x=p.jsx("span",{className:"notranslate",children:""})):null,s]})}))})});process.env.NODE_ENV!=="production"&&(C.propTypes={children:e.PropTypes.node,classes:e.PropTypes.object,className:e.PropTypes.string,component:e.PropTypes.elementType,disablePointerEvents:e.PropTypes.bool,disableTypography:e.PropTypes.bool,position:e.PropTypes.oneOf(["end","start"]).isRequired,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),variant:e.PropTypes.oneOf(["filled","outlined","standard"])});const k=C,H=e.styled(v.InputBase)(({theme:o})=>({width:"auto",padding:"0px 12px",backgroundColor:o.palette.grey[50],borderRadius:30,"& .MuiInputBase-input":{padding:"8px 0px"}})),J=({placeholder:o="Rechercher",...t})=>p.jsx(H,{...t,placeholder:o,startAdornment:p.jsx(k,{position:"start",disablePointerEvents:!0,children:p.jsx(R,{})})});module.exports=J;
|