linear-react-components-ui 1.1.26-beta-1 → 1.1.26-beta.10

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 (225) hide show
  1. package/lib/alerts/AlertContainer.js +8 -2
  2. package/lib/alerts/AlertProvider.js +11 -5
  3. package/lib/alerts/BaseAlert.js +10 -8
  4. package/lib/alerts/Message.js +91 -64
  5. package/lib/alerts/withAlert.js +10 -6
  6. package/lib/assets/BaseAlert.css +1 -1
  7. package/lib/assets/Content.css +1 -1
  8. package/lib/assets/DefaultFile.css +1 -1
  9. package/lib/assets/Drawer.css +1 -1
  10. package/lib/assets/index11.css +1 -1
  11. package/lib/assets/index5.css +1 -1
  12. package/lib/avatar/index.js +29 -51
  13. package/lib/badge/index.js +25 -23
  14. package/lib/buttons/ActivateButton.js +9 -4
  15. package/lib/buttons/AddButton.js +12 -5
  16. package/lib/buttons/Button.js +16 -5
  17. package/lib/buttons/ButtonGroups.js +10 -3
  18. package/lib/buttons/CancelButton.js +14 -4
  19. package/lib/buttons/DangerButton.js +15 -4
  20. package/lib/buttons/DefaultButton.js +76 -111
  21. package/lib/buttons/DestroyButton.js +21 -5
  22. package/lib/buttons/EditButton.js +9 -4
  23. package/lib/buttons/InactivateButton.js +9 -4
  24. package/lib/buttons/InfoButton.js +15 -4
  25. package/lib/buttons/PrimaryButton.js +15 -4
  26. package/lib/buttons/RestoreButton.js +9 -4
  27. package/lib/buttons/SaveButton.js +14 -4
  28. package/lib/buttons/SuccessButton.js +15 -4
  29. package/lib/buttons/WarningButton.js +15 -4
  30. package/lib/buttons/button_container/index.js +21 -16
  31. package/lib/buttons/split_button/index.js +53 -55
  32. package/lib/calendar/DangerCalendar.js +18 -4
  33. package/lib/calendar/InfoCalendar.js +18 -4
  34. package/lib/calendar/PrimaryCalendar.js +18 -4
  35. package/lib/calendar/SuccessCalendar.js +18 -4
  36. package/lib/calendar/WarningCalendar.js +18 -4
  37. package/lib/calendar/base/Day.js +32 -22
  38. package/lib/calendar/base/Month.js +24 -21
  39. package/lib/calendar/base/Week.js +20 -19
  40. package/lib/calendar/base/helpers.js +11 -19
  41. package/lib/calendar/base/index.js +129 -97
  42. package/lib/checkbox/index.js +6 -5
  43. package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
  44. package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
  45. package/lib/chunks/index.aw0XaUkg.js +266 -0
  46. package/lib/chunks/jsx-runtime.D1SHvdVE.js +282 -0
  47. package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
  48. package/lib/chunks/moment.DMLRxgRE.js +2589 -0
  49. package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
  50. package/lib/chunks/v1.Ds1rkxUj.js +49 -0
  51. package/lib/dialog/Alert.js +18 -17
  52. package/lib/dialog/Custom.js +42 -28
  53. package/lib/dialog/Error.js +18 -17
  54. package/lib/dialog/Information.js +18 -17
  55. package/lib/dialog/Question.js +43 -59
  56. package/lib/dialog/Warning.js +18 -17
  57. package/lib/dialog/base/Content.js +13 -4
  58. package/lib/dialog/base/Footer.js +8 -3
  59. package/lib/dialog/base/Header.js +4 -3
  60. package/lib/dialog/base/index.js +5 -4
  61. package/lib/dialog/form/index.js +5 -4
  62. package/lib/dialog/index.js +1 -1
  63. package/lib/dialog/wizard/index.js +11 -10
  64. package/lib/dialog/wizard/progressbar.js +96 -3
  65. package/lib/dialog/wizard/step.js +4 -3
  66. package/lib/dialog/wizard/useWizard.js +42 -29
  67. package/lib/drawer/Content.js +15 -8
  68. package/lib/drawer/Drawer.js +38 -35
  69. package/lib/drawer/Header.js +53 -40
  70. package/lib/drawer/helpers.js +2 -2
  71. package/lib/dropdown/Popup.js +4 -2
  72. package/lib/dropdown/withDropdown.js +75 -50
  73. package/lib/fieldset/index.js +66 -47
  74. package/lib/form/Field.js +88 -62
  75. package/lib/form/FieldArray.js +18 -39
  76. package/lib/form/FieldNumber.js +42 -38
  77. package/lib/form/FieldPeriod.js +90 -59
  78. package/lib/form/helpers.js +14 -11
  79. package/lib/form/index.js +88 -100
  80. package/lib/form/withFieldHOC.js +57 -48
  81. package/lib/form/withFormSecurity.js +15 -18
  82. package/lib/gridlayout/GridCol.js +21 -20
  83. package/lib/gridlayout/GridRow.js +22 -20
  84. package/lib/hint/helpers.js +6 -2
  85. package/lib/hint/index.js +27 -25
  86. package/lib/icons/helper.js +142 -569
  87. package/lib/icons/index.js +62 -57
  88. package/lib/index.js +20 -19
  89. package/lib/inputs/base/InputTextBase.js +121 -207
  90. package/lib/inputs/base/Label.js +27 -29
  91. package/lib/inputs/base/helpers.d.ts +3 -3
  92. package/lib/inputs/base/helpers.js +4 -2
  93. package/lib/inputs/color/index.js +52 -73
  94. package/lib/inputs/date/Dialog.js +15 -16
  95. package/lib/inputs/date/Dropdown.js +16 -14
  96. package/lib/inputs/date/helpers.js +7 -7
  97. package/lib/inputs/date/index.js +101 -147
  98. package/lib/inputs/errorMessage/index.js +21 -13
  99. package/lib/inputs/file/DefaultFile.js +64 -67
  100. package/lib/inputs/file/DragDropFile.js +79 -135
  101. package/lib/inputs/file/File.d.ts +1 -1
  102. package/lib/inputs/file/File.js +24 -39
  103. package/lib/inputs/file/FileButtonSettings.js +20 -17
  104. package/lib/inputs/inputHOC.js +38 -20
  105. package/lib/inputs/mask/BaseMask.js +51 -30
  106. package/lib/inputs/mask/Cnpj.js +42 -36
  107. package/lib/inputs/mask/Cpf.js +45 -33
  108. package/lib/inputs/mask/Phone.js +10 -6
  109. package/lib/inputs/mask/ZipCode.js +9 -4
  110. package/lib/inputs/mask/helpers.d.ts +33 -33
  111. package/lib/inputs/mask/helpers.js +44 -44
  112. package/lib/inputs/multiSelect/ActionButtons.js +35 -46
  113. package/lib/inputs/multiSelect/Dropdown.js +94 -133
  114. package/lib/inputs/multiSelect/helper.js +4 -7
  115. package/lib/inputs/multiSelect/index.js +167 -127
  116. package/lib/inputs/number/BaseNumber.js +43 -31
  117. package/lib/inputs/number/Currency.js +19 -12
  118. package/lib/inputs/number/Decimal.js +9 -4
  119. package/lib/inputs/number/index.js +31 -35
  120. package/lib/inputs/period/Dialog.js +16 -16
  121. package/lib/inputs/period/Dropdown.js +15 -15
  122. package/lib/inputs/period/PeriodList.js +41 -27
  123. package/lib/inputs/period/helper.js +8 -4
  124. package/lib/inputs/period/index.js +192 -330
  125. package/lib/inputs/search/index.js +95 -71
  126. package/lib/inputs/select/ActionButtons.js +24 -45
  127. package/lib/inputs/select/Dropdown.js +61 -110
  128. package/lib/inputs/select/helper.d.ts +1 -1
  129. package/lib/inputs/select/helper.js +43 -45
  130. package/lib/inputs/select/index.js +23 -25
  131. package/lib/inputs/select/multiple/Selecteds.js +23 -19
  132. package/lib/inputs/select/multiple/index.js +106 -176
  133. package/lib/inputs/select/simple/index.js +126 -196
  134. package/lib/inputs/text/index.js +9 -4
  135. package/lib/inputs/textarea/index.js +13 -15
  136. package/lib/internals/withTooltip.js +114 -67
  137. package/lib/labelMessages/index.js +50 -45
  138. package/lib/labels/DangerLabel.js +18 -4
  139. package/lib/labels/DefaultLabel.js +53 -39
  140. package/lib/labels/InfoLabel.js +18 -4
  141. package/lib/labels/PrimaryLabel.js +18 -4
  142. package/lib/labels/SuccessLabel.js +18 -4
  143. package/lib/labels/WarningLabel.js +18 -4
  144. package/lib/labels/label_container/index.js +15 -9
  145. package/lib/list/Header.js +18 -6
  146. package/lib/list/Item.js +5 -4
  147. package/lib/list/Separator.js +8 -3
  148. package/lib/list/helpers.js +2 -2
  149. package/lib/list/index.js +21 -18
  150. package/lib/menus/float/MenuItem.js +49 -52
  151. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  152. package/lib/menus/float/index.js +102 -81
  153. package/lib/menus/sidenav/ExpandMenu.js +17 -15
  154. package/lib/menus/sidenav/MenuLink.js +21 -14
  155. package/lib/menus/sidenav/NavMenuGroup.js +19 -14
  156. package/lib/menus/sidenav/NavMenuItem.js +131 -111
  157. package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
  158. package/lib/menus/sidenav/helpers.js +4 -4
  159. package/lib/menus/sidenav/index.js +145 -123
  160. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
  161. package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
  162. package/lib/noPermission/index.js +13 -8
  163. package/lib/panel/Content.js +49 -40
  164. package/lib/panel/DangerPanel.js +10 -5
  165. package/lib/panel/Default.js +62 -36
  166. package/lib/panel/Header.js +53 -37
  167. package/lib/panel/InfoPanel.js +10 -5
  168. package/lib/panel/PrimaryPanel.js +10 -5
  169. package/lib/panel/SuccessPanel.js +10 -5
  170. package/lib/panel/ToolBar.js +17 -4
  171. package/lib/panel/WarningPanel.js +10 -5
  172. package/lib/panel/helpers.js +8 -5
  173. package/lib/permissionValidations.js +15 -11
  174. package/lib/popover/PopoverText.js +12 -5
  175. package/lib/popover/PopoverTitle.js +10 -3
  176. package/lib/popover/index.js +36 -56
  177. package/lib/progress/Bar.js +43 -34
  178. package/lib/progress/index.js +23 -18
  179. package/lib/radio/index.js +105 -89
  180. package/lib/shortcuts/index.js +20 -7
  181. package/lib/skeleton/SkeletonContainer.js +16 -6
  182. package/lib/skeleton/index.js +42 -18
  183. package/lib/spinner/SpinnerLoading.js +53 -16
  184. package/lib/spinner/index.js +47 -37
  185. package/lib/split/Split.js +83 -79
  186. package/lib/split/SplitSide.js +24 -16
  187. package/lib/table/Body.js +36 -49
  188. package/lib/table/Header.js +45 -35
  189. package/lib/table/HeaderColumn.js +40 -27
  190. package/lib/table/Row.js +47 -48
  191. package/lib/table/RowColumn.js +50 -38
  192. package/lib/table/helpers.js +3 -1
  193. package/lib/table/index.js +101 -104
  194. package/lib/tabs/DropdownTabs.js +64 -61
  195. package/lib/tabs/Menu.js +35 -49
  196. package/lib/tabs/MenuTabs.js +59 -84
  197. package/lib/tabs/Panel.js +57 -47
  198. package/lib/tabs/context.js +36 -40
  199. package/lib/tabs/index.js +69 -64
  200. package/lib/tabs/tabHelpers.js +10 -8
  201. package/lib/textContent/index.js +30 -32
  202. package/lib/toolbar/ButtonBar.js +62 -58
  203. package/lib/toolbar/LabelBar.js +46 -38
  204. package/lib/toolbar/Separator.js +8 -3
  205. package/lib/toolbar/ToolBarGroup.js +14 -3
  206. package/lib/toolbar/index.js +35 -29
  207. package/lib/tooltip/index.js +24 -24
  208. package/lib/treetable/Body.js +26 -27
  209. package/lib/treetable/Header.js +23 -19
  210. package/lib/treetable/Row.js +210 -147
  211. package/lib/treetable/helpers.d.ts +4 -5
  212. package/lib/treetable/helpers.js +6 -14
  213. package/lib/treetable/index.js +25 -15
  214. package/lib/treeview/Header.js +13 -5
  215. package/lib/treeview/Node.js +198 -175
  216. package/lib/treeview/index.js +257 -174
  217. package/lib/uitour/index.js +167 -166
  218. package/package.json +32 -43
  219. package/lib/chunks/index.CmrLK9Qe.js +0 -675
  220. package/lib/chunks/index.D5f6Ow9V.js +0 -89
  221. package/lib/chunks/index.yztgndLc.js +0 -206
  222. package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
  223. package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
  224. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  225. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,80 +1,104 @@
