@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,274 @@
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { P as e } from "./index-Ds9PUTwb.js";
3
+ import y, { useCallback as h } from "react";
4
+ import { a as M } from "./CustomStyles-nfD3J1mi.js";
5
+ import { d as S } from "./index-D5vEbKUT.js";
6
+ import C from "./DropdownLookup.js";
7
+ import { u as I } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ const T = y.forwardRef((l, t) => {
9
+ const {
10
+ // defaultOptions,
11
+ // cacheOptions,
12
+ // loadOptions,
13
+ styles: n,
14
+ debounceTime: s = 180,
15
+ // name,
16
+ // hideSelectedOptions,
17
+ // id,
18
+ // inputId,
19
+ // value,
20
+ // readOnly,
21
+ // tabIndex,
22
+ isSearchable: u = !0,
23
+ isClearable: a = !0,
24
+ // isLoading,
25
+ // isRtl,
26
+ // isDisabled,
27
+ // closeMenuOnSelect,
28
+ // closeMenuOnScroll,
29
+ // escapeClearsValue,
30
+ // filterOption,
31
+ // formatGroupLabel,
32
+ // formatOptionLabel,
33
+ // getOptionLabel,
34
+ // getOptionValue,
35
+ // isOptionDisabled,
36
+ // isOptionSelected,
37
+ // loadingMessage,
38
+ // minMenuHeight,
39
+ // maxMenuHeight,
40
+ // menuPlacement,
41
+ // menuPosition,
42
+ // menuShouldBlockScroll,
43
+ // menuShouldScrollIntoView,
44
+ // openMenuOnFocus,
45
+ // openMenuOnClick,
46
+ // autoFocus,
47
+ // placeholder,
48
+ // noOptionsMessage,
49
+ // menuIsOpen,
50
+ // components,
51
+ // defaultValue,
52
+ // defaultInputValue,
53
+ // defaultMenuIsOpen,
54
+ // delimiter,
55
+ // onChange,
56
+ onInputChange: o,
57
+ // onMenuOpen,
58
+ // onMenuClose,
59
+ // onBlur,
60
+ // onFocus,
61
+ // onKeyDown,
62
+ size: r = "small",
63
+ color: i = "primary",
64
+ className: c = "",
65
+ style: m = {},
66
+ // children,
67
+ ...p
68
+ } = l, f = I(), b = h(
69
+ S((d, O) => {
70
+ o == null || o(d, O);
71
+ }, s)
72
+ );
73
+ return /* @__PURE__ */ g(
74
+ C,
75
+ {
76
+ isMulti: !0,
77
+ ref: t,
78
+ styles: n || M,
79
+ size: r,
80
+ color: i,
81
+ theme: f,
82
+ isSearchable: u,
83
+ isClearable: a,
84
+ onInputChange: b,
85
+ className: c,
86
+ style: m,
87
+ ...p
88
+ }
89
+ );
90
+ });
91
+ T.propTypes = {
92
+ /**
93
+ * The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.
94
+ */
95
+ defaultOptions: e.oneOfType([e.bool, e.array]),
96
+ /**
97
+ * If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.
98
+ */
99
+ cacheOptions: e.any,
100
+ /**
101
+ * Function that returns a promise, which is the set of options to be used once the promise resolves.
102
+ */
103
+ loadOptions: e.func,
104
+ styles: e.object,
105
+ debounceTime: e.number,
106
+ name: e.string,
107
+ value: e.any,
108
+ /**
109
+ * Sets the tabIndex attribute on the input
110
+ */
111
+ tabIndex: e.number,
112
+ /**
113
+ * Whether to enable search functionality
114
+ */
115
+ isSearchable: e.bool,
116
+ isClearable: e.bool,
117
+ /**
118
+ * Is the select in a state of loading (async)
119
+ */
120
+ isLoading: e.bool,
121
+ /**
122
+ * Is the select direction right-to-left
123
+ */
124
+ isRtl: e.bool,
125
+ isDisabled: e.bool,
126
+ readOnly: e.bool,
127
+ /**
128
+ * Close the select menu when the user selects an option
129
+ */
130
+ closeMenuOnSelect: e.bool,
131
+ /**
132
+ * If true, close the select menu when the user scrolls the document/body.
133
+ * If a function, takes a standard javascript ScrollEvent you return a boolean:
134
+ * true => The menu closes
135
+ * false => The menu stays open
136
+ * This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues.
137
+ */
138
+ closeMenuOnScroll: e.oneOfType([e.bool, e.func]),
139
+ /**
140
+ * Clear all values when the user presses escape AND the menu is closed
141
+ */
142
+ escapeClearsValue: e.bool,
143
+ /**
144
+ * Custom method to filter whether an option should be displayed in the menu. Type: `null` or `() => boolean`
145
+ */
146
+ filterOption: e.func,
147
+ /**
148
+ * Formats group labels in the menu as React components
149
+ */
150
+ formatGroupLabel: e.func,
151
+ /**
152
+ * Formats option labels in the menu and control as React components
153
+ */
154
+ formatOptionLabel: e.func,
155
+ /**
156
+ * Resolves option data to a string to be displayed as the label by components
157
+ * Note: Failure to resolve to a string type can interfere with filtering and screen reader support.
158
+ */
159
+ getOptionLabel: e.func,
160
+ /**
161
+ * Resolves option data to a string to compare options and specify value attributes
162
+ */
163
+ getOptionValue: e.func,
164
+ /**
165
+ * Hide the selected option from the menu
166
+ */
167
+ hideSelectedOptions: e.bool,
168
+ /**
169
+ * The id to set on the SelectContainer component
170
+ */
171
+ id: e.string,
172
+ /**
173
+ * The id of the search input
174
+ */
175
+ inputId: e.string,
176
+ /**
177
+ * Override the built-in logic to detect whether an option is disabled. `(...) => boolean`
178
+ */
179
+ isOptionDisabled: e.func,
180
+ /**
181
+ * Override the built-in logic to detect whether an option is selected. `(...) => boolean`
182
+ */
183
+ isOptionSelected: e.func,
184
+ /**
185
+ * Async: Text to display when loading options `(...) => ...`
186
+ */
187
+ loadingMessage: e.func,
188
+ /**
189
+ * Minimum height of the menu before flipping
190
+ */
191
+ minMenuHeight: e.number,
192
+ /**
193
+ * Maximum height of the menu before flipping
194
+ */
195
+ maxMenuHeight: e.number,
196
+ /**
197
+ * Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control.
198
+ */
199
+ menuPlacement: e.oneOf(["bottom", "auto", "top"]),
200
+ /**
201
+ *The CSS position value of the menu, when "fixed" extra layout management is required.
202
+ */
203
+ menuPosition: e.oneOf(["absolute", "fixed"]),
204
+ /**
205
+ * Whether to block scroll events when the menu is open
206
+ */
207
+ menuShouldBlockScroll: e.bool,
208
+ /**
209
+ * Whether the menu should be scrolled into view when it opens
210
+ */
211
+ menuShouldScrollIntoView: e.bool,
212
+ /**
213
+ * Allows control of whether the menu is opened when the Select is focused
214
+ */
215
+ openMenuOnFocus: e.bool,
216
+ /**
217
+ * Allows control of whether the menu is opened when the Select is clicked
218
+ */
219
+ openMenuOnClick: e.bool,
220
+ //----
221
+ autoFocus: e.bool,
222
+ placeholder: e.any,
223
+ noOptionsMessage: e.string,
224
+ menuIsOpen: e.bool,
225
+ /**
226
+ * 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.
227
+ * If you only wish to restyle a component, we recommend using the styles prop instead.
228
+ */
229
+ components: e.object,
230
+ /**
231
+ * initial value of the control
232
+ */
233
+ defaultValue: e.string,
234
+ /**
235
+ * initial value of the search input
236
+ */
237
+ defaultInputValue: e.string,
238
+ /**
239
+ * initial open value of the menu
240
+ */
241
+ defaultMenuIsOpen: e.bool,
242
+ /**
243
+ * Delimiter used to join multiple values into a single HTML Input value
244
+ */
245
+ delimiter: e.string,
246
+ //---------------------------------------------------------------
247
+ onChange: e.func,
248
+ /**
249
+ * control the value of the search input (changing this will update the available options)
250
+ */
251
+ onInputChange: e.func,
252
+ onMenuOpen: e.func,
253
+ onMenuClose: e.func,
254
+ onFocus: e.func,
255
+ onBlur: e.func,
256
+ onKeyDown: e.func,
257
+ //---------------------------------------------------------------
258
+ className: e.string,
259
+ style: e.object,
260
+ color: e.oneOf([
261
+ "primary",
262
+ "secondary",
263
+ "success",
264
+ "warning",
265
+ "danger",
266
+ "information",
267
+ "neutral",
268
+ "gray"
269
+ ]),
270
+ size: e.oneOf(["small", "medium", "large"])
271
+ };
272
+ export {
273
+ T as default
274
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";const o=require("react/jsx-runtime"),r=require("react"),t=require("./index-DXnSjbfJ.cjs"),I=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),S=require("./utils-hdRGTsQ7.cjs"),b=require("./motion-Oud-wpUz.cjs"),M=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),q=require("./index-BP5r5zGN.cjs"),j=I.newStyled(b.motion.div)`
2
+ margin-left: 0.3rem;
3
+ padding-left: 0.3rem;
4
+ border-left: ${s=>`2px solid ${S.getColorRgbaValue(s.theme,"MenuItem",s.color,"focus","background")}`};
5
+ border-radius: 2px;
6
+ `,p=r.forwardRef((s,O)=>{const{__TYPE__:h="NESTED_ITEM",item:c,onItemSelected:u=()=>{},defaultOpen:y=!1,animation:d={animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},initial:{opacity:0,height:0},transition:{type:"tween",duration:.15,opacity:{duration:.15,ease:"easeOut"},height:{duration:.15}}},className:T="",style:_={},color:n="primary",size:i="small",children:E,...g}=s,N=M.useTheme(),[a,f]=r.useState(y),P=()=>{f(!a)},x=r.cloneElement(c,{isNested:!0,showNested:a,toggleNested:P,color:n,size:i}),w=r.Children.map(E,(e,D)=>{var m,l;return r.isValidElement(e)&&(e.props.__TYPE__=="MENU_ITEM"||((m=e==null?void 0:e.type)==null?void 0:m.displayName)==="MENU_ITEM"||e.props.__TYPE__=="NESTED_ITEM"||((l=e==null?void 0:e.type)==null?void 0:l.displayName)==="NESTED_ITEM")?r.cloneElement(e,{color:e.props.color?e.props.color:n,size:i,onItemSelected:u}):e});return o.jsxs(o.Fragment,{children:[o.jsx(o.Fragment,{children:x}),o.jsx(q.AnimatePresence,{children:a&&o.jsx(j,{...d,theme:N,color:n,size:i,className:"nested-item-lnc "+T,style:_,...g,children:w})})]})});p.propTypes={item:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),defaultOpen:t.PropTypes.bool,animation:t.PropTypes.object,className:t.PropTypes.string,style:t.PropTypes.object,color:t.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:t.PropTypes.oneOf(["small","medium","large"]),__TYPE__:t.PropTypes.string};p.displayName="NESTED_ITEM";module.exports=p;
@@ -0,0 +1,102 @@
1
+ import { jsxs as w, Fragment as l, jsx as m } from "react/jsx-runtime";
2
+ import o, { useState as x } from "react";
3
+ import { P as t } from "./index-Ds9PUTwb.js";
4
+ import { n as P } from "./emotion-styled.browser.esm-BZSYYThs.js";
5
+ import { b as O } from "./utils-DEke8iwo.js";
6
+ import { m as h } from "./motion-CtkUpWEn.js";
7
+ import { u as D } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ import { A as j } from "./index-BLQWNy78.js";
9
+ const Y = P(h.div)`
10
+ margin-left: 0.3rem;
11
+ padding-left: 0.3rem;
12
+ border-left: ${(r) => `2px solid ${O(
13
+ r.theme,
14
+ "MenuItem",
15
+ r.color,
16
+ "focus",
17
+ "background"
18
+ )}`};
19
+ border-radius: 2px;
20
+ `, d = o.forwardRef((r, C) => {
21
+ const {
22
+ __TYPE__: R = "NESTED_ITEM",
23
+ item: f,
24
+ //------------------
25
+ onItemSelected: c = () => {
26
+ },
27
+ //--------------------
28
+ defaultOpen: u = !1,
29
+ animation: _ = {
30
+ animate: { opacity: 1, height: "auto" },
31
+ exit: { opacity: 0, height: 0 },
32
+ initial: { opacity: 0, height: 0 },
33
+ transition: {
34
+ type: "tween",
35
+ duration: 0.15,
36
+ opacity: { duration: 0.15, ease: "easeOut" },
37
+ height: { duration: 0.15 }
38
+ }
39
+ },
40
+ className: E = "",
41
+ style: y = {},
42
+ color: n = "primary",
43
+ size: s = "small",
44
+ children: g,
45
+ ...T
46
+ } = r, N = D(), [a, I] = x(u), M = () => {
47
+ I(!a);
48
+ }, S = o.cloneElement(f, {
49
+ isNested: !0,
50
+ showNested: a,
51
+ toggleNested: M,
52
+ color: n,
53
+ size: s
54
+ }), b = o.Children.map(g, (e, z) => {
55
+ var i, p;
56
+ return o.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((i = e == null ? void 0 : e.type) == null ? void 0 : i.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((p = e == null ? void 0 : e.type) == null ? void 0 : p.displayName) === "NESTED_ITEM") ? o.cloneElement(e, {
57
+ color: e.props.color ? e.props.color : n,
58
+ size: s,
59
+ onItemSelected: c
60
+ }) : e;
61
+ });
62
+ return /* @__PURE__ */ w(l, { children: [
63
+ /* @__PURE__ */ m(l, { children: S }),
64
+ /* @__PURE__ */ m(j, { children: a && /* @__PURE__ */ m(
65
+ Y,
66
+ {
67
+ ..._,
68
+ theme: N,
69
+ color: n,
70
+ size: s,
71
+ className: "nested-item-lnc " + E,
72
+ style: y,
73
+ ...T,
74
+ children: b
75
+ }
76
+ ) })
77
+ ] });
78
+ });
79
+ d.propTypes = {
80
+ item: t.oneOfType([t.string, t.element]),
81
+ //--------------------------
82
+ defaultOpen: t.bool,
83
+ animation: t.object,
84
+ className: t.string,
85
+ style: t.object,
86
+ color: t.oneOf([
87
+ "primary",
88
+ "secondary",
89
+ "success",
90
+ "warning",
91
+ "danger",
92
+ "information",
93
+ "neutral",
94
+ "gray"
95
+ ]),
96
+ size: t.oneOf(["small", "medium", "large"]),
97
+ __TYPE__: t.string
98
+ };
99
+ d.displayName = "NESTED_ITEM";
100
+ export {
101
+ d as default
102
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";const o=require("react/jsx-runtime"),r=require("react"),t=require("./index-DXnSjbfJ.cjs"),M=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),w=require("./utils-hdRGTsQ7.cjs"),q=require("./motion-Oud-wpUz.cjs"),j=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),O=require("./index-BP5r5zGN.cjs"),$=M.newStyled(q.motion.div)`
2
+ ${n=>n.tuckIn==!0&&`margin-left: ${n.tuckInSize};`}
3
+ ${n=>n.tuckIn==!0&&`padding-left: ${n.tuckInSize};`}
4
+ ${n=>n.tuckIn==!0&&`border-left: 2px solid ${w.getColorRgbaValue(n.theme,"MenuItem",n.color,"focus","background","backgroundOpacity")};`}
5
+ border-radius: 2px;
6
+ `,c=r.forwardRef((n,m)=>{const{item:l,onItemSelected:y=()=>{},defaultOpen:d=!1,tuckIn:T=!0,tuckInSize:_="0.3rem",animation:E={animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},initial:{opacity:0,height:0},transition:{type:"tween",duration:.15,opacity:{duration:.15,ease:"easeOut"},height:{duration:.15}}},className:g="",style:I={},color:i="primary",size:a="small",__TYPE__:h="NESTED_ITEM",children:N,...P}=n,f=j.useTheme(),[s,S]=r.useState(d),x=()=>{S(!s)},b=r.cloneElement(l,{isNested:!0,showNested:s,toggleNested:x,color:i,size:a}),k=r.Children.map(N,(e,z)=>{var p,u;if(r.isValidElement(e)&&(e.props.__TYPE__=="MENU_ITEM"||((p=e==null?void 0:e.type)==null?void 0:p.displayName)==="MENU_ITEM"||e.props.__TYPE__=="NESTED_ITEM"||((u=e==null?void 0:e.type)==null?void 0:u.displayName)==="NESTED_ITEM"))return r.cloneElement(e,{color:e.props.color?e.props.color:i,size:a,onItemSelected:y})});return o.jsxs(o.Fragment,{children:[o.jsx(o.Fragment,{children:b}),o.jsx(O.AnimatePresence,{children:s&&o.jsx($,{theme:f,tuckIn:T,tuckInSize:_,color:i,size:a,className:"nested-item-lnc "+g,style:I,ref:m,show:s,...E,...P,children:k})})]})});c.propTypes={item:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),defaultOpen:t.PropTypes.bool,tuckIn:t.PropTypes.bool,tuckInSize:t.PropTypes.string,animation:t.PropTypes.object,className:t.PropTypes.string,style:t.PropTypes.object,color:t.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:t.PropTypes.oneOf(["small","medium","large"]),__TYPE__:t.PropTypes.string};c.displayName="NESTED_ITEM";module.exports=c;
@@ -0,0 +1,115 @@
1
+ import { jsxs as O, Fragment as u, jsx as i } from "react/jsx-runtime";
2
+ import n, { useState as P } from "react";
3
+ import { P as t } from "./index-Ds9PUTwb.js";
4
+ import { n as h } from "./emotion-styled.browser.esm-BZSYYThs.js";
5
+ import { b as z } from "./utils-DEke8iwo.js";
6
+ import { m as $ } from "./motion-CtkUpWEn.js";
7
+ import { u as j } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
8
+ import { A as D } from "./index-BLQWNy78.js";
9
+ const Y = h($.div)`
10
+ ${(o) => o.tuckIn == !0 && `margin-left: ${o.tuckInSize};`}
11
+ ${(o) => o.tuckIn == !0 && `padding-left: ${o.tuckInSize};`}
12
+ ${(o) => o.tuckIn == !0 && `border-left: 2px solid ${z(
13
+ o.theme,
14
+ "MenuItem",
15
+ o.color,
16
+ "focus",
17
+ "background",
18
+ "backgroundOpacity"
19
+ )};`}
20
+ border-radius: 2px;
21
+ `, c = n.forwardRef((o, p) => {
22
+ const {
23
+ item: d,
24
+ //------------------
25
+ onItemSelected: f = () => {
26
+ },
27
+ //--------------------
28
+ defaultOpen: _ = !1,
29
+ tuckIn: E = !0,
30
+ tuckInSize: y = "0.3rem",
31
+ animation: g = {
32
+ animate: { opacity: 1, height: "auto" },
33
+ exit: { opacity: 0, height: 0 },
34
+ initial: { opacity: 0, height: 0 },
35
+ transition: {
36
+ type: "tween",
37
+ duration: 0.15,
38
+ opacity: { duration: 0.15, ease: "easeOut" },
39
+ height: { duration: 0.15 }
40
+ }
41
+ },
42
+ className: I = "",
43
+ style: T = {},
44
+ color: a = "primary",
45
+ size: s = "small",
46
+ __TYPE__: C = "NESTED_ITEM",
47
+ children: N,
48
+ ...S
49
+ } = o, k = j(), [r, b] = P(_), M = () => {
50
+ b(!r);
51
+ }, w = n.cloneElement(d, {
52
+ isNested: !0,
53
+ showNested: r,
54
+ toggleNested: M,
55
+ color: a,
56
+ size: s
57
+ }), x = n.Children.map(N, (e, R) => {
58
+ var m, l;
59
+ if (n.isValidElement(e) && (e.props.__TYPE__ == "MENU_ITEM" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "MENU_ITEM" || e.props.__TYPE__ == "NESTED_ITEM" || ((l = e == null ? void 0 : e.type) == null ? void 0 : l.displayName) === "NESTED_ITEM"))
60
+ return n.cloneElement(e, {
61
+ color: e.props.color ? e.props.color : a,
62
+ size: s,
63
+ onItemSelected: f
64
+ });
65
+ });
66
+ return /* @__PURE__ */ O(u, { children: [
67
+ /* @__PURE__ */ i(u, { children: w }),
68
+ /* @__PURE__ */ i(D, { children: r && /* @__PURE__ */ i(
69
+ Y,
70
+ {
71
+ theme: k,
72
+ tuckIn: E,
73
+ tuckInSize: y,
74
+ color: a,
75
+ size: s,
76
+ className: "nested-item-lnc " + I,
77
+ style: T,
78
+ ref: p,
79
+ show: r,
80
+ ...g,
81
+ ...S,
82
+ children: x
83
+ }
84
+ ) })
85
+ ] });
86
+ });
87
+ c.propTypes = {
88
+ item: t.oneOfType([t.string, t.element]),
89
+ //--------------------------
90
+ defaultOpen: t.bool,
91
+ /**
92
+ * Determines wether nested items will be tucked in to the right (using margin-right and padding-left).
93
+ */
94
+ tuckIn: t.bool,
95
+ tuckInSize: t.string,
96
+ animation: t.object,
97
+ className: t.string,
98
+ style: t.object,
99
+ color: t.oneOf([
100
+ "primary",
101
+ "secondary",
102
+ "success",
103
+ "warning",
104
+ "danger",
105
+ "information",
106
+ "neutral",
107
+ "gray"
108
+ ]),
109
+ size: t.oneOf(["small", "medium", "large"]),
110
+ __TYPE__: t.string
111
+ };
112
+ c.displayName = "NESTED_ITEM";
113
+ export {
114
+ c as default
115
+ };
@@ -0,0 +1,83 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react/jsx-runtime"),i=require("react"),P=require("./index-DXnSjbfJ.cjs"),Te=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),we=require("./index-C29T0m2a.cjs"),S=require("./utils-hdRGTsQ7.cjs"),Be=require("./ThemeProvider.cjs"),_e=require("./Icon.cjs"),Se=require("./Avatar.cjs"),De=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs");function he(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=he(e[t]))&&(a&&(a+=" "),a+=n);else for(t in e)e[t]&&(a&&(a+=" "),a+=t);return a}function H(){for(var e,t,n=0,a="";n<arguments.length;)(e=arguments[n++])&&(t=he(e))&&(a&&(a+=" "),a+=t);return a}function D(){return D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},D.apply(this,arguments)}function be(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,u;for(u=0;u<a.length;u++)r=a[u],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function J(e){return typeof e=="number"&&!isNaN(e)}function K(e){return typeof e=="boolean"}function V(e){return typeof e=="string"}function B(e){return typeof e=="function"}function ee(e){return V(e)||B(e)?e:null}function le(e){return e===0||e}function ke(e,t){return e===!1||J(e)&&e>0?e:t}var Ce=!!(typeof window<"u"&&window.document&&window.document.createElement);function re(e){return i.isValidElement(e)||V(e)||B(e)||J(e)}var Ee={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},M={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function je(e,t,n){n===void 0&&(n=300);var a=e.scrollHeight,r=e.style;requestAnimationFrame(function(){r.minHeight="initial",r.height=a+"px",r.transition="all "+n+"ms",requestAnimationFrame(function(){r.height="0",r.padding="0",r.margin="0",setTimeout(t,n)})})}function Ae(e){var t=e.enter,n=e.exit,a=e.appendPosition,r=a===void 0?!1:a,u=e.collapse,m=u===void 0?!0:u,d=e.collapseDuration,s=d===void 0?300:d;return function(l){var T=l.children,h=l.position,p=l.preventExitTransition,I=l.done,E=l.nodeRef,O=l.isIn,w=r?t+"--"+h:t,R=r?n+"--"+h:n,F=i.useRef(),c=i.useRef(0);i.useLayoutEffect(function(){f()},[]),i.useEffect(function(){O||(p?x():C())},[O]);function f(){var o=E.current;F.current=o.className,o.className+=" "+w,o.addEventListener("animationend",b)}function b(o){if(o.target===E.current){var y=E.current;y.removeEventListener("animationend",b),c.current===0&&(y.className=F.current)}}function C(){c.current=1;var o=E.current;o.className+=" "+R,o.addEventListener("animationend",x)}function x(){var o=E.current;o.removeEventListener("animationend",x),m?je(o,I,s):I()}return i.createElement(i.Fragment,null,T)}}var k={list:new Map,emitQueue:new Map,on:function(t,n){return this.list.has(t)||this.list.set(t,[]),this.list.get(t).push(n),this},off:function(t,n){if(n){var a=this.list.get(t).filter(function(r){return r!==n});return this.list.set(t,a),this}return this.list.delete(t),this},cancelEmit:function(t){var n=this.emitQueue.get(t);return n&&(n.forEach(clearTimeout),this.emitQueue.delete(t)),this},emit:function(t){for(var n=this,a=arguments.length,r=new Array(a>1?a-1:0),u=1;u<a;u++)r[u-1]=arguments[u];this.list.has(t)&&this.list.get(t).forEach(function(m){var d=setTimeout(function(){m.apply(void 0,r)},0);n.emitQueue.has(t)||n.emitQueue.set(t,[]),n.emitQueue.get(t).push(d)})}};function W(e,t){t===void 0&&(t=!1);var n=i.useRef(e);return i.useEffect(function(){t&&(n.current=e)}),n.current}function Me(e,t){switch(t.type){case 0:return[].concat(e,[t.toastId]).filter(function(n){return n!==t.staleId});case 1:return le(t.toastId)?e.filter(function(n){return n!==t.toastId}):[]}}var Fe=["delay","staleId"];function $e(e){var t=i.useReducer(function(c){return c+1},0),n=t[1],a=i.useReducer(Me,[]),r=a[0],u=a[1],m=i.useRef(null),d=W(0),s=W([]),v=W({}),l=W({toastKey:1,displayedToast:0,props:e,containerId:null,isToastActive:T,getToast:function(f){return v[f]||null}});i.useEffect(function(){return l.containerId=e.containerId,k.cancelEmit(3).on(0,O).on(1,function(c){return m.current&&p(c)}).on(5,h).emit(2,l),function(){return k.emit(3,l)}},[]),i.useEffect(function(){l.isToastActive=T,l.displayedToast=r.length,k.emit(4,r.length,e.containerId)},[r]),i.useEffect(function(){l.props=e});function T(c){return r.indexOf(c)!==-1}function h(c){var f=c.containerId,b=l.props.limit;b&&(!f||l.containerId===f)&&(d-=s.length,s=[])}function p(c){u({type:1,toastId:c})}function I(){var c=s.shift(),f=c.toastContent,b=c.toastProps,C=c.staleId;w(f,b,C)}function E(c){var f=c.containerId,b=c.toastId,C=c.updateId;return!!(!m.current||l.props.enableMultiContainer&&f!==l.props.containerId||v[b]&&C==null)}function O(c,f){var b,C=f.delay,x=f.staleId,o=be(f,Fe);if(!(!re(c)||E(o))){var y=o.toastId,_=o.updateId,U=o.data,g=l.props,A=function(){return p(y)},G=o.updateId==null;G&&d++;var L={toastId:y,updateId:_,isLoading:o.isLoading,theme:o.theme||g.theme,icon:(b=o.icon)!=null?b:g.icon,isIn:!1,key:o.key||l.toastKey++,type:o.type,closeToast:A,closeButton:o.closeButton,rtl:g.rtl,position:o.position||g.position,transition:o.transition||g.transition,className:ee(o.className||g.toastClassName),bodyClassName:ee(o.bodyClassName||g.bodyClassName),style:o.style||g.toastStyle,bodyStyle:o.bodyStyle||g.bodyStyle,onClick:o.onClick||g.onClick,pauseOnHover:K(o.pauseOnHover)?o.pauseOnHover:g.pauseOnHover,pauseOnFocusLoss:K(o.pauseOnFocusLoss)?o.pauseOnFocusLoss:g.pauseOnFocusLoss,draggable:K(o.draggable)?o.draggable:g.draggable,draggablePercent:J(o.draggablePercent)?o.draggablePercent:g.draggablePercent,draggableDirection:o.draggableDirection||g.draggableDirection,closeOnClick:K(o.closeOnClick)?o.closeOnClick:g.closeOnClick,progressClassName:ee(o.progressClassName||g.progressClassName),progressStyle:o.progressStyle||g.progressStyle,autoClose:o.isLoading?!1:ke(o.autoClose,g.autoClose),hideProgressBar:K(o.hideProgressBar)?o.hideProgressBar:g.hideProgressBar,progress:o.progress,role:V(o.role)?o.role:g.role,deleteToast:function(){R(y)}};B(o.onOpen)&&(L.onOpen=o.onOpen),B(o.onClose)&&(L.onClose=o.onClose),L.draggableDirection==="y"&&L.draggablePercent===80&&(L.draggablePercent*=1.5);var $=g.closeButton;o.closeButton===!1||re(o.closeButton)?$=o.closeButton:o.closeButton===!0&&($=re(g.closeButton)?g.closeButton:!0),L.closeButton=$;var z=c;i.isValidElement(c)&&!V(c.type)?z=i.cloneElement(c,{closeToast:A,toastProps:L,data:U}):B(c)&&(z=c({closeToast:A,toastProps:L,data:U})),g.limit&&g.limit>0&&d>g.limit&&G?s.push({toastContent:z,toastProps:L,staleId:x}):J(C)&&C>0?setTimeout(function(){w(z,L,x)},C):w(z,L,x)}}function w(c,f,b){var C=f.toastId;b&&delete v[b],v[C]={content:c,props:f},u({type:0,toastId:C,staleId:b})}function R(c){delete v[c];var f=s.length;if(d=le(c)?d-1:d-l.displayedToast,d<0&&(d=0),f>0){var b=le(c)?1:l.props.limit;if(f===1||b===1)l.displayedToast++,I();else{var C=b>f?f:b;l.displayedToast=C;for(var x=0;x<C;x++)I()}}else n()}function F(c){for(var f={},b=e.newestOnTop?Object.keys(v).reverse():Object.keys(v),C=0;C<b.length;C++){var x=v[b[C]],o=x.props.position;f[o]||(f[o]=[]),f[o].push(x)}return Object.keys(f).map(function(y){return c(y,f[y])})}return{getToastToRender:F,collection:v,containerRef:m,isToastActive:T}}function ve(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function ye(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function ze(e){var t=i.useState(!0),n=t[0],a=t[1],r=i.useState(!1),u=r[0],m=r[1],d=i.useRef(null),s=W({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null}),v=W(e,!0),l=e.autoClose,T=e.pauseOnHover,h=e.closeToast,p=e.onClick,I=e.closeOnClick;i.useEffect(function(){return B(e.onOpen)&&e.onOpen(i.isValidElement(e.children)&&e.children.props),function(){B(v.onClose)&&v.onClose(i.isValidElement(v.children)&&v.children.props)}},[]),i.useEffect(function(){return e.draggable&&f(),function(){e.draggable&&b()}},[e.draggable]),i.useEffect(function(){return e.pauseOnFocusLoss&&F(),function(){e.pauseOnFocusLoss&&c()}},[e.pauseOnFocusLoss]);function E(y){if(e.draggable){var _=d.current;s.canCloseOnClick=!0,s.canDrag=!0,s.boundingRect=_.getBoundingClientRect(),_.style.transition="",s.x=ve(y.nativeEvent),s.y=ye(y.nativeEvent),e.draggableDirection==="x"?(s.start=s.x,s.removalDistance=_.offsetWidth*(e.draggablePercent/100)):(s.start=s.y,s.removalDistance=_.offsetHeight*(e.draggablePercent/100))}}function O(){if(s.boundingRect){var y=s.boundingRect,_=y.top,U=y.bottom,g=y.left,A=y.right;e.pauseOnHover&&s.x>=g&&s.x<=A&&s.y>=_&&s.y<=U?R():w()}}function w(){a(!0)}function R(){a(!1)}function F(){document.hasFocus()||R(),window.addEventListener("focus",w),window.addEventListener("blur",R)}function c(){window.removeEventListener("focus",w),window.removeEventListener("blur",R)}function f(){document.addEventListener("mousemove",C),document.addEventListener("mouseup",x),document.addEventListener("touchmove",C),document.addEventListener("touchend",x)}function b(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",x),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",x)}function C(y){if(s.canDrag){y.preventDefault();var _=d.current;n&&R(),s.x=ve(y),s.y=ye(y),e.draggableDirection==="x"?s.delta=s.x-s.start:s.delta=s.y-s.start,s.start!==s.x&&(s.canCloseOnClick=!1),_.style.transform="translate"+e.draggableDirection+"("+s.delta+"px)",_.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance))}}function x(){var y=d.current;if(s.canDrag){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance){m(!0),e.closeToast();return}y.style.transition="transform 0.2s, opacity 0.2s",y.style.transform="translate"+e.draggableDirection+"(0)",y.style.opacity="1"}}var o={onMouseDown:E,onTouchStart:E,onMouseUp:O,onTouchEnd:O};return l&&T&&(o.onMouseEnter=R,o.onMouseLeave=w),I&&(o.onClick=function(y){p&&p(y),s.canCloseOnClick&&h()}),{playToast:w,pauseToast:R,isRunning:n,preventExitTransition:u,toastRef:d,eventHandlers:o}}function Ne(e){var t=e.closeToast,n=e.theme,a=e.ariaLabel,r=a===void 0?"close":a;return i.createElement("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(m){m.stopPropagation(),t(m)},"aria-label":r},i.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},i.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Pe(e){var t,n,a=e.delay,r=e.isRunning,u=e.closeToast,m=e.type,d=e.hide,s=e.className,v=e.style,l=e.controlledProgress,T=e.progress,h=e.rtl,p=e.isIn,I=e.theme,E=D({},v,{animationDuration:a+"ms",animationPlayState:r?"running":"paused",opacity:d?0:1});l&&(E.transform="scaleX("+T+")");var O=H("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+I,"Toastify__progress-bar--"+m,(t={},t["Toastify__progress-bar--rtl"]=h,t)),w=B(s)?s({rtl:h,type:m,defaultClassName:O}):H(O,s),R=(n={},n[l&&T>=1?"onTransitionEnd":"onAnimationEnd"]=l&&T<1?null:function(){p&&u()},n);return i.createElement("div",Object.assign({role:"progressbar","aria-hidden":d?"true":"false","aria-label":"notification timer",className:w,style:E},R))}Pe.defaultProps={type:M.DEFAULT,hide:!1};var He=["theme","type"],te=function(t){var n=t.theme,a=t.type,r=be(t,He);return i.createElement("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:n==="colored"?"currentColor":"var(--toastify-icon-color-"+a+")"},r))};function Ve(e){return i.createElement(te,Object.assign({},e),i.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function qe(e){return i.createElement(te,Object.assign({},e),i.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function Ue(e){return i.createElement(te,Object.assign({},e),i.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function We(e){return i.createElement(te,Object.assign({},e),i.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function Qe(){return i.createElement("div",{className:"Toastify__spinner"})}var pe={info:qe,warning:Ve,success:Ue,error:We,spinner:Qe},Ge=function(t){var n,a,r=ze(t),u=r.isRunning,m=r.preventExitTransition,d=r.toastRef,s=r.eventHandlers,v=t.closeButton,l=t.children,T=t.autoClose,h=t.onClick,p=t.type,I=t.hideProgressBar,E=t.closeToast,O=t.transition,w=t.position,R=t.className,F=t.style,c=t.bodyClassName,f=t.bodyStyle,b=t.progressClassName,C=t.progressStyle,x=t.updateId,o=t.role,y=t.progress,_=t.rtl,U=t.toastId,g=t.deleteToast,A=t.isIn,G=t.isLoading,L=t.icon,$=t.theme,z=H("Toastify__toast","Toastify__toast-theme--"+$,"Toastify__toast--"+p,(n={},n["Toastify__toast--rtl"]=_,n)),ae=B(R)?R({rtl:_,position:w,type:p,defaultClassName:z}):H(z,R),se=!!y,me=pe[p],ie={theme:$,type:p},q=me&&me(ie);L===!1?q=void 0:B(L)?q=L(ie):i.isValidElement(L)?q=i.cloneElement(L,ie):V(L)?q=L:G&&(q=pe.spinner());function Le(Y){if(Y){var ge={closeToast:E,type:p,theme:$};if(B(Y))return Y(ge);if(i.isValidElement(Y))return i.cloneElement(Y,ge)}}return i.createElement(O,{isIn:A,done:g,position:w,preventExitTransition:m,nodeRef:d},i.createElement("div",Object.assign({id:U,onClick:h,className:ae},s,{style:F,ref:d}),i.createElement("div",Object.assign({},A&&{role:o},{className:B(c)?c({type:p}):H("Toastify__toast-body",c),style:f}),q&&i.createElement("div",{className:H("Toastify__toast-icon",(a={},a["Toastify--animate-icon Toastify__zoom-enter"]=!G,a))},q),i.createElement("div",null,l)),Le(v),(T||se)&&i.createElement(Pe,Object.assign({},x&&!se?{key:"pb-"+x}:{},{rtl:_,theme:$,delay:T,isRunning:u,isIn:A,closeToast:E,hide:I,type:p,style:C,className:b,controlledProgress:se,progress:y}))))},Ye=Ae({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),fe=function(t){var n=$e(t),a=n.getToastToRender,r=n.containerRef,u=n.isToastActive,m=t.className,d=t.style,s=t.rtl,v=t.containerId;function l(T){var h,p=H("Toastify__toast-container","Toastify__toast-container--"+T,(h={},h["Toastify__toast-container--rtl"]=s,h));return B(m)?m({position:T,rtl:s,defaultClassName:p}):H(p,ee(m))}return i.createElement("div",{ref:r,className:"Toastify",id:v},a(function(T,h){var p=h.length===0?D({},d,{pointerEvents:"none"}):D({},d);return i.createElement("div",{className:l(T),style:p,key:"container-"+T},h.map(function(I){var E=I.content,O=I.props;return i.createElement(Ge,Object.assign({},O,{isIn:u(O.toastId),key:"toast-"+O.key,closeButton:O.closeButton===!0?Ne:O.closeButton}),E)}))}))};fe.defaultProps={position:Ee.TOP_RIGHT,transition:Ye,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Ne,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Q=new Map,ce,X,Oe,ue=[],de=!1;function Ke(){return Q.size>0}function Xe(e,t){var n=t.containerId,a=Q.get(n||ce);return a?a.getToast(e):null}function Ie(){return Math.random().toString(36).substr(2,9)}function Je(e){return e&&(V(e.toastId)||J(e.toastId))?e.toastId:Ie()}function Z(e,t){return Ke()?k.emit(0,e,t):(ue.push({content:e,options:t}),de&&Ce&&(de=!1,X=document.createElement("div"),document.body.appendChild(X),we.reactDomExports.render(i.createElement(fe,Object.assign({},Oe)),X))),t.toastId}function ne(e,t){return D({},t,{type:t&&t.type||e,toastId:Je(t)})}var oe=function(t){return function(n,a){return Z(n,ne(t,a))}},N=function(t,n){return Z(t,ne(M.DEFAULT,n))};N.loading=function(e,t){return Z(e,ne(M.DEFAULT,D({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))};function Ze(e,t,n){var a=t.pending,r=t.error,u=t.success,m;a&&(m=V(a)?N.loading(a,n):N.loading(a.render,D({},n,a)));var d={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},s=function(T,h,p){var I=D({type:T},d,n,{data:p}),E=V(h)?{render:h}:h;return m?N.update(m,D({},I,E)):N(E.render,D({},I,E)),p},v=B(e)?e():e;return v.then(function(l){return u&&s("success",u,l)}).catch(function(l){return r&&s("error",r,l)}),v}N.promise=Ze;N.success=oe(M.SUCCESS);N.info=oe(M.INFO);N.error=oe(M.ERROR);N.warning=oe(M.WARNING);N.warn=N.warning;N.dark=function(e,t){return Z(e,ne(M.DEFAULT,D({theme:"dark"},t)))};N.dismiss=function(e){return k.emit(1,e)};N.clearWaitingQueue=function(e){return e===void 0&&(e={}),k.emit(5,e)};N.isActive=function(e){var t=!1;return Q.forEach(function(n){n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t};N.update=function(e,t){t===void 0&&(t={}),setTimeout(function(){var n=Xe(e,t);if(n){var a=n.props,r=n.content,u=D({},a,t,{toastId:t.toastId||e,updateId:Ie()});u.toastId!==e&&(u.staleId=e);var m=u.render||r;delete u.render,Z(m,u)}},0)};N.done=function(e){N.update(e,{progress:1})};N.onChange=function(e){return B(e)&&k.on(4,e),function(){B(e)&&k.off(4,e)}};N.configure=function(e){e===void 0&&(e={}),de=!0,Oe=e};N.POSITION=Ee;N.TYPE=M;k.on(2,function(e){ce=e.containerId||e,Q.set(ce,e),ue.forEach(function(t){k.emit(0,t.content,t.options)}),ue=[]}).on(3,function(e){Q.delete(e.containerId||e),Q.size===0&&k.off(0).off(1).off(5),Ce&&X&&document.body.removeChild(X)});const et=Te.newStyled.div`
2
+ ${e=>S.getComponentTypographyCss(e.theme,"Notification","small","enabled")};
3
+
4
+ word-wrap: break-word;
5
+ box-sizing: border-box;
6
+ display: flex;
7
+ gap: 1rem;
8
+ justify-content: space-between;
9
+
10
+ & .notification-actions {
11
+ align-items: center;
12
+ ${e=>e.sideButtons&&"margin: -14px"};
13
+ flex-direction: ${e=>e.sideButtons?"column":"row"};
14
+ ${e=>e.sideButtons&&"margin-left: auto"};
15
+ ${e=>e.inlineActions==!1&&e.sideButtons==!1&&"padding-top: 4px"};
16
+ gap: ${e=>e.sideButtons?"0":"1rem"};
17
+ display: flex;
18
+
19
+ color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","action")};
20
+
21
+ & > button {
22
+ ${e=>e.sideButtons&&"flex: 1; width: 100%;"}
23
+ }
24
+ }
25
+ & .notification-main {
26
+ word-wrap: break-word;
27
+ box-sizing: border-box;
28
+ display: flex;
29
+ gap: 1rem;
30
+ }
31
+ & .notification-content {
32
+ display: flex;
33
+ flex-direction: column;
34
+ gap: 0.25rem;
35
+ color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","text")};
36
+ }
37
+ & .notification-icon {
38
+ align-items: flex-start;
39
+ & i {
40
+ font-size: 1.25rem;
41
+ }
42
+ }
43
+ & .notification-title {
44
+ font-weight: ${e=>S.getComponentPropValue(e.theme,"Notification",e.color,"enabled","fontWeightTitle")};
45
+ color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","title")};
46
+ }
47
+ `,xe=i.forwardRef((e,t)=>{const{title:n,icon:a,className:r,style:u={},size:m="small",avatar:d=!1,actions:s,inlineActions:v=!1,sideButtons:l=!1,iconProps:T,avatarProps:h,children:p,...I}=e,O={theme:De.useTheme(),className:r,style:u,size:m,inlineActions:v,sideButtons:l};return j.jsxs(et,{ref:t,...O,...I,children:[j.jsxs("div",{className:"notification-main",children:[d?j.jsx(Se,{sizeInUnits:"2.75rem",...h}):a&&j.jsx(_e,{className:"notification-icon",icon:a,...T}),j.jsxs("div",{className:"notification-content",children:[j.jsx("div",{className:"notification-title",children:n}),p,!v&&!l&&j.jsx("div",{className:"notification-actions",children:s})]})]}),(v||l)&&j.jsx("div",{className:"notification-actions",children:s})]})});xe.propTypes={avatar:P.PropTypes.bool,title:P.PropTypes.string,icon:P.PropTypes.string,actions:P.PropTypes.element,inlineActions:P.PropTypes.bool,sideButtons:P.PropTypes.bool,className:P.PropTypes.string,style:P.PropTypes.object,iconProps:P.PropTypes.any,avatarProps:P.PropTypes.any};const tt=Te.newStyled.div`
48
+ & .lnc-notification {
49
+ & > div {
50
+ background-color: ${e=>S.getColorRgbaValue(e.theme,"Notification",e.color,"enabled","background","backgroundOpacity")};
51
+
52
+ box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.1),
53
+ 0px 4px 6px -2px rgba(0, 0, 0, 0.05);
54
+ border: ${e=>`1px solid ${S.getColorRgbaValue(e.theme,"Notification","default","enabled","border")}`};
55
+ border-radius: ${e=>S.getBorderRadiusValueWithUnits(e.theme,"regular")};
56
+ }
57
+ & .Toastify__close-button {
58
+ & svg {
59
+ fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","default","enabled","icon")};
60
+ }
61
+ }
62
+ & .Toastify__toast--success {
63
+ & svg {
64
+ fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","success","enabled","icon")};
65
+ }
66
+ }
67
+ & .Toastify__toast--information {
68
+ & svg {
69
+ fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","information","enabled","icon")};
70
+ }
71
+ }
72
+ & .Toastify__toast--danger {
73
+ & svg {
74
+ fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","warning","enabled","icon")};
75
+ }
76
+ }
77
+ & .Toastify__toast--error {
78
+ & svg {
79
+ fill: ${e=>S.getColorRgbaValue(e.theme,"Notification","danger","enabled","icon")};
80
+ }
81
+ }
82
+ }
83
+ `,Re=i.forwardRef((e,t)=>{const{position:n="top-right",autoClose:a=5e5,hideProgressBar:r=!0,newestOnTop:u=!0,closeOnClick:m=!0,rtl:d=!1,pauseOnFocusLoss:s=!1,draggable:v=!1,pauseOnHover:l=!1,closeButton:T=!0,className:h="",style:p={},toastContainerProps:I,children:E,...O}=e,{theme:w}=Be.useTheme(),R={theme:w,className:"lnc-ui-notification "+h,style:p};return j.jsx(tt,{ref:t,...R,...O,children:j.jsx(fe,{position:n,autoClose:a,hideProgressBar:r,newestOnTop:u,closeOnClick:m,rtl:d,pauseOnFocusLoss:s,draggable:v,pauseOnHover:l,closeButton:T,className:"lnc-notification",...I})})});Re.propTypes={position:P.PropTypes.oneOf(["top-right","top-center","top-left","bottom-right","bottom-center","bottom-left"]),autoClose:P.PropTypes.number,hideProgressBar:P.PropTypes.bool,newestOnTop:P.PropTypes.bool,closeOnClick:P.PropTypes.bool,rtl:P.PropTypes.bool,pauseOnFocusLoss:P.PropTypes.bool,draggable:P.PropTypes.bool,pauseOnHover:P.PropTypes.bool,closeButton:P.PropTypes.bool,className:P.PropTypes.string,style:P.PropTypes.object,toastContainerProps:P.PropTypes.any};exports.NotificationContainer=Re;exports.NotificationMessage=xe;exports.notification=N;