@chotot/clad-ui 3.0.0-next.2 → 3.0.0-next.4

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 (485) hide show
  1. package/CHANGELOG.md +675 -0
  2. package/README.md +173 -131
  3. package/dist/brand/ChototLogoText.d.ts +5 -0
  4. package/dist/brand/CtC2C.d.ts +5 -0
  5. package/dist/brand/CtProperty.d.ts +5 -0
  6. package/dist/brand/CtVehicle.d.ts +5 -0
  7. package/dist/brand/Tot.d.ts +5 -0
  8. package/dist/brand/index.d.ts +5 -0
  9. package/dist/chunk-Bmb41Sf3.cjs +1 -0
  10. package/dist/clad-ui.cjs +2 -0
  11. package/dist/clad-ui.d.ts +2 -0
  12. package/dist/clad-ui.es.js +9000 -4224
  13. package/dist/components/Announcer/Announcer.d.ts +3 -54
  14. package/dist/components/Announcer/announcer.styles.d.ts +39 -0
  15. package/dist/components/Announcer/index.d.ts +2 -0
  16. package/dist/components/Announcer/types.d.ts +41 -0
  17. package/dist/components/Badge/Badge.d.ts +2 -44
  18. package/dist/components/Badge/badge.styles.d.ts +57 -0
  19. package/dist/components/Badge/index.d.ts +4 -0
  20. package/dist/components/Badge/types.d.ts +33 -0
  21. package/dist/components/Box/Box.d.ts +7 -99
  22. package/dist/components/Box/index.d.ts +2 -0
  23. package/dist/components/Box/types.d.ts +89 -0
  24. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +3 -5
  25. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -17
  26. package/dist/components/Breadcrumbs/breadcrumbs.styles.d.ts +2 -0
  27. package/dist/components/Breadcrumbs/index.d.ts +3 -0
  28. package/dist/components/Breadcrumbs/types.d.ts +18 -0
  29. package/dist/components/Button/Button.d.ts +3 -76
  30. package/dist/components/Button/ButtonLink.d.ts +2 -3
  31. package/dist/components/Button/GhostButton.d.ts +3 -47
  32. package/dist/components/Button/IconButton.d.ts +2 -10
  33. package/dist/components/Button/button.styles.d.ts +242 -0
  34. package/dist/components/Button/constant.d.ts +1 -2
  35. package/dist/components/Button/index.d.ts +5 -0
  36. package/dist/components/Button/types.d.ts +72 -0
  37. package/dist/components/Checkbox/Checkbox.d.ts +3 -46
  38. package/dist/components/Checkbox/checkbox.styles.d.ts +27 -0
  39. package/dist/components/Checkbox/index.d.ts +2 -0
  40. package/dist/components/Checkbox/types.d.ts +40 -0
  41. package/dist/components/Chip/Chip.d.ts +3 -70
  42. package/dist/components/Chip/chip.styles.d.ts +66 -0
  43. package/dist/components/Chip/index.d.ts +2 -0
  44. package/dist/components/Chip/types.d.ts +22 -0
  45. package/dist/components/CurrencyInput/CurrencyInput.d.ts +3 -39
  46. package/dist/components/CurrencyInput/currency-input.styles.d.ts +21 -0
  47. package/dist/components/CurrencyInput/index.d.ts +5 -0
  48. package/dist/components/CurrencyInput/types.d.ts +96 -0
  49. package/dist/components/CurrencyInput/utils.d.ts +18 -0
  50. package/dist/components/DatePicker/DatePicker.d.ts +2 -138
  51. package/dist/components/DatePicker/DateTimePicker.d.ts +2 -137
  52. package/dist/components/DatePicker/date-picker.styles.d.ts +9 -0
  53. package/dist/components/DatePicker/date-time-picker.styles.d.ts +10 -0
  54. package/dist/components/DatePicker/index.d.ts +4 -0
  55. package/dist/components/DatePicker/types.d.ts +286 -0
  56. package/dist/components/Drawer/Drawer.d.ts +36 -0
  57. package/dist/components/Drawer/Drawer.pw.fixtures.d.ts +9 -0
  58. package/dist/components/Drawer/index.d.ts +3 -0
  59. package/dist/components/Drawer/types.d.ts +191 -0
  60. package/dist/components/Dropdown/Dropdown.d.ts +3 -94
  61. package/dist/components/Dropdown/dropdown.styles.d.ts +18 -0
  62. package/dist/components/Dropdown/index.d.ts +4 -0
  63. package/dist/components/Dropdown/types.d.ts +89 -0
  64. package/dist/components/EmptyState/EmptyState.d.ts +4 -0
  65. package/dist/components/EmptyState/empty-state.styles.d.ts +3 -0
  66. package/dist/components/EmptyState/index.d.ts +2 -0
  67. package/dist/components/EmptyState/types.d.ts +55 -0
  68. package/dist/components/Grid/Col.d.ts +4 -35
  69. package/dist/components/Grid/Grid.d.ts +8 -55
  70. package/dist/components/Grid/Grid.pw.fixtures.d.ts +3 -0
  71. package/dist/components/Grid/index.d.ts +3 -0
  72. package/dist/components/Grid/types.d.ts +66 -0
  73. package/dist/components/Input/Input.d.ts +3 -116
  74. package/dist/components/Input/index.d.ts +2 -0
  75. package/dist/components/Input/input.styles.d.ts +24 -0
  76. package/dist/components/Input/types.d.ts +55 -0
  77. package/dist/components/InputGroup/InputGroup.d.ts +4 -0
  78. package/dist/components/InputGroup/index.d.ts +4 -0
  79. package/dist/components/InputGroup/input-group.styles.d.ts +18 -0
  80. package/dist/components/InputGroup/types.d.ts +20 -0
  81. package/dist/components/LegacyDialog/DialogMainIcon.d.ts +3 -0
  82. package/dist/components/LegacyDialog/LegacyDialog.d.ts +5 -0
  83. package/dist/components/LegacyDialog/index.d.ts +3 -0
  84. package/dist/{patterns/LegacyDialog/LegacyDialog.d.ts → components/LegacyDialog/types.d.ts} +2 -10
  85. package/dist/components/LegacyPopup/LegacyPopup.d.ts +6 -0
  86. package/dist/components/LegacyPopup/index.d.ts +2 -0
  87. package/dist/{patterns/LegacyPopup/LegacyPopup.d.ts → components/LegacyPopup/types.d.ts} +4 -15
  88. package/dist/components/MultiSearchDropdown/MultiSearchDropdown.d.ts +10 -0
  89. package/dist/components/MultiSearchDropdown/index.d.ts +4 -0
  90. package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.d.ts +18 -0
  91. package/dist/{patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts → components/MultiSearchDropdown/types.d.ts} +6 -19
  92. package/dist/components/Pagination/PageItem.d.ts +3 -21
  93. package/dist/components/Pagination/Pagination.d.ts +2 -46
  94. package/dist/components/Pagination/index.d.ts +5 -0
  95. package/dist/components/Pagination/pagination.styles.d.ts +37 -0
  96. package/dist/components/Pagination/types.d.ts +66 -0
  97. package/dist/components/Popover/Popover.d.ts +4 -44
  98. package/dist/components/Popover/Popover.pw.fixtures.d.ts +6 -0
  99. package/dist/components/Popover/index.d.ts +2 -0
  100. package/dist/components/Popover/popover.styles.d.ts +1 -0
  101. package/dist/components/Popover/types.d.ts +44 -0
  102. package/dist/components/Popup/Popup.d.ts +31 -0
  103. package/dist/components/Popup/Popup.pw.fixtures.d.ts +5 -0
  104. package/dist/components/Popup/index.d.ts +3 -0
  105. package/dist/components/Popup/types.d.ts +145 -0
  106. package/dist/components/RadioButton/RadioButton.d.ts +3 -51
  107. package/dist/components/RadioButton/index.d.ts +4 -0
  108. package/dist/components/RadioButton/radio-button.styles.d.ts +27 -0
  109. package/dist/components/RadioButton/types.d.ts +46 -0
  110. package/dist/components/RangeInput/RangeInput.d.ts +4 -0
  111. package/dist/components/RangeInput/index.d.ts +3 -0
  112. package/dist/components/RangeInput/range-input.styles.d.ts +1 -0
  113. package/dist/{patterns/RangeInput/RangeInput.d.ts → components/RangeInput/types.d.ts} +1 -4
  114. package/dist/components/RowItem/RowItem.d.ts +8 -76
  115. package/dist/components/RowItem/index.d.ts +2 -0
  116. package/dist/components/RowItem/rowitem.styles.d.ts +36 -0
  117. package/dist/components/RowItem/types.d.ts +66 -0
  118. package/dist/components/SearchInput/SearchInput.d.ts +5 -0
  119. package/dist/components/SearchInput/index.d.ts +3 -0
  120. package/dist/components/SearchInput/search-input.styles.d.ts +18 -0
  121. package/dist/{patterns/SearchInput/SearchInput.d.ts → components/SearchInput/types.d.ts} +19 -25
  122. package/dist/components/Searchbar/Searchbar.d.ts +3 -0
  123. package/dist/components/Searchbar/index.d.ts +3 -0
  124. package/dist/components/Searchbar/searchbar.styles.d.ts +1 -0
  125. package/dist/{patterns/Searchbar/Searchbar.d.ts → components/Searchbar/types.d.ts} +6 -9
  126. package/dist/components/ShapeIcon/ShapeIcon.d.ts +3 -53
  127. package/dist/components/ShapeIcon/index.d.ts +2 -0
  128. package/dist/components/ShapeIcon/shape-icon.styles.d.ts +156 -0
  129. package/dist/components/ShapeIcon/types.d.ts +5 -0
  130. package/dist/components/Slider/Slider.d.ts +3 -57
  131. package/dist/components/Slider/index.d.ts +3 -0
  132. package/dist/components/Slider/slider.styles.d.ts +1 -0
  133. package/dist/components/Slider/types.d.ts +59 -0
  134. package/dist/components/Snack/Snack.d.ts +4 -48
  135. package/dist/components/Snack/index.d.ts +3 -0
  136. package/dist/components/Snack/snack.styles.d.ts +21 -0
  137. package/dist/components/Snack/types.d.ts +48 -0
  138. package/dist/components/Tabs/Tab.d.ts +3 -67
  139. package/dist/components/Tabs/Tabs.d.ts +14 -61
  140. package/dist/components/Tabs/index.d.ts +4 -0
  141. package/dist/components/Tabs/tabs.styles.d.ts +59 -0
  142. package/dist/components/Tabs/types.d.ts +97 -0
  143. package/dist/components/TagCloud/TagCloud.d.ts +11 -0
  144. package/dist/components/TagCloud/index.d.ts +2 -0
  145. package/dist/components/TagCloud/tagcloud.styles.d.ts +18 -0
  146. package/dist/components/TagCloud/types.d.ts +26 -0
  147. package/dist/components/TextArea/TextArea.d.ts +3 -100
  148. package/dist/components/TextArea/index.d.ts +4 -0
  149. package/dist/components/TextArea/text-area.styles.d.ts +21 -0
  150. package/dist/components/TextArea/types.d.ts +98 -0
  151. package/dist/components/TextLabel/TextLabel.d.ts +3 -35
  152. package/dist/components/TextLabel/index.d.ts +2 -0
  153. package/dist/components/TextLabel/textlabel.styles.d.ts +51 -0
  154. package/dist/components/TextLabel/types.d.ts +32 -0
  155. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +3 -41
  156. package/dist/components/ToggleSwitch/index.d.ts +4 -0
  157. package/dist/components/ToggleSwitch/toggle-switch.styles.d.ts +39 -0
  158. package/dist/components/ToggleSwitch/types.d.ts +33 -0
  159. package/dist/components/Tooltip/Tooltip.d.ts +4 -98
  160. package/dist/components/Tooltip/Tooltip.pw.fixtures.d.ts +1 -0
  161. package/dist/components/Tooltip/index.d.ts +2 -0
  162. package/dist/components/Tooltip/tooltip.styles.d.ts +18 -0
  163. package/dist/components/Tooltip/types.d.ts +24 -0
  164. package/dist/forge/index.cjs +0 -0
  165. package/dist/forge/index.d.ts +8 -0
  166. package/dist/forge/index.es.js +0 -0
  167. package/dist/icons.cjs +1 -0
  168. package/dist/icons.d.ts +1 -0
  169. package/dist/icons.es.js +1 -0
  170. package/dist/index.d.ts +82 -71
  171. package/dist/styles.css +2 -0
  172. package/dist/{utils/types.d.ts → types/index.d.ts} +0 -1
  173. package/dist/typography/BodyAnnotation.d.ts +8 -6
  174. package/dist/typography/BodyCaption.d.ts +8 -6
  175. package/dist/typography/BodyPage.d.ts +8 -6
  176. package/dist/typography/BodySection.d.ts +8 -6
  177. package/dist/typography/DisplayAnnotation.d.ts +8 -6
  178. package/dist/typography/DisplayCaption.d.ts +8 -6
  179. package/dist/typography/DisplayPage.d.ts +8 -6
  180. package/dist/typography/DisplayPrice.d.ts +21 -0
  181. package/dist/typography/DisplaySection.d.ts +8 -6
  182. package/dist/typography/HeaderAnnotation.d.ts +8 -6
  183. package/dist/typography/HeaderCaption.d.ts +8 -6
  184. package/dist/typography/HeaderPage.d.ts +8 -6
  185. package/dist/typography/HeaderSection.d.ts +8 -6
  186. package/dist/typography/LabelAnnotation.d.ts +8 -6
  187. package/dist/typography/LabelCaption.d.ts +8 -6
  188. package/dist/typography/LabelPage.d.ts +8 -6
  189. package/dist/typography/LabelSection.d.ts +8 -6
  190. package/dist/typography/NoteCaption.d.ts +8 -6
  191. package/dist/typography/NotePage.d.ts +8 -6
  192. package/dist/typography/NoteSection.d.ts +8 -6
  193. package/dist/typography/TaglineAnnotation.d.ts +8 -6
  194. package/dist/typography/TaglineCaption.d.ts +8 -6
  195. package/dist/typography/TaglineFootext.d.ts +8 -6
  196. package/dist/typography/TaglineSection.d.ts +8 -6
  197. package/dist/typography/index.d.ts +25 -24
  198. package/dist/utils/_inlineCreatePortal.d.ts +0 -1
  199. package/dist/utils/bundleCss.cjs +1 -0
  200. package/dist/utils/bundleCss.d.ts +6 -0
  201. package/dist/utils/bundleCss.es.js +18 -0
  202. package/dist/utils/cleanHtml.d.ts +4 -7
  203. package/dist/utils/cn.d.ts +5 -0
  204. package/dist/utils/createUniversalPortal.d.ts +4 -14
  205. package/dist/utils/floating.d.ts +52 -0
  206. package/dist/utils/getBreakpointsValues.d.ts +4 -9
  207. package/dist/utils/sizes.d.ts +28 -0
  208. package/dist/utils/storyStyles.d.ts +21 -0
  209. package/dist/utils/themeTokens.d.ts +327 -0
  210. package/dist/utils/{scrollLock/useBodyScrollLock.d.ts → useBodyScrollLock.d.ts} +0 -1
  211. package/dist/utils/useScrollTop.d.ts +8 -0
  212. package/package.json +99 -99
  213. package/scripts/postinstall.cjs +180 -0
  214. package/skills/clad-ui/SKILL.md +109 -0
  215. package/skills/clad-ui/agents/openai.yaml +4 -0
  216. package/skills/clad-ui/references/components-display-layout.md +295 -0
  217. package/skills/clad-ui/references/components-inputs.md +449 -0
  218. package/skills/clad-ui/references/components-overlays-nav.md +314 -0
  219. package/skills/clad-ui/references/tokens.md +134 -0
  220. package/skills/clad-ui-feedback/SKILL.md +128 -0
  221. package/skills/migrate-clad-ui-v3/SKILL.md +123 -0
  222. package/skills/migrate-clad-ui-v3/agents/openai.yaml +4 -0
  223. package/skills/migrate-clad-ui-v3/references/component-api-changes.md +139 -0
  224. package/skills/migrate-clad-ui-v3/references/token-and-linaria-mapping.md +186 -0
  225. package/src/styles/base/base.css +440 -0
  226. package/src/styles/components/announcer.css +182 -0
  227. package/src/styles/components/badge.css +102 -0
  228. package/src/styles/components/box.css +61 -0
  229. package/src/styles/components/breadcrumbs.css +75 -0
  230. package/src/styles/components/button.css +527 -0
  231. package/src/styles/components/checkbox.css +115 -0
  232. package/src/styles/components/chip.css +155 -0
  233. package/src/styles/components/currency-input.css +146 -0
  234. package/src/styles/components/date-picker.css +305 -0
  235. package/src/styles/components/date-time-picker.css +64 -0
  236. package/src/styles/components/drawer.css +496 -0
  237. package/src/styles/components/dropdown.css +186 -0
  238. package/src/styles/components/empty-state.css +30 -0
  239. package/src/styles/components/grid.css +212 -0
  240. package/src/styles/components/index.css +36 -0
  241. package/src/styles/components/input-group.css +85 -0
  242. package/src/styles/components/input.css +255 -0
  243. package/src/styles/components/legacy-dialog.css +129 -0
  244. package/src/styles/components/legacy-popup.css +209 -0
  245. package/src/styles/components/multi-search-dropdown.css +240 -0
  246. package/src/styles/components/pagination.css +68 -0
  247. package/src/styles/components/popover.css +8 -0
  248. package/src/styles/components/popup.css +331 -0
  249. package/src/styles/components/radio-button.css +130 -0
  250. package/src/styles/components/range-input.css +40 -0
  251. package/src/styles/components/rowitem.css +75 -0
  252. package/src/styles/components/search-input.css +89 -0
  253. package/src/styles/components/searchbar.css +46 -0
  254. package/src/styles/components/shape-icon.css +199 -0
  255. package/src/styles/components/slider.css +232 -0
  256. package/src/styles/components/snack.css +144 -0
  257. package/src/styles/components/tabs.css +128 -0
  258. package/src/styles/components/tagcloud.css +50 -0
  259. package/src/styles/components/text-area.css +176 -0
  260. package/src/styles/components/textlabel.css +75 -0
  261. package/src/styles/components/toggle-switch.css +147 -0
  262. package/src/styles/components/tooltip.css +93 -0
  263. package/src/styles/index.css +10 -0
  264. package/src/styles/preset.css +6 -0
  265. package/src/styles/theme/colors/base.css +108 -0
  266. package/src/styles/theme/colors/semantic.css +135 -0
  267. package/src/styles/theme/index.css +57 -0
  268. package/src/styles/theme/typography/base.css +53 -0
  269. package/src/styles/theme/typography/semantic.css +176 -0
  270. package/src/styles/theme/variables.css +83 -0
  271. package/dist/components/Announcer/Announcer.d.ts.map +0 -1
  272. package/dist/components/Announcer/Announcer.styles.d.ts +0 -30
  273. package/dist/components/Announcer/Announcer.styles.d.ts.map +0 -1
  274. package/dist/components/Badge/Badge.d.ts.map +0 -1
  275. package/dist/components/Badge/Badge.styles.d.ts +0 -26
  276. package/dist/components/Badge/Badge.styles.d.ts.map +0 -1
  277. package/dist/components/Box/Box.d.ts.map +0 -1
  278. package/dist/components/Box/Box.styles.d.ts +0 -21
  279. package/dist/components/Box/Box.styles.d.ts.map +0 -1
  280. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts.map +0 -1
  281. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
  282. package/dist/components/Breadcrumbs/Breadcrumbs.styles.d.ts +0 -10
  283. package/dist/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +0 -1
  284. package/dist/components/Button/Button.d.ts.map +0 -1
  285. package/dist/components/Button/Button.styles.d.ts +0 -3
  286. package/dist/components/Button/Button.styles.d.ts.map +0 -1
  287. package/dist/components/Button/ButtonLink.d.ts.map +0 -1
  288. package/dist/components/Button/GhostButton.d.ts.map +0 -1
  289. package/dist/components/Button/GhostButton.styles.d.ts +0 -3
  290. package/dist/components/Button/GhostButton.styles.d.ts.map +0 -1
  291. package/dist/components/Button/IconButton.d.ts.map +0 -1
  292. package/dist/components/Button/constant.d.ts.map +0 -1
  293. package/dist/components/Checkbox/Checkbox.d.ts.map +0 -1
  294. package/dist/components/Checkbox/Checkbox.styles.d.ts +0 -5
  295. package/dist/components/Checkbox/Checkbox.styles.d.ts.map +0 -1
  296. package/dist/components/Chip/Chip.d.ts.map +0 -1
  297. package/dist/components/Chip/Chip.styles.d.ts +0 -13
  298. package/dist/components/Chip/Chip.styles.d.ts.map +0 -1
  299. package/dist/components/CurrencyInput/CurrencyInput.d.ts.map +0 -1
  300. package/dist/components/CurrencyInput/CurrencyInput.styles.d.ts +0 -27
  301. package/dist/components/CurrencyInput/CurrencyInput.styles.d.ts.map +0 -1
  302. package/dist/components/CurrencyInput/utils/_cleanValue.d.ts +0 -12
  303. package/dist/components/CurrencyInput/utils/_cleanValue.d.ts.map +0 -1
  304. package/dist/components/CurrencyInput/utils/_formatValue.d.ts +0 -6
  305. package/dist/components/CurrencyInput/utils/_formatValue.d.ts.map +0 -1
  306. package/dist/components/DatePicker/DatePicker.d.ts.map +0 -1
  307. package/dist/components/DatePicker/DateTimePicker.d.ts.map +0 -1
  308. package/dist/components/DatePicker/DateTimePicker.styles.d.ts +0 -61
  309. package/dist/components/DatePicker/DateTimePicker.styles.d.ts.map +0 -1
  310. package/dist/components/Dropdown/Dropdown.d.ts.map +0 -1
  311. package/dist/components/Dropdown/Dropdown.styles.d.ts +0 -11
  312. package/dist/components/Dropdown/Dropdown.styles.d.ts.map +0 -1
  313. package/dist/components/Grid/Col.d.ts.map +0 -1
  314. package/dist/components/Grid/Grid.d.ts.map +0 -1
  315. package/dist/components/Grid/Grid.styles.d.ts +0 -33
  316. package/dist/components/Grid/Grid.styles.d.ts.map +0 -1
  317. package/dist/components/Input/Input.d.ts.map +0 -1
  318. package/dist/components/Input/Input.styles.d.ts +0 -36
  319. package/dist/components/Input/Input.styles.d.ts.map +0 -1
  320. package/dist/components/Pagination/PageItem.d.ts.map +0 -1
  321. package/dist/components/Pagination/Pagination.d.ts.map +0 -1
  322. package/dist/components/Pagination/Pagination.style.d.ts +0 -7
  323. package/dist/components/Pagination/Pagination.style.d.ts.map +0 -1
  324. package/dist/components/Popover/Popover.d.ts.map +0 -1
  325. package/dist/components/Popover/Popover.styles.d.ts +0 -4
  326. package/dist/components/Popover/Popover.styles.d.ts.map +0 -1
  327. package/dist/components/RadioButton/RadioButton.d.ts.map +0 -1
  328. package/dist/components/RadioButton/RadioButton.styles.d.ts +0 -12
  329. package/dist/components/RadioButton/RadioButton.styles.d.ts.map +0 -1
  330. package/dist/components/RowItem/RowItem.d.ts.map +0 -1
  331. package/dist/components/RowItem/RowItem.styles.d.ts +0 -33
  332. package/dist/components/RowItem/RowItem.styles.d.ts.map +0 -1
  333. package/dist/components/ShapeIcon/ShapeIcon.d.ts.map +0 -1
  334. package/dist/components/ShapeIcon/ShapeIcon.styles.d.ts +0 -15
  335. package/dist/components/ShapeIcon/ShapeIcon.styles.d.ts.map +0 -1
  336. package/dist/components/Slider/Slider.d.ts.map +0 -1
  337. package/dist/components/Slider/Slider.styles.d.ts +0 -24
  338. package/dist/components/Slider/Slider.styles.d.ts.map +0 -1
  339. package/dist/components/Snack/Snack.d.ts.map +0 -1
  340. package/dist/components/Snack/Snack.styles.d.ts +0 -20
  341. package/dist/components/Snack/Snack.styles.d.ts.map +0 -1
  342. package/dist/components/Tabs/Tab.d.ts.map +0 -1
  343. package/dist/components/Tabs/Tabs.d.ts.map +0 -1
  344. package/dist/components/Tabs/Tabs.styles.d.ts +0 -43
  345. package/dist/components/Tabs/Tabs.styles.d.ts.map +0 -1
  346. package/dist/components/TextArea/TextArea.d.ts.map +0 -1
  347. package/dist/components/TextArea/TextArea.styles.d.ts +0 -19
  348. package/dist/components/TextArea/TextArea.styles.d.ts.map +0 -1
  349. package/dist/components/TextLabel/TextLabel.d.ts.map +0 -1
  350. package/dist/components/TextLabel/TextLabel.styles.d.ts +0 -10
  351. package/dist/components/TextLabel/TextLabel.styles.d.ts.map +0 -1
  352. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts.map +0 -1
  353. package/dist/components/ToggleSwitch/ToggleSwitch.styles.d.ts +0 -22
  354. package/dist/components/ToggleSwitch/ToggleSwitch.styles.d.ts.map +0 -1
  355. package/dist/components/Tooltip/Tooltip.d.ts.map +0 -1
  356. package/dist/components/Tooltip/Tooltip.styles.d.ts +0 -33
  357. package/dist/components/Tooltip/Tooltip.styles.d.ts.map +0 -1
  358. package/dist/components/index.d.ts +0 -62
  359. package/dist/components/index.d.ts.map +0 -1
  360. package/dist/css/baseline.d.ts +0 -15
  361. package/dist/css/baseline.d.ts.map +0 -1
  362. package/dist/index.d.ts.map +0 -1
  363. package/dist/patterns/Drawer/Drawer.d.ts +0 -110
  364. package/dist/patterns/Drawer/Drawer.d.ts.map +0 -1
  365. package/dist/patterns/Drawer/Drawer.styles.d.ts +0 -39
  366. package/dist/patterns/Drawer/Drawer.styles.d.ts.map +0 -1
  367. package/dist/patterns/EmptyState/EmptyState.d.ts +0 -36
  368. package/dist/patterns/EmptyState/EmptyState.d.ts.map +0 -1
  369. package/dist/patterns/EmptyState/EmptyState.styles.d.ts +0 -4
  370. package/dist/patterns/EmptyState/EmptyState.styles.d.ts.map +0 -1
  371. package/dist/patterns/InputGroup/InputGroup.d.ts +0 -26
  372. package/dist/patterns/InputGroup/InputGroup.d.ts.map +0 -1
  373. package/dist/patterns/InputGroup/InputGroup.styles.d.ts +0 -8
  374. package/dist/patterns/InputGroup/InputGroup.styles.d.ts.map +0 -1
  375. package/dist/patterns/LegacyDialog/DialogMainIcon.d.ts +0 -2
  376. package/dist/patterns/LegacyDialog/DialogMainIcon.d.ts.map +0 -1
  377. package/dist/patterns/LegacyDialog/LegacyDialog.d.ts.map +0 -1
  378. package/dist/patterns/LegacyDialog/LegacyDialog.styles.d.ts +0 -13
  379. package/dist/patterns/LegacyDialog/LegacyDialog.styles.d.ts.map +0 -1
  380. package/dist/patterns/LegacyPopup/LegacyPopup.d.ts.map +0 -1
  381. package/dist/patterns/LegacyPopup/LegacyPopup.styles.d.ts +0 -27
  382. package/dist/patterns/LegacyPopup/LegacyPopup.styles.d.ts.map +0 -1
  383. package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts.map +0 -1
  384. package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts +0 -26
  385. package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.styles.d.ts.map +0 -1
  386. package/dist/patterns/Popup/Popup.d.ts +0 -92
  387. package/dist/patterns/Popup/Popup.d.ts.map +0 -1
  388. package/dist/patterns/Popup/Popup.styles.d.ts +0 -41
  389. package/dist/patterns/Popup/Popup.styles.d.ts.map +0 -1
  390. package/dist/patterns/RangeInput/RangeInput.d.ts.map +0 -1
  391. package/dist/patterns/RangeInput/RangeInput.styles.d.ts +0 -5
  392. package/dist/patterns/RangeInput/RangeInput.styles.d.ts.map +0 -1
  393. package/dist/patterns/SearchInput/SearchInput.d.ts.map +0 -1
  394. package/dist/patterns/SearchInput/SearchInput.styles.d.ts +0 -10
  395. package/dist/patterns/SearchInput/SearchInput.styles.d.ts.map +0 -1
  396. package/dist/patterns/Searchbar/Searchbar.d.ts.map +0 -1
  397. package/dist/patterns/Searchbar/Searchbar.styles.d.ts +0 -3
  398. package/dist/patterns/Searchbar/Searchbar.styles.d.ts.map +0 -1
  399. package/dist/patterns/TagCloud/TagCloud.d.ts +0 -76
  400. package/dist/patterns/TagCloud/TagCloud.d.ts.map +0 -1
  401. package/dist/patterns/TagCloud/TagCloud.styles.d.ts +0 -15
  402. package/dist/patterns/TagCloud/TagCloud.styles.d.ts.map +0 -1
  403. package/dist/patterns/TagCloud/TagCloudMultiActive.d.ts +0 -25
  404. package/dist/patterns/TagCloud/TagCloudMultiActive.d.ts.map +0 -1
  405. package/dist/patterns/TagCloud/TagCloudSingleActive.d.ts +0 -22
  406. package/dist/patterns/TagCloud/TagCloudSingleActive.d.ts.map +0 -1
  407. package/dist/patterns/index.d.ts +0 -23
  408. package/dist/patterns/index.d.ts.map +0 -1
  409. package/dist/theme/chotot.d.ts +0 -1371
  410. package/dist/theme/chotot.d.ts.map +0 -1
  411. package/dist/theme/ct-job.d.ts +0 -826
  412. package/dist/theme/ct-job.d.ts.map +0 -1
  413. package/dist/theme/ct-pty.d.ts +0 -826
  414. package/dist/theme/ct-pty.d.ts.map +0 -1
  415. package/dist/theme/ct-veh.d.ts +0 -591
  416. package/dist/theme/ct-veh.d.ts.map +0 -1
  417. package/dist/theme/index.d.ts +0 -5
  418. package/dist/theme/index.d.ts.map +0 -1
  419. package/dist/theme/mudah.d.ts +0 -248
  420. package/dist/theme/mudah.d.ts.map +0 -1
  421. package/dist/theme/types.d.ts +0 -58
  422. package/dist/theme/types.d.ts.map +0 -1
  423. package/dist/theme-chotot.css +0 -2
  424. package/dist/theme-job.css +0 -2
  425. package/dist/theme-pty.css +0 -2
  426. package/dist/theme-veh.css +0 -2
  427. package/dist/typography/BodyAnnotation.d.ts.map +0 -1
  428. package/dist/typography/BodyCaption.d.ts.map +0 -1
  429. package/dist/typography/BodyPage.d.ts.map +0 -1
  430. package/dist/typography/BodySection.d.ts.map +0 -1
  431. package/dist/typography/DisplayAnnotation.d.ts.map +0 -1
  432. package/dist/typography/DisplayCaption.d.ts.map +0 -1
  433. package/dist/typography/DisplayPage.d.ts.map +0 -1
  434. package/dist/typography/DisplaySection.d.ts.map +0 -1
  435. package/dist/typography/HeaderAnnotation.d.ts.map +0 -1
  436. package/dist/typography/HeaderCaption.d.ts.map +0 -1
  437. package/dist/typography/HeaderPage.d.ts.map +0 -1
  438. package/dist/typography/HeaderSection.d.ts.map +0 -1
  439. package/dist/typography/LabelAnnotation.d.ts.map +0 -1
  440. package/dist/typography/LabelCaption.d.ts.map +0 -1
  441. package/dist/typography/LabelPage.d.ts.map +0 -1
  442. package/dist/typography/LabelSection.d.ts.map +0 -1
  443. package/dist/typography/NoteCaption.d.ts.map +0 -1
  444. package/dist/typography/NotePage.d.ts.map +0 -1
  445. package/dist/typography/NoteSection.d.ts.map +0 -1
  446. package/dist/typography/TaglineAnnotation.d.ts.map +0 -1
  447. package/dist/typography/TaglineCaption.d.ts.map +0 -1
  448. package/dist/typography/TaglineFootext.d.ts.map +0 -1
  449. package/dist/typography/TaglineSection.d.ts.map +0 -1
  450. package/dist/typography/index.d.ts.map +0 -1
  451. package/dist/utils/_inlineCreatePortal.d.ts.map +0 -1
  452. package/dist/utils/_normalizeArrowKey.d.ts +0 -10
  453. package/dist/utils/_normalizeArrowKey.d.ts.map +0 -1
  454. package/dist/utils/_simulateChangeEvent.d.ts +0 -25
  455. package/dist/utils/_simulateChangeEvent.d.ts.map +0 -1
  456. package/dist/utils/cleanHtml.d.ts.map +0 -1
  457. package/dist/utils/createUniversalPortal.d.ts.map +0 -1
  458. package/dist/utils/cx.d.ts +0 -22
  459. package/dist/utils/cx.d.ts.map +0 -1
  460. package/dist/utils/getBreakpointsValues.d.ts.map +0 -1
  461. package/dist/utils/index.d.ts +0 -7
  462. package/dist/utils/index.d.ts.map +0 -1
  463. package/dist/utils/noop.d.ts +0 -9
  464. package/dist/utils/noop.d.ts.map +0 -1
  465. package/dist/utils/scrollLock/index.d.ts +0 -7
  466. package/dist/utils/scrollLock/index.d.ts.map +0 -1
  467. package/dist/utils/scrollLock/scrollLock.styles.d.ts +0 -6
  468. package/dist/utils/scrollLock/scrollLock.styles.d.ts.map +0 -1
  469. package/dist/utils/scrollLock/useBodyScrollLock.d.ts.map +0 -1
  470. package/dist/utils/scrollTop.d.ts +0 -8
  471. package/dist/utils/scrollTop.d.ts.map +0 -1
  472. package/dist/utils/sx.d.ts +0 -174
  473. package/dist/utils/sx.d.ts.map +0 -1
  474. package/dist/utils/types.d.ts.map +0 -1
  475. package/theme/__snapshots__/chotot.spec.js.snap +0 -519
  476. package/theme/__snapshots__/mudah.spec.js.snap +0 -161
  477. package/theme/chotot.js +0 -1336
  478. package/theme/chotot.spec.js +0 -72
  479. package/theme/ct-job.js +0 -92
  480. package/theme/ct-pty.js +0 -92
  481. package/theme/ct-veh.js +0 -92
  482. package/theme/index.ts +0 -10
  483. package/theme/mudah.js +0 -333
  484. package/theme/mudah.spec.js +0 -9
  485. package/theme/types.ts +0 -61
