@bigbinary/neeto-image-uploader-frontend 2.3.10 → 2.3.11

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 (37) hide show
  1. package/app/javascript/src/translations/en.json +1 -1
  2. package/dist/AssetLibrary.js +6 -5
  3. package/dist/AssetLibrary.js.map +1 -1
  4. package/dist/BasicImageUploader.js +3 -3
  5. package/dist/ImageUploader.js +4 -3
  6. package/dist/ImageUploader.js.map +1 -1
  7. package/dist/ImageWithFallback-Csv6Oivd.js +51 -0
  8. package/dist/ImageWithFallback-Csv6Oivd.js.map +1 -0
  9. package/dist/ImageWithFallback-DeznMgbx.js +53 -0
  10. package/dist/ImageWithFallback-DeznMgbx.js.map +1 -0
  11. package/dist/cjs/AssetLibrary.js +6 -5
  12. package/dist/cjs/AssetLibrary.js.map +1 -1
  13. package/dist/cjs/BasicImageUploader.js +4 -4
  14. package/dist/cjs/BasicImageUploader.js.map +1 -1
  15. package/dist/cjs/ImageUploader.js +5 -4
  16. package/dist/cjs/ImageUploader.js.map +1 -1
  17. package/dist/cjs/index.js +5 -4
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/{index-By7BkNOh.js → index-BkKE5xo-.js} +124 -131
  20. package/dist/index-BkKE5xo-.js.map +1 -0
  21. package/dist/{index-vkjNhoF3.js → index-FbPHXCzL.js} +102 -109
  22. package/dist/index-FbPHXCzL.js.map +1 -0
  23. package/dist/index.js +5 -4
  24. package/dist/index.js.map +1 -1
  25. package/dist/{utils-tPaqWDxV.js → utils-BxC_k1lu.js} +100 -16
  26. package/dist/utils-BxC_k1lu.js.map +1 -0
  27. package/dist/{utils-B5WMTXlT.js → utils-WEbpTEyB.js} +100 -15
  28. package/dist/utils-WEbpTEyB.js.map +1 -0
  29. package/package.json +19 -18
  30. package/dist/ImageWithFallback-Dz9cyV2n.js +0 -144
  31. package/dist/ImageWithFallback-Dz9cyV2n.js.map +0 -1
  32. package/dist/ImageWithFallback-c9ANE1IE.js +0 -141
  33. package/dist/ImageWithFallback-c9ANE1IE.js.map +0 -1
  34. package/dist/index-By7BkNOh.js.map +0 -1
  35. package/dist/index-vkjNhoF3.js.map +0 -1
  36. package/dist/utils-B5WMTXlT.js.map +0 -1
  37. package/dist/utils-tPaqWDxV.js.map +0 -1
@@ -1,28 +1,28 @@
1
- import _objectWithoutProperties$1 from '@babel/runtime/helpers/objectWithoutProperties';
2
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
3
  import require$$0, { useState, useEffect, useRef, useCallback, createElement } from 'react';
5
- import { findBy, isPresent, noop } from '@bigbinary/neeto-cist';
4
+ import { isPresent, noop } from '@bigbinary/neeto-cist';
6
5
  import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
7
6
  import NeetoUIModal from '@bigbinary/neetoui/Modal';
8
- import Button from '@bigbinary/neetoui/Button';
9
7
  import Tab from '@bigbinary/neetoui/Tab';
10
8
  import Spinner from '@bigbinary/neetoui/Spinner';
11
9
  import Toastr from '@bigbinary/neetoui/Toastr';
12
10
  import Typography from '@bigbinary/neetoui/Typography';
13
- import { mergeLeft, mergeRight, identity, prop, equals } from 'ramda';
11
+ import { mergeRight, identity, prop, equals } from 'ramda';
14
12
  import { useTranslation, Trans } from 'react-i18next';
