@lanaco/lnc-react-ui 4.0.199 → 4.0.201

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 (270) hide show
  1. package/dist/Accordion.cjs +5 -5
  2. package/dist/Accordion.js +45 -56
  3. package/dist/AccordionDetails.cjs +3 -3
  4. package/dist/AccordionDetails.js +11 -25
  5. package/dist/AccordionSummary.cjs +4 -4
  6. package/dist/AccordionSummary.js +34 -44
  7. package/dist/ActionsToolbar.cjs +2 -3
  8. package/dist/ActionsToolbar.js +83 -135
  9. package/dist/Alert.cjs +10 -10
  10. package/dist/Alert.js +32 -64
  11. package/dist/Avatar.cjs +9 -9
  12. package/dist/Avatar.js +33 -72
  13. package/dist/Badge.cjs +6 -6
  14. package/dist/Badge.js +22 -47
  15. package/dist/BannerSectionCarousel.cjs +4 -4
  16. package/dist/BannerSectionCarousel.js +51 -542
  17. package/dist/BlogCardsSponsoredSection.cjs +1 -1
  18. package/dist/BlogCardsSponsoredSection.js +1 -1
  19. package/dist/BlogCategoryCardsSection.cjs +1 -1
  20. package/dist/BlogCategoryCardsSection.js +12 -14
  21. package/dist/BlogExploreSection.cjs +1 -1
  22. package/dist/BlogExploreSection.js +1 -1
  23. package/dist/BlogListSection.cjs +1 -1
  24. package/dist/BlogListSection.js +1 -1
  25. package/dist/BlogsSectionDetailed.cjs +1 -1
  26. package/dist/BlogsSectionDetailed.js +1 -1
  27. package/dist/BlogsSectionSimple.cjs +1 -1
  28. package/dist/BlogsSectionSimple.js +1 -1
  29. package/dist/BlogsSectionWithFilters.cjs +1 -1
  30. package/dist/BlogsSectionWithFilters.js +2 -2
  31. package/dist/Breadcrumbs.cjs +5 -5
  32. package/dist/Breadcrumbs.js +57 -87
  33. package/dist/Button.cjs +11 -11
  34. package/dist/Button.js +126 -173
  35. package/dist/ButtonGroup.cjs +8 -8
  36. package/dist/ButtonGroup.js +37 -49
  37. package/dist/CalorieCalculatorSection.cjs +8 -8
  38. package/dist/CalorieCalculatorSection.js +90 -97
  39. package/dist/CheckBoxInput.cjs +1 -1
  40. package/dist/CheckBoxInput.js +2 -5
  41. package/dist/Chip.cjs +14 -14
  42. package/dist/Chip.js +73 -111
  43. package/dist/ConfirmationForm.cjs +6 -6
  44. package/dist/ConfirmationForm.js +67 -109
  45. package/dist/ContactSection.cjs +1 -0
  46. package/dist/ContactSection.js +1 -0
  47. package/dist/Content.cjs +1 -1
  48. package/dist/Content.js +7 -15
  49. package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
  50. package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
  51. package/dist/DataView.cjs +1 -1
  52. package/dist/DataView.js +30 -50
  53. package/dist/DateInput.cjs +4 -4
  54. package/dist/DateInput.js +1347 -1383
  55. package/dist/DecimalInput.cjs +6 -6
  56. package/dist/DecimalInput.js +210 -263
  57. package/dist/DecimalInputV2.cjs +23 -23
  58. package/dist/DecimalInputV2.js +119 -176
  59. package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
  60. package/dist/DetailedProductsInfinitiveSection.js +1 -1
  61. package/dist/DetailedProductsSection.cjs +1 -1
  62. package/dist/DetailedProductsSection.js +2 -2
  63. package/dist/DetailsView.cjs +9 -9
  64. package/dist/DetailsView.js +111 -162
  65. package/dist/DoubleRangeSlider.cjs +22 -22
  66. package/dist/DoubleRangeSlider.js +70 -95
  67. package/dist/DragAndDropFile.cjs +10 -10
  68. package/dist/DragAndDropFile.js +347 -402
  69. package/dist/DragDropFiles.cjs +4 -4
  70. package/dist/DragDropFiles.js +70 -124
  71. package/dist/Drawer.cjs +5 -5
  72. package/dist/Drawer.js +97 -135
  73. package/dist/Dropdown.cjs +1 -1
  74. package/dist/Dropdown.js +44 -213
  75. package/dist/DropdownItem.cjs +14 -14
  76. package/dist/DropdownItem.js +106 -142
  77. package/dist/DropdownLookup.cjs +1 -1
  78. package/dist/DropdownLookup.js +61 -242
  79. package/dist/DropdownMenu.cjs +4 -4
  80. package/dist/DropdownMenu.js +87 -149
  81. package/dist/EditableTable.cjs +10 -10
  82. package/dist/EditableTable.js +165 -331
  83. package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
  84. package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
  85. package/dist/FaqSection.cjs +3 -3
  86. package/dist/FaqSection.js +119 -153
  87. package/dist/FileInput.cjs +7 -7
  88. package/dist/FileInput.js +66 -94
  89. package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
  90. package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
  91. package/dist/FlexBox.cjs +6 -6
  92. package/dist/FlexBox.js +28 -63
  93. package/dist/FlexGrid.cjs +1 -1
  94. package/dist/FlexGrid.js +27 -67
  95. package/dist/FlexGridItem.cjs +6 -6
  96. package/dist/FlexGridItem.js +34 -62
  97. package/dist/Footer.cjs +1 -1
  98. package/dist/Footer.js +7 -15
  99. package/dist/FormField.cjs +7 -7
  100. package/dist/FormField.js +22 -47
  101. package/dist/FormView.cjs +6 -6
  102. package/dist/FormView.js +148 -195
  103. package/dist/GiftCardsSection.cjs +1 -1
  104. package/dist/GiftCardsSection.js +1 -1
  105. package/dist/Grid.cjs +2 -2
  106. package/dist/Grid.js +40 -65
  107. package/dist/GridItem.cjs +2 -2
  108. package/dist/GridItem.js +47 -80
  109. package/dist/Header.cjs +1 -1
  110. package/dist/Header.js +7 -15
  111. package/dist/HelpBannerSection.cjs +3 -3
  112. package/dist/HelpBannerSection.js +9 -15
  113. package/dist/Icon.cjs +4 -4
  114. package/dist/Icon.js +29 -55
  115. package/dist/IconButton.cjs +9 -9
  116. package/dist/IconButton.js +89 -127
  117. package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
  118. package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
  119. package/dist/Kanban.cjs +7 -7
  120. package/dist/Kanban.js +2033 -2098
  121. package/dist/KanbanActionsToolbar.cjs +4 -5
  122. package/dist/KanbanActionsToolbar.js +61 -96
  123. package/dist/KanbanCard-B9V9EjVE.js +137 -0
  124. package/dist/KanbanCard-DihrKn-I.cjs +30 -0
  125. package/dist/KanbanCard.cjs +1 -1
  126. package/dist/KanbanCard.js +2 -3
  127. package/dist/KanbanFooter.cjs +3 -3
  128. package/dist/KanbanFooter.js +37 -55
  129. package/dist/KanbanHeader.cjs +4 -4
  130. package/dist/KanbanHeader.js +49 -81
  131. package/dist/KanbanView.cjs +2 -2
  132. package/dist/KanbanView.js +106 -173
  133. package/dist/Link.cjs +7 -7
  134. package/dist/Link.js +20 -37
  135. package/dist/LocationSearchSection.cjs +1 -1
  136. package/dist/LocationSearchSection.js +1 -1
  137. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  138. package/dist/MasonryGeneralCardsSection.js +1 -1
  139. package/dist/MenuItem.cjs +13 -13
  140. package/dist/MenuItem.js +101 -139
  141. package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
  142. package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
  143. package/dist/Modal.cjs +18 -19
  144. package/dist/Modal.js +131 -166
  145. package/dist/MultiSelectDropdown.cjs +1 -1
  146. package/dist/MultiSelectDropdown.js +25 -196
  147. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  148. package/dist/MultiSelectDropdownLookup.js +27 -209
  149. package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
  150. package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
  151. package/dist/NestedDropdownItem.cjs +3 -3
  152. package/dist/NestedDropdownItem.js +45 -67
  153. package/dist/NestedMenuItem.cjs +5 -5
  154. package/dist/NestedMenuItem.js +51 -78
  155. package/dist/NotificationContainer.cjs +10 -10
  156. package/dist/NotificationContainer.js +46 -79
  157. package/dist/NotificationMessage.cjs +2 -2
  158. package/dist/NotificationMessage.js +47 -64
  159. package/dist/NumberInput.cjs +23 -23
  160. package/dist/NumberInput.js +89 -149
  161. package/dist/PageLayout.cjs +2 -2
  162. package/dist/PageLayout.js +20 -28
  163. package/dist/Pagination.cjs +3 -3
  164. package/dist/Pagination.js +102 -185
  165. package/dist/PartnerBrandsSection.cjs +62 -0
  166. package/dist/PartnerBrandsSection.js +154 -0
  167. package/dist/PartnerStatsSection.cjs +100 -0
  168. package/dist/PartnerStatsSection.js +124 -0
  169. package/dist/PasswordInput.cjs +23 -23
  170. package/dist/PasswordInput.js +108 -137
  171. package/dist/Popover.cjs +1 -1
  172. package/dist/Popover.js +7 -32
  173. package/dist/PopoverContent.cjs +5 -5
  174. package/dist/PopoverContent.js +22 -28
  175. package/dist/PopoverTrigger.cjs +1 -1
  176. package/dist/PopoverTrigger.js +7 -12
  177. package/dist/ProductsWithBannerSection.cjs +1 -1
  178. package/dist/ProductsWithBannerSection.js +1 -1
  179. package/dist/ProgressBar.cjs +8 -8
  180. package/dist/ProgressBar.js +32 -59
  181. package/dist/RadioGroup.cjs +3 -3
  182. package/dist/RadioGroup.js +41 -72
  183. package/dist/RadioInput.cjs +28 -28
  184. package/dist/RadioInput.js +78 -123
  185. package/dist/RangeSlider.cjs +19 -19
  186. package/dist/RangeSlider.js +92 -119
  187. package/dist/ReviewsSection.cjs +13 -13
  188. package/dist/ReviewsSection.js +81 -101
  189. package/dist/SalesCampaignsSection.cjs +38 -28
  190. package/dist/SalesCampaignsSection.js +297 -325
  191. package/dist/SearchBar.cjs +10 -10
  192. package/dist/SearchBar.js +168 -188
  193. package/dist/SearchSection-B94YN_6P.cjs +161 -0
  194. package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
  195. package/dist/SearchSection.cjs +1 -1
  196. package/dist/SearchSection.js +2 -3
  197. package/dist/Separator.cjs +3 -3
  198. package/dist/Separator.js +14 -19
  199. package/dist/Sidebar.cjs +4 -5
  200. package/dist/Sidebar.js +33 -56
  201. package/dist/SimpleCategoriesSection.cjs +2 -2
  202. package/dist/SimpleCategoriesSection.js +2 -2
  203. package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
  204. package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
  205. package/dist/Spinner.cjs +18 -18
  206. package/dist/Spinner.js +37 -54
  207. package/dist/StatsSection.cjs +6 -6
  208. package/dist/StatsSection.js +15 -25
  209. package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
  210. package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
  211. package/dist/Surface.cjs +4 -4
  212. package/dist/Surface.js +19 -34
  213. package/dist/SwipeableDrawer.cjs +8 -8
  214. package/dist/SwipeableDrawer.js +84 -136
  215. package/dist/TabItem.cjs +11 -11
  216. package/dist/TabItem.js +83 -118
  217. package/dist/Table.cjs +65 -65
  218. package/dist/Table.js +786 -1167
  219. package/dist/TableView.cjs +2 -2
  220. package/dist/TableView.js +113 -197
  221. package/dist/Tabs.cjs +4 -4
  222. package/dist/Tabs.js +41 -60
  223. package/dist/TextAreaInput.cjs +14 -14
  224. package/dist/TextAreaInput.js +131 -181
  225. package/dist/TextInput.cjs +23 -23
  226. package/dist/TextInput.js +78 -126
  227. package/dist/ThemeProvider.cjs +5 -5
  228. package/dist/ThemeProvider.js +35 -39
  229. package/dist/TimeInput.cjs +7 -7
  230. package/dist/TimeInput.js +46 -72
  231. package/dist/Toggle.cjs +20 -20
  232. package/dist/Toggle.js +78 -109
  233. package/dist/ToggleSection.cjs +5 -5
  234. package/dist/ToggleSection.js +48 -55
  235. package/dist/TreeMenu.cjs +5 -5
  236. package/dist/TreeMenu.js +43 -67
  237. package/dist/TreeMenuSeparator.cjs +3 -3
  238. package/dist/TreeMenuSeparator.js +12 -20
  239. package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
  240. package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
  241. package/dist/UploadedFile.cjs +11 -11
  242. package/dist/UploadedFile.js +73 -99
  243. package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
  244. package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
  245. package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
  246. package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
  247. package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
  248. package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
  249. package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
  250. package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
  251. package/dist/index-BdKi2ogu.js +39 -0
  252. package/dist/index-BppfjY8h.js +497 -0
  253. package/dist/index-CRk3vcd4.cjs +95 -0
  254. package/dist/index-CX2A-q39.cjs +4 -0
  255. package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
  256. package/dist/index-DeS-oqJB.cjs +1 -0
  257. package/dist/index.cjs +1 -1
  258. package/dist/index.js +25 -21
  259. package/dist/{style-CkcozOY6.cjs → style-B4kAj6YU.cjs} +38 -8
  260. package/dist/{style-Cmlod7oq.js → style-neMbLWE6.js} +42 -11
  261. package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
  262. package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
  263. package/package.json +4 -2
  264. package/vite.config.js +8 -0
  265. package/dist/KanbanCard-68kSAXL6.js +0 -175
  266. package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
  267. package/dist/SearchSection-BcbHP6QF.cjs +0 -161
  268. package/dist/index-Be-_NM9Q.cjs +0 -4
  269. package/dist/index-C0LcDEqa.js +0 -47
  270. package/dist/index-CSNxZFTX.cjs +0 -95
