@lanaco/lnc-react-ui 4.0.103 → 4.0.104

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,4 +1,4 @@
1
- "use strict";const a=require("react/jsx-runtime"),$=require("react"),o=require("./index-BPVoEhTF.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-BWzf4vLl.cjs"),P=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),m=e=>`
1
+ "use strict";const n=require("react/jsx-runtime"),B=require("react"),o=require("./index-BPVoEhTF.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-BWzf4vLl.cjs"),F=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),m=e=>`
2
2
  outline: none;
3
3
  display: inline-flex;
4
4
  flex-direction: row;
@@ -13,9 +13,9 @@
13
13
 
14
14
  min-width: ${t.getSizeValueWithUnits(e.theme,e.size)};
15
15
  max-width: ${t.getSizeValueWithUnits(e.theme,e.size)};
16
- `,F=b.styled.i`
16
+ `,P=b.styled.i`
17
17
  font-size: 1.125rem;
18
- `,B=b.styled.button`
18
+ `,C=b.styled.button`
19
19
  ${e=>m(e)}
20
20
 
21
21
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonFilled",e.size,"enabled")};
@@ -83,7 +83,7 @@
83
83
  background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonTinted","gray","disabled","background","backgroundOpacity")};
84
84
  color: ${e=>t.getColorRgbaValue(e.theme,"ButtonTinted","gray","disabled","text")};
85
85
  }
86
- `,C=b.styled.button`
86
+ `,f=b.styled.button`
87
87
  ${e=>m(e)}
88
88
 
89
89
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
@@ -116,7 +116,7 @@
116
116
  cursor: default;
117
117
  background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic","gray","disabled","background","backgroundOpacity")};
118
118
  }
119
- `,w=b.styled(C)`
119
+ `,w=b.styled(f)`
120
120
  border: 1px solid
121
121
  ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","border","borderOpacity")};
