@serhii.olishevskyi/docs 1.2.4 → 1.2.5

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
@@ -105,11 +105,14 @@ interface SelectComponentProps<T = string> extends Omit<SelectProps<T | T[]>, 'o
105
105
  defaultValueOnClear?: T;
106
106
  }
107
107
 
108
- type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
108
+ type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label' | 'onChange'> & {
109
109
  checked?: boolean;
110
+ /**
111
+ * Стандартный обработчик изменения состояния MUI Switch
112
+ */
110
113
  onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
111
114
  /**
112
- * Общая метка switch (если одинаковая для обох состояний)
115
+ * Общая метка switch (если одинаковая для обоих состояний)
113
116
  */
114
117
  label?: ReactNode;
115
118
  /**
@@ -120,18 +123,18 @@ type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
120
123
  * Метка, когда Switch в состоянии checked === false
121
124
  */
122
125
  uncheckedLabel?: ReactNode;
123
- /**
124
- * Ключ перевода для интерактивного редактирования (TranslationDialog)
125
- */
126
126
  overrideNamespace?: string;
127
127
  switchProps?: SwitchProps;
128
128
  };
129
129
 
130
- type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
130
+ type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label' | 'onChange'> & {
131
131
  checked?: boolean;
132
+ /**
133
+ * Стандартный обработчик изменения состояния MUI Checkbox
134
+ */
132
135
  onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
133
136
  /**
134
- * Общая метка switch (если одинаковая для обох состояний)
137
+ * Общая метка чекбокса (если одинаковая для обоих состояний)
135
138
  */
136
139
  label?: ReactNode;
137
140
  /**
@@ -143,10 +146,13 @@ type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> &
143
146
  */
144
147
  uncheckedLabel?: ReactNode;
145
148
  /**
146
- * Ключ перевода для интерактивного редактирования (TranslationDialog)
149
+ * Кастомный namespace для перевода метки
147
150
  */
148
151
  overrideNamespace?: string;
149
- switchProps?: CheckboxProps;
152
+ /**
153
+ * Дополнительные пропсы для внутреннего компонента MUI Checkbox
154
+ */
155
+ checkboxProps?: CheckboxProps;
150
156
  };
151
157
 
152
158
  interface CopyClipboardButtonComponentProps extends Omit<IconButtonProps, 'onClick'> {
package/dist/index.d.ts CHANGED
@@ -105,11 +105,14 @@ interface SelectComponentProps<T = string> extends Omit<SelectProps<T | T[]>, 'o
105
105
  defaultValueOnClear?: T;
106
106
  }
107
107
 
108
- type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
108
+ type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label' | 'onChange'> & {
109
109
  checked?: boolean;
110
+ /**
111
+ * Стандартный обработчик изменения состояния MUI Switch
112
+ */
110
113
  onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
111
114
  /**
112
- * Общая метка switch (если одинаковая для обох состояний)
115
+ * Общая метка switch (если одинаковая для обоих состояний)
113
116
  */
114
117
  label?: ReactNode;
115
118
  /**
@@ -120,18 +123,18 @@ type SwitchComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
120
123
  * Метка, когда Switch в состоянии checked === false
121
124
  */
122
125
  uncheckedLabel?: ReactNode;
123
- /**
124
- * Ключ перевода для интерактивного редактирования (TranslationDialog)
125
- */
126
126
  overrideNamespace?: string;
127
127
  switchProps?: SwitchProps;
128
128
  };
129
129
 
130
- type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> & {
130
+ type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label' | 'onChange'> & {
131
131
  checked?: boolean;
132
+ /**
133
+ * Стандартный обработчик изменения состояния MUI Checkbox
134
+ */
132
135
  onChange?: (event: React__default.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
133
136
  /**
134
- * Общая метка switch (если одинаковая для обох состояний)
137
+ * Общая метка чекбокса (если одинаковая для обоих состояний)
135
138
  */
136
139
  label?: ReactNode;
137
140
  /**
@@ -143,10 +146,13 @@ type CheckboxComponentProps = Omit<FormControlLabelProps, 'control' | 'label'> &
143
146
  */
144
147
  uncheckedLabel?: ReactNode;
145
148
  /**
146
- * Ключ перевода для интерактивного редактирования (TranslationDialog)
149
+ * Кастомный namespace для перевода метки
147
150
  */
148
151
  overrideNamespace?: string;
149
- switchProps?: CheckboxProps;
152
+ /**
153
+ * Дополнительные пропсы для внутреннего компонента MUI Checkbox
154
+ */
155
+ checkboxProps?: CheckboxProps;
150
156
  };
151
157
 
152
158
  interface CopyClipboardButtonComponentProps extends Omit<IconButtonProps, 'onClick'> {
package/dist/index.js CHANGED
@@ -4537,7 +4537,7 @@ var CheckboxComponent = ({
4537
4537
  checkedLabel,
4538
4538
  uncheckedLabel,
4539
4539
  overrideNamespace,
4540
- switchProps,
4540
+ checkboxProps,
4541
4541
  ...props
4542
4542
  }) => {
4543
4543
  const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
@@ -4547,7 +4547,7 @@ var CheckboxComponent = ({
4547
4547
  }
4548
4548
  return node;
4549
4549
  };
4550
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material22.Box, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4550
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_material22.Box, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
4551
4551
  import_material22.FormControlLabel,
4552
4552
  {
4553
4553
  control: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
@@ -4555,13 +4555,13 @@ var CheckboxComponent = ({
4555
4555
  {
4556
4556
  checked,
4557
4557
  onChange,
4558
- ...switchProps
4558
+ ...checkboxProps
4559
4559
  }
4560
4560
  ),
4561
4561
  label: renderLabel(currentLabel),
4562
4562
  ...props
4563
4563
  }
4564
- ) }) });
4564
+ ) });
4565
4565
  };
