@lanaco/lnc-react-ui 3.11.35 → 4.0.2

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 (218) hide show
  1. package/README.md +0 -3
  2. package/dist/Accordion.cjs +6 -0
  3. package/dist/Accordion.js +65 -0
  4. package/dist/AccordionDetails.cjs +7 -0
  5. package/dist/AccordionDetails.js +32 -0
  6. package/dist/AccordionSummary.cjs +12 -0
  7. package/dist/AccordionSummary.js +78 -0
  8. package/dist/ActionsToolbar.cjs +19 -0
  9. package/dist/ActionsToolbar.js +225 -0
  10. package/dist/Alert.cjs +40 -0
  11. package/dist/Alert.js +138 -0
  12. package/dist/Avatar.cjs +16 -0
  13. package/dist/Avatar.js +114 -0
  14. package/dist/Badge.cjs +17 -0
  15. package/dist/Badge.js +70 -0
  16. package/dist/Breadcrumbs.cjs +8 -0
  17. package/dist/Breadcrumbs.js +131 -0
  18. package/dist/Button.cjs +127 -0
  19. package/dist/Button.js +542 -0
  20. package/dist/ButtonGroup.cjs +44 -0
  21. package/dist/ButtonGroup.js +112 -0
  22. package/dist/CheckBoxInput.cjs +118 -0
  23. package/dist/CheckBoxInput.js +348 -0
  24. package/dist/Chip.cjs +27 -0
  25. package/dist/Chip.js +189 -0
  26. package/dist/ColorInput.cjs +60 -0
  27. package/dist/ColorInput.js +256 -0
  28. package/dist/ConfirmationForm.cjs +22 -0
  29. package/dist/ConfirmationForm.js +169 -0
  30. package/dist/Content.cjs +1 -0
  31. package/dist/Content.js +18 -0
  32. package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
  33. package/dist/CustomStyles-nfD3J1mi.js +2881 -0
  34. package/dist/DataView.cjs +1 -0
  35. package/dist/DataView.js +62 -0
  36. package/dist/DateInput.cjs +296 -0
  37. package/dist/DateInput.js +7042 -0
  38. package/dist/DecimalInput.cjs +54 -0
  39. package/dist/DecimalInput.js +697 -0
  40. package/dist/DetailsView.cjs +18 -0
  41. package/dist/DetailsView.js +243 -0
  42. package/dist/DoubleRangeSlider.cjs +114 -0
  43. package/dist/DoubleRangeSlider.js +289 -0
  44. package/dist/DragAndDropFile.cjs +31 -0
  45. package/dist/DragAndDropFile.js +2331 -0
  46. package/dist/DragDropFiles.cjs +14 -0
  47. package/dist/DragDropFiles.js +175 -0
  48. package/dist/Drawer.cjs +6 -0
  49. package/dist/Drawer.js +206 -0
  50. package/dist/Dropdown.cjs +1 -0
  51. package/dist/Dropdown.js +266 -0
  52. package/dist/DropdownItem.cjs +36 -0
  53. package/dist/DropdownItem.js +241 -0
  54. package/dist/DropdownLookup.cjs +1 -0
  55. package/dist/DropdownLookup.js +325 -0
  56. package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
  57. package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
  58. package/dist/DropdownMenu.cjs +1 -0
  59. package/dist/DropdownMenu.js +12 -0
  60. package/dist/EditableTable.cjs +21 -0
  61. package/dist/EditableTable.js +462 -0
  62. package/dist/FileInput.cjs +47 -0
  63. package/dist/FileInput.js +206 -0
  64. package/dist/FlexBox.cjs +9 -0
  65. package/dist/FlexBox.js +97 -0
  66. package/dist/FlexGrid.cjs +1 -0
  67. package/dist/FlexGrid.js +78 -0
  68. package/dist/FlexGridItem.cjs +7 -0
  69. package/dist/FlexGridItem.js +97 -0
  70. package/dist/Footer.cjs +1 -0
  71. package/dist/Footer.js +18 -0
  72. package/dist/FormField.cjs +11 -0
  73. package/dist/FormField.js +65 -0
  74. package/dist/FormView.cjs +13 -0
  75. package/dist/FormView.js +354 -0
  76. package/dist/Grid.cjs +13 -0
  77. package/dist/Grid.js +62 -0
  78. package/dist/GridItem.cjs +15 -0
  79. package/dist/GridItem.js +72 -0
  80. package/dist/Header.cjs +1 -0
  81. package/dist/Header.js +18 -0
  82. package/dist/Icon.cjs +8 -0
  83. package/dist/Icon.js +59 -0
  84. package/dist/IconButton.cjs +122 -0
  85. package/dist/IconButton.js +481 -0
  86. package/dist/Kanban.cjs +85 -0
  87. package/dist/Kanban.js +4793 -0
  88. package/dist/KanbanActionsToolbar.cjs +19 -0
  89. package/dist/KanbanActionsToolbar.js +152 -0
  90. package/dist/KanbanCard-ConTmu3w.cjs +30 -0
  91. package/dist/KanbanCard-D9OhU8C6.js +175 -0
  92. package/dist/KanbanCard.cjs +1 -0
  93. package/dist/KanbanCard.js +12 -0
  94. package/dist/KanbanFooter.cjs +5 -0
  95. package/dist/KanbanFooter.js +84 -0
  96. package/dist/KanbanHeader.cjs +15 -0
  97. package/dist/KanbanHeader.js +127 -0
  98. package/dist/KanbanView.cjs +8 -0
  99. package/dist/KanbanView.js +255 -0
  100. package/dist/Link.cjs +15 -0
  101. package/dist/Link.js +62 -0
  102. package/dist/MenuItem.cjs +36 -0
  103. package/dist/MenuItem.js +230 -0
  104. package/dist/Modal.cjs +84 -0
  105. package/dist/Modal.js +372 -0
  106. package/dist/MultiSelectDropdown.cjs +1 -0
  107. package/dist/MultiSelectDropdown.js +261 -0
  108. package/dist/MultiSelectDropdownLookup.cjs +1 -0
  109. package/dist/MultiSelectDropdownLookup.js +274 -0
  110. package/dist/NestedDropdownItem.cjs +6 -0
  111. package/dist/NestedDropdownItem.js +102 -0
  112. package/dist/NestedMenuItem.cjs +6 -0
  113. package/dist/NestedMenuItem.js +115 -0
  114. package/dist/Notification.cjs +83 -0
  115. package/dist/Notification.js +1079 -0
  116. package/dist/NumberInput.cjs +45 -0
  117. package/dist/NumberInput.js +241 -0
  118. package/dist/PageLayout.cjs +26 -0
  119. package/dist/PageLayout.js +92 -0
  120. package/dist/PasswordInput.cjs +47 -0
  121. package/dist/PasswordInput.js +230 -0
  122. package/dist/ProgressBar.cjs +22 -0
  123. package/dist/ProgressBar.js +92 -0
  124. package/dist/RadioGroup.cjs +7 -0
  125. package/dist/RadioGroup.js +104 -0
  126. package/dist/RadioInput.cjs +117 -0
  127. package/dist/RadioInput.js +362 -0
  128. package/dist/RangeSlider.cjs +72 -0
  129. package/dist/RangeSlider.js +253 -0
  130. package/dist/SearchBar.cjs +100 -0
  131. package/dist/SearchBar.js +994 -0
  132. package/dist/Separator.cjs +6 -0
  133. package/dist/Separator.js +37 -0
  134. package/dist/Sidebar.cjs +39 -0
  135. package/dist/Sidebar.js +123 -0
  136. package/dist/Spinner.cjs +38 -0
  137. package/dist/Spinner.js +114 -0
  138. package/dist/Surface.cjs +7 -0
  139. package/dist/Surface.js +60 -0
  140. package/dist/SwipeableDrawer.cjs +33 -0
  141. package/dist/SwipeableDrawer.js +213 -0
  142. package/dist/Table.cjs +170 -0
  143. package/dist/Table.js +1408 -0
  144. package/dist/TableView-Cj5_fbSR.js +481 -0
  145. package/dist/TableView-D8ex512p.cjs +19 -0
  146. package/dist/TableView.cjs +1 -0
  147. package/dist/TableView.js +11 -0
  148. package/dist/Tabs.cjs +7 -0
  149. package/dist/Tabs.js +72 -0
  150. package/dist/TextAreaInput.cjs +33 -0
  151. package/dist/TextAreaInput.js +320 -0
  152. package/dist/TextInput.cjs +45 -0
  153. package/dist/TextInput.js +227 -0
  154. package/dist/ThemeProvider.cjs +113 -0
  155. package/dist/ThemeProvider.js +1340 -0
  156. package/dist/TimeInput.cjs +31 -0
  157. package/dist/TimeInput.js +133 -0
  158. package/dist/Toggle.cjs +151 -0
  159. package/dist/Toggle.js +421 -0
  160. package/dist/TreeMenu.cjs +15 -0
  161. package/dist/TreeMenu.js +108 -0
  162. package/dist/TreeMenuSeparator.cjs +6 -0
  163. package/dist/TreeMenuSeparator.js +40 -0
  164. package/dist/UploadedFile.cjs +39 -0
  165. package/dist/UploadedFile.js +192 -0
  166. package/dist/defineProperty-BHpTtkhC.js +110 -0
  167. package/dist/defineProperty-DHvxLH8G.cjs +1 -0
  168. package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
  169. package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
  170. package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
  171. package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
  172. package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
  173. package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
  174. package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
  175. package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
  176. package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
  177. package/dist/floating-ui.dom-BdUovkEr.js +938 -0
  178. package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
  179. package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
  180. package/dist/index-BLQWNy78.js +109 -0
  181. package/dist/index-BP5r5zGN.cjs +1 -0
  182. package/dist/index-B_da1uvD.js +451 -0
  183. package/dist/index-BjdOz5Ok.cjs +1 -0
  184. package/dist/index-BklgDeu4.js +42 -0
  185. package/dist/index-C29T0m2a.cjs +174 -0
  186. package/dist/index-CZJEA84h.js +19069 -0
  187. package/dist/index-Cdkz-XH-.js +127 -0
  188. package/dist/index-D5vEbKUT.js +81 -0
  189. package/dist/index-DXnSjbfJ.cjs +20 -0
  190. package/dist/index-Ds9PUTwb.js +667 -0
  191. package/dist/index-Dzkd2i4n.cjs +1 -0
  192. package/dist/index-IO9v6o0I.cjs +5 -0
  193. package/dist/index-P-naJISQ.cjs +1 -0
  194. package/dist/index.cjs +26 -0
  195. package/dist/index.js +378 -0
  196. package/dist/motion-CtkUpWEn.js +3785 -0
  197. package/dist/motion-Oud-wpUz.cjs +1 -0
  198. package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
  199. package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
  200. package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
  201. package/dist/setPrototypeOf-a891FLQJ.js +13 -0
  202. package/dist/style.css +5 -0
  203. package/dist/tslib.es6-ZNVz5r_T.js +90 -0
  204. package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
  205. package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
  206. package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
  207. package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
  208. package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
  209. package/dist/utils-DEke8iwo.js +10196 -0
  210. package/dist/utils-hdRGTsQ7.cjs +13 -0
  211. package/eslint.config.js +38 -0
  212. package/package.json +137 -58
  213. package/vite.config.js +135 -0
  214. package/jest.config.js +0 -7
  215. package/lib/index.esm.js +0 -84028
  216. package/lib/index.js +0 -84165
  217. package/rc1 +0 -0
  218. package/test/jest/__mocks__/styleMock.js +0 -1
