react-jupiter 5.12.0 → 6.0.0-beta.10

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.
Files changed (147) hide show
  1. package/accordion/index.js +1 -1
  2. package/accordion/index.styles.js +47 -5
  3. package/accordion/panel.js +5 -5
  4. package/avatar/index.js +2 -2
  5. package/avatar/index.styles.js +15 -15
  6. package/button/index.js +139 -45
  7. package/button/index.styles.js +96 -93
  8. package/button/theme.js +53 -29
  9. package/button/utils.js +2 -2
  10. package/card/card-template/index.js +2 -2
  11. package/card/card-template/index.stories.js +99 -59
  12. package/card/card-template/index.style.js +22 -22
  13. package/card/card-template/index.test.js +8 -8
  14. package/card/event-card/event-card-label/index.style.js +8 -8
  15. package/card/event-card/index.js +5 -5
  16. package/card/event-card/index.stories.js +139 -128
  17. package/card/event-card/index.style.js +121 -111
  18. package/card/event-card/index.test.js +1 -1
  19. package/card/organization-card/index.js +1 -1
  20. package/card/organization-card/index.stories.js +40 -10
  21. package/card/organization-card/index.style.js +6 -6
  22. package/card/organization-card/index.test.js +1 -1
  23. package/card/orgnizer-card/buttons.js +1 -1
  24. package/card/orgnizer-card/index.js +27 -27
  25. package/card/orgnizer-card/index.stories.js +73 -17
  26. package/card/orgnizer-card/index.style.js +58 -47
  27. package/cover/index.js +5 -5
  28. package/cover/index.style.js +44 -37
  29. package/display/index.js +1 -1
  30. package/display/index.style.js +77 -76
  31. package/file-item/fileImgIcon.js +2 -2
  32. package/file-item/fileImgsFont.js +798 -798
  33. package/file-item/index.js +2 -2
  34. package/file-item/index.style.js +31 -30
  35. package/file-item/utils.js +1 -1
  36. package/form/captcha/index.js +3 -3
  37. package/form/captcha/index.stories.js +41 -22
  38. package/form/captcha/index.style.js +38 -36
  39. package/form/checkbox/checkbox-option.js +2 -2
  40. package/form/checkbox/checkbox.js +4 -4
  41. package/form/checkbox/index.stories.js +100 -35
  42. package/form/checkbox/index.style.js +62 -40
  43. package/form/dropdown/index.stories.js +96 -39
  44. package/form/dropdown/index.style.js +57 -55
  45. package/form/dropdown/option.js +1 -1
  46. package/form/dropdown/select.js +2 -2
  47. package/form/errorMsg.js +2 -2
  48. package/form/radio/index.stories.js +96 -33
  49. package/form/radio/index.style.js +61 -52
  50. package/form/radio/radio-option.js +2 -2
  51. package/form/radio/radio.js +4 -4
  52. package/form/text-input/index.js +4 -4
  53. package/form/text-input/index.stories.js +67 -16
  54. package/form/text-input/index.style.js +57 -55
  55. package/form/textarea/index.js +1 -1
  56. package/form/textarea/index.stories.js +79 -20
  57. package/form/textarea/index.style.js +23 -23
  58. package/form-v7/captcha/index.js +6 -6
  59. package/form-v7/captcha/index.stories.js +55 -25
  60. package/form-v7/captcha/index.style.js +38 -36
  61. package/form-v7/checkbox/checkbox-option.js +5 -3
  62. package/form-v7/checkbox/checkbox.js +9 -7
  63. package/form-v7/checkbox/index.stories.js +100 -67
  64. package/form-v7/checkbox/index.style.js +62 -40
  65. package/form-v7/dropdown/index.stories.js +101 -92
  66. package/form-v7/dropdown/index.style.js +57 -55
  67. package/form-v7/dropdown/option.js +1 -1
  68. package/form-v7/dropdown/select.js +8 -7
  69. package/form-v7/errorMsg.js +2 -2
  70. package/form-v7/file-input/index.js +6 -6
  71. package/form-v7/file-input/index.stories.js +63 -22
  72. package/form-v7/file-input/index.style.js +62 -54
  73. package/form-v7/form/index.stories.js +167 -64
  74. package/form-v7/index.style.js +10 -2
  75. package/form-v7/label/index.js +2 -2
  76. package/form-v7/label/index.style.js +11 -11
  77. package/form-v7/radio/index.stories.js +100 -65
  78. package/form-v7/radio/index.style.js +61 -52
  79. package/form-v7/radio/radio-option.js +5 -3
  80. package/form-v7/radio/radio.js +9 -7
  81. package/form-v7/text-input/index.js +8 -7
  82. package/form-v7/text-input/index.stories.js +83 -64
  83. package/form-v7/text-input/index.style.js +49 -41
  84. package/form-v7/textarea/index.js +5 -4
  85. package/form-v7/textarea/index.stories.js +77 -31
  86. package/form-v7/textarea/index.style.js +23 -23
  87. package/globalStyle.js +26 -26
  88. package/grid/index.js +83 -0
  89. package/icon/iconFont.js +1054 -796
  90. package/icon/index.js +97 -28
  91. package/icon/index.styles.js +7 -7
  92. package/index.js +2 -2
  93. package/modal/index.js +13 -13
  94. package/modal/index.style.js +15 -15
  95. package/numeric-summery-report/index.js +1 -1
  96. package/numeric-summery-report/index.style.js +16 -11
  97. package/package.json +1 -3
  98. package/product-menu/index.style.js +38 -37
  99. package/product-menu/menu-item.js +1 -1
  100. package/product-menu/menu.js +1 -1
  101. package/product-menu/theme.js +5 -1
  102. package/product-owner/index.js +1 -1
  103. package/product-owner/index.style.js +12 -6
  104. package/product-properties/index.js +5 -5
  105. package/product-properties/index.style.js +14 -11
  106. package/product-properties/product-property/index.js +1 -1
  107. package/product-properties/product-property/index.style.js +6 -6
  108. package/progress-bar/index.js +1 -1
  109. package/progress-bar/index.styles.js +65 -63
  110. package/show-date/index.js +1 -1
  111. package/spacing/core.js +104 -68
  112. package/spacing/margin/index.js +11 -11
  113. package/spacing/padding/index.js +11 -11
  114. package/table/actionCell.js +2 -2
  115. package/table/index.js +1 -1
  116. package/table/index.style.js +107 -106
  117. package/table/tableHeaderRow.js +1 -1
  118. package/table/tableRow.js +4 -4
  119. package/tabs/index.style.js +35 -32
  120. package/tabs/tabPanel.js +2 -2
  121. package/tabs/tabs.js +3 -3
  122. package/tabs/theme.js +1 -1
  123. package/titled-avatar/index.js +2 -2
  124. package/titled-avatar/index.style.js +30 -25
  125. package/typography/heading/index.js +2 -2
  126. package/typography/heading/index.stories.js +87 -34
  127. package/typography/heading/index.styles.js +69 -67
  128. package/typography/heading/index.test.js +13 -13
  129. package/typography/link/index.js +5 -5
  130. package/typography/link/index.stories.js +66 -8
  131. package/typography/link/index.styles.js +5 -5
  132. package/typography/link/index.test.js +1 -1
  133. package/typography/paragraph/index.js +3 -3
  134. package/typography/paragraph/index.stories.js +56 -27
  135. package/typography/paragraph/index.styles.js +10 -10
  136. package/typography/paragraph/index.test.js +3 -3
  137. package/typography/text/index.js +6 -6
  138. package/typography/text/index.stories.js +196 -26
  139. package/typography/text/index.styles.js +73 -72
  140. package/typography/text/index.test.js +2 -2
  141. package/typography/utils.js +24 -24
  142. package/utils/media-query.js +5 -5
  143. package/utils/test.js +1 -1
  144. package/icons/index.js +0 -29
  145. package/icons/index.style.js +0 -30
  146. package/icons/theme.js +0 -12
  147. package/icons/utils.js +0 -672
