@indico-data/design-system 2.43.0 → 2.44.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 (429) hide show
  1. package/lib/assets/fonts/noto/a.woff2 +0 -0
  2. package/lib/assets/fonts/noto/b.woff2 +0 -0
  3. package/lib/assets/fonts/noto/c.woff2 +0 -0
  4. package/lib/assets/fonts/noto/d.woff2 +0 -0
  5. package/lib/assets/fonts/noto/e.woff2 +0 -0
  6. package/lib/assets/fonts/noto/f.woff2 +0 -0
  7. package/lib/assets/fonts/noto/g.woff2 +0 -0
  8. package/lib/assets/fonts/noto/h.woff2 +0 -0
  9. package/lib/assets/fonts/noto/notosans.css +79 -0
  10. package/lib/components/button/Button.stories.d.ts +11 -13
  11. package/lib/components/button/enums.d.ts +2 -4
  12. package/lib/components/button/types.d.ts +6 -7
  13. package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +1 -1
  14. package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +1 -1
  15. package/lib/components/forms/input/Input.d.ts +1 -1
  16. package/lib/index.css +1775 -1017
  17. package/lib/index.d.ts +148 -885
  18. package/lib/index.esm.css +1775 -1017
  19. package/lib/index.esm.js +17829 -24248
  20. package/lib/index.esm.js.map +1 -1
  21. package/lib/index.js +16041 -22502
  22. package/lib/index.js.map +1 -1
  23. package/lib/legacy/components/Tooltip/Tooltip.d.ts +1 -1
  24. package/lib/legacy/components/index.d.ts +1 -12
  25. package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +1 -1
  26. package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +1 -1
  27. package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +1 -1
  28. package/lib/legacy/components/loading-indicators/index.d.ts +0 -4
  29. package/lib/legacy/components/modals/ConfirmModal/ConfirmModal.d.ts +1 -1
  30. package/lib/legacy/components/modals/ModalBase/ModalBase.d.ts +1 -1
  31. package/lib/stylesAndAnimations/colors/constants.d.ts +0 -1
  32. package/lib/types.d.ts +1 -3
  33. package/package.json +1 -1
  34. package/src/components/button/Button.mdx +28 -78
  35. package/src/components/button/Button.stories.tsx +312 -176
  36. package/src/components/button/Button.tsx +23 -16
  37. package/src/components/button/__tests__/Button.test.tsx +66 -58
  38. package/src/components/button/enums.ts +2 -6
  39. package/src/components/button/styles/Button.scss +119 -137
  40. package/src/components/button/styles/_variables.scss +115 -148
  41. package/src/components/button/types.ts +6 -8
  42. package/src/components/card/Card.stories.tsx +1 -1
  43. package/src/components/card/styles/Card.scss +11 -11
  44. package/src/components/floatUI/FloatUI.mdx +5 -5
  45. package/src/components/floatUI/FloatUI.stories.tsx +8 -8
  46. package/src/components/floatUI/__tests__/FloatUI.test.tsx +3 -3
  47. package/src/components/floatUI/styles/FloatUI.scss +1 -2
  48. package/src/components/floatUI/styles/_variables.scss +11 -7
  49. package/src/components/forms/checkbox/styles/Checkbox.scss +8 -14
  50. package/src/components/forms/date/datePicker/__tests__/DatePicker.test.tsx +23 -3
  51. package/src/components/forms/date/datePicker/styles/DatePicker.scss +9 -5
  52. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +4 -4
  53. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +1 -1
  54. package/src/components/forms/form/styles/Form.scss +84 -2
  55. package/src/components/forms/input/Input.tsx +2 -2
  56. package/src/components/forms/input/styles/Input.scss +3 -67
  57. package/src/components/forms/numberInput/NumberInput.tsx +1 -1
  58. package/src/components/forms/numberInput/styles/NumberInput.scss +4 -67
  59. package/src/components/forms/passwordInput/PasswordInput.tsx +1 -1
  60. package/src/components/forms/passwordInput/styles/PasswordInput.scss +3 -67
  61. package/src/components/forms/radio/styles/Radio.scss +6 -10
  62. package/src/components/forms/select/styles/Select.scss +30 -44
  63. package/src/components/forms/textarea/styles/Textarea.scss +1 -49
  64. package/src/components/forms/toggle/styles/Toggle.scss +13 -12
  65. package/src/components/grid/styles/Grid.scss +3 -3
  66. package/src/components/icons/__tests__/Icon.test.tsx +1 -1
  67. package/src/components/menu/Menu.stories.tsx +3 -3
  68. package/src/components/menu/Menu.test.tsx +9 -9
  69. package/src/components/menu/styles/Menu.scss +5 -0
  70. package/src/components/menu/styles/_variables.scss +11 -6
  71. package/src/components/pill/styles/Pill.scss +4 -5
  72. package/src/components/skeleton/styles/Skeleton.scss +2 -2
  73. package/src/components/table/LoadingComponent.tsx +0 -2
  74. package/src/components/table/styles/Table.scss +6 -0
  75. package/src/components/table/styles/_variables.scss +9 -8
  76. package/src/index.ts +0 -45
  77. package/src/legacy/components/Tooltip/Tooltip.styles.ts +0 -12
  78. package/src/legacy/components/Tooltip/Tooltip.tsx +2 -4
  79. package/src/legacy/components/index.ts +1 -30
  80. package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.ts +0 -3
  81. package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.tsx +1 -1
  82. package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.ts +0 -4
  83. package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.tsx +1 -6
  84. package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +2 -2
  85. package/src/legacy/components/loading-indicators/index.ts +0 -4
  86. package/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.ts +1 -4
  87. package/src/legacy/components/modals/ConfirmModal/ConfirmModal.tsx +12 -19
  88. package/src/legacy/components/modals/ModalBase/ModalBase.styles.tsx +0 -7
  89. package/src/legacy/components/modals/ModalBase/ModalBase.tsx +1 -1
  90. package/src/storybookDocs/Permafrost.mdx +92 -0
  91. package/src/styles/_colors.scss +7 -3
  92. package/src/styles/_sheets.scss +3 -3
  93. package/src/styles/assets/fonts/noto/a.woff2 +0 -0
  94. package/src/styles/assets/fonts/noto/b.woff2 +0 -0
  95. package/src/styles/assets/fonts/noto/c.woff2 +0 -0
  96. package/src/styles/assets/fonts/noto/d.woff2 +0 -0
  97. package/src/styles/assets/fonts/noto/e.woff2 +0 -0
  98. package/src/styles/assets/fonts/noto/f.woff2 +0 -0
  99. package/src/styles/assets/fonts/noto/g.woff2 +0 -0
  100. package/src/styles/assets/fonts/noto/h.woff2 +0 -0
  101. package/src/styles/assets/fonts/noto/notosans.css +79 -0
  102. package/src/styles/globals.scss +5 -16
  103. package/src/styles/index.scss +1 -2
  104. package/src/styles/storybook.scss +1 -1
  105. package/src/styles/variables/_borders.scss +6 -6
  106. package/src/styles/variables/_dropshadows.scss +2 -0
  107. package/src/styles/variables/_padding.scss +5 -1
  108. package/src/styles/variables/_typography.scss +7 -1
  109. package/src/styles/variables/themes/dark.scss +147 -83
  110. package/src/styles/variables/themes/light.scss +1 -2
  111. package/src/stylesAndAnimations/colors/Colors.tsx +5 -9
  112. package/src/stylesAndAnimations/colors/UtilityClasses.tsx +23 -14
  113. package/src/stylesAndAnimations/colors/constants.ts +183 -114
  114. package/src/stylesAndAnimations/sizing/Sizing.tsx +2 -2
  115. package/src/types.ts +1 -7
  116. package/lib/assets/fonts/mulish/a.woff2 +0 -0
  117. package/lib/assets/fonts/mulish/b.woff2 +0 -0
  118. package/lib/assets/fonts/mulish/c.woff2 +0 -0
  119. package/lib/assets/fonts/mulish/d.woff2 +0 -0
  120. package/lib/assets/fonts/mulish/mulish.css +0 -98
  121. package/lib/legacy/components/Accordion/Accordion.d.ts +0 -9
  122. package/lib/legacy/components/Accordion/Accordion.stories.d.ts +0 -25
  123. package/lib/legacy/components/Accordion/Accordion.styles.d.ts +0 -1
  124. package/lib/legacy/components/Accordion/index.d.ts +0 -1
  125. package/lib/legacy/components/ListTable/Header/Header.d.ts +0 -21
  126. package/lib/legacy/components/ListTable/Header/Header.styles.d.ts +0 -1
  127. package/lib/legacy/components/ListTable/Header/index.d.ts +0 -1
  128. package/lib/legacy/components/ListTable/ListTable.d.ts +0 -41
  129. package/lib/legacy/components/ListTable/ListTable.stories.d.ts +0 -54
  130. package/lib/legacy/components/ListTable/ListTable.styles.d.ts +0 -1
  131. package/lib/legacy/components/ListTable/index.d.ts +0 -1
  132. package/lib/legacy/components/ListTable/mock-data/index.d.ts +0 -1
  133. package/lib/legacy/components/ListTable/mock-data/mock-data.d.ts +0 -54
  134. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.d.ts +0 -15
  135. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +0 -22
  136. package/lib/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +0 -2
  137. package/lib/legacy/components/LoadingAwareContainer/index.d.ts +0 -1
  138. package/lib/legacy/components/Pagination/Pagination.d.ts +0 -18
  139. package/lib/legacy/components/Pagination/Pagination.stories.d.ts +0 -18
  140. package/lib/legacy/components/Pagination/Pagination.styles.d.ts +0 -1
  141. package/lib/legacy/components/Pagination/index.d.ts +0 -1
  142. package/lib/legacy/components/Toggle/Toggle.d.ts +0 -12
  143. package/lib/legacy/components/Toggle/Toggle.stories.d.ts +0 -21
  144. package/lib/legacy/components/Toggle/Toggle.styles.d.ts +0 -1
  145. package/lib/legacy/components/Toggle/index.d.ts +0 -1
  146. package/lib/legacy/components/basic-section/Section/Section.d.ts +0 -8
  147. package/lib/legacy/components/basic-section/Section/Section.stories.d.ts +0 -13
  148. package/lib/legacy/components/basic-section/Section/Section.styles.d.ts +0 -1
  149. package/lib/legacy/components/basic-section/Section/index.d.ts +0 -1
  150. package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.d.ts +0 -9
  151. package/lib/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +0 -1
  152. package/lib/legacy/components/basic-section/SectionBlock/index.d.ts +0 -1
  153. package/lib/legacy/components/basic-section/SectionBody/SectionBody.d.ts +0 -7
  154. package/lib/legacy/components/basic-section/SectionBody/SectionBody.stories.d.ts +0 -10
  155. package/lib/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +0 -1
  156. package/lib/legacy/components/basic-section/SectionBody/index.d.ts +0 -1
  157. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.d.ts +0 -8
  158. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +0 -14
  159. package/lib/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +0 -1
  160. package/lib/legacy/components/basic-section/SectionHeader/index.d.ts +0 -1
  161. package/lib/legacy/components/basic-section/SectionTable/SectionTable.d.ts +0 -1
  162. package/lib/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +0 -1
  163. package/lib/legacy/components/basic-section/SectionTable/index.d.ts +0 -1
  164. package/lib/legacy/components/basic-section/index.d.ts +0 -5
  165. package/lib/legacy/components/buttons/Button/Button.d.ts +0 -21
  166. package/lib/legacy/components/buttons/Button/Button.stories.d.ts +0 -25
  167. package/lib/legacy/components/buttons/Button/Button.styles.d.ts +0 -1
  168. package/lib/legacy/components/buttons/Button/index.d.ts +0 -1
  169. package/lib/legacy/components/buttons/IconButton/IconButton.d.ts +0 -32
  170. package/lib/legacy/components/buttons/IconButton/IconButton.stories.d.ts +0 -43
  171. package/lib/legacy/components/buttons/IconButton/IconButton.styles.d.ts +0 -5
  172. package/lib/legacy/components/buttons/IconButton/index.d.ts +0 -1
  173. package/lib/legacy/components/buttons/commonStyles.d.ts +0 -9
  174. package/lib/legacy/components/buttons/index.d.ts +0 -2
  175. package/lib/legacy/components/buttons/types.d.ts +0 -3
  176. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.d.ts +0 -19
  177. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +0 -31
  178. package/lib/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +0 -2
  179. package/lib/legacy/components/dropdowns/BorderSelect/index.d.ts +0 -1
  180. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +0 -23
  181. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +0 -46
  182. package/lib/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +0 -4
  183. package/lib/legacy/components/dropdowns/MultiCombobox/index.d.ts +0 -1
  184. package/lib/legacy/components/dropdowns/Select/Select.d.ts +0 -19
  185. package/lib/legacy/components/dropdowns/Select/Select.stories.d.ts +0 -34
  186. package/lib/legacy/components/dropdowns/Select/Select.styles.d.ts +0 -1
  187. package/lib/legacy/components/dropdowns/Select/index.d.ts +0 -1
  188. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +0 -20
  189. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +0 -31
  190. package/lib/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +0 -4
  191. package/lib/legacy/components/dropdowns/SingleCombobox/index.d.ts +0 -1
  192. package/lib/legacy/components/dropdowns/commonStyles.d.ts +0 -1
  193. package/lib/legacy/components/dropdowns/index.d.ts +0 -4
  194. package/lib/legacy/components/dropdowns/types.d.ts +0 -45
  195. package/lib/legacy/components/dropdowns/useCombobox.d.ts +0 -25
  196. package/lib/legacy/components/dropdowns/utils.d.ts +0 -20
  197. package/lib/legacy/components/inputs/EditableInput/EditableInput.d.ts +0 -13
  198. package/lib/legacy/components/inputs/EditableInput/EditableInput.stories.d.ts +0 -14
  199. package/lib/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +0 -1
  200. package/lib/legacy/components/inputs/EditableInput/index.d.ts +0 -1
  201. package/lib/legacy/components/inputs/NumberInput/NumberInput.d.ts +0 -23
  202. package/lib/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +0 -28
  203. package/lib/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +0 -1
  204. package/lib/legacy/components/inputs/NumberInput/index.d.ts +0 -1
  205. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.d.ts +0 -25
  206. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.stories.d.ts +0 -15
  207. package/lib/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +0 -13
  208. package/lib/legacy/components/inputs/RadioButtons/index.d.ts +0 -1
  209. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.d.ts +0 -27
  210. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.stories.d.ts +0 -16
  211. package/lib/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +0 -1
  212. package/lib/legacy/components/inputs/RadioGroup/index.d.ts +0 -1
  213. package/lib/legacy/components/inputs/SearchInput/SearchInput.d.ts +0 -17
  214. package/lib/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +0 -30
  215. package/lib/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +0 -1
  216. package/lib/legacy/components/inputs/SearchInput/index.d.ts +0 -1
  217. package/lib/legacy/components/inputs/TextInput/TextInput.d.ts +0 -24
  218. package/lib/legacy/components/inputs/TextInput/TextInput.stories.d.ts +0 -62
  219. package/lib/legacy/components/inputs/TextInput/TextInput.styles.d.ts +0 -2
  220. package/lib/legacy/components/inputs/TextInput/index.d.ts +0 -1
  221. package/lib/legacy/components/inputs/index.d.ts +0 -6
  222. package/lib/legacy/components/inputs/inputsCommon.styles.d.ts +0 -4
  223. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.d.ts +0 -10
  224. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
  225. package/lib/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +0 -7
  226. package/lib/legacy/components/loading-indicators/LoadingIndicator/index.d.ts +0 -1
  227. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.d.ts +0 -1
  228. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +0 -10
  229. package/lib/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +0 -1
  230. package/lib/legacy/components/loading-indicators/LoadingList/index.d.ts +0 -1
  231. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.d.ts +0 -12
  232. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +0 -10
  233. package/lib/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +0 -1
  234. package/lib/legacy/components/loading-indicators/PercentageRing/index.d.ts +0 -1
  235. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +0 -1
  236. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +0 -10
  237. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/index.d.ts +0 -1
  238. package/lib/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +0 -2
  239. package/lib/legacy/components/text-truncate/TextTruncate.d.ts +0 -8
  240. package/lib/legacy/components/text-truncate/TextTruncate.stories.d.ts +0 -6
  241. package/lib/legacy/components/text-truncate/TextTruncate.styles.d.ts +0 -1
  242. package/lib/legacy/components/text-truncate/TextTruncate.test.d.ts +0 -1
  243. package/lib/legacy/components/text-truncate/index.d.ts +0 -1
  244. package/lib/legacy/components/user-feedback/Shrug/Shrug.d.ts +0 -14
  245. package/lib/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +0 -31
  246. package/lib/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +0 -1
  247. package/lib/legacy/components/user-feedback/Shrug/index.d.ts +0 -1
  248. package/lib/legacy/components/user-feedback/index.d.ts +0 -1
  249. package/lib/legacy/styles/globals/buttons.d.ts +0 -1
  250. package/lib/legacy/styles/globals/forms.d.ts +0 -1
  251. package/lib/legacy/styles/globals/index.d.ts +0 -1
  252. package/lib/legacy/styles/globals/layout.d.ts +0 -1
  253. package/lib/legacy/styles/globals/lists.d.ts +0 -1
  254. package/lib/legacy/styles/globals/margin-padding.d.ts +0 -1
  255. package/lib/legacy/styles/globals/media.d.ts +0 -1
  256. package/lib/legacy/styles/globals/tables.d.ts +0 -1
  257. package/lib/legacy/styles/globals/typography.d.ts +0 -1
  258. package/lib/legacy/styles/globals/utility-classes.d.ts +0 -1
  259. package/lib/legacy/styles/index.d.ts +0 -1
  260. package/lib/legacy/tokens/animation.d.ts +0 -4
  261. package/lib/legacy/tokens/breakpoints.d.ts +0 -10
  262. package/lib/legacy/tokens/colors.d.ts +0 -144
  263. package/lib/legacy/tokens/index.d.ts +0 -8
  264. package/lib/legacy/tokens/margin.d.ts +0 -4
  265. package/lib/legacy/tokens/numbers.d.ts +0 -10
  266. package/lib/legacy/tokens/padding.d.ts +0 -4
  267. package/lib/legacy/tokens/spacings.d.ts +0 -5
  268. package/lib/legacy/tokens/typography.d.ts +0 -61
  269. package/lib/legacy/utils/color.d.ts +0 -21
  270. package/lib/legacy/utils/index.d.ts +0 -4
  271. package/lib/legacy/utils/number.d.ts +0 -21
  272. package/lib/legacy/utils/string.d.ts +0 -12
  273. package/src/legacy/components/Accordion/Accordion.stories.tsx +0 -47
  274. package/src/legacy/components/Accordion/Accordion.styles.ts +0 -35
  275. package/src/legacy/components/Accordion/Accordion.tsx +0 -30
  276. package/src/legacy/components/Accordion/index.ts +0 -1
  277. package/src/legacy/components/ListTable/Header/Header.styles.ts +0 -62
  278. package/src/legacy/components/ListTable/Header/Header.tsx +0 -66
  279. package/src/legacy/components/ListTable/Header/index.ts +0 -1
  280. package/src/legacy/components/ListTable/ListTable.stories.tsx +0 -302
  281. package/src/legacy/components/ListTable/ListTable.styles.ts +0 -76
  282. package/src/legacy/components/ListTable/ListTable.tsx +0 -140
  283. package/src/legacy/components/ListTable/index.ts +0 -1
  284. package/src/legacy/components/ListTable/mock-data/index.ts +0 -1
  285. package/src/legacy/components/ListTable/mock-data/mock-data.ts +0 -291
  286. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.tsx +0 -45
  287. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.ts +0 -16
  288. package/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.tsx +0 -36
  289. package/src/legacy/components/LoadingAwareContainer/index.ts +0 -1
  290. package/src/legacy/components/Pagination/Pagination.stories.tsx +0 -45
  291. package/src/legacy/components/Pagination/Pagination.styles.ts +0 -51
  292. package/src/legacy/components/Pagination/Pagination.tsx +0 -118
  293. package/src/legacy/components/Pagination/index.ts +0 -1
  294. package/src/legacy/components/Toggle/Toggle.stories.tsx +0 -56
  295. package/src/legacy/components/Toggle/Toggle.styles.ts +0 -86
  296. package/src/legacy/components/Toggle/Toggle.tsx +0 -69
  297. package/src/legacy/components/Toggle/index.ts +0 -1
  298. package/src/legacy/components/basic-section/Section/Section.stories.tsx +0 -14
  299. package/src/legacy/components/basic-section/Section/Section.styles.ts +0 -8
  300. package/src/legacy/components/basic-section/Section/Section.tsx +0 -30
  301. package/src/legacy/components/basic-section/Section/index.ts +0 -1
  302. package/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.ts +0 -15
  303. package/src/legacy/components/basic-section/SectionBlock/SectionBlock.tsx +0 -37
  304. package/src/legacy/components/basic-section/SectionBlock/index.ts +0 -1
  305. package/src/legacy/components/basic-section/SectionBody/SectionBody.stories.tsx +0 -16
  306. package/src/legacy/components/basic-section/SectionBody/SectionBody.styles.ts +0 -18
  307. package/src/legacy/components/basic-section/SectionBody/SectionBody.tsx +0 -30
  308. package/src/legacy/components/basic-section/SectionBody/index.ts +0 -1
  309. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.tsx +0 -17
  310. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.ts +0 -5
  311. package/src/legacy/components/basic-section/SectionHeader/SectionHeader.tsx +0 -30
  312. package/src/legacy/components/basic-section/SectionHeader/index.ts +0 -1
  313. package/src/legacy/components/basic-section/SectionTable/SectionTable.styles.ts +0 -236
  314. package/src/legacy/components/basic-section/SectionTable/SectionTable.tsx +0 -233
  315. package/src/legacy/components/basic-section/SectionTable/index.ts +0 -1
  316. package/src/legacy/components/basic-section/index.ts +0 -5
  317. package/src/legacy/components/buttons/Button/Button.stories.tsx +0 -80
  318. package/src/legacy/components/buttons/Button/Button.styles.ts +0 -99
  319. package/src/legacy/components/buttons/Button/Button.tsx +0 -74
  320. package/src/legacy/components/buttons/Button/index.ts +0 -1
  321. package/src/legacy/components/buttons/IconButton/IconButton.stories.tsx +0 -96
  322. package/src/legacy/components/buttons/IconButton/IconButton.styles.ts +0 -109
  323. package/src/legacy/components/buttons/IconButton/IconButton.tsx +0 -114
  324. package/src/legacy/components/buttons/IconButton/index.ts +0 -1
  325. package/src/legacy/components/buttons/commonStyles.ts +0 -104
  326. package/src/legacy/components/buttons/index.ts +0 -2
  327. package/src/legacy/components/buttons/types.ts +0 -3
  328. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.tsx +0 -22
  329. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.ts +0 -73
  330. package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.tsx +0 -85
  331. package/src/legacy/components/dropdowns/BorderSelect/index.ts +0 -1
  332. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.tsx +0 -147
  333. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.ts +0 -91
  334. package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.tsx +0 -123
  335. package/src/legacy/components/dropdowns/MultiCombobox/index.ts +0 -1
  336. package/src/legacy/components/dropdowns/Select/Select.stories.tsx +0 -54
  337. package/src/legacy/components/dropdowns/Select/Select.styles.ts +0 -73
  338. package/src/legacy/components/dropdowns/Select/Select.tsx +0 -69
  339. package/src/legacy/components/dropdowns/Select/index.ts +0 -1
  340. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.tsx +0 -61
  341. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.ts +0 -56
  342. package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.tsx +0 -103
  343. package/src/legacy/components/dropdowns/SingleCombobox/index.ts +0 -1
  344. package/src/legacy/components/dropdowns/commonStyles.ts +0 -65
  345. package/src/legacy/components/dropdowns/index.ts +0 -4
  346. package/src/legacy/components/dropdowns/types.ts +0 -45
  347. package/src/legacy/components/dropdowns/useCombobox.ts +0 -32
  348. package/src/legacy/components/dropdowns/utils.tsx +0 -25
  349. package/src/legacy/components/inputs/EditableInput/EditableInput.stories.tsx +0 -26
  350. package/src/legacy/components/inputs/EditableInput/EditableInput.styles.ts +0 -21
  351. package/src/legacy/components/inputs/EditableInput/EditableInput.tsx +0 -103
  352. package/src/legacy/components/inputs/EditableInput/index.ts +0 -1
  353. package/src/legacy/components/inputs/NumberInput/NumberInput.stories.tsx +0 -72
  354. package/src/legacy/components/inputs/NumberInput/NumberInput.styles.ts +0 -66
  355. package/src/legacy/components/inputs/NumberInput/NumberInput.tsx +0 -154
  356. package/src/legacy/components/inputs/NumberInput/index.ts +0 -1
  357. package/src/legacy/components/inputs/RadioButtons/RadioButtons.stories.tsx +0 -84
  358. package/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.ts +0 -82
  359. package/src/legacy/components/inputs/RadioButtons/RadioButtons.tsx +0 -63
  360. package/src/legacy/components/inputs/RadioButtons/index.tsx +0 -1
  361. package/src/legacy/components/inputs/RadioGroup/RadioGroup.stories.tsx +0 -66
  362. package/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.ts +0 -11
  363. package/src/legacy/components/inputs/RadioGroup/RadioGroup.tsx +0 -119
  364. package/src/legacy/components/inputs/RadioGroup/index.ts +0 -1
  365. package/src/legacy/components/inputs/SearchInput/SearchInput.stories.tsx +0 -37
  366. package/src/legacy/components/inputs/SearchInput/SearchInput.styles.ts +0 -51
  367. package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +0 -73
  368. package/src/legacy/components/inputs/SearchInput/index.ts +0 -1
  369. package/src/legacy/components/inputs/TextInput/TextInput.stories.tsx +0 -104
  370. package/src/legacy/components/inputs/TextInput/TextInput.styles.ts +0 -74
  371. package/src/legacy/components/inputs/TextInput/TextInput.tsx +0 -116
  372. package/src/legacy/components/inputs/TextInput/index.ts +0 -1
  373. package/src/legacy/components/inputs/index.ts +0 -6
  374. package/src/legacy/components/inputs/inputsCommon.styles.ts +0 -57
  375. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.stories.tsx +0 -22
  376. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.ts +0 -81
  377. package/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.tsx +0 -61
  378. package/src/legacy/components/loading-indicators/LoadingIndicator/index.ts +0 -1
  379. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.stories.tsx +0 -14
  380. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.ts +0 -42
  381. package/src/legacy/components/loading-indicators/LoadingList/LoadingList.tsx +0 -9
  382. package/src/legacy/components/loading-indicators/LoadingList/index.ts +0 -1
  383. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.stories.tsx +0 -18
  384. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.ts +0 -27
  385. package/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.tsx +0 -76
  386. package/src/legacy/components/loading-indicators/PercentageRing/index.ts +0 -1
  387. package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.tsx +0 -16
  388. package/src/legacy/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.tsx +0 -18
  389. package/src/legacy/components/loading-indicators/RandomLoadingMessage/index.ts +0 -1
  390. package/src/legacy/components/loading-indicators/RandomLoadingMessage/random-messages.js +0 -67
  391. package/src/legacy/components/text-truncate/TextTruncate.stories.tsx +0 -19
  392. package/src/legacy/components/text-truncate/TextTruncate.styles.ts +0 -3
  393. package/src/legacy/components/text-truncate/TextTruncate.test.tsx +0 -17
  394. package/src/legacy/components/text-truncate/TextTruncate.tsx +0 -23
  395. package/src/legacy/components/text-truncate/index.ts +0 -1
  396. package/src/legacy/components/user-feedback/Shrug/Shrug.stories.tsx +0 -38
  397. package/src/legacy/components/user-feedback/Shrug/Shrug.styles.ts +0 -25
  398. package/src/legacy/components/user-feedback/Shrug/Shrug.tsx +0 -45
  399. package/src/legacy/components/user-feedback/Shrug/index.ts +0 -1
  400. package/src/legacy/components/user-feedback/index.ts +0 -1
  401. package/src/legacy/styles/globals/buttons.ts +0 -154
  402. package/src/legacy/styles/globals/forms.ts +0 -53
  403. package/src/legacy/styles/globals/index.tsx +0 -22
  404. package/src/legacy/styles/globals/layout.ts +0 -22
  405. package/src/legacy/styles/globals/lists.ts +0 -23
  406. package/src/legacy/styles/globals/margin-padding.ts +0 -33
  407. package/src/legacy/styles/globals/media.ts +0 -13
  408. package/src/legacy/styles/globals/tables.ts +0 -30
  409. package/src/legacy/styles/globals/typography.ts +0 -82
  410. package/src/legacy/styles/globals/utility-classes.ts +0 -76
  411. package/src/legacy/styles/index.ts +0 -1
  412. package/src/legacy/tokens/animation.ts +0 -6
  413. package/src/legacy/tokens/breakpoints.ts +0 -11
  414. package/src/legacy/tokens/colors.ts +0 -293
  415. package/src/legacy/tokens/index.ts +0 -20
  416. package/src/legacy/tokens/margin.ts +0 -5
  417. package/src/legacy/tokens/numbers.js +0 -41
  418. package/src/legacy/tokens/padding.ts +0 -5
  419. package/src/legacy/tokens/spacings.ts +0 -5
  420. package/src/legacy/tokens/typography.ts +0 -43
  421. package/src/legacy/utils/color.ts +0 -139
  422. package/src/legacy/utils/index.ts +0 -5
  423. package/src/legacy/utils/number.ts +0 -29
  424. package/src/legacy/utils/string.ts +0 -87
  425. package/src/styles/assets/fonts/mulish/a.woff2 +0 -0
  426. package/src/styles/assets/fonts/mulish/b.woff2 +0 -0
  427. package/src/styles/assets/fonts/mulish/c.woff2 +0 -0
  428. package/src/styles/assets/fonts/mulish/d.woff2 +0 -0
  429. package/src/styles/assets/fonts/mulish/mulish.css +0 -98
