@economic/taco 2.9.2 → 2.10.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 (73) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/IconButton/IconButton.d.ts +2 -2
  3. package/dist/components/Provider/Localization.d.ts +6 -0
  4. package/dist/components/Table3/components/columns/header/Header.d.ts +6 -1
  5. package/dist/components/Table3/components/columns/header/Menu.d.ts +4 -0
  6. package/dist/components/Table3/hooks/features/useCurrentRow.d.ts +4 -3
  7. package/dist/components/Table3/hooks/useCssVars.d.ts +2 -1
  8. package/dist/components/Table3/hooks/useTable.d.ts +1 -0
  9. package/dist/components/Table3/types.d.ts +7 -0
  10. package/dist/esm/index.css +92 -16
  11. package/dist/esm/packages/taco/src/components/Button/util.js +5 -1
  12. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  13. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +1 -1
  14. package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
  15. package/dist/esm/packages/taco/src/components/Provider/Localization.js +7 -1
  16. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  17. package/dist/esm/packages/taco/src/components/Table3/Table3.js +11 -4
  18. package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
  19. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js +3 -2
  20. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/Cell.js.map +1 -1
  21. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js +5 -3
  22. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/DisplayCell.js.map +1 -1
  23. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js +5 -3
  24. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingCell.js.map +1 -1
  25. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js +0 -1
  26. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/EditingControl.js.map +1 -1
  27. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js +1 -1
  28. package/dist/esm/packages/taco/src/components/Table3/components/columns/cell/controls/TextareaControl.js.map +1 -1
  29. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js +30 -6
  30. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Header.js.map +1 -1
  31. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js +36 -10
  32. package/dist/esm/packages/taco/src/components/Table3/components/columns/header/Menu.js.map +1 -1
  33. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js +3 -3
  34. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Actions.js.map +1 -1
  35. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js +1 -1
  36. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Drag.js.map +1 -1
  37. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js +1 -1
  38. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/EditingActions.js.map +1 -1
  39. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js +2 -2
  40. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Expansion.js.map +1 -1
  41. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js +1 -1
  42. package/dist/esm/packages/taco/src/components/Table3/components/columns/internal/Selection.js.map +1 -1
  43. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js +100 -44
  44. package/dist/esm/packages/taco/src/components/Table3/components/rows/Row.js.map +1 -1
  45. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js +10 -0
  46. package/dist/esm/packages/taco/src/components/Table3/components/toolbar/PrintButton/PrintButton.js.map +1 -1
  47. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js +15 -1
  48. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useCurrentRow.js.map +1 -1
  49. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js +1 -1
  50. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowClick.js.map +1 -1
  51. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js +5 -2
  52. package/dist/esm/packages/taco/src/components/Table3/hooks/features/useRowSelection.js.map +1 -1
  53. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js +2 -1
  54. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useCurrentRowListener.js.map +1 -1
  55. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js +8 -4
  56. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useEditingStateListener.js.map +1 -1
  57. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js +1 -1
  58. package/dist/esm/packages/taco/src/components/Table3/hooks/listeners/useShortcutsListener.js.map +1 -1
  59. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js +2 -1
  60. package/dist/esm/packages/taco/src/components/Table3/hooks/useConvertChildrenToColumns.js.map +1 -1
  61. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js +15 -2
  62. package/dist/esm/packages/taco/src/components/Table3/hooks/useCssVars.js.map +1 -1
  63. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js +1 -0
  64. package/dist/esm/packages/taco/src/components/Table3/hooks/useTable.js.map +1 -1
  65. package/dist/esm/packages/taco/src/components/Table3/types.js.map +1 -1
  66. package/dist/index.css +92 -16
  67. package/dist/taco.cjs.development.js +270 -97
  68. package/dist/taco.cjs.development.js.map +1 -1
  69. package/dist/taco.cjs.production.min.js +1 -1
  70. package/dist/taco.cjs.production.min.js.map +1 -1
  71. package/dist/types.d.ts +1 -1
  72. package/package.json +2 -2
  73. package/types.json +5803 -5242
package/dist/index.css CHANGED
@@ -647,7 +647,7 @@
647
647
 
648
648
  [role='cell']:not([data-highlighted='true']),
649
649
  [role='columnheader'] {
650
- @apply flex px-4;
650
+ @apply flex;
651
651
  }
652
652
 
