@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
|
import form from '../form/index.js';
|
|
6
5
|
import './scss/index.scss';
|
|
7
6
|
const template_u22 = template_u0.template(`<textarea class='textarea' >`);
|
|
@@ -24,7 +23,6 @@ class ReactiveObject_1x5yfkx0 extends reactivity_u0.ReactiveObject {
|
|
|
24
23
|
reactivity_u0.write(this.#error, _v1);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
|
-
const OMIT = ['autoresize', 'state'];
|
|
28
26
|
function autoresize({ height }) {
|
|
29
27
|
let attributes = {
|
|
30
28
|
class: 'textarea--autoresize',
|
|
@@ -46,13 +44,13 @@ function autoresize({ height }) {
|
|
|
46
44
|
}
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
|
-
export default component(function (attributes) {
|
|
50
|
-
|
|
47
|
+
export default component(function ({ autoresize: resize, state = new ReactiveObject_1x5yfkx0(), ...attributes }) {
|
|
48
|
+
attributes.value ??= '';
|
|
51
49
|
return (() => {
|
|
52
50
|
let root_u21 = template_u22(), element_u23 = root_u21.firstChild;
|
|
53
|
-
template_u0.setProperties(element_u23, this?.attributes
|
|
54
|
-
template_u0.setProperties(element_u23,
|
|
55
|
-
template_u0.setProperties(element_u23,
|
|
51
|
+
template_u0.setProperties(element_u23, this?.attributes);
|
|
52
|
+
template_u0.setProperties(element_u23, attributes);
|
|
53
|
+
template_u0.setProperties(element_u23, resize && autoresize(resize));
|
|
56
54
|
template_u0.setList(element_u23, 'class', () => state.active && '--active');
|
|
57
55
|
template_u0.on(element_u23, 'focusin', () => {
|
|
58
56
|
state.active = true;
|
|
@@ -61,7 +59,6 @@ export default component(function (attributes) {
|
|
|
61
59
|
state.active = false;
|
|
62
60
|
});
|
|
63
61
|
template_u0.onrender(element_u23, form.input.onrender(state));
|
|
64
|
-
template_u0.setProperty(element_u23, 'value', attributes?.value || '');
|
|
65
62
|
return root_u21;
|
|
66
63
|
})();
|
|
67
64
|
});
|