@lanaco/lnc-react-ui 4.0.2 → 4.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +1 -1
- package/dist/Accordion.js +55 -50
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +15 -15
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +11 -11
- package/dist/ActionsToolbar.cjs +2 -2
- package/dist/ActionsToolbar.js +16 -16
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +23 -23
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.js +18 -21
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +21 -14
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +28 -28
- package/dist/Button.cjs +2 -2
- package/dist/Button.js +21 -22
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +10 -6
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +6 -6
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +9 -9
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +20 -20
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +58 -58
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +8 -8
- package/dist/{CustomStyles-nfD3J1mi.js → CustomStyles-BUSJ8bZt.js} +5 -5
- package/dist/{CustomStyles-CqlCjTgU.cjs → CustomStyles-Dlqxic2X.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +35 -35
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +491 -491
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +43 -43
- package/dist/DetailsView.cjs +4 -4
- package/dist/DetailsView.js +40 -40
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +33 -33
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +165 -165
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +31 -31
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +47 -47
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +39 -39
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +23 -23
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +36 -36
- package/dist/DropdownMenu.cjs +7 -1
- package/dist/DropdownMenu.js +192 -10
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +4 -4
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +24 -24
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +14 -14
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +30 -30
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +16 -16
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +5 -5
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +8 -9
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +31 -31
- package/dist/Grid.cjs +2 -3
- package/dist/Grid.js +38 -10
- package/dist/GridItem.cjs +2 -2
- package/dist/GridItem.js +29 -9
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -7
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +35 -13
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +51 -52
- package/dist/Kanban.cjs +12 -12
- package/dist/Kanban.js +891 -879
- package/dist/KanbanActionsToolbar.cjs +2 -2
- package/dist/KanbanActionsToolbar.js +28 -28
- package/dist/{KanbanCard-D9OhU8C6.js → KanbanCard-CHZ_C9kk.js} +50 -50
- package/dist/KanbanCard-DV3VnSUi.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +5 -5
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +40 -40
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +46 -46
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +27 -27
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +9 -9
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +39 -39
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +42 -42
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +6 -6
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +6 -6
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +40 -40
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +45 -45
- package/dist/Notification.cjs +1 -83
- package/dist/Notification.js +3 -1077
- package/dist/NotificationContainer.cjs +37 -0
- package/dist/NotificationContainer.js +162 -0
- package/dist/NotificationMessage.cjs +47 -0
- package/dist/NotificationMessage.js +133 -0
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +17 -17
- package/dist/PageLayout.cjs +1 -1
- package/dist/PageLayout.js +32 -32
- package/dist/Pagination.cjs +12 -0
- package/dist/Pagination.js +248 -0
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +33 -33
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.js +36 -0
- package/dist/PopoverClose.cjs +1 -0
- package/dist/PopoverClose.js +15 -0
- package/dist/PopoverContent.cjs +10 -0
- package/dist/PopoverContent.js +68 -0
- package/dist/PopoverContext.cjs +1 -0
- package/dist/PopoverContext.js +5 -0
- package/dist/PopoverDescription.cjs +1 -0
- package/dist/PopoverDescription.js +16 -0
- package/dist/PopoverHeading.cjs +1 -0
- package/dist/PopoverHeading.js +16 -0
- package/dist/PopoverTrigger.cjs +1 -0
- package/dist/PopoverTrigger.js +38 -0
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +35 -24
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +13 -13
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +10 -10
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +27 -27
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +77 -77
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +9 -9
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +13 -13
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +25 -20
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +14 -15
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +18 -18
- package/dist/TabItem.cjs +26 -0
- package/dist/TabItem.js +210 -0
- package/dist/Table.cjs +20 -20
- package/dist/Table.js +13 -12
- package/dist/TableView.cjs +8 -1
- package/dist/TableView.js +238 -9
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +33 -27
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +35 -35
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +24 -24
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +85 -85
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +13 -13
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +4 -5
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +57 -57
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +11 -11
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +29 -29
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{defineProperty-BHpTtkhC.js → defineProperty-B5pLF6px.js} +8 -8
- package/dist/{emotion-element-5486c51c.browser.esm-CSejtOeT.js → emotion-element-5486c51c.browser.esm-Bb4VkP8U.js} +4 -4
- package/dist/{emotion-is-prop-valid.esm-BzFBwmJz.js → emotion-is-prop-valid.esm-DkbeH1Xy.js} +1 -1
- package/dist/{emotion-react.browser.esm-OWM-uG8Q.js → emotion-react.browser.esm-CN-s34fZ.js} +6 -6
- package/dist/{emotion-react.browser.esm-DQBL7Wls.cjs → emotion-react.browser.esm-D7h2t2Bz.cjs} +1 -1
- package/dist/{emotion-styled.browser.esm-BZSYYThs.js → emotion-styled.browser.esm-BiK8DcgW.js} +12 -12
- package/dist/floating-ui.react.esm-72DKnou_.js +1198 -0
- package/dist/floating-ui.react.esm-C4vrBVJU.cjs +4 -0
- package/dist/{hoist-non-react-statics.cjs-Drf1aBlk.js → hoist-non-react-statics.cjs-CAHiRNzQ.js} +1 -1
- package/dist/{hoist-non-react-statics.cjs-B8r9S_ak.cjs → hoist-non-react-statics.cjs-Dr-ytKVG.cjs} +3 -3
- package/dist/{index-CZJEA84h.js → index--Kmch3aI.js} +1 -1
- package/dist/index-BIlhCoy2.cjs +20 -0
- package/dist/{index-BLQWNy78.js → index-BUChtubz.js} +4 -4
- package/dist/{index-Ds9PUTwb.js → index-BYnWp42a.js} +208 -213
- package/dist/{index-D5vEbKUT.js → index-CNBqQrtK.js} +1 -1
- package/dist/{index-IO9v6o0I.cjs → index-CSXL784P.cjs} +2 -2
- package/dist/{index-C29T0m2a.cjs → index-Ct1N7fF4.cjs} +1 -1
- package/dist/{index-BklgDeu4.js → index-Cu0xwYjD.js} +1 -1
- package/dist/{index-Cdkz-XH-.js → index-CvebWhtp.js} +1 -1
- package/dist/index-DAOBjHnD.cjs +1 -0
- package/dist/index-DBXXH_TD.cjs +1 -0
- package/dist/{index-B_da1uvD.js → index-DLVVKJXD.js} +1 -1
- package/dist/index-DaiUAQVF.cjs +1 -0
- package/dist/index.cjs +1 -26
- package/dist/index.js +180 -376
- package/dist/{motion-CtkUpWEn.js → motion-ecIGZGwI.js} +1 -1
- package/dist/react-toastify.esm-CkXGwKXL.js +798 -0
- package/dist/react-toastify.esm-Dqcb4SQT.cjs +1 -0
- package/dist/{setPrototypeOf-a891FLQJ.js → setPrototypeOf-CttqfWo1.js} +2 -2
- package/dist/style.css +1 -5
- package/dist/{tslib.es6-ZNVz5r_T.js → tslib.es6-DQ-SzcmG.js} +5 -5
- package/dist/usePopover.cjs +1 -0
- package/dist/usePopover.js +44 -0
- package/dist/{utils-DEke8iwo.js → utils-C52T57HO.js} +73 -73
- package/dist/{utils-hdRGTsQ7.cjs → utils-DTAPpJXU.cjs} +1 -1
- package/package.json +17 -5
- package/vite.config.js +16 -0
- package/custom-addons/ThemeSelector.js +0 -111
- package/custom-addons/register.js +0 -16
- package/custom-addons/theme-selector.css +0 -17
- package/dist/DropdownMenu-B6qr13ik.cjs +0 -19
- package/dist/DropdownMenu-DZi3TJ8Q.js +0 -1547
- package/dist/KanbanCard-ConTmu3w.cjs +0 -30
- package/dist/TableView-Cj5_fbSR.js +0 -481
- package/dist/TableView-D8ex512p.cjs +0 -19
- package/dist/index-BjdOz5Ok.cjs +0 -1
- package/dist/index-DXnSjbfJ.cjs +0 -20
- package/dist/index-Dzkd2i4n.cjs +0 -1
- package/dist/index-P-naJISQ.cjs +0 -1
package/dist/DragDropFiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("react/jsx-runtime"),p=require("react"),e=require("./index-
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),p=require("react"),e=require("./index-BIlhCoy2.cjs"),$=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),E=require("./DragAndDropFile.cjs"),G=require("./UploadedFile.cjs"),T=require("./utils-DTAPpJXU.cjs"),M=require("./FlexGrid.cjs"),g=require("./FlexGridItem.cjs"),U=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),V=$.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1rem;
|
package/dist/DragDropFiles.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsx as t, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
-
import G,
|
|
3
|
-
import { P as e } from "./index-
|
|
4
|
-
import { n as V } from "./emotion-styled.browser.esm-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
2
|
+
import { forwardRef as G, useState as M, useEffect as U, useCallback as u } from "react";
|
|
3
|
+
import { P as e } from "./index-BYnWp42a.js";
|
|
4
|
+
import { n as V } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import E from "./DragAndDropFile.js";
|
|
6
|
+
import W from "./UploadedFile.js";
|
|
7
|
+
import { a as q, b as H } from "./utils-C52T57HO.js";
|
|
8
|
+
import J from "./FlexGrid.js";
|
|
9
9
|
import h from "./FlexGridItem.js";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as K } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
11
|
+
const L = V.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
gap: 1rem;
|
|
15
15
|
|
|
16
|
-
border: ${(n) => `1px solid ${
|
|
16
|
+
border: ${(n) => `1px solid ${q(
|
|
17
17
|
n.theme,
|
|
18
18
|
"DragDropFiles",
|
|
19
19
|
n.color,
|
|
20
20
|
"enabled",
|
|
21
21
|
"border"
|
|
22
22
|
)}`};
|
|
23
|
-
border-radius: ${(n) =>
|
|
23
|
+
border-radius: ${(n) => H(n.theme, "regular")};
|
|
24
24
|
padding: 1.25rem 2.5rem;
|
|
25
25
|
|
|
26
26
|
& .file-item-lnc {
|
|
27
27
|
padding: 0.5rem 0.813rem;
|
|
28
28
|
height: 100%;
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`, Q = G((n, D) => {
|
|
31
31
|
const {
|
|
32
32
|
id: y = "",
|
|
33
33
|
disabled: b = !1,
|
|
@@ -49,37 +49,37 @@ const K = V.div`
|
|
|
49
49
|
},
|
|
50
50
|
onDropAccepted: f = () => {
|
|
51
51
|
},
|
|
52
|
-
onDrop:
|
|
52
|
+
onDrop: g = () => {
|
|
53
53
|
},
|
|
54
|
-
fileClick:
|
|
54
|
+
fileClick: v = () => {
|
|
55
55
|
},
|
|
56
|
-
onCancel:
|
|
56
|
+
onCancel: N = () => {
|
|
57
57
|
},
|
|
58
58
|
// ----------------------------------------
|
|
59
|
-
className:
|
|
60
|
-
style:
|
|
59
|
+
className: X = "",
|
|
60
|
+
style: Y = {},
|
|
61
61
|
color: i = "primary",
|
|
62
62
|
size: s = "small",
|
|
63
|
-
dragAndDropFileProps:
|
|
63
|
+
dragAndDropFileProps: P,
|
|
64
64
|
uploadedFileProps: a,
|
|
65
|
-
...
|
|
65
|
+
...R
|
|
66
66
|
} = n;
|
|
67
|
-
var j = { theme:
|
|
67
|
+
var j = { theme: K(), size: s, color: i };
|
|
68
68
|
const [r, c] = M([]);
|
|
69
69
|
U(() => {
|
|
70
70
|
c(p);
|
|
71
71
|
}, [p]);
|
|
72
|
-
const k =
|
|
73
|
-
|
|
74
|
-
}, []), I =
|
|
72
|
+
const k = u((o, l) => {
|
|
73
|
+
g && g(o, l);
|
|
74
|
+
}, []), I = u((o) => {
|
|
75
75
|
f && f(o);
|
|
76
76
|
}, []), B = (o) => {
|
|
77
77
|
var l;
|
|
78
78
|
(l = o.target) != null && l.files ? c([...r, ...o.target.files]) : o && c([...r, ...o]), m && m(o);
|
|
79
79
|
};
|
|
80
|
-
return /* @__PURE__ */ t(
|
|
80
|
+
return /* @__PURE__ */ t(L, { ref: D, ...j, ...R, children: /* @__PURE__ */ $(J, { direction: "RowReverse", children: [
|
|
81
81
|
/* @__PURE__ */ t(h, { M: (r == null ? void 0 : r.length) > 0 ? 6 : 12, children: /* @__PURE__ */ t(
|
|
82
|
-
|
|
82
|
+
E,
|
|
83
83
|
{
|
|
84
84
|
id: y,
|
|
85
85
|
disabled: b,
|
|
@@ -99,19 +99,19 @@ const K = V.div`
|
|
|
99
99
|
onDropAccepted: I,
|
|
100
100
|
color: i,
|
|
101
101
|
size: s,
|
|
102
|
-
...
|
|
102
|
+
...P
|
|
103
103
|
}
|
|
104
104
|
) }),
|
|
105
105
|
r == null ? void 0 : r.map((o, l) => /* @__PURE__ */ t(h, { M: 6, children: /* @__PURE__ */ t(
|
|
106
|
-
|
|
106
|
+
W,
|
|
107
107
|
{
|
|
108
108
|
fileName: o.name,
|
|
109
109
|
fileSize: o.size,
|
|
110
110
|
showFileSize: d,
|
|
111
111
|
color: i,
|
|
112
112
|
size: s,
|
|
113
|
-
onFileClick:
|
|
114
|
-
onCancel:
|
|
113
|
+
onFileClick: v,
|
|
114
|
+
onCancel: N,
|
|
115
115
|
...a,
|
|
116
116
|
className: "file-item-lnc " + (a == null ? void 0 : a.className)
|
|
117
117
|
},
|
|
@@ -119,7 +119,7 @@ const K = V.div`
|
|
|
119
119
|
) }, l))
|
|
120
120
|
] }) });
|
|
121
121
|
});
|
|
122
|
-
|
|
122
|
+
Q.propTypes = {
|
|
123
123
|
id: e.any,
|
|
124
124
|
disabled: e.bool,
|
|
125
125
|
preventDefault: e.bool,
|
|
@@ -171,5 +171,5 @@ L.propTypes = {
|
|
|
171
171
|
uploadedFileProps: e.any
|
|
172
172
|
};
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
Q as default
|
|
175
175
|
};
|
package/dist/Drawer.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const $=require("react/jsx-runtime"),t=require("react"),r=require("./index-
|
|
1
|
+
"use strict";const $=require("react/jsx-runtime"),t=require("react"),r=require("./index-BIlhCoy2.cjs"),q=require("./emotion-react.browser.esm-D7h2t2Bz.cjs"),N=require("./utils-DTAPpJXU.cjs"),j=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs");function k(){return k=Object.assign||function(l){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(l[a]=o[a])}return l},k.apply(this,arguments)}var B=function(e,o){var a={left:{top:0,left:0,transform:"translate3d(-100%, 0, 0)",width:o,height:"100vh"},right:{top:0,right:0,transform:"translate3d(100%, 0, 0)",width:o,height:"100vh"},bottom:{left:0,right:0,bottom:0,transform:"translate3d(0, 100%, 0)",width:"100%",height:o},top:{left:0,right:0,top:0,transform:"translate3d(0, -100%, 0)",width:"100%",height:o}};return a[e]},M=function(e){var o=e.open,a=e.onClose,w=a===void 0?function(){}:a,_=e.children,x=e.style,d=e.enableOverlay,u=d===void 0?!0:d,y=e.overlayColor,C=y===void 0?"#000":y,p=e.overlayOpacity,m=p===void 0?.4:p,v=e.zIndex,f=v===void 0?100:v,g=e.duration,O=g===void 0?500:g,D=e.direction,s=e.size,T=s===void 0?250:s,i=e.className,h=e.customIdSuffix,b=e.lockBackgroundScroll,P=b===void 0?!1:b,n=e.overlayClassName,E=n===void 0?"":n,S=t.useRef(null);t.useEffect(function(){var R=function(){S.current=window.document.querySelector("body"),S.current&&P&&(S.current.style.overflow=o?"hidden":"")};R()},[o]);var c=t.useMemo(function(){return h||(Math.random()+1).toString(36).substring(7)},[h]),Z={backgroundColor:C.toString(),opacity:m,zIndex:f},z=k({zIndex:f+1,transitionDuration:O+"ms"},B(D,T),x);return t.createElement("div",{id:"EZDrawer"+c,className:"EZDrawer"},t.createElement("input",{type:"checkbox",id:"EZDrawer__checkbox"+c,className:"EZDrawer__checkbox",onChange:w,checked:o}),t.createElement("nav",{role:"navigation",id:"EZDrawer__container"+c,style:z,className:"EZDrawer__container "+i},_),u&&t.createElement("label",{htmlFor:"EZDrawer__checkbox"+c,id:"EZDrawer__overlay"+c,className:"EZDrawer__overlay "+E,style:Z}))};const I=t.forwardRef((l,e)=>{const{direction:o="right",open:a=!1,duration:w=300,overlayOpacity:_=.4,enableOverlay:x=!0,zIndex:d=100,onClose:u=()=>{},onOpen:y=()=>{},className:C="",style:p={},color:m="neutral",size:v="small",overlayColor:f,width:g="unset",children:O,...D}=l,s=j.useTheme(),[T,i]=t.useState(!1);t.useImperativeHandle(e,()=>({open(){h()},close(){b()}}));const h=n=>{i(!0),y(n)},b=n=>{i(!1),u(n)},P=()=>{i(!1),u()};return $.jsx(q.ClassNames,{children:({css:n,cx:E})=>$.jsx(M,{open:T,onClose:P,direction:o,zIndex:d,duration:w,overlayOpacity:_,enableOverlay:x,size:g,className:E("drawer-lnc "+C,n`
|
|
2
2
|
padding: 20px;
|
|
3
3
|
background-color: ${N.getColorRgbaValue(s,"Drawer",m,"enabled","background")} !important;
|
|
4
4
|
color: ${N.getColorRgbaValue(s,"Drawer",m,"enabled","text")};
|
package/dist/Drawer.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as I } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { P as r } from "./index-
|
|
4
|
-
import { C as
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
2
|
+
import b, { useRef as T, useEffect as j, useMemo as B, forwardRef as M, useState as q, useImperativeHandle as F } from "react";
|
|
3
|
+
import { P as r } from "./index-BYnWp42a.js";
|
|
4
|
+
import { C as H } from "./emotion-react.browser.esm-CN-s34fZ.js";
|
|
5
|
+
import { a as Z, g as V } from "./utils-C52T57HO.js";
|
|
6
|
+
import { u as A } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
7
7
|
function $() {
|
|
8
8
|
return $ = Object.assign || function(n) {
|
|
9
9
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -14,7 +14,7 @@ function $() {
|
|
|
14
14
|
return n;
|
|
15
15
|
}, $.apply(this, arguments);
|
|
16
16
|
}
|
|
17
|
-
var
|
|
17
|
+
var G = function(e, o) {
|
|
18
18
|
var a = {
|
|
19
19
|
left: {
|
|
20
20
|
top: 0,
|
|
@@ -48,9 +48,9 @@ var A = function(e, o) {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
return a[e];
|
|
51
|
-
},
|
|
51
|
+
}, J = function(e) {
|
|
52
52
|
var o = e.open, a = e.onClose, w = a === void 0 ? function() {
|
|
53
|
-
} : a, _ = e.children, C = e.style,
|
|
53
|
+
} : a, _ = e.children, C = e.style, c = e.enableOverlay, d = c === void 0 ? !0 : c, u = e.overlayColor, O = u === void 0 ? "#000" : u, m = e.overlayOpacity, f = m === void 0 ? 0.4 : m, y = e.zIndex, v = y === void 0 ? 100 : y, g = e.duration, D = g === void 0 ? 500 : g, x = e.direction, l = e.size, E = l === void 0 ? 250 : l, i = e.className, h = e.customIdSuffix, p = e.lockBackgroundScroll, S = p === void 0 ? !1 : p, t = e.overlayClassName, N = t === void 0 ? "" : t, k = T(null);
|
|
54
54
|
j(function() {
|
|
55
55
|
var R = function() {
|
|
56
56
|
k.current = window.document.querySelector("body"), k.current && S && (k.current.style.overflow = o ? "hidden" : "");
|
|
@@ -58,85 +58,85 @@ var A = function(e, o) {
|
|
|
58
58
|
R();
|
|
59
59
|
}, [o]);
|
|
60
60
|
var s = B(function() {
|
|
61
|
-
return
|
|
62
|
-
}, [
|
|
61
|
+
return h || (Math.random() + 1).toString(36).substring(7);
|
|
62
|
+
}, [h]), z = {
|
|
63
63
|
backgroundColor: O.toString(),
|
|
64
|
-
opacity:
|
|
65
|
-
zIndex:
|
|
64
|
+
opacity: f,
|
|
65
|
+
zIndex: v
|
|
66
66
|
}, P = $({
|
|
67
|
-
zIndex:
|
|
67
|
+
zIndex: v + 1,
|
|
68
68
|
transitionDuration: D + "ms"
|
|
69
|
-
},
|
|
70
|
-
return
|
|
69
|
+
}, G(x, E), C);
|
|
70
|
+
return b.createElement("div", {
|
|
71
71
|
id: "EZDrawer" + s,
|
|
72
72
|
className: "EZDrawer"
|
|
73
|
-
},
|
|
73
|
+
}, b.createElement("input", {
|
|
74
74
|
type: "checkbox",
|
|
75
75
|
id: "EZDrawer__checkbox" + s,
|
|
76
76
|
className: "EZDrawer__checkbox",
|
|
77
77
|
onChange: w,
|
|
78
78
|
checked: o
|
|
79
|
-
}),
|
|
79
|
+
}), b.createElement("nav", {
|
|
80
80
|
role: "navigation",
|
|
81
81
|
id: "EZDrawer__container" + s,
|
|
82
82
|
style: P,
|
|
83
83
|
className: "EZDrawer__container " + i
|
|
84
|
-
}, _),
|
|
84
|
+
}, _), d && b.createElement("label", {
|
|
85
85
|
htmlFor: "EZDrawer__checkbox" + s,
|
|
86
86
|
id: "EZDrawer__overlay" + s,
|
|
87
87
|
className: "EZDrawer__overlay " + N,
|
|
88
88
|
style: z
|
|
89
89
|
}));
|
|
90
90
|
};
|
|
91
|
-
const
|
|
91
|
+
const K = M((n, e) => {
|
|
92
92
|
const {
|
|
93
93
|
direction: o = "right",
|
|
94
94
|
open: a = !1,
|
|
95
95
|
duration: w = 300,
|
|
96
96
|
overlayOpacity: _ = 0.4,
|
|
97
97
|
enableOverlay: C = !0,
|
|
98
|
-
zIndex:
|
|
98
|
+
zIndex: c = 100,
|
|
99
99
|
//----------------
|
|
100
|
-
onClose:
|
|
100
|
+
onClose: d = () => {
|
|
101
101
|
},
|
|
102
|
-
onOpen:
|
|
102
|
+
onOpen: u = () => {
|
|
103
103
|
},
|
|
104
104
|
//----------------
|
|
105
105
|
className: O = "",
|
|
106
|
-
style:
|
|
107
|
-
color:
|
|
108
|
-
size:
|
|
109
|
-
overlayColor:
|
|
110
|
-
width:
|
|
106
|
+
style: m = {},
|
|
107
|
+
color: f = "neutral",
|
|
108
|
+
size: y = "small",
|
|
109
|
+
overlayColor: v,
|
|
110
|
+
width: g = "unset",
|
|
111
111
|
children: D,
|
|
112
112
|
...x
|
|
113
|
-
} = n, l =
|
|
114
|
-
|
|
113
|
+
} = n, l = A(), [E, i] = q(!1);
|
|
114
|
+
F(e, () => ({
|
|
115
115
|
open() {
|
|
116
|
-
|
|
116
|
+
h();
|
|
117
117
|
},
|
|
118
118
|
close() {
|
|
119
|
-
|
|
119
|
+
p();
|
|
120
120
|
}
|
|
121
121
|
}));
|
|
122
|
-
const
|
|
123
|
-
i(!0),
|
|
124
|
-
},
|
|
125
|
-
i(!1),
|
|
122
|
+
const h = (t) => {
|
|
123
|
+
i(!0), u(t);
|
|
124
|
+
}, p = (t) => {
|
|
125
|
+
i(!1), d(t);
|
|
126
126
|
}, S = () => {
|
|
127
|
-
i(!1),
|
|
127
|
+
i(!1), d();
|
|
128
128
|
};
|
|
129
|
-
return /* @__PURE__ */ I(
|
|
130
|
-
|
|
129
|
+
return /* @__PURE__ */ I(H, { children: ({ css: t, cx: N }) => /* @__PURE__ */ I(
|
|
130
|
+
J,
|
|
131
131
|
{
|
|
132
132
|
open: E,
|
|
133
133
|
onClose: S,
|
|
134
134
|
direction: o,
|
|
135
|
-
zIndex:
|
|
135
|
+
zIndex: c,
|
|
136
136
|
duration: w,
|
|
137
137
|
overlayOpacity: _,
|
|
138
138
|
enableOverlay: C,
|
|
139
|
-
size:
|
|
139
|
+
size: g,
|
|
140
140
|
className: N(
|
|
141
141
|
"drawer-lnc " + O,
|
|
142
142
|
t`
|
|
@@ -144,28 +144,28 @@ const J = c.forwardRef((n, e) => {
|
|
|
144
144
|
background-color: ${Z(
|
|
145
145
|
l,
|
|
146
146
|
"Drawer",
|
|
147
|
-
|
|
147
|
+
f,
|
|
148
148
|
"enabled",
|
|
149
149
|
"background"
|
|
150
150
|
)} !important;
|
|
151
151
|
color: ${Z(
|
|
152
152
|
l,
|
|
153
153
|
"Drawer",
|
|
154
|
-
|
|
154
|
+
f,
|
|
155
155
|
"enabled",
|
|
156
156
|
"text"
|
|
157
157
|
)};
|
|
158
|
-
${
|
|
158
|
+
${V(l, "Drawer", y, "enabled")};
|
|
159
159
|
`
|
|
160
160
|
),
|
|
161
|
-
style:
|
|
162
|
-
overlayColor:
|
|
161
|
+
style: m,
|
|
162
|
+
overlayColor: v,
|
|
163
163
|
...x,
|
|
164
164
|
children: D
|
|
165
165
|
}
|
|
166
166
|
) });
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
K.propTypes = {
|
|
169
169
|
direction: r.oneOf(["top", "right", "left", "bottom"]),
|
|
170
170
|
open: r.bool,
|
|
171
171
|
/**
|
|
@@ -202,5 +202,5 @@ J.propTypes = {
|
|
|
202
202
|
])
|
|
203
203
|
};
|
|
204
204
|
export {
|
|
205
|
-
|
|
205
|
+
K as default
|
|
206
206
|
};
|
package/dist/Dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react/jsx-runtime"),e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react/jsx-runtime"),e=require("./index-BIlhCoy2.cjs"),n=require("react"),t=require("./CustomStyles-Dlqxic2X.cjs"),a=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs");require("./index-Ct1N7fF4.cjs");const S=require("./index-DaiUAQVF.cjs");function M(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const p=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(s,r,p.get?p:{enumerable:!0,get:()=>o[r]})}}return s.default=o,Object.freeze(s)}const h=M(n);var j=n.forwardRef(function(o,s){var r=t.useStateManager(o);return h.createElement(t.Select,a._extends({ref:s},r))}),x=j;const u=n.forwardRef((o,s)=>{const{styles:r,debounceTime:p=180,name:C,isSearchable:c=!0,isClearable:i=!0,onInputChange:l,size:y="small",color:T="primary",className:P="",style:b={},...m}=o,f=a.useTheme();return n.useCallback(S.debounce((d,g)=>{l==null||l(d,g)},p)),O.jsx(x,{ref:s,styles:r||t.customStyles,size:y,color:T,theme:f,isSearchable:c,isClearable:i,className:P,style:b,...m})});u.propTypes={options:e.PropTypes.array,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.any,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"])};exports.components=t.components;exports.default=u;
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { P as e } from "./index-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
import { c as N } from "./CustomStyles-
|
|
7
|
-
import { _ as
|
|
8
|
-
import "./index
|
|
9
|
-
import { d as
|
|
10
|
-
var P = /* @__PURE__ */
|
|
11
|
-
var o =
|
|
12
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as O } from "react/jsx-runtime";
|
|
2
|
+
import { P as e } from "./index-BYnWp42a.js";
|
|
3
|
+
import * as S from "react";
|
|
4
|
+
import { forwardRef as l, useCallback as y } from "react";
|
|
5
|
+
import { u as M, S as h, a as x } from "./CustomStyles-BUSJ8bZt.js";
|
|
6
|
+
import { c as N } from "./CustomStyles-BUSJ8bZt.js";
|
|
7
|
+
import { _ as C, u as I } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
|
+
import "./index--Kmch3aI.js";
|
|
9
|
+
import { d as T } from "./index-CNBqQrtK.js";
|
|
10
|
+
var P = /* @__PURE__ */ l(function(n, t) {
|
|
11
|
+
var o = M(n);
|
|
12
|
+
return /* @__PURE__ */ S.createElement(h, C({
|
|
13
13
|
ref: t
|
|
14
14
|
}, o));
|
|
15
|
-
}),
|
|
16
|
-
const
|
|
15
|
+
}), V = P;
|
|
16
|
+
const j = l((n, t) => {
|
|
17
17
|
const {
|
|
18
18
|
// options,
|
|
19
19
|
styles: o,
|
|
20
|
-
debounceTime:
|
|
21
|
-
name:
|
|
20
|
+
debounceTime: s = 180,
|
|
21
|
+
name: v,
|
|
22
22
|
// hideSelectedOptions,
|
|
23
23
|
// id,
|
|
24
24
|
// inputId,
|
|
25
25
|
// value,
|
|
26
26
|
// readOnly,
|
|
27
27
|
// tabIndex,
|
|
28
|
-
isSearchable:
|
|
29
|
-
isClearable:
|
|
28
|
+
isSearchable: r = !0,
|
|
29
|
+
isClearable: u = !0,
|
|
30
30
|
// isLoading,
|
|
31
31
|
// isRtl,
|
|
32
32
|
// isDisabled,
|
|
@@ -64,34 +64,34 @@ const V = S.forwardRef((n, t) => {
|
|
|
64
64
|
// onMenuClose,
|
|
65
65
|
// onBlur,
|
|
66
66
|
// onFocus,
|
|
67
|
-
size:
|
|
67
|
+
size: i = "small",
|
|
68
68
|
color: c = "primary",
|
|
69
|
-
className:
|
|
70
|
-
style:
|
|
69
|
+
className: m = "",
|
|
70
|
+
style: p = {},
|
|
71
71
|
// children,
|
|
72
|
-
...
|
|
73
|
-
} = n,
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
a == null || a(
|
|
77
|
-
},
|
|
78
|
-
), /* @__PURE__ */
|
|
79
|
-
|
|
72
|
+
...b
|
|
73
|
+
} = n, f = I();
|
|
74
|
+
return y(
|
|
75
|
+
T((d, g) => {
|
|
76
|
+
a == null || a(d, g);
|
|
77
|
+
}, s)
|
|
78
|
+
), /* @__PURE__ */ O(
|
|
79
|
+
V,
|
|
80
80
|
{
|
|
81
81
|
ref: t,
|
|
82
|
-
styles: o ||
|
|
83
|
-
size:
|
|
82
|
+
styles: o || x,
|
|
83
|
+
size: i,
|
|
84
84
|
color: c,
|
|
85
|
-
theme:
|
|
86
|
-
isSearchable:
|
|
87
|
-
isClearable:
|
|
88
|
-
className:
|
|
89
|
-
style:
|
|
90
|
-
...
|
|
85
|
+
theme: f,
|
|
86
|
+
isSearchable: r,
|
|
87
|
+
isClearable: u,
|
|
88
|
+
className: m,
|
|
89
|
+
style: p,
|
|
90
|
+
...b
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
});
|
|
94
|
-
|
|
94
|
+
j.propTypes = {
|
|
95
95
|
options: e.array,
|
|
96
96
|
styles: e.object,
|
|
97
97
|
debounceTime: e.number,
|
|
@@ -262,5 +262,5 @@ V.propTypes = {
|
|
|
262
262
|
};
|
|
263
263
|
export {
|
|
264
264
|
N as components,
|
|
265
|
-
|
|
265
|
+
j as default
|
|
266
266
|
};
|
package/dist/DropdownItem.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const c=require("react/jsx-runtime"),d=require("react"),l=require("./index-
|
|
1
|
+
"use strict";const c=require("react/jsx-runtime"),d=require("react"),l=require("./index-BIlhCoy2.cjs"),G=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),C=require("./Icon.cjs"),s=require("./utils-DTAPpJXU.cjs"),H=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),J=G.newStyled.div`
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
cursor: ${o=>o.disabled==!1?"pointer":"context-menu"};
|
|
4
4
|
width: 100%;
|
package/dist/DropdownItem.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as d, Fragment as G, jsxs as H } from "react/jsx-runtime";
|
|
2
|
-
import J,
|
|
3
|
-
import { P as l } from "./index-
|
|
4
|
-
import { n as Z } from "./emotion-styled.browser.esm-
|
|
2
|
+
import { forwardRef as J, useRef as Q, useState as W, useEffect as X } from "react";
|
|
3
|
+
import { P as l } from "./index-BYnWp42a.js";
|
|
4
|
+
import { n as Z } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import M from "./Icon.js";
|
|
6
|
-
import {
|
|
7
|
-
import { u as ee } from "./emotion-element-5486c51c.browser.esm-
|
|
6
|
+
import { a as s, g as I, h as N } from "./utils-C52T57HO.js";
|
|
7
|
+
import { u as ee } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
8
|
const ne = Z.div`
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
cursor: ${(n) => n.disabled == !1 ? "pointer" : "context-menu"};
|
|
@@ -90,7 +90,7 @@ const ne = Z.div`
|
|
|
90
90
|
`}
|
|
91
91
|
outline: none;
|
|
92
92
|
${(n) => n.disabled === !0 && N(n.theme)};
|
|
93
|
-
`, $ = J
|
|
93
|
+
`, $ = J((n, a) => {
|
|
94
94
|
const {
|
|
95
95
|
__TYPE__: oe = "MENU_ITEM",
|
|
96
96
|
active: f = !1,
|
|
@@ -102,11 +102,11 @@ const ne = Z.div`
|
|
|
102
102
|
//----------------
|
|
103
103
|
onFocus: C = () => {
|
|
104
104
|
},
|
|
105
|
-
onBlur:
|
|
105
|
+
onBlur: x = () => {
|
|
106
106
|
},
|
|
107
|
-
onClick:
|
|
107
|
+
onClick: A = () => {
|
|
108
108
|
},
|
|
109
|
-
onKeyDown:
|
|
109
|
+
onKeyDown: p = () => {
|
|
110
110
|
},
|
|
111
111
|
onMouseEnter: le = () => {
|
|
112
112
|
},
|
|
@@ -117,25 +117,25 @@ const ne = Z.div`
|
|
|
117
117
|
onItemSelected: v = () => {
|
|
118
118
|
},
|
|
119
119
|
//----------------
|
|
120
|
-
color:
|
|
121
|
-
className:
|
|
120
|
+
color: S,
|
|
121
|
+
className: _ = "",
|
|
122
122
|
style: O = {},
|
|
123
123
|
size: P = "small",
|
|
124
124
|
iconProps: D,
|
|
125
125
|
children: u,
|
|
126
126
|
...T
|
|
127
|
-
} = n, F = { theme: ee(), color:
|
|
127
|
+
} = n, F = { theme: ee(), color: S, style: O, size: P }, h = Q(), [z, b] = W(f);
|
|
128
128
|
X(() => {
|
|
129
129
|
b(f);
|
|
130
130
|
}, [f]);
|
|
131
|
-
const
|
|
132
|
-
m == !1 && (r && c && c(), v(e, w, u),
|
|
133
|
-
}, B = (e) => {
|
|
134
|
-
b(!0), C(e);
|
|
131
|
+
const B = (e) => {
|
|
132
|
+
m == !1 && (r && c && c(), v(e, w, u), A(e));
|
|
135
133
|
}, K = (e) => {
|
|
136
|
-
b(!
|
|
134
|
+
b(!0), C(e);
|
|
135
|
+
}, R = (e) => {
|
|
136
|
+
b(!1), x(e);
|
|
137
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)),
|
|
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)), p(e);
|
|
139
139
|
}, g = (e) => {
|
|
140
140
|
if (e != null && e.nextSibling) {
|
|
141
141
|
let o = L(e);
|
|
@@ -186,14 +186,14 @@ const ne = Z.div`
|
|
|
186
186
|
ne,
|
|
187
187
|
{
|
|
188
188
|
ref: a || h,
|
|
189
|
-
className: "menu-item-lnc " +
|
|
189
|
+
className: "menu-item-lnc " + _,
|
|
190
190
|
disabled: m,
|
|
191
191
|
tabIndex: 0,
|
|
192
192
|
onKeyDown: j,
|
|
193
|
-
onFocus:
|
|
194
|
-
onBlur:
|
|
195
|
-
onClick:
|
|
196
|
-
isActive:
|
|
193
|
+
onFocus: K,
|
|
194
|
+
onBlur: R,
|
|
195
|
+
onClick: B,
|
|
196
|
+
isActive: z,
|
|
197
197
|
showNested: k,
|
|
198
198
|
...F,
|
|
199
199
|
...T,
|
package/dist/DropdownLookup.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const le=require("react/jsx-runtime"),e=require("./index-
|
|
1
|
+
"use strict";const le=require("react/jsx-runtime"),e=require("./index-BIlhCoy2.cjs"),t=require("react"),B=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),n=require("./CustomStyles-Dlqxic2X.cjs"),ce=require("./defineProperty-DHvxLH8G.cjs");require("./index-Ct1N7fF4.cjs");const fe=require("./index-DaiUAQVF.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;
|