122
- `,f=$.forwardRef((e,n)=>{const{icon:h=null,iconStyle:k="solid",borderRadius:V="regular",btnType:l="filled",disabled:R=!1,tabIndex:j=0,onFocus:r=()=>{},onBlur:i=()=>{},onClick:c=()=>{},onKeyDown:u=()=>{},size:y="small",color:T="primary",className:x="",style:z={},...d}=e,s={theme:P.useTheme(),color:T,size:y,style:z,className:"lnc-ui-icon-button "+x,disabled:R,borderRadius:V,btnType:l},v=()=>{var O=k==="solid"?"fas":"far";return`${O} fa-${h} fa-fw`},g=()=>$.isValidElement(h)?h:a.jsx(F,{className:v()});return l==="filled"?a.jsx(B,{ref:n,"data-type":"filled",...s,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,type:l,...d,children:g()}):l==="tinted"?a.jsx(S,{ref:n,"data-type":"tinted",...s,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:g()}):l==="outline"?a.jsx(w,{ref:n,"data-type":"outline",...s,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:g()}):l==="basic"?a.jsx(C,{ref:n,"data-type":"basic",...s,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:g()}):a.jsx(B,{ref:n,"data-type":"filled",size:y,...s,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:g()})});f.propTypes={icon:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.element]),iconStyle:o.PropTypes.oneOf(["regular","solid"]),borderRadius:o.PropTypes.oneOf(["slight","regular","edged","curved","none"]),btnType:o.PropTypes.oneOf(["filled","tinted","outline","basic"]),disabled:o.PropTypes.bool,tabIndex:o.PropTypes.number,onBlur:o.PropTypes.func,onFocus:o.PropTypes.func,onClick:o.PropTypes.func,onKeyDown:o.PropTypes.func,className:o.PropTypes.string,style:o.PropTypes.object,color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:o.PropTypes.oneOf(["small","medium","large"])};module.exports=f;
122
+ `,k=B.forwardRef((e,i)=>{const{icon:h=null,iconStyle:V="solid",borderRadius:R="regular",btnType:a="filled",disabled:T=!1,tabIndex:j=0,onFocus:r=()=>{},onBlur:c=()=>{},onClick:u=()=>{},onKeyDown:d=()=>{},size:y="small",color:$="primary",className:x="",style:z={},...s}=e,l={theme:F.useTheme(),color:$,size:y,style:z,className:"lnc-ui-icon-button",disabled:T,borderRadius:R,btnType:a},v=()=>{var O=V==="solid"?"fas":"far";return`${O} fa-${h} fa-fw`},g=()=>B.isValidElement(h)?h:n.jsx(P,{className:v()});return a==="filled"?n.jsx(C,{ref:i,"data-type":"filled",...l,className:`${l==null?void 0:l.className} ${$}-${a}-lnc-btn ${x}`,onFocus:r,onBlur:c,onClick:u,onKeyDown:d,type:a,...s,children:g()}):a==="tinted"?n.jsx(S,{ref:i,"data-type":"tinted",...l,onFocus:r,onBlur:c,onClick:u,onKeyDown:d,...s,children:g()}):a==="outline"?n.jsx(w,{ref:i,"data-type":"outline",...l,onFocus:r,onBlur:c,onClick:u,onKeyDown:d,...s,children:g()}):a==="basic"?n.jsx(f,{ref:i,"data-type":"basic",...l,onFocus:r,onBlur:c,onClick:u,onKeyDown:d,...s,children:g()}):n.jsx(C,{ref:i,"data-type":"filled",size:y,...l,onFocus:r,onBlur:c,onClick:u,onKeyDown:d,...s,children:g()})});k.propTypes={icon:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.element]),iconStyle:o.PropTypes.oneOf(["regular","solid"]),borderRadius:o.PropTypes.oneOf(["slight","regular","edged","curved","none"]),btnType:o.PropTypes.oneOf(["filled","tinted","outline","basic"]),disabled:o.PropTypes.bool,tabIndex:o.PropTypes.number,onBlur:o.PropTypes.func,onFocus:o.PropTypes.func,onClick:o.PropTypes.func,onKeyDown:o.PropTypes.func,className:o.PropTypes.string,style:o.PropTypes.object,color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:o.PropTypes.oneOf(["small","medium","large"])};module.exports=k;
@@ -1,8 +1,8 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as S, isValidElement as N } from "react";
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { forwardRef as I, isValidElement as S } from "react";
3
3
  import { P as o } from "./index-S5Cd7WrG.js";
4
4
  import { s as h } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { c as $, b as t, d as n, e as B, h as f, a as V } from "./utils-BXCGNjIy.js";
5
+ import { c as $, b as t, d as a, e as B, h as f, a as V } from "./utils-BXCGNjIy.js";
6
6
  import { u as j } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
7
  const k = (e) => `
8
8
  outline: none;
@@ -20,11 +20,11 @@ const k = (e) => `
20
20
  e.borderRadius
21
21
  )};
22
22
 
23
- min-width: ${n(e.theme, e.size)};
24
- max-width: ${n(e.theme, e.size)};
23
+ min-width: ${a(e.theme, e.size)};
24
+ max-width: ${a(e.theme, e.size)};
25
25
  `, D = h.i`
26
26
  font-size: 1.125rem;
27
- `, x = h.button`
27
+ `, v = h.button`
28
28
  ${(e) => k(e)}
29
29
 
30
30
  ${(e) => $(
@@ -49,8 +49,8 @@ const k = (e) => `
49
49
  "text"
50
50
  )};
51
51
 
52
- min-height: ${(e) => n(e.theme, e.size)};
53
- max-height: ${(e) => n(e.theme, e.size)};
52
+ min-height: ${(e) => a(e.theme, e.size)};
53
+ max-height: ${(e) => a(e.theme, e.size)};
54
54
 
55
55
  &:hover {
56
56
  background-color: ${(e) => t(
@@ -123,7 +123,7 @@ const k = (e) => `
123
123
  "text"
124
124
  )};
