@citizenplane/pimp 10.0.8 → 10.1.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 (64) hide show
  1. package/dist/pimp.es.js +1305 -1303
  2. package/dist/pimp.umd.js +22 -22
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/src/assets/css/base.css +16 -1
  6. package/src/assets/css/colors.css +111 -110
  7. package/src/assets/css/dimensions.css +36 -35
  8. package/src/assets/css/easings.css +2 -1
  9. package/src/assets/css/shadows.css +67 -65
  10. package/src/assets/css/tokens.css +355 -386
  11. package/src/assets/css/typography.css +109 -0
  12. package/src/assets/main.css +1 -1
  13. package/src/assets/styles/helpers/_functions.scss +2 -2
  14. package/src/assets/styles/helpers/_mixins.scss +1 -1
  15. package/src/assets/styles/utilities/_index.scss +3 -6
  16. package/src/components/BaseInputLabel.vue +23 -21
  17. package/src/components/BaseSelectClearButton.vue +15 -9
  18. package/src/components/CpAirlineLogo.vue +1 -1
  19. package/src/components/CpAlert.vue +16 -16
  20. package/src/components/CpBadge.vue +149 -29
  21. package/src/components/CpButton.vue +135 -110
  22. package/src/components/CpButtonGroup.vue +3 -3
  23. package/src/components/CpCalendar.vue +32 -32
  24. package/src/components/CpCheckbox.vue +43 -33
  25. package/src/components/CpContextualMenu.vue +6 -9
  26. package/src/components/CpDate.vue +53 -40
  27. package/src/components/CpDatepicker.vue +3 -3
  28. package/src/components/CpDialog.vue +19 -19
  29. package/src/components/CpHeading.vue +23 -23
  30. package/src/components/CpInput.vue +71 -52
  31. package/src/components/CpItemActions.vue +4 -4
  32. package/src/components/CpLoader.vue +14 -7
  33. package/src/components/CpMenuItem.vue +23 -17
  34. package/src/components/CpMultiselect.vue +84 -58
  35. package/src/components/CpPartnerBadge.vue +13 -13
  36. package/src/components/CpRadio.vue +32 -24
  37. package/src/components/CpSelect.vue +43 -30
  38. package/src/components/CpSelectMenu.vue +39 -39
  39. package/src/components/CpSwitch.vue +51 -40
  40. package/src/components/CpTable.vue +249 -81
  41. package/src/components/CpTableColumnEditor.vue +18 -16
  42. package/src/components/CpTableEmptyState.vue +9 -9
  43. package/src/components/CpTabs.vue +15 -15
  44. package/src/components/CpTelInput.vue +76 -70
  45. package/src/components/CpTextarea.vue +27 -17
  46. package/src/components/CpToast.vue +49 -49
  47. package/src/components/CpTooltip.vue +6 -6
  48. package/src/components/CpTransitionDialog.vue +1 -1
  49. package/src/constants/Sizes.ts +5 -0
  50. package/src/constants/colors/Colors.ts +15 -5
  51. package/src/constants/colors/ToggleColors.ts +2 -1
  52. package/src/libs/CoreDatepicker.vue +21 -18
  53. package/src/stories/CpBadge.stories.ts +25 -17
  54. package/src/stories/CpButton.stories.ts +6 -5
  55. package/src/stories/CpCheckbox.stories.ts +4 -4
  56. package/src/stories/CpContextualMenu.stories.ts +3 -2
  57. package/src/stories/CpLoader.stories.ts +2 -2
  58. package/src/stories/CpMenuItem.stories.ts +104 -0
  59. package/src/stories/CpRadio.stories.ts +29 -2
  60. package/src/stories/CpSwitch.stories.ts +27 -0
  61. package/src/stories/CpTable.stories.ts +94 -0
  62. package/src/assets/css/spacing.css +0 -43
  63. package/src/assets/styles/helpers/_keyframes.scss +0 -48
  64. package/src/assets/styles/variables/_sizing.scss +0 -4
