@esportsplus/ui 0.2.5 → 0.2.9

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 (108) hide show
  1. package/build/components/accordion/index.d.ts +15 -0
  2. package/build/components/accordion/index.js +27 -0
  3. package/build/components/aurora/index.d.ts +8 -0
  4. package/build/components/aurora/index.js +12 -0
  5. package/build/components/clipboard/index.d.ts +4 -0
  6. package/build/components/clipboard/index.js +2 -0
  7. package/build/components/clipboard/write.d.ts +2 -0
  8. package/build/components/clipboard/write.js +9 -0
  9. package/build/components/ellipsis/index.d.ts +2 -0
  10. package/build/components/ellipsis/index.js +8 -0
  11. package/build/components/field/description.d.ts +1 -1
  12. package/build/components/field/error.d.ts +1 -1
  13. package/build/components/field/select.js +4 -2
  14. package/build/components/field/title.d.ts +1 -1
  15. package/build/components/form/action.js +1 -2
  16. package/build/components/form/types.d.ts +0 -1
  17. package/build/components/json/index.d.ts +4 -0
  18. package/build/components/json/index.js +2 -0
  19. package/build/components/scrollbar/index.d.ts +3 -3
  20. package/build/components/scrollbar/index.js +3 -5
  21. package/build/components/site/index.d.ts +2 -3
  22. package/build/components/site/index.js +6 -5
  23. package/build/components/tooltip/index.d.ts +0 -7
  24. package/build/components/tooltip/index.js +2 -13
  25. package/build/index.d.ts +5 -2
  26. package/build/index.js +5 -2
  27. package/components/styles.css +14 -14
  28. package/components/variables.css +18 -19
  29. package/package.json +4 -4
  30. package/src/components/accordion/index.ts +34 -0
  31. package/src/components/accordion/scss/variables.scss +6 -1
  32. package/src/components/anchor/scss/variables.scss +0 -1
  33. package/src/components/aurora/index.ts +22 -0
  34. package/src/components/aurora/scss/index.scss +60 -0
  35. package/src/components/banner/scss/index.scss +1 -1
  36. package/src/components/banner/scss/variables.scss +4 -0
  37. package/src/components/button/scss/index.scss +25 -3
  38. package/src/components/button/scss/variables.scss +3 -6
  39. package/src/components/card/scss/variables.scss +0 -1
  40. package/src/components/clipboard/index.ts +4 -0
  41. package/src/components/clipboard/write.ts +9 -0
  42. package/src/components/container/scss/index.scss +2 -4
  43. package/src/components/container/scss/variables.scss +2 -2
  44. package/src/components/ellipsis/index.ts +10 -0
  45. package/src/components/ellipsis/scss/index.scss +19 -63
  46. package/src/components/ellipsis/scss/variables.scss +3 -1
  47. package/src/components/field/scss/index.scss +2 -2
  48. package/src/components/field/scss/variables.scss +0 -1
  49. package/src/components/field/select.ts +4 -2
  50. package/src/components/form/action.ts +3 -2
  51. package/src/components/form/types.ts +1 -1
  52. package/src/components/grid/scss/index.scss +6 -0
  53. package/src/components/grid/scss/variables.scss +6 -0
  54. package/src/components/group/scss/index.scss +4 -4
  55. package/src/components/icon/scss/index.scss +0 -1
  56. package/src/components/json/index.ts +4 -0
  57. package/src/components/link/scss/variables.scss +0 -1
  58. package/src/components/loading/scss/index.scss +9 -16
  59. package/src/components/loading/scss/variables.scss +3 -28
  60. package/src/components/modal/scss/index.scss +7 -4
  61. package/src/components/modal/scss/variables.scss +3 -7
  62. package/src/components/page/scss/variables.scss +0 -12
  63. package/src/components/root/onclick.ts +1 -1
  64. package/src/components/root/scss/variables.scss +2 -5
  65. package/src/components/scrollbar/index.ts +3 -5
  66. package/src/components/scrollbar/scss/index.scss +2 -1
  67. package/src/components/scrollbar/scss/variables.scss +1 -1
  68. package/src/components/sidebar/scss/index.scss +5 -6
  69. package/src/components/sidebar/scss/variables.scss +4 -5
  70. package/src/components/site/index.ts +9 -8
  71. package/src/components/text/scss/variables.scss +0 -1
  72. package/src/components/tooltip/index.ts +4 -17
  73. package/src/components/tooltip/scss/variables.scss +0 -1
  74. package/src/css-utilities/absolute/scss/index.scss +11 -34
  75. package/src/css-utilities/hidden/scss/index.scss +1 -1
  76. package/src/css-utilities/squircle/scss/index.scss +5 -0
  77. package/src/css-utilities/text/scss/index.scss +2 -6
  78. package/src/css-utilities/text/scss/variables.scss +7 -7
  79. package/src/index.ts +5 -2
  80. package/src/lib/scss/breakpoint.scss +3 -3
  81. package/src/lib/scss/position.scss +25 -49
  82. package/src/tokens/scss/box-shadow.scss +17 -12
  83. package/src/tokens/scss/transition-duration.scss +1 -5
  84. package/tsconfig.json +1 -9
  85. package/utilities/styles.css +4 -4
  86. package/utilities/variables.css +1 -3
  87. package/build/components/alert/index.d.ts +0 -10
  88. package/build/components/alert/index.js +0 -122
  89. package/build/components/export/clipboard.d.ts +0 -2
  90. package/build/components/export/clipboard.js +0 -8
  91. package/build/components/export/index.d.ts +0 -5
  92. package/build/components/export/index.js +0 -3
  93. package/build/components/tooltip/menu.d.ts +0 -25
  94. package/build/components/tooltip/menu.js +0 -44
  95. package/src/components/alert/index.ts +0 -157
  96. package/src/components/alert/scss/index.scss +0 -55
  97. package/src/components/alert/scss/variables.scss +0 -8
  98. package/src/components/export/clipboard.ts +0 -12
  99. package/src/components/export/index.ts +0 -5
  100. package/src/components/processing/scss/index.scss +0 -47
  101. package/src/components/processing/scss/variables.scss +0 -11
  102. package/src/components/tooltip/menu.ts +0 -71
  103. package/src/css-utilities/slide/scss/index.scss +0 -21
  104. package/src/css-utilities/slide/scss/variables.scss +0 -10
  105. package/src/css-utilities/transition/scss/variables.scss +0 -14
  106. /package/build/components/{export/json.d.ts → json/download.d.ts} +0 -0
  107. /package/build/components/{export/json.js → json/download.js} +0 -0
  108. /package/src/components/{export/json.ts → json/download.ts} +0 -0
