@causw/components 0.0.4 → 0.0.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/index.js CHANGED
@@ -1,41 +1,13 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
29
5
 
30
- // src/index.ts
31
- var index_exports = {};
32
- __export(index_exports, {
33
- Button: () => Button
34
- });
35
- module.exports = __toCommonJS(index_exports);
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefault(React);
36
9
 
37
10
  // src/Button/Button.tsx
38
- var import_react = __toESM(require("react"));
39
11
 
40
12
  // src/Button/Button.styles.ts
41
13
  var buttonStyles = ({
@@ -63,10 +35,7 @@ var buttonStyles = ({
63
35
  const widthStyle = fullWidth ? "w-full" : "";
64
36
  return `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${widthStyle}`.trim();
65
37
  };
66
-
67
- // src/Button/Button.tsx
68
- var import_jsx_runtime = require("react/jsx-runtime");
69
- var Button = import_react.default.forwardRef(
38
+ var Button = React__default.default.forwardRef(
70
39
  ({
71
40
  variant = "primary",
72
41
  size = "md",
@@ -76,11 +45,9 @@ var Button = import_react.default.forwardRef(
76
45
  ...props
77
46
  }, ref) => {
78
47
  const classes = buttonStyles({ variant, size, fullWidth });
79
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ref, className: `${classes} ${className}`, ...props, children });
48
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, className: `${classes} ${className}`, ...props, children });
80
49
  }
81
50
  );
82
51
  Button.displayName = "Button";
83
- // Annotate the CommonJS export names for ESM import in node:
84
- 0 && (module.exports = {
85
- Button
86
- });
52
+
53
+ exports.Button = Button;
package/dist/index.mjs CHANGED
@@ -1,5 +1,7 @@
1
+ import React from 'react';
2
+ import { jsx } from 'react/jsx-runtime';
3
+
1
4
  // src/Button/Button.tsx
2
- import React from "react";
3
5
 
4
6
  // src/Button/Button.styles.ts
5
7
  var buttonStyles = ({
@@ -27,9 +29,6 @@ var buttonStyles = ({
27
29
  const widthStyle = fullWidth ? "w-full" : "";
28
30
  return `${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} ${widthStyle}`.trim();
29
31
  };
30
-
31
- // src/Button/Button.tsx
32
- import { jsx } from "react/jsx-runtime";
33
32
  var Button = React.forwardRef(
34
33
  ({
35
34
  variant = "primary",
@@ -44,6 +43,5 @@ var Button = React.forwardRef(
44
43
  }
45
44
  );
46
45
  Button.displayName = "Button";
47
- export {
48
- Button
49
- };
46
+
47
+ export { Button };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@causw/components",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "UI components for CAUSW Design System - CAU Software Community Service",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -16,21 +16,8 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@causw/tokens": "0.0.4",
20
- "@causw/icons": "0.0.4"
21
- },
22
- "peerDependencies": {
23
- "react": "^18.2.0",
24
- "react-dom": "^18.2.0"
25
- },
26
- "devDependencies": {
27
- "@testing-library/react": "^14.0.0",
28
- "@types/react": "^18.2.0",
29
- "@types/react-dom": "^18.2.0",
30
- "react": "^18.2.0",
31
- "react-dom": "^18.2.0",
32
- "tsup": "^8.0.0",
33
- "typescript": "^5.3.0"
19
+ "@causw/icons": "0.0.6",
20
+ "@causw/tokens": "0.0.6"
34
21
  },
35
22
  "repository": {
36
23
  "type": "git",
@@ -41,8 +28,9 @@
41
28
  "access": "public",
42
29
  "provenance": true
43
30
  },
31
+ "sideEffects": false,
44
32
  "scripts": {
45
- "build": "tsup src/index.ts --format cjs,esm --dts --external react",
33
+ "build": "tsup src/index.ts --format cjs,esm --dts --external react --treeshake",
46
34
  "dev": "tsup src/index.ts --format cjs,esm --dts --external react --watch",
47
35
  "lint": "eslint src"
48
36
  }