@salty-css/core 0.1.0 → 0.2.0-alpha.1

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.
@@ -18,7 +18,8 @@ class StyledGenerator extends classNameGenerator.StylesGenerator {
18
18
  return 0;
19
19
  }
20
20
  get clientProps() {
21
- const { element, variants = {}, compoundVariants = [], anyOfVariants = [], defaultVariants = {}, defaultProps = {}, passProps } = this.params;
21
+ const { element: _element, as: _as, variants = {}, compoundVariants = [], anyOfVariants = [], defaultVariants = {}, defaultProps = {}, passProps } = this.params;
22
+ const element = _as ?? _element;
22
23
  const { callerName, isProduction } = this.buildContext;
23
24
  const variantKeys = /* @__PURE__ */ new Set([]);
24
25
  const addVariantKey = (name) => {
@@ -17,7 +17,8 @@ class StyledGenerator extends StylesGenerator {
17
17
  return 0;
18
18
  }
19
19
  get clientProps() {
20
- const { element, variants = {}, compoundVariants = [], anyOfVariants = [], defaultVariants = {}, defaultProps = {}, passProps } = this.params;
20
+ const { element: _element, as: _as, variants = {}, compoundVariants = [], anyOfVariants = [], defaultVariants = {}, defaultProps = {}, passProps } = this.params;
21
+ const element = _as ?? _element;
21
22
  const { callerName, isProduction } = this.buildContext;
22
23
  const variantKeys = /* @__PURE__ */ new Set([]);
23
24
  const addVariantKey = (name) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0-alpha.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
package/types/index.d.ts CHANGED
@@ -7,6 +7,7 @@ export type CreateElementProps = {
7
7
  children?: ReactNode;
8
8
  className?: string;
9
9
  element?: string;
10
+ as?: string;
10
11
  passProps?: boolean | string | string[];
11
12
  style?: CssProperties | {
12
13
  [key: string]: PropertyValueToken | NeverObj;
@@ -81,6 +82,7 @@ export interface GeneratorOptions {
81
82
  className?: string | string[];
82
83
  displayName?: string;
83
84
  element?: string;
85
+ as?: string;
84
86
  passProps?: boolean | string | string[];
85
87
  defaultProps?: Record<PropertyKey, unknown>;
86
88
  priority?: number;