labsense-ui-kit 1.0.1 → 1.0.2
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 +3 -3
- package/dist/Buttons/Button.d.ts +3 -4
- package/dist/index.js +39 -49
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +39 -49
- package/dist/index.modern.js.map +1 -1
- package/package.json +18 -9
package/README.md
CHANGED
|
@@ -21,13 +21,13 @@ If you want to run the project follow the next steps
|
|
|
21
21
|
```
|
|
22
22
|
// Terminal 1
|
|
23
23
|
|
|
24
|
-
npm
|
|
24
|
+
npm run dev --workspace=packages/ui-lib
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```
|
|
28
28
|
// Terminal 2
|
|
29
29
|
|
|
30
|
-
npm
|
|
30
|
+
npm run dev --workspace=packages/example
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
- If you want to run the storybook
|
|
@@ -35,7 +35,7 @@ If you want to run the project follow the next steps
|
|
|
35
35
|
```
|
|
36
36
|
// Terminal 3
|
|
37
37
|
|
|
38
|
-
npm
|
|
38
|
+
npm run dev --workspace=packages/storybook
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
## Icons
|
package/dist/Buttons/Button.d.ts
CHANGED
|
@@ -3,8 +3,7 @@ interface ButtonProps {
|
|
|
3
3
|
onClick?: () => void;
|
|
4
4
|
svg?: React.ReactNode;
|
|
5
5
|
text: string;
|
|
6
|
-
|
|
7
|
-
height?: string;
|
|
6
|
+
size?: 'Small' | 'Regular' | 'Large' | 'CustomUsingPadding';
|
|
8
7
|
background?: string;
|
|
9
8
|
color?: string;
|
|
10
9
|
fontWeight?: string;
|
|
@@ -17,5 +16,5 @@ interface ButtonProps {
|
|
|
17
16
|
padding?: string;
|
|
18
17
|
gap?: string;
|
|
19
18
|
}
|
|
20
|
-
declare const
|
|
21
|
-
export default
|
|
19
|
+
declare const ButtonComponent: React.FC<ButtonProps>;
|
|
20
|
+
export default ButtonComponent;
|
package/dist/index.js
CHANGED
|
@@ -10,70 +10,60 @@ function _taggedTemplateLiteralLoose(e, t) {
|
|
|
10
10
|
|
|
11
11
|
var _templateObject, _templateObject2, _templateObject3;
|
|
12
12
|
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
13
|
-
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width:
|
|
14
|
-
var
|
|
15
|
-
|
|
13
|
+
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: max-content;\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 }\n\n &:focus {\n outline: none;\n }\n"])), function (_ref) {
|
|
14
|
+
var size = _ref.size,
|
|
15
|
+
padding = _ref.padding;
|
|
16
|
+
return size === 'Small' ? '5px' : size === 'Regular' ? '10px 16px' : size === 'Large' ? '15px 20px' : size === 'CustomUsingPadding' ? padding : '10px 16px';
|
|
16
17
|
}, function (_ref2) {
|
|
17
|
-
var
|
|
18
|
-
return
|
|
18
|
+
var gap = _ref2.gap;
|
|
19
|
+
return gap || '10px';
|
|
19
20
|
}, function (_ref3) {
|
|
20
|
-
var
|
|
21
|
-
return
|
|
21
|
+
var border = _ref3.border;
|
|
22
|
+
return border || 'none';
|
|
22
23
|
}, function (_ref4) {
|
|
23
|
-
var
|
|
24
|
-
return
|
|
24
|
+
var borderRadius = _ref4.borderRadius;
|
|
25
|
+
return borderRadius || '5px';
|
|
25
26
|
}, function (_ref5) {
|
|
26
|
-
var
|
|
27
|
-
return border || 'none';
|
|
28
|
-
}, function (_ref6) {
|
|
29
|
-
var borderRadius = _ref6.borderRadius;
|
|
30
|
-
return borderRadius || '1000px';
|
|
31
|
-
}, function (_ref7) {
|
|
32
|
-
var background = _ref7.background;
|
|
27
|
+
var background = _ref5.background;
|
|
33
28
|
return background || " #4c9eeb;";
|
|
34
|
-
}, function (_ref8) {
|
|
35
|
-
var border = _ref8.border;
|
|
36
|
-
return border || 'none';
|
|
37
29
|
});
|
|
38
|
-
var ButtonText = styled.
|
|
39
|
-
var fontFamily =
|
|
40
|
-
return fontFamily || '
|
|
41
|
-
}, function (
|
|
42
|
-
var fontSize =
|
|
30
|
+
var ButtonText = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n margin: 0px;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n white-space : nowrap;\n"])), function (_ref6) {
|
|
31
|
+
var fontFamily = _ref6.fontFamily;
|
|
32
|
+
return fontFamily || 'sans-serif';
|
|
33
|
+
}, function (_ref7) {
|
|
34
|
+
var fontSize = _ref7.fontSize;
|
|
43
35
|
return fontSize || '18px';
|
|
44
|
-
}, function (
|
|
45
|
-
var fontWeight =
|
|
36
|
+
}, function (_ref8) {
|
|
37
|
+
var fontWeight = _ref8.fontWeight;
|
|
46
38
|
return fontWeight || '500';
|
|
47
|
-
}, function (
|
|
48
|
-
var lineHeight =
|
|
39
|
+
}, function (_ref9) {
|
|
40
|
+
var lineHeight = _ref9.lineHeight;
|
|
49
41
|
return lineHeight || '18px';
|
|
50
|
-
}, function (
|
|
51
|
-
var color =
|
|
42
|
+
}, function (_ref10) {
|
|
43
|
+
var color = _ref10.color;
|
|
52
44
|
return color || '#ffffff';
|
|
53
45
|
});
|
|
54
|
-
var
|
|
55
|
-
var onClick =
|
|
56
|
-
text =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
gap = _ref14.gap;
|
|
46
|
+
var ButtonComponent = function ButtonComponent(_ref11) {
|
|
47
|
+
var onClick = _ref11.onClick,
|
|
48
|
+
text = _ref11.text,
|
|
49
|
+
size = _ref11.size,
|
|
50
|
+
background = _ref11.background,
|
|
51
|
+
color = _ref11.color,
|
|
52
|
+
border = _ref11.border,
|
|
53
|
+
borderRadius = _ref11.borderRadius,
|
|
54
|
+
fontWeight = _ref11.fontWeight,
|
|
55
|
+
fontSize = _ref11.fontSize,
|
|
56
|
+
fontFamily = _ref11.fontFamily,
|
|
57
|
+
lineHeight = _ref11.lineHeight,
|
|
58
|
+
padding = _ref11.padding,
|
|
59
|
+
svg = _ref11.svg,
|
|
60
|
+
gap = _ref11.gap;
|
|
70
61
|
return React__default.createElement(Container, null, React__default.createElement(Button, {
|
|
71
62
|
onClick: onClick,
|
|
72
|
-
width: width,
|
|
73
|
-
height: height,
|
|
74
63
|
background: background,
|
|
75
64
|
border: border,
|
|
76
65
|
borderRadius: borderRadius,
|
|
66
|
+
size: size,
|
|
77
67
|
padding: padding,
|
|
78
68
|
gap: gap
|
|
79
69
|
}, svg, React__default.createElement(ButtonText, {
|
|
@@ -184,6 +174,6 @@ var MultiFunctionInputComponent = function MultiFunctionInputComponent(_ref18) {
|
|
|
184
174
|
}));
|
|
185
175
|
};
|
|
186
176
|
|
|
187
|
-
exports.Button =
|
|
177
|
+
exports.Button = ButtonComponent;
|
|
188
178
|
exports.Input = MultiFunctionInputComponent;
|
|
189
179
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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: (e: React.ChangeEvent<HTMLInputElement>) => void;\n label: string; // To display label for each input block\n}\n\nconst MultiFunctionInputComponent = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: InputProps) => {\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(e); // 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 MultiFunctionInputComponent;"],"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","MultiFunctionInputComponent","_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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;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;;;;;"}
|
|
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 background?: string;\n border?: string;\n borderRadius?: string;\n size?: string;\n padding? : string;\n gap?: string;\n \n}>`\n width: max-content;\n padding: ${({size, padding})=> size === 'Small' ? '5px' : size === 'Regular' ? '10px 16px' : size === 'Large' ? '15px 20px' : size === 'CustomUsingPadding' ? padding : '10px 16px'};\n box-sizing : border-box;\n gap: ${({gap}) => gap || '10px'};\n border: ${( {border} )=> border || 'none'};\n border-radius: ${( {borderRadius} )=> borderRadius || '5px'};\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 }\n\n &:focus {\n outline: none;\n }\n`;\n\nconst ButtonText = styled.span<{\n fontFamily?: string;\n fontSize?: string;\n fontWeight?: string;\n lineHeight?: string;\n color?: string;\n}>`\n font-family: ${({ fontFamily }) => fontFamily || 'sans-serif'};\n margin: 0px;\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 size?: 'Small' | 'Regular' | 'Large' | 'CustomUsingPadding';\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 ButtonComponent: React.FC<ButtonProps> = ({\n onClick,\n text,\n size,\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 background={background} \n border={border} \n borderRadius={borderRadius} \n size={size}\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 ButtonComponent;\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: (e: React.ChangeEvent<HTMLInputElement>) => void;\n label: string; // To display label for each input block\n}\n\nconst MultiFunctionInputComponent = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: InputProps) => {\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(e); // 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 MultiFunctionInputComponent;"],"names":["Container","styled","div","_templateObject","_taggedTemplateLiteralLoose","Button","button","_templateObject2","_ref","size","padding","_ref2","gap","_ref3","border","_ref4","borderRadius","_ref5","background","ButtonText","span","_templateObject3","_ref6","fontFamily","_ref7","fontSize","_ref8","fontWeight","_ref9","lineHeight","_ref10","color","ButtonComponent","_ref11","onClick","text","svg","React","InputContainer","width","height","backgroundColor","WrittenTextAfterInput","p","show","InputBlock","input","borderColor","_ref12","fontColor","_ref13","_ref14","_ref15","_ref16","_ref17","MultiFunctionInputComponent","_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,sXAUf,UAAAI,IAAA;EAAA,IAAEC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,OAAO,GAAAF,IAAA,CAAPE,OAAO;EAAA,OAAKD,IAAI,KAAK,OAAO,GAAG,KAAK,GAAGA,IAAI,KAAK,SAAS,GAAG,WAAW,GAAGA,IAAI,KAAK,OAAO,GAAG,WAAW,GAAGA,IAAI,KAAK,oBAAoB,GAAGC,OAAO,GAAG,WAAW;AAAA,GAE5K,UAAAC,KAAA;EAAA,IAAEC,GAAG,GAAAD,KAAA,CAAHC,GAAG;EAAA,OAAMA,GAAG,IAAI,MAAM;AAAA,GACrB,UAAAC,KAAA;EAAA,IAAGC,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAMA,MAAM,IAAI,MAAM;AAAA,GACxB,UAAAC,KAAA;EAAA,IAAGC,YAAY,GAAAD,KAAA,CAAZC,YAAY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U,CAACE,MAAM,GAAG,CAAC,CAAC;IACtCX,QAAQ,CAACQ,CAAC,CAAC;GACZ;EAED,OACEhC,6BAACC,cAAc;IAEbC,KAAK,EAAEA;KAEPF,6BAACK,qBAAqB;IAACE,IAAI,EAAEoB;KAC1BP,KAAK,CACgB,EACxBpB,6BAACQ,UAAU;IACT6B,GAAG,EAAER,QAAQ;IACbR,IAAI,EAAEA,IAAI,KAAK,OAAO,GAAG,KAAK,GAAGA,IAAI;IACrCC,WAAW,EAAEA,WAAW,IAAIF,KAAK;IACjClB,KAAK,EAAEA,KAAK;IACZC,MAAM,EAAEA,MAAM;IACdO,WAAW,EAAEA,WAAW;IACxBN,eAAe,EAAEA,eAAe;IAChCQ,SAAS,EAAEA,SAAS;IACpBxB,QAAQ,EAAEA,QAAQ;IAClBmC,KAAK,EAAEA,KAAK;IACZC,QAAQ,EAAEO;IACV,CACa;AAErB,CAAC;;;;;"}
|
package/dist/index.modern.js
CHANGED
|
@@ -7,70 +7,60 @@ function _taggedTemplateLiteralLoose(e, t) {
|
|
|
7
7
|
|
|
8
8
|
var _templateObject, _templateObject2, _templateObject3;
|
|
9
9
|
var Container = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteralLoose([""])));
|
|
10
|
-
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width:
|
|
11
|
-
var
|
|
12
|
-
|
|
10
|
+
var Button = styled.button(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n width: max-content;\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 }\n\n &:focus {\n outline: none;\n }\n"])), function (_ref) {
|
|
11
|
+
var size = _ref.size,
|
|
12
|
+
padding = _ref.padding;
|
|
13
|
+
return size === 'Small' ? '5px' : size === 'Regular' ? '10px 16px' : size === 'Large' ? '15px 20px' : size === 'CustomUsingPadding' ? padding : '10px 16px';
|
|
13
14
|
}, function (_ref2) {
|
|
14
|
-
var
|
|
15
|
-
return
|
|
15
|
+
var gap = _ref2.gap;
|
|
16
|
+
return gap || '10px';
|
|
16
17
|
}, function (_ref3) {
|
|
17
|
-
var
|
|
18
|
-
return
|
|
18
|
+
var border = _ref3.border;
|
|
19
|
+
return border || 'none';
|
|
19
20
|
}, function (_ref4) {
|
|
20
|
-
var
|
|
21
|
-
return
|
|
21
|
+
var borderRadius = _ref4.borderRadius;
|
|
22
|
+
return borderRadius || '5px';
|
|
22
23
|
}, function (_ref5) {
|
|
23
|
-
var
|
|
24
|
-
return border || 'none';
|
|
25
|
-
}, function (_ref6) {
|
|
26
|
-
var borderRadius = _ref6.borderRadius;
|
|
27
|
-
return borderRadius || '1000px';
|
|
28
|
-
}, function (_ref7) {
|
|
29
|
-
var background = _ref7.background;
|
|
24
|
+
var background = _ref5.background;
|
|
30
25
|
return background || " #4c9eeb;";
|
|
31
|
-
}, function (_ref8) {
|
|
32
|
-
var border = _ref8.border;
|
|
33
|
-
return border || 'none';
|
|
34
26
|
});
|
|
35
|
-
var ButtonText = styled.
|
|
36
|
-
var fontFamily =
|
|
37
|
-
return fontFamily || '
|
|
38
|
-
}, function (
|
|
39
|
-
var fontSize =
|
|
27
|
+
var ButtonText = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteralLoose(["\n font-family: ", ";\n margin: 0px;\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n color: ", ";\n white-space : nowrap;\n"])), function (_ref6) {
|
|
28
|
+
var fontFamily = _ref6.fontFamily;
|
|
29
|
+
return fontFamily || 'sans-serif';
|
|
30
|
+
}, function (_ref7) {
|
|
31
|
+
var fontSize = _ref7.fontSize;
|
|
40
32
|
return fontSize || '18px';
|
|
41
|
-
}, function (
|
|
42
|
-
var fontWeight =
|
|
33
|
+
}, function (_ref8) {
|
|
34
|
+
var fontWeight = _ref8.fontWeight;
|
|
43
35
|
return fontWeight || '500';
|
|
44
|
-
}, function (
|
|
45
|
-
var lineHeight =
|
|
36
|
+
}, function (_ref9) {
|
|
37
|
+
var lineHeight = _ref9.lineHeight;
|
|
46
38
|
return lineHeight || '18px';
|
|
47
|
-
}, function (
|
|
48
|
-
var color =
|
|
39
|
+
}, function (_ref10) {
|
|
40
|
+
var color = _ref10.color;
|
|
49
41
|
return color || '#ffffff';
|
|
50
42
|
});
|
|
51
|
-
var
|
|
52
|
-
var onClick =
|
|
53
|
-
text =
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
gap = _ref14.gap;
|
|
43
|
+
var ButtonComponent = function ButtonComponent(_ref11) {
|
|
44
|
+
var onClick = _ref11.onClick,
|
|
45
|
+
text = _ref11.text,
|
|
46
|
+
size = _ref11.size,
|
|
47
|
+
background = _ref11.background,
|
|
48
|
+
color = _ref11.color,
|
|
49
|
+
border = _ref11.border,
|
|
50
|
+
borderRadius = _ref11.borderRadius,
|
|
51
|
+
fontWeight = _ref11.fontWeight,
|
|
52
|
+
fontSize = _ref11.fontSize,
|
|
53
|
+
fontFamily = _ref11.fontFamily,
|
|
54
|
+
lineHeight = _ref11.lineHeight,
|
|
55
|
+
padding = _ref11.padding,
|
|
56
|
+
svg = _ref11.svg,
|
|
57
|
+
gap = _ref11.gap;
|
|
67
58
|
return React.createElement(Container, null, React.createElement(Button, {
|
|
68
59
|
onClick: onClick,
|
|
69
|
-
width: width,
|
|
70
|
-
height: height,
|
|
71
60
|
background: background,
|
|
72
61
|
border: border,
|
|
73
62
|
borderRadius: borderRadius,
|
|
63
|
+
size: size,
|
|
74
64
|
padding: padding,
|
|
75
65
|
gap: gap
|
|
76
66
|
}, svg, React.createElement(ButtonText, {
|
|
@@ -181,5 +171,5 @@ var MultiFunctionInputComponent = function MultiFunctionInputComponent(_ref18) {
|
|
|
181
171
|
}));
|
|
182
172
|
};
|
|
183
173
|
|
|
184
|
-
export {
|
|
174
|
+
export { ButtonComponent as Button, MultiFunctionInputComponent as Input };
|
|
185
175
|
//# sourceMappingURL=index.modern.js.map
|
package/dist/index.modern.js.map
CHANGED
|
@@ -1 +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: (e: React.ChangeEvent<HTMLInputElement>) => void;\n label: string; // To display label for each input block\n}\n\nconst MultiFunctionInputComponent = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: InputProps) => {\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(e); // 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 MultiFunctionInputComponent;"],"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","MultiFunctionInputComponent","_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,MAAM,GAAAD,KAAA,CAANC,MAAM;EAAA,OAAMA,MAAM,IAAI,MAAM;AAAA,GACxB,UAAAC,KAAA;EAAA,IAAGC,YAAY,G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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,CAACQ,CAAC,CAAC;GACZ;EAED,OACE1B,oBAACC,cAAc;IAEbjC,KAAK,EAAEA;KAEPgC,oBAACG,qBAAqB;IAACC,IAAI,EAAEiB;KAC1BP,KAAK,CACgB,EACxBd,oBAACK,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;;;;"}
|
|
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 background?: string;\n border?: string;\n borderRadius?: string;\n size?: string;\n padding? : string;\n gap?: string;\n \n}>`\n width: max-content;\n padding: ${({size, padding})=> size === 'Small' ? '5px' : size === 'Regular' ? '10px 16px' : size === 'Large' ? '15px 20px' : size === 'CustomUsingPadding' ? padding : '10px 16px'};\n box-sizing : border-box;\n gap: ${({gap}) => gap || '10px'};\n border: ${( {border} )=> border || 'none'};\n border-radius: ${( {borderRadius} )=> borderRadius || '5px'};\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 }\n\n &:focus {\n outline: none;\n }\n`;\n\nconst ButtonText = styled.span<{\n fontFamily?: string;\n fontSize?: string;\n fontWeight?: string;\n lineHeight?: string;\n color?: string;\n}>`\n font-family: ${({ fontFamily }) => fontFamily || 'sans-serif'};\n margin: 0px;\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 size?: 'Small' | 'Regular' | 'Large' | 'CustomUsingPadding';\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 ButtonComponent: React.FC<ButtonProps> = ({\n onClick,\n text,\n size,\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 background={background} \n border={border} \n borderRadius={borderRadius} \n size={size}\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 ButtonComponent;\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: (e: React.ChangeEvent<HTMLInputElement>) => void;\n label: string; // To display label for each input block\n}\n\nconst MultiFunctionInputComponent = ({\n label,\n type,\n placeholder,\n width,\n height,\n borderColor,\n backgroundColor,\n fontColor,\n fontSize,\n value,\n onChange,\n}: InputProps) => {\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(e); // 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 MultiFunctionInputComponent;"],"names":["Container","styled","div","_templateObject","_taggedTemplateLiteralLoose","Button","button","_templateObject2","_ref","size","padding","_ref2","gap","_ref3","border","_ref4","borderRadius","_ref5","background","ButtonText","span","_templateObject3","_ref6","fontFamily","_ref7","fontSize","_ref8","fontWeight","_ref9","lineHeight","_ref10","color","ButtonComponent","_ref11","onClick","text","svg","React","InputContainer","width","height","backgroundColor","WrittenTextAfterInput","p","show","InputBlock","input","borderColor","_ref12","fontColor","_ref13","_ref14","_ref15","_ref16","_ref17","MultiFunctionInputComponent","_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,sXAUf,UA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
"version": "1.0.2",
|
|
4
4
|
"description": "labSense UI Components",
|
|
5
5
|
"author": "SNet Labs Pvt. Ltd.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "microbundle-crl --no-compress --format modern,cjs",
|
|
19
|
-
"
|
|
19
|
+
"dev": "microbundle-crl watch --no-compress --format modern,cjs",
|
|
20
20
|
"prepublishOnly": "run-s build",
|
|
21
21
|
"test": "run-s test:unit test:lint test:build",
|
|
22
22
|
"test:build": "run-s build",
|
|
@@ -38,8 +38,14 @@
|
|
|
38
38
|
"styled-components": "^5.3.5"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"@babel/plugin-proposal-unicode-property-regex": "^7.18.6",
|
|
42
|
+
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
43
|
+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6",
|
|
44
|
+
"@babel/plugin-transform-numeric-separator": "^7.25.9",
|
|
45
|
+
"@babel/plugin-transform-private-methods": "^7.25.9",
|
|
46
|
+
"@babel/plugin-transform-unicode-property-regex": "^7.25.9",
|
|
41
47
|
"@svgr/cli": "^6.5.1",
|
|
42
|
-
"@types/jest": "^
|
|
48
|
+
"@types/jest": "^29.5.14",
|
|
43
49
|
"@types/lodash.debounce": "^4.0.9",
|
|
44
50
|
"@types/lodash.defaultsdeep": "^4.6.9",
|
|
45
51
|
"@types/lodash.isequal": "^4.5.8",
|
|
@@ -55,22 +61,25 @@
|
|
|
55
61
|
"eslint-config-standard-react": "^11.0.1",
|
|
56
62
|
"eslint-plugin-import": "^2.31.0",
|
|
57
63
|
"eslint-plugin-node": "^11.1.0",
|
|
58
|
-
"eslint-plugin-promise": "^
|
|
64
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
59
65
|
"eslint-plugin-react": "^7.37.4",
|
|
60
|
-
"eslint-plugin-react-hooks": "^
|
|
61
|
-
"eslint-plugin-standard": "^
|
|
66
|
+
"eslint-plugin-react-hooks": "^5.1.0",
|
|
67
|
+
"eslint-plugin-standard": "^5.0.0",
|
|
62
68
|
"gh-pages": "^5.0.0",
|
|
63
69
|
"microbundle-crl": "^0.13.11",
|
|
64
70
|
"npm-run-all": "^4.1.5",
|
|
65
|
-
"react-scripts": "^5.0.1"
|
|
71
|
+
"react-scripts": "^5.0.1",
|
|
72
|
+
"svgo": "^2.8.0",
|
|
73
|
+
"vite": "^6.0.5",
|
|
74
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
66
75
|
},
|
|
67
76
|
"dependencies": {
|
|
68
77
|
"@types/react-dom": "^17.0.26",
|
|
69
78
|
"date-fns": "^2.30.0",
|
|
79
|
+
"glob": "^9.3.5",
|
|
70
80
|
"immutability-helper": "^3.1.1",
|
|
71
81
|
"lodash.debounce": "^4.0.8",
|
|
72
|
-
"lodash.defaultsdeep": "^4.6.1"
|
|
73
|
-
"lodash.isequal": "^4.5.0"
|
|
82
|
+
"lodash.defaultsdeep": "^4.6.1"
|
|
74
83
|
},
|
|
75
84
|
"files": [
|
|
76
85
|
"dist"
|