@lukso/web-components 1.6.3 → 1.7.3

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 (328) hide show
  1. package/dist/color-palette.cjs +1363 -0
  2. package/dist/{shared/utils/color-palette.d.ts → color-palette.d.ts} +1 -2
  3. package/dist/color-palette.d.ts.map +1 -0
  4. package/dist/color-palette.js +1356 -0
  5. package/dist/components/index.cjs +74 -0
  6. package/dist/components/index.d.ts +2 -1
  7. package/dist/components/index.d.ts.map +1 -1
  8. package/dist/components/index.js +17 -7354
  9. package/dist/components/lukso-button/index.cjs +144 -0
  10. package/dist/components/lukso-button/index.js +95 -1190
  11. package/dist/components/lukso-card/index.cjs +143 -0
  12. package/dist/components/lukso-card/index.js +61 -1487
  13. package/dist/components/lukso-icon/index.cjs +4366 -0
  14. package/dist/components/lukso-icon/index.js +1713 -2410
  15. package/dist/components/lukso-input/index.cjs +219 -0
  16. package/dist/components/lukso-input/index.d.ts +1 -2
  17. package/dist/components/lukso-input/index.d.ts.map +1 -1
  18. package/dist/components/lukso-input/index.js +128 -1229
  19. package/dist/components/lukso-modal/index.cjs +70 -0
  20. package/dist/components/lukso-modal/index.d.ts +18 -0
  21. package/dist/components/lukso-modal/index.d.ts.map +1 -0
  22. package/dist/components/lukso-modal/index.js +68 -0
  23. package/dist/components/lukso-navbar/index.cjs +74 -0
  24. package/dist/components/lukso-navbar/index.js +43 -1154
  25. package/dist/components/lukso-profile/index.cjs +547 -0
  26. package/dist/components/lukso-profile/index.js +483 -1370
  27. package/dist/components/lukso-sanitize/index.cjs +1730 -0
  28. package/dist/components/lukso-sanitize/index.js +1643 -1544
  29. package/dist/components/lukso-tag/index.cjs +78 -0
  30. package/dist/components/lukso-tag/index.js +52 -1189
  31. package/dist/components/lukso-test/index.cjs +120 -0
  32. package/dist/components/lukso-test/index.js +65 -1767
  33. package/dist/components/lukso-username/index.cjs +126 -0
  34. package/dist/components/lukso-username/index.js +75 -1206
  35. package/dist/components/lukso-wizard/index.cjs +93 -0
  36. package/dist/components/lukso-wizard/index.js +47 -1253
  37. package/dist/directive-9ec64c08.js +28 -0
  38. package/dist/directive-db00f5fb.cjs +34 -0
  39. package/dist/index-4aafbf5c.cjs +67 -0
  40. package/dist/index-714323c9.js +18 -0
  41. package/dist/index-7dc05ee5.cjs +20 -0
  42. package/dist/index-e1077e02.js +59 -0
  43. package/dist/index.cjs +74 -0
  44. package/dist/index.js +17 -7354
  45. package/dist/shared/tailwind-element/index.cjs +10 -0
  46. package/dist/shared/tailwind-element/index.js +1 -1064
  47. package/dist/state-7fde94d1.js +9 -0
  48. package/dist/state-a62a7d5d.cjs +11 -0
  49. package/dist/style-map-3f88f525.js +10 -0
  50. package/dist/style-map-e193a4d9.cjs +12 -0
  51. package/dist/styles/main.css.map +1 -1
  52. package/package.json +85 -147
  53. package/tools/assets/fonts/index.cjs +10 -0
  54. package/tools/assets/fonts/index.d.ts +2 -0
  55. package/tools/assets/fonts/index.d.ts.map +1 -0
  56. package/tools/assets/fonts/index.js +6 -0
  57. package/tools/assets/images/index.cjs +10 -0
  58. package/tools/assets/images/index.d.ts +2 -0
  59. package/tools/assets/images/index.d.ts.map +1 -0
  60. package/tools/assets/images/index.js +6 -0
  61. package/tools/assets/index.cjs +15 -0
  62. package/tools/assets/index.d.ts +4 -0
  63. package/tools/assets/index.d.ts.map +1 -0
  64. package/tools/assets/index.js +9 -0
  65. package/tools/color-palette-a34f5d09.js +1356 -0
  66. package/tools/color-palette-bf5780ed.cjs +1362 -0
  67. package/tools/color-palette.cjs +11 -146
  68. package/tools/color-palette.d.ts +39 -52
  69. package/tools/color-palette.d.ts.map +1 -1
  70. package/tools/color-palette.js +1 -0
  71. package/tools/copy-assets.cjs +50 -136
  72. package/tools/copy-assets.d.ts +7 -9
  73. package/tools/copy-assets.d.ts.map +1 -1
  74. package/tools/copy-assets.js +49 -0
  75. package/tools/index.cjs +35 -0
  76. package/tools/index.d.ts +6 -0
  77. package/tools/index.d.ts.map +1 -0
  78. package/tools/index.js +22 -0
  79. package/tools/sass/index.cjs +7 -0
  80. package/tools/sass/index.js +1 -0
  81. package/tools/styles/index.cjs +5 -0
  82. package/tools/styles/index.js +3 -0
  83. package/tools/styles/main.css +287 -0
  84. package/CHANGELOG.md +0 -287
  85. package/dist/assets/fonts/index.js +0 -4
  86. package/dist/assets/fonts/index.ts +0 -1
  87. package/dist/assets/fonts/index.umd.cjs +0 -1
  88. package/dist/assets/images/index.js +0 -4
  89. package/dist/assets/images/index.ts +0 -1
  90. package/dist/assets/images/index.umd.cjs +0 -1
  91. package/dist/assets/index.js +0 -4
  92. package/dist/assets/index.ts +0 -1
  93. package/dist/assets/index.umd.cjs +0 -1
  94. package/dist/color-palette/index.js +0 -705
  95. package/dist/color-palette/index.umd.cjs +0 -1
  96. package/dist/components/index.umd.cjs +0 -3756
  97. package/dist/components/lukso-button/index.umd.cjs +0 -88
  98. package/dist/components/lukso-card/index.umd.cjs +0 -145
  99. package/dist/components/lukso-icon/index.umd.cjs +0 -3465
  100. package/dist/components/lukso-input/index.umd.cjs +0 -109
  101. package/dist/components/lukso-navbar/index.umd.cjs +0 -73
  102. package/dist/components/lukso-profile/index.umd.cjs +0 -90
  103. package/dist/components/lukso-sanitize/index.umd.cjs +0 -61
  104. package/dist/components/lukso-tag/index.umd.cjs +0 -67
  105. package/dist/components/lukso-test/index.umd.cjs +0 -95
  106. package/dist/components/lukso-username/index.umd.cjs +0 -75
  107. package/dist/components/lukso-wizard/index.umd.cjs +0 -89
  108. package/dist/index.umd.cjs +0 -3756
  109. package/dist/sass/index.js +0 -4
  110. package/dist/sass/index.ts +0 -1
  111. package/dist/sass/index.umd.cjs +0 -1
  112. package/dist/shared/assets/index.d.ts +0 -3
  113. package/dist/shared/assets/index.d.ts.map +0 -1
  114. package/dist/shared/directives/custom-class-map/index.d.ts +0 -26
  115. package/dist/shared/directives/custom-class-map/index.d.ts.map +0 -1
  116. package/dist/shared/directives/index.d.ts +0 -2
  117. package/dist/shared/directives/index.d.ts.map +0 -1
  118. package/dist/shared/styles/index.d.ts +0 -3
  119. package/dist/shared/styles/index.d.ts.map +0 -1
  120. package/dist/shared/tailwind-element/index.umd.cjs +0 -39
  121. package/dist/shared/tailwind-element.js +0 -1064
  122. package/dist/shared/tailwind-element.umd.cjs +0 -39
  123. package/dist/shared/utils/color-palette.d.ts.map +0 -1
  124. package/dist/styles/index.js +0 -4
  125. package/dist/styles/index.umd.cjs +0 -1
  126. package/src/components/index.ts +0 -13
  127. package/src/components/lukso-button/index.ts +0 -145
  128. package/src/components/lukso-button/lukso-button.stories.ts +0 -216
  129. package/src/components/lukso-card/index.ts +0 -131
  130. package/src/components/lukso-card/lukso-card.stories.ts +0 -191
  131. package/src/components/lukso-card/style.scss +0 -7
  132. package/src/components/lukso-icon/icons/add-photo.ts +0 -46
  133. package/src/components/lukso-icon/icons/arrow-down-lg.ts +0 -26
  134. package/src/components/lukso-icon/icons/arrow-down-sm.ts +0 -26
  135. package/src/components/lukso-icon/icons/arrow-left-lg.ts +0 -26
  136. package/src/components/lukso-icon/icons/arrow-left-sm.ts +0 -26
  137. package/src/components/lukso-icon/icons/arrow-right-lg.ts +0 -26
  138. package/src/components/lukso-icon/icons/arrow-right-sm.ts +0 -26
  139. package/src/components/lukso-icon/icons/arrow-up-lg.ts +0 -26
  140. package/src/components/lukso-icon/icons/arrow-up-sm.ts +0 -26
  141. package/src/components/lukso-icon/icons/barbell-outline.ts +0 -54
  142. package/src/components/lukso-icon/icons/bulb-outline.ts +0 -54
  143. package/src/components/lukso-icon/icons/camera.ts +0 -40
  144. package/src/components/lukso-icon/icons/clipboard.ts +0 -59
  145. package/src/components/lukso-icon/icons/clock.ts +0 -31
  146. package/src/components/lukso-icon/icons/close-lg.ts +0 -33
  147. package/src/components/lukso-icon/icons/close-sm.ts +0 -33
  148. package/src/components/lukso-icon/icons/cloud.ts +0 -25
  149. package/src/components/lukso-icon/icons/compass-outline.ts +0 -29
  150. package/src/components/lukso-icon/icons/complete-filled-fade-in.ts +0 -34
  151. package/src/components/lukso-icon/icons/complete-filled.ts +0 -32
  152. package/src/components/lukso-icon/icons/complete-outline.ts +0 -31
  153. package/src/components/lukso-icon/icons/connect.ts +0 -33
  154. package/src/components/lukso-icon/icons/connections.ts +0 -34
  155. package/src/components/lukso-icon/icons/contract-lock.ts +0 -43
  156. package/src/components/lukso-icon/icons/controller.ts +0 -55
  157. package/src/components/lukso-icon/icons/copy.ts +0 -31
  158. package/src/components/lukso-icon/icons/cross-outline.ts +0 -38
  159. package/src/components/lukso-icon/icons/dots.ts +0 -22
  160. package/src/components/lukso-icon/icons/edit.ts +0 -30
  161. package/src/components/lukso-icon/icons/error.ts +0 -31
  162. package/src/components/lukso-icon/icons/eth-logo.ts +0 -50
  163. package/src/components/lukso-icon/icons/expand.ts +0 -31
  164. package/src/components/lukso-icon/icons/extension.ts +0 -31
  165. package/src/components/lukso-icon/icons/eye-hide.ts +0 -47
  166. package/src/components/lukso-icon/icons/eye-show.ts +0 -37
  167. package/src/components/lukso-icon/icons/filter.ts +0 -43
  168. package/src/components/lukso-icon/icons/fish-outline.ts +0 -36
  169. package/src/components/lukso-icon/icons/flip.ts +0 -45
  170. package/src/components/lukso-icon/icons/globe.ts +0 -61
  171. package/src/components/lukso-icon/icons/google-color.ts +0 -35
  172. package/src/components/lukso-icon/icons/hamburger.ts +0 -40
  173. package/src/components/lukso-icon/icons/infinite.ts +0 -33
  174. package/src/components/lukso-icon/icons/information.ts +0 -38
  175. package/src/components/lukso-icon/icons/key-outline.ts +0 -25
  176. package/src/components/lukso-icon/icons/link.ts +0 -33
  177. package/src/components/lukso-icon/icons/link1.ts +0 -39
  178. package/src/components/lukso-icon/icons/link2.ts +0 -46
  179. package/src/components/lukso-icon/icons/link3.ts +0 -32
  180. package/src/components/lukso-icon/icons/link4.ts +0 -52
  181. package/src/components/lukso-icon/icons/loading.ts +0 -50
  182. package/src/components/lukso-icon/icons/location.ts +0 -33
  183. package/src/components/lukso-icon/icons/locked.ts +0 -44
  184. package/src/components/lukso-icon/icons/login-2.ts +0 -55
  185. package/src/components/lukso-icon/icons/login-3.ts +0 -53
  186. package/src/components/lukso-icon/icons/login.ts +0 -39
  187. package/src/components/lukso-icon/icons/logo-chrome.ts +0 -35
  188. package/src/components/lukso-icon/icons/lyx-logo.ts +0 -41
  189. package/src/components/lukso-icon/icons/mail.ts +0 -33
  190. package/src/components/lukso-icon/icons/menu-1.ts +0 -71
  191. package/src/components/lukso-icon/icons/menu-2.ts +0 -61
  192. package/src/components/lukso-icon/icons/migrate.ts +0 -47
  193. package/src/components/lukso-icon/icons/minimize.ts +0 -53
  194. package/src/components/lukso-icon/icons/network.ts +0 -49
  195. package/src/components/lukso-icon/icons/notifications.ts +0 -33
  196. package/src/components/lukso-icon/icons/phone-portrait-outline.ts +0 -33
  197. package/src/components/lukso-icon/icons/pin.ts +0 -25
  198. package/src/components/lukso-icon/icons/play-filled.ts +0 -23
  199. package/src/components/lukso-icon/icons/play-outline.ts +0 -24
  200. package/src/components/lukso-icon/icons/plus.ts +0 -33
  201. package/src/components/lukso-icon/icons/profile-add.ts +0 -43
  202. package/src/components/lukso-icon/icons/profile-export.ts +0 -42
  203. package/src/components/lukso-icon/icons/profile-import.ts +0 -42
  204. package/src/components/lukso-icon/icons/profile-recovery-2.ts +0 -62
  205. package/src/components/lukso-icon/icons/profile-recovery.ts +0 -55
  206. package/src/components/lukso-icon/icons/profile-restore.ts +0 -50
  207. package/src/components/lukso-icon/icons/profile.ts +0 -29
  208. package/src/components/lukso-icon/icons/progress-complete.ts +0 -289
  209. package/src/components/lukso-icon/icons/progress-indicator.ts +0 -236
  210. package/src/components/lukso-icon/icons/pulse-dot.ts +0 -22
  211. package/src/components/lukso-icon/icons/qr-code.ts +0 -122
  212. package/src/components/lukso-icon/icons/relayer.ts +0 -40
  213. package/src/components/lukso-icon/icons/reload.ts +0 -32
  214. package/src/components/lukso-icon/icons/return-down.ts +0 -33
  215. package/src/components/lukso-icon/icons/return-left.ts +0 -33
  216. package/src/components/lukso-icon/icons/return-right.ts +0 -33
  217. package/src/components/lukso-icon/icons/return-up.ts +0 -33
  218. package/src/components/lukso-icon/icons/search.ts +0 -28
  219. package/src/components/lukso-icon/icons/settings.ts +0 -33
  220. package/src/components/lukso-icon/icons/smart-contract-doc.ts +0 -40
  221. package/src/components/lukso-icon/icons/smart-contract.ts +0 -31
  222. package/src/components/lukso-icon/icons/star-filled.ts +0 -23
  223. package/src/components/lukso-icon/icons/star-outline.ts +0 -24
  224. package/src/components/lukso-icon/icons/step-dot.ts +0 -34
  225. package/src/components/lukso-icon/icons/step-progress.ts +0 -31
  226. package/src/components/lukso-icon/icons/steps.ts +0 -40
  227. package/src/components/lukso-icon/icons/tick.ts +0 -26
  228. package/src/components/lukso-icon/icons/timer-outline.ts +0 -47
  229. package/src/components/lukso-icon/icons/transaction-receive.ts +0 -39
  230. package/src/components/lukso-icon/icons/transaction-send.ts +0 -39
  231. package/src/components/lukso-icon/icons/transfer.ts +0 -47
  232. package/src/components/lukso-icon/icons/trash.ts +0 -40
  233. package/src/components/lukso-icon/icons/turn-down.ts +0 -33
  234. package/src/components/lukso-icon/icons/turn-left.ts +0 -33
  235. package/src/components/lukso-icon/icons/turn-right.ts +0 -33
  236. package/src/components/lukso-icon/icons/turn-up.ts +0 -33
  237. package/src/components/lukso-icon/icons/unlocked.ts +0 -41
  238. package/src/components/lukso-icon/icons/wallet-outline.ts +0 -35
  239. package/src/components/lukso-icon/icons/warning-round.ts +0 -32
  240. package/src/components/lukso-icon/icons/warning-triangle.ts +0 -32
  241. package/src/components/lukso-icon/index.ts +0 -310
  242. package/src/components/lukso-icon/lukso-icon.stories.ts +0 -116
  243. package/src/components/lukso-icon/style.scss +0 -3
  244. package/src/components/lukso-input/index.ts +0 -211
  245. package/src/components/lukso-input/lukso-input.stories.ts +0 -184
  246. package/src/components/lukso-navbar/index.ts +0 -63
  247. package/src/components/lukso-navbar/lukso-navbar.stories.ts +0 -70
  248. package/src/components/lukso-profile/index.ts +0 -106
  249. package/src/components/lukso-profile/lukso-profile.stories.ts +0 -104
  250. package/src/components/lukso-sanitize/index.ts +0 -28
  251. package/src/components/lukso-sanitize/lukso-sanitize.stories.ts +0 -30
  252. package/src/components/lukso-tag/index.ts +0 -68
  253. package/src/components/lukso-tag/lukso-tag.stories.ts +0 -129
  254. package/src/components/lukso-test/index.ts +0 -72
  255. package/src/components/lukso-test/test.component.scss +0 -7
  256. package/src/components/lukso-test/test.stories.ts +0 -31
  257. package/src/components/lukso-username/index.ts +0 -105
  258. package/src/components/lukso-username/lukso-username.stories.ts +0 -98
  259. package/src/components/lukso-wizard/index.ts +0 -74
  260. package/src/components/lukso-wizard/lukso-wizard.stories.ts +0 -52
  261. package/src/docs/animations.stories.mdx +0 -83
  262. package/src/docs/colors.stories.mdx +0 -77
  263. package/src/docs/drop-shadows.stories.mdx +0 -108
  264. package/src/docs/icons.stories.mdx +0 -1590
  265. package/src/docs/typography.stories.mdx +0 -253
  266. package/src/index.ts +0 -1
  267. package/src/postcss.config.ts +0 -8
  268. package/src/shared/assets/fonts/Apax-Bold.woff2 +0 -0
  269. package/src/shared/assets/fonts/Apax-Light.woff2 +0 -0
  270. package/src/shared/assets/fonts/Apax-Medium.woff2 +0 -0
  271. package/src/shared/assets/fonts/Apax-Regular.woff2 +0 -0
  272. package/src/shared/assets/fonts/Inter-Bold.woff2 +0 -0
  273. package/src/shared/assets/fonts/Inter-ExtraBold.woff2 +0 -0
  274. package/src/shared/assets/fonts/Inter-Medium.woff2 +0 -0
  275. package/src/shared/assets/fonts/Inter-Regular.woff2 +0 -0
  276. package/src/shared/assets/fonts/Inter-SemiBold.woff2 +0 -0
  277. package/src/shared/assets/fonts/Inter-Thin.woff2 +0 -0
  278. package/src/shared/assets/fonts/PT-Mono-Bold.woff2 +0 -0
  279. package/src/shared/assets/fonts/PT-Mono-Regular.woff2 +0 -0
  280. package/src/shared/assets/fonts/index.ts +0 -1
  281. package/src/shared/assets/images/index.ts +0 -1
  282. package/src/shared/assets/images/lukso-logo.svg +0 -3
  283. package/src/shared/assets/images/profile-default.png +0 -0
  284. package/src/shared/assets/index.ts +0 -1
  285. package/src/shared/directives/custom-class-map/index.ts +0 -49
  286. package/src/shared/directives/index.ts +0 -1
  287. package/src/shared/globals.d.ts +0 -5
  288. package/src/shared/styles/colors.scss +0 -91
  289. package/src/shared/styles/component.scss +0 -13
  290. package/src/shared/styles/fonts.scss +0 -97
  291. package/src/shared/styles/index.ts +0 -1
  292. package/src/shared/styles/main.scss +0 -13
  293. package/src/shared/styles/typography.scss +0 -142
  294. package/src/shared/styles/variables.scss +0 -5
  295. package/src/shared/tailwind-element/index.ts +0 -16
  296. package/src/shared/utils/__tests__/slice-address.spec.ts +0 -15
  297. package/src/shared/utils/color-palette.ts +0 -76
  298. package/src/shared/utils/copy-assets.ts +0 -80
  299. package/src/shared/utils/hsl-color-map.ts +0 -20
  300. package/src/shared/utils/slice-address.ts +0 -30
  301. /package/{dist → tools}/assets/fonts/Apax-Bold.woff2 +0 -0
  302. /package/{dist → tools}/assets/fonts/Apax-Light.woff2 +0 -0
  303. /package/{dist → tools}/assets/fonts/Apax-Medium.woff2 +0 -0
  304. /package/{dist → tools}/assets/fonts/Apax-Regular.woff2 +0 -0
  305. /package/{dist → tools}/assets/fonts/Inter-Bold.woff2 +0 -0
  306. /package/{dist → tools}/assets/fonts/Inter-ExtraBold.woff2 +0 -0
  307. /package/{dist → tools}/assets/fonts/Inter-Medium.woff2 +0 -0
  308. /package/{dist → tools}/assets/fonts/Inter-Regular.woff2 +0 -0
  309. /package/{dist → tools}/assets/fonts/Inter-SemiBold.woff2 +0 -0
  310. /package/{dist → tools}/assets/fonts/Inter-Thin.woff2 +0 -0
  311. /package/{dist → tools}/assets/fonts/PT-Mono-Bold.woff2 +0 -0
  312. /package/{dist → tools}/assets/fonts/PT-Mono-Regular.woff2 +0 -0
  313. /package/{dist → tools}/assets/images/lukso-logo.svg +0 -0
  314. /package/{dist → tools}/assets/images/profile-default.png +0 -0
  315. /package/{dist/shared/utils → tools}/hsl-color-map.d.ts +0 -0
  316. /package/{dist/shared/utils → tools}/hsl-color-map.d.ts.map +0 -0
  317. /package/{dist → tools}/sass/colors.scss +0 -0
  318. /package/{dist → tools}/sass/component.scss +0 -0
  319. /package/{dist → tools}/sass/fonts.scss +0 -0
  320. /package/{dist/shared/assets/fonts → tools/sass}/index.d.ts +0 -0
  321. /package/{dist/shared/assets/fonts → tools/sass}/index.d.ts.map +0 -0
  322. /package/{dist → tools}/sass/main.scss +0 -0
  323. /package/{dist → tools}/sass/typography.scss +0 -0
  324. /package/{dist → tools}/sass/variables.scss +0 -0
  325. /package/{dist/shared/utils → tools}/slice-address.d.ts +0 -0
  326. /package/{dist/shared/utils → tools}/slice-address.d.ts.map +0 -0
  327. /package/{dist/shared/assets/images → tools/styles}/index.d.ts +0 -0
  328. /package/{dist/shared/assets/images → tools/styles}/index.d.ts.map +0 -0
