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,17 +1,10 @@
1
1
  "use client";
2
- import { jsx as t } from "@emotion/react/jsx-runtime";
3
- import { icon as l } from "../../tokens/icon.js";
4
- import { SizeVariant as m } from "../../types/common.js";
5
- const {
6
- width: h,
7
- height: s
8
- } = l.size[m.Sm], V = ({
9
- width: o = h,
10
- height: i = s,
2
+ import { jsx as o } from "@emotion/react/jsx-runtime";
3
+ const l = ({
11
4
  fillSvg: e = "none",
12
- fill: r = "currentColor",
13
- ...n
14
- }) => /* @__PURE__ */ t("svg", { width: o, height: i, fill: e, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", ...n, children: /* @__PURE__ */ t("path", { d: "M2 5.99999V9.99999H4.66667L8 13.3333V2.66665L4.66667 5.99999H2ZM11 7.99999C11 6.81999 10.32 5.80665 9.33333 5.31332V10.68C10.32 10.1933 11 9.17999 11 7.99999ZM9.33333 2.15332V3.52665C11.26 4.09999 12.6667 5.88665 12.6667 7.99999C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 7.99999C14 5.14665 12.0067 2.75999 9.33333 2.15332Z", fill: r }) });
5
+ fill: n = "currentColor",
6
+ ...r
7
+ }) => /* @__PURE__ */ o("svg", { fill: e, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", ...r, children: /* @__PURE__ */ o("path", { d: "M2 5.99999V9.99999H4.66667L8 13.3333V2.66665L4.66667 5.99999H2ZM11 7.99999C11 6.81999 10.32 5.80665 9.33333 5.31332V10.68C10.32 10.1933 11 9.17999 11 7.99999ZM9.33333 2.15332V3.52665C11.26 4.09999 12.6667 5.88665 12.6667 7.99999C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 7.99999C14 5.14665 12.0067 2.75999 9.33333 2.15332Z", fill: n }) });
15
8
  export {
16
- V as VolumeUpIcon
9
+ l as VolumeUpIcon
17
10
  };
@@ -1,7 +1,5 @@
1
- export declare const WifiTetheringIcon: ({ width, height, fillSvg, fill, ...rest }: {
1
+ export declare const WifiTetheringIcon: ({ fillSvg, fill, ...rest }: {
2
2
  [x: string]: any;
3
- width?: number | undefined;
4
- height?: number | undefined;
5
3
  fillSvg?: string | undefined;
6
4
  fill?: string | undefined;
7
5
  }) => import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,17 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as C } from "@emotion/react/jsx-runtime";
3
- import { icon as n } from "../../tokens/icon.js";
4
- import { SizeVariant as h } from "../../types/common.js";
5
- const {
6
- width: l,
7
- height: m
8
- } = n.size[h.Sm], d = ({
9
- width: t = l,
10
- height: i = m,
3
+ const t = ({
11
4
  fillSvg: o = "none",
12
5
  fill: e = "currentColor",
13
- ...r
14
- }) => /* @__PURE__ */ C("svg", { width: t, height: i, viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", fill: o, ...r, children: /* @__PURE__ */ C("path", { d: "M7.99998 7.33333C7.26665 7.33333 6.66665 7.93333 6.66665 8.66667C6.66665 9.4 7.26665 10 7.99998 10C8.73331 10 9.33331 9.4 9.33331 8.66667C9.33331 7.93333 8.73331 7.33333 7.99998 7.33333ZM12 8.66667C12 6.46 10.2066 4.66667 7.99998 4.66667C5.79331 4.66667 3.99998 6.46 3.99998 8.66667C3.99998 10.1467 4.80665 11.4333 5.99998 12.1267L6.66665 10.9667C5.87331 10.5 5.33331 9.65333 5.33331 8.66667C5.33331 7.19333 6.52665 6 7.99998 6C9.47331 6 10.6666 7.19333 10.6666 8.66667C10.6666 9.65333 10.1266 10.5 9.33331 10.9667L9.99998 12.1267C11.1933 11.4333 12 10.1467 12 8.66667ZM7.99998 2C4.31998 2 1.33331 4.98667 1.33331 8.66667C1.33331 11.1333 2.67331 13.28 4.65998 14.4333L5.32665 13.28C3.73998 12.3533 2.66665 10.64 2.66665 8.66667C2.66665 5.72 5.05331 3.33333 7.99998 3.33333C10.9466 3.33333 13.3333 5.72 13.3333 8.66667C13.3333 10.64 12.26 12.3533 10.6666 13.28L11.3333 14.4333C13.3266 13.28 14.6666 11.1333 14.6666 8.66667C14.6666 4.98667 11.68 2 7.99998 2Z", fill: e }) });
6
+ ...n
7
+ }) => /* @__PURE__ */ C("svg", { viewBox: "0 0 16 16", xmlns: "http://www.w3.org/2000/svg", fill: o, ...n, children: /* @__PURE__ */ C("path", { d: "M7.99998 7.33333C7.26665 7.33333 6.66665 7.93333 6.66665 8.66667C6.66665 9.4 7.26665 10 7.99998 10C8.73331 10 9.33331 9.4 9.33331 8.66667C9.33331 7.93333 8.73331 7.33333 7.99998 7.33333ZM12 8.66667C12 6.46 10.2066 4.66667 7.99998 4.66667C5.79331 4.66667 3.99998 6.46 3.99998 8.66667C3.99998 10.1467 4.80665 11.4333 5.99998 12.1267L6.66665 10.9667C5.87331 10.5 5.33331 9.65333 5.33331 8.66667C5.33331 7.19333 6.52665 6 7.99998 6C9.47331 6 10.6666 7.19333 10.6666 8.66667C10.6666 9.65333 10.1266 10.5 9.33331 10.9667L9.99998 12.1267C11.1933 11.4333 12 10.1467 12 8.66667ZM7.99998 2C4.31998 2 1.33331 4.98667 1.33331 8.66667C1.33331 11.1333 2.67331 13.28 4.65998 14.4333L5.32665 13.28C3.73998 12.3533 2.66665 10.64 2.66665 8.66667C2.66665 5.72 5.05331 3.33333 7.99998 3.33333C10.9466 3.33333 13.3333 5.72 13.3333 8.66667C13.3333 10.64 12.26 12.3533 10.6666 13.28L11.3333 14.4333C13.3266 13.28 14.6666 11.1333 14.6666 8.66667C14.6666 4.98667 11.68 2 7.99998 2Z", fill: e }) });
15
8
  export {
16
- d as WifiTetheringIcon
9
+ t as WifiTetheringIcon
17
10
  };
@@ -1,44 +1,47 @@
1
1
  "use client";
2
- import { jsxs as $, jsx as n } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as b } from "react";
4
- import { convertToInlineBoxStyles as x } from "../../../tokens/utils.js";
2
+ import { jsxs as b, jsx as n } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as x } from "react";
4
+ import { convertToInlineBoxStyles as T } from "../../../tokens/utils.js";
5
5
  import { COMPONENT_NAME as e } from "./constants.js";
6
- import { ButtonStyled as T, StartIconStyled as E, ContentStyled as N, EndIconStyled as v } from "./ButtonStyled.js";
7
- import { ButtonVariant as C, ButtonTypes as P, ButtonRole as j } from "../../../types/button.js";
8
- import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
9
- import { get as O } from "../../../utils/helpers.js";
10
- import { TabIndex as R } from "../../../types/accesability.js";
11
- const W = b((s, m) => {
6
+ import { ButtonStyled as C, StartIconStyled as E, ContentStyled as N, EndIconStyled as j } from "./ButtonStyled.js";
7
+ import { ButtonVariant as v, ButtonTypes as P, ButtonRole as M } from "../../../types/button.js";
8
+ import { useTheme as O } from "../../../hooks/useTheme/useTheme.js";
9
+ import { get as R } from "../../../utils/helpers.js";
10
+ import { TabIndex as W } from "../../../types/accesability.js";
11
+ const g = x((u, m) => {
12
12
  const {
13
13
  theme: t
14
- } = M(), {
15
- variant: u = C.Primary,
16
- rounded: c = O(t, "button.attrs.rounded", "none"),
14
+ } = O(), {
15
+ variant: c = v.Primary,
16
+ rounded: f = R(t, "button.attrs.rounded", "none"),
17
17
  children: o,
18
18
  iconStart: r = null,
19
19
  iconEnd: a = null,
20
- type: f = P.Button,
21
- disabled: p = !1,
22
- isIcon: y = !1,
20
+ type: p = P.Button,
21
+ disabled: y = !1,
22
+ isIcon: h = !1,
23
23
  ariaLabel: i,
24
24
  ariaPressed: l,
25
- role: h = j.Button,
26
- fullWidth: B = !1,
27
- tabIndex: I = R.Default,
28
- onClick: S,
29
- ...d
30
- } = s;
31
- return /* @__PURE__ */ $(T, { ref: m, $variant: u, $isIcon: y, $fullWidth: B, $rounded: c, disabled: p, onClick: S, type: f, role: h, theme: t, tabIndex: I, "data-testid": e, ...x(d), ...i ? {
25
+ role: B = M.Button,
26
+ fullWidth: I = !1,
27
+ tabIndex: S = W.Default,
28
+ onClick: $,
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 ? {
32
33
  "aria-label": i
33
34
  } : {}, ...l ? {
34
35
  "aria-pressed": l
35
- } : {}, ...d, children: [
36
+ } : {}, ...s, children: [
36
37
  r ? /* @__PURE__ */ n(E, { theme: t, "data-testid": `${e}-icon-start`, children: r }) : null,
37
- o ? /* @__PURE__ */ n(N, { theme: t, "data-testid": `${e}-content`, children: o }) : null,
38
- a ? /* @__PURE__ */ n(v, { theme: t, "data-testid": `${e}-icon-end`, children: a }) : null
38
+ o ? /* @__PURE__ */ n(N, { theme: t, styles: d ? {
39
+ justifyContent: d
40
+ } : {}, "data-testid": `${e}-content`, children: o }) : null,
41
+ a ? /* @__PURE__ */ n(j, { theme: t, "data-testid": `${e}-icon-end`, children: a }) : null
39
42
  ] });
40
43
  });
41
- W.displayName = e;
44
+ g.displayName = e;
42
45
  export {
43
- W as Button
46
+ g as Button
44
47
  };
@@ -1,9 +1,9 @@
1
1
  import { PropsWithChildren, MouseEvent, ReactNode } from 'react';
2
- import { ButtonRole, ButtonTypes, ButtonVariant, EnumOrPrimitive } from '../../../types';
2
+ import { ButtonRole, ButtonTypes, ButtonVariant, EnumOrPrimitive, Rounded } from '../../../types';
3
3
  import { BoxCssComponentProps, BoxCssComponentStyledProps } from '../..';
4
4
  export interface ButtonProps extends BoxCssComponentProps<HTMLButtonElement>, PropsWithChildren {
5
5
  variant?: EnumOrPrimitive<ButtonVariant>;
6
- rounded?: 'none' | 'default' | 'round' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
6
+ rounded?: Rounded;
7
7
  iconStart?: ReactNode;
8
8
  iconEnd?: ReactNode;
9
9
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
@@ -1,58 +1,59 @@
1
- "use client";
2
1
  import { jsx as c } from "@emotion/react/jsx-runtime";
3
2
  import { forwardRef as b } from "react";
4
- import { getBoxStyles as h, tokensHandler as P } from "../../../tokens/utils.js";
3
+ import { getBoxStyles as h, tokensHandler as x } from "../../../tokens/utils.js";
5
4
  import { get as t } from "../../../utils/helpers.js";
6
- const B = b((e, n) => {
5
+ const w = b(({
6
+ theme: {
7
+ button: e,
8
+ ...o
9
+ } = {},
10
+ $isIcon: n,
11
+ $fullWidth: s,
12
+ $variant: l,
13
+ $rounded: d,
14
+ className: m,
15
+ styles: p = {},
16
+ ...a
17
+ }, f) => {
7
18
  const {
8
- theme: {
9
- button: s,
10
- ...o
11
- } = {},
12
- $isIcon: u,
13
- $fullWidth: d,
14
- $variant: p,
15
- $rounded: a,
16
- styles: m = {},
17
- ...f
18
- } = e, {
19
- boxStyles: i,
20
- restProps: y
21
- } = h(f), r = new Proxy(s || {}, P(o)), l = t(o, ["radius", a], "0px"), S = [t(r, "default", {}), t(r, p, {}), i, u ? t(r, "icon", {}) : {}, d ? t(r, "fullWidth", {}) : {}, {
22
- borderRadius: l,
19
+ boxStyles: y,
20
+ restProps: S
21
+ } = h(a), r = new Proxy(e || {}, x(o)), u = t(o, ["radius", d], "0px"), i = [t(r, "default", {}), t(r, l, {}), y, n ? t(r, "icon", {}) : {}, s ? t(r, "fullWidth", {}) : {}, {
22
+ borderRadius: u,
23
23
  "&:focus-visible::after": {
24
- borderRadius: l
24
+ borderRadius: u
25
25
  }
26
- }, m];
27
- return /* @__PURE__ */ c("button", { css: S, ...y, ref: n });
28
- }), v = (e) => {
26
+ }, p];
27
+ return /* @__PURE__ */ c("button", { css: i, className: m, ...S, ref: f });
28
+ }), N = (e) => {
29
29
  const {
30
30
  theme: {
31
- button: n
31
+ button: o
32
32
  } = {},
33
+ styles: n,
33
34
  ...s
34
- } = e, o = t(n, "content", {});
35
- return /* @__PURE__ */ c("span", { css: t(o, "default", {}), className: "gd-button__content", ...s });
36
- }, w = (e) => {
35
+ } = e, l = t(o, "content", {});
36
+ return /* @__PURE__ */ c("span", { css: [t(l, "default", {}), n], className: "gd-button__content", ...s });
37
+ }, R = (e) => {
37
38
  const {
38
39
  theme: {
39
- button: n
40
+ button: o
40
41
  } = {},
41
- ...s
42
- } = e, o = t(n, "startIcon", {});
43
- return /* @__PURE__ */ c("span", { css: t(o, "default", {}), ...s });
44
- }, N = (e) => {
42
+ ...n
43
+ } = e, s = t(o, "startIcon", {});
44
+ return /* @__PURE__ */ c("span", { css: t(s, "default", {}), ...n });
45
+ }, _ = (e) => {
45
46
  const {
46
47
  theme: {
47
- button: n
48
+ button: o
48
49
  } = {},
49
- ...s
50
- } = e, o = t(n, "endIcon", {});
51
- return /* @__PURE__ */ c("span", { css: t(o, "default", {}), ...s });
50
+ ...n
51
+ } = e, s = t(o, "endIcon", {});
52
+ return /* @__PURE__ */ c("span", { css: t(s, "default", {}), ...n });
52
53
  };
53
54
  export {
54
- B as ButtonStyled,
55
- v as ContentStyled,
56
- N as EndIconStyled,
57
- w as StartIconStyled
55
+ w as ButtonStyled,
56
+ N as ContentStyled,
57
+ _ as EndIconStyled,
58
+ R as StartIconStyled
58
59
  };
@@ -1,3 +1,3 @@
1
- export declare const Dropdown: import('react').ForwardRefExoticComponent<import('../..').CommonCssComponentProps<HTMLDivElement> & {
1
+ export declare const Dropdown: import('react').ForwardRefExoticComponent<import('../..').BoxCssComponentProps<HTMLDivElement> & {
2
2
  children?: import('react').ReactNode | undefined;
3
3
  } & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { jsx as u } from "@emotion/react/jsx-runtime";
3
- import { forwardRef as y } from "react";
2
+ import { jsx as a } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as u } from "react";
4
4
  import { KEYBOARD_KEYS as s } from "../../../constants/keyboard.js";
5
- import { getClosestFocusable as D } from "../../../utils/focus.js";
6
- import { DropdownStyled as E } from "./DropdownStyled.js";
5
+ import { getClosestFocusable as y } from "../../../utils/focus.js";
6
+ import { DropdownStyled as D } from "./DropdownStyled.js";
7
7
  import { COMPONENT_NAME as c } from "./constants.js";
8
- import { useTheme as R } from "../../../hooks/useTheme/useTheme.js";
9
- const w = y((l, p) => {
8
+ import { useTheme as E } from "../../../hooks/useTheme/useTheme.js";
9
+ const R = u(({
10
+ children: p,
11
+ ...l
12
+ }, d) => {
10
13
  const {
11
- children: d,
12
- ...f
13
- } = l, {
14
- theme: a
15
- } = R();
16
- return /* @__PURE__ */ u(E, { ref: p, theme: a, "data-testid": c, onKeyDown: (o) => {
14
+ theme: f
15
+ } = E();
16
+ return /* @__PURE__ */ a(D, { ref: d, theme: f, "data-testid": c, onKeyDown: (o) => {
17
17
  var m;
18
18
  if (![s.ARROW_DOWN, s.ARROW_UP].includes(o.key))
19
19
  return;
@@ -22,7 +22,7 @@ const w = y((l, p) => {
22
22
  if (t && e.contains(t)) {
23
23
  const r = document.createElement("div");
24
24
  e.insertBefore(r, i ? t : t.nextSibling);
25
- const n = D({
25
+ const n = y({
26
26
  initial: r,
27
27
  previous: i,
28
28
  root: e,
@@ -30,9 +30,9 @@ const w = y((l, p) => {
30
30
  });
31
31
  e.removeChild(r), n == null || n.focus();
32
32
  }
33
- }, ...f, children: d });
33
+ }, ...l, children: p });
34
34
  });
35
- w.displayName = c;
35
+ R.displayName = c;
36
36
  export {
37
- w as Dropdown
37
+ R as Dropdown
38
38
  };
@@ -1,8 +1,8 @@
1
1
  import { PropsWithChildren } from 'react';
2
- import { CommonCssComponentProps, CommonCssComponentStyledProps } from '../../index.types';
2
+ import { BoxCssComponentProps, BoxCssComponentStyledProps } from '../../index.types';
3
3
  import { OnSelectProps } from '../types/events.types';
4
- export type DropdownProps = PropsWithChildren<CommonCssComponentProps>;
5
- export type DropdownStyledProps = PropsWithChildren<CommonCssComponentStyledProps>;
4
+ export type DropdownProps = PropsWithChildren<BoxCssComponentProps>;
5
+ export type DropdownStyledProps = PropsWithChildren<BoxCssComponentStyledProps>;
6
6
  export interface DropdownContextType {
7
7
  onSelect?: (props: OnSelectProps) => void;
8
8
  }
@@ -1,21 +1,20 @@
1
- "use client";
2
- import { jsx as d } from "@emotion/react/jsx-runtime";
1
+ import { jsx as c } from "@emotion/react/jsx-runtime";
3
2
  import { forwardRef as f } from "react";
4
- import { getBoxStyles as y, tokensHandler as i } from "../../../tokens/utils.js";
3
+ import { getBoxStyles as l, tokensHandler as y } from "../../../tokens/utils.js";
5
4
  import { get as S } from "../../../utils/helpers.js";
6
- const a = f((t, e) => {
5
+ const a = f(({
6
+ theme: {
7
+ select: o,
8
+ ...t
9
+ } = {},
10
+ styles: e = {},
11
+ ...r
12
+ }, s) => {
7
13
  const {
8
- theme: {
9
- select: o,
10
- ...r
11
- } = {},
12
- styles: s = {},
13
- ...n
14
- } = t, {
15
14
  boxStyles: m,
16
- restProps: p
17
- } = y(n), c = new Proxy(o || {}, i(r)), l = [S(c, "dropdown", {}), m, s];
18
- return /* @__PURE__ */ d("div", { css: l, ...p, ref: e });
15
+ restProps: n
16
+ } = l(r), p = new Proxy(o || {}, y(t)), d = [S(p, "dropdown", {}), m, e];
17
+ return /* @__PURE__ */ c("div", { css: d, ...n, ref: s });
19
18
  });
20
19
  export {
21
20
  a as DropdownStyled
@@ -1,40 +1,48 @@
1
1
  "use client";
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
- import { get as n } from "../../../utils/helpers.js";
7
- let i = {};
8
- const M = (s) => {
9
- i = {
10
- ...i,
11
- ...s
2
+ import { jsx as x } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as L } from "react";
4
+ import { getBoxStyles as C } from "../../../tokens/utils.js";
5
+ import { IconsList as P, COMPONENT_NAME as i } from "./constants.js";
6
+ import { useTheme as g } from "../../../hooks/useTheme/useTheme.js";
7
+ import { get as e } from "../../../utils/helpers.js";
8
+ let r = {};
9
+ const j = (o) => {
10
+ r = {
11
+ ...r,
12
+ ...o
12
13
  };
13
- }, N = S((s, m) => {
14
+ }, h = L(({
15
+ name: o,
16
+ width: m = 18,
17
+ height: p = 18,
18
+ fill: t,
19
+ fillSvg: s,
20
+ size: u,
21
+ styles: I,
22
+ ...d
23
+ }, f) => {
14
24
  const {
15
- name: e,
16
- width: f = 18,
17
- height: u = 18,
18
- fill: o,
19
- fillSvg: t,
20
- size: I,
21
- ...a
22
- } = s, {
23
- theme: d
24
- } = L(), {
25
- icon: p,
26
- colors: r
27
- } = d || {}, g = n(p, ["size", I], {
28
- width: f,
29
- height: u
25
+ theme: y
26
+ } = g(), {
27
+ icon: N,
28
+ colors: n
29
+ } = y || {}, S = e(N, ["size", u], {
30
+ width: m,
31
+ height: p
30
32
  }), c = {
31
- ...$,
32
- ...i
33
- }[e];
34
- return c ? /* @__PURE__ */ h(c, { ref: m, "data-testid": `${l}-${e}`, fill: o && n(r, o, o), fillSvg: t && n(r, t, t), ...g, ...a }) : (console.warn(`Icon "${String(e)}" not found.`), null);
33
+ ...P,
34
+ ...r
35
+ }[o];
36
+ if (!c)
37
+ return console.warn(`Icon "${String(o)}" not found.`), null;
38
+ const {
39
+ boxStyles: $,
40
+ restProps: a
41
+ } = C(d), l = [$, I];
42
+ return /* @__PURE__ */ x(c, { ref: f, "data-testid": `${i}-${o}`, fill: t && e(n, t, t), fillSvg: s && e(n, s, s), ...S, css: l, ...a });
35
43
  });
36
- N.displayName = l;
44
+ h.displayName = i;
37
45
  export {
38
- N as Icon,
39
- M as registerCustomIcons
46
+ h as Icon,
47
+ j as registerCustomIcons
40
48
  };
@@ -1,6 +1,7 @@
1
1
  import { MouseEventHandler } from 'react';
2
2
  import { EnumOrPrimitive, SizeVariant } from '../../../types';
3
- export interface IconProps {
3
+ import { BoxCssComponentProps } from '../..';
4
+ export interface IconProps extends Omit<BoxCssComponentProps<SVGElement>, 'width' | 'height'> {
4
5
  name: string;
5
6
  width?: number;
6
7
  height?: number;