@@ -1,18 +1,17 @@
1
- import { jsx as O } from "react/jsx-runtime";
2
- import { P as o } from "./index-CblbdqjE.js";
3
- import * as y from "react";
4
- import W, { forwardRef as Y, useState as F, useEffect as E, useCallback as q } from "react";
5
- import { d as D } from "./index-Dt62UGku.js";
6
- import { s as X } from "./emotion-styled.browser.esm-BNN1dTl3.js";
7
- import { c as Z, d as J, b as x, a as K, e as Q, h as ee } from "./utils-DtEfC-TX.js";
8
- import { _ as te, u as re } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
9
- import { _ as ne } from "./objectWithoutPropertiesLoose-DhwSMsjf.js";
10
- import { i as ae } from "./use-isomorphic-layout-effect.browser.esm-DERp5kr6.js";
11
- const oe = X.div`
1
+ import { jsx as k } from "react/jsx-runtime";
2
+ import * as x from "react";
3
+ import E, { forwardRef as U, useState as H, useEffect as I, useCallback as G } from "react";
4
+ import { d as Y } from "./index-Dt62UGku.js";
5
+ import { s as q } from "./emotion-styled.browser.esm-BNN1dTl3.js";
6
+ import { c as D, d as X, b as p, a as Z, e as J, h as K } from "./utils-DtEfC-TX.js";
7
+ import { _ as Q, u as ee } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
8
+ import { _ as te } from "./objectWithoutPropertiesLoose-DhwSMsjf.js";
9
+ import { i as re } from "./use-isomorphic-layout-effect.browser.esm-DERp5kr6.js";
10
+ const ne = q.div`
12
11
  & textarea {
13
- ${(e) => Z(e.theme, "Input", e.size, "enabled")}
14
- min-height: ${(e) => J(e.theme, e.size)};
15
- background-color: ${(e) => x(
12
+ ${(e) => D(e.theme, "Input", e.size, "enabled")}
13
+ min-height: ${(e) => X(e.theme, e.size)};
14
+ background-color: ${(e) => p(
16
15
  e.theme,
17
16
  "Input",
18
17
  e.color,
@@ -20,22 +19,22 @@ const oe = X.div`
20
19
  "background"
21
20
  )};
22
21
  border: 1px solid
23
- ${(e) => x(
22
+ ${(e) => p(
24
23
  e.theme,
25
24
  "Input",
26
25
  e.focused === !0 ? "primary" : e.color,
27
26
  e.disabled === !0 ? "disabled" : "enabled",
28
27
  "border"
29
28
  )};
30
- border-radius: ${(e) => K(e.theme, "regular")};
31
- color: ${(e) => x(
29
+ border-radius: ${(e) => Z(e.theme, "regular")};
30
+ color: ${(e) => p(
32
31
  e.theme,
33
32
  "Input",
34
33
  e.focused === !0 ? "primary" : e.color,
35
34
  "enabled",
36
35
  "text"
37
36
  )};
38
- caret-color: ${(e) => x(e.theme, "Input", e.color, "enabled", "caret")};
37
+ caret-color: ${(e) => p(e.theme, "Input", e.color, "enabled", "caret")};
39
38
  overflow: ${(e) => e.collapseOnBlur && e.focused === !1 ? "hidden" : "auto"};
40
39
  transition: height 0.2s ease-out;
41
40
  padding: 0.563rem 0.75rem;
@@ -44,7 +43,7 @@ const oe = X.div`
44
43
  }
45
44
 
46
45
  & textarea::placeholder {
47
- color: ${(e) => x(
46
+ color: ${(e) => p(
48
47
  e.theme,
49
48
  "Input",
50
49
  e.color,
@@ -58,13 +57,13 @@ const oe = X.div`
58
57
  }
59
58
 
60
59
  & textarea:focus {
61
- ${(e) => e.readOnly !== !0 ? Q(e.theme) : "outline: none"}
60
+ ${(e) => e.readOnly !== !0 ? J(e.theme) : "outline: none"}
62
61
  }
63
62
 
64
63
  & textarea:disabled {
65
- /* ${(e) => ee(e.theme)}
64
+ /* ${(e) => K(e.theme)}
66
65
  */
67
- ${(e) => `background-color: ${x(
66
+ ${(e) => `background-color: ${p(
68
67
  e.theme,
69
68
  "Input",
70
69
  e.color,
@@ -72,7 +71,7 @@ const oe = X.div`
72
71
  "background",
73
72
  "backgroundOpacity"
74
73
  )};
75
- color: ${(t) => x(
74
+ color: ${(t) => p(
76
75
  t.theme,
77
76
  "Input",
78
77
  t.color,
@@ -81,9 +80,9 @@ const oe = X.div`
81
80
  )};`}
82
81
  }
83
82
  `;
84
- var ie = function(t) {
85
- var n = W.useRef(t);
86
- return ae(function() {
83
+ var ae = function(t) {
84
+ var n = E.useRef(t);
85
+ return re(function() {
87
86
  n.current = t;
88
87
  }), n;
89
88
  }, B = function(t, n) {
@@ -92,9 +91,9 @@ var ie = function(t) {
92
91
  return;
93
92
  }
94
93
  t.current = n;
95
- }, de = function(t, n) {
96
- var r = W.useRef();
97
- return W.useCallback(function(a) {
94
+ }, oe = function(t, n) {
95
+ var r = E.useRef();
96
+ return E.useCallback(function(a) {
98
97
  t.current = a, r.current && B(r.current, null), r.current = n, n && B(n, a);
99
98
  }, [n]);
100
99
  }, M = {
@@ -108,34 +107,34 @@ var ie = function(t) {
108
107
  top: "0",
109
108
  right: "0",
110
109
  display: "block"
111
- }, ue = function(t) {
110
+ }, ie = function(t) {
112
111
  Object.keys(M).forEach(function(n) {
113
112
  t.style.setProperty(n, M[n], "important");
114
113
  });
115
- }, V = ue, d = null, A = function(t, n) {
114
+ }, O = ie, i = null, A = function(t, n) {
116
115
  var r = t.scrollHeight;
117
116
  return n.sizingStyle.boxSizing === "border-box" ? r + n.borderSize : r - n.paddingSize;
118
117
  };
119
- function se(e, t, n, r) {
120
- n === void 0 && (n = 1), r === void 0 && (r = 1 / 0), d || (d = document.createElement("textarea"), d.setAttribute("tabindex", "-1"), d.setAttribute("aria-hidden", "true"), V(d)), d.parentNode === null && document.body.appendChild(d);
121
- var a = e.paddingSize, m = e.borderSize, s = e.sizingStyle, R = s.boxSizing;
122
- Object.keys(s).forEach(function(f) {
123
- var b = f;
124
- d.style[b] = s[b];
125
- }), V(d), d.value = t;
126
- var i = A(d, e);
127
- d.value = t, i = A(d, e), d.value = "x";
128
- var u = d.scrollHeight - a, l = u * n;
129
- R === "border-box" && (l = l + a + m), i = Math.max(l, i);
130
- var c = u * r;
131
- return R === "border-box" && (c = c + a + m), i = Math.min(c, i), [i, u];
118
+ function de(e, t, n, r) {
119
+ n === void 0 && (n = 1), r === void 0 && (r = 1 / 0), i || (i = document.createElement("textarea"), i.setAttribute("tabindex", "-1"), i.setAttribute("aria-hidden", "true"), O(i)), i.parentNode === null && document.body.appendChild(i);
120
+ var a = e.paddingSize, m = e.borderSize, d = e.sizingStyle, u = d.boxSizing;
121
+ Object.keys(d).forEach(function(f) {
122
+ var S = f;
123
+ i.style[S] = d[S];
124
+ }), O(i), i.value = t;
125
+ var o = A(i, e);
126
+ i.value = t, o = A(i, e), i.value = "x";
127
+ var c = i.scrollHeight - a, s = c * n;
128
+ u === "border-box" && (s = s + a + m), o = Math.max(s, o);
129
+ var g = c * r;
130
+ return u === "border-box" && (g = g + a + m), o = Math.min(g, o), [o, c];
132
131
  }
133
- var _ = function() {
134
- }, le = function(t, n) {
132
+ var V = function() {
133
+ }, ue = function(t, n) {
135
134
  return t.reduce(function(r, a) {
136
135
  return r[a] = n[a], r;
137
136
  }, {});
138
- }, ce = [
137
+ }, se = [
139
138
  "borderBottomWidth",
140
139
  "borderLeftWidth",
141
140
  "borderRightWidth",
@@ -161,26 +160,26 @@ var _ = function() {
161
160
  "wordBreak",
162
161
  "wordSpacing",
163
162
  "scrollbarGutter"
164
- ], fe = !!document.documentElement.currentStyle, he = function(t) {
163
+ ], le = !!document.documentElement.currentStyle, ce = function(t) {
165
164
  var n = window.getComputedStyle(t);
166
165
  if (n === null)
167
166
  return null;
168
- var r = le(ce, n), a = r.boxSizing;
167
+ var r = ue(se, n), a = r.boxSizing;
169
168
  if (a === "")
170
169
  return null;
171
- fe && a === "border-box" && (r.width = parseFloat(r.width) + parseFloat(r.borderRightWidth) + parseFloat(r.borderLeftWidth) + parseFloat(r.paddingRight) + parseFloat(r.paddingLeft) + "px");
172
- var m = parseFloat(r.paddingBottom) + parseFloat(r.paddingTop), s = parseFloat(r.borderBottomWidth) + parseFloat(r.borderTopWidth);
170
+ le && a === "border-box" && (r.width = parseFloat(r.width) + parseFloat(r.borderRightWidth) + parseFloat(r.borderLeftWidth) + parseFloat(r.paddingRight) + parseFloat(r.paddingLeft) + "px");
171
+ var m = parseFloat(r.paddingBottom) + parseFloat(r.paddingTop), d = parseFloat(r.borderBottomWidth) + parseFloat(r.borderTopWidth);
173
172
  return {
174
173
  sizingStyle: r,
175
174
  paddingSize: m,
176
- borderSize: s
175
+ borderSize: d
177
176
  };
178
- }, ge = he;
179
- function k(e, t, n) {
180
- var r = ie(n);
181
- y.useLayoutEffect(function() {
182
- var a = function(s) {
183
- return r.current(s);
177
+ }, fe = ce;
178
+ function W(e, t, n) {
179
+ var r = ae(n);
180
+ x.useLayoutEffect(function() {
181
+ var a = function(d) {
182
+ return r.current(d);
184
183
  };
185
184
  if (e)
186
185
  return e.addEventListener(t, a), function() {
@@ -188,161 +187,112 @@ function k(e, t, n) {
188
187
  };
189
188
  }, []);
190
189
  }
191
- var me = function(t, n) {
192
- k(document.body, "reset", function(r) {
190
+ var he = function(t, n) {
191
+ W(document.body, "reset", function(r) {
193
192
  t.current.form === r.target && n(r);
194
193
  });
195
- }, be = function(t) {
196
- k(window, "resize", t);
197
- }, ve = function(t) {
198
- k(document.fonts, "loadingdone", t);
199
- }, pe = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], xe = function(t, n) {
200
- var r = t.cacheMeasurements, a = t.maxRows, m = t.minRows, s = t.onChange, R = s === void 0 ? _ : s, i = t.onHeightChange, u = i === void 0 ? _ : i, l = ne(t, pe), c = l.value !== void 0, f = y.useRef(null), b = de(f, n), L = y.useRef(0), z = y.useRef(), p = function() {
201
- var h = f.current, S = r && z.current ? z.current : ge(h);
202
- if (S) {
203
- z.current = S;
204
- var T = se(S, h.value || h.placeholder || "x", m, a), v = T[0], H = T[1];
205
- L.current !== v && (L.current = v, h.style.setProperty("height", v + "px", "important"), u(v, {
206
- rowHeight: H
194
+ }, ge = function(t) {
195
+ W(window, "resize", t);
196
+ }, me = function(t) {
197
+ W(document.fonts, "loadingdone", t);
198
+ }, ve = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], be = function(t, n) {
199
+ var r = t.cacheMeasurements, a = t.maxRows, m = t.minRows, d = t.onChange, u = d === void 0 ? V : d, o = t.onHeightChange, c = o === void 0 ? V : o, s = te(t, ve), g = s.value !== void 0, f = x.useRef(null), S = oe(f, n), L = x.useRef(0), R = x.useRef(), v = function() {
200
+ var l = f.current, w = r && R.current ? R.current : fe(l);
201
+ if (w) {
202
+ R.current = w;
203
+ var y = de(w, l.value || l.placeholder || "x", m, a), b = y[0], $ = y[1];
204
+ L.current !== b && (L.current = b, l.style.setProperty("height", b + "px", "important"), c(b, {
205
+ rowHeight: $
207
206
  }));
208
207
  }
209
- }, I = function(h) {
210
- c || p(), R(h);
208
+ }, T = function(l) {
209
+ g || v(), u(l);
211
210
  };
212
- return y.useLayoutEffect(p), me(f, function() {
213
- if (!c) {
214
- var w = f.current.value;
211
+ return x.useLayoutEffect(v), he(f, function() {
212
+ if (!g) {
213
+ var z = f.current.value;
215
214
  requestAnimationFrame(function() {
216
- var h = f.current;
217
- h && w !== h.value && p();
215
+ var l = f.current;
216
+ l && z !== l.value && v();
218
217
  });
219
218
  }
220
- }), be(p), ve(p), /* @__PURE__ */ y.createElement("textarea", te({}, l, {
221
- onChange: I,
222
- ref: b
219
+ }), ge(v), me(v), /* @__PURE__ */ x.createElement("textarea", Q({}, s, {
220
+ onChange: T,
221
+ ref: S
223
222
  }));
224
- }, ye = /* @__PURE__ */ y.forwardRef(xe);
225
- const Se = Y((e, t) => {
223
+ }, pe = /* @__PURE__ */ x.forwardRef(be);
224
+ const Fe = U((e, t) => {
226
225
  const {
227
226
  disabled: n,
228
227
  readOnly: r,
229
228
  value: a,
230
229
  defaultValue: m,
231
- debounceTime: s = 0,
232
- type: R = "textarea",
233
- collapseOnBlur: i = !1,
234
- minRows: u = 0,
235
- maxRows: l,
230
+ debounceTime: d = 0,
231
+ collapseOnBlur: u = !1,
232
+ minRows: o = 0,
233
+ maxRows: c,
236
234
  //----------------
237
- onChange: c,
238
- onBlur: f,
239
- onFocus: b,
235
+ onChange: s,
236
+ onBlur: g,
237
+ onFocus: f,
240
238
  //----------------
241
- className: L = "",
242
- style: z = {},
243
- size: p = "small",
244
- color: I = "primary",
245
- ...w
246
- } = e, [h, S] = F(a || m || ""), T = re(), [v, H] = F(!1), [N, j] = F(u), [P, C] = F(
247
- i ? u : l
239
+ className: S = "",
240
+ style: L = {},
241
+ size: R = "small",
242
+ color: v = "primary",
243
+ ...T
244
+ } = e, [z, l] = H(a || m || ""), w = ee(), [y, b] = H(!1), [$, _] = H(o), [N, C] = H(
245
+ u ? o : c
248
246
  );
249
- E(() => {
250
- a != null && S(a);
251
- }, [a]), E(() => {
252
- j(u), i && v === !1 && C(u);
253
- }, [u, l]), E(() => {
254
- C(i ? v === !0 ? l : u : l);
255
- }, [i]);
256
- const U = q(
257
- D((g, $) => G(g, $), s),
258
- [c]
259
- ), G = (g, $) => {
260
- c && (c == null || c(g, $));
247
+ I(() => {
248
+ a != null && l(a);
249
+ }, [a]), I(() => {
250
+ _(o), u && y === !1 && C(o);
251
+ }, [o, c]), I(() => {
252
+ C(u ? y === !0 ? c : o : c);
253
+ }, [u]);
254
+ const j = G(
255
+ Y((h, F) => P(h, F), d),
256
+ [s]
257
+ ), P = (h, F) => {
258
+ s && (s == null || s(h, F));
261
259
  };
262
- return /* @__PURE__ */ O(
263
- oe,
260
+ return /* @__PURE__ */ k(
261
+ ne,
264
262
  {
265
- style: z,
266
- className: L,
267
- theme: T,
268
- color: I,
269
- size: p,
270
- focused: v,
263
+ style: L,
264
+ className: S,
265
+ theme: w,
266
+ color: v,
267
+ size: R,
268
+ focused: y,
271
269
  disabled: n,
272
270
  readOnly: r,
273
- collapseOnBlur: i,
274
- children: /* @__PURE__ */ O(
275
- ye,
271
+ collapseOnBlur: u,
272
+ children: /* @__PURE__ */ k(
273
+ pe,
276
274
  {
277
275
  ref: t,
278
276
  disabled: n,
279
- value: h,
277
+ value: z,
280
278
  readOnly: r,
281
- minRows: N,
282
- maxRows: P,
283
- onChange: (g) => {
284
- S(g.target.value), U(g, g.target.value);
279
+ minRows: $,
280
+ maxRows: N,
281
+ onChange: (h) => {
282
+ l(h.target.value), j(h, h.target.value);
285
283
  },
286
- onFocus: (g) => {
287
- H(!0), i && C(l), b == null || b(g);
284
+ onFocus: (h) => {
285
+ b(!0), u && C(c), f == null || f(h);
288
286
  },
289
- onBlur: (g) => {
290
- H(!1), i && C(u), f == null || f(g);
287
+ onBlur: (h) => {
288
+ b(!1), u && C(o), g == null || g(h);
291
289
  },
292
- ...w
290
+ ...T
293
291
  }
294
292
  )
295
293
  }
296
294
  );
297
295
  });
298
- Se.propTypes = {
299
- id: o.any,
300
- defaultValue: o.string,
301
- value: o.string,
302
- disabled: o.bool,
303
- readOnly: o.bool,
304
- debounceTime: o.number,
305
- placeholder: o.string,
306
- tabIndex: o.number,
307
- /**
308
- * Defines whether the textarea will collapse to its original size after it loses focus.
309
- */
310
- collapseOnBlur: o.bool,
311
- /**
312
- * Minimum number of rows to show.
313
- */
314
- minRows: o.number,
315
- /**
316
- * Maximum number of rows to be shown before scroller appears.
317
- */
318
- maxRows: o.number,
319
- /**
320
- * `(event, value) => void`
321
- */
322
- onChange: o.func,
323
- /**
324
- * `(event) => void`
325
- */
326
- onBlur: o.func,
327
- /**
328
- * `(event) => void`
329
- */
330
- onFocus: o.func,
331
- //----------------
332
- className: o.string,
333
- style: o.object,
334
- size: o.oneOf(["small", "medium", "large"]),
335
- color: o.oneOf([
336
- "primary",
337
- "secondary",
338
- "success",
339
- "danger",
340
- "warning",
341
- "information",
342
- "neutral",
343
- "gray"
344
- ])
345
- };
346
296
  export {
347
- Se as default
297
+ Fe as default
348
298
  };
@@ -1,22 +1,22 @@
1
- "use strict";const g=require("react/jsx-runtime"),t=require("./index-BpbMKBf_.cjs"),a=require("react"),B=require("./index-Cp66dWMi.cjs"),b=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./utils-RnrgDDZP.cjs"),D=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),E=b.styled.div`
1
+ "use strict";const s=require("react/jsx-runtime"),o=require("react"),N=require("./index-Cp66dWMi.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),B=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),D=g.styled.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
 
5
- min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
6
- max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
7
- background-color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
5
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
6
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
7
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
8
8
  border: 1px solid
9
- ${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
10
- border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"regular")};
9
+ ${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
10
+ border-radius: ${e=>t.getBorderRadiusValueWithUnits(e.theme,"regular")};
11
11
 
12
- ${e=>e.focused&&e.readOnly!==!0?o.getOutlineCss(e.theme):""}
13
- /* ${e=>e.disabled===!0?o.getDisabledStateCss(e.theme):""} */
14
- ${e=>e.disabled===!0?`background-color: ${o.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
15
- color: ${n=>o.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`:""}
16
- `,I=b.styled.span`
12
+ ${e=>e.focused&&e.readOnly!==!0?t.getOutlineCss(e.theme):""}
13
+ /* ${e=>e.disabled===!0?t.getDisabledStateCss(e.theme):""} */
14
+ ${e=>e.disabled===!0?`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
15
+ color: ${a=>t.getColorRgbaValue(a.theme,"Input",a.color,"disabled","text")};`:""}
16
+ `,S=g.styled.span`
17
17
  padding: 0 12px;
18
- color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
19
- `,A=b.styled(I)``,G=b.styled.input`
18
+ color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","prefix")};
19
+ `,E=g.styled(S)``,P=g.styled.input`
20
20
  background: none;
21
21
  border: none;
22
22
  outline: none;
@@ -24,16 +24,16 @@
24
24
  padding-bottom: 0.625rem;
25
25
  width: 100%;
26
26
 
27
- ${e=>o.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
28
- min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
29
- max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
30
- color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
31
- caret-color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
27
+ ${e=>t.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
28
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
29
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
30
+ color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
31
+ caret-color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
32
32
  padding-right: ${e=>e.suffix?"0":"0.75rem"};
33
33
  padding-left: ${e=>e.prefix?"0":"0.75rem"};
34
34
 
35
35
  &::placeholder {
36
- color: ${e=>o.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
36
+ color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
37
37
  }
38
38
 
39
39
  &:read-only {
@@ -41,9 +41,9 @@
41
41
  }
42
42
 
43
43
  &:disabled {
44
- /* ${e=>o.getDisabledStateCss(e.theme)} */
45
- ${e=>`background-color: ${o.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
46
- color: ${n=>o.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`}
44
+ /* ${e=>t.getDisabledStateCss(e.theme)} */
45
+ ${e=>`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
46
+ color: ${a=>t.getColorRgbaValue(a.theme,"Input",a.color,"disabled","text")};`}
47
47
  background: none;
48
48
  }
49
- `,R=a.forwardRef((e,n)=>{const{disabled:x,readOnly:T,defaultValue:$,value:l,debounceTime:S=0,type:O="text",placeholder:k,tabIndex:z,prefix:m,suffix:p,onChange:s,onBlur:y,onFocus:h,className:q="",style:v={},size:P="small",color:u="primary",...j}=e,i=D.useTheme(),d=a.useRef(l||$||""),[W,V]=a.useState(l||$||""),[c,C]=a.useState(!1);a.useEffect(()=>{l!=null&&(d.current=l,V(d.current))},[l]);const w=a.useCallback(B.debounce((r,f)=>U(r,f),S),[s]),U=(r,f)=>{s&&(s==null||s(r,f))},F=r=>{d.current=r.target.value,V(d.current),w(r,r.target.value)},N=r=>{C(!0),h==null||h(r)},_=r=>{C(!1),y==null||y(r)};return g.jsxs(E,{style:v,className:q,theme:i,color:u,size:P,focused:c,disabled:x,readOnly:T,children:[m&&g.jsx(I,{theme:i,color:u,focused:c,className:"lnc-input-prefix",children:m}),g.jsx(G,{ref:n,type:O,theme:i,color:u,size:P,placeholder:k,prefix:m,suffix:p,disabled:x,readOnly:T,focused:c,onFocus:N,onBlur:_,onChange:F,tabIndex:z,value:W,...j}),p&&g.jsx(A,{theme:i,color:u,focused:c,className:"lnc-input-suffix",children:p})]})});R.propTypes={id:t.PropTypes.any,defaultValue:t.PropTypes.string,value:t.PropTypes.string,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,debounceTime:t.PropTypes.number,placeholder:t.PropTypes.string,type:t.PropTypes.oneOf(["text","email"]),tabIndex:t.PropTypes.number,prefix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),suffix:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=R;
49
+ `,A=o.forwardRef((e,a)=>{const{disabled:y,readOnly:$,defaultValue:V,value:n,debounceTime:k=0,type:z="text",placeholder:q,tabIndex:v,prefix:b,suffix:h,onChange:r,onBlur:m,onFocus:f,className:O="",style:W={},size:C="small",color:u="primary",...j}=e,d=B.useTheme(),i=o.useRef(n||V||""),[U,R]=o.useState(n||V||""),[c,I]=o.useState(!1);o.useEffect(()=>{n!=null&&(i.current=n,R(i.current))},[n]);const w=o.useCallback(N.debounce((l,x)=>T(l,x),k),[r]),T=(l,x)=>{r&&(r==null||r(l,x))},_=l=>{i.current=l.target.value,R(i.current),w(l,l.target.value)},p=l=>{I(!0),f==null||f(l)},F=l=>{I(!1),m==null||m(l)};return s.jsxs(D,{style:W,className:O,theme:d,color:u,size:C,focused:c,disabled:y,readOnly:$,children:[b&&s.jsx(S,{theme:d,color:u,focused:c,className:"lnc-input-prefix",children:b}),s.jsx(P,{ref:a,type:z,theme:d,color:u,size:C,placeholder:q,prefix:b,suffix:h,disabled:y,readOnly:$,focused:c,onFocus:p,onBlur:F,onChange:_,tabIndex:v,value:U,...j}),h&&s.jsx(E,{theme:d,color:u,focused:c,className:"lnc-input-suffix",children:h})]})});module.exports=A;