@lanaco/lnc-react-ui 4.0.104 → 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 +13 -13
- package/dist/Button.js +139 -135
- package/dist/IconButton.cjs +10 -10
- package/dist/IconButton.js +125 -121
- package/package.json +1 -1
package/dist/Button.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
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?
|
|
15
|
-
padding-right: ${e.hasTrailingIcon?
|
|
16
|
-
`,
|
|
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
|
-
`,
|
|
18
|
+
`,D=d.styled.span`
|
|
19
19
|
padding-left: ${e=>e.size==="small"?"0.25rem":"0.5rem"};
|
|
20
|
-
`,
|
|
21
|
-
${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=
|
|
54
|
-
${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
|
-
`,
|
|
90
|
-
${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=
|
|
124
|
+
`,L=d.styled(v)`
|
|
125
125
|
border: 1px solid
|
|
126
126
|
${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","border","borderOpacity")};
|
|
127
|
-
`,
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
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
|
|
5
|
-
import { s as
|
|
6
|
-
import { c as
|
|
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
|
|
9
|
-
const
|
|
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
|
-
},
|
|
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: ${
|
|
36
|
+
border-radius: ${A(
|
|
37
37
|
e.theme,
|
|
38
38
|
e.borderRadius
|
|
39
39
|
)};
|
|
40
40
|
|
|
41
|
-
padding-left: ${e.hasLeadingIcon ?
|
|
42
|
-
padding-right: ${e.hasTrailingIcon ?
|
|
43
|
-
`,
|
|
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
|
-
`,
|
|
45
|
+
`, J = u.span`
|
|
46
46
|
padding-left: ${(e) => e.size === "small" ? "0.25rem" : "0.5rem"};
|
|
47
|
-
`, R =
|
|
48
|
-
${(e) =>
|
|
47
|
+
`, R = u.button`
|
|
48
|
+
${(e) => O(e)}
|
|
49
49
|
|
|
50
|
-
${(e) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`,
|
|
146
|
-
${(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) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`,
|
|
245
|
-
${(e) =>
|
|
244
|
+
`, L = u.button`
|
|
245
|
+
${(e) => O(e)}
|
|
246
246
|
|
|
247
|
-
${(e) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
353
|
+
`, X = q((e, s) => {
|
|
354
354
|
const {
|
|
355
|
-
text:
|
|
356
|
-
iconStyle:
|
|
357
|
-
leadingIcon:
|
|
358
|
-
trailingIcon:
|
|
359
|
-
borderRadius:
|
|
360
|
-
btnType:
|
|
361
|
-
disabled:
|
|
362
|
-
tabIndex:
|
|
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:
|
|
365
|
-
onBlur:
|
|
366
|
-
onClick:
|
|
367
|
-
onKeyDown:
|
|
368
|
-
onLeadingIconClick:
|
|
369
|
-
onTrailingIconClick:
|
|
364
|
+
onFocus: b,
|
|
365
|
+
onBlur: g,
|
|
366
|
+
onClick: h,
|
|
367
|
+
onKeyDown: $,
|
|
368
|
+
onLeadingIconClick: Y,
|
|
369
|
+
onTrailingIconClick: Z,
|
|
370
370
|
//----------------
|
|
371
|
-
size:
|
|
372
|
-
color:
|
|
373
|
-
className:
|
|
371
|
+
size: y = "small",
|
|
372
|
+
color: c = "primary",
|
|
373
|
+
className: f = "",
|
|
374
374
|
style: D = {},
|
|
375
375
|
children: V,
|
|
376
|
-
|
|
377
|
-
} = e,
|
|
378
|
-
theme:
|
|
379
|
-
color:
|
|
380
|
-
size:
|
|
376
|
+
...B
|
|
377
|
+
} = e, n = {
|
|
378
|
+
theme: G(),
|
|
379
|
+
color: c,
|
|
380
|
+
size: y,
|
|
381
381
|
style: D,
|
|
382
|
-
disabled:
|
|
383
|
-
borderRadius:
|
|
384
|
-
btnType:
|
|
382
|
+
disabled: U,
|
|
383
|
+
borderRadius: S,
|
|
384
|
+
btnType: a,
|
|
385
385
|
className: "lnc-ui-button "
|
|
386
|
-
},
|
|
387
|
-
|
|
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:
|
|
390
|
+
icon: N,
|
|
391
391
|
sizeInUnits: "1.125rem",
|
|
392
|
-
iconStyle:
|
|
392
|
+
iconStyle: C
|
|
393
393
|
}
|
|
394
394
|
) }),
|
|
395
|
-
|
|
395
|
+
F,
|
|
396
396
|
V,
|
|
397
|
-
|
|
397
|
+
d && /* @__PURE__ */ l(J, { size: y, children: /* @__PURE__ */ l(
|
|
398
398
|
w,
|
|
399
399
|
{
|
|
400
|
-
icon:
|
|
400
|
+
icon: j,
|
|
401
401
|
sizeInUnits: "1.125rem",
|
|
402
|
-
iconStyle:
|
|
402
|
+
iconStyle: C
|
|
403
403
|
}
|
|
404
404
|
) })
|
|
405
405
|
] });
|
|
406
|
-
return
|
|
406
|
+
return a === "filled" ? /* @__PURE__ */ l(
|
|
407
407
|
R,
|
|
408
408
|
{
|
|
409
|
-
ref:
|
|
409
|
+
ref: s,
|
|
410
410
|
"data-type": "filled",
|
|
411
|
-
...
|
|
412
|
-
className: `${
|
|
413
|
-
hasLeadingIcon:
|
|
414
|
-
hasTrailingIcon:
|
|
415
|
-
onFocus:
|
|
416
|
-
onBlur:
|
|
417
|
-
onClick:
|
|
418
|
-
onKeyDown:
|
|
419
|
-
tabIndex:
|
|
420
|
-
btnType:
|
|
421
|
-
|
|
422
|
-
children:
|
|
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
|
-
) :
|
|
425
|
-
|
|
424
|
+
) : a === "tinted" ? /* @__PURE__ */ l(
|
|
425
|
+
M,
|
|
426
426
|
{
|
|
427
|
-
ref:
|
|
427
|
+
ref: s,
|
|
428
428
|
"data-type": "tinted",
|
|
429
|
-
...
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
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
|
-
) :
|
|
442
|
-
|
|
442
|
+
) : a === "outline" ? /* @__PURE__ */ l(
|
|
443
|
+
Q,
|
|
443
444
|
{
|
|
444
|
-
ref:
|
|
445
|
+
ref: s,
|
|
445
446
|
"data-type": "outline",
|
|
446
|
-
...
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
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
|
-
) :
|
|
459
|
-
|
|
460
|
+
) : a === "basic" ? /* @__PURE__ */ l(
|
|
461
|
+
L,
|
|
460
462
|
{
|
|
461
|
-
ref:
|
|
463
|
+
ref: s,
|
|
462
464
|
"data-type": "basic",
|
|
463
|
-
...
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
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__ */
|
|
478
|
+
) : /* @__PURE__ */ l(
|
|
476
479
|
R,
|
|
477
480
|
{
|
|
478
|
-
ref:
|
|
481
|
+
ref: s,
|
|
479
482
|
"data-type": "filled",
|
|
480
|
-
size:
|
|
481
|
-
...
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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:
|
|
490
|
-
btnType:
|
|
491
|
-
|
|
492
|
-
children:
|
|
493
|
+
tabIndex: m,
|
|
494
|
+
btnType: a,
|
|
495
|
+
...B,
|
|
496
|
+
children: k()
|
|
493
497
|
}
|
|
494
498
|
);
|
|
495
499
|
});
|
|
496
|
-
|
|
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
|
-
|
|
545
|
+
X as default
|
|
542
546
|
};
|
package/dist/IconButton.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
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
|
-
`,
|
|
16
|
+
`,S=h.styled.i`
|
|
17
17
|
font-size: 1.125rem;
|
|
18
|
-
`,
|
|
19
|
-
${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
|
-
`,
|
|
53
|
-
${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
|
-
`,
|
|
87
|
-
${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=
|
|
119
|
+
`,w=h.styled(k)`
|
|
120
120
|
border: 1px solid
|
|
121
121
|
${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","border","borderOpacity")};
|
|
122
|
-
`,
|
|
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;
|
package/dist/IconButton.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I, isValidElement as S } from "react";
|
|
3
|
-
import { P as
|
|
4
|
-
import { s as
|
|
5
|
-
import { c as
|
|
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
|
|
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: ${
|
|
24
|
-
max-width: ${
|
|
25
|
-
`, D =
|
|
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
|
-
`,
|
|
28
|
-
${(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) =>
|
|
53
|
-
max-height: ${(e) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`, K =
|
|
127
|
-
${(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) =>
|
|
155
|
-
max-height: ${(e) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`,
|
|
231
|
-
${(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) =>
|
|
258
|
-
max-height: ${(e) =>
|
|
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 &&
|
|
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 &&
|
|
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
|
-
`, U =
|
|
327
|
+
`, U = g(O)`
|
|
328
328
|
border: 1px solid
|
|
329
329
|
${(e) => t(
|
|
330
330
|
e.theme,
|
|
@@ -334,116 +334,120 @@ const k = (e) => `
|
|
|
334
334
|
"border",
|
|
335
335
|
"borderOpacity"
|
|
336
336
|
)};
|
|
337
|
-
`, W = I((e,
|
|
337
|
+
`, W = I((e, d) => {
|
|
338
338
|
const {
|
|
339
|
-
icon:
|
|
340
|
-
iconStyle:
|
|
341
|
-
borderRadius:
|
|
342
|
-
btnType:
|
|
343
|
-
disabled:
|
|
339
|
+
icon: B = null,
|
|
340
|
+
iconStyle: z = "solid",
|
|
341
|
+
borderRadius: F = "regular",
|
|
342
|
+
btnType: a = "filled",
|
|
343
|
+
disabled: N = !1,
|
|
344
344
|
tabIndex: E = 0,
|
|
345
345
|
//----------------
|
|
346
|
-
onFocus:
|
|
346
|
+
onFocus: r = () => {
|
|
347
347
|
},
|
|
348
|
-
onBlur:
|
|
348
|
+
onBlur: u = () => {
|
|
349
349
|
},
|
|
350
|
-
onClick:
|
|
350
|
+
onClick: b = () => {
|
|
351
351
|
},
|
|
352
|
-
onKeyDown:
|
|
352
|
+
onKeyDown: s = () => {
|
|
353
353
|
},
|
|
354
354
|
//----------------
|
|
355
|
-
size:
|
|
356
|
-
color:
|
|
357
|
-
className:
|
|
358
|
-
style:
|
|
359
|
-
...
|
|
360
|
-
} = e,
|
|
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:
|
|
363
|
-
size:
|
|
364
|
-
style:
|
|
362
|
+
color: c,
|
|
363
|
+
size: v,
|
|
364
|
+
style: w,
|
|
365
365
|
className: "lnc-ui-icon-button",
|
|
366
|
-
disabled:
|
|
367
|
-
borderRadius:
|
|
368
|
-
btnType:
|
|
369
|
-
},
|
|
370
|
-
var R =
|
|
371
|
-
return `${R} fa-${
|
|
372
|
-
},
|
|
373
|
-
return
|
|
374
|
-
|
|
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:
|
|
376
|
+
ref: d,
|
|
377
377
|
"data-type": "filled",
|
|
378
|
-
...
|
|
379
|
-
className: `${
|
|
380
|
-
onFocus:
|
|
381
|
-
onBlur:
|
|
382
|
-
onClick:
|
|
383
|
-
onKeyDown:
|
|
384
|
-
type:
|
|
385
|
-
...
|
|
386
|
-
children:
|
|
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: $()
|
|
387
387
|
}
|
|
388
|
-
) :
|
|
388
|
+
) : a === "tinted" ? /* @__PURE__ */ i(
|
|
389
389
|
K,
|
|
390
390
|
{
|
|
391
|
-
ref:
|
|
391
|
+
ref: d,
|
|
392
392
|
"data-type": "tinted",
|
|
393
|
-
...
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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: $()
|
|
400
401
|
}
|
|
401
|
-
) :
|
|
402
|
+
) : a === "outline" ? /* @__PURE__ */ i(
|
|
402
403
|
U,
|
|
403
404
|
{
|
|
404
|
-
ref:
|
|
405
|
+
ref: d,
|
|
405
406
|
"data-type": "outline",
|
|
406
|
-
...
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
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: $()
|
|
413
415
|
}
|
|
414
|
-
) :
|
|
415
|
-
|
|
416
|
+
) : a === "basic" ? /* @__PURE__ */ i(
|
|
417
|
+
O,
|
|
416
418
|
{
|
|
417
|
-
ref:
|
|
419
|
+
ref: d,
|
|
418
420
|
"data-type": "basic",
|
|
419
|
-
...
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
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: $()
|
|
426
429
|
}
|
|
427
|
-
) : /* @__PURE__ */
|
|
428
|
-
|
|
430
|
+
) : /* @__PURE__ */ i(
|
|
431
|
+
T,
|
|
429
432
|
{
|
|
430
|
-
ref:
|
|
433
|
+
ref: d,
|
|
431
434
|
"data-type": "filled",
|
|
432
|
-
size:
|
|
433
|
-
...
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
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: $()
|
|
440
444
|
}
|
|
441
445
|
);
|
|
442
446
|
});
|
|
443
447
|
W.propTypes = {
|
|
444
|
-
icon:
|
|
445
|
-
iconStyle:
|
|
446
|
-
borderRadius:
|
|
448
|
+
icon: n.oneOfType([n.string, n.element]),
|
|
449
|
+
iconStyle: n.oneOf(["regular", "solid"]),
|
|
450
|
+
borderRadius: n.oneOf([
|
|
447
451
|
"slight",
|
|
448
452
|
"regular",
|
|
449
453
|
"edged",
|
|
@@ -453,18 +457,18 @@ W.propTypes = {
|
|
|
453
457
|
/**
|
|
454
458
|
* Different styles
|
|
455
459
|
*/
|
|
456
|
-
btnType:
|
|
457
|
-
disabled:
|
|
458
|
-
tabIndex:
|
|
460
|
+
btnType: n.oneOf(["filled", "tinted", "outline", "basic"]),
|
|
461
|
+
disabled: n.bool,
|
|
462
|
+
tabIndex: n.number,
|
|
459
463
|
//---------------------------------------------------------------
|
|
460
|
-
onBlur:
|
|
461
|
-
onFocus:
|
|
462
|
-
onClick:
|
|
463
|
-
onKeyDown:
|
|
464
|
+
onBlur: n.func,
|
|
465
|
+
onFocus: n.func,
|
|
466
|
+
onClick: n.func,
|
|
467
|
+
onKeyDown: n.func,
|
|
464
468
|
//---------------------------------------------------------------
|
|
465
|
-
className:
|
|
466
|
-
style:
|
|
467
|
-
color:
|
|
469
|
+
className: n.string,
|
|
470
|
+
style: n.object,
|
|
471
|
+
color: n.oneOf([
|
|
468
472
|
"primary",
|
|
469
473
|
"secondary",
|
|
470
474
|
"success",
|
|
@@ -474,7 +478,7 @@ W.propTypes = {
|
|
|
474
478
|
"neutral",
|
|
475
479
|
"gray"
|
|
476
480
|
]),
|
|
477
|
-
size:
|
|
481
|
+
size: n.oneOf(["small", "medium", "large"])
|
|
478
482
|
};
|
|
479
483
|
export {
|
|
480
484
|
W as default
|