@lanaco/lnc-react-ui 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/Avatar.cjs +1 -1
  2. package/dist/Avatar.js +5 -6
  3. package/dist/Button.cjs +2 -2
  4. package/dist/Button.js +0 -1
  5. package/dist/CheckBoxInput.js +2 -2
  6. package/dist/ColorInput.js +18 -18
  7. package/dist/ConfirmationForm.cjs +5 -5
  8. package/dist/ConfirmationForm.js +16 -16
  9. package/dist/DataView.cjs +1 -1
  10. package/dist/DataView.js +35 -35
  11. package/dist/DecimalInput.js +41 -41
  12. package/dist/DoubleRangeSlider.js +30 -30
  13. package/dist/DragAndDropFile.js +162 -162
  14. package/dist/DragDropFiles.js +29 -29
  15. package/dist/Drawer.js +46 -46
  16. package/dist/Dropdown.js +36 -36
  17. package/dist/DropdownItem.js +19 -19
  18. package/dist/DropdownLookup.js +34 -34
  19. package/dist/DropdownMenu.js +43 -43
  20. package/dist/FileInput.js +21 -21
  21. package/dist/FlexGridItem.js +13 -13
  22. package/dist/Grid.cjs +1 -2
  23. package/dist/Grid.js +36 -8
  24. package/dist/GridItem.cjs +1 -1
  25. package/dist/GridItem.js +27 -7
  26. package/dist/Icon.cjs +2 -2
  27. package/dist/Icon.js +5 -6
  28. package/dist/IconButton.cjs +5 -5
  29. package/dist/IconButton.js +24 -25
  30. package/dist/Kanban.js +446 -446
  31. package/dist/MenuItem.js +33 -33
  32. package/dist/Modal.js +38 -38
  33. package/dist/MultiSelectDropdown.js +2 -2
  34. package/dist/MultiSelectDropdownLookup.js +2 -2
  35. package/dist/NestedDropdownItem.js +43 -43
  36. package/dist/NestedMenuItem.js +44 -44
  37. package/dist/NumberInput.js +12 -12
  38. package/dist/PageLayout.cjs +2 -2
  39. package/dist/PageLayout.js +18 -18
  40. package/dist/PasswordInput.js +40 -40
  41. package/dist/RadioGroup.js +11 -11
  42. package/dist/RadioInput.js +6 -6
  43. package/dist/RangeSlider.js +25 -25
  44. package/dist/SearchBar.js +73 -73
  45. package/dist/Sidebar.js +11 -11
  46. package/dist/SwipeableDrawer.js +16 -16
  47. package/dist/TabItem.js +25 -25
  48. package/dist/Tabs.js +32 -26
  49. package/dist/TextAreaInput.js +30 -30
  50. package/dist/TextInput.js +22 -22
  51. package/dist/ThemeProvider.js +83 -83
  52. package/dist/TimeInput.js +4 -4
  53. package/dist/Toggle.cjs +1 -1
  54. package/dist/Toggle.js +0 -1
  55. package/dist/TreeMenu.js +56 -56
  56. package/dist/style.css +1 -5
  57. package/package.json +1 -1
  58. package/bundle-visualization.html +0 -4842
  59. package/custom-addons/ThemeSelector.js +0 -111
  60. package/custom-addons/register.js +0 -16
  61. 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");;/* empty css */const s=require("./utils-DTAPpJXU.cjs"),I=require("./Icon.cjs"),f=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),w=P.newStyled.div`
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: r,
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: a = "small",
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: a,
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: r ? /* @__PURE__ */ s("img", { src: r }) : /* @__PURE__ */ s(
60
+ children: a ? /* @__PURE__ */ s("img", { src: a }) : /* @__PURE__ */ s(
62
61
  w,
63
62
  {
64
63
  icon: l,
65
- size: a,
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"),U=require("react"),o=require("./index-BIlhCoy2.cjs");;/* empty css */const 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=>`
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=U.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),q=!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:q,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;
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";
@@ -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.forwardRef((e, d) => {
198
+ `, F = I((e, d) => {
199
199
  const {
200
200
  containerRef: f,
201
201
  id: W,
@@ -1,16 +1,16 @@
1
- import { jsx as a, jsxs as L } from "react/jsx-runtime";
2
- import q, { useState as R, useCallback as G } from "react";
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 J, d, a as g, b as V, e as C, f as M, h as Q } from "./utils-C52T57HO.js";
6
- import { d as X } from "./index-CNBqQrtK.js";
7
- import { u as Y } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
8
- import { u as Z } from "./useUpdateEffect-CuYWz7EA.js";
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) => J(e.theme, "Input", e.size, "enabled")};
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 && M(e.theme)}
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 && Q(e.theme)};
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 = q.forwardRef((e, o) => {
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 = Y(), [c, p] = R(i), [W, S] = R(!1), _ = new RegExp(/^#[0-9A-F]{6}$/i);
115
- Z(() => p(i), [i]);
116
- const A = G(
117
- X((n, v) => H(n, v), j),
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
- ), H = (n, v) => {
119
+ ), L = (n, v) => {
120
120
  w && w(n, v);
121
121
  }, m = (n) => {
122
- i && p(n.target.value), A(n, 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
- _.test(c) || p(z), S(!1), U(n);
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__ */ L(
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"),_=require("react"),r=require("./index-BIlhCoy2.cjs"),m=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),p=require("./Icon.cjs"),y=require("./utils-DTAPpJXU.cjs"),B=require("./Modal.cjs"),F=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),E=m.newStyled.div`
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=>y.getColorRgbaValue(e.theme,"ConfirmationForm",e.color,"enabled","icon")};
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=m.newStyled.div`
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: ${y.getColorRgbaValue(e.theme,"ConfirmationForm","primary","enabled","trackBg")};`}
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",u=_.forwardRef((e,d)=>{const{color:g,statusIcon:f=!0,title:T,type:s="regular",actions:x,actionsAlignment:P="right",actionsTrack:h=!1,overlay:b=!0,showCloseButton:j=!0,onClose:k=()=>{},zIndex:C=1e3,size:w="fluid",clickOutsideToClose:$=!1,className:q="",style:A={},overlayProps:O,children:D,rest:v}=e;let i={theme:F.useTheme(),size:w,zIndex:C,className:"lnc-ui-confirmation-form "+q,style:A};const N=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(p,{className:"alert-icon",icon:N(n)}):typeof o=="string"&&o!==""?t.jsx(p,{className:"alert-icon",icon:o}):React.cloneElement(o,{className:"alert-icon "+(o==null?void 0:o.className)}),z=({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})]}),S=({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:d,...i,header:s=="regular"?t.jsx(z,{statusIcon:f,color:g,title:T,type:s,themeProps:i}):null,footer:s=="regular"?t.jsx(S,{actions:x,type:s,actionsAlignment:P,actionsTrack:h,themeProps:i}):null,overlay:b,showCloseButton:j,onClose:k,clickOutsideToClose:$,overlayProps:O,...v,children:t.jsx("div",{children:"okej"})})});u.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=u;
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;
@@ -1,12 +1,12 @@
1
- import { jsx as o, jsxs as R } from "react/jsx-runtime";
2
- import { forwardRef as S } from "react";
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 E from "./Modal.js";
8
- import { u as M } from "./emotion-element-5486c51c.browser.esm-Bb4VkP8U.js";
9
- const V = f.div`
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
- `, q = f.div`
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) => D(e.actionsAlignment)};
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
- `, D = (e) => e == "right" ? "end" : e == "left" ? "start" : "center", G = S((e, u) => {
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: H,
61
+ children: I,
62
62
  rest: P
63
63
  } = e;
64
64
  let l = {
65
- theme: M(),
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 }) : React.cloneElement(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__ */ R(V, { ...s, color: n, type: c, children: [
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
- q,
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
- E,
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
- G.propTypes = {
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
- G as default
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){i(e)},goToBackView(){_()}})),L.useUpdateEffect(()=>{n(r)},[r]);const i=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])},f=t.Children.map(N,(e,v)=>{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:f})});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;
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 i } from "react/jsx-runtime";
2
- import r, { useState as B, useRef as L, useImperativeHandle as P } from "react";
3
- import { P as a } from "./index-BYnWp42a.js";
4
- import { n as g } from "./emotion-styled.browser.esm-BiK8DcgW.js";
5
- import { u as v } from "./useUpdateEffect-CuYWz7EA.js";
6
- const R = g.div``, S = r.forwardRef((u, I) => {
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: o,
8
+ defaultViewType: p,
9
9
  activeViewType: s,
10
10
  //------------------
11
- className: f = "",
12
- style: D = {},
13
- children: A,
14
- size: O = "small",
15
- ...N
16
- } = u, [_, p] = B(
17
- s || o
18
- ), t = L([o]);
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
- W(e);
21
+ N(e);
22
22
  },
23
23
  goToBackView() {
24
- n();
24
+ _();
25
25
  }
26
- })), v(() => {
27
- p(s);
26
+ })), O(() => {
27
+ a(s);
28
28
  }, [s]);
29
- const W = (e) => {
30
- p(e), t.current.push(e);
31
- }, n = () => {
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 && p(t.current[t.current.length - 1]);
34
- }, w = r.Children.map(A, (e, Y) => {
35
- var E, V, m, y, T;
36
- if (r.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" || ((m = e == null ? void 0 : e.type) == null ? void 0 : m.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__ == _ || ((T = e == null ? void 0 : e.type) == null ? void 0 : T.displayName) === _))
37
- return r.cloneElement(e, {
38
- goToPreviousView: n
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__ */ i(R, { className: "lnc-ui-dataview " + f, ...N, children: w });
41
+ return /* @__PURE__ */ w(R, { className: "lnc-ui-dataview " + u, ...A, children: W });
42
42
  });
43
- S.propTypes = {
44
- defaultViewType: a.oneOf([
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: a.oneOf([
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: a.string,
58
- style: a.object
57
+ className: r.string,
58
+ style: r.object
59
59
  };
60
60
  export {
61
- S as default
61
+ Y as default
62
62
  };