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,47 +1,50 @@
1
- import { getSpacing as l } from "./utils.js";
2
- import { borders as C } from "./borders.js";
3
- import { cursors as v } from "./cursors.js";
4
- import { icon as m } from "./icon.js";
5
- import { flexAlignItems as s, display as c } from "./display.js";
6
- import { SnackbarPosition as a } from "../types/snackbar.js";
7
- import { FlexDirection as i } from "../types/layout.js";
8
- import { get as e } from "../utils/helpers.js";
9
- import { SizeVariant as n } from "../types/common.js";
10
- import { TypographyVariant as g } from "../types/typography.js";
11
- const y = "302px";
12
- var p, h, d, f, b, u, w, x, k, S, $, I;
13
- const V = {
1
+ import { getSpacing as n } from "./utils.js";
2
+ import { borders as o } from "./borders.js";
3
+ import { get as t } from "../utils/helpers.js";
4
+ const i = {
5
+ title: {
6
+ attrs: {
7
+ as: "div",
8
+ align: "start",
9
+ variant: "small",
10
+ styleVariant: "semibold",
11
+ color: "text.black"
12
+ }
13
+ },
14
+ description: {
15
+ attrs: {
16
+ as: "div",
17
+ align: "start",
18
+ variant: "small",
19
+ styleVariant: "normal",
20
+ color: "text.black"
21
+ }
22
+ },
14
23
  container: {
15
24
  default: {
16
25
  position: "fixed",
17
- display: c.flex,
18
- flexDirection: i.Column,
19
- gap: (o) => e(o, `spacing.${n.Sm}`, `theme.spacing.${n.Sm}`),
20
- padding: (o) => e(o, `spacing.${n.Sm}`, `theme.spacing.${n.Sm}`),
26
+ display: "flex",
27
+ flexDirection: "column",
28
+ gap: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
29
+ padding: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
21
30
  boxSizing: "border-box",
22
- maxHeight: (o) => `calc(100vh - ${e(o, `spacing.${n.Xs}`, `theme.spacing.${n.Xs}`)})`,
31
+ maxHeight: (e) => `calc(100vh - ${t(e, "spacing.xs", "theme.spacing.xs")})`,
23
32
  overflowY: "auto",
24
33
  overflowX: "hidden",
25
34
  scrollbarWidth: "thin",
26
- scrollbarColor: (o) => `${e(o, "colors.transparent", "theme.colors.transparent")} ${e(o, "colors.transparent", "theme.colors.transparent")}`,
27
- zIndex: (o) => e(o, "values.zIndex.snackbar", "theme.values.zIndex.snackbar"),
35
+ scrollbarColor: (e) => `${t(e, "colors.transparent", "theme.colors.transparent")} ${t(e, "colors.transparent", "theme.colors.transparent")}`,
36
+ zIndex: (e) => t(e, "values.zIndex.snackbar", "theme.values.zIndex.snackbar"),
28
37
  // to be under modal, could be rewritten by theme
29
38
  "&::-webkit-scrollbar": {
30
- width: (o) => {
31
- var t, r;
32
- return e(o, `spacing.${(t = n) == null ? void 0 : t.Sm}`, `theme.spacing.${(r = n) == null ? void 0 : r.Sm}`);
33
- },
34
- background: (o) => e(o, "colors.transparent", "theme.colors.transparent")
39
+ width: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
40
+ background: (e) => t(e, "colors.transparent", "theme.colors.transparent")
35
41
  },
36
42
  "&::-webkit-scrollbar-thumb": {
37
- background: (o) => e(o, "colors.transparent", "theme.colors.transparent"),
38
- borderRadius: (o) => {
39
- var t, r;
40
- return e(o, `radius.${(t = n) == null ? void 0 : t.Sm}`, `theme.radius.${(r = n) == null ? void 0 : r.Sm}`);
41
- }
43
+ background: (e) => t(e, "colors.transparent", "theme.colors.transparent"),
44
+ borderRadius: (e) => t(e, "radius.sm", "theme.radius.sm")
42
45
  },
43
46
  "&::-webkit-scrollbar-track": {
44
- background: (o) => e(o, "colors.transparent", "theme.colors.transparent")
47
+ background: (e) => t(e, "colors.transparent", "theme.colors.transparent")
45
48
  },
46
49
  "&:hover::-webkit-scrollbar-thumb": {
47
50
  background: "rgba(0, 0, 0, 0.3)"
@@ -54,79 +57,76 @@ const V = {
54
57
  snackbar: {
55
58
  default: {
56
59
  position: "relative",
57
- boxShadow: (o) => e(o, "shadows.snackbar.default", "theme.shadows.snackbar.default"),
58
- width: y,
59
- fontSize: (o) => {
60
- var t, r;
61
- return e(o, `font.size.${(t = g) == null ? void 0 : t.Body1}`, `theme.font.size.${(r = g) == null ? void 0 : r.Body1}`);
62
- },
63
- display: c.flex,
64
- flexDirection: i.Column,
65
- gap: (o) => e(o, "spacing.sm", "theme.spacing.sm"),
66
- color: (o) => e(o, "colors.text.default", "theme.colors.text.default"),
67
- padding: (o) => `${e(o, "spacing.sm", "theme.spacing.sm")} ${e(o, "spacing.md", "theme.spacing.md")}`
60
+ boxShadow: (e) => t(e, "shadows.snackbar.default", "theme.shadows.snackbar.default"),
61
+ width: "302px",
62
+ fontSize: (e) => t(e, "font.size.p", "theme.font.size.p"),
63
+ display: "flex",
64
+ flexDirection: "column",
65
+ gap: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
66
+ color: (e) => t(e, "colors.text.default", "theme.colors.text.default"),
67
+ padding: (e) => `${t(e, "spacing.sm", "theme.spacing.sm")} ${t(e, "spacing.md", "theme.spacing.md")}`
68
68
  },
69
69
  background: {
70
- default: (o) => e(o, "colors.bg.surface", "theme.colors.bg.surface"),
70
+ default: (e) => t(e, "colors.bg.surface", "theme.colors.bg.surface"),
71
71
  variants: {
72
- success: (o) => e(o, "colors.bg.toast.success", "theme.colors.bg.toast.success"),
73
- error: (o) => e(o, "colors.bg.toast.error", "theme.colors.bg.toast.error"),
74
- warning: (o) => e(o, "colors.bg.toast.warning", "theme.colors.bg.toast.warning"),
75
- info: (o) => e(o, "colors.bg.toast.info", "theme.colors.bg.toast.info")
72
+ success: (e) => t(e, "colors.bg.toast.success", "theme.colors.bg.toast.success"),
73
+ error: (e) => t(e, "colors.bg.toast.error", "theme.colors.bg.toast.error"),
74
+ warning: (e) => t(e, "colors.bg.toast.warning", "theme.colors.bg.toast.warning"),
75
+ info: (e) => t(e, "colors.bg.toast.info", "theme.colors.bg.toast.info")
76
76
  }
77
77
  },
78
78
  animation: {
79
- duration: "300ms",
80
- timing: "ease-in-out"
79
+ closeEffect: "300ms ease-in-out 50ms forwards",
80
+ openEffect: "300ms ease-in-out forwards"
81
81
  }
82
82
  },
83
83
  positions: {
84
- [(p = a) == null ? void 0 : p.TopLeft]: {
84
+ "top-left": {
85
85
  top: 0,
86
86
  left: 0,
87
- alignItems: s.start
87
+ alignItems: "flex-start"
88
88
  },
89
- [(h = a) == null ? void 0 : h.TopCenter]: {
90
- top: (o) => e(o, "spacing.none", "theme.spacing.none"),
89
+ "top-center": {
90
+ top: (e) => t(e, "spacing.none", "theme.spacing.none"),
91
91
  left: "50%",
92
92
  transform: "translateX(-50%)",
93
- alignItems: s.center
93
+ alignItems: "center"
94
94
  },
95
- [(d = a) == null ? void 0 : d.TopRight]: {
96
- top: (o) => e(o, "spacing.none", "theme.spacing.none"),
97
- right: (o) => e(o, "spacing.none", "theme.spacing.none"),
98
- alignItems: s.end
95
+ "top-right": {
96
+ top: (e) => t(e, "spacing.none", "theme.spacing.none"),
97
+ right: (e) => t(e, "spacing.none", "theme.spacing.none"),
98
+ alignItems: "flex-end"
99
99
  },
100
- [(f = a) == null ? void 0 : f.BottomLeft]: {
101
- bottom: (o) => e(o, "spacing.none", "theme.spacing.none"),
102
- left: (o) => e(o, "spacing.none", "theme.spacing.none"),
103
- alignItems: s.start,
104
- flexDirection: i.ColumnReverse
100
+ "bottom-left": {
101
+ bottom: (e) => t(e, "spacing.none", "theme.spacing.none"),
102
+ left: (e) => t(e, "spacing.none", "theme.spacing.none"),
103
+ alignItems: "flex-start",
104
+ flexDirection: "column-reverse"
105
105
  },
106
- [(b = a) == null ? void 0 : b.BottomCenter]: {
107
- bottom: (o) => e(o, "spacing.none", "theme.spacing.none"),
106
+ "bottom-center": {
107
+ bottom: (e) => t(e, "spacing.none", "theme.spacing.none"),
108
108
  left: "50%",
109
109
  transform: "translateX(-50%)",
110
- alignItems: s.center,
111
- flexDirection: i.ColumnReverse
110
+ alignItems: "center",
111
+ flexDirection: "column-reverse"
112
112
  },
113
- [(u = a) == null ? void 0 : u.BottomRight]: {
114
- bottom: (o) => e(o, "spacing.none", "theme.spacing.none"),
115
- right: (o) => e(o, "spacing.none", "theme.spacing.none"),
116
- alignItems: s.end,
117
- flexDirection: i.ColumnReverse
113
+ "bottom-right": {
114
+ bottom: (e) => t(e, "spacing.none", "theme.spacing.none"),
115
+ right: (e) => t(e, "spacing.none", "theme.spacing.none"),
116
+ alignItems: "flex-end",
117
+ flexDirection: "column-reverse"
118
118
  }
119
119
  },
120
120
  closeButton: {
121
121
  position: "absolute",
122
- top: (o) => e(o, "spacing.sm", "theme.spacing.sm"),
123
- right: (o) => e(o, "spacing.md", "theme.spacing.md"),
124
- background: (o) => e(o, "colors.transparent", "theme.colors.transparent"),
125
- border: C.none,
126
- cursor: v.pointer,
122
+ top: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
123
+ right: (e) => t(e, "spacing.md", "theme.spacing.md"),
124
+ background: (e) => t(e, "colors.transparent", "theme.colors.transparent"),
125
+ border: o.none,
126
+ cursor: "pointer",
127
127
  padding: 3,
128
- width: (k = (x = (w = m) == null ? void 0 : w.size) == null ? void 0 : x[n.Sm]) == null ? void 0 : k.width,
129
- height: (I = ($ = (S = m) == null ? void 0 : S.size) == null ? void 0 : $[n.Sm]) == null ? void 0 : I.height
128
+ width: 16,
129
+ height: 16
130
130
  },
131
131
  icons: {
132
132
  close: {
@@ -136,46 +136,45 @@ const V = {
136
136
  },
137
137
  success: {
138
138
  name: "success",
139
- fill: (o) => e(o, "colors.icon.success", "theme.colors.icon.success"),
139
+ fill: "icon.success",
140
140
  width: 20,
141
141
  height: 20
142
142
  },
143
143
  error: {
144
144
  name: "error",
145
- fill: (o) => e(o, "colors.icon.error", "theme.colors.icon.error"),
145
+ fill: "icon.error",
146
146
  width: 20,
147
147
  height: 20
148
148
  },
149
149
  warning: {
150
150
  name: "warning",
151
- fill: (o) => e(o, "colors.icon.warning", "theme.colors.icon.warning"),
151
+ fill: "icon.warning",
152
152
  width: 20,
153
153
  height: 20
154
154
  },
155
155
  info: {
156
156
  name: "info",
157
- fill: (o) => e(o, "colors.icon.info", "theme.colors.icon.info"),
157
+ fill: "icon.info",
158
158
  width: 20,
159
159
  height: 20
160
160
  }
161
161
  },
162
162
  snackbarBody: {
163
- display: c.flex,
164
- alignItems: s.start,
165
- gap: (o) => e(o, "spacing.sm", "theme.spacing.sm")
163
+ display: "flex",
164
+ alignItems: "flex-start",
165
+ gap: (e) => t(e, "spacing.sm", "theme.spacing.sm")
166
166
  },
167
167
  snackbarContent: {
168
- display: c.flex,
169
- flexDirection: i.Column,
170
- alignItems: s.start,
171
- gap: l(1),
168
+ display: "flex",
169
+ flexDirection: "column",
170
+ alignItems: "flex-start",
171
+ gap: n(1),
172
172
  flex: 1
173
173
  },
174
174
  actionsContainer: {
175
- paddingTop: l(1)
175
+ paddingTop: n(1)
176
176
  }
177
177
  };
178
178
  export {
179
- y as DEFAULT_SNACKBAR_WIDTH,
180
- V as snackbar
179
+ i as snackbar
181
180
  };
@@ -10,7 +10,7 @@ export declare const stepper: {
10
10
  default: {
11
11
  width: string;
12
12
  position: string;
13
- zIndex: number;
13
+ zIndex: (theme: Record<symbol, unknown>) => number;
14
14
  top: string;
15
15
  marginLeft: string;
16
16
  marginRight: string;
package/tokens/stepper.js CHANGED
@@ -6,7 +6,7 @@ import { get as r } from "../utils/helpers.js";
6
6
  import { Cursors as f } from "../types/cursors.js";
7
7
  import { SizeVariant as i } from "../types/common.js";
8
8
  import { TypographyVariant as s } from "../types/typography.js";
9
- const m = l.size[i.Xxl], c = 104, x = {
9
+ const m = l.size[i.Xxl], c = 104, S = {
10
10
  default: {
11
11
  display: a.flex,
12
12
  flexDirection: "row",
@@ -17,7 +17,7 @@ const m = l.size[i.Xxl], c = 104, x = {
17
17
  default: {
18
18
  width: "100%",
19
19
  position: "relative",
20
- zIndex: -100,
20
+ zIndex: (e) => -r(e, "zIndex.low", 100),
21
21
  top: `${m.height / 2}px`,
22
22
  marginLeft: `-${c / 2}px`,
23
23
  marginRight: `-${c / 2}px`,
@@ -137,5 +137,5 @@ const m = l.size[i.Xxl], c = 104, x = {
137
137
  }
138
138
  };
139
139
  export {
140
- x as stepper
140
+ S as stepper
141
141
  };
package/tokens/tabs.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare const tabs: {
15
15
  position: string;
16
16
  width: string;
17
17
  bottom: number;
18
- zIndex: number;
18
+ zIndex: (theme: Record<symbol, unknown>) => number;
19
19
  borderBottom: (theme: Record<symbol, unknown>) => string;
20
20
  };
21
21
  };
package/tokens/tabs.js CHANGED
@@ -20,7 +20,7 @@ const u = {
20
20
  position: "absolute",
21
21
  width: "100%",
22
22
  bottom: 0,
23
- zIndex: -100,
23
+ zIndex: (o) => -e(o, "zIndex.low", 100),
24
24
  borderBottom: (o) => r.generic({
25
25
  width: e(o, "values.borderThin", "theme.values.borderThin"),
26
26
  color: e(o, "colors.border.default", "theme.colors.border.default")
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @TODO: Cerebra
3
+ * - Align with design
4
+ */
1
5
  export declare const textarea: {
2
6
  default: {
3
7
  width: string;
@@ -3,9 +3,13 @@ export declare const tooltip: {
3
3
  position: string;
4
4
  display: string;
5
5
  whiteSpace: string;
6
+ color: (theme: Record<symbol, unknown>) => string;
6
7
  backgroundColor: (theme: Record<symbol, unknown>) => string;
7
8
  padding: (theme: Record<symbol, unknown>) => string;
8
- zIndex: number;
9
+ zIndex: (theme: Record<symbol, unknown>) => string;
10
+ fontSize: (theme: Record<symbol, unknown>) => string;
11
+ fontWeight: (theme: Record<symbol, unknown>) => string;
12
+ lineHeight: (theme: Record<symbol, unknown>) => string;
9
13
  '&::after': {
10
14
  position: string;
11
15
  content: string;
package/tokens/tooltip.js CHANGED
@@ -1,67 +1,69 @@
1
- import { display as e } from "./display.js";
2
1
  import { get as o } from "../utils/helpers.js";
3
- import { Z_INDEX as l } from "../constants/positioning.js";
4
- const t = 7, g = {
2
+ const l = 6, r = {
5
3
  default: {
6
4
  position: "absolute",
7
5
  display: "block",
8
6
  whiteSpace: "nowrap",
9
- backgroundColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
10
- padding: (r) => o(r, "spacing.md", "theme.spacing.md"),
11
- zIndex: l.TOP,
7
+ color: (t) => o(t, "colors.text.black", "theme.colors.text.black"),
8
+ backgroundColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
9
+ padding: (t) => `${o(t, "spacing.xs", "theme.spacing.xs")} ${o(t, "spacing.sm", "theme.spacing.sm")}`,
10
+ zIndex: (t) => o(t, "zIndex.top", "theme.zIndex.top"),
11
+ fontSize: (t) => o(t, "font.size.caption", "font.size.caption"),
12
+ fontWeight: (t) => o(t, "font.weight.normal", "theme.font.weight.normal"),
13
+ lineHeight: (t) => o(t, "font.line.height.caption", "theme.font.line.height.caption"),
12
14
  "&::after": {
13
15
  position: "absolute",
14
16
  content: '""',
15
- border: `${t}px solid transparent`
17
+ border: `${l}px solid transparent`
16
18
  },
17
19
  "&.tooltip-bottom": {
18
20
  transform: "translateX(-50%)",
19
21
  "&::after": {
20
- top: -t,
22
+ top: -l,
21
23
  left: "50%",
22
- borderLeftColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
23
- borderTopColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
24
+ borderLeftColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
25
+ borderTopColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
24
26
  transform: "translateX(-50%) rotate(45deg)"
25
27
  }
26
28
  },
27
29
  "&.tooltip-top": {
28
30
  transform: "translateX(-50%)",
29
31
  "&::after": {
30
- bottom: -t,
32
+ bottom: -l,
31
33
  left: "50%",
32
- borderRightColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
33
- borderBottomColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
34
+ borderRightColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
35
+ borderBottomColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
34
36
  transform: "translateX(-50%) rotate(45deg)"
35
37
  }
36
38
  },
37
39
  "&.tooltip-left": {
38
40
  transform: "translateY(-50%)",
39
41
  "&::after": {
40
- right: -t,
42
+ right: -l,
41
43
  top: "50%",
42
- borderRightColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
43
- borderTopColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
44
+ borderRightColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
45
+ borderTopColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
44
46
  transform: "translateY(-50%) rotate(45deg)"
45
47
  }
46
48
  },
47
49
  "&.tooltip-right": {
48
50
  transform: "translateY(-50%)",
49
51
  "&::after": {
50
- left: -t,
52
+ left: -l,
51
53
  top: "50%",
52
- borderLeftColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
53
- borderBottomColor: (r) => o(r, 'colors.neutral["grey.40"]', 'theme.colors.neutral["grey.40"]'),
54
+ borderLeftColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
55
+ borderBottomColor: (t) => o(t, "colors.bg.fill.tooltip.default", "theme.colors.bg.fill.tooltip.default"),
54
56
  transform: "translateY(-50%) rotate(45deg) "
55
57
  }
56
58
  }
57
59
  },
58
60
  wrapper: {
59
61
  default: {
60
- display: e.inlineBlock,
62
+ display: "inline-block",
61
63
  position: "relative"
62
64
  }
63
65
  }
64
66
  };
65
67
  export {
66
- g as tooltip
68
+ r as tooltip
67
69
  };