@esportsplus/ui 0.31.2 → 0.31.4

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.
@@ -13,7 +13,14 @@ const OMIT = [
13
13
  'scrollbar-container-content',
14
14
  'tooltip-content',
15
15
  ];
16
- let field = null;
16
+ let field = null, sb = scrollbar.bind({
17
+ attributes: {
18
+ class: 'tooltip-content',
19
+ 'scrollbar-container-content': {
20
+ class: '--flex-column'
21
+ }
22
+ }
23
+ });
17
24
  function set(state, value) {
18
25
  state.active = value;
19
26
  if (state.active) {
@@ -36,7 +43,7 @@ const select = template.factory(function (attributes, content) {
36
43
  });
37
44
  return html `
38
45
  <label
39
- class='select'
46
+ class='select tooltip ${() => state.active && '--active'}'
40
47
  onclick=${() => {
41
48
  if (state.render) {
42
49
  set(state, !state.active);
@@ -67,11 +74,11 @@ const select = template.factory(function (attributes, content) {
67
74
  return;
68
75
  }
69
76
  let keys = Object.keys(options), selected = reactive(Object.fromEntries(keys.map(key => [key, false])));
70
- return scrollbar({
77
+ return sb({
71
78
  ...attributes['tooltip-content'],
72
79
  class: [
73
80
  ...toArray(attributes['tooltip-content']?.class),
74
- `tooltip-content tooltip-content--${attributes['tooltip-content']?.direction || 's'} --flex-column --width-full`
81
+ `tooltip-content--${attributes['tooltip-content']?.direction || 's'}`
75
82
  ],
76
83
  onclick: (e) => {
77
84
  let key = e?.target?.dataset?.key;
package/package.json CHANGED
@@ -48,7 +48,7 @@
48
48
  "private": false,
49
49
  "sideEffects": false,
50
50
  "type": "module",
51
- "version": "0.31.2",
51
+ "version": "0.31.4",
52
52
  "scripts": {
53
53
  "build": "run-s build:vite build:ts",
54
54
  "build:ts": "tsc && tsc-alias",
@@ -38,8 +38,15 @@ type A = {
38
38
  ) & Attributes & Attr;
39
39
 
40
40
 
41
- let field: { active: boolean } | null = null;
42
-
41
+ let field: { active: boolean } | null = null,
42
+ sb = scrollbar.bind({
43
+ attributes: {
44
+ class: 'tooltip-content',
45
+ 'scrollbar-container-content': {
46
+ class: '--flex-column'
47
+ }
48
+ }
49
+ });
43
50
 
44
51
  function set(state: { active: boolean }, value: boolean) {
45
52
  state.active = value;
@@ -70,7 +77,7 @@ const select = template.factory<A>(
70
77
 
71
78
  return html`
72
79
  <label
73
- class='select'
80
+ class='select tooltip ${() => state.active && '--active'}'
74
81
  onclick=${() => {
75
82
  if (state.render) {
76
83
  set(state, !state.active);
@@ -107,12 +114,12 @@ const select = template.factory<A>(
107
114
  Object.fromEntries( keys.map(key => [key, false]) )
108
115
  );
109
116
 
110
- return scrollbar(
117
+ return sb(
111
118
  {
112
119
  ...attributes['tooltip-content'],
113
120
  class: [
114
121
  ...toArray(attributes['tooltip-content']?.class),
115
- `tooltip-content tooltip-content--${attributes['tooltip-content']?.direction || 's'} --flex-column --width-full`
122
+ `tooltip-content--${attributes['tooltip-content']?.direction || 's'}`
116
123
  ],
117
124
  onclick: (e: Event) => {
118
125
  let key = (e?.target as HTMLElement)?.dataset?.key;