@@ -1,293 +0,0 @@
1
- export const allColors = {
2
- akaroa: '#cbc98f',
3
- alizarin: '#E72326',
4
- amber: '#f4c401',
5
- amethyst: '#8e57b3',
6
- aqua: '#10e4fe',
7
- astralBlue: '#2f7ca2',
8
- ateneoBlue: '#0d466a',
9
- avocado: '#81b12f',
10
- azure: '#108cf7',
11
- baliHai: '#8498b6',
12
- black: '#000',
13
- blueBayoux: '#4f5e74',
14
- blueDarknut: '#0070f5',
15
- blueMagenta: '#542f9d',
16
- blueRibbon: '#0b35ff',
17
- blueYonder: '#586fd2',
18
- bouqet: '#a35c9a',
19
- brick: '#c62828',
20
- brightDusk: '#efebf7',
21
- britishShorthair: '#4b94eb',
22
- brown: '#785349',
23
- candyCorn: '#fcef4d',
24
- carnation: '#ff8adf',
25
- carrot: '#f29a2d',
26
- cerise: '#d52a96',
27
- cerulean: '#008b9e',
28
- chantilly: '#f7b0eb',
29
- charcoal: '#474b4b',
30
- chartreuse: '#34ff01',
31
- clay: '#283243',
32
- clementine: '#F16E00',
33
- cocoaBean: '#5c1200',
34
- comet: '#5a6982',
35
- cornflower: '#2060ff',
36
- crimson: '#e53126',
37
- curiousBlue: '#178ee0',
38
- cyan: '#0cf',
39
- daisyBush: '#431B92',
40
- darkFontColor: '#0d151d',
41
- darkGray: '#333',
42
- darkPurple: '#6f3eae',
43
- darkRed: '#b30000',
44
- defaultFontColor: '#bbbfc5',
45
- dodgerBlue: '#1774ff',
46
- dusty: '#999999',
47
- eagleGreen: '#005557',
48
- ebony: '#101a26',
49
- eggplant: '#7a0074',
50
- electricGreen: '#00ff0a',
51
- emerald: '#09c199',
52
- endeavor: '#0055B9',
53
- espresso: '#5a3627',
54
- fieldPromptError: '#fd9693',
55
- fieldPromptInfo: '#00bfff',
56
- flamingo: '#f861b6',
57
- flirt: '#910870',
58
- forestGreen: '#1f7f1f',
59
- frostedOver: '#DCEAFD',
60
- geraldine: '#fe9486',
61
- grannysmith: '#92e959',
62
- green: '#4caf50',
63
- harlequin: '#20cb00',
64
- harvestGold: '#e6c079',
65
- hawkes: '#DCEAFD',
66
- hemlock: '#626740',
67
- imperial: '#4b0134',
68
- iron: '#d9dee0',
69
- japaneseIndigo: '#264359',
70
- juniper: '#6d9292',
71
- khaki: '#bba44b',
72
- koamaru: '#2f346a',
73
- korma: '#90370e',
74
- lavender: '#B086E3',
75
- lavenderRose: '#fb9fda',
76
- lightGray: '#eee',
77
- lightPurple: '#b43be4',
78
- lilac: '#a195d4',
79
- lincolnGreen: '#254600',
80
- magenta: '#ff15e0',
81
- malibu: '#68C2FB',
82
- mantis: '#4fa83d',
83
- maroon: '#ad3349',
84
- mauve: '#e06cfb',
85
- mediumGray: '#999',
86
- midFontColor: '#8593b3',
87
- mint: '#3ac999',
88
- mirage: '#182432',
89
- mulberry: '#5c0536',
90
- olive: '#807300',
91
- orange: '#ff7200',
92
- orchid: '#ab00ff',
93
- oxfordBlue: '#384558',
94
- pacific: '#00b5b6',
95
- palm: '#1aa511',
96
- persian: '#1717cf',
97
- persianLight: '#0327ce',
98
- pine: '#017074',
99
- pink: '#f74f8a',
100
- pistachio: '#aac609',
101
- raspberry: '#990030',
102
- red: '#f95359',
103
- robinsEggBlue: '#00bcd4',
104
- romanSilver: '#7d888d',
105
- sagatPurple: '#6833d0',
106
- salem: '#03832e',
107
- sapGreen: '#5f7e20',
108
- seaGreen: '#0b8a51',
109
- seance: '#7f1f82',
110
- shiraz: '#c61021',
111
- silverChalice: '#aaaaaa',
112
- sinopia: '#D14200',
113
- slaaneshGrey: '#dbd5e6',
114
- tangerine: '#ff9900',
115
- teal: '#008285',
116
- toast: '#997862',
117
- trueBlue: '#066CC6',
118
- tundora: '#444444',
119
- turquoise: '#00b5b6',
120
- vermilion: '#b95555',
121
- viking: '#59cfe0',
122
- violet: '#3e4eb8',
123
- violetBlue: '#8060d2',
124
- walnut: '#783f00',
125
- white: '#fff',
126
- windsorTan: '#b35c00',
127
- yellow: '#ffca28',
128
- zucchini: '#016422',
129
- get hiliteFontColor() {
130
- return this.white;
131
- },
132
- get lightFontColor() {
133
- return this.lightGray;
134
- },
135
- get borderColor() {
136
- return this.lightGray;
137
- },
138
- get actionColor() {
139
- return this.midFontColor;
140
- },
141
- get backgroundColor() {
142
- return this.mirage;
143
- },
144
- } as const;
145
-
146
- export type ColorName = keyof typeof allColors;
147
-
148
- /**
149
- * Given an array of valid color names, return an array containing their hex values as strings.
150
- */
151
- function returnColorPalette(colorNames: ColorName[]): string[] {
152
- return colorNames.map((name) => allColors[name]);
153
- }
154
-
155
- // Base Colors
156
- export const baseColors = returnColorPalette([
157
- 'curiousBlue',
158
- 'robinsEggBlue',
159
- 'green',
160
- 'yellow',
161
- 'red',
162
- 'white',
163
- 'black',
164
- ]);
165
-
166
- // Layout Colors
167
- export const layoutColors = returnColorPalette([
168
- 'ebony',
169
- 'mirage',
170
- 'clay',
171
- 'oxfordBlue',
172
- 'blueBayoux',
173
- 'comet',
174
- 'baliHai',
175
- ]);
176
-
177
- // Grays
178
- export const grayColors = returnColorPalette(['darkGray', 'mediumGray', 'lightGray', 'iron']);
179
-
180
- // Font Colors
181
- export const fontColors = returnColorPalette([
182
- 'darkFontColor',
183
- 'hiliteFontColor',
184
- 'lightFontColor',
185
- 'defaultFontColor',
186
- 'midFontColor',
187
- ]);
188
-
189
- // Button Palette
190
- export const buttonColors = returnColorPalette([
191
- 'turquoise',
192
- 'violet',
193
- 'emerald',
194
- 'seaGreen',
195
- 'avocado',
196
- 'brick',
197
- 'pink',
198
- 'lightPurple',
199
- 'charcoal',
200
- ]);
201
-
202
- // New Button Palette
203
- export const newButtonColors = returnColorPalette([
204
- 'azure',
205
- 'orchid',
206
- 'tangerine',
207
- 'palm',
208
- 'magenta',
209
- 'blueRibbon',
210
- 'orange',
211
- 'darkRed',
212
- 'amber',
213
- 'lilac',
214
- 'pacific',
215
- 'carnation',
216
- 'brown',
217
- 'khaki',
218
- 'zucchini',
219
- 'eggplant',
220
- //'crimson',
221
- 'cerulean',
222
- 'harlequin',
223
- 'akaroa',
224
- 'persianLight',
225
- 'viking',
226
- 'mauve',
227
- 'espresso',
228
- 'toast',
229
- 'salem',
230
- 'darkPurple',
231
- 'cornflower',
232
- 'grannysmith',
233
- 'lavender',
234
- ]);
235
-
236
- // Visualization Palette
237
- export const vizColors = returnColorPalette([
238
- 'aqua',
239
- 'carrot',
240
- 'flamingo',
241
- 'dodgerBlue',
242
- 'chantilly',
243
- 'crimson',
244
- 'candyCorn',
245
- 'amethyst',
246
- ]);
247
-
248
- export const vizColorsArray = returnColorPalette([
249
- 'aqua',
250
- 'carrot',
251
- 'flamingo',
252
- 'green',
253
- 'dodgerBlue',
254
- 'chantilly',
255
- 'crimson',
256
- 'candyCorn',
257
- 'amethyst',
258
- 'baliHai',
259
- ]);
260
-
261
- // ODL Label Palette
262
- export const fieldColors = returnColorPalette([
263
- 'trueBlue',
264
- 'eggplant',
265
- 'sinopia',
266
- 'forestGreen',
267
- 'cerise',
268
- 'persian',
269
- 'teal',
270
- 'violetBlue',
271
- 'olive',
272
- 'raspberry',
273
- 'eagleGreen',
274
- 'maroon',
275
- 'brown',
276
- 'windsorTan',
277
- 'koamaru',
278
- 'seance',
279
- 'cocoaBean',
280
- 'ateneoBlue',
281
- 'sapGreen',
282
- 'vermilion',
283
- 'blueYonder',
284
- 'korma',
285
- 'hemlock',
286
- 'imperial',
287
- 'astralBlue',
288
- 'shiraz',
289
- 'blueMagenta',
290
- 'flirt',
291
- 'lincolnGreen',
292
- 'bouqet',
293
- ]);
@@ -1,20 +0,0 @@
1
- export { animation as ANIMATION } from './animation';
2
- export { breakpoints as BREAKPOINT, mediaQueries as MEDIA_QUERIES } from './breakpoints';
3
- export { typography as TYPOGRAPHY, fontSize as FONT_SIZE } from './typography';
4
- export { padding as PADDINGS } from './padding';
5
- export { spacings as SPACING } from './spacings';
6
- export { margin as MARGINS } from './margin';
7
- export { MATH } from './numbers';
8
-
9
- export {
10
- allColors as COLORS,
11
- baseColors as BASE_COLORS,
12
- fieldColors as FIELD_COLORS,
13
- layoutColors as LAYOUT_COLORS,
14
- grayColors as GRAY_COLORS,
15
- fontColors as FONT_COLORS,
16
- buttonColors as BUTTON_COLORS,
17
- newButtonColors as NEW_BUTTON_COLORS,
18
- vizColors as VIZ_COLORS,
19
- vizColorsArray as VIZ_COLORS_ARRAY,
20
- } from './colors';
@@ -1,5 +0,0 @@
1
- export const margin = {
2
- // todo -- get with mike L for other padding values as they become needed. Ideally we should create a formula.
3
- sm: '15px',
4
- md: '20px',
5
- } as const;
@@ -1,41 +0,0 @@
1
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor
2
-
3
- export const decimalAdjust = (type, value, exp) => {
4
- // If the exp is undefined or zero...
5
- if (typeof exp === 'undefined' || +exp === 0) {
6
- return Math[type](value);
7
- }
8
- value = +value;
9
- exp = +exp;
10
- // If the value is not a number or the exp is not an integer...
11
- if (isNaN(value) || !(typeof exp === 'number' && exp % 1 === 0)) {
12
- return NaN;
13
- }
14
- // Shift
15
- value = value.toString().split('e');
16
- value = Math[type](+(value[0] + 'e' + (value[1] ? +value[1] - exp : -exp)));
17
- // Shift back
18
- value = value.toString().split('e');
19
- return +(value[0] + 'e' + (value[1] ? +value[1] + exp : exp));
20
- };
21
-
22
- export const round10 = (value, exp) => {
23
- return decimalAdjust('round', value, exp);
24
- };
25
-
26
- export const clamp = (value, min, max) => {
27
- value = value < min ? min : value;
28
- value = value > max ? max : value;
29
- return value;
30
- };
31
-
32
- export const numberWithCommas = (x) => {
33
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
34
- };
35
-
36
- export const MATH = {
37
- decimalAdjust,
38
- round10,
39
- clamp,
40
- numberWithCommas,
41
- };
@@ -1,5 +0,0 @@
1
- export const padding = {
2
- // todo -- get with mike L for other padding values as they become needed. Ideally we should create a formula.
3
- sm: '15px',
4
- md: '20px',
5
- } as const;
@@ -1,5 +0,0 @@
1
- export const spacings = {
2
- xs: '8px',
3
- sm: '12px',
4
- md: '24px',
5
- } as const;
@@ -1,43 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- export const fontStack = ['Noto Sans', 'Avenir Next', 'Avenir', 'Noto', 'sans-serif'] as const;
4
-
5
- export const fontFamily = {
6
- base: fontStack.join(','),
7
- heading: fontStack.join(','),
8
- };
9
-
10
- export const fontSize = {
11
- caption: '12px',
12
- base: '14px',
13
- subheadSmall: '16px',
14
- subheadLarge: '18px',
15
- subheadXl: '22px',
16
- display: '30px',
17
- } as const;
18
-
19
- export const lineHeight = {
20
- base: 1.25,
21
- heading: 1.2,
22
- } as const;
23
-
24
- export const spacing = {
25
- base: `${lineHeight.base}em`,
26
- half: `${lineHeight.base / 2}em`,
27
- quarter: `${lineHeight.base / 4}em`,
28
- third: `${lineHeight.base / 3}em`,
29
- };
30
-
31
- export const weight = {
32
- light: 300,
33
- regular: 400,
34
- semibold: 500,
35
- bold: 600,
36
- };
37
- export const ellipsis = css`
38
- overflow: hidden;
39
- white-space: nowrap;
40
- text-overflow: ellipsis;
41
- `;
42
-
43
- export const typography = { fontFamily, fontSize, lineHeight, spacing, ellipsis, weight };
@@ -1,139 +0,0 @@
1
- export const mix = function (color_1: string, color_2: string, weight: number): string {
2
- function d2h(d: number) {
3
- return d.toString(16);
4
- } // convert a decimal value to hex
5
- function h2d(h: string) {
6
- return parseInt(h, 16);
7
- } // convert a hex value to decimal
8
- function s2l(hex: string) {
9
- return `${hex}${hex}`;
10
- }
11
-
12
- weight = typeof weight !== 'undefined' ? weight : 50; // set the weight to 50%, if that argument is omitted
13
- color_1 = color_1.replace(/#/g, '');
14
- color_2 = color_2.replace(/#/g, '');
15
-
16
- // check if colors are shorthand or longhand - covert to longhand
17
- color_1 = color_1.length === 3 ? s2l(color_1) : color_1;
18
- color_2 = color_2.length === 3 ? s2l(color_2) : color_2;
19
-
20
- let color = '#';
21
-
22
- for (let i = 0; i <= 5; i += 2) {
23
- // loop through each of the 3 hex pairs—red, green, and blue
24
- const v1 = h2d(color_1.substr(i, 2)); // extract the current pairs
25
- const v2 = h2d(color_2.substr(i, 2));
26
- // combine the current pairs from each source color, according to the specified weight
27
- let val = d2h(Math.floor(v2 + (v1 - v2) * (weight / 100.0)));
28
-
29
- while (val.length < 2) {
30
- val = '0' + val;
31
- } // prepend a '0' if val results in a single digit
32
-
33
- color += val; // concatenate val to our new color string
34
- }
35
-
36
- return color; // PROFIT!
37
- };
38
-
39
- export const shade = (color: string, percentage: number): string => {
40
- return mix('#000000', color, percentage);
41
- };
42
-
43
- export const tint = (color: string, percentage: number): string => {
44
- return mix('#ffffff', color, percentage);
45
- };
46
-
47
- /**
48
- * Converts hex color values to rgb or rgba values if a opacity is supplied
49
- * @param hex
50
- * @returns {*}
51
- */
52
- export const hexToRgb = (hex: string, opacity?: number): string | undefined => {
53
- // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
54
- const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
55
- hex = hex.replace(shorthandRegex, function (m, r, g, b) {
56
- return r + r + g + g + b + b;
57
- });
58
-
59
- const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
60
- if (result && opacity) {
61
- return `rgba(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(
62
- result[3],
63
- 16,
64
- )}, ${opacity})`;
65
- } else if (result) {
66
- return `rgb(${parseInt(result[1], 16)}, ${parseInt(result[2], 16)}, ${parseInt(
67
- result[3],
68
- 16,
69
- )})`;
70
- }
71
- return undefined;
72
- };
73
-
74
- /**
75
- * Takes a 3- or 6-character hex color value, and returns an object containing
76
- * its equivalent HSL values.
77
- *
78
- * @see {@link https://css-tricks.com/converting-color-spaces-in-javascript/}
79
- * @see {@link https://gist.github.com/mjackson/5311256}
80
- */
81
- export function hexToHsl(hexColor: string): { hue: number; saturation: number; lightness: number } {
82
- // convert to 6-character hex string, if necessary
83
- const fullHexColor = (() => {
84
- if (hexColor.length === 4) {
85
- return (
86
- '#' +
87
- hexColor
88
- .replace('#', '')
89
- .split('')
90
- .reduce((acc, char) => (acc += char + char), '')
91
- );
92
- }
93
-
94
- return hexColor;
95
- })();
96
-
97
- const rgbValues = {
98
- red: parseInt(fullHexColor.slice(1, 3), 16) / 255,
99
- green: parseInt(fullHexColor.slice(3, 5), 16) / 255,
100
- blue: parseInt(fullHexColor.slice(-2), 16) / 255,
101
- };
102
-
103
- const allValues = Object.values(rgbValues);
104
-
105
- const channelMax = Math.max(...allValues);
106
- const channelMin = Math.min(...allValues);
107
- const channelDelta = channelMax - channelMin;
108
-
109
- const hslValues = {
110
- hue: 0,
111
- saturation: 0,
112
- lightness: (channelMax + channelMin) / 2,
113
- };
114
-
115
- if (channelDelta !== 0) {
116
- // calculate hue
117
- if (channelMax === rgbValues.red) {
118
- hslValues.hue = ((rgbValues.green - rgbValues.blue) / channelDelta) % 6;
119
- } else if (channelMax === rgbValues.green) {
120
- hslValues.hue = (rgbValues.blue - rgbValues.red) / channelDelta + 2;
121
- } else {
122
- hslValues.hue = (rgbValues.red - rgbValues.green) / channelDelta + 4;
123
- }
124
-
125
- // calculate saturation
126
- hslValues.saturation = channelDelta / (1 - Math.abs(2 * hslValues.lightness - 1));
127
- }
128
-
129
- hslValues.hue = Math.round(hslValues.hue * 60);
130
- hslValues.saturation = +(hslValues.saturation * 100).toFixed(0);
131
- hslValues.lightness = +(hslValues.lightness * 100).toFixed(0);
132
-
133
- // make negative hues positive
134
- if (hslValues.hue < 0) {
135
- hslValues.hue += 360;
136
- }
137
-
138
- return hslValues;
139
- }
@@ -1,5 +0,0 @@
1
- import * as colorUtils from './color';
2
- import * as stringUtils from './string';
3
- import * as numberUtils from './number';
4
-
5
- export { colorUtils, stringUtils, numberUtils };
@@ -1,29 +0,0 @@
1
- /**
2
- * Takes a number and formats it nicely.
3
- *
4
- * @example numberWithCommas(12345)
5
- * // returns 12,345
6
- */
7
- export function numberWithCommas(value: number): string {
8
- return new Intl.NumberFormat(navigator.language || 'en-US').format(value);
9
- }
10
-
11
- /**
12
- * Takes a number and returns it, rounded up to the maximum decimal places specified.
13
- *
14
- * @example maxDecimalPlaces(0.1694915254237288, 2)
15
- * // returns 0.17
16
- *
17
- * @example maxDecimalPlaces(0.1694915254237288, 3)
18
- * // returns 0.169
19
- *
20
- * @example maxDecimalPlaces(12.902, 2)
21
- * // returns 12.9
22
- */
23
- export function maxDecimalPlaces(value: number, decimalPlaces: number): number {
24
- return +value.toFixed(decimalPlaces);
25
- }
26
-
27
- export function formatConfidence(confidence: number): number {
28
- return Math.min(Math.floor(confidence * 100), 99);
29
- }
@@ -1,87 +0,0 @@
1
- export const camelCaseToUpperUnderscore = (string: string) => {
2
- return string
3
- .replace(/([A-Z])/g, function ($1) {
4
- return '_' + $1;
5
- })
6
- .toUpperCase();
7
- };
8
-
9
- export const camelCaseToSpaceUpper = (string: string) => {
10
- return (
11
- string
12
- // insert a space before all caps
13
- .replace(/([A-Z])/g, ' $1')
14
- // uppercase the first character
15
- .replace(/^./, function (str) {
16
- return str.toUpperCase();
17
- })
18
- );
19
- };
20
-
21
- export const underscoreToCapitalize = (string: string) => {
22
- return (
23
- string
24
- // replace all _ with spaces
25
- .replace(/_/g, ' ')
26
- // uppercase the first character
27
- .replace(/^./, function (str) {
28
- return str.toUpperCase();
29
- })
30
- );
31
- };
32
-
33
- export const snakeCaseToCamelCase = (string: string) => {
34
- const parts = string.split('_').map((part, i) => {
35
- if (i > 0) {
36
- return part.replace(/^./, function (str) {
37
- return str.toUpperCase();
38
- });
39
- } else {
40
- return part;
41
- }
42
- });
43
-
44
- return parts.join().replace(/,/g, '');
45
- };
46
-
47
- export function capitalize(string: string): string {
48
- if (typeof string !== 'string') return '';
49
-
50
- return string.slice(0, 1).toUpperCase() + string.slice(1).toLowerCase();
51
- }
52
-
53
- export function capitalizeFirstOnly(string: string): string {
54
- if (typeof string !== 'string') return '';
55
-
56
- return string.slice(0, 1).toUpperCase() + string.slice(1);
57
- }
58
-
59
- /**
60
- * Generates a random string of English alphabet characters. Defaults to a length of 8.
61
- */
62
- export function createRandomString(length?: number): string {
63
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
64
- let result = '';
65
-
66
- for (let i = 0; i < (length || 8); i++) {
67
- result += chars.charAt(Math.floor(Math.random() * chars.length));
68
- }
69
-
70
- return result;
71
- }
72
-
73
- export const maxLengthWithEllipse = (string: string, maxLength: number) => {
74
- if (string.length <= maxLength) {
75
- return string;
76
- } else {
77
- return string.slice(0, maxLength - 2).concat('...');
78
- }
79
- };
80
-
81
- export const maxLengthWithMiddleEllipsis = (string: string, maxLength: number): string => {
82
- const frontSegment = string.slice(0, Math.floor(maxLength / 2) - 2);
83
- const endSegmentLength = string.length - (Math.floor(maxLength / 2) - 1);
84
- const endSegment = string.slice(endSegmentLength, string.length);
85
-
86
- return string.length <= maxLength ? string : `${frontSegment}...${endSegment}`;
87
- };