gd-design-library 0.4.0 → 0.5.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 (110) hide show
  1. package/CHANGELOG.md +36 -3
  2. package/assets/styles.css +1 -1
  3. package/components/core/DropdownItem/DropdownItem.js +30 -24
  4. package/components/core/DropdownItem/DropdownItemStyled.d.ts +1 -1
  5. package/components/core/Icon/Icon.js +25 -18
  6. package/components/core/Icon/Icon.types.d.ts +2 -0
  7. package/components/core/Image/Image.js +31 -30
  8. package/components/core/Image/Image.types.d.ts +2 -0
  9. package/components/core/Input/Input.d.ts +1 -1
  10. package/components/core/Input/Input.js +45 -44
  11. package/components/core/Input/Input.types.d.ts +3 -2
  12. package/components/core/Input/InputAdornment/InputAdornmentStyled.js +3 -3
  13. package/components/core/Input/InputHelper/InputHelperStyled.js +3 -3
  14. package/components/core/Input/InputStyled.d.ts +1 -1
  15. package/components/core/Input/InputWrapper/InputWrapper.js +6 -6
  16. package/components/core/Input/InputWrapper/InputWrapperStyled.js +10 -10
  17. package/components/core/Input/InputWrapper/constants.d.ts +0 -1
  18. package/components/core/Input/InputWrapper/constants.js +2 -3
  19. package/components/core/Label/Label.js +22 -21
  20. package/components/core/Label/Label.types.d.ts +3 -3
  21. package/components/core/Label/LabelStyled.d.ts +1 -1
  22. package/components/core/Label/LabelStyled.js +13 -9
  23. package/components/core/Loader/Loader.d.ts +1 -1
  24. package/components/core/Loader/Loader.js +20 -19
  25. package/components/core/Loader/Loader.types.d.ts +2 -1
  26. package/components/core/Loader/LoaderStyled.d.ts +1 -1
  27. package/components/core/Loader/LoaderStyled.js +12 -12
  28. package/components/core/Loader/utils.js +8 -8
  29. package/components/core/Menu/Menu.js +7 -7
  30. package/components/core/Modal/Modal.types.d.ts +4 -4
  31. package/components/core/Modal/ModalStyled.js +1 -1
  32. package/components/core/Portal/Portal.d.ts +1 -1
  33. package/components/core/Portal/Portal.js +12 -11
  34. package/components/core/Portal/Portal.types.d.ts +2 -1
  35. package/components/core/Select/Select.js +79 -82
  36. package/components/core/Select/Select.types.d.ts +3 -2
  37. package/components/core/Select/SelectStyled.js +6 -6
  38. package/components/core/Snackbar/Snackbar.js +25 -23
  39. package/components/core/Snackbar/Snackbar.types.d.ts +1 -0
  40. package/components/core/Snackbar/SnackbarManager.js +9 -9
  41. package/components/core/Snackbar/SnackbarStyled.js +3 -5
  42. package/components/core/Textarea/Textarea.d.ts +1 -1
  43. package/components/core/Textarea/Textarea.js +28 -34
  44. package/components/core/Textarea/Textarea.types.d.ts +1 -19
  45. package/components/core/Textarea/TextareaStyled.d.ts +1 -1
  46. package/components/core/Textarea/TextareaStyled.js +19 -21
  47. package/components/core/Textarea/hooks/useDynamicHeightAdjustment.d.ts +2 -2
  48. package/components/core/Tooltip/Tooltip.d.ts +1 -1
  49. package/components/core/Tooltip/Tooltip.js +24 -24
  50. package/components/core/Tooltip/Tooltip.types.d.ts +8 -10
  51. package/components/core/Tooltip/TooltipStyled.d.ts +2 -2
  52. package/components/core/Tooltip/TooltipStyled.js +10 -9
  53. package/components/core/Tooltip/utils.d.ts +1 -1
  54. package/components/core/Tooltip/utils.js +1 -1
  55. package/components/core/Wrapper/Wrapper.d.ts +1 -1
  56. package/components/core/Wrapper/Wrapper.js +13 -12
  57. package/components/core/Wrapper/Wrapper.types.d.ts +3 -1
  58. package/components/core/Wrapper/WrapperStyled.d.ts +1 -1
  59. package/components/core/Wrapper/WrapperStyled.js +14 -13
  60. package/components/core/types/index.types.d.ts +0 -1
  61. package/components/domainSpecific/Carousel/CarouselStyled.js +44 -44
  62. package/components/domainSpecific/ContentCarousel/ContentCarousel.js +42 -43
  63. package/components/domainSpecific/Counter/CounterStyled.d.ts +1 -1
  64. package/components/domainSpecific/Counter/CounterStyled.js +17 -18
  65. package/components/domainSpecific/DragAndDropFiles/DragAndDropFiles.d.ts +0 -52
  66. package/components/domainSpecific/ProgressBar/ProgressBar.types.d.ts +1 -2
  67. package/components/domainSpecific/ProgressBar/ProgressBarStyled.js +1 -1
  68. package/components/domainSpecific/Search/SearchStyled.d.ts +1 -1
  69. package/components/layout/ChatContainer/ChatContainer.d.ts +2 -25
  70. package/components/layout/ChatContainer/ChatContainer.js +41 -35
  71. package/components/layout/ChatContainer/ChatContainer.types.d.ts +6 -0
  72. package/components/layout/ChatContainer/ChatContainerStyled.js +35 -32
  73. package/components/layout/FlexContainer/FlexContainer.d.ts +1 -1
  74. package/components/layout/FlexContainer/FlexContainer.js +13 -16
  75. package/components/layout/FlexContainer/FlexContainer.types.d.ts +0 -5
  76. package/components/layout/FlexContainer/FlexContainerStyled.d.ts +1 -1
  77. package/components/layout/FlexContainer/FlexContainerStyled.js +14 -20
  78. package/package.json +1 -1
  79. package/stories/Introduction/ThemeJsonPreview.d.ts +3 -1
  80. package/tokens/button.d.ts +19 -4
  81. package/tokens/button.js +119 -65
  82. package/tokens/card.d.ts +1 -5
  83. package/tokens/card.js +5 -9
  84. package/tokens/carousel.d.ts +10 -19
  85. package/tokens/carousel.js +28 -36
  86. package/tokens/chat.d.ts +4 -0
  87. package/tokens/chat.js +27 -23
  88. package/tokens/colors.js +5 -5
  89. package/tokens/constants.js +1 -1
  90. package/tokens/counter.d.ts +13 -6
  91. package/tokens/counter.js +20 -12
  92. package/tokens/defaultTheme.d.ts +59 -38
  93. package/tokens/index.d.ts +52 -35
  94. package/tokens/input.d.ts +0 -1
  95. package/tokens/input.js +42 -43
  96. package/tokens/label.d.ts +1 -0
  97. package/tokens/label.js +4 -3
  98. package/tokens/loader.d.ts +3 -1
  99. package/tokens/loader.js +3 -1
  100. package/tokens/select.d.ts +1 -0
  101. package/tokens/select.js +20 -18
  102. package/tokens/snackbar.d.ts +1 -1
  103. package/tokens/snackbar.js +1 -1
  104. package/tokens/tabs.d.ts +2 -0
  105. package/tokens/tabs.js +11 -9
  106. package/tokens/tooltip.d.ts +4 -3
  107. package/tokens/tooltip.js +7 -8
  108. package/tokens/values.d.ts +3 -0
  109. package/tokens/values.js +5 -2
  110. package/components/core/types/common.types.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -51,7 +51,7 @@
