@alphakits/ui 1.16.6 → 1.17.1

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 (306) hide show
  1. package/dist/{_commonjsHelpers-d789a53e.js → _commonjsHelpers-2ca36f93.js} +0 -0
  2. package/dist/amount/component.js +1 -1
  3. package/dist/amount/index.js +1 -1
  4. package/dist/amount-input/component.d.ts +1 -1
  5. package/dist/amount-input/component.js +1 -1
  6. package/dist/amount-input/index.js +1 -1
  7. package/dist/avatar/component.js +1 -1
  8. package/dist/avatar/index.js +1 -1
  9. package/dist/base-card/component.js +1 -1
  10. package/dist/base-card/index.js +1 -1
  11. package/dist/bottom-sheet/component.js +1 -1
  12. package/dist/bottom-sheet/index.js +1 -1
  13. package/dist/button/component.d.ts +1 -1
  14. package/dist/button/component.js +1 -1
  15. package/dist/button/index.js +1 -1
  16. package/dist/calendar/component.js +1 -1
  17. package/dist/calendar/components/days-table/component.js +1 -1
  18. package/dist/calendar/components/days-table/index.js +1 -1
  19. package/dist/calendar/components/header/index.js +1 -1
  20. package/dist/calendar/components/header//321/201omponent.js +1 -1
  21. package/dist/calendar/components/months-table/index.js +1 -1
  22. package/dist/calendar/components/months-table//321/201omponent.js +1 -1
  23. package/dist/calendar/components/select-button/index.js +1 -1
  24. package/dist/calendar/components/select-button//321/201omponent.js +1 -1
  25. package/dist/calendar/components/years-table/index.js +1 -1
  26. package/dist/calendar/components/years-table//321/201omponent.js +1 -1
  27. package/dist/calendar/index.js +1 -1
  28. package/dist/calendar/use-calendar.d.ts +6 -6
  29. package/dist/calendar-input/component.d.ts +4 -4
  30. package/dist/calendar-input/component.js +1 -1
  31. package/dist/calendar-input/index.js +1 -1
  32. package/dist/calendar-input/utils.d.ts +1 -1
  33. package/dist/card/component.js +1 -1
  34. package/dist/card/images/index.js +1 -1
  35. package/dist/card/index.js +1 -1
  36. package/dist/cell/base/component.js +1 -1
  37. package/dist/cell/base/index.d.ts +1 -1
  38. package/dist/cell/base/index.js +1 -1
  39. package/dist/cell/component.js +1 -1
  40. package/dist/cell/index.js +1 -1
  41. package/dist/cell/pure/component.d.ts +1 -1
  42. package/dist/cell/pure/component.js +1 -1
  43. package/dist/cell/pure/index.js +1 -1
  44. package/dist/checkbox/component.d.ts +6 -6
  45. package/dist/checkbox/component.js +1 -1
  46. package/dist/checkbox/index.js +1 -1
  47. package/dist/checkbox-group/component.js +1 -1
  48. package/dist/checkbox-group/index.js +1 -1
  49. package/dist/checkbox-lists/component.js +1 -1
  50. package/dist/checkbox-lists/index.js +1 -1
  51. package/dist/collapsable-row/addons.js +1 -1
  52. package/dist/collapsable-row/component.js +1 -1
  53. package/dist/collapsable-row/index.js +1 -1
  54. package/dist/collapse/component.js +1 -1
  55. package/dist/collapse/index.js +1 -1
  56. package/dist/{colors.module-6d340fca.js → colors.module-0dd2031b.js} +0 -0
  57. package/dist/{common.module-3989bad6.js → common.module-7ae3bde9.js} +0 -0
  58. package/dist/{component-3d20d5a5.d.ts → component-7427f393.d.ts} +0 -0
  59. package/dist/{component-3d20d5a5.js → component-7427f393.js} +0 -0
  60. package/dist/{contact-block-2e54ad04.d.ts → contact-block-5f682dce.d.ts} +0 -0
  61. package/dist/{contact-block-2e54ad04.js → contact-block-5f682dce.js} +0 -0
  62. package/dist/copy-button/component.js +1 -1
  63. package/dist/copy-button/index.js +1 -1
  64. package/dist/date/component.d.ts +1 -1
  65. package/dist/date/component.js +1 -1
  66. package/dist/date/index.js +1 -1
  67. package/dist/date-switcher/component.js +1 -1
  68. package/dist/date-switcher/index.js +1 -1
  69. package/dist/footer/component.js +1 -1
  70. package/dist/footer/contact-block.js +1 -1
  71. package/dist/footer/index.js +1 -1
  72. package/dist/form/component.js +1 -1
  73. package/dist/form/components/form-footer/index.js +1 -1
  74. package/dist/form/components/index.js +1 -1
  75. package/dist/form/index.js +1 -1
  76. package/dist/form/templates/crud-form/index.js +1 -1
  77. package/dist/form/templates/filters-form/index.js +1 -1
  78. package/dist/form/templates/rest-form/index.d.ts +2 -2
  79. package/dist/form/templates/rest-form/index.js +1 -1
  80. package/dist/form/utils/get-default-values.js +1 -1
  81. package/dist/form/utils/remove-undefined-from-object.d.ts +1 -2
  82. package/dist/form-control/component.d.ts +5 -5
  83. package/dist/form-control/component.js +1 -1
  84. package/dist/form-control/index.js +1 -1
  85. package/dist/{formik.esm-546605b0.js → formik.esm-2d38deec.js} +1 -1
  86. package/dist/grid/col/component.js +1 -1
  87. package/dist/grid/col/index.js +1 -1
  88. package/dist/grid/component.js +1 -1
  89. package/dist/grid/index.js +1 -1
  90. package/dist/grid/row/component.js +1 -1
  91. package/dist/grid/row/index.js +1 -1
  92. package/dist/{gutters.module-f3aa8e44.js → gutters.module-d6a3d1c7.js} +0 -0
  93. package/dist/header-search/component.js +1 -1
  94. package/dist/header-search/index.js +1 -1
  95. package/dist/heading/component.js +1 -1
  96. package/dist/heading/index.js +1 -1
  97. package/dist/hooks/index.js +1 -1
  98. package/dist/hooks/use-crud-form-requests/index.js +1 -1
  99. package/dist/hooks/use-get-one/index.d.ts +2 -2
  100. package/dist/hooks/use-get-one/index.js +1 -1
  101. package/dist/icon-button/component.d.ts +1 -1
  102. package/dist/icon-button/component.js +1 -1
  103. package/dist/icon-button/index.js +1 -1
  104. package/dist/image/component.js +1 -1
  105. package/dist/image/image-base.js +1 -1
  106. package/dist/image/index.js +1 -1
  107. package/dist/image/use-image-render-component.js +1 -1
  108. package/dist/image-gallery/component.d.ts +11 -0
  109. package/dist/image-gallery/component.js +1 -0
  110. package/dist/image-gallery/components/header/index.d.ts +3 -0
  111. package/dist/image-gallery/components/header/index.js +1 -0
  112. package/dist/image-gallery/components/header-info-block/index.d.ts +6 -0
  113. package/dist/image-gallery/components/header-info-block/index.js +1 -0
  114. package/dist/image-gallery/components/image-preview/index.d.ts +11 -0
  115. package/dist/image-gallery/components/image-preview/index.js +1 -0
  116. package/dist/image-gallery/components/image-viewer/index.d.ts +3 -0
  117. package/dist/image-gallery/components/image-viewer/index.js +1 -0
  118. package/dist/image-gallery/components/image-viewer/slide.d.ts +0 -0
  119. package/dist/image-gallery/components/image-viewer/slide.js +1 -0
  120. package/dist/image-gallery/components/index.d.ts +4 -0
  121. package/dist/image-gallery/components/index.js +1 -0
  122. package/dist/image-gallery/components/navigation-bar/index.d.ts +3 -0
  123. package/dist/image-gallery/components/navigation-bar/index.js +1 -0
  124. package/dist/image-gallery/context.d.ts +24 -0
  125. package/dist/image-gallery/context.js +1 -0
  126. package/dist/image-gallery/index.d.ts +2 -0
  127. package/dist/image-gallery/index.js +1 -0
  128. package/dist/image-gallery/types.d.ts +13 -0
  129. package/dist/image-gallery/types.js +1 -0
  130. package/dist/image-gallery/utils/constants.d.ts +11 -0
  131. package/dist/image-gallery/utils/constants.js +1 -0
  132. package/dist/image-gallery/utils/index.d.ts +3 -0
  133. package/dist/image-gallery/utils/index.js +1 -0
  134. package/dist/image-gallery/utils/split-filename.d.ts +2 -0
  135. package/dist/image-gallery/utils/split-filename.js +1 -0
  136. package/dist/image-gallery/utils/utils.d.ts +7 -0
  137. package/dist/image-gallery/utils/utils.js +1 -0
  138. package/dist/image-uploader/component.d.ts +21 -0
  139. package/dist/image-uploader/component.js +1 -0
  140. package/dist/image-uploader/index.d.ts +1 -0
  141. package/dist/image-uploader/index.js +1 -0
  142. package/dist/{index-d25cd963.js → index-31f47a2f.js} +1 -1
  143. package/dist/index.css +1 -1
  144. package/dist/index.ts +2 -0
  145. package/dist/info-block-header/component.js +1 -1
  146. package/dist/info-block-header/index.js +1 -1
  147. package/dist/info-block-item/component.js +1 -1
  148. package/dist/info-block-item/index.js +1 -1
  149. package/dist/input/component.d.ts +7 -7
  150. package/dist/input/component.js +1 -1
  151. package/dist/input/index.js +1 -1
  152. package/dist/{intersection-observer-78efcda0.js → intersection-observer-692397e9.js} +0 -0
  153. package/dist/link/component.d.ts +2 -2
  154. package/dist/link/component.js +1 -1
  155. package/dist/link/index.js +1 -1
  156. package/dist/list-allert/component.js +1 -1
  157. package/dist/list-allert/index.js +1 -1
  158. package/dist/masked-input/component.d.ts +4 -7
  159. package/dist/masked-input/component.js +1 -1
  160. package/dist/masked-input/index.js +1 -1
  161. package/dist/menu/component.js +1 -1
  162. package/dist/menu/components/content-header/index.js +1 -1
  163. package/dist/menu/components/index.js +1 -1
  164. package/dist/menu/components/menu-avatar/index.js +1 -1
  165. package/dist/menu/components/menu-button/index.js +1 -1
  166. package/dist/menu/components/menu-buttons-list/index.js +1 -1
  167. package/dist/menu/components/user-button/index.js +1 -1
  168. package/dist/menu/index.js +1 -1
  169. package/dist/message/component.js +1 -1
  170. package/dist/message/index.js +1 -1
  171. package/dist/modal/components/modals/index.js +1 -1
  172. package/dist/modal/context.js +1 -1
  173. package/dist/modal/hooks/use-modal.d.ts +2 -2
  174. package/dist/modal/hooks/use-modal.js +1 -1
  175. package/dist/modal/index.js +1 -1
  176. package/dist/not-found/component.js +1 -1
  177. package/dist/not-found/index.js +1 -1
  178. package/dist/notification/component.js +1 -1
  179. package/dist/notification/index.js +1 -1
  180. package/dist/{parse-query-params-5d639cfa.d.ts → parse-query-params-0d96c14d.d.ts} +0 -0
  181. package/dist/{parse-query-params-5d639cfa.js → parse-query-params-0d96c14d.js} +1 -1
  182. package/dist/picker-button/common/index.js +1 -1
  183. package/dist/picker-button/common/labeled-button/index.js +1 -1
  184. package/dist/picker-button/component.d.ts +2 -2
  185. package/dist/picker-button/component.js +1 -1
  186. package/dist/picker-button/field/Component.js +1 -1
  187. package/dist/picker-button/field/index.js +1 -1
  188. package/dist/picker-button/index.js +1 -1
  189. package/dist/popover/component.js +1 -1
  190. package/dist/popover/index.js +1 -1
  191. package/dist/progress-bar/component.js +1 -1
  192. package/dist/progress-bar/index.js +1 -1
  193. package/dist/progress-index/component.js +1 -1
  194. package/dist/progress-index/index.js +1 -1
  195. package/dist/radio/component.d.ts +6 -6
  196. package/dist/radio/component.js +1 -1
  197. package/dist/radio/index.js +1 -1
  198. package/dist/radio-group/component.js +1 -1
  199. package/dist/radio-group/index.js +1 -1
  200. package/dist/radio-groups/component.js +1 -1
  201. package/dist/radio-groups/index.js +1 -1
  202. package/dist/select/component.d.ts +1 -1
  203. package/dist/select/component.js +1 -1
  204. package/dist/select/components/base-select/component.js +1 -1
  205. package/dist/select/components/base-select/index.js +1 -1
  206. package/dist/select/components/field/component.d.ts +2 -21
  207. package/dist/select/components/field/component.js +1 -1
  208. package/dist/select/components/field/index.js +1 -1
  209. package/dist/select/components/index.js +1 -1
  210. package/dist/select/components/native-select/component.d.ts +1 -1
  211. package/dist/select/components/native-select/component.js +1 -1
  212. package/dist/select/components/native-select/index.js +1 -1
  213. package/dist/select/components/option/component.js +1 -1
  214. package/dist/select/components/option/index.js +1 -1
  215. package/dist/select/components/virtual-options-list/component.js +1 -1
  216. package/dist/select/components/virtual-options-list/index.js +1 -1
  217. package/dist/select/index.js +1 -1
  218. package/dist/select/presets/index.js +1 -1
  219. package/dist/select/presets/use-lazy-loading/index.d.ts +1 -1
  220. package/dist/select/presets/use-lazy-loading/index.js +1 -1
  221. package/dist/select/presets/use-select-with-loading/hook.js +1 -1
  222. package/dist/select/utils.d.ts +1 -1
  223. package/dist/sidepanel-header/component.js +1 -1
  224. package/dist/sidepanel-header/index.js +1 -1
  225. package/dist/slide-d1d9fca8.d.ts +16 -0
  226. package/dist/slide-d1d9fca8.js +1 -0
  227. package/dist/space/Item.js +1 -1
  228. package/dist/space/component.js +1 -1
  229. package/dist/space/index.js +1 -1
  230. package/dist/suffix-input/component.d.ts +1 -1
  231. package/dist/suffix-input/component.js +1 -1
  232. package/dist/suffix-input/index.js +1 -1
  233. package/dist/super-list-header/component.js +1 -1
  234. package/dist/super-list-header/index.js +1 -1
  235. package/dist/super-list-item/component.js +1 -1
  236. package/dist/super-list-item/index.js +1 -1
  237. package/dist/swiper-slide-721532bf.js +1 -0
  238. package/dist/switch/component.d.ts +6 -6
  239. package/dist/switch/component.js +1 -1
  240. package/dist/switch/index.js +1 -1
  241. package/dist/table/columns.js +1 -1
  242. package/dist/table/component.js +1 -1
  243. package/dist/table/components/cell/component.js +1 -1
  244. package/dist/table/components/cell/index.js +1 -1
  245. package/dist/table/components/cells/index.js +1 -1
  246. package/dist/table/components/empty-list/index.d.ts +1 -1
  247. package/dist/table/components/empty-list/index.js +1 -1
  248. package/dist/table/components/error/index.d.ts +1 -1
  249. package/dist/table/components/error/index.js +1 -1
  250. package/dist/table/components/pagination/index.js +1 -1
  251. package/dist/table/components/row/component.js +1 -1
  252. package/dist/table/components/row/index.js +1 -1
  253. package/dist/table/components/rows/index.js +1 -1
  254. package/dist/table/components/table-header/index.js +1 -1
  255. package/dist/table/hooks/use-table-data.js +1 -1
  256. package/dist/table/index.js +1 -1
  257. package/dist/table/table.d.ts +5 -4
  258. package/dist/table/table.js +1 -1
  259. package/dist/table/utils/add-query-param.js +1 -1
  260. package/dist/table/utils/get-query-from-url.js +1 -1
  261. package/dist/table/utils/index.d.ts +1 -1
  262. package/dist/table/utils/index.js +1 -1
  263. package/dist/table/utils/parse-query-params.js +1 -1
  264. package/dist/table/utils/query-adapter.js +1 -1
  265. package/dist/table/utils/remove-query-param.js +1 -1
  266. package/dist/table/utils/reset-query-param.js +1 -1
  267. package/dist/table-status/component.js +1 -1
  268. package/dist/table-status/index.js +1 -1
  269. package/dist/tag/component.js +1 -1
  270. package/dist/tag/index.js +1 -1
  271. package/dist/tags-list/component.js +1 -1
  272. package/dist/tags-list/index.js +1 -1
  273. package/dist/tariff-builder/component.js +1 -1
  274. package/dist/tariff-builder/index.js +1 -1
  275. package/dist/textarea/component.d.ts +2 -2
  276. package/dist/textarea/component.js +1 -1
  277. package/dist/textarea/index.js +1 -1
  278. package/dist/toast/component.js +1 -1
  279. package/dist/toast/index.js +1 -1
  280. package/dist/toast-notifier/component.js +1 -1
  281. package/dist/toast-notifier/index.js +1 -1
  282. package/dist/toast-plate/component.d.ts +4 -4
  283. package/dist/toast-plate/component.js +1 -1
  284. package/dist/toast-plate/index.js +1 -1
  285. package/dist/tooltip/component.js +1 -1
  286. package/dist/tooltip/index.js +1 -1
  287. package/dist/tslib.es6-159de9af.js +1 -0
  288. package/dist/typography/component.js +1 -1
  289. package/dist/typography/index.js +1 -1
  290. package/dist/typography/text/component.js +1 -1
  291. package/dist/typography/text/index.js +1 -1
  292. package/dist/typography/title/component.js +1 -1
  293. package/dist/typography/title/index.js +1 -1
  294. package/dist/typography/title-responsive/component.js +1 -1
  295. package/dist/typography/title-responsive/index.js +1 -1
  296. package/dist/{use-image-render-component-2055732d.d.ts → use-image-render-component-16a5ee12.d.ts} +0 -0
  297. package/dist/use-image-render-component-16a5ee12.js +1 -0
  298. package/dist/utils/get-currency-symbol/util.d.ts +2 -1
  299. package/dist/utils/index.js +1 -1
  300. package/dist/utils/show-toast/index.js +1 -1
  301. package/dist/with-suffix/component.d.ts +4 -35
  302. package/dist/with-suffix/component.js +1 -1
  303. package/dist/with-suffix/index.js +1 -1
  304. package/package.json +10 -5
  305. package/dist/tslib.es6-f5dc6c5d.js +0 -15
  306. package/dist/use-image-render-component-2055732d.js +0 -1