1
- import { j as a } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as u, useEffect as S, Fragment as E } from "react";
3
- import I from "../base/InputTextBase.js";
4
- import w from "../../buttons/Button.js";
5
- import m from "../../icons/index.js";
1
+ import { j as s } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as M } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as q, useEffect as N, Fragment as Q } from "react";
4
+ import U from "../base/InputTextBase.js";
5
+ import W from "../../buttons/Button.js";
6
+ import z from "../../icons/index.js";
6
7
  import '../../assets/button.css';import '../../assets/index25.css';/* empty css */
7
- import D from "../../drawer/index.js";
8
- import P from "../../drawer/Header.js";
9
- import T from "../../drawer/Content.js";
10
- const M = (e) => {
11
- const { resetButton: g = !0, advancedFilterProps: h = {}, value: s } = e, [i, C] = u(!1), [l, c] = u(""), [t, v] = u(), { headerTitle: x, content: p, onStateChange: r, ...O } = h, b = (o) => {
12
- e.onReset && e.onReset(o), c("");
13
- }, y = (o) => {
14
- o && (e.onChange && e.onChange(o), c(o.target.value));
15
- }, d = () => e.disabled || t && (t.disabled || t.hideContent), j = () => e.readOnly || t && t.readOnly, B = t == null ? void 0 : t.hideContent, k = () => {
16
- const o = j() || d() || B;
17
- let n = {
18
- icon: /* @__PURE__ */ a.jsx(m, { name: "filter1", color: "#a9a8a8" }, "filter-icon"),
8
+ import X from "../../drawer/index.js";
9
+ import Y from "../../drawer/Header.js";
10
+ import Z from "../../drawer/Content.js";
11
+ const re = (t) => {
12
+ const e = M.c(53), {
13
+ resetButton: G,
14
+ advancedFilterProps: j,
15
+ value: r
16
+ } = t, P = G === void 0 ? !0 : G;
17
+ let O;
18
+ e[0] !== j ? (O = j === void 0 ? {} : j, e[0] = j, e[1] = O) : O = e[1];
19
+ const m = O, [d, J] = q(!1), [o, w] = q(""), [n, K] = q();
20
+ let u, h, c, l;
21
+ e[2] !== m ? ({
22
+ headerTitle: c,
23
+ content: h,
24
+ onStateChange: l,
25
+ ...u
26
+ } = m, e[2] = m, e[3] = u, e[4] = h, e[5] = c, e[6] = l) : (u = e[3], h = e[4], c = e[5], l = e[6]);
27
+ let g;
28
+ e[7] !== t ? (g = (a) => {
29
+ t.onReset && t.onReset(a), w("");
30
+ }, e[7] = t, e[8] = g) : g = e[8];
31
+ const C = g;
32
+ let y;
33
+ e[9] !== t ? (y = (a) => {
34
+ a && (t.onChange && t.onChange(a), w(a.target.value));
35
+ }, e[9] = t, e[10] = y) : y = e[10];
36
+ const T = y;
37
+ let B;
38
+ e[11] !== n || e[12] !== t.disabled ? (B = () => t.disabled || n && (n.disabled || n.hideContent), e[11] = n, e[12] = t.disabled, e[13] = B) : B = e[13];
39
+ const f = B;
40
+ let F;
41
+ e[14] !== n || e[15] !== t.readOnly ? (F = () => t.readOnly || n && n.readOnly, e[14] = n, e[15] = t.readOnly, e[16] = F) : F = e[16];
42
+ const k = F, A = n?.hideContent;
43
+ let R;
44
+ e[17] !== d || e[18] !== A || e[19] !== l || e[20] !== t || e[21] !== k || e[22] !== f ? (R = () => {
45
+ const a = k() || f() || A;
46
+ let i = {
47
+ icon: /* @__PURE__ */ s.jsx(z, { name: "filter1", color: "#a9a8a8" }, "filter-icon"),
19
48
  key: "advanced-filter-button",
20
49
  boxShadow: !1,
21
- readOnly: j(),
22
- style: { padding: "0 0 0 5px", width: 30 },
50
+ readOnly: k(),
51
+ style: {
52
+ padding: "0 0 0 5px",
53
+ width: 30
54
+ },
23
55
  transparent: !0,
24
- disabled: d()
56
+ disabled: f()
25
57
  };
26
- return o || (n = {
27
- ...n,
28
- onClick: (f) => {
29
- e.onClick && e.onClick(f), C(!i), r && r(!i);
30
- },
31
- ...n
32
- }), n;
33
- }, F = () => {
34
- const o = Object.keys(h).length > 0;
35
- let n = [/* @__PURE__ */ a.jsx(m, { name: "search", color: "#a9a8a8", disabled: d() }, "search-icon")];
36
- const f = /* @__PURE__ */ a.jsx(
37
- m,
38
- {
39
- name: "cancel2",
40
- color: "#a9a8a8",
41
- style: { cursor: "pointer", pointerEvents: "auto" },
42
- onClick: b
58
+ return a || (i = {
59
+ ...i,
60
+ onClick: ($) => {
61
+ t.onClick && t.onClick($), J(!d), l && l(!d);
43
62
  },
44
- "inputSearchIcon"
45
- ), R = /* @__PURE__ */ a.jsx(w, { ...k() });
46
- return o && (n = [...n, R]), g && l.trim() !== "" && (n = [f, ...n]), n;
47
- };
48
- return S(() => {
49
- s !== void 0 && s !== l && c(s);
50
- }, [s]), t && t.unvisible ? null : /* @__PURE__ */ a.jsxs(E, { children: [
51
- /* @__PURE__ */ a.jsx(
52
- I,
53
- {
54
- ...e,
55
- onReset: b,
56
- onChange: y,
57
- value: l,
58
- customClass: "",
59
- handlerSetOnDenied: v,
60
- rightElements: F()
61
- }
62
- ),
63
- i && /* @__PURE__ */ a.jsxs(
64
- D,
65
- {
66
- handlerClose: () => {
67
- C(!1), r && r(!1);
68
- },
69
- ...O,
70
- children: [
71
- x && /* @__PURE__ */ a.jsx(P, { title: x }),
72
- /* @__PURE__ */ a.jsx(T, { children: p })
73
- ]
74
- }
75
- )
76
- ] });
63
+ ...i
64
+ }), i;
65
+ }, e[17] = d, e[18] = A, e[19] = l, e[20] = t, e[21] = k, e[22] = f, e[23] = R) : R = e[23];
66
+ const H = R;
67
+ let E;
68
+ e[24] !== m || e[25] !== H || e[26] !== C || e[27] !== P || e[28] !== f || e[29] !== o ? (E = () => {
69
+ const a = Object.keys(m).length > 0;
70
+ let i = [/* @__PURE__ */ s.jsx(z, { name: "search", color: "#a9a8a8", disabled: f() }, "search-icon")];
71
+ const $ = /* @__PURE__ */ s.jsx(z, { name: "cancel2", color: "#a9a8a8", style: {
72
+ cursor: "pointer",
73
+ pointerEvents: "auto"
74
+ }, onClick: C }, "inputSearchIcon"), L = /* @__PURE__ */ s.jsx(W, { ...H() });
75
+ return a && (i = [...i, L]), P && o.trim() !== "" && (i = [$, ...i]), i;
76
+ }, e[24] = m, e[25] = H, e[26] = C, e[27] = P, e[28] = f, e[29] = o, e[30] = E) : E = e[30];
77
+ const V = E;
78
+ let S;
79
+ e[31] !== o || e[32] !== r ? (S = () => {
80
+ r !== void 0 && r !== o && w(r);
81
+ }, e[31] = o, e[32] = r, e[33] = S) : S = e[33];
82
+ let D;
83
+ if (e[34] !== r ? (D = [r], e[34] = r, e[35] = D) : D = e[35], N(S, D), n && n.unvisible)
84
+ return null;
85
+ let x;
86
+ e[36] !== V ? (x = V(), e[36] = V, e[37] = x) : x = e[37];
87
+ let b;
88
+ e[38] !== T || e[39] !== C || e[40] !== t || e[41] !== x || e[42] !== o ? (b = /* @__PURE__ */ s.jsx(U, { ...t, onReset: C, onChange: T, value: o, customClass: "", handlerSetOnDenied: K, rightElements: x }), e[38] = T, e[39] = C, e[40] = t, e[41] = x, e[42] = o, e[43] = b) : b = e[43];
89
+ let v;
90
+ e[44] !== d || e[45] !== u || e[46] !== h || e[47] !== c || e[48] !== l ? (v = d && /* @__PURE__ */ s.jsxs(X, { handlerClose: () => {
91
+ J(!1), l && l(!1);
92
+ }, ...u, children: [
93
+ c && /* @__PURE__ */ s.jsx(Y, { title: c }),
94
+ /* @__PURE__ */ s.jsx(Z, { children: h })
95
+ ] }), e[44] = d, e[45] = u, e[46] = h, e[47] = c, e[48] = l, e[49] = v) : v = e[49];
96
+ let I;
97
+ return e[50] !== b || e[51] !== v ? (I = /* @__PURE__ */ s.jsxs(Q, { children: [
98
+ b,
99
+ v
100
+ ] }), e[50] = b, e[51] = v, e[52] = I) : I = e[52], I;
77
101
  };
78
102
  export {
79
- M as default
103
+ re as default
80
104
  };
@@ -1,49 +1,28 @@
1
- import { j as n } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import e from "../../icons/index.js";
3
- const d = (o) => {
4
- const {
5
- disabled: t = !1,
6
- showClearButton: s = !0,
7
- dropDownOpened: a,
1
+ import { j as l } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as j } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import b from "../../icons/index.js";
4
+ const B = (x) => {
5
+ const t = j.c(14), {
6
+ disabled: m,
7
+ showClearButton: p,
8
+ dropDownOpened: f,
8
9
  handlerOpenClose: c,
9
- handlerClear: i,
10
- customClassForSideButtons: l
11
- } = o;
12
- return /* @__PURE__ */ n.jsxs("div", { className: `actionbuttonsselect ${l}`, children: [
13
- s && /* @__PURE__ */ n.jsx(
14
- "button",
15
- {
16
- disabled: t,
17
- tabIndex: -1,
18
- className: "actionbutton buttonclear",
19
- onClick: i,
20
- children: /* @__PURE__ */ n.jsx(
21
- e,
22
- {
23
- name: "cancel",
24
- pointerEvents: "none"
25
- }
26
- )
27
- }
28
- ),
29
- /* @__PURE__ */ n.jsx(
30
- "button",
31
- {
32
- disabled: t,
33
- tabIndex: -1,
34
- className: "actionbutton buttonopenclose",
35
- onClick: c,
36
- children: /* @__PURE__ */ n.jsx(
37
- e,
38
- {
39
- pointerEvents: "none",
40
- name: a ? "mini_up" : "mini_down"
41
- }
42
- )
43
- }
44
- )
45
- ] });
10
+ handlerClear: a,
11
+ customClassForSideButtons: h
12
+ } = x, e = m === void 0 ? !1 : m, r = p === void 0 ? !0 : p, d = `actionbuttonsselect ${h}`;
13
+ let n;
14
+ t[0] !== e || t[1] !== a || t[2] !== r ? (n = r && /* @__PURE__ */ l.jsx("button", { disabled: e, tabIndex: -1, className: "actionbutton buttonclear", onClick: a, children: /* @__PURE__ */ l.jsx(b, { name: "cancel", pointerEvents: "none" }) }), t[0] = e, t[1] = a, t[2] = r, t[3] = n) : n = t[3];
15
+ const u = f ? "mini_up" : "mini_down";
16
+ let o;
17
+ t[4] !== u ? (o = /* @__PURE__ */ l.jsx(b, { pointerEvents: "none", name: u }), t[4] = u, t[5] = o) : o = t[5];
18
+ let s;
19
+ t[6] !== e || t[7] !== c || t[8] !== o ? (s = /* @__PURE__ */ l.jsx("button", { disabled: e, tabIndex: -1, className: "actionbutton buttonopenclose", onClick: c, children: o }), t[6] = e, t[7] = c, t[8] = o, t[9] = s) : s = t[9];
20
+ let i;
21
+ return t[10] !== d || t[11] !== n || t[12] !== s ? (i = /* @__PURE__ */ l.jsxs("div", { className: d, children: [
22
+ n,
23
+ s
24
+ ] }), t[10] = d, t[11] = n, t[12] = s, t[13] = i) : i = t[13], i;
46
25
  };
47
26
  export {
48
- d as default
27
+ B as default
49
28
  };
@@ -1,118 +1,69 @@
1
- import { j as n } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as I, useEffect as P } from "react";
3
- import h from "../../icons/index.js";
4
- import A from "../../avatar/index.js";
5
- import { returnDropdownDynamicStyles as x, getDropdownItemCssClass as B } from "./helper.js";
6
- import E from "../../dropdown/Popup.js";
1
+ import { j as n } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { useState as I, useEffect as R } from "react";
3
+ import f from "../../icons/index.js";
4
+ import P from "../../avatar/index.js";
5
+ import { returnDropdownDynamicStyles as h, getDropdownItemCssClass as A } from "./helper.js";
6
+ import B from "../../dropdown/Popup.js";
7
7
  const V = (s) => {
8
8
  const {
9
- imageAlign: i = "left",
10
- striped: y = !1,
11
- dataCombo: t,
9
+ imageAlign: c = "left",
10
+ striped: x = !1,
11
+ dataCombo: o,
12
12
  descriptionKey: r,
13
- imgSrcKey: g,
13
+ imgSrcKey: y,
14
14
  dropdownRef: a,
15
15
  currents: l = [],
16
- dropdownWidth: w,
17
- gridWrapperStyle: m,
18
- handleOnSelect: j,
19
- inputValue: D,
20
- handleOnFocus: N,
21
- opened: S,
22
- handleOnFilter: v,
23
- selected: p = null,
24
- searchOnDropdown: C,
25
- handleOnKeydown: K,
26
- searchNotFoundText: b,
27
- idKey: o,
28
- selectFieldRef: d
29
- } = s, [c, O] = I(x({ ...s }));
30
- return P(() => {
31
- a.current && O(x({ ...s }));
32
- }, [a.current, t]), /* @__PURE__ */ n.jsx(
33
- E,
34
- {
35
- align: "left",
36
- leftPosition: c.left,
37
- topPosition: c.top,
38
- targetRef: d == null ? void 0 : d.current,
39
- children: /* @__PURE__ */ n.jsxs(
40
- "div",
41
- {
42
- className: "select-dropdown",
43
- ref: a,
44
- style: {
45
- width: w,
46
- marginLeft: m ? m.paddingLeft : "0",
47
- maxHeight: c.maxHeight
48
- },
49
- children: [
50
- C && /* @__PURE__ */ n.jsxs("div", { className: "filtercontainer", children: [
51
- /* @__PURE__ */ n.jsx(
52
- "input",
53
- {
54
- className: "filterinput",
55
- type: "text",
56
- value: D,
57
- onFocus: () => {
58
- N();
59
- },
60
- onChange: (e) => {
61
- v(e.target.value);
62
- },
63
- onKeyDown: (e) => {
64
- K(e);
65
- },
66
- autoFocus: S
67
- }
68
- ),
69
- /* @__PURE__ */ n.jsx(h, { name: "search", viewBox: "0 0 32 32" })
70
- ] }),
71
- t.map((e) => {
72
- const u = l && l.length > 0 ? l.some((f) => f[o] === e[o]) : !1, F = !!(p && p[o] === e[o]);
73
- return /* @__PURE__ */ n.jsx(
74
- "div",
75
- {
76
- className: B(F, u, y),
77
- children: /* @__PURE__ */ n.jsxs(
78
- "button",
79
- {
80
- className: "menubutton",
81
- tabIndex: -1,
82
- onClick: (f) => {
83
- u || j(e);
84
- },
85
- children: [
86
- e.iconName && /* @__PURE__ */ n.jsx(
87
- h,
88
- {
89
- name: e.iconName,
90
- customClass: "menuicon",
91
- style: { order: i === "left" ? 0 : 1 }
92
- }
93
- ),
94
- g && e.imgSrcKey && /* @__PURE__ */ n.jsx(
95
- A,
96
- {
97
- src: e.imgSrcKey,
98
- customClass: "menuicon",
99
- style: { order: i === "left" ? 0 : 1 }
100
- }
101
- ),
102
- /* @__PURE__ */ n.jsx("span", { className: "label", children: typeof r == "string" ? e[r] : r(e) })
103
- ]
104
- }
105
- )
106
- },
107
- `dropdowmIten ${e[o]}}`
108
- );
109
- }),
110
- t && t.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "notfound", children: b })
111
- ]
112
- }
113
- )
114
- }
115
- );
16
+ dropdownWidth: g,
17
+ gridWrapperStyle: i,
18
+ handleOnSelect: w,
19
+ inputValue: j,
20
+ handleOnFocus: D,
21
+ opened: N,
22
+ handleOnFilter: S,
23
+ selected: m = null,
24
+ searchOnDropdown: v,
25
+ handleOnKeydown: C,
26
+ searchNotFoundText: K,
27
+ idKey: t,
28
+ selectFieldRef: b
29
+ } = s, [d, F] = I(h({
30
+ ...s
31
+ }));
32
+ return R(() => {
33
+ a.current && F(h({
34
+ ...s
35
+ }));
36
+ }, [a.current, o]), /* @__PURE__ */ n.jsx(B, { align: "left", leftPosition: d.left, topPosition: d.top, targetRef: b?.current, children: /* @__PURE__ */ n.jsxs("div", { className: "select-dropdown", ref: a, style: {
37
+ width: g,
38
+ marginLeft: i ? i.paddingLeft : "0",
39
+ maxHeight: d.maxHeight
40
+ }, children: [
41
+ v && /* @__PURE__ */ n.jsxs("div", { className: "filtercontainer", children: [
42
+ /* @__PURE__ */ n.jsx("input", { className: "filterinput", type: "text", value: j, onFocus: () => {
43
+ D();
44
+ }, onChange: (e) => {
45
+ S(e.target.value);
46
+ }, onKeyDown: (e) => {
47
+ C(e);
48
+ }, autoFocus: N }),
49
+ /* @__PURE__ */ n.jsx(f, { name: "search", viewBox: "0 0 32 32" })
50
+ ] }),
51
+ o.map((e) => {
52
+ const p = l && l.length > 0 ? l.some((u) => u[t] === e[t]) : !1, O = !!(m && m[t] === e[t]);
53
+ return /* @__PURE__ */ n.jsx("div", { className: A(O, p, x), children: /* @__PURE__ */ n.jsxs("button", { className: "menubutton", tabIndex: -1, onClick: (u) => {
54
+ p || w(e);
55
+ }, children: [
56
+ e.iconName && /* @__PURE__ */ n.jsx(f, { name: e.iconName, customClass: "menuicon", style: {
57
+ order: c === "left" ? 0 : 1
58
+ } }),
59
+ y && e.imgSrcKey && /* @__PURE__ */ n.jsx(P, { src: e.imgSrcKey, customClass: "menuicon", style: {
60
+ order: c === "left" ? 0 : 1
61
+ } }),
62
+ /* @__PURE__ */ n.jsx("span", { className: "label", children: typeof r == "string" ? e[r] : r(e) })
63
+ ] }) }, `dropdowmIten ${e[t]}}`);
64
+ }),
65
+ o && o.length === 0 && /* @__PURE__ */ n.jsx("div", { className: "notfound", children: K })
66
+ ] }) });
116
67
  };
