nntc-ui 0.0.81 → 0.0.83

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/index.css CHANGED
@@ -643,14 +643,31 @@
643
643
 
644
644
  /* src/components/common/DateTime/dateTime.module.css */
645
645
  .dateTime_root {
646
- position: relative;
646
+ display: flex;
647
+ flex-direction: column;
647
648
  width: 100%;
648
649
  max-width: 320px;
649
650
  }
651
+ .dateTime_fullWidth {
652
+ max-width: 100%;
653
+ }
650
654
  .dateTime_medium {
651
- height: 40px;
655
+ gap: 8px;
652
656
  }
653
657
  .dateTime_small {
658
+ gap: 4px;
659
+ }
660
+ .dateTime_label {
661
+ color: var(--theme-text-secondary);
662
+ }
663
+ .dateTime_wrapper {
664
+ position: relative;
665
+ width: 100%;
666
+ }
667
+ .dateTime_medium > .dateTime_wrapper {
668
+ height: 40px;
669
+ }
670
+ .dateTime_small > .dateTime_wrapper {
654
671
  height: 32px;
655
672
  }
656
673
  .dateTime_input {
@@ -667,11 +684,11 @@
667
684
  border-radius: 4px;
668
685
  outline: none;
669
686
  }
670
- .dateTime_medium > .dateTime_input {
687
+ .dateTime_medium > .dateTime_wrapper > .dateTime_input {
671
688
  height: 40px;
672
689
  padding: 8px 48px 8px 16px;
673
690
  }
674
- .dateTime_small > .dateTime_input {
691
+ .dateTime_small > .dateTime_wrapper > .dateTime_input {
675
692
  height: 32px;
676
693
  padding: 4px 48px 4px 16px;
677
694
  }
@@ -705,10 +722,10 @@
705
722
  height: 24px;
706
723
  cursor: pointer;
707
724
  }
708
- .dateTime_medium > .dateTime_icon {
725
+ .dateTime_medium > .dateTime_wrapper > .dateTime_icon {
709
726
  top: 8px;
710
727
  }
711
- .dateTime_small > .dateTime_icon {
728
+ .dateTime_small > .dateTime_wrapper > .dateTime_icon {
712
729
  top: 4px;
713
730
  }
714
731
  .dateTime_icon > svg {
@@ -722,15 +739,40 @@
722
739
  width: 100%;
723
740
  height: 0;
724
741
  }
742
+ .dateTime_popoverContent {
743
+ max-width: none;
744
+ }
725
745
 
726
746
  /* src/components/common/DateTime/ui/CalendarPopover/calendarPopover.module.css */
727
747
  .calendarPopover_root {
728
748
  display: flex;
729
749
  flex-direction: column;
730
- gap: 24px;
731
- width: 368px;
750
+ }
751
+ .calendarPopover_root.calendarPopover_dateTimeMode {
752
+ flex-direction: row;
753
+ align-items: stretch;
754
+ width: auto;
755
+ }
756
+ .calendarPopover_medium {
732
757
  padding: 24px 16px;
733
758
  }
759
+ .calendarPopover_small {
760
+ padding: 20px 12px;
761
+ }
762
+ .calendarPopover_calendarContainer {
763
+ display: flex;
764
+ flex-direction: column;
765
+ width: 336px;
766
+ }
767
+ .calendarPopover_medium > .calendarPopover_calendarContainer {
768
+ gap: 24px;
769
+ }
770
+ .calendarPopover_small > .calendarPopover_calendarContainer {
771
+ gap: 20px;
772
+ }
773
+ .calendarPopover_small .calendarPopover_calendarContainer.calendarPopover_monthView {
774
+ width: 282px;
775
+ }
734
776
  .calendarPopover_buttonsContainer {
735
777
  display: block;
736
778
  }
@@ -782,7 +824,19 @@
782
824
  }
783
825
  .calendarPopover_cell.calendarPopover_month {
784
826
  width: 84px;
785
- height: 64px;
827
+ }
828
+ .calendarPopover_cell.calendarPopover_year {
829
+ width: 48px;
830
+ }
831
+ .calendarPopover_small .calendarPopover_cell {
832
+ width: 40px;
833
+ height: 40px;
834
+ }
835
+ .calendarPopover_small .calendarPopover_cell.calendarPopover_month {
836
+ width: 84px;
837
+ }
838
+ .calendarPopover_small .calendarPopover_cell.calendarPopover_year {
839
+ width: 48px;
786
840
  }
787
841
  .calendarPopover_cellData {
788
842
  position: relative;
@@ -799,6 +853,12 @@
799
853
  background-color: var(--theme-focus);
800
854
  border-radius: 50%;
801
855
  }
856
+ .calendarPopover_small .calendarPopover_cellCircle {
857
+ top: 2px;
858
+ left: 2px;
859
+ width: 36px;
860
+ height: 36px;
861
+ }
802
862
  .calendarPopover_cellCircle ~ .calendarPopover_cellData {
803
863
  color: var(--theme-text-button-invert);
804
864
  }
@@ -812,6 +872,10 @@
812
872
  height: 44px;
813
873
  background-color: var(--theme-date-range);
814
874
  }
875
+ .calendarPopover_small .calendarPopover_cellSelection {
876
+ top: 2px;
877
+ height: 36px;
878
+ }
815
879
  .calendarPopover_cellSelectionFirst {
816
880
  left: 50%;
817
881
  width: 50%;
@@ -821,7 +885,7 @@
821
885
  }
822
886
  .calendarPopover_monthCellSelection {
823
887
  position: absolute;
824
- top: 10px;
888
+ top: 2px;
825
889
  left: 0;
826
890
  z-index: 1;
827
891
  display: block;
@@ -829,6 +893,10 @@
829
893
  height: 44px;
830
894
  background-color: var(--theme-date-range);
831
895
  }
896
+ .calendarPopover_small .calendarPopover_monthCellSelection {
897
+ top: 2px;
898
+ height: 36px;
899
+ }
832
900
  .calendarPopover_monthCellSelectionFirst {
833
901
  left: 50%;
834
902
  width: 50%;
@@ -836,6 +904,69 @@
836
904
  .calendarPopover_monthCellSelectionLast {
837
905
  width: 50%;
838
906
  }
907
+ .calendarPopover_timeContainer {
908
+ position: relative;
909
+ display: flex;
910
+ align-items: center;
911
+ width: 116px;
912
+ padding-left: 16px;
913
+ margin-left: 16px;
914
+ overflow: hidden;
915
+ border-left: 1px solid var(--theme-input-border);
916
+ }
917
+ .calendarPopover_timeSelectionMarker {
918
+ position: absolute;
919
+ top: 50%;
920
+ right: 0;
921
+ left: 16px;
922
+ z-index: 0;
923
+ height: 36px;
924
+ pointer-events: none;
925
+ background-color: var(--theme-focus);
926
+ border-radius: 8px;
927
+ transform: translateY(-50%);
928
+ }
929
+ .calendarPopover_timeDivider {
930
+ position: relative;
931
+ z-index: 1;
932
+ flex: 0 0 auto;
933
+ width: 16px;
934
+ color: var(--theme-text-button-invert);
935
+ text-align: center;
936
+ }
937
+
938
+ /* src/components/common/DateTime/ui/TimeWheelColumn/timeWheelColumn.module.css */
939
+ .timeWheelColumn_timeWheel {
940
+ position: relative;
941
+ z-index: 1;
942
+ display: flex;
943
+ flex: 1 1 0;
944
+ flex-direction: column;
945
+ height: 252px;
946
+ padding: 108px 0;
947
+ overflow-y: auto;
948
+ scroll-snap-type: y mandatory;
949
+ }
950
+ .timeWheelColumn_timeWheel::-webkit-scrollbar {
951
+ display: none;
952
+ }
953
+ .timeWheelColumn_timeWheelButton {
954
+ color: var(--theme-text-primary);
955
+ background: none;
956
+ border: none;
957
+ box-shadow: none;
958
+ }
959
+ .timeWheelColumn_timeWheelItem {
960
+ display: flex;
961
+ align-items: center;
962
+ justify-content: center;
963
+ min-height: 36px;
964
+ cursor: pointer;
965
+ scroll-snap-align: center;
966
+ }
967
+ .timeWheelColumn_timeWheelItemActive {
968
+ color: var(--theme-text-button-invert);
969
+ }
839
970
 
840
971
  /* src/components/common/ColorPicker/colorPicker.module.css */
841
972
  .colorPicker_root {
@@ -956,6 +1087,9 @@
956
1087
  width: 100%;
957
1088
  max-width: 320px;
958
1089
  }
1090
+ .input_fullWidth {
1091
+ max-width: 100%;
1092
+ }
959
1093
  .input_medium {
960
1094
  gap: 8px;
961
1095
  }
@@ -991,6 +1125,15 @@
991
1125
  .input_input:disabled {
992
1126
  color: var(--theme-text-inactive);
993
1127
  }
1128
+ .input_input[type=number] {
1129
+ -moz-appearance: textfield;
1130
+ appearance: textfield;
1131
+ }
1132
+ .input_input[type=number]::-webkit-inner-spin-button,
1133
+ .input_input[type=number]::-webkit-outer-spin-button {
1134
+ margin: 0;
1135
+ -webkit-appearance: none;
1136
+ }
994
1137
  .input_medium > .input_wrapper > .input_input {
995
1138
  height: 40px;
996
1139
  padding: 8px 16px 8px 16px;
@@ -999,6 +1142,15 @@
999
1142
  height: 32px;
1000
1143
  padding: 4px 16px 4px 16px;
1001
1144
  }
1145
+ .input_filled > .input_input {
1146
+ background-color: var(--theme-input-filled);
1147
+ }
1148
+ .input_filled:hover > .input_input:not(:disabled):not(:focus) {
1149
+ background-color: var(--theme-input-filled-hover);
1150
+ }
1151
+ .input_filled > .input_input:focus {
1152
+ background-color: var(--theme-input-filled-hover);
1153
+ }
1002
1154
  .input_outlined > .input_input {
1003
1155
  background-color: transparent;
1004
1156
  outline: 1px solid var(--theme-input-border);
@@ -1009,6 +1161,36 @@
1009
1161
  .input_outlined > .input_input:focus {
1010
1162
  outline-color: var(--theme-focus);
1011
1163
  }
1164
+ .input_fileInput {
1165
+ position: absolute;
1166
+ width: 0;
1167
+ height: 0;
1168
+ pointer-events: none;
1169
+ opacity: 0;
1170
+ }
1171
+ .input_fileDisplay {
1172
+ box-sizing: border-box;
1173
+ display: flex;
1174
+ align-items: center;
1175
+ cursor: pointer;
1176
+ -webkit-user-select: none;
1177
+ user-select: none;
1178
+ }
1179
+ .input_fileName {
1180
+ flex: 1;
1181
+ overflow: hidden;
1182
+ color: var(--theme-text-primary);
1183
+ text-overflow: ellipsis;
1184
+ white-space: nowrap;
1185
+ }
1186
+ .input_fileName.input_placeholder {
1187
+ color: var(--theme-text-inactive);
1188
+ }
1189
+ .input_fileDisplay > .input_attachIcon {
1190
+ flex-shrink: 0;
1191
+ margin-left: 8px;
1192
+ color: var(--theme-text-secondary);
1193
+ }
1012
1194
 
1013
1195
  /* src/components/common/SearchInput/searchInput.module.css */
1014
1196
  .searchInput_root {
@@ -1638,12 +1820,6 @@
1638
1820
  .virtualTable_tableContainer {
1639
1821
  height: calc(100% + 16px);
1640
1822
  }
1641
- .virtualTable_root.virtualTable_small .virtualTable_table {
1642
- font-size: var(--text-body2-size);
1643
- }
1644
- .virtualTable_root.virtualTable_medium .virtualTable_table {
1645
- font-size: var(--text-body1-size);
1646
- }
1647
1823
  .virtualTable_table {
1648
1824
  position: relative;
1649
1825
  color: var(--theme-text-primary);
@@ -1752,6 +1928,18 @@
1752
1928
  .virtualTable_marginLeftChanging {
1753
1929
  background-color: var(--theme-table-header);
1754
1930
  }
1931
+ .virtualTable_sticky::before,
1932
+ .virtualTable_marginLeftChanging::before {
1933
+ position: absolute;
1934
+ top: 0;
1935
+ left: 0;
1936
+ z-index: -1;
1937
+ display: block;
1938
+ width: 100%;
1939
+ height: 100%;
1940
+ content: "";
1941
+ background-color: var(--theme-overlay-4);
1942
+ }
1755
1943
  .virtualTable_rightBorder {
1756
1944
  position: absolute;
1757
1945
  top: 0;
@@ -1792,8 +1980,18 @@
1792
1980
  justify-content: center;
1793
1981
  text-align: center;
1794
1982
  }
1983
+ .virtualTable_viewCell.virtualTable_success {
1984
+ color: var(--theme-success);
1985
+ background-color: var(--theme-table-success);
1986
+ }
1795
1987
  .virtualTable_viewCell.virtualTable_error {
1988
+ color: var(--theme-error);
1796
1989
  background-color: var(--theme-table-error);
1990
+ }
1991
+ .virtualTable_viewCell.virtualTable_editable.virtualTable_success {
1992
+ border-color: var(--theme-success);
1993
+ }
1994
+ .virtualTable_viewCell.virtualTable_editable.virtualTable_error {
1797
1995
  border-color: var(--theme-error);
1798
1996
  }
1799
1997
  .virtualTable_viewSpan {
@@ -1847,6 +2045,18 @@
1847
2045
  .virtualTable_rowButtonTrigger {
1848
2046
  height: auto !important;
1849
2047
  }
2048
+ .virtualTable_root.virtualTable_medium .virtualTable_table {
2049
+ font-size: var(--text-body2-size);
2050
+ line-height: var(--text-body2-height);
2051
+ }
2052
+ .virtualTable_root.virtualTable_small .virtualTable_table {
2053
+ font-size: calc(var(--text-body2-size) - 2px);
2054
+ line-height: calc(var(--text-body2-height) - 2px);
2055
+ }
2056
+ .virtualTable_root.virtualTable_small .virtualTable_th {
2057
+ font-size: calc(var(--text-body2-size) - 4px);
2058
+ line-height: calc(var(--text-body2-height) - 4px);
2059
+ }
1850
2060
 
1851
2061
  /* src/components/view/VirtualTable/ui/HeaderDropdown/headerDropdown.module.css */
1852
2062
  .headerDropdown_root {
package/index.d.ts CHANGED
@@ -72,6 +72,14 @@ interface DayjsInstance {
72
72
  format(template?: string): string;
73
73
  year(): number;
74
74
  month(): number;
75
+ hour(): number;
76
+ hour(value: number): DayjsInstance;
77
+ minute(): number;
78
+ minute(value: number): DayjsInstance;
79
+ second(): number;
80
+ second(value: number): DayjsInstance;
81
+ millisecond(): number;
82
+ millisecond(value: number): DayjsInstance;
75
83
  startOf(unit: string): DayjsInstance;
76
84
  valueOf(): number;
77
85
  daysInMonth(): number;
@@ -83,13 +91,14 @@ type DayjsFactory = (date?: DayjsConfigType) => DayjsInstance;
83
91
 
84
92
  type Variant$6 = 'filled' | 'outlined';
85
93
  type Size$9 = 'medium' | 'small';
86
- type ValueType = 'date' | 'year';
94
+ type ValueType = 'date' | 'year' | 'dateTime';
87
95
  interface Props$k {
88
96
  variant?: Variant$6;
89
97
  isPeriod?: boolean;
90
98
  valueType?: ValueType;
91
99
  componentSize?: Size$9;
92
100
  fullWidth?: boolean;
101
+ label?: string;
93
102
  placeholder?: string;
94
103
  values?: (string | undefined)[];
95
104
  defaultValues?: (string | undefined)[];
@@ -97,7 +106,9 @@ interface Props$k {
97
106
  onValueChange?: (values: (string | undefined)[]) => void;
98
107
  dayjs?: DayjsFactory;
99
108
  }
100
- declare function DateTime(props: UiProps<Props$k> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
109
+ declare const DateTime: React.ForwardRefExoticComponent<Props$k & {
110
+ classes?: PropsObject;
111
+ } & InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
101
112
 
102
113
  type Variant$5 = 'outlined';
103
114
  type Size$8 = 'medium' | 'small';
@@ -110,7 +121,7 @@ interface Props$j {
110
121
  }
111
122
  declare const ColorPicker: (props: UiProps<Props$j> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
112
123
 
113
- type Variant$4 = 'outlined';
124
+ type Variant$4 = 'filled' | 'outlined';
114
125
  type Size$7 = 'medium' | 'small';
115
126
  interface Props$i {
116
127
  variant?: Variant$4;
@@ -118,7 +129,9 @@ interface Props$i {
118
129
  fullWidth?: boolean;
119
130
  label?: string;
120
131
  }
121
- declare const Input: (props: UiProps<Props$i> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
132
+ declare const Input: React.ForwardRefExoticComponent<Props$i & {
133
+ classes?: PropsObject;
134
+ } & InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
122
135
 
123
136
  type Variant$3 = 'filled' | 'outlined';
124
137
  type Size$6 = 'medium' | 'small';
@@ -264,7 +277,8 @@ interface TableCell {
264
277
  payload?: {
265
278
  [key: string]: string;
266
279
  };
267
- error?: string;
280
+ tooltip?: string;
281
+ fill?: 'error' | 'success';
268
282
  }
269
283
 
270
284
  interface TableRow {
@@ -311,7 +325,7 @@ interface TableColumn {
311
325
  width?: number;
312
326
  headerAlign?: ColumnAlign;
313
327
  rowsAlign?: ColumnAlign;
314
- valueFormat?: (value: string) => string;
328
+ valueFormat?: (value: string | number | undefined) => string;
315
329
  showInModal?: boolean;
316
330
  onClick?: (payload: {
317
331
  [key: string]: string;
@@ -339,7 +353,7 @@ interface Props$8 {
339
353
  onChangeCell?: (rowIndex: number, columnId: string, value: string | number | undefined, original?: TableRow) => void;
340
354
  cellWidth?: (columnIndex: number) => number;
341
355
  rowButtons?: ((original: TableRow) => AdditionalButton[]) | undefined;
342
- fixedColumnsCount?: 0 | 1 | 2;
356
+ fixedColumnsCount?: number;
343
357
  headerRowHeight?: number[];
344
358
  bodyRowHeight?: number;
345
359
  rowActionWidth?: number;