@cgi-learning-hub/ui 1.3.3-dev.1732123246 → 1.3.3-dev.1732274173
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/{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.es.js +4 -4
- package/dist/components/EmptyState/EmptyState.es.js +2 -2
- package/dist/components/FileList/FileList.es.js +1 -1
- package/dist/components/FileList/FileListItem.es.js +6 -6
- package/dist/components/Heading/Heading.es.js +2 -2
- package/dist/components/Loader/Loader.es.js +1 -1
- package/dist/components/LoaderBackdrop/LoaderBackdrop.es.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.es.js +4 -4
- 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.es.js +265 -261
- 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/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-_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 +265 -261
- 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,312 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { P as e, I as U, H as D, L as d, n as R, G } from "./identifier-B7MO0PvI.js";
|
|
3
|
+
import { S as V } from "./SwitchBase-DBnju71w.js";
|
|
4
|
+
import { c as z } from "./createSvgIcon-BS0Qe85N.js";
|
|
5
|
+
import { jsx as r, jsxs as _ } from "react/jsx-runtime";
|
|
6
|
+
import { s as p, r as O, u as q, c as H } from "./DefaultPropsProvider-BYFwNPLt.js";
|
|
7
|
+
import { m as I } from "./memoTheme-CqfvfBST.js";
|
|
8
|
+
import { u as L } from "./useFormControl-CatNKXAi.js";
|
|
9
|
+
import { c as g } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
|
|
10
|
+
import { r as Z } from "./refType-BqQbA6de.js";
|
|
11
|
+
import { c as A } from "./createChainedFunction-C0nujS3O.js";
|
|
12
|
+
const J = z(/* @__PURE__ */ r("path", {
|
|
13
|
+
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"
|
|
14
|
+
}), "RadioButtonUnchecked"), K = z(/* @__PURE__ */ r("path", {
|
|
15
|
+
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"
|
|
16
|
+
}), "RadioButtonChecked"), Q = p("span", {
|
|
17
|
+
shouldForwardProp: O
|
|
18
|
+
})({
|
|
19
|
+
position: "relative",
|
|
20
|
+
display: "flex"
|
|
21
|
+
}), W = p(J)({
|
|
22
|
+
// Scale applied to prevent dot misalignment in Safari
|
|
23
|
+
transform: "scale(1)"
|
|
24
|
+
}), X = p(K)(I(({
|
|
25
|
+
theme: o
|
|
26
|
+
}) => ({
|
|
27
|
+
left: 0,
|
|
28
|
+
position: "absolute",
|
|
29
|
+
transform: "scale(0)",
|
|
30
|
+
transition: o.transitions.create("transform", {
|
|
31
|
+
easing: o.transitions.easing.easeIn,
|
|
32
|
+
duration: o.transitions.duration.shortest
|
|
33
|
+
}),
|
|
34
|
+
variants: [{
|
|
35
|
+
props: {
|
|
36
|
+
checked: !0
|
|
37
|
+
},
|
|
38
|
+
style: {
|
|
39
|
+
transform: "scale(1)",
|
|
40
|
+
transition: o.transitions.create("transform", {
|
|
41
|
+
easing: o.transitions.easing.easeOut,
|
|
42
|
+
duration: o.transitions.duration.shortest
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
})));
|
|
47
|
+
function b(o) {
|
|
48
|
+
const {
|
|
49
|
+
checked: a = !1,
|
|
50
|
+
classes: t = {},
|
|
51
|
+
fontSize: s
|
|
52
|
+
} = o, n = {
|
|
53
|
+
...o,
|
|
54
|
+
checked: a
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ _(Q, {
|
|
57
|
+
className: t.root,
|
|
58
|
+
ownerState: n,
|
|
59
|
+
children: [/* @__PURE__ */ r(W, {
|
|
60
|
+
fontSize: s,
|
|
61
|
+
className: t.background,
|
|
62
|
+
ownerState: n
|
|
63
|
+
}), /* @__PURE__ */ r(X, {
|
|
64
|
+
fontSize: s,
|
|
65
|
+
className: t.dot,
|
|
66
|
+
ownerState: n
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
process.env.NODE_ENV !== "production" && (b.propTypes = {
|
|
71
|
+
/**
|
|
72
|
+
* If `true`, the component is checked.
|
|
73
|
+
*/
|
|
74
|
+
checked: e.bool,
|
|
75
|
+
/**
|
|
76
|
+
* Override or extend the styles applied to the component.
|
|
77
|
+
*/
|
|
78
|
+
classes: e.object,
|
|
79
|
+
/**
|
|
80
|
+
* The size of the component.
|
|
81
|
+
* `small` is equivalent to the dense radio styling.
|
|
82
|
+
*/
|
|
83
|
+
fontSize: e.oneOf(["small", "medium"])
|
|
84
|
+
});
|
|
85
|
+
const w = /* @__PURE__ */ l.createContext(void 0);
|
|
86
|
+
process.env.NODE_ENV !== "production" && (w.displayName = "RadioGroupContext");
|
|
87
|
+
function Y() {
|
|
88
|
+
return l.useContext(w);
|
|
89
|
+
}
|
|
90
|
+
function oo(o) {
|
|
91
|
+
return D("MuiRadio", o);
|
|
92
|
+
}
|
|
93
|
+
const h = U("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]), eo = (o) => {
|
|
94
|
+
const {
|
|
95
|
+
classes: a,
|
|
96
|
+
color: t,
|
|
97
|
+
size: s
|
|
98
|
+
} = o, n = {
|
|
99
|
+
root: ["root", `color${d(t)}`, s !== "medium" && `size${d(s)}`]
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
...a,
|
|
103
|
+
...H(n, oo, a)
|
|
104
|
+
};
|
|
105
|
+
}, ao = p(V, {
|
|
106
|
+
shouldForwardProp: (o) => O(o) || o === "classes",
|
|
107
|
+
name: "MuiRadio",
|
|
108
|
+
slot: "Root",
|
|
109
|
+
overridesResolver: (o, a) => {
|
|
110
|
+
const {
|
|
111
|
+
ownerState: t
|
|
112
|
+
} = o;
|
|
113
|
+
return [a.root, t.size !== "medium" && a[`size${d(t.size)}`], a[`color${d(t.color)}`]];
|
|
114
|
+
}
|
|
115
|
+
})(I(({
|
|
116
|
+
theme: o
|
|
117
|
+
}) => ({
|
|
118
|
+
color: (o.vars || o).palette.text.secondary,
|
|
119
|
+
[`&.${h.disabled}`]: {
|
|
120
|
+
color: (o.vars || o).palette.action.disabled
|
|
121
|
+
},
|
|
122
|
+
variants: [{
|
|
123
|
+
props: {
|
|
124
|
+
color: "default",
|
|
125
|
+
disabled: !1,
|
|
126
|
+
disableRipple: !1
|
|
127
|
+
},
|
|
128
|
+
style: {
|
|
129
|
+
"&:hover": {
|
|
130
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette.action.activeChannel} / ${o.vars.palette.action.hoverOpacity})` : R(o.palette.action.active, o.palette.action.hoverOpacity)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}, ...Object.entries(o.palette).filter(g()).map(([a]) => ({
|
|
134
|
+
props: {
|
|
135
|
+
color: a,
|
|
136
|
+
disabled: !1,
|
|
137
|
+
disableRipple: !1
|
|
138
|
+
},
|
|
139
|
+
style: {
|
|
140
|
+
"&:hover": {
|
|
141
|
+
backgroundColor: o.vars ? `rgba(${o.vars.palette[a].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : R(o.palette[a].main, o.palette.action.hoverOpacity)
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
})), ...Object.entries(o.palette).filter(g()).map(([a]) => ({
|
|
145
|
+
props: {
|
|
146
|
+
color: a,
|
|
147
|
+
disabled: !1
|
|
148
|
+
},
|
|
149
|
+
style: {
|
|
150
|
+
[`&.${h.checked}`]: {
|
|
151
|
+
color: (o.vars || o).palette[a].main
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})), {
|
|
155
|
+
// Should be last to override other colors
|
|
156
|
+
props: {
|
|
157
|
+
disableRipple: !1
|
|
158
|
+
},
|
|
159
|
+
style: {
|
|
160
|
+
// Reset on touch devices, it doesn't add specificity
|
|
161
|
+
"&:hover": {
|
|
162
|
+
"@media (hover: none)": {
|
|
163
|
+
backgroundColor: "transparent"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}]
|
|
168
|
+
})));
|
|
169
|
+
function to(o, a) {
|
|
170
|
+
return typeof a == "object" && a !== null ? o === a : String(o) === String(a);
|
|
171
|
+
}
|
|
172
|
+
const S = /* @__PURE__ */ r(b, {
|
|
173
|
+
checked: !0
|
|
174
|
+
}), k = /* @__PURE__ */ r(b, {}), so = /* @__PURE__ */ l.forwardRef(function(a, t) {
|
|
175
|
+
const s = q({
|
|
176
|
+
props: a,
|
|
177
|
+
name: "MuiRadio"
|
|
178
|
+
}), {
|
|
179
|
+
checked: n,
|
|
180
|
+
checkedIcon: N = S,
|
|
181
|
+
color: P = "primary",
|
|
182
|
+
icon: x = k,
|
|
183
|
+
name: j,
|
|
184
|
+
onChange: B,
|
|
185
|
+
size: u = "medium",
|
|
186
|
+
className: $,
|
|
187
|
+
disabled: E,
|
|
188
|
+
disableRipple: T = !1,
|
|
189
|
+
...F
|
|
190
|
+
} = s, y = L();
|
|
191
|
+
let i = E;
|
|
192
|
+
y && typeof i > "u" && (i = y.disabled), i ?? (i = !1);
|
|
193
|
+
const C = {
|
|
194
|
+
...s,
|
|
195
|
+
disabled: i,
|
|
196
|
+
disableRipple: T,
|
|
197
|
+
color: P,
|
|
198
|
+
size: u
|
|
199
|
+
}, v = eo(C), c = Y();
|
|
200
|
+
let f = n;
|
|
201
|
+
const M = A(B, c && c.onChange);
|
|
202
|
+
let m = j;
|
|
203
|
+
return c && (typeof f > "u" && (f = to(c.value, s.value)), typeof m > "u" && (m = c.name)), /* @__PURE__ */ r(ao, {
|
|
204
|
+
type: "radio",
|
|
205
|
+
icon: /* @__PURE__ */ l.cloneElement(x, {
|
|
206
|
+
fontSize: k.props.fontSize ?? u
|
|
207
|
+
}),
|
|
208
|
+
checkedIcon: /* @__PURE__ */ l.cloneElement(N, {
|
|
209
|
+
fontSize: S.props.fontSize ?? u
|
|
210
|
+
}),
|
|
211
|
+
disabled: i,
|
|
212
|
+
ownerState: C,
|
|
213
|
+
classes: v,
|
|
214
|
+
name: m,
|
|
215
|
+
checked: f,
|
|
216
|
+
onChange: M,
|
|
217
|
+
ref: t,
|
|
218
|
+
className: G(v.root, $),
|
|
219
|
+
...F
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
process.env.NODE_ENV !== "production" && (so.propTypes = {
|
|
223
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
224
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
225
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
226
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
227
|
+
/**
|
|
228
|
+
* If `true`, the component is checked.
|
|
229
|
+
*/
|
|
230
|
+
checked: e.bool,
|
|
231
|
+
/**
|
|
232
|
+
* The icon to display when the component is checked.
|
|
233
|
+
* @default <RadioButtonIcon checked />
|
|
234
|
+
*/
|
|
235
|
+
checkedIcon: e.node,
|
|
236
|
+
/**
|
|
237
|
+
* Override or extend the styles applied to the component.
|
|
238
|
+
*/
|
|
239
|
+
classes: e.object,
|
|
240
|
+
/**
|
|
241
|
+
* @ignore
|
|
242
|
+
*/
|
|
243
|
+
className: e.string,
|
|
244
|
+
/**
|
|
245
|
+
* The color of the component.
|
|
246
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
247
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
248
|
+
* @default 'primary'
|
|
249
|
+
*/
|
|
250
|
+
color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
251
|
+
/**
|
|
252
|
+
* If `true`, the component is disabled.
|
|
253
|
+
*/
|
|
254
|
+
disabled: e.bool,
|
|
255
|
+
/**
|
|
256
|
+
* If `true`, the ripple effect is disabled.
|
|
257
|
+
* @default false
|
|
258
|
+
*/
|
|
259
|
+
disableRipple: e.bool,
|
|
260
|
+
/**
|
|
261
|
+
* The icon to display when the component is unchecked.
|
|
262
|
+
* @default <RadioButtonIcon />
|
|
263
|
+
*/
|
|
264
|
+
icon: e.node,
|
|
265
|
+
/**
|
|
266
|
+
* The id of the `input` element.
|
|
267
|
+
*/
|
|
268
|
+
id: e.string,
|
|
269
|
+
/**
|
|
270
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
271
|
+
*/
|
|
272
|
+
inputProps: e.object,
|
|
273
|
+
/**
|
|
274
|
+
* Pass a ref to the `input` element.
|
|
275
|
+
*/
|
|
276
|
+
inputRef: Z,
|
|
277
|
+
/**
|
|
278
|
+
* Name attribute of the `input` element.
|
|
279
|
+
*/
|
|
280
|
+
name: e.string,
|
|
281
|
+
/**
|
|
282
|
+
* Callback fired when the state is changed.
|
|
283
|
+
*
|
|
284
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
285
|
+
* You can pull out the new value by accessing `event.target.value` (string).
|
|
286
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
287
|
+
*/
|
|
288
|
+
onChange: e.func,
|
|
289
|
+
/**
|
|
290
|
+
* If `true`, the `input` element is required.
|
|
291
|
+
* @default false
|
|
292
|
+
*/
|
|
293
|
+
required: e.bool,
|
|
294
|
+
/**
|
|
295
|
+
* The size of the component.
|
|
296
|
+
* `small` is equivalent to the dense radio styling.
|
|
297
|
+
* @default 'medium'
|
|
298
|
+
*/
|
|
299
|
+
size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
|
|
300
|
+
/**
|
|
301
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
302
|
+
*/
|
|
303
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
304
|
+
/**
|
|
305
|
+
* The value of the component. The DOM API casts this to a string.
|
|
306
|
+
*/
|
|
307
|
+
value: e.any
|
|
308
|
+
});
|
|
309
|
+
export {
|
|
310
|
+
w as R,
|
|
311
|
+
so as a
|
|
312
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const $=require("react"),o=require("./identifier-DTh6b5Gz.cjs"),E=require("./SwitchBase-DWfUIgEW.cjs"),h=require("./createSvgIcon-DQqazotA.cjs"),a=require("react/jsx-runtime"),n=require("./DefaultPropsProvider-eVMpAUQg.cjs"),S=require("./memoTheme-DJBS0nbO.cjs"),D=require("./useFormControl-haP0iPhl.cjs"),v=require("./createSimplePaletteValueFilter-PTK3TAhW.cjs"),M=require("./refType-DNB-r0Bp.cjs"),V=require("./createChainedFunction-CJmlQuW8.cjs");function U(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const p=U($),_=h.createSvgIcon(a.jsx("path",{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"}),"RadioButtonUnchecked"),G=h.createSvgIcon(a.jsx("path",{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"}),"RadioButtonChecked"),Z=n.styled("span",{shouldForwardProp:n.rootShouldForwardProp})({position:"relative",display:"flex"}),A=n.styled(_)({transform:"scale(1)"}),H=n.styled(G)(S.memoTheme(({theme:e})=>({left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest}),variants:[{props:{checked:!0},style:{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}}]})));function y(e){const{checked:t=!1,classes:s={},fontSize:r}=e,i={...e,checked:t};return a.jsxs(Z,{className:s.root,ownerState:i,children:[a.jsx(A,{fontSize:r,className:s.background,ownerState:i}),a.jsx(H,{fontSize:r,className:s.dot,ownerState:i})]})}process.env.NODE_ENV!=="production"&&(y.propTypes={checked:o.PropTypes.bool,classes:o.PropTypes.object,fontSize:o.PropTypes.oneOf(["small","medium"])});const P=p.createContext(void 0);process.env.NODE_ENV!=="production"&&(P.displayName="RadioGroupContext");function J(){return p.useContext(P)}function K(e){return o.generateUtilityClass("MuiRadio",e)}const C=o.generateUtilityClasses("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),L=e=>{const{classes:t,color:s,size:r}=e,i={root:["root",`color${o.capitalize(s)}`,r!=="medium"&&`size${o.capitalize(r)}`]};return{...t,...n.composeClasses(i,K,t)}},Q=n.styled(E.SwitchBase,{shouldForwardProp:e=>n.rootShouldForwardProp(e)||e==="classes",name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:s}=e;return[t.root,s.size!=="medium"&&t[`size${o.capitalize(s.size)}`],t[`color${o.capitalize(s.color)}`]]}})(S.memoTheme(({theme:e})=>({color:(e.vars||e).palette.text.secondary,[`&.${C.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{color:"default",disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:o.alpha(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(v.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,disabled:!1,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:o.alpha(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(v.createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,disabled:!1},style:{[`&.${C.checked}`]:{color:(e.vars||e).palette[t].main}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})));function W(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}const g=a.jsx(y,{checked:!0}),R=a.jsx(y,{}),k=p.forwardRef(function(t,s){const r=n.useDefaultProps({props:t,name:"MuiRadio"}),{checked:i,checkedIcon:z=g,color:O="primary",icon:j=R,name:x,onChange:w,size:d="medium",className:I,disabled:N,disableRipple:q=!1,...F}=r,m=D.useFormControl();let c=N;m&&typeof c>"u"&&(c=m.disabled),c??(c=!1);const T={...r,disabled:c,disableRipple:q,color:O,size:d},b=L(T),l=J();let u=i;const B=V.createChainedFunction(w,l&&l.onChange);let f=x;return l&&(typeof u>"u"&&(u=W(l.value,r.value)),typeof f>"u"&&(f=l.name)),a.jsx(Q,{type:"radio",icon:p.cloneElement(j,{fontSize:R.props.fontSize??d}),checkedIcon:p.cloneElement(z,{fontSize:g.props.fontSize??d}),disabled:c,ownerState:T,classes:b,name:f,checked:u,onChange:B,ref:s,className:o.clsx(b.root,I),...F})});process.env.NODE_ENV!=="production"&&(k.propTypes={checked:o.PropTypes.bool,checkedIcon:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOfType([o.PropTypes.oneOf(["default","primary","secondary","error","info","success","warning"]),o.PropTypes.string]),disabled:o.PropTypes.bool,disableRipple:o.PropTypes.bool,icon:o.PropTypes.node,id:o.PropTypes.string,inputProps:o.PropTypes.object,inputRef:M.refType,name:o.PropTypes.string,onChange:o.PropTypes.func,required:o.PropTypes.bool,size:o.PropTypes.oneOfType([o.PropTypes.oneOf(["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]),value:o.PropTypes.any});exports.Radio=k;exports.RadioGroupContext=P;
|