@octoguide/mui-ui-toolkit 0.8.1 → 0.8.2
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/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1504,7 +1504,17 @@ var ToggleButton = styled7(MuiToggleButton)(({ theme }) => ({
|
|
|
1504
1504
|
textTransform: "none",
|
|
1505
1505
|
color: theme.palette.text.primary,
|
|
1506
1506
|
lineHeight: 1.25,
|
|
1507
|
+
// Default (medium): 48px so ToggleButtonGroup total = 48 + 4 + 4 (group padding) = 56px (matches TextField medium)
|
|
1508
|
+
height: "48px",
|
|
1507
1509
|
transition: `background-color ${theme.tokens.transitions.durationBase} ease`,
|
|
1510
|
+
"&.MuiToggleButton-sizeSmall": {
|
|
1511
|
+
// 32px so ToggleButtonGroup total = 32 + 4 + 4 = 40px (matches TextField small)
|
|
1512
|
+
height: "32px"
|
|
1513
|
+
},
|
|
1514
|
+
"&.MuiToggleButton-sizeLarge": {
|
|
1515
|
+
// 56px so ToggleButtonGroup total = 56 + 4 + 4 = 64px (matches Toggle large)
|
|
1516
|
+
height: "56px"
|
|
1517
|
+
},
|
|
1508
1518
|
"&:hover": {
|
|
1509
1519
|
backgroundColor: theme.tokens.colors.backgroundSubtle
|
|
1510
1520
|
},
|
|
@@ -3575,11 +3585,11 @@ var StyledLegend = styled21("legend")(({ theme }) => ({
|
|
|
3575
3585
|
marginBottom: theme.spacing(1),
|
|
3576
3586
|
padding: 0
|
|
3577
3587
|
}));
|
|
3578
|
-
var StyledToggleWrapper = styled21("div")(({ theme }) => ({
|
|
3588
|
+
var StyledToggleWrapper = styled21("div")(({ theme, size = "medium" }) => ({
|
|
3579
3589
|
display: "flex",
|
|
3580
3590
|
flexDirection: "row",
|
|
3581
3591
|
width: theme.spacing(15),
|
|
3582
|
-
height: theme.spacing(
|
|
3592
|
+
height: size === "small" ? theme.spacing(5) : size === "large" ? theme.spacing(8) : theme.spacing(7),
|
|
3583
3593
|
backgroundColor: theme.palette.mode === "dark" ? theme.palette.background.paper : theme.palette.common.white,
|
|
3584
3594
|
border: `1px solid ${theme.tokens.colors.border}`,
|
|
3585
3595
|
borderRadius: theme.tokens.borderRadius.md
|
|
@@ -3683,13 +3693,14 @@ function Toggle({
|
|
|
3683
3693
|
error,
|
|
3684
3694
|
onChange,
|
|
3685
3695
|
onBlur,
|
|
3696
|
+
size = "medium",
|
|
3686
3697
|
...restProps
|
|
3687
3698
|
}) {
|
|
3688
3699
|
const testId = restProps["data-testid"];
|
|
3689
3700
|
return /* @__PURE__ */ jsxs13(StyledFieldset, { "data-component-id": "toggle", ...getCleanProps(restProps), children: [
|
|
3690
3701
|
label && /* @__PURE__ */ jsx26(StyledLegend, { children: label }),
|
|
3691
3702
|
description && /* @__PURE__ */ jsx26(FormHelperText, { children: description }),
|
|
3692
|
-
/* @__PURE__ */ jsxs13(StyledToggleWrapper, { children: [
|
|
3703
|
+
/* @__PURE__ */ jsxs13(StyledToggleWrapper, { size, children: [
|
|
3693
3704
|
/* @__PURE__ */ jsxs13(
|
|
3694
3705
|
StyledSwitch,
|
|
3695
3706
|
{
|