@wonderflow/react-components 10.12.0 → 10.14.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,5 +1,11 @@
1
1
  import { Button, ButtonProps, Polymorphic } from '../..';
2
- export declare type IconButtonProps<T = Record<string, unknown>> = Pick<ButtonProps, 'kind' | 'dimension' | 'icon' | 'disabled' | 'onClick' | 'busy'> & T;
2
+ export declare type IconButtonProps<T = Record<string, unknown>> = Pick<ButtonProps, 'kind' | 'dimension' | 'icon' | 'disabled' | 'onClick' | 'busy'> & {
3
+ /**
4
+ * Enable a squared shape for the button. Useful when the element is placed
5
+ * near another standard button.
6
+ */
7
+ squared?: boolean;
8
+ } & T;
3
9
  declare type PolymorphicIconButton = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof Button>, IconButtonProps<Polymorphic.OwnProps<typeof Button>>>;
4
10
  export declare const IconButton: PolymorphicIconButton;
5
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhE,oBAAY,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAC/D,WAAW,EACX,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAC9D,GAAG,CAAC,CAAA;AAEL,aAAK,qBAAqB,GAAG,WAAW,CAAC,mBAAmB,CAC5D,WAAW,CAAC,gBAAgB,CAAC,OAAO,MAAM,CAAC,EAC3C,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC,CACnD,CAAC;AAEF,eAAO,MAAM,UAAU,uBAmBI,CAAC"}
1
+ {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhE,oBAAY,eAAe,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,IAAI,CAC/D,WAAW,EACX,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG;IACjE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,CAAC,CAAA;AAEL,aAAK,qBAAqB,GAAG,WAAW,CAAC,mBAAmB,CAC5D,WAAW,CAAC,gBAAgB,CAAC,OAAO,MAAM,CAAC,EAC3C,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC,CACnD,CAAC;AAEF,eAAO,MAAM,UAAU,uBAqBI,CAAC"}
@@ -18,4 +18,4 @@ import clsx from 'clsx';
18
18
  import { forwardRef } from 'react';
19
19
  import { Button } from '../..';
20
20
  import * as styles from './icon-button.module.css';
21
- export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, className: clsx(styles.IconButton, className), ...otherProps })));
21
+ export const IconButton = forwardRef(({ className, icon, dimension, kind, disabled, busy, squared = false, ...otherProps }, forwardedRef) => (_jsx(Button, { ref: forwardedRef, icon: icon, dimension: dimension, kind: kind, disabled: disabled, busy: busy, "data-icon-button-squared": squared, className: clsx(styles.IconButton, className), ...otherProps })));
@@ -1 +1 @@
1
- @layer components{.IconButton{border-radius:200px;padding:0}.IconButton[data-button-dimension=small]{inline-size:1.5rem;min-inline-size:1.5rem;padding:0}.IconButton[data-button-dimension=regular]{inline-size:2.5rem;min-inline-size:2.5rem;padding:0}.IconButton[data-button-dimension=big]{inline-size:3rem;min-inline-size:3rem;padding:0}}
1
+ @layer components{.IconButton{padding:0}.IconButton[data-icon-button-squared=false]{border-radius:200px}.IconButton[data-button-dimension=small]{inline-size:1.5rem;min-inline-size:1.5rem;padding:0}.IconButton[data-button-dimension=regular]{inline-size:2.5rem;min-inline-size:2.5rem;padding:0}.IconButton[data-button-dimension=big]{inline-size:3rem;min-inline-size:3rem;padding:0}}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,UAAU,CAwB3C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,oJAAoB,CAAC"}
1
+ {"version":3,"file":"icon-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/icon-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,UAAU,CAyB3C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,oJAAoB,CAAC"}
@@ -8,6 +8,7 @@ const story = {
8
8
  kind: 'primary',
9
9
  icon: 'bell',
10
10
  busy: false,
11
+ squared: false,
11
12
  },