125
125
  }
126
- `, P = h.button`
126
+ `, K = h.button`
127
127
  ${(e) => k(e)}
128
128
 
129
129
  ${(e) => $(
@@ -151,8 +151,8 @@ const k = (e) => `
151
151
  "backgroundOpacity"
152
152
  )};
153
153
 
154
- min-height: ${(e) => n(e.theme, e.size)};
155
- max-height: ${(e) => n(e.theme, e.size)};
154
+ min-height: ${(e) => a(e.theme, e.size)};
155
+ max-height: ${(e) => a(e.theme, e.size)};
156
156
 
157
157
  &:hover {
158
158
  background-color: ${(e) => e.disabled !== !0 && t(
@@ -227,7 +227,7 @@ const k = (e) => `
227
227
  "text"
228
228
  )};
229
229
  }
230
- `, v = h.button`
230
+ `, T = h.button`
231
231
  ${(e) => k(e)}
232
232
 
233
233
  ${(e) => $(
@@ -254,8 +254,8 @@ const k = (e) => `
254
254
  "backgroundOpacity"
255
255
  )};
256
256
 
257
- min-height: ${(e) => n(e.theme, e.size)};
258
- max-height: ${(e) => n(e.theme, e.size)};
257
+ min-height: ${(e) => a(e.theme, e.size)};
258
+ max-height: ${(e) => a(e.theme, e.size)};
259
259
 
260
260
  &:hover {
261
261
  background-color: ${(e) => t(
@@ -324,7 +324,7 @@ const k = (e) => `
324
324
  "backgroundOpacity"
325
325
  )};
326
326
  }
327
- `, K = h(v)`
327
+ `, U = h(T)`
328
328
  border: 1px solid
