@lynx-js/web-elements-canary 0.9.0 → 0.9.1-canary-20251223-71b9083d

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +21 -7
  2. package/dist/ScrollView/FadeEdgeLengthAttribute.d.ts +2 -0
  3. package/dist/ScrollView/FadeEdgeLengthAttribute.js +15 -16
  4. package/dist/ScrollView/ScrollAttributes.d.ts +2 -0
  5. package/dist/ScrollView/ScrollAttributes.js +52 -54
  6. package/dist/ScrollView/ScrollViewEvents.d.ts +6 -0
  7. package/dist/ScrollView/ScrollViewEvents.js +41 -41
  8. package/dist/XAudioTT/XAudioAttribute.d.ts +3 -0
  9. package/dist/XAudioTT/XAudioAttribute.js +57 -60
  10. package/dist/XFoldViewNg/XFoldviewNgEvents.d.ts +2 -0
  11. package/dist/XFoldViewNg/XFoldviewNgEvents.js +23 -25
  12. package/dist/XFoldViewNg/XFoldviewSlotNgTouchEventsHandler.js +0 -1
  13. package/dist/XImage/DropShadow.d.ts +1 -0
  14. package/dist/XImage/DropShadow.js +7 -7
  15. package/dist/XImage/ImageEvents.d.ts +2 -0
  16. package/dist/XImage/ImageEvents.js +27 -29
  17. package/dist/XImage/ImageSrc.d.ts +5 -0
  18. package/dist/XImage/ImageSrc.js +35 -36
  19. package/dist/XInput/InputBaseAttributes.d.ts +5 -0
  20. package/dist/XInput/InputBaseAttributes.js +56 -58
  21. package/dist/XInput/Placeholder.d.ts +5 -0
  22. package/dist/XInput/Placeholder.js +31 -31
  23. package/dist/XInput/XInputAttribute.d.ts +3 -0
  24. package/dist/XInput/XInputAttribute.js +31 -32
  25. package/dist/XInput/XInputEvents.d.ts +3 -0
  26. package/dist/XInput/XInputEvents.js +34 -37
  27. package/dist/XList/ListItemAttributes.d.ts +1 -0
  28. package/dist/XList/ListItemAttributes.js +8 -9
  29. package/dist/XList/XListAttributes.d.ts +2 -0
  30. package/dist/XList/XListAttributes.js +13 -13
  31. package/dist/XList/XListEvents.d.ts +7 -0
  32. package/dist/XList/XListEvents.js +76 -78
  33. package/dist/XList/XListWaterfall.d.ts +2 -0
  34. package/dist/XList/XListWaterfall.js +66 -68
  35. package/dist/XOverlayNg/XOverlayAttributes.d.ts +2 -0
  36. package/dist/XOverlayNg/XOverlayAttributes.js +32 -34
  37. package/dist/XRefreshView/XRefreshViewEventsEmitter.d.ts +2 -0
  38. package/dist/XRefreshView/XRefreshViewEventsEmitter.js +34 -37
  39. package/dist/XSvg/XSvg.d.ts +3 -0
  40. package/dist/XSvg/XSvg.js +42 -45
  41. package/dist/XSwiper/XSwiperAutoScroll.d.ts +2 -0
  42. package/dist/XSwiper/XSwiperAutoScroll.js +23 -25
  43. package/dist/XSwiper/XSwiperCircular.d.ts +2 -0
  44. package/dist/XSwiper/XSwiperCircular.js +23 -25
  45. package/dist/XSwiper/XSwiperEvents.d.ts +2 -0
  46. package/dist/XSwiper/XSwiperEvents.js +19 -20
  47. package/dist/XSwiper/XSwiperIndicator.d.ts +5 -0
  48. package/dist/XSwiper/XSwiperIndicator.js +31 -31
  49. package/dist/XText/InlineImage.d.ts +1 -0
  50. package/dist/XText/InlineImage.js +10 -11
  51. package/dist/XText/RawText.d.ts +1 -0
  52. package/dist/XText/RawText.js +11 -12
  53. package/dist/XText/XTextTruncation.d.ts +2 -0
  54. package/dist/XText/XTextTruncation.js +29 -31
  55. package/dist/XTextarea/Placeholder.d.ts +5 -0
  56. package/dist/XTextarea/Placeholder.js +31 -31
  57. package/dist/XTextarea/TextareaBaseAttributes.d.ts +5 -0
  58. package/dist/XTextarea/TextareaBaseAttributes.js +31 -31
  59. package/dist/XTextarea/XTextareaAttributes.d.ts +5 -0
  60. package/dist/XTextarea/XTextareaAttributes.js +43 -45
  61. package/dist/XTextarea/XTextareaEvents.d.ts +3 -0
  62. package/dist/XTextarea/XTextareaEvents.js +34 -37
  63. package/dist/XView/BlurRadius.d.ts +1 -0
  64. package/dist/XView/BlurRadius.js +14 -15
  65. package/dist/XViewpagerNg/XViewpagerNgEvents.d.ts +2 -0
  66. package/dist/XViewpagerNg/XViewpagerNgEvents.js +15 -17
  67. package/dist/common/CommonEventsAndMethods.d.ts +1 -0
  68. package/dist/common/CommonEventsAndMethods.js +5 -1
  69. package/elements.css +18 -0
  70. package/index.css +1 -14
  71. package/package.json +21 -2
@@ -6,34 +6,34 @@ import { __esDecorate, __runInitializers } from "tslib";
6
6
  */
7
7
  import { bindToAttribute, genDomGetter, registerAttributeHandler, } from '@lynx-js/web-elements-reactive';
8
8
  let TextareaBaseAttributes = (() => {
9
- let _private_handlerConfirmType_decorators;
10
- let _private_handlerConfirmType_initializers = [];
11
- let _private_handlerConfirmType_extraInitializers = [];
12
- let _private_handlerMaxlength_decorators;
13
- let _private_handlerMaxlength_initializers = [];
14
- let _private_handlerMaxlength_extraInitializers = [];
15
- let _private_handleReadonly_decorators;
16
- let _private_handleReadonly_initializers = [];
17
- let _private_handleReadonly_extraInitializers = [];
18
- let _private_handleSpellCheck_decorators;
19
- let _private_handleSpellCheck_initializers = [];
20
- let _private_handleSpellCheck_extraInitializers = [];
21
- let _private_handleShowSoftInputOnfocus_decorators;
22
- let _private_handleShowSoftInputOnfocus_initializers = [];
23
- let _private_handleShowSoftInputOnfocus_extraInitializers = [];
9
+ let __handlerConfirmType_decorators;
10
+ let __handlerConfirmType_initializers = [];
11
+ let __handlerConfirmType_extraInitializers = [];
12
+ let __handlerMaxlength_decorators;
13
+ let __handlerMaxlength_initializers = [];
14
+ let __handlerMaxlength_extraInitializers = [];
15
+ let __handleReadonly_decorators;
16
+ let __handleReadonly_initializers = [];
17
+ let __handleReadonly_extraInitializers = [];
18
+ let __handleSpellCheck_decorators;
19
+ let __handleSpellCheck_initializers = [];
20
+ let __handleSpellCheck_extraInitializers = [];
21
+ let __handleShowSoftInputOnfocus_decorators;
22
+ let __handleShowSoftInputOnfocus_initializers = [];
23
+ let __handleShowSoftInputOnfocus_extraInitializers = [];
24
24
  return class TextareaBaseAttributes {
25
25
  static {
26
26
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
27
- _private_handlerConfirmType_decorators = [registerAttributeHandler('confirm-type', true)];
28
- _private_handlerMaxlength_decorators = [registerAttributeHandler('maxlength', true)];
29
- _private_handleReadonly_decorators = [registerAttributeHandler('readonly', true)];
30
- _private_handleSpellCheck_decorators = [registerAttributeHandler('ios-spell-check', true)];
31
- _private_handleShowSoftInputOnfocus_decorators = [registerAttributeHandler('show-soft-input-onfocus', true)];
32
- __esDecorate(null, null, _private_handlerConfirmType_decorators, { kind: "field", name: "#handlerConfirmType", static: false, private: true, access: { has: obj => #handlerConfirmType in obj, get: obj => obj.#handlerConfirmType, set: (obj, value) => { obj.#handlerConfirmType = value; } }, metadata: _metadata }, _private_handlerConfirmType_initializers, _private_handlerConfirmType_extraInitializers);
33
- __esDecorate(null, null, _private_handlerMaxlength_decorators, { kind: "field", name: "#handlerMaxlength", static: false, private: true, access: { has: obj => #handlerMaxlength in obj, get: obj => obj.#handlerMaxlength, set: (obj, value) => { obj.#handlerMaxlength = value; } }, metadata: _metadata }, _private_handlerMaxlength_initializers, _private_handlerMaxlength_extraInitializers);
34
- __esDecorate(null, null, _private_handleReadonly_decorators, { kind: "field", name: "#handleReadonly", static: false, private: true, access: { has: obj => #handleReadonly in obj, get: obj => obj.#handleReadonly, set: (obj, value) => { obj.#handleReadonly = value; } }, metadata: _metadata }, _private_handleReadonly_initializers, _private_handleReadonly_extraInitializers);
35
- __esDecorate(null, null, _private_handleSpellCheck_decorators, { kind: "field", name: "#handleSpellCheck", static: false, private: true, access: { has: obj => #handleSpellCheck in obj, get: obj => obj.#handleSpellCheck, set: (obj, value) => { obj.#handleSpellCheck = value; } }, metadata: _metadata }, _private_handleSpellCheck_initializers, _private_handleSpellCheck_extraInitializers);
36
- __esDecorate(null, null, _private_handleShowSoftInputOnfocus_decorators, { kind: "field", name: "#handleShowSoftInputOnfocus", static: false, private: true, access: { has: obj => #handleShowSoftInputOnfocus in obj, get: obj => obj.#handleShowSoftInputOnfocus, set: (obj, value) => { obj.#handleShowSoftInputOnfocus = value; } }, metadata: _metadata }, _private_handleShowSoftInputOnfocus_initializers, _private_handleShowSoftInputOnfocus_extraInitializers);
27
+ __handlerConfirmType_decorators = [registerAttributeHandler('confirm-type', true)];
28
+ __handlerMaxlength_decorators = [registerAttributeHandler('maxlength', true)];
29
+ __handleReadonly_decorators = [registerAttributeHandler('readonly', true)];
30
+ __handleSpellCheck_decorators = [registerAttributeHandler('ios-spell-check', true)];
31
+ __handleShowSoftInputOnfocus_decorators = [registerAttributeHandler('show-soft-input-onfocus', true)];
32
+ __esDecorate(null, null, __handlerConfirmType_decorators, { kind: "field", name: "_handlerConfirmType", static: false, private: false, access: { has: obj => "_handlerConfirmType" in obj, get: obj => obj._handlerConfirmType, set: (obj, value) => { obj._handlerConfirmType = value; } }, metadata: _metadata }, __handlerConfirmType_initializers, __handlerConfirmType_extraInitializers);
33
+ __esDecorate(null, null, __handlerMaxlength_decorators, { kind: "field", name: "_handlerMaxlength", static: false, private: false, access: { has: obj => "_handlerMaxlength" in obj, get: obj => obj._handlerMaxlength, set: (obj, value) => { obj._handlerMaxlength = value; } }, metadata: _metadata }, __handlerMaxlength_initializers, __handlerMaxlength_extraInitializers);
34
+ __esDecorate(null, null, __handleReadonly_decorators, { kind: "field", name: "_handleReadonly", static: false, private: false, access: { has: obj => "_handleReadonly" in obj, get: obj => obj._handleReadonly, set: (obj, value) => { obj._handleReadonly = value; } }, metadata: _metadata }, __handleReadonly_initializers, __handleReadonly_extraInitializers);
35
+ __esDecorate(null, null, __handleSpellCheck_decorators, { kind: "field", name: "_handleSpellCheck", static: false, private: false, access: { has: obj => "_handleSpellCheck" in obj, get: obj => obj._handleSpellCheck, set: (obj, value) => { obj._handleSpellCheck = value; } }, metadata: _metadata }, __handleSpellCheck_initializers, __handleSpellCheck_extraInitializers);
36
+ __esDecorate(null, null, __handleShowSoftInputOnfocus_decorators, { kind: "field", name: "_handleShowSoftInputOnfocus", static: false, private: false, access: { has: obj => "_handleShowSoftInputOnfocus" in obj, get: obj => obj._handleShowSoftInputOnfocus, set: (obj, value) => { obj._handleShowSoftInputOnfocus = value; } }, metadata: _metadata }, __handleShowSoftInputOnfocus_initializers, __handleShowSoftInputOnfocus_extraInitializers);
37
37
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
38
38
  }
39
39
  static observedAttributes = [
@@ -47,21 +47,21 @@ let TextareaBaseAttributes = (() => {
47
47
  ];
48
48
  #dom;
49
49
  #getTextareaElement = genDomGetter(() => this.#dom.shadowRoot, '#textarea');
50
- #handlerConfirmType = __runInitializers(this, _private_handlerConfirmType_initializers, bindToAttribute(this.#getTextareaElement, 'enterkeyhint', (val) => {
50
+ _handlerConfirmType = __runInitializers(this, __handlerConfirmType_initializers, bindToAttribute(this.#getTextareaElement, 'enterkeyhint', (val) => {
51
51
  if (val === null)
52
52
  return 'send';
53
53
  return val;
54
54
  }));
55
- #handlerMaxlength = (__runInitializers(this, _private_handlerConfirmType_extraInitializers), __runInitializers(this, _private_handlerMaxlength_initializers, bindToAttribute(this.#getTextareaElement, 'maxlength', (val) => {
55
+ _handlerMaxlength = (__runInitializers(this, __handlerConfirmType_extraInitializers), __runInitializers(this, __handlerMaxlength_initializers, bindToAttribute(this.#getTextareaElement, 'maxlength', (val) => {
56
56
  if (val === null)
57
57
  return '140';
58
58
  return val;
59
59
  })));
60
- #handleReadonly = (__runInitializers(this, _private_handlerMaxlength_extraInitializers), __runInitializers(this, _private_handleReadonly_initializers, bindToAttribute(this.#getTextareaElement, 'readonly', (value) => (value !== null ? '' : null))));
61
- #handleSpellCheck = (__runInitializers(this, _private_handleReadonly_extraInitializers), __runInitializers(this, _private_handleSpellCheck_initializers, bindToAttribute(this.#getTextareaElement, 'spellcheck', (value) => (value === null ? 'false' : 'true'))));
62
- #handleShowSoftInputOnfocus = (__runInitializers(this, _private_handleSpellCheck_extraInitializers), __runInitializers(this, _private_handleShowSoftInputOnfocus_initializers, bindToAttribute(this.#getTextareaElement, 'virtualkeyboardpolicy', (value) => (value === null ? 'manual' : 'auto'))));
60
+ _handleReadonly = (__runInitializers(this, __handlerMaxlength_extraInitializers), __runInitializers(this, __handleReadonly_initializers, bindToAttribute(this.#getTextareaElement, 'readonly', (value) => (value !== null ? '' : null))));
61
+ _handleSpellCheck = (__runInitializers(this, __handleReadonly_extraInitializers), __runInitializers(this, __handleSpellCheck_initializers, bindToAttribute(this.#getTextareaElement, 'spellcheck', (value) => (value === null ? 'false' : 'true'))));
62
+ _handleShowSoftInputOnfocus = (__runInitializers(this, __handleSpellCheck_extraInitializers), __runInitializers(this, __handleShowSoftInputOnfocus_initializers, bindToAttribute(this.#getTextareaElement, 'virtualkeyboardpolicy', (value) => (value === null ? 'manual' : 'auto'))));
63
63
  constructor(dom) {
64
- __runInitializers(this, _private_handleShowSoftInputOnfocus_extraInitializers);
64
+ __runInitializers(this, __handleShowSoftInputOnfocus_extraInitializers);
65
65
  this.#dom = dom;
66
66
  }
67
67
  };
@@ -2,5 +2,10 @@ import { type AttributeReactiveClass } from '@lynx-js/web-elements-reactive';
2
2
  export declare class XTextareaAttributes implements InstanceType<AttributeReactiveClass<typeof HTMLElement>> {
3
3
  #private;
4
4
  static observedAttributes: string[];
5
+ _handleConfirmEnter(newVal: string | null): void;
6
+ _handleDisabled: (this: void, newVal: string | null) => void;
7
+ _handleMaxHeight: (this: void, newVal: string | null) => void;
8
+ _handleMinHeight: (this: void, newVal: string | null) => void;
9
+ _handleValue(newValue: string | null): void;
5
10
  constructor(dom: HTMLElement);
6
11
  }
@@ -1,4 +1,4 @@
1
- import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
2
  /*
3
3
  // Copyright 2024 The Lynx Authors. All rights reserved.
4
4
  // Licensed under the Apache License Version 2.0 that can be found in the
@@ -7,47 +7,30 @@ import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
7
7
  import { bindToAttribute, genDomGetter, registerAttributeHandler, bindToStyle, } from '@lynx-js/web-elements-reactive';
8
8
  let XTextareaAttributes = (() => {
9
9
  let _instanceExtraInitializers = [];
10
- let _private_handleConfirmEnter_decorators;
11
- let _private_handleConfirmEnter_descriptor;
12
- let _private_handleDisabled_decorators;
13
- let _private_handleDisabled_initializers = [];
14
- let _private_handleDisabled_extraInitializers = [];
15
- let _private_handleMaxHeight_decorators;
16
- let _private_handleMaxHeight_initializers = [];
17
- let _private_handleMaxHeight_extraInitializers = [];
18
- let _private_handleMinHeight_decorators;
19
- let _private_handleMinHeight_initializers = [];
20
- let _private_handleMinHeight_extraInitializers = [];
21
- let _private_handleValue_decorators;
22
- let _private_handleValue_descriptor;
10
+ let __handleConfirmEnter_decorators;
11
+ let __handleDisabled_decorators;
12
+ let __handleDisabled_initializers = [];
13
+ let __handleDisabled_extraInitializers = [];
14
+ let __handleMaxHeight_decorators;
15
+ let __handleMaxHeight_initializers = [];
16
+ let __handleMaxHeight_extraInitializers = [];
17
+ let __handleMinHeight_decorators;
18
+ let __handleMinHeight_initializers = [];
19
+ let __handleMinHeight_extraInitializers = [];
20
+ let __handleValue_decorators;
23
21
  return class XTextareaAttributes {
24
22
  static {
25
23
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
26
- _private_handleConfirmEnter_decorators = [registerAttributeHandler('confirm-enter', true)];
27
- _private_handleDisabled_decorators = [registerAttributeHandler('disabled', true)];
28
- _private_handleMaxHeight_decorators = [registerAttributeHandler('max-height', true)];
29
- _private_handleMinHeight_decorators = [registerAttributeHandler('min-height', true)];
30
- _private_handleValue_decorators = [registerAttributeHandler('value', false)];
31
- __esDecorate(this, _private_handleConfirmEnter_descriptor = { value: __setFunctionName(function (newVal) {
32
- this.#confirmEnter = newVal !== null;
33
- }, "#handleConfirmEnter") }, _private_handleConfirmEnter_decorators, { kind: "method", name: "#handleConfirmEnter", static: false, private: true, access: { has: obj => #handleConfirmEnter in obj, get: obj => obj.#handleConfirmEnter }, metadata: _metadata }, null, _instanceExtraInitializers);
34
- __esDecorate(this, _private_handleValue_descriptor = { value: __setFunctionName(function (newValue) {
35
- if (newValue) {
36
- const maxlength = parseFloat(this.#dom.getAttribute('maxlength') ?? '');
37
- if (!isNaN(maxlength))
38
- newValue = newValue.substring(0, maxlength);
39
- }
40
- else {
41
- newValue = '';
42
- }
43
- const textarea = this.#getTextareaElement();
44
- if (textarea.value !== newValue) {
45
- textarea.value = newValue;
46
- }
47
- }, "#handleValue") }, _private_handleValue_decorators, { kind: "method", name: "#handleValue", static: false, private: true, access: { has: obj => #handleValue in obj, get: obj => obj.#handleValue }, metadata: _metadata }, null, _instanceExtraInitializers);
48
- __esDecorate(null, null, _private_handleDisabled_decorators, { kind: "field", name: "#handleDisabled", static: false, private: true, access: { has: obj => #handleDisabled in obj, get: obj => obj.#handleDisabled, set: (obj, value) => { obj.#handleDisabled = value; } }, metadata: _metadata }, _private_handleDisabled_initializers, _private_handleDisabled_extraInitializers);
49
- __esDecorate(null, null, _private_handleMaxHeight_decorators, { kind: "field", name: "#handleMaxHeight", static: false, private: true, access: { has: obj => #handleMaxHeight in obj, get: obj => obj.#handleMaxHeight, set: (obj, value) => { obj.#handleMaxHeight = value; } }, metadata: _metadata }, _private_handleMaxHeight_initializers, _private_handleMaxHeight_extraInitializers);
50
- __esDecorate(null, null, _private_handleMinHeight_decorators, { kind: "field", name: "#handleMinHeight", static: false, private: true, access: { has: obj => #handleMinHeight in obj, get: obj => obj.#handleMinHeight, set: (obj, value) => { obj.#handleMinHeight = value; } }, metadata: _metadata }, _private_handleMinHeight_initializers, _private_handleMinHeight_extraInitializers);
24
+ __handleConfirmEnter_decorators = [registerAttributeHandler('confirm-enter', true)];
25
+ __handleDisabled_decorators = [registerAttributeHandler('disabled', true)];
26
+ __handleMaxHeight_decorators = [registerAttributeHandler('max-height', true)];
27
+ __handleMinHeight_decorators = [registerAttributeHandler('min-height', true)];
28
+ __handleValue_decorators = [registerAttributeHandler('value', false)];
29
+ __esDecorate(this, null, __handleConfirmEnter_decorators, { kind: "method", name: "_handleConfirmEnter", static: false, private: false, access: { has: obj => "_handleConfirmEnter" in obj, get: obj => obj._handleConfirmEnter }, metadata: _metadata }, null, _instanceExtraInitializers);
30
+ __esDecorate(this, null, __handleValue_decorators, { kind: "method", name: "_handleValue", static: false, private: false, access: { has: obj => "_handleValue" in obj, get: obj => obj._handleValue }, metadata: _metadata }, null, _instanceExtraInitializers);
31
+ __esDecorate(null, null, __handleDisabled_decorators, { kind: "field", name: "_handleDisabled", static: false, private: false, access: { has: obj => "_handleDisabled" in obj, get: obj => obj._handleDisabled, set: (obj, value) => { obj._handleDisabled = value; } }, metadata: _metadata }, __handleDisabled_initializers, __handleDisabled_extraInitializers);
32
+ __esDecorate(null, null, __handleMaxHeight_decorators, { kind: "field", name: "_handleMaxHeight", static: false, private: false, access: { has: obj => "_handleMaxHeight" in obj, get: obj => obj._handleMaxHeight, set: (obj, value) => { obj._handleMaxHeight = value; } }, metadata: _metadata }, __handleMaxHeight_initializers, __handleMaxHeight_extraInitializers);
33
+ __esDecorate(null, null, __handleMinHeight_decorators, { kind: "field", name: "_handleMinHeight", static: false, private: false, access: { has: obj => "_handleMinHeight" in obj, get: obj => obj._handleMinHeight, set: (obj, value) => { obj._handleMinHeight = value; } }, metadata: _metadata }, __handleMinHeight_initializers, __handleMinHeight_extraInitializers);
51
34
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
52
35
  }
53
36
  static observedAttributes = [
@@ -61,12 +44,27 @@ let XTextareaAttributes = (() => {
61
44
  #getTextareaElement = genDomGetter(() => this.#dom.shadowRoot, '#textarea');
62
45
  #getFormElement = genDomGetter(() => this.#dom.shadowRoot, '#form');
63
46
  #confirmEnter = false;
64
- get #handleConfirmEnter() { return _private_handleConfirmEnter_descriptor.value; }
65
- #handleDisabled = __runInitializers(this, _private_handleDisabled_initializers, bindToAttribute(this.#getTextareaElement, 'disabled', (value) => (value !== null ? '' : null)));
66
- #handleMaxHeight = (__runInitializers(this, _private_handleDisabled_extraInitializers), __runInitializers(this, _private_handleMaxHeight_initializers, bindToStyle(this.#getTextareaElement, 'max-height')));
67
- #handleMinHeight = (__runInitializers(this, _private_handleMaxHeight_extraInitializers), __runInitializers(this, _private_handleMinHeight_initializers, bindToStyle(this.#getTextareaElement, 'min-height')));
68
- get #handleValue() { return _private_handleValue_descriptor.value; }
69
- #handleKeyEvent = (__runInitializers(this, _private_handleMinHeight_extraInitializers), (event) => {
47
+ _handleConfirmEnter(newVal) {
48
+ this.#confirmEnter = newVal !== null;
49
+ }
50
+ _handleDisabled = __runInitializers(this, __handleDisabled_initializers, bindToAttribute(this.#getTextareaElement, 'disabled', (value) => (value !== null ? '' : null)));
51
+ _handleMaxHeight = (__runInitializers(this, __handleDisabled_extraInitializers), __runInitializers(this, __handleMaxHeight_initializers, bindToStyle(this.#getTextareaElement, 'max-height')));
52
+ _handleMinHeight = (__runInitializers(this, __handleMaxHeight_extraInitializers), __runInitializers(this, __handleMinHeight_initializers, bindToStyle(this.#getTextareaElement, 'min-height')));
53
+ _handleValue(newValue) {
54
+ if (newValue) {
55
+ const maxlength = parseFloat(this.#dom.getAttribute('maxlength') ?? '');
56
+ if (!isNaN(maxlength))
57
+ newValue = newValue.substring(0, maxlength);
58
+ }
59
+ else {
60
+ newValue = '';
61
+ }
62
+ const textarea = this.#getTextareaElement();
63
+ if (textarea.value !== newValue) {
64
+ textarea.value = newValue;
65
+ }
66
+ }
67
+ #handleKeyEvent = (__runInitializers(this, __handleMinHeight_extraInitializers), (event) => {
70
68
  if (this.#confirmEnter && event.key === 'Enter') {
71
69
  this.#getFormElement().dispatchEvent(new SubmitEvent('submit'));
72
70
  }
@@ -2,5 +2,8 @@ import { type AttributeReactiveClass } from '@lynx-js/web-elements-reactive';
2
2
  export declare class XTextareaEvents implements InstanceType<AttributeReactiveClass<typeof HTMLElement>> {
3
3
  #private;
4
4
  static observedAttributes: string[];
5
+ _handleEnableConfirmEvent(status: string | boolean | null): void;
6
+ _handleSendComposingInput(newVal: string | null): void;
7
+ _handleEnableSelectionEvent(status: boolean): void;
5
8
  constructor(dom: HTMLElement);
6
9
  }
@@ -1,4 +1,4 @@
1
- import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
2
  /*
3
3
  // Copyright 2024 The Lynx Authors. All rights reserved.
4
4
  // Licensed under the Apache License Version 2.0 that can be found in the
@@ -10,42 +10,18 @@ import { renameEvent } from '../common/renameEvent.js';
10
10
  import { registerEventEnableStatusChangeHandler } from '@lynx-js/web-elements-reactive';
11
11
  let XTextareaEvents = (() => {
12
12
  let _instanceExtraInitializers = [];
13
- let _private_handleEnableConfirmEvent_decorators;
14
- let _private_handleEnableConfirmEvent_descriptor;
15
- let _private_handleSendComposingInput_decorators;
16
- let _private_handleSendComposingInput_descriptor;
17
- let _private_handleEnableSelectionEvent_decorators;
18
- let _private_handleEnableSelectionEvent_descriptor;
13
+ let __handleEnableConfirmEvent_decorators;
14
+ let __handleSendComposingInput_decorators;
15
+ let __handleEnableSelectionEvent_decorators;
19
16
  return class XTextareaEvents {
20
17
  static {
21
18
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
22
- _private_handleEnableConfirmEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('lynxinput')];
23
- _private_handleSendComposingInput_decorators = [registerAttributeHandler('send-composing-input', true)];
24
- _private_handleEnableSelectionEvent_decorators = [registerEventEnableStatusChangeHandler('selection')];
25
- __esDecorate(this, _private_handleEnableConfirmEvent_descriptor = { value: __setFunctionName(function (status) {
26
- const textareaElement = this.#getTextareaElement();
27
- if (status) {
28
- textareaElement.addEventListener('input', this.#teleportInput, { passive: true });
29
- textareaElement.addEventListener('compositionend', this.#teleportCompositionendInput, { passive: true });
30
- }
31
- else {
32
- textareaElement.removeEventListener('input', this.#teleportInput);
33
- textareaElement.removeEventListener('compositionend', this.#teleportCompositionendInput);
34
- }
35
- }, "#handleEnableConfirmEvent") }, _private_handleEnableConfirmEvent_decorators, { kind: "method", name: "#handleEnableConfirmEvent", static: false, private: true, access: { has: obj => #handleEnableConfirmEvent in obj, get: obj => obj.#handleEnableConfirmEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
36
- __esDecorate(this, _private_handleSendComposingInput_descriptor = { value: __setFunctionName(function (newVal) {
37
- this.#sendComposingInput = newVal !== null;
38
- }, "#handleSendComposingInput") }, _private_handleSendComposingInput_decorators, { kind: "method", name: "#handleSendComposingInput", static: false, private: true, access: { has: obj => #handleSendComposingInput in obj, get: obj => obj.#handleSendComposingInput }, metadata: _metadata }, null, _instanceExtraInitializers);
39
- __esDecorate(this, _private_handleEnableSelectionEvent_descriptor = { value: __setFunctionName(function (status) {
40
- if (status) {
41
- this.#getTextareaElement().addEventListener('select', this.#selectEvent, {
42
- passive: true,
43
- });
44
- }
45
- else {
46
- this.#getTextareaElement().removeEventListener('select', this.#selectEvent);
47
- }
48
- }, "#handleEnableSelectionEvent") }, _private_handleEnableSelectionEvent_decorators, { kind: "method", name: "#handleEnableSelectionEvent", static: false, private: true, access: { has: obj => #handleEnableSelectionEvent in obj, get: obj => obj.#handleEnableSelectionEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
19
+ __handleEnableConfirmEvent_decorators = [registerAttributeHandler('input-filter', true), registerEventEnableStatusChangeHandler('lynxinput')];
20
+ __handleSendComposingInput_decorators = [registerAttributeHandler('send-composing-input', true)];
21
+ __handleEnableSelectionEvent_decorators = [registerEventEnableStatusChangeHandler('selection')];
22
+ __esDecorate(this, null, __handleEnableConfirmEvent_decorators, { kind: "method", name: "_handleEnableConfirmEvent", static: false, private: false, access: { has: obj => "_handleEnableConfirmEvent" in obj, get: obj => obj._handleEnableConfirmEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
23
+ __esDecorate(this, null, __handleSendComposingInput_decorators, { kind: "method", name: "_handleSendComposingInput", static: false, private: false, access: { has: obj => "_handleSendComposingInput" in obj, get: obj => obj._handleSendComposingInput }, metadata: _metadata }, null, _instanceExtraInitializers);
24
+ __esDecorate(this, null, __handleEnableSelectionEvent_decorators, { kind: "method", name: "_handleEnableSelectionEvent", static: false, private: false, access: { has: obj => "_handleEnableSelectionEvent" in obj, get: obj => obj._handleEnableSelectionEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
49
25
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
50
26
  }
51
27
  static observedAttributes = ['send-composing-input', 'input-filter'];
@@ -53,8 +29,20 @@ let XTextareaEvents = (() => {
53
29
  #sendComposingInput = false;
54
30
  #getTextareaElement = genDomGetter(() => this.#dom.shadowRoot, '#textarea');
55
31
  #getFormElement = genDomGetter(() => this.#dom.shadowRoot, '#form');
56
- get #handleEnableConfirmEvent() { return _private_handleEnableConfirmEvent_descriptor.value; }
57
- get #handleSendComposingInput() { return _private_handleSendComposingInput_descriptor.value; }
32
+ _handleEnableConfirmEvent(status) {
33
+ const textareaElement = this.#getTextareaElement();
34
+ if (status) {
35
+ textareaElement.addEventListener('input', this.#teleportInput, { passive: true });
36
+ textareaElement.addEventListener('compositionend', this.#teleportCompositionendInput, { passive: true });
37
+ }
38
+ else {
39
+ textareaElement.removeEventListener('input', this.#teleportInput);
40
+ textareaElement.removeEventListener('compositionend', this.#teleportCompositionendInput);
41
+ }
42
+ }
43
+ _handleSendComposingInput(newVal) {
44
+ this.#sendComposingInput = newVal !== null;
45
+ }
58
46
  #teleportEvent = (event) => {
59
47
  const eventType = renameEvent[event.type] ?? event.type;
60
48
  this.#dom.dispatchEvent(new CustomEvent(eventType, {
@@ -112,7 +100,16 @@ let XTextareaEvents = (() => {
112
100
  }));
113
101
  }
114
102
  };
115
- get #handleEnableSelectionEvent() { return _private_handleEnableSelectionEvent_descriptor.value; }
103
+ _handleEnableSelectionEvent(status) {
104
+ if (status) {
105
+ this.#getTextareaElement().addEventListener('select', this.#selectEvent, {
106
+ passive: true,
107
+ });
108
+ }
109
+ else {
110
+ this.#getTextareaElement().removeEventListener('select', this.#selectEvent);
111
+ }
112
+ }
116
113
  #selectEvent = () => {
117
114
  const input = this.#getTextareaElement();
118
115
  this.#dom.dispatchEvent(new CustomEvent('selection', {
@@ -3,5 +3,6 @@ import type { XBlurView } from './XBlurView.js';
3
3
  export declare class BlurRadius implements InstanceType<AttributeReactiveClass<typeof XBlurView>> {
4
4
  #private;
5
5
  static observedAttributes: string[];
6
+ _handleBlurRadius(newVal: string | null): void;
6
7
  constructor(dom: HTMLElement);
7
8
  }
@@ -1,4 +1,4 @@
1
- import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
2
  /*
3
3
  // Copyright 2024 The Lynx Authors. All rights reserved.
4
4
  // Licensed under the Apache License Version 2.0 that can be found in the
@@ -7,28 +7,27 @@ import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
7
7
  import { genDomGetter, registerAttributeHandler, } from '@lynx-js/web-elements-reactive';
8
8
  let BlurRadius = (() => {
9
9
  let _instanceExtraInitializers = [];
10
- let _private_handleBlurRadius_decorators;
11
- let _private_handleBlurRadius_descriptor;
10
+ let __handleBlurRadius_decorators;
12
11
  return class BlurRadius {
13
12
  static {
14
13
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
15
- _private_handleBlurRadius_decorators = [registerAttributeHandler('blur-radius', true)];
16
- __esDecorate(this, _private_handleBlurRadius_descriptor = { value: __setFunctionName(function (newVal) {
17
- if (newVal) {
18
- newVal = `blur(${parseFloat(newVal)}px)`;
19
- this.#getDynamicStyle().innerHTML =
20
- `:host { backdrop-filter: ${newVal}; -webkit-backdrop-filter: ${newVal}}`;
21
- }
22
- else {
23
- this.#getDynamicStyle().innerHTML = '';
24
- }
25
- }, "#handleBlurRadius") }, _private_handleBlurRadius_decorators, { kind: "method", name: "#handleBlurRadius", static: false, private: true, access: { has: obj => #handleBlurRadius in obj, get: obj => obj.#handleBlurRadius }, metadata: _metadata }, null, _instanceExtraInitializers);
14
+ __handleBlurRadius_decorators = [registerAttributeHandler('blur-radius', true)];
15
+ __esDecorate(this, null, __handleBlurRadius_decorators, { kind: "method", name: "_handleBlurRadius", static: false, private: false, access: { has: obj => "_handleBlurRadius" in obj, get: obj => obj._handleBlurRadius }, metadata: _metadata }, null, _instanceExtraInitializers);
26
16
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
27
17
  }
28
18
  static observedAttributes = ['blur-radius'];
29
19
  #dom = __runInitializers(this, _instanceExtraInitializers);
30
20
  #getDynamicStyle = genDomGetter(() => this.#dom.shadowRoot, '#dynamic-style');
31
- get #handleBlurRadius() { return _private_handleBlurRadius_descriptor.value; }
21
+ _handleBlurRadius(newVal) {
22
+ if (newVal) {
23
+ newVal = `blur(${parseFloat(newVal)}px)`;
24
+ this.#getDynamicStyle().innerHTML =
25
+ `:host { backdrop-filter: ${newVal}; -webkit-backdrop-filter: ${newVal}}`;
26
+ }
27
+ else {
28
+ this.#getDynamicStyle().innerHTML = '';
29
+ }
30
+ }
32
31
  constructor(dom) {
33
32
  this.#dom = dom;
34
33
  }
@@ -4,6 +4,8 @@ export declare class XViewpagerNgEvents implements InstanceType<AttributeReactiv
4
4
  #private;
5
5
  static observedAttributes: never[];
6
6
  constructor(dom: XViewpagerNg);
7
+ _enableChangeEvent(status: boolean): void;
8
+ _enableOffsetChangeEvent(status: boolean): void;
7
9
  connectedCallback(): void;
8
10
  dispose(): void;
9
11
  }
@@ -1,4 +1,4 @@
1
- import { __esDecorate, __runInitializers, __setFunctionName } from "tslib";
1
+ import { __esDecorate, __runInitializers } from "tslib";
2
2
  /*
3
3
  // Copyright 2024 The Lynx Authors. All rights reserved.
4
4
  // Licensed under the Apache License Version 2.0 that can be found in the
@@ -10,23 +10,15 @@ import { useScrollEnd } from '../common/constants.js';
10
10
  import { registerEventEnableStatusChangeHandler } from '@lynx-js/web-elements-reactive';
11
11
  let XViewpagerNgEvents = (() => {
12
12
  let _instanceExtraInitializers = [];
13
- let _private_enableChangeEvent_decorators;
14
- let _private_enableChangeEvent_descriptor;
15
- let _private_enableOffsetChangeEvent_decorators;
16
- let _private_enableOffsetChangeEvent_descriptor;
13
+ let __enableChangeEvent_decorators;
14
+ let __enableOffsetChangeEvent_decorators;
17
15
  return class XViewpagerNgEvents {
18
16
  static {
19
17
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
20
- _private_enableChangeEvent_decorators = [registerEventEnableStatusChangeHandler('change')];
21
- _private_enableOffsetChangeEvent_decorators = [registerEventEnableStatusChangeHandler('offsetchange')];
22
- __esDecorate(this, _private_enableChangeEvent_descriptor = { value: __setFunctionName(function (status) {
23
- this.#enableChange = status;
24
- this.#enableScrollEventListener();
25
- }, "#enableChangeEvent") }, _private_enableChangeEvent_decorators, { kind: "method", name: "#enableChangeEvent", static: false, private: true, access: { has: obj => #enableChangeEvent in obj, get: obj => obj.#enableChangeEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
26
- __esDecorate(this, _private_enableOffsetChangeEvent_descriptor = { value: __setFunctionName(function (status) {
27
- this.#enableChange = status;
28
- this.#enableScrollEventListener();
29
- }, "#enableOffsetChangeEvent") }, _private_enableOffsetChangeEvent_decorators, { kind: "method", name: "#enableOffsetChangeEvent", static: false, private: true, access: { has: obj => #enableOffsetChangeEvent in obj, get: obj => obj.#enableOffsetChangeEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
18
+ __enableChangeEvent_decorators = [registerEventEnableStatusChangeHandler('change')];
19
+ __enableOffsetChangeEvent_decorators = [registerEventEnableStatusChangeHandler('offsetchange')];
20
+ __esDecorate(this, null, __enableChangeEvent_decorators, { kind: "method", name: "_enableChangeEvent", static: false, private: false, access: { has: obj => "_enableChangeEvent" in obj, get: obj => obj._enableChangeEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
21
+ __esDecorate(this, null, __enableOffsetChangeEvent_decorators, { kind: "method", name: "_enableOffsetChangeEvent", static: false, private: false, access: { has: obj => "_enableOffsetChangeEvent" in obj, get: obj => obj._enableOffsetChangeEvent }, metadata: _metadata }, null, _instanceExtraInitializers);
30
22
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
31
23
  }
32
24
  static observedAttributes = [];
@@ -80,9 +72,15 @@ let XViewpagerNgEvents = (() => {
80
72
  this.#isDragging = false;
81
73
  };
82
74
  #enableChange = false;
83
- get #enableChangeEvent() { return _private_enableChangeEvent_descriptor.value; }
75
+ _enableChangeEvent(status) {
76
+ this.#enableChange = status;
77
+ this.#enableScrollEventListener();
78
+ }
84
79
  #enableOffsetChange = false;
85
- get #enableOffsetChangeEvent() { return _private_enableOffsetChangeEvent_descriptor.value; }
80
+ _enableOffsetChangeEvent(status) {
81
+ this.#enableOffsetChange = status;
82
+ this.#enableScrollEventListener();
83
+ }
86
84
  #enableScrollEventListener() {
87
85
  const scrollContainer = this.#getScrollContainer();
88
86
  if (this.#enableOffsetChange || this.#enableChange) {
@@ -6,4 +6,5 @@ export declare class CommonEventsAndMethods {
6
6
  [layoutChangeTarget]?: HTMLElement;
7
7
  });
8
8
  __handleScrollUpperThresholdEventEnabled: (enabled: boolean) => void;
9
+ dispose(): void;
9
10
  }
@@ -55,10 +55,14 @@ let CommonEventsAndMethods = (() => {
55
55
  }
56
56
  else {
57
57
  this.#resizeObserver?.disconnect();
58
+ this.#resizeObserver = undefined;
59
+ this.#resizeObserving = false;
58
60
  }
59
61
  });
60
- #disableExposure() {
62
+ dispose() {
61
63
  this.#resizeObserver?.disconnect();
64
+ this.#resizeObserver = undefined;
65
+ this.#resizeObserving = false;
62
66
  }
63
67
  };
64
68
  })();
package/elements.css ADDED
@@ -0,0 +1,18 @@
1
+ /* Copyright 2024 The Lynx Authors. All rights reserved.
2
+ Licensed under the Apache License Version 2.0 that can be found in the
3
+ LICENSE file in the root directory of this source tree.
4
+ */
5
+ @import url("./src/LynxWrapper/lynx-wrapper.css");
6
+ @import url("./src/XText/x-text.css");
7
+ @import url("./src/ScrollView/scroll-view.css");
8
+ @import url("./src/XFoldViewNg/x-foldview-ng.css");
9
+ @import url("./src/XViewpagerNg/x-viewpager-ng.css");
10
+ @import url("./src/XCanvas/x-canvas.css");
11
+ @import url("./src/XSvg/x-svg.css");
12
+ @import url("./src/XImage/x-image.css");
13
+ @import url("./src/XInput/x-input.css");
14
+ @import url("./src/XOverlayNg/x-overlay-ng.css");
15
+ @import url("./src/XRefreshView/x-refresh-view.css");
16
+ @import url("./src/XSwiper/x-swiper.css");
17
+ @import url("./src/XTextarea/x-textarea.css");
18
+ @import url("./src/XList/x-list.css");
package/index.css CHANGED
@@ -3,17 +3,4 @@
3
3
  LICENSE file in the root directory of this source tree.
4
4
  */
5
5
  @import url("./src/common-css/linear.css");
6
- @import url("./src/LynxWrapper/lynx-wrapper.css");
7
- @import url("./src/XText/x-text.css");
8
- @import url("./src/ScrollView/scroll-view.css");
9
- @import url("./src/XFoldViewNg/x-foldview-ng.css");
10
- @import url("./src/XViewpagerNg/x-viewpager-ng.css");
11
- @import url("./src/XCanvas/x-canvas.css");
12
- @import url("./src/XSvg/x-svg.css");
13
- @import url("./src/XImage/x-image.css");
14
- @import url("./src/XInput/x-input.css");
15
- @import url("./src/XOverlayNg/x-overlay-ng.css");
16
- @import url("./src/XRefreshView/x-refresh-view.css");
17
- @import url("./src/XSwiper/x-swiper.css");
18
- @import url("./src/XTextarea/x-textarea.css");
19
- @import url("./src/XList/x-list.css");
6
+ @import url("./elements.css");