@fluentui/react-radio 0.0.0-nightly-20220510-0420.1 → 0.0.0-nightly-20220511-0419.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/CHANGELOG.json +21 -15
  2. package/CHANGELOG.md +11 -10
  3. package/{lib → dist}/tsdoc-metadata.json +0 -0
  4. package/package.json +8 -8
  5. package/lib/Radio.d.ts +0 -1
  6. package/lib/RadioGroup.d.ts +0 -1
  7. package/lib/components/Radio/Radio.d.ts +0 -6
  8. package/lib/components/Radio/Radio.types.d.ts +0 -69
  9. package/lib/components/Radio/index.d.ts +0 -5
  10. package/lib/components/Radio/renderRadio.d.ts +0 -5
  11. package/lib/components/Radio/useRadio.d.ts +0 -12
  12. package/lib/components/Radio/useRadioStyles.d.ts +0 -11
  13. package/lib/components/RadioGroup/RadioGroup.d.ts +0 -6
  14. package/lib/components/RadioGroup/RadioGroup.types.d.ts +0 -63
  15. package/lib/components/RadioGroup/index.d.ts +0 -5
  16. package/lib/components/RadioGroup/renderRadioGroup.d.ts +0 -5
  17. package/lib/components/RadioGroup/useRadioGroup.d.ts +0 -12
  18. package/lib/components/RadioGroup/useRadioGroupStyles.d.ts +0 -11
  19. package/lib/contexts/RadioGroupContext.d.ts +0 -6
  20. package/lib/contexts/index.d.ts +0 -2
  21. package/lib/contexts/useRadioGroupContextValues.d.ts +0 -2
  22. package/lib/index.d.ts +0 -5
  23. package/lib-commonjs/Radio.d.ts +0 -1
  24. package/lib-commonjs/RadioGroup.d.ts +0 -1
  25. package/lib-commonjs/components/Radio/Radio.d.ts +0 -6
  26. package/lib-commonjs/components/Radio/Radio.types.d.ts +0 -69
  27. package/lib-commonjs/components/Radio/index.d.ts +0 -5
  28. package/lib-commonjs/components/Radio/renderRadio.d.ts +0 -5
  29. package/lib-commonjs/components/Radio/useRadio.d.ts +0 -12
  30. package/lib-commonjs/components/Radio/useRadioStyles.d.ts +0 -11
  31. package/lib-commonjs/components/RadioGroup/RadioGroup.d.ts +0 -6
  32. package/lib-commonjs/components/RadioGroup/RadioGroup.types.d.ts +0 -63
  33. package/lib-commonjs/components/RadioGroup/index.d.ts +0 -5
  34. package/lib-commonjs/components/RadioGroup/renderRadioGroup.d.ts +0 -5
  35. package/lib-commonjs/components/RadioGroup/useRadioGroup.d.ts +0 -12
  36. package/lib-commonjs/components/RadioGroup/useRadioGroupStyles.d.ts +0 -11
  37. package/lib-commonjs/contexts/RadioGroupContext.d.ts +0 -6
  38. package/lib-commonjs/contexts/index.d.ts +0 -2
  39. package/lib-commonjs/contexts/useRadioGroupContextValues.d.ts +0 -2
  40. package/lib-commonjs/index.d.ts +0 -5
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-radio",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 10 May 2022 04:31:47 GMT",
6
- "tag": "@fluentui/react-radio_v0.0.0-nightly-20220510-0420.1",
7
- "version": "0.0.0-nightly-20220510-0420.1",
5
+ "date": "Wed, 11 May 2022 04:31:18 GMT",
6
+ "tag": "@fluentui/react-radio_v0.0.0-nightly-20220511-0419.1",
7
+ "version": "0.0.0-nightly-20220511-0419.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -13,6 +13,12 @@
13
13
  "commit": "not available",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
