@postenbring/hedwig-react 0.0.1
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/button/index.d.mts +12 -0
- package/dist/button/index.d.ts +12 -0
- package/dist/button/index.js +99 -0
- package/dist/button/index.mjs +6 -0
- package/dist/chunk-EG5TPDNX.mjs +78 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +101 -0
- package/dist/index.mjs +6 -0
- package/package.json +35 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
}
|
|
7
|
+
declare function Button({ children, style, className, size, ...rest }: ButtonProps): JSX.Element;
|
|
8
|
+
declare namespace Button {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Button, ButtonProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
}
|
|
7
|
+
declare function Button({ children, style, className, size, ...rest }: ButtonProps): JSX.Element;
|
|
8
|
+
declare namespace Button {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { Button, ButtonProps };
|
|
@@ -0,0 +1,99 @@
|
|
|
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/index.tsx
|
|
50
|
+
var button_exports = {};
|
|
51
|
+
__export(button_exports, {
|
|
52
|
+
Button: () => Button
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(button_exports);
|
|
55
|
+
var import_button = require("@postenbring/hedwig-css/dist/button/button.css");
|
|
56
|
+
|
|
57
|
+
// src/button/button.tsx
|
|
58
|
+
var import_clsx = require("clsx");
|
|
59
|
+
|
|
60
|
+
// src/utils.ts
|
|
61
|
+
function warnForStyleOverrides(className, styles) {
|
|
62
|
+
if (className) {
|
|
63
|
+
console.warn("Overriding styles are not premited");
|
|
64
|
+
}
|
|
65
|
+
if (styles) {
|
|
66
|
+
console.warn("Overriding styles are not premited");
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/button/button.tsx
|
|
71
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
72
|
+
function Button(_a) {
|
|
73
|
+
var _b = _a, {
|
|
74
|
+
children,
|
|
75
|
+
style,
|
|
76
|
+
className,
|
|
77
|
+
size = "medium"
|
|
78
|
+
} = _b, rest = __objRest(_b, [
|
|
79
|
+
"children",
|
|
80
|
+
"style",
|
|
81
|
+
"className",
|
|
82
|
+
"size"
|
|
83
|
+
]);
|
|
84
|
+
warnForStyleOverrides(style, className);
|
|
85
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
86
|
+
"button",
|
|
87
|
+
__spreadProps(__spreadValues({
|
|
88
|
+
className: (0, import_clsx.clsx)("hds-button", "hds-button--primary", `hds-button--${size}`),
|
|
89
|
+
type: "button"
|
|
90
|
+
}, rest), {
|
|
91
|
+
children
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
Button.displayName = "Button";
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
Button
|
|
99
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
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/index.tsx
|
|
34
|
+
import "@postenbring/hedwig-css/dist/button/button.css";
|
|
35
|
+
|
|
36
|
+
// src/button/button.tsx
|
|
37
|
+
import { clsx } from "clsx";
|
|
38
|
+
|
|
39
|
+
// src/utils.ts
|
|
40
|
+
function warnForStyleOverrides(className, styles) {
|
|
41
|
+
if (className) {
|
|
42
|
+
console.warn("Overriding styles are not premited");
|
|
43
|
+
}
|
|
44
|
+
if (styles) {
|
|
45
|
+
console.warn("Overriding styles are not premited");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/button/button.tsx
|
|
50
|
+
import { jsx } from "react/jsx-runtime";
|
|
51
|
+
function Button(_a) {
|
|
52
|
+
var _b = _a, {
|
|
53
|
+
children,
|
|
54
|
+
style,
|
|
55
|
+
className,
|
|
56
|
+
size = "medium"
|
|
57
|
+
} = _b, rest = __objRest(_b, [
|
|
58
|
+
"children",
|
|
59
|
+
"style",
|
|
60
|
+
"className",
|
|
61
|
+
"size"
|
|
62
|
+
]);
|
|
63
|
+
warnForStyleOverrides(style, className);
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
"button",
|
|
66
|
+
__spreadProps(__spreadValues({
|
|
67
|
+
className: clsx("hds-button", "hds-button--primary", `hds-button--${size}`),
|
|
68
|
+
type: "button"
|
|
69
|
+
}, rest), {
|
|
70
|
+
children
|
|
71
|
+
})
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
Button.displayName = "Button";
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
Button
|
|
78
|
+
};
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
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.tsx
|
|
50
|
+
var src_exports = {};
|
|
51
|
+
__export(src_exports, {
|
|
52
|
+
Button: () => Button
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(src_exports);
|
|
55
|
+
|
|
56
|
+
// src/button/index.tsx
|
|
57
|
+
var import_button = require("@postenbring/hedwig-css/dist/button/button.css");
|
|
58
|
+
|
|
59
|
+
// src/button/button.tsx
|
|
60
|
+
var import_clsx = require("clsx");
|
|
61
|
+
|
|
62
|
+
// src/utils.ts
|
|
63
|
+
function warnForStyleOverrides(className, styles) {
|
|
64
|
+
if (className) {
|
|
65
|
+
console.warn("Overriding styles are not premited");
|
|
66
|
+
}
|
|
67
|
+
if (styles) {
|
|
68
|
+
console.warn("Overriding styles are not premited");
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// src/button/button.tsx
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
+
function Button(_a) {
|
|
75
|
+
var _b = _a, {
|
|
76
|
+
children,
|
|
77
|
+
style,
|
|
78
|
+
className,
|
|
79
|
+
size = "medium"
|
|
80
|
+
} = _b, rest = __objRest(_b, [
|
|
81
|
+
"children",
|
|
82
|
+
"style",
|
|
83
|
+
"className",
|
|
84
|
+
"size"
|
|
85
|
+
]);
|
|
86
|
+
warnForStyleOverrides(style, className);
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
"button",
|
|
89
|
+
__spreadProps(__spreadValues({
|
|
90
|
+
className: (0, import_clsx.clsx)("hds-button", "hds-button--primary", `hds-button--${size}`),
|
|
91
|
+
type: "button"
|
|
92
|
+
}, rest), {
|
|
93
|
+
children
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
Button.displayName = "Button";
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
Button
|
|
101
|
+
});
|
package/dist/index.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@postenbring/hedwig-react",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"module": "./dist/index.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist/**"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsup --format esm,cjs --dts --external react",
|
|
14
|
+
"dev": "tsup --format esm,cjs --watch --dts --external react",
|
|
15
|
+
"lint": "eslint src/",
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/react": "^18.2.37",
|
|
21
|
+
"@types/react-dom": "^18.2.15",
|
|
22
|
+
"eslint-config-custom": "*",
|
|
23
|
+
"hedwig-tsconfig": "*",
|
|
24
|
+
"react": "^18.2.0",
|
|
25
|
+
"tsup": "^7.2.0",
|
|
26
|
+
"typescript": "^5.2.2"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@postenbring/hedwig-css": "*",
|
|
30
|
+
"clsx": "2.0.0"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
}
|
|
35
|
+
}
|