nntc-ui 0.0.82 → 0.0.84
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 +166 -13
- package/index.d.ts +20 -6
- package/index.js +1015 -734
- package/package.json +1 -1
package/index.css
CHANGED
|
@@ -643,14 +643,31 @@
|
|
|
643
643
|
|
|
644
644
|
/* src/components/common/DateTime/dateTime.module.css */
|
|
645
645
|
.dateTime_root {
|
|
646
|
-
|
|
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
|
-
|
|
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 {
|
|
@@ -716,21 +733,47 @@
|
|
|
716
733
|
}
|
|
717
734
|
.dateTime_popoverTarget {
|
|
718
735
|
position: absolute;
|
|
719
|
-
|
|
736
|
+
top: 0;
|
|
720
737
|
left: 0;
|
|
721
|
-
z-index:
|
|
738
|
+
z-index: 0;
|
|
722
739
|
width: 100%;
|
|
723
|
-
height:
|
|
740
|
+
height: 100%;
|
|
741
|
+
pointer-events: none;
|
|
742
|
+
}
|
|
743
|
+
.dateTime_popoverContent {
|
|
744
|
+
max-width: none;
|
|
724
745
|
}
|
|
725
746
|
|
|
726
747
|
/* src/components/common/DateTime/ui/CalendarPopover/calendarPopover.module.css */
|
|
727
748
|
.calendarPopover_root {
|
|
728
749
|
display: flex;
|
|
729
750
|
flex-direction: column;
|
|
730
|
-
|
|
731
|
-
|
|
751
|
+
}
|
|
752
|
+
.calendarPopover_root.calendarPopover_dateTimeMode {
|
|
753
|
+
flex-direction: row;
|
|
754
|
+
align-items: stretch;
|
|
755
|
+
width: auto;
|
|
756
|
+
}
|
|
757
|
+
.calendarPopover_medium {
|
|
732
758
|
padding: 24px 16px;
|
|
733
759
|
}
|
|
760
|
+
.calendarPopover_small {
|
|
761
|
+
padding: 20px 12px;
|
|
762
|
+
}
|
|
763
|
+
.calendarPopover_calendarContainer {
|
|
764
|
+
display: flex;
|
|
765
|
+
flex-direction: column;
|
|
766
|
+
width: 336px;
|
|
767
|
+
}
|
|
768
|
+
.calendarPopover_medium > .calendarPopover_calendarContainer {
|
|
769
|
+
gap: 24px;
|
|
770
|
+
}
|
|
771
|
+
.calendarPopover_small > .calendarPopover_calendarContainer {
|
|
772
|
+
gap: 20px;
|
|
773
|
+
}
|
|
774
|
+
.calendarPopover_small .calendarPopover_calendarContainer.calendarPopover_monthView {
|
|
775
|
+
width: 282px;
|
|
776
|
+
}
|
|
734
777
|
.calendarPopover_buttonsContainer {
|
|
735
778
|
display: block;
|
|
736
779
|
}
|
|
@@ -782,7 +825,19 @@
|
|
|
782
825
|
}
|
|
783
826
|
.calendarPopover_cell.calendarPopover_month {
|
|
784
827
|
width: 84px;
|
|
785
|
-
|
|
828
|
+
}
|
|
829
|
+
.calendarPopover_cell.calendarPopover_year {
|
|
830
|
+
width: 48px;
|
|
831
|
+
}
|
|
832
|
+
.calendarPopover_small .calendarPopover_cell {
|
|
833
|
+
width: 40px;
|
|
834
|
+
height: 40px;
|
|
835
|
+
}
|
|
836
|
+
.calendarPopover_small .calendarPopover_cell.calendarPopover_month {
|
|
837
|
+
width: 84px;
|
|
838
|
+
}
|
|
839
|
+
.calendarPopover_small .calendarPopover_cell.calendarPopover_year {
|
|
840
|
+
width: 48px;
|
|
786
841
|
}
|
|
787
842
|
.calendarPopover_cellData {
|
|
788
843
|
position: relative;
|
|
@@ -799,6 +854,12 @@
|
|
|
799
854
|
background-color: var(--theme-focus);
|
|
800
855
|
border-radius: 50%;
|
|
801
856
|
}
|
|
857
|
+
.calendarPopover_small .calendarPopover_cellCircle {
|
|
858
|
+
top: 2px;
|
|
859
|
+
left: 2px;
|
|
860
|
+
width: 36px;
|
|
861
|
+
height: 36px;
|
|
862
|
+
}
|
|
802
863
|
.calendarPopover_cellCircle ~ .calendarPopover_cellData {
|
|
803
864
|
color: var(--theme-text-button-invert);
|
|
804
865
|
}
|
|
@@ -812,6 +873,10 @@
|
|
|
812
873
|
height: 44px;
|
|
813
874
|
background-color: var(--theme-date-range);
|
|
814
875
|
}
|
|
876
|
+
.calendarPopover_small .calendarPopover_cellSelection {
|
|
877
|
+
top: 2px;
|
|
878
|
+
height: 36px;
|
|
879
|
+
}
|
|
815
880
|
.calendarPopover_cellSelectionFirst {
|
|
816
881
|
left: 50%;
|
|
817
882
|
width: 50%;
|
|
@@ -821,7 +886,7 @@
|
|
|
821
886
|
}
|
|
822
887
|
.calendarPopover_monthCellSelection {
|
|
823
888
|
position: absolute;
|
|
824
|
-
top:
|
|
889
|
+
top: 2px;
|
|
825
890
|
left: 0;
|
|
826
891
|
z-index: 1;
|
|
827
892
|
display: block;
|
|
@@ -829,6 +894,10 @@
|
|
|
829
894
|
height: 44px;
|
|
830
895
|
background-color: var(--theme-date-range);
|
|
831
896
|
}
|
|
897
|
+
.calendarPopover_small .calendarPopover_monthCellSelection {
|
|
898
|
+
top: 2px;
|
|
899
|
+
height: 36px;
|
|
900
|
+
}
|
|
832
901
|
.calendarPopover_monthCellSelectionFirst {
|
|
833
902
|
left: 50%;
|
|
834
903
|
width: 50%;
|
|
@@ -836,6 +905,69 @@
|
|
|
836
905
|
.calendarPopover_monthCellSelectionLast {
|
|
837
906
|
width: 50%;
|
|
838
907
|
}
|
|
908
|
+
.calendarPopover_timeContainer {
|
|
909
|
+
position: relative;
|
|
910
|
+
display: flex;
|
|
911
|
+
align-items: center;
|
|
912
|
+
width: 116px;
|
|
913
|
+
padding-left: 16px;
|
|
914
|
+
margin-left: 16px;
|
|
915
|
+
overflow: hidden;
|
|
916
|
+
border-left: 1px solid var(--theme-input-border);
|
|
917
|
+
}
|
|
918
|
+
.calendarPopover_timeSelectionMarker {
|
|
919
|
+
position: absolute;
|
|
920
|
+
top: 50%;
|
|
921
|
+
right: 0;
|
|
922
|
+
left: 16px;
|
|
923
|
+
z-index: 0;
|
|
924
|
+
height: 36px;
|
|
925
|
+
pointer-events: none;
|
|
926
|
+
background-color: var(--theme-focus);
|
|
927
|
+
border-radius: 8px;
|
|
928
|
+
transform: translateY(-50%);
|
|
929
|
+
}
|
|
930
|
+
.calendarPopover_timeDivider {
|
|
931
|
+
position: relative;
|
|
932
|
+
z-index: 1;
|
|
933
|
+
flex: 0 0 auto;
|
|
934
|
+
width: 16px;
|
|
935
|
+
color: var(--theme-text-button-invert);
|
|
936
|
+
text-align: center;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/* src/components/common/DateTime/ui/TimeWheelColumn/timeWheelColumn.module.css */
|
|
940
|
+
.timeWheelColumn_timeWheel {
|
|
941
|
+
position: relative;
|
|
942
|
+
z-index: 1;
|
|
943
|
+
display: flex;
|
|
944
|
+
flex: 1 1 0;
|
|
945
|
+
flex-direction: column;
|
|
946
|
+
height: 252px;
|
|
947
|
+
padding: 108px 0;
|
|
948
|
+
overflow-y: auto;
|
|
949
|
+
scroll-snap-type: y mandatory;
|
|
950
|
+
}
|
|
951
|
+
.timeWheelColumn_timeWheel::-webkit-scrollbar {
|
|
952
|
+
display: none;
|
|
953
|
+
}
|
|
954
|
+
.timeWheelColumn_timeWheelButton {
|
|
955
|
+
color: var(--theme-text-primary);
|
|
956
|
+
background: none;
|
|
957
|
+
border: none;
|
|
958
|
+
box-shadow: none;
|
|
959
|
+
}
|
|
960
|
+
.timeWheelColumn_timeWheelItem {
|
|
961
|
+
display: flex;
|
|
962
|
+
align-items: center;
|
|
963
|
+
justify-content: center;
|
|
964
|
+
min-height: 36px;
|
|
965
|
+
cursor: pointer;
|
|
966
|
+
scroll-snap-align: center;
|
|
967
|
+
}
|
|
968
|
+
.timeWheelColumn_timeWheelItemActive {
|
|
969
|
+
color: var(--theme-text-button-invert);
|
|
970
|
+
}
|
|
839
971
|
|
|
840
972
|
/* src/components/common/ColorPicker/colorPicker.module.css */
|
|
841
973
|
.colorPicker_root {
|
|
@@ -956,6 +1088,9 @@
|
|
|
956
1088
|
width: 100%;
|
|
957
1089
|
max-width: 320px;
|
|
958
1090
|
}
|
|
1091
|
+
.input_fullWidth {
|
|
1092
|
+
max-width: 100%;
|
|
1093
|
+
}
|
|
959
1094
|
.input_medium {
|
|
960
1095
|
gap: 8px;
|
|
961
1096
|
}
|
|
@@ -991,6 +1126,15 @@
|
|
|
991
1126
|
.input_input:disabled {
|
|
992
1127
|
color: var(--theme-text-inactive);
|
|
993
1128
|
}
|
|
1129
|
+
.input_input[type=number] {
|
|
1130
|
+
-moz-appearance: textfield;
|
|
1131
|
+
appearance: textfield;
|
|
1132
|
+
}
|
|
1133
|
+
.input_input[type=number]::-webkit-inner-spin-button,
|
|
1134
|
+
.input_input[type=number]::-webkit-outer-spin-button {
|
|
1135
|
+
margin: 0;
|
|
1136
|
+
-webkit-appearance: none;
|
|
1137
|
+
}
|
|
994
1138
|
.input_medium > .input_wrapper > .input_input {
|
|
995
1139
|
height: 40px;
|
|
996
1140
|
padding: 8px 16px 8px 16px;
|
|
@@ -999,6 +1143,15 @@
|
|
|
999
1143
|
height: 32px;
|
|
1000
1144
|
padding: 4px 16px 4px 16px;
|
|
1001
1145
|
}
|
|
1146
|
+
.input_filled > .input_input {
|
|
1147
|
+
background-color: var(--theme-input-filled);
|
|
1148
|
+
}
|
|
1149
|
+
.input_filled:hover > .input_input:not(:disabled):not(:focus) {
|
|
1150
|
+
background-color: var(--theme-input-filled-hover);
|
|
1151
|
+
}
|
|
1152
|
+
.input_filled > .input_input:focus {
|
|
1153
|
+
background-color: var(--theme-input-filled-hover);
|
|
1154
|
+
}
|
|
1002
1155
|
.input_outlined > .input_input {
|
|
1003
1156
|
background-color: transparent;
|
|
1004
1157
|
outline: 1px solid var(--theme-input-border);
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, DetailedHTMLProps, InputHTMLAttributes, PropsWithChildren,
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, DetailedHTMLProps, InputHTMLAttributes, PropsWithChildren, JSX, MutableRefObject, ReactElement, CSSProperties, HTMLProps, ElementType } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { Placement } from '@floating-ui/react';
|
|
5
5
|
|
|
@@ -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,15 @@ 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;
|
|
99
|
+
defaultOpen?: boolean;
|
|
91
100
|
componentSize?: Size$9;
|
|
92
101
|
fullWidth?: boolean;
|
|
102
|
+
label?: string;
|
|
93
103
|
placeholder?: string;
|
|
94
104
|
values?: (string | undefined)[];
|
|
95
105
|
defaultValues?: (string | undefined)[];
|
|
@@ -97,7 +107,9 @@ interface Props$k {
|
|
|
97
107
|
onValueChange?: (values: (string | undefined)[]) => void;
|
|
98
108
|
dayjs?: DayjsFactory;
|
|
99
109
|
}
|
|
100
|
-
declare
|
|
110
|
+
declare const DateTime: React.ForwardRefExoticComponent<Props$k & {
|
|
111
|
+
classes?: PropsObject;
|
|
112
|
+
} & InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
101
113
|
|
|
102
114
|
type Variant$5 = 'outlined';
|
|
103
115
|
type Size$8 = 'medium' | 'small';
|
|
@@ -110,7 +122,7 @@ interface Props$j {
|
|
|
110
122
|
}
|
|
111
123
|
declare const ColorPicker: (props: UiProps<Props$j> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
|
|
112
124
|
|
|
113
|
-
type Variant$4 = 'outlined';
|
|
125
|
+
type Variant$4 = 'filled' | 'outlined';
|
|
114
126
|
type Size$7 = 'medium' | 'small';
|
|
115
127
|
interface Props$i {
|
|
116
128
|
variant?: Variant$4;
|
|
@@ -118,7 +130,9 @@ interface Props$i {
|
|
|
118
130
|
fullWidth?: boolean;
|
|
119
131
|
label?: string;
|
|
120
132
|
}
|
|
121
|
-
declare const Input:
|
|
133
|
+
declare const Input: React.ForwardRefExoticComponent<Props$i & {
|
|
134
|
+
classes?: PropsObject;
|
|
135
|
+
} & InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
122
136
|
|
|
123
137
|
type Variant$3 = 'filled' | 'outlined';
|
|
124
138
|
type Size$6 = 'medium' | 'small';
|
|
@@ -334,7 +348,7 @@ interface Props$8 {
|
|
|
334
348
|
additionalColumnsViews?: (id: string, value: string | number | undefined, payload: {
|
|
335
349
|
[key: string]: string;
|
|
336
350
|
} | undefined) => {
|
|
337
|
-
edit: ((onChange: (
|
|
351
|
+
edit: ((onChange: (changeValue?: string, withBlur?: boolean) => void, onBlur: () => void) => JSX.Element | null) | null;
|
|
338
352
|
view: JSX.Element | null;
|
|
339
353
|
};
|
|
340
354
|
onChangeCell?: (rowIndex: number, columnId: string, value: string | number | undefined, original?: TableRow) => void;
|