@alphakits/ui 1.28.16 → 1.28.18

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 (166) hide show
  1. package/dist/amount/component.js +1 -1
  2. package/dist/amount/index.js +1 -1
  3. package/dist/amount-input/component.js +1 -1
  4. package/dist/avatar/component.js +1 -1
  5. package/dist/avatar/index.js +1 -1
  6. package/dist/base-card/component.js +1 -1
  7. package/dist/base-card/index.js +1 -1
  8. package/dist/calendar/component.js +1 -1
  9. package/dist/calendar/components/days-table/component.js +1 -1
  10. package/dist/calendar/components/days-table/index.js +1 -1
  11. package/dist/calendar/components/header/index.js +1 -1
  12. package/dist/calendar/components/header//321/201omponent.js +1 -1
  13. package/dist/calendar/components/months-table/index.js +1 -1
  14. package/dist/calendar/components/months-table//321/201omponent.js +1 -1
  15. package/dist/calendar/index.js +1 -1
  16. package/dist/calendar-input/component.js +1 -1
  17. package/dist/calendar-input/index.js +1 -1
  18. package/dist/{capitalize-36c52c1b.js → capitalize-f60bd005.js} +1 -1
  19. package/dist/card/component.js +1 -1
  20. package/dist/card/images/index.js +1 -1
  21. package/dist/card/index.js +1 -1
  22. package/dist/cell/base/component.js +1 -1
  23. package/dist/cell/component.js +1 -1
  24. package/dist/cell/index.js +1 -1
  25. package/dist/checkbox-group/component.js +1 -1
  26. package/dist/checkbox-group/index.js +1 -1
  27. package/dist/checkbox-lists/component.js +1 -1
  28. package/dist/checkbox-lists/index.js +1 -1
  29. package/dist/collapsable-row/addons.js +1 -1
  30. package/dist/collapsable-row/component.js +1 -1
  31. package/dist/collapsable-row/index.js +1 -1
  32. package/dist/collapse/component.js +1 -1
  33. package/dist/collapse/index.js +1 -1
  34. package/dist/copy-button/component.js +1 -1
  35. package/dist/copy-button/index.js +1 -1
  36. package/dist/date/component.js +1 -1
  37. package/dist/date/index.js +1 -1
  38. package/dist/date-switcher/component.js +1 -1
  39. package/dist/date-switcher/index.js +1 -1
  40. package/dist/empty-page/component.js +1 -1
  41. package/dist/empty-page/index.js +1 -1
  42. package/dist/footer/component.js +1 -1
  43. package/dist/footer/contact-block.js +1 -1
  44. package/dist/footer/index.js +1 -1
  45. package/dist/form/component.js +1 -1
  46. package/dist/form/index.js +1 -1
  47. package/dist/form/templates/filters-form/index.js +1 -1
  48. package/dist/form/templates/rest-form/form.js +1 -1
  49. package/dist/form/templates/rest-form/index.js +1 -1
  50. package/dist/grid/col/component.js +1 -1
  51. package/dist/grid/col/index.js +1 -1
  52. package/dist/grid/component.js +1 -1
  53. package/dist/grid/index.js +1 -1
  54. package/dist/grid/row/component.js +1 -1
  55. package/dist/grid/row/index.js +1 -1
  56. package/dist/image/component.js +1 -1
  57. package/dist/image/image-base.js +1 -1
  58. package/dist/image/index.js +1 -1
  59. package/dist/image/use-image-render-component.js +1 -1
  60. package/dist/image-gallery/component.d.ts +7 -20
  61. package/dist/image-gallery/component.js +1 -1
  62. package/dist/image-gallery/index.d.ts +0 -1
  63. package/dist/image-gallery/index.js +1 -1
  64. package/dist/image-uploader/component.js +1 -1
  65. package/dist/image-uploader/index.js +1 -1
  66. package/dist/index.css +1 -1
  67. package/dist/info-block-header/component.js +1 -1
  68. package/dist/info-block-header/index.js +1 -1
  69. package/dist/info-block-item/component.js +1 -1
  70. package/dist/info-block-item/index.js +1 -1
  71. package/dist/list-allert/component.js +1 -1
  72. package/dist/list-allert/index.js +1 -1
  73. package/dist/menu/component.js +1 -1
  74. package/dist/menu/components/content-header/index.js +1 -1
  75. package/dist/menu/components/index.js +1 -1
  76. package/dist/menu/components/menu-avatar/index.js +1 -1
  77. package/dist/menu/components/menu-button/index.js +1 -1
  78. package/dist/menu/components/menu-buttons-list/index.js +1 -1
  79. package/dist/menu/components/user-button/index.js +1 -1
  80. package/dist/menu/index.js +1 -1
  81. package/dist/message/component.js +1 -1
  82. package/dist/message/index.js +1 -1
  83. package/dist/page-with-controls/component.js +1 -1
  84. package/dist/page-with-controls/index.js +1 -1
  85. package/dist/picker-button/common/index.js +1 -1
  86. package/dist/picker-button/common/labeled-button/index.js +1 -1
  87. package/dist/picker-button/index.js +1 -1
  88. package/dist/progress-bar/component.js +1 -1
  89. package/dist/progress-bar/index.js +1 -1
  90. package/dist/progress-index/component.js +1 -1
  91. package/dist/progress-index/index.js +1 -1
  92. package/dist/radio-group/component.js +1 -1
  93. package/dist/radio-group/index.js +1 -1
  94. package/dist/radio-groups/component.js +1 -1
  95. package/dist/radio-groups/index.js +1 -1
  96. package/dist/sidepanel/component.js +1 -1
  97. package/dist/sidepanel/index.js +1 -1
  98. package/dist/sidepanel-header/component.js +1 -1
  99. package/dist/sidepanel-header/index.js +1 -1
  100. package/dist/stepped-progress-bar/components/step-bar.js +1 -1
  101. package/dist/stepped-progress-bar/index.d.ts +1 -1
  102. package/dist/stepped-progress-bar/index.js +1 -1
  103. package/dist/super-list-header/component.js +1 -1
  104. package/dist/super-list-header/index.js +1 -1
  105. package/dist/super-list-item/component.js +1 -1
  106. package/dist/super-list-item/index.js +1 -1
  107. package/dist/table/component.js +1 -1
  108. package/dist/table/components/cell/component.js +1 -1
  109. package/dist/table/components/cell/index.js +1 -1
  110. package/dist/table/components/cells/index.js +1 -1
  111. package/dist/table/components/empty-list/index.js +1 -1
  112. package/dist/table/components/error/index.js +1 -1
  113. package/dist/table/components/loading/index.js +1 -1
  114. package/dist/table/components/pagination/index.js +1 -1
  115. package/dist/table/index.js +1 -1
  116. package/dist/table/table.js +1 -1
  117. package/dist/table/utils/prepare-rows.js +1 -1
  118. package/dist/table-status/component.js +1 -1
  119. package/dist/table-status/index.js +1 -1
  120. package/dist/tag/component.js +1 -1
  121. package/dist/tag/index.js +1 -1
  122. package/dist/tags-list/component.js +1 -1
  123. package/dist/tags-list/index.js +1 -1
  124. package/dist/typography/component.js +1 -1
  125. package/dist/typography/index.js +1 -1
  126. package/dist/typography/text/component.js +1 -1
  127. package/dist/typography/text/index.js +1 -1
  128. package/dist/typography/title/component.js +1 -1
  129. package/dist/typography/title/index.js +1 -1
  130. package/package.json +3 -3
  131. package/dist/image-gallery/components/header/index.d.ts +0 -3
  132. package/dist/image-gallery/components/header/index.js +0 -1
  133. package/dist/image-gallery/components/header-info-block/index.d.ts +0 -6
  134. package/dist/image-gallery/components/header-info-block/index.js +0 -1
  135. package/dist/image-gallery/components/image-preview/index.d.ts +0 -11
  136. package/dist/image-gallery/components/image-preview/index.js +0 -1
  137. package/dist/image-gallery/components/image-viewer/index.d.ts +0 -3
  138. package/dist/image-gallery/components/image-viewer/index.js +0 -1
  139. package/dist/image-gallery/components/image-viewer/slide.d.ts +0 -0
  140. package/dist/image-gallery/components/image-viewer/slide.js +0 -1
  141. package/dist/image-gallery/components/index.d.ts +0 -4
  142. package/dist/image-gallery/components/index.js +0 -1
  143. package/dist/image-gallery/components/navigation-bar/index.d.ts +0 -3
  144. package/dist/image-gallery/components/navigation-bar/index.js +0 -1
  145. package/dist/image-gallery/context.d.ts +0 -24
  146. package/dist/image-gallery/context.js +0 -1
  147. package/dist/image-gallery/utils/constants.d.ts +0 -11
  148. package/dist/image-gallery/utils/constants.js +0 -1
  149. package/dist/image-gallery/utils/index.d.ts +0 -3
  150. package/dist/image-gallery/utils/index.js +0 -1
  151. package/dist/image-gallery/utils/split-filename.d.ts +0 -2
  152. package/dist/image-gallery/utils/split-filename.js +0 -1
  153. package/dist/image-gallery/utils/utils.d.ts +0 -7
  154. package/dist/image-gallery/utils/utils.js +0 -1
  155. package/dist/slide-0b7e7a0e.d.ts +0 -16
  156. package/dist/slide-0b7e7a0e.js +0 -1
  157. package/dist/swiper-slide-bbb6e4ca.js +0 -1
  158. /package/dist/{colors.module-a741bb58.js → colors.module-0973a462.js} +0 -0
  159. /package/dist/{contact-block-15005ed2.d.ts → contact-block-ac155593.d.ts} +0 -0
  160. /package/dist/{contact-block-15005ed2.js → contact-block-ac155593.js} +0 -0
  161. /package/dist/{gutters.module-06c357d0.js → gutters.module-b8a020a7.js} +0 -0
  162. /package/dist/{isSymbol-a4a3d610.js → isSymbol-b280e819.js} +0 -0
  163. /package/dist/{step-bar-e765c98d.d.ts → step-bar-3fb3d392.d.ts} +0 -0
  164. /package/dist/{step-bar-e765c98d.js → step-bar-3fb3d392.js} +0 -0
  165. /package/dist/{use-image-render-component-780ff0f7.d.ts → use-image-render-component-9754b331.d.ts} +0 -0
  166. /package/dist/{use-image-render-component-780ff0f7.js → use-image-render-component-9754b331.js} +0 -0
