@salutejs/plasma-sb-utils 0.247.0-next-sbcom.0 → 0.248.0-dev.0

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 (235) hide show
  1. package/lib/components/Accordion/Accordion.d.ts +5 -38
  2. package/lib/components/Accordion/meta.d.ts +5 -38
  3. package/lib/components/Accordion/meta.js +6 -15
  4. package/lib/components/Accordion/meta.js.map +1 -1
  5. package/lib/components/Attach/Attach.d.ts +38 -101
  6. package/lib/components/Attach/meta.d.ts +38 -101
  7. package/lib/components/Attach/meta.js +44 -53
  8. package/lib/components/Attach/meta.js.map +1 -1
  9. package/lib/components/Badge/Badge.d.ts +18 -45
  10. package/lib/components/Badge/meta.d.ts +18 -45
  11. package/lib/components/Badge/meta.js +10 -15
  12. package/lib/components/Badge/meta.js.map +1 -1
  13. package/lib/components/BottomSheet/BottomSheet.d.ts +11 -41
  14. package/lib/components/BottomSheet/meta.d.ts +11 -41
  15. package/lib/components/BottomSheet/meta.js +10 -16
  16. package/lib/components/BottomSheet/meta.js.map +1 -1
  17. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +0 -12
  18. package/lib/components/Breadcrumbs/meta.d.ts +0 -12
  19. package/lib/components/Breadcrumbs/meta.js +0 -4
  20. package/lib/components/Breadcrumbs/meta.js.map +1 -1
  21. package/lib/components/Button/Button.d.ts +15 -51
  22. package/lib/components/Button/meta.d.ts +15 -51
  23. package/lib/components/Button/meta.js +10 -18
  24. package/lib/components/Button/meta.js.map +1 -1
  25. package/lib/components/Calendar/Calendar.d.ts +26 -5
  26. package/lib/components/Calendar/meta.d.ts +26 -5
  27. package/lib/components/Calendar/meta.js +15 -7
  28. package/lib/components/Calendar/meta.js.map +1 -1
  29. package/lib/components/Calendar/stories.d.ts +2 -2
  30. package/lib/components/Calendar/stories.js +4 -4
  31. package/lib/components/Calendar/stories.js.map +1 -1
  32. package/lib/components/Carousel/Carousel.d.ts +27 -12
  33. package/lib/components/Carousel/Carousel.js +14 -1
  34. package/lib/components/Carousel/Carousel.js.map +1 -1
  35. package/lib/components/Carousel/meta.d.ts +16 -12
  36. package/lib/components/Carousel/meta.js +19 -12
  37. package/lib/components/Carousel/meta.js.map +1 -1
  38. package/lib/components/Carousel/stories.d.ts +1 -0
  39. package/lib/components/Carousel/stories.js +43 -1
  40. package/lib/components/Carousel/stories.js.map +1 -1
  41. package/lib/components/Chip/Chip.d.ts +10 -43
  42. package/lib/components/Chip/meta.d.ts +10 -43
  43. package/lib/components/Chip/meta.js +8 -16
  44. package/lib/components/Chip/meta.js.map +1 -1
  45. package/lib/components/CodeArea/CodeArea.d.ts +16 -46
  46. package/lib/components/CodeArea/meta.d.ts +16 -46
  47. package/lib/components/CodeArea/meta.js +16 -20
  48. package/lib/components/CodeArea/meta.js.map +1 -1
  49. package/lib/components/CodeField/CodeField.d.ts +0 -46
  50. package/lib/components/CodeField/meta.d.ts +0 -46
  51. package/lib/components/CodeField/meta.js +0 -15
  52. package/lib/components/CodeField/meta.js.map +1 -1
  53. package/lib/components/CodeInput/CodeInput.d.ts +0 -40
  54. package/lib/components/CodeInput/meta.d.ts +0 -40
  55. package/lib/components/CodeInput/meta.js +0 -13
  56. package/lib/components/CodeInput/meta.js.map +1 -1
  57. package/lib/components/Combobox/Combobox.d.ts +10 -90
  58. package/lib/components/Combobox/meta.d.ts +10 -90
  59. package/lib/components/Combobox/meta.js +6 -33
  60. package/lib/components/Combobox/meta.js.map +1 -1
  61. package/lib/components/DatePicker/DatePicker.d.ts +135 -58
  62. package/lib/components/DatePicker/fixtures.d.ts +1 -0
  63. package/lib/components/DatePicker/fixtures.js +1 -0
  64. package/lib/components/DatePicker/fixtures.js.map +1 -1
  65. package/lib/components/DatePicker/meta.d.ts +135 -58
  66. package/lib/components/DatePicker/meta.js +70 -79
  67. package/lib/components/DatePicker/meta.js.map +1 -1
  68. package/lib/components/DateTimePicker/DateTimePicker.d.ts +31 -158
  69. package/lib/components/DateTimePicker/fixtures.d.ts +1 -0
  70. package/lib/components/DateTimePicker/fixtures.js +1 -0
  71. package/lib/components/DateTimePicker/fixtures.js.map +1 -1
  72. package/lib/components/DateTimePicker/meta.d.ts +31 -158
  73. package/lib/components/DateTimePicker/meta.js +22 -59
  74. package/lib/components/DateTimePicker/meta.js.map +1 -1
  75. package/lib/components/Drawer/Drawer.d.ts +32 -78
  76. package/lib/components/Drawer/meta.d.ts +32 -78
  77. package/lib/components/Drawer/meta.js +26 -33
  78. package/lib/components/Drawer/meta.js.map +1 -1
  79. package/lib/components/Dropdown/fixtures.js +15 -1
  80. package/lib/components/Dropdown/fixtures.js.map +1 -1
  81. package/lib/components/Dropdown/meta.js +1 -1
  82. package/lib/components/Dropdown/meta.js.map +1 -1
  83. package/lib/components/Dropzone/Dropzone.d.ts +0 -33
  84. package/lib/components/Dropzone/meta.d.ts +0 -33
  85. package/lib/components/Dropzone/meta.js +0 -11
  86. package/lib/components/Dropzone/meta.js.map +1 -1
  87. package/lib/components/EmbeddedButton/EmbeddedButton.d.ts +0 -21
  88. package/lib/components/EmbeddedButton/meta.d.ts +0 -21
  89. package/lib/components/EmbeddedButton/meta.js +10 -14
  90. package/lib/components/EmbeddedButton/meta.js.map +1 -1
  91. package/lib/components/File/File.d.ts +11 -6
  92. package/lib/components/File/meta.d.ts +11 -6
  93. package/lib/components/File/meta.js +9 -6
  94. package/lib/components/File/meta.js.map +1 -1
  95. package/lib/components/InformationWrapper/InformationWrapper.d.ts +10 -73
  96. package/lib/components/InformationWrapper/meta.d.ts +10 -73
  97. package/lib/components/InformationWrapper/meta.js +10 -28
  98. package/lib/components/InformationWrapper/meta.js.map +1 -1
  99. package/lib/components/Link/Link.d.ts +5 -23
  100. package/lib/components/Link/meta.d.ts +5 -23
  101. package/lib/components/Link/meta.js +7 -11
  102. package/lib/components/Link/meta.js.map +1 -1
  103. package/lib/components/Note/Note.d.ts +15 -54
  104. package/lib/components/Note/meta.d.ts +15 -54
  105. package/lib/components/Note/meta.js +13 -22
  106. package/lib/components/Note/meta.js.map +1 -1
  107. package/lib/components/NumberFormat/NumberFormat.d.ts +0 -84
  108. package/lib/components/NumberFormat/meta.d.ts +0 -84
  109. package/lib/components/NumberFormat/meta.js +0 -28
  110. package/lib/components/NumberFormat/meta.js.map +1 -1
  111. package/lib/components/NumberInput/NumberInput.d.ts +0 -72
  112. package/lib/components/NumberInput/meta.d.ts +0 -72
  113. package/lib/components/NumberInput/meta.js +0 -24
  114. package/lib/components/NumberInput/meta.js.map +1 -1
  115. package/lib/components/Pagination/Pagination.d.ts +15 -64
  116. package/lib/components/Pagination/meta.d.ts +15 -64
  117. package/lib/components/Pagination/meta.js +9 -22
  118. package/lib/components/Pagination/meta.js.map +1 -1
  119. package/lib/components/Popover/Popover.d.ts +10 -67
  120. package/lib/components/Popover/meta.d.ts +10 -40
  121. package/lib/components/Popover/meta.js +8 -15
  122. package/lib/components/Popover/meta.js.map +1 -1
  123. package/lib/components/Popover/stories.d.ts +0 -27
  124. package/lib/components/Popover/stories.js +3 -11
  125. package/lib/components/Popover/stories.js.map +1 -1
  126. package/lib/components/Progress/Progress.d.ts +5 -41
  127. package/lib/components/Progress/meta.d.ts +5 -41
  128. package/lib/components/Progress/meta.js +7 -17
  129. package/lib/components/Progress/meta.js.map +1 -1
  130. package/lib/components/Range/Range.d.ts +47 -12
  131. package/lib/components/Range/meta.d.ts +47 -12
  132. package/lib/components/Range/meta.js +15 -5
  133. package/lib/components/Range/meta.js.map +1 -1
  134. package/lib/components/Rating/Rating.d.ts +0 -33
  135. package/lib/components/Rating/meta.d.ts +0 -33
  136. package/lib/components/Rating/meta.js +0 -11
  137. package/lib/components/Rating/meta.js.map +1 -1
  138. package/lib/components/Segment/meta.js +13 -9
  139. package/lib/components/Segment/meta.js.map +1 -1
  140. package/lib/components/Select/Select.d.ts +11 -269
  141. package/lib/components/Select/Select.js +13 -1
  142. package/lib/components/Select/Select.js.map +1 -1
  143. package/lib/components/Select/meta.d.ts +15 -2
  144. package/lib/components/Select/meta.js +16 -7
  145. package/lib/components/Select/meta.js.map +1 -1
  146. package/lib/components/Slider/Slider.d.ts +19 -97
  147. package/lib/components/Slider/meta.d.ts +19 -94
  148. package/lib/components/Slider/meta.js +15 -36
  149. package/lib/components/Slider/meta.js.map +1 -1
  150. package/lib/components/Slider/stories.d.ts +0 -3
  151. package/lib/components/Slider/stories.js +0 -1
  152. package/lib/components/Slider/stories.js.map +1 -1
  153. package/lib/components/Steps/Steps.d.ts +25 -73
  154. package/lib/components/Steps/meta.d.ts +25 -73
  155. package/lib/components/Steps/meta.js +22 -31
  156. package/lib/components/Steps/meta.js.map +1 -1
  157. package/lib/components/Table/Table.d.ts +6 -6
  158. package/lib/components/Table/meta.d.ts +6 -6
  159. package/lib/components/Table/meta.js +8 -4
  160. package/lib/components/Table/meta.js.map +1 -1
  161. package/lib/components/Tabs/Tabs.d.ts +48 -144
  162. package/lib/components/Tabs/meta.d.ts +24 -72
  163. package/lib/components/Tabs/meta.js +21 -31
  164. package/lib/components/Tabs/meta.js.map +1 -1
  165. package/lib/components/TextArea/TextArea.d.ts +19 -121
  166. package/lib/components/TextArea/meta.d.ts +19 -121
  167. package/lib/components/TextArea/meta.js +14 -44
  168. package/lib/components/TextArea/meta.js.map +1 -1
  169. package/lib/components/TextField/TextField.d.ts +15 -108
  170. package/lib/components/TextField/meta.d.ts +15 -108
  171. package/lib/components/TextField/meta.js +13 -40
  172. package/lib/components/TextField/meta.js.map +1 -1
  173. package/lib/components/TextFieldSlider/TextFieldSlider.d.ts +25 -148
  174. package/lib/components/TextFieldSlider/meta.d.ts +25 -148
  175. package/lib/components/TextFieldSlider/meta.js +19 -54
  176. package/lib/components/TextFieldSlider/meta.js.map +1 -1
  177. package/lib/components/TimePicker/TimePicker.d.ts +21 -129
  178. package/lib/components/TimePicker/meta.d.ts +21 -129
  179. package/lib/components/TimePicker/meta.js +16 -48
  180. package/lib/components/TimePicker/meta.js.map +1 -1
  181. package/lib/components/Tour/Tour.d.ts +5 -35
  182. package/lib/components/Tour/meta.d.ts +5 -35
  183. package/lib/components/Tour/meta.js +7 -15
  184. package/lib/components/Tour/meta.js.map +1 -1
  185. package/lib/components/_ai/Answer/Answer.d.ts +7 -34
  186. package/lib/components/_ai/Answer/meta.d.ts +7 -34
  187. package/lib/components/_ai/Answer/meta.js +13 -19
  188. package/lib/components/_ai/Answer/meta.js.map +1 -1
  189. package/lib/components/_ai/Container/Container.d.ts +26 -80
  190. package/lib/components/_ai/Container/meta.d.ts +26 -80
  191. package/lib/components/_ai/Container/meta.js +34 -48
  192. package/lib/components/_ai/Container/meta.js.map +1 -1
  193. package/lib/components/_ai/Header/Header.d.ts +8 -32
  194. package/lib/components/_ai/Header/meta.d.ts +8 -32
  195. package/lib/components/_ai/Header/meta.js +8 -13
  196. package/lib/components/_ai/Header/meta.js.map +1 -1
  197. package/lib/components/_ai/Input/Input.d.ts +8 -41
  198. package/lib/components/_ai/Input/meta.d.ts +8 -41
  199. package/lib/components/_ai/Input/meta.js +8 -16
  200. package/lib/components/_ai/Input/meta.js.map +1 -1
  201. package/lib/components/_ai/Markdown/Markdown.d.ts +4 -4
  202. package/lib/components/_ai/Markdown/meta.d.ts +4 -4
  203. package/lib/components/_ai/Markdown/meta.js +7 -5
  204. package/lib/components/_ai/Markdown/meta.js.map +1 -1
  205. package/lib/components/_ai/UserMessage/UserMessage.d.ts +11 -29
  206. package/lib/components/_ai/UserMessage/meta.d.ts +11 -29
  207. package/lib/components/_ai/UserMessage/meta.js +8 -11
  208. package/lib/components/_ai/UserMessage/meta.js.map +1 -1
  209. package/lib/components/_ai/UserMessage/stories.js +2 -2
  210. package/lib/components/_ai/UserMessage/stories.js.map +1 -1
  211. package/lib/components/index.d.ts +0 -1
  212. package/lib/components/index.js +0 -1
  213. package/lib/components/index.js.map +1 -1
  214. package/lib/helpers/exampleOnly.d.ts +14 -0
  215. package/lib/helpers/exampleOnly.js +28 -0
  216. package/lib/helpers/exampleOnly.js.map +1 -0
  217. package/lib/helpers/index.d.ts +1 -0
  218. package/lib/helpers/index.js +1 -0
  219. package/lib/helpers/index.js.map +1 -1
  220. package/package.json +7 -7
  221. package/lib/components/Spinner/Spinner.d.ts +0 -59
  222. package/lib/components/Spinner/Spinner.js +0 -42
  223. package/lib/components/Spinner/Spinner.js.map +0 -1
  224. package/lib/components/Spinner/fixtures.d.ts +0 -1
  225. package/lib/components/Spinner/fixtures.js +0 -2
  226. package/lib/components/Spinner/fixtures.js.map +0 -1
  227. package/lib/components/Spinner/index.d.ts +0 -1
  228. package/lib/components/Spinner/index.js +0 -2
  229. package/lib/components/Spinner/index.js.map +0 -1
  230. package/lib/components/Spinner/meta.d.ts +0 -47
  231. package/lib/components/Spinner/meta.js +0 -45
  232. package/lib/components/Spinner/meta.js.map +0 -1
  233. package/lib/components/Spinner/stories.d.ts +0 -7
  234. package/lib/components/Spinner/stories.js +0 -60
  235. package/lib/components/Spinner/stories.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ export var EXAMPLE_ONLY_CATEGORY = 'Example only';