@@ -616,7 +616,7 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
616
616
  flex: 1;
617
617
 
618
618
  &--hasPagination {
619
- border-bottom: fn.px-to-rem(1) solid colors.$border-color;
619
+ border-bottom: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
620
620
  }
621
621
  }
622
622
 
@@ -626,8 +626,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
626
626
  }
627
627
 
628
628
  &__container[role='region'][aria-labelledby][tabindex]:focus {
629
- border-radius: fn.px-to-rem(10);
630
- box-shadow: 0 0 0 fn.px-to-em(3) color.scale(colors.$blue, $lightness: 70%);
629
+ border-radius: var(--cp-radius-md-lg);
630
+ box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
631
631
  }
632
632
 
633
633
  &__container[role='region'][aria-labelledby][tabindex] &__table {
@@ -638,14 +638,51 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
638
638
  /* Scrolling Visual Cue */
639
639
  &__container[role='region'][aria-labelledby][tabindex] {
640
640
  @extend %u-scrolling-visual-cue;
641
+
642
+ background:
643
+ linear-gradient(
644
+ to right,
645
+ var(--cp-background-primary) 30%,
646
+ color-mix(in srgb, #{var(--cp-background-primary)} 0%, transparent)
647
+ ),
648
+ linear-gradient(
649
+ to right,
650
+ color-mix(in srgb, #{var(--cp-background-primary)} 0%, transparent),
651
+ var(--cp-background-primary) 70%
652
+ )
653
+ 0 100%,
654
+ radial-gradient(
655
+ farthest-side at 0% 50%,
656
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-50)} 20%, transparent),
657
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-50)} 0%, transparent)
658
+ ),
659
+ radial-gradient(
660
+ farthest-side at 100% 50%,
661
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-50)} 20%, transparent),
662
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-50)} 0%, transparent)
663
+ )
664
+ 0 100%;
665
+ background-repeat: no-repeat;
666
+ background-color: var(--cp-background-white);
667
+ background-size:
668
+ var(--cp-dimensions-10) 100%,
669
+ var(--cp-dimensions-10) 100%,
670
+ var(--cp-dimensions-3_5) 100%,
671
+ var(--cp-dimensions-3_5) 100%;
672
+ background-position:
673
+ 0 0,
674
+ 100%,
675
+ 0 0,
676
+ 100%;
677
+ background-attachment: local, local, scroll, scroll;
641
678
  }
642
679
 
