@ludo.ninja/components 2.3.85 → 2.3.87

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.
@@ -11,6 +11,7 @@ interface Props {
11
11
  isNeedShowError: boolean;
12
12
  message: string | undefined;
13
13
  };
14
+ disabled?: boolean;
14
15
  }
15
16
  declare const Input: React.FC<Props>;
16
17
  export default Input;
@@ -13,60 +13,51 @@ const colors_2 = require("../../../styles/colors");
13
13
  const typography_1 = require("../../../styles/typography");
14
14
  const ErrorLabel_1 = __importDefault(require("../ErrorLabel"));
15
15
  const vars_1 = require("../../../fonts/vars");
16
- // Styles
17
16
  exports.StyledInput = styled_components_1.default.input `
18
- font-family: ${vars_1.dmsansFontVarCss.css};
19
- ${typography_1.MainText};
20
- width: 100%;
21
- height: 46px;
22
- border-radius: 6px;
23
- border: 1px solid
17
+ font-family: ${vars_1.dmsansFontVarCss.css};
18
+ ${typography_1.MainText};
19
+ width: 100%;
20
+ height: 46px;
21
+ border-radius: 6px;
22
+ border: 1px solid
24
23
  ${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
25
- background: ${colors_2.WhiteColor};
26
- color: ${colors_2.BlackColor};
27
- outline: none;
28
- padding: 12px;
24
+ background: ${colors_2.WhiteColor};
25
+ color: ${colors_2.BlackColor};
26
+ outline: none;
27
+ padding: 12px;
29
28
 
30
- ::placeholder {
31
- color: ${colors_2.TextGrayColor};
32
- opacity: 1;
33
- }
29
+ ::placeholder {
30
+ color: ${colors_2.TextGrayColor};
31
+ opacity: 1;
32
+ }
34
33
 
35
- :-ms-input-placeholder {
36
- color: ${colors_2.TextGrayColor};
37
- }
34
+ :-ms-input-placeholder {
35
+ color: ${colors_2.TextGrayColor};
36
+ }
38
37
 
39
- ::-ms-input-placeholder {
40
- color: ${colors_2.TextGrayColor};
41
- }
38
+ ::-ms-input-placeholder {
39
+ color: ${colors_2.TextGrayColor};
40
+ }
42
41
 
43
- :disabled {
44
- background: ${colors_1.DisabledLightGrayColor};
45
- color: ${colors_1.DisabledGrayColor};
46
- }
42
+ :disabled {
43
+ background: ${colors_1.DisabledLightGrayColor};
44
+ color: ${colors_1.DisabledGrayColor};
45
+ }
47
46
 
48
- // :focus {
49
- // transition: border-color 0.3s ease-in-out;
50
- // border: 2px solid ${(props) => (props.status ? '#F4205F' : '#C1C8DE')};
51
- // }
52
- // :hover {
53
- // transition: border-color 0.3s ease-in-out;
54
- // border: 2px solid ${(props) => (props.status ? '#F4205F' : '#C1C8DE')};
55
- // }
56
- ${ScreenWidth_1.mediaQuery.minWidthFourK} {
57
- height: ${(0, _4k_1.adaptiveValueCalc)(46)};
58
- border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
59
- border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
60
- ${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
61
- padding: ${(0, _4k_1.adaptiveValueCalc)(12)};
62
- }
47
+ ${ScreenWidth_1.mediaQuery.minWidthFourK} {
48
+ height: ${(0, _4k_1.adaptiveValueCalc)(46)};
49
+ border-radius: ${(0, _4k_1.adaptiveValueCalc)(6)};
50
+ border: ${(0, _4k_1.adaptiveValueCalc)(1)} solid
51
+ ${(props) => (props.status ? colors_2.ProgressColorMinimum : colors_2.BorderColorLight)};
52
+ padding: ${(0, _4k_1.adaptiveValueCalc)(12)};
53
+ }
63
54
  `;
64
- const Input = ({ data, register, error }) => {
55
+ const Input = ({ data, register, error, disabled }) => {
65
56
  const renderError = () => {
66
57
  if (error.isNeedShowError) {
67
58
  return (0, jsx_runtime_1.jsx)(ErrorLabel_1.default, { children: error.message });
68
59
  }
69
60
  };
70
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(exports.StyledInput, { ref: register.ref, onChange: register.onChange, onBlur: register.onBlur, name: register.name, id: data.name, autoComplete: "off", placeholder: data.placeHolder, status: error.isNeedShowError }), renderError()] }));
61
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(exports.StyledInput, { ref: register.ref, onChange: register.onChange, onBlur: register.onBlur, name: register.name, id: data.name, autoComplete: "off", placeholder: data.placeHolder, status: error.isNeedShowError, disabled: disabled }), renderError()] }));
71
62
  };
72
63
  exports.default = Input;
@@ -1,6 +1,9 @@
1
- declare const ExperienceLabel: ({ value, link, loading }: {
1
+ import React from "react";
2
+ declare const ExperienceLabel: ({ value, link, loading, className, style }: {
2
3
  value: number;
3
4
  link?: string;
4
5
  loading?: boolean;
6
+ className?: string;
7
+ style?: React.CSSProperties;
5
8
  }) => import("react/jsx-runtime").JSX.Element | null;
6
9
  export default ExperienceLabel;
@@ -85,12 +85,12 @@ const StyledExpTab = styled_components_1.default.div `
85
85
  ${ExperienceLabelStyles};
86
86
  `;
87
87
  //Component
88
- const ExperienceLabel = ({ value = 0, link, loading }) => {
88
+ const ExperienceLabel = ({ value = 0, link, loading, className, style }) => {
89
89
  if (loading)
90
90
  return (0, jsx_runtime_1.jsx)(SkeletonLabel_1.default, {});
91
91
  if (!value)
92
92
  return null;
93
- return link ? ((0, jsx_runtime_1.jsx)(StyledExpLink, { href: link, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) })) : ((0, jsx_runtime_1.jsx)(StyledExpTab, { children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) }));
93
+ return link ? ((0, jsx_runtime_1.jsx)(StyledExpLink, { href: link, className: className, style: style, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) })) : ((0, jsx_runtime_1.jsx)(StyledExpTab, { className: className, style: style, children: (0, jsx_runtime_1.jsx)(LabelContent, { value: value }) }));
94
94
  };
95
95
  const LabelContent = ({ value }) => {
96
96
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(image_1.default, { src: `${constants_1.staticLink}/public/rewardsPage/XP_logo.svg`, alt: "Experience logo", width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)("p", { className: `value`, children: [value, " XP"] })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludo.ninja/components",
3
- "version": "2.3.85",
3
+ "version": "2.3.87",
4
4
  "private": false,
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",