@intlayer/design-system 8.7.12 → 8.7.13
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/README.md +1 -1
- package/dist/esm/components/DictionaryEditor/NodeWrapper/BooleanWrapper.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -0
- package/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +1 -1
- package/dist/esm/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
- package/dist/esm/components/Form/elements/SwitchSelectorElement.mjs +1 -1
- package/dist/esm/components/IDE/Code.mjs +4 -1
- package/dist/esm/components/IDE/Code.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockClient.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockHighlight.mjs +2 -2
- package/dist/esm/components/IDE/CodeBlockHighlight.mjs.map +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs +1 -1
- package/dist/esm/components/IDE/CodeBlockShiki.mjs.map +1 -1
- package/dist/esm/components/Input/Checkbox.mjs +13 -13
- package/dist/esm/components/Input/Checkbox.mjs.map +1 -1
- package/dist/esm/components/Link/Link.mjs +3 -3
- package/dist/esm/components/Link/Link.mjs.map +1 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -1
- package/dist/esm/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
- package/dist/esm/components/Navbar/index.mjs.map +1 -1
- package/dist/esm/components/Popover/static.mjs +1 -1
- package/dist/esm/components/Popover/static.mjs.map +1 -1
- package/dist/esm/components/SwitchSelector/SwitchSelector.mjs +127 -0
- package/dist/esm/components/SwitchSelector/SwitchSelector.mjs.map +1 -0
- package/dist/esm/components/SwitchSelector/VerticalSwitchSelector.mjs +105 -0
- package/dist/esm/components/SwitchSelector/VerticalSwitchSelector.mjs.map +1 -0
- package/dist/esm/components/SwitchSelector/index.mjs +3 -179
- package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs +44 -0
- package/dist/esm/components/SwitchSelector/useSwitchSelector.mjs.map +1 -0
- package/dist/esm/components/index.mjs +3 -2
- package/dist/esm/hooks/index.mjs +2 -2
- package/dist/esm/hooks/reactQuery.mjs +41 -12
- package/dist/esm/hooks/reactQuery.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/useOAuth2.mjs +2 -2
- package/dist/esm/hooks/useAuth/useOAuth2.mjs.map +1 -1
- package/dist/esm/hooks/useAuth/useSession.mjs +6 -4
- package/dist/esm/hooks/useAuth/useSession.mjs.map +1 -1
- package/dist/esm/hooks/useItemSelector.mjs +33 -20
- package/dist/esm/hooks/useItemSelector.mjs.map +1 -1
- package/dist/esm/providers/ReactQueryProvider.mjs +56 -21
- package/dist/esm/providers/ReactQueryProvider.mjs.map +1 -1
- package/dist/types/components/Badge/index.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/CollapsibleTable/CollapsibleTable.d.ts +1 -1
- package/dist/types/components/Command/index.d.ts +1 -1
- package/dist/types/components/Container/index.d.ts +6 -6
- package/dist/types/components/IDE/Code.d.ts +2 -2
- package/dist/types/components/IDE/Code.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockClient.d.ts +3 -3
- package/dist/types/components/IDE/CodeBlockClient.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockHighlight.d.ts +2 -1
- package/dist/types/components/IDE/CodeBlockHighlight.d.ts.map +1 -1
- package/dist/types/components/IDE/CodeBlockShiki.d.ts +2 -2
- package/dist/types/components/IDE/CodeBlockShiki.d.ts.map +1 -1
- 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 +1 -1
- package/dist/types/components/Link/Link.d.ts +2 -2
- package/dist/types/components/Navbar/index.d.ts.map +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/SwitchSelector/SwitchSelector.d.ts +56 -0
- package/dist/types/components/SwitchSelector/SwitchSelector.d.ts.map +1 -0
- package/dist/types/components/SwitchSelector/VerticalSwitchSelector.d.ts +22 -0
- package/dist/types/components/SwitchSelector/VerticalSwitchSelector.d.ts.map +1 -0
- package/dist/types/components/SwitchSelector/index.d.ts +3 -79
- package/dist/types/components/SwitchSelector/useSwitchSelector.d.ts +27 -0
- package/dist/types/components/SwitchSelector/useSwitchSelector.d.ts.map +1 -0
- package/dist/types/components/Tab/Tab.d.ts +1 -1
- package/dist/types/components/TabSelector/TabSelector.d.ts +1 -1
- package/dist/types/components/Tag/index.d.ts +2 -2
- package/dist/types/components/Toaster/Toast.d.ts +1 -1
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/hooks/index.d.ts +2 -2
- package/dist/types/hooks/reactQuery.d.ts +4 -1
- package/dist/types/hooks/reactQuery.d.ts.map +1 -1
- package/dist/types/hooks/useAuth/useOAuth2.d.ts.map +1 -1
- package/dist/types/providers/ReactQueryProvider.d.ts +5 -2
- package/dist/types/providers/ReactQueryProvider.d.ts.map +1 -1
- package/package.json +24 -21
- package/dist/esm/components/SwitchSelector/index.mjs.map +0 -1
- package/dist/types/components/SwitchSelector/index.d.ts.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SwitchSelectorBaseProps } from "./SwitchSelector.js";
|
|
2
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/SwitchSelector/VerticalSwitchSelector.d.ts
|
|
7
|
+
declare const verticalSwitchSelectorVariant: (props?: {
|
|
8
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
11
|
+
declare const verticalChoiceVariant: (props?: {
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
14
|
+
type VerticalSwitchSelectorProps<T = boolean> = SwitchSelectorBaseProps<T> & VariantProps<typeof verticalSwitchSelectorVariant> & VariantProps<typeof verticalChoiceVariant>;
|
|
15
|
+
/**
|
|
16
|
+
* Component that allows the user to select one of the provided choices.
|
|
17
|
+
* This component is vertical.
|
|
18
|
+
*/
|
|
19
|
+
declare const VerticalSwitchSelector: <T>(props: VerticalSwitchSelectorProps<T>) => _$react_jsx_runtime0.JSX.Element;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { VerticalSwitchSelector, VerticalSwitchSelectorProps };
|
|
22
|
+
//# sourceMappingURL=VerticalSwitchSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VerticalSwitchSelector.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/VerticalSwitchSelector.tsx"],"mappings":";;;;;;cAaM,6BAAA,GAA6B,KAAA;;;IAwBlC,iCAAA,CAAA,SAAA;AAAA,cAEK,qBAAA,GAAqB,KAAA;;IAc1B,iCAAA,CAAA,SAAA;AAAA,KA0BW,2BAAA,gBACV,uBAAA,CAAwB,CAAA,IACtB,YAAA,QAAoB,6BAAA,IACpB,YAAA,QAAoB,qBAAA;;;;;cAMX,sBAAA,MACX,KAAA,EAAO,2BAAA,CAA4B,CAAA,MAAE,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,79 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
-
import { ItemSelectorOrientation } from "@hooks/useItemSelector";
|
|
6
|
-
|
|
7
|
-
//#region src/components/SwitchSelector/index.d.ts
|
|
8
|
-
type SwitchSelectorChoice<T = boolean> = {
|
|
9
|
-
content: ReactNode;
|
|
10
|
-
value: T;
|
|
11
|
-
} & HTMLAttributes<HTMLButtonElement>;
|
|
12
|
-
type SwitchSelectorChoices<T> = SwitchSelectorChoice<T>[];
|
|
13
|
-
type SwitchSelectorProps<T = boolean> = {
|
|
14
|
-
choices?: SwitchSelectorChoices<T>;
|
|
15
|
-
value?: T;
|
|
16
|
-
defaultValue?: T;
|
|
17
|
-
onChange?: (choice: T) => void;
|
|
18
|
-
className?: string;
|
|
19
|
-
itemClassName?: string;
|
|
20
|
-
hoverable?: boolean;
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
orientation?: ItemSelectorOrientation;
|
|
23
|
-
} & VariantProps<typeof switchSelectorVariant> & VariantProps<typeof choiceVariant>;
|
|
24
|
-
declare enum SwitchSelectorColor {
|
|
25
|
-
PRIMARY = "primary",
|
|
26
|
-
SECONDARY = "secondary",
|
|
27
|
-
DESTRUCTIVE = "destructive",
|
|
28
|
-
NEUTRAL = "neutral",
|
|
29
|
-
LIGHT = "light",
|
|
30
|
-
DARK = "dark",
|
|
31
|
-
TEXT = "text"
|
|
32
|
-
}
|
|
33
|
-
declare const switchSelectorVariant: (props?: {
|
|
34
|
-
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
|
|
35
|
-
orientation?: "horizontal" | "vertical";
|
|
36
|
-
disabled?: boolean;
|
|
37
|
-
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
38
|
-
declare enum SwitchSelectorSize {
|
|
39
|
-
SM = "sm",
|
|
40
|
-
MD = "md",
|
|
41
|
-
LG = "lg"
|
|
42
|
-
}
|
|
43
|
-
declare const choiceVariant: (props?: {
|
|
44
|
-
size?: "lg" | "md" | "sm";
|
|
45
|
-
orientation?: "horizontal" | "vertical";
|
|
46
|
-
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* Component that allows the user to select one of the provided choices.
|
|
50
|
-
*
|
|
51
|
-
* Example:
|
|
52
|
-
* ```jsx
|
|
53
|
-
* <SwitchSelector
|
|
54
|
-
* choices={[
|
|
55
|
-
* { content: 'Option 1', value: 'option1' },
|
|
56
|
-
* { content: 'Option 2', value: 'option2' },
|
|
57
|
-
* { content: 'Option 3', value: 'option3' },
|
|
58
|
-
* ]}
|
|
59
|
-
* value="option1"
|
|
60
|
-
* onChange={(choice) => console.log(choice)}
|
|
61
|
-
* />
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
declare const SwitchSelector: <T>({
|
|
65
|
-
choices,
|
|
66
|
-
value,
|
|
67
|
-
defaultValue,
|
|
68
|
-
onChange,
|
|
69
|
-
color,
|
|
70
|
-
size,
|
|
71
|
-
className,
|
|
72
|
-
itemClassName,
|
|
73
|
-
hoverable,
|
|
74
|
-
disabled,
|
|
75
|
-
orientation
|
|
76
|
-
}: SwitchSelectorProps<T>) => _$react_jsx_runtime0.JSX.Element;
|
|
77
|
-
//#endregion
|
|
78
|
-
export { SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize };
|
|
79
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant } from "./SwitchSelector.js";
|
|
2
|
+
import { VerticalSwitchSelector, VerticalSwitchSelectorProps } from "./VerticalSwitchSelector.js";
|
|
3
|
+
export { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, VerticalSwitchSelector, VerticalSwitchSelectorProps, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SwitchSelectorBaseProps } from "./SwitchSelector.js";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
import { ItemSelectorOrientation } from "@hooks/useItemSelector";
|
|
4
|
+
|
|
5
|
+
//#region src/components/SwitchSelector/useSwitchSelector.d.ts
|
|
6
|
+
declare const useSwitchSelector: <T>({
|
|
7
|
+
choices,
|
|
8
|
+
value,
|
|
9
|
+
defaultValue,
|
|
10
|
+
onChange,
|
|
11
|
+
hoverable,
|
|
12
|
+
disabled
|
|
13
|
+
}: SwitchSelectorBaseProps<T>, orientation: ItemSelectorOrientation) => {
|
|
14
|
+
valueState: T;
|
|
15
|
+
hoveredIndex: number;
|
|
16
|
+
setHoveredIndex: _$react.Dispatch<_$react.SetStateAction<number>>;
|
|
17
|
+
optionsRefs: _$react.RefObject<HTMLButtonElement[]>;
|
|
18
|
+
indicatorRef: _$react.RefObject<HTMLDivElement>;
|
|
19
|
+
choiceIndicatorPosition: any;
|
|
20
|
+
selectedIndex: number;
|
|
21
|
+
indicatorIndex: number;
|
|
22
|
+
handleChange: (newValue: T) => void;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { useSwitchSelector };
|
|
27
|
+
//# sourceMappingURL=useSwitchSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSwitchSelector.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/useSwitchSelector.ts"],"mappings":";;;;;cASa,iBAAA;EACX,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,SAAA;EAAA;AAAA,GAOG,uBAAA,CAAwB,CAAA,GAC3B,WAAA,EAAa,uBAAA;;;;;;;;;2BAuBmB,CAAA"}
|
|
@@ -5,7 +5,7 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/Tab/Tab.d.ts
|
|
7
7
|
declare const tabContainerVariant: (props?: {
|
|
8
|
-
background?: "
|
|
8
|
+
background?: "with" | "without";
|
|
9
9
|
variant?: "default" | "bordered" | "ghost";
|
|
10
10
|
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
11
11
|
type TabProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof tabContainerVariant> & {
|
|
@@ -15,7 +15,7 @@ declare enum TabSelectorColor {
|
|
|
15
15
|
TEXT = "text"
|
|
16
16
|
}
|
|
17
17
|
declare const tabSelectorVariant: (props?: {
|
|
18
|
-
color?: "
|
|
18
|
+
color?: "text" | "primary" | "secondary" | "destructive" | "neutral" | "light" | "dark";
|
|
19
19
|
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
20
20
|
type TabSelectorItemProps = HTMLAttributes<HTMLElement> & {
|
|
21
21
|
key: string | number;
|
|
@@ -185,9 +185,9 @@ declare enum TagBackground {
|
|
|
185
185
|
WITH = "with"
|
|
186
186
|
}
|
|
187
187
|
declare const containerVariants: (props?: {
|
|
188
|
-
roundedSize?: "
|
|
188
|
+
roundedSize?: "sm" | "md" | "lg" | "xl" | "2xl" | "none" | "3xl" | "full";
|
|
189
189
|
color?: "text" | "error" | "primary" | "neutral" | "success" | "warning" | "blue" | "yellow" | "green" | "red" | "orange" | "purple" | "pink" | "brown" | "gray" | "black" | "white";
|
|
190
|
-
size?: "
|
|
190
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
191
191
|
border?: "none" | "with";
|
|
192
192
|
background?: "none" | "with";
|
|
193
193
|
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
@@ -25,7 +25,7 @@ declare const ToastViewport: FC<ComponentProps<typeof ToastPrimitives.Viewport>>
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
declare const toastVariants: (props?: {
|
|
28
|
-
variant?: "error" | "
|
|
28
|
+
variant?: "error" | "default" | "success";
|
|
29
29
|
} & _$class_variance_authority_types0.ClassProp) => string;
|
|
30
30
|
/**
|
|
31
31
|
* Toast Component
|
|
@@ -96,7 +96,8 @@ import { TiktokLogo } from "./SocialNetworks/TiktokLogo.js";
|
|
|
96
96
|
import { XLogo } from "./SocialNetworks/XLogo.js";
|
|
97
97
|
import { YoutubeLogo } from "./SocialNetworks/YoutubeLogo.js";
|
|
98
98
|
import { SocialNetworks } from "./SocialNetworks/index.js";
|
|
99
|
-
import { SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize } from "./SwitchSelector/
|
|
99
|
+
import { SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, choiceVariant, defaultChoices, indicatorVariant, switchSelectorVariant } from "./SwitchSelector/SwitchSelector.js";
|
|
100
|
+
import { VerticalSwitchSelector, VerticalSwitchSelectorProps } from "./SwitchSelector/VerticalSwitchSelector.js";
|
|
100
101
|
import { Tab, TabItemProps, TabProps } from "./Tab/Tab.js";
|
|
101
102
|
import { Table, TableProps } from "./Table/Table.js";
|
|
102
103
|
import { SmartTable } from "./Table/SmartTable.js";
|
|
@@ -113,4 +114,4 @@ import { Toaster } from "./Toaster/Toaster.js";
|
|
|
113
114
|
import { reducer, toast, useToast } from "./Toaster/useToast.js";
|
|
114
115
|
import { WithResizer } from "./WithResizer/index.js";
|
|
115
116
|
import { MarkdownRenderer, baseMarkdownComponents, getIntlayerMarkdownOptions } from "./MarkDownRender/MarkDownRender.js";
|
|
116
|
-
export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, BitbucketLogo, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Burger, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CodeLanguage, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditableTextArea, ContentEditableTextAreaHandle, ContentEditableTextAreaProps, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopNavbar, 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, GitHubLogo, GitLabLogo, GoogleLogo, GridPattern, H1, H2, H3, H4, H5, H6, HTMLRenderer, 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, MobileNavbar, 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, SmartTable, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, TableProps, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, TechLogo, TechLogoName, techLogos_d_exports as TechLogos, 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, baseMarkdownComponents, buttonVariants, checkIsExternalLink, checkboxVariants, containerVariants, drawerManager, getCapitals, getIntlayerHTMLOptions, getIntlayerMarkdownOptions, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, toast, traceKeys, useContentEditable, useCopyToClipboard, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious, useRightDrawer, useToast, useVersionSwitcher };
|
|
117
|
+
export { Accordion, AccordionProps, AutoCompleteTextarea, AutoSizedTextArea, AutoSizedTextAreaProps, AutocompleteTextAreaProps, Avatar, AvatarProps, Badge, BadgeColor, BadgeProps, BadgeSize, BadgeVariant, BadgeVariantProps, BitbucketLogo, Breadcrumb, BreadcrumbLink, BreadcrumbProps, Browser, BrowserProps, Burger, Button, ButtonColor, ButtonProps, ButtonSize, ButtonTextAlign, ButtonVariant, Carousel, Checkbox, CheckboxColor, CheckboxProps, CheckboxSize, ClickOutsideDiv, ClickOutsideDivProps, Code, CodeBlock, CodeBlockProps, CodeCompAttributes, CodeDefault, CodeLanguage, CollapsibleTable, CollapsibleTableProps, Command, CommandRoot, Container, ContainerBackground, ContainerBorderColor, ContainerGap, ContainerPadding, ContainerProps, ContainerRoundedSize, ContainerSeparator, ContainerTransparency, ContentEditableTextArea, ContentEditableTextAreaHandle, ContentEditableTextAreaProps, ContentEditor, ContentSelector, CopyButton, CopyToClipboard, CopyToClipboardProps, DesktopNavbar, 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, GitHubLogo, GitLabLogo, GoogleLogo, GridPattern, H1, H2, H3, H4, H5, H6, HTMLRenderer, 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, MobileNavbar, 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, SmartTable, SocialNetworks, Spotlight, SwitchSelector, SwitchSelectorBaseProps, SwitchSelectorChoice, SwitchSelectorChoices, SwitchSelectorColor, SwitchSelectorProps, SwitchSelectorSize, Tab, TabItemProps, TabProps, TabSelector, TabSelectorColor, TabSelectorItemProps, TabSelectorProps, Table, TableProps, Tag, TagBackground, TagBorder, TagColor, TagRoundedSize, TagSize, TechLogo, TechLogoName, techLogos_d_exports as TechLogos, Terminal, TerminalProps, TextArea, TextAreaProps, TextEditor, TextEditorContainer, TextEditorProps, TiktokLogo, Toast, ToastAction, ToastActionElement, ToastClose, ToastDescription, ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, TriggerProps, VersionSwitcher, VersionSwitcherProps, VersionSwitcherProvider, VerticalSwitchSelector, VerticalSwitchSelectorProps, WithResizer, XLogo, YoutubeLogo, badgeVariants, baseMarkdownComponents, buttonVariants, checkIsExternalLink, checkboxVariants, choiceVariant, containerVariants, defaultChoices, drawerManager, getCapitals, getIntlayerHTMLOptions, getIntlayerMarkdownOptions, indicatorVariant, inputSlotVariants, inputVariants, isTextChildren, linkVariants, paginationVariants, reducer, switchSelectorVariant, toast, traceKeys, useContentEditable, useCopyToClipboard, useForm, useFormField, useLocaleSwitcherContent, usePasswordManagerBadge, usePrevious, useRightDrawer, useToast, useVersionSwitcher };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UseIntlayerAuthProps, useIntlayerAuth, useIntlayerOAuth } from "./useIntlayerAPI.js";
|
|
2
|
-
import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary } from "./reactQuery.js";
|
|
2
|
+
import { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary } from "./reactQuery.js";
|
|
3
3
|
import { useAuth } from "./useAuth/useAuth.js";
|
|
4
4
|
import { useOAuth2 } from "./useAuth/useOAuth2.js";
|
|
5
5
|
import { UseSessionResult, useSession } from "./useAuth/useSession.js";
|
|
@@ -18,4 +18,4 @@ import { useScrollDetection } from "./useScrollDetection.js";
|
|
|
18
18
|
import { useScrollY } from "./useScrollY.js";
|
|
19
19
|
import { useSearch } from "./useSearch.js";
|
|
20
20
|
import { useUser } from "./useUser/index.js";
|
|
21
|
-
export { HorizontalSwipeConfig, HorizontalSwipeHook, ItemSelectorOrientation, SizeType, UseIntlayerAuthProps, UseSessionResult, calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAuth, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useHorizontalSwipe, useInfiniteGetDictionaries, useIntlayerAuth, useIntlayerOAuth, useIsDarkMode, useIsMounted, useItemSelector, useKeyboardDetector, useListPasskeys, useListSSOProviders, useLogin, useLogout, useOAuth2, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
|
|
21
|
+
export { HorizontalSwipeConfig, HorizontalSwipeHook, ItemSelectorOrientation, SizeType, UseIntlayerAuthProps, UseSessionResult, calculateIsMobile, checkIsIOS, checkIsIphoneOrSafariDevice, checkIsMac, checkIsMobileScreen, checkIsMobileUserAgent, getBreakpointFromSize, useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAuth, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDevice, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetElementById, useGetElementOrWindow, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useHorizontalSwipe, useInfiniteGetDictionaries, useIntlayerAuth, useIntlayerOAuth, useIsDarkMode, useIsMounted, useItemSelector, useKeyboardDetector, useListPasskeys, useListSSOProviders, useLogin, useLogout, useOAuth2, usePauseTranslationJob, usePersistedStore, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useScreenWidth, useScrollBlockage, useScrollDetection, useScrollY, useSearch, useSearchDoc, useSelectOrganization, useSelectProject, useSession, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
|
|
@@ -95,6 +95,9 @@ declare const useDeleteTag: () => any;
|
|
|
95
95
|
declare const useGetPricing: (body: GetPricingBody, options?: Partial<UseQueryOptions<GetPricingResult>>) => QueryObserverResult<TData, TError>;
|
|
96
96
|
declare const useGetSubscription: (body: GetCheckoutSessionBody, options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
|
|
97
97
|
declare const useCancelSubscription: () => any;
|
|
98
|
+
declare const useGetInvoices: (options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
|
|
99
|
+
declare const useGetPaymentMethod: (options?: Partial<UseQueryOptions>) => QueryObserverResult<TData, TError>;
|
|
100
|
+
declare const useCreatePortalSession: () => any;
|
|
98
101
|
/**
|
|
99
102
|
* AI
|
|
100
103
|
*/
|
|
@@ -172,5 +175,5 @@ declare const useStopTranslationJob: () => any;
|
|
|
172
175
|
declare const usePauseTranslationJob: () => any;
|
|
173
176
|
declare const useResumeTranslationJob: () => any;
|
|
174
177
|
//#endregion
|
|
175
|
-
export { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
|
|
178
|
+
export { useAddDictionary, useAddNewAccessKey, useAddOrganization, useAddOrganizationMember, useAddPasskey, useAddProject, useAddTag, useAppQuery, useAskDocQuestion, useAskResetPassword, useAuditContentDeclaration, useAuditContentDeclarationField, useAuditContentDeclarationMetadata, useAuditScan, useAuditTag, useAutocomplete, useBitbucketAuth, useBitbucketCheckConfig, useBitbucketGetConfigFile, useBitbucketRepos, useCancelSubscription, useChangePassword, useCreatePortalSession, useCreateUser, useDeleteAccessKey, useDeleteDictionary, useDeleteOrganization, useDeletePasskey, useDeleteProject, useDeleteSSOProvider, useDeleteShowcaseProject, useDeleteTag, useDeleteUser, useDisableTwoFactor, useEnableTwoFactor, useFillAllTranslations, useGetCIConfig, useGetDictionaries, useGetDictionariesKeys, useGetDictionary, useGetDiscussions, useGetDiscussionsData, useGetEditorDictionaries, useGetInvoices, useGetNewsletterStatus, useGetOrganizations, useGetOtherShowcaseProjects, useGetPaymentMethod, useGetPricing, useGetProjects, useGetRecursiveAuditStatus, useGetShowcaseProjectById, useGetShowcaseProjects, useGetSubscription, useGetTags, useGetUserByAccount, useGetUserById, useGetUsers, useGetVerifyEmailStatus, useGithubAuth, useGithubCheckConfig, useGithubGetAuthUrl, useGithubGetConfigFile, useGithubRepos, useGitlabAuth, useGitlabCheckConfig, useGitlabGetConfigFile, useGitlabProjects, useInfiniteGetDictionaries, useListPasskeys, useListSSOProviders, useLogin, useLogout, usePauseTranslationJob, usePushCIConfig, usePushDictionaries, useQueryClient, useRefreshAccessKey, useRegister, useRegisterSSO, useResetPassword, useResumeTranslationJob, useSearchDoc, useSelectOrganization, useSelectProject, useSignInMagicLink, useSignInPasskey, useSignInSSO, useStartRecursiveAudit, useStopTranslationJob, useSubmitShowcaseProject, useSubscribeToNewsletter, useToggleShowcaseDownvote, useToggleShowcaseUpvote, useTranslateJSONDeclaration, useTriggerBuild, useTriggerWebhook, useUnselectOrganization, useUnselectProject, useUnsubscribeFromNewsletter, useUpdateDictionary, useUpdateOrganization, useUpdateOrganizationMembers, useUpdateOrganizationMembersById, useUpdateProject, useUpdateProjectMembers, useUpdateShowcaseProject, useUpdateTag, useUpdateUser, useVerifyBackupCode, useVerifyEmail, useVerifyTotp, useWriteDictionary };
|
|
176
179
|
//# sourceMappingURL=reactQuery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactQuery.d.ts","names":[],"sources":["../../../src/hooks/reactQuery.ts"],"mappings":";;;;;;cAwHa,WAAA,GACX,OAAA,EAAS,eAAA;EACP,WAAA;EACA,cA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
+
{"version":3,"file":"useOAuth2.d.ts","names":[],"sources":["../../../../src/hooks/useAuth/useOAuth2.ts"],"mappings":";;;cASa,SAAA,GAAa,qBAAA,GAAwB,cAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from "react";
|
|
2
|
-
import { QueryKey, UseMutationOptions } from "@tanstack/react-query";
|
|
2
|
+
import { QueryClient, QueryKey, UseMutationOptions } from "@tanstack/react-query";
|
|
3
3
|
|
|
4
4
|
//#region src/providers/ReactQueryProvider.d.ts
|
|
5
5
|
declare module '@tanstack/react-query' {
|
|
@@ -13,7 +13,10 @@ declare module '@tanstack/react-query' {
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
declare const getQueryClient: () => any;
|
|
16
|
-
|
|
16
|
+
interface ReactQueryProviderProps {
|
|
17
|
+
client?: QueryClient;
|
|
18
|
+
}
|
|
19
|
+
declare const ReactQueryProvider: FC<PropsWithChildren<ReactQueryProviderProps>>;
|
|
17
20
|
//#endregion
|
|
18
21
|
export { ReactQueryProvider, getQueryClient };
|
|
19
22
|
//# sourceMappingURL=ReactQueryProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactQueryProvider.d.ts","names":[],"sources":["../../../src/providers/ReactQueryProvider.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"ReactQueryProvider.d.ts","names":[],"sources":["../../../src/providers/ReactQueryProvider.tsx"],"mappings":";;;;;YA0DY,QAAA;IACR,YAAA;MACE,SAAA,GAAY,kBAAA;MACZ,OAAA,GAAU,kBAAA;MACV,iBAAA,GAAoB,QAAA;MACpB,YAAA,GAAe,QAAA;IAAA;EAAA;AAAA;AAAA,cA0ER,cAAA;AAAA,UAGH,uBAAA;EACR,MAAA,GAAS,WAAA;AAAA;AAAA,cAGE,kBAAA,EAAoB,EAAA,CAC/B,iBAAA,CAAkB,uBAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/design-system",
|
|
3
|
-
"version": "8.7.
|
|
3
|
+
"version": "8.7.13",
|
|
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": [
|
|
@@ -421,26 +421,29 @@
|
|
|
421
421
|
"dependencies": {
|
|
422
422
|
"@better-auth/passkey": "1.6.9",
|
|
423
423
|
"@better-auth/sso": "1.6.9",
|
|
424
|
-
"@intlayer/api": "8.7.
|
|
425
|
-
"@intlayer/config": "8.7.
|
|
426
|
-
"@intlayer/core": "8.7.
|
|
427
|
-
"@intlayer/dictionaries-entry": "8.7.
|
|
428
|
-
"@intlayer/editor-react": "8.7.
|
|
429
|
-
"@intlayer/types": "8.7.
|
|
424
|
+
"@intlayer/api": "8.7.13",
|
|
425
|
+
"@intlayer/config": "8.7.13",
|
|
426
|
+
"@intlayer/core": "8.7.13",
|
|
427
|
+
"@intlayer/dictionaries-entry": "8.7.13",
|
|
428
|
+
"@intlayer/editor-react": "8.7.13",
|
|
429
|
+
"@intlayer/types": "8.7.13",
|
|
430
430
|
"@radix-ui/react-dialog": "1.1.15",
|
|
431
431
|
"@radix-ui/react-select": "2.2.6",
|
|
432
432
|
"@radix-ui/react-slot": "1.2.4",
|
|
433
433
|
"@radix-ui/react-toast": "1.2.15",
|
|
434
434
|
"@tailwindcss/aspect-ratio": "0.4.2",
|
|
435
|
+
"@tanstack/query-async-storage-persister": "5.100.6",
|
|
436
|
+
"@tanstack/react-query-persist-client": "5.100.6",
|
|
435
437
|
"better-auth": "1.6.9",
|
|
436
438
|
"class-variance-authority": "0.7.1",
|
|
437
439
|
"cmdk": "1.1.1",
|
|
438
|
-
"
|
|
440
|
+
"defu": "6.1.7",
|
|
441
|
+
"react-intlayer": "8.7.13",
|
|
439
442
|
"rollup-preserve-directives": "1.1.3",
|
|
440
|
-
"zod": "4.
|
|
443
|
+
"zod": "4.4.2"
|
|
441
444
|
},
|
|
442
445
|
"devDependencies": {
|
|
443
|
-
"@intlayer/backend": "8.7.
|
|
446
|
+
"@intlayer/backend": "8.7.13",
|
|
444
447
|
"@shikijs/transformers": "4.0.2",
|
|
445
448
|
"@storybook/addon-a11y": "8.6.14",
|
|
446
449
|
"@storybook/addon-essentials": "8.6.14",
|
|
@@ -457,7 +460,7 @@
|
|
|
457
460
|
"@storybook/theming": "8.6.14",
|
|
458
461
|
"@svgr/core": "8.1.0",
|
|
459
462
|
"@svgr/rollup": "8.1.0",
|
|
460
|
-
"@tailwindcss/cli": "4.2.
|
|
463
|
+
"@tailwindcss/cli": "4.2.4",
|
|
461
464
|
"@tailwindcss/vite": "4.2.4",
|
|
462
465
|
"@testing-library/jest-dom": "6.9.1",
|
|
463
466
|
"@testing-library/react": "16.3.2",
|
|
@@ -470,7 +473,7 @@
|
|
|
470
473
|
"@utils/ts-config-types": "1.0.4",
|
|
471
474
|
"clsx": "2.1.1",
|
|
472
475
|
"fast-glob": "3.3.3",
|
|
473
|
-
"intlayer": "8.7.
|
|
476
|
+
"intlayer": "8.7.13",
|
|
474
477
|
"rimraf": "6.1.3",
|
|
475
478
|
"shiki": "4.0.2",
|
|
476
479
|
"storybook": "8.6.17",
|
|
@@ -478,26 +481,26 @@
|
|
|
478
481
|
"tsdown": "0.21.10",
|
|
479
482
|
"typescript": "6.0.3",
|
|
480
483
|
"vite": "8.0.10",
|
|
481
|
-
"vite-intlayer": "8.7.
|
|
482
|
-
"vite-plugin-dts": "
|
|
484
|
+
"vite-intlayer": "8.7.13",
|
|
485
|
+
"vite-plugin-dts": "5.0.0",
|
|
483
486
|
"vitest": "4.1.5"
|
|
484
487
|
},
|
|
485
488
|
"peerDependencies": {
|
|
486
489
|
"@better-fetch/fetch": "1.1.21",
|
|
487
490
|
"@hookform/resolvers": "5.2.2",
|
|
488
|
-
"@intlayer/backend": "8.7.
|
|
491
|
+
"@intlayer/backend": "8.7.13",
|
|
489
492
|
"@monaco-editor/react": "4.7.0",
|
|
490
493
|
"@shikijs/transformers": "4.0.2",
|
|
491
|
-
"@tanstack/react-query": "5.100.
|
|
492
|
-
"@tanstack/react-query-devtools": "5.100.
|
|
494
|
+
"@tanstack/react-query": "5.100.9",
|
|
495
|
+
"@tanstack/react-query-devtools": "5.100.9",
|
|
493
496
|
"framer-motion": "12.38.0",
|
|
494
497
|
"fuse.js": "7.3.0",
|
|
495
|
-
"intlayer": "8.7.
|
|
496
|
-
"lucide-react": "1.
|
|
498
|
+
"intlayer": "8.7.13",
|
|
499
|
+
"lucide-react": "1.14.0",
|
|
497
500
|
"react": ">=16.0.0",
|
|
498
501
|
"react-dom": ">=16.0.0",
|
|
499
|
-
"react-hook-form": "7.
|
|
500
|
-
"react-intlayer": "8.7.
|
|
502
|
+
"react-hook-form": "7.75.0",
|
|
503
|
+
"react-intlayer": "8.7.13",
|
|
501
504
|
"shiki": "4.0.2",
|
|
502
505
|
"tailwindcss": "4.2.4"
|
|
503
506
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type ItemSelectorOrientation,\n useItemSelector,\n} from '@hooks/useItemSelector';\nimport { cn } from '@utils/cn';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type HTMLAttributes,\n type ReactNode,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nexport type SwitchSelectorChoice<T = boolean> = {\n content: ReactNode;\n value: T;\n} & HTMLAttributes<HTMLButtonElement>;\nexport type SwitchSelectorChoices<T> = SwitchSelectorChoice<T>[];\n\nconst defaultChoices: SwitchSelectorChoices<boolean> = [\n { content: 'Off', value: false },\n { content: 'On', value: true },\n];\n\nexport type SwitchSelectorProps<T = boolean> = {\n choices?: SwitchSelectorChoices<T>;\n value?: T;\n defaultValue?: T;\n onChange?: (choice: T) => void;\n className?: string;\n itemClassName?: string;\n hoverable?: boolean;\n disabled?: boolean;\n orientation?: ItemSelectorOrientation;\n} & VariantProps<typeof switchSelectorVariant> &\n VariantProps<typeof choiceVariant>;\n\nexport enum SwitchSelectorColor {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n DESTRUCTIVE = 'destructive',\n NEUTRAL = 'neutral',\n LIGHT = 'light',\n DARK = 'dark',\n TEXT = 'text',\n}\n\nconst switchSelectorVariant = cva(\n 'flex h-fit w-fit cursor-pointer gap-2 border-[1.3px] p-[1.5px]',\n {\n variants: {\n color: {\n [`${SwitchSelectorColor.PRIMARY}`]: 'border-primary text-primary',\n [`${SwitchSelectorColor.SECONDARY}`]: 'border-secondary text-secondary',\n [`${SwitchSelectorColor.DESTRUCTIVE}`]:\n 'border-destructive bg-destructive text-destructive',\n [`${SwitchSelectorColor.NEUTRAL}`]: 'border-neutral text-neutral',\n [`${SwitchSelectorColor.LIGHT}`]: 'border-white text-white',\n [`${SwitchSelectorColor.DARK}`]: 'border-neutral-800 text-neutral-800',\n [`${SwitchSelectorColor.TEXT}`]: 'border-text text-text',\n },\n orientation: {\n horizontal: 'flex-row rounded-full',\n vertical: 'flex-col rounded-2xl',\n },\n disabled: {\n true: 'cursor-not-allowed opacity-50',\n false: '',\n },\n },\n defaultVariants: {\n color: `${SwitchSelectorColor.PRIMARY}`,\n orientation: 'horizontal',\n disabled: false,\n },\n }\n);\n\nexport enum SwitchSelectorSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nconst choiceVariant = cva(\n 'z-1 w-full cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none',\n {\n variants: {\n size: {\n [`${SwitchSelectorSize.SM}`]: 'px-2 py-1 text-xs',\n [`${SwitchSelectorSize.MD}`]: 'p-2 text-sm',\n [`${SwitchSelectorSize.LG}`]: 'p-4 text-base',\n },\n orientation: {\n horizontal: 'flex-1',\n vertical: '',\n },\n },\n defaultVariants: {\n size: `${SwitchSelectorSize.MD}`,\n orientation: 'horizontal',\n },\n }\n);\n\nconst indicatorVariant = cva(\n 'absolute z-0 transition-all duration-300 ease-in-out motion-reduce:transition-none',\n {\n variants: {\n color: {\n [`${SwitchSelectorColor.PRIMARY}`]:\n 'bg-primary data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.SECONDARY}`]:\n 'bg-secondary data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.DESTRUCTIVE}`]:\n 'bg-destructive data-[indicator=true]:text-text',\n [`${SwitchSelectorColor.NEUTRAL}`]:\n 'bg-neutral data-[indicator=true]:text-white',\n [`${SwitchSelectorColor.LIGHT}`]:\n 'bg-white data-[indicator=true]:text-black',\n [`${SwitchSelectorColor.DARK}`]:\n 'bg-neutral-800 data-[indicator=true]:text-white',\n [`${SwitchSelectorColor.TEXT}`]:\n 'bg-text data-[indicator=true]:text-text-opposite',\n },\n orientation: {\n horizontal: 'top-0 h-full w-auto rounded-full',\n vertical: 'left-0 h-auto w-full rounded-xl',\n },\n },\n defaultVariants: {\n orientation: 'horizontal',\n },\n }\n);\n\n/**\n *\n * Component that allows the user to select one of the provided choices.\n *\n * Example:\n * ```jsx\n * <SwitchSelector\n * choices={[\n * { content: 'Option 1', value: 'option1' },\n * { content: 'Option 2', value: 'option2' },\n * { content: 'Option 3', value: 'option3' },\n * ]}\n * value=\"option1\"\n * onChange={(choice) => console.log(choice)}\n * />\n * ```\n */\nexport const SwitchSelector = <T,>({\n choices = defaultChoices as SwitchSelectorChoices<T>,\n value,\n defaultValue,\n onChange,\n color = SwitchSelectorColor.PRIMARY,\n size = SwitchSelectorSize.MD,\n className,\n itemClassName,\n hoverable = true,\n disabled = false,\n orientation = 'horizontal',\n}: SwitchSelectorProps<T>) => {\n const [valueState, setValue] = useState<T>(\n value ?? defaultValue ?? choices[0].value\n );\n const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);\n\n const optionsRefs = useRef<HTMLButtonElement[]>([]);\n const indicatorRef = useRef<HTMLDivElement | null>(null);\n const { choiceIndicatorPosition } = useItemSelector(optionsRefs, {\n selector: (el) => el.getAttribute('data-indicator') === 'true',\n isHoverable: false,\n orientation,\n });\n\n const selectedIndex = choices.findIndex(\n (choice) => choice.value === valueState\n );\n\n // The indicator follows hover if hoverable, otherwise the selected option\n const indicatorIndex =\n hoverable && hoveredIndex !== null ? hoveredIndex : selectedIndex;\n\n const handleChange = (newValue: T) => {\n setValue(newValue);\n onChange?.(newValue);\n };\n\n useEffect(() => {\n if (value === undefined) return;\n setValue(value);\n }, [value]);\n\n return (\n <div\n className={switchSelectorVariant({\n color,\n disabled,\n orientation,\n className,\n })}\n role=\"tablist\"\n aria-disabled={disabled ? 'true' : undefined}\n >\n <div\n className={cn(\n 'relative flex w-full items-center justify-center',\n orientation === 'horizontal' ? 'h-full flex-row' : 'h-fit flex-col'\n )}\n >\n {choices.map((choice, index) => {\n const { content, value, ...buttonProps } = choice;\n\n const isKeyOfKey =\n typeof value === 'string' || typeof value === 'number';\n\n const isSelected = index === selectedIndex;\n const isIndicatorOwner = index === indicatorIndex;\n\n return (\n <button\n {...buttonProps}\n className={cn(\n choiceVariant({\n size,\n orientation,\n }),\n disabled && 'cursor-not-allowed',\n itemClassName\n )}\n key={isKeyOfKey ? value : index}\n role=\"tab\"\n onClick={() => handleChange(value)}\n aria-selected={isSelected ? 'true' : undefined}\n data-indicator={isIndicatorOwner ? 'true' : undefined}\n disabled={disabled || isSelected}\n tabIndex={isSelected ? 0 : -1}\n ref={(el) => {\n optionsRefs.current[index] = el!;\n }}\n onMouseEnter={() => !disabled && setHoveredIndex(index)}\n onMouseLeave={() => !disabled && setHoveredIndex(null)}\n >\n {content}\n </button>\n );\n })}\n\n {choiceIndicatorPosition && (\n <div\n className={cn(\n indicatorVariant({\n color,\n orientation,\n })\n )}\n style={choiceIndicatorPosition}\n ref={indicatorRef}\n />\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;AAsBA,MAAM,iBAAiD,CACrD;CAAE,SAAS;CAA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"version":3,"file":"index.d.ts","names":[],"sources":["../../../../src/components/SwitchSelector/index.tsx"],"mappings":";;;;;;;KAgBY,oBAAA;EACV,OAAA,EAAS,SAAA;EACT,KAAA,EAAO,CAAA;AAAA,IACL,cAAA,CAAe,iBAAA;AAAA,KACP,qBAAA,MAA2B,oBAAA,CAAqB,CAAA;AAAA,KAOhD,mBAAA;EACV,OAAA,GAAU,qBAAA,CAAsB,CAAA;EAChC,KAAA,GAAQ,CAAA;EACR,YAAA,GAAe,CAAA;EACf,QAAA,IAAY,MAAA,EAAQ,CAAA;EACpB,SAAA;EACA,aAAA;EACA,SAAA;EACA,QAAA;EACA,WAAA,GAAc,uBAAA;AAAA,IACZ,YAAA,QAAoB,qBAAA,IACtB,YAAA,QAAoB,aAAA;AAAA,aAEV,mBAAA;EACV,OAAA;EACA,SAAA;EACA,WAAA;EACA,OAAA;EACA,KAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,cAGI,qBAAA,GAAqB,KAAA;;;;IA6B1B,iCAAA,CAAA,SAAA;AAAA,aAEW,kBAAA;EACV,EAAA;EACA,EAAA;EACA,EAAA;AAAA;AAAA,cAGI,aAAA,GAAa,KAAA;;;IAmBlB,iCAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;cAkDY,cAAA;EAAsB,OAAA;EAAA,KAAA;EAAA,YAAA;EAAA,QAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,aAAA;EAAA,SAAA;EAAA,QAAA;EAAA;AAAA,GAYhC,mBAAA,CAAoB,CAAA,MAAE,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|