@htmlplus/element 3.4.4 → 3.4.6

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/dist/client.js CHANGED
@@ -2042,13 +2042,13 @@ function Style() {
2042
2042
  });
2043
2043
  };
2044
2044
  }
2045
- const toCssString = (input, parent) => {
2045
+ const toCssString = (input) => {
2046
2046
  if (typeof input === 'string') {
2047
2047
  return input.trim();
2048
2048
  }
2049
2049
  if (Array.isArray(input)) {
2050
2050
  return input
2051
- .map((item) => toCssString(item, parent))
2051
+ .map((item) => toCssString(item))
2052
2052
  .filter(Boolean)
2053
2053
  .join('\n');
2054
2054
  }
@@ -2064,13 +2064,13 @@ const toCssString = (input, parent) => {
2064
2064
  continue;
2065
2065
  const cssKey = key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
2066
2066
  if (typeof value === 'object') {
2067
- result += `${cssKey} {${toCssString(value, cssKey)}}`;
2067
+ result += `${cssKey} {${toCssString(value)}}`;
2068
2068
  }
2069
2069
  else {
2070
2070
  result += `${cssKey}: ${value};`;
2071
2071
  }
2072
2072
  }
2073
- return parent ? result : `:host {${result}}`;
2073
+ return result;
2074
2074
  };
2075
2075
 
2076
2076
  function Variant() {
@@ -743,8 +743,6 @@ const customElement = (userOptions) => {
743
743
 
744
744
  export type ${context.className}Properties = Filter<${context.className}PropertiesBase, ${context.className}PropertiesDisables>;
745
745
 
746
- export type ${context.className}AttributesAndEvents = ${context.className}Attributes & ${context.className}Events;
747
-
748
746
  export interface ${context.className}JSX extends ${context.className}Events, ${context.className}Properties { }
749
747
 
750
748
  declare global {
@@ -765,13 +763,21 @@ const customElement = (userOptions) => {
765
763
  "${context.elementTagName}": ${context.className}Attributes & ${context.className}Events;
766
764
  }
767
765
  }
766
+
767
+ declare module "react" {
768
+ namespace JSX {
769
+ interface IntrinsicElements {
770
+ "${context.elementTagName}": ${context.className}Attributes & ${context.className}Events & Omit<DetailedHTMLProps<HTMLAttributes<${context.elementInterfaceName}>, ${context.elementInterfaceName}>, keyof (${context.className}Attributes & ${context.className}Events)>;
771
+ }
772
+ }
773
+ }
768
774
 
769
- ${['@builder.io/qwik', 'inferno', 'preact', 'react', 'solid-js']
775
+ ${['@builder.io/qwik', 'inferno', 'preact', 'solid-js']
770
776
  .map((key) => `
771
777
  declare module "${key}" {
772
778
  namespace JSX {
773
779
  interface IntrinsicElements {
774
- "${context.elementTagName}": ${context.className}AttributesAndEvents & Omit<HTMLAttributes<${context.elementInterfaceName}>, keyof ${context.className}AttributesAndEvents>;
780
+ "${context.elementTagName}": ${context.className}Attributes & ${context.className}Events & Omit<HTMLAttributes<${context.elementInterfaceName}>, keyof (${context.className}Attributes & ${context.className}Events)>;
775
781
  }
776
782
  }
777
783
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlplus/element",
3
- "version": "3.4.4",
3
+ "version": "3.4.6",
4
4
  "description": "A powerful library for building scalable, reusable, fast, tastable and lightweight design system for any web technologies. Powered by Web Component.",
5
5
  "keywords": [
6
6
  "components",