51
51
 
52
52
  ---
53
53
 
54
- ## [1.2.0] - 2025-06-12
54
+ ## [0.2.0] - 2025-06-12
55
55
 
56
56
  ### Added
57
57
 
@@ -72,7 +72,7 @@
72
72
 
73
73
  - Deprecated `LegacyBanner` component (removed in v1.2.0)
74
74
 
75
- ## [1.3.0] - 2025-07-14
75
+ ## [0.3.0] - 2025-07-14
76
76
 
77
77
  ### Features
78
78
 
@@ -116,7 +116,7 @@ This release delivers major enhancements to the chat system, full Emotion adopti
116
116
  comprehensive documentation updates. The refactor improves maintainability, while new features like AI integration and
117
117
  drag-and-drop elevate component capabilities.
118
118
 
119
- ## [1.4.0] - 2025-08-18
119
+ ## [0.4.0] - 2025-08-18
120
120
 
121
121
  ### New Features
122
122
 
@@ -142,3 +142,36 @@ drag-and-drop elevate component capabilities.
142
142
  - Eliminated console warnings in app.tsx and removed unused code
143
143
  - Fixed hardcoded Google API key by adding environment variable support
144
144
  - Patched entry point configuration and Portal import errors
145
+
146
+ ## [0.5.0] - 2025-09-01
147
+
148
+ ### Features
149
+
150
+ - **Input**: Added wrapperAs prop for custom wrapper elements and improved styling customization
151
+ - **Form**: Introduced core form configuration system with state management and field dependencies
152
+ - **Loader**: Added customizable WrapperView prop and enhanced theme integration
153
+ - **ChatContainer**: New component for chat-based interfaces
154
+ - **Theme**: Added detailed theme previews in Storybook for colors, fonts, and spacing tokens
155
+ - **Snackbar**: Added animated close functionality and improved customization options
156
+ - **Icons**: Introduced standardized size variants (Xs, Sm, Md, Lg, Xl) for consistent scaling
157
+
158
+ ### Improvements
159
+
160
+ - **Tooltip**: Enhanced type handling, prop interfaces, and theme usage
161
+ - **Counter**: Improved type handling and theme configuration
162
+ - **Stepper**: Refactored layout using FlexContainer for better mobile experience
163
+ - **Tabs**: Enhanced styling with overflow handling and improved documentation
164
+ - **Selector**: Replaced div elements with span for better accessibility
165
+ - **Textarea**: Added dynamic height adjustment based on content
166
+ - **Documentation**: Enhanced Storybook docs with detailed prop descriptions
167
+ - **Theme**: Updated default colors and improved token structure
168
+ - **Carousel**: Refactored styles and improved content navigation flexibility
169
+
170
+ ### Fixes
171
+
172
+ - **Button**: Fixed border styling issues in disabled state
173
+ - **Textarea**: Fixed dynamic height adjustment behavior
174
+ - **Selector**: Corrected semantic HTML usage and import paths
175
+ - **Build**: Fixed dist output paths and dependency isolation
176
+ - **Types**: Resolved various TypeScript compatibility issues
177
+ - **Storybook**: Corrected TokenViewer import paths and theme consistency
package/assets/styles.css CHANGED
@@ -1 +1 @@
1
- @import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;font-family:Fira Sans,sans-serif;line-height:1.6}ol,ul{list-style:none}table{border-collapse:collapse}img{max-width:100%;height:auto;display:block}a{text-decoration:none;color:inherit}
1
+ @import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Fira Sans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}
@@ -1,38 +1,44 @@
1
1
  "use client";
