react-jupiter 5.9.58 → 5.9.60
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/theme.js +6 -0
- package/form-v7/captcha/index.js +14 -9
- package/form-v7/form/index.stories.js +6 -4
- package/icons/index.style.js +1 -2
- package/package.json +1 -1
package/button/theme.js
CHANGED
package/form-v7/captcha/index.js
CHANGED
|
@@ -32,7 +32,8 @@ b=
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
a.htmlElementName,c=a.label,d=a.classNames,e=a.imageUrl,f=a.register,g=a.control,h=a.fetchData,i=a.setValue,j=a.loading,k=a.number;
|
|
36
37
|
|
|
37
38
|
return/*#__PURE__*/(
|
|
38
39
|
_react.default.createElement(_styledComponents.ThemeProvider,{theme:_theme.default},/*#__PURE__*/
|
|
@@ -41,22 +42,26 @@ _react.default.createElement(_reactHookForm.Controller,{
|
|
|
41
42
|
name:b,
|
|
42
43
|
control:g,
|
|
43
44
|
rules:{required:"\u0627\u06CC\u0646 \u0641\u06CC\u0644\u062F \u0627\u062C\u0628\u0627\u0631\u06CC \u0627\u0633\u062A"},
|
|
44
|
-
render:function render(a){var d,
|
|
45
|
+
render:function render(a){var d,
|
|
46
|
+
g=a.fieldState;return/*#__PURE__*/(
|
|
47
|
+
|
|
45
48
|
_react.default.createElement(_display.default,{display:"block"},/*#__PURE__*/
|
|
46
|
-
_react.default.createElement(_label.default,{htmlFor:b,label:c,number:
|
|
49
|
+
_react.default.createElement(_label.default,{htmlFor:b,label:c,number:k,required:!0}),/*#__PURE__*/
|
|
47
50
|
_react.default.createElement(_display.default,{display:"flex"},/*#__PURE__*/
|
|
48
51
|
_react.default.createElement(_display.default,{display:"flex",width:"100%"},/*#__PURE__*/
|
|
49
52
|
_react.default.createElement(_index.Input,_extends({
|
|
50
53
|
id:"text".concat("-",b.split(" ").join("")),
|
|
51
54
|
name:b,
|
|
52
55
|
type:"text",
|
|
53
|
-
rtl:!1
|
|
54
|
-
|
|
56
|
+
rtl:!1
|
|
57
|
+
// onChange={(e) => onChange(e.target.value.replace(/[٠-٩۰-۹]/g, (a) => a.charCodeAt(0) && 15))}
|
|
58
|
+
,className:"captcha-input"},
|
|
55
59
|
f(b,{
|
|
56
60
|
pattern:{
|
|
57
|
-
value:/^[0-9]{4}$/,
|
|
61
|
+
value:/^[۰۱۲۳۴۵۶۷۸۹0-9]{4}$/,
|
|
58
62
|
message:"\u0644\u0637\u0641\u0627 \u0627\u0639\u062F\u0627\u062F \u0627\u0646\u06AF\u0644\u06CC\u0633\u06CC \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F."
|
|
59
|
-
}
|
|
63
|
+
},
|
|
64
|
+
onChange:function onChange(a){return i(b,a.target.value.replace(/[\u0660-\u0669\u06f0-\u06f9]/g,function(a){return 15&a.charCodeAt(0)}))}
|
|
60
65
|
}))),/*#__PURE__*/
|
|
61
66
|
|
|
62
67
|
_react.default.createElement("img",{
|
|
@@ -68,8 +73,8 @@ loading:"lazy",
|
|
|
68
73
|
"data-test":"captcha-img"})),/*#__PURE__*/
|
|
69
74
|
|
|
70
75
|
|
|
71
|
-
_react.default.createElement(_button.default,{type:"button",size:"sm",styleType:"tertiary",onClick:h,disabled:
|
|
72
|
-
_react.default.createElement(_icon.default,{name:
|
|
76
|
+
_react.default.createElement(_button.default,{type:"button",size:"sm",styleType:"tertiary",onClick:h,disabled:j},/*#__PURE__*/
|
|
77
|
+
_react.default.createElement(_icon.default,{name:j?"loading":"refresh"}))),/*#__PURE__*/
|
|
73
78
|
|
|
74
79
|
|
|
75
80
|
_react.default.createElement(_errorMsg.default,{errorMessage:g&&(null===(d=g.error)||void 0===d?void 0:d.message)})))}}))));
|
|
@@ -26,12 +26,13 @@ add("Sample Form",function(){var a=
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
(0,_reactHookForm.useForm)(),b=a.register,c=a.handleSubmit,d=a.control,
|
|
30
29
|
|
|
30
|
+
(0,_reactHookForm.useForm)(),b=a.register,c=a.handleSubmit,d=a.control,e=a.setValue,
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
f=[
|
|
35
36
|
"question 1",
|
|
36
37
|
"question 2",
|
|
37
38
|
"question 3"];
|
|
@@ -49,7 +50,7 @@ label:"select box",
|
|
|
49
50
|
number:1,
|
|
50
51
|
required:!1},
|
|
51
52
|
|
|
52
|
-
!!
|
|
53
|
+
!!f&&f.map(function(a,b){return/*#__PURE__*/(
|
|
53
54
|
_react.default.createElement(_dropdown.SelectOption,{key:b,value:a,label:a}))})),/*#__PURE__*/
|
|
54
55
|
|
|
55
56
|
|
|
@@ -152,7 +153,8 @@ label:"\u06A9\u062F \u062A\u0635\u0648\u06CC\u0631\u06CC",
|
|
|
152
153
|
htmlElementName:"captcha",
|
|
153
154
|
imageUrl:"https://static.evand.net/captcha/0bb5a9832be7b86a2a0a646ae2fd1649.jpg",
|
|
154
155
|
handleChange:(0,_addonActions.action)("trigger what you want to do in onChange function"),
|
|
155
|
-
fetchData:function fetchData(){return console.log("fetching")}
|
|
156
|
+
fetchData:function fetchData(){return console.log("fetching")},
|
|
157
|
+
setValue:e})),/*#__PURE__*/
|
|
156
158
|
|
|
157
159
|
|
|
158
160
|
|
package/icons/index.style.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
IconElement=_styledComponents.default.i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n color: ",";\n font-family: 'icomoon' !important;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n
|
|
7
|
+
IconElement=_styledComponents.default.i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: inline-block;\n vertical-align: middle;\n color: ",";\n font-family: 'icomoon' !important;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n text-transform: none;\n font-size: ","\n margin-left: ","\n margin-right: ","\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n\n &::before {\n ",";\n }\n"])),
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
function(a){var b=a.theme,c=a.color;return(0,_theme.getColorFromName)(b,c)},
|
|
@@ -15,7 +15,6 @@ function(a){var b=a.theme,c=a.color;return(0,_theme.getColorFromName)(b,c)},
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
function(a){var b=a.size;return"".concat((0,_utils.getSizeOfIcon)(b),"px;")},
|
|
20
19
|
function(a){var b=a.size;return"".concat((0,_utils.getMarginOfIcon)(b),"px;")},
|
|
21
20
|
function(a){var b=a.size;return"".concat((0,_utils.getMarginOfIcon)(b),"px;")},
|