+ {
17
+ "author": "martinhochel@microsoft.com",
18
+ "package": "@fluentui/react-radio",
19
+ "commit": "eb1084fd607c0d1086f9d465168be5822daa5e40",
20
+ "comment": "feat: ship rolluped only dts"
21
+ },
16
22
  {
17
23
  "author": "esteban.230@hotmail.com",
18
24
  "package": "@fluentui/react-radio",
@@ -22,38 +28,38 @@
22
28
  {
23
29
  "author": "beachball",
24
30
  "package": "@fluentui/react-radio",
25
- "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20220510-0420.1",
26
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
31
+ "comment": "Bump @fluentui/react-context-selector to v0.0.0-nightly-20220511-0419.1",
32
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
27
33
  },
28
34
  {
29
35
  "author": "beachball",
30
36
  "package": "@fluentui/react-radio",
31
- "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20220510-0420.1",
32
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
37
+ "comment": "Bump @fluentui/react-label to v0.0.0-nightly-20220511-0419.1",
38
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
33
39
  },
34
40
  {
35
41
  "author": "beachball",
36
42
  "package": "@fluentui/react-radio",
37
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220510-0420.1",
38
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
43
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220511-0419.1",
44
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
39
45
  },
40
46
  {
41
47
  "author": "beachball",
42
48
  "package": "@fluentui/react-radio",
43
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220510-0420.1",
44
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
49
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220511-0419.1",
50
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
45
51
  },
46
52
  {
47
53
  "author": "beachball",
48
54
  "package": "@fluentui/react-radio",
49
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220510-0420.1",
50
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
55
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1",
56
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
51
57
  },
52
58
  {
53
59
  "author": "beachball",
54
60
  "package": "@fluentui/react-radio",
55
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220510-0420.1",
56
- "commit": "23be9682b20fba2ea59bbb882e2225b9bc81133a"
61
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220511-0419.1",
62
+ "commit": "03a572202e24fe35d789f3009dc25922a002061e"
57
63
  }
58
64
  ]
59
65
  }
package/CHANGELOG.md CHANGED
@@ -1,24 +1,25 @@
1
1
  # Change Log - @fluentui/react-radio
2
2
 
3
- This log was last generated on Tue, 10 May 2022 04:31:47 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 11 May 2022 04:31:18 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220510-0420.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v0.0.0-nightly-20220510-0420.1)
7
+ ## [0.0.0-nightly-20220511-0419.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v0.0.0-nightly-20220511-0419.1)
8
8
 
