webadwaita 0.0.16 → 0.0.17

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/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) (or [oxc](https://oxc.rs) when used in [rolldown-vite](https://vite.dev/guide/rolldown)) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## React Compiler
11
+
12
+ The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
+
14
+ ## Expanding the ESLint configuration
15
+
16
+ If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
+
18
+ ```js
19
+ export default defineConfig([
20
+ globalIgnores(['dist']),
21
+ {
22
+ files: ['**/*.{ts,tsx}'],
23
+ extends: [
24
+ // Other configs...
25
+
26
+ // Remove tseslint.configs.recommended and replace with this
27
+ tseslint.configs.recommendedTypeChecked,
28
+ // Alternatively, use this for stricter rules
29
+ tseslint.configs.strictTypeChecked,
30
+ // Optionally, add this for stylistic rules
31
+ tseslint.configs.stylisticTypeChecked,
32
+
33
+ // Other configs...
34
+ ],
35
+ languageOptions: {
36
+ parserOptions: {
37
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
+ tsconfigRootDir: import.meta.dirname,
39
+ },
40
+ // other options...
41
+ },
42
+ },
43
+ ])
44
+ ```
45
+
46
+ You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
+
48
+ ```js
49
+ // eslint.config.js
50
+ import reactX from 'eslint-plugin-react-x'
51
+ import reactDom from 'eslint-plugin-react-dom'
52
+
53
+ export default defineConfig([
54
+ globalIgnores(['dist']),
55
+ {
56
+ files: ['**/*.{ts,tsx}'],
57
+ extends: [
58
+ // Other configs...
59
+ // Enable lint rules for React
60
+ reactX.configs['recommended-typescript'],
61
+ // Enable lint rules for React DOM
62
+ reactDom.configs.recommended,
63
+ ],
64
+ languageOptions: {
65
+ parserOptions: {
66
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
+ tsconfigRootDir: import.meta.dirname,
68
+ },
69
+ // other options...
70
+ },
71
+ },
72
+ ])
73
+ ```
@@ -0,0 +1,8 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ function u(t) {
3
+ const { children: n } = t;
4
+ return /* @__PURE__ */ o("button", { children: n });
5
+ }
6
+ export {
7
+ u as Button
8
+ };
@@ -0,0 +1 @@
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.webadwaita={},e["react/jsx-runtime"]))})(this,(function(e,t){"use strict";function n(i){const{children:u}=i;return t.jsx("button",{children:u})}e.Button=n,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,44 +1,41 @@
1
1
  {
2
2
  "name": "webadwaita",
3
- "version": "0.0.16",
4
- "sideEffects": [
5
- "**/*.css",
6
- "**/*.scss"
7
- ],
8
- "license": "MIT",
3
+ "private": false,
4
+ "version": "0.0.17",
5
+ "type": "module",
6
+ "files": ["dist"],
7
+ "main": "./dist/webadwaita.umd.cjs",
8
+ "module": "./dist/webadwaita.js",
9
9
  "exports": {
10
10
  ".": {
11
- "types": "./src/index.ts",
12
- "import": "./dist/index.mjs",
13
- "require": "./dist/index.js"
14
- },
15
- "./atoms": {
16
- "types": "./src/components/atoms/index.ts",
17
- "import": "./dist/atoms.mjs",
18
- "require": "./dist/atoms.js"
11
+ "import": "./dist/webadwaita.js",
12
+ "require": "./dist/webadwaita.umd.cjs"
19
13
  }
20
14
  },
21
15
  "scripts": {
22
- "build": "tsup",
23
- "dev": "tsup --watch",
24
- "lint": "eslint . --max-warnings 0",
25
- "clean": "rm -rf .turbo node_modules dist"
26
- },
27
- "devDependencies": {
28
- "@repo/eslint-config": "*",
29
- "@repo/typescript-config": "*",
30
- "@types/react": "^18.2.61",
31
- "@types/react-dom": "^18.2.19",
32
- "esbuild-sass-plugin": "^3.6.0",
33
- "eslint": "^8.57.0",
34
- "sass": "^1.97.3",
35
- "tsup": "^8.0.2",
36
- "typescript": "5.5.4"
16
+ "dev": "vite",
17
+ "prebuild": "rm -rf dist",
18
+ "build": "tsc -b && vite build",
19
+ "lint": "eslint .",
20
+ "preview": "vite preview",
21
+ "publish": "npm publish"
37
22
  },
38
23
  "dependencies": {
39
- "react": "^18.2.0"
24
+ "react": "^19.2.0",
25
+ "react-dom": "^19.2.0"
40
26
  },
41
- "publishConfig": {
42
- "access": "public"
27
+ "devDependencies": {
28
+ "@eslint/js": "^9.39.1",
29
+ "@types/node": "^24.10.1",
30
+ "@types/react": "^19.2.5",
31
+ "@types/react-dom": "^19.2.3",
32
+ "@vitejs/plugin-react": "^5.1.1",
33
+ "eslint": "^9.39.1",
34
+ "eslint-plugin-react-hooks": "^7.0.1",
35
+ "eslint-plugin-react-refresh": "^0.4.24",
36
+ "globals": "^16.5.0",
37
+ "typescript": "~5.9.3",
38
+ "typescript-eslint": "^8.46.4",
39
+ "vite": "^7.2.4"
43
40
  }
44
41
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- /** @type {import("eslint").Linter.Config} */
2
- module.exports = {
3
- extends: ["@repo/eslint-config/react.js"],
4
- // Resolve tsconfig.json relative to this package, not the workspace root.
5
- parserOptions: {
6
- project: require("node:path").resolve(__dirname, "tsconfig.json"),
7
- },
8
- };
@@ -1,30 +0,0 @@
1
- npm warn Unknown project config "auto-install-peers". This will stop working in the next major version of npm.
2
- npm warn Unknown project config "public-hoist-pattern". This will stop working in the next major version of npm.
3
-
4
- > webadwaita@0.0.16 build
5
- > tsup
6
-
7
- CLI Building entry: src/index.ts, src/components/atoms/index.ts
8
- CLI Using tsconfig: tsconfig.json
9
- CLI tsup v8.5.1
10
- CLI Using tsup config: C:\Users\micha\repos\webadwaita\packages\ui\tsup.config.ts
11
- CLI Target: es6
12
- CJS Build start
13
- ESM Build start
14
- DTS Build start
15
- CJS dist\index.css 688.00 B
16
- CJS dist\index.js 2.76 KB
17
- CJS dist\components\atoms\index.css 688.00 B
18
- CJS dist\components\atoms\index.js 2.78 KB
19
- CJS ⚡️ Build success in 1324ms
20
- ESM dist\index.mjs 70.00 B
21
- ESM dist\components\atoms\index.mjs 74.00 B
22
- ESM dist\chunk-APFHYC4L.mjs 1.82 KB
23
- ESM dist\components\atoms\index.css 688.00 B
24
- ESM dist\index.css 688.00 B
25
- ESM ⚡️ Build success in 1330ms
26
- DTS ⚡️ Build success in 3352ms
27
- DTS dist\components\atoms\index.d.ts 294.00 B
28
- DTS dist\index.d.ts 67.00 B
29
- DTS dist\components\atoms\index.d.mts 294.00 B
30
- DTS dist\index.d.mts 68.00 B
package/CHANGELOG.md DELETED
@@ -1,7 +0,0 @@
1
- # webadwaita
2
-
3
- ## 0.0.16
4
-
5
- ### Patch Changes
6
-
7
- - Set up project structure with atomic design pattern (atoms/molecules), SCSS modules support, co-located Storybook stories, and component type files.
package/dist/button.d.mts DELETED
@@ -1,9 +0,0 @@
1
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
- children: React.ReactNode;
3
- }
4
- declare function Button({ children, ...other }: ButtonProps): JSX.Element;
5
- declare namespace Button {
6
- var displayName: string;
7
- }
8
-
9
- export { Button, type ButtonProps };
package/dist/button.d.ts DELETED
@@ -1,9 +0,0 @@
1
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
- children: React.ReactNode;
3
- }
4
- declare function Button({ children, ...other }: ButtonProps): JSX.Element;
5
- declare namespace Button {
6
- var displayName: string;
7
- }
8
-
9
- export { Button, type ButtonProps };
package/dist/button.js DELETED
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- var __objRest = (source, exclude) => {
24
- var target = {};
25
- for (var prop in source)
26
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
- target[prop] = source[prop];
28
- if (source != null && __getOwnPropSymbols)
29
- for (var prop of __getOwnPropSymbols(source)) {
30
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
- target[prop] = source[prop];
32
- }
33
- return target;
34
- };
35
- var __export = (target, all) => {
36
- for (var name in all)
37
- __defProp(target, name, { get: all[name], enumerable: true });
38
- };
39
- var __copyProps = (to, from, except, desc) => {
40
- if (from && typeof from === "object" || typeof from === "function") {
41
- for (let key of __getOwnPropNames(from))
42
- if (!__hasOwnProp.call(to, key) && key !== except)
43
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
- }
45
- return to;
46
- };
47
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
-
49
- // src/button.tsx
50
- var button_exports = {};
51
- __export(button_exports, {
52
- Button: () => Button
53
- });
54
- module.exports = __toCommonJS(button_exports);
55
- var import_jsx_runtime = require("react/jsx-runtime");
56
- function Button(_a) {
57
- var _b = _a, { children } = _b, other = __objRest(_b, ["children"]);
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", __spreadProps(__spreadValues({ type: "button" }, other), { children }));
59
- }
60
- Button.displayName = "Button";
61
- // Annotate the CommonJS export names for ESM import in node:
62
- 0 && (module.exports = {
63
- Button
64
- });
package/dist/button.mjs DELETED
@@ -1,42 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
-
33
- // src/button.tsx
34
- import { jsx } from "react/jsx-runtime";
35
- function Button(_a) {
36
- var _b = _a, { children } = _b, other = __objRest(_b, ["children"]);
37
- return /* @__PURE__ */ jsx("button", __spreadProps(__spreadValues({ type: "button" }, other), { children }));
38
- }
39
- Button.displayName = "Button";
40
- export {
41
- Button
42
- };
@@ -1,54 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
-
33
- // src/components/atoms/Button/Button.module.scss
34
- var Button_module_default = {};
35
-
36
- // src/components/atoms/Button/Button.tsx
37
- import { jsx } from "react/jsx-runtime";
38
- function Button(_a) {
39
- var _b = _a, { children, className } = _b, other = __objRest(_b, ["children", "className"]);
40
- return /* @__PURE__ */ jsx(
41
- "button",
42
- __spreadProps(__spreadValues({
43
- type: "button",
44
- className: className ? `${Button_module_default.button} ${className}` : Button_module_default.button
45
- }, other), {
46
- children
47
- })
48
- );
49
- }
50
- Button.displayName = "Button";
51
-
52
- export {
53
- Button
54
- };
@@ -1,32 +0,0 @@
1
- /* src/components/atoms/Button/Button.module.scss */
2
- .button {
3
- padding: 0.5rem 1rem;
4
- font-size: 1rem;
5
- line-height: 1.5;
6
- border: 1px solid #0052a3;
7
- border-radius: 0.25rem;
8
- background-color: #0066cc;
9
- color: #fff;
10
- cursor: pointer;
11
- outline: none;
12
- transition:
13
- background-color 0.15s ease-in-out,
14
- border-color 0.15s ease-in-out,
15
- box-shadow 0.15s ease-in-out;
16
- }
17
- .button:hover {
18
- background-color: #0052a3;
19
- border-color: #004080;
20
- }
21
- .button:focus {
22
- border-color: #004080;
23
- box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.25);
24
- }
25
- .button:active {
26
- background-color: #004080;
27
- }
28
- .button:disabled {
29
- background-color: #99c2e6;
30
- cursor: not-allowed;
31
- opacity: 0.6;
32
- }
@@ -1,10 +0,0 @@
1
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
- children: React.ReactNode;
3
- }
4
-
5
- declare function Button({ children, className, ...other }: ButtonProps): JSX.Element;
6
- declare namespace Button {
7
- var displayName: string;
8
- }
9
-
10
- export { Button, type ButtonProps };
@@ -1,10 +0,0 @@
1
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
- children: React.ReactNode;
3
- }
4
-
5
- declare function Button({ children, className, ...other }: ButtonProps): JSX.Element;
6
- declare namespace Button {
7
- var displayName: string;
8
- }
9
-
10
- export { Button, type ButtonProps };
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- var __objRest = (source, exclude) => {
24
- var target = {};
25
- for (var prop in source)
26
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
- target[prop] = source[prop];
28
- if (source != null && __getOwnPropSymbols)
29
- for (var prop of __getOwnPropSymbols(source)) {
30
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
- target[prop] = source[prop];
32
- }
33
- return target;
34
- };
35
- var __export = (target, all) => {
36
- for (var name in all)
37
- __defProp(target, name, { get: all[name], enumerable: true });
38
- };
39
- var __copyProps = (to, from, except, desc) => {
40
- if (from && typeof from === "object" || typeof from === "function") {
41
- for (let key of __getOwnPropNames(from))
42
- if (!__hasOwnProp.call(to, key) && key !== except)
43
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
- }
45
- return to;
46
- };
47
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
-
49
- // src/components/atoms/index.ts
50
- var atoms_exports = {};
51
- __export(atoms_exports, {
52
- Button: () => Button
53
- });
54
- module.exports = __toCommonJS(atoms_exports);
55
-
56
- // src/components/atoms/Button/Button.module.scss
57
- var Button_module_default = {};
58
-
59
- // src/components/atoms/Button/Button.tsx
60
- var import_jsx_runtime = require("react/jsx-runtime");
61
- function Button(_a) {
62
- var _b = _a, { children, className } = _b, other = __objRest(_b, ["children", "className"]);
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- "button",
65
- __spreadProps(__spreadValues({
66
- type: "button",
67
- className: className ? `${Button_module_default.button} ${className}` : Button_module_default.button
68
- }, other), {
69
- children
70
- })
71
- );
72
- }
73
- Button.displayName = "Button";
74
- // Annotate the CommonJS export names for ESM import in node:
75
- 0 && (module.exports = {
76
- Button
77
- });
@@ -1,6 +0,0 @@
1
- import {
2
- Button
3
- } from "../../chunk-APFHYC4L.mjs";
4
- export {
5
- Button
6
- };
package/dist/index.css DELETED
@@ -1,32 +0,0 @@
1
- /* src/components/atoms/Button/Button.module.scss */
2
- .button {
3
- padding: 0.5rem 1rem;
4
- font-size: 1rem;
5
- line-height: 1.5;
6
- border: 1px solid #0052a3;
7
- border-radius: 0.25rem;
8
- background-color: #0066cc;
9
- color: #fff;
10
- cursor: pointer;
11
- outline: none;
12
- transition:
13
- background-color 0.15s ease-in-out,
14
- border-color 0.15s ease-in-out,
15
- box-shadow 0.15s ease-in-out;
16
- }
17
- .button:hover {
18
- background-color: #0052a3;
19
- border-color: #004080;
20
- }
21
- .button:focus {
22
- border-color: #004080;
23
- box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.25);
24
- }
25
- .button:active {
26
- background-color: #004080;
27
- }
28
- .button:disabled {
29
- background-color: #99c2e6;
30
- cursor: not-allowed;
31
- opacity: 0.6;
32
- }
package/dist/index.d.mts DELETED
@@ -1 +0,0 @@
1
- export { Button, ButtonProps } from './components/atoms/index.mjs';
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { Button, ButtonProps } from './components/atoms/index.js';
package/dist/index.js DELETED
@@ -1,77 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- var __objRest = (source, exclude) => {
24
- var target = {};
25
- for (var prop in source)
26
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
- target[prop] = source[prop];
28
- if (source != null && __getOwnPropSymbols)
29
- for (var prop of __getOwnPropSymbols(source)) {
30
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
- target[prop] = source[prop];
32
- }
33
- return target;
34
- };
35
- var __export = (target, all) => {
36
- for (var name in all)
37
- __defProp(target, name, { get: all[name], enumerable: true });
38
- };
39
- var __copyProps = (to, from, except, desc) => {
40
- if (from && typeof from === "object" || typeof from === "function") {
41
- for (let key of __getOwnPropNames(from))
42
- if (!__hasOwnProp.call(to, key) && key !== except)
43
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
- }
45
- return to;
46
- };
47
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
-
49
- // src/index.ts
50
- var index_exports = {};
51
- __export(index_exports, {
52
- Button: () => Button
53
- });
54
- module.exports = __toCommonJS(index_exports);
55
-
56
- // src/components/atoms/Button/Button.module.scss
57
- var Button_module_default = {};
58
-
59
- // src/components/atoms/Button/Button.tsx
60
- var import_jsx_runtime = require("react/jsx-runtime");
61
- function Button(_a) {
62
- var _b = _a, { children, className } = _b, other = __objRest(_b, ["children", "className"]);
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
- "button",
65
- __spreadProps(__spreadValues({
66
- type: "button",
67
- className: className ? `${Button_module_default.button} ${className}` : Button_module_default.button
68
- }, other), {
69
- children
70
- })
71
- );
72
- }
73
- Button.displayName = "Button";
74
- // Annotate the CommonJS export names for ESM import in node:
75
- 0 && (module.exports = {
76
- Button
77
- });
package/dist/index.mjs DELETED
@@ -1,6 +0,0 @@
1
- import {
2
- Button
3
- } from "./chunk-APFHYC4L.mjs";
4
- export {
5
- Button
6
- };
@@ -1,32 +0,0 @@
1
- .button {
2
- padding: 0.5rem 1rem;
3
- font-size: 1rem;
4
- line-height: 1.5;
5
- border: 1px solid #0052a3;
6
- border-radius: 0.25rem;
7
- background-color: #0066cc;
8
- color: #fff;
9
- cursor: pointer;
10
- outline: none;
11
- transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
12
-
13
- &:hover {
14
- background-color: #0052a3;
15
- border-color: #004080;
16
- }
17
-
18
- &:focus {
19
- border-color: #004080;
20
- box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.25);
21
- }
22
-
23
- &:active {
24
- background-color: #004080;
25
- }
26
-
27
- &:disabled {
28
- background-color: #99c2e6;
29
- cursor: not-allowed;
30
- opacity: 0.6;
31
- }
32
- }
@@ -1,40 +0,0 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
2
- import { Button } from "./Button";
3
-
4
- const meta: Meta<typeof Button> = {
5
- component: Button,
6
- argTypes: {
7
- type: {
8
- control: { type: "radio" },
9
- options: ["button", "submit", "reset"],
10
- },
11
- },
12
- };
13
-
14
- export default meta;
15
-
16
- type Story = StoryObj<typeof Button>;
17
-
18
- /*
19
- *👇 Render functions are a framework specific feature to allow you control on how the component renders.
20
- * See https://storybook.js.org/docs/react/api/csf
21
- * to learn how to use render functions.
22
- */
23
- export const Primary: Story = {
24
- render: (props) => (
25
- <Button
26
- {...props}
27
- onClick={(): void => {
28
- // eslint-disable-next-line no-alert -- alert for demo
29
- alert("Hello from Turborepo!");
30
- }}
31
- >
32
- Hello
33
- </Button>
34
- ),
35
- name: "Button",
36
- args: {
37
- children: "Hello",
38
- type: "button",
39
- },
40
- };
@@ -1,16 +0,0 @@
1
- import styles from "./Button.module.scss";
2
- import type { ButtonProps } from "./Button.types";
3
-
4
- export function Button({ children, className, ...other }: ButtonProps): JSX.Element {
5
- return (
6
- <button
7
- type="button"
8
- className={className ? `${styles.button} ${className}` : styles.button}
9
- {...other}
10
- >
11
- {children}
12
- </button>
13
- );
14
- }
15
-
16
- Button.displayName = "Button";
@@ -1,4 +0,0 @@
1
- export interface ButtonProps
2
- extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
- children: React.ReactNode;
4
- }
@@ -1,2 +0,0 @@
1
- export { Button } from "./Button";
2
- export type { ButtonProps } from "./Button.types";
@@ -1 +0,0 @@
1
- export * from "./Button";
@@ -1 +0,0 @@
1
- export * from "./atoms";
package/src/global.d.ts DELETED
@@ -1,10 +0,0 @@
1
- /* eslint-disable no-restricted-syntax */
2
- declare module '*.module.scss' {
3
- const classes: Readonly<Record<string, string>>;
4
- export default classes;
5
- }
6
-
7
- declare module '*.module.css' {
8
- const classes: Readonly<Record<string, string>>;
9
- export default classes;
10
- }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./components";
package/tsconfig.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "@repo/typescript-config/react-library.json",
3
- "include": ["."],
4
- "exclude": ["dist", "build", "node_modules"]
5
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from "tsup";
2
- import { sassPlugin } from "esbuild-sass-plugin";
3
-
4
- export default defineConfig((options) => ({
5
- entryPoints: ["src/index.ts", "src/components/atoms/index.ts", "src/components/molecules/index.ts"],
6
- format: ["cjs", "esm"],
7
- dts: true,
8
- external: ["react"],
9
- esbuildPlugins: [sassPlugin()],
10
- ...options,
11
- }));