@snack-uikit/toggles 0.9.9 → 0.9.10-preview-41627947.0
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/README.md
CHANGED
|
@@ -155,7 +155,6 @@ return (
|
|
|
155
155
|
### Props
|
|
156
156
|
| name | type | default value | description |
|
|
157
157
|
|------|------|---------------|-------------|
|
|
158
|
-
| children* | `ReactNode` | - | Вложенный контент |
|
|
159
158
|
| defaultValue | `string \| string[]` | - | Начальное состояние |
|
|
160
159
|
| value | `string \| string[]` | - | Controlled состояние |
|
|
161
160
|
| onChange | `((value: string) => void) \| ((value: string[]) => void)` | - | Controlled обработчик измения состояния |
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { SELECTION_MODE } from '../../constants';
|
|
3
|
-
export type ToggleGroupProps = {
|
|
4
|
-
/** Вложенный контент */
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
} & ({
|
|
3
|
+
export type ToggleGroupProps = PropsWithChildren<{
|
|
7
4
|
/** Начальное состояние */
|
|
8
5
|
defaultValue?: string;
|
|
9
6
|
/** Controlled состояние */
|
|
@@ -21,5 +18,5 @@ export type ToggleGroupProps = {
|
|
|
21
18
|
onChange?(value: (string[] | undefined) | string[]): void;
|
|
22
19
|
/** Режим выбора */
|
|
23
20
|
selectionMode?: typeof SELECTION_MODE.Multiple;
|
|
24
|
-
}
|
|
21
|
+
}>;
|
|
25
22
|
export declare function ToggleGroup({ children, value: valueProp, onChange: onChangeProp, selectionMode, defaultValue, }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Toggles",
|
|
7
|
-
"version": "0.9.
|
|
7
|
+
"version": "0.9.10-preview-41627947.0",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"merge-refs": "1.2.1",
|
|
39
39
|
"uncontrollable": "8.0.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "86dc024e318ce10011bf49bfc9842e233bf4e2e6"
|
|
42
42
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropsWithChildren, useCallback } from 'react';
|
|
2
2
|
import { useUncontrolledProp } from 'uncontrollable';
|
|
3
3
|
|
|
4
4
|
import { SELECTION_MODE } from '../../constants';
|
|
5
5
|
import { ToggleGroupContext } from '../../context';
|
|
6
6
|
|
|
7
|
-
export type ToggleGroupProps =
|
|
8
|
-
/** Вложенный контент */
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
} & (
|
|
7
|
+
export type ToggleGroupProps = PropsWithChildren<
|
|
11
8
|
| {
|
|
12
9
|
/** Начальное состояние */
|
|
13
10
|
defaultValue?: string;
|
|
@@ -28,7 +25,7 @@ export type ToggleGroupProps = {
|
|
|
28
25
|
/** Режим выбора */
|
|
29
26
|
selectionMode?: typeof SELECTION_MODE.Multiple;
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
>;
|
|
32
29
|
|
|
33
30
|
export function ToggleGroup({
|
|
34
31
|
children,
|