@prom-ui/core 0.0.7 → 0.0.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 (48) hide show
  1. package/Body/package.json +1 -1
  2. package/Box/package.json +1 -1
  3. package/Button/package.json +1 -1
  4. package/Checkbox/index.d.ts +8 -0
  5. package/Checkbox/index.js +99 -0
  6. package/Checkbox/package.json +10 -0
  7. package/Checkbox/style.css +133 -0
  8. package/Flex/package.json +1 -1
  9. package/Grid/package.json +1 -1
  10. package/Icon/index.d.ts +12 -0
  11. package/Icon/index.js +79 -0
  12. package/Icon/package.json +9 -0
  13. package/Icon/style.css +46 -0
  14. package/Image/package.json +1 -1
  15. package/ImageEmoji/index.d.ts +9 -0
  16. package/ImageEmoji/index.js +89 -0
  17. package/ImageEmoji/package.json +9 -0
  18. package/Input/index.d.ts +23 -0
  19. package/Input/index.js +84 -0
  20. package/Input/package.json +9 -0
  21. package/Input/style.css +345 -0
  22. package/Line/package.json +1 -1
  23. package/Link/package.json +1 -1
  24. package/List/package.json +1 -1
  25. package/Picture/package.json +1 -1
  26. package/Rating/index.d.ts +9 -0
  27. package/Rating/index.js +101 -0
  28. package/Rating/package.json +9 -0
  29. package/Rating/style.css +26 -0
  30. package/Scroll/index.d.ts +16 -0
  31. package/Scroll/index.js +79 -0
  32. package/Scroll/package.json +9 -0
  33. package/Scroll/style.css +169 -0
  34. package/Skeleton/index.d.ts +12 -0
  35. package/Skeleton/index.js +113 -0
  36. package/Skeleton/package.json +9 -0
  37. package/Skeleton/style.css +145 -0
  38. package/Spinner/index.d.ts +2 -1
  39. package/Spinner/package.json +1 -1
  40. package/Text/package.json +1 -1
  41. package/TextEmoji/index.d.ts +7 -0
  42. package/TextEmoji/index.js +87 -0
  43. package/TextEmoji/package.json +9 -0
  44. package/Tumbler/index.d.ts +8 -0
  45. package/Tumbler/index.js +98 -0
  46. package/Tumbler/package.json +10 -0
  47. package/Tumbler/style.css +118 -0
  48. package/package.json +7 -3
