labsense-ui-kit 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.
- package/README.md +53 -0
- package/dist/Buttons/Button.d.ts +21 -0
- package/dist/Buttons/index.d.ts +2 -0
- package/dist/Inputs/Input.d.ts +20 -0
- package/dist/Inputs/index.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +189 -0
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +185 -0
- package/dist/index.modern.js.map +1 -0
- package/package.json +85 -0
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# labSense UI KIT LIBRARY
|
|
2
|
+
|
|
3
|
+
labSense UI KIT is a UI components library created in react for faster web applications development.
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
If you want to run the project follow the next steps
|
|
8
|
+
|
|
9
|
+
- Clone repository
|
|
10
|
+
```
|
|
11
|
+
git clone https://gitlab.com/chirag.jain5/labsense-ui-kit
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
- Install with npm version 8 node 16 or above from the root folder
|
|
15
|
+
```
|
|
16
|
+
npm install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- If you want to run the example project, run library workspace first and then the example workspace in a different terminal
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
// Terminal 1
|
|
23
|
+
|
|
24
|
+
npm start --workspace=packages/ui-lib
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
// Terminal 2
|
|
29
|
+
|
|
30
|
+
npm start --workspace=packages/example
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- If you want to run the storybook
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
// Terminal 3
|
|
37
|
+
|
|
38
|
+
npm start --workspace=packages/storybook
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Icons
|
|
42
|
+
|
|
43
|
+
The icons used in this UI Kit are licensed from [Streamline Icons](https://streamlineicons.com/). We are able to provide a limited set in this kit with as per our license agreement. If you wish to extend the icons included in this kit yourself, we highly recommend checking those out if you want to keep a consistent style.
|
|
44
|
+
|
|
45
|
+
We tend to use the regular weighted icons and process them first to ungroup them. Then we use the above command to process them for inclusion in the UI Kit.
|
|
46
|
+
|
|
47
|
+
## License
|
|
48
|
+
|
|
49
|
+
The labSense UI Kit is released under the [MIT license](../../LICENSE.md).
|
|
50
|
+
|
|
51
|
+
Please note however that the icon set included in this software is included under license and remains property of Webalys LLC. These icons can be used only in the context of this open source project. For more information regarding this license, see [Streamline Icons Premium License](https://help.streamlineicons.com/license-premium).
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
onClick?: () => void;
|
|
4
|
+
svg?: React.ReactNode;
|
|
5
|
+
text: string;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
background?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
fontWeight?: string;
|
|
11
|
+
fontStyle?: string;
|
|
12
|
+
fontSize?: string;
|
|
13
|
+
fontFamily?: string;
|
|
14
|
+
lineHeight?: string;
|
|
15
|
+
border?: string;
|
|
16
|
+
borderRadius?: string;
|
|
17
|
+
padding?: string;
|
|
18
|
+
gap?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const MultiFunctionButtonComponent: React.FC<ButtonProps>;
|
|
21
|
+
export default MultiFunctionButtonComponent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface InputProps {
|
|
3
|
+
type?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
width?: string;
|
|
6
|
+
height?: string;
|
|
7
|
+
borderColor?: string;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
fontColor?: string;
|
|
10
|
+
fontSize?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
interface UserDetailsBoxProps extends InputProps {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
onChange: (value: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const Input: ({ label, type, placeholder, width, height, borderColor, backgroundColor, fontColor, fontSize, value, onChange, }: UserDetailsBoxProps) => React.JSX.Element;
|
|
20
|
+
export default Input;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var React__default = _interopDefault(React);
|
|
5
|
+
var styled = _interopDefault(require('styled-components'));
|
|
6
|
+
|
|
7
|
+
function _taggedTemplateLiteralLoose(e, t) {
|
|
8
|
+
return t || (t = e.slice(0)), e.raw = t, e;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
12
|
+
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
13
|
+
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n padding: ", ";\n box-sizing : border-box;\n gap: ", ";\n border: ", ";\n border-radius: ", ";\n outline : none;\n background: ", "; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n opacity : 0.8;\n\n &:hover{\n opacity : 1;\n // border: ", ";\n }\n\n &:focus {\n outline: none;\n // border : none;\n }\n"])), function (_ref) {
|
|
14
|
+
var width = _ref.width;
|
|
15
|
+
return width || "max-content";
|
|
16
|
+
}, function (_ref2) {
|
|
17
|
+
var height = _ref2.height;
|
|
18
|
+
return height || "42px";
|
|
19
|
+
}, function (_ref3) {
|
|
20
|
+
var padding = _ref3.padding;
|
|
21
|
+
return padding || '10px 16px';
|
|
22
|
+
}, function (_ref4) {
|
|
23
|
+
var gap = _ref4.gap;
|
|
24
|
+
return gap || '10px';
|
|
25
|
+
}, function (_ref5) {
|
|
26
|
+
var border = _ref5.border;
|
|
27
|
+
return border || 'none';
|
|
28
|
+
}, function (_ref6) {
|
|
29
|
+
var borderRadius = _ref6.borderRadius;
|
|
30
|
+
return borderRadius || '1000px';
|
|
31
|
+
}, function (_ref7) {
|
|
32
|
+
var background = _ref7.background;
|
|
33
|
+
return background || " #4c9eeb;";
|
|
34
|
+
}, function (_ref8) {
|
|
35
|
+
var border = _ref8.border;
|
|
36
|
+
return border || 'none';
|
|
37
|
+
});
|
|
38
|
+
var ButtonText = styled.p(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n white-space : nowrap;\n"])), function (_ref9) {
|
|
39
|
+
var fontFamily = _ref9.fontFamily;
|
|
40
|
+
return fontFamily || 'Noto Sans';
|
|
41
|
+
}, function (_ref10) {
|
|
42
|
+
var fontSize = _ref10.fontSize;
|
|
43
|
+
return fontSize || '18px';
|
|
44
|
+
}, function (_ref11) {
|
|
45
|
+
var fontWeight = _ref11.fontWeight;
|
|
46
|
+
return fontWeight || '500';
|
|
47
|
+
}, function (_ref12) {
|
|
48
|
+
var lineHeight = _ref12.lineHeight;
|
|
49
|
+
return lineHeight || '18px';
|
|
50
|
+
}, function (_ref13) {
|
|
51
|
+
var color = _ref13.color;
|
|
52
|
+
return color || '#ffffff';
|
|
53
|
+
});
|
|
54
|
+
var MultiFunctionButtonComponent = function MultiFunctionButtonComponent(_ref14) {
|
|
55
|
+
var onClick = _ref14.onClick,
|
|
56
|
+
text = _ref14.text,
|
|
57
|
+
width = _ref14.width,
|
|
58
|
+
height = _ref14.height,
|
|
59
|
+
background = _ref14.background,
|
|
60
|
+
color = _ref14.color,
|
|
61
|
+
border = _ref14.border,
|
|
62
|
+
borderRadius = _ref14.borderRadius,
|
|
63
|
+
fontWeight = _ref14.fontWeight,
|
|
64
|
+
fontSize = _ref14.fontSize,
|
|
65
|
+
fontFamily = _ref14.fontFamily,
|
|
66
|
+
lineHeight = _ref14.lineHeight,
|
|
67
|
+
padding = _ref14.padding,
|
|
68
|
+
svg = _ref14.svg,
|
|
69
|
+
gap = _ref14.gap;
|
|
70
|
+
return React__default.createElement(Container, null, React__default.createElement(Button, {
|
|
71
|
+
onClick: onClick,
|
|
72
|
+
width: width,
|
|
73
|
+
height: height,
|
|
74
|
+
background: background,
|
|
75
|
+
border: border,
|
|
76
|
+
borderRadius: borderRadius,
|
|
77
|
+
padding: padding,
|
|
78
|
+
gap: gap
|
|
79
|
+
}, svg, React__default.createElement(ButtonText, {
|
|
80
|
+
color: color,
|
|
81
|
+
fontFamily: fontFamily,
|
|
82
|
+
fontSize: fontSize,
|
|
83
|
+
fontWeight: fontWeight,
|
|
84
|
+
lineHeight: lineHeight
|
|
85
|
+
}, text)));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var _templateObject$1, _templateObject2$1, _templateObject3$1;
|
|
89
|
+
var InputContainer = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n position: relative; \n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n display: flex; \n flex-direction: column;\n justify-content: center; \n"])), function (_ref) {
|
|
90
|
+
var width = _ref.width;
|
|
91
|
+
return width || "100%";
|
|
92
|
+
}, function (_ref2) {
|
|
93
|
+
var height = _ref2.height;
|
|
94
|
+
return height || "54px";
|
|
95
|
+
}, function (_ref3) {
|
|
96
|
+
var borderRadius = _ref3.borderRadius;
|
|
97
|
+
return borderRadius || "4px";
|
|
98
|
+
}, function (_ref4) {
|
|
99
|
+
var border = _ref4.border;
|
|
100
|
+
return border ? 'border' : '#657786';
|
|
101
|
+
}, function (_ref5) {
|
|
102
|
+
var backgroundColor = _ref5.backgroundColor;
|
|
103
|
+
return backgroundColor || 'transparent';
|
|
104
|
+
});
|
|
105
|
+
var WrittenTextAfterInput = styled.p(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n position: relative; \n top: 9px;\n left: 8px;\n width: auto;\n height: auto;\n font-family: Noto Sans;\n font-size: 14px;\n font-weight: 400;\n line-height: 14px;\n text-align: left;\n color: #4c9eeb;\n margin: 2px;\n visibility: ", ";\n"])), function (_ref6) {
|
|
106
|
+
var show = _ref6.show;
|
|
107
|
+
return show ? "visible" : "hidden";
|
|
108
|
+
});
|
|
109
|
+
var InputBlock = styled.input(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n padding: ", ";\n box-sizing: border-box;\n font-family: Noto Sans;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n text-align: left;\n outline: none;\n\n ::placeholder {\n color: ", ";\n }\n"])), function (_ref7) {
|
|
110
|
+
var width = _ref7.width;
|
|
111
|
+
return width || "100%";
|
|
112
|
+
}, function (_ref8) {
|
|
113
|
+
var height = _ref8.height;
|
|
114
|
+
return height || "54px";
|
|
115
|
+
}, function (_ref9) {
|
|
116
|
+
var borderRadius = _ref9.borderRadius;
|
|
117
|
+
return borderRadius || "4px";
|
|
118
|
+
}, function (_ref10) {
|
|
119
|
+
var borderColor = _ref10.borderColor;
|
|
120
|
+
return borderColor || "transparent";
|
|
121
|
+
}, function (_ref11) {
|
|
122
|
+
var backgroundColor = _ref11.backgroundColor;
|
|
123
|
+
return backgroundColor || "transparent";
|
|
124
|
+
}, function (_ref12) {
|
|
125
|
+
var fontColor = _ref12.fontColor;
|
|
126
|
+
return fontColor || "#14171A";
|
|
127
|
+
}, function (_ref13) {
|
|
128
|
+
var padding = _ref13.padding;
|
|
129
|
+
return padding || "8px";
|
|
130
|
+
}, function (_ref14) {
|
|
131
|
+
var fontSize = _ref14.fontSize;
|
|
132
|
+
return fontSize || "16px";
|
|
133
|
+
}, function (_ref15) {
|
|
134
|
+
var fontWeight = _ref15.fontWeight;
|
|
135
|
+
return fontWeight || 400;
|
|
136
|
+
}, function (_ref16) {
|
|
137
|
+
var lineHeight = _ref16.lineHeight;
|
|
138
|
+
return lineHeight || '16px';
|
|
139
|
+
}, function (_ref17) {
|
|
140
|
+
var fontColor = _ref17.fontColor;
|
|
141
|
+
return fontColor || "#AABBCC";
|
|
142
|
+
});
|
|
143
|
+
var Input = function Input(_ref18) {
|
|
144
|
+
var label = _ref18.label,
|
|
145
|
+
type = _ref18.type,
|
|
146
|
+
placeholder = _ref18.placeholder,
|
|
147
|
+
width = _ref18.width,
|
|
148
|
+
height = _ref18.height,
|
|
149
|
+
borderColor = _ref18.borderColor,
|
|
150
|
+
backgroundColor = _ref18.backgroundColor,
|
|
151
|
+
fontColor = _ref18.fontColor,
|
|
152
|
+
fontSize = _ref18.fontSize,
|
|
153
|
+
value = _ref18.value,
|
|
154
|
+
onChange = _ref18.onChange;
|
|
155
|
+
var _useState = React.useState(false),
|
|
156
|
+
blockText = _useState[0],
|
|
157
|
+
setBlockContent = _useState[1];
|
|
158
|
+
var inputRef = React.useRef(null);
|
|
159
|
+
var handleInputChange = function handleInputChange(e) {
|
|
160
|
+
setBlockContent(true);
|
|
161
|
+
var inputValue = e.target.value;
|
|
162
|
+
if (type === "phone" && inputValue.length > 10) {
|
|
163
|
+
inputValue = inputValue.slice(0, 10);
|
|
164
|
+
}
|
|
165
|
+
setBlockContent(inputValue.length > 0);
|
|
166
|
+
onChange(inputValue);
|
|
167
|
+
};
|
|
168
|
+
return React__default.createElement(InputContainer, {
|
|
169
|
+
width: width
|
|
170
|
+
}, React__default.createElement(WrittenTextAfterInput, {
|
|
171
|
+
show: blockText
|
|
172
|
+
}, label), React__default.createElement(InputBlock, {
|
|
173
|
+
ref: inputRef,
|
|
174
|
+
type: type === "phone" ? "tel" : type,
|
|
175
|
+
placeholder: placeholder || label,
|
|
176
|
+
width: width,
|
|
177
|
+
height: height,
|
|
178
|
+
borderColor: borderColor,
|
|
179
|
+
backgroundColor: backgroundColor,
|
|
180
|
+
fontColor: fontColor,
|
|
181
|
+
fontSize: fontSize,
|
|
182
|
+
value: value,
|
|
183
|
+
onChange: handleInputChange
|
|
184
|
+
}));
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
exports.Button = MultiFunctionButtonComponent;
|
|
188
|
+
exports.Input = Input;
|
|
189
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/Buttons/Button.tsx","../src/Inputs/Input.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\n\nconst Container = styled.div``;\n\nconst Button = styled.button<{\n width?: string;\n height?: string;\n background?: string;\n border?: string;\n borderRadius?: string;\n padding? : string;\n gap?: string;\n \n}>`\n width: ${({ width }) => width || \"max-content\"};\n height: ${({ height }) => height || \"42px\"};\n padding: ${({padding})=> padding || '10px 16px'};\n box-sizing : border-box;\n gap: ${({gap}) => gap || '10px'};\n border: ${( {border} )=> border || 'none'};\n border-radius: ${( {borderRadius} )=> borderRadius || '1000px'};\n outline : none;\n background: ${({ background }) => background || \" #4c9eeb;\"}; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n opacity : 0.8;\n\n &:hover{\n opacity : 1;\n // border: ${( {border} )=> border || 'none'};\n }\n\n &:focus {\n outline: none;\n // border : none;\n }\n`;\n\nconst ButtonText = styled.p<{\n fontFamily?: string;\n fontSize?: string;\n fontWeight?: string;\n lineHeight?: string;\n color?: string;\n}>`\n font-family: ${({ fontFamily }) => fontFamily || 'Noto Sans'};\n font-size: ${( { fontSize } ) => fontSize || '18px'};\n font-weight: ${ ({ fontWeight }) => fontWeight || '500' };\n line-height: ${ ({ lineHeight }) => lineHeight || '18px' };\n color: ${ ({ color }) => color || '#ffffff' };\n white-space : nowrap;\n`;\n\ninterface ButtonProps {\n onClick?: () => void;\n svg?: React.ReactNode;\n text: string;\n width?: string;\n height? : string;\n background? : string;\n color? : string;\n fontWeight? : string;\n fontStyle? : string;\n fontSize? : string;\n fontFamily? : string;\n lineHeight? : string;\n border? : string;\n borderRadius? : string;\n padding? : string;\n gap?: string;\n};\n\nconst MultiFunctionButtonComponent: React.FC<ButtonProps> = ({\n onClick,\n text,\n width,\n height,\n background,\n color,\n border,\n borderRadius,\n fontWeight,\n fontSize,\n fontFamily,\n lineHeight,\n padding,\n svg,\n gap\n}) => {\n return (\n <Container>\n <Button \n onClick={onClick} \n width={width} \n height={height} \n background={background} \n border={border} \n borderRadius={borderRadius} \n padding={padding}\n gap={gap}\n >\n {svg}\n <ButtonText \n color={color} \n fontFamily={fontFamily} \n fontSize={fontSize} \n fontWeight={fontWeight} \n lineHeight={lineHeight}\n >\n {text}\n </ButtonText>\n </Button>\n </Container>\n );\n};\n\nexport default MultiFunctionButtonComponent;\n","import React, { useRef, useState } from \"react\";\nimport styled from \"styled-components\";\n\nconst InputContainer = styled.div<{\n width?: string;\n height?: string;\n border?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n padding?: string;\n borderRadius? : string;\n fontWeight? : string;\n lineHeight? : string\n }>`\n position: relative; \n width: ${({ width }) => width || \"100%\"};\n height: ${({ height }) => height || \"54px\"};\n border-radius: ${({ borderRadius }) => borderRadius || \"4px\"};\n border: 1px solid ${({ border }) => (border ? 'border' : '#657786')};\n background: ${({backgroundColor}) => backgroundColor || 'transparent'};\n display: flex; \n flex-direction: column;\n justify-content: center; \n`;\n\n\nconst WrittenTextAfterInput = styled.p<{ show: boolean }>`\n position: relative; \n top: 9px;\n left: 8px;\n width: auto;\n height: auto;\n font-family: Noto Sans;\n font-size: 14px;\n font-weight: 400;\n line-height: 14px;\n text-align: left;\n color: #4c9eeb;\n margin: 2px;\n visibility: ${({ show }) => (show ? \"visible\" : \"hidden\")};\n`;\n\nconst InputBlock = styled.input<{\n width?: string;\n height?: string;\n borderColor?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n padding?: string;\n borderRadius? : string;\n fontWeight? : string;\n lineHeight? : string\n}>`\n width: ${({ width }) => width || \"100%\"};\n height: ${({ height }) => height || \"54px\"};\n border-radius: ${({ borderRadius }) => borderRadius || \"4px\"};\n border: 1px solid ${({ borderColor }) => borderColor || \"transparent\"};\n background: ${({ backgroundColor }) => backgroundColor || \"transparent\"};\n color: ${({ fontColor }) => fontColor || \"#14171A\"};\n padding: ${({ padding }) => padding || \"8px\"};\n box-sizing: border-box;\n font-family: Noto Sans;\n font-size: ${({ fontSize }) => fontSize || \"16px\"};\n font-weight: ${({ fontWeight }) => fontWeight || 400};\n line-height: ${({ lineHeight }) => lineHeight || '16px'};\n text-align: left;\n outline: none;\n\n ::placeholder {\n color: ${({ fontColor }) => fontColor || \"#AABBCC\"};\n }\n`;\n\ninterface InputProps {\n type?: string;\n placeholder?: string;\n width?: string;\n height?: string;\n borderColor?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n value?: string;\n onChange: (value: string) => void;\n}\n\ninterface UserDetailsBoxProps extends InputProps {\n label: string; // To display label for each input block\n value: string;\n onChange: (value: string) => void; // Callback for change in the input value\n}\n\nconst Input = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: UserDetailsBoxProps) => {\n const [blockText, setBlockContent] = useState(false); // For showing the placeholder at top\n const inputRef = useRef<HTMLInputElement>(null);\n\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setBlockContent(true);\n let inputValue = e.target.value;\n\n if (type === \"phone\" && inputValue.length > 10) {\n inputValue = inputValue.slice(0, 10); // Limiting phone number to 10 digits\n }\n\n setBlockContent(inputValue.length > 0); // Show label at top when user starts typing\n onChange(inputValue); // Pass the input value back to the parent component\n };\n\n return (\n <InputContainer\n \n width={width}\n >\n <WrittenTextAfterInput show={blockText}>\n {label} \n </WrittenTextAfterInput>\n <InputBlock\n ref={inputRef}\n type={type === \"phone\" ? \"tel\" : type} // Use 'tel' for phone input\n placeholder={placeholder || label}\n width={width}\n height={height}\n borderColor={borderColor}\n backgroundColor={backgroundColor}\n fontColor={fontColor}\n fontSize={fontSize}\n value={value}\n onChange={handleInputChange}\n />\n </InputContainer>\n );\n};\n\nexport default Input;\n"],"names":["Container","styled","div","_templateObject","_taggedTemplateLiteralLoose","Button","button","_templateObject2","_ref","width","_ref2","height","_ref3","padding","_ref4","gap","_ref5","border","_ref6","borderRadius","_ref7","background","_ref8","ButtonText","p","_templateObject3","_ref9","fontFamily","_ref10","fontSize","_ref11","fontWeight","_ref12","lineHeight","_ref13","color","MultiFunctionButtonComponent","_ref14","onClick","text","svg","React","InputContainer","backgroundColor","WrittenTextAfterInput","show","InputBlock","input","borderColor","fontColor","_ref15","_ref16","_ref17","Input","_ref18","label","type","placeholder","value","onChange","_useState","useState","blockText","setBlockContent","inputRef","useRef","handleInputChange","e","inputValue","target","length","slice","ref"],"mappings":";;;;;;;;;;;AAGA,IAAMA,SAAS,GAAGC,MAAM,CAACC,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,2BAAA,QAAE;AAE9B,IAAMC,MAAM,GAAGJ,MAAM,CAACK,MAAM,CAAAC,gBAAA,KAAAA,gBAAA,GAAAH,2BAAA,6aAUjB,UAAAI,IAAA;EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;EAAA,OAAOA,KAAK,IAAI,aAAa;AAAA,GACpC,UAAAC,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAOA,MAAM,IAAI,MAAM;AAAA,GAC/B,UAAAC,KAAA;EAAA,IAAEC,OAAO,GAAAD,KAAA,CAAPC,OAAO;EAAA,OAAKA,OAAO,IAAI,WAAW;AAAA,GAExC,UAAAC,KAAA;EAAA,IAAEC,GAAG,GAAAD,KAAA,CAAHC,GAAG;EAAA,OAAMA,GAAG,IAAI,MAAM;AAAA,GACrB,UAAAC,KAAA;EAAA,IAAGC,MA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BA,CAAIC,CAAsC;IAC/DJ,eAAe,CAAC,IAAI,CAAC;IACrB,IAAIK,UAAU,GAAGD,CAAC,CAACE,MAAM,CAACX,KAAK;IAE/B,IAAIF,IAAI,KAAK,OAAO,IAAIY,UAAU,CAACE,MAAM,GAAG,EAAE,EAAE;MAC9CF,UAAU,GAAGA,UAAU,CAACG,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;;IAGtCR,eAAe,CAACK,UAAU,CAACE,MAAM,GAAG,CAAC,CAAC;IACtCX,QAAQ,CAACS,UAAU,CAAC;GACrB;EAED,OACE3B,6BAACC,cAAc;IAEbjC,KAAK,EAAEA;KAEPgC,6BAACG,qBAAqB;IAACC,IAAI,EAAEiB;KAC1BP,KAAK,CACgB,EACxBd,6BAACK,UAAU;IACT0B,GAAG,EAAER,QAAQ;IACbR,IAAI,EAAEA,IAAI,KAAK,OAAO,GAAG,KAAK,GAAGA,IAAI;IACrCC,WAAW,EAAEA,WAAW,IAAIF,KAAK;IACjC9C,KAAK,EAAEA,KAAK;IACZE,MAAM,EAAEA,MAAM;IACdqC,WAAW,EAAEA,WAAW;IACxBL,eAAe,EAAEA,eAAe;IAChCM,SAAS,EAAEA,SAAS;IACpBpB,QAAQ,EAAEA,QAAQ;IAClB6B,KAAK,EAAEA,KAAK;IACZC,QAAQ,EAAEO;IACV,CACa;AAErB,CAAC;;;;;"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
function _taggedTemplateLiteralLoose(e, t) {
|
|
5
|
+
return t || (t = e.slice(0)), e.raw = t, e;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
9
|
+
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
10
|
+
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n padding: ", ";\n box-sizing : border-box;\n gap: ", ";\n border: ", ";\n border-radius: ", ";\n outline : none;\n background: ", "; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n opacity : 0.8;\n\n &:hover{\n opacity : 1;\n // border: ", ";\n }\n\n &:focus {\n outline: none;\n // border : none;\n }\n"])), function (_ref) {
|
|
11
|
+
var width = _ref.width;
|
|
12
|
+
return width || "max-content";
|
|
13
|
+
}, function (_ref2) {
|
|
14
|
+
var height = _ref2.height;
|
|
15
|
+
return height || "42px";
|
|
16
|
+
}, function (_ref3) {
|
|
17
|
+
var padding = _ref3.padding;
|
|
18
|
+
return padding || '10px 16px';
|
|
19
|
+
}, function (_ref4) {
|
|
20
|
+
var gap = _ref4.gap;
|
|
21
|
+
return gap || '10px';
|
|
22
|
+
}, function (_ref5) {
|
|
23
|
+
var border = _ref5.border;
|
|
24
|
+
return border || 'none';
|
|
25
|
+
}, function (_ref6) {
|
|
26
|
+
var borderRadius = _ref6.borderRadius;
|
|
27
|
+
return borderRadius || '1000px';
|
|
28
|
+
}, function (_ref7) {
|
|
29
|
+
var background = _ref7.background;
|
|
30
|
+
return background || " #4c9eeb;";
|
|
31
|
+
}, function (_ref8) {
|
|
32
|
+
var border = _ref8.border;
|
|
33
|
+
return border || 'none';
|
|
34
|
+
});
|
|
35
|
+
var ButtonText = styled.p(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n white-space : nowrap;\n"])), function (_ref9) {
|
|
36
|
+
var fontFamily = _ref9.fontFamily;
|
|
37
|
+
return fontFamily || 'Noto Sans';
|
|
38
|
+
}, function (_ref10) {
|
|
39
|
+
var fontSize = _ref10.fontSize;
|
|
40
|
+
return fontSize || '18px';
|
|
41
|
+
}, function (_ref11) {
|
|
42
|
+
var fontWeight = _ref11.fontWeight;
|
|
43
|
+
return fontWeight || '500';
|
|
44
|
+
}, function (_ref12) {
|
|
45
|
+
var lineHeight = _ref12.lineHeight;
|
|
46
|
+
return lineHeight || '18px';
|
|
47
|
+
}, function (_ref13) {
|
|
48
|
+
var color = _ref13.color;
|
|
49
|
+
return color || '#ffffff';
|
|
50
|
+
});
|
|
51
|
+
var MultiFunctionButtonComponent = function MultiFunctionButtonComponent(_ref14) {
|
|
52
|
+
var onClick = _ref14.onClick,
|
|
53
|
+
text = _ref14.text,
|
|
54
|
+
width = _ref14.width,
|
|
55
|
+
height = _ref14.height,
|
|
56
|
+
background = _ref14.background,
|
|
57
|
+
color = _ref14.color,
|
|
58
|
+
border = _ref14.border,
|
|
59
|
+
borderRadius = _ref14.borderRadius,
|
|
60
|
+
fontWeight = _ref14.fontWeight,
|
|
61
|
+
fontSize = _ref14.fontSize,
|
|
62
|
+
fontFamily = _ref14.fontFamily,
|
|
63
|
+
lineHeight = _ref14.lineHeight,
|
|
64
|
+
padding = _ref14.padding,
|
|
65
|
+
svg = _ref14.svg,
|
|
66
|
+
gap = _ref14.gap;
|
|
67
|
+
return React.createElement(Container, null, React.createElement(Button, {
|
|
68
|
+
onClick: onClick,
|
|
69
|
+
width: width,
|
|
70
|
+
height: height,
|
|
71
|
+
background: background,
|
|
72
|
+
border: border,
|
|
73
|
+
borderRadius: borderRadius,
|
|
74
|
+
padding: padding,
|
|
75
|
+
gap: gap
|
|
76
|
+
}, svg, React.createElement(ButtonText, {
|
|
77
|
+
color: color,
|
|
78
|
+
fontFamily: fontFamily,
|
|
79
|
+
fontSize: fontSize,
|
|
80
|
+
fontWeight: fontWeight,
|
|
81
|
+
lineHeight: lineHeight
|
|
82
|
+
}, text)));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var _templateObject$1, _templateObject2$1, _templateObject3$1;
|
|
86
|
+
var InputContainer = styled.div(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteralLoose(["\n position: relative; \n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n display: flex; \n flex-direction: column;\n justify-content: center; \n"])), function (_ref) {
|
|
87
|
+
var width = _ref.width;
|
|
88
|
+
return width || "100%";
|
|
89
|
+
}, function (_ref2) {
|
|
90
|
+
var height = _ref2.height;
|
|
91
|
+
return height || "54px";
|
|
92
|
+
}, function (_ref3) {
|
|
93
|
+
var borderRadius = _ref3.borderRadius;
|
|
94
|
+
return borderRadius || "4px";
|
|
95
|
+
}, function (_ref4) {
|
|
96
|
+
var border = _ref4.border;
|
|
97
|
+
return border ? 'border' : '#657786';
|
|
98
|
+
}, function (_ref5) {
|
|
99
|
+
var backgroundColor = _ref5.backgroundColor;
|
|
100
|
+
return backgroundColor || 'transparent';
|
|
101
|
+
});
|
|
102
|
+
var WrittenTextAfterInput = styled.p(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteralLoose(["\n position: relative; \n top: 9px;\n left: 8px;\n width: auto;\n height: auto;\n font-family: Noto Sans;\n font-size: 14px;\n font-weight: 400;\n line-height: 14px;\n text-align: left;\n color: #4c9eeb;\n margin: 2px;\n visibility: ", ";\n"])), function (_ref6) {
|
|
103
|
+
var show = _ref6.show;
|
|
104
|
+
return show ? "visible" : "hidden";
|
|
105
|
+
});
|
|
106
|
+
var InputBlock = styled.input(_templateObject3$1 || (_templateObject3$1 = _taggedTemplateLiteralLoose(["\n width: ", ";\n height: ", ";\n border-radius: ", ";\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n padding: ", ";\n box-sizing: border-box;\n font-family: Noto Sans;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n text-align: left;\n outline: none;\n\n ::placeholder {\n color: ", ";\n }\n"])), function (_ref7) {
|
|
107
|
+
var width = _ref7.width;
|
|
108
|
+
return width || "100%";
|
|
109
|
+
}, function (_ref8) {
|
|
110
|
+
var height = _ref8.height;
|
|
111
|
+
return height || "54px";
|
|
112
|
+
}, function (_ref9) {
|
|
113
|
+
var borderRadius = _ref9.borderRadius;
|
|
114
|
+
return borderRadius || "4px";
|
|
115
|
+
}, function (_ref10) {
|
|
116
|
+
var borderColor = _ref10.borderColor;
|
|
117
|
+
return borderColor || "transparent";
|
|
118
|
+
}, function (_ref11) {
|
|
119
|
+
var backgroundColor = _ref11.backgroundColor;
|
|
120
|
+
return backgroundColor || "transparent";
|
|
121
|
+
}, function (_ref12) {
|
|
122
|
+
var fontColor = _ref12.fontColor;
|
|
123
|
+
return fontColor || "#14171A";
|
|
124
|
+
}, function (_ref13) {
|
|
125
|
+
var padding = _ref13.padding;
|
|
126
|
+
return padding || "8px";
|
|
127
|
+
}, function (_ref14) {
|
|
128
|
+
var fontSize = _ref14.fontSize;
|
|
129
|
+
return fontSize || "16px";
|
|
130
|
+
}, function (_ref15) {
|
|
131
|
+
var fontWeight = _ref15.fontWeight;
|
|
132
|
+
return fontWeight || 400;
|
|
133
|
+
}, function (_ref16) {
|
|
134
|
+
var lineHeight = _ref16.lineHeight;
|
|
135
|
+
return lineHeight || '16px';
|
|
136
|
+
}, function (_ref17) {
|
|
137
|
+
var fontColor = _ref17.fontColor;
|
|
138
|
+
return fontColor || "#AABBCC";
|
|
139
|
+
});
|
|
140
|
+
var Input = function Input(_ref18) {
|
|
141
|
+
var label = _ref18.label,
|
|
142
|
+
type = _ref18.type,
|
|
143
|
+
placeholder = _ref18.placeholder,
|
|
144
|
+
width = _ref18.width,
|
|
145
|
+
height = _ref18.height,
|
|
146
|
+
borderColor = _ref18.borderColor,
|
|
147
|
+
backgroundColor = _ref18.backgroundColor,
|
|
148
|
+
fontColor = _ref18.fontColor,
|
|
149
|
+
fontSize = _ref18.fontSize,
|
|
150
|
+
value = _ref18.value,
|
|
151
|
+
onChange = _ref18.onChange;
|
|
152
|
+
var _useState = useState(false),
|
|
153
|
+
blockText = _useState[0],
|
|
154
|
+
setBlockContent = _useState[1];
|
|
155
|
+
var inputRef = useRef(null);
|
|
156
|
+
var handleInputChange = function handleInputChange(e) {
|
|
157
|
+
setBlockContent(true);
|
|
158
|
+
var inputValue = e.target.value;
|
|
159
|
+
if (type === "phone" && inputValue.length > 10) {
|
|
160
|
+
inputValue = inputValue.slice(0, 10);
|
|
161
|
+
}
|
|
162
|
+
setBlockContent(inputValue.length > 0);
|
|
163
|
+
onChange(inputValue);
|
|
164
|
+
};
|
|
165
|
+
return React.createElement(InputContainer, {
|
|
166
|
+
width: width
|
|
167
|
+
}, React.createElement(WrittenTextAfterInput, {
|
|
168
|
+
show: blockText
|
|
169
|
+
}, label), React.createElement(InputBlock, {
|
|
170
|
+
ref: inputRef,
|
|
171
|
+
type: type === "phone" ? "tel" : type,
|
|
172
|
+
placeholder: placeholder || label,
|
|
173
|
+
width: width,
|
|
174
|
+
height: height,
|
|
175
|
+
borderColor: borderColor,
|
|
176
|
+
backgroundColor: backgroundColor,
|
|
177
|
+
fontColor: fontColor,
|
|
178
|
+
fontSize: fontSize,
|
|
179
|
+
value: value,
|
|
180
|
+
onChange: handleInputChange
|
|
181
|
+
}));
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export { MultiFunctionButtonComponent as Button, Input };
|
|
185
|
+
//# sourceMappingURL=index.modern.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.modern.js","sources":["../src/Buttons/Button.tsx","../src/Inputs/Input.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\n\nconst Container = styled.div``;\n\nconst Button = styled.button<{\n width?: string;\n height?: string;\n background?: string;\n border?: string;\n borderRadius?: string;\n padding? : string;\n gap?: string;\n \n}>`\n width: ${({ width }) => width || \"max-content\"};\n height: ${({ height }) => height || \"42px\"};\n padding: ${({padding})=> padding || '10px 16px'};\n box-sizing : border-box;\n gap: ${({gap}) => gap || '10px'};\n border: ${( {border} )=> border || 'none'};\n border-radius: ${( {borderRadius} )=> borderRadius || '1000px'};\n outline : none;\n background: ${({ background }) => background || \" #4c9eeb;\"}; \n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n opacity : 0.8;\n\n &:hover{\n opacity : 1;\n // border: ${( {border} )=> border || 'none'};\n }\n\n &:focus {\n outline: none;\n // border : none;\n }\n`;\n\nconst ButtonText = styled.p<{\n fontFamily?: string;\n fontSize?: string;\n fontWeight?: string;\n lineHeight?: string;\n color?: string;\n}>`\n font-family: ${({ fontFamily }) => fontFamily || 'Noto Sans'};\n font-size: ${( { fontSize } ) => fontSize || '18px'};\n font-weight: ${ ({ fontWeight }) => fontWeight || '500' };\n line-height: ${ ({ lineHeight }) => lineHeight || '18px' };\n color: ${ ({ color }) => color || '#ffffff' };\n white-space : nowrap;\n`;\n\ninterface ButtonProps {\n onClick?: () => void;\n svg?: React.ReactNode;\n text: string;\n width?: string;\n height? : string;\n background? : string;\n color? : string;\n fontWeight? : string;\n fontStyle? : string;\n fontSize? : string;\n fontFamily? : string;\n lineHeight? : string;\n border? : string;\n borderRadius? : string;\n padding? : string;\n gap?: string;\n};\n\nconst MultiFunctionButtonComponent: React.FC<ButtonProps> = ({\n onClick,\n text,\n width,\n height,\n background,\n color,\n border,\n borderRadius,\n fontWeight,\n fontSize,\n fontFamily,\n lineHeight,\n padding,\n svg,\n gap\n}) => {\n return (\n <Container>\n <Button \n onClick={onClick} \n width={width} \n height={height} \n background={background} \n border={border} \n borderRadius={borderRadius} \n padding={padding}\n gap={gap}\n >\n {svg}\n <ButtonText \n color={color} \n fontFamily={fontFamily} \n fontSize={fontSize} \n fontWeight={fontWeight} \n lineHeight={lineHeight}\n >\n {text}\n </ButtonText>\n </Button>\n </Container>\n );\n};\n\nexport default MultiFunctionButtonComponent;\n","import React, { useRef, useState } from \"react\";\nimport styled from \"styled-components\";\n\nconst InputContainer = styled.div<{\n width?: string;\n height?: string;\n border?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n padding?: string;\n borderRadius? : string;\n fontWeight? : string;\n lineHeight? : string\n }>`\n position: relative; \n width: ${({ width }) => width || \"100%\"};\n height: ${({ height }) => height || \"54px\"};\n border-radius: ${({ borderRadius }) => borderRadius || \"4px\"};\n border: 1px solid ${({ border }) => (border ? 'border' : '#657786')};\n background: ${({backgroundColor}) => backgroundColor || 'transparent'};\n display: flex; \n flex-direction: column;\n justify-content: center; \n`;\n\n\nconst WrittenTextAfterInput = styled.p<{ show: boolean }>`\n position: relative; \n top: 9px;\n left: 8px;\n width: auto;\n height: auto;\n font-family: Noto Sans;\n font-size: 14px;\n font-weight: 400;\n line-height: 14px;\n text-align: left;\n color: #4c9eeb;\n margin: 2px;\n visibility: ${({ show }) => (show ? \"visible\" : \"hidden\")};\n`;\n\nconst InputBlock = styled.input<{\n width?: string;\n height?: string;\n borderColor?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n padding?: string;\n borderRadius? : string;\n fontWeight? : string;\n lineHeight? : string\n}>`\n width: ${({ width }) => width || \"100%\"};\n height: ${({ height }) => height || \"54px\"};\n border-radius: ${({ borderRadius }) => borderRadius || \"4px\"};\n border: 1px solid ${({ borderColor }) => borderColor || \"transparent\"};\n background: ${({ backgroundColor }) => backgroundColor || \"transparent\"};\n color: ${({ fontColor }) => fontColor || \"#14171A\"};\n padding: ${({ padding }) => padding || \"8px\"};\n box-sizing: border-box;\n font-family: Noto Sans;\n font-size: ${({ fontSize }) => fontSize || \"16px\"};\n font-weight: ${({ fontWeight }) => fontWeight || 400};\n line-height: ${({ lineHeight }) => lineHeight || '16px'};\n text-align: left;\n outline: none;\n\n ::placeholder {\n color: ${({ fontColor }) => fontColor || \"#AABBCC\"};\n }\n`;\n\ninterface InputProps {\n type?: string;\n placeholder?: string;\n width?: string;\n height?: string;\n borderColor?: string;\n backgroundColor?: string;\n fontColor?: string;\n fontSize?: string;\n value?: string;\n onChange: (value: string) => void;\n}\n\ninterface UserDetailsBoxProps extends InputProps {\n label: string; // To display label for each input block\n value: string;\n onChange: (value: string) => void; // Callback for change in the input value\n}\n\nconst Input = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: UserDetailsBoxProps) => {\n const [blockText, setBlockContent] = useState(false); // For showing the placeholder at top\n const inputRef = useRef<HTMLInputElement>(null);\n\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setBlockContent(true);\n let inputValue = e.target.value;\n\n if (type === \"phone\" && inputValue.length > 10) {\n inputValue = inputValue.slice(0, 10); // Limiting phone number to 10 digits\n }\n\n setBlockContent(inputValue.length > 0); // Show label at top when user starts typing\n onChange(inputValue); // Pass the input value back to the parent component\n };\n\n return (\n <InputContainer\n \n width={width}\n >\n <WrittenTextAfterInput show={blockText}>\n {label} \n </WrittenTextAfterInput>\n <InputBlock\n ref={inputRef}\n type={type === \"phone\" ? \"tel\" : type} // Use 'tel' for phone input\n placeholder={placeholder || label}\n width={width}\n height={height}\n borderColor={borderColor}\n backgroundColor={backgroundColor}\n fontColor={fontColor}\n fontSize={fontSize}\n value={value}\n onChange={handleInputChange}\n />\n </InputContainer>\n );\n};\n\nexport default Input;\n"],"names":["Container","styled","div","_templateObject","_taggedTemplateLiteralLoose","Button","button","_templateObject2","_ref","width","_ref2","height","_ref3","padding","_ref4","gap","_ref5","border","_ref6","borderRadius","_ref7","background","_ref8","ButtonText","p","_templateObject3","_ref9","fontFamily","_ref10","fontSize","_ref11","fontWeight","_ref12","lineHeight","_ref13","color","MultiFunctionButtonComponent","_ref14","onClick","text","svg","React","InputContainer","backgroundColor","WrittenTextAfterInput","show","InputBlock","input","borderColor","fontColor","_ref15","_ref16","_ref17","Input","_ref18","label","type","placeholder","value","onChange","_useState","useState","blockText","setBlockContent","inputRef","useRef","handleInputChange","e","inputValue","target","length","slice","ref"],"mappings":";;;;;;;;AAGA,IAAMA,SAAS,GAAGC,MAAM,CAACC,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,2BAAA,QAAE;AAE9B,IAAMC,MAAM,GAAGJ,MAAM,CAACK,MAAM,CAAAC,gBAAA,KAAAA,gBAAA,GAAAH,2BAAA,6aAUjB,UAAAI,IAAA;EAAA,IAAGC,KAA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,CACa;AAErB,CAAC;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "labsense-ui-kit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "labSense UI Components",
|
|
5
|
+
"author": "SNet Labs Pvt. Ltd.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "gitlab",
|
|
9
|
+
"url": "https://gitlab.com/chirag.jain5/labsense-ui-kit.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.modern.js",
|
|
13
|
+
"source": "src/index.tsx",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=10"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "microbundle-crl --no-compress --format modern,cjs",
|
|
19
|
+
"start": "microbundle-crl watch --no-compress --format modern,cjs",
|
|
20
|
+
"prepublishOnly": "run-s build",
|
|
21
|
+
"test": "run-s test:unit test:lint test:build",
|
|
22
|
+
"test:build": "run-s build",
|
|
23
|
+
"test:lint": "eslint ./src --ext .ts,.tsx",
|
|
24
|
+
"test:unit": "cross-env CI=1 react-scripts test --env=jsdom",
|
|
25
|
+
"test:watch": "react-scripts test --env=jsdom",
|
|
26
|
+
"svgr": "svgr --typescript -d src/svg/ src/svg",
|
|
27
|
+
"predeploy": "cd ../example && npm run build && cd ../storybook && npm run build-storybook",
|
|
28
|
+
"deploy": "gh-pages -d ../example/build",
|
|
29
|
+
"actions-deploy": "gh-pages -d ../example/build",
|
|
30
|
+
"link": "npm link && npm link react && npm link react-dom && npm link react-router-dom && npm link styled-components"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"react": "^17.0.2",
|
|
34
|
+
"react-dom": "^17.0.2",
|
|
35
|
+
"react-router": "^5.3.4",
|
|
36
|
+
"react-router-dom": "^5.3.4",
|
|
37
|
+
"react-use-websocket": "^2.9.1",
|
|
38
|
+
"styled-components": "^5.3.11"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@svgr/cli": "^6.5.1",
|
|
42
|
+
"@types/jest": "^28.1.8",
|
|
43
|
+
"@types/lodash.debounce": "^4.0.9",
|
|
44
|
+
"@types/lodash.defaultsdeep": "^4.6.9",
|
|
45
|
+
"@types/lodash.isequal": "^4.5.8",
|
|
46
|
+
"@types/node": "^16.18.125",
|
|
47
|
+
"@types/react": "^17.0.83",
|
|
48
|
+
"@types/react-router-dom": "^5.3.3",
|
|
49
|
+
"@types/styled-components": "^5.1.34",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
51
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
52
|
+
"babel-eslint": "^10.1.0",
|
|
53
|
+
"cross-env": "^7.0.3",
|
|
54
|
+
"eslint": "^7.32.0",
|
|
55
|
+
"eslint-config-standard-react": "^11.0.1",
|
|
56
|
+
"eslint-plugin-import": "^2.31.0",
|
|
57
|
+
"eslint-plugin-node": "^11.1.0",
|
|
58
|
+
"eslint-plugin-promise": "^6.6.0",
|
|
59
|
+
"eslint-plugin-react": "^7.37.4",
|
|
60
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
61
|
+
"eslint-plugin-standard": "^4.1.0",
|
|
62
|
+
"gh-pages": "^5.0.0",
|
|
63
|
+
"microbundle-crl": "^0.13.11",
|
|
64
|
+
"npm-run-all": "^4.1.5",
|
|
65
|
+
"react-scripts": "^5.0.1"
|
|
66
|
+
},
|
|
67
|
+
"dependencies": {
|
|
68
|
+
"@types/react-dom": "^17.0.26",
|
|
69
|
+
"date-fns": "^2.30.0",
|
|
70
|
+
"immutability-helper": "^3.1.1",
|
|
71
|
+
"lodash.debounce": "^4.0.8",
|
|
72
|
+
"lodash.defaultsdeep": "^4.6.1",
|
|
73
|
+
"lodash.isequal": "^4.5.0"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist"
|
|
77
|
+
],
|
|
78
|
+
"directories": {
|
|
79
|
+
"example": "example"
|
|
80
|
+
},
|
|
81
|
+
"bugs": {
|
|
82
|
+
"url": "https://gitlab.com/chirag.jain5/labsense-ui-kit/issues"
|
|
83
|
+
},
|
|
84
|
+
"homepage": ""
|
|
85
|
+
}
|