@lanaco/lnc-react-ui 4.0.199 → 4.0.200

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 (247) 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/BlogCategoryCardsSection.cjs +1 -1
  16. package/dist/BlogCategoryCardsSection.js +12 -14
  17. package/dist/BlogExploreSection.cjs +1 -1
  18. package/dist/BlogExploreSection.js +1 -1
  19. package/dist/BlogsSectionWithFilters.cjs +1 -1
  20. package/dist/BlogsSectionWithFilters.js +1 -1
  21. package/dist/Breadcrumbs.cjs +5 -5
  22. package/dist/Breadcrumbs.js +57 -87
  23. package/dist/Button.cjs +11 -11
  24. package/dist/Button.js +126 -173
  25. package/dist/ButtonGroup.cjs +8 -8
  26. package/dist/ButtonGroup.js +37 -49
  27. package/dist/CalorieCalculatorSection.cjs +8 -8
  28. package/dist/CalorieCalculatorSection.js +90 -97
  29. package/dist/CheckBoxInput.cjs +1 -1
  30. package/dist/CheckBoxInput.js +2 -5
  31. package/dist/Chip.cjs +14 -14
  32. package/dist/Chip.js +73 -111
  33. package/dist/ConfirmationForm.cjs +6 -6
  34. package/dist/ConfirmationForm.js +67 -109
  35. package/dist/ContactSection.cjs +1 -0
  36. package/dist/ContactSection.js +1 -0
  37. package/dist/Content.cjs +1 -1
  38. package/dist/Content.js +7 -15
  39. package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
  40. package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
  41. package/dist/DataView.cjs +1 -1
  42. package/dist/DataView.js +30 -50
  43. package/dist/DateInput.cjs +4 -4
  44. package/dist/DateInput.js +1347 -1383
  45. package/dist/DecimalInput.cjs +6 -6
  46. package/dist/DecimalInput.js +210 -263
  47. package/dist/DecimalInputV2.cjs +23 -23
  48. package/dist/DecimalInputV2.js +119 -176
  49. package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
  50. package/dist/DetailedProductsInfinitiveSection.js +1 -1
  51. package/dist/DetailedProductsSection.cjs +1 -1
  52. package/dist/DetailedProductsSection.js +1 -1
  53. package/dist/DetailsView.cjs +9 -9
  54. package/dist/DetailsView.js +111 -162
  55. package/dist/DoubleRangeSlider.cjs +22 -22
  56. package/dist/DoubleRangeSlider.js +70 -95
  57. package/dist/DragAndDropFile.cjs +10 -10
  58. package/dist/DragAndDropFile.js +347 -402
  59. package/dist/DragDropFiles.cjs +4 -4
  60. package/dist/DragDropFiles.js +70 -124
  61. package/dist/Drawer.cjs +5 -5
  62. package/dist/Drawer.js +97 -135
  63. package/dist/Dropdown.cjs +1 -1
  64. package/dist/Dropdown.js +44 -213
  65. package/dist/DropdownItem.cjs +14 -14
  66. package/dist/DropdownItem.js +106 -142
  67. package/dist/DropdownLookup.cjs +1 -1
  68. package/dist/DropdownLookup.js +61 -242
  69. package/dist/DropdownMenu.cjs +4 -4
  70. package/dist/DropdownMenu.js +87 -149
  71. package/dist/EditableTable.cjs +10 -10
  72. package/dist/EditableTable.js +165 -331
  73. package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
  74. package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
  75. package/dist/FaqSection.cjs +3 -3
  76. package/dist/FaqSection.js +119 -153
  77. package/dist/FileInput.cjs +7 -7
  78. package/dist/FileInput.js +66 -94
  79. package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
  80. package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
  81. package/dist/FlexBox.cjs +6 -6
  82. package/dist/FlexBox.js +28 -63
  83. package/dist/FlexGrid.cjs +1 -1
  84. package/dist/FlexGrid.js +27 -67
  85. package/dist/FlexGridItem.cjs +6 -6
  86. package/dist/FlexGridItem.js +34 -62
  87. package/dist/Footer.cjs +1 -1
  88. package/dist/Footer.js +7 -15
  89. package/dist/FormField.cjs +7 -7
  90. package/dist/FormField.js +22 -47
  91. package/dist/FormView.cjs +6 -6
  92. package/dist/FormView.js +148 -195
  93. package/dist/Grid.cjs +2 -2
  94. package/dist/Grid.js +40 -65
  95. package/dist/GridItem.cjs +2 -2
  96. package/dist/GridItem.js +47 -80
  97. package/dist/Header.cjs +1 -1
  98. package/dist/Header.js +7 -15
  99. package/dist/HelpBannerSection.cjs +3 -3
  100. package/dist/HelpBannerSection.js +9 -15
  101. package/dist/Icon.cjs +4 -4
  102. package/dist/Icon.js +29 -55
  103. package/dist/IconButton.cjs +9 -9
  104. package/dist/IconButton.js +89 -127
  105. package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
  106. package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
  107. package/dist/Kanban.cjs +7 -7
  108. package/dist/Kanban.js +2033 -2098
  109. package/dist/KanbanActionsToolbar.cjs +4 -5
  110. package/dist/KanbanActionsToolbar.js +61 -96
  111. package/dist/KanbanCard-B9V9EjVE.js +137 -0
  112. package/dist/KanbanCard-DihrKn-I.cjs +30 -0
  113. package/dist/KanbanCard.cjs +1 -1
  114. package/dist/KanbanCard.js +2 -3
  115. package/dist/KanbanFooter.cjs +3 -3
  116. package/dist/KanbanFooter.js +37 -55
  117. package/dist/KanbanHeader.cjs +4 -4
  118. package/dist/KanbanHeader.js +49 -81
  119. package/dist/KanbanView.cjs +2 -2
  120. package/dist/KanbanView.js +106 -173
  121. package/dist/Link.cjs +7 -7
  122. package/dist/Link.js +20 -37
  123. package/dist/LocationSearchSection.cjs +1 -1
  124. package/dist/LocationSearchSection.js +1 -1
  125. package/dist/MasonryGeneralCardsSection.cjs +1 -1
  126. package/dist/MasonryGeneralCardsSection.js +1 -1
  127. package/dist/MenuItem.cjs +13 -13
  128. package/dist/MenuItem.js +101 -139
  129. package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
  130. package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
  131. package/dist/Modal.cjs +18 -19
  132. package/dist/Modal.js +131 -166
  133. package/dist/MultiSelectDropdown.cjs +1 -1
  134. package/dist/MultiSelectDropdown.js +25 -196
  135. package/dist/MultiSelectDropdownLookup.cjs +1 -1
  136. package/dist/MultiSelectDropdownLookup.js +27 -209
  137. package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
  138. package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
  139. package/dist/NestedDropdownItem.cjs +3 -3
  140. package/dist/NestedDropdownItem.js +45 -67
  141. package/dist/NestedMenuItem.cjs +5 -5
  142. package/dist/NestedMenuItem.js +51 -78
  143. package/dist/NotificationContainer.cjs +10 -10
  144. package/dist/NotificationContainer.js +46 -79
  145. package/dist/NotificationMessage.cjs +2 -2
  146. package/dist/NotificationMessage.js +47 -64
  147. package/dist/NumberInput.cjs +23 -23
  148. package/dist/NumberInput.js +89 -149
  149. package/dist/PageLayout.cjs +2 -2
  150. package/dist/PageLayout.js +20 -28
  151. package/dist/Pagination.cjs +3 -3
  152. package/dist/Pagination.js +102 -185
  153. package/dist/PasswordInput.cjs +23 -23
  154. package/dist/PasswordInput.js +108 -137
  155. package/dist/Popover.cjs +1 -1
  156. package/dist/Popover.js +7 -32
  157. package/dist/PopoverContent.cjs +5 -5
  158. package/dist/PopoverContent.js +22 -28
  159. package/dist/PopoverTrigger.cjs +1 -1
  160. package/dist/PopoverTrigger.js +7 -12
  161. package/dist/ProgressBar.cjs +8 -8
  162. package/dist/ProgressBar.js +32 -59
  163. package/dist/RadioGroup.cjs +3 -3
  164. package/dist/RadioGroup.js +41 -72
  165. package/dist/RadioInput.cjs +28 -28
  166. package/dist/RadioInput.js +78 -123
  167. package/dist/RangeSlider.cjs +19 -19
  168. package/dist/RangeSlider.js +92 -119
  169. package/dist/ReviewsSection.cjs +13 -13
  170. package/dist/ReviewsSection.js +81 -101
  171. package/dist/SalesCampaignsSection.cjs +19 -19
  172. package/dist/SalesCampaignsSection.js +283 -324
  173. package/dist/SearchBar.cjs +10 -10
  174. package/dist/SearchBar.js +168 -188
  175. package/dist/SearchSection-B94YN_6P.cjs +161 -0
  176. package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
  177. package/dist/SearchSection.cjs +1 -1
  178. package/dist/SearchSection.js +2 -3
  179. package/dist/Separator.cjs +3 -3
  180. package/dist/Separator.js +14 -19
  181. package/dist/Sidebar.cjs +4 -5
  182. package/dist/Sidebar.js +33 -56
  183. package/dist/SimpleCategoriesSection.cjs +1 -1
  184. package/dist/SimpleCategoriesSection.js +1 -1
  185. package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
  186. package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
  187. package/dist/Spinner.cjs +18 -18
  188. package/dist/Spinner.js +37 -54
  189. package/dist/StatsSection.cjs +6 -6
  190. package/dist/StatsSection.js +15 -25
  191. package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
  192. package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
  193. package/dist/Surface.cjs +4 -4
  194. package/dist/Surface.js +19 -34
  195. package/dist/SwipeableDrawer.cjs +8 -8
  196. package/dist/SwipeableDrawer.js +84 -136
  197. package/dist/TabItem.cjs +11 -11
  198. package/dist/TabItem.js +83 -118
  199. package/dist/Table.cjs +65 -65
  200. package/dist/Table.js +786 -1167
  201. package/dist/TableView.cjs +2 -2
  202. package/dist/TableView.js +113 -197
  203. package/dist/Tabs.cjs +4 -4
  204. package/dist/Tabs.js +41 -60
  205. package/dist/TextAreaInput.cjs +14 -14
  206. package/dist/TextAreaInput.js +131 -181
  207. package/dist/TextInput.cjs +23 -23
  208. package/dist/TextInput.js +78 -126
  209. package/dist/ThemeProvider.cjs +5 -5
  210. package/dist/ThemeProvider.js +35 -39
  211. package/dist/TimeInput.cjs +7 -7
  212. package/dist/TimeInput.js +46 -72
  213. package/dist/Toggle.cjs +20 -20
  214. package/dist/Toggle.js +78 -109
  215. package/dist/ToggleSection.cjs +5 -5
  216. package/dist/ToggleSection.js +48 -55
  217. package/dist/TreeMenu.cjs +5 -5
  218. package/dist/TreeMenu.js +43 -67
  219. package/dist/TreeMenuSeparator.cjs +3 -3
  220. package/dist/TreeMenuSeparator.js +12 -20
  221. package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
  222. package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
  223. package/dist/UploadedFile.cjs +11 -11
  224. package/dist/UploadedFile.js +73 -99
  225. package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
  226. package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
  227. package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
  228. package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
  229. package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
  230. package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
  231. package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
  232. package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
  233. package/dist/index-BdKi2ogu.js +39 -0
  234. package/dist/index-CRk3vcd4.cjs +95 -0
  235. package/dist/index-CX2A-q39.cjs +4 -0
  236. package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
  237. package/dist/index.cjs +1 -1
  238. package/dist/index.js +2 -2
  239. package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
  240. package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
  241. package/package.json +1 -1
  242. package/dist/KanbanCard-68kSAXL6.js +0 -175
  243. package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
  244. package/dist/SearchSection-BcbHP6QF.cjs +0 -161
  245. package/dist/index-Be-_NM9Q.cjs +0 -4
  246. package/dist/index-C0LcDEqa.js +0 -47
  247. package/dist/index-CSNxZFTX.cjs +0 -95
