@lynx-js/web-elements 0.12.2 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @lynx-js/web-elements
2
2
 
3
+ ## 0.12.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Preserve custom element false-attribute filtering metadata when applying the component decorator. ([#2603](https://github.com/lynx-family/lynx-stack/pull/2603))
8
+
9
+ ## 0.12.3
10
+
11
+ ### Patch Changes
12
+
13
+ - fix: inherit box sizing and border radius for x-input parts ([#2661](https://github.com/lynx-family/lynx-stack/pull/2661))
14
+
3
15
  ## 0.12.2
4
16
 
5
17
  ### Patch Changes
@@ -11,6 +11,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
11
11
  let templateElement;
12
12
  const attributeReactiveClasses = attributeReactiveClassesOptional.filter((e) => Boolean(e));
13
13
  return (target, { addInitializer }) => {
14
+ var _a;
14
15
  const observedStyleProperties = new Set([
15
16
  ...attributeReactiveClasses
16
17
  .filter((e) => e.observedCSSProperties)
@@ -20,7 +21,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
20
21
  // @ts-ignore
21
22
  class CustomElement extends target {
22
23
  static registerPlugin(reactiveClass) {
23
- CustomElement.observedAttributes.push(...reactiveClass.observedAttributes);
24
+ _a.observedAttributes.push(...reactiveClass.observedAttributes);
24
25
  if (reactiveClass.observedCSSProperties) {
25
26
  for (const property of reactiveClass.observedCSSProperties) {
26
27
  observedStyleProperties.add(property);
@@ -83,7 +84,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
83
84
  /** handle attribute='false' */
84
85
  setAttribute(qualifiedName, value) {
85
86
  if (value.toString() === 'false'
86
- && !target.notToFilterFalseAttributes?.has(qualifiedName)
87
+ && !_a.notToFilterFalseAttributes?.has(qualifiedName)
87
88
  && !qualifiedName.startsWith('data-')) {
88
89
  this.removeAttribute(qualifiedName);
89
90
  return;
@@ -94,7 +95,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
94
95
  const attributes = this.attributes;
95
96
  for (let index = 0, attr; (attr = attributes.item(index)); index++) {
96
97
  if (attr.value === 'false'
97
- && !target.notToFilterFalseAttributes?.has(attr.name)
98
+ && !_a.notToFilterFalseAttributes?.has(attr.name)
98
99
  && !attr.name.startsWith('data-')) {
99
100
  this.removeAttributeNode(attr);
100
101
  }
@@ -105,7 +106,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
105
106
  attributeChangedCallback(name, oldValue, newValue) {
106
107
  super.attributeChangedCallback
107
108
  && super.attributeChangedCallback(name, oldValue, newValue);
108
- if (!target.notToFilterFalseAttributes?.has(name)
109
+ if (!_a.notToFilterFalseAttributes?.has(name)
109
110
  && !name.startsWith('data-')) {
110
111
  if (oldValue === 'false')
111
112
  oldValue = null;
@@ -219,6 +220,7 @@ export function Component(tag, attributeReactiveClassesOptional, template) {
219
220
  }
220
221
  }
221
222
  }
223
+ _a = CustomElement;
222
224
  addInitializer(() => {
223
225
  customElements.define(tag, CustomElement);
224
226
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-elements",
3
- "version": "0.12.2",
3
+ "version": "0.12.4",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -139,8 +139,8 @@
139
139
  },
140
140
  "devDependencies": {
141
141
  "@playwright/test": "^1.58.2",
142
- "@rsbuild/core": "1.7.5",
143
- "@rsbuild/plugin-source-build": "1.0.4",
142
+ "@rsbuild/core": "2.0.11",
143
+ "@rsbuild/plugin-source-build": "1.0.5",
144
144
  "@types/markdown-it": "^14.1.1",
145
145
  "nyc": "^17.1.0",
146
146
  "tslib": "^2.8.1",
@@ -12,9 +12,11 @@ x-input::part(form) {
12
12
  display: contents;
13
13
  }
14
14
  x-input::part(input), x-input::part(form) {
15
+ box-sizing: inherit;
15
16
  width: inherit;
16
17
  height: inherit;
17
18
  border: inherit;
19
+ border-radius: inherit;
18
20
  align-self: inherit;
19
21
  justify-self: inherit;
20
22
  text-align: inherit;