@lanaco/lnc-react-ui 4.0.103 → 4.0.105

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/dist/Button.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";const n=require("react/jsx-runtime"),w=require("react"),o=require("./index-BPVoEhTF.cjs"),C=require("./index-DAOBjHnD.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-BWzf4vLl.cjs"),z=require("./Icon.cjs"),W=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),B={small:{regular:"1rem",icon:"0.75rem",justIcon:"0.5rem"},medium:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"},large:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"}},f=e=>`
1
+ "use strict";const a=require("react/jsx-runtime"),w=require("react"),l=require("./index-BPVoEhTF.cjs"),k=require("./index-DAOBjHnD.cjs"),d=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-BWzf4vLl.cjs"),I=require("./Icon.cjs"),P=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),f={small:{regular:"1rem",icon:"0.75rem",justIcon:"0.5rem"},medium:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"},large:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"}},T=e=>`
2
2
  outline: none;
3
3
  display: inline-flex;
4
4
  flex-direction: row;
@@ -11,14 +11,14 @@
11
11
 
12
12
  border-radius: ${t.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
13
13
 
14
- padding-left: ${e.hasLeadingIcon?B[e.size].icon:B[e.size].regular};
15
- padding-right: ${e.hasTrailingIcon?B[e.size].icon:B[e.size].regular};
16
- `,D=c.styled.span`
14
+ padding-left: ${e.hasLeadingIcon?f[e.size].icon:f[e.size].regular};
15
+ padding-right: ${e.hasTrailingIcon?f[e.size].icon:f[e.size].regular};
16
+ `,W=d.styled.span`
17
17
  padding-right: ${e=>e.size==="small"?"0.25rem":"0.5rem"};
18
- `,N=c.styled.span`
18
+ `,D=d.styled.span`
19
19
  padding-left: ${e=>e.size==="small"?"0.25rem":"0.5rem"};
20
- `,I=c.styled.button`
21
- ${e=>f(e)}
20
+ `,O=d.styled.button`
21
+ ${e=>T(e)}
22
22
 
23
23
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonFilled",e.size,"enabled")};
24
24
 
@@ -50,8 +50,8 @@
50
50
  background-color: ${e=>e.disabled===!1&&t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"active","background")};
51
51
  color: ${e=>e.disabled===!1&&t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"active","text")};
52
52
  }
53
- `,E=c.styled.button`
54
- ${e=>f(e)}
53
+ `,E=d.styled.button`
54
+ ${e=>T(e)}
55
55
 
56
56
  min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
57
57
  max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
@@ -86,8 +86,8 @@
86
86
  cursor: default;
87
87
  background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonTinted","gray","disabled","background")};
88
88
  }
89
- `,O=c.styled.button`
90
- ${e=>f(e)}
89
+ `,v=d.styled.button`
90
+ ${e=>T(e)}
91
91
 
92
92
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
93
93
 
@@ -121,7 +121,7 @@
121
121
  cursor: default;
122
122
  background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic","gray","disabled","background","backgroundOpacity")};
123
123
  }
124
- `,L=c.styled(O)`
124
+ `,L=d.styled(v)`
125
125
  border: 1px solid
126
126
  ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","border","borderOpacity")};
