@khanacademy/wonder-blocks-accordion 3.0.2 → 3.0.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-accordion
|
|
2
2
|
|
|
3
|
+
## 3.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [0de25cd8]
|
|
8
|
+
- @khanacademy/wonder-blocks-tokens@4.0.0
|
|
9
|
+
- @khanacademy/wonder-blocks-clickable@5.0.6
|
|
10
|
+
|
|
11
|
+
## 3.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [7516b239]
|
|
16
|
+
- @khanacademy/wonder-blocks-core@11.1.0
|
|
17
|
+
- @khanacademy/wonder-blocks-clickable@5.0.5
|
|
18
|
+
- @khanacademy/wonder-blocks-icon@5.0.5
|
|
19
|
+
- @khanacademy/wonder-blocks-typography@3.0.5
|
|
20
|
+
|
|
3
21
|
## 3.0.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -46,12 +46,12 @@ export type TagType = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
|
46
46
|
* ```
|
|
47
47
|
*/
|
|
48
48
|
declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import("@khanacademy/wonder-blocks-core").AriaAttributes> & Readonly<{
|
|
49
|
-
role?: import("@khanacademy/wonder-blocks-core").AriaRole
|
|
49
|
+
role?: import("@khanacademy/wonder-blocks-core").AriaRole;
|
|
50
50
|
}> & {
|
|
51
51
|
/**
|
|
52
52
|
* The unique identifier for the accordion section.
|
|
53
53
|
*/
|
|
54
|
-
id?: string
|
|
54
|
+
id?: string;
|
|
55
55
|
/**
|
|
56
56
|
* The content to display when this section is shown. If a string is
|
|
57
57
|
* passed in, it will automatically be given Body typography from
|
|
@@ -75,7 +75,7 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
75
75
|
* within a parent Accordion component, the AccordionSection’s caretPosition
|
|
76
76
|
* value is prioritized.
|
|
77
77
|
*/
|
|
78
|
-
caretPosition?: "start" | "end"
|
|
78
|
+
caretPosition?: "start" | "end";
|
|
79
79
|
/**
|
|
80
80
|
* The preset styles for the corners of this accordion.
|
|
81
81
|
* `square` - corners have no border radius.
|
|
@@ -87,12 +87,12 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
87
87
|
* within a parent Accordion component, the AccordionSection’s cornerKind
|
|
88
88
|
* value is prioritized.
|
|
89
89
|
*/
|
|
90
|
-
cornerKind?: AccordionCornerKindType
|
|
90
|
+
cornerKind?: AccordionCornerKindType;
|
|
91
91
|
/**
|
|
92
92
|
* Whether this section is collapsible. If false, the header will not be
|
|
93
93
|
* clickable, and the section will stay expanded at all times.
|
|
94
94
|
*/
|
|
95
|
-
collapsible?: boolean
|
|
95
|
+
collapsible?: boolean;
|
|
96
96
|
/**
|
|
97
97
|
* Whether this section is expanded or closed.
|
|
98
98
|
*
|
|
@@ -100,7 +100,7 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
100
100
|
* within an Accordion component. In that case, the Accordion component
|
|
101
101
|
* manages the expanded state of the AccordionSection.
|
|
102
102
|
*/
|
|
103
|
-
expanded?: boolean
|
|
103
|
+
expanded?: boolean;
|
|
104
104
|
/**
|
|
105
105
|
* Whether to include animation on the header. This should be false
|
|
106
106
|
* if the user has `prefers-reduced-motion` opted in. Defaults to false.
|
|
@@ -109,13 +109,13 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
109
109
|
* within a parent Accordion component, the AccordionSection’s animated
|
|
110
110
|
* value is prioritized.
|
|
111
111
|
*/
|
|
112
|
-
animated?: boolean
|
|
112
|
+
animated?: boolean;
|
|
113
113
|
/**
|
|
114
114
|
* Called when the header is clicked.
|
|
115
115
|
* Takes the new expanded state as an argument. This way, the function
|
|
116
116
|
* returned from React.useState can be passed in directly.
|
|
117
117
|
*/
|
|
118
|
-
onToggle?: (
|
|
118
|
+
onToggle?: (newExpandedState: boolean) => unknown;
|
|
119
119
|
/**
|
|
120
120
|
* Custom styles for the overall accordion section container.
|
|
121
121
|
*/
|
|
@@ -129,23 +129,23 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
129
129
|
* Please use this to ensure that the header is hierarchically correct.
|
|
130
130
|
* Defaults to "h2".
|
|
131
131
|
* */
|
|
132
|
-
tag?: TagType
|
|
132
|
+
tag?: TagType;
|
|
133
133
|
/**
|
|
134
134
|
* The test ID used to locate this component in automated tests.
|
|
135
135
|
*/
|
|
136
|
-
testId?: string
|
|
136
|
+
testId?: string;
|
|
137
137
|
/**
|
|
138
138
|
* Whether this section is the first section in the accordion.
|
|
139
139
|
* For internal use only.
|
|
140
140
|
* @ignore
|
|
141
141
|
*/
|
|
142
|
-
isFirstSection?: boolean
|
|
142
|
+
isFirstSection?: boolean;
|
|
143
143
|
/**
|
|
144
144
|
* Whether this section is the last section in the accordion.
|
|
145
145
|
* For internal use only.
|
|
146
146
|
* @ignore
|
|
147
147
|
*/
|
|
148
|
-
isLastSection?: boolean
|
|
148
|
+
isLastSection?: boolean;
|
|
149
149
|
/**
|
|
150
150
|
* Whether this section should have role="region". True by default.
|
|
151
151
|
* According to W3, the panel container should have role region except
|
|
@@ -154,6 +154,6 @@ declare const AccordionSection: React.ForwardRefExoticComponent<Readonly<import(
|
|
|
154
154
|
* For internal use only.
|
|
155
155
|
* @ignore
|
|
156
156
|
*/
|
|
157
|
-
isRegion?: boolean
|
|
157
|
+
isRegion?: boolean;
|
|
158
158
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
159
159
|
export default AccordionSection;
|
|
@@ -32,12 +32,12 @@ export type AccordionCornerKindType = "square" | "rounded" | "rounded-per-sectio
|
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
34
|
declare const Accordion: React.ForwardRefExoticComponent<Readonly<import("@khanacademy/wonder-blocks-core").AriaAttributes> & Readonly<{
|
|
35
|
-
role?: import("@khanacademy/wonder-blocks-core").AriaRole
|
|
35
|
+
role?: import("@khanacademy/wonder-blocks-core").AriaRole;
|
|
36
36
|
}> & {
|
|
37
37
|
/**
|
|
38
38
|
* The unique identifier for the accordion.
|
|
39
39
|
*/
|
|
40
|
-
id?: string
|
|
40
|
+
id?: string;
|
|
41
41
|
/**
|
|
42
42
|
* The AccordionSection components to display within this Accordion.
|
|
43
43
|
*/
|
|
@@ -47,12 +47,12 @@ declare const Accordion: React.ForwardRefExoticComponent<Readonly<import("@khana
|
|
|
47
47
|
* Accordion is first rendered. If not specified, no AccordionSections
|
|
48
48
|
* will be expanded when the Accordion is first rendered.
|
|
49
49
|
*/
|
|
50
|
-
initialExpandedIndex?: number
|
|
50
|
+
initialExpandedIndex?: number;
|
|
51
51
|
/**
|
|
52
52
|
* Whether multiple AccordionSections can be expanded at the same time.
|
|
53
53
|
* If not specified, multiple AccordionSections can be expanded at a time.
|
|
54
54
|
*/
|
|
55
|
-
allowMultipleExpanded?: boolean
|
|
55
|
+
allowMultipleExpanded?: boolean;
|
|
56
56
|
/**
|
|
57
57
|
* Whether to put the caret at the start or end of the header block
|
|
58
58
|
* in this section. "start" means it’s on the left of a left-to-right
|
|
@@ -65,7 +65,7 @@ declare const Accordion: React.ForwardRefExoticComponent<Readonly<import("@khana
|
|
|
65
65
|
* a child AccordionSection component, the AccordionSection’s caretPosition
|
|
66
66
|
* value is prioritized.
|
|
67
67
|
*/
|
|
68
|
-
caretPosition?: "start" | "end"
|
|
68
|
+
caretPosition?: "start" | "end";
|
|
69
69
|
/**
|
|
70
70
|
* The preset styles for the corners of this accordion.
|
|
71
71
|
* `square` - corners have no border radius.
|
|
@@ -77,7 +77,7 @@ declare const Accordion: React.ForwardRefExoticComponent<Readonly<import("@khana
|
|
|
77
77
|
* a child AccordionSection component, the AccordionSection’s cornerKind
|
|
78
78
|
* value is prioritized.
|
|
79
79
|
*/
|
|
80
|
-
cornerKind?: AccordionCornerKindType
|
|
80
|
+
cornerKind?: AccordionCornerKindType;
|
|
81
81
|
/**
|
|
82
82
|
* Whether to include animation on the header. This should be false
|
|
83
83
|
* if the user has `prefers-reduced-motion` opted in. Defaults to false.
|
|
@@ -86,7 +86,7 @@ declare const Accordion: React.ForwardRefExoticComponent<Readonly<import("@khana
|
|
|
86
86
|
* a child AccordionSection component, the AccordionSection’s animated
|
|
87
87
|
* value is prioritized.
|
|
88
88
|
*/
|
|
89
|
-
animated?: boolean
|
|
89
|
+
animated?: boolean;
|
|
90
90
|
/**
|
|
91
91
|
* Custom styles for the overall accordion container.
|
|
92
92
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-accordion",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Accordion components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@khanacademy/wonder-blocks-clickable": "^5.0.
|
|
21
|
-
"@khanacademy/wonder-blocks-core": "^11.0
|
|
22
|
-
"@khanacademy/wonder-blocks-icon": "^5.0.
|
|
23
|
-
"@khanacademy/wonder-blocks-tokens": "^
|
|
24
|
-
"@khanacademy/wonder-blocks-typography": "^3.0.
|
|
20
|
+
"@khanacademy/wonder-blocks-clickable": "^5.0.6",
|
|
21
|
+
"@khanacademy/wonder-blocks-core": "^11.1.0",
|
|
22
|
+
"@khanacademy/wonder-blocks-icon": "^5.0.5",
|
|
23
|
+
"@khanacademy/wonder-blocks-tokens": "^4.0.0",
|
|
24
|
+
"@khanacademy/wonder-blocks-typography": "^3.0.5"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@phosphor-icons/core": "^2.0.2",
|