@@ -1,72 +0,0 @@
1
- import theme from './chotot';
2
-
3
- const themeName = 'chotot';
4
-
5
- describe(`${themeName} theme`, () => {
6
- it('should match current snapshot', () => {
7
- expect(theme).toMatchSnapshot();
8
- });
9
- });
10
-
11
- describe(`${themeName} theme`, () => {
12
- it('should has all the required theme keys', () => {
13
- expect(theme.breakpoints).toBeDefined();
14
- expect(theme.mediaQueries).toBeDefined();
15
- expect(theme.space).toBeDefined();
16
- expect(theme.sizes).toBeDefined();
17
- expect(theme.fonts).toBeDefined();
18
- expect(theme.fontSizes).toBeDefined();
19
- expect(theme.lineHeights).toBeDefined();
20
- expect(theme.fontWeights).toBeDefined();
21
- expect(theme.colors).toBeDefined();
22
- expect(theme.borders).toBeDefined();
23
- expect(theme.borderWidths).toBeDefined();
24
- expect(theme.borderStyles).toBeDefined();
25
- expect(theme.radii).toBeDefined();
26
- expect(theme.shadows).toBeDefined();
27
- expect(theme.letterSpacings).toBeDefined();
28
- expect(theme.zIndices).toBeDefined();
29
- expect(theme.gradients).toBeDefined();
30
- });
31
- });
32
-
33
- describe(`${themeName} theme.colors`, () => {
34
- it('should has the required semantic color names', () => {
35
- const { colors } = theme;
36
- expect(colors.textPrimary).toMatch(/#[0-9A-F]{6}/i);
37
- expect(colors.textTertiary).toMatch(/#[0-9A-F]{6}/i);
38
- expect(colors.textLink).toMatch(/#[0-9A-F]{6}/i);
39
- expect(colors.interactionInfoPressed).toMatch(/#[0-9A-F]{6}/i);
40
- expect(colors.border).toMatch(/#[0-9A-F]{6}/i);
41
- expect(colors.background).toMatch(/#[0-9A-F]{6}/i);
42
- expect(colors.backgroundBrand).toMatch(/#[0-9A-F]{6}/i);
43
- expect(colors.secondary).toMatch(/#[0-9A-F]{6}/i);
44
- expect(colors.accent).toMatch(/#[0-9A-F]{6}/i);
45
- expect(colors.highlight).toMatch(/#[0-9A-F]{6}/i);
46
- expect(colors.muted).toMatch(/#[0-9A-F]{6}/i);
47
- expect(colors.neutral).toMatch(/#[0-9A-F]{6}/i);
48
- expect(colors.critical).toMatch(/#[0-9A-F]{6}/i);
49
- expect(colors.info).toMatch(/#[0-9A-F]{6}/i);
50
- expect(colors.positive).toMatch(/#[0-9A-F]{6}/i);
51
- expect(colors.caution).toMatch(/#[0-9A-F]{6}/i);
52
- });
53
- });
54
-
55
- describe(`${themeName} theme.fontSizes`, () => {
56
- it('should define h1-h6 and body', () => {
57
- const { fontSizes } = theme;
58
- for (let i = 1; i <= 6; i++) {
59
- expect(fontSizes[`h${i}`]).toBeDefined();
60
- }
61
- expect(fontSizes.body).toBeDefined();
62
- });
63
- });
64
-
65
- describe(`${themeName} theme.sizes`, () => {
66
- it('should has some percentage keys', () => {
67
- const { sizes } = theme;
68
- ['vW', 'vH', 'quarter', 'third', 'half', 'twoThird', 'threeQuarter', 'full'].forEach((key) => {
69
- expect(sizes[key]).toBeDefined();
70
- });
71
- });
72
- });
package/theme/ct-job.js DELETED
@@ -1,92 +0,0 @@
1
- import theme from './chotot';
2
-
3
- const { colors } = theme;
4
-
5
- const verticals = /** @type {const} */ ({
6
- vertical50: '#F2F6FC',
7
- vertical75: '#E4ECFB',
8
- vertical100: '#CADBF7',
9
- vertical200: '#A3C0F5',
10
- vertical300: '#7FA7F0',
11
- vertical400: '#548AF0',
12
- vertical500: '#306BD9',
13
- vertical600: '#1952BA',
14
- vertical700: '#113B8A',
15
- vertical800: '#0B2F70',
16
- vertical900: '#0B234F',
17
- });
18
-
19
- const jobColors = {
20
- ...colors,
21
- ...verticals,
22
- };
23
-
24
- export const alias = {
25
- /**
26
- * Brand color for decorations: banner, illustrations, tag...
27
- */
28
- backgroundBrand: jobColors.vertical500,
29
- /**
30
- * Highlight background for decorations; Highlighted announcer
31
- */
32
- backgroundBrandLight: jobColors.vertical50,
33
- /**
34
- * Brand text color
35
- */
36
- textBrand: jobColors.vertical500,
37
- /**
38
- * Primary button solid background color
39
- */
40
- textOnBackground: jobColors.gray0,
41
- /**
42
- * Primary button solid background color
43
- */
44
- buttonPrimary: jobColors.vertical500,
45
- /**
46
- * Secondary button tonal background color
47
- */
48
- buttonSecondary: jobColors.vertical50,
49
- /**
50
- * Interactive or selected border color
51
- */
52
- borderBrand: jobColors.vertical500,
53
- /**
54
- * Focus or selected state of inputs
55
- */
56
- borderActive: jobColors.vertical500,
57
- /**
58
- * Brand color for icons
59
- */
60
- iconBrand: jobColors.vertical500,
61
- /**
62
- * Dynamic brand icons color
63
- */
64
- iconOnBackground: jobColors.gray0,
65
- /**
66
- * Hover color for “button-secondary”
67
- */
68
- interactionBrandHover: jobColors.vertical400,
69
- /**
70
- * Active color for “button-button-secondary”
71
- */
72
- interactionBrandPressed: jobColors.vertical600,
73
- /**
74
- * Active color for “button-button-secondary”
75
- */
76
- interactionBrandLightHover: jobColors.vertical75,
77
- /**
78
- * Active color for “button-button-secondary”
79
- */
80
- interactionBrandLightPressed: jobColors.vertical100,
81
- };
82
-
83
- const jobTheme = {
84
- ...theme,
85
- colors: {
86
- ...theme.colors,
87
- ...jobColors,
88
- ...alias,
89
- },
90
- };
91
-
92
- export default jobTheme;
package/theme/ct-pty.js DELETED
@@ -1,92 +0,0 @@
1
- import theme from './chotot';
2
-
3
- const { colors } = theme;
4
-
5
- const verticals = /** @type {const} */ ({
6
- vertical50: '#FFE5CF',
7
- vertical75: '#FFCFAB',
8
- vertical100: '#FFAF7A',
9
- vertical200: '#FFAF7A',
10
- vertical300: '#FB7328',
11
- vertical400: '#FA6819',
12
- vertical500: '#D14200',
13
- vertical600: '#A33100',
14
- vertical700: '#752506',
15
- vertical800: '#5E1A03',
16
- vertical900: '#451608',
17
- });
18
-
19
- const ptyColors = {
20
- ...colors,
21
- ...verticals,
22
- };
23
-
24
- export const alias = {
25
- /**
26
- * Brand color for decorations: banner, illustrations, tag...
27
- */
28
- backgroundBrand: ptyColors.vertical400,
29
- /**
30
- * Highlight background for decorations; Highlighted announcer
31
- */
32
- backgroundBrandLight: ptyColors.vertical50,
33
- /**
34
- * Brand text color
35
- */
36
- textBrand: ptyColors.vertical400,
37
- /**
38
- * Primary button solid background color
39
- */
40
- textOnBackground: ptyColors.gray0,
41
- /**
42
- * Primary button solid background color
43
- */
44
- buttonPrimary: ptyColors.vertical400,
45
- /**
46
- * Secondary button tonal background color
47
- */
48
- buttonSecondary: ptyColors.vertical50,
49
- /**
50
- * Interactive or selected border color
51
- */
52
- borderBrand: ptyColors.vertical400,
53
- /**
54
- * Focus or selected state of inputs
55
- */
56
- borderActive: ptyColors.vertical400,
57
- /**
58
- * Brand color for icons
59
- */
60
- iconBrand: ptyColors.vertical400,
61
- /**
62
- * Dynamic brand icons color
63
- */
64
- iconOnBackground: ptyColors.gray0,
65
- /**
66
- * Hover color for “button-secondary”
67
- */
68
- interactionBrandHover: ptyColors.vertical300,
69
- /**
70
- * Active color for “button-button-secondary”
71
- */
72
- interactionBrandPressed: ptyColors.vertical500,
73
- /**
74
- * Active color for “button-button-secondary”
75
- */
76
- interactionBrandLightHover: ptyColors.vertical75,
77
- /**
78
- * Active color for “button-button-secondary”
79
- */
80
- interactionBrandLightPressed: ptyColors.vertical100,
81
- };
82
-
83
- const propertyTheme = {
84
- ...theme,
85
- colors: {
86
- ...theme.colors,
87
- ...ptyColors,
88
- ...alias,
89
- },
90
- };
91
-
92
- export default propertyTheme;
package/theme/ct-veh.js DELETED
@@ -1,92 +0,0 @@
1
- import theme from './chotot';
2
-
3
- const { colors } = theme;
4
-
5
- const verticals = /** @type {const} */ ({
6
- chototxe50: '#FFF8D6',
7
- chototxe75: '#FFE884',
8
- chototxe100: '#FFD400',
9
- chototxe200: '#FFC800',
10
- chototxe300: '#FFBA00',
11
- chototxe400: '#CC8F00',
12
- chototxe500: '#9E6C00',
13
- chototxe600: '#7F5500',
14
- chototxe700: '#603F00',
15
- chototxe800: '#4F3200',
16
- chototxe900: '#432900',
17
- });
18
-
19
- const vehColors = {
20
- ...colors,
21
- ...verticals,
22
- };
23
-
24
- export const alias = {
25
- /**
26
- * Brand color for decorations: banner, illustrations, tag...
27
- */
28
- backgroundBrand: colors.vertical100,
29
- /**
30
- * Highlight background for decorations; Highlighted announcer
31
- */
32
- backgroundBrandLight: colors.vertical50,
33
- /**
34
- * Brand text color
35
- */
36
- textBrand: colors.vertical400,
37
- /**
38
- * Primary button solid background color
39
- */
40
- textOnBackground: colors.gray900,
41
- /**
42
- * Primary button solid background color
43
- */
44
- buttonPrimary: colors.vertical100,
45
- /**
46
- * Secondary button tonal background color
47
- */
48
- buttonSecondary: colors.vertical50,
49
- /**
50
- * Interactive or selected border color
51
- */
52
- borderBrand: colors.vertical100,
53
- /**
54
- * Focus or selected state of inputs
55
- */
56
- borderActive: colors.vertical100,
57
- /**
58
- * Brand color for icons
59
- */
60
- iconBrand: colors.vertical300,
61
- /**
62
- * Dynamic brand icons color
63
- */
64
- iconOnBackground: colors.gray900,
65
- /**
66
- * Hover color for “button-secondary”
67
- */
68
- interactionBrandHover: colors.vertical75,
69
- /**
70
- * Active color for “button-button-secondary”
71
- */
72
- interactionBrandPressed: colors.vertical200,
73
- /**
74
- * Active color for “button-button-secondary”
75
- */
76
- interactionBrandLightHover: colors.vertical50,
77
- /**
78
- * Active color for “button-button-secondary”
79
- */
80
- interactionBrandLightPressed: colors.vertical75,
81
- };
82
-
83
- const vehicleTheme = {
84
- ...theme,
85
- colors: {
86
- ...theme.colors,
87
- ...vehColors,
88
- ...alias,
89
- },
90
- };
91
-
92
- export default vehicleTheme;
package/theme/index.ts DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * Default theme. Basically, it's the same with ./chotot.js
3
- */
4
- // forward default export
5
- import theme from './chotot';
6
-
7
- export default theme;
8
- export { alias } from './chotot';
9
-
10
- export type * from './types';
package/theme/mudah.js DELETED
@@ -1,333 +0,0 @@
1
- /**
2
- * mudah.my theme
3
- * NOTE: currently it's just for experiment
4
- */
5
- // utilities
6
-
7
- /**
8
- * Map numeric values to CSS px values
9
- * @param {*} v
10
- */
11
- const px = (v) => `${v}px`;
12
-
13
- /**
14
- * @breakpoints
15
- *
16
- * When used with `sx` helper, 0 index means for all viewports (mobile first):
17
- *
18
- * ```
19
- * sx({
20
- * // applies font size small to all viewport widths,
21
- * // font size medium above the first breakpoint,
22
- * // font size large above the next breakpoint
23
- * fontSize: [ 'small', 'medium', 'large' ]
24
- * })
25
- * ```
26
- */
27
- const breakpoints = ['576px', '768px', '992px', '1280px', '1440px'];
28
- // index in sx: 1, 2, 3, 4, 5 (not a mistake, 0 is smallest viewport)
29
-
30
- /**
31
- * @mediaQueries
32
- *
33
- * Example:
34
- * @media ${theme.mediaQueries.tablet} {
35
- * font-size: ${theme.fontSize.small}
36
- * }
37
- */
38
- const mediaQueries = {
39
- tablet: `screen and (min-width: ${breakpoints[1]})`,
40
- desktop: `screen and (min-width: ${breakpoints[2]})`,
41
- };
42
-
43
- /**
44
- * @space
45
- */
46
- // idx: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
47
- const space = [2, 4, 8, 12, 16, 24, 32, 48, 64, 96, 128].map(px);
48
-
49
- /**
50
- * @sizes
51
- */
52
- // index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
53
- const iconSizeScale = [16, 20, 22, 24, 32, 40, 50, 75, 100, 105].map(px);
54
-
55
- const sizes = {
56
- icons: iconSizeScale,
57
- vW: '100vw',
58
- vH: '100vh',
59
- [1 / 4]: '25%',
60
- [1 / 3]: '33.33%',
61
- [1 / 2]: '50%',
62
- [2 / 3]: '66.66%',
63
- [3 / 4]: '75%',
64
- 1: '100%',
65
- };
66
-
67
- /**
68
- * @fonts
69
- */
70
- const fonts = {
71
- body: 'Roboto, sans-serif',
72
- heading: 'inherit',
73
- monospace: 'SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace',
74
- };
75
-
76
- /**
77
- * @fontSizes
78
- */
79
- // index: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
80
- const fontSizeScale = [11, 12, 13, 14, 15, 16, 18, 20, 24, 32].map(px);
81
-
82
- const fontSizes = {
83
- ...fontSizeScale,
84
- h1: fontSizeScale[9],
85
- h2: fontSizeScale[8],
86
- h3: fontSizeScale[7],
87
- };
88
-
89
- /**
90
- * @lineHeights
91
- */
92
- // index: 0, 1, 2, 3, 4, 5
93
- const lineHeights = [1, 1.25, 1.5, 1.75, 2, 2.5];
94
-
95
- /**
96
- * @fontWeights
97
- */
98
- const fontWeights = {
99
- regular: 400,
100
- bold: 700,
101
- body: 400, // regular
102
- heading: 700, // bold
103
- };
104
-
105
- /**
106
- * @colors
107
- */
108
-
109
- const neutrals = {
110
- black: '#222222',
111
- gray1: '#9B9B9B',
112
- gray2: '#CACACA',
113
- gray3: '#E8E8E8',
114
- gray4: '#F4F4F4',
115
- white: '#FFFFFF',
116
- };
117
-
118
- const reds = {
119
- red1: '#A20214',
120
- red2: '#D0021B',
121
- red3: '#FD213B',
122
- red4: '#FFD7DB',
123
- };
124
-
125
- const oranges = {
126
- orange1: '#CC7A00',
127
- orange2: '#FE9900',
128
- orange3: '#FFB647',
129
- orange4: '#FFEFD6',
130
- };
131
-
132
- const yellows = {
133
- yellow1: '#CC9600',
134
- yellow2: '#FFBA00',
135
- yellow3: '#FFCE47',
136
- yellow4: '#FFF4D6',
137
- };
138
-
139
- const greens = {
140
- green1: '#42782B',
141
- green2: '#589F39',
142
- green3: '#7AC45A',
143
- green4: '#E7F4E1',
144
- };
145
-
146
- const teals = {
147
- teal1: '#005C66',
148
- teal2: '#0094A3',
149
- teal3: '#00CAE0',
150
- teal4: '#D6FBFF',
151
- };
152
-
153
- const blues = {
154
- blue1: '#2275D3',
155
- blue2: '#4A90E2',
156
- blue3: '#84B4EB',
157
- blue4: '#DCEAF9',
158
- darkblue1: '#2A5079',
159
- darkblue2: '#38699F',
160
- darkblue3: '#598DC5',
161
- darkblue4: '#E1EAF4',
162
- };
163
-
164
- const semantics = {
165
- /**
166
- * Main body text color
167
- * @type {string}
168
- */
169
- text: neutrals.black,
170
- /**
171
- * De-emphasized / footer text color
172
- * @type {string}
173
- */
174
- textLighter: neutrals.gray1,
175
- /**
176
- * Regular hyperlinks color
177
- * @type {string}
178
- */
179
- link: blues.darkblue2, // #38699F
180
- /**
181
- * Regular hyperlinks hover / active color
182
- * @type {string}
183
- */
184
- linkActive: blues.blue2, // #4A90E2
185
- /**
186
- * Color for lines, borders
187
- * @type {string}
188
- */
189
- line: neutrals.gray2, // #CACACA
190
- /**
191
- * Body background color
192
- * @type {string}
193
- */
194
- background: neutrals.gray4,
195
- /**
196
- * Primary brand color for links, buttons, etc.
197
- * @type {string}
198
- */
199
- primary: blues.blue1, // #2275D3
200
- /**
201
- * A secondary brand color for alternative styling
202
- * @type {string}
203
- */
204
- secondary: greens.green3,
205
- /**
206
- * A contrast color for emphasizing UI
207
- * @type {string}
208
- */
209
- accent: blues.blue3, // #84B4EB
210
- /**
211
- * A background color for highlighting text
212
- * @type {string}
213
- */
214
- highlight: yellows.yellow4,
215
- /**
216
- * A faint color for backgrounds, borders, and accents that do not require high contrast with the background color
217
- * @type {string}
218
- */
219
- muted: neutrals.gray3,
220
- /**
221
- * Subtle information or details historic in nature. Often already actioned & in the past. No priority required due to the lack of importance or change.
222
- * @type {string}
223
- */
224
- neutral: neutrals.gray1,
225
- /**
226
- * Super important, high urgency, high risk, errors...
227
- * @type {string}
228
- */
229
- critical: reds.red2, // #D0021B
230
- /**
231
- * Guidance & advice. Generally from the UI or business. Functional, calm and non urgent.
232
- * @type {string}
233
- */
234
- info: blues.blue1, // #2275D3
235
- /**
236
- * Good vibes & new things! Wants to get the user to act on something or be aware something good happened.
237
- * @type {string}
238
- */
239
- positive: greens.green3, // #7AC45A
240
- /**
241
- * You should be aware something is happening or mid-way through a process. Could be a risk or an item that needs to be acted upon.
242
- * @type {string}
243
- */
244
- caution: yellows.yellow3, // #FFCE47
245
- };
246
-
247
- const colors = {
248
- ...semantics,
249
- ...neutrals,
250
- ...reds,
251
- ...oranges,
252
- ...yellows,
253
- ...greens,
254
- ...teals,
255
- ...blues,
256
- };
257
-
258
- /**
259
- * @borders
260
- */
261
- const borders = {
262
- cardBorder: '1px solid',
263
- };
264
-
265
- /**
266
- * @borderWidths
267
- */
268
- const borderWidths = [];
269
-
270
- /**
271
- * @borderStyles
272
- */
273
- const borderStyles = [];
274
-
275
- /**
276
- * @radii
277
- * border radius
278
- */
279
- // index: 0, 1, 2, 3, 4, 5
280
- const radii = [0, 3, 4, 6, 12, 20].map(px);
281
-
282
- /**
283
- * @shadows
284
- * box-shadow, text-shadow
285
- */
286
- // index: 0, 1
287
- const shadows = ['none', '0 1px 7px rgba(0,0,0,.3)'];
288
-
289
- /**
290
- * @letterSpacings
291
- */
292
- const letterSpacings = [];
293
-
294
- /**
295
- * @zIndices
296
- * z-index
297
- */
298
- const zIndices = [];
299
-
300
- /**
301
- * @gradients This key is NOT standard styled-system's theme specs
302
- * background-image
303
- * TODO: to apply to real use case and revise
304
- */
305
- const gradients = {
306
- toDark: 'linear-gradient(180deg, rgba(0, 0, 0, 0.00) 3%, #101426 100%)',
307
- toLight: 'linear-gradient(0deg, #FFFFFF 0%, rgba(255, 255, 255, 0.00) 100%)',
308
- };
309
-
310
- /**
311
- * Whole theme object
312
- */
313
- const theme = Object.freeze({
314
- breakpoints,
315
- mediaQueries,
316
- space,
317
- sizes,
318
- fonts,
319
- fontSizes,
320
- lineHeights,
321
- fontWeights,
322
- colors,
323
- borders,
324
- borderWidths,
325
- borderStyles,
326
- radii,
327
- shadows,
328
- letterSpacings,
329
- zIndices,
330
- gradients,
331
- });
332
-
333
- export default theme;
@@ -1,9 +0,0 @@
1
- import theme from './mudah';
2
-
3
- const themeName = 'mudah';
4
-
5
- describe(`${themeName} theme`, () => {
6
- it('should match current snapshot', () => {
7
- expect(theme).toMatchSnapshot();
8
- });
9
- });