package/Input/index.js ADDED
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ require("./style.css");
4
+
5
+ Object.defineProperty(exports, '__esModule', { value: true });
6
+
7
+ var react = require('react');
8
+ var PropTypes = require('prop-types');
9
+ var evokit = require('evokit');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
14
+
15
+ /******************************************************************************
16
+ Copyright (c) Microsoft Corporation.
17
+
18
+ Permission to use, copy, modify, and/or distribute this software for any
19
+ purpose with or without fee is hereby granted.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
22
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
23
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
24
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
25
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
+ PERFORMANCE OF THIS SOFTWARE.
28
+ ***************************************************************************** */
29
+ /* global Reflect, Promise */
30
+
31
+ var extendStatics = function(d, b) {
32
+ extendStatics = Object.setPrototypeOf ||
33
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35
+ return extendStatics(d, b);
36
+ };
37
+
38
+ function __extends(d, b) {
39
+ if (typeof b !== "function" && b !== null)
40
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
41
+ extendStatics(d, b);
42
+ function __() { this.constructor = d; }
43
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44
+ }
45
+
46
+ var css = {"ek-input":"Input__ek-input___BVdm9","ek-input_height_1-1":"Input__ek-input_height_1-1___v3cfq","ek-input_padding_none":"Input__ek-input_padding_none___cLVVr","ek-input_padding_xxs":"Input__ek-input_padding_xxs___6NYRT","ek-input_padding_xs":"Input__ek-input_padding_xs___BTJBO","ek-input_padding_s":"Input__ek-input_padding_s___upLL2","ek-input_padding_m":"Input__ek-input_padding_m___vsMY9","ek-input_padding_l":"Input__ek-input_padding_l___wQCgx","ek-input_padding_xl":"Input__ek-input_padding_xl___AJAuz","ek-input_padding_xxl":"Input__ek-input_padding_xxl___jMer7","ek-input_padding_3xl":"Input__ek-input_padding_3xl___xnyDN","ek-input_padding_4xl":"Input__ek-input_padding_4xl___ZuVBW","ek-input_padding_5xl":"Input__ek-input_padding_5xl___LVtRV","ek-input_padding-top_none":"Input__ek-input_padding-top_none___YfJll","ek-input_padding-top_xxs":"Input__ek-input_padding-top_xxs___RY52v","ek-input_padding-top_xs":"Input__ek-input_padding-top_xs___C0Yyk","ek-input_padding-top_s":"Input__ek-input_padding-top_s___xMLQM","ek-input_padding-top_m":"Input__ek-input_padding-top_m___Mvb5i","ek-input_padding-top_l":"Input__ek-input_padding-top_l___aOsRO","ek-input_padding-top_xl":"Input__ek-input_padding-top_xl___-WuHE","ek-input_padding-top_xxl":"Input__ek-input_padding-top_xxl___g6K58","ek-input_padding-top_3xl":"Input__ek-input_padding-top_3xl___Ut2xl","ek-input_padding-top_4xl":"Input__ek-input_padding-top_4xl___q2b3t","ek-input_padding-top_5xl":"Input__ek-input_padding-top_5xl___k-pTi","ek-input_padding-right_none":"Input__ek-input_padding-right_none___pCEjG","ek-input_padding-right_xxs":"Input__ek-input_padding-right_xxs___qpSUX","ek-input_padding-right_xs":"Input__ek-input_padding-right_xs___abrXh","ek-input_padding-right_s":"Input__ek-input_padding-right_s___0Hc3v","ek-input_padding-right_m":"Input__ek-input_padding-right_m___ZnAQW","ek-input_padding-right_l":"Input__ek-input_padding-right_l___u4Z0C","ek-input_padding-right_xl":"Input__ek-input_padding-right_xl___7BjOd","ek-input_padding-right_xxl":"Input__ek-input_padding-right_xxl___AdLqz","ek-input_padding-right_3xl":"Input__ek-input_padding-right_3xl___VE9fm","ek-input_padding-right_4xl":"Input__ek-input_padding-right_4xl___Xlz4B","ek-input_padding-right_5xl":"Input__ek-input_padding-right_5xl___nxZA7","ek-input_padding-bottom_none":"Input__ek-input_padding-bottom_none___H9p7y","ek-input_padding-bottom_xxs":"Input__ek-input_padding-bottom_xxs___vAXFm","ek-input_padding-bottom_xs":"Input__ek-input_padding-bottom_xs___EwoYv","ek-input_padding-bottom_s":"Input__ek-input_padding-bottom_s___gucZa","ek-input_padding-bottom_m":"Input__ek-input_padding-bottom_m___5D-aS","ek-input_padding-bottom_l":"Input__ek-input_padding-bottom_l___D39SL","ek-input_padding-bottom_xl":"Input__ek-input_padding-bottom_xl___Gg7YQ","ek-input_padding-bottom_xxl":"Input__ek-input_padding-bottom_xxl___5etFj","ek-input_padding-bottom_3xl":"Input__ek-input_padding-bottom_3xl___ipn18","ek-input_padding-bottom_4xl":"Input__ek-input_padding-bottom_4xl___eEkV6","ek-input_padding-bottom_5xl":"Input__ek-input_padding-bottom_5xl___YBUWx","ek-input_padding-left_none":"Input__ek-input_padding-left_none___oDOdw","ek-input_padding-left_xxs":"Input__ek-input_padding-left_xxs___zTyU-","ek-input_padding-left_xs":"Input__ek-input_padding-left_xs___aA8-s","ek-input_padding-left_s":"Input__ek-input_padding-left_s___baJYr","ek-input_padding-left_m":"Input__ek-input_padding-left_m___IYGn-","ek-input_padding-left_l":"Input__ek-input_padding-left_l___XhCfF","ek-input_padding-left_xl":"Input__ek-input_padding-left_xl___SHCXp","ek-input_padding-left_xxl":"Input__ek-input_padding-left_xxl___UNpYZ","ek-input_padding-left_3xl":"Input__ek-input_padding-left_3xl___LRol3","ek-input_padding-left_4xl":"Input__ek-input_padding-left_4xl___Qo4u3","ek-input_padding-left_5xl":"Input__ek-input_padding-left_5xl___nGBb7","ek-input_theme_white":"Input__ek-input_theme_white___TLCTw","ek-input_theme_red":"Input__ek-input_theme_red___4b9Hr","ek-input_width_1-1":"Input__ek-input_width_1-1___u-h7H","ek-input_width_auto":"Input__ek-input_width_auto___wVUlX"};
47
+
48
+ var _a, _b;
49
+ var Input = evokit.createBlock('input', 'input', ['height', ['padding', [['padding-top', 'padding-bottom'], ['padding-right', 'padding-left'], 'padding-bottom', 'padding-left']], 'theme', 'width'], {
50
+ css: css
51
+ });
52
+ Input.defaultProps = {
53
+ type: 'text'
54
+ }; // Only for StyleGuide
55
+
56
+ var StyleGuide =
57
+ /** @class */
58
+ function (_super) {
59
+ __extends(StyleGuide, _super);
60
+
61
+ function StyleGuide() {
62
+ return _super !== null && _super.apply(this, arguments) || this;
63
+ }
64
+
65
+ StyleGuide.prototype.render = function () {
66
+ return null;
67
+ };
68
+
69
+ StyleGuide.displayName = 'Input';
70
+ StyleGuide.defaultProps = (_a = {}, _a['input-width'] = '1-1', _a);
71
+ StyleGuide.propTypes = (_b = {}, _b['input-width'] = PropTypes__default["default"].oneOf(['auto', '1-1']), _b['input-height'] = PropTypes__default["default"].oneOf(['1-1']), _b['input-theme'] = PropTypes__default["default"].oneOf(['white', 'red']),
72
+ /** Поддерживает дополнительные props:
73
+ *
74
+ * - `input-padding-top`
75
+ * - `input-padding-right`
76
+ * - `input-padding-bottom`
77
+ * - `input-padding-left`
78
+ */
79
+ _b['input-padding'] = PropTypes__default["default"].oneOf(['none', 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', '3xl', '4xl', '5xl']), _b);
80
+ return StyleGuide;
81
+ }(react.Component);
82
+
83
+ exports.Input = Input;
84
+ exports.StyleGuide = StyleGuide;
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@prom-ui/core/Input",
3
+ "version": "0.0.10",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "dependencies": {
7
+ "evokit": "3.2.3"
8
+ }
9
+ }
@@ -0,0 +1,345 @@
1
+ .Input__ek-input___BVdm9 {
2
+ display: block;
3
+ border-radius: var(--pds-round-m);
4
+ -webkit-appearance: none;
5
+ -moz-appearance: none;
6
+ appearance: none;
7
+ font: inherit;
8
+ line-height: calc(var(--pds-line-height) + 2px);
9
+ padding: var(--pds-spacing-xs) var(--pds-spacing-m);
10
+ box-sizing: border-box;
11
+ min-width: 0;
12
+ width: 100%;
13
+ transition: 100ms ease-in-out;
14
+ transition-property: color, background-color, border-color;
15
+ background: none;
16
+ box-shadow: none;
17
+ border: 1px transparent solid;
18
+ color: inherit;
19
+ font-size: 1rem
20
+ }
21
+
22
+ .Input__ek-input___BVdm9:focus {
23
+ outline: none;
24
+ }
25
+
26
+ .Input__ek-input_height_1-1___v3cfq {
27
+ height: 100%;
28
+ }
29
+
30
+ .Input__ek-input_padding_none___cLVVr {
31
+ padding: 0;
32
+ }
33
+
34
+ .Input__ek-input_padding_xxs___6NYRT {
35
+ padding: var(--pds-spacing-xxs);
36
+ }
37
+
38
+ .Input__ek-input_padding_xs___BTJBO {
39
+ padding: var(--pds-spacing-xs);
40
+ }
41
+
42
+ .Input__ek-input_padding_s___upLL2 {
43
+ padding: var(--pds-spacing-s);
44
+ }
45
+
46
+ .Input__ek-input_padding_m___vsMY9 {
47
+ padding: var(--pds-spacing-m);
48
+ }
49
+
50
+ .Input__ek-input_padding_l___wQCgx {
51
+ padding: var(--pds-spacing-l);
52
+ }
53
+
54
+ .Input__ek-input_padding_xl___AJAuz {
55
+ padding: var(--pds-spacing-xl);
56
+ }
57
+
58
+ .Input__ek-input_padding_xxl___jMer7 {
59
+ padding: var(--pds-spacing-xxl);
60
+ }
61
+
62
+ .Input__ek-input_padding_3xl___xnyDN {
63
+ padding: var(--pds-spacing-3xl);
64
+ }
65
+
66
+ .Input__ek-input_padding_4xl___ZuVBW {
67
+ padding: var(--pds-spacing-4xl);
68
+ }
69
+
70
+ .Input__ek-input_padding_5xl___LVtRV {
71
+ padding: var(--pds-spacing-5xl);
72
+ }
73
+
74
+ .Input__ek-input_padding-top_none___YfJll {
75
+ padding-top: 0;
76
+ }
77
+
78
+ .Input__ek-input_padding-top_xxs___RY52v {
79
+ padding-top: var(--pds-spacing-xxs);
80
+ }
81
+
82
+ .Input__ek-input_padding-top_xs___C0Yyk {
83
+ padding-top: var(--pds-spacing-xs);
84
+ }
85
+
86
+ .Input__ek-input_padding-top_s___xMLQM {
87
+ padding-top: var(--pds-spacing-s);
88
+ }
89
+
90
+ .Input__ek-input_padding-top_m___Mvb5i {
91
+ padding-top: var(--pds-spacing-m);
92
+ }
93
+
94
+ .Input__ek-input_padding-top_l___aOsRO {
95
+ padding-top: var(--pds-spacing-l);
96
+ }
97
+
98
+ .Input__ek-input_padding-top_xl___-WuHE {
99
+ padding-top: var(--pds-spacing-xl);
100
+ }
101
+
102
+ .Input__ek-input_padding-top_xxl___g6K58 {
103
+ padding-top: var(--pds-spacing-xxl);
104
+ }
105
+
106
+ .Input__ek-input_padding-top_3xl___Ut2xl {
107
+ padding-top: var(--pds-spacing-3xl);
108
+ }
109
+
110
+ .Input__ek-input_padding-top_4xl___q2b3t {
111
+ padding-top: var(--pds-spacing-4xl);
112
+ }
113
+
114
+ .Input__ek-input_padding-top_5xl___k-pTi {
115
+ padding-top: var(--pds-spacing-5xl);
116
+ }
117
+
118
+ .Input__ek-input_padding-right_none___pCEjG {
119
+ padding-right: 0;
120
+ }
121
+
122
+ .Input__ek-input_padding-right_xxs___qpSUX {
123
+ padding-right: var(--pds-spacing-xxs);
124
+ }
125
+
126
+ .Input__ek-input_padding-right_xs___abrXh {
127
+ padding-right: var(--pds-spacing-xs);
128
+ }
129
+
130
+ .Input__ek-input_padding-right_s___0Hc3v {
131
+ padding-right: var(--pds-spacing-s);
132
+ }
133
+
134
+ .Input__ek-input_padding-right_m___ZnAQW {
135
+ padding-right: var(--pds-spacing-m);
136
+ }
137
+
138
+ .Input__ek-input_padding-right_l___u4Z0C {
139
+ padding-right: var(--pds-spacing-l);
140
+ }
141
+
142
+ .Input__ek-input_padding-right_xl___7BjOd {
143
+ padding-right: var(--pds-spacing-xl);
144
+ }
145
+
146
+ .Input__ek-input_padding-right_xxl___AdLqz {
147
+ padding-right: var(--pds-spacing-xxl);
148
+ }
149
+
150
+ .Input__ek-input_padding-right_3xl___VE9fm {
151
+ padding-right: var(--pds-spacing-3xl);
152
+ }
153
+
154
+ .Input__ek-input_padding-right_4xl___Xlz4B {
155
+ padding-right: var(--pds-spacing-4xl);
156
+ }
157
+
158
+ .Input__ek-input_padding-right_5xl___nxZA7 {
159
+ padding-right: var(--pds-spacing-5xl);
160
+ }
161
+
162
+ .Input__ek-input_padding-bottom_none___H9p7y {
163
+ padding-bottom: 0;
164
+ }
165
+
166
+ .Input__ek-input_padding-bottom_xxs___vAXFm {
167
+ padding-bottom: var(--pds-spacing-xxs);
168
+ }
169
+
170
+ .Input__ek-input_padding-bottom_xs___EwoYv {
171
+ padding-bottom: var(--pds-spacing-xs);
172
+ }
173
+
174
+ .Input__ek-input_padding-bottom_s___gucZa {
175
+ padding-bottom: var(--pds-spacing-s);
176
+ }
177
+
178
+ .Input__ek-input_padding-bottom_m___5D-aS {
179
+ padding-bottom: var(--pds-spacing-m);
180
+ }
181
+
182
+ .Input__ek-input_padding-bottom_l___D39SL {
183
+ padding-bottom: var(--pds-spacing-l);
184
+ }
185
+
186
+ .Input__ek-input_padding-bottom_xl___Gg7YQ {
187
+ padding-bottom: var(--pds-spacing-xl);
188
+ }
189
+
190
+ .Input__ek-input_padding-bottom_xxl___5etFj {
191
+ padding-bottom: var(--pds-spacing-xxl);
192
+ }
193
+
194
+ .Input__ek-input_padding-bottom_3xl___ipn18 {
195
+ padding-bottom: var(--pds-spacing-3xl);
196
+ }
197
+
198
+ .Input__ek-input_padding-bottom_4xl___eEkV6 {
199
+ padding-bottom: var(--pds-spacing-4xl);
200
+ }
201
+
202
+ .Input__ek-input_padding-bottom_5xl___YBUWx {
203
+ padding-bottom: var(--pds-spacing-5xl);
204
+ }
205
+
206
+ .Input__ek-input_padding-left_none___oDOdw {
207
+ padding-left: 0;
208
+ }
209
+
210
+ .Input__ek-input_padding-left_xxs___zTyU- {
211
+ padding-left: var(--pds-spacing-xxs);
212
+ }
213
+
214
+ .Input__ek-input_padding-left_xs___aA8-s {
215
+ padding-left: var(--pds-spacing-xs);
216
+ }
217
+
218
+ .Input__ek-input_padding-left_s___baJYr {
219
+ padding-left: var(--pds-spacing-s);
220
+ }
221
+
222
+ .Input__ek-input_padding-left_m___IYGn- {
223
+ padding-left: var(--pds-spacing-m);
224
+ }
225
+
226
+ .Input__ek-input_padding-left_l___XhCfF {
227
+ padding-left: var(--pds-spacing-l);
228
+ }
229
+
230
+ .Input__ek-input_padding-left_xl___SHCXp {
231
+ padding-left: var(--pds-spacing-xl);
232
+ }
233
+
234
+ .Input__ek-input_padding-left_xxl___UNpYZ {
235
+ padding-left: var(--pds-spacing-xxl);
236
+ }
237
+
238
+ .Input__ek-input_padding-left_3xl___LRol3 {
239
+ padding-left: var(--pds-spacing-3xl);
240
+ }
241
+
242
+ .Input__ek-input_padding-left_4xl___Qo4u3 {
243
+ padding-left: var(--pds-spacing-4xl);
244
+ }
245
+
246
+ .Input__ek-input_padding-left_5xl___nGBb7 {
247
+ padding-left: var(--pds-spacing-5xl);
248
+ }
249
+
250
+ .Input__ek-input_theme_white___TLCTw {
251
+ background: var(--white);
252
+ border: 1px var(--black-500) solid;
253
+ color: var(--black-900);
254
+ -webkit-tap-highlight-color: transparent
255
+ }
256
+
257
+ .Input__ek-input_theme_white___TLCTw::-moz-placeholder {
258
+ color: var(--black-700);
259
+ }
260
+
261
+ .Input__ek-input_theme_white___TLCTw:-ms-input-placeholder {
262
+ color: var(--black-700);
263
+ }
264
+
265
+ .Input__ek-input_theme_white___TLCTw::placeholder {
266
+ color: var(--black-700);
267
+ }
268
+
269
+ .Input__ek-input_theme_white___TLCTw:focus {
270
+ border-color: var(--yellow-700);
271
+ }
272
+
273
+ .Input__ek-input_theme_white___TLCTw:disabled {
274
+ background-color: var(--black-100);
275
+ border-color: var(--black-400);
276
+ color: var(--black-700)
277
+ }
278
+
279
+ .Input__ek-input_theme_white___TLCTw:disabled::-moz-placeholder {
280
+ color: var(--black-700);
281
+ }
282
+
283
+ .Input__ek-input_theme_white___TLCTw:disabled:-ms-input-placeholder {
284
+ color: var(--black-700);
285
+ }
286
+
287
+ .Input__ek-input_theme_white___TLCTw:disabled::placeholder {
288
+ color: var(--black-700);
289
+ }
290
+
291
+ .Input__ek-input_theme_red___4b9Hr {
292
+ background: var(--red-50);
293
+ border: 1px var(--red-400) solid;
294
+ color: var(--black-900);
295
+ -webkit-tap-highlight-color: transparent
296
+ }
297
+
298
+ .Input__ek-input_theme_red___4b9Hr::-moz-placeholder {
299
+ color: var(--black-700);
300
+ }
301
+
302
+ .Input__ek-input_theme_red___4b9Hr:-ms-input-placeholder {
303
+ color: var(--black-700);
304
+ }
305
+
306
+ .Input__ek-input_theme_red___4b9Hr::placeholder {
307
+ color: var(--black-700);
308
+ }
309
+
310
+ .Input__ek-input_theme_red___4b9Hr:focus {
311
+ border-color: var(--red-900);
312
+ }
313
+
314
+ .Input__ek-input_theme_red___4b9Hr:disabled {
315
+ background-color: var(--black-100);
316
+ border-color: var(--black-400);
317
+ color: var(--black-700)
318
+ }
319
+
320
+ .Input__ek-input_theme_red___4b9Hr:disabled::-moz-placeholder {
321
+ color: var(--black-700);
322
+ }
323
+
324
+ .Input__ek-input_theme_red___4b9Hr:disabled:-ms-input-placeholder {
325
+ color: var(--black-700);
326
+ }
327
+
328
+ .Input__ek-input_theme_red___4b9Hr:disabled::placeholder {
329
+ color: var(--black-700);
330
+ }
331
+
332
+ .Input__ek-input_width_1-1___u-h7H {
333
+ width: 100%;
334
+ }
335
+
336
+ .Input__ek-input_width_auto___wVUlX {
337
+ width: auto;
338
+ }
339
+
340
+ @media (--pds-media-large) {
341
+
342
+ .Input__ek-input___BVdm9 {
343
+ font-size: inherit
344
+ }
345
+ }
package/Line/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Line",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
package/Link/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Link",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
package/List/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/List",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prom-ui/core/Picture",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "dependencies": {
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type Props = {
3
+ value?: 0 | 1 | 2 | 3 | 4 | 5;
4
+ percent?: number;
5
+ size?: 'small' | 'default' | 'big';
6
+ };
7
+ declare type RatingProps = React.HTMLAttributes<HTMLElement & SVGElement> & Props;
8
+ export declare const Rating: React.FC<RatingProps>;
9
+ export {};
@@ -0,0 +1,101 @@
1
+ 'use strict';
2
+
3
+ require("./style.css");
4
+
5
+ Object.defineProperty(exports, '__esModule', { value: true });
6
+
7
+ var React = require('react');
8
+ var PropTypes = require('prop-types');
9
+ var evokit = require('evokit');
10
+
11
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
+
13
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
15
+
16
+ /******************************************************************************
17
+ Copyright (c) Microsoft Corporation.
18
+
19
+ Permission to use, copy, modify, and/or distribute this software for any
20
+ purpose with or without fee is hereby granted.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
23
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
25
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
26
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
+ PERFORMANCE OF THIS SOFTWARE.
29
+ ***************************************************************************** */
30
+
31
+ var __assign = function() {
32
+ __assign = Object.assign || function __assign(t) {
33
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
34
+ s = arguments[i];
35
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+
42
+ function __rest(s, e) {
43
+ var t = {};
44
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
45
+ t[p] = s[p];
46
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
47
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
48
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
49
+ t[p[i]] = s[p[i]];
50
+ }
51
+ return t;
52
+ }
53
+
54
+ var css = {"ek-rating":"Rating__ek-rating___fJb0G","ek-rating_size_small":"Rating__ek-rating_size_small___YZP0u","ek-rating_size_default":"Rating__ek-rating_size_default___X0xeh","ek-rating_size_big":"Rating__ek-rating_size_big___fQ-Lk"};
55
+
56
+ var RatingBlock = evokit.createBlock('svg', 'rating', ['size'], {
57
+ css: css
58
+ });
59
+ var Rating = React.memo(React.forwardRef(function (_a, ref) {
60
+ var _b = _a.value,
61
+ value = _b === void 0 ? 0 : _b,
62
+ _c = _a.percent,
63
+ percent = _c === void 0 ? 0 : _c,
64
+ _d = _a.size,
65
+ size = _d === void 0 ? 'default' : _d,
66
+ props = __rest(_a, ["value", "percent", "size"]);
67
+
68
+ var gradientOffset = Math.round(percent > 0 ? percent : value / 5 * 100);
69
+ var gradientId = "pds-rating-gradient-".concat(gradientOffset);
70
+ return React__default["default"].createElement(RatingBlock, __assign({}, props, {
71
+ ref: ref,
72
+ "rating-size": size,
73
+ viewBox: '0 0 100 20',
74
+ tabIndex: -1,
75
+ focusable: false
76
+ }), React__default["default"].createElement("defs", null, React__default["default"].createElement("linearGradient", {
77
+ id: gradientId
78
+ }, React__default["default"].createElement("stop", {
79
+ offset: "".concat(gradientOffset, "%"),
80
+ stopColor: 'var(--violet-500)'
81
+ }), React__default["default"].createElement("stop", {
82
+ offset: "".concat(gradientOffset, "%"),
83
+ stopColor: 'var(--black-400)'
84
+ }))), React__default["default"].createElement("path", {
85
+ fill: "url(#".concat(gradientId, ")"),
86
+ d: 'M10 1.5l2.781 5.595L19 7.998l-4.5 4.353 1.062 6.149L10\n 15.595 4.438 18.5 5.5 12.35 1 7.999l6.219-.903L10\n 1.5zM30.067 1.5l2.781 5.595 6.22.903-4.5 4.353 1.061\n 6.149-5.562-2.905-5.562 2.905 1.062-6.15-4.5-4.352\n 6.22-.903 2.78-5.595zM50.125 1.5l2.781 5.595\n 6.219.903-4.5 4.353 1.062 6.149-5.562-2.905-5.562\n 2.905 1.062-6.15-4.5-4.352 6.219-.903L50.125 1.5zM70.047\n 1.5l2.781 5.595 6.22.903-4.5 4.353 1.061 6.149-5.562-2.905-5.562\n 2.905 1.062-6.15-4.5-4.352 6.22-.903 2.78-5.595zM89.861\n 1.5l2.781 5.595 6.22.903-4.5 4.353 1.061 6.149-5.562-2.905L84.3\n 18.5l1.062-6.15-4.5-4.352 6.22-.903L89.86 1.5z'
87
+ }));
88
+ }));
89
+ Rating.displayName = 'Rating';
90
+ Rating.propTypes = {
91
+ /** Значение рейтинга, от 0 до 5 */
92
+ value: PropTypes__default["default"].oneOf([0, 1, 2, 3, 4, 5]),
93
+
94
+ /** Значение рейтинга в процентах от `0` до `100` */
95
+ // percent: PropTypes.number,
96
+
97
+ /** Размер */
98
+ size: PropTypes__default["default"].oneOf(['small', 'default', 'big'])
99
+ };
100
+
101
+ exports.Rating = Rating;
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@prom-ui/core/Rating",
3
+ "version": "0.0.10",
4
+ "main": "index.js",
5
+ "types": "index.d.ts",
6
+ "dependencies": {
7
+ "evokit": "3.2.3"
8
+ }
9
+ }
@@ -0,0 +1,26 @@
1
+ .Rating__ek-rating___fJb0G {
2
+ display: block;
3
+ -webkit-tap-highlight-color: transparent;
4
+ box-sizing: border-box;
5
+ height: 1em;
6
+ width: calc(1em * 5)
7
+ }
8
+
9
+ .Rating__ek-rating___fJb0G:focus {
10
+ outline: none;
11
+ }
12
+
13
+ .Rating__ek-rating_size_small___YZP0u {
14
+ height: 14px;
15
+ width: calc(14px * 5);
16
+ }
17
+
18
+ .Rating__ek-rating_size_default___X0xeh {
19
+ height: 18px;
20
+ width: calc(18px * 5);
21
+ }
22
+
23
+ .Rating__ek-rating_size_big___fQ-Lk {
24
+ height: 22px;
25
+ width: calc(22px * 5);
26
+ }
@@ -0,0 +1,16 @@
1
+ import { Component } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ export declare const Scroll: any;
4
+ export declare class StyleGuide extends Component {
5
+ static displayName: string;
6
+ static propTypes: {
7
+ /** Скрыть/показать полосу прокрутки */
8
+ "scroll-bar": PropTypes.Requireable<string>;
9
+ /** Выравнивание ячеек по горизонтальной оси */
10
+ "scroll-align": PropTypes.Requireable<string>;
11
+ "scroll-column": PropTypes.Requireable<string>;
12
+ "scroll-gap": PropTypes.Requireable<string>;
13
+ "scroll-padding": PropTypes.Requireable<string>;
14
+ };
15
+ render(): null;
16
+ }