@lukso/web-components 1.3.1 → 1.4.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.
- package/CHANGELOG.md +14 -0
- package/README.md +33 -7
- package/dist/color-palette/index.js +705 -0
- package/dist/color-palette/index.umd.cjs +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +5344 -1760
- package/dist/components/index.umd.cjs +2997 -72
- package/dist/components/lukso-button/index.d.ts +10 -1
- package/dist/components/lukso-button/index.js +234 -185
- package/dist/components/lukso-button/index.umd.cjs +32 -21
- package/dist/components/lukso-card/index.d.ts +4 -4
- package/dist/components/lukso-card/index.js +81 -72
- package/dist/components/lukso-card/index.umd.cjs +9 -9
- package/dist/components/lukso-icon/icons/add-photo.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-down-lg.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-down-sm.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-left-lg.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-left-sm.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-right-lg.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-right-sm.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-up-lg.d.ts +3 -0
- package/dist/components/lukso-icon/icons/arrow-up-sm.d.ts +3 -0
- package/dist/components/lukso-icon/icons/barbell-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/bulb-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/camera.d.ts +3 -0
- package/dist/components/lukso-icon/icons/clipboard.d.ts +3 -0
- package/dist/components/lukso-icon/icons/clock.d.ts +3 -0
- package/dist/components/lukso-icon/icons/close-lg.d.ts +3 -0
- package/dist/components/lukso-icon/icons/close-sm.d.ts +3 -0
- package/dist/components/lukso-icon/icons/cloud.d.ts +3 -0
- package/dist/components/lukso-icon/icons/compass-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/complete-filled.d.ts +3 -0
- package/dist/components/lukso-icon/icons/complete-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/connect.d.ts +3 -0
- package/dist/components/lukso-icon/icons/connections.d.ts +3 -0
- package/dist/components/lukso-icon/icons/contract-lock.d.ts +3 -0
- package/dist/components/lukso-icon/icons/controller.d.ts +3 -0
- package/dist/components/lukso-icon/icons/copy.d.ts +3 -0
- package/dist/components/lukso-icon/icons/cross-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/dots.d.ts +3 -0
- package/dist/components/lukso-icon/icons/edit.d.ts +3 -0
- package/dist/components/lukso-icon/icons/error.d.ts +3 -0
- package/dist/components/lukso-icon/icons/eth-logo.d.ts +3 -0
- package/dist/components/lukso-icon/icons/expand.d.ts +3 -0
- package/dist/components/lukso-icon/icons/extension.d.ts +3 -0
- package/dist/components/lukso-icon/icons/eye-hide.d.ts +3 -0
- package/dist/components/lukso-icon/icons/eye-show.d.ts +3 -0
- package/dist/components/lukso-icon/icons/filter.d.ts +3 -0
- package/dist/components/lukso-icon/icons/fish-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/flip.d.ts +3 -0
- package/dist/components/lukso-icon/icons/globe.d.ts +3 -0
- package/dist/components/lukso-icon/icons/google-color.d.ts +3 -0
- package/dist/components/lukso-icon/icons/hamburger.d.ts +3 -0
- package/dist/components/lukso-icon/icons/infinite.d.ts +3 -0
- package/dist/components/lukso-icon/icons/information.d.ts +3 -0
- package/dist/components/lukso-icon/icons/key-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/link.d.ts +3 -0
- package/dist/components/lukso-icon/icons/link1.d.ts +3 -0
- package/dist/components/lukso-icon/icons/link2.d.ts +3 -0
- package/dist/components/lukso-icon/icons/link3.d.ts +3 -0
- package/dist/components/lukso-icon/icons/link4.d.ts +3 -0
- package/dist/components/lukso-icon/icons/loading.d.ts +3 -0
- package/dist/components/lukso-icon/icons/location.d.ts +3 -0
- package/dist/components/lukso-icon/icons/locked.d.ts +3 -0
- package/dist/components/lukso-icon/icons/login-2.d.ts +3 -0
- package/dist/components/lukso-icon/icons/login-3.d.ts +3 -0
- package/dist/components/lukso-icon/icons/login.d.ts +3 -0
- package/dist/components/lukso-icon/icons/logo-chrome.d.ts +3 -0
- package/dist/components/lukso-icon/icons/lyx-logo.d.ts +3 -0
- package/dist/components/lukso-icon/icons/mail.d.ts +3 -0
- package/dist/components/lukso-icon/icons/menu-1.d.ts +3 -0
- package/dist/components/lukso-icon/icons/menu-2.d.ts +3 -0
- package/dist/components/lukso-icon/icons/migrate.d.ts +3 -0
- package/dist/components/lukso-icon/icons/minimize.d.ts +3 -0
- package/dist/components/lukso-icon/icons/network.d.ts +3 -0
- package/dist/components/lukso-icon/icons/notifications.d.ts +3 -0
- package/dist/components/lukso-icon/icons/phone-portrait-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/pin.d.ts +3 -0
- package/dist/components/lukso-icon/icons/play-filled.d.ts +3 -0
- package/dist/components/lukso-icon/icons/play-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/plus.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-add.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-export.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-import.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-recovery-2.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-recovery.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile-restore.d.ts +3 -0
- package/dist/components/lukso-icon/icons/profile.d.ts +3 -0
- package/dist/components/lukso-icon/icons/qr-code.d.ts +3 -0
- package/dist/components/lukso-icon/icons/relayer.d.ts +3 -0
- package/dist/components/lukso-icon/icons/reload.d.ts +3 -0
- package/dist/components/lukso-icon/icons/return-down.d.ts +3 -0
- package/dist/components/lukso-icon/icons/return-left.d.ts +3 -0
- package/dist/components/lukso-icon/icons/return-right.d.ts +3 -0
- package/dist/components/lukso-icon/icons/return-up.d.ts +3 -0
- package/dist/components/lukso-icon/icons/search.d.ts +3 -0
- package/dist/components/lukso-icon/icons/settings.d.ts +3 -0
- package/dist/components/lukso-icon/icons/smart-contract-doc.d.ts +3 -0
- package/dist/components/lukso-icon/icons/smart-contract.d.ts +3 -0
- package/dist/components/lukso-icon/icons/star-filled.d.ts +3 -0
- package/dist/components/lukso-icon/icons/star-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/step-dot.d.ts +3 -0
- package/dist/components/lukso-icon/icons/step-progress.d.ts +3 -0
- package/dist/components/lukso-icon/icons/steps.d.ts +3 -0
- package/dist/components/lukso-icon/icons/tick.d.ts +3 -0
- package/dist/components/lukso-icon/icons/timer-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/transaction-receive.d.ts +3 -0
- package/dist/components/lukso-icon/icons/transaction-send.d.ts +3 -0
- package/dist/components/lukso-icon/icons/transfer.d.ts +3 -0
- package/dist/components/lukso-icon/icons/trash.d.ts +3 -0
- package/dist/components/lukso-icon/icons/turn-down.d.ts +3 -0
- package/dist/components/lukso-icon/icons/turn-left.d.ts +3 -0
- package/dist/components/lukso-icon/icons/turn-right.d.ts +3 -0
- package/dist/components/lukso-icon/icons/turn-up.d.ts +3 -0
- package/dist/components/lukso-icon/icons/unlocked.d.ts +3 -0
- package/dist/components/lukso-icon/icons/wallet-outline.d.ts +3 -0
- package/dist/components/lukso-icon/icons/warning-round.d.ts +3 -0
- package/dist/components/lukso-icon/icons/warning-triangle.d.ts +3 -0
- package/dist/components/lukso-icon/index.d.ts +23 -0
- package/dist/components/lukso-icon/index.js +4500 -0
- package/dist/components/lukso-icon/index.umd.cjs +2928 -0
- package/dist/components/lukso-input/index.d.ts +36 -0
- package/dist/components/lukso-input/index.js +1305 -0
- package/dist/components/lukso-input/index.umd.cjs +104 -0
- package/dist/components/lukso-navbar/index.d.ts +1 -1
- package/dist/components/lukso-navbar/index.js +23 -23
- package/dist/components/lukso-navbar/index.umd.cjs +7 -7
- package/dist/components/lukso-profile/index.d.ts +1 -1
- package/dist/components/lukso-profile/index.js +82 -73
- package/dist/components/lukso-profile/index.umd.cjs +10 -10
- package/dist/components/lukso-sanitize/index.d.ts +2 -2
- package/dist/components/lukso-sanitize/index.js +96 -93
- package/dist/components/lukso-sanitize/index.umd.cjs +9 -9
- package/dist/components/lukso-tag/index.d.ts +1 -1
- package/dist/components/lukso-tag/index.js +28 -25
- package/dist/components/lukso-tag/index.umd.cjs +8 -8
- package/dist/components/lukso-test/index.d.ts +1 -1
- package/dist/components/lukso-test/index.js +619 -619
- package/dist/components/lukso-test/index.umd.cjs +25 -25
- package/dist/components/lukso-username/index.d.ts +1 -1
- package/dist/components/lukso-username/index.js +49 -50
- package/dist/components/lukso-username/index.umd.cjs +14 -14
- package/dist/components/lukso-wizard/index.d.ts +2 -2
- package/dist/components/lukso-wizard/index.js +1 -1
- package/dist/components/lukso-wizard/index.umd.cjs +1 -1
- package/dist/index.js +5344 -1760
- package/dist/index.umd.cjs +2997 -72
- package/dist/sass/color-palette.ts +1 -1
- package/dist/sass/colors.scss +91 -0
- package/{src/shared/utils → dist/sass}/hslColorMap.ts +0 -0
- package/dist/sass/main.scss +1 -0
- package/dist/shared/directives/custom-class-map/index.d.ts +1 -1
- package/dist/shared/styles/color-palette.d.ts +43 -0
- package/dist/shared/styles/hslColorMap.d.ts +10 -0
- package/dist/shared/tailwind-element/index.js +99 -99
- package/dist/shared/tailwind-element/index.umd.cjs +11 -11
- package/dist/shared/tailwind-element.js +99 -99
- package/dist/shared/tailwind-element.umd.cjs +11 -11
- package/dist/styles/main.css +91 -0
- package/package.json +18 -1
- package/src/components/index.ts +3 -1
- package/src/components/lukso-button/index.ts +70 -3
- package/src/components/lukso-button/lukso-button.stories.ts +101 -3
- package/src/components/lukso-card/lukso-card.stories.ts +6 -2
- package/src/components/lukso-icon/icons/add-photo.ts +46 -0
- package/src/components/lukso-icon/icons/arrow-down-lg.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-down-sm.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-left-lg.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-left-sm.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-right-lg.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-right-sm.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-up-lg.ts +26 -0
- package/src/components/lukso-icon/icons/arrow-up-sm.ts +26 -0
- package/src/components/lukso-icon/icons/barbell-outline.ts +54 -0
- package/src/components/lukso-icon/icons/bulb-outline.ts +54 -0
- package/src/components/lukso-icon/icons/camera.ts +40 -0
- package/src/components/lukso-icon/icons/clipboard.ts +59 -0
- package/src/components/lukso-icon/icons/clock.ts +31 -0
- package/src/components/lukso-icon/icons/close-lg.ts +33 -0
- package/src/components/lukso-icon/icons/close-sm.ts +33 -0
- package/src/components/lukso-icon/icons/cloud.ts +25 -0
- package/src/components/lukso-icon/icons/compass-outline.ts +29 -0
- package/src/components/lukso-icon/icons/complete-filled.ts +32 -0
- package/src/components/lukso-icon/icons/complete-outline.ts +31 -0
- package/src/components/lukso-icon/icons/connect.ts +33 -0
- package/src/components/lukso-icon/icons/connections.ts +34 -0
- package/src/components/lukso-icon/icons/contract-lock.ts +43 -0
- package/src/components/lukso-icon/icons/controller.ts +55 -0
- package/src/components/lukso-icon/icons/copy.ts +31 -0
- package/src/components/lukso-icon/icons/cross-outline.ts +38 -0
- package/src/components/lukso-icon/icons/dots.ts +22 -0
- package/src/components/lukso-icon/icons/edit.ts +30 -0
- package/src/components/lukso-icon/icons/error.ts +31 -0
- package/src/components/lukso-icon/icons/eth-logo.ts +50 -0
- package/src/components/lukso-icon/icons/expand.ts +31 -0
- package/src/components/lukso-icon/icons/extension.ts +31 -0
- package/src/components/lukso-icon/icons/eye-hide.ts +47 -0
- package/src/components/lukso-icon/icons/eye-show.ts +37 -0
- package/src/components/lukso-icon/icons/filter.ts +43 -0
- package/src/components/lukso-icon/icons/fish-outline.ts +36 -0
- package/src/components/lukso-icon/icons/flip.ts +45 -0
- package/src/components/lukso-icon/icons/globe.ts +61 -0
- package/src/components/lukso-icon/icons/google-color.ts +35 -0
- package/src/components/lukso-icon/icons/hamburger.ts +40 -0
- package/src/components/lukso-icon/icons/infinite.ts +33 -0
- package/src/components/lukso-icon/icons/information.ts +38 -0
- package/src/components/lukso-icon/icons/key-outline.ts +25 -0
- package/src/components/lukso-icon/icons/link.ts +33 -0
- package/src/components/lukso-icon/icons/link1.ts +39 -0
- package/src/components/lukso-icon/icons/link2.ts +46 -0
- package/src/components/lukso-icon/icons/link3.ts +32 -0
- package/src/components/lukso-icon/icons/link4.ts +52 -0
- package/src/components/lukso-icon/icons/loading.ts +50 -0
- package/src/components/lukso-icon/icons/location.ts +33 -0
- package/src/components/lukso-icon/icons/locked.ts +44 -0
- package/src/components/lukso-icon/icons/login-2.ts +55 -0
- package/src/components/lukso-icon/icons/login-3.ts +53 -0
- package/src/components/lukso-icon/icons/login.ts +39 -0
- package/src/components/lukso-icon/icons/logo-chrome.ts +35 -0
- package/src/components/lukso-icon/icons/lyx-logo.ts +41 -0
- package/src/components/lukso-icon/icons/mail.ts +33 -0
- package/src/components/lukso-icon/icons/menu-1.ts +71 -0
- package/src/components/lukso-icon/icons/menu-2.ts +61 -0
- package/src/components/lukso-icon/icons/migrate.ts +47 -0
- package/src/components/lukso-icon/icons/minimize.ts +53 -0
- package/src/components/lukso-icon/icons/network.ts +49 -0
- package/src/components/lukso-icon/icons/notifications.ts +33 -0
- package/src/components/lukso-icon/icons/phone-portrait-outline.ts +33 -0
- package/src/components/lukso-icon/icons/pin.ts +25 -0
- package/src/components/lukso-icon/icons/play-filled.ts +23 -0
- package/src/components/lukso-icon/icons/play-outline.ts +24 -0
- package/src/components/lukso-icon/icons/plus.ts +33 -0
- package/src/components/lukso-icon/icons/profile-add.ts +43 -0
- package/src/components/lukso-icon/icons/profile-export.ts +42 -0
- package/src/components/lukso-icon/icons/profile-import.ts +42 -0
- package/src/components/lukso-icon/icons/profile-recovery-2.ts +62 -0
- package/src/components/lukso-icon/icons/profile-recovery.ts +55 -0
- package/src/components/lukso-icon/icons/profile-restore.ts +50 -0
- package/src/components/lukso-icon/icons/profile.ts +29 -0
- package/src/components/lukso-icon/icons/qr-code.ts +122 -0
- package/src/components/lukso-icon/icons/relayer.ts +40 -0
- package/src/components/lukso-icon/icons/reload.ts +32 -0
- package/src/components/lukso-icon/icons/return-down.ts +33 -0
- package/src/components/lukso-icon/icons/return-left.ts +33 -0
- package/src/components/lukso-icon/icons/return-right.ts +33 -0
- package/src/components/lukso-icon/icons/return-up.ts +33 -0
- package/src/components/lukso-icon/icons/search.ts +28 -0
- package/src/components/lukso-icon/icons/settings.ts +33 -0
- package/src/components/lukso-icon/icons/smart-contract-doc.ts +40 -0
- package/src/components/lukso-icon/icons/smart-contract.ts +31 -0
- package/src/components/lukso-icon/icons/star-filled.ts +23 -0
- package/src/components/lukso-icon/icons/star-outline.ts +24 -0
- package/src/components/lukso-icon/icons/step-dot.ts +34 -0
- package/src/components/lukso-icon/icons/step-progress.ts +31 -0
- package/src/components/lukso-icon/icons/steps.ts +40 -0
- package/src/components/lukso-icon/icons/tick.ts +26 -0
- package/src/components/lukso-icon/icons/timer-outline.ts +47 -0
- package/src/components/lukso-icon/icons/transaction-receive.ts +39 -0
- package/src/components/lukso-icon/icons/transaction-send.ts +39 -0
- package/src/components/lukso-icon/icons/transfer.ts +47 -0
- package/src/components/lukso-icon/icons/trash.ts +40 -0
- package/src/components/lukso-icon/icons/turn-down.ts +33 -0
- package/src/components/lukso-icon/icons/turn-left.ts +33 -0
- package/src/components/lukso-icon/icons/turn-right.ts +33 -0
- package/src/components/lukso-icon/icons/turn-up.ts +33 -0
- package/src/components/lukso-icon/icons/unlocked.ts +41 -0
- package/src/components/lukso-icon/icons/wallet-outline.ts +35 -0
- package/src/components/lukso-icon/icons/warning-round.ts +32 -0
- package/src/components/lukso-icon/icons/warning-triangle.ts +32 -0
- package/src/components/lukso-icon/index.ts +299 -0
- package/src/components/lukso-icon/lukso-icon.stories.ts +96 -0
- package/src/components/lukso-input/index.ts +188 -0
- package/src/components/lukso-input/lukso-input.stories.ts +183 -0
- package/src/components/lukso-navbar/index.ts +1 -1
- package/src/components/lukso-navbar/lukso-navbar.stories.ts +18 -1
- package/src/components/lukso-profile/index.ts +9 -3
- package/src/components/lukso-profile/lukso-profile.stories.ts +18 -1
- package/src/components/lukso-sanitize/index.ts +1 -1
- package/src/components/lukso-sanitize/lukso-sanitize.stories.ts +5 -1
- package/src/components/lukso-tag/index.ts +4 -4
- package/src/components/lukso-tag/lukso-tag.stories.ts +28 -5
- package/src/components/lukso-username/index.ts +3 -3
- package/src/components/lukso-username/lukso-username.stories.ts +10 -2
- package/src/components/lukso-wizard/index.ts +1 -1
- package/src/components/lukso-wizard/lukso-wizard.stories.ts +4 -1
- package/src/shared/styles/color-palette.ts +1 -1
- package/src/shared/styles/colors.scss +91 -0
- package/src/shared/styles/hslColorMap.ts +20 -0
- package/src/shared/styles/main.scss +1 -0
- package/src/shared/utils/__tests__/sliceAddress.spec.ts +1 -1
- package/tools/color-palette.cjs +2 -2
- package/tools/color-palette.d.ts +2 -2
- package/tools/color-palette.d.ts.map +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit'
|
|
2
|
-
import { customElement, property } from 'lit/decorators.js'
|
|
2
|
+
import { customElement, property, state } from 'lit/decorators.js'
|
|
3
3
|
|
|
4
4
|
import { TailwindElement } from '@/shared/tailwind-element'
|
|
5
5
|
import { customClassMap } from '@/shared/directives'
|
|
@@ -7,6 +7,8 @@ import { customClassMap } from '@/shared/directives'
|
|
|
7
7
|
export type ButtonVariants = 'primary' | 'secondary' | 'landing' | 'link'
|
|
8
8
|
export type ButtonSizes = 'small' | 'medium'
|
|
9
9
|
|
|
10
|
+
const LONG_PRESS_ANIMATION_DURATION_IN_MS = 2000
|
|
11
|
+
|
|
10
12
|
@customElement('lukso-button')
|
|
11
13
|
export class LuksoButton extends TailwindElement {
|
|
12
14
|
@property({ type: String })
|
|
@@ -21,6 +23,18 @@ export class LuksoButton extends TailwindElement {
|
|
|
21
23
|
@property({ type: Boolean, attribute: 'is-full-width' })
|
|
22
24
|
isFullWidth = false
|
|
23
25
|
|
|
26
|
+
@property({ type: Boolean, attribute: 'is-long-press' })
|
|
27
|
+
isLongPress = false
|
|
28
|
+
|
|
29
|
+
@state()
|
|
30
|
+
private isPressed = false
|
|
31
|
+
|
|
32
|
+
@state()
|
|
33
|
+
private noTransition = false
|
|
34
|
+
|
|
35
|
+
@state()
|
|
36
|
+
private timer = 0
|
|
37
|
+
|
|
24
38
|
private defaultStyles = `flex justify-center items-center relative
|
|
25
39
|
border border-solid cursor-pointer transition duration-0
|
|
26
40
|
hover:duration-250 active:scale-98 active:duration-25
|
|
@@ -33,22 +47,69 @@ export class LuksoButton extends TailwindElement {
|
|
|
33
47
|
private primaryStyles = `bg-neutral-20 border-neutral-20 text-neutral-100
|
|
34
48
|
disabled:bg-neutral-90 disabled:border-neutral-90
|
|
35
49
|
hover:shadow-button-hover-primary hover:bg-neutral-25 hover:border-neutral-25
|
|
36
|
-
active:shadow-button-press-primary active:bg-neutral-25 active:border-neutral-25
|
|
50
|
+
active:shadow-button-press-primary active:bg-neutral-25 active:border-neutral-25
|
|
51
|
+
before:bg-neutral-10`
|
|
37
52
|
|
|
38
53
|
private landingStyles = `bg-purple-51 border-purple-51 text-neutral-100
|
|
39
54
|
disabled:bg-neutral-90 disabled:border-neutral-90
|
|
40
55
|
hover:shadow-button-hover-primary hover:bg-purple-58 hover:border-purple-58
|
|
41
|
-
active:shadow-button-press-primary
|
|
56
|
+
active:shadow-button-press-primary
|
|
57
|
+
before:bg-purple-51`
|
|
42
58
|
|
|
43
59
|
private linkStyles = `bg-transparent border-none text-neutral-20
|
|
44
60
|
hover:text-neutral-35
|
|
45
61
|
active:text-neutral-35 active:scale-100
|
|
46
62
|
disabled:text-neutral-90`
|
|
47
63
|
|
|
64
|
+
private longPressStyles = `relative overflow-hidden z-[1] active:outline-0
|
|
65
|
+
before:absolute before:content-[''] before:top-0 before:left-0 before:w-0 before:h-[48px]
|
|
66
|
+
before:rounded-xl before:transition-all before:duration-[2000ms] before:z-[-1] before:rounded-none`
|
|
67
|
+
|
|
68
|
+
private pressedStyles = `before:w-full before:z-[-1]`
|
|
69
|
+
|
|
70
|
+
private noTransitionStyles = `before:transition-none`
|
|
71
|
+
|
|
48
72
|
private mediumSize = `py-3 px-6 paragraph-16-semi-bold rounded-xl`
|
|
49
73
|
|
|
50
74
|
private smallSize = `py-1 px-3 paragraph-12-regular rounded-lg hover:shadow-none active:shadow-none`
|
|
51
75
|
|
|
76
|
+
private handleMouseDown() {
|
|
77
|
+
// Additional check for using long press on non-primary and non-landing variants
|
|
78
|
+
if (this.variant !== 'primary' && this.variant !== 'landing') {
|
|
79
|
+
return console.warn(
|
|
80
|
+
'Long press is only available for primary and landing variants'
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (!this.isLongPress) {
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
this.isPressed = true
|
|
89
|
+
|
|
90
|
+
this.timer = window.setTimeout(() => {
|
|
91
|
+
const event = new CustomEvent('on-long-press-complete', {
|
|
92
|
+
bubbles: true,
|
|
93
|
+
composed: true,
|
|
94
|
+
})
|
|
95
|
+
this.dispatchEvent(event)
|
|
96
|
+
}, LONG_PRESS_ANIMATION_DURATION_IN_MS)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
private handleMouseUp() {
|
|
100
|
+
if (!this.isLongPress) {
|
|
101
|
+
return
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
this.isPressed = false
|
|
105
|
+
this.noTransition = true
|
|
106
|
+
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
this.noTransition = false
|
|
109
|
+
}, 100)
|
|
110
|
+
this.timer && clearTimeout(this.timer)
|
|
111
|
+
}
|
|
112
|
+
|
|
52
113
|
render() {
|
|
53
114
|
return html`
|
|
54
115
|
<button
|
|
@@ -63,7 +124,13 @@ export class LuksoButton extends TailwindElement {
|
|
|
63
124
|
[this.landingStyles]: this.variant === 'landing',
|
|
64
125
|
[this.linkStyles]: this.variant === 'link',
|
|
65
126
|
['w-full']: this.isFullWidth,
|
|
127
|
+
[this.longPressStyles]: this.isLongPress,
|
|
128
|
+
[this.pressedStyles]: this.isPressed,
|
|
129
|
+
[this.noTransitionStyles]: this.noTransition,
|
|
66
130
|
})}
|
|
131
|
+
@mousedown=${this.handleMouseDown}
|
|
132
|
+
@mouseup=${this.handleMouseUp}
|
|
133
|
+
@mouseleave=${this.handleMouseUp}
|
|
67
134
|
>
|
|
68
135
|
<slot></slot>
|
|
69
136
|
</button>
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { html } from 'lit-html'
|
|
2
2
|
import { within } from '@storybook/testing-library'
|
|
3
3
|
import { expect } from '@storybook/jest'
|
|
4
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js'
|
|
4
5
|
|
|
5
|
-
import '
|
|
6
|
+
import './index'
|
|
7
|
+
import '../lukso-icon'
|
|
6
8
|
|
|
9
|
+
/** Documentation and examples of `lukso-button` component. */
|
|
7
10
|
export default {
|
|
8
|
-
title: 'Design System/Components/
|
|
11
|
+
title: 'Design System/Components/lukso-button',
|
|
9
12
|
component: 'lukso-button',
|
|
10
13
|
argTypes: {
|
|
11
14
|
variant: {
|
|
@@ -25,6 +28,15 @@ export default {
|
|
|
25
28
|
isFullWidth: {
|
|
26
29
|
control: { type: 'boolean' },
|
|
27
30
|
},
|
|
31
|
+
isLongPress: {
|
|
32
|
+
control: { type: 'boolean' },
|
|
33
|
+
},
|
|
34
|
+
onLongPressComplete: {
|
|
35
|
+
description: 'Emitted when long press is completed',
|
|
36
|
+
table: {
|
|
37
|
+
category: 'Events',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
28
40
|
},
|
|
29
41
|
args: {
|
|
30
42
|
text: 'Hello World',
|
|
@@ -32,6 +44,7 @@ export default {
|
|
|
32
44
|
size: 'medium',
|
|
33
45
|
variant: 'primary',
|
|
34
46
|
isFullWidth: false,
|
|
47
|
+
isLongPress: false,
|
|
35
48
|
},
|
|
36
49
|
parameters: {
|
|
37
50
|
controls: {
|
|
@@ -44,20 +57,56 @@ export default {
|
|
|
44
57
|
'mediumSize',
|
|
45
58
|
'smallSize',
|
|
46
59
|
'is-full-width',
|
|
60
|
+
'is-long-press',
|
|
61
|
+
'longPressStyles',
|
|
62
|
+
'noTransition',
|
|
63
|
+
'isPressed',
|
|
64
|
+
'timer',
|
|
65
|
+
'pressedStyles',
|
|
66
|
+
'noTransitionStyles',
|
|
67
|
+
'handleMouseDown',
|
|
68
|
+
'handleMouseUp',
|
|
47
69
|
],
|
|
48
70
|
},
|
|
49
71
|
},
|
|
50
72
|
}
|
|
51
73
|
|
|
52
|
-
const Template = ({
|
|
74
|
+
const Template = ({
|
|
75
|
+
variant,
|
|
76
|
+
disabled,
|
|
77
|
+
text,
|
|
78
|
+
size,
|
|
79
|
+
isFullWidth,
|
|
80
|
+
isLongPress,
|
|
81
|
+
}) =>
|
|
53
82
|
html`<lukso-button
|
|
54
83
|
variant=${variant}
|
|
55
84
|
?disabled=${disabled}
|
|
56
85
|
size=${size}
|
|
57
86
|
?is-full-width=${isFullWidth}
|
|
87
|
+
?is-long-press=${isLongPress}
|
|
58
88
|
>${text}</lukso-button
|
|
59
89
|
>`
|
|
60
90
|
|
|
91
|
+
const LongPressTemplate = ({
|
|
92
|
+
variant,
|
|
93
|
+
disabled,
|
|
94
|
+
text,
|
|
95
|
+
size,
|
|
96
|
+
isFullWidth,
|
|
97
|
+
isLongPress,
|
|
98
|
+
}) =>
|
|
99
|
+
html`<lukso-button
|
|
100
|
+
variant=${variant}
|
|
101
|
+
?disabled=${disabled}
|
|
102
|
+
size=${size}
|
|
103
|
+
?is-full-width=${isFullWidth}
|
|
104
|
+
?is-long-press=${isLongPress}
|
|
105
|
+
@on-long-press-complete="handleLongPressComplete"
|
|
106
|
+
>${text}</lukso-button
|
|
107
|
+
>`
|
|
108
|
+
|
|
109
|
+
/** By default button is using `primary` variant. */
|
|
61
110
|
export const Primary = Template.bind({})
|
|
62
111
|
Primary.parameters = {
|
|
63
112
|
design: {
|
|
@@ -73,6 +122,7 @@ Primary.play = async ({ canvasElement }) => {
|
|
|
73
122
|
expect(canvas.getByText('Hello World')).toBeInTheDocument()
|
|
74
123
|
}
|
|
75
124
|
|
|
125
|
+
/** Example of `secondary` variant. */
|
|
76
126
|
export const Secondary = Template.bind({})
|
|
77
127
|
Secondary.args = {
|
|
78
128
|
variant: 'secondary',
|
|
@@ -84,6 +134,7 @@ Secondary.parameters = {
|
|
|
84
134
|
},
|
|
85
135
|
}
|
|
86
136
|
|
|
137
|
+
/** Example of `landing` variant. */
|
|
87
138
|
export const Landing = Template.bind({})
|
|
88
139
|
Landing.args = {
|
|
89
140
|
variant: 'landing',
|
|
@@ -95,6 +146,7 @@ Landing.parameters = {
|
|
|
95
146
|
},
|
|
96
147
|
}
|
|
97
148
|
|
|
149
|
+
/** Example of `link` variant. */
|
|
98
150
|
export const Link = Template.bind({})
|
|
99
151
|
Link.args = {
|
|
100
152
|
variant: 'link',
|
|
@@ -106,6 +158,7 @@ Link.parameters = {
|
|
|
106
158
|
},
|
|
107
159
|
}
|
|
108
160
|
|
|
161
|
+
/** If you need button to take full width of the parent element add `is-full-width` property. */
|
|
109
162
|
export const FullWidth = Template.bind({})
|
|
110
163
|
FullWidth.args = {
|
|
111
164
|
isFullWidth: true,
|
|
@@ -116,3 +169,48 @@ FullWidth.parameters = {
|
|
|
116
169
|
url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=743%3A9778&t=AGmdbG8fXRENuU3o-4',
|
|
117
170
|
},
|
|
118
171
|
}
|
|
172
|
+
|
|
173
|
+
/** In order to have disabled button add `disabled` property. */
|
|
174
|
+
export const DisabledButton = Template.bind({})
|
|
175
|
+
DisabledButton.args = {
|
|
176
|
+
variant: 'primary',
|
|
177
|
+
text: 'Disabled Button',
|
|
178
|
+
disabled: true,
|
|
179
|
+
}
|
|
180
|
+
DisabledButton.parameters = {
|
|
181
|
+
design: {
|
|
182
|
+
type: 'figma',
|
|
183
|
+
url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=6%3A1324&t=mppskGJvpl3LbsWL-4',
|
|
184
|
+
},
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** Buttons can have icons inside. Please check `lukso-icon` component for more details about using icons. */
|
|
188
|
+
export const IconButton = Template.bind({})
|
|
189
|
+
IconButton.args = {
|
|
190
|
+
variant: 'primary',
|
|
191
|
+
text: unsafeHTML(
|
|
192
|
+
`<lukso-icon name="add-photo" size="medium" color="neutral-100" class="mr-2"></lukso-icon>Icon Button`
|
|
193
|
+
),
|
|
194
|
+
}
|
|
195
|
+
IconButton.parameters = {
|
|
196
|
+
design: {
|
|
197
|
+
type: 'figma',
|
|
198
|
+
url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=6%3A1324&t=mppskGJvpl3LbsWL-4',
|
|
199
|
+
},
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/** Long press button require to hold press state till animation fully completes. To turn on this effect add `is-long-press` property.
|
|
203
|
+
* In order to handle long press complete add `@on-long-press-complete` event handler.
|
|
204
|
+
*/
|
|
205
|
+
export const LongPressButton = LongPressTemplate.bind({})
|
|
206
|
+
LongPressButton.args = {
|
|
207
|
+
variant: 'primary',
|
|
208
|
+
text: 'Hold to submit',
|
|
209
|
+
isLongPress: true,
|
|
210
|
+
}
|
|
211
|
+
IconButton.parameters = {
|
|
212
|
+
design: {
|
|
213
|
+
type: 'figma',
|
|
214
|
+
url: 'https://www.figma.com/file/NFCh20xAq3Jg2g8A0DNC9I/UI-Library?node-id=743%3A9905&t=JAexoWba0Re3ntDk-4',
|
|
215
|
+
},
|
|
216
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { html } from 'lit-html'
|
|
2
2
|
import './index'
|
|
3
3
|
|
|
4
|
+
/** Documentation and examples of `lukso-card` component. Cards are using `slots` to put content in different places like `header` or `content`. */
|
|
4
5
|
export default {
|
|
5
|
-
title: 'Design System/Components/
|
|
6
|
+
title: 'Design System/Components/lukso-card',
|
|
6
7
|
component: 'lukso-card',
|
|
7
8
|
argTypes: {
|
|
8
9
|
variant: {
|
|
@@ -86,6 +87,7 @@ const ProfileTemplate = ({
|
|
|
86
87
|
</lukso-card>
|
|
87
88
|
`
|
|
88
89
|
|
|
90
|
+
/** By default card is using `basic` variant. */
|
|
89
91
|
export const DefaultCard = DefaultTemplate.bind({})
|
|
90
92
|
DefaultCard.parameters = {
|
|
91
93
|
design: {
|
|
@@ -94,6 +96,7 @@ DefaultCard.parameters = {
|
|
|
94
96
|
},
|
|
95
97
|
}
|
|
96
98
|
|
|
99
|
+
/** Example of `with-header` variant. */
|
|
97
100
|
export const CardWithHeader = DefaultTemplate.bind({})
|
|
98
101
|
CardWithHeader.args = {
|
|
99
102
|
variant: 'with-header',
|
|
@@ -105,6 +108,7 @@ CardWithHeader.parameters = {
|
|
|
105
108
|
},
|
|
106
109
|
}
|
|
107
110
|
|
|
111
|
+
/** Example of `with-header` variant that has additional background element. */
|
|
108
112
|
export const CardWithCustomHeader = CustomHeaderTemplate.bind({})
|
|
109
113
|
CardWithCustomHeader.args = {
|
|
110
114
|
variant: 'with-header',
|
|
@@ -116,6 +120,7 @@ CardWithCustomHeader.parameters = {
|
|
|
116
120
|
},
|
|
117
121
|
}
|
|
118
122
|
|
|
123
|
+
/** Example of `profile` variant. This variant additionally uses `background-url`, `profile-url` and `profile-address` properties. */
|
|
119
124
|
export const ProfileCard = ProfileTemplate.bind({})
|
|
120
125
|
ProfileCard.args = {
|
|
121
126
|
variant: 'profile',
|
|
@@ -126,7 +131,6 @@ ProfileCard.args = {
|
|
|
126
131
|
},
|
|
127
132
|
},
|
|
128
133
|
}
|
|
129
|
-
|
|
130
134
|
ProfileCard.parameters = {
|
|
131
135
|
design: {
|
|
132
136
|
type: 'figma',
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const addPhoto = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M14 3H6C4.34315 3 3 4.34315 3 6V18C3 19.6569 4.34315 21 6 21H18C19.6569 21 21 19.6569 21 18V10"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
d="M18 3V9"
|
|
26
|
+
stroke="var(--${options.color})"
|
|
27
|
+
stroke-width="${options.strokeWidth}"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
/>
|
|
31
|
+
<path
|
|
32
|
+
d="M21 6L15 6"
|
|
33
|
+
stroke="var(--${options.color})"
|
|
34
|
+
stroke-width="${options.strokeWidth}"
|
|
35
|
+
stroke-linecap="round"
|
|
36
|
+
stroke-linejoin="round"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
fill-rule="evenodd"
|
|
40
|
+
clip-rule="evenodd"
|
|
41
|
+
d="M14.1214 9.87858C15.2929 11.05 15.2929 12.95 14.1214 14.1214C12.95 15.2929 11.05 15.2929 9.87858 14.1214C8.70714 12.95 8.70714 11.05 9.87858 9.87858C11.05 8.70714 12.95 8.70714 14.1214 9.87858Z"
|
|
42
|
+
stroke="var(--${options.color})"
|
|
43
|
+
stroke-width="${options.strokeWidth}"
|
|
44
|
+
/>
|
|
45
|
+
</svg> `
|
|
46
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowDownLg = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M5.25 9.25L12 16L18.75 9.25"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowDownSm = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M8 10.25L11.75 14L15.5 10.25"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowLeftLg = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M15 5L8.25 11.75L15 18.5"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowLeftSm = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M13.625 8.375L9.875 12.125L13.625 15.875"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowRightLg = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M8.25 18.5L15 11.75L8.25 5"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowRightSm = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M9.875 15.875L13.625 12.125L9.875 8.375"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowUpLg = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M18.75 15L12 8.25L5.25 15"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const arrowUpSm = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M15.5 14L11.75 10.25L8 14"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
</svg> `
|
|
26
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { html } from 'lit'
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js'
|
|
3
|
+
|
|
4
|
+
import { IconOptions } from '@/components/lukso-icon/index.js'
|
|
5
|
+
|
|
6
|
+
export const barbellOutline = (options: IconOptions) => {
|
|
7
|
+
return html`<svg
|
|
8
|
+
width="24"
|
|
9
|
+
height="24"
|
|
10
|
+
viewBox="0 0 24 24"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
style=${styleMap({
|
|
14
|
+
width: `${options.width}px`,
|
|
15
|
+
height: `${options.height}px`,
|
|
16
|
+
})}
|
|
17
|
+
>
|
|
18
|
+
<path
|
|
19
|
+
d="M2.25 12H21.75"
|
|
20
|
+
stroke="var(--${options.color})"
|
|
21
|
+
stroke-width="${options.strokeWidth}"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round"
|
|
24
|
+
/>
|
|
25
|
+
<path
|
|
26
|
+
d="M19.5 6.75C19.5 6.33579 19.1642 6 18.75 6C18.3358 6 18 6.33579 18 6.75V17.25C18 17.6642 18.3358 18 18.75 18C19.1642 18 19.5 17.6642 19.5 17.25V6.75Z"
|
|
27
|
+
stroke="var(--${options.color})"
|
|
28
|
+
stroke-width="${options.strokeWidth}"
|
|
29
|
+
stroke-linecap="round"
|
|
30
|
+
stroke-linejoin="round"
|
|
31
|
+
/>
|
|
32
|
+
<path
|
|
33
|
+
d="M6 6.75C6 6.33579 5.66421 6 5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18C5.66421 18 6 17.6642 6 17.25V6.75Z"
|
|
34
|
+
stroke="var(--${options.color})"
|
|
35
|
+
stroke-width="${options.strokeWidth}"
|
|
36
|
+
stroke-linecap="round"
|
|
37
|
+
stroke-linejoin="round"
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
d="M2.25 9.375C2.25 9.16789 2.08211 9 1.875 9C1.66789 9 1.5 9.16789 1.5 9.375V14.625C1.5 14.8321 1.66789 15 1.875 15C2.08211 15 2.25 14.8321 2.25 14.625V9.375Z"
|
|
41
|
+
stroke="var(--${options.color})"
|
|
42
|
+
stroke-width="${options.strokeWidth}"
|
|
43
|
+
stroke-linecap="round"
|
|
44
|
+
stroke-linejoin="round"
|
|
45
|
+
/>
|
|
46
|
+
<path
|
|
47
|
+
d="M22.5 9.375C22.5 9.16789 22.3321 9 22.125 9C21.9179 9 21.75 9.16789 21.75 9.375V14.625C21.75 14.8321 21.9179 15 22.125 15C22.3321 15 22.5 14.8321 22.5 14.625V9.375Z"
|
|
48
|
+
stroke="var(--${options.color})"
|
|
49
|
+
stroke-width="${options.strokeWidth}"
|
|
50
|
+
stroke-linecap="round"
|
|
51
|
+
stroke-linejoin="round"
|
|
52
|
+
/>
|
|
53
|
+
</svg> `
|
|
54
|
+
}
|