|
1 | 1 | import { Variants } from "@spectrum-css/preview/decorators"; |
2 | | -import { html } from "lit"; |
3 | 2 | import { Template } from "./template.js"; |
4 | 3 |
|
5 | 4 | export const PickerGroup = Variants({ |
6 | | - Template: (args, context) => html`<div>${Template(args, context)}</div>`, |
| 5 | + Template, |
7 | 6 | wrapperStyles: { |
8 | 7 | "align-items": "flex-start", |
9 | | - "min-block-size": "auto", |
| 8 | + "min-block-size": "225px", |
10 | 9 | }, |
11 | 10 | testData: [ |
12 | 11 | { |
13 | 12 | testHeading: "Default, with placeholder", |
14 | | - }, |
15 | | - { |
16 | | - testHeading: "Default, with value and text overflow", |
17 | | - currentValue: "The selected value of the picker, with long text the triggers the overflow behavior with ellipsis", |
| 13 | + isOpen: true, |
18 | 14 | }, |
19 | 15 | { |
20 | 16 | testHeading: "Quiet", |
21 | 17 | isQuiet: true, |
22 | | - }, |
23 | | - { |
24 | | - testHeading: "Side label", |
25 | | - labelPosition: "side", |
26 | | - }, |
27 | | - { |
28 | | - testHeading: "Side label, quiet", |
29 | | - labelPosition: "side", |
30 | | - isQuiet: true, |
31 | | - }, |
32 | | - { |
33 | | - testHeading: "Side label, alignment with switch", |
34 | | - labelPosition: "side", |
35 | | - withSwitch: true, |
36 | | - }, |
37 | | - { |
38 | | - testHeading: "With thumbnail icon", |
39 | | - showWorkflowIcon: true, |
40 | | - contentIconName: "Image", |
| 18 | + isOpen: true, |
41 | 19 | }, |
42 | 20 | ], |
43 | 21 | stateData: [ |
@@ -86,19 +64,57 @@ export const PickerGroup = Variants({ |
86 | 64 | isDisabled: true, |
87 | 65 | }, |
88 | 66 | { |
89 | | - testHeading: "Open", |
90 | | - isOpen: true, |
| 67 | + testHeading: "Closed", |
| 68 | + isOpen: false, |
91 | 69 | wrapperStyles: { |
92 | | - "min-block-size": "225px", |
| 70 | + "min-block-size": "auto", |
93 | 71 | }, |
94 | 72 | }, |
95 | 73 | { |
96 | | - testHeading: "Open + hover", |
97 | | - isOpen: true, |
| 74 | + testHeading: "Closed + hover", |
| 75 | + isOpen: false, |
98 | 76 | isHovered: true, |
99 | 77 | wrapperStyles: { |
100 | | - "min-block-size": "225px", |
| 78 | + "min-block-size": "auto", |
101 | 79 | }, |
102 | 80 | }, |
103 | 81 | ], |
104 | 82 | }); |
| 83 | + |
| 84 | +export const PickerGroupVariants = Variants({ |
| 85 | + Template, |
| 86 | + wrapperStyles: { |
| 87 | + "align-items": "flex-start", |
| 88 | + "min-block-size": "225px", |
| 89 | + }, |
| 90 | + testData: [ |
| 91 | + { |
| 92 | + testHeading: "Default, with value and text overflow", |
| 93 | + currentValue: "The selected value of the picker, with long text the triggers the overflow behavior with ellipsis", |
| 94 | + isOpen: true, |
| 95 | + }, |
| 96 | + { |
| 97 | + testHeading: "Side label", |
| 98 | + labelPosition: "side", |
| 99 | + isOpen: true, |
| 100 | + }, |
| 101 | + { |
| 102 | + testHeading: "Side label, quiet", |
| 103 | + labelPosition: "side", |
| 104 | + isQuiet: true, |
| 105 | + isOpen: true, |
| 106 | + }, |
| 107 | + { |
| 108 | + testHeading: "Side label, alignment with switch", |
| 109 | + labelPosition: "side", |
| 110 | + withSwitch: true, |
| 111 | + isOpen: true, |
| 112 | + }, |
| 113 | + { |
| 114 | + testHeading: "With thumbnail icon", |
| 115 | + showWorkflowIcon: true, |
| 116 | + contentIconName: "Image", |
| 117 | + isOpen: true, |
| 118 | + }, |
| 119 | + ], |
| 120 | +}); |
0 commit comments