13
+ /**
14
+ * Помечает контролы, которых нет в API компонента и которые заведены только ради стори
15
+ * (`enableContentLeft`, `hasHint`, `showFooter` и т.п.).
16
+ * В таблице Storybook они уходят в отдельную секцию `Example only` под пропсами компонента.
17
+ *
18
+ * Пропсы из API компонента не помечаются — у них категории нет.
19
+ */
20
+ export var exampleOnly = function (argTypes) {
21
+ var result = {};
22
+ Object.entries(argTypes).forEach(function (_a) {
23
+ var name = _a[0], argType = _a[1];
24
+ result[name] = __assign(__assign({}, argType), { table: __assign(__assign({}, argType.table), { category: EXAMPLE_ONLY_CATEGORY }) });
25
+ });
26
+ return result;
27
+ };
28
+ //# sourceMappingURL=exampleOnly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exampleOnly.js","sourceRoot":"","sources":["../../src/helpers/exampleOnly.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,MAAM,CAAC,IAAM,qBAAqB,GAAG,cAAc,CAAC;AAOpD;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,WAAW,GAAG,UAAoC,QAAW;IACtE,IAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,UAAC,EAAe;YAAd,IAAI,QAAA,EAAE,OAAO,QAAA;QAC5C,MAAM,CAAC,IAAI,CAAC,yBAAQ,OAAO,KAAE,KAAK,wBAAO,OAAO,CAAC,KAAK,KAAE,QAAQ,EAAE,qBAAqB,MAAI,CAAC;IAChG,CAAC,CAAC,CAAC;IAEH,OAAO,MAAW,CAAC;AACvB,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { disableProps } from './disableProps';
2
+ export { exampleOnly, EXAMPLE_ONLY_CATEGORY } from './exampleOnly';
2
3
  export { flattenPalette } from './flattenPalette';
