@sunggang/ui-lib 0.1.75 → 0.1.77

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.
package/index.esm.css CHANGED
@@ -990,6 +990,9 @@ video {
990
990
  .overflow-hidden {
991
991
  overflow: hidden;
992
992
  }
993
+ .overflow-scroll {
994
+ overflow: scroll;
995
+ }
993
996
  .overflow-y-auto {
994
997
  overflow-y: auto;
995
998
  }
package/index.esm.js CHANGED
@@ -79589,7 +79589,7 @@ var DragDropImages = function(param) {
79589
79589
  return /*#__PURE__*/ jsxs("div", _object_spread_props$5(_object_spread$9({
79590
79590
  ref: provided.innerRef
79591
79591
  }, provided.droppableProps), {
79592
- className: "flex gap-2",
79592
+ className: "flex gap-2 overflow-scroll",
79593
79593
  children: [
79594
79594
  (imageUrls === null || imageUrls === void 0 ? void 0 : imageUrls.length) ? imageUrls.map(function(item, index) {
79595
79595
  return /*#__PURE__*/ jsx(PublicDraggable, {
@@ -79767,17 +79767,17 @@ var DropImage = function(param) {
79767
79767
  maxFiles: 10,
79768
79768
  maxSize: 5000000,
79769
79769
  onDrop: function(dropFiles) {
79770
- var newFiles = dropFiles.map(function(dropFile) {
79771
- return {
79772
- url: URL.createObjectURL(dropFile),
79773
- id: v4(),
79770
+ var newFiles = [];
79771
+ setFiles(dropFiles);
79772
+ dropFiles.forEach(function(dropFile) {
79773
+ Object.assign(dropFile, {
79774
79774
  preview: URL.createObjectURL(dropFile),
79775
- index: (previewFiles === null || previewFiles === void 0 ? void 0 : previewFiles.length) + 1
79776
- };
79777
- });
79778
- setFiles(newFiles);
79779
- setPreviewFiles(function(prev) {
79780
- return _to_consumable_array$2(prev).concat(_to_consumable_array$2(newFiles));
79775
+ uuid: v4()
79776
+ });
79777
+ newFiles.push(dropFile);
79778
+ setPreviewFiles(function(prev) {
79779
+ return _to_consumable_array$2(prev).concat(_to_consumable_array$2(newFiles));
79780
+ });
79781
79781
  });
79782
79782
  }
79783
79783
  }), getRootProps = _useDropzone.getRootProps, getInputProps = _useDropzone.getInputProps; _useDropzone.isDragActive; _useDropzone.isDragAccept; _useDropzone.isDragReject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.1.75",
3
+ "version": "0.1.77",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@mdx-js/react": "^3.0.1",
@@ -3,6 +3,7 @@ export interface ImageItem {
3
3
  url?: string;
4
4
  id?: string | null;
5
5
  index?: number;
6
+ preview?: string;
6
7
  }
7
8
  export interface DropImageProps {
8
9
  preview: boolean;