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
package/lib/table/Row.js CHANGED
@@ -1,54 +1,53 @@
1
- import { j as o } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useContext as N } from "react";
3
- import T, { RowContext as $ } from "./helpers.js";
4
- const g = (m) => {
5
- const {
6
- customClass: x,
7
- children: h,
8
- rowId: e,
1
+ import { j as s } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as z } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useContext as L } from "react";
4
+ import P, { RowContext as V } from "./helpers.js";
5
+ const G = (g) => {
6
+ const e = z.c(29), {
7
+ customClass: C,
8
+ children: f,
9
+ rowId: o,
9
10
  dataId: t,
10
- onClick: l,
11
- height: u,
12
- style: w,
13
- onMouseEnter: C,
14
- onMouseLeave: f,
15
- rowBorder: p = !0,
11
+ onClick: r,
12
+ height: p,
13
+ style: u,
14
+ onMouseEnter: h,
15
+ onMouseLeave: R,
16
+ rowBorder: T,
16
17
  divider: j,
17
- dividerTitle: i,
18
- dividerStyle: r,
19
- dividerColor: s = "info",
20
- dividerColSpan: d = 2
21
- } = m, {
22
- selectedRowId: R,
23
- handleSelectRow: n,
24
- handleTableRowClick: a,
25
- handleTableColClick: k,
26
- vertical: c,
27
- skeletonize: y,
28
- skeletonInRows: S = 10
29
- } = N(T), I = {
18
+ dividerTitle: d,
19
+ dividerStyle: n,
20
+ dividerColor: b,
21
+ dividerColSpan: E
22
+ } = g, k = T === void 0 ? !0 : T, c = b === void 0 ? "info" : b, a = E === void 0 ? 2 : E, {
23
+ selectedRowId: S,
24
+ handleSelectRow: v,
25
+ handleTableRowClick: m,
26
+ handleTableColClick: y,
27
+ vertical: i,
28
+ skeletonize: I,
29
+ skeletonInRows: B
30
+ } = L(P), $ = B === void 0 ? 10 : B;
31
+ let w;
32
+ e[0] !== t || e[1] !== y || e[2] !== k || e[3] !== $ || e[4] !== I || e[5] !== i ? (w = {
30
33
  dataId: t,
31
- rowBorder: p,
32
- handleTableColClick: k,
33
- vertical: c,
34
- skeletonize: y,
35
- skeletonInRows: S
36
- };
37
- return /* @__PURE__ */ o.jsx($.Provider, { value: I, children: j ? /* @__PURE__ */ o.jsx("tr", { className: "trow trow-divider", children: c ? /* @__PURE__ */ o.jsx("th", { colSpan: d, className: `-divider -${s}`, style: r, children: i || "" }) : /* @__PURE__ */ o.jsx("td", { colSpan: d, className: `-divider -${s}`, style: r, children: i || "" }) }) : /* @__PURE__ */ o.jsx(
38
- "tr",
39
- {
40
- onMouseEnter: C,
41
- onMouseLeave: f,
42
- className: `trow ${x} ${e && R === e ? "-selected" : ""}`,
43
- onClick: (v) => {
44
- n && (e !== void 0 || e !== null) && n(e), a && a(v, t), l && l(v, t);
45
- },
46
- id: e,
47
- style: { ...w, height: u },
48
- children: h
49
- }
50
- ) });
34
+ rowBorder: k,
35
+ handleTableColClick: y,
36
+ vertical: i,
37
+ skeletonize: I,
38
+ skeletonInRows: $
39
+ }, e[0] = t, e[1] = y, e[2] = k, e[3] = $, e[4] = I, e[5] = i, e[6] = w) : w = e[6];
40
+ const N = w;
41
+ let l;
42
+ e[7] !== f || e[8] !== C || e[9] !== t || e[10] !== j || e[11] !== a || e[12] !== c || e[13] !== n || e[14] !== d || e[15] !== v || e[16] !== m || e[17] !== p || e[18] !== r || e[19] !== h || e[20] !== R || e[21] !== o || e[22] !== S || e[23] !== u || e[24] !== i ? (l = j ? /* @__PURE__ */ s.jsx("tr", { className: "trow trow-divider", children: i ? /* @__PURE__ */ s.jsx("th", { colSpan: a, className: `-divider -${c}`, style: n, children: d || "" }) : /* @__PURE__ */ s.jsx("td", { colSpan: a, className: `-divider -${c}`, style: n, children: d || "" }) }) : /* @__PURE__ */ s.jsx("tr", { onMouseEnter: h, onMouseLeave: R, className: `trow ${C} ${o && S === o ? "-selected" : ""}`, onClick: (M) => {
43
+ v && (o !== void 0 || o !== null) && v(o), m && m(M, t), r && r(M, t);
44
+ }, id: o, style: {
45
+ ...u,
46
+ height: p
47
+ }, children: f }), e[7] = f, e[8] = C, e[9] = t, e[10] = j, e[11] = a, e[12] = c, e[13] = n, e[14] = d, e[15] = v, e[16] = m, e[17] = p, e[18] = r, e[19] = h, e[20] = R, e[21] = o, e[22] = S, e[23] = u, e[24] = i, e[25] = l) : l = e[25];
48
+ let x;
49
+ return e[26] !== N || e[27] !== l ? (x = /* @__PURE__ */ s.jsx(V.Provider, { value: N, children: l }), e[26] = N, e[27] = l, e[28] = x) : x = e[28], x;
51
50
  };
