react-restyle-components 0.1.90 → 0.1.91

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.
Files changed (114) hide show
  1. package/lib/package.json +7 -8
  2. package/package.json +7 -8
  3. package/lib/cjs/index.d.ts +0 -2
  4. package/lib/cjs/index.js +0 -18
  5. package/lib/cjs/src/App.d.ts +0 -4
  6. package/lib/cjs/src/App.js +0 -24
  7. package/lib/cjs/src/__mocks__/styleMock.d.ts +0 -1
  8. package/lib/cjs/src/__mocks__/styleMock.js +0 -2
  9. package/lib/cjs/src/core-components/atoms/buttons/button.stories.d.ts +0 -6
  10. package/lib/cjs/src/core-components/atoms/buttons/button.stories.js +0 -42
  11. package/lib/cjs/src/core-components/atoms/buttons/buttons.component.d.ts +0 -11
  12. package/lib/cjs/src/core-components/atoms/buttons/buttons.component.js +0 -15
  13. package/lib/cjs/src/core-components/atoms/check-box/checkBox.component.d.ts +0 -11
  14. package/lib/cjs/src/core-components/atoms/check-box/checkBox.component.js +0 -47
  15. package/lib/cjs/src/core-components/atoms/check-box/checkBox.stories.d.ts +0 -6
  16. package/lib/cjs/src/core-components/atoms/check-box/checkBox.stories.js +0 -26
  17. package/lib/cjs/src/core-components/atoms/date-picker/date-picker.component.d.ts +0 -13
  18. package/lib/cjs/src/core-components/atoms/date-picker/date-picker.component.js +0 -52
  19. package/lib/cjs/src/core-components/atoms/date-picker/date-picker.stories.d.ts +0 -6
  20. package/lib/cjs/src/core-components/atoms/date-picker/date-picker.stories.js +0 -24
  21. package/lib/cjs/src/core-components/atoms/form/form.component.d.ts +0 -102
  22. package/lib/cjs/src/core-components/atoms/form/form.component.js +0 -192
  23. package/lib/cjs/src/core-components/atoms/icons/icons.component.d.ts +0 -11
  24. package/lib/cjs/src/core-components/atoms/icons/icons.component.js +0 -66
  25. package/lib/cjs/src/core-components/atoms/icons/icons.stories.d.ts +0 -6
  26. package/lib/cjs/src/core-components/atoms/icons/icons.stories.js +0 -22
  27. package/lib/cjs/src/core-components/atoms/input/input-otp.component.d.ts +0 -15
  28. package/lib/cjs/src/core-components/atoms/input/input-otp.component.js +0 -88
  29. package/lib/cjs/src/core-components/atoms/input/input-pin.component.d.ts +0 -16
  30. package/lib/cjs/src/core-components/atoms/input/input-pin.component.js +0 -107
  31. package/lib/cjs/src/core-components/atoms/input/input-pin.stories.d.ts +0 -6
  32. package/lib/cjs/src/core-components/atoms/input/input-pin.stories.js +0 -23
  33. package/lib/cjs/src/core-components/atoms/input/input.component.d.ts +0 -19
  34. package/lib/cjs/src/core-components/atoms/input/input.component.js +0 -45
  35. package/lib/cjs/src/core-components/atoms/input/input.stories.d.ts +0 -6
  36. package/lib/cjs/src/core-components/atoms/input/input.stories.js +0 -24
  37. package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.component.d.ts +0 -11
  38. package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.component.js +0 -64
  39. package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.stories.d.ts +0 -6
  40. package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.stories.js +0 -20
  41. package/lib/cjs/src/core-components/atoms/loader/loader.component.d.ts +0 -4
  42. package/lib/cjs/src/core-components/atoms/loader/loader.component.js +0 -61
  43. package/lib/cjs/src/core-components/atoms/loader/loader.stories.d.ts +0 -6
  44. package/lib/cjs/src/core-components/atoms/loader/loader.stories.js +0 -16
  45. package/lib/cjs/src/core-components/atoms/radio/radio.component.d.ts +0 -10
  46. package/lib/cjs/src/core-components/atoms/radio/radio.component.js +0 -49
  47. package/lib/cjs/src/core-components/atoms/radio/radio.stories.d.ts +0 -6
  48. package/lib/cjs/src/core-components/atoms/radio/radio.stories.js +0 -25
  49. package/lib/cjs/src/core-components/atoms/stepper/stepper.component.d.ts +0 -10
  50. package/lib/cjs/src/core-components/atoms/stepper/stepper.component.js +0 -42
  51. package/lib/cjs/src/core-components/atoms/stepper/stepper.stories.d.ts +0 -6
  52. package/lib/cjs/src/core-components/atoms/stepper/stepper.stories.js +0 -21
  53. package/lib/cjs/src/core-components/atoms/tabs/tabs.component.d.ts +0 -11
  54. package/lib/cjs/src/core-components/atoms/tabs/tabs.component.js +0 -46
  55. package/lib/cjs/src/core-components/atoms/tabs/tabs.stories.d.ts +0 -6
  56. package/lib/cjs/src/core-components/atoms/tabs/tabs.stories.js +0 -25
  57. package/lib/cjs/src/core-components/atoms/timer/timer.component.d.ts +0 -7
  58. package/lib/cjs/src/core-components/atoms/timer/timer.component.js +0 -106
  59. package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.d.ts +0 -10
  60. package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.js +0 -56
  61. package/lib/cjs/src/core-components/atoms/tooltip/tooltip.stories.d.ts +0 -6
  62. package/lib/cjs/src/core-components/atoms/tooltip/tooltip.stories.js +0 -16
  63. package/lib/cjs/src/core-components/index.d.ts +0 -25
  64. package/lib/cjs/src/core-components/index.js +0 -54
  65. package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +0 -18
  66. package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +0 -119
  67. package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.d.ts +0 -6
  68. package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.stories.js +0 -48
  69. package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +0 -17
  70. package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +0 -120
  71. package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.d.ts +0 -6
  72. package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.stories.js +0 -31
  73. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.d.ts +0 -10
  74. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.js +0 -166
  75. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.test.d.ts +0 -1
  76. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.component.test.js +0 -14
  77. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.stories.d.ts +0 -6
  78. package/lib/cjs/src/core-components/molecules/auto-complete-group-by/auto-complete-group-by.stories.js +0 -41
  79. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.d.ts +0 -9
  80. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.js +0 -146
  81. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.spec.d.ts +0 -1
  82. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.spec.js +0 -72
  83. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.stories.d.ts +0 -6
  84. package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.stories.js +0 -20
  85. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.component.d.ts +0 -12
  86. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.component.js +0 -124
  87. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.d.ts +0 -6
  88. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.stories.js +0 -16
  89. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-properties.d.ts +0 -8931
  90. package/lib/cjs/src/core-components/molecules/css-multiline-input/css-properties.js +0 -164
  91. package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.component.d.ts +0 -12
  92. package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.component.js +0 -60
  93. package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.stories.d.ts +0 -6
  94. package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.stories.js +0 -23
  95. package/lib/cjs/src/core-components/molecules/multi-select/multi-select.component.d.ts +0 -9
  96. package/lib/cjs/src/core-components/molecules/multi-select/multi-select.component.js +0 -78
  97. package/lib/cjs/src/core-components/molecules/multi-select/multi-select.stories.d.ts +0 -6
  98. package/lib/cjs/src/core-components/molecules/multi-select/multi-select.stories.js +0 -22
  99. package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.d.ts +0 -10
  100. package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.component.js +0 -88
  101. package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.d.ts +0 -6
  102. package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.stories.js +0 -23
  103. package/lib/cjs/src/core-utils/index.d.ts +0 -1
  104. package/lib/cjs/src/core-utils/index.js +0 -17
  105. package/lib/cjs/src/core-utils/unit-test.utils.d.ts +0 -4
  106. package/lib/cjs/src/core-utils/unit-test.utils.js +0 -16
  107. package/lib/cjs/src/index.d.ts +0 -1
  108. package/lib/cjs/src/index.js +0 -17
  109. package/lib/cjs/src/library/assets/svg/index.d.ts +0 -9
  110. package/lib/cjs/src/library/assets/svg/index.js +0 -40
  111. package/lib/cjs/src/reportWebVitals.d.ts +0 -3
  112. package/lib/cjs/src/reportWebVitals.js +0 -37
  113. package/lib/cjs/src/setupTests.d.ts +0 -1
  114. package/lib/cjs/src/setupTests.js +0 -7
