mayak-common-library 0.0.64 → 0.0.66

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 CHANGED
@@ -44,7 +44,7 @@ declare const CustomSelect: FC<SelectProps & PropsWithChildren>;
44
44
 
45
45
  interface SelectProProps {
46
46
  placeholder?: string;
47
- childTitle?: string;
47
+ childTitle?: ReactElement;
48
48
  colorBorder?: boolean;
49
49
  clickComponent?: ReactElement;
50
50
  fullContainerWidth?: boolean;
@@ -242,6 +242,7 @@ declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
242
242
  interface CustomCheckboxProps {
243
243
  labelProps?: FormControlLabelProps$1;
244
244
  checkboxProps?: CheckboxProps;
245
+ className?: string;
245
246
  label?: string;
246
247
  toggleView?: boolean;
247
248
  }
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ declare const CustomSelect: FC<SelectProps & PropsWithChildren>;
44
44
 
45
45
  interface SelectProProps {
46
46
  placeholder?: string;
47
- childTitle?: string;
47
+ childTitle?: ReactElement;
48
48
  colorBorder?: boolean;
49
49
  clickComponent?: ReactElement;
50
50
  fullContainerWidth?: boolean;
@@ -242,6 +242,7 @@ declare const ToggleButtonGroup: FC<ToggleButtonGroupProps & PropsWithChildren>;
242
242
  interface CustomCheckboxProps {
243
243
  labelProps?: FormControlLabelProps$1;
244
244
  checkboxProps?: CheckboxProps;
245
+ className?: string;
245
246
  label?: string;
246
247
  toggleView?: boolean;
247
248
  }
package/dist/index.js CHANGED
@@ -395,13 +395,7 @@ var SelectPro = ({
395
395
  children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(close_default, {})
396
396
  }
397
397
  ) : null,
398
- childTitle ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
399
- import_material4.Typography,
400
- {
401
- className: "text-sm font-normal text-accent-silver-2",
402
- children: childTitle
403
- }
404
- ) : null,
398
+ childTitle ? childTitle : null,
405
399
  childrenWithHandleChange
406
400
  ] })
407
401
  ]
@@ -1339,7 +1333,7 @@ var ToggleButtonsWithLabel = (props) => {
1339
1333
  if (collapseOnClick && collapseParent) collapseParent();
1340
1334
  };
1341
1335
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_material30.Stack, { children: [
1342
- label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography8.default, { className: "text-accent-silver-2 text-sm", children: label }) : null,
1336
+ label ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_Typography8.default, { className: "text-accent-silver-2 text-xs", children: label }) : null,
1343
1337
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1344
1338
  ToggleButtonGroup_default,
1345
1339
  __spreadProps(__spreadValues({}, field), {
@@ -1349,7 +1343,16 @@ var ToggleButtonsWithLabel = (props) => {
1349
1343
  onChange: handleFormat,
1350
1344
  "aria-label": "text formatting",
1351
1345
  className: `flex flex-${flexDirection} ${textView ? "gap-1 flex-nowrap flex-col" : " flex-wrap"}`,
1352
- children: values.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ToggleButton_default, { value: option.value, textView, children: option.title }, index))
1346
+ children: values.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
1347
+ ToggleButton_default,
1348
+ {
1349
+ value: option.value,
1350
+ textView,
1351
+ className: "!text-accent-dark",
1352
+ children: option.title
1353
+ },
1354
+ index
1355
+ ))
1353
1356
  })
1354
1357
  )
1355
1358
  ] });
@@ -1377,12 +1380,18 @@ var BpCheckedIcon = (0, import_material31.styled)(BpIcon)({
1377
1380
  }
1378
1381
  });
1379
1382
  var CustomCheckbox = (props) => {
1380
- const { label, labelProps, checkboxProps, toggleView = false } = props;
1383
+ const {
1384
+ label,
1385
+ labelProps,
1386
+ checkboxProps,
1387
+ className,
1388
+ toggleView = false
1389
+ } = props;
1381
1390
  if (label)
1382
1391
  return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1383
1392
  import_material31.FormControlLabel,
1384
1393
  __spreadProps(__spreadValues({
1385
- 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"}`,
1394
+ 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 : ""}`,
1386
1395
  control: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1387
1396
  import_Checkbox.default,
1388
1397
  __spreadProps(__spreadValues({}, checkboxProps), {
package/dist/index.mjs CHANGED
@@ -336,13 +336,7 @@ var SelectPro = ({
336
336
  children: /* @__PURE__ */ jsx7(close_default, {})
337
337
  }
338
338
  ) : null,
339
- childTitle ? /* @__PURE__ */ jsx7(
340
- Typography2,
341
- {
342
- className: "text-sm font-normal text-accent-silver-2",
343
- children: childTitle
344
- }
345
- ) : null,
339
+ childTitle ? childTitle : null,
346
340
  childrenWithHandleChange
347
341
  ] })
348
342
  ]
@@ -1294,7 +1288,7 @@ var ToggleButtonsWithLabel = (props) => {
1294
1288
  if (collapseOnClick && collapseParent) collapseParent();
1295
1289
  };
1296
1290
  return /* @__PURE__ */ jsxs18(Stack6, { children: [
1297
- label ? /* @__PURE__ */ jsx46(Typography17, { className: "text-accent-silver-2 text-sm", children: label }) : null,
1291
+ label ? /* @__PURE__ */ jsx46(Typography17, { className: "text-accent-silver-2 text-xs", children: label }) : null,
1298
1292
  /* @__PURE__ */ jsx46(
1299
1293
  ToggleButtonGroup_default,
1300
1294
  __spreadProps(__spreadValues({}, field), {
@@ -1304,7 +1298,16 @@ var ToggleButtonsWithLabel = (props) => {
1304
1298
  onChange: handleFormat,
1305
1299
  "aria-label": "text formatting",
1306
1300
  className: `flex flex-${flexDirection} ${textView ? "gap-1 flex-nowrap flex-col" : " flex-wrap"}`,
1307
- children: values.map((option, index) => /* @__PURE__ */ jsx46(ToggleButton_default, { value: option.value, textView, children: option.title }, index))
1301
+ children: values.map((option, index) => /* @__PURE__ */ jsx46(
1302
+ ToggleButton_default,
1303
+ {
1304
+ value: option.value,
1305
+ textView,
1306
+ className: "!text-accent-dark",
1307
+ children: option.title
1308
+ },
1309
+ index
1310
+ ))
1308
1311
  })
1309
1312
  )
1310
1313
  ] });
@@ -1332,12 +1335,18 @@ var BpCheckedIcon = styled11(BpIcon)({
1332
1335
  }
1333
1336
  });
1334
1337
  var CustomCheckbox = (props) => {
1335
- const { label, labelProps, checkboxProps, toggleView = false } = props;
1338
+ const {
1339
+ label,
1340
+ labelProps,
1341
+ checkboxProps,
1342
+ className,
1343
+ toggleView = false
1344
+ } = props;
1336
1345
  if (label)
1337
1346
  return /* @__PURE__ */ jsx47(
1338
1347
  FormControlLabel2,
1339
1348
  __spreadProps(__spreadValues({
1340
- 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"}`,
1349
+ 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 : ""}`,
1341
1350
  control: /* @__PURE__ */ jsx47(
1342
1351
  Checkbox,
1343
1352
  __spreadProps(__spreadValues({}, checkboxProps), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mayak-common-library",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",