@vkzstudio/muza-ui 1.0.6 → 1.0.8

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 (107) hide show
  1. package/dist/components/Button/buttonVariants.d.ts +1 -1
  2. package/dist/components/Calendar/Calendar.d.ts +2 -2
  3. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  4. package/dist/components/Calendar/Calendar.js +158 -150
  5. package/dist/components/Chip/Chip.d.ts +43 -0
  6. package/dist/components/Chip/Chip.d.ts.map +1 -0
  7. package/dist/components/Chip/Chip.js +98 -0
  8. package/dist/components/Chip/Chip.stories.d.ts +9 -0
  9. package/dist/components/Chip/Chip.stories.d.ts.map +1 -0
  10. package/dist/components/Chip/index.d.ts +2 -0
  11. package/dist/components/Chip/index.d.ts.map +1 -0
  12. package/dist/components/DataTable/DataTable.d.ts +23 -0
  13. package/dist/components/DataTable/DataTable.d.ts.map +1 -0
  14. package/dist/components/DataTable/DataTable.js +101 -0
  15. package/dist/components/DataTable/DataTable.stories.d.ts +14 -0
  16. package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -0
  17. package/dist/components/DataTable/index.d.ts +2 -0
  18. package/dist/components/DataTable/index.d.ts.map +1 -0
  19. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  20. package/dist/components/Dialog/Dialog.js +28 -26
  21. package/dist/components/ExpandableTable/Table.d.ts +1 -1
  22. package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
  23. package/dist/components/FileUpload/FileItem.js +81 -77
  24. package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
  25. package/dist/components/FileUpload/FileUpload.js +98 -94
  26. package/dist/components/Flex/Flex.d.ts +1 -1
  27. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  28. package/dist/components/MultiSelect/MultiSelect.js +51 -50
  29. package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts +19 -0
  30. package/dist/components/MuzaUIProvider/MuzaUIProvider.d.ts.map +1 -0
  31. package/dist/components/MuzaUIProvider/MuzaUIProvider.js +19 -0
  32. package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts +10 -0
  33. package/dist/components/MuzaUIProvider/MuzaUIProvider.stories.d.ts.map +1 -0
  34. package/dist/components/MuzaUIProvider/index.d.ts +2 -0
  35. package/dist/components/MuzaUIProvider/index.d.ts.map +1 -0
  36. package/dist/components/Reorderable/Reorderable.d.ts +100 -0
  37. package/dist/components/Reorderable/Reorderable.d.ts.map +1 -0
  38. package/dist/components/Reorderable/Reorderable.js +197 -0
  39. package/dist/components/Reorderable/Reorderable.stories.d.ts +14 -0
  40. package/dist/components/Reorderable/Reorderable.stories.d.ts.map +1 -0
  41. package/dist/components/Reorderable/index.d.ts +2 -0
  42. package/dist/components/Reorderable/index.d.ts.map +1 -0
  43. package/dist/components/ReorderableTable/ReorderableTable.d.ts +40 -0
  44. package/dist/components/ReorderableTable/ReorderableTable.d.ts.map +1 -0
  45. package/dist/components/ReorderableTable/ReorderableTable.js +175 -0
  46. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts +18 -0
  47. package/dist/components/ReorderableTable/ReorderableTable.stories.d.ts.map +1 -0
  48. package/dist/components/ReorderableTable/index.d.ts +2 -0
  49. package/dist/components/ReorderableTable/index.d.ts.map +1 -0
  50. package/dist/components/Searchbar/Searchbar.d.ts +1 -1
  51. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  52. package/dist/components/Searchbar/Searchbar.js +50 -49
  53. package/dist/components/Select/Select.d.ts.map +1 -1
  54. package/dist/components/Select/Select.js +43 -42
  55. package/dist/components/Stepper/Stepper.d.ts +1 -1
  56. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  57. package/dist/components/Stepper/Stepper.js +43 -42
  58. package/dist/components/SwipeButton/SwipeButton.d.ts +1 -1
  59. package/dist/components/SwipeButton/SwipeButton.d.ts.map +1 -1
  60. package/dist/components/SwipeButton/SwipeButton.js +85 -84
  61. package/dist/components/SwipeButton/SwipeButton.stories.d.ts +1 -1
  62. package/dist/components/Typography/Typography.d.ts +1 -1
  63. package/dist/components/index.d.ts +6 -0
  64. package/dist/components/index.d.ts.map +1 -1
  65. package/dist/index.js +217 -189
  66. package/dist/muza-ui.css +1 -1
  67. package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  68. package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  69. package/dist/node_modules/date-fns/constants.js +4 -0
  70. package/dist/node_modules/date-fns/constructFrom.js +8 -0
  71. package/dist/node_modules/date-fns/isSameWeek.js +14 -0
  72. package/dist/node_modules/date-fns/locale/cs/_lib/formatDistance.js +275 -0
  73. package/dist/node_modules/date-fns/locale/cs/_lib/formatLong.js +33 -0
  74. package/dist/node_modules/date-fns/locale/cs/_lib/formatRelative.js +25 -0
  75. package/dist/node_modules/date-fns/locale/cs/_lib/localize.js +167 -0
  76. package/dist/node_modules/date-fns/locale/cs/_lib/match.js +109 -0
  77. package/dist/node_modules/date-fns/locale/cs.js +21 -0
  78. package/dist/node_modules/date-fns/locale/sk/_lib/formatDistance.js +158 -0
  79. package/dist/node_modules/date-fns/locale/sk/_lib/formatLong.js +33 -0
  80. package/dist/node_modules/date-fns/locale/sk/_lib/formatRelative.js +60 -0
  81. package/dist/node_modules/date-fns/locale/sk/_lib/localize.js +175 -0
  82. package/dist/node_modules/date-fns/locale/sk/_lib/match.js +111 -0
  83. package/dist/node_modules/date-fns/locale/sk.js +21 -0
  84. package/dist/node_modules/date-fns/startOfWeek.js +11 -0
  85. package/dist/node_modules/date-fns/toDate.js +8 -0
  86. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +38 -0
  87. package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +29 -0
  88. package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.js +17 -0
  89. package/dist/node_modules/framer-motion/dist/es/context/ReorderContext.js +5 -0
  90. package/dist/node_modules/motion-utils/dist/es/array.js +15 -6
  91. package/dist/translations/TranslationContext.d.ts +61 -0
  92. package/dist/translations/TranslationContext.d.ts.map +1 -0
  93. package/dist/translations/TranslationContext.js +74 -0
  94. package/dist/translations/index.d.ts +6 -0
  95. package/dist/translations/index.d.ts.map +1 -0
  96. package/dist/translations/locales/cs.d.ts +3 -0
  97. package/dist/translations/locales/cs.d.ts.map +1 -0
  98. package/dist/translations/locales/cs.js +56 -0
  99. package/dist/translations/locales/en.d.ts +3 -0
  100. package/dist/translations/locales/en.d.ts.map +1 -0
  101. package/dist/translations/locales/en.js +56 -0
  102. package/dist/translations/locales/sk.d.ts +3 -0
  103. package/dist/translations/locales/sk.d.ts.map +1 -0
  104. package/dist/translations/locales/sk.js +56 -0
  105. package/dist/translations/types.d.ts +126 -0
  106. package/dist/translations/types.d.ts.map +1 -0
  107. package/package.json +2 -2
