webadwaita 0.0.14 → 0.0.16
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/.eslintrc.js +8 -0
- package/.turbo/turbo-build.log +30 -0
- package/CHANGELOG.md +7 -0
- package/dist/button.d.mts +9 -0
- package/dist/button.d.ts +9 -0
- package/dist/button.js +64 -0
- package/dist/button.mjs +42 -0
- package/dist/chunk-APFHYC4L.mjs +54 -0
- package/dist/components/atoms/index.css +32 -0
- package/dist/components/atoms/index.d.mts +10 -0
- package/dist/components/atoms/index.d.ts +10 -0
- package/dist/components/atoms/index.js +77 -0
- package/dist/components/atoms/index.mjs +6 -0
- package/dist/index.css +32 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -41
- package/dist/index.js +77 -0
- package/dist/index.mjs +6 -0
- package/package.json +31 -34
- package/src/components/atoms/Button/Button.module.scss +32 -0
- package/src/components/atoms/Button/Button.stories.tsx +40 -0
- package/src/components/atoms/Button/Button.tsx +16 -0
- package/src/components/atoms/Button/Button.types.ts +4 -0
- package/src/components/atoms/Button/index.ts +2 -0
- package/src/components/atoms/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/global.d.ts +10 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +5 -0
- package/tsup.config.ts +11 -0
- package/README.md +0 -30
- package/dist/index.es.js +0 -825
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -35
- package/dist/index.umd.js.map +0 -1
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 };
|
|
@@ -0,0 +1,10 @@
|
|
|
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 };
|
|
@@ -0,0 +1,77 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button, ButtonProps } from './components/atoms/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare function Arrow2TopRight(): JSX_2.Element;
|
|
4
|
-
|
|
5
|
-
export declare function Button({ variant, icon, circle, children, ...rest }: {
|
|
6
|
-
variant?: string;
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
circle?: boolean;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}): JSX_2.Element;
|
|
11
|
-
|
|
12
|
-
export declare function Entry({ placeholder, ...props }: {
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
}): JSX_2.Element;
|
|
15
|
-
|
|
16
|
-
export declare function Heading({ children }: any): JSX_2.Element;
|
|
17
|
-
|
|
18
|
-
export declare function List({ children }: any): JSX_2.Element;
|
|
19
|
-
|
|
20
|
-
export declare function ListItem({ onClick, children, }: {
|
|
21
|
-
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
22
|
-
children: React.ReactNode;
|
|
23
|
-
}): JSX_2.Element;
|
|
24
|
-
|
|
25
|
-
export declare function Loupe(): JSX_2.Element;
|
|
26
|
-
|
|
27
|
-
export declare function Spinner(): JSX_2.Element;
|
|
28
|
-
|
|
29
|
-
export declare function Welcome({ logo, title, description, }: {
|
|
30
|
-
logo: React.ReactNode;
|
|
31
|
-
title: string;
|
|
32
|
-
description: string;
|
|
33
|
-
}): JSX_2.Element;
|
|
34
|
-
|
|
35
|
-
declare function Window_2({ center, children, }: {
|
|
36
|
-
center?: boolean;
|
|
37
|
-
children: React.ReactNode;
|
|
38
|
-
}): JSX_2.Element;
|
|
39
|
-
export { Window_2 as Window }
|
|
40
|
-
|
|
41
|
-
export { }
|
|
1
|
+
export { Button, ButtonProps } from './components/atoms/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
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
ADDED
package/package.json
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webadwaita",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
3
|
+
"version": "0.0.16",
|
|
4
|
+
"sideEffects": [
|
|
5
|
+
"**/*.css",
|
|
6
|
+
"**/*.scss"
|
|
10
7
|
],
|
|
8
|
+
"license": "MIT",
|
|
11
9
|
"exports": {
|
|
12
10
|
".": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
11
|
+
"types": "./src/index.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
16
14
|
},
|
|
17
|
-
"./
|
|
15
|
+
"./atoms": {
|
|
16
|
+
"types": "./src/components/atoms/index.ts",
|
|
17
|
+
"import": "./dist/atoms.mjs",
|
|
18
|
+
"require": "./dist/atoms.js"
|
|
19
|
+
}
|
|
18
20
|
},
|
|
19
21
|
"scripts": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"lint": "eslint . --
|
|
23
|
-
"
|
|
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"
|
|
24
37
|
},
|
|
25
38
|
"dependencies": {
|
|
26
|
-
"react": "^18.2.0"
|
|
27
|
-
"react-dom": "^18.2.0",
|
|
28
|
-
"react-icons": "^5.0.1"
|
|
39
|
+
"react": "^18.2.0"
|
|
29
40
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"@types/react": "^18.2.43",
|
|
33
|
-
"@types/react-dom": "^18.2.17",
|
|
34
|
-
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
35
|
-
"@typescript-eslint/parser": "^6.14.0",
|
|
36
|
-
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
37
|
-
"autoprefixer": "^10.4.16",
|
|
38
|
-
"eslint": "^8.55.0",
|
|
39
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
40
|
-
"eslint-plugin-react-refresh": "^0.4.5",
|
|
41
|
-
"postcss": "^8.4.33",
|
|
42
|
-
"tailwindcss": "^3.4.0",
|
|
43
|
-
"typescript": "^5.2.2",
|
|
44
|
-
"vite": "^5.0.8",
|
|
45
|
-
"vite-plugin-dts": "^3.7.2"
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
46
43
|
}
|
|
47
44
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
}
|