@purpurds/radio-card-group 6.12.2 → 6.12.3
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.
|
@@ -7,7 +7,8 @@ export type RadioCardGroupItem = RadioCardItemProps & {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const RADIO_CARD_GROUP_ORIENTATION: readonly ["horizontal", "vertical"];
|
|
9
9
|
export declare const RADIO_POSITION: readonly ["right", "left"];
|
|
10
|
-
|
|
10
|
+
type StylingProps = Pick<React.HTMLAttributes<HTMLElement>, "className" | "style">;
|
|
11
|
+
export type RadioCardGroupProps = StylingProps & {
|
|
11
12
|
/**
|
|
12
13
|
* To use when no label is given.
|
|
13
14
|
* */
|
|
@@ -17,7 +18,6 @@ export type RadioCardGroupProps = {
|
|
|
17
18
|
* */
|
|
18
19
|
["aria-labelledby"]?: string;
|
|
19
20
|
["data-testid"]?: string;
|
|
20
|
-
className?: string;
|
|
21
21
|
/**
|
|
22
22
|
* The value of the radio card item that should be checked when initially rendered. Use when you do not need to control the state of the radio items.
|
|
23
23
|
* */
|
|
@@ -75,7 +75,73 @@ export type RadioCardGroupProps = {
|
|
|
75
75
|
* */
|
|
76
76
|
children?: ReactNode;
|
|
77
77
|
};
|
|
78
|
-
export declare const RadioCardGroup: React.ForwardRefExoticComponent<
|
|
78
|
+
export declare const RadioCardGroup: React.ForwardRefExoticComponent<StylingProps & {
|
|
79
|
+
/**
|
|
80
|
+
* To use when no label is given.
|
|
81
|
+
* */
|
|
82
|
+
"aria-label"?: string;
|
|
83
|
+
/**
|
|
84
|
+
* To use with custom label.
|
|
85
|
+
* */
|
|
86
|
+
"aria-labelledby"?: string;
|
|
87
|
+
"data-testid"?: string;
|
|
88
|
+
/**
|
|
89
|
+
* The value of the radio card item that should be checked when initially rendered. Use when you do not need to control the state of the radio items.
|
|
90
|
+
* */
|
|
91
|
+
defaultValue?: string;
|
|
92
|
+
/**
|
|
93
|
+
* When true, prevents the user from interacting with radio card items.
|
|
94
|
+
* */
|
|
95
|
+
disabled?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* ID of the radio card group container.
|
|
98
|
+
* */
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* The radio card items.
|
|
102
|
+
* */
|
|
103
|
+
items?: RadioCardGroupItem[];
|
|
104
|
+
/**
|
|
105
|
+
* Renders above the radio card group as a heading
|
|
106
|
+
* */
|
|
107
|
+
label?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Changes heading level for label.
|
|
110
|
+
*/
|
|
111
|
+
labelTag?: HeadingTagType;
|
|
112
|
+
/**
|
|
113
|
+
* When true, keyboard navigation will loop from last item to first, and vice versa.
|
|
114
|
+
* */
|
|
115
|
+
loop?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
118
|
+
* */
|
|
119
|
+
name?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Event handler called when the value changes.
|
|
122
|
+
* */
|
|
123
|
+
onValueChange?: (value: string) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Set to stack cards horizontally or vertically. When `horizontal`, the min card width with is 100% when container is sm, and `--purpur-breakpoint-lg` / 4 when the container is md or larger.
|
|
126
|
+
* */
|
|
127
|
+
orientation?: (typeof RADIO_CARD_GROUP_ORIENTATION)[number];
|
|
128
|
+
/**
|
|
129
|
+
* The position if the radio in the card items.
|
|
130
|
+
* */
|
|
131
|
+
radioPosition?: (typeof RADIO_POSITION)[number];
|
|
132
|
+
/**
|
|
133
|
+
* When true, indicates that the user must check a radio card item before the owning form can be submitted.
|
|
134
|
+
* */
|
|
135
|
+
required?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The controlled value of the radio card item to check. Should be used in conjunction with onValueChange.
|
|
138
|
+
* */
|
|
139
|
+
value?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Will only render given RadioCardItems.
|
|
142
|
+
* */
|
|
143
|
+
children?: ReactNode;
|
|
144
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
79
145
|
export type { RadioCardItemProps } from './radio-card-item';
|
|
80
146
|
export { RadioCardItem } from './radio-card-item';
|
|
81
147
|
//# sourceMappingURL=radio-card-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-card-group.d.ts","sourceRoot":"","sources":["../src/radio-card-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAChG,OAAO,
|
|
1
|
+
{"version":3,"file":"radio-card-group.d.ts","sourceRoot":"","sources":["../src/radio-card-group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoD,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAChG,OAAO,EAAU,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIhE,OAAO,EAAkC,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEvF,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG;IAAE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,CAAC;AACpF,eAAO,MAAM,4BAA4B,qCAAsC,CAAC;AAChF,eAAO,MAAM,cAAc,4BAA6B,CAAC;AAEzD,KAAK,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;AAEnF,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG;IAC/C;;SAEK;IACL,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC;IACxB;;SAEK;IACL,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB;;SAEK;IACL,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;SAEK;IACL,QAAQ,CAAC,EAAE,OAAO,CAA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