gd-design-library 1.2.1 → 1.4.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 (114) hide show
  1. package/ai/schemas/components/Image.d.ts +8 -0
  2. package/ai/schemas/components/InputFile.d.ts +1 -1
  3. package/ai/schemas/components/Menu.d.ts +5 -0
  4. package/ai/schemas/components/Switch.d.ts +5 -5
  5. package/ai/schemas/components/Table.d.ts +78 -0
  6. package/ai/schemas/components/Truncate.d.ts +46 -0
  7. package/components/core/Button/Button.js +14 -14
  8. package/components/core/Form/Form.stories.play.d.ts +4 -0
  9. package/components/core/Image/Image.d.ts +4 -0
  10. package/components/core/Image/Image.js +26 -24
  11. package/components/core/Image/Image.types.d.ts +10 -3
  12. package/components/core/Image/ImageStyled.js +39 -37
  13. package/components/core/Input/Input.js +61 -61
  14. package/components/core/Input/Input.types.d.ts +0 -1
  15. package/components/core/Input/InputWrapper/InputWrapper.js +10 -11
  16. package/components/core/Input/InputWrapper/InputWrapperStyled.js +13 -16
  17. package/components/core/Input/constants.d.ts +0 -1
  18. package/components/core/Input/constants.js +10 -12
  19. package/components/core/InputFile/InputFile.d.ts +4 -0
  20. package/components/core/Menu/Menu.js +77 -72
  21. package/components/core/Menu/Menu.types.d.ts +5 -1
  22. package/components/core/Menu/constants.d.ts +0 -8
  23. package/components/core/Modal/Modal.js +42 -53
  24. package/components/core/Modal/Modal.stories.play.d.ts +5 -0
  25. package/components/core/Modal/Modal.types.d.ts +1 -0
  26. package/components/core/Switch/Switch.js +35 -35
  27. package/components/core/Switch/Switch.types.d.ts +4 -4
  28. package/components/core/Table/Table.d.ts +2 -0
  29. package/components/core/Table/Table.js +275 -0
  30. package/components/core/Table/Table.types.d.ts +94 -0
  31. package/components/core/Table/TableBody.d.ts +2 -0
  32. package/components/core/Table/TableBody.js +20 -0
  33. package/components/core/Table/TableCell.d.ts +2 -0
  34. package/components/core/Table/TableCell.js +20 -0
  35. package/components/core/Table/TableFooter.d.ts +2 -0
  36. package/components/core/Table/TableFooter.js +21 -0
  37. package/components/core/Table/TableHead.d.ts +2 -0
  38. package/components/core/Table/TableHead.js +20 -0
  39. package/components/core/Table/TableHeaderCell.d.ts +2 -0
  40. package/components/core/Table/TableHeaderCell.js +20 -0
  41. package/components/core/Table/TablePagination.d.ts +2 -0
  42. package/components/core/Table/TablePagination.js +66 -0
  43. package/components/core/Table/TableRow.d.ts +2 -0
  44. package/components/core/Table/TableRow.js +28 -0
  45. package/components/core/Table/TableStyled.d.ts +11 -0
  46. package/components/core/Table/TableStyled.js +141 -0
  47. package/components/core/Table/constants.d.ts +9 -0
  48. package/components/core/Table/constants.js +12 -0
  49. package/components/core/Table/index.d.ts +9 -0
  50. package/components/core/Tooltip/Tooltip.js +49 -58
  51. package/components/core/Truncate/Truncate.d.ts +2 -0
  52. package/components/core/Truncate/Truncate.js +52 -0
  53. package/components/core/Truncate/Truncate.types.d.ts +12 -0
  54. package/components/core/Truncate/TruncateStyled.d.ts +2 -0
  55. package/components/core/Truncate/TruncateStyled.js +22 -0
  56. package/components/core/Truncate/constants.d.ts +1 -0
  57. package/components/core/Truncate/constants.js +4 -0
  58. package/components/core/Truncate/index.d.ts +2 -0
  59. package/components/core/index.d.ts +2 -0
  60. package/components/domainSpecific/Accordion/Accordion.d.ts +1 -1
  61. package/components/domainSpecific/Accordion/Accordion.js +38 -29
  62. package/components/domainSpecific/Accordion/Accordion.types.d.ts +4 -0
  63. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +17 -16
  64. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.d.ts +1 -1
  65. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +14 -14
  66. package/components/domainSpecific/Accordion/AccordionStyled.js +25 -22
  67. package/components/domainSpecific/Accordion/constants.js +6 -5
  68. package/components/domainSpecific/Card/Card.stories.play.d.ts +4 -0
  69. package/components/domainSpecific/ChatBubble/ChatBubbleStyled.js +11 -11
  70. package/components/domainSpecific/Counter/Counter.stories.play.d.ts +6 -0
  71. package/components/domainSpecific/DragAndDropFiles/DragAndDropFiles.stories.play.d.ts +5 -0
  72. package/components/domainSpecific/Header/Header.stories.play.d.ts +9 -0
  73. package/components/domainSpecific/Price/Price.stories.play.d.ts +8 -0
  74. package/components/domainSpecific/Search/Search.js +4 -4
  75. package/components/domainSpecific/Search/Search.stories.play.d.ts +5 -0
  76. package/components/domainSpecific/SearchModal/SearchModal.stories.play.d.ts +2 -0
  77. package/components/widget/DragAndDrop/DragAndDrop.stories.play.d.ts +6 -0
  78. package/hooks/useMediaQuery/useMediaQuery.d.ts +3 -0
  79. package/hooks/useTheme/NoOpTheme.d.ts +177 -19
  80. package/index.js +336 -316
  81. package/llms.txt +20 -4
  82. package/package.json +4 -2
  83. package/tokens/accordion.d.ts +17 -4
  84. package/tokens/accordion.js +19 -6
  85. package/tokens/borders.d.ts +1 -1
  86. package/tokens/borders.js +8 -9
  87. package/tokens/button.d.ts +1 -1
  88. package/tokens/chatbubble.d.ts +2 -1
  89. package/tokens/chatbubble.js +4 -3
  90. package/tokens/defaultTheme.d.ts +177 -19
  91. package/tokens/defaultTheme.js +24 -20
  92. package/tokens/index.d.ts +36 -15
  93. package/tokens/index.js +8 -5
  94. package/tokens/input.d.ts +14 -13
  95. package/tokens/input.js +50 -49
  96. package/tokens/menu.d.ts +7 -0
  97. package/tokens/menu.js +7 -0
  98. package/tokens/select.d.ts +1 -0
  99. package/tokens/select.js +6 -5
  100. package/tokens/table.d.ts +124 -0
  101. package/tokens/table.js +128 -0
  102. package/tokens/tooltip.d.ts +2 -1
  103. package/tokens/tooltip.js +2 -1
  104. package/tokens/truncate.d.ts +9 -0
  105. package/tokens/truncate.js +12 -0
  106. package/tokens/utils.d.ts +1 -1
  107. package/tokens/utils.js +32 -33
  108. package/utils/play/formUtils.d.ts +27 -0
  109. package/utils/play/imageUtils.d.ts +12 -0
  110. package/utils/play/index.d.ts +6 -0
  111. package/utils/play/interactionUtils.d.ts +16 -0
  112. package/utils/play/mockUtils.d.ts +43 -0
  113. package/utils/play/modalUtils.d.ts +26 -0
  114. package/utils/play/waitUtils.d.ts +47 -0
@@ -15,14 +15,22 @@ declare const _default: {
15
15
  keyboardSupport: boolean;
16
16
  screenReaderSupport: boolean;
17
17
  props: ({
18
+ name: string;
19
+ type: string;
20
+ description: string;
21
+ default: string;
22
+ required?: undefined;
23
+ } | {
18
24
  name: string;
19
25
  type: string;
20
26
  description: string;
21
27
  required: boolean;
28
+ default?: undefined;
22
29
  } | {
23
30
  name: string;
24
31
  type: string;
25
32
  description: string;
33
+ default?: undefined;
26
34
  required?: undefined;
27
35
  })[];
28
36
  examples: string[];
@@ -25,7 +25,7 @@ declare const _default: {
25
25
  name: string;
26
26
  type: string;
27
27
  description: string;
28
- enum: (string | boolean)[];
28
+ enum: readonly ["user", "environment"];
29
29
  default: string;
30
30
  required?: undefined;
31
31
  } | {
@@ -29,6 +29,11 @@ declare const _default: {
29
29
  type: string;
30
30
  description: string;
31
31
  default: string;
32
+ } | {
33
+ name: string;
34
+ type: string;
35
+ description: string;
36
+ default: number;
32
37
  })[];
33
38
  examples: string[];
34
39
  };
