nntc-ui 0.0.82 → 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 +162 -10
- package/index.d.ts +17 -4
- package/index.js +972 -733
- 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 {
|
|
@@ -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
|
-
|
|
731
|
-
|
|
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
|
-
|
|
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:
|
|
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);
|
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
|
|
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:
|
|
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';
|