@@ -7,21 +7,9 @@
7
7
  --line-height: var(--line-height-400);
8
8
  }
9
9
 
10
- &-suptitle + &-title {
11
- &::before {
12
- --line-height: 1;
13
- }
14
- }
15
-
16
10
  &-title {
17
11
  --color: var(--color-default);
18
12
  --color-default: var(--color-text-500);
19
13
  --line-height: var(--line-height-400);
20
14
  }
21
-
22
- &-title:has(+ .page-subtitle) {
23
- &::after {
24
- --line-height: 1;
25
- }
26
- }
27
15
  }
@@ -1,4 +1,4 @@
1
- let queue: VoidFunction[] = [];
1
+ let queue: (VoidFunction | (() => Promise<void>))[] = [];
2
2
 
3
3
 
4
4
  const onclick = async () => {
@@ -3,15 +3,14 @@
3
3
 
4
4
  body {
5
5
  @include lib.css-variables(border-radius, tokens.$border-radius);
6
- @include lib.css-variables(box-shadow, tokens.$box-shadow);
7
6
  @include lib.css-variables(border-width, tokens.$border-width);
7
+ @include lib.css-variables(box-shadow, tokens.$box-shadow);
8
8
  @include lib.css-variables(color, tokens.$color);
9
9
  @include lib.css-variables(font-size, tokens.$font-size);
10
10
  @include lib.css-variables(font-weight, tokens.$font-weight);
11
11
  @include lib.css-variables(line-height, tokens.$line-height);
12
12
  @include lib.css-variables(size, tokens.$size);
13
13
  @include lib.css-variables(spacer, tokens.$spacer);
14
- @include lib.css-variables(transition-duration, tokens.$transition-duration);
15
14
 
16
15
  --background: var(--color-grey-400);
17
16
  --color: var(--color-text-400);
@@ -20,10 +19,8 @@ body {
20
19
  --font-weight: var(--font-weight-400);
21
20
  --line-height: var(--line-height-400);
22
21
  --min-width: 320px;
23
-
24
- // Used by components requiring scrollbar width
25
- // - Should be updated using JS on load
26
22
  --scrollbar-width: 17px;
23
+ --transition-duration: tokens.$transition-duration;
27
24
  }
28
25
 
29
26
  section {
@@ -6,7 +6,7 @@ let root = document.body,
6
6
  width: number | undefined;
7
7
 
8
8
 
9
- export default ({ fixed, style }: { fixed?: boolean, style?: string } = {}) => {
9
+ export default ({ attributes, fixed }: { attributes?: Record<string, unknown>, fixed?: boolean } = {}) => {
10
10
  let state = reactive({
11
11
  height: 100,
12
12
  translate: 0
@@ -14,9 +14,7 @@ export default ({ fixed, style }: { fixed?: boolean, style?: string } = {}) => {
14
14
 
15
15
  return {
16
16
  attributes: {
17
- class: () => {
18
- return '--scrollbar-content';
19
- },
17
+ class: '--scrollbar-content',
20
18
  onscroll: function(this: HTMLElement) {
21
19
  if (width === undefined) {
22
20
  width = this.offsetWidth - this.clientWidth;
@@ -34,10 +32,10 @@ export default ({ fixed, style }: { fixed?: boolean, style?: string } = {}) => {
34
32
  <div
35
33
  class='scrollbar ${fixed ? 'scrollbar--fixed' : ''} ${() => state.height >= 100 ? 'scrollbar--hidden' : ''}'
36
34
  style='${() => `
37
- ${style || ''}
38
35
  --translate: translate3d(0, ${state.translate}%, 0);
39
36
  --height: ${state.height}%;
40
37
  `}'
38
+ ${attributes}
41
39
  ></div>
42
40
  `
43
41
  };
@@ -20,6 +20,7 @@
20
20
  margin-right: calc(var(--scrollbar-width) * -1);
21
21
  overflow-x: hidden;
22
22
  overflow-y: scroll;
23
+ scrollbar-gutter: stable;
23
24
  scroll-behavior: smooth;
24
25
  width: calc(100% + var(--scrollbar-width));
25
26
  }
@@ -36,7 +37,7 @@
36
37
  right: 0;
37
38
  top: 0;
38
39
  transition: opacity var(--transition-duration) ease-in-out;
39
- width: 4px;
40
+ width: var(--width);
40
41
  }
41
42
 
42
43
  &::before {
@@ -1,6 +1,6 @@
1
1
  .scrollbar {
2
2
  --background-default: transparent;
3
3
  --height: 0;
4
- --transition-duration: var(--transition-duration-400);
5
4
  --translate: translate3d(0, 0, 0);
5
+ --width: 4px;
6
6
  }
@@ -2,16 +2,15 @@
2
2
  @use '/tokens';
3
3
 
4
4
  .sidebar {
5
- @include lib.position(absolute, var(--position-vertical) null var(--position-vertical) null);
5
+ @include lib.position(absolute, var(--margin-vertical) null var(--margin-vertical) null);
6
6
  cursor: default;
7
- height: calc(100% - (var(--position-vertical) * 2));
8
- max-width: var(--width);
7
+ height: calc(100% - (var(--margin-vertical) * 2));
9
8
  overflow: hidden;
10
9
  transition:
11
10
  max-width var(--transition-duration) ease-in-out,
12
11
  opacity var(--transition-duration) ease-in-out,
13
12
  transform var(--transition-duration) ease-in-out;
14
- width: calc(100% - (var(--position-horizontal) * 2));
13
+ width: min(var(--width), calc(100% - (var(--margin-horizontal) * 2)));
15
14
  z-index: 1;
16
15
 
17
16
 
@@ -23,7 +22,7 @@
23
22
 
24
23
 
25
24
  &--e {
26
- right: var(--position-horizontal);
25
+ right: var(--margin-horizontal);
27
26
 
28
27
  &.sidebar--offscreen {
29
28
  @include tokens.state(inactive) {
@@ -33,7 +32,7 @@
33
32
  }
34
33
 
35
34
  &--w {
36
- left: var(--position-horizontal);
35
+ left: var(--margin-horizontal);
37
36
 
38
37
  &.sidebar--offscreen {
39
38
  @include tokens.state(inactive) {
@@ -1,9 +1,8 @@
1
1
  @use '/tokens';
2
2
 
3
3
  .sidebar {
4
- --position-horizontal: 0px;
5
- --position-vertical: 0px;
6
- --transition-duration: var(--transition-duration-400);
4
+ --margin-horizontal: 0px;
5
+ --margin-vertical: 0px;
7
6
  --width: var(--width-default);
8
7
  --width-closed: var(--width-default);
9
8
  --width-default: 320px;
@@ -15,7 +14,7 @@
15
14
 
16
15
 
17
16
  &--floating {
18
- --position-horizontal: var(--size-100);
19
- --position-vertical: var(--size-100);
17
+ --margin-horizontal: var(--size-100);
18
+ --margin-vertical: var(--size-100);
20
19
  }
21
20
  }
@@ -6,20 +6,21 @@ import scrollbar from '~/components/scrollbar';
6
6
  type Data = {
7
7
  class?: string;
8
8
  content?: any;
9
- scrollbar?: {
10
- style?: string;
11
- };
9
+ scrollbar?: Parameters<typeof scrollbar>[0];
12
10
  };
13
11
 
14
12
 
15
13
  export default (data: Data) => {
16
- let { attributes: a, html: h } = scrollbar({
17
- fixed: true,
18
- style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
19
- });
14
+ let sb = data.scrollbar ??= {};
15
+
16
+ sb.attributes ??= {};
17
+ sb.attributes.style ??= '--background-default: var(--color-black-400);';
18
+ sb.fixed ??= true;
19
+
20
+ let { attributes: a, html: h } = scrollbar(sb);
20
21
 
21
22
  return html`
22
- <section class='site ${data?.class || ''}' onclick='${onclick}' ${a}>
23
+ <section class='site ${data?.class || ''}' ${{ onclick }} ${a}>
23
24
  ${data?.content || ''}
24
25
  ${h}
25
26
  </section>
@@ -4,6 +4,5 @@
4
4
  --font-size: var(--font-size-400);
5
5
  --font-weight: var(--font-weight-400);
6
6
  --line-height: var(--line-height-400);
7
- --transition-duration: var(--transition-duration-400);
8
7
  --width: auto;
9
8
  }
@@ -1,9 +1,8 @@
1
1
  import { reactive } from '@esportsplus/reactivity';
2
- import menu from './menu';
3
2
  import root from '~/components/root';
4
3
 
5
4
 
6
- let queue: VoidFunction[] = [],
5
+ let queue: (VoidFunction | (() => Promise<void>))[] = [],
7
6
  running = false,
8
7
  scheduled = false;
9
8
 
@@ -25,16 +24,8 @@ async function frame() {
25
24
  }
26
25
 
27
26
 
28
- const onclick = (data: { active?: boolean, menu?: Parameters<typeof menu>[0], toggle?: boolean } = {}) => {
29
- let content,
30
- state = reactive({
31
- active: data.active || false,
32
- render: undefined as boolean | undefined
33
- });
34
-
35
- if (data.menu) {
36
- content = menu(data.menu, state);
37
- }
27
+ const onclick = (data: { active?: boolean, toggle?: boolean } = {}) => {
28
+ let state = reactive({ active: data.active || false });
38
29
 
39
30
  return {
40
31
  attributes: {
@@ -65,16 +56,12 @@ const onclick = (data: { active?: boolean, menu?: Parameters<typeof menu>[0], to
65
56
  }
66
57
  }
67
58
  },
68
- content,
69
59
  state
70
60
  };
71
61
  };
72
62
 
73
63
  const onhover = (active: boolean = false) => {
74
- let state = reactive({
75
- active,
76
- render: undefined as boolean | undefined
77
- });
64
+ let state = reactive({ active });
78
65
 
79
66
  return {
80
67
  attributes: {
@@ -10,7 +10,6 @@
10
10
  --scaleX: 0.64;
11
11
  --scaleY: 0.64;
12
12
  --spacer: var(--size-300);
13
- --transition-duration: var(--transition-duration-300);
14
13
  --width: auto;
15
14
  }
16
15
 
@@ -1,26 +1,15 @@
1
1
  @use '/lib';
2
2
 
3
3
  .--absolute {
4
- &-bottom,
5
- &-top {
6
- left: 0;
7
- position: absolute;
8
- right: 0;
9
- }
10
-
11
- &-left,
12
- &-right {
13
- bottom: 0;
14
- position: absolute;
15
- top: 0;
16
- }
17
-
18
- &-center {
19
- @include lib.position(absolute, center);
20
- }
4
+ &-horizontal,
5
+ &-vertical {
6
+ &-bottom {
7
+ bottom: 0;
8
+ }
21
9
 
22
- &-full {
23
- @include lib.position(absolute, full);
10
+ &-top {
11
+ top: 0;
12
+ }
24
13
  }
25
14
 
26
15
  &-horizontal {
@@ -39,21 +28,9 @@
39
28
  }
40
29
  }
41
30
 
42
- @each $direction in 'bottom' 'top' {
43
- &,
44
- &-horizontal {
45
- &-#{$direction} {
46
- #{$direction}: 0;
47
- }
48
- }
49
- }
50
-
51
- @each $direction in 'left' 'right' {
52
- &,
53
- &-vertical {
54
- &-#{$direction} {
55
- #{$direction}: 0;
56
- }
31
+ @each $direction in 'bottom' 'center' 'full' 'left' 'right' 'top' {
32
+ &-#{$direction} {
33
+ @include lib.position(absolute, $direction);
57
34
  }
58
35
  }
59
36
  }
@@ -16,7 +16,7 @@
16
16
  }
17
17
  }
18
18
 
19
- &-visibility {
19
+ &-offcanvas {
20
20
  @include lib.position(absolute, 0 null null 0);
21
21
  appearance: none;
22
22
  height: 0px;
@@ -0,0 +1,5 @@
1
+ .--squircle {
2
+ aspect-ratio: 1; // square
3
+ clip-path: polygon(100.00% 50.00%, 99.95% 62.53%, 99.80% 67.70%, 99.56% 71.64%, 99.21% 74.93%, 98.76% 77.79%, 98.21% 80.34%, 97.56% 82.63%, 96.81% 84.70%, 95.94% 86.60%, 94.97% 88.33%, 93.89% 89.92%, 92.69% 91.37%, 91.37% 92.69%, 89.92% 93.89%, 88.33% 94.97%, 86.60% 95.94%, 84.70% 96.81%, 82.63% 97.56%, 80.34% 98.21%, 77.79% 98.76%, 74.93% 99.21%, 71.64% 99.56%, 67.70% 99.80%, 62.53% 99.95%, 50.00% 100.00%, 37.47% 99.95%, 32.30% 99.80%, 28.36% 99.56%, 25.07% 99.21%, 22.21% 98.76%, 19.66% 98.21%, 17.37% 97.56%, 15.30% 96.81%, 13.40% 95.94%, 11.67% 94.97%, 10.08% 93.89%, 8.63% 92.69%, 7.31% 91.37%, 6.11% 89.92%, 5.03% 88.33%, 4.06% 86.60%, 3.19% 84.70%, 2.44% 82.63%, 1.79% 80.34%, 1.24% 77.79%, 0.79% 74.93%, 0.44% 71.64%, 0.20% 67.70%, 0.05% 62.53%, 0.00% 50.00%, 0.05% 37.47%, 0.20% 32.30%, 0.44% 28.36%, 0.79% 25.07%, 1.24% 22.21%, 1.79% 19.66%, 2.44% 17.37%, 3.19% 15.30%, 4.06% 13.40%, 5.03% 11.67%, 6.11% 10.08%, 7.31% 8.63%, 8.63% 7.31%, 10.08% 6.11%, 11.67% 5.03%, 13.40% 4.06%, 15.30% 3.19%, 17.37% 2.44%, 19.66% 1.79%, 22.21% 1.24%, 25.07% 0.79%, 28.36% 0.44%, 32.30% 0.20%, 37.47% 0.05%, 50.00% 0.00%, 62.53% 0.05%, 67.70% 0.20%, 71.64% 0.44%, 74.93% 0.79%, 77.79% 1.24%, 80.34% 1.79%, 82.63% 2.44%, 84.70% 3.19%, 86.60% 4.06%, 88.33% 5.03%, 89.92% 6.11%, 91.37% 7.31%, 92.69% 8.63%, 93.89% 10.08%, 94.97% 11.67%, 95.94% 13.40%, 96.81% 15.30%, 97.56% 17.37%, 98.21% 19.66%, 98.76% 22.21%, 99.21% 25.07%, 99.56% 28.36%, 99.80% 32.30%, 99.95% 37.47%, 100.00% 50.00%);
4
+ width: var(--width, var(--size-800));
5
+ }
@@ -44,8 +44,9 @@
44
44
  font-style: italic;
45
45
  }
46
46
 
47
- &-linethrough {
47
+ &-line-through {
48
48
  text-decoration: line-through;
49
+ text-decoration-thickness: var(--line-width);
49
50
  }
50
51
 
51
52
  &-multiplier {
@@ -65,11 +66,6 @@
65
66
  }
66
67
  }
67
68
 
68
- &-strike-through {
69
- text-decoration: line-through;
70
- text-decoration-thickness: var(--line-width);
71
- }
72
-
73
69
  &-truncate {
74
70
  line-height: var(--size);
75
71
  max-width: 100%;
@@ -8,23 +8,23 @@
8
8
  }
9
9
  }
10
10
 
11
- &-outline {
12
- --color: inherit;
13
- --stroke-width: var(--border-width-400);
11
+ &-line-through {
12
+ --line-width: var(--border-width-400);
14
13
 
15
14
  @each $key in lib.map-keys(tokens.$border-width) {
16
15
  &-#{$key} {
17
- --stroke-width: var(--border-width-#{$key});
16
+ --line-width: var(--border-width-#{$key});
18
17
  }
19
18
  }
20
19
  }
21
20
 
22
- &-strike-through {
23
- --line-width: var(--border-width-400);
21
+ &-outline {
22
+ --color: inherit;
23
+ --stroke-width: var(--border-width-400);
24
24
 
25
25
  @each $key in lib.map-keys(tokens.$border-width) {
26
26
  &-#{$key} {
27
- --line-width: var(--border-width-#{$key});
27
+ --stroke-width: var(--border-width-#{$key});
28
28
  }
29
29
  }
30
30
  }
package/src/index.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import '@esportsplus/webpack/global.d.ts';
2
2
 
3
- export { default as alert }from './components/alert';
4
- export { default as export }from './components/export';
3
+ export { default as accordion }from './components/accordion';
4
+ export { default as aurora }from './components/aurora';
5
+ export { default as clipboard }from './components/clipboard';
6
+ export { default as ellipsis }from './components/ellipsis';
5
7
  export { default as field }from './components/field';
6
8
  export { default as form }from './components/form';
9
+ export { default as json }from './components/json';
7
10
  export { default as number }from './components/number';
8
11
  export { default as page }from './components/page';
9
12
  export { default as root }from './components/root';
@@ -1,6 +1,6 @@
1
1
  @mixin breakpoint($function, $param: null) {
2
2
  @if $function == min-width or $function == min-height {
3
- @media only screen and ($function: $param + 1px) {
3
+ @media only screen and ($function: #{$param + 1px}) {
4
4
  @content;
5
5
  }
6
6
  }
@@ -10,7 +10,7 @@
10
10
  }
11
11
  }
12
12
  @else if $function == between-width {
13
- @media only screen and (min-width: nth($param, 1) + 1px) and (max-width: nth($param, 2)) {
13
+ @media only screen and (min-width: #{nth($param, 1) + 1px}) and (max-width: nth($param, 2)) {
14
14
  @content;
15
15
  }
16
16
  }
@@ -19,7 +19,7 @@
19
19
  @media only screen and (min-aspect-ratio: 13/9) {
20
20
  @content;
21
21
  }
22
- }
22
+ }
23
23
  @else if $param == portrait {
24
24
  @media only screen and (max-aspect-ratio: 13/9) {
25
25
  @content;
@@ -3,75 +3,51 @@
3
3
  @mixin position($position, $value: null) {
4
4
  position: $position;
5
5
 
6
- @if list.contains($value, center vertical) {
7
- bottom: 50%;
6
+ @if $value == bottom {
7
+ inset: auto 0 0 0;
8
8
  }
9
- @if list.contains($value, center horizontal) {
9
+ @else if $value == center {
10
+ bottom: 50%;
10
11
  right: 50%;
11
- }
12
-
13
-
14
- @if $value == center {
15
12
  transform: translate(50%, 50%);
16
13
  }
14
+ @else if $value == full {
15
+ inset: 0 0 0 0;
16
+ }
17
17
  @else if $value == horizontal {
18
+ right: 50%;
18
19
  transform: translateX(50%);
19
20
  }
20
- @else if $value == vertical {
21
- transform: translateY(50%);
22
- }
23
-
24
-
25
- @if $value == full {
26
- $value: 0 0 0 0;
27
- }
28
- @else if $value == top {
29
- $value: 0 0 null 0;
21
+ @else if $value == left {
22
+ inset: 0 auto 0 0;
30
23
  }
31
24
  @else if $value == right {
32
- $value: 0 0 0 null;
25
+ inset: 0 0 0 auto;
33
26
  }
34
- @else if $value == bottom {
35
- $value: null 0 0 0;
27
+ @else if $value == top {
28
+ inset: 0 0 auto 0;
36
29
  }
37
- @else if $value == left {
38
- $value: 0 null 0 0;
30
+ @else if $value == vertical {
31
+ bottom: 50%;
32
+ transform: translateY(50%);
39
33
  }
40
-
41
-
42
- @if $value and type-of($value) == list {
34
+ @else if $value and type-of($value) == list {
43
35
  $length: list.length($value);
44
36
 
45
- @if $length > 0 {
46
- $v: nth($value, 1);
47
-
48
- @if $v != null {
49
- top: $v;
50
- }
37
+ @if $length > 0 and nth($value, 1) != null {
38
+ top: nth($value, 1);
51
39
  }
52
40
 
53
- @if $length > 1 {
54
- $v: nth($value, 2);
55
-
56
- @if $v != null {
57
- right: $v;
58
- }
41
+ @if $length > 1 and nth($value, 2) != null {
42
+ right: nth($value, 2);
59
43
  }
60
44
 
61
- @if $length > 2 {
62
- $v: nth($value, 3);
63
-
64
- @if $v != null {
65
- bottom: $v;
66
- }
45
+ @if $length > 2 and nth($value, 3) != null {
46
+ bottom: nth($value, 3);
67
47
  }
68
48
 
69
- @if $length > 3 {
70
- $v: nth($value, 4);
71
-
72
- @if $v != null {
73
- left: $v;
74
- }
49
+ @if $length > 3 and nth($value, 4) != null {
50
+ left: nth($value, 4);
75
51
  }
76
52
  }
77
53
  }
@@ -1,13 +1,18 @@
1
+ @function box-shadow($alpha) {
2
+ $base: hsl(214 80% 27% / 4%);
3
+ $shade: hsl(from $base calc(h + 8) 25 calc(l - 5));
4
+
5
+ @return 0 0 0 1px $base,
6
+ 0 1px 1px -0.5px $shade,
7
+ 0 3px 3px -1.5px $shade,
8
+ 0 6px 6px -3px $shade,
9
+ 0 12px 12px -6px $base,
10
+ 0 24px 24px -12px $base;
11
+ }
12
+
13
+
1
14
  $box-shadow: (
2
- 300: #{
3
- 0px 8px 16px -4px rgba(0, 3, 19, 0.016),
4
- 0px 4px 8px -2px rgba(0, 3, 19, 0.008)
5
- },
6
- 400: #{
7
- 0px 16px 24px -4px rgba(0, 3, 19, 0.048),
8
- 0px 8px 8px -4px rgba(0, 3, 19, 0.024)
9
- },
10
- 500: #{
11
- 0px 16px 32px -8px rgba(0, 3, 19, 0.16)
12
- }
13
- );
15
+ 300: box-shadow(2),
16
+ 400: box-shadow(4),
17
+ 500: box-shadow(6)
18
+ );
@@ -1,5 +1 @@
1
- $transition-duration: (
2
- 300: 0.08s,
3
- 400: 0.16s,
4
- 500: 0.24s
5
- );
1
+ $transition-duration: 0.16s;
package/tsconfig.json CHANGED
@@ -1,11 +1,3 @@
1
1
  {
2
- "compilerOptions": {
3
- "baseUrl": ".",
4
- "declaration": true,
5
- "declarationDir": "build",
6
- "outDir": "build"
7
- },
8
- "exclude": ["node_modules"],
9
- "extends": "./node_modules/@esportsplus/typescript/tsconfig.base.json",
10
- "include": ["src"]
2
+ "extends": "@esportsplus/typescript/tsconfig.package.json"
11
3
  }