@@ -0,0 +1 @@
1
+ import e,{useContext as t,useRef as o,useEffect as r}from"react";import{GalleryContext as n}from"../../context.js";import{HeaderInfoBlock as m}from"../header-info-block/index.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../tslib.es6-159de9af.js";import"../../../typography/title/component.js";import"classnames";import"../../../colors.module-0dd2031b.js";import"../../../common.module-7ae3bde9.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../utils/split-filename.js";var i="index-module_header__597vy",p="index-module_buttons__ILnkB",l=function(){var l=t(n),s=l.fullScreen,a=l.getCurrentImage,c=l.onClose,u=o(null);r((function(){u.current&&u.current.focus()}),[s]);var d=a(),y=(null==d?void 0:d.name)||"";return e.createElement("div",{className:i},e.createElement(m,{filename:y}),e.createElement("div",{className:p},e.createElement("button",{type:"button",onClick:c},"close")))};export{l as Header};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type HeaderInfoBlockProps = {
3
+ filename: string;
4
+ };
5
+ declare const HeaderInfoBlock: ({ filename }: HeaderInfoBlockProps) => JSX.Element;
6
+ export { HeaderInfoBlockProps, HeaderInfoBlock };
@@ -0,0 +1 @@
1
+ import e from"react";import{Typography as t}from"../../../typography/component.js";import{splitFilename as o}from"../../utils/split-filename.js";import"../../../typography/title/index.js";import"../../../tslib.es6-159de9af.js";import"../../../typography/title/component.js";import"classnames";import"../../../colors.module-0dd2031b.js";import"../../../common.module-7ae3bde9.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";var m="index-module_info__I8Z23",r="index-module_filenameHead__urP7W",i="index-module_filenameContainer__v5Oht",a=function(a){var l=a.filename,n=o(l),p=n[0],s=n[1];return e.createElement("div",{className:m},e.createElement("div",{className:i},e.createElement(t.Title,{tag:"h1",className:r,view:"xsmall",color:"primary-inverted"},p),e.createElement(t.Title,{tag:"h1",view:"xsmall",color:"primary-inverted"},s)))};export{a as HeaderInfoBlock};
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { GalleryImage } from "../../types";
3
+ type Props = {
4
+ image: GalleryImage;
5
+ index: number;
6
+ active?: boolean;
7
+ onSelect: (index: number) => void;
8
+ className: string;
9
+ };
10
+ declare const ImagePreview: ({ image, active, index, onSelect, className, }: Props) => JSX.Element;
11
+ export { ImagePreview };
@@ -0,0 +1 @@
1
+ import e,{useContext as n,useRef as o}from"react";import a from"classnames";import{GalleryContext as r}from"../../context.js";var i={component:"index-module_component__G-klv",active:"index-module_active__sYdab",image:"index-module_image__pRMA3",preview:"index-module_preview__lNOn-",loading:"index-module_loading__sXhMu",brokenImageWrapper:"index-module_brokenImageWrapper__o6hzF",brokenIcon:"index-module_brokenIcon__1SVEH"},m=function(m){var t,l,c=m.image,d=m.active,_=void 0!==d&&d,s=m.index,p=m.onSelect,u=m.className,v=n(r).imagesMeta,g=o(null),b=v[s],k=Boolean(null==b?void 0:b.broken);return e.createElement("div",{className:a(i.component,(t={},t[i.active]=_,t),u),onClick:function(){p(s)},role:"button",onKeyDown:function(e){"Enter"===e.key&&p(s)},tabIndex:0,ref:g},k?e.createElement("div",{className:a(i.preview,i.brokenImageWrapper)},e.createElement("div",{className:i.brokenIcon})):e.createElement("div",{className:a(i.preview,i.image,(l={},l[i.broken]=k,l[i.loading]=!b,l)),style:{backgroundImage:"url("+c.src+")"}}))};export{m as ImagePreview};
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ declare const ImageViewer: FC;
3
+ export { ImageViewer };
@@ -0,0 +1 @@
1
+ import{a as e}from"../../../tslib.es6-159de9af.js";import t,{useContext as o,useRef as r,useCallback as i,useEffect as n,useMemo as s}from"react";import a from"classnames";import l,{EffectFade as c,A11y as m,Controller as d}from"swiper";import{S as p,a as u}from"../../../swiper-slide-721532bf.js";import{useFocus as f}from"../../../hooks/useFocus/index.js";import"../../../utils/get-service-error/index.js";import"../../../toast-notifier/component.js";import{GalleryContext as h}from"../../context.js";import{getImageAlt as v,getImageKey as g}from"../../utils/utils.js";import{TestIds as y}from"../../utils/constants.js";import{s as j,S as w}from"../../../slide-d1d9fca8.js";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"react-dom";import"../../../toast-plate/component.js";import"alpha-cli-icons";import"../../../button/component.js";import"react-merge-refs";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-0dd2031b.js";import"../../../common.module-7ae3bde9.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";l.use([c,m,d]);var S=function(){var l,c,m,d=o(h),S=d.singleSlide,E=d.images,b=d.imagesMeta,x=d.fullScreen,k=d.currentSlideIndex,I=d.initialSlide,N=d.onClose,T=d.getCurrentImage,C=d.setImageMeta,M=d.setCurrentSlideIndex,A=d.getSwiper,D=d.setSwiper,B=d.slidePrev,L=d.slideNext,P=r(null),R=r(null),_=f(P,"keyboard")[0],V=f(R,"keyboard")[0],F=A(),H=i((function(){var e;M(null!==(e=null==F?void 0:F.activeIndex)&&void 0!==e?e:I)}),[M,F,I]),K=function(e,t){var o=e.currentTarget,r=o.naturalWidth,i=o.naturalHeight;C({width:r,height:i},t)},O=function(e){C({width:0,height:0,broken:!0},e)},U=i((function(e){var t,o,r=e.target,i=(null===(t=P.current)||void 0===t?void 0:t.contains(r))||(null===(o=R.current)||void 0===o?void 0:o.contains(r)),n=Boolean(r.closest("."+j.placeholder));"IMG"===r.tagName||n||i||N()}),[N]);n((function(){!function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=this,o=(t.document||t.ownerDocument).querySelectorAll(e),r=0;o[r]&&o[r]!==t;)++r;return Boolean(o[r])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window)}),[]);var q=s((function(){var e;return{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},className:a(j.swiper,(e={},e[j.hidden]=x,e)),controller:{control:F},a11y:{slideRole:"img"},initialSlide:I,simulateTouch:!1,onSwiper:D,onSlideChange:H}}),[F,x,I,H,D]),z=!S&&!x,G=(null==F?void 0:F.width)||1,W=(null==F?void 0:F.height)||1,X=G/W,J=T();return t.createElement("div",{className:a(j.component,(l={},l[j.singleSlide]=S,l)),onClick:U},z&&t.createElement("div",{className:a(j.arrow,(c={},c[j.focused]=_,c)),onClick:function(){B()},role:"button",onKeyDown:function(e){"Enter"===e.key&&B()},tabIndex:0,ref:P,"aria-label":"Предыдущее изображение","data-test-id":y.PREV_SLIDE_BUTTON},">"),x&&t.createElement("img",{src:null==J?void 0:J.src,alt:J?v(J,k):"",className:j.fullScreenImage}),t.createElement(p,e({},q),E.map((function(e,o){var r=b[o],i=((null==r?void 0:r.width)||1)/((null==r?void 0:r.height)||1),n=o===k;return t.createElement(u,{key:g(e,o),style:{pointerEvents:n?"auto":"none",transitionProperty:"opacity"}},(function(s){var a=s.isActive;return t.createElement(w,{isActive:a,swiperAspectRatio:X,image:e,swiperHeight:W,meta:r,index:o,imageAspectRatio:i,slideVisible:n,handleLoad:K,handleLoadError:O})}))}))),z&&t.createElement("div",{className:a(j.arrow,(m={},m[j.focused]=V,m)),onClick:function(){L()},role:"button",onKeyDown:function(e){"Enter"===e.key&&L()},tabIndex:0,ref:R,"aria-label":"Следующее изображение","data-test-id":y.NEXT_SLIDE_BUTTON},"<"))};export{S as ImageViewer};
@@ -0,0 +1 @@
1
+ import"react";import"classnames";import"../../../typography/component.js";import"../../utils/utils.js";import"../../utils/constants.js";export{S as Slide}from"../../../slide-d1d9fca8.js";import"../../../typography/title/index.js";import"../../../tslib.es6-159de9af.js";import"../../../typography/title/component.js";import"../../../colors.module-0dd2031b.js";import"../../../common.module-7ae3bde9.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";
@@ -0,0 +1,4 @@
1
+ export * from "./navigation-bar/index";
2
+ export * from "./header/index";
3
+ export * from "./image-preview/index";
4
+ export * from "./image-viewer/index";
@@ -0,0 +1 @@
1
+ export{NavigationBar}from"./navigation-bar/index.js";export{Header}from"./header/index.js";export{ImagePreview}from"./image-preview/index.js";export{ImageViewer}from"./image-viewer/index.js";import"react";import"../context.js";import"../utils/utils.js";import"../utils/constants.js";import"classnames";import"./header-info-block/index.js";import"../../typography/component.js";import"../../typography/title/index.js";import"../../tslib.es6-159de9af.js";import"../../typography/title/component.js";import"../../colors.module-0dd2031b.js";import"../../common.module-7ae3bde9.js";import"../../typography/text/component.js";import"../../typography/title-responsive/component.js";import"../utils/split-filename.js";import"swiper";import"../../swiper-slide-721532bf.js";import"../../hooks/useFocus/index.js";import"../../utils/get-service-error/index.js";import"../../utils/get-service-error/is-axios-error.js";import"../../utils/get-service-error/is-network-error.js";import"../../toast-notifier/component.js";import"react-dom";import"../../toast-plate/component.js";import"alpha-cli-icons";import"../../button/component.js";import"react-merge-refs";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";import"../../slide-d1d9fca8.js";
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const NavigationBar: () => JSX.Element;
3
+ export { NavigationBar };
@@ -0,0 +1 @@
1
+ import e,{useRef as t,useContext as r,useCallback as n,useEffect as i}from"react";import{GalleryContext as o}from"../../context.js";import{getImageKey as c}from"../../utils/utils.js";import{TestIds as l}from"../../utils/constants.js";import{ImagePreview as u}from"../image-preview/index.js";import"classnames";var s="index-module_component__4GgoO",a="index-module_preview__DT1yO",m=function(){var m=t(null),f=r(o),d=f.images,p=f.currentSlideIndex,g=f.setCurrentSlideIndex,v=(0,f.getSwiper)(),x=function(e){g(e),v&&v.slideTo(e)},w=n((function(e){m.current&&m.current.scroll({top:0,left:m.current.scrollLeft+e,behavior:"smooth"})}),[]),_=n((function(e,t){var r=e.getBoundingClientRect(),n=r.right,i=r.left;if(n>t)w(n-t+24);else if(i<0){w(i-24)}}),[w]);return i((function(){if(m.current){var e=m.current.getBoundingClientRect().width,t=m.current.children[p];t&&_(t,e)}}),[p,_,w]),e.createElement("div",{className:s,ref:m,onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&e.preventDefault()},"data-test-id":l.NAVIGATION_BAR},d.map((function(t,r){var n=r===p;return e.createElement(u,{key:c(t,r),image:t,active:n,index:r,onSelect:x,className:a})})))};export{m as NavigationBar};
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import SwiperCore from 'swiper';
3
+ import { GalleryImage, ImageMeta } from "./types";
4
+ type GalleryContext = {
5
+ singleSlide: boolean;
6
+ currentSlideIndex: number;
7
+ images: GalleryImage[];
8
+ imagesMeta: ImageMeta[];
9
+ fullScreen: boolean;
10
+ initialSlide: number;
11
+ setFullScreen: (fullScreen: boolean) => void;
12
+ setImageMeta: (meta: ImageMeta, index: number) => void;
13
+ slideTo: (index: number) => void;
14
+ slideNext: () => void;
15
+ slidePrev: () => void;
16
+ getSwiper: () => SwiperCore | undefined;
17
+ setSwiper: (swiper: SwiperCore) => void;
18
+ onClose: () => void;
19
+ setCurrentSlideIndex: (index: number) => void;
20
+ getCurrentImage: () => GalleryImage | undefined;
21
+ getCurrentImageMeta: () => ImageMeta | undefined;
22
+ };
23
+ declare const GalleryContext: import("react").Context<GalleryContext>;
24
+ export { GalleryContext };
@@ -0,0 +1 @@
1
+ import{createContext as e}from"react";var t=function(){},r=e({singleSlide:!1,currentSlideIndex:0,images:[],imagesMeta:[],fullScreen:!1,initialSlide:0,setFullScreen:t,setImageMeta:t,slideTo:t,slideNext:t,slidePrev:t,getSwiper:t,setSwiper:t,onClose:t,setCurrentSlideIndex:t,getCurrentImage:t,getCurrentImageMeta:t});export{r as GalleryContext};
@@ -0,0 +1,2 @@
1
+ export * from "./component";
2
+ export * from "./utils/index";
@@ -0,0 +1 @@
1
+ export{ImageGallery}from"./component.js";export{splitFilename}from"./utils/split-filename.js";export{PLACEHOLDER_HEIGHT,PLACEHOLDER_WIDTH,getImageAlt,getImageKey,isSmallImage}from"./utils/utils.js";export{TestIds}from"./utils/constants.js";import"react";import"./components/navigation-bar/index.js";import"./context.js";import"./components/image-preview/index.js";import"classnames";import"./components/header/index.js";import"./components/header-info-block/index.js";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-159de9af.js";import"../typography/title/component.js";import"../colors.module-0dd2031b.js";import"../common.module-7ae3bde9.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"./components/image-viewer/index.js";import"swiper";import"../swiper-slide-721532bf.js";import"../hooks/useFocus/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"alpha-cli-icons";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../slide-d1d9fca8.js";
@@ -0,0 +1,13 @@
1
+ type GalleryImage = {
2
+ src: string;
3
+ name?: string;
4
+ previewSrc?: string;
5
+ alt?: string;
6
+ canDownload?: boolean;
7
+ };
8
+ type ImageMeta = {
9
+ width: number;
10
+ height: number;
11
+ broken?: boolean;
12
+ };
13
+ export { GalleryImage, ImageMeta };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,11 @@
1
+ declare const TestIds: {
2
+ ACTIVE_IMAGE: string;
3
+ PREV_SLIDE_BUTTON: string;
4
+ NEXT_SLIDE_BUTTON: string;
5
+ CLOSE_BUTTON: string;
6
+ FULLSCREEN_BUTTON: string;
7
+ EXIT_FULLSCREEN_BUTTON: string;
8
+ DOWNLOAD_BUTTON: string;
9
+ NAVIGATION_BAR: string;
10
+ };
11
+ export { TestIds };
@@ -0,0 +1 @@
1
+ var t={ACTIVE_IMAGE:"active-image",PREV_SLIDE_BUTTON:"prev-slide-button",NEXT_SLIDE_BUTTON:"next-slide-button",CLOSE_BUTTON:"close-button",FULLSCREEN_BUTTON:"fullscreen-button",EXIT_FULLSCREEN_BUTTON:"exit-fullscreen-button",DOWNLOAD_BUTTON:"download-button",NAVIGATION_BAR:"navigation-bar"};export{t as TestIds};
@@ -0,0 +1,3 @@
1
+ export * from "./split-filename";
2
+ export * from "./utils";
3
+ export * from "./constants";
@@ -0,0 +1 @@
1
+ export{splitFilename}from"./split-filename.js";export{PLACEHOLDER_HEIGHT,PLACEHOLDER_WIDTH,getImageAlt,getImageKey,isSmallImage}from"./utils.js";export{TestIds}from"./constants.js";
@@ -0,0 +1,2 @@
1
+ declare function splitFilename(filename: string): [string, string];
2
+ export { splitFilename };
@@ -0,0 +1 @@
1
+ function e(e){var n=e.lastIndexOf("."),r=e,t="",c=n-3;return c>0&&(r=e.slice(0,c),t=e.slice(c)),[r,t]}export{e as splitFilename};
@@ -0,0 +1,7 @@
1
+ import { GalleryImage, ImageMeta } from "../types";
2
+ declare const PLACEHOLDER_WIDTH = 400;
3
+ declare const PLACEHOLDER_HEIGHT = 300;
4
+ declare const getImageKey: ({ name, src }: GalleryImage, index: number) => string;
5
+ declare const getImageAlt: ({ alt, name }: GalleryImage, index: number) => string;
6
+ declare const isSmallImage: (meta?: ImageMeta | undefined) => boolean;
7
+ export { PLACEHOLDER_WIDTH, PLACEHOLDER_HEIGHT, getImageKey, getImageAlt, isSmallImage };
@@ -0,0 +1 @@
1
+ var n=400,r=300,t=function(n,r){var t=n.name;return(void 0===t?"":t)+"-"+r+"-"+n.src},e=function(n,r){var t=n.alt,e=n.name;return t||e||"Изображение "+(r+1)},a=function(n){return!!n&&(n.width<400&&n.height<300)};export{r as PLACEHOLDER_HEIGHT,n as PLACEHOLDER_WIDTH,e as getImageAlt,t as getImageKey,a as isSmallImage};
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { AxiosPromise } from 'axios';
4
+ type Props = {
5
+ title: string;
6
+ subtitle?: string;
7
+ value: string[];
8
+ multiple: boolean;
9
+ main?: string;
10
+ type: string;
11
+ columns?: number;
12
+ error?: string;
13
+ className?: string;
14
+ uploadRequest: (params: any) => AxiosPromise<{
15
+ url: string;
16
+ }>;
17
+ onUpdate: (photos: string[]) => void;
18
+ setMain?: (photo: string) => void;
19
+ };
20
+ declare const ImageUploader: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
21
+ export { ImageUploader };
@@ -0,0 +1 @@
1
+ import{b as e}from"../tslib.es6-159de9af.js";import t,{forwardRef as o,useState as i,useRef as r}from"react";import{PlusS as n,HeartStrokeM as m,LoupeM as s,TrashM as a}from"alpha-cli-icons";import{FlexColumns as l}from"../flex-columns/component.js";import{IconButton as p}from"../icon-button/component.js";import{Image as c}from"../image/component.js";import"../image/typings.js";import"../image/constants.js";import{ImageGallery as u}from"../image-gallery/component.js";import{Padding as d}from"../padding/component.js";import{SuperListHeader as g}from"../super-list-header/component.js";import{Typography as f}from"../typography/component.js";import{getServiceError as j}from"../utils/get-service-error/index.js";import{showError as v}from"../utils/show-toast/index.js";import"classnames";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../skeleton/component.js";import"../use-image-render-component-16a5ee12.js";import"../spinner/component.js";import"../image/utils.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-0dd2031b.js";import"../common.module-7ae3bde9.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"swiper";import"../swiper-slide-721532bf.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../toast-notifier/use-timer.js";import"../slide-d1d9fca8.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";var y="index-module_image__5DvrD",x="index-module_icon__Xtgbu",h="index-module_controls__XUF4X",w="index-module_main__ZMTqM",E=o((function(o,E){var b=o.value,_=void 0===b?[]:b,k=o.title,N=o.subtitle,C=o.columns,z=void 0===C?3:C,M=o.onUpdate,D=o.uploadRequest,F=o.setMain,T=o.type,X=o.main,q=o.multiple,A=o.error,S=o.className,U=i(!1),I=U[0],R=U[1],Z=i(),B=Z[0];Z[1];var G=i(!1),H=G[0],J=G[1],K=r(null),L=function(t){var o=t.target.files&&t.target.files[0];if(o){var i=new FormData;i.append("file",o),i.append("type",T),J(!0),D({data:i}).then((function(t){var o=t.data.url;M(q?e(e([],_),[o]):[o])})).catch((function(e){var t=j(e).message;v(t)})).finally((function(){return J(!1)}))}};return t.createElement("div",{className:S},t.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:E,onChange:L,multiple:q}),t.createElement("input",{type:"file",style:{height:0,position:"absolute"},ref:K,onChange:L,multiple:q}),t.createElement(g,{text:k,leftAddons:t.createElement(p,{onClick:function(){var e;return null===(e=K.current)||void 0===e?void 0:e.click()},icon:n,loading:H})}),N&&t.createElement(f.Text,{view:"primary-small",color:"secondary",weight:"medium"},N),t.createElement(d,{padding:"4px 0"},A&&t.createElement(f.Text,{view:"caps",color:"negative",weight:"medium"},A)),t.createElement(l,{columns:z},_.map((function(e){return t.createElement(c,{className:y,src:e,size:"l",view:"default"},t.createElement("div",{className:h},!!F&&X!==e&&t.createElement(p,{onClick:function(){return F(e)},icon:m,size:"m",view:"secondary",className:x}),t.createElement(p,{onClick:function(){R(!0)},icon:s,size:"m",view:"secondary",className:x}),t.createElement(p,{onClick:function(){return t=e,void M(_.filter((function(e){return e!==t})));var t},icon:a,size:"m",view:"secondary",className:x})),X===e&&t.createElement("div",{className:w},"MAIN"))}))),t.createElement(u,{initialSlide:B,onClose:function(){return R(!1)},open:I,images:_.map((function(e){return{src:e,previewSrc:e}}))}))}));export{E as ImageUploader};
@@ -0,0 +1 @@
1
+ export * from "./component";
@@ -0,0 +1 @@
1
+ export{ImageUploader}from"./component.js";import"../tslib.es6-159de9af.js";import"react";import"alpha-cli-icons";import"../flex-columns/component.js";import"classnames";import"../icon-button/component.js";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../image/component.js";import"../skeleton/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-0dd2031b.js";import"../common.module-7ae3bde9.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"../use-image-render-component-16a5ee12.js";import"../spinner/component.js";import"../image/typings.js";import"../image/constants.js";import"../image/utils.js";import"../image-gallery/component.js";import"../image-gallery/components/navigation-bar/index.js";import"../image-gallery/context.js";import"../image-gallery/utils/utils.js";import"../image-gallery/utils/constants.js";import"../image-gallery/components/image-preview/index.js";import"../image-gallery/components/header/index.js";import"../image-gallery/components/header-info-block/index.js";import"../image-gallery/utils/split-filename.js";import"../image-gallery/components/image-viewer/index.js";import"swiper";import"../swiper-slide-721532bf.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"../toast-notifier/use-timer.js";import"../slide-d1d9fca8.js";import"../padding/component.js";import"../super-list-header/component.js";import"../utils/show-toast/index.js";
@@ -1,4 +1,4 @@
1
- import{c as e}from"./_commonjsHelpers-d789a53e.js";
1
+ import{c as e}from"./_commonjsHelpers-2ca36f93.js";
2
2
  /** @license React v16.13.1
3
3
  * react-is.production.min.js
4
4
  *