@khanacademy/wonder-blocks-tabs 0.0.0-PR2906-20251216215016 → 0.0.0-PR2910-20251216214914
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,15 +1,11 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-tabs
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-PR2910-20251216214914
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- 27a30ad: Adds TabsDropdown component
|
|
8
8
|
|
|
9
|
-
### Patch Changes
|
|
10
|
-
|
|
11
|
-
- 4be67dd: TabsDropdown: Improve a11y
|
|
12
|
-
|
|
13
9
|
## 0.4.1
|
|
14
10
|
|
|
15
11
|
### Patch Changes
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
3
|
-
import { AriaLabelOrAriaLabelledby } from "./types";
|
|
4
3
|
type TabDropdownItem = {
|
|
5
4
|
/**
|
|
6
5
|
* The label of the tab
|
|
@@ -14,29 +13,14 @@ type TabDropdownItem = {
|
|
|
14
13
|
* The contents for the tab
|
|
15
14
|
*/
|
|
16
15
|
panel: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* Optional test ID for e2e testing of the menu item.
|
|
19
|
-
*/
|
|
20
|
-
testId?: string;
|
|
21
16
|
};
|
|
22
|
-
type Props =
|
|
17
|
+
type Props = {
|
|
23
18
|
/**
|
|
24
|
-
* A unique id for the component.
|
|
25
|
-
* generated automatically.
|
|
26
|
-
*
|
|
27
|
-
* Here is how the id is used for the different elements in the component:
|
|
28
|
-
* - The root will have an id of `${id}`
|
|
29
|
-
* - The opener will have an id of `${id}-opener`
|
|
30
|
-
* - The panel will have an id of `${id}-panel`
|
|
19
|
+
* A unique id for the component.
|
|
31
20
|
*/
|
|
32
21
|
id?: string;
|
|
33
22
|
/**
|
|
34
23
|
* Optional test ID for e2e testing.
|
|
35
|
-
*
|
|
36
|
-
* Here is how the testId is used for the different elements in the component:
|
|
37
|
-
* - The root will have a testId of `${testId}`
|
|
38
|
-
* - The opener will have a testId of `${testId}-opener`
|
|
39
|
-
* - The panel will have a testId of `${testId}-panel`
|
|
40
24
|
*/
|
|
41
25
|
testId?: string;
|
|
42
26
|
/**
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { AriaProps, PropsFor, StyleType } from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
import { Tab } from "./tab";
|
|
4
|
-
import { AriaLabelOrAriaLabelledby } from "./types";
|
|
5
4
|
export type TabRenderProps = Omit<PropsFor<typeof Tab>, "children">;
|
|
6
5
|
export type TabItem = AriaProps & {
|
|
7
6
|
/**
|
|
@@ -37,6 +36,24 @@ export type TabItem = AriaProps & {
|
|
|
37
36
|
*/
|
|
38
37
|
testId?: string;
|
|
39
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Type to help ensure aria-label or aria-labelledby is set.
|
|
41
|
+
*/
|
|
42
|
+
type AriaLabelOrAriaLabelledby = {
|
|
43
|
+
/**
|
|
44
|
+
* If there is no visible label for the tabs, set aria-label to a
|
|
45
|
+
* label describing the tabs.
|
|
46
|
+
*/
|
|
47
|
+
"aria-label": string;
|
|
48
|
+
"aria-labelledby"?: never;
|
|
49
|
+
} | {
|
|
50
|
+
/**
|
|
51
|
+
* If the tabs have a visible label, set aria-labelledby to a value
|
|
52
|
+
* that refers to the labelling element.
|
|
53
|
+
*/
|
|
54
|
+
"aria-labelledby": string;
|
|
55
|
+
"aria-label"?: never;
|
|
56
|
+
};
|
|
40
57
|
type Props = {
|
|
41
58
|
/**
|
|
42
59
|
* A unique id to use as the base of the ids for the elements within the
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Tabs are used to control what content is shown",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.0.0-
|
|
6
|
+
"version": "0.0.0-PR2910-20251216214914",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@phosphor-icons/core": "^2.0.2",
|
|
24
|
-
"@khanacademy/wonder-blocks-button": "11.2.10",
|
|
25
24
|
"@khanacademy/wonder-blocks-core": "12.4.2",
|
|
26
|
-
"@khanacademy/wonder-blocks-
|
|
25
|
+
"@khanacademy/wonder-blocks-button": "11.2.10",
|
|
27
26
|
"@khanacademy/wonder-blocks-icon": "5.3.5",
|
|
28
27
|
"@khanacademy/wonder-blocks-tokens": "14.1.3",
|
|
28
|
+
"@khanacademy/wonder-blocks-dropdown": "10.6.1",
|
|
29
29
|
"@khanacademy/wonder-blocks-typography": "4.2.27"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type to help ensure aria-label or aria-labelledby is set.
|
|
3
|
-
*/
|
|
4
|
-
export type AriaLabelOrAriaLabelledby = {
|
|
5
|
-
/**
|
|
6
|
-
* If there is no visible label for the tabs, set aria-label to a
|
|
7
|
-
* label describing the tabs.
|
|
8
|
-
*/
|
|
9
|
-
"aria-label": string;
|
|
10
|
-
"aria-labelledby"?: never;
|
|
11
|
-
} | {
|
|
12
|
-
/**
|
|
13
|
-
* If the tabs have a visible label, set aria-labelledby to a value
|
|
14
|
-
* that refers to the labelling element.
|
|
15
|
-
*/
|
|
16
|
-
"aria-labelledby": string;
|
|
17
|
-
"aria-label"?: never;
|
|
18
|
-
};
|