127
- `,v=w.forwardRef((e,d)=>{const{text:k="",iconStyle:T="solid",leadingIcon:x=null,trailingIcon:R=null,borderRadius:j="regular",btnType:l="filled",disabled:F=!1,tabIndex:u=0,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,onLeadingIconClick:_,onTrailingIconClick:K,size:$="small",color:V="primary",className:P="",style:S={},children:U,...h}=e,a={theme:W.useTheme(),color:V,size:$,style:S,disabled:F,borderRadius:j,btnType:l,className:"lnc-ui-button "},i=!C.isEmpty(x),r=!C.isEmpty(R),q=!C.isEmpty(k),y=()=>n.jsxs(n.Fragment,{children:[i&&n.jsx(D,{size:$,children:n.jsx(z,{icon:x,sizeInUnits:"1.125rem",iconStyle:T})}),k,U,r&&n.jsx(N,{size:$,children:n.jsx(z,{icon:R,sizeInUnits:"1.125rem",iconStyle:T})})]});return l==="filled"?n.jsx(I,{ref:d,"data-type":"filled",...a,className:`${a==null?void 0:a.className} ${V}-${l}-lnc-btn ${P}`,hasLeadingIcon:i,hasTrailingIcon:r,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,tabIndex:u,btnType:l,...h,children:y()}):l==="tinted"?n.jsx(E,{ref:d,"data-type":"tinted",...a,hasLeadingIcon:i,hasTrailingIcon:r,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,tabIndex:u,btnType:l,...h,children:y()}):l==="outline"?n.jsx(L,{ref:d,"data-type":"outline",...a,hasLeadingIcon:i,hasTrailingIcon:r,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,tabIndex:u,btnType:l,...h,children:y()}):l==="basic"?n.jsx(O,{ref:d,"data-type":"basic",...a,hasLeadingIcon:i,hasTrailingIcon:r,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,tabIndex:u,btnType:l,...h,children:y()}):n.jsx(I,{ref:d,"data-type":"filled",size:$,...a,hasLeadingIcon:i,hasTrailingIcon:r,onFocus:s,onBlur:g,onClick:b,onKeyDown:m,hasText:q,tabIndex:u,btnType:l,...h,children:y()})});v.propTypes={text:o.PropTypes.string,iconStyle:o.PropTypes.oneOf(["regular","solid"]),leadingIcon:o.PropTypes.string,trailingIcon:o.PropTypes.string,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=v;
127
+ `,j=w.forwardRef((e,u)=>{const{text:x="",iconStyle:R="solid",leadingIcon:V=null,trailingIcon:z=null,borderRadius:F="regular",btnType:n="filled",disabled:N=!1,tabIndex:s=0,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,onLeadingIconClick:_,onTrailingIconClick:K,size:C="small",color:i="primary",className:$="",style:S={},children:U,...y}=e,o={theme:P.useTheme(),color:i,size:C,style:S,disabled:N,borderRadius:F,btnType:n,className:"lnc-ui-button "},c=!k.isEmpty(V),r=!k.isEmpty(z),q=!k.isEmpty(x),B=()=>a.jsxs(a.Fragment,{children:[c&&a.jsx(W,{size:C,children:a.jsx(I,{icon:V,sizeInUnits:"1.125rem",iconStyle:R})}),x,U,r&&a.jsx(D,{size:C,children:a.jsx(I,{icon:z,sizeInUnits:"1.125rem",iconStyle:R})})]});return n==="filled"?a.jsx(O,{ref:u,"data-type":"filled",...o,className:`${o==null?void 0:o.className} ${i}-${n}-lnc-btn ${$}`,hasLeadingIcon:c,hasTrailingIcon:r,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,tabIndex:s,btnType:n,...y,children:B()}):n==="tinted"?a.jsx(E,{ref:u,"data-type":"tinted",...o,className:`${o==null?void 0:o.className} ${i}-${n}-lnc-btn ${$}`,hasLeadingIcon:c,hasTrailingIcon:r,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,tabIndex:s,btnType:n,...y,children:B()}):n==="outline"?a.jsx(L,{ref:u,"data-type":"outline",...o,className:`${o==null?void 0:o.className} ${i}-${n}-lnc-btn ${$}`,hasLeadingIcon:c,hasTrailingIcon:r,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,tabIndex:s,btnType:n,...y,children:B()}):n==="basic"?a.jsx(v,{ref:u,"data-type":"basic",...o,className:`${o==null?void 0:o.className} ${i}-${n}-lnc-btn ${$}`,hasLeadingIcon:c,hasTrailingIcon:r,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,tabIndex:s,btnType:n,...y,children:B()}):a.jsx(O,{ref:u,"data-type":"filled",size:C,...o,className:`${o==null?void 0:o.className} ${i}-${n}-lnc-btn ${$}`,hasLeadingIcon:c,hasTrailingIcon:r,onFocus:g,onBlur:b,onClick:m,onKeyDown:h,hasText:q,tabIndex:s,btnType:n,...y,children:B()})});j.propTypes={text:l.PropTypes.string,iconStyle:l.PropTypes.oneOf(["regular","solid"]),leadingIcon:l.PropTypes.string,trailingIcon:l.PropTypes.string,borderRadius:l.PropTypes.oneOf(["slight","regular","edged","curved","none"]),btnType:l.PropTypes.oneOf(["filled","tinted","outline","basic"]),disabled:l.PropTypes.bool,tabIndex:l.PropTypes.number,onBlur:l.PropTypes.func,onFocus:l.PropTypes.func,onClick:l.PropTypes.func,onKeyDown:l.PropTypes.func,className:l.PropTypes.string,style:l.PropTypes.object,color:l.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:l.PropTypes.oneOf(["small","medium","large"])};module.exports=j;
package/dist/Button.js CHANGED
@@ -1,12 +1,12 @@
1
- import { jsx as i, jsxs as W, Fragment as E } from "react/jsx-runtime";
2
- import { forwardRef as P } from "react";
1
+ import { jsx as l, jsxs as W, Fragment as E } from "react/jsx-runtime";
2
+ import { forwardRef as q } from "react";
3
3
  import { P as o } from "./index-S5Cd7WrG.js";
4
- import { i as y } from "./index-BlxaTV-D.js";
5
- import { s as d } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
- import { c as x, b as t, d as r, h as T, e as z, a as q } from "./utils-BXCGNjIy.js";
4
+ import { i as T } from "./index-BlxaTV-D.js";
5
+ import { s as u } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
+ import { c as z, b as t, d as r, h as I, e as v, a as A } from "./utils-BXCGNjIy.js";
7
7
  import w from "./Icon.js";
