@esportsplus/ui 0.6.1 → 0.7.1

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.
@@ -0,0 +1,10 @@
1
+ declare const _default: ({ attributes, content }: {
2
+ attributes?: Record<string, any>;
3
+ content: any;
4
+ }) => {
5
+ attributes: {
6
+ class: string;
7
+ };
8
+ content: import("@esportsplus/template/build/types").RenderableTemplate;
9
+ };
10
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { html } from '@esportsplus/template';
2
+ export default ({ attributes, content }) => {
3
+ return {
4
+ attributes: {
5
+ class: 'link--hover'
6
+ },
7
+ content: html `
8
+ <span class='link-hover link-hover--one' ${attributes}>
9
+ ${content}
10
+ </span>
11
+
12
+ <span class='link-hover link-hover--two' ${attributes}>
13
+ ${content}
14
+ </span>
15
+ `
16
+ };
17
+ };
@@ -0,0 +1,12 @@
1
+ declare const _default: {
2
+ hover: ({ attributes, content }: {
3
+ attributes?: Record<string, any>;
4
+ content: any;
5
+ }) => {
6
+ attributes: {
7
+ class: string;
8
+ };
9
+ content: import("@esportsplus/template/build/types").RenderableTemplate;
10
+ };
11
+ };
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import hover from './hover';
2
+ export default { hover };
package/build/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { default as counter } from './components/counter';
5
5
  export { default as ellipsis } from './components/ellipsis';
6
6
  export { default as form } from './components/form';
7
7
  export { default as json } from './components/json';
8
+ export { default as link } from './components/link';
8
9
  export { default as loader } from './components/loader';
9
10
  export { default as loading } from './components/loading';
10
11
  export { default as magnet } from './components/magnet';
package/build/index.js CHANGED
@@ -5,6 +5,7 @@ export { default as counter } from './components/counter';
5
5
  export { default as ellipsis } from './components/ellipsis';
6
6
  export { default as form } from './components/form';
7
7
  export { default as json } from './components/json';
8
+ export { default as link } from './components/link';
8
9
  export { default as loader } from './components/loader';
9
10
  export { default as loading } from './components/loading';
10
11
  export { default as magnet } from './components/magnet';
@@ -14,7 +14,7 @@
14
14
  .group{display:flex;flex-wrap:wrap;justify-content:flex-start;margin:0 calc(var(--margin-horizontal)/-2);position:relative;width:calc(100% + var(--margin-horizontal))}.group--offset-bottom{margin-bottom:calc(var(--margin-vertical)*-1)}.group--offset-top{margin-top:calc(var(--margin-vertical)*-1)}.group--scroller{flex-flow:row;margin-bottom:calc(var(--scrollbar-width)*-1);overflow-y:hidden;padding-bottom:var(--scrollbar-width)}.group-item{display:flex;margin:var(--margin-vertical) calc(var(--margin-horizontal)/2) 0;position:relative;width:var(--width)}.group-item[class*="--width"]{width:calc(var(--width) - var(--margin-horizontal))}
15
15
  .highlight{background:linear-gradient(90deg, var(--background) 50%, transparent 50%) 110% 0/200% 100% no-repeat;background-position:calc((1 - var(--highlight))*110%) 0;transition:background-position .32s}
16
16
  .icon{color:var(--color);display:flex;flex:0 0 var(--width);height:var(--height);position:relative;width:var(--width)}.icon svg{color:currentColor;fill:currentColor;height:100%;width:100%}
