@serhii.olishevskyi/docs 1.0.9 → 1.1.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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  UserPopoverComponent,
3
3
  UserPopoverComponent_default
4
- } from "./chunk-I4NSFSES.mjs";
4
+ } from "./chunk-P6SVLDTY.mjs";
5
5
  export {
6
6
  UserPopoverComponent,
7
7
  UserPopoverComponent_default as default
@@ -1531,7 +1531,7 @@ var SEVERITY_ICONS = {
1531
1531
  info: /* @__PURE__ */ jsx12(InfoIcon, { color: "info", sx: { fontSize: 40 } }),
1532
1532
  success: /* @__PURE__ */ jsx12(SuccessIcon, { color: "success", sx: { fontSize: 40 } })
1533
1533
  };
1534
- var ConfirmationProvider = ({ children }) => {
1534
+ var ConfirmationProvider = ({ overrideNamespace, children }) => {
1535
1535
  const [open, setOpen] = useState9(false);
1536
1536
  const [options, setOptions] = useState9(null);
1537
1537
  const [resolver, setResolver] = useState9(null);
@@ -1563,7 +1563,7 @@ var ConfirmationProvider = ({ children }) => {
1563
1563
  children: [
1564
1564
  /* @__PURE__ */ jsxs5(DialogTitle2, { sx: { display: "flex", alignItems: "center", gap: 1.5, pb: 1 }, children: [
1565
1565
  SEVERITY_ICONS[severityType],
1566
- /* @__PURE__ */ jsx12(Box3, { component: "span", sx: { fontWeight: 600 }, children: options?.title || /* @__PURE__ */ jsx12(TranslateText, { children: "Confirmation" }) })
1566
+ /* @__PURE__ */ jsx12(Box3, { component: "span", sx: { fontWeight: 600 }, children: options?.title || /* @__PURE__ */ jsx12(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Confirmation" }) })
1567
1567
  ] }),
1568
1568
  /* @__PURE__ */ jsx12(DialogContent2, { sx: { py: 2 }, dividers: true, children: /* @__PURE__ */ jsx12(DialogContentText, { color: "text.secondary", children: options?.message }) }),
1569
1569
  /* @__PURE__ */ jsxs5(DialogActions2, { sx: { pt: 2, px: 2, justifyContent: "flex-end", gap: 1 }, children: [
@@ -1573,7 +1573,7 @@ var ConfirmationProvider = ({ children }) => {
1573
1573
  onClick: () => handleClose("cancel"),
1574
1574
  color: "inherit",
1575
1575
  variant: "text",
1576
- children: options?.cancelText || /* @__PURE__ */ jsx12(TranslateText, { children: "Cancel" })
1576
+ children: options?.cancelText || /* @__PURE__ */ jsx12(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Cancel" })
1577
1577
  }
1578
1578
  ),
1579
1579
  options?.showNoButton && /* @__PURE__ */ jsx12(
@@ -1582,7 +1582,7 @@ var ConfirmationProvider = ({ children }) => {
1582
1582
  onClick: () => handleClose("no"),
1583
1583
  color: "inherit",
1584
1584
  variant: "outlined",
1585
- children: options?.noText || /* @__PURE__ */ jsx12(TranslateText, { children: "No" })
1585
+ children: options?.noText || /* @__PURE__ */ jsx12(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "No" })
1586
1586
  }
1587
1587
  ),
1588
1588
  /* @__PURE__ */ jsx12(
@@ -1592,7 +1592,7 @@ var ConfirmationProvider = ({ children }) => {
1592
1592
  color: options?.confirmColor || (severityType === "error" ? "error" : "primary"),
1593
1593
  variant: "contained",
1594
1594
  autoFocus: true,
1595
- children: options?.confirmText || /* @__PURE__ */ jsx12(TranslateText, { children: "Yes" })
1595
+ children: options?.confirmText || /* @__PURE__ */ jsx12(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Yes" })
1596
1596
  }
1597
1597
  )
1598
1598
  ] })
package/dist/index.d.mts CHANGED
@@ -231,6 +231,7 @@ declare const useAI: () => AIContextType;
231
231
  type DialogSeverity = 'error' | 'warning' | 'info' | 'success';
232
232
  type ConfirmResult = 'yes' | 'no' | 'cancel';
233
233
  interface ConfirmOptions {
234
+ overrideNamespace?: string;
234
235
  title?: ReactNode;
235
236
  message: ReactNode;
236
237
  type?: DialogSeverity;
@@ -242,6 +243,7 @@ interface ConfirmOptions {
242
243
  confirmColor?: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
243
244
  }
244
245
  interface ConfirmationProviderProps {
246
+ overrideNamespace?: string;
245
247
  children: ReactNode;
246
248
  }
247
249
  declare const ConfirmationProvider: React__default.FC<ConfirmationProviderProps>;
package/dist/index.d.ts CHANGED
@@ -231,6 +231,7 @@ declare const useAI: () => AIContextType;
231
231
  type DialogSeverity = 'error' | 'warning' | 'info' | 'success';
232
232
  type ConfirmResult = 'yes' | 'no' | 'cancel';
233
233
  interface ConfirmOptions {
234
+ overrideNamespace?: string;
234
235
  title?: ReactNode;
235
236
  message: ReactNode;
236
237
  type?: DialogSeverity;
@@ -242,6 +243,7 @@ interface ConfirmOptions {
242
243
  confirmColor?: 'primary' | 'secondary' | 'error' | 'warning' | 'info' | 'success';
243
244
  }
244
245
  interface ConfirmationProviderProps {
246
+ overrideNamespace?: string;
245
247
  children: ReactNode;
246
248
  }
247
249
  declare const ConfirmationProvider: React__default.FC<ConfirmationProviderProps>;
package/dist/index.js CHANGED
@@ -1654,7 +1654,7 @@ var init_ConfirmationProvider = __esm({
1654
1654
  info: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_material.InfoOutlined, { color: "info", sx: { fontSize: 40 } }),
1655
1655
  success: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons_material.CheckCircleOutlined, { color: "success", sx: { fontSize: 40 } })
1656
1656
  };
1657
- ConfirmationProvider = ({ children }) => {
1657
+ ConfirmationProvider = ({ overrideNamespace, children }) => {
1658
1658
  const [open, setOpen] = (0, import_react16.useState)(false);
1659
1659
  const [options, setOptions] = (0, import_react16.useState)(null);
1660
1660
  const [resolver, setResolver] = (0, import_react16.useState)(null);
@@ -1686,7 +1686,7 @@ var init_ConfirmationProvider = __esm({
1686
1686
  children: [
1687
1687
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material9.DialogTitle, { sx: { display: "flex", alignItems: "center", gap: 1.5, pb: 1 }, children: [
1688
1688
  SEVERITY_ICONS[severityType],
1689
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material9.Box, { component: "span", sx: { fontWeight: 600 }, children: options?.title || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { children: "Confirmation" }) })
1689
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material9.Box, { component: "span", sx: { fontWeight: 600 }, children: options?.title || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Confirmation" }) })
1690
1690
  ] }),
1691
1691
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material9.DialogContent, { sx: { py: 2 }, dividers: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_material9.DialogContentText, { color: "text.secondary", children: options?.message }) }),
1692
1692
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_material9.DialogActions, { sx: { pt: 2, px: 2, justifyContent: "flex-end", gap: 1 }, children: [
@@ -1696,7 +1696,7 @@ var init_ConfirmationProvider = __esm({
1696
1696
  onClick: () => handleClose("cancel"),
1697
1697
  color: "inherit",
1698
1698
  variant: "text",
1699
- children: options?.cancelText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { children: "Cancel" })
1699
+ children: options?.cancelText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Cancel" })
1700
1700
  }
1701
1701
  ),
1702
1702
  options?.showNoButton && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -1705,7 +1705,7 @@ var init_ConfirmationProvider = __esm({
1705
1705
  onClick: () => handleClose("no"),
1706
1706
  color: "inherit",
1707
1707
  variant: "outlined",
1708
- children: options?.noText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { children: "No" })
1708
+ children: options?.noText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "No" })
1709
1709
  }
1710
1710
  ),
1711
1711
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -1715,7 +1715,7 @@ var init_ConfirmationProvider = __esm({
1715
1715
  color: options?.confirmColor || (severityType === "error" ? "error" : "primary"),
1716
1716
  variant: "contained",
1717
1717
  autoFocus: true,
1718
- children: options?.confirmText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { children: "Yes" })
1718
+ children: options?.confirmText || /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TranslateText, { overrideNamespace: overrideNamespace || "confirmation-dialog", children: "Yes" })
1719
1719
  }
1720
1720
  )
1721
1721
  ] })
package/dist/index.mjs CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  useTranslationEdit,
33
33
  useTranslationNamespace,
34
34
  useUserSettings
35
- } from "./chunk-I4NSFSES.mjs";
35
+ } from "./chunk-P6SVLDTY.mjs";
36
36
 
37
37
  // src/UI/components/inputs/TextFieldComponent.tsx
38
38
  import { useState } from "react";
@@ -730,7 +730,7 @@ var EmailInputComponent = ({
730
730
  import { useState as useState5, useEffect as useEffect2, lazy, Suspense } from "react";
731
731
  import { Avatar, Tooltip as Tooltip3, Typography as Typography2 } from "@mui/material";
732
732
  import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
733
- var LazyUserPopover = lazy(() => import("./UserPopoverComponent-VE2Q77FP.mjs"));
733
+ var LazyUserPopover = lazy(() => import("./UserPopoverComponent-L2AYFTAS.mjs"));
734
734
  var getInitials = (name) => {
735
735
  if (!name) return "?";
736
736
  const parts = name.trim().split(" ");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serhii.olishevskyi/docs",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "DOCS.UA react packages",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",