52
51
  export {
53
- g as default
52
+ G as default
54
53
  };
@@ -1,46 +1,58 @@
1
- import { j as a } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useContext as h, useCallback as y } from "react";
3
- import g from "../skeleton/index.js";
4
- import { RowContext as j } from "./helpers.js";
5
- function R(e, {
6
- ignoreTableColClick: r,
7
- handleTableColClick: t,
1
+ import { j as y } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as S } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useContext as B } from "react";
4
+ import I from "../skeleton/index.js";
5
+ import { RowContext as M } from "./helpers.js";
6
+ function N(e, {
7
+ ignoreTableColClick: t,
8
+ handleTableColClick: c,
8
9
  onClick: n,
9
- dataId: o
10
+ dataId: r
10
11
  }) {
11
- if (!r) {
12
+ if (!t) {
12
13
  if (n)
13
- return n(e, o);
14
- if (t)
15
- return t(e, o);
14
+ return n(e, r);
15
+ if (c)
16
+ return c(e, r);
16
17
  }
17
18
  }
18
- const d = { never: "hidden", onRowHover: "rowhover" }, B = (e) => {
19
- const {
20
- customClass: r,
21
- style: t,
22
- displayContent: n = "always",
23
- textAlign: o,
24
- visible: f = !0,
25
- rowSpan: c,
26
- colSpan: x,
27
- children: s,
28
- isMenuColumn: p = !1
29
- } = e, l = h(j), { skeletonize: i, vertical: u, skeletonInRows: w = 10 } = l, m = n !== "always", C = y(() => i && u ? /* @__PURE__ */ a.jsx(g, { height: 16, style: { marginBottom: 0 } }) : m && n ? /* @__PURE__ */ a.jsx("span", { className: d[n], children: s }) : s, [i, u, s, n, m, d]);
30
- return !f || i && !w && !u ? null : /* @__PURE__ */ a.jsx(
31
- "td",
32
- {
33
- rowSpan: c,
34
- colSpan: x,
35
- className: `rowcolumn ${r} text-align-${o} ${!l.rowBorder && " -noborder"} ${c ? "" : " -norowspan"} ${p && "menu-column"}`,
36
- style: t,
37
- onClick: (v) => R(v, { ...l, ...e }),
38
- role: "presentation",
39
- tabIndex: -1,
40
- children: C()
41
- }
42
- );
19
+ const z = {
20
+ never: "hidden",
21
+ onRowHover: "rowhover"
22
+ }, G = (e) => {
23
+ const t = S.c(18), {
24
+ customClass: c,
25
+ style: n,
26
+ displayContent: r,
27
+ textAlign: g,
28
+ visible: R,
29
+ rowSpan: u,
30
+ colSpan: v,
31
+ children: m,
32
+ isMenuColumn: h
33
+ } = e, i = r === void 0 ? "always" : r, j = R === void 0 ? !0 : R, k = h === void 0 ? !1 : h, l = B(M), {
34
+ skeletonize: a,
35
+ vertical: d,
36
+ skeletonInRows: $
37
+ } = l, b = $ === void 0 ? 10 : $, w = i !== "always";
38
+ let f;
39
+ t[0] !== m || t[1] !== i || t[2] !== w || t[3] !== a || t[4] !== d ? (f = () => a && d ? /* @__PURE__ */ y.jsx(I, { height: 16, style: {
40
+ marginBottom: 0
41
+ } }) : w && i ? /* @__PURE__ */ y.jsx("span", { className: z[i], children: m }) : m, t[0] = m, t[1] = i, t[2] = w, t[3] = a, t[4] = d, t[5] = f) : f = t[5];
42
+ const p = f;
43
+ if (!j || a && !b && !d)
44
+ return null;
45
+ const C = `rowcolumn ${c} text-align-${g} ${!l.rowBorder && " -noborder"} ${u ? "" : " -norowspan"} ${k && "menu-column"}`;
46
+ let o;
47
+ t[6] !== l || t[7] !== e ? (o = (E) => N(E, {
48
+ ...l,
49
+ ...e
50
+ }), t[6] = l, t[7] = e, t[8] = o) : o = t[8];
51
+ let s;
52
+ t[9] !== p ? (s = p(), t[9] = p, t[10] = s) : s = t[10];
53
+ let x;
54
+ return t[11] !== v || t[12] !== u || t[13] !== n || t[14] !== C || t[15] !== o || t[16] !== s ? (x = /* @__PURE__ */ y.jsx("td", { rowSpan: u, colSpan: v, className: C, style: n, onClick: o, role: "presentation", tabIndex: -1, children: s }), t[11] = v, t[12] = u, t[13] = n, t[14] = C, t[15] = o, t[16] = s, t[17] = x) : x = t[17], x;
43
55
  };
44
56
  export {
45
- B as default
57
+ G as default
46
58
  };
@@ -1,5 +1,7 @@
1
1
  import t from "react";
2
- const n = t.createContext({}), c = t.createContext({}), m = (e) => Array.from({ length: e }, (r, o) => o + 1);
2
+ const n = t.createContext({}), c = t.createContext({}), m = (e) => Array.from({
3
+ length: e
4
+ }, (r, o) => o + 1);
3
5
  export {
4
6
  c as RowContext,
5
7
  n as default,
@@ -1,109 +1,106 @@
1
- import { j as b } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as f, useRef as P, useCallback as C, useMemo as V, useEffect as S } from "react";
3
- import W from "lodash";
4
- import { default as Z } from "./Header.js";
5
- import { default as te } from "./Row.js";
6
- import { default as se } from "./Body.js";
7
- import { default as ne } from "./HeaderColumn.js";
8
- import { default as re } from "./RowColumn.js";
1
+ import { j as x } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as q } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as u, useRef as A, useEffect as $ } from "react";
4
+ import { _ as k } from "../chunks/lodash.CIAK_hAg.js";
5
+ import { default as re } from "./Header.js";
6
+ import { default as ce } from "./Row.js";
7
+ import { default as ae } from "./Body.js";
8
+ import { default as me } from "./HeaderColumn.js";
9
+ import { default as ue } from "./RowColumn.js";
9
10
  import '../assets/table.css';/* empty css */
10
- import F from "./helpers.js";
11
- const v = ({
12
- customClass: l,
13
- striped: t,
14
- bordered: n,
15
- hovered: d,
16
- skeletonize: r,
17
- headerColored: c,
18
- condensed: a,
19
- vertical: o,
20
- bodyScrollable: i,
21
- skeletonInRows: m = 10
22
- }) => `table-component ${l} ${t && "-striped"}
23
- ${n && "-bordered"} ${d && "-hovered"} ${c && "-headercolor"}
24
- ${a && "-condensed"}
25
- ${o && "-vertical"}
26
- ${r && !m ? "-skeletonized" : ""}
27
- ${i ? "-scrollable" : ""}`, U = ({ children: l, ...t }) => {
28
- const {
29
- onColClick: n,
30
- onRowClick: d,
31
- bodyScrollable: r,
32
- vertical: c,
33
- skeletonize: a,
34
- strict: o,
35
- skeletonHeight: i,
36
- skeletonInHeader: m,
37
- skeletonInRows: x,
38
- customClass: M,
39
- bordered: _,
40
- hovered: q,
41
- headerColored: A,
42
- condensed: D,
43
- selectedRowId: j,
44
- striped: G,
45
- ...E
46
- } = t, [R, k] = f(j), [h, g] = f(0), [u, z] = f([]), [p, H] = f(0), s = P(null), w = C((e) => {
47
- k(e);
48
- }, []), y = C((e) => {
49
- !W.isEmpty(e) && W.isEmpty(u) && z(e);
50
- }, [u]), T = C((e) => H(e), []), $ = C(() => ({
51
- bodyContainerRef: s,
52
- bodyScrollWidth: h,
53
- selectedRowId: R,
54
- vertical: c,
55
- skeletonize: a,
56
- skeletonHeight: i,
57
- skeletonInHeader: m,
58
- skeletonInRows: x,
59
- strict: o,
60
- columnsCount: p,
61
- handleSelectRow: w,
62
- handleTableColClick: n,
63
- handleTableRowClick: d,
64
- handlerSetColumnsWidth: y,
65
- columnsWidth: u,
66
- handlerSetColumnsCount: T
67
- }), [
68
- s,
69
- h,
70
- R,
71
- c,
72
- a,
73
- i,
74
- m,
75
- x,
76
- o,
77
- p,
78
- w,
79
- n,
80
- d,
81
- y,
82
- u,
83
- T
84
- ]), B = V(() => $(), [$]);
85
- return S(() => {
86
- if (r && s && s.current) {
87
- const { offsetWidth: e, clientWidth: N } = s.current, I = e - N;
88
- I !== h && g(I);
11
+ import D from "./helpers.js";
12
+ const T = ({
13
+ customClass: h,
14
+ striped: e,
15
+ bordered: l,
16
+ hovered: o,
17
+ skeletonize: p,
18
+ headerColored: C,
19
+ condensed: s,
20
+ vertical: b,
21
+ bodyScrollable: R,
22
+ skeletonInRows: r = 10
23
+ }) => `table-component ${h} ${e && "-striped"}
24
+ ${l && "-bordered"} ${o && "-hovered"} ${C && "-headercolor"}
25
+ ${s && "-condensed"}
26
+ ${b && "-vertical"}
27
+ ${p && !r ? "-skeletonized" : ""}
28
+ ${R ? "-scrollable" : ""}`, oe = (h) => {
29
+ const e = q.c(6), {
30
+ children: l,
31
+ ...o
32
+ } = h, {
33
+ onColClick: p,
34
+ onRowClick: C,
35
+ bodyScrollable: s,
36
+ vertical: b,
37
+ skeletonize: R,
38
+ strict: r,
39
+ skeletonHeight: _,
40
+ skeletonInHeader: I,
41
+ skeletonInRows: W,
42
+ customClass: G,
43
+ bordered: J,
44
+ hovered: K,
45
+ headerColored: L,
46
+ condensed: M,
47
+ selectedRowId: v,
48
+ striped: O,
49
+ ...j
50
+ } = o, [E, y] = u(v), [S, z] = u(0);
51
+ let n;
52
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = [], e[0] = n) : n = e[0];
53
+ const [c, H] = u(n), [g, B] = u(0), d = A(null);
54
+ let a;
55
+ e[1] === Symbol.for("react.memo_cache_sentinel") ? (a = (t) => {
56
+ y(t);
57
+ }, e[1] = a) : a = e[1];
58
+ const N = a;
59
+ let i;
60
+ e[2] !== c ? (i = (t) => {
61
+ !k.isEmpty(t) && k.isEmpty(c) && H(t);
62
+ }, e[2] = c, e[3] = i) : i = e[3];
63
+ const P = i;
64
+ let m;
65
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (m = (t) => B(t), e[4] = m) : m = e[4];
66
+ const F = {
67
+ bodyContainerRef: d,
68
+ bodyScrollWidth: S,
69
+ selectedRowId: E,
70
+ vertical: b,
71
+ skeletonize: R,
72
+ skeletonHeight: _,
73
+ skeletonInHeader: I,
74
+ skeletonInRows: W,
75
+ strict: r,
76
+ columnsCount: g,
77
+ handleSelectRow: N,
78
+ handleTableColClick: p,
79
+ handleTableRowClick: C,
80
+ handlerSetColumnsWidth: P,
81
+ columnsWidth: c,
82
+ handlerSetColumnsCount: m
83
+ };
84
+ let f;
85
+ return e[5] === Symbol.for("react.memo_cache_sentinel") ? (f = [], e[5] = f) : f = e[5], $(() => {
86
+ if (s && d && d.current) {
87
+ const {
88
+ offsetWidth: t,
89
+ clientWidth: V
90
+ } = d.current, w = t - V;
91
+ w !== S && z(w);
89
92
  }
90
- }, []), S(() => {
91
- k(t.selectedRowId);
92
- }, [t.selectedRowId]), /* @__PURE__ */ b.jsx(F.Provider, { value: B, children: r ? /* @__PURE__ */ b.jsx("div", { className: v(t), children: l }) : /* @__PURE__ */ b.jsx(
93
- "table",
94
- {
95
- style: { contain: o ? "strict" : "size style" },
96
- className: v(t),
97
- ...E,
98
- children: l
99
- }
100
- ) });
93
+ }, f), $(() => {
94
+ y(o.selectedRowId);
95
+ }, [o.selectedRowId]), /* @__PURE__ */ x.jsx(D.Provider, { value: F, children: s ? /* @__PURE__ */ x.jsx("div", { className: T(o), children: l }) : /* @__PURE__ */ x.jsx("table", { style: {
96
+ contain: r ? "strict" : "size style"
97
+ }, className: T(o), ...j, children: l }) });
101
98
  };
102
99
  export {
103
- se as TBody,
104
- Z as THeader,
105
- te as TRow,
106
- re as Td,
107
- ne as Th,
108
- U as default
100
+ ae as TBody,
101
+ re as THeader,
102
+ ce as TRow,
103
+ ue as Td,
104
+ me as Th,
105
+ oe as default
109
106
  };
@@ -1,10 +1,11 @@
1
- import { j as o } from "../chunks/jsx-runtime.CYK1ROHF.js";
2
- import h from "lodash";
3
- import a from "../buttons/Button.js";
4
- import b from "../icons/index.js";
1
+ import { j as s } from "../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as k } from "../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { _ as N } from "../chunks/lodash.CIAK_hAg.js";
4
+ import C from "../buttons/Button.js";
5
+ import $ from "../icons/index.js";
5
6
  import '../assets/radio.css';import '../assets/toolbar.css';import '../assets/label.css';import '../assets/panel.css';import '../assets/noPermission.css';import '../assets/gridlayout.css';import '../assets/button.css';/* empty css */
6
- import x from "../list/index.js";
7
- import { useTabs as p } from "./useTabs.js";
7
+ import A from "../list/index.js";
8
+ import { useTabs as D } from "./useTabs.js";
8
9
  import "react";
9
10
  /* empty css */
10
11
  import "../panel/helpers.js";
@@ -20,62 +21,64 @@ import "../popover/index.js";
20
21
  import "../textContent/index.js";
21
22
  import "./MenuTabs.js";
22
23
  import "./tabHelpers.js";
23
- import { L as f } from "../chunks/tabs.Cvj2MJH6.js";
24
+ import { L } from "../chunks/tabs.BvKfeA6Y.js";
24
25
  import "./context.js";
25
- import "../chunks/index.yztgndLc.js";
26
- const j = ({
27
- id: t,
28
- title: e,
29
- closeable: m,
30
- iconAlign: i,
31
- icon: s,
32
- iconName: n,
33
- disabled: r,
34
- tabMenuSize: l
35
- }) => {
36
- const { selectTab: c, removeTab: d, selectedTabId: u } = p();
37
- return /* @__PURE__ */ o.jsx(f, { onClick: () => c(t), children: /* @__PURE__ */ o.jsxs("div", { className: "menuitem", children: [
38
- u === t ? /* @__PURE__ */ o.jsx(b, { name: "checkmark", color: "#A10D0D" }) : /* @__PURE__ */ o.jsx("div", { style: { width: 16, height: 16 } }),
39
- /* @__PURE__ */ o.jsx(
40
- a,
41
- {
42
- className: "btn menubutton",
43
- boxShadow: !1,
44
- iconAlign: i,
45
- iconName: n,
46
- icon: s,
47
- disabled: r,
48
- label: e,
49
- size: l,
50
- transparent: !0
51
- }
52
- ),
53
- m && /* @__PURE__ */ o.jsx(
54
- "button",
55
- {
56
- className: "closepanel",
57
- onClick: () => d(t)
58
- }
59
- )
60
- ] }) }, t);
61
- }, M = ({
62
- tabs: t = [],
63
- tabMenuSize: e = "medium"
64
- }) => {
65
- const { selectedTabId: m } = p(), i = t.some((r) => r.id === m), s = t.length > 0, n = h.uniqBy(t, "id");
66
- return s ? /* @__PURE__ */ o.jsx(
67
- a,
68
- {
69
- dropdown: !0,
70
- dropdownAlign: "right",
71
- transparent: !0,
72
- boxShadow: !1,
73
- size: "large",
74
- customClass: `dropdownbutton ${s ? "show" : ""} ${i ? "has-selected" : ""}`,
75
- children: /* @__PURE__ */ o.jsx(x, { customClass: "dropdown-hide-tabs", children: n.map((r) => /* @__PURE__ */ o.jsx(j, { tabMenuSize: e, ...r }, r.id)) })
76
- }
77
- ) : null;
26
+ import "../chunks/index.aw0XaUkg.js";
27
+ const M = (v) => {
28
+ const t = k.c(25), {
29
+ id: e,
30
+ title: b,
31
+ closeable: a,
32
+ iconAlign: p,
33
+ icon: d,
34
+ iconName: i,
35
+ disabled: x,
36
+ tabMenuSize: f
37
+ } = v, {
38
+ selectTab: T,
39
+ removeTab: u,
40
+ selectedTabId: j
41
+ } = D();
42
+ let n;
43
+ t[0] !== e || t[1] !== T ? (n = () => T(e), t[0] = e, t[1] = T, t[2] = n) : n = t[2];
44
+ let r;
45
+ t[3] !== e || t[4] !== j ? (r = j === e ? /* @__PURE__ */ s.jsx($, { name: "checkmark", color: "#A10D0D" }) : /* @__PURE__ */ s.jsx("div", { style: {
46
+ width: 16,
47
+ height: 16
48
+ } }), t[3] = e, t[4] = j, t[5] = r) : r = t[5];
49
+ let l;
50
+ t[6] !== x || t[7] !== d || t[8] !== p || t[9] !== i || t[10] !== f || t[11] !== b ? (l = /* @__PURE__ */ s.jsx(C, { className: "btn menubutton", boxShadow: !1, iconAlign: p, iconName: i, icon: d, disabled: x, label: b, size: f, transparent: !0 }), t[6] = x, t[7] = d, t[8] = p, t[9] = i, t[10] = f, t[11] = b, t[12] = l) : l = t[12];
51
+ let m;
52
+ t[13] !== a || t[14] !== e || t[15] !== u ? (m = a && /* @__PURE__ */ s.jsx("button", { className: "closepanel", onClick: () => u(e) }), t[13] = a, t[14] = e, t[15] = u, t[16] = m) : m = t[16];
53
+ let o;
54
+ t[17] !== r || t[18] !== l || t[19] !== m ? (o = /* @__PURE__ */ s.jsxs("div", { className: "menuitem", children: [
55
+ r,
56
+ l,
57
+ m
58
+ ] }), t[17] = r, t[18] = l, t[19] = m, t[20] = o) : o = t[20];
59
+ let c;
60
+ return t[21] !== e || t[22] !== n || t[23] !== o ? (c = /* @__PURE__ */ s.jsx(L, { onClick: n, children: o }, e), t[21] = e, t[22] = n, t[23] = o, t[24] = c) : c = t[24], c;
61
+ }, rt = (v) => {
62
+ const t = k.c(11), {
63
+ tabs: e,
64
+ tabMenuSize: b
65
+ } = v, a = e === void 0 ? [] : e, p = b === void 0 ? "medium" : b, {
66
+ selectedTabId: d
67
+ } = D();
68
+ let i;
69
+ t[0] !== d ? (i = (S) => S.id === d, t[0] = d, t[1] = i) : i = t[1];
70
+ const x = a.some(i), f = a.length > 0, T = N.uniqBy(a, "id");
71
+ if (!f)
72
+ return null;
73
+ const u = C, j = !0, n = "right", r = !0, l = !1, m = "large", o = `dropdownbutton ${f ? "show" : ""} ${x ? "has-selected" : ""}`, c = A, I = "dropdown-hide-tabs";
74
+ let w;
75
+ t[2] !== p ? (w = (S) => /* @__PURE__ */ s.jsx(M, { tabMenuSize: p, ...S }, S.id), t[2] = p, t[3] = w) : w = t[3];
76
+ const z = T.map(w);
77
+ let h;
78
+ t[4] !== c || t[5] !== z ? (h = /* @__PURE__ */ s.jsx(c, { customClass: I, children: z }), t[4] = c, t[5] = z, t[6] = h) : h = t[6];
79
+ let g;
80
+ return t[7] !== u || t[8] !== h || t[9] !== o ? (g = /* @__PURE__ */ s.jsx(u, { dropdown: j, dropdownAlign: n, transparent: r, boxShadow: l, size: m, customClass: o, children: h }), t[7] = u, t[8] = h, t[9] = o, t[10] = g) : g = t[10], g;
78
81
  };
79
82
  export {
80
- M as default
83
+ rt as default
81
84
  };