12
13
  argTypes: {
13
14
  onClick: { action: 'clicked' },
@@ -1 +1 @@
1
- @layer components{.Table{position:relative;width:100%;z-index:0}.TableWrapper{-webkit-overflow-scrolling:touch;overflow:auto}.TableWrapper[data-table-scrolling=true]{background:var(--table-background);max-height:var(--table-height);overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}}
1
+ @layer components{.Table{position:relative;width:100%;z-index:0}.TableWrapper[data-table-scrolling=true]{-webkit-overflow-scrolling:touch;background:var(--table-background);max-height:var(--table-height);overflow:auto;overscroll-behavior:contain}.TableElement{border-collapse:collapse;font-size:1rem;width:100%}.TableElement[data-table-loading=true]{pointer-events:none;-webkit-user-select:none;user-select:none}.THead{background:var(--table-background);box-shadow:inset 0 -3px 0 var(--dimmed-2);position:sticky;top:0;z-index:2}@media not all and (-webkit-min-device-pixel-ratio:0),not all and (min-resolution:0.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){.THead{border-bottom:3px solid var(--dimmed-2);box-shadow:none}}}.THead th{padding-bottom:1rem;padding-top:1rem}.Toast{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);border-radius:.5rem;left:0;min-block-size:3.5rem;position:absolute;right:0;top:0;z-index:4}.ExpandButton{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}}
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,M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AAY,4kBAAgC,CAAC;AAM1D,eAAO,MAAM,oBAAoB,4kBAAoB,CAAC;AAOtD,eAAO,MAAM,UAAU,4kBAAoB,CAAC;AAS5C,eAAO,MAAM,gBAAgB,4kBAAoB,CAAC;AAQlD,eAAO,MAAM,gBAAgB,4kBAAoB,CAAC;AAQlD,eAAO,MAAM,UAAU,4kBAA6B,CAAC;AAuDrD,eAAO,MAAM,UAAU,4kBAA8B,CAAC;AAOtD,eAAO,MAAM,MAAM,4kBAAoB,CAAC;AAoDxC,eAAO,MAAM,gBAAgB,4kBAAoC,CAAC;AASlE,eAAO,MAAM,OAAO,4kBAAoB,CAAC;AAyDzC,eAAO,MAAM,aAAa,4kBAAiC,CAAC;AAmD5D,eAAO,MAAM,yBAAyB,4kBAA6C,CAAC;AAkCpF,eAAO,MAAM,eAAe,4kBAAmC,CAAC;AAmChE,eAAO,MAAM,SAAS,4kBAA6B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useState, } from 'react';
3
- import { Button, IconButton, Menu, Popover, Separator, Stack, Title, } from '../..';
3
+ import { Button, IconButton, Menu, Popover, Stack, Title, } from '../..';
4
4
  import { Table } from './table';
