@krak-stack/registry 0.1.32 → 0.1.34

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.
Files changed (46) hide show
  1. package/dist/components/ui/code-block.d.ts +8 -6
  2. package/dist/components/ui/code-block.js +44 -19
  3. package/dist/components/ui/copy-button.d.ts +9 -6
  4. package/dist/components/ui/copy-button.js +17 -8
  5. package/dist/components/ui/data-table.d.ts +9 -5
  6. package/dist/components/ui/data-table.js +90 -486
  7. package/dist/components/ui/editing-locale-switcher.d.ts +8 -4
  8. package/dist/components/ui/editing-locale-switcher.js +26 -448
  9. package/dist/components/ui/effect-form.d.ts +39 -10
  10. package/dist/components/ui/effect-form.js +171 -541
  11. package/dist/components/ui/error-component.d.ts +4 -2
  12. package/dist/components/ui/error-component.js +28 -450
  13. package/dist/components/ui/file-picker.d.ts +4 -2
  14. package/dist/components/ui/file-picker.js +27 -452
  15. package/dist/components/ui/form.d.ts +123 -71
  16. package/dist/components/ui/form.js +95 -476
  17. package/dist/components/ui/google-map.d.ts +3 -2
  18. package/dist/components/ui/google-map.js +6 -439
  19. package/dist/components/ui/icon-input.d.ts +50 -1
  20. package/dist/components/ui/icon-input.js +38 -448
  21. package/dist/components/ui/krakstack-provider.d.ts +9 -0
  22. package/dist/components/ui/krakstack-provider.js +28 -0
  23. package/dist/components/ui/loading.d.ts +7 -1
  24. package/dist/components/ui/loading.js +6 -438
  25. package/dist/components/ui/locale-switcher.d.ts +8 -4
  26. package/dist/components/ui/locale-switcher.js +35 -453
  27. package/dist/components/ui/pagination.d.ts +5 -3
  28. package/dist/components/ui/pagination.js +7 -439
  29. package/dist/components/ui/search-menu.d.ts +4 -2
  30. package/dist/components/ui/search-menu.js +8 -440
  31. package/dist/components/ui/theme-switcher.d.ts +5 -3
  32. package/dist/components/ui/theme-switcher.js +8 -440
  33. package/dist/components/ui/virtualized-combobox.d.ts +4 -2
  34. package/dist/components/ui/virtualized-combobox.js +17 -445
  35. package/dist/lib/docs.d.ts +2 -0
  36. package/dist/lib/docs.js +92 -481
  37. package/dist/lib/docs.server.js +4 -20
  38. package/dist/lib/documentation-toolkit.js +4 -20
  39. package/dist/lib/markdown/content.d.ts +4 -5
  40. package/dist/services/agent/client/index.js +81 -463
  41. package/dist/services/agent/client/widget.d.ts +6 -3
  42. package/dist/services/notification/client/index.js +11 -440
  43. package/dist/services/notification/client/notification-menu.d.ts +7 -4
  44. package/dist/services/notification/public.js +11 -440
  45. package/package.json +5 -1
  46. package/dist/paraglide/runtime.d.ts +0 -978