2
- import { jsx as S } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as h, useMemo as v, useCallback as x } from "react";
4
- import { KEYBOARD_KEYS as y } from "../../../constants/keyboard.js";
5
- import { COMPONENT_NAME as f } from "./constants.js";
6
- import { DropdownItemStyled as I } from "./DropdownItemStyled.js";
7
- import { useSelectContext as C } from "../Select/hooks/useSelectContext.js";
8
- import { useTheme as K } from "../../../hooks/useTheme/useTheme.js";
9
- import { TabIndex as a } from "../../../types/accesability.js";
10
- const T = h((u, p) => {
2
+ import { jsx as h } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as x, useMemo as y, useCallback as I } from "react";
4
+ import { KEYBOARD_KEYS as C } from "../../../constants/keyboard.js";
5
+ import { COMPONENT_NAME as u } from "./constants.js";
6
+ import { DropdownItemStyled as K } from "./DropdownItemStyled.js";
7
+ import { useSelectContext as T } from "../Select/hooks/useSelectContext.js";
8
+ import { useTheme as k } from "../../../hooks/useTheme/useTheme.js";
9
+ import { TabIndex as f } from "../../../types/accesability.js";
10
+ const A = x((p, D) => {
11
11
  const {
12
- children: D,
12
+ children: b,
13
13
  value: r,
14
14
  onSelect: n,
15
15
  customClass: o,
16
16
  disabled: t,
17
- ...b
18
- } = u, {
17
+ name: a,
18
+ ...v
19
+ } = p, {
19
20
  theme: w
20
- } = K(), {
21
+ } = k(), {
21
22
  onSelect: i,
22
23
  value: s,
23
24
  itemIdentifier: m
24
- } = C(), c = s !== void 0 && m ? m(s, r) : o == null ? void 0 : o.includes("active"), E = v(() => `${o || ""} ${c ? "active" : ""}`, [o, c]), d = x((e, l) => {
25
- if (!t)
26
- return n ? n({
27
- event: e,
28
- value: l
29
- }) : i && i(e, l), l;
30
- }, [n, i, t]), N = (e) => {
31
- t || e.key === y.ENTER && (e.preventDefault(), d(e, r));
25
+ } = T(), c = s !== void 0 && m ? m(s, r) : o == null ? void 0 : o.includes("active"), E = y(() => `${o || ""} ${c ? "active" : ""}`, [o, c]), d = I((e, S) => {
26
+ if (t)
27
+ return;
28
+ const l = {
29
+ name: a,
30
+ data: S
31
+ };
32
+ return n ? n({
33
+ event: e,
34
+ value: l
35
+ }) : i && i(e, l), l;
36
+ }, [n, i, a, t]), N = (e) => {
37
+ t || e.key === C.ENTER && (e.preventDefault(), d(e, r));
32
38
  };
33
- return /* @__PURE__ */ S(I, { ref: p, theme: w, $disabled: t, tabIndex: t ? a.Disabled : a.Default, "data-testid": f, className: E, onClick: (e) => d(e, r), onKeyDown: N, ...b, children: D });
39
+ return /* @__PURE__ */ h(K, { ref: D, theme: w, $disabled: t, tabIndex: t ? f.Disabled : f.Default, "data-testid": u, className: E, onClick: (e) => d(e, r), onKeyDown: N, ...v, children: b });
34
40
  });
35
- T.displayName = f;
41
+ A.displayName = u;
36
42
  export {
37
- T as DropdownItem
43
+ A as DropdownItem
38
44
  };
@@ -1,2 +1,2 @@
1
- import { DropdownItemStyledProps } from './DropdownItem.types';
1
+ import { DropdownItemStyledProps } from './';
2
2
  export declare const DropdownItemStyled: import('react').ForwardRefExoticComponent<Omit<DropdownItemStyledProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,33 +1,40 @@
1
1
  "use client";
2
- import { jsx as d } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as p } from "react";
4
- import { IconsList as g, COMPONENT_NAME as l } from "./constants.js";
5
- import { useTheme as h } from "../../../hooks/useTheme/useTheme.js";
2
+ import { jsx as h } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as S } from "react";
4
+ import { IconsList as $, COMPONENT_NAME as l } from "./constants.js";
5
+ import { useTheme as L } from "../../../hooks/useTheme/useTheme.js";
6
6
  import { get as n } from "../../../utils/helpers.js";
