@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,36 @@
1
+ "use strict";const c=require("react/jsx-runtime"),d=require("react"),l=require("./index-DXnSjbfJ.cjs"),G=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),C=require("./Icon.cjs"),s=require("./utils-hdRGTsQ7.cjs"),H=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),J=G.newStyled.div`
2
+ box-sizing: border-box;
3
+ cursor: ${o=>o.disabled==!1?"pointer":"context-menu"};
4
+ width: 100%;
5
+ border-radius: 6px;
6
+ display: flex;
7
+ align-items: center;
8
+ min-height: 2.25rem;
9
+ gap: 0.563rem;
10
+ padding: 0.563rem;
11
+ color: ${o=>s.getColorRgbaValue(o.theme,"MenuItem",o.color,o.isActive===!0?"active":"enabled","text")};
12
+ &:hover {
13
+ ${o=>o.disabled===!1&&`background-color: ${s.getColorRgbaValue(o.theme,"MenuItem",o.color,"hover","background","backgroundOpacity")};`}
14
+
15
+ ${o=>o.disabled===!1&&`color: ${s.getColorRgbaValue(o.theme,"MenuItem",o.color,"hover","text")};`}
16
+ & .drop-down-icon-lnc {
17
+ ${o=>o.disabled===!1&&`color: ${s.getColorRgbaValue(o.theme,"MenuItem",o.color,"hover","icon")};`}
18
+ }
19
+ }
20
+ ${o=>s.getComponentTypographyCss(o.theme,"MenuItem",o.size,"enabled")};
21
+ & .drop-down-icon-lnc {
22
+ color: ${o=>o.isActive&&o.disabled==!1?s.getColorRgbaValue(o.theme,"MenuItem",o.color,"focus","icon"):s.getColorRgbaValue(o.theme,"MenuItem",o.color,"enabled","icon")};
23
+ ${o=>o.disabled===!0&&s.getDisabledStateCss(o.theme)};
24
+ background: transparent;
25
+ }
26
+ & .sub-menu-icon-lnc {
27
+ margin-left: auto;
28
+ transform: ${o=>o.showNested?"rotate(180deg)":"rotate(0)"};
29
+ transition: transform 0.25s ease;
30
+ }
31
+ ${o=>o.isActive==!0&&o.disabled==!1&&`background-color: ${s.getColorRgbaValue(o.theme,"MenuItem",o.color,"focus","background","backgroundOpacity")};
32
+ color: ${s.getColorRgbaValue(o.theme,"MenuItem",o.color,"focus","text")};
33
+ `}
34
+ outline: none;
35
+ ${o=>o.disabled===!0&&s.getDisabledStateCss(o.theme)};
36
+ `,P=d.forwardRef((o,a)=>{const{__TYPE__:Q="MENU_ITEM",active:f=!1,icon:T,disabled:m=!1,isNested:u=!1,showNested:v,value:E,onFocus:M=()=>{},onBlur:N=()=>{},onClick:x=()=>{},onKeyDown:$=()=>{},onMouseEnter:W=()=>{},onMouseLeave:X=()=>{},toggleNested:r=()=>{},onItemSelected:w=()=>{},color:k,className:_="",style:R={},size:S="small",iconProps:A,children:y,...q}=o,D={theme:H.useTheme(),color:k,style:R,size:S},g=d.useRef(),[O,b]=d.useState(f);d.useEffect(()=>{b(f)},[f]);const V=e=>{m==!1&&(u&&r&&r(),w(e,E,y),x(e))},j=e=>{b(!0),M(e)},F=e=>{b(!1),N(e)},z=e=>{e.preventDefault(),e.key=="ArrowDown"?h(a?a.current:g.current):e.key=="ArrowUp"?p(a?a.current:g.current):e.key=="Enter"&&m==!1&&(u&&r&&r(),w(e,E,y)),$(e)},h=e=>{if(e!=null&&e.nextSibling){let n=B(e);if(n!=null&&n.node&&(n==null?void 0:n.type)=="item")n.node.focus();else if(n!=null&&n.node&&(n==null?void 0:n.type)=="nested"){let i=L(n.node);i&&i.focus()}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&h(e.parentElement)}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&h(e.parentElement)},p=e=>{if(e!=null&&e.previousSibling){let n=K(e);if(n!=null&&n.node&&(n==null?void 0:n.type)=="item")n.node.focus();else if(n!=null&&n.node&&(n==null?void 0:n.type)=="nested"){let i=U(n.node);i&&i.focus()}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&p(e.parentElement)}else e!=null&&e.parentElement&&t(e.parentElement,"nested-item-lnc")&&p(e.parentElement)},B=e=>{for(;e=e.nextSibling;){if(t(e,"menu-item-lnc"))return{node:e,type:"item"};if(t(e,"nested-item-lnc"))return{node:e,type:"nested"}}return null},K=e=>{for(;e=e.previousSibling;){if(t(e,"menu-item-lnc"))return{node:e,type:"item"};if(t(e,"nested-item-lnc"))return{node:e,type:"nested"}}return null},L=e=>{var n;return(n=Array.from(e.querySelectorAll(".menu-item-lnc")))==null?void 0:n[0]},U=e=>{var n;return(n=Array.from(e.querySelectorAll(".menu-item-lnc")))==null?void 0:n.pop()},t=(e,n)=>{var i=" "+e.className+" ",Y=" "+n+" ";return i.indexOf(Y)!=-1};return c.jsx(c.Fragment,{children:c.jsxs(J,{ref:a||g,className:"menu-item-lnc "+_,disabled:m,tabIndex:0,onKeyDown:z,onFocus:j,onBlur:F,onClick:V,isActive:O,showNested:v,...D,...q,children:[T&&c.jsx(C,{icon:T,className:"drop-down-icon-lnc",...A}),c.jsx("div",{className:"menu-item-text-lnc",children:y}),u&&c.jsx(C,{icon:"angle-down",className:"sub-menu-icon-lnc"})]})})});P.propTypes={active:l.PropTypes.bool,icon:l.PropTypes.string,disabled:l.PropTypes.bool,isNested:l.PropTypes.bool,value:l.PropTypes.any,onBlur:l.PropTypes.func,onFocus:l.PropTypes.func,onClick:l.PropTypes.func,onKeyDown:l.PropTypes.func,onMouseEnter:l.PropTypes.func,onMouseLeave:l.PropTypes.func,className:l.PropTypes.string,style:l.PropTypes.object,color:l.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),iconProps:l.PropTypes.any,size:l.PropTypes.oneOf(["small","medium","large"]),__TYPE__:l.PropTypes.string};P.displayName="MENU_ITEM";module.exports=P;
@@ -0,0 +1,241 @@
1
+ import { jsx as d, Fragment as G, jsxs as H } from "react/jsx-runtime";
2
+ import J, { useRef as Q, useState as W, useEffect as X } from "react";
3
+ import { P as l } from "./index-Ds9PUTwb.js";
4
+ import { n as Z } from "./emotion-styled.browser.esm-BZSYYThs.js";
5
+ import M from "./Icon.js";
6
+ import { b as s, a as I, g as N } from "./utils-DEke8iwo.js";
7
+ import { u as ee } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ const ne = Z.div`
9
+ box-sizing: border-box;
10
+ cursor: ${(n) => n.disabled == !1 ? "pointer" : "context-menu"};
11
+ width: 100%;
12
+ border-radius: 6px;
13
+ display: flex;
14
+ align-items: center;
15
+ min-height: 2.25rem;
16
+ gap: 0.563rem;
17
+ padding: 0.563rem;
18
+ color: ${(n) => s(
19
+ n.theme,
20
+ "MenuItem",
21
+ n.color,
22
+ n.isActive === !0 ? "active" : "enabled",
23
+ "text"
24
+ )};
25
+ &:hover {
26
+ ${(n) => n.disabled === !1 && `background-color: ${s(
27
+ n.theme,
28
+ "MenuItem",
29
+ n.color,
30
+ "hover",
31
+ "background",
32
+ "backgroundOpacity"
33
+ )};`}
34
+
35
+ ${(n) => n.disabled === !1 && `color: ${s(
36
+ n.theme,
37
+ "MenuItem",
38
+ n.color,
39
+ "hover",
40
+ "text"
41
+ )};`}
42
+ & .drop-down-icon-lnc {
43
+ ${(n) => n.disabled === !1 && `color: ${s(
44
+ n.theme,
45
+ "MenuItem",
46
+ n.color,
47
+ "hover",
48
+ "icon"
49
+ )};`}
50
+ }
51
+ }
52
+ ${(n) => I(n.theme, "MenuItem", n.size, "enabled")};
53
+ & .drop-down-icon-lnc {
54
+ color: ${(n) => n.isActive && n.disabled == !1 ? s(
55
+ n.theme,
56
+ "MenuItem",
57
+ n.color,
58
+ "focus",
59
+ "icon"
60
+ ) : s(
61
+ n.theme,
62
+ "MenuItem",
63
+ n.color,
64
+ "enabled",
65
+ "icon"
66
+ )};
67
+ ${(n) => n.disabled === !0 && N(n.theme)};
68
+ background: transparent;
69
+ }
70
+ & .sub-menu-icon-lnc {
71
+ margin-left: auto;
72
+ transform: ${(n) => n.showNested ? "rotate(180deg)" : "rotate(0)"};
73
+ transition: transform 0.25s ease;
74
+ }
75
+ ${(n) => n.isActive == !0 && n.disabled == !1 && `background-color: ${s(
76
+ n.theme,
77
+ "MenuItem",
78
+ n.color,
79
+ "focus",
80
+ "background",
81
+ "backgroundOpacity"
82
+ )};
83
+ color: ${s(
84
+ n.theme,
85
+ "MenuItem",
86
+ n.color,
87
+ "focus",
88
+ "text"
89
+ )};
90
+ `}
91
+ outline: none;
92
+ ${(n) => n.disabled === !0 && N(n.theme)};
93
+ `, $ = J.forwardRef((n, a) => {
94
+ const {
95
+ __TYPE__: oe = "MENU_ITEM",
96
+ active: f = !1,
97
+ icon: E,
98
+ disabled: m = !1,
99
+ isNested: r = !1,
100
+ showNested: k,
101
+ value: w,
102
+ //----------------
103
+ onFocus: C = () => {
104
+ },
105
+ onBlur: _ = () => {
106
+ },
107
+ onClick: x = () => {
108
+ },
109
+ onKeyDown: A = () => {
110
+ },
111
+ onMouseEnter: le = () => {
112
+ },
113
+ onMouseLeave: te = () => {
114
+ },
115
+ toggleNested: c = () => {
116
+ },
117
+ onItemSelected: v = () => {
118
+ },
119
+ //----------------
120
+ color: p,
121
+ className: S = "",
122
+ style: O = {},
123
+ size: P = "small",
124
+ iconProps: D,
125
+ children: u,
126
+ ...T
127
+ } = n, F = { theme: ee(), color: p, style: O, size: P }, h = Q(), [R, b] = W(f);
128
+ X(() => {
129
+ b(f);
130
+ }, [f]);
131
+ const z = (e) => {
132
+ m == !1 && (r && c && c(), v(e, w, u), x(e));
133
+ }, B = (e) => {
134
+ b(!0), C(e);
135
+ }, K = (e) => {
136
+ b(!1), _(e);
137
+ }, j = (e) => {
138
+ e.preventDefault(), e.key == "ArrowDown" ? g(a ? a.current : h.current) : e.key == "ArrowUp" ? y(a ? a.current : h.current) : e.key == "Enter" && m == !1 && (r && c && c(), v(e, w, u)), A(e);
139
+ }, g = (e) => {
140
+ if (e != null && e.nextSibling) {
141
+ let o = L(e);
142
+ if (o != null && o.node && (o == null ? void 0 : o.type) == "item")
143
+ o.node.focus();
144
+ else if (o != null && o.node && (o == null ? void 0 : o.type) == "nested") {
145
+ let i = q(o.node);
146
+ i && i.focus();
147
+ } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && g(e.parentElement);
148
+ } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && g(e.parentElement);
149
+ }, y = (e) => {
150
+ if (e != null && e.previousSibling) {
151
+ let o = U(e);
152
+ if (o != null && o.node && (o == null ? void 0 : o.type) == "item")
153
+ o.node.focus();
154
+ else if (o != null && o.node && (o == null ? void 0 : o.type) == "nested") {
155
+ let i = Y(o.node);
156
+ i && i.focus();
157
+ } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && y(e.parentElement);
158
+ } else e != null && e.parentElement && t(e.parentElement, "nested-item-lnc") && y(e.parentElement);
159
+ }, L = (e) => {
160
+ for (; e = e.nextSibling; ) {
161
+ if (t(e, "menu-item-lnc"))
162
+ return { node: e, type: "item" };
163
+ if (t(e, "nested-item-lnc"))
164
+ return { node: e, type: "nested" };
165
+ }
166
+ return null;
167
+ }, U = (e) => {
168
+ for (; e = e.previousSibling; ) {
169
+ if (t(e, "menu-item-lnc"))
170
+ return { node: e, type: "item" };
171
+ if (t(e, "nested-item-lnc"))
172
+ return { node: e, type: "nested" };
173
+ }
174
+ return null;
175
+ }, q = (e) => {
176
+ var o;
177
+ return (o = Array.from(e.querySelectorAll(".menu-item-lnc"))) == null ? void 0 : o[0];
178
+ }, Y = (e) => {
179
+ var o;
180
+ return (o = Array.from(e.querySelectorAll(".menu-item-lnc"))) == null ? void 0 : o.pop();
181
+ }, t = (e, o) => {
182
+ var i = " " + e.className + " ", V = " " + o + " ";
183
+ return i.indexOf(V) != -1;
184
+ };
185
+ return /* @__PURE__ */ d(G, { children: /* @__PURE__ */ H(
186
+ ne,
187
+ {
188
+ ref: a || h,
189
+ className: "menu-item-lnc " + S,
190
+ disabled: m,
191
+ tabIndex: 0,
192
+ onKeyDown: j,
193
+ onFocus: B,
194
+ onBlur: K,
195
+ onClick: z,
196
+ isActive: R,
197
+ showNested: k,
198
+ ...F,
199
+ ...T,
200
+ children: [
201
+ E && /* @__PURE__ */ d(M, { icon: E, className: "drop-down-icon-lnc", ...D }),
202
+ /* @__PURE__ */ d("div", { className: "menu-item-text-lnc", children: u }),
203
+ r && /* @__PURE__ */ d(M, { icon: "angle-down", className: "sub-menu-icon-lnc" })
204
+ ]
205
+ }
206
+ ) });
207
+ });
208
+ $.propTypes = {
209
+ active: l.bool,
210
+ icon: l.string,
211
+ disabled: l.bool,
212
+ isNested: l.bool,
213
+ value: l.any,
214
+ //---------------------------------------------------------------
215
+ onBlur: l.func,
216
+ onFocus: l.func,
217
+ onClick: l.func,
218
+ onKeyDown: l.func,
219
+ onMouseEnter: l.func,
220
+ onMouseLeave: l.func,
221
+ //---------------------------------------------------------------
222
+ className: l.string,
223
+ style: l.object,
224
+ color: l.oneOf([
225
+ "primary",
226
+ "secondary",
227
+ "success",
228
+ "warning",
229
+ "danger",
230
+ "information",
231
+ "neutral",
232
+ "gray"
233
+ ]),
234
+ iconProps: l.any,
235
+ size: l.oneOf(["small", "medium", "large"]),
236
+ __TYPE__: l.string
237
+ };
238
+ $.displayName = "MENU_ITEM";
239
+ export {
240
+ $ as default
241
+ };
@@ -0,0 +1 @@
1
+ "use strict";const le=require("react/jsx-runtime"),e=require("./index-DXnSjbfJ.cjs"),t=require("react"),B=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),n=require("./CustomStyles-CqlCjTgU.cjs"),ce=require("./defineProperty-DHvxLH8G.cjs");require("./index-C29T0m2a.cjs");const fe=require("./index-BjdOz5Ok.cjs");function de(o){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(p,s,a.get?a:{enumerable:!0,get:()=>o[s]})}}return p.default=o,Object.freeze(p)}const ye=de(t);var Te=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function Pe(o){var p=o.defaultOptions,s=p===void 0?!1:p,a=o.cacheOptions,i=a===void 0?!1:a,y=o.loadOptions;o.options;var l=o.isLoading,h=l===void 0?!1:l,S=o.onInputChange,m=o.filterOption,C=m===void 0?null:m,g=n._objectWithoutProperties(o,Te),_=g.inputValue,u=t.useRef(void 0),c=t.useRef(!1),T=t.useState(Array.isArray(s)?s:void 0),f=n._slicedToArray(T,2),G=f[0],x=f[1],W=t.useState(typeof _<"u"?_:""),q=n._slicedToArray(W,2),D=q[0],I=q[1],J=t.useState(s===!0),R=n._slicedToArray(J,2),K=R[0],P=R[1],Q=t.useState(void 0),w=n._slicedToArray(Q,2),A=w[0],L=w[1],U=t.useState([]),E=n._slicedToArray(U,2),X=E[0],j=E[1],Y=t.useState(!1),$=n._slicedToArray(Y,2),Z=$[0],v=$[1],ee=t.useState({}),k=n._slicedToArray(ee,2),O=k[0],z=k[1],te=t.useState(void 0),F=n._slicedToArray(te,2),oe=F[0],se=F[1],ne=t.useState(void 0),N=n._slicedToArray(ne,2),re=N[0],pe=N[1];i!==re&&(z({}),pe(i)),s!==oe&&(x(Array.isArray(s)?s:void 0),se(s)),t.useEffect(function(){return c.current=!0,function(){c.current=!1}},[]);var M=t.useCallback(function(b,d){if(!y)return d();var r=y(b,d);r&&typeof r.then=="function"&&r.then(d,function(){return d()})},[y]);t.useEffect(function(){s===!0&&M(D,function(b){c.current&&(x(b||[]),P(!!u.current))})},[]);var ae=t.useCallback(function(b,d){var r=n.handleInputChange(b,d,S);if(!r){u.current=void 0,I(""),L(""),j([]),P(!1),v(!1);return}if(i&&O[r])I(r),L(r),j(O[r]),P(!1),v(!1);else{var ie=u.current={};I(r),P(!0),v(!A),M(r,function(V){c&&ie===u.current&&(u.current=void 0,P(!1),L(r),j(V||[]),v(!1),z(V?n._objectSpread2(n._objectSpread2({},O),{},ce._defineProperty({},r,V)):O))})}},[i,M,A,O,S]),ue=Z?[]:D&&A?X:G||[];return n._objectSpread2(n._objectSpread2({},g),{},{options:ue,isLoading:K||h,onInputChange:ae,filterOption:C})}var Oe=t.forwardRef(function(o,p){var s=Pe(o),a=n.useStateManager(s);return ye.createElement(n.Select,B._extends({ref:p},a))}),be=Oe;const H=t.forwardRef((o,p)=>{const{styles:s,debounceTime:a=180,isSearchable:i=!0,isClearable:y=!0,onInputChange:l,size:h="small",color:S="primary",className:m="",style:C={},...g}=o,_=B.useTheme(),u=t.useCallback(fe.debounce((T,f)=>{l==null||l(T,f)},a)),c=(T,f)=>{u(T,f)};return le.jsx(be,{ref:p,styles:s||n.customStyles,size:h,color:S,theme:_,isSearchable:i,isClearable:y,onInputChange:c,className:m,style:C,...g})});H.propTypes={defaultOptions:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.array]),cacheOptions:e.PropTypes.any,loadOptions:e.PropTypes.func,styles:e.PropTypes.object,debounceTime:e.PropTypes.number,name:e.PropTypes.string,value:e.PropTypes.any,tabIndex:e.PropTypes.number,isSearchable:e.PropTypes.bool,isClearable:e.PropTypes.bool,isLoading:e.PropTypes.bool,isRtl:e.PropTypes.bool,isDisabled:e.PropTypes.bool,readOnly:e.PropTypes.bool,closeMenuOnSelect:e.PropTypes.bool,closeMenuOnScroll:e.PropTypes.oneOfType([e.PropTypes.bool,e.PropTypes.func]),escapeClearsValue:e.PropTypes.bool,filterOption:e.PropTypes.func,formatGroupLabel:e.PropTypes.func,formatOptionLabel:e.PropTypes.func,getOptionLabel:e.PropTypes.func,getOptionValue:e.PropTypes.func,hideSelectedOptions:e.PropTypes.bool,id:e.PropTypes.string,inputId:e.PropTypes.string,isOptionDisabled:e.PropTypes.func,isOptionSelected:e.PropTypes.func,loadingMessage:e.PropTypes.func,minMenuHeight:e.PropTypes.number,maxMenuHeight:e.PropTypes.number,menuPlacement:e.PropTypes.oneOf(["bottom","auto","top"]),menuPosition:e.PropTypes.oneOf(["absolute","fixed"]),menuShouldBlockScroll:e.PropTypes.bool,menuShouldScrollIntoView:e.PropTypes.bool,openMenuOnFocus:e.PropTypes.bool,openMenuOnClick:e.PropTypes.bool,autoFocus:e.PropTypes.bool,placeholder:e.PropTypes.any,noOptionsMessage:e.PropTypes.string,menuIsOpen:e.PropTypes.bool,components:e.PropTypes.object,defaultValue:e.PropTypes.string,defaultInputValue:e.PropTypes.string,defaultMenuIsOpen:e.PropTypes.bool,delimiter:e.PropTypes.string,onChange:e.PropTypes.func,onInputChange:e.PropTypes.func,onMenuOpen:e.PropTypes.func,onMenuClose:e.PropTypes.func,onFocus:e.PropTypes.func,onBlur:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,color:e.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:e.PropTypes.oneOf(["small","medium","large"])};module.exports=H;
@@ -0,0 +1,325 @@
1
+ import { jsx as ce } from "react/jsx-runtime";
2
+ import { P as e } from "./index-Ds9PUTwb.js";
3
+ import * as de from "react";
4
+ import Oe, { useRef as G, useState as a, useEffect as W, useCallback as R, forwardRef as me } from "react";
5
+ import { _ as be, u as ge } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
6
+ import { _ as Se, b as s, h as he, d as C, u as ve, S as ye, a as _e } from "./CustomStyles-nfD3J1mi.js";
7
+ import { f as Ie } from "./defineProperty-BHpTtkhC.js";
8
+ import "./index-CZJEA84h.js";
9
+ import { d as Ce } from "./index-D5vEbKUT.js";
10
+ var Le = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
11
+ function Me(o) {
12
+ var r = o.defaultOptions, t = r === void 0 ? !1 : r, i = o.cacheOptions, l = i === void 0 ? !1 : i, d = o.loadOptions;
13
+ o.options;
14
+ var p = o.isLoading, L = p === void 0 ? !1 : p, h = o.onInputChange, v = o.filterOption, M = v === void 0 ? null : v, y = Se(o, Le), _ = y.inputValue, u = G(void 0), O = G(!1), m = a(Array.isArray(t) ? t : void 0), f = s(m, 2), J = f[0], j = f[1], K = a(typeof _ < "u" ? _ : ""), w = s(K, 2), $ = w[0], P = w[1], Q = a(t === !0), E = s(Q, 2), U = E[0], b = E[1], X = a(void 0), F = s(X, 2), V = F[0], A = F[1], Y = a([]), z = s(Y, 2), Z = z[0], T = z[1], ee = a(!1), B = s(ee, 2), te = B[0], I = B[1], ne = a({}), H = s(ne, 2), g = H[0], N = H[1], oe = a(void 0), k = s(oe, 2), ae = k[0], se = k[1], ue = a(void 0), q = s(ue, 2), re = q[0], ie = q[1];
15
+ l !== re && (N({}), ie(l)), t !== ae && (j(Array.isArray(t) ? t : void 0), se(t)), W(function() {
16
+ return O.current = !0, function() {
17
+ O.current = !1;
18
+ };
19
+ }, []);
20
+ var x = R(function(S, c) {
21
+ if (!d) return c();
22
+ var n = d(S, c);
23
+ n && typeof n.then == "function" && n.then(c, function() {
24
+ return c();
25
+ });
26
+ }, [d]);
27
+ W(function() {
28
+ t === !0 && x($, function(S) {
29
+ O.current && (j(S || []), b(!!u.current));
30
+ });
31
+ }, []);
32
+ var le = R(function(S, c) {
33
+ var n = he(S, c, h);
34
+ if (!n) {
35
+ u.current = void 0, P(""), A(""), T([]), b(!1), I(!1);
36
+ return;
37
+ }
38
+ if (l && g[n])
39
+ P(n), A(n), T(g[n]), b(!1), I(!1);
40
+ else {
41
+ var fe = u.current = {};
42
+ P(n), b(!0), I(!V), x(n, function(D) {
43
+ O && fe === u.current && (u.current = void 0, b(!1), A(n), T(D || []), I(!1), N(D ? C(C({}, g), {}, Ie({}, n, D)) : g));
44
+ });
45
+ }
46
+ }, [l, x, V, g, h]), pe = te ? [] : $ && V ? Z : J || [];
47
+ return C(C({}, y), {}, {
48
+ options: pe,
49
+ isLoading: U || L,
50
+ onInputChange: le,
51
+ filterOption: M
52
+ });
53
+ }
54
+ var Pe = /* @__PURE__ */ me(function(o, r) {
55
+ var t = Me(o), i = ve(t);
56
+ return /* @__PURE__ */ de.createElement(ye, be({
57
+ ref: r
58
+ }, i));
59
+ }), Ve = Pe;
60
+ const Ae = Oe.forwardRef((o, r) => {
61
+ const {
62
+ // defaultOptions,
63
+ // cacheOptions,
64
+ // loadOptions,
65
+ styles: t,
66
+ debounceTime: i = 180,
67
+ // name,
68
+ // hideSelectedOptions,
69
+ // id,
70
+ // inputId,
71
+ // value,
72
+ // readOnly,
73
+ // tabIndex,
74
+ isSearchable: l = !0,
75
+ isClearable: d = !0,
76
+ // isLoading,
77
+ // isRtl,
78
+ // isDisabled,
79
+ // closeMenuOnSelect,
80
+ // closeMenuOnScroll,
81
+ // escapeClearsValue,
82
+ // filterOption,
83
+ // formatGroupLabel,
84
+ // formatOptionLabel,
85
+ // getOptionLabel,
86
+ // getOptionValue,
87
+ // isOptionDisabled,
88
+ // isOptionSelected,
89
+ // loadingMessage,
90
+ // minMenuHeight,
91
+ // maxMenuHeight,
92
+ // menuPlacement,
93
+ // menuPosition,
94
+ // menuShouldBlockScroll,
95
+ // menuShouldScrollIntoView,
96
+ // openMenuOnFocus,
97
+ // openMenuOnClick,
98
+ // autoFocus,
99
+ // placeholder,
100
+ // noOptionsMessage,
101
+ // menuIsOpen,
102
+ // components,
103
+ // defaultValue,
104
+ // defaultInputValue,
105
+ // defaultMenuIsOpen,
106
+ // delimiter,
107
+ // onChange,
108
+ onInputChange: p,
109
+ // onMenuOpen,
110
+ // onMenuClose,
111
+ // onBlur,
112
+ // onFocus,
113
+ size: L = "small",
114
+ color: h = "primary",
115
+ className: v = "",
116
+ style: M = {},
117
+ // children,
118
+ ...y
119
+ } = o, _ = ge(), u = R(
120
+ Ce((m, f) => {
121
+ p == null || p(m, f);
122
+ }, i)
123
+ );
124
+ return /* @__PURE__ */ ce(
125
+ Ve,
126
+ {
127
+ ref: r,
128
+ styles: t || _e,
129
+ size: L,
130
+ color: h,
131
+ theme: _,
132
+ isSearchable: l,
133
+ isClearable: d,
134
+ onInputChange: (m, f) => {
135
+ u(m, f);
136
+ },
137
+ className: v,
138
+ style: M,
139
+ ...y
140
+ }
141
+ );
142
+ });
143
+ Ae.propTypes = {
144
+ /**
145
+ * The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
146
+ */
147
+ defaultOptions: e.oneOfType([e.bool, e.array]),
148
+ /**
149
+ * If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
150
+ */
151
+ cacheOptions: e.any,
152
+ /**
153
+ * Function that returns a promise, which is the set of options to be used once the promise resolves.
154
+ */
155
+ loadOptions: e.func,
156
+ styles: e.object,
157
+ debounceTime: e.number,
158
+ name: e.string,
159
+ value: e.any,
160
+ /**
161
+ * Sets the tabIndex attribute on the input
162
+ */
163
+ tabIndex: e.number,
164
+ /**
165
+ * Whether to enable search functionality
166
+ */
167
+ isSearchable: e.bool,
168
+ isClearable: e.bool,
169
+ /**
170
+ * Is the select in a state of loading (async)
171
+ */
172
+ isLoading: e.bool,
173
+ /**
174
+ * Is the select direction right-to-left
175
+ */
176
+ isRtl: e.bool,
177
+ isDisabled: e.bool,
178
+ readOnly: e.bool,
179
+ /**
180
+ * Close the select menu when the user selects an option
181
+ */
182
+ closeMenuOnSelect: e.bool,
183
+ /**
184
+ * If true, close the select menu when the user scrolls the document/body.
185
+ * If a function, takes a standard javascript ScrollEvent you return a boolean:
186
+ * true => The menu closes
187
+ * false => The menu stays open
188
+ * This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues.
189
+ */
190
+ closeMenuOnScroll: e.oneOfType([e.bool, e.func]),
191
+ /**
192
+ * Clear all values when the user presses escape AND the menu is closed
193
+ */
194
+ escapeClearsValue: e.bool,
195
+ /**
196
+ * Custom method to filter whether an option should be displayed in the menu. Type: `null` or `() => boolean`
197
+ */
198
+ filterOption: e.func,
199
+ /**
200
+ * Formats group labels in the menu as React components
201
+ */
202
+ formatGroupLabel: e.func,
203
+ /**
204
+ * Formats option labels in the menu and control as React components
205
+ */
206
+ formatOptionLabel: e.func,
207
+ /**
208
+ * Resolves option data to a string to be displayed as the label by components
209
+ * Note: Failure to resolve to a string type can interfere with filtering and screen reader support.
210
+ */
211
+ getOptionLabel: e.func,
212
+ /**
213
+ * Resolves option data to a string to compare options and specify value attributes
214
+ */
215
+ getOptionValue: e.func,
216
+ /**
217
+ * Hide the selected option from the menu
218
+ */
219
+ hideSelectedOptions: e.bool,
220
+ /**
221
+ * The id to set on the SelectContainer component
222
+ */
223
+ id: e.string,
224
+ /**
225
+ * The id of the search input
226
+ */
227
+ inputId: e.string,
228
+ /**
229
+ * Override the built-in logic to detect whether an option is disabled. `(...) => boolean`
230
+ */
231
+ isOptionDisabled: e.func,
232
+ /**
233
+ * Override the built-in logic to detect whether an option is selected. `(...) => boolean`
234
+ */
235
+ isOptionSelected: e.func,
236
+ /**
237
+ * Async: Text to display when loading options `(...) => ...`
238
+ */
239
+ loadingMessage: e.func,
240
+ /**
241
+ * Minimum height of the menu before flipping
242
+ */
243
+ minMenuHeight: e.number,
244
+ /**
245
+ * Maximum height of the menu before flipping
246
+ */
247
+ maxMenuHeight: e.number,
248
+ /**
249
+ * Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control.
250
+ */
251
+ menuPlacement: e.oneOf(["bottom", "auto", "top"]),
252
+ /**
253
+ *The CSS position value of the menu, when "fixed" extra layout management is required.
254
+ */
255
+ menuPosition: e.oneOf(["absolute", "fixed"]),
256
+ /**
257
+ * Whether to block scroll events when the menu is open
258
+ */
259
+ menuShouldBlockScroll: e.bool,
260
+ /**
261
+ * Whether the menu should be scrolled into view when it opens
262
+ */
263
+ menuShouldScrollIntoView: e.bool,
264
+ /**
265
+ * Allows control of whether the menu is opened when the Select is focused
266
+ */
267
+ openMenuOnFocus: e.bool,
268
+ /**
269
+ * Allows control of whether the menu is opened when the Select is clicked
270
+ */
271
+ openMenuOnClick: e.bool,
272
+ //----
273
+ autoFocus: e.bool,
274
+ placeholder: e.any,
275
+ noOptionsMessage: e.string,
276
+ menuIsOpen: e.bool,
277
+ /**
278
+ * This complex object includes all the compositional components that are used in react-select. If you wish to overwrite a component, pass in an object with the appropriate namespace.
279
+ * If you only wish to restyle a component, we recommend using the styles prop instead.
280
+ */
281
+ components: e.object,
282
+ /**
283
+ * initial value of the control
284
+ */
285
+ defaultValue: e.string,
286
+ /**
287
+ * initial value of the search input
288
+ */
289
+ defaultInputValue: e.string,
290
+ /**
291
+ * initial open value of the menu
292
+ */
293
+ defaultMenuIsOpen: e.bool,
294
+ /**
295
+ * Delimiter used to join multiple values into a single HTML Input value
296
+ */
297
+ delimiter: e.string,
298
+ //---------------------------------------------------------------
299
+ onChange: e.func,
300
+ /**
301
+ * control the value of the search input (changing this will update the available options)
302
+ */
303
+ onInputChange: e.func,
304
+ onMenuOpen: e.func,
305
+ onMenuClose: e.func,
306
+ onFocus: e.func,
307
+ onBlur: e.func,
308
+ //---------------------------------------------------------------
309
+ className: e.string,
310
+ style: e.object,
311
+ color: e.oneOf([
312
+ "primary",
313
+ "secondary",
314
+ "success",
315
+ "warning",
316
+ "danger",
317
+ "information",
318
+ "neutral",
319
+ "gray"
320
+ ]),
321
+ size: e.oneOf(["small", "medium", "large"])
322
+ };
323
+ export {
324
+ Ae as default
325
+ };