@wonderflow/react-components 12.7.0 → 12.8.0

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.
@@ -1 +1 @@
1
- @layer components{.Card{background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}.Card[data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-bordered=true]{border:1px solid var(--dimmed-1)}.Card[data-card-dimmed="0"]{background-color:var(--dimmed-0)}.Card[data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-dimmed="1"]{background-color:var(--dimmed-1)}.Card[data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-dimmed="1"][data-card-bordered=true]{border:1px solid var(--dimmed-2)}.Card[data-card-dimmed="2"]{background-color:var(--dimmed-2)}.Card[data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-1)}.Card[data-card-dimmed="2"][data-card-bordered=true]{border:1px solid var(--dimmed-3)}.Card[data-card-vibrant=true]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"]{background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"]{background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="2"]{background-color:var(--global-vibrancy-background-hard)}.Card[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}.Row{height:100%}.Left{flex-shrink:0}.Content{flex-grow:1;height:100%}.Right{flex-shrink:0}}
1
+ @layer components{.Card{background-color:var(--global-background);border-radius:var(--radius);padding:var(--padding);position:relative}.Card[data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-bordered=true]{border:1px solid var(--dimmed-1)}.Card[data-card-dimmed="0"]{background-color:var(--dimmed-0)}.Card[data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-dimmed="1"]{background-color:var(--dimmed-1)}.Card[data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-0)}.Card[data-card-dimmed="1"][data-card-bordered=true]{border:1px solid var(--dimmed-2)}.Card[data-card-dimmed="2"]{background-color:var(--dimmed-2)}.Card[data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--dimmed-1)}.Card[data-card-dimmed="2"][data-card-bordered=true]{border:1px solid var(--dimmed-3)}.Card[data-card-vibrant=true]{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"]{background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="0"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"]{background-color:var(--global-vibrancy-background)}.Card[data-card-vibrant=true][data-card-dimmed="1"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background-soft)}.Card[data-card-vibrant=true][data-card-dimmed="2"]{background-color:var(--global-vibrancy-background-hard)}.Card[data-card-vibrant=true][data-card-dimmed="2"][data-card-highlight-hover=true]:is(:hover,:focus-visible){background-color:var(--global-vibrancy-background)}.Row{height:100%}.Left{flex-shrink:0}.Content{flex-grow:1;height:100%;overflow:auto;width:100%}.Right{flex-shrink:0}}
@@ -2,7 +2,7 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
2
2
  import { SplitButton } from './split-button';
3
3
  declare const story: ComponentMeta<typeof SplitButton>;
4
4
  export default story;
