react-restyle-components 0.1.37 → 0.1.39

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 CHANGED
@@ -5,7 +5,7 @@ Easy use restyle components
5
5
  ## Installation
6
6
 
7
7
  ```
8
- yarn add react-restyle-components tailwindcss
8
+ yarn add react-restyle-components
9
9
 
10
10
  ```
11
11
 
@@ -6,12 +6,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Primary = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const buttons_component_1 = require("./buttons.component");
9
+ const blocks_1 = require("@storybook/blocks");
10
+ const test_1 = require("@storybook/test");
9
11
  const meta = {
10
12
  title: 'Design System/Atoms/Button',
11
13
  component: buttons_component_1.Button,
12
14
  tags: ['autodocs'],
13
15
  args: {
14
- className: 'bg-orange w-40',
16
+ className: 'w-40',
17
+ },
18
+ parameters: {
19
+ componentSubtitle: 'Button New',
20
+ docs: {
21
+ page: () => (react_1.default.createElement(react_1.default.Fragment, null,
22
+ react_1.default.createElement(blocks_1.Title, null),
23
+ react_1.default.createElement(blocks_1.Canvas, null),
24
+ react_1.default.createElement(blocks_1.Source, { code: `
25
+ import {Button} from 'react-restyle-components';
26
+ <Button
27
+ disable={false}
28
+ type='solid'
29
+ onClick={()=>{}}>
30
+ <span>Primary</span>
31
+ </Button>
32
+ ` }))),
33
+ },
15
34
  },
16
35
  };
17
36
  exports.default = meta;
@@ -23,8 +42,9 @@ exports.Primary = {
23
42
  // },
24
43
  args: {
25
44
  disable: false,
26
- type: 'solid' || 'outline' || 'submit',
45
+ type: 'solid' || 'outline',
27
46
  children: react_1.default.createElement("span", null, "Primary"),
47
+ onClick: (0, test_1.fn)(),
28
48
  },
29
49
  };
30
50
  // export const Disable: Story = {
