rsuite 6.2.0 → 6.2.2
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/AutoComplete/styles/index.css +3 -0
- package/CHANGELOG.md +24 -0
- package/Cascader/styles/index.css +3 -0
- package/CheckPicker/styles/index.css +3 -0
- package/CheckTree/styles/index.css +3 -0
- package/CheckTreePicker/styles/index.css +3 -0
- package/DatePicker/styles/index.css +3 -0
- package/DateRangePicker/styles/index.css +3 -0
- package/InputPicker/styles/index.css +3 -0
- package/MultiCascadeTree/styles/index.css +3 -0
- package/MultiCascader/styles/index.css +3 -0
- package/Pagination/styles/index.css +3 -0
- package/SelectPicker/styles/index.css +3 -0
- package/TagInput/styles/index.css +3 -0
- package/TagPicker/styles/index.css +3 -0
- package/TimePicker/styles/index.css +3 -0
- package/TimeRangePicker/styles/index.css +3 -0
- package/Tree/styles/index.css +3 -0
- package/TreePicker/styles/index.css +3 -0
- package/cjs/InputPicker/InputPicker.js +4 -0
- package/cjs/internals/Picker/PickerIndicator.js +15 -14
- package/cjs/locales/index.d.ts +1 -0
- package/cjs/locales/index.js +3 -1
- package/cjs/locales/nb_NO.d.ts +173 -0
- package/cjs/locales/nb_NO.js +101 -0
- package/dist/rsuite-no-reset.css +3 -0
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite.css +3 -0
- package/dist/rsuite.js +2 -2
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/InputPicker/InputPicker.js +4 -0
- package/esm/internals/Picker/PickerIndicator.js +15 -14
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/nb_NO.d.ts +173 -0
- package/esm/locales/nb_NO.js +97 -0
- package/internals/Picker/styles/index.scss +3 -0
- package/locales/nb_NO/package.json +7 -0
- package/package.json +1 -1
|
@@ -308,6 +308,10 @@ const InputPicker = forwardRef((props, ref) => {
|
|
|
308
308
|
handleChange(val, event);
|
|
309
309
|
});
|
|
310
310
|
const handleMenuItemKeyPress = useEventCallback(event => {
|
|
311
|
+
// When composing, ignore the keypress event.
|
|
312
|
+
if (event.nativeEvent.isComposing) {
|
|
313
|
+
return;
|
|
314
|
+
}
|
|
311
315
|
if (!focusItemValue || !controlledData) {
|
|
312
316
|
return;
|
|
313
317
|
}
|
|
@@ -31,27 +31,28 @@ const PickerIndicator = ({
|
|
|
31
31
|
size: size === 'xs' ? 'xs' : 'sm'
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
if (showCleanButton && !disabled) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(CloseButton, {
|
|
36
|
+
className: prefix('clean'),
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
locale: {
|
|
39
|
+
closeLabel: clear
|
|
40
|
+
},
|
|
41
|
+
onClick: onClose
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return caretAs && /*#__PURE__*/React.createElement(Icon, {
|
|
35
45
|
as: caretAs,
|
|
36
46
|
className: prefix('caret-icon'),
|
|
37
47
|
"data-testid": "caret"
|
|
38
48
|
});
|
|
39
|
-
const cleanButton = showCleanButton && !disabled && /*#__PURE__*/React.createElement(CloseButton, {
|
|
40
|
-
className: prefix('clean'),
|
|
41
|
-
tabIndex: -1,
|
|
42
|
-
locale: {
|
|
43
|
-
closeLabel: clear
|
|
44
|
-
},
|
|
45
|
-
onClick: onClose
|
|
46
|
-
});
|
|
47
|
-
if (caret && cleanButton) {
|
|
48
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, caret, cleanButton);
|
|
49
|
-
}
|
|
50
|
-
return cleanButton || caret || null;
|
|
51
49
|
};
|
|
52
50
|
const props = Component === InputGroup.Addon ? {
|
|
51
|
+
className: prefix('toggle-indicator'),
|
|
53
52
|
disabled
|
|
54
|
-
} : undefined
|
|
53
|
+
} : Component === React.Fragment ? undefined : {
|
|
54
|
+
className: prefix('toggle-indicator')
|
|
55
|
+
};
|
|
55
56
|
return /*#__PURE__*/React.createElement(Component, props, addon());
|
|
56
57
|
};
|
|
57
58
|
export default PickerIndicator;
|
package/esm/locales/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export { default as huHU } from './hu_HU';
|
|
|
13
13
|
export { default as itIT } from './it_IT';
|
|
14
14
|
export { default as kkKZ } from './kk_KZ';
|
|
15
15
|
export { default as koKR } from './ko_KR';
|
|
16
|
+
export { default as nbNO } from './nb_NO';
|
|
16
17
|
export { default as nlNL } from './nl_NL';
|
|
17
18
|
export { default as ptBR } from './pt_BR';
|
|
18
19
|
export { default as ruRU } from './ru_RU';
|
package/esm/locales/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { default as huHU } from "./hu_HU.js";
|
|
|
12
12
|
export { default as itIT } from "./it_IT.js";
|
|
13
13
|
export { default as kkKZ } from "./kk_KZ.js";
|
|
14
14
|
export { default as koKR } from "./ko_KR.js";
|
|
15
|
+
export { default as nbNO } from "./nb_NO.js";
|
|
15
16
|
export { default as nlNL } from "./nl_NL.js";
|
|
16
17
|
export { default as ptBR } from "./pt_BR.js";
|
|
17
18
|
export { default as ruRU } from "./ru_RU.js";
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
code: string;
|
|
3
|
+
common: {
|
|
4
|
+
loading: string;
|
|
5
|
+
emptyMessage: string;
|
|
6
|
+
remove: string;
|
|
7
|
+
clear: string;
|
|
8
|
+
};
|
|
9
|
+
Plaintext: {
|
|
10
|
+
unfilled: string;
|
|
11
|
+
notSelected: string;
|
|
12
|
+
notUploaded: string;
|
|
13
|
+
};
|
|
14
|
+
Pagination: {
|
|
15
|
+
more: string;
|
|
16
|
+
prev: string;
|
|
17
|
+
next: string;
|
|
18
|
+
first: string;
|
|
19
|
+
last: string;
|
|
20
|
+
limit: string;
|
|
21
|
+
total: string;
|
|
22
|
+
skip: string;
|
|
23
|
+
};
|
|
24
|
+
DateTimeFormats: {
|
|
25
|
+
sunday: string;
|
|
26
|
+
monday: string;
|
|
27
|
+
tuesday: string;
|
|
28
|
+
wednesday: string;
|
|
29
|
+
thursday: string;
|
|
30
|
+
friday: string;
|
|
31
|
+
saturday: string;
|
|
32
|
+
ok: string;
|
|
33
|
+
today: string;
|
|
34
|
+
yesterday: string;
|
|
35
|
+
now: string;
|
|
36
|
+
hours: string;
|
|
37
|
+
minutes: string;
|
|
38
|
+
seconds: string;
|
|
39
|
+
/**
|
|
40
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
41
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
42
|
+
**/
|
|
43
|
+
formattedMonthPattern: string;
|
|
44
|
+
formattedDayPattern: string;
|
|
45
|
+
shortDateFormat: string;
|
|
46
|
+
shortTimeFormat: string;
|
|
47
|
+
dateLocale: any;
|
|
48
|
+
};
|
|
49
|
+
Calendar: {
|
|
50
|
+
sunday: string;
|
|
51
|
+
monday: string;
|
|
52
|
+
tuesday: string;
|
|
53
|
+
wednesday: string;
|
|
54
|
+
thursday: string;
|
|
55
|
+
friday: string;
|
|
56
|
+
saturday: string;
|
|
57
|
+
ok: string;
|
|
58
|
+
today: string;
|
|
59
|
+
yesterday: string;
|
|
60
|
+
now: string;
|
|
61
|
+
hours: string;
|
|
62
|
+
minutes: string;
|
|
63
|
+
seconds: string;
|
|
64
|
+
/**
|
|
65
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
66
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
67
|
+
**/
|
|
68
|
+
formattedMonthPattern: string;
|
|
69
|
+
formattedDayPattern: string;
|
|
70
|
+
shortDateFormat: string;
|
|
71
|
+
shortTimeFormat: string;
|
|
72
|
+
dateLocale: any;
|
|
73
|
+
};
|
|
74
|
+
DatePicker: {
|
|
75
|
+
sunday: string;
|
|
76
|
+
monday: string;
|
|
77
|
+
tuesday: string;
|
|
78
|
+
wednesday: string;
|
|
79
|
+
thursday: string;
|
|
80
|
+
friday: string;
|
|
81
|
+
saturday: string;
|
|
82
|
+
ok: string;
|
|
83
|
+
today: string;
|
|
84
|
+
yesterday: string;
|
|
85
|
+
now: string;
|
|
86
|
+
hours: string;
|
|
87
|
+
minutes: string;
|
|
88
|
+
seconds: string;
|
|
89
|
+
/**
|
|
90
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
91
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
92
|
+
**/
|
|
93
|
+
formattedMonthPattern: string;
|
|
94
|
+
formattedDayPattern: string;
|
|
95
|
+
shortDateFormat: string;
|
|
96
|
+
shortTimeFormat: string;
|
|
97
|
+
dateLocale: any;
|
|
98
|
+
};
|
|
99
|
+
DateRangePicker: {
|
|
100
|
+
last7Days: string;
|
|
101
|
+
sunday: string;
|
|
102
|
+
monday: string;
|
|
103
|
+
tuesday: string;
|
|
104
|
+
wednesday: string;
|
|
105
|
+
thursday: string;
|
|
106
|
+
friday: string;
|
|
107
|
+
saturday: string;
|
|
108
|
+
ok: string;
|
|
109
|
+
today: string;
|
|
110
|
+
yesterday: string;
|
|
111
|
+
now: string;
|
|
112
|
+
hours: string;
|
|
113
|
+
minutes: string;
|
|
114
|
+
seconds: string;
|
|
115
|
+
/**
|
|
116
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
117
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
118
|
+
**/
|
|
119
|
+
formattedMonthPattern: string;
|
|
120
|
+
formattedDayPattern: string;
|
|
121
|
+
shortDateFormat: string;
|
|
122
|
+
shortTimeFormat: string;
|
|
123
|
+
dateLocale: any;
|
|
124
|
+
};
|
|
125
|
+
Combobox: {
|
|
126
|
+
noResultsText: string;
|
|
127
|
+
placeholder: string;
|
|
128
|
+
searchPlaceholder: string;
|
|
129
|
+
checkAll: string;
|
|
130
|
+
};
|
|
131
|
+
InputPicker: {
|
|
132
|
+
newItem: string;
|
|
133
|
+
createOption: string;
|
|
134
|
+
noResultsText: string;
|
|
135
|
+
placeholder: string;
|
|
136
|
+
searchPlaceholder: string;
|
|
137
|
+
checkAll: string;
|
|
138
|
+
};
|
|
139
|
+
TagPicker: {
|
|
140
|
+
newItem: string;
|
|
141
|
+
createOption: string;
|
|
142
|
+
noResultsText: string;
|
|
143
|
+
placeholder: string;
|
|
144
|
+
searchPlaceholder: string;
|
|
145
|
+
checkAll: string;
|
|
146
|
+
};
|
|
147
|
+
Uploader: {
|
|
148
|
+
inited: string;
|
|
149
|
+
progress: string;
|
|
150
|
+
error: string;
|
|
151
|
+
complete: string;
|
|
152
|
+
emptyFile: string;
|
|
153
|
+
upload: string;
|
|
154
|
+
removeFile: string;
|
|
155
|
+
};
|
|
156
|
+
CloseButton: {
|
|
157
|
+
closeLabel: string;
|
|
158
|
+
};
|
|
159
|
+
Breadcrumb: {
|
|
160
|
+
expandText: string;
|
|
161
|
+
};
|
|
162
|
+
Toggle: {
|
|
163
|
+
on: string;
|
|
164
|
+
off: string;
|
|
165
|
+
};
|
|
166
|
+
Dialog: {
|
|
167
|
+
alert: string;
|
|
168
|
+
confirm: string;
|
|
169
|
+
ok: string;
|
|
170
|
+
cancel: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { nb } from 'date-fns/locale/nb';
|
|
3
|
+
const DateTimeFormats = {
|
|
4
|
+
sunday: 'Sø',
|
|
5
|
+
monday: 'Ma',
|
|
6
|
+
tuesday: 'Ti',
|
|
7
|
+
wednesday: 'On',
|
|
8
|
+
thursday: 'To',
|
|
9
|
+
friday: 'Fr',
|
|
10
|
+
saturday: 'Lø',
|
|
11
|
+
ok: 'OK',
|
|
12
|
+
today: 'I dag',
|
|
13
|
+
yesterday: 'I går',
|
|
14
|
+
now: 'Nå',
|
|
15
|
+
hours: 'Timer',
|
|
16
|
+
minutes: 'Minutter',
|
|
17
|
+
seconds: 'Sekunder',
|
|
18
|
+
/**
|
|
19
|
+
* Format of the string is based on Unicode Technical Standard #35:
|
|
20
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
21
|
+
**/
|
|
22
|
+
formattedMonthPattern: 'MMM yyyy',
|
|
23
|
+
formattedDayPattern: 'dd MMM yyyy',
|
|
24
|
+
shortDateFormat: 'dd.MM.yyyy',
|
|
25
|
+
shortTimeFormat: 'HH:mm',
|
|
26
|
+
dateLocale: nb
|
|
27
|
+
};
|
|
28
|
+
const Combobox = {
|
|
29
|
+
noResultsText: 'Ingen resultater funnet',
|
|
30
|
+
placeholder: 'Velg',
|
|
31
|
+
searchPlaceholder: 'Søk',
|
|
32
|
+
checkAll: 'Alle'
|
|
33
|
+
};
|
|
34
|
+
const CreatableComboBox = {
|
|
35
|
+
...Combobox,
|
|
36
|
+
newItem: 'Nytt element',
|
|
37
|
+
createOption: 'Opprett alternativ "{0}"'
|
|
38
|
+
};
|
|
39
|
+
export default {
|
|
40
|
+
code: 'nb-NO',
|
|
41
|
+
common: {
|
|
42
|
+
loading: 'Laster...',
|
|
43
|
+
emptyMessage: 'Fant ingen data',
|
|
44
|
+
remove: 'Fjern',
|
|
45
|
+
clear: 'Tøm'
|
|
46
|
+
},
|
|
47
|
+
Plaintext: {
|
|
48
|
+
unfilled: 'Ikke utfylt',
|
|
49
|
+
notSelected: 'Ikke valgt',
|
|
50
|
+
notUploaded: 'Ikke lastet opp'
|
|
51
|
+
},
|
|
52
|
+
Pagination: {
|
|
53
|
+
more: 'Mer',
|
|
54
|
+
prev: 'Forrige',
|
|
55
|
+
next: 'Neste',
|
|
56
|
+
first: 'Første',
|
|
57
|
+
last: 'Siste',
|
|
58
|
+
limit: '{0} / side',
|
|
59
|
+
total: 'Totalt antall rader: {0}',
|
|
60
|
+
skip: 'Gå til {0}'
|
|
61
|
+
},
|
|
62
|
+
DateTimeFormats,
|
|
63
|
+
Calendar: DateTimeFormats,
|
|
64
|
+
DatePicker: DateTimeFormats,
|
|
65
|
+
DateRangePicker: {
|
|
66
|
+
...DateTimeFormats,
|
|
67
|
+
last7Days: 'Siste 7 dager'
|
|
68
|
+
},
|
|
69
|
+
Combobox,
|
|
70
|
+
InputPicker: CreatableComboBox,
|
|
71
|
+
TagPicker: CreatableComboBox,
|
|
72
|
+
Uploader: {
|
|
73
|
+
inited: 'Klar',
|
|
74
|
+
progress: 'Laster opp',
|
|
75
|
+
error: 'Feil',
|
|
76
|
+
complete: 'Fullført',
|
|
77
|
+
emptyFile: 'Tom',
|
|
78
|
+
upload: 'Last opp',
|
|
79
|
+
removeFile: 'Fjern fil'
|
|
80
|
+
},
|
|
81
|
+
CloseButton: {
|
|
82
|
+
closeLabel: 'Lukk'
|
|
83
|
+
},
|
|
84
|
+
Breadcrumb: {
|
|
85
|
+
expandText: 'Vis sti'
|
|
86
|
+
},
|
|
87
|
+
Toggle: {
|
|
88
|
+
on: 'PÅ',
|
|
89
|
+
off: 'AV'
|
|
90
|
+
},
|
|
91
|
+
Dialog: {
|
|
92
|
+
alert: 'Varsel',
|
|
93
|
+
confirm: 'Bekreft',
|
|
94
|
+
ok: 'OK',
|
|
95
|
+
cancel: 'Avbryt'
|
|
96
|
+
}
|
|
97
|
+
};
|