5
5
  const firstData = {
6
6
  firstName: 'Gianni',
@@ -468,10 +468,10 @@ const story = {
468
468
  dataWithIds: [
469
469
  {
470
470
  ...firstData,
471
- _id: '1',
471
+ id: '1',
472
472
  subRows: [
473
473
  {
474
- _id: '1.1',
474
+ id: '1.1',
475
475
  firstName: 'ciao',
476
476
  lastName: 'Stuffo',
477
477
  address: 'Via Roma, 15 Monza',
@@ -479,7 +479,7 @@ const story = {
479
479
  info: 12,
480
480
  subRows: [
481
481
  {
482
- _id: '1.1.1',
482
+ id: '1.1.1',
483
483
  firstName: '1',
484
484
  lastName: 'Stuffo',
485
485
  address: 'Via Roma, 15 Monza',
@@ -487,7 +487,7 @@ const story = {
487
487
  info: 12,
488
488
  subRows: [
489
489
  {
490
- _id: '1.1.1.1',
490
+ id: '1.1.1.1',
491
491
  firstName: '1',
492
492
  lastName: 'Stuffo',
493
493
  address: 'Via Roma, 15 Monza',
@@ -495,7 +495,7 @@ const story = {
495
495
  info: 12,
496
496
  subRows: [
497
497
  {
498
- _id: '1.1.1.1.1',
498
+ id: '1.1.1.1.1',
499
499
  firstName: '1',
500
500
  lastName: 'Stuffo',
501
501
  address: 'Via Roma, 15 Monza',
@@ -503,7 +503,7 @@ const story = {
503
503
  info: 12,
504
504
  subRows: [
505
505
  {
506
- _id: '1.1.1.1.1.1',
506
+ id: '1.1.1.1.1.1',
507
507
  firstName: '1',
508
508
  lastName: 'Stuffo',
509
509
  address: 'Via Roma, 15 Monza',
@@ -511,7 +511,7 @@ const story = {
511
511
  info: 12,
512
512
  subRows: [
513
513
  {
514
- _id: '1.1.1.1.1.1.1',
514
+ id: '1.1.1.1.1.1.1',
515
515
  firstName: '1',
516
516
  lastName: 'Stuffo',
517
517
  address: 'Via Roma, 15 Monza',
@@ -519,7 +519,7 @@ const story = {
519
519
  info: 12,
520
520
  subRows: [
521
521
  {
522
- _id: '1.1.1.1.1.1.1.1',
522
+ id: '1.1.1.1.1.1.1.1',
523
523
  firstName: '1',
524
524
  lastName: 'Stuffo',
525
525
  address: 'Via Roma, 15 Monza',
@@ -527,7 +527,7 @@ const story = {
527
527
  info: 12,
528
528
  subRows: [
529
529
  {
530
- _id: '1.1.1.1.1.1.1.1.1',
530
+ id: '1.1.1.1.1.1.1.1.1',
531
531
  firstName: '1',
532
532
  lastName: 'Stuffo',
533
533
  address: 'Via Roma, 15 Monza',
@@ -535,7 +535,7 @@ const story = {
535
535
  info: 12,
536
536
  subRows: [
537
537
  {
538
- _id: '1.1.1.1.1.1.1.1.1.1',
538
+ id: '1.1.1.1.1.1.1.1.1.1',
539
539
  firstName: '1',
540
540
  lastName: 'Stuffo',
541
541
  address: 'Via Roma, 15 Monza',
@@ -543,7 +543,7 @@ const story = {
543
543
  info: 12,
544
544
  },
545
545
  {
546
- _id: '1.1.1.1.1.1.1.1.1.2',
546
+ id: '1.1.1.1.1.1.1.1.1.2',
547
547
  firstName: '2',
548
548
  lastName: 'Stuffo',
549
549
  address: 'Via Roma, 15 Monza',
@@ -551,7 +551,7 @@ const story = {
551
551
  info: 12,
552
552
  },
553
553
  {
554
- _id: '1.1.1.1.1.1.1.1.1.3',
554
+ id: '1.1.1.1.1.1.1.1.1.3',
555
555
  firstName: '3',
556
556
  lastName: 'Stuffo',
557
557
  address: 'Via Roma, 15 Monza',
@@ -561,7 +561,7 @@ const story = {
561
561
  ],
562
562
  },
563
563
  {
564
- _id: '1.1.1.1.1.1.1.1.2',
564
+ id: '1.1.1.1.1.1.1.1.2',
565
565
  firstName: '2',
566
566
  lastName: 'Stuffo',
567
567
  address: 'Via Roma, 15 Monza',
@@ -569,7 +569,7 @@ const story = {
569
569
  info: 12,
570
570
  },
571
571
  {
572
- _id: '1.1.1.1.1.1.1.1.3',
572
+ id: '1.1.1.1.1.1.1.1.3',
573
573
  firstName: '3',
574
574
  lastName: 'Stuffo',
575
575
  address: 'Via Roma, 15 Monza',
@@ -579,7 +579,7 @@ const story = {
579
579
  ],
580
580
  },
581
581
  {
582
- _id: '1.1.1.1.1.1.1.2',
582
+ id: '1.1.1.1.1.1.1.2',
583
583
  firstName: '2',
584
584
  lastName: 'Stuffo',
585
585
  address: 'Via Roma, 15 Monza',
@@ -587,7 +587,7 @@ const story = {
587
587
  info: 12,
588
588
  },
589
589
  {
590
- _id: '1.1.1.1.1.1.1.3',
590
+ id: '1.1.1.1.1.1.1.3',
591
591
  firstName: '3',
592
592
  lastName: 'Stuffo',
593
593
  address: 'Via Roma, 15 Monza',
@@ -597,7 +597,7 @@ const story = {
597
597
  ],
598
598
  },
599
599
  {
600
- _id: '1.1.1.1.1.1.2',
600
+ id: '1.1.1.1.1.1.2',
601
601
  firstName: '2',
602
602
  lastName: 'Stuffo',
603
603
  address: 'Via Roma, 15 Monza',
@@ -605,7 +605,7 @@ const story = {
605
605
  info: 12,
606
606
  },
607
607
  {
608
- _id: '1.1.1.1.1.1.3',
608
+ id: '1.1.1.1.1.1.3',
609
609
  firstName: '3',
610
610
  lastName: 'Stuffo',
611
611
  address: 'Via Roma, 15 Monza',
@@ -615,7 +615,7 @@ const story = {
615
615
  ],
616
616
  },
617
617
  {
618
- _id: '1.1.1.1.1.2',
618
+ id: '1.1.1.1.1.2',
619
619
  firstName: '2',
620
620
  lastName: 'Stuffo',
621
621
  address: 'Via Roma, 15 Monza',
@@ -623,7 +623,7 @@ const story = {
623
623
  info: 12,
624
624
  },
625
625
  {
626
- _id: '1.1.1.1.1.3',
626
+ id: '1.1.1.1.1.3',
627
627
  firstName: '3',
628
628
  lastName: 'Stuffo',
629
629
  address: 'Via Roma, 15 Monza',
@@ -633,7 +633,7 @@ const story = {
633
633
  ],
634
634
  },
635
635
  {
636
- _id: '1.1.1.1.2',
636
+ id: '1.1.1.1.2',
637
637
  firstName: '2',
638
638
  lastName: 'Stuffo',
639
639
  address: 'Via Roma, 15 Monza',
@@ -641,7 +641,7 @@ const story = {
641
641
  info: 12,
642
642
  },
643
643
  {
644
- _id: '1.1.1.1.3',
644
+ id: '1.1.1.1.3',
645
645
  firstName: '3',
646
646
  lastName: 'Stuffo',
647
647
  address: 'Via Roma, 15 Monza',
@@ -651,7 +651,7 @@ const story = {
651
651
  ],
652
652
  },
653
653
  {
654
- _id: '1.1.1.2',
654
+ id: '1.1.1.2',
655
655
  firstName: '2',
656
656
  lastName: 'Stuffo',
657
657
  address: 'Via Roma, 15 Monza',
@@ -659,7 +659,7 @@ const story = {
659
659
  info: 12,
660
660
  },
661
661
  {
662
- _id: '1.1.1.3',
662
+ id: '1.1.1.3',
663
663
  firstName: '3',
664
664
  lastName: 'Stuffo',
665
665
  address: 'Via Roma, 15 Monza',
@@ -669,7 +669,7 @@ const story = {
669
669
  ],
670
670
  },
671
671
  {
672
- _id: '1.1.2',
672
+ id: '1.1.2',
673
673
  firstName: '2',
674
674
  lastName: 'Stuffo',
675
675
  address: 'Via Roma, 15 Monza',
@@ -677,7 +677,7 @@ const story = {
677
677
  info: 12,
678
678
  },
679
679
  {
680
- _id: '1.1.3',
680
+ id: '1.1.3',
681
681
  firstName: '3',
682
682
  lastName: 'Stuffo',
683
683
  address: 'Via Roma, 15 Monza',
@@ -689,7 +689,7 @@ const story = {
689
689
  ],
690
690
  },
691
691
  {
692
- _id: '2',
692
+ id: '2',
693
693
  firstName: 'Simone',
694
694
  lastName: 'Lastname',
695
695
  address: 'Via Roma, 12, Bologna',
@@ -698,7 +698,7 @@ const story = {
698
698
  info: 123.96,
699
699
  },
700
700
  {
701
- _id: '3',
701
+ id: '3',
702
702
  firstName: 'Matteo',
703
703
  lastName: 'Staffone',
704
704
  address: 'Via Roma, 13, Genova',
@@ -706,7 +706,7 @@ const story = {
706
706
  info: _jsx("code", { children: "23456789" }),
707
707
  subRows: [
708
708
  {
709
- _id: '3.1',
709
+ id: '3.1',
710
710
  firstName: '1',
711
711
  lastName: 'Stuffo',
712
712
  address: 'Via Roma, 15 Monza',
@@ -714,7 +714,7 @@ const story = {
714
714
  info: 12,
715
715
  },
716
716
  {
717
- _id: '3.2',
717
+ id: '3.2',
718
718
  firstName: '2',
719
719
  lastName: 'Stuffo',
720
720
  address: 'Via Roma, 15 Monza',
@@ -722,7 +722,7 @@ const story = {
722
722
  info: 12,
723
723
  subRows: [
724
724
  {
725
- _id: '3.2.1',
725
+ id: '3.2.1',
726
726
  firstName: '1',
727
727
  lastName: 'Stuffo',
728
728
  address: 'Via Roma, 15 Monza',
@@ -730,7 +730,7 @@ const story = {
730
730
  info: 12,
731
731
  subRows: [
732
732
  {
733
- _id: '3.2.1.1',
733
+ id: '3.2.1.1',
734
734
  firstName: '1',
735
735
  lastName: 'Stuffo',
736
736
  address: 'Via Roma, 15 Monza',
@@ -738,7 +738,7 @@ const story = {
738
738
  info: 12,
739
739
  },
740
740
  {
741
- _id: '3.2.1.2',
741
+ id: '3.2.1.2',
742
742
  firstName: '2',
743
743
  lastName: 'Stuffo',
744
744
  address: 'Via Roma, 15 Monza',
@@ -746,7 +746,7 @@ const story = {
746
746
  info: 12,
747
747
  },
748
748
  {
749
- _id: '3.2.1.3',
749
+ id: '3.2.1.3',
750
750
  firstName: '3',
751
751
  lastName: 'Stuffo',
752
752
  address: 'Via Roma, 15 Monza',
@@ -756,7 +756,7 @@ const story = {
756
756
  ],
757
757
  },
758
758
  {
759
- _id: '3.2.2',
759
+ id: '3.2.2',
760
760
  firstName: '2',
761
761
  lastName: 'Stuffo',
762
762
  address: 'Via Roma, 15 Monza',
@@ -764,7 +764,7 @@ const story = {
764
764
  info: 12,
765
765
  },
766
766
  {
767
- _id: '3.2.3',
767
+ id: '3.2.3',
768
768
  firstName: '3',
769
769
  lastName: 'Stuffo',
770
770
  address: 'Via Roma, 15 Monza',
@@ -774,7 +774,7 @@ const story = {
774
774
  ],
775
775
  },
776
776
  {
777
- _id: '3.3',
777
+ id: '3.3',
778
778
  firstName: '3',
779
779
  lastName: 'Stuffo',
780
780
  address: 'Via Roma, 15 Monza',
@@ -782,7 +782,7 @@ const story = {
782
782
  info: 12,
783
783
  subRows: [
784
784
  {
785
- _id: '3.3.1',
785
+ id: '3.3.1',
786
786
  firstName: '1',
787
787
  lastName: 'Stuffo',
788
788
  address: 'Via Roma, 15 Monza',
@@ -790,7 +790,7 @@ const story = {
790
790
  info: 12,
791
791
  },
792
792
  {
793
- _id: '3.3.2',
793
+ id: '3.3.2',
794
794
  firstName: '2',
795
795
  lastName: 'Stuffo',
796
796
  address: 'Via Roma, 15 Monza',
@@ -798,7 +798,7 @@ const story = {
798
798
  info: 12,
799
799
  },
800
800
  {
801
- _id: '3.3.3',
801
+ id: '3.3.3',
802
802
  firstName: '3',
803
803
  lastName: 'Stuffo',
804
804
  address: 'Via Roma, 15 Monza',
@@ -810,7 +810,7 @@ const story = {
810
810
  ],
811
811
  },
812
812
  {
813
- _id: '4',
813
+ id: '4',
814
814
  firstName: 'Emanuele',
815
815
  lastName: 'Staffo',
816
816
  address: 'Via Roma, 14, Milano',
@@ -818,7 +818,7 @@ const story = {
818
818
  info: 1234,
819
819
  },
820
820
  {
821
- _id: '5',
821
+ id: '5',
822
822
  firstName: 'Simone',
823
823
  lastName: 'Stuffo',
824
824
  address: 'Via Roma, 15 Monza',
@@ -826,7 +826,7 @@ const story = {
826
826
  info: 12,
827
827
  subRows: [
828
828
  {
829
- _id: '5.1',
829
+ id: '5.1',
830
830
  firstName: 'ciao',
831
831
  lastName: 'Stuffo',
832
832
  address: 'Via Roma, 15 Monza',
@@ -836,7 +836,7 @@ const story = {
836
836
  ],
837
837
  },
838
838
  {
839
- _id: '6',
839
+ id: '6',
840
840
  firstName: 'Luca',
841
841
  lastName: 'Morandi',
842
842
  address: 'Via Roma, 1, Treno',
@@ -844,7 +844,7 @@ const story = {
844
844
  info: 123123.12,
845
845
  subRows: [
846
846
  {
847
- _id: '6.1',
847
+ id: '6.1',
848
848
  firstName: 'ciao',
849
849
  lastName: 'Stuffo',
850
850
  address: 'Via Roma, 15 Monza',
@@ -854,7 +854,7 @@ const story = {
854
854
  ],
855
855
  },
856
856
  {
857
- _id: '7',
857
+ id: '7',
858
858
  firstName: 'Mattia',
859
859
  lastName: 'Lastname',
860
860
  address: 'Via Roma, 12, Bologna',
@@ -862,7 +862,7 @@ const story = {
862
862
  info: 123.96,
863
863
  },
864
864
  {
865
- _id: '8',
865
+ id: '8',
866
866
  firstName: 'Morfeo',
867
867
  lastName: 'Staffone',
868
868
  address: 'Via Roma, 13, Genova',
@@ -870,7 +870,7 @@ const story = {
870
870
  info: 12.1213,
871
871
  },
872
872
  {
873
- _id: '9',
873
+ id: '9',
874
874
  firstName: 'Gianluca',
875
875
  lastName: 'Staffo',
876
876
  address: 'Via Roma, 14, Milano',
@@ -878,7 +878,7 @@ const story = {
878
878
  info: 1234,
879
879
  },
880
880
  {
881
- _id: '10',
881
+ id: '10',
882
882
  firstName: 'Simone',
883
883
  lastName: 'Stuffo',
884
884
  address: 'Via Roma, 15 Monza',
@@ -886,7 +886,7 @@ const story = {
886
886
  info: 12,
887
887
  },
888
888
  {
889
- _id: '11',
889
+ id: '11',
890
890
  firstName: 'Simone',
891
891
  lastName: 'Stuffo',
892
892
  address: 'Via Roma, 15 Monza',
@@ -894,7 +894,7 @@ const story = {
894
894
  info: 12,
895
895
  },
896
896
  {
897
- _id: '12',
897
+ id: '12',
898
898
  firstName: 'Simone',
899
899
  lastName: 'Stuffo',
900
900
  address: 'Via Roma, 15 Monza',
@@ -902,7 +902,7 @@ const story = {
902
902
  info: 12,
903
903
  },
904
904
  {
905
- _id: '13',
905
+ id: '13',
906
906
  firstName: 'Simone',
907
907
  lastName: 'Stuffo',
908
908
  address: 'Via Roma, 15 Monza',
@@ -910,7 +910,7 @@ const story = {
910
910
  info: 12,
911
911
  },
912
912
  {
913
- _id: '14',
913
+ id: '14',
914
914
  firstName: 'Simone',
915
915
  lastName: 'Stuffo',
916
916
  address: 'Via Roma, 15 Monza',
@@ -918,7 +918,7 @@ const story = {
918
918
  info: 12,
919
919
  },
920
920
  {
921
- _id: '15',
921
+ id: '15',
922
922
  firstName: 'Simone',
923
923
  lastName: 'Stuffo',
924
924
  address: 'Via Roma, 15 Monza',
@@ -926,7 +926,7 @@ const story = {
926
926
  info: 12,
927
927
  },
928
928
  {
929
- _id: '16',
929
+ id: '16',
930
930
  firstName: 'Simone',
931
931
  lastName: 'Stuffo',
932
932
  address: 'Via Roma, 15 Monza',
@@ -945,7 +945,7 @@ const SelectionTemplate = ({ dataWithIds, data, ...args }) => {
945
945
  const [tableData, setTableData] = useState(dataWithIds);
946
946
  const [selectedRowIds, setSelectedRowIds] = useState([]);
947
947
  const onDelete = (selectedRowIds) => {
948
- const newTableData = tableData.filter(({ _id }) => !selectedRowIds.includes(_id));
948
+ const newTableData = tableData.filter(({ id }) => !selectedRowIds.includes(id));
949
949
  setSelectedRowIds([]);
950
950
  setTableData(newTableData);
951
951
  };
@@ -1032,7 +1032,7 @@ const RowActionsTemplate = ({ columns, ...args }) => {
1032
1032
  disableSortBy: true,
1033
1033
  isToggable: true,
1034
1034
  isCollapsed: true,
1035
- accessor: _ => (_jsxs(Stack, { direction: "row", fill: false, children: [_jsx(IconButton, { icon: "astronomy", kind: "flat", dimension: "small" }), _jsx(Popover, { trigger: _jsx(IconButton, { icon: "more-vert", kind: "flat", dimension: "small" }), children: _jsxs(Menu, { children: [_jsx(Menu.Item, { dimension: "small", autoFocus: true, icon: "ctrl-right", children: "Sample long menu item" }), _jsx(Menu.Item, { dimension: "small", icon: "arrow-down-to-bracket", children: "Short menu label" }), _jsx(Separator, {}), _jsx(Menu.Item, { dimension: "small", icon: "view", children: "Even shorter" }), _jsx(Menu.Item, { dimension: "small", disabled: true, children: "Really?" })] }) })] })),
1035
+ accessor: _ => (_jsxs(Stack, { direction: "row", fill: false, children: [_jsx(IconButton, { icon: "astronomy", kind: "flat", dimension: "small" }), _jsx(Popover, { trigger: _jsx(IconButton, { icon: "more-vert", kind: "flat", dimension: "small" }), children: _jsxs(Menu, { children: [_jsx(Menu.Item, { dimension: "small", autoFocus: true, icon: "ctrl-right", children: "Sample long menu item" }), _jsx(Menu.Item, { dimension: "small", icon: "arrow-down-to-bracket", children: "Short menu label" }), _jsx(Menu.Separator, {}), _jsx(Menu.Item, { dimension: "small", icon: "view", children: "Even shorter" }), _jsx(Menu.Item, { dimension: "small", disabled: true, children: "Really?" })] }) })] })),
1036
1036
  },
1037
1037
  ...columns
1038
1038
  ], [columns]);
@@ -1062,7 +1062,7 @@ const ManualPaginationTemplate = ({ data, dataWithIds, ...args }) => {
1062
1062
  return allData.slice(newIndexStart, newIndexEnd);
1063
1063
  }, [allData, pagination]);
1064
1064
  const onDelete = (selectedRowIds) => {
1065
- const newTableData = allData.filter(({ _id }) => !selectedRowIds.includes(_id));
1065
+ const newTableData = allData.filter(({ id }) => !selectedRowIds.includes(id));
1066
1066
  setSelectedRowIds([]);
1067
1067
  setAllData(newTableData);
1068
1068
  };
@@ -1132,7 +1132,7 @@ const ManualPaginationFilteringTemplate = ({ data, dataWithIds, ...args }) => {
1132
1132
  return allData.slice(newIndexStart, newIndexEnd);
1133
1133
  }, [allData, pagination]);
1134
1134
  const onDelete = (selectedRowIds) => {
1135
- const newTableData = allData.filter(({ _id }) => !selectedRowIds.includes(_id));
1135
+ const newTableData = allData.filter(({ id }) => !selectedRowIds.includes(id));
1136
1136
  setAllData(newTableData);
1137
1137
  };
1138
1138
  return (_jsx(Table, { ...args, data: pageData, actions: _jsx(Button, { onClick: () => setAllData(allData.filter(r => r.lastName === 'Stuffo')), children: "Filter Stuffo" }), selectedActions: selectedRowIds => _jsx(Button, { onClick: () => onDelete(selectedRowIds), children: "Delete rows" }), onPaginationChange: (newPagination) => {
@@ -1154,7 +1154,7 @@ const PreselectedRowsTemplate = ({ dataWithIds, data, ...args }) => {
1154
1154
  const [tableData, setTableData] = useState(dataWithIds);
1155
1155
  const [selectedRowIds, setSelectedRowIds] = useState(['2', '4', '9', '12']);
1156
1156
  const onDelete = (selectedRowIds) => {
1157
- const newTableData = tableData.filter(({ _id }) => !selectedRowIds.includes(_id));
1157
+ const newTableData = tableData.filter(({ id }) => !selectedRowIds.includes(id));
1158
1158
  setSelectedRowIds([]);
1159
1159
  setTableData(newTableData);
1160
1160
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EACL,UAAU,EAAE,eAAe,EAAE,WAAW,EAEzC,MAAM,cAAc,CAAC;AAItB,aAAK,QAAQ,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,eAAe,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;AAEnG,oBAAY,iBAAiB,CAAC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BAAmB,CAC9D,WAAW,CAAC,gBAAgB,CAAC,OAAO,UAAU,CAAC,EAC/C,iBAAiB,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC,CACzD,CAAC;AAqBF,eAAO,MAAM,YAAY,yBAgFI,CAAC"}
@@ -37,7 +37,7 @@ const scaleAnimation = {
37
37
  },
38
38
  },
39
39
  };
40
- export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, onClick, ...otherProps }, forwardedRef) => {
40
+ export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, dimension, kind, disabled, iconColor, pressed = false, squared = false, onClick, ...otherProps }, forwardedRef) => {
41
41
  const [isPressed, setIsPressed] = useState(pressed);
42
42
  const [isFirstRender, setIsFirstRender] = useState(true);
43
43
  useEffect(() => {
@@ -55,7 +55,7 @@ export const ToggleButton = forwardRef(({ className, restingIcon, pressedIcon, d
55
55
  };
56
56
  return (_jsx(Symbol, { source: icon, dimension: iconSize[dimension] }));
57
57
  }, []);
58
- return (_jsx(IconButton, { as: "button", ref: forwardedRef, dimension: dimension, "aria-pressed": isPressed, kind: kind, disabled: disabled, onClick: handleClick, className: clsx(styles.ToggleButton, className), ...otherProps, children: _jsx(LazyMotion, { features: domMax, strict: true, children: isPressed && pressedIcon
58
+ return (_jsx(IconButton, { as: "button", ref: forwardedRef, dimension: dimension, "aria-pressed": isPressed, kind: kind, disabled: disabled, onClick: handleClick, "data-icon-button-squared": squared, className: clsx(styles.ToggleButton, className), ...otherProps, children: _jsx(LazyMotion, { features: domMax, strict: true, children: isPressed && pressedIcon
59
59
  ? (_jsx(m.span, { variants: scaleAnimation, initial: isFirstRender && isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(pressedIcon, dimension) }, "pressedIcon"))
60
60
  : restingIcon && (_jsx(m.span, { variants: scaleAnimation, initial: isFirstRender && !isPressed ? false : 'scaleOut', animate: "scaleIn", children: renderIcon(restingIcon, dimension) }, "restingIcon")) }) }));
61
61
  });
@@ -1 +1 @@
1
- @layer components{.ToggleButton{border-radius:200px;line-height:0;padding:0}.ToggleButton[aria-pressed=true]{box-shadow:0 0 0 var(--border-width) var(--border-color),0 0 0 var(--border-width) var(--border-color)}.ToggleButton[data-button-kind=primary]{--border-color:rgba(207,42,67,.25)}.ToggleButton[data-button-kind=primary][aria-pressed=true]{background:none;color:var(--cta-default)}.ToggleButton[data-button-kind=secondary]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=secondary][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-kind=flat]{--border-color:var(--dimmed-2)}.ToggleButton[data-button-kind=flat][aria-pressed=true]{background:none;color:var(--global-vibrancy-foreground)}.ToggleButton[data-button-dimension=small]{--border-width:2px}.ToggleButton[data-button-dimension=regular]{--border-width:4px}.ToggleButton[data-button-dimension=big]{--border-width:6px}}
1
+ @layer components{.ToggleButton{line-height:0;padding:0}.ToggleButton[data-icon-button-squared=false]{border-radius:200px}.ToggleButton[aria-pressed=true]{background:var(--background-color)}.ToggleButton[data-button-kind=primary][aria-pressed=true]{background:#9e0018}.ToggleButton[data-button-kind=flat][aria-pressed=true],.ToggleButton[data-button-kind=secondary][aria-pressed=true]{background:var(--dimmed-7);color:var(--dimmed-0)}.ToggleButton[data-button-dimension=small]{--border-width:2px}.ToggleButton[data-button-dimension=regular]{--border-width:4px}.ToggleButton[data-button-dimension=big]{--border-width:6px}}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,YAAY,CAmB7C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,sLAAoB,CAAC;AAEzC,eAAO,MAAM,aAAa,sLAAoB,CAAC"}
1
+ {"version":3,"file":"toggle-button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-button/toggle-button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,YAAY,CAoB7C,CAAC;AAEF,eAAe,KAAK,CAAC;AAIrB,eAAO,MAAM,OAAO,sLAAoB,CAAC;AAEzC,eAAO,MAAM,aAAa,sLAAoB,CAAC"}
@@ -7,6 +7,7 @@ const story = {
7
7
  dimension: 'regular',
8
8
  kind: 'primary',
9
9
  restingIcon: 'play',
10
+ squared: false,
10
11
  },
11
12
  argTypes: {
12
13
  onClick: { action: 'clicked' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wonderflow/react-components",
3
- "version": "10.12.0",
3
+ "version": "10.14.0",
4
4
  "description": "UI components from Wonderflow's Wanda design system",
5
5
  "author": "Wonderflow",
6
6
  "license": "Apache-2.0",
@@ -73,8 +73,8 @@
73
73
  "@types/react": "17.0.43",
74
74
  "@types/react-dom": "17.0.14",
75
75
  "@types/react-table": "7.7.12",
76
- "@wonderflow/config": "10.12.0",
77
- "@wonderflow/tokens": "10.12.0",
76
+ "@wonderflow/config": "10.14.0",
77
+ "@wonderflow/tokens": "10.14.0",
78
78
  "babel-loader": "8.2.5",
79
79
  "cpy-cli": "3.1.1",
80
80
  "postcss": "8.4.17",