@@ -0,0 +1,18 @@
1
+ "use strict";const s=require("react/jsx-runtime"),k=require("react"),e=require("./index-DXnSjbfJ.cjs"),b=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),D=require("./FlexGrid.cjs"),L=require("./FlexGridItem.cjs"),n=require("./utils-hdRGTsQ7.cjs"),_=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),W=require("./Button.cjs"),c=require("./IconButton.cjs"),A=b.newStyled.label`
2
+ display: block;
3
+ margin-bottom: 4px;
4
+ ${o=>n.getComponentTypographyCss(o.theme,"FormField",o.size,"enabled")}
5
+ color: ${o=>n.getColorRgbaValue(o.theme,"FormField",o.color,"enabled","text")};
6
+ `,T=k.forwardRef((o,p)=>{const{size:g="small",color:a="primary",className:P="",style:l={},children:y}=o,u=_.useTheme();return s.jsx(A,{theme:u,size:g,className:"lnc-ui-label "+P,style:l,color:a,ref:p,children:y})});T.defaultProps={style:{},size:"small",color:"primary"};T.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=b.newStyled.div`
7
+ display: flex;
8
+ justify-content: space-between;
9
+ `,Y=b.newStyled.div`
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 1rem;
13
+ box-shadow: ${o=>n.getComponentPropValue(o.theme,"Popover",o.color,"enabled","boxShadow")};
14
+ border-radius: ${o=>n.getBorderRadiusValueWithUnits(o.theme,o.borderRadius)};
15
+ border-top: 1px solid rgba(0, 0, 0, 0.04);
16
+ padding: 12px;
17
+ background-color: ${o=>n.getColorRgbaValue(o.theme,"Popover","default","enabled","bg")};
18
+ `,m=k.forwardRef((o,p)=>{const{__TYPE__:g="DETAILS_VIEW",goToPreviousView:a,id:P,data:l={},fields:y={},flexGridProps:u,goBackText:E="Go back",showBack:v=!0,showNext:B=!0,showPrevious:N=!0,showEdit:x=!0,disableGoBack:C=!1,disableNext:q=!1,disablePrevious:S=!1,disableEdit:h=!1,editOnTop:f=!1,goToNext:R=()=>{},goToPrevious:V=()=>{},onEdit:w=()=>{},goBack:F=()=>{},className:U="",style:H={},color:t="primary",size:i="small",children:G,...I}=o,z=_.useTheme(),O=(r,d)=>{a&&a(),F(r,d)},$=()=>s.jsx(s.Fragment,{children:G||s.jsx(D,{spacing:10,...u,children:y.map((r,d)=>s.jsxs(L,{...r,children:[s.jsxs(T,{color:t,size:i,children:[r.label,":"]},d),l[r.accessor]]},d))})});return s.jsxs(Y,{ref:p,theme:z,color:t,borderRadius:"regular",...I,children:[s.jsxs(j,{children:[v&&s.jsx(W,{leadingIcon:"arrow-circle-left",text:E,btnType:"outline",style:{width:"fit-content"},onClick:r=>O(r,l),disabled:C,color:t,size:i},0),x&&f&&s.jsx(c,{btnType:"outline",icon:"pen",disabled:h,onClick:r=>w(l,r),color:t,size:i})]}),$(),s.jsxs(j,{children:[s.jsxs("div",{children:[B&&s.jsxs(s.Fragment,{children:[s.jsx(c,{btnType:"outline",icon:"angle-left",disabled:S,onClick:r=>V(l,r),color:t,size:i}),"  "]}),N&&s.jsx(c,{btnType:"outline",icon:"angle-right",disabled:q,onClick:r=>R(l,r),color:t,size:i})]}),x&&!f&&s.jsx(c,{btnType:"outline",icon:"pen",disabled:h,onClick:r=>w(l,r),color:t,size:i})]})]})});m.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"])};m.displayName="DETAILS_VIEW";module.exports=m;
@@ -0,0 +1,243 @@
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-Ds9PUTwb.js";
4
+ import { n as p } from "./emotion-styled.browser.esm-BZSYYThs.js";
5
+ import W from "./FlexGrid.js";
6
+ import A from "./FlexGridItem.js";
7
+ import { a as Y, b as B, d as U, c as q } from "./utils-DEke8iwo.js";
8
+ import { u as E } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
9
+ import H from "./Button.js";
10
+ import c from "./IconButton.js";
11
+ const J = p.label`
12
+ display: block;
13
+ margin-bottom: 4px;
14
+ ${(o) => Y(o.theme, "FormField", o.size, "enabled")}
15
+ color: ${(o) => B(
16
+ o.theme,
17
+ "FormField",
18
+ o.color,
19
+ "enabled",
20
+ "text"
21
+ )};
22
+ `, f = v.forwardRef((o, m) => {
23
+ const {
24
+ size: g = "small",
25
+ color: n = "primary",
26
+ className: h = "",
27
+ style: r = {},
28
+ children: b
29
+ } = o, u = E();
30
+ return /* @__PURE__ */ a(
31
+ J,
32
+ {
33
+ theme: u,
34
+ size: g,
35
+ className: "lnc-ui-label " + h,
36
+ style: r,
37
+ color: n,
38
+ ref: m,
39
+ children: b
40
+ }
41
+ );
42
+ });
43
+ f.defaultProps = {
44
+ style: {},
45
+ size: "small",
46
+ color: "primary"
47
+ };
48
+ f.propTypes = {
49
+ className: e.string,
50
+ style: e.object,
51
+ size: e.oneOf(["small", "medium", "large"]),
52
+ color: e.oneOf([
53
+ "primary",
54
+ "secondary",
55
+ "success",
56
+ "danger",
57
+ "warning",
58
+ "information",
59
+ "neutral",
60
+ "gray"
61
+ ])
62
+ };
63
+ const P = p.div`
64
+ display: flex;
65
+ justify-content: space-between;
66
+ `, K = p.div`
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 1rem;
70
+ box-shadow: ${(o) => U(
71
+ o.theme,
72
+ "Popover",
73
+ o.color,
74
+ "enabled",
75
+ "boxShadow"
76
+ )};
77
+ border-radius: ${(o) => q(o.theme, o.borderRadius)};
78
+ border-top: 1px solid rgba(0, 0, 0, 0.04);
79
+ padding: 12px;
80
+ background-color: ${(o) => B(o.theme, "Popover", "default", "enabled", "bg")};
81
+ `, N = v.forwardRef((o, m) => {
82
+ const {
83
+ __TYPE__: g = "DETAILS_VIEW",
84
+ goToPreviousView: n,
85
+ id: h,
86
+ data: r = {},
87
+ fields: b = {},
88
+ flexGridProps: u,
89
+ goBackText: _ = "Go back",
90
+ showBack: C = !0,
91
+ showNext: G = !0,
92
+ showPrevious: V = !0,
93
+ showEdit: y = !0,
94
+ disableGoBack: F = !1,
95
+ disableNext: R = !1,
96
+ disablePrevious: S = !1,
97
+ disableEdit: x = !1,
98
+ editOnTop: T = !1,
99
+ //------------------
100
+ goToNext: j = () => {
101
+ },
102
+ goToPrevious: z = () => {
103
+ },
104
+ onEdit: w = () => {
105
+ },
106
+ goBack: I = () => {
107
+ },
108
+ //------------------
109
+ className: M = "",
110
+ style: Q = {},
111
+ color: i = "primary",
112
+ size: s = "small",
113
+ children: O,
114
+ ...$
115
+ } = o, D = E(), L = (l, d) => {
116
+ n && n(), I(l, d);
117
+ };
118
+ return /* @__PURE__ */ t(
119
+ K,
120
+ {
121
+ ref: m,
122
+ theme: D,
123
+ color: i,
124
+ borderRadius: "regular",
125
+ ...$,
126
+ children: [
127
+ /* @__PURE__ */ t(P, { children: [
128
+ C && /* @__PURE__ */ a(
129
+ H,
130
+ {
131
+ leadingIcon: "arrow-circle-left",
132
+ text: _,
133
+ btnType: "outline",
134
+ style: { width: "fit-content" },
135
+ onClick: (l) => L(l, r),
136
+ disabled: F,
137
+ color: i,
138
+ size: s
139
+ },
140
+ 0
141
+ ),
142
+ y && T && /* @__PURE__ */ a(
143
+ c,
144
+ {
145
+ btnType: "outline",
146
+ icon: "pen",
147
+ disabled: x,
148
+ onClick: (l) => w(r, l),
149
+ color: i,
150
+ size: s
151
+ }
152
+ )
153
+ ] }),
154
+ /* @__PURE__ */ a(k, { children: O || /* @__PURE__ */ a(W, { spacing: 10, ...u, children: b.map((l, d) => /* @__PURE__ */ t(A, { ...l, children: [
155
+ /* @__PURE__ */ t(f, { color: i, size: s, children: [
156
+ l.label,
157
+ ":"
158
+ ] }, d),
159
+ r[l.accessor]
160
+ ] }, d)) }) }),
161
+ /* @__PURE__ */ t(P, { children: [
162
+ /* @__PURE__ */ t("div", { children: [
163
+ G && /* @__PURE__ */ t(k, { children: [
164
+ /* @__PURE__ */ a(
165
+ c,
166
+ {
167
+ btnType: "outline",
168
+ icon: "angle-left",
169
+ disabled: S,
170
+ onClick: (l) => z(r, l),
171
+ color: i,
172
+ size: s
173
+ }
174
+ ),
175
+ "  "
176
+ ] }),
177
+ V && /* @__PURE__ */ a(
178
+ c,
179
+ {
180
+ btnType: "outline",
181
+ icon: "angle-right",
182
+ disabled: R,
183
+ onClick: (l) => j(r, l),
184
+ color: i,
185
+ size: s
186
+ }
187
+ )
188
+ ] }),
189
+ y && !T && /* @__PURE__ */ a(
190
+ c,
191
+ {
192
+ btnType: "outline",
193
+ icon: "pen",
194
+ disabled: x,
195
+ onClick: (l) => w(r, l),
196
+ color: i,
197
+ size: s
198
+ }
199
+ )
200
+ ] })
201
+ ]
202
+ }
203
+ );
204
+ });
205
+ N.propTypes = {
206
+ __TYPE__: e.string,
207
+ goBackText: e.string,
208
+ fields: e.array,
209
+ data: e.object,
210
+ showBack: e.bool,
211
+ showNext: e.bool,
212
+ showPrevious: e.bool,
213
+ showEdit: e.bool,
214
+ disableGoBack: e.bool,
215
+ disableNext: e.bool,
216
+ disablePrevious: e.bool,
217
+ disableEdit: e.bool,
218
+ flexGridProps: e.any,
219
+ editOnTop: e.bool,
220
+ //-----------------------------------------------------------
221
+ goToNext: e.func,
222
+ goToPrevious: e.func,
223
+ onEdit: e.func,
224
+ goBack: e.func,
225
+ //------------------------------------------------------------
226
+ className: e.string,
227
+ style: e.object,
228
+ color: e.oneOf([
229
+ "primary",
230
+ "secondary",
231
+ "success",
232
+ "warning",
233
+ "danger",
234
+ "information",
235
+ "neutral",
236
+ "gray"
237
+ ]),
238
+ size: e.oneOf(["small", "medium", "large"])
239
+ };
240
+ N.displayName = "DETAILS_VIEW";
241
+ export {
242
+ N as default
243
+ };
@@ -0,0 +1,114 @@
1
+ "use strict";const t=require("react/jsx-runtime"),i=require("react"),v=require("./emotion-styled.browser.esm-Cbp_XsK4.cjs"),s=require("./index-DXnSjbfJ.cjs"),o=require("./utils-hdRGTsQ7.cjs"),S=require("./emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs"),C=({theme:e,size:y})=>{var u=o.getSizeValueWithUnits(e,y);return`
2
+ min-height: ${u};
3
+ max-height: ${u};
4
+ `},b={small:"0.875rem",medium:"1.125rem",large:"1.375rem"},N=v.newStyled.div`
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ position: relative;
9
+ ${e=>C(e)};
10
+
11
+ /* Removing the default appearance */
12
+ & > :is(.thumb, .thumb::-webkit-slider-thumb) {
13
+ -webkit-appearance: none;
14
+ -webkit-tap-highlight-color: transparent;
15
+ }
16
+
17
+ & > .thumb {
18
+ pointer-events: none;
19
+ position: absolute;
20
+ height: 0;
21
+ width: 100%;
22
+ outline: none;
23
+ }
24
+
25
+ & > .thumb--left {
26
+ z-index: 3;
27
+ }
28
+
29
+ & > .thumb--right {
30
+ z-index: 4;
31
+ }
32
+
33
+ /* For Chrome browsers */
34
+ & > .thumb::-webkit-slider-thumb {
35
+ -webkit-appearance: none; /* Override default look */
36
+ appearance: none;
37
+ width: ${e=>b[e.size]}; /* Set a specific slider handle width */
38
+ height: ${e=>b[e.size]}; /* Slider handle height */
39
+ border-radius: 50%;
40
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,e.disabled===!0?"disabled":"enabled","background")};
41
+ cursor: pointer; /* Cursor on hover */
42
+ border: none;
43
+ pointer-events: all;
44
+ }
45
+
46
+ /* For Firefox browsers */
47
+ & > .thumb::-moz-range-thumb {
48
+ width: ${e=>b[e.size]}; /* Set a specific slider handle width */
49
+ height: ${e=>b[e.size]}; /* Slider handle height */
50
+ border-radius: 50%;
51
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,e.disabled===!0?"disabled":"enabled","background")};
52
+ cursor: pointer; /* Cursor on hover */
53
+ border: none;
54
+ pointer-events: all;
55
+ }
56
+ `,T=v.newStyled.div`
57
+ position: relative;
58
+ width: 100%;
59
+ height: 0.25rem;
60
+ &
61
+ > :is(.slider__track, .slider__range, .slider__left-value, .slider__right-value) {
62
+ position: absolute;
63
+ }
64
+
65
+ & > :is(.slider__track, .slider__range) {
66
+ height: 0.25rem;
67
+ }
68
+
69
+ & > .slider__track {
70
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,"enabled","unfilled")};
71
+ width: 100%;
72
+ z-index: 1;
73
+ border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"regular")};
74
+ }
75
+
76
+ & > .slider__range {
77
+ border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"regular")};
78
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,e.disabled===!0?"disabled":"enabled","background")};
79
+ z-index: 2;
80
+ }
81
+ `,R=v.newStyled.div`
82
+ display: flex;
83
+ flex-direction: column;
84
+ align-items: center;
85
+ position: absolute;
86
+ left: ${e=>`calc(${e.inputValue+"%"} + (${8-e.inputValue*.15}px))`};
87
+ top: ${e=>"calc(-"+b[e.size]+")"};
88
+ transform: translateX(-50%);
89
+ ${e=>o.getComponentTypographyCss(e.theme,"Range",e.size,"enabled")};
90
+ & > .text-content {
91
+ color: white;
92
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,e.disabled===!0?"disabled":"enabled","background")};
93
+ border-radius: 3px;
94
+ z-index: 2;
95
+ padding: 2px 6px;
96
+ }
97
+ & > .arrow {
98
+ & > .outer {
99
+ height: 4px;
100
+ position: relative;
101
+ & > .inner {
102
+ width: 8px;
103
+ height: 8px;
104
+ background-color: ${e=>o.getColorRgbaValue(e.theme,"Range",e.color,e.disabled===!0?"disabled":"enabled","background")};
105
+ transform: rotate(45deg);
106
+ position: absolute;
107
+ top: -6px;
108
+ left: -4px;
109
+ z-index: 1;
110
+ border-radius: 1px;
111
+ }
112
+ }
113
+ }
114
+ `,j=i.forwardRef((e,y)=>{const{minValue:u=null,maxValue:f=null,min:h=0,max:m=100,disabled:g=!1,onChange:w=()=>{},color:V="primary",size:P="small",...z}=e,x={theme:S.useTheme(),size:P,color:V},[_,p]=i.useState(),[r,$]=i.useState(u),[n,k]=i.useState(f);i.useEffect(()=>{$(u),k(f)},[u,f]);const c=i.useRef(null),l=i.useCallback(a=>Math.round((a-h)/(m-h)*100),[h,m]);return i.useEffect(()=>{const a=l(r),d=l(n);c.current&&(c.current.style.left=`${a}%`,c.current.style.width=`${d-a}%`)},[r,l]),i.useEffect(()=>{const a=l(r),d=l(n);c.current&&(c.current.style.width=`${d-a}%`)},[n,l]),i.useEffect(()=>{w({min:r,max:n})},[r,n,w]),t.jsxs(N,{disabled:g,...x,...z,children:[_&&r&&t.jsx(t.Fragment,{children:t.jsxs(R,{...x,inputValue:l(r),disabled:g,children:[t.jsx("div",{className:"text-content",children:r}),t.jsx("div",{className:"arrow",children:t.jsx("div",{className:"outer",children:t.jsx("div",{className:"inner"})})})]})}),_&&n&&t.jsx(t.Fragment,{children:t.jsxs(R,{...x,inputValue:l(n),disabled:g,children:[t.jsx("div",{className:"text-content",children:n}),t.jsx("div",{className:"arrow",children:t.jsx("div",{className:"outer",children:t.jsx("div",{className:"inner"})})})]})}),t.jsx("input",{type:"range",min:h,max:m,value:r|"",onChange:a=>{const d=Math.min(Number(a.target.value),n-1);$(d)},className:"thumb thumb--left",style:{zIndex:r>m-100&&"5"},onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}}),t.jsx("input",{type:"range",min:h,max:m,value:n|"",onChange:a=>{const d=Math.max(Number(a.target.value),r+1);k(d)},className:"thumb thumb--right",onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}}),t.jsxs(T,{...x,disabled:g,children:[t.jsx("div",{className:"slider__track"}),t.jsx("div",{ref:c,className:"slider__range"})]})]})});j.propTypes={minValue:s.PropTypes.number,maxValue:s.PropTypes.number,min:s.PropTypes.number,max:s.PropTypes.number,disabled:s.PropTypes.bool,onChange:s.PropTypes.func,className:s.PropTypes.string,style:s.PropTypes.object,size:s.PropTypes.oneOf(["small","medium","large"]),color:s.PropTypes.oneOf(["primary","secondary","success","danger","warning","disabled","information","neutral","gray"])};module.exports=j;
@@ -0,0 +1,289 @@
1
+ import { jsxs as p, jsx as r, Fragment as R } from "react/jsx-runtime";
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-BZSYYThs.js";
4
+ import { P as i } from "./index-Ds9PUTwb.js";
5
+ import { b as u, c as V, a as E, f as O } from "./utils-DEke8iwo.js";
6
+ import { u as D } from "./emotion-element-5486c51c.browser.esm-CSejtOeT.js";
7
+ const L = ({ theme: e, size: k }) => {
8
+ var s = O(e, k);
9
+ return `
10
+ min-height: ${s};
11
+ max-height: ${s};
12
+ `;
13
+ }, h = {
14
+ small: "0.875rem",
15
+ medium: "1.125rem",
16
+ large: "1.375rem"
17
+ }, U = $.div`
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ position: relative;
22
+ ${(e) => L(e)};
23
+
24
+ /* Removing the default appearance */
25
+ & > :is(.thumb, .thumb::-webkit-slider-thumb) {
26
+ -webkit-appearance: none;
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+
30
+ & > .thumb {
31
+ pointer-events: none;
32
+ position: absolute;
33
+ height: 0;
34
+ width: 100%;
35
+ outline: none;
36
+ }
37
+
38
+ & > .thumb--left {
39
+ z-index: 3;
40
+ }
41
+
42
+ & > .thumb--right {
43
+ z-index: 4;
44
+ }
45
+
46
+ /* For Chrome browsers */
47
+ & > .thumb::-webkit-slider-thumb {
48
+ -webkit-appearance: none; /* Override default look */
49
+ appearance: none;
50
+ width: ${(e) => h[e.size]}; /* Set a specific slider handle width */
51
+ height: ${(e) => h[e.size]}; /* Slider handle height */
52
+ border-radius: 50%;
53
+ background-color: ${(e) => u(
54
+ e.theme,
55
+ "Range",
56
+ e.color,
57
+ e.disabled === !0 ? "disabled" : "enabled",
58
+ "background"
59
+ )};
60
+ cursor: pointer; /* Cursor on hover */
61
+ border: none;
62
+ pointer-events: all;
63
+ }
64
+
65
+ /* For Firefox browsers */
66
+ & > .thumb::-moz-range-thumb {
67
+ width: ${(e) => h[e.size]}; /* Set a specific slider handle width */
68
+ height: ${(e) => h[e.size]}; /* Slider handle height */
69
+ border-radius: 50%;
70
+ background-color: ${(e) => u(
71
+ e.theme,
72
+ "Range",
73
+ e.color,
74
+ e.disabled === !0 ? "disabled" : "enabled",
75
+ "background"
76
+ )};
77
+ cursor: pointer; /* Cursor on hover */
78
+ border: none;
79
+ pointer-events: all;
80
+ }
81
+ `, W = $.div`
82
+ position: relative;
83
+ width: 100%;
84
+ height: 0.25rem;
85
+ &
86
+ > :is(.slider__track, .slider__range, .slider__left-value, .slider__right-value) {
87
+ position: absolute;
88
+ }
89
+
90
+ & > :is(.slider__track, .slider__range) {
91
+ height: 0.25rem;
92
+ }
93
+
94
+ & > .slider__track {
95
+ background-color: ${(e) => u(
96
+ e.theme,
97
+ "Range",
98
+ e.color,
99
+ "enabled",
100
+ "unfilled"
101
+ )};
102
+ width: 100%;
103
+ z-index: 1;
104
+ border-radius: ${(e) => V(e.theme, "regular")};
105
+ }
106
+
107
+ & > .slider__range {
108
+ border-radius: ${(e) => V(e.theme, "regular")};
109
+ background-color: ${(e) => u(
110
+ e.theme,
111
+ "Range",
112
+ e.color,
113
+ e.disabled === !0 ? "disabled" : "enabled",
114
+ "background"
115
+ )};
116
+ z-index: 2;
117
+ }
118
+ `, S = $.div`
119
+ display: flex;
120
+ flex-direction: column;
121
+ align-items: center;
122
+ position: absolute;
123
+ left: ${(e) => `calc(${e.inputValue + "%"} + (${8 - e.inputValue * 0.15}px))`};
124
+ top: ${(e) => "calc(-" + h[e.size] + ")"};
125
+ transform: translateX(-50%);
126
+ ${(e) => E(e.theme, "Range", e.size, "enabled")};
127
+ & > .text-content {
128
+ color: white;
129
+ background-color: ${(e) => u(
130
+ e.theme,
131
+ "Range",
132
+ e.color,
133
+ e.disabled === !0 ? "disabled" : "enabled",
134
+ "background"
135
+ )};
136
+ border-radius: 3px;
137
+ z-index: 2;
138
+ padding: 2px 6px;
139
+ }
140
+ & > .arrow {
141
+ & > .outer {
142
+ height: 4px;
143
+ position: relative;
144
+ & > .inner {
145
+ width: 8px;
146
+ height: 8px;
147
+ background-color: ${(e) => u(
148
+ e.theme,
149
+ "Range",
150
+ e.color,
151
+ e.disabled === !0 ? "disabled" : "enabled",
152
+ "background"
153
+ )};
154
+ transform: rotate(45deg);
155
+ position: absolute;
156
+ top: -6px;
157
+ left: -4px;
158
+ z-index: 1;
159
+ border-radius: 1px;
160
+ }
161
+ }
162
+ }
163
+ `, B = F.forwardRef((e, k) => {
164
+ const {
165
+ minValue: s = null,
166
+ maxValue: v = null,
167
+ min: c = 0,
168
+ max: m = 100,
169
+ disabled: b = !1,
170
+ onChange: _ = () => {
171
+ },
172
+ color: C = "primary",
173
+ size: P = "small",
174
+ ...M
175
+ } = e, g = { theme: D(), size: P, color: C }, [y, f] = w(), [t, z] = w(s), [a, N] = w(v);
176
+ x(() => {
177
+ z(s), N(v);
178
+ }, [s, v]);
179
+ const d = T(null), l = j(
180
+ (n) => Math.round((n - c) / (m - c) * 100),
181
+ [c, m]
182
+ );
183
+ return x(() => {
184
+ const n = l(t), o = l(a);
185
+ d.current && (d.current.style.left = `${n}%`, d.current.style.width = `${o - n}%`);
186
+ }, [t, l]), x(() => {
187
+ const n = l(t), o = l(a);
188
+ d.current && (d.current.style.width = `${o - n}%`);
189
+ }, [a, l]), x(() => {
190
+ _({ min: t, max: a });
191
+ }, [t, a, _]), /* @__PURE__ */ p(U, { disabled: b, ...g, ...M, children: [
192
+ y && t && /* @__PURE__ */ r(R, { children: /* @__PURE__ */ p(
193
+ S,
194
+ {
195
+ ...g,
196
+ inputValue: l(t),
197
+ disabled: b,
198
+ children: [
199
+ /* @__PURE__ */ r("div", { className: "text-content", children: t }),
200
+ /* @__PURE__ */ r("div", { className: "arrow", children: /* @__PURE__ */ r("div", { className: "outer", children: /* @__PURE__ */ r("div", { className: "inner" }) }) })
201
+ ]
202
+ }
203
+ ) }),
204
+ y && a && /* @__PURE__ */ r(R, { children: /* @__PURE__ */ p(
205
+ S,
206
+ {
207
+ ...g,
208
+ inputValue: l(a),
209
+ disabled: b,
210
+ children: [
211
+ /* @__PURE__ */ r("div", { className: "text-content", children: a }),
212
+ /* @__PURE__ */ r("div", { className: "arrow", children: /* @__PURE__ */ r("div", { className: "outer", children: /* @__PURE__ */ r("div", { className: "inner" }) }) })
213
+ ]
214
+ }
215
+ ) }),
216
+ /* @__PURE__ */ r(
217
+ "input",
218
+ {
219
+ type: "range",
220
+ min: c,
221
+ max: m,
222
+ value: t | "",
223
+ onChange: (n) => {
224
+ const o = Math.min(Number(n.target.value), a - 1);
225
+ z(o);
226
+ },
227
+ className: "thumb thumb--left",
228
+ style: { zIndex: t > m - 100 && "5" },
229
+ onMouseEnter: () => {
230
+ f(!0);
231
+ },
232
+ onMouseLeave: () => {
233
+ f(!1);
234
+ }
235
+ }
236
+ ),
237
+ /* @__PURE__ */ r(
238
+ "input",
239
+ {
240
+ type: "range",
241
+ min: c,
242
+ max: m,
243
+ value: a | "",
244
+ onChange: (n) => {
245
+ const o = Math.max(Number(n.target.value), t + 1);
246
+ N(o);
247
+ },
248
+ className: "thumb thumb--right",
249
+ onMouseEnter: () => {
250
+ f(!0);
251
+ },
252
+ onMouseLeave: () => {
253
+ f(!1);
254
+ }
255
+ }
256
+ ),
257
+ /* @__PURE__ */ p(W, { ...g, disabled: b, children: [
258
+ /* @__PURE__ */ r("div", { className: "slider__track" }),
259
+ /* @__PURE__ */ r("div", { ref: d, className: "slider__range" })
260
+ ] })
261
+ ] });
262
+ });
263
+ B.propTypes = {
264
+ minValue: i.number,
265
+ maxValue: i.number,
266
+ min: i.number,
267
+ max: i.number,
268
+ disabled: i.bool,
269
+ //-----------------------------
270
+ onChange: i.func,
271
+ //-------------------------
272
+ className: i.string,
273
+ style: i.object,
274
+ size: i.oneOf(["small", "medium", "large"]),
275
+ color: i.oneOf([
276
+ "primary",
277
+ "secondary",
278
+ "success",
279
+ "danger",
280
+ "warning",
281
+ "disabled",
282
+ "information",
283
+ "neutral",
284
+ "gray"
285
+ ])
286
+ };
287
+ export {
288
+ B as default
289
+ };