mayak-common-library 0.0.65 → 0.0.67
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 +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -4
- package/dist/index.mjs +14 -4
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -224,6 +224,7 @@ interface ToggleButtonsMultipleProps extends ToggleButtonGroupProps$1 {
|
|
|
224
224
|
collapseParent?: () => void;
|
|
225
225
|
label?: string;
|
|
226
226
|
flexDirection?: "row" | "col";
|
|
227
|
+
fixWidth?: boolean;
|
|
227
228
|
}
|
|
228
229
|
declare const ToggleButtonsWithLabel: <T extends FieldValues>(props: ToggleButtonsMultipleProps & UseControllerProps<T>) => react_jsx_runtime.JSX.Element;
|
|
229
230
|
|
|
@@ -242,6 +243,7 @@ declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
|
|
|
242
243
|
interface CustomCheckboxProps {
|
|
243
244
|
labelProps?: FormControlLabelProps$1;
|
|
244
245
|
checkboxProps?: CheckboxProps;
|
|
246
|
+
className?: string;
|
|
245
247
|
label?: string;
|
|
246
248
|
toggleView?: boolean;
|
|
247
249
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -224,6 +224,7 @@ interface ToggleButtonsMultipleProps extends ToggleButtonGroupProps$1 {
|
|
|
224
224
|
collapseParent?: () => void;
|
|
225
225
|
label?: string;
|
|
226
226
|
flexDirection?: "row" | "col";
|
|
227
|
+
fixWidth?: boolean;
|
|
227
228
|
}
|
|
228
229
|
declare const ToggleButtonsWithLabel: <T extends FieldValues>(props: ToggleButtonsMultipleProps & UseControllerProps<T>) => react_jsx_runtime.JSX.Element;
|
|
229
230
|
|
|
@@ -242,6 +243,7 @@ declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
|
|
|
242
243
|
interface CustomCheckboxProps {
|
|
243
244
|
labelProps?: FormControlLabelProps$1;
|
|
244
245
|
checkboxProps?: CheckboxProps;
|
|
246
|
+
className?: string;
|
|
245
247
|
label?: string;
|
|
246
248
|
toggleView?: boolean;
|
|
247
249
|
}
|
package/dist/index.js
CHANGED
|
@@ -1325,7 +1325,8 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1325
1325
|
collapseOnClick = false,
|
|
1326
1326
|
label,
|
|
1327
1327
|
collapseParent,
|
|
1328
|
-
flexDirection = "row"
|
|
1328
|
+
flexDirection = "row",
|
|
1329
|
+
fixWidth = false
|
|
1329
1330
|
} = props;
|
|
1330
1331
|
const { field } = (0, import_react_hook_form3.useController)(props);
|
|
1331
1332
|
const handleFormat = (_event, newFormats) => {
|
|
@@ -1348,7 +1349,10 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1348
1349
|
{
|
|
1349
1350
|
value: option.value,
|
|
1350
1351
|
textView,
|
|
1351
|
-
|
|
1352
|
+
sx: {
|
|
1353
|
+
color: "#343434",
|
|
1354
|
+
width: fixWidth ? "70px" : "initial"
|
|
1355
|
+
},
|
|
1352
1356
|
children: option.title
|
|
1353
1357
|
},
|
|
1354
1358
|
index
|
|
@@ -1380,12 +1384,18 @@ var BpCheckedIcon = (0, import_material31.styled)(BpIcon)({
|
|
|
1380
1384
|
}
|
|
1381
1385
|
});
|
|
1382
1386
|
var CustomCheckbox = (props) => {
|
|
1383
|
-
const {
|
|
1387
|
+
const {
|
|
1388
|
+
label,
|
|
1389
|
+
labelProps,
|
|
1390
|
+
checkboxProps,
|
|
1391
|
+
className,
|
|
1392
|
+
toggleView = false
|
|
1393
|
+
} = props;
|
|
1384
1394
|
if (label)
|
|
1385
1395
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1386
1396
|
import_material31.FormControlLabel,
|
|
1387
1397
|
__spreadProps(__spreadValues({
|
|
1388
|
-
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1398
|
+
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"} ${className ? className : ""}`,
|
|
1389
1399
|
control: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
1390
1400
|
import_Checkbox.default,
|
|
1391
1401
|
__spreadProps(__spreadValues({}, checkboxProps), {
|
package/dist/index.mjs
CHANGED
|
@@ -1280,7 +1280,8 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1280
1280
|
collapseOnClick = false,
|
|
1281
1281
|
label,
|
|
1282
1282
|
collapseParent,
|
|
1283
|
-
flexDirection = "row"
|
|
1283
|
+
flexDirection = "row",
|
|
1284
|
+
fixWidth = false
|
|
1284
1285
|
} = props;
|
|
1285
1286
|
const { field } = useController3(props);
|
|
1286
1287
|
const handleFormat = (_event, newFormats) => {
|
|
@@ -1303,7 +1304,10 @@ var ToggleButtonsWithLabel = (props) => {
|
|
|
1303
1304
|
{
|
|
1304
1305
|
value: option.value,
|
|
1305
1306
|
textView,
|
|
1306
|
-
|
|
1307
|
+
sx: {
|
|
1308
|
+
color: "#343434",
|
|
1309
|
+
width: fixWidth ? "70px" : "initial"
|
|
1310
|
+
},
|
|
1307
1311
|
children: option.title
|
|
1308
1312
|
},
|
|
1309
1313
|
index
|
|
@@ -1335,12 +1339,18 @@ var BpCheckedIcon = styled11(BpIcon)({
|
|
|
1335
1339
|
}
|
|
1336
1340
|
});
|
|
1337
1341
|
var CustomCheckbox = (props) => {
|
|
1338
|
-
const {
|
|
1342
|
+
const {
|
|
1343
|
+
label,
|
|
1344
|
+
labelProps,
|
|
1345
|
+
checkboxProps,
|
|
1346
|
+
className,
|
|
1347
|
+
toggleView = false
|
|
1348
|
+
} = props;
|
|
1339
1349
|
if (label)
|
|
1340
1350
|
return /* @__PURE__ */ jsx47(
|
|
1341
1351
|
FormControlLabel2,
|
|
1342
1352
|
__spreadProps(__spreadValues({
|
|
1343
|
-
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"}`,
|
|
1353
|
+
className: `w-fit bg-accent-silver px-3 py-0.5 ml-0 h-[28px] ${toggleView ? "gap-0" : "gap-x-1"} ${(checkboxProps == null ? void 0 : checkboxProps.checked) && toggleView && "!bg-accent-beige"} ${className ? className : ""}`,
|
|
1344
1354
|
control: /* @__PURE__ */ jsx47(
|
|
1345
1355
|
Checkbox,
|
|
1346
1356
|
__spreadProps(__spreadValues({}, checkboxProps), {
|