@dataloop-ai/components 0.17.103 → 0.17.105

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.17.103",
3
+ "version": "0.17.105",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -401,6 +401,15 @@ export default defineComponent({
401
401
  }
402
402
  return classes
403
403
  },
404
+ getBorderColor(): string {
405
+ if (this.error) {
406
+ return `var(--dl-color-negative)`
407
+ } else if (this.warning) {
408
+ return `var(--dl-color-warning)`
409
+ } else {
410
+ return `var(--dl-color-secondary)`
411
+ }
412
+ },
404
413
  cssVars(): Record<string, any> {
405
414
  let inputMargin = this.margin
406
415
 
@@ -408,7 +417,8 @@ export default defineComponent({
408
417
  inputMargin = '0px 20px 0px 0px'
409
418
  }
410
419
  return {
411
- '--dl-input-margin': inputMargin
420
+ '--dl-input-margin': inputMargin,
421
+ '--dl-input-border-color-hover': this.getBorderColor
412
422
  }
413
423
  },
414
424
  inputClasses(): string[] {
@@ -450,7 +460,10 @@ export default defineComponent({
450
460
  ]
451
461
  },
452
462
  isSmall(): boolean {
453
- return this.size === InputSizes.s
463
+ return (
464
+ this.size === (InputSizes.s as TInputSizes) ||
465
+ this.size === (InputSizes.small as TInputSizes)
466
+ )
454
467
  },
455
468
  hasPrepend(): boolean {
456
469
  return !!this.$slots.prepend && !this.isSmall
@@ -664,6 +677,9 @@ export default defineComponent({
664
677
  &--s {
665
678
  margin: 4px auto auto;
666
679
  }
680
+ &--small {
681
+ margin: 4px auto auto;
682
+ }
667
683
  }
668
684
 
669
685
  &__title {
@@ -696,6 +712,9 @@ export default defineComponent({
696
712
  &--s {
697
713
  padding: 0px 10px;
698
714
  }
715
+ &--small {
716
+ padding: 0px 10px;
717
+ }
699
718
  }
700
719
 
701
720
  &__input-wrapper {
@@ -735,6 +754,10 @@ export default defineComponent({
735
754
  padding-top: 7px;
736
755
  padding-bottom: 7px;
737
756
  }
757
+ &--medium {
758
+ padding-top: 7px;
759
+ padding-bottom: 7px;
760
+ }
738
761
 
739
762
  &--s {
740
763
  padding-top: 3px;
@@ -742,18 +765,22 @@ export default defineComponent({
742
765
  padding-left: 5px;
743
766
  padding-right: 5px;
744
767
  }
768
+ &--small {
769
+ padding-top: 3px;
770
+ padding-bottom: 3px;
771
+ padding-left: 5px;
772
+ padding-right: 5px;
773
+ }
745
774
 
746
775
  &--error {
747
776
  border-color: var(--dl-color-negative);
748
777
  &:hover {
749
- border-color: var(--dl-color-separator) !important;
750
778
  }
751
779
  }
752
780
 
753
781
  &--warning {
754
- border-color: var(--dl-color-warning);
782
+ border-color: var(--dl-input-border-color-hover);
755
783
  &:hover {
756
- border-color: var(--dl-color-separator) !important;
757
784
  }
758
785
  }
759
786
 
@@ -763,11 +790,11 @@ export default defineComponent({
763
790
  }
764
791
 
765
792
  &:hover {
766
- border-color: var(--dl-color-secondary);
793
+ border-color: var(--dl-input-border-color-hover);
767
794
  }
768
795
 
769
796
  &:focus {
770
- border-color: var(--dl-color-secondary);
797
+ border-color: var(--dl-input-border-color-hover);
771
798
  }
772
799
 
773
800
  &:disabled {
@@ -795,14 +822,26 @@ export default defineComponent({
795
822
  height: 34px;
796
823
  }
797
824
 
825
+ &--large {
826
+ height: 34px;
827
+ }
828
+
798
829
  &--m {
799
830
  height: 28px;
800
831
  }
801
832
 
833
+ &--medium {
834
+ height: 28px;
835
+ }
836
+
802
837
  &--s {
803
838
  height: 20px;
804
839
  }
805
840
 
841
+ &--small {
842
+ height: 20px;
843
+ }
844
+
806
845
  &--pos-left {
807
846
  top: 0;
808
847
  left: 0;
@@ -636,7 +636,10 @@ export default defineComponent({
636
636
  return classes
637
637
  },
638
638
  isSmall(): boolean {
639
- return this.size === InputSizes.s
639
+ return (
640
+ this.size === (InputSizes.s as TInputSizes) ||
641
+ this.size === (InputSizes.small as TInputSizes)
642
+ )
640
643
  },
641
644
  hasPrepend(): boolean {
642
645
  if (isVue2) {
@@ -870,6 +873,10 @@ export default defineComponent({
870
873
  display: flex;
871
874
  align-items: center;
872
875
  }
876
+ &--small {
877
+ display: flex;
878
+ align-items: center;
879
+ }
873
880
  &--placeholder {
874
881
  color: var(--placeholder-color);
875
882
  }
@@ -880,7 +887,7 @@ export default defineComponent({
880
887
  align-items: center;
881
888
  color: var(--dl-color-lighter);
882
889
 
883
- &--s {
890
+ &--small {
884
891
  margin-right: 5px;
885
892
  margin-bottom: 0px;
886
893
  }
@@ -965,6 +972,10 @@ export default defineComponent({
965
972
  padding-top: 7px;
966
973
  padding-bottom: 7px;
967
974
  }
975
+ &--medium {
976
+ padding-top: 7px;
977
+ padding-bottom: 7px;
978
+ }
968
979
 
969
980
  &--s {
970
981
  padding-top: 3px;
@@ -973,6 +984,13 @@ export default defineComponent({
973
984
  padding-right: 5px;
974
985
  width: calc(100% - 10px);
975
986
  }
987
+ &--small {
988
+ padding-top: 3px;
989
+ padding-bottom: 3px;
990
+ padding-left: 5px;
991
+ padding-right: 5px;
992
+ width: calc(100% - 10px);
993
+ }
976
994
 
977
995
  &--has-selection {
978
996
  color: var(--dl-color-medium);
@@ -1067,14 +1085,26 @@ export default defineComponent({
1067
1085
  height: 34px;
1068
1086
  }
1069
1087
 
1088
+ &--large {
1089
+ height: 34px;
1090
+ }
1091
+
1070
1092
  &--m {
1071
1093
  height: 28px;
1072
1094
  }
1073
1095
 
1096
+ &--medium {
1097
+ height: 28px;
1098
+ }
1099
+
1074
1100
  &--s {
1075
1101
  height: 20px;
1076
1102
  }
1077
1103
 
1104
+ &--small {
1105
+ height: 20px;
1106
+ }
1107
+
1078
1108
  &--pos-left {
1079
1109
  top: 0;
1080
1110
  left: 0;
@@ -13,7 +13,10 @@ export const getLabel = (option: any) => {
13
13
  const ICON_SIZES = {
14
14
  s: '12px',
15
15
  m: '14px',
16
- l: '16px'
16
+ l: '16px',
17
+ small: '12px',
18
+ medium: '14px',
19
+ large: '16px'
17
20
  }
18
21
 
19
22
  export const getLabelOfSelectedOption = (
@@ -1,7 +1,10 @@
1
1
  export const InputSizes = {
2
2
  l: 'l',
3
3
  m: 'm',
4
- s: 's'
4
+ s: 's',
5
+ large: 'large',
6
+ medium: 'medium',
7
+ small: 'small'
5
8
  } as const
6
9
 
7
- export type TInputSizes = typeof InputSizes[keyof typeof InputSizes]
10
+ export type TInputSizes = (typeof InputSizes)[keyof typeof InputSizes]