@lukso/web-components 1.3.1 → 1.5.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 (303) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +33 -7
  3. package/dist/color-palette/index.js +705 -0
  4. package/dist/color-palette/index.umd.cjs +1 -0
  5. package/dist/components/index.d.ts +2 -0
  6. package/dist/components/index.js +5909 -1768
  7. package/dist/components/index.umd.cjs +3534 -72
  8. package/dist/components/lukso-button/index.d.ts +10 -1
  9. package/dist/components/lukso-button/index.js +234 -185
  10. package/dist/components/lukso-button/index.umd.cjs +32 -21
  11. package/dist/components/lukso-card/index.d.ts +4 -4
  12. package/dist/components/lukso-card/index.js +89 -80
  13. package/dist/components/lukso-card/index.umd.cjs +11 -11
  14. package/dist/components/lukso-icon/icons/add-photo.d.ts +3 -0
  15. package/dist/components/lukso-icon/icons/arrow-down-lg.d.ts +3 -0
  16. package/dist/components/lukso-icon/icons/arrow-down-sm.d.ts +3 -0
  17. package/dist/components/lukso-icon/icons/arrow-left-lg.d.ts +3 -0
  18. package/dist/components/lukso-icon/icons/arrow-left-sm.d.ts +3 -0
  19. package/dist/components/lukso-icon/icons/arrow-right-lg.d.ts +3 -0
  20. package/dist/components/lukso-icon/icons/arrow-right-sm.d.ts +3 -0
  21. package/dist/components/lukso-icon/icons/arrow-up-lg.d.ts +3 -0
  22. package/dist/components/lukso-icon/icons/arrow-up-sm.d.ts +3 -0
  23. package/dist/components/lukso-icon/icons/barbell-outline.d.ts +3 -0
  24. package/dist/components/lukso-icon/icons/bulb-outline.d.ts +3 -0
  25. package/dist/components/lukso-icon/icons/camera.d.ts +3 -0
  26. package/dist/components/lukso-icon/icons/clipboard.d.ts +3 -0
  27. package/dist/components/lukso-icon/icons/clock.d.ts +3 -0
  28. package/dist/components/lukso-icon/icons/close-lg.d.ts +3 -0
  29. package/dist/components/lukso-icon/icons/close-sm.d.ts +3 -0
  30. package/dist/components/lukso-icon/icons/cloud.d.ts +3 -0
  31. package/dist/components/lukso-icon/icons/compass-outline.d.ts +3 -0
  32. package/dist/components/lukso-icon/icons/complete-filled-fade-in.d.ts +3 -0
  33. package/dist/components/lukso-icon/icons/complete-filled.d.ts +3 -0
  34. package/dist/components/lukso-icon/icons/complete-outline.d.ts +3 -0
  35. package/dist/components/lukso-icon/icons/connect.d.ts +3 -0
  36. package/dist/components/lukso-icon/icons/connections.d.ts +3 -0
  37. package/dist/components/lukso-icon/icons/contract-lock.d.ts +3 -0
  38. package/dist/components/lukso-icon/icons/controller.d.ts +3 -0
  39. package/dist/components/lukso-icon/icons/copy.d.ts +3 -0
  40. package/dist/components/lukso-icon/icons/cross-outline.d.ts +3 -0
  41. package/dist/components/lukso-icon/icons/dots.d.ts +3 -0
  42. package/dist/components/lukso-icon/icons/edit.d.ts +3 -0
  43. package/dist/components/lukso-icon/icons/error.d.ts +3 -0
  44. package/dist/components/lukso-icon/icons/eth-logo.d.ts +3 -0
  45. package/dist/components/lukso-icon/icons/expand.d.ts +3 -0
  46. package/dist/components/lukso-icon/icons/extension.d.ts +3 -0
  47. package/dist/components/lukso-icon/icons/eye-hide.d.ts +3 -0
  48. package/dist/components/lukso-icon/icons/eye-show.d.ts +3 -0
  49. package/dist/components/lukso-icon/icons/filter.d.ts +3 -0
  50. package/dist/components/lukso-icon/icons/fish-outline.d.ts +3 -0
  51. package/dist/components/lukso-icon/icons/flip.d.ts +3 -0
  52. package/dist/components/lukso-icon/icons/globe.d.ts +3 -0
  53. package/dist/components/lukso-icon/icons/google-color.d.ts +3 -0
  54. package/dist/components/lukso-icon/icons/hamburger.d.ts +3 -0
  55. package/dist/components/lukso-icon/icons/infinite.d.ts +3 -0
  56. package/dist/components/lukso-icon/icons/information.d.ts +3 -0
  57. package/dist/components/lukso-icon/icons/key-outline.d.ts +3 -0
  58. package/dist/components/lukso-icon/icons/link.d.ts +3 -0
  59. package/dist/components/lukso-icon/icons/link1.d.ts +3 -0
  60. package/dist/components/lukso-icon/icons/link2.d.ts +3 -0
  61. package/dist/components/lukso-icon/icons/link3.d.ts +3 -0
  62. package/dist/components/lukso-icon/icons/link4.d.ts +3 -0
  63. package/dist/components/lukso-icon/icons/loading.d.ts +3 -0
  64. package/dist/components/lukso-icon/icons/location.d.ts +3 -0
  65. package/dist/components/lukso-icon/icons/locked.d.ts +3 -0
  66. package/dist/components/lukso-icon/icons/login-2.d.ts +3 -0
  67. package/dist/components/lukso-icon/icons/login-3.d.ts +3 -0
  68. package/dist/components/lukso-icon/icons/login.d.ts +3 -0
  69. package/dist/components/lukso-icon/icons/logo-chrome.d.ts +3 -0
  70. package/dist/components/lukso-icon/icons/lyx-logo.d.ts +3 -0
  71. package/dist/components/lukso-icon/icons/mail.d.ts +3 -0
  72. package/dist/components/lukso-icon/icons/menu-1.d.ts +3 -0
  73. package/dist/components/lukso-icon/icons/menu-2.d.ts +3 -0
  74. package/dist/components/lukso-icon/icons/migrate.d.ts +3 -0
  75. package/dist/components/lukso-icon/icons/minimize.d.ts +3 -0
  76. package/dist/components/lukso-icon/icons/network.d.ts +3 -0
  77. package/dist/components/lukso-icon/icons/notifications.d.ts +3 -0
  78. package/dist/components/lukso-icon/icons/phone-portrait-outline.d.ts +3 -0
  79. package/dist/components/lukso-icon/icons/pin.d.ts +3 -0
  80. package/dist/components/lukso-icon/icons/play-filled.d.ts +3 -0
  81. package/dist/components/lukso-icon/icons/play-outline.d.ts +3 -0
  82. package/dist/components/lukso-icon/icons/plus.d.ts +3 -0
  83. package/dist/components/lukso-icon/icons/profile-add.d.ts +3 -0
  84. package/dist/components/lukso-icon/icons/profile-export.d.ts +3 -0
  85. package/dist/components/lukso-icon/icons/profile-import.d.ts +3 -0
  86. package/dist/components/lukso-icon/icons/profile-recovery-2.d.ts +3 -0
  87. package/dist/components/lukso-icon/icons/profile-recovery.d.ts +3 -0
  88. package/dist/components/lukso-icon/icons/profile-restore.d.ts +3 -0
  89. package/dist/components/lukso-icon/icons/profile.d.ts +3 -0
  90. package/dist/components/lukso-icon/icons/progress-complete.d.ts +3 -0
  91. package/dist/components/lukso-icon/icons/progress-indicator.d.ts +3 -0
  92. package/dist/components/lukso-icon/icons/pulse-dot.d.ts +3 -0
  93. package/dist/components/lukso-icon/icons/qr-code.d.ts +3 -0
  94. package/dist/components/lukso-icon/icons/relayer.d.ts +3 -0
  95. package/dist/components/lukso-icon/icons/reload.d.ts +3 -0
  96. package/dist/components/lukso-icon/icons/return-down.d.ts +3 -0
  97. package/dist/components/lukso-icon/icons/return-left.d.ts +3 -0
  98. package/dist/components/lukso-icon/icons/return-right.d.ts +3 -0
  99. package/dist/components/lukso-icon/icons/return-up.d.ts +3 -0
  100. package/dist/components/lukso-icon/icons/search.d.ts +3 -0
  101. package/dist/components/lukso-icon/icons/settings.d.ts +3 -0
  102. package/dist/components/lukso-icon/icons/smart-contract-doc.d.ts +3 -0
  103. package/dist/components/lukso-icon/icons/smart-contract.d.ts +3 -0
  104. package/dist/components/lukso-icon/icons/star-filled.d.ts +3 -0
  105. package/dist/components/lukso-icon/icons/star-outline.d.ts +3 -0
  106. package/dist/components/lukso-icon/icons/step-dot.d.ts +3 -0
  107. package/dist/components/lukso-icon/icons/step-progress.d.ts +3 -0
  108. package/dist/components/lukso-icon/icons/steps.d.ts +3 -0
  109. package/dist/components/lukso-icon/icons/tick.d.ts +3 -0
  110. package/dist/components/lukso-icon/icons/timer-outline.d.ts +3 -0
  111. package/dist/components/lukso-icon/icons/transaction-receive.d.ts +3 -0
  112. package/dist/components/lukso-icon/icons/transaction-send.d.ts +3 -0
  113. package/dist/components/lukso-icon/icons/transfer.d.ts +3 -0
  114. package/dist/components/lukso-icon/icons/trash.d.ts +3 -0
  115. package/dist/components/lukso-icon/icons/turn-down.d.ts +3 -0
  116. package/dist/components/lukso-icon/icons/turn-left.d.ts +3 -0
  117. package/dist/components/lukso-icon/icons/turn-right.d.ts +3 -0
  118. package/dist/components/lukso-icon/icons/turn-up.d.ts +3 -0
  119. package/dist/components/lukso-icon/icons/unlocked.d.ts +3 -0
  120. package/dist/components/lukso-icon/icons/wallet-outline.d.ts +3 -0
  121. package/dist/components/lukso-icon/icons/warning-round.d.ts +3 -0
  122. package/dist/components/lukso-icon/icons/warning-triangle.d.ts +3 -0
  123. package/dist/components/lukso-icon/index.d.ts +24 -0
  124. package/dist/components/lukso-icon/index.js +5061 -0
  125. package/dist/components/lukso-icon/index.umd.cjs +3465 -0
  126. package/dist/components/lukso-input/index.d.ts +36 -0
  127. package/dist/components/lukso-input/index.js +1305 -0
  128. package/dist/components/lukso-input/index.umd.cjs +104 -0
  129. package/dist/components/lukso-navbar/index.d.ts +1 -1
  130. package/dist/components/lukso-navbar/index.js +96 -96
  131. package/dist/components/lukso-navbar/index.umd.cjs +12 -12
  132. package/dist/components/lukso-profile/index.d.ts +1 -1
  133. package/dist/components/lukso-profile/index.js +92 -83
  134. package/dist/components/lukso-profile/index.umd.cjs +12 -12
  135. package/dist/components/lukso-sanitize/index.d.ts +2 -2
  136. package/dist/components/lukso-sanitize/index.js +148 -145
  137. package/dist/components/lukso-sanitize/index.umd.cjs +12 -12
  138. package/dist/components/lukso-tag/index.d.ts +1 -2
  139. package/dist/components/lukso-tag/index.js +97 -93
  140. package/dist/components/lukso-tag/index.umd.cjs +11 -11
  141. package/dist/components/lukso-test/index.d.ts +1 -1
  142. package/dist/components/lukso-test/index.js +491 -491
  143. package/dist/components/lukso-test/index.umd.cjs +22 -22
  144. package/dist/components/lukso-username/index.d.ts +1 -1
  145. package/dist/components/lukso-username/index.js +140 -141
  146. package/dist/components/lukso-username/index.umd.cjs +15 -15
  147. package/dist/components/lukso-wizard/index.d.ts +2 -2
  148. package/dist/components/lukso-wizard/index.js +144 -144
  149. package/dist/components/lukso-wizard/index.umd.cjs +13 -13
  150. package/dist/index.js +5909 -1768
  151. package/dist/index.umd.cjs +3534 -72
  152. package/dist/sass/color-palette.ts +1 -1
  153. package/dist/sass/colors.scss +91 -0
  154. package/{src/shared/utils → dist/sass}/hslColorMap.ts +0 -0
  155. package/dist/sass/main.scss +1 -0
  156. package/dist/shared/directives/custom-class-map/index.d.ts +1 -1
  157. package/dist/shared/styles/color-palette.d.ts +43 -0
  158. package/dist/shared/styles/hslColorMap.d.ts +10 -0
  159. package/dist/shared/tailwind-element/index.js +191 -191
  160. package/dist/shared/tailwind-element/index.umd.cjs +8 -8
  161. package/dist/shared/tailwind-element.js +191 -191
  162. package/dist/shared/tailwind-element.umd.cjs +8 -8
  163. package/dist/styles/main.css +91 -0
  164. package/package.json +19 -2
  165. package/src/components/index.ts +3 -1
  166. package/src/components/lukso-button/index.ts +70 -3
  167. package/src/components/lukso-button/lukso-button.stories.ts +101 -3
  168. package/src/components/lukso-card/lukso-card.stories.ts +6 -2
  169. package/src/components/lukso-icon/icons/add-photo.ts +46 -0
  170. package/src/components/lukso-icon/icons/arrow-down-lg.ts +26 -0
  171. package/src/components/lukso-icon/icons/arrow-down-sm.ts +26 -0
  172. package/src/components/lukso-icon/icons/arrow-left-lg.ts +26 -0
  173. package/src/components/lukso-icon/icons/arrow-left-sm.ts +26 -0
  174. package/src/components/lukso-icon/icons/arrow-right-lg.ts +26 -0
  175. package/src/components/lukso-icon/icons/arrow-right-sm.ts +26 -0
  176. package/src/components/lukso-icon/icons/arrow-up-lg.ts +26 -0
  177. package/src/components/lukso-icon/icons/arrow-up-sm.ts +26 -0
  178. package/src/components/lukso-icon/icons/barbell-outline.ts +54 -0
  179. package/src/components/lukso-icon/icons/bulb-outline.ts +54 -0
  180. package/src/components/lukso-icon/icons/camera.ts +40 -0
  181. package/src/components/lukso-icon/icons/clipboard.ts +59 -0
  182. package/src/components/lukso-icon/icons/clock.ts +31 -0
  183. package/src/components/lukso-icon/icons/close-lg.ts +33 -0
  184. package/src/components/lukso-icon/icons/close-sm.ts +33 -0
  185. package/src/components/lukso-icon/icons/cloud.ts +25 -0
  186. package/src/components/lukso-icon/icons/compass-outline.ts +29 -0
  187. package/src/components/lukso-icon/icons/complete-filled-fade-in.ts +34 -0
  188. package/src/components/lukso-icon/icons/complete-filled.ts +32 -0
  189. package/src/components/lukso-icon/icons/complete-outline.ts +31 -0
  190. package/src/components/lukso-icon/icons/connect.ts +33 -0
  191. package/src/components/lukso-icon/icons/connections.ts +34 -0
  192. package/src/components/lukso-icon/icons/contract-lock.ts +43 -0
  193. package/src/components/lukso-icon/icons/controller.ts +55 -0
  194. package/src/components/lukso-icon/icons/copy.ts +31 -0
  195. package/src/components/lukso-icon/icons/cross-outline.ts +38 -0
  196. package/src/components/lukso-icon/icons/dots.ts +22 -0
  197. package/src/components/lukso-icon/icons/edit.ts +30 -0
  198. package/src/components/lukso-icon/icons/error.ts +31 -0
  199. package/src/components/lukso-icon/icons/eth-logo.ts +50 -0
  200. package/src/components/lukso-icon/icons/expand.ts +31 -0
  201. package/src/components/lukso-icon/icons/extension.ts +31 -0
  202. package/src/components/lukso-icon/icons/eye-hide.ts +47 -0
  203. package/src/components/lukso-icon/icons/eye-show.ts +37 -0
  204. package/src/components/lukso-icon/icons/filter.ts +43 -0
  205. package/src/components/lukso-icon/icons/fish-outline.ts +36 -0
  206. package/src/components/lukso-icon/icons/flip.ts +45 -0
  207. package/src/components/lukso-icon/icons/globe.ts +61 -0
  208. package/src/components/lukso-icon/icons/google-color.ts +35 -0
  209. package/src/components/lukso-icon/icons/hamburger.ts +40 -0
  210. package/src/components/lukso-icon/icons/infinite.ts +33 -0
  211. package/src/components/lukso-icon/icons/information.ts +38 -0
  212. package/src/components/lukso-icon/icons/key-outline.ts +25 -0
  213. package/src/components/lukso-icon/icons/link.ts +33 -0
  214. package/src/components/lukso-icon/icons/link1.ts +39 -0
  215. package/src/components/lukso-icon/icons/link2.ts +46 -0
  216. package/src/components/lukso-icon/icons/link3.ts +32 -0
  217. package/src/components/lukso-icon/icons/link4.ts +52 -0
  218. package/src/components/lukso-icon/icons/loading.ts +50 -0
  219. package/src/components/lukso-icon/icons/location.ts +33 -0
  220. package/src/components/lukso-icon/icons/locked.ts +44 -0
  221. package/src/components/lukso-icon/icons/login-2.ts +55 -0
  222. package/src/components/lukso-icon/icons/login-3.ts +53 -0
  223. package/src/components/lukso-icon/icons/login.ts +39 -0
  224. package/src/components/lukso-icon/icons/logo-chrome.ts +35 -0
  225. package/src/components/lukso-icon/icons/lyx-logo.ts +41 -0
  226. package/src/components/lukso-icon/icons/mail.ts +33 -0
  227. package/src/components/lukso-icon/icons/menu-1.ts +71 -0
  228. package/src/components/lukso-icon/icons/menu-2.ts +61 -0
  229. package/src/components/lukso-icon/icons/migrate.ts +47 -0
  230. package/src/components/lukso-icon/icons/minimize.ts +53 -0
  231. package/src/components/lukso-icon/icons/network.ts +49 -0
  232. package/src/components/lukso-icon/icons/notifications.ts +33 -0
  233. package/src/components/lukso-icon/icons/phone-portrait-outline.ts +33 -0
  234. package/src/components/lukso-icon/icons/pin.ts +25 -0
  235. package/src/components/lukso-icon/icons/play-filled.ts +23 -0
  236. package/src/components/lukso-icon/icons/play-outline.ts +24 -0
  237. package/src/components/lukso-icon/icons/plus.ts +33 -0
  238. package/src/components/lukso-icon/icons/profile-add.ts +43 -0
  239. package/src/components/lukso-icon/icons/profile-export.ts +42 -0
  240. package/src/components/lukso-icon/icons/profile-import.ts +42 -0
  241. package/src/components/lukso-icon/icons/profile-recovery-2.ts +62 -0
  242. package/src/components/lukso-icon/icons/profile-recovery.ts +55 -0
  243. package/src/components/lukso-icon/icons/profile-restore.ts +50 -0
  244. package/src/components/lukso-icon/icons/profile.ts +29 -0
  245. package/src/components/lukso-icon/icons/progress-complete.ts +289 -0
  246. package/src/components/lukso-icon/icons/progress-indicator.ts +236 -0
  247. package/src/components/lukso-icon/icons/pulse-dot.ts +22 -0
  248. package/src/components/lukso-icon/icons/qr-code.ts +122 -0
  249. package/src/components/lukso-icon/icons/relayer.ts +40 -0
  250. package/src/components/lukso-icon/icons/reload.ts +32 -0
  251. package/src/components/lukso-icon/icons/return-down.ts +33 -0
  252. package/src/components/lukso-icon/icons/return-left.ts +33 -0
  253. package/src/components/lukso-icon/icons/return-right.ts +33 -0
  254. package/src/components/lukso-icon/icons/return-up.ts +33 -0
  255. package/src/components/lukso-icon/icons/search.ts +28 -0
  256. package/src/components/lukso-icon/icons/settings.ts +33 -0
  257. package/src/components/lukso-icon/icons/smart-contract-doc.ts +40 -0
  258. package/src/components/lukso-icon/icons/smart-contract.ts +31 -0
  259. package/src/components/lukso-icon/icons/star-filled.ts +23 -0
  260. package/src/components/lukso-icon/icons/star-outline.ts +24 -0
  261. package/src/components/lukso-icon/icons/step-dot.ts +34 -0
  262. package/src/components/lukso-icon/icons/step-progress.ts +31 -0
  263. package/src/components/lukso-icon/icons/steps.ts +40 -0
  264. package/src/components/lukso-icon/icons/tick.ts +26 -0
  265. package/src/components/lukso-icon/icons/timer-outline.ts +47 -0
  266. package/src/components/lukso-icon/icons/transaction-receive.ts +39 -0
  267. package/src/components/lukso-icon/icons/transaction-send.ts +39 -0
  268. package/src/components/lukso-icon/icons/transfer.ts +47 -0
  269. package/src/components/lukso-icon/icons/trash.ts +40 -0
  270. package/src/components/lukso-icon/icons/turn-down.ts +33 -0
  271. package/src/components/lukso-icon/icons/turn-left.ts +33 -0
  272. package/src/components/lukso-icon/icons/turn-right.ts +33 -0
  273. package/src/components/lukso-icon/icons/turn-up.ts +33 -0
  274. package/src/components/lukso-icon/icons/unlocked.ts +41 -0
  275. package/src/components/lukso-icon/icons/wallet-outline.ts +35 -0
  276. package/src/components/lukso-icon/icons/warning-round.ts +32 -0
  277. package/src/components/lukso-icon/icons/warning-triangle.ts +32 -0
  278. package/src/components/lukso-icon/index.ts +310 -0
  279. package/src/components/lukso-icon/lukso-icon.stories.ts +116 -0
  280. package/src/components/lukso-icon/style.scss +3 -0
  281. package/src/components/lukso-input/index.ts +188 -0
  282. package/src/components/lukso-input/lukso-input.stories.ts +183 -0
  283. package/src/components/lukso-navbar/index.ts +1 -1
  284. package/src/components/lukso-navbar/lukso-navbar.stories.ts +18 -1
  285. package/src/components/lukso-profile/index.ts +9 -3
  286. package/src/components/lukso-profile/lukso-profile.stories.ts +18 -1
  287. package/src/components/lukso-sanitize/index.ts +1 -1
  288. package/src/components/lukso-sanitize/lukso-sanitize.stories.ts +5 -1
  289. package/src/components/lukso-tag/index.ts +7 -7
  290. package/src/components/lukso-tag/lukso-tag.stories.ts +28 -6
  291. package/src/components/lukso-username/index.ts +3 -3
  292. package/src/components/lukso-username/lukso-username.stories.ts +10 -2
  293. package/src/components/lukso-wizard/index.ts +1 -1
  294. package/src/components/lukso-wizard/lukso-wizard.stories.ts +4 -1
  295. package/src/shared/styles/color-palette.ts +1 -1
  296. package/src/shared/styles/colors.scss +91 -0
  297. package/src/shared/styles/hslColorMap.ts +20 -0
  298. package/src/shared/styles/main.scss +1 -0
  299. package/src/shared/utils/__tests__/sliceAddress.spec.ts +1 -1
  300. package/tailwind.config.cjs +135 -1
  301. package/tools/color-palette.cjs +2 -2
  302. package/tools/color-palette.d.ts +2 -2
  303. package/tools/color-palette.d.ts.map +1 -1
