@agilant/toga-blox 1.0.5
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/Dockerfile +9 -0
- package/README.md +69 -0
- package/assets/Logo.png +0 -0
- package/assets/compass-card-image-2.png +0 -0
- package/assets/compass-card-image-3.png +0 -0
- package/assets/compass-card-image-4.png +0 -0
- package/assets/compass-card-image.png +0 -0
- package/assets/compass-logo.png +0 -0
- package/assets/compass-tech-hero-bg.png +0 -0
- package/assets/contact-image.png +0 -0
- package/assets/green-laptop.png +0 -0
- package/assets/heroImage.png +0 -0
- package/assets/placeholder-no-image-available.png +0 -0
- package/assets/team.png +0 -0
- package/declarations.d.ts +4 -0
- package/docker-compose.yml +22 -0
- package/global.css +4 -0
- package/index.js +4 -0
- package/nodemon.json +5 -0
- package/package.json +70 -0
- package/postcss.config.js +6 -0
- package/src/components/Badge/Badge.stories.tsx +284 -0
- package/src/components/Badge/Badge.test.tsx +185 -0
- package/src/components/Badge/Badge.tsx +137 -0
- package/src/components/Badge/Badge.types.tsx +28 -0
- package/src/components/Badge/badgeClassNames.tsx +152 -0
- package/src/components/Badge/index.ts +2 -0
- package/src/components/Card/Card.stories.tsx +91 -0
- package/src/components/Card/Card.test.tsx +53 -0
- package/src/components/Card/Card.tsx +30 -0
- package/src/components/Card/Card.types.ts +11 -0
- package/src/components/Card/DUMMYPRODUCTDATA.json +670 -0
- package/src/components/Card/cardClassNames.ts +49 -0
- package/src/components/Card/index.ts +3 -0
- package/src/components/Card/templates/CompassCardTemplate.tsx +58 -0
- package/src/components/Card/templates/HorizontalCardTemplate.tsx +184 -0
- package/src/components/Card/templates/VerticalCardTemplate.tsx +154 -0
- package/src/components/Footer/ContactInfoItem.tsx +20 -0
- package/src/components/Footer/DUMMYFOOTERDATA.json +132 -0
- package/src/components/Footer/Footer.stories.tsx +292 -0
- package/src/components/Footer/Footer.test.tsx +90 -0
- package/src/components/Footer/Footer.tsx +159 -0
- package/src/components/Footer/Footer.types.tsx +61 -0
- package/src/components/Footer/footerClassNames.tsx +57 -0
- package/src/components/FormButton/FormButton.stories.tsx +199 -0
- package/src/components/FormButton/FormButton.test.tsx +73 -0
- package/src/components/FormButton/FormButton.tsx +116 -0
- package/src/components/FormButton/FormButton.types.ts +32 -0
- package/src/components/FormButton/formButtonClassNames.tsx +153 -0
- package/src/components/FormButton/index.ts +2 -0
- package/src/components/GenericList/DUMMYLISTDATA.json +560 -0
- package/src/components/GenericList/GenericList.stories.tsx +104 -0
- package/src/components/GenericList/GenericList.test.tsx +29 -0
- package/src/components/GenericList/GenericList.tsx +146 -0
- package/src/components/GenericList/genericListClassNames.tsx +8 -0
- package/src/components/GenericList/templates/DummyDataList.tsx +23 -0
- package/src/components/GenericList/templates/DynamicIconList.tsx +74 -0
- package/src/components/HamburgerButton/HamburgerButton.tsx +68 -0
- package/src/components/HamburgerButton/HamburgerButton.types.tsx +6 -0
- package/src/components/HamburgerButton/index.ts +2 -0
- package/src/components/Header/DUMMYICONDATA.json +136 -0
- package/src/components/Header/Header.stories.tsx +521 -0
- package/src/components/Header/Header.test.tsx +323 -0
- package/src/components/Header/Header.tsx +289 -0
- package/src/components/Header/Header.types.ts +52 -0
- package/src/components/Header/headerClassNames.tsx +50 -0
- package/src/components/Header/headerContext.tsx +125 -0
- package/src/components/Header/index.ts +2 -0
- package/src/components/Hero/Hero.stories.tsx +69 -0
- package/src/components/Hero/Hero.test.tsx +109 -0
- package/src/components/Hero/Hero.tsx +58 -0
- package/src/components/Hero/Hero.types.ts +9 -0
- package/src/components/Hero/index.ts +2 -0
- package/src/components/Icon/Icon.stories.tsx +227 -0
- package/src/components/Icon/Icon.test.tsx +53 -0
- package/src/components/Icon/Icon.tsx +208 -0
- package/src/components/Icon/Icon.types.ts +24 -0
- package/src/components/Icon/iconClassNames.ts +79 -0
- package/src/components/Icon/index.ts +2 -0
- package/src/components/Image/Image.stories.tsx +79 -0
- package/src/components/Image/Image.test.tsx +87 -0
- package/src/components/Image/Image.tsx +49 -0
- package/src/components/Image/Image.types.ts +11 -0
- package/src/components/Image/index.ts +2 -0
- package/src/components/Input/Input.stories.tsx +651 -0
- package/src/components/Input/Input.test.tsx +90 -0
- package/src/components/Input/Input.tsx +226 -0
- package/src/components/Input/Input.types.ts +52 -0
- package/src/components/Input/InputMemoTypes.tsx +32 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/Input/inputClassNames.tsx +169 -0
- package/src/components/MobileMenu/MobileMenu.tsx +41 -0
- package/src/components/MobileMenu/MobileMenu.types.tsx +30 -0
- package/src/components/MobileMenu/index.ts +2 -0
- package/src/components/Nav/DUMMYNAVDATA.json +234 -0
- package/src/components/Nav/Nav.stories.tsx +181 -0
- package/src/components/Nav/Nav.test.tsx +89 -0
- package/src/components/Nav/Nav.tsx +242 -0
- package/src/components/Nav/Nav.types.tsx +35 -0
- package/src/components/Nav/index.ts +2 -0
- package/src/components/Nav/navClassNames.tsx +192 -0
- package/src/components/Page/TableDataDummy.tsx +216 -0
- package/src/components/Page/ViewPageTemplate.stories.tsx +546 -0
- package/src/components/Page/ViewPageTemplate.test.tsx +361 -0
- package/src/components/Page/ViewPageTemplate.tsx +10 -0
- package/src/components/Page/ViewPageTemplate.types.ts +6 -0
- package/src/components/Page/index.ts +2 -0
- package/src/components/PageSection/PageSection.stories.tsx +114 -0
- package/src/components/PageSection/PageSection.tsx +12 -0
- package/src/components/PageSection/PageSection.types.ts +6 -0
- package/src/components/PageSection/PageSections.test.tsx +88 -0
- package/src/components/PageSection/index.ts +2 -0
- package/src/components/Text/Text.stories.tsx +60 -0
- package/src/components/Text/Text.test.tsx +52 -0
- package/src/components/Text/Text.tsx +80 -0
- package/src/components/Text/Text.types.ts +12 -0
- package/src/components/Text/index.ts +2 -0
- package/src/components/Toaster/Toaster.stories.tsx +122 -0
- package/src/components/Toaster/Toaster.test.tsx +61 -0
- package/src/components/Toaster/Toaster.tsx +80 -0
- package/src/components/Toaster/Toaster.types.ts +12 -0
- package/src/components/Toaster/index.ts +2 -0
- package/src/hoc/index.ts +2 -0
- package/src/hoc/styling/withStoryBook.tsx +19 -0
- package/src/main.css +3 -0
- package/src/setupTests.ts +1 -0
- package/src/userHoc/index.ts +1 -0
- package/src/userHoc/withMemo.tsx +20 -0
- package/src/utils/assertTagName.tsx +7 -0
- package/src/utils/generateAccordionItem.tsx +102 -0
- package/src/utils/generateFooterContacts.tsx +75 -0
- package/src/utils/generateNavMenu.tsx +54 -0
- package/src/utils/generateSocialList.tsx +34 -0
- package/src/utils/getFontAwesomeIcon.tsx +25 -0
- package/src/utils/inputValidation.tsx +26 -0
- package/tailwind.config.js +32 -0
- package/tsconfig.json +25 -0
- package/vite.config.ts +33 -0
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
{
|
|
2
|
+
"trees": [
|
|
3
|
+
"Oak",
|
|
4
|
+
"Maple",
|
|
5
|
+
"Pine",
|
|
6
|
+
"Spruce",
|
|
7
|
+
"Birch",
|
|
8
|
+
"Cedar",
|
|
9
|
+
"Poplar",
|
|
10
|
+
"Ash",
|
|
11
|
+
"Elm",
|
|
12
|
+
"Willow",
|
|
13
|
+
"Beech",
|
|
14
|
+
"Fir",
|
|
15
|
+
"Cherry",
|
|
16
|
+
"Apple",
|
|
17
|
+
"Palm",
|
|
18
|
+
"Sequoia",
|
|
19
|
+
"Redwood",
|
|
20
|
+
"Cypress",
|
|
21
|
+
"Sycamore",
|
|
22
|
+
"Mahogany",
|
|
23
|
+
"Walnut",
|
|
24
|
+
"Chestnut",
|
|
25
|
+
"Gum",
|
|
26
|
+
"Eucalyptus",
|
|
27
|
+
"Alder",
|
|
28
|
+
"Yew",
|
|
29
|
+
"Hemlock",
|
|
30
|
+
"Acacia",
|
|
31
|
+
"Olive",
|
|
32
|
+
"Locust",
|
|
33
|
+
"Boxelder",
|
|
34
|
+
"Sweetgum",
|
|
35
|
+
"Blackwood",
|
|
36
|
+
"Paulownia",
|
|
37
|
+
"Persimmon",
|
|
38
|
+
"Larch",
|
|
39
|
+
"Redbud",
|
|
40
|
+
"Dogwood",
|
|
41
|
+
"Hophornbeam",
|
|
42
|
+
"Hornbeam",
|
|
43
|
+
"Kauri",
|
|
44
|
+
"Pecan",
|
|
45
|
+
"Moringa",
|
|
46
|
+
"Baobab",
|
|
47
|
+
"Butternut",
|
|
48
|
+
"Black cherry",
|
|
49
|
+
"Balsa",
|
|
50
|
+
"Tulip tree",
|
|
51
|
+
"Horse chestnut",
|
|
52
|
+
"Silver birch",
|
|
53
|
+
"Japanese maple",
|
|
54
|
+
"Paperbark maple",
|
|
55
|
+
"Mangrove",
|
|
56
|
+
"Fig",
|
|
57
|
+
"Rubber tree",
|
|
58
|
+
"Sugar maple",
|
|
59
|
+
"Yellowwood",
|
|
60
|
+
"Lime tree",
|
|
61
|
+
"Ironwood",
|
|
62
|
+
"Whitebeam",
|
|
63
|
+
"Monkey puzzle tree",
|
|
64
|
+
"Black locust",
|
|
65
|
+
"Catalpa",
|
|
66
|
+
"Hawthorn",
|
|
67
|
+
"Lime",
|
|
68
|
+
"Hackberry",
|
|
69
|
+
"Tupelo",
|
|
70
|
+
"Hornbeam",
|
|
71
|
+
"Mulberry",
|
|
72
|
+
"Rowan",
|
|
73
|
+
"Witch hazel",
|
|
74
|
+
"Japanese cedar",
|
|
75
|
+
"Tamarind",
|
|
76
|
+
"Tasmanian blue gum",
|
|
77
|
+
"Paper birch",
|
|
78
|
+
"Black walnut",
|
|
79
|
+
"Cacao",
|
|
80
|
+
"Blackwood acacia",
|
|
81
|
+
"Ponderosa pine",
|
|
82
|
+
"Jackfruit",
|
|
83
|
+
"Bristlecone pine",
|
|
84
|
+
"Yucca",
|
|
85
|
+
"Norway spruce",
|
|
86
|
+
"Banyan",
|
|
87
|
+
"Persimmon",
|
|
88
|
+
"Ebony",
|
|
89
|
+
"Madrone",
|
|
90
|
+
"Chinaberry",
|
|
91
|
+
"Red pine",
|
|
92
|
+
"Black oak",
|
|
93
|
+
"Red oak",
|
|
94
|
+
"White oak",
|
|
95
|
+
"Swamp oak",
|
|
96
|
+
"Cork oak",
|
|
97
|
+
"Water oak",
|
|
98
|
+
"Sandalwood",
|
|
99
|
+
"Australian pine",
|
|
100
|
+
"Coast redwood",
|
|
101
|
+
"Dawn redwood",
|
|
102
|
+
"Bald cypress",
|
|
103
|
+
"Western red cedar",
|
|
104
|
+
"Eastern red cedar",
|
|
105
|
+
"Northern white cedar",
|
|
106
|
+
"Black cedar",
|
|
107
|
+
"White cedar",
|
|
108
|
+
"Cedar of Lebanon",
|
|
109
|
+
"Western hemlock",
|
|
110
|
+
"Eastern hemlock",
|
|
111
|
+
"Mountain hemlock",
|
|
112
|
+
"Carolina hemlock",
|
|
113
|
+
"Douglas fir",
|
|
114
|
+
"Grand fir",
|
|
115
|
+
"Noble fir",
|
|
116
|
+
"Silver fir",
|
|
117
|
+
"White fir",
|
|
118
|
+
"Fraser fir",
|
|
119
|
+
"Balsam fir",
|
|
120
|
+
"Loblolly pine",
|
|
121
|
+
"Longleaf pine",
|
|
122
|
+
"Slash pine",
|
|
123
|
+
"Shortleaf pine",
|
|
124
|
+
"Pitch pine",
|
|
125
|
+
"Virginia pine",
|
|
126
|
+
"Pond pine",
|
|
127
|
+
"Table Mountain pine",
|
|
128
|
+
"White pine",
|
|
129
|
+
"Eastern white pine",
|
|
130
|
+
"Western white pine",
|
|
131
|
+
"Sugar pine",
|
|
132
|
+
"Yellow pine",
|
|
133
|
+
"Spruce pine",
|
|
134
|
+
"Chilean pine",
|
|
135
|
+
"Caribbean pine",
|
|
136
|
+
"Aleppo pine",
|
|
137
|
+
"Monterey pine",
|
|
138
|
+
"Radiata pine",
|
|
139
|
+
"Scots pine",
|
|
140
|
+
"Siberian pine",
|
|
141
|
+
"Afghan pine",
|
|
142
|
+
"Bhutan pine",
|
|
143
|
+
"Sumatran pine",
|
|
144
|
+
"Creosote bush",
|
|
145
|
+
"Jojoba",
|
|
146
|
+
"Joshua tree",
|
|
147
|
+
"Ocotillo",
|
|
148
|
+
"Palo verde",
|
|
149
|
+
"Arizona cypress",
|
|
150
|
+
"Mexican cypress",
|
|
151
|
+
"Leyland cypress",
|
|
152
|
+
"Bald cypress",
|
|
153
|
+
"Montezuma cypress",
|
|
154
|
+
"Desert willow",
|
|
155
|
+
"Blue palo verde",
|
|
156
|
+
"Ironwood",
|
|
157
|
+
"Mesquite",
|
|
158
|
+
"Screwbean mesquite",
|
|
159
|
+
"Honey mesquite",
|
|
160
|
+
"Velvet mesquite",
|
|
161
|
+
"Tamarisk",
|
|
162
|
+
"Date palm",
|
|
163
|
+
"California fan palm",
|
|
164
|
+
"Washingtonia palm",
|
|
165
|
+
"Windmill palm",
|
|
166
|
+
"Coconut palm",
|
|
167
|
+
"Sago palm",
|
|
168
|
+
"Cycad",
|
|
169
|
+
"Norfolk Island pine",
|
|
170
|
+
"Bunya pine",
|
|
171
|
+
"Cook pine",
|
|
172
|
+
"Monkey puzzle tree",
|
|
173
|
+
"Wollemi pine",
|
|
174
|
+
"Kauri pine",
|
|
175
|
+
"Klinki pine",
|
|
176
|
+
"New Caledonia pine",
|
|
177
|
+
"Mountain ash",
|
|
178
|
+
"Tallowwood",
|
|
179
|
+
"Spotted gum",
|
|
180
|
+
"Sydney blue gum",
|
|
181
|
+
"Alpine ash",
|
|
182
|
+
"Tasmanian oak",
|
|
183
|
+
"Myrtle beech",
|
|
184
|
+
"Blackbutt",
|
|
185
|
+
"Jarrah",
|
|
186
|
+
"Karri",
|
|
187
|
+
"Wandoo",
|
|
188
|
+
"Swamp gum",
|
|
189
|
+
"Red ironbark",
|
|
190
|
+
"River red gum",
|
|
191
|
+
"Manna gum",
|
|
192
|
+
"Snow gum",
|
|
193
|
+
"Grey gum",
|
|
194
|
+
"Yellow box",
|
|
195
|
+
"Red box",
|
|
196
|
+
"Blakely's red gum",
|
|
197
|
+
"Stringybark",
|
|
198
|
+
"Ribbon gum",
|
|
199
|
+
"Apple box",
|
|
200
|
+
"Mountain gum",
|
|
201
|
+
"Blue gum",
|
|
202
|
+
"White ironbark",
|
|
203
|
+
"White box",
|
|
204
|
+
"Coolabah",
|
|
205
|
+
"Brush box",
|
|
206
|
+
"Cypress pine",
|
|
207
|
+
"White cypress",
|
|
208
|
+
"Black cypress",
|
|
209
|
+
"Mallee",
|
|
210
|
+
"Coolibah",
|
|
211
|
+
"Silver princess",
|
|
212
|
+
"Yate",
|
|
213
|
+
"Karri",
|
|
214
|
+
"Tuart",
|
|
215
|
+
"Peppermint",
|
|
216
|
+
"Acorn",
|
|
217
|
+
"Alder buckthorn",
|
|
218
|
+
"Almond",
|
|
219
|
+
"American beech",
|
|
220
|
+
"American chestnut",
|
|
221
|
+
"American holly",
|
|
222
|
+
"Amur cork tree",
|
|
223
|
+
"Amur maple",
|
|
224
|
+
"Arbutus",
|
|
225
|
+
"Aspen",
|
|
226
|
+
"Australian cedar",
|
|
227
|
+
"Avocado",
|
|
228
|
+
"Bamboo",
|
|
229
|
+
"Balsa",
|
|
230
|
+
"Bay laurel",
|
|
231
|
+
"Bayberry",
|
|
232
|
+
"Beech",
|
|
233
|
+
"Betula pendula",
|
|
234
|
+
"Black cherry",
|
|
235
|
+
"Black locust",
|
|
236
|
+
"Black mangrove",
|
|
237
|
+
"Black poplar",
|
|
238
|
+
"Black tupelo",
|
|
239
|
+
"Black walnut",
|
|
240
|
+
"Black willow",
|
|
241
|
+
"Bottlebrush",
|
|
242
|
+
"Breadfruit",
|
|
243
|
+
"Broadleaf maple",
|
|
244
|
+
"Buckeye",
|
|
245
|
+
"Butternut",
|
|
246
|
+
"Canary Island pine",
|
|
247
|
+
"Carob",
|
|
248
|
+
"Carolina silverbell",
|
|
249
|
+
"Carrotwood",
|
|
250
|
+
"Cascara",
|
|
251
|
+
"Catalina cherry",
|
|
252
|
+
"Cedar elm",
|
|
253
|
+
"Celtis occidentalis",
|
|
254
|
+
"Cherry laurel",
|
|
255
|
+
"Chinese elm",
|
|
256
|
+
"Chinese pistache",
|
|
257
|
+
"Chinese tallow",
|
|
258
|
+
"Chinese wisteria",
|
|
259
|
+
"Chinkapin oak",
|
|
260
|
+
"Chinquapin",
|
|
261
|
+
"Chitalpa",
|
|
262
|
+
"Chocolate tree",
|
|
263
|
+
"Chokecherry",
|
|
264
|
+
"Cinnamon tree",
|
|
265
|
+
"Citrus",
|
|
266
|
+
"Cladrastis kentukea",
|
|
267
|
+
"Coast live oak",
|
|
268
|
+
"Cockspur hawthorn",
|
|
269
|
+
"Colorado blue spruce",
|
|
270
|
+
"Common fig",
|
|
271
|
+
"Common hackberry",
|
|
272
|
+
"Coral tree",
|
|
273
|
+
"Cordia",
|
|
274
|
+
"Cork oak",
|
|
275
|
+
"Cornelian cherry",
|
|
276
|
+
"Cottonwood",
|
|
277
|
+
"Crabapple",
|
|
278
|
+
"Crepe myrtle",
|
|
279
|
+
"Date palm",
|
|
280
|
+
"Dawn redwood",
|
|
281
|
+
"Deodar cedar",
|
|
282
|
+
"Desert willow",
|
|
283
|
+
"Devilwood",
|
|
284
|
+
"Dombeya",
|
|
285
|
+
"Douglas fir",
|
|
286
|
+
"Dragon tree",
|
|
287
|
+
"Dwarf flowering almond",
|
|
288
|
+
"Eastern red cedar",
|
|
289
|
+
"Eastern white pine",
|
|
290
|
+
"English elm",
|
|
291
|
+
"English oak",
|
|
292
|
+
"English walnut",
|
|
293
|
+
"European ash",
|
|
294
|
+
"European beech",
|
|
295
|
+
"European hornbeam",
|
|
296
|
+
"European larch",
|
|
297
|
+
"European mountain ash",
|
|
298
|
+
"European olive",
|
|
299
|
+
"European white birch",
|
|
300
|
+
"European yew",
|
|
301
|
+
"Evergreen magnolia",
|
|
302
|
+
"False cypress",
|
|
303
|
+
"False indigo",
|
|
304
|
+
"False spirea",
|
|
305
|
+
"Fern pine",
|
|
306
|
+
"Firethorn",
|
|
307
|
+
"Flame tree",
|
|
308
|
+
"Flowering dogwood",
|
|
309
|
+
"Foxtail palm",
|
|
310
|
+
"Fragrant sumac",
|
|
311
|
+
"Frangipani",
|
|
312
|
+
"Franklin tree",
|
|
313
|
+
"Fremont cottonwood",
|
|
314
|
+
"French tamarisk",
|
|
315
|
+
"Fringe tree",
|
|
316
|
+
"Redbud",
|
|
317
|
+
"Sassafras",
|
|
318
|
+
"Sourwood",
|
|
319
|
+
"Balsam poplar",
|
|
320
|
+
"Black birch",
|
|
321
|
+
"Black cottonwood",
|
|
322
|
+
"Black locust",
|
|
323
|
+
"Black pine",
|
|
324
|
+
"Black tupelo",
|
|
325
|
+
"Black willow",
|
|
326
|
+
"Blue ash",
|
|
327
|
+
"Blue beech",
|
|
328
|
+
"Blue gum",
|
|
329
|
+
"Blue spruce",
|
|
330
|
+
"Bottlebrush",
|
|
331
|
+
"Boxelder",
|
|
332
|
+
"Butternut",
|
|
333
|
+
"California bay laurel",
|
|
334
|
+
"Carolina ash",
|
|
335
|
+
"Catalina ironwood",
|
|
336
|
+
"Cedar elm",
|
|
337
|
+
"Celtis occidentalis",
|
|
338
|
+
"Cherry birch",
|
|
339
|
+
"Cherry plum",
|
|
340
|
+
"Chestnut oak",
|
|
341
|
+
"Chinaberry",
|
|
342
|
+
"Chinquapin oak",
|
|
343
|
+
"Cinnamon tree",
|
|
344
|
+
"Coastal redwood",
|
|
345
|
+
"Coral tree",
|
|
346
|
+
"Cork oak",
|
|
347
|
+
"Cornelian cherry",
|
|
348
|
+
"Cottonwood",
|
|
349
|
+
"Crabapple",
|
|
350
|
+
"Crepe myrtle",
|
|
351
|
+
"Date palm",
|
|
352
|
+
"Dawn redwood",
|
|
353
|
+
"Devilwood",
|
|
354
|
+
"Dogwood",
|
|
355
|
+
"Dwarf flowering almond",
|
|
356
|
+
"Dwarf palmetto",
|
|
357
|
+
"Eastern cottonwood",
|
|
358
|
+
"Eastern redbud",
|
|
359
|
+
"English elm",
|
|
360
|
+
"English oak",
|
|
361
|
+
"English walnut",
|
|
362
|
+
"European beech",
|
|
363
|
+
"European hornbeam",
|
|
364
|
+
"European larch",
|
|
365
|
+
"European mountain ash",
|
|
366
|
+
"European olive",
|
|
367
|
+
"European white birch",
|
|
368
|
+
"European yew",
|
|
369
|
+
"Evergreen magnolia",
|
|
370
|
+
"False cypress",
|
|
371
|
+
"False indigo",
|
|
372
|
+
"Fern pine",
|
|
373
|
+
"Firethorn",
|
|
374
|
+
"Flame tree",
|
|
375
|
+
"Flowering dogwood",
|
|
376
|
+
"Franklin tree",
|
|
377
|
+
"Fremont cottonwood",
|
|
378
|
+
"French tamarisk",
|
|
379
|
+
"Fringe tree",
|
|
380
|
+
"Golden rain tree",
|
|
381
|
+
"Goldenchain tree",
|
|
382
|
+
"Gopherwood",
|
|
383
|
+
"Gray birch",
|
|
384
|
+
"Gray poplar",
|
|
385
|
+
"Hackberry",
|
|
386
|
+
"Hawthorn",
|
|
387
|
+
"Hickory",
|
|
388
|
+
"Holly",
|
|
389
|
+
"Honey locust",
|
|
390
|
+
"Hophornbeam",
|
|
391
|
+
"Indian rosewood",
|
|
392
|
+
"Jack pine",
|
|
393
|
+
"Joshua tree",
|
|
394
|
+
"Kentucky coffeetree",
|
|
395
|
+
"Korean pine",
|
|
396
|
+
"Lacebark elm",
|
|
397
|
+
"Laurel oak",
|
|
398
|
+
"Lemon-scented gum",
|
|
399
|
+
"Linden",
|
|
400
|
+
"Littleleaf linden",
|
|
401
|
+
"London plane",
|
|
402
|
+
"Macadamia nut",
|
|
403
|
+
"Magnolia",
|
|
404
|
+
"Maidenhair tree",
|
|
405
|
+
"Maple-leaved oak",
|
|
406
|
+
"Mimosa",
|
|
407
|
+
"Montezuma pine",
|
|
408
|
+
"Monterey cypress",
|
|
409
|
+
"Mountain ash",
|
|
410
|
+
"Mulga",
|
|
411
|
+
"Mulga acacia",
|
|
412
|
+
"Mulga brush",
|
|
413
|
+
"Mulga wattle",
|
|
414
|
+
"Nectarine",
|
|
415
|
+
"Nettle tree",
|
|
416
|
+
"Northern catalpa",
|
|
417
|
+
"Northern red oak",
|
|
418
|
+
"Nut pine",
|
|
419
|
+
"Oregon ash",
|
|
420
|
+
"Osage orange",
|
|
421
|
+
"Ostrich foot fern",
|
|
422
|
+
"Pagoda tree",
|
|
423
|
+
"Palmetto",
|
|
424
|
+
"Paradise tree",
|
|
425
|
+
"Peppercorn tree",
|
|
426
|
+
"Pepperwood",
|
|
427
|
+
"Persimmon",
|
|
428
|
+
"Persian ironwood",
|
|
429
|
+
"Persian lilac",
|
|
430
|
+
"Persian silk tree",
|
|
431
|
+
"Persimmon",
|
|
432
|
+
"Pignut hickory",
|
|
433
|
+
"Pindo palm",
|
|
434
|
+
"Pink snowbush",
|
|
435
|
+
"Plane tree",
|
|
436
|
+
"Plum",
|
|
437
|
+
"Poison oak",
|
|
438
|
+
"Poison sumac",
|
|
439
|
+
"Pomelo tree",
|
|
440
|
+
"Pond cypress",
|
|
441
|
+
"Prickly ash",
|
|
442
|
+
"Primrose tree",
|
|
443
|
+
"Purple ash",
|
|
444
|
+
"Quaking aspen",
|
|
445
|
+
"Queensland kauri",
|
|
446
|
+
"Queensland maple",
|
|
447
|
+
"Queensland red cedar",
|
|
448
|
+
"Queensland walnut",
|
|
449
|
+
"Quercus ilex",
|
|
450
|
+
"Red alder",
|
|
451
|
+
"Red ash",
|
|
452
|
+
"Red bottlebrush",
|
|
453
|
+
"Red cedar",
|
|
454
|
+
"Red maple",
|
|
455
|
+
"Red mulberry",
|
|
456
|
+
"Red pine",
|
|
457
|
+
"Red spruce",
|
|
458
|
+
"Red-tipped photinia",
|
|
459
|
+
"Redwood",
|
|
460
|
+
"Ribbonwood",
|
|
461
|
+
"River birch",
|
|
462
|
+
"River red gum",
|
|
463
|
+
"Rock elm",
|
|
464
|
+
"Rose gum",
|
|
465
|
+
"Royal palm",
|
|
466
|
+
"Russian olive",
|
|
467
|
+
"Rusty fig",
|
|
468
|
+
"Saffron tree",
|
|
469
|
+
"Sago palm",
|
|
470
|
+
"Salmon gum",
|
|
471
|
+
"Salt cedar",
|
|
472
|
+
"Sandalwood",
|
|
473
|
+
"Sandpaper fig",
|
|
474
|
+
"Sawtooth oak",
|
|
475
|
+
"Scarlet oak",
|
|
476
|
+
"Scots pine",
|
|
477
|
+
"Sea holly",
|
|
478
|
+
"Sea trumpet",
|
|
479
|
+
"Serviceberry",
|
|
480
|
+
"Shagbark hickory",
|
|
481
|
+
"Shingle oak",
|
|
482
|
+
"Shumard oak",
|
|
483
|
+
"Siberian elm",
|
|
484
|
+
"Silk floss tree",
|
|
485
|
+
"Silk oak",
|
|
486
|
+
"Silky oak",
|
|
487
|
+
"Silver birch",
|
|
488
|
+
"Silver dollar tree",
|
|
489
|
+
"Silver linden",
|
|
490
|
+
"Silver maple",
|
|
491
|
+
"Silver wattle",
|
|
492
|
+
"Silverberry",
|
|
493
|
+
"Silvertop ash",
|
|
494
|
+
"Sitka spruce",
|
|
495
|
+
"Smooth bark Australian pine",
|
|
496
|
+
"Snow gum",
|
|
497
|
+
"Sour cherry",
|
|
498
|
+
"Southern catalpa",
|
|
499
|
+
"Southern live oak",
|
|
500
|
+
"Southern magnolia",
|
|
501
|
+
"Southern red oak",
|
|
502
|
+
"Southern sugar maple",
|
|
503
|
+
"Southern wax myrtle",
|
|
504
|
+
"Spanish cedar",
|
|
505
|
+
"Spanish oak",
|
|
506
|
+
"Spindle tree",
|
|
507
|
+
"Spruce",
|
|
508
|
+
"Star fruit tree",
|
|
509
|
+
"Sugar gum",
|
|
510
|
+
"Sugarberry",
|
|
511
|
+
"Summer chocolate mimosa",
|
|
512
|
+
"Swamp bay",
|
|
513
|
+
"Swamp black gum",
|
|
514
|
+
"Swamp chestnut oak",
|
|
515
|
+
"Swamp cottonwood",
|
|
516
|
+
"Swamp mahogany",
|
|
517
|
+
"Swamp maple",
|
|
518
|
+
"Swamp white oak",
|
|
519
|
+
"Sweet bay",
|
|
520
|
+
"Sweet birch",
|
|
521
|
+
"Sweet cherry",
|
|
522
|
+
"Sweet chestnut",
|
|
523
|
+
"Sweet gum",
|
|
524
|
+
"Sweet olive",
|
|
525
|
+
"Sweet viburnum",
|
|
526
|
+
"Sycamore maple",
|
|
527
|
+
"Tamarack",
|
|
528
|
+
"Tamarillo",
|
|
529
|
+
"Tamarind",
|
|
530
|
+
"Tangelo",
|
|
531
|
+
"Tangor",
|
|
532
|
+
"Tan oak",
|
|
533
|
+
"Tanoak",
|
|
534
|
+
"Tasmanian blackwood",
|
|
535
|
+
"Tasmanian cherry",
|
|
536
|
+
"Tasmanian snow gum",
|
|
537
|
+
"Tea tree",
|
|
538
|
+
"Texas ash",
|
|
539
|
+
"Thornless honeylocust",
|
|
540
|
+
"Thujopsis dolabrata",
|
|
541
|
+
"Tibetan cherry",
|
|
542
|
+
"Tibetan fir",
|
|
543
|
+
"Tilia tomentosa",
|
|
544
|
+
"Toog",
|
|
545
|
+
"Toothache tree",
|
|
546
|
+
"Toyon",
|
|
547
|
+
"Tree of heaven",
|
|
548
|
+
"Trumpet tree",
|
|
549
|
+
"Tulip tree",
|
|
550
|
+
"Umbrella pine",
|
|
551
|
+
"Velvet mesquite",
|
|
552
|
+
"Velvetleaf",
|
|
553
|
+
"Virginia pine",
|
|
554
|
+
"Walnut",
|
|
555
|
+
"Wattle",
|
|
556
|
+
"Wax myrtle",
|
|
557
|
+
"Weeping willow",
|
|
558
|
+
"Western hemlock"
|
|
559
|
+
]
|
|
560
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import GenericList from "./GenericList";
|
|
3
|
+
import GenericListTypes from "./GenericList";
|
|
4
|
+
import DynamicIconList from "./templates/DynamicIconList";
|
|
5
|
+
import DUMMYICONDATA from "../Header/DUMMYICONDATA.json";
|
|
6
|
+
import DUMMYLISTDATA from "./DUMMYLISTDATA.json";
|
|
7
|
+
import { IconsListProps } from "./templates/DynamicIconList";
|
|
8
|
+
import { TreeListProps } from "./templates/DummyDataList";
|
|
9
|
+
import TreeList from "./templates/DummyDataList";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "Components/GenericList",
|
|
13
|
+
component: GenericList,
|
|
14
|
+
argTypes: {
|
|
15
|
+
listDirection: {
|
|
16
|
+
control: "select",
|
|
17
|
+
options: ["horizontal", "vertical"],
|
|
18
|
+
description: "Whether the list is horizontal or vertical",
|
|
19
|
+
},
|
|
20
|
+
listType: {
|
|
21
|
+
table: {
|
|
22
|
+
disable: true,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
hasVirtualization: {
|
|
26
|
+
table: {
|
|
27
|
+
disable: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
containerClasses: {
|
|
31
|
+
table: {
|
|
32
|
+
disable: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
itemHeight: {
|
|
36
|
+
table: {
|
|
37
|
+
disable: true,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
containerHeight: {
|
|
41
|
+
table: {
|
|
42
|
+
disable: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
renderItem: {
|
|
46
|
+
table: {
|
|
47
|
+
disable: true,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
data: {
|
|
51
|
+
table: {
|
|
52
|
+
disable: true,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
tags: ["autodocs"],
|
|
57
|
+
parameters: {
|
|
58
|
+
layout: "centered",
|
|
59
|
+
},
|
|
60
|
+
} as Meta;
|
|
61
|
+
|
|
62
|
+
const Template: typeof GenericListTypes & { args?: any } = (args) => (
|
|
63
|
+
<GenericList {...args} />
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
export const Default = Template.bind({});
|
|
67
|
+
Default.args = {
|
|
68
|
+
containerClasses: "flex justify-center w-96 bg-slate-100",
|
|
69
|
+
data: DUMMYICONDATA.DUMMYICONCOMPASSDATA,
|
|
70
|
+
itemHeight: 20,
|
|
71
|
+
containerHeight: 72,
|
|
72
|
+
hasVirtualization: true,
|
|
73
|
+
renderItem: (item: IconsListProps["item"]) => (
|
|
74
|
+
<DynamicIconList item={item} />
|
|
75
|
+
),
|
|
76
|
+
listDirection: "horizontal",
|
|
77
|
+
listType: "none",
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const VerticalList = Template.bind({});
|
|
81
|
+
VerticalList.args = {
|
|
82
|
+
containerClasses: "w-96 bg-slate-100",
|
|
83
|
+
data: DUMMYICONDATA.DUMMYICONCOMPASSDATA,
|
|
84
|
+
itemHeight: 150,
|
|
85
|
+
containerHeight: 300,
|
|
86
|
+
hasVirtualization: true,
|
|
87
|
+
renderItem: (item: IconsListProps["item"]) => (
|
|
88
|
+
<DynamicIconList item={item} />
|
|
89
|
+
),
|
|
90
|
+
listDirection: "vertical",
|
|
91
|
+
listType: "none",
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const LargeDataSet = Template.bind({});
|
|
95
|
+
LargeDataSet.args = {
|
|
96
|
+
containerClasses: "bg-slate-100 w-120 h-120 p-8",
|
|
97
|
+
data: DUMMYLISTDATA.trees.flatMap((tree) => [tree, tree]),
|
|
98
|
+
itemHeight: 50,
|
|
99
|
+
containerHeight: 300,
|
|
100
|
+
hasVirtualization: true,
|
|
101
|
+
renderItem: (item: TreeListProps["item"]) => <TreeList item={item} />,
|
|
102
|
+
listDirection: "vertical",
|
|
103
|
+
listType: "unordered",
|
|
104
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { describe, expect, beforeEach, test } from "vitest";
|
|
3
|
+
import GenericList from "./GenericList";
|
|
4
|
+
import DUMMYICONDATA from "../Header/DUMMYICONDATA.json";
|
|
5
|
+
import DynamicIconList from "./templates/DynamicIconList";
|
|
6
|
+
|
|
7
|
+
describe("<GenericList />", () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
render(
|
|
10
|
+
<GenericList
|
|
11
|
+
data={DUMMYICONDATA.DUMMYICONCOMPASSDATA}
|
|
12
|
+
renderItem={(item) => <DynamicIconList item={item} />}
|
|
13
|
+
itemHeight={20}
|
|
14
|
+
containerHeight={72}
|
|
15
|
+
listType="unordered"
|
|
16
|
+
containerClasses="bg-gray-100 w-36 border-2 border-teal-500"
|
|
17
|
+
listDirection="vertical"
|
|
18
|
+
hasVirtualization={false}
|
|
19
|
+
/>
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("contains correct icon images", () => {
|
|
24
|
+
expect(screen.getByTestId("user")).toBeInTheDocument();
|
|
25
|
+
expect(screen.getByTestId("circle-info")).toBeInTheDocument();
|
|
26
|
+
expect(screen.getByTestId("bell")).toBeInTheDocument();
|
|
27
|
+
expect(screen.getByTestId("cart-shopping")).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
});
|