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,226 +1,156 @@
1
- import { j as b } from "../../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as h, useRef as v, useEffect as x } from "react";
3
- import ne from "lodash";
4
- import Re from "../Dropdown.js";
5
- import ve from "../ActionButtons.js";
6
- import { keyCodes as D } from "../../../internals/constants.js";
7
- import { getFilteredSimpleDataCombo as te } from "../helper.js";
8
- import Ee from "../../base/InputTextBase.js";
9
- import { v as We } from "../../../chunks/v1.CDXKvGzE.js";
10
- const je = (r) => {
1
+ import { j as W } from "../../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { useState as m, useRef as R, useEffect as F } from "react";
3
+ import { _ as Y } from "../../../chunks/lodash.CIAK_hAg.js";
4
+ import we from "../Dropdown.js";
5
+ import ye from "../ActionButtons.js";
6
+ import { keyCodes as x } from "../../../internals/constants.js";
7
+ import { getFilteredSimpleDataCombo as Z } from "../helper.js";
8
+ import Se from "../../base/InputTextBase.js";
9
+ import { v as Re } from "../../../chunks/v1.Ds1rkxUj.js";
10
+ const Le = (i) => {
11
11
  const {
12
- value: d,
13
- descriptionKey: o,
14
- dataSource: B = [],
15
- gridLayout: k,
16
- onSearch: N,
17
- disabled: oe,
18
- readOnly: ie,
19
- openDropdownOnFocus: se = !0,
20
- selectFirstOnEnter: re = !1,
21
- idKey: O,
22
- remoteSearch: I = !1,
23
- name: $ = "",
24
- undigitable: L,
25
- searchOnDropdown: A = !1,
26
- allOptions: f = void 0,
27
- showClearButton: le = !1,
28
- searchNotFoundText: ce,
29
- rightElements: ue = [],
30
- customClassForWrapper: ae,
31
- customClassForInputContent: de,
32
- customClassForLabel: fe,
33
- customClassForSideButtons: me
34
- } = r, l = typeof o == "string", i = f ? [{
35
- [O]: f.idValue,
36
- [l ? o : o(f.label)]: f.label
37
- }, ...B] : B, [s, E] = h(i), [u, g] = h(null), [y, a] = h(""), [w, m] = h(!1), [pe, T] = h(0), [he, ge] = h(!1), [R, Ce] = h(), [P, _] = h(!1), W = v(null), z = `select-component-${$}-${We()}`, V = v(null), c = v(null), F = v(null), C = v(null), q = () => {
38
- c.current && T(c.current.clientWidth);
12
+ value: C,
13
+ descriptionKey: t,
14
+ dataSource: D = [],
15
+ gridLayout: B,
16
+ onSearch: K,
17
+ disabled: ee,
18
+ readOnly: ne,
19
+ openDropdownOnFocus: te = !0,
20
+ selectFirstOnEnter: oe = !1,
21
+ idKey: g,
22
+ remoteSearch: k = !1,
23
+ name: N = "",
24
+ undigitable: I,
25
+ searchOnDropdown: _ = !1,
26
+ allOptions: a = void 0,
27
+ showClearButton: ie = !1,
28
+ searchNotFoundText: se,
29
+ rightElements: re = [],
30
+ customClassForWrapper: le,
31
+ customClassForInputContent: ce,
32
+ customClassForLabel: ue,
33
+ customClassForSideButtons: ae
34
+ } = i, r = typeof t == "string", o = a ? [{
35
+ [g]: a.idValue,
36
+ [r ? t : t(a.label)]: a.label
37
+ }, ...D] : D, [s, v] = m(o), [c, p] = m(null), [O, u] = m(""), [y, d] = m(!1), [de, L] = m(0), [fe, me] = m(!1), [S, pe] = m(), [$, A] = m(!1), E = R(null), P = `select-component-${N}-${Re()}`, z = R(null), l = R(null), b = R(null), h = R(null), V = () => {
38
+ l.current && L(l.current.clientWidth);
39
+ }, q = (e) => {
40
+ const {
41
+ target: n
42
+ } = e;
43
+ n !== l.current && !l.current?.contains(n) && !E.current?.contains(n) && d(!1);
39
44
  }, M = (e) => {
40
- var t, p;
41
- const { target: n } = e;
42
- n !== c.current && !((t = c.current) != null && t.contains(n)) && !((p = W.current) != null && p.contains(n)) && m(!1);
43
- }, J = (e) => {
44
- var Z, ee;
45
- const n = e.target, t = ((ee = (Z = W.current) == null ? void 0 : Z.parentElement) == null ? void 0 : ee.id) || "", p = document.getElementById(t), we = !!(p != null && p.contains(n));
46
- ge(we);
47
- }, U = (e) => ({
45
+ const n = e.target, f = E.current?.parentElement?.id || "", Oe = !!document.getElementById(f)?.contains(n);
46
+ me(Oe);
47
+ }, J = (e) => ({
48
48
  target: {
49
- value: e ? e[O] : void 0,
50
- name: $
49
+ value: e ? e[g] : void 0,
50
+ name: N
51
51
  }
52
- }), S = (e) => {
53
- if (r.onChange) {
54
- const n = U(e);
55
- r.onChange(n);
52
+ }), w = (e) => {
53
+ if (i.onChange) {
54
+ const n = J(e);
55
+ i.onChange(n);
56
56
  }
57
- }, G = (e) => {
57
+ }, U = (e) => {
58
58
  let n = null;
59
- if (I)
60
- N && N(e);
59
+ if (k)
60
+ K && K(e);
61
61
  else {
62
- const t = te({
62
+ const f = Z({
63
63
  inputText: e,
64
- descriptionKey: o,
65
- dataSource: i
64
+ descriptionKey: t,
65
+ dataSource: o
66
66
  });
67
- t && t.length > 0 && (n = t[0], g(n)), E(t);
67
+ f && f.length > 0 && (n = f[0], p(n)), v(f);
68
68
  }
69
- m(!0), a(e), n && (l && e === n[o] || !l && e === o(n)) && S(n);
70
- }, H = (e) => {
71
- var n;
72
- e && (g(e), a(l ? e[o] : o(e)), new Promise((t) => {
73
- t(S(e));
69
+ d(!0), u(e), n && (r && e === n[t] || !r && e === t(n)) && w(n);
70
+ }, G = (e) => {
71
+ e && (p(e), u(r ? e[t] : t(e)), new Promise((n) => {
72
+ n(w(e));
74
73
  }).finally(() => {
75
- C && C.current && C.current.focus(), m(!1);
76
- }), (n = W.current) == null || n.focus());
77
- }, Oe = () => {
78
- m((e) => !e), c.current && T(c.current.clientWidth);
79
- }, j = () => {
80
- if (se && m(!0), c) {
81
- const e = c.current ? c.current.clientWidth : 0;
82
- T(e);
74
+ h && h.current && h.current.focus(), d(!1);
75
+ }), E.current?.focus());
76
+ }, he = () => {
77
+ d((e) => !e), l.current && L(l.current.clientWidth);
78
+ }, T = () => {
79
+ if (te && d(!0), l) {
80
+ const e = l.current ? l.current.clientWidth : 0;
81
+ L(e);
83
82
  }
84
- }, Q = () => {
85
- if (r.onBlur) {
86
- const e = U(u);
87
- r.onBlur(e), (u && l && y !== u[o] || !l && y !== o(u)) && (g(null), a(y), new Promise((n) => {
88
- n(S(null));
83
+ }, H = () => {
84
+ if (i.onBlur) {
85
+ const e = J(c);
86
+ i.onBlur(e), (c && r && O !== c[t] || !r && O !== t(c)) && (p(null), u(O), new Promise((n) => {
87
+ n(w(null));
89
88
  }).finally(() => {
90
- S();
89
+ w();
91
90
  }));
92
91
  }
93
- he || (m(!1), _(!1), E(i));
94
- }, X = (e) => {
95
- var n;
92
+ fe || (d(!1), A(!1), v(o));
93
+ }, Q = (e) => {
96
94
  if (e.keyCode) {
97
- if (e.keyCode === D.ENTER && u && w)
98
- (n = e.preventDefault) == null || n.call(e), H(u);
99
- else if ([D.ARROW_UP, D.ARROW_DOWN].includes(e.keyCode)) {
100
- w || m(!0);
101
- let t = s.length > 0 ? s.findIndex((p) => u && p[O] === u[O]) : 0;
102
- e.keyCode === D.ARROW_DOWN ? t = s && t === s.length - 1 ? 0 : t + 1 : t = s && t === 0 ? (s == null ? void 0 : s.length) - 1 : t - 1, g(s[t]), l && a(s[t][o]), l || a(o(s[t]));
95
+ if (e.keyCode === x.ENTER && c && y)
96
+ e.preventDefault?.(), G(c);
97
+ else if ([x.ARROW_UP, x.ARROW_DOWN].includes(e.keyCode)) {
98
+ y || d(!0);
99
+ let n = s.length > 0 ? s.findIndex((f) => c && f[g] === c[g]) : 0;
100
+ e.keyCode === x.ARROW_DOWN ? n = s && n === s.length - 1 ? 0 : n + 1 : n = s && n === 0 ? s?.length - 1 : n - 1, p(s[n]), r && u(s[n][t]), r || u(t(s[n]));
103
101
  }
104
102
  }
105
- P || _(!0);
106
- }, ye = () => {
103
+ $ || A(!0);
104
+ }, Ce = () => {
107
105
  new Promise((e) => {
108
- e(S(null));
106
+ e(w(null));
109
107
  }).finally(() => {
110
- g(null), a(""), S(), C && C.current && C.current.focus(), m(!1);
108
+ p(null), u(""), w(), h && h.current && h.current.focus(), d(!1);
111
109
  });
112
- }, Se = (e) => {
113
- Ce(e);
114
- }, Y = () => oe || R && (R.disabled || R.hideContent), K = () => ie || R && R.readOnly;
115
- return x(() => (window.addEventListener("resize", q), document.addEventListener("click", M), document.addEventListener("mousemove", J), () => {
116
- window.removeEventListener("resize", q), document.removeEventListener("click", M), document.removeEventListener("mousemove", J);
117
- }), []), x(() => {
118
- if (k) {
119
- const e = document.querySelector(`#${z}>.-withinput.grid-container`);
120
- F.current !== e && e && (F.current = e);
110
+ }, ge = (e) => {
111
+ pe(e);
112
+ }, X = () => ee || S && (S.disabled || S.hideContent), j = () => ne || S && S.readOnly;
113
+ return F(() => (window.addEventListener("resize", V), document.addEventListener("click", q), document.addEventListener("mousemove", M), () => {
114
+ window.removeEventListener("resize", V), document.removeEventListener("click", q), document.removeEventListener("mousemove", M);
115
+ }), []), F(() => {
116
+ if (B) {
117
+ const e = document.querySelector(`#${P}>.-withinput.grid-container`);
118
+ b.current !== e && e && (b.current = e);
121
119
  }
122
- }, [k]), x(() => {
123
- if (i.length > 0) {
120
+ }, [B]), F(() => {
121
+ if (o.length > 0) {
124
122
  let e = null;
125
- d || d === 0 ? e = i.find((n) => {
126
- var t;
127
- return (d || d === 0) && ((t = n[O]) == null ? void 0 : t.toString().toLowerCase()) === (d == null ? void 0 : d.toString().toLowerCase());
128
- }) : i.length > 0 && re && (e = i[0]), g(e), a(l ? e ? e[o] : "" : e ? o(e) : "");
123
+ C || C === 0 ? e = o.find((n) => (C || C === 0) && n[g]?.toString().toLowerCase() === C?.toString().toLowerCase()) : o.length > 0 && oe && (e = o[0]), p(e), u(r ? e ? e[t] : "" : e ? t(e) : "");
129
124
  }
130
- }, [i.length, d]), x(() => {
131
- if (!ne.isEqual(s, i)) {
132
- const e = L || I || !P ? i : te({
133
- inputText: y,
134
- dataSource: i,
135
- descriptionKey: o
125
+ }, [o.length, C]), F(() => {
126
+ if (!Y.isEqual(s, o)) {
127
+ const e = I || k || !$ ? o : Z({
128
+ inputText: O,
129
+ dataSource: o,
130
+ descriptionKey: t
136
131
  });
137
- if (E(e), i.length > 0 && I) {
138
- const n = i[0];
139
- g(n);
132
+ if (v(e), o.length > 0 && k) {
133
+ const n = o[0];
134
+ p(n);
140
135
  }
141
136
  }
142
- f && E([
143
- {
144
- [O]: f.idValue,
145
- [l ? o : o(f.label)]: f.label
146
- },
147
- ...B
148
- ]);
149
- }, [JSON.stringify(i)]), /* @__PURE__ */ b.jsxs(
150
- "span",
151
- {
152
- id: z,
153
- ref: V,
154
- className: "select-component",
155
- children: [
156
- /* @__PURE__ */ b.jsx(
157
- Ee,
158
- {
159
- ...r,
160
- inputRef: (e) => {
161
- r.inputRef && (ne.isFunction(r.inputRef) ? r.inputRef(e) : r.inputRef.current = e), C.current = e;
162
- },
163
- autoComplete: "off",
164
- readOnly: L || K(),
165
- value: y,
166
- onFocus: j,
167
- onBlur: Q,
168
- onChange: (e) => {
169
- e && G(e.target.value);
170
- },
171
- onClick: j,
172
- onKeyDown: X,
173
- customClassForLabel: fe,
174
- customClassForWrapper: `selectwrapper ${(L || A || K()) && " -undigitable"} ${ae}`,
175
- customClassForInputContent: `multiselect ${de}`,
176
- inputBaseRef: (e) => {
177
- c.current = e;
178
- },
179
- handlerSetOnDenied: (e) => Se(e),
180
- rightElements: [
181
- ...ue,
182
- /* @__PURE__ */ b.jsx(
183
- ve,
184
- {
185
- disabled: Y() || K(),
186
- showClearButton: le,
187
- dropDownOpened: w,
188
- handlerClear: () => Y() ? null : ye(),
189
- handlerOpenClose: Oe,
190
- customClassForSideButtons: me
191
- },
192
- "action-buttons-simpleselect"
193
- )
194
- ]
195
- }
196
- ),
197
- w && /* @__PURE__ */ b.jsx(
198
- Re,
199
- {
200
- ...r,
201
- opened: w,
202
- selected: u,
203
- inputValue: y,
204
- selectFieldRef: V,
205
- dropdownRef: W,
206
- searchOnDropdown: A,
207
- gridWrapperStyle: k && F.current ? window.getComputedStyle(F.current) : void 0,
208
- handleOnSelect: (e) => {
209
- e && H(e);
210
- },
211
- handleOnFilter: (e) => G(e),
212
- handleOnKeydown: X,
213
- handleOnBlur: () => Q,
214
- handleOnFocus: j,
215
- dataCombo: s,
216
- dropdownWidth: pe || 0,
217
- searchNotFoundText: ce
218
- }
219
- )
220
- ]
221
- }
222
- );
137
+ a && v([{
138
+ [g]: a.idValue,
139
+ [r ? t : t(a.label)]: a.label
140
+ }, ...D]);
141
+ }, [JSON.stringify(o)]), /* @__PURE__ */ W.jsxs("span", { id: P, ref: z, className: "select-component", children: [
142
+ /* @__PURE__ */ W.jsx(Se, { ...i, inputRef: (e) => {
143
+ i.inputRef && (Y.isFunction(i.inputRef) ? i.inputRef(e) : i.inputRef.current = e), h.current = e;
144
+ }, autoComplete: "off", readOnly: I || j(), value: O, onFocus: T, onBlur: H, onChange: (e) => {
145
+ e && U(e.target.value);
146
+ }, onClick: T, onKeyDown: Q, customClassForLabel: ue, customClassForWrapper: `selectwrapper ${(I || _ || j()) && " -undigitable"} ${le}`, customClassForInputContent: `multiselect ${ce}`, inputBaseRef: (e) => {
147
+ l.current = e;
148
+ }, handlerSetOnDenied: (e) => ge(e), rightElements: [...re, /* @__PURE__ */ W.jsx(ye, { disabled: X() || j(), showClearButton: ie, dropDownOpened: y, handlerClear: () => X() ? null : Ce(), handlerOpenClose: he, customClassForSideButtons: ae }, "action-buttons-simpleselect")] }),
149
+ y && /* @__PURE__ */ W.jsx(we, { ...i, opened: y, selected: c, inputValue: O, selectFieldRef: z, dropdownRef: E, searchOnDropdown: _, gridWrapperStyle: B && b.current ? window.getComputedStyle(b.current) : void 0, handleOnSelect: (e) => {
150
+ e && G(e);
151
+ }, handleOnFilter: (e) => U(e), handleOnKeydown: Q, handleOnBlur: () => H, handleOnFocus: T, dataCombo: s, dropdownWidth: de || 0, searchNotFoundText: se })
152
+ ] });
223
153
  };
224
154
  export {
225
- je as default
155
+ Le as default
226
156
  };
@@ -1,6 +1,11 @@
1
- import { j as e } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import o from "../base/InputTextBase.js";
3
- const x = (t) => /* @__PURE__ */ e.jsx(o, { ...t });
1
+ import { j as r } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as m } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import s from "../base/InputTextBase.js";
4
+ const a = (o) => {
5
+ const t = m.c(2);
6
+ let e;
7
+ return t[0] !== o ? (e = /* @__PURE__ */ r.jsx(s, { ...o }), t[0] = o, t[1] = e) : e = t[1], e;
8
+ };
4
9
  export {
5
- x as default
10
+ a as default
6
11
  };
@@ -1,18 +1,16 @@
1
- import { j as r } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import x from "../base/InputTextBase.js";
3
- const c = (t) => {
4
- const { rows: s, cols: e, customClass: a, type: o = "textarea" } = t;
5
- return /* @__PURE__ */ r.jsx(
6
- x,
7
- {
8
- ...t,
9
- rows: s,
10
- type: o,
11
- cols: e,
12
- customClass: `textarea-container ${a}`
13
- }
14
- );
1
+ import { j as i } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as x } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import l from "../base/InputTextBase.js";
4
+ const j = (e) => {
5
+ const t = x.c(6), {
6
+ rows: o,
7
+ cols: r,
8
+ customClass: n,
9
+ type: m
10
+ } = e, a = m === void 0 ? "textarea" : m, c = `textarea-container ${n}`;
11
+ let s;
12
+ return t[0] !== r || t[1] !== e || t[2] !== o || t[3] !== c || t[4] !== a ? (s = /* @__PURE__ */ i.jsx(l, { ...e, rows: o, type: a, cols: r, customClass: c }), t[0] = r, t[1] = e, t[2] = o, t[3] = c, t[4] = a, t[5] = s) : s = t[5], s;
15
13
  };
16
14
  export {
17
- c as default
15
+ j as default
18
16
  };
@@ -1,75 +1,122 @@
1
- import { j as d } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import _, { useState as f, useRef as O, useEffect as v } from "react";
3
- import H from "../tooltip/index.js";
4
- const A = 40, E = ({ tooltip: n }) => n, P = _.createContext({}), V = ({ displayName: n, name: h }) => n || h || "Component", q = (n) => {
5
- const h = (s) => {
6
- const {
7
- tooltip: m,
8
- tooltipWidth: R = "auto",
9
- space: b = 20,
10
- tooltipPosition: $ = "bottom",
11
- errorMessage: p
12
- } = s, [w, r] = f($), [l, C] = f(""), [I, M] = f(""), [W, c] = f(!1), [x, Y] = f({
13
- width: R,
14
- height: A
15
- }), e = O(null), g = O(null), y = (i) => {
16
- e.current && e.current.contains(i.target) ? c(!0) : c(!1);
17
- }, D = () => {
18
- c(!1);
19
- }, L = () => {
20
- c(!1);
21
- };
22
- v(() => ((E(s) || l) && (p ? c(!0) : (c(!1), document.addEventListener("mouseover", y), document.addEventListener("scroll", L, !0), e && e.current && e.current.addEventListener("mouseout", D))), () => {
23
- (E(s) || l) && (document.removeEventListener("mouseover", y), document.removeEventListener("scroll", L, !0), e && e.current && e.current.removeEventListener("mouseout", D));
24
- }), [p, m, l]), v(() => {
25
- if (e.current && g.current) {
26
- const { width: i, height: u } = x, t = e.current.getBoundingClientRect(), j = (t.top + t.bottom) / 2, a = g.current.clientWidth;
27
- let o = `width: ${typeof i == "string" ? i : `${i}px`}`, T = t.left + t.width / 2 - a / 2;
28
- switch (T = Math.min(T, document.body.clientWidth - a - b), o += `; left: ${Math.max(b, T)}px`, w) {
29
- case "top":
30
- t.top < u ? r("bottom") : o += `; top: ${t.top + window.scrollY - u - 5}px`;
31
- break;
32
- case "bottom":
33
- window.innerHeight - t.bottom < u ? r("top") : o += `; top: ${t.top + window.scrollY + t.height + 5}px`;
34
- break;
35
- case "left":
36
- t.left < a ? window.innerWidth - t.right < a ? r("bottom") : r("right") : (o += `; top: ${j + window.scrollY - u / 2}px`, o += `; left: ${t.left - a - 6}px`);
37
- break;
38
- case "right":
39
- window.innerWidth - t.right < a ? r("left") : (o += `; top: ${j + window.scrollY - u / 2}px`, o += `; left: ${t.left + t.width + 5}px`);
40
- break;
1
+ import { j as b } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as U } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import Z, { useState as T, useRef as z, useEffect as N } from "react";
4
+ import tt from "../tooltip/index.js";
5
+ const et = 40, H = ({
6
+ tooltip: u
7
+ }) => u, F = Z.createContext({}), ot = ({
8
+ displayName: u,
9
+ name: v
10
+ }) => u || v || "Component", rt = (u) => {
11
+ const v = (i) => {
12
+ const t = U.c(39), {
13
+ tooltip: d,
14
+ tooltipWidth: A,
15
+ space: V,
16
+ tooltipPosition: B,
17
+ errorMessage: c
18
+ } = i, C = A === void 0 ? "auto" : A, y = V === void 0 ? 20 : V, _ = B === void 0 ? "bottom" : B, [a, x] = T(_), [n, J] = T(""), [I, K] = T(""), [M, p] = T(!1);
19
+ let S;
20
+ t[0] !== C ? (S = {
21
+ width: C,
22
+ height: et
23
+ }, t[0] = C, t[1] = S) : S = t[1];
24
+ const [f, Q] = T(S), l = z(null), Y = z(null);
25
+ let E;
26
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (E = (h) => {
27
+ l.current && l.current.contains(h.target) ? p(!0) : p(!1);
28
+ }, t[2] = E) : E = t[2];
29
+ const G = E;
30
+ let $;
31
+ t[3] === Symbol.for("react.memo_cache_sentinel") ? ($ = () => {
32
+ p(!1);
33
+ }, t[3] = $) : $ = t[3];
34
+ const X = $;
35
+ let D;
36
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
37
+ p(!1);
38
+ }, t[4] = D) : D = t[4];
39
+ const q = D;
40
+ let L;
41
+ t[5] !== c || t[6] !== n || t[7] !== i ? (L = () => ((H(i) || n) && (c ? p(!0) : (p(!1), document.addEventListener("mouseover", G), document.addEventListener("scroll", q, !0), l && l.current && l.current.addEventListener("mouseout", X))), () => {
42
+ (H(i) || n) && (document.removeEventListener("mouseover", G), document.removeEventListener("scroll", q, !0), l && l.current && l.current.removeEventListener("mouseout", X));
43
+ }), t[5] = c, t[6] = n, t[7] = i, t[8] = L) : L = t[8];
44
+ let j;
45
+ t[9] !== c || t[10] !== n || t[11] !== d ? (j = [c, d, n], t[9] = c, t[10] = n, t[11] = d, t[12] = j) : j = t[12], N(L, j);
46
+ let P;
47
+ t[13] !== y || t[14] !== a || t[15] !== f ? (P = () => {
48
+ if (l.current && Y.current) {
49
+ const {
50
+ width: h,
51
+ height: s
52
+ } = f, o = l.current.getBoundingClientRect(), w = (o.top + o.bottom) / 2, m = Y.current.clientWidth;
53
+ let e = `width: ${typeof h == "string" ? h : `${h}px`}`, r = o.left + o.width / 2 - m / 2;
54
+ r = Math.min(r, document.body.clientWidth - m - y), e = e + `; left: ${Math.max(y, r)}px`;
55
+ t: switch (a) {
56
+ case "top": {
57
+ o.top < s ? x("bottom") : e = e + `; top: ${o.top + window.scrollY - s - 5}px`;
58
+ break t;
59
+ }
60
+ case "bottom": {
61
+ window.innerHeight - o.bottom < s ? x("top") : e = e + `; top: ${o.top + window.scrollY + o.height + 5}px`;
62
+ break t;
63
+ }
64
+ case "left": {
65
+ o.left < m ? window.innerWidth - o.right < m ? x("bottom") : x("right") : (e = e + `; top: ${w + window.scrollY - s / 2}px`, e = e + `; left: ${o.left - m - 6}px`);
66
+ break t;
67
+ }
68
+ case "right": {
69
+ window.innerWidth - o.right < m ? x("left") : (e = e + `; top: ${w + window.scrollY - s / 2}px`, e = e + `; left: ${o.left + o.width + 5}px`);
70
+ break t;
71
+ }
41
72
  default:
42
- o += "";
73
+ e = e + "";
43
74
  }
44
- M(o);
75
+ K(e);
45
76
  }
46
- }, [x, w]), v(() => {
47
- r($);
48
- }, [window.scrollY, window.scrollX, window.innerWidth]);
49
- const k = () => m || l ? /* @__PURE__ */ d.jsx(
50
- H,
51
- {
52
- text: l || m,
53
- textError: p,
54
- tooltipRef: g,
55
- style: I,
56
- className: w,
57
- tooltipDimensions: x,
58
- handlerSetDimensions: Y
77
+ }, t[13] = y, t[14] = a, t[15] = f, t[16] = P) : P = t[16];
78
+ let R;
79
+ t[17] !== a || t[18] !== f ? (R = [f, a], t[17] = a, t[18] = f, t[19] = R) : R = t[19], N(P, R);
80
+ let O;
81
+ t[20] !== _ ? (O = () => {
82
+ x(_);
83
+ }, t[20] = _, t[21] = O) : O = t[21];
84
+ let W;
85
+ t[22] === Symbol.for("react.memo_cache_sentinel") ? (W = [window.scrollY, window.scrollX, window.innerWidth], t[22] = W) : W = t[22], N(O, W);
86
+ let k, g;
87
+ if (t[23] !== c || t[24] !== n || t[25] !== i || t[26] !== M || t[27] !== a || t[28] !== d || t[29] !== f || t[30] !== I) {
88
+ g = Symbol.for("react.early_return_sentinel");
89
+ t: {
90
+ const h = () => d || n ? /* @__PURE__ */ b.jsx(tt, { text: n || d, textError: c, tooltipRef: Y, style: I, className: a, tooltipDimensions: f, handlerSetDimensions: Q }) : null;
91
+ let s;
92
+ t[33] === Symbol.for("react.memo_cache_sentinel") ? (s = (r) => {
93
+ l.current || (l.current = r);
94
+ }, t[33] = s) : s = t[33];
95
+ const o = s;
96
+ let w;
97
+ t[34] === Symbol.for("react.memo_cache_sentinel") ? (w = {
98
+ handlerSetOnDeniedText: J
99
+ }, t[34] = w) : w = t[34];
100
+ const m = w;
101
+ if (!H(i) && !n) {
102
+ let r;
103
+ t[35] !== i ? (r = /* @__PURE__ */ b.jsx(F.Provider, { value: m, children: /* @__PURE__ */ b.jsx(u, { ...i }) }), t[35] = i, t[36] = r) : r = t[36], g = r;
104
+ break t;
105
+ }
106
+ let e;
107
+ t[37] !== i ? (e = /* @__PURE__ */ b.jsx(u, { ...i, targetRef: o }), t[37] = i, t[38] = e) : e = t[38], k = /* @__PURE__ */ b.jsxs(F.Provider, { value: m, children: [
108
+ e,
109
+ M && h()
110
+ ] });
59
111
  }
60
- ) : null, N = (i) => {
61
- e.current || (e.current = i);
62
- }, S = {
63
- handlerSetOnDeniedText: C
64
- };
65
- return !E(s) && !l ? /* @__PURE__ */ d.jsx(P.Provider, { value: S, children: /* @__PURE__ */ d.jsx(n, { ...s }) }) : /* @__PURE__ */ d.jsxs(P.Provider, { value: S, children: [
66
- /* @__PURE__ */ d.jsx(n, { ...s, targetRef: N }),
67
- W && k()
68
- ] });
112
+ t[23] = c, t[24] = n, t[25] = i, t[26] = M, t[27] = a, t[28] = d, t[29] = f, t[30] = I, t[31] = k, t[32] = g;
113
+ } else
114
+ k = t[31], g = t[32];
115
+ return g !== Symbol.for("react.early_return_sentinel") ? g : k;
69
116
  };
70
- return h.displayName = `withTooltip(${V(n)})`, h;
117
+ return v.displayName = `withTooltip(${ot(u)})`, v;
71
118
  };
72
119
  export {
73
- P as TooltipContext,
74
- q as default
120
+ F as TooltipContext,
121
+ rt as default
75
122
  };