@serhii.olishevskyi/docs 1.2.4 → 1.2.6
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 +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +12 -12
- package/dist/index.mjs +16 -16
- package/package.json +1 -1
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
|
-
* Общая метка
|
|
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
|
-
*
|
|
149
|
+
* Кастомный namespace для перевода метки
|
|
147
150
|
*/
|
|
148
151
|
overrideNamespace?: string;
|
|
149
|
-
|
|
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
|
-
* Общая метка
|
|
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
|
-
*
|
|
149
|
+
* Кастомный namespace для перевода метки
|
|
147
150
|
*/
|
|
148
151
|
overrideNamespace?: string;
|
|
149
|
-
|
|
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
|
@@ -4526,11 +4526,11 @@ var PageLinkWidget = ({
|
|
|
4526
4526
|
);
|
|
4527
4527
|
};
|
|
4528
4528
|
|
|
4529
|
-
// src/UI/components/inputs/
|
|
4529
|
+
// src/UI/components/inputs/SwitchComponent.tsx
|
|
4530
4530
|
var import_material22 = require("@mui/material");
|
|
4531
4531
|
init_TranslateText();
|
|
4532
4532
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4533
|
-
var
|
|
4533
|
+
var SwitchComponent = ({
|
|
4534
4534
|
checked = false,
|
|
4535
4535
|
onChange,
|
|
4536
4536
|
label,
|
|
@@ -4547,11 +4547,11 @@ var CheckboxComponent = ({
|
|
|
4547
4547
|
}
|
|
4548
4548
|
return node;
|
|
4549
4549
|
};
|
|
4550
|
-
return /* @__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)(
|
|
4554
|
-
import_material22.
|
|
4554
|
+
import_material22.Switch,
|
|
4555
4555
|
{
|
|
4556
4556
|
checked,
|
|
4557
4557
|
onChange,
|
|
@@ -4561,21 +4561,21 @@ var CheckboxComponent = ({
|
|
|
4561
4561
|
label: renderLabel(currentLabel),
|
|
4562
4562
|
...props
|
|
4563
4563
|
}
|
|
4564
|
-
) })
|
|
4564
|
+
) });
|
|
4565
4565
|
};
|
|
4566
4566
|
|
|
4567
|
-
// src/UI/components/inputs/
|
|
4567
|
+
// src/UI/components/inputs/CheckboxComponent.tsx
|
|
4568
4568
|
var import_material23 = require("@mui/material");
|
|
4569
4569
|
init_TranslateText();
|
|
4570
4570
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4571
|
-
var
|
|
4571
|
+
var CheckboxComponent = ({
|
|
4572
4572
|
checked = false,
|
|
4573
4573
|
onChange,
|
|
4574
4574
|
label,
|
|
4575
4575
|
checkedLabel,
|
|
4576
4576
|
uncheckedLabel,
|
|
4577
4577
|
overrideNamespace,
|
|
4578
|
-
|
|
4578
|
+
checkboxProps,
|
|
4579
4579
|
...props
|
|
4580
4580
|
}) => {
|
|
4581
4581
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
@@ -4585,21 +4585,21 @@ var SwitchComponent = ({
|
|
|
4585
4585
|
}
|
|
4586
4586
|
return node;
|
|
4587
4587
|
};
|
|
4588
|
-
return /* @__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)(
|
|
4592
|
-
import_material23.
|
|
4592
|
+
import_material23.Checkbox,
|
|
4593
4593
|
{
|
|
4594
4594
|
checked,
|
|
4595
4595
|
onChange,
|
|
4596
|
-
...
|
|
4596
|
+
...checkboxProps
|
|
4597
4597
|
}
|
|
4598
4598
|
),
|
|
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
|
@@ -1791,14 +1791,14 @@ var PageLinkWidget = ({
|
|
|
1791
1791
|
);
|
|
1792
1792
|
};
|
|
1793
1793
|
|
|
1794
|
-
// src/UI/components/inputs/
|
|
1794
|
+
// src/UI/components/inputs/SwitchComponent.tsx
|
|
1795
1795
|
import {
|
|
1796
1796
|
FormControlLabel,
|
|
1797
|
-
|
|
1797
|
+
Switch,
|
|
1798
1798
|
Box as Box6
|
|
1799
1799
|
} from "@mui/material";
|
|
1800
|
-
import {
|
|
1801
|
-
var
|
|
1800
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1801
|
+
var SwitchComponent = ({
|
|
1802
1802
|
checked = false,
|
|
1803
1803
|
onChange,
|
|
1804
1804
|
label,
|
|
@@ -1815,11 +1815,11 @@ var CheckboxComponent = ({
|
|
|
1815
1815
|
}
|
|
1816
1816
|
return node;
|
|
1817
1817
|
};
|
|
1818
|
-
return /* @__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(
|
|
1822
|
-
|
|
1822
|
+
Switch,
|
|
1823
1823
|
{
|
|
1824
1824
|
checked,
|
|
1825
1825
|
onChange,
|
|
@@ -1829,24 +1829,24 @@ var CheckboxComponent = ({
|
|
|
1829
1829
|
label: renderLabel(currentLabel),
|
|
1830
1830
|
...props
|
|
1831
1831
|
}
|
|
1832
|
-
) })
|
|
1832
|
+
) });
|
|
1833
1833
|
};
|
|
1834
1834
|
|
|
1835
|
-
// src/UI/components/inputs/
|
|
1835
|
+
// src/UI/components/inputs/CheckboxComponent.tsx
|
|
1836
1836
|
import {
|
|
1837
1837
|
FormControlLabel as FormControlLabel2,
|
|
1838
|
-
|
|
1838
|
+
Checkbox as Checkbox2,
|
|
1839
1839
|
Box as Box7
|
|
1840
1840
|
} from "@mui/material";
|
|
1841
|
-
import {
|
|
1842
|
-
var
|
|
1841
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1842
|
+
var CheckboxComponent = ({
|
|
1843
1843
|
checked = false,
|
|
1844
1844
|
onChange,
|
|
1845
1845
|
label,
|
|
1846
1846
|
checkedLabel,
|
|
1847
1847
|
uncheckedLabel,
|
|
1848
1848
|
overrideNamespace,
|
|
1849
|
-
|
|
1849
|
+
checkboxProps,
|
|
1850
1850
|
...props
|
|
1851
1851
|
}) => {
|
|
1852
1852
|
const currentLabel = label ?? (checked ? checkedLabel : uncheckedLabel);
|
|
@@ -1856,21 +1856,21 @@ var SwitchComponent = ({
|
|
|
1856
1856
|
}
|
|
1857
1857
|
return node;
|
|
1858
1858
|
};
|
|
1859
|
-
return /* @__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(
|
|
1863
|
-
|
|
1863
|
+
Checkbox2,
|
|
1864
1864
|
{
|
|
1865
1865
|
checked,
|
|
1866
1866
|
onChange,
|
|
1867
|
-
...
|
|
1867
|
+
...checkboxProps
|
|
1868
1868
|
}
|
|
1869
1869
|
),
|
|
1870
1870
|
label: renderLabel(currentLabel),
|
|
1871
1871
|
...props
|
|
1872
1872
|
}
|
|
1873
|
-
) })
|
|
1873
|
+
) });
|
|
1874
1874
|
};
|
|
1875
1875
|
|
|
1876
1876
|
// src/UI/index.ts
|