@workday/canvas-kit-docs 7.0.0-alpha.91-next.18 → 7.0.0-alpha.95-next.21

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.
@@ -205,8 +205,8 @@ const MyComponent = () => {
205
205
  return (
206
206
  <Tabs shouldSelect={shouldSelect} onSelect={onSelect}>
207
207
  <Tabs.List>
208
- <Tabs.Item name="first">First</Tabs.Item>
209
- <Tabs.Item name="second">Second</Tabs.Item>
208
+ <Tabs.Item data-id="first">First</Tabs.Item>
209
+ <Tabs.Item data-id="second">Second</Tabs.Item>
210
210
  </Tabs.List>
211
211
  </Tabs>
212
212
  );
@@ -180,11 +180,11 @@ Undocumented props are spread to the underlying `<div>` element.
180
180
  #### Usage
181
181
 
182
182
  `Tabs.Item` is a `<button role="tab">` element. Each `Tabs.Item` is associated with a `Tabs.Panel`
183
- either by a `name` attribute or by the position in the list. If a `name` is provided, it must match
184
- the name passed to the corresponding `Tabs.Panel` component.
183
+ either by a `data-id` attribute or by the position in the list. If a `data-id` is provided, it must
184
+ match the `data-id` passed to the corresponding `Tabs.Panel` component.
185
185
 
186
186
  ```tsx
187
- <Tabs.Item name="first">First Tab</Tabs.Item>
187
+ <Tabs.Item data-id="first">First Tab</Tabs.Item>
188
188
  ```
189
189
 
190
190
  #### Props
@@ -198,11 +198,12 @@ Undocumented props are spread to the underlying `button` element.
198
198
  #### Usage
199
199
 
200
200
  `Tabs.Panel` is a `<div role="tabpanel">` element. It is focusable by default. Each `Tabs.Panel` is
201
- controlled by a `Tabs.Item` either by a `name` attribute or by the position in the list. If a `name`
202
- is provided, it must match the name passed to the corresponding `Tabs.Item` component.
201
+ controlled by a `Tabs.Item` either by a `data-id` attribute or by the position in the list. If a
202
+ `data-id` is provided, it must match the `data-id` passed to the corresponding `Tabs.Item`
203
+ component.
203
204
 
204
205
  ```tsx
205
- <Tabs.Panel name="first">{/* Contents of the tab panel */}</Tabs.Panel>
206
+ <Tabs.Panel data-id="first">{/* Contents of the tab panel */}</Tabs.Panel>
206
207
  ```
207
208
 
208
209
  #### Props
@@ -77,7 +77,7 @@ export default () => {
77
77
  <Tabs model={model}>
78
78
  <Tabs.List overflowButton={<Tabs.OverflowButton>More</Tabs.OverflowButton>}>
79
79
  {(item: Tab) => (
80
- <Tabs.Item name={item.id} onKeyDown={onKeyDown(item.id)} onClick={onClick(item.id)}>
80
+ <Tabs.Item onKeyDown={onKeyDown(item.id)} onClick={onClick(item.id)}>
81
81
  {item.tab}
82
82
  </Tabs.Item>
83
83
  )}
@@ -85,16 +85,12 @@ export default () => {
85
85
  <Tabs.Menu.Popper>
86
86
  <Tabs.Menu.Card maxWidth={300} maxHeight={200}>
87
87
  <Tabs.Menu.List>
88
- {(item: Tab) => <Tabs.Menu.Item name={item.id}>{item.tab}</Tabs.Menu.Item>}
88
+ {(item: Tab) => <Tabs.Menu.Item>{item.tab}</Tabs.Menu.Item>}
89
89
  </Tabs.Menu.List>
90
90
  </Tabs.Menu.Card>
91
91
  </Tabs.Menu.Popper>
92
92
  <Tabs.Panels>
93
- {(item: Tab) => (
94
- <Tabs.Panel marginTop="m" data-id={item.id}>
95
- Contents of {item.tab}
96
- </Tabs.Panel>
97
- )}
93
+ {(item: Tab) => <Tabs.Panel marginTop="m">Contents of {item.tab}</Tabs.Panel>}
98
94
  </Tabs.Panels>
99
95
  </Tabs>
100
96
  );
@@ -28,21 +28,17 @@ export default () => {
28
28
  <div style={{width: containerWidth}}>
29
29
  <Tabs model={model}>
30
30
  <Tabs.List overflowButton={<Tabs.OverflowButton>More</Tabs.OverflowButton>}>
31
- {(item: MyTabItem) => <Tabs.Item data-id={item.id}>{item.text}</Tabs.Item>}
31
+ {(item: MyTabItem) => <Tabs.Item>{item.text}</Tabs.Item>}
32
32
  </Tabs.List>
33
33
  <Tabs.Menu.Popper>
34
34
  <Tabs.Menu.Card maxWidth={300} maxHeight={200}>
35
35
  <Tabs.Menu.List>
36
- {(item: MyTabItem) => <Tabs.Menu.Item name={item.id}>{item.text}</Tabs.Menu.Item>}
36
+ {(item: MyTabItem) => <Tabs.Menu.Item>{item.text}</Tabs.Menu.Item>}
37
37
  </Tabs.Menu.List>
38
38
  </Tabs.Menu.Card>
39
39
  </Tabs.Menu.Popper>
40
40
  <Tabs.Panels>
41
- {(item: MyTabItem) => (
42
- <Tabs.Panel marginTop="m" data-id={item.id}>
43
- {item.contents}
44
- </Tabs.Panel>
45
- )}
41
+ {(item: MyTabItem) => <Tabs.Panel marginTop="m">{item.contents}</Tabs.Panel>}
46
42
  </Tabs.Panels>
47
43
  </Tabs>
48
44
  <hr />
@@ -23,13 +23,13 @@ export default () => {
23
23
  return (
24
24
  <Tabs model={model}>
25
25
  <Tabs.List>
26
- <Tabs.Item name="first" aria-controls="mytab-panel">
26
+ <Tabs.Item data-id="first" aria-controls="mytab-panel">
27
27
  First Tab
28
28
  </Tabs.Item>
29
- <Tabs.Item name="second" aria-controls="mytab-panel">
29
+ <Tabs.Item data-id="second" aria-controls="mytab-panel">
30
30
  Second Tab
31
31
  </Tabs.Item>
32
- <Tabs.Item name="third" aria-controls="mytab-panel">
32
+ <Tabs.Item data-id="third" aria-controls="mytab-panel">
33
33
  Third Tab
34
34
  </Tabs.Item>
35
35
  </Tabs.List>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "7.0.0-alpha.91-next.18+f92b7ba5",
3
+ "version": "7.0.0-alpha.95-next.21+da657912",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -41,7 +41,7 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@storybook/csf": "0.0.1",
44
- "@workday/canvas-kit-react": "^7.0.0-alpha.91-next.18+f92b7ba5"
44
+ "@workday/canvas-kit-react": "^7.0.0-alpha.95-next.21+da657912"
45
45
  },
46
46
  "devDependencies": {
47
47
  "fs-extra": "^10.0.0",
@@ -49,5 +49,5 @@
49
49
  "mkdirp": "^1.0.3",
50
50
  "typescript": "4.1"
51
51
  },
52
- "gitHead": "f92b7ba590e19e7f55f7a6417d0d4b7ae3b1bba4"
52
+ "gitHead": "da657912adb9b86971737b33838e6f8f22d3264a"
53
53
  }