|
1 | 1 | import { Variants } from "@spectrum-css/preview/decorators";
|
2 | 2 | import { Template } from "./template.js";
|
3 | 3 |
|
4 |
| -const DefaultItems = [ |
5 |
| - { |
6 |
| - label: "Nav root", |
7 |
| - }, |
8 |
| - { |
9 |
| - label: "Dragged", |
10 |
| - isDragged: true, |
11 |
| - }, |
12 |
| - { |
13 |
| - label: "Disabled sub item", |
14 |
| - isDisabled: true, |
15 |
| - }, |
16 |
| - { |
17 |
| - label: "January 2019 assets", |
18 |
| - }, |
19 |
| -]; |
20 |
| - |
21 |
| -const NestedItems = [ |
22 |
| - { |
23 |
| - iconName: "FolderOpen", |
24 |
| - iconSet: "workflow", |
25 |
| - }, |
26 |
| - { |
27 |
| - label: "Dragged", |
28 |
| - isDragged: true, |
29 |
| - }, |
30 |
| - { |
31 |
| - label: "Disabled", |
32 |
| - isDisabled: true, |
33 |
| - }, |
34 |
| - { |
35 |
| - label: "January 2019 assets", |
36 |
| - }, |
37 |
| -]; |
38 |
| - |
39 |
| -const NestedRootVisibleItems = [ |
40 |
| - { |
41 |
| - label: "Nav root", |
42 |
| - }, |
43 |
| - { |
44 |
| - iconName: "FolderOpen", |
45 |
| - iconSet: "workflow", |
46 |
| - isDisabled: true, |
47 |
| - }, |
48 |
| - { |
49 |
| - label: "Dragged sub item", |
50 |
| - isDragged: true, |
51 |
| - }, |
52 |
| - { |
53 |
| - label: "January 2019 assets", |
54 |
| - }, |
55 |
| -]; |
56 |
| - |
57 | 4 | export const BreadcrumbGroup = Variants({
|
58 | 5 | Template,
|
59 | 6 | testData: [
|
60 | 7 | {
|
61 | 8 | testHeading: "Default",
|
62 |
| - items: DefaultItems, |
63 |
| - }, |
64 |
| - { |
65 |
| - testHeading: "Default (nested)", |
66 |
| - items: NestedItems, |
67 | 9 | },
|
68 | 10 | {
|
69 |
| - testHeading: "Default (nested, root visible)", |
70 |
| - items: NestedRootVisibleItems, |
71 |
| - }, |
72 |
| - { |
73 |
| - testHeading: "Compact", |
74 |
| - variant: "compact", |
75 |
| - items: DefaultItems, |
76 |
| - }, |
77 |
| - { |
78 |
| - testHeading: "Compact (nested)", |
79 |
| - variant: "compact", |
80 |
| - items: NestedItems, |
81 |
| - }, |
82 |
| - { |
83 |
| - testHeading: "Compact (nested, root visible)", |
84 |
| - variant: "compact", |
85 |
| - items: NestedRootVisibleItems, |
| 11 | + testHeading: "Large", |
| 12 | + size: "l", |
86 | 13 | },
|
87 | 14 | {
|
88 | 15 | testHeading: "Multiline",
|
89 | 16 | variant: "multiline",
|
90 |
| - items: DefaultItems, |
91 | 17 | },
|
92 | 18 | {
|
93 |
| - testHeading: "Multiline (nested)", |
| 19 | + testHeading: "Multiline with small heading", |
94 | 20 | variant: "multiline",
|
95 |
| - items: NestedItems, |
96 |
| - }, |
97 |
| - { |
98 |
| - testHeading: "Multiline (nested, root visible)", |
99 |
| - variant: "multiline", |
100 |
| - items: NestedRootVisibleItems, |
| 21 | + titleHeadingSize: "s", |
101 | 22 | },
|
102 | 23 | ],
|
103 | 24 | stateData: [
|
104 | 25 | {
|
105 |
| - testHeading: "Dragged, disabled", |
| 26 | + testHeading: "Nested", |
| 27 | + showTruncatedMenu: true, |
| 28 | + }, |
| 29 | + { |
| 30 | + testHeading: "Nested with root context", |
| 31 | + showTruncatedMenu: true, |
| 32 | + showRootContext: true, |
| 33 | + }, |
| 34 | + { |
| 35 | + testHeading: "Disabled items and dragged item", |
106 | 36 | isDragged: true,
|
107 |
| - } |
| 37 | + showTruncatedMenu: true, |
| 38 | + truncatedMenuIsDisabled: true, |
| 39 | + items: [ |
| 40 | + { |
| 41 | + label: "Dragged item", |
| 42 | + isDragged: true, |
| 43 | + }, |
| 44 | + { |
| 45 | + label: "Disabled sub item", |
| 46 | + isDisabled: true, |
| 47 | + }, |
| 48 | + { |
| 49 | + label: "January 2019 assets", |
| 50 | + }, |
| 51 | + ] |
| 52 | + }, |
108 | 53 | ]
|
109 | 54 | });
|
0 commit comments