@esportsplus/ui 0.13.11 → 0.14.2

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.
@@ -8,14 +8,9 @@ export default (data) => {
8
8
  <div class='field-title --flex-horizontal-space-between --flex-vertical'>
9
9
  ${data.title}
10
10
 
11
- ${data?.required && html `
12
- <div
13
- class='bubble --background-primary --margin-left'
14
- ${tooltip.onhover().attributes}
15
- >
16
- <span class='tooltip-message tooltip-message--w'>Required</span>
17
- </div>
18
- `}
11
+ ${data?.required && tooltip.onhover({ class: 'bubble --background-primary --margin-left' }, html `
12
+ <span class='tooltip-message tooltip-message--w'>Required</span>
13
+ `)}
19
14
  </div>
20
15
  `;
21
16
  };
@@ -22,8 +22,9 @@ export { default as link } from './link/index.js';
22
22
  export * as loader from './loader/index.js';
23
23
  export { default as loading } from './loading/index.js';
24
24
  export { default as magnet } from './magnet/index.js';
25
- export { default as modal } from './modal/index.js';
25
+ export * as modal from './modal/index.js';
26
26
  export { default as number } from './number/index.js';
27
+ export { default as overlay } from './overlay/index.js';
27
28
  export { default as page } from './page/index.js';
28
29
  export { default as root } from './root/index.js';
29
30
  export * as row from './row/index.js';
@@ -22,8 +22,9 @@ export { default as link } from './link/index.js';
22
22
  export * as loader from './loader/index.js';
23
23
  export { default as loading } from './loading/index.js';
24
24
  export { default as magnet } from './magnet/index.js';
25
- export { default as modal } from './modal/index.js';
25
+ export * as modal from './modal/index.js';
26
26
  export { default as number } from './number/index.js';
27
+ export { default as overlay } from './overlay/index.js';
27
28
  export { default as page } from './page/index.js';
28
29
  export { default as root } from './root/index.js';
29
30
  export * as row from './row/index.js';
@@ -1,4 +1 @@
1
- import scrollbar from '../../components/scrollbar/index.js';
2
1
  import './scss/index.scss';
3
- declare const _default: (data: Parameters<typeof scrollbar>[0], content: unknown) => import("@esportsplus/template/build/types").RenderableTemplate;
4
- export default _default;
@@ -1,10 +1 @@
1
- import { isArray } from '@esportsplus/utilities';
2
- import scrollbar from '../../components/scrollbar/index.js';
3
1
  import './scss/index.scss';
4
- export default (data, content) => {
5
- if (!isArray(data.class)) {
6
- data.class = data.class ? [data.class] : [];
7
- }
8
- data.class.push('modal');
9
- return scrollbar(data, content);
10
- };
@@ -1,2 +1,2 @@
1
- @layer components {.modal{--margin-horizontal:0px;--margin-vertical:0px;--max-height:calc(100svh - (var(--margin-vertical)*2));--max-width:320px;height:auto;max-height:var(--max-height);transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%;width:min(var(--max-width),100svw - var(--margin-horizontal)*2);z-index:2;position:fixed;bottom:50%;right:50%;overflow:hidden;transform:translate(50%,50%)}.modal:not(.--active){opacity:0;pointer-events:none;transform:translate(50%,50%)scale(.8)}.modal:not(.--active) input[type=password]{display:none}.modal-frame{transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%}.modal-frame:not(.--active){display:none}}
1
+ @layer components {.modal{--margin-horizontal:0px;--margin-vertical:0px;--max-width:480px;transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%;width:min(var(--max-width),100svw - var(--margin-horizontal)*2);z-index:9}.modal:not(.--active){opacity:0;pointer-events:none;transform:translate(50%,50%)scale(.8)}.modal:not(.--active) input[type=password]{display:none}.modal-frame{transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%}.modal-frame:not(.--active){display:none}}
2
2
  /*$vite$:1*/
@@ -0,0 +1,4 @@
1
+ import scrollbar from '../../components/scrollbar/index.js';
2
+ import './scss/index.scss';
3
+ declare const _default: (data: Parameters<typeof scrollbar>[0], content: unknown) => import("@esportsplus/template/build/types").RenderableTemplate;
4
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { isArray } from '@esportsplus/utilities';
2
+ import scrollbar from '../../components/scrollbar/index.js';
3
+ import './scss/index.scss';
4
+ export default (data, content) => {
5
+ if (!isArray(data.class)) {
6
+ data.class = data.class ? [data.class] : [];
7
+ }
8
+ data.class.push('overlay');
9
+ return scrollbar(data, content);
10
+ };
@@ -0,0 +1,2 @@
1
+ @layer components {.overlay{cursor:default;z-index:1;position:fixed;inset:0;overflow:hidden}.overlay:not(.--active) input[type=password]{display:none}.overlay-content{flex:0 0 var(--width-default);width:var(--width-default)}}
2
+ /*$vite$:1*/
package/package.json CHANGED
@@ -47,7 +47,7 @@
47
47
  "private": false,
48
48
  "sideEffects": false,
49
49
  "type": "module",
50
- "version": "0.13.11",
50
+ "version": "0.14.2",
51
51
  "scripts": {
52
52
  "build": "run-s build:vite build:ts",
53
53
  "build:ts": "tsc && tsc-alias",
@@ -11,14 +11,9 @@ export default (data: { required?: boolean, title?: unknown }) => {
11
11
  <div class='field-title --flex-horizontal-space-between --flex-vertical'>
12
12
  ${data.title}
13
13
 
14
- ${data?.required && html`
15
- <div
16
- class='bubble --background-primary --margin-left'
17
- ${tooltip.onhover().attributes}
18
- >
19
- <span class='tooltip-message tooltip-message--w'>Required</span>
20
- </div>
21
- `}
14
+ ${data?.required && tooltip.onhover({ class: 'bubble --background-primary --margin-left' }, html`
15
+ <span class='tooltip-message tooltip-message--w'>Required</span>
16
+ `)}
22
17
  </div>
23
18
  `;
24
19
  }
