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,150 +1,148 @@
1
- import { TypographyStyleVariant as o, TypographyVariant as i } from "../types/typography.js";
2
- import { get as e } from "../utils/helpers.js";
3
- import { SizeVariant as n } from "../types/common.js";
4
- const m = {
1
+ import { get as t } from "../utils/helpers.js";
2
+ const n = {
5
3
  base: {
6
- fontFamily: (t) => e(t, "font.family", "theme.font.family")
4
+ fontFamily: (e) => t(e, "font.family", "theme.font.family")
7
5
  },
8
- [i.Inherit]: {
6
+ span: {
9
7
  fontSize: "inherit",
10
8
  fontWeight: "inherit",
11
9
  lineHeight: "inherit"
12
10
  },
13
- [i.H1]: {
14
- fontSize: (t) => e(t, `font.size.${i.H1}`, `font.size.${i.H1}`),
15
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
16
- lineHeight: (t) => e(t, `font.line.height.${i.H1}`, `font.line.height.${i.H1}`),
17
- marginTop: (t) => e(t, "spacing.xl", "theme.spacing.xl"),
18
- marginBottom: (t) => e(t, "spacing.xl", "theme.spacing.xl")
19
- },
20
- [i.H2]: {
21
- fontSize: (t) => e(t, `font.size.${i.H2}`, `font.size.${i.H2}`),
22
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
23
- lineHeight: (t) => e(t, `font.line.height.${i.H2}`, `font.line.height.${i.H2}`),
24
- marginTop: (t) => e(t, "spacing.lg", "theme.spacing.lg"),
25
- marginBottom: (t) => e(t, "spacing.lg", "theme.spacing.lg")
26
- },
27
- [i.H3]: {
28
- fontSize: (t) => e(t, `font.size.${i.H3}`, `font.size.${i.H3}`),
29
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
30
- lineHeight: (t) => e(t, `font.line.height.${i.H3}`, `font.line.height.${i.H3}`),
31
- marginTop: (t) => e(t, "spacing.md", "theme.spacing.md"),
32
- marginBottom: (t) => e(t, "spacing.md", "theme.spacing.md")
33
- },
34
- [i.H4]: {
35
- fontSize: (t) => e(t, `font.size.${i.H4}`, `font.size.${i.H4}`),
36
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
37
- lineHeight: (t) => e(t, `font.line.height.${i.H4}`, `font.line.height.${i.H4}`),
38
- marginTop: (t) => e(t, "spacing.md", "theme.spacing.md"),
39
- marginBottom: (t) => e(t, "spacing.md", "theme.spacing.md")
40
- },
41
- [i.H5]: {
42
- fontSize: (t) => e(t, `font.size.${i.H5}`, `font.size.${i.H5}`),
43
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
44
- lineHeight: (t) => e(t, `font.line.height.${i.H5}`, `font.line.height.${i.H5}`),
45
- marginTop: (t) => e(t, "spacing.sm", "theme.spacing.sm"),
46
- marginBottom: (t) => e(t, "spacing.sm", "theme.spacing.sm")
47
- },
48
- [i.H6]: {
49
- fontSize: (t) => e(t, `font.size.${i.H6}`, `font.size.${i.H6}`),
50
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
51
- lineHeight: (t) => e(t, `font.line.height.${i.H6}`, `font.line.height.${i.H6}`),
52
- marginTop: (t) => e(t, "spacing.sm", "theme.spacing.sm"),
53
- marginBottom: (t) => e(t, "spacing.sm", "theme.spacing.sm")
54
- },
55
- [i.Bold]: {
56
- fontWeight: (t) => e(t, "font.weight.bold", "theme.font.weight.bold")
57
- },
58
- [i.Italic]: {
11
+ h1: {
12
+ fontSize: (e) => t(e, "font.size.h1", "font.size.h1"),
13
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
14
+ lineHeight: (e) => t(e, "font.line.height.h1", "font.line.height.h1"),
15
+ marginTop: (e) => t(e, "spacing.xl", "theme.spacing.xl"),
16
+ marginBottom: (e) => t(e, "spacing.xl", "theme.spacing.xl")
17
+ },
18
+ h2: {
19
+ fontSize: (e) => t(e, "font.size.h2", "font.size.h2"),
20
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
21
+ lineHeight: (e) => t(e, "font.line.height.h2", "font.line.height.h2"),
22
+ marginTop: (e) => t(e, "spacing.lg", "theme.spacing.lg"),
23
+ marginBottom: (e) => t(e, "spacing.lg", "theme.spacing.lg")
24
+ },
25
+ h3: {
26
+ fontSize: (e) => t(e, "font.size.h3", "font.size.h3"),
27
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
28
+ lineHeight: (e) => t(e, "font.line.height.h3", "font.line.height.h3"),
29
+ marginTop: (e) => t(e, "spacing.md", "theme.spacing.md"),
30
+ marginBottom: (e) => t(e, "spacing.md", "theme.spacing.md")
31
+ },
32
+ h4: {
33
+ fontSize: (e) => t(e, "font.size.h4", "font.size.h4"),
34
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
35
+ lineHeight: (e) => t(e, "font.line.height.h4", "font.line.height.h4"),
36
+ marginTop: (e) => t(e, "spacing.md", "theme.spacing.md"),
37
+ marginBottom: (e) => t(e, "spacing.md", "theme.spacing.md")
38
+ },
39
+ h5: {
40
+ fontSize: (e) => t(e, "font.size.h5", "font.size.h5"),
41
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
42
+ lineHeight: (e) => t(e, "font.line.height.h5", "font.line.height.h5"),
43
+ marginTop: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
44
+ marginBottom: (e) => t(e, "spacing.sm", "theme.spacing.sm")
45
+ },
46
+ h6: {
47
+ fontSize: (e) => t(e, "font.size.h6", "font.size.h6"),
48
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
49
+ lineHeight: (e) => t(e, "font.line.height.h6", "font.line.height.h6"),
50
+ marginTop: (e) => t(e, "spacing.sm", "theme.spacing.sm"),
51
+ marginBottom: (e) => t(e, "spacing.sm", "theme.spacing.sm")
52
+ },
53
+ strong: {
54
+ fontWeight: (e) => t(e, "font.weight.bold", "theme.font.weight.bold")
55
+ },
56
+ i: {
59
57
  fontStyle: "italic"
60
58
  },
61
- [i.Body1]: {
62
- fontSize: (t) => e(t, `font.size.${i.Body1}`, `font.size.${i.Body1}`),
63
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
64
- lineHeight: (t) => e(t, `font.line.height.${i.Body1}`, `font.line.height.${i.Body1}`)
65
- },
66
- [i.Body2]: {
67
- fontSize: (t) => e(t, `font.size.${i.Body2}`, `font.size.${i.Body2}`),
68
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
69
- lineHeight: (t) => e(t, `font.line.height.${i.Body2}`, `theme.font.line.height.${i.Body2}`)
70
- },
71
- [i.Caption]: {
72
- fontSize: (t) => e(t, `font.size.${i.Caption}`, `font.size.${i.Caption}`),
73
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
74
- lineHeight: (t) => e(t, `font.line.height.${i.Caption}`, `theme.font.line.height.${i.Caption}`)
75
- },
76
- [i.Caption2]: {
77
- fontSize: (t) => e(t, `font.size.${i.Caption2}`, `font.size.${i.Caption2}`),
78
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
79
- lineHeight: (t) => e(t, `font.line.height.${i.Caption2}`, `theme.font.line.height.${i.Caption2}`)
80
- },
81
- [i.Code]: {
82
- fontFamily: (t) => e(t, 'font["family.code"]', 'theme.font["family.code"]'),
83
- fontSize: (t) => e(t, `font.size.${i.Code}`, `font.size.${i.Code}`),
84
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
85
- lineHeight: (t) => e(t, `font.line.height.${i.Code}`, `theme.font.line.height.${i.Code}`)
86
- },
87
- [i.Code2]: {
88
- fontFamily: (t) => e(t, 'font["family.code"]', 'theme.font["family.code"]'),
89
- fontSize: (t) => e(t, `font.size.${i.Code2}`, `font.size.${i.Code2}`),
90
- fontWeight: (t) => e(t, "font.weight.normal", "theme.font.weight.normal"),
91
- lineHeight: (t) => e(t, `font.line.height.${i.Code2}`, `theme.font.line.height.${i.Code2}`)
92
- },
93
- [i.Display]: {
94
- [n.Xs]: {
95
- fontSize: (t) => e(t, `font.size.${n.Xs}`, `theme.font.size.${n.Xs}`),
96
- lineHeight: (t) => e(t, `font.line.height.${n.Xs}`, `font.line.height.${n.Xs}`)
59
+ p: {
60
+ fontSize: (e) => t(e, "font.size.p", "font.size.p"),
61
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
62
+ lineHeight: (e) => t(e, "font.line.height.p", "font.line.height.p")
63
+ },
64
+ small: {
65
+ fontSize: (e) => t(e, "font.size.small", "font.size.small"),
66
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
67
+ lineHeight: (e) => t(e, "font.line.height.small", "theme.font.line.height.small")
68
+ },
69
+ caption: {
70
+ fontSize: (e) => t(e, "font.size.caption", "font.size.caption"),
71
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
72
+ lineHeight: (e) => t(e, "font.line.height.caption", "theme.font.line.height.caption")
73
+ },
74
+ header: {
75
+ fontSize: (e) => t(e, "font.size.header", "font.size.header"),
76
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
77
+ lineHeight: (e) => t(e, "font.line.height.header", "theme.font.line.height.header")
78
+ },
79
+ code: {
80
+ fontFamily: (e) => t(e, 'font["family.code"]', 'theme.font["family.code"]'),
81
+ fontSize: (e) => t(e, "font.size.code", "font.size.code"),
82
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
83
+ lineHeight: (e) => t(e, "font.line.height.code", "theme.font.line.height.code")
84
+ },
85
+ kbd: {
86
+ fontFamily: (e) => t(e, 'font["family.code"]', 'theme.font["family.code"]'),
87
+ fontSize: (e) => t(e, "font.size.kbd", "font.size.kbd"),
88
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal"),
89
+ lineHeight: (e) => t(e, "font.line.height.kbd", "theme.font.line.height.kbd")
90
+ },
91
+ div: {
92
+ xs: {
93
+ fontSize: (e) => t(e, "font.size.xs", "theme.font.size.xs"),
94
+ lineHeight: (e) => t(e, "font.line.height.xs", "font.line.height.xs")
97
95
  },
98
- [n.Sm]: {
99
- fontSize: (t) => e(t, `font.size.${n.Sm}`, `theme.font.size.${n.Sm}`),
100
- lineHeight: (t) => e(t, `font.line.height.${n.Sm}`, `font.line.height.${n.Sm}`)
96
+ sm: {
97
+ fontSize: (e) => t(e, "font.size.sm", "theme.font.size.sm"),
98
+ lineHeight: (e) => t(e, "font.line.height.sm", "font.line.height.sm")
101
99
  },
102
- [n.Md]: {
103
- fontSize: (t) => e(t, `font.size.${n.Md}`, `font.size.${n.Md}`),
104
- lineHeight: (t) => e(t, `font.line.height.${n.Md}`, `font.line.height.${n.Md}`)
100
+ md: {
101
+ fontSize: (e) => t(e, "font.size.md", "font.size.md"),
102
+ lineHeight: (e) => t(e, "font.line.height.md", "font.line.height.md")
105
103
  },
106
- [n.Lg]: {
107
- fontSize: (t) => e(t, `font.size.${n.Lg}`, `theme.font.size.${n.Lg}`),
108
- lineHeight: (t) => e(t, `font.line.height.${n.Lg}`, `font.line.height.${n.Lg}`)
104
+ lg: {
105
+ fontSize: (e) => t(e, "font.size.lg", "theme.font.size.lg"),
106
+ lineHeight: (e) => t(e, "font.line.height.lg", "font.line.height.lg")
109
107
  },
110
- [n.Xl]: {
111
- fontSize: (t) => e(t, `font.size.${n.Xl}`, `theme.font.size.${n.Xl}`),
112
- lineHeight: (t) => e(t, `font.line.height.${n.Xl}`, `font.line.height.${n.Xl}`)
108
+ xl: {
109
+ fontSize: (e) => t(e, "font.size.xl", "theme.font.size.xl"),
110
+ lineHeight: (e) => t(e, "font.line.height.xl", "font.line.height.xl")
113
111
  }
114
112
  },
115
113
  styleVariant: {
116
- [o.Light]: {
117
- fontWeight: (t) => e(t, `font.weight.${o.Light}`, `theme.font.weight.${o.Light}`)
114
+ light: {
115
+ fontWeight: (e) => t(e, "font.weight.light", "theme.font.weight.light")
118
116
  },
119
- [o.Normal]: {
120
- fontWeight: (t) => e(t, `font.weight.${o.Normal}`, `theme.font.weight.${o.Normal}`)
117
+ normal: {
118
+ fontWeight: (e) => t(e, "font.weight.normal", "theme.font.weight.normal")
121
119
  },
122
- [o.Semibold]: {
123
- fontWeight: (t) => e(t, "font.weight.medium", "theme.font.weight.medium")
120
+ semibold: {
121
+ fontWeight: (e) => t(e, "font.weight.medium", "theme.font.weight.medium")
124
122
  },
125
- [o.Bold]: {
126
- fontWeight: (t) => e(t, `font.weight.${o.Bold}`, `theme.font.weight.${o.Bold}`)
123
+ bold: {
124
+ fontWeight: (e) => t(e, "font.weight.bold", "theme.font.weight.bold")
127
125
  },
128
- [o.Italic]: {
126
+ italic: {
129
127
  fontStyle: "italic"
130
128
  },
131
- [o.Small]: {
132
- fontSize: (t) => e(t, `font.size.${i.Body2}`, `theme.font.size.${i.Body2}`)
129
+ small: {
130
+ fontSize: (e) => t(e, "font.size.small", "theme.font.size.small")
133
131
  },
134
- [o.Uppercase]: {
132
+ uppercase: {
135
133
  textTransform: "uppercase"
136
134
  },
137
- [o.Lowercase]: {
135
+ lowercase: {
138
136
  textTransform: "lowercase"
139
137
  },
140
- [o.Underline]: {
138
+ underline: {
141
139
  textDecoration: "underline"
142
140
  },
143
- [o.Strike]: {
141
+ strike: {
144
142
  textDecoration: "line-through"
145
143
  }
146
144
  }
147
145
  };
148
146
  export {
149
- m as typography
147
+ n as typography
150
148
  };
@@ -17,7 +17,7 @@ export declare const values: {
17
17
  responsiveLarge: string;
18
18
  responsiveXLarge: string;
19
19
  zIndex: {
20
- snackbar: number;
20
+ snackbar: (theme: Record<symbol, unknown>) => string;
21
21
  };
22
22
  transitions: {
23
23
  stepper: {
@@ -47,6 +47,10 @@ export declare const values: {
47
47
  tabs: {
48
48
  label: string;
49
49
  };
50
+ chat: {
51
+ sidebar: string;
52
+ sidebarWrapper: string;
53
+ };
50
54
  };
51
55
  transform: {
52
56
  rotateUp: string;
package/tokens/values.js CHANGED
@@ -1,18 +1,18 @@
1
1
  import { convertToUnit as r } from "./utils.js";
2
- import { radius as s } from "./radius.js";
3
- import { borders as t } from "./borders.js";
2
+ import { radius as t } from "./radius.js";
3
+ import { borders as a } from "./borders.js";
4
4
  import { Unit as o } from "./types/index.types.js";
5
- import { Z_INDEX as a } from "../constants/positioning.js";
5
+ import { get as n } from "../utils/helpers.js";
6
6
  import { SizeVariant as e } from "../types/common.js";
7
- const b = {
7
+ const u = {
8
8
  // Border tokens
9
9
  borderThin: r(1, o.Rem),
10
10
  borderMedium: r(2, o.Rem),
11
11
  borderThick: r(4, o.Rem),
12
- borderNone: t.none,
12
+ borderNone: a.none,
13
13
  border: {
14
14
  radius: {
15
- none: s.none
15
+ none: t.none
16
16
  }
17
17
  },
18
18
  // Layout tokens
@@ -25,7 +25,7 @@ const b = {
25
25
  responsiveLarge: "60%",
26
26
  responsiveXLarge: "80%",
27
27
  zIndex: {
28
- snackbar: a.HIGH
28
+ snackbar: (s) => n(s, "zIndex.high", "theme.zIndex.high")
29
29
  },
30
30
  transitions: {
31
31
  stepper: {
@@ -54,6 +54,10 @@ const b = {
54
54
  },
55
55
  tabs: {
56
56
  label: "border 0.2s ease-in"
57
+ },
58
+ chat: {
59
+ sidebar: "transform 0.3s ease-in-out, width 0.3s ease-in-out, opacity 0.3s ease-in-out",
60
+ sidebarWrapper: "opacity 0.2s ease-in"
57
61
  }
58
62
  },
59
63
  transform: {
@@ -72,5 +76,5 @@ const b = {
72
76
  }
73
77
  };
74
78
  export {
75
- b as values
79
+ u as values
76
80
  };
@@ -15,7 +15,7 @@ export declare const wrapper: {
15
15
  width: string;
16
16
  height: string;
17
17
  position: string;
18
- zIndex: number;
18
+ zIndex: (theme: Record<symbol, unknown>) => string;
19
19
  };
20
20
  fullPage: {
21
21
  display: string;
@@ -24,6 +24,6 @@ export declare const wrapper: {
24
24
  left: number;
25
25
  width: string;
26
26
  height: string;
27
- zIndex: number;
27
+ zIndex: (theme: Record<symbol, unknown>) => string;
28
28
  };
29
29
  };
package/tokens/wrapper.js CHANGED
@@ -1,5 +1,5 @@
1
- import { WrapperVariant as e } from "../types/wrapper.js";
2
- import { Z_INDEX as t } from "../constants/positioning.js";
1
+ import { WrapperVariant as t } from "../types/wrapper.js";
2
+ import { get as i } from "../utils/helpers.js";
3
3
  const l = {
4
4
  default: {
5
5
  justifyContent: "center",
@@ -7,26 +7,26 @@ const l = {
7
7
  backdropFilter: "blur(2px)",
8
8
  backgroundColor: "rgba(0, 0, 0, 0.1)"
9
9
  },
10
- [e.Inline]: {
10
+ [t.Inline]: {
11
11
  display: "inline-flex"
12
12
  },
13
- [e.Section]: {
13
+ [t.Section]: {
14
14
  display: "flex",
15
15
  top: 0,
16
16
  left: 0,
17
17
  width: "100%",
18
18
  height: "100%",
19
19
  position: "absolute",
20
- zIndex: t.HIGH
20
+ zIndex: (e) => i(e, "zIndex.high", "theme.zIndex.high")
21
21
  },
22
- [e.FullPage]: {
22
+ [t.FullPage]: {
23
23
  display: "flex",
24
24
  position: "fixed",
25
25
  top: 0,
26
26
  left: 0,
27
27
  width: "100vw",
28
28
  height: "100vh",
29
- zIndex: t.TOP
29
+ zIndex: (e) => i(e, "zIndex.top", "theme.zIndex.top")
30
30
  }
31
31
  };
32
32
  export {
@@ -0,0 +1,9 @@
1
+ export declare const zIndex: {
2
+ zero: number;
3
+ negative: number;
4
+ first: number;
5
+ low: number;
6
+ medium: number;
7
+ high: number;
8
+ top: number;
9
+ };
@@ -0,0 +1,12 @@
1
+ const e = {
2
+ zero: 0,
3
+ negative: -1,
4
+ first: 1,
5
+ low: 100,
6
+ medium: 500,
7
+ high: 900,
8
+ top: 1e3
9
+ };
10
+ export {
11
+ e as zIndex
12
+ };
package/types/index.d.ts CHANGED
@@ -16,6 +16,5 @@ export * from './link';
16
16
  export * from './list';
17
17
  export * from './skeleton';
18
18
  export * from './snackbar';
19
- export * from './chat';
20
19
  export * from './separator';
21
20
  export * from './carousel';
package/types/styles.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export type BoxStyles<T = number> = Record<string, string | boolean | T | undefined>;
2
2
  export type BoxComputedStyles<T = number> = Record<string, string | boolean | T | never>;
3
3
  export type InlineBoxStyles = Record<string, string | number | undefined>;
4
+ export type Rounded = 'none' | 'default' | 'round' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
package/utils/helpers.js CHANGED
@@ -1,6 +1,6 @@
1
- const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null && !Array.isArray(e), A = (e, r, s) => {
1
+ const y = (e) => Array.isArray(e), c = (e, r, s) => {
2
2
  let f;
3
- Array.isArray(r) ? f = r : typeof r == "string" ? f = o(r) : f = Object.keys(r);
3
+ Array.isArray(r) ? f = r : typeof r == "string" ? f = l(r) : f = Object.keys(r);
4
4
  let i = e;
5
5
  for (const n of f) {
6
6
  if (i == null || typeof i != "object")
@@ -8,7 +8,7 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
8
8
  i = i[n];
9
9
  }
10
10
  return i === void 0 ? s : i;
11
- }, o = (e) => {
11
+ }, l = (e) => {
12
12
  if (!e) return [];
13
13
  const r = [];
14
14
  let s = "", f = !1, i = "", n = "";
@@ -18,8 +18,8 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
18
18
  ` && (n += t) : t === "[" ? (s && (r.push(s), s = ""), f = !0, n = "") : t === "." && s ? (r.push(s), s = "") : t !== "." && (s += t);
19
19
  }
20
20
  return s && r.push(s), r;
21
- }, a = (e, r, s, f = !1) => {
22
- const i = Array.isArray(r) || l(r) ? r : r.split(".");
21
+ }, g = (e, r, s, f = !1) => {
22
+ const i = Array.isArray(r) ? r : typeof r == "string" ? l(r) : Object.keys(r);
23
23
  let n = e;
24
24
  try {
25
25
  for (let u = 0; u < i.length; u++) {
@@ -35,12 +35,12 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
35
35
  } catch (u) {
36
36
  return console.error(u), e;
37
37
  }
38
- }, g = (e, ...r) => e.filter((s) => !r.includes(s)), k = (e) => e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : Object.keys(e).length, b = (e) => {
38
+ }, k = (e, ...r) => e.filter((s) => !r.includes(s)), A = (e) => e == null ? 0 : Array.isArray(e) || typeof e == "string" ? e.length : Object.keys(e).length, a = (e) => {
39
39
  if (typeof e == "number") return e;
40
40
  if (!e) return null;
41
41
  const r = Number(e);
42
42
  return isNaN(r) ? null : r;
43
- }, m = (e, r) => {
43
+ }, b = (e, r) => {
44
44
  let s;
45
45
  return (...f) => {
46
46
  s && clearTimeout(s), s = setTimeout(() => {
@@ -49,13 +49,12 @@ const y = (e) => Array.isArray(e), l = (e) => typeof e == "object" && e !== null
49
49
  };
50
50
  };
51
51
  export {
52
- m as debounce,
53
- A as get,
52
+ b as debounce,
53
+ c as get,
54
54
  y as isArray,
55
- l as isObject,
56
- o as parsePathString,
57
- a as set,
58
- k as size,
59
- b as toNumber,
60
- g as without
55
+ l as parsePathString,
56
+ g as set,
57
+ A as size,
58
+ a as toNumber,
59
+ k as without
61
60
  };