@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
package/package.json CHANGED
@@ -2,11 +2,11 @@
2
2
  "author": "ICJR",
3
3
  "dependencies": {
4
4
  "@esportsplus/action": "^0.0.50",
5
- "@esportsplus/reactivity": "^0.1.27",
6
- "@esportsplus/template": "^0.2.10"
5
+ "@esportsplus/reactivity": "^0.1.28",
6
+ "@esportsplus/template": "^0.3.1"
7
7
  },
8
8
  "devDependencies": {
9
- "@esportsplus/webpack": "^0.4.9",
9
+ "@esportsplus/webpack": "^0.4.11",
10
10
  "modern-normalize": "^2.0.0"
11
11
  },
12
12
  "main": "build/index.js",
@@ -21,5 +21,5 @@
21
21
  },
22
22
  "sideEffects": false,
23
23
  "types": "build/index.d.ts",
24
- "version": "0.2.5"
24
+ "version": "0.2.9"
25
25
  }
@@ -0,0 +1,34 @@
1
+ import { reactive } from '@esportsplus/reactivity';
2
+
3
+
4
+ let key = Symbol();
5
+
6
+
7
+ export default () => {
8
+ let state = reactive({
9
+ active: 0 as boolean | number
10
+ });
11
+
12
+ return {
13
+ attributes: {
14
+ class: () => {
15
+ return state.active && '--active';
16
+ },
17
+ onrender: (element: HTMLElement & Record<PropertyKey, unknown>) => {
18
+ element[key] = state;
19
+ },
20
+ style: (element: HTMLElement) => {
21
+ if (state.active) {
22
+ let parent = element.closest('accordion') as (HTMLElement & { [k: typeof key]: typeof state }) | null;
23
+
24
+ if (parent && key in parent) {
25
+ parent[key].active = (+parent[key].active) + 1;
26
+ }
27
+ }
28
+
29
+ return state.active && `--max-height: ${element.scrollHeight}`;
30
+ }
31
+ },
32
+ state
33
+ };
34
+ }
@@ -1,4 +1,9 @@
1
+ @use '/tokens';
2
+
1
3
  .accordion {
2
4
  --max-height: 0;
3
- --transition-duration: var(--transition-duration-400);
5
+
6
+ @include tokens.state(inactive) {
7
+ --max-height: 0;
8
+ }
4
9
  }
@@ -1,5 +1,4 @@
1
1
  .anchor {
2
2
  --margin-horizontal: var(--size-400);
3
3
  --margin-vertical: var(--size-400);
4
- --transition-duration: var(--transition-duration-400);
5
4
  }
@@ -0,0 +1,22 @@
1
+ import { html } from '@esportsplus/template';
2
+
3
+
4
+ type Options = {
5
+ backgrounds: [string, string, string, string];
6
+ blur?: string;
7
+ opacity?: number;
8
+ scale?: number;
9
+ };
10
+
11
+
12
+ export default ({ backgrounds, blur, opacity, scale }: Options) => html`
13
+ <div class="aurora" ${{
14
+ style: {
15
+ '--blur': blur || '50px',
16
+ '--opacity': opacity || 0.8,
17
+ '--scale': scale || 1
18
+ }
19
+ }}>
20
+ ${backgrounds.map((bg) => html`<div style='${`--background-color: ${bg}`}'></div>`)}
21
+ </div>
22
+ `;
@@ -0,0 +1,60 @@
1
+ .aurora {
2
+ inset: 0;
3
+ position: absolute;
4
+ overflow: hidden;
5
+
6
+ div {
7
+ background-color: var(--background-color);
8
+ position: absolute;
9
+ filter: blur(var(--blur));
10
+ opacity: var(--opacity);
11
+
12
+ :nth-child(1) {
13
+ animation: AuroraFirstChild 12s linear infinite;
14
+ border-radius: 100%;
15
+ height: 600px;
16
+ inset: -300px auto auto -50px;
17
+ transform: rotate(0) translate(80px) rotate(0) scale(var(--scale));
18
+ width: 600px;
19
+ z-index: 3;
20
+ }
21
+
22
+ :nth-child(2) {
23
+ inset: auto auto -30px -80px;
24
+ height: 800px;
25
+ transform: scale(var(--scale));
26
+ width: 500px;
27
+ }
28
+
29
+ :nth-child(3) {
30
+ animation: AuroraSiblings 10s linear infinite;
31
+ border-radius: 100%;
32
+ height: 450px;
33
+ inset: auto -100px -80px auto;
34
+ transform: rotate(0) translate(200px) rotate(0) scale(var(--scale));
35
+ width: 450px;
36
+ }
37
+
38
+ :nth-child(4) {
39
+ animation: AuroraSiblings 15s linear infinite;
40
+ border-radius: 100%;
41
+ height: 350px;
42
+ inset: auto 0 0 auto;
43
+ margin: auto;
44
+ transform: rotate(0) translate(200px) rotate(0) scale(var(--scale));
45
+ width: 350px;
46
+ }
47
+
48
+ @keyframes AuroraFirstChild {
49
+ 100% {
50
+ transform: rotate(2turn) translate(200px) rotate(-2turn);
51
+ }
52
+ }
53
+
54
+ @keyframes AuroraSiblings {
55
+ 100% {
56
+ transform: rotate(-2turn) translate(200px) rotate(2turn);
57
+ }
58
+ }
59
+ }
60
+ }
@@ -13,7 +13,7 @@
13
13
  }