@@ -1 +1 @@
1
- import e,{useCallback as t,useEffect as o,useMemo as r}from"react";import i from"classnames";import{Cells as a}from"./components/cells/index.js";import{EmptyList as n}from"./components/empty-list/index.js";import{Error as s}from"./components/error/index.js";import{Loading as l}from"./components/loading/index.js";import{Pagination as m}from"./components/pagination/index.js";import{TableHeader as p}from"./components/table-header/index.js";import{useTableData as c}from"./hooks/use-table-data.js";import{addQueryParam as d}from"./utils/add-query-param.js";import{getTags as u}from"./utils/get-tags.js";import{prepareRows as g}from"./utils/prepare-rows.js";import{removeQueryParam as f}from"./utils/remove-query-param.js";import{resetQueryParam as h}from"./utils/reset-query-param.js";import"@alphakits/icons/dist/ChevronForwardS";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";import"./languages/index.js";import"./components/cell/component.js";import"../cell/component.js";import"../cell/base/component.js";import"../__internal/utils/getDataTestId.js";import"../hooks/useFocus/index.js";import"../cell/pure/component.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"@alphakits/icons/dist/ControllerS";import"@alphakits/icons/dist/PlusS";import"rooks";import"../flex/component.js";import"../header-search/component.js";import"@alphakits/icons/dist/CloseS";import"@alphakits/icons/dist/SearchM";import"query-string";import"./utils/get-query-from-url.js";import"./utils/parse-query-params.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/is-object.js";import"./utils/set-query-to-url.js";import"@alphakits/icons/dist/PhotoM";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-780ff0f7.js";import"@alphakits/icons/dist/PhotoS";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";var j={table_wrapper:"index-module_table_wrapper__SeB5n",table:"index-module_table__9sbda",fill:"index-module_fill__Q-icF",clickable:"index-module_clickable__k4S8g"};function b(b){var k=b.columns,y=b.searchPlaceholder,v=void 0===y?"Поиск по таблице":y,x=b.records,_=b.hideSearch,C=b.rightHeaderAddons,P=b.leftHeaderAddons,E=b.filtersButtonLabel,S=b.createButtonLabel,w=b.loading,B=b.height,q=void 0===B?"fill":B,F=b.tagsBuilder,L=b.promise,A=b.onRowClick,H=b.onCreateClick,D=b.onFiltersClick,N=b.refetch,T=b.language,M=c({promise:L,records:x}),z=M.loading,I=M.error,Q=M.data,R=M.total,V=M.params,G=M.pagesCount,J=M.updateData,K=H?function(){return H(J)}:void 0,O=t((function(e){h(e),J()}),[]);o((function(){J()}),[]);var U=function(){return D?D({submitCallback:function(e){return O(e)},initialValues:V}):null},W=function(e){d(e),J()},X=u({params:(null==V?void 0:V.where)||{},onDelete:function(e,t){f(e,t),J()},tagsBuilder:F,onClick:U}),Y=r((function(){return g({columns:k,data:Q,refetch:N||J})}),[Q,k]),Z=z||w;return e.createElement("div",{className:i(j.table_wrapper,j[q])},(!_||C||P||H||D)&&e.createElement(p,{language:T,hideSearch:_,rightHeaderAddons:C,leftHeaderAddons:P,searchText:(null==V?void 0:V.searchText)||"",addParam:W,searchPlaceholder:v,filtersButtonLabel:E,tags:X,onCreateClick:K,createButtonLabel:S,onFiltersClick:U,showFiltersButton:!!D}),e.createElement("div",{className:j.table},e.createElement("table",{cellSpacing:"0",cellPadding:"0"},e.createElement(a,{sort:null==V?void 0:V.sort,order:null==V?void 0:V.order,addParam:W,columns:k}),e.createElement("tbody",null,I&&e.createElement(s,{language:T}),!Y.length&&!Z&&!I&&e.createElement(n,{language:T}),Z&&e.createElement(l,{columnsLength:k.length}),Y.map((function(t){var o,r=t.row,a=t.cells;return e.createElement("tr",{onClick:function(){return e=r,null==A?void 0:A(e,J);var e},className:i((o={},o[j.clickable]=!!A,o)),style:{visibility:Z?"collapse":"visible"}},a.map((function(e){return e})))}))))),!!L&&e.createElement(m,{language:T,currentPage:V?+V.page:1,recordsPerPage:V?+V.limit:10,pagesCount:+G,addParam:W,total:+R}))}export{b as Table};
1
+ import e,{useCallback as t,useEffect as o,useMemo as r}from"react";import i from"classnames";import{Cells as a}from"./components/cells/index.js";import{EmptyList as n}from"./components/empty-list/index.js";import{Error as s}from"./components/error/index.js";import{Loading as l}from"./components/loading/index.js";import{Pagination as m}from"./components/pagination/index.js";import{TableHeader as p}from"./components/table-header/index.js";import{useTableData as c}from"./hooks/use-table-data.js";import{addQueryParam as d}from"./utils/add-query-param.js";import{getTags as u}from"./utils/get-tags.js";import{prepareRows as g}from"./utils/prepare-rows.js";import{removeQueryParam as h}from"./utils/remove-query-param.js";import{resetQueryParam as j}from"./utils/reset-query-param.js";import"@alphakits/icons/dist/ChevronForwardS";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";import"./languages/index.js";import"./components/cell/component.js";import"../cell/component.js";import"../cell/base/component.js";import"../__internal/utils/getDataTestId.js";import"../hooks/useFocus/index.js";import"../cell/pure/component.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"@alphakits/icons/dist/ControllerS";import"@alphakits/icons/dist/PlusS";import"rooks";import"../flex/component.js";import"../header-search/component.js";import"@alphakits/icons/dist/CloseS";import"@alphakits/icons/dist/SearchM";import"query-string";import"./utils/get-query-from-url.js";import"./utils/parse-query-params.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/is-object.js";import"./utils/set-query-to-url.js";import"@alphakits/icons/dist/PhotoM";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-9754b331.js";import"@alphakits/icons/dist/PhotoS";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";var f={table_wrapper:"index-module_table_wrapper__SeB5n",table:"index-module_table__9sbda",fill:"index-module_fill__Q-icF",clickable:"index-module_clickable__k4S8g"};function b(b){var k=b.columns,y=b.searchPlaceholder,v=void 0===y?"Поиск по таблице":y,x=b.records,_=b.hideSearch,C=b.rightHeaderAddons,P=b.leftHeaderAddons,E=b.filtersButtonLabel,S=b.createButtonLabel,w=b.loading,B=b.height,q=void 0===B?"fill":B,F=b.tagsBuilder,L=b.promise,A=b.onRowClick,H=b.onCreateClick,D=b.onFiltersClick,N=b.refetch,T=b.language,M=c({promise:L,records:x}),z=M.loading,I=M.error,Q=M.data,R=M.total,V=M.params,G=M.pagesCount,J=M.updateData,K=H?function(){return H(J)}:void 0,O=t((function(e){j(e),J()}),[]);o((function(){J()}),[]);var U=function(){return D?D({submitCallback:function(e){return O(e)},initialValues:V}):null},W=function(e){d(e),J()},X=u({params:(null==V?void 0:V.where)||{},onDelete:function(e,t){h(e,t),J()},tagsBuilder:F,onClick:U}),Y=r((function(){return g({columns:k,data:Q,refetch:N||J})}),[Q,k]),Z=z||w;return e.createElement("div",{className:i(f.table_wrapper,f[q])},(!_||C||P||H||D)&&e.createElement(p,{language:T,hideSearch:_,rightHeaderAddons:C,leftHeaderAddons:P,searchText:(null==V?void 0:V.searchText)||"",addParam:W,searchPlaceholder:v,filtersButtonLabel:E,tags:X,onCreateClick:K,createButtonLabel:S,onFiltersClick:U,showFiltersButton:!!D}),e.createElement("div",{className:f.table},e.createElement("table",{cellSpacing:"0",cellPadding:"0"},e.createElement(a,{sort:null==V?void 0:V.sort,order:null==V?void 0:V.order,addParam:W,columns:k}),e.createElement("tbody",null,I&&e.createElement(s,{language:T}),!Y.length&&!Z&&!I&&e.createElement(n,{language:T}),Z&&e.createElement(l,{columnsLength:k.length}),Y.map((function(t){var o,r=t.row,a=t.cells;return e.createElement("tr",{onClick:function(){return e=r,null==A?void 0:A(e,J);var e},className:i((o={},o[f.clickable]=!!A,o)),style:{visibility:Z?"collapse":"visible"}},a.map((function(e){return e})))}))))),!!L&&e.createElement(m,{language:T,currentPage:V?+V.page:1,recordsPerPage:V?+V.limit:10,pagesCount:+G,addParam:W,total:+R}))}export{b as Table};
@@ -1 +1 @@
1
- import o from"react";import t from"@alphakits/icons/dist/PhotoM";import{Image as e}from"../../image/component.js";import{TableCell as i}from"../components/cell/component.js";import"classnames";import"../../skeleton/component.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-a741bb58.js";import"../../typography/title/index.js";import"tslib";import"../../typography/title/component.js";import"../../use-image-render-component-780ff0f7.js";import"@alphakits/icons/dist/PhotoS";import"../../spinner/component.js";import"../../image/types.js";import"../../image/utils.js";import"../../cell/component.js";import"../../cell/base/component.js";import"../../__internal/utils/getDataTestId.js";import"../../hooks/useFocus/index.js";import"../../cell/pure/component.js";function n(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function r(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function l(l){var s=l.columns,m=l.data,p=l.refetch,c=m.map((function(l){return{row:l,cells:s.map((function(s){var m,c,u,a,d,v,f,g,j,w,y=r((null===(m=s.row)||void 0===m?void 0:m.title)||s.accessor,l,p);if(null===(c=s.row)||void 0===c?void 0:c.image){var h=n(null===(u=s.row)||void 0===u?void 0:u.image,l,p);w=h?o.createElement(e,{bgColor:"secondary",src:h,text:null==y?void 0:y.toString(),view:"ellipse"}):o.createElement(e,{bgColor:"secondary",icon:o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else if(null===(a=s.row)||void 0===a?void 0:a.icon){var b=n(null===(d=s.row)||void 0===d?void 0:d.icon,l,p);w=o.createElement(e,{icon:b||o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else(null===(v=s.row)||void 0===v?void 0:v.customAddon)&&(w=n(null===(f=s.row)||void 0===f?void 0:f.customAddon,l,p));return o.createElement(i,{title:y,align:s.align,subtitle:(null===(g=s.row)||void 0===g?void 0:g.subtitle)&&r(null===(j=s.row)||void 0===j?void 0:j.subtitle,l,p),addon:w})}))}}));return c}export{l as prepareRows};
1
+ import o from"react";import t from"@alphakits/icons/dist/PhotoM";import{Image as e}from"../../image/component.js";import{TableCell as i}from"../components/cell/component.js";import"classnames";import"../../skeleton/component.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-0973a462.js";import"../../typography/title/index.js";import"tslib";import"../../typography/title/component.js";import"../../use-image-render-component-9754b331.js";import"@alphakits/icons/dist/PhotoS";import"../../spinner/component.js";import"../../image/types.js";import"../../image/utils.js";import"../../cell/component.js";import"../../cell/base/component.js";import"../../__internal/utils/getDataTestId.js";import"../../hooks/useFocus/index.js";import"../../cell/pure/component.js";function n(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function r(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function l(l){var s=l.columns,m=l.data,p=l.refetch,c=m.map((function(l){return{row:l,cells:s.map((function(s){var m,c,u,a,d,v,f,g,j,w,y=r((null===(m=s.row)||void 0===m?void 0:m.title)||s.accessor,l,p);if(null===(c=s.row)||void 0===c?void 0:c.image){var h=n(null===(u=s.row)||void 0===u?void 0:u.image,l,p);w=h?o.createElement(e,{bgColor:"secondary",src:h,text:null==y?void 0:y.toString(),view:"ellipse"}):o.createElement(e,{bgColor:"secondary",icon:o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else if(null===(a=s.row)||void 0===a?void 0:a.icon){var b=n(null===(d=s.row)||void 0===d?void 0:d.icon,l,p);w=o.createElement(e,{icon:b||o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else(null===(v=s.row)||void 0===v?void 0:v.customAddon)&&(w=n(null===(f=s.row)||void 0===f?void 0:f.customAddon,l,p));return o.createElement(i,{title:y,align:s.align,subtitle:(null===(g=s.row)||void 0===g?void 0:g.subtitle)&&r(null===(j=s.row)||void 0===j?void 0:j.subtitle,l,p),addon:w})}))}}));return c}export{l as prepareRows};
@@ -1 +1 @@
1
- import e from"react";import t from"@alphakits/icons/dist/AlertCircleM";import o from"@alphakits/icons/dist/CancelM";import r from"@alphakits/icons/dist/CheckmarkCircleM";import i from"@alphakits/icons/dist/ClockCircleM";import a from"classnames";import{Typography as l}from"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";var m="index-module_icon__xCdQr",n="index-module_text__0SHQw",c=function(c){var s=c.text,p=c.view,d=void 0===p?"secondary":p,u=c.className,h={negative:e.createElement(o,null),positive:e.createElement(r,null),secondary:e.createElement(i,null),accent:e.createElement(o,null),attention:e.createElement(t,null)};return e.createElement(l.Text,{className:a(n,u),tag:"div",view:"caps",weight:"medium",color:d},e.createElement("span",{className:m},h[d])," ",s)};export{c as TableStatus};
1
+ import e from"react";import t from"@alphakits/icons/dist/AlertCircleM";import o from"@alphakits/icons/dist/CancelM";import r from"@alphakits/icons/dist/CheckmarkCircleM";import i from"@alphakits/icons/dist/ClockCircleM";import a from"classnames";import{Typography as l}from"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";var m="index-module_icon__xCdQr",n="index-module_text__0SHQw",c=function(c){var s=c.text,p=c.view,d=void 0===p?"secondary":p,u=c.className,h={negative:e.createElement(o,null),positive:e.createElement(r,null),secondary:e.createElement(i,null),accent:e.createElement(o,null),attention:e.createElement(t,null)};return e.createElement(l.Text,{className:a(n,u),tag:"div",view:"caps",weight:"medium",color:d},e.createElement("span",{className:m},h[d])," ",s)};export{c as TableStatus};
@@ -1 +1 @@
1
- export{TableStatus}from"./component.js";import"react";import"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CancelM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"classnames";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";
1
+ export{TableStatus}from"./component.js";import"react";import"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CancelM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"classnames";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";
@@ -1 +1 @@
1
- import t from"react";import e from"@alphakits/icons/dist/CloseS";import o from"classnames";import{IconButton as i}from"../icon-button/component.js";import{Typography as r}from"../typography/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"../typography/title/component.js";var n={tag:"index-module_tag__ePuZ7",s:"index-module_s__JQOAw",m:"index-module_m__6q9L4",text:"index-module_text__cc9CM",primary:"index-module_primary__nTVdF","primary-inverted":"index-module_primary-inverted__G6REX",leftAddons:"index-module_leftAddons__EODuG",rightAddons:"index-module_rightAddons__ERYKA"},s=function(s){var a,m=s.text,d=s.onClick,l=s.onCloseClick,p=s.view,c=void 0===p?"primary":p,_=s.weight,u=void 0===_?"regular":_,g=s.leftAddons,x=s.rightAddons,h=s.dataTestId,y=s.size,f=void 0===y?"m":y,A=s.className;return t.createElement("button",{type:"button","data-test-id":h,onClick:d,disabled:!d&&!l,className:o(n.tag,n[c],n[f],(a={},a[n.show_cross]=!!l,a),A)},g&&t.createElement("span",{className:n.leftAddons},g),t.createElement(r.Text,{className:n.text,view:"title",weight:u,color:c},m),x&&t.createElement("span",{className:n.rightAddons},x),!!l&&t.createElement("span",{className:n.rightAddons},t.createElement(i,{icon:e,"data-test-id":h+"_close",type:"button",view:"ghost","aria-label":"close-tag",onClick:function(t){t.stopPropagation(),l()}})))};export{s as Tag};
1
+ import t from"react";import e from"@alphakits/icons/dist/CloseS";import o from"classnames";import{IconButton as i}from"../icon-button/component.js";import{Typography as r}from"../typography/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"../typography/title/component.js";var n={tag:"index-module_tag__ePuZ7",s:"index-module_s__JQOAw",m:"index-module_m__6q9L4",text:"index-module_text__cc9CM",primary:"index-module_primary__nTVdF","primary-inverted":"index-module_primary-inverted__G6REX",leftAddons:"index-module_leftAddons__EODuG",rightAddons:"index-module_rightAddons__ERYKA"},s=function(s){var a,m=s.text,d=s.onClick,l=s.onCloseClick,p=s.view,c=void 0===p?"primary":p,_=s.weight,u=void 0===_?"regular":_,g=s.leftAddons,x=s.rightAddons,h=s.dataTestId,y=s.size,f=void 0===y?"m":y,A=s.className;return t.createElement("button",{type:"button","data-test-id":h,onClick:d,disabled:!d&&!l,className:o(n.tag,n[c],n[f],(a={},a[n.show_cross]=!!l,a),A)},g&&t.createElement("span",{className:n.leftAddons},g),t.createElement(r.Text,{className:n.text,view:"title",weight:u,color:c},m),x&&t.createElement("span",{className:n.rightAddons},x),!!l&&t.createElement("span",{className:n.rightAddons},t.createElement(i,{icon:e,"data-test-id":h+"_close",type:"button",view:"ghost","aria-label":"close-tag",onClick:function(t){t.stopPropagation(),l()}})))};export{s as Tag};
package/dist/tag/index.js CHANGED
@@ -1 +1 @@
1
- export{Tag}from"./component.js";import"react";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"../typography/title/component.js";
1
+ export{Tag}from"./component.js";import"react";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"../typography/title/component.js";
@@ -1 +1 @@
1
- import o from"react";import{Tag as t}from"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"../typography/title/component.js";var e="index-module_tags__C28AJ",r=function(r){var i=r.tags,n=r.view,p=void 0===n?"primary":n,m=r.onClick,s=r.onCloseClick;return o.createElement("div",{className:e},(null==i?void 0:i.length)&&i.map((function(e){return o.createElement(t,{key:e,text:e,onClick:m,onCloseClick:s,view:p})})))};export{r as TagsList};
1
+ import o from"react";import{Tag as t}from"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"../typography/title/component.js";var e="index-module_tags__C28AJ",r=function(r){var i=r.tags,n=r.view,p=void 0===n?"primary":n,m=r.onClick,s=r.onCloseClick;return o.createElement("div",{className:e},(null==i?void 0:i.length)&&i.map((function(e){return o.createElement(t,{key:e,text:e,onClick:m,onCloseClick:s,view:p})})))};export{r as TagsList};
@@ -1 +1 @@
1
- export{TagsList}from"./component.js";import"react";import"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-a741bb58.js";import"../typography/title/index.js";import"../typography/title/component.js";
1
+ export{TagsList}from"./component.js";import"react";import"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0973a462.js";import"../typography/title/index.js";import"../typography/title/component.js";
@@ -1 +1 @@
1
- import{Text as t}from"./text/component.js";import{Title as o}from"./title/index.js";import"react";import"classnames";import"../colors.module-a741bb58.js";import"tslib";import"./title/component.js";var m={Title:o,Text:t};export{m as Typography};
1
+ import{Text as t}from"./text/component.js";import{Title as o}from"./title/index.js";import"react";import"classnames";import"../colors.module-0973a462.js";import"tslib";import"./title/component.js";var m={Title:o,Text:t};export{m as Typography};
@@ -1 +1 @@
1
- export{Typography}from"./component.js";import"./text/component.js";import"react";import"classnames";import"../colors.module-a741bb58.js";import"./title/index.js";import"tslib";import"./title/component.js";
1
+ export{Typography}from"./component.js";import"./text/component.js";import"react";import"classnames";import"../colors.module-0973a462.js";import"./title/index.js";import"tslib";import"./title/component.js";
@@ -1 +1 @@
1
- import e from"react";import r from"classnames";import{c as a}from"../../colors.module-a741bb58.js";var m={paragraph:"index-module_paragraph__msaC8","primary-medium":"index-module_primary-medium__LhYfj","primary-small":"index-module_primary-small__lYM88",title:"index-module_title__O9czO",caps:"index-module_caps__l7Eqh",uppercase:"index-module_uppercase__JVKeT",bold:"index-module_bold__RuoQM",medium:"index-module_medium__YL230",regular:"index-module_regular__h8gTH",through:"index-module_through__3EDOt",component:"index-module_component__MPBKM"},o=function(o){var d,_=o.tag,i=void 0===_?"span":_,l=o.through,u=void 0!==l&&l,p=o.weight,t=void 0===p?"regular":p,n=o.uppercase,s=o.color,c=o.view,h=o.className,g=o.dataTestId,x=o.children;return e.createElement(i,{className:r((d={},d[m.paragraph]="p"===i,d[m.uppercase]=n,d[m.through]=u,d[m[c]]=c,d),h,s&&a[s],m[t]),"data-test-id":g},x)};export{o as Text};
1
+ import e from"react";import r from"classnames";import{c as a}from"../../colors.module-0973a462.js";var m={paragraph:"index-module_paragraph__msaC8","primary-medium":"index-module_primary-medium__LhYfj","primary-small":"index-module_primary-small__lYM88",title:"index-module_title__O9czO",caps:"index-module_caps__l7Eqh",uppercase:"index-module_uppercase__JVKeT",bold:"index-module_bold__RuoQM",medium:"index-module_medium__YL230",regular:"index-module_regular__h8gTH",through:"index-module_through__3EDOt",component:"index-module_component__MPBKM"},o=function(o){var d,_=o.tag,i=void 0===_?"span":_,l=o.through,u=void 0!==l&&l,p=o.weight,t=void 0===p?"regular":p,n=o.uppercase,s=o.color,c=o.view,h=o.className,g=o.dataTestId,x=o.children;return e.createElement(i,{className:r((d={},d[m.paragraph]="p"===i,d[m.uppercase]=n,d[m.through]=u,d[m[c]]=c,d),h,s&&a[s],m[t]),"data-test-id":g},x)};export{o as Text};
@@ -1 +1 @@
1
- export{Text}from"./component.js";import"react";import"classnames";import"../../colors.module-a741bb58.js";
1
+ export{Text}from"./component.js";import"react";import"classnames";import"../../colors.module-0973a462.js";
@@ -1 +1 @@
1
- import e from"react";import r from"classnames";import{c as a}from"../../colors.module-a741bb58.js";var o=function(o){var t,i=o.tag,m=void 0===i?"div":i,s=o.view,d=void 0===s?"medium":s,c=o.weight,n=void 0===c?"medium":c,l=o.defaultMargins,p=void 0!==l&&l,u=o.color,v=void 0===u?"primary":u,g=o.className,h=o.dataTestId,f=o.uppercase,b=o.through,w=o.children,y=o.styles;return e.createElement(m,{className:r(y.component,g,y["montserrat-"+d],p&&y["margins-"+d],(t={},t[y.uppercase]=f,t[y.through]=b,t),y[n],v&&a[v]),"data-test-id":h},w)};export{o as Title};
1
+ import e from"react";import r from"classnames";import{c as a}from"../../colors.module-0973a462.js";var o=function(o){var t,i=o.tag,m=void 0===i?"div":i,s=o.view,d=void 0===s?"medium":s,c=o.weight,n=void 0===c?"medium":c,l=o.defaultMargins,p=void 0!==l&&l,u=o.color,v=void 0===u?"primary":u,g=o.className,h=o.dataTestId,f=o.uppercase,w=o.through,y=o.children,N=o.styles;return e.createElement(m,{className:r(N.component,g,N["montserrat-"+d],p&&N["margins-"+d],(t={},t[N.uppercase]=f,t[N.through]=w,t),N[n],v&&a[v]),"data-test-id":h},y)};export{o as Title};
@@ -1 +1 @@
1
- import{__assign as m}from"tslib";import e from"react";import{Title as r}from"./component.js";import"classnames";import"../../colors.module-a741bb58.js";var o={component:"common-module_component__l-zRT",bold:"common-module_bold__R07W3",medium:"common-module_medium__IcxXn",regular:"common-module_regular__2NoXt"},l={"montserrat-xlarge":"index-module_montserrat-xlarge__hdgbt","montserrat-large":"index-module_montserrat-large__Go4Ju","montserrat-medium":"index-module_montserrat-medium__KJdm0","montserrat-small":"index-module_montserrat-small__T0UeA","montserrat-xsmall":"index-module_montserrat-xsmall__9757S","montserrat-xxsmall":"index-module_montserrat-xxsmall__5pe-b","margins-xlarge":"index-module_margins-xlarge__o0X6K","margins-large":"index-module_margins-large__njSHO","margins-medium":"index-module_margins-medium__ir-Bn","margins-small":"index-module_margins-small__F4y4n","margins-xsmall":"index-module_margins-xsmall__69GSc",uppercase:"index-module_uppercase__NG5Qa",through:"index-module_through__ezTzC"},n=function(n){return e.createElement(r,m({},n,{styles:m(m({},o),l)}))};export{n as Title};
1
+ import{__assign as m}from"tslib";import e from"react";import{Title as r}from"./component.js";import"classnames";import"../../colors.module-0973a462.js";var o={component:"common-module_component__l-zRT",bold:"common-module_bold__R07W3",medium:"common-module_medium__IcxXn",regular:"common-module_regular__2NoXt"},l={"montserrat-xlarge":"index-module_montserrat-xlarge__hdgbt","montserrat-large":"index-module_montserrat-large__Go4Ju","montserrat-medium":"index-module_montserrat-medium__KJdm0","montserrat-small":"index-module_montserrat-small__T0UeA","montserrat-xsmall":"index-module_montserrat-xsmall__9757S","montserrat-xxsmall":"index-module_montserrat-xxsmall__5pe-b","margins-xlarge":"index-module_margins-xlarge__o0X6K","margins-large":"index-module_margins-large__njSHO","margins-medium":"index-module_margins-medium__ir-Bn","margins-small":"index-module_margins-small__F4y4n","margins-xsmall":"index-module_margins-xsmall__69GSc",uppercase:"index-module_uppercase__NG5Qa",through:"index-module_through__ezTzC"},n=function(n){return e.createElement(r,m({},n,{styles:m(m({},o),l)}))};export{n as Title};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alphakits/ui",
3
- "version": "1.28.16",
3
+ "version": "1.28.18",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -42,6 +42,7 @@
42
42
  "lodash": "4.17.21",
43
43
  "postcss": "^8.2.9",
44
44
  "query-string": "^7.0.1",
45
+ "react-images-viewer": "^1.7.1",
45
46
  "react-merge-refs": "1.1.0",
46
47
  "react-node-resolver": "^2.0.1",
47
48
  "react-popper": "^2.2.2",
@@ -54,7 +55,6 @@
54
55
  "react-window": "1.8.6",
55
56
  "resize-observer": "1.0.0",
56
57
  "rooks": "^7.4.2",
57
- "swiper": "^6.8.4",
58
58
  "text-mask-core": "^5.1.2",
59
59
  "tslib": "^2.4.1",
60
60
  "uuid": "8.3.2"
@@ -129,7 +129,7 @@
129
129
  "husky": "^4.2.5",
130
130
  "jest-environment-jsdom-sixteen": "1.0.3",
131
131
  "lint-staged": "^10.2.13",
132
- "mini-css-extract-plugin": "0.11.0",
132
+ "mini-css-extract-plugin": "0.9.0",
133
133
  "optimize-css-assets-webpack-plugin": "5.0.4",
134
134
  "postcss": "^8.2.9",
135
135
  "postcss-css-variables": "^0.19.0",
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const Header: () => JSX.Element;
3
- export { Header };
@@ -1 +0,0 @@
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/text/component.js";import"classnames";import"../../../colors.module-a741bb58.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/component.js";import"../../utils/split-filename.js";var i="index-module_header__597vy",l="index-module_buttons__ILnkB",a=function(){var a=t(n),p=a.fullScreen,s=a.getCurrentImage,c=a.onClose,u=o(null);r((function(){u.current&&u.current.focus()}),[p]);var d=s(),f=(null==d?void 0:d.name)||"";return e.createElement("div",{className:i},e.createElement(m,{filename:f}),e.createElement("div",{className:l},e.createElement("button",{type:"button",onClick:c},"close")))};export{a as Header};
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- type HeaderInfoBlockProps = {
3
- filename: string;
4
- };
5
- declare const HeaderInfoBlock: ({ filename }: HeaderInfoBlockProps) => JSX.Element;
6
- export { HeaderInfoBlockProps, HeaderInfoBlock };
@@ -1 +0,0 @@
1
- import e from"react";import{Typography as t}from"../../../typography/component.js";import{splitFilename as r}from"../../utils/split-filename.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-a741bb58.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/component.js";var o="index-module_info__I8Z23",i="index-module_filenameHead__urP7W",m="index-module_filenameContainer__v5Oht",a=function(a){var l=a.filename,n=r(l),p=n[0],s=n[1];return e.createElement("div",{className:o},e.createElement("div",{className:m},e.createElement(t.Title,{tag:"h1",className:i,view:"xsmall",color:"primary-inverted"},p),e.createElement(t.Title,{tag:"h1",view:"xsmall",color:"primary-inverted"},s)))};export{a as HeaderInfoBlock};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- import { GalleryImage } from "../../component";
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 };
@@ -1 +0,0 @@
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};
@@ -1,3 +0,0 @@
1
- import { FC } from 'react';
2
- declare const ImageViewer: FC;
3
- export { ImageViewer };
@@ -1 +0,0 @@
1
- import{__assign as e}from"tslib";import t,{useContext as i,useRef as o,useCallback as r,useEffect as n,useMemo as s}from"react";import a from"classnames";import l from"element-closest";import c,{EffectFade as m,A11y as d,Controller as p}from"swiper";import{S as u,a as f}from"../../../swiper-slide-bbb6e4ca.js";import{useFocus as g}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 w}from"../../utils/utils.js";import{TestIds as j}from"../../utils/constants.js";import{s as y,S as b}from"../../../slide-0b7e7a0e.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"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"@alphakits/icons/dist/CloseS";import"../../../button/component.js";import"react-merge-refs";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-a741bb58.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";c.use([m,d,p]);var k=function(){var c,m,d,p=i(h),k=p.singleSlide,S=p.images,E=p.imagesMeta,x=p.fullScreen,C=p.currentSlideIndex,I=p.initialSlide,N=p.onClose,T=p.getCurrentImage,M=p.setImageMeta,A=p.setCurrentSlideIndex,D=p.getSwiper,L=p.setSwiper,P=p.slidePrev,R=p.slideNext,_=o(null),B=o(null),V=g(_,"keyboard")[0],F=g(B,"keyboard")[0],H=D(),K=r((function(){var e;A(null!==(e=null==H?void 0:H.activeIndex)&&void 0!==e?e:I)}),[A,H,I]),O=function(e,t){var i=e.currentTarget,o=i.naturalWidth,r=i.naturalHeight;M({width:o,height:r},t)},U=function(e){M({width:0,height:0,broken:!0},e)},G=r((function(e){var t,i,o=e.target,r=(null===(t=_.current)||void 0===t?void 0:t.contains(o))||(null===(i=B.current)||void 0===i?void 0:i.contains(o)),n=Boolean(o.closest("."+y.placeholder));"IMG"===o.tagName||n||r||N()}),[N]);n((function(){l(window)}),[]);var W=s((function(){var e;return{slidesPerView:1,effect:"fade",fadeEffect:{crossFade:!0},className:a(y.swiper,(e={},e[y.hidden]=x,e)),controller:{control:H},a11y:{slideRole:"img"},initialSlide:I,simulateTouch:!1,onSwiper:L,onSlideChange:K}}),[H,x,I,K,L]),X=!k&&!x,q=(null==H?void 0:H.width)||1,z=(null==H?void 0:H.height)||1,J=q/z,Q=T();return t.createElement("div",{className:a(y.component,(c={},c[y.singleSlide]=k,c)),onClick:G},X&&t.createElement("div",{className:a(y.arrow,(m={},m[y.focused]=V,m)),onClick:function(){P()},role:"button",onKeyDown:function(e){"Enter"===e.key&&P()},tabIndex:0,ref:_,"aria-label":"Предыдущее изображение","data-test-id":j.PREV_SLIDE_BUTTON},">"),x&&t.createElement("img",{src:null==Q?void 0:Q.src,alt:Q?v(Q,C):"",className:y.fullScreenImage}),t.createElement(u,e({},W),S.map((function(e,i){var o=E[i],r=((null==o?void 0:o.width)||1)/((null==o?void 0:o.height)||1),n=i===C;return t.createElement(f,{key:w(e,i),style:{pointerEvents:n?"auto":"none",transitionProperty:"opacity"}},(function(s){var a=s.isActive;return t.createElement(b,{isActive:a,swiperAspectRatio:J,image:e,swiperHeight:z,meta:o,index:i,imageAspectRatio:r,slideVisible:n,handleLoad:O,handleLoadError:U})}))}))),X&&t.createElement("div",{className:a(y.arrow,(d={},d[y.focused]=F,d)),onClick:function(){R()},role:"button",onKeyDown:function(e){"Enter"===e.key&&R()},tabIndex:0,ref:B,"aria-label":"Следующее изображение","data-test-id":j.NEXT_SLIDE_BUTTON},"<"))};export{k as ImageViewer};
@@ -1 +0,0 @@
1
- import"react";import"classnames";import"../../../typography/component.js";import"../../utils/utils.js";import"../../utils/constants.js";export{S as Slide}from"../../../slide-0b7e7a0e.js";import"../../../typography/text/component.js";import"../../../colors.module-a741bb58.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/component.js";
@@ -1,4 +0,0 @@
1
- export * from "./navigation-bar/index";
2
- export * from "./header/index";
3
- export * from "./image-preview/index";
4
- export * from "./image-viewer/index";
@@ -1 +0,0 @@
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/text/component.js";import"../../colors.module-a741bb58.js";import"../../typography/title/index.js";import"tslib";import"../../typography/title/component.js";import"../utils/split-filename.js";import"element-closest";import"swiper";import"../../swiper-slide-bbb6e4ca.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"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"@alphakits/icons/dist/CloseS";import"../../button/component.js";import"react-merge-refs";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";import"../../slide-0b7e7a0e.js";
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const NavigationBar: () => JSX.Element;
3
- export { NavigationBar };
@@ -1 +0,0 @@
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};
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import SwiperCore from 'swiper';
3
- import { GalleryImage, ImageMeta } from "./component";
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 };
@@ -1 +0,0 @@
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};
@@ -1,11 +0,0 @@
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 };
@@ -1 +0,0 @@
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};
@@ -1,3 +0,0 @@
1
- export * from "./split-filename";
2
- export * from "./utils";
3
- export * from "./constants";
@@ -1 +0,0 @@
1
- export{splitFilename}from"./split-filename.js";export{PLACEHOLDER_HEIGHT,PLACEHOLDER_WIDTH,getImageAlt,getImageKey,isSmallImage}from"./utils.js";export{TestIds}from"./constants.js";
@@ -1,2 +0,0 @@
1
- declare function splitFilename(filename: string): [string, string];
2
- export { splitFilename };
@@ -1 +0,0 @@
1
- var e=3;function r(r){var n=r.lastIndexOf("."),t=r,a="",c=n-e;return c>0&&(t=r.slice(0,c),a=r.slice(c)),[t,a]}export{r as splitFilename};
@@ -1,7 +0,0 @@
1
- import { GalleryImage, ImageMeta } from "../component";
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 };
@@ -1 +0,0 @@
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};
@@ -1,16 +0,0 @@
1
- import { FC, SyntheticEvent } from 'react';
2
- import { GalleryImage, ImageMeta } from "./image-gallery/component";
3
- type SlideProps = {
4
- isActive: boolean;
5
- image: GalleryImage;
6
- meta?: ImageMeta;
7
- swiperAspectRatio: number;
8
- imageAspectRatio: number;
9
- index: number;
10
- swiperHeight: number;
11
- slideVisible: boolean;
12
- handleLoad: (event: SyntheticEvent<HTMLImageElement>, index: number) => void;
13
- handleLoadError: (index: number) => void;
14
- };
15
- declare const Slide: FC<SlideProps>;
16
- export { Slide };
@@ -1 +0,0 @@
1
- import e from"react";import i from"classnames";import{Typography as a}from"./typography/component.js";import{isSmallImage as o,getImageAlt as l}from"./image-gallery/utils/utils.js";import{TestIds as r}from"./image-gallery/utils/constants.js";var n={component:"index-module_component__yJfUt",swiper:"index-module_swiper__0SEzT",singleSlide:"index-module_singleSlide__HOytD",hidden:"index-module_hidden__IKndk",slide:"index-module_slide__t9HU8",slideLoading:"index-module_slideLoading__ESWLL",image:"index-module_image__zCKpV",smallImage:"index-module_smallImage__nMX3i",verticalImageFit:"index-module_verticalImageFit__hKfdZ",horizontalImageFit:"index-module_horizontalImageFit__i1Uqw",arrow:"index-module_arrow__VWc0A",focused:"index-module_focused__VrSEy",placeholder:"index-module_placeholder__-VeGJ",brokenImgWrapper:"index-module_brokenImgWrapper__vPNHE",brokenImgIcon:"index-module_brokenImgIcon__1x5bR",fullScreenImage:"index-module_fullScreenImage__w9zge"},d=function(o){var l,r=o.children,d=o.broken,m=o.loading,t=o.withPlaceholder;o.active;var s=d?e.createElement("div",{className:n.brokenImgWrapper},e.createElement("div",{className:n.brokenImgIcon}),e.createElement(a.Text,{view:"primary-small",color:"secondary"},"Bdoken imagge")):r;return e.createElement("div",{className:i(n.slide,(l={},l[n.slideLoading]=m,l))},t?e.createElement("div",{className:n.placeholder},s):s)},m=function(a){var m,t=a.isActive,s=a.meta,_=a.swiperAspectRatio,c=a.imageAspectRatio,g=a.image,u=a.index,p=a.swiperHeight,I=a.slideVisible,x=a.handleLoad,h=a.handleLoadError,v=Boolean(null==s?void 0:s.broken),f=o(s),E=!f&&_>c,b=!f&&_<=c;return e.createElement(d,{active:t,broken:v,loading:!s,withPlaceholder:f||v},e.createElement("img",{src:g.src,alt:l(g,u),className:i((m={},m[n.smallImage]=f,m[n.image]=!f,m[n.verticalImageFit]=E,m[n.horizontalImageFit]=b,m)),onLoad:function(e){return x(e,u)},onError:function(){return h(u)},style:{maxHeight:p+"px"},"data-test-id":I?r.ACTIVE_IMAGE:void 0}))};export{m as S,n as s};