@@ -22,8 +22,9 @@ export { default as link } from './link';
22
22
  export * as loader from './loader';
23
23
  export { default as loading } from './loading';
24
24
  export { default as magnet } from './magnet';
25
- export { default as modal } from './modal';
25
+ export * as modal from './modal';
26
26
  export { default as number } from './number';
27
+ export { default as overlay } from './overlay';
27
28
  export { default as page } from './page';
28
29
  export { default as root } from './root';
29
30
  export * as row from './row';
@@ -1,14 +1 @@
1
- import { isArray } from '@esportsplus/utilities';
2
- import scrollbar from '~/components/scrollbar';
3
- import './scss/index.scss';
4
-
5
-
6
- export default (data: Parameters<typeof scrollbar>[0], content: unknown) => {
7
- if (!isArray(data.class)) {
8
- data.class = data.class ? [data.class] : [];
9
- }
10
-
11
- (data.class as unknown[]).push('modal');
12
-
13
- return scrollbar(data, content);
14
- };
1
+ import './scss/index.scss';
@@ -3,16 +3,12 @@
3
3
  @use './variables.scss';
4
4
 
5
5
  .modal {
6
- @include lib.position(fixed, center);
7
- height: auto;
8
- max-height: var(--max-height);
9
- overflow: hidden;
10
6
  transition:
11
7
  opacity var(--transition-duration) ease-in-out,
12
8
  transform var(--transition-duration) ease-in-out;
13
9
  transform-origin: center;
14
10
  width: min(var(--max-width), calc(100svw - (var(--margin-horizontal) * 2)));
15
- z-index: 2;
11
+ z-index: 9;
16
12
 
17
13
  @include tokens.state(inactive) {
18
14
  opacity: 0;
@@ -1,6 +1,5 @@
1
1
  .modal {
2
2
  --margin-horizontal: 0px;
3
3
  --margin-vertical: 0px;
4
- --max-height: calc(100svh - (var(--margin-vertical) * 2));
5
- --max-width: 320px;
4
+ --max-width: 480px;
6
5
  }
@@ -0,0 +1,14 @@
1
+ import { isArray } from '@esportsplus/utilities';
2
+ import scrollbar from '~/components/scrollbar';
3
+ import './scss/index.scss';
4
+
5
+
6
+ export default (data: Parameters<typeof scrollbar>[0], content: unknown) => {
7
+ if (!isArray(data.class)) {
8
+ data.class = data.class ? [data.class] : [];
9
+ }
10
+
11
+ (data.class as unknown[]).push('overlay');
12
+
13
+ return scrollbar(data, content);
14
+ };
@@ -0,0 +1,22 @@
1
+ @use '/lib';
2
+ @use '/tokens';
3
+
4
+ .overlay {
5
+ @include lib.position(fixed, full);
6
+ cursor: default;
7
+ overflow: hidden;
8
+ z-index: 1;
9
+
10
+
11
+ @include tokens.state(inactive) {
12
+ input[type='password'] {
13
+ display: none;
14
+ }
15
+ }
16
+
17
+
18
+ &-content {
19
+ flex: 0 0 var(--width-default);
20
+ width: var(--width-default);
21
+ }
22
+ }