7
- let r = {};
8
- const x = (o) => {
9
- r = {
10
- ...r,
7
+ let i = {};
8
+ const M = (o) => {
9
+ i = {
10
+ ...i,
11
11
  ...o
12
12
  };
13
- }, $ = p((o, m) => {
13
+ }, N = S((o, m) => {
14
14
  const {
15
15
  name: t,
16
16
  width: f,
17
17
  height: u,
18
18
  fill: s,
19
19
  fillSvg: e,
20
- ...I
20
+ size: I,
21
+ ...a
21
22
  } = o, {
22
- theme: a
23
- } = h(), i = n(a, "colors", {}), c = {
24
- ...g,
25
- ...r
23
+ theme: d
24
+ } = L(), {
25
+ icon: p,
26
+ colors: r
27
+ } = d || {}, g = n(p, ["size", I], {
28
+ width: f,
29
+ height: u
30
+ }), c = {
31
+ ...$,
32
+ ...i
26
33
  }[t];
27
- return c ? /* @__PURE__ */ d(c, { ref: m, "data-testid": `${l}-${t}`, width: f, height: u, fill: s && n(i, s, s), fillSvg: e && n(i, e, e), ...I }) : (console.warn(`Icon "${String(t)}" not found.`), null);
34
+ return c ? /* @__PURE__ */ h(c, { ref: m, "data-testid": `${l}-${t}`, fill: s && n(r, s, s), fillSvg: e && n(r, e, e), ...g, ...a }) : (console.warn(`Icon "${String(t)}" not found.`), null);
28
35
  });
29
- $.displayName = l;
36
+ N.displayName = l;
30
37
  export {
31
- $ as Icon,
32
- x as registerCustomIcons
38
+ N as Icon,
39
+ M as registerCustomIcons
33
40
  };
@@ -1,7 +1,9 @@
1
+ import { EnumOrPrimitive, SizeVariant } from '../../../types';
1
2
  export interface IconProps {
2
3
  name: string;
3
4
  width?: number;
4
5
  height?: number;
5
6
  fill?: string;
6
7
  fillSvg?: string;
8
+ size?: EnumOrPrimitive<SizeVariant>;
7
9
  }
@@ -1,39 +1,40 @@
1
1
  "use client";
2
- import { jsxs as L, jsx as o } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as N, useState as $ } from "react";
2
+ import { jsxs as j, jsx as a } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as w, useState as p, useCallback as h } from "react";
4
4
  import { COMPONENT_NAME as e } from "./constants.js";
5
- import { ImageWrapperStyled as b, PlaceholderStyled as j, ImageStyled as w, CaptionStyled as x } from "./ImageStyled.js";
6
- import { Skeleton as E } from "../Skeleton/Skeleton.js";
7
- import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
8
- const O = N((m, p) => {
5
+ import { ImageWrapperStyled as x, PlaceholderStyled as M, ImageStyled as O, CaptionStyled as P } from "./ImageStyled.js";
6
+ import { Skeleton as T } from "../Skeleton/Skeleton.js";
7
+ import { useTheme as A } from "../../../hooks/useTheme/useTheme.js";
8
+ const F = w((f, g) => {
9
9
  const {
10
- id: h,
11
- src: f,
12
- alt: g,
13
- width: i,
14
- height: d,
15
- placeholder: s,
16
- caption: l,
10
+ id: u,
11
+ src: C,
12
+ alt: k,
13
+ width: s,
14
+ height: i,
15
+ placeholder: l,
16
+ caption: d,
17
17
  onClick: y,
18
- onLoad: r,
19
- onError: a,
18
+ onLoad: t,
19
+ onError: r,
20
20
  objectFit: S,
21
- styles: u,
22
- ...C
23
- } = m, [n, c] = $(!0), {
24
- theme: t
25
- } = M(), k = () => {
26
- c(!1), r == null || r();
27
- }, I = () => {
28
- c(!1), a == null || a();
29
- };
30
- return /* @__PURE__ */ L(b, { "data-testid": `${e}-wrapper`, id: h, width: i, height: d, theme: t, ...C, children: [
31
- n && s && /* @__PURE__ */ o(j, { "data-testid": `${e}-placeholder`, theme: t, children: /* @__PURE__ */ o(E, { height: "100%", children: s }) }),
32
- /* @__PURE__ */ o(w, { "data-testid": e, theme: t, src: f, alt: g, width: i, height: d, objectFit: S, $isLoading: n, onLoad: k, onError: I, onClick: y, styles: u, ref: p }),
33
- l && /* @__PURE__ */ o(x, { "data-testid": `${e}-caption`, theme: t, children: l })
21
+ fallbackComponent: n,
22
+ styles: b,
23
+ ...E
24
+ } = f, {
25
+ theme: o
26
+ } = A(), [c, m] = p(!0), [I, L] = p(!1), N = h(() => {
27
+ m(!1), t == null || t();
28
+ }, [t]), $ = h(() => {
29
+ m(!1), L(!0), r == null || r();
30
+ }, [r]);
31
+ return /* @__PURE__ */ j(x, { "data-testid": `${e}-wrapper`, id: u, width: s, height: i, theme: o, ...E, children: [
32
+ c && l && /* @__PURE__ */ a(M, { "data-testid": `${e}-placeholder`, theme: o, children: /* @__PURE__ */ a(T, { height: "100%", children: l }) }),
33
+ I && n ? n : /* @__PURE__ */ a(O, { "data-testid": e, theme: o, src: C, alt: k, width: s, height: i, objectFit: S, $isLoading: c, onLoad: N, onError: $, onClick: y, styles: b, ref: g }),
34
+ d && /* @__PURE__ */ a(P, { "data-testid": `${e}-caption`, theme: o, children: d })
34
35
  ] });
35
36
  });
36
- O.displayName = e;
37
+ F.displayName = e;
37
38
  export {
38
- O as Image
39
+ F as Image
39
40
  };
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  import { CommonCssComponentProps, CommonCssComponentStyledProps } from '../..';
2
3
  export interface ImageProps extends CommonCssComponentProps {
3
4
  id?: string;
@@ -11,6 +12,7 @@ export interface ImageProps extends CommonCssComponentProps {
11
12
  onClick?: () => void;
12
13
  onError?: () => void;
13
14
  onLoad?: () => void;
15
+ fallbackComponent?: ReactNode;
14
16
  objectFit?: 'cover' | 'contain' | 'fill' | 'none' | 'scale-down';
15
17
  }
16
18
  export interface ImageWrapperStyledProps extends Pick<ImageProps, 'width' | 'height' | 'id' | 'className'>, CommonCssComponentStyledProps {
@@ -1,2 +1,2 @@
1
1
  import { InputFieldProps } from './Input.types';
2
- export declare const Input: import('react').ForwardRefExoticComponent<InputFieldProps & import('react').RefAttributes<HTMLInputElement>>;
2
+ export declare const Input: import('react').ForwardRefExoticComponent<(InputFieldProps & Partial<Omit<HTMLInputElement, "color" | "prefix" | "disabled" | "tabIndex" | "type" | "hidden" | "children" | "className" | "role" | "width" | "content" | "translate" | "name" | "label" | "styles" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "id" | "lang" | "nonce" | "slot" | "spellCheck" | "style" | "title" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "placeholder" | "adornmentStart" | "adornmentEnd" | "debounceCallbackTime" | "readOnly" | "required" | "ariaRequired" | "ariaDescribedBy" | "wrapperAs" | "helperText">>) & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,72 +1,73 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as r, Fragment as A } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as H } from "react";
4
- import { DEFAULT_PROPS as e, COMPONENT_NAME as o, FOCUS_EXCLUDED_LIST as L } from "./constants.js";
5
- import { useInputHandlers as P } from "./useInputHandlers.js";
6
- import { InputStyled as U } from "./InputStyled.js";
7
- import { InputWrapper as p } from "./InputWrapper/InputWrapper.js";
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";
8
8
  import { InputHelper as u } from "./InputHelper/InputHelper.js";
9
9
  import { InputAdornment as h } from "./InputAdornment/InputAdornment.js";
10
- import { useTheme as g } from "../../../hooks/useTheme/useTheme.js";
11
- import { SizeVariant as j } from "../../../types/common.js";
12
- const z = H((f, b) => {
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) => {
13
13
  const {
14
14
  theme: I
15
- } = g(), {
15
+ } = v(), {
16
+ wrapperAs: y = "label",
16
17
  // Layout props
17
- width: y,
18
+ width: w,
18
19
  className: N = e.className,
19
20
  styles: S = e.styles,
20
21
  // Input behavior props
21
- variant: i = e.variant,
22
- color: s = e.color,
22
+ variant: s = e.variant,
23
+ color: i = e.color,
23
24
  disabled: _ = e.disabled,
24
- readOnly: w = e.readOnly,
25
+ readOnly: x = e.readOnly,
25
26
  // Accessibility props
26
- ariaRequired: x = e.ariaRequired,
27
- role: D = e.role,
28
- tabIndex: E = e.tabIndex,
27
+ ariaRequired: D = e.ariaRequired,
28
+ role: E = e.role,
29
+ tabIndex: O = e.tabIndex,
29
30
  ariaDescribedBy: l,
30
31
  // Event handling props
31
- debounceCallbackTime: O,
32
- onChange: T,
33
- onKeyDown: C,
34
- onMouseDown: M,
35
- onBlur: v,
32
+ debounceCallbackTime: T,
33
+ onChange: C,
34
+ onKeyDown: M,
35
+ onMouseDown: A,
36
+ onBlur: F,
36
37
  // Adornments
37
38
  adornmentStart: d,
38
39
  adornmentEnd: m,
39
40
  // Helper text
40
- label: t,
41
+ label: a,
41
42
  helperText: n,
42
- ...F
43
- } = f, c = !L.includes(i), R = !!(t || n), {
44
- handlers: $,
45
- isMouseInteraction: q
46
- } = P({
47
- onKeyDown: C,
48
- onBlur: v,
49
- onMouseDown: M,
50
- onChange: T,
51
- debounceCallbackTime: O
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
52
53
  });
53
- return /* @__PURE__ */ a(p, { as: "label", withGap: R, className: N, width: y, styles: S, children: [
54
- t && /* @__PURE__ */ r(u, { children: t }),
55
- /* @__PURE__ */ a(p, { children: [
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: [
56
57
  d && /* @__PURE__ */ r(h, { children: d }),
57
- /* @__PURE__ */ r(U, { $isMouseInteraction: q && c, $color: s, ref: b, disabled: _, role: D, theme: I, type: i, readOnly: w, tabIndex: E, "aria-required": x, "data-testid": o, ...$, ...l ? {
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 ? {
58
59
  "aria-describedby": l
59
- } : {}, ...F }),
60
- c && /* @__PURE__ */ a(A, { children: [
61
- /* @__PURE__ */ r("div", { className: `${o}__border` }),
62
- /* @__PURE__ */ r("div", { className: `${o}__outline` })
60
+ } : {}, ...R }),
61
+ p && /* @__PURE__ */ t(L, { children: [
62
+ /* @__PURE__ */ r("span", { className: `${o}__border` }),
63
+ /* @__PURE__ */ r("span", { className: `${o}__outline` })
63
64
  ] }),
64
65
  m && /* @__PURE__ */ r(h, { children: m })
65
66
  ] }),
66
- n && /* @__PURE__ */ r(u, { color: s, size: j.Sm, children: n })
67
+ n && /* @__PURE__ */ r(u, { color: i, size: z.Sm, children: n })
67
68
  ] });
68
69
  });
69
- z.displayName = o;
70
+ B.displayName = o;
70
71
  export {
71
- z as Input
72
+ B as Input
72
73
  };
@@ -8,8 +8,8 @@ export interface BaseInputFieldProps extends CommonCssComponentProps<HTMLInputEl
8
8
  variant?: EnumOrPrimitive<InputVariantType>;
9
9
  color?: EnumOrPrimitive<InputColorVariant>;
10
10
  label?: string;
11
+ value?: string;
11
12
  placeholder?: string;
12
- value?: string | number;
13
13
  defaultValue?: string | number;
14
14
  onClick?: (event: MouseEvent<HTMLInputElement>) => void;
15
15
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
@@ -25,11 +25,11 @@ export interface BaseInputFieldProps extends CommonCssComponentProps<HTMLInputEl
25
25
  tabIndex?: number;
26
26
  debounceCallbackTime?: number;
27
27
  }
28
+ export type InputFieldRestHtmlProps = Partial<Omit<HTMLInputElement, keyof InputFieldProps | 'type'>>;
28
29
  export interface RadioButtonProps extends Omit<BaseInputFieldProps, 'type'> {
29
30
  type: InputVariantType.Radio;
30
31
  checked?: boolean;
31
32
  defaultChecked?: boolean;
32
- value: string | number;
33
33
  }
34
34
  export interface CheckboxFieldProps extends Omit<BaseInputFieldProps, 'type' | 'value'> {
35
35
  type: InputVariantType;
@@ -37,6 +37,7 @@ export interface CheckboxFieldProps extends Omit<BaseInputFieldProps, 'type' | '
37
37
  defaultChecked?: boolean;
38
38
  }
39
39
  export type InputFieldProps = (BaseInputFieldProps | RadioButtonProps | CheckboxFieldProps) & {
40
+ wrapperAs?: keyof HTMLElementTagNameMap | ElementType;
40
41
  width?: string;
41
42
  label?: ReactNode;
42
43
  helperText?: ReactNode;
@@ -6,9 +6,9 @@ const c = (t) => {
6
6
  theme: {
7
7
  input: e
8
8
  } = {},
9
- ...o
10
- } = t, n = [s(e, "adornment.default", {})];
11
- return /* @__PURE__ */ r("div", { css: n, ...o });
9
+ ...n
10
+ } = t, o = [s(e, "adornment.default", {})];
11
+ return /* @__PURE__ */ r("span", { css: o, ...n });
12
12
  };
13
13
  export {
14
14
  c as InputAdornmentStyled
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as l } from "@emotion/react/jsx-runtime";
3
3
  import { get as t } from "../../../../utils/helpers.js";
4
- const u = (s) => {
4
+ const i = (s) => {
5
5
  const {
6
6
  theme: {
7
7
  input: r
@@ -10,8 +10,8 @@ const u = (s) => {
10
10
  $size: e,
11
11
  ...p
12
12
  } = s, o = t(r, "helper", {}), c = [t(o, ["default", e], {}), t(o, [n, e], {})];
13
- return /* @__PURE__ */ l("div", { css: c, ...p });
13
+ return /* @__PURE__ */ l("span", { css: c, ...p });
14
14
  };
15
15
  export {
16
- u as InputHelperStyled
16
+ i as InputHelperStyled
17
17
  };
@@ -1,2 +1,2 @@
1
- import { InputPropsStyled } from './Input.types';
1
+ import { InputPropsStyled } from './';
2
2
  export declare const InputStyled: import('react').ForwardRefExoticComponent<Omit<InputPropsStyled, "ref"> & import('react').RefAttributes<HTMLInputElement>>;
@@ -1,20 +1,20 @@
1
1
  "use client";
2
2
  import { jsx as d } from "@emotion/react/jsx-runtime";
3
3
  import { forwardRef as f } from "react";
4
- import { DEFAULT_AS_ELEMENT as n, COMPONENT_NAME as t } from "./constants.js";
5
- import { InputWrapperStyled as h } from "./InputWrapperStyled.js";
6
- import { useTheme as E } from "../../../../hooks/useTheme/useTheme.js";
4
+ import { COMPONENT_NAME as t } from "./constants.js";
5
+ import { InputWrapperStyled as n } from "./InputWrapperStyled.js";
6
+ import { useTheme as h } from "../../../../hooks/useTheme/useTheme.js";
7
7
  const c = f((r, e) => {
8
8
  const {
9
9
  theme: o
10
- } = E(), {
10
+ } = h(), {
11
11
  children: p,
12
- as: i = n,
12
+ as: i,
13
13
  width: m,
14
14
  withGap: a,
15
15
  ...s
16
16
  } = r;
17
- return /* @__PURE__ */ d(h, { $as: i, $width: m, $withGap: a, ref: e, theme: o, "data-testid": t, ...s, children: p });
17
+ return /* @__PURE__ */ d(n, { $as: i, $width: m, $withGap: a, ref: e, theme: o, "data-testid": t, ...s, children: p });
18
18
  });
19
19
  c.displayName = t;
20
20
  export {
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as a } from "@emotion/react/jsx-runtime";
3
3
  import { get as t } from "../../../../utils/helpers.js";
4
- const u = (p) => {
4
+ const d = (s) => {
5
5
  const {
6
6
  theme: {
7
- input: s
7
+ input: o
8
8
  } = {},
9
9
  $width: e,
10
- $as: r = "div",
11
- $withGap: n,
12
- styles: i = {},
13
- ...c
14
- } = p, o = t(s, "wrapper", {}), m = [t(o, "default", {}), n ? t(o, "withGap", {}) : {}, e ? {
10
+ $as: n = "span",
11
+ $withGap: r,
12
+ styles: c = {},
13
+ ...i
14
+ } = s, p = t(o, "wrapper", {}), m = [t(p, "default", {}), r ? t(p, "withGap", {}) : {}, e ? {
15
15
  width: e
16
- } : {}, i];
17
- return /* @__PURE__ */ a(r, { css: m, ...c });
16
+ } : {}, c];
17
+ return /* @__PURE__ */ a(n, { css: m, ...i });
18
18
  };
19
19
  export {
20
- u as InputWrapperStyled
20
+ d as InputWrapperStyled
21
21
  };
@@ -1,2 +1 @@
1
1
  export declare const COMPONENT_NAME = "InputWrapper";
2
- export declare const DEFAULT_AS_ELEMENT = "div";
@@ -1,5 +1,4 @@
1
- const E = "InputWrapper", p = "div";
1
+ const p = "InputWrapper";
2
2
  export {
3
- E as COMPONENT_NAME,
4
- p as DEFAULT_AS_ELEMENT
3
+ p as COMPONENT_NAME
5
4
  };