1
1
import { StoryObj } from "@storybook/react" ;
2
2
import { userEvent , within } from "@storybook/test" ;
3
3
import {
4
- HvSimpleGrid ,
5
4
HvTable ,
6
5
HvTableBody ,
7
6
HvTableCell ,
@@ -12,14 +11,9 @@ import {
12
11
HvTableRow ,
13
12
} from "@hitachivantara/uikit-react-core" ;
14
13
15
- import { TableComplete } from "./TableComplete/TableCompleteSample" ;
16
- import { AlternativeLayout } from "./TableHooks/AlternativeLayout" ;
17
14
import { ColumnResize } from "./TableHooks/ColumnResize" ;
18
15
import { TestHeaders as TestHeadersStory } from "./TableHooks/TableHooks.stories" ;
19
16
import { UseHvGroupBy } from "./TableHooks/UseHvGroupBy" ;
20
- import { UseHvHeaderGroups } from "./TableHooks/UseHvHeaderGroups" ;
21
- import { UseHvRowExpand } from "./TableHooks/UseHvRowExpand" ;
22
- import { UseHvTableSticky } from "./TableHooks/UseHvTableSticky" ;
23
17
import { AllColumnRenderers } from "./TableRenderers/AllColumnRenderers" ;
24
18
import { GroupedRows as GroupedRowsStory } from "./TableSamples/GroupedRows" ;
25
19
import GroupedRowsRaw from "./TableSamples/GroupedRows?raw" ;
@@ -33,7 +27,6 @@ import { ResponsiveTable as ResponsiveTableStory } from "./TableSamples/Responsi
33
27
import ResponsiveTableRaw from "./TableSamples/ResponsiveTable?raw" ;
34
28
import { SimpleTable as SimpleTableStory } from "./TableSamples/SimpleTable" ;
35
29
import SimpleTableRaw from "./TableSamples/SimpleTable?raw" ;
36
- import { CompleteTableSection } from "./TableSection/CompleteTableSection" ;
37
30
import { PropsTableSection } from "./TableSection/PropsTableSection" ;
38
31
import { setupChromatic } from ".storybook/setupChromatic" ;
39
32
@@ -132,62 +125,6 @@ export const ListRow: StoryObj<HvTableProps> = {
132
125
} ;
133
126
134
127
export const Test : StoryObj = {
135
- parameters : {
136
- ...setupChromatic ( [
137
- "DS3 dawn" ,
138
- "DS3 wicked" ,
139
- "DS5 dawn" ,
140
- "DS5 wicked" ,
141
- "Pentaho+ dawn" ,
142
- "Pentaho+ wicked" ,
143
- ] ) ,
144
- docs : { disable : true } ,
145
- a11y : {
146
- disable : true ,
147
- } ,
148
- } ,
149
- tags : [ "skipTestRunner" ] ,
150
- render : ( args , context : any ) => (
151
- < HvSimpleGrid cols = { 2 } >
152
- { ListRow . render ?.( ListRow . args as any , context ) }
153
- { GroupedRows . render ?.( GroupedRows . args as any , context ) }
154
- { NoData . render ?.( NoData . args as any , context ) }
155
- { Main . render ?.( Main . args as any , context ) }
156
- { SimpleTable . render ?.( SimpleTable . args as any , context ) }
157
- </ HvSimpleGrid >
158
- ) ,
159
- } ;
160
-
161
- export const Test2 : StoryObj = {
162
- parameters : {
163
- ...setupChromatic (
164
- [
165
- "DS3 dawn" ,
166
- "DS3 wicked" ,
167
- "DS5 dawn" ,
168
- "DS5 wicked" ,
169
- "Pentaho+ dawn" ,
170
- "Pentaho+ wicked" ,
171
- ] ,
172
- 5000 ,
173
- ) ,
174
- docs : { disable : true } ,
175
- a11y : {
176
- disable : true ,
177
- } ,
178
- } ,
179
- tags : [ "skipTestRunner" ] ,
180
- render : ( ) => (
181
- < HvSimpleGrid cols = { 2 } >
182
- < TableComplete />
183
- < AlternativeLayout />
184
- < ColumnResize />
185
- < UseHvTableSticky />
186
- </ HvSimpleGrid >
187
- ) ,
188
- } ;
189
-
190
- export const Test3 : StoryObj = {
191
128
parameters : {
192
129
...setupChromatic ( [
193
130
"DS3 dawn" ,
@@ -211,45 +148,26 @@ export const Test3: StoryObj = {
211
148
name : / c o l l a p s e / i,
212
149
} ) [ 0 ] ;
213
150
await userEvent . click ( collapseButton ) ;
214
-
215
- // Row expand
216
- const expandButton = canvas . getAllByRole ( "button" , { name : / e x p a n d / i } ) [ 0 ] ;
217
- await userEvent . click ( expandButton ) ;
218
151
} ,
219
- render : ( ) => (
220
- < HvSimpleGrid cols = { 2 } >
221
- < UseHvHeaderGroups />
222
- < UseHvRowExpand />
223
- < UseHvGroupBy />
224
- < CompleteTableSection />
225
- </ HvSimpleGrid >
226
- ) ,
227
- } ;
228
-
229
- export const Test4 : StoryObj = {
230
- parameters : {
231
- ...setupChromatic ( [
232
- "DS3 dawn" ,
233
- "DS3 wicked" ,
234
- "DS5 dawn" ,
235
- "DS5 wicked" ,
236
- "Pentaho+ dawn" ,
237
- "Pentaho+ wicked" ,
238
- ] ) ,
239
- docs : { disable : true } ,
240
- a11y : {
241
- disable : true ,
242
- } ,
243
- } ,
244
- tags : [ "skipTestRunner" ] ,
245
152
render : ( args , context : any ) => (
246
153
< >
247
- < AllColumnRenderers />
154
+ < div className = "grid grid-cols-2 gap-sm" >
155
+ < div className = "flex flex-col gap-sm" >
156
+ { Main . render ?.( Main . args as any , context ) }
157
+ < UseHvGroupBy />
158
+ { GroupedRows . render ?.( GroupedRows . args as any , context ) }
159
+ { SimpleTable . render ?.( SimpleTable . args as any , context ) }
160
+ </ div >
161
+ < div className = "flex flex-col gap-sm" >
162
+ { NoData . render ?.( NoData . args as any , context ) }
163
+ < ColumnResize />
164
+ { TestHeadersStory . render ?.( TestHeadersStory . args as any , context ) }
165
+ < PropsTableSection />
166
+ { ListRow . render ?.( ListRow . args as any , context ) }
167
+ </ div >
168
+ </ div >
248
169
< br />
249
- < HvSimpleGrid cols = { 2 } >
250
- < PropsTableSection />
251
- { TestHeadersStory . render ?.( TestHeadersStory . args as any , context ) }
252
- </ HvSimpleGrid >
170
+ < AllColumnRenderers />
253
171
</ >
254
172
) ,
255
173
} ;
0 commit comments