3
4
  export { extractCanvasThemeColors, extractWebThemeColors } from './themeColors';
4
5
  export { getGroupedCornerRadiusTokens, getGroupedSpacingTokens } from './numberTokens';
@@ -1,4 +1,5 @@
1
1
  export { disableProps } from './disableProps';
2
+ export { exampleOnly, EXAMPLE_ONLY_CATEGORY } from './exampleOnly';
2
3
  export { flattenPalette } from './flattenPalette';
3
4
  export { extractCanvasThemeColors, extractWebThemeColors } from './themeColors';
4
5
  export { getGroupedCornerRadiusTokens, getGroupedSpacingTokens } from './numberTokens';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACH,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,MAAM,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACH,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EAClB,MAAM,GACT,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-sb-utils",
3
- "version": "0.247.0-next-sbcom.0",
3
+ "version": "0.248.0-dev.0",
4
4
  "description": "Code shared between ui libraries.",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -31,16 +31,16 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@emotion/react": "11.14.0",
34
- "@salutejs/plasma-colors": "0.26.0-next-sbcom.0",
35
- "@salutejs/plasma-core": "1.246.0-next-sbcom.0",
36
- "@salutejs/plasma-icons": "1.253.0-next-sbcom.0",
34
+ "@salutejs/plasma-colors": "0.26.0-dev.0",
35
+ "@salutejs/plasma-core": "1.247.0-dev.0",
36
+ "@salutejs/plasma-icons": "1.254.0-dev.0",
37
37
  "@storybook/react": "10.3.4",
