@mindlogic-ai/logician-ui 2.0.0-alpha.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 (432) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +234 -0
  3. package/USAGE.md +299 -0
  4. package/dist/Markdown-2D5K42BY.js +16 -0
  5. package/dist/Markdown-2D5K42BY.js.map +1 -0
  6. package/dist/Markdown-AZBXO5ZP.css +29 -0
  7. package/dist/Markdown-AZBXO5ZP.css.map +1 -0
  8. package/dist/Markdown-RJJEQN4R.mjs +3 -0
  9. package/dist/Markdown-RJJEQN4R.mjs.map +1 -0
  10. package/dist/analytics-GNSHP7X3.svg +1 -0
  11. package/dist/bulb-24SQINQB.svg +1 -0
  12. package/dist/chat-TLRFEUAS.svg +1 -0
  13. package/dist/chunk-5FHXD7KR.js +1735 -0
  14. package/dist/chunk-5FHXD7KR.js.map +1 -0
  15. package/dist/chunk-WSOHBA2C.mjs +1693 -0
  16. package/dist/chunk-WSOHBA2C.mjs.map +1 -0
  17. package/dist/edit-RWL72JNM.svg +1 -0
  18. package/dist/face-55KPDCH4.svg +1 -0
  19. package/dist/filled-analytics-RBC7KWND.svg +1 -0
  20. package/dist/filled-bulb-RC7E2WSM.svg +1 -0
  21. package/dist/filled-chat-A6J44Q7A.svg +1 -0
  22. package/dist/filled-edit-NKKWFSTW.svg +1 -0
  23. package/dist/filled-face-UML5C3LB.svg +1 -0
  24. package/dist/filled-layout-HBVCSDFO.svg +1 -0
  25. package/dist/index.css +51 -0
  26. package/dist/index.css.map +1 -0
  27. package/dist/index.d.mts +964 -0
  28. package/dist/index.d.ts +964 -0
  29. package/dist/index.js +5600 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/index.mjs +5401 -0
  32. package/dist/index.mjs.map +1 -0
  33. package/dist/language-VBJ24OPV.svg +1 -0
  34. package/dist/layout-NDDSWNNV.svg +1 -0
  35. package/dist/pending-NF7NSBYO.svg +1 -0
  36. package/dist/receipt-MNLQIFCO.svg +1 -0
  37. package/dist/sparkles-EOEGVL6G.svg +1 -0
  38. package/dist/store-3RQPBJWG.svg +1 -0
  39. package/dist/store_active-SAOAGVKC.svg +1 -0
  40. package/dist/studio-LYPUIEFA.svg +1 -0
  41. package/dist/studio_active-BC6O66OI.svg +1 -0
  42. package/dist/vertical-ellipsis-3G4WEOCW.svg +1 -0
  43. package/package.json +138 -0
  44. package/src/components/Accordion/Accordion.stories.tsx +41 -0
  45. package/src/components/Accordion/Accordion.tsx +14 -0
  46. package/src/components/Accordion/AccordionButton.tsx +40 -0
  47. package/src/components/Accordion/AccordionItem.tsx +17 -0
  48. package/src/components/Accordion/index.ts +4 -0
  49. package/src/components/Alert/Alert.stories.tsx +38 -0
  50. package/src/components/Alert/Alert.styles.ts +19 -0
  51. package/src/components/Alert/Alert.tsx +41 -0
  52. package/src/components/Alert/Alert.types.ts +5 -0
  53. package/src/components/Alert/index.ts +1 -0
  54. package/src/components/AutowidthInput/AutowidthInput.stories.tsx +23 -0
  55. package/src/components/AutowidthInput/AutowidthInput.tsx +47 -0
  56. package/src/components/AutowidthInput/index.ts +1 -0
  57. package/src/components/Avatar/Avatar.stories.tsx +23 -0
  58. package/src/components/Avatar/Avatar.tsx +19 -0
  59. package/src/components/Avatar/index.tsx +1 -0
  60. package/src/components/Badge/Badge.stories.tsx +23 -0
  61. package/src/components/Badge/Badge.styles.ts +11 -0
  62. package/src/components/Badge/Badge.tsx +26 -0
  63. package/src/components/Badge/index.ts +2 -0
  64. package/src/components/Banner/Banner.stories.tsx +37 -0
  65. package/src/components/Banner/Banner.styles.ts +79 -0
  66. package/src/components/Banner/Banner.tsx +68 -0
  67. package/src/components/Banner/Banner.types.ts +6 -0
  68. package/src/components/Banner/index.ts +2 -0
  69. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +14 -0
  70. package/src/components/Breadcrumb/Breadcrumb.tsx +19 -0
  71. package/src/components/Breadcrumb/Breadcrumb.types.ts +3 -0
  72. package/src/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.tsx +12 -0
  73. package/src/components/Breadcrumb/BreadcrumbItem/BreadcrumbItem.types.ts +3 -0
  74. package/src/components/Breadcrumb/BreadcrumbItem/index.ts +2 -0
  75. package/src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.tsx +30 -0
  76. package/src/components/Breadcrumb/BreadcrumbLink/BreadcrumbLink.types.ts +3 -0
  77. package/src/components/Breadcrumb/BreadcrumbLink/index.ts +2 -0
  78. package/src/components/Breadcrumb/index.ts +3 -0
  79. package/src/components/Button/Button.stories.tsx +52 -0
  80. package/src/components/Button/Button.styles.ts +59 -0
  81. package/src/components/Button/Button.tsx +43 -0
  82. package/src/components/Button/Button.types.ts +13 -0
  83. package/src/components/Button/index.tsx +3 -0
  84. package/src/components/Card/Card.stories.tsx +24 -0
  85. package/src/components/Card/Card.styles.ts +30 -0
  86. package/src/components/Card/Card.tsx +29 -0
  87. package/src/components/Card/Card.types.ts +8 -0
  88. package/src/components/Card/index.ts +2 -0
  89. package/src/components/Carousel/Carousel.stories.tsx +159 -0
  90. package/src/components/Carousel/Carousel.tsx +160 -0
  91. package/src/components/Carousel/Carousel.types.ts +22 -0
  92. package/src/components/Carousel/index.ts +1 -0
  93. package/src/components/CarouselModal/CarouselModal.stories.tsx +53 -0
  94. package/src/components/CarouselModal/CarouselModal.tsx +106 -0
  95. package/src/components/CarouselModal/CarouselModal.types.ts +16 -0
  96. package/src/components/CarouselModal/index.ts +2 -0
  97. package/src/components/Checkbox/Checkbox.stories.tsx +16 -0
  98. package/src/components/Checkbox/Checkbox.tsx +29 -0
  99. package/src/components/Checkbox/Checkbox.types.ts +3 -0
  100. package/src/components/Checkbox/index.ts +2 -0
  101. package/src/components/Chip/Chip.stories.tsx +44 -0
  102. package/src/components/Chip/Chip.styles.ts +114 -0
  103. package/src/components/Chip/Chip.tsx +23 -0
  104. package/src/components/Chip/Chip.types.ts +14 -0
  105. package/src/components/Chip/index.ts +2 -0
  106. package/src/components/ChipButton/Chip.types.ts +4 -0
  107. package/src/components/ChipButton/ChipButton.tsx +25 -0
  108. package/src/components/ChipButton/index.ts +1 -0
  109. package/src/components/Code/Code.stories.tsx +28 -0
  110. package/src/components/Code/Code.tsx +160 -0
  111. package/src/components/Code/Code.types.ts +40 -0
  112. package/src/components/Code/_components/CopyButton.tsx +48 -0
  113. package/src/components/Code/index.ts +1 -0
  114. package/src/components/CodeTabs/CodeTabs.stories.tsx +51 -0
  115. package/src/components/CodeTabs/CodeTabs.tsx +98 -0
  116. package/src/components/CodeTabs/CodeTabs.types.ts +17 -0
  117. package/src/components/CodeTabs/index.ts +1 -0
  118. package/src/components/Container/Container.stories.tsx +28 -0
  119. package/src/components/Container/Container.tsx +21 -0
  120. package/src/components/Container/index.ts +1 -0
  121. package/src/components/Container/useContainerSize.ts +47 -0
  122. package/src/components/CopyableCode/CopyableCode.stories.tsx +26 -0
  123. package/src/components/CopyableCode/CopyableCode.tsx +58 -0
  124. package/src/components/CopyableCode/CopyableCode.types.ts +7 -0
  125. package/src/components/CopyableCode/index.ts +2 -0
  126. package/src/components/CrossPageToasts/CrossPageToasts.tsx +33 -0
  127. package/src/components/CrossPageToasts/index.ts +1 -0
  128. package/src/components/DataField/DataField.stories.tsx +61 -0
  129. package/src/components/DataField/DataField.styles.ts +33 -0
  130. package/src/components/DataField/DataField.tsx +141 -0
  131. package/src/components/DataField/DataField.types.ts +18 -0
  132. package/src/components/DataField/index.ts +1 -0
  133. package/src/components/DatePicker/RangeDatePicker.stories.tsx +45 -0
  134. package/src/components/DatePicker/RangeDatePicker.tsx +74 -0
  135. package/src/components/DatePicker/SingleDatePicker.stories.tsx +31 -0
  136. package/src/components/DatePicker/SingleDatePicker.tsx +72 -0
  137. package/src/components/DatePicker/index.ts +2 -0
  138. package/src/components/FileInput/FileInput.stories.tsx +28 -0
  139. package/src/components/FileInput/FileInput.tsx +117 -0
  140. package/src/components/FileInput/FileInput.types.ts +14 -0
  141. package/src/components/FileInput/index.ts +2 -0
  142. package/src/components/FileItem/FileItem.stories.tsx +27 -0
  143. package/src/components/FileItem/FileItem.tsx +134 -0
  144. package/src/components/FileItem/FileItem.types.ts +11 -0
  145. package/src/components/FileItem/index.ts +1 -0
  146. package/src/components/FileList/FileList.stories.tsx +65 -0
  147. package/src/components/FileList/FileList.tsx +97 -0
  148. package/src/components/FileList/FileList.types.ts +18 -0
  149. package/src/components/FileList/index.tsx +1 -0
  150. package/src/components/FormControl/FormControl.stories.tsx +16 -0
  151. package/src/components/FormControl/FormControl.tsx +12 -0
  152. package/src/components/FormControl/FormControl.types.ts +3 -0
  153. package/src/components/FormControl/index.ts +2 -0
  154. package/src/components/FormLabel/FormLabel.tsx +5 -0
  155. package/src/components/FormLabel/index.ts +1 -0
  156. package/src/components/GuideCue/GuideCue.stories.tsx +57 -0
  157. package/src/components/GuideCue/GuideCue.tsx +231 -0
  158. package/src/components/GuideCue/GuideCueContext.tsx +70 -0
  159. package/src/components/GuideCue/index.ts +2 -0
  160. package/src/components/Icon/Icon.stories.tsx +77 -0
  161. package/src/components/Icon/Icon.styles.ts +6 -0
  162. package/src/components/Icon/Icon.tsx +73 -0
  163. package/src/components/Icon/Icon.types.ts +10 -0
  164. package/src/components/Icon/IconMap.ts +290 -0
  165. package/src/components/Icon/icons/analytics.svg +1 -0
  166. package/src/components/Icon/icons/bulb.svg +1 -0
  167. package/src/components/Icon/icons/chat.svg +1 -0
  168. package/src/components/Icon/icons/edit.svg +1 -0
  169. package/src/components/Icon/icons/face.svg +1 -0
  170. package/src/components/Icon/icons/filled-analytics.svg +1 -0
  171. package/src/components/Icon/icons/filled-bulb.svg +1 -0
  172. package/src/components/Icon/icons/filled-chat.svg +1 -0
  173. package/src/components/Icon/icons/filled-edit.svg +1 -0
  174. package/src/components/Icon/icons/filled-face.svg +1 -0
  175. package/src/components/Icon/icons/filled-layout.svg +1 -0
  176. package/src/components/Icon/icons/language.svg +1 -0
  177. package/src/components/Icon/icons/layout.svg +1 -0
  178. package/src/components/Icon/icons/pending.svg +1 -0
  179. package/src/components/Icon/icons/receipt.svg +1 -0
  180. package/src/components/Icon/icons/sparkles.svg +1 -0
  181. package/src/components/Icon/icons/store.svg +1 -0
  182. package/src/components/Icon/icons/store_active.svg +1 -0
  183. package/src/components/Icon/icons/studio.svg +1 -0
  184. package/src/components/Icon/icons/studio_active.svg +1 -0
  185. package/src/components/Icon/icons/vertical-ellipsis.svg +1 -0
  186. package/src/components/Icon/index.tsx +3 -0
  187. package/src/components/IconButton/IconButton.stories.tsx +51 -0
  188. package/src/components/IconButton/IconButton.styles.ts +52 -0
  189. package/src/components/IconButton/IconButton.tsx +36 -0
  190. package/src/components/IconButton/IconButton.types.ts +12 -0
  191. package/src/components/IconButton/index.tsx +1 -0
  192. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +25 -0
  193. package/src/components/InfoSprinkle/InfoSprinkle.tsx +48 -0
  194. package/src/components/InfoSprinkle/index.ts +1 -0
  195. package/src/components/InlineCode/InlineCode.tsx +18 -0
  196. package/src/components/InlineCode/index.ts +1 -0
  197. package/src/components/Input/Input.stories.tsx +55 -0
  198. package/src/components/Input/Input.tsx +358 -0
  199. package/src/components/Input/Input.types.ts +19 -0
  200. package/src/components/Input/index.tsx +2 -0
  201. package/src/components/LineGraph/LineGraph.stories.tsx +98 -0
  202. package/src/components/LineGraph/LineGraph.tsx +88 -0
  203. package/src/components/LineGraph/LineGraph.types.ts +41 -0
  204. package/src/components/LineGraph/index.ts +1 -0
  205. package/src/components/Link/Link.styles.ts +13 -0
  206. package/src/components/Link/Link.tsx +93 -0
  207. package/src/components/Link/index.ts +1 -0
  208. package/src/components/Loaders/PageLoader.stories.tsx +29 -0
  209. package/src/components/Loaders/PageLoader.tsx +30 -0
  210. package/src/components/Loaders/SectionLoader.stories.tsx +26 -0
  211. package/src/components/Loaders/SectionLoader.tsx +30 -0
  212. package/src/components/Loaders/index.ts +1 -0
  213. package/src/components/MDXEditor/MDXEditor.css +21 -0
  214. package/src/components/MDXEditor/MDXEditor.stories.tsx +45 -0
  215. package/src/components/MDXEditor/MDXEditor.tsx +189 -0
  216. package/src/components/MDXEditor/MDXEditor.types.ts +6 -0
  217. package/src/components/MDXEditor/index.ts +1 -0
  218. package/src/components/Markdown/Markdown.module.css +30 -0
  219. package/src/components/Markdown/Markdown.tsx +133 -0
  220. package/src/components/Markdown/Markdown.types.ts +5 -0
  221. package/src/components/Markdown/index.ts +2 -0
  222. package/src/components/Masonry/Masonry.stories.tsx +288 -0
  223. package/src/components/Masonry/Masonry.tsx +187 -0
  224. package/src/components/Masonry/Masonry.types.ts +18 -0
  225. package/src/components/Masonry/index.ts +2 -0
  226. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +26 -0
  227. package/src/components/MaxLengthIndicator/MaxLengthIndicator.tsx +25 -0
  228. package/src/components/MaxLengthIndicator/index.tsx +1 -0
  229. package/src/components/Menu/Menu.stories.tsx +186 -0
  230. package/src/components/Menu/MenuButton.tsx +8 -0
  231. package/src/components/Menu/MenuButton.types.ts +23 -0
  232. package/src/components/Menu/MenuItem.tsx +35 -0
  233. package/src/components/Menu/MenuItem.types.ts +13 -0
  234. package/src/components/Menu/MenuList.tsx +19 -0
  235. package/src/components/Menu/index.ts +7 -0
  236. package/src/components/Modal/Modal.stories.tsx +83 -0
  237. package/src/components/Modal/Modal.styles.ts +14 -0
  238. package/src/components/Modal/Modal.tsx +14 -0
  239. package/src/components/Modal/Modal.types.ts +3 -0
  240. package/src/components/Modal/ModalBody.tsx +9 -0
  241. package/src/components/Modal/ModalCloseButton.tsx +18 -0
  242. package/src/components/Modal/ModalContent/ModalContent.tsx +8 -0
  243. package/src/components/Modal/ModalContent/ModalContent.types.ts +3 -0
  244. package/src/components/Modal/ModalContent/index.ts +1 -0
  245. package/src/components/Modal/ModalFooter/ModalFooter.module.css +3 -0
  246. package/src/components/Modal/ModalFooter/ModalFooter.tsx +20 -0
  247. package/src/components/Modal/ModalFooter/index.ts +1 -0
  248. package/src/components/Modal/ModalHeader.tsx +9 -0
  249. package/src/components/Modal/ModalOverlay.tsx +9 -0
  250. package/src/components/Modal/index.tsx +8 -0
  251. package/src/components/MonthRangePicker/MonthButton/MonthButton.tsx +105 -0
  252. package/src/components/MonthRangePicker/MonthButton/MonthButton.types.ts +42 -0
  253. package/src/components/MonthRangePicker/MonthButton/index.ts +2 -0
  254. package/src/components/MonthRangePicker/MonthRangePicker.stories.tsx +164 -0
  255. package/src/components/MonthRangePicker/MonthRangePicker.tsx +274 -0
  256. package/src/components/MonthRangePicker/MonthRangePicker.types.ts +38 -0
  257. package/src/components/MonthRangePicker/_utils/hasEnabledMonthsInYear.ts +15 -0
  258. package/src/components/MonthRangePicker/_utils/index.ts +6 -0
  259. package/src/components/MonthRangePicker/_utils/isMonthDisabled.ts +20 -0
  260. package/src/components/MonthRangePicker/_utils/isMonthInPreviewRange.ts +32 -0
  261. package/src/components/MonthRangePicker/_utils/isMonthInRange.ts +17 -0
  262. package/src/components/MonthRangePicker/_utils/isMonthSelected.ts +19 -0
  263. package/src/components/MonthRangePicker/_utils/isSelectionStart.ts +12 -0
  264. package/src/components/MonthRangePicker/constants.ts +63 -0
  265. package/src/components/MonthRangePicker/index.ts +2 -0
  266. package/src/components/Pagination/Pagination.stories.tsx +51 -0
  267. package/src/components/Pagination/Pagination.tsx +150 -0
  268. package/src/components/Pagination/Pagination.types.ts +12 -0
  269. package/src/components/Pagination/index.tsx +1 -0
  270. package/src/components/PasswordInput/PasswordInput.stories.tsx +16 -0
  271. package/src/components/PasswordInput/PasswordInput.tsx +42 -0
  272. package/src/components/PasswordInput/PasswordInput.types.ts +11 -0
  273. package/src/components/PasswordInput/index.ts +1 -0
  274. package/src/components/PinInput/PinInput.stories.tsx +26 -0
  275. package/src/components/PinInput/PinInput.tsx +53 -0
  276. package/src/components/PinInput/PinInput.types.ts +27 -0
  277. package/src/components/PinInput/index.tsx +2 -0
  278. package/src/components/ProgressBar/ProgressBar.stories.tsx +18 -0
  279. package/src/components/ProgressBar/ProgressBar.styles.ts +4 -0
  280. package/src/components/ProgressBar/ProgressBar.tsx +27 -0
  281. package/src/components/ProgressBar/ProgressBar.types.ts +4 -0
  282. package/src/components/ProgressBar/index.ts +1 -0
  283. package/src/components/RadialProgress/RadialProgress.stories.tsx +272 -0
  284. package/src/components/RadialProgress/RadialProgress.tsx +232 -0
  285. package/src/components/RadialProgress/RadialProgress.types.ts +27 -0
  286. package/src/components/RadialProgress/index.ts +2 -0
  287. package/src/components/Radio/Radio.stories.tsx +226 -0
  288. package/src/components/Radio/Radio.tsx +35 -0
  289. package/src/components/Radio/Radio.types.ts +21 -0
  290. package/src/components/Radio/RadioGroup.tsx +26 -0
  291. package/src/components/Radio/index.ts +3 -0
  292. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +48 -0
  293. package/src/components/SeeMoreButton/SeeMoreButton.styles.ts +11 -0
  294. package/src/components/SeeMoreButton/SeeMoreButton.tsx +34 -0
  295. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +6 -0
  296. package/src/components/SeeMoreButton/index.tsx +1 -0
  297. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +96 -0
  298. package/src/components/SegmentedControl/SegmentedControl.styles.ts +28 -0
  299. package/src/components/SegmentedControl/SegmentedControl.tsx +89 -0
  300. package/src/components/SegmentedControl/SegmentedControl.types.ts +15 -0
  301. package/src/components/SegmentedControl/index.ts +2 -0
  302. package/src/components/SegmentedProgressBar/ProgressSegment.tsx +18 -0
  303. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +228 -0
  304. package/src/components/SegmentedProgressBar/SegmentedProgressBar.tsx +25 -0
  305. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +11 -0
  306. package/src/components/SegmentedProgressBar/SegmentedProgressBarContext.tsx +24 -0
  307. package/src/components/SegmentedProgressBar/index.ts +3 -0
  308. package/src/components/Select/MenuList/MenuList.tsx +87 -0
  309. package/src/components/Select/MenuList/MenuList.types.ts +21 -0
  310. package/src/components/Select/MenuList/VirtualizedMenuList.tsx +140 -0
  311. package/src/components/Select/MenuList/VirtualizedMenuListContext.tsx +35 -0
  312. package/src/components/Select/MenuList/index.ts +3 -0
  313. package/src/components/Select/Select.stories.tsx +70 -0
  314. package/src/components/Select/Select.styles.ts +102 -0
  315. package/src/components/Select/Select.tsx +204 -0
  316. package/src/components/Select/Select.types.ts +18 -0
  317. package/src/components/Select/_utils/resolveStyle.ts +21 -0
  318. package/src/components/Select/index.ts +1 -0
  319. package/src/components/Slider/Slider.stories.tsx +75 -0
  320. package/src/components/Slider/Slider.tsx +12 -0
  321. package/src/components/Slider/Slider.types.ts +3 -0
  322. package/src/components/Slider/SliderFilledTrack/SliderFilledTrack.tsx +14 -0
  323. package/src/components/Slider/SliderFilledTrack/SliderFilledTrack.types.ts +3 -0
  324. package/src/components/Slider/SliderFilledTrack/index.ts +2 -0
  325. package/src/components/Slider/SliderMark/SliderMark.tsx +12 -0
  326. package/src/components/Slider/SliderMark/SliderMark.types.ts +3 -0
  327. package/src/components/Slider/SliderMark/index.ts +2 -0
  328. package/src/components/Slider/SliderThumb/SliderThumb.tsx +22 -0
  329. package/src/components/Slider/SliderThumb/SliderThumb.types.ts +3 -0
  330. package/src/components/Slider/SliderThumb/index.ts +2 -0
  331. package/src/components/Slider/SliderTrack/SliderTrack.tsx +12 -0
  332. package/src/components/Slider/SliderTrack/SliderTrack.types.ts +3 -0
  333. package/src/components/Slider/SliderTrack/index.ts +2 -0
  334. package/src/components/Slider/index.ts +5 -0
  335. package/src/components/Spinner/Spinner.stories.tsx +16 -0
  336. package/src/components/Spinner/Spinner.tsx +20 -0
  337. package/src/components/Spinner/Spinner.types.ts +3 -0
  338. package/src/components/Spinner/index.ts +2 -0
  339. package/src/components/Switch/Switch.stories.tsx +63 -0
  340. package/src/components/Switch/Switch.tsx +8 -0
  341. package/src/components/Switch/index.ts +1 -0
  342. package/src/components/Table/ExpandingTr/ExpandingTr.tsx +31 -0
  343. package/src/components/Table/ExpandingTr/ExpandingTr.types.ts +9 -0
  344. package/src/components/Table/ExpandingTr/index.ts +2 -0
  345. package/src/components/Table/Table.stories.tsx +326 -0
  346. package/src/components/Table/Table.styles.ts +48 -0
  347. package/src/components/Table/Table.tsx +9 -0
  348. package/src/components/Table/Table.types.ts +16 -0
  349. package/src/components/Table/TableContainer.tsx +55 -0
  350. package/src/components/Table/TableContext.tsx +187 -0
  351. package/src/components/Table/Tbody.tsx +12 -0
  352. package/src/components/Table/Td.tsx +138 -0
  353. package/src/components/Table/Th.tsx +154 -0
  354. package/src/components/Table/Thead.tsx +5 -0
  355. package/src/components/Table/Tr.tsx +5 -0
  356. package/src/components/Table/index.tsx +8 -0
  357. package/src/components/Tabs/Tab/Tab.styles.ts +35 -0
  358. package/src/components/Tabs/Tab/Tab.tsx +67 -0
  359. package/src/components/Tabs/Tab/index.ts +1 -0
  360. package/src/components/Tabs/TabList/TabList.styles.ts +11 -0
  361. package/src/components/Tabs/TabList/TabList.tsx +19 -0
  362. package/src/components/Tabs/TabList/index.ts +1 -0
  363. package/src/components/Tabs/TabPanel.tsx +5 -0
  364. package/src/components/Tabs/TabPanels.tsx +5 -0
  365. package/src/components/Tabs/Tabs.stories.tsx +45 -0
  366. package/src/components/Tabs/Tabs.tsx +65 -0
  367. package/src/components/Tabs/Tabs.types.ts +19 -0
  368. package/src/components/Tabs/TabsContext.tsx +162 -0
  369. package/src/components/Tabs/index.tsx +5 -0
  370. package/src/components/Tag/Tag.stories.tsx +28 -0
  371. package/src/components/Tag/Tag.styles.ts +12 -0
  372. package/src/components/Tag/Tag.tsx +23 -0
  373. package/src/components/Tag/Tag.types.ts +5 -0
  374. package/src/components/Tag/TagCloseButton/TagCloseButton.tsx +12 -0
  375. package/src/components/Tag/TagCloseButton/TagCloseButton.types.ts +3 -0
  376. package/src/components/Tag/TagCloseButton/index.ts +2 -0
  377. package/src/components/Tag/TagLabel/TagLabel.tsx +12 -0
  378. package/src/components/Tag/TagLabel/TagLabel.types.ts +3 -0
  379. package/src/components/Tag/TagLabel/index.ts +2 -0
  380. package/src/components/Tag/TagLeftIcon/TagLeftIcon.tsx +12 -0
  381. package/src/components/Tag/TagLeftIcon/TagLeftIcon.types.ts +3 -0
  382. package/src/components/Tag/TagLeftIcon/index.ts +2 -0
  383. package/src/components/Tag/TagRightIcon/TagRightIcon.tsx +12 -0
  384. package/src/components/Tag/TagRightIcon/TagRightIcon.types.ts +3 -0
  385. package/src/components/Tag/TagRightIcon/index.ts +2 -0
  386. package/src/components/Tag/index.ts +5 -0
  387. package/src/components/Textarea/Textarea.tsx +56 -0
  388. package/src/components/Textarea/adjustHeight.tsx +9 -0
  389. package/src/components/Textarea/index.ts +1 -0
  390. package/src/components/Toast/Toast.stories.tsx +49 -0
  391. package/src/components/Toast/Toast.styles.ts +19 -0
  392. package/src/components/Toast/Toast.tsx +38 -0
  393. package/src/components/Toast/Toast.types.ts +22 -0
  394. package/src/components/Toast/ToastIcon/ToastIcon.tsx +26 -0
  395. package/src/components/Toast/ToastIcon/index.ts +0 -0
  396. package/src/components/Toast/index.ts +2 -0
  397. package/src/components/Toast/useToast.tsx +65 -0
  398. package/src/components/Tooltip/Tooltip.stories.tsx +97 -0
  399. package/src/components/Tooltip/Tooltip.tsx +22 -0
  400. package/src/components/Tooltip/Tooltip.types.ts +3 -0
  401. package/src/components/Tooltip/index.ts +2 -0
  402. package/src/components/Typography/H1.tsx +17 -0
  403. package/src/components/Typography/H2.tsx +17 -0
  404. package/src/components/Typography/H3.tsx +17 -0
  405. package/src/components/Typography/H4.tsx +17 -0
  406. package/src/components/Typography/H5.tsx +17 -0
  407. package/src/components/Typography/Link.tsx +49 -0
  408. package/src/components/Typography/Subtext.tsx +17 -0
  409. package/src/components/Typography/Subtitle.tsx +18 -0
  410. package/src/components/Typography/Text.tsx +22 -0
  411. package/src/components/Typography/Typography.stories.tsx +54 -0
  412. package/src/components/Typography/Typography.types.ts +3 -0
  413. package/src/components/Typography/index.ts +26 -0
  414. package/src/components/UrlInput/UrlInput.stories.tsx +66 -0
  415. package/src/components/UrlInput/UrlInput.tsx +47 -0
  416. package/src/components/UrlInput/index.tsx +1 -0
  417. package/src/hooks/useLocale.ts +11 -0
  418. package/src/hooks/useTranslate.ts +57 -0
  419. package/src/index.ts +96 -0
  420. package/src/theme/Palette.stories.tsx +171 -0
  421. package/src/theme/colors.ts +64 -0
  422. package/src/theme/font.ts +23 -0
  423. package/src/theme/global.ts +30 -0
  424. package/src/theme/index.ts +49 -0
  425. package/src/translations/Defaults.translations.json +100 -0
  426. package/src/types/css-modules.d.ts +0 -0
  427. package/src/types/svg.d.ts +15 -0
  428. package/src/utils/findKeyByValue.ts +17 -0
  429. package/src/utils/formatDateByLocale.ts +36 -0
  430. package/src/utils/formatFileSize.ts +14 -0
  431. package/src/utils/formatNumber.ts +29 -0
  432. package/src/utils/formatTextForMarkdown.ts +3 -0
