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,37 +1,36 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx as z } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getBoxStyles as
|
|
5
|
-
import { TextAlign as B, TypographyVariant as j } from "../../../types/typography.js";
|
|
6
|
-
import { SizeVariant as k } from "../../../types/common.js";
|
|
2
|
+
import { forwardRef as A } from "react";
|
|
3
|
+
import { getBoxStyles as B, tokensHandler as j } from "../../../tokens/utils.js";
|
|
7
4
|
import { get as t } from "../../../utils/helpers.js";
|
|
8
|
-
|
|
5
|
+
import { TypographyVariant as k, TextAlign as v } from "../../../types/typography.js";
|
|
6
|
+
import { SizeVariant as H } from "../../../types/common.js";
|
|
7
|
+
const E = A(({
|
|
8
|
+
theme: {
|
|
9
|
+
typography: n,
|
|
10
|
+
colors: y,
|
|
11
|
+
...m
|
|
12
|
+
} = {},
|
|
13
|
+
$as: c = "span",
|
|
14
|
+
$color: o,
|
|
15
|
+
$align: i = v.Start,
|
|
16
|
+
$variant: p = k.Inherit,
|
|
17
|
+
$size: a = H.Md,
|
|
18
|
+
$styleVariant: r,
|
|
19
|
+
styles: S,
|
|
20
|
+
...l
|
|
21
|
+
}, f) => {
|
|
9
22
|
const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
$as: l = "span",
|
|
16
|
-
$color: e,
|
|
17
|
-
$align: m = B.Start,
|
|
18
|
-
$variant: n = j.Inherit,
|
|
19
|
-
$size: S = k.Md,
|
|
20
|
-
$styleVariant: r,
|
|
21
|
-
styles: g,
|
|
22
|
-
...f
|
|
23
|
-
} = p, {
|
|
24
|
-
boxStyles: d,
|
|
25
|
-
restProps: h
|
|
26
|
-
} = w(f), o = new Proxy(a || {}, A(c)), u = t(o, "base", {}), x = t(o, n, {}), $ = t(o, [n, S], {}), T = e && t(i, e, e), s = typeof r == "string" ? [r] : r, P = s == null ? void 0 : s.reduce((b, v) => ({
|
|
27
|
-
...b,
|
|
28
|
-
...t(o, ["styleVariant", v], {})
|
|
23
|
+
boxStyles: g,
|
|
24
|
+
restProps: d
|
|
25
|
+
} = B(l), e = new Proxy(n || {}, j(m)), h = t(e, "base", {}), x = t(e, p, {}), u = t(e, [p, a], {}), T = o && t(y, o, o), s = typeof r == "string" ? [r] : r, b = s == null ? void 0 : s.reduce((P, w) => ({
|
|
26
|
+
...P,
|
|
27
|
+
...t(e, ["styleVariant", w], {})
|
|
29
28
|
}), {});
|
|
30
|
-
return /* @__PURE__ */ z(
|
|
31
|
-
textAlign:
|
|
29
|
+
return /* @__PURE__ */ z(c, { css: [h, x, u, b, {
|
|
30
|
+
textAlign: i,
|
|
32
31
|
color: T
|
|
33
|
-
},
|
|
32
|
+
}, g, S], ...d, ref: f });
|
|
34
33
|
});
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
E as TypographyStyled
|
|
37
36
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AccordionWrapperProps } from './Accordion.types';
|
|
2
|
-
export declare const Accordion: ({ children, allowMultipleExpand, value, defaultValue, onChange, }: AccordionWrapperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Accordion: ({ children, allowMultipleExpand, withoutSeparator, value, defaultValue, onChange, }: AccordionWrapperProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { isArray as
|
|
5
|
-
import { AccordionContext as
|
|
6
|
-
const
|
|
7
|
-
children:
|
|
2
|
+
import { jsx as x } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { useState as A, useCallback as p, useMemo as b } from "react";
|
|
4
|
+
import { isArray as j, without as v } from "../../../utils/helpers.js";
|
|
5
|
+
import { AccordionContext as P } from "./hooks/useAccordion.js";
|
|
6
|
+
const G = ({
|
|
7
|
+
children: u,
|
|
8
8
|
allowMultipleExpand: m = !1,
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
withoutSeparator: n,
|
|
10
|
+
value: d,
|
|
11
|
+
defaultValue: I = [],
|
|
11
12
|
onChange: s
|
|
12
13
|
}) => {
|
|
13
|
-
const [
|
|
14
|
+
const [f, l] = A(I), o = j(d), e = o ? d : f, r = p((t) => {
|
|
14
15
|
if (o) {
|
|
15
16
|
s == null || s(t);
|
|
16
17
|
return;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
}, [s, o]),
|
|
19
|
+
l(t);
|
|
20
|
+
}, [s, o]), i = p((t) => {
|
|
20
21
|
if (e.includes(t)) {
|
|
21
|
-
const c =
|
|
22
|
+
const c = v(e, t);
|
|
22
23
|
r(c);
|
|
23
24
|
} else {
|
|
24
25
|
const c = m ? [...e, t] : [t];
|
|
25
26
|
r(c);
|
|
26
27
|
}
|
|
27
|
-
}, [m, e, r]),
|
|
28
|
+
}, [m, e, r]), O = b(() => ({
|
|
28
29
|
openedItems: e,
|
|
29
|
-
toggleItem:
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
toggleItem: i,
|
|
31
|
+
withoutSeparator: n
|
|
32
|
+
}), [i, e, n]);
|
|
33
|
+
return /* @__PURE__ */ x(P.Provider, { value: O, children: u });
|
|
32
34
|
};
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
G as Accordion
|
|
35
37
|
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { CommonCssComponentProps, CommonCssComponentStyledProps } from '../../index.types';
|
|
3
|
-
export interface AccordionBaseProps extends CommonCssComponentProps, PropsWithChildren {
|
|
2
|
+
import { CommonCssComponentProps, CommonCssComponentStyledProps, BoxCssComponentProps, BoxCssComponentStyledProps } from '../../index.types';
|
|
3
|
+
export interface AccordionBaseProps extends CommonCssComponentProps, Omit<BoxCssComponentProps, 'onClick'>, PropsWithChildren {
|
|
4
4
|
isOpen?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface AccordionHeaderProps extends AccordionBaseProps {
|
|
7
7
|
expandIcon?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export interface AccordionBasePropsStyled extends CommonCssComponentStyledProps, PropsWithChildren {
|
|
9
|
+
export interface AccordionBasePropsStyled extends CommonCssComponentStyledProps, Omit<BoxCssComponentStyledProps, 'onAbort'>, PropsWithChildren {
|
|
10
10
|
$isOpen?: boolean;
|
|
11
|
+
$withoutSeparator?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export interface AccordionHeaderPropsStyled extends CommonCssComponentStyledProps<
|
|
13
|
+
export interface AccordionHeaderPropsStyled extends CommonCssComponentStyledProps, Omit<BoxCssComponentStyledProps, 'onAbort'>, PropsWithChildren {
|
|
13
14
|
}
|
|
14
15
|
export type AccordionContextType = {
|
|
15
16
|
openedItems: string[];
|
|
16
17
|
toggleItem: (key: string) => void;
|
|
18
|
+
withoutSeparator?: boolean;
|
|
17
19
|
};
|
|
18
20
|
export interface AccordionWrapperProps {
|
|
19
21
|
children: ReactNode;
|
|
20
22
|
allowMultipleExpand?: boolean;
|
|
23
|
+
withoutSeparator?: boolean;
|
|
21
24
|
value?: string[];
|
|
22
25
|
defaultValue?: string[];
|
|
23
26
|
onChange?: (openedItems: string[]) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AccordionBaseProps } from '../Accordion.types';
|
|
2
|
-
export declare const AccordionContent: ({ children, id, className, isOpen, styles }: AccordionBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccordionContent: ({ children, id, className, isOpen, styles, ...rest }: AccordionBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { CONTENT_COMPONENT as
|
|
4
|
-
import { AccordionContentStyled as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { Roles as
|
|
7
|
-
const
|
|
2
|
+
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { CONTENT_COMPONENT as s } from "../constants.js";
|
|
4
|
+
import { AccordionContentStyled as l } from "../AccordionStyled.js";
|
|
5
|
+
import { useTheme as p } from "../../../../hooks/useTheme/useTheme.js";
|
|
6
|
+
import { Roles as f } from "../../../core/types/roles.types.js";
|
|
7
|
+
const T = ({
|
|
8
8
|
children: e,
|
|
9
9
|
id: o,
|
|
10
10
|
className: r = "",
|
|
11
11
|
isOpen: t = !1,
|
|
12
|
-
styles: n = {}
|
|
12
|
+
styles: n = {},
|
|
13
|
+
...c
|
|
13
14
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
theme:
|
|
16
|
-
} =
|
|
17
|
-
return /* @__PURE__ */
|
|
15
|
+
const i = `accordion-panel-${o}`, a = `accordion-header-${o}`, {
|
|
16
|
+
theme: m
|
|
17
|
+
} = p();
|
|
18
|
+
return /* @__PURE__ */ d(l, { id: i, role: f.Region, "data-testid": `${s}-${o}`, "aria-labelledby": a, $isOpen: t, styles: n, theme: m, className: r, ...c, children: e });
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
T as AccordionContent
|
|
21
22
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AccordionHeaderProps } from '../Accordion.types';
|
|
2
|
-
export declare const AccordionHeader: ({ children, id, styles, className, isOpen, expandIcon, }: AccordionHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccordionHeader: ({ children, id, styles, className, isOpen, expandIcon, ...rest }: AccordionHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { HEADER_COMPONENT as
|
|
4
|
-
import { AccordionHeaderStyled as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { useAccordion as
|
|
7
|
-
const
|
|
2
|
+
import { jsxs as p, jsx as f } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { HEADER_COMPONENT as h } from "../constants.js";
|
|
4
|
+
import { AccordionHeaderStyled as A, AccordionIconStyled as $ } from "../AccordionStyled.js";
|
|
5
|
+
import { useTheme as u } from "../../../../hooks/useTheme/useTheme.js";
|
|
6
|
+
import { useAccordion as x } from "../hooks/useAccordion.js";
|
|
7
|
+
const j = ({
|
|
8
8
|
children: t,
|
|
9
9
|
id: o,
|
|
10
10
|
styles: n = {},
|
|
11
11
|
className: d = "",
|
|
12
12
|
isOpen: e = !1,
|
|
13
|
-
expandIcon: r
|
|
13
|
+
expandIcon: r,
|
|
14
|
+
...i
|
|
14
15
|
}) => {
|
|
15
16
|
const {
|
|
16
17
|
theme: c
|
|
17
|
-
} =
|
|
18
|
-
toggleItem:
|
|
19
|
-
} =
|
|
20
|
-
o &&
|
|
18
|
+
} = u(), {
|
|
19
|
+
toggleItem: a
|
|
20
|
+
} = x(), s = `accordion-header-${o}`, l = `accordion-panel-${o}`, m = () => {
|
|
21
|
+
o && a(o);
|
|
21
22
|
};
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ p(A, { theme: c, id: s, "data-testid": `${h}-${o}`, className: d, "aria-expanded": e, "aria-controls": l, onClick: m, styles: n, ...i, children: [
|
|
23
24
|
t,
|
|
24
|
-
r && /* @__PURE__ */
|
|
25
|
+
r && /* @__PURE__ */ f($, { theme: c, $isOpen: e, children: r })
|
|
25
26
|
] });
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
j as AccordionHeader
|
|
29
30
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AccordionBaseProps } from '../Accordion.types';
|
|
2
|
-
export declare const AccordionItem: ({ children, id, styles, className }: AccordionBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const AccordionItem: ({ children, id, styles, className, ...rest }: AccordionBaseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as s } from "@emotion/react/jsx-runtime";
|
|
3
|
-
import { Children as l, isValidElement as
|
|
4
|
-
import { ITEM_COMPONENT as
|
|
5
|
-
import { AccordionItemStyled as
|
|
6
|
-
import { useAccordion as
|
|
7
|
-
import { useTheme as
|
|
8
|
-
const
|
|
3
|
+
import { Children as l, isValidElement as u, cloneElement as d } from "react";
|
|
4
|
+
import { ITEM_COMPONENT as f } from "../constants.js";
|
|
5
|
+
import { AccordionItemStyled as h } from "../AccordionStyled.js";
|
|
6
|
+
import { useAccordion as E } from "../hooks/useAccordion.js";
|
|
7
|
+
import { useTheme as I } from "../../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
const x = ({
|
|
9
9
|
children: r,
|
|
10
|
-
id:
|
|
10
|
+
id: t,
|
|
11
11
|
styles: n = {},
|
|
12
|
-
className: m = ""
|
|
12
|
+
className: m = "",
|
|
13
|
+
...i
|
|
13
14
|
}) => {
|
|
14
15
|
const {
|
|
15
|
-
openedItems:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
openedItems: a,
|
|
17
|
+
withoutSeparator: c
|
|
18
|
+
} = E(), {
|
|
19
|
+
theme: p
|
|
20
|
+
} = I(), e = t && a.includes(t);
|
|
21
|
+
return /* @__PURE__ */ s(h, { "data-testid": `${f}-${t}`, "data-open": e, "data-value": t, theme: p, $withoutSeparator: c, className: m, styles: n, ...i, children: l.map(r, (o) => u(o) ? d(o, {
|
|
22
|
+
id: t,
|
|
23
|
+
isOpen: e
|
|
22
24
|
}) : null) });
|
|
23
25
|
};
|
|
24
26
|
export {
|
|
25
|
-
|
|
27
|
+
x as AccordionItem
|
|
26
28
|
};
|
|
@@ -1,52 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { tokensHandler as p } from "../../../tokens/utils.js";
|
|
1
|
+
import { jsx as y } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { getBoxStyles as a, tokensHandler as i } from "../../../tokens/utils.js";
|
|
4
3
|
import { get as t } from "../../../utils/helpers.js";
|
|
5
|
-
const
|
|
4
|
+
const A = (e) => {
|
|
6
5
|
const {
|
|
7
6
|
theme: {
|
|
8
|
-
accordion:
|
|
9
|
-
...
|
|
7
|
+
accordion: s,
|
|
8
|
+
...n
|
|
10
9
|
} = {},
|
|
11
|
-
$isOpen:
|
|
12
|
-
styles:
|
|
13
|
-
...
|
|
14
|
-
} =
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
$isOpen: c,
|
|
11
|
+
styles: r = {},
|
|
12
|
+
...d
|
|
13
|
+
} = e, {
|
|
14
|
+
boxStyles: o,
|
|
15
|
+
restProps: p
|
|
16
|
+
} = a(d), l = new Proxy(s || {}, i(n)), m = t(l, "content", {}), S = c ? "opened" : "closed", u = [t(m, "default", {}), t(m, S, {}), o, r];
|
|
17
|
+
return /* @__PURE__ */ y("div", { css: u, ...p });
|
|
18
|
+
}, f = (e) => {
|
|
17
19
|
const {
|
|
18
20
|
theme: {
|
|
19
|
-
accordion:
|
|
20
|
-
...
|
|
21
|
+
accordion: s,
|
|
22
|
+
...n
|
|
21
23
|
} = {},
|
|
22
|
-
styles:
|
|
23
|
-
...
|
|
24
|
-
} =
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
styles: c,
|
|
25
|
+
...r
|
|
26
|
+
} = e, {
|
|
27
|
+
boxStyles: d,
|
|
28
|
+
restProps: o
|
|
29
|
+
} = a(r), p = new Proxy(s || {}, i(n)), l = t(p, "header", {}), m = [t(l, "default", {}), d, c];
|
|
30
|
+
return /* @__PURE__ */ y("button", { css: m, ...o });
|
|
31
|
+
}, w = (e) => {
|
|
27
32
|
const {
|
|
28
33
|
theme: {
|
|
29
|
-
accordion:
|
|
30
|
-
...
|
|
34
|
+
accordion: s,
|
|
35
|
+
...n
|
|
31
36
|
} = {},
|
|
32
|
-
styles:
|
|
37
|
+
styles: c,
|
|
38
|
+
$withoutSeparator: r,
|
|
33
39
|
...d
|
|
34
|
-
} =
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
} = e, {
|
|
41
|
+
boxStyles: o,
|
|
42
|
+
restProps: p
|
|
43
|
+
} = a(d), l = new Proxy(s || {}, i(n)), m = t(l, r ? "itemNoSeparator" : "item", {}), S = [t(m, "default", {}), o, c];
|
|
44
|
+
return /* @__PURE__ */ y("div", { css: S, ...p });
|
|
45
|
+
}, b = (e) => {
|
|
37
46
|
const {
|
|
38
47
|
theme: {
|
|
39
|
-
accordion:
|
|
40
|
-
...
|
|
48
|
+
accordion: s,
|
|
49
|
+
...n
|
|
41
50
|
} = {},
|
|
42
|
-
$isOpen:
|
|
43
|
-
...
|
|
44
|
-
} =
|
|
45
|
-
return /* @__PURE__ */
|
|
51
|
+
$isOpen: c,
|
|
52
|
+
...r
|
|
53
|
+
} = e, d = new Proxy(s || {}, i(n)), o = t(d, "icon", {}), p = c ? "opened" : "closed", l = [t(o, "default", {}), t(o, p, {})];
|
|
54
|
+
return /* @__PURE__ */ y("span", { css: l, ...r });
|
|
46
55
|
};
|
|
47
56
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
A as AccordionContentStyled,
|
|
58
|
+
f as AccordionHeaderStyled,
|
|
59
|
+
b as AccordionIconStyled,
|
|
60
|
+
w as AccordionItemStyled
|
|
52
61
|
};
|
|
@@ -1,35 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import { jsx as a } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
4
|
import { COMPONENT_NAME as r } from "./constants.js";
|
|
5
|
-
import { CardRating as
|
|
6
|
-
import { CardDescription as
|
|
7
|
-
import { CardTitle as
|
|
8
|
-
import { CardButton as
|
|
9
|
-
import { CardPrice as
|
|
10
|
-
import { CardImage as
|
|
11
|
-
import { CardCounter as
|
|
12
|
-
import { Column as
|
|
13
|
-
import { Box as
|
|
14
|
-
import { Row as
|
|
15
|
-
|
|
5
|
+
import { CardRating as f } from "./CardRating/CardRating.js";
|
|
6
|
+
import { CardDescription as n } from "./CardDescription/CardDescription.js";
|
|
7
|
+
import { CardTitle as d } from "./CardTitle/CardTitle.js";
|
|
8
|
+
import { CardButton as s } from "./CardButton/CardButton.js";
|
|
9
|
+
import { CardPrice as c } from "./CardPrice/CardPrice.js";
|
|
10
|
+
import { CardImage as C } from "./CardImage/CardImage.js";
|
|
11
|
+
import { CardCounter as u } from "./CardCounter/CardCounter.js";
|
|
12
|
+
import { Column as l } from "../../layout/Column/Column.js";
|
|
13
|
+
import { Box as g } from "../../core/Box/Box.js";
|
|
14
|
+
import { Row as N } from "../../layout/Row/Row.js";
|
|
15
|
+
import { useTheme as R } from "../../../hooks/useTheme/useTheme.js";
|
|
16
|
+
import { get as T } from "../../../utils/helpers.js";
|
|
17
|
+
const h = p((o, t) => {
|
|
16
18
|
const {
|
|
17
19
|
children: m,
|
|
18
20
|
...i
|
|
19
|
-
} = o
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
} = o, {
|
|
22
|
+
theme: e
|
|
23
|
+
} = R();
|
|
24
|
+
return /* @__PURE__ */ a(g, { ref: t, css: T(e, "card.default", {}), ...i, "data-testid": r, children: m });
|
|
25
|
+
}), x = Object.assign(h, {
|
|
26
|
+
Row: N,
|
|
27
|
+
Column: l,
|
|
28
|
+
Counter: u,
|
|
29
|
+
Image: C,
|
|
30
|
+
Price: c,
|
|
31
|
+
Button: s,
|
|
32
|
+
Title: d,
|
|
33
|
+
Description: n,
|
|
34
|
+
Rating: f
|
|
31
35
|
});
|
|
32
|
-
|
|
36
|
+
x.displayName = r;
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
x as Card
|
|
35
39
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { CardSizeVariant as r } from "../../../../types/card.js";
|
|
2
|
+
import { TypographyVariant as o } from "../../../../types/typography.js";
|
|
3
3
|
const i = "CardTitle", m = {
|
|
4
|
-
[
|
|
5
|
-
[
|
|
4
|
+
[r.Default]: o.H6,
|
|
5
|
+
[r.Sm]: o.Body1
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
i as COMPONENT_NAME,
|
|
@@ -3,10 +3,10 @@ import { jsxs as n, jsx as e, Fragment as B } from "@emotion/react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef as I, useState as A } from "react";
|
|
4
4
|
import { COMPONENT_NAME as b } from "./constants.js";
|
|
5
5
|
import { HeaderStyled as E, TopBannerRowStyled as H, NavigationRowStyled as $, MobileMenuOpenedDropdownWrapperStyled as D, CloseMenuIconWrapperStyled as F, MobileMenuWrapperStyled as P, MobileMenuItemWrapperStyled as Q, OpenMenuIconWrapperStyled as V, SearchColumnStyled as _, ActionsColumnStyled as q, MenuRowStyled as z, MenuColumnStyled as G, ChildrenRowStyled as J } from "./HeaderStyled.js";
|
|
6
|
-
import { useMediaQuery as K } from "../../../hooks/useMediaQuery/useMediaQuery.js";
|
|
7
6
|
import { Search as C } from "../Search/Search.js";
|
|
8
|
-
import { useTheme as
|
|
7
|
+
import { useTheme as K } from "../../../hooks/useTheme/useTheme.js";
|
|
9
8
|
import { get as i } from "../../../utils/helpers.js";
|
|
9
|
+
import { useMediaQuery as U } from "../../../hooks/useMediaQuery/useMediaQuery.js";
|
|
10
10
|
import { Row as d } from "../../layout/Row/Row.js";
|
|
11
11
|
import { Column as t } from "../../layout/Column/Column.js";
|
|
12
12
|
import { Icon as u } from "../../core/Icon/Icon.js";
|
|
@@ -16,7 +16,7 @@ const Z = I((x, j) => {
|
|
|
16
16
|
var g;
|
|
17
17
|
const {
|
|
18
18
|
theme: r
|
|
19
|
-
} =
|
|
19
|
+
} = K(), c = i(r, "header.icons", {}), {
|
|
20
20
|
bgColor: R = i(r, "header.container.backgroundColor"),
|
|
21
21
|
onMobileMenuItemClick: h,
|
|
22
22
|
menuItemMapper: f,
|
|
@@ -30,7 +30,7 @@ const Z = I((x, j) => {
|
|
|
30
30
|
menu: p,
|
|
31
31
|
actions: o,
|
|
32
32
|
...k
|
|
33
|
-
} = x, S =
|
|
33
|
+
} = x, S = U(`(max-width: ${(g = r == null ? void 0 : r.values) == null ? void 0 : g.screenMedium})`), [v, M] = A(!1);
|
|
34
34
|
return /* @__PURE__ */ n(E, { ref: j, theme: r, $backgroundColor: R, "data-testid": b, ...k, children: [
|
|
35
35
|
O && w && /* @__PURE__ */ e(H, { theme: r, justify: "center", children: w }),
|
|
36
36
|
/* @__PURE__ */ e($, { theme: r, children: S ? v ? (
|
|
@@ -18,7 +18,6 @@ const b = R((i, n) => {
|
|
|
18
18
|
noHistoryResultsLabel: u = I,
|
|
19
19
|
noResultsLabel: p = N,
|
|
20
20
|
newSearchCta: E = A,
|
|
21
|
-
// @TODO: rename to loaderLinesCount, add possibility for a loader line set custom size
|
|
22
21
|
loaderItemsCount: C = O,
|
|
23
22
|
modalProps: e = {},
|
|
24
23
|
searchProps: L = {},
|
|
@@ -24,7 +24,7 @@ export interface SearchItemsProps extends CommonCssComponentProps {
|
|
|
24
24
|
noItemsLabel?: string;
|
|
25
25
|
newSearchCta?: string;
|
|
26
26
|
}
|
|
27
|
-
export interface SearchModalProps extends CommonCssComponentProps {
|
|
27
|
+
export interface SearchModalProps extends Omit<CommonCssComponentProps, 'results'> {
|
|
28
28
|
results?: (never | SearchModalResultItemProps | SearchModalHistoryResultItemProps)[];
|
|
29
29
|
historyResults?: (never | SearchModalResultItemProps | SearchModalHistoryResultItemProps)[];
|
|
30
30
|
noResultsLabel?: string;
|
|
@@ -52,6 +52,7 @@ export interface CommonCssInputStyledProps extends InputHTMLAttributes<HTMLInput
|
|
|
52
52
|
ref?: ForwardedRef<HTMLInputElement>;
|
|
53
53
|
}
|
|
54
54
|
export interface BoxCssComponentProps<T = HTMLDivElement> extends CommonCssComponentProps<T> {
|
|
55
|
+
display?: string;
|
|
55
56
|
overflow?: string;
|
|
56
57
|
minWidth?: string;
|
|
57
58
|
width?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ChatContainerProps, ChatContainerRef } from './
|
|
1
|
+
import { ChatContainerProps, ChatContainerRef } from './';
|
|
2
2
|
export declare const ChatContainer: import('react').ForwardRefExoticComponent<ChatContainerProps & import('react').RefAttributes<ChatContainerRef>>;
|