@@ -1,8 +1,8 @@
1
- "use strict";const b=require("react/jsx-runtime"),g=require("react"),e=require("./index-BpbMKBf_.cjs"),ne=require("./emotion-styled.browser.esm-BtEseadx.cjs"),re=require("./ActionsToolbar.cjs"),te=require("./Pagination.cjs"),T=require("./utils-RnrgDDZP.cjs"),le=require("./Table.cjs"),se=ne.styled.div`
1
+ "use strict";const N=require("react/jsx-runtime"),S=require("react"),ne=require("./emotion-styled.browser.esm-BtEseadx.cjs"),te=require("./ActionsToolbar.cjs"),ce=require("./Pagination.cjs"),d=require("./utils-RnrgDDZP.cjs"),le=require("./Table.cjs"),re=ne.styled.div`
2
2
  & .table-view-pagination-lnc {
3
3
  padding: 0 0.625rem;
4
4
  }
5
5
  & .table-view-toolbar-lnc {
6
6
  margin: 0 0.625rem;
7
7
  }
8
- `,h=g.forwardRef((z,E)=>{const{__TYPE__:ce="TABLE_VIEW",goToPreviousView:ie,tableProps:o={},paginationProps:n={},actionsToolbarProps:D={},rowsSingleSelect:w=!0,rowsMultiSelect:d=!1,loading:ae=!1,showCreate:N=!0,enableCreate:P=!0,enableDetails:ue=!0,showEdit:O,enableEditOnSelection:f,showDelete:_=!0,enableDeleteOnSelection:x=!0,showCopy:A=!0,enableCopyOnSelection:j=!0,customActions:v,pagination:q=!0,readOnly:S=!1,actionsDropdownZIndex:k=null,actionsDropdownPlacement:I=null,actionDropdownProps:L,onCreate:V=()=>{},onEdit:B=()=>{},onDelete:F=()=>{},onDetails:M=()=>{},onCopy:W=()=>{},onFilter:ye=()=>{},onSort:pe=()=>{},onPageChange:Y=()=>{},onEmptyRowsSelection:Te=()=>{},className:de="",style:me={},color:a="primary",size:u="small",children:y,onChangeRowsSelection:p=()=>{},...Z}=z,r={...D,showCreate:N,enableCreate:P,showCopy:A,enableCopyOnSelection:j,showEdit:O,enableEditOnSelection:f,showDelete:_,enableDeleteOnSelection:x,customActions:v,readOnly:S},[c,m]=g.useState([]),t=g.useRef([]),G=(l,s)=>{var i;s?(d||w)&&(t.current=d?[...t.current,l]:[l],p(t==null?void 0:t.current),m(t==null?void 0:t.current)):(t.current=d?(i=t==null?void 0:t.current)==null?void 0:i.filter(C=>C!=l):[],p==null||p(t==null?void 0:t.current),m(t==null?void 0:t.current))},H=(l,s)=>{var i,C;((i=l.target)==null?void 0:i.type)!=="checkbox"&&((C=l.target)==null?void 0:C.className)!=="checkmark"&&(o!=null&&o.onRowClick&&o.onRowClick(l,s),J(s,l))},J=(l,s)=>{M(l,s)},K=l=>{V(l)},Q=l=>{W(c,l)},U=l=>{B(c,l),t.current=[],m([]),p([])},X=l=>{F(c,l),t.current=[],m([]),p([])},$=l=>{Y(l)},R=()=>T.renderCustomElement(T.getCustomRender("ACTIONS_TOOLBAR",y),{...r,size:r!=null&&r.size?r.size:u,color:r!=null&&r.color?r.color:a,className:"table-view-toolbar-lnc "+(r==null?void 0:r.className)},y)||b.jsx(re,{...r,className:"table-view-toolbar-lnc "+(r==null?void 0:r.className),size:r!=null&&r.size?r.size:u,color:r!=null&&r.color?r.color:a,selectedRowsLength:c!=null&&c.length?c.length:0,onCreate:K,onCopy:Q,onEdit:U,onDelete:X,actionsDropdownZIndex:k,actionDropdownProps:L,actionsDropdownPlacement:I,selectedRows:t==null?void 0:t.current}),ee=()=>T.renderCustomElement(T.getCustomRender("TABLE",y),{...o,size:o!=null&&o.size?o.size:u,color:o!=null&&o.color?o.color:a,className:"table-view-pagination-lnc "+(o==null?void 0:o.className)},y)||b.jsx(le.default,{size:o!=null&&o.size?o.size:u,color:o!=null&&o.color?o.color:a,EnableSelection:(w||d)&&S==!1,onSelectRow:(l,s,i)=>G(s,!i),SelectedData:c,onRowClick:(l,s)=>H(l,s),...o}),oe=()=>T.renderCustomElement(T.getCustomRender("PAGINATION",y),{...n,size:n!=null&&n.size?n.size:u,color:n!=null&&n.color?n.color:a,className:"table-view-pagination-lnc "+(n==null?void 0:n.className)},y)||b.jsx(te,{...n,size:n!=null&&n.size?n.size:u,color:n!=null&&n.color?n.color:a,className:"table-view-pagination-lnc "+(n==null?void 0:n.className),onPageChange:$});return b.jsxs(se,{ref:E,...Z,children:[R(),ee(),q==!0&&oe()]})});h.propTypes={__TYPE__:e.PropTypes.string,tableProps:e.PropTypes.object,actionsToolbarProps:e.PropTypes.object,paginationProps:e.PropTypes.object,rowsSingleSelect:e.PropTypes.bool,rowsMultiSelect:e.PropTypes.bool,loading:e.PropTypes.bool,showCreate:e.PropTypes.bool,actionsDropdownZIndex:e.PropTypes.any,actionsDropdownPlacement:e.PropTypes.any,enableCreate:e.PropTypes.bool,enableDetails:e.PropTypes.bool,showEdit:e.PropTypes.bool,enableEditOnSelection:e.PropTypes.bool,showDelete:e.PropTypes.bool,enableDeleteOnSelection:e.PropTypes.bool,showCopy:e.PropTypes.bool,enableCopyOnSelection:e.PropTypes.bool,customActions:e.PropTypes.array,pagination:e.PropTypes.bool,readOnly:e.PropTypes.bool,onCreate:e.PropTypes.func,onEdit:e.PropTypes.func,onDelete:e.PropTypes.func,onDetails:e.PropTypes.func,onCopy:e.PropTypes.func,onFilter:e.PropTypes.func,onSort:e.PropTypes.func,onPageChange:e.PropTypes.func,className:e.PropTypes.string,style:e.PropTypes.object,size:e.PropTypes.oneOf(["small","medium","large"]),color:e.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};h.displayName="TABLE_VIEW";module.exports=h;
8
+ `,y=S.forwardRef((E,T)=>{const{tableProps:e={},paginationProps:n={},actionsToolbarProps:D={},rowsSingleSelect:w=!0,rowsMultiSelect:C=!1,showCreate:v=!0,enableCreate:x=!0,showEdit:A,enableEditOnSelection:O,showDelete:k=!0,enableDeleteOnSelection:q=!0,showCopy:j=!0,enableCopyOnSelection:I=!0,customActions:L,pagination:_=!0,readOnly:g=!1,actionsDropdownZIndex:B=null,actionsDropdownPlacement:V=null,actionDropdownProps:b,onCreate:f=()=>{},onEdit:G=()=>{},onDelete:M=()=>{},onDetails:W=()=>{},onCopy:Z=()=>{},onPageChange:F=()=>{},color:s="primary",size:a="small",children:u,onChangeRowsSelection:m=()=>{},...H}=E,t={...D,showCreate:v,enableCreate:x,showCopy:j,enableCopyOnSelection:I,showEdit:A,enableEditOnSelection:O,showDelete:k,enableDeleteOnSelection:q,customActions:L,readOnly:g},[i,h]=S.useState([]),c=S.useRef([]),J=(l,r)=>{var o;r?(C||w)&&(c.current=C?[...c.current,l]:[l],m(c==null?void 0:c.current),h(c==null?void 0:c.current)):(c.current=C?(o=c==null?void 0:c.current)==null?void 0:o.filter(z=>z!=l):[],m==null||m(c==null?void 0:c.current),h(c==null?void 0:c.current))},K=(l,r)=>{var o,z;((o=l.target)==null?void 0:o.type)!=="checkbox"&&((z=l.target)==null?void 0:z.className)!=="checkmark"&&(e!=null&&e.onRowClick&&e.onRowClick(l,r),Q(r,l))},Q=(l,r)=>{W(l,r)},U=l=>{f(l)},X=l=>{Z(i,l)},Y=l=>{G(i,l),c.current=[],h([]),m([])},$=l=>{M(i,l),c.current=[],h([]),m([])},R=l=>{F(l)},p=()=>d.renderCustomElement(d.getCustomRender("ACTIONS_TOOLBAR",u),{...t,size:t!=null&&t.size?t.size:a,color:t!=null&&t.color?t.color:s,className:"table-view-toolbar-lnc "+(t==null?void 0:t.className)},u)||N.jsx(te,{...t,className:"table-view-toolbar-lnc "+(t==null?void 0:t.className),size:t!=null&&t.size?t.size:a,color:t!=null&&t.color?t.color:s,selectedRowsLength:i!=null&&i.length?i.length:0,onCreate:U,onCopy:X,onEdit:Y,onDelete:$,actionsDropdownZIndex:B,actionDropdownProps:b,actionsDropdownPlacement:V,selectedRows:c==null?void 0:c.current}),P=()=>d.renderCustomElement(d.getCustomRender("TABLE",u),{...e,size:e!=null&&e.size?e.size:a,color:e!=null&&e.color?e.color:s,className:"table-view-pagination-lnc "+(e==null?void 0:e.className)},u)||N.jsx(le.default,{size:e!=null&&e.size?e.size:a,color:e!=null&&e.color?e.color:s,EnableSelection:(w||C)&&g==!1,onSelectRow:(l,r,o)=>J(r,!o),SelectedData:i,onRowClick:(l,r)=>K(l,r),...e}),ee=()=>d.renderCustomElement(d.getCustomRender("PAGINATION",u),{...n,size:n!=null&&n.size?n.size:a,color:n!=null&&n.color?n.color:s,className:"table-view-pagination-lnc "+(n==null?void 0:n.className)},u)||N.jsx(ce,{...n,size:n!=null&&n.size?n.size:a,color:n!=null&&n.color?n.color:s,className:"table-view-pagination-lnc "+(n==null?void 0:n.className),onPageChange:R});return N.jsxs(re,{ref:T,...H,children:[p(),P(),_==!0&&ee()]})});y.displayName="TABLE_VIEW";module.exports=y;
package/dist/TableView.js CHANGED
@@ -1,244 +1,160 @@
1
- import { jsxs as oe, jsx as C } from "react/jsx-runtime";
2
- import { forwardRef as le, useState as te, useRef as ce } from "react";
3
- import { P as e } from "./index-CblbdqjE.js";
4
- import { s as re } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import ae from "./ActionsToolbar.js";
6
- import ie from "./Pagination.js";
7
- import { r as g, i as w } from "./utils-DtEfC-TX.js";
8
- import se from "./Table.js";
9
- const me = re.div`
1
+ import { jsxs as ee, jsx as C } from "react/jsx-runtime";
2
+ import { forwardRef as ne, useState as ce, useRef as le } from "react";
3
+ import { s as te } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import re from "./ActionsToolbar.js";
5
+ import oe from "./Pagination.js";
6
+ import { r as N, i as S } from "./utils-DtEfC-TX.js";
7
+ import ie from "./Table.js";
8
+ const ae = te.div`
10
9
  & .table-view-pagination-lnc {
11
10
  padding: 0 0.625rem;
12
11
  }
