@infonomic/uikit 2.0.0 → 2.1.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 (312) hide show
  1. package/dist/components/card/card.d.ts.map +1 -1
  2. package/package.json +9 -5
  3. package/src/astro.d.ts +43 -0
  4. package/src/astro.js +2 -2
  5. package/src/components/@types/shared.ts +24 -0
  6. package/src/components/accordion/accordion.module.css +60 -0
  7. package/src/components/accordion/accordion.stories.tsx +117 -0
  8. package/src/components/accordion/accordion.tsx +105 -0
  9. package/src/components/animation/fade-in-lift.stories.tsx +81 -0
  10. package/src/components/animation/fade-in-lift.tsx +42 -0
  11. package/src/components/avatar/avatar.module.css +54 -0
  12. package/src/components/avatar/avatar.stories.tsx +28 -0
  13. package/src/components/avatar/avatar.tsx +19 -0
  14. package/src/components/button/@types/button.ts +17 -0
  15. package/src/components/button/button-group.module.css +17 -0
  16. package/src/components/button/button-group.stories.tsx +45 -0
  17. package/src/components/button/button-group.tsx +132 -0
  18. package/src/components/button/button-icon.stories.tsx +145 -0
  19. package/src/components/button/button-intents.stories.tsx +50 -0
  20. package/src/components/button/button-variants.stories.tsx +60 -0
  21. package/src/components/button/button.astro +86 -0
  22. package/src/components/button/button.module.css +533 -0
  23. package/src/components/button/button.tsx +81 -0
  24. package/src/components/button/control-buttons.module.css +144 -0
  25. package/src/components/button/control-buttons.stories.tsx +60 -0
  26. package/src/components/button/control-buttons.tsx +137 -0
  27. package/src/components/button/copy-button.module.css +31 -0
  28. package/src/components/button/copy-button.stories.tsx +50 -0
  29. package/src/components/button/copy-button.tsx +92 -0
  30. package/src/components/button/icon-button.astro +47 -0
  31. package/src/components/button/icon-button.tsx +44 -0
  32. package/src/components/button/index.ts +5 -0
  33. package/src/components/calendar/calendar.module.css +315 -0
  34. package/src/components/calendar/calendar.stories.tsx +139 -0
  35. package/src/components/calendar/calendar.tsx +173 -0
  36. package/src/components/card/card-content.astro +14 -0
  37. package/src/components/card/card-description.astro +14 -0
  38. package/src/components/card/card-footer.astro +14 -0
  39. package/src/components/card/card-header.astro +14 -0
  40. package/src/components/card/card-title.astro +14 -0
  41. package/src/components/card/card.astro +41 -0
  42. package/src/components/card/card.module.css +67 -0
  43. package/src/components/card/card.stories.tsx +61 -0
  44. package/src/components/card/card.tsx +86 -0
  45. package/src/components/container/container.astro +13 -0
  46. package/src/components/container/container.module.css +28 -0
  47. package/src/components/container/container.stories.tsx +42 -0
  48. package/src/components/container/container.tsx +23 -0
  49. package/src/components/dropdown/dropdown.module.css +131 -0
  50. package/src/components/dropdown/dropdown.stories.tsx +103 -0
  51. package/src/components/dropdown/dropdown.tsx +193 -0
  52. package/src/components/hamburger/hamburger.astro +30 -0
  53. package/src/components/hamburger/hamburger.tsx +66 -0
  54. package/src/components/input/@types/checkbox.ts +20 -0
  55. package/src/components/input/@types/input.ts +20 -0
  56. package/src/components/input/checkbox-group.tsx +78 -0
  57. package/src/components/input/checkbox.module.css +267 -0
  58. package/src/components/input/checkbox.stories.tsx +240 -0
  59. package/src/components/input/checkbox.tsx +95 -0
  60. package/src/components/input/error-text.astro +14 -0
  61. package/src/components/input/error-text.module.css +19 -0
  62. package/src/components/input/error-text.tsx +18 -0
  63. package/src/components/input/errors.tsx +37 -0
  64. package/src/components/input/help-text.astro +13 -0
  65. package/src/components/input/help-text.module.css +19 -0
  66. package/src/components/input/help-text.tsx +13 -0
  67. package/src/components/input/index.tsx +8 -0
  68. package/src/components/input/input-adornment.astro +26 -0
  69. package/src/components/input/input-adornment.module.css +18 -0
  70. package/src/components/input/input-adornment.tsx +36 -0
  71. package/src/components/input/input.astro +99 -0
  72. package/src/components/input/input.module.css +310 -0
  73. package/src/components/input/input.stories.tsx +174 -0
  74. package/src/components/input/input.tsx +103 -0
  75. package/src/components/input/label.astro +24 -0
  76. package/src/components/input/label.module.css +28 -0
  77. package/src/components/input/label.tsx +25 -0
  78. package/src/components/input/radio-group.module.css +219 -0
  79. package/src/components/input/radio-group.stories.tsx +73 -0
  80. package/src/components/input/radio-group.tsx +67 -0
  81. package/src/components/input/select.module.css +75 -0
  82. package/src/components/input/select.stories.tsx +34 -0
  83. package/src/components/input/select.tsx +115 -0
  84. package/src/components/input/text-area.module.css +9 -0
  85. package/src/components/input/text-area.stories.tsx +51 -0
  86. package/src/components/input/text-area.tsx +81 -0
  87. package/src/components/input/utils.ts +21 -0
  88. package/src/components/notifications/@types/alert.ts +12 -0
  89. package/src/components/notifications/@types/toast.ts +12 -0
  90. package/src/components/notifications/alert.module.css +114 -0
  91. package/src/components/notifications/alert.stories.tsx +39 -0
  92. package/src/components/notifications/alert.tsx +117 -0
  93. package/src/components/notifications/index.ts +2 -0
  94. package/src/components/notifications/toast.module.css +237 -0
  95. package/src/components/notifications/toast.stories.tsx +42 -0
  96. package/src/components/notifications/toast.tsx +124 -0
  97. package/src/components/overlay/index.stories.tsx +29 -0
  98. package/src/components/overlay/index.ts +2 -0
  99. package/src/components/overlay/overlay.module.css +41 -0
  100. package/src/components/overlay/overlay.tsx +61 -0
  101. package/src/components/pager/@types/index.ts +2 -0
  102. package/src/components/pager/ellipses.tsx +18 -0
  103. package/src/components/pager/event-pager.tsx +18 -0
  104. package/src/components/pager/first-button.tsx +53 -0
  105. package/src/components/pager/hooks/types/usePagination.ts +80 -0
  106. package/src/components/pager/hooks/usePagination.ts +140 -0
  107. package/src/components/pager/icons/first.tsx +33 -0
  108. package/src/components/pager/icons/index.tsx +4 -0
  109. package/src/components/pager/icons/last.tsx +33 -0
  110. package/src/components/pager/icons/next.tsx +20 -0
  111. package/src/components/pager/icons/previous.tsx +20 -0
  112. package/src/components/pager/index.ts +4 -0
  113. package/src/components/pager/last-button.tsx +57 -0
  114. package/src/components/pager/next-button.tsx +55 -0
  115. package/src/components/pager/number-button.tsx +83 -0
  116. package/src/components/pager/pagination.module.css +165 -0
  117. package/src/components/pager/pagination.stories.tsx +190 -0
  118. package/src/components/pager/pagination.tsx +266 -0
  119. package/src/components/pager/previous-button.tsx +51 -0
  120. package/src/components/scroll-area/scroll-area.module.css +80 -0
  121. package/src/components/scroll-area/scroll-area.stories.tsx +33 -0
  122. package/src/components/scroll-area/scroll-area.tsx +22 -0
  123. package/src/components/scroll-to-top/scroll-to-top.tsx +59 -0
  124. package/src/components/section/section.astro +13 -0
  125. package/src/components/section/section.module.css +7 -0
  126. package/src/components/section/section.tsx +23 -0
  127. package/src/components/shimmer/shimmer.module.css +53 -0
  128. package/src/components/shimmer/shimmer.stories.tsx +24 -0
  129. package/src/components/shimmer/shimmer.tsx +70 -0
  130. package/src/components/table/table.module.css +100 -0
  131. package/src/components/table/table.stories.tsx +95 -0
  132. package/src/components/table/table.tsx +165 -0
  133. package/src/components/tabs/tabs.module.css +64 -0
  134. package/src/components/tabs/tabs.stories.tsx +47 -0
  135. package/src/components/tabs/tabs.tsx +75 -0
  136. package/src/components/timeline/timeline.module.css +87 -0
  137. package/src/components/timeline/timeline.stories.tsx +50 -0
  138. package/src/components/timeline/timeline.tsx +177 -0
  139. package/src/components/tooltip/tooltip.module.css +55 -0
  140. package/src/components/tooltip/tooltip.stories.tsx +59 -0
  141. package/src/components/tooltip/tooltip.tsx +51 -0
  142. package/src/declarations.d.ts +4 -0
  143. package/src/hooks/use-media-query.ts +20 -0
  144. package/src/icons/activity-icon.tsx +40 -0
  145. package/src/icons/calendar-icon.tsx +39 -0
  146. package/src/icons/check-icon.tsx +33 -0
  147. package/src/icons/chevron-down-icon.tsx +39 -0
  148. package/src/icons/chevron-left-double-icon.tsx +58 -0
  149. package/src/icons/chevron-left-icon.tsx +58 -0
  150. package/src/icons/chevron-right-double-icon.tsx +58 -0
  151. package/src/icons/chevron-right-icon.tsx +58 -0
  152. package/src/icons/chevrons-up-down.tsx +37 -0
  153. package/src/icons/close-icon.astro +38 -0
  154. package/src/icons/close-icon.tsx +30 -0
  155. package/src/icons/copy-icon.tsx +35 -0
  156. package/src/icons/danger-icon.tsx +18 -0
  157. package/src/icons/dashboard-icon.tsx +41 -0
  158. package/src/icons/delete-icon.tsx +34 -0
  159. package/src/icons/document-icon.tsx +38 -0
  160. package/src/icons/download-icon.tsx +39 -0
  161. package/src/icons/edit-icon.tsx +35 -0
  162. package/src/icons/ellipsis-icon.tsx +38 -0
  163. package/src/icons/email-icon.tsx +33 -0
  164. package/src/icons/external-link-icon.tsx +39 -0
  165. package/src/icons/github-icon.tsx +27 -0
  166. package/src/icons/globe-icon.tsx +50 -0
  167. package/src/icons/google-icon.tsx +44 -0
  168. package/src/icons/gripper-vertical-icon.tsx +43 -0
  169. package/src/icons/history-icon.tsx +32 -0
  170. package/src/icons/home-icon.tsx +34 -0
  171. package/src/icons/icon-element.astro +27 -0
  172. package/src/icons/icon-element.tsx +32 -0
  173. package/src/icons/icon-sprite.tsx +18 -0
  174. package/src/icons/icons.module.css +147 -0
  175. package/src/icons/index.stories.tsx +25 -0
  176. package/src/icons/index.ts +39 -0
  177. package/src/icons/info-icon.tsx +18 -0
  178. package/src/icons/infonomic-icon.tsx +173 -0
  179. package/src/icons/light-icon.astro +36 -0
  180. package/src/icons/light-icon.tsx +29 -0
  181. package/src/icons/location-pin-icon.tsx +36 -0
  182. package/src/icons/moon-icon.astro +38 -0
  183. package/src/icons/moon-icon.tsx +42 -0
  184. package/src/icons/plus-icon.tsx +34 -0
  185. package/src/icons/primary-icon.tsx +22 -0
  186. package/src/icons/refresh-icon.tsx +33 -0
  187. package/src/icons/return-icon.tsx +36 -0
  188. package/src/icons/roles-icon.tsx +34 -0
  189. package/src/icons/search-icon.astro +40 -0
  190. package/src/icons/search-icon.tsx +29 -0
  191. package/src/icons/search-menu-icon.tsx +42 -0
  192. package/src/icons/settings-gear-icon.tsx +36 -0
  193. package/src/icons/settings-sliders-icon.tsx +43 -0
  194. package/src/icons/sign-out-icon.tsx +35 -0
  195. package/src/icons/source/icon-calendar.svg +1 -0
  196. package/src/icons/source/icon-check.svg +4 -0
  197. package/src/icons/source/icon-close.svg +3 -0
  198. package/src/icons/source/icon-coinbase.svg +9 -0
  199. package/src/icons/source/icon-copy.svg +4 -0
  200. package/src/icons/source/icon-document.svg +5 -0
  201. package/src/icons/source/icon-download.svg +4 -0
  202. package/src/icons/source/icon-edit.svg +6 -0
  203. package/src/icons/source/icon-eth-purple.svg +15 -0
  204. package/src/icons/source/icon-etherscan.svg +5 -0
  205. package/src/icons/source/icon-external-link.svg +4 -0
  206. package/src/icons/source/icon-globe.svg +7 -0
  207. package/src/icons/source/icon-gripper-vertical.svg +9 -0
  208. package/src/icons/source/icon-info.svg +4 -0
  209. package/src/icons/source/icon-infonomic.svg +43 -0
  210. package/src/icons/source/icon-ledger.svg +4 -0
  211. package/src/icons/source/icon-light.svg +3 -0
  212. package/src/icons/source/icon-location-pin.svg +8 -0
  213. package/src/icons/source/icon-logout.svg +6 -0
  214. package/src/icons/source/icon-metamask.svg +32 -0
  215. package/src/icons/source/icon-moon.svg +3 -0
  216. package/src/icons/source/icon-plus.svg +4 -0
  217. package/src/icons/source/icon-refresh.svg +4 -0
  218. package/src/icons/source/icon-return.svg +4 -0
  219. package/src/icons/source/icon-search-menu.svg +13 -0
  220. package/src/icons/source/icon-search.svg +3 -0
  221. package/src/icons/source/icon-settings-gear.svg +5 -0
  222. package/src/icons/source/icon-settings.svg +12 -0
  223. package/src/icons/source/icon-wallet.svg +3 -0
  224. package/src/icons/source/icon-walletconnect.svg +4 -0
  225. package/src/icons/source/icon-x.svg +4 -0
  226. package/src/icons/stopwatch-icon.tsx +39 -0
  227. package/src/icons/success-icon.tsx +18 -0
  228. package/src/icons/types/icon.ts +8 -0
  229. package/src/icons/user-icon.tsx +33 -0
  230. package/src/icons/users-icon.tsx +35 -0
  231. package/src/icons/wallet-icon.tsx +29 -0
  232. package/src/icons/warning-icon.tsx +18 -0
  233. package/src/icons/x-icon.tsx +33 -0
  234. package/src/loaders/ellipses.tsx +36 -0
  235. package/src/loaders/loaders.stories.tsx +46 -0
  236. package/src/loaders/ring.tsx +33 -0
  237. package/src/loaders/spinner.tsx +28 -0
  238. package/src/loaders/types/index.ts +6 -0
  239. package/src/react.ts +99 -0
  240. package/src/styles/base/animations.css +143 -0
  241. package/src/styles/base/base.css +5 -0
  242. package/src/styles/base/colors.css +163 -0
  243. package/src/styles/base/colors.stories.tsx +671 -0
  244. package/src/styles/base/reset.css +464 -0
  245. package/src/styles/base/typography.css +25 -0
  246. package/src/styles/base/vars.css +188 -0
  247. package/src/styles/components/card.css +20 -0
  248. package/src/styles/components/checkbox.css +55 -0
  249. package/src/styles/components/components.css +11 -0
  250. package/src/styles/components/directional-button.css +92 -0
  251. package/src/styles/components/dropdown.css +19 -0
  252. package/src/styles/components/fade-in-lift.css +13 -0
  253. package/src/styles/components/hamburger.css +107 -0
  254. package/src/styles/components/icon-element.css +4 -0
  255. package/src/styles/components/list-checkbox.css +60 -0
  256. package/src/styles/components/loaders.css +196 -0
  257. package/src/styles/components/popover.css +15 -0
  258. package/src/styles/components/scroll-to-top.css +89 -0
  259. package/src/styles/components/toast.css +18 -0
  260. package/src/styles/styles.css +6 -0
  261. package/src/styles/theme/autofill.css +58 -0
  262. package/src/styles/theme/scrollers.css +52 -0
  263. package/src/styles/theme/theme.css +130 -0
  264. package/src/styles/theme/theme.stories.tsx +33 -0
  265. package/src/styles/typography/code.stories.tsx +76 -0
  266. package/src/styles/typography/default.stories.tsx +51 -0
  267. package/src/styles/typography/fonts.css +30 -0
  268. package/src/styles/typography/lists.stories.tsx +50 -0
  269. package/src/styles/typography/prose.css +404 -0
  270. package/src/styles/typography/quote.stories.tsx +37 -0
  271. package/src/styles/typography.css +24 -0
  272. package/src/styles/utils/scroll-layout-shift.css +9 -0
  273. package/src/styles/utils/utility-classes.css +1278 -0
  274. package/src/styles/utils/utils.css +2 -0
  275. package/src/theme/theme-provider/index.ts +1 -0
  276. package/src/theme/theme-provider/provider.tsx +44 -0
  277. package/src/utils/capitalize.ts +6 -0
  278. package/src/utils/externalLinkProps.ts +6 -0
  279. package/src/utils/findMatch.ts +7 -0
  280. package/src/utils/getPortalRoot.ts +3 -0
  281. package/src/utils/isTouchDevice.ts +11 -0
  282. package/src/utils/objectsToArray.ts +15 -0
  283. package/src/utils/objectsToString.ts +5 -0
  284. package/src/utils/polymorphic.ts +16 -0
  285. package/src/utils/to-kebab-case.ts +5 -0
  286. package/src/widgets/datepicker/datepicker.module.css +189 -0
  287. package/src/widgets/datepicker/datepicker.stories.tsx +25 -0
  288. package/src/widgets/datepicker/datepicker.tsx +310 -0
  289. package/src/widgets/drawer/drawer-container.tsx +26 -0
  290. package/src/widgets/drawer/drawer-content.tsx +26 -0
  291. package/src/widgets/drawer/drawer-context.tsx +49 -0
  292. package/src/widgets/drawer/drawer-header.tsx +27 -0
  293. package/src/widgets/drawer/drawer-top-actions.tsx +27 -0
  294. package/src/widgets/drawer/drawer-wrapper.tsx +54 -0
  295. package/src/widgets/drawer/drawer.module.css +116 -0
  296. package/src/widgets/drawer/drawer.stories.tsx +224 -0
  297. package/src/widgets/drawer/drawer.tsx +115 -0
  298. package/src/widgets/drawer/motionDomAnimation.ts +4 -0
  299. package/src/widgets/drawer/motionDomMax.ts +4 -0
  300. package/src/widgets/modal/modal-actions.tsx +26 -0
  301. package/src/widgets/modal/modal-container.tsx +26 -0
  302. package/src/widgets/modal/modal-content.tsx +26 -0
  303. package/src/widgets/modal/modal-header.tsx +27 -0
  304. package/src/widgets/modal/modal-wrapper.tsx +50 -0
  305. package/src/widgets/modal/modal.module.css +85 -0
  306. package/src/widgets/modal/modal.stories.tsx +71 -0
  307. package/src/widgets/modal/modal.tsx +110 -0
  308. package/src/widgets/modal/motionDomAnimation.ts +4 -0
  309. package/src/widgets/modal/motionDomMax.ts +4 -0
  310. package/src/widgets/search/index.ts +1 -0
  311. package/src/widgets/search/search.stories.tsx +18 -0
  312. package/src/widgets/search/search.tsx +186 -0
