@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.
- package/dist/Accordion.cjs +5 -5
- package/dist/Accordion.js +45 -56
- package/dist/AccordionDetails.cjs +3 -3
- package/dist/AccordionDetails.js +11 -25
- package/dist/AccordionSummary.cjs +4 -4
- package/dist/AccordionSummary.js +34 -44
- package/dist/ActionsToolbar.cjs +2 -3
- package/dist/ActionsToolbar.js +83 -135
- package/dist/Alert.cjs +10 -10
- package/dist/Alert.js +32 -64
- package/dist/Avatar.cjs +9 -9
- package/dist/Avatar.js +33 -72
- package/dist/Badge.cjs +6 -6
- package/dist/Badge.js +22 -47
- package/dist/BannerSectionCarousel.cjs +4 -4
- package/dist/BannerSectionCarousel.js +51 -542
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +1 -1
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +12 -14
- package/dist/BlogExploreSection.cjs +1 -1
- package/dist/BlogExploreSection.js +1 -1
- package/dist/BlogListSection.cjs +1 -1
- package/dist/BlogListSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +1 -1
- package/dist/BlogsSectionDetailed.js +1 -1
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +1 -1
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +2 -2
- package/dist/Breadcrumbs.cjs +5 -5
- package/dist/Breadcrumbs.js +57 -87
- package/dist/Button.cjs +11 -11
- package/dist/Button.js +126 -173
- package/dist/ButtonGroup.cjs +8 -8
- package/dist/ButtonGroup.js +37 -49
- package/dist/CalorieCalculatorSection.cjs +8 -8
- package/dist/CalorieCalculatorSection.js +90 -97
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +2 -5
- package/dist/Chip.cjs +14 -14
- package/dist/Chip.js +73 -111
- package/dist/ConfirmationForm.cjs +6 -6
- package/dist/ConfirmationForm.js +67 -109
- package/dist/ContactSection.cjs +1 -0
- package/dist/ContactSection.js +1 -0
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +7 -15
- package/dist/{DailyMotion-ByXblnua.js → DailyMotion-BBcJkMo_.js} +1 -1
- package/dist/{DailyMotion-BaFUcQKQ.cjs → DailyMotion-CpZExcrg.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +30 -50
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +1347 -1383
- package/dist/DecimalInput.cjs +6 -6
- package/dist/DecimalInput.js +210 -263
- package/dist/DecimalInputV2.cjs +23 -23
- package/dist/DecimalInputV2.js +119 -176
- package/dist/DetailedProductsInfinitiveSection.cjs +1 -1
- package/dist/DetailedProductsInfinitiveSection.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +2 -2
- package/dist/DetailsView.cjs +9 -9
- package/dist/DetailsView.js +111 -162
- package/dist/DoubleRangeSlider.cjs +22 -22
- package/dist/DoubleRangeSlider.js +70 -95
- package/dist/DragAndDropFile.cjs +10 -10
- package/dist/DragAndDropFile.js +347 -402
- package/dist/DragDropFiles.cjs +4 -4
- package/dist/DragDropFiles.js +70 -124
- package/dist/Drawer.cjs +5 -5
- package/dist/Drawer.js +97 -135
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +44 -213
- package/dist/DropdownItem.cjs +14 -14
- package/dist/DropdownItem.js +106 -142
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +61 -242
- package/dist/DropdownMenu.cjs +4 -4
- package/dist/DropdownMenu.js +87 -149
- package/dist/EditableTable.cjs +10 -10
- package/dist/EditableTable.js +165 -331
- package/dist/{Facebook-BCqiOWZO.js → Facebook-BSWPEXjA.js} +1 -1
- package/dist/{Facebook-D9wwecSW.cjs → Facebook-DoKw-XxT.cjs} +1 -1
- package/dist/FaqSection.cjs +3 -3
- package/dist/FaqSection.js +119 -153
- package/dist/FileInput.cjs +7 -7
- package/dist/FileInput.js +66 -94
- package/dist/{FilePlayer-ktaNhf3p.js → FilePlayer-BtGpIWnK.js} +1 -1
- package/dist/{FilePlayer-DB6jnpeC.cjs → FilePlayer-D9az_lc_.cjs} +1 -1
- package/dist/FlexBox.cjs +6 -6
- package/dist/FlexBox.js +28 -63
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +27 -67
- package/dist/FlexGridItem.cjs +6 -6
- package/dist/FlexGridItem.js +34 -62
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +7 -15
- package/dist/FormField.cjs +7 -7
- package/dist/FormField.js +22 -47
- package/dist/FormView.cjs +6 -6
- package/dist/FormView.js +148 -195
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +1 -1
- package/dist/Grid.cjs +2 -2
- package/dist/Grid.js +40 -65
- package/dist/GridItem.cjs +2 -2
- package/dist/GridItem.js +47 -80
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -15
- package/dist/HelpBannerSection.cjs +3 -3
- package/dist/HelpBannerSection.js +9 -15
- package/dist/Icon.cjs +4 -4
- package/dist/Icon.js +29 -55
- package/dist/IconButton.cjs +9 -9
- package/dist/IconButton.js +89 -127
- package/dist/{Kaltura-CvlN0HDg.js → Kaltura-BDqlEQpd.js} +1 -1
- package/dist/{Kaltura-CCdXLzOa.cjs → Kaltura-CK6JHUZC.cjs} +1 -1
- package/dist/Kanban.cjs +7 -7
- package/dist/Kanban.js +2033 -2098
- package/dist/KanbanActionsToolbar.cjs +4 -5
- package/dist/KanbanActionsToolbar.js +61 -96
- package/dist/KanbanCard-B9V9EjVE.js +137 -0
- package/dist/KanbanCard-DihrKn-I.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +2 -3
- package/dist/KanbanFooter.cjs +3 -3
- package/dist/KanbanFooter.js +37 -55
- package/dist/KanbanHeader.cjs +4 -4
- package/dist/KanbanHeader.js +49 -81
- package/dist/KanbanView.cjs +2 -2
- package/dist/KanbanView.js +106 -173
- package/dist/Link.cjs +7 -7
- package/dist/Link.js +20 -37
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +1 -1
- package/dist/MasonryGeneralCardsSection.js +1 -1
- package/dist/MenuItem.cjs +13 -13
- package/dist/MenuItem.js +101 -139
- package/dist/{Mixcloud-nG_VyBNt.cjs → Mixcloud-C1Boh2Bm.cjs} +1 -1
- package/dist/{Mixcloud-Bb8MTclI.js → Mixcloud-zAh6j7Ha.js} +1 -1
- package/dist/Modal.cjs +18 -19
- package/dist/Modal.js +131 -166
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +25 -196
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +27 -209
- package/dist/{Mux-DfYpGTiP.js → Mux-BGTG_Tvc.js} +1 -1
- package/dist/{Mux-BgB2a8kM.cjs → Mux-C6TwZeaq.cjs} +1 -1
- package/dist/NestedDropdownItem.cjs +3 -3
- package/dist/NestedDropdownItem.js +45 -67
- package/dist/NestedMenuItem.cjs +5 -5
- package/dist/NestedMenuItem.js +51 -78
- package/dist/NotificationContainer.cjs +10 -10
- package/dist/NotificationContainer.js +46 -79
- package/dist/NotificationMessage.cjs +2 -2
- package/dist/NotificationMessage.js +47 -64
- package/dist/NumberInput.cjs +23 -23
- package/dist/NumberInput.js +89 -149
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +20 -28
- package/dist/Pagination.cjs +3 -3
- package/dist/Pagination.js +102 -185
- package/dist/PartnerBrandsSection.cjs +62 -0
- package/dist/PartnerBrandsSection.js +154 -0
- package/dist/PartnerStatsSection.cjs +100 -0
- package/dist/PartnerStatsSection.js +124 -0
- package/dist/PasswordInput.cjs +23 -23
- package/dist/PasswordInput.js +108 -137
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.js +7 -32
- package/dist/PopoverContent.cjs +5 -5
- package/dist/PopoverContent.js +22 -28
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.js +7 -12
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +1 -1
- package/dist/ProgressBar.cjs +8 -8
- package/dist/ProgressBar.js +32 -59
- package/dist/RadioGroup.cjs +3 -3
- package/dist/RadioGroup.js +41 -72
- package/dist/RadioInput.cjs +28 -28
- package/dist/RadioInput.js +78 -123
- package/dist/RangeSlider.cjs +19 -19
- package/dist/RangeSlider.js +92 -119
- package/dist/ReviewsSection.cjs +13 -13
- package/dist/ReviewsSection.js +81 -101
- package/dist/SalesCampaignsSection.cjs +38 -28
- package/dist/SalesCampaignsSection.js +297 -325
- package/dist/SearchBar.cjs +10 -10
- package/dist/SearchBar.js +168 -188
- package/dist/SearchSection-B94YN_6P.cjs +161 -0
- package/dist/{SearchSection-DDQ_K98T.js → SearchSection-DAaMecR4.js} +337 -359
- package/dist/SearchSection.cjs +1 -1
- package/dist/SearchSection.js +2 -3
- package/dist/Separator.cjs +3 -3
- package/dist/Separator.js +14 -19
- package/dist/Sidebar.cjs +4 -5
- package/dist/Sidebar.js +33 -56
- package/dist/SimpleCategoriesSection.cjs +2 -2
- package/dist/SimpleCategoriesSection.js +2 -2
- package/dist/{SoundCloud-C86xwUG6.cjs → SoundCloud-C6R6E6Zc.cjs} +1 -1
- package/dist/{SoundCloud-DG91z39R.js → SoundCloud-lO8wg_0s.js} +1 -1
- package/dist/Spinner.cjs +18 -18
- package/dist/Spinner.js +37 -54
- package/dist/StatsSection.cjs +6 -6
- package/dist/StatsSection.js +15 -25
- package/dist/{Streamable-4uAnb3WN.cjs → Streamable-DZO95CiT.cjs} +1 -1
- package/dist/{Streamable-BAIWLgyD.js → Streamable-Dwa5ZEK4.js} +1 -1
- package/dist/Surface.cjs +4 -4
- package/dist/Surface.js +19 -34
- package/dist/SwipeableDrawer.cjs +8 -8
- package/dist/SwipeableDrawer.js +84 -136
- package/dist/TabItem.cjs +11 -11
- package/dist/TabItem.js +83 -118
- package/dist/Table.cjs +65 -65
- package/dist/Table.js +786 -1167
- package/dist/TableView.cjs +2 -2
- package/dist/TableView.js +113 -197
- package/dist/Tabs.cjs +4 -4
- package/dist/Tabs.js +41 -60
- package/dist/TextAreaInput.cjs +14 -14
- package/dist/TextAreaInput.js +131 -181
- package/dist/TextInput.cjs +23 -23
- package/dist/TextInput.js +78 -126
- package/dist/ThemeProvider.cjs +5 -5
- package/dist/ThemeProvider.js +35 -39
- package/dist/TimeInput.cjs +7 -7
- package/dist/TimeInput.js +46 -72
- package/dist/Toggle.cjs +20 -20
- package/dist/Toggle.js +78 -109
- package/dist/ToggleSection.cjs +5 -5
- package/dist/ToggleSection.js +48 -55
- package/dist/TreeMenu.cjs +5 -5
- package/dist/TreeMenu.js +43 -67
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +12 -20
- package/dist/{Twitch-CVAj24ti.cjs → Twitch-B17oKtD0.cjs} +1 -1
- package/dist/{Twitch-DfXeW5Xs.js → Twitch-C73-dwWo.js} +1 -1
- package/dist/UploadedFile.cjs +11 -11
- package/dist/UploadedFile.js +73 -99
- package/dist/{Vidyard-De3pges0.js → Vidyard-B6GdBHsM.js} +1 -1
- package/dist/{Vidyard-DaCcaaH4.cjs → Vidyard-s1MMcaRm.cjs} +1 -1
- package/dist/{Vimeo-8wXdCXGs.cjs → Vimeo-J1l_SU2E.cjs} +1 -1
- package/dist/{Vimeo-N6I2qi_h.js → Vimeo-kzHz4Gco.js} +1 -1
- package/dist/{Wistia-BrUzHQoq.cjs → Wistia-CudQyDHM.cjs} +1 -1
- package/dist/{Wistia-dlV6n6tO.js → Wistia-w4jnqd7y.js} +1 -1
- package/dist/{YouTube-Cfsj4ZaP.cjs → YouTube-BAYKouHS.cjs} +1 -1
- package/dist/{YouTube-DNJxWqRm.js → YouTube-BKyipPZx.js} +1 -1
- package/dist/index-BdKi2ogu.js +39 -0
- package/dist/index-BppfjY8h.js +497 -0
- package/dist/index-CRk3vcd4.cjs +95 -0
- package/dist/index-CX2A-q39.cjs +4 -0
- package/dist/{index-CWALXP1T.js → index-CwMCk9wV.js} +118 -145
- package/dist/index-DeS-oqJB.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +25 -21
- package/dist/{style-CkcozOY6.cjs → style-B4kAj6YU.cjs} +38 -8
- package/dist/{style-Cmlod7oq.js → style-neMbLWE6.js} +42 -11
- package/dist/{tag-BtS5lWJ0.js → tag-Dm8CW4TM.js} +21 -27
- package/dist/{tag-CmeZsPQt.cjs → tag-UQjq2_Ba.cjs} +7 -7
- package/package.json +4 -2
- package/vite.config.js +8 -0
- package/dist/KanbanCard-68kSAXL6.js +0 -175
- package/dist/KanbanCard-BDvoqTDS.cjs +0 -30
- package/dist/SearchSection-BcbHP6QF.cjs +0 -161
- package/dist/index-Be-_NM9Q.cjs +0 -4
- package/dist/index-C0LcDEqa.js +0 -47
- package/dist/index-CSNxZFTX.cjs +0 -95
package/dist/TableView.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";const
|
|
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
|
-
`,
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
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
|
-
`,
|
|
15
|
+
`, se = ne((T, g) => {
|
|
17
16
|
const {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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:
|
|
26
|
+
showDelete: O = !0,
|
|
32
27
|
enableDeleteOnSelection: k = !0,
|
|
33
|
-
showCopy:
|
|
34
|
-
enableCopyOnSelection:
|
|
35
|
-
customActions:
|
|
36
|
-
pagination:
|
|
37
|
-
readOnly:
|
|
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:
|
|
40
|
-
actionDropdownProps:
|
|
34
|
+
actionsDropdownPlacement: j = null,
|
|
35
|
+
actionDropdownProps: _,
|
|
41
36
|
//----------------
|
|
42
|
-
onCreate:
|
|
37
|
+
onCreate: G = () => {
|
|
43
38
|
},
|
|
44
|
-
onEdit:
|
|
39
|
+
onEdit: M = () => {
|
|
45
40
|
},
|
|
46
|
-
onDelete:
|
|
41
|
+
onDelete: W = () => {
|
|
47
42
|
},
|
|
48
43
|
onDetails: Z = () => {
|
|
49
44
|
},
|
|
50
|
-
onCopy:
|
|
45
|
+
onCopy: b = () => {
|
|
51
46
|
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
onSort: Ce = () => {
|
|
55
|
-
},
|
|
56
|
-
onPageChange: G = () => {
|
|
57
|
-
},
|
|
58
|
-
onEmptyRowsSelection: ge = () => {
|
|
47
|
+
onPageChange: q = () => {
|
|
59
48
|
},
|
|
60
49
|
//------------------
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
children: u,
|
|
66
|
-
onChangeRowsSelection: d = () => {
|
|
50
|
+
color: a = "primary",
|
|
51
|
+
size: s = "small",
|
|
52
|
+
children: m,
|
|
53
|
+
onChangeRowsSelection: u = () => {
|
|
67
54
|
},
|
|
68
|
-
...
|
|
69
|
-
} =
|
|
70
|
-
...
|
|
71
|
-
showCreate:
|
|
72
|
-
enableCreate:
|
|
73
|
-
showCopy:
|
|
74
|
-
enableCopyOnSelection:
|
|
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:
|
|
64
|
+
showDelete: O,
|
|
78
65
|
enableDeleteOnSelection: k,
|
|
79
|
-
customActions:
|
|
80
|
-
readOnly:
|
|
81
|
-
}, [
|
|
66
|
+
customActions: L,
|
|
67
|
+
readOnly: y
|
|
68
|
+
}, [o, h] = ce([]), l = le([]), H = (t, r) => {
|
|
82
69
|
var i;
|
|
83
|
-
r ? (
|
|
84
|
-
}, J = (
|
|
85
|
-
var i,
|
|
86
|
-
((i =
|
|
87
|
-
}, K = (
|
|
88
|
-
Z(
|
|
89
|
-
}, Q = (
|
|
90
|
-
|
|
91
|
-
}, U = (
|
|
92
|
-
|
|
93
|
-
}, X = (
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
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
|
-
...
|
|
103
|
-
size:
|
|
104
|
-
color:
|
|
105
|
-
className: "table-view-toolbar-lnc " + (
|
|
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
|
-
|
|
94
|
+
m
|
|
108
95
|
) || /* @__PURE__ */ C(
|
|
109
|
-
|
|
96
|
+
re,
|
|
110
97
|
{
|
|
111
|
-
...
|
|
112
|
-
className: "table-view-toolbar-lnc " + (
|
|
113
|
-
size:
|
|
114
|
-
color:
|
|
115
|
-
selectedRowsLength:
|
|
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:
|
|
122
|
-
actionsDropdownPlacement:
|
|
123
|
-
selectedRows:
|
|
108
|
+
actionDropdownProps: _,
|
|
109
|
+
actionsDropdownPlacement: j,
|
|
110
|
+
selectedRows: l == null ? void 0 : l.current
|
|
124
111
|
}
|
|
125
|
-
),
|
|
126
|
-
|
|
112
|
+
), p = () => N(
|
|
113
|
+
S("TABLE", m),
|
|
127
114
|
{
|
|
128
|
-
...
|
|
129
|
-
size:
|
|
130
|
-
color:
|
|
131
|
-
className: "table-view-pagination-lnc " + (
|
|
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
|
-
|
|
120
|
+
m
|
|
134
121
|
) || /* @__PURE__ */ C(
|
|
135
|
-
|
|
122
|
+
ie,
|
|
136
123
|
{
|
|
137
|
-
size:
|
|
138
|
-
color:
|
|
139
|
-
EnableSelection: (
|
|
140
|
-
onSelectRow: (
|
|
141
|
-
SelectedData:
|
|
142
|
-
onRowClick: (
|
|
143
|
-
...
|
|
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
|
-
),
|
|
146
|
-
|
|
132
|
+
), P = () => N(
|
|
133
|
+
S("PAGINATION", m),
|
|
147
134
|
{
|
|
148
|
-
...
|
|
149
|
-
size:
|
|
150
|
-
color:
|
|
151
|
-
className: "table-view-pagination-lnc " + (
|
|
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
|
-
|
|
140
|
+
m
|
|
154
141
|
) || /* @__PURE__ */ C(
|
|
155
|
-
|
|
142
|
+
oe,
|
|
156
143
|
{
|
|
157
|
-
...
|
|
158
|
-
size:
|
|
159
|
-
color:
|
|
160
|
-
className: "table-view-pagination-lnc " + (
|
|
161
|
-
onPageChange:
|
|
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__ */
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
151
|
+
return /* @__PURE__ */ ee(ae, { ref: g, ...F, children: [
|
|
152
|
+
R(),
|
|
153
|
+
p(),
|
|
154
|
+
B == !0 && P()
|
|
168
155
|
] });
|
|
169
156
|
});
|
|
170
|
-
|
|
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
|
-
|
|
159
|
+
se as default
|
|
244
160
|
};
|
package/dist/Tabs.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const
|
|
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: ${
|
|
5
|
-
gap: ${
|
|
4
|
+
justify-content: ${e=>e.fullWidth?"space-evenly":"none"};
|
|
5
|
+
gap: ${e=>e.type=="pill"?"10px":"0"};
|
|
6
6
|
box-sizing: border-box;
|
|
7
|
-
`,
|
|
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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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: ${(
|
|
10
|
-
gap: ${(
|
|
8
|
+
justify-content: ${(e) => e.fullWidth ? "space-evenly" : "none"};
|
|
9
|
+
gap: ${(e) => e.type == "pill" ? "10px" : "0"};
|
|
11
10
|
box-sizing: border-box;
|
|
12
|
-
`,
|
|
11
|
+
`, P = v((e, c) => {
|
|
13
12
|
const {
|
|
14
|
-
type:
|
|
15
|
-
fullWidth:
|
|
13
|
+
type: r = "regular",
|
|
14
|
+
fullWidth: l = !1,
|
|
16
15
|
//----------------
|
|
17
|
-
className:
|
|
16
|
+
className: m = "",
|
|
18
17
|
style: d = {},
|
|
19
|
-
color:
|
|
20
|
-
size:
|
|
21
|
-
children:
|
|
22
|
-
...
|
|
23
|
-
} =
|
|
24
|
-
theme:
|
|
25
|
-
color:
|
|
26
|
-
size:
|
|
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 " +
|
|
29
|
-
}, b = (
|
|
30
|
-
|
|
31
|
-
}, x =
|
|
32
|
-
|
|
33
|
-
(
|
|
34
|
-
type:
|
|
35
|
-
first:
|
|
36
|
-
last:
|
|
37
|
-
fullWidth:
|
|
38
|
-
index:
|
|
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:
|
|
41
|
-
color:
|
|
42
|
-
size:
|
|
39
|
+
activeIndex: h,
|
|
40
|
+
color: o,
|
|
41
|
+
size: a
|
|
43
42
|
})
|
|
44
43
|
);
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
44
|
+
return /* @__PURE__ */ g(
|
|
45
|
+
I,
|
|
47
46
|
{
|
|
48
|
-
ref:
|
|
49
|
-
type:
|
|
50
|
-
fullWidth:
|
|
51
|
-
...
|
|
52
|
-
...
|
|
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
|
-
|
|
57
|
+
P as default
|
|
77
58
|
};
|
package/dist/TextAreaInput.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";const F=require("react/jsx-runtime"),
|
|
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=>
|
|
4
|
-
min-height: ${e=>
|
|
5
|
-
background-color: ${e=>
|
|
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=>
|
|
8
|
-
border-radius: ${e=>
|
|
9
|
-
color: ${e=>
|
|
10
|
-
caret-color: ${e=>
|
|
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=>
|
|
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?
|
|
27
|
+
${e=>e.readOnly!==!0?f.getOutlineCss(e.theme):"outline: none"}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
& textarea:disabled {
|
|
31
|
-
/* ${e=>
|
|
31
|
+
/* ${e=>f.getDisabledStateCss(e.theme)}
|
|
32
32
|
*/
|
|
33
|
-
${e=>`background-color: ${
|
|
34
|
-
color: ${t=>
|
|
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
|
|
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;
|