@vin.samdy.dev/passappui 1.0.1 → 1.0.3
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/components/Xbutton/Xbutton.d.ts +8 -0
- package/dist/components/Xbutton/Xbutton.d.ts.map +1 -0
- package/dist/components/Xbutton/Xbutton.js +12 -0
- package/dist/components/Xbutton/Xbutton.js.map +1 -0
- package/dist/components/Xbutton/Xbutton.stories.d.ts +7 -0
- package/dist/components/Xbutton/Xbutton.stories.d.ts.map +1 -0
- package/dist/components/Xbutton/Xbutton.stories.js +17 -0
- package/dist/components/Xbutton/Xbutton.stories.js.map +1 -0
- package/dist/components/Xbutton/index.d.ts +2 -0
- package/dist/components/Xbutton/index.d.ts.map +1 -0
- package/dist/components/Xbutton/index.js +2 -0
- package/dist/components/Xbutton/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +1 -1
- package/dist/styles/global.css +13 -0
- package/package.json +3 -2
- package/src/components/Xbutton/Xbutton.stories.tsx +24 -0
- package/src/components/Xbutton/Xbutton.tsx +22 -0
- package/src/components/Xbutton/index.ts +1 -0
- package/src/components/index.ts +2 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type XButtonProps = Readonly<{
|
|
2
|
+
label: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
color: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function XButton({ label, backgroundColor, color }: XButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=Xbutton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Xbutton.d.ts","sourceRoot":"","sources":["../../../src/components/Xbutton/Xbutton.tsx"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,QAAQ,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,wBAAgB,OAAO,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,YAAY,2CAetE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function XButton({ label, backgroundColor, color }) {
|
|
3
|
+
return (_jsx("button", { style: {
|
|
4
|
+
backgroundColor,
|
|
5
|
+
color,
|
|
6
|
+
padding: "0.5rem 1rem",
|
|
7
|
+
border: "none",
|
|
8
|
+
borderRadius: "4px",
|
|
9
|
+
cursor: "pointer",
|
|
10
|
+
}, children: label }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=Xbutton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Xbutton.js","sourceRoot":"","sources":["../../../src/components/Xbutton/Xbutton.tsx"],"names":[],"mappings":";AAMA,MAAM,UAAU,OAAO,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAgB;IACrE,OAAO,CACL,iBACE,KAAK,EAAE;YACL,eAAe;YACf,KAAK;YACL,OAAO,EAAE,aAAa;YACtB,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE,SAAS;SAClB,YAEA,KAAK,GACC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import { XButton } from "./Xbutton";
|
|
3
|
+
declare const meta: Meta<typeof XButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof XButton>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
//# sourceMappingURL=Xbutton.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Xbutton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Xbutton/Xbutton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAS9B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { XButton } from "./Xbutton";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: XButton,
|
|
5
|
+
decorators: [
|
|
6
|
+
(Story) => (_jsx("div", { style: { padding: '1rem' }, children: _jsx(Story, {}) })),
|
|
7
|
+
],
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Default = {
|
|
11
|
+
args: {
|
|
12
|
+
label: 'Click Me',
|
|
13
|
+
backgroundColor: '#007BFF',
|
|
14
|
+
color: '#FFFFFF',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Xbutton.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Xbutton.stories.js","sourceRoot":"","sources":["../../../src/components/Xbutton/Xbutton.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,IAAI,GAAyB;IAC/B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACR,CAAC,KAAK,EAAE,EAAE,CAAC,CACP,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,YAC3B,KAAC,KAAK,KAAG,GACP,CACT;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,KAAK,EAAE,UAAU;QACjB,eAAe,EAAE,SAAS;QAC1B,KAAK,EAAE,SAAS;KACnB;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Xbutton/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Xbutton/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vin.samdy.dev/passappui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Shared UI components library",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
19
|
},
|
|
20
20
|
"./styles": "./dist/styles/global.css",
|
|
21
|
+
"./styles.css": "./dist/styles/global.css",
|
|
21
22
|
"./hooks": "./dist/hooks/index.js"
|
|
22
23
|
},
|
|
23
24
|
"scripts": {
|
|
24
|
-
"build": "tsc",
|
|
25
|
+
"build": "tsc && mkdir -p dist/styles && cp src/styles/global.css dist/styles/global.css",
|
|
25
26
|
"dev": "tsc --watch",
|
|
26
27
|
"clean": "rm -rf dist",
|
|
27
28
|
"type-check": "tsc --noEmit",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import { XButton } from "./Xbutton";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof XButton> = {
|
|
5
|
+
component: XButton,
|
|
6
|
+
decorators: [
|
|
7
|
+
(Story) => (
|
|
8
|
+
<div style={{ padding: '1rem' }}>
|
|
9
|
+
<Story />
|
|
10
|
+
</div>
|
|
11
|
+
),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof XButton>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
args: {
|
|
20
|
+
label: 'Click Me',
|
|
21
|
+
backgroundColor: '#007BFF',
|
|
22
|
+
color: '#FFFFFF',
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type XButtonProps = Readonly<{
|
|
2
|
+
label: string;
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
color: string;
|
|
5
|
+
}>;
|
|
6
|
+
|
|
7
|
+
export function XButton({ label, backgroundColor, color }: XButtonProps) {
|
|
8
|
+
return (
|
|
9
|
+
<button
|
|
10
|
+
style={{
|
|
11
|
+
backgroundColor,
|
|
12
|
+
color,
|
|
13
|
+
padding: "0.5rem 1rem",
|
|
14
|
+
border: "none",
|
|
15
|
+
borderRadius: "4px",
|
|
16
|
+
cursor: "pointer",
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
{label}
|
|
20
|
+
</button>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Xbutton";
|
package/src/components/index.ts
CHANGED