@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,60 @@
1
+ "use strict";const i=require("react/jsx-runtime"),b=require("react"),C=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),t=require("./index-DXnSjbfJ.cjs"),n=require("./utils-hdRGTsQ7.cjs"),N=require("./index-BjdOz5Ok.cjs"),A=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),H=require("./useUpdateEffect-BtMgpgIV.cjs"),V=(e,r)=>`calc(${n.getSizeValueWithUnits(e,r)} - 1rem)`,L=C.newStyled.label`
2
+ display: inline-flex;
3
+ align-items: center;
4
+ gap: 0.5rem;
5
+ ${e=>n.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")};
6
+ min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
7
+ max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
8
+ background-color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
9
+ color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","text")};
10
+ border: 1px solid
11
+ ${e=>n.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","border")};
12
+ border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,"regular")};
13
+ padding: 0.625rem 0.75rem;
14
+ width: 100%;
15
+ ${e=>!e.disabled&&e.readOnly!==!0&&e.isFocused===!0&&n.getOutlineCss(e.theme)};
16
+ ${e=>e.disabled===!0&&n.getDisabledBackgroundCss(e.theme)}
17
+ border: 1px solid ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"disabled","border")};
18
+ `,G=C.newStyled.div`
19
+ ${e=>!e.disabled&&e.readOnly!==!0&&"cursor: pointer;"}
20
+ min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
21
+ max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ ${e=>e.withInput==!0&&"width: 100%;"}
26
+ & div {
27
+ &:focus {
28
+ ${e=>e.disabled!==!0&&e.withInput!==!0&&e.readOnly!==!0&&n.getOutlineCss(e.theme)};
29
+ }
30
+ &:hover {
31
+ ${e=>!e.disabled&&!e.withInput&&e.readOnly!==!0&&n.getOutlineCss(e.theme)};
32
+ }
33
+ ${e=>e.disabled===!0&&`opacity: ${e.theme.palette.opacity[e.theme.palette.disabled.opacity]};`}
34
+ box-sizing: border-box;
35
+ min-width: ${e=>V(e.theme,e.size)};
36
+ height: ${e=>V(e.theme,e.size)};
37
+ border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,"curved")};
38
+ overflow: hidden;
39
+ & input[type="color"] {
40
+ border: 0;
41
+ padding: 0;
42
+ width: 200%;
43
+ height: 200%;
44
+ cursor: pointer;
45
+ transform: translate(-25%, -25%);
46
+ ${e=>e.disabled===!0&&n.getDisabledStateCss(e.theme)};
47
+ }
48
+ }
49
+ `,J=C.newStyled.span`
50
+ display: flex;
51
+ align-items: center;
52
+ overflow: hidden;
53
+ width: 100%;
54
+ & input {
55
+ outline: none;
56
+ border: none;
57
+ background-color: transparent;
58
+ width: 100%;
59
+ }
60
+ `,F=b.forwardRef((e,r)=>{const{id:u,name:y,defaultValue:P="#000000",value:s,size:v="small",tabIndex:p,withInput:f=!1,className:R="",style:j={},color:d="primary",debounceTime:O=180,readOnly:l,disabled:a,onChange:x=()=>{},onFocus:B=()=>{},onBlur:U=()=>{},onInput:q=()=>{},onKeyDown:W=()=>{},labelRef:k,inputProps:T,...z}=e,I=A.useTheme(),[c,$]=b.useState(s),[D,S]=b.useState(!1),E=new RegExp(/^#[0-9A-F]{6}$/i);H.useUpdateEffect(()=>$(s),[s]);const _=b.useCallback(N.debounce((o,w)=>K(o,w),O),[x]),K=(o,w)=>{x&&x(o,w)},h=o=>{s&&$(o.target.value),_(o,o.target.value)},g=o=>{S(!0),B(o)},m=o=>{E.test(c)||$(P),S(!1),U(o)};return i.jsx(G,{ref:r,theme:I,size:v,className:R,style:j,disabled:a,readOnly:l,withInput:f,...z,children:f?i.jsxs(L,{withInput:f,theme:I,color:d,size:v,disabled:a,readOnly:l,tabIndex:p,isFocused:D,children:[i.jsx("div",{children:i.jsx("input",{type:"color",ref:r,id:u,name:y,value:c,disabled:a||l,onChange:h,onBlur:m,onFocus:g,color:d,...T})}),i.jsx(J,{children:i.jsx("input",{ref:k,value:c,onChange:h,onFocus:g,onBlur:m,onInput:q,onKeyDown:W,disabled:a||l,...z})})]}):i.jsx("div",{children:s==null||s=="undefined"?i.jsx("input",{type:"color",ref:r,id:u,name:y,defaultValue:P,disabled:a||l,onChange:h,onBlur:m,onFocus:g,color:d,tabIndex:p,...T}):i.jsx("input",{type:"color",ref:r,id:u,name:y,value:c,disabled:a||l,onChange:h,onBlur:m,onFocus:g,color:d,tabIndex:p,...T})})})});F.propTypes={id:t.PropTypes.any,name:t.PropTypes.string,defaultValue:t.PropTypes.string,value:t.PropTypes.string,debounceTime:t.PropTypes.number,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,tabIndex:t.PropTypes.number,preventDefault:t.PropTypes.bool,labelRef:t.PropTypes.any,inputProps:t.PropTypes.bool,withInput:t.PropTypes.bool,onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,onInput:t.PropTypes.func,onKeyDown:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=F;
@@ -0,0 +1,256 @@
1
+ import { jsx as a, jsxs as L } from "react/jsx-runtime";
2
+ import q, { useState as R, useCallback as G } from "react";
3
+ import { n as I } from "./emotion-styled.browser.esm-BZSYYThs.js";
4
+ import { P as t } from "./index-Ds9PUTwb.js";
5
+ import { a as J, f as d, b as g, c as V, h as C, i as M, g as Q } from "./utils-DEke8iwo.js";
6
+ import { d as X } from "./index-D5vEbKUT.js";
7
+ import { u as Y } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ import { u as Z } from "./useUpdateEffect-CuYWz7EA.js";
9
+ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
10
+ display: inline-flex;
11
+ align-items: center;
12
+ gap: 0.5rem;
13
+ ${(e) => J(e.theme, "Input", e.size, "enabled")};
14
+ min-height: ${(e) => d(e.theme, e.size)};
15
+ max-height: ${(e) => d(e.theme, e.size)};
16
+ background-color: ${(e) => g(
17
+ e.theme,
18
+ "Input",
19
+ e.color,
20
+ "enabled",
21
+ "background"
22
+ )};
23
+ color: ${(e) => g(
24
+ e.theme,
25
+ "Input",
26
+ e.isFocused ? "primary" : e.color,
27
+ "enabled",
28
+ "text"
29
+ )};
30
+ border: 1px solid
31
+ ${(e) => g(
32
+ e.theme,
33
+ "Input",
34
+ e.isFocused ? "primary" : e.color,
35
+ "enabled",
36
+ "border"
37
+ )};
38
+ border-radius: ${(e) => V(e.theme, "regular")};
39
+ padding: 0.625rem 0.75rem;
40
+ width: 100%;
41
+ ${(e) => !e.disabled && e.readOnly !== !0 && e.isFocused === !0 && C(e.theme)};
42
+ ${(e) => e.disabled === !0 && M(e.theme)}
43
+ border: 1px solid ${(e) => g(e.theme, "Input", e.color, "disabled", "border")};
44
+ `, te = I.div`
45
+ ${(e) => !e.disabled && e.readOnly !== !0 && "cursor: pointer;"}
46
+ min-height: ${(e) => d(e.theme, e.size)};
47
+ max-height: ${(e) => d(e.theme, e.size)};
48
+ display: inline-flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ ${(e) => e.withInput == !0 && "width: 100%;"}
52
+ & div {
53
+ &:focus {
54
+ ${(e) => e.disabled !== !0 && e.withInput !== !0 && e.readOnly !== !0 && C(e.theme)};
55
+ }
56
+ &:hover {
57
+ ${(e) => !e.disabled && !e.withInput && e.readOnly !== !0 && C(e.theme)};
58
+ }
59
+ ${(e) => e.disabled === !0 && `opacity: ${e.theme.palette.opacity[e.theme.palette.disabled.opacity]};`}
60
+ box-sizing: border-box;
61
+ min-width: ${(e) => T(e.theme, e.size)};
62
+ height: ${(e) => T(e.theme, e.size)};
63
+ border-radius: ${(e) => V(e.theme, "curved")};
64
+ overflow: hidden;
65
+ & input[type="color"] {
66
+ border: 0;
67
+ padding: 0;
68
+ width: 200%;
69
+ height: 200%;
70
+ cursor: pointer;
71
+ transform: translate(-25%, -25%);
72
+ ${(e) => e.disabled === !0 && Q(e.theme)};
73
+ }
74
+ }
75
+ `, ne = I.span`
76
+ display: flex;
77
+ align-items: center;
78
+ overflow: hidden;
79
+ width: 100%;
80
+ & input {
81
+ outline: none;
82
+ border: none;
83
+ background-color: transparent;
84
+ width: 100%;
85
+ }
86
+ `, ae = q.forwardRef((e, o) => {
87
+ const {
88
+ id: u,
89
+ name: f,
90
+ defaultValue: z = "#000000",
91
+ value: i,
92
+ size: F = "small",
93
+ tabIndex: y,
94
+ withInput: $ = !1,
95
+ className: k = "",
96
+ style: D = {},
97
+ color: s = "primary",
98
+ debounceTime: j = 180,
99
+ readOnly: l,
100
+ disabled: r,
101
+ onChange: w = () => {
102
+ },
103
+ onFocus: P = () => {
104
+ },
105
+ onBlur: U = () => {
106
+ },
107
+ onInput: E = () => {
108
+ },
109
+ onKeyDown: K = () => {
110
+ },
111
+ labelRef: N,
112
+ inputProps: x,
113
+ ...O
114
+ } = e, B = Y(), [c, p] = R(i), [W, S] = R(!1), _ = new RegExp(/^#[0-9A-F]{6}$/i);
115
+ Z(() => p(i), [i]);
116
+ const A = G(
117
+ X((n, v) => H(n, v), j),
118
+ [w]
119
+ ), H = (n, v) => {
120
+ w && w(n, v);
121
+ }, m = (n) => {
122
+ i && p(n.target.value), A(n, n.target.value);
123
+ }, h = (n) => {
124
+ S(!0), P(n);
125
+ }, b = (n) => {
126
+ _.test(c) || p(z), S(!1), U(n);
127
+ };
128
+ return /* @__PURE__ */ a(
129
+ te,
130
+ {
131
+ ref: o,
132
+ theme: B,
133
+ size: F,
134
+ className: k,
135
+ style: D,
136
+ disabled: r,
137
+ readOnly: l,
138
+ withInput: $,
139
+ ...O,
140
+ children: $ ? /* @__PURE__ */ L(
141
+ ee,
142
+ {
143
+ withInput: $,
144
+ theme: B,
145
+ color: s,
146
+ size: F,
147
+ disabled: r,
148
+ readOnly: l,
149
+ tabIndex: y,
150
+ isFocused: W,
151
+ children: [
152
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(
153
+ "input",
154
+ {
155
+ type: "color",
156
+ ref: o,
157
+ id: u,
158
+ name: f,
159
+ value: c,
160
+ disabled: r || l,
161
+ onChange: m,
162
+ onBlur: b,
163
+ onFocus: h,
164
+ color: s,
165
+ ...x
166
+ }
167
+ ) }),
168
+ /* @__PURE__ */ a(ne, { children: /* @__PURE__ */ a(
169
+ "input",
170
+ {
171
+ ref: N,
172
+ value: c,
173
+ onChange: m,
174
+ onFocus: h,
175
+ onBlur: b,
176
+ onInput: E,
177
+ onKeyDown: K,
178
+ disabled: r || l,
179
+ ...O
180
+ }
181
+ ) })
182
+ ]
183
+ }
184
+ ) : /* @__PURE__ */ a("div", { children: i == null || i == "undefined" ? /* @__PURE__ */ a(
185
+ "input",
186
+ {
187
+ type: "color",
188
+ ref: o,
189
+ id: u,
190
+ name: f,
191
+ defaultValue: z,
192
+ disabled: r || l,
193
+ onChange: m,
194
+ onBlur: b,
195
+ onFocus: h,
196
+ color: s,
197
+ tabIndex: y,
198
+ ...x
199
+ }
200
+ ) : /* @__PURE__ */ a(
201
+ "input",
202
+ {
203
+ type: "color",
204
+ ref: o,
205
+ id: u,
206
+ name: f,
207
+ value: c,
208
+ disabled: r || l,
209
+ onChange: m,
210
+ onBlur: b,
211
+ onFocus: h,
212
+ color: s,
213
+ tabIndex: y,
214
+ ...x
215
+ }
216
+ ) })
217
+ }
218
+ );
219
+ });
220
+ ae.propTypes = {
221
+ id: t.any,
222
+ name: t.string,
223
+ defaultValue: t.string,
224
+ value: t.string,
225
+ debounceTime: t.number,
226
+ disabled: t.bool,
227
+ readOnly: t.bool,
228
+ tabIndex: t.number,
229
+ preventDefault: t.bool,
230
+ labelRef: t.any,
231
+ inputProps: t.bool,
232
+ withInput: t.bool,
233
+ //---------------------------------------------------------------
234
+ onChange: t.func,
235
+ onBlur: t.func,
236
+ onFocus: t.func,
237
+ onInput: t.func,
238
+ onKeyDown: t.func,
239
+ //---------------------------------------------------------------
240
+ className: t.string,
241
+ style: t.object,
242
+ size: t.oneOf(["small", "medium", "large"]),
243
+ color: t.oneOf([
244
+ "primary",
245
+ "secondary",
246
+ "success",
247
+ "danger",
248
+ "warning",
249
+ "information",
250
+ "neutral",
251
+ "gray"
252
+ ])
253
+ };
254
+ export {
255
+ ae as default
256
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";const t=require("react/jsx-runtime"),p=require("react"),r=require("./index-DXnSjbfJ.cjs"),y=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),m=require("./Icon.cjs"),u=require("./utils-hdRGTsQ7.cjs"),B=require("./Modal.cjs"),F=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),E=y.newStyled.div`
2
+ display: flex;
3
+ gap: 1rem;
4
+ align-items: center;
5
+ ${e=>e.type=="centered"&&"flex-direction: column; gap: 1.25rem;"}
6
+ & .alert-icon {
7
+ font-size: 2.2rem;
8
+ color: ${e=>u.getColorRgbaValue(e.theme,"ConfirmationForm",e.color,"enabled","icon")};
9
+ }
10
+ ${e=>e.type=="centered"&&"padding-top: 0.5rem;"}
11
+ `,V=y.newStyled.div`
12
+ display: flex;
13
+ flex-direction: ${e=>e.type=="regular"?"row":"column"};
14
+ width: 100%;
15
+ flex: 1;
16
+ gap: 0.5rem;
17
+ justify-content: ${e=>M(e.actionsAlignment)};
18
+ ${e=>e.type=="regular"&&"height: 4rem; border-radius: 0 0 16px 16px; padding: 0.75rem 1.5rem 0.75rem 1.5rem;"}
19
+ ${e=>e.type=="regular"&&e.actionsTrack==!1&&"padding: 0 1.5rem 1.5rem 1.5rem;"}
20
+ ${e=>e.type=="regular"&&e.actionsTrack==!0&&`background-color: ${u.getColorRgbaValue(e.theme,"ConfirmationForm","primary","enabled","trackBg")};`}
21
+ ${e=>e.type=="centered"&&"padding: 1rem 0 0.5rem 0;"}
22
+ `,M=e=>e=="right"?"end":e=="left"?"start":"center",d=p.forwardRef((e,g)=>{const{color:f,statusIcon:T=!0,title:x,type:s="regular",actions:P,actionsAlignment:h="right",actionsTrack:b=!1,overlay:j=!0,showCloseButton:k=!0,onClose:C=()=>{},zIndex:w=1e3,size:$="fluid",clickOutsideToClose:q=!1,className:A="",style:O={},overlayProps:v,children:D,rest:N}=e;let i={theme:F.useTheme(),size:$,zIndex:w,className:"lnc-ui-confirmation-form "+A,style:O};const z=o=>o=="danger"?"times-circle":o=="warning"?"exclamation-triangle":o=="success"?"check-circle":"exclamation-circle",R=({statusIcon:o,color:n})=>typeof o=="boolean"&&o==!0?t.jsx(m,{className:"alert-icon",icon:z(n)}):typeof o=="string"&&o!==""?t.jsx(m,{className:"alert-icon",icon:o}):p.cloneElement(o,{className:"alert-icon "+(o==null?void 0:o.className)}),S=({statusIcon:o,color:n,title:l,type:c,themeProps:a})=>t.jsxs(E,{...a,color:n,type:c,children:[t.jsx(R,{statusIcon:o,color:n}),t.jsx("h3",{children:l})]}),_=({actions:o,type:n,actionsAlignment:l,actionsTrack:c,themeProps:a})=>t.jsx(V,{type:n,actionsAlignment:l,actionsTrack:c,...a,children:o});return t.jsx(B,{ref:g,...i,header:s=="regular"?t.jsx(S,{statusIcon:T,color:f,title:x,type:s,themeProps:i}):null,footer:s=="regular"?t.jsx(_,{actions:P,type:s,actionsAlignment:h,actionsTrack:b,themeProps:i}):null,overlay:j,showCloseButton:k,onClose:C,clickOutsideToClose:q,overlayProps:v,...N,children:t.jsx("div",{children:"okej"})})});d.propTypes={color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"]),statusIcon:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.element,r.PropTypes.bool]),title:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.element]),type:r.PropTypes.oneOf(["regular","centered"]),actions:r.PropTypes.element,actionsAlignment:r.PropTypes.oneOf(["right","center","left"]),actionsTrack:r.PropTypes.bool,showCloseButton:r.PropTypes.bool,overlay:r.PropTypes.bool,onClose:r.PropTypes.func,zIndex:r.PropTypes.number,clickOutsideToClose:r.PropTypes.bool,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["fluid","xs","s","m","l","xl","full"]),overlayProps:r.PropTypes.any};module.exports=d;
@@ -0,0 +1,169 @@
1
+ import { jsx as o, jsxs as S } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { P as r } from "./index-Ds9PUTwb.js";
4
+ import { n as d } from "./emotion-styled.browser.esm-BZSYYThs.js";
5
+ import f from "./Icon.js";
6
+ import { b as u } from "./utils-DEke8iwo.js";
7
+ import _ from "./Modal.js";
8
+ import { u as E } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
9
+ const M = d.div`
10
+ display: flex;
11
+ gap: 1rem;
12
+ align-items: center;
13
+ ${(e) => e.type == "centered" && "flex-direction: column; gap: 1.25rem;"}
14
+ & .alert-icon {
15
+ font-size: 2.2rem;
16
+ color: ${(e) => u(
17
+ e.theme,
18
+ "ConfirmationForm",
19
+ e.color,
20
+ "enabled",
21
+ "icon"
22
+ )};
23
+ }
24
+ ${(e) => e.type == "centered" && "padding-top: 0.5rem;"}
25
+ `, V = d.div`
26
+ display: flex;
27
+ flex-direction: ${(e) => e.type == "regular" ? "row" : "column"};
28
+ width: 100%;
29
+ flex: 1;
30
+ gap: 0.5rem;
31
+ justify-content: ${(e) => q(e.actionsAlignment)};
32
+ ${(e) => e.type == "regular" && "height: 4rem; border-radius: 0 0 16px 16px; padding: 0.75rem 1.5rem 0.75rem 1.5rem;"}
33
+ ${(e) => e.type == "regular" && e.actionsTrack == !1 && "padding: 0 1.5rem 1.5rem 1.5rem;"}
34
+ ${(e) => e.type == "regular" && e.actionsTrack == !0 && `background-color: ${u(
35
+ e.theme,
36
+ "ConfirmationForm",
37
+ "primary",
38
+ "enabled",
39
+ "trackBg"
40
+ )};`}
41
+ ${(e) => e.type == "centered" && "padding: 1rem 0 0.5rem 0;"}
42
+ `, q = (e) => e == "right" ? "end" : e == "left" ? "start" : "center", D = m.forwardRef((e, p) => {
43
+ const {
44
+ color: g,
45
+ statusIcon: y = !0,
46
+ title: h,
47
+ type: i = "regular",
48
+ actions: x,
49
+ actionsAlignment: T = "right",
50
+ actionsTrack: b = !1,
51
+ overlay: k = !0,
52
+ showCloseButton: C = !0,
53
+ onClose: $ = () => {
54
+ },
55
+ zIndex: w = 1e3,
56
+ size: A = "fluid",
57
+ clickOutsideToClose: O = !1,
58
+ className: v = "",
59
+ style: N = {},
60
+ overlayProps: P,
61
+ children: G,
62
+ rest: j
63
+ } = e;
64
+ let l = {
65
+ theme: E(),
66
+ size: A,
67
+ zIndex: w,
68
+ className: "lnc-ui-confirmation-form " + v,
69
+ style: N
70
+ };
71
+ const z = (t) => t == "danger" ? "times-circle" : t == "warning" ? "exclamation-triangle" : t == "success" ? "check-circle" : "exclamation-circle", B = ({ statusIcon: t, color: n }) => typeof t == "boolean" && t == !0 ? /* @__PURE__ */ o(f, { className: "alert-icon", icon: z(n) }) : typeof t == "string" && t !== "" ? /* @__PURE__ */ o(f, { className: "alert-icon", icon: t }) : m.cloneElement(t, {
72
+ className: "alert-icon " + (t == null ? void 0 : t.className)
73
+ }), F = ({ statusIcon: t, color: n, title: a, type: c, themeProps: s }) => /* @__PURE__ */ S(M, { ...s, color: n, type: c, children: [
74
+ /* @__PURE__ */ o(B, { statusIcon: t, color: n }),
75
+ /* @__PURE__ */ o("h3", { children: a })
76
+ ] }), R = ({
77
+ actions: t,
78
+ type: n,
79
+ actionsAlignment: a,
80
+ actionsTrack: c,
81
+ themeProps: s
82
+ }) => /* @__PURE__ */ o(
83
+ V,
84
+ {
85
+ type: n,
86
+ actionsAlignment: a,
87
+ actionsTrack: c,
88
+ ...s,
89
+ children: t
90
+ }
91
+ );
92
+ return /* @__PURE__ */ o(
93
+ _,
94
+ {
95
+ ref: p,
96
+ ...l,
97
+ header: i == "regular" ? /* @__PURE__ */ o(
98
+ F,
99
+ {
100
+ statusIcon: y,
101
+ color: g,
102
+ title: h,
103
+ type: i,
104
+ themeProps: l
105
+ }
106
+ ) : null,
107
+ footer: i == "regular" ? /* @__PURE__ */ o(
108
+ R,
109
+ {
110
+ actions: x,
111
+ type: i,
112
+ actionsAlignment: T,
113
+ actionsTrack: b,
114
+ themeProps: l
115
+ }
116
+ ) : null,
117
+ overlay: k,
118
+ showCloseButton: C,
119
+ onClose: $,
120
+ clickOutsideToClose: O,
121
+ overlayProps: P,
122
+ ...j,
123
+ children: /* @__PURE__ */ o("div", { children: "okej" })
124
+ }
125
+ );
126
+ });
127
+ D.propTypes = {
128
+ color: r.oneOf([
129
+ "primary",
130
+ "secondary",
131
+ "success",
132
+ "danger",
133
+ "warning",
134
+ "information",
135
+ "neutral",
136
+ "gray"
137
+ ]),
138
+ /**
139
+ * Can be boolean (true - display default icon, false - don't display icon at all), string (display custom icon), element (display custom element as icon)
140
+ */
141
+ statusIcon: r.oneOfType([
142
+ r.string,
143
+ r.element,
144
+ r.bool
145
+ ]),
146
+ title: r.oneOfType([r.string, r.element]),
147
+ type: r.oneOf(["regular", "centered"]),
148
+ actions: r.element,
149
+ /**
150
+ * Aligmnent of actions when `type="regular"`
151
+ */
152
+ actionsAlignment: r.oneOf(["right", "center", "left"]),
153
+ /**
154
+ * Defines whether actions will be inside a track
155
+ */
156
+ actionsTrack: r.bool,
157
+ showCloseButton: r.bool,
158
+ overlay: r.bool,
159
+ onClose: r.func,
160
+ zIndex: r.number,
161
+ clickOutsideToClose: r.bool,
162
+ className: r.string,
163
+ style: r.object,
164
+ size: r.oneOf(["fluid", "xs", "s", "m", "l", "xl", "full"]),
165
+ overlayProps: r.any
166
+ };
167
+ export {
168
+ D as default
169
+ };
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime"),i=require("react"),c=require("./index-DXnSjbfJ.cjs"),e=i.forwardRef((t,n)=>{const{children:r,__TYPE__:_="Content",...s}=t;return o.jsx("main",{ref:n,...s,children:r})});e.propTypes={__TYPE__:c.PropTypes.string};e.displayName="Content";module.exports=e;
@@ -0,0 +1,18 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import s from "react";
3
+ import { P as _ } from "./index-Ds9PUTwb.js";
4
+ const t = s.forwardRef((r, o) => {
5
+ const { children: e, __TYPE__: a = "Content", ...n } = r;
6
+ return /* @__PURE__ */ p("main", { ref: o, ...n, children: e });
7
+ });
8
+ t.propTypes = {
9
+ /**
10
+ * Do not override this property.
11
+ * Should only be used as indicator for type if you are passing custom component.
12
+ */
13
+ __TYPE__: _.string
14
+ };
15
+ t.displayName = "Content";
16
+ export {
17
+ t as default
18
+ };