@@ -0,0 +1,290 @@
1
+ import { BiDetail, BiExpandAlt } from 'react-icons/bi';
2
+ import { BsTranslate } from 'react-icons/bs';
3
+ import { CiFileOn } from 'react-icons/ci';
4
+ import {
5
+ FaArchive,
6
+ FaBeer,
7
+ FaChartPie,
8
+ FaGraduationCap,
9
+ FaImage,
10
+ FaMoneyBillWave,
11
+ FaPlay,
12
+ FaPrint,
13
+ FaRegEye,
14
+ FaRegEyeSlash,
15
+ FaRegQuestionCircle,
16
+ FaRegTrashAlt,
17
+ FaRegUserCircle,
18
+ FaSortAlphaDown,
19
+ FaSortAlphaUp,
20
+ FaSortNumericDown,
21
+ FaSortNumericUp,
22
+ FaUniversity,
23
+ FaUserCheck,
24
+ FaUserPlus,
25
+ FaUsers,
26
+ } from 'react-icons/fa';
27
+ import {
28
+ FaCheck,
29
+ FaCode,
30
+ FaLock,
31
+ FaPersonChalkboard,
32
+ FaRegCopy,
33
+ FaRotateRight,
34
+ FaUserClock,
35
+ } from 'react-icons/fa6';
36
+ import { GiTwoCoins } from 'react-icons/gi';
37
+ import { GoArrowDownRight, GoArrowUpRight } from 'react-icons/go';
38
+ import { GrUserAdmin } from 'react-icons/gr';
39
+ import { HiLightningBolt, HiRefresh, HiX } from 'react-icons/hi';
40
+ import {
41
+ IoIosAddCircleOutline,
42
+ IoIosArrowBack,
43
+ IoIosArrowForward,
44
+ IoIosAttach,
45
+ IoIosCheckmarkCircle,
46
+ IoIosList,
47
+ IoIosMail,
48
+ IoIosShareAlt,
49
+ IoMdLink,
50
+ IoMdSave,
51
+ IoMdSettings,
52
+ IoMdThumbsDown,
53
+ IoMdThumbsUp,
54
+ } from 'react-icons/io';
55
+ import {
56
+ IoAddCircleOutline,
57
+ IoAddOutline,
58
+ IoCall,
59
+ IoChatbubbleEllipses,
60
+ IoChevronDownOutline,
61
+ IoChevronForward,
62
+ IoClose,
63
+ IoCloseOutline,
64
+ IoCodeSlash,
65
+ IoDocumentTextSharp,
66
+ IoEyeOffOutline,
67
+ IoEyeOutline,
68
+ IoFilter,
69
+ IoHome,
70
+ IoSearch,
71
+ IoWarning,
72
+ IoWarningOutline,
73
+ } from 'react-icons/io5';
74
+ import { LiaNewspaper } from 'react-icons/lia';
75
+ import { IconType as ReactIconType } from 'react-icons/lib';
76
+ import {
77
+ LuBookOpenText,
78
+ LuDownload,
79
+ LuExternalLink,
80
+ LuGraduationCap,
81
+ LuInfo,
82
+ LuMenu,
83
+ LuReceipt,
84
+ LuSendHorizontal,
85
+ LuUpload,
86
+ } from 'react-icons/lu';
87
+ import {
88
+ MdAnnouncement,
89
+ MdCardMembership,
90
+ MdError,
91
+ MdFilterList,
92
+ MdLogout,
93
+ MdOutlineCalendarToday,
94
+ MdOutlinePersonPin,
95
+ MdOutlineSpaceDashboard,
96
+ MdPreview,
97
+ MdSpaceDashboard,
98
+ MdThumbsUpDown,
99
+ } from 'react-icons/md';
100
+ import { PiChatSlashBold, PiExam, PiGlobe, PiGlobeX } from 'react-icons/pi';
101
+ import { RxDotsHorizontal } from 'react-icons/rx';
102
+ import { SlSettings } from 'react-icons/sl';
103
+ import {
104
+ TbAppWindowFilled,
105
+ TbInfinity,
106
+ TbLayoutNavbar,
107
+ TbLockCog,
108
+ TbMessageChatbotFilled,
109
+ TbSum,
110
+ TbWorldSearch,
111
+ } from 'react-icons/tb';
112
+
113
+ import AnalyticsIcon from './icons/analytics.svg';
114
+ import BulbIcon from './icons/bulb.svg';
115
+ import ChatIcon from './icons/chat.svg';
116
+ import EditIcon from './icons/edit.svg';
117
+ import FaceIcon from './icons/face.svg';
118
+ import FilledAnalyticsIcon from './icons/filled-analytics.svg';
119
+ import FilledBulbIcon from './icons/filled-bulb.svg';
120
+ import FilledChatIcon from './icons/filled-chat.svg';
121
+ import FilledEditIcon from './icons/filled-edit.svg';
122
+ import FilledFaceIcon from './icons/filled-face.svg';
123
+ import FilledLayoutIcon from './icons/filled-layout.svg';
124
+ import LanguageIcon from './icons/language.svg';
125
+ import LayoutIcon from './icons/layout.svg';
126
+ import PendingIcon from './icons/pending.svg';
127
+ import ReceiptIcon from './icons/receipt.svg';
128
+ import SparklesIcon from './icons/sparkles.svg';
129
+ import StoreIcon from './icons/store.svg';
130
+ import StoreActiveIcon from './icons/store_active.svg';
131
+ import StudioIcon from './icons/studio.svg';
132
+ import StudioActiveIcon from './icons/studio_active.svg';
133
+ import VerticalEllipsisIcon from './icons/vertical-ellipsis.svg';
134
+
135
+ export const REACT_ICONS_MAP: { [key: string]: ReactIconType } = {
136
+ BiDetail,
137
+ BiExpandAlt,
138
+ BsTranslate,
139
+ CiFileOn,
140
+ FaArchive,
141
+ FaBeer,
142
+ FaChartPie,
143
+ FaCheck,
144
+ FaCode,
145
+ FaGraduationCap,
146
+ FaImage,
147
+ FaLock,
148
+ FaMoneyBillWave,
149
+ FaPersonChalkboard,
150
+ FaPrint,
151
+ FaRegQuestionCircle,
152
+ FaRegCopy,
153
+ FaRegTrashAlt,
154
+ FaRegUserCircle,
155
+ FaRegEye,
156
+ FaRegEyeSlash,
157
+ FaRotateRight,
158
+ FaPlay,
159
+ FaSortAlphaDown,
160
+ FaSortAlphaUp,
161
+ FaSortNumericDown,
162
+ FaSortNumericUp,
163
+ FaUniversity,
164
+ FaUserCheck,
165
+ FaUserClock,
166
+ FaUserPlus,
167
+ FaUsers,
168
+ GiTwoCoins,
169
+ GoArrowUpRight,
170
+ GoArrowDownRight,
171
+ IoIosArrowForward,
172
+ GrUserAdmin,
173
+ HiLightningBolt,
174
+ HiRefresh,
175
+ IoAddCircleOutline,
176
+ IoAddOutline,
177
+ IoCall,
178
+ IoChatbubbleEllipses,
179
+ IoChevronDownOutline,
180
+ IoChevronForward,
181
+ IoCodeSlash,
182
+ IoClose,
183
+ IoCloseOutline,
184
+ IoDocumentTextSharp,
185
+ IoIosList,
186
+ IoMdLink,
187
+ IoMdSave,
188
+ IoMdThumbsUp,
189
+ IoMdThumbsDown,
190
+ IoEyeOutline,
191
+ IoEyeOffOutline,
192
+ IoFilter,
193
+ IoHome,
194
+ IoIosArrowBack,
195
+ IoIosAttach,
196
+ IoIosCheckmarkCircle,
197
+ IoIosAddCircleOutline,
198
+ IoIosMail,
199
+ IoIosShareAlt,
200
+ IoMdSettings,
201
+ IoWarningOutline,
202
+ IoSearch,
203
+ IoWarning,
204
+ LuExternalLink,
205
+ LuDownload,
206
+ LiaNewspaper,
207
+ LuBookOpenText,
208
+ LuGraduationCap,
209
+ LuInfo,
210
+ LuMenu,
211
+ LuReceipt,
212
+ LuSendHorizontal,
213
+ LuUpload,
214
+ MdAnnouncement,
215
+ MdCardMembership,
216
+ MdError,
217
+ MdFilterList,
218
+ MdLogout,
219
+ MdOutlineCalendarToday,
220
+ MdOutlinePersonPin,
221
+ MdOutlineSpaceDashboard,
222
+ HiX,
223
+ MdPreview,
224
+ MdSpaceDashboard,
225
+ MdThumbsUpDown,
226
+ PiChatSlashBold,
227
+ PiExam,
228
+ PiGlobe,
229
+ PiGlobeX,
230
+ RxDotsHorizontal,
231
+ SlSettings,
232
+ TbAppWindowFilled,
233
+ TbInfinity,
234
+ TbLayoutNavbar,
235
+ TbLockCog,
236
+ TbMessageChatbotFilled,
237
+ TbSum,
238
+ TbWorldSearch,
239
+ };
240
+
241
+ /**
242
+ * Map of icon names to SVGs. Records named as {iconName}: {iconName}Icon.
243
+ *
244
+ * Sorted alphabetically.
245
+ */
246
+ export const CUSTOM_ICON_MAP: {
247
+ [key: string]: React.FunctionComponent<
248
+ React.SVGProps<SVGSVGElement> & { title?: string }
249
+ >;
250
+ } = {
251
+ Analytics: AnalyticsIcon,
252
+ Bulb: BulbIcon,
253
+ Chat: ChatIcon,
254
+ Edit: EditIcon,
255
+ Face: FaceIcon,
256
+ Language: LanguageIcon,
257
+ Layout: LayoutIcon,
258
+ FilledAnalytics: FilledAnalyticsIcon,
259
+ FilledBulb: FilledBulbIcon,
260
+ FilledChat: FilledChatIcon,
261
+ FilledEdit: FilledEditIcon,
262
+ FilledFace: FilledFaceIcon,
263
+ FilledLayout: FilledLayoutIcon,
264
+ Pending: PendingIcon,
265
+ Sparkles: SparklesIcon,
266
+ Studio: StudioIcon,
267
+ StudioActive: StudioActiveIcon,
268
+ Store: StoreIcon,
269
+ StoreActive: StoreActiveIcon,
270
+ Receipt: ReceiptIcon,
271
+ VerticalEllipsis: VerticalEllipsisIcon,
272
+ } as const;
273
+
274
+ export type IconType =
275
+ | keyof typeof CUSTOM_ICON_MAP
276
+ | keyof typeof REACT_ICONS_MAP;
277
+
278
+ /**
279
+ * Convert map of SVGs to a const of strings only to minimize import size
280
+ */
281
+ export const IconTypes: { [K in IconType]: IconType } = Object.keys({
282
+ ...CUSTOM_ICON_MAP,
283
+ ...REACT_ICONS_MAP,
284
+ }).reduce(
285
+ (prevVal, currVal) => {
286
+ prevVal[currVal] = currVal;
287
+ return prevVal;
288
+ },
289
+ {} as { [K in IconType]: IconType }
290
+ );
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.667" d="M6 14v-2m4 2v-4m4 4V6M4 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" clip-path="url(#a)"><path d="M12.733 11.247a5.8 5.8 0 0 1-1.78 1.364v1.929a.643.643 0 0 1-.643.643H6.453a.643.643 0 0 1-.643-.643V12.61a5.786 5.786 0 0 1 4.955-10.454m-4.955 16.2h5.143"/><path d="M11.433 6.058c-.451-.078-.451-.726 0-.805a4.09 4.09 0 0 0 3.289-3.15l.027-.126c.098-.446.733-.449.835-.004l.033.146a4.1 4.1 0 0 0 3.298 3.13c.454.08.454.73 0 .81a4.1 4.1 0 0 0-3.297 3.131l-.033.145c-.102.445-.737.443-.835-.004l-.025-.124a4.09 4.09 0 0 0-3.292-3.149"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><g fill="currentColor" clip-path="url(#a)"><path d="M6.25 19.08c-.84 0-1.67-.2-2.42-.58l-1.8.33a.74.74 0 0 1-.67-.21.78.78 0 0 1-.21-.67l.34-1.8a5.4 5.4 0 0 1-.53-3.11 5.344 5.344 0 0 1 4.59-4.6c1.16-.15 2.35.08 3.36.67 1.01.58 1.81 1.5 2.26 2.58s.53 2.29.22 3.42c-.3 1.13-.98 2.14-1.9 2.85-.93.71-2.08 1.1-3.25 1.1zm-2.29-2.11c.13 0 .26.03.38.1 1.31.75 3.05.64 4.25-.28.67-.51 1.15-1.24 1.37-2.05s.16-1.68-.16-2.46-.9-1.43-1.62-1.85a3.85 3.85 0 0 0-2.42-.48c-.83.11-1.62.5-2.21 1.09s-.98 1.38-1.09 2.21.06 1.69.48 2.42c.09.16.12.34.09.51l-.18.99.99-.18s.09-.01.14-.01z"/><path d="M18.62 5.75a7.3 7.3 0 0 0-1.77-2.71 7.425 7.425 0 0 0-9.04-1.03c-.93.56-1.73 1.34-2.33 2.24-.59.88-.98 1.9-1.14 2.95.33-.1.67-.18 1.02-.22.19-.02.38-.03.57-.04.16-.66.44-1.3.81-1.87.48-.72 1.12-1.34 1.86-1.79a5.95 5.95 0 0 1 5.02-.54c.82.28 1.58.75 2.2 1.36.62.6 1.11 1.35 1.41 2.16s.42 1.7.35 2.56-.34 1.72-.77 2.46c-.09.16-.12.34-.09.51l.36 1.92-1.93-.36c-.18-.03-.36 0-.51.09-.49.28-1.02.47-1.57.6-.02.49-.08.98-.2 1.46-.01.05-.04.09-.05.14h.06c.8-.13 1.56-.39 2.27-.76l2.74.51c.24.04.49-.03.67-.21.17-.17.25-.42.21-.67l-.51-2.74c.46-.88.75-1.85.83-2.84.09-1.08-.06-2.19-.44-3.21z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 19 19"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.24 5.348H3.3A1.88 1.88 0 0 0 1.416 7.23v8.471a1.88 1.88 0 0 0 1.882 1.882h8.47a1.88 1.88 0 0 0 1.883-1.882v-.941"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.71 3.466 2.824 2.823m1.304-1.331a1.976 1.976 0 1 0-2.796-2.796l-7.92 7.892v2.824h2.824z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.25" d="M7.227 12.433C7.81 13.375 8.834 14 10 14s2.19-.625 2.773-1.567"/><path stroke="currentColor" stroke-linecap="round" stroke-width="1.25" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"/><circle cx="7.5" cy="8.333" r=".833" fill="currentColor"/><circle cx="12.5" cy="8.333" r=".833" fill="currentColor"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M1.167 4A2.833 2.833 0 0 1 4 1.167h12A2.833 2.833 0 0 1 18.834 4v12A2.833 2.833 0 0 1 16 18.833H4A2.833 2.833 0 0 1 1.167 16zm13.667 2a.833.833 0 0 0-1.667 0v8a.833.833 0 1 0 1.667 0zm-4 4a.833.833 0 0 0-1.667 0v4a.833.833 0 1 0 1.667 0zm-4 2a.833.833 0 0 0-1.667 0v2a.833.833 0 1 0 1.667 0z" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 19 20"><g fill="currentColor" clip-path="url(#a)"><path d="M14.17 10.29c-.5 0-.93-.35-1.04-.84l-.03-.13c-.15-.66-.49-1.27-.98-1.74s-1.11-.79-1.79-.9c-.51-.09-.87-.51-.87-1.04s.36-.95.87-1.04a3.45 3.45 0 0 0 2.77-2.66l.03-.12c.11-.49.54-.84 1.04-.84.53-.02.94.34 1.05.83l.03.14c.15.67.5 1.27.99 1.74.5.47 1.12.78 1.79.9.52.09.87.52.87 1.04s-.36.95-.87 1.04c-.68.12-1.29.43-1.79.9s-.84 1.07-.99 1.74l-.04.15c-.11.49-.54.83-1.04.83M4.81 19.08c-.41 0-.74-.33-.74-.74s.33-.74.74-.74h5.14c.41 0 .74.33.74.74s-.33.74-.74.74z"/><path d="M5.45 15.91a1.403 1.403 0 0 1-1.39-1.39v-1.54c-1.3-.7-2.33-1.95-2.84-3.43a6.53 6.53 0 0 1 3.91-8.26A6.6 6.6 0 0 1 7.88.91c1.36.07 2.52.53 3.46 1.35l.07.06-.05.07c-.1.14-.15.22-.23.29-.29.28-.66.47-1.06.54a2.44 2.44 0 0 0-2.03 2.42c0 1.2.85 2.21 2.03 2.41a2.067 2.067 0 0 1 1.64 1.55l.03.15c.12.54.4 1.01.82 1.36l.07.06-.12.19c-.05.09-.1.17-.16.25-.02.04-.13.18-.16.21-.42.5-.92.92-1.5 1.24v1.47c0 .37-.14.71-.4.98-.26.26-.62.41-.98.41H5.45z"/></g><defs><clipPath id="a"><path fill="#fff" d="M.86.89H18.9v18.19H.86z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><g fill="currentColor" clip-path="url(#a)"><path d="M6.24 19.08c-.84 0-1.67-.2-2.41-.58l-1.8.33a.74.74 0 0 1-.67-.21.78.78 0 0 1-.21-.67l.34-1.8c-.48-.95-.67-2.05-.53-3.11a5.344 5.344 0 0 1 4.59-4.6c1.16-.15 2.35.08 3.36.67a5.351 5.351 0 0 1 2.49 6c-.3 1.13-.98 2.14-1.9 2.85-.93.71-2.08 1.1-3.25 1.1z"/><path d="M18.62 5.75a7.3 7.3 0 0 0-1.77-2.71 7.425 7.425 0 0 0-9.04-1.03c-.93.56-1.73 1.34-2.33 2.24A7.4 7.4 0 0 0 4.34 7.2c.33-.1.67-.18 1.02-.22.29-.04.59-.06.89-.06 1.2 0 2.38.32 3.42.91 1.3.75 2.32 1.92 2.9 3.3s.67 2.94.29 4.38c-.01.05-.04.09-.05.14h.06c.8-.13 1.56-.39 2.27-.76l2.74.51c.24.05.49-.03.67-.21.17-.17.25-.42.21-.67l-.51-2.74c.46-.88.75-1.85.83-2.84.09-1.08-.06-2.19-.44-3.21z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h20v20H0z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 17"><g fill="currentColor" clip-path="url(#a)"><path d="m14.36 6.5-1.45 1.46-3.42 3.44a.75.75 0 0 1-.53.22H6.14c-.41 0-.75-.34-.75-.75V8.05c0-.2.08-.39.22-.53L9.05 4.1l1.46-1.45a.7.7 0 0 0-.25-.05H3.3c-.7 0-1.36.27-1.86.77-.49.49-.77 1.17-.77 1.86v8.47c0 .7.27 1.36.77 1.86s1.16.77 1.86.77h8.47c.7 0 1.36-.27 1.86-.77s.77-1.16.77-1.86V6.76c0-.09-.02-.17-.05-.25z"/><path d="M8.64 10.11H6.88V8.35l5.85-5.83 1.74 1.74zm7.67-7.7-.78.79-1.74-1.74.79-.79c.46-.46 1.27-.46 1.73 0 .23.23.36.54.36.87s-.13.64-.36.87"/></g><defs><clipPath id="a"><path fill="#fff" d="M.67.33h16v15.99h-16z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M10 1.375a8.625 8.625 0 1 0 0 17.25 8.625 8.625 0 0 0 0-17.25M7.758 12.104a.625.625 0 0 0-1.063.658c.69 1.113 1.908 1.863 3.305 1.863s2.615-.75 3.305-1.863a.625.625 0 1 0-1.063-.658A2.64 2.64 0 0 1 10 13.375c-.935 0-1.765-.5-2.242-1.271m.575-3.77a.833.833 0 1 1-1.666 0 .833.833 0 0 1 1.666 0m4.167.833a.833.833 0 1 0 0-1.667.833.833 0 0 0 0 1.667" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" d="M18.21 6.96V5.32c0-1.94-1.57-3.52-3.52-3.52H5.32C3.37 1.8 1.8 3.37 1.8 5.32v1.64zM8.36 18.2h6.33c1.94 0 3.52-1.57 3.52-3.52V8.35H8.36zM6.96 8.36H1.8v6.33c0 1.94 1.57 3.52 3.52 3.52h1.64z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-width="1.2" d="M10 17a7 7 0 1 0 0-14m0 14a7 7 0 1 1 0-14m0 14c-1.691 0-3.062-3.134-3.062-7S8.308 3 10 3m0 14c1.691 0 3.063-3.134 3.063-7S11.69 3 10 3M4.313 13.402c1.282-.734 3.413-1.214 5.824-1.214 2.517 0 4.728.523 5.988 1.312M4.313 6.598c1.282.734 3.413 1.215 5.824 1.215 2.517 0 4.728-.524 5.988-1.313"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" d="M8.36 8.125a.703.703 0 1 0-1.407 0zM6.952 17.5a.703.703 0 0 0 1.406 0zM5.313 3.203h9.375V1.797H5.313zm11.484 2.11v9.375h1.406V5.313zm-2.11 11.484H5.313v1.406h9.375zm-11.484-2.11V5.313H1.797v9.375zm2.11 2.11a2.11 2.11 0 0 1-2.11-2.11H1.797a3.516 3.516 0 0 0 3.516 3.516zm11.484-2.11a2.11 2.11 0 0 1-2.11 2.11v1.406a3.516 3.516 0 0 0 3.516-3.515zm-2.11-11.484a2.11 2.11 0 0 1 2.11 2.11h1.406a3.516 3.516 0 0 0-3.515-3.516zM5.313 1.797a3.516 3.516 0 0 0-3.516 3.516h1.406a2.11 2.11 0 0 1 2.11-2.11zm1.64 6.328V17.5H8.36V8.125zm-3.984.234H17.03V6.953H2.97z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g fill="#aeb2bc" clip-path="url(#a)"><path d="M12.202 4.944a.744.744 0 1 0 0-1.487.744.744 0 0 0 0 1.487M18.207 7.08a.946.946 0 1 0-1.337-1.338.946.946 0 0 0 1.337 1.337M19.749 12.794a1.047 1.047 0 1 0 0-2.093 1.047 1.047 0 0 0 0 2.093M17.538 15.936a1.148 1.148 0 1 0 0 2.295 1.148 1.148 0 0 0 0-2.295m-5.336 2.11a1.249 1.249 0 1 0 0 2.497 1.249 1.249 0 0 0 0-2.498m-6.29-1.917a1.35 1.35 0 1 0 1.909 1.91 1.35 1.35 0 0 0-1.91-1.91m.194-4.382a1.451 1.451 0 1 0-2.902 0 1.451 1.451 0 0 0 2.902 0m1.857-6.433a1.227 1.227 0 1 0-1.097 2.194 1.227 1.227 0 0 0 1.097-2.194"/></g><defs><clipPath id="a"><path fill="#fff" d="M3 3h18v18H3z"/></clipPath></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" fill="none" viewBox="0 0 14 16"><path stroke="#9499a5" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2" d="M3.85 4.85h6.3m-6.3 3.6h6.3m-7.83-7.2h9.36c.646 0 1.17.604 1.17 1.35v12.15L10.9 13.4l-1.95 1.35L7 13.4l-1.95 1.35L3.1 13.4l-1.95 1.35V2.6c0-.746.524-1.35 1.17-1.35"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M15 4.5a.75.75 0 0 0-.721.544l-.813 2.846a3.75 3.75 0 0 1-2.576 2.576l-2.846.813a.75.75 0 0 0 0 1.442l2.846.813a3.75 3.75 0 0 1 2.576 2.576l.813 2.846a.75.75 0 0 0 1.442 0l.813-2.846a3.75 3.75 0 0 1 2.576-2.576l2.846-.813a.75.75 0 0 0 0-1.442l-2.846-.813a3.75 3.75 0 0 1-2.576-2.576l-.813-2.846A.75.75 0 0 0 15 4.5m-9-3a.75.75 0 0 0-.728.568l-.258 1.036a2.63 2.63 0 0 1-1.91 1.91l-1.036.258a.75.75 0 0 0 0 1.456l1.036.258a2.63 2.63 0 0 1 1.91 1.91l.258 1.036a.75.75 0 0 0 1.456 0l.258-1.036a2.63 2.63 0 0 1 1.91-1.91l1.036-.258a.75.75 0 0 0 0-1.456l-1.036-.258a2.63 2.63 0 0 1-1.91-1.91l-.258-1.036A.75.75 0 0 0 6 1.5M7.5 15a.75.75 0 0 0-.712.513l-.394 1.183a1.5 1.5 0 0 1-.948.948l-1.183.395a.75.75 0 0 0 0 1.422l1.183.395a1.5 1.5 0 0 1 .948.948l.395 1.183a.75.75 0 0 0 1.422 0l.395-1.183a1.5 1.5 0 0 1 .948-.948l1.183-.395a.75.75 0 0 0 0-1.422l-1.183-.395a1.5 1.5 0 0 1-.948-.948l-.395-1.183A.75.75 0 0 0 7.5 15" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="currentColor" stroke-linejoin="round" stroke-width="1.4" d="M2.92 8.008C3.17 6.286 4.78 5 6.68 5h6.638c1.902 0 3.51 1.286 3.762 3.008l.885 6.067C18.27 16.153 16.5 18 14.204 18H5.796C3.5 18 1.73 16.153 2.034 14.075z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.4" d="M6.667 4.833V5a3.333 3.333 0 0 1 6.666 0v-.167M7.5 9.166V10a2.5 2.5 0 1 0 5 0v-.834"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" stroke="currentColor" stroke-linejoin="round" stroke-width="1.67" d="M2.92 8.008C3.17 6.286 4.78 5 6.68 5h6.638c1.902 0 3.51 1.286 3.762 3.008l.885 6.067C18.27 16.153 16.5 18 14.204 18H5.796C3.5 18 1.73 16.153 2.034 14.075z"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.67" d="M6.667 4.834V5a3.333 3.333 0 0 1 6.666 0v-.166"/><path fill="#ebf0fb" fill-rule="evenodd" d="M7.5 8.332c.461 0 .835.374.835.835V10a1.665 1.665 0 1 0 3.33 0v-.833a.835.835 0 0 1 1.67 0V10a3.335 3.335 0 1 1-6.67 0v-.833c0-.461.374-.835.835-.835" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" d="M14.483 6.896a1.38 1.38 0 1 0 0-2.758 1.38 1.38 0 0 0 0 2.758"/><path fill="currentColor" d="M14.483 9.655H5.517A4.14 4.14 0 0 1 1.38 5.517a4.14 4.14 0 0 1 4.138-4.138h8.966a4.14 4.14 0 0 1 4.138 4.138 4.14 4.14 0 0 1-4.138 4.138M5.517 2.758A2.76 2.76 0 0 0 2.76 5.517a2.76 2.76 0 0 0 2.758 2.758h8.966a2.76 2.76 0 0 0 2.758-2.758 2.76 2.76 0 0 0-2.758-2.759zM5.517 15.862a1.38 1.38 0 1 0 0-2.758 1.38 1.38 0 0 0 0 2.758"/><path fill="currentColor" d="M14.483 18.62H5.517a4.14 4.14 0 0 1-4.138-4.137 4.14 4.14 0 0 1 4.138-4.138h8.966a4.14 4.14 0 0 1 4.138 4.138 4.14 4.14 0 0 1-4.138 4.138m-8.966-6.896a2.76 2.76 0 0 0-2.758 2.759 2.76 2.76 0 0 0 2.758 2.758h8.966a2.76 2.76 0 0 0 2.758-2.758 2.76 2.76 0 0 0-2.758-2.759z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path fill="currentColor" fill-rule="evenodd" d="M5.517 9.62h8.966a4.14 4.14 0 0 0 4.138-4.137 4.14 4.14 0 0 0-4.138-4.138H5.517A4.14 4.14 0 0 0 1.38 5.483 4.14 4.14 0 0 0 5.517 9.62m10.345-4.103a1.38 1.38 0 1 1-2.758 0 1.38 1.38 0 0 1 2.758 0M5.517 18.62h8.966a4.14 4.14 0 0 0 4.138-4.137 4.14 4.14 0 0 0-4.138-4.138H5.517a4.14 4.14 0 0 0-4.138 4.138 4.14 4.14 0 0 0 4.138 4.138m1.38-4.137a1.38 1.38 0 1 1-2.759 0 1.38 1.38 0 0 1 2.759 0" clip-rule="evenodd"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" height="auto" fill="none" viewBox="0 0 49 49"><circle cx="24.5" cy="10.5" r="3.5" fill="currentColor"/><circle cx="24.5" cy="39.5" r="3.5" fill="currentColor"/><circle cx="24.5" cy="24.5" r="3.5" fill="currentColor"/></svg>
@@ -0,0 +1,3 @@
1
+ export { Icon } from './Icon';
2
+ export { type IconProps } from './Icon.types';
3
+ export { type IconType, IconTypes } from './IconMap';
@@ -0,0 +1,51 @@
1
+ import React from 'react';
2
+ import { Meta, StoryFn } from '@storybook/react';
3
+
4
+ import { variantStyles as buttonVariantStyles } from '../Button/Button.styles';
5
+ import { Icon } from '../Icon/Icon';
6
+ import { IconButton } from './IconButton';
7
+ import { IconButtonProps, IconButtonVariant } from './IconButton.types';
8
+
9
+ const meta: Meta<typeof IconButton> = {
10
+ title: 'Components/IconButton',
11
+ component: IconButton,
12
+ args: {
13
+ icon: <Icon icon="FaUniversity" />,
14
+ },
15
+ argTypes: {
16
+ variant: {
17
+ control: 'select',
18
+ options: Object.keys(buttonVariantStyles),
19
+ },
20
+ },
21
+ };
22
+
23
+ export default meta;
24
+
25
+ const Template: StoryFn<IconButtonProps> = (args: IconButtonProps) => (
26
+ <IconButton {...args} />
27
+ );
28
+
29
+ export const Basic: StoryFn<IconButtonProps> = Template.bind({});
30
+ Basic.args = {
31
+ variant: 'primary',
32
+ };
33
+
34
+ export const Round: StoryFn<IconButtonProps> = Template.bind({});
35
+ Round.args = {
36
+ isRound: true,
37
+ };
38
+
39
+ export const AllIconButtonVariants: StoryFn<IconButtonProps> = (args) => {
40
+ const variants = Object.keys(buttonVariantStyles);
41
+ return (
42
+ <div>
43
+ {variants.map((variant) => (
44
+ <div key={variant}>
45
+ <p>{variant}</p>
46
+ <IconButton {...args} variant={variant as IconButtonVariant} />
47
+ </div>
48
+ ))}
49
+ </div>
50
+ );
51
+ };
@@ -0,0 +1,52 @@
1
+ import { IconButtonProps } from '@chakra-ui/react';
2
+
3
+ import { IconButtonVariant } from './IconButton.types';
4
+
5
+ // TODO: UX를 위해 hover, active 스타일 구분 필요
6
+ export const variantStyles: Record<
7
+ Exclude<IconButtonVariant, undefined>,
8
+ Partial<IconButtonProps>
9
+ > = {
10
+ primary: {
11
+ borderColor: 'primary.main',
12
+ bgColor: 'primary.main',
13
+ color: 'white',
14
+ _hover: {
15
+ borderColor: 'blue.800',
16
+ bgColor: 'blue.800',
17
+ },
18
+ },
19
+ secondary: {
20
+ borderColor: 'primary.light',
21
+ bgColor: 'primary.light',
22
+ color: 'primary.main',
23
+ _hover: {
24
+ borderColor: 'blue.200',
25
+ bgColor: 'blue.200',
26
+ },
27
+ },
28
+ tertiary: {
29
+ borderColor: 'gray.400',
30
+ bgColor: 'white',
31
+ color: 'gray.1200',
32
+ _hover: {
33
+ bgColor: 'gray.50',
34
+ },
35
+ },
36
+ danger: {
37
+ borderColor: 'danger.main',
38
+ bgColor: 'danger.main',
39
+ color: 'white',
40
+ _hover: {
41
+ bgColor: 'red.600',
42
+ },
43
+ },
44
+ link: {
45
+ borderColor: 'transparent',
46
+ bgColor: 'transparent',
47
+ borderRadius: 'none',
48
+ _hover: {
49
+ bgColor: 'transparent',
50
+ },
51
+ },
52
+ };
@@ -0,0 +1,36 @@
1
+ import { ForwardedRef, forwardRef } from 'react';
2
+ import { IconButton as ChakraIconButton } from '@chakra-ui/react';
3
+
4
+ import { variantStyles } from './IconButton.styles';
5
+ import { IconButtonProps } from './IconButton.types';
6
+
7
+ export const IconButton = forwardRef(
8
+ (
9
+ { variant = 'link', sx, ...rest }: IconButtonProps,
10
+ ref?: ForwardedRef<HTMLButtonElement>
11
+ ) => {
12
+ return (
13
+ <ChakraIconButton
14
+ border="1px solid"
15
+ borderRadius="full"
16
+ background="transparent"
17
+ {...variantStyles[variant]}
18
+ {...rest}
19
+ ref={ref}
20
+ sx={{
21
+ ...sx,
22
+ '& svg': {
23
+ pointerEvents: 'none',
24
+ ...(sx as any)?.['& svg'],
25
+ },
26
+ '& svg *': {
27
+ pointerEvents: 'none',
28
+ ...(sx as any)?.['& svg *'],
29
+ },
30
+ }}
31
+ />
32
+ );
33
+ }
34
+ );
35
+
36
+ IconButton.displayName = 'IconButton';
@@ -0,0 +1,12 @@
1
+ import { IconButtonProps as ChakraIconButtonProps } from '@chakra-ui/react';
2
+
3
+ export type IconButtonVariant =
4
+ | 'primary'
5
+ | 'secondary'
6
+ | 'tertiary'
7
+ | 'danger'
8
+ | 'link';
9
+
10
+ export type IconButtonProps = Omit<ChakraIconButtonProps, 'variant'> & {
11
+ variant?: IconButtonVariant;
12
+ };
@@ -0,0 +1 @@
1
+ export { IconButton } from './IconButton';
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { Box } from '@chakra-ui/react';
3
+ import { Meta, StoryFn } from '@storybook/react';
4
+
5
+ import { Subtitle, Text } from '../Typography';
6
+ import { InfoSprinkle } from './InfoSprinkle';
7
+
8
+ const meta: Meta<typeof InfoSprinkle> = {
9
+ title: 'Components/InfoSprinkle',
10
+ component: InfoSprinkle,
11
+ };
12
+
13
+ export default meta;
14
+ type Story = StoryFn<typeof InfoSprinkle>;
15
+
16
+ export const Basic: Story = () => {
17
+ return (
18
+ <Box p="128px">
19
+ <InfoSprinkle>
20
+ <Subtitle mb="8px">Let me tell you why this is important.</Subtitle>
21
+ <Text>This is the stuff. The reeeeally good stuff.</Text>
22
+ </InfoSprinkle>
23
+ </Box>
24
+ );
25
+ };
@@ -0,0 +1,48 @@
1
+ import {
2
+ Box,
3
+ Popover,
4
+ PopoverArrow,
5
+ PopoverBody,
6
+ PopoverContent,
7
+ PopoverProps,
8
+ PopoverTrigger,
9
+ Portal,
10
+ } from '@chakra-ui/react';
11
+
12
+ import { Icon, IconTypes } from '@/components/Icon';
13
+
14
+ import { IconButtonProps } from '../IconButton/IconButton.types';
15
+
16
+ export const InfoSprinkle = ({
17
+ children,
18
+ icon,
19
+ ...rest
20
+ }: {
21
+ children: React.ReactNode;
22
+ icon?: IconButtonProps['icon'];
23
+ } & PopoverProps) => {
24
+ return (
25
+ <Popover trigger="hover" placement="top" isLazy {...rest}>
26
+ <PopoverTrigger>
27
+ <Box
28
+ display="inline-flex"
29
+ color="white" // for icon color inherit
30
+ bgColor="gray.800"
31
+ borderRadius="full"
32
+ opacity={0.75}
33
+ _hover={{
34
+ opacity: 1,
35
+ }}
36
+ >
37
+ {icon || <Icon icon={IconTypes.LuInfo} boxSize="sm" />}
38
+ </Box>
39
+ </PopoverTrigger>
40
+ <Portal>
41
+ <PopoverContent boxShadow="2xl" w="fit-content">
42
+ <PopoverArrow />
43
+ <PopoverBody>{children}</PopoverBody>
44
+ </PopoverContent>
45
+ </Portal>
46
+ </Popover>
47
+ );
48
+ };
@@ -0,0 +1 @@
1
+ export { InfoSprinkle } from './InfoSprinkle';
@@ -0,0 +1,18 @@
1
+ import {
2
+ Code as ChakraCode,
3
+ CodeProps as ChakraCodeProps,
4
+ } from '@chakra-ui/react';
5
+
6
+ export const InlineCode = ({ children, ...rest }: ChakraCodeProps) => {
7
+ return (
8
+ <ChakraCode
9
+ bg="gray.50"
10
+ color="primary.dark"
11
+ borderRadius="sm"
12
+ fontSize="p"
13
+ {...rest}
14
+ >
15
+ {children}
16
+ </ChakraCode>
17
+ );
18
+ };
@@ -0,0 +1 @@
1
+ export { InlineCode } from './InlineCode';