@intlayer/design-system 7.6.0-canary.1 → 8.0.0-canary.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.
- package/dist/esm/components/CopyToClipboard/index.mjs +12 -9
- package/dist/esm/components/CopyToClipboard/index.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +32 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs +116 -14
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +5 -0
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +11 -5
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/esm/components/Flags/Flag.mjs +5 -8
- package/dist/esm/components/Flags/Flag.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs +1 -1
- package/dist/esm/components/MarkDownRender/MarkDownRender.mjs.map +1 -1
- package/dist/esm/components/MarkDownRender/index.mjs +2 -1
- package/dist/esm/components/MarkDownRender/processor-adapter.mjs +57 -0
- package/dist/esm/components/MarkDownRender/processor-adapter.mjs.map +1 -0
- package/dist/esm/components/MarkDownRender/processor.mjs +5 -5
- package/dist/esm/components/MarkDownRender/processor.mjs.map +1 -1
- package/dist/esm/components/Popover/static.mjs +12 -10
- package/dist/esm/components/Popover/static.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/RightDrawer.mjs +4 -5
- package/dist/esm/components/RightDrawer/RightDrawer.mjs.map +1 -1
- package/dist/esm/components/RightDrawer/index.mjs +2 -2
- package/dist/esm/components/RightDrawer/useRightDrawer.mjs +65 -0
- package/dist/esm/components/RightDrawer/useRightDrawer.mjs.map +1 -0
- package/dist/esm/components/index.mjs +3 -2
- package/dist/esm/hooks/useScrollBlockage/index.mjs +1 -6
- package/dist/esm/hooks/useScrollBlockage/index.mjs.map +1 -1
- package/dist/esm/hooks/useScrollBlockage/useScrollBlockageStore.mjs +60 -31
- package/dist/esm/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +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/Browser/Browser.content.d.ts +17 -17
- package/dist/types/components/Browser/Browser.d.ts +2 -2
- package/dist/types/components/Browser/Browser.d.ts.map +1 -1
- package/dist/types/components/Button/Button.d.ts +7 -7
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +3 -3
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts.map +1 -1
- package/dist/types/components/Command/index.d.ts +16 -16
- package/dist/types/components/Command/index.d.ts.map +1 -1
- package/dist/types/components/Container/index.d.ts +10 -10
- 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/CopyToClipboard/index.d.ts +18 -7
- package/dist/types/components/CopyToClipboard/index.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/DictionaryDetailsForm.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +265 -48
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts +33 -33
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts +6 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
- package/dist/types/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
- 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/FormBase.d.ts +2 -2
- package/dist/types/components/Form/FormField.d.ts +2 -2
- package/dist/types/components/Form/FormItem.d.ts +2 -2
- package/dist/types/components/Form/FormItem.d.ts.map +1 -1
- 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/EditableFieldTextAreaElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/FormElement.d.ts +2 -2
- package/dist/types/components/Form/elements/FormElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/MultiselectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/MultiselectElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/OTPElement.d.ts +2 -2
- package/dist/types/components/Form/elements/OTPElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/SelectElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SelectElement.d.ts.map +1 -1
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts +2 -2
- package/dist/types/components/Form/elements/SwitchSelectorElement.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeContext.d.ts +2 -2
- package/dist/types/components/IDE/CodeContext.d.ts.map +1 -1
- 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/IDE/selectors.content.d.ts +13 -13
- package/dist/types/components/Input/Checkbox.d.ts +4 -4
- package/dist/types/components/Input/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Input/Input.d.ts +3 -3
- 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/Input/SearchInput.d.ts +2 -2
- package/dist/types/components/Link/Link.d.ts +5 -5
- 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/Loader/spinner.d.ts.map +1 -1
- package/dist/types/components/LocaleSwitcherContentDropDown/localeSwitcher.content.d.ts +17 -17
- package/dist/types/components/LocaleSwitcherDropDown/localeSwitcher.content.d.ts +13 -13
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts +1 -1
- package/dist/types/components/MarkDownRender/MarkDownRender.d.ts.map +1 -1
- package/dist/types/components/MarkDownRender/index.d.ts +2 -1
- package/dist/types/components/MarkDownRender/processor-adapter.d.ts +85 -0
- package/dist/types/components/MarkDownRender/processor-adapter.d.ts.map +1 -0
- package/dist/types/components/MaxWidthSmoother/index.d.ts +2 -2
- package/dist/types/components/Navbar/Burger.d.ts +2 -2
- package/dist/types/components/Navbar/Burger.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/Navbar/MobileNavbar.d.ts.map +1 -1
- package/dist/types/components/Navbar/index.d.ts +2 -2
- package/dist/types/components/Pagination/Pagination.d.ts +4 -4
- package/dist/types/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/Pagination/pagination.content.d.ts +11 -11
- package/dist/types/components/Popover/static.d.ts +11 -9
- package/dist/types/components/Popover/static.d.ts.map +1 -1
- package/dist/types/components/RightDrawer/index.d.ts +2 -2
- package/dist/types/components/RightDrawer/rightDrawer.content.d.ts +5 -5
- package/dist/types/components/RightDrawer/useRightDrawer.d.ts +22 -0
- package/dist/types/components/RightDrawer/useRightDrawer.d.ts.map +1 -0
- 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/SocialNetworks/index.d.ts.map +1 -1
- package/dist/types/components/SwitchSelector/index.d.ts +7 -7
- package/dist/types/components/SwitchSelector/index.d.ts.map +1 -1
- package/dist/types/components/Tab/Tab.d.ts +6 -6
- package/dist/types/components/Tab/Tab.d.ts.map +1 -1
- 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/Tag/index.d.ts +5 -5
- package/dist/types/components/Terminal/terminal.content.d.ts +5 -5
- package/dist/types/components/Terminal/terminal.content.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/components/index.d.ts +3 -2
- package/dist/types/hooks/useDevice.d.ts.map +1 -1
- package/dist/types/hooks/useScrollBlockage/index.d.ts.map +1 -1
- package/dist/types/hooks/useScrollBlockage/useScrollBlockageStore.d.ts +14 -6
- package/dist/types/hooks/useScrollBlockage/useScrollBlockageStore.d.ts.map +1 -1
- package/package.json +21 -21
- package/dist/esm/components/RightDrawer/useRightDrawerStore.mjs +0 -87
- package/dist/esm/components/RightDrawer/useRightDrawerStore.mjs.map +0 -1
- package/dist/types/components/RightDrawer/useRightDrawerStore.d.ts +0 -116
- package/dist/types/components/RightDrawer/useRightDrawerStore.d.ts.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types442 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Terminal/terminal.content.d.ts
|
|
4
4
|
declare const terminalContent: {
|
|
5
5
|
key: string;
|
|
6
6
|
content: {
|
|
7
|
-
closeTab:
|
|
7
|
+
closeTab: _intlayer_types442.TypedNodeModel<_intlayer_types442.NodeType.Translation, {
|
|
8
8
|
en: string;
|
|
9
9
|
fr: string;
|
|
10
10
|
es: string;
|
|
@@ -24,7 +24,7 @@ declare const terminalContent: {
|
|
|
24
24
|
vi: string;
|
|
25
25
|
uk: string;
|
|
26
26
|
}, {
|
|
27
|
-
nodeType: "translation" |
|
|
27
|
+
nodeType: "translation" | _intlayer_types442.NodeType.Translation;
|
|
28
28
|
} & {
|
|
29
29
|
translation: {
|
|
30
30
|
en: string;
|
|
@@ -47,7 +47,7 @@ declare const terminalContent: {
|
|
|
47
47
|
uk: string;
|
|
48
48
|
};
|
|
49
49
|
}>;
|
|
50
|
-
terminalInput:
|
|
50
|
+
terminalInput: _intlayer_types442.TypedNodeModel<_intlayer_types442.NodeType.Translation, {
|
|
51
51
|
en: string;
|
|
52
52
|
fr: string;
|
|
53
53
|
es: string;
|
|
@@ -67,7 +67,7 @@ declare const terminalContent: {
|
|
|
67
67
|
vi: string;
|
|
68
68
|
uk: string;
|
|
69
69
|
}, {
|
|
70
|
-
nodeType: "translation" |
|
|
70
|
+
nodeType: "translation" | _intlayer_types442.NodeType.Translation;
|
|
71
71
|
} & {
|
|
72
72
|
translation: {
|
|
73
73
|
en: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminal.content.d.ts","names":[],"sources":["../../../../src/components/Terminal/terminal.content.ts"],"sourcesContent":[],"mappings":";;;cAEM;;;IAAA,QAAA,
|
|
1
|
+
{"version":3,"file":"terminal.content.d.ts","names":[],"sources":["../../../../src/components/Terminal/terminal.content.ts"],"sourcesContent":[],"mappings":";;;cAEM;;;IAAA,QAAA,mCAgDgB,0CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, FC, ReactElement } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as class_variance_authority_types14 from "class-variance-authority/types";
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
import * as ToastPrimitives from "@radix-ui/react-toast";
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ declare const ToastViewport: FC<ComponentProps<typeof ToastPrimitives.Viewport>>
|
|
|
26
26
|
*/
|
|
27
27
|
declare const toastVariants: (props?: {
|
|
28
28
|
variant?: "default" | "error" | "success";
|
|
29
|
-
} &
|
|
29
|
+
} & class_variance_authority_types14.ClassProp) => string;
|
|
30
30
|
/**
|
|
31
31
|
* Toast Component
|
|
32
32
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","names":[],"sources":["../../../../src/components/Toaster/Toast.tsx"],"sourcesContent":[],"mappings":";;;;;;cAQM,sBAAa;cAEb,eAAe,GAAG,sBAAsB,eAAA,CAAgB;;AAJA;AAEzB;;;;;AAEd;;;;;;;;AA0FR;;;cA3DT,aA2Ga,EAAA,CAAA,KA2BlB,CA3BkB,EAAA;EAAE,OAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,SAAA;AAAA,CAAA,GAzFpB
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","names":[],"sources":["../../../../src/components/Toaster/Toast.tsx"],"sourcesContent":[],"mappings":";;;;;;cAQM,sBAAa;cAEb,eAAe,GAAG,sBAAsB,eAAA,CAAgB;;AAJA;AAEzB;;;;;AAEd;;;;;;;;AA0FR;;;cA3DT,aA2Ga,EAAA,CAAA,KA2BlB,CA3BkB,EAAA;EAAE,OAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,SAAA;AAAA,CAAA,GAzFpB,gCAAA,CAAA,SAoHA,EAAA,GAAA,MAAA;;;;;AAdmB;;;;;AAiCA;;;;;AAqCM;AAYM;;;;;;;;;;;;;;;;;;;;;;;;cA/I1B,OAAO,GACX,sBAAsB,eAAA,CAAgB,QACpC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8ClB,aAAa,GAAG,sBAAsB,eAAA,CAAgB;cAatD,YAAY,GAAG,sBAAsB,eAAA,CAAgB;;;;;;;;;;;;;;;;;;;cAiCrD,YAAY,GAAG,sBAAsB,eAAA,CAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAqCrD,kBAAkB,GACtB,sBAAsB,eAAA,CAAgB;;;;;KAWnC,UAAA,GAAa,sBAAsB;;;;;KAMnC,kBAAA,GAAqB,oBAAoB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/Toaster/Toaster.d.ts
|
|
4
4
|
|
|
@@ -44,7 +44,7 @@ import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
|
44
44
|
*
|
|
45
45
|
* @returns JSX element rendering the toast viewport and active toasts
|
|
46
46
|
*/
|
|
47
|
-
declare const Toaster: () =>
|
|
47
|
+
declare const Toaster: () => react_jsx_runtime23.JSX.Element;
|
|
48
48
|
//#endregion
|
|
49
49
|
export { Toaster };
|
|
50
50
|
//# sourceMappingURL=Toaster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.d.ts","names":[],"sources":["../../../../src/components/Toaster/Toaster.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAsDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,eAAO,
|
|
1
|
+
{"version":3,"file":"Toaster.d.ts","names":[],"sources":["../../../../src/components/Toaster/Toaster.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAsDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,eAAO,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -79,6 +79,7 @@ import { LogoTextOnly } from "./Logo/LogoTextOnly.js";
|
|
|
79
79
|
import { LogoWithText } from "./Logo/LogoWithText.js";
|
|
80
80
|
import { LogoWithTextBelow } from "./Logo/LogoWithTextBelow.js";
|
|
81
81
|
import "./Logo/index.js";
|
|
82
|
+
import { MarkdownProcessor, MarkdownProcessorOptions, Overrides as CoreOverrides, ParseState, ParserResult, RuleOutput, RuleType, State, compiler, sanitizer as defaultSanitizer, slugify as defaultSlugify } from "./MarkDownRender/processor-adapter.js";
|
|
82
83
|
import { MarkdownRenderer } from "./MarkDownRender/MarkDownRender.js";
|
|
83
84
|
import "./MarkDownRender/index.js";
|
|
84
85
|
import { MaxHeightSmoother } from "./MaxHeightSmoother/index.js";
|
|
@@ -102,7 +103,7 @@ import "./Popover/index.js";
|
|
|
102
103
|
import { PressableSpan } from "./PressableSpan/PressableSpan.js";
|
|
103
104
|
import "./PressableSpan/index.js";
|
|
104
105
|
import { RightDrawer } from "./RightDrawer/RightDrawer.js";
|
|
105
|
-
import {
|
|
106
|
+
import { drawerManager, useRightDrawer } from "./RightDrawer/useRightDrawer.js";
|
|
106
107
|
import "./RightDrawer/index.js";
|
|
107
108
|
import { MultiSelect } from "./Select/Multiselect.js";
|
|
108
109
|
import { Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator } from "./Select/Select.js";
|
|
@@ -133,4 +134,4 @@ import { Toaster } from "./Toaster/Toaster.js";
|
|
|
133
134
|
import { reducer, toast, useToast } from "./Toaster/useToast.js";
|
|
134
135
|
import "./Toaster/index.js";
|
|
135
136
|
import { WithResizer } from "./WithResizer/index.js";
|
|
136
|
-
export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopThemeSwitcher, Detail, DetailProps, DictionaryCreationForm, DictionaryEditor, DictionaryFieldEditor, DiscordLogo, DotPattern, DropDown, DropDownAlign, DropDownProps, DropDownType, DropDownYAlign, EditableFieldInput, EditableFieldTextArea, ExpandCollapse, ExpandCollapseProps, FacebookLogo, FileList, FileListProps, Flag, flags_d_exports as Flags, Footer, FooterLink, Form, GridPattern, H1, H2, H3, H4, H5, H6, HeadingProps, HeightResizer, HideShow, HideShowProps, IDE, IDEProps, InformationTag, Input, InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputProps, InputSize, InputVariant, InstagramLogo, KeyList, KeyPathBreadcrumb, KeyboardScreenAdapter, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutType, Label, LabelProps, LanguageBackground, LanguageSection, Link, LinkColor, LinkGroup, LinkProps, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, LinkedInLogo, Loader, LoaderProps, LocaleSwitcher, LocaleSwitcherContent, LocaleSwitcherContentProps, LocaleSwitcherContentProvider, LocaleSwitcherProps, Logo, LogoTextOnly, LogoWithText, LogoWithTextBelow, MarkdownRenderer, MaxHeightSmoother, MaxWidthSmoother, MobileThemeSwitcher, Modal, ModalSize, Modes, MultiSelect, Navbar, NumberItemsSelector, NumberItemsSelectorProps, OTPInput, OTPInputContext, OTPInputProps, Pagination, PaginationProps, PaginationSize, PaginationVariant, PanelProps, Popover, PopoverProps, PopoverStatic, PopoverType, PopoverXAlign, PopoverYAlign, PressableSpan, ProductHuntLogo, RenderProps, RightDrawer, SaveForm, SearchInput, Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator, ShowingResultsNumberItems, ShowingResultsNumberItemsProps, SlotProps, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, Terminal, TerminalProps, TextArea, TextAreaProps, TextEditor, TextEditorContainer, TextEditorProps, TiktokLogo, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, TriggerProps, VersionSwitcher, VersionSwitcherProps, VersionSwitcherProvider, WithResizer, XLogo, YoutubeLogo, badgeVariants, buttonVariants, checkIsExternalLink, checkboxVariants, containerVariants, getCapitals, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, toast, traceKeys, useCopyToClipboard, useDebounce, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious,
|
|
137
|
+
export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopThemeSwitcher, Detail, DetailProps, DictionaryCreationForm, DictionaryEditor, DictionaryFieldEditor, DiscordLogo, DotPattern, DropDown, DropDownAlign, DropDownProps, DropDownType, DropDownYAlign, EditableFieldInput, EditableFieldTextArea, ExpandCollapse, ExpandCollapseProps, FacebookLogo, FileList, FileListProps, Flag, flags_d_exports as Flags, Footer, FooterLink, Form, GridPattern, H1, H2, H3, H4, H5, H6, HeadingProps, HeightResizer, HideShow, HideShowProps, IDE, IDEProps, InformationTag, Input, InputIndicator, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputPassword, InputProps, InputSize, InputVariant, InstagramLogo, KeyList, KeyPathBreadcrumb, KeyboardScreenAdapter, KeyboardShortcut, KeyboardShortcutProps, KeyboardShortcutType, Label, LabelProps, LanguageBackground, LanguageSection, Link, LinkColor, LinkGroup, LinkProps, LinkRoundedSize, LinkSize, LinkUnderlined, LinkVariant, LinkedInLogo, Loader, LoaderProps, LocaleSwitcher, LocaleSwitcherContent, LocaleSwitcherContentProps, LocaleSwitcherContentProvider, LocaleSwitcherProps, Logo, LogoTextOnly, LogoWithText, LogoWithTextBelow, MarkdownProcessor, MarkdownProcessorOptions, MarkdownRenderer, MaxHeightSmoother, MaxWidthSmoother, MobileThemeSwitcher, Modal, ModalSize, Modes, MultiSelect, Navbar, NumberItemsSelector, NumberItemsSelectorProps, OTPInput, OTPInputContext, OTPInputProps, CoreOverrides as Overrides, Pagination, PaginationProps, PaginationSize, PaginationVariant, PanelProps, ParseState, ParserResult, Popover, PopoverProps, PopoverStatic, PopoverType, PopoverXAlign, PopoverYAlign, PressableSpan, ProductHuntLogo, RenderProps, RightDrawer, RuleOutput, RuleType, SaveForm, SearchInput, Select, SelectContent, SelectContentPosition, SelectLabel, SelectSeparator, ShowingResultsNumberItems, ShowingResultsNumberItemsProps, SlotProps, SocialNetworks, Spotlight, State, SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, Terminal, TerminalProps, TextArea, TextAreaProps, TextEditor, TextEditorContainer, TextEditorProps, TiktokLogo, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, TriggerProps, VersionSwitcher, VersionSwitcherProps, VersionSwitcherProvider, WithResizer, XLogo, YoutubeLogo, badgeVariants, buttonVariants, checkIsExternalLink, checkboxVariants, compiler, containerVariants, drawerManager, getCapitals, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, defaultSanitizer as sanitizer, defaultSlugify as slugify, toast, traceKeys, useCopyToClipboard, useDebounce, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious, useRightDrawer, useToast, useVersionSwitcher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDevice.d.ts","names":[],"sources":["../../../src/hooks/useDevice.ts"],"sourcesContent":[],"mappings":";KAIY,QAAA;AAAA,cAEC,qBAFO,EAAA,CAAA,UAAA,EAE8B,QAF9B,GAAA,MAAA,EAAA,GAAA,MAAA;AAEP,cAmBA,sBAnBqC,EAAA,GAAQ,
|
|
1
|
+
{"version":3,"file":"useDevice.d.ts","names":[],"sources":["../../../src/hooks/useDevice.ts"],"sourcesContent":[],"mappings":";KAIY,QAAA;AAAA,cAEC,qBAFO,EAAA,CAAA,UAAA,EAE8B,QAF9B,GAAA,MAAA,EAAA,GAAA,MAAA;AAEP,cAmBA,sBAnBqC,EAAA,GAAA,GAAQ,OAAA,GAAA,SAAA;AAmB7C,cAYA,2BAFZ,EAAA,GAAA,GAAA,OAAA,GAAA,SAAA;AAEY,cAgBA,UAhBA,EAAA,GAcZ,GAAA,OAAA,GAAA,SAAA;AAEY,cAWA,UAFZ,EAAA,GAAA,GAAA,OAAA,GAAA,SAAA;AAEY,cAWA,mBAFZ,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,GAAA,OAAA,GAAA,SAAA;AAED,KAQK,cAAA,GARQ;EAQR,cAAA,EAAA,OAAc,GAAA,SAAA;EAQN,iBAAA,EAAA,OAgBZ,GAAA,SAhB6C;EAkBjC,QAAA,EAAA,OAiBZ,GAAA,SAjBqC;;;;cAlBzB,iCAAiC;;;;;;;cAkBjC,yBAAyB,sBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/hooks/useScrollBlockage/index.tsx"],"sourcesContent":[],"mappings":";KAOK,8BAAA;EAAA,aAAA,EAAA,SAAA;EAMA,GAAA,EAAA,SAAA;EAMQ,OAAA,CAAA,EATD,WAsCX;;KAnCI,sBAAA;;;YAGO;;cAGC,4BACH,yBAAyB"}
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import * as zustand0 from "zustand";
|
|
2
|
-
|
|
3
1
|
//#region src/hooks/useScrollBlockage/useScrollBlockageStore.d.ts
|
|
4
2
|
type Blocker = {
|
|
5
3
|
element: Element;
|
|
6
4
|
blockers: string[];
|
|
7
5
|
};
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
declare class ScrollBlockageObservable {
|
|
7
|
+
private listeners;
|
|
8
|
+
private scrollBlockers;
|
|
9
|
+
subscribe: (listener: () => void) => () => void;
|
|
10
|
+
getSnapshot: () => Blocker[];
|
|
11
|
+
addBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
12
|
+
removeBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
13
|
+
isElementScrollBlocked: (element: HTMLElement) => boolean;
|
|
14
|
+
private emit;
|
|
15
|
+
}
|
|
16
|
+
declare const scrollBlockageManager: ScrollBlockageObservable;
|
|
17
|
+
declare const useScrollBlockageStore: () => {
|
|
18
|
+
scrollBlockers: any[];
|
|
10
19
|
addBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
11
20
|
removeBlockage: (blockerName: string, element: HTMLElement) => void;
|
|
12
21
|
isElementScrollBlocked: (element: HTMLElement) => boolean;
|
|
13
22
|
};
|
|
14
|
-
declare const useScrollBlockageStore: zustand0.UseBoundStore<zustand0.StoreApi<ScrollBlockageStore>>;
|
|
15
23
|
//#endregion
|
|
16
|
-
export { useScrollBlockageStore };
|
|
24
|
+
export { scrollBlockageManager, useScrollBlockageStore };
|
|
17
25
|
//# sourceMappingURL=useScrollBlockageStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollBlockageStore.d.ts","names":[],"sources":["../../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useScrollBlockageStore.d.ts","names":[],"sources":["../../../../src/hooks/useScrollBlockage/useScrollBlockageStore.ts"],"sourcesContent":[],"mappings":";KAEK,OAAA;EAAA,OAAA,EACM,OADC;EAKN,QAAA,EAAA,MAAA,EAAA;CAWO;cAXP,wBAAA,CAeyC;EAwBG,QAAA,SAAA;EA0Bb,QAAA,cAAA;EAAW,SAAA,EAAA,CAAA,QAAA,EAAA,GAAA,GAAA,IAAA,EAAA,GAAA,GAAA,GAAA,IAAA;EAWnC,WAAA,EAAA,GAAA,GAjEA,OAiEsD,EAAA;EAEtD,WAAA,EAAA,CAAA,WAaZ,EAAA,MAAA,EAAA,OAAA,EA5E8C,WA4E9C,EAAA,GAAA,IAAA;EA5E8C,cAAA,EAAA,CAAA,WAAA,EAAA,MAAA,EAAA,OAAA,EAwBG,WAxBH,EAAA,GAAA,IAAA;EAwBG,sBAAA,EAAA,CAAA,OAAA,EA0Bb,WA1Ba,EAAA,GAAA,OAAA;EA0Bb,QAAA,IAAA;;cAWxB,uBAAqB;cAErB;;8CA/DkC;iDAwBG;oCA0Bb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Intlayer design system, including UI components used in the Intlayer editor, website, and visual editor/CMS.",
|
|
6
6
|
"keywords": [
|
|
@@ -103,19 +103,19 @@
|
|
|
103
103
|
"typecheck_": "tsc --noEmit --project tsconfig.types.json"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@better-auth/passkey": "1.4.
|
|
107
|
-
"@better-auth/sso": "1.4.
|
|
108
|
-
"@intlayer/api": "
|
|
109
|
-
"@intlayer/config": "
|
|
110
|
-
"@intlayer/core": "
|
|
111
|
-
"@intlayer/dictionaries-entry": "
|
|
112
|
-
"@intlayer/editor-react": "
|
|
113
|
-
"@intlayer/types": "
|
|
106
|
+
"@better-auth/passkey": "1.4.15",
|
|
107
|
+
"@better-auth/sso": "1.4.15",
|
|
108
|
+
"@intlayer/api": "8.0.0-canary.0",
|
|
109
|
+
"@intlayer/config": "8.0.0-canary.0",
|
|
110
|
+
"@intlayer/core": "8.0.0-canary.0",
|
|
111
|
+
"@intlayer/dictionaries-entry": "8.0.0-canary.0",
|
|
112
|
+
"@intlayer/editor-react": "8.0.0-canary.0",
|
|
113
|
+
"@intlayer/types": "8.0.0-canary.0",
|
|
114
114
|
"@radix-ui/react-dialog": "1.1.15",
|
|
115
115
|
"@radix-ui/react-select": "2.2.6",
|
|
116
116
|
"@radix-ui/react-slot": "1.2.4",
|
|
117
117
|
"@radix-ui/react-toast": "1.2.15",
|
|
118
|
-
"better-auth": "1.4.
|
|
118
|
+
"better-auth": "1.4.15",
|
|
119
119
|
"bun": "^1.3.2",
|
|
120
120
|
"class-variance-authority": "0.7.1",
|
|
121
121
|
"cmdk": "1.1.1",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"zod": "4.3.5"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@intlayer/backend": "
|
|
126
|
+
"@intlayer/backend": "8.0.0-canary.0",
|
|
127
127
|
"@shikijs/transformers": "3.21.0",
|
|
128
128
|
"@storybook/addon-a11y": "8.6.14",
|
|
129
129
|
"@storybook/addon-essentials": "8.6.14",
|
|
@@ -147,13 +147,13 @@
|
|
|
147
147
|
"@testing-library/react": "16.3.1",
|
|
148
148
|
"@testing-library/user-event": "14.6.1",
|
|
149
149
|
"@types/espree": "10.1.0",
|
|
150
|
-
"@types/node": "25.0.
|
|
150
|
+
"@types/node": "25.0.9",
|
|
151
151
|
"@types/react": "19.2.8",
|
|
152
152
|
"@types/react-dom": "19.2.3",
|
|
153
153
|
"@utils/ts-config": "1.0.4",
|
|
154
154
|
"@utils/ts-config-types": "1.0.4",
|
|
155
155
|
"fast-glob": "3.3.3",
|
|
156
|
-
"intlayer": "
|
|
156
|
+
"intlayer": "8.0.0-canary.0",
|
|
157
157
|
"react-intlayer": "7.5.14",
|
|
158
158
|
"rimraf": "6.1.2",
|
|
159
159
|
"shiki": "3.21.0",
|
|
@@ -161,31 +161,31 @@
|
|
|
161
161
|
"tsdown": "0.19.0",
|
|
162
162
|
"typescript": "5.9.3",
|
|
163
163
|
"vite": "7.3.1",
|
|
164
|
-
"vite-intlayer": "
|
|
164
|
+
"vite-intlayer": "8.0.0-canary.0",
|
|
165
165
|
"vite-plugin-dts": "4.5.4",
|
|
166
|
+
"vite-tsconfig-paths": "6.0.4",
|
|
166
167
|
"vitest": "4.0.17"
|
|
167
168
|
},
|
|
168
169
|
"peerDependencies": {
|
|
169
170
|
"@better-fetch/fetch": "1.1.21",
|
|
170
171
|
"@hookform/resolvers": "5.2.2",
|
|
171
|
-
"@intlayer/backend": "
|
|
172
|
+
"@intlayer/backend": "8.0.0-canary.0",
|
|
172
173
|
"@monaco-editor/react": "4.7.0",
|
|
173
174
|
"@shikijs/transformers": "3.21.0",
|
|
174
|
-
"@tanstack/react-query": "5.90.
|
|
175
|
+
"@tanstack/react-query": "5.90.19",
|
|
175
176
|
"@tanstack/react-query-devtools": "5.91.2",
|
|
176
177
|
"clsx": "2.1.1",
|
|
177
|
-
"framer-motion": "12.
|
|
178
|
+
"framer-motion": "12.27.0",
|
|
178
179
|
"fuse.js": "7.1.0",
|
|
179
|
-
"intlayer": "
|
|
180
|
+
"intlayer": "8.0.0-canary.0",
|
|
180
181
|
"lucide-react": "0.562.0",
|
|
181
182
|
"react": ">=16.0.0",
|
|
182
183
|
"react-dom": ">=16.0.0",
|
|
183
|
-
"react-hook-form": "7.71.
|
|
184
|
+
"react-hook-form": "7.71.1",
|
|
184
185
|
"react-intlayer": "7.5.14",
|
|
185
186
|
"shiki": "3.21.0",
|
|
186
187
|
"tailwind-merge": "3.4.0",
|
|
187
|
-
"tailwindcss": "4.1.18"
|
|
188
|
-
"zustand": "4.5.7"
|
|
188
|
+
"tailwindcss": "4.1.18"
|
|
189
189
|
},
|
|
190
190
|
"peerDependenciesMeta": {
|
|
191
191
|
"@intlayer/backend": {
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { create } from "zustand";
|
|
2
|
-
|
|
3
|
-
//#region src/components/RightDrawer/useRightDrawerStore.ts
|
|
4
|
-
/**
|
|
5
|
-
* Zustand store for managing RightDrawer component states
|
|
6
|
-
*
|
|
7
|
-
* This store provides centralized state management for multiple drawer instances,
|
|
8
|
-
* allowing different parts of the application to open, close, and check the status
|
|
9
|
-
* of drawers using unique identifiers.
|
|
10
|
-
*
|
|
11
|
-
* ## Features
|
|
12
|
-
* - **Multi-instance Management**: Handle multiple drawers simultaneously
|
|
13
|
-
* - **Simple API**: Open, close, and check drawer states with string identifiers
|
|
14
|
-
* - **Persistent State**: Drawer states persist until explicitly changed
|
|
15
|
-
* - **Type Safety**: Full TypeScript support with proper type inference
|
|
16
|
-
*
|
|
17
|
-
* ## Usage Patterns
|
|
18
|
-
*
|
|
19
|
-
* ### Basic Usage
|
|
20
|
-
* ```tsx
|
|
21
|
-
* import { useRightDrawerStore } from './useRightDrawerStore';
|
|
22
|
-
*
|
|
23
|
-
* function NavigationButton() {
|
|
24
|
-
* const { open } = useRightDrawerStore();
|
|
25
|
-
*
|
|
26
|
-
* return (
|
|
27
|
-
* <button onClick={() => open('main-menu')}>
|
|
28
|
-
* Open Menu
|
|
29
|
-
* </button>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* ### Conditional Rendering
|
|
35
|
-
* ```tsx
|
|
36
|
-
* function ConditionalContent() {
|
|
37
|
-
* const isMenuOpen = useRightDrawerStore(state => state.isOpen('main-menu'));
|
|
38
|
-
*
|
|
39
|
-
* return (
|
|
40
|
-
* <div>
|
|
41
|
-
* {isMenuOpen ? 'Menu is open' : 'Menu is closed'}
|
|
42
|
-
* </div>
|
|
43
|
-
* );
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* ### Multiple Drawers
|
|
48
|
-
* ```tsx
|
|
49
|
-
* function MultiDrawerManager() {
|
|
50
|
-
* const { open, close, isOpen } = useRightDrawerStore();
|
|
51
|
-
*
|
|
52
|
-
* return (
|
|
53
|
-
* <div>
|
|
54
|
-
* <button onClick={() => open('cart')}>Open Cart</button>
|
|
55
|
-
* <button onClick={() => open('profile')}>Open Profile</button>
|
|
56
|
-
* <button onClick={() => {
|
|
57
|
-
* close('cart');
|
|
58
|
-
* close('profile');
|
|
59
|
-
* }}>Close All</button>
|
|
60
|
-
*
|
|
61
|
-
* <div>
|
|
62
|
-
* Cart: {isOpen('cart') ? 'Open' : 'Closed'}
|
|
63
|
-
* Profile: {isOpen('profile') ? 'Open' : 'Closed'}
|
|
64
|
-
* </div>
|
|
65
|
-
* </div>
|
|
66
|
-
* );
|
|
67
|
-
* }
|
|
68
|
-
* ```
|
|
69
|
-
*
|
|
70
|
-
* @returns RightDrawerStore instance with drawer management capabilities
|
|
71
|
-
*/
|
|
72
|
-
const useRightDrawerStore = create((set, get) => ({
|
|
73
|
-
drawers: {},
|
|
74
|
-
open: (key) => set((state) => ({ drawers: {
|
|
75
|
-
...state.drawers,
|
|
76
|
-
[key]: true
|
|
77
|
-
} })),
|
|
78
|
-
close: (key) => set((state) => ({ drawers: {
|
|
79
|
-
...state.drawers,
|
|
80
|
-
[key]: false
|
|
81
|
-
} })),
|
|
82
|
-
isOpen: (key) => get().drawers[key] ?? false
|
|
83
|
-
}));
|
|
84
|
-
|
|
85
|
-
//#endregion
|
|
86
|
-
export { useRightDrawerStore };
|
|
87
|
-
//# sourceMappingURL=useRightDrawerStore.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRightDrawerStore.mjs","names":[],"sources":["../../../../src/components/RightDrawer/useRightDrawerStore.ts"],"sourcesContent":["import { create } from 'zustand';\n\n/**\n * Type definition for the RightDrawer Zustand store state and actions\n *\n * @interface RightDrawerStore\n */\ntype RightDrawerStore = {\n /** Record of drawer identifiers and their open/closed states */\n drawers: Record<string, boolean>;\n\n /**\n * Opens a drawer with the specified identifier\n * @param key - Unique identifier for the drawer instance\n * @example\n * ```tsx\n * const { open } = useRightDrawerStore();\n * open('user-profile'); // Opens the drawer with identifier 'user-profile'\n * ```\n */\n open: (key: string) => void;\n\n /**\n * Closes a drawer with the specified identifier\n * @param key - Unique identifier for the drawer instance\n * @example\n * ```tsx\n * const { close } = useRightDrawerStore();\n * close('user-profile'); // Closes the drawer with identifier 'user-profile'\n * ```\n */\n close: (key: string) => void;\n\n /**\n * Checks if a drawer with the specified identifier is currently open\n * @param key - Unique identifier for the drawer instance\n * @returns Boolean indicating if the drawer is open (defaults to false if not found)\n * @example\n * ```tsx\n * const { isOpen } = useRightDrawerStore();\n * const isProfileOpen = isOpen('user-profile');\n * ```\n */\n isOpen: (key: string) => boolean;\n};\n\n/**\n * Zustand store for managing RightDrawer component states\n *\n * This store provides centralized state management for multiple drawer instances,\n * allowing different parts of the application to open, close, and check the status\n * of drawers using unique identifiers.\n *\n * ## Features\n * - **Multi-instance Management**: Handle multiple drawers simultaneously\n * - **Simple API**: Open, close, and check drawer states with string identifiers\n * - **Persistent State**: Drawer states persist until explicitly changed\n * - **Type Safety**: Full TypeScript support with proper type inference\n *\n * ## Usage Patterns\n *\n * ### Basic Usage\n * ```tsx\n * import { useRightDrawerStore } from './useRightDrawerStore';\n *\n * function NavigationButton() {\n * const { open } = useRightDrawerStore();\n *\n * return (\n * <button onClick={() => open('main-menu')}>\n * Open Menu\n * </button>\n * );\n * }\n * ```\n *\n * ### Conditional Rendering\n * ```tsx\n * function ConditionalContent() {\n * const isMenuOpen = useRightDrawerStore(state => state.isOpen('main-menu'));\n *\n * return (\n * <div>\n * {isMenuOpen ? 'Menu is open' : 'Menu is closed'}\n * </div>\n * );\n * }\n * ```\n *\n * ### Multiple Drawers\n * ```tsx\n * function MultiDrawerManager() {\n * const { open, close, isOpen } = useRightDrawerStore();\n *\n * return (\n * <div>\n * <button onClick={() => open('cart')}>Open Cart</button>\n * <button onClick={() => open('profile')}>Open Profile</button>\n * <button onClick={() => {\n * close('cart');\n * close('profile');\n * }}>Close All</button>\n *\n * <div>\n * Cart: {isOpen('cart') ? 'Open' : 'Closed'}\n * Profile: {isOpen('profile') ? 'Open' : 'Closed'}\n * </div>\n * </div>\n * );\n * }\n * ```\n *\n * @returns RightDrawerStore instance with drawer management capabilities\n */\nexport const useRightDrawerStore = create<RightDrawerStore>((set, get) => ({\n drawers: {},\n open: (key: string) =>\n set((state) => ({\n drawers: {\n ...state.drawers,\n [key]: true,\n },\n })),\n close: (key: string) =>\n set((state) => ({\n drawers: {\n ...state.drawers,\n [key]: false,\n },\n })),\n isOpen: (key: string) => get().drawers[key] ?? false,\n}));\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,MAAa,sBAAsB,QAA0B,KAAK,SAAS;CACzE,SAAS,EAAE;CACX,OAAO,QACL,KAAK,WAAW,EACd,SAAS;EACP,GAAG,MAAM;GACR,MAAM;EACR,EACF,EAAE;CACL,QAAQ,QACN,KAAK,WAAW,EACd,SAAS;EACP,GAAG,MAAM;GACR,MAAM;EACR,EACF,EAAE;CACL,SAAS,QAAgB,KAAK,CAAC,QAAQ,QAAQ;CAChD,EAAE"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import * as zustand1 from "zustand";
|
|
2
|
-
|
|
3
|
-
//#region src/components/RightDrawer/useRightDrawerStore.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Type definition for the RightDrawer Zustand store state and actions
|
|
7
|
-
*
|
|
8
|
-
* @interface RightDrawerStore
|
|
9
|
-
*/
|
|
10
|
-
type RightDrawerStore = {
|
|
11
|
-
/** Record of drawer identifiers and their open/closed states */
|
|
12
|
-
drawers: Record<string, boolean>;
|
|
13
|
-
/**
|
|
14
|
-
* Opens a drawer with the specified identifier
|
|
15
|
-
* @param key - Unique identifier for the drawer instance
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* const { open } = useRightDrawerStore();
|
|
19
|
-
* open('user-profile'); // Opens the drawer with identifier 'user-profile'
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
open: (key: string) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Closes a drawer with the specified identifier
|
|
25
|
-
* @param key - Unique identifier for the drawer instance
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* const { close } = useRightDrawerStore();
|
|
29
|
-
* close('user-profile'); // Closes the drawer with identifier 'user-profile'
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
close: (key: string) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Checks if a drawer with the specified identifier is currently open
|
|
35
|
-
* @param key - Unique identifier for the drawer instance
|
|
36
|
-
* @returns Boolean indicating if the drawer is open (defaults to false if not found)
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* const { isOpen } = useRightDrawerStore();
|
|
40
|
-
* const isProfileOpen = isOpen('user-profile');
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
isOpen: (key: string) => boolean;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Zustand store for managing RightDrawer component states
|
|
47
|
-
*
|
|
48
|
-
* This store provides centralized state management for multiple drawer instances,
|
|
49
|
-
* allowing different parts of the application to open, close, and check the status
|
|
50
|
-
* of drawers using unique identifiers.
|
|
51
|
-
*
|
|
52
|
-
* ## Features
|
|
53
|
-
* - **Multi-instance Management**: Handle multiple drawers simultaneously
|
|
54
|
-
* - **Simple API**: Open, close, and check drawer states with string identifiers
|
|
55
|
-
* - **Persistent State**: Drawer states persist until explicitly changed
|
|
56
|
-
* - **Type Safety**: Full TypeScript support with proper type inference
|
|
57
|
-
*
|
|
58
|
-
* ## Usage Patterns
|
|
59
|
-
*
|
|
60
|
-
* ### Basic Usage
|
|
61
|
-
* ```tsx
|
|
62
|
-
* import { useRightDrawerStore } from './useRightDrawerStore';
|
|
63
|
-
*
|
|
64
|
-
* function NavigationButton() {
|
|
65
|
-
* const { open } = useRightDrawerStore();
|
|
66
|
-
*
|
|
67
|
-
* return (
|
|
68
|
-
* <button onClick={() => open('main-menu')}>
|
|
69
|
-
* Open Menu
|
|
70
|
-
* </button>
|
|
71
|
-
* );
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* ### Conditional Rendering
|
|
76
|
-
* ```tsx
|
|
77
|
-
* function ConditionalContent() {
|
|
78
|
-
* const isMenuOpen = useRightDrawerStore(state => state.isOpen('main-menu'));
|
|
79
|
-
*
|
|
80
|
-
* return (
|
|
81
|
-
* <div>
|
|
82
|
-
* {isMenuOpen ? 'Menu is open' : 'Menu is closed'}
|
|
83
|
-
* </div>
|
|
84
|
-
* );
|
|
85
|
-
* }
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* ### Multiple Drawers
|
|
89
|
-
* ```tsx
|
|
90
|
-
* function MultiDrawerManager() {
|
|
91
|
-
* const { open, close, isOpen } = useRightDrawerStore();
|
|
92
|
-
*
|
|
93
|
-
* return (
|
|
94
|
-
* <div>
|
|
95
|
-
* <button onClick={() => open('cart')}>Open Cart</button>
|
|
96
|
-
* <button onClick={() => open('profile')}>Open Profile</button>
|
|
97
|
-
* <button onClick={() => {
|
|
98
|
-
* close('cart');
|
|
99
|
-
* close('profile');
|
|
100
|
-
* }}>Close All</button>
|
|
101
|
-
*
|
|
102
|
-
* <div>
|
|
103
|
-
* Cart: {isOpen('cart') ? 'Open' : 'Closed'}
|
|
104
|
-
* Profile: {isOpen('profile') ? 'Open' : 'Closed'}
|
|
105
|
-
* </div>
|
|
106
|
-
* </div>
|
|
107
|
-
* );
|
|
108
|
-
* }
|
|
109
|
-
* ```
|
|
110
|
-
*
|
|
111
|
-
* @returns RightDrawerStore instance with drawer management capabilities
|
|
112
|
-
*/
|
|
113
|
-
declare const useRightDrawerStore: zustand1.UseBoundStore<zustand1.StoreApi<RightDrawerStore>>;
|
|
114
|
-
//#endregion
|
|
115
|
-
export { useRightDrawerStore };
|
|
116
|
-
//# sourceMappingURL=useRightDrawerStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useRightDrawerStore.d.ts","names":[],"sources":["../../../../src/components/RightDrawer/useRightDrawerStore.ts"],"sourcesContent":[],"mappings":";;;;;;;AAkHgC;AAAhC;KA3GK,gBAAA,GA2G2B;EAAA;EAAA,OAAA,EAzGrB,MAyGqB,CAAA,MAAA,EAAA,OAAA,CAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAnB,qBAAmB,QAAA,CAAA,cAAA,QAAA,CAAA,SAAA"}
|