@intlayer/design-system 7.3.2-canary.0 → 7.3.2-canary.1
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/dist/esm/components/Accordion/Accordion.mjs +1 -1
- package/dist/esm/components/Avatar/index.mjs +1 -1
- package/dist/esm/components/Breadcrumb/index.mjs +1 -1
- package/dist/esm/components/Browser/Browser.mjs +1 -1
- package/dist/esm/components/CollapsibleTable/CollapsibleTable.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditor.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorInput.mjs +1 -1
- package/dist/esm/components/ContentEditor/ContentEditorTextArea.mjs +2 -2
- package/dist/esm/components/CopyButton/index.mjs +1 -1
- package/dist/esm/components/CopyToClipboard/index.mjs +1 -1
- package/dist/esm/components/DictionaryEditor/DictionaryEditor.mjs +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/index.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +3 -3
- package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +4 -4
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/JSONEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -2
- package/dist/esm/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +4 -4
- package/dist/esm/components/DictionaryFieldEditor/StructureEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/StructureView/StructureView.mjs +1 -1
- package/dist/esm/components/EditableField/EditableFieldLayout.mjs +1 -1
- package/dist/esm/components/HideShow/index.mjs +1 -1
- package/dist/esm/components/IDE/FileTree.mjs +1 -1
- package/dist/esm/components/Input/InputPassword.mjs +1 -1
- package/dist/esm/components/Input/OTPInput.mjs +1 -1
- package/dist/esm/components/KeyboardScreenAdapter/index.mjs +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -2
- package/dist/esm/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +1 -1
- package/dist/esm/components/Modal/Modal.mjs +4 -4
- package/dist/esm/components/Modal/Modal.mjs.map +1 -1
- package/dist/esm/components/Navbar/MobileNavbar.mjs +2 -2
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +3 -3
- package/dist/esm/components/Select/Multiselect.mjs +1 -1
- package/dist/esm/components/SwitchSelector/index.mjs +1 -1
- package/dist/esm/components/Tab/Tab.mjs +1 -1
- package/dist/esm/components/TabSelector/TabSelector.mjs +1 -1
- package/dist/esm/components/Table/Table.mjs +1 -1
- package/dist/esm/components/TextArea/AutocompleteTextArea.mjs +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs +1 -1
- package/dist/esm/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs +1 -1
- package/dist/esm/providers/ReactQueryProvider.mjs +1 -1
- package/dist/types/components/Badge/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/breadcrumb.content.d.ts +3 -3
- package/dist/types/components/Breadcrumb/index.d.ts +2 -2
- package/dist/types/components/Breadcrumb/index.d.ts.map +1 -1
- package/dist/types/components/Browser/Browser.content.d.ts +11 -11
- package/dist/types/components/Browser/Browser.content.d.ts.map +1 -1
- package/dist/types/components/Button/Button.d.ts +2 -2
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +2 -2
- package/dist/types/components/Command/index.d.ts +17 -17
- package/dist/types/components/Command/index.d.ts.map +1 -1
- package/dist/types/components/Container/index.d.ts +6 -6
- package/dist/types/components/Container/index.d.ts.map +1 -1
- package/dist/types/components/CopyButton/CopyButton.content.d.ts +3 -3
- package/dist/types/components/CopyButton/CopyButton.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.d.ts +25 -25
- package/dist/types/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/StructureView/structureView.content.d.ts +9 -9
- package/dist/types/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.d.ts +7 -7
- package/dist/types/components/DictionaryFieldEditor/dictionaryFieldEditor.content.d.ts +5 -5
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts +31 -31
- package/dist/types/components/DictionaryFieldEditor/nodeTypeSelector.content.d.ts.map +1 -1
- package/dist/types/components/ExpandCollapse/expandCollapse.content.d.ts +3 -3
- package/dist/types/components/Form/elements/EditableFieldInputElement.d.ts +2 -2
- package/dist/types/components/Form/elements/EditableFieldTextAreaElement.d.ts +2 -2
- package/dist/types/components/Form/elements/FormElement.d.ts +2 -2
- package/dist/types/components/Form/elements/MultiselectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/OTPElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SelectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts +2 -2
- package/dist/types/components/IDE/code.content.d.ts +5 -5
- package/dist/types/components/IDE/copyCode.content.d.ts +5 -5
- package/dist/types/components/Input/Checkbox.d.ts +3 -3
- package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Input/Input.d.ts +2 -2
- package/dist/types/components/Input/Input.d.ts.map +1 -1
- package/dist/types/components/Input/OTPInput.d.ts +6 -6
- package/dist/types/components/Link/Link.d.ts +2 -2
- package/dist/types/components/Loader/index.content.d.ts +3 -3
- package/dist/types/components/Loader/index.content.d.ts.map +1 -1
- package/dist/types/components/Loader/spinner.d.ts +2 -2
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -17
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -13
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts.map +1 -1
- package/dist/types/components/MaxWidthSmoother/index.d.ts +2 -2
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Navbar/DesktopNavbar.d.ts +2 -2
- package/dist/types/components/Navbar/MobileNavbar.d.ts +2 -2
- package/dist/types/components/Pagination/Pagination.d.ts +2 -2
- package/dist/types/components/Pagination/pagination.content.d.ts +11 -11
- package/dist/types/components/Popover/static.d.ts +3 -3
- package/dist/types/components/Popover/static.d.ts.map +1 -1
- package/dist/types/components/Select/Select.d.ts +3 -3
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/SocialNetworks/index.d.ts +2 -2
- package/dist/types/components/SwitchSelector/index.d.ts +5 -5
- package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/types/components/Tab/Tab.d.ts +5 -5
- package/dist/types/components/Tab/TabContext.d.ts +2 -2
- package/dist/types/components/Tab/TabContext.d.ts.map +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +5 -5
- package/dist/types/components/TabSelector/TabSelector.d.ts.map +1 -1
- package/dist/types/components/Table/table.content.d.ts +3 -3
- package/dist/types/components/Table/table.content.d.ts.map +1 -1
- package/dist/types/components/Tag/index.d.ts +4 -4
- package/dist/types/components/Tag/index.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toast.d.ts +2 -2
- package/dist/types/components/Toaster/Toast.d.ts.map +1 -1
- package/dist/types/components/Toaster/Toaster.d.ts +2 -2
- package/dist/types/components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/types/hooks/useDevice.d.ts.map +1 -1
- package/package.json +16 -16
- package/tailwind.css +1 -1
- package/tw-source.css +1 -1
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button, ButtonColor, ButtonVariant } from "../Button/Button.mjs";
|
|
5
5
|
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
6
|
-
import { ChevronDown } from "lucide-react";
|
|
7
6
|
import { useId, useState } from "react";
|
|
7
|
+
import { ChevronDown } from "lucide-react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/Accordion/Accordion.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../../utils/cn.mjs";
|
|
2
2
|
import { Loader } from "../Loader/index.mjs";
|
|
3
|
-
import { User } from "lucide-react";
|
|
4
3
|
import { forwardRef, useMemo } from "react";
|
|
4
|
+
import { User } from "lucide-react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/Avatar/index.tsx
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button, ButtonVariant } from "../Button/Button.mjs";
|
|
5
5
|
import { Link, LinkColor } from "../Link/Link.mjs";
|
|
6
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
7
6
|
import { Fragment, createElement } from "react";
|
|
7
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
8
8
|
import { cva } from "class-variance-authority";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { getIntlayer } from "@intlayer/core";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { RotateCw } from "lucide-react";
|
|
5
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { RotateCw } from "lucide-react";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useIntlayer } from "react-intlayer";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
5
|
-
import { ChevronRight } from "lucide-react";
|
|
6
5
|
import { useState } from "react";
|
|
6
|
+
import { ChevronRight } from "lucide-react";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { InputVariant } from "../Input/Input.mjs";
|
|
5
5
|
import { AutoSizedTextArea } from "../TextArea/AutoSizeTextArea.mjs";
|
|
6
|
-
import { Check, X } from "lucide-react";
|
|
7
6
|
import { useState } from "react";
|
|
7
|
+
import { Check, X } from "lucide-react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/ContentEditor/ContentEditor.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
4
4
|
import { Input, InputVariant } from "../Input/Input.mjs";
|
|
5
|
-
import { Check, X } from "lucide-react";
|
|
6
5
|
import { useEffect, useState } from "react";
|
|
6
|
+
import { Check, X } from "lucide-react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/ContentEditor/ContentEditorInput.tsx
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
4
3
|
import { useUser } from "../../hooks/useUser/index.mjs";
|
|
4
|
+
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
5
5
|
import { AutoCompleteTextarea } from "../TextArea/AutocompleteTextArea.mjs";
|
|
6
|
-
import { Check, X } from "lucide-react";
|
|
7
6
|
import { useEffect, useState } from "react";
|
|
7
|
+
import { Check, X } from "lucide-react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/ContentEditor/ContentEditorTextArea.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
4
|
-
import { CopyCheckIcon, CopyIcon } from "lucide-react";
|
|
5
4
|
import { useEffect, useState } from "react";
|
|
5
|
+
import { CopyCheckIcon, CopyIcon } from "lucide-react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useIntlayer } from "react-intlayer";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { CopyCheck, CopyIcon } from "lucide-react";
|
|
5
4
|
import { useState } from "react";
|
|
5
|
+
import { CopyCheck, CopyIcon } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/CopyToClipboard/index.tsx
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { SaveForm } from "../DictionaryFieldEditor/SaveForm/SaveForm.mjs";
|
|
4
4
|
import { NodeWrapper } from "./NodeWrapper/index.mjs";
|
|
5
|
+
import { useEditedContent, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
5
6
|
import { createElement, useMemo } from "react";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { useEditedContent, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/DictionaryEditor/DictionaryEditor.tsx
|
|
10
10
|
const DictionaryEditor = ({ dictionary, mode, onDelete, ...props }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StringWrapper } from "./StringWrapper.mjs";
|
|
2
|
+
import { useEditedContent } from "@intlayer/editor-react";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
4
|
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
4
|
-
import { useEditedContent } from "@intlayer/editor-react";
|
|
5
5
|
import { NodeType } from "@intlayer/types";
|
|
6
6
|
|
|
7
7
|
//#region src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../../utils/cn.mjs";
|
|
2
2
|
import { EditableFieldTextArea } from "../../EditableField/EditableFieldTextArea.mjs";
|
|
3
|
+
import { useEditorLocale } from "@intlayer/editor-react";
|
|
3
4
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
4
5
|
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
5
|
-
import { useEditorLocale } from "@intlayer/editor-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx
|
|
8
8
|
const StringWrapper = ({ keyPath, section, editedContent, editedContentValue: editedContentValueProp, onContentChange, onFocusKeyPath, renderSection }) => {
|
|
@@ -9,10 +9,10 @@ import { InsertionWrapper } from "./InsertionWrapper.mjs";
|
|
|
9
9
|
import { MarkdownWrapper } from "./MarkdownWrapper.mjs";
|
|
10
10
|
import { NestedObjectWrapper } from "./NestedObjectWrapper.mjs";
|
|
11
11
|
import { TranslationWrapper } from "./TranslationWrapper.mjs";
|
|
12
|
+
import { useEditorLocale } from "@intlayer/editor-react";
|
|
12
13
|
import { memo, useMemo } from "react";
|
|
13
14
|
import { jsx } from "react/jsx-runtime";
|
|
14
15
|
import { getContentNodeByKeyPath, getNodeType } from "@intlayer/core";
|
|
15
|
-
import { useEditorLocale } from "@intlayer/editor-react";
|
|
16
16
|
import { NodeType } from "@intlayer/types";
|
|
17
17
|
|
|
18
18
|
//#region src/components/DictionaryEditor/NodeWrapper/index.tsx
|
|
@@ -6,10 +6,10 @@ import { TextEditorContainer } from "./ContentEditorView/TextEditor.mjs";
|
|
|
6
6
|
import { getIsEditableSection } from "./getIsEditableSection.mjs";
|
|
7
7
|
import { KeyPathBreadcrumb } from "./KeyPathBreadcrumb.mjs";
|
|
8
8
|
import { NavigationViewNode } from "./NavigationView/NavigationViewNode.mjs";
|
|
9
|
+
import { useEditedContent, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
9
10
|
import { useEffect } from "react";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
import { getContentNodeByKeyPath } from "@intlayer/core";
|
|
12
|
-
import { useEditedContent, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
13
13
|
|
|
14
14
|
//#region src/components/DictionaryFieldEditor/ContentEditor.tsx
|
|
15
15
|
const ContentEditor = ({ dictionary, isDarkMode }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
|
|
3
4
|
import { Container } from "../../Container/index.mjs";
|
|
4
5
|
import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../../Button/Button.mjs";
|
|
5
|
-
import { useAuditContentDeclarationField } from "../../../hooks/reactQuery.mjs";
|
|
6
6
|
import { InputVariant } from "../../Input/Input.mjs";
|
|
7
7
|
import { Label } from "../../Label/index.mjs";
|
|
8
8
|
import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../../SwitchSelector/index.mjs";
|
|
@@ -12,12 +12,12 @@ import { ContentEditorInput } from "../../ContentEditor/ContentEditorInput.mjs";
|
|
|
12
12
|
import { ContentEditorTextArea } from "../../ContentEditor/ContentEditorTextArea.mjs";
|
|
13
13
|
import { MarkdownRenderer } from "../../MarkDownRender/MarkDownRender.mjs";
|
|
14
14
|
import { EnumKeyInput } from "../EnumKeyInput.mjs";
|
|
15
|
-
import {
|
|
15
|
+
import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
|
|
16
16
|
import { Fragment, useState } from "react";
|
|
17
|
+
import { Plus, Trash, WandSparkles } from "lucide-react";
|
|
17
18
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
18
19
|
import { getEmptyNode, getLocaleName, getNodeType } from "@intlayer/core";
|
|
19
20
|
import { useIntlayer, useLocale } from "react-intlayer";
|
|
20
|
-
import { useConfiguration, useEditedContent } from "@intlayer/editor-react";
|
|
21
21
|
import { NodeType } from "@intlayer/types";
|
|
22
22
|
|
|
23
23
|
//#region src/components/DictionaryFieldEditor/ContentEditorView/TextEditor.tsx
|
package/dist/esm/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { ButtonColor } from "../../Button/Button.mjs";
|
|
4
3
|
import { useSession } from "../../../hooks/useAuth/useSession.mjs";
|
|
5
4
|
import { useAddDictionary, useGetProjects } from "../../../hooks/reactQuery.mjs";
|
|
5
|
+
import { ButtonColor } from "../../Button/Button.mjs";
|
|
6
6
|
import { MultiSelect } from "../../Select/Multiselect.mjs";
|
|
7
7
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
8
8
|
import { Form } from "../../Form/Form.mjs";
|
package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { useSession } from "../../../hooks/useAuth/useSession.mjs";
|
|
4
|
+
import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
|
|
3
5
|
import { Container } from "../../Container/index.mjs";
|
|
4
6
|
import { Loader } from "../../Loader/index.mjs";
|
|
5
7
|
import { ButtonColor, ButtonSize, ButtonVariant } from "../../Button/Button.mjs";
|
|
6
|
-
import { useSession } from "../../../hooks/useAuth/useSession.mjs";
|
|
7
|
-
import { useAuditContentDeclarationMetadata, useGetProjects, useGetTags } from "../../../hooks/reactQuery.mjs";
|
|
8
8
|
import { MultiSelect } from "../../Select/Multiselect.mjs";
|
|
9
9
|
import { useForm } from "../../Form/FormBase.mjs";
|
|
10
10
|
import { Form } from "../../Form/Form.mjs";
|
|
11
11
|
import { useDictionaryDetailsSchema } from "./useDictionaryDetailsSchema.mjs";
|
|
12
|
-
import {
|
|
12
|
+
import { useEditedContent } from "@intlayer/editor-react";
|
|
13
13
|
import { useEffect } from "react";
|
|
14
|
+
import { WandSparkles } from "lucide-react";
|
|
14
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
16
|
import { useIntlayer } from "react-intlayer";
|
|
16
|
-
import { useEditedContent } from "@intlayer/editor-react";
|
|
17
17
|
|
|
18
18
|
//#region src/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.tsx
|
|
19
19
|
const DictionaryDetailsForm = ({ dictionary }) => {
|
|
@@ -8,11 +8,11 @@ import { ContentEditor } from "./ContentEditor.mjs";
|
|
|
8
8
|
import { DictionaryDetailsForm } from "./DictionaryDetails/DictionaryDetailsForm.mjs";
|
|
9
9
|
import { JSONEditor } from "./JSONEditor.mjs";
|
|
10
10
|
import { StructureEditor } from "./StructureEditor.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { useConfiguration, useDictionariesRecordActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
12
12
|
import { useEffect, useState } from "react";
|
|
13
|
+
import { ArrowLeft } from "lucide-react";
|
|
13
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
15
|
import { useIntlayer } from "react-intlayer";
|
|
15
|
-
import { useConfiguration, useDictionariesRecordActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
16
16
|
|
|
17
17
|
//#region src/components/DictionaryFieldEditor/DictionaryFieldEditor.tsx
|
|
18
18
|
var EditorViewType = /* @__PURE__ */ function(EditorViewType$1) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Container } from "../Container/index.mjs";
|
|
2
2
|
import { MonacoCode } from "../IDE/MonacoCode.mjs";
|
|
3
|
+
import { useEditedContent } from "@intlayer/editor-react";
|
|
3
4
|
import { useMemo } from "react";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { useEditedContent } from "@intlayer/editor-react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/DictionaryFieldEditor/JSONEditor.tsx
|
|
8
8
|
const JSONEditor = ({ dictionary, isDarkMode }) => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Button, ButtonColor, ButtonTextAlign, ButtonVariant } from "../../Button/Button.mjs";
|
|
2
2
|
import { Accordion } from "../../Accordion/Accordion.mjs";
|
|
3
3
|
import { getIsEditableSection } from "../getIsEditableSection.mjs";
|
|
4
|
+
import { useEditedContentActions, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
5
|
+
import configuration from "@intlayer/config/built";
|
|
4
6
|
import { ChevronRight, Plus } from "lucide-react";
|
|
5
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
8
|
import { getContentNodeByKeyPath, getEmptyNode, getNodeType, isSameKeyPath } from "@intlayer/core";
|
|
7
9
|
import { useIntlayer } from "react-intlayer";
|
|
8
|
-
import { useEditedContentActions, useEditorLocale, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
9
|
-
import configuration from "@intlayer/config/built";
|
|
10
10
|
import { NodeType } from "@intlayer/types";
|
|
11
11
|
import { camelCaseToSentence } from "@intlayer/config/client";
|
|
12
12
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../../utils/cn.mjs";
|
|
4
|
-
import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
|
|
5
3
|
import { useAuth } from "../../../hooks/useAuth/useAuth.mjs";
|
|
6
4
|
import { useDeleteDictionary, usePushDictionaries, useWriteDictionary } from "../../../hooks/reactQuery.mjs";
|
|
5
|
+
import { cn } from "../../../utils/cn.mjs";
|
|
6
|
+
import { ButtonColor, ButtonVariant } from "../../Button/Button.mjs";
|
|
7
7
|
import { Modal, ModalSize } from "../../Modal/Modal.mjs";
|
|
8
8
|
import { Form } from "../../Form/Form.mjs";
|
|
9
|
-
import {
|
|
9
|
+
import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
|
|
10
10
|
import { useState } from "react";
|
|
11
|
+
import { ArrowUpFromLine, Download, RotateCcw, Save, Trash } from "lucide-react";
|
|
11
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
13
|
import { useIntlayer } from "react-intlayer";
|
|
13
|
-
import { useDictionariesRecordActions, useEditedContent } from "@intlayer/editor-react";
|
|
14
14
|
|
|
15
15
|
//#region src/components/DictionaryFieldEditor/SaveForm/SaveForm.tsx
|
|
16
16
|
const SaveForm = ({ dictionary, mode, className, onDelete, onSave, ...props }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { NodeView } from "./StructureView/StructureView.mjs";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { useEditedContent } from "@intlayer/editor-react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/DictionaryFieldEditor/StructureEditor.tsx
|
|
8
8
|
const StructureEditor = ({ dictionary }) => {
|
|
@@ -5,11 +5,11 @@ import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../../Button/But
|
|
|
5
5
|
import { InputVariant } from "../../Input/Input.mjs";
|
|
6
6
|
import { EditableFieldInput } from "../../EditableField/EditableFieldInput.mjs";
|
|
7
7
|
import { NodeTypeSelector } from "../NodeTypeSelector.mjs";
|
|
8
|
+
import { useConfiguration, useEditedContentActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
8
9
|
import { Plus, Trash } from "lucide-react";
|
|
9
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
11
|
import { getDefaultNode, getNodeChildren, getNodeType, isSameKeyPath } from "@intlayer/core";
|
|
11
12
|
import { useIntlayer } from "react-intlayer";
|
|
12
|
-
import { useConfiguration, useEditedContentActions, useFocusUnmergedDictionary } from "@intlayer/editor-react";
|
|
13
13
|
import { NodeType } from "@intlayer/types";
|
|
14
14
|
import { camelCaseToSentence } from "@intlayer/config/client";
|
|
15
15
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
5
|
-
import { Check, Pencil, X } from "lucide-react";
|
|
6
5
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
+
import { Check, Pencil, X } from "lucide-react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/EditableField/EditableFieldLayout.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { Eye, EyeOff } from "lucide-react";
|
|
5
4
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import { Eye, EyeOff } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/HideShow/index.tsx
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
5
5
|
import { createFileTree } from "./createFileTree.mjs";
|
|
6
|
-
import { ChevronRight } from "lucide-react";
|
|
7
6
|
import { useState } from "react";
|
|
7
|
+
import { ChevronRight } from "lucide-react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/IDE/FileTree.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Input } from "./Input.mjs";
|
|
4
|
-
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
5
4
|
import { useState } from "react";
|
|
5
|
+
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/Input/InputPassword.tsx
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Button } from "../Button/Button.mjs";
|
|
5
|
-
import { MinusIcon } from "lucide-react";
|
|
6
5
|
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
6
|
+
import { MinusIcon } from "lucide-react";
|
|
7
7
|
import { cva } from "class-variance-authority";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../utils/cn.mjs";
|
|
4
3
|
import { useKeyboardDetector } from "../../hooks/useKeyboardDetector.mjs";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/KeyboardScreenAdapter/index.tsx
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
|
|
3
4
|
import { Container } from "../Container/index.mjs";
|
|
4
5
|
import { Button, ButtonColor, ButtonSize, ButtonTextAlign, ButtonVariant } from "../Button/Button.mjs";
|
|
5
|
-
import { usePersistedStore } from "../../hooks/usePersistedStore.mjs";
|
|
6
6
|
import { Input } from "../Input/Input.mjs";
|
|
7
7
|
import { SwitchSelector, SwitchSelectorColor, SwitchSelectorSize } from "../SwitchSelector/index.mjs";
|
|
8
8
|
import { DropDown } from "../DropDown/index.mjs";
|
|
9
9
|
import { useLocaleSwitcherContent } from "./LocaleSwitcherContentContext.mjs";
|
|
10
|
-
import { Check, Globe, MoveVertical } from "lucide-react";
|
|
11
10
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { Check, Globe, MoveVertical } from "lucide-react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { getHTMLTextDir, getLocaleName } from "@intlayer/core";
|
|
14
14
|
import { useIntlayer, useLocale } from "react-intlayer";
|
|
@@ -4,8 +4,8 @@ import { Container } from "../Container/index.mjs";
|
|
|
4
4
|
import { Button, ButtonColor, ButtonTextAlign, ButtonVariant } from "../Button/Button.mjs";
|
|
5
5
|
import { Input } from "../Input/Input.mjs";
|
|
6
6
|
import { DropDown } from "../DropDown/index.mjs";
|
|
7
|
-
import { MoveVertical } from "lucide-react";
|
|
8
7
|
import { useCallback, useMemo, useRef, useState } from "react";
|
|
8
|
+
import { MoveVertical } from "lucide-react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { getHTMLTextDir, getLocaleName } from "@intlayer/core";
|
|
11
11
|
import { useIntlayer } from "react-intlayer";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
4
|
+
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
3
5
|
import { cn } from "../../utils/cn.mjs";
|
|
4
6
|
import { Container } from "../Container/index.mjs";
|
|
5
7
|
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
6
|
-
import { useGetElementOrWindow } from "../../hooks/useGetElementOrWindow.mjs";
|
|
7
|
-
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
8
8
|
import { H3 } from "../Headers/index.mjs";
|
|
9
|
-
import { X } from "lucide-react";
|
|
10
9
|
import { useEffect } from "react";
|
|
10
|
+
import { X } from "lucide-react";
|
|
11
11
|
import { cva } from "class-variance-authority";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { motion } from "framer-motion";
|
|
@@ -34,7 +34,7 @@ let ModalSize = /* @__PURE__ */ function(ModalSize$1) {
|
|
|
34
34
|
* Class name variants for different modal sizes using class-variance-authority
|
|
35
35
|
* Defines responsive sizing and scrollable content for modal containers
|
|
36
36
|
*/
|
|
37
|
-
const modalVariants = cva("cursor-default
|
|
37
|
+
const modalVariants = cva("cursor-default overflow-auto p-3 shadow-sm", {
|
|
38
38
|
variants: { size: {
|
|
39
39
|
sm: "h-auto max-h-[30vh] w-[95vw] max-w-xl",
|
|
40
40
|
md: "h-auto max-h-[50vh] w-[95vw] max-w-xl",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","names":["m","Modal: FC<ModalProps>"],"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { type FC, type ReactNode, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\n/**\n * Enumeration of available modal sizes\n */\nexport enum ModalSize {\n /** Small modal: max height 30vh, max width xl */\n SM = 'sm',\n /** Medium modal: max height 50vh, max width xl */\n MD = 'md',\n /** Large modal: max height 70vh, max width 2xl */\n LG = 'lg',\n /** Extra large modal: max height 95vh, max width 6xl */\n XL = 'xl',\n /** Unset size: max height 95vh, full width responsive */\n UNSET = 'unset',\n}\n\n/**\n * Props for the Modal component\n */\ntype ModalProps = {\n /** Content to be displayed inside the modal */\n children: ReactNode;\n /** Controls whether the modal is visible */\n isOpen: boolean;\n /** Callback function called when the modal should be closed */\n onClose?: () => void;\n /** Container element to render the modal into (defaults to document.body) */\n container?: HTMLElement;\n /** Whether to disable scrolling on the background content */\n disableScroll?: boolean;\n /** Whether to display a close button in the modal header */\n hasCloseButton?: boolean;\n /** Optional title displayed at the top of the modal */\n title?: string;\n /** Size variant for the modal */\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\n/**\n * Class name variants for different modal sizes using class-variance-authority\n * Defines responsive sizing and scrollable content for modal containers\n */\nconst modalVariants = cva(
|
|
1
|
+
{"version":3,"file":"Modal.mjs","names":["m","Modal: FC<ModalProps>"],"sources":["../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { type FC, type ReactNode, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\n/**\n * Enumeration of available modal sizes\n */\nexport enum ModalSize {\n /** Small modal: max height 30vh, max width xl */\n SM = 'sm',\n /** Medium modal: max height 50vh, max width xl */\n MD = 'md',\n /** Large modal: max height 70vh, max width 2xl */\n LG = 'lg',\n /** Extra large modal: max height 95vh, max width 6xl */\n XL = 'xl',\n /** Unset size: max height 95vh, full width responsive */\n UNSET = 'unset',\n}\n\n/**\n * Props for the Modal component\n */\ntype ModalProps = {\n /** Content to be displayed inside the modal */\n children: ReactNode;\n /** Controls whether the modal is visible */\n isOpen: boolean;\n /** Callback function called when the modal should be closed */\n onClose?: () => void;\n /** Container element to render the modal into (defaults to document.body) */\n container?: HTMLElement;\n /** Whether to disable scrolling on the background content */\n disableScroll?: boolean;\n /** Whether to display a close button in the modal header */\n hasCloseButton?: boolean;\n /** Optional title displayed at the top of the modal */\n title?: string;\n /** Size variant for the modal */\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\n/**\n * Class name variants for different modal sizes using class-variance-authority\n * Defines responsive sizing and scrollable content for modal containers\n */\nconst modalVariants = cva('cursor-default overflow-auto p-3 shadow-sm', {\n variants: {\n size: {\n /** Small modal: height auto, max-height 30vh, width 95vw, max-width xl */\n sm: 'h-auto max-h-[30vh] w-[95vw] max-w-xl',\n /** Medium modal: height auto, max-height 50vh, width 95vw, max-width xl */\n md: 'h-auto max-h-[50vh] w-[95vw] max-w-xl',\n /** Large modal: height auto, max-height 70vh, width 95vw, max-width 2xl */\n lg: 'h-auto max-h-[70vh] w-[95vw] max-w-2xl',\n /** Extra large modal: height auto, max-height 95vh, width 95vw, max-width 6xl */\n xl: 'h-auto max-h-[95vh] w-[95vw] max-w-6xl',\n /** Unset modal: height auto, max-height 95vh, width 95vw, no max-width */\n unset: 'h-auto max-h-[95vh] w-[95vw]',\n },\n },\n defaultVariants: {\n size: 'unset',\n },\n});\n\n/**\n * Motion-enabled modal component with Framer Motion support\n * Extends Container component with motion capabilities for animations\n */\nconst MotionModal = m.create(Container);\n\n/**\n * Modal Component\n *\n * A highly customizable modal dialog component with portal rendering, Framer Motion animations,\n * and comprehensive accessibility features. Supports multiple size variants and scroll management.\n *\n * Features:\n * - Portal rendering to any container element (defaults to document.body)\n * - Smooth animations with Framer Motion\n * - Size variants: SM, MD, LG, XL, UNSET with responsive sizing\n * - Optional title and close button\n * - Background scroll prevention\n * - Click-outside-to-close functionality\n * - Full accessibility support with ARIA attributes\n * - Keyboard navigation support (ESC to close)\n * - Extensible styling with Container props\n *\n * @example\n * Basic usage:\n * ```jsx\n * <Modal isOpen={isModalOpen} onClose={() => setIsModalOpen(false)}>\n * <p>Modal content goes here</p>\n * </Modal>\n * ```\n *\n * @example\n * With title and close button:\n * ```jsx\n * <Modal\n * isOpen={isOpen}\n * onClose={onClose}\n * title=\"Confirm Action\"\n * hasCloseButton\n * size={ModalSize.LG}\n * >\n * <div>\n * <p>Are you sure you want to continue?</p>\n * <Button onClick={onConfirm}>Confirm</Button>\n * </div>\n * </Modal>\n * ```\n *\n * @example\n * Custom container and styling:\n * ```jsx\n * <Modal\n * isOpen={isOpen}\n * onClose={onClose}\n * container={customContainer}\n * background=\"card\"\n * padding=\"lg\"\n * border=\"default\"\n * >\n * Content with custom styling\n * </Modal>\n * ```\n *\n * Accessibility Notes:\n * - Modal receives focus when opened\n * - Background content is hidden from screen readers when modal is open\n * - ESC key closes modal (handled by browser for role=\"dialog\")\n * - Click outside modal closes it\n * - Close button has descriptive label for screen readers\n *\n * @param props - Modal component props\n * @returns JSX element rendered via createPortal\n */\nexport const Modal: FC<ModalProps> = ({\n children,\n isOpen,\n container,\n disableScroll = true,\n onClose,\n hasCloseButton = false,\n title,\n size = ModalSize.MD,\n className,\n ...props\n}) => {\n const containerElement = useGetElementOrWindow(container);\n\n useScrollBlockage({ key: 'modal', disableScroll: isOpen && disableScroll });\n\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen && onClose) {\n onClose();\n }\n };\n\n document.addEventListener('keydown', handleEscape);\n\n return () => {\n document.removeEventListener('keydown', handleEscape);\n };\n }, [isOpen, onClose]);\n\n if (!containerElement) return <></>;\n\n const hasTitle = typeof title === 'string';\n\n return createPortal(\n <m.div\n className=\"invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto bg-background/40 backdrop-blur\"\n animate={isOpen ? 'visible' : 'invisible'}\n variants={{\n visible: {\n opacity: 1,\n visibility: 'visible',\n transition: { duration: 0.1, when: 'beforeChildren' },\n },\n invisible: {\n opacity: 0,\n visibility: 'hidden',\n transition: { duration: 0.1, when: 'afterChildren' },\n },\n }}\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n aria-hidden={!isOpen}\n >\n <MotionModal\n onClick={(e) => e.stopPropagation()}\n initial={{ scale: isOpen ? 0.5 : 1 }}\n animate={{ scale: isOpen ? 1 : 0.5 }}\n transition={{ duration: 0.3 }}\n className={modalVariants({\n size,\n className,\n })}\n role=\"dialog\"\n aria-modal\n roundedSize=\"2xl\"\n {...props}\n >\n <div\n className={cn(\n 'cursor-default',\n hasCloseButton && hasTitle\n ? `flex items-start`\n : hasCloseButton\n ? `flex justify-end`\n : hasTitle\n ? `items-center`\n : `hidden`\n )}\n >\n {hasTitle && (\n <H3 className=\"mt-2 mb-4 ml-4 flex items-center justify-center font-bold text-lg\">\n {title}\n </H3>\n )}\n {hasCloseButton && (\n <Button\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n label=\"Close modal\"\n className=\"ml-auto\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n Icon={X}\n size={ButtonSize.ICON_MD}\n />\n )}\n </div>\n <div className=\"flex flex-1 flex-col items-center\">{children}</div>\n </MotionModal>\n </m.div>,\n containerElement\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA,IAAY,kDAAL;;AAEL;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;AAwCF,MAAM,gBAAgB,IAAI,8CAA8C;CACtE,UAAU,EACR,MAAM;EAEJ,IAAI;EAEJ,IAAI;EAEJ,IAAI;EAEJ,IAAI;EAEJ,OAAO;EACR,EACF;CACD,iBAAiB,EACf,MAAM,SACP;CACF,CAAC;;;;;AAMF,MAAM,cAAcA,OAAE,OAAO,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEvC,MAAaC,SAAyB,EACpC,UACA,QACA,WACA,gBAAgB,MAChB,SACA,iBAAiB,OACjB,OACA,OAAO,UAAU,IACjB,WACA,GAAG,YACC;CACJ,MAAM,mBAAmB,sBAAsB,UAAU;AAEzD,mBAAkB;EAAE,KAAK;EAAS,eAAe,UAAU;EAAe,CAAC;AAE3E,iBAAgB;EACd,MAAM,gBAAgB,UAAyB;AAC7C,OAAI,MAAM,QAAQ,YAAY,UAAU,QACtC,UAAS;;AAIb,WAAS,iBAAiB,WAAW,aAAa;AAElD,eAAa;AACX,YAAS,oBAAoB,WAAW,aAAa;;IAEtD,CAAC,QAAQ,QAAQ,CAAC;AAErB,KAAI,CAAC,iBAAkB,QAAO,mCAAK;CAEnC,MAAM,WAAW,OAAO,UAAU;AAElC,QAAO,aACL,oBAACD,OAAE;EACD,WAAU;EACV,SAAS,SAAS,YAAY;EAC9B,UAAU;GACR,SAAS;IACP,SAAS;IACT,YAAY;IACZ,YAAY;KAAE,UAAU;KAAK,MAAM;KAAkB;IACtD;GACD,WAAW;IACT,SAAS;IACT,YAAY;IACZ,YAAY;KAAE,UAAU;KAAK,MAAM;KAAiB;IACrD;GACF;EACD,UAAU,MAAM;AACd,KAAE,iBAAiB;AACnB,cAAW;;EAEb,eAAa,CAAC;YAEd,qBAAC;GACC,UAAU,MAAM,EAAE,iBAAiB;GACnC,SAAS,EAAE,OAAO,SAAS,KAAM,GAAG;GACpC,SAAS,EAAE,OAAO,SAAS,IAAI,IAAK;GACpC,YAAY,EAAE,UAAU,IAAK;GAC7B,WAAW,cAAc;IACvB;IACA;IACD,CAAC;GACF,MAAK;GACL;GACA,aAAY;GACZ,GAAI;cAEJ,qBAAC;IACC,WAAW,GACT,kBACA,kBAAkB,WACd,qBACA,iBACE,qBACA,WACE,iBACA,SACT;eAEA,YACC,oBAAC;KAAG,WAAU;eACX;MACE,EAEN,kBACC,oBAAC;KACC,SAAS,cAAc;KACvB,OAAO,YAAY;KACnB,OAAM;KACN,WAAU;KACV,UAAU,MAAM;AACd,QAAE,iBAAiB;AACnB,iBAAW;;KAEb,MAAM;KACN,MAAM,WAAW;MACjB;KAEA,EACN,oBAAC;IAAI,WAAU;IAAqC;KAAe;IACvD;GACR,EACR,iBACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../utils/cn.mjs";
|
|
4
|
-
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
5
3
|
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
6
4
|
import { useScrollDetection } from "../../hooks/useScrollDetection.mjs";
|
|
5
|
+
import { cn } from "../../utils/cn.mjs";
|
|
6
|
+
import { MaxHeightSmoother } from "../MaxHeightSmoother/index.mjs";
|
|
7
7
|
import { Burger } from "./Burger.mjs";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { Container } from "../Container/index.mjs";
|
|
4
|
-
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
5
3
|
import { useDevice } from "../../hooks/useDevice.mjs";
|
|
6
4
|
import { useScrollBlockage } from "../../hooks/useScrollBlockage/index.mjs";
|
|
5
|
+
import { Container } from "../Container/index.mjs";
|
|
6
|
+
import { Button, ButtonColor, ButtonSize, ButtonVariant } from "../Button/Button.mjs";
|
|
7
7
|
import { MaxWidthSmoother } from "../MaxWidthSmoother/index.mjs";
|
|
8
8
|
import { isElementAtTopAndNotCovered } from "./isElementAtTopAndNotCovered.mjs";
|
|
9
9
|
import { useRightDrawerStore } from "./useRightDrawerStore.mjs";
|
|
10
|
-
import { ChevronLeft, X } from "lucide-react";
|
|
11
10
|
import { useEffect, useRef } from "react";
|
|
11
|
+
import { ChevronLeft, X } from "lucide-react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
|
|
14
14
|
//#region src/components/RightDrawer/RightDrawer.tsx
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { cn } from "../../utils/cn.mjs";
|
|
4
4
|
import { Badge, BadgeColor } from "../Badge/index.mjs";
|
|
5
5
|
import { Command, CommandRoot } from "../Command/index.mjs";
|
|
6
|
-
import { Check, X } from "lucide-react";
|
|
7
6
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { Check, X } from "lucide-react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/Select/Multiselect.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../utils/cn.mjs";
|
|
4
3
|
import { useItemSelector } from "../../hooks/useItemSelector.mjs";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
5
|
import { createElement, useEffect, useRef, useState } from "react";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../utils/cn.mjs";
|
|
4
3
|
import { useHorizontalSwipe } from "../../hooks/useHorizontalSwipe.mjs";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
5
|
import { TabSelector, TabSelectorColor } from "../TabSelector/TabSelector.mjs";
|
|
6
6
|
import { useTabContext } from "./TabContext.mjs";
|
|
7
7
|
import { Children, createContext, isValidElement, useState } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { cn } from "../../utils/cn.mjs";
|
|
4
3
|
import { useItemSelector } from "../../hooks/useItemSelector.mjs";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
5
|
import { cloneElement, useEffect, useRef } from "react";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -4,8 +4,8 @@ import { cn } from "../../utils/cn.mjs";
|
|
|
4
4
|
import { Button } from "../Button/Button.mjs";
|
|
5
5
|
import { Modal, ModalSize } from "../Modal/Modal.mjs";
|
|
6
6
|
import { ExpandCollapse } from "../ExpandCollapse/ExpandCollapse.mjs";
|
|
7
|
-
import { MoveDiagonal } from "lucide-react";
|
|
8
7
|
import { useState } from "react";
|
|
8
|
+
import { MoveDiagonal } from "lucide-react";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/components/Table/Table.tsx
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import { useAutocomplete } from "../../hooks/reactQuery.mjs";
|
|
4
4
|
import { AutoSizedTextArea } from "./AutoSizeTextArea.mjs";
|
|
5
|
+
import { useConfiguration } from "@intlayer/editor-react";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { useConfiguration } from "@intlayer/editor-react";
|
|
8
8
|
|
|
9
9
|
//#region src/components/TextArea/AutocompleteTextArea.tsx
|
|
10
10
|
/**
|
|
@@ -4,8 +4,8 @@ import { Container } from "../Container/index.mjs";
|
|
|
4
4
|
import { Button, ButtonVariant } from "../Button/Button.mjs";
|
|
5
5
|
import { DropDown } from "../DropDown/index.mjs";
|
|
6
6
|
import { Modes } from "./types.mjs";
|
|
7
|
-
import { CircleDashed, Moon, Sun } from "lucide-react";
|
|
8
7
|
import { useState } from "react";
|
|
8
|
+
import { CircleDashed, Moon, Sun } from "lucide-react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.tsx
|