13
12
  & .table-view-toolbar-lnc {
14
13
  margin: 0 0.625rem;
15
14
  }
16
- `, z = le((D, E) => {
15
+ `, se = ne((T, g) => {
17
16
  const {
18
- __TYPE__: ue = "TABLE_VIEW",
19
- goToPreviousView: de,
20
- tableProps: n = {},
21
- paginationProps: o = {},
22
- actionsToolbarProps: T = {},
23
- rowsSingleSelect: S = !0,
24
- rowsMultiSelect: b = !1,
25
- loading: be = !1,
26
- showCreate: N = !0,
27
- enableCreate: O = !0,
28
- enableDetails: he = !0,
29
- showEdit: _,
17
+ tableProps: e = {},
18
+ paginationProps: n = {},
19
+ actionsToolbarProps: D = {},
20
+ rowsSingleSelect: w = !0,
21
+ rowsMultiSelect: d = !1,
22
+ showCreate: E = !0,
23
+ enableCreate: f = !0,
24
+ showEdit: v,
30
25
  enableEditOnSelection: A,
31
- showDelete: v = !0,
26
+ showDelete: O = !0,
32
27
  enableDeleteOnSelection: k = !0,
33
- showCopy: I = !0,
34
- enableCopyOnSelection: j = !0,
35
- customActions: x,
36
- pagination: L = !0,
37
- readOnly: f = !1,
28
+ showCopy: x = !0,
29
+ enableCopyOnSelection: I = !0,
30
+ customActions: L,
31
+ pagination: B = !0,
32
+ readOnly: y = !1,
38
33
  actionsDropdownZIndex: V = null,
39
- actionsDropdownPlacement: B = null,
40
- actionDropdownProps: F,
34
+ actionsDropdownPlacement: j = null,
35
+ actionDropdownProps: _,
41
36
  //----------------
42
- onCreate: M = () => {
37
+ onCreate: G = () => {
43
38
  },
44
- onEdit: W = () => {
39
+ onEdit: M = () => {
45
40
  },
46
- onDelete: Y = () => {
41
+ onDelete: W = () => {
47
42
  },
48
43
  onDetails: Z = () => {
49
44
  },
50
- onCopy: p = () => {
45
+ onCopy: b = () => {
51
46
  },
52
- onFilter: ye = () => {
53
- },
54
- onSort: Ce = () => {
55
- },
56
- onPageChange: G = () => {
57
- },
58
- onEmptyRowsSelection: ge = () => {
47
+ onPageChange: q = () => {
59
48
  },
60
49
  //------------------
61
- className: we = "",
62
- style: Se = {},
63
- color: s = "primary",
64
- size: m = "small",
65
- children: u,
66
- onChangeRowsSelection: d = () => {
50
+ color: a = "primary",
51
+ size: s = "small",
52
+ children: m,
53
+ onChangeRowsSelection: u = () => {
67
54
  },
68
- ...q
69
- } = D, l = {
70
- ...T,
71
- showCreate: N,
72
- enableCreate: O,
73
- showCopy: I,
74
- enableCopyOnSelection: j,
75
- showEdit: _,
55
+ ...F
56
+ } = T, c = {
57
+ ...D,
58
+ showCreate: E,
59
+ enableCreate: f,
60
+ showCopy: x,
61
+ enableCopyOnSelection: I,
62
+ showEdit: v,
76
63
  enableEditOnSelection: A,
77
- showDelete: v,
64
+ showDelete: O,
78
65
  enableDeleteOnSelection: k,
79
- customActions: x,
80
- readOnly: f
81
- }, [a, h] = te([]), t = ce([]), H = (c, r) => {
66
+ customActions: L,
67
+ readOnly: y
68
+ }, [o, h] = ce([]), l = le([]), H = (t, r) => {
82
69
  var i;
83
- r ? (b || S) && (t.current = b ? [...t.current, c] : [c], d(t == null ? void 0 : t.current), h(t == null ? void 0 : t.current)) : (t.current = b ? (i = t == null ? void 0 : t.current) == null ? void 0 : i.filter((y) => y != c) : [], d == null || d(t == null ? void 0 : t.current), h(t == null ? void 0 : t.current));
84
- }, J = (c, r) => {
85
- var i, y;
86
- ((i = c.target) == null ? void 0 : i.type) !== "checkbox" && ((y = c.target) == null ? void 0 : y.className) !== "checkmark" && (n != null && n.onRowClick && n.onRowClick(c, r), K(r, c));
87
- }, K = (c, r) => {
88
- Z(c, r);
89
- }, Q = (c) => {
90
- M(c);
91
- }, U = (c) => {
92
- p(a, c);
93
- }, X = (c) => {
94
- W(a, c), t.current = [], h([]), d([]);
95
- }, $ = (c) => {
96
- Y(a, c), t.current = [], h([]), d([]);
97
- }, R = (c) => {
98
- G(c);
99
- }, P = () => g(
100
- w("ACTIONS_TOOLBAR", u),
70
+ r ? (d || w) && (l.current = d ? [...l.current, t] : [t], u(l == null ? void 0 : l.current), h(l == null ? void 0 : l.current)) : (l.current = d ? (i = l == null ? void 0 : l.current) == null ? void 0 : i.filter((z) => z != t) : [], u == null || u(l == null ? void 0 : l.current), h(l == null ? void 0 : l.current));
71
+ }, J = (t, r) => {
72
+ var i, z;
73
+ ((i = t.target) == null ? void 0 : i.type) !== "checkbox" && ((z = t.target) == null ? void 0 : z.className) !== "checkmark" && (e != null && e.onRowClick && e.onRowClick(t, r), K(r, t));
74
+ }, K = (t, r) => {
75
+ Z(t, r);
76
+ }, Q = (t) => {
77
+ G(t);
78
+ }, U = (t) => {
79
+ b(o, t);
80
+ }, X = (t) => {
81
+ M(o, t), l.current = [], h([]), u([]);
82
+ }, Y = (t) => {
83
+ W(o, t), l.current = [], h([]), u([]);
84
+ }, $ = (t) => {
85
+ q(t);
86
+ }, R = () => N(
87
+ S("ACTIONS_TOOLBAR", m),
101
88
  {
102
- ...l,
103
- size: l != null && l.size ? l.size : m,
104
- color: l != null && l.color ? l.color : s,
105
- className: "table-view-toolbar-lnc " + (l == null ? void 0 : l.className)
89
+ ...c,
90
+ size: c != null && c.size ? c.size : s,
91
+ color: c != null && c.color ? c.color : a,
92
+ className: "table-view-toolbar-lnc " + (c == null ? void 0 : c.className)
106
93
  },
107
- u
94
+ m
108
95
  ) || /* @__PURE__ */ C(
109
- ae,
96
+ re,
110
97
  {
111
- ...l,
112
- className: "table-view-toolbar-lnc " + (l == null ? void 0 : l.className),
113
- size: l != null && l.size ? l.size : m,
114
- color: l != null && l.color ? l.color : s,
115
- selectedRowsLength: a != null && a.length ? a.length : 0,
98
+ ...c,
99
+ className: "table-view-toolbar-lnc " + (c == null ? void 0 : c.className),
100
+ size: c != null && c.size ? c.size : s,
101
+ color: c != null && c.color ? c.color : a,
102
+ selectedRowsLength: o != null && o.length ? o.length : 0,
116
103
  onCreate: Q,
117
104
  onCopy: U,
118
105
  onEdit: X,
119
- onDelete: $,
106
+ onDelete: Y,
120
107
  actionsDropdownZIndex: V,
121
- actionDropdownProps: F,
122
- actionsDropdownPlacement: B,
123
- selectedRows: t == null ? void 0 : t.current
108
+ actionDropdownProps: _,
109
+ actionsDropdownPlacement: j,
110
+ selectedRows: l == null ? void 0 : l.current
124
111
  }
125
- ), ee = () => g(
126
- w("TABLE", u),
112
+ ), p = () => N(
113
+ S("TABLE", m),
127
114
  {
128
- ...n,
129
- size: n != null && n.size ? n.size : m,
130
- color: n != null && n.color ? n.color : s,
131
- className: "table-view-pagination-lnc " + (n == null ? void 0 : n.className)
115
+ ...e,
116
+ size: e != null && e.size ? e.size : s,
117
+ color: e != null && e.color ? e.color : a,
118
+ className: "table-view-pagination-lnc " + (e == null ? void 0 : e.className)
132
119
  },
133
- u
120
+ m
134
121
  ) || /* @__PURE__ */ C(
135
- se,
122
+ ie,
136
123
  {
137
- size: n != null && n.size ? n.size : m,
138
- color: n != null && n.color ? n.color : s,
139
- EnableSelection: (S || b) && f == !1,
140
- onSelectRow: (c, r, i) => H(r, !i),
141
- SelectedData: a,
142
- onRowClick: (c, r) => J(c, r),
143
- ...n
124
+ size: e != null && e.size ? e.size : s,
125
+ color: e != null && e.color ? e.color : a,
126
+ EnableSelection: (w || d) && y == !1,
127
+ onSelectRow: (t, r, i) => H(r, !i),
128
+ SelectedData: o,
129
+ onRowClick: (t, r) => J(t, r),
130
+ ...e
144
131
  }
145
- ), ne = () => g(
146
- w("PAGINATION", u),
132
+ ), P = () => N(
133
+ S("PAGINATION", m),
147
134
  {
148
- ...o,
149
- size: o != null && o.size ? o.size : m,
150
- color: o != null && o.color ? o.color : s,
151
- className: "table-view-pagination-lnc " + (o == null ? void 0 : o.className)
135
+ ...n,
136
+ size: n != null && n.size ? n.size : s,
137
+ color: n != null && n.color ? n.color : a,
138
+ className: "table-view-pagination-lnc " + (n == null ? void 0 : n.className)
152
139
  },
153
- u
140
+ m
154
141
  ) || /* @__PURE__ */ C(
155
- ie,
142
+ oe,
156
143
  {
157
- ...o,
158
- size: o != null && o.size ? o.size : m,
159
- color: o != null && o.color ? o.color : s,
160
- className: "table-view-pagination-lnc " + (o == null ? void 0 : o.className),
161
- onPageChange: R
144
+ ...n,
145
+ size: n != null && n.size ? n.size : s,
146
+ color: n != null && n.color ? n.color : a,
147
+ className: "table-view-pagination-lnc " + (n == null ? void 0 : n.className),
148
+ onPageChange: $
162
149
  }
163
150
  );
164
- return /* @__PURE__ */ oe(me, { ref: E, ...q, children: [
165
- P(),
166
- ee(),
167
- L == !0 && ne()
151
+ return /* @__PURE__ */ ee(ae, { ref: g, ...F, children: [
152
+ R(),
153
+ p(),
154
+ B == !0 && P()
168
155
  ] });
169
156
  });
170
- z.propTypes = {
171
- __TYPE__: e.string,
172
- tableProps: e.object,
173
- actionsToolbarProps: e.object,
174
- paginationProps: e.object,
175
- rowsSingleSelect: e.bool,
176
- rowsMultiSelect: e.bool,
177
- loading: e.bool,
178
- showCreate: e.bool,
179
- actionsDropdownZIndex: e.any,
180
- actionsDropdownPlacement: e.any,
181
- /**
182
- * Enable create
183
- */
184
- enableCreate: e.bool,
185
- /**
186
- * Enable details on row click
187
- */
188
- enableDetails: e.bool,
189
- showEdit: e.bool,
190
- /**
191
- * Enable edit when one row is selected
192
- */
193
- enableEditOnSelection: e.bool,
194
- showDelete: e.bool,
195
- /**
196
- * Enable delete when one row is selected
197
- */
198
- enableDeleteOnSelection: e.bool,
199
- showCopy: e.bool,
200
- /**
201
- * Enable copy when one row is selected
202
- */
203
- enableCopyOnSelection: e.bool,
204
- /**
205
- * Actions that will be shown in toolbar with existing actions
206
- * type of [{name: `<string>`, show: `<bool>`, enable: `<bool>`, enableOnSelection: `<bool>`, onAction: `<func>`, customAction: `<elemet>`}, ...]
207
- */
208
- customActions: e.array,
209
- /**
210
- * Determines whether will pagination be shown in view
211
- */
212
- pagination: e.bool,
213
- /**
214
- * If `readOnly={true}` actions Delete, Edit and Copy won't be shown. Row Selction will be disabled.
215
- */
216
- readOnly: e.bool,
217
- //-------------------------------------------------------------
218
- onCreate: e.func,
219
- onEdit: e.func,
220
- onDelete: e.func,
221
- onDetails: e.func,
222
- onCopy: e.func,
223
- onFilter: e.func,
224
- onSort: e.func,
225
- onPageChange: e.func,
226
- //------------------------------------------------------------
227
- className: e.string,
228
- style: e.object,
229
- size: e.oneOf(["small", "medium", "large"]),
230
- color: e.oneOf([
231
- "primary",
232
- "secondary",
233
- "success",
234
- "danger",
235
- "warning",
236
- "information",
237
- "neutral",
238
- "gray"
239
- ])
240
- };
241
- z.displayName = "TABLE_VIEW";
157
+ se.displayName = "TABLE_VIEW";
242
158
  export {
243
- z as default
159
+ se as default
244
160
  };
package/dist/Tabs.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";const P=require("react/jsx-runtime"),r=require("react"),e=require("./index-BpbMKBf_.cjs"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),q=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),v=j.styled.div`
1
+ "use strict";const g=require("react/jsx-runtime"),t=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),q=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),v=j.styled.div`
2
2
  background: transparent;
3
3
  display: flex;
4
- justify-content: ${s=>s.fullWidth?"space-evenly":"none"};
5
- gap: ${s=>s.type=="pill"?"10px":"0"};
4
+ justify-content: ${e=>e.fullWidth?"space-evenly":"none"};
5
+ gap: ${e=>e.type=="pill"?"10px":"0"};
6
6
  box-sizing: border-box;
7
- `,p=r.forwardRef((s,d)=>{const{type:o="regular",fullWidth:l=!1,className:m="",style:u={},color:i="primary",size:a="small",children:c,...y}=s,h=q.useTheme(),[f,b]=r.useState(),g={theme:h,color:i,size:a,style:u,className:"lnc-ui-tabs "+m},T=t=>{b(t)},x=r.Children.map(c,(t,n)=>r.cloneElement(t,{type:o,first:n==0,last:n==r.Children.toArray(c).length-1,fullWidth:l,index:n,itemClick:T,activeIndex:f,color:i,size:a}));return P.jsx(v,{ref:d,type:o,fullWidth:l,...g,...y,children:x})});p.propTypes={type:e.PropTypes.oneOf(["regular","pill","underline"]),fullWidth:e.PropTypes.bool,className:e.PropTypes.string,style:e.PropTypes.object,color:e.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:e.PropTypes.oneOf(["small","medium","large"])};module.exports=p;
7
+ `,C=t.forwardRef((e,a)=>{const{type:n="regular",fullWidth:l=!1,className:d="",style:m={},color:o="primary",size:c="small",children:i,...u}=e,h=q.useTheme(),[p,y]=t.useState(),b={theme:h,color:o,size:c,style:m,className:"lnc-ui-tabs "+d},f=s=>{y(s)},x=t.Children.map(i,(s,r)=>t.cloneElement(s,{type:n,first:r==0,last:r==t.Children.toArray(i).length-1,fullWidth:l,index:r,itemClick:f,activeIndex:p,color:o,size:c}));return g.jsx(v,{ref:a,type:n,fullWidth:l,...b,...u,children:x})});module.exports=C;
package/dist/Tabs.js CHANGED
@@ -1,77 +1,58 @@
1
- import { jsx as T } from "react/jsx-runtime";
2
- import { forwardRef as j, useState as v, Children as c, cloneElement as P } from "react";
3
- import { P as e } from "./index-CblbdqjE.js";
4
- import { s as W } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { u as k } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
6
- const z = W.div`
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { forwardRef as v, useState as j, Children as i, cloneElement as k } from "react";
3
+ import { s as A } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
+ import { u as C } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
5
+ const I = A.div`
7
6
  background: transparent;
8
7
  display: flex;
9
- justify-content: ${(t) => t.fullWidth ? "space-evenly" : "none"};
10
- gap: ${(t) => t.type == "pill" ? "10px" : "0"};
8
+ justify-content: ${(e) => e.fullWidth ? "space-evenly" : "none"};
9
+ gap: ${(e) => e.type == "pill" ? "10px" : "0"};
11
10
  box-sizing: border-box;
12
- `, A = j((t, m) => {
11
+ `, P = v((e, c) => {
13
12
  const {
14
- type: l = "regular",
15
- fullWidth: o = !1,
13
+ type: r = "regular",
14
+ fullWidth: l = !1,
16
15
  //----------------
17
- className: p = "",
16
+ className: m = "",
18
17
  style: d = {},
19
- color: a = "primary",
20
- size: n = "small",
21
- children: i,
22
- ...f
23
- } = t, u = k(), [y, h] = v(), g = {
24
- theme: u,
25
- color: a,
26
- size: n,
18
+ color: o = "primary",
19
+ size: a = "small",
20
+ children: n,
21
+ ...p
22
+ } = e, f = C(), [h, u] = j(), y = {
23
+ theme: f,
24
+ color: o,
25
+ size: a,
27
26
  style: d,
28
- className: "lnc-ui-tabs " + p
29
- }, b = (s) => {
30
- h(s);
31
- }, x = c.map(
32
- i,
33
- (s, r) => P(s, {
34
- type: l,
35
- first: r == 0,
36
- last: r == c.toArray(i).length - 1,
37
- fullWidth: o,
38
- index: r,
27
+ className: "lnc-ui-tabs " + m
28
+ }, b = (t) => {
29
+ u(t);
30
+ }, x = i.map(
31
+ n,
32
+ (t, s) => k(t, {
33
+ type: r,
34
+ first: s == 0,
35
+ last: s == i.toArray(n).length - 1,
36
+ fullWidth: l,
37
+ index: s,
39
38
  itemClick: b,
40
- activeIndex: y,
41
- color: a,
42
- size: n
39
+ activeIndex: h,
40
+ color: o,
41
+ size: a
43
42
  })
44
43
  );
45
- return /* @__PURE__ */ T(
46
- z,
44
+ return /* @__PURE__ */ g(
45
+ I,
47
46
  {
48
- ref: m,
49
- type: l,
50
- fullWidth: o,
51
- ...g,
52
- ...f,
47
+ ref: c,
48
+ type: r,
49
+ fullWidth: l,
50
+ ...y,
51
+ ...p,
53
52
  children: x
54
53
  }
55
54
  );
56
55
  });
57
- A.propTypes = {
58
- type: e.oneOf(["regular", "pill", "underline"]),
59
- fullWidth: e.bool,
60
- //---------------------------------------------------------------
61
- className: e.string,
62
- style: e.object,
63
- color: e.oneOf([
64
- "primary",
65
- "secondary",
66
- "success",
67
- "warning",
68
- "danger",
69
- "information",
70
- "neutral",
71
- "gray"
72
- ]),
73
- size: e.oneOf(["small", "medium", "large"])
74
- };
75
56
  export {
76
- A as default
57
+ P as default
77
58
  };
@@ -1,13 +1,13 @@
1
- "use strict";const F=require("react/jsx-runtime"),a=require("./index-BpbMKBf_.cjs"),d=require("react"),X=require("./index-Cp66dWMi.cjs"),Z=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./utils-RnrgDDZP.cjs"),j=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),J=require("./objectWithoutPropertiesLoose-BLga_MQA.cjs"),K=require("./use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs");function Q(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Q(d),ee=Z.styled.div`
1
+ "use strict";const F=require("react/jsx-runtime"),u=require("react"),U=require("./index-Cp66dWMi.cjs"),G=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./utils-RnrgDDZP.cjs"),j=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),Y=require("./objectWithoutPropertiesLoose-BLga_MQA.cjs"),X=require("./use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs");function Z(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const S=Z(u),J=G.styled.div`
2
2
  & textarea {
3
- ${e=>g.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
4
- min-height: ${e=>g.getSizeValueWithUnits(e.theme,e.size)};
5
- background-color: ${e=>g.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
3
+ ${e=>f.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")}
4
+ min-height: ${e=>f.getSizeValueWithUnits(e.theme,e.size)};
5
+ background-color: ${e=>f.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
6
6
  border: 1px solid
7
- ${e=>g.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
8
- border-radius: ${e=>g.getBorderRadiusValueWithUnits(e.theme,"regular")};
9
- color: ${e=>g.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
10
- caret-color: ${e=>g.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
7
+ ${e=>f.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,e.disabled===!0?"disabled":"enabled","border")};
8
+ border-radius: ${e=>f.getBorderRadiusValueWithUnits(e.theme,"regular")};
9
+ color: ${e=>f.getColorRgbaValue(e.theme,"Input",e.focused===!0?"primary":e.color,"enabled","text")};
10
+ caret-color: ${e=>f.getColorRgbaValue(e.theme,"Input",e.color,"enabled","caret")};
11
11
  overflow: ${e=>e.collapseOnBlur&&e.focused===!1?"hidden":"auto"};
12
12
  transition: height 0.2s ease-out;
13
13
  padding: 0.563rem 0.75rem;
@@ -16,7 +16,7 @@
16
16
  }
17
17
 
18
18
  & textarea::placeholder {
19
- color: ${e=>g.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
19
+ color: ${e=>f.getColorRgbaValue(e.theme,"Input",e.color,"enabled","placeholder")};
20
20
  }
21
21
 
22
22
  & textarea:read-only {
@@ -24,13 +24,13 @@
24
24
  }
25
25
 
26
26
  & textarea:focus {
27
- ${e=>e.readOnly!==!0?g.getOutlineCss(e.theme):"outline: none"}
27
+ ${e=>e.readOnly!==!0?f.getOutlineCss(e.theme):"outline: none"}
28
28
  }
29
29
 
30
30
  & textarea:disabled {
31
- /* ${e=>g.getDisabledStateCss(e.theme)}
31
+ /* ${e=>f.getDisabledStateCss(e.theme)}
32
32
  */
33
- ${e=>`background-color: ${g.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
34
- color: ${t=>g.getColorRgbaValue(t.theme,"Input",t.color,"disabled","text")};`}
33
+ ${e=>`background-color: ${f.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
34
+ color: ${t=>f.getColorRgbaValue(t.theme,"Input",t.color,"disabled","text")};`}
35
35
  }
36
- `;var te=function(t){var r=d.useRef(t);return K.index(function(){r.current=t}),r},O=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},re=function(t,r){var n=d.useRef();return d.useCallback(function(o){t.current=o,n.current&&O(n.current,null),n.current=r,r&&O(r,o)},[r])},W={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ne=function(t){Object.keys(W).forEach(function(r){t.style.setProperty(r,W[r],"important")})},k=ne,u=null,V=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function oe(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),u||(u=document.createElement("textarea"),u.setAttribute("tabindex","-1"),u.setAttribute("aria-hidden","true"),k(u)),u.parentNode===null&&document.body.appendChild(u);var o=e.paddingSize,m=e.borderSize,l=e.sizingStyle,T=l.boxSizing;Object.keys(l).forEach(function(h){var v=h;u.style[v]=l[v]}),k(u),u.value=t;var i=V(u,e);u.value=t,i=V(u,e),u.value="x";var s=u.scrollHeight-o,c=s*r;T==="border-box"&&(c=c+o+m),i=Math.max(c,i);var f=s*n;return T==="border-box"&&(f=f+o+m),i=Math.min(f,i),[i,s]}var _=function(){},ae=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},ie=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],ue=!!document.documentElement.currentStyle,se=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=ae(ie,r),o=n.boxSizing;if(o==="")return null;ue&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var m=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),l=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:m,borderSize:l}},de=se;function $(e,t,r){var n=te(r);S.useLayoutEffect(function(){var o=function(l){return n.current(l)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var le=function(t,r){$(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},ce=function(t){$(window,"resize",t)},fe=function(t){$(document.fonts,"loadingdone",t)},ge=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],he=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,m=t.minRows,l=t.onChange,T=l===void 0?_:l,i=t.onHeightChange,s=i===void 0?_:i,c=J._objectWithoutPropertiesLoose(t,ge),f=c.value!==void 0,h=S.useRef(null),v=re(h,r),L=S.useRef(0),w=S.useRef(),x=function(){var p=h.current,R=n&&w.current?w.current:de(p);if(R){w.current=R;var P=oe(R,p.value||p.placeholder||"x",m,o),y=P[0],E=P[1];L.current!==y&&(L.current=y,p.style.setProperty("height",y+"px","important"),s(y,{rowHeight:E}))}},H=function(p){f||x(),T(p)};return S.useLayoutEffect(x),le(h,function(){if(!f){var z=h.current.value;requestAnimationFrame(function(){var p=h.current;p&&z!==p.value&&x()})}}),ce(x),fe(x),S.createElement("textarea",j._extends({},c,{onChange:H,ref:v}))},pe=S.forwardRef(he);const B=d.forwardRef((e,t)=>{const{disabled:r,readOnly:n,value:o,defaultValue:m,debounceTime:l=0,type:T="textarea",collapseOnBlur:i=!1,minRows:s=0,maxRows:c,onChange:f,onBlur:h,onFocus:v,className:L="",style:w={},size:x="small",color:H="primary",...z}=e,[p,R]=d.useState(o||m||""),P=j.useTheme(),[y,E]=d.useState(!1),[q,M]=d.useState(s),[A,C]=d.useState(i?s:c);d.useEffect(()=>{o!=null&&R(o)},[o]),d.useEffect(()=>{M(s),i&&y===!1&&C(s)},[s,c]),d.useEffect(()=>{C(i?y===!0?c:s:c)},[i]);const N=d.useCallback(X.debounce((b,I)=>D(b,I),l),[f]),D=(b,I)=>{f&&(f==null||f(b,I))},U=b=>{R(b.target.value),N(b,b.target.value)},G=b=>{E(!0),i&&C(c),v==null||v(b)},Y=b=>{E(!1),i&&C(s),h==null||h(b)};return F.jsx(ee,{style:w,className:L,theme:P,color:H,size:x,focused:y,disabled:r,readOnly:n,collapseOnBlur:i,children:F.jsx(pe,{ref:t,disabled:r,value:p,readOnly:n,minRows:q,maxRows:A,onChange:U,onFocus:G,onBlur:Y,...z})})});B.propTypes={id:a.PropTypes.any,defaultValue:a.PropTypes.string,value:a.PropTypes.string,disabled:a.PropTypes.bool,readOnly:a.PropTypes.bool,debounceTime:a.PropTypes.number,placeholder:a.PropTypes.string,tabIndex:a.PropTypes.number,collapseOnBlur:a.PropTypes.bool,minRows:a.PropTypes.number,maxRows:a.PropTypes.number,onChange:a.PropTypes.func,onBlur:a.PropTypes.func,onFocus:a.PropTypes.func,className:a.PropTypes.string,style:a.PropTypes.object,size:a.PropTypes.oneOf(["small","medium","large"]),color:a.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=B;
36
+ `;var K=function(t){var r=u.useRef(t);return X.index(function(){r.current=t}),r},W=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},Q=function(t,r){var n=u.useRef();return u.useCallback(function(o){t.current=o,n.current&&W(n.current,null),n.current=r,r&&W(r,o)},[r])},k={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},ee=function(t){Object.keys(k).forEach(function(r){t.style.setProperty(r,k[r],"important")})},O=ee,i=null,V=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function te(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=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);var o=e.paddingSize,v=e.borderSize,d=e.sizingStyle,s=d.boxSizing;Object.keys(d).forEach(function(g){var y=g;i.style[y]=d[y]}),O(i),i.value=t;var a=V(i,e);i.value=t,a=V(i,e),i.value="x";var h=i.scrollHeight-o,l=h*r;s==="border-box"&&(l=l+o+v),a=Math.max(l,a);var m=h*n;return s==="border-box"&&(m=m+o+v),a=Math.min(m,a),[a,h]}var _=function(){},re=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},ne=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],oe=!!document.documentElement.currentStyle,ae=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=re(ne,r),o=n.boxSizing;if(o==="")return null;oe&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var v=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),d=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:v,borderSize:d}},ie=ae;function $(e,t,r){var n=K(r);S.useLayoutEffect(function(){var o=function(d){return n.current(d)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var ue=function(t,r){$(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},de=function(t){$(window,"resize",t)},se=function(t){$(document.fonts,"loadingdone",t)},le=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],ce=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,v=t.minRows,d=t.onChange,s=d===void 0?_:d,a=t.onHeightChange,h=a===void 0?_:a,l=Y._objectWithoutPropertiesLoose(t,le),m=l.value!==void 0,g=S.useRef(null),y=Q(g,r),E=S.useRef(0),w=S.useRef(),p=function(){var c=g.current,C=n&&w.current?w.current:ie(c);if(C){w.current=C;var R=te(C,c.value||c.placeholder||"x",v,o),x=R[0],T=R[1];E.current!==x&&(E.current=x,c.style.setProperty("height",x+"px","important"),h(x,{rowHeight:T}))}},H=function(c){m||p(),s(c)};return S.useLayoutEffect(p),ue(g,function(){if(!m){var z=g.current.value;requestAnimationFrame(function(){var c=g.current;c&&z!==c.value&&p()})}}),de(p),se(p),S.createElement("textarea",j._extends({},l,{onChange:H,ref:y}))},fe=S.forwardRef(ce);const he=u.forwardRef((e,t)=>{const{disabled:r,readOnly:n,value:o,defaultValue:v,debounceTime:d=0,collapseOnBlur:s=!1,minRows:a=0,maxRows:h,onChange:l,onBlur:m,onFocus:g,className:y="",style:E={},size:w="small",color:p="primary",...H}=e,[z,c]=u.useState(o||v||""),C=j.useTheme(),[R,x]=u.useState(!1),[T,M]=u.useState(a),[q,L]=u.useState(s?a:h);u.useEffect(()=>{o!=null&&c(o)},[o]),u.useEffect(()=>{M(a),s&&R===!1&&L(a)},[a,h]),u.useEffect(()=>{L(s?R===!0?h:a:h)},[s]);const B=u.useCallback(U.debounce((b,I)=>A(b,I),d),[l]),A=(b,I)=>{l&&(l==null||l(b,I))},N=b=>{c(b.target.value),B(b,b.target.value)},P=b=>{x(!0),s&&L(h),g==null||g(b)},D=b=>{x(!1),s&&L(a),m==null||m(b)};return F.jsx(J,{style:E,className:y,theme:C,color:p,size:w,focused:R,disabled:r,readOnly:n,collapseOnBlur:s,children:F.jsx(fe,{ref:t,disabled:r,value:z,readOnly:n,minRows:T,maxRows:q,onChange:N,onFocus:P,onBlur:D,...H})})});module.exports=he;