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/card.js CHANGED
@@ -1,21 +1,18 @@
1
- import { display as o, flexAlignItems as l } from "./display.js";
2
- import { CardVariant as e, CardSizeVariant as n } from "../types/card.js";
3
1
  import { get as i } from "../utils/helpers.js";
4
- import { FlexDirection as a } from "../types/layout.js";
5
- const h = {
2
+ const e = {
6
3
  default: {},
7
4
  title: {
8
5
  default: (t) => ({
9
6
  margin: i(t, "spacing.none", "theme.spacing.none"),
10
7
  padding: i(t, "spacing.none", "theme.spacing.none")
11
8
  }),
12
- [e.Vertical]: {
13
- [n.Default]: {},
14
- [n.Sm]: {}
9
+ vertical: {
10
+ default: {},
11
+ sm: {}
15
12
  },
16
- [e.Horizontal]: {
17
- [n.Default]: {},
18
- [n.Sm]: {}
13
+ horizontal: {
14
+ default: {},
15
+ sm: {}
19
16
  }
20
17
  },
21
18
  description: {
@@ -23,46 +20,46 @@ const h = {
23
20
  margin: i(t, "spacing.none", "theme.spacing.none"),
24
21
  padding: i(t, "spacing.none", "theme.spacing.none")
25
22
  }),
26
- [e.Vertical]: {
27
- [n.Default]: {},
28
- [n.Sm]: {}
23
+ vertical: {
24
+ default: {},
25
+ sm: {}
29
26
  },
30
- [e.Horizontal]: {
31
- [n.Default]: {},
32
- [n.Sm]: {}
27
+ horizontal: {
28
+ default: {},
29
+ sm: {}
33
30
  }
34
31
  },
35
32
  rating: {
36
33
  default: (t) => ({
37
- display: o.flex,
38
- alignItems: l.start,
34
+ display: "flex",
35
+ alignItems: "flex-start",
39
36
  gap: i(t, "spacing.sm", "theme.spacing.sm")
40
37
  }),
41
- [e.Vertical]: {
42
- [n.Default]: (t) => ({
38
+ vertical: {
39
+ default: (t) => ({
43
40
  color: i(t, "colors.text.caption", "theme.colors.text.caption"),
44
41
  fontSize: i(t, "font.size.caption", "theme.font.size.caption"),
45
42
  fontWeight: i(t, "font.weight.normal", "theme.font.weight.normal"),
46
43
  lineHeight: i(t, "font.line.height.caption", "theme.font.line.height.caption")
47
44
  }),
48
- [n.Sm]: (t) => ({
45
+ sm: (t) => ({
49
46
  color: i(t, "colors.text.caption", "theme.colors.text.caption"),
50
- flexDirection: a.Column,
47
+ flexDirection: "column",
51
48
  fontSize: i(t, "font.size.caption", "theme.font.size.caption"),
52
49
  fontWeight: i(t, "font.weight.normal", "theme.font.weight.normal"),
53
50
  lineHeight: i(t, "font.line.height.caption", "theme.font.line.height.caption")
54
51
  })
55
52
  },
56
- [e.Horizontal]: {
57
- [n.Default]: (t) => ({
53
+ horizontal: {
54
+ default: (t) => ({
58
55
  color: i(t, "colors.text.caption", "theme.colors.text.caption"),
59
56
  fontSize: i(t, "font.size.caption", "theme.font.size.caption"),
60
57
  fontWeight: i(t, "font.weight.normal", "theme.font.weight.normal"),
61
58
  lineHeight: i(t, "font.line.height.caption", "theme.font.line.height.caption")
62
59
  }),
63
- [n.Sm]: (t) => ({
60
+ sm: (t) => ({
64
61
  color: i(t, "colors.text.caption", "theme.colors.text.caption"),
65
- flexDirection: a.Column,
62
+ flexDirection: "column",
66
63
  fontSize: i(t, "font.size.caption", "theme.font.size.caption"),
67
64
  fontWeight: i(t, "font.weight.normal", "theme.font.weight.normal"),
68
65
  lineHeight: i(t, "font.line.height.caption", "theme.font.line.height.caption")
@@ -71,46 +68,46 @@ const h = {
71
68
  },
72
69
  button: {
73
70
  default: {
74
- display: o.flex
71
+ display: "flex"
75
72
  },
76
- [e.Vertical]: {
77
- [n.Default]: {},
78
- [n.Sm]: {}
73
+ vertical: {
74
+ default: {},
75
+ sm: {}
79
76
  },
80
- [e.Horizontal]: {
81
- [n.Default]: {},
82
- [n.Sm]: {}
77
+ horizontal: {
78
+ default: {},
79
+ sm: {}
83
80
  }
84
81
  },
85
82
  image: {
86
83
  default: {},
87
- [e.Vertical]: {
88
- [n.Default]: {},
89
- [n.Sm]: {}
84
+ vertical: {
85
+ default: {},
86
+ sm: {}
90
87
  },
91
- [e.Horizontal]: {
92
- [n.Default]: {},
93
- [n.Sm]: {}
88
+ horizontal: {
89
+ default: {},
90
+ sm: {}
94
91
  }
95
92
  },
96
93
  counter: {
97
94
  default: {},
98
- [e.Vertical]: {
99
- [n.Default]: {},
100
- [n.Sm]: {}
95
+ vertical: {
96
+ default: {},
97
+ sm: {}
101
98
  },
102
- [e.Horizontal]: {
103
- [n.Default]: {},
104
- [n.Sm]: {}
99
+ horizontal: {
100
+ default: {},
101
+ sm: {}
105
102
  }
106
103
  },
107
104
  price: {
108
105
  default: {
109
- display: o.flex
106
+ display: "flex"
110
107
  },
111
- [e.Vertical]: {
112
- [n.Default]: {},
113
- [n.Sm]: (t) => ({
108
+ vertical: {
109
+ default: {},
110
+ sm: (t) => ({
114
111
  "& > div > *": {
115
112
  fontSize: i(t, "font.size.h6", "theme.font.size.h6"),
116
113
  fontWeight: i(t, "font.weight.medium", "theme.font.weight.medium"),
@@ -120,9 +117,9 @@ const h = {
120
117
  }
121
118
  })
122
119
  },
123
- [e.Horizontal]: {
124
- [n.Default]: {},
125
- [n.Sm]: (t) => ({
120
+ horizontal: {
121
+ default: {},
122
+ sm: (t) => ({
126
123
  "& > div > *": {
127
124
  fontSize: i(t, "font.size.h6", "theme.font.size.h6"),
128
125
  fontWeight: i(t, "font.weight.medium", "theme.font.weight.medium"),
@@ -135,5 +132,5 @@ const h = {
135
132
  }
136
133
  };
137
134
  export {
138
- h as card
135
+ e as card
139
136
  };
@@ -7,7 +7,7 @@ export declare const carousel: {
7
7
  overflow: string;
8
8
  width: string;
9
9
  display: string;
10
- zIndex: number;
10
+ zIndex: (theme: Record<symbol, unknown>) => string;
11
11
  gap: string;
12
12
  };
13
13
  variant: {
@@ -84,7 +84,7 @@ export declare const carousel: {
84
84
  transform: string;
85
85
  width: string;
86
86
  padding: string;
87
- zIndex: number;
87
+ zIndex: (theme: Record<symbol, unknown>) => string;
88
88
  };
89
89
  carouselDots: {
90
90
  display: string;
@@ -1,12 +1,11 @@
1
1
  import { display as o, flexAlignItems as n } from "./display.js";
2
2
  import { cursors as a } from "./cursors.js";
3
- import { ButtonVariant as s } from "../types/button.js";
3
+ import { ButtonVariant as l } from "../types/button.js";
4
4
  import { get as t } from "../utils/helpers.js";
5
- import { FlexDirection as c } from "../types/layout.js";
5
+ import { FlexDirection as s } from "../types/layout.js";
6
6
  import { calculateJustify as i } from "../utils/layout.js";
7
- import { Z_INDEX as l } from "../constants/positioning.js";
8
7
  import { SizeVariant as r } from "../types/common.js";
9
- const b = {
8
+ const u = {
10
9
  default: {},
11
10
  container: {
12
11
  default: {
@@ -14,7 +13,7 @@ const b = {
14
13
  overflow: "hidden",
15
14
  width: "100%",
16
15
  display: o.flex,
17
- zIndex: l.FIRST,
16
+ zIndex: (e) => t(e, "zIndex.first", "theme.zIndex.first"),
18
17
  gap: "1rem"
19
18
  },
20
19
  variant: {
@@ -91,7 +90,7 @@ const b = {
91
90
  transform: "translateY(-50%)",
92
91
  width: "100%",
93
92
  padding: "0.5rem 1rem",
94
- zIndex: l.HIGH
93
+ zIndex: (e) => t(e, "zIndex.high", "theme.zIndex.high")
95
94
  },
96
95
  carouselDots: {
97
96
  display: o.flex,
@@ -124,7 +123,7 @@ const b = {
124
123
  gap: "0.5rem"
125
124
  },
126
125
  vertical: {
127
- flexDirection: c.Column,
126
+ flexDirection: s.Column,
128
127
  flex: "0 0 50px",
129
128
  overflowX: "hidden",
130
129
  alignItems: n.center
@@ -184,7 +183,7 @@ const b = {
184
183
  height: (e) => t(e, `spacing.${r.Xl}`, `theme.spacing.${r.Xl}`)
185
184
  },
186
185
  attrs: {
187
- variant: s.Text,
186
+ variant: l.Text,
188
187
  isIcon: !0
189
188
  }
190
189
  },
@@ -202,5 +201,5 @@ const b = {
202
201
  }
203
202
  };
204
203
  export {
205
- b as carousel
204
+ u as carousel
206
205
  };
package/tokens/chat.d.ts CHANGED
@@ -1,10 +1,8 @@
1
- import { ButtonVariant } from '../types';
2
1
  export declare const chat: {
3
2
  wrapper: {
4
3
  default: {
5
4
  display: string;
6
5
  position: string;
7
- minHeight: string;
8
6
  height: string;
9
7
  width: string;
10
8
  overflow: string;
@@ -23,18 +21,17 @@ export declare const chat: {
23
21
  paddingBottom: string | number;
24
22
  gap: string | number;
25
23
  minHeight: number;
24
+ margin: string;
26
25
  };
27
26
  md: {
28
27
  paddingLeft: string;
29
28
  paddingRight: string;
30
29
  };
31
30
  mdXl: {
32
- paddingLeft: string;
33
- paddingRight: string;
31
+ maxWidth: string;
34
32
  };
35
33
  xl: {
36
- paddingLeft: string;
37
- paddingRight: string;
34
+ maxWidth: string;
38
35
  };
39
36
  };
40
37
  mainHeader: {
@@ -53,52 +50,76 @@ export declare const chat: {
53
50
  flexDirection: string;
54
51
  };
55
52
  sidebar: {
56
- minWidth: string;
57
- maxWidth: string;
58
- overflow: string;
59
- borderRight: string;
60
- backgroundColor: (theme: Record<symbol, unknown>) => string;
61
- borderColor: (theme: Record<symbol, unknown>) => string;
62
- flex: string;
63
- display: string;
64
- flexDirection: string;
65
- minHeight: string;
53
+ default: {
54
+ overflow: string;
55
+ borderRight: string;
56
+ position: string;
57
+ transition: (theme: Record<symbol, unknown>) => string;
58
+ backgroundColor: (theme: Record<symbol, unknown>) => string;
59
+ borderColor: (theme: Record<symbol, unknown>) => string;
60
+ display: string;
61
+ flexDirection: string;
62
+ minHeight: string;
63
+ transform: string;
64
+ pointerEvents: string;
65
+ };
66
+ open: {
67
+ width: string;
68
+ };
69
+ close: {
70
+ width: number;
71
+ transform: string;
72
+ pointerEvents: string;
73
+ };
74
+ };
75
+ sidebarMinified: {
76
+ default: {
77
+ overflow: string;
78
+ borderRight: string;
79
+ position: string;
80
+ transition: (theme: Record<symbol, unknown>) => string;
81
+ backgroundColor: (theme: Record<symbol, unknown>) => string;
82
+ borderColor: (theme: Record<symbol, unknown>) => string;
83
+ display: string;
84
+ flexDirection: string;
85
+ minHeight: string;
86
+ transform: string;
87
+ pointerEvents: string;
88
+ opacity: number;
89
+ };
90
+ open: {};
91
+ close: {
92
+ opacity: number;
93
+ width: number;
94
+ transform: string;
95
+ pointerEvents: string;
96
+ };
66
97
  };
67
98
  sidebarWrapper: {
68
- default: {};
69
- auto: {
70
- default: {};
71
- md: (theme: Record<symbol, unknown>) => {
72
- position: string;
73
- display: string;
74
- flexDirection: string;
75
- left: number;
76
- top: number;
77
- right: number;
78
- bottom: number;
79
- backgroundColor: string;
80
- zIndex: number;
81
- };
99
+ default: {
100
+ transition: (theme: Record<symbol, unknown>) => string;
82
101
  };
83
- desktop: {
84
- default: {};
85
- md: {};
86
- };
87
- drawer: {
88
- default: {
89
- position: string;
90
- display: string;
91
- flexDirection: string;
92
- left: number;
93
- top: number;
94
- right: number;
95
- bottom: number;
96
- backgroundColor: (theme: Record<symbol, unknown>) => string;
97
- zIndex: number;
98
- };
99
- md: {};
102
+ open: {
103
+ opacity: number;
104
+ pointerEvents: string;
105
+ };
106
+ close: {
107
+ opacity: number;
108
+ pointerEvents: string;
109
+ };
110
+ md: (theme: Record<symbol, unknown>) => {
111
+ position: string;
112
+ display: string;
113
+ flexDirection: string;
114
+ left: number;
115
+ top: number;
116
+ right: number;
117
+ bottom: number;
118
+ backgroundColor: string;
119
+ zIndex: string;
100
120
  };
101
121
  };
122
+ sidebarContentWrapper: {};
102
123
  sidebarHeader: {
103
124
  minHeight: string;
104
125
  height: string;
@@ -120,7 +141,7 @@ export declare const chat: {
120
141
  };
121
142
  };
122
143
  attrs: {
123
- variant: ButtonVariant;
144
+ variant: string;
124
145
  };
125
146
  open: {
126
147
  transform: string;
package/tokens/chat.js CHANGED
@@ -1,15 +1,10 @@
1
- import { hexToRgba as i, getSpacing as n } from "./utils.js";
2
- import { flexAlignItems as r, display as t } from "./display.js";
3
- import { ChatLayoutVariant as l } from "../types/chat.js";
4
- import { ButtonVariant as d } from "../types/button.js";
1
+ import { hexToRgba as r, getSpacing as t } from "./utils.js";
5
2
  import { get as o } from "../utils/helpers.js";
6
- import { Z_INDEX as a } from "../constants/positioning.js";
7
- const x = {
3
+ const n = {
8
4
  wrapper: {
9
5
  default: {
10
- display: t.flex,
6
+ display: "flex",
11
7
  position: "relative",
12
- minHeight: "500px",
13
8
  height: "100%",
14
9
  width: "100%",
15
10
  overflow: "hidden"
@@ -21,98 +16,121 @@ const x = {
21
16
  position: "relative",
22
17
  width: "100%",
23
18
  height: "100%",
24
- display: t.flex,
19
+ display: "flex",
25
20
  flexDirection: "column",
26
21
  justifyContent: "flex-end",
27
- alignItems: r.end,
28
- paddingBottom: n(8),
29
- gap: n(4),
30
- minHeight: 0
22
+ alignItems: "flex-end",
23
+ paddingBottom: t(8),
24
+ gap: t(4),
25
+ minHeight: 0,
26
+ margin: "0 auto"
31
27
  },
32
28
  md: {
33
29
  paddingLeft: "24px",
34
30
  paddingRight: "24px"
35
31
  },
36
32
  mdXl: {
37
- paddingLeft: "80px",
38
- paddingRight: "80px"
33
+ maxWidth: "80%"
39
34
  },
40
35
  xl: {
41
- paddingLeft: "260px",
42
- paddingRight: "260px"
36
+ maxWidth: "70%"
43
37
  }
44
38
  },
45
39
  mainHeader: {
46
40
  minHeight: "56px",
47
41
  height: "56px",
48
- display: t.flex,
42
+ display: "flex",
49
43
  overflow: "hidden",
50
- alignItems: r.center,
44
+ alignItems: "center",
51
45
  padding: "0 24px",
52
46
  borderBottom: "1px solid",
53
- borderColor: (e) => o(e, 'colors.neutral["grey.30"]', 'theme.colors.neutral["grey.30"]')
47
+ borderColor: (e) => o(e, "colors.border.default", "theme.colors.border.default")
54
48
  },
55
49
  body: {
56
- display: t.flex,
50
+ display: "flex",
57
51
  flex: 1,
58
52
  flexDirection: "column"
59
53
  },
60
54
  sidebar: {
61
- minWidth: "250px",
62
- maxWidth: "250px",
63
- overflow: "hidden",
64
- borderRight: "1px solid",
65
- backgroundColor: (e) => o(e, "colors.neutral.white", "theme.colors.neutral.white"),
66
- borderColor: (e) => o(e, 'colors.neutral["grey.30"]', 'theme.colors.neutral["grey.30"]'),
67
- flex: "0 0 250px",
68
- display: t.flex,
69
- flexDirection: "column",
70
- minHeight: "100%"
55
+ default: {
56
+ overflow: "hidden",
57
+ borderRight: "1px solid",
58
+ position: "relative",
59
+ transition: (e) => o(e, "values.transitions.chat.sidebar", "theme.values.transitions.chat.sidebar"),
60
+ backgroundColor: (e) => o(e, "colors.bg.surface", "theme.colors.bg.surface"),
61
+ borderColor: (e) => o(e, "colors.border.default", "theme.colors.border.default"),
62
+ display: "flex",
63
+ flexDirection: "column",
64
+ minHeight: "100%",
65
+ transform: "translateX(0)",
66
+ pointerEvents: "auto"
67
+ },
68
+ open: {
69
+ width: "250px"
70
+ },
71
+ close: {
72
+ width: 0,
73
+ transform: "translateX(-100%)",
74
+ pointerEvents: "none"
75
+ }
76
+ },
77
+ sidebarMinified: {
78
+ default: {
79
+ overflow: "hidden",
80
+ borderRight: "1px solid",
81
+ position: "relative",
82
+ transition: (e) => o(e, "values.transitions.chat.sidebar", "theme.values.transitions.chat.sidebar"),
83
+ backgroundColor: (e) => o(e, "colors.bg.surface", "theme.colors.bg.surface"),
84
+ borderColor: (e) => o(e, "colors.border.default", "theme.colors.border.default"),
85
+ display: "flex",
86
+ flexDirection: "column",
87
+ minHeight: "100%",
88
+ transform: "translateX(0)",
89
+ pointerEvents: "auto",
90
+ opacity: 1
91
+ },
92
+ open: {},
93
+ close: {
94
+ opacity: 0,
95
+ width: 0,
96
+ transform: "translateX(-100%)",
97
+ pointerEvents: "none"
98
+ }
71
99
  },
72
100
  sidebarWrapper: {
73
- default: {},
74
- [l.Auto]: {
75
- default: {},
76
- md: (e) => ({
77
- position: "absolute",
78
- display: t.block,
79
- flexDirection: "column",
80
- left: 0,
81
- top: 0,
82
- right: 0,
83
- bottom: 0,
84
- backgroundColor: i(o(e, "colors.neutral.black", "theme.colors.neutral.black"), 0.1),
85
- zIndex: a.MEDIUM
86
- })
101
+ default: {
102
+ transition: (e) => o(e, "values.transitions.chat.sidebar", "theme.values.transitions.chat.sidebarWrapper")
87
103
  },
88
- [l.Desktop]: {
89
- default: {},
90
- md: {}
104
+ open: {
105
+ opacity: 1,
106
+ pointerEvents: "auto"
91
107
  },
92
- [l.Drawer]: {
93
- default: {
94
- position: "absolute",
95
- display: t.block,
96
- flexDirection: "column",
97
- left: 0,
98
- top: 0,
99
- right: 0,
100
- bottom: 0,
101
- backgroundColor: (e) => i(o(e, "colors.neutral.black", "theme.colors.neutral.black"), 0.1),
102
- zIndex: a.MEDIUM
103
- },
104
- md: {}
105
- }
108
+ close: {
109
+ opacity: 0,
110
+ pointerEvents: "none"
111
+ },
112
+ md: (e) => ({
113
+ position: "absolute",
114
+ display: "block",
115
+ flexDirection: "column",
116
+ left: 0,
117
+ top: 0,
118
+ right: 0,
119
+ bottom: 0,
120
+ backgroundColor: r(o(e, "colors.neutral.black", "theme.colors.neutral.black"), 0.1),
121
+ zIndex: o(e, "zIndex.medium", "theme.zIndex.medium")
122
+ })
106
123
  },
124
+ sidebarContentWrapper: {},
107
125
  sidebarHeader: {
108
126
  minHeight: "56px",
109
127
  height: "56px",
110
- display: t.flex,
128
+ display: "flex",
111
129
  overflow: "hidden",
112
- alignItems: r.center,
130
+ alignItems: "center",
113
131
  padding: "0 24px",
114
132
  borderBottom: "1px solid",
115
- borderColor: (e) => o(e, 'colors.neutral["grey.30"]', 'theme.colors.neutral["grey.30"]')
133
+ borderColor: (e) => o(e, "colors.border.default", "theme.colors.border.default")
116
134
  },
117
135
  toggleButton: {
118
136
  default: {
@@ -125,7 +143,7 @@ const x = {
125
143
  }
126
144
  },
127
145
  attrs: {
128
- variant: d.Text
146
+ variant: "text"
129
147
  },
130
148
  open: {
131
149
  transform: "rotate(90deg)"
@@ -133,11 +151,11 @@ const x = {
133
151
  },
134
152
  toggleIcon: {
135
153
  name: "arrowDown",
136
- fill: 'neutral["grey.90"]',
154
+ fill: "icon.black",
137
155
  width: 24,
138
156
  height: 24
139
157
  }
140
158
  };
141
159
  export {
142
- x as chat
160
+ n as chat
143
161
  };
@@ -1,2 +1 @@
1
- export declare const EXCLUDED_BOX_STYLE_PROPS: string[];
2
1
  export declare const BOX_STYLE_PROPS: string[];
@@ -1,4 +1,4 @@
1
- const i = ["overflow", "border", "minWidth", "width", "maxWidth", "minHeight", "height", "maxHeight", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "zIndex", "position", "top", "right", "left", "bottom", "flex", "flexWrap", "flexGrow", "flexBasis", "flexDirection", "flexShrink", "alignItems", "alignSelf", "justifyContent", "justifySelf", "order", "gap"];
1
+ const i = ["display", "overflow", "border", "minWidth", "width", "maxWidth", "minHeight", "height", "maxHeight", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "zIndex", "position", "top", "right", "left", "bottom", "flex", "flexWrap", "flexGrow", "flexBasis", "flexDirection", "flexShrink", "alignContent", "alignItems", "alignSelf", "justifyContent", "justifySelf", "order", "gap"];
2
2
  export {
3
3
  i as BOX_STYLE_PROPS
4
4
  };