@lanaco/lnc-react-ui 4.0.211 → 4.0.212

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.
@@ -1,14 +1,14 @@
1
- "use strict";const l=require("react/jsx-runtime"),s=require("react"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./DragAndDropFile.cjs"),E=require("./UploadedFile.cjs"),f=require("./utils-CITgSxXe.cjs"),G=require("./FlexGrid.cjs"),g=require("./FlexGridItem.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),U=$.styled.div`
1
+ "use strict";const l=require("react/jsx-runtime"),s=require("react"),$=require("./emotion-styled.browser.esm-BtEseadx.cjs"),B=require("./DragAndDropFile.cjs"),E=require("./UploadedFile.cjs"),p=require("./utils-CITgSxXe.cjs"),G=require("./FlexGrid.cjs"),f=require("./FlexGridItem.cjs"),M=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),U=$.styled.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1rem;
5
5
 
6
- border: ${t=>`1px solid ${f.getColorRgbaValue(t.theme,"DragDropFiles",t.color,"enabled","border")}`};
7
- border-radius: ${t=>f.getBorderRadiusValueWithUnits(t.theme,"regular")};
6
+ border: ${t=>`1px solid ${p.getColorRgbaValue(t.theme,"DragDropFiles",t.color,"enabled","border")}`};
7
+ border-radius: ${t=>p.getBorderRadiusValueWithUnits(t.theme,"regular")};
8
8
  padding: 1.25rem 2.5rem;
9
9
 
10
10
  & .file-item-lnc {
11
11
  padding: 0.5rem 0.813rem;
12
12
  height: 100%;
13
13
  }
14
- `,V=s.forwardRef((t,D)=>{const{id:x="",disabled:b=!1,preventDefault:q=!1,acceptDropzone:C={},acceptInput:F,multiple:j=!0,selectFileText:R="Select file",dndFileText:w="Drag and drop file here or",control:S,showFileSize:d=!0,files:m=[],onChange:u=()=>{},onFocus:y=()=>{},onBlur:z=()=>{},onDropAccepted:h=()=>{},onDrop:p=()=>{},fileClick:A=()=>{},onCancel:k=()=>{},color:i="primary",size:c="small",dragAndDropFileProps:v,uploadedFileProps:n,..._}=t;var I={theme:M.useTheme(),size:c,color:i};const[r,a]=s.useState([]);s.useEffect(()=>{a(m)},[m]);const N=s.useCallback((e,o)=>{p&&p(e,o)},[]),O=s.useCallback(e=>{h&&h(e)},[]),T=e=>{var o;(o=e.target)!=null&&o.files?a([...r,...e.target.files]):e&&a([...r,...e]),u&&u(e)};return l.jsx(U,{ref:D,...I,..._,children:l.jsxs(G,{direction:"RowReverse",children:[l.jsx(g,{M:(r==null?void 0:r.length)>0?6:12,children:l.jsx(B,{id:x,disabled:b,preventDefault:q,acceptDropzone:C,acceptInput:F,multiple:j,selectFileText:R,dndFileText:w,control:S,showFileSize:d,showDnD:!((r==null?void 0:r.length)>0),onChange:T,onFocus:y,onBlur:z,onDrop:N,onDropAccepted:O,color:i,size:c,...v})}),r==null?void 0:r.map((e,o)=>l.jsx(g,{M:6,children:l.jsx(E,{fileName:e.name,fileSize:e.size,showFileSize:d,color:i,size:c,onFileClick:A,onCancel:k,...n,className:"file-item-lnc "+(n==null?void 0:n.className)},o)},o))]})})});module.exports=V;
14
+ `,V=s.forwardRef((t,g)=>{const{id:D="",disabled:x=!1,preventDefault:b=!1,acceptDropzone:q={},acceptInput:C,multiple:F=!0,selectFileText:j="Select file",dndFileText:R="Drag and drop file here or",control:w,showFileSize:a=!0,files:S=[],onChange:d=()=>{},onFocus:y=()=>{},onBlur:z=()=>{},onDropAccepted:m=()=>{},onDrop:u=()=>{},fileClick:A=()=>{},onCancel:k=()=>{},color:i="primary",size:c="small",dragAndDropFileProps:v,uploadedFileProps:n,..._}=t;var I={theme:M.useTheme(),size:c,color:i};const[r,h]=s.useState([]);s.useEffect(()=>{},[S]);const N=s.useCallback((e,o)=>{u&&u(e,o)},[]),O=s.useCallback(e=>{m&&m(e)},[]),T=e=>{var o;(o=e.target)!=null&&o.files?h([...r,...e.target.files]):e&&h([...r,...e]),d&&d(e)};return l.jsx(U,{ref:g,...I,..._,children:l.jsxs(G,{direction:"RowReverse",children:[l.jsx(f,{M:(r==null?void 0:r.length)>0?6:12,children:l.jsx(B,{id:D,disabled:x,preventDefault:b,acceptDropzone:q,acceptInput:C,multiple:F,selectFileText:j,dndFileText:R,control:w,showFileSize:a,showDnD:!((r==null?void 0:r.length)>0),onChange:T,onFocus:y,onBlur:z,onDrop:N,onDropAccepted:O,color:i,size:c,...v})}),r==null?void 0:r.map((e,o)=>l.jsx(f,{M:6,children:l.jsx(E,{fileName:e.name,fileSize:e.size,showFileSize:a,color:i,size:c,onFileClick:A,onCancel:k,...n,className:"file-item-lnc "+(n==null?void 0:n.className)},o)},o))]})})});module.exports=V;
@@ -1,11 +1,11 @@
1
1
  import { jsx as t, jsxs as B } from "react/jsx-runtime";
2
- import { forwardRef as G, useState as M, useEffect as U, useCallback as h } from "react";
2
+ import { forwardRef as G, useState as M, useEffect as U, useCallback as p } from "react";
3
3
  import { s as V } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import E from "./DragAndDropFile.js";
5
5
  import P from "./UploadedFile.js";
6
6
  import { c as W, b as q } from "./utils-B2fsQ6PS.js";
7
7
  import H from "./FlexGrid.js";
8
- import g from "./FlexGridItem.js";
8
+ import h from "./FlexGridItem.js";
9
9
  import { u as J } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
10
10
  const K = V.div`
