@esportsplus/ui 0.15.3 → 0.15.5

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.
@@ -1,7 +1,8 @@
1
+ import description from './description.js';
1
2
  type Data = {
2
3
  class?: string;
3
4
  content?: unknown;
4
- description?: unknown;
5
+ description?: Parameters<typeof description>[0]['description'];
5
6
  mask?: Record<string, unknown>;
6
7
  name?: string;
7
8
  style?: string;
@@ -1,4 +1,7 @@
1
1
  declare const _default: (data: {
2
- description?: unknown;
2
+ description?: {
3
+ attributes?: Record<string, unknown>;
4
+ content: unknown;
5
+ };
3
6
  }) => import("@esportsplus/template/build/types").RenderableTemplate | "";
4
7
  export default _default;
@@ -4,8 +4,8 @@ export default (data) => {
4
4
  return '';
5
5
  }
6
6
  return html `
7
- <div class='field-description'>
8
- ${data.description}
7
+ <div class='field-description' ${data.description.attributes}>
8
+ ${data.description.content}
9
9
  </div>
10
10
  `;
11
11
  };
@@ -1,7 +1,9 @@
1
+ import description from './description.js';
2
+ import title from './title.js';
1
3
  type Data = {
2
4
  accept?: string;
3
5
  class?: string;
4
- description?: unknown;
6
+ description?: Parameters<typeof description>[0]['description'];
5
7
  mask?: {
6
8
  content?: unknown;
7
9
  } & Record<string, unknown>;
@@ -10,7 +12,7 @@ type Data = {
10
12
  required?: boolean;
11
13
  style?: string;
12
14
  tag?: Record<string, unknown>;
13
- title?: unknown;
15
+ title?: Parameters<typeof title>[0]['title'];
14
16
  value?: unknown;
15
17
  } & Record<string, unknown>;
16
18
  declare const _default: (data: Data) => import("@esportsplus/template/build/types").RenderableTemplate;
@@ -7,7 +7,7 @@ declare const _default: {
7
7
  checkbox: (data: {
8
8
  class?: string;
9
9
  content?: unknown;
10
- description?: unknown;
10
+ description?: Parameters<typeof import("./description.js").default>[0]["description"];
11
11
  mask?: Record<string, unknown>;
12
12
  name?: string;
13
13
  style?: string;
@@ -18,7 +18,7 @@ declare const _default: {
18
18
  file: (data: {
19
19
  accept?: string;
20
20
  class?: string;
21
- description?: unknown;
21
+ description?: Parameters<typeof import("./description.js").default>[0]["description"];
22
22
  mask?: {
23
23
  content?: unknown;
24
24
  } & Record<string, unknown>;
@@ -27,7 +27,7 @@ declare const _default: {
27
27
  required?: boolean;
28
28
  style?: string;
29
29
  tag?: Record<string, unknown>;
30
- title?: unknown;
30
+ title?: Parameters<typeof import("./title.js").default>[0]["title"];
31
31
  value?: unknown;
32
32
  } & Record<string, unknown>) => import("@esportsplus/template/build/types").RenderableTemplate;
33
33
  optional: {
@@ -41,7 +41,7 @@ declare const _default: {
41
41
  select: <T extends Record<number | string, number | string>>(data: {
42
42
  class?: string;
43
43
  content?: unknown;
44
- description?: unknown;
44
+ description?: Parameters<typeof import("./description.js").default>[0]["description"];
45
45
  effect?: (selected: number | string) => void;
46
46
  mask?: Record<string, unknown>;
47
47
  name?: string;
@@ -53,7 +53,7 @@ declare const _default: {
53
53
  style?: string;
54
54
  tag?: Record<string, unknown>;
55
55
  text?: Record<string, unknown>;
56
- title?: unknown;
56
+ title?: Parameters<typeof import("./title.js").default>[0]["title"];
57
57
  tooltip?: {
58
58
  content?: Record<string, unknown>;
59
59
  } & Record<string, unknown>;
@@ -66,7 +66,7 @@ declare const _default: {
66
66
  text: (data: {
67
67
  class?: string;
68
68
  content?: unknown;
69
- description?: unknown;
69
+ description?: Parameters<typeof import("./description.js").default>[0]["description"];
70
70
  mask?: Record<string, unknown>;
71
71
  name?: string;
72
72
  placeholder?: string;
@@ -74,7 +74,7 @@ declare const _default: {
74
74
  style?: string;
75
75
  tag?: Record<string, unknown>;
76
76
  textarea?: boolean;
77
- title?: unknown;
77
+ title?: Parameters<typeof import("./title.js").default>[0]["title"];
78
78
  type?: string;
79
79
  value?: unknown;
80
80
  } & Record<string, unknown>) => import("@esportsplus/template/build/types").RenderableTemplate;
@@ -1,8 +1,10 @@
1
1
  import scrollbar from '../../components/scrollbar/index.js';
2
+ import description from './description.js';
3
+ import title from './title.js';
2
4
  type Data<T extends Record<number | string, number | string>> = {
3
5
  class?: string;
4
6
  content?: unknown;
5
- description?: unknown;
7
+ description?: Parameters<typeof description>[0]['description'];
6
8
  effect?: (selected: number | string) => void;
7
9
  mask?: Record<string, unknown>;
8
10
  name?: string;
@@ -14,7 +16,7 @@ type Data<T extends Record<number | string, number | string>> = {
14
16
  style?: string;
15
17
  tag?: Record<string, unknown>;
16
18
  text?: Record<string, unknown>;
17
- title?: unknown;
19
+ title?: Parameters<typeof title>[0]['title'];
18
20
  tooltip?: {
19
21
  content?: Record<string, unknown>;
20
22
  } & Record<string, unknown>;
@@ -1,7 +1,9 @@
1
+ import description from './description.js';
2
+ import title from './title.js';
1
3
  type Data = {
2
4
  class?: string;
3
5
  content?: unknown;
4
- description?: unknown;
6
+ description?: Parameters<typeof description>[0]['description'];
5
7
  mask?: Record<string, unknown>;
6
8
  name?: string;
7
9
  placeholder?: string;
@@ -9,7 +11,7 @@ type Data = {
9
11
  style?: string;
10
12
  tag?: Record<string, unknown>;
11
13
  textarea?: boolean;
12
- title?: unknown;
14
+ title?: Parameters<typeof title>[0]['title'];
13
15
  type?: string;
14
16
  value?: unknown;
15
17
  } & Record<string, unknown>;
@@ -1,5 +1,8 @@
1
1
  declare const _default: (data: {
2
2
  required?: boolean;
3
- title?: unknown;
3
+ title?: {
4
+ attributes?: Record<string, unknown>;
5
+ content: unknown;
6
+ };
4
7
  }) => import("@esportsplus/template/build/types").RenderableTemplate | "";
5
8
  export default _default;
@@ -5,8 +5,8 @@ export default (data) => {
5
5
  return '';
6
6
  }
7
7
  return html `
8
- <div class='field-title --flex-horizontal-space-between --flex-vertical'>
9
- ${data.title}
8
+ <div class='field-title --flex-horizontal-space-between --flex-vertical' ${data.title.attributes}>
9
+ ${data.title.content}
10
10
 
11
11
  ${data?.required && tooltip.onhover({ class: 'bubble --background-primary --margin-left' }, html `
12
12
  <span class='tooltip-message tooltip-message--w'>Required</span>
@@ -1,2 +1,2 @@
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),100% - var(--margin-horizontal)*2);z-index:9}.modal:not(.--active){opacity:0;pointer-events:none;transform:translateY(var(--margin-vertical))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;--translateY:var(--margin-vertical);transition:opacity var(--transition-duration)ease-in-out,transform var(--transition-duration)ease-in-out;transform-origin:50%;width:min(var(--max-width),100% - var(--margin-horizontal)*2);z-index:9}.modal:not(.--active){opacity:0;pointer-events:none;transform:translateY(var(--translateY))}.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*/
package/package.json CHANGED
@@ -47,7 +47,7 @@
47
47
  "private": false,
48
48
  "sideEffects": false,
49
49
  "type": "module",
50
- "version": "0.15.3",
50
+ "version": "0.15.5",
51
51
  "scripts": {
52
52
  "build": "run-s build:vite build:ts",
53
53
  "build:ts": "tsc && tsc-alias",
@@ -7,7 +7,7 @@ import description from './description';
7
7
  type Data = {
8
8
  class?: string;
9
9
  content?: unknown;
10
- description?: unknown;
10
+ description?: Parameters<typeof description>[0]['description'];
11
11
  mask?: Record<string, unknown>;
12
12
  name?: string;
13
13
  style?: string;
@@ -1,14 +1,14 @@
1
1
  import { html } from '@esportsplus/template';
2
2
 
3
3
 
4
- export default (data: { description?: unknown }) => {
4
+ export default (data: { description?: { attributes?: Record<string, unknown>, content: unknown; } }) => {
5
5
  if (!data?.description) {
6
6
  return '';
7
7
  }
8
8
 
9
9
  return html`
10
- <div class='field-description'>
11
- ${data.description}
10
+ <div class='field-description' ${data.description.attributes}>
11
+ ${data.description.content}
12
12
  </div>
13
13
  `;
14
14
  }
@@ -10,7 +10,7 @@ import title from './title';
10
10
  type Data = {
11
11
  accept?: string;
12
12
  class?: string;
13
- description?: unknown;
13
+ description?: Parameters<typeof description>[0]['description'];
14
14
  mask?: {
15
15
  content?: unknown;
16
16
  } & Record<string, unknown>;
@@ -19,7 +19,7 @@ type Data = {
19
19
  required?: boolean;
20
20
  style?: string;
21
21
  tag?: Record<string, unknown>;
22
- title?: unknown;
22
+ title?: Parameters<typeof title>[0]['title'];
23
23
  value?: unknown;
24
24
  } & Record<string, unknown>;
25
25
 
@@ -12,7 +12,7 @@ import title from './title';
12
12
  type Data<T extends Record<number | string, number | string>> = {
13
13
  class?: string;
14
14
  content?: unknown;
15
- description?: unknown;
15
+ description?: Parameters<typeof description>[0]['description'];
16
16
  effect?: (selected: number | string) => void;
17
17
  mask?: Record<string, unknown>;
18
18
  name?: string;
@@ -24,7 +24,7 @@ type Data<T extends Record<number | string, number | string>> = {
24
24
  style?: string;
25
25
  tag?: Record<string, unknown>;
26
26
  text?: Record<string, unknown>;
27
- title?: unknown;
27
+ title?: Parameters<typeof title>[0]['title'];
28
28
  tooltip?: {
29
29
  content?: Record<string, unknown>;
30
30
  } & Record<string, unknown>;
@@ -10,7 +10,7 @@ import title from './title';
10
10
  type Data = {
11
11
  class?: string;
12
12
  content?: unknown;
13
- description?: unknown;
13
+ description?: Parameters<typeof description>[0]['description'];
14
14
  mask?: Record<string, unknown>;
15
15
  name?: string;
16
16
  placeholder?: string;
@@ -18,7 +18,7 @@ type Data = {
18
18
  style?: string;
19
19
  tag?: Record<string, unknown>;
20
20
  textarea?: boolean;
21
- title?: unknown;
21
+ title?: Parameters<typeof title>[0]['title'];
22
22
  type?: string;
23
23
  value?: unknown;
24
24
  } & Record<string, unknown>;
@@ -2,14 +2,14 @@ import { html } from '@esportsplus/template';
2
2
  import tooltip from '~/components/tooltip';
3
3
 
4
4
 
5
- export default (data: { required?: boolean, title?: unknown }) => {
5
+ export default (data: { required?: boolean, title?: { attributes?: Record<string, unknown>, content: unknown; } }) => {
6
6
  if (!data?.title) {
7
7
  return '';
8
8
  }
9
9
 
10
10
  return html`
11
- <div class='field-title --flex-horizontal-space-between --flex-vertical'>
12
- ${data.title}
11
+ <div class='field-title --flex-horizontal-space-between --flex-vertical' ${data.title.attributes}>
12
+ ${data.title.content}
13
13
 
14
14
  ${data?.required && tooltip.onhover({ class: 'bubble --background-primary --margin-left' }, html`
15
15
  <span class='tooltip-message tooltip-message--w'>Required</span>
@@ -13,7 +13,7 @@
13
13
  @include tokens.state(inactive) {
14
14
  opacity: 0;
15
15
  pointer-events: none;
16
- transform: translateY(var(--margin-vertical)) scale(0.8);
16
+ transform: translateY(var(--translateY));
17
17
 
18
18
  input[type='password'] {
19
19
  display: none;
@@ -2,4 +2,5 @@
2
2
  --margin-horizontal: 0px;
3
3
  --margin-vertical: 0px;
4
4
  --max-width: 480px;
5
+ --translateY: var(--margin-vertical);
5
6
  }