@@ -1,45 +1,91 @@
1
- "use strict";var _react=_interopRequireDefault(require("react")),_react2=require("@storybook/react"),_addonInfo=require("@storybook/addon-info"),_addonActions=require("@storybook/addon-actions"),_addonKnobs=require("@storybook/addon-knobs"),_reactHookForm=require("react-hook-form"),_index=_interopRequireDefault(require("./index"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.WithError=exports.NoResize=exports.Minimal=exports.HorizontalResize=exports.FullOptions=exports.Disabled=void 0;var _react=_interopRequireDefault(require("react")),_addonActions=require("@storybook/addon-actions"),_reactHookForm=require("react-hook-form"),_index=_interopRequireDefault(require("./index"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}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)({}).hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(null,arguments)}var _default=exports.default=
2
2
 
3
3
 
4
4
 
5
5
 
6
6
 
7
+ {
8
+ title:"Form-V7/Textarea",
9
+ component:_index.default,
7
10
 
11
+ argTypes:{
12
+ label:{
13
+ control:"text",
14
+ defaultValue:"\u062A\u0648\u0636\u06CC\u062C\u0627\u062A"
15
+ },
16
+ htmlElementName:{
17
+ control:"text",
18
+ defaultValue:"html-element-name"
19
+ },
20
+ placeholder:{
21
+ control:"text",
22
+ defaultValue:"\u0627\u06CC\u0646 \u067E\u0644\u06CC\u0633 \u0647\u0648\u0644\u062F\u0631 \u0627\u0633\u062A"
23
+ },
24
+ minHeight:{
25
+ control:"text",
26
+ defaultValue:"120"
27
+ },
28
+ isDisabled:{
29
+ control:"boolean",
30
+ defaultValue:!1
31
+ },
32
+ required:{
33
+ control:"boolean",
34
+ defaultValue:!0
35
+ },
36
+ resize:{
37
+ control:"select",
38
+ options:["both","horizontal","vertical","none"],
39
+ defaultValue:"both"
40
+ },
41
+ defaultValue:{
42
+ control:"text",
43
+ defaultValue:"\u0627\u06CC\u0646 \u06CC\u06A9 \u0628\u0627\u06A9\u0633 \u0645\u062A\u0646\u06CC \u0645\u06CC\u200C\u0628\u0627\u0634\u062F"
44
+ }
45
+ }
46
+ };const
8
47
 
48
+ Template=(a)=>{
49
+ const{register:b,control:c}=(0,_reactHookForm.useForm)();
50
+ return/*#__PURE__*/_react.default.createElement(_index.default,_extends({},a,{register:b,control:c}))
51
+ },
9
52
 
53
+ Minimal=exports.Minimal=Template.bind({});
54
+ Minimal.args={};
10
55
 
11
-
12
- (0,_react2.storiesOf)("Form-V7/Textarea",module).
13
- add("Minimal Textarea",()=>{
14
- const{
15
- register:a,
16
- control:b
17
- }=(0,_reactHookForm.useForm)();
18
- return/*#__PURE__*/(
19
- _react.default.createElement(_index.default,{register:a,control:b}))
20
-
21
- }).
22
- add("Full option Textarea",()=>{
23
- const{
24
- register:a,
25
- control:b
26
- }=(0,_reactHookForm.useForm)();
27
-
28
- return/*#__PURE__*/(
29
- _react.default.createElement(_index.default,{
30
- register:a,
31
- control:b,
32
- label:(0,_addonKnobs.text)("optional label","\u062A\u0648\u0636\u06CC\u062C\u0627\u062A"),
33
- htmlElementName:(0,_addonKnobs.text)("optional html-element-name","html-element-name"),
34
- placeholder:(0,_addonKnobs.text)("optional placeholder","\u0627\u06CC\u0646 \u067E\u0644\u06CC\u0633 \u0647\u0648\u0644\u062F\u0631 \u0627\u0633\u062A"),
35
- minHeight:(0,_addonKnobs.text)("optional minHeight (it should be a number)","120"),
56
+ const FullOptions=exports.FullOptions=Template.bind({});
57
+ FullOptions.args={
58
+ label:"\u062A\u0648\u0636\u06CC\u062C\u0627\u062A",
59
+ htmlElementName:"html-element-name",
60
+ placeholder:"\u0627\u06CC\u0646 \u067E\u0644\u06CC\u0633 \u0647\u0648\u0644\u062F\u0631 \u0627\u0633\u062A",
61
+ minHeight:"120",
36
62
  isDisabled:!1,
37
63
  required:!0,
38
64
  resize:"both",
39
65
  handleChange:(0,_addonActions.action)("trigger what you want to do in onChange function"),
40
- defaultValue:"\u0627\u06CC\u0646 \u06CC\u06A9 \u0628\u0627\u06A9\u0633 \u0645\u062A\u0646\u06CC \u0645\u06CC\u200C\u0628\u0627\u0634\u062F"}
41
- ))
66
+ defaultValue:"\u0627\u06CC\u0646 \u06CC\u06A9 \u0628\u0627\u06A9\u0633 \u0645\u062A\u0646\u06CC \u0645\u06CC\u200C\u0628\u0627\u0634\u062F"
67
+ };
68
+
69
+ const Disabled=exports.Disabled=Template.bind({});
70
+ Disabled.args={
71
+ ...FullOptions.args,
72
+ isDisabled:!0
73
+ };
74
+
75
+ const NoResize=exports.NoResize=Template.bind({});
76
+ NoResize.args={
77
+ ...FullOptions.args,
78
+ resize:"none"
79
+ };
80
+
81
+ const HorizontalResize=exports.HorizontalResize=Template.bind({});
82
+ HorizontalResize.args={
83
+ ...FullOptions.args,
84
+ resize:"horizontal"
85
+ };
42
86
 
43
- }).
44
- addDecorator(_addonInfo.withInfo).
45
- addDecorator(_addonKnobs.withKnobs);
87
+ const WithError=exports.WithError=Template.bind({});
88
+ WithError.args={
89
+ ...FullOptions.args,
90
+ errorMessage:"\u0644\u0637\u0641\u0627 \u0645\u062A\u0646 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F"
91
+ };
@@ -1,25 +1,25 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=_interopRequireDefault(require("styled-components"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
2
-
3
- const StyledTextarea=_styledComponents.default.textarea(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n font-family: 'IranSharp';\n font-size: 14px;\n\n resize: ",";\n min-height: ",";\n width: 100%;\n padding: 8px 16px;\n box-sizing: border-box;\n \n border-radius: ",";\n border: 1px solid ",";\n background: ",";\n\n &:hover {\n border-color: ",";\n }\n &:focus {\n border-color: ",";\n }\n"])),
4
-
5
-
6
-
7
- (a)=>{let{resize:b}=a;return b},
8
- (a)=>{let{minHeight:b}=a;return"".concat(b,"px")},
9
-
10
-
11
-
12
-
13
- (a)=>{let{theme:b}=a;return"".concat(b.borderRadius,"px")},
14
- (a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.color:c.borderColor.normal},
15
- (a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.background:"white"},
16
-
17
-
18
- (a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.color:c.borderColor.hover},
19
-
20
-
21
- (a)=>{let{theme:b}=a;return b.borderColor.focus});var _default=exports.default=
22
-
23
-
1
+ "use strict";var _styledComponents=_interopRequireDefault(require("styled-components"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
2
+
3
+ const StyledTextarea=_styledComponents.default.textarea`
4
+ font-family: 'IranSharp';
5
+ font-size: 14px;
6
+
7
+ resize: ${(a)=>{let{resize:b}=a;return b}};
8
+ min-height: ${(a)=>{let{minHeight:b}=a;return`${b}px`}};
9
+ width: 100%;
10
+ padding: 8px 16px;
11
+ box-sizing: border-box;
12
+
13
+ border-radius: ${(a)=>{let{theme:b}=a;return`${b.borderRadius}px`}};
14
+ border: 1px solid ${(a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.color:c.borderColor.normal}};
15
+ background: ${(a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.background:"white"}};
16
+
17
+ &:hover {
18
+ border-color: ${(a)=>{let{disabled:b,theme:c}=a;return b?c.disabled.color:c.borderColor.hover}};
19
+ }
20
+ &:focus {
21
+ border-color: ${(a)=>{let{theme:b}=a;return b.borderColor.focus}};
22
+ }
23
+ `;var _default=exports.default=
24
24
 
25
25
  StyledTextarea;
package/globalStyle.js CHANGED
@@ -1,28 +1,28 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _templateObject,_styledComponents=require("styled-components");function _taggedTemplateLiteral(a,b){return b||(b=a.slice(0)),Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(b)}}))}
2
-
3
- const GlobalStyle=(0,_styledComponents.createGlobalStyle)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n h1, h2, h3, h4, h5, h6, p, ol, ul {\n margin: 0;\n padding: 0;\n font-weight: normal;\n }\n\n ol, ul {\n list-style: none;\n }\n\n *, *:before, *:after {\n box-sizing: inherit;\n outline: none;\n }\n\n a {\n text-decoration: none;\n }\n\n .ReactModal__Body--open {\n overflow: hidden;\n }\n"])));var _default=exports.default=
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
1
+ "use strict";var _styledComponents=require("styled-components");Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;
2
+
3
+ const GlobalStyle=(0,_styledComponents.createGlobalStyle)`
4
+ h1, h2, h3, h4, h5, h6, p, ol, ul {
5
+ margin: 0;
6
+ padding: 0;
7
+ font-weight: normal;
8
+ }
9
+
10
+ ol, ul {
11
+ list-style: none;
12
+ }
13
+
14
+ *, *:before, *:after {
15
+ box-sizing: inherit;
16
+ outline: none;
17
+ }
18
+
19
+ a {
20
+ text-decoration: none;
21
+ }
22
+
23
+ .ReactModal__Body--open {
24
+ overflow: hidden;
25
+ }
26
+ `;var _default=exports.default=
27
27
 
28
28
  GlobalStyle;
package/grid/index.js ADDED
@@ -0,0 +1,83 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireDefault(require("react")),_styledComponents=_interopRequireWildcard(require("styled-components"));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&&{}.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 _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}const
2
+
3
+
4
+ getResponsiveValue=(a,b)=>{
5
+ if("object"==typeof a){
6
+ const c=b.breakpoints||{
7
+ mobile:0,
8
+ tablet:768,
9
+ desktop:1024
10
+ };
11
+
12
+ return Object.entries(a).
13
+ map((a)=>{let[b,d]=a;
14
+ const e=c[b];
15
+ return e?
16
+ `@media (min-width: ${e}px) { width: ${100*d}%; }`:
17
+ ""
18
+ }).
19
+ join("\n")
20
+ }
21
+ return`width: ${100*a}%;`
22
+ },
23
+
24
+ getResponsiveVisibility=(a,b)=>{
25
+ if("object"==typeof a){
26
+ const c=b.breakpoints||{
27
+ mobile:0,
28
+ tablet:768,
29
+ desktop:1024
30
+ };
31
+
32
+ return Object.entries(a).
33
+ map((a)=>{let[b,d]=a;
34
+ const e=c[b];
35
+ return e?
36
+ `@media (min-width: ${e}px) { display: ${d?"block":"none"}; }`:
37
+ ""
38
+ }).
39
+ join("\n")
40
+ }
41
+ return`display: ${a?"block":"none"};`
42
+ },
43
+
44
+ getResponsiveAlignment=(a,b)=>{
45
+ if("object"==typeof a){
46
+ const c=b.breakpoints||{
47
+ mobile:0,
48
+ tablet:768,
49
+ desktop:1024
50
+ };
51
+
52
+ return Object.entries(a).
53
+ map((a)=>{let[b,d]=a;
54
+ const e=c[b];
55
+ return e?`@media (min-width: ${e}px) { justify-content: ${d}; }`:""
56
+ }).
57
+ join("\n")
58
+ }
59
+ return`justify-content: ${a};`
60
+ },
61
+
62
+ GridContainer=_styledComponents.default.div`
63
+ display: flex;
64
+ flex-wrap: ${(a)=>{let{wrap:b}=a;return b?"wrap":"nowrap"}};
65
+ flex-direction: ${(a)=>{let{reverse:b}=a;return b?"row-reverse":"row"}};
66
+ ${(a)=>{let{horizontalAlign:b,theme:c}=a;return getResponsiveAlignment(b||"left",c)}}
67
+ ${(a)=>{let{verticalAlign:b}=a;return`align-items: ${b||"stretch"};`}}
68
+ `,
69
+
70
+ GridUnit=_styledComponents.default.div`
71
+ ${(a)=>{let{size:b,theme:c}=a;return getResponsiveValue(b,c)}}
72
+ ${(a)=>{let{visible:b,theme:c}=a;return getResponsiveVisibility(b,c)}}
73
+ `,
74
+
75
+ Grid=(a)=>{let{children:b,...c}=a;return(/*#__PURE__*/
76
+ _react.default.createElement(GridContainer,c,
77
+ b
78
+ ))};
79
+
80
+
81
+ Grid.Unit=GridUnit;var _default=exports.default=
82
+
83
+ Grid;