gd-design-library 1.0.2 → 1.1.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 (67) hide show
  1. package/ai/schemas/components/ChatContainer.d.ts +0 -8
  2. package/components/core/Tooltip/Tooltip.js +42 -41
  3. package/components/domainSpecific/Card/Card.js +31 -27
  4. package/components/domainSpecific/Card/CardTitle/constants.js +4 -4
  5. package/components/layout/ChatContainer/ChatContainer.d.ts +1 -1
  6. package/components/layout/ChatContainer/ChatContainer.js +50 -39
  7. package/components/layout/ChatContainer/ChatContainer.types.d.ts +4 -5
  8. package/components/layout/ChatContainer/ChatContainerStyled.d.ts +1 -0
  9. package/components/layout/ChatContainer/ChatContainerStyled.js +86 -75
  10. package/constants/index.d.ts +0 -1
  11. package/hooks/index.d.ts +1 -0
  12. package/hooks/useLogger/NoOpLogger.d.ts +11 -0
  13. package/hooks/useLogger/NoOpLogger.js +15 -0
  14. package/hooks/useLogger/index.d.ts +2 -0
  15. package/hooks/useLogger/useLogger.d.ts +4 -0
  16. package/hooks/useLogger/useLogger.js +27 -0
  17. package/hooks/useLogger/useLogger.types.d.ts +30 -0
  18. package/hooks/useTheme/NoOpTheme.d.ts +3957 -0
  19. package/hooks/useTheme/NoOpTheme.js +15 -0
  20. package/hooks/useTheme/useTheme.d.ts +3 -4
  21. package/hooks/useTheme/useTheme.js +62 -41
  22. package/hooks/useTheme/useTheme.types.d.ts +3 -2
  23. package/index.js +359 -354
  24. package/llms.txt +20 -15
  25. package/package.json +1 -1
  26. package/tokens/button.d.ts +0 -1
  27. package/tokens/button.js +0 -1
  28. package/tokens/card.d.ts +2 -3
  29. package/tokens/card.js +50 -53
  30. package/tokens/carousel.d.ts +2 -2
  31. package/tokens/carousel.js +8 -9
  32. package/tokens/chat.d.ts +24 -39
  33. package/tokens/chat.js +40 -58
  34. package/tokens/defaultTheme.d.ts +52 -58
  35. package/tokens/defaultTheme.js +27 -25
  36. package/tokens/header.d.ts +1 -1
  37. package/tokens/header.js +3 -4
  38. package/tokens/index.d.ts +50 -55
  39. package/tokens/index.js +71 -68
  40. package/tokens/input.d.ts +2 -2
  41. package/tokens/input.js +25 -26
  42. package/tokens/inputfile.d.ts +1 -1
  43. package/tokens/inputfile.js +4 -4
  44. package/tokens/modal.d.ts +1 -1
  45. package/tokens/modal.js +19 -20
  46. package/tokens/scroll.d.ts +2 -2
  47. package/tokens/scroll.js +6 -7
  48. package/tokens/select.d.ts +2 -2
  49. package/tokens/select.js +23 -24
  50. package/tokens/stepper.d.ts +1 -1
  51. package/tokens/stepper.js +3 -3
  52. package/tokens/tabs.d.ts +1 -1
  53. package/tokens/tabs.js +1 -1
  54. package/tokens/tooltip.d.ts +1 -1
  55. package/tokens/tooltip.js +3 -4
  56. package/tokens/values.d.ts +1 -1
  57. package/tokens/values.js +8 -8
  58. package/tokens/wrapper.d.ts +2 -2
  59. package/tokens/wrapper.js +7 -7
  60. package/tokens/zIndex.d.ts +9 -0
  61. package/tokens/zIndex.js +12 -0
  62. package/types/index.d.ts +0 -1
  63. package/CHANGELOG.md +0 -177
  64. package/constants/positioning.d.ts +0 -9
  65. package/constants/positioning.js +0 -11
  66. package/types/chat.d.ts +0 -5
  67. package/types/chat.js +0 -4