@@ -1 +1 @@
1
- {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/button.stories.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,2DAA2C;AAE3C,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,0BAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,SAAS,EAAE,gBAAgB;KAC5B;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC;AAGP,QAAA,OAAO,GAAU;IAC5B,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,OAAO;IACP,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO,IAAI,SAAS,IAAI,QAAQ;QACtC,QAAQ,EAAE,sDAAoB;KAC/B;CACF,CAAC;AAEF,kCAAkC;AAClC,YAAY;AACZ,uBAAuB;AACvB,sCAAsC;AACtC,qBAAqB;AACrB,OAAO;AACP,KAAK"}
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/button.stories.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,2DAA2C;AAC3C,8CAAwD;AACxD,0CAAmC;AAEnC,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,0BAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM;KAClB;IACD,UAAU,EAAE;QACV,iBAAiB,EAAE,YAAY;QAC/B,IAAI,EAAE;YACJ,IAAI,EAAE,GAAG,EAAE,CAAC,CACV;gBACE,8BAAC,cAAK,OAAG;gBAET,8BAAC,eAAM,OAAG;gBACV,8BAAC,eAAM,IACL,IAAI,EAAE;;;;;;;;aAQL,GACD,CACD,CACJ;SACF;KACF;CACF,CAAC;AAEF,kBAAe,IAAI,CAAC;AAGP,QAAA,OAAO,GAAU;IAC5B,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,OAAO;IACP,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO,IAAI,SAAS;QAC1B,QAAQ,EAAE,sDAAoB;QAC9B,OAAO,EAAE,IAAA,SAAE,GAAE;KACd;CACF,CAAC;AAEF,kCAAkC;AAClC,YAAY;AACZ,uBAAuB;AACvB,sCAAsC;AACtC,qBAAqB;AACrB,OAAO;AACP,KAAK"}
@@ -5,8 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Button = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
- const Button = ({ className, disable, onClick, children, }) => {
9
- return (react_1.default.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-text-base text-md pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
8
+ const Button = ({ type = 'solid', className, disable, onClick, children, }) => {
9
+ const buttonColorClass = type === 'solid'
10
+ ? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg'
11
+ : 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
12
+ return (react_1.default.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-text-base text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
10
13
  };
11
14
  exports.Button = Button;
12
15
  //# sourceMappingURL=buttons.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/buttons.component.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AASnB,MAAM,MAAM,GAAG,CAAC,EACrB,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,GACI,EAAE,EAAE;IAChB,OAAO,CACL,yDACc,eAAe,EAC3B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,GAAG,SAAS,oFACrB,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAC3B,EAAE,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,IAEvB,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,MAAM,UAkBjB"}
1
+ {"version":3,"file":"buttons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/buttons.component.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AASnB,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,GAAG,OAAO,EACd,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,GACI,EAAE,EAAE;IAChB,MAAM,gBAAgB,GACpB,IAAI,KAAK,OAAO;QACd,CAAC,CAAC,4DAA4D;QAC9D,CAAC,CAAC,oEAAoE,CAAC;IAC3E,OAAO,CACL,yDACc,eAAe,EAC3B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,GAAG,SAAS,mDAAmD,gBAAgB,qCACxF,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAC3B,EAAE,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,IAEvB,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,MAAM,UAuBjB"}
@@ -1,11 +1,30 @@
1
1
  import React from 'react';
2
2
  import { Button } from './buttons.component';
3
+ import { Title, Source, Canvas } from '@storybook/blocks';
4
+ import { fn } from '@storybook/test';
3
5
  const meta = {
4
6
  title: 'Design System/Atoms/Button',
5
7
  component: Button,
6
8
  tags: ['autodocs'],
7
9
  args: {
8
- className: 'bg-orange w-40',
10
+ className: 'w-40',
11
+ },
12
+ parameters: {
13
+ componentSubtitle: 'Button New',
14
+ docs: {
15
+ page: () => (React.createElement(React.Fragment, null,
16
+ React.createElement(Title, null),
17
+ React.createElement(Canvas, null),
18
+ React.createElement(Source, { code: `
19
+ import {Button} from 'react-restyle-components';
20
+ <Button
21
+ disable={false}
22
+ type='solid'
23
+ onClick={()=>{}}>
24
+ <span>Primary</span>
25
+ </Button>
26
+ ` }))),
27
+ },
9
28
  },
10
29
  };
11
30
  export default meta;
@@ -17,8 +36,9 @@ export const Primary = {
17
36
  // },
18
37
  args: {
19
38
  disable: false,
20
- type: 'solid' || 'outline' || 'submit',
39
+ type: 'solid' || 'outline',
21
40
  children: React.createElement("span", null, "Primary"),
41
+ onClick: fn(),
22
42
  },
23
43
  };
24
44
  // export const Disable: Story = {
@@ -1 +1 @@
1
- {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAE3C,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,SAAS,EAAE,gBAAgB;KAC5B;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,OAAO;IACP,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO,IAAI,SAAS,IAAI,QAAQ;QACtC,QAAQ,EAAE,4CAAoB;KAC/B;CACF,CAAC;AAEF,kCAAkC;AAClC,YAAY;AACZ,uBAAuB;AACvB,sCAAsC;AACtC,qBAAqB;AACrB,OAAO;AACP,KAAK"}
1
+ {"version":3,"file":"button.stories.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAC,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAC,EAAE,EAAC,MAAM,iBAAiB,CAAC;AAEnC,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,4BAA4B;IACnC,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM;KAClB;IACD,UAAU,EAAE;QACV,iBAAiB,EAAE,YAAY;QAC/B,IAAI,EAAE;YACJ,IAAI,EAAE,GAAG,EAAE,CAAC,CACV;gBACE,oBAAC,KAAK,OAAG;gBAET,oBAAC,MAAM,OAAG;gBACV,oBAAC,MAAM,IACL,IAAI,EAAE;;;;;;;;aAQL,GACD,CACD,CACJ;SACF;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,OAAO;IACP,KAAK;IACL,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,OAAO,IAAI,SAAS;QAC1B,QAAQ,EAAE,4CAAoB;QAC9B,OAAO,EAAE,EAAE,EAAE;KACd;CACF,CAAC;AAEF,kCAAkC;AAClC,YAAY;AACZ,uBAAuB;AACvB,sCAAsC;AACtC,qBAAqB;AACrB,OAAO;AACP,KAAK"}
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
- export const Button = ({ className, disable, onClick, children, }) => {
3
- return (React.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-text-base text-md pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
2
+ export const Button = ({ type = 'solid', className, disable, onClick, children, }) => {
3
+ const buttonColorClass = type === 'solid'
4
+ ? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg'
5
+ : 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
6
+ return (React.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-text-base text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
4
7
  };
5
8
  //# sourceMappingURL=buttons.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"buttons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/buttons.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,GACI,EAAE,EAAE;IAChB,OAAO,CACL,+CACc,eAAe,EAC3B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,GAAG,SAAS,oFACrB,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAC3B,EAAE,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,IAEvB,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"buttons.component.js","sourceRoot":"","sources":["../../../../../src/core-components/atoms/buttons/buttons.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,GAAG,OAAO,EACd,SAAS,EACT,OAAO,EACP,OAAO,EACP,QAAQ,GACI,EAAE,EAAE;IAChB,MAAM,gBAAgB,GACpB,IAAI,KAAK,OAAO;QACd,CAAC,CAAC,4DAA4D;QAC9D,CAAC,CAAC,oEAAoE,CAAC;IAC3E,OAAO,CACL,+CACc,eAAe,EAC3B,QAAQ,EAAE,OAAO,EACjB,SAAS,EAAE,GAAG,SAAS,mDAAmD,gBAAgB,qCACxF,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAC3B,EAAE,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,IAEvB,QAAQ,CACF,CACV,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "main": "lib/cjs/index.js",
@@ -20,7 +20,7 @@
20
20
  "eject": "react-scripts eject",
21
21
  "precommit": "lint-staged --allow-empty",
22
22
  "storybook": "storybook dev -p 6006",
23
- "build-storybook": "storybook build",
23
+ "build-storybook": "storybook build -o docs-build",
24
24
  "deploy-storybook": "gh-pages -d docs-build",
25
25
  "prettier": "prettier --write '**/*.{js,jsx}'",
26
26
  "prepare": "husky install"
@@ -131,5 +131,8 @@
131
131
  "prettier --write",
132
132
  "git add"
133
133
  ]
134
+ },
135
+ "resolutions": {
136
+ "jackspeak": "2.1.1"
134
137
  }
135
138
  }