@@ -1,439 +1,3 @@
1
- // ../../src/paraglide/runtime.js
2
- import"@inlang/paraglide-js/urlpattern-polyfill";
3
- var baseLocale = "en";
4
- var locales = ["en", "fr"];
5
- var cookieName = "locale";
6
- var cookieMaxAge = 34560000;
7
- var cookieDomain = "";
8
- var localStorageKey = "PARAGLIDE_LOCALE";
9
- var strategy = [
10
- "url",
11
- "cookie",
12
- "preferredLanguage",
13
- "baseLocale"
14
- ];
15
- var routeStrategies = [
16
- {
17
- match: "/api/:path(.*)?",
18
- exclude: true
19
- },
20
- {
21
- match: "/sitemap.xml",
22
- exclude: true
23
- },
24
- {
25
- match: "/llms.txt",
26
- exclude: true
27
- }
28
- ];
29
- var urlPatterns = [
30
- {
31
- pattern: "/:path(.*)?",
32
- localized: [
33
- [
34
- "en",
35
- "/en/:path(.*)?"
36
- ],
37
- [
38
- "fr",
39
- "/fr/:path(.*)?"
40
- ]
41
- ]
42
- }
43
- ];
44
- var cachedRouteStrategyUrl;
45
- var cachedRouteStrategy;
46
- function findMatchingRouteStrategy(url) {
47
- if (routeStrategies.length === 0) {
48
- return;
49
- }
50
- const urlString = typeof url === "string" ? url : url.href;
51
- if (cachedRouteStrategyUrl === urlString) {
52
- return cachedRouteStrategy;
53
- }
54
- const urlObject = new URL(urlString, "http://dummy.com");
55
- let match;
56
- for (const routeStrategy of routeStrategies) {
57
- const pattern = new URLPattern(routeStrategy.match, urlObject.href);
58
- if (pattern.exec(urlObject.href)) {
59
- match = routeStrategy;
60
- break;
61
- }
62
- }
63
- cachedRouteStrategyUrl = urlString;
64
- cachedRouteStrategy = match;
65
- return match;
66
- }
67
- function getStrategyForUrl(url) {
68
- const routeStrategy = findMatchingRouteStrategy(url);
69
- if (routeStrategy && routeStrategy.exclude !== true && Array.isArray(routeStrategy.strategy)) {
70
- return routeStrategy.strategy;
71
- }
72
- return strategy;
73
- }
74
- var serverAsyncLocalStorage = undefined;
75
- var isServer = import.meta.env?.SSR ?? typeof window === "undefined";
76
- var experimentalStaticLocale = undefined;
77
- var TREE_SHAKE_COOKIE_STRATEGY_USED = true;
78
- var TREE_SHAKE_URL_STRATEGY_USED = true;
79
- var TREE_SHAKE_GLOBAL_VARIABLE_STRATEGY_USED = false;
80
- var TREE_SHAKE_PREFERRED_LANGUAGE_STRATEGY_USED = true;
81
- var TREE_SHAKE_DEFAULT_URL_PATTERN_USED = false;
82
- var TREE_SHAKE_LOCAL_STORAGE_STRATEGY_USED = false;
83
- globalThis.__paraglide = globalThis.__paraglide ?? {};
84
- globalThis.__paraglide.ssr = globalThis.__paraglide.ssr ?? {};
85
- var _locale;
86
- var localeInitiallySet = false;
87
- var getLocale = () => {
88
- if (experimentalStaticLocale !== undefined) {
89
- return experimentalStaticLocale;
90
- }
91
- if (serverAsyncLocalStorage) {
92
- const locale = serverAsyncLocalStorage?.getStore()?.locale;
93
- if (locale) {
94
- return locale;
95
- }
96
- }
97
- let strategyToUse = strategy;
98
- if (!isServer && typeof window !== "undefined" && window.location?.href) {
99
- strategyToUse = getStrategyForUrl(window.location.href);
100
- }
101
- const resolved = resolveLocaleWithStrategies(strategyToUse, typeof window !== "undefined" ? window.location?.href : undefined);
102
- if (resolved) {
103
- if (!localeInitiallySet) {
104
- _locale = resolved;
105
- localeInitiallySet = true;
106
- setLocale(resolved, { reload: false });
107
- }
108
- return resolved;
109
- }
110
- throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found");
111
- };
112
- function resolveLocaleWithStrategies(strategyToUse, urlForUrlStrategy) {
113
- let locale;
114
- for (const strat of strategyToUse) {
115
- if (TREE_SHAKE_COOKIE_STRATEGY_USED && strat === "cookie") {
116
- locale = extractLocaleFromCookie();
117
- } else if (strat === "baseLocale") {
118
- locale = baseLocale;
119
- } else if (TREE_SHAKE_URL_STRATEGY_USED && strat === "url" && !isServer && typeof urlForUrlStrategy === "string") {
120
- locale = extractLocaleFromUrl(urlForUrlStrategy);
121
- } else if (TREE_SHAKE_GLOBAL_VARIABLE_STRATEGY_USED && strat === "globalVariable" && _locale !== undefined) {
122
- locale = _locale;
123
- } else if (TREE_SHAKE_PREFERRED_LANGUAGE_STRATEGY_USED && strat === "preferredLanguage" && !isServer) {
124
- locale = extractLocaleFromNavigator();
125
- } else if (TREE_SHAKE_LOCAL_STORAGE_STRATEGY_USED && strat === "localStorage" && !isServer) {
126
- locale = localStorage.getItem(localStorageKey) ?? undefined;
127
- } else if (isCustomStrategy(strat) && customClientStrategies.has(strat)) {
128
- const handler = customClientStrategies.get(strat);
129
- if (handler) {
130
- const result = handler.getLocale();
131
- if (result instanceof Promise) {
132
- continue;
133
- }
134
- if (result !== undefined) {
135
- return assertIsLocale(result);
136
- }
137
- }
138
- }
139
- const matchedLocale = toLocale(locale);
140
- if (matchedLocale) {
141
- return matchedLocale;
142
- }
143
- }
144
- return;
145
- }
146
- var rtlLanguages = new Set([
147
- "ar",
148
- "dv",
149
- "fa",
150
- "he",
151
- "ks",
152
- "ku",
153
- "ps",
154
- "sd",
155
- "ug",
156
- "ur",
157
- "yi"
158
- ]);
159
- var navigateOrReload = (newLocation) => {
160
- if (newLocation) {
161
- window.location.href = newLocation;
162
- } else {
163
- window.location.reload();
164
- }
165
- };
166
- var setLocale = (newLocale, options) => {
167
- const optionsWithDefaults = {
168
- reload: true,
169
- ...options
170
- };
171
- let currentLocale;
172
- try {
173
- currentLocale = getLocale();
174
- } catch {}
175
- const customSetLocalePromises = [];
176
- let newLocation = undefined;
177
- let strategyToUse = strategy;
178
- if (!isServer && typeof window !== "undefined" && window.location?.href) {
179
- strategyToUse = getStrategyForUrl(window.location.href);
180
- }
181
- for (const strat of strategyToUse) {
182
- if (TREE_SHAKE_GLOBAL_VARIABLE_STRATEGY_USED && strat === "globalVariable") {
183
- _locale = newLocale;
184
- } else if (TREE_SHAKE_COOKIE_STRATEGY_USED && strat === "cookie") {
185
- if (isServer || typeof document === "undefined" || typeof window === "undefined") {
186
- continue;
187
- }
188
- const cookieString = `${cookieName}=${newLocale}; path=/; max-age=${cookieMaxAge}`;
189
- document.cookie = cookieDomain ? `${cookieString}; domain=${cookieDomain}` : cookieString;
190
- } else if (strat === "baseLocale") {
191
- continue;
192
- } else if (TREE_SHAKE_URL_STRATEGY_USED && strat === "url" && typeof window !== "undefined") {
193
- newLocation = localizeUrl(window.location.href, {
194
- locale: newLocale
195
- }).href;
196
- } else if (TREE_SHAKE_LOCAL_STORAGE_STRATEGY_USED && strat === "localStorage" && typeof window !== "undefined") {
197
- localStorage.setItem(localStorageKey, newLocale);
198
- } else if (isCustomStrategy(strat) && customClientStrategies.has(strat)) {
199
- const handler = customClientStrategies.get(strat);
200
- if (handler) {
201
- let result = handler.setLocale(newLocale);
202
- if (result instanceof Promise) {
203
- result = result.catch((error) => {
204
- throw new Error(`Custom strategy "${strat}" setLocale failed.`, {
205
- cause: error
206
- });
207
- });
208
- customSetLocalePromises.push(result);
209
- }
210
- }
211
- }
212
- }
213
- const runReload = () => {
214
- if (!isServer && optionsWithDefaults.reload && window.location && newLocale !== currentLocale) {
215
- navigateOrReload(newLocation);
216
- }
217
- };
218
- if (customSetLocalePromises.length) {
219
- return Promise.all(customSetLocalePromises).then(() => {
220
- runReload();
221
- });
222
- }
223
- runReload();
224
- return;
225
- };
226
- var getUrlOrigin = () => {
227
- if (serverAsyncLocalStorage) {
228
- return serverAsyncLocalStorage.getStore()?.origin ?? "http://fallback.com";
229
- } else if (typeof window !== "undefined") {
230
- return window.location.origin;
231
- }
232
- return "http://fallback.com";
233
- };
234
- function toLocale(value) {
235
- if (typeof value !== "string") {
236
- return;
237
- }
238
- const lowerValue = value.toLowerCase();
239
- for (const locale of locales) {
240
- if (locale.toLowerCase() === lowerValue) {
241
- return locale;
242
- }
243
- }
244
- return;
245
- }
246
- function assertIsLocale(input) {
247
- const locale = toLocale(input);
248
- if (locale)
249
- return locale;
250
- throw new Error(`Invalid locale: ${input}. Expected one of: ${locales.join(", ")}`);
251
- }
252
- function extractLocaleFromCookie() {
253
- if (typeof document === "undefined" || !document.cookie) {
254
- return;
255
- }
256
- const match = document.cookie.match(new RegExp(`(^| )${cookieName}=([^;]+)`));
257
- const locale = match?.[2];
258
- return toLocale(locale);
259
- }
260
- function extractLocaleFromNavigator() {
261
- if (!navigator?.languages?.length) {
262
- return;
263
- }
264
- const languages = navigator.languages.map((lang) => ({
265
- fullTag: lang,
266
- baseTag: lang.split("-")[0]
267
- }));
268
- for (const lang of languages) {
269
- const fullLocale = toLocale(lang.fullTag);
270
- if (fullLocale) {
271
- return fullLocale;
272
- }
273
- const baseLocale2 = toLocale(lang.baseTag);
274
- if (baseLocale2) {
275
- return baseLocale2;
276
- }
277
- }
278
- return;
279
- }
280
- var cachedUrl;
281
- var cachedLocale;
282
- function extractLocaleFromUrl(url) {
283
- const urlString = typeof url === "string" ? url : url.href;
284
- if (cachedUrl === urlString) {
285
- return cachedLocale;
286
- }
287
- let result;
288
- if (TREE_SHAKE_DEFAULT_URL_PATTERN_USED) {
289
- result = defaultUrlPatternExtractLocale(url);
290
- } else {
291
- const urlObj = typeof url === "string" ? new URL(url) : url;
292
- for (const element of urlPatterns) {
293
- for (const [locale, localizedPattern] of element.localized) {
294
- const match = new URLPattern(localizedPattern, urlObj.href).exec(urlObj.href);
295
- if (match) {
296
- result = locale;
297
- break;
298
- }
299
- }
300
- if (result)
301
- break;
302
- }
303
- }
304
- cachedUrl = urlString;
305
- cachedLocale = result;
306
- return result;
307
- }
308
- function defaultUrlPatternExtractLocale(url) {
309
- const urlObj = new URL(url, "http://dummy.com");
310
- const pathSegments = urlObj.pathname.split("/").filter(Boolean);
311
- return toLocale(pathSegments[0]) || baseLocale;
312
- }
313
- function localizeUrl(url, options) {
314
- const targetLocale = options?.locale ? assertIsLocale(options?.locale) : getLocale();
315
- if (TREE_SHAKE_DEFAULT_URL_PATTERN_USED) {
316
- return localizeUrlDefaultPattern(url, targetLocale);
317
- }
318
- const urlObj = typeof url === "string" ? new URL(url) : url;
319
- for (const element of urlPatterns) {
320
- for (const [, localizedPattern] of element.localized) {
321
- const match = new URLPattern(localizedPattern, urlObj.href).exec(urlObj.href);
322
- if (!match) {
323
- continue;
324
- }
325
- const targetPattern = element.localized.find(([locale]) => locale === targetLocale)?.[1];
326
- if (!targetPattern) {
327
- continue;
328
- }
329
- const localizedUrl = fillPattern(targetPattern, aggregateGroups(match), urlObj.origin);
330
- return fillMissingUrlParts(localizedUrl, match);
331
- }
332
- const unlocalizedMatch = new URLPattern(element.pattern, urlObj.href).exec(urlObj.href);
333
- if (unlocalizedMatch) {
334
- const targetPattern = element.localized.find(([locale]) => locale === targetLocale)?.[1];
335
- if (targetPattern) {
336
- const localizedUrl = fillPattern(targetPattern, aggregateGroups(unlocalizedMatch), urlObj.origin);
337
- return fillMissingUrlParts(localizedUrl, unlocalizedMatch);
338
- }
339
- }
340
- }
341
- return urlObj;
342
- }
343
- function localizeUrlDefaultPattern(url, locale) {
344
- const urlObj = typeof url === "string" ? new URL(url, getUrlOrigin()) : new URL(url);
345
- const currentLocale = extractLocaleFromUrl(urlObj);
346
- if (currentLocale === locale) {
347
- return urlObj;
348
- }
349
- const pathSegments = urlObj.pathname.split("/").filter(Boolean);
350
- if (pathSegments.length > 0 && toLocale(pathSegments[0])) {
351
- pathSegments.shift();
352
- }
353
- if (locale === baseLocale) {
354
- urlObj.pathname = "/" + pathSegments.join("/");
355
- } else {
356
- urlObj.pathname = "/" + locale + "/" + pathSegments.join("/");
357
- }
358
- return urlObj;
359
- }
360
- function fillMissingUrlParts(url, match) {
361
- if (match.protocol.groups["0"]) {
362
- url.protocol = match.protocol.groups["0"] ?? "";
363
- }
364
- if (match.hostname.groups["0"]) {
365
- url.hostname = match.hostname.groups["0"] ?? "";
366
- }
367
- if (match.username.groups["0"]) {
368
- url.username = match.username.groups["0"] ?? "";
369
- }
370
- if (match.password.groups["0"]) {
371
- url.password = match.password.groups["0"] ?? "";
372
- }
373
- if (match.port.groups["0"]) {
374
- url.port = match.port.groups["0"] ?? "";
375
- }
376
- if (match.pathname.groups["0"]) {
377
- url.pathname = match.pathname.groups["0"] ?? "";
378
- }
379
- if (match.search.groups["0"]) {
380
- url.search = match.search.groups["0"] ?? "";
381
- }
382
- if (match.hash.groups["0"]) {
383
- url.hash = match.hash.groups["0"] ?? "";
384
- }
385
- return url;
386
- }
387
- function fillPattern(pattern, values, origin) {
388
- let processedPattern = pattern.replace(/(https?:\/\/[^:/]+):(\d+)(\/|$)/g, (_, protocol, port, slash) => {
389
- return `${protocol}#PORT-${port}#${slash}`;
390
- });
391
- let processedGroupDelimiters = processedPattern.replace(/\{([^{}]*)\}([?+*]?)/g, (_, content, modifier) => {
392
- if (modifier === "?") {
393
- return content;
394
- }
395
- return content;
396
- });
397
- let filled = processedGroupDelimiters.replace(/(\/?):([a-zA-Z0-9_]+)(\([^)]*\))?([?+*]?)/g, (_, slash, name, __, modifier) => {
398
- const value = values[name];
399
- if (value === null) {
400
- return "";
401
- }
402
- if (modifier === "?") {
403
- return value !== undefined ? `${slash}${value}` : "";
404
- }
405
- if (modifier === "+" || modifier === "*") {
406
- if (value === undefined && modifier === "+") {
407
- throw new Error(`Missing value for "${name}" (one or more required)`);
408
- }
409
- return value ? `${slash}${value}` : "";
410
- }
411
- if (value === undefined) {
412
- throw new Error(`Missing value for "${name}"`);
413
- }
414
- return `${slash}${value}`;
415
- });
416
- filled = filled.replace(/#PORT-(\d+)#/g, ":$1");
417
- return new URL(filled, origin);
418
- }
419
- function aggregateGroups(match) {
420
- return {
421
- ...match.hash.groups,
422
- ...match.hostname.groups,
423
- ...match.password.groups,
424
- ...match.pathname.groups,
425
- ...match.port.groups,
426
- ...match.protocol.groups,
427
- ...match.search.groups,
428
- ...match.username.groups
429
- };
430
- }
431
- var customServerStrategies = new Map;
432
- var customClientStrategies = new Map;
433
- function isCustomStrategy(strategy2) {
434
- return typeof strategy2 === "string" && /^custom-[A-Za-z0-9_-]+$/.test(strategy2);
435
- }
436
-
437
1
  // ../../src/components/ui/button.tsx