5
- export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("type-fest").Except<import("../..").ButtonProps, "iconPosition" | "iconColor" | "pressed"> & Pick<import("../..").PopoverProps, "offset" | "placement"> & {
5
+ export declare const Default: ComponentStory<import("../../types/polymorphic").ForwardRefComponent<"button", import("type-fest/source/except").Except<import("../..").ButtonProps, "iconPosition" | "iconColor" | "pressed"> & Pick<import("../..").PopoverProps, "offset" | "placement"> & {
6
6
  label: string;
7
7
  }>>;
8
8
  //# sourceMappingURL=split-button.stories.d.ts.map
@@ -0,0 +1,45 @@
1
+ export declare const channels: {
2
+ channel: string;
3
+ '1 star': number;
4
+ '2 stars': number;
5
+ '3 stars': number;
6
+ '4 stars': number;
7
+ '5 stars': number;
8
+ }[];
9
+ export declare const channelsB: {
10
+ channel: string;
11
+ '1 star': {
12
+ value: number;
13
+ percentage: number;
14
+ };
15
+ '2 stars': {
16
+ value: number;
17
+ percentage: number;
18
+ };
19
+ '3 stars': {
20
+ value: number;
21
+ percentage: number;
22
+ };
23
+ '4 stars': {
24
+ value: number;
25
+ percentage: number;
26
+ };
27
+ '5 stars': {
28
+ value: number;
29
+ percentage: number;
30
+ };
31
+ overlay: {
32
+ value: number;
33
+ percentage: number;
34
+ };
35
+ }[];
36
+ export declare const nestedChannels: {
37
+ name: string;
38
+ values: {
39
+ value: number;
40
+ valueInfo: number;
41
+ label: string;
42
+ label2: number;
43
+ }[];
44
+ }[];
45
+ //# sourceMappingURL=channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/channels.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,QAAQ;;;;;;;GAyJpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CrB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;GAgL1B,CAAC"}
@@ -0,0 +1,393 @@
1
+ /*
2
+ * Copyright 2023 Wonderflow Design Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export const channels = [
17
+ {
18
+ channel: 'amazon.ca',
19
+ '1 star': 159,
20
+ '2 stars': 51,
21
+ '3 stars': 66,
22
+ '4 stars': 157,
23
+ '5 stars': 1500,
24
+ },
25
+ {
26
+ channel: 'amazon.co.uk',
27
+ '1 star': 33,
28
+ '2 stars': 8,
29
+ '3 stars': 18,
30
+ '4 stars': 18,
31
+ '5 stars': 241,
32
+ },
33
+ {
34
+ channel: 'amazon.com',
35
+ '1 star': 679,
36
+ '2 stars': 284,
37
+ '3 stars': 370,
38
+ '4 stars': 866,
39
+ '5 stars': 8302,
40
+ },
41
+ {
42
+ channel: 'amazon.com.au',
43
+ '1 star': 0,
44
+ '2 stars': 0,
45
+ '3 stars': 1,
46
+ '4 stars': 0,
47
+ '5 stars': 3,
48
+ },
49
+ {
50
+ channel: 'amazon.de',
51
+ '1 star': 21,
52
+ '2 stars': 6,
53
+ '3 stars': 11,
54
+ '4 stars': 12,
55
+ '5 stars': 86,
56
+ },
57
+ {
58
+ channel: 'amazon.es',
59
+ '1 star': 0,
60
+ '2 stars': 0,
61
+ '3 stars': 0,
62
+ '4 stars': 0,
63
+ '5 stars': 6,
64
+ },
65
+ {
66
+ channel: 'amazon.fr',
67
+ '1 star': 18,
68
+ '2 stars': 3,
69
+ '3 stars': 9,
70
+ '4 stars': 10,
71
+ '5 stars': 78,
72
+ },
73
+ {
74
+ channel: 'amazon.in',
75
+ '1 star': 16,
76
+ '2 stars': 4,
77
+ '3 stars': 9,
78
+ '4 stars': 7,
79
+ '5 stars': 66,
80
+ },
81
+ {
82
+ channel: 'amazon.it',
83
+ '1 star': 22,
84
+ '2 stars': 4,
85
+ '3 stars': 9,
86
+ '4 stars': 11,
87
+ '5 stars': 98,
88
+ },
89
+ {
90
+ channel: 'amazon.nl',
91
+ '1 star': 4,
92
+ '2 stars': 0,
93
+ '3 stars': 1,
94
+ '4 stars': 3,
95
+ '5 stars': 23,
96
+ },
97
+ {
98
+ channel: 'bedbathandbeyond.com',
99
+ '1 star': 421,
100
+ '2 stars': 236,
101
+ '3 stars': 529,
102
+ '4 stars': 3217,
103
+ '5 stars': 35541,
104
+ },
105
+ {
106
+ channel: 'bestbuy.ca',
107
+ '1 star': 388,
108
+ '2 stars': 242,
109
+ '3 stars': 562,
110
+ '4 stars': 3548,
111
+ '5 stars': 38635,
112
+ },
113
+ {
114
+ channel: 'canadiantire.ca',
115
+ '1 star': 311,
116
+ '2 stars': 193,
117
+ '3 stars': 468,
118
+ '4 stars': 3108,
119
+ '5 stars': 34484,
120
+ },
121
+ {
122
+ channel: 'darty.com',
123
+ '1 star': 0,
124
+ '2 stars': 0,
125
+ '3 stars': 0,
126
+ '4 stars': 0,
127
+ '5 stars': 5,
128
+ },
129
+ {
130
+ channel: 'myer.com.au',
131
+ '1 star': 286,
132
+ '2 stars': 181,
133
+ '3 stars': 452,
134
+ '4 stars': 2984,
135
+ '5 stars': 33501,
136
+ },
137
+ {
138
+ channel: 'otto.de',
139
+ '1 star': 19,
140
+ '2 stars': 18,
141
+ '3 stars': 56,
142
+ '4 stars': 56,
143
+ '5 stars': 184,
144
+ },
145
+ {
146
+ channel: 'productreview.com.au',
147
+ '1 star': 19,
148
+ '2 stars': 13,
149
+ '3 stars': 9,
150
+ '4 stars': 20,
151
+ '5 stars': 130,
152
+ },
153
+ {
154
+ channel: 'target.com',
155
+ '1 star': 349,
156
+ '2 stars': 206,
157
+ '3 stars': 484,
158
+ '4 stars': 3264,
159
+ '5 stars': 36357,
160
+ },
161
+ {
162
+ channel: 'wayfair.com',
163
+ '1 star': 128,
164
+ '2 stars': 64,
165
+ '3 stars': 120,
166
+ '4 stars': 588,
167
+ '5 stars': 7663,
168
+ },
169
+ ];
170
+ export const channelsB = [
171
+ {
172
+ channel: 'bestbuy.ca',
173
+ '1 star': { value: 388, percentage: 10 },
174
+ '2 stars': { value: 242, percentage: 8 },
175
+ '3 stars': { value: 562, percentage: 12 },
176
+ '4 stars': { value: 3548, percentage: 21 },
177
+ '5 stars': { value: 3863, percentage: 87 },
178
+ overlay: { value: 3.8, percentage: 7 },
179
+ },
180
+ {
181
+ channel: 'amazon.com',
182
+ '1 star': { value: 339, percentage: 10 },
183
+ '2 stars': { value: 208, percentage: 10 },
184
+ '3 stars': { value: 418, percentage: 24 },
185
+ '4 stars': { value: 3218, percentage: 18 },
186
+ '5 stars': { value: 3637, percentage: 67 },
187
+ overlay: { value: 3.6, percentage: 6 },
188
+ },
189
+ {
190
+ channel: 'bedbathandbeyond.com',
191
+ '1 star': { value: 421, percentage: 13 },
192
+ '2 stars': { value: 234, percentage: 2 },
193
+ '3 stars': { value: 529, percentage: 0 },
194
+ '4 stars': { value: 3216, percentage: 28 },
195
+ '5 stars': { value: 3541, percentage: 76 },
196
+ overlay: { value: 1, percentage: 3 },
197
+ },
198
+ {
199
+ channel: 'canadiant.ca',
200
+ '1 star': { value: 310, percentage: 1 },
201
+ '2 stars': { value: 193, percentage: 0 },
202
+ '3 stars': { value: 468, percentage: 2 },
203
+ '4 stars': { value: 3109, percentage: 41 },
204
+ '5 stars': { value: 3444, percentage: 54 },
205
+ overlay: { value: 3.4, percentage: 5 },
206
+ },
207
+ {
208
+ channel: 'myer.max.au',
209
+ '1 star': { value: 286, percentage: 2 },
210
+ '2 stars': { value: 181, percentage: 0 },
211
+ '3 stars': { value: 511, percentage: 4 },
212
+ '4 stars': { value: 2912, percentage: 5 },
213
+ '5 stars': { value: 3086, percentage: 12 },
214
+ overlay: { value: 1.8, percentage: 1 },
215
+ },
216
+ ];
217
+ export const nestedChannels = [
218
+ {
219
+ name: 'bestbuy.ca',
220
+ values: [
221
+ {
222
+ value: 388,
223
+ valueInfo: 0,
224
+ label: 'bestbuy.ca',
225
+ label2: 1,
226
+ },
227
+ {
228
+ value: 242,
229
+ valueInfo: 0,
230
+ label: 'bestbuy.ca',
231
+ label2: 2,
232
+ },
233
+ {
234
+ value: 562,
235
+ valueInfo: 0,
236
+ label: 'bestbuy.ca',
237
+ label2: 3,
238
+ },
239
+ {
240
+ value: 3548,
241
+ valueInfo: 2,
242
+ label: 'bestbuy.ca',
243
+ label2: 4,
244
+ },
245
+ {
246
+ value: 38635,
247
+ valueInfo: 17,
248
+ label: 'bestbuy.ca',
249
+ label2: 5,
250
+ },
251
+ ],
252
+ },
253
+ {
254
+ name: 'target.com',
255
+ values: [
256
+ {
257
+ value: 349,
258
+ valueInfo: 0,
259
+ label: 'target.com',
260
+ label2: 1,
261
+ },
262
+ {
263
+ value: 206,
264
+ valueInfo: 0,
265
+ label: 'target.com',
266
+ label2: 2,
267
+ },
268
+ {
269
+ value: 484,
270
+ valueInfo: 0,
271
+ label: 'target.com',
272
+ label2: 3,
273
+ },
274
+ {
275
+ value: 3264,
276
+ valueInfo: 1,
277
+ label: 'target.com',
278
+ label2: 4,
279
+ },
280
+ {
281
+ value: 36357,
282
+ valueInfo: 16,
283
+ label: 'target.com',
284
+ label2: 5,
285
+ },
286
+ ],
287
+ },
288
+ {
289
+ name: 'bedbathandbeyond.com',
290
+ values: [
291
+ {
292
+ value: 421,
293
+ valueInfo: 0,
294
+ label: 'bedbathandbeyond.com',
295
+ label2: 1,
296
+ },
297
+ {
298
+ value: 236,
299
+ valueInfo: 0,
300
+ label: 'bedbathandbeyond.com',
301
+ label2: 2,
302
+ },
303
+ {
304
+ value: 529,
305
+ valueInfo: 0,
306
+ label: 'bedbathandbeyond.com',
307
+ label2: 3,
308
+ },
309
+ {
310
+ value: 3217,
311
+ valueInfo: 1,
312
+ label: 'bedbathandbeyond.com',
313
+ label2: 4,
314
+ },
315
+ {
316
+ value: 35541,
317
+ valueInfo: 16,
318
+ label: 'bedbathandbeyond.com',
319
+ label2: 5,
320
+ },
321
+ ],
322
+ },
323
+ {
324
+ name: 'canadiantire.ca',
325
+ values: [
326
+ {
327
+ value: 311,
328
+ valueInfo: 0,
329
+ label: 'canadiantire.ca',
330
+ label2: 1,
331
+ },
332
+ {
333
+ value: 193,
334
+ valueInfo: 0,
335
+ label: 'canadiantire.ca',
336
+ label2: 2,
337
+ },
338
+ {
339
+ value: 468,
340
+ valueInfo: 0,
341
+ label: 'canadiantire.ca',
342
+ label2: 3,
343
+ },
344
+ {
345
+ value: 3108,
346
+ valueInfo: 1,
347
+ label: 'canadiantire.ca',
348
+ label2: 4,
349
+ },
350
+ {
351
+ value: 34484,
352
+ valueInfo: 16,
353
+ label: 'canadiantire.ca',
354
+ label2: 5,
355
+ },
356
+ ],
357
+ },
358
+ {
359
+ name: 'myer.com.au',
360
+ values: [
361
+ {
362
+ value: 286,
363
+ valueInfo: 0,
364
+ label: 'myer.com.au',
365
+ label2: 1,
366
+ },
367
+ {
368
+ value: 181,
369
+ valueInfo: 0,
370
+ label: 'myer.com.au',
371
+ label2: 2,
372
+ },
373
+ {
374
+ value: 452,
375
+ valueInfo: 0,
376
+ label: 'myer.com.au',
377
+ label2: 3,
378
+ },
379
+ {
380
+ value: 2984,
381
+ valueInfo: 1,
382
+ label: 'myer.com.au',
383
+ label2: 4,
384
+ },
385
+ {
386
+ value: 33501,
387
+ valueInfo: 15,
388
+ label: 'myer.com.au',
389
+ label2: 5,
390
+ },
391
+ ],
392
+ },
393
+ ];
@@ -0,0 +1,28 @@
1
+ export declare const feedbackCount: {
2
+ date: string;
3
+ overlay: number;
4
+ 'feedback count': number;
5
+ extraData: null;
6
+ }[];
7
+ export declare const feedbackCountGaps: ({
8
+ date: string;
9
+ overlay: number;
10
+ 'feedback count': number;
11
+ extraData: null;
12
+ } | {
13
+ date: string;
14
+ overlay: number;
15
+ 'feedback count': null;
16
+ extraData: null;
17
+ } | {
18
+ date: string;
19
+ overlay: null;
20
+ 'feedback count': null;
21
+ extraData: null;
22
+ } | {
23
+ date: string;
24
+ overlay: null;
25
+ 'feedback count': number;
26
+ extraData: null;
27
+ })[];
28
+ //# sourceMappingURL=feedbackCount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedbackCount.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/feedbackCount.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,aAAa;;;;;GAqIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;IAqI7B,CAAC"}
@@ -0,0 +1,283 @@
1
+ /*
2
+ * Copyright 2023 Wonderflow Design Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export const feedbackCount = [
17
+ {
18
+ date: '2002',
19
+ overlay: 0.1,
20
+ 'feedback count': 16,
21
+ extraData: null,
22
+ },
23
+ {
24
+ date: '2003',
25
+ overlay: 0.11,
26
+ 'feedback count': 30,
27
+ extraData: null,
28
+ },
29
+ {
30
+ date: '2004',
31
+ overlay: 0.14,
32
+ 'feedback count': 20,
33
+ extraData: null,
34
+ },
35
+ {
36
+ date: '2005',
37
+ overlay: 0.13,
38
+ 'feedback count': 52,
39
+ extraData: null,
40
+ },
41
+ {
42
+ date: '2006',
43
+ overlay: 0.14,
44
+ 'feedback count': 131,
45
+ extraData: null,
46
+ },
47
+ {
48
+ date: '2007',
49
+ overlay: 0.18,
50
+ 'feedback count': 462,
51
+ extraData: null,
52
+ },
53
+ {
54
+ date: '2008',
55
+ overlay: 0.16,
56
+ 'feedback count': 419,
57
+ extraData: null,
58
+ },
59
+ {
60
+ date: '2009',
61
+ overlay: 0.13,
62
+ 'feedback count': 266,
63
+ extraData: null,
64
+ },
65
+ {
66
+ date: '2010',
67
+ overlay: 0.15,
68
+ 'feedback count': 273,
69
+ extraData: null,
70
+ },
71
+ {
72
+ date: '2011',
73
+ overlay: 0.21,
74
+ 'feedback count': 491,
75
+ extraData: null,
76
+ },
77
+ {
78
+ date: '2012',
79
+ overlay: 0.22,
80
+ 'feedback count': 558,
81
+ extraData: null,
82
+ },
83
+ {
84
+ date: '2013',
85
+ overlay: 0.11,
86
+ 'feedback count': 2414,
87
+ extraData: null,
88
+ },
89
+ {
90
+ date: '2014',
91
+ overlay: 0.12,
92
+ 'feedback count': 8031,
93
+ extraData: null,
94
+ },
95
+ {
96
+ date: '2015',
97
+ overlay: 0.17,
98
+ 'feedback count': 9196,
99
+ extraData: null,
100
+ },
101
+ {
102
+ date: '2016',
103
+ overlay: 0.14,
104
+ 'feedback count': 5869,
105
+ extraData: null,
106
+ },
107
+ {
108
+ date: '2017',
109
+ overlay: 0.24,
110
+ 'feedback count': 8786,
111
+ extraData: null,
112
+ },
113
+ {
114
+ date: '2018',
115
+ overlay: 0.32,
116
+ 'feedback count': 4182,
117
+ extraData: null,
118
+ },
119
+ {
120
+ date: '2019',
121
+ overlay: 0.31,
122
+ 'feedback count': 8303,
123
+ extraData: null,
124
+ },
125
+ {
126
+ date: '2020',
127
+ overlay: 0.44,
128
+ 'feedback count': 11490,
129
+ extraData: null,
130
+ },
131
+ {
132
+ date: '2021',
133
+ overlay: 0.53,
134
+ 'feedback count': 5539,
135
+ extraData: null,
136
+ },
137
+ {
138
+ date: '2022',
139
+ overlay: 0.75,
140
+ 'feedback count': 2952,
141
+ extraData: null,
142
+ },
143
+ {
144
+ date: '2023',
145
+ overlay: 0.74,
146
+ 'feedback count': 1746,
147
+ extraData: null,
148
+ },
149
+ ];
150
+ export const feedbackCountGaps = [
151
+ {
152
+ date: '2002',
153
+ overlay: 0.1,
154
+ 'feedback count': 16,
155
+ extraData: null,
156
+ },
157
+ {
158
+ date: '2003',
159
+ overlay: 0.11,
160
+ 'feedback count': 30,
161
+ extraData: null,
162
+ },
163
+ {
164
+ date: '2004',
165
+ overlay: 0.14,
166
+ 'feedback count': 20,
167
+ extraData: null,
168
+ },
169
+ {
170
+ date: '2005',
171
+ overlay: 0.13,
172
+ 'feedback count': 52,
173
+ extraData: null,
174
+ },
175
+ {
176
+ date: '2006',
177
+ overlay: 0.14,
178
+ 'feedback count': 131,
179
+ extraData: null,
180
+ },
181
+ {
182
+ date: '2007',
183
+ overlay: 0.18,
184
+ 'feedback count': 462,
185
+ extraData: null,
186
+ },
187
+ {
188
+ date: '2008',
189
+ overlay: 0.16,
190
+ 'feedback count': 419,
191
+ extraData: null,
192
+ },
193
+ {
194
+ date: '2009',
195
+ overlay: 0.13,
196
+ 'feedback count': null,
197
+ extraData: null,
198
+ },
199
+ {
200
+ date: '2010',
201
+ overlay: 0.15,
202
+ 'feedback count': null,
203
+ extraData: null,
204
+ },
205
+ {
206
+ date: '2011',
207
+ overlay: 0.21,
208
+ 'feedback count': null,
209
+ extraData: null,
210
+ },
211
+ {
212
+ date: '2012',
213
+ overlay: null,
214
+ 'feedback count': null,
215
+ extraData: null,
216
+ },
217
+ {
218
+ date: '2013',
219
+ overlay: null,
220
+ 'feedback count': 2414,
221
+ extraData: null,
222
+ },
223
+ {
224
+ date: '2014',
225
+ overlay: null,
226
+ 'feedback count': 8031,
227
+ extraData: null,
228
+ },
229
+ {
230
+ date: '2015',
231
+ overlay: null,
232
+ 'feedback count': 9196,
233
+ extraData: null,
234
+ },
235
+ {
236
+ date: '2016',
237
+ overlay: 0.14,
238
+ 'feedback count': 5869,
239
+ extraData: null,
240
+ },
241
+ {
242
+ date: '2017',
243
+ overlay: 0.24,
244
+ 'feedback count': 8786,
245
+ extraData: null,
246
+ },
247
+ {
248
+ date: '2018',
249
+ overlay: 0.32,
250
+ 'feedback count': 4182,
251
+ extraData: null,
252
+ },
253
+ {
254
+ date: '2019',
255
+ overlay: 0.31,
256
+ 'feedback count': null,
257
+ extraData: null,
258
+ },
259
+ {
260
+ date: '2020',
261
+ overlay: 0.44,
262
+ 'feedback count': null,
263
+ extraData: null,
264
+ },
265
+ {
266
+ date: '2021',
267
+ overlay: null,
268
+ 'feedback count': null,
269
+ extraData: null,
270
+ },
271
+ {
272
+ date: '2022',
273
+ overlay: 0.75,
274
+ 'feedback count': 2952,
275
+ extraData: null,
276
+ },
277
+ {
278
+ date: '2023',
279
+ overlay: 0.74,
280
+ 'feedback count': 1746,
281
+ extraData: null,
282
+ },
283
+ ];
@@ -0,0 +1,4 @@
1
+ export * from './channels';
2
+ export * from './feedbackCount';
3
+ export * from './prosCons';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/index.ts"],"names":[],"mappings":"AAgBA,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Copyright 2023 Wonderflow Design Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export * from './channels';
17
+ export * from './feedbackCount';
18
+ export * from './prosCons';
@@ -0,0 +1,7 @@
1
+ export declare const proCons: {
2
+ date: string;
3
+ positive: number;
4
+ neutral: number;
5
+ negative: number;
6
+ }[];
7
+ //# sourceMappingURL=prosCons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prosCons.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/mock-data/prosCons.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO;;;;;GAmEnB,CAAC"}
@@ -0,0 +1,83 @@
1
+ /*
2
+ * Copyright 2023 Wonderflow Design Team
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export const proCons = [
17
+ {
18
+ date: '2013',
19
+ positive: 1,
20
+ neutral: 2,
21
+ negative: 1,
22
+ },
23
+ {
24
+ date: '2014',
25
+ positive: 8,
26
+ neutral: 2,
27
+ negative: 17,
28
+ },
29
+ {
30
+ date: '2015',
31
+ positive: 17,
32
+ neutral: 12,
33
+ negative: 33,
34
+ },
35
+ {
36
+ date: '2016',
37
+ positive: 30,
38
+ neutral: 7,
39
+ negative: 48,
40
+ },
41
+ {
42
+ date: '2017',
43
+ positive: 55,
44
+ neutral: 23,
45
+ negative: 92,
46
+ },
47
+ {
48
+ date: '2018',
49
+ positive: 53,
50
+ neutral: 31,
51
+ negative: 108,
52
+ },
53
+ {
54
+ date: '2019',
55
+ positive: 52,
56
+ neutral: 18,
57
+ negative: 112,
58
+ },
59
+ {
60
+ date: '2020',
61
+ positive: 79,
62
+ neutral: 5,
63
+ negative: 111,
64
+ },
65
+ {
66
+ date: '2021',
67
+ positive: 54,
68
+ neutral: 24,
69
+ negative: 77,
70
+ },
71
+ {
72
+ date: '2022',
73
+ positive: 24,
74
+ neutral: 6,
75
+ negative: 62,
76
+ },
77
+ {
78
+ date: '2023',
79
+ positive: 24,
80
+ neutral: 11,
81
+ negative: 34,
82
+ },
83
+ ];
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, ComponentStory } from '@storybook/react';
3
+ import { CartesianBase } from '@wonderflow/charts';
4
+ declare const story: ComponentMeta<typeof CartesianBase>;
5
+ export default story;
6
+ export declare const Default: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
7
+ export declare const TwoAxis: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
8
+ export declare const WithLegend: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
9
+ export declare const WithCustomEmptyState: ComponentStory<import("react").FC<import("@wonderflow/charts").CartesianBaseProps>>;
10
+ //# sourceMappingURL=cartesian-base.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartesian-base.stories.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/storybook/cartesian-base.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOnD,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,aAAa,CAmE9C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,qFAAoB,CAAC;AAGzC,eAAO,MAAM,OAAO,qFAAoB,CAAC;AAiCzC,eAAO,MAAM,UAAU,qFAAoB,CAAC;AAG5C,eAAO,MAAM,oBAAoB,qFAAoB,CAAC"}
@@ -0,0 +1,114 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CartesianBase } from '@wonderflow/charts';
3
+ import { InfoState, Stack } from '../../..';
4
+ // import { CartesianBase } from '../../../../../charts/src';
5
+ import styles from './sb-charts.module.css';
6
+ const story = {
7
+ title: 'Charts/Cartesian Base',
8
+ component: CartesianBase,
9
+ args: {
10
+ title: 'Chart Title',
11
+ subtitle: 'Subtitle text',
12
+ isLoading: false,
13
+ preventResponsive: false,
14
+ grid: {
15
+ tickColumns: 10,
16
+ tickRows: 10,
17
+ },
18
+ axis: {
19
+ top: {
20
+ domain: [
21
+ 'ALabelThatExceedTwentyCharacters',
22
+ 'BLabelThatExceedTwentyCharacters',
23
+ 'CLabelThatExceedTwentyCharacters',
24
+ 'DLabelThatExceedTwentyCharacters',
25
+ 'ELabelThatExceedTwentyCharacters',
26
+ 'FLabelThatExceedTwentyCharacters',
27
+ ],
28
+ orientation: 'top',
29
+ scaleType: 'label',
30
+ label: 'Top Label',
31
+ paddingOuter: 0,
32
+ paddingInner: 1,
33
+ tickFormat: (v, i) => (`Prefix${i} + ${v} + Suffix`),
34
+ hideAxisLine: false,
35
+ hideTickLabel: false,
36
+ hideTicks: false,
37
+ },
38
+ right: {
39
+ domain: [0, 0.010],
40
+ orientation: 'right',
41
+ scaleType: 'linear',
42
+ label: 'Right Label',
43
+ tickFormat: (v) => `${JSON.stringify(v)} $`,
44
+ hideAxisLine: false,
45
+ hideTickLabel: false,
46
+ hideTicks: false,
47
+ },
48
+ bottom: {
49
+ domain: [new Date('2020-01-01').getTime(), new Date('2022-01-01').getTime()],
50
+ orientation: 'bottom',
51
+ label: 'Bottom Label',
52
+ scaleType: 'time',
53
+ hideAxisLine: false,
54
+ hideTickLabel: false,
55
+ hideTicks: false,
56
+ },
57
+ left: {
58
+ domain: [0, 10000],
59
+ orientation: 'left',
60
+ scaleType: 'linear',
61
+ label: 'Left Label',
62
+ hideAxisLine: false,
63
+ hideTickLabel: false,
64
+ hideTicks: false,
65
+ },
66
+ },
67
+ styleConfig: {},
68
+ children: undefined,
69
+ },
70
+ argTypes: {},
71
+ };
72
+ export default story;
73
+ const Template = args => _jsx(CartesianBase, { ...args });
74
+ export const Default = Template.bind({});
75
+ Default.args = {};
76
+ export const TwoAxis = Template.bind({});
77
+ TwoAxis.args = {
78
+ grid: {
79
+ hideColumns: true,
80
+ tickColumns: 10,
81
+ tickRows: 5,
82
+ otherProps: {
83
+ strokeDasharray: '3 2',
84
+ },
85
+ },
86
+ axis: {
87
+ top: undefined,
88
+ right: undefined,
89
+ bottom: {
90
+ domain: [new Date('2020-01-01').getTime(), new Date('2020-01-10').getTime()],
91
+ orientation: 'bottom',
92
+ label: 'Time',
93
+ scaleType: 'time',
94
+ numTicks: 10,
95
+ },
96
+ left: {
97
+ domain: [0, 1000],
98
+ orientation: 'left',
99
+ scaleType: 'linear',
100
+ label: 'Quantity',
101
+ hideAxisLine: true,
102
+ hideTicks: true,
103
+ hideZero: true,
104
+ numTicks: 10,
105
+ },
106
+ },
107
+ };
108
+ export const WithLegend = Template.bind({});
109
+ WithLegend.args = { customLegend: _jsx("ul", { children: _jsx("li", { style: { fontSize: '12px' }, children: "some legend content here" }) }) };
110
+ export const WithCustomEmptyState = Template.bind({});
111
+ WithCustomEmptyState.args = {
112
+ axis: { ...story.args.axis, top: undefined, right: undefined },
113
+ emptyState: (_jsx(Stack, { vAlign: "center", hAlign: "center", className: styles.InfoState, children: _jsx(InfoState, { title: "With Info State", icon: "compass", children: _jsx(Stack, { hAlign: "center", fill: false, children: "This custom empty state uses an Info State component." }) }) })),
114
+ };
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ComponentMeta, ComponentStory } from '@storybook/react';
3
+ import { LineChart, LineChartProps } from '@wonderflow/charts';
4
+ declare const story: ComponentMeta<typeof LineChart>;
5
+ export default story;
6
+ export declare const Default: ComponentStory<import("react").FC<LineChartProps>>;
7
+ export declare const withOverlay: ComponentStory<import("react").FC<LineChartProps>>;
8
+ export declare const withMissingData: ComponentStory<import("react").FC<LineChartProps>>;
9
+ export declare const withMultipleSeries: ComponentStory<import("react").FC<LineChartProps>>;
10
+ export declare const withLabelIndex: ComponentStory<import("react").FC<LineChartProps>>;
11
+ export declare const withNestedData: ComponentStory<import("react").FC<LineChartProps>>;
12
+ export declare const withCustomLineStyle: ComponentStory<import("react").FC<LineChartProps>>;
13
+ export declare const withCustomDomain: ComponentStory<import("react").FC<LineChartProps>>;
14
+ export declare const withVerticalLayout: ComponentStory<import("react").FC<LineChartProps>>;
15
+ export declare const withNoData: ComponentStory<import("react").FC<LineChartProps>>;
16
+ export declare const renderAsLines: ComponentStory<import("react").FC<LineChartProps>>;
17
+ export declare const renderAsSteps: ComponentStory<import("react").FC<LineChartProps>>;
18
+ export declare const WithinCard: ComponentStory<import("react").FC<LineChartProps>>;
19
+ //# sourceMappingURL=line-chart.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"line-chart.stories.d.ts","sourceRoot":"","sources":["../../../../src/examples/charts/storybook/line-chart.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAwB,SAAS,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUrF,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,SAAS,CAyC1C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,oDAAoB,CAAC;AAGzC,eAAO,MAAM,WAAW,oDAAoB,CAAC;AAS7C,eAAO,MAAM,eAAe,oDAAoB,CAAC;AAUjD,eAAO,MAAM,kBAAkB,oDAAoB,CAAC;AAiBpD,eAAO,MAAM,cAAc,oDAAoB,CAAC;AAehD,eAAO,MAAM,cAAc,oDAAoB,CAAC;AAgChD,eAAO,MAAM,mBAAmB,oDAAoB,CAAC;AA8BrD,eAAO,MAAM,gBAAgB,oDAAoB,CAAC;AAclD,eAAO,MAAM,kBAAkB,oDAAoB,CAAC;AAiBpD,eAAO,MAAM,UAAU,oDAAoB,CAAC;AAQ5C,eAAO,MAAM,aAAa,oDAAoB,CAAC;AAiB/C,eAAO,MAAM,aAAa,oDAAoB,CAAC;AA0B/C,eAAO,MAAM,UAAU,oDAA8B,CAAC"}
@@ -0,0 +1,233 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CartesianChartLayout, LineChart } from '@wonderflow/charts';
3
+ import { Card } from '../../..';
4
+ // import { CartesianChartLayout, LineChart, LineChartProps } from '../../../../../charts/src';
5
+ import { channels, channelsB, feedbackCount, feedbackCountGaps, proCons, } from '../mock-data';
6
+ import styles from './sb-charts.module.css';
7
+ const story = {
8
+ title: 'Charts/Line Chart',
9
+ component: LineChart,
10
+ args: {
11
+ title: 'Line Charts',
12
+ subtitle: 'A trend line chart',
13
+ preventResponsive: false,
14
+ isLoading: false,
15
+ showMarker: false,
16
+ showMarkerLabel: false,
17
+ hideMissingDataConnection: false,
18
+ hideLegend: false,
19
+ hidePadding: false,
20
+ layout: CartesianChartLayout.HORIZONTAL,
21
+ renderAs: 'curves',
22
+ theme: 'light',
23
+ data: feedbackCount,
24
+ index: {
25
+ dataKey: 'date',
26
+ label: 'Year',
27
+ },
28
+ series: {
29
+ dataKey: ['feedback count'],
30
+ label: 'Feedback Count',
31
+ },
32
+ overlay: undefined,
33
+ },
34
+ argTypes: {
35
+ layout: {
36
+ options: ['horizontal', 'vertical'],
37
+ control: { type: 'radio' },
38
+ },
39
+ renderAs: {
40
+ options: ['curves', 'lines', 'steps'],
41
+ control: { type: 'radio' },
42
+ },
43
+ theme: {
44
+ options: ['light', 'dark'],
45
+ control: { type: 'radio' },
46
+ },
47
+ },
48
+ };
49
+ export default story;
50
+ const Template = (args) => _jsx(LineChart, { ...args });
51
+ export const Default = Template.bind({});
52
+ Default.args = {};
53
+ export const withOverlay = Template.bind({});
54
+ withOverlay.args = {
55
+ subtitle: 'A trend line chart with overlay',
56
+ overlay: {
57
+ dataKey: 'overlay',
58
+ label: 'Overlay',
59
+ },
60
+ };
61
+ export const withMissingData = Template.bind({});
62
+ withMissingData.args = {
63
+ data: feedbackCountGaps,
64
+ subtitle: 'A trend line chart with null values',
65
+ overlay: {
66
+ dataKey: 'overlay',
67
+ label: 'Overlay',
68
+ },
69
+ };
70
+ export const withMultipleSeries = Template.bind({});
71
+ withMultipleSeries.args = {
72
+ title: 'Multiple Series',
73
+ subtitle: 'A trend line chart with multiple series',
74
+ data: proCons,
75
+ index: {
76
+ dataKey: 'date',
77
+ label: 'Time',
78
+ },
79
+ series: {
80
+ domain: [0, 200],
81
+ dataKey: ['positive', 'negative', 'neutral'],
82
+ label: 'Pros & cons',
83
+ style: [undefined, undefined, { stroke: 'gray' }],
84
+ },
85
+ };
86
+ export const withLabelIndex = Template.bind({});
87
+ withLabelIndex.args = {
88
+ title: 'Multiple Series',
89
+ subtitle: 'A line chart with label index',
90
+ data: channels,
91
+ index: {
92
+ dataKey: 'channel',
93
+ label: 'Channels',
94
+ },
95
+ series: {
96
+ dataKey: ['1 star', '2 stars', '3 stars', '4 stars', '5 stars'],
97
+ label: 'Feedback count',
98
+ },
99
+ };
100
+ export const withNestedData = Template.bind({});
101
+ withNestedData.args = {
102
+ title: 'Multiple Series',
103
+ subtitle: 'A line chart rendered from nested data',
104
+ data: channelsB,
105
+ index: {
106
+ dataKey: 'channel',
107
+ label: 'Channels',
108
+ },
109
+ series: {
110
+ dataKey: ['1 star.value', '2 stars.value', '3 stars.value', '4 stars.value', '5 stars.value'],
111
+ label: 'Feedback count',
112
+ rename: (_, i) => Array(i + 1).fill('⭐').join(),
113
+ },
114
+ overlay: {
115
+ dataKey: 'overlay.value',
116
+ label: 'TGW',
117
+ domain: [0, 5],
118
+ style: {
119
+ strokeDasharray: '2 4',
120
+ },
121
+ },
122
+ tooltip: {
123
+ extraSeriesData: series => `${series.percentage}%`,
124
+ extraOverlayData: overlay => `${overlay.percentage}%`,
125
+ extraContent: _jsx("div", { children: "some extra content" }),
126
+ },
127
+ renderAs: 'lines',
128
+ layout: CartesianChartLayout.VERTICAL,
129
+ showMarker: true,
130
+ };
131
+ export const withCustomLineStyle = Template.bind({});
132
+ withCustomLineStyle.args = {
133
+ title: 'Multiple Series',
134
+ subtitle: 'A trend line chart with multiple series',
135
+ data: proCons,
136
+ index: {
137
+ dataKey: 'date',
138
+ label: 'Time',
139
+ },
140
+ series: {
141
+ dataKey: ['positive', 'negative', 'neutral'],
142
+ label: 'Pros & cons',
143
+ style: [
144
+ undefined,
145
+ {
146
+ stroke: 'red',
147
+ strokeDasharray: '6 8',
148
+ strokeOpacity: '0.5',
149
+ strokeWidth: '3',
150
+ },
151
+ {
152
+ stroke: 'grey',
153
+ strokeDasharray: '2 4',
154
+ strokeOpacity: '0.8',
155
+ strokeWidth: '1.5',
156
+ },
157
+ ],
158
+ },
159
+ };
160
+ export const withCustomDomain = Template.bind({});
161
+ withCustomDomain.args = {
162
+ subtitle: 'A trend line chart with custom domain',
163
+ series: {
164
+ dataKey: ['feedback count'],
165
+ label: 'Feedback Count',
166
+ domain: [-12000, 12000],
167
+ },
168
+ index: {
169
+ dataKey: 'date',
170
+ label: 'Year',
171
+ },
172
+ };
173
+ export const withVerticalLayout = Template.bind({});
174
+ withVerticalLayout.args = {
175
+ layout: CartesianChartLayout.VERTICAL,
176
+ overlay: {
177
+ dataKey: 'overlay',
178
+ label: 'Overlay',
179
+ },
180
+ index: {
181
+ dataKey: 'date',
182
+ label: 'Year',
183
+ },
184
+ series: {
185
+ dataKey: ['feedback count'],
186
+ label: 'Feedback Count',
187
+ },
188
+ };
189
+ export const withNoData = Template.bind({});
190
+ withNoData.args = {
191
+ data: [],
192
+ title: 'Line Charts',
193
+ subtitle: 'A trend line chart w/o data',
194
+ emptyStateMessage: 'Please select items from the right menu to render the chart.',
195
+ };
196
+ export const renderAsLines = Template.bind({});
197
+ renderAsLines.args = {
198
+ title: 'Multiple Series',
199
+ subtitle: 'A trend line chart rendered with lines',
200
+ data: proCons,
201
+ renderAs: 'lines',
202
+ index: {
203
+ dataKey: 'date',
204
+ label: 'Time',
205
+ },
206
+ series: {
207
+ domain: [0, 200],
208
+ dataKey: ['positive', 'negative'],
209
+ label: 'Pros & cons',
210
+ },
211
+ };
212
+ export const renderAsSteps = Template.bind({});
213
+ renderAsSteps.args = {
214
+ title: 'Multiple Series',
215
+ subtitle: 'A trend line chart rendered with steps',
216
+ data: proCons,
217
+ renderAs: 'steps',
218
+ index: {
219
+ dataKey: 'date',
220
+ label: 'Time',
221
+ },
222
+ series: {
223
+ domain: [0, 200],
224
+ dataKey: ['positive', 'negative'],
225
+ label: 'Pros & cons',
226
+ },
227
+ };
228
+ const WithinCardTemplate = args => (_jsx(Card, { bordered: true, className: styles.Card, children: _jsx(LineChart, { ...args }) }));
229
+ export const WithinCard = WithinCardTemplate.bind({});
230
+ WithinCard.args = {
231
+ subtitle: 'A trend line chart within a card 75vh and width 100%',
232
+ hidePadding: true,
233
+ };
@@ -0,0 +1 @@
1
+ .Card{div & [data-inner-element=Content]{height:75vh;overflow:hidden;width:100%}}.InfoState{transform:translateY(50%)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "12.7.0",
3
+ "version": "12.8.0",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "Apache-2.0",
@@ -78,12 +78,15 @@
78
78
  "@storybook/test-runner": "0.9.4",
79
79
  "@storybook/testing-react": "1.3.0",
80
80
  "@storybook/theming": "6.5.16",
81
+ "@types/d3": "7.4.1",
81
82
  "@types/react": "17.0.43",
82
83
  "@types/react-dom": "17.0.14",
83
84
  "@types/react-table": "7.7.12",
84
85
  "@types/react-test-renderer": "18.0.0",
85
- "@wonderflow/config": "12.7.0",
86
- "@wonderflow/tokens": "12.7.0",
86
+ "@wonderflow/config": "12.8.0",
87
+ "@wonderflow/tokens": "12.8.0",
88
+ "@wonderflow/charts": "12.8.0",
89
+ "@types/uuid": "9.0.2",
87
90
  "babel-loader": "8.2.5",
88
91
  "cpy-cli": "3.1.1",
89
92
  "postcss": "8.4.17",
@@ -100,10 +103,26 @@
100
103
  },
101
104
  "dependencies": {
102
105
  "@radix-ui/react-tabs": "1.0.0",
106
+ "@visx/annotation": "3.3.0",
107
+ "@visx/axis": "3.3.0",
108
+ "@visx/curve": "3.3.0",
109
+ "@visx/event": "3.3.0",
110
+ "@visx/gradient": "3.3.0",
111
+ "@visx/grid": "3.3.0",
112
+ "@visx/group": "3.3.0",
113
+ "@visx/mock-data": "3.3.0",
114
+ "@visx/responsive": "3.3.0",
115
+ "@visx/scale": "3.3.0",
116
+ "@visx/shape": "3.3.0",
117
+ "@visx/text": "3.3.0",
118
+ "@visx/tooltip": "3.3.0",
119
+ "@visx/vendor": "3.3.0",
103
120
  "ahooks": "3.7.5",
104
121
  "clsx": "1.2.1",
105
122
  "constate": "3.3.2",
123
+ "d3": "7.8.5",
106
124
  "framer-motion": "6.5.1",
125
+ "lodash": "4.17.21",
107
126
  "react-focus-on": "3.6.0",
108
127
  "react-masonry-css": "1.0.16",
109
128
  "react-merge-refs": "2.0.1",
@@ -113,6 +132,7 @@
113
132
  "react-table": "7.8.0",
114
133
  "react-uid": "2.3.2",
115
134
  "slugify": "1.6.5",
116
- "type-fest": "3.0.0"
135
+ "type-fest": "3.0.0",
136
+ "uuid": "9.0.0"
117
137
  }
118
138
  }