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
package/tokens/modal.js CHANGED
@@ -1,63 +1,50 @@
1
- import { hexToRgba as f, getSpacing as p } from "./utils.js";
2
- import { flexAlignItems as m, display as r } from "./display.js";
3
- import { borders as s } from "./borders.js";
4
- import { cursors as g } from "./cursors.js";
5
- import { Z_INDEX as h } from "../constants/positioning.js";
6
- import { calculateJustify as i } from "../utils/layout.js";
7
- import { get as o } from "../utils/helpers.js";
8
- import { SizeVariant as a } from "../types/common.js";
9
- import { TypographyVariant as d } from "../types/typography.js";
10
- const k = {
1
+ import { hexToRgba as i, getSpacing as o } from "./utils.js";
2
+ import { display as n } from "./display.js";
3
+ import { borders as a } from "./borders.js";
4
+ import { get as t } from "../utils/helpers.js";
5
+ const c = {
11
6
  header: {
12
7
  default: {
13
- display: r.flex,
14
- alignItems: m.center,
15
- justifyContent: i("end"),
16
- padding: `${p(4)} ${p(6)}`,
17
- fontSize: (e) => {
18
- var t, n;
19
- return o(e, `font.size.${(t = d) == null ? void 0 : t.H6}`, `theme.font.size.${(n = d) == null ? void 0 : n.H6}`);
20
- },
21
- fontWeight: "bold",
22
- borderBottom: (e) => s.generic({
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "flex-end",
11
+ padding: `${o(4)} ${o(6)}`,
12
+ borderBottom: (e) => a.generic({
23
13
  width: "1px",
24
- color: o(e, "colors.border.default", "theme.colors.border.default")
14
+ color: t(e, "colors.border.default", "theme.colors.border.default")
25
15
  })
26
16
  },
27
17
  withTitle: {
28
- justifyContent: i("between")
18
+ justifyContent: "space-between"
29
19
  }
30
20
  },
31
21
  title: {
32
22
  default: {
33
23
  display: "flex",
34
24
  alignItems: "center",
35
- padding: (e) => o(e, "spacing.none", "theme.spacing.none"),
36
- margin: (e) => o(e, "spacing.none", "theme.spacing.none")
25
+ fontSize: (e) => t(e, "font.size.h6", "theme.font.size.h6"),
26
+ fontWeight: (e) => t(e, "font.weight.medium", "theme.font.weight.medium"),
27
+ color: (e) => t(e, "colors.text.default", "theme.colors.text.default"),
28
+ padding: (e) => t(e, "spacing.none", "theme.spacing.none"),
29
+ margin: (e) => t(e, "spacing.none", "theme.spacing.none")
37
30
  }
38
31
  },
39
32
  body: {
40
33
  default: {
41
- padding: (e) => {
42
- var t, n;
43
- return o(e, `spacing.${(t = a) == null ? void 0 : t.Lg}`, `theme.spacing.${(n = a) == null ? void 0 : n.Lg}`);
44
- },
45
- fontSize: (e) => {
46
- var t, n;
47
- return o(e, `font.size.${(t = d) == null ? void 0 : t.Body1}`, `theme.font.size.${(n = d) == null ? void 0 : n.Body1}`);
48
- },
49
- color: (e) => o(e, "colors.text.default", "theme.colors.text.default"),
34
+ padding: (e) => t(e, "spacing.lg", "theme.spacing.lg"),
35
+ fontSize: (e) => t(e, "font.size.p", "theme.font.size.p"),
36
+ color: (e) => t(e, "colors.text.default", "theme.colors.text.default"),
50
37
  overflowY: "auto"
51
38
  }
52
39
  },
53
40
  content: {
54
41
  default: {
55
- background: (e) => o(e, "colors.bg.surface", "theme.colors.bg.surface"),
56
- padding: (e) => o(e, "spacing.none", "theme.spacing.none"),
57
- borderRadius: (e) => o(e, "values.border.radius.none", "theme.values.border.radius.none"),
58
- boxShadow: (e) => o(e, "shadows.modal.default", "theme.shadows.modal.default"),
42
+ background: (e) => t(e, "colors.bg.surface", "theme.colors.bg.surface"),
43
+ padding: (e) => t(e, "spacing.none", "theme.spacing.none"),
44
+ borderRadius: (e) => t(e, "values.border.radius.none", "theme.values.border.radius.none"),
45
+ boxShadow: (e) => t(e, "shadows.modal.default", "theme.shadows.modal.default"),
59
46
  position: "relative",
60
- display: r.flex,
47
+ display: n.flex,
61
48
  flexDirection: "column",
62
49
  width: "100%",
63
50
  maxWidth: "654px",
@@ -71,28 +58,22 @@ const k = {
71
58
  },
72
59
  footer: {
73
60
  default: {
74
- display: r.flex,
75
- justifyContent: i("end"),
76
- gap: (e) => {
77
- var t, n;
78
- return `calc(${o(e, `spacing.${(t = a) == null ? void 0 : t.Xs}`, `theme.spacing.${(n = a) == null ? void 0 : n.Xs}`)} * 3)`;
79
- },
80
- padding: (e) => {
81
- var t, n, l, c;
82
- return `${o(e, `spacing.${(t = a) == null ? void 0 : t.Md}`, `theme.spacing.${(n = a) == null ? void 0 : n.Md}`)} ${o(e, `spacing.${(l = a) == null ? void 0 : l.Lg}`, `theme.spacing.${(c = a) == null ? void 0 : c.Lg}`)}`;
83
- },
84
- borderTop: (e) => s.generic({
61
+ display: n.flex,
62
+ justifyContent: "flex-end",
63
+ gap: (e) => `calc(${t(e, "spacing.xs", "theme.spacing.xs")} * 3)`,
64
+ padding: (e) => `${t(e, "spacing.md", "theme.spacing.md")} ${t(e, "spacing.lg", "theme.spacing.lg")}`,
65
+ borderTop: (e) => a.generic({
85
66
  width: "1px",
86
- color: o(e, "colors.border.default", "theme.colors.border.default")
67
+ color: t(e, "colors.border.default", "theme.colors.border.default")
87
68
  })
88
69
  }
89
70
  },
90
71
  closeButton: {
91
72
  default: {
92
- background: (e) => o(e, "colors.transparent", "theme.colors.transparent"),
93
- border: s.none,
94
- cursor: g.pointer,
95
- padding: (e) => o(e, "spacing.none", "theme.spacing.none")
73
+ background: (e) => t(e, "colors.transparent", "theme.colors.transparent"),
74
+ border: "none",
75
+ cursor: "pointer",
76
+ padding: (e) => t(e, "spacing.none", "theme.spacing.none")
96
77
  }
97
78
  },
98
79
  overlay: {
@@ -102,21 +83,22 @@ const k = {
102
83
  left: 0,
103
84
  width: "100vw",
104
85
  height: "100vh",
105
- background: (e) => f(o(e, "colors.neutral.black", "theme.colors.neutral.black"), 0.5),
106
- display: r.flex,
107
- alignItems: m.center,
108
- justifyContent: i("center"),
109
- zIndex: h.HIGH
86
+ background: (e) => i(t(e, "colors.neutral.black", "theme.colors.neutral.black"), 0.5),
87
+ display: "flex",
88
+ alignItems: "center",
89
+ justifyContent: "center",
90
+ zIndex: (e) => t(e, "zIndex.high", "theme.zIndex.high")
110
91
  }
111
92
  },
112
93
  icons: {
113
94
  close: {
114
95
  name: "cross",
96
+ fill: "icon.black",
115
97
  width: 14,
116
98
  height: 14
117
99
  }
118
100
  }
119
101
  };
120
102
  export {
121
- k as modal
103
+ c as modal
122
104
  };
@@ -16,7 +16,7 @@ export declare const scroll: {
16
16
  content: {
17
17
  default: {
18
18
  position: string;
19
- zIndex: number;
19
+ zIndex: (theme: Record<symbol, unknown>) => string;
20
20
  flex: number;
21
21
  flexBasis: string;
22
22
  height: string;
@@ -27,7 +27,7 @@ export declare const scroll: {
27
27
  position: string;
28
28
  top: string;
29
29
  left: string;
30
- zIndex: number;
30
+ zIndex: (theme: Record<symbol, unknown>) => string;
31
31
  minWidth: string;
32
32
  minHeight: string;
33
33
  maxWidth: string;
@@ -61,6 +61,16 @@ export declare const scroll: {
61
61
  right: string;
62
62
  height: string;
63
63
  };
64
+ autoHide: {
65
+ opacity: number;
66
+ transition: string;
67
+ };
68
+ autoHideScrolling: {
69
+ opacity: number;
70
+ '&:hover': {
71
+ opacity: number;
72
+ };
73
+ };
64
74
  };
65
75
  thumb: {
66
76
  default: {
@@ -87,5 +97,12 @@ export declare const scroll: {
87
97
  minWidth: (theme: Record<symbol, unknown>) => string;
88
98
  transition: (theme: Record<symbol, unknown>) => string;
89
99
  };
100
+ autoHide: {
101
+ opacity: number;
102
+ transition: string;
103
+ };
104
+ autoHideScrolling: {
105
+ opacity: number;
106
+ };
90
107
  };
91
108
  };
package/tokens/scroll.js CHANGED
@@ -1,11 +1,10 @@
1
- import { display as l } from "./display.js";
1
+ import { display as e } from "./display.js";
2
2
  import { get as o } from "../utils/helpers.js";
3
- import { Z_INDEX as e } from "../constants/positioning.js";
4
- const i = 8, s = {
3
+ const i = 8, r = {
5
4
  container: {
6
5
  default: {
7
6
  position: "relative",
8
- display: l.flex,
7
+ display: e.flex,
9
8
  overflow: "auto",
10
9
  isolation: "isolate",
11
10
  maxBlockSize: "100%",
@@ -19,7 +18,7 @@ const i = 8, s = {
19
18
  content: {
20
19
  default: {
21
20
  position: "relative",
22
- zIndex: e.ZERO,
21
+ zIndex: (t) => o(t, "zIndex.zero", "theme.zIndex.zero"),
23
22
  flex: 1,
24
23
  flexBasis: "auto",
25
24
  height: "max-content"
@@ -30,7 +29,7 @@ const i = 8, s = {
30
29
  position: "sticky",
31
30
  top: "0",
32
31
  left: "0",
33
- zIndex: e.FIRST,
32
+ zIndex: (t) => o(t, "zIndex.first", "theme.zIndex.first"),
34
33
  minWidth: "calc(100% - 1px)",
35
34
  minHeight: "calc(100% - 1px)",
36
35
  maxWidth: "calc(100% - 1px)",
@@ -63,6 +62,16 @@ const i = 8, s = {
63
62
  bottom: 0,
64
63
  right: `${i}px`,
65
64
  height: `${i}px`
65
+ },
66
+ autoHide: {
67
+ opacity: 0,
68
+ transition: "opacity 0.2s ease-in-out"
69
+ },
70
+ autoHideScrolling: {
71
+ opacity: 0.2,
72
+ "&:hover": {
73
+ opacity: 1
74
+ }
66
75
  }
67
76
  },
68
77
  thumb: {
@@ -89,9 +98,16 @@ const i = 8, s = {
89
98
  height: `${i}px`,
90
99
  minWidth: (t) => o(t, "spacing.md", "theme.spacing.md"),
91
100
  transition: (t) => o(t, "values.transitions.scroll.thumb", "theme.values.transitions.scroll.thumb")
101
+ },
102
+ autoHide: {
103
+ opacity: 0,
104
+ transition: "opacity 0.2s ease-in-out"
105
+ },
106
+ autoHideScrolling: {
107
+ opacity: 1
92
108
  }
93
109
  }
94
110
  };
95
111
  export {
96
- s as scroll
112
+ r as scroll
97
113
  };
@@ -26,7 +26,7 @@ export declare const select: {
26
26
  listStyleType: string;
27
27
  margin: (theme: Record<symbol, unknown>) => string;
28
28
  padding: (theme: Record<symbol, unknown>) => string;
29
- zIndex: number;
29
+ zIndex: (theme: Record<symbol, unknown>) => string;
30
30
  overflowY: string;
31
31
  };
32
32
  button: {
@@ -74,11 +74,13 @@ export declare const select: {
74
74
  };
75
75
  };
76
76
  };
77
- arrowIcon: {
78
- name: string;
79
- fill: string;
80
- width: number;
81
- height: number;
77
+ icons: {
78
+ arrowIcon: {
79
+ name: string;
80
+ fill: string;
81
+ width: number;
82
+ height: number;
83
+ };
82
84
  };
83
85
  adornment: {
84
86
  default: {
@@ -86,7 +88,7 @@ export declare const select: {
86
88
  alignItems: string;
87
89
  flexDirection: FlexDirection;
88
90
  position: string;
89
- zIndex: number;
91
+ zIndex: (theme: Record<symbol, unknown>) => string;
90
92
  };
91
93
  };
92
94
  };
package/tokens/select.js CHANGED
@@ -1,14 +1,13 @@
1
- import { Z_INDEX as r } from "../constants/positioning.js";
2
- import { getSpacing as d } from "./utils.js";
3
- import { borders as f } from "./borders.js";
4
- import { flexAlignItems as t, display as n } from "./display.js";
5
- import { FlexDirection as p } from "../types/layout.js";
1
+ import { getSpacing as s } from "./utils.js";
2
+ import { borders as d } from "./borders.js";
3
+ import { flexAlignItems as t, display as r } from "./display.js";
6
4
  import { get as o } from "../utils/helpers.js";
7
- import { Cursors as i } from "../types/cursors.js";
8
- import { ButtonVariant as m } from "../types/button.js";
9
- import { TextAlign as c, TypographyVariant as a } from "../types/typography.js";
10
- var l, s;
11
- const T = {
5
+ import { FlexDirection as f } from "../types/layout.js";
6
+ import { Cursors as n } from "../types/cursors.js";
7
+ import { ButtonVariant as p } from "../types/button.js";
8
+ import { TextAlign as m, TypographyVariant as i } from "../types/typography.js";
9
+ var a, l;
10
+ const v = {
12
11
  default: {
13
12
  display: "inline-block",
14
13
  position: "relative"
@@ -30,46 +29,46 @@ const T = {
30
29
  background: (e) => o(e, "colors.bg.surface", "theme.colors.bg.surface"),
31
30
  boxShadow: (e) => o(e, 'shadows.box["3"]', 'theme.shadows.box["3"]'),
32
31
  fontFamily: (e) => o(e, "font.family", "theme.font.family"),
33
- fontSize: (e) => o(e, `font.size.${a.Body1}`, `theme.font.size.${a.Body1}`),
32
+ fontSize: (e) => o(e, `font.size.${i.Body1}`, `theme.font.size.${i.Body1}`),
34
33
  fontWeight: (e) => o(e, "font.weight.normal", "theme.font.weight.normal"),
35
34
  listStyleType: "none",
36
35
  margin: (e) => o(e, "spacing.none", "theme.spacing.none"),
37
36
  padding: (e) => o(e, "spacing.none", "theme.spacing.none"),
38
- zIndex: r.TOP,
37
+ zIndex: (e) => o(e, "zIndex.top", "theme.zIndex.top"),
39
38
  overflowY: "auto"
40
39
  },
41
40
  button: {
42
41
  default: {
43
- border: (e) => f.generic({
42
+ border: (e) => d.generic({
44
43
  width: o(e, "values.borderThin", "theme.values.borderThin"),
45
44
  color: o(e, "colors.border.default", "theme.colors.border.default")
46
45
  }),
47
46
  padding: (e) => o(e, "spacing.sm", "theme.spacing.sm"),
48
47
  width: "100%",
49
- display: (l = n) == null ? void 0 : l.flex,
48
+ display: (a = r) == null ? void 0 : a.flex,
50
49
  flexDirection: "row",
51
50
  justifyContent: "space-between",
52
- alignItems: (s = t) == null ? void 0 : s.center,
53
- textAlign: c.Left,
51
+ alignItems: (l = t) == null ? void 0 : l.center,
52
+ textAlign: m.Left,
54
53
  ".gd-button__content": {
55
54
  justifyContent: t.start
56
55
  }
57
56
  },
58
57
  attrs: {
59
- variant: m.Inherit
58
+ variant: p.Inherit
60
59
  }
61
60
  },
62
61
  item: {
63
62
  default: {
64
- cursor: i.Pointer,
65
- padding: d(2),
63
+ cursor: n.Pointer,
64
+ padding: s(2),
66
65
  "&:hover, &.active": {
67
66
  backgroundColor: (e) => o(e, "colors.bg.fill.hover", "theme.colors.bg.fill.hover")
68
67
  }
69
68
  },
70
69
  disabled: {
71
70
  opacity: 0.5,
72
- cursor: i.NotAllowed,
71
+ cursor: n.NotAllowed,
73
72
  pointerEvents: "none"
74
73
  }
75
74
  },
@@ -86,22 +85,24 @@ const T = {
86
85
  }
87
86
  }
88
87
  },
89
- arrowIcon: {
90
- name: "arrowDown",
91
- fill: 'neutral["grey.90"]',
92
- width: 18,
93
- height: 18
88
+ icons: {
89
+ arrowIcon: {
90
+ name: "arrowDown",
91
+ fill: 'neutral["grey.90"]',
92
+ width: 18,
93
+ height: 18
94
+ }
94
95
  },
95
96
  adornment: {
96
97
  default: {
97
- display: n.flex,
98
+ display: r.flex,
98
99
  alignItems: t.center,
99
- flexDirection: p.Row,
100
+ flexDirection: f.Row,
100
101
  position: "relative",
101
- zIndex: r.FIRST
102
+ zIndex: (e) => o(e, "zIndex.first", "theme.zIndex.first")
102
103
  }
103
104
  }
104
105
  };
105
106
  export {
106
- T as select
107
+ v as select
107
108
  };
@@ -1,11 +1,27 @@
1
- import { FlexDirection } from '../types';
2
- export declare const DEFAULT_SNACKBAR_WIDTH = "302px";
3
1
  export declare const snackbar: {
2
+ title: {
3
+ attrs: {
4
+ as: string;
5
+ align: string;
6
+ variant: string;
7
+ styleVariant: string;
8
+ color: string;
9
+ };
10
+ };
11
+ description: {
12
+ attrs: {
13
+ as: string;
14
+ align: string;
15
+ variant: string;
16
+ styleVariant: string;
17
+ color: string;
18
+ };
19
+ };
4
20
  container: {
5
21
  default: {
6
22
  position: string;
7
23
  display: string;
8
- flexDirection: FlexDirection;
24
+ flexDirection: string;
9
25
  gap: (theme: Record<symbol, unknown>) => string;
10
26
  padding: (theme: Record<symbol, unknown>) => string;
11
27
  boxSizing: string;
@@ -41,7 +57,7 @@ export declare const snackbar: {
41
57
  width: string;
42
58
  fontSize: (theme: Record<symbol, unknown>) => string;
43
59
  display: string;
44
- flexDirection: FlexDirection;
60
+ flexDirection: string;
45
61
  gap: (theme: Record<symbol, unknown>) => string;
46
62
  color: (theme: Record<symbol, unknown>) => string;
47
63
  padding: (theme: Record<symbol, unknown>) => string;
@@ -56,45 +72,45 @@ export declare const snackbar: {
56
72
  };
57
73
  };
58
74
  animation: {
59
- duration: string;
60
- timing: string;
75
+ closeEffect: string;
76
+ openEffect: string;
61
77
  };
62
78
  };
63
79
  positions: {
64
- "top-left": {
80
+ 'top-left': {
65
81
  top: number;
66
82
  left: number;
67
83
  alignItems: string;
68
84
  };
69
- "top-center": {
85
+ 'top-center': {
70
86
  top: (theme: Record<symbol, unknown>) => string;
71
87
  left: string;
72
88
  transform: string;
73
89
  alignItems: string;
74
90
  };
75
- "top-right": {
91
+ 'top-right': {
76
92
  top: (theme: Record<symbol, unknown>) => string;
77
93
  right: (theme: Record<symbol, unknown>) => string;
78
94
  alignItems: string;
79
95
  };
80
- "bottom-left": {
96
+ 'bottom-left': {
81
97
  bottom: (theme: Record<symbol, unknown>) => string;
82
98
  left: (theme: Record<symbol, unknown>) => string;
83
99
  alignItems: string;
84
- flexDirection: FlexDirection;
100
+ flexDirection: string;
85
101
  };
86
- "bottom-center": {
102
+ 'bottom-center': {
87
103
  bottom: (theme: Record<symbol, unknown>) => string;
88
104
  left: string;
89
105
  transform: string;
90
106
  alignItems: string;
91
- flexDirection: FlexDirection;
107
+ flexDirection: string;
92
108
  };
93
- "bottom-right": {
109
+ 'bottom-right': {
94
110
  bottom: (theme: Record<symbol, unknown>) => string;
95
111
  right: (theme: Record<symbol, unknown>) => string;
96
112
  alignItems: string;
97
- flexDirection: FlexDirection;
113
+ flexDirection: string;
98
114
  };
99
115
  };
100
116
  closeButton: {
@@ -116,25 +132,25 @@ export declare const snackbar: {
116
132
  };
117
133
  success: {
118
134
  name: string;
119
- fill: (theme: Record<symbol, unknown>) => string;
135
+ fill: string;
120
136
  width: number;
121
137
  height: number;
122
138
  };
123
139
  error: {
124
140
  name: string;
125
- fill: (theme: Record<symbol, unknown>) => string;
141
+ fill: string;
126
142
  width: number;
127
143
  height: number;
128
144
  };
129
145
  warning: {
130
146
  name: string;
131
- fill: (theme: Record<symbol, unknown>) => string;
147
+ fill: string;
132
148
  width: number;
133
149
  height: number;
134
150
  };
135
151
  info: {
136
152
  name: string;
137
- fill: (theme: Record<symbol, unknown>) => string;
153
+ fill: string;
138
154
  width: number;
139
155
  height: number;
140
156
  };
@@ -146,7 +162,7 @@ export declare const snackbar: {
146
162
  };
147
163
  snackbarContent: {
148
164
  display: string;
149
- flexDirection: FlexDirection;
165
+ flexDirection: string;
150
166
  alignItems: string;
151
167
  gap: string | number;
152
168
  flex: number;