11
11
  display: flex;
@@ -26,29 +26,29 @@ const K = V.div`
26
26
  padding: 0.5rem 0.813rem;
27
27
  height: 100%;
28
28
  }
29
- `, te = G((l, D) => {
29
+ `, te = G((l, g) => {
30
30
  const {
31
- id: u = "",
32
- disabled: x = !1,
33
- preventDefault: b = !1,
34
- acceptDropzone: C = {},
35
- acceptInput: F,
36
- multiple: z = !0,
37
- selectFileText: A = "Select file",
38
- dndFileText: R = "Drag and drop file here or",
39
- control: S,
40
- showFileSize: d = !0,
41
- files: c = [],
31
+ id: D = "",
32
+ disabled: u = !1,
33
+ preventDefault: x = !1,
34
+ acceptDropzone: b = {},
35
+ acceptInput: C,
36
+ multiple: F = !0,
37
+ selectFileText: z = "Select file",
38
+ dndFileText: A = "Drag and drop file here or",
39
+ control: R,
40
+ showFileSize: s = !0,
41
+ files: S = [],
42
42
  // ----------------------------------------
43
- onChange: m = () => {
43
+ onChange: d = () => {
44
44
  },
45
45
  onFocus: v = () => {
46
46
  },
47
47
  onBlur: w = () => {
48
48
  },
49
- onDropAccepted: f = () => {
49
+ onDropAccepted: c = () => {
50
50
  },
51
- onDrop: p = () => {
51
+ onDrop: m = () => {
52
52
  },
53
53
  fileClick: y = () => {
54
54
  },
@@ -62,32 +62,31 @@ const K = V.div`
62
62
  ...N
63
63
  } = l;
64
64
  var O = { theme: J(), size: n, color: a };
65
- const [r, s] = M([]);
65
+ const [r, f] = M([]);
66
66
  U(() => {
67
- s(c);
68
- }, [c]);
69
- const T = h((e, o) => {
70
- p && p(e, o);
71
- }, []), $ = h((e) => {
72
- f && f(e);
67
+ }, [S]);
68
+ const T = p((e, o) => {
69
+ m && m(e, o);
70
+ }, []), $ = p((e) => {
71
+ c && c(e);
73
72
  }, []), j = (e) => {
74
73
  var o;
75
- (o = e.target) != null && o.files ? s([...r, ...e.target.files]) : e && s([...r, ...e]), m && m(e);
74
+ (o = e.target) != null && o.files ? f([...r, ...e.target.files]) : e && f([...r, ...e]), d && d(e);
76
75
  };
77
- return /* @__PURE__ */ t(K, { ref: D, ...O, ...N, children: /* @__PURE__ */ B(H, { direction: "RowReverse", children: [
78
- /* @__PURE__ */ t(g, { M: (r == null ? void 0 : r.length) > 0 ? 6 : 12, children: /* @__PURE__ */ t(
76
+ return /* @__PURE__ */ t(K, { ref: g, ...O, ...N, children: /* @__PURE__ */ B(H, { direction: "RowReverse", children: [
77
+ /* @__PURE__ */ t(h, { M: (r == null ? void 0 : r.length) > 0 ? 6 : 12, children: /* @__PURE__ */ t(
79
78
  E,
80
79
  {
81
- id: u,
82
- disabled: x,
83
- preventDefault: b,
84
- acceptDropzone: C,
85
- acceptInput: F,
86
- multiple: z,
87
- selectFileText: A,
88
- dndFileText: R,
89
- control: S,
90
- showFileSize: d,
80
+ id: D,
81
+ disabled: u,
82
+ preventDefault: x,
83
+ acceptDropzone: b,
84
+ acceptInput: C,
85
+ multiple: F,
86
+ selectFileText: z,
87
+ dndFileText: A,
88
+ control: R,
89
+ showFileSize: s,
91
90
  showDnD: !((r == null ? void 0 : r.length) > 0),
92
91
  onChange: j,
93
92
  onFocus: v,
@@ -99,12 +98,12 @@ const K = V.div`
99
98
  ...I
100
99
  }
101
100
  ) }),
102
- r == null ? void 0 : r.map((e, o) => /* @__PURE__ */ t(g, { M: 6, children: /* @__PURE__ */ t(
101
+ r == null ? void 0 : r.map((e, o) => /* @__PURE__ */ t(h, { M: 6, children: /* @__PURE__ */ t(
103
102
  P,
104
103
  {
105
104
  fileName: e.name,
106
105
  fileSize: e.size,
107
- showFileSize: d,
106
+ showFileSize: s,
108
107
  color: a,
109
108
  size: n,
110
109
  onFileClick: y,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.211",
3
+ "version": "4.0.212",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [