linear-react-components-ui 1.1.26-beta.6 → 1.1.26-beta.8

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 (198) hide show
  1. package/lib/alerts/AlertContainer.js +8 -2
  2. package/lib/alerts/AlertProvider.js +10 -4
  3. package/lib/alerts/BaseAlert.js +3 -1
  4. package/lib/alerts/Message.js +91 -64
  5. package/lib/alerts/withAlert.js +10 -6
  6. package/lib/avatar/index.js +20 -42
  7. package/lib/badge/index.js +25 -23
  8. package/lib/buttons/ActivateButton.js +9 -4
  9. package/lib/buttons/AddButton.js +12 -5
  10. package/lib/buttons/Button.js +16 -5
  11. package/lib/buttons/ButtonGroups.js +10 -3
  12. package/lib/buttons/CancelButton.js +14 -4
  13. package/lib/buttons/DangerButton.js +15 -4
  14. package/lib/buttons/DefaultButton.js +25 -59
  15. package/lib/buttons/DestroyButton.js +21 -5
  16. package/lib/buttons/EditButton.js +9 -4
  17. package/lib/buttons/InactivateButton.js +9 -4
  18. package/lib/buttons/InfoButton.js +15 -4
  19. package/lib/buttons/PrimaryButton.js +15 -4
  20. package/lib/buttons/RestoreButton.js +9 -4
  21. package/lib/buttons/SaveButton.js +14 -4
  22. package/lib/buttons/SuccessButton.js +15 -4
  23. package/lib/buttons/WarningButton.js +15 -4
  24. package/lib/buttons/button_container/index.js +21 -16
  25. package/lib/buttons/split_button/index.js +53 -55
  26. package/lib/calendar/DangerCalendar.js +18 -4
  27. package/lib/calendar/InfoCalendar.js +18 -4
  28. package/lib/calendar/PrimaryCalendar.js +18 -4
  29. package/lib/calendar/SuccessCalendar.js +18 -4
  30. package/lib/calendar/WarningCalendar.js +18 -4
  31. package/lib/calendar/base/Day.js +32 -22
  32. package/lib/calendar/base/Month.js +24 -21
  33. package/lib/calendar/base/Week.js +20 -19
  34. package/lib/calendar/base/helpers.js +1 -9
  35. package/lib/calendar/base/index.js +129 -95
  36. package/lib/checkbox/index.js +5 -4
  37. package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
  38. package/lib/chunks/index.aw0XaUkg.js +266 -0
  39. package/lib/chunks/{jsx-runtime.C7wFtzyj.js → jsx-runtime.D1SHvdVE.js} +106 -108
  40. package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
  41. package/lib/dialog/Alert.js +18 -17
  42. package/lib/dialog/Custom.js +42 -28
  43. package/lib/dialog/Error.js +18 -17
  44. package/lib/dialog/Information.js +18 -17
  45. package/lib/dialog/Question.js +41 -54
  46. package/lib/dialog/Warning.js +18 -17
  47. package/lib/dialog/base/Content.js +13 -4
  48. package/lib/dialog/base/Footer.js +8 -3
  49. package/lib/dialog/base/Header.js +4 -3
  50. package/lib/dialog/base/index.js +5 -4
  51. package/lib/dialog/form/index.js +5 -4
  52. package/lib/dialog/index.js +1 -1
  53. package/lib/dialog/wizard/index.js +10 -9
  54. package/lib/dialog/wizard/progressbar.js +89 -80
  55. package/lib/dialog/wizard/step.js +4 -3
  56. package/lib/dialog/wizard/useWizard.js +42 -29
  57. package/lib/drawer/Content.js +15 -8
  58. package/lib/drawer/Drawer.js +25 -22
  59. package/lib/drawer/Header.js +53 -40
  60. package/lib/dropdown/Popup.js +3 -1
  61. package/lib/dropdown/withDropdown.js +75 -50
  62. package/lib/fieldset/index.js +66 -47
  63. package/lib/form/Field.js +88 -62
  64. package/lib/form/FieldArray.js +17 -38
  65. package/lib/form/FieldNumber.js +40 -36
  66. package/lib/form/FieldPeriod.js +90 -59
  67. package/lib/form/helpers.js +4 -1
  68. package/lib/form/index.js +55 -67
  69. package/lib/form/withFieldHOC.js +57 -48
  70. package/lib/form/withFormSecurity.js +6 -9
  71. package/lib/gridlayout/GridCol.js +21 -20
  72. package/lib/gridlayout/GridRow.js +22 -20
  73. package/lib/hint/helpers.js +6 -2
  74. package/lib/hint/index.js +27 -25
  75. package/lib/icons/helper.js +142 -569
  76. package/lib/icons/index.js +63 -55
  77. package/lib/index.js +20 -19
  78. package/lib/inputs/base/InputTextBase.js +62 -146
  79. package/lib/inputs/base/Label.js +27 -29
  80. package/lib/inputs/base/helpers.js +3 -1
  81. package/lib/inputs/color/index.js +52 -73
  82. package/lib/inputs/date/Dialog.js +15 -16
  83. package/lib/inputs/date/Dropdown.js +7 -1
  84. package/lib/inputs/date/index.js +60 -94
  85. package/lib/inputs/errorMessage/index.js +21 -13
  86. package/lib/inputs/file/DefaultFile.js +64 -66
  87. package/lib/inputs/file/DragDropFile.js +39 -93
  88. package/lib/inputs/file/File.js +8 -22
  89. package/lib/inputs/file/FileButtonSettings.js +20 -17
  90. package/lib/inputs/inputHOC.js +38 -20
  91. package/lib/inputs/mask/BaseMask.js +44 -23
  92. package/lib/inputs/mask/Cnpj.js +42 -36
  93. package/lib/inputs/mask/Cpf.js +45 -33
  94. package/lib/inputs/mask/Phone.js +10 -6
  95. package/lib/inputs/mask/ZipCode.js +9 -4
  96. package/lib/inputs/multiSelect/ActionButtons.js +35 -46
  97. package/lib/inputs/multiSelect/Dropdown.js +93 -131
  98. package/lib/inputs/multiSelect/index.js +167 -125
  99. package/lib/inputs/number/BaseNumber.js +43 -31
  100. package/lib/inputs/number/Currency.js +19 -12
  101. package/lib/inputs/number/Decimal.js +9 -4
  102. package/lib/inputs/number/index.js +31 -35
  103. package/lib/inputs/period/Dialog.js +16 -16
  104. package/lib/inputs/period/Dropdown.js +6 -1
  105. package/lib/inputs/period/PeriodList.js +41 -27
  106. package/lib/inputs/period/helper.js +5 -1
  107. package/lib/inputs/period/index.js +118 -240
  108. package/lib/inputs/search/index.js +95 -71
  109. package/lib/inputs/select/ActionButtons.js +24 -45
  110. package/lib/inputs/select/Dropdown.js +38 -87
  111. package/lib/inputs/select/helper.js +6 -2
  112. package/lib/inputs/select/index.js +23 -25
  113. package/lib/inputs/select/multiple/Selecteds.js +23 -19
  114. package/lib/inputs/select/multiple/index.js +35 -101
  115. package/lib/inputs/select/simple/index.js +26 -89
  116. package/lib/inputs/text/index.js +9 -4
  117. package/lib/inputs/textarea/index.js +13 -15
  118. package/lib/internals/withTooltip.js +114 -67
  119. package/lib/labelMessages/index.js +50 -45
  120. package/lib/labels/DangerLabel.js +18 -4
  121. package/lib/labels/DefaultLabel.js +53 -39
  122. package/lib/labels/InfoLabel.js +18 -4
  123. package/lib/labels/PrimaryLabel.js +18 -4
  124. package/lib/labels/SuccessLabel.js +18 -4
  125. package/lib/labels/WarningLabel.js +18 -4
  126. package/lib/labels/label_container/index.js +15 -9
  127. package/lib/list/Header.js +18 -6
  128. package/lib/list/Item.js +4 -3
  129. package/lib/list/Separator.js +8 -3
  130. package/lib/list/index.js +21 -18
  131. package/lib/menus/float/MenuItem.js +48 -51
  132. package/lib/menus/float/index.js +102 -81
  133. package/lib/menus/sidenav/ExpandMenu.js +17 -15
  134. package/lib/menus/sidenav/MenuLink.js +21 -14
  135. package/lib/menus/sidenav/NavMenuGroup.js +19 -14
  136. package/lib/menus/sidenav/NavMenuItem.js +131 -109
  137. package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
  138. package/lib/menus/sidenav/index.js +145 -123
  139. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
  140. package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
  141. package/lib/noPermission/index.js +13 -8
  142. package/lib/panel/Content.js +48 -38
  143. package/lib/panel/DangerPanel.js +10 -5
  144. package/lib/panel/Default.js +62 -36
  145. package/lib/panel/Header.js +53 -37
  146. package/lib/panel/InfoPanel.js +10 -5
  147. package/lib/panel/PrimaryPanel.js +10 -5
  148. package/lib/panel/SuccessPanel.js +10 -5
  149. package/lib/panel/ToolBar.js +17 -4
  150. package/lib/panel/WarningPanel.js +10 -5
  151. package/lib/panel/helpers.js +4 -1
  152. package/lib/permissionValidations.js +5 -1
  153. package/lib/popover/PopoverText.js +12 -5
  154. package/lib/popover/PopoverTitle.js +10 -3
  155. package/lib/popover/index.js +36 -56
  156. package/lib/progress/Bar.js +43 -34
  157. package/lib/progress/index.js +23 -18
  158. package/lib/radio/index.js +105 -89
  159. package/lib/shortcuts/index.js +20 -7
  160. package/lib/skeleton/SkeletonContainer.js +16 -6
  161. package/lib/skeleton/index.js +42 -18
  162. package/lib/spinner/SpinnerLoading.js +53 -16
  163. package/lib/spinner/index.js +47 -37
  164. package/lib/split/Split.js +83 -79
  165. package/lib/split/SplitSide.js +24 -16
  166. package/lib/table/Body.js +36 -49
  167. package/lib/table/Header.js +45 -32
  168. package/lib/table/HeaderColumn.js +40 -27
  169. package/lib/table/Row.js +47 -48
  170. package/lib/table/RowColumn.js +50 -38
  171. package/lib/table/helpers.js +3 -1
  172. package/lib/table/index.js +101 -104
  173. package/lib/tabs/DropdownTabs.js +64 -61
  174. package/lib/tabs/Menu.js +35 -49
  175. package/lib/tabs/MenuTabs.js +59 -84
  176. package/lib/tabs/Panel.js +57 -46
  177. package/lib/tabs/context.js +11 -11
  178. package/lib/tabs/index.js +69 -64
  179. package/lib/tabs/tabHelpers.js +9 -7
  180. package/lib/textContent/index.js +30 -32
  181. package/lib/toolbar/ButtonBar.js +62 -58
  182. package/lib/toolbar/LabelBar.js +46 -38
  183. package/lib/toolbar/Separator.js +8 -3
  184. package/lib/toolbar/ToolBarGroup.js +14 -3
  185. package/lib/toolbar/index.js +35 -29
  186. package/lib/tooltip/index.js +1 -1
  187. package/lib/treetable/Body.js +25 -26
  188. package/lib/treetable/Header.js +22 -18
  189. package/lib/treetable/Row.js +210 -147
  190. package/lib/treetable/helpers.js +6 -14
  191. package/lib/treetable/index.js +25 -15
  192. package/lib/treeview/Header.js +13 -5
  193. package/lib/treeview/Node.js +198 -175
  194. package/lib/treeview/index.js +257 -174
  195. package/lib/uitour/index.js +167 -166
  196. package/package.json +11 -10
  197. package/lib/chunks/index.CM1aLH2W.js +0 -205
  198. package/lib/chunks/tabs.D0L_nVfP.js +0 -245
