@lanaco/lnc-react-ui 4.0.19 → 4.0.20

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.
@@ -27,4 +27,4 @@
27
27
  left: 50%;
28
28
  transform: translate(-50%, -50%);
29
29
  color: ${e=>o.getColorRgbaValue(e.theme,"Progress",e.color,"enabled","text")};
30
- `,d=i.forwardRef((e,T)=>{const{id:$="",showLabel:c=!1,progressPercentage:n=0,className:m="",style:u={},onChange:C=()=>{},size:g="small",color:b="primary",progressBarEndComponent:s,...h}=e,t=P.useTheme(),y=()=>{var p;if(i.isValidElement(s))return console.log("is valid"),i.cloneElement(s,{className:`progress-icon ${(p=s==null?void 0:s.props)==null?void 0:p.className}`})};return a.jsxs(f,{style:u,className:"lnc-ui-progress "+m,theme:t,size:g,showLabel:c,progressPercentage:n,...h,children:[a.jsx(x,{progressPercentage:n,theme:t,color:b,children:s!==null&&y()}),c&&a.jsxs(w,{theme:t,size:g,children:[n,"%"]})]})});d.propTypes={id:r.PropTypes.string,showLabel:r.PropTypes.bool,progressPercentage:r.PropTypes.number,onChange:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","disabled","information","neutral","gray"]),progressBarEndComponent:r.PropTypes.any};module.exports=d;
30
+ `,d=i.forwardRef((e,T)=>{const{id:$="",showLabel:c=!1,progressPercentage:t=0,className:m="",style:u={},onChange:C=()=>{},size:g="small",color:b="primary",progressBarEndComponent:s,...h}=e,n=P.useTheme(),y=()=>{var p;if(i.isValidElement(s))return i.cloneElement(s,{className:`progress-icon ${(p=s==null?void 0:s.props)==null?void 0:p.className}`})};return a.jsxs(f,{style:u,className:"lnc-ui-progress "+m,theme:n,size:g,showLabel:c,progressPercentage:t,...h,children:[a.jsx(x,{progressPercentage:t,theme:n,color:b,children:s!==null&&y()}),c&&a.jsxs(w,{theme:n,size:g,children:[t,"%"]})]})});d.propTypes={id:r.PropTypes.string,showLabel:r.PropTypes.bool,progressPercentage:r.PropTypes.number,onChange:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["small","medium","large"]),color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","disabled","information","neutral","gray"]),progressBarEndComponent:r.PropTypes.any};module.exports=d;
@@ -1,13 +1,13 @@
1
1
  import { jsxs as g, jsx as h } from "react/jsx-runtime";
2
2
  import { forwardRef as f, isValidElement as P, cloneElement as y } from "react";
3
3
  import { P as r } from "./index-BYnWp42a.js";
4
- import { n } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- import { a as t, g as x } from "./utils-C52T57HO.js";
4
+ import { n as t } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
+ import { a as n, g as x } from "./utils-C52T57HO.js";
6
6
  import { u as w } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
7
- const $ = n.div`
7
+ const $ = t.div`
8
8
  width: 100%;
9
9
  position: relative;
10
- background-color: ${(e) => t(
10
+ background-color: ${(e) => n(
11
11
  e.theme,
12
12
  "Progress",
13
13
  e.color,
@@ -17,11 +17,11 @@ const $ = n.div`
17
17
  height: ${(e) => e.theme.components.Progress.default.enabled.sizes[e.size]};
18
18
  border-radius: 5px;
19
19
  animation: progres 4s infinite linear;
20
- `, z = n.div`
20
+ `, z = t.div`
21
21
  position: relative;
22
22
  height: 100%;
23
23
  width: ${(e) => e.progressPercentage + "%"};
24
- background-color: ${(e) => t(
24
+ background-color: ${(e) => n(
25
25
  e.theme,
26
26
  "Progress",
27
27
  e.color,
@@ -38,14 +38,14 @@ const $ = n.div`
38
38
  top: 50%;
39
39
  transform: translate(50%, -50%);
40
40
  }
41
- `, v = n.label`
41
+ `, C = t.label`
42
42
  ${(e) => x(e.theme, "Progress", e.size, "enabled")};
43
43
  position: absolute;
44
44
  top: 50%;
45
45
  left: 50%;
46
46
  transform: translate(-50%, -50%);
47
- color: ${(e) => t(e.theme, "Progress", e.color, "enabled", "text")};
48
- `, C = f((e, N) => {
47
+ color: ${(e) => n(e.theme, "Progress", e.color, "enabled", "text")};
48
+ `, N = f((e, v) => {
49
49
  const {
50
50
  id: T = "",
51
51
  showLabel: i = !1,
@@ -56,13 +56,12 @@ const $ = n.div`
56
56
  },
57
57
  size: l = "small",
58
58
  color: p = "primary",
59
- // progressBarEndComponent = null,
60
59
  progressBarEndComponent: o,
61
60
  ...b
62
61
  } = e, a = w(), u = () => {
63
62
  var c;
64
63
  if (P(o))
65
- return console.log("is valid"), y(o, {
64
+ return y(o, {
66
65
  className: `progress-icon ${(c = o == null ? void 0 : o.props) == null ? void 0 : c.className}`
67
66
  });
68
67
  };
@@ -86,7 +85,7 @@ const $ = n.div`
86
85
  children: o !== null && u()
87
86
  }
88
87
  ),
89
- i && /* @__PURE__ */ g(v, { theme: a, size: l, children: [
88
+ i && /* @__PURE__ */ g(C, { theme: a, size: l, children: [
90
89
  s,
91
90
  "%"
92
91
  ] })
@@ -94,7 +93,7 @@ const $ = n.div`
94
93
  }
95
94
  );
96
95
  });
97
- C.propTypes = {
96
+ N.propTypes = {
98
97
  id: r.string,
99
98
  showLabel: r.bool,
100
99
  progressPercentage: r.number,
@@ -118,5 +117,5 @@ C.propTypes = {
118
117
  progressBarEndComponent: r.any
119
118
  };
120
119
  export {
121
- C as default
120
+ N as default
122
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.19",
3
+ "version": "4.0.20",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [