react-jupiter 5.9.66 → 5.9.67-beta
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/accordion/index.js +5 -5
- package/accordion/index.styles.js +4 -4
- package/accordion/panel.js +16 -16
- package/avatar/index.js +12 -12
- package/avatar/index.styles.js +5 -5
- package/avatar/theme.js +4 -4
- package/button/index.js +16 -16
- package/button/index.styles.js +30 -30
- package/button/theme.js +4 -4
- package/button/utils.js +3 -3
- package/card/card-template/index.js +13 -13
- package/card/card-template/index.stories.js +49 -49
- package/card/card-template/index.style.js +11 -11
- package/card/card-template/index.test.js +23 -23
- package/card/event-card/constants.js +3 -3
- package/card/event-card/event-card-label/index.js +6 -6
- package/card/event-card/event-card-label/index.style.js +3 -3
- package/card/event-card/event-card-label/index.test.js +7 -7
- package/card/event-card/index.js +79 -79
- package/card/event-card/index.stories.js +51 -51
- package/card/event-card/index.style.js +22 -22
- package/card/event-card/index.test.js +17 -17
- package/card/index.js +2 -2
- package/card/organization-card/index.js +17 -17
- package/card/organization-card/index.stories.js +4 -4
- package/card/organization-card/index.style.js +3 -3
- package/card/organization-card/index.test.js +6 -6
- package/card/orgnizer-card/buttons.js +30 -30
- package/card/orgnizer-card/index.js +77 -77
- package/card/orgnizer-card/index.stories.js +5 -5
- package/card/orgnizer-card/index.style.js +10 -10
- package/cover/index.js +25 -25
- package/cover/index.style.js +6 -6
- package/display/index.js +11 -11
- package/display/index.style.js +16 -16
- package/file-item/fileImgIcon.js +8 -8
- package/file-item/fileImgsFont.js +3 -3
- package/file-item/index.js +36 -36
- package/file-item/index.style.js +11 -11
- package/file-item/theme.js +4 -4
- package/file-item/utils.js +1 -1
- package/form/captcha/index.js +29 -29
- package/form/captcha/index.stories.js +4 -4
- package/form/captcha/index.style.js +6 -6
- package/form/captcha/index.test.js +14 -14
- package/form/checkbox/checkbox-option.js +12 -12
- package/form/checkbox/checkbox.js +16 -16
- package/form/checkbox/index.js +2 -2
- package/form/checkbox/index.stories.js +14 -14
- package/form/checkbox/index.style.js +11 -11
- package/form/dropdown/index.js +2 -2
- package/form/dropdown/index.stories.js +18 -18
- package/form/dropdown/index.style.js +14 -14
- package/form/dropdown/index.test.js +6 -6
- package/form/dropdown/option.js +6 -6
- package/form/dropdown/select.js +17 -17
- package/form/errorMsg.js +7 -7
- package/form/index.js +2 -2
- package/form/radio/index.js +2 -2
- package/form/radio/index.stories.js +14 -14
- package/form/radio/index.style.js +12 -12
- package/form/radio/radio-option.js +12 -12
- package/form/radio/radio.js +17 -17
- package/form/text-input/index.js +33 -33
- package/form/text-input/index.stories.js +5 -5
- package/form/text-input/index.style.js +12 -12
- package/form/text-input/index.test.js +16 -16
- package/form/textarea/index.js +15 -15
- package/form/textarea/index.stories.js +7 -7
- package/form/textarea/index.style.js +10 -10
- package/form/theme.js +4 -4
- package/form-v7/captcha/index.js +37 -37
- package/form-v7/captcha/index.stories.js +9 -9
- package/form-v7/captcha/index.style.js +6 -6
- package/form-v7/captcha/index.test.js +14 -14
- package/form-v7/checkbox/checkbox-option.js +12 -12
- package/form-v7/checkbox/checkbox.js +18 -18
- package/form-v7/checkbox/index.js +2 -2
- package/form-v7/checkbox/index.stories.js +27 -27
- package/form-v7/checkbox/index.style.js +11 -11
- package/form-v7/dropdown/index.js +2 -2
- package/form-v7/dropdown/index.stories.js +32 -32
- package/form-v7/dropdown/index.style.js +14 -14
- package/form-v7/dropdown/index.test.js +6 -6
- package/form-v7/dropdown/option.js +6 -6
- package/form-v7/dropdown/select.js +20 -20
- package/form-v7/errorMsg.js +7 -7
- package/form-v7/file-input/index.js +25 -25
- package/form-v7/file-input/index.stories.js +7 -7
- package/form-v7/file-input/index.style.js +13 -13
- package/form-v7/file-input/index.test.js +16 -16
- package/form-v7/form/index.stories.js +51 -51
- package/form-v7/index.js +2 -2
- package/form-v7/index.style.js +1 -1
- package/form-v7/label/index.js +9 -9
- package/form-v7/label/index.style.js +4 -4
- package/form-v7/radio/index.js +2 -2
- package/form-v7/radio/index.stories.js +24 -24
- package/form-v7/radio/index.style.js +12 -12
- package/form-v7/radio/radio-option.js +12 -12
- package/form-v7/radio/radio.js +18 -18
- package/form-v7/text-input/index.js +22 -22
- package/form-v7/text-input/index.stories.js +14 -14
- package/form-v7/text-input/index.style.js +11 -11
- package/form-v7/text-input/index.test.js +16 -16
- package/form-v7/textarea/index.js +17 -17
- package/form-v7/textarea/index.stories.js +15 -15
- package/form-v7/textarea/index.style.js +10 -10
- package/form-v7/theme.js +4 -4
- package/globalStyle.js +3 -3
- package/icon/iconFont.js +3 -3
- package/icon/index.js +19 -19
- package/icon/index.styles.js +8 -8
- package/icon/theme.js +4 -4
- package/icons/index.js +9 -9
- package/icons/index.style.js +8 -8
- package/icons/theme.js +3 -3
- package/icons/utils.js +9 -9
- package/index.js +3 -3
- package/modal/index.js +21 -21
- package/modal/index.style.js +4 -4
- package/modal/theme.js +4 -4
- package/numeric-summery-report/index.js +10 -10
- package/numeric-summery-report/index.style.js +3 -3
- package/package.json +1 -1
- package/product-menu/index.js +2 -2
- package/product-menu/index.style.js +15 -15
- package/product-menu/menu-item.js +6 -6
- package/product-menu/menu.js +12 -12
- package/product-menu/theme.js +4 -4
- package/product-owner/index.js +42 -42
- package/product-owner/index.style.js +3 -3
- package/product-properties/index.js +19 -19
- package/product-properties/index.style.js +5 -5
- package/product-properties/product-property/index.js +13 -13
- package/product-properties/product-property/index.style.js +3 -3
- package/progress-bar/index.js +16 -16
- package/progress-bar/index.styles.js +8 -8
- package/responsive/index.js +13 -13
- package/show-date/index.js +10 -10
- package/spacing/index.js +2 -2
- package/spacing/margin/index.js +5 -5
- package/spacing/padding/index.js +5 -5
- package/table/actionCell.js +18 -18
- package/table/index.js +21 -21
- package/table/index.style.js +14 -14
- package/table/tableHeaderRow.js +9 -9
- package/table/tableRow.js +15 -15
- package/table/theme.js +4 -4
- package/tabs/index.js +2 -2
- package/tabs/index.style.js +10 -10
- package/tabs/tabPanel.js +5 -5
- package/tabs/tabs.js +22 -22
- package/tabs/theme.js +4 -4
- package/themes.js +3 -3
- package/titled-avatar/index.js +14 -14
- package/titled-avatar/index.style.js +5 -5
- package/typography/heading/index.js +12 -12
- package/typography/heading/index.stories.js +30 -30
- package/typography/heading/index.styles.js +31 -31
- package/typography/heading/index.test.js +42 -42
- package/typography/index.js +2 -2
- package/typography/link/index.js +23 -23
- package/typography/link/index.stories.js +5 -5
- package/typography/link/index.styles.js +4 -4
- package/typography/link/index.test.js +14 -14
- package/typography/paragraph/index.js +12 -12
- package/typography/paragraph/index.stories.js +4 -4
- package/typography/paragraph/index.styles.js +7 -7
- package/typography/paragraph/index.test.js +15 -15
- package/typography/text/index.js +40 -40
- package/typography/text/index.stories.js +19 -19
- package/typography/text/index.styles.js +36 -36
- package/typography/text/index.test.js +86 -86
- package/typography/theme.js +4 -4
- package/typography/utils.js +6 -6
- package/utils/date.js +2 -2
- package/utils/detectMobile.js +2 -2
- package/utils/index.js +2 -2
- package/utils/media-query.js +4 -4
- package/utils/numbers.js +4 -4
- package/utils/test.js +5 -5
- package/utils/theme.js +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var _react=_interopRequireDefault(require("react")),_enzyme=require("enzyme");require("jest-styled-components");var _index=_interopRequireDefault(require("./index")),_test=_interopRequireDefault(require("../../utils/test")),_theme=_interopRequireDefault(require("../theme"));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)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}
|
|
1
|
+
"use strict";var _react=_interopRequireDefault(require("react")),_enzyme=require("enzyme");require("jest-styled-components");var _index=_interopRequireDefault(require("./index")),_test=_interopRequireDefault(require("../../utils/test")),_theme=_interopRequireDefault(require("../theme"));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)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_extends.apply(this,arguments)}const
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
setupShallow=function(){
|
|
9
|
+
setupShallow=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
10
10
|
(0,_enzyme.shallow)(/*#__PURE__*/
|
|
11
11
|
_react.default.createElement(_index.default,_extends({
|
|
12
12
|
size:a.size,
|
|
@@ -21,12 +21,12 @@ marked:a.marked,
|
|
|
21
21
|
label:a.label},
|
|
22
22
|
a),
|
|
23
23
|
|
|
24
|
-
a.children
|
|
24
|
+
a.children
|
|
25
|
+
)
|
|
26
|
+
))},
|
|
25
27
|
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
setupMount=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
29
|
+
setupMount=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return(
|
|
30
30
|
(0,_enzyme.mount)(/*#__PURE__*/
|
|
31
31
|
_react.default.createElement(_index.default,_extends({
|
|
32
32
|
size:a.size,
|
|
@@ -41,45 +41,45 @@ marked:a.marked,
|
|
|
41
41
|
label:a.label},
|
|
42
42
|
a),
|
|
43
43
|
|
|
44
|
-
a.children
|
|
45
|
-
|
|
44
|
+
a.children
|
|
45
|
+
)
|
|
46
|
+
))};
|
|
46
47
|
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
it("Should not render anything",function(){var
|
|
49
|
+
describe("Text component",()=>{
|
|
50
|
+
it("Should not render anything",()=>{const
|
|
51
51
|
a=setupShallow({}),
|
|
52
52
|
b=(0,_test.default)(a,"span");
|
|
53
|
-
expect(b.length).toBe(0)
|
|
53
|
+
expect(b.length).toBe(0)
|
|
54
54
|
}),
|
|
55
55
|
|
|
56
|
-
it("Should render simple Text with span tag",
|
|
56
|
+
it("Should render simple Text with span tag",()=>{const
|
|
57
57
|
a=setupShallow({
|
|
58
58
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647"
|
|
59
59
|
}),
|
|
60
60
|
b=(0,_test.default)(a,"span");
|
|
61
|
-
expect(b.length).toBe(1)
|
|
61
|
+
expect(b.length).toBe(1)
|
|
62
62
|
}),
|
|
63
63
|
|
|
64
|
-
it("Should render simple Text with strong tag",
|
|
64
|
+
it("Should render simple Text with strong tag",()=>{const
|
|
65
65
|
a=setupShallow({
|
|
66
66
|
children:"\u062A\u06A9\u0633\u062A \u0627\u0633\u062A\u0631\u0627\u0646\u06AF",
|
|
67
67
|
strong:!0
|
|
68
68
|
}),
|
|
69
69
|
b=(0,_test.default)(a,"strong");
|
|
70
|
-
expect(b.length).toBe(1)
|
|
70
|
+
expect(b.length).toBe(1)
|
|
71
71
|
}),
|
|
72
72
|
|
|
73
|
-
it("Should render simple Text with em tag",
|
|
73
|
+
it("Should render simple Text with em tag",()=>{const
|
|
74
74
|
a=setupShallow({
|
|
75
75
|
children:"\u062A\u06A9\u0633\u062A \u06A9\u062C",
|
|
76
76
|
emphasized:!0
|
|
77
77
|
}),
|
|
78
78
|
b=(0,_test.default)(a,"emphasized");
|
|
79
|
-
expect(b.length).toBe(1)
|
|
79
|
+
expect(b.length).toBe(1)
|
|
80
80
|
}),
|
|
81
81
|
|
|
82
|
-
it("Should render simple Text with strong tag",
|
|
82
|
+
it("Should render simple Text with strong tag",()=>{const
|
|
83
83
|
a=setupShallow({
|
|
84
84
|
children:"\u062A\u06A9\u0633\u062A \u0627\u0633\u062A\u0631\u0627\u0646\u06AF",
|
|
85
85
|
strong:!0,
|
|
@@ -88,10 +88,10 @@ subScript:!0,
|
|
|
88
88
|
supScript:!0
|
|
89
89
|
}),
|
|
90
90
|
b=(0,_test.default)(a,"strong");
|
|
91
|
-
expect(b.length).toBe(1)
|
|
91
|
+
expect(b.length).toBe(1)
|
|
92
92
|
}),
|
|
93
93
|
|
|
94
|
-
it("Should render simple Text with strong tag",
|
|
94
|
+
it("Should render simple Text with strong tag",()=>{const
|
|
95
95
|
a=setupShallow({
|
|
96
96
|
children:"\u062A\u06A9\u0633\u062A \u0627\u0633\u062A\u0631\u0627\u0646\u06AF",
|
|
97
97
|
strong:!0,
|
|
@@ -100,28 +100,28 @@ subScript:!0,
|
|
|
100
100
|
supScript:!0
|
|
101
101
|
}),
|
|
102
102
|
b=(0,_test.default)(a,"strong");
|
|
103
|
-
expect(b.length).toBe(1)
|
|
103
|
+
expect(b.length).toBe(1)
|
|
104
104
|
}),
|
|
105
105
|
|
|
106
|
-
it("Should render subScript text",
|
|
106
|
+
it("Should render subScript text",()=>{const
|
|
107
107
|
a=setupShallow({
|
|
108
108
|
children:"\u062A\u06A9\u0633\u062A \u067E\u0627\u06CC\u06CC\u0646\u200C\u0646\u0648\u06CC\u0633",
|
|
109
109
|
subScript:!0
|
|
110
110
|
}),
|
|
111
111
|
b=(0,_test.default)(a,"subScript");
|
|
112
|
-
expect(b.length).toBe(1)
|
|
112
|
+
expect(b.length).toBe(1)
|
|
113
113
|
}),
|
|
114
114
|
|
|
115
|
-
it("Should render supScript text",
|
|
115
|
+
it("Should render supScript text",()=>{const
|
|
116
116
|
a=setupShallow({
|
|
117
117
|
children:"\u062A\u06A9\u0633\u062A \u0628\u0627\u0644\u0627\u200C\u0646\u0648\u06CC\u0633",
|
|
118
118
|
supScript:!0
|
|
119
119
|
}),
|
|
120
120
|
b=(0,_test.default)(a,"supScript");
|
|
121
|
-
expect(b.length).toBe(1)
|
|
121
|
+
expect(b.length).toBe(1)
|
|
122
122
|
}),
|
|
123
123
|
|
|
124
|
-
it("Should render subScript text when both subScript and supScript prop is true",
|
|
124
|
+
it("Should render subScript text when both subScript and supScript prop is true",()=>{const
|
|
125
125
|
a=setupShallow({
|
|
126
126
|
children:"\u062A\u06A9\u0633\u062A \u067E\u0627\u06CC\u06CC\u0646\u200C\u0646\u0648\u06CC\u0633",
|
|
127
127
|
subScript:!0,
|
|
@@ -130,32 +130,32 @@ supScript:!0
|
|
|
130
130
|
b=(0,_test.default)(a,"subScript"),
|
|
131
131
|
c=(0,_test.default)(a,"supScript");
|
|
132
132
|
expect(b.length).toBe(1),
|
|
133
|
-
expect(c.length).toBe(0)
|
|
133
|
+
expect(c.length).toBe(0)
|
|
134
134
|
}),
|
|
135
135
|
|
|
136
|
-
it("Should render a strong text with default color and lineThrough",
|
|
137
|
-
|
|
136
|
+
it("Should render a strong text with default color and lineThrough",()=>{
|
|
137
|
+
const a=setupMount({
|
|
138
138
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
139
139
|
strong:!0,
|
|
140
140
|
lineThrough:!0
|
|
141
141
|
});
|
|
142
142
|
expect(a).toHaveStyleRule("color",_theme.default.defaultColor),
|
|
143
143
|
expect(a).toHaveStyleRule("text-decoration","line-through"),
|
|
144
|
-
a.unmount()
|
|
144
|
+
a.unmount()
|
|
145
145
|
}),
|
|
146
146
|
|
|
147
|
-
it("Should render a strong text with red color and underline",
|
|
148
|
-
|
|
147
|
+
it("Should render a strong text with red color and underline",()=>{
|
|
148
|
+
const a=setupMount({
|
|
149
149
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
150
150
|
strong:!0,
|
|
151
151
|
underline:!0
|
|
152
152
|
});
|
|
153
153
|
expect(a).toHaveStyleRule("text-decoration","underline"),
|
|
154
|
-
a.unmount()
|
|
154
|
+
a.unmount()
|
|
155
155
|
}),
|
|
156
156
|
|
|
157
|
-
it("Should render a strong text as label",
|
|
158
|
-
|
|
157
|
+
it("Should render a strong text as label",()=>{
|
|
158
|
+
const a=setupMount({
|
|
159
159
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
160
160
|
strong:!0,
|
|
161
161
|
label:!0
|
|
@@ -163,102 +163,102 @@ label:!0
|
|
|
163
163
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.gray400),
|
|
164
164
|
expect(a).toHaveStyleRule("padding","2px 8px"),
|
|
165
165
|
expect(a).toHaveStyleRule("border-radius","2px"),
|
|
166
|
-
a.unmount()
|
|
166
|
+
a.unmount()
|
|
167
167
|
}),
|
|
168
168
|
|
|
169
|
-
it("Should render a strong text as marked",
|
|
170
|
-
|
|
169
|
+
it("Should render a strong text as marked",()=>{
|
|
170
|
+
const a=setupMount({
|
|
171
171
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
172
172
|
strong:!0,
|
|
173
173
|
marked:!0
|
|
174
174
|
});
|
|
175
175
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.blue200),
|
|
176
|
-
a.unmount()
|
|
176
|
+
a.unmount()
|
|
177
177
|
}),
|
|
178
178
|
|
|
179
|
-
it("Should render a emphasized text with underline",
|
|
180
|
-
|
|
179
|
+
it("Should render a emphasized text with underline",()=>{
|
|
180
|
+
const a=setupMount({
|
|
181
181
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
182
182
|
emphasized:!0,
|
|
183
183
|
underline:!0
|
|
184
184
|
});
|
|
185
185
|
expect(a).toHaveStyleRule("color",_theme.default.defaultColor),
|
|
186
186
|
expect(a).toHaveStyleRule("text-decoration","underline"),
|
|
187
|
-
a.unmount()
|
|
187
|
+
a.unmount()
|
|
188
188
|
}),
|
|
189
189
|
|
|
190
|
-
it("Should render a emphasized text with lineThrough",
|
|
191
|
-
|
|
190
|
+
it("Should render a emphasized text with lineThrough",()=>{
|
|
191
|
+
const a=setupMount({
|
|
192
192
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
193
193
|
emphasized:!0,
|
|
194
194
|
lineThrough:!0
|
|
195
195
|
});
|
|
196
196
|
expect(a).toHaveStyleRule("color",_theme.default.defaultColor),
|
|
197
197
|
expect(a).toHaveStyleRule("text-decoration","line-through"),
|
|
198
|
-
a.unmount()
|
|
198
|
+
a.unmount()
|
|
199
199
|
}),
|
|
200
200
|
|
|
201
|
-
it("Should render a emphasized text with bold weight",
|
|
202
|
-
|
|
201
|
+
it("Should render a emphasized text with bold weight",()=>{
|
|
202
|
+
const a=setupMount({
|
|
203
203
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647",
|
|
204
204
|
emphasized:!0,
|
|
205
205
|
strong:!0
|
|
206
206
|
});
|
|
207
207
|
expect(a).toHaveStyleRule("color",_theme.default.defaultColor),
|
|
208
208
|
expect(a).toHaveStyleRule("font-style","italic"),
|
|
209
|
-
a.unmount()
|
|
209
|
+
a.unmount()
|
|
210
210
|
}),
|
|
211
211
|
|
|
212
|
-
it("Should render text with default size and color",
|
|
213
|
-
|
|
212
|
+
it("Should render text with default size and color",()=>{
|
|
213
|
+
const a=setupMount({
|
|
214
214
|
children:"\u062A\u06A9\u0633\u062A \u0633\u0627\u062F\u0647"
|
|
215
215
|
});
|
|
216
216
|
expect(a).toHaveStyleRule("font-size","".concat(_theme.default.defaultSize,"px")),
|
|
217
217
|
expect(a).toHaveStyleRule("color",_theme.default.defaultColor),
|
|
218
|
-
a.unmount()
|
|
218
|
+
a.unmount()
|
|
219
219
|
}),
|
|
220
220
|
|
|
221
|
-
it("Should render simple Text with underline",
|
|
222
|
-
|
|
221
|
+
it("Should render simple Text with underline",()=>{
|
|
222
|
+
const a=setupMount({
|
|
223
223
|
children:"\u062A\u06A9\u0633\u062A \u0632\u06CC\u0631 \u062E\u0637 \u062F\u0627\u0631",
|
|
224
224
|
underline:!0
|
|
225
225
|
});
|
|
226
226
|
expect(a).toHaveStyleRule("text-decoration","underline"),
|
|
227
|
-
a.unmount()
|
|
227
|
+
a.unmount()
|
|
228
228
|
}),
|
|
229
229
|
|
|
230
|
-
it("Should render simple Text with line-through",
|
|
231
|
-
|
|
230
|
+
it("Should render simple Text with line-through",()=>{
|
|
231
|
+
const a=setupMount({
|
|
232
232
|
children:"\u062A\u06A9\u0633\u062A \u0631\u0648 \u062E\u0637 \u062F\u0627\u0631",
|
|
233
233
|
lineThrough:!0
|
|
234
234
|
});
|
|
235
235
|
expect(a).toHaveStyleRule("text-decoration","line-through"),
|
|
236
|
-
a.unmount()
|
|
236
|
+
a.unmount()
|
|
237
237
|
}),
|
|
238
238
|
|
|
239
|
-
it("Should render simple Text without any text-decoration style",
|
|
240
|
-
|
|
239
|
+
it("Should render simple Text without any text-decoration style",()=>{
|
|
240
|
+
const a=setupMount({
|
|
241
241
|
children:"\u062A\u06A9\u0633\u062A \u063A\u06CC\u0631 \u0645\u0639\u0642\u0648\u0644",
|
|
242
242
|
lineThrough:!0,
|
|
243
243
|
underline:!0
|
|
244
244
|
});
|
|
245
245
|
expect(a).not.toHaveStyleRule("text-decoration"),
|
|
246
|
-
a.unmount()
|
|
246
|
+
a.unmount()
|
|
247
247
|
}),
|
|
248
248
|
|
|
249
|
-
it("Should render emphasized Text without any text-decoration style",
|
|
250
|
-
|
|
249
|
+
it("Should render emphasized Text without any text-decoration style",()=>{
|
|
250
|
+
const a=setupMount({
|
|
251
251
|
children:"\u062A\u06A9\u0633\u062A \u063A\u06CC\u0631 \u0645\u0639\u0642\u0648\u0644",
|
|
252
252
|
emphasized:!0,
|
|
253
253
|
lineThrough:!0,
|
|
254
254
|
underline:!0
|
|
255
255
|
});
|
|
256
256
|
expect(a).not.toHaveStyleRule("text-decoration"),
|
|
257
|
-
a.unmount()
|
|
257
|
+
a.unmount()
|
|
258
258
|
}),
|
|
259
259
|
|
|
260
|
-
it("Should render emphasized Text as label",
|
|
261
|
-
|
|
260
|
+
it("Should render emphasized Text as label",()=>{
|
|
261
|
+
const a=setupMount({
|
|
262
262
|
children:"\u062A\u06A9\u0633\u062A \u0644\u06CC\u0628\u0644 \u06A9\u062C",
|
|
263
263
|
emphasized:!0,
|
|
264
264
|
label:!0
|
|
@@ -266,41 +266,41 @@ label:!0
|
|
|
266
266
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.gray400),
|
|
267
267
|
expect(a).toHaveStyleRule("border-radius","2px"),
|
|
268
268
|
expect(a).toHaveStyleRule("padding","2px 8px"),
|
|
269
|
-
a.unmount()
|
|
269
|
+
a.unmount()
|
|
270
270
|
}),
|
|
271
271
|
|
|
272
|
-
it("Should render emphasized Text as marked",
|
|
273
|
-
|
|
272
|
+
it("Should render emphasized Text as marked",()=>{
|
|
273
|
+
const a=setupMount({
|
|
274
274
|
children:"\u062A\u06A9\u0633\u062A \u0645\u0627\u0631\u06A9 \u0634\u062F\u0647 \u06A9\u062C",
|
|
275
275
|
emphasized:!0,
|
|
276
276
|
marked:!0
|
|
277
277
|
});
|
|
278
278
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.blue200),
|
|
279
|
-
a.unmount()
|
|
279
|
+
a.unmount()
|
|
280
280
|
}),
|
|
281
281
|
|
|
282
|
-
it("Should render simple marked text",
|
|
283
|
-
|
|
282
|
+
it("Should render simple marked text",()=>{
|
|
283
|
+
const a=setupMount({
|
|
284
284
|
children:"\u0645\u0627\u0631\u06A9",
|
|
285
285
|
marked:!0
|
|
286
286
|
});
|
|
287
287
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.blue200),
|
|
288
|
-
a.unmount()
|
|
288
|
+
a.unmount()
|
|
289
289
|
}),
|
|
290
290
|
|
|
291
|
-
it("Should render simple label text",
|
|
292
|
-
|
|
291
|
+
it("Should render simple label text",()=>{
|
|
292
|
+
const a=setupMount({
|
|
293
293
|
children:"\u0644\u06CC\u0628\u06CC\u0644",
|
|
294
294
|
label:!0
|
|
295
295
|
});
|
|
296
296
|
expect(a).toHaveStyleRule("background-color",_theme.default.colors.gray400),
|
|
297
297
|
expect(a).toHaveStyleRule("border-radius","2px"),
|
|
298
298
|
expect(a).toHaveStyleRule("padding","2px 8px"),
|
|
299
|
-
a.unmount()
|
|
299
|
+
a.unmount()
|
|
300
300
|
}),
|
|
301
301
|
|
|
302
|
-
it("Should render simple text when label and marked props are both true",
|
|
303
|
-
|
|
302
|
+
it("Should render simple text when label and marked props are both true",()=>{
|
|
303
|
+
const a=setupMount({
|
|
304
304
|
children:"\u0644\u06CC\u0628\u06CC\u0644",
|
|
305
305
|
label:!0,
|
|
306
306
|
marked:!0
|
|
@@ -308,26 +308,26 @@ marked:!0
|
|
|
308
308
|
expect(a).not.toHaveStyleRule("background-color"),
|
|
309
309
|
expect(a).not.toHaveStyleRule("border-radius"),
|
|
310
310
|
expect(a).not.toHaveStyleRule("padding"),
|
|
311
|
-
a.unmount()
|
|
311
|
+
a.unmount()
|
|
312
312
|
}),
|
|
313
313
|
|
|
314
|
-
it("Should render blue supScript text",
|
|
315
|
-
|
|
314
|
+
it("Should render blue supScript text",()=>{
|
|
315
|
+
const a=setupMount({
|
|
316
316
|
children:"\u062A\u06A9\u0633\u062A \u0628\u0627\u0644\u0627\u200C\u0646\u0648\u06CC\u0633",
|
|
317
317
|
supScript:!0,
|
|
318
318
|
color:"blue"
|
|
319
319
|
});
|
|
320
320
|
expect(a).toHaveStyleRule("color",_theme.default.colors.blue600),
|
|
321
|
-
a.unmount()
|
|
321
|
+
a.unmount()
|
|
322
322
|
}),
|
|
323
323
|
|
|
324
|
-
it("Should render blue subScript text",
|
|
325
|
-
|
|
324
|
+
it("Should render blue subScript text",()=>{
|
|
325
|
+
const a=setupMount({
|
|
326
326
|
children:"\u062A\u06A9\u0633\u062A \u067E\u0627\u06CC\u06CC\u0646 \u0646\u0648\u06CC\u0633",
|
|
327
327
|
subScript:!0,
|
|
328
328
|
color:"blue"
|
|
329
329
|
});
|
|
330
330
|
expect(a).toHaveStyleRule("color",_theme.default.colors.blue600),
|
|
331
|
-
a.unmount()
|
|
332
|
-
})
|
|
331
|
+
a.unmount()
|
|
332
|
+
})
|
|
333
333
|
});
|
package/typography/theme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var _themes=_interopRequireDefault(require("../themes"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
1
|
+
"use strict";var _themes=_interopRequireDefault(require("../themes"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
2
2
|
|
|
3
|
-
typographyTheme={
|
|
3
|
+
const typographyTheme={
|
|
4
4
|
defaultSize:13,
|
|
5
5
|
defaultColor:_themes.default.colors.riverBedDark,
|
|
6
6
|
h1SizeLarge:30,
|
|
@@ -61,6 +61,6 @@ lineHeightRatio:1.75,
|
|
|
61
61
|
headingLineHeightRatio:1.68,
|
|
62
62
|
sizes:_themes.default.sizes,
|
|
63
63
|
colors:_themes.default.colors
|
|
64
|
-
}
|
|
64
|
+
};var _default=exports.default=
|
|
65
65
|
|
|
66
|
-
typographyTheme;
|
|
66
|
+
typographyTheme;
|
package/typography/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSizeOfHeading=exports.getMarginOfHeading=void 0;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSizeOfHeading=exports.getMarginOfHeading=void 0;const getSizeOfHeading=(a,b,c)=>{
|
|
2
2
|
switch(b){
|
|
3
3
|
case a.sizes.small:return(
|
|
4
4
|
1===c?a.h1SizeSmall:
|
|
@@ -21,11 +21,11 @@ default:return(
|
|
|
21
21
|
3===c?a.h3SizeLarge:
|
|
22
22
|
4===c?a.h4SizeLarge:
|
|
23
23
|
5===c?a.h5SizeLarge:
|
|
24
|
-
a.h6SizeLarge)
|
|
25
|
-
|
|
24
|
+
a.h6SizeLarge)
|
|
25
|
+
}
|
|
26
26
|
};exports.getSizeOfHeading=getSizeOfHeading;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const getMarginOfHeading=(a,b,c)=>{
|
|
29
29
|
switch(b){
|
|
30
30
|
case a.sizes.small:return(
|
|
31
31
|
1===c?"".concat(a.h1SizeSmallMarginTop,"px 0 ").concat(a.h1SizeSmallMarginBottom,"px"):
|
|
@@ -48,6 +48,6 @@ default:return(
|
|
|
48
48
|
3===c?"".concat(a.h3SizeLargeMarginTop,"px 0 ").concat(a.h3SizeLargeMarginBottom,"px"):
|
|
49
49
|
4===c?"".concat(a.h4SizeLargeMarginTop,"px 0 ").concat(a.h4SizeLargeMarginBottom,"px"):
|
|
50
50
|
5===c?"".concat(a.h5SizeLargeMarginTop,"px 0 ").concat(a.h5SizeLargeMarginBottom,"px"):"".concat(
|
|
51
|
-
a.h6SizeLargeMarginTop,"px 0 ").concat(a.h6SizeLargeMarginBottom,"px"))
|
|
52
|
-
|
|
51
|
+
a.h6SizeLargeMarginTop,"px 0 ").concat(a.h6SizeLargeMarginBottom,"px"))
|
|
52
|
+
}
|
|
53
53
|
};exports.getMarginOfHeading=getMarginOfHeading;
|
package/utils/date.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
_momentJalaali.default.loadPersian({dialect:"persian-modern"});
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const isDateObject=(a)=>"function"==typeof a.getMonth;exports.isDateObject=isDateObject;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const convertToJalaali=(a,b)=>(0,_momentJalaali.default)(a).format(b);exports.convertToJalaali=convertToJalaali;
|
package/utils/detectMobile.js
CHANGED
|
@@ -6,10 +6,10 @@ navigator.userAgent.match(/iPhone/i)||
|
|
|
6
6
|
navigator.userAgent.match(/iPad/i)||
|
|
7
7
|
navigator.userAgent.match(/iPod/i)||
|
|
8
8
|
navigator.userAgent.match(/BlackBerry/i)||
|
|
9
|
-
navigator.userAgent.match(/Windows Phone/i))
|
|
9
|
+
navigator.userAgent.match(/Windows Phone/i))
|
|
10
10
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function isAndroid(){
|
|
14
|
-
return!!navigator.userAgent.match(/Android/i)
|
|
14
|
+
return!!navigator.userAgent.match(/Android/i)
|
|
15
15
|
}
|
package/utils/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var _mediaQuery=_interopRequireDefault(require("./media-query"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,Object.defineProperty(exports,"mediaQuery",{enumerable:!0,get:function
|
|
1
|
+
"use strict";var _mediaQuery=_interopRequireDefault(require("./media-query"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,Object.defineProperty(exports,"mediaQuery",{enumerable:!0,get:function(){return _mediaQuery.default}});function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var _default=exports.default=
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
{
|
|
6
6
|
mediaQuery:_mediaQuery.default
|
|
7
|
-
};
|
|
7
|
+
};
|
package/utils/media-query.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledMediaQuery=require("styled-media-query"),_themes=_interopRequireDefault(require("../themes"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _styledMediaQuery=require("styled-media-query"),_themes=_interopRequireDefault(require("../themes"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
mediaQuery=(0,_styledMediaQuery.generateMedia)({
|
|
4
|
+
const mediaQuery=(0,_styledMediaQuery.generateMedia)({
|
|
5
5
|
xl:"".concat(_themes.default.breakpoints.xl,"px"),
|
|
6
6
|
lg:"".concat(_themes.default.breakpoints.lg,"px"),
|
|
7
7
|
md:"".concat(_themes.default.breakpoints.md,"px"),
|
|
8
8
|
sm:"".concat(_themes.default.breakpoints.sm,"px"),
|
|
9
9
|
xs:"".concat(_themes.default.breakpoints.xs,"px")
|
|
10
|
-
})
|
|
10
|
+
});var _default=exports.default=
|
|
11
11
|
|
|
12
|
-
mediaQuery;
|
|
12
|
+
mediaQuery;
|
package/utils/numbers.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.toPersianNumber=exports.englishNumberToPersianInString=void 0;
|
|
2
2
|
|
|
3
3
|
// doc of Intl: https://mzl.la/2TJQm88
|
|
4
|
-
|
|
4
|
+
const toPersianNumber=function(a){let b=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};return(
|
|
5
5
|
new Intl.NumberFormat("fa-IR",b).format(a))};exports.toPersianNumber=toPersianNumber;
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return a.replace(/[0-9]/g,
|
|
8
|
+
const englishNumberToPersianInString=(a)=>{
|
|
9
|
+
const b=["\u06F0","\u06F1","\u06F2","\u06F3","\u06F4","\u06F5","\u06F6","\u06F7","\u06F8","\u06F9"];
|
|
10
|
+
return a.replace(/[0-9]/g,(a)=>b[+a])
|
|
11
11
|
};exports.englishNumberToPersianInString=englishNumberToPersianInString;
|
package/utils/test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;
|
|
2
|
-
|
|
3
|
-
return c
|
|
4
|
-
}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const findByTestAtrr=(a,b)=>{
|
|
2
|
+
const c=a.find("[data-test='".concat(b,"']"));
|
|
3
|
+
return c
|
|
4
|
+
};var _default=exports.default=
|
|
5
5
|
|
|
6
|
-
findByTestAtrr;
|
|
6
|
+
findByTestAtrr;
|
package/utils/theme.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";var _themes=_interopRequireDefault(require("../themes"));Object.defineProperty(exports,"__esModule",{value:!0}),exports.getHoverColorFromName=exports.getFocusColorFromName=exports.getColorFromName=void 0;function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const getColorFromName=function(){let a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:_themes.default,b=1<arguments.length?arguments[1]:void 0;
|
|
4
4
|
switch(b){
|
|
5
5
|
case"red":
|
|
6
6
|
return a.colors.red600;
|
|
@@ -22,11 +22,11 @@ case"black":
|
|
|
22
22
|
return a.colors.black;
|
|
23
23
|
default:
|
|
24
24
|
case"default":
|
|
25
|
-
return a.defaultColor
|
|
26
|
-
|
|
25
|
+
return a.defaultColor
|
|
26
|
+
}
|
|
27
27
|
};exports.getColorFromName=getColorFromName;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const getHoverColorFromName=(a,b)=>{
|
|
30
30
|
switch(b){
|
|
31
31
|
case"red":
|
|
32
32
|
return a.colors.red400;
|
|
@@ -42,11 +42,11 @@ case"black":
|
|
|
42
42
|
return a.colors.gray600;
|
|
43
43
|
default:
|
|
44
44
|
case"default":
|
|
45
|
-
return a.defaultColor
|
|
46
|
-
|
|
45
|
+
return a.defaultColor
|
|
46
|
+
}
|
|
47
47
|
};exports.getHoverColorFromName=getHoverColorFromName;
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
const getFocusColorFromName=(a,b)=>{
|
|
50
50
|
switch(b){
|
|
51
51
|
case"red":
|
|
52
52
|
return a.colors.red800;
|
|
@@ -62,6 +62,6 @@ case"gray":
|
|
|
62
62
|
return a.colors.gray800;
|
|
63
63
|
default:
|
|
64
64
|
case"default":
|
|
65
|
-
return a.defaultColor
|
|
66
|
-
|
|
65
|
+
return a.defaultColor
|
|
66
|
+
}
|
|
67
67
|
};exports.getFocusColorFromName=getFocusColorFromName;
|