@@ -1,4 +1,4 @@
1
- import { j as W } from "../../../chunks/jsx-runtime.C7wFtzyj.js";
1
+ import { j as W } from "../../../chunks/jsx-runtime.D1SHvdVE.js";
2
2
  import { useState as m, useRef as R, useEffect as F } from "react";
3
3
  import { _ as Y } from "../../../chunks/lodash.CIAK_hAg.js";
4
4
  import we from "../Dropdown.js";
@@ -22,7 +22,7 @@ const Le = (i) => {
22
22
  remoteSearch: k = !1,
23
23
  name: N = "",
24
24
  undigitable: I,
25
- searchOnDropdown: $ = !1,
25
+ searchOnDropdown: _ = !1,
26
26
  allOptions: a = void 0,
27
27
  showClearButton: ie = !1,
28
28
  searchNotFoundText: se,
@@ -34,10 +34,12 @@ const Le = (i) => {
34
34
  } = i, r = typeof t == "string", o = a ? [{
35
35
  [g]: a.idValue,
36
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, P] = m(!1), E = R(null), _ = `select-component-${N}-${Re()}`, z = R(null), l = R(null), b = R(null), h = R(null), V = () => {
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
38
  l.current && L(l.current.clientWidth);
39
39
  }, q = (e) => {
40
- const { target: n } = e;
40
+ const {
41
+ target: n
42
+ } = e;
41
43
  n !== l.current && !l.current?.contains(n) && !E.current?.contains(n) && d(!1);
42
44
  }, M = (e) => {
43
45
  const n = e.target, f = E.current?.parentElement?.id || "", Oe = !!document.getElementById(f)?.contains(n);
@@ -87,7 +89,7 @@ const Le = (i) => {
87
89
  w();
88
90
  }));
89
91
  }
90
- fe || (d(!1), P(!1), v(o));
92
+ fe || (d(!1), A(!1), v(o));
91
93
  }, Q = (e) => {
92
94
  if (e.keyCode) {
93
95
  if (e.keyCode === x.ENTER && c && y)
@@ -98,7 +100,7 @@ const Le = (i) => {
98
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]));
99
101
  }
100
102
  }
101
- A || P(!0);
103
+ $ || A(!0);
102
104
  }, Ce = () => {
103
105
  new Promise((e) => {
104
106
  e(w(null));
@@ -112,7 +114,7 @@ const Le = (i) => {
112
114
  window.removeEventListener("resize", V), document.removeEventListener("click", q), document.removeEventListener("mousemove", M);
113
115
  }), []), F(() => {
114
116
  if (B) {
115
- const e = document.querySelector(`#${_}>.-withinput.grid-container`);
117
+ const e = document.querySelector(`#${P}>.-withinput.grid-container`);
116
118
  b.current !== e && e && (b.current = e);
117
119
  }
118
120
  }, [B]), F(() => {
@@ -122,7 +124,7 @@ const Le = (i) => {
122
124
  }
123
125
  }, [o.length, C]), F(() => {
124
126
  if (!Y.isEqual(s, o)) {
125
- const e = I || k || !A ? o : Z({
127
+ const e = I || k || !$ ? o : Z({
126
128
  inputText: O,
127
129
  dataSource: o,
128
130
  descriptionKey: t
@@ -132,87 +134,22 @@ const Le = (i) => {
132
134
  p(n);
133
135
  }
134
136
  }
135
- a && v([
136
- {
137
- [g]: a.idValue,
138
- [r ? t : t(a.label)]: a.label
139
- },
140
- ...D
141
- ]);
142
- }, [JSON.stringify(o)]), /* @__PURE__ */ W.jsxs(
143
- "span",
144
- {
145
- id: _,
146
- ref: z,
147
- className: "select-component",
148
- children: [
149
- /* @__PURE__ */ W.jsx(
150
- Se,
151
- {
152
- ...i,
153
- inputRef: (e) => {
154
- i.inputRef && (Y.isFunction(i.inputRef) ? i.inputRef(e) : i.inputRef.current = e), h.current = e;
155
- },
156
- autoComplete: "off",
157
- readOnly: I || j(),
158
- value: O,
159
- onFocus: T,
160
- onBlur: H,
161
- onChange: (e) => {
162
- e && U(e.target.value);
163
- },
164
- onClick: T,
165
- onKeyDown: Q,
166
- customClassForLabel: ue,
167
- customClassForWrapper: `selectwrapper ${(I || $ || j()) && " -undigitable"} ${le}`,
168
- customClassForInputContent: `multiselect ${ce}`,
169
- inputBaseRef: (e) => {
170
- l.current = e;
171
- },
172
- handlerSetOnDenied: (e) => ge(e),
173
- rightElements: [
174
- ...re,
175
- /* @__PURE__ */ W.jsx(
176
- ye,
177
- {
178
- disabled: X() || j(),
179
- showClearButton: ie,
180
- dropDownOpened: y,
181
- handlerClear: () => X() ? null : Ce(),
182
- handlerOpenClose: he,
183
- customClassForSideButtons: ae
184
- },
185
- "action-buttons-simpleselect"
186
- )
187
- ]
188
- }
189
- ),
190
- y && /* @__PURE__ */ W.jsx(
191
- we,
192
- {
193
- ...i,
194
- opened: y,
195
- selected: c,
196
- inputValue: O,
197
- selectFieldRef: z,
198
- dropdownRef: E,
199
- searchOnDropdown: $,
200
- gridWrapperStyle: B && b.current ? window.getComputedStyle(b.current) : void 0,
201
- handleOnSelect: (e) => {
202
- e && G(e);
203
- },
204
- handleOnFilter: (e) => U(e),
205
- handleOnKeydown: Q,
206
- handleOnBlur: () => H,
207
- handleOnFocus: T,
208
- dataCombo: s,
209
- dropdownWidth: de || 0,
210
- searchNotFoundText: se
211
- }
212
- )
213
- ]
214
- }
215
- );
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
+ ] });
216
153
  };
217
154
  export {
218
155
  Le as default
@@ -1,6 +1,11 @@
1
- import { j as e } from "../../chunks/jsx-runtime.C7wFtzyj.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.C7wFtzyj.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.C7wFtzyj.js";
2
- import H, { useState as f, useRef as O, useEffect as v } from "react";
3
- import A from "../tooltip/index.js";
4
- const V = 40, E = ({ tooltip: n }) => n, P = H.createContext({}), _ = ({ 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: V
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
- A,
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(${_(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
  };
@@ -1,48 +1,53 @@
1
- import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useState as j, Fragment as p } from "react";
3
- import $ from "../icons/index.js";
4
- import '../assets/index14.css';const C = ({
5
- style: n = {},
6
- icon: s = null,
7
- flat: o = !1,
8
- iconName: l,
9
- handlerClosed: t,
10
- square: f = !0,
11
- visible: m = !0,
12
- children: i = null,
13
- customClass: a = "",
14
- type: r = "default",
15
- showCloseButton: u = !1
16
- }) => {
17
- const [c, x] = j(!1), d = () => `labelmessages-component -${r} ${a}
18
- ${f && "-square"} ${o && "-flat"}`, g = () => s || (l ? /* @__PURE__ */ e.jsx($, { name: l, size: 16, color: "#ffffff", customClass: `-${r}svg` }) : null);
19
- return c || !m ? null : /* @__PURE__ */ e.jsx(p, { children: /* @__PURE__ */ e.jsxs(
20
- "div",
21
- {
22
- className: `${d()} ${a}`,
23
- style: n,
24
- children: [
25
- /* @__PURE__ */ e.jsx("div", { className: "labelmessagesitem text", children: i }),
26
- (l || s) && /* @__PURE__ */ e.jsxs("div", { className: "labelmessagesitem -icon", children: [
27
- " ",
28
- g(),
29
- " "
30
- ] }),
31
- u && /* @__PURE__ */ e.jsx(
32
- "span",
33
- {
34
- role: "presentation",
35
- className: "labelmessagesitem -close",
36
- onClick: () => {
37
- t && t(), x(!0);
38
- },
39
- children: "x"
40
- }
41
- )
42
- ]
43
- }
44
- ) });
1
+ import { j as a } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as M } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as S, Fragment as A } from "react";
4
+ import D from "../icons/index.js";
5
+ import '../assets/index14.css';const O = (R) => {
6
+ const e = M.c(26), {
7
+ style: c,
8
+ icon: b,
9
+ flat: N,
10
+ iconName: s,
11
+ handlerClosed: r,
12
+ square: y,
13
+ visible: q,
14
+ children: w,
15
+ customClass: B,
16
+ type: E,
17
+ showCloseButton: I
18
+ } = R;
19
+ let f;
20
+ e[0] !== c ? (f = c === void 0 ? {} : c, e[0] = c, e[1] = f) : f = e[1];
21
+ const p = f, t = b === void 0 ? null : b, x = N === void 0 ? !1 : N, g = y === void 0 ? !0 : y, k = q === void 0 ? !0 : q, h = w === void 0 ? null : w, m = B === void 0 ? "" : B, l = E === void 0 ? "default" : E, C = I === void 0 ? !1 : I, [z, F] = S(!1);
22
+ let u;
23
+ e[2] !== m || e[3] !== x || e[4] !== g || e[5] !== l ? (u = () => `labelmessages-component -${l} ${m}
24
+ ${g && "-square"} ${x && "-flat"}`, e[2] = m, e[3] = x, e[4] = g, e[5] = l, e[6] = u) : u = e[6];
25
+ const L = u;
26
+ let d;
27
+ e[7] !== t || e[8] !== s || e[9] !== l ? (d = () => t || (s ? /* @__PURE__ */ a.jsx(D, { name: s, size: 16, color: "#ffffff", customClass: `-${l}svg` }) : null), e[7] = t, e[8] = s, e[9] = l, e[10] = d) : d = e[10];
28
+ const j = d;
29
+ if (z || !k)
30
+ return null;
31
+ const $ = `${L()} ${m}`;
32
+ let o;
33
+ e[11] !== h ? (o = /* @__PURE__ */ a.jsx("div", { className: "labelmessagesitem text", children: h }), e[11] = h, e[12] = o) : o = e[12];
34
+ let i;
35
+ e[13] !== j || e[14] !== t || e[15] !== s ? (i = (s || t) && /* @__PURE__ */ a.jsxs("div", { className: "labelmessagesitem -icon", children: [
36
+ " ",
37
+ j(),
38
+ " "
39
+ ] }), e[13] = j, e[14] = t, e[15] = s, e[16] = i) : i = e[16];
40
+ let n;
41
+ e[17] !== r || e[18] !== C ? (n = C && /* @__PURE__ */ a.jsx("span", { role: "presentation", className: "labelmessagesitem -close", onClick: () => {
42
+ r && r(), F(!0);
43
+ }, children: "x" }), e[17] = r, e[18] = C, e[19] = n) : n = e[19];
44
+ let v;
45
+ return e[20] !== p || e[21] !== $ || e[22] !== o || e[23] !== i || e[24] !== n ? (v = /* @__PURE__ */ a.jsx(A, { children: /* @__PURE__ */ a.jsxs("div", { className: $, style: p, children: [
46
+ o,
47
+ i,
48
+ n
49
+ ] }) }), e[20] = p, e[21] = $, e[22] = o, e[23] = i, e[24] = n, e[25] = v) : v = e[25], v;
45
50
  };
46
51
  export {
47
- C as default
52
+ O as default
48
53
  };
@@ -1,6 +1,20 @@
1
- import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import e from "./DefaultLabel.js";
3
- const t = ({ className: r, ...a }) => /* @__PURE__ */ s.jsx(e, { className: "-danger", ...a });
1
+ import { j as a } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as m } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import l from "./DefaultLabel.js";
4
+ const f = (r) => {
5
+ const e = m.c(4);
6
+ let s;
7
+ if (e[0] !== r) {
8
+ const {
9
+ className: c,
10
+ ...o
11
+ } = r;
12
+ s = o, e[0] = r, e[1] = s;
13
+ } else
14
+ s = e[1];
15
+ let t;
16
+ return e[2] !== s ? (t = /* @__PURE__ */ a.jsx(l, { className: "-danger", ...s }), e[2] = s, e[3] = t) : t = e[3], t;
17
+ };
4
18
  export {
5
- t as default
19
+ f as default
6
20
  };
@@ -1,41 +1,55 @@
1
- import { j as r } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
- import { useState as O } from "react";
3
- import v from "../icons/index.js";
4
- import E from "../internals/withTooltip.js";
5
- import { actionsOnPermissionDenied as N, OPTIONS_ON_DENIED as i } from "../permissionValidations.js";
6
- const h = ({
7
- style: l,
8
- targetRef: e,
9
- iconName: t,
10
- icon: o,
11
- children: m,
12
- visible: u = !0,
13
- customClass: a,
14
- className: d,
15
- disabled: f,
16
- size: s,
17
- iconAlign: n = "left",
18
- bordered: c,
19
- permissionAttr: p,
20
- skeletonize: $
21
- }) => {
22
- const b = [i.disabled, i.unvisible], [x] = O(N(b, p)), D = () => `label-component ${d} ${a} ${c ? "-bordered" : ""} ${f ? "-disabled" : ""}
23
- ${$ ? "-skeletonized" : ""}
24
- ${s ? `-${s}` : ""}
25
- ${n ? `icon-${n}` : ""}`, j = () => o || (t ? /* @__PURE__ */ r.jsx(v, { name: t, size: 16 }) : null);
26
- return !u || x.unvisible ? null : /* @__PURE__ */ r.jsxs(
27
- "div",
28
- {
29
- style: l,
30
- className: D(),
31
- ref: (I) => e && e(I),
32
- children: [
33
- j(),
34
- m
35
- ]
36
- }
37
- );
38
- }, k = E(h);
1
+ import { j as O } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as L } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as P } from "react";
4
+ import S from "../icons/index.js";
5
+ import T from "../internals/withTooltip.js";
6
+ import { actionsOnPermissionDenied as _, OPTIONS_ON_DENIED as h } from "../permissionValidations.js";
7
+ const w = (A) => {
8
+ const e = L.c(24), {
9
+ style: u,
10
+ targetRef: s,
11
+ iconName: o,
12
+ icon: n,
13
+ children: p,
14
+ visible: E,
15
+ customClass: b,
16
+ className: $,
17
+ disabled: v,
18
+ size: l,
19
+ iconAlign: I,
20
+ bordered: x,
21
+ permissionAttr: N,
22
+ skeletonize: g
23
+ } = A, R = E === void 0 ? !0 : E, r = I === void 0 ? "left" : I;
24
+ let c, m;
25
+ if (e[0] !== N) {
26
+ const z = [h.disabled, h.unvisible];
27
+ c = P, m = _(z, N), e[0] = N, e[1] = c, e[2] = m;
28
+ } else
29
+ c = e[1], m = e[2];
30
+ const [k] = c(m);
31
+ let a;
32
+ e[3] !== x || e[4] !== $ || e[5] !== b || e[6] !== v || e[7] !== r || e[8] !== l || e[9] !== g ? (a = () => `label-component ${$} ${b} ${x ? "-bordered" : ""} ${v ? "-disabled" : ""}
33
+ ${g ? "-skeletonized" : ""}
34
+ ${l ? `-${l}` : ""}
35
+ ${r ? `icon-${r}` : ""}`, e[3] = x, e[4] = $, e[5] = b, e[6] = v, e[7] = r, e[8] = l, e[9] = g, e[10] = a) : a = e[10];
36
+ const C = a;
37
+ let f;
38
+ e[11] !== n || e[12] !== o ? (f = () => n || (o ? /* @__PURE__ */ O.jsx(S, { name: o, size: 16 }) : null), e[11] = n, e[12] = o, e[13] = f) : f = e[13];
39
+ const D = f;
40
+ if (!R || k.unvisible)
41
+ return null;
42
+ const j = C();
43
+ let t;
44
+ e[14] !== s ? (t = (z) => s && s(z), e[14] = s, e[15] = t) : t = e[15];
45
+ let i;
46
+ e[16] !== D ? (i = D(), e[16] = D, e[17] = i) : i = e[17];
47
+ let d;
48
+ return e[18] !== p || e[19] !== u || e[20] !== j || e[21] !== t || e[22] !== i ? (d = /* @__PURE__ */ O.jsxs("div", { style: u, className: j, ref: t, children: [
49
+ i,
50
+ p
51
+ ] }), e[18] = p, e[19] = u, e[20] = j, e[21] = t, e[22] = i, e[23] = d) : d = e[23], d;
52
+ }, J = T(w);
39
53
  export {
40
- k as default
54
+ J as default
41
55
  };