@triptease/stylesheet 1.2.2 → 1.3.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.
package/dist/base.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  @import url('https://fonts.googleapis.com/css?family=Roboto:400,500') layer(base);
5
5
  @import url('https://fonts.googleapis.com/css?family=Inter:300,500,600,700') layer(base);
@@ -611,6 +611,61 @@ button,
611
611
  }
612
612
  }
613
613
  @layer base{
614
+ @property --input-horizontal-spacing {
615
+ syntax: '<length>';
616
+ inherits: true;
617
+ initial-value: 1rem;
618
+ }
619
+
620
+ @property --input-background-color {
621
+ syntax: '<color>';
622
+ inherits: true;
623
+ initial-value: #FFFFFF;
624
+ }
625
+
626
+ @property --input-border-color {
627
+ syntax: '<color>';
628
+ inherits: true;
629
+ initial-value: #C5C8CE;
630
+ }
631
+
632
+ @property --input-border-width {
633
+ syntax: '<length>';
634
+ inherits: true;
635
+ initial-value: 1px;
636
+ }
637
+
638
+ @property --input-color {
639
+ syntax: '*';
640
+ inherits: true;
641
+ initial-value: inherit;
642
+ }
643
+
644
+ @property --input-height {
645
+ syntax: '<length>';
646
+ inherits: true;
647
+ initial-value: 2.5rem;
648
+ }
649
+
650
+ @property --input-vertical-spacing {
651
+ syntax: '<length>';
652
+ inherits: true;
653
+ initial-value: 0;
654
+ }
655
+
656
+ @property --placeholder-color {
657
+ syntax: '<color>';
658
+ inherits: true;
659
+ initial-value: #575157;
660
+ }
661
+
662
+ @property --input-focus-border-color {
663
+ syntax: '<color>';
664
+ inherits: true;
665
+ initial-value: #5E43C2;
666
+ }
667
+ }
668
+ @layer base{
614
669
 
615
670
  @property --checkbox-size {
616
671
  syntax: '<length>';
@@ -812,7 +867,7 @@ input[type='number'] {
812
867
  input[type='number']::-webkit-inner-spin-button {
813
868
  position: absolute;
814
869
  top: var(--space-scale-0-5);
815
- right: var(--input-horizontal-spacing);
870
+ right: var(--input-horizontal-spacing, var(--space-scale-2));
816
871
  height: calc(100% - var(--space-scale-1));
817
872
  }
818
873
  }
@@ -876,60 +931,110 @@ input[type='radio'] {
876
931
  }
877
932
  @layer base{
878
933
 
879
- @property --input-horizontal-spacing {
880
- syntax: '<length>';
934
+ @property --select-border-color {
935
+ syntax: '<color>';
881
936
  inherits: true;
882
- initial-value: 1rem;
937
+ initial-value: #C5C8CE;
883
938
  }
884
939
 
885
- @property --input-background-color {
940
+ @property --select-background-color {
886
941
  syntax: '<color>';
887
942
  inherits: true;
888
943
  initial-value: #FFFFFF;
889
944
  }
890
945
 
891
- @property --input-border-color {
946
+ @property --select-hover-background-color {
892
947
  syntax: '<color>';
893
948
  inherits: true;
894
- initial-value: #C5C8CE;
949
+ initial-value: #F1F2F4;
895
950
  }
896
951
 
897
- @property --input-border-width {
952
+ @property --select-min-width {
898
953
  syntax: '<length>';
899
954
  inherits: true;
900
- initial-value: 1px;
955
+ initial-value: 250px;
901
956
  }
902
957
 
903
- @property --input-color {
904
- syntax: '*';
905
- inherits: true;
906
- initial-value: inherit;
907
- }
908
-
909
- @property --input-height {
958
+ @property --select-max-width {
910
959
  syntax: '<length>';
911
960
  inherits: true;
912
- initial-value: 2.5rem;
961
+ initial-value: 300px;
913
962
  }
914
963
 
915
- @property --input-vertical-spacing {
916
- syntax: '<length>';
917
- inherits: true;
918
- initial-value: 0;
919
- }
964
+ select {
965
+ align-items: center;
966
+ background-color: var(--select-background-color);
967
+ border-style: solid;
968
+ border-width: 1px;
969
+ border-radius: var(--border-radius);
970
+ border-color: var(--select-border-color);
971
+ color: var(--color-text-400);
972
+ display: flex;
973
+ font-family: var(--font-family-sans);
974
+ font-size: var(--font-size-200);
975
+ line-height: 1.3;
976
+ max-width: var(--select-max-width);
977
+ min-width: var(--select-min-width);
978
+ padding: 0.5rem;
920
979
 
921
- @property --placeholder-color {
922
- syntax: '<color>';
923
- inherits: true;
924
- initial-value: #575157;
925
- }
980
+ &::picker-icon {
981
+ content: '';
982
+ height: 12px;
983
+ width: 12px;
926
984
 
927
- @property --input-focus-border-color {
928
- syntax: '<color>';
929
- inherits: true;
930
- initial-value: #5E43C2;
985
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentcolor" width="12" height="12" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" stroke="currentcolor"/></svg>');
986
+ background-size: cover;
987
+ transition: rotate 0.2s allow-discrete;
988
+ }
989
+
990
+ &:open::picker-icon {
991
+ rotate: -180deg;
992
+ }
993
+
994
+ &:hover {
995
+ background-color: var(--select-hover-background-color);
996
+ }
931
997
  }
932
998
 
999
+ @supports ((-webkit-appearance: base-select) or (-moz-appearance: base-select) or (appearance: base-select)) {
1000
+ select,
1001
+ ::picker(select) {
1002
+ -webkit-appearance: base-select;
1003
+ -moz-appearance: base-select;
1004
+ appearance: base-select;
1005
+ }
1006
+
1007
+ ::picker(select) {
1008
+ border: 1px solid var(--select-border-color);
1009
+ border-radius: var(--border-radius);
1010
+ top: calc(anchor(bottom) + var(--space-scale-1));
1011
+ }
1012
+
1013
+ option {
1014
+ text-align: left;
1015
+ padding: var(--space-scale-1);
1016
+ font-size: var(--font-size-200);
1017
+ font-weight: var(--font-weight-normal);
1018
+ color: var(--color-text-400);
1019
+ line-height: 1.1;
1020
+ box-sizing: border-box;
1021
+ }
1022
+
1023
+ option:is(:hover, :focus) {
1024
+ background-color: var(--select-hover-background-color);
1025
+ outline: none;
1026
+ }
1027
+ option:checked {
1028
+ font-weight: var(--font-weight-medium);
1029
+ color: var(--color-primary-400);
1030
+ }
1031
+
1032
+ option::checkmark {
1033
+ display: none;
1034
+ }
1035
+ }
1036
+ }
1037
+ @layer base{
933
1038
  input:not([type='checkbox'], [type='radio']),
934
1039
  textarea {
935
1040
  -webkit-appearance: none;
package/dist/blocks.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  /*
5
5
  Suppress "invalid at-rule" warnings: @import-glob is a build-time feature
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  /*
5
5
  Suppress "invalid at-rule" warnings: @import-glob is a build-time feature
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  /*
5
5
  Suppress "invalid at-rule" warnings: @import-glob is a build-time feature
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  @import url('https://fonts.googleapis.com/css?family=Roboto:400,500') layer(base);
5
5
  @import url('https://fonts.googleapis.com/css?family=Inter:300,500,600,700') layer(base);
@@ -611,6 +611,61 @@ button,
611
611
  }
612
612
  }
613
613
  @layer base{
614
+ @property --input-horizontal-spacing {
615
+ syntax: '<length>';
616
+ inherits: true;
617
+ initial-value: 1rem;
618
+ }
619
+
620
+ @property --input-background-color {
621
+ syntax: '<color>';
622
+ inherits: true;
623
+ initial-value: #FFFFFF;
624
+ }
625
+
626
+ @property --input-border-color {
627
+ syntax: '<color>';
628
+ inherits: true;
629
+ initial-value: #C5C8CE;
630
+ }
631
+
632
+ @property --input-border-width {
633
+ syntax: '<length>';
634
+ inherits: true;
635
+ initial-value: 1px;
636
+ }
637
+
638
+ @property --input-color {
639
+ syntax: '*';
640
+ inherits: true;
641
+ initial-value: inherit;
642
+ }
643
+
644
+ @property --input-height {
645
+ syntax: '<length>';
646
+ inherits: true;
647
+ initial-value: 2.5rem;
648
+ }
649
+
650
+ @property --input-vertical-spacing {
651
+ syntax: '<length>';
652
+ inherits: true;
653
+ initial-value: 0;
654
+ }
655
+
656
+ @property --placeholder-color {
657
+ syntax: '<color>';
658
+ inherits: true;
659
+ initial-value: #575157;
660
+ }
661
+
662
+ @property --input-focus-border-color {
663
+ syntax: '<color>';
664
+ inherits: true;
665
+ initial-value: #5E43C2;
666
+ }
667
+ }
668
+ @layer base{
614
669
 
615
670
  @property --checkbox-size {
616
671
  syntax: '<length>';
@@ -812,7 +867,7 @@ input[type='number'] {
812
867
  input[type='number']::-webkit-inner-spin-button {
813
868
  position: absolute;
814
869
  top: var(--space-scale-0-5);
815
- right: var(--input-horizontal-spacing);
870
+ right: var(--input-horizontal-spacing, var(--space-scale-2));
816
871
  height: calc(100% - var(--space-scale-1));
817
872
  }
818
873
  }
@@ -876,60 +931,110 @@ input[type='radio'] {
876
931
  }
877
932
  @layer base{
878
933
 
879
- @property --input-horizontal-spacing {
880
- syntax: '<length>';
934
+ @property --select-border-color {
935
+ syntax: '<color>';
881
936
  inherits: true;
882
- initial-value: 1rem;
937
+ initial-value: #C5C8CE;
883
938
  }
884
939
 
885
- @property --input-background-color {
940
+ @property --select-background-color {
886
941
  syntax: '<color>';
887
942
  inherits: true;
888
943
  initial-value: #FFFFFF;
889
944
  }
890
945
 
891
- @property --input-border-color {
946
+ @property --select-hover-background-color {
892
947
  syntax: '<color>';
893
948
  inherits: true;
894
- initial-value: #C5C8CE;
949
+ initial-value: #F1F2F4;
895
950
  }
896
951
 
897
- @property --input-border-width {
952
+ @property --select-min-width {
898
953
  syntax: '<length>';
899
954
  inherits: true;
900
- initial-value: 1px;
955
+ initial-value: 250px;
901
956
  }
902
957
 
903
- @property --input-color {
904
- syntax: '*';
905
- inherits: true;
906
- initial-value: inherit;
907
- }
908
-
909
- @property --input-height {
958
+ @property --select-max-width {
910
959
  syntax: '<length>';
911
960
  inherits: true;
912
- initial-value: 2.5rem;
961
+ initial-value: 300px;
913
962
  }
914
963
 
915
- @property --input-vertical-spacing {
916
- syntax: '<length>';
917
- inherits: true;
918
- initial-value: 0;
919
- }
964
+ select {
965
+ align-items: center;
966
+ background-color: var(--select-background-color);
967
+ border-style: solid;
968
+ border-width: 1px;
969
+ border-radius: var(--border-radius);
970
+ border-color: var(--select-border-color);
971
+ color: var(--color-text-400);
972
+ display: flex;
973
+ font-family: var(--font-family-sans);
974
+ font-size: var(--font-size-200);
975
+ line-height: 1.3;
976
+ max-width: var(--select-max-width);
977
+ min-width: var(--select-min-width);
978
+ padding: 0.5rem;
920
979
 
921
- @property --placeholder-color {
922
- syntax: '<color>';
923
- inherits: true;
924
- initial-value: #575157;
925
- }
980
+ &::picker-icon {
981
+ content: '';
982
+ height: 12px;
983
+ width: 12px;
926
984
 
927
- @property --input-focus-border-color {
928
- syntax: '<color>';
929
- inherits: true;
930
- initial-value: #5E43C2;
985
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="currentcolor" width="12" height="12" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z" stroke="currentcolor"/></svg>');
986
+ background-size: cover;
987
+ transition: rotate 0.2s allow-discrete;
988
+ }
989
+
990
+ &:open::picker-icon {
991
+ rotate: -180deg;
992
+ }
993
+
994
+ &:hover {
995
+ background-color: var(--select-hover-background-color);
996
+ }
931
997
  }
932
998
 
999
+ @supports ((-webkit-appearance: base-select) or (-moz-appearance: base-select) or (appearance: base-select)) {
1000
+ select,
1001
+ ::picker(select) {
1002
+ -webkit-appearance: base-select;
1003
+ -moz-appearance: base-select;
1004
+ appearance: base-select;
1005
+ }
1006
+
1007
+ ::picker(select) {
1008
+ border: 1px solid var(--select-border-color);
1009
+ border-radius: var(--border-radius);
1010
+ top: calc(anchor(bottom) + var(--space-scale-1));
1011
+ }
1012
+
1013
+ option {
1014
+ text-align: left;
1015
+ padding: var(--space-scale-1);
1016
+ font-size: var(--font-size-200);
1017
+ font-weight: var(--font-weight-normal);
1018
+ color: var(--color-text-400);
1019
+ line-height: 1.1;
1020
+ box-sizing: border-box;
1021
+ }
1022
+
1023
+ option:is(:hover, :focus) {
1024
+ background-color: var(--select-hover-background-color);
1025
+ outline: none;
1026
+ }
1027
+ option:checked {
1028
+ font-weight: var(--font-weight-medium);
1029
+ color: var(--color-primary-400);
1030
+ }
1031
+
1032
+ option::checkmark {
1033
+ display: none;
1034
+ }
1035
+ }
1036
+ }
1037
+ @layer base{
933
1038
  input:not([type='checkbox'], [type='radio']),
934
1039
  textarea {
935
1040
  -webkit-appearance: none;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @triptease/stylesheet v1.2.2
2
+ * @triptease/stylesheet v1.3.0
3
3
  */
4
4
  /*
5
5
  Suppress "invalid at-rule" warnings: @import-glob is a build-time feature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triptease/stylesheet",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "The stylesheet for the Triptease design system",
5
5
  "main": "dist/triptease.css",
6
6
  "type": "module",