@cgi-learning-hub/ui 0.0.1-dev.1706567478 → 0.0.1-dev.1706796454
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/TransitionGroupContext-SCyurvOT.js +4197 -0
- package/dist/assets/index.css +1 -0
- package/dist/components/Button/Button.d.ts +11 -0
- package/dist/components/Button/Button.js +1260 -0
- package/dist/components/Button/Button.stories.d.ts +7 -0
- package/dist/components/Button/Button.stories.js +31 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +4 -0
- package/dist/components/SearchField/SearchField.d.ts +7 -0
- package/dist/components/SearchField/SearchField.js +26605 -0
- package/dist/components/SearchField/index.d.ts +2 -0
- package/dist/components/SearchField/index.js +4 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +4 -4
- package/dist/createSvgIcon-3ijLxpup.js +182 -0
- package/dist/index.js +5 -4
- package/package.json +3 -1
- package/dist/assets/AnotherComponent.css +0 -1
- package/dist/components/AnotherComponent/AnotherComponent.d.ts +0 -2
- package/dist/components/AnotherComponent/AnotherComponent.js +0 -6
- package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +0 -5
- package/dist/components/AnotherComponent/AnotherComponent.stories.js +0 -22
- package/dist/components/AnotherComponent/index.d.ts +0 -2
- package/dist/components/AnotherComponent/index.js +0 -4
- package/dist/components/BasicButtons/BasicButtons.d.ts +0 -2
- package/dist/components/BasicButtons/BasicButtons.js +0 -5609
- package/dist/components/BasicButtons/BasicButtons.stories.d.ts +0 -5
- package/dist/components/BasicButtons/BasicButtons.stories.js +0 -22
- package/dist/components/BasicButtons/index.d.ts +0 -2
- package/dist/components/BasicButtons/index.js +0 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./Button";
|
|
2
|
+
export * from "./SearchField";
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as r } from "./
|
|
1
|
+
import { default as a } from "./Button/Button.js";
|
|
2
|
+
import { default as r } from "./SearchField/SearchField.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
a as Button,
|
|
5
|
+
r as SearchField
|
|
6
6
|
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { g as b, a as I, s as w, c as g, u as C, _ as T, b as S, d as N, P as o, e as R } from "./TransitionGroupContext-SCyurvOT.js";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { jsxs as O, jsx as _ } from "react/jsx-runtime";
|
|
4
|
+
function B(e) {
|
|
5
|
+
return b("MuiSvgIcon", e);
|
|
6
|
+
}
|
|
7
|
+
I("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
8
|
+
const j = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], A = (e) => {
|
|
9
|
+
const {
|
|
10
|
+
color: n,
|
|
11
|
+
fontSize: t,
|
|
12
|
+
classes: r
|
|
13
|
+
} = e, i = {
|
|
14
|
+
root: ["root", n !== "inherit" && `color${g(n)}`, `fontSize${g(t)}`]
|
|
15
|
+
};
|
|
16
|
+
return R(i, B, r);
|
|
17
|
+
}, E = w("svg", {
|
|
18
|
+
name: "MuiSvgIcon",
|
|
19
|
+
slot: "Root",
|
|
20
|
+
overridesResolver: (e, n) => {
|
|
21
|
+
const {
|
|
22
|
+
ownerState: t
|
|
23
|
+
} = e;
|
|
24
|
+
return [n.root, t.color !== "inherit" && n[`color${g(t.color)}`], n[`fontSize${g(t.fontSize)}`]];
|
|
25
|
+
}
|
|
26
|
+
})(({
|
|
27
|
+
theme: e,
|
|
28
|
+
ownerState: n
|
|
29
|
+
}) => {
|
|
30
|
+
var t, r, i, d, f, c, h, u, m, s, a, p, l;
|
|
31
|
+
return {
|
|
32
|
+
userSelect: "none",
|
|
33
|
+
width: "1em",
|
|
34
|
+
height: "1em",
|
|
35
|
+
display: "inline-block",
|
|
36
|
+
// the <svg> will define the property that has `currentColor`
|
|
37
|
+
// e.g. heroicons uses fill="none" and stroke="currentColor"
|
|
38
|
+
fill: n.hasSvgAsChild ? void 0 : "currentColor",
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
transition: (t = e.transitions) == null || (r = t.create) == null ? void 0 : r.call(t, "fill", {
|
|
41
|
+
duration: (i = e.transitions) == null || (i = i.duration) == null ? void 0 : i.shorter
|
|
42
|
+
}),
|
|
43
|
+
fontSize: {
|
|
44
|
+
inherit: "inherit",
|
|
45
|
+
small: ((d = e.typography) == null || (f = d.pxToRem) == null ? void 0 : f.call(d, 20)) || "1.25rem",
|
|
46
|
+
medium: ((c = e.typography) == null || (h = c.pxToRem) == null ? void 0 : h.call(c, 24)) || "1.5rem",
|
|
47
|
+
large: ((u = e.typography) == null || (m = u.pxToRem) == null ? void 0 : m.call(u, 35)) || "2.1875rem"
|
|
48
|
+
}[n.fontSize],
|
|
49
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
50
|
+
color: (s = (a = (e.vars || e).palette) == null || (a = a[n.color]) == null ? void 0 : a.main) != null ? s : {
|
|
51
|
+
action: (p = (e.vars || e).palette) == null || (p = p.action) == null ? void 0 : p.active,
|
|
52
|
+
disabled: (l = (e.vars || e).palette) == null || (l = l.action) == null ? void 0 : l.disabled,
|
|
53
|
+
inherit: void 0
|
|
54
|
+
}[n.color]
|
|
55
|
+
};
|
|
56
|
+
}), y = /* @__PURE__ */ v.forwardRef(function(n, t) {
|
|
57
|
+
const r = C({
|
|
58
|
+
props: n,
|
|
59
|
+
name: "MuiSvgIcon"
|
|
60
|
+
}), {
|
|
61
|
+
children: i,
|
|
62
|
+
className: d,
|
|
63
|
+
color: f = "inherit",
|
|
64
|
+
component: c = "svg",
|
|
65
|
+
fontSize: h = "medium",
|
|
66
|
+
htmlColor: u,
|
|
67
|
+
inheritViewBox: m = !1,
|
|
68
|
+
titleAccess: s,
|
|
69
|
+
viewBox: a = "0 0 24 24"
|
|
70
|
+
} = r, p = T(r, j), l = /* @__PURE__ */ v.isValidElement(i) && i.type === "svg", x = S({}, r, {
|
|
71
|
+
color: f,
|
|
72
|
+
component: c,
|
|
73
|
+
fontSize: h,
|
|
74
|
+
instanceFontSize: n.fontSize,
|
|
75
|
+
inheritViewBox: m,
|
|
76
|
+
viewBox: a,
|
|
77
|
+
hasSvgAsChild: l
|
|
78
|
+
}), $ = {};
|
|
79
|
+
m || ($.viewBox = a);
|
|
80
|
+
const z = A(x);
|
|
81
|
+
return /* @__PURE__ */ O(E, S({
|
|
82
|
+
as: c,
|
|
83
|
+
className: N(z.root, d),
|
|
84
|
+
focusable: "false",
|
|
85
|
+
color: u,
|
|
86
|
+
"aria-hidden": s ? void 0 : !0,
|
|
87
|
+
role: s ? "img" : void 0,
|
|
88
|
+
ref: t
|
|
89
|
+
}, $, p, l && i.props, {
|
|
90
|
+
ownerState: x,
|
|
91
|
+
children: [l ? i.props.children : i, s ? /* @__PURE__ */ _("title", {
|
|
92
|
+
children: s
|
|
93
|
+
}) : null]
|
|
94
|
+
}));
|
|
95
|
+
});
|
|
96
|
+
process.env.NODE_ENV !== "production" && (y.propTypes = {
|
|
97
|
+
// ----------------------------- Warning --------------------------------
|
|
98
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
99
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
100
|
+
// ----------------------------------------------------------------------
|
|
101
|
+
/**
|
|
102
|
+
* Node passed into the SVG element.
|
|
103
|
+
*/
|
|
104
|
+
children: o.node,
|
|
105
|
+
/**
|
|
106
|
+
* Override or extend the styles applied to the component.
|
|
107
|
+
*/
|
|
108
|
+
classes: o.object,
|
|
109
|
+
/**
|
|
110
|
+
* @ignore
|
|
111
|
+
*/
|
|
112
|
+
className: o.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
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
118
|
+
* @default 'inherit'
|
|
119
|
+
*/
|
|
120
|
+
color: o.oneOfType([o.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), o.string]),
|
|
121
|
+
/**
|
|
122
|
+
* The component used for the root node.
|
|
123
|
+
* Either a string to use a HTML element or a component.
|
|
124
|
+
*/
|
|
125
|
+
component: o.elementType,
|
|
126
|
+
/**
|
|
127
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
128
|
+
* @default 'medium'
|
|
129
|
+
*/
|
|
130
|
+
fontSize: o.oneOfType([o.oneOf(["inherit", "large", "medium", "small"]), o.string]),
|
|
131
|
+
/**
|
|
132
|
+
* Applies a color attribute to the SVG element.
|
|
133
|
+
*/
|
|
134
|
+
htmlColor: o.string,
|
|
135
|
+
/**
|
|
136
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
137
|
+
* prop will be ignored.
|
|
138
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
139
|
+
* `component`'s viewBox to the root node.
|
|
140
|
+
* @default false
|
|
141
|
+
*/
|
|
142
|
+
inheritViewBox: o.bool,
|
|
143
|
+
/**
|
|
144
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
145
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
146
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
|
147
|
+
*/
|
|
148
|
+
shapeRendering: o.string,
|
|
149
|
+
/**
|
|
150
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
151
|
+
*/
|
|
152
|
+
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
153
|
+
/**
|
|
154
|
+
* Provides a human-readable title for the element that contains it.
|
|
155
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
156
|
+
*/
|
|
157
|
+
titleAccess: o.string,
|
|
158
|
+
/**
|
|
159
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
160
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
161
|
+
* and you pass viewBox="0 0 50 20",
|
|
162
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
163
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
164
|
+
* @default '0 0 24 24'
|
|
165
|
+
*/
|
|
166
|
+
viewBox: o.string
|
|
167
|
+
});
|
|
168
|
+
y.muiName = "SvgIcon";
|
|
169
|
+
function P(e, n) {
|
|
170
|
+
function t(r, i) {
|
|
171
|
+
return /* @__PURE__ */ _(y, S({
|
|
172
|
+
"data-testid": `${n}Icon`,
|
|
173
|
+
ref: i
|
|
174
|
+
}, r, {
|
|
175
|
+
children: e
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
return process.env.NODE_ENV !== "production" && (t.displayName = `${n}Icon`), t.muiName = y.muiName, /* @__PURE__ */ v.memo(/* @__PURE__ */ v.forwardRef(t));
|
|
179
|
+
}
|
|
180
|
+
export {
|
|
181
|
+
P as c
|
|
182
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default as r } from "./components/
|
|
1
|
+
import "./assets/index.css";
|
|
2
|
+
import { default as r } from "./components/Button/Button.js";
|
|
3
|
+
import { default as f } from "./components/SearchField/SearchField.js";
|
|
3
4
|
export {
|
|
4
|
-
r as
|
|
5
|
-
|
|
5
|
+
r as Button,
|
|
6
|
+
f as SearchField
|
|
6
7
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.1706796454",
|
|
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",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@mui/material": "5.15.0",
|
|
33
|
+
"@mui/styles": "5.15.0",
|
|
34
|
+
"@mui/icons-material": "5.15.0",
|
|
33
35
|
"@emotion/react": "11.11.1",
|
|
34
36
|
"@emotion/styled": "11.11.0",
|
|
35
37
|
"autoprefixer": "10.4.17",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.rounded{border-radius:.25rem}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.font-bold{font-weight:700}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import "../../assets/AnotherComponent.css";
|
|
2
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
const n = () => /* @__PURE__ */ o("button", { className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded", children: "Click me from AnotherComponent" });
|
|
4
|
-
export {
|
|
5
|
-
n as default
|
|
6
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import o from "./AnotherComponent.js";
|
|
3
|
-
const p = {
|
|
4
|
-
title: "Components/AnotherComponent",
|
|
5
|
-
component: o,
|
|
6
|
-
argTypes: {
|
|
7
|
-
// Définissez ici vos paramètres d'histoires spécifiques aux arguments (args).
|
|
8
|
-
}
|
|
9
|
-
}, t = (n) => /* @__PURE__ */ e(o, { ...n }), r = t.bind({});
|
|
10
|
-
r.args = {
|
|
11
|
-
label: "Primary Button"
|
|
12
|
-
};
|
|
13
|
-
const a = t.bind({});
|
|
14
|
-
a.args = {
|
|
15
|
-
label: "Secondary Button",
|
|
16
|
-
secondary: !0
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
r as Primary,
|
|
20
|
-
a as Secondary,
|
|
21
|
-
p as default
|
|
22
|
-
};
|