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 +73 -0
- package/dist/webadwaita.js +8 -0
- package/dist/webadwaita.umd.cjs +1 -0
- package/package.json +29 -32
- package/.eslintrc.js +0 -8
- package/.turbo/turbo-build.log +0 -30
- package/CHANGELOG.md +0 -7
- package/dist/button.d.mts +0 -9
- package/dist/button.d.ts +0 -9
- package/dist/button.js +0 -64
- package/dist/button.mjs +0 -42
- package/dist/chunk-APFHYC4L.mjs +0 -54
- package/dist/components/atoms/index.css +0 -32
- package/dist/components/atoms/index.d.mts +0 -10
- package/dist/components/atoms/index.d.ts +0 -10
- package/dist/components/atoms/index.js +0 -77
- package/dist/components/atoms/index.mjs +0 -6
- package/dist/index.css +0 -32
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -77
- package/dist/index.mjs +0 -6
- package/src/components/atoms/Button/Button.module.scss +0 -32
- package/src/components/atoms/Button/Button.stories.tsx +0 -40
- package/src/components/atoms/Button/Button.tsx +0 -16
- package/src/components/atoms/Button/Button.types.ts +0 -4
- package/src/components/atoms/Button/index.ts +0 -2
- package/src/components/atoms/index.ts +0 -1
- package/src/components/index.ts +0 -1
- package/src/global.d.ts +0 -10
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -5
- package/tsup.config.ts +0 -11
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 @@
|
|
|
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
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
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
|
-
"
|
|
12
|
-
"
|
|
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
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
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": "^
|
|
24
|
+
"react": "^19.2.0",
|
|
25
|
+
"react-dom": "^19.2.0"
|
|
40
26
|
},
|
|
41
|
-
"
|
|
42
|
-
"
|
|
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
|
-
};
|
package/.turbo/turbo-build.log
DELETED
|
@@ -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
|
-
[34mCLI[39m Building entry: src/index.ts, src/components/atoms/index.ts
|
|
8
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
9
|
-
[34mCLI[39m tsup v8.5.1
|
|
10
|
-
[34mCLI[39m Using tsup config: C:\Users\micha\repos\webadwaita\packages\ui\tsup.config.ts
|
|
11
|
-
[34mCLI[39m Target: es6
|
|
12
|
-
[34mCJS[39m Build start
|
|
13
|
-
[34mESM[39m Build start
|
|
14
|
-
[34mDTS[39m Build start
|
|
15
|
-
[32mCJS[39m [1mdist\index.css [22m[32m688.00 B[39m
|
|
16
|
-
[32mCJS[39m [1mdist\index.js [22m[32m2.76 KB[39m
|
|
17
|
-
[32mCJS[39m [1mdist\components\atoms\index.css [22m[32m688.00 B[39m
|
|
18
|
-
[32mCJS[39m [1mdist\components\atoms\index.js [22m[32m2.78 KB[39m
|
|
19
|
-
[32mCJS[39m ⚡️ Build success in 1324ms
|
|
20
|
-
[32mESM[39m [1mdist\index.mjs [22m[32m70.00 B[39m
|
|
21
|
-
[32mESM[39m [1mdist\components\atoms\index.mjs [22m[32m74.00 B[39m
|
|
22
|
-
[32mESM[39m [1mdist\chunk-APFHYC4L.mjs [22m[32m1.82 KB[39m
|
|
23
|
-
[32mESM[39m [1mdist\components\atoms\index.css [22m[32m688.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist\index.css [22m[32m688.00 B[39m
|
|
25
|
-
[32mESM[39m ⚡️ Build success in 1330ms
|
|
26
|
-
[32mDTS[39m ⚡️ Build success in 3352ms
|
|
27
|
-
[32mDTS[39m [1mdist\components\atoms\index.d.ts [22m[32m294.00 B[39m
|
|
28
|
-
[32mDTS[39m [1mdist\index.d.ts [22m[32m67.00 B[39m
|
|
29
|
-
[32mDTS[39m [1mdist\components\atoms\index.d.mts [22m[32m294.00 B[39m
|
|
30
|
-
[32mDTS[39m [1mdist\index.d.mts [22m[32m68.00 B[39m
|
package/CHANGELOG.md
DELETED
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
|
-
};
|
package/dist/chunk-APFHYC4L.mjs
DELETED
|
@@ -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
|
-
});
|
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,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 +0,0 @@
|
|
|
1
|
-
export * from "./Button";
|
package/src/components/index.ts
DELETED
|
@@ -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
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
|
-
}));
|