@@ -19,19 +19,11 @@ declare const _default: {
19
19
  type: string;
20
20
  description: string;
21
21
  default?: undefined;
22
- enum?: undefined;
23
22
  } | {
24
23
  name: string;
25
24
  type: string;
26
25
  description: string;
27
26
  default: string;
28
- enum: string[];
29
- } | {
30
- name: string;
31
- type: string;
32
- description: string;
33
- default: boolean;
34
- enum?: undefined;
35
27
  })[];
36
28
  examples: string[];
37
29
  };
@@ -1,52 +1,53 @@
1
1
  "use client";
2
- import { jsxs as g, Fragment as B, jsx as s } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as L, useCallback as r } from "react";
4
- import { useTooltip as O } from "./utils.js";
2
+ import { jsxs as B, Fragment as L, jsx as a } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as O, useCallback as r } from "react";
4
+ import { useTooltip as P } from "./utils.js";
5
5
  import { COMPONENT_NAME as l } from "./constants.js";
6
- import { TooltipStyled as P, TooltipWrapperStyled as W } from "./TooltipStyled.js";
7
- import { useTheme as j } from "../../../hooks/useTheme/useTheme.js";
8
- import { KEYBOARD_KEYS as h } from "../../../constants/keyboard.js";
9
- import { Portal as v } from "../Portal/Portal.js";
10
- const V = L((u, y) => {
6
+ import { TooltipStyled as W, TooltipWrapperStyled as j } from "./TooltipStyled.js";
7
+ import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
8
+ import { KEYBOARD_KEYS as m } from "../../../constants/keyboard.js";
9
+ import { Portal as V } from "../Portal/Portal.js";
10
+ const Y = O((f, h) => {
11
11
  const {
12
12
  id: n,
13
- children: T,
14
- content: e,
15
- position: b,
16
- delay: w,
17
- className: E = "",
18
- ariaLabel: p,
19
- gap: N,
20
- as: C,
21
- ...c
22
- } = u, {
13
+ children: u,
14
+ content: t,
15
+ position: y,
16
+ delay: T,
17
+ className: b = "",
18
+ ariaLabel: c,
19
+ gap: w,
20
+ as: E,
21
+ styles: N,
22
+ ...C
23
+ } = f, {
23
24
  theme: D
24
- } = j(), {
25
+ } = v(), {
25
26
  isVisible: o,
26
- coords: d,
27
- containerRef: K,
28
- tooltipRef: S,
29
- showTooltip: a,
30
- hideTooltip: t,
31
- positionWithFallback: k
32
- } = O(b, w, N), R = `${E.trim()} tooltip-${k}`, x = !p && typeof e == "string" ? e : p, f = o && !!e, i = r(() => {
33
- o && t();
34
- }, [t, o]), A = i, F = r(() => {
35
- o || a();
36
- }, [o, a]), M = r(() => {
37
- o && t();
38
- }, [t, o]), $ = r((m) => {
39
- [h.ENTER, h.SPACE].includes(m.key) && (m.preventDefault(), i());
27
+ coords: K,
28
+ containerRef: S,
29
+ tooltipRef: k,
30
+ showTooltip: s,
31
+ hideTooltip: e,
32
+ positionWithFallback: R
33
+ } = P(y, T, w), x = `${b.trim()} tooltip-${R}`, A = !c && typeof t == "string" ? t : c, p = o && !!t, i = r(() => {
34
+ o && e();
35
+ }, [e, o]), F = i, M = r(() => {
36
+ o || s();
37
+ }, [o, s]), $ = r(() => {
38
+ o && e();
39
+ }, [e, o]), g = r((d) => {
40
+ [m.ENTER, m.SPACE].includes(d.key) && (d.preventDefault(), i());
40
41
  }, [i]);
41
- return /* @__PURE__ */ g(B, { children: [
42
- f && /* @__PURE__ */ s(v, { withWrapper: !1, ref: y, children: /* @__PURE__ */ s(P, { id: n, theme: D, className: R, ref: S, "data-testid": l, role: "tooltip", "aria-hidden": !o, style: {
43
- top: d.top,
44
- left: d.left
45
- }, ...c, children: e }) }),
46
- /* @__PURE__ */ s(W, { $as: C, ref: K, onMouseEnter: a, onMouseLeave: t, onClick: i, onTouchStart: A, onFocus: F, onBlur: M, onKeyDown: $, "aria-expanded": f, "aria-describedby": n, "aria-label": x, "data-testid": `${l}-wrapper`, ...c, children: T })
42
+ return /* @__PURE__ */ B(L, { children: [
43
+ p && /* @__PURE__ */ a(V, { withWrapper: !1, ref: h, children: /* @__PURE__ */ a(W, { id: n, theme: D, className: x, ref: k, "data-testid": l, role: "tooltip", "aria-hidden": !o, styles: {
44
+ ...N,
45
+ ...K
46
+ }, ...C, children: t }) }),
47
+ /* @__PURE__ */ a(j, { $as: E, ref: S, onMouseEnter: s, onMouseLeave: e, onClick: i, onTouchStart: F, onFocus: M, onBlur: $, onKeyDown: g, "aria-expanded": p, "aria-describedby": n, "aria-label": A, "data-testid": `${l}-wrapper`, children: u })
47
48
  ] });
48
49
  });
49
- V.displayName = l;
50
+ Y.displayName = l;
50
51
  export {
51
- V as default
52
+ Y as default
52
53
  };
@@ -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,
@@ -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>>;
@@ -1,57 +1,68 @@
1
1
  "use client";
2
- import { jsxs as n, jsx as r } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as O, useRef as N, useState as x, useImperativeHandle as H } from "react";
4
- import { COMPONENT_NAME as t } from "./constants.js";
5
- import { MainWrapperStyled as I, SidebarWrapperStyled as M, SidebarStyled as v, SidebarHeaderStyled as R, SidebarToggleButtonStyled as p, BodyStyled as j, MainHeaderStyled as k, ContentStyled as A } from "./ChatContainerStyled.js";
6
- import { ChatLayoutVariant as B } from "../../../types/chat.js";
7
- import { useTheme as D } from "../../../hooks/useTheme/useTheme.js";
8
- import { Icon as h } from "../../core/Icon/Icon.js";
2
+ import { jsxs as a, jsx as r } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as H, useRef as N, useState as x, useImperativeHandle as I } from "react";
4
+ import { COMPONENT_NAME as e } from "./constants.js";
5
+ import { MainWrapperStyled as T, SidebarWrapperStyled as j, SidebarStyled as k, SidebarHeaderStyled as A, SidebarToggleButtonStyled as h, SidebarMinifiedStyled as B, BodyStyled as D, MainHeaderStyled as E, ContentStyled as W } from "./ChatContainerStyled.js";
6
+ import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
7
+ import { useLogger as L } from "../../../hooks/useLogger/useLogger.js";
8
+ import { Icon as b } from "../../core/Icon/Icon.js";
9
9
  import { get as f } from "../../../utils/helpers.js";
10
- const E = O((S, u) => {
10
+ const P = H((u, S) => {
11
11
  const {
12
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
- theme: e
23
- } = D(), c = N(null), [a, i] = x(g), o = () => {
24
- const m = !a;
25
- i(m), d == null || d(m);
13
+ headerContent: c,
14
+ children: $,
15
+ isOpen: C = !0,
16
+ sidebarHeaderContent: m,
17
+ sidebarMinifiedContent: p,
18
+ onToggleSidebar: n,
19
+ styles: w = {},
20
+ showSidebarAsideControl: O = !0,
21
+ showSidebarHeaderControl: M = !0,
22
+ ...R
23
+ } = u, {
24
+ theme: t
25
+ } = v(), i = L(), g = N(null), [d, o] = x(C), l = () => {
26
+ const s = !d;
27
+ i.debug(`${e}: Toggle triggered (user interaction)`, {
28
+ isOpen: s
29
+ }), o(s), n == null || n(s);
26
30
  };
27
- return H(u, () => ({
28
- ref: c,
29
- isOpen: a,
30
- open: () => i(!0),
31
- close: () => i(!1),
32
- toggle: o
33
- })), /* @__PURE__ */ n(I, { className: "gd-chat-container", "data-testid": `${t}-main-wrapper`, theme: e, ref: c, ...w, styles: C, children: [
34
- a && /* @__PURE__ */ r(M, { theme: e, $variant: $, "data-testid": `${t}-sidebar-wrapper`, children: /* @__PURE__ */ n(v, { theme: e, "data-testid": `${t}-sidebar`, children: [
35
- l ? /* @__PURE__ */ n(R, { theme: e, "data-testid": `${t}-sidebar-header`, children: [
36
- /* @__PURE__ */ r(p, { theme: e, onClick: o, $open: a, children: /* @__PURE__ */ r(h, { ...f(e, "chat.toggleIcon", {
31
+ return I(S, () => ({
32
+ ref: g,
33
+ isOpen: d,
34
+ open: () => {
35
+ i.debug(`${e}: Ref method called - open()`), o(!0);
36
+ },
37
+ close: () => {
38
+ i.debug(`${e}: Ref method called - close()`), o(!1);
39
+ },
40
+ toggle: () => {
41
+ i.debug(`${e}: Ref method called - toggle()`), l();
42
+ }
43
+ })), /* @__PURE__ */ a(T, { className: "gd-chat-container", "data-testid": `${e}-main-wrapper`, theme: t, ref: g, ...R, styles: w, children: [
44
+ d && /* @__PURE__ */ r(j, { theme: t, "data-testid": `${e}-sidebar-wrapper`, children: /* @__PURE__ */ a(k, { theme: t, "data-testid": `${e}-sidebar`, children: [
45
+ m ? /* @__PURE__ */ a(A, { theme: t, "data-testid": `${e}-sidebar-header`, children: [
46
+ O && /* @__PURE__ */ r(h, { theme: t, onClick: l, $open: d, children: /* @__PURE__ */ r(b, { ...f(t, "chat.toggleIcon", {
37
47
  name: "arrowDown"
38
48
  }) }) }),
39
- l
49
+ m
40
50
  ] }) : null,
41
51
  y
42
52
  ] }) }),
43
- /* @__PURE__ */ n(j, { theme: e, "data-testid": `${t}-body`, children: [
44
- s ? /* @__PURE__ */ n(k, { theme: e, "data-testid": `${t}-main-header`, children: [
45
- !a && /* @__PURE__ */ r(p, { theme: e, onClick: o, children: /* @__PURE__ */ r(h, { ...f(e, "chat.toggleIcon", {
53
+ !d && p && /* @__PURE__ */ r(B, { theme: t, "data-testid": `${e}-sidebar-minified`, children: p }),
54
+ /* @__PURE__ */ a(D, { theme: t, "data-testid": `${e}-body`, children: [
55
+ c ? /* @__PURE__ */ a(E, { theme: t, "data-testid": `${e}-main-header`, children: [
56
+ !d && M && /* @__PURE__ */ r(h, { theme: t, onClick: l, children: /* @__PURE__ */ r(b, { ...f(t, "chat.toggleIcon", {
46
57
  name: "arrowDown"
47
58
  }) }) }),
48
- s
59
+ c
49
60
  ] }) : null,
50
- /* @__PURE__ */ r(A, { theme: e, "data-testid": `${t}-content`, children: b })
61
+ /* @__PURE__ */ r(W, { theme: t, "data-testid": `${e}-content`, children: $ })
51
62
  ] })
52
63
  ] });
53
64
  });
54
- E.displayName = t;
65
+ P.displayName = e;
55
66
  export {
56
- E as ChatContainer
67
+ P as ChatContainer
57
68
  };
@@ -1,13 +1,14 @@
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
- variant?: EnumOrPrimitive<ChatLayoutVariant>;
10
+ showSidebarAsideControl?: boolean;
11
+ showSidebarHeaderControl?: boolean;
11
12
  onToggleSidebar?: (open: boolean) => void;
12
13
  }
13
14
  export interface ChatContainerRef {
@@ -17,9 +18,7 @@ export interface ChatContainerRef {
17
18
  toggle: () => void;
18
19
  }
19
20
  export type ChatCommonStyledProps = PropsWithChildren<CommonCssComponentStyledProps>;
20
- export interface SidebarWrapperStyledProps extends CommonCssComponentStyledProps {
21
- $variant?: EnumOrPrimitive<ChatLayoutVariant>;
22
- }
21
+ export type SidebarWrapperStyledProps = CommonCssComponentStyledProps;
23
22
  export interface SidebarToggleButtonStyledProps extends CommonCssComponentStyledProps<HTMLButtonElement> {
24
23
  $open?: boolean;
25
24
  }
@@ -4,6 +4,7 @@ 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;
8
9
  export declare const ContentStyled: (props: ChatCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
9
10
  export declare const SidebarToggleButtonStyled: (props: SidebarToggleButtonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,133 +1,144 @@
1
- "use client";
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 l, tokensHandler as m, getMediaQuery as i } from "../../../tokens/utils.js";
5
- import { get as e } from "../../../utils/helpers.js";
3
+ import { getBoxStyles as l, tokensHandler as y, getMediaQuery as S } from "../../../tokens/utils.js";
4
+ import { get as s } from "../../../utils/helpers.js";
6
5
  import { ButtonVariant as u } from "../../../types/button.js";
7
6
  import { Button as x } from "../../core/Button/Button.js";
8
- const N = P((n, s) => {
7
+ const B = P((r, e) => {
9
8
  const {
10
9
  theme: {
11
10
  chat: t,
12
- ...r
11
+ ...n
13
12
  } = {},
14
13
  styles: c = {},
15
14
  ...a
16
- } = n, {
17
- boxStyles: p,
15
+ } = r, {
16
+ boxStyles: d,
18
17
  restProps: o
19
- } = l(a), y = new Proxy(t || {}, m(r)), S = [e(y, "wrapper.default", {}), p, c];
20
- return /* @__PURE__ */ d("div", { css: S, ...o, ref: s });
21
- }), k = (n) => {
18
+ } = l(a), m = new Proxy(t || {}, y(n)), i = [s(m, "wrapper.default", {}), d, c];
19
+ return /* @__PURE__ */ p("div", { css: i, ...o, ref: e });
20
+ }), k = (r) => {
22
21
  const {
23
22
  theme: {
24
- chat: s,
23
+ chat: e,
25
24
  ...t
26
25
  } = {},
27
- ...r
28
- } = n, {
26
+ ...n
27
+ } = r, {
29
28
  boxStyles: c,
30
29
  restProps: a
31
- } = l(r), p = new Proxy(s || {}, m(t)), o = [e(p, "mainHeader", {}), c];
32
- return /* @__PURE__ */ d("header", { css: o, ...a });
33
- }, v = (n) => {
30
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "mainHeader", {}), c];
31
+ return /* @__PURE__ */ p("header", { css: o, ...a });
32
+ }, H = (r) => {
34
33
  const {
35
34
  theme: {
36
- chat: s,
35
+ chat: e,
37
36
  ...t
38
37
  } = {},
39
- ...r
40
- } = n, {
38
+ ...n
39
+ } = r, {
41
40
  boxStyles: c,
42
41
  restProps: a
43
- } = l(r), p = new Proxy(s || {}, m(t)), o = [e(p, "body", {}), c];
44
- return /* @__PURE__ */ d("div", { css: o, ...a });
45
- }, H = (n) => {
42
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "body", {}), c];
43
+ return /* @__PURE__ */ p("div", { css: o, ...a });
44
+ }, M = (r) => {
46
45
  const {
47
46
  theme: {
48
- chat: s,
47
+ chat: e,
49
48
  ...t
50
49
  } = {},
51
- $variant: r,
52
- ...c
53
- } = n, {
54
- boxStyles: a,
55
- restProps: p
56
- } = l(c), o = new Proxy(s || {}, m(t)), y = [e(o, "sidebarWrapper.default", {}), e(o, ["sidebarWrapper", r, "default"], {}), i({
57
- max: e(t, "breakpoints.md")
58
- }, e(s, ["sidebarWrapper", r, "md"], (S) => ({}))(t)), a];
59
- return /* @__PURE__ */ d("div", { css: y, ...p });
60
- }, W = (n) => {
50
+ ...n
51
+ } = r, {
52
+ boxStyles: c,
53
+ restProps: a
54
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "sidebarWrapper.default", {}), S({
55
+ max: s(t, "breakpoints.md")
56
+ }, s(e, ["sidebarWrapper", "md"], (m) => ({}))(t)), c];
57
+ return /* @__PURE__ */ p("div", { css: o, ...a });
58
+ }, v = (r) => {
59
+ const {
60
+ theme: {
61
+ chat: e,
62
+ ...t
63
+ } = {},
64
+ ...n
65
+ } = r, {
66
+ boxStyles: c,
67
+ restProps: a
68
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "sidebar", {}), c];
69
+ return /* @__PURE__ */ p("aside", { css: o, ...a });
70
+ }, W = (r) => {
61
71
  const {
62
72
  theme: {
63
- chat: s,
73
+ chat: e,
64
74
  ...t
65
75
  } = {},
66
- ...r
67
- } = n, {
76
+ ...n
77
+ } = r, {
68
78
  boxStyles: c,
69
79
  restProps: a
70
- } = l(r), p = new Proxy(s || {}, m(t)), o = [e(p, "sidebar", {}), c];
71
- return /* @__PURE__ */ d("aside", { css: o, ...a });
72
- }, M = (n) => {
80
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "sidebarMinified", {}), c];
81
+ return /* @__PURE__ */ p("aside", { css: o, ...a });
82
+ }, T = (r) => {
73
83
  const {
74
84
  theme: {
75
- chat: s,
85
+ chat: e,
76
86
  ...t
77
87
  } = {},
78
- ...r
79
- } = n, {
88
+ ...n
89
+ } = r, {
80
90
  boxStyles: c,
81
91
  restProps: a
82
- } = l(r), p = new Proxy(s || {}, m(t)), o = [e(p, "sidebarHeader", {}), c];
83
- return /* @__PURE__ */ d("header", { css: o, ...a });
84
- }, T = (n) => {
92
+ } = l(n), d = new Proxy(e || {}, y(t)), o = [s(d, "sidebarHeader", {}), c];
93
+ return /* @__PURE__ */ p("header", { css: o, ...a });
94
+ }, j = (r) => {
85
95
  const {
86
96
  theme: {
87
- chat: s,
97
+ chat: e,
88
98
  ...t
89
99
  } = {},
90
- styles: r = {},
100
+ styles: n = {},
91
101
  ...c
92
- } = n, {
102
+ } = r, {
93
103
  boxStyles: a,
94
- restProps: p
95
- } = l(c), o = new Proxy(s || {}, m(t)), y = [e(o, "content.default", {}), i({
96
- max: e(t, "breakpoints.md")
97
- }, e(s, "content.md", {})), i({
98
- min: e(t, "breakpoints.md"),
99
- max: e(t, "breakpoints.xl")
100
- }, e(s, "content.mdXl", {})), i({
101
- min: e(t, "breakpoints.xl")
102
- }, e(s, "content.xl", {})), a, r];
103
- return /* @__PURE__ */ d("main", { css: y, ...p });
104
- }, $ = (n) => {
104
+ restProps: d
105
+ } = l(c), o = new Proxy(e || {}, y(t)), m = [s(o, "content.default", {}), S({
106
+ max: s(t, "breakpoints.md")
107
+ }, s(e, "content.md", {})), S({
108
+ min: s(t, "breakpoints.md"),
109
+ max: s(t, "breakpoints.xl")
110
+ }, s(e, "content.mdXl", {})), S({
111
+ min: s(t, "breakpoints.xl")
112
+ }, s(e, "content.xl", {})), a, n];
113
+ return /* @__PURE__ */ p("main", { css: m, ...d });
114
+ }, I = (r) => {
105
115
  const {
106
116
  theme: {
107
- chat: s,
117
+ chat: e,
108
118
  ...t
109
119
  } = {},
110
- $open: r,
120
+ $open: n,
111
121
  ...c
112
- } = n, {
122
+ } = r, {
113
123
  boxStyles: a,
114
- restProps: p
115
- } = l(c), o = new Proxy(s || {}, m(t)), y = r ? e(o, "toggleButton.open") : {}, S = e(o, "toggleButton.attrs", {
124
+ restProps: d
125
+ } = l(c), o = new Proxy(e || {}, y(t)), m = n ? s(o, "toggleButton.open") : {}, i = s(o, "toggleButton.attrs", {
116
126
  variant: u.Text
117
127
  }), h = {
118
- ...e(o, "toggleButton.default"),
119
- ...y,
128
+ ...s(o, "toggleButton.default"),
129
+ ...m,
120
130
  ...a
121
131
  };
122
- return /* @__PURE__ */ d(x, { ...S, ...p, isIcon: !0, styles: h });
132
+ return /* @__PURE__ */ p(x, { ...i, ...d, isIcon: !0, styles: h });
123
133
  };
124
134
  export {
125
- v as BodyStyled,
126
- T as ContentStyled,
135
+ H as BodyStyled,
136
+ j as ContentStyled,
127
137
  k as MainHeaderStyled,
128
- N as MainWrapperStyled,
129
- M as SidebarHeaderStyled,
130
- W as SidebarStyled,
131
- $ as SidebarToggleButtonStyled,
132
- H as SidebarWrapperStyled
138
+ B as MainWrapperStyled,
139
+ T as SidebarHeaderStyled,
140
+ W as SidebarMinifiedStyled,
141
+ v as SidebarStyled,
142
+ I as SidebarToggleButtonStyled,
143
+ M as SidebarWrapperStyled
133
144
  };
@@ -1,3 +1,2 @@
1
- export * from './positioning';
2
1
  export * from './timers';
3
2
  export * from './keyboard';
package/hooks/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './useAutoFocus';
4
4
  export * from './useMediaQuery';
5
5
  export * from './useKeyControls';
6
6
  export * from './useCarousel';
7
+ export * from './useLogger';
@@ -0,0 +1,11 @@
1
+ import { ILogger } from './useLogger.types';
2
+ export declare class NoOpLogger implements ILogger {
3
+ debug(): void;
4
+ info(): void;
5
+ warn(): void;
6
+ error(): void;
7
+ }
8
+ /**
9
+ * Create a no-op logger
10
+ */
11
+ export declare const noOpLogger: NoOpLogger;
@@ -0,0 +1,15 @@
1
+ class o {
2
+ debug() {
3
+ }
4
+ info() {
5
+ }
6
+ warn() {
7
+ }
8
+ error() {
9
+ }
10
+ }
11
+ const e = new o();
12
+ export {
13
+ o as NoOpLogger,
14
+ e as noOpLogger
15
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useLogger';
2
+ export * from './useLogger.types';
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { ILogger, LoggerProviderProps } from './useLogger.types';
3
+ export declare const LoggerProvider: ({ logger, isEnabled, children }: PropsWithChildren<LoggerProviderProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
4
+ export declare const useLogger: () => ILogger;