gd-design-library 1.0.2 → 1.2.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/README.md +2 -2
- package/ai/README.md +210 -16
- package/ai/schemas/components/Accordion.d.ts +84 -0
- package/ai/schemas/components/Button.d.ts +12 -0
- package/ai/schemas/components/ChatContainer.d.ts +0 -8
- package/ai/schemas/components/Column.d.ts +5 -5
- package/ai/schemas/components/InputFile.d.ts +17 -5
- package/ai/schemas/components/Menu.d.ts +37 -0
- package/ai/schemas/components/Row.d.ts +6 -6
- package/ai/schemas/components/Scroll.d.ts +7 -0
- package/ai/schemas/components/Typography.d.ts +0 -21
- package/assets/icons/account_circle.d.ts +1 -3
- package/assets/icons/account_circle.js +7 -14
- package/assets/icons/arrow-down.d.ts +2 -3
- package/assets/icons/arrow-down.js +6 -11
- package/assets/icons/arrow-forward.d.ts +1 -3
- package/assets/icons/arrow-forward.js +6 -13
- package/assets/icons/attachment.d.ts +1 -3
- package/assets/icons/attachment.js +7 -14
- package/assets/icons/check.d.ts +1 -3
- package/assets/icons/check.js +5 -11
- package/assets/icons/chevron-left.d.ts +1 -3
- package/assets/icons/chevron-left.js +7 -14
- package/assets/icons/chevron-right.d.ts +1 -3
- package/assets/icons/chevron-right.js +6 -13
- package/assets/icons/content-copy.d.ts +1 -3
- package/assets/icons/content-copy.js +7 -14
- package/assets/icons/delete_outlined.d.ts +1 -3
- package/assets/icons/delete_outlined.js +5 -12
- package/assets/icons/dot.d.ts +1 -3
- package/assets/icons/dot.js +5 -11
- package/assets/icons/error_outline.d.ts +1 -4
- package/assets/icons/error_outline.js +6 -18
- package/assets/icons/eye.d.ts +1 -3
- package/assets/icons/eye.js +7 -14
- package/assets/icons/file-copy.d.ts +1 -3
- package/assets/icons/file-copy.js +7 -13
- package/assets/icons/filter.d.ts +1 -3
- package/assets/icons/filter.js +6 -13
- package/assets/icons/folder.d.ts +1 -3
- package/assets/icons/folder.js +6 -13
- package/assets/icons/folderOpen.d.ts +1 -3
- package/assets/icons/folderOpen.js +7 -14
- package/assets/icons/home.d.ts +1 -3
- package/assets/icons/home.js +6 -13
- package/assets/icons/local_shipping.d.ts +1 -3
- package/assets/icons/local_shipping.js +4 -11
- package/assets/icons/minus.d.ts +1 -3
- package/assets/icons/minus.js +7 -13
- package/assets/icons/mobile_menu_button.d.ts +1 -3
- package/assets/icons/mobile_menu_button.js +7 -14
- package/assets/icons/paymentCard.d.ts +1 -3
- package/assets/icons/paymentCard.js +6 -13
- package/assets/icons/plus.d.ts +1 -3
- package/assets/icons/plus.js +5 -11
- package/assets/icons/portrait.d.ts +1 -3
- package/assets/icons/portrait.js +5 -12
- package/assets/icons/processing.d.ts +1 -3
- package/assets/icons/processing.js +6 -13
- package/assets/icons/ruler.d.ts +1 -3
- package/assets/icons/ruler.js +6 -13
- package/assets/icons/search.d.ts +1 -3
- package/assets/icons/search.js +6 -13
- package/assets/icons/shopping_bag.d.ts +1 -3
- package/assets/icons/shopping_bag.js +7 -14
- package/assets/icons/slash.d.ts +1 -3
- package/assets/icons/slash.js +6 -13
- package/assets/icons/star.d.ts +1 -3
- package/assets/icons/star.js +6 -12
- package/assets/icons/starOutlined.d.ts +1 -3
- package/assets/icons/starOutlined.js +5 -11
- package/assets/icons/toast_error.d.ts +1 -3
- package/assets/icons/toast_error.js +9 -15
- package/assets/icons/toast_info.d.ts +1 -3
- package/assets/icons/toast_info.js +7 -13
- package/assets/icons/toast_warning.d.ts +1 -3
- package/assets/icons/toast_warning.js +7 -13
- package/assets/icons/upload.d.ts +1 -3
- package/assets/icons/upload.js +6 -13
- package/assets/icons/volume-up.d.ts +1 -3
- package/assets/icons/volume-up.js +6 -13
- package/assets/icons/wifiTethering.d.ts +1 -3
- package/assets/icons/wifiTethering.js +4 -11
- package/components/core/Button/Button.js +30 -27
- package/components/core/Button/Button.types.d.ts +2 -2
- package/components/core/Button/ButtonStyled.js +40 -39
- package/components/core/Dropdown/Dropdown.d.ts +1 -1
- package/components/core/Dropdown/Dropdown.js +16 -16
- package/components/core/Dropdown/Dropdown.types.d.ts +3 -3
- package/components/core/Dropdown/DropdownStyled.js +13 -14
- package/components/core/Icon/Icon.js +41 -33
- package/components/core/Icon/Icon.types.d.ts +2 -1
- package/components/core/Icon/constants.d.ts +37 -109
- package/components/core/Input/Input.d.ts +1 -1
- package/components/core/InputFile/InputFile.d.ts +0 -32
- package/components/core/InputFile/InputFile.js +47 -33
- package/components/core/InputFile/InputFileStyled.js +24 -22
- package/components/core/Loader/Loader.js +19 -17
- package/components/core/Loader/Loader.types.d.ts +3 -1
- package/components/core/Loader/LoaderStyled.js +34 -30
- package/components/core/Menu/Menu.d.ts +2 -2
- package/components/core/Menu/Menu.js +113 -93
- package/components/core/Menu/Menu.types.d.ts +16 -11
- package/components/core/Menu/MenuStyled.d.ts +1 -1
- package/components/core/Menu/constants.js +4 -12
- package/components/core/Modal/Modal.js +60 -36
- package/components/core/Modal/ModalStyled.js +21 -22
- package/components/core/Scroll/Scroll.d.ts +6 -0
- package/components/core/Scroll/Scroll.js +53 -31
- package/components/core/Scroll/Scroll.types.d.ts +5 -0
- package/components/core/Scroll/ScrollBar.js +45 -43
- package/components/core/Scroll/ScrollStyled.js +46 -42
- package/components/core/Scroll/constants.d.ts +2 -0
- package/components/core/Scroll/constants.js +6 -4
- package/components/core/Select/Select.js +162 -134
- package/components/core/Select/Select.types.d.ts +2 -4
- package/components/core/Snackbar/Snackbar.js +60 -37
- package/components/core/Snackbar/Snackbar.types.d.ts +1 -2
- package/components/core/Snackbar/SnackbarManager.js +45 -30
- package/components/core/Snackbar/SnackbarStyled.d.ts +5 -5
- package/components/core/Snackbar/SnackbarStyled.js +111 -101
- package/components/core/Textarea/Textarea.d.ts +4 -0
- package/components/core/Tooltip/Tooltip.js +68 -44
- package/components/core/Tooltip/TooltipStyled.js +26 -27
- package/components/core/Tooltip/utils.js +47 -45
- package/components/core/Typography/Typography.js +18 -18
- package/components/core/Typography/Typography.types.d.ts +3 -3
- package/components/core/Typography/TypographyStyled.js +28 -29
- package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
- package/components/domainSpecific/Accordion/Accordion.js +19 -17
- package/components/domainSpecific/Accordion/Accordion.types.d.ts +7 -4
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +13 -12
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +15 -14
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
- package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +18 -16
- package/components/domainSpecific/Accordion/AccordionStyled.js +44 -35
- package/components/domainSpecific/Card/Card.js +31 -27
- package/components/domainSpecific/Card/CardTitle/constants.js +4 -4
- package/components/domainSpecific/Header/Header.js +4 -4
- package/components/domainSpecific/SearchModal/SearchModal.js +0 -1
- package/components/domainSpecific/SearchModal/SearchModal.types.d.ts +1 -1
- package/components/index.types.d.ts +1 -0
- package/components/layout/ChatContainer/ChatContainer.d.ts +1 -1
- package/components/layout/ChatContainer/ChatContainer.js +58 -41
- package/components/layout/ChatContainer/ChatContainer.types.d.ts +8 -5
- package/components/layout/ChatContainer/ChatContainerStyled.d.ts +2 -0
- package/components/layout/ChatContainer/ChatContainerStyled.js +105 -84
- package/components/layout/Column/Column.types.d.ts +3 -1
- package/components/layout/Column/ColumnStyled.js +23 -23
- package/components/layout/FlexContainer/FlexContainerStyled.js +7 -8
- package/components/layout/Row/Row.d.ts +1 -1
- package/components/layout/Row/Row.js +20 -20
- package/components/layout/Row/Row.types.d.ts +3 -1
- package/components/layout/Row/RowStyled.js +26 -26
- package/constants/index.d.ts +0 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/useLogger/NoOpLogger.d.ts +11 -0
- package/hooks/useLogger/NoOpLogger.js +15 -0
- package/hooks/useLogger/index.d.ts +2 -0
- package/hooks/useLogger/useLogger.d.ts +4 -0
- package/hooks/useLogger/useLogger.js +27 -0
- package/hooks/useLogger/useLogger.types.d.ts +30 -0
- package/hooks/useTheme/NoOpTheme.d.ts +4050 -0
- package/hooks/useTheme/NoOpTheme.js +15 -0
- package/hooks/useTheme/useTheme.d.ts +3 -4
- package/hooks/useTheme/useTheme.js +62 -41
- package/hooks/useTheme/useTheme.types.d.ts +3 -2
- package/index.d.ts +4 -0
- package/index.js +354 -350
- package/llms.txt +39 -19
- package/package.json +1 -1
- package/tokens/accordion.d.ts +9 -3
- package/tokens/accordion.js +14 -11
- package/tokens/button.d.ts +17 -19
- package/tokens/button.js +54 -56
- package/tokens/card.d.ts +2 -3
- package/tokens/card.js +50 -53
- package/tokens/carousel.d.ts +2 -2
- package/tokens/carousel.js +8 -9
- package/tokens/chat.d.ts +69 -48
- package/tokens/chat.js +86 -68
- package/tokens/constants.d.ts +0 -1
- package/tokens/constants.js +1 -1
- package/tokens/defaultTheme.d.ts +199 -112
- package/tokens/defaultTheme.js +27 -25
- package/tokens/header.d.ts +1 -1
- package/tokens/header.js +3 -4
- package/tokens/index.d.ts +175 -104
- package/tokens/index.js +102 -101
- package/tokens/input.d.ts +2 -2
- package/tokens/input.js +25 -26
- package/tokens/inputfile.d.ts +1 -1
- package/tokens/inputfile.js +4 -4
- package/tokens/link.d.ts +5 -0
- package/tokens/loader.d.ts +3 -0
- package/tokens/loader.js +3 -0
- package/tokens/menu.d.ts +1 -0
- package/tokens/menu.js +1 -0
- package/tokens/modal.d.ts +6 -4
- package/tokens/modal.js +42 -60
- package/tokens/scroll.d.ts +19 -2
- package/tokens/scroll.js +23 -7
- package/tokens/select.d.ts +9 -7
- package/tokens/select.js +30 -29
- package/tokens/snackbar.d.ts +36 -20
- package/tokens/snackbar.js +92 -93
- package/tokens/stepper.d.ts +1 -1
- package/tokens/stepper.js +3 -3
- package/tokens/tabs.d.ts +1 -1
- package/tokens/tabs.js +1 -1
- package/tokens/textarea.d.ts +4 -0
- package/tokens/tooltip.d.ts +5 -1
- package/tokens/tooltip.js +23 -21
- package/tokens/typography.js +114 -116
- package/tokens/values.d.ts +5 -1
- package/tokens/values.js +12 -8
- package/tokens/wrapper.d.ts +2 -2
- package/tokens/wrapper.js +7 -7
- package/tokens/zIndex.d.ts +9 -0
- package/tokens/zIndex.js +12 -0
- package/types/index.d.ts +0 -1
- package/types/styles.d.ts +1 -0
- package/utils/helpers.js +14 -15
- package/CHANGELOG.md +0 -177
- package/constants/positioning.d.ts +0 -9
- package/constants/positioning.js +0 -11
- package/types/chat.d.ts +0 -5
- package/types/chat.js +0 -4
|
@@ -1,57 +1,74 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import { jsxs as l, jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as N, useRef as I, useState as W, useCallback as $, useImperativeHandle as j } from "react";
|
|
4
4
|
import { COMPONENT_NAME as t } from "./constants.js";
|
|
5
|
-
import { MainWrapperStyled as
|
|
6
|
-
import {
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import {
|
|
9
|
-
import { get as
|
|
10
|
-
|
|
5
|
+
import { MainWrapperStyled as B, SidebarWrapperStyled as D, SidebarStyled as E, SidebarHeaderStyled as H, SidebarToggleButtonStyled as y, SidebarContentWrapperStyled as P, SidebarMinifiedStyled as v, BodyStyled as A, MainHeaderStyled as L, ContentStyled as Q } from "./ChatContainerStyled.js";
|
|
6
|
+
import { useMediaQuery as _ } from "../../../hooks/useMediaQuery/useMediaQuery.js";
|
|
7
|
+
import { useTheme as q } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
import { useLogger as z } from "../../../hooks/useLogger/useLogger.js";
|
|
9
|
+
import { get as p } from "../../../utils/helpers.js";
|
|
10
|
+
import { Icon as b } from "../../core/Icon/Icon.js";
|
|
11
|
+
const F = N(({
|
|
12
|
+
sidebarContent: g,
|
|
13
|
+
headerContent: m,
|
|
14
|
+
children: S,
|
|
15
|
+
isOpen: w,
|
|
16
|
+
sidebarHeaderContent: u,
|
|
17
|
+
sidebarMinifiedContent: f,
|
|
18
|
+
onToggleSidebar: i,
|
|
19
|
+
styles: C = {},
|
|
20
|
+
showSidebarAsideControl: k = !0,
|
|
21
|
+
showSidebarHeaderControl: M = !0,
|
|
22
|
+
...O
|
|
23
|
+
}, x) => {
|
|
11
24
|
const {
|
|
12
|
-
sidebarContent: y,
|
|
13
|
-
headerContent: s,
|
|
14
|
-
children: b,
|
|
15
|
-
isOpen: g = !0,
|
|
16
|
-
sidebarHeaderContent: l,
|
|
17
|
-
onToggleSidebar: d,
|
|
18
|
-
styles: C = {},
|
|
19
|
-
variant: $ = B.Auto,
|
|
20
|
-
...w
|
|
21
|
-
} = S, {
|
|
22
25
|
theme: e
|
|
23
|
-
} =
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
} = q(), n = z(), h = I(null), [r, o] = W(w), s = _(`(max-width: ${p(e, "values.screenMedium", "768px")})`), c = $(() => {
|
|
27
|
+
const a = !r;
|
|
28
|
+
n.debug(`${t}: Toggle triggered (user interaction)`, {
|
|
29
|
+
isOpen: a
|
|
30
|
+
}), o(a), i == null || i(a);
|
|
31
|
+
}, [r, i, n]), R = $((a) => {
|
|
32
|
+
s && r && a.target === a.currentTarget && (n.debug(`${t}: Sidebar wrapper clicked (mobile close)`, {
|
|
33
|
+
isMobile: s,
|
|
34
|
+
wasOpen: r
|
|
35
|
+
}), o(!1), i == null || i(!1));
|
|
36
|
+
}, [s, r]);
|
|
37
|
+
return j(x, () => ({
|
|
38
|
+
ref: h,
|
|
39
|
+
isOpen: r,
|
|
40
|
+
open: () => {
|
|
41
|
+
n.debug(`${t}: Ref method called - open()`), o(!0);
|
|
42
|
+
},
|
|
43
|
+
close: () => {
|
|
44
|
+
n.debug(`${t}: Ref method called - close()`), o(!1);
|
|
45
|
+
},
|
|
46
|
+
toggle: () => {
|
|
47
|
+
n.debug(`${t}: Ref method called - toggle()`), c();
|
|
48
|
+
}
|
|
49
|
+
})), /* @__PURE__ */ l(B, { className: "gd-chat-container", "data-testid": `${t}-main-wrapper`, theme: e, ref: h, ...O, styles: C, children: [
|
|
50
|
+
/* @__PURE__ */ d(D, { theme: e, "data-testid": `${t}-sidebar-wrapper`, $open: r, onClick: R, children: /* @__PURE__ */ l(E, { theme: e, "data-testid": `${t}-sidebar`, $open: r, onClick: (a) => a.stopPropagation(), children: [
|
|
51
|
+
u ? /* @__PURE__ */ l(H, { theme: e, "data-testid": `${t}-sidebar-header`, children: [
|
|
52
|
+
k && /* @__PURE__ */ d(y, { theme: e, onClick: c, $open: r, children: /* @__PURE__ */ d(b, { ...p(e, "chat.toggleIcon", {
|
|
37
53
|
name: "arrowDown"
|
|
38
54
|
}) }) }),
|
|
39
|
-
|
|
55
|
+
u
|
|
40
56
|
] }) : null,
|
|
41
|
-
|
|
57
|
+
/* @__PURE__ */ d(P, { theme: e, children: g })
|
|
42
58
|
] }) }),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
f && /* @__PURE__ */ d(v, { theme: e, "data-testid": `${t}-sidebar-minified`, $open: !r, children: f }),
|
|
60
|
+
/* @__PURE__ */ l(A, { theme: e, "data-testid": `${t}-body`, children: [
|
|
61
|
+
m ? /* @__PURE__ */ l(L, { theme: e, "data-testid": `${t}-main-header`, children: [
|
|
62
|
+
!r && M && /* @__PURE__ */ d(y, { theme: e, onClick: c, children: /* @__PURE__ */ d(b, { ...p(e, "chat.toggleIcon", {
|
|
46
63
|
name: "arrowDown"
|
|
47
64
|
}) }) }),
|
|
48
|
-
|
|
65
|
+
m
|
|
49
66
|
] }) : null,
|
|
50
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ d(Q, { theme: e, "data-testid": `${t}-content`, children: S })
|
|
51
68
|
] })
|
|
52
69
|
] });
|
|
53
70
|
});
|
|
54
|
-
|
|
71
|
+
F.displayName = t;
|
|
55
72
|
export {
|
|
56
|
-
|
|
73
|
+
F as ChatContainer
|
|
57
74
|
};
|
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { EnumOrPrimitive, ChatLayoutVariant } from '../../../types';
|
|
3
2
|
import { CommonCssComponentProps, CommonCssComponentStyledProps } from '../..';
|
|
4
3
|
export interface ChatContainerProps extends PropsWithChildren<CommonCssComponentProps> {
|
|
5
4
|
sidebarContent?: ReactNode;
|
|
5
|
+
sidebarMinifiedContent?: ReactNode;
|
|
6
6
|
sidebarHeaderContent?: ReactNode;
|
|
7
7
|
headerContent?: ReactNode;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
isOpen?: boolean;
|
|
10
|
-
|
|
10
|
+
showSidebarAsideControl?: boolean;
|
|
11
|
+
showSidebarHeaderControl?: boolean;
|
|
11
12
|
onToggleSidebar?: (open: boolean) => void;
|
|
12
13
|
}
|
|
13
14
|
export interface ChatContainerRef {
|
|
14
|
-
isOpen
|
|
15
|
+
isOpen?: boolean;
|
|
15
16
|
open: () => void;
|
|
16
17
|
close: () => void;
|
|
17
18
|
toggle: () => void;
|
|
18
19
|
}
|
|
19
|
-
export
|
|
20
|
+
export interface ChatCommonStyledProps extends PropsWithChildren<CommonCssComponentStyledProps> {
|
|
21
|
+
$open?: boolean;
|
|
22
|
+
}
|
|
20
23
|
export interface SidebarWrapperStyledProps extends CommonCssComponentStyledProps {
|
|
21
|
-
$
|
|
24
|
+
$open?: boolean;
|
|
22
25
|
}
|
|
23
26
|
export interface SidebarToggleButtonStyledProps extends CommonCssComponentStyledProps<HTMLButtonElement> {
|
|
24
27
|
$open?: boolean;
|
|
@@ -4,6 +4,8 @@ export declare const MainHeaderStyled: (props: ChatCommonStyledProps) => import(
|
|
|
4
4
|
export declare const BodyStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const SidebarWrapperStyled: (props: SidebarWrapperStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const SidebarStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const SidebarMinifiedStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
8
|
export declare const SidebarHeaderStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const SidebarContentWrapperStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
10
|
export declare const ContentStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
11
|
export declare const SidebarToggleButtonStyled: (props: SidebarToggleButtonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,133 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
1
|
+
import { jsx as p } from "@emotion/react/jsx-runtime";
|
|
3
2
|
import { forwardRef as P } from "react";
|
|
4
|
-
import { getBoxStyles as
|
|
5
|
-
import { get as
|
|
6
|
-
import { ButtonVariant as
|
|
7
|
-
import { Button as
|
|
3
|
+
import { getBoxStyles as m, tokensHandler as i, getMediaQuery as S } from "../../../tokens/utils.js";
|
|
4
|
+
import { get as t } from "../../../utils/helpers.js";
|
|
5
|
+
import { ButtonVariant as b } from "../../../types/button.js";
|
|
6
|
+
import { Button as u } from "../../core/Button/Button.js";
|
|
8
7
|
const N = P((n, s) => {
|
|
9
8
|
const {
|
|
10
9
|
theme: {
|
|
11
|
-
chat:
|
|
12
|
-
...
|
|
10
|
+
chat: e,
|
|
11
|
+
...c
|
|
13
12
|
} = {},
|
|
14
|
-
styles:
|
|
15
|
-
...
|
|
13
|
+
styles: o = {},
|
|
14
|
+
...r
|
|
16
15
|
} = n, {
|
|
17
|
-
boxStyles:
|
|
18
|
-
restProps:
|
|
19
|
-
} =
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
}),
|
|
16
|
+
boxStyles: d,
|
|
17
|
+
restProps: a
|
|
18
|
+
} = m(r), l = new Proxy(e || {}, i(c)), y = [t(l, "wrapper.default", {}), d, o];
|
|
19
|
+
return /* @__PURE__ */ p("div", { css: y, ...a, ref: s });
|
|
20
|
+
}), W = (n) => {
|
|
22
21
|
const {
|
|
23
22
|
theme: {
|
|
24
23
|
chat: s,
|
|
25
|
-
...
|
|
24
|
+
...e
|
|
26
25
|
} = {},
|
|
27
|
-
...
|
|
26
|
+
...c
|
|
28
27
|
} = n, {
|
|
29
|
-
boxStyles:
|
|
30
|
-
restProps:
|
|
31
|
-
} =
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
},
|
|
28
|
+
boxStyles: o,
|
|
29
|
+
restProps: r
|
|
30
|
+
} = m(c), d = new Proxy(s || {}, i(e)), a = [t(d, "mainHeader", {}), o];
|
|
31
|
+
return /* @__PURE__ */ p("header", { css: a, ...r });
|
|
32
|
+
}, M = (n) => {
|
|
34
33
|
const {
|
|
35
34
|
theme: {
|
|
36
35
|
chat: s,
|
|
37
|
-
...
|
|
36
|
+
...e
|
|
38
37
|
} = {},
|
|
39
|
-
...
|
|
38
|
+
...c
|
|
40
39
|
} = n, {
|
|
41
|
-
boxStyles:
|
|
42
|
-
restProps:
|
|
43
|
-
} =
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
},
|
|
40
|
+
boxStyles: o,
|
|
41
|
+
restProps: r
|
|
42
|
+
} = m(c), d = new Proxy(s || {}, i(e)), a = [t(d, "body", {}), o];
|
|
43
|
+
return /* @__PURE__ */ p("div", { css: a, ...r });
|
|
44
|
+
}, k = (n) => {
|
|
46
45
|
const {
|
|
47
46
|
theme: {
|
|
48
47
|
chat: s,
|
|
49
|
-
...
|
|
48
|
+
...e
|
|
50
49
|
} = {},
|
|
51
|
-
$
|
|
52
|
-
...
|
|
50
|
+
$open: c,
|
|
51
|
+
...o
|
|
53
52
|
} = n, {
|
|
54
|
-
boxStyles:
|
|
55
|
-
restProps:
|
|
56
|
-
} =
|
|
57
|
-
max: e
|
|
58
|
-
},
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
-
},
|
|
53
|
+
boxStyles: r,
|
|
54
|
+
restProps: d
|
|
55
|
+
} = m(o), a = new Proxy(s || {}, i(e)), l = [t(a, "sidebarWrapper.default", {}), t(a, c ? "sidebarWrapper.open" : "sidebarWrapper.close", {}), S({
|
|
56
|
+
max: t(e, "breakpoints.md")
|
|
57
|
+
}, t(s, ["sidebarWrapper", "md"], (y) => ({}))(e)), r];
|
|
58
|
+
return /* @__PURE__ */ p("div", { css: l, ...d });
|
|
59
|
+
}, v = (n) => {
|
|
61
60
|
const {
|
|
62
61
|
theme: {
|
|
63
62
|
chat: s,
|
|
64
|
-
...
|
|
63
|
+
...e
|
|
65
64
|
} = {},
|
|
66
|
-
|
|
65
|
+
$open: c,
|
|
66
|
+
...o
|
|
67
67
|
} = n, {
|
|
68
|
-
boxStyles:
|
|
69
|
-
restProps:
|
|
70
|
-
} =
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
},
|
|
68
|
+
boxStyles: r,
|
|
69
|
+
restProps: d
|
|
70
|
+
} = m(o), a = new Proxy(s || {}, i(e)), l = [t(a, "sidebar.default", {}), t(a, c ? "sidebar.open" : "sidebar.close", {}), r];
|
|
71
|
+
return /* @__PURE__ */ p("aside", { css: l, ...d });
|
|
72
|
+
}, H = (n) => {
|
|
73
73
|
const {
|
|
74
74
|
theme: {
|
|
75
75
|
chat: s,
|
|
76
|
-
...
|
|
76
|
+
...e
|
|
77
77
|
} = {},
|
|
78
|
-
|
|
78
|
+
$open: c,
|
|
79
|
+
...o
|
|
80
|
+
} = n, r = new Proxy(s || {}, i(e)), d = [t(r, "sidebarMinified.default", {}), t(r, c ? "sidebarMinified.open" : "sidebarMinified.close", {})];
|
|
81
|
+
return /* @__PURE__ */ p("aside", { css: d, ...o });
|
|
82
|
+
}, $ = (n) => {
|
|
83
|
+
const {
|
|
84
|
+
theme: {
|
|
85
|
+
chat: s,
|
|
86
|
+
...e
|
|
87
|
+
} = {},
|
|
88
|
+
...c
|
|
79
89
|
} = n, {
|
|
80
|
-
boxStyles:
|
|
81
|
-
restProps:
|
|
82
|
-
} =
|
|
83
|
-
return /* @__PURE__ */
|
|
90
|
+
boxStyles: o,
|
|
91
|
+
restProps: r
|
|
92
|
+
} = m(c), d = new Proxy(s || {}, i(e)), a = [t(d, "sidebarHeader", {}), t(d, "sidebar.open", {}), o];
|
|
93
|
+
return /* @__PURE__ */ p("header", { css: a, ...r });
|
|
84
94
|
}, T = (n) => {
|
|
85
95
|
const {
|
|
86
96
|
theme: {
|
|
87
97
|
chat: s,
|
|
88
|
-
...
|
|
98
|
+
...e
|
|
89
99
|
} = {},
|
|
90
|
-
styles: r = {},
|
|
91
100
|
...c
|
|
101
|
+
} = n, o = new Proxy(s || {}, i(e)), r = [t(o, "sidebarContentWrapper", {}), t(o, "sidebar.open", {})];
|
|
102
|
+
return /* @__PURE__ */ p("div", { css: r, ...c });
|
|
103
|
+
}, j = (n) => {
|
|
104
|
+
const {
|
|
105
|
+
theme: {
|
|
106
|
+
chat: s,
|
|
107
|
+
...e
|
|
108
|
+
} = {},
|
|
109
|
+
styles: c = {},
|
|
110
|
+
...o
|
|
92
111
|
} = n, {
|
|
93
|
-
boxStyles:
|
|
94
|
-
restProps:
|
|
95
|
-
} =
|
|
96
|
-
max: e
|
|
97
|
-
},
|
|
98
|
-
min: e
|
|
99
|
-
max: e
|
|
100
|
-
},
|
|
101
|
-
min: e
|
|
102
|
-
},
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
},
|
|
112
|
+
boxStyles: r,
|
|
113
|
+
restProps: d
|
|
114
|
+
} = m(o), a = new Proxy(s || {}, i(e)), l = [t(a, "content.default", {}), S({
|
|
115
|
+
max: t(e, "breakpoints.md")
|
|
116
|
+
}, t(s, "content.md", {})), S({
|
|
117
|
+
min: t(e, "breakpoints.md"),
|
|
118
|
+
max: t(e, "breakpoints.xl")
|
|
119
|
+
}, t(s, "content.mdXl", {})), S({
|
|
120
|
+
min: t(e, "breakpoints.xl")
|
|
121
|
+
}, t(s, "content.xl", {})), r, c];
|
|
122
|
+
return /* @__PURE__ */ p("main", { css: l, ...d });
|
|
123
|
+
}, I = (n) => {
|
|
105
124
|
const {
|
|
106
125
|
theme: {
|
|
107
126
|
chat: s,
|
|
108
|
-
...
|
|
127
|
+
...e
|
|
109
128
|
} = {},
|
|
110
|
-
$open:
|
|
111
|
-
...
|
|
129
|
+
$open: c,
|
|
130
|
+
...o
|
|
112
131
|
} = n, {
|
|
113
|
-
boxStyles:
|
|
114
|
-
restProps:
|
|
115
|
-
} =
|
|
116
|
-
variant:
|
|
132
|
+
boxStyles: r,
|
|
133
|
+
restProps: d
|
|
134
|
+
} = m(o), a = new Proxy(s || {}, i(e)), l = c ? t(a, "toggleButton.open") : {}, y = t(a, "toggleButton.attrs", {
|
|
135
|
+
variant: b.Text
|
|
117
136
|
}), h = {
|
|
118
|
-
...
|
|
119
|
-
...
|
|
120
|
-
...
|
|
137
|
+
...t(a, "toggleButton.default"),
|
|
138
|
+
...l,
|
|
139
|
+
...r
|
|
121
140
|
};
|
|
122
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ p(u, { ...y, ...d, isIcon: !0, styles: h });
|
|
123
142
|
};
|
|
124
143
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
144
|
+
M as BodyStyled,
|
|
145
|
+
j as ContentStyled,
|
|
146
|
+
W as MainHeaderStyled,
|
|
128
147
|
N as MainWrapperStyled,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
148
|
+
T as SidebarContentWrapperStyled,
|
|
149
|
+
$ as SidebarHeaderStyled,
|
|
150
|
+
H as SidebarMinifiedStyled,
|
|
151
|
+
v as SidebarStyled,
|
|
152
|
+
I as SidebarToggleButtonStyled,
|
|
153
|
+
k as SidebarWrapperStyled
|
|
133
154
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { ElementType, PropsWithChildren } from 'react';
|
|
2
2
|
import { BoxCssComponentProps, BoxCssComponentStyledProps, FlexElementProps, FlexElementStyledProps } from '../..';
|
|
3
3
|
export interface ColumnProps extends BoxCssComponentProps, FlexElementProps, PropsWithChildren {
|
|
4
|
+
as?: keyof HTMLElementTagNameMap | ElementType;
|
|
4
5
|
}
|
|
5
6
|
export interface ColumnStyledProps extends BoxCssComponentStyledProps, FlexElementStyledProps, PropsWithChildren {
|
|
7
|
+
as?: keyof HTMLElementTagNameMap | ElementType;
|
|
6
8
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { calculateGutter as w, calculateJustify as P, calculateAlign as j } from "../../../utils/layout.js";
|
|
1
|
+
import { jsx as g } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as $ } from "react";
|
|
3
|
+
import { getBoxStyles as S, tokensHandler as w } from "../../../tokens/utils.js";
|
|
4
|
+
import { calculateGutter as C, calculateJustify as P, calculateAlign as j } from "../../../utils/layout.js";
|
|
6
5
|
import { get as v } from "../../../utils/helpers.js";
|
|
7
|
-
const
|
|
6
|
+
const A = $((e, o) => {
|
|
8
7
|
const {
|
|
9
8
|
theme: {
|
|
10
|
-
column:
|
|
9
|
+
column: r,
|
|
11
10
|
...s
|
|
12
11
|
} = {},
|
|
13
12
|
$isWrap: l,
|
|
14
13
|
$align: n,
|
|
15
14
|
$justify: m,
|
|
16
|
-
$gutter:
|
|
17
|
-
$flex:
|
|
18
|
-
$isReversed:
|
|
19
|
-
styles:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
$gutter: a,
|
|
16
|
+
$flex: t,
|
|
17
|
+
$isReversed: c,
|
|
18
|
+
styles: f,
|
|
19
|
+
as: i = "div",
|
|
20
|
+
...p
|
|
21
|
+
} = e, {
|
|
22
|
+
boxStyles: u,
|
|
23
|
+
restProps: y
|
|
24
|
+
} = S(p), x = new Proxy(r || {}, w(s)), d = [v(x, "default", {}), {
|
|
25
|
+
flexDirection: c ? "column-reverse" : "column",
|
|
26
26
|
flexWrap: l ? "wrap" : "nowrap",
|
|
27
27
|
alignItems: j(n),
|
|
28
28
|
justifyContent: P(m),
|
|
29
|
-
gap:
|
|
30
|
-
},
|
|
31
|
-
flex:
|
|
32
|
-
} : {},
|
|
33
|
-
return /* @__PURE__ */
|
|
29
|
+
gap: C(a)
|
|
30
|
+
}, u, t ? {
|
|
31
|
+
flex: t
|
|
32
|
+
} : {}, f];
|
|
33
|
+
return /* @__PURE__ */ g(i, { css: d, ...y, ref: o });
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
A as ColumnStyled
|
|
37
37
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { getBoxStyles as x, tokensHandler as d } from "../../../tokens/utils.js";
|
|
1
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { getBoxStyles as c, tokensHandler as d } from "../../../tokens/utils.js";
|
|
5
4
|
import { get as y } from "../../../utils/helpers.js";
|
|
6
|
-
const C =
|
|
5
|
+
const C = x((t, e) => {
|
|
7
6
|
const {
|
|
8
7
|
theme: {
|
|
9
8
|
flexContainer: o,
|
|
@@ -11,11 +10,11 @@ const C = c((e, t) => {
|
|
|
11
10
|
} = {},
|
|
12
11
|
styles: s,
|
|
13
12
|
...n
|
|
14
|
-
} =
|
|
13
|
+
} = t, {
|
|
15
14
|
boxStyles: l,
|
|
16
15
|
restProps: m
|
|
17
|
-
} =
|
|
18
|
-
return /* @__PURE__ */
|
|
16
|
+
} = c(n), f = new Proxy(o || {}, d(r)), p = [y(f, "default", {}), l, s];
|
|
17
|
+
return /* @__PURE__ */ i("div", { css: p, ...m, ref: e });
|
|
19
18
|
});
|
|
20
19
|
export {
|
|
21
20
|
C as FlexContainerStyled
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { convertToInlineBoxStyles as
|
|
2
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as d } from "react";
|
|
4
|
+
import { convertToInlineBoxStyles as u } from "../../../tokens/utils.js";
|
|
5
5
|
import { RowStyled as $ } from "./RowStyled.js";
|
|
6
|
-
import { COMPONENT_NAME as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
const
|
|
6
|
+
import { COMPONENT_NAME as t } from "./constants.js";
|
|
7
|
+
import { useTheme as c } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
const x = d(({
|
|
9
|
+
children: e,
|
|
10
|
+
gutter: r = 0,
|
|
11
|
+
align: o = "stretch",
|
|
12
|
+
justify: m = "start",
|
|
13
|
+
isWrap: s = !0,
|
|
14
|
+
isReversed: i = !1,
|
|
15
|
+
flex: f,
|
|
16
|
+
...a
|
|
17
|
+
}, p) => {
|
|
9
18
|
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
justify: m = "start",
|
|
14
|
-
isWrap: f = !0,
|
|
15
|
-
isReversed: a = !1,
|
|
16
|
-
flex: l,
|
|
17
|
-
...n
|
|
18
|
-
} = t, {
|
|
19
|
-
theme: p
|
|
20
|
-
} = x();
|
|
21
|
-
return /* @__PURE__ */ d($, { ref: r, theme: p, $isReversed: a, $gutter: s, $align: i, $justify: m, $isWrap: f, $flex: l, "data-testid": e, ...c(n), children: o });
|
|
19
|
+
theme: l
|
|
20
|
+
} = c();
|
|
21
|
+
return /* @__PURE__ */ n($, { ref: p, theme: l, $isReversed: i, $gutter: r, $align: o, $justify: m, $isWrap: s, $flex: f, "data-testid": t, ...u(a), children: e });
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
x.displayName = t;
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
x as Row
|
|
26
26
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
1
|
+
import { ElementType, PropsWithChildren } from 'react';
|
|
2
2
|
import { BoxCssComponentProps, BoxCssComponentStyledProps, FlexElementProps, FlexElementStyledProps } from '../..';
|
|
3
3
|
export interface RowProps extends BoxCssComponentProps, FlexElementProps, PropsWithChildren {
|
|
4
|
+
as?: keyof HTMLElementTagNameMap | ElementType;
|
|
4
5
|
}
|
|
5
6
|
export interface RowStyledProps extends BoxCssComponentStyledProps, FlexElementStyledProps, PropsWithChildren {
|
|
7
|
+
as?: keyof HTMLElementTagNameMap | ElementType;
|
|
6
8
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const A = d((t, r) => {
|
|
1
|
+
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { getBoxStyles as $, tokensHandler as S } from "../../../tokens/utils.js";
|
|
4
|
+
import { get as P } from "../../../utils/helpers.js";
|
|
5
|
+
import { calculateGutter as R, calculateJustify as j, calculateAlign as v } from "../../../utils/layout.js";
|
|
6
|
+
const A = g((e, r) => {
|
|
8
7
|
const {
|
|
9
8
|
theme: {
|
|
10
9
|
row: o,
|
|
11
10
|
...s
|
|
12
11
|
} = {},
|
|
13
|
-
$flex:
|
|
12
|
+
$flex: t,
|
|
14
13
|
$isWrap: l,
|
|
15
|
-
$align:
|
|
16
|
-
$justify:
|
|
17
|
-
$gutter:
|
|
18
|
-
$isReversed:
|
|
19
|
-
styles:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
$align: n,
|
|
15
|
+
$justify: a,
|
|
16
|
+
$gutter: f,
|
|
17
|
+
$isReversed: i,
|
|
18
|
+
styles: p,
|
|
19
|
+
as: m = "div",
|
|
20
|
+
...c
|
|
21
|
+
} = e, {
|
|
22
|
+
boxStyles: u,
|
|
23
|
+
restProps: y
|
|
24
|
+
} = $(c), w = new Proxy(o || {}, S(s)), x = [P(w, "default", {}), {
|
|
25
|
+
flexDirection: i ? "row-reverse" : "row",
|
|
26
26
|
flexWrap: l ? "wrap" : "nowrap",
|
|
27
|
-
alignItems:
|
|
28
|
-
justifyContent:
|
|
29
|
-
gap:
|
|
30
|
-
},
|
|
31
|
-
flex:
|
|
32
|
-
} : {},
|
|
33
|
-
return /* @__PURE__ */
|
|
27
|
+
alignItems: v(n),
|
|
28
|
+
justifyContent: j(a),
|
|
29
|
+
gap: R(f)
|
|
30
|
+
}, u, t ? {
|
|
31
|
+
flex: t
|
|
32
|
+
} : {}, p];
|
|
33
|
+
return /* @__PURE__ */ d(m, { css: x, ...y, ref: r });
|
|
34
34
|
});
|
|
35
35
|
export {
|
|
36
36
|
A as RowStyled
|
package/constants/index.d.ts
CHANGED
package/hooks/index.d.ts
CHANGED