@esportsplus/ui 0.54.0 → 0.55.0
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.
- package/build/components/accordion/index.d.ts +713 -5
- package/build/components/accordion/index.js +16 -5
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/checkbox/constants.d.ts +2 -0
- package/build/components/checkbox/constants.js +2 -0
- package/build/components/checkbox/index.d.ts +17 -11
- package/build/components/checkbox/index.js +22 -36
- package/build/components/clipboard/copy.d.ts +1 -1
- package/build/components/clipboard/copy.js +12 -7
- package/build/components/clipboard/index.d.ts +981 -981
- package/build/components/clipboard/onclick.js +4 -6
- package/build/components/counter/index.d.ts +1 -1
- package/build/components/counter/index.js +4 -8
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +2 -5
- package/build/components/form/index.d.ts +1 -1
- package/build/components/input/index.d.ts +1 -1
- package/build/components/input/index.js +2 -3
- package/build/components/radio/index.d.ts +3 -1442
- package/build/components/radio/index.js +2 -1
- package/build/components/select/constants.d.ts +4 -0
- package/build/components/select/constants.js +4 -0
- package/build/components/select/index.d.ts +12 -6
- package/build/components/select/index.js +43 -60
- package/build/components/switch/index.d.ts +3 -1442
- package/build/components/switch/index.js +2 -1
- package/build/components/textarea/index.d.ts +490 -490
- package/build/components/textarea/index.js +5 -8
- package/build/components/tooltip/constants.d.ts +3 -0
- package/build/components/tooltip/constants.js +3 -0
- package/build/components/tooltip/index.d.ts +8 -2153
- package/build/components/tooltip/index.js +2 -1
- package/build/components/tooltip/menu.d.ts +9 -5
- package/build/components/tooltip/menu.js +14 -17
- package/build/components/tooltip/onclick.d.ts +490 -490
- package/build/components/tooltip/onclick.js +17 -23
- package/build/components/tooltip/onhover.d.ts +497 -494
- package/build/components/tooltip/onhover.js +12 -17
- package/build/themes/dark/input.d.ts +491 -491
- package/build/themes/dark/select.d.ts +3 -735
- package/build/themes/dark/select.js +5 -4
- package/build/themes/dark/textarea.d.ts +490 -490
- package/package.json +2 -2
- package/pnpm-workspace.yaml +1 -1
- package/src/components/accordion/index.ts +7 -14
- package/src/components/accordion/scss/index.scss +3 -1
- package/src/components/checkbox/constants.ts +4 -0
- package/src/components/checkbox/index.ts +12 -23
- package/src/components/clipboard/copy.ts +7 -12
- package/src/components/clipboard/onclick.ts +4 -9
- package/src/components/counter/index.ts +5 -14
- package/src/components/form/action.ts +2 -8
- package/src/components/input/index.ts +7 -5
- package/src/components/radio/index.ts +5 -2
- package/src/components/select/constants.ts +8 -0
- package/src/components/select/index.ts +49 -53
- package/src/components/switch/index.ts +5 -2
- package/src/components/textarea/index.ts +13 -14
- package/src/components/tooltip/constants.ts +6 -0
- package/src/components/tooltip/index.ts +4 -1
- package/src/components/tooltip/menu.ts +18 -29
- package/src/components/tooltip/onclick.ts +22 -33
- package/src/components/tooltip/onhover.ts +18 -29
- package/src/themes/dark/select.ts +7 -4
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as template_u0 from '@esportsplus/template';
|
|
2
2
|
import { component } from '@esportsplus/template';
|
|
3
3
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
|
-
import { omit } from '@esportsplus/utilities';
|
|
5
4
|
const template_u2z = template_u0.template(`<div class='tooltip' >`);
|
|
6
5
|
class ReactiveObject_0p6u8350 extends reactivity_u0.ReactiveObject {
|
|
7
6
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
@@ -15,26 +14,21 @@ class ReactiveObject_0p6u8350 extends reactivity_u0.ReactiveObject {
|
|
|
15
14
|
reactivity_u0.write(this.#active, _v0);
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
template_u0.onrender(element_u30, (element) => ref = element);
|
|
37
|
-
template_u0.slot(element_u30, content, 1);
|
|
38
|
-
return root_u2y;
|
|
39
|
-
})();
|
|
17
|
+
export default component(({ state = new ReactiveObject_0p6u8350(), toggle = false, ...attributes }, content) => {
|
|
18
|
+
let root_u2y = template_u2z(), element_u30 = root_u2y.firstChild;
|
|
19
|
+
template_u0.setProperties(element_u30, attributes);
|
|
20
|
+
template_u0.setList(element_u30, 'class', () => state.active && '--active');
|
|
21
|
+
template_u0.delegate(element_u30, 'click', function (e) {
|
|
22
|
+
state.active = this === e.target || toggle ? !state.active : true;
|
|
23
|
+
});
|
|
24
|
+
template_u0.ondocument(element_u30, 'click', function (event) {
|
|
25
|
+
if (!this?.isConnected || !state.active) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!this.contains(event.target)) {
|
|
29
|
+
state.active = false;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
template_u0.slot(element_u30, content, 1);
|
|
33
|
+
return root_u2y;
|
|
40
34
|
});
|