package/lib/package.json CHANGED
@@ -1,20 +1,24 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
- "main": "lib/index.js",
7
6
  "author": {
8
7
  "email": "onlyappasaheb4@gmail.com",
9
8
  "name": "Lakade Appasaheb",
10
9
  "url": "http://github.com/appasaheb4"
11
10
  },
12
11
  "license": "MIT",
12
+ "main": "./lib/index.js",
13
+ "types": "./lib/index.d.ts",
14
+ "files": [
15
+ "/lib"
16
+ ],
13
17
  "scripts": {
14
18
  "start": "serve -s ./build",
15
19
  "dev": "craco start",
16
20
  "serve-webapp": "craco build && craco start",
17
- "build": "rm -rf lib && chmod +x npm-publish.sh && sh ./npm-publish.sh && tsc -p tsconfig.json & tsc -p tsconfig-cjs.json",
21
+ "build": "rm -rf ./lib && tsc && chmod +x npm-publish.sh && sh ./npm-publish.sh",
18
22
  "test": "jest",
19
23
  "eject": "react-scripts eject",
20
24
  "precommit": "lint-staged --allow-empty",
@@ -95,11 +99,6 @@
95
99
  "ts-jest": "^29.2.5",
96
100
  "webpack": "^5.72.0"
97
101
  },