8
- import { u as A } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
9
- const k = {
8
+ import { u as G } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
9
+ const x = {
10
10
  small: {
11
11
  regular: "1rem",
12
12
  icon: "0.75rem",
@@ -22,7 +22,7 @@ const k = {
22
22
  icon: "1rem",
23
23
  justIcon: "0.5rem"
24
24
  }
25
- }, I = (e) => `
25
+ }, O = (e) => `
26
26
  outline: none;
27
27
  display: inline-flex;
28
28
  flex-direction: row;
@@ -33,21 +33,21 @@ const k = {
33
33
  cursor: pointer;
34
34
  color: ${!e.disabled && "white"};
35
35
 
36
- border-radius: ${q(
36
+ border-radius: ${A(
37
37
  e.theme,
38
38
  e.borderRadius
39
39
  )};
40
40
 
41
- padding-left: ${e.hasLeadingIcon ? k[e.size].icon : k[e.size].regular};
42
- padding-right: ${e.hasTrailingIcon ? k[e.size].icon : k[e.size].regular};
43
- `, G = d.span`
41
+ padding-left: ${e.hasLeadingIcon ? x[e.size].icon : x[e.size].regular};
42
+ padding-right: ${e.hasTrailingIcon ? x[e.size].icon : x[e.size].regular};
43
+ `, H = u.span`
44
44
  padding-right: ${(e) => e.size === "small" ? "0.25rem" : "0.5rem"};
45
- `, H = d.span`
45
+ `, J = u.span`
46
46
  padding-left: ${(e) => e.size === "small" ? "0.25rem" : "0.5rem"};
47
- `, R = d.button`
48
- ${(e) => I(e)}
47
+ `, R = u.button`
48
+ ${(e) => O(e)}
49
49
 
50
- ${(e) => x(
50
+ ${(e) => z(
51
51
  e.theme,
52
52
  "ButtonFilled",
53
53
  e.size,
@@ -73,7 +73,7 @@ const k = {
73
73
  max-height: ${(e) => r(e.theme, e.size)};
74
74
 
75
75
  &:disabled {
76
- ${(e) => e.disabled === !0 && T(e.theme)};
76
+ ${(e) => e.disabled === !0 && I(e.theme)};
77
77
  cursor: default;
78
78
  background-color: ${(e) => t(
79
79
  e.theme,
@@ -123,7 +123,7 @@ const k = {
123
123
  "focus",
124
124
  "text"
125
125
  )};
126
- ${(e) => !e.disabled && z(e.theme)};
126
+ ${(e) => !e.disabled && v(e.theme)};
127
127
  }
128
128
 
129
129
  &:active {
@@ -142,12 +142,12 @@ const k = {
142
142
  "text"
143
143
  )};
144
144
  }
145
- `, J = d.button`
146
- ${(e) => I(e)}
145
+ `, M = u.button`
146
+ ${(e) => O(e)}
147
147
 
148
148
  min-height: ${(e) => r(e.theme, e.size)};
149
149
  max-height: ${(e) => r(e.theme, e.size)};
150
- ${(e) => x(
150
+ ${(e) => z(
151
151
  e.theme,
152
152
  "ButtonTinted",
153
153
  e.size,
@@ -208,7 +208,7 @@ const k = {
208
208
  "focus",
209
209
  "text"
210
210
  )};
211
- ${(e) => e.disabled === !1 && z(e.theme)};
211
+ ${(e) => e.disabled === !1 && v(e.theme)};
212
212
  }
213
213
 
214
214
  &:active {
@@ -231,7 +231,7 @@ const k = {
231
231
  }
232
232
 
233
233
  &:disabled {
234
- ${(e) => e.disabled === !0 && T(e.theme)};
234
+ ${(e) => e.disabled === !0 && I(e.theme)};
235
235
  cursor: default;
236
236
  background-color: ${(e) => t(
237
237
  e.theme,
@@ -241,10 +241,10 @@ const k = {
241
241
  "background"
242
242
  )};
243
243
  }
244
- `, N = d.button`
245
- ${(e) => I(e)}
244
+ `, L = u.button`
245
+ ${(e) => O(e)}
246
246
 
247
- ${(e) => x(
247
+ ${(e) => z(
248
248
  e.theme,
249
249
  "ButtonTinted",
250
250
  e.size,
@@ -307,7 +307,7 @@ const k = {
307
307
  "text"
308
308
  )};
309
309
 
310
- ${(e) => !e.disabled && z(e.theme)};
310
+ ${(e) => !e.disabled && v(e.theme)};
311
311
  }
312
312
 
313
313
  &:active {
@@ -329,7 +329,7 @@ const k = {
329
329
  }
330
330
 
331
331
  &:disabled {
332
- ${(e) => e.disabled === !0 && T(e.theme)};
332
+ ${(e) => e.disabled === !0 && I(e.theme)};
333
333
  cursor: default;
334
334
  background-color: ${(e) => t(
335
335
  e.theme,
@@ -340,7 +340,7 @@ const k = {
340
340
  "backgroundOpacity"
341
341
  )};
342
342
  }
343
- `, M = d(N)`
343
+ `, Q = u(L)`
344
344
  border: 1px solid
345
345
  ${(e) => t(
346
346
  e.theme,
@@ -350,150 +350,154 @@ const k = {
350
350
  "border",
351
351
  "borderOpacity"
352
352
  )};
353
- `, Q = P((e, u) => {
353
+ `, X = q((e, s) => {
354
354
  const {
355
- text: v = "",
356
- iconStyle: O = "solid",
357
- leadingIcon: F = null,
358
- trailingIcon: C = null,
359
- borderRadius: L = "regular",
360
- btnType: n = "filled",
361
- disabled: S = !1,
362
- tabIndex: s = 0,
355
+ text: F = "",
356
+ iconStyle: C = "solid",
357
+ leadingIcon: N = null,
358
+ trailingIcon: j = null,
359
+ borderRadius: S = "regular",
360
+ btnType: a = "filled",
361
+ disabled: U = !1,
362
+ tabIndex: m = 0,
363
363
  //----------------
364
- onFocus: m,
365
- onBlur: b,
366
- onClick: g,
367
- onKeyDown: h,
368
- onLeadingIconClick: X,
369
- onTrailingIconClick: Y,
364
+ onFocus: b,
365
+ onBlur: g,
366
+ onClick: h,
367
+ onKeyDown: $,
368
+ onLeadingIconClick: Y,
369
+ onTrailingIconClick: Z,
370
370
  //----------------
371
- size: B = "small",
372
- color: j = "primary",
373
- className: U = "",
371
+ size: y = "small",
372
+ color: c = "primary",
373
+ className: f = "",
374
374
  style: D = {},
375
375
  children: V,
376
- ...$
377
- } = e, a = {
378
- theme: A(),
379
- color: j,
380
- size: B,
376
+ ...B
377
+ } = e, n = {
378
+ theme: G(),
379
+ color: c,
380
+ size: y,
381
381
  style: D,
382
- disabled: S,
383
- borderRadius: L,
384
- btnType: n,
382
+ disabled: U,
383
+ borderRadius: S,
384
+ btnType: a,
385
385
  className: "lnc-ui-button "
386
- }, l = !y(F), c = !y(C), K = !y(v), f = () => /* @__PURE__ */ W(E, { children: [
387
- l && /* @__PURE__ */ i(G, { size: B, children: /* @__PURE__ */ i(
386
+ }, i = !T(N), d = !T(j), K = !T(F), k = () => /* @__PURE__ */ W(E, { children: [
387
+ i && /* @__PURE__ */ l(H, { size: y, children: /* @__PURE__ */ l(
388
388
  w,
389
389
  {
390
- icon: F,
390
+ icon: N,
391
391
  sizeInUnits: "1.125rem",
392
- iconStyle: O
392
+ iconStyle: C
393
393
  }
394
394
  ) }),
395
- v,
395
+ F,
396
396
  V,
397
- c && /* @__PURE__ */ i(H, { size: B, children: /* @__PURE__ */ i(
397
+ d && /* @__PURE__ */ l(J, { size: y, children: /* @__PURE__ */ l(
398
398
  w,
399
399
  {
400
- icon: C,
400
+ icon: j,
401
401
  sizeInUnits: "1.125rem",
402
- iconStyle: O
402
+ iconStyle: C
403
403
  }
404
404
  ) })
405
405
  ] });
406
- return n === "filled" ? /* @__PURE__ */ i(
406
+ return a === "filled" ? /* @__PURE__ */ l(
407
407
  R,
408
408
  {
409
- ref: u,
409
+ ref: s,
410
410
  "data-type": "filled",
411
- ...a,
412
- className: `${a == null ? void 0 : a.className} ${j}-${n}-lnc-btn ${U}`,
413
- hasLeadingIcon: l,
414
- hasTrailingIcon: c,
415
- onFocus: m,
416
- onBlur: b,
417
- onClick: g,
418
- onKeyDown: h,
419
- tabIndex: s,
420
- btnType: n,
421
- ...$,
422
- children: f()
411
+ ...n,
412
+ className: `${n == null ? void 0 : n.className} ${c}-${a}-lnc-btn ${f}`,
413
+ hasLeadingIcon: i,
414
+ hasTrailingIcon: d,
415
+ onFocus: b,
416
+ onBlur: g,
417
+ onClick: h,
418
+ onKeyDown: $,
419
+ tabIndex: m,
420
+ btnType: a,
421
+ ...B,
422
+ children: k()
423
423
  }
424
- ) : n === "tinted" ? /* @__PURE__ */ i(
425
- J,
424
+ ) : a === "tinted" ? /* @__PURE__ */ l(
425
+ M,
426
426
  {
427
- ref: u,
427
+ ref: s,
428
428
  "data-type": "tinted",
429
- ...a,
430
- hasLeadingIcon: l,
431
- hasTrailingIcon: c,
432
- onFocus: m,
433
- onBlur: b,
434
- onClick: g,
435
- onKeyDown: h,
436
- tabIndex: s,
437
- btnType: n,
438
- ...$,
439
- children: f()
429
+ ...n,
430
+ className: `${n == null ? void 0 : n.className} ${c}-${a}-lnc-btn ${f}`,
431
+ hasLeadingIcon: i,
432
+ hasTrailingIcon: d,
433
+ onFocus: b,
434
+ onBlur: g,
435
+ onClick: h,
436
+ onKeyDown: $,
437
+ tabIndex: m,
438
+ btnType: a,
439
+ ...B,
440
+ children: k()
440
441
  }
441
- ) : n === "outline" ? /* @__PURE__ */ i(
442
- M,
442
+ ) : a === "outline" ? /* @__PURE__ */ l(
443
+ Q,
443
444
  {
444
- ref: u,
445
+ ref: s,
445
446
  "data-type": "outline",
446
- ...a,
447
- hasLeadingIcon: l,
448
- hasTrailingIcon: c,
449
- onFocus: m,
450
- onBlur: b,
451
- onClick: g,
452
- onKeyDown: h,
453
- tabIndex: s,
454
- btnType: n,
455
- ...$,
456
- children: f()
447
+ ...n,
448
+ className: `${n == null ? void 0 : n.className} ${c}-${a}-lnc-btn ${f}`,
449
+ hasLeadingIcon: i,
450
+ hasTrailingIcon: d,
451
+ onFocus: b,
452
+ onBlur: g,
453
+ onClick: h,
454
+ onKeyDown: $,
455
+ tabIndex: m,
456
+ btnType: a,
457
+ ...B,
458
+ children: k()
457
459
  }
458
- ) : n === "basic" ? /* @__PURE__ */ i(
459
- N,
460
+ ) : a === "basic" ? /* @__PURE__ */ l(
461
+ L,
460
462
  {
461
- ref: u,
463
+ ref: s,
462
464
  "data-type": "basic",
463
- ...a,
464
- hasLeadingIcon: l,
465
- hasTrailingIcon: c,
466
- onFocus: m,
467
- onBlur: b,
468
- onClick: g,
469
- onKeyDown: h,
470
- tabIndex: s,
471
- btnType: n,
472
- ...$,
473
- children: f()
465
+ ...n,
466
+ className: `${n == null ? void 0 : n.className} ${c}-${a}-lnc-btn ${f}`,
467
+ hasLeadingIcon: i,
468
+ hasTrailingIcon: d,
469
+ onFocus: b,
470
+ onBlur: g,
471
+ onClick: h,
472
+ onKeyDown: $,
473
+ tabIndex: m,
474
+ btnType: a,
475
+ ...B,
476
+ children: k()
474
477
  }
475
- ) : /* @__PURE__ */ i(
478
+ ) : /* @__PURE__ */ l(
476
479
  R,
477
480
  {
478
- ref: u,
481
+ ref: s,
479
482
  "data-type": "filled",
480
- size: B,
481
- ...a,
482
- hasLeadingIcon: l,
483
- hasTrailingIcon: c,
484
- onFocus: m,
485
- onBlur: b,
486
- onClick: g,
487
- onKeyDown: h,
483
+ size: y,
484
+ ...n,
485
+ className: `${n == null ? void 0 : n.className} ${c}-${a}-lnc-btn ${f}`,
486
+ hasLeadingIcon: i,
487
+ hasTrailingIcon: d,
488
+ onFocus: b,
489
+ onBlur: g,
490
+ onClick: h,
491
+ onKeyDown: $,
488
492
  hasText: K,
489
- tabIndex: s,
490
- btnType: n,
491
- ...$,
492
- children: f()
493
+ tabIndex: m,
494
+ btnType: a,
495
+ ...B,
496
+ children: k()
493
497
  }
494
498
  );
495
499
  });
496
- Q.propTypes = {
500
+ X.propTypes = {
497
501
  text: o.string,
498
502
  iconStyle: o.oneOf(["regular", "solid"]),
499
503
  /**
@@ -538,5 +542,5 @@ Q.propTypes = {
538
542
  size: o.oneOf(["small", "medium", "large"])
539
543
  };
540
544
  export {
541
- Q as default
545
+ X as default
542
546
  };
@@ -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 i=require("react/jsx-runtime"),C=require("react"),l=require("./index-BPVoEhTF.cjs"),h=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-BWzf4vLl.cjs"),F=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),y=e=>`
2
2
  outline: none;
3
3
  display: inline-flex;
4
4
  flex-direction: row;
@@ -13,10 +13,10 @@
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
+ `,S=h.styled.i`
17
17
  font-size: 1.125rem;
18
- `,B=b.styled.button`
19
- ${e=>m(e)}
18
+ `,f=h.styled.button`
19
+ ${e=>y(e)}
20
20
 
21
21
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonFilled",e.size,"enabled")};
22
22
 
@@ -49,8 +49,8 @@
49
49
  background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled","gray","disabled","background")};
50
50
  color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"disabled","text")};
51
51
  }
52
- `,S=b.styled.button`
53
- ${e=>m(e)}
52
+ `,N=h.styled.button`
53
+ ${e=>y(e)}
54
54
 
55
55
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
56
56
 
@@ -83,8 +83,8 @@
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`
87
- ${e=>m(e)}
86
+ `,k=h.styled.button`
87
+ ${e=>y(e)}
88
88
 
89
89
  ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
90
90
 
@@ -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=h.styled(k)`
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
+ `,V=C.forwardRef((e,c)=>{const{icon:$=null,iconStyle:R="solid",borderRadius:T="regular",btnType:a="filled",disabled:x=!1,tabIndex:j=0,onFocus:r=()=>{},onBlur:u=()=>{},onClick:d=()=>{},onKeyDown:s=()=>{},size:B="small",color:n="primary",className:g="",style:z={},...b}=e,o={theme:F.useTheme(),color:n,size:B,style:z,className:"lnc-ui-icon-button",disabled:x,borderRadius:T,btnType:a},v=()=>{var O=R==="solid"?"fas":"far";return`${O} fa-${$} fa-fw`},m=()=>C.isValidElement($)?$:i.jsx(S,{className:v()});return a==="filled"?i.jsx(f,{ref:c,"data-type":"filled",...o,className:`${o==null?void 0:o.className} ${n}-${a}-lnc-btn ${g}`,onFocus:r,onBlur:u,onClick:d,onKeyDown:s,type:a,...b,children:m()}):a==="tinted"?i.jsx(N,{ref:c,"data-type":"tinted",...o,className:`${o==null?void 0:o.className} ${n}-${a}-lnc-btn ${g}`,onFocus:r,onBlur:u,onClick:d,onKeyDown:s,...b,children:m()}):a==="outline"?i.jsx(w,{ref:c,"data-type":"outline",...o,className:`${o==null?void 0:o.className} ${n}-${a}-lnc-btn ${g}`,onFocus:r,onBlur:u,onClick:d,onKeyDown:s,...b,children:m()}):a==="basic"?i.jsx(k,{ref:c,"data-type":"basic",...o,className:`${o==null?void 0:o.className} ${n}-${a}-lnc-btn ${g}`,onFocus:r,onBlur:u,onClick:d,onKeyDown:s,...b,children:m()}):i.jsx(f,{ref:c,"data-type":"filled",size:B,...o,className:`${o==null?void 0:o.className} ${n}-${a}-lnc-btn ${g}`,onFocus:r,onBlur:u,onClick:d,onKeyDown:s,...b,children:m()})});V.propTypes={icon:l.PropTypes.oneOfType([l.PropTypes.string,l.PropTypes.element]),iconStyle:l.PropTypes.oneOf(["regular","solid"]),borderRadius:l.PropTypes.oneOf(["slight","regular","edged","curved","none"]),btnType:l.PropTypes.oneOf(["filled","tinted","outline","basic"]),disabled:l.PropTypes.bool,tabIndex:l.PropTypes.number,onBlur:l.PropTypes.func,onFocus:l.PropTypes.func,onClick:l.PropTypes.func,onKeyDown:l.PropTypes.func,className:l.PropTypes.string,style:l.PropTypes.object,color:l.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:l.PropTypes.oneOf(["small","medium","large"])};module.exports=V;
@@ -1,10 +1,10 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as S, isValidElement as N } from "react";
3
- import { P as o } from "./index-S5Cd7WrG.js";
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";
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as I, isValidElement as S } from "react";
3
+ import { P as n } from "./index-S5Cd7WrG.js";
4
+ import { s as g } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
+ import { c as f, b as t, d as l, e as k, h as y, a as V } from "./utils-BXCGNjIy.js";
6
6
  import { u as j } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
- const k = (e) => `
7
+ const x = (e) => `
8
8
  outline: none;
9
9
  display: inline-flex;
10
10
  flex-direction: row;
@@ -20,14 +20,14 @@ 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)};
25
- `, D = h.i`
23
+ min-width: ${l(e.theme, e.size)};
24
+ max-width: ${l(e.theme, e.size)};
25
+ `, D = g.i`
26
26
  font-size: 1.125rem;
27
- `, x = h.button`
28
- ${(e) => k(e)}
27
+ `, T = g.button`
28
+ ${(e) => x(e)}
29
29
 
30
- ${(e) => $(
30
+ ${(e) => f(
31
31
  e.theme,
32
32
  "ButtonFilled",
33
33
  e.size,
@@ -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) => l(e.theme, e.size)};
53
+ max-height: ${(e) => l(e.theme, e.size)};
54
54
 
55
55
  &:hover {
56
56
  background-color: ${(e) => t(
@@ -85,7 +85,7 @@ const k = (e) => `
85
85
  "text"
86
86
  )};
87
87
 
88
- ${(e) => e.disabled === !1 && B(e.theme)};
88
+ ${(e) => e.disabled === !1 && k(e.theme)};
89
89
  }
90
90
 
91
91
  &:active {
@@ -106,7 +106,7 @@ const k = (e) => `
106
106
  }
107
107
 
108
108
  &:disabled {
109
- ${(e) => e.disabled === !0 && f(e.theme)};
109
+ ${(e) => e.disabled === !0 && y(e.theme)};
110
110
  cursor: default;
111
111
  background-color: ${(e) => t(
112
112
  e.theme,
@@ -123,10 +123,10 @@ const k = (e) => `
123
123
  "text"
124
124
  )};
125
125
  }
126
- `, P = h.button`
127
- ${(e) => k(e)}
126
+ `, K = g.button`
127
+ ${(e) => x(e)}
128
128
 
129
- ${(e) => $(
129
+ ${(e) => f(
130
130
  e.theme,
131
131
  "ButtonTinted",
132
132
  e.size,
@@ -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) => l(e.theme, e.size)};
155
+ max-height: ${(e) => l(e.theme, e.size)};
156
156
 
157
157
  &:hover {
158
158
  background-color: ${(e) => e.disabled !== !0 && t(
@@ -188,7 +188,7 @@ const k = (e) => `
188
188
  "focus",
189
189
  "text"
190
190
  )};
191
- ${(e) => e.disabled === !1 && B(e.theme)};
191
+ ${(e) => e.disabled === !1 && k(e.theme)};
192
192
  }
193
193
 
194
194
  &:active {
@@ -209,7 +209,7 @@ const k = (e) => `
209
209
  )};
210
210
  }
211
211
  &:disabled {
212
- ${(e) => e.disabled === !0 && f(e.theme)};
212
+ ${(e) => e.disabled === !0 && y(e.theme)};
213
213
  cursor: default;
214
214
  background-color: ${(e) => t(
215
215
  e.theme,
@@ -227,10 +227,10 @@ const k = (e) => `
227
227
  "text"
228
228
  )};
229
229
  }
230
- `, v = h.button`
231
- ${(e) => k(e)}
230
+ `, O = g.button`
231
+ ${(e) => x(e)}
232
232
 
233
- ${(e) => $(
233
+ ${(e) => f(
234
234
  e.theme,
235
235
  "ButtonTinted",
236
236
  e.size,
@@ -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) => l(e.theme, e.size)};
258
+ max-height: ${(e) => l(e.theme, e.size)};
259
259
 
260
260
  &:hover {
261
261
  background-color: ${(e) => t(
@@ -291,7 +291,7 @@ const k = (e) => `
291
291
  "hover",
292
292
  "text"
293
293
  )};
294
- ${(e) => e.disabled === !1 && B(e.theme)};
294
+ ${(e) => e.disabled === !1 && k(e.theme)};
295
295
  }
296
296
 
297
297
  &:active {
@@ -313,7 +313,7 @@ const k = (e) => `
313
313
  }
314
314
 
315
315
  &:disabled {
316
- ${(e) => e.disabled === !0 && f(e.theme)};
316
+ ${(e) => e.disabled === !0 && y(e.theme)};
317
317
  cursor: default;
318
318
  background-color: ${(e) => t(
319
319
  e.theme,
@@ -324,7 +324,7 @@ const k = (e) => `
324
324
  "backgroundOpacity"
325
325
  )};
326
326
  }
327
- `, K = h(v)`
327
+ `, U = g(O)`
328
328
  border: 1px solid
329
329
  ${(e) => t(
330
330
  e.theme,
@@ -334,115 +334,120 @@ const k = (e) => `
334
334
  "border",
335
335
  "borderOpacity"
336
336
  )};
337
- `, U = S((e, c) => {
337
+ `, W = I((e, d) => {
338
338
  const {
339
- icon: g = null,
340
- iconStyle: T = "solid",
341
- borderRadius: O = "regular",
342
- btnType: l = "filled",
343
- disabled: z = !1,
344
- tabIndex: W = 0,
339
+ icon: B = null,
340
+ iconStyle: z = "solid",
341
+ borderRadius: F = "regular",
342
+ btnType: a = "filled",
343
+ disabled: N = !1,
344
+ tabIndex: E = 0,
345
345
  //----------------
346
- onFocus: i = () => {
346
+ onFocus: r = () => {
347
347
  },
348
- onBlur: d = () => {
348
+ onBlur: u = () => {
349
349
  },
350
- onClick: r = () => {
350
+ onClick: b = () => {
351
351
  },
352
- onKeyDown: u = () => {
352
+ onKeyDown: s = () => {
353
353
  },
354
354
  //----------------
355
- size: y = "small",
356
- color: F = "primary",
357
- className: w = "",
358
- style: C = {},
359
- ...b
360
- } = e, s = {
355
+ size: v = "small",
356
+ color: c = "primary",
357
+ className: m = "",
358
+ style: w = {},
359
+ ...h
360
+ } = e, o = {
361
361
  theme: j(),
362
- color: F,
363
- size: y,
364
- style: C,
365
- className: "lnc-ui-icon-button " + w,
366
- disabled: z,
367
- borderRadius: O,
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,
362
+ color: c,
363
+ size: v,
364
+ style: w,
365
+ className: "lnc-ui-icon-button",
366
+ disabled: N,
367
+ borderRadius: F,
368
+ btnType: a
369
+ }, C = () => {
370
+ var R = z === "solid" ? "fas" : "far";
371
+ return `${R} fa-${B} fa-fw`;
372
+ }, $ = () => S(B) ? B : /* @__PURE__ */ i(D, { className: C() });
373
+ return a === "filled" ? /* @__PURE__ */ i(
374
+ T,
375
375
  {
376
- ref: c,
376
+ ref: d,
377
377
  "data-type": "filled",
378
- ...s,
379
- onFocus: i,
380
- onBlur: d,
381
- onClick: r,
382
- onKeyDown: u,
383
- type: l,
384
- ...b,
385
- children: m()
378
+ ...o,
379
+ className: `${o == null ? void 0 : o.className} ${c}-${a}-lnc-btn ${m}`,
380
+ onFocus: r,
381
+ onBlur: u,
382
+ onClick: b,
383
+ onKeyDown: s,
384
+ type: a,
385
+ ...h,
386
+ children: $()
386
387
  }
387
- ) : l === "tinted" ? /* @__PURE__ */ a(
388
- P,
388
+ ) : a === "tinted" ? /* @__PURE__ */ i(
389
+ K,
389
390
  {
390
- ref: c,
391
+ ref: d,
391
392
  "data-type": "tinted",
392
- ...s,
393
- onFocus: i,
394
- onBlur: d,
395
- onClick: r,
396
- onKeyDown: u,
397
- ...b,
398
- children: m()
393
+ ...o,
394
+ className: `${o == null ? void 0 : o.className} ${c}-${a}-lnc-btn ${m}`,
395
+ onFocus: r,
396
+ onBlur: u,
397
+ onClick: b,
398
+ onKeyDown: s,
399
+ ...h,
400
+ children: $()
399
401
  }
400
- ) : l === "outline" ? /* @__PURE__ */ a(
401
- K,
402
+ ) : a === "outline" ? /* @__PURE__ */ i(
403
+ U,
402
404
  {
403
- ref: c,
405
+ ref: d,
404
406
  "data-type": "outline",
405
- ...s,
406
- onFocus: i,
407
- onBlur: d,
408
- onClick: r,
409
- onKeyDown: u,
410
- ...b,
411
- children: m()
407
+ ...o,
408
+ className: `${o == null ? void 0 : o.className} ${c}-${a}-lnc-btn ${m}`,
409
+ onFocus: r,
410
+ onBlur: u,
411
+ onClick: b,
412
+ onKeyDown: s,
413
+ ...h,
414
+ children: $()
412
415
  }
413
- ) : l === "basic" ? /* @__PURE__ */ a(
414
- v,
416
+ ) : a === "basic" ? /* @__PURE__ */ i(
417
+ O,
415
418
  {
416
- ref: c,
419
+ ref: d,
417
420
  "data-type": "basic",
418
- ...s,
419
- onFocus: i,
420
- onBlur: d,
421
- onClick: r,
422
- onKeyDown: u,
423
- ...b,
424
- children: m()
421
+ ...o,
422
+ className: `${o == null ? void 0 : o.className} ${c}-${a}-lnc-btn ${m}`,
423
+ onFocus: r,
424
+ onBlur: u,
425
+ onClick: b,
426
+ onKeyDown: s,
427
+ ...h,
428
+ children: $()
425
429
  }
426
- ) : /* @__PURE__ */ a(
427
- x,
430
+ ) : /* @__PURE__ */ i(
431
+ T,
428
432
  {
429
- ref: c,
433
+ ref: d,
430
434
  "data-type": "filled",
431
- size: y,
432
- ...s,
433
- onFocus: i,
434
- onBlur: d,
435
- onClick: r,
436
- onKeyDown: u,
437
- ...b,
438
- children: m()
435
+ size: v,
436
+ ...o,
437
+ className: `${o == null ? void 0 : o.className} ${c}-${a}-lnc-btn ${m}`,
438
+ onFocus: r,
439
+ onBlur: u,
440
+ onClick: b,
441
+ onKeyDown: s,
442
+ ...h,
443
+ children: $()
439
444
  }
440
445
  );
441
446
  });
442
- U.propTypes = {
443
- icon: o.oneOfType([o.string, o.element]),
444
- iconStyle: o.oneOf(["regular", "solid"]),
445
- borderRadius: o.oneOf([
447
+ W.propTypes = {
448
+ icon: n.oneOfType([n.string, n.element]),
449
+ iconStyle: n.oneOf(["regular", "solid"]),
450
+ borderRadius: n.oneOf([
446
451
  "slight",
447
452
  "regular",
448
453
  "edged",
@@ -452,18 +457,18 @@ U.propTypes = {
452
457
  /**
453
458
  * Different styles
454
459
  */
455
- btnType: o.oneOf(["filled", "tinted", "outline", "basic"]),
456
- disabled: o.bool,
457
- tabIndex: o.number,
460
+ btnType: n.oneOf(["filled", "tinted", "outline", "basic"]),
461
+ disabled: n.bool,
462
+ tabIndex: n.number,
458
463
  //---------------------------------------------------------------
459
- onBlur: o.func,
460
- onFocus: o.func,
461
- onClick: o.func,
462
- onKeyDown: o.func,
464
+ onBlur: n.func,
465
+ onFocus: n.func,
466
+ onClick: n.func,
467
+ onKeyDown: n.func,
463
468
  //---------------------------------------------------------------
464
- className: o.string,
465
- style: o.object,
466
- color: o.oneOf([
469
+ className: n.string,
470
+ style: n.object,
471
+ color: n.oneOf([
467
472
  "primary",
468
473
  "secondary",
469
474
  "success",
@@ -473,8 +478,8 @@ U.propTypes = {
473
478
  "neutral",
474
479
  "gray"
475
480
  ]),
476
- size: o.oneOf(["small", "medium", "large"])
481
+ size: n.oneOf(["small", "medium", "large"])
477
482
  };
478
483
  export {
479
- U as default
484
+ W as default
480
485
  };
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.105",
4
4
  "description": "React component library",
5
5
  "type": "module",
6
6
  "keywords": [