@@ -18,20 +18,20 @@ declare const _default: {
18
18
  name: string;
19
19
  type: string;
20
20
  description: string;
21
- default: boolean;
21
+ default?: undefined;
22
22
  enum?: undefined;
23
23
  } | {
24
24
  name: string;
25
25
  type: string;
26
26
  description: string;
27
- default: string;
28
- enum: string[];
27
+ default: boolean;
28
+ enum?: undefined;
29
29
  } | {
30
30
  name: string;
31
31
  type: string;
32
32
  description: string;
33
- default?: undefined;
34
- enum?: undefined;
33
+ default: string;
34
+ enum: string[];
35
35
  } | {
36
36
  name: string;
37
37
  type: string;
@@ -0,0 +1,78 @@
1
+ declare const _default: {
2
+ component: {
3
+ name: string;
4
+ import: string;
5
+ description: string;
6
+ category: string;
7
+ complexity: string;
8
+ accessibility: string;
9
+ performance: string;
10
+ dependencies: string[];
11
+ peerDependencies: string[];
12
+ bundleSize: string;
13
+ browserSupport: string;
14
+ touchSupport: boolean;
15
+ keyboardSupport: boolean;
16
+ screenReaderSupport: boolean;
17
+ props: ({
18
+ name: string;
19
+ type: string;
20
+ description: string;
21
+ required: boolean;
22
+ example: string;
23
+ default?: undefined;
24
+ } | {
25
+ name: string;
26
+ type: string;
27
+ description: string;
28
+ default: boolean;
29
+ required?: undefined;
30
+ example?: undefined;
31
+ } | {
32
+ name: string;
33
+ type: string;
34
+ description: string;
35
+ default: number;
36
+ required?: undefined;
37
+ example?: undefined;
38
+ } | {
39
+ name: string;
40
+ type: string;
41
+ description: string;
42
+ example: string;
43
+ required?: undefined;
44
+ default?: undefined;
45
+ } | {
46
+ name: string;
47
+ type: string;
48
+ description: string;
49
+ default: number[];
50
+ example: string;
51
+ required?: undefined;
52
+ } | {
53
+ name: string;
54
+ type: string;
55
+ description: string;
56
+ required?: undefined;
57
+ example?: undefined;
58
+ default?: undefined;
59
+ })[];
60
+ ref: {
61
+ type: string;
62
+ description: string;
63
+ methods: {
64
+ name: string;
65
+ type: string;
66
+ description: string;
67
+ example: string;
68
+ }[];
69
+ example: string;
70
+ };
71
+ examples: string[];
72
+ bestPractices: string[];
73
+ commonMistakes: string[];
74
+ relatedComponents: string[];
75
+ };
76
+ compositionTips: string[];
77
+ };
78
+ export default _default;
@@ -0,0 +1,46 @@
1
+ declare const _default: {
2
+ component: {
3
+ name: string;
4
+ import: string;
5
+ description: string;
6
+ category: string;
7
+ complexity: string;
8
+ accessibility: string;
9
+ performance: string;
10
+ dependencies: string[];
11
+ peerDependencies: string[];
12
+ bundleSize: string;
13
+ browserSupport: string;
14
+ touchSupport: boolean;
15
+ keyboardSupport: boolean;
16
+ screenReaderSupport: boolean;
17
+ props: ({
18
+ name: string;
19
+ type: string;
20
+ description: string;
21
+ required: boolean;
22
+ default?: undefined;
23
+ } | {
24
+ name: string;
25
+ type: string;
26
+ description: string;
27
+ default: number;
28
+ required?: undefined;
29
+ } | {
30
+ name: string;
31
+ type: string;
32
+ description: string;
33
+ default: {};
34
+ required?: undefined;
35
+ } | {
36
+ name: string;
37
+ type: string;
38
+ description: string;
39
+ required?: undefined;
40
+ default?: undefined;
41
+ })[];
42
+ examples: string[];
43
+ };
44
+ compositionTips: string[];
45
+ };
46
+ export default _default;
@@ -8,32 +8,32 @@ import { ButtonVariant as v, ButtonTypes as P, ButtonRole as M } from "../../../
8
8
  import { useTheme as O } from "../../../hooks/useTheme/useTheme.js";
9
9
  import { get as R } from "../../../utils/helpers.js";
10
10
  import { TabIndex as W } from "../../../types/accesability.js";
11
- const g = x((u, m) => {
11
+ const g = x((s, u) => {
12
12
  const {
13
13
  theme: t
14
14
  } = O(), {
15
- variant: c = v.Primary,
16
- rounded: f = R(t, "button.attrs.rounded", "none"),
15
+ variant: m = v.Primary,
16
+ rounded: c = R(t, "button.attrs.rounded", "none"),
17
17
  children: o,
18
18
  iconStart: r = null,
19
19
  iconEnd: a = null,
20
- type: p = P.Button,
21
- disabled: y = !1,
22
- isIcon: h = !1,
20
+ type: f = P.Button,
21
+ disabled: p = !1,
22
+ isIcon: y = !1,
23
23
  ariaLabel: i,
24
24
  ariaPressed: l,
25
- role: B = M.Button,
26
- fullWidth: I = !1,
27
- tabIndex: S = W.Default,
28
- onClick: $,
25
+ role: h = M.Button,
26
+ fullWidth: B = !1,
27
+ tabIndex: I = W.Default,
28
+ onClick: S,
29
29
  justifyContent: d,
30
- ...s
31
- } = u;
32
- return /* @__PURE__ */ b(C, { ref: m, $variant: c, $isIcon: h, $fullWidth: I, $rounded: f, disabled: y, onClick: $, type: p, role: B, theme: t, tabIndex: S, "data-testid": e, ...T(s), ...i ? {
30
+ ...$
31
+ } = s;
32
+ return /* @__PURE__ */ b(C, { ref: u, $variant: m, $isIcon: y, $fullWidth: B, $rounded: c, disabled: p, onClick: S, type: f, role: h, theme: t, tabIndex: I, "data-testid": e, ...T($), ...i ? {
33
33
  "aria-label": i
34
34
  } : {}, ...l ? {
35
35
  "aria-pressed": l
36
- } : {}, ...s, children: [
36
+ } : {}, children: [
37
37
  r ? /* @__PURE__ */ n(E, { theme: t, "data-testid": `${e}-icon-start`, children: r }) : null,
38
38
  o ? /* @__PURE__ */ n(N, { theme: t, styles: d ? {
39
39
  justifyContent: d
@@ -0,0 +1,4 @@
1
+ import { StoryContext } from '@storybook/types';
2
+ export declare const withSubmitActions: ({ args, canvasElement, step }: StoryContext) => Promise<void>;
3
+ export declare const withOnChangeActions: ({ args, canvasElement, step }: StoryContext) => Promise<void>;
4
+ export declare const validationErrorsActions: ({ args, canvasElement, step }: StoryContext) => Promise<void>;
@@ -1,2 +1,6 @@
1
1
  import { ImageProps } from './';
2
+ /**
3
+ * @TODO: Cerebra
4
+ * - as span
5
+ */
2
6
  export declare const Image: import('react').ForwardRefExoticComponent<ImageProps & import('react').RefAttributes<HTMLImageElement>>;
@@ -1,40 +1,42 @@
1
1
  "use client";
2
- import { jsxs as x, jsx as a } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as P, useState as p, useCallback as f } from "react";
2
+ import { jsxs as A, jsx as r } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as F, useState as f, useCallback as u } from "react";
4
4
  import { COMPONENT_NAME as e } from "./constants.js";
5
- import { ImageWrapperStyled as F, PlaceholderStyled as M, ImageStyled as O, CaptionStyled as T } from "./ImageStyled.js";
6
- import { Skeleton as A } from "../Skeleton/Skeleton.js";
7
- import { useTheme as R } from "../../../hooks/useTheme/useTheme.js";
8
- const W = P((u, g) => {
5
+ import { ImageWrapperStyled as M, PlaceholderStyled as O, ImageStyled as T, CaptionStyled as R } from "./ImageStyled.js";
6
+ import { Skeleton as W } from "../Skeleton/Skeleton.js";
7
+ import { useTheme as _ } from "../../../hooks/useTheme/useTheme.js";
8
+ const q = F((g, S) => {
9
9
  const {
10
- id: S,
11
- src: l,
12
- alt: k,
13
- width: s,
10
+ id: k,
11
+ src: s,
12
+ alt: C,
13
+ width: l,
14
14
  height: i,
15
15
  placeholder: d,
16
16
  caption: c,
17
- onClick: C,
17
+ onClick: $,
18
18
  onLoad: t,
19
19
  onError: o,
20
20
  objectFit: b,
21
21
  fallbackComponent: n,
22
22
  styles: y,
23
- ...w
24
- } = u, {
25
- theme: r
26
- } = R(), [h, m] = p(!0), [E, I] = p(!1), L = h && d && l, N = (E || !l) && n, $ = f(() => {
27
- m(!1), t == null || t();
28
- }, [t]), j = f(() => {
29
- m(!1), I(!0), o == null || o();
23
+ as: h,
24
+ captionAs: w,
25
+ ...E
26
+ } = g, {
27
+ theme: a
28
+ } = _(), [m, p] = f(!0), [I, L] = f(!1), N = m && d && s, j = (I || !s) && n, x = u(() => {
29
+ p(!1), t == null || t();
30
+ }, [t]), P = u(() => {
31
+ p(!1), L(!0), o == null || o();
30
32
  }, [o]);
31
- return /* @__PURE__ */ x(F, { "data-testid": `${e}-wrapper`, id: S, width: s, height: i, theme: r, ...w, children: [
32
- L && /* @__PURE__ */ a(M, { "data-testid": `${e}-placeholder`, theme: r, children: /* @__PURE__ */ a(A, { height: "100%", children: d }) }),
33
- N ? n : /* @__PURE__ */ a(O, { "data-testid": e, theme: r, src: l, alt: k, width: s, height: i, objectFit: b, $isLoading: h, onLoad: $, onError: j, onClick: C, styles: y, ref: g }),
34
- c && /* @__PURE__ */ a(T, { "data-testid": `${e}-caption`, theme: r, children: c })
33
+ return /* @__PURE__ */ A(M, { "data-testid": `${e}-wrapper`, id: k, width: l, height: i, theme: a, $as: h, ...E, children: [
34
+ N && /* @__PURE__ */ r(O, { "data-testid": `${e}-placeholder`, $as: h, theme: a, children: /* @__PURE__ */ r(W, { height: "100%", children: d }) }),
35
+ j ? n : /* @__PURE__ */ r(T, { "data-testid": e, theme: a, src: s, alt: C, width: l, height: i, objectFit: b, $isLoading: m, onLoad: x, onError: P, onClick: $, styles: y, ref: S }),
36
+ c && /* @__PURE__ */ r(R, { "data-testid": `${e}-caption`, $as: w, theme: a, children: c })
35
37
  ] });
36
38
  });
37
- W.displayName = e;
39
+ q.displayName = e;
38
40
  export {
39
- W as Image
41
+ q as Image
40
42
  };
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ElementType, ReactNode } from 'react';
2
2
  import { CommonCssComponentProps, CommonCssComponentStyledProps } from '../..';
3
3
  export interface ImageProps extends CommonCssComponentProps {
4
4
  id?: string;
@@ -13,8 +13,11 @@ export interface ImageProps extends CommonCssComponentProps {
13
13
  placeholder?: ReactNode;
14
14
  fallbackComponent?: ReactNode;
15
15
  objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
16
+ as?: keyof HTMLElementTagNameMap | ElementType;
17
+ captionAs?: keyof HTMLElementTagNameMap | ElementType;
16
18
  }
17
19
  export interface ImageWrapperStyledProps extends Pick<ImageProps, 'width' | 'height' | 'id' | 'className'>, CommonCssComponentStyledProps {
20
+ $as?: keyof HTMLElementTagNameMap | ElementType;
18
21
  }
19
22
  export interface ImageStyledProps extends Pick<ImageProps, 'objectFit'>, CommonCssComponentStyledProps<HTMLImageElement> {
20
23
  $isLoading?: boolean;
@@ -23,5 +26,9 @@ export interface ImageStyledProps extends Pick<ImageProps, 'objectFit'>, CommonC
23
26
  width?: number;
24
27
  height?: number;
25
28
  }
26
- export type ImagePlaceholderStyledProps = CommonCssComponentStyledProps;
27
- export type ImageCaptionStyledProps = CommonCssComponentStyledProps;
29
+ export interface ImagePlaceholderStyledProps extends CommonCssComponentStyledProps {
30
+ $as?: keyof HTMLElementTagNameMap | ElementType;
31
+ }
32
+ export interface ImageCaptionStyledProps extends CommonCssComponentStyledProps {
33
+ $as?: keyof HTMLElementTagNameMap | ElementType;
34
+ }
@@ -1,76 +1,78 @@
1
- "use client";
2
- import { jsx as l } from "@emotion/react/jsx-runtime";
1
+ import { jsx as a } from "@emotion/react/jsx-runtime";
3
2
  import { forwardRef as x } from "react";
4
- import { getBoxStyles as i, tokensHandler as y } from "../../../tokens/utils.js";
3
+ import { getBoxStyles as y, tokensHandler as i } from "../../../tokens/utils.js";
5
4
  import { get as d } from "../../../utils/helpers.js";
6
- const $ = (s) => {
5
+ const I = (s) => {
7
6
  const {
8
7
  width: t,
9
8
  height: e,
9
+ $as: o = "div",
10
10
  theme: {
11
- image: o,
12
- ...r
11
+ image: r,
12
+ ...n
13
13
  } = {},
14
- styles: c,
15
- ...n
14
+ styles: p,
15
+ ...c
16
16
  } = s, {
17
- boxStyles: p,
18
- restProps: m
19
- } = i(n), a = new Proxy(o || {}, y(r)), h = [d(a, "wrapper", {}), {
17
+ boxStyles: m,
18
+ restProps: l
19
+ } = y(c), h = new Proxy(r || {}, i(n)), g = [d(h, "wrapper", {}), {
20
20
  width: `${t ? `${t}px` : "100%"}`,
21
21
  height: `${e ? `${e}px` : "100%"}`
22
- }, p, c];
23
- return /* @__PURE__ */ l("div", { css: h, ...m });
22
+ }, m, p];
23
+ return /* @__PURE__ */ a(o, { css: g, ...l });
24
24
  }, b = x((s, t) => {
25
25
  const {
26
26
  objectFit: e = "cover",
27
27
  $isLoading: o,
28
28
  theme: {
29
29
  image: r,
30
- ...c
30
+ ...n
31
31
  } = {},
32
- styles: n,
33
- width: p,
32
+ styles: p,
33
+ width: c,
34
34
  height: m,
35
- ...a
35
+ ...l
36
36
  } = s, {
37
37
  boxStyles: h,
38
38
  restProps: g
39
- } = i(a), P = new Proxy(r || {}, y(c)), S = [d(P, "default", {}), {
39
+ } = y(l), P = new Proxy(r || {}, i(n)), S = [d(P, "default", {}), {
40
40
  objectFit: e,
41
41
  opacity: `${o ? 0 : 1}`
42
- }, h, n];
43
- return /* @__PURE__ */ l("img", { css: S, width: p, height: m, ...g, ref: t });
44
- }), N = (s) => {
42
+ }, h, p];
43
+ return /* @__PURE__ */ a("img", { css: S, width: c, height: m, ...g, ref: t });
44
+ }), C = (s) => {
45
45
  const {
46
46
  theme: {
47
47
  image: t,
48
48
  ...e
49
49
  } = {},
50
- styles: o,
51
- ...r
50
+ $as: o = "span",
51
+ styles: r,
52
+ ...n
52
53
  } = s, {
53
- boxStyles: c,
54
- restProps: n
55
- } = i(r), p = new Proxy(t || {}, y(e)), m = [d(p, "placeholder", {}), c, o];
56
- return /* @__PURE__ */ l("div", { css: m, ...n });
57
- }, v = (s) => {
54
+ boxStyles: p,
55
+ restProps: c
56
+ } = y(n), m = new Proxy(t || {}, i(e)), l = [d(m, "placeholder", {}), p, r];
57
+ return /* @__PURE__ */ a(o, { css: l, ...c });
58
+ }, N = (s) => {
58
59
  const {
59
60
  theme: {
60
61
  image: t,
61
62
  ...e
62
63
  } = {},
63
- styles: o,
64
- ...r
64
+ $as: o = "figcaption",
65
+ styles: r,
66
+ ...n
65
67
  } = s, {
66
- boxStyles: c,
67
- restProps: n
68
- } = i(r), p = new Proxy(t || {}, y(e)), m = [d(p, "caption", {}), c, o];
69
- return /* @__PURE__ */ l("figcaption", { css: m, ...n });
68
+ boxStyles: p,
69
+ restProps: c
70
+ } = y(n), m = new Proxy(t || {}, i(e)), l = [d(m, "caption", {}), p, r];
71
+ return /* @__PURE__ */ a(o, { css: l, ...c });
70
72
  };
71
73
  export {
72
- v as CaptionStyled,
74
+ N as CaptionStyled,
73
75
  b as ImageStyled,
74
- $ as ImageWrapperStyled,
75
- N as PlaceholderStyled
76
+ I as ImageWrapperStyled,
77
+ C as PlaceholderStyled
76
78
  };
@@ -1,73 +1,73 @@
1
1
  "use client";
2
- import { jsxs as t, jsx as r, Fragment as L } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as P } from "react";
4
- import { DEFAULT_PROPS as e, COMPONENT_NAME as o, FOCUS_EXCLUDED_LIST as U } from "./constants.js";
5
- import { useInputHandlers as g } from "./useInputHandlers.js";
6
- import { InputStyled as j } from "./InputStyled.js";
7
- import { InputWrapper as c } from "./InputWrapper/InputWrapper.js";
2
+ import { jsxs as s, jsx as r, Fragment as j } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as q } from "react";
4
+ import { COMPONENT_NAME as o, DEFAULT_PROPS as e, FOCUS_EXCLUDED_LIST as x } from "./constants.js";
5
+ import { useInputHandlers as z } from "./useInputHandlers.js";
6
+ import { InputStyled as D } from "./InputStyled.js";
7
+ import { InputWrapper as l } from "./InputWrapper/InputWrapper.js";
8
8
  import { InputHelper as u } from "./InputHelper/InputHelper.js";
9
- import { InputAdornment as h } from "./InputAdornment/InputAdornment.js";
10
- import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
11
- import { SizeVariant as z } from "../../../types/common.js";
12
- const B = P((f, b) => {
9
+ import { InputAdornment as f } from "./InputAdornment/InputAdornment.js";
10
+ import { useTheme as T } from "../../../hooks/useTheme/useTheme.js";
11
+ import { SizeVariant as g } from "../../../types/common.js";
12
+ const G = q(({
13
+ wrapperAs: h = "label",
14
+ // Layout props
15
+ styles: I = {},
16
+ className: _ = "",
17
+ width: N,
18
+ // Input behavior props
19
+ variant: n = e.variant,
20
+ color: m = e.color,
21
+ disabled: S = e.disabled,
22
+ readOnly: O = e.readOnly,
23
+ // Accessibility props
24
+ ariaRequired: w = e.ariaRequired,
25
+ role: y = e.role,
26
+ tabIndex: E = e.tabIndex,
27
+ ariaDescribedBy: a,
28
+ // Event handling props
29
+ debounceCallbackTime: F,
30
+ onChange: M,
31
+ onKeyDown: $,
32
+ onMouseDown: b,
33
+ onBlur: A,
34
+ // Adornments
35
+ adornmentStart: p,
36
+ adornmentEnd: d,
37
+ // Helper text
38
+ label: i,
39
+ helperText: t,
40
+ ...C
41
+ }, H) => {
13
42
  const {
14
- theme: I
15
- } = v(), {
16
- wrapperAs: y = "label",
17
- // Layout props
18
- width: w,
19
- className: N = e.className,
20
- styles: S = e.styles,
21
- // Input behavior props
22
- variant: s = e.variant,
23
- color: i = e.color,
24
- disabled: _ = e.disabled,
25
- readOnly: x = e.readOnly,
26
- // Accessibility props
27
- ariaRequired: D = e.ariaRequired,
28
- role: E = e.role,
29
- tabIndex: O = e.tabIndex,
30
- ariaDescribedBy: l,
31
- // Event handling props
32
- debounceCallbackTime: T,
33
- onChange: C,
34
- onKeyDown: M,
35
- onMouseDown: A,
36
- onBlur: F,
37
- // Adornments
38
- adornmentStart: d,
39
- adornmentEnd: m,
40
- // Helper text
41
- label: a,
42
- helperText: n,
43
- ...R
44
- } = f, p = !U.includes(s), $ = !!(a || n), {
45
- handlers: q,
46
- isMouseInteraction: H
47
- } = g({
48
- onKeyDown: M,
49
- onBlur: F,
50
- onMouseDown: A,
51
- onChange: C,
52
- debounceCallbackTime: T
43
+ theme: L
44
+ } = T(), c = !x.includes(n), P = !!(i || t), {
45
+ handlers: R,
46
+ isMouseInteraction: U
47
+ } = z({
48
+ onKeyDown: $,
49
+ onBlur: A,
50
+ onMouseDown: b,
51
+ onChange: M,
52
+ debounceCallbackTime: F
53
53
  });
54
- return /* @__PURE__ */ t(c, { as: y, withGap: $, className: N, width: w, styles: S, children: [
55
- a && /* @__PURE__ */ r(u, { children: a }),
56
- /* @__PURE__ */ t(c, { width: "100%", children: [
57
- d && /* @__PURE__ */ r(h, { children: d }),
58
- /* @__PURE__ */ r(j, { $isMouseInteraction: H && p, $color: i, ref: b, disabled: _, role: E, theme: I, type: s, readOnly: x, tabIndex: O, "aria-required": D, "data-testid": o, ...q, ...l ? {
59
- "aria-describedby": l
60
- } : {}, ...R }),
61
- p && /* @__PURE__ */ t(L, { children: [
54
+ return /* @__PURE__ */ s(l, { as: h, withGap: P, className: _, width: N, styles: I, children: [
55
+ i && /* @__PURE__ */ r(u, { children: i }),
56
+ /* @__PURE__ */ s(l, { width: "100%", children: [
57
+ p && /* @__PURE__ */ r(f, { children: p }),
58
+ /* @__PURE__ */ r(D, { $isMouseInteraction: U && c, $color: m, ref: H, disabled: S, role: y, theme: L, type: n, readOnly: O, tabIndex: E, "aria-required": w, "data-testid": o, ...R, ...a ? {
59
+ "aria-describedby": a
60
+ } : {}, ...C }),
61
+ c && /* @__PURE__ */ s(j, { children: [
62
62
  /* @__PURE__ */ r("span", { className: `${o}__border` }),
63
63
  /* @__PURE__ */ r("span", { className: `${o}__outline` })
64
64
  ] }),
65
- m && /* @__PURE__ */ r(h, { children: m })
65
+ d && /* @__PURE__ */ r(f, { children: d })
66
66
  ] }),
67
- n && /* @__PURE__ */ r(u, { color: i, size: z.Sm, children: n })
67
+ t && /* @__PURE__ */ r(u, { color: m, size: g.Sm, children: t })
68
68
  ] });
69
69
  });
70
- B.displayName = o;
70
+ G.displayName = o;
71
71
  export {
72
- B as Input
72
+ G as Input
73
73
  };
@@ -57,7 +57,6 @@ export interface InputHelperProps extends CommonCssComponentProps, PropsWithChil
57
57
  }
58
58
  export interface InputWrapperPropsStyled extends CommonCssComponentStyledProps<HTMLBaseElement>, PropsWithChildren {
59
59
  $as?: keyof HTMLElementTagNameMap | ElementType;
60
- $width?: string;
61
60
  $withGap?: boolean;
62
61
  }
63
62
  export interface InputHelperPropsStyled extends CommonCssComponentStyledProps, PropsWithChildren {
@@ -1,22 +1,21 @@
1
1
  "use client";
2
- import { jsx as d } from "@emotion/react/jsx-runtime";
2
+ import { jsx as s } from "@emotion/react/jsx-runtime";
3
3
  import { forwardRef as f } from "react";
4
- import { COMPONENT_NAME as t } from "./constants.js";
4
+ import { COMPONENT_NAME as r } from "./constants.js";
5
5
  import { InputWrapperStyled as n } from "./InputWrapperStyled.js";
6
- import { useTheme as h } from "../../../../hooks/useTheme/useTheme.js";
7
- const c = f((r, e) => {
6
+ import { useTheme as d } from "../../../../hooks/useTheme/useTheme.js";
7
+ const c = f((t, e) => {
8
8
  const {
9
9
  theme: o
10
- } = h(), {
10
+ } = d(), {
11
11
  children: p,
12
- as: i,
13
- width: m,
12
+ as: m,
14
13
  withGap: a,
15
- ...s
16
- } = r;
17
- return /* @__PURE__ */ d(n, { $as: i, $width: m, $withGap: a, ref: e, theme: o, "data-testid": t, ...s, children: p });
14
+ ...i
15
+ } = t;
16
+ return /* @__PURE__ */ s(n, { $as: m, $withGap: a, ref: e, theme: o, "data-testid": r, ...i, children: p });
18
17
  });
19
- c.displayName = t;
18
+ c.displayName = r;
20
19
  export {
21
20
  c as InputWrapper
22
21
  };