@lanaco/lnc-react-ui 4.0.3 → 4.0.6
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/Avatar.cjs +1 -1
- package/dist/Avatar.js +5 -6
- package/dist/Button.cjs +2 -2
- package/dist/Button.js +0 -1
- package/dist/CheckBoxInput.js +2 -2
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +10 -9
- package/dist/ColorInput.js +18 -18
- package/dist/ConfirmationForm.cjs +5 -5
- package/dist/ConfirmationForm.js +16 -16
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +35 -35
- package/dist/DecimalInput.js +41 -41
- package/dist/DoubleRangeSlider.js +30 -30
- package/dist/DragAndDropFile.js +162 -162
- package/dist/DragDropFiles.js +29 -29
- package/dist/Drawer.js +46 -46
- package/dist/Dropdown.js +36 -36
- package/dist/DropdownItem.js +19 -19
- package/dist/DropdownLookup.js +34 -34
- package/dist/DropdownMenu.js +43 -43
- package/dist/FileInput.js +21 -21
- package/dist/FlexGridItem.js +13 -13
- package/dist/Grid.cjs +1 -2
- package/dist/Grid.js +36 -8
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +27 -7
- package/dist/Icon.cjs +2 -2
- package/dist/Icon.js +5 -6
- package/dist/IconButton.cjs +5 -5
- package/dist/IconButton.js +24 -25
- package/dist/Kanban.js +446 -446
- package/dist/MenuItem.cjs +2 -2
- package/dist/MenuItem.js +59 -58
- package/dist/Modal.js +38 -38
- package/dist/MultiSelectDropdown.js +2 -2
- package/dist/MultiSelectDropdownLookup.js +2 -2
- package/dist/NestedDropdownItem.js +43 -43
- package/dist/NestedMenuItem.js +44 -44
- package/dist/NotificationContainer.cjs +2 -2
- package/dist/NotificationContainer.js +24 -23
- package/dist/NumberInput.js +12 -12
- package/dist/PageLayout.cjs +2 -2
- package/dist/PageLayout.js +18 -18
- package/dist/PasswordInput.js +40 -40
- package/dist/RadioGroup.js +11 -11
- package/dist/RadioInput.js +6 -6
- package/dist/RangeSlider.js +25 -25
- package/dist/SearchBar.js +73 -73
- package/dist/Sidebar.js +11 -11
- package/dist/SwipeableDrawer.js +16 -16
- package/dist/TabItem.js +25 -25
- package/dist/Tabs.js +32 -26
- package/dist/TextAreaInput.js +30 -30
- package/dist/TextInput.js +22 -22
- package/dist/ThemeProvider.js +83 -83
- package/dist/TimeInput.js +4 -4
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +0 -1
- package/dist/TreeMenu.js +56 -56
- package/dist/style.css +1 -5
- package/package.json +1 -1
- package/bundle-visualization.html +0 -4842
- package/custom-addons/ThemeSelector.js +0 -111
- package/custom-addons/register.js +0 -16
- package/custom-addons/theme-selector.css +0 -17
package/dist/Avatar.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),T=require("react"),i=require("./index-BIlhCoy2.cjs"),P=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs")
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),T=require("react"),i=require("./index-BIlhCoy2.cjs"),P=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),s=require("./utils-DTAPpJXU.cjs"),I=require("./Icon.cjs"),f=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),w=P.newStyled.div`
|
|
2
2
|
border-radius: ${e=>s.getBorderRadiusValueWithUnits(e.theme,e.borderRadius)};
|
|
3
3
|
color: white;
|
|
4
4
|
display: inline-flex;
|
package/dist/Avatar.js
CHANGED
|
@@ -2,7 +2,6 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as I } from "react";
|
|
3
3
|
import { P as i } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as U } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
-
/* empty css */
|
|
6
5
|
import { b as y, d as t, h as $, a as v } from "./utils-C52T57HO.js";
|
|
7
6
|
import w from "./Icon.js";
|
|
8
7
|
import { u as R } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
@@ -23,7 +22,7 @@ const x = U.div`
|
|
|
23
22
|
}
|
|
24
23
|
`, C = I((e, o) => {
|
|
25
24
|
const {
|
|
26
|
-
image:
|
|
25
|
+
image: a,
|
|
27
26
|
icon: l = "user",
|
|
28
27
|
sizeInUnits: n,
|
|
29
28
|
borderRadius: m = "curved",
|
|
@@ -35,7 +34,7 @@ const x = U.div`
|
|
|
35
34
|
onClick: u = () => {
|
|
36
35
|
},
|
|
37
36
|
//----------------
|
|
38
|
-
size:
|
|
37
|
+
size: r = "small",
|
|
39
38
|
color: h = "primary",
|
|
40
39
|
className: g = "",
|
|
41
40
|
style: f = {},
|
|
@@ -44,7 +43,7 @@ const x = U.div`
|
|
|
44
43
|
theme: R(),
|
|
45
44
|
color: h,
|
|
46
45
|
style: f,
|
|
47
|
-
size:
|
|
46
|
+
size: r,
|
|
48
47
|
sizeInUnits: n,
|
|
49
48
|
className: "lnc-ui-avatar " + g
|
|
50
49
|
};
|
|
@@ -58,11 +57,11 @@ const x = U.div`
|
|
|
58
57
|
onFocus: d,
|
|
59
58
|
onBlur: c,
|
|
60
59
|
...z,
|
|
61
|
-
children:
|
|
60
|
+
children: a ? /* @__PURE__ */ s("img", { src: a }) : /* @__PURE__ */ s(
|
|
62
61
|
w,
|
|
63
62
|
{
|
|
64
63
|
icon: l,
|
|
65
|
-
size:
|
|
64
|
+
size: r,
|
|
66
65
|
sizeInUnits: n ? `calc(${n} / 2)` : null
|
|
67
66
|
}
|
|
68
67
|
)
|
package/dist/Button.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),q=require("react"),o=require("./index-BIlhCoy2.cjs"),C=require("./index-DAOBjHnD.cjs"),r=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),t=require("./utils-DTAPpJXU.cjs"),V=require("./Icon.cjs"),W=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),B={small:{regular:"1rem",icon:"0.75rem",justIcon:"0.5rem"},medium:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"},large:{regular:"1.5rem",icon:"1rem",justIcon:"0.5rem"}},f=e=>`
|
|
2
2
|
outline: none;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
flex-direction: row;
|
|
@@ -124,4 +124,4 @@
|
|
|
124
124
|
`,_=r.newStyled(I)`
|
|
125
125
|
border: 1px solid
|
|
126
126
|
${e=>t.getColorRgbaValue(e.theme,"ButtonBasic",e.color,"enabled","border","borderOpacity")};
|
|
127
|
-
`,O=
|
|
127
|
+
`,O=q.forwardRef((e,c)=>{const{text:k="",iconStyle:T="solid",leadingIcon:x=null,trailingIcon:R=null,borderRadius:v="regular",btnType:l="filled",disabled:S=!1,tabIndex:d=0,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,onLeadingIconClick:N,onTrailingIconClick:K,size:$="small",color:P="primary",className:j="",style:F={},children:w,...m}=e,h={theme:W.useTheme(),color:P,size:$,style:F,disabled:S,borderRadius:v,btnType:l,className:"lnc-ui-button "+j},a=!C.isEmpty(x),i=!C.isEmpty(R),U=!C.isEmpty(k),y=()=>n.jsxs(n.Fragment,{children:[a&&n.jsx(D,{size:$,children:n.jsx(V,{icon:x,sizeInUnits:"1.125rem",iconStyle:T})}),k,w,i&&n.jsx(E,{size:$,children:n.jsx(V,{icon:R,sizeInUnits:"1.125rem",iconStyle:T})})]});return l==="filled"?n.jsx(z,{ref:c,"data-type":"filled",...h,hasLeadingIcon:a,hasTrailingIcon:i,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,tabIndex:d,btnType:l,...m,children:y()}):l==="tinted"?n.jsx(L,{ref:c,"data-type":"tinted",...h,hasLeadingIcon:a,hasTrailingIcon:i,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,tabIndex:d,btnType:l,...m,children:y()}):l==="outline"?n.jsx(_,{ref:c,"data-type":"outline",...h,hasLeadingIcon:a,hasTrailingIcon:i,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,tabIndex:d,btnType:l,...m,children:y()}):l==="basic"?n.jsx(I,{ref:c,"data-type":"basic",...h,hasLeadingIcon:a,hasTrailingIcon:i,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,tabIndex:d,btnType:l,...m,children:y()}):n.jsx(z,{ref:c,"data-type":"filled",size:$,...h,hasLeadingIcon:a,hasTrailingIcon:i,onFocus:u,onBlur:s,onClick:g,onKeyDown:b,hasText:U,tabIndex:d,btnType:l,...m,children:y()})});O.propTypes={text:o.PropTypes.string,iconStyle:o.PropTypes.oneOf(["regular","solid"]),leadingIcon:o.PropTypes.string,trailingIcon:o.PropTypes.string,borderRadius:o.PropTypes.oneOf(["slight","regular","edged","curved","none"]),btnType:o.PropTypes.oneOf(["filled","tinted","outline","basic"]),disabled:o.PropTypes.bool,tabIndex:o.PropTypes.number,onBlur:o.PropTypes.func,onFocus:o.PropTypes.func,onClick:o.PropTypes.func,onKeyDown:o.PropTypes.func,className:o.PropTypes.string,style:o.PropTypes.object,color:o.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:o.PropTypes.oneOf(["small","medium","large"])};module.exports=O;
|
package/dist/Button.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as i, jsxs as K, Fragment as W } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as E } from "react";
|
|
3
3
|
import { P as o } from "./index-BYnWp42a.js";
|
|
4
|
-
/* empty css */
|
|
5
4
|
import { i as y } from "./index-CvebWhtp.js";
|
|
6
5
|
import { n as r } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
7
6
|
import { g as x, a as t, d as c, h as T, e as z, b as q } from "./utils-C52T57HO.js";
|
package/dist/CheckBoxInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as k, jsx as i, Fragment as B } from "react/jsx-runtime";
|
|
2
|
-
import I from "react";
|
|
2
|
+
import { forwardRef as I } from "react";
|
|
3
3
|
import { P as t } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as j } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import { d as g, g as L, a as n, b as N, e as x } from "./utils-C52T57HO.js";
|
|
@@ -195,7 +195,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
|
|
|
195
195
|
& input:active ~ .checkmark {
|
|
196
196
|
${(e) => x(e.theme)};
|
|
197
197
|
}
|
|
198
|
-
`, F = I
|
|
198
|
+
`, F = I((e, d) => {
|
|
199
199
|
const {
|
|
200
200
|
containerRef: f,
|
|
201
201
|
id: W,
|
package/dist/Chip.cjs
CHANGED
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
&:active {
|
|
25
25
|
background-color: ${e=>!e.disabled&&n.getColorRgbaValue(e.theme,"Chip",e.color,"active","background","backgroundOpacity")};
|
|
26
26
|
}
|
|
27
|
-
`,B=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 8px)`,b=V.forwardRef((e,o)=>{const{label:l,leadingIcon:a,trailingIcon:i,avatar:
|
|
27
|
+
`,B=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 8px)`,b=V.forwardRef((e,o)=>{const{label:l,leadingIcon:a,trailingIcon:i,avatar:c=!1,size:s="small",borderRadius:h="regular",disabled:d=!1,tabIndex:p=0,onFocus:y=()=>{},onBlur:f=()=>{},onClick:C=()=>{},onKeyDown:$=()=>{},onLeadingIconClick:P=()=>{},onTrailingIconClick:T=()=>{},className:k="",style:I={},color:v="primary",avatarProps:x,children:R,...w}=e,g=q.useTheme(),u={theme:g,color:v,style:I,size:s,className:"lnc-ui-chip "+k};return t.jsxs(N,{ref:o,size:s,...u,trailingIcon:i,leadingIcon:a,avatar:c,borderRadius:h,disabled:d,tabIndex:p,onClick:C,onKeyDown:$,onBlur:f,onFocus:y,...w,children:[c&&t.jsx(O,{...u,disabled:d,sizeInUnits:B(g,s),...x}),a&&t.jsx("i",{className:m(a),onClick:P}),t.jsxs(t.Fragment,{children:[l,R]}),i&&t.jsx("i",{className:m(i),onClick:T})]})});b.propTypes={label:r.PropTypes.string,leadingIcon:r.PropTypes.string,trailingIcon:r.PropTypes.string,avatar:r.PropTypes.bool,borderRadius:r.PropTypes.oneOf(["slight","regular","edged","curved","none"]),disabled:r.PropTypes.bool,tabIndex:r.PropTypes.number,onBlur:r.PropTypes.func,onFocus:r.PropTypes.func,onClick:r.PropTypes.func,onKeyDown:r.PropTypes.func,onLeadingIconClick:r.PropTypes.func,onTrailingIconClick:r.PropTypes.func,className:r.PropTypes.string,style:r.PropTypes.object,color:r.PropTypes.oneOf(["primary","secondary","success","warning","danger","information","neutral","gray"]),size:r.PropTypes.oneOf(["small","medium","large"]),avatarProps:r.PropTypes.any};module.exports=b;
|
package/dist/Chip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as c, Fragment as N } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as S } from "react";
|
|
3
3
|
import { P as a } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as j } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
@@ -73,8 +73,8 @@ const h = (e) => {
|
|
|
73
73
|
label: l,
|
|
74
74
|
leadingIcon: r,
|
|
75
75
|
trailingIcon: o,
|
|
76
|
-
avatar:
|
|
77
|
-
size:
|
|
76
|
+
avatar: d = !1,
|
|
77
|
+
size: i = "small",
|
|
78
78
|
borderRadius: f = "regular",
|
|
79
79
|
disabled: s = !1,
|
|
80
80
|
tabIndex: y = 0,
|
|
@@ -102,17 +102,18 @@ const h = (e) => {
|
|
|
102
102
|
theme: m,
|
|
103
103
|
color: w,
|
|
104
104
|
style: O,
|
|
105
|
+
size: i,
|
|
105
106
|
className: "lnc-ui-chip " + x
|
|
106
107
|
};
|
|
107
108
|
return /* @__PURE__ */ u(
|
|
108
109
|
L,
|
|
109
110
|
{
|
|
110
111
|
ref: n,
|
|
111
|
-
size:
|
|
112
|
+
size: i,
|
|
112
113
|
...g,
|
|
113
114
|
trailingIcon: o,
|
|
114
115
|
leadingIcon: r,
|
|
115
|
-
avatar:
|
|
116
|
+
avatar: d,
|
|
116
117
|
borderRadius: f,
|
|
117
118
|
disabled: s,
|
|
118
119
|
tabIndex: y,
|
|
@@ -122,21 +123,21 @@ const h = (e) => {
|
|
|
122
123
|
onFocus: C,
|
|
123
124
|
...T,
|
|
124
125
|
children: [
|
|
125
|
-
|
|
126
|
+
d && /* @__PURE__ */ c(
|
|
126
127
|
W,
|
|
127
128
|
{
|
|
128
129
|
...g,
|
|
129
130
|
disabled: s,
|
|
130
|
-
sizeInUnits: z(m,
|
|
131
|
+
sizeInUnits: z(m, i),
|
|
131
132
|
...P
|
|
132
133
|
}
|
|
133
134
|
),
|
|
134
|
-
r && /* @__PURE__ */
|
|
135
|
+
r && /* @__PURE__ */ c("i", { className: h(r), onClick: I }),
|
|
135
136
|
/* @__PURE__ */ u(N, { children: [
|
|
136
137
|
l,
|
|
137
138
|
R
|
|
138
139
|
] }),
|
|
139
|
-
o && /* @__PURE__ */
|
|
140
|
+
o && /* @__PURE__ */ c(
|
|
140
141
|
"i",
|
|
141
142
|
{
|
|
142
143
|
className: h(o),
|
package/dist/ColorInput.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as a, jsxs as q } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as G, useState as R, useCallback as J } from "react";
|
|
3
3
|
import { n as I } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
4
4
|
import { P as t } from "./index-BYnWp42a.js";
|
|
5
|
-
import { g as
|
|
6
|
-
import { d as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
5
|
+
import { g as M, d, a as g, b as V, e as C, f as Q, h as X } from "./utils-C52T57HO.js";
|
|
6
|
+
import { d as Y } from "./index-CNBqQrtK.js";
|
|
7
|
+
import { u as Z } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
8
|
+
import { u as _ } from "./useUpdateEffect-CuYWz7EA.js";
|
|
9
9
|
const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
10
10
|
display: inline-flex;
|
|
11
11
|
align-items: center;
|
|
12
12
|
gap: 0.5rem;
|
|
13
|
-
${(e) =>
|
|
13
|
+
${(e) => M(e.theme, "Input", e.size, "enabled")};
|
|
14
14
|
min-height: ${(e) => d(e.theme, e.size)};
|
|
15
15
|
max-height: ${(e) => d(e.theme, e.size)};
|
|
16
16
|
background-color: ${(e) => g(
|
|
@@ -39,7 +39,7 @@ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
|
39
39
|
padding: 0.625rem 0.75rem;
|
|
40
40
|
width: 100%;
|
|
41
41
|
${(e) => !e.disabled && e.readOnly !== !0 && e.isFocused === !0 && C(e.theme)};
|
|
42
|
-
${(e) => e.disabled === !0 &&
|
|
42
|
+
${(e) => e.disabled === !0 && Q(e.theme)}
|
|
43
43
|
border: 1px solid ${(e) => g(e.theme, "Input", e.color, "disabled", "border")};
|
|
44
44
|
`, te = I.div`
|
|
45
45
|
${(e) => !e.disabled && e.readOnly !== !0 && "cursor: pointer;"}
|
|
@@ -69,7 +69,7 @@ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
|
69
69
|
height: 200%;
|
|
70
70
|
cursor: pointer;
|
|
71
71
|
transform: translate(-25%, -25%);
|
|
72
|
-
${(e) => e.disabled === !0 &&
|
|
72
|
+
${(e) => e.disabled === !0 && X(e.theme)};
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
`, ne = I.span`
|
|
@@ -83,7 +83,7 @@ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
|
83
83
|
background-color: transparent;
|
|
84
84
|
width: 100%;
|
|
85
85
|
}
|
|
86
|
-
`, ae =
|
|
86
|
+
`, ae = G((e, o) => {
|
|
87
87
|
const {
|
|
88
88
|
id: u,
|
|
89
89
|
name: f,
|
|
@@ -111,19 +111,19 @@ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
|
111
111
|
labelRef: N,
|
|
112
112
|
inputProps: x,
|
|
113
113
|
...O
|
|
114
|
-
} = e, B =
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
|
|
114
|
+
} = e, B = Z(), [c, p] = R(i), [W, S] = R(!1), A = new RegExp(/^#[0-9A-F]{6}$/i);
|
|
115
|
+
_(() => p(i), [i]);
|
|
116
|
+
const H = J(
|
|
117
|
+
Y((n, v) => L(n, v), j),
|
|
118
118
|
[w]
|
|
119
|
-
),
|
|
119
|
+
), L = (n, v) => {
|
|
120
120
|
w && w(n, v);
|
|
121
121
|
}, m = (n) => {
|
|
122
|
-
i && p(n.target.value),
|
|
122
|
+
i && p(n.target.value), H(n, n.target.value);
|
|
123
123
|
}, h = (n) => {
|
|
124
124
|
S(!0), P(n);
|
|
125
125
|
}, b = (n) => {
|
|
126
|
-
|
|
126
|
+
A.test(c) || p(z), S(!1), U(n);
|
|
127
127
|
};
|
|
128
128
|
return /* @__PURE__ */ a(
|
|
129
129
|
te,
|
|
@@ -137,7 +137,7 @@ const T = (e, o) => `calc(${d(e, o)} - 1rem)`, ee = I.label`
|
|
|
137
137
|
readOnly: l,
|
|
138
138
|
withInput: $,
|
|
139
139
|
...O,
|
|
140
|
-
children: $ ? /* @__PURE__ */
|
|
140
|
+
children: $ ? /* @__PURE__ */ q(
|
|
141
141
|
ee,
|
|
142
142
|
{
|
|
143
143
|
withInput: $,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),p=require("react"),r=require("./index-BIlhCoy2.cjs"),y=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),m=require("./Icon.cjs"),u=require("./utils-DTAPpJXU.cjs"),B=require("./Modal.cjs"),F=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),E=y.newStyled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: 1rem;
|
|
4
4
|
align-items: center;
|
|
5
5
|
${e=>e.type=="centered"&&"flex-direction: column; gap: 1.25rem;"}
|
|
6
6
|
& .alert-icon {
|
|
7
7
|
font-size: 2.2rem;
|
|
8
|
-
color: ${e=>
|
|
8
|
+
color: ${e=>u.getColorRgbaValue(e.theme,"ConfirmationForm",e.color,"enabled","icon")};
|
|
9
9
|
}
|
|
10
10
|
${e=>e.type=="centered"&&"padding-top: 0.5rem;"}
|
|
11
|
-
`,V=
|
|
11
|
+
`,V=y.newStyled.div`
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: ${e=>e.type=="regular"?"row":"column"};
|
|
14
14
|
width: 100%;
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
justify-content: ${e=>M(e.actionsAlignment)};
|
|
18
18
|
${e=>e.type=="regular"&&"height: 4rem; border-radius: 0 0 16px 16px; padding: 0.75rem 1.5rem 0.75rem 1.5rem;"}
|
|
19
19
|
${e=>e.type=="regular"&&e.actionsTrack==!1&&"padding: 0 1.5rem 1.5rem 1.5rem;"}
|
|
20
|
-
${e=>e.type=="regular"&&e.actionsTrack==!0&&`background-color: ${
|
|
20
|
+
${e=>e.type=="regular"&&e.actionsTrack==!0&&`background-color: ${u.getColorRgbaValue(e.theme,"ConfirmationForm","primary","enabled","trackBg")};`}
|
|
21
21
|
${e=>e.type=="centered"&&"padding: 1rem 0 0.5rem 0;"}
|
|
22
|
-
`,M=e=>e=="right"?"end":e=="left"?"start":"center",
|
|
22
|
+
`,M=e=>e=="right"?"end":e=="left"?"start":"center",d=p.forwardRef((e,g)=>{const{color:f,statusIcon:T=!0,title:x,type:s="regular",actions:P,actionsAlignment:h="right",actionsTrack:b=!1,overlay:j=!0,showCloseButton:k=!0,onClose:C=()=>{},zIndex:w=1e3,size:$="fluid",clickOutsideToClose:q=!1,className:A="",style:O={},overlayProps:v,children:D,rest:N}=e;let i={theme:F.useTheme(),size:$,zIndex:w,className:"lnc-ui-confirmation-form "+A,style:O};const z=o=>o=="danger"?"times-circle":o=="warning"?"exclamation-triangle":o=="success"?"check-circle":"exclamation-circle",R=({statusIcon:o,color:n})=>typeof o=="boolean"&&o==!0?t.jsx(m,{className:"alert-icon",icon:z(n)}):typeof o=="string"&&o!==""?t.jsx(m,{className:"alert-icon",icon:o}):p.cloneElement(o,{className:"alert-icon "+(o==null?void 0:o.className)}),S=({statusIcon:o,color:n,title:l,type:c,themeProps:a})=>t.jsxs(E,{...a,color:n,type:c,children:[t.jsx(R,{statusIcon:o,color:n}),t.jsx("h3",{children:l})]}),_=({actions:o,type:n,actionsAlignment:l,actionsTrack:c,themeProps:a})=>t.jsx(V,{type:n,actionsAlignment:l,actionsTrack:c,...a,children:o});return t.jsx(B,{ref:g,...i,header:s=="regular"?t.jsx(S,{statusIcon:T,color:f,title:x,type:s,themeProps:i}):null,footer:s=="regular"?t.jsx(_,{actions:P,type:s,actionsAlignment:h,actionsTrack:b,themeProps:i}):null,overlay:j,showCloseButton:k,onClose:C,clickOutsideToClose:q,overlayProps:v,...N,children:t.jsx("div",{children:"okej"})})});d.propTypes={color:r.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"]),statusIcon:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.element,r.PropTypes.bool]),title:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.element]),type:r.PropTypes.oneOf(["regular","centered"]),actions:r.PropTypes.element,actionsAlignment:r.PropTypes.oneOf(["right","center","left"]),actionsTrack:r.PropTypes.bool,showCloseButton:r.PropTypes.bool,overlay:r.PropTypes.bool,onClose:r.PropTypes.func,zIndex:r.PropTypes.number,clickOutsideToClose:r.PropTypes.bool,className:r.PropTypes.string,style:r.PropTypes.object,size:r.PropTypes.oneOf(["fluid","xs","s","m","l","xl","full"]),overlayProps:r.PropTypes.any};module.exports=d;
|
package/dist/ConfirmationForm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as o, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as R, cloneElement as E } from "react";
|
|
3
3
|
import { P as r } from "./index-BYnWp42a.js";
|
|
4
4
|
import { n as f } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
5
|
import m from "./Icon.js";
|
|
6
6
|
import { a as d } from "./utils-C52T57HO.js";
|
|
7
|
-
import
|
|
8
|
-
import { u as
|
|
9
|
-
const
|
|
7
|
+
import M from "./Modal.js";
|
|
8
|
+
import { u as V } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
|
|
9
|
+
const q = f.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
gap: 1rem;
|
|
12
12
|
align-items: center;
|
|
@@ -22,13 +22,13 @@ const V = f.div`
|
|
|
22
22
|
)};
|
|
23
23
|
}
|
|
24
24
|
${(e) => e.type == "centered" && "padding-top: 0.5rem;"}
|
|
25
|
-
`,
|
|
25
|
+
`, D = f.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: ${(e) => e.type == "regular" ? "row" : "column"};
|
|
28
28
|
width: 100%;
|
|
29
29
|
flex: 1;
|
|
30
30
|
gap: 0.5rem;
|
|
31
|
-
justify-content: ${(e) =>
|
|
31
|
+
justify-content: ${(e) => G(e.actionsAlignment)};
|
|
32
32
|
${(e) => e.type == "regular" && "height: 4rem; border-radius: 0 0 16px 16px; padding: 0.75rem 1.5rem 0.75rem 1.5rem;"}
|
|
33
33
|
${(e) => e.type == "regular" && e.actionsTrack == !1 && "padding: 0 1.5rem 1.5rem 1.5rem;"}
|
|
34
34
|
${(e) => e.type == "regular" && e.actionsTrack == !0 && `background-color: ${d(
|
|
@@ -39,7 +39,7 @@ const V = f.div`
|
|
|
39
39
|
"trackBg"
|
|
40
40
|
)};`}
|
|
41
41
|
${(e) => e.type == "centered" && "padding: 1rem 0 0.5rem 0;"}
|
|
42
|
-
`,
|
|
42
|
+
`, G = (e) => e == "right" ? "end" : e == "left" ? "start" : "center", H = R((e, u) => {
|
|
43
43
|
const {
|
|
44
44
|
color: p,
|
|
45
45
|
statusIcon: g = !0,
|
|
@@ -58,19 +58,19 @@ const V = f.div`
|
|
|
58
58
|
className: O = "",
|
|
59
59
|
style: v = {},
|
|
60
60
|
overlayProps: N,
|
|
61
|
-
children:
|
|
61
|
+
children: I,
|
|
62
62
|
rest: P
|
|
63
63
|
} = e;
|
|
64
64
|
let l = {
|
|
65
|
-
theme:
|
|
65
|
+
theme: V(),
|
|
66
66
|
size: w,
|
|
67
67
|
zIndex: $,
|
|
68
68
|
className: "lnc-ui-confirmation-form " + O,
|
|
69
69
|
style: v
|
|
70
70
|
};
|
|
71
|
-
const j = (t) => t == "danger" ? "times-circle" : t == "warning" ? "exclamation-triangle" : t == "success" ? "check-circle" : "exclamation-circle", z = ({ statusIcon: t, color: n }) => typeof t == "boolean" && t == !0 ? /* @__PURE__ */ o(m, { className: "alert-icon", icon: j(n) }) : typeof t == "string" && t !== "" ? /* @__PURE__ */ o(m, { className: "alert-icon", icon: t }) :
|
|
71
|
+
const j = (t) => t == "danger" ? "times-circle" : t == "warning" ? "exclamation-triangle" : t == "success" ? "check-circle" : "exclamation-circle", z = ({ statusIcon: t, color: n }) => typeof t == "boolean" && t == !0 ? /* @__PURE__ */ o(m, { className: "alert-icon", icon: j(n) }) : typeof t == "string" && t !== "" ? /* @__PURE__ */ o(m, { className: "alert-icon", icon: t }) : E(t, {
|
|
72
72
|
className: "alert-icon " + (t == null ? void 0 : t.className)
|
|
73
|
-
}), B = ({ statusIcon: t, color: n, title: a, type: c, themeProps: s }) => /* @__PURE__ */
|
|
73
|
+
}), B = ({ statusIcon: t, color: n, title: a, type: c, themeProps: s }) => /* @__PURE__ */ S(q, { ...s, color: n, type: c, children: [
|
|
74
74
|
/* @__PURE__ */ o(z, { statusIcon: t, color: n }),
|
|
75
75
|
/* @__PURE__ */ o("h3", { children: a })
|
|
76
76
|
] }), F = ({
|
|
@@ -80,7 +80,7 @@ const V = f.div`
|
|
|
80
80
|
actionsTrack: c,
|
|
81
81
|
themeProps: s
|
|
82
82
|
}) => /* @__PURE__ */ o(
|
|
83
|
-
|
|
83
|
+
D,
|
|
84
84
|
{
|
|
85
85
|
type: n,
|
|
86
86
|
actionsAlignment: a,
|
|
@@ -90,7 +90,7 @@ const V = f.div`
|
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
return /* @__PURE__ */ o(
|
|
93
|
-
|
|
93
|
+
M,
|
|
94
94
|
{
|
|
95
95
|
ref: u,
|
|
96
96
|
...l,
|
|
@@ -124,7 +124,7 @@ const V = f.div`
|
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
126
|
});
|
|
127
|
-
|
|
127
|
+
H.propTypes = {
|
|
128
128
|
color: r.oneOf([
|
|
129
129
|
"primary",
|
|
130
130
|
"secondary",
|
|
@@ -165,5 +165,5 @@ G.propTypes = {
|
|
|
165
165
|
overlayProps: r.any
|
|
166
166
|
};
|
|
167
167
|
export {
|
|
168
|
-
|
|
168
|
+
H as default
|
|
169
169
|
};
|
package/dist/DataView.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const P=require("react/jsx-runtime"),t=require("react"),p=require("./index-BIlhCoy2.cjs"),B=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),L=require("./useUpdateEffect-BtMgpgIV.cjs"),R=B.newStyled.div``,I=t.forwardRef((m,w)=>{const{defaultViewType:o,activeViewType:r,className:A="",style:S={},children:N,size:g="small",...W}=m,[a,n]=t.useState(r||o),s=t.useRef([o]);t.useImperativeHandle(w,()=>({changeView(e){
|
|
1
|
+
"use strict";const P=require("react/jsx-runtime"),t=require("react"),p=require("./index-BIlhCoy2.cjs"),B=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),L=require("./useUpdateEffect-BtMgpgIV.cjs"),R=B.newStyled.div``,I=t.forwardRef((m,w)=>{const{defaultViewType:o,activeViewType:r,className:A="",style:S={},children:N,size:g="small",...W}=m,[a,n]=t.useState(r||o),s=t.useRef([o]);t.useImperativeHandle(w,()=>({changeView(e){f(e)},goToBackView(){_()}})),L.useUpdateEffect(()=>{n(r)},[r]);const f=e=>{n(e),s.current.push(e)},_=()=>{var e;s.current.pop(),((e=s.current)==null?void 0:e.length)>0&&n(s.current[s.current.length-1])},i=t.Children.map(N,e=>{var E,V,u,y,T;if(t.isValidElement(e)&&(e.props.__TYPE__=="TABLE_VIEW"||((E=e==null?void 0:e.type)==null?void 0:E.displayName)==="TABLE_VIEW"||e.props.__TYPE__=="DETAILS_VIEW"||((V=e==null?void 0:e.type)==null?void 0:V.displayName)==="DETAILS_VIEW"||e.props.__TYPE__=="FORM_VIEW"||((u=e==null?void 0:e.type)==null?void 0:u.displayName)==="FORM_VIEW"||e.props.__TYPE__=="KANBAN_VIEW"||((y=e==null?void 0:e.type)==null?void 0:y.displayName)==="KANBAN_VIEW")&&(e.props.__TYPE__==a||((T=e==null?void 0:e.type)==null?void 0:T.displayName)===a))return t.cloneElement(e,{goToPreviousView:_})});return P.jsx(R,{className:"lnc-ui-dataview "+A,...W,children:i})});I.propTypes={defaultViewType:p.PropTypes.oneOf(["DETAILS_VIEW","FORM_VIEW","TABLE_VIEW","KANBAN_VIEW"]),activeViewType:p.PropTypes.oneOf(["DETAILS_VIEW","FORM_VIEW","TABLE_VIEW","KANBAN_VIEW"]),className:p.PropTypes.string,style:p.PropTypes.object};module.exports=I;
|
package/dist/DataView.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { P as
|
|
4
|
-
import { n as
|
|
5
|
-
import { u as
|
|
6
|
-
const R =
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, useState as B, useRef as L, useImperativeHandle as P, Children as g, isValidElement as v, cloneElement as S } from "react";
|
|
3
|
+
import { P as r } from "./index-BYnWp42a.js";
|
|
4
|
+
import { n as D } from "./emotion-styled.browser.esm-BiK8DcgW.js";
|
|
5
|
+
import { u as O } from "./useUpdateEffect-CuYWz7EA.js";
|
|
6
|
+
const R = D.div``, Y = i((T, I) => {
|
|
7
7
|
const {
|
|
8
|
-
defaultViewType:
|
|
8
|
+
defaultViewType: p,
|
|
9
9
|
activeViewType: s,
|
|
10
10
|
//------------------
|
|
11
|
-
className:
|
|
12
|
-
style:
|
|
13
|
-
children:
|
|
14
|
-
size:
|
|
15
|
-
...
|
|
16
|
-
} =
|
|
17
|
-
s ||
|
|
18
|
-
), t = L([
|
|
11
|
+
className: u = "",
|
|
12
|
+
style: F = {},
|
|
13
|
+
children: f,
|
|
14
|
+
size: K = "small",
|
|
15
|
+
...A
|
|
16
|
+
} = T, [o, a] = B(
|
|
17
|
+
s || p
|
|
18
|
+
), t = L([p]);
|
|
19
19
|
P(I, () => ({
|
|
20
20
|
changeView(e) {
|
|
21
|
-
|
|
21
|
+
N(e);
|
|
22
22
|
},
|
|
23
23
|
goToBackView() {
|
|
24
|
-
|
|
24
|
+
_();
|
|
25
25
|
}
|
|
26
|
-
})),
|
|
27
|
-
|
|
26
|
+
})), O(() => {
|
|
27
|
+
a(s);
|
|
28
28
|
}, [s]);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
},
|
|
29
|
+
const N = (e) => {
|
|
30
|
+
a(e), t.current.push(e);
|
|
31
|
+
}, _ = () => {
|
|
32
32
|
var e;
|
|
33
|
-
t.current.pop(), ((e = t.current) == null ? void 0 : e.length) > 0 &&
|
|
34
|
-
},
|
|
35
|
-
var E, V, m, y
|
|
36
|
-
if (
|
|
37
|
-
return
|
|
38
|
-
goToPreviousView:
|
|
33
|
+
t.current.pop(), ((e = t.current) == null ? void 0 : e.length) > 0 && a(t.current[t.current.length - 1]);
|
|
34
|
+
}, W = g.map(f, (e) => {
|
|
35
|
+
var n, E, V, m, y;
|
|
36
|
+
if (v(e) && (e.props.__TYPE__ == "TABLE_VIEW" || ((n = e == null ? void 0 : e.type) == null ? void 0 : n.displayName) === "TABLE_VIEW" || e.props.__TYPE__ == "DETAILS_VIEW" || ((E = e == null ? void 0 : e.type) == null ? void 0 : E.displayName) === "DETAILS_VIEW" || e.props.__TYPE__ == "FORM_VIEW" || ((V = e == null ? void 0 : e.type) == null ? void 0 : V.displayName) === "FORM_VIEW" || e.props.__TYPE__ == "KANBAN_VIEW" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.displayName) === "KANBAN_VIEW") && (e.props.__TYPE__ == o || ((y = e == null ? void 0 : e.type) == null ? void 0 : y.displayName) === o))
|
|
37
|
+
return S(e, {
|
|
38
|
+
goToPreviousView: _
|
|
39
39
|
});
|
|
40
40
|
});
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ w(R, { className: "lnc-ui-dataview " + u, ...A, children: W });
|
|
42
42
|
});
|
|
43
|
-
|
|
44
|
-
defaultViewType:
|
|
43
|
+
Y.propTypes = {
|
|
44
|
+
defaultViewType: r.oneOf([
|
|
45
45
|
"DETAILS_VIEW",
|
|
46
46
|
"FORM_VIEW",
|
|
47
47
|
"TABLE_VIEW",
|
|
48
48
|
"KANBAN_VIEW"
|
|
49
49
|
]),
|
|
50
|
-
activeViewType:
|
|
50
|
+
activeViewType: r.oneOf([
|
|
51
51
|
"DETAILS_VIEW",
|
|
52
52
|
"FORM_VIEW",
|
|
53
53
|
"TABLE_VIEW",
|
|
54
54
|
"KANBAN_VIEW"
|
|
55
55
|
]),
|
|
56
56
|
//------------------------------------------------------------
|
|
57
|
-
className:
|
|
58
|
-
style:
|
|
57
|
+
className: r.string,
|
|
58
|
+
style: r.object
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
Y as default
|
|
62
62
|
};
|