@cgi-learning-hub/ui 1.3.5-dev.1736340751 → 1.3.5-dev.1736343971
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 a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),r=require("../../DefaultPropsProvider-3KMGupjb.cjs"),S=require("react"),n=require("../../generateUtilityClasses-B_H9HEmg.cjs"),y=require("../../Button-BH9MUvmz.cjs"),v=require("../../memoTheme-Bdg0Y_2O.cjs"),p=require("../../capitalize-B3GG7Wn6.cjs"),z=require("../../useId-DNXtOFeX.cjs"),E=require("../../chainPropTypes-CEUi6Jb4.cjs"),O=require("../../CircularProgress-BByrCLjv.cjs");function R(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const s=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>o[i]})}}return t.default=o,Object.freeze(t)}const m=R(S);function q(o){return n.generateUtilityClass("MuiLoadingButton",o)}const e=n.generateUtilityClasses("MuiLoadingButton",["root","label","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),w=o=>{const{loading:t,loadingPosition:i,classes:s}=o,u={root:["root",t&&"loading"],label:["label"],startIcon:[t&&`startIconLoading${p.capitalize(i)}`],endIcon:[t&&`endIconLoading${p.capitalize(i)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${p.capitalize(i)}`]},l=r.composeClasses(u,q,s);return{...s,...l}},M=o=>o!=="ownerState"&&o!=="theme"&&o!=="sx"&&o!=="as"&&o!=="classes",U=r.styled(y.Button,{shouldForwardProp:o=>M(o)||o==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(o,t)=>[t.root,t.startIconLoadingStart&&{[`& .${e.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${e.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(v.memoTheme(({theme:o})=>({display:"inline-flex",[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0},variants:[{props:{loadingPosition:"center"},style:{transition:o.transitions.create(["background-color","box-shadow","border-color"],{duration:o.transitions.duration.short}),[`&.${e.loading}`]:{color:"transparent"}}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginRight:-8}}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{[`& .${e.startIconLoadingStart}, & .${e.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginLeft:-8}}}]}))),N=r.styled("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(o,t)=>{const{ownerState:i}=o;return[t.loadingIndicator,t[`loadingIndicator${p.capitalize(i.loadingPosition)}`]]}})(v.memoTheme(({theme:o})=>({position:"absolute",visibility:"visible",display:"flex",variants:[{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:({loadingPosition:t,ownerState:i})=>t==="start"&&i.size!=="small",style:{left:14}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(o.vars||o).palette.action.disabled}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:({loadingPosition:t,ownerState:i})=>t==="end"&&i.size!=="small",style:{right:14}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:({ownerState:t})=>t.loadingPosition==="start"&&t.fullWidth,style:{position:"relative",left:-10}},{props:({ownerState:t})=>t.loadingPosition==="end"&&t.fullWidth,style:{position:"relative",right:-10}}]}))),T=r.styled("span",{name:"MuiLoadingButton",slot:"Label",overridesResolver:(o,t)=>[t.label]})({display:"inherit",alignItems:"inherit",justifyContent:"inherit"}),x=m.forwardRef(function(t,i){const s=m.useContext(y.ButtonGroupContext),u=y.resolveProps(s,t),l=r.useDefaultProps({props:u,name:"MuiLoadingButton"}),{children:P,disabled:f=!1,id:B,loading:g=!1,loadingIndicator:j,loadingPosition:C="center",variant:I="text",...$}=l,b=z.useId(B),L=j??a.jsx(O.CircularProgress,{"aria-labelledby":b,color:"inherit",size:16}),d={...l,disabled:f,loading:g,loadingIndicator:L,loadingPosition:C,variant:I},c=w(d),h=g?a.jsx(N,{className:c.loadingIndicator,ownerState:d,children:L}):null;return a.jsxs(U,{disabled:f||g,id:b,ref:i,...$,variant:I,classes:c,ownerState:d,children:[d.loadingPosition==="end"?a.jsx(T,{className:c.label,children:P}):h,d.loadingPosition==="end"?h:a.jsx(T,{className:c.label,children:P})]})});process.env.NODE_ENV!=="production"&&(x.propTypes={children:n.PropTypes.node,classes:n.PropTypes.object,disabled:n.PropTypes.bool,id:n.PropTypes.string,loading:n.PropTypes.bool,loadingIndicator:n.PropTypes.node,loadingPosition:E.chainPropTypes(n.PropTypes.oneOf(["start","end","center"]),o=>o.loadingPosition==="start"&&!o.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):o.loadingPosition==="end"&&!o.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.oneOfType([n.PropTypes.func,n.PropTypes.object,n.PropTypes.bool])),n.PropTypes.func,n.PropTypes.object]),variant:n.PropTypes.oneOfType([n.PropTypes.oneOf(["contained","outlined","text"]),n.PropTypes.string])});const D=r.styled(x)(({color:o,theme:t})=>({minHeight:38,textTransform:"none",transition:"all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms","&.MuiButton-outlined":{borderRadius:5,borderWidth:2}})),W=({variant:o="outlined",...t})=>a.jsx(D,{variant:o,...t});module.exports=W;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { s as g, u as
|
|
1
|
+
import { jsxs as S, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { s as g, u as T, c as w } from "../../DefaultPropsProvider-CvJPQJmL.js";
|
|
3
3
|
import * as P from "react";
|
|
4
|
-
import { I as
|
|
5
|
-
import { B as
|
|
6
|
-
import { m as
|
|
4
|
+
import { I as M, H as R, P as t } from "../../generateUtilityClasses-Bssl7BA_.js";
|
|
5
|
+
import { B as z, a as O, r as j } from "../../Button-BnNYfQ3E.js";
|
|
6
|
+
import { m as v } from "../../memoTheme-D7Fyh_3C.js";
|
|
7
7
|
import { c } from "../../capitalize-CkF8kU4n.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import { c as
|
|
8
|
+
import { u as U } from "../../useId-CK6Kn3Tn.js";
|
|
9
|
+
import { c as N } from "../../chainPropTypes-D9lkm76m.js";
|
|
10
10
|
import { C as W } from "../../CircularProgress-Kwlef5fX.js";
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function D(o) {
|
|
12
|
+
return R("MuiLoadingButton", o);
|
|
13
13
|
}
|
|
14
|
-
const a =
|
|
14
|
+
const a = M("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator", "loadingIndicatorCenter", "loadingIndicatorStart", "loadingIndicatorEnd", "endIconLoadingEnd", "startIconLoadingStart"]), F = (o) => {
|
|
15
15
|
const {
|
|
16
|
-
loading:
|
|
16
|
+
loading: n,
|
|
17
17
|
loadingPosition: i,
|
|
18
18
|
classes: e
|
|
19
|
-
} =
|
|
20
|
-
root: ["root",
|
|
19
|
+
} = o, u = {
|
|
20
|
+
root: ["root", n && "loading"],
|
|
21
21
|
label: ["label"],
|
|
22
|
-
startIcon: [
|
|
23
|
-
endIcon: [
|
|
24
|
-
loadingIndicator: ["loadingIndicator",
|
|
25
|
-
}, d =
|
|
22
|
+
startIcon: [n && `startIconLoading${c(i)}`],
|
|
23
|
+
endIcon: [n && `endIconLoading${c(i)}`],
|
|
24
|
+
loadingIndicator: ["loadingIndicator", n && `loadingIndicator${c(i)}`]
|
|
25
|
+
}, d = w(u, D, e);
|
|
26
26
|
return {
|
|
27
27
|
...e,
|
|
28
28
|
// forward the outlined, color, etc. classes to Button
|
|
29
29
|
...d
|
|
30
30
|
};
|
|
31
|
-
},
|
|
32
|
-
shouldForwardProp: (
|
|
31
|
+
}, H = (o) => o !== "ownerState" && o !== "theme" && o !== "sx" && o !== "as" && o !== "classes", k = g(z, {
|
|
32
|
+
shouldForwardProp: (o) => H(o) || o === "classes",
|
|
33
33
|
name: "MuiLoadingButton",
|
|
34
34
|
slot: "Root",
|
|
35
|
-
overridesResolver: (
|
|
36
|
-
[`& .${a.startIconLoadingStart}`]:
|
|
37
|
-
},
|
|
38
|
-
[`& .${a.endIconLoadingEnd}`]:
|
|
35
|
+
overridesResolver: (o, n) => [n.root, n.startIconLoadingStart && {
|
|
36
|
+
[`& .${a.startIconLoadingStart}`]: n.startIconLoadingStart
|
|
37
|
+
}, n.endIconLoadingEnd && {
|
|
38
|
+
[`& .${a.endIconLoadingEnd}`]: n.endIconLoadingEnd
|
|
39
39
|
}]
|
|
40
|
-
})(
|
|
41
|
-
theme:
|
|
40
|
+
})(v(({
|
|
41
|
+
theme: o
|
|
42
42
|
}) => ({
|
|
43
43
|
display: "inline-flex",
|
|
44
44
|
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
45
|
-
transition:
|
|
46
|
-
duration:
|
|
45
|
+
transition: o.transitions.create(["opacity"], {
|
|
46
|
+
duration: o.transitions.duration.short
|
|
47
47
|
}),
|
|
48
48
|
opacity: 0
|
|
49
49
|
},
|
|
@@ -52,8 +52,8 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
52
52
|
loadingPosition: "center"
|
|
53
53
|
},
|
|
54
54
|
style: {
|
|
55
|
-
transition:
|
|
56
|
-
duration:
|
|
55
|
+
transition: o.transitions.create(["background-color", "box-shadow", "border-color"], {
|
|
56
|
+
duration: o.transitions.duration.short
|
|
57
57
|
}),
|
|
58
58
|
[`&.${a.loading}`]: {
|
|
59
59
|
color: "transparent"
|
|
@@ -61,12 +61,12 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
61
61
|
}
|
|
62
62
|
}, {
|
|
63
63
|
props: ({
|
|
64
|
-
ownerState:
|
|
65
|
-
}) =>
|
|
64
|
+
ownerState: n
|
|
65
|
+
}) => n.loadingPosition === "start" && n.fullWidth,
|
|
66
66
|
style: {
|
|
67
67
|
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
68
|
-
transition:
|
|
69
|
-
duration:
|
|
68
|
+
transition: o.transitions.create(["opacity"], {
|
|
69
|
+
duration: o.transitions.duration.short
|
|
70
70
|
}),
|
|
71
71
|
opacity: 0,
|
|
72
72
|
marginRight: -8
|
|
@@ -74,12 +74,12 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
props: ({
|
|
77
|
-
ownerState:
|
|
78
|
-
}) =>
|
|
77
|
+
ownerState: n
|
|
78
|
+
}) => n.loadingPosition === "end" && n.fullWidth,
|
|
79
79
|
style: {
|
|
80
80
|
[`& .${a.startIconLoadingStart}, & .${a.endIconLoadingEnd}`]: {
|
|
81
|
-
transition:
|
|
82
|
-
duration:
|
|
81
|
+
transition: o.transitions.create(["opacity"], {
|
|
82
|
+
duration: o.transitions.duration.short
|
|
83
83
|
}),
|
|
84
84
|
opacity: 0,
|
|
85
85
|
marginLeft: -8
|
|
@@ -89,14 +89,14 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
89
89
|
}))), G = g("span", {
|
|
90
90
|
name: "MuiLoadingButton",
|
|
91
91
|
slot: "LoadingIndicator",
|
|
92
|
-
overridesResolver: (
|
|
92
|
+
overridesResolver: (o, n) => {
|
|
93
93
|
const {
|
|
94
94
|
ownerState: i
|
|
95
|
-
} =
|
|
96
|
-
return [
|
|
95
|
+
} = o;
|
|
96
|
+
return [n.loadingIndicator, n[`loadingIndicator${c(i.loadingPosition)}`]];
|
|
97
97
|
}
|
|
98
|
-
})(
|
|
99
|
-
theme:
|
|
98
|
+
})(v(({
|
|
99
|
+
theme: o
|
|
100
100
|
}) => ({
|
|
101
101
|
position: "absolute",
|
|
102
102
|
visibility: "visible",
|
|
@@ -111,9 +111,9 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
111
111
|
}
|
|
112
112
|
}, {
|
|
113
113
|
props: ({
|
|
114
|
-
loadingPosition:
|
|
114
|
+
loadingPosition: n,
|
|
115
115
|
ownerState: i
|
|
116
|
-
}) =>
|
|
116
|
+
}) => n === "start" && i.size !== "small",
|
|
117
117
|
style: {
|
|
118
118
|
left: 14
|
|
119
119
|
}
|
|
@@ -132,7 +132,7 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
132
132
|
style: {
|
|
133
133
|
left: "50%",
|
|
134
134
|
transform: "translate(-50%)",
|
|
135
|
-
color: (
|
|
135
|
+
color: (o.vars || o).palette.action.disabled
|
|
136
136
|
}
|
|
137
137
|
}, {
|
|
138
138
|
props: {
|
|
@@ -144,9 +144,9 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
144
144
|
}
|
|
145
145
|
}, {
|
|
146
146
|
props: ({
|
|
147
|
-
loadingPosition:
|
|
147
|
+
loadingPosition: n,
|
|
148
148
|
ownerState: i
|
|
149
|
-
}) =>
|
|
149
|
+
}) => n === "end" && i.size !== "small",
|
|
150
150
|
style: {
|
|
151
151
|
right: 14
|
|
152
152
|
}
|
|
@@ -160,72 +160,72 @@ const a = R("MuiLoadingButton", ["root", "label", "loading", "loadingIndicator",
|
|
|
160
160
|
}
|
|
161
161
|
}, {
|
|
162
162
|
props: ({
|
|
163
|
-
ownerState:
|
|
164
|
-
}) =>
|
|
163
|
+
ownerState: n
|
|
164
|
+
}) => n.loadingPosition === "start" && n.fullWidth,
|
|
165
165
|
style: {
|
|
166
166
|
position: "relative",
|
|
167
167
|
left: -10
|
|
168
168
|
}
|
|
169
169
|
}, {
|
|
170
170
|
props: ({
|
|
171
|
-
ownerState:
|
|
172
|
-
}) =>
|
|
171
|
+
ownerState: n
|
|
172
|
+
}) => n.loadingPosition === "end" && n.fullWidth,
|
|
173
173
|
style: {
|
|
174
174
|
position: "relative",
|
|
175
175
|
right: -10
|
|
176
176
|
}
|
|
177
177
|
}]
|
|
178
|
-
}))),
|
|
178
|
+
}))), h = g("span", {
|
|
179
179
|
name: "MuiLoadingButton",
|
|
180
180
|
slot: "Label",
|
|
181
|
-
overridesResolver: (
|
|
181
|
+
overridesResolver: (o, n) => [n.label]
|
|
182
182
|
})({
|
|
183
183
|
display: "inherit",
|
|
184
184
|
alignItems: "inherit",
|
|
185
185
|
justifyContent: "inherit"
|
|
186
|
-
}), B = /* @__PURE__ */ P.forwardRef(function(
|
|
187
|
-
const e = P.useContext(
|
|
186
|
+
}), B = /* @__PURE__ */ P.forwardRef(function(n, i) {
|
|
187
|
+
const e = P.useContext(O), u = j(e, n), d = T({
|
|
188
188
|
props: u,
|
|
189
189
|
name: "MuiLoadingButton"
|
|
190
190
|
}), {
|
|
191
|
-
children:
|
|
192
|
-
disabled:
|
|
193
|
-
id:
|
|
191
|
+
children: f,
|
|
192
|
+
disabled: I = !1,
|
|
193
|
+
id: x,
|
|
194
194
|
loading: p = !1,
|
|
195
|
-
loadingIndicator:
|
|
196
|
-
loadingPosition:
|
|
197
|
-
variant:
|
|
198
|
-
...
|
|
199
|
-
} = d,
|
|
200
|
-
"aria-labelledby":
|
|
195
|
+
loadingIndicator: $,
|
|
196
|
+
loadingPosition: C = "center",
|
|
197
|
+
variant: m = "text",
|
|
198
|
+
...E
|
|
199
|
+
} = d, L = U(x), b = $ ?? /* @__PURE__ */ r(W, {
|
|
200
|
+
"aria-labelledby": L,
|
|
201
201
|
color: "inherit",
|
|
202
202
|
size: 16
|
|
203
|
-
}),
|
|
203
|
+
}), s = {
|
|
204
204
|
...d,
|
|
205
|
-
disabled:
|
|
205
|
+
disabled: I,
|
|
206
206
|
loading: p,
|
|
207
|
-
loadingIndicator:
|
|
208
|
-
loadingPosition:
|
|
209
|
-
variant:
|
|
210
|
-
}, l =
|
|
207
|
+
loadingIndicator: b,
|
|
208
|
+
loadingPosition: C,
|
|
209
|
+
variant: m
|
|
210
|
+
}, l = F(s), y = p ? /* @__PURE__ */ r(G, {
|
|
211
211
|
className: l.loadingIndicator,
|
|
212
|
-
ownerState:
|
|
213
|
-
children:
|
|
212
|
+
ownerState: s,
|
|
213
|
+
children: b
|
|
214
214
|
}) : null;
|
|
215
|
-
return /* @__PURE__ */
|
|
216
|
-
disabled:
|
|
217
|
-
id:
|
|
215
|
+
return /* @__PURE__ */ S(k, {
|
|
216
|
+
disabled: I || p,
|
|
217
|
+
id: L,
|
|
218
218
|
ref: i,
|
|
219
|
-
...
|
|
220
|
-
variant:
|
|
219
|
+
...E,
|
|
220
|
+
variant: m,
|
|
221
221
|
classes: l,
|
|
222
|
-
ownerState:
|
|
223
|
-
children: [
|
|
222
|
+
ownerState: s,
|
|
223
|
+
children: [s.loadingPosition === "end" ? /* @__PURE__ */ r(h, {
|
|
224
224
|
className: l.label,
|
|
225
|
-
children:
|
|
226
|
-
}) :
|
|
225
|
+
children: f
|
|
226
|
+
}) : y, s.loadingPosition === "end" ? y : /* @__PURE__ */ r(h, {
|
|
227
227
|
className: l.label,
|
|
228
|
-
children:
|
|
228
|
+
children: f
|
|
229
229
|
})]
|
|
230
230
|
});
|
|
231
231
|
});
|
|
@@ -237,99 +237,63 @@ process.env.NODE_ENV !== "production" && (B.propTypes = {
|
|
|
237
237
|
/**
|
|
238
238
|
* The content of the component.
|
|
239
239
|
*/
|
|
240
|
-
children:
|
|
240
|
+
children: t.node,
|
|
241
241
|
/**
|
|
242
242
|
* Override or extend the styles applied to the component.
|
|
243
243
|
*/
|
|
244
|
-
classes:
|
|
244
|
+
classes: t.object,
|
|
245
245
|
/**
|
|
246
246
|
* If `true`, the component is disabled.
|
|
247
247
|
* @default false
|
|
248
248
|
*/
|
|
249
|
-
disabled:
|
|
249
|
+
disabled: t.bool,
|
|
250
250
|
/**
|
|
251
251
|
* @ignore
|
|
252
252
|
*/
|
|
253
|
-
id:
|
|
253
|
+
id: t.string,
|
|
254
254
|
/**
|
|
255
255
|
* If `true`, the loading indicator is shown and the button becomes disabled.
|
|
256
256
|
* @default false
|
|
257
257
|
*/
|
|
258
|
-
loading:
|
|
258
|
+
loading: t.bool,
|
|
259
259
|
/**
|
|
260
260
|
* Element placed before the children if the button is in loading state.
|
|
261
261
|
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
262
262
|
* By default we render a `CircularProgress` that is labelled by the button itself.
|
|
263
263
|
* @default <CircularProgress color="inherit" size={16} />
|
|
264
264
|
*/
|
|
265
|
-
loadingIndicator:
|
|
265
|
+
loadingIndicator: t.node,
|
|
266
266
|
/**
|
|
267
267
|
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
268
268
|
* @default 'center'
|
|
269
269
|
*/
|
|
270
|
-
loadingPosition:
|
|
270
|
+
loadingPosition: N(t.oneOf(["start", "end", "center"]), (o) => o.loadingPosition === "start" && !o.startIcon ? new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.') : o.loadingPosition === "end" && !o.endIcon ? new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.') : null),
|
|
271
271
|
/**
|
|
272
272
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
273
273
|
*/
|
|
274
|
-
sx:
|
|
274
|
+
sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
|
|
275
275
|
/**
|
|
276
276
|
* The variant to use.
|
|
277
277
|
* @default 'text'
|
|
278
278
|
*/
|
|
279
|
-
variant:
|
|
279
|
+
variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
|
|
280
280
|
});
|
|
281
|
-
const V = g(B)(({ color:
|
|
282
|
-
justifyContent: "center",
|
|
283
|
-
alignItems: "center",
|
|
281
|
+
const V = g(B)(({ color: o, theme: n }) => ({
|
|
284
282
|
minHeight: 38,
|
|
285
283
|
textTransform: "none",
|
|
286
|
-
color: t,
|
|
287
|
-
borderColor: t,
|
|
288
|
-
borderRadius: 5,
|
|
289
|
-
borderWidth: 2,
|
|
290
284
|
transition: "all 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
291
|
-
"&.MuiButton-contained": {
|
|
292
|
-
color: o.palette.common.white
|
|
293
|
-
},
|
|
294
285
|
"&.MuiButton-outlined": {
|
|
295
286
|
borderRadius: 5,
|
|
296
|
-
borderWidth: 2
|
|
297
|
-
"
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
"&:hover": {
|
|
303
|
-
backgroundColor: o.palette.primary.dark,
|
|
304
|
-
borderColor: o.palette.primary.dark,
|
|
305
|
-
color: o.palette.common.white
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"&.MuiButton-colorSecondary": {
|
|
309
|
-
"&:active": {
|
|
310
|
-
borderColor: o.palette.secondary.main,
|
|
311
|
-
color: o.palette.secondary.main
|
|
312
|
-
},
|
|
313
|
-
"&:hover": {
|
|
314
|
-
backgroundColor: o.palette.secondary.main,
|
|
315
|
-
color: o.palette.common.white
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
"&.MuiButton-colorError": {
|
|
319
|
-
"&:active": {
|
|
320
|
-
borderColor: o.palette.error.main,
|
|
321
|
-
color: o.palette.error.main
|
|
322
|
-
},
|
|
323
|
-
"&:hover": {
|
|
324
|
-
backgroundColor: o.palette.error.main,
|
|
325
|
-
color: o.palette.common.white
|
|
326
|
-
}
|
|
327
|
-
}
|
|
287
|
+
borderWidth: 2
|
|
288
|
+
/* "&:hover": {
|
|
289
|
+
//backgroundColor: theme.palette[color].main,
|
|
290
|
+
color: theme.palette.common.white,
|
|
291
|
+
},*/
|
|
328
292
|
}
|
|
329
293
|
})), oo = ({
|
|
330
|
-
variant:
|
|
331
|
-
...
|
|
332
|
-
}) => /* @__PURE__ */
|
|
294
|
+
variant: o = "outlined",
|
|
295
|
+
...n
|
|
296
|
+
}) => /* @__PURE__ */ r(V, { variant: o, ...n });
|
|
333
297
|
export {
|
|
334
298
|
oo as default
|
|
335
299
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cgi-learning-hub/ui",
|
|
3
|
-
"version": "1.3.5-dev.
|
|
3
|
+
"version": "1.3.5-dev.1736343971",
|
|
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",
|