@fragment-build/ui 1.2.3 → 1.4.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.
Files changed (48) hide show
  1. package/dist/components/base/Breadcrumbs.js +1 -1
  2. package/dist/components/base/Breadcrumbs.js.map +1 -1
  3. package/dist/components/base/Button.d.ts +1 -0
  4. package/dist/components/base/Button.js +2 -1
  5. package/dist/components/base/Button.js.map +1 -1
  6. package/dist/components/base/Navbar.js +1 -1
  7. package/dist/components/base/Navbar.js.map +1 -1
  8. package/dist/components/chart/Chart.d.ts +1 -1
  9. package/dist/components/chart/Chart.js +9 -3
  10. package/dist/components/chart/Chart.js.map +1 -1
  11. package/dist/components/chart/Chart.stories.d.ts +6 -0
  12. package/dist/components/chart/Chart.stories.js +167 -1
  13. package/dist/components/chart/Chart.stories.js.map +1 -1
  14. package/dist/components/color-input/ColorInput.d.ts +1 -2
  15. package/dist/components/color-input/ColorInput.js +9 -4
  16. package/dist/components/color-input/ColorInput.js.map +1 -1
  17. package/dist/components/grid/Grid.d.ts +9 -0
  18. package/dist/components/grid/Grid.js +28 -0
  19. package/dist/components/grid/Grid.js.map +1 -0
  20. package/dist/components/grid/Grid.stories.d.ts +8 -0
  21. package/dist/components/grid/Grid.stories.js +29 -0
  22. package/dist/components/grid/Grid.stories.js.map +1 -0
  23. package/dist/components/index.d.ts +2 -0
  24. package/dist/components/index.js +2 -0
  25. package/dist/components/index.js.map +1 -1
  26. package/dist/components/multi-switch/MultiSwitch.d.ts +10 -0
  27. package/dist/components/multi-switch/MultiSwitch.js +31 -0
  28. package/dist/components/multi-switch/MultiSwitch.js.map +1 -0
  29. package/dist/components/multi-switch/MultiSwitch.stories.d.ts +8 -0
  30. package/dist/components/multi-switch/MultiSwitch.stories.js +28 -0
  31. package/dist/components/multi-switch/MultiSwitch.stories.js.map +1 -0
  32. package/dist/context.d.ts +6 -6
  33. package/dist/context.js +376 -2
  34. package/dist/context.js.map +1 -1
  35. package/dist/fragments/form/FormSection.js +4 -7
  36. package/dist/fragments/form/FormSection.js.map +1 -1
  37. package/dist/fragments/shell/Shell.js +1 -1
  38. package/dist/fragments/shell/Shell.js.map +1 -1
  39. package/dist/fragments/shell/Shell.stories.js +142 -3
  40. package/dist/fragments/shell/Shell.stories.js.map +1 -1
  41. package/dist/fragments/widget/Widget.d.ts +1 -0
  42. package/dist/fragments/widget/Widget.js +21 -3
  43. package/dist/fragments/widget/Widget.js.map +1 -1
  44. package/dist/tailwind.plugin.js +34 -7
  45. package/dist/tailwind.plugin.js.map +1 -1
  46. package/dist/withFragment.js +3 -4
  47. package/dist/withFragment.js.map +1 -1
  48. package/package.json +16 -16
package/dist/context.js CHANGED
@@ -12,10 +12,75 @@ export const defaultContext = {
12
12
  radius: 'full',
13
13
  },
14
14
  },
15
+ multiSwitch: {
16
+ variant: 'flat',
17
+ },
15
18
  chart: {
19
+ area: {
20
+ options: {
21
+ chart: {
22
+ height: "100%",
23
+ width: "100%",
24
+ type: "area",
25
+ fontFamily: "Inter, sans-serif",
26
+ dropShadow: {
27
+ enabled: false,
28
+ },
29
+ toolbar: {
30
+ show: false,
31
+ },
32
+ zoom: {
33
+ enabled: false,
34
+ },
35
+ },
36
+ tooltip: {
37
+ theme: 'dark',
38
+ enabled: true,
39
+ x: {
40
+ show: false,
41
+ },
42
+ },
43
+ fill: {
44
+ type: "gradient",
45
+ gradient: {
46
+ opacityFrom: 0.55,
47
+ opacityTo: 0,
48
+ shade: "#1C64F2",
49
+ gradientToColors: ["#1C64F2"],
50
+ },
51
+ },
52
+ dataLabels: {
53
+ enabled: false,
54
+ },
55
+ stroke: {
56
+ width: 3,
57
+ },
58
+ grid: {
59
+ show: false,
60
+ strokeDashArray: 4,
61
+ padding: {
62
+ left: 2,
63
+ right: 2,
64
+ top: 0
65
+ },
66
+ },
67
+ xaxis: {
68
+ labels: {
69
+ show: false,
70
+ },
71
+ axisBorder: {
72
+ show: false,
73
+ },
74
+ axisTicks: {
75
+ show: false,
76
+ },
77
+ },
78
+ yaxis: {
79
+ show: false,
80
+ },
81
+ },
82
+ },
16
83
  line: {
17
- width: '100%',
18
- height: '100%',
19
84
  options: {
20
85
  chart: {
21
86
  type: 'line',
@@ -31,6 +96,9 @@ export const defaultContext = {
31
96
  animations: {
32
97
  enabled: false
33
98
  },
99
+ zoom: {
100
+ enabled: false,
101
+ },
34
102
  },
35
103
  tooltip: {
36
104
  theme: 'dark',
@@ -80,6 +148,312 @@ export const defaultContext = {
80
148
  },
81
149
  },
82
150
  },
151
+ column: {
152
+ options: {
153
+ chart: {
154
+ type: "bar",
155
+ fontFamily: "Inter, sans-serif",
156
+ toolbar: {
157
+ show: false,
158
+ },
159
+ },
160
+ plotOptions: {
161
+ bar: {
162
+ horizontal: false,
163
+ columnWidth: "70%",
164
+ borderRadiusApplication: "end",
165
+ borderRadius: 8,
166
+ },
167
+ },
168
+ tooltip: {
169
+ theme: 'dark',
170
+ shared: true,
171
+ intersect: false,
172
+ style: {
173
+ fontFamily: "Inter, sans-serif",
174
+ },
175
+ },
176
+ states: {
177
+ hover: {
178
+ filter: {
179
+ type: "darken",
180
+ value: 1,
181
+ },
182
+ },
183
+ },
184
+ grid: {
185
+ show: false,
186
+ strokeDashArray: 4,
187
+ padding: {
188
+ left: 2,
189
+ right: 2,
190
+ top: -14
191
+ },
192
+ },
193
+ dataLabels: {
194
+ enabled: false,
195
+ },
196
+ legend: {
197
+ show: false,
198
+ },
199
+ xaxis: {
200
+ floating: false,
201
+ labels: {
202
+ show: true,
203
+ style: {
204
+ fontFamily: "Inter, sans-serif",
205
+ cssClass: 'text-xs font-normal fill-gray-500 dark:fill-gray-400'
206
+ }
207
+ },
208
+ axisBorder: {
209
+ show: false,
210
+ },
211
+ axisTicks: {
212
+ show: false,
213
+ },
214
+ },
215
+ yaxis: {
216
+ show: false,
217
+ },
218
+ fill: {
219
+ opacity: 1,
220
+ },
221
+ },
222
+ },
223
+ bar: {
224
+ options: {
225
+ chart: {
226
+ sparkline: {
227
+ enabled: false,
228
+ },
229
+ type: "bar",
230
+ width: "100%",
231
+ height: 400,
232
+ toolbar: {
233
+ show: false,
234
+ }
235
+ },
236
+ fill: {
237
+ opacity: 1,
238
+ },
239
+ plotOptions: {
240
+ bar: {
241
+ horizontal: true,
242
+ columnWidth: "100%",
243
+ borderRadiusApplication: "end",
244
+ borderRadius: 6,
245
+ dataLabels: {
246
+ position: "top",
247
+ },
248
+ },
249
+ },
250
+ legend: {
251
+ show: true,
252
+ position: "bottom",
253
+ },
254
+ dataLabels: {
255
+ enabled: false,
256
+ },
257
+ tooltip: {
258
+ theme: 'dark',
259
+ shared: true,
260
+ intersect: false,
261
+ },
262
+ xaxis: {
263
+ labels: {
264
+ show: true,
265
+ style: {
266
+ fontFamily: "Inter, sans-serif",
267
+ },
268
+ formatter: function (value) {
269
+ return "$" + value;
270
+ }
271
+ },
272
+ categories: ["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
273
+ axisTicks: {
274
+ show: false,
275
+ },
276
+ axisBorder: {
277
+ show: false,
278
+ },
279
+ },
280
+ yaxis: {
281
+ labels: {
282
+ show: true,
283
+ style: {
284
+ fontFamily: "Inter, sans-serif",
285
+ }
286
+ }
287
+ },
288
+ grid: {
289
+ show: true,
290
+ strokeDashArray: 4,
291
+ padding: {
292
+ left: 2,
293
+ right: 2,
294
+ top: -20
295
+ },
296
+ }
297
+ },
298
+ },
299
+ pie: {
300
+ options: {
301
+ chart: {
302
+ height: "100%",
303
+ width: "100%",
304
+ type: "pie",
305
+ },
306
+ stroke: {
307
+ width: 5,
308
+ },
309
+ plotOptions: {
310
+ pie: {
311
+ expandOnClick: false,
312
+ dataLabels: {
313
+ offset: -25,
314
+ }
315
+ },
316
+ },
317
+ dataLabels: {
318
+ enabled: true,
319
+ style: {
320
+ fontFamily: "Inter, sans-serif",
321
+ },
322
+ background: {
323
+ enabled: true,
324
+ padding: 10,
325
+ borderWidth: 0,
326
+ borderRadius: 5,
327
+ dropShadow: {
328
+ enabled: true,
329
+ }
330
+ },
331
+ dropShadow: {
332
+ enabled: false,
333
+ }
334
+ },
335
+ legend: {
336
+ position: "bottom",
337
+ fontFamily: "Inter, sans-serif",
338
+ },
339
+ xaxis: {
340
+ axisTicks: {
341
+ show: false,
342
+ },
343
+ axisBorder: {
344
+ show: false,
345
+ },
346
+ },
347
+ },
348
+ },
349
+ donut: {
350
+ options: {
351
+ chart: {
352
+ height: "100%",
353
+ width: "100%",
354
+ type: "donut",
355
+ },
356
+ stroke: {
357
+ width: 5,
358
+ },
359
+ plotOptions: {
360
+ pie: {
361
+ donut: {
362
+ labels: {
363
+ show: true,
364
+ name: {
365
+ show: true,
366
+ fontFamily: "Inter, sans-serif",
367
+ offsetY: 20,
368
+ },
369
+ total: {
370
+ showAlways: true,
371
+ show: true,
372
+ fontFamily: "Inter, sans-serif",
373
+ },
374
+ value: {
375
+ show: true,
376
+ fontFamily: "Inter, sans-serif",
377
+ offsetY: -20,
378
+ },
379
+ },
380
+ size: "80%",
381
+ },
382
+ },
383
+ },
384
+ grid: {
385
+ padding: {
386
+ top: -2,
387
+ },
388
+ },
389
+ dataLabels: {
390
+ enabled: false,
391
+ },
392
+ legend: {
393
+ position: "bottom",
394
+ fontFamily: "Inter, sans-serif",
395
+ },
396
+ xaxis: {
397
+ axisTicks: {
398
+ show: false,
399
+ },
400
+ axisBorder: {
401
+ show: false,
402
+ },
403
+ },
404
+ },
405
+ },
406
+ radial: {
407
+ options: {
408
+ chart: {
409
+ height: "100%",
410
+ width: "100%",
411
+ type: "radialBar",
412
+ sparkline: {
413
+ enabled: true,
414
+ },
415
+ },
416
+ stroke: {
417
+ lineCap: 'round',
418
+ },
419
+ plotOptions: {
420
+ radialBar: {
421
+ dataLabels: {
422
+ show: false,
423
+ },
424
+ hollow: {
425
+ margin: 0,
426
+ size: "32%",
427
+ }
428
+ },
429
+ },
430
+ grid: {
431
+ show: false,
432
+ strokeDashArray: 4,
433
+ padding: {
434
+ left: 2,
435
+ right: 2,
436
+ top: -23,
437
+ bottom: -20,
438
+ },
439
+ },
440
+ legend: {
441
+ show: true,
442
+ position: "bottom",
443
+ fontFamily: "Inter, sans-serif",
444
+ },
445
+ tooltip: {
446
+ theme: 'dark',
447
+ enabled: true,
448
+ x: {
449
+ show: false,
450
+ },
451
+ },
452
+ yaxis: {
453
+ show: false,
454
+ }
455
+ },
456
+ },
83
457
  },
84
458
  },
85
459
  };
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAwFtC,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC/C,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,MAAM,EAAE,MAAM;SACf;QACD,KAAK,EAAE;YACL,aAAa,EAAE,IAAI;SACpB;QACD,IAAI,EAAE;YACJ,WAAW,EAAE;gBACX,MAAM,EAAE,MAAM;aACf;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,KAAK,EAAE;wBACL,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,MAAM;wBACb,MAAM,EAAE,MAAM;wBACd,UAAU,EAAE,mBAAmB;wBAC/B,UAAU,EAAE;4BACV,OAAO,EAAE,KAAK;yBACf;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,KAAK;yBACZ;wBACD,UAAU,EAAE;4BACV,OAAO,EAAE,KAAK;yBACf;qBACF;oBACD,OAAO,EAAE;wBACP,KAAK,EAAE,MAAM;wBACb,OAAO,EAAE,IAAI;wBACb,CAAC,EAAE;4BACD,IAAI,EAAE,KAAK;yBACZ;qBACF;oBACD,UAAU,EAAE;wBACV,OAAO,EAAE,KAAK;qBACf;oBACD,MAAM,EAAE;wBACN,KAAK,EAAE,CAAC;wBACR,KAAK,EAAE,QAAQ;qBAChB;oBACD,IAAI,EAAE;wBAC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ACD,MAAM,EAAE;wBACN,IAAI,EAAE,IAAI;wBACV,QAAQ,EAAE,QAAQ;wBAClB,UAAU,EAAE,mBAAmB;qBAChC;oBACD,OAAO,EAAE;wBACP,KAAK,EAAE,MAAM;wBACb,OAAO,EAAE,IAAI;wBACb,CAAC,EAAE;4BACD,IAAI,EAAE,KAAK;yBACZ;qBACF;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,KAAK;qBACZ;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC"}
@@ -5,7 +5,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  import { tv } from "@nextui-org/react";
6
6
  const formSection = tv({
7
7
  slots: {
8
- base: 'flex gap-4 py-6 border-t-1 border-default-100 max-w-3xl',
8
+ base: 'flex gap-4 py-6 border-t-1 border-default-100 max-w-3xl flex-col',
9
9
  content: 'flex flex-col gap-4 flex-1',
10
10
  info: 'flex-1',
11
11
  description: 'text-small text-foreground-500',
@@ -13,13 +13,10 @@ const formSection = tv({
13
13
  variants: {
14
14
  direction: {
15
15
  horizontal: {
16
- base: 'flex-row',
17
- content: 'items-end justify-center',
16
+ base: 'sm:flex-row',
17
+ content: 'sm:items-end sm:justify-center',
18
18
  },
19
- vertical: {
20
- base: 'flex-col',
21
- content: 'items-start',
22
- }
19
+ vertical: {},
23
20
  }
24
21
  },
25
22
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"FormSection.js","sourceRoot":"","sources":["../../../src/fragments/form/FormSection.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AASvC,MAAM,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,EAAE;QACL,IAAI,EAAE,yDAAyD;QAC/D,OAAO,EAAE,4BAA4B;QACrC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gCAAgC;KAC9C;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,UAAU,EAAE;gBACV,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,0BAA0B;aACpC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,aAAa;aACvB;SACF;KACF;IACD,eAAe,EAAE;QACf,SAAS,EAAE,UAAU;KACtB;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAEpF,OAAO,CACL,eAAK,SAAS,EAAE,IAAI,EAAE,aACpB,eAAK,SAAS,EAAE,IAAI,EAAE,aACpB,uBAAK,KAAK,GAAM,EAChB,YAAG,SAAS,EAAE,kBAAkB,EAAE,YAAG,WAAW,GAAK,IACjD,EACN,cAAK,SAAS,EAAE,OAAO,EAAE,YACtB,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"FormSection.js","sourceRoot":"","sources":["../../../src/fragments/form/FormSection.tsx"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AASvC,MAAM,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,EAAE;QACL,IAAI,EAAE,kEAAkE;QACxE,OAAO,EAAE,4BAA4B;QACrC,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gCAAgC;KAC9C;IACD,QAAQ,EAAE;QACR,SAAS,EAAE;YACT,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,OAAO,EAAE,gCAAgC;aAC1C;YACD,QAAQ,EAAE,EAAE;SACb;KACF;IACD,eAAe,EAAE;QACf,SAAS,EAAE,UAAU;KACtB;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpG,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAEpF,OAAO,CACL,eAAK,SAAS,EAAE,IAAI,EAAE,aACpB,eAAK,SAAS,EAAE,IAAI,EAAE,aACpB,uBAAK,KAAK,GAAM,EAChB,YAAG,SAAS,EAAE,kBAAkB,EAAE,YAAG,WAAW,GAAK,IACjD,EACN,cAAK,SAAS,EAAE,OAAO,EAAE,YACtB,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Sidebar } from '../sidebar/Sidebar';
3
3
  export const Shell = ({ sidebar, children }) => {
4
- return (_jsxs("div", { className: `flex min-h-screen`, children: [_jsx(Sidebar, { ...sidebar }), _jsx("main", { className: "flex-1 px-6 lg:px-12 xl:px-20 py-14 max-w-screen-2xl min-w-0", children: children })] }));
4
+ return (_jsxs("div", { className: "flex min-h-screen", children: [_jsx(Sidebar, { ...sidebar }), _jsx("main", { className: "flex-1 px-6 lg:px-12 xl:px-20 py-14 max-w-screen-2xl", children: children })] }));
5
5
  };
6
6
  //# sourceMappingURL=Shell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Shell.js","sourceRoot":"","sources":["../../../src/fragments/shell/Shell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,oBAAoB,CAAC;AAW3D,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,OAAO,CACL,eAAK,SAAS,EAAE,mBAAmB,aACjC,KAAC,OAAO,OAAK,OAAO,GAAI,EACxB,eAAM,SAAS,EAAC,8DAA8D,YAC3E,QAAQ,GACJ,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"Shell.js","sourceRoot":"","sources":["../../../src/fragments/shell/Shell.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,oBAAoB,CAAC;AAW3D,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;IACnE,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,OAAO,OAAK,OAAO,GAAI,EACxB,eAAM,SAAS,EAAC,sDAAsD,YACnE,QAAQ,GACJ,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { IconBox, IconBoxMultiple, IconHome, IconMessageCircle, } from "@tabler/icons-react";
3
3
  import { Shell } from "./Shell";
4
- import { Card, CardBody, Divider, Input, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tab, Tabs } from "../../components/base";
4
+ import { Card, CardBody, Divider, Input, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow, Tab, Tabs, BreadcrumbItem, Breadcrumbs, Textarea, Switch } from "../../components/base";
5
5
  import { FormSection } from "../form/FormSection";
6
6
  import { Widget } from "../widget/Widget";
7
+ import { Chart, Grid } from "../../components";
7
8
  // More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
8
9
  const meta = {
9
10
  title: "fragments/Shell",
@@ -125,13 +126,151 @@ export const Auto = {
125
126
  export const WithTable = {
126
127
  args: {
127
128
  ...Primary.args,
128
- children: (_jsxs(_Fragment, { children: [_jsx("h1", { children: "Customers" }), _jsx("p", { className: "mt-2 text-foreground-500", children: "Blablabla" }), _jsx(Divider, { className: "my-4" }), _jsxs(Tabs, { "aria-label": "Options", children: [_jsx(Tab, { title: "Table", children: _jsxs(Table, { "aria-label": "Example static collection table", selectionMode: "multiple", children: [_jsxs(TableHeader, { children: [_jsx(TableColumn, { children: "NAME" }), _jsx(TableColumn, { children: "ROLE" }), _jsx(TableColumn, { children: "STATUS" })] }), _jsxs(TableBody, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { children: "Tony Reichert" }), _jsx(TableCell, { children: "CEO" }), _jsx(TableCell, { children: "Active" })] }, "1"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Zoey Lang" }), _jsx(TableCell, { children: "Technical Lead" }), _jsx(TableCell, { children: "Paused" })] }, "2"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Jane Fisher" }), _jsx(TableCell, { children: "Senior Developer" }), _jsx(TableCell, { children: "Active" })] }, "3"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "William Howard" }), _jsx(TableCell, { children: "Community Manager" }), _jsx(TableCell, { children: "Vacation" })] }, "4")] })] }) }, "table"), _jsx(Tab, { title: "Settings", children: _jsxs("form", { children: [_jsx("h2", { children: "First Section" }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx("h2", { children: "Second Section" }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) }), _jsx(FormSection, { title: "Title", description: "Description", children: _jsx(Input, {}) })] }) }, "settings"), _jsx(Tab, { title: "Videos", children: _jsx(Card, { children: _jsx(CardBody, { children: "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }) }) }, "videos")] })] })),
129
+ sidebar: Primary.args?.sidebar ? {
130
+ ...Primary.args.sidebar,
131
+ autoLayout: true,
132
+ } : undefined,
133
+ children: (_jsxs(_Fragment, { children: [_jsx("h1", { children: "Customers" }), _jsx("p", { className: "mt-2 text-foreground-500", children: "Blablabla" }), _jsx(Divider, { className: "my-4" }), _jsxs(Tabs, { "aria-label": "Options", children: [_jsx(Tab, { title: "Table", children: _jsxs(Table, { "aria-label": "Example static collection table", selectionMode: "multiple", children: [_jsxs(TableHeader, { children: [_jsx(TableColumn, { children: "NAME" }), _jsx(TableColumn, { children: "ROLE" }), _jsx(TableColumn, { children: "STATUS" })] }), _jsxs(TableBody, { children: [_jsxs(TableRow, { children: [_jsx(TableCell, { children: "Tony Reichert" }), _jsx(TableCell, { children: "CEO" }), _jsx(TableCell, { children: "Active" })] }, "1"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Zoey Lang" }), _jsx(TableCell, { children: "Technical Lead" }), _jsx(TableCell, { children: "Paused" })] }, "2"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "Jane Fisher" }), _jsx(TableCell, { children: "Senior Developer" }), _jsx(TableCell, { children: "Active" })] }, "3"), _jsxs(TableRow, { children: [_jsx(TableCell, { children: "William Howard" }), _jsx(TableCell, { children: "Community Manager" }), _jsx(TableCell, { children: "Vacation" })] }, "4")] })] }) }, "table"), _jsx(Tab, { title: "Settings", children: _jsxs("form", { children: [_jsx("h2", { children: "First Section" }), _jsxs(FormSection, { title: "Name", description: "Description", direction: "horizontal", children: [_jsx(Input, { label: "First name" }), _jsx(Input, { label: "Last name" })] }), _jsx(FormSection, { title: "Biography", description: "Description", children: _jsx(Textarea, { label: "Biography", minRows: 6 }) }), _jsx(FormSection, { title: "Notifications", description: "Turn on/off email notifications.", direction: "horizontal", children: _jsx(Switch, {}) }), _jsx("h2", { children: "Second Section" }), _jsxs(FormSection, { title: "Title", description: "Description", direction: "horizontal", children: [_jsx(Input, { label: "First name" }), _jsx(Input, { label: "Last name" })] }), _jsxs(FormSection, { title: "Title", description: "Description", direction: "horizontal", children: [_jsx(Input, { label: "First name" }), _jsx(Input, { label: "Last name" })] })] }) }, "settings"), _jsx(Tab, { title: "Videos", children: _jsx(Card, { children: _jsx(CardBody, { children: "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." }) }) }, "videos")] })] })),
129
134
  },
130
135
  };
131
136
  export const WithGrid = {
132
137
  args: {
133
138
  ...Primary.args,
134
- children: (_jsxs(_Fragment, { children: [_jsx("h1", { children: "Customers" }), _jsx("p", { className: "mt-2 text-foreground-500", children: "Blablabla" }), _jsx(Divider, { className: "my-4" }), _jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-4 gap-6", children: [_jsx(Widget, { title: "Bla", children: "Bla" }), _jsx(Widget, { title: "Bla", children: "Bla" }), _jsx(Widget, { title: "Bla", children: "Bla" }), _jsx(Widget, { title: "Bla", children: "Bla" })] })] })),
139
+ sidebar: Primary.args?.sidebar ? {
140
+ ...Primary.args.sidebar,
141
+ autoLayout: true,
142
+ } : undefined,
143
+ children: (_jsxs(_Fragment, { children: [_jsxs(Breadcrumbs, { children: [_jsx(BreadcrumbItem, { children: "Home" }), _jsx(BreadcrumbItem, { children: "Customers" })] }), _jsx("h1", { children: "Customers" }), _jsx("p", { className: "mt-2 text-foreground-500", children: "Blablabla" }), _jsx(Divider, { className: "my-4" }), _jsxs(Grid, { size: "lg", children: [_jsx(Widget, { title: "Analytics", colSpan: 2, children: _jsx(Chart, { type: "line", series: [
144
+ {
145
+ name: "Clicks",
146
+ data: [6500, 6418, 6456, 6526, 6356, 6456],
147
+ color: "#1A56DB",
148
+ },
149
+ {
150
+ name: "CPC",
151
+ data: [6456, 6356, 6526, 6332, 6418, 6500],
152
+ color: "#7E3AF2",
153
+ },
154
+ ], height: "350px" }) }), _jsx(Widget, { title: "Traffic", children: _jsx(Chart, { type: "pie", options: {
155
+ labels: ["Direct", "Organic search", "Referrals"],
156
+ yaxis: {
157
+ labels: {
158
+ formatter: function (value) {
159
+ return value + "%";
160
+ },
161
+ },
162
+ },
163
+ xaxis: {
164
+ labels: {
165
+ formatter: function (value) {
166
+ return value + "%";
167
+ },
168
+ },
169
+ }
170
+ }, series: [52.8, 26.8, 20.4], height: "350px" }) }), _jsx(Widget, { title: "Origins", colSpan: 2, children: _jsx(Chart, { type: "column", series: [
171
+ {
172
+ name: "Organic",
173
+ color: "#1A56DB",
174
+ data: [
175
+ { x: "Mon", y: 231 },
176
+ { x: "Tue", y: 122 },
177
+ { x: "Wed", y: 63 },
178
+ { x: "Thu", y: 421 },
179
+ { x: "Fri", y: 122 },
180
+ { x: "Sat", y: 323 },
181
+ { x: "Sun", y: 111 },
182
+ ],
183
+ },
184
+ {
185
+ name: "Social media",
186
+ color: "#FDBA8C",
187
+ data: [
188
+ { x: "Mon", y: 232 },
189
+ { x: "Tue", y: 113 },
190
+ { x: "Wed", y: 341 },
191
+ { x: "Thu", y: 224 },
192
+ { x: "Fri", y: 522 },
193
+ { x: "Sat", y: 411 },
194
+ { x: "Sun", y: 243 },
195
+ ],
196
+ },
197
+ ], height: "350px" }) }), _jsx(Widget, { title: "Cost", children: _jsx(Chart, { type: "bar", options: {
198
+ tooltip: {
199
+ y: {
200
+ formatter: function (value) {
201
+ return "$" + value;
202
+ }
203
+ }
204
+ },
205
+ }, series: [
206
+ {
207
+ name: "Income",
208
+ color: "#31C48D",
209
+ data: [1420, 1620, 1820, 1420, 1650, 2120],
210
+ },
211
+ {
212
+ name: "Expense",
213
+ data: [788, 810, 866, 788, 1100, 1200],
214
+ color: "#F05252",
215
+ }
216
+ ] }) }), _jsx(Widget, { title: "New Users", children: _jsx(Chart, { type: "area", options: {
217
+ xaxis: {
218
+ categories: ['01 February', '02 February', '03 February', '04 February', '05 February', '06 February', '07 February'],
219
+ }
220
+ }, series: [
221
+ {
222
+ name: "New users",
223
+ data: [6500, 6418, 6456, 6526, 6356, 6456],
224
+ color: "#1A56DB",
225
+ },
226
+ ] }) }), _jsx(Widget, { title: "Website traffic", children: _jsx(Chart, { type: "donut", options: {
227
+ labels: ["Direct", "Sponsor", "Affiliate", "Email marketing"],
228
+ plotOptions: {
229
+ pie: {
230
+ donut: {
231
+ labels: {
232
+ total: {
233
+ label: "Unique visitors",
234
+ formatter: function (w) {
235
+ const sum = w.globals.seriesTotals.reduce((a, b) => {
236
+ return a + b;
237
+ }, 0);
238
+ return sum + 'k';
239
+ },
240
+ },
241
+ value: {
242
+ formatter: function (value) {
243
+ return value + "k";
244
+ },
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ yaxis: {
251
+ labels: {
252
+ formatter: function (value) {
253
+ return value + "k";
254
+ },
255
+ },
256
+ },
257
+ xaxis: {
258
+ labels: {
259
+ formatter: function (value) {
260
+ return value + "k";
261
+ },
262
+ },
263
+ },
264
+ }, series: [35.1, 23.5, 2.4, 5.4], height: "350px" }) }), _jsx(Widget, { title: "New Users", children: _jsx(Chart, { type: "radial", options: {
265
+ labels: ["Done", "In progress", "To do"],
266
+ yaxis: {
267
+ labels: {
268
+ formatter: function (value) {
269
+ return value + '%';
270
+ }
271
+ }
272
+ }
273
+ }, series: [90, 85, 70], height: "350px" }) })] })] })),
135
274
  },
136
275
  };
137
276
  //# sourceMappingURL=Shell.stories.js.map