@esportsplus/ui 0.0.24 → 0.0.26

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.
@@ -91,7 +91,6 @@ declare const _default: {
91
91
  description?: string | undefined;
92
92
  } & {
93
93
  field: {
94
- active?: boolean | undefined;
95
94
  class?: string | undefined;
96
95
  mask?: {
97
96
  class?: string | undefined;
@@ -173,7 +172,6 @@ declare const _default: {
173
172
  values: never[];
174
173
  };
175
174
  text: (data: {
176
- active?: boolean | undefined;
177
175
  class?: string | undefined;
178
176
  mask?: {
179
177
  class?: string | undefined;
@@ -70,7 +70,6 @@ declare const _default: {
70
70
  description?: string | undefined;
71
71
  } & {
72
72
  field: {
73
- active?: boolean | undefined;
74
73
  class?: string | undefined;
75
74
  mask?: {
76
75
  class?: string | undefined;
@@ -18,7 +18,10 @@ function template(data, state) {
18
18
  style: data?.scrollbar?.style || '--background-default: var(--color-black-400);'
19
19
  });
20
20
  return html `
21
- <div class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'>
21
+ <div
22
+ class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'
23
+ style='${data?.tooltip?.style || ''}'
24
+ >
22
25
  <div
23
26
  class='row --flex-column'
24
27
  onclick='${(e) => {
@@ -34,10 +37,9 @@ function template(data, state) {
34
37
  data.effect(key);
35
38
  }
36
39
  }}'
37
- style='${data?.tooltip?.style || ''}'
38
40
  ${a}
39
41
  >
40
- ${Object.keys(state.options).map((key) => html `
42
+ ${Object.keys(data.options || {}).map((key) => html `
41
43
  <div
42
44
  class='link ${data?.option?.class || ''} ${() => state.options[key] ? '--active' : ''} --flex-vertical' data-key='${key}'
43
45
  style='${data?.option?.style || ''}'
@@ -1,7 +1,6 @@
1
1
  import description from './description';
2
2
  import title from './title';
3
3
  type Data = {
4
- active?: boolean;
5
4
  class?: string;
6
5
  mask?: {
7
6
  class?: string;
@@ -6,12 +6,12 @@ import error from './error';
6
6
  import title from './title';
7
7
  export default (data) => {
8
8
  let state = reactive({
9
- active: (data?.active || false),
9
+ active: false,
10
10
  error: ''
11
11
  });
12
12
  return html `
13
13
  <div
14
- class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
14
+ class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
15
15
  onfocusin='${() => {
16
16
  state.active = true;
17
17
  }}'
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "@esportsplus/action": "^0.0.31",
5
5
  "@esportsplus/delegated-events": "^0.0.16",
6
6
  "@esportsplus/reactivity": "^0.0.18",
7
- "@esportsplus/template": "^0.0.11",
7
+ "@esportsplus/template": "^0.0.13",
8
8
  "autoprefixer": "^10.4.13",
9
9
  "clean-webpack-plugin": "^4.0.0",
10
10
  "css-loader": "^6.7.3",
@@ -37,5 +37,5 @@
37
37
  "prepublishOnly": "npm run build"
38
38
  },
39
39
  "types": "./build/index.d.ts",
40
- "version": "0.0.24"
40
+ "version": "0.0.26"
41
41
  }
@@ -55,7 +55,10 @@ function template(data: Data, state: { active: boolean, options: Record<number |
55
55
  });
56
56
 
57
57
  return html`
58
- <div class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'>
58
+ <div
59
+ class='tooltip-content tooltip-content--${data?.tooltip?.direction || 's'} ${data?.tooltip?.class || ''} --flex-column --width-full'
60
+ style='${data?.tooltip?.style || ''}'
61
+ >
59
62
  <div
60
63
  class='row --flex-column'
61
64
  onclick='${(e: Event) => {
@@ -76,10 +79,9 @@ function template(data: Data, state: { active: boolean, options: Record<number |
76
79
  data.effect(key);
77
80
  }
78
81
  }}'
79
- style='${data?.tooltip?.style || ''}'
80
82
  ${a}
81
83
  >
82
- ${Object.keys( state.options ).map((key: number | string) => html`
84
+ ${Object.keys( data.options || {} ).map((key: number | string) => html`
83
85
  <div
84
86
  class='link ${data?.option?.class || ''} ${() => state.options[key] ? '--active' : ''} --flex-vertical' data-key='${key}'
85
87
  style='${data?.option?.style || ''}'
@@ -7,7 +7,6 @@ import title from './title';
7
7
 
8
8
 
9
9
  type Data = {
10
- active?: boolean;
11
10
  class?: string;
12
11
  mask?: {
13
12
  class?: string;
@@ -24,13 +23,13 @@ type Data = {
24
23
 
25
24
  export default (data: Data) => {
26
25
  let state = reactive({
27
- active: (data?.active || false),
26
+ active: false,
28
27
  error: ''
29
28
  });
30
29
 
31
30
  return html`
32
31
  <div
33
- class="field --flex-column ${data?.class || ''} ${() => state.active ? '--active' : ''}"
32
+ class="field ${data?.class || ''} ${() => state.active ? '--active' : ''} --flex-column"
34
33
  onfocusin='${() => {
35
34
  state.active = true;
36
35
  }}'