@@ -1,11 +1,20 @@
1
- function f(e, n) {
1
+ function l(e, n) {
2
2
  e.indexOf(n) === -1 && e.push(n);
3
3
  }
4
- function d(e, n) {
5
- const i = e.indexOf(n);
6
- i > -1 && e.splice(i, 1);
4
+ function u(e, n) {
5
+ const t = e.indexOf(n);
6
+ t > -1 && e.splice(t, 1);
7
+ }
8
+ function f([...e], n, t) {
9
+ const i = n < 0 ? e.length + n : n;
10
+ if (i >= 0 && i < e.length) {
11
+ const c = t < 0 ? e.length + t : t, [s] = e.splice(n, 1);
12
+ e.splice(c, 0, s);
13
+ }
14
+ return e;
7
15
  }
8
16
  export {
9
- f as addUniqueItem,
10
- d as removeItem
17
+ l as addUniqueItem,
18
+ f as moveItem,
19
+ u as removeItem
11
20
  };
@@ -0,0 +1,61 @@
1
+ import { Locale } from 'date-fns/locale';
2
+ import { MuzaTranslations, TranslationConfig } from './types';
3
+ import * as React from 'react';
4
+ /**
5
+ * Context value provided by TranslationProvider
6
+ */
7
+ export interface TranslationContextValue {
8
+ /** Current locale code */
9
+ locale: string;
10
+ /** Merged translations object */
11
+ translations: MuzaTranslations;
12
+ /** date-fns locale for Calendar/DatePicker */
13
+ dateFnsLocale: Locale;
14
+ }
15
+ declare const TranslationContext: React.Context<TranslationContextValue | null>;
16
+ export interface TranslationProviderProps extends TranslationConfig {
17
+ children: React.ReactNode;
18
+ }
19
+ /**
20
+ * Provider component for muza-ui translations
21
+ *
22
+ * @example
23
+ * // Basic usage with locale
24
+ * <TranslationProvider locale="cs">
25
+ * <App />
26
+ * </TranslationProvider>
27
+ *
28
+ * @example
29
+ * // With custom overrides
30
+ * <TranslationProvider
31
+ * locale="en"
32
+ * translations={{ calendar: { confirmButton: 'Apply' } }}
33
+ * >
34
+ * <App />
35
+ * </TranslationProvider>
36
+ */
37
+ export declare const TranslationProvider: {
38
+ ({ children, locale: localeProp, translations: translationOverrides, customLocales, detectBrowserLocale: shouldDetectBrowserLocale, }: TranslationProviderProps): import("react/jsx-runtime").JSX.Element;
39
+ displayName: string;
40
+ };
41
+ /**
42
+ * Hook to access muza-ui translations
43
+ *
44
+ * @returns The translations object for the current locale
45
+ *
46
+ * @example
47
+ * const t = useMuzaTranslations()
48
+ * console.log(t.calendar.confirmButton) // "Confirm" or "Potvrdit výběr"
49
+ */
50
+ export declare const useMuzaTranslations: () => MuzaTranslations;
51
+ /**
52
+ * Hook to access the full translation context including locale and date-fns locale
53
+ *
54
+ * @returns The full translation context value
55
+ *
56
+ * @example
57
+ * const { locale, translations, dateFnsLocale } = useMuzaTranslationContext()
58
+ */
59
+ export declare const useMuzaTranslationContext: () => TranslationContextValue;
60
+ export { TranslationContext };
61
+ //# sourceMappingURL=TranslationContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../src/translations/TranslationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,iBAAiB,CAAA;AAI3D,OAAO,KAAK,EAGV,gBAAgB,EAEhB,iBAAiB,EAClB,MAAM,SAAS,CAAA;AAoBhB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,iCAAiC;IACjC,YAAY,EAAE,gBAAgB,CAAA;IAC9B,8CAA8C;IAC9C,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,QAAA,MAAM,kBAAkB,+CAEvB,CAAA;AAwFD,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,mBAAmB;2IAM7B,wBAAwB;;CAwC1B,CAAA;AAID;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,QAAO,gBAStC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,QAAO,uBAa5C,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,74 @@
1
+ import { jsx as x } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { csTranslations as g } from "./locales/cs.js";
4
+ import { enTranslations as a } from "./locales/en.js";
5
+ import { skTranslations as M } from "./locales/sk.js";
6
+ import { enUS as u } from "../node_modules/date-fns/locale/en-US.js";
7
+ import { sk as b } from "../node_modules/date-fns/locale/sk.js";
8
+ import { cs as F } from "../node_modules/date-fns/locale/cs.js";
9
+ const d = {
10
+ en: a,
11
+ cs: g,
12
+ sk: M
13
+ }, y = {
14
+ en: u,
15
+ cs: F,
16
+ sk: b
17
+ }, l = s.createContext(
18
+ null
19
+ ), T = (n, t) => {
20
+ const i = { ...n };
21
+ for (const e in t)
22
+ if (Object.prototype.hasOwnProperty.call(t, e)) {
23
+ const o = t[e], r = n[e];
24
+ o !== void 0 && typeof o == "object" && o !== null && !Array.isArray(o) && typeof r == "object" && r !== null && !Array.isArray(r) ? i[e] = T(
25
+ r,
26
+ o
27
+ ) : o !== void 0 && (i[e] = o);
28
+ }
29
+ return i;
30
+ }, k = () => {
31
+ if (typeof navigator > "u") return "en";
32
+ const n = navigator.language.split("-")[0].toLowerCase();
33
+ return n === "cs" ? "cs" : n === "sk" ? "sk" : "en";
34
+ }, v = (n, t) => t != null && t[n] ? t[n].translations : n in d ? d[n] : a, C = (n, t) => t != null && t[n] ? t[n].dateFnsLocale : n in y ? y[n] : u, j = ({
35
+ children: n,
36
+ locale: t,
37
+ translations: i,
38
+ customLocales: e,
39
+ detectBrowserLocale: o
40
+ }) => {
41
+ const r = s.useMemo(() => t || (o ? k() : "en"), [t, o]), f = s.useMemo(
42
+ () => v(r, e),
43
+ [r, e]
44
+ ), p = s.useMemo(() => i ? T(f, i) : f, [f, i]), c = s.useMemo(
45
+ () => C(r, e),
46
+ [r, e]
47
+ ), m = s.useMemo(
48
+ () => ({
49
+ locale: r,
50
+ translations: p,
51
+ dateFnsLocale: c
52
+ }),
53
+ [r, p, c]
54
+ );
55
+ return /* @__PURE__ */ x(l.Provider, { value: m, children: n });
56
+ };
57
+ j.displayName = "TranslationProvider";
58
+ const D = () => {
59
+ const n = s.useContext(l);
60
+ return n ? n.translations : a;
61
+ }, N = () => {
62
+ const n = s.useContext(l);
63
+ return n || {
64
+ locale: "en",
65
+ translations: a,
66
+ dateFnsLocale: u
67
+ };
68
+ };
69
+ export {
70
+ l as TranslationContext,
71
+ j as TranslationProvider,
72
+ N as useMuzaTranslationContext,
73
+ D as useMuzaTranslations
74
+ };
@@ -0,0 +1,6 @@
1
+ export { TranslationProvider, useMuzaTranslations, useMuzaTranslationContext, TranslationContext, type TranslationProviderProps, type TranslationContextValue, } from './TranslationContext';
2
+ export type { SupportedLocale, PresetType, DatePickerPreset, CalendarTranslations, DatePickerTranslations, FileUploadTranslations, DialogTranslations, StepperTranslations, SwipeButtonTranslations, SelectTranslations, SearchbarTranslations, MuzaTranslations, DeepPartial, CustomLocaleConfig, TranslationConfig, } from './types';
3
+ export { enTranslations } from './locales/en';
4
+ export { csTranslations } from './locales/cs';
5
+ export { skTranslations } from './locales/sk';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,sBAAsB,CAAA;AAG7B,YAAY,EACV,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,SAAS,CAAA;AAGhB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { MuzaTranslations } from '../types';
2
+ export declare const csTranslations: MuzaTranslations;
3
+ //# sourceMappingURL=cs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../src/translations/locales/cs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,eAAO,MAAM,cAAc,EAAE,gBAoD5B,CAAA"}
@@ -0,0 +1,56 @@
1
+ const e = {
2
+ calendar: {
3
+ confirmButton: "Potvrdit výběr",
4
+ resetButton: "Resetovat",
5
+ bottomTextDefault: "Vyberte datum"
6
+ },
7
+ datePicker: {
8
+ defaultPresets: [
9
+ { name: "Dnes", type: "Today" },
10
+ { name: "Včera", type: "Yesterday" },
11
+ { name: "Tento týden", type: "This week" },
12
+ { name: "Minulý týden", type: "Last week" },
13
+ { name: "Posledních 7 dní", type: "Last 7 days" },
14
+ { name: "Posledních 14 dní", type: "Last 14 days" },
15
+ { name: "Posledních 30 dní", type: "Last 30 days" },
16
+ { name: "Posledních 90 dní", type: "Last 90 days" },
17
+ { name: "Tento rok", type: "This year" },
18
+ { name: "Minulý rok", type: "Last year" }
19
+ ]
20
+ },
21
+ fileUpload: {
22
+ title: "Nahraj soubor nebo obrázek",
23
+ maxSizeError: "Maximální velikost souboru: {size}MB",
24
+ processingError: "Nepodařilo se zpracovat soubory",
25
+ deleteError: "Nepodařilo se smazat soubor",
26
+ downloadError: "Stažení selhalo",
27
+ deleteButtonAriaLabel: "Smazat soubor",
28
+ downloadButtonAriaLabel: "Stáhnout soubor"
29
+ },
30
+ dialog: {
31
+ closeAriaLabel: "Zavřít"
32
+ },
33
+ stepper: {
34
+ incrementAriaLabel: "Zvýšit",
35
+ decrementAriaLabel: "Snížit"
36
+ },
37
+ swipeButton: {
38
+ successText: "Úspěch",
39
+ loadingText: "Načítání",
40
+ processingAriaLabel: "Zpracovávání..."
41
+ },
42
+ select: {
43
+ placeholder: "Vyberte..."
44
+ },
45
+ searchbar: {
46
+ clearButtonAriaLabel: "Vymazat hledání",
47
+ searchButtonAriaLabel: "Hledat"
48
+ },
49
+ reorderableTable: {
50
+ dragHandleAriaLabel: "Přetáhněte pro změnu pořadí",
51
+ listAriaLabel: "Seznam s možností změny pořadí"
52
+ }
53
+ };
54
+ export {
55
+ e as csTranslations
56
+ };
@@ -0,0 +1,3 @@
1
+ import { MuzaTranslations } from '../types';
2
+ export declare const enTranslations: MuzaTranslations;
3
+ //# sourceMappingURL=en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/translations/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,eAAO,MAAM,cAAc,EAAE,gBAoD5B,CAAA"}
@@ -0,0 +1,56 @@
1
+ const e = {
2
+ calendar: {
3
+ confirmButton: "Confirm",
4
+ resetButton: "Reset",
5
+ bottomTextDefault: "Select a date"
6
+ },
7
+ datePicker: {
8
+ defaultPresets: [
9
+ { name: "Today", type: "Today" },
10
+ { name: "Yesterday", type: "Yesterday" },
11
+ { name: "This week", type: "This week" },
12
+ { name: "Last week", type: "Last week" },
13
+ { name: "Last 7 days", type: "Last 7 days" },
14
+ { name: "Last 14 days", type: "Last 14 days" },
15
+ { name: "Last 30 days", type: "Last 30 days" },
16
+ { name: "Last 90 days", type: "Last 90 days" },
17
+ { name: "This year", type: "This year" },
18
+ { name: "Last year", type: "Last year" }
19
+ ]
20
+ },
21
+ fileUpload: {
22
+ title: "Upload file or image",
23
+ maxSizeError: "Max file size: {size}MB",
24
+ processingError: "Failed to process files",
25
+ deleteError: "Failed to delete file",
26
+ downloadError: "Download failed",
27
+ deleteButtonAriaLabel: "Delete file",
28
+ downloadButtonAriaLabel: "Download file"
29
+ },
30
+ dialog: {
31
+ closeAriaLabel: "Close"
32
+ },
33
+ stepper: {
34
+ incrementAriaLabel: "Increment",
35
+ decrementAriaLabel: "Decrement"
36
+ },
37
+ swipeButton: {
38
+ successText: "Success",
39
+ loadingText: "Loading",
40
+ processingAriaLabel: "Processing..."
41
+ },
42
+ select: {
43
+ placeholder: "Select..."
44
+ },
45
+ searchbar: {
46
+ clearButtonAriaLabel: "Clear search",
47
+ searchButtonAriaLabel: "Search"
48
+ },
49
+ reorderableTable: {
50
+ dragHandleAriaLabel: "Drag to reorder",
51
+ listAriaLabel: "Reorderable list"
52
+ }
53
+ };
54
+ export {
55
+ e as enTranslations
56
+ };
@@ -0,0 +1,3 @@
1
+ import { MuzaTranslations } from '../types';
2
+ export declare const skTranslations: MuzaTranslations;
3
+ //# sourceMappingURL=sk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sk.d.ts","sourceRoot":"","sources":["../../../src/translations/locales/sk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAEhD,eAAO,MAAM,cAAc,EAAE,gBAoD5B,CAAA"}
@@ -0,0 +1,56 @@
1
+ const e = {
2
+ calendar: {
3
+ confirmButton: "Potvrdiť výber",
4
+ resetButton: "Resetovať",
5
+ bottomTextDefault: "Vyberte dátum"
6
+ },
7
+ datePicker: {
8
+ defaultPresets: [
9
+ { name: "Dnes", type: "Today" },
10
+ { name: "Včera", type: "Yesterday" },
11
+ { name: "Tento týždeň", type: "This week" },
12
+ { name: "Minulý týždeň", type: "Last week" },
13
+ { name: "Posledných 7 dní", type: "Last 7 days" },
14
+ { name: "Posledných 14 dní", type: "Last 14 days" },
15
+ { name: "Posledných 30 dní", type: "Last 30 days" },
16
+ { name: "Posledných 90 dní", type: "Last 90 days" },
17
+ { name: "Tento rok", type: "This year" },
18
+ { name: "Minulý rok", type: "Last year" }
19
+ ]
20
+ },
21
+ fileUpload: {
22
+ title: "Nahraj súbor alebo obrázok",
23
+ maxSizeError: "Maximálna veľkosť súboru: {size}MB",
24
+ processingError: "Nepodarilo sa spracovať súbory",
25
+ deleteError: "Nepodarilo sa zmazať súbor",
26
+ downloadError: "Sťahovanie zlyhalo",
27
+ deleteButtonAriaLabel: "Zmazať súbor",
28
+ downloadButtonAriaLabel: "Stiahnuť súbor"
29
+ },
30
+ dialog: {
31
+ closeAriaLabel: "Zavrieť"
32
+ },
33
+ stepper: {
34
+ incrementAriaLabel: "Zvýšiť",
35
+ decrementAriaLabel: "Znížiť"
36
+ },
37
+ swipeButton: {
38
+ successText: "Úspech",
39
+ loadingText: "Načítavanie",
40
+ processingAriaLabel: "Spracovávanie..."
41
+ },
42
+ select: {
43
+ placeholder: "Vyberte..."
44
+ },
45
+ searchbar: {
46
+ clearButtonAriaLabel: "Vymazať hľadanie",
47
+ searchButtonAriaLabel: "Hľadať"
48
+ },
49
+ reorderableTable: {
50
+ dragHandleAriaLabel: "Potiahnite pre zmenu poradia",
51
+ listAriaLabel: "Zoznam s možnosťou zmeny poradia"
52
+ }
53
+ };
54
+ export {
55
+ e as skTranslations
56
+ };
@@ -0,0 +1,126 @@
1
+ import { Locale } from 'date-fns';
2
+ /**
3
+ * Built-in supported locale codes
4
+ */
5
+ export type SupportedLocale = 'en' | 'cs' | 'sk';
6
+ /**
7
+ * Preset type identifiers for DatePicker
8
+ */
9
+ export type PresetType = 'Today' | 'Yesterday' | 'This week' | 'Last week' | 'Last 7 days' | 'Last 14 days' | 'Last 30 days' | 'Last 90 days' | 'This year' | 'Last year';
10
+ /**
11
+ * DatePicker preset configuration
12
+ */
13
+ export interface DatePickerPreset {
14
+ name: string;
15
+ type: PresetType;
16
+ }
17
+ /**
18
+ * Calendar component translations
19
+ */
20
+ export interface CalendarTranslations {
21
+ confirmButton: string;
22
+ resetButton: string;
23
+ bottomTextDefault: string;
24
+ }
25
+ /**
26
+ * DatePicker component translations with preset configurations
27
+ */
28
+ export interface DatePickerTranslations {
29
+ /** Pre-configured presets with translated names */
30
+ defaultPresets: DatePickerPreset[];
31
+ }
32
+ /**
33
+ * FileUpload component translations
34
+ */
35
+ export interface FileUploadTranslations {
36
+ title: string;
37
+ /** Use {size} placeholder for file size in MB */
38
+ maxSizeError: string;
39
+ processingError: string;
40
+ deleteError: string;
41
+ downloadError: string;
42
+ deleteButtonAriaLabel: string;
43
+ downloadButtonAriaLabel: string;
44
+ }
45
+ /**
46
+ * Dialog component translations
47
+ */
48
+ export interface DialogTranslations {
49
+ closeAriaLabel: string;
50
+ }
51
+ /**
52
+ * Stepper component translations
53
+ */
54
+ export interface StepperTranslations {
55
+ incrementAriaLabel: string;
56
+ decrementAriaLabel: string;
57
+ }
58
+ /**
59
+ * SwipeButton component translations
60
+ */
61
+ export interface SwipeButtonTranslations {
62
+ successText: string;
63
+ loadingText: string;
64
+ processingAriaLabel: string;
65
+ }
66
+ /**
67
+ * Select component translations
68
+ */
69
+ export interface SelectTranslations {
70
+ placeholder: string;
71
+ }
72
+ /**
73
+ * Searchbar component translations
74
+ */
75
+ export interface SearchbarTranslations {
76
+ clearButtonAriaLabel: string;
77
+ searchButtonAriaLabel: string;
78
+ }
79
+ /**
80
+ * ReorderableTable component translations
81
+ */
82
+ export interface ReorderableTableTranslations {
83
+ dragHandleAriaLabel: string;
84
+ listAriaLabel: string;
85
+ }
86
+ /**
87
+ * Complete translations object for all muza-ui components
88
+ */
89
+ export interface MuzaTranslations {
90
+ calendar: CalendarTranslations;
91
+ datePicker: DatePickerTranslations;
92
+ fileUpload: FileUploadTranslations;
93
+ dialog: DialogTranslations;
94
+ stepper: StepperTranslations;
95
+ swipeButton: SwipeButtonTranslations;
96
+ select: SelectTranslations;
97
+ searchbar: SearchbarTranslations;
98
+ reorderableTable: ReorderableTableTranslations;
99
+ }
100
+ /**
101
+ * Utility type for partial/deep overrides of translations
102
+ */
103
+ export type DeepPartial<T> = {
104
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
105
+ };
106
+ /**
107
+ * Custom locale configuration for registering additional languages
108
+ */
109
+ export interface CustomLocaleConfig {
110
+ translations: MuzaTranslations;
111
+ dateFnsLocale: Locale;
112
+ }
113
+ /**
114
+ * Translation provider configuration
115
+ */
116
+ export interface TranslationConfig {
117
+ /** Locale code (built-in: 'en', 'cs', 'sk') */
118
+ locale?: string;
119
+ /** Partial overrides for built-in translations */
120
+ translations?: DeepPartial<MuzaTranslations>;
121
+ /** Register custom locales beyond the built-in ones */
122
+ customLocales?: Record<string, CustomLocaleConfig>;
123
+ /** Auto-detect locale from browser (navigator.language) */
124
+ detectBrowserLocale?: boolean;
125
+ }
126
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/translations/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEhD;;GAEG;AACH,M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component library built with Vite, shadcn/ui, and Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -76,7 +76,7 @@
76
76
  "color": "^5.0.2",
77
77
  "date-fns": "^4.1.0",
78
78
  "embla-carousel-react": "^8.6.0",
79
- "motion": "^12.23.12",
79
+ "motion": "^12.29.0",
80
80
  "next-themes": "^0.4.6",
81
81
  "photoswipe": "^5.4.4",
82
82
  "react": "^18.3.1",