653
653
  /* In cases where row height might differ from default one (example: textarea without truncate or changing of font size or row height),
@@ -696,13 +696,20 @@
696
696
  @apply bg-grey-100;
697
697
  }
698
698
  [role='row']:not([data-selected='true']):not([data-error='true'])[data-current='true'] [role='cell'] {
699
- --table3-row-actions-shadow: theme(colors.grey.200);
700
- @apply bg-grey-200;
699
+ --table3-row-actions-shadow: theme(colors.grey.100);
700
+ @apply bg-grey-100;
701
701
  }
702
702
  [role='row']:not([data-selected='true']):not([data-error='true'])[data-current='true']:hover [role='cell'] {
703
703
  --table3-row-actions-shadow: theme(colors.grey.100);
704
704
  @apply bg-grey-100;
705
705
  }
706
+ /* normal rows when focus is inside the table */
707
+ [data-taco='table2']:focus-within
708
+ [role='row'][data-current='true']:not([data-selected='true']):not([data-error='true'])
709
+ [role='cell'] {
710
+ --table3-row-actions-shadow: theme(colors.grey.200);
711
+ @apply bg-grey-200;
712
+ }
706
713
  /* normal rows when hover is paused */
707
714
  [data-pause-hover='true'] [role='row']:not([data-selected='true']):not([data-error='true']):hover:not([data-current='true']) [role='cell'] {
708
715
  --table3-row-actions-shadow: theme(colors.white);
@@ -721,14 +728,17 @@
721
728
  --table3-row-actions-shadow: #d6e3f6;
722
729
  @apply bg-[#D6E3F6];
723
730
  }
724
- [role='row'][data-selected='true']:not([data-error='true'])[data-current='true'] [role='cell'] {
725
- --table3-row-actions-shadow: #ccd8eb;
726
- @apply bg-[#CCD8EB];
727
- }
728
- [role='row'][data-selected='true']:not([data-error='true'])[data-current='true']:hover [role='cell'] {
731
+ [role='row'][data-selected='true']:not([data-error='true'])[data-current='true']:hover [role='cell'],
732
+
733
+ [role='row'][data-selected='true']:not([data-error='true'])[data-current='true'] [role='cell'] {
729
734
  --table3-row-actions-shadow: #d6e3f6;
730
735
  @apply bg-[#D6E3F6];
731
736
  }
737
+ /* selected rows when focus is inside the table */
738
+ [data-taco='table2']:focus-within [role='row'][data-current='true'][data-selected='true']:not([data-error='true']) [role='cell'] {
739
+ --table3-row-actions-shadow: #ccd8eb;
740
+ @apply bg-[#CCD8EB];
741
+ }
732
742
  /* selected rows when hover is paused */
733
743
  [data-pause-hover='true'] [role='row'][data-selected='true']:not([data-error='true']):hover:not([data-current='true']) [role='cell'] {
734
744
  --table3-row-actions-shadow: theme(colors.blue.100);
@@ -755,6 +765,11 @@
755
765
  --table3-row-actions-shadow: #ffe4de;
756
766
  @apply bg-[#FFE4DE];
757
767
  }
768
+ /* error rows when focus is inside the table */
769
+ [data-taco='table2']:focus-within [role='row'][data-current='true'][data-error='true'] [role='cell'] {
770
+ --table3-row-actions-shadow: theme(colors.red.100);
771
+ @apply bg-red-100;
772
+ }
758
773
  /* error rows when hover is paused */
759
774
  [data-pause-hover='true'] [role='row'][data-error='true']:hover:not([data-current='true']) [role='cell'] {
760
775
  --table3-row-actions-shadow: #ffede9;
@@ -777,17 +792,27 @@
777
792
  /* cell component overrides */
778
793
 
779
794
  /* small font size */
795
+ [data-font-size='small'] [role='cell'] > [data-taco='button'],
796
+ [data-font-size='small'] [role='cell'] > [data-taco='icon-button'] {
797
+ @apply !-my-2;
798
+ }
799
+
800
+ [data-font-size='small'] [role='cell'] > [data-taco='icon'] {
801
+ @apply !-my-[3px];
802
+ }
803
+
780
804
  [data-font-size='small'] [role='cell'] [data-taco='badge'],
781
- [data-font-size='small'] [role='cell'] [data-taco='badge-icon'],
782
- [data-font-size='small'] [role='cell'] [data-taco='icon'] {
805
+ [data-font-size='small'] [role='cell'] [data-taco='badge-icon'] {
783
806
  @apply !-my-0.5 !text-xs;
784
807
  }
785
808
 
786
- [data-font-size='small'] [role='cell'] [data-taco='tag'],
787
- [data-font-size='small'] [role='cell'] [data-taco='Select2'],
809
+ [data-font-size='small'] [role='cell'] [data-taco='tag'] {
810
+ @apply !-my-1;
811
+ }
812
+
788
813
  [data-font-size='small'] [role='cell'] [data-taco='input-container'],
789
814
  [data-font-size='small'] [role='cell'] [data-taco='Select2'] {
790
- @apply !-my-1;
815
+ @apply !-my-[3px];
791
816
  }
792
817
 
793
818
  [data-font-size='small'] [role='cell'] [data-taco='input'],
@@ -816,30 +841,70 @@
816
841
  @apply !my-0;
817
842
  }
818
843
 
844
+ [data-font-size='small'] [role='cell'][data-editable] {
845
+ @apply px-[calc(var(--table3-cell-padding-x)_-_7px)];
846
+ }
847
+
848
+ [data-font-size='small'] [role='cell'][data-editable] [data-taco='checkbox'],
849
+ [data-font-size='small'] [role='cell'][data-editable] [data-taco='checkbox-container'],
850
+ [data-font-size='small'] [role='cell'][data-editable] [data-taco='switch'],
851
+ [data-font-size='small'] [role='cell'][data-editable] [data-taco='switch-container'] {
852
+ @apply !mx-[calc(var(--table3-cell-padding-x)_-_1px)] !-mt-px;
853
+ }
854
+
819
855
  /* medium font size */
856
+ [data-font-size='medium'] [role='cell'] > [data-taco='button'],
857
+ [data-font-size='medium'] [role='cell'] > [data-taco='icon-button'] {
858
+ @apply !-my-1.5;
859
+ }
860
+
861
+ [data-font-size='medium'] [role='cell'] > [data-taco='icon'] {
862
+ @apply !-my-0.5;
863
+ }
864
+
820
865
  [data-font-size='medium'] [role='cell'] [data-taco='tag'] {
821
866
  @apply !-my-0.5;
822
867
  }
823
868
 
824
869
  [data-font-size='medium'] [role='cell'] [data-taco='Select2'],
825
870
  [data-font-size='medium'] [role='cell'] [data-taco='input-container'] {
826
- @apply !-my-1.5;
871
+ @apply !-my-[5px];
872
+ }
873
+
874
+ [data-font-size='medium'] [role='cell'][data-editable] {
875
+ @apply px-[calc(var(--table3-cell-padding-x)_-_9px)];
876
+ }
877
+
878
+ [data-font-size='medium'] [role='cell'][data-editable] [data-taco='checkbox'],
879
+ [data-font-size='medium'] [role='cell'][data-editable] [data-taco='checkbox-container'],
880
+ [data-font-size='medium'] [role='cell'][data-editable] [data-taco='switch'],
881
+ [data-font-size='medium'] [role='cell'][data-editable] [data-taco='switch-container'] {
882
+ @apply !mx-[calc(var(--table3-cell-padding-x)_-_3px)] !mt-px;
827
883
  }
828
884
 
829
885
  /* large font size */
886
+ [data-font-size='large'] [role='cell'] > [data-taco='button'],
887
+ [data-font-size='large'] [role='cell'] > [data-taco='icon-button'] {
888
+ @apply !-my-1;
889
+ }
890
+
891
+ [data-font-size='large'] [role='cell'] > [data-taco='icon'] {
892
+ @apply !-my-0.5;
893
+ }
894
+
830
895
  [data-font-size='large'] [role='cell'] [data-taco='tag'] {
831
896
  @apply !-my-0.5;
832
897
  }
833
898
 
834
899
  [data-font-size='large'] [role='cell'] [data-taco='Select2'],
835
900
  [data-font-size='large'] [role='cell'] [data-taco='input-container'] {
836
- @apply !-my-2;
901
+ @apply !-my-[7.5px];
837
902
  }
838
903
 
839
904
  [data-font-size='large'] [role='cell'] [data-taco='input'],
840
905
  [data-font-size='large'] [role='cell'] [data-taco='Select2'],
841
906
  [data-font-size='large'] [role='cell'] [data-taco='textarea'] {
842
- @apply h-10 px-2.5 text-lg;
907
+ @apply h-10 px-2.5 text-base;
843
908
  }
844
909
 
845
910
  [data-font-size='large'] [role='cell'] [data-taco='input-container'] [data-affix-type='postfix'] button {
@@ -849,3 +914,14 @@
849
914
  [data-font-size='large'] [role='cell'] [data-taco='input-container'] [data-affix-type='postfix'] [data-taco='icon'] {
850
915
  @apply !h-6 !w-6;
851
916
  }
917
+
918
+ [data-font-size='large'] [role='cell'][data-editable] {
919
+ @apply px-[calc(var(--table3-cell-padding-x)_-_11px)];
920
+ }
921
+
922
+ [data-font-size='large'] [role='cell'][data-editable] [data-taco='checkbox'],
923
+ [data-font-size='large'] [role='cell'][data-editable] [data-taco='checkbox-container'],
924
+ [data-font-size='large'] [role='cell'][data-editable] [data-taco='switch'],
925
+ [data-font-size='large'] [role='cell'][data-editable] [data-taco='switch-container'] {
926
+ @apply !mx-[calc(var(--table3-cell-padding-x)_-_5px)] !mt-px;
927
+ }