@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,994 @@
1
+ import { jsx as v, jsxs as _ } from "react/jsx-runtime";
2
+ import g, { Children as ue, isValidElement as w, cloneElement as R, useState as M, createElement as X } from "react";
3
+ import { n as x } from "./emotion-styled.browser.esm-BZSYYThs.js";
4
+ import { P as u } from "./index-Ds9PUTwb.js";
5
+ import ce from "./Chip.js";
6
+ import { k as de } from "./emotion-react.browser.esm-OWM-uG8Q.js";
7
+ import { useTheme as pe } from "./ThemeProvider.js";
8
+ import { _ as L } from "./objectWithoutPropertiesLoose-DwEN6RBQ.js";
9
+ import { _ as V } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
10
+ import { a as fe, _ as me } from "./setPrototypeOf-a891FLQJ.js";
11
+ import { R as $ } from "./index-CZJEA84h.js";
12
+ const he = de`
13
+ from {
14
+ opacity: 0;
15
+ }
16
+ to {
17
+ opacity: 1;
18
+ }
19
+ `, ve = x.div`
20
+ @media (prefers-reduced-motion: no-preference) {
21
+ animation-name: ${he};
22
+ animation-fill-mode: backwards;
23
+ }
24
+ `, ge = ({ duration: e = 300, delay: o = 0, children: l, ...n }) => /* @__PURE__ */ v(
25
+ ve,
26
+ {
27
+ ...n,
28
+ style: {
29
+ ...n.style || {},
30
+ animationDuration: e + "ms",
31
+ animationDelay: o + "ms"
32
+ },
33
+ children: l
34
+ }
35
+ );
36
+ function F(e, o) {
37
+ e.prototype = Object.create(o.prototype), e.prototype.constructor = e, fe(e, o);
38
+ }
39
+ function Ee(e, o) {
40
+ return e.classList ? !!o && e.classList.contains(o) : (" " + (e.className.baseVal || e.className) + " ").indexOf(" " + o + " ") !== -1;
41
+ }
42
+ function xe(e, o) {
43
+ e.classList ? e.classList.add(o) : Ee(e, o) || (typeof e.className == "string" ? e.className = e.className + " " + o : e.setAttribute("class", (e.className && e.className.baseVal || "") + " " + o));
44
+ }
45
+ function H(e, o) {
46
+ return e.replace(new RegExp("(^|\\s)" + o + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
47
+ }
48
+ function Ce(e, o) {
49
+ e.classList ? e.classList.remove(o) : typeof e.className == "string" ? e.className = H(e.className, o) : e.setAttribute("class", H(e.className && e.className.baseVal || "", o));
50
+ }
51
+ const J = {
52
+ disabled: !1
53
+ };
54
+ var be = process.env.NODE_ENV !== "production" ? u.oneOfType([u.number, u.shape({
55
+ enter: u.number,
56
+ exit: u.number,
57
+ appear: u.number
58
+ }).isRequired]) : null, Ne = process.env.NODE_ENV !== "production" ? u.oneOfType([u.string, u.shape({
59
+ enter: u.string,
60
+ exit: u.string,
61
+ active: u.string
62
+ }), u.shape({
63
+ enter: u.string,
64
+ enterDone: u.string,
65
+ enterActive: u.string,
66
+ exit: u.string,
67
+ exitDone: u.string,
68
+ exitActive: u.string
69
+ })]) : null;
70
+ const I = g.createContext(null);
71
+ var Q = function(o) {
72
+ return o.scrollTop;
73
+ }, O = "unmounted", N = "exited", y = "entering", D = "entered", P = "exiting", C = /* @__PURE__ */ function(e) {
74
+ F(o, e);
75
+ function o(n, r) {
76
+ var t;
77
+ t = e.call(this, n, r) || this;
78
+ var i = r, a = i && !i.isMounting ? n.enter : n.appear, s;
79
+ return t.appearStatus = null, n.in ? a ? (s = N, t.appearStatus = y) : s = D : n.unmountOnExit || n.mountOnEnter ? s = O : s = N, t.state = {
80
+ status: s
81
+ }, t.nextCallback = null, t;
82
+ }
83
+ o.getDerivedStateFromProps = function(r, t) {
84
+ var i = r.in;
85
+ return i && t.status === O ? {
86
+ status: N
87
+ } : null;
88
+ };
89
+ var l = o.prototype;
90
+ return l.componentDidMount = function() {
91
+ this.updateStatus(!0, this.appearStatus);
92
+ }, l.componentDidUpdate = function(r) {
93
+ var t = null;
94
+ if (r !== this.props) {
95
+ var i = this.state.status;
96
+ this.props.in ? i !== y && i !== D && (t = y) : (i === y || i === D) && (t = P);
97
+ }
98
+ this.updateStatus(!1, t);
99
+ }, l.componentWillUnmount = function() {
100
+ this.cancelNextCallback();
101
+ }, l.getTimeouts = function() {
102
+ var r = this.props.timeout, t, i, a;
103
+ return t = i = a = r, r != null && typeof r != "number" && (t = r.exit, i = r.enter, a = r.appear !== void 0 ? r.appear : i), {
104
+ exit: t,
105
+ enter: i,
106
+ appear: a
107
+ };
108
+ }, l.updateStatus = function(r, t) {
109
+ if (r === void 0 && (r = !1), t !== null)
110
+ if (this.cancelNextCallback(), t === y) {
111
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
112
+ var i = this.props.nodeRef ? this.props.nodeRef.current : $.findDOMNode(this);
113
+ i && Q(i);
114
+ }
115
+ this.performEnter(r);
116
+ } else
117
+ this.performExit();
118
+ else this.props.unmountOnExit && this.state.status === N && this.setState({
119
+ status: O
120
+ });
121
+ }, l.performEnter = function(r) {
122
+ var t = this, i = this.props.enter, a = this.context ? this.context.isMounting : r, s = this.props.nodeRef ? [a] : [$.findDOMNode(this), a], c = s[0], p = s[1], m = this.getTimeouts(), h = a ? m.appear : m.enter;
123
+ if (!r && !i || J.disabled) {
124
+ this.safeSetState({
125
+ status: D
126
+ }, function() {
127
+ t.props.onEntered(c);
128
+ });
129
+ return;
130
+ }
131
+ this.props.onEnter(c, p), this.safeSetState({
132
+ status: y
133
+ }, function() {
134
+ t.props.onEntering(c, p), t.onTransitionEnd(h, function() {
135
+ t.safeSetState({
136
+ status: D
137
+ }, function() {
138
+ t.props.onEntered(c, p);
139
+ });
140
+ });
141
+ });
142
+ }, l.performExit = function() {
143
+ var r = this, t = this.props.exit, i = this.getTimeouts(), a = this.props.nodeRef ? void 0 : $.findDOMNode(this);
144
+ if (!t || J.disabled) {
145
+ this.safeSetState({
146
+ status: N
147
+ }, function() {
148
+ r.props.onExited(a);
149
+ });
150
+ return;
151
+ }
152
+ this.props.onExit(a), this.safeSetState({
153
+ status: P
154
+ }, function() {
155
+ r.props.onExiting(a), r.onTransitionEnd(i.exit, function() {
156
+ r.safeSetState({
157
+ status: N
158
+ }, function() {
159
+ r.props.onExited(a);
160
+ });
161
+ });
162
+ });
163
+ }, l.cancelNextCallback = function() {
164
+ this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
165
+ }, l.safeSetState = function(r, t) {
166
+ t = this.setNextCallback(t), this.setState(r, t);
167
+ }, l.setNextCallback = function(r) {
168
+ var t = this, i = !0;
169
+ return this.nextCallback = function(a) {
170
+ i && (i = !1, t.nextCallback = null, r(a));
171
+ }, this.nextCallback.cancel = function() {
172
+ i = !1;
173
+ }, this.nextCallback;
174
+ }, l.onTransitionEnd = function(r, t) {
175
+ this.setNextCallback(t);
176
+ var i = this.props.nodeRef ? this.props.nodeRef.current : $.findDOMNode(this), a = r == null && !this.props.addEndListener;
177
+ if (!i || a) {
178
+ setTimeout(this.nextCallback, 0);
179
+ return;
180
+ }
181
+ if (this.props.addEndListener) {
182
+ var s = this.props.nodeRef ? [this.nextCallback] : [i, this.nextCallback], c = s[0], p = s[1];
183
+ this.props.addEndListener(c, p);
184
+ }
185
+ r != null && setTimeout(this.nextCallback, r);
186
+ }, l.render = function() {
187
+ var r = this.state.status;
188
+ if (r === O)
189
+ return null;
190
+ var t = this.props, i = t.children;
191
+ t.in, t.mountOnEnter, t.unmountOnExit, t.appear, t.enter, t.exit, t.timeout, t.addEndListener, t.onEnter, t.onEntering, t.onEntered, t.onExit, t.onExiting, t.onExited, t.nodeRef;
192
+ var a = L(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
193
+ return (
194
+ // allows for nested Transitions
195
+ /* @__PURE__ */ g.createElement(I.Provider, {
196
+ value: null
197
+ }, typeof i == "function" ? i(r, a) : g.cloneElement(g.Children.only(i), a))
198
+ );
199
+ }, o;
200
+ }(g.Component);
201
+ C.contextType = I;
202
+ C.propTypes = process.env.NODE_ENV !== "production" ? {
203
+ /**
204
+ * A React reference to DOM element that need to transition:
205
+ * https://stackoverflow.com/a/51127130/4671932
206
+ *
207
+ * - When `nodeRef` prop is used, `node` is not passed to callback functions
208
+ * (e.g. `onEnter`) because user already has direct access to the node.
209
+ * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
210
+ * `nodeRef` need to be provided to `Transition` with changed `key` prop
211
+ * (see
212
+ * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
213
+ */
214
+ nodeRef: u.shape({
215
+ current: typeof Element > "u" ? u.any : function(e, o, l, n, r, t) {
216
+ var i = e[o];
217
+ return u.instanceOf(i && "ownerDocument" in i ? i.ownerDocument.defaultView.Element : Element)(e, o, l, n, r, t);
218
+ }
219
+ }),
220
+ /**
221
+ * A `function` child can be used instead of a React element. This function is
222
+ * called with the current transition status (`'entering'`, `'entered'`,
223
+ * `'exiting'`, `'exited'`), which can be used to apply context
224
+ * specific props to a component.
225
+ *
226
+ * ```jsx
227
+ * <Transition in={this.state.in} timeout={150}>
228
+ * {state => (
229
+ * <MyComponent className={`fade fade-${state}`} />
230
+ * )}
231
+ * </Transition>
232
+ * ```
233
+ */
234
+ children: u.oneOfType([u.func.isRequired, u.element.isRequired]).isRequired,
235
+ /**
236
+ * Show the component; triggers the enter or exit states
237
+ */
238
+ in: u.bool,
239
+ /**
240
+ * By default the child component is mounted immediately along with
241
+ * the parent `Transition` component. If you want to "lazy mount" the component on the
242
+ * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
243
+ * mounted, even on "exited", unless you also specify `unmountOnExit`.
244
+ */
245
+ mountOnEnter: u.bool,
246
+ /**
247
+ * By default the child component stays mounted after it reaches the `'exited'` state.
248
+ * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
249
+ */
250
+ unmountOnExit: u.bool,
251
+ /**
252
+ * By default the child component does not perform the enter transition when
253
+ * it first mounts, regardless of the value of `in`. If you want this
254
+ * behavior, set both `appear` and `in` to `true`.
255
+ *
256
+ * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
257
+ * > only adds an additional enter transition. However, in the
258
+ * > `<CSSTransition>` component that first enter transition does result in
259
+ * > additional `.appear-*` classes, that way you can choose to style it
260
+ * > differently.
261
+ */
262
+ appear: u.bool,
263
+ /**
264
+ * Enable or disable enter transitions.
265
+ */
266
+ enter: u.bool,
267
+ /**
268
+ * Enable or disable exit transitions.
269
+ */
270
+ exit: u.bool,
271
+ /**
272
+ * The duration of the transition, in milliseconds.
273
+ * Required unless `addEndListener` is provided.
274
+ *
275
+ * You may specify a single timeout for all transitions:
276
+ *
277
+ * ```jsx
278
+ * timeout={500}
279
+ * ```
280
+ *
281
+ * or individually:
282
+ *
283
+ * ```jsx
284
+ * timeout={{
285
+ * appear: 500,
286
+ * enter: 300,
287
+ * exit: 500,
288
+ * }}
289
+ * ```
290
+ *
291
+ * - `appear` defaults to the value of `enter`
292
+ * - `enter` defaults to `0`
293
+ * - `exit` defaults to `0`
294
+ *
295
+ * @type {number | { enter?: number, exit?: number, appear?: number }}
296
+ */
297
+ timeout: function(o) {
298
+ var l = be;
299
+ o.addEndListener || (l = l.isRequired);
300
+ for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), t = 1; t < n; t++)
301
+ r[t - 1] = arguments[t];
302
+ return l.apply(void 0, [o].concat(r));
303
+ },
304
+ /**
305
+ * Add a custom transition end trigger. Called with the transitioning
306
+ * DOM node and a `done` callback. Allows for more fine grained transition end
307
+ * logic. Timeouts are still used as a fallback if provided.
308
+ *
309
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
310
+ *
311
+ * ```jsx
312
+ * addEndListener={(node, done) => {
313
+ * // use the css transitionend event to mark the finish of a transition
314
+ * node.addEventListener('transitionend', done, false);
315
+ * }}
316
+ * ```
317
+ */
318
+ addEndListener: u.func,
319
+ /**
320
+ * Callback fired before the "entering" status is applied. An extra parameter
321
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
322
+ *
323
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
324
+ *
325
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
326
+ */
327
+ onEnter: u.func,
328
+ /**
329
+ * Callback fired after the "entering" status is applied. An extra parameter
330
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
331
+ *
332
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
333
+ *
334
+ * @type Function(node: HtmlElement, isAppearing: bool)
335
+ */
336
+ onEntering: u.func,
337
+ /**
338
+ * Callback fired after the "entered" status is applied. An extra parameter
339
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
340
+ *
341
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
342
+ *
343
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
344
+ */
345
+ onEntered: u.func,
346
+ /**
347
+ * Callback fired before the "exiting" status is applied.
348
+ *
349
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
350
+ *
351
+ * @type Function(node: HtmlElement) -> void
352
+ */
353
+ onExit: u.func,
354
+ /**
355
+ * Callback fired after the "exiting" status is applied.
356
+ *
357
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
358
+ *
359
+ * @type Function(node: HtmlElement) -> void
360
+ */
361
+ onExiting: u.func,
362
+ /**
363
+ * Callback fired after the "exited" status is applied.
364
+ *
365
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
366
+ *
367
+ * @type Function(node: HtmlElement) -> void
368
+ */
369
+ onExited: u.func
370
+ } : {};
371
+ function T() {
372
+ }
373
+ C.defaultProps = {
374
+ in: !1,
375
+ mountOnEnter: !1,
376
+ unmountOnExit: !1,
377
+ appear: !1,
378
+ enter: !0,
379
+ exit: !0,
380
+ onEnter: T,
381
+ onEntering: T,
382
+ onEntered: T,
383
+ onExit: T,
384
+ onExiting: T,
385
+ onExited: T
386
+ };
387
+ C.UNMOUNTED = O;
388
+ C.EXITED = N;
389
+ C.ENTERING = y;
390
+ C.ENTERED = D;
391
+ C.EXITING = P;
392
+ var ye = function(o, l) {
393
+ return o && l && l.split(" ").forEach(function(n) {
394
+ return xe(o, n);
395
+ });
396
+ }, A = function(o, l) {
397
+ return o && l && l.split(" ").forEach(function(n) {
398
+ return Ce(o, n);
399
+ });
400
+ }, U = /* @__PURE__ */ function(e) {
401
+ F(o, e);
402
+ function o() {
403
+ for (var n, r = arguments.length, t = new Array(r), i = 0; i < r; i++)
404
+ t[i] = arguments[i];
405
+ return n = e.call.apply(e, [this].concat(t)) || this, n.appliedClasses = {
406
+ appear: {},
407
+ enter: {},
408
+ exit: {}
409
+ }, n.onEnter = function(a, s) {
410
+ var c = n.resolveArguments(a, s), p = c[0], m = c[1];
411
+ n.removeClasses(p, "exit"), n.addClass(p, m ? "appear" : "enter", "base"), n.props.onEnter && n.props.onEnter(a, s);
412
+ }, n.onEntering = function(a, s) {
413
+ var c = n.resolveArguments(a, s), p = c[0], m = c[1], h = m ? "appear" : "enter";
414
+ n.addClass(p, h, "active"), n.props.onEntering && n.props.onEntering(a, s);
415
+ }, n.onEntered = function(a, s) {
416
+ var c = n.resolveArguments(a, s), p = c[0], m = c[1], h = m ? "appear" : "enter";
417
+ n.removeClasses(p, h), n.addClass(p, h, "done"), n.props.onEntered && n.props.onEntered(a, s);
418
+ }, n.onExit = function(a) {
419
+ var s = n.resolveArguments(a), c = s[0];
420
+ n.removeClasses(c, "appear"), n.removeClasses(c, "enter"), n.addClass(c, "exit", "base"), n.props.onExit && n.props.onExit(a);
421
+ }, n.onExiting = function(a) {
422
+ var s = n.resolveArguments(a), c = s[0];
423
+ n.addClass(c, "exit", "active"), n.props.onExiting && n.props.onExiting(a);
424
+ }, n.onExited = function(a) {
425
+ var s = n.resolveArguments(a), c = s[0];
426
+ n.removeClasses(c, "exit"), n.addClass(c, "exit", "done"), n.props.onExited && n.props.onExited(a);
427
+ }, n.resolveArguments = function(a, s) {
428
+ return n.props.nodeRef ? [n.props.nodeRef.current, a] : [a, s];
429
+ }, n.getClassNames = function(a) {
430
+ var s = n.props.classNames, c = typeof s == "string", p = c && s ? s + "-" : "", m = c ? "" + p + a : s[a], h = c ? m + "-active" : s[a + "Active"], b = c ? m + "-done" : s[a + "Done"];
431
+ return {
432
+ baseClassName: m,
433
+ activeClassName: h,
434
+ doneClassName: b
435
+ };
436
+ }, n;
437
+ }
438
+ var l = o.prototype;
439
+ return l.addClass = function(r, t, i) {
440
+ var a = this.getClassNames(t)[i + "ClassName"], s = this.getClassNames("enter"), c = s.doneClassName;
441
+ t === "appear" && i === "done" && c && (a += " " + c), i === "active" && r && Q(r), a && (this.appliedClasses[t][i] = a, ye(r, a));
442
+ }, l.removeClasses = function(r, t) {
443
+ var i = this.appliedClasses[t], a = i.base, s = i.active, c = i.done;
444
+ this.appliedClasses[t] = {}, a && A(r, a), s && A(r, s), c && A(r, c);
445
+ }, l.render = function() {
446
+ var r = this.props;
447
+ r.classNames;
448
+ var t = L(r, ["classNames"]);
449
+ return /* @__PURE__ */ g.createElement(C, V({}, t, {
450
+ onEnter: this.onEnter,
451
+ onEntered: this.onEntered,
452
+ onEntering: this.onEntering,
453
+ onExit: this.onExit,
454
+ onExiting: this.onExiting,
455
+ onExited: this.onExited
456
+ }));
457
+ }, o;
458
+ }(g.Component);
459
+ U.defaultProps = {
460
+ classNames: ""
461
+ };
462
+ U.propTypes = process.env.NODE_ENV !== "production" ? V({}, C.propTypes, {
463
+ /**
464
+ * The animation classNames applied to the component as it appears, enters,
465
+ * exits or has finished the transition. A single name can be provided, which
466
+ * will be suffixed for each stage, e.g. `classNames="fade"` applies:
467
+ *
468
+ * - `fade-appear`, `fade-appear-active`, `fade-appear-done`
469
+ * - `fade-enter`, `fade-enter-active`, `fade-enter-done`
470
+ * - `fade-exit`, `fade-exit-active`, `fade-exit-done`
471
+ *
472
+ * A few details to note about how these classes are applied:
473
+ *
474
+ * 1. They are _joined_ with the ones that are already defined on the child
475
+ * component, so if you want to add some base styles, you can use
476
+ * `className` without worrying that it will be overridden.
477
+ *
478
+ * 2. If the transition component mounts with `in={false}`, no classes are
479
+ * applied yet. You might be expecting `*-exit-done`, but if you think
480
+ * about it, a component cannot finish exiting if it hasn't entered yet.
481
+ *
482
+ * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
483
+ * allows you to define different behavior for when appearing is done and
484
+ * when regular entering is done, using selectors like
485
+ * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
486
+ * an epic entrance animation when element first appears in the DOM using
487
+ * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
488
+ * simply use `fade-enter-done` for defining both cases.
489
+ *
490
+ * Each individual classNames can also be specified independently like:
491
+ *
492
+ * ```js
493
+ * classNames={{
494
+ * appear: 'my-appear',
495
+ * appearActive: 'my-active-appear',
496
+ * appearDone: 'my-done-appear',
497
+ * enter: 'my-enter',
498
+ * enterActive: 'my-active-enter',
499
+ * enterDone: 'my-done-enter',
500
+ * exit: 'my-exit',
501
+ * exitActive: 'my-active-exit',
502
+ * exitDone: 'my-done-exit',
503
+ * }}
504
+ * ```
505
+ *
506
+ * If you want to set these classes using CSS Modules:
507
+ *
508
+ * ```js
509
+ * import styles from './styles.css';
510
+ * ```
511
+ *
512
+ * you might want to use camelCase in your CSS file, that way could simply
513
+ * spread them instead of listing them one by one:
514
+ *
515
+ * ```js
516
+ * classNames={{ ...styles }}
517
+ * ```
518
+ *
519
+ * @type {string | {
520
+ * appear?: string,
521
+ * appearActive?: string,
522
+ * appearDone?: string,
523
+ * enter?: string,
524
+ * enterActive?: string,
525
+ * enterDone?: string,
526
+ * exit?: string,
527
+ * exitActive?: string,
528
+ * exitDone?: string,
529
+ * }}
530
+ */
531
+ classNames: Ne,
532
+ /**
533
+ * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
534
+ * applied.
535
+ *
536
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
537
+ *
538
+ * @type Function(node: HtmlElement, isAppearing: bool)
539
+ */
540
+ onEnter: u.func,
541
+ /**
542
+ * A `<Transition>` callback fired immediately after the 'enter-active' or
543
+ * 'appear-active' class is applied.
544
+ *
545
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
546
+ *
547
+ * @type Function(node: HtmlElement, isAppearing: bool)
548
+ */
549
+ onEntering: u.func,
550
+ /**
551
+ * A `<Transition>` callback fired immediately after the 'enter' or
552
+ * 'appear' classes are **removed** and the `done` class is added to the DOM node.
553
+ *
554
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
555
+ *
556
+ * @type Function(node: HtmlElement, isAppearing: bool)
557
+ */
558
+ onEntered: u.func,
559
+ /**
560
+ * A `<Transition>` callback fired immediately after the 'exit' class is
561
+ * applied.
562
+ *
563
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
564
+ *
565
+ * @type Function(node: HtmlElement)
566
+ */
567
+ onExit: u.func,
568
+ /**
569
+ * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
570
+ *
571
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
572
+ *
573
+ * @type Function(node: HtmlElement)
574
+ */
575
+ onExiting: u.func,
576
+ /**
577
+ * A `<Transition>` callback fired immediately after the 'exit' classes
578
+ * are **removed** and the `exit-done` class is added to the DOM node.
579
+ *
580
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
581
+ *
582
+ * @type Function(node: HtmlElement)
583
+ */
584
+ onExited: u.func
585
+ }) : {};
586
+ function G(e, o) {
587
+ var l = function(t) {
588
+ return o && w(t) ? o(t) : t;
589
+ }, n = /* @__PURE__ */ Object.create(null);
590
+ return e && ue.map(e, function(r) {
591
+ return r;
592
+ }).forEach(function(r) {
593
+ n[r.key] = l(r);
594
+ }), n;
595
+ }
596
+ function Se(e, o) {
597
+ e = e || {}, o = o || {};
598
+ function l(p) {
599
+ return p in o ? o[p] : e[p];
600
+ }
601
+ var n = /* @__PURE__ */ Object.create(null), r = [];
602
+ for (var t in e)
603
+ t in o ? r.length && (n[t] = r, r = []) : r.push(t);
604
+ var i, a = {};
605
+ for (var s in o) {
606
+ if (n[s])
607
+ for (i = 0; i < n[s].length; i++) {
608
+ var c = n[s][i];
609
+ a[n[s][i]] = l(c);
610
+ }
611
+ a[s] = l(s);
612
+ }
613
+ for (i = 0; i < r.length; i++)
614
+ a[r[i]] = l(r[i]);
615
+ return a;
616
+ }
617
+ function S(e, o, l) {
618
+ return l[o] != null ? l[o] : e.props[o];
619
+ }
620
+ function Te(e, o) {
621
+ return G(e.children, function(l) {
622
+ return R(l, {
623
+ onExited: o.bind(null, l),
624
+ in: !0,
625
+ appear: S(l, "appear", e),
626
+ enter: S(l, "enter", e),
627
+ exit: S(l, "exit", e)
628
+ });
629
+ });
630
+ }
631
+ function De(e, o, l) {
632
+ var n = G(e.children), r = Se(o, n);
633
+ return Object.keys(r).forEach(function(t) {
634
+ var i = r[t];
635
+ if (w(i)) {
636
+ var a = t in o, s = t in n, c = o[t], p = w(c) && !c.props.in;
637
+ s && (!a || p) ? r[t] = R(i, {
638
+ onExited: l.bind(null, i),
639
+ in: !0,
640
+ exit: S(i, "exit", e),
641
+ enter: S(i, "enter", e)
642
+ }) : !s && a && !p ? r[t] = R(i, {
643
+ in: !1
644
+ }) : s && a && w(c) && (r[t] = R(i, {
645
+ onExited: l.bind(null, i),
646
+ in: c.props.in,
647
+ exit: S(i, "exit", e),
648
+ enter: S(i, "enter", e)
649
+ }));
650
+ }
651
+ }), r;
652
+ }
653
+ var Oe = Object.values || function(e) {
654
+ return Object.keys(e).map(function(o) {
655
+ return e[o];
656
+ });
657
+ }, ke = {
658
+ component: "div",
659
+ childFactory: function(o) {
660
+ return o;
661
+ }
662
+ }, j = /* @__PURE__ */ function(e) {
663
+ F(o, e);
664
+ function o(n, r) {
665
+ var t;
666
+ t = e.call(this, n, r) || this;
667
+ var i = t.handleExited.bind(me(t));
668
+ return t.state = {
669
+ contextValue: {
670
+ isMounting: !0
671
+ },
672
+ handleExited: i,
673
+ firstRender: !0
674
+ }, t;
675
+ }
676
+ var l = o.prototype;
677
+ return l.componentDidMount = function() {
678
+ this.mounted = !0, this.setState({
679
+ contextValue: {
680
+ isMounting: !1
681
+ }
682
+ });
683
+ }, l.componentWillUnmount = function() {
684
+ this.mounted = !1;
685
+ }, o.getDerivedStateFromProps = function(r, t) {
686
+ var i = t.children, a = t.handleExited, s = t.firstRender;
687
+ return {
688
+ children: s ? Te(r, a) : De(r, i, a),
689
+ firstRender: !1
690
+ };
691
+ }, l.handleExited = function(r, t) {
692
+ var i = G(this.props.children);
693
+ r.key in i || (r.props.onExited && r.props.onExited(t), this.mounted && this.setState(function(a) {
694
+ var s = V({}, a.children);
695
+ return delete s[r.key], {
696
+ children: s
697
+ };
698
+ }));
699
+ }, l.render = function() {
700
+ var r = this.props, t = r.component, i = r.childFactory, a = L(r, ["component", "childFactory"]), s = this.state.contextValue, c = Oe(this.state.children).map(i);
701
+ return delete a.appear, delete a.enter, delete a.exit, t === null ? /* @__PURE__ */ g.createElement(I.Provider, {
702
+ value: s
703
+ }, c) : /* @__PURE__ */ g.createElement(I.Provider, {
704
+ value: s
705
+ }, /* @__PURE__ */ g.createElement(t, a, c));
706
+ }, o;
707
+ }(g.Component);
708
+ j.propTypes = process.env.NODE_ENV !== "production" ? {
709
+ /**
710
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
711
+ * behavior by providing a `component` prop.
712
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
713
+ * you can pass in `component={null}`. This is useful if the wrapping div
714
+ * borks your css styles.
715
+ */
716
+ component: u.any,
717
+ /**
718
+ * A set of `<Transition>` components, that are toggled `in` and out as they
719
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
720
+ * remember to spread them through if you are wrapping the `<Transition>` as
721
+ * with our `<Fade>` example.
722
+ *
723
+ * While this component is meant for multiple `Transition` or `CSSTransition`
724
+ * children, sometimes you may want to have a single transition child with
725
+ * content that you want to be transitioned out and in when you change it
726
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
727
+ * the transition child as you change its content, this will cause
728
+ * `TransitionGroup` to transition the child out and back in.
729
+ */
730
+ children: u.node,
731
+ /**
732
+ * A convenience prop that enables or disables appear animations
733
+ * for all children. Note that specifying this will override any defaults set
734
+ * on individual children Transitions.
735
+ */
736
+ appear: u.bool,
737
+ /**
738
+ * A convenience prop that enables or disables enter animations
739
+ * for all children. Note that specifying this will override any defaults set
740
+ * on individual children Transitions.
741
+ */
742
+ enter: u.bool,
743
+ /**
744
+ * A convenience prop that enables or disables exit animations
745
+ * for all children. Note that specifying this will override any defaults set
746
+ * on individual children Transitions.
747
+ */
748
+ exit: u.bool,
749
+ /**
750
+ * You may need to apply reactive updates to a child as it is exiting.
751
+ * This is generally done by using `cloneElement` however in the case of an exiting
752
+ * child the element has already been removed and not accessible to the consumer.
753
+ *
754
+ * If you do need to update a child as it leaves you can provide a `childFactory`
755
+ * to wrap every child, even the ones that are leaving.
756
+ *
757
+ * @type Function(child: ReactElement) -> ReactElement
758
+ */
759
+ childFactory: u.func
760
+ } : {};
761
+ j.defaultProps = ke;
762
+ const Y = (e) => {
763
+ if (e.size === "small") return e.theme.typography.medium.fontSize;
764
+ if (e.size === "medium") return e.theme.typography.large.fontSize;
765
+ if (e.size === "large") return "1.3125rem";
766
+ }, $e = (e) => {
767
+ if (e === "small") return "0.40625rem 0.375rem";
768
+ if (e === "medium") return "0.46875rem 0.375rem";
769
+ if (e === "large") return "0.53125rem 0.375rem";
770
+ }, Z = (e) => {
771
+ if (e === "small") return "0.625rem 0.5rem 0.375rem 0.5rem";
772
+ if (e === "medium") return "0.71875rem 0.5625rem 0.375rem 0.5625rem";
773
+ if (e === "large") return "0.78125rem 0.625rem 0.375rem 0.625rem";
774
+ }, we = x.div`
775
+ display: inline-block;
776
+ position: relative;
777
+ box-sizing: border-box;
778
+ border: 0.09375rem solid #bfbfbf;
779
+ background-color: white;
780
+ border-radius: 0.1875rem;
781
+ width: 100%;
782
+ transition: all 250ms ease;
783
+ `, Re = x.div`
784
+ padding: 0.15rem;
785
+ transition: all 250ms ease;
786
+ display: inline-block;
787
+ `, Ie = x.div`
788
+ display: inline-block;
789
+ margin: 0.125rem;
790
+ flex-grow: 1;
791
+ transition: all 250ms ease;
792
+ width: fit-content;
793
+ & > div {
794
+ width: 100%;
795
+ }
796
+ `, ze = x.div`
797
+ display: inline-block;
798
+ box-sizing: border-box;
799
+ margin: 0.125rem;
800
+ margin-left: 0.25rem;
801
+ flex-grow: 1;
802
+ transition: all 250ms ease;
803
+ `, _e = x.input`
804
+ width: 100%;
805
+ transition: all 250ms ease;
806
+ text-decoration: none;
807
+ -webkit-appearance: none;
808
+ -moz-appearance: none;
809
+ box-sizing: border-box;
810
+ outline: none;
811
+ border: none;
812
+ padding: ${(e) => $e(e.size)};
813
+ background-color: transparent;
814
+ font-family: ${(e) => e.theme.typography.fontFamily};
815
+ font-size: ${(e) => e.theme.typography[e.size].fontSize};
816
+ color: ${(e) => e.theme.palette[e.color].textDark};
817
+ border-radius: 0.1875rem;
818
+ `, Me = x.div`
819
+ display: flex;
820
+ width: 100%;
821
+ `, Ae = x.div`
822
+ padding: ${(e) => Z(e.size)};
823
+ color: ${(e) => e.disabled ? e.theme.palette.gray[800] : e.theme.palette[e.color].main};
824
+ font-size: ${(e) => Y(e)};
825
+ background-color: whitesmoke;
826
+ transition: all 250ms ease;
827
+ `, Pe = x.div`
828
+ padding: ${(e) => Z(e.size)};
829
+ color: ${(e) => e.disabled ? e.theme.palette.gray[800] : e.theme.palette[e.color].main};
830
+ font-size: ${(e) => Y(e)};
831
+ background-color: whitesmoke;
832
+ transition: all 250ms ease;
833
+ cursor: ${(e) => e.disabled === !0 ? "default" : "pointer"};
834
+ margin-right: 0;
835
+ margin-left: auto;
836
+ `, Le = x.div`
837
+ position: absolute;
838
+ background-color: white;
839
+ z-index: 1;
840
+ margin-top: 0.25rem;
841
+ padding: 0.1875rem;
842
+ width: calc(100% - 0.625rem);
843
+ border-radius: 0.15625rem;
844
+ box-shadow: 0 0 0.375rem #bebebe;
845
+ border: 0.125rem solid ${(e) => e.theme.palette[e.color].main};
846
+ display: flex;
847
+ flex-direction: column;
848
+ transition: all 250ms ease;
849
+ `, Ve = x.div`
850
+ font-family: ${(e) => e.theme.typography.fontFamily};
851
+ font-size: ${(e) => e.theme.typography[e.size].fontSize};
852
+ padding: 0.375rem;
853
+ cursor: pointer;
854
+ background-color: ${(e) => e.hover ? "whitesmoke" : "inherit"};
855
+ color: ${(e) => e.hover ? e.theme.palette[e.color].main : "inherit"};
856
+
857
+ &:hover {
858
+ background-color: whitesmoke;
859
+ color: ${(e) => e.theme.palette[e.color].main};
860
+ }
861
+ `, K = (e) => {
862
+ const { items: o, suggestions: l, onChange: n, id: r, disabled: t, className: i, size: a, color: s } = e, [c, p] = M(""), [m, h] = M(!1), [b, k] = M(0);
863
+ let W = g.createRef();
864
+ const { theme: ee } = pe();
865
+ let E = { size: a, color: s, theme: ee };
866
+ const te = () => ("10000000-1000-4000-8000" + -1e11).replace(
867
+ /[018]/g,
868
+ (d) => (d ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> d / 4).toString(16)
869
+ ), ne = (d) => {
870
+ d.keyCode === 27 && W.current.blur(), (d.keyCode === 38 || d.keyCode === 40) && d.preventDefault(), d.keyCode === 38 && b > 0 && k(b - 1), d.keyCode === 40 && b < l.length - 1 && k(b + 1), d.key === "Enter" && l.length > 0 && c && c.length > 0 && B(l[b]), d.key === "Backspace" && o.length > 0 && c === "" && q(o.length - 1);
871
+ }, B = (d) => {
872
+ oe({
873
+ id: te(),
874
+ field: d.field,
875
+ description: d.description,
876
+ value: c,
877
+ active: !0,
878
+ dataType: d.dataType,
879
+ operation: d.operation,
880
+ operationDescription: d.operationDescription
881
+ }), p(""), h(!1), k(0);
882
+ }, re = () => {
883
+ h(!1);
884
+ }, ie = (d) => {
885
+ h(!0), k(0), p(d.target.value);
886
+ }, q = (d) => {
887
+ let f = [...o].find((le, z) => z !== d);
888
+ n(
889
+ r,
890
+ [...o].filter((le, z) => z !== d),
891
+ f
892
+ );
893
+ }, oe = (d) => {
894
+ n(r, [...o, d], d);
895
+ }, ae = (d) => {
896
+ let f = [...o];
897
+ f[d] = { ...f[d], active: !f[d].active }, n(r, f, f[d]);
898
+ }, se = () => {
899
+ if (m)
900
+ return /* @__PURE__ */ v(ge, { children: /* @__PURE__ */ v(Le, { ...E, children: l.map((d, f) => /* @__PURE__ */ X(
901
+ Ve,
902
+ {
903
+ ...E,
904
+ key: f,
905
+ onMouseDown: () => B(d),
906
+ hover: b === f
907
+ },
908
+ `${d.description} - ${d.operationDescription}`
909
+ )) }) });
910
+ };
911
+ return /* @__PURE__ */ _(we, { className: i, ...E, children: [
912
+ /* @__PURE__ */ _(Me, { ...E, children: [
913
+ /* @__PURE__ */ v(Ae, { ...E, disabled: t, children: /* @__PURE__ */ v("i", { className: "fas fa-search fa-fw" }) }),
914
+ /* @__PURE__ */ _(Re, { ...E, children: [
915
+ /* @__PURE__ */ v(j, { component: null, children: o.map((d, f) => /* @__PURE__ */ v(U, { timeout: 200, classNames: "item", children: /* @__PURE__ */ X(
916
+ Ie,
917
+ {
918
+ ...E,
919
+ key: f,
920
+ first: f === 0,
921
+ title: `${d.description} - ${d.operationDescription}: ${d.value}`
922
+ },
923
+ /* @__PURE__ */ v(
924
+ ce,
925
+ {
926
+ ...E,
927
+ id: d.id,
928
+ text: d.description,
929
+ additionalInfo: d.value,
930
+ inactive: !d.active,
931
+ onRemove: () => t ? {} : q(f),
932
+ onClick: () => t ? {} : ae(f),
933
+ disabled: t
934
+ }
935
+ )
936
+ ) }, f)) }),
937
+ /* @__PURE__ */ v(ze, { ...E, children: /* @__PURE__ */ v(
938
+ _e,
939
+ {
940
+ ...E,
941
+ ref: W,
942
+ value: c,
943
+ onBlur: re,
944
+ onChange: ie,
945
+ onKeyDown: ne,
946
+ disabled: t
947
+ }
948
+ ) })
949
+ ] }),
950
+ /* @__PURE__ */ v(Pe, { ...E, disabled: t, children: /* @__PURE__ */ v(
951
+ "i",
952
+ {
953
+ className: "fas fa-times fa-fw",
954
+ onClick: () => t ? {} : n(r, [])
955
+ }
956
+ ) })
957
+ ] }),
958
+ se()
959
+ ] });
960
+ };
961
+ K.defaultProps = {
962
+ id: "",
963
+ disabled: !1,
964
+ onChange: () => {
965
+ },
966
+ items: [],
967
+ suggestions: [],
968
+ className: "",
969
+ size: "small",
970
+ color: "primary"
971
+ };
972
+ K.propTypes = {
973
+ id: u.any,
974
+ disabled: u.bool,
975
+ onChange: u.func,
976
+ className: u.string,
977
+ items: u.array,
978
+ suggestions: u.array,
979
+ size: u.oneOf(["small", "medium", "large"]),
980
+ color: u.oneOf([
981
+ "primary",
982
+ "secondary",
983
+ "success",
984
+ "error",
985
+ "warning",
986
+ "gray",
987
+ "background",
988
+ "transparent",
989
+ "neutral"
990
+ ])
991
+ };
992
+ export {
993
+ K as default
994
+ };