@lanaco/lnc-react-ui 4.0.2 → 4.0.3
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/bundle-visualization.html +4842 -0
- package/dist/Accordion.cjs +1 -1
- package/dist/Accordion.js +55 -50
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +15 -15
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +11 -11
- package/dist/ActionsToolbar.cjs +2 -2
- package/dist/ActionsToolbar.js +16 -16
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +23 -23
- package/dist/Avatar.cjs +2 -2
- package/dist/Avatar.js +23 -25
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +21 -14
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +28 -28
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +21 -21
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +10 -6
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +4 -4
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +9 -9
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +5 -5
- package/dist/ConfirmationForm.cjs +5 -5
- package/dist/ConfirmationForm.js +59 -59
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +8 -8
- package/dist/{CustomStyles-nfD3J1mi.js → CustomStyles-BUSJ8bZt.js} +5 -5
- package/dist/{CustomStyles-CqlCjTgU.cjs → CustomStyles-Dlqxic2X.cjs} +1 -1
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +2 -2
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +491 -491
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +5 -5
- package/dist/DetailsView.cjs +4 -4
- package/dist/DetailsView.js +40 -40
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +4 -4
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +6 -6
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +4 -4
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +15 -15
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +6 -6
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +4 -4
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +6 -6
- package/dist/DropdownMenu.cjs +7 -1
- package/dist/DropdownMenu.js +192 -10
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +4 -4
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +4 -4
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +14 -14
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +30 -30
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +3 -3
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +5 -5
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +8 -9
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +31 -31
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.js +2 -2
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +2 -2
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +7 -7
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +33 -10
- package/dist/IconButton.cjs +5 -5
- package/dist/IconButton.js +33 -33
- package/dist/Kanban.cjs +12 -12
- package/dist/Kanban.js +948 -936
- package/dist/KanbanActionsToolbar.cjs +2 -2
- package/dist/KanbanActionsToolbar.js +28 -28
- package/dist/{KanbanCard-D9OhU8C6.js → KanbanCard-CHZ_C9kk.js} +50 -50
- package/dist/KanbanCard-DV3VnSUi.cjs +30 -0
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +5 -5
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +40 -40
- package/dist/KanbanHeader.cjs +2 -2
- package/dist/KanbanHeader.js +46 -46
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +27 -27
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +9 -9
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +11 -11
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +7 -7
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +4 -4
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +4 -4
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +18 -18
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +9 -9
- package/dist/Notification.cjs +1 -83
- package/dist/Notification.js +3 -1077
- package/dist/NotificationContainer.cjs +37 -0
- package/dist/NotificationContainer.js +162 -0
- package/dist/NotificationMessage.cjs +47 -0
- package/dist/NotificationMessage.js +133 -0
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +5 -5
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +27 -27
- package/dist/Pagination.cjs +12 -0
- package/dist/Pagination.js +248 -0
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +14 -14
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.js +36 -0
- package/dist/PopoverClose.cjs +1 -0
- package/dist/PopoverClose.js +15 -0
- package/dist/PopoverContent.cjs +10 -0
- package/dist/PopoverContent.js +68 -0
- package/dist/PopoverContext.cjs +1 -0
- package/dist/PopoverContext.js +5 -0
- package/dist/PopoverDescription.cjs +1 -0
- package/dist/PopoverDescription.js +16 -0
- package/dist/PopoverHeading.cjs +1 -0
- package/dist/PopoverHeading.js +16 -0
- package/dist/PopoverTrigger.cjs +1 -0
- package/dist/PopoverTrigger.js +38 -0
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +35 -24
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +3 -3
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +4 -4
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +4 -4
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +6 -6
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +9 -9
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +4 -4
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +25 -20
- package/dist/Surface.cjs +2 -2
- package/dist/Surface.js +14 -15
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +4 -4
- package/dist/TabItem.cjs +26 -0
- package/dist/TabItem.js +210 -0
- package/dist/Table.cjs +20 -20
- package/dist/Table.js +13 -12
- package/dist/TableView.cjs +8 -1
- package/dist/TableView.js +238 -9
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +3 -3
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +5 -5
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +5 -5
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +5 -5
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +9 -9
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +4 -4
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +2 -2
- package/dist/TreeMenuSeparator.cjs +3 -3
- package/dist/TreeMenuSeparator.js +11 -11
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +29 -29
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{defineProperty-BHpTtkhC.js → defineProperty-B5pLF6px.js} +8 -8
- package/dist/{emotion-element-5486c51c.browser.esm-CSejtOeT.js → emotion-element-5486c51c.browser.esm-Bb4VkP8U.js} +4 -4
- package/dist/{emotion-is-prop-valid.esm-BzFBwmJz.js → emotion-is-prop-valid.esm-DkbeH1Xy.js} +1 -1
- package/dist/{emotion-react.browser.esm-OWM-uG8Q.js → emotion-react.browser.esm-CN-s34fZ.js} +6 -6
- package/dist/{emotion-react.browser.esm-DQBL7Wls.cjs → emotion-react.browser.esm-D7h2t2Bz.cjs} +1 -1
- package/dist/{emotion-styled.browser.esm-BZSYYThs.js → emotion-styled.browser.esm-BiK8DcgW.js} +12 -12
- package/dist/floating-ui.react.esm-72DKnou_.js +1198 -0
- package/dist/floating-ui.react.esm-C4vrBVJU.cjs +4 -0
- package/dist/{hoist-non-react-statics.cjs-Drf1aBlk.js → hoist-non-react-statics.cjs-CAHiRNzQ.js} +1 -1
- package/dist/{hoist-non-react-statics.cjs-B8r9S_ak.cjs → hoist-non-react-statics.cjs-Dr-ytKVG.cjs} +3 -3
- package/dist/{index-CZJEA84h.js → index--Kmch3aI.js} +1 -1
- package/dist/index-BIlhCoy2.cjs +20 -0
- package/dist/{index-BLQWNy78.js → index-BUChtubz.js} +4 -4
- package/dist/{index-Ds9PUTwb.js → index-BYnWp42a.js} +208 -213
- package/dist/{index-D5vEbKUT.js → index-CNBqQrtK.js} +1 -1
- package/dist/{index-IO9v6o0I.cjs → index-CSXL784P.cjs} +2 -2
- package/dist/{index-C29T0m2a.cjs → index-Ct1N7fF4.cjs} +1 -1
- package/dist/{index-BklgDeu4.js → index-Cu0xwYjD.js} +1 -1
- package/dist/{index-Cdkz-XH-.js → index-CvebWhtp.js} +1 -1
- package/dist/index-DAOBjHnD.cjs +1 -0
- package/dist/index-DBXXH_TD.cjs +1 -0
- package/dist/{index-B_da1uvD.js → index-DLVVKJXD.js} +1 -1
- package/dist/index-DaiUAQVF.cjs +1 -0
- package/dist/index.cjs +1 -26
- package/dist/index.js +180 -376
- package/dist/{motion-CtkUpWEn.js → motion-ecIGZGwI.js} +1 -1
- package/dist/react-toastify.esm-CkXGwKXL.js +798 -0
- package/dist/react-toastify.esm-Dqcb4SQT.cjs +1 -0
- package/dist/{setPrototypeOf-a891FLQJ.js → setPrototypeOf-CttqfWo1.js} +2 -2
- package/dist/{tslib.es6-ZNVz5r_T.js → tslib.es6-DQ-SzcmG.js} +5 -5
- package/dist/usePopover.cjs +1 -0
- package/dist/usePopover.js +44 -0
- package/dist/{utils-DEke8iwo.js → utils-C52T57HO.js} +73 -73
- package/dist/{utils-hdRGTsQ7.cjs → utils-DTAPpJXU.cjs} +1 -1
- package/package.json +17 -5
- package/vite.config.js +16 -0
- package/dist/DropdownMenu-B6qr13ik.cjs +0 -19
- package/dist/DropdownMenu-DZi3TJ8Q.js +0 -1547
- package/dist/KanbanCard-ConTmu3w.cjs +0 -30
- package/dist/TableView-Cj5_fbSR.js +0 -481
- package/dist/TableView-D8ex512p.cjs +0 -19
- package/dist/index-BjdOz5Ok.cjs +0 -1
- package/dist/index-DXnSjbfJ.cjs +0 -20
- package/dist/index-Dzkd2i4n.cjs +0 -1
- package/dist/index-P-naJISQ.cjs +0 -1
package/dist/DecimalInput.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const B=require("react/jsx-runtime"),y=require("./index-
|
|
1
|
+
"use strict";const B=require("react/jsx-runtime"),y=require("./index-BIlhCoy2.cjs"),F=require("react"),ae=require("./index-DaiUAQVF.cjs"),z=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),x=require("./utils-DTAPpJXU.cjs"),ie=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs");function A(){}function oe(){return!0}function I(a){return!!(a||"").match(/\d/)}function W(a){return a==null}function q(a){return a.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function ne(a){switch(a){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function se(a,l,f){var e=ne(f),t=a.search(/[1-9]/);return t=t===-1?a.length:t,a.substring(0,t)+a.substring(t,a.length).replace(e,"$1"+l)}function L(a,l){l===void 0&&(l=!0);var f=a[0]==="-",e=f&&l;a=a.replace("-","");var t=a.split("."),r=t[0],o=t[1]||"";return{beforeDecimal:r,afterDecimal:o,hasNagation:f,addNegation:e}}function le(a){if(!a)return a;var l=a[0]==="-";l&&(a=a.substring(1,a.length));var f=a.split("."),e=f[0].replace(/^0+/,"")||"0",t=f[1]||"";return(l?"-":"")+e+(t?"."+t:"")}function H(a,l,f){for(var e="",t=f?"0":"",r=0;r<=l-1;r++)e+=a[r]||t;return e}function _(a,l){return Array(l+1).join(a)}function ue(a){a+="";var l=a[0]==="-"?"-":"";l&&(a=a.substring(1));var f=a.split(/[eE]/g),e=f[0],t=f[1];if(t=Number(t),!t)return l+e;e=e.replace(".","");var r=1+t,o=e.length;return r<0?e="0."+_("0",Math.abs(r))+e:r>=o?e=e+_("0",r-o):e=(e.substring(0,r)||"0")+"."+e.substring(r),l+e}function fe(a,l,f){if(["","-"].indexOf(a)!==-1)return a;var e=a.indexOf(".")!==-1&&l,t=L(a),r=t.beforeDecimal,o=t.afterDecimal,s=t.hasNagation,i=parseFloat("0."+(o||"0")),n=o.length<=l?"0."+o:i.toFixed(l),u=n.split("."),p=r.split("").reverse().reduce(function(d,v,S){return d.length>S?(Number(d[0])+Number(v)).toString()+d.substring(1,d.length):v+d},u[0]),c=H(u[1]||"",Math.min(l,o.length),f),h=s?"-":"",m=e?".":"";return""+h+p+m+c}function G(a,l){if(a.value=a.value,a!==null){if(a.createTextRange){var f=a.createTextRange();return f.move("character",l),f.select(),!0}return a.selectionStart||a.selectionStart===0?(a.focus(),a.setSelectionRange(l,l),!0):(a.focus(),!1)}}function ce(a,l){for(var f=0,e=0,t=a.length,r=l.length;a[f]===l[f]&&f<t;)f++;for(;a[t-1-e]===l[r-1-e]&&r-e>f&&t-e>f;)e++;return{start:f,end:t-e}}function K(a,l,f){return Math.min(Math.max(a,l),f)}function Z(a){return Math.max(a.selectionStart,a.selectionEnd)}function pe(a){return a||typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function de(a,l){var f={};for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&l.indexOf(e)===-1&&(f[e]=a[e]);return f}var me={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:A,onChange:A,onKeyDown:A,onMouseUp:A,onFocus:A,onBlur:A,isAllowed:oe},J=function(a){function l(f){a.call(this,f);var e=f.defaultValue;this.validateProps();var t=this.formatValueProp(e);this.state={value:t,numAsString:this.removeFormatting(t),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return a&&(l.__proto__=a),l.prototype=Object.create(a&&a.prototype),l.prototype.constructor=l,l.prototype.componentDidMount=function(){this.setState({mounted:!0})},l.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},l.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},l.prototype.updateValueIfRequired=function(e){var t=this,r=t.props,o=t.state,s=t.focusedElm,i=o.value,n=o.numAsString;if(n===void 0&&(n=""),e!==r){this.validateProps();var u=this.formatNumString(n),p=W(r.value)?u:this.formatValueProp(),c=this.removeFormatting(p),h=parseFloat(c),m=parseFloat(n);((!isNaN(h)||!isNaN(m))&&h!==m||u!==i||s===null&&p!==i)&&this.updateValue({formattedValue:p,numAsString:c,input:s,source:"prop",event:null})}},l.prototype.getFloatString=function(e){e===void 0&&(e="");var t=this.props,r=t.decimalScale,o=this.getSeparators(),s=o.decimalSeparator,i=this.getNumberRegex(!0),n=e[0]==="-";n&&(e=e.replace("-","")),s&&r===0&&(e=e.split(s)[0]),e=(e.match(i)||[]).join("").replace(s,".");var u=e.indexOf(".");return u!==-1&&(e=e.substring(0,u)+"."+e.substring(u+1,e.length).replace(new RegExp(q(s),"g"),"")),n&&(e="-"+e),e},l.prototype.getNumberRegex=function(e,t){var r=this.props,o=r.format,s=r.decimalScale,i=r.customNumerals,n=this.getSeparators(),u=n.decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(u&&s!==0&&!t&&!o?"|"+q(u):""),e?"g":void 0)},l.prototype.getSeparators=function(){var e=this.props,t=e.decimalSeparator,r=this.props,o=r.thousandSeparator,s=r.allowedDecimalSeparators;return o===!0&&(o=","),s||(s=[t,"."]),{decimalSeparator:t,thousandSeparator:o,allowedDecimalSeparators:s}},l.prototype.getMaskAtIndex=function(e){var t=this.props,r=t.mask;return r===void 0&&(r=" "),typeof r=="string"?r:r[e]||" "},l.prototype.getValueObject=function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}},l.prototype.validateProps=function(){var e=this.props,t=e.mask,r=this.getSeparators(),o=r.decimalSeparator,s=r.thousandSeparator;if(o===s)throw new Error(`
|
|
2
2
|
Decimal separator can't be same as thousand separator.
|
|
3
3
|
thousandSeparator: `+s+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
4
4
|
decimalSeparator: `+o+` (default value for decimalSeparator is .)
|
package/dist/DecimalInput.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as ie, jsx as K } from "react/jsx-runtime";
|
|
2
|
-
import { P as S } from "./index-
|
|
2
|
+
import { P as S } from "./index-BYnWp42a.js";
|
|
3
3
|
import I, { useState as oe, useCallback as ne } from "react";
|
|
4
|
-
import { d as se } from "./index-
|
|
5
|
-
import { n as G } from "./emotion-styled.browser.esm-
|
|
6
|
-
import {
|
|
7
|
-
import { u as ce } from "./emotion-element-5486c51c.browser.esm-
|
|
4
|
+
import { d as se } from "./index-CNBqQrtK.js";
|
|
5
|
+
import { n as G } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
6
|
+
import { d as B, a as R, b as fe, e as le, h as W, g as ue } from "./utils-C52T57HO.js";
|
|
7
|
+
import { u as ce } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
8
|
function O() {
|
|
9
9
|
}
|
|
10
10
|
function pe() {
|
package/dist/DetailsView.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),k=require("react"),e=require("./index-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),k=require("react"),e=require("./index-BIlhCoy2.cjs"),T=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),D=require("./FlexGrid.cjs"),L=require("./FlexGridItem.cjs"),n=require("./utils-DTAPpJXU.cjs"),_=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),W=require("./Button.cjs"),d=require("./IconButton.cjs"),A=T.newStyled.label`
|
|
2
2
|
display: block;
|
|
3
3
|
margin-bottom: 4px;
|
|
4
4
|
${o=>n.getComponentTypographyCss(o.theme,"FormField",o.size,"enabled")}
|
|
5
5
|
color: ${o=>n.getColorRgbaValue(o.theme,"FormField",o.color,"enabled","text")};
|
|
6
|
-
`,
|
|
6
|
+
`,m=k.forwardRef((o,p)=>{const{size:P="small",color:a="primary",className:l="",style:y={},children:u}=o,b=_.useTheme();return s.jsx(A,{theme:b,size:P,className:"lnc-ui-label "+l,style:y,color:a,ref:p,children:u})});m.defaultProps={style:{},size:"small",color:"primary"};m.propTypes={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"])};const j=T.newStyled.div`
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: space-between;
|
|
9
|
-
`,Y=
|
|
9
|
+
`,Y=T.newStyled.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
gap: 1rem;
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
|
16
16
|
padding: 12px;
|
|
17
17
|
background-color: ${o=>n.getColorRgbaValue(o.theme,"Popover","default","enabled","bg")};
|
|
18
|
-
`,
|
|
18
|
+
`,g=k.forwardRef((o,p)=>{const{__TYPE__:P="DETAILS_VIEW",goToPreviousView:a,data:l={},fields:y={},flexGridProps:u,goBackText:b="Go back",showBack:E=!0,showNext:v=!0,showPrevious:B=!0,showEdit:x=!0,disableGoBack:N=!1,disableNext:C=!1,disablePrevious:q=!1,disableEdit:h=!1,editOnTop:f=!1,goToNext:S=()=>{},goToPrevious:R=()=>{},onEdit:w=()=>{},goBack:V=()=>{},className:F="",color:t="primary",size:i="small",children:G,...I}=o,z=_.useTheme(),O=(r,c)=>{a&&a(),V(r,c)},$=()=>s.jsx(s.Fragment,{children:G||s.jsx(D,{spacing:10,...u,children:y.map((r,c)=>s.jsxs(L,{...r,children:[s.jsxs(m,{color:t,size:i,children:[r.label,":"]},c),l[r.accessor]]},c))})});return s.jsxs(Y,{ref:p,theme:z,color:t,borderRadius:"regular",className:F,...I,children:[s.jsxs(j,{children:[E&&s.jsx(W,{leadingIcon:"arrow-circle-left",text:b,btnType:"outline",style:{width:"fit-content"},onClick:r=>O(r,l),disabled:N,color:t,size:i},0),x&&f&&s.jsx(d,{btnType:"outline",icon:"pen",disabled:h,onClick:r=>w(l,r),color:t,size:i})]}),$(),s.jsxs(j,{children:[s.jsxs("div",{children:[v&&s.jsxs(s.Fragment,{children:[s.jsx(d,{btnType:"outline",icon:"angle-left",disabled:q,onClick:r=>R(l,r),color:t,size:i})," "]}),B&&s.jsx(d,{btnType:"outline",icon:"angle-right",disabled:C,onClick:r=>S(l,r),color:t,size:i})]}),x&&!f&&s.jsx(d,{btnType:"outline",icon:"pen",disabled:h,onClick:r=>w(l,r),color:t,size:i})]})]})});g.propTypes={__TYPE__:e.PropTypes.string,goBackText:e.PropTypes.string,fields:e.PropTypes.array,data:e.PropTypes.object,showBack:e.PropTypes.bool,showNext:e.PropTypes.bool,showPrevious:e.PropTypes.bool,showEdit:e.PropTypes.bool,disableGoBack:e.PropTypes.bool,disableNext:e.PropTypes.bool,disablePrevious:e.PropTypes.bool,disableEdit:e.PropTypes.bool,flexGridProps:e.PropTypes.any,editOnTop:e.PropTypes.bool,goToNext:e.PropTypes.func,goToPrevious:e.PropTypes.func,onEdit:e.PropTypes.func,goBack:e.PropTypes.func,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"])};g.displayName="DETAILS_VIEW";module.exports=g;
|
package/dist/DetailsView.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as a, jsxs as t, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import v from "react";
|
|
3
|
-
import { P as e } from "./index-
|
|
4
|
-
import { n as
|
|
2
|
+
import { forwardRef as v } from "react";
|
|
3
|
+
import { P as e } from "./index-BYnWp42a.js";
|
|
4
|
+
import { n as f } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import W from "./FlexGrid.js";
|
|
6
6
|
import A from "./FlexGridItem.js";
|
|
7
|
-
import {
|
|
8
|
-
import { u as E } from "./emotion-element-5486c51c.browser.esm-
|
|
7
|
+
import { g as Y, a as B, c as U, b as q } from "./utils-C52T57HO.js";
|
|
8
|
+
import { u as E } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
9
9
|
import H from "./Button.js";
|
|
10
10
|
import c from "./IconButton.js";
|
|
11
|
-
const J =
|
|
11
|
+
const J = f.label`
|
|
12
12
|
display: block;
|
|
13
13
|
margin-bottom: 4px;
|
|
14
14
|
${(o) => Y(o.theme, "FormField", o.size, "enabled")}
|
|
@@ -19,33 +19,33 @@ const J = p.label`
|
|
|
19
19
|
"enabled",
|
|
20
20
|
"text"
|
|
21
21
|
)};
|
|
22
|
-
`,
|
|
22
|
+
`, g = v((o, m) => {
|
|
23
23
|
const {
|
|
24
|
-
size:
|
|
24
|
+
size: h = "small",
|
|
25
25
|
color: n = "primary",
|
|
26
|
-
className:
|
|
27
|
-
style:
|
|
28
|
-
children:
|
|
26
|
+
className: r = "",
|
|
27
|
+
style: b = {},
|
|
28
|
+
children: p
|
|
29
29
|
} = o, u = E();
|
|
30
30
|
return /* @__PURE__ */ a(
|
|
31
31
|
J,
|
|
32
32
|
{
|
|
33
33
|
theme: u,
|
|
34
|
-
size:
|
|
35
|
-
className: "lnc-ui-label " +
|
|
36
|
-
style:
|
|
34
|
+
size: h,
|
|
35
|
+
className: "lnc-ui-label " + r,
|
|
36
|
+
style: b,
|
|
37
37
|
color: n,
|
|
38
38
|
ref: m,
|
|
39
|
-
children:
|
|
39
|
+
children: p
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
g.defaultProps = {
|
|
44
44
|
style: {},
|
|
45
45
|
size: "small",
|
|
46
46
|
color: "primary"
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
g.propTypes = {
|
|
49
49
|
className: e.string,
|
|
50
50
|
style: e.object,
|
|
51
51
|
size: e.oneOf(["small", "medium", "large"]),
|
|
@@ -60,10 +60,10 @@ f.propTypes = {
|
|
|
60
60
|
"gray"
|
|
61
61
|
])
|
|
62
62
|
};
|
|
63
|
-
const P =
|
|
63
|
+
const P = f.div`
|
|
64
64
|
display: flex;
|
|
65
65
|
justify-content: space-between;
|
|
66
|
-
`, K =
|
|
66
|
+
`, K = f.div`
|
|
67
67
|
display: flex;
|
|
68
68
|
flex-direction: column;
|
|
69
69
|
gap: 1rem;
|
|
@@ -78,21 +78,21 @@ const P = p.div`
|
|
|
78
78
|
border-top: 1px solid rgba(0, 0, 0, 0.04);
|
|
79
79
|
padding: 12px;
|
|
80
80
|
background-color: ${(o) => B(o.theme, "Popover", "default", "enabled", "bg")};
|
|
81
|
-
`, N = v
|
|
81
|
+
`, N = v((o, m) => {
|
|
82
82
|
const {
|
|
83
|
-
|
|
83
|
+
// eslint-disable-next-line no-unused-vars
|
|
84
|
+
__TYPE__: h = "DETAILS_VIEW",
|
|
84
85
|
goToPreviousView: n,
|
|
85
|
-
id: h,
|
|
86
86
|
data: r = {},
|
|
87
87
|
fields: b = {},
|
|
88
|
-
flexGridProps:
|
|
89
|
-
goBackText:
|
|
88
|
+
flexGridProps: p,
|
|
89
|
+
goBackText: u = "Go back",
|
|
90
90
|
showBack: C = !0,
|
|
91
|
-
showNext:
|
|
92
|
-
showPrevious:
|
|
91
|
+
showNext: _ = !0,
|
|
92
|
+
showPrevious: G = !0,
|
|
93
93
|
showEdit: y = !0,
|
|
94
|
-
disableGoBack:
|
|
95
|
-
disableNext:
|
|
94
|
+
disableGoBack: V = !1,
|
|
95
|
+
disableNext: F = !1,
|
|
96
96
|
disablePrevious: S = !1,
|
|
97
97
|
disableEdit: x = !1,
|
|
98
98
|
editOnTop: T = !1,
|
|
@@ -106,12 +106,11 @@ const P = p.div`
|
|
|
106
106
|
goBack: I = () => {
|
|
107
107
|
},
|
|
108
108
|
//------------------
|
|
109
|
-
className:
|
|
110
|
-
style: Q = {},
|
|
109
|
+
className: O = "",
|
|
111
110
|
color: i = "primary",
|
|
112
111
|
size: s = "small",
|
|
113
|
-
children:
|
|
114
|
-
|
|
112
|
+
children: $,
|
|
113
|
+
...R
|
|
115
114
|
} = o, D = E(), L = (l, d) => {
|
|
116
115
|
n && n(), I(l, d);
|
|
117
116
|
};
|
|
@@ -122,18 +121,19 @@ const P = p.div`
|
|
|
122
121
|
theme: D,
|
|
123
122
|
color: i,
|
|
124
123
|
borderRadius: "regular",
|
|
125
|
-
|
|
124
|
+
className: O,
|
|
125
|
+
...R,
|
|
126
126
|
children: [
|
|
127
127
|
/* @__PURE__ */ t(P, { children: [
|
|
128
128
|
C && /* @__PURE__ */ a(
|
|
129
129
|
H,
|
|
130
130
|
{
|
|
131
131
|
leadingIcon: "arrow-circle-left",
|
|
132
|
-
text:
|
|
132
|
+
text: u,
|
|
133
133
|
btnType: "outline",
|
|
134
134
|
style: { width: "fit-content" },
|
|
135
135
|
onClick: (l) => L(l, r),
|
|
136
|
-
disabled:
|
|
136
|
+
disabled: V,
|
|
137
137
|
color: i,
|
|
138
138
|
size: s
|
|
139
139
|
},
|
|
@@ -151,8 +151,8 @@ const P = p.div`
|
|
|
151
151
|
}
|
|
152
152
|
)
|
|
153
153
|
] }),
|
|
154
|
-
/* @__PURE__ */ a(k, { children:
|
|
155
|
-
/* @__PURE__ */ t(
|
|
154
|
+
/* @__PURE__ */ a(k, { children: $ || /* @__PURE__ */ a(W, { spacing: 10, ...p, children: b.map((l, d) => /* @__PURE__ */ t(A, { ...l, children: [
|
|
155
|
+
/* @__PURE__ */ t(g, { color: i, size: s, children: [
|
|
156
156
|
l.label,
|
|
157
157
|
":"
|
|
158
158
|
] }, d),
|
|
@@ -160,7 +160,7 @@ const P = p.div`
|
|
|
160
160
|
] }, d)) }) }),
|
|
161
161
|
/* @__PURE__ */ t(P, { children: [
|
|
162
162
|
/* @__PURE__ */ t("div", { children: [
|
|
163
|
-
|
|
163
|
+
_ && /* @__PURE__ */ t(k, { children: [
|
|
164
164
|
/* @__PURE__ */ a(
|
|
165
165
|
c,
|
|
166
166
|
{
|
|
@@ -174,12 +174,12 @@ const P = p.div`
|
|
|
174
174
|
),
|
|
175
175
|
" "
|
|
176
176
|
] }),
|
|
177
|
-
|
|
177
|
+
G && /* @__PURE__ */ a(
|
|
178
178
|
c,
|
|
179
179
|
{
|
|
180
180
|
btnType: "outline",
|
|
181
181
|
icon: "angle-right",
|
|
182
|
-
disabled:
|
|
182
|
+
disabled: F,
|
|
183
183
|
onClick: (l) => j(r, l),
|
|
184
184
|
color: i,
|
|
185
185
|
size: s
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),i=require("react"),v=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),s=require("./index-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),i=require("react"),v=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),s=require("./index-BIlhCoy2.cjs"),o=require("./utils-DTAPpJXU.cjs"),S=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),C=({theme:e,size:y})=>{var u=o.getSizeValueWithUnits(e,y);return`
|
|
2
2
|
min-height: ${u};
|
|
3
3
|
max-height: ${u};
|
|
4
4
|
`},b={small:"0.875rem",medium:"1.125rem",large:"1.375rem"},N=v.newStyled.div`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as p, jsx as r, Fragment as R } from "react/jsx-runtime";
|
|
2
2
|
import F, { useState as w, useEffect as x, useRef as T, useCallback as j } from "react";
|
|
3
|
-
import { n as $ } from "./emotion-styled.browser.esm-
|
|
4
|
-
import { P as i } from "./index-
|
|
5
|
-
import {
|
|
6
|
-
import { u as D } from "./emotion-element-5486c51c.browser.esm-
|
|
3
|
+
import { n as $ } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
4
|
+
import { P as i } from "./index-BYnWp42a.js";
|
|
5
|
+
import { a as u, b as V, g as E, d as O } from "./utils-C52T57HO.js";
|
|
6
|
+
import { u as D } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
7
7
|
const L = ({ theme: e, size: k }) => {
|
|
8
8
|
var s = O(e, k);
|
|
9
9
|
return `
|