@lanaco/lnc-react-ui 3.11.35 → 4.0.2

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.
Files changed (218) hide show
  1. package/README.md +0 -3
  2. package/dist/Accordion.cjs +6 -0
  3. package/dist/Accordion.js +65 -0
  4. package/dist/AccordionDetails.cjs +7 -0
  5. package/dist/AccordionDetails.js +32 -0
  6. package/dist/AccordionSummary.cjs +12 -0
  7. package/dist/AccordionSummary.js +78 -0
  8. package/dist/ActionsToolbar.cjs +19 -0
  9. package/dist/ActionsToolbar.js +225 -0
  10. package/dist/Alert.cjs +40 -0
  11. package/dist/Alert.js +138 -0
  12. package/dist/Avatar.cjs +16 -0
  13. package/dist/Avatar.js +114 -0
  14. package/dist/Badge.cjs +17 -0
  15. package/dist/Badge.js +70 -0
  16. package/dist/Breadcrumbs.cjs +8 -0
  17. package/dist/Breadcrumbs.js +131 -0
  18. package/dist/Button.cjs +127 -0
  19. package/dist/Button.js +542 -0
  20. package/dist/ButtonGroup.cjs +44 -0
  21. package/dist/ButtonGroup.js +112 -0
  22. package/dist/CheckBoxInput.cjs +118 -0
  23. package/dist/CheckBoxInput.js +348 -0
  24. package/dist/Chip.cjs +27 -0
  25. package/dist/Chip.js +189 -0
  26. package/dist/ColorInput.cjs +60 -0
  27. package/dist/ColorInput.js +256 -0
  28. package/dist/ConfirmationForm.cjs +22 -0
  29. package/dist/ConfirmationForm.js +169 -0
  30. package/dist/Content.cjs +1 -0
  31. package/dist/Content.js +18 -0
  32. package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
  33. package/dist/CustomStyles-nfD3J1mi.js +2881 -0
  34. package/dist/DataView.cjs +1 -0
  35. package/dist/DataView.js +62 -0
  36. package/dist/DateInput.cjs +296 -0
  37. package/dist/DateInput.js +7042 -0
  38. package/dist/DecimalInput.cjs +54 -0
  39. package/dist/DecimalInput.js +697 -0
  40. package/dist/DetailsView.cjs +18 -0
  41. package/dist/DetailsView.js +243 -0
  42. package/dist/DoubleRangeSlider.cjs +114 -0
  43. package/dist/DoubleRangeSlider.js +289 -0
  44. package/dist/DragAndDropFile.cjs +31 -0
  45. package/dist/DragAndDropFile.js +2331 -0
  46. package/dist/DragDropFiles.cjs +14 -0
  47. package/dist/DragDropFiles.js +175 -0
  48. package/dist/Drawer.cjs +6 -0
  49. package/dist/Drawer.js +206 -0
  50. package/dist/Dropdown.cjs +1 -0
  51. package/dist/Dropdown.js +266 -0
  52. package/dist/DropdownItem.cjs +36 -0
  53. package/dist/DropdownItem.js +241 -0
  54. package/dist/DropdownLookup.cjs +1 -0
  55. package/dist/DropdownLookup.js +325 -0
  56. package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
  57. package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
  58. package/dist/DropdownMenu.cjs +1 -0
  59. package/dist/DropdownMenu.js +12 -0
  60. package/dist/EditableTable.cjs +21 -0
  61. package/dist/EditableTable.js +462 -0
  62. package/dist/FileInput.cjs +47 -0
  63. package/dist/FileInput.js +206 -0
  64. package/dist/FlexBox.cjs +9 -0
  65. package/dist/FlexBox.js +97 -0
  66. package/dist/FlexGrid.cjs +1 -0
  67. package/dist/FlexGrid.js +78 -0
  68. package/dist/FlexGridItem.cjs +7 -0
  69. package/dist/FlexGridItem.js +97 -0
  70. package/dist/Footer.cjs +1 -0
  71. package/dist/Footer.js +18 -0
  72. package/dist/FormField.cjs +11 -0
  73. package/dist/FormField.js +65 -0
  74. package/dist/FormView.cjs +13 -0
  75. package/dist/FormView.js +354 -0
  76. package/dist/Grid.cjs +13 -0
  77. package/dist/Grid.js +62 -0
  78. package/dist/GridItem.cjs +15 -0
  79. package/dist/GridItem.js +72 -0
  80. package/dist/Header.cjs +1 -0
  81. package/dist/Header.js +18 -0
  82. package/dist/Icon.cjs +8 -0
  83. package/dist/Icon.js +59 -0
  84. package/dist/IconButton.cjs +122 -0
  85. package/dist/IconButton.js +481 -0
  86. package/dist/Kanban.cjs +85 -0
  87. package/dist/Kanban.js +4793 -0
  88. package/dist/KanbanActionsToolbar.cjs +19 -0
  89. package/dist/KanbanActionsToolbar.js +152 -0
  90. package/dist/KanbanCard-ConTmu3w.cjs +30 -0
  91. package/dist/KanbanCard-D9OhU8C6.js +175 -0
  92. package/dist/KanbanCard.cjs +1 -0
  93. package/dist/KanbanCard.js +12 -0
  94. package/dist/KanbanFooter.cjs +5 -0
  95. package/dist/KanbanFooter.js +84 -0
  96. package/dist/KanbanHeader.cjs +15 -0
  97. package/dist/KanbanHeader.js +127 -0
  98. package/dist/KanbanView.cjs +8 -0
  99. package/dist/KanbanView.js +255 -0
  100. package/dist/Link.cjs +15 -0
  101. package/dist/Link.js +62 -0
  102. package/dist/MenuItem.cjs +36 -0
  103. package/dist/MenuItem.js +230 -0
  104. package/dist/Modal.cjs +84 -0
  105. package/dist/Modal.js +372 -0
  106. package/dist/MultiSelectDropdown.cjs +1 -0
  107. package/dist/MultiSelectDropdown.js +261 -0
  108. package/dist/MultiSelectDropdownLookup.cjs +1 -0
  109. package/dist/MultiSelectDropdownLookup.js +274 -0
  110. package/dist/NestedDropdownItem.cjs +6 -0
  111. package/dist/NestedDropdownItem.js +102 -0
  112. package/dist/NestedMenuItem.cjs +6 -0
  113. package/dist/NestedMenuItem.js +115 -0
  114. package/dist/Notification.cjs +83 -0
  115. package/dist/Notification.js +1079 -0
  116. package/dist/NumberInput.cjs +45 -0
  117. package/dist/NumberInput.js +241 -0
  118. package/dist/PageLayout.cjs +26 -0
  119. package/dist/PageLayout.js +92 -0
  120. package/dist/PasswordInput.cjs +47 -0
  121. package/dist/PasswordInput.js +230 -0
  122. package/dist/ProgressBar.cjs +22 -0
  123. package/dist/ProgressBar.js +92 -0
  124. package/dist/RadioGroup.cjs +7 -0
  125. package/dist/RadioGroup.js +104 -0
  126. package/dist/RadioInput.cjs +117 -0
  127. package/dist/RadioInput.js +362 -0
  128. package/dist/RangeSlider.cjs +72 -0
  129. package/dist/RangeSlider.js +253 -0
  130. package/dist/SearchBar.cjs +100 -0
  131. package/dist/SearchBar.js +994 -0
  132. package/dist/Separator.cjs +6 -0
  133. package/dist/Separator.js +37 -0
  134. package/dist/Sidebar.cjs +39 -0
  135. package/dist/Sidebar.js +123 -0
  136. package/dist/Spinner.cjs +38 -0
  137. package/dist/Spinner.js +114 -0
  138. package/dist/Surface.cjs +7 -0
  139. package/dist/Surface.js +60 -0
  140. package/dist/SwipeableDrawer.cjs +33 -0
  141. package/dist/SwipeableDrawer.js +213 -0
  142. package/dist/Table.cjs +170 -0
  143. package/dist/Table.js +1408 -0
  144. package/dist/TableView-Cj5_fbSR.js +481 -0
  145. package/dist/TableView-D8ex512p.cjs +19 -0
  146. package/dist/TableView.cjs +1 -0
  147. package/dist/TableView.js +11 -0
  148. package/dist/Tabs.cjs +7 -0
  149. package/dist/Tabs.js +72 -0
  150. package/dist/TextAreaInput.cjs +33 -0
  151. package/dist/TextAreaInput.js +320 -0
  152. package/dist/TextInput.cjs +45 -0
  153. package/dist/TextInput.js +227 -0
  154. package/dist/ThemeProvider.cjs +113 -0
  155. package/dist/ThemeProvider.js +1340 -0
  156. package/dist/TimeInput.cjs +31 -0
  157. package/dist/TimeInput.js +133 -0
  158. package/dist/Toggle.cjs +151 -0
  159. package/dist/Toggle.js +421 -0
  160. package/dist/TreeMenu.cjs +15 -0
  161. package/dist/TreeMenu.js +108 -0
  162. package/dist/TreeMenuSeparator.cjs +6 -0
  163. package/dist/TreeMenuSeparator.js +40 -0
  164. package/dist/UploadedFile.cjs +39 -0
  165. package/dist/UploadedFile.js +192 -0
  166. package/dist/defineProperty-BHpTtkhC.js +110 -0
  167. package/dist/defineProperty-DHvxLH8G.cjs +1 -0
  168. package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
  169. package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
  170. package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
  171. package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
  172. package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
  173. package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
  174. package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
  175. package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
  176. package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
  177. package/dist/floating-ui.dom-BdUovkEr.js +938 -0
  178. package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
  179. package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
  180. package/dist/index-BLQWNy78.js +109 -0
  181. package/dist/index-BP5r5zGN.cjs +1 -0
  182. package/dist/index-B_da1uvD.js +451 -0
  183. package/dist/index-BjdOz5Ok.cjs +1 -0
  184. package/dist/index-BklgDeu4.js +42 -0
  185. package/dist/index-C29T0m2a.cjs +174 -0
  186. package/dist/index-CZJEA84h.js +19069 -0
  187. package/dist/index-Cdkz-XH-.js +127 -0
  188. package/dist/index-D5vEbKUT.js +81 -0
  189. package/dist/index-DXnSjbfJ.cjs +20 -0
  190. package/dist/index-Ds9PUTwb.js +667 -0
  191. package/dist/index-Dzkd2i4n.cjs +1 -0
  192. package/dist/index-IO9v6o0I.cjs +5 -0
  193. package/dist/index-P-naJISQ.cjs +1 -0
  194. package/dist/index.cjs +26 -0
  195. package/dist/index.js +378 -0
  196. package/dist/motion-CtkUpWEn.js +3785 -0
  197. package/dist/motion-Oud-wpUz.cjs +1 -0
  198. package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
  199. package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
  200. package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
  201. package/dist/setPrototypeOf-a891FLQJ.js +13 -0
  202. package/dist/style.css +5 -0
  203. package/dist/tslib.es6-ZNVz5r_T.js +90 -0
  204. package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
  205. package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
  206. package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
  207. package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
  208. package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
  209. package/dist/utils-DEke8iwo.js +10196 -0
  210. package/dist/utils-hdRGTsQ7.cjs +13 -0
  211. package/eslint.config.js +38 -0
  212. package/package.json +137 -58
  213. package/vite.config.js +135 -0
  214. package/jest.config.js +0 -7
  215. package/lib/index.esm.js +0 -84028
  216. package/lib/index.js +0 -84165
  217. package/rc1 +0 -0
  218. package/test/jest/__mocks__/styleMock.js +0 -1