38
38
  "param-case": "^3.0.4"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.13.1",
42
42
  "react-dom": ">=16.13.1",
43
- "styled-components": "^5.1.1"
43
+ "styled-components": "^5.3.11"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "24.10.1",
@@ -49,7 +49,7 @@
49
49
  "@types/styled-components": "^5.1.0",
50
50
  "react": "18.2.0",
51
51
  "react-dom": "18.2.0",
52
- "styled-components": "5.3.1"
52
+ "styled-components": "5.3.11"
53
53
  },
54
54
  "publishConfig": {
55
55
  "access": "public"
@@ -57,5 +57,5 @@
57
57
  "files": [
58
58
  "lib"
59
59
  ],
60
- "gitHead": "c62684bb3d9ab338c855e9e88388bead92899739"
60
+ "gitHead": "192f858f2e44fc11fc92b19949cbe9b40eb12210"
61
61
  }
@@ -1,59 +0,0 @@
1
- import React from 'react';
2
- type CreateSpinnerStoriesProps = {
3
- component: any;
4
- componentConfig: any;
5
- additionalComponents: {
6
- Button: React.ComponentType<any>;
7
- };
8
- title?: string;
9
- disablePropsList?: string[];
10
- defaultArgs?: {};
11
- additionalArgTypes?: {};
12
- };
13
- export declare const getSpinnerStories: (config: CreateSpinnerStoriesProps) => {
14
- meta: {
15
- title: string;
16
- decorators: import("@storybook/react").Decorator[];
17
- component: any;
18
- args: {
19
- size: string;
20
- view: string;
21
- };
22
- argTypes: {
23
- size: {
24
- options: any;
25
- control: {
26
- type: string;
27
- };
28
- table: {
29
- category: string;
30
- };
31
- };
32
- view: {
33
- options: any;
34
- control: {
35
- type: string;
36
- };
37
- table: {
38
- category: string;
39
- };
40
- };
41
- strokeSize: {
42
- options: number[];
43
- control: {
44
- type: string;
45
- };
46
- table: {
47
- category: string;
48
- };
49
- };
50
- };
51
- };
52
- Default: {
53
- render: (args: any) => JSX.Element;
54
- };
55
- Live: {
56
- render: (args: any) => JSX.Element;
57
- };
58
- };
59
- export {};
@@ -1,42 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import React from 'react';
24
- import { getConfigVariations } from '../../helpers';
25
- import { createMeta } from './meta';
26
- import { createDefaultStory, createLiveStory } from './stories';
27
- export var getSpinnerStories = function (config) {
28
- var component = config.component, componentConfig = config.componentConfig, additionalComponents = config.additionalComponents, rest = __rest(config, ["component", "componentConfig", "additionalComponents"]);
29
- var Button = additionalComponents.Button;
30
- var spinnerConfig = getConfigVariations(componentConfig);
31
- var meta = createMeta(__assign({ component: component, componentConfig: spinnerConfig }, rest));
32
- var DefaultStoryComponent = createDefaultStory(component);
33
- var LiveStoryComponent = createLiveStory(component, { Button: Button });
34
- var Default = {
35
- render: function (args) { return React.createElement(DefaultStoryComponent, __assign({}, args)); },
36
- };
37
- var Live = {
38
- render: function (args) { return React.createElement(LiveStoryComponent, __assign({}, args)); },
39
- };
40
- return { meta: meta, Default: Default, Live: Live };
41
- };
42
- //# sourceMappingURL=Spinner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAchE,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAC,MAAiC;IACvD,IAAA,SAAS,GAAqD,MAAM,UAA3D,EAAE,eAAe,GAAoC,MAAM,gBAA1C,EAAE,oBAAoB,GAAc,MAAM,qBAApB,EAAK,IAAI,UAAK,MAAM,EAAtE,wDAA6D,CAAF,CAAY;IACrE,IAAA,MAAM,GAAK,oBAAoB,OAAzB,CAA0B;IAExC,IAAM,aAAa,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAC;IAC3D,IAAM,IAAI,GAAG,UAAU,YAAG,SAAS,WAAA,EAAE,eAAe,EAAE,aAAa,IAAK,IAAI,EAAG,CAAC;IAEhF,IAAM,qBAAqB,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC5D,IAAM,kBAAkB,GAAG,eAAe,CAAC,SAAS,EAAE,EAAE,MAAM,QAAA,EAAE,CAAC,CAAC;IAElE,IAAM,OAAO,GAAG;QACZ,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,qBAAqB,eAAK,IAAI,EAAI,EAAnC,CAAmC;KAC7D,CAAC;IACF,IAAM,IAAI,GAAG;QACT,MAAM,EAAE,UAAC,IAAS,IAAK,OAAA,oBAAC,kBAAkB,eAAK,IAAI,EAAI,EAAhC,CAAgC;KAC1D,CAAC;IAEF,OAAO,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,IAAI,MAAA,EAAE,CAAC;AACnC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=fixtures.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/components/Spinner/fixtures.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export * from './Spinner';
@@ -1,2 +0,0 @@
1
- export * from './Spinner';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Spinner/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -1,47 +0,0 @@
1
- type CreateMetaProps = {
2
- component: any;
3
- componentConfig: any;
4
- title?: string;
5
- defaultArgs?: {};
6
- additionalArgTypes?: {};
7
- disablePropsList?: string[];
8
- };
9
- export declare const createMeta: ({ component, componentConfig, title, defaultArgs, additionalArgTypes, disablePropsList, }: CreateMetaProps) => {
10
- title: string;
11
- decorators: import("@storybook/react").Decorator[];
12
- component: any;
13
- args: {
14
- size: string;
15
- view: string;
16
- };
17
- argTypes: {
18
- size: {
19
- options: any;
20
- control: {
21
- type: string;
22
- };
23
- table: {
24
- category: string;
25
- };
26
- };
27
- view: {
28
- options: any;
29
- control: {
30
- type: string;
31
- };
32
- table: {
33
- category: string;
34
- };
35
- };
36
- strokeSize: {
37
- options: number[];
38
- control: {
39
- type: string;
40
- };
41
- table: {
42
- category: string;
43
- };
44
- };
45
- };
46
- };
47
- export {};
@@ -1,45 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
- import { disableProps, InSpacingDecorator } from '../../index';
22
- var commonDisabledArgs = ['color', 'width', 'height', 'deviceScale', 'theme', 'as', 'forwardedAs'];
23
- export var createMeta = function (_a) {
24
- var component = _a.component, componentConfig = _a.componentConfig, _b = _a.title, title = _b === void 0 ? 'Data Display/Spinner' : _b, _c = _a.defaultArgs, defaultArgs = _c === void 0 ? {} : _c, _d = _a.additionalArgTypes, additionalArgTypes = _d === void 0 ? {} : _d, _e = _a.disablePropsList, disablePropsList = _e === void 0 ? [] : _e;
25
- return ({
26
- title: title,
27
- decorators: [InSpacingDecorator],
28
- component: component,
29
- args: __assign({ size: 'm', view: 'accent' }, defaultArgs),
30
- argTypes: __assign(__assign({ size: {
31
- options: componentConfig.sizes,
32
- control: { type: 'select' },
33
- table: { category: 'variation' },
34
- }, view: {
35
- options: componentConfig.views,
36
- control: { type: 'select' },
37
- table: { category: 'variation' },
38
- }, strokeSize: {
39
- options: [2, 4, 6, 8],
40
- control: { type: 'radio' },
41
- table: { category: 'variation' },
42
- } }, additionalArgTypes), disableProps(__spreadArray(__spreadArray([], commonDisabledArgs, true), disablePropsList, true))),
43
- });
44
- };
45
- //# sourceMappingURL=meta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/Spinner/meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAW/D,IAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;AAErG,MAAM,CAAC,IAAM,UAAU,GAAG,UAAC,EAOT;QANd,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,aAA8B,EAA9B,KAAK,mBAAG,sBAAsB,KAAA,EAC9B,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,0BAAuB,EAAvB,kBAAkB,mBAAG,EAAE,KAAA,EACvB,wBAAqB,EAArB,gBAAgB,mBAAG,EAAE,KAAA;IACF,OAAA,CAAC;QACpB,KAAK,OAAA;QACL,UAAU,EAAE,CAAC,kBAAkB,CAAC;QAChC,SAAS,WAAA;QACT,IAAI,aACA,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,QAAQ,IACX,WAAW,CACjB;QACD,QAAQ,sBACJ,IAAI,EAAE;gBACF,OAAO,EAAE,eAAe,CAAC,KAAK;gBAC9B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC3B,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;aACnC,EACD,IAAI,EAAE;gBACF,OAAO,EAAE,eAAe,CAAC,KAAK;gBAC9B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBAC3B,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;aACnC,EACD,UAAU,EAAE;gBACR,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;gBACrB,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;gBAC1B,KAAK,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE;aACnC,IACE,kBAAkB,GAClB,YAAY,iCAAK,kBAAkB,SAAK,gBAAgB,QAAE,CAChE;KACJ,CAAC;AA5BqB,CA4BrB,CAAC"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- type Components = {
3
- Button: React.ComponentType<any>;
4
- };
5
- export declare const createDefaultStory: (Spinner: any) => (args: any) => JSX.Element;
6
- export declare const createLiveStory: (Spinner: any, { Button }: Components) => ({ style, ...rest }: any) => JSX.Element;
7
- export {};
@@ -1,60 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- var __rest = (this && this.__rest) || function (s, e) {
17
- var t = {};
18
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
19
- t[p] = s[p];
20
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
22
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
23
- t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
- import React, { useEffect, useRef, useState } from 'react';
28
- import styled from 'styled-components';
29
- var StyledWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: 0.5rem 1rem;\n\n &::after {\n position: absolute;\n inset: 0;\n z-index: 1;\n border-radius: 0.5rem;\n\n content: '';\n display: ", ";\n background: rgba(0, 0, 0, 0.1);\n }\n"], ["\n position: relative;\n padding: 0.5rem 1rem;\n\n &::after {\n position: absolute;\n inset: 0;\n z-index: 1;\n border-radius: 0.5rem;\n\n content: '';\n display: ", ";\n background: rgba(0, 0, 0, 0.1);\n }\n"])), function (_a) {
30
- var $loading = _a.$loading;
31
- return ($loading ? 'block' : 'none');
32
- });
33
- export var createDefaultStory = function (Spinner) { return function (args) { return React.createElement(Spinner, __assign({}, args)); }; };
34
- export var createLiveStory = function (Spinner, _a) {
35
- var Button = _a.Button;
36
- var StyledSpinner = styled(Spinner)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n inset: 0;\n z-index: 2;\n margin: auto;\n "], ["\n position: absolute;\n inset: 0;\n z-index: 2;\n margin: auto;\n "])));
37
- var Live = function (_a) {
38
- var style = _a.style, rest = __rest(_a, ["style"]);
39
- var _b = useState(false), loading = _b[0], setLoading = _b[1];
40
- var timeoutRef = useRef(null);
41
- useEffect(function () {
42
- if (!loading) {
43
- return undefined;
44
- }
45
- timeoutRef.current = setTimeout(function () { return setLoading(false); }, 10000);
46
- return function () {
47
- if (timeoutRef.current) {
48
- clearTimeout(timeoutRef.current);
49
- }
50
- };
51
- }, [loading]);
52
- return (React.createElement(StyledWrapper, { "$loading": loading },
53
- React.createElement("p", { id: "spinner-live-description" }, "\u041F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043D\u043E\u043F\u043A\u0438 \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043D\u0430 10 \u0441\u0435\u043A\u0443\u043D\u0434 \u043F\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043D\u043E \u0432 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438."),
54
- React.createElement(Button, { text: loading ? 'Загрузка' : 'Нажмите', onClick: function () { return setLoading(true); }, "aria-busy": loading, "aria-describedby": "spinner-live-description", disabled: loading }),
55
- loading && React.createElement(StyledSpinner, __assign({}, rest, { style: style }))));
56
- };
57
- return Live;
58
- };
59
- var templateObject_1, templateObject_2;
60
- //# sourceMappingURL=stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Spinner/stories.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAMvC,IAAM,aAAa,GAAG,MAAM,CAAC,GAAG,kVAAuB,wNAWpC,EAA+C,qDAGjE,KAHkB,UAAC,EAAY;QAAV,QAAQ,cAAA;IAAO,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AAA7B,CAA6B,CAGjE,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,OAAY,IAAK,OAAA,UAAC,IAAS,IAAK,OAAA,oBAAC,OAAO,eAAK,IAAI,EAAI,EAArB,CAAqB,EAApC,CAAoC,CAAC;AAEzF,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,OAAY,EAAE,EAAsB;QAApB,MAAM,YAAA;IAClD,IAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,uKAAA,oGAKpC,IAAA,CAAC;IAEF,IAAM,IAAI,GAAG,UAAC,EAAuB;QAArB,IAAA,KAAK,WAAA,EAAK,IAAI,cAAhB,SAAkB,CAAF;QACpB,IAAA,KAAwB,QAAQ,CAAC,KAAK,CAAC,EAAtC,OAAO,QAAA,EAAE,UAAU,QAAmB,CAAC;QAC9C,IAAM,UAAU,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAC;QAEtE,SAAS,CAAC;YACN,IAAI,CAAC,OAAO,EAAE,CAAC;gBACX,OAAO,SAAS,CAAC;YACrB,CAAC;YAED,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,cAAM,OAAA,UAAU,CAAC,KAAK,CAAC,EAAjB,CAAiB,EAAE,KAAK,CAAC,CAAC;YAEhE,OAAO;gBACH,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;oBACrB,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;gBACrC,CAAC;YACL,CAAC,CAAC;QACN,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAEd,OAAO,CACH,oBAAC,aAAa,gBAAW,OAAO;YAC5B,2BAAG,EAAE,EAAC,0BAA0B,uaAE5B;YACJ,oBAAC,MAAM,IACH,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACtC,OAAO,EAAE,cAAM,OAAA,UAAU,CAAC,IAAI,CAAC,EAAhB,CAAgB,eACpB,OAAO,sBACD,0BAA0B,EAC3C,QAAQ,EAAE,OAAO,GACnB;YACD,OAAO,IAAI,oBAAC,aAAa,eAAK,IAAI,IAAE,KAAK,EAAE,KAAK,IAAI,CACzC,CACnB,CAAC;IACN,CAAC,CAAC;IAEF,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}