@majoo-ui/react 2.2.1 → 2.4.0
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/components/alertDialog/AlertDialog.esm.js +28 -15
- package/components/alertDialog/locale.esm.js +20 -0
- package/components/chart/lineChart/LineChart.esm.js +4 -0
- package/components/datePicker/DatePicker.esm.js +16 -6
- package/components/datePicker/DatePickerMulti.esm.js +5 -3
- package/components/datePicker/InputDatePicker.esm.js +14 -12
- package/components/datePicker/components/Calendar.esm.js +17 -23
- package/components/datePicker/components/CalendarMulti.esm.js +4 -7
- package/components/datePicker/components/CalendarTimePicker.esm.js +6 -9
- package/components/datePicker/components/MobileCalendar.esm.js +13 -17
- package/components/datePicker/locale.esm.js +92 -0
- package/components/devicePreview/DevicePreview.esm.js +4 -0
- package/components/editableTable/EditableMobile.esm.js +4 -6
- package/components/editableTable/EditableTable.esm.js +7 -7
- package/components/form/components/InputCombobox/InputCombobox.esm.js +3 -0
- package/components/form/components/InputCreatable/InputCreatable.esm.js +16 -8
- package/components/form/components/InputCreatable/locale.esm.js +15 -0
- package/components/form/components/InputDateRange/InputDateRange.esm.js +15 -11
- package/components/form/components/InputDateRange/locale.esm.js +15 -0
- package/components/form/components/InputOTP/InputOTP.esm.js +9 -6
- package/components/form/components/InputOTP/locale.esm.js +15 -0
- package/components/form/components/InputResourceList/InputResourceList.esm.js +8 -11
- package/components/form/components/InputResourceList/locale.esm.js +27 -0
- package/components/form/components/InputSearchbox/InputSearchbox.esm.js +15 -6
- package/components/form/components/InputSearchbox/locale.esm.js +16 -0
- package/components/form/components/InputSelect/InputSelect.esm.js +29 -16
- package/components/form/components/InputSelect/locale.esm.js +23 -0
- package/components/form/components/InputSelectCheck/InputSelectCheck.esm.js +32 -23
- package/components/form/components/InputSelectCheck/locale.esm.js +30 -0
- package/components/form/components/InputSignature/InputSignature.esm.js +7 -8
- package/components/form/components/InputSignature/SignatureModal.esm.js +3 -3
- package/components/form/components/InputSignature/locale.esm.js +27 -0
- package/components/image/Image.esm.js +15 -9
- package/components/image/locale.esm.js +15 -0
- package/components/mapPicker/InputMapPicker.esm.js +5 -0
- package/components/pageDialog/PageDialog.esm.js +4 -0
- package/components/periodSelect/PeriodSelect.esm.js +11 -12
- package/components/periodSelect/locale.esm.js +25 -0
- package/components/table/MobileTable.esm.js +4 -6
- package/components/table/Table.esm.js +63 -95
- package/components/table/components/columns/RowMenuColumn.esm.js +0 -5
- package/components/table/locale.esm.js +91 -0
- package/components/tagList/TagList.esm.js +6 -7
- package/components/tagList/locale.esm.js +22 -0
- package/components/toast/context/ToastProvider.esm.js +13 -9
- package/components/toast/context/locale.esm.js +20 -0
- package/config/locale/LocaleContext.esm.js +29 -0
- package/config/locale/LocaleTextContext.esm.js +5 -0
- package/config/locale/useLocaleText.esm.js +30 -0
- package/index.esm.css +249 -249
- package/index.esm.js +13 -0
- package/majoo-provider/MajooProvider.esm.js +41 -4
- package/package.json +2 -2
- package/src/components/alertDialog/locale.d.ts +10 -0
- package/src/components/datePicker/DatePickerMulti.d.ts +2 -1
- package/src/components/datePicker/InputDatePicker.d.ts +13 -2
- package/src/components/datePicker/components/Calendar.d.ts +12 -1
- package/src/components/datePicker/components/CalendarMulti.d.ts +6 -1
- package/src/components/datePicker/components/CalendarTimePicker.d.ts +4 -1
- package/src/components/datePicker/components/MobileCalendar.d.ts +1 -1
- package/src/components/datePicker/index.d.ts +2 -0
- package/src/components/datePicker/locale.d.ts +45 -0
- package/src/components/editableTable/EditableMobile.d.ts +1 -0
- package/src/components/editableTable/EditableTable.d.ts +9 -18
- package/src/components/form/components/InputCreatable/locale.d.ts +13 -0
- package/src/components/form/components/InputDateRange/InputDateRange.d.ts +16 -1
- package/src/components/form/components/InputDateRange/index.d.ts +2 -0
- package/src/components/form/components/InputDateRange/locale.d.ts +10 -0
- package/src/components/form/components/InputOTP/InputOTP.d.ts +7 -1
- package/src/components/form/components/InputOTP/index.d.ts +2 -0
- package/src/components/form/components/InputOTP/locale.d.ts +10 -0
- package/src/components/form/components/InputResourceList/InputResourceList.d.ts +8 -1
- package/src/components/form/components/InputResourceList/locale.d.ts +17 -0
- package/src/components/form/components/InputSearchbox/locale.d.ts +11 -0
- package/src/components/form/components/InputSelect/index.d.ts +2 -0
- package/src/components/form/components/InputSelect/locale.d.ts +15 -0
- package/src/components/form/components/InputSelectCheck/locale.d.ts +20 -0
- package/src/components/form/components/InputSignature/InputSignature.d.ts +7 -1
- package/src/components/form/components/InputSignature/SignatureModal.d.ts +2 -1
- package/src/components/form/components/InputSignature/index.d.ts +2 -0
- package/src/components/form/components/InputSignature/locale.d.ts +16 -0
- package/src/components/form/components/index.d.ts +4 -0
- package/src/components/image/index.d.ts +2 -0
- package/src/components/image/locale.d.ts +10 -0
- package/src/components/periodSelect/PeriodSelect.d.ts +14 -3
- package/src/components/periodSelect/index.d.ts +2 -0
- package/src/components/periodSelect/locale.d.ts +15 -0
- package/src/components/table/MobileTable.d.ts +1 -0
- package/src/components/table/index.d.ts +2 -0
- package/src/components/table/locale.d.ts +40 -0
- package/src/components/tagList/TagList.d.ts +8 -2
- package/src/components/tagList/index.d.ts +2 -0
- package/src/components/tagList/locale.d.ts +13 -0
- package/src/components/toast/context/locale.d.ts +11 -0
- package/src/config/locale/LocaleContext.d.ts +13 -0
- package/src/config/locale/LocaleTextContext.d.ts +38 -0
- package/src/config/locale/useLocaleText.d.ts +10 -0
package/index.esm.css
CHANGED
|
@@ -1,252 +1,3 @@
|
|
|
1
|
-
.recharts-pie-sector {
|
|
2
|
-
outline: none;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.ReactCrop {
|
|
6
|
-
position: relative;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
cursor: crosshair;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
}
|
|
12
|
-
.ReactCrop *,
|
|
13
|
-
.ReactCrop *::before,
|
|
14
|
-
.ReactCrop *::after {
|
|
15
|
-
box-sizing: border-box;
|
|
16
|
-
}
|
|
17
|
-
.ReactCrop--disabled,
|
|
18
|
-
.ReactCrop--locked {
|
|
19
|
-
cursor: inherit;
|
|
20
|
-
}
|
|
21
|
-
.ReactCrop__child-wrapper {
|
|
22
|
-
max-height: inherit;
|
|
23
|
-
}
|
|
24
|
-
.ReactCrop__child-wrapper > img,
|
|
25
|
-
.ReactCrop__child-wrapper > video {
|
|
26
|
-
display: block;
|
|
27
|
-
max-width: 100%;
|
|
28
|
-
max-height: inherit;
|
|
29
|
-
touch-action: none;
|
|
30
|
-
}
|
|
31
|
-
.ReactCrop__crop-selection {
|
|
32
|
-
position: absolute;
|
|
33
|
-
top: 0;
|
|
34
|
-
left: 0;
|
|
35
|
-
transform: translate3d(0, 0, 0);
|
|
36
|
-
cursor: move;
|
|
37
|
-
box-shadow: 0 0 0 9999em rgba(0, 0, 0, 0.5);
|
|
38
|
-
touch-action: none;
|
|
39
|
-
border: 1px dashed #fff;
|
|
40
|
-
}
|
|
41
|
-
.ReactCrop--disabled .ReactCrop__crop-selection {
|
|
42
|
-
cursor: inherit;
|
|
43
|
-
}
|
|
44
|
-
.ReactCrop--circular-crop .ReactCrop__crop-selection {
|
|
45
|
-
border-radius: 50%;
|
|
46
|
-
box-shadow: 0px 0px 1px 1px #fff, 0 0 0 9999em rgba(0, 0, 0, 0.5);
|
|
47
|
-
}
|
|
48
|
-
.ReactCrop__crop-selection:focus {
|
|
49
|
-
outline: none;
|
|
50
|
-
border-color: blue;
|
|
51
|
-
border-style: solid;
|
|
52
|
-
}
|
|
53
|
-
.ReactCrop--invisible-crop .ReactCrop__crop-selection {
|
|
54
|
-
display: none;
|
|
55
|
-
}
|
|
56
|
-
.ReactCrop__rule-of-thirds-vt::before,
|
|
57
|
-
.ReactCrop__rule-of-thirds-vt::after,
|
|
58
|
-
.ReactCrop__rule-of-thirds-hz::before,
|
|
59
|
-
.ReactCrop__rule-of-thirds-hz::after {
|
|
60
|
-
content: '';
|
|
61
|
-
display: block;
|
|
62
|
-
position: absolute;
|
|
63
|
-
background-color: rgba(255, 255, 255, 0.4);
|
|
64
|
-
}
|
|
65
|
-
.ReactCrop__rule-of-thirds-vt::before,
|
|
66
|
-
.ReactCrop__rule-of-thirds-vt::after {
|
|
67
|
-
width: 1px;
|
|
68
|
-
height: 100%;
|
|
69
|
-
}
|
|
70
|
-
.ReactCrop__rule-of-thirds-vt::before {
|
|
71
|
-
left: 33.3333%;
|
|
72
|
-
left: 33.3333333333%;
|
|
73
|
-
}
|
|
74
|
-
.ReactCrop__rule-of-thirds-vt::after {
|
|
75
|
-
left: 66.6666%;
|
|
76
|
-
left: 66.6666666667%;
|
|
77
|
-
}
|
|
78
|
-
.ReactCrop__rule-of-thirds-hz::before,
|
|
79
|
-
.ReactCrop__rule-of-thirds-hz::after {
|
|
80
|
-
width: 100%;
|
|
81
|
-
height: 1px;
|
|
82
|
-
}
|
|
83
|
-
.ReactCrop__rule-of-thirds-hz::before {
|
|
84
|
-
top: 33.3333%;
|
|
85
|
-
top: 33.3333333333%;
|
|
86
|
-
}
|
|
87
|
-
.ReactCrop__rule-of-thirds-hz::after {
|
|
88
|
-
top: 66.6666%;
|
|
89
|
-
top: 66.6666666667%;
|
|
90
|
-
}
|
|
91
|
-
.ReactCrop__drag-handle {
|
|
92
|
-
position: absolute;
|
|
93
|
-
}
|
|
94
|
-
.ReactCrop__drag-handle::after {
|
|
95
|
-
position: absolute;
|
|
96
|
-
content: '';
|
|
97
|
-
display: block;
|
|
98
|
-
width: 10px;
|
|
99
|
-
height: 10px;
|
|
100
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
101
|
-
border: 1px solid rgba(255, 255, 255, 0.7);
|
|
102
|
-
outline: 1px solid rgba(0, 0, 0, 0);
|
|
103
|
-
}
|
|
104
|
-
.ReactCrop__drag-handle:focus::after {
|
|
105
|
-
border-color: blue;
|
|
106
|
-
background: #2dbfff;
|
|
107
|
-
}
|
|
108
|
-
.ReactCrop .ord-nw {
|
|
109
|
-
top: 0;
|
|
110
|
-
left: 0;
|
|
111
|
-
margin-top: -5px;
|
|
112
|
-
margin-left: -5px;
|
|
113
|
-
cursor: nw-resize;
|
|
114
|
-
}
|
|
115
|
-
.ReactCrop .ord-nw::after {
|
|
116
|
-
top: 0;
|
|
117
|
-
left: 0;
|
|
118
|
-
}
|
|
119
|
-
.ReactCrop .ord-n {
|
|
120
|
-
top: 0;
|
|
121
|
-
left: 50%;
|
|
122
|
-
margin-top: -5px;
|
|
123
|
-
margin-left: -5px;
|
|
124
|
-
cursor: n-resize;
|
|
125
|
-
}
|
|
126
|
-
.ReactCrop .ord-n::after {
|
|
127
|
-
top: 0;
|
|
128
|
-
}
|
|
129
|
-
.ReactCrop .ord-ne {
|
|
130
|
-
top: 0;
|
|
131
|
-
right: 0;
|
|
132
|
-
margin-top: -5px;
|
|
133
|
-
margin-right: -5px;
|
|
134
|
-
cursor: ne-resize;
|
|
135
|
-
}
|
|
136
|
-
.ReactCrop .ord-ne::after {
|
|
137
|
-
top: 0;
|
|
138
|
-
right: 0;
|
|
139
|
-
}
|
|
140
|
-
.ReactCrop .ord-e {
|
|
141
|
-
top: 50%;
|
|
142
|
-
right: 0;
|
|
143
|
-
margin-top: -5px;
|
|
144
|
-
margin-right: -5px;
|
|
145
|
-
cursor: e-resize;
|
|
146
|
-
}
|
|
147
|
-
.ReactCrop .ord-e::after {
|
|
148
|
-
right: 0;
|
|
149
|
-
}
|
|
150
|
-
.ReactCrop .ord-se {
|
|
151
|
-
bottom: 0;
|
|
152
|
-
right: 0;
|
|
153
|
-
margin-bottom: -5px;
|
|
154
|
-
margin-right: -5px;
|
|
155
|
-
cursor: se-resize;
|
|
156
|
-
}
|
|
157
|
-
.ReactCrop .ord-se::after {
|
|
158
|
-
bottom: 0;
|
|
159
|
-
right: 0;
|
|
160
|
-
}
|
|
161
|
-
.ReactCrop .ord-s {
|
|
162
|
-
bottom: 0;
|
|
163
|
-
left: 50%;
|
|
164
|
-
margin-bottom: -5px;
|
|
165
|
-
margin-left: -5px;
|
|
166
|
-
cursor: s-resize;
|
|
167
|
-
}
|
|
168
|
-
.ReactCrop .ord-s::after {
|
|
169
|
-
bottom: 0;
|
|
170
|
-
}
|
|
171
|
-
.ReactCrop .ord-sw {
|
|
172
|
-
bottom: 0;
|
|
173
|
-
left: 0;
|
|
174
|
-
margin-bottom: -5px;
|
|
175
|
-
margin-left: -5px;
|
|
176
|
-
cursor: sw-resize;
|
|
177
|
-
}
|
|
178
|
-
.ReactCrop .ord-sw::after {
|
|
179
|
-
bottom: 0;
|
|
180
|
-
left: 0;
|
|
181
|
-
}
|
|
182
|
-
.ReactCrop .ord-w {
|
|
183
|
-
top: 50%;
|
|
184
|
-
left: 0;
|
|
185
|
-
margin-top: -5px;
|
|
186
|
-
margin-left: -5px;
|
|
187
|
-
cursor: w-resize;
|
|
188
|
-
}
|
|
189
|
-
.ReactCrop .ord-w::after {
|
|
190
|
-
left: 0;
|
|
191
|
-
}
|
|
192
|
-
.ReactCrop__disabled .ReactCrop__drag-handle {
|
|
193
|
-
cursor: inherit;
|
|
194
|
-
}
|
|
195
|
-
.ReactCrop__drag-bar {
|
|
196
|
-
position: absolute;
|
|
197
|
-
}
|
|
198
|
-
.ReactCrop__drag-bar.ord-n {
|
|
199
|
-
top: 0;
|
|
200
|
-
left: 0;
|
|
201
|
-
width: 100%;
|
|
202
|
-
height: 6px;
|
|
203
|
-
margin-top: -3px;
|
|
204
|
-
}
|
|
205
|
-
.ReactCrop__drag-bar.ord-e {
|
|
206
|
-
right: 0;
|
|
207
|
-
top: 0;
|
|
208
|
-
width: 6px;
|
|
209
|
-
height: 100%;
|
|
210
|
-
margin-right: -3px;
|
|
211
|
-
}
|
|
212
|
-
.ReactCrop__drag-bar.ord-s {
|
|
213
|
-
bottom: 0;
|
|
214
|
-
left: 0;
|
|
215
|
-
width: 100%;
|
|
216
|
-
height: 6px;
|
|
217
|
-
margin-bottom: -3px;
|
|
218
|
-
}
|
|
219
|
-
.ReactCrop__drag-bar.ord-w {
|
|
220
|
-
top: 0;
|
|
221
|
-
left: 0;
|
|
222
|
-
width: 6px;
|
|
223
|
-
height: 100%;
|
|
224
|
-
margin-left: -3px;
|
|
225
|
-
}
|
|
226
|
-
.ReactCrop--new-crop .ReactCrop__drag-bar,
|
|
227
|
-
.ReactCrop--new-crop .ReactCrop__drag-handle,
|
|
228
|
-
.ReactCrop--fixed-aspect .ReactCrop__drag-bar {
|
|
229
|
-
display: none;
|
|
230
|
-
}
|
|
231
|
-
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,
|
|
232
|
-
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,
|
|
233
|
-
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,
|
|
234
|
-
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w {
|
|
235
|
-
display: none;
|
|
236
|
-
}
|
|
237
|
-
@media (pointer: coarse) {
|
|
238
|
-
.ReactCrop .ord-n,
|
|
239
|
-
.ReactCrop .ord-e,
|
|
240
|
-
.ReactCrop .ord-s,
|
|
241
|
-
.ReactCrop .ord-w {
|
|
242
|
-
display: none;
|
|
243
|
-
}
|
|
244
|
-
.ReactCrop__drag-handle {
|
|
245
|
-
width: 24px;
|
|
246
|
-
height: 24px;
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
1
|
.rdw-option-wrapper {
|
|
251
2
|
padding: 5px;
|
|
252
3
|
min-width: 25px;
|
|
@@ -1293,3 +1044,252 @@
|
|
|
1293
1044
|
.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset {
|
|
1294
1045
|
counter-reset: ol4;
|
|
1295
1046
|
}
|
|
1047
|
+
|
|
1048
|
+
.ReactCrop {
|
|
1049
|
+
position: relative;
|
|
1050
|
+
display: inline-block;
|
|
1051
|
+
cursor: crosshair;
|
|
1052
|
+
overflow: hidden;
|
|
1053
|
+
max-width: 100%;
|
|
1054
|
+
}
|
|
1055
|
+
.ReactCrop *,
|
|
1056
|
+
.ReactCrop *::before,
|
|
1057
|
+
.ReactCrop *::after {
|
|
1058
|
+
box-sizing: border-box;
|
|
1059
|
+
}
|
|
1060
|
+
.ReactCrop--disabled,
|
|
1061
|
+
.ReactCrop--locked {
|
|
1062
|
+
cursor: inherit;
|
|
1063
|
+
}
|
|
1064
|
+
.ReactCrop__child-wrapper {
|
|
1065
|
+
max-height: inherit;
|
|
1066
|
+
}
|
|
1067
|
+
.ReactCrop__child-wrapper > img,
|
|
1068
|
+
.ReactCrop__child-wrapper > video {
|
|
1069
|
+
display: block;
|
|
1070
|
+
max-width: 100%;
|
|
1071
|
+
max-height: inherit;
|
|
1072
|
+
touch-action: none;
|
|
1073
|
+
}
|
|
1074
|
+
.ReactCrop__crop-selection {
|
|
1075
|
+
position: absolute;
|
|
1076
|
+
top: 0;
|
|
1077
|
+
left: 0;
|
|
1078
|
+
transform: translate3d(0, 0, 0);
|
|
1079
|
+
cursor: move;
|
|
1080
|
+
box-shadow: 0 0 0 9999em rgba(0, 0, 0, 0.5);
|
|
1081
|
+
touch-action: none;
|
|
1082
|
+
border: 1px dashed #fff;
|
|
1083
|
+
}
|
|
1084
|
+
.ReactCrop--disabled .ReactCrop__crop-selection {
|
|
1085
|
+
cursor: inherit;
|
|
1086
|
+
}
|
|
1087
|
+
.ReactCrop--circular-crop .ReactCrop__crop-selection {
|
|
1088
|
+
border-radius: 50%;
|
|
1089
|
+
box-shadow: 0px 0px 1px 1px #fff, 0 0 0 9999em rgba(0, 0, 0, 0.5);
|
|
1090
|
+
}
|
|
1091
|
+
.ReactCrop__crop-selection:focus {
|
|
1092
|
+
outline: none;
|
|
1093
|
+
border-color: blue;
|
|
1094
|
+
border-style: solid;
|
|
1095
|
+
}
|
|
1096
|
+
.ReactCrop--invisible-crop .ReactCrop__crop-selection {
|
|
1097
|
+
display: none;
|
|
1098
|
+
}
|
|
1099
|
+
.ReactCrop__rule-of-thirds-vt::before,
|
|
1100
|
+
.ReactCrop__rule-of-thirds-vt::after,
|
|
1101
|
+
.ReactCrop__rule-of-thirds-hz::before,
|
|
1102
|
+
.ReactCrop__rule-of-thirds-hz::after {
|
|
1103
|
+
content: '';
|
|
1104
|
+
display: block;
|
|
1105
|
+
position: absolute;
|
|
1106
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
1107
|
+
}
|
|
1108
|
+
.ReactCrop__rule-of-thirds-vt::before,
|
|
1109
|
+
.ReactCrop__rule-of-thirds-vt::after {
|
|
1110
|
+
width: 1px;
|
|
1111
|
+
height: 100%;
|
|
1112
|
+
}
|
|
1113
|
+
.ReactCrop__rule-of-thirds-vt::before {
|
|
1114
|
+
left: 33.3333%;
|
|
1115
|
+
left: 33.3333333333%;
|
|
1116
|
+
}
|
|
1117
|
+
.ReactCrop__rule-of-thirds-vt::after {
|
|
1118
|
+
left: 66.6666%;
|
|
1119
|
+
left: 66.6666666667%;
|
|
1120
|
+
}
|
|
1121
|
+
.ReactCrop__rule-of-thirds-hz::before,
|
|
1122
|
+
.ReactCrop__rule-of-thirds-hz::after {
|
|
1123
|
+
width: 100%;
|
|
1124
|
+
height: 1px;
|
|
1125
|
+
}
|
|
1126
|
+
.ReactCrop__rule-of-thirds-hz::before {
|
|
1127
|
+
top: 33.3333%;
|
|
1128
|
+
top: 33.3333333333%;
|
|
1129
|
+
}
|
|
1130
|
+
.ReactCrop__rule-of-thirds-hz::after {
|
|
1131
|
+
top: 66.6666%;
|
|
1132
|
+
top: 66.6666666667%;
|
|
1133
|
+
}
|
|
1134
|
+
.ReactCrop__drag-handle {
|
|
1135
|
+
position: absolute;
|
|
1136
|
+
}
|
|
1137
|
+
.ReactCrop__drag-handle::after {
|
|
1138
|
+
position: absolute;
|
|
1139
|
+
content: '';
|
|
1140
|
+
display: block;
|
|
1141
|
+
width: 10px;
|
|
1142
|
+
height: 10px;
|
|
1143
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
1144
|
+
border: 1px solid rgba(255, 255, 255, 0.7);
|
|
1145
|
+
outline: 1px solid rgba(0, 0, 0, 0);
|
|
1146
|
+
}
|
|
1147
|
+
.ReactCrop__drag-handle:focus::after {
|
|
1148
|
+
border-color: blue;
|
|
1149
|
+
background: #2dbfff;
|
|
1150
|
+
}
|
|
1151
|
+
.ReactCrop .ord-nw {
|
|
1152
|
+
top: 0;
|
|
1153
|
+
left: 0;
|
|
1154
|
+
margin-top: -5px;
|
|
1155
|
+
margin-left: -5px;
|
|
1156
|
+
cursor: nw-resize;
|
|
1157
|
+
}
|
|
1158
|
+
.ReactCrop .ord-nw::after {
|
|
1159
|
+
top: 0;
|
|
1160
|
+
left: 0;
|
|
1161
|
+
}
|
|
1162
|
+
.ReactCrop .ord-n {
|
|
1163
|
+
top: 0;
|
|
1164
|
+
left: 50%;
|
|
1165
|
+
margin-top: -5px;
|
|
1166
|
+
margin-left: -5px;
|
|
1167
|
+
cursor: n-resize;
|
|
1168
|
+
}
|
|
1169
|
+
.ReactCrop .ord-n::after {
|
|
1170
|
+
top: 0;
|
|
1171
|
+
}
|
|
1172
|
+
.ReactCrop .ord-ne {
|
|
1173
|
+
top: 0;
|
|
1174
|
+
right: 0;
|
|
1175
|
+
margin-top: -5px;
|
|
1176
|
+
margin-right: -5px;
|
|
1177
|
+
cursor: ne-resize;
|
|
1178
|
+
}
|
|
1179
|
+
.ReactCrop .ord-ne::after {
|
|
1180
|
+
top: 0;
|
|
1181
|
+
right: 0;
|
|
1182
|
+
}
|
|
1183
|
+
.ReactCrop .ord-e {
|
|
1184
|
+
top: 50%;
|
|
1185
|
+
right: 0;
|
|
1186
|
+
margin-top: -5px;
|
|
1187
|
+
margin-right: -5px;
|
|
1188
|
+
cursor: e-resize;
|
|
1189
|
+
}
|
|
1190
|
+
.ReactCrop .ord-e::after {
|
|
1191
|
+
right: 0;
|
|
1192
|
+
}
|
|
1193
|
+
.ReactCrop .ord-se {
|
|
1194
|
+
bottom: 0;
|
|
1195
|
+
right: 0;
|
|
1196
|
+
margin-bottom: -5px;
|
|
1197
|
+
margin-right: -5px;
|
|
1198
|
+
cursor: se-resize;
|
|
1199
|
+
}
|
|
1200
|
+
.ReactCrop .ord-se::after {
|
|
1201
|
+
bottom: 0;
|
|
1202
|
+
right: 0;
|
|
1203
|
+
}
|
|
1204
|
+
.ReactCrop .ord-s {
|
|
1205
|
+
bottom: 0;
|
|
1206
|
+
left: 50%;
|
|
1207
|
+
margin-bottom: -5px;
|
|
1208
|
+
margin-left: -5px;
|
|
1209
|
+
cursor: s-resize;
|
|
1210
|
+
}
|
|
1211
|
+
.ReactCrop .ord-s::after {
|
|
1212
|
+
bottom: 0;
|
|
1213
|
+
}
|
|
1214
|
+
.ReactCrop .ord-sw {
|
|
1215
|
+
bottom: 0;
|
|
1216
|
+
left: 0;
|
|
1217
|
+
margin-bottom: -5px;
|
|
1218
|
+
margin-left: -5px;
|
|
1219
|
+
cursor: sw-resize;
|
|
1220
|
+
}
|
|
1221
|
+
.ReactCrop .ord-sw::after {
|
|
1222
|
+
bottom: 0;
|
|
1223
|
+
left: 0;
|
|
1224
|
+
}
|
|
1225
|
+
.ReactCrop .ord-w {
|
|
1226
|
+
top: 50%;
|
|
1227
|
+
left: 0;
|
|
1228
|
+
margin-top: -5px;
|
|
1229
|
+
margin-left: -5px;
|
|
1230
|
+
cursor: w-resize;
|
|
1231
|
+
}
|
|
1232
|
+
.ReactCrop .ord-w::after {
|
|
1233
|
+
left: 0;
|
|
1234
|
+
}
|
|
1235
|
+
.ReactCrop__disabled .ReactCrop__drag-handle {
|
|
1236
|
+
cursor: inherit;
|
|
1237
|
+
}
|
|
1238
|
+
.ReactCrop__drag-bar {
|
|
1239
|
+
position: absolute;
|
|
1240
|
+
}
|
|
1241
|
+
.ReactCrop__drag-bar.ord-n {
|
|
1242
|
+
top: 0;
|
|
1243
|
+
left: 0;
|
|
1244
|
+
width: 100%;
|
|
1245
|
+
height: 6px;
|
|
1246
|
+
margin-top: -3px;
|
|
1247
|
+
}
|
|
1248
|
+
.ReactCrop__drag-bar.ord-e {
|
|
1249
|
+
right: 0;
|
|
1250
|
+
top: 0;
|
|
1251
|
+
width: 6px;
|
|
1252
|
+
height: 100%;
|
|
1253
|
+
margin-right: -3px;
|
|
1254
|
+
}
|
|
1255
|
+
.ReactCrop__drag-bar.ord-s {
|
|
1256
|
+
bottom: 0;
|
|
1257
|
+
left: 0;
|
|
1258
|
+
width: 100%;
|
|
1259
|
+
height: 6px;
|
|
1260
|
+
margin-bottom: -3px;
|
|
1261
|
+
}
|
|
1262
|
+
.ReactCrop__drag-bar.ord-w {
|
|
1263
|
+
top: 0;
|
|
1264
|
+
left: 0;
|
|
1265
|
+
width: 6px;
|
|
1266
|
+
height: 100%;
|
|
1267
|
+
margin-left: -3px;
|
|
1268
|
+
}
|
|
1269
|
+
.ReactCrop--new-crop .ReactCrop__drag-bar,
|
|
1270
|
+
.ReactCrop--new-crop .ReactCrop__drag-handle,
|
|
1271
|
+
.ReactCrop--fixed-aspect .ReactCrop__drag-bar {
|
|
1272
|
+
display: none;
|
|
1273
|
+
}
|
|
1274
|
+
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,
|
|
1275
|
+
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,
|
|
1276
|
+
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,
|
|
1277
|
+
.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w {
|
|
1278
|
+
display: none;
|
|
1279
|
+
}
|
|
1280
|
+
@media (pointer: coarse) {
|
|
1281
|
+
.ReactCrop .ord-n,
|
|
1282
|
+
.ReactCrop .ord-e,
|
|
1283
|
+
.ReactCrop .ord-s,
|
|
1284
|
+
.ReactCrop .ord-w {
|
|
1285
|
+
display: none;
|
|
1286
|
+
}
|
|
1287
|
+
.ReactCrop__drag-handle {
|
|
1288
|
+
width: 24px;
|
|
1289
|
+
height: 24px;
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.recharts-pie-sector {
|
|
1294
|
+
outline: none;
|
|
1295
|
+
}
|
package/index.esm.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Text, TextVariantsEnum } from './components/text/Text.esm.js
|
|
|
9
9
|
export { default as Paragraph } from './components/paragraph/Paragraph.esm.js';
|
|
10
10
|
export { Breadcrumb, BreadcrumbLink } from './components/breadcrumb/index.esm.js';
|
|
11
11
|
export { Image } from './components/image/Image.esm.js';
|
|
12
|
+
export { defaultImageLocaleText } from './components/image/locale.esm.js';
|
|
12
13
|
export { default as FormGroup } from './components/form/components/FormGroup/FormGroup.esm.js';
|
|
13
14
|
export { default as FormLabel } from './components/form/components/FormLabel/Label.esm.js';
|
|
14
15
|
export { default as FormHelper } from './components/form/components/FormHelper/Helper.esm.js';
|
|
@@ -19,16 +20,22 @@ export { InputTags } from './components/form/components/InputTags/InputTags.esm.
|
|
|
19
20
|
export { default as InputSwitch } from './components/form/components/InputSwitch/InputSwitch.esm.js';
|
|
20
21
|
export { default as InputSwitchWithImage } from './components/form/components/InputSwitch/InputSwitchWithImage.esm.js';
|
|
21
22
|
export { default as InputSearchbox } from './components/form/components/InputSearchbox/InputSearchbox.esm.js';
|
|
23
|
+
export { defaultInputSearchboxLocaleText } from './components/form/components/InputSearchbox/locale.esm.js';
|
|
22
24
|
export { IconContainer, Input, InputSelect, OptionWrapper, SelectBox, SelectContainer, SelectItem, SelectOption } from './components/form/components/InputSelect/InputSelect.esm.js';
|
|
25
|
+
export { defaultInputSelectLocaleText } from './components/form/components/InputSelect/locale.esm.js';
|
|
23
26
|
export { default as InputSelectCheck } from './components/form/components/InputSelectCheck/InputSelectCheck.esm.js';
|
|
24
27
|
export { default as InputSelectTag } from './components/form/components/InputSelectTag/InputSelectTag.esm.js';
|
|
25
28
|
export { InputCreatable } from './components/form/components/InputCreatable/InputCreatable.esm.js';
|
|
26
29
|
export { default as InputResourceList } from './components/form/components/InputResourceList/InputResourceList.esm.js';
|
|
30
|
+
export { defaultInputResourceListLocaleText } from './components/form/components/InputResourceList/locale.esm.js';
|
|
27
31
|
export { InputCombobox } from './components/form/components/InputCombobox/InputCombobox.esm.js';
|
|
28
32
|
export { default as InputOTP, ResendOTP } from './components/form/components/InputOTP/InputOTP.esm.js';
|
|
33
|
+
export { defaultInputOtpLocaleText } from './components/form/components/InputOTP/locale.esm.js';
|
|
29
34
|
export { default as InputCounter } from './components/form/components/InputCounter/InputCounter.esm.js';
|
|
30
35
|
export { InputDateRange } from './components/form/components/InputDateRange/InputDateRange.esm.js';
|
|
36
|
+
export { defaultInputDateRangeLocaleText } from './components/form/components/InputDateRange/locale.esm.js';
|
|
31
37
|
export { InputSignature } from './components/form/components/InputSignature/InputSignature.esm.js';
|
|
38
|
+
export { defaultInputSignatureLocaleText } from './components/form/components/InputSignature/locale.esm.js';
|
|
32
39
|
export { Separator } from './components/separator/Separator.esm.js';
|
|
33
40
|
export { default as Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/dialog/Dialog.esm.js';
|
|
34
41
|
export { default as ModalDialog, ModalDialogContent, ModalDialogFooter, ModalDialogTitle, ModalDialogTrigger } from './components/modalDialog/ModalDialog.esm.js';
|
|
@@ -41,7 +48,9 @@ export { LAST_30_DAYS, LAST_7_DAYS, LAST_MONTH, LAST_TWO_MONTHS, LAST_WEEK, NEXT
|
|
|
41
48
|
export { NativeTimePicker, TimePicker } from './components/datePicker/timePicker/TimePicker.esm.js';
|
|
42
49
|
export { InputTimePicker } from './components/datePicker/timePicker/InputTimePicker.esm.js';
|
|
43
50
|
export { DatePickerMulti } from './components/datePicker/DatePickerMulti.esm.js';
|
|
51
|
+
export { defaultDatePickerLocaleText } from './components/datePicker/locale.esm.js';
|
|
44
52
|
export { Cell, Table, TableBody, TableCell, TableColumn, TableContent, TableFoot, TableFootCell, TableFootRow, TableHead, TableHeadCellContent, TableHeaderCellContainer, TableRow, addOnCellStyle, defaultEmptyDataProps, defaultFetchDataParams } from './components/table/Table.esm.js';
|
|
53
|
+
export { defaultTableLocaleText } from './components/table/locale.esm.js';
|
|
45
54
|
export { default as MobileTable } from './components/table/MobileTable.esm.js';
|
|
46
55
|
export { PageDialog, PageDialogContent, PageDialogFooter, PageDialogTitle, PageDialogTrigger } from './components/pageDialog/PageDialog.esm.js';
|
|
47
56
|
export { default as DevicePreview, ImageDevicePreview } from './components/devicePreview/DevicePreview.esm.js';
|
|
@@ -55,9 +64,11 @@ export { default as CheckboxTable } from './components/checkboxTable/CheckboxTab
|
|
|
55
64
|
export { ContextMenu, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from './components/contextMenu/ContextMenu.esm.js';
|
|
56
65
|
export { default as Skeleton } from './components/skeleton/Skeleton.esm.js';
|
|
57
66
|
export { default as TagList } from './components/tagList/TagList.esm.js';
|
|
67
|
+
export { defaultTagListLocaleText } from './components/tagList/locale.esm.js';
|
|
58
68
|
export { ScrollSync } from './components/scrollSync/ScrollSync.esm.js';
|
|
59
69
|
export { ScrollSyncNode } from './components/scrollSync/ScrollSyncNode.esm.js';
|
|
60
70
|
export { default as PeriodSelect } from './components/periodSelect/PeriodSelect.esm.js';
|
|
71
|
+
export { defaultPeriodSelectLocaleText } from './components/periodSelect/locale.esm.js';
|
|
61
72
|
export { useListOption } from './hooks/useListOption/useListOption.esm.js';
|
|
62
73
|
export { useToggle } from './hooks/useToggle/useToggle.esm.js';
|
|
63
74
|
export { Avatar } from './components/avatar/Avatar.esm.js';
|
|
@@ -105,3 +116,5 @@ export { InputPrefix, InputSuffix } from './components/form/components/InputLett
|
|
|
105
116
|
export { Popover, PopoverClose, PopoverContent, PopoverTrigger } from './components/popover/Popover.esm.js';
|
|
106
117
|
export { StepWizardContext } from './components/stepWizard/StepWizard.esm.js';
|
|
107
118
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/tabs/Tabs.esm.js';
|
|
119
|
+
export { defaultAlertDialogLocaleText } from './components/alertDialog/locale.esm.js';
|
|
120
|
+
export { defaultToastLocaleText } from './components/toast/context/locale.esm.js';
|
|
@@ -5,24 +5,35 @@ import { theme } from '../config/stitches.config.esm.js';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import moment from 'moment';
|
|
8
|
+
import { LocaleTextContext } from '../config/locale/LocaleTextContext.esm.js';
|
|
9
|
+
import { LocaleContext } from '../config/locale/LocaleContext.esm.js';
|
|
8
10
|
import { jsx } from 'react/jsx-runtime';
|
|
9
11
|
|
|
12
|
+
const EMPTY_LOCALE_TEXT = {};
|
|
10
13
|
function MajooProvider({
|
|
11
14
|
children,
|
|
12
15
|
name,
|
|
13
16
|
theme: theme$1 = theme,
|
|
14
17
|
extendStyle,
|
|
15
|
-
disableGlobalStyle
|
|
18
|
+
disableGlobalStyle,
|
|
19
|
+
locale,
|
|
20
|
+
localeText = EMPTY_LOCALE_TEXT
|
|
16
21
|
}) {
|
|
17
22
|
!disableGlobalStyle && applyGlobalStyles(extendStyle, theme$1);
|
|
18
23
|
const {
|
|
19
24
|
i18n
|
|
20
25
|
} = useTranslation();
|
|
21
|
-
moment.locale(
|
|
26
|
+
moment.locale(locale || i18n && i18n.language || 'id');
|
|
22
27
|
return /*#__PURE__*/jsx(ThemeProvider, {
|
|
23
28
|
name: name,
|
|
24
29
|
theme: theme$1,
|
|
25
|
-
children:
|
|
30
|
+
children: /*#__PURE__*/jsx(LocaleContext.Provider, {
|
|
31
|
+
value: locale,
|
|
32
|
+
children: /*#__PURE__*/jsx(LocaleTextContext.Provider, {
|
|
33
|
+
value: localeText,
|
|
34
|
+
children: children
|
|
35
|
+
})
|
|
36
|
+
})
|
|
26
37
|
});
|
|
27
38
|
}
|
|
28
39
|
MajooProvider.propTypes = {
|
|
@@ -30,7 +41,33 @@ MajooProvider.propTypes = {
|
|
|
30
41
|
theme: PropTypes.object.isRequired,
|
|
31
42
|
children: PropTypes.node.isRequired,
|
|
32
43
|
extendStyle: PropTypes.object,
|
|
33
|
-
disableGlobalStyle: PropTypes.bool
|
|
44
|
+
disableGlobalStyle: PropTypes.bool,
|
|
45
|
+
/**
|
|
46
|
+
* Language of the components, e.g. `en` or `en-US`. Unset, the app's i18next language is used,
|
|
47
|
+
* then `id`. Also sets the `moment` locale.
|
|
48
|
+
*/
|
|
49
|
+
locale: PropTypes.string,
|
|
50
|
+
/**
|
|
51
|
+
* Component texts for the whole app, e.g. `{ table: { emptyDataTitle: 'No data' } }`.
|
|
52
|
+
* Memoize it: every new object re-renders all components that read it.
|
|
53
|
+
*/
|
|
54
|
+
localeText: PropTypes.shape({
|
|
55
|
+
alertDialog: PropTypes.object,
|
|
56
|
+
datePicker: PropTypes.object,
|
|
57
|
+
image: PropTypes.object,
|
|
58
|
+
inputCreatable: PropTypes.object,
|
|
59
|
+
inputDateRange: PropTypes.object,
|
|
60
|
+
inputOtp: PropTypes.object,
|
|
61
|
+
inputResourceList: PropTypes.object,
|
|
62
|
+
inputSearchbox: PropTypes.object,
|
|
63
|
+
inputSelect: PropTypes.object,
|
|
64
|
+
inputSelectCheck: PropTypes.object,
|
|
65
|
+
inputSignature: PropTypes.object,
|
|
66
|
+
periodSelect: PropTypes.object,
|
|
67
|
+
table: PropTypes.object,
|
|
68
|
+
tagList: PropTypes.object,
|
|
69
|
+
toast: PropTypes.object
|
|
70
|
+
})
|
|
34
71
|
};
|
|
35
72
|
MajooProvider.defaultProps = {
|
|
36
73
|
name: 'default',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@majoo-ui/react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"main": "./index.esm.js",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@floating-ui/react": "^0.19.2",
|
|
38
38
|
"@majoo-ui/core": "1.32.0",
|
|
39
39
|
"@majoo-ui/helpers": "1.30.9",
|
|
40
|
-
"@majoo-ui/icons": "1.40.
|
|
40
|
+
"@majoo-ui/icons": "1.40.4",
|
|
41
41
|
"@monsonjeremy/react-leaflet": "^3.2.2",
|
|
42
42
|
"@radix-ui/react-accordion": "^1.0.0",
|
|
43
43
|
"@radix-ui/react-alert-dialog": "^1.0.3",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface AlertDialogLocaleText {
|
|
2
|
+
confirmButton: string;
|
|
3
|
+
cancelButton: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const defaultAlertDialogLocaleText: AlertDialogLocaleText;
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the alert dialog texts. Precedence: the dialog's own `localeText`, then `MajooProvider`'s
|
|
8
|
+
* `localeText.alertDialog`, then the app's `translation` keys, then the Indonesian defaults.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useAlertDialogLocaleText: (localeText?: Partial<AlertDialogLocaleText>) => AlertDialogLocaleText;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const DatePickerMulti: ({ onChange, onClose, selected, disabled, minDate, maxDate, disabledDate, ...props }: {
|
|
2
|
+
export declare const DatePickerMulti: ({ onChange, onClose, selected, disabled, minDate, maxDate, disabledDate, locale, ...props }: {
|
|
3
3
|
[x: string]: any;
|
|
4
4
|
onChange: any;
|
|
5
5
|
onClose: any;
|
|
@@ -8,4 +8,5 @@ export declare const DatePickerMulti: ({ onChange, onClose, selected, disabled,
|
|
|
8
8
|
minDate: any;
|
|
9
9
|
maxDate: any;
|
|
10
10
|
disabledDate: any;
|
|
11
|
+
locale: any;
|
|
11
12
|
}) => JSX.Element;
|