@@ -0,0 +1,50 @@
1
+ import type React from 'react'
2
+
3
+ import cx from 'classnames'
4
+
5
+ import { IconElement } from './icon-element.js'
6
+
7
+ import type { IconProps } from './types/icon.js'
8
+
9
+ import styles from './icons.module.css'
10
+
11
+ export const GlobeIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
12
+ const applied = cx(styles['fill-contrast'], styles['stroke-none'], svgClassName)
13
+
14
+ return (
15
+ <IconElement className={cx('globe-icon flex items-center justify-center', className)} {...rest}>
16
+ <svg
17
+ className={applied}
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ focusable="false"
20
+ aria-hidden="true"
21
+ width="20"
22
+ height="20"
23
+ viewBox="0 0 15 15"
24
+ >
25
+ <path
26
+ d="M7.49996 1.80002C4.35194 1.80002 1.79996 4.352 1.79996 7.50002C1.79996 10.648 4.35194 13.2 7.49996 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.352 10.648 1.80002 7.49996 1.80002ZM0.899963 7.50002C0.899963 3.85494 3.85488 0.900024 7.49996 0.900024C11.145 0.900024 14.1 3.85494 14.1 7.50002C14.1 11.1451 11.145 14.1 7.49996 14.1C3.85488 14.1 0.899963 11.1451 0.899963 7.50002Z"
27
+ fillRule="evenodd"
28
+ clipRule="evenodd"
29
+ ></path>
30
+ <path
31
+ d="M13.4999 7.89998H1.49994V7.09998H13.4999V7.89998Z"
32
+ fillRule="evenodd"
33
+ clipRule="evenodd"
34
+ ></path>
35
+ <path
36
+ d="M7.09991 13.5V1.5H7.89991V13.5H7.09991zM10.375 7.49998C10.375 5.32724 9.59364 3.17778 8.06183 1.75656L8.53793 1.24341C10.2396 2.82218 11.075 5.17273 11.075 7.49998 11.075 9.82724 10.2396 12.1778 8.53793 13.7566L8.06183 13.2434C9.59364 11.8222 10.375 9.67273 10.375 7.49998zM3.99969 7.5C3.99969 5.17611 4.80786 2.82678 6.45768 1.24719L6.94177 1.75281C5.4582 3.17323 4.69969 5.32389 4.69969 7.5 4.6997 9.67611 5.45822 11.8268 6.94179 13.2472L6.45769 13.7528C4.80788 12.1732 3.9997 9.8239 3.99969 7.5z"
37
+ fillRule="evenodd"
38
+ clipRule="evenodd"
39
+ ></path>
40
+ <path
41
+ d="M7.49996 3.95801C9.66928 3.95801 11.8753 4.35915 13.3706 5.19448 13.5394 5.28875 13.5998 5.50197 13.5055 5.67073 13.4113 5.83948 13.198 5.89987 13.0293 5.8056 11.6794 5.05155 9.60799 4.65801 7.49996 4.65801 5.39192 4.65801 3.32052 5.05155 1.97064 5.8056 1.80188 5.89987 1.58866 5.83948 1.49439 5.67073 1.40013 5.50197 1.46051 5.28875 1.62927 5.19448 3.12466 4.35915 5.33063 3.95801 7.49996 3.95801zM7.49996 10.85C9.66928 10.85 11.8753 10.4488 13.3706 9.6135 13.5394 9.51924 13.5998 9.30601 13.5055 9.13726 13.4113 8.9685 13.198 8.90812 13.0293 9.00238 11.6794 9.75643 9.60799 10.15 7.49996 10.15 5.39192 10.15 3.32052 9.75643 1.97064 9.00239 1.80188 8.90812 1.58866 8.9685 1.49439 9.13726 1.40013 9.30601 1.46051 9.51924 1.62927 9.6135 3.12466 10.4488 5.33063 10.85 7.49996 10.85z"
42
+ fillRule="evenodd"
43
+ clipRule="evenodd"
44
+ ></path>
45
+ </svg>
46
+ </IconElement>
47
+ )
48
+ }
49
+
50
+ GlobeIcon.displayName = 'GlobeIcon'
@@ -0,0 +1,44 @@
1
+ import type React from 'react'
2
+
3
+ import cx from 'classnames'
4
+
5
+ import { IconElement } from './icon-element.js'
6
+
7
+ import type { IconProps } from './types/icon.js'
8
+
9
+ export const GoogleIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
10
+ const applied = svgClassName
11
+
12
+ return (
13
+ <IconElement className={cx('google-icon', className)} {...rest}>
14
+ <svg
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ viewBox="0 0 24 24"
17
+ className={applied}
18
+ focusable="false"
19
+ aria-hidden="true"
20
+ strokeWidth={1.75}
21
+ >
22
+ <path
23
+ d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"
24
+ fill="#4285F4"
25
+ />
26
+ <path
27
+ d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"
28
+ fill="#34A853"
29
+ />
30
+ <path
31
+ d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"
32
+ fill="#FBBC05"
33
+ />
34
+ <path
35
+ d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"
36
+ fill="#EA4335"
37
+ />
38
+ <path d="M1 1h22v22H1z" fill="none" />
39
+ </svg>
40
+ </IconElement>
41
+ )
42
+ }
43
+
44
+ GoogleIcon.displayName = 'GoogleIcon'
@@ -0,0 +1,43 @@
1
+ import type React from 'react'
2
+
3
+ import cx from 'classnames'
4
+
5
+ import { IconElement } from './icon-element.js'
6
+
7
+ import type { IconProps } from './types/icon.js'
8
+
9
+ import styles from './icons.module.css'
10
+
11
+ export const GripperVerticalIcon = ({
12
+ className,
13
+ svgClassName,
14
+ ...rest
15
+ }: IconProps): React.JSX.Element => {
16
+ const applied = cx(styles['fill-none'], styles['stroke-contrast'], svgClassName)
17
+
18
+ return (
19
+ <IconElement className={cx('gripper-vertical-icon', className)} {...rest}>
20
+ <svg
21
+ className={applied}
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ focusable="false"
24
+ aria-hidden="true"
25
+ viewBox="0 0 24 24"
26
+ strokeWidth="1.5"
27
+ fill="none"
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ >
31
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
32
+ <path d="M9 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
33
+ <path d="M9 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
34
+ <path d="M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
35
+ <path d="M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
36
+ <path d="M15 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
37
+ <path d="M15 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />
38
+ </svg>
39
+ </IconElement>
40
+ )
41
+ }
42
+
43
+ GripperVerticalIcon.displayName = 'GripperVerticalIcon'
@@ -0,0 +1,32 @@
1
+ import cx from 'classnames'
2
+ import type React from 'react'
3
+
4
+ import { IconElement } from './icon-element.jsx'
5
+ import styles from './icons.module.css'
6
+ import type { IconProps } from './types/icon.js'
7
+
8
+ export const HistoryIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
9
+ const applied = cx(styles['stroke-contrast'], svgClassName)
10
+
11
+ return (
12
+ <IconElement className={cx('history-icon', className)} {...rest}>
13
+ <svg
14
+ className={applied}
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ focusable="false"
17
+ aria-hidden="true"
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ strokeWidth="1"
21
+ strokeLinecap="round"
22
+ strokeLinejoin="round"
23
+ >
24
+ <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" />
25
+ <path d="M3 3v5h5" />
26
+ <path d="M12 7v5l4 2" />
27
+ </svg>
28
+ </IconElement>
29
+ )
30
+ }
31
+
32
+ HistoryIcon.displayName = 'HistoryIcon'
@@ -0,0 +1,34 @@
1
+ import type React from 'react'
2
+
3
+ import cx from 'classnames'
4
+
5
+ import { IconElement } from './icon-element.js'
6
+
7
+ import type { IconProps } from './types/icon.js'
8
+
9
+ import styles from './icons.module.css'
10
+
11
+ export const HomeIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
12
+ const applied = cx(styles['fill-none'], styles['stroke-contrast'], svgClassName)
13
+
14
+ return (
15
+ <IconElement className={cx('home-icon', className)} {...rest}>
16
+ <svg
17
+ className={applied}
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ focusable="false"
20
+ aria-hidden="true"
21
+ strokeLinecap="round"
22
+ strokeLinejoin="round"
23
+ viewBox="0 0 24 24"
24
+ strokeWidth={1.75}
25
+ >
26
+ <path d="M5 12l-2 0l9 -9l9 9l-2 0"></path>{' '}
27
+ <path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"></path>{' '}
28
+ <path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"></path>{' '}
29
+ </svg>
30
+ </IconElement>
31
+ )
32
+ }
33
+
34
+ HomeIcon.displayName = 'HomeIcon'
@@ -0,0 +1,27 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+
4
+ interface Props extends HTMLAttributes<'div'> {
5
+ class?: string
6
+ width?: string
7
+ height?: string
8
+ menuItem?: boolean
9
+ }
10
+
11
+ const { class: className, width = '22px', height = '22px', menuItem = false, ...rest } = Astro.props
12
+ ---
13
+
14
+ <div
15
+ style={{
16
+ width,
17
+ height,
18
+ flex: `0 0 ${width}`,
19
+ alignItems: 'center',
20
+ justifyContent: 'center',
21
+ marginRight: menuItem ? '1.2rem' : '0'
22
+ }}
23
+ class={className}
24
+ {...rest}
25
+ >
26
+ <slot />
27
+ </div>
@@ -0,0 +1,32 @@
1
+ import type { ReactNode } from 'react'
2
+ import type React from 'react'
3
+
4
+ import cx from 'classnames'
5
+
6
+ export interface IconElementProps extends React.ComponentProps<'div'> {
7
+ width?: string
8
+ height?: string
9
+ menuItem?: boolean
10
+ children: ReactNode
11
+ className?: string
12
+ }
13
+
14
+ export const IconElement = (props: IconElementProps): React.JSX.Element => {
15
+ const { className, children, width = '22px', height = '22px', menuItem = false, ...rest } = props
16
+ return (
17
+ <div
18
+ style={{
19
+ width,
20
+ height,
21
+ flex: `0 0 ${width}`,
22
+ alignItems: 'center',
23
+ justifyContent: 'center',
24
+ marginRight: menuItem != null && menuItem ? '1.2rem' : '0',
25
+ }}
26
+ className={cx('component--icon-element-root', className)}
27
+ {...rest}
28
+ >
29
+ {children}
30
+ </div>
31
+ )
32
+ }
@@ -0,0 +1,18 @@
1
+ import type React from 'react'
2
+ import ReactDOM from 'react-dom'
3
+
4
+ // keep a list of the icon ids we put in the symbol
5
+ const icons = ['icon-1', 'icon-2']
6
+
7
+ export interface IconSpriteProps {
8
+ id: string
9
+ }
10
+
11
+ // then define an Icon component that references the
12
+ export function IconSprite({ id, ...props }: IconSpriteProps): React.JSX.Element {
13
+ return (
14
+ <svg {...props}>
15
+ <use href={`/sprite.svg#${id}`} />
16
+ </svg>
17
+ )
18
+ }
@@ -0,0 +1,147 @@
1
+ @layer infonomic-base, infonomic-utilities, infonomic-theme, infonomic-components;
2
+
3
+ @layer infonomic-components {
4
+ .stroke-none {
5
+ stroke: none;
6
+ }
7
+
8
+ .stroke-current {
9
+ stroke: currentColor;
10
+ }
11
+
12
+ .stroke-gray {
13
+ stroke: var(--gray-800);
14
+ }
15
+
16
+ .stroke-gray:is(:global(.dark) *) {
17
+ stroke: var(--gray-300);
18
+ }
19
+
20
+ .stroke-contrast {
21
+ stroke: var(--gray-950);
22
+ }
23
+
24
+ .stroke-contrast:is(:global(.dark) *) {
25
+ stroke: var(--gray-100);
26
+ }
27
+
28
+ .stroke-primary {
29
+ stroke: var(--primary-500);
30
+ }
31
+
32
+ .stroke-primary:is(:global(.dark) *) {
33
+ stroke: var(--primary-400);
34
+ }
35
+
36
+ .stroke-secondary {
37
+ stroke: var(--secondary-500);
38
+ }
39
+
40
+ .stroke-secondary:is(:global(.dark) *) {
41
+ stroke: var(--secondary-400);
42
+ }
43
+
44
+ .stroke-success {
45
+ stroke: var(--green-500);
46
+ }
47
+
48
+ .stroke-success:is(:global(.dark) *) {
49
+ stroke: var(--green-400);
50
+ }
51
+
52
+ .stroke-info {
53
+ stroke: var(--blue-500);
54
+ }
55
+
56
+ .stroke-info:is(:global(.dark) *) {
57
+ stroke: var(--blue-400);
58
+ }
59
+
60
+ .stroke-warning {
61
+ stroke: var(--yellow-500);
62
+ }
63
+
64
+ .stroke-warning:is(:global(.dark) *) {
65
+ stroke: var(--yellow-400);
66
+ }
67
+
68
+ .stroke-danger {
69
+ stroke: var(--red-500);
70
+ }
71
+
72
+ .stroke-danger:is(:global(.dark) *) {
73
+ stroke: var(--red-400);
74
+ }
75
+
76
+ .fill-none {
77
+ fill: none;
78
+ }
79
+
80
+ .fill-current {
81
+ fill: currentColor;
82
+ }
83
+
84
+ .fill-contrast {
85
+ fill: black;
86
+ }
87
+
88
+ .fill-contrast:is(:global(.dark) *) {
89
+ fill: white;
90
+ }
91
+
92
+ .fill-gray {
93
+ stroke: var(--gray-700);
94
+ }
95
+
96
+ .fill-gray:is(:global(.dark) *) {
97
+ stroke: var(--gray-300);
98
+ }
99
+
100
+ .fill-primary {
101
+ fill: var(--primary-500);
102
+ }
103
+
104
+ .fill-primary:is(:global(.dark) *) {
105
+ fill: var(--primary-400);
106
+ }
107
+
108
+ .fill-secondary {
109
+ fill: var(--secondary-500);
110
+ }
111
+
112
+ .fill-secondary:is(:global(.dark) *) {
113
+ fill: var(--secondary-400);
114
+ }
115
+
116
+ .fill-success {
117
+ fill: var(--green-500);
118
+ }
119
+
120
+ .fill-success:is(:global(.dark) *) {
121
+ fill: var(--green-400);
122
+ }
123
+
124
+ .fill-info {
125
+ fill: var(--blue-500);
126
+ }
127
+
128
+ .fill-info:is(:global(.dark) *) {
129
+ fill: var(--blue-400);
130
+ }
131
+
132
+ .fill-warning {
133
+ fill: var(--yellow-500);
134
+ }
135
+
136
+ .fill-warning:is(:global(.dark) *) {
137
+ fill: var(--yellow-400);
138
+ }
139
+
140
+ .fill-danger {
141
+ fill: var(--red-500);
142
+ }
143
+
144
+ .fill-danger:is(:global(.dark) *) {
145
+ fill: var(--red-400);
146
+ }
147
+ }
@@ -0,0 +1,25 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import type React from 'react'
3
+
4
+ import { DangerIcon } from './danger-icon.js'
5
+ import { InfoIcon } from './info-icon.js'
6
+ import { SuccessIcon } from './success-icon.js'
7
+ import { WarningIcon } from './warning-icon.js'
8
+
9
+ export default {
10
+ title: 'Icons/Sprites',
11
+ argTypes: {},
12
+ }
13
+
14
+ export const Default = (): React.JSX.Element => {
15
+ return (
16
+ <div className="mb-6">
17
+ <div className="max-w-[800px] grid grid-cols-12">
18
+ <InfoIcon />
19
+ <WarningIcon />
20
+ <SuccessIcon />
21
+ <DangerIcon />
22
+ </div>
23
+ </div>
24
+ )
25
+ }
@@ -0,0 +1,39 @@
1
+ export * from './danger-icon.js'
2
+ export * from './icon-element.js'
3
+ export * from './info-icon.js'
4
+ export * from './light-icon.js'
5
+ export * from './moon-icon.js'
6
+ export * from './return-icon.js'
7
+ export * from './success-icon.js'
8
+ export * from './warning-icon.js'
9
+ export * from './wallet-icon.js'
10
+ export * from './globe-icon.js'
11
+ export * from './close-icon.js'
12
+ export * from './search-icon.js'
13
+ export * from './search-menu-icon.js'
14
+ export * from './refresh-icon.js'
15
+ export * from './copy-icon.js'
16
+ export * from './check-icon.js'
17
+ export * from './x-icon.js'
18
+ export * from './calendar-icon.js'
19
+ export * from './location-pin-icon.js'
20
+ export * from './settings-sliders-icon.js'
21
+ export * from './settings-gear-icon.js'
22
+ export * from './infonomic-icon.js'
23
+ export * from './document-icon.js'
24
+ export * from './edit-icon.js'
25
+ export * from './sign-out-icon.js'
26
+ export * from './gripper-vertical-icon.js'
27
+ export * from './plus-icon.js'
28
+ export * from './user-icon.js'
29
+ export * from './users-icon.js'
30
+ export * from './roles-icon.js'
31
+ export * from './home-icon.js'
32
+ export * from './ellipsis-icon.js'
33
+ export * from './email-icon.js'
34
+ export * from './delete-icon.js'
35
+ export * from './activity-icon.js'
36
+ export * from './github-icon.js'
37
+ export * from './google-icon.js'
38
+ export * from './dashboard-icon.js'
39
+ export * from './stopwatch-icon.js'
@@ -0,0 +1,18 @@
1
+ import cx from 'classnames'
2
+ import type React from 'react'
3
+
4
+ import { IconElement } from './icon-element.js'
5
+ import styles from './icons.module.css'
6
+ import type { IconProps } from './types/icon.js'
7
+
8
+ export const InfoIcon = ({ className, svgClassName, ...rest }: IconProps): React.JSX.Element => {
9
+ const applied = cx(styles['fill-info'], svgClassName)
10
+
11
+ return (
12
+ <IconElement className={cx('info-icon', className)} {...rest}>
13
+ <svg className={applied} focusable="false" aria-hidden="true" viewBox="0 0 24 24">
14
+ <path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"></path>
15
+ </svg>
16
+ </IconElement>
17
+ )
18
+ }