329
329
  ${(e) => t(
330
330
  e.theme,
@@ -334,112 +334,113 @@ const k = (e) => `
334
334
  "border",
335
335
  "borderOpacity"
336
336
  )};
337
- `, U = S((e, c) => {
337
+ `, W = I((e, i) => {
338
338
  const {
339
339
  icon: g = null,
340
- iconStyle: T = "solid",
341
- borderRadius: O = "regular",
340
+ iconStyle: O = "solid",
341
+ borderRadius: z = "regular",
342
342
  btnType: l = "filled",
343
- disabled: z = !1,
344
- tabIndex: W = 0,
343
+ disabled: F = !1,
344
+ tabIndex: E = 0,
345
345
  //----------------
346
- onFocus: i = () => {
346
+ onFocus: d = () => {
347
347
  },
348
- onBlur: d = () => {
348
+ onBlur: r = () => {
349
349
  },
350
- onClick: r = () => {
350
+ onClick: u = () => {
351
351
  },
352
- onKeyDown: u = () => {
352
+ onKeyDown: b = () => {
353
353
  },
354
354
  //----------------
355
355
  size: y = "small",
356
- color: F = "primary",
356
+ color: x = "primary",
357
357
  className: w = "",
358
358
  style: C = {},
359
- ...b
360
- } = e, s = {
359
+ ...s
360
+ } = e, n = {
361
361
  theme: j(),
362
- color: F,
362
+ color: x,
363
363
  size: y,
364
364
  style: C,
365
- className: "lnc-ui-icon-button " + w,
366
- disabled: z,
367
- borderRadius: O,
365
+ className: "lnc-ui-icon-button",
366
+ disabled: F,
367
+ borderRadius: z,
368
368
  btnType: l
369
- }, R = () => {
370
- var I = T === "solid" ? "fas" : "far";
371
- return `${I} fa-${g} fa-fw`;
372
- }, m = () => N(g) ? g : /* @__PURE__ */ a(D, { className: R() });
373
- return l === "filled" ? /* @__PURE__ */ a(
374
- x,
369
+ }, N = () => {
370
+ var R = O === "solid" ? "fas" : "far";
371
+ return `${R} fa-${g} fa-fw`;
372
+ }, m = () => S(g) ? g : /* @__PURE__ */ c(D, { className: N() });
373
+ return l === "filled" ? /* @__PURE__ */ c(
374
+ v,
375
375
  {
376
- ref: c,
376
+ ref: i,
377
377
  "data-type": "filled",
378
- ...s,
379
- onFocus: i,
380
- onBlur: d,
381
- onClick: r,
382
- onKeyDown: u,
378
+ ...n,
379
+ className: `${n == null ? void 0 : n.className} ${x}-${l}-lnc-btn ${w}`,
380
+ onFocus: d,
381
+ onBlur: r,
382
+ onClick: u,
383
+ onKeyDown: b,
383
384
  type: l,
384
- ...b,
385
+ ...s,
385
386
  children: m()
386
387
  }
387
- ) : l === "tinted" ? /* @__PURE__ */ a(
388
- P,
388
+ ) : l === "tinted" ? /* @__PURE__ */ c(
389
+ K,
389
390
  {
390
- ref: c,
391
+ ref: i,
391
392
  "data-type": "tinted",
393
+ ...n,
394
+ onFocus: d,
395
+ onBlur: r,
396
+ onClick: u,
397
+ onKeyDown: b,
392
398
  ...s,
393
- onFocus: i,
394
- onBlur: d,
395
- onClick: r,
396
- onKeyDown: u,
397
- ...b,
398
399
  children: m()
399
400
  }
400
- ) : l === "outline" ? /* @__PURE__ */ a(
401
- K,
401
+ ) : l === "outline" ? /* @__PURE__ */ c(
402
+ U,
402
403
  {
403
- ref: c,
404
+ ref: i,
404
405
  "data-type": "outline",
406
+ ...n,
407
+ onFocus: d,
408
+ onBlur: r,
409
+ onClick: u,
410
+ onKeyDown: b,
405
411
  ...s,
406
- onFocus: i,
407
- onBlur: d,
408
- onClick: r,
409
- onKeyDown: u,
410
- ...b,
411
412
  children: m()
412
413
  }
413
- ) : l === "basic" ? /* @__PURE__ */ a(
414
- v,
414
+ ) : l === "basic" ? /* @__PURE__ */ c(
415
+ T,
415
416
  {
416
- ref: c,
417
+ ref: i,
417
418
  "data-type": "basic",
419
+ ...n,
420
+ onFocus: d,
421
+ onBlur: r,
422
+ onClick: u,
423
+ onKeyDown: b,
418
424
  ...s,
419
- onFocus: i,
420
- onBlur: d,
421
- onClick: r,
422
- onKeyDown: u,
423
- ...b,
424
425
  children: m()
425
426
  }
426
- ) : /* @__PURE__ */ a(
427
- x,
427
+ ) : /* @__PURE__ */ c(
428
+ v,
428
429
  {
429
- ref: c,
430
+ ref: i,
430
431
  "data-type": "filled",
431
432
  size: y,
433
+ ...n,
434
+ onFocus: d,
435
+ onBlur: r,
436
+ onClick: u,
437
+ onKeyDown: b,
432
438
  ...s,
433
- onFocus: i,
434
- onBlur: d,
435
- onClick: r,
436
- onKeyDown: u,
437
- ...b,
438
439
  children: m()
439
440
  }
440
441
  );
441
442
  });
442
- U.propTypes = {
443
+ W.propTypes = {
443
444
  icon: o.oneOfType([o.string, o.element]),
444
445
  iconStyle: o.oneOf(["regular", "solid"]),
445
446
  borderRadius: o.oneOf([
@@ -476,5 +477,5 @@ U.propTypes = {
476
477
  size: o.oneOf(["small", "medium", "large"])
477
478
  };
478
479
  export {
479
- U as default
480
+ W as default
480
481
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lanaco/lnc-react-ui",
3
- "version": "4.0.103",
3
+ "version": "4.0.104",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [