@bifrostui/icons 2.0.0-alpha.2 → 2.0.0-alpha.21

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.
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { ThemeColor } from '@bifrostui/types';
3
3
  export interface ISvgIconProps {
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { ISvgIconProps } from '../../SvgIcon.types';
3
3
  import './SvgIcon.less';
4
4
  declare const _default: React.ForwardRefExoticComponent<ISvgIconProps & React.RefAttributes<unknown>>;
@@ -60,7 +60,7 @@ __export(SvgIcon_exports, {
60
60
  });
61
61
  module.exports = __toCommonJS(SvgIcon_exports);
62
62
  var import_clsx = __toESM(require("clsx"));
63
- var import_react = __toESM(require("react"));
63
+ var React = __toESM(require("react"));
64
64
  var import_utils = require("@bifrostui/utils");
65
65
  var import_SvgIcon2 = require("./SvgIcon.css");
66
66
  const classes = {
@@ -105,7 +105,7 @@ function SvgIcon(props, ref) {
105
105
  }
106
106
  if (Component === "svg") {
107
107
  if (typeof children === "string") {
108
- return /* @__PURE__ */ import_react.default.createElement(
108
+ return /* @__PURE__ */ React.createElement(
109
109
  Component,
110
110
  __spreadValues({
111
111
  ref,
@@ -122,7 +122,7 @@ function SvgIcon(props, ref) {
122
122
  }, rest)
123
123
  );
124
124
  }
125
- return /* @__PURE__ */ import_react.default.createElement(
125
+ return /* @__PURE__ */ React.createElement(
126
126
  Component,
127
127
  __spreadValues({
128
128
  ref,
@@ -141,7 +141,7 @@ function SvgIcon(props, ref) {
141
141
  const parsedSvgColor = (0, import_utils.cssVarToValue)({
142
142
  cssVar: svgColor
143
143
  }) || svgColor;
144
- return /* @__PURE__ */ import_react.default.createElement(
144
+ return /* @__PURE__ */ React.createElement(
145
145
  Component,
146
146
  __spreadValues({
147
147
  ref,
@@ -158,4 +158,4 @@ function SvgIcon(props, ref) {
158
158
  }
159
159
  return null;
160
160
  }
161
- var SvgIcon_default = /* @__PURE__ */ import_react.default.forwardRef(SvgIcon);
161
+ var SvgIcon_default = /* @__PURE__ */ React.forwardRef(SvgIcon);
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import SvgIcon from '../components/SvgIcon';
3
3
  export default function createSvgIcon(path: React.ReactNode | string, displayName: string): typeof SvgIcon;
@@ -45,10 +45,10 @@ __export(createSvgIcon_exports, {
45
45
  });
46
46
  module.exports = __toCommonJS(createSvgIcon_exports);
47
47
  var import_utils = require("@bifrostui/utils");
48
- var import_react = __toESM(require("react"));
48
+ var React = __toESM(require("react"));
49
49
  var import_SvgIcon = __toESM(require("../components/SvgIcon"));
50
50
  function createSvgIcon(path, displayName) {
51
- const Component = (props, ref) => /* @__PURE__ */ import_react.default.createElement(import_SvgIcon.default, __spreadValues({ ref, component: import_utils.isMini ? "div" : "svg" }, props), path);
51
+ const Component = (props, ref) => /* @__PURE__ */ React.createElement(import_SvgIcon.default, __spreadValues({ ref, component: import_utils.isMini ? "div" : "svg" }, props), path);
52
52
  Component.displayName = `${displayName}Icon`;
53
- return /* @__PURE__ */ import_react.default.memo(/* @__PURE__ */ import_react.default.forwardRef(Component));
53
+ return /* @__PURE__ */ React.memo(/* @__PURE__ */ React.forwardRef(Component));
54
54
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { ThemeColor } from '@bifrostui/types';
3
3
  export interface ISvgIconProps {
4
4
  className?: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import { ISvgIconProps } from '../../SvgIcon.types';
3
3
  import './SvgIcon.less';
4
4
  declare const _default: React.ForwardRefExoticComponent<ISvgIconProps & React.RefAttributes<unknown>>;
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  import clsx from "clsx";
33
- import React from "react";
33
+ import * as React from "react";
34
34
  import { cssVarToValue } from "@bifrostui/utils";
35
35
  import "./SvgIcon.css";
36
36
  const classes = {
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  import SvgIcon from '../components/SvgIcon';
3
3
  export default function createSvgIcon(path: React.ReactNode | string, displayName: string): typeof SvgIcon;
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
15
15
  return a;
16
16
  };
17
17
  import { isMini } from "@bifrostui/utils";
18
- import React from "react";
18
+ import * as React from "react";
19
19
  import SvgIcon from "../components/SvgIcon";
20
20
  function createSvgIcon(path, displayName) {
21
21
  const Component = (props, ref) => /* @__PURE__ */ React.createElement(SvgIcon, __spreadValues({ ref, component: isMini ? "div" : "svg" }, props), path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bifrostui/icons",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.21",
4
4
  "description": "SVG icon components for BUI",
5
5
  "homepage": "http://bui.taopiaopiao.com",
6
6
  "license": "MIT",
@@ -33,14 +33,15 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "clsx": "^2.1.1",
36
- "@bifrostui/types": "2.0.0-alpha.2",
37
- "@bifrostui/utils": "2.0.0-alpha.2"
36
+ "@bifrostui/utils": "2.0.0-alpha.21",
37
+ "@bifrostui/types": "2.0.0-alpha.21"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": "^17.0.0 || ^18.0.0"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "node esbuild.config.js",
44
- "create:icon": "node ./builder.js --output-dir ./src/components --svg-dir ./src/svgs"
44
+ "create:icon": "node ./builder.js --output-dir ./src/components --svg-dir ./src/svgs",
45
+ "test": "cd ../.. && vitest run --project bui-icons"
45
46
  }
46
47
  }