@sbcrmweb/sbcrmweb-tma-core 0.0.59

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 (239) hide show
  1. package/README.md +419 -0
  2. package/dist/cjs/components/TMAActionBar/TMAActionBar.d.ts +10 -0
  3. package/dist/cjs/components/TMAActionBar/TMAActionBar.d.ts.map +1 -0
  4. package/dist/cjs/components/TMAActionBar/TMAActionBar.js +40 -0
  5. package/dist/cjs/components/TMABannersFeed/StoryDrawer.d.ts +12 -0
  6. package/dist/cjs/components/TMABannersFeed/StoryDrawer.d.ts.map +1 -0
  7. package/dist/cjs/components/TMABannersFeed/StoryDrawer.js +121 -0
  8. package/dist/cjs/components/TMABannersFeed/StoryProgress.d.ts +11 -0
  9. package/dist/cjs/components/TMABannersFeed/StoryProgress.d.ts.map +1 -0
  10. package/dist/cjs/components/TMABannersFeed/StoryProgress.js +81 -0
  11. package/dist/cjs/components/TMABannersFeed/TMABannerFeed.d.ts +28 -0
  12. package/dist/cjs/components/TMABannersFeed/TMABannerFeed.d.ts.map +1 -0
  13. package/dist/cjs/components/TMABannersFeed/TMABannerFeed.js +87 -0
  14. package/dist/cjs/components/TMABannersFeed/TMABannerFeedPropsContext.d.ts +5 -0
  15. package/dist/cjs/components/TMABannersFeed/TMABannerFeedPropsContext.d.ts.map +1 -0
  16. package/dist/cjs/components/TMABannersFeed/TMABannerFeedPropsContext.js +11 -0
  17. package/dist/cjs/components/TMABannersFeed/TMAStoryDrawer.d.ts +11 -0
  18. package/dist/cjs/components/TMABannersFeed/TMAStoryDrawer.d.ts.map +1 -0
  19. package/dist/cjs/components/TMABannersFeed/TMAStoryDrawer.js +126 -0
  20. package/dist/cjs/components/TMABannersFeed/propsContext.d.ts +5 -0
  21. package/dist/cjs/components/TMABannersFeed/propsContext.d.ts.map +1 -0
  22. package/dist/cjs/components/TMABannersFeed/propsContext.js +10 -0
  23. package/dist/cjs/components/TMABarChart/ItemTooltip.d.ts +12 -0
  24. package/dist/cjs/components/TMABarChart/ItemTooltip.d.ts.map +1 -0
  25. package/dist/cjs/components/TMABarChart/ItemTooltip.js +39 -0
  26. package/dist/cjs/components/TMABarChart/TMABarChart.d.ts +10 -0
  27. package/dist/cjs/components/TMABarChart/TMABarChart.d.ts.map +1 -0
  28. package/dist/cjs/components/TMABarChart/TMABarChart.js +131 -0
  29. package/dist/cjs/components/TMABaseSection/TMABaseSection.d.ts +7 -0
  30. package/dist/cjs/components/TMABaseSection/TMABaseSection.d.ts.map +1 -0
  31. package/dist/cjs/components/TMABaseSection/TMABaseSection.js +18 -0
  32. package/dist/cjs/components/TMACell/TMACell.d.ts +12 -0
  33. package/dist/cjs/components/TMACell/TMACell.d.ts.map +1 -0
  34. package/dist/cjs/components/TMACell/TMACell.js +18 -0
  35. package/dist/cjs/components/TMACellList/TMACellList.d.ts +6 -0
  36. package/dist/cjs/components/TMACellList/TMACellList.d.ts.map +1 -0
  37. package/dist/cjs/components/TMACellList/TMACellList.js +18 -0
  38. package/dist/cjs/components/TMACheckbox/TMACheckbox.d.ts +7 -0
  39. package/dist/cjs/components/TMACheckbox/TMACheckbox.d.ts.map +1 -0
  40. package/dist/cjs/components/TMACheckbox/TMACheckbox.js +11 -0
  41. package/dist/cjs/components/TMACounter/TMACountInput.d.ts +9 -0
  42. package/dist/cjs/components/TMACounter/TMACountInput.d.ts.map +1 -0
  43. package/dist/cjs/components/TMACounter/TMACountInput.js +36 -0
  44. package/dist/cjs/components/TMACounter/TMACounter.d.ts +11 -0
  45. package/dist/cjs/components/TMACounter/TMACounter.d.ts.map +1 -0
  46. package/dist/cjs/components/TMACounter/TMACounter.js +33 -0
  47. package/dist/cjs/components/TMADrawerFilter/TMADrawerFilter.d.ts +29 -0
  48. package/dist/cjs/components/TMADrawerFilter/TMADrawerFilter.d.ts.map +1 -0
  49. package/dist/cjs/components/TMADrawerFilter/TMADrawerFilter.js +47 -0
  50. package/dist/cjs/components/TMADrawerFilter/TMARightDrawerFilter.d.ts +4 -0
  51. package/dist/cjs/components/TMADrawerFilter/TMARightDrawerFilter.d.ts.map +1 -0
  52. package/dist/cjs/components/TMADrawerFilter/TMARightDrawerFilter.js +12 -0
  53. package/dist/cjs/components/TMADrawerFilter/TMATopDrawerFilter.d.ts +4 -0
  54. package/dist/cjs/components/TMADrawerFilter/TMATopDrawerFilter.d.ts.map +1 -0
  55. package/dist/cjs/components/TMADrawerFilter/TMATopDrawerFilter.js +11 -0
  56. package/dist/cjs/components/TMADrawerHeader/TMADrawerHeader.d.ts +6 -0
  57. package/dist/cjs/components/TMADrawerHeader/TMADrawerHeader.d.ts.map +1 -0
  58. package/dist/cjs/components/TMADrawerHeader/TMADrawerHeader.js +29 -0
  59. package/dist/cjs/components/TMALoadable/TMALoadable.d.ts +15 -0
  60. package/dist/cjs/components/TMALoadable/TMALoadable.d.ts.map +1 -0
  61. package/dist/cjs/components/TMALoadable/TMALoadable.js +25 -0
  62. package/dist/cjs/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.d.ts +34 -0
  63. package/dist/cjs/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.d.ts.map +1 -0
  64. package/dist/cjs/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.js +188 -0
  65. package/dist/cjs/components/TMASelect/TMASelect.d.ts +20 -0
  66. package/dist/cjs/components/TMASelect/TMASelect.d.ts.map +1 -0
  67. package/dist/cjs/components/TMASelect/TMASelect.js +152 -0
  68. package/dist/cjs/components/TMASelect/TMASelectOption.d.ts +8 -0
  69. package/dist/cjs/components/TMASelect/TMASelectOption.d.ts.map +1 -0
  70. package/dist/cjs/components/TMASelect/TMASelectOption.js +15 -0
  71. package/dist/cjs/components/TMAStatisticsCard/TMAStatisticsCard.d.ts +12 -0
  72. package/dist/cjs/components/TMAStatisticsCard/TMAStatisticsCard.d.ts.map +1 -0
  73. package/dist/cjs/components/TMAStatisticsCard/TMAStatisticsCard.js +30 -0
  74. package/dist/cjs/components/TMATabs/TMATabs.d.ts +14 -0
  75. package/dist/cjs/components/TMATabs/TMATabs.d.ts.map +1 -0
  76. package/dist/cjs/components/TMATabs/TMATabs.js +32 -0
  77. package/dist/cjs/components/TMATextField/TMATextField.d.ts +9 -0
  78. package/dist/cjs/components/TMATextField/TMATextField.d.ts.map +1 -0
  79. package/dist/cjs/components/TMATextField/TMATextField.js +30 -0
  80. package/dist/cjs/components/TMATextWithTitle/TMATextWithTitle.d.ts +7 -0
  81. package/dist/cjs/components/TMATextWithTitle/TMATextWithTitle.d.ts.map +1 -0
  82. package/dist/cjs/components/TMATextWithTitle/TMATextWithTitle.js +21 -0
  83. package/dist/cjs/components/TMAToast/TMAToast.d.ts +14 -0
  84. package/dist/cjs/components/TMAToast/TMAToast.d.ts.map +1 -0
  85. package/dist/cjs/components/TMAToast/TMAToast.js +45 -0
  86. package/dist/cjs/components/TMATooltip/TMATooltip.d.ts +11 -0
  87. package/dist/cjs/components/TMATooltip/TMATooltip.d.ts.map +1 -0
  88. package/dist/cjs/components/TMATooltip/TMATooltip.js +12 -0
  89. package/dist/cjs/components/index.d.ts +28 -0
  90. package/dist/cjs/components/index.d.ts.map +1 -0
  91. package/dist/cjs/components/index.js +55 -0
  92. package/dist/cjs/context/BackButtonContext/BackButtonContext.d.ts +7 -0
  93. package/dist/cjs/context/BackButtonContext/BackButtonContext.d.ts.map +1 -0
  94. package/dist/cjs/context/BackButtonContext/BackButtonContext.js +16 -0
  95. package/dist/cjs/context/index.d.ts +2 -0
  96. package/dist/cjs/context/index.d.ts.map +1 -0
  97. package/dist/cjs/context/index.js +17 -0
  98. package/dist/cjs/context/theme.d.ts +7 -0
  99. package/dist/cjs/context/theme.d.ts.map +1 -0
  100. package/dist/cjs/context/theme.js +16 -0
  101. package/dist/cjs/fonts.d.ts +4 -0
  102. package/dist/cjs/fonts.d.ts.map +1 -0
  103. package/dist/cjs/fonts.js +80 -0
  104. package/dist/cjs/hooks/index.d.ts +3 -0
  105. package/dist/cjs/hooks/index.d.ts.map +1 -0
  106. package/dist/cjs/hooks/index.js +23 -0
  107. package/dist/cjs/hooks/useBackButton.d.ts +2 -0
  108. package/dist/cjs/hooks/useBackButton.d.ts.map +1 -0
  109. package/dist/cjs/hooks/useBackButton.js +28 -0
  110. package/dist/cjs/hooks/useTMALongPress.d.ts +13 -0
  111. package/dist/cjs/hooks/useTMALongPress.d.ts.map +1 -0
  112. package/dist/cjs/hooks/useTMALongPress.js +63 -0
  113. package/dist/cjs/index.d.ts +7 -0
  114. package/dist/cjs/index.d.ts.map +1 -0
  115. package/dist/cjs/index.js +50 -0
  116. package/dist/cjs/theme.d.ts +541 -0
  117. package/dist/cjs/theme.d.ts.map +1 -0
  118. package/dist/cjs/theme.js +769 -0
  119. package/dist/components/TMAActionBar/TMAActionBar.d.ts +10 -0
  120. package/dist/components/TMAActionBar/TMAActionBar.d.ts.map +1 -0
  121. package/dist/components/TMAActionBar/TMAActionBar.js +33 -0
  122. package/dist/components/TMABannersFeed/StoryDrawer.d.ts +12 -0
  123. package/dist/components/TMABannersFeed/StoryDrawer.d.ts.map +1 -0
  124. package/dist/components/TMABannersFeed/StoryDrawer.js +114 -0
  125. package/dist/components/TMABannersFeed/StoryProgress.d.ts +11 -0
  126. package/dist/components/TMABannersFeed/StoryProgress.d.ts.map +1 -0
  127. package/dist/components/TMABannersFeed/StoryProgress.js +77 -0
  128. package/dist/components/TMABannersFeed/TMABannerFeed.d.ts +28 -0
  129. package/dist/components/TMABannersFeed/TMABannerFeed.d.ts.map +1 -0
  130. package/dist/components/TMABannersFeed/TMABannerFeed.js +80 -0
  131. package/dist/components/TMABannersFeed/TMABannerFeedPropsContext.d.ts +5 -0
  132. package/dist/components/TMABannersFeed/TMABannerFeedPropsContext.d.ts.map +1 -0
  133. package/dist/components/TMABannersFeed/TMABannerFeedPropsContext.js +7 -0
  134. package/dist/components/TMABannersFeed/TMAStoryDrawer.d.ts +11 -0
  135. package/dist/components/TMABannersFeed/TMAStoryDrawer.d.ts.map +1 -0
  136. package/dist/components/TMABannersFeed/TMAStoryDrawer.js +119 -0
  137. package/dist/components/TMABannersFeed/propsContext.d.ts +5 -0
  138. package/dist/components/TMABannersFeed/propsContext.d.ts.map +1 -0
  139. package/dist/components/TMABannersFeed/propsContext.js +6 -0
  140. package/dist/components/TMABarChart/ItemTooltip.d.ts +12 -0
  141. package/dist/components/TMABarChart/ItemTooltip.d.ts.map +1 -0
  142. package/dist/components/TMABarChart/ItemTooltip.js +33 -0
  143. package/dist/components/TMABarChart/TMABarChart.d.ts +10 -0
  144. package/dist/components/TMABarChart/TMABarChart.d.ts.map +1 -0
  145. package/dist/components/TMABarChart/TMABarChart.js +91 -0
  146. package/dist/components/TMABaseSection/TMABaseSection.d.ts +7 -0
  147. package/dist/components/TMABaseSection/TMABaseSection.d.ts.map +1 -0
  148. package/dist/components/TMABaseSection/TMABaseSection.js +11 -0
  149. package/dist/components/TMACell/TMACell.d.ts +12 -0
  150. package/dist/components/TMACell/TMACell.d.ts.map +1 -0
  151. package/dist/components/TMACell/TMACell.js +11 -0
  152. package/dist/components/TMACellList/TMACellList.d.ts +6 -0
  153. package/dist/components/TMACellList/TMACellList.d.ts.map +1 -0
  154. package/dist/components/TMACellList/TMACellList.js +11 -0
  155. package/dist/components/TMACheckbox/TMACheckbox.d.ts +7 -0
  156. package/dist/components/TMACheckbox/TMACheckbox.d.ts.map +1 -0
  157. package/dist/components/TMACheckbox/TMACheckbox.js +7 -0
  158. package/dist/components/TMACounter/TMACountInput.d.ts +9 -0
  159. package/dist/components/TMACounter/TMACountInput.d.ts.map +1 -0
  160. package/dist/components/TMACounter/TMACountInput.js +34 -0
  161. package/dist/components/TMACounter/TMACounter.d.ts +11 -0
  162. package/dist/components/TMACounter/TMACounter.d.ts.map +1 -0
  163. package/dist/components/TMACounter/TMACounter.js +26 -0
  164. package/dist/components/TMADrawerFilter/TMADrawerFilter.d.ts +29 -0
  165. package/dist/components/TMADrawerFilter/TMADrawerFilter.d.ts.map +1 -0
  166. package/dist/components/TMADrawerFilter/TMADrawerFilter.js +40 -0
  167. package/dist/components/TMADrawerFilter/TMARightDrawerFilter.d.ts +4 -0
  168. package/dist/components/TMADrawerFilter/TMARightDrawerFilter.d.ts.map +1 -0
  169. package/dist/components/TMADrawerFilter/TMARightDrawerFilter.js +8 -0
  170. package/dist/components/TMADrawerFilter/TMATopDrawerFilter.d.ts +4 -0
  171. package/dist/components/TMADrawerFilter/TMATopDrawerFilter.d.ts.map +1 -0
  172. package/dist/components/TMADrawerFilter/TMATopDrawerFilter.js +7 -0
  173. package/dist/components/TMADrawerHeader/TMADrawerHeader.d.ts +6 -0
  174. package/dist/components/TMADrawerHeader/TMADrawerHeader.d.ts.map +1 -0
  175. package/dist/components/TMADrawerHeader/TMADrawerHeader.js +22 -0
  176. package/dist/components/TMALoadable/TMALoadable.d.ts +15 -0
  177. package/dist/components/TMALoadable/TMALoadable.d.ts.map +1 -0
  178. package/dist/components/TMALoadable/TMALoadable.js +18 -0
  179. package/dist/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.d.ts +34 -0
  180. package/dist/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.d.ts.map +1 -0
  181. package/dist/components/TMAMultiSelectWithTags/TMAMultiSelectWithTags.js +181 -0
  182. package/dist/components/TMASelect/TMASelect.d.ts +20 -0
  183. package/dist/components/TMASelect/TMASelect.d.ts.map +1 -0
  184. package/dist/components/TMASelect/TMASelect.js +145 -0
  185. package/dist/components/TMASelect/TMASelectOption.d.ts +8 -0
  186. package/dist/components/TMASelect/TMASelectOption.d.ts.map +1 -0
  187. package/dist/components/TMASelect/TMASelectOption.js +8 -0
  188. package/dist/components/TMAStatisticsCard/TMAStatisticsCard.d.ts +12 -0
  189. package/dist/components/TMAStatisticsCard/TMAStatisticsCard.d.ts.map +1 -0
  190. package/dist/components/TMAStatisticsCard/TMAStatisticsCard.js +23 -0
  191. package/dist/components/TMATabs/TMATabs.d.ts +14 -0
  192. package/dist/components/TMATabs/TMATabs.d.ts.map +1 -0
  193. package/dist/components/TMATabs/TMATabs.js +25 -0
  194. package/dist/components/TMATextField/TMATextField.d.ts +9 -0
  195. package/dist/components/TMATextField/TMATextField.d.ts.map +1 -0
  196. package/dist/components/TMATextField/TMATextField.js +23 -0
  197. package/dist/components/TMATextWithTitle/TMATextWithTitle.d.ts +7 -0
  198. package/dist/components/TMATextWithTitle/TMATextWithTitle.d.ts.map +1 -0
  199. package/dist/components/TMATextWithTitle/TMATextWithTitle.js +14 -0
  200. package/dist/components/TMAToast/TMAToast.d.ts +14 -0
  201. package/dist/components/TMAToast/TMAToast.d.ts.map +1 -0
  202. package/dist/components/TMAToast/TMAToast.js +38 -0
  203. package/dist/components/TMATooltip/TMATooltip.d.ts +11 -0
  204. package/dist/components/TMATooltip/TMATooltip.d.ts.map +1 -0
  205. package/dist/components/TMATooltip/TMATooltip.js +5 -0
  206. package/dist/components/index.d.ts +28 -0
  207. package/dist/components/index.d.ts.map +1 -0
  208. package/dist/components/index.js +25 -0
  209. package/dist/context/BackButtonContext/BackButtonContext.d.ts +7 -0
  210. package/dist/context/BackButtonContext/BackButtonContext.d.ts.map +1 -0
  211. package/dist/context/BackButtonContext/BackButtonContext.js +12 -0
  212. package/dist/context/index.d.ts +2 -0
  213. package/dist/context/index.d.ts.map +1 -0
  214. package/dist/context/index.js +1 -0
  215. package/dist/context/theme.d.ts +7 -0
  216. package/dist/context/theme.d.ts.map +1 -0
  217. package/dist/context/theme.js +10 -0
  218. package/dist/fonts.d.ts +4 -0
  219. package/dist/fonts.d.ts.map +1 -0
  220. package/dist/fonts.js +74 -0
  221. package/dist/hooks/index.d.ts +3 -0
  222. package/dist/hooks/index.d.ts.map +1 -0
  223. package/dist/hooks/index.js +2 -0
  224. package/dist/hooks/useBackButton.d.ts +2 -0
  225. package/dist/hooks/useBackButton.d.ts.map +1 -0
  226. package/dist/hooks/useBackButton.js +24 -0
  227. package/dist/hooks/useTMALongPress.d.ts +13 -0
  228. package/dist/hooks/useTMALongPress.d.ts.map +1 -0
  229. package/dist/hooks/useTMALongPress.js +61 -0
  230. package/dist/index.d.ts +7 -0
  231. package/dist/index.d.ts.map +1 -0
  232. package/dist/index.js +6 -0
  233. package/dist/theme.d.ts +541 -0
  234. package/dist/theme.d.ts.map +1 -0
  235. package/dist/theme.js +766 -0
  236. package/fonts/Inter.ttf +0 -0
  237. package/fonts/SF-Pro.ttf +0 -0
  238. package/fonts/SFMono-Medium.otf +0 -0
  239. package/package.json +65 -0
