@producteca/producteca-ui-kit 1.84.0 → 1.85.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/README.md +15 -0
- package/dist/index.d.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/locales/en.d.js +1 -0
- package/dist/locales/en.d.ts +70 -0
- package/dist/locales/localeConfig.d.js +1 -0
- package/dist/locales/localeConfig.d.ts +5 -0
- package/dist/locales/localeRegistry.d.js +1 -0
- package/dist/locales/localeRegistry.d.ts +13 -0
- package/dist/locales/pt-BR.d.js +1 -0
- package/dist/locales/pt-BR.d.ts +70 -0
- package/dist/producteca-ui-kit.es.js +190 -162
- package/dist/producteca-ui-kit.umd.js +5 -5
- package/dist/utils/debugLogger.d.ts +1 -0
- package/dist/utils/index.d.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -3
package/README.md
CHANGED
|
@@ -120,6 +120,21 @@ Follow these steps to integrate and configure the `@producteca/producteca-ui-kit
|
|
|
120
120
|
import { SelectField, CheckboxInput /* other components */ } from '@producteca/producteca-ui-kit'
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
+
4. **Configure the locale (optional)**
|
|
124
|
+
The kit ships in Spanish by default. To render it in another language, call `configureLocale` **once, during your app bootstrap**, before rendering any component:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { configureLocale } from '@producteca/producteca-ui-kit'
|
|
128
|
+
|
|
129
|
+
configureLocale('en')
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Supported locales: `'es'` (default), `'pt-BR'` and `'en'`.
|
|
133
|
+
|
|
134
|
+
This single call covers the kit's own strings, the day and month names of both date pickers, and the internal labels of the MUI pickers.
|
|
135
|
+
|
|
136
|
+
**The locale is read at render time and is not reactive.** Calling `configureLocale` after components have mounted will not update them — it is meant for bootstrap, not for a runtime language switcher. Keys that are missing from a non-Spanish bundle fall back to Spanish rather than showing the raw key.
|
|
137
|
+
|
|
123
138
|
## 📦 Publishing a New Version
|
|
124
139
|
|
|
125
140
|
Package publishing is now handled automatically via a GitHub Action triggered on `push` to the `main` or `master` branches.
|
package/dist/index.d.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
a11y: {
|
|
3
|
+
close: string;
|
|
4
|
+
dialog: string;
|
|
5
|
+
loading: string;
|
|
6
|
+
moreActions: string;
|
|
7
|
+
navigation: string;
|
|
8
|
+
progress: string;
|
|
9
|
+
remove: string;
|
|
10
|
+
reorder: string;
|
|
11
|
+
search: string;
|
|
12
|
+
toggleSidebar: string;
|
|
13
|
+
};
|
|
14
|
+
addPlus: string;
|
|
15
|
+
asyncContent: {
|
|
16
|
+
errorOccurred: string;
|
|
17
|
+
noResultsFound: string;
|
|
18
|
+
retry: string;
|
|
19
|
+
successCompleted: string;
|
|
20
|
+
};
|
|
21
|
+
cancel: string;
|
|
22
|
+
conditionalOperator: {
|
|
23
|
+
and: string;
|
|
24
|
+
or: string;
|
|
25
|
+
};
|
|
26
|
+
continue: string;
|
|
27
|
+
copyButton: {
|
|
28
|
+
copied: string;
|
|
29
|
+
copy: string;
|
|
30
|
+
};
|
|
31
|
+
datePicker: {
|
|
32
|
+
selectDate: string;
|
|
33
|
+
selectDateTime: string;
|
|
34
|
+
selectTime: string;
|
|
35
|
+
selectYear: string;
|
|
36
|
+
};
|
|
37
|
+
guide: string;
|
|
38
|
+
maintenance: {
|
|
39
|
+
description: string;
|
|
40
|
+
subtitle: string;
|
|
41
|
+
title: string;
|
|
42
|
+
};
|
|
43
|
+
modalTitle: {
|
|
44
|
+
instructive: string;
|
|
45
|
+
};
|
|
46
|
+
noFoundOptions: string;
|
|
47
|
+
noResultsFound: string;
|
|
48
|
+
permissionSelector: {
|
|
49
|
+
ariaLabel: string;
|
|
50
|
+
};
|
|
51
|
+
permissions: {
|
|
52
|
+
edit: string;
|
|
53
|
+
noAccess: string;
|
|
54
|
+
read: string;
|
|
55
|
+
};
|
|
56
|
+
pickChannelModal: {
|
|
57
|
+
title: string;
|
|
58
|
+
};
|
|
59
|
+
previous: string;
|
|
60
|
+
reloadPage: string;
|
|
61
|
+
save: string;
|
|
62
|
+
selectPlaceholder: string;
|
|
63
|
+
selected: string;
|
|
64
|
+
selectedPlural: string;
|
|
65
|
+
warningModal: {
|
|
66
|
+
dontShowAgain: string;
|
|
67
|
+
warning: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DayPickerLocale } from 'react-day-picker/locale';
|
|
2
|
+
import { PickersInputLocaleText } from '@mui/x-date-pickers';
|
|
3
|
+
|
|
4
|
+
export type UiKitLocale = 'es' | 'pt-BR' | 'en';
|
|
5
|
+
export interface LocaleEntry {
|
|
6
|
+
i18n: string;
|
|
7
|
+
dayjs: string;
|
|
8
|
+
dateFns: DayPickerLocale;
|
|
9
|
+
mui: PickersInputLocaleText;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_LOCALE: UiKitLocale;
|
|
12
|
+
export declare const LOCALE_REGISTRY: Record<UiKitLocale, LocaleEntry>;
|
|
13
|
+
export declare const isRegisteredLocale: (locale: string) => locale is UiKitLocale;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
a11y: {
|
|
3
|
+
close: string;
|
|
4
|
+
dialog: string;
|
|
5
|
+
loading: string;
|
|
6
|
+
moreActions: string;
|
|
7
|
+
navigation: string;
|
|
8
|
+
progress: string;
|
|
9
|
+
remove: string;
|
|
10
|
+
reorder: string;
|
|
11
|
+
search: string;
|
|
12
|
+
toggleSidebar: string;
|
|
13
|
+
};
|
|
14
|
+
addPlus: string;
|
|
15
|
+
asyncContent: {
|
|
16
|
+
errorOccurred: string;
|
|
17
|
+
noResultsFound: string;
|
|
18
|
+
retry: string;
|
|
19
|
+
successCompleted: string;
|
|
20
|
+
};
|
|
21
|
+
cancel: string;
|
|
22
|
+
conditionalOperator: {
|
|
23
|
+
and: string;
|
|
24
|
+
or: string;
|
|
25
|
+
};
|
|
26
|
+
continue: string;
|
|
27
|
+
copyButton: {
|
|
28
|
+
copied: string;
|
|
29
|
+
copy: string;
|
|
30
|
+
};
|
|
31
|
+
datePicker: {
|
|
32
|
+
selectDate: string;
|
|
33
|
+
selectDateTime: string;
|
|
34
|
+
selectTime: string;
|
|
35
|
+
selectYear: string;
|
|
36
|
+
};
|
|
37
|
+
guide: string;
|
|
38
|
+
maintenance: {
|
|
39
|
+
description: string;
|
|
40
|
+
subtitle: string;
|
|
41
|
+
title: string;
|
|
42
|
+
};
|
|
43
|
+
modalTitle: {
|
|
44
|
+
instructive: string;
|
|
45
|
+
};
|
|
46
|
+
noFoundOptions: string;
|
|
47
|
+
noResultsFound: string;
|
|
48
|
+
permissionSelector: {
|
|
49
|
+
ariaLabel: string;
|
|
50
|
+
};
|
|
51
|
+
permissions: {
|
|
52
|
+
edit: string;
|
|
53
|
+
noAccess: string;
|
|
54
|
+
read: string;
|
|
55
|
+
};
|
|
56
|
+
pickChannelModal: {
|
|
57
|
+
title: string;
|
|
58
|
+
};
|
|
59
|
+
previous: string;
|
|
60
|
+
reloadPage: string;
|
|
61
|
+
save: string;
|
|
62
|
+
selectPlaceholder: string;
|
|
63
|
+
selected: string;
|
|
64
|
+
selectedPlural: string;
|
|
65
|
+
warningModal: {
|
|
66
|
+
dontShowAgain: string;
|
|
67
|
+
warning: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|