17
- .link{align-content:center;background:var(--background);color:var(--color);cursor:pointer;display:flex;flex-wrap:wrap;font-size:var(--font-size);justify-content:flex-start;line-height:var(--line-height);padding:calc(var(--padding-vertical) - var(--border-width)) calc(var(--padding-horizontal) - var(--border-width));position:relative;transition:background var(--transition-duration) ease-in-out,border-color var(--transition-duration) ease-in-out,color var(--transition-duration) ease-in-out,opacity var(--transition-duration) ease-in-out;width:var(--width)}.link--underline.--active,.link--underline:not(.--active):hover{text-decoration:underline}
17
+ .link{align-content:center;background:var(--background);color:var(--color);cursor:pointer;display:flex;flex-wrap:wrap;font-size:var(--font-size);justify-content:flex-start;line-height:var(--line-height);padding:calc(var(--padding-vertical) - var(--border-width)) calc(var(--padding-horizontal) - var(--border-width));position:relative;transition:background var(--transition-duration) ease-in-out,border-color var(--transition-duration) ease-in-out,color var(--transition-duration) ease-in-out,opacity var(--transition-duration) ease-in-out;width:var(--width)}.link--hover.tooltip:hover .link-hover--one,.link--hover:not(.--active):hover .link-hover--one{opacity:0;transform:translateY(-75%)}.link--hover.tooltip:hover .link-hover--two,.link--hover:not(.--active):hover .link-hover--two{opacity:1;transform:translate(50%, 50%)}.link--underline.--active,.link--underline:not(.--active):hover{text-decoration:underline}.link-hover{transition:opacity .3s ease-in-out,.3s cubic-bezier(0.23, 0.65, 0.74, 1.09)}.link-hover--one{transform:translateY(0)}.link-hover--two{position:absolute;bottom:50%;right:50%;transform:translate(50%, 50%);opacity:0;padding:0 var(--padding-horizontal);transform:translate(50%, 125%);white-space:nowrap}
18
18
  .loader{background-color:var(--color-black-500);bottom:0;left:0;position:fixed;opacity:1;pointer-events:none;right:0;top:0;transition:all .3s ease-in-out;visibility:visible;z-index:9999}.loader--load{animation:.6s .2s ease-in-out 1 both move}.loader--load .loader--load{animation:.6s ease-in-out 1 both move}@keyframes move{0%{transform:translateY(0)}80%{transform:translateY(-102%)}100%{transform:translateY(-102%)}}.loader .loader{background-color:var(--color-black-400)}.loader-content{bottom:auto;left:50%;position:absolute;right:auto;top:50%;transform:translateX(-50%) translateY(-50%)}.loader-logo{color:#fff}.loader-logo--scale{animation:scale .32s 1;animation-fill-mode:both}@keyframes scale{from{opacity:1;transform:scale3d(1, 1, 1)}to{opacity:0;transform:scale3d(1.8, 1.8, 1.8)}}
19
19
  .loading{animation:Loading var(--animation-duration) linear infinite;border:var(--border-width) solid color-mix(in srgb, var(--border-color), transparent 90%);border-left-color:var(--border-color);border-radius:100%;height:var(--size);width:var(--size)}@keyframes Loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
20
20
  .magnet{position:absolute;top:0;left:0;background:var(--background);border-radius:var(--border-radius);height:0;opacity:0;transition:height var(--transition-duration) var(--timing-function),opacity var(--transition-duration) var(--timing-function),transform var(--transition-duration) var(--timing-function),width var(--transition-duration) var(--timing-function);width:0;z-index:-1}
package/package.json CHANGED
@@ -21,5 +21,5 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "types": "build/index.d.ts",
24
- "version": "0.6.1"
24
+ "version": "0.7.1"
25
25
  }
@@ -0,0 +1,19 @@
1
+ import { html } from '@esportsplus/template';
2
+
3
+
4
+ export default ({ attributes, content }: { attributes?: Record<string, any>, content: any }) => {
5
+ return {
6
+ attributes: {
7
+ class: 'link--hover'
8
+ },
9
+ content: html`
10
+ <span class='link-hover link-hover--one' ${attributes}>
11
+ ${content}
12
+ </span>
13
+
14
+ <span class='link-hover link-hover--two' ${attributes}>
15
+ ${content}
16
+ </span>
17
+ `
18
+ };
19
+ };
@@ -0,0 +1,4 @@
1
+ import hover from './hover';
2
+
3
+
4
+ export default { hover };
@@ -1,3 +1,4 @@
1
+ @use '/lib';
1
2
  @use '/tokens';
2
3
 
3
4
  .link {
@@ -20,9 +21,45 @@
20
21
  width: var(--width);
21
22
 
22
23
 
24
+ &--hover {
25
+ &.tooltip,
26
+ &:not(.--active) {
27
+ &:hover {
28
+ .link-hover {
29
+ &--one {
30
+ opacity: 0;
31
+ transform: translateY(-75%);
32
+ }
33
+
34
+ &--two {
35
+ opacity: 1;
36
+ transform: translate(50%, 50%);
37
+ }
38
+ }
39
+ }
40
+ }
41
+ }
42
+
23
43
  &--underline {
24
44
  @include tokens.state(active hover) {
25
45
  text-decoration: underline;
26
46
  }
27
47
  }
48
+
49
+
50
+ &-hover {
51
+ transition: opacity 0.3s ease-in-out, 0.3s cubic-bezier(0.23, 0.65, 0.74, 1.09);
52
+
53
+ &--one {
54
+ transform: translateY(0);
55
+ }
56
+
57
+ &--two {
58
+ @include lib.position(absolute, center);
59
+ opacity: 0;
60
+ padding: 0 var(--padding-horizontal);
61
+ transform: translate(50%, 125%);
62
+ white-space: nowrap;
63
+ }
64
+ }
28
65
  }
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export { default as counter }from './components/counter';
6
6
  export { default as ellipsis }from './components/ellipsis';
7
7
  export { default as form }from './components/form';
8
8
  export { default as json }from './components/json';
9
+ export { default as link }from './components/link';
9
10
  export { default as loader }from './components/loader';
10
11
  export { default as loading }from './components/loading';
11
12
  export { default as magnet }from './components/magnet';