15
- import { c as OPTIONS, a as isNilOrEmpty, d as DEFAULT_CROP_CONFIG, e as isItemsCenter, o as onImageLoaded, g as getCloudFlareCroppedURL, f as getImageKitCroppedURL, h as getCropValues, j as IMAGES_PER_PAGE, k as INFINITE_SCROLLER_SIZES, l as INFINITE_SCROLLER_STYLE, T as TABS, A as ASSETS_DESTROY_URL, m as ASSETS_FETCH_URL, U as UNSPLASH_DEFAULT_NAME, n as UNSPLASH_DEFAULT_REQUEST_CONFIG, D as DEFAULT_UPLOAD_CONFIG, u as useUploadDropzone, p as UNSPLASH_URL } from './utils-B5WMTXlT.js';
13
+ import { b as isNilOrEmpty, c as DEFAULT_CROP_CONFIG, d as isItemsCenter, o as onImageLoaded, g as getCloudFlareCroppedURL, e as getImageKitCroppedURL, f as getCropValues, h as IMAGES_PER_PAGE, j as INFINITE_SCROLLER_SIZES, k as INFINITE_SCROLLER_STYLE, T as TABS, A as ASSETS_DESTROY_URL, l as ASSETS_FETCH_URL, U as UNSPLASH_DEFAULT_NAME, m as UNSPLASH_DEFAULT_REQUEST_CONFIG, D as DEFAULT_UPLOAD_CONFIG, u as useUploadDropzone, n as UNSPLASH_URL, a as ImageDirectUpload } from './utils-WEbpTEyB.js';
16
14
  import { a as useCreateBlob, u as useImageUploader, g as generateASCIIFileName } from './useImageUploader-RX88_Cp-.js';
17
15
  import { I as IS_DEVELOPMENT_OR_HEROKU_ENV, C as CLOUD_FLARE } from './index-CZjb2iXB.js';
18
16
  import classnames from 'classnames';
19
17
  import LeftArrow from '@bigbinary/neeto-icons/LeftArrow';
18
+ import Button from '@bigbinary/neetoui/Button';
20
19
  import { useMutation, useInfiniteQuery, useQueryClient, keepPreviousData } from '@tanstack/react-query';
21
20
  import axios from 'axios';