117
68
  export {
118
69
  V as default
@@ -2,7 +2,7 @@ import { IDropdownSelectProps } from '../types';
2
2
  import { GetMultipleFilteredParams, GetSimpleFilteredParams } from './types';
3
3
  export declare const contentClass: (props: IDropdownSelectProps) => string;
4
4
  export declare const getDropdownItemCssClass: (selected: boolean, disabled: boolean, striped: boolean) => string;
5
- export declare const getFilteredSimpleDataCombo: ({ dataSource, descriptionKey, inputText, }: Omit<GetSimpleFilteredParams, 'currents'>) => any[];
5
+ export declare const getFilteredSimpleDataCombo: ({ dataSource, descriptionKey, inputText, }: Omit<GetSimpleFilteredParams, "currents">) => any[];
6
6
  export declare const getFilteredMultipleDataCombo: ({ dataSource, inputText, descriptionKey, currents, }: GetMultipleFilteredParams) => any[];
7
7
  export declare const returnDropdownDynamicStyles: ({ selectFieldRef, dropdownMaxHeight, dropdownRef }: IDropdownSelectProps) => {
8
8
  maxHeight: number;
@@ -1,50 +1,48 @@
1
- const i = (n) => `content ${n.showClearButton ? "" : "noclear"}`, m = (n, r, t) => {
2
- let o = "item";
3
- return o += n && !r ? " -selected " : "", o += r ? " -disabled" : "", o += !n && !r && t ? " -striped " : "", o;
4
- }, L = ({
5
- dataSource: n,
6
- descriptionKey: r,
7
- inputText: t
8
- }) => n && n.filter((o) => {
9
- var s, a;
10
- return typeof r == "string" ? ((s = o[r]) == null ? void 0 : s.toLowerCase().indexOf(t == null ? void 0 : t.toString().toLowerCase())) > -1 : ((a = r(o)) == null ? void 0 : a.toLowerCase().indexOf(t == null ? void 0 : t.toString().toLowerCase())) > -1;
11
- }), O = ({
12
- dataSource: n,
13
- inputText: r,
14
- descriptionKey: t,
15
- currents: o
16
- }) => n.filter((s) => {
17
- var a;
18
- return typeof t == "string" ? s[t].toLowerCase().indexOf(r == null ? void 0 : r.toString().toLowerCase()) > -1 && !o.includes(s) : ((a = t(s)) == null ? void 0 : a.toLowerCase().indexOf(r == null ? void 0 : r.toString().toLowerCase())) > -1 && !o.includes(s);
19
- }), l = ({
20
- selectFieldRects: n,
21
- dropdownRef: r,
22
- dropdownRects: t
23
- }, o = !1) => o && (r != null && r.current) && (t != null && t.height) ? n.top + window.scrollY - (r.current && t.height) - 10 : n.top + window.scrollY + n.height, B = ({
24
- selectFieldRef: n,
25
- dropdownMaxHeight: r,
26
- dropdownRef: t
1
+ const C = (o) => `content ${o.showClearButton ? "" : "noclear"}`, f = (o, n, e) => {
2
+ let t = "item";
3
+ return t += o && !n ? " -selected " : "", t += n ? " -disabled" : "", t += !o && !n && e ? " -striped " : "", t;
4
+ }, h = ({
5
+ dataSource: o,
6
+ descriptionKey: n,
7
+ inputText: e
8
+ }) => o && o.filter((t) => typeof n == "string" ? t[n]?.toLowerCase().indexOf(e?.toString().toLowerCase()) > -1 : n(t)?.toLowerCase().indexOf(e?.toString().toLowerCase()) > -1), D = ({
9
+ dataSource: o,
10
+ inputText: n,
11
+ descriptionKey: e,
12
+ currents: t
13
+ }) => o.filter((r) => typeof e == "string" ? r[e].toLowerCase().indexOf(n?.toString().toLowerCase()) > -1 && !t.includes(r) : e(r)?.toLowerCase().indexOf(n?.toString().toLowerCase()) > -1 && !t.includes(r)), l = ({
14
+ selectFieldRects: o,
15
+ dropdownRef: n,
16
+ dropdownRects: e
17
+ }, t = !1) => t && n?.current && e?.height ? o.top + window.scrollY - (n.current && e.height) - 10 : o.top + window.scrollY + o.height, m = ({
18
+ selectFieldRef: o,
19
+ dropdownMaxHeight: n,
20
+ dropdownRef: e
27
21
  }) => {
28
- const o = n != null && n.current ? n.current.getBoundingClientRect() : void 0, s = t != null && t.current ? t.current.getBoundingClientRect() : void 0, a = o ? o == null ? void 0 : o.bottom : 0, h = o ? o == null ? void 0 : o.top : 0, c = window.innerHeight - a, D = 30;
29
- let e = 200, g = r, C;
30
- return !g || g <= 0 ? c < e && o ? (g = h, C = l({
31
- selectFieldRects: o,
32
- dropdownRef: t,
33
- dropdownRects: s
34
- }, !0)) : (g = c, C = o ? l({ selectFieldRects: o }) : 0) : (e = g, c < e && o ? C = l({
35
- selectFieldRects: o,
36
- dropdownRef: t,
37
- dropdownRects: s
38
- }, !0) : C = o ? l({ selectFieldRects: o }) : 0), {
39
- maxHeight: g - D,
40
- top: C,
41
- left: o ? o.left : 0
22
+ const t = o?.current ? o.current.getBoundingClientRect() : void 0, r = e?.current ? e.current.getBoundingClientRect() : void 0, u = t ? t?.bottom : 0, g = t ? t?.top : 0, c = window.innerHeight - u, w = 30;
23
+ let a = 200, s = n, i;
24
+ return !s || s <= 0 ? c < a && t ? (s = g, i = l({
25
+ selectFieldRects: t,
26
+ dropdownRef: e,
27
+ dropdownRects: r
28
+ }, !0)) : (s = c, i = t ? l({
29
+ selectFieldRects: t
30
+ }) : 0) : (a = s, c < a && t ? i = l({
31
+ selectFieldRects: t,
32
+ dropdownRef: e,
33
+ dropdownRects: r
34
+ }, !0) : i = t ? l({
35
+ selectFieldRects: t
36
+ }) : 0), {
37
+ maxHeight: s - w,
38
+ top: i,
39
+ left: t ? t.left : 0
42
40
  };
43
41
  };
44
42
  export {
45
- i as contentClass,
46
- m as getDropdownItemCssClass,
47
- O as getFilteredMultipleDataCombo,
48
- L as getFilteredSimpleDataCombo,
49
- B as returnDropdownDynamicStyles
43
+ C as contentClass,
44
+ f as getDropdownItemCssClass,
45
+ D as getFilteredMultipleDataCombo,
46
+ h as getFilteredSimpleDataCombo,
47
+ m as returnDropdownDynamicStyles
50
48
  };
@@ -1,29 +1,27 @@
1
- import { j as t } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import a from "./multiple/index.js";
1
+ import { j as y } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as n } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import m from "./multiple/index.js";
3
4
  import '../../assets/gridlayout.css';import '../../assets/index26.css';/* empty css */
4
- import l from "../../gridlayout/GridCol.js";
5
- import n from "./simple/index.js";
6
- const S = (e) => {
7
- const { gridLayout: r, multiple: c, value: i, ...d } = e, o = c ? /* @__PURE__ */ t.jsx(
8
- a,
9
- {
10
- ...d,
11
- dataSource: e.dataSource ? e.dataSource : [],
12
- idKey: e.idKey ? e.idKey : "",
13
- value: Array.isArray(i) ? i : void 0,
14
- descriptionKey: e.descriptionKey ? e.descriptionKey : ""
15
- }
16
- ) : /* @__PURE__ */ t.jsx(
17
- n,
18
- {
19
- ...d,
20
- idKey: e.idKey ? e.idKey : "",
21
- value: Array.isArray(i) ? void 0 : i,
22
- descriptionKey: e.descriptionKey ? e.descriptionKey : ""
23
- }
24
- );
25
- return r !== void 0 ? /* @__PURE__ */ t.jsx(l, { customClass: "-withinput", cols: r, children: o }) : o;
5
+ import u from "../../gridlayout/GridCol.js";
6
+ import K from "./simple/index.js";
7
+ const A = (i) => {
8
+ const e = n.c(15);
9
+ let d, c, l, t;
10
+ e[0] !== i ? ({
11
+ gridLayout: d,
12
+ multiple: c,
13
+ value: t,
14
+ ...l
15
+ } = i, e[0] = i, e[1] = d, e[2] = c, e[3] = l, e[4] = t) : (d = e[1], c = e[2], l = e[3], t = e[4]);
16
+ let r;
17
+ e[5] !== c || e[6] !== l || e[7] !== i.dataSource || e[8] !== i.descriptionKey || e[9] !== i.idKey || e[10] !== t ? (r = c ? /* @__PURE__ */ y.jsx(m, { ...l, dataSource: i.dataSource ? i.dataSource : [], idKey: i.idKey ? i.idKey : "", value: Array.isArray(t) ? t : void 0, descriptionKey: i.descriptionKey ? i.descriptionKey : "" }) : /* @__PURE__ */ y.jsx(K, { ...l, idKey: i.idKey ? i.idKey : "", value: Array.isArray(t) ? void 0 : t, descriptionKey: i.descriptionKey ? i.descriptionKey : "" }), e[5] = c, e[6] = l, e[7] = i.dataSource, e[8] = i.descriptionKey, e[9] = i.idKey, e[10] = t, e[11] = r) : r = e[11];
18
+ const a = r;
19
+ if (d !== void 0) {
20
+ let o;
21
+ return e[12] !== a || e[13] !== d ? (o = /* @__PURE__ */ y.jsx(u, { customClass: "-withinput", cols: d, children: a }), e[12] = a, e[13] = d, e[14] = o) : o = e[14], o;
22
+ }
23
+ return a;
26
24
  };
27
25
  export {
28
- S as default
26
+ A as default
29
27
  };
@@ -1,21 +1,25 @@
1
- import { j as a } from "../../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import l from "react";
3
- const x = ({
4
- currents: e,
5
- descriptionKey: s,
6
- idKey: m,
7
- handlerOnUnselect: o
8
- }) => /* @__PURE__ */ a.jsx(l.Fragment, { children: e.map((t) => /* @__PURE__ */ a.jsxs("div", { className: "selecteditem", children: [
9
- typeof s == "string" ? t[s] : s(t),
10
- /* @__PURE__ */ a.jsx(
11
- "button",
12
- {
13
- className: "close",
14
- tabIndex: -1,
15
- onClick: () => o(t[m])
16
- }
17
- )
18
- ] }, `selected-${t[m]}`)) });
1
+ import { j as m } from "../../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as p } from "../../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import d from "react";
4
+ const j = (a) => {
5
+ const e = p.c(11), {
6
+ currents: l,
7
+ descriptionKey: t,
8
+ idKey: s,
9
+ handlerOnUnselect: i
10
+ } = a;
11
+ let r;
12
+ if (e[0] !== l || e[1] !== t || e[2] !== i || e[3] !== s) {
13
+ let o;
14
+ e[5] !== t || e[6] !== i || e[7] !== s ? (o = (c) => /* @__PURE__ */ m.jsxs("div", { className: "selecteditem", children: [
15
+ typeof t == "string" ? c[t] : t(c),
16
+ /* @__PURE__ */ m.jsx("button", { className: "close", tabIndex: -1, onClick: () => i(c[s]) })
17
+ ] }, `selected-${c[s]}`), e[5] = t, e[6] = i, e[7] = s, e[8] = o) : o = e[8], r = l.map(o), e[0] = l, e[1] = t, e[2] = i, e[3] = s, e[4] = r;
18
+ } else
19
+ r = e[4];
20
+ let n;
21
+ return e[9] !== r ? (n = /* @__PURE__ */ m.jsx(d.Fragment, { children: r }), e[9] = r, e[10] = n) : n = e[10], n;
22
+ };
19
23
  export {
20
- x as default
24
+ j as default
21
25
  };