98
- "files": [
99
- "*.md",
100
- "dist",
101
- "lib"
102
- ],
103
102
  "eslintConfig": {
104
103
  "extends": [
105
104
  "react-app",
package/package.json CHANGED
@@ -1,20 +1,24 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
- "main": "lib/index.js",
7
6
  "author": {
8
7
  "email": "onlyappasaheb4@gmail.com",
9
8
  "name": "Lakade Appasaheb",
10
9
  "url": "http://github.com/appasaheb4"
11
10
  },
12
11
  "license": "MIT",
12
+ "main": "./lib/index.js",
13
+ "types": "./lib/index.d.ts",
14
+ "files": [
15
+ "/lib"
16
+ ],
13
17
  "scripts": {
14
18
  "start": "serve -s ./build",
15
19
  "dev": "craco start",
16
20
  "serve-webapp": "craco build && craco start",
17
- "build": "rm -rf lib && chmod +x npm-publish.sh && sh ./npm-publish.sh && tsc -p tsconfig.json & tsc -p tsconfig-cjs.json",
21
+ "build": "rm -rf ./lib && tsc && chmod +x npm-publish.sh && sh ./npm-publish.sh",
18
22
  "test": "jest",
19
23
  "eject": "react-scripts eject",
20
24
  "precommit": "lint-staged --allow-empty",
@@ -95,11 +99,6 @@
95
99
  "ts-jest": "^29.2.5",
96
100
  "webpack": "^5.72.0"
97
101
  },
98
- "files": [
99
- "*.md",
100
- "dist",
101
- "lib"
102
- ],
103
102
  "eslintConfig": {
104
103
  "extends": [
105
104
  "react-app",
@@ -1,2 +0,0 @@
1
- import './tc.css';
2
- export * from './src/core-components';
package/lib/cjs/index.js DELETED
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- require("./tc.css");
18
- __exportStar(require("./src/core-components"), exports);
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './App.css';
3
- declare function App(): React.JSX.Element;
4
- export default App;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const react_1 = __importDefault(require("react"));
7
- require("./App.css");
8
- const core_components_1 = require("./core-components");
9
- function App() {
10
- return (react_1.default.createElement("div", null,
11
- react_1.default.createElement("p", { style: { margin: '0 0 10px 0' } }, "Autocomplete Comp."),
12
- react_1.default.createElement(core_components_1.Autocomplete, { value: "", onValueChange: () => { }, options: ['One', 'Two', 'Three', 'Four', 'Five', 'Six'] }),
13
- react_1.default.createElement(core_components_1.AutocompleteGroupBy, { data: [
14
- {
15
- title: 'Country',
16
- code: 'C',
17
- children: [
18
- { title: 'India', code: 'I' },
19
- { title: 'United States', code: 'US' },
20
- ],
21
- },
22
- ] })));
23
- }
24
- exports.default = App;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { Button } from './buttons.component';
3
- declare const meta: Meta<typeof Button>;
4
- export default meta;
5
- type Story = StoryObj<typeof Button>;
6
- export declare const Primary: Story;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Primary = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const buttons_component_1 = require("./buttons.component");
9
- // import {Title, Component, Source, Canvas, ArgTypes} from '@storybook/blocks';
10
- const test_1 = require("@storybook/test");
11
- const meta = {
12
- title: 'Design System/Atoms/Button',
13
- component: buttons_component_1.Button,
14
- tags: ['autodocs'],
15
- args: {
16
- className: 'w-40',
17
- },
18
- parameters: {
19
- componentSubtitle: `import { Button } from 'react-restyle-components'`,
20
- },
21
- };
22
- exports.default = meta;
23
- exports.Primary = {
24
- // parameters: {
25
- // backgrounds: {
26
- // default: 'dark',
27
- // },
28
- // },
29
- args: {
30
- disable: false,
31
- type: 'solid' || 'outline',
32
- children: react_1.default.createElement("span", null, "Primary"),
33
- onClick: (0, test_1.fn)(),
34
- },
35
- };
36
- // export const Disable: Story = {
37
- // args: {
38
- // ...Primary.args,
39
- // children: <span>Disable</span>,
40
- // disable: true,
41
- // },
42
- // };
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import '../../../tc.css';
3
- interface ButtonProps {
4
- type?: 'solid' | 'outline';
5
- className?: any;
6
- disable?: boolean;
7
- onClick: () => void;
8
- children: React.ReactNode;
9
- }
10
- export declare const Button: ({ type, className, disable, onClick, children, }: ButtonProps) => React.JSX.Element;
11
- export {};
@@ -1,15 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Button = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- require("../../../tc.css");
9
- const Button = ({ type = 'solid', className = 'w-40', disable = false, onClick, children, }) => {
10
- const buttonColorClass = type === 'solid'
11
- ? 'text-white bg-[#007BFF] hover:bg-[#007BFF] hover:shadow-lg text-white'
12
- : 'dark:text-white text-black border border-gray-400 hover:shadow-lg';
13
- return (react_1.default.createElement("button", { "data-testid": "buttonElement", disabled: disable, className: `${className} rounded-100px px-3 py-1 text-md ${buttonColorClass} pt-2 pb-2 font-nunitoSansRegular ${disable ? 'opacity-50' : 'opacity-100'}`, onClick: () => onClick() }, children));
14
- };
15
- exports.Button = Button;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import '../../../tc.css';
3
- interface CheckBoxProps {
4
- title: string;
5
- data: Array<any>;
6
- className?: string;
7
- disable?: boolean;
8
- onChange: (items: any) => void;
9
- }
10
- export declare const CheckBox: ({ title, data, className, onChange, }: CheckBoxProps) => React.JSX.Element;
11
- export {};
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.CheckBox = void 0;
27
- const react_1 = __importStar(require("react"));
28
- require("../../../tc.css");
29
- const svg_1 = require("../../../library/assets/svg");
30
- const form_component_1 = require("../form/form.component");
31
- const CheckBox = ({ title = 'Banks', data = [{ title: 'SBI Bank', checked: false }], className, onChange, }) => {
32
- const [list, setList] = (0, react_1.useState)(data);
33
- const width = 20;
34
- return (react_1.default.createElement(form_component_1.InputWrapper, { label: title }, list?.map((item, index) => (react_1.default.createElement("div", { className: `${className} flex flex-row items-center `, onClick: () => {
35
- const result = list?.map((e, i) => {
36
- if (i === index)
37
- return { ...e, checked: !item.checked };
38
- else
39
- return { ...e };
40
- });
41
- setList(result);
42
- onChange(result?.filter((item) => item.checked));
43
- }, key: index },
44
- react_1.default.createElement("div", { className: "flex mt-1" }, item.checked ? (react_1.default.createElement(svg_1.CheckedBox, { width: width, height: width, fill: "#E7503D", stroke: "E7503D" })) : (react_1.default.createElement(svg_1.UnCheckbox, { width: width, height: width }))),
45
- react_1.default.createElement("span", null, item?.title))))));
46
- };
47
- exports.CheckBox = CheckBox;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { CheckBox } from './checkBox.component';
3
- declare const meta: Meta<typeof CheckBox>;
4
- export default meta;
5
- type Story = StoryObj<typeof CheckBox>;
6
- export declare const Primary: Story;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Primary = void 0;
4
- const checkBox_component_1 = require("./checkBox.component");
5
- const meta = {
6
- title: 'Design System/Atoms/CheckBox',
7
- component: checkBox_component_1.CheckBox,
8
- tags: ['autodocs'],
9
- parameters: {
10
- componentSubtitle: `import { CheckBox } from 'react-restyle-components'`,
11
- },
12
- };
13
- exports.default = meta;
14
- exports.Primary = {
15
- args: {
16
- title: 'Banks',
17
- data: [
18
- { title: 'SBI Bank', checked: false },
19
- { title: 'ICICI Bank', checked: false },
20
- ],
21
- disable: false,
22
- onChange: (item) => {
23
- console.log({ item });
24
- },
25
- },
26
- };
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import '../../../tc.css';
3
- import 'react-datepicker/dist/react-datepicker.css';
4
- interface DatePickerProps {
5
- title: string;
6
- value?: string;
7
- className?: string;
8
- disable?: boolean;
9
- showFormat?: string;
10
- placeholder?: string;
11
- }
12
- export declare const DatePickerComp: ({ title, className, disable, value, showFormat, placeholder, }: DatePickerProps) => React.JSX.Element;
13
- export {};
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.DatePickerComp = void 0;
30
- const react_1 = __importStar(require("react"));
31
- require("../../../tc.css");
32
- const react_datepicker_1 = __importDefault(require("react-datepicker"));
33
- require("react-datepicker/dist/react-datepicker.css");
34
- const svg_1 = require("../../../library/assets/svg");
35
- const dayjs_1 = __importDefault(require("dayjs"));
36
- const form_component_1 = require("../form/form.component");
37
- const DatePickerComp = ({ title = 'Title', className, disable, value, showFormat = 'yyyy-MM-dd', placeholder = 'Select Date', }) => {
38
- const [pickedDate, setPickedDate] = (0, react_1.useState)(value && (0, dayjs_1.default)(value).toDate());
39
- const CustomInput = (0, react_1.forwardRef)((props, ref) => {
40
- return (react_1.default.createElement("div", { onClick: !disable && props.onClick, ref: ref, className: " border-gray-light place-items-center border rounded-md px-2 flex " },
41
- react_1.default.createElement("label", { className: "mr-3 font-nunitoSansRegular text-primaryCharcoal text-lg" }, props.value || props.placeholder),
42
- react_1.default.createElement(svg_1.DatePickerSvg, { width: 15, height: 15 })));
43
- });
44
- CustomInput.displayName = 'CustomInput';
45
- const handleChanges = (date) => {
46
- setPickedDate(date);
47
- };
48
- return (react_1.default.createElement(form_component_1.InputWrapper, { label: title },
49
- react_1.default.createElement("div", { className: `${className} flex zIndex-999` },
50
- react_1.default.createElement(react_datepicker_1.default, { selected: pickedDate || new Date(), dateFormat: showFormat, placeholder: placeholder, onChange: handleChanges, customInput: react_1.default.createElement(CustomInput, null) }))));
51
- };
52
- exports.DatePickerComp = DatePickerComp;
@@ -1,6 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { DatePickerComp } from './date-picker.component';
3
- declare const meta: Meta<typeof DatePickerComp>;
4
- export default meta;
5
- type Story = StoryObj<typeof DatePickerComp>;
6
- export declare const Primary: Story;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Primary = void 0;
7
- const dayjs_1 = __importDefault(require("dayjs"));
8
- const date_picker_component_1 = require("./date-picker.component");
9
- const meta = {
10
- title: 'Design System/Atoms/DatePicker',
11
- component: date_picker_component_1.DatePickerComp,
12
- tags: ['autodocs'],
13
- parameters: {
14
- componentSubtitle: `import { DatePickerComp } from 'react-restyle-components'`,
15
- },
16
- };
17
- exports.default = meta;
18
- exports.Primary = {
19
- args: {
20
- title: 'Date',
21
- value: (0, dayjs_1.default)().format('YYYY-MM-DD'),
22
- showFormat: 'dd-MM-yyyy',
23
- },
24
- };
@@ -1,102 +0,0 @@
1
- import React from 'react';
2
- import '../../../tc.css';
3
- import '../../../tc.css';
4
- interface LabelProps {
5
- htmlFor: string;
6
- hasError?: boolean;
7
- style?: any;
8
- children?: React.ReactNode;
9
- }
10
- export declare const Label: React.FunctionComponent<LabelProps>;
11
- interface InputWrapperProps {
12
- id?: string;
13
- label?: string;
14
- className?: string;
15
- hasError?: boolean;
16
- style?: any;
17
- ref?: any;
18
- children?: React.ReactNode;
19
- }
20
- export declare const InputWrapper: React.FunctionComponent<InputWrapperProps>;
21
- interface InputProps extends InputWrapperProps {
22
- value?: any;
23
- defaultValue?: any;
24
- name?: string;
25
- placeholder?: string;
26
- type?: string;
27
- required?: boolean;
28
- disabled?: boolean;
29
- className?: string;
30
- labelClassName?: string;
31
- rows?: number;
32
- style?: any;
33
- wrapperStyle?: any;
34
- hasError?: boolean;
35
- pattern?: any;
36
- maxLength?: number;
37
- isAutoFocus?: boolean;
38
- input2isBlurEnable?: boolean;
39
- onChange?: (e: any) => void;
40
- onBlur?: (e: any) => void;
41
- onKeyDown?: (e: any) => void;
42
- onKeyUp?: (e: any) => void;
43
- inputRef?: any;
44
- }
45
- export declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
46
- export declare const InputPassword: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
47
- export declare const Input1: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
48
- export declare const Input2: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<any>>;
49
- export declare const MultilineInput: (props: InputProps) => React.JSX.Element;
50
- export declare const MultilineInput1: (props: InputProps) => React.JSX.Element;
51
- interface InputRadioProps extends InputWrapperProps {
52
- values?: any[];
53
- value?: string;
54
- name?: string;
55
- required?: boolean;
56
- disabled?: boolean;
57
- labelStyle?: any;
58
- onChange?: (e: any) => void;
59
- }
60
- export declare const InputRadio: (props: InputRadioProps) => React.JSX.Element;
61
- interface InputDateProps extends InputWrapperProps {
62
- value?: any;
63
- name?: string;
64
- placeholder?: string;
65
- disabled?: boolean;
66
- hasError?: boolean;
67
- format?: string;
68
- use12Hours?: boolean;
69
- isCalenderOpen?: boolean;
70
- minDate?: Date;
71
- maxDate?: Date;
72
- onChange?: (e: any) => void;
73
- onCalendarToggle?: (status: boolean) => void;
74
- onFocusRemove?: (date: any) => void;
75
- }
76
- export declare const InputDate: ({ name, value, placeholder, use12Hours, label, id, hasError, disabled, format, onChange, onFocusRemove, }: InputDateProps) => React.JSX.Element;
77
- export declare const CheckBox: (props: any) => React.JSX.Element;
78
- interface InputFileProps extends InputWrapperProps {
79
- value?: any;
80
- name?: string;
81
- placeholder?: string;
82
- disabled?: boolean;
83
- accept?: string;
84
- multiple?: boolean;
85
- hasError?: boolean;
86
- onChange?: (e: any) => void;
87
- }
88
- export declare const InputFile: (props: InputFileProps) => React.JSX.Element;
89
- interface ToggleProps extends InputWrapperProps {
90
- disabled?: boolean;
91
- isToggleLabel?: boolean;
92
- defaultChecked?: boolean;
93
- className?: string;
94
- icons?: any;
95
- value?: boolean;
96
- name?: string;
97
- onChange?: (e: boolean) => void;
98
- style?: any;
99
- }
100
- export declare const Toggle: (props: ToggleProps) => React.JSX.Element;
101
- export declare const DeliveryScheduleToggle: (props: ToggleProps) => React.JSX.Element;
102
- export {};