@@ -0,0 +1,310 @@
1
+ import { html } from 'lit'
2
+ import { customElement, property } from 'lit/decorators.js'
3
+
4
+ import { TailwindStyledElement } from '@/shared/tailwind-element'
5
+ import style from './style.scss?inline'
6
+ import { addPhoto } from './icons/add-photo'
7
+ import { arrowDownLg } from './icons/arrow-down-lg'
8
+ import { arrowDownSm } from './icons/arrow-down-sm'
9
+ import { arrowLeftLg } from './icons/arrow-left-lg'
10
+ import { arrowLeftSm } from './icons/arrow-left-sm'
11
+ import { arrowRightLg } from './icons/arrow-right-lg'
12
+ import { arrowRightSm } from './icons/arrow-right-sm'
13
+ import { arrowUpLg } from './icons/arrow-up-lg'
14
+ import { arrowUpSm } from './icons/arrow-up-sm'
15
+ import { barbellOutline } from './icons/barbell-outline'
16
+ import { bulbOutline } from './icons/bulb-outline'
17
+ import { camera } from './icons/camera'
18
+ import { clipboard } from './icons/clipboard'
19
+ import { clock } from './icons/clock'
20
+ import { closeLg } from './icons/close-lg'
21
+ import { closeSm } from './icons/close-sm'
22
+ import { cloud } from './icons/cloud'
23
+ import { compassOutline } from './icons/compass-outline'
24
+ import { completeFilled } from './icons/complete-filled'
25
+ import { completeOutline } from './icons/complete-outline'
26
+ import { contractLock } from './icons/contract-lock'
27
+ import { connect } from './icons/connect'
28
+ import { connections } from './icons/connections'
29
+ import { controller } from './icons/controller'
30
+ import { copy } from './icons/copy'
31
+ import { crossOutline } from './icons/cross-outline'
32
+ import { dots } from './icons/dots'
33
+ import { edit } from './icons/edit'
34
+ import { error } from './icons/error'
35
+ import { expand } from './icons/expand'
36
+ import { extension } from './icons/extension'
37
+ import { eyeHide } from './icons/eye-hide'
38
+ import { eyeShow } from './icons/eye-show'
39
+ import { filter } from './icons/filter'
40
+ import { fishOutline } from './icons/fish-outline'
41
+ import { flip } from './icons/flip'
42
+ import { globe } from './icons/globe'
43
+ import { hamburger } from './icons/hamburger'
44
+ import { infinite } from './icons/infinite'
45
+ import { information } from './icons/information'
46
+ import { keyOutline } from './icons/key-outline'
47
+ import { link } from './icons/link'
48
+ import { link1 } from './icons/link1'
49
+ import { link2 } from './icons/link2'
50
+ import { link3 } from './icons/link3'
51
+ import { link4 } from './icons/link4'
52
+ import { loading } from './icons/loading'
53
+ import { location } from './icons/location'
54
+ import { locked } from './icons/locked'
55
+ import { login } from './icons/login'
56
+ import { login2 } from './icons/login-2'
57
+ import { login3 } from './icons/login-3'
58
+ import { logoChrome } from './icons/logo-chrome'
59
+ import { mail } from './icons/mail'
60
+ import { menu1 } from './icons/menu-1'
61
+ import { menu2 } from './icons/menu-2'
62
+ import { migrate } from './icons/migrate'
63
+ import { minimize } from './icons/minimize'
64
+ import { network } from './icons/network'
65
+ import { notifications } from './icons/notifications'
66
+ import { phonePortraitOutline } from './icons/phone-portrait-outline'
67
+ import { pin } from './icons/pin'
68
+ import { playFilled } from './icons/play-filled'
69
+ import { playOutline } from './icons/play-outline'
70
+ import { plus } from './icons/plus'
71
+ import { profileAdd } from './icons/profile-add'
72
+ import { profileExport } from './icons/profile-export'
73
+ import { profileImport } from './icons/profile-import'
74
+ import { profileRecovery } from './icons/profile-recovery'
75
+ import { profileRecovery2 } from './icons/profile-recovery-2'
76
+ import { profileRestore } from './icons/profile-restore'
77
+ import { profile } from './icons/profile'
78
+ import { qrCode } from './icons/qr-code'
79
+ import { relayer } from './icons/relayer'
80
+ import { reload } from './icons/reload'
81
+ import { returnDown } from './icons/return-down'
82
+ import { returnLeft } from './icons/return-left'
83
+ import { returnRight } from './icons/return-right'
84
+ import { returnUp } from './icons/return-up'
85
+ import { search } from './icons/search'
86
+ import { settings } from './icons/settings'
87
+ import { smartContractDoc } from './icons/smart-contract-doc'
88
+ import { smartContract } from './icons/smart-contract'
89
+ import { starFilled } from './icons/star-filled'
90
+ import { starOutline } from './icons/star-outline'
91
+ import { stepDot } from './icons/step-dot'
92
+ import { stepProgress } from './icons/step-progress'
93
+ import { steps } from './icons/steps'
94
+ import { tick } from './icons/tick'
95
+ import { timerOutline } from './icons/timer-outline'
96
+ import { transactionReceive } from './icons/transaction-receive'
97
+ import { transactionSend } from './icons/transaction-send'
98
+ import { transfer } from './icons/transfer'
99
+ import { trash } from './icons/trash'
100
+ import { turnDown } from './icons/turn-down'
101
+ import { turnLeft } from './icons/turn-left'
102
+ import { turnRight } from './icons/turn-right'
103
+ import { turnUp } from './icons/turn-up'
104
+ import { unlocked } from './icons/unlocked'
105
+ import { walletOutline } from './icons/wallet-outline'
106
+ import { warningRound } from './icons/warning-round'
107
+ import { warningTriangle } from './icons/warning-triangle'
108
+ import { googleColor } from './icons/google-color'
109
+ import { ethLogo } from './icons/eth-logo'
110
+ import { lyxLogo } from './icons/lyx-logo'
111
+ import { progressIndicator } from './icons/progress-indicator'
112
+ import { pulseDot } from './icons/pulse-dot'
113
+ import { progressComplete } from './icons/progress-complete'
114
+ import { completeFilledFadeIn } from './icons/complete-filled-fade-in'
115
+
116
+ export type IconOptions = {
117
+ width: number
118
+ height: number
119
+ color: string
120
+ strokeWidth: number
121
+ secondaryColor?: string
122
+ }
123
+
124
+ export type IconSize = 'small' | 'medium' | 'large' | 'x-large'
125
+
126
+ type IconSizeDef = {
127
+ width: number
128
+ height: number
129
+ strokeWidth: number
130
+ }
131
+
132
+ const iconMap = {
133
+ 'add-photo': addPhoto,
134
+ 'arrow-down-lg': arrowDownLg,
135
+ 'arrow-down-sm': arrowDownSm,
136
+ 'arrow-left-lg': arrowLeftLg,
137
+ 'arrow-left-sm': arrowLeftSm,
138
+ 'arrow-right-lg': arrowRightLg,
139
+ 'arrow-right-sm': arrowRightSm,
140
+ 'arrow-up-lg': arrowUpLg,
141
+ 'arrow-up-sm': arrowUpSm,
142
+ 'barbell-outline': barbellOutline,
143
+ 'bulb-outline': bulbOutline,
144
+ camera,
145
+ clipboard,
146
+ clock,
147
+ 'close-lg': closeLg,
148
+ 'close-sm': closeSm,
149
+ cloud,
150
+ 'compass-outline': compassOutline,
151
+ 'complete-filled': completeFilled,
152
+ 'complete-outline': completeOutline,
153
+ connect,
154
+ connections,
155
+ 'contract-lock': contractLock,
156
+ controller,
157
+ copy,
158
+ 'cross-outline': crossOutline,
159
+ dots,
160
+ edit,
161
+ error,
162
+ expand,
163
+ extension,
164
+ 'eye-hide': eyeHide,
165
+ 'eye-show': eyeShow,
166
+ filter,
167
+ 'fish-outline': fishOutline,
168
+ flip,
169
+ globe,
170
+ hamburger,
171
+ infinite,
172
+ information,
173
+ 'key-outline': keyOutline,
174
+ link,
175
+ 'link-1': link1,
176
+ 'link-2': link2,
177
+ 'link-3': link3,
178
+ 'link-4': link4,
179
+ loading,
180
+ location,
181
+ locked,
182
+ login,
183
+ 'login-2': login2,
184
+ 'login-3': login3,
185
+ 'logo-chrome': logoChrome,
186
+ mail,
187
+ 'menu-1': menu1,
188
+ 'menu-2': menu2,
189
+ migrate,
190
+ minimize,
191
+ network,
192
+ notifications,
193
+ 'phone-portrait-outline': phonePortraitOutline,
194
+ pin,
195
+ 'play-filled': playFilled,
196
+ 'play-outline': playOutline,
197
+ plus,
198
+ 'profile-add': profileAdd,
199
+ 'profile-export': profileExport,
200
+ 'profile-import': profileImport,
201
+ 'profile-recovery': profileRecovery,
202
+ 'profile-recovery-2': profileRecovery2,
203
+ 'profile-restore': profileRestore,
204
+ profile,
205
+ 'qr-code': qrCode,
206
+ relayer,
207
+ reload,
208
+ 'return-down': returnDown,
209
+ 'return-left': returnLeft,
210
+ 'return-right': returnRight,
211
+ 'return-up': returnUp,
212
+ search,
213
+ settings,
214
+ 'smart-contract-doc': smartContractDoc,
215
+ 'smart-contract': smartContract,
216
+ 'star-filled': starFilled,
217
+ 'star-outline': starOutline,
218
+ 'step-dot': stepDot,
219
+ 'step-progress': stepProgress,
220
+ steps,
221
+ tick,
222
+ 'timer-outline': timerOutline,
223
+ 'transaction-receive': transactionReceive,
224
+ 'transaction-send': transactionSend,
225
+ transfer,
226
+ trash,
227
+ 'turn-down': turnDown,
228
+ 'turn-left': turnLeft,
229
+ 'turn-right': turnRight,
230
+ 'turn-up': turnUp,
231
+ unlocked,
232
+ 'wallet-outline': walletOutline,
233
+ 'warning-round': warningRound,
234
+ 'warning-triangle': warningTriangle,
235
+ 'google-color': googleColor,
236
+ 'eth-logo': ethLogo,
237
+ 'lyx-logo': lyxLogo,
238
+ 'progress-indicator': progressIndicator,
239
+ 'pulse-dot': pulseDot,
240
+ 'progress-complete': progressComplete,
241
+ 'complete-filled-fade-in': completeFilledFadeIn,
242
+ }
243
+
244
+ @customElement('lukso-icon')
245
+ export class LuksoIcon extends TailwindStyledElement(style) {
246
+ @property({ type: String })
247
+ name = ''
248
+
249
+ @property({ type: String })
250
+ size = 'medium'
251
+
252
+ @property({ type: String })
253
+ color = 'neutral-20'
254
+
255
+ @property({ type: String, attribute: 'secondary-color' })
256
+ secondaryColor = ''
257
+
258
+ private sizes: { [key in IconSize]: IconSizeDef } = {
259
+ small: {
260
+ width: 16,
261
+ height: 16,
262
+ strokeWidth: 2,
263
+ },
264
+ medium: {
265
+ width: 24,
266
+ height: 24,
267
+ strokeWidth: 1.5,
268
+ },
269
+ large: {
270
+ width: 32,
271
+ height: 32,
272
+ strokeWidth: 1.5,
273
+ },
274
+ 'x-large': {
275
+ width: 40,
276
+ height: 40,
277
+ strokeWidth: 1.5,
278
+ },
279
+ }
280
+
281
+ render() {
282
+ const icon = iconMap[this.name]
283
+
284
+ if (!icon) {
285
+ console.warn(`Icon ${this.name} not found`)
286
+ }
287
+
288
+ const size = this.sizes[this.size]
289
+
290
+ if (!size) {
291
+ console.warn(`Size ${this.size} not found`)
292
+ }
293
+
294
+ return html`
295
+ ${icon({
296
+ width: size.width,
297
+ height: size.height,
298
+ color: this.color,
299
+ strokeWidth: size.strokeWidth,
300
+ secondaryColor: this.secondaryColor,
301
+ })}
302
+ `
303
+ }
304
+ }
305
+
306
+ declare global {
307
+ interface HTMLElementTagNameMap {
308
+ 'lukso-icon': LuksoIcon
309
+ }
310
+ }
@@ -0,0 +1,116 @@
1
+ import { html } from 'lit-html'
2
+ import './index'
3
+
4
+ /** Documentation and examples of `lukso-icon` component. Icons comes in `small`, `medium`, `large` and `x-large` size that is set in `size` property.
5
+ * Please check all available icons in Icons Showcase.
6
+ */
7
+ export default {
8
+ title: 'Design System/Components/lukso-icon',
9
+ component: 'lukso-icon',
10
+ argTypes: {
11
+ name: {
12
+ control: { type: 'text' },
13
+ },
14
+ size: {
15
+ control: { type: 'select' },
16
+ options: ['small', 'medium', 'large', 'x-large'],
17
+ },
18
+ color: {
19
+ control: { type: 'text' },
20
+ },
21
+ secondaryColor: {
22
+ control: { type: 'text' },
23
+ },
24
+ animation: {
25
+ control: { type: 'select' },
26
+ options: [
27
+ 'animate-spin',
28
+ 'animate-ping',
29
+ 'animate-pulse',
30
+ 'animate-bounce',
31
+ 'animate-pulse-resize',
32
+ ],
33
+ },
34
+ },
35
+ args: {
36
+ name: 'profile-recovery',
37
+ size: 'medium',
38
+ color: 'neutral-20',
39
+ secondaryColor: '',
40
+ animation: undefined,
41
+ },
42
+ parameters: {
43
+ controls: {
44
+ exclude: ['sizes', 'secondary-color', 'styles'],
45
+ },
46
+ design: {
47
+ type: 'figma',
48
+ url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=52%3A1473&t=loplCvndobu6AA6P-4',
49
+ },
50
+ },
51
+ }
52
+
53
+ const Template = ({ name, size, color, secondaryColor, animation }) =>
54
+ html`<lukso-icon
55
+ name=${name}
56
+ size=${size}
57
+ color=${color}
58
+ secondary-color=${secondaryColor}
59
+ class=${animation}
60
+ ></lukso-icon>`
61
+
62
+ /** By default icon comes in `medium` size of `24x24` pixels with `neutral-20` color. */
63
+ export const DefaultIcon = Template.bind({})
64
+ DefaultIcon.args = {
65
+ name: 'profile-recovery',
66
+ }
67
+
68
+ /** Example of `small` size of `16x16` pixels. */
69
+ export const SmallIcon = Template.bind({})
70
+ SmallIcon.args = {
71
+ name: 'profile-recovery',
72
+ size: 'small',
73
+ }
74
+
75
+ /** Example of `large` size of `32x32` pixels. */
76
+ export const LargeIcon = Template.bind({})
77
+ LargeIcon.args = {
78
+ name: 'profile-recovery',
79
+ size: 'large',
80
+ }
81
+
82
+ /** Example of `x-large` size of `40x40` pixels. */
83
+ export const XLargeIcon = Template.bind({})
84
+ XLargeIcon.args = {
85
+ name: 'profile-recovery',
86
+ size: 'x-large',
87
+ }
88
+
89
+ /** You can change color to any from the palette with `color` property. */
90
+ export const CustomColorIcon = Template.bind({})
91
+ CustomColorIcon.args = {
92
+ name: 'profile-recovery',
93
+ color: 'coral-65',
94
+ }
95
+
96
+ /** Some icons contain secondary color that is applied with `secondary-color` property. */
97
+ export const SecondaryColorIcon = Template.bind({})
98
+ SecondaryColorIcon.args = {
99
+ name: 'complete-filled',
100
+ color: 'coral-65',
101
+ secondaryColor: 'honey-72',
102
+ }
103
+
104
+ /** Some icons contain multiple colors and they don't use `color` property. You can still use different sizes tho. */
105
+ export const ColoredIcon = Template.bind({})
106
+ ColoredIcon.args = {
107
+ name: 'google-color',
108
+ }
109
+
110
+ /** You can animate any icon by applying `animate-[name]` property. Some icons come with build in animation. Check more details in `Animations` and `Icons` section. */
111
+ export const AnimatedIcon = Template.bind({})
112
+ AnimatedIcon.args = {
113
+ name: 'step-progress',
114
+ secondaryColor: 'neutral-100',
115
+ animation: 'animate-spin',
116
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ display: inline-flex;
3
+ }
@@ -0,0 +1,188 @@
1
+ import { html, nothing } from 'lit'
2
+ import { customElement, property, state } from 'lit/decorators.js'
3
+ import { HTMLInputTypeAttribute } from 'react'
4
+
5
+ import { TailwindElement } from '@/shared/tailwind-element'
6
+ import { customClassMap } from '@/shared/directives'
7
+
8
+ @customElement('lukso-input')
9
+ export class LuksoInput extends TailwindElement {
10
+ @property({ type: String })
11
+ value = ''
12
+
13
+ @property({ type: String })
14
+ name = ''
15
+
16
+ @property({ type: String })
17
+ type: HTMLInputTypeAttribute = 'text'
18
+
19
+ @property({ type: String })
20
+ placeholder = ''
21
+
22
+ @property({ type: String })
23
+ label = ''
24
+
25
+ @property({ type: String })
26
+ description = ''
27
+
28
+ @property({ type: String })
29
+ error = ''
30
+
31
+ @property({ type: String })
32
+ unit = ''
33
+
34
+ @property({ type: Boolean, attribute: 'is-full-width' })
35
+ isFullWidth = false
36
+
37
+ @property({ type: Boolean })
38
+ autofocus = false
39
+
40
+ @property({ type: Number })
41
+ max: number | undefined = undefined
42
+
43
+ @property({ type: Number })
44
+ min: number | undefined = undefined
45
+
46
+ @state()
47
+ private hasHocus = false
48
+
49
+ private defaultInputStyles = `bg-neutral-100 text-neutral-20 paragraph-16-regular px-4 py-3
50
+ border border-solid border-neutral-90 h-[48px] placeholder:text-neutral-70
51
+ outline-none transition transition-all duration-250 appearance-none`
52
+
53
+ private defaultUnitStyles = `paragraph-12-regular text-neutral-60 flex px-3.5 items-center relative
54
+ border border-solid border-neutral-90 h-[48px] transition transition-all duration-250
55
+ rounded-r-xl border-l-0 before:bg-neutral-90 before:absolute before:top-[calc(50%-12px)] before:left-0
56
+ before:w-[1px] before:h-[24px] whitespace-nowrap`
57
+
58
+ inputTemplate() {
59
+ return html`
60
+ <input
61
+ data-testid="input"
62
+ id=${this.name}
63
+ type=${this.type}
64
+ value=${this.value}
65
+ placeholder=${this.placeholder}
66
+ ?autofocus=${this.autofocus}
67
+ min=${this.min}
68
+ max=${this.max}
69
+ class=${customClassMap({
70
+ [this.defaultInputStyles]: true,
71
+ ['border-red-85 text-red-65 focus:border-red-65']: this.error !== '',
72
+ ['border-neutral-35']: this.hasHocus,
73
+ ['rounded-l-xl border-r-0']: this.unit !== '',
74
+ ['rounded-xl']: this.unit === '',
75
+ ['w-full']: this.isFullWidth,
76
+ ['w-[350px]']: !this.isFullWidth && this.unit === '',
77
+ ['w-[300px]']: !this.isFullWidth && this.unit !== '',
78
+ })}
79
+ @focus=${this.handleFocus}
80
+ @blur=${this.handleBlur}
81
+ @keyup=${this.handleKeyUp}
82
+ @keydown=${this.handleKeyDown}
83
+ @keypress=${this.handleKeyPress}
84
+ />
85
+ `
86
+ }
87
+
88
+ labelTemplate() {
89
+ return html`
90
+ <label for=${this.name} class="heading-h5 text-neutral-20 pb-2 block"
91
+ >${this.label}</label
92
+ >
93
+ `
94
+ }
95
+
96
+ descriptionTemplate() {
97
+ return html`
98
+ <div class="paragraph-12-regular text-neutral-20 pb-2">
99
+ ${this.description ?? nothing}
100
+ </div>
101
+ `
102
+ }
103
+
104
+ errorTemplate() {
105
+ return html`<div class="paragraph-12-regular text-red-65 pt-2">
106
+ ${this.error}
107
+ </div>`
108
+ }
109
+
110
+ unitTemplate() {
111
+ return html`<div
112
+ class=${customClassMap({
113
+ [this.defaultUnitStyles]: true,
114
+ ['border-red-85']: this.error !== '',
115
+ ['border-neutral-35']: this.hasHocus && this.error === '',
116
+ ['border-red-65']: this.hasHocus && this.error !== '',
117
+ })}
118
+ >
119
+ ${this.unit}
120
+ </div>`
121
+ }
122
+
123
+ private handleFocus() {
124
+ this.hasHocus = true
125
+ }
126
+
127
+ private handleBlur() {
128
+ this.hasHocus = false
129
+ }
130
+
131
+ private handleKeyUp(event: KeyboardEvent) {
132
+ const target = event.target as HTMLInputElement
133
+ const keyEvent = new CustomEvent('on-key-up', {
134
+ detail: {
135
+ value: target.value,
136
+ event,
137
+ },
138
+ bubbles: true,
139
+ composed: true,
140
+ })
141
+ this.dispatchEvent(keyEvent)
142
+ }
143
+
144
+ private handleKeyDown(event: KeyboardEvent) {
145
+ const target = event.target as HTMLInputElement
146
+ const keyEvent = new CustomEvent('on-key-down', {
147
+ detail: {
148
+ value: target.value,
149
+ event,
150
+ },
151
+ bubbles: true,
152
+ composed: true,
153
+ })
154
+ this.dispatchEvent(keyEvent)
155
+ }
156
+
157
+ private handleKeyPress(event: KeyboardEvent) {
158
+ const target = event.target as HTMLInputElement
159
+ const keyEvent = new CustomEvent('on-key-press', {
160
+ detail: {
161
+ value: target.value,
162
+ event,
163
+ },
164
+ bubbles: true,
165
+ composed: true,
166
+ })
167
+ this.dispatchEvent(keyEvent)
168
+ }
169
+
170
+ render() {
171
+ return html`
172
+ <div>
173
+ ${this.label ? this.labelTemplate() : nothing}
174
+ ${this.description ? this.descriptionTemplate() : nothing}
175
+ <div class="flex">
176
+ ${this.inputTemplate()} ${this.unit ? this.unitTemplate() : nothing}
177
+ </div>
178
+ ${this.error ? this.errorTemplate() : nothing}
179
+ </div>
180
+ `
181
+ }
182
+ }
183
+
184
+ declare global {
185
+ interface HTMLElementTagNameMap {
186
+ 'lukso-input': LuksoInput
187
+ }
188
+ }