643
680
  &__caption {
644
681
  position: sticky;
645
682
  left: 0;
646
- margin-bottom: sp.$space-lg;
683
+ margin-bottom: var(--cp-spacing-xl);
647
684
  text-align: left;
648
- font-size: fn.px-to-em(18);
685
+ font-size: var(--cp-text-size-lg);
649
686
 
650
687
  &:first-letter {
651
688
  text-transform: capitalize;
@@ -658,38 +695,137 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
658
695
  }
659
696
 
660
697
  &__row {
661
- &--body:not(:last-of-type) {
662
- border-bottom: fn.px-to-rem(1) solid colors.$border-color;
698
+ &--body:not(:last-of-type):not(#{&}--isFullWidth) {
699
+ box-shadow: inset 0 calc(var(--cp-dimensions-0_25) * -1) 0 var(--cp-border-soft);
663
700
  }
664
701
 
665
- &--body:not(#{&}--isFullWidth):not(#{&}--isSelected):hover,
666
- &--body:not(#{&}--isFullWidth):not(#{&}--isSelected):focus,
667
- &--body:not(#{&}--isFullWidth):not(#{&}--isSelected):focus-within {
668
- background-color: rgba(colors.$neutral-dark, 0.05);
669
- transition: background-color 0.1s ease-in-out;
702
+ &--body:has(+ #{&}--isFullWidth) {
703
+ box-shadow: none !important;
704
+ }
705
+
706
+ &--isFullWidth {
707
+ border-top: none;
708
+ }
709
+
710
+ &--body:not(#{&}--isFullWidth):is(:hover, :focus, :focus-within) {
711
+ transition: background-color 100ms ease-in-out;
712
+ }
713
+
714
+ &--body:not(#{&}--isFullWidth):is(:hover, :focus, :focus-within) td {
715
+ background-color: var(--cp-background-primary-hover);
716
+ }
717
+
718
+ &--body:not(#{&}--isFullWidth):is(:hover, :focus, :focus-within) {
719
+ position: relative;
720
+ }
721
+
722
+ &--body:not(#{&}--isFullWidth):is(:hover, :focus, :focus-within)::after {
723
+ content: '';
724
+ position: absolute;
725
+ inset: 0;
726
+ border-radius: var(--cp-radius-md);
727
+ box-shadow: inset 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
728
+ pointer-events: none;
729
+ }
730
+
731
+ &--body:not(#{&}--isFullWidth):hover td:first-child,
732
+ &--body:not(#{&}--isFullWidth):focus td:first-child,
733
+ &--body:not(#{&}--isFullWidth):focus-within td:first-child {
734
+ border-top-left-radius: var(--cp-radius-md);
735
+ border-bottom-left-radius: var(--cp-radius-md);
736
+ }
737
+
738
+ &--body:not(#{&}--isFullWidth):hover td:last-child,
739
+ &--body:not(#{&}--isFullWidth):focus td:last-child,
740
+ &--body:not(#{&}--isFullWidth):focus-within td:last-child {
741
+ border-top-right-radius: var(--cp-radius-md);
742
+ border-bottom-right-radius: var(--cp-radius-md);
743
+ }
744
+
745
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions:not([style*='display: none'])):hover
746
+ td:nth-last-child(2),
747
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions:not([style*='display: none'])):focus
748
+ td:nth-last-child(2),
749
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions:not([style*='display: none'])):focus-within
750
+ td:nth-last-child(2) {
751
+ border-top-right-radius: 0;
752
+ border-bottom-right-radius: 0;
753
+ }
754
+
755
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions[style*='display: none']):hover td:nth-last-child(2),
756
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions[style*='display: none']):focus td:nth-last-child(2),
757
+ &--body:not(#{&}--isFullWidth):has(.cpTable__cell--isOptions[style*='display: none']):focus-within
758
+ td:nth-last-child(2) {
759
+ border-top-right-radius: var(--cp-radius-md);
760
+ border-bottom-right-radius: var(--cp-radius-md);
670
761
  }
671
762
 
672
763
  &--body:not(#{&}--isFullWidth):not(#{&}--isSelected):focus,
673
764
  &--body:not(#{&}--isFullWidth):not(#{&}--isSelected):focus-within {
674
- color: colors.$primary-color;
765
+ color: var(--cp-text-accent-primary);
675
766
  }
676
767
 
677
768
  &--isFullWidth td {
678
- padding: sp.$space;
679
- background-color: rgba(colors.$neutral-dark, 0.03);
769
+ padding: var(--cp-spacing-md);
770
+ background-color: var(--cp-background-secondary);
771
+ border-radius: var(--cp-radius-md);
772
+ box-shadow: inset 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
680
773
  }
681
774
 
682
775
  &--isClickable {
683
776
  cursor: pointer;
684
777
  }
685
778
 
779
+ &--isSelected td {
780
+ background-color: var(--cp-background-accent-primary);
781
+ color: var(--cp-text-accent-primary);
782
+ }
783
+
686
784
  &--isSelected {
687
- background-color: rgba(colors.$primary-color, 0.1);
688
- color: colors.$primary-color;
785
+ position: relative;
786
+ }
787
+
788
+ &--isSelected::after {
789
+ content: '';
790
+ position: absolute;
791
+ inset: 0;
792
+ border-radius: var(--cp-radius-md);
793
+ box-shadow: inset 0 0 0 var(--cp-dimensions-0_25) var(--cp-utility-accent-100);
794
+ pointer-events: none;
795
+ }
796
+
797
+ &--isSelected td:first-child {
798
+ border-top-left-radius: var(--cp-radius-md);
799
+ border-bottom-left-radius: var(--cp-radius-md);
800
+ }
801
+
802
+ &--isSelected td:last-child {
803
+ border-top-right-radius: var(--cp-radius-md);
804
+ border-bottom-right-radius: var(--cp-radius-md);
805
+ }
806
+
807
+ &--isSelected:has(.cpTable__cell--isOptions:not([style*='display: none'])) td:nth-last-child(2) {
808
+ border-top-right-radius: 0;
809
+ border-bottom-right-radius: 0;
810
+ }
811
+
812
+ &--isSelected:has(.cpTable__cell--isOptions[style*='display: none']) td:nth-last-child(2) {
813
+ border-top-right-radius: var(--cp-radius-md);
814
+ border-bottom-right-radius: var(--cp-radius-md);
815
+ }
816
+
817
+ &--body:not(#{&}--isFullWidth):is(:hover, :focus, :focus-within),
818
+ &--body:not(#{&}--isFullWidth).cpTable__row--isSelected {
819
+ box-shadow: none !important;
820
+ }
821
+
822
+ &--body:not(#{&}--isFullWidth):has(+ #{&}--isSelected),
823
+ &--body:not(#{&}--isFullWidth):has(+ #{&}:is(:hover, :focus, :focus-within)) {
824
+ box-shadow: none !important;
689
825
  }
690
826
 
691
827
  &--body td {
692
- font-size: fn.px-to-em(14);
828
+ font-size: var(--cp-text-size-sm);
693
829
  }
694
830
  }
695
831
 
@@ -697,14 +833,14 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
697
833
  position: sticky;
698
834
  top: 0;
699
835
  z-index: 3;
700
- padding: sp.$space sp.$space-md;
836
+ padding: var(--cp-spacing-md) var(--cp-spacing-lg);
701
837
  text-align: left;
702
838
  white-space: nowrap;
703
- font-size: fn.px-to-em(12);
704
- line-height: fn.px-to-rem(16);
839
+ font-size: var(--cp-text-size-xs);
840
+ line-height: var(--cp-line-height-xs);
705
841
  font-weight: normal;
706
- color: colors.$neutral-dark-1;
707
- background-color: colors.$neutral-light;
842
+ color: var(--cp-text-secondary);
843
+ background-color: var(--cp-background-primary);
708
844
 
709
845
  &:first-letter {
710
846
  text-transform: capitalize;
@@ -717,8 +853,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
717
853
  bottom: 0;
718
854
  left: 0;
719
855
  width: 100%;
720
- height: fn.px-to-rem(1);
721
- background-color: colors.$border-color;
856
+ height: var(--cp-dimensions-0_25);
857
+ background-color: var(--cp-border-soft);
722
858
  }
723
859
 
724
860
  &--isOptions {
@@ -731,11 +867,33 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
731
867
  }
732
868
  }
733
869
 
870
+ &:has(
871
+ .cpTable__row--body:first-of-type:is(:hover, :focus, :focus-within),
872
+ .cpTable__row--body:first-of-type.cpTable__row--isSelected
873
+ ) {
874
+ .cpTable__column:after {
875
+ background-color: transparent;
876
+ }
877
+ }
878
+
879
+ &:has(
880
+ .cpTable__row--body:last-of-type:is(:hover, :focus, :focus-within),
881
+ .cpTable__row--body:last-of-type.cpTable__row--isSelected
882
+ ) {
883
+ .cpTable__container--hasPagination {
884
+ border-bottom-color: transparent;
885
+ }
886
+ }
887
+
888
+ &__table:has(.cpTable__row--body:first-of-type.cpTable__row--isFullWidth) &__column:after {
889
+ background-color: transparent;
890
+ }
891
+
734
892
  &__columnEditor {
735
- padding-right: calc(sp.$space-md + fn.px-to-rem(2));
893
+ padding-right: calc(var(--cp-spacing-lg) + var(--cp-dimensions-0_5));
736
894
 
737
895
  @media (hover: none) and (pointer: coarse) {
738
- padding-right: sp.$space-md;
896
+ padding-right: var(--cp-spacing-lg);
739
897
  }
740
898
  }
741
899
 
@@ -750,7 +908,7 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
750
908
 
751
909
  &__cell {
752
910
  &:not(#{&}--isFullWidth):not(#{&}--isOptions) {
753
- padding: sp.$space-lg sp.$space-md;
911
+ padding: var(--cp-spacing-xl) var(--cp-spacing-lg);
754
912
  white-space: nowrap;
755
913
  }
756
914
 
@@ -767,67 +925,80 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
767
925
 
768
926
  &--isOptions {
769
927
  right: 0;
770
- padding: 0 sp.$space-md;
928
+ padding: 0 var(--cp-spacing-lg);
771
929
  }
772
930
 
773
931
  &--isOptions .cpTable__action {
774
932
  display: none;
775
- padding: fn.px-to-rem(6) sp.$space;
933
+ padding: var(--cp-dimensions-1_5) var(--cp-spacing-md);
776
934
  border: none;
777
935
  border-radius: 0;
778
- color: initial;
936
+ color: var(--cp-foreground-primary);
779
937
 
780
938
  // Add border-right only if the action is not the last one and the next one is not the default action
781
939
  &:not(:last-child) {
782
- border-right: 1px solid colors.$border-color;
940
+ border-right: 1px solid var(--cp-border-soft);
783
941
  }
784
942
 
785
943
  &:disabled {
786
- color: colors.$neutral-dark-2;
944
+ color: var(--cp-foreground-disabled);
787
945
  cursor: not-allowed;
788
946
  }
789
947
 
790
948
  &:is(:hover, :focus):not(:disabled) {
791
949
  box-shadow: none;
792
- background-color: colors.$neutral-dark-5;
793
- color: colors.$primary-color;
950
+ background-color: var(--cp-background-primary-hover);
951
+ color: var(--cp-foreground-primary);
794
952
  }
795
953
 
796
954
  &--isCritical:is(:hover, :focus):not(:disabled) {
797
- color: colors.$error-color;
955
+ color: var(--cp-foreground-error-primary);
798
956
  }
799
957
  }
800
958
 
801
959
  &--isOptions .cpTable__action--isDefault {
802
960
  display: inline-flex;
803
961
  align-items: center;
804
- color: colors.$neutral-dark-1;
962
+ color: var(--cp-foreground-primary);
805
963
 
806
964
  &:hover {
807
- background-color: color.scale(colors.$neutral-dark, $lightness: 98%);
808
- color: colors.$neutral-dark;
965
+ background-color: var(--cp-background-primary-hover);
966
+ color: var(--cp-foreground-primary);
809
967
  }
810
968
 
811
969
  &:focus {
812
970
  outline: none !important;
813
- box-shadow: 0 0 0 fn.px-to-em(3) color.scale(colors.$secondary-color, $lightness: 80%);
971
+ box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
814
972
  }
815
973
  }
816
974
 
817
975
  @mixin cp-table-only-default-action-visible-style {
818
- padding: sp.$space-sm;
819
- border: fn.px-to-rem(1) solid colors.$border-color;
820
- border-radius: fn.px-to-rem(8);
821
- background-color: colors.$neutral-light;
976
+ padding: var(--cp-spacing-sm);
977
+ box-shadow:
978
+ var(--cp-shadows-3xs),
979
+ 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
980
+ border-radius: var(--cp-radius-md);
981
+ background-color: var(--cp-background-primary);
822
982
  }
823
983
 
824
984
  // Solo default action mode
825
985
  &--isOptions .cpTable__action:only-child.cpTable__action--isDefault {
826
986
  @include cp-table-only-default-action-visible-style;
987
+
988
+ &:hover {
989
+ background-color: var(--cp-background-primary-hover);
990
+ box-shadow:
991
+ var(--cp-shadows-3xs),
992
+ 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft-hover);
993
+ }
827
994
  }
828
995
 
829
996
  // Touch device mode : only default action visible
830
997
  @media (hover: none) and (pointer: coarse) {
998
+ &--isOptions {
999
+ padding: 0 var(--cp-dimensions-3_5) 0 var(--cp-spacing-lg);
1000
+ }
1001
+
831
1002
  &--isOptions .cpTable__action--isDefault {
832
1003
  @include cp-table-only-default-action-visible-style;
833
1004
  }
@@ -842,8 +1013,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
842
1013
  @media (hover: hover) and (pointer: fine) {
843
1014
  &__cell--isOptions {
844
1015
  opacity: 0;
845
- min-width: fn.px-to-rem(50);
846
- transition: opacity 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.175);
1016
+ min-width: calc(var(--cp-dimensions-1) * 12.5);
1017
+ transition: none;
847
1018
  }
848
1019
 
849
1020
  // Actions wrapper on desktop : displayed only if there are quick actions inside
@@ -851,24 +1022,20 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
851
1022
  position: absolute;
852
1023
  top: 50%;
853
1024
  transform: translateY(-50%);
854
- right: fn.px-to-rem(12);
1025
+ right: var(--cp-dimensions-3);
855
1026
  display: inline-flex;
856
1027
  overflow: hidden;
857
- border-radius: fn.px-to-rem(8);
858
- background-color: colors.$neutral-light;
859
1028
  box-shadow:
860
- 0 1px 4px rgba(colors.$neutral-dark, 0.1),
861
- 0 0 1px rgba(colors.$neutral-dark, 0.15);
1029
+ var(--cp-shadows-3xs),
1030
+ 0 0 0 var(--cp-dimensions-0_25) var(--cp-border-soft);
1031
+ border-radius: var(--cp-radius-md);
1032
+ background-color: var(--cp-background-primary);
862
1033
 
863
1034
  &:has(.cpTable__action:only-child) {
864
- right: fn.px-to-rem(15);
1035
+ right: var(--cp-dimensions-4);
865
1036
  }
866
1037
  }
867
1038
 
868
- &__cell--isOptions .cpTable__actions:has(> :nth-child(2)) {
869
- border: 1px solid colors.$border-color;
870
- }
871
-
872
1039
  &__cell--isOptions .cpTable__action {
873
1040
  display: flex;
874
1041
  }
@@ -900,8 +1067,8 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
900
1067
  right: 0;
901
1068
  top: 0;
902
1069
  bottom: 0;
903
- border-radius: fn.px-to-rem(10);
904
- background-color: colors.$neutral-light;
1070
+ border-radius: var(--cp-radius-md-lg);
1071
+ background-color: var(--cp-background-primary);
905
1072
  z-index: 4;
906
1073
  opacity: 0;
907
1074
  transition: 0.15s opacity ease-in-out;
@@ -918,10 +1085,10 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
918
1085
  transform: translate3d(-100%, 0, 0);
919
1086
  background-image: linear-gradient(
920
1087
  90deg,
921
- rgba(colors.$neutral-dark-3, 0) 0,
922
- rgba(colors.$neutral-dark-3, 0.2) 20%,
923
- rgba(colors.$neutral-dark-3, 0.5) 60%,
924
- rgba(colors.$neutral-dark-3, 0)
1088
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 0%, transparent) 0,
1089
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 20%, transparent) 20%,
1090
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 50%, transparent) 60%,
1091
+ color-mix(in srgb, #{var(--cp-colors-grey-shadow-color-20)} 0%, transparent)
925
1092
  );
926
1093
  animation: shimmer 2s infinite paused;
927
1094
  }
@@ -934,22 +1101,22 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
934
1101
  }
935
1102
 
936
1103
  &__loader {
937
- width: fn.px-to-rem(32);
938
- height: fn.px-to-rem(32);
1104
+ width: var(--cp-dimensions-8);
1105
+ height: var(--cp-dimensions-8);
939
1106
 
940
1107
  &--isSmall {
941
1108
  display: inline-block;
942
1109
  vertical-align: middle;
943
- width: fn.px-to-rem(24);
944
- height: fn.px-to-rem(24);
1110
+ width: var(--cp-dimensions-6);
1111
+ height: var(--cp-dimensions-6);
945
1112
  }
946
1113
  }
947
1114
 
948
1115
  &__footer {
949
- padding: sp.$space-lg sp.$space-md 0;
1116
+ padding: var(--cp-spacing-xl) var(--cp-spacing-lg) 0;
950
1117
  display: flex;
951
1118
  align-items: center;
952
- font-size: fn.px-to-em(14);
1119
+ font-size: var(--cp-text-size-sm);
953
1120
  }
954
1121
 
955
1122
  .footer {
@@ -960,11 +1127,11 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
960
1127
 
961
1128
  &__results {
962
1129
  font-variant-numeric: tabular-nums;
963
- color: colors.$neutral-dark-1;
1130
+ color: var(--cp-text-secondary);
964
1131
  }
965
1132
 
966
1133
  &__results strong {
967
- color: colors.$neutral-dark;
1134
+ color: var(--cp-text-primary);
968
1135
  }
969
1136
 
970
1137
  &__pagination {
@@ -972,33 +1139,34 @@ defineExpose({ hideContextualMenu, resetPagination, currentRowData })
972
1139
  }
973
1140
 
974
1141
  &__pagination button {
975
- box-shadow: 0 fn.px-to-rem(1) fn.px-to-rem(2) rgba(colors.$neutral-dark, 0.08);
976
- border-radius: fn.px-to-rem(10);
977
- border: fn.px-to-rem(1) solid colors.$border-color;
978
- padding: fn.px-to-rem(6) fn.px-to-rem(10);
1142
+ box-shadow: var(--cp-shadows-3xs);
1143
+ border-radius: var(--cp-radius-md-lg);
1144
+ border: var(--cp-dimensions-0_25) solid var(--cp-border-soft);
1145
+ padding: var(--cp-dimensions-1_5) var(--cp-dimensions-2_5);
979
1146
  transition: background-color 0.15s;
980
- background-color: colors.$neutral-light;
1147
+ background-color: var(--cp-background-primary);
981
1148
 
982
1149
  &:hover {
983
- background-color: rgba(colors.$neutral-dark, 0.05);
1150
+ background-color: var(--cp-background-primary-hover);
1151
+ border: var(--cp-dimensions-0_25) solid var(--cp-border-soft-hover);
984
1152
  }
985
1153
 
986
1154
  &:focus {
987
1155
  outline: none !important;
988
- box-shadow: 0 0 0 fn.px-to-em(3) color.scale(colors.$blue, $lightness: 70%);
1156
+ box-shadow: 0 0 0 calc(var(--cp-dimensions-0_5) * 1.5) var(--cp-focus);
989
1157
  }
990
1158
 
991
1159
  &:disabled {
992
1160
  box-shadow: none;
993
- border-color: colors.$neutral-light-1;
994
- background-color: colors.$neutral-light-1;
995
- color: colors.$neutral-dark-2;
1161
+ border-color: var(--cp-border-disabled);
1162
+ background-color: var(--cp-background-disabled);
1163
+ color: var(--cp-foreground-disabled);
996
1164
  cursor: not-allowed;
997
1165
  user-select: none;
998
1166
  }
999
1167
 
1000
1168
  &:last-of-type {
1001
- margin-left: sp.$space;
1169
+ margin-left: var(--cp-spacing-md);
1002
1170
  }
1003
1171
  }
1004
1172
  }
@@ -144,18 +144,20 @@ const handleDropdownShown = () => {
144
144
  <style lang="scss">
145
145
  .cpTableColumnEditor {
146
146
  text-align: right;
147
+ padding-bottom: var(--cp-spacing-xs);
147
148
 
148
149
  &__trigger {
149
150
  @extend %u-focus-outline;
150
151
 
151
- color: colors.$neutral-dark-1;
152
- border-radius: fn.px-to-rem(8);
152
+ color: var(--cp-text-secondary);
153
+ border-radius: var(--cp-radius-md);
153
154
 
154
155
  &--isOpen,
155
156
  &:hover,
156
157
  &:focus-within {
157
- color: colors.$neutral-dark;
158
- background-color: colors.$neutral-dark-5;
158
+ transform: none;
159
+ outline-offset: 0;
160
+ background-color: var(--cp-background-primary-hover);
159
161
  }
160
162
  }
161
163
 
@@ -167,28 +169,28 @@ const handleDropdownShown = () => {
167
169
  &__inner {
168
170
  display: flex;
169
171
  flex-direction: column;
170
- gap: sp.$space;
171
- padding-block: sp.$space;
172
+ gap: var(--cp-spacing-md);
173
+ padding-block: var(--cp-spacing-md);
172
174
  }
173
175
 
174
176
  &__header {
175
- padding-inline: sp.$space-md;
177
+ padding-inline: var(--cp-spacing-lg);
176
178
  }
177
179
 
178
180
  &__heading,
179
181
  &__column:not(:has(.cpTableColumnEditor__checkbox)) {
180
- padding: sp.$space-sm sp.$space-md;
182
+ padding: var(--cp-spacing-sm) var(--cp-spacing-lg);
181
183
  }
182
184
 
183
185
  &__heading {
184
- font-size: fn.px-to-rem(12);
185
- line-height: fn.px-to-rem(24);
186
- color: colors.$neutral-dark-1;
186
+ font-size: var(--cp-text-size-xs);
187
+ line-height: var(--cp-line-height-md);
188
+ color: var(--cp-text-secondary);
187
189
  }
188
190
 
189
191
  &__column,
190
192
  &__empty {
191
- font-size: fn.px-to-rem(14);
193
+ font-size: var(--cp-text-size-sm);
192
194
  }
193
195
 
194
196
  &__column {
@@ -200,13 +202,13 @@ const handleDropdownShown = () => {
200
202
  }
201
203
 
202
204
  &__divider {
203
- height: fn.px-to-rem(1);
204
- background-color: colors.$neutral-dark-5;
205
+ height: var(--cp-dimensions-0_25);
206
+ background-color: var(--cp-border-soft);
205
207
  }
206
208
 
207
209
  &__checkbox {
208
- color: colors.$neutral-dark;
209
- padding: sp.$space-sm sp.$space;
210
+ color: var(--cp-text-primary);
211
+ padding: var(--cp-spacing-sm) var(--cp-spacing-md);
210
212
  }
211
213
  }
212
214
  </style>
@@ -20,27 +20,27 @@ defineProps<Props>()
20
20
 
21
21
  <style lang="scss">
22
22
  .cpTableEmptyState {
23
- padding: 10vh sp.$space-lg;
23
+ padding: 10vh var(--cp-spacing-xl);
24
24
  display: flex;
25
25
  align-items: center;
26
26
  justify-content: center;
27
27
 
28
28
  &__icon {
29
- margin-bottom: sp.$space-xl;
30
- border-radius: fn.px-to-rem(4);
29
+ margin-bottom: var(--cp-spacing-2xl);
30
+ border-radius: var(--cp-radius-sm);
31
31
  display: inline-block;
32
- background-color: colors.$neutral-light-1;
33
- padding: sp.$space-lg;
34
- color: colors.$neutral-dark-1;
32
+ background-color: var(--cp-background-secondary);
33
+ padding: var(--cp-spacing-xl);
34
+ color: var(--cp-foreground-secondary);
35
35
  }
36
36
 
37
37
  &__headline {
38
- margin-bottom: sp.$space;
39
- font-size: fn.px-to-em(20);
38
+ margin-bottom: var(--cp-spacing-md);
39
+ font-size: var(--cp-text-size-xl);
40
40
  }
41
41
 
42
42
  &__description {
43
- color: colors.$neutral-dark-1;
43
+ color: var(--cp-text-secondary);
44
44
  }
45
45
  }
46
46
  </style>