@alphakits/ui 1.28.13 → 1.28.14

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 (328) 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/amount-input/index.js +1 -1
  5. package/dist/avatar/component.js +1 -1
  6. package/dist/avatar/index.js +1 -1
  7. package/dist/back-button/component.js +1 -1
  8. package/dist/back-button/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 -6
  12. package/dist/bottom-sheet/index.js +1 -1
  13. package/dist/button/component.js +1 -1
  14. package/dist/button/index.js +1 -1
  15. package/dist/button-arrow/component.js +1 -1
  16. package/dist/button-arrow/index.js +1 -1
  17. package/dist/calendar/component.js +1 -1
  18. package/dist/calendar/components/days-table/component.js +1 -1
  19. package/dist/calendar/components/days-table/index.js +1 -1
  20. package/dist/calendar/components/header/index.js +1 -1
  21. package/dist/calendar/components/header//321/201omponent.js +1 -1
  22. package/dist/calendar/components/months-table/index.js +1 -1
  23. package/dist/calendar/components/months-table//321/201omponent.js +1 -1
  24. package/dist/calendar/components/select-button/index.js +1 -1
  25. package/dist/calendar/components/select-button//321/201omponent.js +1 -1
  26. package/dist/calendar/components/years-table/index.js +1 -1
  27. package/dist/calendar/components/years-table//321/201omponent.js +1 -1
  28. package/dist/calendar/index.js +1 -1
  29. package/dist/calendar/use-calendar.js +1 -1
  30. package/dist/calendar/use-period.js +1 -1
  31. package/dist/calendar/utils.js +1 -1
  32. package/dist/calendar-input/component.js +1 -1
  33. package/dist/calendar-input/index.js +1 -1
  34. package/dist/calendar-input/utils.js +1 -1
  35. package/dist/{capitalize-18078eb5.js → capitalize-72a4bc6b.js} +1 -1
  36. package/dist/card/component.js +1 -1
  37. package/dist/card/images/index.js +1 -1
  38. package/dist/card/index.js +1 -1
  39. package/dist/cell/base/component.d.ts +13 -0
  40. package/dist/cell/base/component.js +1 -1
  41. package/dist/cell/component.d.ts +7 -0
  42. package/dist/cell/component.js +1 -1
  43. package/dist/cell/index.d.ts +1 -1
  44. package/dist/cell/index.js +1 -1
  45. package/dist/cell/pure/component.js +1 -1
  46. package/dist/checkbox/component.js +1 -1
  47. package/dist/checkbox/index.js +1 -1
  48. package/dist/checkbox-group/component.js +1 -1
  49. package/dist/checkbox-group/index.js +1 -1
  50. package/dist/checkbox-lists/component.js +1 -1
  51. package/dist/checkbox-lists/index.js +1 -1
  52. package/dist/collapsable-row/addons.js +1 -1
  53. package/dist/collapsable-row/component.js +1 -1
  54. package/dist/collapsable-row/index.js +1 -1
  55. package/dist/collapse/component.js +1 -1
  56. package/dist/collapse/index.js +1 -1
  57. package/dist/copy-button/component.js +1 -1
  58. package/dist/copy-button/index.js +1 -1
  59. package/dist/date/component.js +1 -1
  60. package/dist/date/index.js +1 -1
  61. package/dist/date-switcher/component.js +1 -1
  62. package/dist/date-switcher/index.js +1 -1
  63. package/dist/empty-page/component.js +1 -1
  64. package/dist/empty-page/index.js +1 -1
  65. package/dist/footer/component.js +1 -1
  66. package/dist/footer/contact-block.js +1 -1
  67. package/dist/footer/index.js +1 -1
  68. package/dist/form/component.js +1 -1
  69. package/dist/form/index.js +1 -1
  70. package/dist/form/templates/base-form/index.js +1 -1
  71. package/dist/form/templates/filters-form/index.js +1 -1
  72. package/dist/form/templates/rest-form/form.js +1 -1
  73. package/dist/form/templates/rest-form/index.js +1 -1
  74. package/dist/form/utils/get-default-values.js +1 -1
  75. package/dist/form-control/component.js +1 -1
  76. package/dist/form-control/index.js +1 -1
  77. package/dist/grid/col/component.js +1 -1
  78. package/dist/grid/col/index.js +1 -1
  79. package/dist/grid/component.js +1 -1
  80. package/dist/grid/index.js +1 -1
  81. package/dist/grid/row/component.js +1 -1
  82. package/dist/grid/row/index.js +1 -1
  83. package/dist/header-search/component.js +1 -1
  84. package/dist/header-search/index.js +1 -1
  85. package/dist/hooks/index.js +1 -1
  86. package/dist/hooks/use-crud-form-requests/index.js +1 -1
  87. package/dist/hooks/use-get-one/index.js +1 -1
  88. package/dist/icon-button/component.js +1 -1
  89. package/dist/icon-button/index.js +1 -1
  90. package/dist/image/component.js +1 -1
  91. package/dist/image/image-base.js +1 -1
  92. package/dist/image/index.js +1 -1
  93. package/dist/image/use-image-render-component.js +1 -1
  94. package/dist/image-gallery/component.d.ts +13 -2
  95. package/dist/image-gallery/component.js +1 -1
  96. package/dist/image-gallery/components/header/index.js +1 -1
  97. package/dist/image-gallery/components/header-info-block/index.js +1 -1
  98. package/dist/image-gallery/components/image-preview/index.d.ts +1 -1
  99. package/dist/image-gallery/components/image-viewer/index.js +1 -1
  100. package/dist/image-gallery/components/image-viewer/slide.js +1 -1
  101. package/dist/image-gallery/components/index.js +1 -1
  102. package/dist/image-gallery/context.d.ts +1 -1
  103. package/dist/image-gallery/index.js +1 -1
  104. package/dist/image-gallery/utils/utils.d.ts +1 -1
  105. package/dist/image-uploader/component.js +1 -1
  106. package/dist/image-uploader/index.js +1 -1
  107. package/dist/index.css +1 -1
  108. package/dist/index.js +3 -0
  109. package/dist/info-block-header/component.js +1 -1
  110. package/dist/info-block-header/index.js +1 -1
  111. package/dist/info-block-item/component.js +1 -1
  112. package/dist/info-block-item/index.js +1 -1
  113. package/dist/input/component.js +1 -1
  114. package/dist/input/index.js +1 -1
  115. package/dist/input-autocomplete/autocomplete-field/index.js +1 -1
  116. package/dist/input-autocomplete/component.js +1 -1
  117. package/dist/input-autocomplete/index.js +1 -1
  118. package/dist/input-ghost/component.js +1 -1
  119. package/dist/input-ghost/index.js +1 -1
  120. package/dist/isSymbol-cedc285d.js +1 -0
  121. package/dist/link/component.js +1 -1
  122. package/dist/link/index.js +1 -1
  123. package/dist/list-allert/component.js +1 -1
  124. package/dist/list-allert/index.js +1 -1
  125. package/dist/masked-input/component.js +1 -1
  126. package/dist/masked-input/index.js +1 -1
  127. package/dist/menu/component.js +1 -1
  128. package/dist/menu/components/content-header/index.js +1 -1
  129. package/dist/menu/components/index.js +1 -1
  130. package/dist/menu/components/menu-avatar/index.js +1 -1
  131. package/dist/menu/components/menu-back-button/index.js +1 -1
  132. package/dist/menu/components/menu-button/index.js +1 -1
  133. package/dist/menu/components/menu-buttons-list/index.js +1 -1
  134. package/dist/menu/components/user-button/index.js +1 -1
  135. package/dist/menu/index.js +1 -1
  136. package/dist/message/component.js +1 -1
  137. package/dist/message/index.js +1 -1
  138. package/dist/modal/components/modals/index.js +1 -1
  139. package/dist/modal/components/modals/modal.js +1 -1
  140. package/dist/modal/context.d.ts +1 -0
  141. package/dist/modal/context.js +1 -1
  142. package/dist/modal/hooks/use-modal.js +1 -1
  143. package/dist/modal/index.js +1 -1
  144. package/dist/modal/utils/delete-property-by-id.js +1 -1
  145. package/dist/notification/component.js +1 -1
  146. package/dist/notification/index.js +1 -1
  147. package/dist/page-with-controls/component.js +1 -1
  148. package/dist/page-with-controls/index.js +1 -1
  149. package/dist/picker-button/common/index.js +1 -1
  150. package/dist/picker-button/common/labeled-button/index.js +1 -1
  151. package/dist/picker-button/component.js +1 -1
  152. package/dist/picker-button/field/Component.js +1 -1
  153. package/dist/picker-button/field/index.js +1 -1
  154. package/dist/picker-button/index.js +1 -1
  155. package/dist/popover/component.js +1 -1
  156. package/dist/popover/index.js +1 -1
  157. package/dist/portal/utils.d.ts +1 -1
  158. package/dist/portal/utils.js +1 -1
  159. package/dist/progress-bar/component.js +1 -1
  160. package/dist/progress-bar/index.js +1 -1
  161. package/dist/progress-index/component.js +1 -1
  162. package/dist/progress-index/index.js +1 -1
  163. package/dist/radio/component.js +1 -1
  164. package/dist/radio/index.js +1 -1
  165. package/dist/radio-group/component.js +1 -1
  166. package/dist/radio-group/index.js +1 -1
  167. package/dist/radio-groups/component.js +1 -1
  168. package/dist/radio-groups/index.js +1 -1
  169. package/dist/select/component.js +1 -1
  170. package/dist/select/components/base-select/component.js +1 -1
  171. package/dist/select/components/base-select/index.js +1 -1
  172. package/dist/select/components/field/component.js +1 -1
  173. package/dist/select/components/field/index.js +1 -1
  174. package/dist/select/components/index.js +1 -1
  175. package/dist/select/components/native-select/component.js +1 -1
  176. package/dist/select/components/native-select/index.js +1 -1
  177. package/dist/select/components/option/component.js +1 -1
  178. package/dist/select/components/option/index.js +1 -1
  179. package/dist/select/components/options-list/component.js +1 -1
  180. package/dist/select/components/options-list/index.js +1 -1
  181. package/dist/select/components/virtual-options-list/component.js +1 -1
  182. package/dist/select/components/virtual-options-list/index.js +1 -1
  183. package/dist/select/index.js +1 -1
  184. package/dist/select/presets/index.js +1 -1
  185. package/dist/select/presets/use-lazy-loading/index.js +1 -1
  186. package/dist/select/presets/use-select-with-loading/hook.js +1 -1
  187. package/dist/sidepanel/component.js +1 -1
  188. package/dist/sidepanel/index.js +1 -1
  189. package/dist/sidepanel-header/component.js +1 -1
  190. package/dist/sidepanel-header/index.js +1 -1
  191. package/dist/{slide-c577cf1d.d.ts → slide-09dbbb1c.d.ts} +1 -1
  192. package/dist/space/Item.js +1 -1
  193. package/dist/space/component.js +1 -1
  194. package/dist/space/index.js +1 -1
  195. package/dist/step-bar-8f3f396a.d.ts +8 -0
  196. package/dist/stepped-progress-bar/components/step-bar.js +1 -0
  197. package/dist/stepped-progress-bar/index.d.ts +2 -2
  198. package/dist/stepped-progress-bar/index.js +1 -1
  199. package/dist/suffix-input/component.js +1 -1
  200. package/dist/suffix-input/index.js +1 -1
  201. package/dist/super-list-header/component.js +1 -1
  202. package/dist/super-list-header/index.js +1 -1
  203. package/dist/super-list-item/component.js +1 -1
  204. package/dist/super-list-item/index.js +1 -1
  205. package/dist/swiper-slide-e28d96e8.js +1 -0
  206. package/dist/switch/component.js +1 -1
  207. package/dist/switch/index.js +1 -1
  208. package/dist/table/columns.js +1 -1
  209. package/dist/table/component.d.ts +7 -0
  210. package/dist/table/component.js +1 -1
  211. package/dist/table/components/cell/component.d.ts +1 -1
  212. package/dist/table/components/cell/component.js +1 -1
  213. package/dist/table/components/cell/index.js +1 -1
  214. package/dist/table/components/cells/index.js +1 -1
  215. package/dist/table/components/empty-list/index.js +1 -1
  216. package/dist/table/components/error/index.js +1 -1
  217. package/dist/table/components/loading/index.js +1 -1
  218. package/dist/table/components/pagination/index.js +1 -1
  219. package/dist/table/components/table-header/index.js +1 -1
  220. package/dist/table/hooks/use-table-data.d.ts +1 -1
  221. package/dist/table/hooks/use-table-data.js +1 -1
  222. package/dist/table/index.d.ts +1 -1
  223. package/dist/table/index.js +1 -1
  224. package/dist/table/table.d.ts +38 -0
  225. package/dist/table/table.js +1 -1
  226. package/dist/table/utils/add-query-param.js +1 -1
  227. package/dist/table/utils/get-query-from-url.js +1 -1
  228. package/dist/table/utils/index.d.ts +1 -1
  229. package/dist/table/utils/index.js +1 -1
  230. package/dist/table/utils/parse-query-params.d.ts +2 -0
  231. package/dist/table/utils/parse-query-params.js +1 -1
  232. package/dist/table/utils/prepare-rows.d.ts +12 -0
  233. package/dist/table/utils/prepare-rows.js +1 -1
  234. package/dist/table/utils/query-adapter.js +1 -1
  235. package/dist/table/utils/remove-query-param.js +1 -1
  236. package/dist/table/utils/reset-query-param.js +1 -1
  237. package/dist/table-status/component.js +1 -1
  238. package/dist/table-status/index.js +1 -1
  239. package/dist/tag/component.js +1 -1
  240. package/dist/tag/index.js +1 -1
  241. package/dist/tags-list/component.js +1 -1
  242. package/dist/tags-list/index.js +1 -1
  243. package/dist/textarea/component.js +1 -1
  244. package/dist/textarea/index.js +1 -1
  245. package/dist/toast/component.js +1 -1
  246. package/dist/toast/index.js +1 -1
  247. package/dist/toast-notifier/component.js +1 -1
  248. package/dist/toast-notifier/index.js +1 -1
  249. package/dist/toast-plate/component.js +1 -1
  250. package/dist/toast-plate/index.js +1 -1
  251. package/dist/tooltip/component.js +1 -1
  252. package/dist/tooltip/index.js +1 -1
  253. package/dist/typography/component.js +1 -1
  254. package/dist/typography/index.js +1 -1
  255. package/dist/typography/text/component.js +1 -1
  256. package/dist/typography/text/index.js +1 -1
  257. package/dist/typography/title/component.js +1 -1
  258. package/dist/typography/title/index.js +1 -1
  259. package/dist/use-image-render-component-0fcef252.js +1 -0
  260. package/dist/utils/format-date/index.js +1 -1
  261. package/dist/utils/index.js +1 -1
  262. package/dist/utils/show-toast/index.js +1 -1
  263. package/dist/vars.css +1 -0
  264. package/dist/with-suffix/component.js +1 -1
  265. package/dist/with-suffix/index.js +1 -1
  266. package/package.json +16 -11
  267. package/dist/ActionCopyM-70898595.js +0 -1
  268. package/dist/CancelM-088e6940.js +0 -1
  269. package/dist/CheckmarkCircleM-f684cf46.js +0 -1
  270. package/dist/ChevronBackM-aee18038.js +0 -1
  271. package/dist/ChevronBackS-299d7d1e.js +0 -1
  272. package/dist/ChevronDownS-bd371173.js +0 -1
  273. package/dist/ChevronForwardM-a3a04aa8.js +0 -1
  274. package/dist/ChevronForwardS-c493a1a1.js +0 -1
  275. package/dist/ClockCircleM-d218e835.js +0 -1
  276. package/dist/CloseS-e1864257.js +0 -1
  277. package/dist/ControllerS-7a9ecca0.js +0 -1
  278. package/dist/EditS-9cde0683.js +0 -1
  279. package/dist/MinusM-af938dd8.js +0 -1
  280. package/dist/MoverS-a1889978.js +0 -1
  281. package/dist/NextS-4109921c.js +0 -1
  282. package/dist/PhotoS-b296cb33.js +0 -1
  283. package/dist/PlusS-15110f9d.js +0 -1
  284. package/dist/SearchM-ad181eb5.js +0 -1
  285. package/dist/TrashM-1258ddef.js +0 -1
  286. package/dist/YoutubeM-d17dbfe8.js +0 -1
  287. package/dist/_commonjsHelpers-e9fa40dd.js +0 -1
  288. package/dist/component-4b3baef3.d.ts +0 -7
  289. package/dist/component-4b3baef3.js +0 -1
  290. package/dist/component-523d39f3.d.ts +0 -17
  291. package/dist/component-523d39f3.js +0 -1
  292. package/dist/component-7fdb3434.d.ts +0 -13
  293. package/dist/date-functions.d.ts +0 -37
  294. package/dist/date-functions.js +0 -1
  295. package/dist/formik.esm-ce308774.js +0 -1
  296. package/dist/image-gallery/types.d.ts +0 -13
  297. package/dist/image-gallery/types.js +0 -1
  298. package/dist/index-056471fd.js +0 -1
  299. package/dist/index-2fa7de8d.js +0 -1
  300. package/dist/index-4f62c122.js +0 -1
  301. package/dist/index-5365bc15.js +0 -1
  302. package/dist/index-5f244101.js +0 -1
  303. package/dist/index-73750f1c.js +0 -1
  304. package/dist/index-820ddb0e.js +0 -9
  305. package/dist/index-89bc7be5.js +0 -1
  306. package/dist/index-9943a288.js +0 -1
  307. package/dist/index-9e297c3c.js +0 -1
  308. package/dist/index-aa8c3564.js +0 -1
  309. package/dist/index-e6f864d9.js +0 -1
  310. package/dist/index-e97180cd.js +0 -1
  311. package/dist/index-f3950f98.js +0 -1
  312. package/dist/intersection-observer-e15e78dd.js +0 -1
  313. package/dist/isSymbol-faa23a32.js +0 -1
  314. package/dist/parse-query-params-c07afed3.d.ts +0 -2
  315. package/dist/parse-query-params-c07afed3.js +0 -1
  316. package/dist/step-bar-a5486816.d.ts +0 -8
  317. package/dist/stepped-progress-bar/step-bar.js +0 -1
  318. package/dist/table-fa12db74.d.ts +0 -38
  319. package/dist/tslib.es6-037db755.js +0 -1
  320. package/dist/use-image-render-component-5a81ce40.js +0 -1
  321. /package/dist/{colors.module-0071a3ac.js → colors.module-018cba31.js} +0 -0
  322. /package/dist/{contact-block-029bb051.d.ts → contact-block-cfdfd9ea.d.ts} +0 -0
  323. /package/dist/{contact-block-029bb051.js → contact-block-cfdfd9ea.js} +0 -0
  324. /package/dist/{gutters.module-9fbea122.js → gutters.module-bc5bb452.js} +0 -0
  325. /package/dist/{slide-c577cf1d.js → slide-09dbbb1c.js} +0 -0
  326. /package/dist/{step-bar-a5486816.js → step-bar-8f3f396a.js} +0 -0
  327. /package/dist/stepped-progress-bar/{step-bar.d.ts → components/step-bar.d.ts} +0 -0
  328. /package/dist/{use-image-render-component-5a81ce40.d.ts → use-image-render-component-0fcef252.d.ts} +0 -0
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { TableProps } from "../table";
3
+ type Props<T extends object> = {
4
+ columns: TableProps<T>['columns'];
5
+ data: T[];
6
+ refetch: () => void;
7
+ };
8
+ declare function prepareRows<T extends object>({ columns, data, refetch }: Props<T>): {
9
+ row: T;
10
+ cells: JSX.Element[];
11
+ }[];
12
+ export { prepareRows };
@@ -1 +1 @@
1
- import"react";import"../../PhotoS-b296cb33.js";import"../../image/component.js";export{p as prepareRows}from"../../component-523d39f3.js";import"classnames";import"../../cell/pure/component.js";import"../../skeleton/component.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-0071a3ac.js";import"../../typography/title/index.js";import"../../tslib.es6-037db755.js";import"../../typography/title/component.js";import"../../use-image-render-component-5a81ce40.js";import"../../spinner/component.js";import"../../image/types.js";import"../../image/utils.js";import"../components/cell/component.js";import"../../component-4b3baef3.js";import"../../__internal/utils/getDataTestId.js";import"../../hooks/useFocus/index.js";import"../components/cells/index.js";import"../../ChevronForwardS-c493a1a1.js";import"../components/empty-list/index.js";import"../languages/index.js";import"../components/error/index.js";import"../components/loading/index.js";import"../components/pagination/index.js";import"../../button/component.js";import"react-merge-refs";import"../../loader/component.js";import"../components/table-header/index.js";import"../../ControllerS-7a9ecca0.js";import"../../PlusS-15110f9d.js";import"rooks";import"../../flex/component.js";import"../../header-search/component.js";import"../../CloseS-e1864257.js";import"../../SearchM-ad181eb5.js";import"../hooks/use-table-data.js";import"../../parse-query-params-c07afed3.js";import"../../_commonjsHelpers-e9fa40dd.js";import"./get-query-from-url.js";import"./serialize-data.js";import"./sort-array.js";import"./is-object.js";import"./add-query-param.js";import"./set-query-to-url.js";import"./get-tags.js";import"./remove-query-param.js";import"./reset-query-param.js";
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-018cba31.js";import"../../typography/title/index.js";import"tslib";import"../../typography/title/component.js";import"../../use-image-render-component-0fcef252.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{a as r}from"../../tslib.es6-037db755.js";var e={dev:{limit:"_limit",page:"_page",sort:"_sort",order:"_order",searchText:"q"},prod:{limit:"limit",page:"page",sort:"sort",order:"order",searchText:"searchText"}};function t(t,o){return Object.entries(t).reduce((function(t,i){var s,a=i[0],d=i[1],c=e[o][a]||a;return r(((s={})[c]=d,s),t)}),{})}export{t as queryAdapter};
1
+ import{__assign as r}from"tslib";var e={dev:{limit:"_limit",page:"_page",sort:"_sort",order:"_order",searchText:"q"},prod:{limit:"limit",page:"page",sort:"sort",order:"order",searchText:"searchText"}};function t(t,o){return Object.entries(t).reduce((function(t,i){var a,s=i[0],c=i[1],d=e[o][s]||s;return r(((a={})[d]=c,a),t)}),{})}export{t as queryAdapter};
@@ -1 +1 @@
1
- import{p as r,q as a}from"../../parse-query-params-c07afed3.js";import{setQueryToUrl as e}from"./set-query-to-url.js";import"../../_commonjsHelpers-e9fa40dd.js";function o(o,t){var m=r();Array.isArray(m[o])&&t?m[o]=m[o].filter((function(r){return r!==t})):delete m[o],e(a(m,{arrayFormat:"comma"}))}export{o as removeQueryParam};
1
+ import{stringify as r}from"query-string";import{parseQueryParams as t}from"./parse-query-params.js";import{setQueryToUrl as o}from"./set-query-to-url.js";function e(e,a){var m=t();Array.isArray(m[e])&&a?m[e]=m[e].filter((function(r){return r!==a})):delete m[e],o(r(m,{arrayFormat:"comma"}))}export{e as removeQueryParam};
@@ -1 +1 @@
1
- import{a as r}from"../../tslib.es6-037db755.js";import{p as e,q as t}from"../../parse-query-params-c07afed3.js";import{setQueryToUrl as o}from"./set-query-to-url.js";import"../../_commonjsHelpers-e9fa40dd.js";function s(s){var a=Object.fromEntries(Object.entries(s).filter((function(r){return""!==r[1]}))),m=e(),i=m.searchText,p=m.order,c=m.sort;o(t(r({limit:10,page:1,searchText:i,order:p,sort:c},a),{arrayFormat:"comma"}))}export{s as resetQueryParam};
1
+ import{__assign as r}from"tslib";import{stringify as t}from"query-string";import{parseQueryParams as e}from"./parse-query-params.js";import{setQueryToUrl as o}from"./set-query-to-url.js";function m(m){var i=Object.fromEntries(Object.entries(m).filter((function(r){return""!==r[1]}))),s=e(),a=s.searchText,f=s.order,n=s.sort;o(t(r({limit:10,page:1,searchText:a,order:f,sort:n},i),{arrayFormat:"comma"}))}export{m as resetQueryParam};
@@ -1 +1 @@
1
- import e from"react";import{C as t,A as o}from"../CheckmarkCircleM-f684cf46.js";import{C as r}from"../CancelM-088e6940.js";import{C as a}from"../ClockCircleM-d218e835.js";import m from"classnames";import{Typography as n}from"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0071a3ac.js";import"../typography/title/index.js";import"../tslib.es6-037db755.js";import"../typography/title/component.js";var l="index-module_icon__xCdQr",c="index-module_text__0SHQw",i={negative:e.createElement(r,null),positive:e.createElement(t,null),secondary:e.createElement(a,null),accent:e.createElement(r,null),attention:e.createElement(o,null)},s=function(t){var o=t.text,r=t.view,a=void 0===r?"secondary":r,s=t.className;return e.createElement(n.Text,{className:m(c,s),tag:"div",view:"caps",weight:"medium",color:a},e.createElement("span",{className:l},i[a])," ",o)};export{s 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-018cba31.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"../CheckmarkCircleM-f684cf46.js";import"../CancelM-088e6940.js";import"../ClockCircleM-d218e835.js";import"classnames";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-0071a3ac.js";import"../typography/title/index.js";import"../tslib.es6-037db755.js";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-018cba31.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";
@@ -1 +1 @@
1
- import e from"react";import{C as t}from"../CloseS-e1864257.js";import o from"classnames";import{IconButton as r}from"../icon-button/component.js";import{Typography as i}from"../typography/component.js";import"../tslib.es6-037db755.js";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-0071a3ac.js";import"../typography/title/index.js";import"../typography/title/component.js";var s={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"},n=function(n){var a,m=n.text,d=n.onClick,l=n.onCloseClick,p=n.view,c=void 0===p?"primary":p,_=n.weight,u=void 0===_?"regular":_,g=n.leftAddons,x=n.rightAddons,y=n.dataTestId,h=n.size,f=void 0===h?"m":h,j=n.className;return e.createElement("button",{type:"button","data-test-id":y,onClick:d,disabled:!d&&!l,className:o(s.tag,s[c],s[f],(a={},a[s.show_cross]=!!l,a),j)},g&&e.createElement("span",{className:s.leftAddons},g),e.createElement(i.Text,{className:s.text,view:"title",weight:u,color:c},m),x&&e.createElement("span",{className:s.rightAddons},x),!!l&&e.createElement("span",{className:s.rightAddons},e.createElement(r,{icon:t,"data-test-id":y+"_close",type:"button",view:"ghost","aria-label":"close-tag",onClick:function(e){e.stopPropagation(),l()}})))};export{n 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-018cba31.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"../CloseS-e1864257.js";import"classnames";import"../icon-button/component.js";import"../tslib.es6-037db755.js";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-0071a3ac.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-018cba31.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"../CloseS-e1864257.js";import"classnames";import"../icon-button/component.js";import"../tslib.es6-037db755.js";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-0071a3ac.js";import"../typography/title/index.js";import"../typography/title/component.js";var e="index-module_tags__C28AJ",r=function(r){var n=r.tags,i=r.view,m=void 0===i?"primary":i,p=r.onClick,s=r.onCloseClick;return o.createElement("div",{className:e},(null==n?void 0:n.length)&&n.map((function(e){return o.createElement(t,{key:e,text:e,onClick:p,onCloseClick:s,view:m})})))};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-018cba31.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"../CloseS-e1864257.js";import"classnames";import"../icon-button/component.js";import"../tslib.es6-037db755.js";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-0071a3ac.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-018cba31.js";import"../typography/title/index.js";import"../typography/title/component.js";
@@ -1 +1 @@
1
- import{_ as e,a as t}from"../tslib.es6-037db755.js";import*as o from"react";import n,{useLayoutEffect as r,useEffect as i,useRef as a,useCallback as d,forwardRef as s,createElement as l,useState as u}from"react";import c from"react-merge-refs";import m from"classnames";import{FormControl as f}from"../form-control/component.js";import{useFocus as h}from"../hooks/useFocus/index.js";function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},g.apply(this,arguments)}var p="undefined"!=typeof document?r:i,b=function(e,t){"function"!=typeof e?e.current=t:e(t)},x={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},v=function(e){Object.keys(x).forEach((function(t){e.style.setProperty(t,x[t],"important")}))},w=null,y=function(e,t){var o=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?o+t.borderSize:o-t.paddingSize};var z=function(){},_=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],C="undefined"!=typeof document&&!!document.documentElement.currentStyle,R=function(e){var t,n,i=(t=e,n=o.useRef(t),p((function(){n.current=t})),n);r((function(){var e=function(e){i.current(e)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[])},S=s((function(e,t){var o=e.cacheMeasurements,n=e.maxRows,i=e.minRows,s=e.onChange,u=void 0===s?z:s,c=e.onHeightChange,m=void 0===c?z:c,f=function(e,t){if(null==e)return{};var o,n,r={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);if("production"!==process.env.NODE_ENV&&f.style){if("maxHeight"in f.style)throw new Error("Using `style.maxHeight` for <TextareaAutosize/> is not supported. Please use `maxRows`.");if("minHeight"in f.style)throw new Error("Using `style.minHeight` for <TextareaAutosize/> is not supported. Please use `minRows`.")}var h=void 0!==f.value,p=a(null),x=function(e,t){var o=a();return d((function(n){e.current=n,o.current&&b(o.current,null),o.current=t,t&&b(t,n)}),[t])}(p,t),S=a(0),H=a(),A=function(){var e=p.current,t=o&&H.current?H.current:function(e){var t=window.getComputedStyle(e);if(null===t)return null;var o,n=(o=t,_.reduce((function(e,t){return e[t]=o[t],e}),{})),r=n.boxSizing;return""===r?null:(C&&"border-box"===r&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px"),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})}(e);if(t){H.current=t;var r=function(e,t,o,n){void 0===o&&(o=1),void 0===n&&(n=1/0),w||((w=document.createElement("textarea")).setAttribute("tabindex","-1"),w.setAttribute("aria-hidden","true"),v(w)),null===w.parentNode&&document.body.appendChild(w);var r=e.paddingSize,i=e.borderSize,a=e.sizingStyle,d=a.boxSizing;Object.keys(a).forEach((function(e){var t=e;w.style[t]=a[t]})),v(w),w.value=t;var s=y(w,e);w.value="x";var l=w.scrollHeight-r,u=l*o;"border-box"===d&&(u=u+r+i),s=Math.max(u,s);var c=l*n;return"border-box"===d&&(c=c+r+i),[s=Math.min(c,s),l]}(t,e.value||e.placeholder||"x",i,n),a=r[0],d=r[1];S.current!==a&&(S.current=a,e.style.setProperty("height",a+"px","important"),m(a,{rowHeight:d}))}};return"undefined"!=typeof document&&(r(A),R(A)),l("textarea",g({},f,{onChange:function(e){h||A(),u(e)},ref:x}))})),H={textarea:"index-module_textarea__91cCo",s:"index-module_s__EnuHV",m:"index-module_m__etAWo",l:"index-module_l__pP38o",hasLabel:"index-module_hasLabel__sk25A",resizeVertical:"index-module_resizeVertical__kct5e",focusVisible:"index-module_focusVisible__bLwRO",filled:"index-module_filled__t8LRd",counter:"index-module_counter__psEqA"},A=n.forwardRef((function(o,r){var s,l,g=o.autoComplete,p=void 0===g?"on":g,b=o.autosize,x=void 0===b||b,v=o.size,w=void 0===v?"s":v,y=o.block,z=void 0!==y&&y,_=o.bottomAddons,C=o.fieldClassName,R=o.className,A=o.dataTestId,E=o.disabled,L=o.error,F=o.hint,N=o.textareaClassName,k=o.label,O=o.leftAddons,V=o.onFocus,W=o.required,j=o.onBlur,B=o.onChange,T=o.onHeightChange,P=o.rightAddons,q=o.maxRows,M=o.minRows,I=o.maxHeight,U=o.resize,D=void 0===U?"none":U,G=o.value,J=o.defaultValue,K=o.maxLength,Q=void 0===K?500:K,X=o.counter,Y=o.rows,Z=void 0===Y?x?1:3:Y,$=e(o,["autoComplete","autosize","size","block","bottomAddons","fieldClassName","className","dataTestId","disabled","error","hint","textareaClassName","label","leftAddons","onFocus","required","onBlur","onChange","onHeightChange","rightAddons","maxRows","minRows","maxHeight","resize","value","defaultValue","maxLength","counter","rows"]),ee=void 0===G,te=a(null),oe=u(!1),ne=oe[0],re=oe[1],ie=u(J||""),ae=ie[0],de=ie[1],se=h(te,"keyboard")[0],le=Boolean(ee?ae:G);i((function(){x&&I&&te.current&&te.current.style&&(te.current.style.maxHeight=I+"px")}),[te,x,I]);var ue=d((function(e){re(!0),V&&V(e)}),[V]),ce=d((function(e){re(!1),j&&j(e)}),[j]),me=d((function(e){B&&B(e,{value:e.target.value}),ee&&de(e.target.value)}),[B,ee]),fe=t(t({},$),{className:m(H.textarea,H[w],(s={},s[H.hasLabel]=k,s[H.filled]=le,s[H.resizeVertical]="vertical"===D,s),N),autoComplete:p,disabled:E,onBlur:ce,onFocus:ue,onChange:me,value:ee?ae:G,rows:Z,ref:c([r,te]),"data-test-id":A});return n.createElement(f,{className:m(R),fieldClassName:m(C,(l={},l[H.focusVisible]=se,l)),size:w,block:z,required:W,disabled:E,filled:le||ne,focused:ne,error:L,label:k,hint:F,leftAddons:O,rightAddons:P,bottomAddons:_},x?n.createElement(S,t({},fe,{maxLength:Q,maxRows:q,minRows:M,onHeightChange:T})):n.createElement("textarea",t({maxLength:Q},fe,{style:{maxHeight:I}})),X&&n.createElement("span",{className:H.counter},(ee?ae.length:null==G?void 0:G.length)+" / "+(Q||"-")))}));A.defaultProps={autoComplete:"on",autosize:!0,size:"s",block:!1,resize:"none"};export{A as Textarea};
1
+ import{__rest as e,__assign as o}from"tslib";import t,{useRef as a,useState as l,useEffect as s,useCallback as r}from"react";import i from"react-merge-refs";import n from"react-textarea-autosize";import d from"classnames";import{FormControl as m}from"../form-control/component.js";import{useFocus as u}from"../hooks/useFocus/index.js";var c={textarea:"index-module_textarea__91cCo",s:"index-module_s__EnuHV",m:"index-module_m__etAWo",l:"index-module_l__pP38o",hasLabel:"index-module_hasLabel__sk25A",resizeVertical:"index-module_resizeVertical__kct5e",focusVisible:"index-module_focusVisible__bLwRO",filled:"index-module_filled__t8LRd",counter:"index-module_counter__psEqA"},f=t.forwardRef((function(f,x){var h,_,g=f.autoComplete,b=void 0===g?"on":g,v=f.autosize,p=void 0===v||v,C=f.size,z=void 0===C?"s":C,A=f.block,w=void 0!==A&&A,N=f.bottomAddons,L=f.fieldClassName,R=f.className,V=f.dataTestId,k=f.disabled,H=f.error,E=f.hint,q=f.textareaClassName,y=f.label,B=f.leftAddons,F=f.onFocus,j=f.required,I=f.onBlur,P=f.onChange,T=f.onHeightChange,O=f.rightAddons,W=f.maxRows,D=f.minRows,G=f.maxHeight,J=f.resize,K=void 0===J?"none":J,M=f.value,Q=f.defaultValue,S=f.maxLength,U=void 0===S?500:S,X=f.counter,Y=f.rows,Z=void 0===Y?p?1:3:Y,$=e(f,["autoComplete","autosize","size","block","bottomAddons","fieldClassName","className","dataTestId","disabled","error","hint","textareaClassName","label","leftAddons","onFocus","required","onBlur","onChange","onHeightChange","rightAddons","maxRows","minRows","maxHeight","resize","value","defaultValue","maxLength","counter","rows"]),ee=void 0===M,oe=a(null),te=l(!1),ae=te[0],le=te[1],se=l(Q||""),re=se[0],ie=se[1],ne=u(oe,"keyboard")[0],de=Boolean(ee?re:M);s((function(){p&&G&&oe.current&&oe.current.style&&(oe.current.style.maxHeight=G+"px")}),[oe,p,G]);var me=r((function(e){le(!0),F&&F(e)}),[F]),ue=r((function(e){le(!1),I&&I(e)}),[I]),ce=r((function(e){P&&P(e,{value:e.target.value}),ee&&ie(e.target.value)}),[P,ee]),fe=o(o({},$),{className:d(c.textarea,c[z],(h={},h[c.hasLabel]=y,h[c.filled]=de,h[c.resizeVertical]="vertical"===K,h),q),autoComplete:b,disabled:k,onBlur:ue,onFocus:me,onChange:ce,value:ee?re:M,rows:Z,ref:i([x,oe]),"data-test-id":V});return t.createElement(m,{className:d(R),fieldClassName:d(L,(_={},_[c.focusVisible]=ne,_)),size:z,block:w,required:j,disabled:k,filled:de||ae,focused:ae,error:H,label:y,hint:E,leftAddons:B,rightAddons:O,bottomAddons:N},p?t.createElement(n,o({},fe,{maxLength:U,maxRows:W,minRows:D,onHeightChange:T})):t.createElement("textarea",o({maxLength:U},fe,{style:{maxHeight:G}})),X&&t.createElement("span",{className:c.counter},(ee?re.length:null==M?void 0:M.length)+" / "+(U||"-")))}));f.defaultProps={autoComplete:"on",autosize:!0,size:"s",block:!1,resize:"none"};export{f as Textarea};
@@ -1 +1 @@
1
- export{Textarea}from"./component.js";import"../tslib.es6-037db755.js";import"react";import"react-merge-refs";import"classnames";import"../form-control/component.js";import"../hooks/useFocus/index.js";
1
+ export{Textarea}from"./component.js";import"tslib";import"react";import"react-merge-refs";import"react-textarea-autosize";import"classnames";import"../form-control/component.js";import"../hooks/useFocus/index.js";
@@ -1 +1 @@
1
- import{_ as e,a as o}from"../tslib.es6-037db755.js";import t,{forwardRef as n,useRef as r,useCallback as i,useEffect as s}from"react";import m from"react-merge-refs";import{CSSTransition as a}from"react-transition-group";import l from"classnames";import{useClickOutside as c}from"../hooks/useClickOutside/index.js";import{usePrevious as u}from"../hooks/usePrevious/index.js";import{Popover as p}from"../popover/component.js";import{Portal as f}from"../portal/component.js";import{ToastPlate as d}from"../toast-plate/component.js";import"react-popper";import"../stack/context.js";import"../stack/component.js";import"react-dom";import"../portal/utils.js";import"../CheckmarkCircleM-f684cf46.js";import"../ClockCircleM-d218e835.js";import"../CloseS-e1864257.js";import"../button/component.js";import"../hooks/useFocus/index.js";import"../loader/component.js";var _="index-module_toastPlate__QcyxC",x="index-module_popover__CzEm-",C="index-module_block__qnPJw",j="index-module_fixed__U9hsM",v={enter:"index-module_enter__mfllY",enterActive:"index-module_enterActive__iRE6x",exit:"index-module_exit__lf3xl",exitActive:"index-module_exitActive__qssLn"},E=n((function(n,E){var k,h=n.anchorElement,b=n.position,M=n.offset,y=n.open,P=n.autoCloseDelay,g=void 0===P?3e3:P,N=n.className,T=n.bottomOffset,A=n.style,L=void 0===A?{}:A,O=n.block,S=n.onMouseEnter,w=n.onMouseLeave,q=n.onTouchStart,D=n.onClose,z=n.getPortalContainer,F=e(n,["anchorElement","position","offset","open","autoCloseDelay","className","bottomOffset","style","block","onMouseEnter","onMouseLeave","onTouchStart","onClose","getPortalContainer"]),J=r(null),Q=r(0),R=u(y),U=i((function(){clearTimeout(Q.current),Q.current=window.setTimeout(D,g)}),[g,D]),Y=i((function(){clearTimeout(Q.current)}),[]),B=i((function(e){Y(),S&&S(e)}),[S,Y]),G=i((function(e){U(),w&&w(e)}),[w,U]),H=i((function(e){Y(),q&&q(e)}),[q,Y]),I=i((function(){D(),Y()}),[D,Y]);c(J,I),s((function(){return y!==R&&y&&U(),function(){Y()}}),[y,R,U,Y]);var K={block:O,onClose:D,onMouseEnter:B,onMouseLeave:G,onTouchStart:H,ref:m([E,J])};return h?t.createElement(p,{open:y,anchorElement:h,position:b,offset:M,popperClassName:l(x,(k={},k[C]=O,k)),transition:{timeout:150},getPortalContainer:z},t.createElement(d,o({},F,{style:L,className:N},K))):t.createElement(f,{getPortalContainer:z},t.createElement(a,{unmountOnExit:!0,in:y,timeout:150,classNames:v},t.createElement(d,o({},F,{className:l(j,_,N),style:o(o({},L),{bottom:T&&T+"px"})},K))))}));export{E as Toast};
1
+ import{__rest as o,__assign as e}from"tslib";import t,{forwardRef as n,useRef as r,useCallback as i,useEffect as s}from"react";import m from"react-merge-refs";import{CSSTransition as a}from"react-transition-group";import l from"classnames";import{useClickOutside as c}from"../hooks/useClickOutside/index.js";import{usePrevious as p}from"../hooks/usePrevious/index.js";import{Popover as u}from"../popover/component.js";import{Portal as f}from"../portal/component.js";import{ToastPlate as d}from"../toast-plate/component.js";import"react-popper";import"../stack/context.js";import"../stack/component.js";import"react-dom";import"../portal/utils.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"../hooks/useFocus/index.js";import"../loader/component.js";var _="index-module_toastPlate__QcyxC",x="index-module_popover__CzEm-",C="index-module_block__qnPJw",k="index-module_fixed__U9hsM",h={enter:"index-module_enter__mfllY",enterActive:"index-module_enterActive__iRE6x",exit:"index-module_exit__lf3xl",exitActive:"index-module_exitActive__qssLn"},v=n((function(n,v){var E,j=n.anchorElement,M=n.position,b=n.offset,y=n.open,P=n.autoCloseDelay,g=void 0===P?3e3:P,N=n.className,T=n.bottomOffset,A=n.style,L=void 0===A?{}:A,O=n.block,S=n.onMouseEnter,w=n.onMouseLeave,q=n.onTouchStart,D=n.onClose,z=n.getPortalContainer,F=o(n,["anchorElement","position","offset","open","autoCloseDelay","className","bottomOffset","style","block","onMouseEnter","onMouseLeave","onTouchStart","onClose","getPortalContainer"]),J=r(null),Q=r(0),R=p(y),U=i((function(){clearTimeout(Q.current),Q.current=window.setTimeout(D,g)}),[g,D]),Y=i((function(){clearTimeout(Q.current)}),[]),B=i((function(o){Y(),S&&S(o)}),[S,Y]),G=i((function(o){U(),w&&w(o)}),[w,U]),H=i((function(o){Y(),q&&q(o)}),[q,Y]),I=i((function(){D(),Y()}),[D,Y]);c(J,I),s((function(){return y!==R&&y&&U(),function(){Y()}}),[y,R,U,Y]);var K={block:O,onClose:D,onMouseEnter:B,onMouseLeave:G,onTouchStart:H,ref:m([v,J])};return j?t.createElement(u,{open:y,anchorElement:j,position:M,offset:b,popperClassName:l(x,(E={},E[C]=O,E)),transition:{timeout:150},getPortalContainer:z},t.createElement(d,e({},F,{style:L,className:N},K))):t.createElement(f,{getPortalContainer:z},t.createElement(a,{unmountOnExit:!0,in:y,timeout:150,classNames:h},t.createElement(d,e({},F,{className:l(k,_,N),style:e(e({},L),{bottom:T&&T+"px"})},K))))}));export{v as Toast};
@@ -1 +1 @@
1
- export{Toast}from"./component.js";import"../tslib.es6-037db755.js";import"react";import"react-merge-refs";import"react-transition-group";import"classnames";import"../hooks/useClickOutside/index.js";import"../hooks/usePrevious/index.js";import"../popover/component.js";import"react-popper";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";import"../toast-plate/component.js";import"../CheckmarkCircleM-f684cf46.js";import"../ClockCircleM-d218e835.js";import"../CloseS-e1864257.js";import"../button/component.js";import"../hooks/useFocus/index.js";import"../loader/component.js";
1
+ export{Toast}from"./component.js";import"tslib";import"react";import"react-merge-refs";import"react-transition-group";import"classnames";import"../hooks/useClickOutside/index.js";import"../hooks/usePrevious/index.js";import"../popover/component.js";import"react-popper";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";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"../hooks/useFocus/index.js";import"../loader/component.js";
@@ -1 +1 @@
1
- import{_ as e,a as t}from"../tslib.es6-037db755.js";import o from"react";import i from"react-dom";import s from"classnames";import{ToastPlate as r}from"../toast-plate/component.js";import{useTimer as n}from"./use-timer.js";import"../CheckmarkCircleM-f684cf46.js";import"../ClockCircleM-d218e835.js";import"../CloseS-e1864257.js";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";var a,l="index-module_isVisible__kvaxX",m="index-module_mobile__ARgiW",d="index-module_isClosing__fMPDi",p="index-module_toastContent__WxLt6";"undefined"!=typeof window&&((a=document.createElement("div")).setAttribute("id","toast_manager"),document.body.appendChild(a));var u=function(u){var c,f=u.className;u.children;var v=u.offset,x=void 0===v?108:v,C=u.hasCloser,h=void 0===C||C;u.onClose;var _=u.text;u.onMouseEnter,u.onMouseLeave;var b=u.style,y=u.position,j=void 0===y?"bottom":y,g=u.delay,M=void 0===g?3e3:g,w=e(u,["className","children","offset","hasCloser","onClose","text","onMouseEnter","onMouseLeave","style","position","delay"]);if("undefined"==typeof window)return null;var E,L=window.innerWidth>600;a.setAttribute("style",(E="position: fixed; z-index: 99999999;",L?E+" "+j+": "+x+"px; right: 30px":E+" top: "+x+"px; right: 30px; left: 30px"));var k=document.createElement("div");k.classList.remove(d),k.setAttribute("id","toast_wrap-"+Math.random()),k.setAttribute("style","margin-bottom: 18px"),a.appendChild(k);var A=function(){k.classList.add(d),setTimeout((function(){null==a||a.removeChild(k)}),300)},N=n(A,M),W=N.pause,z=N.resume;return k.addEventListener("mouseenter",(function(){W()})),k.addEventListener("mouseleave",(function(){z()})),i.render(o.createElement(r,t({hasCloser:h,className:s((c={},c[l]=!0,c[m]=!L,c),f),contentClassName:p,style:t({right:0,position:"relative"},b),role:"alert",onClose:A},w),_),k),null};export{u as ToastNotifier};
1
+ import{__rest as e,__assign as t}from"tslib";import o from"react";import i from"react-dom";import s from"classnames";import{ToastPlate as n}from"../toast-plate/component.js";import{useTimer as r}from"./use-timer.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"../hooks/useFocus/index.js";import"../loader/component.js";var a,l="index-module_isVisible__kvaxX",d="index-module_mobile__ARgiW",m="index-module_isClosing__fMPDi",p="index-module_toastContent__WxLt6";"undefined"!=typeof window&&((a=document.createElement("div")).setAttribute("id","toast_manager"),document.body.appendChild(a));var c=function(c){var u,f=c.className;c.children;var v=c.offset,h=void 0===v?108:v,x=c.hasCloser,C=void 0===x||x;c.onClose;var _=c.text;c.onMouseEnter,c.onMouseLeave;var b=c.style,y=c.position,k=void 0===y?"bottom":y,M=c.delay,g=void 0===M?3e3:M,w=e(c,["className","children","offset","hasCloser","onClose","text","onMouseEnter","onMouseLeave","style","position","delay"]);if("undefined"==typeof window)return null;var E,L=window.innerWidth>600;a.setAttribute("style",(E="position: fixed; z-index: 99999999;",L?E+" "+k+": "+h+"px; right: 30px":E+" top: "+h+"px; right: 30px; left: 30px"));var A=document.createElement("div");A.classList.remove(m),A.setAttribute("id","toast_wrap-"+Math.random()),A.setAttribute("style","margin-bottom: 18px"),a.appendChild(A);var j=function(){A.classList.add(m),setTimeout((function(){null==a||a.removeChild(A)}),300)},N=r(j,g),W=N.pause,z=N.resume;return A.addEventListener("mouseenter",(function(){W()})),A.addEventListener("mouseleave",(function(){z()})),i.render(o.createElement(n,t({hasCloser:C,className:s((u={},u[l]=!0,u[d]=!L,u),f),contentClassName:p,style:t({right:0,position:"relative"},b),role:"alert",onClose:j},w),_),A),null};export{c as ToastNotifier};
@@ -1 +1 @@
1
- export{ToastNotifier}from"./component.js";import"../tslib.es6-037db755.js";import"react";import"react-dom";import"classnames";import"../toast-plate/component.js";import"../CheckmarkCircleM-f684cf46.js";import"../ClockCircleM-d218e835.js";import"../CloseS-e1864257.js";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"./use-timer.js";
1
+ export{ToastNotifier}from"./component.js";import"tslib";import"react";import"react-dom";import"classnames";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"../hooks/useFocus/index.js";import"../loader/component.js";import"./use-timer.js";
@@ -1 +1 @@
1
- import{_ as e,a as t}from"../tslib.es6-037db755.js";import o,{forwardRef as l,useCallback as n}from"react";import{A as a,C as d}from"../CheckmarkCircleM-f684cf46.js";import{C as s}from"../ClockCircleM-d218e835.js";import{C as m}from"../CloseS-e1864257.js";import c from"classnames";import{Button as i}from"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";var r={component:"index-module_component__2FCoC",hasCloser:"index-module_hasCloser__ig0bb",block:"index-module_block__aZI2E",positive:"index-module_positive__k8leE",checkmark:"index-module_checkmark__Uk-P-",attention:"index-module_attention__qo9dl",negative:"index-module_negative__rdTB6",default:"index-module_default__yyLQR",neutral:"index-module_neutral__KAatw",black:"index-module_black__c7gBa",closeButton:"index-module_closeButton__mFhAC",contentWrap:"index-module_contentWrap__-P3Jg",content:"index-module_content__ING2J",leftAddons:"index-module_leftAddons__Odkdf",title:"index-module_title__QZFUh",children:"index-module_children__tKSv7",bottomAddons:"index-module_bottomAddons__ixVcA"},_={negative:o.createElement(a,null),attention:o.createElement(a,null),positive:o.createElement(d,null),default:o.createElement(s,null),neutral:o.createElement(s,null),black:null},u=l((function(l,a){var d,s=l.dataTestId,u=l.className,f=l.contentClassName,k=l.hasCloser,p=l.leftAddons,v=l.view,C=void 0===v?"default":v,x=l.title,b=l.children,h=l.bottomAddons,E=l.block,A=l.onClose,N=e(l,["dataTestId","className","contentClassName","hasCloser","leftAddons","view","title","children","bottomAddons","block","onClose"]),g=n((function(e){A&&A(e)}),[A]);return o.createElement("div",t({ref:a,className:c(r.component,r[C],(d={},d[r.block]=E,d[r.hasCloser]=k,d),u),"data-test-id":s},N),o.createElement("div",{className:r.contentWrap},p&&o.createElement("div",{className:r.leftAddons},_[C]),_[C]&&!p&&o.createElement("div",{className:r.checkmark},_[C]),o.createElement("div",{className:c(f,r.content)},x&&o.createElement("div",{className:r.title},x),b&&o.createElement("div",{className:r.children},b),h&&o.createElement("div",{className:r.bottomAddons},h)),k&&o.createElement(i,t({className:c(r.closeButton),view:"ghost"},{onClick:g},{"aria-label":"закрыть",leftAddons:o.createElement(m,null)}))))}));export{u as ToastPlate};
1
+ import{__rest as e,__assign as t}from"tslib";import o,{forwardRef as l,useCallback as n}from"react";import a from"@alphakits/icons/dist/AlertCircleM";import d from"@alphakits/icons/dist/CheckmarkCircleM";import i from"@alphakits/icons/dist/ClockCircleM";import s from"@alphakits/icons/dist/CloseS";import m from"classnames";import{Button as c}from"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";var r={component:"index-module_component__2FCoC",hasCloser:"index-module_hasCloser__ig0bb",block:"index-module_block__aZI2E",positive:"index-module_positive__k8leE",checkmark:"index-module_checkmark__Uk-P-",attention:"index-module_attention__qo9dl",negative:"index-module_negative__rdTB6",default:"index-module_default__yyLQR",neutral:"index-module_neutral__KAatw",black:"index-module_black__c7gBa",closeButton:"index-module_closeButton__mFhAC",contentWrap:"index-module_contentWrap__-P3Jg",content:"index-module_content__ING2J",leftAddons:"index-module_leftAddons__Odkdf",title:"index-module_title__QZFUh",children:"index-module_children__tKSv7",bottomAddons:"index-module_bottomAddons__ixVcA"},_=l((function(l,_){var u,p=l.dataTestId,k=l.className,f=l.contentClassName,h=l.hasCloser,v=l.leftAddons,x=l.view,C=void 0===x?"default":x,b=l.title,E=l.children,A=l.bottomAddons,N=l.block,g=l.onClose,B=e(l,["dataTestId","className","contentClassName","hasCloser","leftAddons","view","title","children","bottomAddons","block","onClose"]),w={negative:o.createElement(a,null),attention:o.createElement(a,null),positive:o.createElement(d,null),default:o.createElement(i,null),neutral:o.createElement(i,null),black:null},F=n((function(e){g&&g(e)}),[g]);return o.createElement("div",t({ref:_,className:m(r.component,r[C],(u={},u[r.block]=N,u[r.hasCloser]=h,u),k),"data-test-id":p},B),o.createElement("div",{className:r.contentWrap},v&&o.createElement("div",{className:r.leftAddons},w[C]),w[C]&&!v&&o.createElement("div",{className:r.checkmark},w[C]),o.createElement("div",{className:m(f,r.content)},b&&o.createElement("div",{className:r.title},b),E&&o.createElement("div",{className:r.children},E),A&&o.createElement("div",{className:r.bottomAddons},A)),h&&o.createElement(c,t({className:m(r.closeButton),view:"ghost"},{onClick:F},{"aria-label":"закрыть",leftAddons:o.createElement(s,null)}))))}));export{_ as ToastPlate};
@@ -1 +1 @@
1
- export{ToastPlate}from"./component.js";import"../tslib.es6-037db755.js";import"react";import"../CheckmarkCircleM-f684cf46.js";import"../ClockCircleM-d218e835.js";import"../CloseS-e1864257.js";import"classnames";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";
1
+ export{ToastPlate}from"./component.js";import"tslib";import"react";import"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"@alphakits/icons/dist/CloseS";import"classnames";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";
@@ -1 +1 @@
1
- import{a as e}from"../tslib.es6-037db755.js";import o,{useState as t,useRef as r,useCallback as n,useEffect as c,cloneElement as a}from"react";import i from"react-node-resolver";import u from"classnames";import{Popover as s}from"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";var p="index-module_component__KCXt7",m="index-module_popper__M9HfK",l="index-module_target__nVe99",f=function(f){var d=f.children,v=f.content,C=f.trigger,w=void 0===C?"hover":C,T=f.onCloseDelay,h=void 0===T?300:T,g=f.onOpenDelay,_=void 0===g?300:g,k=f.dataTestId,N=f.onClose,O=f.onOpen,E=f.open,M=f.getPortalContainer,j=f.offset,x=void 0===j?[0,10]:j,b=f.position,y=f.contentClassName,P=f.arrowClassName,R=f.popoverClassName,S=f.updatePopover,D=t(!!E),K=D[0],L=D[1],A=t(null),F=A[0],H=A[1],I=o.useRef(null),V=o.useRef(null),X=r(0),q=function(){K||(L(!0),O&&O())},z=n((function(){K&&(L(!1),N&&N())}),[N,K]),B=function(e){return(!I.current||!I.current.contains(e))&&(!V.current||!V.current.contains(e))};c((function(){var e=function(e){var o=e.target;B(o)&&z()};return document.body.addEventListener("click",e),function(){document.body.removeEventListener("click",e),clearTimeout(X.current)}}),[z]);var G,J={onClick:function(e){d.props.onClick&&d.props.onClick(e),K?z():q()}},Q={onMouseOver:function(e){d.props.onMouseOver&&d.props.onMouseOver(e),clearTimeout(X.current),X.current=window.setTimeout((function(){q()}),_)},onMouseOut:function(e){d.props.onMouseOut&&d.props.onMouseOut(e),clearTimeout(X.current),X.current=window.setTimeout((function(){z()}),h)},onTouchStart:function(e){d.props.onTouchStart&&d.props.onTouchStart(e);var o=e.target;clearTimeout(X.current),B(o)?X.current=window.setTimeout((function(){z()}),h):q()}},U=void 0===E?K:E,W=n((function(e){I.current=e,H(I.current)}),[]);return o.createElement(o.Fragment,null,o.createElement(i,{innerRef:W},(G=function(o){var t={className:u(l,o.className)};switch(w){case"click":return e(e({},t),J);case"hover":return e(e({},t),Q);default:return{}}}(d.props),a(d,G))),F&&o.createElement(s,{anchorElement:F,open:U,getPortalContainer:M,arrowClassName:P,popperClassName:u(m,R),offset:x,withArrow:!0,position:b,update:S},function(){var t=function(){var o={ref:V,"data-test-id":k,className:u(p,y)};return"hover"===w?e(e({},o),Q):o}();return o.createElement("div",e({},t),v)}()))};export{f as Tooltip};
1
+ import{__assign as e}from"tslib";import o,{useState as t,useRef as r,useCallback as n,useEffect as c,cloneElement as i}from"react";import u from"react-node-resolver";import a from"classnames";import{Popover as s}from"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";var p="index-module_component__KCXt7",m="index-module_popper__M9HfK",l="index-module_target__nVe99",f=function(f){var d=f.children,v=f.content,C=f.trigger,w=void 0===C?"hover":C,T=f.onCloseDelay,h=void 0===T?300:T,g=f.onOpenDelay,_=void 0===g?300:g,k=f.dataTestId,N=f.onClose,O=f.onOpen,E=f.open,M=f.getPortalContainer,j=f.offset,x=void 0===j?[0,10]:j,y=f.position,b=f.contentClassName,P=f.arrowClassName,R=f.popoverClassName,S=f.updatePopover,D=t(!!E),K=D[0],L=D[1],A=t(null),F=A[0],H=A[1],I=o.useRef(null),V=o.useRef(null),X=r(0),q=function(){K||(L(!0),O&&O())},z=n((function(){K&&(L(!1),N&&N())}),[N,K]),B=function(e){return(!I.current||!I.current.contains(e))&&(!V.current||!V.current.contains(e))};c((function(){var e=function(e){var o=e.target;B(o)&&z()};return document.body.addEventListener("click",e),function(){document.body.removeEventListener("click",e),clearTimeout(X.current)}}),[z]);var G,J={onClick:function(e){d.props.onClick&&d.props.onClick(e),K?z():q()}},Q={onMouseOver:function(e){d.props.onMouseOver&&d.props.onMouseOver(e),clearTimeout(X.current),X.current=window.setTimeout((function(){q()}),_)},onMouseOut:function(e){d.props.onMouseOut&&d.props.onMouseOut(e),clearTimeout(X.current),X.current=window.setTimeout((function(){z()}),h)},onTouchStart:function(e){d.props.onTouchStart&&d.props.onTouchStart(e);var o=e.target;clearTimeout(X.current),B(o)?X.current=window.setTimeout((function(){z()}),h):q()}},U=void 0===E?K:E,W=n((function(e){I.current=e,H(I.current)}),[]);return o.createElement(o.Fragment,null,o.createElement(u,{innerRef:W},(G=function(o){var t={className:a(l,o.className)};switch(w){case"click":return e(e({},t),J);case"hover":return e(e({},t),Q);default:return{}}}(d.props),i(d,G))),F&&o.createElement(s,{anchorElement:F,open:U,getPortalContainer:M,arrowClassName:P,popperClassName:a(m,R),offset:x,withArrow:!0,position:y,update:S},function(){var t=function(){var o={ref:V,"data-test-id":k,className:a(p,b)};return"hover"===w?e(e({},o),Q):o}();return o.createElement("div",e({},t),v)}()))};export{f as Tooltip};
@@ -1 +1 @@
1
- export{Tooltip}from"./component.js";import"../tslib.es6-037db755.js";import"react";import"react-node-resolver";import"classnames";import"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";
1
+ export{Tooltip}from"./component.js";import"tslib";import"react";import"react-node-resolver";import"classnames";import"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/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-0071a3ac.js";import"../tslib.es6-037db755.js";import"./title/component.js";var e={Title:o,Text:t};export{e 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-018cba31.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-0071a3ac.js";import"./title/index.js";import"../tslib.es6-037db755.js";import"./title/component.js";
1
+ export{Typography}from"./component.js";import"./text/component.js";import"react";import"classnames";import"../colors.module-018cba31.js";import"./title/index.js";import"tslib";import"./title/component.js";
@@ -1 +1 @@
1
- import e from"react";import a from"classnames";import{c as r}from"../../colors.module-0071a3ac.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:a((d={},d[m.paragraph]="p"===i,d[m.uppercase]=n,d[m.through]=u,d[m[c]]=c,d),h,s&&r[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-018cba31.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-0071a3ac.js";
1
+ export{Text}from"./component.js";import"react";import"classnames";import"../../colors.module-018cba31.js";
@@ -1 +1 @@
1
- import e from"react";import r from"classnames";import{c as a}from"../../colors.module-0071a3ac.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
+ import e from"react";import r from"classnames";import{c as a}from"../../colors.module-018cba31.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{a as m}from"../../tslib.es6-037db755.js";import e from"react";import{Title as r}from"./component.js";import"classnames";import"../../colors.module-0071a3ac.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"},a=function(a){return e.createElement(r,m({},a,{styles:m(m({},o),l)}))};export{a 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-018cba31.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};
@@ -0,0 +1 @@
1
+ import e,{useRef as o,useEffect as n}from"react";import d from"@alphakits/icons/dist/PhotoM";import t from"@alphakits/icons/dist/PhotoS";import i from"classnames";import{Spinner as _}from"./spinner/component.js";import{Typography as l}from"./typography/component.js";import{textSizes as a}from"./image/types.js";import{getCharsFromText as r}from"./image/utils.js";var m={container:"index-module_container__bgmJ2",component:"index-module_component__Jf39Y",border:"index-module_border__3eTFR",addon:"index-module_addon__fLNNt",filled:"index-module_filled__-OKoH",default:"index-module_default__7yCk8",primary:"index-module_primary__NmfOf",secondary:"index-module_secondary__mFC44",thirdly:"index-module_thirdly__QoVoR",positive:"index-module_positive__KObTG",negative:"index-module_negative__JSntK",attention:"index-module_attention__xn0w7",accent:"index-module_accent__OKgO0",broken:"index-module_broken__U-IUD",image:"index-module_image__m6QQ3",hint:"index-module_hint__U93qq",hint_text:"index-module_hint_text__iACDk",textContent:"index-module_textContent__zwpfH",xs:"index-module_xs__WMoNb",s:"index-module_s__Hg5M9",m:"index-module_m__C8KqW",l:"index-module_l__bAVTF",xl:"index-module_xl__4V4rQ",auto:"index-module_auto__UzBuJ",xxl:"index-module_xxl__CbPtC",circle:"index-module_circle__a7zSR",ellipse:"index-module_ellipse__omc91",defs:"index-module_defs__-U1g-",textS:"index-module_textS__rn-Mq",textXs:"index-module_textXs__qpkPR",textM:"index-module_textM__mXb7s",textL:"index-module_textL__jV-69","addon-positive":"index-module_addon-positive__YNhNe","addon-negative":"index-module_addon-negative__XjAPo","addon-attention":"index-module_addon-attention__zeb5R","addon-accent":"index-module_addon-accent__pBWXg","addon-primary":"index-module_addon-primary__p-a27","addon-secondary":"index-module_addon-secondary__PYOhn","addon-thirdly":"index-module_addon-thirdly__0zlRh"},x={xs:"300x300",s:"300x300",m:"300x300",l:"300x300",xl:"300x300",xxl:"640x640",auto:"640x640"},s=function(s){var u=s.src,c=void 0===u?"":u,p=s.size,f=s.color,g=s.alt,v=s.text,h=s.icon,y=e.useState("loading"),b=y[0],w=y[1],z=o(0),C=function(e){var o=e.src,n=e.size;if((null==o?void 0:o.includes("escapenavigator-images.s3"))&&n){var d=o.split("amazonaws.com/")[1];return"https://d2z3luly8bezbw.cloudfront.net/fit-in/"+x[n]+"/"+d}return o}({src:c,size:p});return n((function(){if(C){z.current=Date.now(),w("loading");var e=new Image;e.src=C,e.onload=function(){w("loaded")},e.onerror=function(){Date.now()-z.current<2e3?setTimeout((function(){e.src=C}),500):w("error")}}else w("error")}),[C,p]),h||("loading"===b?e.createElement(_,{className:m.spinner,size:"s",view:"dark"}):"error"===b&&v?e.createElement(l.Text,{className:i(m.textContent,m[a[p]]),view:"caps",color:f,weight:"bold"},r(v.toUpperCase())):"error"===b?e.createElement(l.Text,{className:m.broken,tag:"div",view:"caps",color:f,weight:"bold"},"xs"===p?e.createElement(t,null):e.createElement(d,null)):e.createElement("img",{className:m.image,src:C,alt:g}))};export{m as s,s as u};