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.
Files changed (230) hide show
  1. package/README.md +2 -2
  2. package/ai/README.md +210 -16
  3. package/ai/schemas/components/Accordion.d.ts +84 -0
  4. package/ai/schemas/components/Button.d.ts +12 -0
  5. package/ai/schemas/components/ChatContainer.d.ts +0 -8
  6. package/ai/schemas/components/Column.d.ts +5 -5
  7. package/ai/schemas/components/InputFile.d.ts +17 -5
  8. package/ai/schemas/components/Menu.d.ts +37 -0
  9. package/ai/schemas/components/Row.d.ts +6 -6
  10. package/ai/schemas/components/Scroll.d.ts +7 -0
  11. package/ai/schemas/components/Typography.d.ts +0 -21
  12. package/assets/icons/account_circle.d.ts +1 -3
  13. package/assets/icons/account_circle.js +7 -14
  14. package/assets/icons/arrow-down.d.ts +2 -3
  15. package/assets/icons/arrow-down.js +6 -11
  16. package/assets/icons/arrow-forward.d.ts +1 -3
  17. package/assets/icons/arrow-forward.js +6 -13
  18. package/assets/icons/attachment.d.ts +1 -3
  19. package/assets/icons/attachment.js +7 -14
  20. package/assets/icons/check.d.ts +1 -3
  21. package/assets/icons/check.js +5 -11
  22. package/assets/icons/chevron-left.d.ts +1 -3
  23. package/assets/icons/chevron-left.js +7 -14
  24. package/assets/icons/chevron-right.d.ts +1 -3
  25. package/assets/icons/chevron-right.js +6 -13
  26. package/assets/icons/content-copy.d.ts +1 -3
  27. package/assets/icons/content-copy.js +7 -14
  28. package/assets/icons/delete_outlined.d.ts +1 -3
  29. package/assets/icons/delete_outlined.js +5 -12
  30. package/assets/icons/dot.d.ts +1 -3
  31. package/assets/icons/dot.js +5 -11
  32. package/assets/icons/error_outline.d.ts +1 -4
  33. package/assets/icons/error_outline.js +6 -18
  34. package/assets/icons/eye.d.ts +1 -3
  35. package/assets/icons/eye.js +7 -14
  36. package/assets/icons/file-copy.d.ts +1 -3
  37. package/assets/icons/file-copy.js +7 -13
  38. package/assets/icons/filter.d.ts +1 -3
  39. package/assets/icons/filter.js +6 -13
  40. package/assets/icons/folder.d.ts +1 -3
  41. package/assets/icons/folder.js +6 -13
  42. package/assets/icons/folderOpen.d.ts +1 -3
  43. package/assets/icons/folderOpen.js +7 -14
  44. package/assets/icons/home.d.ts +1 -3
  45. package/assets/icons/home.js +6 -13
  46. package/assets/icons/local_shipping.d.ts +1 -3
  47. package/assets/icons/local_shipping.js +4 -11
  48. package/assets/icons/minus.d.ts +1 -3
  49. package/assets/icons/minus.js +7 -13
  50. package/assets/icons/mobile_menu_button.d.ts +1 -3
  51. package/assets/icons/mobile_menu_button.js +7 -14
  52. package/assets/icons/paymentCard.d.ts +1 -3
  53. package/assets/icons/paymentCard.js +6 -13
  54. package/assets/icons/plus.d.ts +1 -3
  55. package/assets/icons/plus.js +5 -11
  56. package/assets/icons/portrait.d.ts +1 -3
  57. package/assets/icons/portrait.js +5 -12
  58. package/assets/icons/processing.d.ts +1 -3
  59. package/assets/icons/processing.js +6 -13
  60. package/assets/icons/ruler.d.ts +1 -3
  61. package/assets/icons/ruler.js +6 -13
  62. package/assets/icons/search.d.ts +1 -3
  63. package/assets/icons/search.js +6 -13
  64. package/assets/icons/shopping_bag.d.ts +1 -3
  65. package/assets/icons/shopping_bag.js +7 -14
  66. package/assets/icons/slash.d.ts +1 -3
  67. package/assets/icons/slash.js +6 -13
  68. package/assets/icons/star.d.ts +1 -3
  69. package/assets/icons/star.js +6 -12
  70. package/assets/icons/starOutlined.d.ts +1 -3
  71. package/assets/icons/starOutlined.js +5 -11
  72. package/assets/icons/toast_error.d.ts +1 -3
  73. package/assets/icons/toast_error.js +9 -15
  74. package/assets/icons/toast_info.d.ts +1 -3
  75. package/assets/icons/toast_info.js +7 -13
  76. package/assets/icons/toast_warning.d.ts +1 -3
  77. package/assets/icons/toast_warning.js +7 -13
  78. package/assets/icons/upload.d.ts +1 -3
  79. package/assets/icons/upload.js +6 -13
  80. package/assets/icons/volume-up.d.ts +1 -3
  81. package/assets/icons/volume-up.js +6 -13
  82. package/assets/icons/wifiTethering.d.ts +1 -3
  83. package/assets/icons/wifiTethering.js +4 -11
  84. package/components/core/Button/Button.js +30 -27
  85. package/components/core/Button/Button.types.d.ts +2 -2
  86. package/components/core/Button/ButtonStyled.js +40 -39
  87. package/components/core/Dropdown/Dropdown.d.ts +1 -1
  88. package/components/core/Dropdown/Dropdown.js +16 -16
  89. package/components/core/Dropdown/Dropdown.types.d.ts +3 -3
  90. package/components/core/Dropdown/DropdownStyled.js +13 -14
  91. package/components/core/Icon/Icon.js +41 -33
  92. package/components/core/Icon/Icon.types.d.ts +2 -1
  93. package/components/core/Icon/constants.d.ts +37 -109
  94. package/components/core/Input/Input.d.ts +1 -1
  95. package/components/core/InputFile/InputFile.d.ts +0 -32
  96. package/components/core/InputFile/InputFile.js +47 -33
  97. package/components/core/InputFile/InputFileStyled.js +24 -22
  98. package/components/core/Loader/Loader.js +19 -17
  99. package/components/core/Loader/Loader.types.d.ts +3 -1
  100. package/components/core/Loader/LoaderStyled.js +34 -30
  101. package/components/core/Menu/Menu.d.ts +2 -2
  102. package/components/core/Menu/Menu.js +113 -93
  103. package/components/core/Menu/Menu.types.d.ts +16 -11
  104. package/components/core/Menu/MenuStyled.d.ts +1 -1
  105. package/components/core/Menu/constants.js +4 -12
  106. package/components/core/Modal/Modal.js +60 -36
  107. package/components/core/Modal/ModalStyled.js +21 -22
  108. package/components/core/Scroll/Scroll.d.ts +6 -0
  109. package/components/core/Scroll/Scroll.js +53 -31
  110. package/components/core/Scroll/Scroll.types.d.ts +5 -0
  111. package/components/core/Scroll/ScrollBar.js +45 -43
  112. package/components/core/Scroll/ScrollStyled.js +46 -42
  113. package/components/core/Scroll/constants.d.ts +2 -0
  114. package/components/core/Scroll/constants.js +6 -4
  115. package/components/core/Select/Select.js +162 -134
  116. package/components/core/Select/Select.types.d.ts +2 -4
  117. package/components/core/Snackbar/Snackbar.js +60 -37
  118. package/components/core/Snackbar/Snackbar.types.d.ts +1 -2
  119. package/components/core/Snackbar/SnackbarManager.js +45 -30
  120. package/components/core/Snackbar/SnackbarStyled.d.ts +5 -5
  121. package/components/core/Snackbar/SnackbarStyled.js +111 -101
  122. package/components/core/Textarea/Textarea.d.ts +4 -0
  123. package/components/core/Tooltip/Tooltip.js +68 -44
  124. package/components/core/Tooltip/TooltipStyled.js +26 -27
  125. package/components/core/Tooltip/utils.js +47 -45
  126. package/components/core/Typography/Typography.js +18 -18
  127. package/components/core/Typography/Typography.types.d.ts +3 -3
  128. package/components/core/Typography/TypographyStyled.js +28 -29
  129. package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
  130. package/components/domainSpecific/Accordion/Accordion.js +19 -17
  131. package/components/domainSpecific/Accordion/Accordion.types.d.ts +7 -4
  132. package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.d.ts +1 -1
  133. package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +13 -12
  134. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.d.ts +1 -1
  135. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +15 -14
  136. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
  137. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +18 -16
  138. package/components/domainSpecific/Accordion/AccordionStyled.js +44 -35
  139. package/components/domainSpecific/Card/Card.js +31 -27
  140. package/components/domainSpecific/Card/CardTitle/constants.js +4 -4
  141. package/components/domainSpecific/Header/Header.js +4 -4
  142. package/components/domainSpecific/SearchModal/SearchModal.js +0 -1
  143. package/components/domainSpecific/SearchModal/SearchModal.types.d.ts +1 -1
  144. package/components/index.types.d.ts +1 -0
  145. package/components/layout/ChatContainer/ChatContainer.d.ts +1 -1
  146. package/components/layout/ChatContainer/ChatContainer.js +58 -41
  147. package/components/layout/ChatContainer/ChatContainer.types.d.ts +8 -5
  148. package/components/layout/ChatContainer/ChatContainerStyled.d.ts +2 -0
  149. package/components/layout/ChatContainer/ChatContainerStyled.js +105 -84
  150. package/components/layout/Column/Column.types.d.ts +3 -1
  151. package/components/layout/Column/ColumnStyled.js +23 -23
  152. package/components/layout/FlexContainer/FlexContainerStyled.js +7 -8
  153. package/components/layout/Row/Row.d.ts +1 -1
  154. package/components/layout/Row/Row.js +20 -20
  155. package/components/layout/Row/Row.types.d.ts +3 -1
  156. package/components/layout/Row/RowStyled.js +26 -26
  157. package/constants/index.d.ts +0 -1
  158. package/hooks/index.d.ts +1 -0
  159. package/hooks/useLogger/NoOpLogger.d.ts +11 -0
  160. package/hooks/useLogger/NoOpLogger.js +15 -0
  161. package/hooks/useLogger/index.d.ts +2 -0
  162. package/hooks/useLogger/useLogger.d.ts +4 -0
  163. package/hooks/useLogger/useLogger.js +27 -0
  164. package/hooks/useLogger/useLogger.types.d.ts +30 -0
  165. package/hooks/useTheme/NoOpTheme.d.ts +4050 -0
  166. package/hooks/useTheme/NoOpTheme.js +15 -0
  167. package/hooks/useTheme/useTheme.d.ts +3 -4
  168. package/hooks/useTheme/useTheme.js +62 -41
  169. package/hooks/useTheme/useTheme.types.d.ts +3 -2
  170. package/index.d.ts +4 -0
  171. package/index.js +354 -350
  172. package/llms.txt +39 -19
  173. package/package.json +1 -1
  174. package/tokens/accordion.d.ts +9 -3
  175. package/tokens/accordion.js +14 -11
  176. package/tokens/button.d.ts +17 -19
  177. package/tokens/button.js +54 -56
  178. package/tokens/card.d.ts +2 -3
  179. package/tokens/card.js +50 -53
  180. package/tokens/carousel.d.ts +2 -2
  181. package/tokens/carousel.js +8 -9
  182. package/tokens/chat.d.ts +69 -48
  183. package/tokens/chat.js +86 -68
  184. package/tokens/constants.d.ts +0 -1
  185. package/tokens/constants.js +1 -1
  186. package/tokens/defaultTheme.d.ts +199 -112
  187. package/tokens/defaultTheme.js +27 -25
  188. package/tokens/header.d.ts +1 -1
  189. package/tokens/header.js +3 -4
  190. package/tokens/index.d.ts +175 -104
  191. package/tokens/index.js +102 -101
  192. package/tokens/input.d.ts +2 -2
  193. package/tokens/input.js +25 -26
  194. package/tokens/inputfile.d.ts +1 -1
  195. package/tokens/inputfile.js +4 -4
  196. package/tokens/link.d.ts +5 -0
  197. package/tokens/loader.d.ts +3 -0
  198. package/tokens/loader.js +3 -0
  199. package/tokens/menu.d.ts +1 -0
  200. package/tokens/menu.js +1 -0
  201. package/tokens/modal.d.ts +6 -4
  202. package/tokens/modal.js +42 -60
  203. package/tokens/scroll.d.ts +19 -2
  204. package/tokens/scroll.js +23 -7
  205. package/tokens/select.d.ts +9 -7
  206. package/tokens/select.js +30 -29
  207. package/tokens/snackbar.d.ts +36 -20
  208. package/tokens/snackbar.js +92 -93
  209. package/tokens/stepper.d.ts +1 -1
  210. package/tokens/stepper.js +3 -3
  211. package/tokens/tabs.d.ts +1 -1
  212. package/tokens/tabs.js +1 -1
  213. package/tokens/textarea.d.ts +4 -0
  214. package/tokens/tooltip.d.ts +5 -1
  215. package/tokens/tooltip.js +23 -21
  216. package/tokens/typography.js +114 -116
  217. package/tokens/values.d.ts +5 -1
  218. package/tokens/values.js +12 -8
  219. package/tokens/wrapper.d.ts +2 -2
  220. package/tokens/wrapper.js +7 -7
  221. package/tokens/zIndex.d.ts +9 -0
  222. package/tokens/zIndex.js +12 -0
  223. package/types/index.d.ts +0 -1
  224. package/types/styles.d.ts +1 -0
  225. package/utils/helpers.js +14 -15
  226. package/CHANGELOG.md +0 -177
  227. package/constants/positioning.d.ts +0 -9
  228. package/constants/positioning.js +0 -11
  229. package/types/chat.d.ts +0 -5
  230. 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 V } from "react";