9
- Tue, 10 May 2022 04:31:47 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.0-rc.2..@fluentui/react-radio_v0.0.0-nightly-20220510-0420.1)
9
+ Wed, 11 May 2022 04:31:18 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.0.0-rc.2..@fluentui/react-radio_v0.0.0-nightly-20220511-0419.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
15
+ - feat: ship rolluped only dts ([PR #22874](https://github.com/microsoft/fluentui/pull/22874) by martinhochel@microsoft.com)
15
16
  - Updated react-label package version to RC. ([PR #22865](https://github.com/microsoft/fluentui/pull/22865) by esteban.230@hotmail.com)
16
- - Bump @fluentui/react-context-selector to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
17
- - Bump @fluentui/react-label to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
18
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
19
- - Bump @fluentui/react-theme to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
20
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
21
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220510-0420.1 ([commit](https://github.com/microsoft/fluentui/commit/23be9682b20fba2ea59bbb882e2225b9bc81133a) by beachball)
17
+ - Bump @fluentui/react-context-selector to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
18
+ - Bump @fluentui/react-label to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
20
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
21
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
22
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220511-0419.1 ([commit](https://github.com/microsoft/fluentui/commit/03a572202e24fe35d789f3009dc25922a002061e) by beachball)
22
23
 
23
24
  ## [9.0.0-rc.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.0.0-rc.2)
24
25
 
File without changes
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@fluentui/react-radio",
3
- "version": "0.0.0-nightly-20220510-0420.1",
3
+ "version": "0.0.0-nightly-20220511-0419.1",
4
4
  "description": "Fluent UI Radio component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
7
- "typings": "lib/index.d.ts",
7
+ "typings": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
@@ -28,15 +28,15 @@
28
28
  "devDependencies": {
29
29
  "@fluentui/eslint-plugin": "*",
30
30
  "@fluentui/react-conformance": "*",
31
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220510-0420.1"
31
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20220511-0419.1"
32
32
  },
33
33
  "dependencies": {
34
- "@fluentui/react-context-selector": "0.0.0-nightly-20220510-0420.1",
34
+ "@fluentui/react-context-selector": "0.0.0-nightly-20220511-0419.1",
35
35
  "@fluentui/react-icons": "^2.0.166-rc.3",
36
- "@fluentui/react-label": "0.0.0-nightly-20220510-0420.1",
37
- "@fluentui/react-tabster": "0.0.0-nightly-20220510-0420.1",
38
- "@fluentui/react-theme": "0.0.0-nightly-20220510-0420.1",
39
- "@fluentui/react-utilities": "0.0.0-nightly-20220510-0420.1",
36
+ "@fluentui/react-label": "0.0.0-nightly-20220511-0419.1",
37
+ "@fluentui/react-tabster": "0.0.0-nightly-20220511-0419.1",
38
+ "@fluentui/react-theme": "0.0.0-nightly-20220511-0419.1",
39
+ "@fluentui/react-utilities": "0.0.0-nightly-20220511-0419.1",
40
40
  "@griffel/react": "1.0.3",
41
41
  "tslib": "^2.1.0"
42
42
  },
package/lib/Radio.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components/Radio/index';
@@ -1 +0,0 @@
1
- export * from './components/RadioGroup/index';
@@ -1,6 +0,0 @@
1
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
2
- import type { RadioProps } from './Radio.types';
3
- /**
4
- * Radio component is a wrapper for a radio button with a label.
5
- */
6
- export declare const Radio: ForwardRefComponent<RadioProps>;
@@ -1,69 +0,0 @@
1
- import * as React from 'react';
2
- import { Label } from '@fluentui/react-label';
3
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
4
- export declare type RadioSlots = {
5
- /**
6
- * The root element of the Radio.
7
- *
8
- * The root slot receives the `className` and `style` specified directly on the `<Radio>`.
9
- * All other native props will be applied to the primary slot: `input`
10
- */
11
- root: NonNullable<Slot<'span'>>;
12
- /**
13
- * The Radio's label.
14
- */
15
- label: Slot<typeof Label>;
16
- /**
17
- * Hidden input that handles the radio's functionality.
18
- *
19
- * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,
20
- * except `className` and `style`, which remain on the root slot.
21
- */
22
- input: NonNullable<Slot<'input'>>;
23
- /**
24
- * A circle outline, with a filled circle icon inside when the Radio is checked.
25
- */
26
- indicator: NonNullable<Slot<'div'>>;
27
- };
28
- /**
29
- * Radio Props
30
- */
31
- export declare type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {
32
- /**
33
- * The value of the RadioGroup when this Radio item is selected.
34
- */
35
- value?: string;
36
- /**
37
- * The position of the label relative to the radio indicator.
38
- *
39
- * This defaults to `after` unless the Radio is inside a RadioGroup with `layout="horizontalStacked"`,
40
- * in which case it defaults to `below`.
41
- *
42
- * @defaultvalue after
43
- */
44
- labelPosition?: 'after' | 'below';
45
- /**
46
- * Disable this Radio item.
47
- */
48
- disabled?: boolean;
49
- /**
50
- * Callback when this Radio is selected in its group.
51
- *
52
- * **Note:** `onChange` is NOT called when this Radio is deselected.
53
- * Use RadioGroup's `onChange` event to determine when the selection in the group changes.
54
- */
55
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;
56
- };
57
- /**
58
- * Data for the onChange event for Radio.
59
- */
60
- export declare type RadioOnChangeData = {
61
- /**
62
- * The value prop of this Radio item.
63
- */
64
- value: string;
65
- };
66
- /**
67
- * State used in rendering Radio
68
- */
69
- export declare type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;
@@ -1,5 +0,0 @@
1
- export * from './Radio';
2
- export * from './Radio.types';
3
- export * from './renderRadio';
4
- export * from './useRadio';
5
- export * from './useRadioStyles';
@@ -1,5 +0,0 @@
1
- import type { RadioState } from './Radio.types';
2
- /**
3
- * Render the final JSX of Radio
4
- */
5
- export declare const renderRadio_unstable: (state: RadioState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { RadioProps, RadioState } from './Radio.types';
3
- /**
4
- * Create the state required to render Radio.
5
- *
6
- * The returned state can be modified with hooks such as useRadioStyles_unstable,
7
- * before being passed to renderRadio_unstable.
8
- *
9
- * @param props - props from this instance of Radio
10
- * @param ref - reference to `<input>` element of Radio
11
- */
12
- export declare const useRadio_unstable: (props: RadioProps, ref: React.Ref<HTMLInputElement>) => RadioState;
@@ -1,11 +0,0 @@
1
- import type { RadioSlots, RadioState } from './Radio.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `radioClassNames.root` instead.
5
- */
6
- export declare const radioClassName = "fui-Radio";
7
- export declare const radioClassNames: SlotClassNames<RadioSlots>;
8
- /**
9
- * Apply styling to the Radio slots based on the state
10
- */
11
- export declare const useRadioStyles_unstable: (state: RadioState) => void;
@@ -1,6 +0,0 @@
1
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
2
- import { RadioGroupProps } from './RadioGroup.types';
3
- /**
4
- * A RadioGroup component presents a set of options where only one option can be selected.
5
- */
6
- export declare const RadioGroup: ForwardRefComponent<RadioGroupProps>;
@@ -1,63 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
- export declare type RadioGroupSlots = {
4
- /**
5
- * The radio group root.
6
- */
7
- root: NonNullable<Slot<'div'>>;
8
- };
9
- export declare type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {
10
- /**
11
- * The name of this radio group. This name is applied to all Radio items inside this group.
12
- *
13
- * If no name is provided, one will be generated so that all of the Radio items have the same name.
14
- */
15
- name?: string;
16
- /**
17
- * The selected Radio item in this group.
18
- *
19
- * This should be the `value` prop of one of the Radio items inside this group.
20
- */
21
- value?: string;
22
- /**
23
- * The default selected Radio item in this group.
24
- *
25
- * This should be the `value` prop of one of the Radio items inside this group.
26
- */
27
- defaultValue?: string;
28
- /**
29
- * Callback when the selected Radio item changes.
30
- */
31
- onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;
32
- /**
33
- * How the radio items are laid out in the group.
34
- *
35
- * @default vertical
36
- */
37
- layout?: 'vertical' | 'horizontal' | 'horizontalStacked';
38
- /**
39
- * Disable all Radio items in this group.
40
- */
41
- disabled?: boolean;
42
- /**
43
- * Require all Radio items in this group.
44
- */
45
- required?: boolean;
46
- };
47
- /**
48
- * Data for the onChange event for RadioGroup.
49
- */
50
- export declare type RadioGroupOnChangeData = {
51
- /**
52
- * The value of the newly selected Radio item.
53
- */
54
- value: string;
55
- };
56
- /**
57
- * State used in rendering RadioGroup
58
- */
59
- export declare type RadioGroupState = ComponentState<RadioGroupSlots> & Required<Pick<RadioGroupProps, 'layout'>> & Partial<Exclude<RadioGroupProps, 'onChange' | 'layout'>>;
60
- export declare type RadioGroupContextValue = Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;
61
- export declare type RadioGroupContextValues = {
62
- radioGroup: RadioGroupContextValue;
63
- };
@@ -1,5 +0,0 @@
1
- export * from './RadioGroup';
2
- export * from './RadioGroup.types';
3
- export * from './renderRadioGroup';
4
- export * from './useRadioGroup';
5
- export * from './useRadioGroupStyles';
@@ -1,5 +0,0 @@
1
- import { RadioGroupContextValues, RadioGroupState } from './RadioGroup.types';
2
- /**
3
- * Render the final JSX of RadioGroup
4
- */
5
- export declare const renderRadioGroup_unstable: (state: RadioGroupState, contextValues: RadioGroupContextValues) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { RadioGroupProps, RadioGroupState } from './RadioGroup.types';
3
- /**
4
- * Create the state required to render RadioGroup.
5
- *
6
- * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,
7
- * before being passed to renderRadioGroup_unstable.
8
- *
9
- * @param props - props from this instance of RadioGroup
10
- * @param ref - reference to root HTMLElement of RadioGroup
11
- */
12
- export declare const useRadioGroup_unstable: (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>) => RadioGroupState;
@@ -1,11 +0,0 @@
1
- import { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `radioGroupClassNames.root` instead.
5
- */
6
- export declare const radioGroupClassName = "fui-RadioGroup";
7
- export declare const radioGroupClassNames: SlotClassNames<RadioGroupSlots>;
8
- /**
9
- * Apply styling to the RadioGroup slots based on the state
10
- */
11
- export declare const useRadioGroupStyles_unstable: (state: RadioGroupState) => void;
@@ -1,6 +0,0 @@
1
- import type { Context } from '@fluentui/react-context-selector';
2
- import type { RadioGroupContextValue } from '../RadioGroup';
3
- /**
4
- * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.
5
- */
6
- export declare const RadioGroupContext: Context<RadioGroupContextValue>;
@@ -1,2 +0,0 @@
1
- export * from './RadioGroupContext';
2
- export * from './useRadioGroupContextValues';
@@ -1,2 +0,0 @@
1
- import type { RadioGroupContextValues, RadioGroupState } from '../RadioGroup';
2
- export declare const useRadioGroupContextValues: (state: RadioGroupState) => RadioGroupContextValues;
package/lib/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export { RadioGroup, radioGroupClassName, radioGroupClassNames, renderRadioGroup_unstable, useRadioGroupStyles_unstable, useRadioGroup_unstable, } from './RadioGroup';
2
- export type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupOnChangeData, RadioGroupProps, RadioGroupSlots, RadioGroupState, } from './RadioGroup';
3
- export { Radio, radioClassName, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable, } from './Radio';
4
- export type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';
5
- export { RadioGroupContext, useRadioGroupContextValues } from './contexts/index';
@@ -1 +0,0 @@
1
- export * from './components/Radio/index';
@@ -1 +0,0 @@
1
- export * from './components/RadioGroup/index';
@@ -1,6 +0,0 @@
1
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
2
- import type { RadioProps } from './Radio.types';
3
- /**
4
- * Radio component is a wrapper for a radio button with a label.
5
- */
6
- export declare const Radio: ForwardRefComponent<RadioProps>;
@@ -1,69 +0,0 @@
1
- import * as React from 'react';
2
- import { Label } from '@fluentui/react-label';
3
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
4
- export declare type RadioSlots = {
5
- /**
6
- * The root element of the Radio.
7
- *
8
- * The root slot receives the `className` and `style` specified directly on the `<Radio>`.
9
- * All other native props will be applied to the primary slot: `input`
10
- */
11
- root: NonNullable<Slot<'span'>>;
12
- /**
13
- * The Radio's label.
14
- */
15
- label: Slot<typeof Label>;
16
- /**
17
- * Hidden input that handles the radio's functionality.
18
- *
19
- * This is the PRIMARY slot: all native properties specified directly on `<Radio>` will be applied to this slot,
20
- * except `className` and `style`, which remain on the root slot.
21
- */
22
- input: NonNullable<Slot<'input'>>;
23
- /**
24
- * A circle outline, with a filled circle icon inside when the Radio is checked.
25
- */
26
- indicator: NonNullable<Slot<'div'>>;
27
- };
28
- /**
29
- * Radio Props
30
- */
31
- export declare type RadioProps = Omit<ComponentProps<Partial<RadioSlots>, 'input'>, 'onChange' | 'size'> & {
32
- /**
33
- * The value of the RadioGroup when this Radio item is selected.
34
- */
35
- value?: string;
36
- /**
37
- * The position of the label relative to the radio indicator.
38
- *
39
- * This defaults to `after` unless the Radio is inside a RadioGroup with `layout="horizontalStacked"`,
40
- * in which case it defaults to `below`.
41
- *
42
- * @defaultvalue after
43
- */
44
- labelPosition?: 'after' | 'below';
45
- /**
46
- * Disable this Radio item.
47
- */
48
- disabled?: boolean;
49
- /**
50
- * Callback when this Radio is selected in its group.
51
- *
52
- * **Note:** `onChange` is NOT called when this Radio is deselected.
53
- * Use RadioGroup's `onChange` event to determine when the selection in the group changes.
54
- */
55
- onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: RadioOnChangeData) => void;
56
- };
57
- /**
58
- * Data for the onChange event for Radio.
59
- */
60
- export declare type RadioOnChangeData = {
61
- /**
62
- * The value prop of this Radio item.
63
- */
64
- value: string;
65
- };
66
- /**
67
- * State used in rendering Radio
68
- */
69
- export declare type RadioState = ComponentState<RadioSlots> & Required<Pick<RadioProps, 'labelPosition'>>;
@@ -1,5 +0,0 @@
1
- export * from './Radio';
2
- export * from './Radio.types';
3
- export * from './renderRadio';
4
- export * from './useRadio';
5
- export * from './useRadioStyles';
@@ -1,5 +0,0 @@
1
- import type { RadioState } from './Radio.types';
2
- /**
3
- * Render the final JSX of Radio
4
- */
5
- export declare const renderRadio_unstable: (state: RadioState) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import type { RadioProps, RadioState } from './Radio.types';
3
- /**
4
- * Create the state required to render Radio.
5
- *
6
- * The returned state can be modified with hooks such as useRadioStyles_unstable,
7
- * before being passed to renderRadio_unstable.
8
- *
9
- * @param props - props from this instance of Radio
10
- * @param ref - reference to `<input>` element of Radio
11
- */
12
- export declare const useRadio_unstable: (props: RadioProps, ref: React.Ref<HTMLInputElement>) => RadioState;
@@ -1,11 +0,0 @@
1
- import type { RadioSlots, RadioState } from './Radio.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `radioClassNames.root` instead.
5
- */
6
- export declare const radioClassName = "fui-Radio";
7
- export declare const radioClassNames: SlotClassNames<RadioSlots>;
8
- /**
9
- * Apply styling to the Radio slots based on the state
10
- */
11
- export declare const useRadioStyles_unstable: (state: RadioState) => void;
@@ -1,6 +0,0 @@
1
- import type { ForwardRefComponent } from '@fluentui/react-utilities';
2
- import { RadioGroupProps } from './RadioGroup.types';
3
- /**
4
- * A RadioGroup component presents a set of options where only one option can be selected.
5
- */
6
- export declare const RadioGroup: ForwardRefComponent<RadioGroupProps>;
@@ -1,63 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
- export declare type RadioGroupSlots = {
4
- /**
5
- * The radio group root.
6
- */
7
- root: NonNullable<Slot<'div'>>;
8
- };
9
- export declare type RadioGroupProps = Omit<ComponentProps<Partial<RadioGroupSlots>>, 'onChange'> & {
10
- /**
11
- * The name of this radio group. This name is applied to all Radio items inside this group.
12
- *
13
- * If no name is provided, one will be generated so that all of the Radio items have the same name.
14
- */
15
- name?: string;
16
- /**
17
- * The selected Radio item in this group.
18
- *
19
- * This should be the `value` prop of one of the Radio items inside this group.
20
- */
21
- value?: string;
22
- /**
23
- * The default selected Radio item in this group.
24
- *
25
- * This should be the `value` prop of one of the Radio items inside this group.
26
- */
27
- defaultValue?: string;
28
- /**
29
- * Callback when the selected Radio item changes.
30
- */
31
- onChange?: (ev: React.FormEvent<HTMLDivElement>, data: RadioGroupOnChangeData) => void;
32
- /**
33
- * How the radio items are laid out in the group.
34
- *
35
- * @default vertical
36
- */
37
- layout?: 'vertical' | 'horizontal' | 'horizontalStacked';
38
- /**
39
- * Disable all Radio items in this group.
40
- */
41
- disabled?: boolean;
42
- /**
43
- * Require all Radio items in this group.
44
- */
45
- required?: boolean;
46
- };
47
- /**
48
- * Data for the onChange event for RadioGroup.
49
- */
50
- export declare type RadioGroupOnChangeData = {
51
- /**
52
- * The value of the newly selected Radio item.
53
- */
54
- value: string;
55
- };
56
- /**
57
- * State used in rendering RadioGroup
58
- */
59
- export declare type RadioGroupState = ComponentState<RadioGroupSlots> & Required<Pick<RadioGroupProps, 'layout'>> & Partial<Exclude<RadioGroupProps, 'onChange' | 'layout'>>;
60
- export declare type RadioGroupContextValue = Pick<RadioGroupProps, 'name' | 'value' | 'defaultValue' | 'disabled' | 'layout' | 'required'>;
61
- export declare type RadioGroupContextValues = {
62
- radioGroup: RadioGroupContextValue;
63
- };
@@ -1,5 +0,0 @@
1
- export * from './RadioGroup';
2
- export * from './RadioGroup.types';
3
- export * from './renderRadioGroup';
4
- export * from './useRadioGroup';
5
- export * from './useRadioGroupStyles';
@@ -1,5 +0,0 @@
1
- import { RadioGroupContextValues, RadioGroupState } from './RadioGroup.types';
2
- /**
3
- * Render the final JSX of RadioGroup
4
- */
5
- export declare const renderRadioGroup_unstable: (state: RadioGroupState, contextValues: RadioGroupContextValues) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { RadioGroupProps, RadioGroupState } from './RadioGroup.types';
3
- /**
4
- * Create the state required to render RadioGroup.
5
- *
6
- * The returned state can be modified with hooks such as useRadioGroupStyles_unstable,
7
- * before being passed to renderRadioGroup_unstable.
8
- *
9
- * @param props - props from this instance of RadioGroup
10
- * @param ref - reference to root HTMLElement of RadioGroup
11
- */
12
- export declare const useRadioGroup_unstable: (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>) => RadioGroupState;
@@ -1,11 +0,0 @@
1
- import { RadioGroupSlots, RadioGroupState } from './RadioGroup.types';
2
- import type { SlotClassNames } from '@fluentui/react-utilities';
3
- /**
4
- * @deprecated Use `radioGroupClassNames.root` instead.
5
- */
6
- export declare const radioGroupClassName = "fui-RadioGroup";
7
- export declare const radioGroupClassNames: SlotClassNames<RadioGroupSlots>;
8
- /**
9
- * Apply styling to the RadioGroup slots based on the state
10
- */
11
- export declare const useRadioGroupStyles_unstable: (state: RadioGroupState) => void;
@@ -1,6 +0,0 @@
1
- import type { Context } from '@fluentui/react-context-selector';
2
- import type { RadioGroupContextValue } from '../RadioGroup';
3
- /**
4
- * RadioGroupContext is provided by RadioGroup, and is consumed by Radio to determine default values of some props.
5
- */
6
- export declare const RadioGroupContext: Context<RadioGroupContextValue>;
@@ -1,2 +0,0 @@
1
- export * from './RadioGroupContext';
2
- export * from './useRadioGroupContextValues';
@@ -1,2 +0,0 @@
1
- import type { RadioGroupContextValues, RadioGroupState } from '../RadioGroup';
2
- export declare const useRadioGroupContextValues: (state: RadioGroupState) => RadioGroupContextValues;
@@ -1,5 +0,0 @@
1
- export { RadioGroup, radioGroupClassName, radioGroupClassNames, renderRadioGroup_unstable, useRadioGroupStyles_unstable, useRadioGroup_unstable, } from './RadioGroup';
2
- export type { RadioGroupContextValue, RadioGroupContextValues, RadioGroupOnChangeData, RadioGroupProps, RadioGroupSlots, RadioGroupState, } from './RadioGroup';
3
- export { Radio, radioClassName, radioClassNames, renderRadio_unstable, useRadioStyles_unstable, useRadio_unstable, } from './Radio';
4
- export type { RadioProps, RadioSlots, RadioState, RadioOnChangeData } from './Radio';
5
- export { RadioGroupContext, useRadioGroupContextValues } from './contexts/index';