package/dist/theme.js ADDED
@@ -0,0 +1,766 @@
1
+ import { createTheme } from '@mui/material/styles';
2
+ import { SFPro, SFProMono, Inter } from './fonts';
3
+ export const BASE_SPACING = 8;
4
+ export const commonColors = {
5
+ black: '#000000',
6
+ white: '#FFFFFF',
7
+ bg_color: {
8
+ light: '#FFFFFF',
9
+ dark: '#212121',
10
+ },
11
+ accent_text_color: {
12
+ light: '#007AFF',
13
+ dark: '#007AFF',
14
+ },
15
+ button_color: {
16
+ light: '#007AFF',
17
+ dark: '#2990FF',
18
+ },
19
+ button_text_color: {
20
+ light: '#FFFFFF',
21
+ dark: '#FFFFFF',
22
+ },
23
+ destructive_background: {
24
+ light: '#F12E2E05',
25
+ dark: '#F12E2E15',
26
+ },
27
+ destructive_text_color: {
28
+ light: '#E53935',
29
+ dark: '#E53935',
30
+ },
31
+ header_bg_color: {
32
+ light: '#FFFFFF',
33
+ dark: '#212121',
34
+ },
35
+ hint_color: {
36
+ light: '#707579',
37
+ dark: '#AAAAAA',
38
+ },
39
+ link_color: {
40
+ light: '#007AFF',
41
+ dark: '#2990FF',
42
+ },
43
+ secondary_bg_color: {
44
+ light: '#EFEFF4',
45
+ dark: '#0F0F0F',
46
+ },
47
+ section_bg_color: {
48
+ light: '#FFFFFF',
49
+ dark: '#212121',
50
+ },
51
+ section_header_text_color: {
52
+ light: '#707579',
53
+ dark: '#AAAAAA',
54
+ },
55
+ subtitle_text_color: {
56
+ light: '#707579',
57
+ dark: '#AAAAAA',
58
+ },
59
+ surface_dark: {
60
+ light: '#383838',
61
+ dark: '#383838',
62
+ },
63
+ text_color: {
64
+ light: '#000000',
65
+ dark: '#FFFFFF',
66
+ },
67
+ divider: {
68
+ light: '#00000015',
69
+ dark: '#FFFFFF05',
70
+ },
71
+ card_bg_color: {
72
+ light: '#FFFFFF',
73
+ dark: '#323232',
74
+ },
75
+ skeleton: {
76
+ light: '#00000003',
77
+ dark: '#FFFFFF03',
78
+ },
79
+ secondary_fill: {
80
+ light: '#4378FF10',
81
+ dark: '#2990FF15',
82
+ },
83
+ secondary_hint_color: {
84
+ light: '#A2ACB0',
85
+ dark: '#78797E',
86
+ },
87
+ outline: {
88
+ light: '#00000005',
89
+ dark: '#FFFFFF10',
90
+ },
91
+ plain_foreground: {
92
+ light: '#00000080',
93
+ dark: '#FFFFFF95',
94
+ },
95
+ plain_background: {
96
+ light: '#00000004',
97
+ dark: '#FFFFFF0A',
98
+ },
99
+ toast_accent_color: {
100
+ light: '#55A6FF',
101
+ dark: '#55A6FF',
102
+ },
103
+ };
104
+ const colorSchemes = {
105
+ light: {
106
+ palette: {
107
+ bg_color: {
108
+ main: commonColors.bg_color.light,
109
+ },
110
+ card_bg_color: {
111
+ main: commonColors.card_bg_color.light,
112
+ },
113
+ divider: commonColors.divider.light,
114
+ accent_text_color: {
115
+ main: commonColors.accent_text_color.light,
116
+ },
117
+ header_bg_color: {
118
+ main: commonColors.header_bg_color.light,
119
+ },
120
+ button_color: {
121
+ main: commonColors.button_color.light,
122
+ },
123
+ button_text_color: {
124
+ main: commonColors.button_text_color.light,
125
+ },
126
+ destructive_text_color: {
127
+ main: commonColors.destructive_text_color.light,
128
+ },
129
+ hint_color: {
130
+ main: commonColors.hint_color.light,
131
+ },
132
+ secondary_hint_color: {
133
+ main: commonColors.secondary_hint_color.light,
134
+ },
135
+ link_color: {
136
+ main: commonColors.link_color.light,
137
+ },
138
+ secondary_bg_color: {
139
+ main: commonColors.secondary_bg_color.light,
140
+ },
141
+ section_bg_color: {
142
+ main: commonColors.section_bg_color.light,
143
+ },
144
+ section_header_text_color: {
145
+ main: commonColors.section_header_text_color.light,
146
+ },
147
+ secondary_fill: {
148
+ main: commonColors.secondary_fill.light,
149
+ },
150
+ text_color: {
151
+ main: commonColors.text_color.light,
152
+ },
153
+ subtitle_text_color: {
154
+ main: commonColors.subtitle_text_color.light,
155
+ },
156
+ surface_dark: {
157
+ main: commonColors.surface_dark.light,
158
+ },
159
+ primary: {
160
+ main: commonColors.button_color.light,
161
+ },
162
+ background: {
163
+ default: commonColors.bg_color.light,
164
+ paper: commonColors.card_bg_color.light,
165
+ },
166
+ text: {
167
+ primary: commonColors.text_color.light,
168
+ secondary: commonColors.subtitle_text_color.light,
169
+ },
170
+ plain_foreground: {
171
+ main: commonColors.plain_foreground.light,
172
+ },
173
+ plain_background: {
174
+ main: commonColors.plain_background.light,
175
+ },
176
+ toast_accent_color: {
177
+ main: commonColors.toast_accent_color.light,
178
+ },
179
+ destructive_background: {
180
+ main: commonColors.destructive_background.light,
181
+ },
182
+ },
183
+ },
184
+ dark: {
185
+ palette: {
186
+ bg_color: {
187
+ main: commonColors.bg_color.dark,
188
+ },
189
+ card_bg_color: {
190
+ main: commonColors.card_bg_color.dark,
191
+ },
192
+ divider: commonColors.divider.dark,
193
+ header_bg_color: {
194
+ main: commonColors.header_bg_color.dark,
195
+ },
196
+ accent_text_color: {
197
+ main: commonColors.accent_text_color.dark,
198
+ },
199
+ button_color: {
200
+ main: commonColors.button_color.dark,
201
+ },
202
+ button_text_color: {
203
+ main: commonColors.button_text_color.dark,
204
+ },
205
+ destructive_text_color: {
206
+ main: commonColors.destructive_text_color.dark,
207
+ },
208
+ hint_color: {
209
+ main: commonColors.hint_color.dark,
210
+ },
211
+ secondary_hint_color: {
212
+ main: commonColors.secondary_hint_color.dark,
213
+ },
214
+ link_color: {
215
+ main: commonColors.link_color.dark,
216
+ },
217
+ secondary_bg_color: {
218
+ main: commonColors.secondary_bg_color.dark,
219
+ },
220
+ section_bg_color: {
221
+ main: commonColors.section_bg_color.dark,
222
+ },
223
+ section_header_text_color: {
224
+ main: commonColors.section_header_text_color.dark,
225
+ },
226
+ subtitle_text_color: {
227
+ main: commonColors.subtitle_text_color.dark,
228
+ },
229
+ surface_dark: {
230
+ main: commonColors.surface_dark.dark,
231
+ },
232
+ text_color: {
233
+ main: commonColors.text_color.dark,
234
+ },
235
+ primary: {
236
+ main: commonColors.button_color.dark,
237
+ },
238
+ background: {
239
+ default: commonColors.bg_color.dark,
240
+ paper: commonColors.card_bg_color.dark,
241
+ },
242
+ text: {
243
+ primary: commonColors.text_color.dark,
244
+ secondary: commonColors.subtitle_text_color.dark,
245
+ },
246
+ secondary_fill: {
247
+ main: commonColors.secondary_fill.dark,
248
+ },
249
+ plain_foreground: {
250
+ main: commonColors.plain_foreground.dark,
251
+ },
252
+ plain_background: {
253
+ main: commonColors.plain_background.dark,
254
+ },
255
+ toast_accent_color: {
256
+ main: commonColors.toast_accent_color.dark,
257
+ },
258
+ destructive_background: {
259
+ main: commonColors.destructive_background.dark,
260
+ },
261
+ },
262
+ },
263
+ };
264
+ const theme = createTheme({
265
+ colorSchemes,
266
+ });
267
+ export const typography = {
268
+ largeTitleRegular: {
269
+ fontFamily: SFPro.style.fontFamily,
270
+ fontSize: 34,
271
+ fontWeight: 400,
272
+ lineHeight: 1.3,
273
+ letterSpacing: 0.25,
274
+ },
275
+ largeTitleSemibold: {
276
+ fontFamily: SFPro.style.fontFamily,
277
+ fontSize: 34,
278
+ fontWeight: 600,
279
+ lineHeight: 1.3,
280
+ letterSpacing: 0.25,
281
+ },
282
+ largeTitleBold: {
283
+ fontFamily: SFPro.style.fontFamily,
284
+ fontSize: 34,
285
+ fontWeight: 700,
286
+ lineHeight: 1.3,
287
+ letterSpacing: 0.25,
288
+ },
289
+ title1Regular: {
290
+ fontFamily: SFPro.style.fontFamily,
291
+ fontSize: 28,
292
+ fontWeight: 400,
293
+ lineHeight: 1.12,
294
+ letterSpacing: 0.1,
295
+ },
296
+ title1Semibold: {
297
+ fontFamily: SFPro.style.fontFamily,
298
+ fontSize: 28,
299
+ fontWeight: 600,
300
+ lineHeight: 1.12,
301
+ letterSpacing: 0.1,
302
+ },
303
+ title1Bold: {
304
+ fontFamily: SFPro.style.fontFamily,
305
+ fontSize: 28,
306
+ fontWeight: 700,
307
+ lineHeight: 1.12,
308
+ letterSpacing: 0.1,
309
+ },
310
+ title2Regular: {
311
+ fontFamily: SFPro.style.fontFamily,
312
+ fontSize: 24,
313
+ fontWeight: 400,
314
+ lineHeight: 1.5,
315
+ letterSpacing: 0,
316
+ },
317
+ title2Semibold: {
318
+ fontFamily: SFPro.style.fontFamily,
319
+ fontSize: 24,
320
+ fontWeight: 600,
321
+ lineHeight: 1.5,
322
+ letterSpacing: 0,
323
+ },
324
+ title2Bold: {
325
+ fontFamily: SFPro.style.fontFamily,
326
+ fontSize: 24,
327
+ fontWeight: 700,
328
+ lineHeight: 1.5,
329
+ letterSpacing: 0,
330
+ },
331
+ title3Regular: {
332
+ fontFamily: SFPro.style.fontFamily,
333
+ fontSize: 20,
334
+ fontWeight: 400,
335
+ lineHeight: 1.5,
336
+ letterSpacing: 0.15,
337
+ },
338
+ title3Semibold: {
339
+ fontFamily: SFPro.style.fontFamily,
340
+ fontSize: 20,
341
+ fontWeight: 600,
342
+ lineHeight: 1.5,
343
+ letterSpacing: 0.15,
344
+ },
345
+ title3Bold: {
346
+ fontFamily: SFPro.style.fontFamily,
347
+ fontSize: 20,
348
+ fontWeight: 700,
349
+ lineHeight: 1.5,
350
+ letterSpacing: 0.15,
351
+ },
352
+ headlineRegular: {
353
+ fontFamily: SFPro.style.fontFamily,
354
+ fontSize: 19,
355
+ fontWeight: 400,
356
+ lineHeight: 1.75,
357
+ letterSpacing: 0.15,
358
+ },
359
+ headlineSemibold: {
360
+ fontFamily: SFPro.style.fontFamily,
361
+ fontSize: 19,
362
+ fontWeight: 600,
363
+ lineHeight: 1.75,
364
+ letterSpacing: 0.15,
365
+ },
366
+ headlineBold: {
367
+ fontFamily: SFPro.style.fontFamily,
368
+ fontSize: 19,
369
+ fontWeight: 700,
370
+ lineHeight: 1.75,
371
+ letterSpacing: 0.15,
372
+ },
373
+ textRegular: {
374
+ fontFamily: SFPro.style.fontFamily,
375
+ fontSize: 17,
376
+ fontWeight: 400,
377
+ lineHeight: 1.37,
378
+ letterSpacing: 0.15,
379
+ },
380
+ textMedium: {
381
+ fontFamily: SFPro.style.fontFamily,
382
+ fontSize: 17,
383
+ fontWeight: 500,
384
+ lineHeight: 1.37,
385
+ letterSpacing: 0.15,
386
+ },
387
+ textSemibold: {
388
+ fontFamily: SFPro.style.fontFamily,
389
+ fontSize: 17,
390
+ fontWeight: 600,
391
+ lineHeight: 1.37,
392
+ letterSpacing: 0.15,
393
+ },
394
+ textBold: {
395
+ fontFamily: SFPro.style.fontFamily,
396
+ fontSize: 17,
397
+ fontWeight: 700,
398
+ lineHeight: 1.37,
399
+ letterSpacing: 0.15,
400
+ },
401
+ subheadline1Regular: {
402
+ fontFamily: SFPro.style.fontFamily,
403
+ fontSize: 16,
404
+ fontWeight: 400,
405
+ lineHeight: 1.75,
406
+ letterSpacing: 0.15,
407
+ },
408
+ subheadline1Mono: {
409
+ fontFamily: SFProMono.style.fontFamily,
410
+ fontSize: 16,
411
+ fontWeight: 400,
412
+ lineHeight: 1.75,
413
+ letterSpacing: 0.15,
414
+ },
415
+ subheadline1Semibold: {
416
+ fontFamily: SFPro.style.fontFamily,
417
+ fontSize: 16,
418
+ fontWeight: 600,
419
+ lineHeight: 1.75,
420
+ letterSpacing: 0.15,
421
+ },
422
+ subheadline1Bold: {
423
+ fontFamily: SFPro.style.fontFamily,
424
+ fontSize: 16,
425
+ fontWeight: 700,
426
+ lineHeight: 1.75,
427
+ letterSpacing: 0.15,
428
+ },
429
+ subheadline2Regular: {
430
+ fontFamily: SFPro.style.fontFamily,
431
+ fontSize: 15,
432
+ fontWeight: 400,
433
+ lineHeight: 1.75,
434
+ letterSpacing: 0.15,
435
+ },
436
+ subheadline2Mono: {
437
+ fontFamily: SFProMono.style.fontFamily,
438
+ fontSize: 15,
439
+ fontWeight: 400,
440
+ lineHeight: 1.75,
441
+ letterSpacing: 0.15,
442
+ },
443
+ subheadline2Semibold: {
444
+ fontFamily: SFPro.style.fontFamily,
445
+ fontSize: 15,
446
+ fontWeight: 600,
447
+ lineHeight: 1.75,
448
+ letterSpacing: 0.15,
449
+ },
450
+ subheadline2Bold: {
451
+ fontFamily: SFPro.style.fontFamily,
452
+ fontSize: 15,
453
+ fontWeight: 700,
454
+ lineHeight: 1.75,
455
+ letterSpacing: 0.15,
456
+ },
457
+ caption1Regular: {
458
+ fontFamily: SFPro.style.fontFamily,
459
+ fontSize: 13,
460
+ fontWeight: 400,
461
+ lineHeight: 1.75,
462
+ letterSpacing: 0.15,
463
+ },
464
+ caption1Semibold: {
465
+ fontFamily: SFPro.style.fontFamily,
466
+ fontSize: 13,
467
+ fontWeight: 600,
468
+ lineHeight: 1.75,
469
+ letterSpacing: 0.15,
470
+ },
471
+ caption1Bold: {
472
+ fontFamily: SFPro.style.fontFamily,
473
+ fontSize: 13,
474
+ fontWeight: 700,
475
+ lineHeight: 1.75,
476
+ letterSpacing: 0.15,
477
+ },
478
+ caption2Regular: {
479
+ fontFamily: SFPro.style.fontFamily,
480
+ fontSize: 10,
481
+ fontWeight: 400,
482
+ lineHeight: 1.75,
483
+ letterSpacing: 0.15,
484
+ },
485
+ caption2Semibold: {
486
+ fontFamily: SFPro.style.fontFamily,
487
+ fontSize: 10,
488
+ fontWeight: 600,
489
+ lineHeight: 1.75,
490
+ letterSpacing: 0.15,
491
+ },
492
+ caption2Bold: {
493
+ fontFamily: SFPro.style.fontFamily,
494
+ fontSize: 10,
495
+ fontWeight: 700,
496
+ lineHeight: 1.75,
497
+ letterSpacing: 0.15,
498
+ },
499
+ caption3Regular: {
500
+ fontFamily: Inter.style.fontFamily,
501
+ fontSize: 10,
502
+ fontWeight: 400,
503
+ lineHeight: 1.75,
504
+ letterSpacing: 0.1,
505
+ },
506
+ caption3Semibold: {
507
+ fontFamily: Inter.style.fontFamily,
508
+ fontSize: 10,
509
+ fontWeight: 600,
510
+ lineHeight: 1.07,
511
+ letterSpacing: 0.1,
512
+ },
513
+ caption3Bold: {
514
+ fontFamily: Inter.style.fontFamily,
515
+ fontSize: 10,
516
+ fontWeight: 700,
517
+ lineHeight: 1.07,
518
+ letterSpacing: 0.1,
519
+ },
520
+ };
521
+ export default createTheme(theme, {
522
+ breakpoints: {
523
+ keys: ['xs', 'sm', 'md'],
524
+ },
525
+ cssVariables: {
526
+ colorSchemeSelector: 'class',
527
+ },
528
+ typography,
529
+ components: {
530
+ MuiTypography: {
531
+ defaultProps: {
532
+ color: 'text.primary',
533
+ },
534
+ },
535
+ MuiButton: {
536
+ defaultProps: {
537
+ disableElevation: true,
538
+ variant: 'contained',
539
+ },
540
+ styleOverrides: {
541
+ root: {
542
+ variants: [
543
+ {
544
+ props: {
545
+ size: 'small',
546
+ },
547
+ style: theme.unstable_sx({
548
+ py: 1,
549
+ px: 12 / BASE_SPACING,
550
+ gap: 6 / BASE_SPACING,
551
+ }),
552
+ },
553
+ {
554
+ props: {
555
+ size: 'medium',
556
+ },
557
+ style: theme.unstable_sx({
558
+ py: 12 / BASE_SPACING,
559
+ px: 2,
560
+ }),
561
+ },
562
+ {
563
+ props: {
564
+ size: 'large',
565
+ },
566
+ style: theme.unstable_sx({
567
+ py: 15 / BASE_SPACING,
568
+ px: 18 / BASE_SPACING,
569
+ ...typography.textSemibold,
570
+ }),
571
+ },
572
+ ],
573
+ ...theme.unstable_sx({
574
+ typography: typography.subheadline2Semibold,
575
+ borderRadius: 3,
576
+ textTransform: 'none',
577
+ '&.MuiButton-root': {
578
+ color: theme.palette.button_text_color.main,
579
+ },
580
+ '&.MuiButton-colorError.MuiButton-text': {
581
+ color: theme.palette.destructive_text_color.main,
582
+ },
583
+ '&.Mui-disabled': {
584
+ color: theme.palette.button_text_color.main,
585
+ backgroundColor: theme.palette.button_color.main,
586
+ opacity: 0.35,
587
+ },
588
+ '&.MuiButton-colorBezeled': {
589
+ backgroundColor: theme.palette.secondary_fill.main,
590
+ color: theme.palette.link_color.main,
591
+ '&:hover': {
592
+ backgroundColor: theme.palette.secondary_fill.main,
593
+ opacity: 0.8,
594
+ },
595
+ },
596
+ }),
597
+ },
598
+ },
599
+ },
600
+ MuiDivider: {
601
+ styleOverrides: {
602
+ root: theme.unstable_sx({
603
+ borderColor: String(commonColors.divider),
604
+ }),
605
+ },
606
+ },
607
+ MuiDrawer: {
608
+ styleOverrides: {
609
+ paper: ({ theme }) => theme.unstable_sx({
610
+ '&.MuiDrawer-paperAnchorBottom': {
611
+ borderTopLeftRadius: 12,
612
+ borderTopRightRadius: 12,
613
+ pb: 4,
614
+ },
615
+ '&.MuiDrawer-paperAnchorTop': {
616
+ borderBottomLeftRadius: 12,
617
+ borderBottomRightRadius: 12,
618
+ pt: 4,
619
+ },
620
+ '&.MuiDrawer-paperAnchorLeft': {
621
+ borderTopRightRadius: 12,
622
+ borderBottomRightRadius: 12,
623
+ },
624
+ '&.MuiDrawer-paperAnchorRight': {
625
+ borderTopLeftRadius: 12,
626
+ borderBottomLeftRadius: 12,
627
+ },
628
+ backgroundColor: theme.palette.bg_color.main,
629
+ }),
630
+ },
631
+ },
632
+ MuiTextField: {
633
+ defaultProps: {
634
+ variant: 'outlined',
635
+ },
636
+ styleOverrides: {
637
+ root: ({ theme }) => theme.unstable_sx({
638
+ bgcolor: theme.palette.background.default,
639
+ width: '100%',
640
+ borderRadius: 3,
641
+ overflow: 'hidden',
642
+ border: 'none',
643
+ '& .MuiInputBase-root': {
644
+ height: 48,
645
+ px: 2,
646
+ py: 13 / BASE_SPACING,
647
+ },
648
+ '& textarea, input': {
649
+ p: '0 !important',
650
+ },
651
+ '&:has(textarea) .MuiFormControl-root': {
652
+ height: 'auto !important',
653
+ },
654
+ '&:has(textarea) .MuiInputBase-root': {
655
+ height: 'auto !important',
656
+ },
657
+ '& ::placeholder': {
658
+ color: theme.palette.secondary_hint_color.main,
659
+ ...typography.textRegular,
660
+ },
661
+ '& fieldset': {
662
+ border: 'none',
663
+ },
664
+ '& .MuiOutlinedInput-root': {
665
+ '& fieldset': {
666
+ border: 'none',
667
+ },
668
+ },
669
+ '& .MuiFormHelperText-root': {
670
+ pb: 10 / BASE_SPACING,
671
+ },
672
+ '& .MuiInputBase-root.Mui-error': {
673
+ borderColor: theme.palette.destructive_text_color.main,
674
+ borderRadius: '12px',
675
+ borderWidth: '1.5px',
676
+ borderStyle: 'solid',
677
+ }
678
+ }),
679
+ },
680
+ },
681
+ MuiPaper: {
682
+ styleOverrides: {
683
+ root: theme.unstable_sx({
684
+ backgroundImage: 'none',
685
+ }),
686
+ },
687
+ },
688
+ MuiSelect: {
689
+ styleOverrides: {
690
+ root: ({ theme }) => theme.unstable_sx({
691
+ '&.MuiInputBase-root': {
692
+ backgroundColor: theme.palette.bg_color.main,
693
+ '&.MuiSelect-root.MuiFilledInput-root': {
694
+ backgroundColor: theme.palette.bg_color.main,
695
+ },
696
+ '&.Mui-error': {
697
+ borderColor: theme.palette.destructive_text_color.main,
698
+ borderRadius: '12px',
699
+ borderWidth: '1.5px',
700
+ borderStyle: 'solid',
701
+ },
702
+ },
703
+ '::before, ::after': {
704
+ display: 'none',
705
+ },
706
+ }),
707
+ },
708
+ defaultProps: {
709
+ MenuProps: {
710
+ sx: {
711
+ marginTop: 1,
712
+ '.MuiPaper-root': {
713
+ borderRadius: 3,
714
+ },
715
+ },
716
+ MenuListProps: {
717
+ sx: {
718
+ '& :focus': {
719
+ backgroundColor: 'transparent !important',
720
+ },
721
+ '& :hover': {
722
+ backgroundColor: 'transparent !important',
723
+ },
724
+ '& .Mui-selected': {
725
+ backgroundColor: 'transparent !important',
726
+ },
727
+ },
728
+ },
729
+ },
730
+ },
731
+ },
732
+ MuiSwitch: {
733
+ styleOverrides: {
734
+ root: ({ theme }) => theme.unstable_sx({
735
+ p: 0,
736
+ width: 51,
737
+ height: 31,
738
+ borderRadius: 16,
739
+ '& .MuiSwitch-switchBase': {
740
+ p: 0,
741
+ },
742
+ '& .MuiSwitch-track': {
743
+ opacity: '1 !important',
744
+ backgroundColor: theme.palette.hint_color.main,
745
+ },
746
+ '& .MuiSwitch-switchBase:has(.Mui-checked)': {
747
+ '& .MuiSwitch-track': {
748
+ backgroundColor: theme.palette.link_color.main,
749
+ },
750
+ },
751
+ '& .MuiSwitch-thumb': {
752
+ m: 2 / BASE_SPACING,
753
+ boxShadow: '0px 3px 1px 0px #0000000F, 0px 3px 8px 0px #00000026, 0px 0px 0px 1px #0000000A',
754
+ width: 27,
755
+ height: 27,
756
+ backgroundColor: commonColors.white,
757
+ color: commonColors.white,
758
+ },
759
+ '&:has(.Mui-disabled)': {
760
+ opacity: 0.4,
761
+ },
762
+ }),
763
+ },
764
+ },
765
+ },
766
+ });