4
- import { getBoxStyles as w, tokensHandler as A } from "../../../tokens/utils.js";
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
- const D = V((p, y) => {
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
- theme: {
11
- typography: a,
12
- colors: i,
13
- ...c
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(l, { css: [u, x, $, P, {
31
- textAlign: m,
29
+ return /* @__PURE__ */ z(c, { css: [h, x, u, b, {
30
+ textAlign: i,
32
31
  color: T
33
- }, d, g], ...h, ref: y });
32
+ }, g, S], ...d, ref: f });
34
33
  });
35
34
  export {
36
- D as TypographyStyled
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 O } from "@emotion/react/jsx-runtime";
3
- import { useState as x, useCallback as i, useMemo as A } from "react";
4
- import { isArray as a, without as b } from "../../../utils/helpers.js";
5
- import { AccordionContext as j } from "./hooks/useAccordion.js";
6
- const z = ({
7
- children: p,
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
- value: n,
10
- defaultValue: u = [],
9
+ withoutSeparator: n,
10
+ value: d,
11
+ defaultValue: I = [],
11
12
  onChange: s
12
13
  }) => {
13
- const [I, f] = x(u), o = a(n), e = o ? n : I, r = i((t) => {
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
- f(t);
19
- }, [s, o]), d = i((t) => {
19
+ l(t);
20
+ }, [s, o]), i = p((t) => {
20
21
  if (e.includes(t)) {
21
- const c = b(e, t);
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]), l = A(() => ({
28
+ }, [m, e, r]), O = b(() => ({
28
29
  openedItems: e,
29
- toggleItem: d
30
- }), [d, e]);
31
- return /* @__PURE__ */ O(j.Provider, { value: l, children: p });
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
- z as Accordion
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<HTMLButtonElement>, PropsWithChildren {
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 m } from "@emotion/react/jsx-runtime";
3
- import { CONTENT_COMPONENT as d } from "../constants.js";
4
- import { AccordionContentStyled as s } from "../AccordionStyled.js";
5
- import { useTheme as l } from "../../../../hooks/useTheme/useTheme.js";
6
- import { Roles as p } from "../../../core/types/roles.types.js";
7
- const O = ({
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 c = `accordion-panel-${o}`, i = `accordion-header-${o}`, {
15
- theme: a
16
- } = l();
17
- return /* @__PURE__ */ m(s, { id: c, role: p.Region, "data-testid": `${d}-${o}`, "aria-labelledby": i, $isOpen: t, styles: n, theme: a, className: r, children: e });
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
- O as AccordionContent
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 m, jsx as p } from "@emotion/react/jsx-runtime";
3
- import { HEADER_COMPONENT as f } from "../constants.js";
4
- import { AccordionHeaderStyled as h, AccordionIconStyled as A } from "../AccordionStyled.js";
5
- import { useTheme as $ } from "../../../../hooks/useTheme/useTheme.js";
6
- import { useAccordion as u } from "../hooks/useAccordion.js";
7
- const g = ({
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: i
19
- } = u(), a = `accordion-header-${o}`, s = `accordion-panel-${o}`, l = () => {
20
- o && i(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__ */ m(h, { theme: c, id: a, "data-testid": `${f}-${o}`, className: d, "aria-expanded": e, "aria-controls": s, onClick: l, styles: n, children: [
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__ */ p(A, { theme: c, $isOpen: e, children: r })
25
+ r && /* @__PURE__ */ f($, { theme: c, $isOpen: e, children: r })
25
26
  ] });
26
27
  };
27
28
  export {
28
- g as AccordionHeader
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 p, cloneElement as a } from "react";
4
- import { ITEM_COMPONENT as u } from "../constants.js";
5
- import { AccordionItemStyled as d } from "../AccordionStyled.js";
6
- import { useAccordion as f } from "../hooks/useAccordion.js";
7
- import { useTheme as E } from "../../../../hooks/useTheme/useTheme.js";
8
- const C = ({
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: e,
10
+ id: t,
11
11
  styles: n = {},
12
- className: m = ""
12
+ className: m = "",
13
+ ...i
13
14
  }) => {
14
15
  const {
15
- openedItems: c
16
- } = f(), {
17
- theme: i
18
- } = E(), t = e && c.includes(e);
19
- return /* @__PURE__ */ s(d, { "data-testid": `${u}-${e}`, "data-open": t, "data-value": e, theme: i, className: m, styles: n, children: l.map(r, (o) => p(o) ? a(o, {
20
- id: e,
21
- isOpen: t
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
- C as AccordionItem
27
+ x as AccordionItem
26
28
  };
@@ -1,52 +1,61 @@
1
- "use client";
2
- import { jsx as l } from "@emotion/react/jsx-runtime";
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 h = (n) => {
4
+ const A = (e) => {
6
5
  const {
7
6
  theme: {
8
- accordion: c,
9
- ...s
7
+ accordion: s,
8
+ ...n
10
9
  } = {},
11
- $isOpen: r,
12
- styles: d = {},
13
- ...m
14
- } = n, o = new Proxy(c || {}, p(s)), e = t(o, "content", {}), i = r ? "opened" : "closed", y = [t(e, "default", {}), t(e, i, {}), d];
15
- return /* @__PURE__ */ l("div", { css: y, ...m });
16
- }, A = (n) => {
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: c,
20
- ...s
21
+ accordion: s,
22
+ ...n
21
23
  } = {},
22
- styles: r,
23
- ...d
24
- } = n, m = new Proxy(c || {}, p(s)), o = t(m, "header", {}), e = [t(o, "default", {}), r];
25
- return /* @__PURE__ */ l("button", { css: e, ...d });
26
- }, P = (n) => {
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: c,
30
- ...s
34
+ accordion: s,
35
+ ...n
31
36
  } = {},
32
- styles: r,
37
+ styles: c,
38
+ $withoutSeparator: r,
33
39
  ...d
34
- } = n, m = new Proxy(c || {}, p(s)), o = t(m, "item", {}), e = [t(o, "default", {}), r];
35
- return /* @__PURE__ */ l("div", { css: e, ...d });
36
- }, f = (n) => {
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: c,
40
- ...s
48
+ accordion: s,
49
+ ...n
41
50
  } = {},
42
- $isOpen: r,
43
- ...d
44
- } = n, m = new Proxy(c || {}, p(s)), o = t(m, "icon", {}), e = r ? "opened" : "closed", i = [t(o, "default", {}), t(o, e, {})];
45
- return /* @__PURE__ */ l("span", { css: i, ...d });
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
- h as AccordionContentStyled,
49
- A as AccordionHeaderStyled,
50
- f as AccordionIconStyled,
51
- P as AccordionItemStyled
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 e } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as a } from "react";
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 p } from "./CardRating/CardRating.js";
6
- import { CardDescription as f } from "./CardDescription/CardDescription.js";
7
- import { CardTitle as n } from "./CardTitle/CardTitle.js";
8
- import { CardButton as d } from "./CardButton/CardButton.js";
9
- import { CardPrice as C } from "./CardPrice/CardPrice.js";
10
- import { CardImage as s } from "./CardImage/CardImage.js";
11
- import { CardCounter as c } from "./CardCounter/CardCounter.js";
12
- import { Column as u } from "../../layout/Column/Column.js";
13
- import { Box as l } from "../../core/Box/Box.js";
14
- import { Row as g } from "../../layout/Row/Row.js";
15
- const N = a((o, t) => {
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
- return /* @__PURE__ */ e(l, { ref: t, ...i, "data-testid": r, children: m });
21
- }), R = Object.assign(N, {
22
- Row: g,
23
- Column: u,
24
- Counter: c,
25
- Image: s,
26
- Price: C,
27
- Button: d,
28
- Title: n,
29
- Description: f,
30
- Rating: p
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
- R.displayName = r;
36
+ x.displayName = r;
33
37
  export {
34
- R as Card
38
+ x as Card
35
39
  };
@@ -1,8 +1,8 @@
1
- import { TypographyVariant as r } from "../../../../types/typography.js";
2
- import { CardSizeVariant as o } from "../../../../types/card.js";
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
- [o.Default]: r.H6,
5
- [o.Sm]: r.Body1
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 U } from "../../../hooks/useTheme/useTheme.js";
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
- } = U(), c = i(r, "header.icons", {}), {
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 = K(`(max-width: ${(g = r == null ? void 0 : r.values) == null ? void 0 : g.screenMedium})`), [v, M] = A(!1);
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 './ChatContainer.types';
1
+ import { ChatContainerProps, ChatContainerRef } from './';
2
2
  export declare const ChatContainer: import('react').ForwardRefExoticComponent<ChatContainerProps & import('react').RefAttributes<ChatContainerRef>>;