4566
4566
 
4567
4567
  // src/UI/components/inputs/SwitchComponent.tsx
@@ -4585,7 +4585,7 @@ var SwitchComponent = ({
4585
4585
  }
4586
4586
  return node;
4587
4587
  };
4588
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material23.Box, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4588
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_material23.Box, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
4589
4589
  import_material23.FormControlLabel,
4590
4590
  {
4591
4591
  control: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
@@ -4599,7 +4599,7 @@ var SwitchComponent = ({
4599
4599
  label: renderLabel(currentLabel),
4600
4600
  ...props
4601
4601
  }
4602
- ) }) });
4602
+ ) });
4603
4603
  };
4604
4604
 
4605
4605
  // src/UI/index.ts
package/dist/index.mjs CHANGED
@@ -1797,7 +1797,7 @@ import {
1797
1797
  Checkbox as Checkbox2,
1798
1798
  Box as Box6
1799
1799
  } from "@mui/material";
1800
- import { Fragment as Fragment9, jsx as jsx12 } from "react/jsx-runtime";
1800
+ import { jsx as jsx12 } from "react/jsx-runtime";
1801
1801
  var CheckboxComponent = ({
1802
1802
  checked = false,
1803
1803
  onChange,
@@ -1805,7 +1805,7 @@ var CheckboxComponent = ({
1805
1805
  checkedLabel,
1806
1806
  uncheckedLabel,
1807
1807
  overrideNamespace,
1808
- switchProps,
1808
+ checkboxProps,
1809
1809
  ...props
1810
1810
  }) => {
1811
1811
  const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
@@ -1815,7 +1815,7 @@ var CheckboxComponent = ({
1815
1815
  }
1816
1816
  return node;
1817
1817
  };
1818
- return /* @__PURE__ */ jsx12(Fragment9, { children: /* @__PURE__ */ jsx12(Box6, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx12(
1818
+ return /* @__PURE__ */ jsx12(Box6, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx12(
1819
1819
  FormControlLabel,
1820
1820
  {
1821
1821
  control: /* @__PURE__ */ jsx12(
@@ -1823,13 +1823,13 @@ var CheckboxComponent = ({
1823
1823
  {
1824
1824
  checked,
1825
1825
  onChange,
1826
- ...switchProps
1826
+ ...checkboxProps
1827
1827
  }
1828
1828
  ),
1829
1829
  label: renderLabel(currentLabel),
1830
1830
  ...props
1831
1831
  }
1832
- ) }) });
1832
+ ) });
1833
1833
  };
1834
1834
 
1835
1835
  // src/UI/components/inputs/SwitchComponent.tsx
@@ -1838,7 +1838,7 @@ import {
1838
1838
  Switch,
1839
1839
  Box as Box7
1840
1840
  } from "@mui/material";
1841
- import { Fragment as Fragment10, jsx as jsx13 } from "react/jsx-runtime";
1841
+ import { jsx as jsx13 } from "react/jsx-runtime";
1842
1842
  var SwitchComponent = ({
1843
1843
  checked = false,
1844
1844
  onChange,
@@ -1856,7 +1856,7 @@ var SwitchComponent = ({
1856
1856
  }
1857
1857
  return node;
1858
1858
  };
1859
- return /* @__PURE__ */ jsx13(Fragment10, { children: /* @__PURE__ */ jsx13(Box7, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx13(
1859
+ return /* @__PURE__ */ jsx13(Box7, { sx: { display: "inline-flex", alignItems: "center", gap: 0.5 }, children: /* @__PURE__ */ jsx13(
1860
1860
  FormControlLabel2,
1861
1861
  {
1862
1862
  control: /* @__PURE__ */ jsx13(
@@ -1870,7 +1870,7 @@ var SwitchComponent = ({
1870
1870
  label: renderLabel(currentLabel),
1871
1871
  ...props
1872
1872
  }
1873
- ) }) });
1873
+ ) });
1874
1874
  };
1875
1875
 
1876
1876
  // src/UI/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serhii.olishevskyi/docs",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "DOCS.UA react packages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",