14
14
 
15
15
  &--blur {
16
- filter: blur(24px);
16
+ filter: blur(var(--blur));
17
17
  left: -2svh;
18
18
  right: -2svh;
19
19
  top: -2svh;
@@ -1,4 +1,8 @@
1
1
  .banner {
2
+ &--blur {
3
+ --blur: 24px;
4
+ }
5
+
2
6
  &--gradient {
3
7
  --from: rgba(3,0,19, 0.32);
4
8
  --to: var(--color-black-500);
@@ -46,8 +46,9 @@
46
46
 
47
47
  &::before {
48
48
  @include lib.position(absolute, center);
49
- animation: button--processing var(--animation-duration) infinite linear;
50
- border: var(--border-width) solid var(--border-color);
49
+ animation: ButtonProcessing var(--animation-duration) infinite linear;
50
+ border: var(--border-width) solid color-mix(in srgb, var(--border-color), transparent 90%);
51
+ border-left-color: var(--border-color);
51
52
  border-radius: 100%;
52
53
  border-right-color: transparent;
53
54
  border-top-color: transparent;
@@ -60,7 +61,7 @@
60
61
  opacity: 0;
61
62
  }
62
63
 
63
- @keyframes button--processing {
64
+ @keyframes ButtonProcessing {
64
65
  0% {
65
66
  transform: translate(50%, 50%) rotate(0deg);
66
67
  }
@@ -70,6 +71,27 @@
70
71
  }
71
72
  }
72
73
 
74
+ &--skeleton {
75
+ animation: var(--animation-duration) ease-in-out infinite ButtonSkeleton;
76
+ background-image: linear-gradient(270deg, var(--background-pressed), var(--background-default), var(--background-default), var(--background-pressed));
77
+ background-size: 400% 100%;
78
+ color: transparent;
79
+ pointer-events: none;
80
+
81
+ * {
82
+ opacity: 0;
83
+ }
84
+
85
+ @keyframes ButtonSkeleton {
86
+ 0% {
87
+ background-position: 200% 0;
88
+ }
89
+ 100% {
90
+ background-position: -200% 0;
91
+ }
92
+ }
93
+ }
94
+
73
95
  &--top {
74
96
  &-left,
75
97
  &-right {
@@ -29,7 +29,6 @@
29
29
  --line-height: var(--line-height-400);
30
30
  --padding-horizontal: var(--size-400);
31
31
  --padding-vertical: var(--size-400);
32
- --transition-duration: var(--transition-duration-400);
33
32
  --width: auto;
34
33
 
35
34
  @include tokens.state(active) {
@@ -59,11 +58,9 @@
59
58
  --border-color: var(--color);
60
59
  --border-width: var(--border-width-400);
61
60
  --size: var(--size-400);
61
+ }
62
62
 
63
- @each $key in lib.map-keys(tokens.$border-width) {
64
- &-#{$key} {
65
- --border-width: var(--border-width-#{$key});
66
- }
67
- }
63
+ &--skeleton {
64
+ --animation-duration: 6.4s;
68
65
  }
69
66
  }
@@ -19,7 +19,6 @@
19
19
  --box-shadow-pressed: none;
20
20
  --padding-horizontal: 0px;
21
21
  --padding-vertical: 0px;
22
- --transition-duration: var(--transition-duration-400);
23
22
  --width: auto;
24
23
 
25
24
  @include tokens.state(active) {
@@ -0,0 +1,4 @@
1
+ import write from './write';
2
+
3
+
4
+ export default { write };
@@ -0,0 +1,9 @@
1
+ export default async (value: string) => {
2
+ try {
3
+ await navigator.clipboard.writeText(value);
4
+ return true;
5
+ }
6
+ catch {
7
+ return false;
8
+ }
9
+ };
@@ -2,9 +2,7 @@
2
2
  display: flex;
3
3
  flex-wrap: wrap;
4
4
  justify-content: flex-start;
5
- margin: 0 auto;
6
- max-width: var(--max-width);
7
- padding: var(--padding-vertical) var(--padding-horizontal);
5
+ margin: var(--margin-vertical) auto;
8
6
  position: relative;
9
- width: 100%;
7
+ width: min(var(--max-width), calc(100% - var(--margin-horizontal) * 2));
10
8
  }
@@ -1,5 +1,5 @@
1
1
  .container {
2
+ --margin-horizontal: var(--size-600);
3
+ --margin-vertical: 0px;
2
4
  --max-width: 1400px;
3
- --padding-horizontal: var(--size-600);
4
- --padding-vertical: 0px;
5
5
  }
@@ -0,0 +1,10 @@
1
+ import { html } from '@esportsplus/template';
2
+
3
+
4
+ export default (attributes?: Record<string, string>) => html`
5
+ <div class="ellipsis" ${attributes}>
6
+ <span></span>
7
+ <span></span>
8
+ <span></span>
9
+ </div>
10
+ `;
@@ -1,72 +1,28 @@
1
1
  .ellipsis {
2
- &-dot {
3
- &:nth-child(1) {
4
- animation: ellipsis-dot-one var(--animation-duration) linear infinite;
5
- }
2
+ span {
3
+ animation: Ellipsis var(--animation-duration) infinite linear;
4
+ background-color: var(--color);
5
+ border-radius: 100%;
6
+ display: inline-block;
7
+ height: var(--size);
8
+ margin: 0 var(--margin-horizontal);
9
+ width: var(--size);
6
10
 
7
- &:nth-child(2) {
8
- animation: ellipsis-dot-two var(--animation-duration) linear infinite;
11
+ :nth-child(2) {
12
+ animation-delay: 0.24s;
9
13
  }
10
14
 
11
- &:nth-child(3) {
12
- animation: ellipsis-dot-three var(--animation-duration) linear infinite;
15
+ :nth-child(3) {
16
+ animation-delay: 0.48s;
13
17
  }
14
18
  }
15
- }
16
-
17
- @keyframes ellipsis-dot-one {
18
- 0% {
19
- opacity: 1;
20
- }
21
- 65% {
22
- opacity: 1;
23
- }
24
- 66% {
25
- opacity: 0;
26
- }
27
- 100% {
28
- opacity: 0;
29
- }
30
- }
31
-
32
- @keyframes ellipsis-dot-two {
33
- 0% {
34
- opacity: 0;
35
- }
36
- 21% {
37
- opacity: 0;
38
- }
39
- 22% {
40
- opacity: 1;
41
- }
42
- 65% {
43
- opacity: 1;
44
- }
45
- 66% {
46
- opacity: 0;
47
- }
48
- 100% {
49
- opacity: 0;
50
- }
51
- }
52
19
 
53
- @keyframes ellipsis-dot-three {
54
- 0% {
55
- opacity: 0;
56
- }
57
- 43% {
58
- opacity: 0;
59
- }
60
- 44% {
61
- opacity: 1;
62
- }
63
- 65% {
64
- opacity: 1;
65
- }
66
- 66% {
67
- opacity: 0;
68
- }
69
- 100% {
70
- opacity: 0;
20
+ @keyframes Ellipsis {
21
+ 0%, 100% {
22
+ opacity: 0.16;
23
+ }
24
+ 20% {
25
+ opacity: 1;
26
+ }
71
27
  }
72
28
  }
@@ -1,3 +1,5 @@
1
1
  .ellipsis {
2
- --animation-duration: 2s;
2
+ --animation-duration: 1.24s;
3
+ --marign-horizontal: var(--size-100);
4
+ --size: var(--size-200);
3
5
  }
@@ -62,9 +62,9 @@
62
62
  }
63
63
 
64
64
  &-error {
65
- animation: field-error 0.32s 1 linear;
65
+ animation: FieldError 0.32s 1 linear;
66
66
 
67
- @keyframes field-error {
67
+ @keyframes FieldError {
68
68
  0% {
69
69
  transform: translate(8px);
70
70
  }
@@ -3,7 +3,6 @@
3
3
  @use 'text' as text;
4
4
 
5
5
  .field {
6
- --transition-duration: var(--transition-duration-400);
7
6
  --width: 100%;
8
7
 
9
8
 
@@ -55,8 +55,10 @@ function parse(keys: (number | string)[], selected: number | string) {
55
55
 
56
56
  function template(data: Data, state: { active: boolean, options: Record<number | string, boolean>, selected: number | string }) {
57
57
  let { attributes: a, html: h } = scrollbar({
58
- fixed: true,
59
- style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
58
+ attributes: {
59
+ style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
60
+ },
61
+ fixed: true
60
62
  });
61
63
 
62
64
  return html`
@@ -1,6 +1,6 @@
1
1
  import response from '@esportsplus/action';
2
2
  import { Action } from './types';
3
- import alert from '~/components/alert';
3
+ // import alert from '~/components/alert';
4
4
  import input from './input';
5
5
 
6
6
 
@@ -45,7 +45,8 @@ export default function(action: Action) {
45
45
  event?.submitter?.classList.add('button--processing');
46
46
 
47
47
  let { errors } = await action({
48
- alert,
48
+ // @ts-ignore
49
+ alert: null,
49
50
  input: parse( Object.fromEntries( new FormData( this )?.entries() ) ),
50
51
  response
51
52
  });
@@ -1,5 +1,5 @@
1
1
  import response, { Response } from '@esportsplus/action';
2
- import alert from '~/components/alert';
2
+ // import alert from '~/components/alert';
3
3
 
4
4
 
5
5
  type Action = (data: Payload) => Promise<Errors> | Errors;
@@ -0,0 +1,6 @@
1
+ .grid {
2
+ display: grid;
3
+ grid-gap: var(--margin-horizontal) var(--margin-vertical);
4
+ grid-template-columns: repeat(auto-fit, minmax(var(--min-width), var(--max-width)));
5
+ position: relative;
6
+ }
@@ -0,0 +1,6 @@
1
+ .group {
2
+ --margin-horizontal: var(--size-400);
3
+ --margin-vertical: var(--size-400);
4
+ --max-width: 1fr;
5
+ --min-width: 200px;
6
+ }
@@ -2,9 +2,9 @@
2
2
  display: flex;
3
3
  flex-wrap: wrap;
4
4
  justify-content: flex-start;
5
- margin: 0 calc(var(--margin-horizontal) / -2);
5
+ margin: 0 calc(var(--margin-horizontal) * -1);
6
6
  position: relative;
7
- width: calc(100% + var(--margin-horizontal));
7
+ width: calc(100% + var(--margin-horizontal) * 2);
8
8
 
9
9
 
10
10
  &--offset {
@@ -25,12 +25,12 @@
25
25
 
26
26
  &-item {
27
27
  display: flex;
28
- margin: var(--margin-vertical) calc(var(--margin-horizontal) / 2) 0;
28
+ margin: var(--margin-vertical) var(--margin-horizontal) 0;
29
29
  position: relative;
30
30
  width: var(--width);
31
31
 
32
32
  &[class*='--width'] {
33
- width: calc(var(--width) - var(--margin-horizontal));
33
+ width: calc(var(--width) - var(--margin-horizontal) * 2);
34
34
  }
35
35
  }
36
36
  }
@@ -3,7 +3,6 @@
3
3
  display: flex;
4
4
  flex: 0 0 var(--width);
5
5
  height: var(--height);
6
- pointer-events: none;
7
6
  position: relative;
8
7
  width: var(--width);
9
8
 
@@ -0,0 +1,4 @@
1
+ import download from './download';
2
+
3
+
4
+ export default { download };
@@ -23,7 +23,6 @@
23
23
  --line-height: var(--line-height-400);
24
24
  --padding-horizontal: var(--size-400);
25
25
  --padding-vertical: var(--size-400);
26
- --transition-duration: var(--transition-duration-400);
27
26
  --width: auto;
28
27
 
29
28
 
@@ -1,24 +1,17 @@
1
1
  .loading {
2
- animation: loading var(--animation-duration) infinite linear;
3
- animation-delay: var(--animation-delay);
4
- border: var(--border-width) var(--border-style) var(--border-color);
2
+ animation: Loading var(--animation-duration) linear infinite;
3
+ border: var(--border-width) solid color-mix(in srgb, var(--border-color), transparent 90%);
4
+ border-left-color: var(--border-color);
5
5
  border-radius: 100%;
6
- border-right-color: transparent;
7
- border-top-color: transparent;
8
- box-shadow: var(--box-shadow);
9
- height: var(--height);
10
- pointer-events: none;
11
- position: relative;
12
- transition: border-color var(--transition-duration) ease-in-out;
13
- width: var(--width);
14
- z-index: 0;
6
+ height: var(--size);
7
+ width: var(--size);
15
8
  }
16
9
 
17
- @keyframes loading {
10
+ @keyframes Loading {
18
11
  0% {
19
- transform: rotate(0deg);
12
+ transform: rotate(0deg)
20
13
  }
21
14
  100% {
22
- transform: rotate(360deg);
15
+ transform: rotate(360deg)
23
16
  }
24
- }
17
+ }
@@ -1,31 +1,6 @@
1
1
  .loading {
2
- --animation-delay: calc(0s + (0.032s * var(--i)));
3
- --animation-duration: calc(0.64s * (var(--i) + 1.5));
4
- --border-color: inherit;
5
- --border-style: solid;
2
+ --animation-duration: 0.64s;
3
+ --border-color: var(--color);
6
4
  --border-width: var(--border-width-400);
7
- --box-shadow: none;
8
- --height: calc(var(--size) * var(--multiplier));
9
- --i: 0;
10
- --multiplier: calc(1 - (.2 * var(--i)));
11
5
  --size: var(--size-400);
12
- --transition-duration: var(--transition-duration-400);
13
- --width: calc(var(--size) * var(--multiplier));
14
-
15
- .loading {
16
- --i: 1;
17
- --size: inherit;
18
-
19
- .loading {
20
- --i: 2;
21
-
22
- .loading {
23
- --i: 3;
24
-
25
- .loading {
26
- --i: 4;
27
- }
28
- }
29
- }
30
- }
31
- }
6
+ }
@@ -4,11 +4,12 @@
4
4
  .modal {
5
5
  @include lib.position(fixed, center);
6
6
  max-height: var(--max-height);
7
- max-width: var(--max-width);
8
7
  overflow: hidden;
9
- transition: opacity var(--transition-duration) ease-in-out, transform var(--transition-duration) ease-in-out;
8
+ transition:
9
+ opacity var(--transition-duration) ease-in-out,
10
+ transform var(--transition-duration) ease-in-out;
10
11
  transform-origin: center;
11
- width: var(--width);
12
+ width: min(var(--max-width), calc(100svw - (var(--margin-horizontal) * 2)));
12
13
  z-index: 2;
13
14
 
14
15
  @include tokens.state(inactive) {
@@ -22,7 +23,9 @@
22
23
  }
23
24
 
24
25
  &-frame {
25
- transition: opacity var(--transition-duration) ease-in-out, transform var(--transition-duration) ease-in-out;
26
+ transition:
27
+ opacity var(--transition-duration) ease-in-out,
28
+ transform var(--transition-duration) ease-in-out;
26
29
  transform-origin: center;
27
30
 
28
31
  @include tokens.state(inactive) {
@@ -1,10 +1,6 @@
1
1
  .modal {
2
- --max-height: calc(100svh - (var(--margin) * 2));
2
+ --margin-horizontal: 0px;
3
+ --margin-vertical: 0px;
4
+ --max-height: calc(100svh - (var(--margin-vertical) * 2));
3
5
  --max-width: 320px;
4
- --width: calc(100svw - (var(--margin) * 2));
5
-
6
- &,
7
- &-frame {
8
- --transition-duration: var(--transition-duration-300);
9
- }
10
6
  }