react-jupiter 5.11.29 → 5.11.31
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/button/index.js
CHANGED
package/button/theme.js
CHANGED
|
@@ -10,19 +10,19 @@ height:56
|
|
|
10
10
|
},
|
|
11
11
|
md:{
|
|
12
12
|
padding:"4px 32px",
|
|
13
|
-
font:
|
|
13
|
+
font:16,
|
|
14
14
|
minWidth:128,
|
|
15
15
|
height:48
|
|
16
16
|
},
|
|
17
17
|
sm:{
|
|
18
18
|
padding:"2px 16px",
|
|
19
|
-
font:
|
|
19
|
+
font:13,
|
|
20
20
|
minWidth:80,
|
|
21
21
|
height:36
|
|
22
22
|
},
|
|
23
23
|
xs:{
|
|
24
24
|
padding:"2px 8px",
|
|
25
|
-
font:
|
|
25
|
+
font:10,
|
|
26
26
|
minWidth:64,
|
|
27
27
|
height:32
|
|
28
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_styledComponents=require("styled-components"),_reactHookForm=require("react-hook-form"),_globalStyle=_interopRequireDefault(require("../../globalStyle")),_theme=_interopRequireDefault(require("../theme")),_errorMsg=_interopRequireDefault(require("../errorMsg")),_label=_interopRequireDefault(require("../label")),_index=require("./index.style"),_index2=require("../index.style"),_numbers=require("../../utils/numbers");function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&Object.prototype.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e.default=b,d&&d.set(b,e),e}function _extends(){return _extends=Object.assign?Object.assign.bind():function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -48,15 +48,26 @@ const TextInput=(a)=>
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
{
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
51
57
|
function b(a){
|
|
52
58
|
a.target.setSelectionRange(0,0)
|
|
53
|
-
}let{type:f="text",label:g=null,htmlElementName:c,id:h=null,placeholder:i=null,disabled:j=!1,description:k=null,required:l=!1,number:m=null,rtl:n=!0,onFocus:o=()=>{},readOnly:p=!1,register:d,control:e}=a;
|
|
59
|
+
}let{type:f="text",label:g=null,htmlElementName:c,id:h=null,placeholder:i=null,disabled:j=!1,description:k=null,required:l=!1,number:m=null,rtl:n=!0,onFocus:o=()=>{},readOnly:p=!1,register:d,control:e}=a;const[q,r]=(0,_react.useState)(!1),s=()=>{r((a)=>!a)};
|
|
54
60
|
|
|
55
61
|
return/*#__PURE__*/(
|
|
56
62
|
_react.default.createElement(_styledComponents.ThemeProvider,{theme:_theme.default},/*#__PURE__*/
|
|
57
63
|
_react.default.createElement(_index2.Fieldset,null,/*#__PURE__*/
|
|
58
64
|
_react.default.createElement(_globalStyle.default,null),/*#__PURE__*/
|
|
59
|
-
_react.default.createElement(_label.default,{
|
|
65
|
+
_react.default.createElement(_label.default,{
|
|
66
|
+
htmlFor:h||"".concat(f,"-").concat(c.split(" ").join("")),
|
|
67
|
+
label:g,
|
|
68
|
+
number:m,
|
|
69
|
+
required:l}
|
|
70
|
+
),
|
|
60
71
|
k&&/*#__PURE__*/
|
|
61
72
|
_react.default.createElement(_index.DescriptionContainer,{size:10,color:"gray","data-test":"text-input-description"},
|
|
62
73
|
k
|
|
@@ -70,14 +81,16 @@ render:(a)=>{var e;let{field:{value:k},fieldState:g}=a;return/*#__PURE__*/(
|
|
|
70
81
|
_react.default.createElement(_react.default.Fragment,null,
|
|
71
82
|
"password"===f&&/*#__PURE__*/
|
|
72
83
|
_react.default.createElement(_index.PasswordIcon,{
|
|
73
|
-
name:"visibility",
|
|
74
|
-
color:"gray"
|
|
84
|
+
name:q?"visibility-off":"visibility",
|
|
85
|
+
color:"gray",
|
|
86
|
+
onClick:s,
|
|
87
|
+
style:{cursor:"pointer"}}
|
|
75
88
|
),/*#__PURE__*/
|
|
76
89
|
|
|
77
90
|
_react.default.createElement(_index.Input,_extends({
|
|
78
91
|
id:h||"".concat(f,"-").concat(c.split(" ").join("")),
|
|
79
92
|
name:c,
|
|
80
|
-
type:
|
|
93
|
+
type:q?"text":f,
|
|
81
94
|
placeholder:i,
|
|
82
95
|
defaultValue:k,
|
|
83
96
|
rtl:n},
|
|
@@ -51,6 +51,27 @@ type:(0,_addonKnobs.select)("select type(default : text)",["text","password"]),
|
|
|
51
51
|
rtl:!1}
|
|
52
52
|
))
|
|
53
53
|
|
|
54
|
+
}).
|
|
55
|
+
add("Password input",()=>{
|
|
56
|
+
const{
|
|
57
|
+
register:a,
|
|
58
|
+
control:b
|
|
59
|
+
}=(0,_reactHookForm.useForm)();
|
|
60
|
+
return/*#__PURE__*/(
|
|
61
|
+
_react.default.createElement(_index.default,{
|
|
62
|
+
htmlElementName:"text-name-03",
|
|
63
|
+
required:!0,
|
|
64
|
+
label:(0,_addonKnobs.text)("optional label","\u0627\u06CC\u0646 \u0644\u06CC\u0628\u0644 \u0627\u0633\u062A"),
|
|
65
|
+
number:23,
|
|
66
|
+
register:a,
|
|
67
|
+
control:b,
|
|
68
|
+
placeholder:(0,_addonKnobs.text)("optional placeholder","\u0645\u062A\u0646 \u067E\u06CC\u0634\u0641\u0631\u0636"),
|
|
69
|
+
disabled:(0,_addonKnobs.boolean)("disabled(default : false)",!1),
|
|
70
|
+
description:(0,_addonKnobs.text)("optional description","\u062A\u0648\u0636\u06CC\u062D\u0627\u062A \u0627\u0636\u0627\u0641\u0647"),
|
|
71
|
+
errorMessage:(0,_addonKnobs.text)("optional error msg","\u0627\u0631\u0648\u0631 \u0632\u06CC\u0628\u0627"),
|
|
72
|
+
type:"password"}
|
|
73
|
+
))
|
|
74
|
+
|
|
54
75
|
}).
|
|
55
76
|
addDecorator(_addonInfo.withInfo).
|
|
56
77
|
addDecorator(_addonKnobs.withKnobs);
|
package/package.json
CHANGED
package/typography/text/index.js
CHANGED
|
@@ -23,17 +23,18 @@ const renderString=(a)=>
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
{let{size:d=_theme.default.defaultSize,color:e="default",underline:f=!1,lineThrough:g=!1,strong:h=!1,bold:i=!1,fontWight:j=400,emphasized:k=!1,subScript:l=!1,supScript:m=!1,marked:n=!1,label:o=!1,isDisplayBlock:p=!1,isCutWithEllipsis:q=!1,children:b,...c}=a;
|
|
27
28
|
if(void 0===b)return null;
|
|
28
29
|
|
|
29
|
-
let
|
|
30
|
+
let r;
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
|
|
36
|
-
switch(
|
|
37
|
+
switch(r=h?"strong":k?"emphasized":l?"subScript":m?"supScript":"span",r){
|
|
37
38
|
case"strong":
|
|
38
39
|
return/*#__PURE__*/(
|
|
39
40
|
_react.default.createElement(_index.Strong,_extends({
|
|
@@ -41,9 +42,9 @@ size:d,
|
|
|
41
42
|
color:e,
|
|
42
43
|
underline:f&&!g,
|
|
43
44
|
lineThrough:g&&!f,
|
|
44
|
-
emphasized:
|
|
45
|
-
marked:
|
|
46
|
-
isLabel:n
|
|
45
|
+
emphasized:k,
|
|
46
|
+
marked:n&&!o,
|
|
47
|
+
isLabel:o&&!n,
|
|
47
48
|
"data-test":"strong"},
|
|
48
49
|
c),
|
|
49
50
|
|
|
@@ -58,8 +59,8 @@ color:e,
|
|
|
58
59
|
underline:f&&!g,
|
|
59
60
|
lineThrough:g&&!f,
|
|
60
61
|
bold:i,
|
|
61
|
-
marked:
|
|
62
|
-
isLabel:n
|
|
62
|
+
marked:n&&!o,
|
|
63
|
+
isLabel:o&&!n,
|
|
63
64
|
"data-test":"emphasized"},
|
|
64
65
|
c),
|
|
65
66
|
|
|
@@ -86,12 +87,13 @@ spanSize:d,
|
|
|
86
87
|
spanColor:e,
|
|
87
88
|
underline:f&&!g,
|
|
88
89
|
lineThrough:g&&!f,
|
|
89
|
-
marked:
|
|
90
|
-
isLabel:n
|
|
90
|
+
marked:n&&!o,
|
|
91
|
+
isLabel:o&&!n,
|
|
91
92
|
bold:i,
|
|
93
|
+
fontWight:j,
|
|
92
94
|
"data-test":"span",
|
|
93
|
-
isDisplayBlock:
|
|
94
|
-
isCutWithEllipsis:
|
|
95
|
+
isDisplayBlock:p,
|
|
96
|
+
isCutWithEllipsis:q},
|
|
95
97
|
c),
|
|
96
98
|
|
|
97
99
|
b
|
|
@@ -30,13 +30,13 @@ b.colors.gray400,"; padding: 2px 8px; border-radius: 2px;"):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
String=exports.String=_styledComponents.default.span(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-family: 'IranSharp';\n font-size: ",";\n ","\n ","\n color: ",";\n ","
|
|
33
|
+
String=exports.String=_styledComponents.default.span(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n font-family: 'IranSharp';\n font-size: ",";\n ","\n ","\n color: ",";\n font-weight: ",";\n ","\n ","\n ","\n ","\n ","\n"])),
|
|
34
34
|
|
|
35
35
|
(a)=>{let{spanSize:b}=a;return"".concat(b,"px")},
|
|
36
36
|
(a)=>{let{underline:b}=a;return b?"text-decoration: underline;":""},
|
|
37
37
|
(a)=>{let{lineThrough:b}=a;return b?"text-decoration: line-through;":""},
|
|
38
38
|
(a)=>{let{theme:b,spanColor:c}=a;return(0,_theme.getColorFromName)(b,c)},
|
|
39
|
-
(a)=>{let{bold:b}=a;return b?"
|
|
39
|
+
(a)=>{let{bold:b,fontWeight:c}=a;return b?"bold":c},
|
|
40
40
|
(a)=>{let{theme:b,marked:c}=a;return c?"background-color: ".concat(b.colors.blue200,";"):""},
|
|
41
41
|
(a)=>{let{theme:b,isLabel:c}=a;return c?"background-color: ".concat(
|
|
42
42
|
b.colors.gray400,"; padding: 2px 8px; border-radius: 2px;"):
|