438
2
  import { Button as ButtonPrimitive } from "@base-ui/react/button";
439
3
  import { cva } from "class-variance-authority";
@@ -572,10 +136,12 @@ function DropdownMenuRadioItem({
572
136
  // ../../src/components/ui/locale-switcher.tsx
573
137
  import { Languages } from "lucide-react";
574
138
  import { Option, Schema } from "effect";
139
+ import {
140
+ useKrakstackLocale,
141
+ useKrakstackLocales
142
+ } from "@krak-stack/registry/krakstack-provider";
575
143
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
576
- var LocaleSchema = Schema.Literals(locales).annotate({
577
- identifier: "Locale"
578
- });
144
+ var locales = ["en", "fr"];
579
145
  var messages = {
580
146
  en: {
581
147
  title: "Switch language",
@@ -584,17 +150,29 @@ var messages = {
584
150
  },
585
151
  fr: {
586
152
  title: "Changer de langue",
587
- en: "English",
153
+ en: "Anglais",
588
154
  fr: "Français"
589
155
  }
590
156
  };
591
- var localeMessages = (overrides) => ({
592
- ...getLocale().startsWith("fr") ? messages.fr : messages.en,
593
- ...overrides
594
- });
595
- var LocaleSwitcher = ({ messages: messages2 }) => {
596
- const locale = getLocale();
597
- const labels = localeMessages(messages2);
157
+ var localeMessages = (locale, translations) => {
158
+ const defaults = locale.startsWith("fr") ? messages.fr : messages.en;
159
+ const base = translations?.[locale.split("-")[0] ?? locale];
160
+ const exact = translations?.[locale];
161
+ return {
162
+ title: exact?.title ?? base?.title ?? defaults.title,
163
+ localeName: (option) => exact?.[option] ?? base?.[option] ?? (option === "en" ? defaults.en : option === "fr" ? defaults.fr : option)
164
+ };
165
+ };
166
+ var LocaleSwitcher = ({
167
+ locale: localeOverride,
168
+ locales: localeOverrides,
169
+ messages: messages2,
170
+ onLocaleChange
171
+ }) => {
172
+ const locale = useKrakstackLocale(localeOverride);
173
+ const localeOptions = useKrakstackLocales(localeOverrides);
174
+ const labels = localeMessages(locale, messages2);
175
+ const LocaleSchema = Schema.String.check(Schema.makeFilter((value) => localeOptions.includes(value))).annotate({ identifier: "Locale" });
598
176
  return /* @__PURE__ */ jsxs2(DropdownMenu, {
599
177
  children: [
600
178
  /* @__PURE__ */ jsx3(DropdownMenuTrigger, {
@@ -623,12 +201,15 @@ var LocaleSwitcher = ({ messages: messages2 }) => {
623
201
  /* @__PURE__ */ jsx3(DropdownMenuRadioGroup, {
624
202
  "aria-label": labels.title,
625
203
  value: locale,
626
- onValueChange: (value) => Schema.decodeUnknownOption(LocaleSchema)(value).pipe(Option.match({ onNone: () => {
627
- return;
628
- }, onSome: setLocale })),
629
- children: locales.map((l) => /* @__PURE__ */ jsx3(DropdownMenuRadioItem, {
204
+ onValueChange: (value) => Schema.decodeUnknownOption(LocaleSchema)(value).pipe(Option.match({
205
+ onNone: () => {
206
+ return;
207
+ },
208
+ onSome: onLocaleChange
209
+ })),
210
+ children: localeOptions.map((l) => /* @__PURE__ */ jsx3(DropdownMenuRadioItem, {
630
211
  value: l,
631
- children: labels[l]
212
+ children: labels.localeName(l)
632
213
  }, l))
633
214
  })
634
215
  ]
@@ -638,5 +219,6 @@ var LocaleSwitcher = ({ messages: messages2 }) => {
638
219
  });
639
220
  };
640
221
  export {
641
- LocaleSwitcher
222
+ LocaleSwitcher,
223
+ locales
642
224
  };
@@ -8,7 +8,8 @@ export type PaginationMessages = {
8
8
  goToNextPage: string;
9
9
  goToLastPage: string;
10
10
  };
11
- export declare const paginationMessages: (locale?: "en" | "fr", overrides?: Partial<PaginationMessages>) => {
11
+ export type PaginationMessageTranslations = Partial<Record<string, Partial<PaginationMessages>>>;
12
+ export declare const paginationMessages: (locale?: string, translations?: PaginationMessageTranslations) => {
12
13
  pageSize: string;
13
14
  results: (count: number) => string;
14
15
  selectedOf: (selected: number, total: number) => string;
@@ -29,7 +30,8 @@ export declare const paginationMessages: (locale?: "en" | "fr", overrides?: Part
29
30
  };
30
31
  export type PaginationProps = {
31
32
  compact?: boolean | undefined;
32
- messages?: Partial<PaginationMessages> | undefined;
33
+ locale?: string | undefined;
34
+ messages?: PaginationMessageTranslations | undefined;
33
35
  onPageChange: (page: number) => void;
34
36
  onPageSizeChange: (pageSize: number) => void;
35
37
  page: number;
@@ -40,4 +42,4 @@ export type PaginationProps = {
40
42
  showResults?: boolean | undefined;
41
43
  totalRows: number;
42
44
  };
43
- export declare function Pagination({ compact, messages: messageOverrides, onPageChange, onPageSizeChange, page, pageCount, pageSize, pageSizes, selectedRows, showResults, totalRows, }: PaginationProps): import("react").JSX.Element;
45
+ export declare function Pagination({ compact, locale: localeOverride, messages: messageOverrides, onPageChange, onPageSizeChange, page, pageCount, pageSize, pageSizes, selectedRows, showResults, totalRows, }: PaginationProps): import("react").JSX.Element;