@dragunio/fe-libs 0.1.3 → 0.1.5

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/styles.css CHANGED
@@ -507,23 +507,52 @@ table[data-fe-table] tbody tr:hover {
507
507
  }
508
508
  }
509
509
 
510
- /* packages/form-controls/src/styles.css */
511
- .fe-selection,
512
- .fe-number-input,
513
- .fe-datetime-picker,
514
- .fe-text-input,
515
- .fe-text-area {
510
+ /* packages/form-controls/src/controls/Field/style.css */
511
+ .fe-field__label {
512
+ display: inline-flex;
513
+ align-items: center;
514
+ gap: 6px;
515
+ font-size: 13px;
516
+ font-weight: 600;
517
+ }
518
+ .fe-field__required {
519
+ color: #d83d55;
520
+ }
521
+ .fe-field__info {
522
+ display: inline-grid;
523
+ width: 16px;
524
+ height: 16px;
525
+ place-items: center;
526
+ border: 1px solid #98a2b3;
527
+ border-radius: 50%;
528
+ color: #687183;
529
+ font-size: 10px;
530
+ font-style: normal;
531
+ font-weight: 800;
532
+ line-height: 1;
533
+ outline: 0;
534
+ }
535
+ .fe-field__info:focus-visible {
536
+ box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
537
+ }
538
+ .fe-field__message {
539
+ color: #687183;
540
+ font-size: 12px;
541
+ line-height: 1.4;
542
+ }
543
+ .fe-field__message--error {
544
+ color: #b92c43;
545
+ }
546
+
547
+ /* packages/form-controls/src/controls/Selection/style.css */
548
+ .fe-selection {
516
549
  display: grid;
517
550
  min-width: 0;
518
551
  gap: 6px;
519
- font: inherit;
520
552
  color: #20242c;
553
+ font: inherit;
521
554
  }
522
- .fe-selection__label,
523
- .fe-number-input__label,
524
- .fe-datetime-picker__label,
525
- .fe-text-input__label,
526
- .fe-text-area__label {
555
+ .fe-selection__label {
527
556
  font-size: 13px;
528
557
  font-weight: 600;
529
558
  }
@@ -532,30 +561,25 @@ table[data-fe-table] tbody tr:hover {
532
561
  width: 100%;
533
562
  min-width: 0;
534
563
  }
535
- .fe-selection__trigger,
536
- .fe-number-input input,
537
- .fe-text-input input,
538
- .fe-text-area textarea {
564
+ .fe-selection__trigger {
565
+ display: flex;
566
+ align-items: center;
539
567
  width: 100%;
540
- min-height: 42px;
568
+ min-height: 40px;
541
569
  padding: 0 13px;
542
570
  border: 1px solid #d4d8e0;
543
571
  border-radius: 12px;
572
+ outline: 0;
544
573
  background: #fff;
545
574
  color: #20242c;
546
575
  font: inherit;
547
- outline: 0;
576
+ text-align: left;
577
+ cursor: pointer;
548
578
  transition:
549
579
  border-color 0.15s,
550
580
  box-shadow 0.15s,
551
581
  background 0.15s;
552
582
  }
553
- .fe-selection__trigger {
554
- display: flex;
555
- align-items: center;
556
- text-align: left;
557
- cursor: pointer;
558
- }
559
583
  .fe-selection--clearable .fe-selection__trigger {
560
584
  padding-right: 64px;
561
585
  }
@@ -568,11 +592,7 @@ table[data-fe-table] tbody tr:hover {
568
592
  border-color: #aab0bb;
569
593
  background: #fcfdff;
570
594
  }
571
- .fe-selection__trigger:focus-visible,
572
- .fe-number-input input:focus,
573
- .fe-datetime-picker__trigger:focus-visible,
574
- .fe-text-input input:focus,
575
- .fe-text-area textarea:focus {
595
+ .fe-selection__trigger:focus-visible {
576
596
  border-color: #2878f0;
577
597
  box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
578
598
  }
@@ -607,12 +627,12 @@ table[data-fe-table] tbody tr:hover {
607
627
  gap: 4px;
608
628
  max-width: 100%;
609
629
  padding: 3px 7px;
630
+ overflow: hidden;
610
631
  border-radius: 7px;
611
632
  background: #e7f1ff;
612
633
  color: #1e60cc;
613
634
  font-size: 12px;
614
635
  font-weight: 600;
615
- overflow: hidden;
616
636
  text-overflow: ellipsis;
617
637
  white-space: nowrap;
618
638
  }
@@ -626,22 +646,22 @@ table[data-fe-table] tbody tr:hover {
626
646
  right: 14px;
627
647
  width: 16px;
628
648
  height: 16px;
629
- transform: translateY(-50%);
630
649
  pointer-events: none;
650
+ transform: translateY(-50%);
631
651
  }
632
652
  .fe-selection__clear {
633
653
  position: absolute;
634
654
  z-index: 1;
635
655
  top: 50%;
636
- right: 40px;
656
+ right: 32px;
637
657
  display: grid;
638
- place-items: center;
639
- width: 16px;
640
- height: 16px;
658
+ width: 32px;
659
+ height: 32px;
641
660
  margin: 0;
642
661
  padding: 0;
643
662
  border: 0;
644
663
  border-radius: 50%;
664
+ place-items: center;
645
665
  background: transparent;
646
666
  color: #697386;
647
667
  cursor: pointer;
@@ -650,9 +670,9 @@ table[data-fe-table] tbody tr:hover {
650
670
  .fe-selection__clear::before,
651
671
  .fe-selection__clear::after {
652
672
  position: absolute;
653
- top: 7px;
654
- left: 2px;
655
- width: 12px;
673
+ top: 15px;
674
+ left: 9px;
675
+ width: 14px;
656
676
  height: 2px;
657
677
  border-radius: 999px;
658
678
  background: currentColor;
@@ -767,22 +787,14 @@ table[data-fe-table] tbody tr:hover {
767
787
  font-size: 13px;
768
788
  text-align: center;
769
789
  }
770
- .fe-selection__helper,
771
- .fe-number-input__helper {
790
+ .fe-selection__helper {
772
791
  color: #687183;
773
792
  font-size: 12px;
774
793
  }
775
- .fe-selection--error .fe-selection__trigger,
776
- .fe-number-input--error input,
777
- .fe-text-input--error input,
778
- .fe-text-area--error textarea {
794
+ .fe-selection--error .fe-selection__trigger {
779
795
  border-color: #d83d55;
780
796
  }
781
- .fe-selection--error .fe-selection__helper,
782
- .fe-number-input--error .fe-number-input__helper,
783
- .fe-number-input__error,
784
- .fe-text-input__error,
785
- .fe-text-area__error {
797
+ .fe-selection--error .fe-selection__helper {
786
798
  color: #b92c43;
787
799
  }
788
800
  .fe-selection--disabled {
@@ -791,88 +803,389 @@ table[data-fe-table] tbody tr:hover {
791
803
  .fe-selection--disabled .fe-selection__trigger {
792
804
  cursor: not-allowed;
793
805
  }
806
+ @keyframes fe-selection-in {
807
+ from {
808
+ opacity: 0;
809
+ transform: translateY(-4px);
810
+ }
811
+ to {
812
+ opacity: 1;
813
+ transform: translateY(0);
814
+ }
815
+ }
816
+
817
+ /* packages/form-controls/src/controls/NumberInput/style.css */
818
+ .fe-number-input {
819
+ display: grid;
820
+ min-width: 0;
821
+ gap: 6px;
822
+ color: #20242c;
823
+ font: inherit;
824
+ }
825
+ .fe-number-input__label {
826
+ font-size: 13px;
827
+ font-weight: 600;
828
+ }
794
829
  .fe-number-input input {
830
+ width: 100%;
831
+ min-height: 40px;
832
+ padding: 0 13px;
795
833
  padding-right: 13px;
834
+ border: 1px solid #d4d8e0;
835
+ border-radius: 12px;
836
+ outline: 0;
837
+ background: #fff;
838
+ color: #20242c;
839
+ font: inherit;
840
+ transition:
841
+ border-color 0.15s,
842
+ box-shadow 0.15s,
843
+ background 0.15s;
796
844
  }
797
- .fe-text-input__control,
798
- .fe-text-area__control {
845
+ .fe-number-input input:focus {
846
+ border-color: #2878f0;
847
+ box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
848
+ }
849
+ .fe-number-input--error input {
850
+ border-color: #d83d55;
851
+ }
852
+ .fe-number-input__control {
799
853
  position: relative;
800
854
  display: block;
801
855
  }
802
- .fe-text-input input,
803
- .fe-text-area textarea {
856
+ .fe-number-input__placeholder {
857
+ position: absolute;
858
+ top: 50%;
859
+ left: 13px;
860
+ display: inline-flex;
861
+ gap: 4px;
862
+ align-items: center;
863
+ max-width: calc(100% - 26px);
864
+ overflow: hidden;
865
+ color: #8b94a4;
866
+ pointer-events: none;
867
+ transform: translateY(-50%);
868
+ white-space: nowrap;
869
+ }
870
+ .fe-number-input__placeholder > span:first-child {
871
+ overflow: hidden;
872
+ text-overflow: ellipsis;
873
+ }
874
+ .fe-number-input__control:has(.fe-number-input__placeholder) input::placeholder {
875
+ color: transparent;
876
+ }
877
+ .fe-number-input__helper {
878
+ color: #687183;
879
+ font-size: 12px;
880
+ }
881
+ .fe-number-input--error .fe-number-input__helper,
882
+ .fe-number-input__error {
883
+ color: #b92c43;
884
+ }
885
+ .fe-number-input__error {
886
+ font-size: 12px;
887
+ }
888
+
889
+ /* packages/form-controls/src/controls/TextInput/style.css */
890
+ .fe-text-input {
891
+ display: grid;
892
+ min-width: 0;
893
+ gap: 6px;
894
+ color: #20242c;
895
+ font: inherit;
896
+ }
897
+ .fe-text-input__label {
898
+ font-size: 13px;
899
+ font-weight: 600;
900
+ }
901
+ .fe-text-input input {
902
+ width: 100%;
903
+ min-height: 40px;
904
+ padding: 0 13px;
905
+ border: 1px solid #d4d8e0;
906
+ border-radius: 12px;
907
+ outline: 0;
908
+ background: #fff;
909
+ color: #20242c;
910
+ font: inherit;
911
+ transition:
912
+ border-color 0.15s,
913
+ box-shadow 0.15s,
914
+ background 0.15s;
915
+ }
916
+ .fe-text-input__control {
917
+ position: relative;
918
+ display: flex;
919
+ align-items: center;
920
+ min-height: 40px;
921
+ border: 1px solid #d4d8e0;
922
+ border-radius: 12px;
923
+ background: #fff;
924
+ transition:
925
+ border-color 0.15s,
926
+ box-shadow 0.15s,
927
+ background 0.15s;
928
+ }
929
+ .fe-text-input__control:hover {
930
+ border-color: #aab0bb;
931
+ background: #fcfdff;
932
+ }
933
+ .fe-text-input__control:focus-within {
934
+ border-color: #2878f0;
935
+ box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
936
+ }
937
+ .fe-text-input--error .fe-text-input__control {
938
+ border-color: #d83d55;
939
+ }
940
+ .fe-text-input__input-wrap {
941
+ position: relative;
942
+ display: flex;
943
+ min-width: 0;
944
+ flex: 1 1 auto;
945
+ align-self: stretch;
946
+ }
947
+ .fe-text-input input {
804
948
  display: block;
805
949
  box-sizing: border-box;
806
950
  }
951
+ .fe-text-input__control input,
952
+ .fe-text-input__control input:focus {
953
+ min-width: 0;
954
+ min-height: 38px;
955
+ flex: 1 1 auto;
956
+ border: 0;
957
+ border-radius: 11px;
958
+ background: transparent;
959
+ box-shadow: none;
960
+ }
961
+ .fe-text-input__prefix,
962
+ .fe-text-input__suffix {
963
+ z-index: 1;
964
+ display: inline-flex;
965
+ flex: 0 0 auto;
966
+ align-items: center;
967
+ color: #535b6a;
968
+ font-size: 13px;
969
+ white-space: nowrap;
970
+ }
971
+ .fe-text-input__prefix {
972
+ margin-right: -5px;
973
+ padding-left: 13px;
974
+ }
975
+ .fe-text-input__suffix {
976
+ margin-left: -5px;
977
+ padding-right: 13px;
978
+ }
979
+ .fe-text-input__placeholder {
980
+ position: absolute;
981
+ top: 50%;
982
+ left: 13px;
983
+ display: inline-flex;
984
+ gap: 4px;
985
+ align-items: center;
986
+ max-width: calc(100% - 26px);
987
+ overflow: hidden;
988
+ color: #8b94a4;
989
+ pointer-events: none;
990
+ transform: translateY(-50%);
991
+ white-space: nowrap;
992
+ }
993
+ .fe-text-input__placeholder > span:first-child {
994
+ overflow: hidden;
995
+ text-overflow: ellipsis;
996
+ }
997
+ .fe-text-input__input-wrap:has(.fe-text-input__placeholder) input::placeholder {
998
+ color: transparent;
999
+ }
1000
+ .fe-text-input__clear.fe-button {
1001
+ z-index: 1;
1002
+ width: 32px;
1003
+ min-width: 32px;
1004
+ height: 32px;
1005
+ min-height: 32px;
1006
+ flex: 0 0 32px;
1007
+ margin-right: 4px;
1008
+ padding: 4px;
1009
+ border-radius: 50%;
1010
+ cursor: pointer;
1011
+ }
1012
+ .fe-text-input__helper {
1013
+ color: #687183;
1014
+ font-size: 12px;
1015
+ }
1016
+ .fe-text-input__error {
1017
+ color: #b92c43;
1018
+ font-size: 12px;
1019
+ }
1020
+
1021
+ /* packages/form-controls/src/controls/TextArea/style.css */
1022
+ .fe-text-area {
1023
+ display: grid;
1024
+ min-width: 0;
1025
+ gap: 6px;
1026
+ color: #20242c;
1027
+ font: inherit;
1028
+ }
1029
+ .fe-text-area__label {
1030
+ font-size: 13px;
1031
+ font-weight: 600;
1032
+ }
807
1033
  .fe-text-area textarea {
808
- min-height: 96px;
1034
+ display: block;
1035
+ box-sizing: border-box;
1036
+ width: 100%;
1037
+ min-height: 40px;
1038
+ padding: 0 13px;
809
1039
  padding-top: 10px;
810
1040
  padding-bottom: 10px;
1041
+ border: 1px solid #d4d8e0;
1042
+ border-radius: 12px;
1043
+ outline: 0;
811
1044
  resize: vertical;
1045
+ background: #fff;
1046
+ color: #20242c;
1047
+ font: inherit;
1048
+ transition:
1049
+ border-color 0.15s,
1050
+ box-shadow 0.15s,
1051
+ background 0.15s;
812
1052
  }
813
- .fe-text-input__clear.fe-button,
814
- .fe-text-area__clear.fe-button {
1053
+ .fe-text-area__control {
1054
+ position: relative;
1055
+ display: flex;
1056
+ align-items: center;
1057
+ min-height: 40px;
1058
+ border: 1px solid #d4d8e0;
1059
+ border-radius: 12px;
1060
+ background: #fff;
1061
+ transition:
1062
+ border-color 0.15s,
1063
+ box-shadow 0.15s,
1064
+ background 0.15s;
1065
+ }
1066
+ .fe-text-area__control:hover {
1067
+ border-color: #aab0bb;
1068
+ background: #fcfdff;
1069
+ }
1070
+ .fe-text-area__control:focus-within {
1071
+ border-color: #2878f0;
1072
+ box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
1073
+ }
1074
+ .fe-text-area--error .fe-text-area__control {
1075
+ border-color: #d83d55;
1076
+ }
1077
+ .fe-text-area__control textarea,
1078
+ .fe-text-area__control textarea:focus {
1079
+ min-width: 0;
1080
+ flex: 1 1 auto;
1081
+ align-self: stretch;
1082
+ border: 0;
1083
+ border-radius: 11px;
1084
+ background: transparent;
1085
+ box-shadow: none;
1086
+ }
1087
+ .fe-text-area__placeholder {
815
1088
  position: absolute;
816
- top: 50%;
817
- right: 8px;
818
- min-width: 24px;
819
- min-height: 24px;
820
- padding: 4px;
821
- border-radius: 50%;
822
- transform: translateY(-50%);
1089
+ top: 10px;
1090
+ left: 13px;
1091
+ display: inline-flex;
1092
+ gap: 4px;
1093
+ align-items: center;
1094
+ max-width: calc(100% - 26px);
1095
+ overflow: hidden;
1096
+ color: #8b94a4;
1097
+ pointer-events: none;
1098
+ white-space: nowrap;
823
1099
  }
824
- .fe-text-input:has(.fe-text-input__clear) input {
825
- padding-right: 42px;
1100
+ .fe-text-area__placeholder > span:first-child {
1101
+ overflow: hidden;
1102
+ text-overflow: ellipsis;
826
1103
  }
827
- .fe-text-area:has(.fe-text-area__clear) textarea {
828
- padding-right: 42px;
1104
+ .fe-text-area__control:has(.fe-text-area__placeholder) textarea::placeholder {
1105
+ color: transparent;
1106
+ }
1107
+ .fe-text-area__clear.fe-button {
1108
+ z-index: 1;
1109
+ width: 32px;
1110
+ min-width: 32px;
1111
+ height: 32px;
1112
+ min-height: 32px;
1113
+ flex: 0 0 32px;
1114
+ margin-right: 4px;
1115
+ padding: 4px;
1116
+ border-radius: 50%;
1117
+ cursor: pointer;
829
1118
  }
830
- .fe-text-input__helper,
831
1119
  .fe-text-area__helper {
832
1120
  color: #687183;
833
1121
  font-size: 12px;
834
1122
  }
835
- .fe-text-input__error,
836
- .fe-text-area__error,
837
- .fe-number-input__error {
1123
+ .fe-text-area__error {
1124
+ color: #b92c43;
838
1125
  font-size: 12px;
839
1126
  }
1127
+
1128
+ /* packages/form-controls/src/controls/CurrencyInput/style.css */
840
1129
  .fe-currency-input {
841
1130
  position: relative;
842
- display: flex;
843
- align-items: start;
844
- }
845
- .fe-currency-input__number {
846
- width: 100%;
847
1131
  }
848
- .fe-currency-input__number input {
1132
+ .fe-currency-input .fe-number-input__control input {
849
1133
  padding-right: 78px;
850
1134
  }
1135
+ .fe-currency-input:has(.fe-currency-input__currency) .fe-number-input__control input {
1136
+ padding-right: 110px;
1137
+ }
851
1138
  .fe-currency-input__suffix,
852
1139
  .fe-currency-input__currency {
853
1140
  position: absolute;
854
1141
  right: 11px;
855
- top: 8px;
856
1142
  color: #535b6a;
857
1143
  font: inherit;
858
1144
  font-size: 13px;
859
1145
  font-weight: 700;
860
1146
  }
1147
+ .fe-currency-input__suffix {
1148
+ top: 50%;
1149
+ transform: translateY(-50%);
1150
+ }
861
1151
  .fe-currency-input__currency {
862
- top: 7px;
863
- max-width: 90px;
1152
+ z-index: 2;
1153
+ top: 3px;
1154
+ right: 4px;
1155
+ width: 96px;
1156
+ }
1157
+ .fe-currency-input__currency .fe-selection__trigger {
1158
+ box-sizing: border-box;
1159
+ min-height: 34px;
1160
+ padding: 0 28px 0 8px;
864
1161
  border: 0;
865
1162
  border-left: 1px solid #d4d8e0;
866
- background: #fff;
867
- padding: 4px 0 4px 8px;
868
- outline: 0;
1163
+ border-radius: 0;
1164
+ background: transparent;
1165
+ color: inherit;
1166
+ font-size: 13px;
1167
+ font-weight: 700;
869
1168
  }
870
- .fe-currency-input:has(.fe-number-input__label) .fe-currency-input__suffix,
871
- .fe-currency-input:has(.fe-number-input__label) .fe-currency-input__currency {
872
- top: 31px;
1169
+ .fe-currency-input__currency .fe-selection__trigger:hover,
1170
+ .fe-currency-input__currency .fe-selection__trigger:focus-visible {
1171
+ background: transparent;
873
1172
  }
1173
+ .fe-currency-input__currency .fe-selection__actions {
1174
+ right: 7px;
1175
+ }
1176
+
1177
+ /* packages/form-controls/src/controls/DateTimePicker/style.css */
874
1178
  .fe-datetime-picker {
875
1179
  position: relative;
1180
+ display: grid;
1181
+ min-width: 0;
1182
+ gap: 6px;
1183
+ color: #20242c;
1184
+ font: inherit;
1185
+ }
1186
+ .fe-datetime-picker__label {
1187
+ font-size: 13px;
1188
+ font-weight: 600;
876
1189
  }
877
1190
  .fe-datetime-picker__trigger {
878
1191
  display: flex;
@@ -889,6 +1202,21 @@ table[data-fe-table] tbody tr:hover {
889
1202
  text-align: left;
890
1203
  cursor: pointer;
891
1204
  }
1205
+ .fe-datetime-picker__trigger:focus-visible {
1206
+ border-color: #2878f0;
1207
+ box-shadow: 0 0 0 3px rgba(40, 120, 240, 0.16);
1208
+ }
1209
+ .fe-datetime-picker--error .fe-datetime-picker__trigger {
1210
+ border-color: #d83d55;
1211
+ }
1212
+ .fe-datetime-picker__value {
1213
+ display: inline-flex;
1214
+ gap: 4px;
1215
+ align-items: center;
1216
+ }
1217
+ .fe-datetime-picker__value.is-placeholder {
1218
+ color: #8b94a4;
1219
+ }
892
1220
  .fe-datetime-picker__trigger:disabled {
893
1221
  opacity: 0.55;
894
1222
  cursor: not-allowed;
@@ -990,21 +1318,13 @@ table[data-fe-table] tbody tr:hover {
990
1318
  font-weight: 600;
991
1319
  }
992
1320
  .fe-datetime-picker__time input {
1321
+ padding: 5px;
993
1322
  border: 1px solid #d4d8e0;
994
1323
  border-radius: 8px;
995
- padding: 5px;
996
1324
  font: inherit;
997
1325
  }
998
- @keyframes fe-selection-in {
999
- from {
1000
- opacity: 0;
1001
- transform: translateY(-4px);
1002
- }
1003
- to {
1004
- opacity: 1;
1005
- transform: translateY(0);
1006
- }
1007
- }
1326
+
1327
+ /* packages/form-controls/src/styles.css */
1008
1328
 
1009
1329
  /* packages/tooltip/src/styles.css */
1010
1330
  .fe-tooltip {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dragunio/fe-libs",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Reusable React components, icons, and table primitives.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -23,7 +23,12 @@
23
23
  "import": "./dist/index.mjs",
24
24
  "require": "./dist/index.js"
25
25
  },
26
- "./styles.css": "./dist/styles.css"
26
+ "./styles.css": "./dist/styles.css",
27
+ "./icons": {
28
+ "types": "./dist/icons.d.ts",
29
+ "import": "./dist/icons.mjs",
30
+ "require": "./dist/icons.js"
31
+ }
27
32
  },
28
33
  "files": [
29
34
  "dist",
@@ -35,7 +40,7 @@
35
40
  },
36
41
  "packageManager": "pnpm@9.15.0",
37
42
  "scripts": {
38
- "build": "tsup src/index.ts src/styles.css --format esm,cjs --dts --clean",
43
+ "build": "tsup src/index.ts src/icons.ts --format esm,cjs --dts --clean && tsup src/styles.css --format esm,cjs",
39
44
  "build:playground": "pnpm --filter @dragunio/playground build",
40
45
  "clean": "rm -rf dist",
41
46
  "dev": "pnpm --filter @dragunio/playground dev",
package/dist/styles.d.mts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/styles.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }