@ajaydahare/aj-react-lib-webpack 1.0.0

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.
@@ -0,0 +1,13 @@
1
+ import './Button.css';
2
+ type Variant = 'primary' | 'secondary' | 'danger';
3
+ type Size = 'sm' | 'md' | 'lg';
4
+ export type ButtonProps = {
5
+ label: string;
6
+ variant?: Variant;
7
+ size?: Size;
8
+ loading?: boolean;
9
+ disabled?: boolean;
10
+ onClick?: () => void;
11
+ };
12
+ export declare const Button: ({ label, variant, size, loading, disabled, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from './Button';
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Button>;
6
+ export declare const Playground: Story;
@@ -0,0 +1 @@
1
+ export * from './components/Button/Button';
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see index.js.LICENSE.txt */
2
+ var e={698(e,r){var o=Symbol.for("react.transitional.element");Symbol.for("react.fragment"),r.jsx=function(e,r,t){var n=null;if(void 0!==t&&(n=""+t),void 0!==r.key&&(n=""+r.key),"key"in r)for(var a in t={},r)"key"!==a&&(t[a]=r[a]);else t=r;return r=t.ref,{$$typeof:o,type:e,key:n,ref:void 0!==r?r:null,props:t}}},848(e,r,o){e.exports=o(698)}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,o),a.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var t=o(848);const n=({label:e,variant:r="primary",size:o="md",loading:n=!1,disabled:a=!1,onClick:i})=>{const l=`button button--${r} button--${o}`;return(0,t.jsx)("button",{className:l,disabled:a||n,onClick:i,children:n?"Loading...":e})};export{n as Button};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@ajaydahare/aj-react-lib-webpack",
3
+ "version": "1.0.0",
4
+ "description": "React component library built with Webpack and Storybook",
5
+ "type": "module",
6
+
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "files": ["dist"],
10
+ "sideEffects": false,
11
+
12
+ "scripts": {
13
+ "build": "webpack",
14
+ "storybook": "storybook dev -p 6006",
15
+ "prepublishOnly": "npm run build",
16
+ "build-storybook": "storybook build"
17
+ },
18
+
19
+ "peerDependencies": {
20
+ "react": ">=18",
21
+ "react-dom": ">=18"
22
+ },
23
+
24
+ "devDependencies": {
25
+ "storybook": "^10.2.3",
26
+ "@storybook/react-webpack5": "^10.2.3",
27
+ "@storybook/addon-a11y": "^10.2.3",
28
+ "@storybook/addon-docs": "^10.2.3",
29
+ "@storybook/addon-onboarding": "^10.2.3",
30
+ "@storybook/addon-webpack5-compiler-swc": "^4.0.2",
31
+
32
+ "@types/react": "^19.2.10",
33
+ "@types/react-dom": "^19.2.3",
34
+
35
+ "typescript": "^5.9.3",
36
+ "ts-loader": "^9.5.4",
37
+
38
+ "webpack": "^5.104.1",
39
+ "webpack-cli": "^6.0.1",
40
+ "webpack-merge": "^6.0.1",
41
+
42
+ "css-loader": "^7.1.3",
43
+ "style-loader": "^4.0.0"
44
+ }
45
+ }