22
21
  import { useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
23
22
  import { withEventTargetValue, hasPermission } from '@bigbinary/neeto-commons-frontend/utils';
24
23
  import Input from '@bigbinary/neetoui/Input';
25
24
  import Switch from '@bigbinary/neetoui/Switch';
25
+ import Label from '@bigbinary/neetoui/Label';
26
26
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
27
27
  import { Q as QUERY_KEYS, A as ASSETS_STALE_TIME, U as UNSPLASH_STALE_TIME } from './query-B0eDmse7.js';
28
28
  import MenuHorizontal from '@bigbinary/neeto-icons/MenuHorizontal';
@@ -42,15 +42,6 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
42
42
  var css$2 = ".niu-modal {\n width: 95vw !important;\n height: 75vh !important;\n max-width: 1152px !important;\n max-height: 576px !important;\n position: relative !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX21vZGFsLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0E7RUFDRSxzQkFBQTtFQUNBLHVCQUFBO0VBQ0EsNEJBQUE7RUFDQSw0QkFBQTtFQUNBLDZCQUFBO0FBRkYiLCJzb3VyY2VzQ29udGVudCI6WyIvL0Fic3RyYWN0c1xuQGltcG9ydCBcIi4uL2Fic3RyYWN0cy92YXJpYWJsZXNcIjtcblxuLm5pdS1tb2RhbCB7XG4gIHdpZHRoOiAkbml1LW1vZGFsLXdpZHRoICFpbXBvcnRhbnQ7XG4gIGhlaWdodDogJG5pdS1tb2RhbC1oZWlnaHQgIWltcG9ydGFudDtcbiAgbWF4LXdpZHRoOiAkbml1LW1vZGFsLW1heC13aWR0aCAhaW1wb3J0YW50O1xuICBtYXgtaGVpZ2h0OiAkbml1LW1vZGFsLW1heC1oZWlnaHQgIWltcG9ydGFudDtcbiAgcG9zaXRpb246IHJlbGF0aXZlICFpbXBvcnRhbnQ7XG59XG4iXX0= */";
43
43
  n(css$2,{});
44
44
 
45
- var createOptions = function createOptions() {
46
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
47
- return OPTIONS.map(function (option) {
48
- return mergeLeft(findBy({
49
- key: option.key
50
- }, options), option);
51
- });
52
- };
53
-
54
45
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
55
46
 
56
47
  function getDefaultExportFromCjs (x) {
@@ -281,11 +272,11 @@ var Controls = function Controls(_ref) {
281
272
  setWidth(getActualCropWidth(crop.width));
282
273
  }, [crop]);
283
274
  return /*#__PURE__*/jsxs("div", {
284
- className: "flex flex-col p-4 md:w-2/6 ",
275
+ className: "flex flex-col space-y-6 p-4 md:w-2/6",
285
276
  children: [!hideControls && /*#__PURE__*/jsxs(Fragment, {
286
277
  children: [/*#__PURE__*/jsx(Switch, {
287
278
  checked: isFullImage,
288
- className: "flex-grow-0",
279
+ className: "w-full",
289
280
  label: t("neetoImageUploader.labels.selectOriginalImage"),
290
281
  onChange: function onChange() {
291
282
  return setIsFullImage(function (isFullImage) {
@@ -294,48 +285,60 @@ var Controls = function Controls(_ref) {
294
285
  }
295
286
  }), /*#__PURE__*/jsx(Switch, {
296
287
  checked: isAspectRatioLocked,
297
- className: "mt-4 flex-grow-0",
288
+ className: "w-full",
298
289
  disabled: isFullImage,
299
290
  label: t("neetoImageUploader.labels.lockAspectRatio"),
300
291
  onChange: onToggleAspectRatioLock
301
- }), /*#__PURE__*/jsx(Typography, {
302
- className: "mb-2 mt-6",
303
- style: "body2",
304
- children: t("neetoImageUploader.imageEditor.aspectRatio")
305
292
  }), /*#__PURE__*/jsxs("div", {
306
- className: "flex gap-4 self-start",
307
- children: [/*#__PURE__*/jsx(Input, {
308
- "data-cy": "aspect-ratio-width-input",
309
- disabled: isFullImage,
310
- size: "small",
311
- type: "number",
312
- value: aspectRatio.width,
313
- onChange: withEventTargetValue(handleAspectWidthChange)
314
- }), /*#__PURE__*/jsx(Typography, {
315
- children: " : "
316
- }), /*#__PURE__*/jsx(Input, {
317
- "data-cy": "aspect-ratio-height-input",
318
- disabled: isFullImage,
319
- size: "small",
320
- type: "number",
321
- value: aspectRatio.height,
322
- onChange: withEventTargetValue(handleAspectHeightChange)
293
+ className: "flex w-full items-start gap-2",
294
+ children: [/*#__PURE__*/jsx(Label, {
295
+ className: "w-24 pt-2",
296
+ children: t("neetoImageUploader.imageEditor.aspectRatio")
297
+ }), /*#__PURE__*/jsxs("div", {
298
+ className: "flex w-32 justify-between gap-1 self-start",
299
+ children: [/*#__PURE__*/jsx(Input, {
300
+ className: "w-12",
301
+ "data-cy": "aspect-ratio-width-input",
302
+ disabled: isFullImage,
303
+ type: "number",
304
+ value: aspectRatio.width,
305
+ onChange: withEventTargetValue(handleAspectWidthChange)
306
+ }), /*#__PURE__*/jsx(Typography, {
307
+ children: ":"
308
+ }), /*#__PURE__*/jsx(Input, {
309
+ className: "w-12",
310
+ "data-cy": "aspect-ratio-height-input",
311
+ disabled: isFullImage,
312
+ type: "number",
313
+ value: aspectRatio.height,
314
+ onChange: withEventTargetValue(handleAspectHeightChange)
315
+ })]
323
316
  })]
324
317
  })]
325
- }), /*#__PURE__*/jsx(Input, {
326
- className: "mt-4 flex-grow-0",
327
- disabled: isFullImage,
328
- label: t("neetoImageUploader.labels.width"),
329
- type: "number",
330
- value: Math.round(width),
331
- onChange: withEventTargetValue(setWidth)
332
- }), /*#__PURE__*/jsx(Input, {
333
- className: "mt-4 flex-grow-0",
334
- disabled: isFullImage,
335
- label: t("neetoImageUploader.labels.height"),
336
- type: "number",
337
- value: Math.round(height),
338
- onChange: withEventTargetValue(setHeight)
318
+ }), /*#__PURE__*/jsxs("div", {
319
+ className: "flex w-full items-start gap-2",
320
+ children: [/*#__PURE__*/jsx(Label, {
321
+ className: "w-24 pt-2",
322
+ children: t("neetoImageUploader.labels.width")
323
+ }), /*#__PURE__*/jsx(Input, {
324
+ className: "w-32 flex-grow-0",
325
+ disabled: isFullImage,
326
+ type: "number",
327
+ value: Math.round(width),
328
+ onChange: withEventTargetValue(setWidth)
329
+ })]
330
+ }), /*#__PURE__*/jsxs("div", {
331
+ className: "flex w-full items-start gap-2",
332
+ children: [/*#__PURE__*/jsx(Label, {
333
+ className: "w-24 pt-2",
334
+ children: t("neetoImageUploader.labels.height")
335
+ }), /*#__PURE__*/jsx(Input, {
336
+ className: "w-32 flex-grow-0",
337
+ disabled: isFullImage,
338
+ type: "number",
339
+ value: Math.round(height),
340
+ onChange: withEventTargetValue(setHeight)
341
+ })]
339
342
  }), /*#__PURE__*/jsx(Button, {
340
343
  className: "mt-6 self-start",
341
344
  "data-cy": "neeto-image-uploader-crop-submit-button",
@@ -1469,7 +1472,7 @@ var InfiniteScroller = function InfiniteScroller(_ref) {
1469
1472
  className: "neeto-ui-rounded-sm neeto-ui-bg-gray-100 group absolute h-full w-full",
1470
1473
  "data-cy": "library-image-card",
1471
1474
  id: "unsplashImage".concat(image.id),
1472
- children: [tab === TABS[1].key && /*#__PURE__*/jsxs(Fragment, {
1475
+ children: [tab === TABS[2].key && /*#__PURE__*/jsxs(Fragment, {
1473
1476
  children: [/*#__PURE__*/jsx("img", {
1474
1477
  "data-cy": "niu-unsplash-image-".concat(index),
1475
1478
  src: image === null || image === void 0 ? void 0 : (_image$urls = image.urls) === null || _image$urls === void 0 ? void 0 : _image$urls.regular,
@@ -1483,7 +1486,7 @@ var InfiniteScroller = function InfiniteScroller(_ref) {
1483
1486
  target: "_blank",
1484
1487
  children: [image === null || image === void 0 ? void 0 : (_image$user2 = image.user) === null || _image$user2 === void 0 ? void 0 : _image$user2.name, " | ", " ", t("neetoImageUploader.labels.unsplash")]
1485
1488
  })]
1486
- }), tab === TABS[0].key && /*#__PURE__*/jsxs(Fragment, {
1489
+ }), tab === TABS[1].key && /*#__PURE__*/jsxs(Fragment, {
1487
1490
  children: [hasPermission(VIEW_ROLES_PERMISSION) && isMenuButtonEnabled && /*#__PURE__*/jsx(Dropdown, {
1488
1491
  buttonSize: "small",
1489
1492
  buttonStyle: "tertiary",
@@ -1572,7 +1575,7 @@ var Images = function Images(_ref) {
1572
1575
  images: results,
1573
1576
  key: debouncedQuery,
1574
1577
  loadMore: fetchNextPage,
1575
- tab: TABS[0].key
1578
+ tab: TABS[1].key
1576
1579
  });
1577
1580
  };
1578
1581
 
@@ -1684,7 +1687,7 @@ var UnsplashLibrary = function UnsplashLibrary(_ref) {
1684
1687
  _context.prev = 9;
1685
1688
  _context.t0 = _context["catch"](0);
1686
1689
  Toastr.error(_context.t0);
1687
- setActiveTab(TABS[0].key);
1690
+ setActiveTab(TABS[1].key);
1688
1691
  setIsUploading(false);
1689
1692
  case 14:
1690
1693
  case "end":
@@ -1729,7 +1732,7 @@ var UnsplashLibrary = function UnsplashLibrary(_ref) {
1729
1732
  images: results,
1730
1733
  key: debouncedQuery,
1731
1734
  loadMore: fetchNextPage,
1732
- tab: TABS[1].key
1735
+ tab: TABS[2].key
1733
1736
  });
1734
1737
  };
1735
1738
 
@@ -1745,15 +1748,15 @@ var ImageLibrary = function ImageLibrary(_ref) {
1745
1748
  var _useTranslation = useTranslation(),
1746
1749
  t = _useTranslation.t;
1747
1750
  var debouncedQuery = useDebounce(query, 400);
1748
- var inputPlaceHolder = equals(tab, TABS[1].key) ? t("neetoImageUploader.placeholders.searchImageFromWeb") : t("neetoImageUploader.placeholders.searchImage");
1751
+ var inputPlaceHolder = equals(tab, TABS[2].key) ? t("neetoImageUploader.placeholders.searchImageFromWeb") : t("neetoImageUploader.placeholders.searchImage");
1749
1752
  useEffect(function () {
1750
1753
  setQuery("");
1751
1754
  }, [tab]);
1752
1755
  return /*#__PURE__*/jsxs("div", {
1753
- className: "w-full pb-2 pl-6 pt-1",
1756
+ className: "w-full px-6 pb-2 pt-1",
1754
1757
  children: [/*#__PURE__*/jsx(Input, {
1755
1758
  autoFocus: true,
1756
- className: "mb-4 mr-6",
1759
+ className: "mb-4",
1757
1760
  "data-cy": "niu-unsplash-image-picker-search-input",
1758
1761
  name: "text",
1759
1762
  placeholder: inputPlaceHolder,
@@ -1762,7 +1765,7 @@ var ImageLibrary = function ImageLibrary(_ref) {
1762
1765
  var value = _ref2.target.value;
1763
1766
  return setQuery(value);
1764
1767
  }
1765
- }), tab === TABS[0].key ? /*#__PURE__*/jsx(Images, {
1768
+ }), tab === TABS[1].key ? /*#__PURE__*/jsx(Images, {
1766
1769
  debouncedQuery: debouncedQuery,
1767
1770
  query: query,
1768
1771
  setSelectedImage: setSelectedImage
@@ -1776,7 +1779,6 @@ var ImageLibrary = function ImageLibrary(_ref) {
1776
1779
  });
1777
1780
  };
1778
1781
 
1779
- var _excluded = ["key"];
1780
1782
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1781
1783
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1782
1784
  var Modal = function Modal(_ref) {
@@ -1873,19 +1875,31 @@ var Modal = function Modal(_ref) {
1873
1875
  }),
1874
1876
  getRootProps = _useUploadDropzone.getRootProps,
1875
1877
  getInputProps = _useUploadDropzone.getInputProps,
1876
- isDragActive = _useUploadDropzone.isDragActive,
1877
- inputRef = _useUploadDropzone.inputRef;
1878
- var openFileUploadDialog = function openFileUploadDialog() {
1879
- var _inputRef$current;
1880
- return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
1881
- };
1882
- var options = createOptions([{
1883
- key: "local",
1884
- onClick: openFileUploadDialog
1885
- }]);
1878
+ isDragActive = _useUploadDropzone.isDragActive;
1886
1879
  useEffect(function () {
1887
1880
  setActiveTab(TABS[0].key);
1888
1881
  }, [isOpen]);
1882
+ var renderContent = function renderContent() {
1883
+ if (activeTab === "upload") {
1884
+ return /*#__PURE__*/jsx("div", {
1885
+ className: "flex-grow px-6 pb-6",
1886
+ children: /*#__PURE__*/jsx("div", {
1887
+ className: "h-full w-full overflow-y-auto",
1888
+ children: /*#__PURE__*/jsx(ImageDirectUpload, {
1889
+ isDisabled: isPresent(fixedAspectRatio),
1890
+ uploadConfig: uploadConfigWithDefaults,
1891
+ onDrop: uploadFile
1892
+ })
1893
+ })
1894
+ });
1895
+ }
1896
+ return /*#__PURE__*/jsx(ImageLibrary, {
1897
+ setActiveTab: setActiveTab,
1898
+ setIsUploading: setIsUploading,
1899
+ setSelectedImage: setSelectedImage,
1900
+ tab: activeTab
1901
+ });
1902
+ };
1889
1903
  return /*#__PURE__*/jsxs(NeetoUIModal, {
1890
1904
  isOpen: isOpen,
1891
1905
  className: "niu-modal",
@@ -1909,7 +1923,7 @@ var Modal = function Modal(_ref) {
1909
1923
  image: selectedImage,
1910
1924
  signedId: selectedImage === null || selectedImage === void 0 ? void 0 : selectedImage.signedId
1911
1925
  }) : /*#__PURE__*/jsxs("div", _objectSpread(_objectSpread({
1912
- className: "h-full flex-col"
1926
+ className: "flex h-full flex-col"
1913
1927
  }, getRootProps({
1914
1928
  onClick: function onClick(event) {
1915
1929
  return event.stopPropagation();
@@ -1921,42 +1935,21 @@ var Modal = function Modal(_ref) {
1921
1935
  children: t("neetoImageUploader.common.imageLibrary")
1922
1936
  })
1923
1937
  }), /*#__PURE__*/jsx("div", {
1924
- className: "px-6 py-2",
1925
- children: /*#__PURE__*/jsxs("div", {
1926
- className: "flex flex-col items-center justify-between gap-2 sm:flex-row",
1927
- children: [/*#__PURE__*/jsx("div", {
1928
- className: "flex gap-2",
1929
- children: /*#__PURE__*/jsx(Tab, {
1930
- size: "small",
1931
- children: TABS.map(function (tab) {
1932
- return /*#__PURE__*/jsx(Tab.Item, {
1933
- active: activeTab === tab.key,
1934
- "data-cy": tab.dataCy,
1935
- onClick: function onClick() {
1936
- return setActiveTab(tab.key);
1937
- },
1938
- children: tab.label
1939
- }, tab.key);
1940
- })
1941
- })
1942
- }), /*#__PURE__*/jsx("div", {
1943
- className: "flex gap-2",
1944
- children: options.map(function (_ref2) {
1945
- var key = _ref2.key,
1946
- otherProps = _objectWithoutProperties$1(_ref2, _excluded);
1947
- return /*#__PURE__*/createElement(Button, _objectSpread(_objectSpread({}, otherProps), {}, {
1948
- key: key,
1949
- size: "small"
1950
- }));
1951
- })
1952
- })]
1938
+ className: "flex gap-2 px-6 py-2",
1939
+ children: /*#__PURE__*/jsx(Tab, {
1940
+ size: "small",
1941
+ children: TABS.map(function (tab) {
1942
+ return /*#__PURE__*/jsx(Tab.Item, {
1943
+ active: activeTab === tab.key,
1944
+ "data-cy": tab.dataCy,
1945
+ onClick: function onClick() {
1946
+ return setActiveTab(tab.key);
1947
+ },
1948
+ children: tab.label
1949
+ }, tab.key);
1950
+ })
1953
1951
  })
1954
- }), /*#__PURE__*/jsx(ImageLibrary, {
1955
- setActiveTab: setActiveTab,
1956
- setIsUploading: setIsUploading,
1957
- setSelectedImage: setSelectedImage,
1958
- tab: activeTab
1959
- }), equals(activeTab, TABS[1].key) && /*#__PURE__*/jsx(NeetoUIModal.Footer, {
1952
+ }), renderContent(), equals(activeTab, TABS[2].key) && /*#__PURE__*/jsx(NeetoUIModal.Footer, {
1960
1953
  className: "flex items-center justify-center gap-2",
1961
1954
  children: /*#__PURE__*/jsx(Typography, {
1962
1955
  style: "body2",
@@ -1977,4 +1970,4 @@ var Modal = function Modal(_ref) {
1977
1970
  };
1978
1971
 
1979
1972
  export { Modal as M, constructCloudflareImageURL as c };
1980
- //# sourceMappingURL=index-vkjNhoF3.js.map
1973
+ //# sourceMappingURL=index-FbPHXCzL.js.map