@@ -0,0 +1,122 @@
1
+ "use strict";const a=require("react/jsx-runtime"),$=require("react"),o=require("./index-DXnSjbfJ.cjs");;/* empty css */const b=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),t=require("./utils-hdRGTsQ7.cjs"),S=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),m=e=>`
2
+ outline: none;
3
+ display: inline-flex;
4
+ flex-direction: row;
5
+ justify-content: center;
6
+ align-items: center;
7
+ border: none;
8
+ transition: all 50 ms ease-in;
9
+ cursor: pointer;
10
+ color: ${!e.disabled&&"white"};
11
+
12
+ border-radius: ${t.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
13
+
14
+ min-width: ${t.getSizeValueWithUnits(e.theme,e.size)};
15
+ max-width: ${t.getSizeValueWithUnits(e.theme,e.size)};
16
+ `,P=b.newStyled.i`
17
+ font-size: 1.125rem;
18
+ `,B=b.newStyled.button`
19
+ ${e=>m(e)}
20
+
21
+ ${e=>t.getComponentTypographyCss(e.theme,"ButtonFilled",e.size,"enabled")};
22
+
23
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"enabled","background")};
24
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"enabled","text")};
25
+
26
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
27
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
28
+
29
+ &:hover {
30
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"hover","background")};
31
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"hover","text")};
32
+ }
33
+
34
+ &:focus {
35
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"focus","background")};
36
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"focus","text")};
37
+
38
+ ${e=>e.disabled===!1&&t.getOutlineCss(e.theme)};
39
+ }
40
+
41
+ &:active {
42
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"active","background")};
43
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"active","text")};
44
+ }
45
+
46
+ &:disabled {
47
+ ${e=>e.disabled===!0&&t.getDisabledStateCss(e.theme)};
48
+ cursor: default;
49
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled","gray","disabled","background")};
50
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonFilled",e.color,"disabled","text")};
51
+ }
52
+ `,w=b.newStyled.button`
53
+ ${e=>m(e)}
54
+
55
+ ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
56
+
57
+ backdrop-filter: blur(48px);
58
+ color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"enabled","text")};
59
+
60
+ background-color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"enabled","background","backgroundOpacity")};
61
+
62
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
63
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
64
+
65
+ &:hover {
66
+ background-color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"hover","background","backgroundOpacity")};
67
+ color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"hover","text")};
68
+ }
69
+
70
+ &:focus {
71
+ background-color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"focus","background","backgroundOpacity")};
72
+ color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"focus","text")};
73
+ ${e=>e.disabled===!1&&t.getOutlineCss(e.theme)};
74
+ }
75
+
76
+ &:active {
77
+ background-color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"active","background","backgroundOpacity")};
78
+ color: ${e=>e.disabled!==!0&&t.getColorRgbaValue(e.theme,"ButtonTinted",e.color,"active","text")};
79
+ }
80
+ &:disabled {
81
+ ${e=>e.disabled===!0&&t.getDisabledStateCss(e.theme)};
82
+ cursor: default;
83
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonTinted","gray","disabled","background","backgroundOpacity")};
84
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonTinted","gray","disabled","text")};
85
+ }
86
+ `,C=b.newStyled.button`
87
+ ${e=>m(e)}
88
+
89
+ ${e=>t.getComponentTypographyCss(e.theme,"ButtonTinted",e.size,"enabled")};
90
+
91
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","text")};
92
+
93
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","background","backgroundOpacity")};
94
+
95
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
96
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
97
+
98
+ &:hover {
99
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"hover","background","backgroundOpacity")};
100
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"hover","text")};
101
+ }
102
+
103
+ &:focus {
104
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"focus","background","backgroundOpacity")};
105
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"hover","text")};
106
+ ${e=>e.disabled===!1&&t.getOutlineCss(e.theme)};
107
+ }
108
+
109
+ &:active {
110
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"active","background","backgroundOpacity")};
111
+ color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"active","text")};
112
+ }
113
+
114
+ &:disabled {
115
+ ${e=>e.disabled===!0&&t.getDisabledStateCss(e.theme)};
116
+ cursor: default;
117
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"ButtonBasic","gray","disabled","background","backgroundOpacity")};
118
+ }
119
+ `,F=b.newStyled(C)`
120
+ border: 1px solid
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,g={theme:S.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`},s=()=>$.isValidElement(h)?h:a.jsx(P,{className:v()});return l==="filled"?a.jsx(B,{ref:n,"data-type":"filled",...g,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,type:l,...d,children:s()}):l==="tinted"?a.jsx(w,{ref:n,"data-type":"tinted",...g,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:s()}):l==="outline"?a.jsx(F,{ref:n,"data-type":"outline",...g,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:s()}):l==="basic"?a.jsx(C,{ref:n,"data-type":"basic",...g,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:s()}):a.jsx(B,{ref:n,"data-type":"filled",size:y,...g,onFocus:r,onBlur:i,onClick:c,onKeyDown:u,...d,children:s()})});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;
@@ -0,0 +1,481 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import x from "react";
3
+ import { P as o } from "./index-Ds9PUTwb.js";
4
+ /* empty css */
5
+ import { n as h } from "./emotion-styled.browser.esm-BZSYYThs.js";
6
+ import { a as $, b as t, f as n, h as f, g as B, c as N } from "./utils-DEke8iwo.js";
7
+ import { u as V } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ const k = (e) => `
9
+ outline: none;
10
+ display: inline-flex;
11
+ flex-direction: row;
12
+ justify-content: center;
13
+ align-items: center;
14
+ border: none;
15
+ transition: all 50 ms ease-in;
16
+ cursor: pointer;
17
+ color: ${!e.disabled && "white"};
18
+
19
+ border-radius: ${N(
20
+ e.theme,
21
+ e.borderRadius
22
+ )};
23
+
24
+ min-width: ${n(e.theme, e.size)};
25
+ max-width: ${n(e.theme, e.size)};
26
+ `, j = h.i`
27
+ font-size: 1.125rem;
28
+ `, v = h.button`
29
+ ${(e) => k(e)}
30
+
31
+ ${(e) => $(
32
+ e.theme,
33
+ "ButtonFilled",
34
+ e.size,
35
+ "enabled"
36
+ )};
37
+
38
+ background-color: ${(e) => t(
39
+ e.theme,
40
+ "ButtonFilled",
41
+ e.color,
42
+ "enabled",
43
+ "background"
44
+ )};
45
+ color: ${(e) => t(
46
+ e.theme,
47
+ "ButtonFilled",
48
+ e.color,
49
+ "enabled",
50
+ "text"
51
+ )};
52
+
53
+ min-height: ${(e) => n(e.theme, e.size)};
54
+ max-height: ${(e) => n(e.theme, e.size)};
55
+
56
+ &:hover {
57
+ background-color: ${(e) => t(
58
+ e.theme,
59
+ "ButtonFilled",
60
+ e.color,
61
+ "hover",
62
+ "background"
63
+ )};
64
+ color: ${(e) => t(
65
+ e.theme,
66
+ "ButtonFilled",
67
+ e.color,
68
+ "hover",
69
+ "text"
70
+ )};
71
+ }
72
+
73
+ &:focus {
74
+ background-color: ${(e) => t(
75
+ e.theme,
76
+ "ButtonFilled",
77
+ e.color,
78
+ "focus",
79
+ "background"
80
+ )};
81
+ color: ${(e) => t(
82
+ e.theme,
83
+ "ButtonFilled",
84
+ e.color,
85
+ "focus",
86
+ "text"
87
+ )};
88
+
89
+ ${(e) => e.disabled === !1 && f(e.theme)};
90
+ }
91
+
92
+ &:active {
93
+ background-color: ${(e) => t(
94
+ e.theme,
95
+ "ButtonFilled",
96
+ e.color,
97
+ "active",
98
+ "background"
99
+ )};
100
+ color: ${(e) => t(
101
+ e.theme,
102
+ "ButtonFilled",
103
+ e.color,
104
+ "active",
105
+ "text"
106
+ )};
107
+ }
108
+
109
+ &:disabled {
110
+ ${(e) => e.disabled === !0 && B(e.theme)};
111
+ cursor: default;
112
+ background-color: ${(e) => t(
113
+ e.theme,
114
+ "ButtonFilled",
115
+ "gray",
116
+ "disabled",
117
+ "background"
118
+ )};
119
+ color: ${(e) => t(
120
+ e.theme,
121
+ "ButtonFilled",
122
+ e.color,
123
+ "disabled",
124
+ "text"
125
+ )};
126
+ }
127
+ `, D = h.button`
128
+ ${(e) => k(e)}
129
+
130
+ ${(e) => $(
131
+ e.theme,
132
+ "ButtonTinted",
133
+ e.size,
134
+ "enabled"
135
+ )};
136
+
137
+ backdrop-filter: blur(48px);
138
+ color: ${(e) => e.disabled !== !0 && t(
139
+ e.theme,
140
+ "ButtonTinted",
141
+ e.color,
142
+ "enabled",
143
+ "text"
144
+ )};
145
+
146
+ background-color: ${(e) => e.disabled !== !0 && t(
147
+ e.theme,
148
+ "ButtonTinted",
149
+ e.color,
150
+ "enabled",
151
+ "background",
152
+ "backgroundOpacity"
153
+ )};
154
+
155
+ min-height: ${(e) => n(e.theme, e.size)};
156
+ max-height: ${(e) => n(e.theme, e.size)};
157
+
158
+ &:hover {
159
+ background-color: ${(e) => e.disabled !== !0 && t(
160
+ e.theme,
161
+ "ButtonTinted",
162
+ e.color,
163
+ "hover",
164
+ "background",
165
+ "backgroundOpacity"
166
+ )};
167
+ color: ${(e) => e.disabled !== !0 && t(
168
+ e.theme,
169
+ "ButtonTinted",
170
+ e.color,
171
+ "hover",
172
+ "text"
173
+ )};
174
+ }
175
+
176
+ &:focus {
177
+ background-color: ${(e) => e.disabled !== !0 && t(
178
+ e.theme,
179
+ "ButtonTinted",
180
+ e.color,
181
+ "focus",
182
+ "background",
183
+ "backgroundOpacity"
184
+ )};
185
+ color: ${(e) => e.disabled !== !0 && t(
186
+ e.theme,
187
+ "ButtonTinted",
188
+ e.color,
189
+ "focus",
190
+ "text"
191
+ )};
192
+ ${(e) => e.disabled === !1 && f(e.theme)};
193
+ }
194
+
195
+ &:active {
196
+ background-color: ${(e) => e.disabled !== !0 && t(
197
+ e.theme,
198
+ "ButtonTinted",
199
+ e.color,
200
+ "active",
201
+ "background",
202
+ "backgroundOpacity"
203
+ )};
204
+ color: ${(e) => e.disabled !== !0 && t(
205
+ e.theme,
206
+ "ButtonTinted",
207
+ e.color,
208
+ "active",
209
+ "text"
210
+ )};
211
+ }
212
+ &:disabled {
213
+ ${(e) => e.disabled === !0 && B(e.theme)};
214
+ cursor: default;
215
+ background-color: ${(e) => t(
216
+ e.theme,
217
+ "ButtonTinted",
218
+ "gray",
219
+ "disabled",
220
+ "background",
221
+ "backgroundOpacity"
222
+ )};
223
+ color: ${(e) => t(
224
+ e.theme,
225
+ "ButtonTinted",
226
+ "gray",
227
+ "disabled",
228
+ "text"
229
+ )};
230
+ }
231
+ `, T = h.button`
232
+ ${(e) => k(e)}
233
+
234
+ ${(e) => $(
235
+ e.theme,
236
+ "ButtonTinted",
237
+ e.size,
238
+ "enabled"
239
+ )};
240
+
241
+ color: ${(e) => t(
242
+ e.theme,
243
+ "ButtonBasic",
244
+ e.color,
245
+ "enabled",
246
+ "text"
247
+ )};
248
+
249
+ background-color: ${(e) => t(
250
+ e.theme,
251
+ "ButtonBasic",
252
+ e.color,
253
+ "enabled",
254
+ "background",
255
+ "backgroundOpacity"
256
+ )};
257
+
258
+ min-height: ${(e) => n(e.theme, e.size)};
259
+ max-height: ${(e) => n(e.theme, e.size)};
260
+
261
+ &:hover {
262
+ background-color: ${(e) => t(
263
+ e.theme,
264
+ "ButtonBasic",
265
+ e.color,
266
+ "hover",
267
+ "background",
268
+ "backgroundOpacity"
269
+ )};
270
+ color: ${(e) => t(
271
+ e.theme,
272
+ "ButtonBasic",
273
+ e.color,
274
+ "hover",
275
+ "text"
276
+ )};
277
+ }
278
+
279
+ &:focus {
280
+ background-color: ${(e) => t(
281
+ e.theme,
282
+ "ButtonBasic",
283
+ e.color,
284
+ "focus",
285
+ "background",
286
+ "backgroundOpacity"
287
+ )};
288
+ color: ${(e) => t(
289
+ e.theme,
290
+ "ButtonBasic",
291
+ e.color,
292
+ "hover",
293
+ "text"
294
+ )};
295
+ ${(e) => e.disabled === !1 && f(e.theme)};
296
+ }
297
+
298
+ &:active {
299
+ background-color: ${(e) => t(
300
+ e.theme,
301
+ "ButtonBasic",
302
+ e.color,
303
+ "active",
304
+ "background",
305
+ "backgroundOpacity"
306
+ )};
307
+ color: ${(e) => t(
308
+ e.theme,
309
+ "ButtonBasic",
310
+ e.color,
311
+ "active",
312
+ "text"
313
+ )};
314
+ }
315
+
316
+ &:disabled {
317
+ ${(e) => e.disabled === !0 && B(e.theme)};
318
+ cursor: default;
319
+ background-color: ${(e) => t(
320
+ e.theme,
321
+ "ButtonBasic",
322
+ "gray",
323
+ "disabled",
324
+ "background",
325
+ "backgroundOpacity"
326
+ )};
327
+ }
328
+ `, P = h(T)`
329
+ border: 1px solid
330
+ ${(e) => t(
331
+ e.theme,
332
+ "ButtonBasic",
333
+ e.color,
334
+ "enabled",
335
+ "border",
336
+ "borderOpacity"
337
+ )};
338
+ `, K = x.forwardRef((e, c) => {
339
+ const {
340
+ icon: g = null,
341
+ iconStyle: O = "solid",
342
+ borderRadius: z = "regular",
343
+ btnType: a = "filled",
344
+ disabled: F = !1,
345
+ tabIndex: U = 0,
346
+ //----------------
347
+ onFocus: i = () => {
348
+ },
349
+ onBlur: d = () => {
350
+ },
351
+ onClick: r = () => {
352
+ },
353
+ onKeyDown: u = () => {
354
+ },
355
+ //----------------
356
+ size: y = "small",
357
+ color: w = "primary",
358
+ className: C = "",
359
+ style: R = {},
360
+ ...b
361
+ } = e, s = {
362
+ theme: V(),
363
+ color: w,
364
+ size: y,
365
+ style: R,
366
+ className: "lnc-ui-icon-button " + C,
367
+ disabled: F,
368
+ borderRadius: z,
369
+ btnType: a
370
+ }, S = () => {
371
+ var I = O === "solid" ? "fas" : "far";
372
+ return `${I} fa-${g} fa-fw`;
373
+ }, m = () => x.isValidElement(g) ? g : /* @__PURE__ */ l(j, { className: S() });
374
+ return a === "filled" ? /* @__PURE__ */ l(
375
+ v,
376
+ {
377
+ ref: c,
378
+ "data-type": "filled",
379
+ ...s,
380
+ onFocus: i,
381
+ onBlur: d,
382
+ onClick: r,
383
+ onKeyDown: u,
384
+ type: a,
385
+ ...b,
386
+ children: m()
387
+ }
388
+ ) : a === "tinted" ? /* @__PURE__ */ l(
389
+ D,
390
+ {
391
+ ref: c,
392
+ "data-type": "tinted",
393
+ ...s,
394
+ onFocus: i,
395
+ onBlur: d,
396
+ onClick: r,
397
+ onKeyDown: u,
398
+ ...b,
399
+ children: m()
400
+ }
401
+ ) : a === "outline" ? /* @__PURE__ */ l(
402
+ P,
403
+ {
404
+ ref: c,
405
+ "data-type": "outline",
406
+ ...s,
407
+ onFocus: i,
408
+ onBlur: d,
409
+ onClick: r,
410
+ onKeyDown: u,
411
+ ...b,
412
+ children: m()
413
+ }
414
+ ) : a === "basic" ? /* @__PURE__ */ l(
415
+ T,
416
+ {
417
+ ref: c,
418
+ "data-type": "basic",
419
+ ...s,
420
+ onFocus: i,
421
+ onBlur: d,
422
+ onClick: r,
423
+ onKeyDown: u,
424
+ ...b,
425
+ children: m()
426
+ }
427
+ ) : /* @__PURE__ */ l(
428
+ v,
429
+ {
430
+ ref: c,
431
+ "data-type": "filled",
432
+ size: y,
433
+ ...s,
434
+ onFocus: i,
435
+ onBlur: d,
436
+ onClick: r,
437
+ onKeyDown: u,
438
+ ...b,
439
+ children: m()
440
+ }
441
+ );
442
+ });
443
+ K.propTypes = {
444
+ icon: o.oneOfType([o.string, o.element]),
445
+ iconStyle: o.oneOf(["regular", "solid"]),
446
+ borderRadius: o.oneOf([
447
+ "slight",
448
+ "regular",
449
+ "edged",
450
+ "curved",
451
+ "none"
452
+ ]),
453
+ /**
454
+ * Different styles
455
+ */
456
+ btnType: o.oneOf(["filled", "tinted", "outline", "basic"]),
457
+ disabled: o.bool,
458
+ tabIndex: o.number,
459
+ //---------------------------------------------------------------
460
+ onBlur: o.func,
461
+ onFocus: o.func,
462
+ onClick: o.func,
463
+ onKeyDown: o.func,
464
+ //---------------------------------------------------------------
465
+ className: o.string,
466
+ style: o.object,
467
+ color: o.oneOf([
468
+ "primary",
469
+ "secondary",
470
+ "success",
471
+ "warning",
472
+ "danger",
473
+ "information",
474
+ "neutral",
475
+ "gray"
476
+ ]),
477
+ size: o.oneOf(["small", "medium", "large"])
478
+ };
479
+ export {
480
+ K as default
481
+ };