@@ -1,184 +0,0 @@
1
- import { html } from 'lit-html'
2
- import './index'
3
-
4
- /** Documentation and examples of `lukso-input` component. */
5
- export default {
6
- title: 'Design System/Forms/lukso-input',
7
- component: 'lukso-input',
8
- argTypes: {
9
- value: {
10
- control: { type: 'text' },
11
- },
12
- name: {
13
- control: { type: 'text' },
14
- },
15
- type: {
16
- control: { type: 'text' },
17
- },
18
- placeholder: {
19
- control: { type: 'text' },
20
- },
21
- label: {
22
- control: { type: 'text' },
23
- },
24
- description: {
25
- control: { type: 'text' },
26
- },
27
- error: {
28
- control: { type: 'text' },
29
- },
30
- unit: {
31
- control: { type: 'text' },
32
- },
33
- isFullWidth: {
34
- control: { type: 'boolean' },
35
- },
36
- autofocus: {
37
- control: { type: 'boolean' },
38
- },
39
- min: {
40
- control: { type: 'number' },
41
- },
42
- max: {
43
- control: { type: 'number' },
44
- },
45
- onKeyUp: {
46
- description: 'Emitted on key up event.',
47
- table: {
48
- category: 'Events',
49
- },
50
- },
51
- onKeyDown: {
52
- description: 'Emitted on key up down.',
53
- table: {
54
- category: 'Events',
55
- },
56
- },
57
- onKeyPress: {
58
- description: 'Emitted on key press.',
59
- table: {
60
- category: 'Events',
61
- },
62
- },
63
- },
64
- args: {
65
- type: 'text',
66
- value: '',
67
- name: 'input',
68
- label: '',
69
- description: '',
70
- error: '',
71
- placeholder: '',
72
- unit: '',
73
- isFullWidth: false,
74
- autofocus: false,
75
- min: undefined,
76
- max: undefined,
77
- },
78
- parameters: {
79
- controls: {
80
- exclude: [
81
- 'defaultInputStyles',
82
- 'defaultUnitStyles',
83
- 'is-full-width',
84
- 'hasHocus',
85
- 'hasHighlight',
86
- ],
87
- },
88
- design: {
89
- type: 'figma',
90
- url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=420%3A3617&t=JAexoWba0Re3ntDk-4',
91
- },
92
- },
93
- }
94
-
95
- const Template = ({
96
- value,
97
- name,
98
- type,
99
- placeholder,
100
- label,
101
- description,
102
- error,
103
- unit,
104
- isFullWidth,
105
- autofocus,
106
- min,
107
- max,
108
- }) =>
109
- html`<lukso-input
110
- value=${value}
111
- name=${name}
112
- type=${type}
113
- placeholder=${placeholder}
114
- label=${label}
115
- description=${description}
116
- error=${error}
117
- unit=${unit}
118
- ?is-full-width=${isFullWidth}
119
- ?autofocus=${autofocus}
120
- min=${min}
121
- max=${max}
122
- @on-key-up="handleKeyUp"
123
- @on-key-down="handleKeyDown"
124
- @on-key-press="handleKeyPress"
125
- ></lukso-input>`
126
-
127
- /** Example of default input with `value`. */
128
- export const DefaultInput = Template.bind({})
129
- DefaultInput.args = {
130
- value: 'Text Input',
131
- }
132
-
133
- /** Example of input with `placeholder` text. */
134
- export const PlaceholderText = Template.bind({})
135
- PlaceholderText.args = {
136
- placeholder: 'Placeholder Text',
137
- }
138
-
139
- /** Example of input with `label`. */
140
- export const Label = Template.bind({})
141
- Label.args = {
142
- label: 'Title',
143
- }
144
-
145
- /** Example of input with `label` and `description`. */
146
- export const LabelAndDescription = Template.bind({})
147
- LabelAndDescription.args = {
148
- label: 'Title',
149
- description: 'Description',
150
- }
151
-
152
- /** Example of input with `error`. */
153
- export const Error = Template.bind({})
154
- Error.args = {
155
- label: 'Title',
156
- description: 'Description',
157
- error: 'Error message',
158
- }
159
-
160
- /** Example of input with `unit`. */
161
- export const Unit = Template.bind({})
162
- Unit.args = {
163
- unit: 'unit',
164
- }
165
-
166
- /** If you need input to take full width of the parent element add `is-full-width` property. */
167
- export const FullWidth = Template.bind({})
168
- FullWidth.args = {
169
- isFullWidth: true,
170
- }
171
-
172
- /** If you need input to be focused add `autofocus` property. */
173
- export const Autofocus = Template.bind({})
174
- Autofocus.args = {
175
- autofocus: true,
176
- }
177
-
178
- /** With `min` and `max` property you can specify minimum or maximum value that can be entered. It works with `number`, `range`, `date`, `datetime-local`, `month`, `time` and `week` input types */
179
- export const MinMaxValue = Template.bind({})
180
- MinMaxValue.args = {
181
- min: 1,
182
- max: 10,
183
- type: 'number',
184
- }
@@ -1,63 +0,0 @@
1
- import { html } from 'lit'
2
- import { customElement, property } from 'lit/decorators.js'
3
-
4
- import { TailwindElement } from '@/shared/tailwind-element'
5
- import { customClassMap } from '@/shared/directives'
6
-
7
- @customElement('lukso-navbar')
8
- export class LuksoNavbar extends TailwindElement {
9
- @property({ type: String })
10
- title = ''
11
-
12
- @property({ type: Boolean, attribute: 'is-center' })
13
- isCenter = false
14
-
15
- @property({ type: Boolean, attribute: 'is-sticky' })
16
- isSticky = false
17
-
18
- private defaultStyles = `bg-neutral-100 shadow-pink-drop-shadow h-78 flex`
19
-
20
- private centerStyles = `justify-center`
21
-
22
- private stickyStyles = `sticky top-0 z-[1000]`
23
-
24
- _onBrandClick() {
25
- const event = new CustomEvent('on-brand-click', {
26
- bubbles: true,
27
- composed: true,
28
- })
29
- this.dispatchEvent(event)
30
- }
31
-
32
- render() {
33
- return html`
34
- <nav
35
- data-testid="navbar"
36
- class=${customClassMap({
37
- [this.defaultStyles]: true,
38
- [this.centerStyles]: this.isCenter,
39
- [this.stickyStyles]: this.isSticky,
40
- })}
41
- >
42
- <div
43
- class="flex items-center px-10 h-full cursor-pointer"
44
- @click=${this._onBrandClick}
45
- >
46
- <img src="/assets/images/lukso-logo.svg" class="mr-4" />
47
- <div
48
- class="text-purple-51 heading-h4-medium-uppercase-apax whitespace-pre-line flex leading-none"
49
- >
50
- ${this.title}
51
- </div>
52
- </div>
53
- <slot></slot>
54
- </nav>
55
- `
56
- }
57
- }
58
-
59
- declare global {
60
- interface HTMLElementTagNameMap {
61
- 'lukso-navbar': LuksoNavbar
62
- }
63
- }
@@ -1,70 +0,0 @@
1
- import { html } from 'lit-html'
2
- import './index'
3
-
4
- /** Documentation and examples of `lukso-navbar` component. */
5
- export default {
6
- title: 'Design System/Components/lukso-navbar',
7
- component: 'lukso-navbar',
8
- argTypes: {
9
- title: {
10
- control: { type: 'text' },
11
- },
12
- isCenter: {
13
- control: { type: 'boolean' },
14
- },
15
- isSticky: {
16
- control: { type: 'boolean' },
17
- },
18
- onBrandClick: {
19
- action: 'on-brand-click',
20
- description: 'Emitted when brand/logo is clicked',
21
- table: {
22
- category: 'Events',
23
- },
24
- },
25
- },
26
- args: {
27
- title: `UNIVERSAL
28
- PROFILES`,
29
- isCenter: false,
30
- isSticky: false,
31
- },
32
- parameters: {
33
- controls: {
34
- exclude: [
35
- 'defaultStyles',
36
- 'centerStyles',
37
- 'stickyStyles',
38
- 'is-center',
39
- 'is-sticky',
40
- ],
41
- },
42
- design: {
43
- type: 'figma',
44
- url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=1097%3A14669&t=AGmdbG8fXRENuU3o-4',
45
- },
46
- },
47
- }
48
-
49
- const Template = ({ title, isCenter, isSticky }) =>
50
- html`<lukso-navbar
51
- title=${title}
52
- ?is-center=${isCenter}
53
- ?is-sticky=${isSticky}
54
- @on-brand-click="handleBrandClick"
55
- ></lukso-navbar>`
56
-
57
- /** Example of default navbar. It support `@on-brand-click` event that is fired when clicking on the logo/title. */
58
- export const DefaultNavbar = Template.bind({})
59
-
60
- /** Example of navbar with logo and title in center. You set this by adding `is-center` property. */
61
- export const CenterNavbar = Template.bind({})
62
- CenterNavbar.args = {
63
- isCenter: true,
64
- }
65
-
66
- /** By default navbar stays at the top of the document. If you want it scroll with the content then ad `is-sticky` property. */
67
- export const StickyNavbar = Template.bind({})
68
- StickyNavbar.args = {
69
- isSticky: true,
70
- }
@@ -1,106 +0,0 @@
1
- import { html } from 'lit'
2
- import { customElement, property } from 'lit/decorators.js'
3
- import { styleMap } from 'lit/directives/style-map.js'
4
- import makeBlockie from 'ethereum-blockies-base64'
5
-
6
- import { TailwindElement } from '@/shared/tailwind-element'
7
-
8
- export type ProfileSize = 'x-small' | 'small' | 'medium' | 'large' | 'x-large'
9
- type SizeDef = { identiconSize?: number; profileImageSize: number }
10
-
11
- @customElement('lukso-profile')
12
- export class LuksoProfile extends TailwindElement {
13
- @property({ type: String, attribute: 'profile-url' })
14
- profileUrl = ''
15
-
16
- @property({ type: String, attribute: 'profile-address' })
17
- profileAddress = ''
18
-
19
- @property({ type: Boolean, attribute: 'has-identicon' })
20
- hasIdenticon = false
21
-
22
- @property({ type: String })
23
- size: ProfileSize = 'large'
24
-
25
- sizes: Record<ProfileSize, SizeDef> = {
26
- 'x-small': {
27
- identiconSize: undefined,
28
- profileImageSize: 24,
29
- },
30
- small: {
31
- identiconSize: 16,
32
- profileImageSize: 40,
33
- },
34
- medium: {
35
- identiconSize: 20,
36
- profileImageSize: 56,
37
- },
38
- large: {
39
- identiconSize: 24,
40
- profileImageSize: 80,
41
- },
42
- 'x-large': {
43
- identiconSize: 28,
44
- profileImageSize: 96,
45
- },
46
- }
47
-
48
- private profileImageSize() {
49
- return this.sizes[this.size].profileImageSize
50
- }
51
-
52
- private identiconSize() {
53
- return this.sizes[this.size].identiconSize
54
- }
55
-
56
- private defaultProfileUrl = '/assets/images/profile-default.png'
57
-
58
- private identicon() {
59
- return this.hasIdenticon && this.profileAddress && this.identiconSize()
60
- ? makeBlockie(this.profileAddress)
61
- : ''
62
- }
63
-
64
- render() {
65
- return html`
66
- <div
67
- data-testid="profile"
68
- style=${styleMap({
69
- backgroundImage: `url(${this.defaultProfileUrl})`,
70
- width: `${this.profileImageSize()}px`,
71
- height: `${this.profileImageSize()}px`,
72
- })}
73
- class="rounded-full bg-[50%] bg-no-repeat bg-cover bg-neutral-90
74
- outline outline-2 outline-neutral-100"
75
- >
76
- <div
77
- style=${styleMap({
78
- backgroundImage: `url(${this.profileUrl})`,
79
- width: `${this.profileImageSize()}px`,
80
- height: `${this.profileImageSize()}px`,
81
- })}
82
- class="rounded-full bg-[50%] bg-no-repeat bg-cover relative
83
- "
84
- >
85
- ${this.identicon()
86
- ? html`<img
87
- src=${this.identicon()}
88
- class="absolute shadow-shadow-1xl rounded-full
89
- outline outline-2 outline-neutral-100 right-0 bottom-0"
90
- style=${styleMap({
91
- width: `${this.identiconSize()}px`,
92
- height: `${this.identiconSize()}px`,
93
- })}
94
- />`
95
- : ''}
96
- </div>
97
- </div>
98
- `
99
- }
100
- }
101
-
102
- declare global {
103
- interface HTMLElementTagNameMap {
104
- 'lukso-profile': LuksoProfile
105
- }
106
- }
@@ -1,104 +0,0 @@
1
- import { html } from 'lit-html'
2
- import './index'
3
-
4
- /**
5
- * Documentation and examples of `lukso-profile` component.
6
- * Profiles comes in `x-small`, `small`, `medium`, `large` and `x-large` size that is set in `size` property.
7
- * Identicon is generated using `ethereum-blockies-base64` library from `profile-Address` property.
8
- * To show profile picture pass valid url in `profile-url` property.
9
- */
10
- export default {
11
- title: 'Design System/Components/lukso-profile',
12
- component: 'lukso-profile',
13
- argTypes: {
14
- profileUrl: {
15
- control: { type: 'text' },
16
- },
17
- size: {
18
- control: {
19
- type: 'select',
20
- },
21
- options: ['x-small', 'small', 'medium', 'large', 'x-large'],
22
- },
23
- profileAddress: {
24
- control: { type: 'text' },
25
- },
26
- hasIdenticon: {
27
- control: { type: 'boolean' },
28
- },
29
- },
30
- args: {
31
- profileUrl: 'images/sample-avatar.png',
32
- size: 'x-large',
33
- profileAddress: '0x9671Db683406EE0817B1f5cB6A3b3BD111477457',
34
- hasIdenticon: true,
35
- },
36
- parameters: {
37
- controls: {
38
- exclude: [
39
- 'sizes',
40
- 'profile-url',
41
- 'profileImageSize',
42
- 'identiconSize',
43
- 'identicon',
44
- 'profile-address',
45
- 'has-identicon',
46
- 'defaultProfileUrl',
47
- ],
48
- },
49
- design: {
50
- type: 'figma',
51
- url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=378%3A3395&t=AGmdbG8fXRENuU3o-4',
52
- },
53
- },
54
- }
55
-
56
- const Template = ({ profileUrl, size, profileAddress, hasIdenticon }) =>
57
- html`<lukso-profile
58
- profile-url=${profileUrl}
59
- size=${size}
60
- profile-address=${profileAddress}
61
- ?has-identicon=${hasIdenticon}
62
- ></lukso-profile>`
63
-
64
- /** Example of `x-large` profile in `96x96` pixel size.*/
65
- export const XLarge = Template.bind({})
66
- XLarge.args = {
67
- size: 'x-large',
68
- }
69
-
70
- /** Example of `large` profile in `80x80` pixel size.*/
71
- export const Large = Template.bind({})
72
- Large.args = {
73
- size: 'large',
74
- }
75
-
76
- /** Example of `medium` profile in `56x56` pixel size.*/
77
- export const Medium = Template.bind({})
78
- Medium.args = {
79
- size: 'medium',
80
- }
81
-
82
- /** Example of `small` profile in `40x40` pixel size.*/
83
- export const Small = Template.bind({})
84
- Small.args = {
85
- size: 'small',
86
- }
87
-
88
- /** Example of `x-small` profile in `24x24` pixel size.*/
89
- export const XSmall = Template.bind({})
90
- XSmall.args = {
91
- size: 'x-small',
92
- }
93
-
94
- /** When image can't be loaded or missing the placeholder is displayed. */
95
- export const Unknown = Template.bind({})
96
- Unknown.args = {
97
- profileUrl: '',
98
- }
99
-
100
- /** You can also control if identicon should be visible with `has-identicon` property. */
101
- export const NoIdenticon = Template.bind({})
102
- NoIdenticon.args = {
103
- hasIdenticon: false,
104
- }
@@ -1,28 +0,0 @@
1
- import { html } from 'lit'
2
- import { customElement, property } from 'lit/decorators.js'
3
- import { unsafeHTML } from 'lit/directives/unsafe-html.js'
4
- import DOMPurify from 'dompurify'
5
-
6
- import { TailwindElement } from '@/shared/tailwind-element'
7
-
8
- @customElement('lukso-sanitize')
9
- export class LuksoSanitize extends TailwindElement {
10
- @property({ type: String, attribute: 'html-content' })
11
- htmlContent = ''
12
-
13
- private sanitize() {
14
- return DOMPurify.sanitize(this.htmlContent)
15
- }
16
-
17
- render() {
18
- // in order to show HTML we need to use unsafeHTML directive.
19
- // This is safe since we already sanitized content
20
- return html`${unsafeHTML(this.sanitize())}`
21
- }
22
- }
23
-
24
- declare global {
25
- interface HTMLElementTagNameMap {
26
- 'lukso-sanitize': LuksoSanitize
27
- }
28
- }
@@ -1,30 +0,0 @@
1
- import { html } from 'lit-html'
2
- import './index'
3
-
4
- /** Documentation and examples of `lukso-sanitize` component. It's used to show potentially dangerous content or HTML in safe way.
5
- * One of the common use cases is using HTML tags in texts coming from translations.
6
- */
7
- export default {
8
- title: 'Design System/Components/lukso-sanitize',
9
- component: 'lukso-sanitize',
10
- argTypes: {
11
- htmlContent: {
12
- control: { type: 'text' },
13
- },
14
- },
15
- args: {
16
- htmlContent:
17
- 'This is sample text containing html tags like <b>bold</b> or <a class="text-sky-64" href="/">link</a>.',
18
- },
19
- parameters: {
20
- controls: {
21
- exclude: ['sanitize', 'html-content'],
22
- },
23
- },
24
- }
25
-
26
- const Template = ({ htmlContent }) =>
27
- html`<lukso-sanitize html-content=${htmlContent}></lukso-sanitize>`
28
-
29
- /** This is example if text containing HTML tags. */
30
- export const Sanitize = Template.bind({})
@@ -1,68 +0,0 @@
1
- import { html } from 'lit'
2
- import { customElement, property } from 'lit/decorators.js'
3
- import { styleMap } from 'lit/directives/style-map.js'
4
-
5
- import { TailwindElement } from '@/shared/tailwind-element'
6
- import { customClassMap } from '@/shared/directives'
7
-
8
- export type TagSizes = 'small' | 'large'
9
-
10
- @customElement('lukso-tag')
11
- export class LuksoTag extends TailwindElement {
12
- @property({ type: String })
13
- size: TagSizes = 'small'
14
-
15
- @property({ type: Boolean, attribute: 'is-rounded' })
16
- isRounded = false
17
-
18
- @property({ type: String, attribute: 'background-color' })
19
- backgroundColor = ''
20
-
21
- @property({ type: String, attribute: 'text-color' })
22
- textColor = ''
23
-
24
- private defaultStyles = `inline-flex items-center justify-center border border-neutral-20 text-neutral-20`
25
- private smallStyles = `paragraph-12-medium h-[28px]`
26
- private largeStyles = `paragraph-14-medium h-[34px]`
27
-
28
- private padding() {
29
- if (this.size === 'small' && this.isRounded) {
30
- return 'px-3'
31
- }
32
-
33
- if (this.size === 'large') {
34
- return 'px-4'
35
- }
36
-
37
- return 'px-2'
38
- }
39
-
40
- render() {
41
- return html`
42
- <div
43
- data-testid="tag"
44
- class=${customClassMap({
45
- [this.defaultStyles]: true,
46
- [this.padding()]: true,
47
- ['rounded-[56px]']: this.isRounded,
48
- ['rounded-lg']: !this.isRounded,
49
- [this.smallStyles]: this.size === 'small',
50
- [this.largeStyles]: this.size === 'large',
51
- })}
52
- style=${styleMap({
53
- backgroundColor: `var(--${this.backgroundColor})`,
54
- borderColor: `var(--${this.backgroundColor})`,
55
- color: `var(--${this.textColor})`,
56
- })}
57
- >
58
- <slot></slot>
59
- </div>
60
- `
61
- }
62
- }
63
-
64
- declare global {
65
- interface HTMLElementTagNameMap {
66
- 'lukso-tag': LuksoTag
67
- }
68
- }