skillgrid 0.0.70 → 0.0.71

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.
@@ -1,6 +1,38 @@
1
- import { Locale } from './type';
2
1
  /**
3
2
  * English locale for components
4
3
  */
5
- declare const locale: Locale;
4
+ declare const locale: {
5
+ localeCode: string;
6
+ fileUpload: {
7
+ title: string;
8
+ mobileTitle: string;
9
+ description: string;
10
+ buttonLabel: string;
11
+ attachFile: string;
12
+ attachFiles: string;
13
+ replace: string;
14
+ retry: string;
15
+ errorMessage: string;
16
+ download: string;
17
+ remove: string;
18
+ fileActions: string;
19
+ closeFileActions: string;
20
+ rejectAccept: string;
21
+ rejectAcceptCustom: string;
22
+ rejectMaxFileSize: string;
23
+ uploadProgress: string;
24
+ sizeFallback: string;
25
+ sizeUnits: {
26
+ bytes: string;
27
+ kilobytes: string;
28
+ megabytes: string;
29
+ gigabytes: string;
30
+ terabytes: string;
31
+ };
32
+ };
33
+ icon: {
34
+ loading: string;
35
+ placeholder: string;
36
+ };
37
+ };
6
38
  export default locale;
@@ -0,0 +1,2 @@
1
+ import { Locale, LocaleOverrides } from './type';
2
+ export declare const extendLocale: (base: Locale, overrides: LocaleOverrides) => Locale;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
- export type { Locale } from './type';
1
+ export type { DeepPartial, FileUploadLocale, IconLocale, Locale, LocaleOverrides, } from './type';
2
+ export { extendLocale } from './extendLocale';
2
3
  export { default as enUS } from './en_US';
3
4
  export { default as ruRU } from './ru_RU';
@@ -0,0 +1,3 @@
1
+ type InterpolationValue = string | number;
2
+ export declare const interpolate: (template: string, values: Record<string, InterpolationValue>) => string;
3
+ export {};
@@ -1,6 +1,38 @@
1
- import { Locale } from './type';
2
1
  /**
3
2
  * Russian locale for components
4
3
  */
5
- declare const locale: Locale;
4
+ declare const locale: {
5
+ localeCode: string;
6
+ fileUpload: {
7
+ title: string;
8
+ mobileTitle: string;
9
+ description: string;
10
+ buttonLabel: string;
11
+ attachFile: string;
12
+ attachFiles: string;
13
+ replace: string;
14
+ retry: string;
15
+ errorMessage: string;
16
+ download: string;
17
+ remove: string;
18
+ fileActions: string;
19
+ closeFileActions: string;
20
+ rejectAccept: string;
21
+ rejectAcceptCustom: string;
22
+ rejectMaxFileSize: string;
23
+ uploadProgress: string;
24
+ sizeFallback: string;
25
+ sizeUnits: {
26
+ bytes: string;
27
+ kilobytes: string;
28
+ megabytes: string;
29
+ gigabytes: string;
30
+ terabytes: string;
31
+ };
32
+ };
33
+ icon: {
34
+ loading: string;
35
+ placeholder: string;
36
+ };
37
+ };
6
38
  export default locale;
@@ -1,10 +1,43 @@
1
- /**
2
- * Generic type for component locales
3
- */
4
- export type ComponentLocale<T> = {
5
- [K in keyof T]: T[K];
1
+ export interface FileUploadLocale {
2
+ title: string;
3
+ mobileTitle: string;
4
+ description: string;
5
+ buttonLabel: string;
6
+ attachFile: string;
7
+ attachFiles: string;
8
+ replace: string;
9
+ retry: string;
10
+ errorMessage: string;
11
+ download: string;
12
+ remove: string;
13
+ fileActions: string;
14
+ closeFileActions: string;
15
+ rejectAccept: string;
16
+ rejectAcceptCustom: string;
17
+ rejectMaxFileSize: string;
18
+ uploadProgress: string;
19
+ sizeFallback: string;
20
+ sizeUnits: {
21
+ bytes: string;
22
+ kilobytes: string;
23
+ megabytes: string;
24
+ gigabytes: string;
25
+ terabytes: string;
26
+ };
27
+ }
28
+ export interface IconLocale {
29
+ loading: string;
30
+ placeholder: string;
31
+ }
32
+ export interface Locale {
33
+ localeCode: string;
34
+ fileUpload: FileUploadLocale;
35
+ icon: IconLocale;
36
+ }
37
+ export type DeepPartial<T> = {
38
+ [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
6
39
  };
7
- /**
8
- * Combined locale type for all components
9
- */
10
- export type Locale = ComponentLocale<unknown>;
40
+ export interface LocaleOverrides {
41
+ fileUpload?: DeepPartial<FileUploadLocale>;
42
+ icon?: Partial<IconLocale>;
43
+ }
@@ -1,2 +1 @@
1
- export * from './i18n';
2
1
  export * from './common';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillgrid",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "description": "Skillgrid Components Library",
5
5
  "keywords": [
6
6
  "react",
@@ -130,13 +130,10 @@
130
130
  "commander": "^13.1.0",
131
131
  "fs-extra": "^11.3.0",
132
132
  "handlebars": "^4.7.8",
133
- "i18next": "^25.1.2",
134
- "i18next-browser-languagedetector": "^8.1.0",
135
133
  "prettier": "^3.5.3",
136
134
  "rc-tooltip": "^6.4.0",
137
135
  "rc-upload": "~4.9.2",
138
136
  "react-aria-components": "^1.15.1",
139
- "react-i18next": "^15.5.1",
140
137
  "react-intersection-observer": "^10.0.3"
141
138
  },
142
139
  "eslintConfig": {
@@ -1,9 +0,0 @@
1
- import { I18nConfig } from '../types';
2
- /**
3
- * Hook for handling custom translations in components
4
- *
5
- * @param {string} namespace - Translation namespace (usually component name in lowercase)
6
- * @param {I18nConfig} [customTranslations] - Custom translations to override defaults
7
- * @returns {(key: string, options?: any) => string} Translation function
8
- */
9
- export declare const useCustomTranslations: (namespace: string, customTranslations?: I18nConfig) => import('i18next').TFunction<"translation", undefined>;
package/dist/i18n.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { default as i18n } from 'i18next';
2
- export default i18n;
@@ -1,7 +0,0 @@
1
- export interface I18nConfig {
2
- [lang: string]: {
3
- [namespace: string]: {
4
- [key: string]: string;
5
- };
6
- };
7
- }