@cgi-learning-hub/ui 1.3.3-dev.1732123246 → 1.3.3-dev.1732550407
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/{Backdrop-DorR8O-b.js → Backdrop-DcJf9G30.js} +20 -20
- package/dist/{Box-BTNw-FYi.js → Box-D9cHa8GX.js} +7 -7
- package/dist/{Button--paERYBc.js → Button-Cx05eP88.js} +14 -14
- package/dist/{ButtonBase-B0gJT_ti.js → ButtonBase-z74SMnd9.js} +17 -17
- package/dist/{Card-BVJgnURR.js → Card-mAtxoJ0p.js} +3 -3
- package/dist/{Checkbox-aBoDjdQG.js → Checkbox-Bmz9nh6k.js} +12 -12
- package/dist/{CircularProgress-CIqTwP6H.js → CircularProgress-B5osG37N.js} +16 -16
- package/dist/{DatePicker-DXgVCuAd.js → DatePicker-Ds7y4pei.js} +198 -197
- package/dist/{DatePicker-DGRD-CdO.cjs → DatePicker-MSoGmJoG.cjs} +10 -10
- package/dist/{DefaultPropsProvider-StV_SUuk.js → DefaultPropsProvider-BYFwNPLt.js} +12 -12
- package/dist/Delete-Bb_PhA6v.cjs +1 -0
- package/dist/Delete-Dip-1l7n.js +8 -0
- package/dist/{DialogContent-CP2NOfUr.js → DialogContent-B_NH_if8.js} +21 -21
- package/dist/{DialogTitle-Couh2TzJ.js → DialogTitle-Bx7712Li.js} +4 -4
- package/dist/Divider-CMuvurmv.js +296 -0
- package/dist/Divider-DlN3YfOR.cjs +1 -0
- package/dist/FormControlLabel-BDXTL5Eo.js +261 -0
- package/dist/FormControlLabel-D8GTkxJD.cjs +1 -0
- package/dist/FormGroup-CFDapyxc.cjs +1 -0
- package/dist/FormGroup-DO8m1X6w.js +95 -0
- package/dist/{FormLabel-wDh-AEMQ.js → FormLabel-B11aqT37.js} +34 -33
- package/dist/FormLabel-DcUS1c1d.cjs +2 -0
- package/dist/{Grow-4QU1bnXQ.js → Grow-BKrOFfC1.js} +4 -4
- package/dist/{IconButton-CsqR1453.js → IconButton-DLcGpM1F.js} +4 -4
- package/dist/{InputAdornment-bXTpzNQ2.js → InputAdornment-BrvfHlzv.js} +4 -4
- package/dist/{InputBase-VKt_ajuq.js → InputBase-CHytwRH8.js} +47 -49
- package/dist/InputBase-qhWgXXNd.cjs +3 -0
- package/dist/{Link-CPyeYGpa.js → Link-D_0FIsgB.js} +19 -19
- package/dist/Menu-0Hr9Yx9l.cjs +7 -0
- package/dist/Menu-ysG9uY3e.js +965 -0
- package/dist/MenuItem-BP7OsPVc.cjs +1 -0
- package/dist/{MenuItem-BFkBwBkN.js → MenuItem-DYrKaYOk.js} +69 -74
- package/dist/{Modal-BDx2_UzP.js → Modal-DT240BJZ.js} +42 -42
- package/dist/{Paper-CMUbp6SX.js → Paper-vlsh8Nca.js} +6 -6
- package/dist/{Popper-D_UryU8v.js → Popper-BSaTZXvX.js} +5 -5
- package/dist/{Portal-DVy9JFBN.js → Portal-meM40OhI.js} +3 -3
- package/dist/Radio-CW4v1BS4.js +312 -0
- package/dist/Radio-D-wbZ6M-.cjs +1 -0
- package/dist/{Select-CcnCBhBN.js → Select-CKsf044t.js} +630 -1583
- package/dist/Select-DAHsfas2.cjs +3 -0
- package/dist/{Stack-CKjrTRJB.js → Stack-DbWQHN5i.js} +22 -22
- package/dist/{SwitchBase-DYa1wGSu.js → SwitchBase-DBnju71w.js} +10 -10
- package/dist/{TableSortLabel-Czgy_sW5.js → TableSortLabel-ByZJO-zF.js} +1097 -1382
- package/dist/TableSortLabel-C0MAdw-j.cjs +98 -0
- package/dist/{Tabs-RxcUgknI.js → Tabs-BqJSX1la.js} +10 -10
- package/dist/{TextField-DvGLmvG1.cjs → TextField-C23FnJYk.cjs} +1 -1
- package/dist/{TextField-DorMAtUh.js → TextField-DVUnQAd7.js} +24 -24
- package/dist/{Tooltip-B4e9QdHI.js → Tooltip-41rGxwva.js} +44 -44
- package/dist/{Typography-B29dnCv3.js → Typography-CizHc1nM.js} +4 -4
- package/dist/components/Button/Button.es.js +11 -11
- package/dist/components/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/DatePicker/DatePicker.es.js +2 -2
- package/dist/components/DatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/index.es.js +1 -1
- package/dist/components/Dropzone/Dropzone.cjs.js +1 -5
- package/dist/components/Dropzone/Dropzone.es.js +24 -2162
- package/dist/components/EmptyState/EmptyState.es.js +2 -2
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.cjs.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +21 -22
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/ImagePicker/ImagePicker.cjs.js +1 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +9 -0
- package/dist/components/ImagePicker/ImagePicker.es.js +148 -0
- package/dist/components/ImagePicker/index.cjs.js +1 -0
- package/dist/components/ImagePicker/index.d.ts +2 -0
- package/dist/components/ImagePicker/index.es.js +4 -0
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/PasswordInput/PasswordInput.es.js +7 -6
- package/dist/components/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/SearchInput/SearchInput.es.js +4 -4
- package/dist/components/TextInput/TextInput.cjs.js +1 -1
- package/dist/components/TextInput/TextInput.es.js +1 -1
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.es.js +266 -260
- package/dist/components/stories/Button.stories.es.js +1 -1
- package/dist/components/stories/Card.stories.es.js +8 -8
- package/dist/components/stories/Checkbox.stories.cjs.js +1 -1
- package/dist/components/stories/Checkbox.stories.es.js +41 -12
- package/dist/components/stories/DatePicker.stories.cjs.js +1 -1
- package/dist/components/stories/DatePicker.stories.es.js +1 -1
- package/dist/components/stories/Dialog.stories.es.js +2 -2
- package/dist/components/stories/Divider.stories.cjs.js +1 -0
- package/dist/components/stories/Divider.stories.d.ts +6 -0
- package/dist/components/stories/Divider.stories.es.js +41 -0
- package/dist/components/stories/FormControlLabel.stories.cjs.js +1 -0
- package/dist/components/stories/FormControlLabel.stories.d.ts +9 -0
- package/dist/components/stories/FormControlLabel.stories.es.js +378 -0
- package/dist/components/stories/Heading.stories.es.js +2 -2
- package/dist/components/stories/IconButton.stories.es.js +2 -2
- package/dist/components/stories/ImagePicker.stories.cjs.js +1 -0
- package/dist/components/stories/ImagePicker.stories.d.ts +6 -0
- package/dist/components/stories/ImagePicker.stories.es.js +16 -0
- package/dist/components/stories/Link.stories.es.js +1 -1
- package/dist/components/stories/Menu.stories.cjs.js +1 -0
- package/dist/components/stories/Menu.stories.d.ts +7 -0
- package/dist/components/stories/Menu.stories.es.js +51 -0
- package/dist/components/stories/Paper.stories.es.js +1 -1
- package/dist/components/stories/RadioGroup.stories.cjs.js +1 -1
- package/dist/components/stories/RadioGroup.stories.es.js +70 -372
- package/dist/components/stories/Select.stories.cjs.js +1 -1
- package/dist/components/stories/Select.stories.es.js +3 -3
- package/dist/components/stories/TabList.stories.es.js +10 -10
- package/dist/components/stories/TextField.stories.cjs.js +1 -1
- package/dist/components/stories/TextField.stories.es.js +1 -1
- package/dist/components/stories/Tooltip.stories.es.js +2 -2
- package/dist/components/stories/Typography.stories.cjs.js +1 -0
- package/dist/components/stories/Typography.stories.d.ts +6 -0
- package/dist/components/stories/Typography.stories.es.js +65 -0
- package/dist/{createSvgIcon-VByplk-r.js → createSvgIcon-BS0Qe85N.js} +3 -3
- package/dist/dividerClasses-Bp7otbbC.js +9 -0
- package/dist/dividerClasses-O0vIU6On.cjs +1 -0
- package/dist/{elementTypeAcceptingRef-BPhL72td.js → elementTypeAcceptingRef-DOFWAguJ.js} +1 -1
- package/dist/{extendSxProp-BYB-kybW.js → extendSxProp-BpXLpaGL.js} +1 -1
- package/dist/formControlState-CuX6WjAX.cjs +1 -0
- package/dist/formControlState-vgaj2ksH.js +10 -0
- package/dist/{fr-B4aeA9th.js → fr-Djc-bU-B.js} +1 -1
- package/dist/{identifier-BewKgEhI.js → identifier-B7MO0PvI.js} +6 -6
- package/dist/index-BtGBke8y.js +2141 -0
- package/dist/index-CEgiY5tJ.cjs +5 -0
- package/dist/{index-_oi9ph20.js → index-CKZgd5LP.js} +4 -4
- package/dist/{index-BAjSgP8k.js → index-yb8koCDz.js} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +266 -260
- package/dist/isHostComponent-PydJW4A4.cjs +1 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/{memoTheme-B9kDhX1-.js → memoTheme-CqfvfBST.js} +1 -1
- package/dist/{refType-3o3c-kYx.js → refType-BqQbA6de.js} +1 -1
- package/dist/{resolveComponentProps-BQQ-uUKZ.js → resolveComponentProps-CYk57pLv.js} +1 -1
- package/dist/{useSlot-B2hCpx8C.js → useSlot-BSVkAc2J.js} +1 -1
- package/dist/{useTheme-0u9_WhjM.js → useTheme-CzzAEESs.js} +3 -3
- package/dist/{useTheme-BrFhq4dW.js → useTheme-DrsmidxY.js} +1 -1
- package/dist/{useThemeProps-cERu5xHk.js → useThemeProps-B9UyPpzT.js} +3 -3
- package/dist/{useThemeProps-CwWORfXn.js → useThemeProps-BFeVem33.js} +2 -2
- package/dist/{useTimeout-Br8oWWYt.js → useTimeout-Znm_nF2D.js} +1 -1
- package/dist/utils-BWx1W_q1.cjs +1 -0
- package/dist/utils-DWqc1kRF.js +13 -0
- package/dist/{utils-CH0HZgJe.js → utils-jA5a7WHN.js} +1 -1
- package/package.json +1 -1
- package/dist/FormGroup-CcM69JIS.js +0 -348
- package/dist/FormGroup-KOLND6rE.cjs +0 -1
- package/dist/FormLabel-C506NT5o.cjs +0 -2
- package/dist/InputBase-Cpx39cny.cjs +0 -3
- package/dist/MenuItem-BxXCEc8h.cjs +0 -1
- package/dist/Select-CnFa2_je.cjs +0 -9
- package/dist/TableSortLabel-Ppl9Q-SZ.cjs +0 -98
- package/dist/formControlState-DCkDUdfO.cjs +0 -1
- package/dist/formControlState-DdQP43Uo.js +0 -21
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as a, Fragment as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m } from "react";
|
|
3
|
+
import p from "../Button/Button.es.js";
|
|
4
|
+
import { M as d } from "../../Menu-ysG9uY3e.js";
|
|
5
|
+
import { M as t } from "../../MenuItem-DYrKaYOk.js";
|
|
6
|
+
const h = (c) => {
|
|
7
|
+
const [r, i] = m(null), e = !!r, l = (s) => {
|
|
8
|
+
i(s.currentTarget);
|
|
9
|
+
}, n = () => i(null);
|
|
10
|
+
return /* @__PURE__ */ a(u, { children: [
|
|
11
|
+
/* @__PURE__ */ o(
|
|
12
|
+
p,
|
|
13
|
+
{
|
|
14
|
+
variant: "text",
|
|
15
|
+
id: "basic-button",
|
|
16
|
+
"aria-controls": e ? "basic-menu" : void 0,
|
|
17
|
+
"aria-haspopup": "true",
|
|
18
|
+
"aria-expanded": e ? "true" : void 0,
|
|
19
|
+
onClick: l,
|
|
20
|
+
children: "Open menu"
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ a(
|
|
24
|
+
d,
|
|
25
|
+
{
|
|
26
|
+
...c,
|
|
27
|
+
id: "basic-menu",
|
|
28
|
+
anchorEl: r,
|
|
29
|
+
open: e,
|
|
30
|
+
onClose: n,
|
|
31
|
+
MenuListProps: {
|
|
32
|
+
"aria-labelledby": "basic-button"
|
|
33
|
+
},
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ o(t, { onClick: n, children: "Profile" }),
|
|
36
|
+
/* @__PURE__ */ o(t, { onClick: n, children: "My account" }),
|
|
37
|
+
/* @__PURE__ */ o(t, { onClick: n, children: "Logout" })
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
42
|
+
}, x = {
|
|
43
|
+
title: "Components/Menu",
|
|
44
|
+
component: h
|
|
45
|
+
}, g = {
|
|
46
|
+
args: {}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
g as Default,
|
|
50
|
+
x as default
|
|
51
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { P as o } from "../../Paper-
|
|
2
|
+
import { P as o } from "../../Paper-vlsh8Nca.js";
|
|
3
3
|
const r = (e) => /* @__PURE__ */ t(o, { sx: { width: "10rem", height: "10rem", p: 1 }, ...e, children: "children" }), l = {
|
|
4
4
|
title: "Components/Paper",
|
|
5
5
|
component: r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),R=require("../../FormLabel-DcUS1c1d.cjs"),F=require("react"),r=require("../../identifier-DTh6b5Gz.cjs"),u=require("../../Radio-D-wbZ6M-.cjs"),G=require("../../useControlled-Ysk4KqoX.cjs"),T=require("../../useForkRef-CTI33h-3.cjs"),w=require("../../useId-DNXtOFeX.cjs"),S=require("../../FormGroup-CFDapyxc.cjs"),L=require("../../DefaultPropsProvider-eVMpAUQg.cjs"),p=require("../../FormControlLabel-D8GTkxJD.cjs");function O(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,a.get?a:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const l=O(F);function D(e){return r.generateUtilityClass("MuiRadioGroup",e)}r.generateUtilityClasses("MuiRadioGroup",["root","row","error"]);const M=e=>{const{classes:t,row:s,error:a}=e,i={root:["root",s&&"row",a&&"error"]};return L.composeClasses(i,D,t)},g=l.forwardRef(function(t,s){const{actions:a,children:i,className:y,defaultValue:j,name:C,onChange:c,value:v,...h}=t,d=l.useRef(null),x=M(t),[f,m]=G.useControlled({controlled:v,default:j,name:"RadioGroup"});l.useImperativeHandle(a,()=>({focus:()=>{let n=d.current.querySelector("input:not(:disabled):checked");n||(n=d.current.querySelector("input:not(:disabled)")),n&&n.focus()}}),[]);const P=T.useForkRef(s,d),b=w.useId(C),q=l.useMemo(()=>({name:b,onChange(n){m(n.target.value),c&&c(n,n.target.value)},value:f}),[b,c,m,f]);return o.jsx(u.RadioGroupContext.Provider,{value:q,children:o.jsx(S.FormGroup,{role:"radiogroup",ref:P,className:r.clsx(x.root,y),...h,children:i})})});process.env.NODE_ENV!=="production"&&(g.propTypes={children:r.PropTypes.node,className:r.PropTypes.string,defaultValue:r.PropTypes.any,name:r.PropTypes.string,onChange:r.PropTypes.func,value:r.PropTypes.any});const N=e=>o.jsxs(R.FormControl,{children:[o.jsx(R.FormLabel,{id:"radio-buttons-group-label",children:"Label"}),o.jsxs(g,{"aria-labelledby":"radio-buttons-group-label",defaultValue:"first",name:"radio-buttons-group",...e,children:[o.jsx(p.FormControlLabel,{value:"first",control:o.jsx(u.Radio,{}),label:"First"}),o.jsx(p.FormControlLabel,{value:"second",control:o.jsx(u.Radio,{}),label:"Second"}),o.jsx(p.FormControlLabel,{value:"third",control:o.jsx(u.Radio,{}),label:"Third"})]})]}),V={title:"Components/RadioGroup",component:N},_={args:{row:!1}},k={args:{row:!0}};exports.Default=_;exports.Row=k;exports.default=V;
|
|
@@ -1,371 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { F as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import { c as $ } from "../../createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
15
|
-
import { c as eo } from "../../createChainedFunction-C0nujS3O.js";
|
|
16
|
-
import { r as ao } from "../../refType-3o3c-kYx.js";
|
|
17
|
-
const to = q(/* @__PURE__ */ t("path", {
|
|
18
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
19
|
-
}), "RadioButtonUnchecked"), ro = q(/* @__PURE__ */ t("path", {
|
|
20
|
-
d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
|
|
21
|
-
}), "RadioButtonChecked"), so = C("span", {
|
|
22
|
-
shouldForwardProp: U
|
|
23
|
-
})({
|
|
24
|
-
position: "relative",
|
|
25
|
-
display: "flex"
|
|
26
|
-
}), no = C(to)({
|
|
27
|
-
// Scale applied to prevent dot misalignment in Safari
|
|
28
|
-
transform: "scale(1)"
|
|
29
|
-
}), io = C(ro)(L(({
|
|
30
|
-
theme: o
|
|
31
|
-
}) => ({
|
|
32
|
-
left: 0,
|
|
33
|
-
position: "absolute",
|
|
34
|
-
transform: "scale(0)",
|
|
35
|
-
transition: o.transitions.create("transform", {
|
|
36
|
-
easing: o.transitions.easing.easeIn,
|
|
37
|
-
duration: o.transitions.duration.shortest
|
|
38
|
-
}),
|
|
39
|
-
variants: [{
|
|
40
|
-
props: {
|
|
41
|
-
checked: !0
|
|
42
|
-
},
|
|
43
|
-
style: {
|
|
44
|
-
transform: "scale(1)",
|
|
45
|
-
transition: o.transitions.create("transform", {
|
|
46
|
-
easing: o.transitions.easing.easeOut,
|
|
47
|
-
duration: o.transitions.duration.shortest
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
}]
|
|
51
|
-
})));
|
|
52
|
-
function F(o) {
|
|
53
|
-
const {
|
|
54
|
-
checked: a = !1,
|
|
55
|
-
classes: r = {},
|
|
56
|
-
fontSize: s
|
|
57
|
-
} = o, i = {
|
|
58
|
-
...o,
|
|
59
|
-
checked: a
|
|
60
|
-
};
|
|
61
|
-
return /* @__PURE__ */ P(so, {
|
|
62
|
-
className: r.root,
|
|
63
|
-
ownerState: i,
|
|
64
|
-
children: [/* @__PURE__ */ t(no, {
|
|
65
|
-
fontSize: s,
|
|
66
|
-
className: r.background,
|
|
67
|
-
ownerState: i
|
|
68
|
-
}), /* @__PURE__ */ t(io, {
|
|
69
|
-
fontSize: s,
|
|
70
|
-
className: r.dot,
|
|
71
|
-
ownerState: i
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
process.env.NODE_ENV !== "production" && (F.propTypes = {
|
|
76
|
-
/**
|
|
77
|
-
* If `true`, the component is checked.
|
|
78
|
-
*/
|
|
79
|
-
checked: e.bool,
|
|
80
|
-
/**
|
|
81
|
-
* Override or extend the styles applied to the component.
|
|
82
|
-
*/
|
|
83
|
-
classes: e.object,
|
|
84
|
-
/**
|
|
85
|
-
* The size of the component.
|
|
86
|
-
* `small` is equivalent to the dense radio styling.
|
|
87
|
-
*/
|
|
88
|
-
fontSize: e.oneOf(["small", "medium"])
|
|
89
|
-
});
|
|
90
|
-
const G = /* @__PURE__ */ l.createContext(void 0);
|
|
91
|
-
process.env.NODE_ENV !== "production" && (G.displayName = "RadioGroupContext");
|
|
92
|
-
function lo() {
|
|
93
|
-
return l.useContext(G);
|
|
94
|
-
}
|
|
95
|
-
function co(o) {
|
|
96
|
-
return B("MuiRadio", o);
|
|
97
|
-
}
|
|
98
|
-
const E = j("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), uo = (o) => {
|
|
99
|
-
const {
|
|
100
|
-
classes: a,
|
|
101
|
-
color: r,
|
|
102
|
-
size: s
|
|
103
|
-
} = o, i = {
|
|
104
|
-
root: ["root", `color${y(r)}`, s !== "medium" && `size${y(s)}`]
|
|
105
|
-
};
|
|
106
|
-
return {
|
|
107
|
-
...a,
|
|
108
|
-
...D(i, co, a)
|
|
109
|
-
};
|
|
110
|
-
}, po = C(Y, {
|
|
111
|
-
shouldForwardProp: (o) => U(o) || o === "classes",
|
|
112
|
-
name: "MuiRadio",
|
|
113
|
-
slot: "Root",
|
|
114
|
-
overridesResolver: (o, a) => {
|
|
115
|
-
const {
|
|
116
|
-
ownerState: r
|
|
117
|
-
} = o;
|
|
118
|
-
return [a.root, r.size !== "medium" && a[`size${y(r.size)}`], a[`color${y(r.color)}`]];
|
|
119
|
-
}
|
|
120
|
-
})(L(({
|
|
121
|
-
theme: o
|
|
122
|
-
}) => ({
|
|
123
|
-
color: (o.vars || o).palette.text.secondary,
|
|
124
|
-
[`&.${E.disabled}`]: {
|
|
125
|
-
color: (o.vars || o).palette.action.disabled
|
|
126
|
-
},
|
|
127
|
-
variants: [{
|
|
128
|
-
props: {
|
|
129
|
-
color: "default",
|
|
130
|
-
disabled: !1,
|
|
131
|
-
disableRipple: !1
|
|
132
|
-
},
|
|
133
|
-
style: {
|
|
134
|
-
"&:hover": {
|
|
135
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : x(o.palette.action.active, o.palette.action.hoverOpacity)
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}, ...Object.entries(o.palette).filter($()).map(([a]) => ({
|
|
139
|
-
props: {
|
|
140
|
-
color: a,
|
|
141
|
-
disabled: !1,
|
|
142
|
-
disableRipple: !1
|
|
143
|
-
},
|
|
144
|
-
style: {
|
|
145
|
-
"&:hover": {
|
|
146
|
-
backgroundColor: o.vars ? `rgba(${o.vars.palette[a].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : x(o.palette[a].main, o.palette.action.hoverOpacity)
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
})), ...Object.entries(o.palette).filter($()).map(([a]) => ({
|
|
150
|
-
props: {
|
|
151
|
-
color: a,
|
|
152
|
-
disabled: !1
|
|
153
|
-
},
|
|
154
|
-
style: {
|
|
155
|
-
[`&.${E.checked}`]: {
|
|
156
|
-
color: (o.vars || o).palette[a].main
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
})), {
|
|
160
|
-
// Should be last to override other colors
|
|
161
|
-
props: {
|
|
162
|
-
disableRipple: !1
|
|
163
|
-
},
|
|
164
|
-
style: {
|
|
165
|
-
// Reset on touch devices, it doesn't add specificity
|
|
166
|
-
"&:hover": {
|
|
167
|
-
"@media (hover: none)": {
|
|
168
|
-
backgroundColor: "transparent"
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}]
|
|
173
|
-
})));
|
|
174
|
-
function fo(o, a) {
|
|
175
|
-
return typeof a == "object" && a !== null ? o === a : String(o) === String(a);
|
|
176
|
-
}
|
|
177
|
-
const T = /* @__PURE__ */ t(F, {
|
|
178
|
-
checked: !0
|
|
179
|
-
}), V = /* @__PURE__ */ t(F, {}), g = /* @__PURE__ */ l.forwardRef(function(a, r) {
|
|
180
|
-
const s = X({
|
|
181
|
-
props: a,
|
|
182
|
-
name: "MuiRadio"
|
|
183
|
-
}), {
|
|
184
|
-
checked: i,
|
|
185
|
-
checkedIcon: h = T,
|
|
186
|
-
color: S = "primary",
|
|
187
|
-
icon: k = V,
|
|
188
|
-
name: d,
|
|
189
|
-
onChange: w,
|
|
190
|
-
size: u = "medium",
|
|
191
|
-
className: p,
|
|
192
|
-
disabled: z,
|
|
193
|
-
disableRipple: m = !1,
|
|
194
|
-
...b
|
|
195
|
-
} = s, v = oo();
|
|
196
|
-
let c = z;
|
|
197
|
-
v && typeof c > "u" && (c = v.disabled), c ?? (c = !1);
|
|
198
|
-
const R = {
|
|
199
|
-
...s,
|
|
200
|
-
disabled: c,
|
|
201
|
-
disableRipple: m,
|
|
202
|
-
color: S,
|
|
203
|
-
size: u
|
|
204
|
-
}, n = uo(R), f = lo();
|
|
205
|
-
let O = i;
|
|
206
|
-
const H = eo(w, f && f.onChange);
|
|
207
|
-
let N = d;
|
|
208
|
-
return f && (typeof O > "u" && (O = fo(f.value, s.value)), typeof N > "u" && (N = f.name)), /* @__PURE__ */ t(po, {
|
|
209
|
-
type: "radio",
|
|
210
|
-
icon: /* @__PURE__ */ l.cloneElement(k, {
|
|
211
|
-
fontSize: V.props.fontSize ?? u
|
|
212
|
-
}),
|
|
213
|
-
checkedIcon: /* @__PURE__ */ l.cloneElement(h, {
|
|
214
|
-
fontSize: T.props.fontSize ?? u
|
|
215
|
-
}),
|
|
216
|
-
disabled: c,
|
|
217
|
-
ownerState: R,
|
|
218
|
-
classes: n,
|
|
219
|
-
name: N,
|
|
220
|
-
checked: O,
|
|
221
|
-
onChange: H,
|
|
222
|
-
ref: r,
|
|
223
|
-
className: M(n.root, p),
|
|
224
|
-
...b
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
process.env.NODE_ENV !== "production" && (g.propTypes = {
|
|
228
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
229
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
230
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
231
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
232
|
-
/**
|
|
233
|
-
* If `true`, the component is checked.
|
|
234
|
-
*/
|
|
235
|
-
checked: e.bool,
|
|
236
|
-
/**
|
|
237
|
-
* The icon to display when the component is checked.
|
|
238
|
-
* @default <RadioButtonIcon checked />
|
|
239
|
-
*/
|
|
240
|
-
checkedIcon: e.node,
|
|
241
|
-
/**
|
|
242
|
-
* Override or extend the styles applied to the component.
|
|
243
|
-
*/
|
|
244
|
-
classes: e.object,
|
|
245
|
-
/**
|
|
246
|
-
* @ignore
|
|
247
|
-
*/
|
|
248
|
-
className: e.string,
|
|
249
|
-
/**
|
|
250
|
-
* The color of the component.
|
|
251
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
252
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
253
|
-
* @default 'primary'
|
|
254
|
-
*/
|
|
255
|
-
color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
256
|
-
/**
|
|
257
|
-
* If `true`, the component is disabled.
|
|
258
|
-
*/
|
|
259
|
-
disabled: e.bool,
|
|
260
|
-
/**
|
|
261
|
-
* If `true`, the ripple effect is disabled.
|
|
262
|
-
* @default false
|
|
263
|
-
*/
|
|
264
|
-
disableRipple: e.bool,
|
|
265
|
-
/**
|
|
266
|
-
* The icon to display when the component is unchecked.
|
|
267
|
-
* @default <RadioButtonIcon />
|
|
268
|
-
*/
|
|
269
|
-
icon: e.node,
|
|
270
|
-
/**
|
|
271
|
-
* The id of the `input` element.
|
|
272
|
-
*/
|
|
273
|
-
id: e.string,
|
|
274
|
-
/**
|
|
275
|
-
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
276
|
-
*/
|
|
277
|
-
inputProps: e.object,
|
|
278
|
-
/**
|
|
279
|
-
* Pass a ref to the `input` element.
|
|
280
|
-
*/
|
|
281
|
-
inputRef: ao,
|
|
282
|
-
/**
|
|
283
|
-
* Name attribute of the `input` element.
|
|
284
|
-
*/
|
|
285
|
-
name: e.string,
|
|
286
|
-
/**
|
|
287
|
-
* Callback fired when the state is changed.
|
|
288
|
-
*
|
|
289
|
-
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
290
|
-
* You can pull out the new value by accessing `event.target.value` (string).
|
|
291
|
-
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
292
|
-
*/
|
|
293
|
-
onChange: e.func,
|
|
294
|
-
/**
|
|
295
|
-
* If `true`, the `input` element is required.
|
|
296
|
-
* @default false
|
|
297
|
-
*/
|
|
298
|
-
required: e.bool,
|
|
299
|
-
/**
|
|
300
|
-
* The size of the component.
|
|
301
|
-
* `small` is equivalent to the dense radio styling.
|
|
302
|
-
* @default 'medium'
|
|
303
|
-
*/
|
|
304
|
-
size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
|
|
305
|
-
/**
|
|
306
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
307
|
-
*/
|
|
308
|
-
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
309
|
-
/**
|
|
310
|
-
* The value of the component. The DOM API casts this to a string.
|
|
311
|
-
*/
|
|
312
|
-
value: e.any
|
|
313
|
-
});
|
|
314
|
-
function mo(o) {
|
|
315
|
-
return B("MuiRadioGroup", o);
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { F as V, a as N } from "../../FormLabel-B11aqT37.js";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { I as P, H as S, G as U, P as t } from "../../identifier-B7MO0PvI.js";
|
|
5
|
+
import { R as I, a as c } from "../../Radio-CW4v1BS4.js";
|
|
6
|
+
import { u as L } from "../../useControlled-BYdyS7Pn.js";
|
|
7
|
+
import { u as M } from "../../useForkRef-C_4o__cU.js";
|
|
8
|
+
import { u as T } from "../../useId-CK6Kn3Tn.js";
|
|
9
|
+
import { F as j } from "../../FormGroup-DO8m1X6w.js";
|
|
10
|
+
import { c as k } from "../../DefaultPropsProvider-BYFwNPLt.js";
|
|
11
|
+
import { F as d } from "../../FormControlLabel-BDXTL5Eo.js";
|
|
12
|
+
function q(r) {
|
|
13
|
+
return S("MuiRadioGroup", r);
|
|
316
14
|
}
|
|
317
|
-
|
|
318
|
-
const
|
|
15
|
+
P("MuiRadioGroup", ["root", "row", "error"]);
|
|
16
|
+
const D = (r) => {
|
|
319
17
|
const {
|
|
320
18
|
classes: a,
|
|
321
|
-
row:
|
|
322
|
-
error:
|
|
323
|
-
} =
|
|
324
|
-
return
|
|
325
|
-
root: ["root",
|
|
326
|
-
},
|
|
327
|
-
},
|
|
19
|
+
row: l,
|
|
20
|
+
error: n
|
|
21
|
+
} = r;
|
|
22
|
+
return k({
|
|
23
|
+
root: ["root", l && "row", n && "error"]
|
|
24
|
+
}, q, a);
|
|
25
|
+
}, b = /* @__PURE__ */ s.forwardRef(function(a, l) {
|
|
328
26
|
const {
|
|
329
27
|
// private
|
|
330
28
|
// eslint-disable-next-line react/prop-types
|
|
331
|
-
actions:
|
|
332
|
-
children:
|
|
29
|
+
actions: n,
|
|
30
|
+
children: m,
|
|
333
31
|
className: h,
|
|
334
|
-
defaultValue:
|
|
335
|
-
name:
|
|
336
|
-
onChange:
|
|
337
|
-
value:
|
|
338
|
-
...
|
|
339
|
-
} = a,
|
|
340
|
-
controlled:
|
|
341
|
-
default:
|
|
32
|
+
defaultValue: C,
|
|
33
|
+
name: v,
|
|
34
|
+
onChange: u,
|
|
35
|
+
value: y,
|
|
36
|
+
...G
|
|
37
|
+
} = a, i = s.useRef(null), F = D(a), [p, f] = L({
|
|
38
|
+
controlled: y,
|
|
39
|
+
default: C,
|
|
342
40
|
name: "RadioGroup"
|
|
343
41
|
});
|
|
344
|
-
|
|
42
|
+
s.useImperativeHandle(n, () => ({
|
|
345
43
|
focus: () => {
|
|
346
|
-
let
|
|
347
|
-
|
|
44
|
+
let e = i.current.querySelector("input:not(:disabled):checked");
|
|
45
|
+
e || (e = i.current.querySelector("input:not(:disabled)")), e && e.focus();
|
|
348
46
|
}
|
|
349
47
|
}), []);
|
|
350
|
-
const
|
|
351
|
-
name:
|
|
352
|
-
onChange(
|
|
353
|
-
|
|
48
|
+
const w = M(l, i), R = T(v), x = s.useMemo(() => ({
|
|
49
|
+
name: R,
|
|
50
|
+
onChange(e) {
|
|
51
|
+
f(e.target.value), u && u(e, e.target.value);
|
|
354
52
|
},
|
|
355
|
-
value:
|
|
356
|
-
}), [
|
|
357
|
-
return /* @__PURE__ */
|
|
358
|
-
value:
|
|
359
|
-
children: /* @__PURE__ */
|
|
53
|
+
value: p
|
|
54
|
+
}), [R, u, f, p]);
|
|
55
|
+
return /* @__PURE__ */ o(I.Provider, {
|
|
56
|
+
value: x,
|
|
57
|
+
children: /* @__PURE__ */ o(j, {
|
|
360
58
|
role: "radiogroup",
|
|
361
|
-
ref:
|
|
362
|
-
className:
|
|
363
|
-
...
|
|
364
|
-
children:
|
|
59
|
+
ref: w,
|
|
60
|
+
className: U(F.root, h),
|
|
61
|
+
...G,
|
|
62
|
+
children: m
|
|
365
63
|
})
|
|
366
64
|
});
|
|
367
65
|
});
|
|
368
|
-
process.env.NODE_ENV !== "production" && (
|
|
66
|
+
process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
369
67
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
370
68
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
371
69
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -373,20 +71,20 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
|
373
71
|
/**
|
|
374
72
|
* The content of the component.
|
|
375
73
|
*/
|
|
376
|
-
children:
|
|
74
|
+
children: t.node,
|
|
377
75
|
/**
|
|
378
76
|
* @ignore
|
|
379
77
|
*/
|
|
380
|
-
className:
|
|
78
|
+
className: t.string,
|
|
381
79
|
/**
|
|
382
80
|
* The default value. Use when the component is not controlled.
|
|
383
81
|
*/
|
|
384
|
-
defaultValue:
|
|
82
|
+
defaultValue: t.any,
|
|
385
83
|
/**
|
|
386
84
|
* The name used to reference the value of the control.
|
|
387
85
|
* If you don't provide this prop, it falls back to a randomly generated name.
|
|
388
86
|
*/
|
|
389
|
-
name:
|
|
87
|
+
name: t.string,
|
|
390
88
|
/**
|
|
391
89
|
* Callback fired when a radio button is selected.
|
|
392
90
|
*
|
|
@@ -394,42 +92,42 @@ process.env.NODE_ENV !== "production" && (_.propTypes = {
|
|
|
394
92
|
* @param {string} value The value of the selected radio button.
|
|
395
93
|
* You can pull out the new value by accessing `event.target.value` (string).
|
|
396
94
|
*/
|
|
397
|
-
onChange:
|
|
95
|
+
onChange: t.func,
|
|
398
96
|
/**
|
|
399
97
|
* Value of the selected radio button. The DOM API casts this to a string.
|
|
400
98
|
*/
|
|
401
|
-
value:
|
|
99
|
+
value: t.any
|
|
402
100
|
});
|
|
403
|
-
const
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
|
|
101
|
+
const E = (r) => /* @__PURE__ */ g(V, { children: [
|
|
102
|
+
/* @__PURE__ */ o(N, { id: "radio-buttons-group-label", children: "Label" }),
|
|
103
|
+
/* @__PURE__ */ g(
|
|
104
|
+
b,
|
|
407
105
|
{
|
|
408
106
|
"aria-labelledby": "radio-buttons-group-label",
|
|
409
107
|
defaultValue: "first",
|
|
410
108
|
name: "radio-buttons-group",
|
|
411
|
-
...
|
|
109
|
+
...r,
|
|
412
110
|
children: [
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ o(d, { value: "first", control: /* @__PURE__ */ o(c, {}), label: "First" }),
|
|
112
|
+
/* @__PURE__ */ o(d, { value: "second", control: /* @__PURE__ */ o(c, {}), label: "Second" }),
|
|
113
|
+
/* @__PURE__ */ o(d, { value: "third", control: /* @__PURE__ */ o(c, {}), label: "Third" })
|
|
416
114
|
]
|
|
417
115
|
}
|
|
418
116
|
)
|
|
419
|
-
] }),
|
|
117
|
+
] }), W = {
|
|
420
118
|
title: "Components/RadioGroup",
|
|
421
|
-
component:
|
|
422
|
-
},
|
|
119
|
+
component: E
|
|
120
|
+
}, X = {
|
|
423
121
|
args: {
|
|
424
122
|
row: !1
|
|
425
123
|
}
|
|
426
|
-
},
|
|
124
|
+
}, Y = {
|
|
427
125
|
args: {
|
|
428
126
|
row: !0
|
|
429
127
|
}
|
|
430
128
|
};
|
|
431
129
|
export {
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
130
|
+
X as Default,
|
|
131
|
+
Y as Row,
|
|
132
|
+
W as default
|
|
435
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),u=require("../../FormLabel-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),u=require("../../FormLabel-DcUS1c1d.cjs"),l=require("../../Select-DAHsfas2.cjs"),t=require("../../MenuItem-BP7OsPVc.cjs"),c=n=>{const[a,s]=d.useState("pending"),i=r=>s(r.target.value);return e.jsxs(u.FormControl,{variant:n.variant,sx:{width:"10rem"},children:[e.jsx(l.InputLabel,{id:"simple-select-label",children:"Status"}),e.jsxs(l.Select,{labelId:"simple-select-label",id:"simple-select",value:a,label:"Status",onChange:i,...n,children:[e.jsx(t.MenuItem,{value:"pending",children:"Pending"}),e.jsx(t.MenuItem,{value:"ongoing",children:"Ongoing"}),e.jsx(t.MenuItem,{value:"validated",children:"Validated"}),e.jsx(t.MenuItem,{value:"rejected",children:"Rejected"})]})]})},o={title:"Components/Select",component:c},g={args:{}},m={args:{variant:"filled"}},v={args:{variant:"standard"}},S={args:{disabled:!0}};exports.Default=g;exports.Disabled=S;exports.Filled=m;exports.Standard=v;exports.default=o;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d } from "react";
|
|
3
|
-
import { F as o } from "../../FormLabel-
|
|
4
|
-
import { a as c, S as m } from "../../Select-
|
|
5
|
-
import { M as t } from "../../MenuItem-
|
|
3
|
+
import { F as o } from "../../FormLabel-B11aqT37.js";
|
|
4
|
+
import { a as c, S as m } from "../../Select-CKsf044t.js";
|
|
5
|
+
import { M as t } from "../../MenuItem-DYrKaYOk.js";
|
|
6
6
|
const u = (a) => {
|
|
7
7
|
const [n, s] = d("pending"), r = (i) => s(i.target.value);
|
|
8
8
|
return /* @__PURE__ */ l(o, { variant: a.variant, sx: { width: "10rem" }, children: [
|