triafly-ui-kit 1.0.47 → 1.0.51

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.
@@ -1 +1 @@
1
- .table-component{width:100%;overflow:auto;position:relative}.table-component__wrapper{width:100%}.table-component__wrapper.bordered{border:1px solid var(--color-border-primary-default);border-radius:8px}.table-component__wrapper__table{width:100%;border-collapse:separate;border-spacing:0}.table-component__wrapper__table.bordered{border:none}.table-component__wrapper__table__thead{background-color:var(--color-bg-innerisland-default);height:41px}.table-component__wrapper__table__thead.stickyHeader{position:sticky;top:0;z-index:10}.table-component__wrapper__table__thead__tr:hover{background-color:var(--color-bg-island-selected)}.table-component__wrapper__table__thead__th{padding:12px;text-align:left;position:relative}.table-component__wrapper__table__thead__th.bordered{border-left:1px solid var(--color-border-primary-default);border-bottom:none}.table-component__wrapper__table__thead__th.bordered:first-child{border-left:none}.table-component__wrapper__table__thead__th.stickyLeft{position:sticky;left:0;background-color:inherit;z-index:9}.table-component__wrapper__table__thead__th .th-content{display:flex;align-items:center;gap:4px}.table-component__wrapper__table__thead__th .sort-icon{display:inline-flex}.table-component__wrapper__table__tbody__tr:hover{background-color:var(--color-bg-island-selected)}.table-component__wrapper__table__tbody--hoverable{cursor:pointer}.table-component__wrapper__table__tbody__td{padding:12px}.table-component__wrapper__table__tbody__td--bordered{border-top:1px solid var(--color-border-primary-default);border-left:1px solid var(--color-border-primary-default)}.table-component__wrapper__table__tbody__td--bordered:first-child{border-left:none}.table-component__wrapper__table__tbody__td--sticky-left{position:sticky;left:0;background-color:inherit;z-index:8}.table-component__wrapper.borderBottom .table-component__wrapper__table__tbody td{border-bottom:1px solid var(--color-border-primary-default)}.loading_table_init{position:absolute;top:0;left:0;right:0;bottom:0;display:"flex";justify-content:"center";align-items:"center";background-color:"rgba(255, 255, 255, 0.7)";z-index:10}
1
+ .table-component{width:100%;position:relative}.table-component__wrapper{width:100%;overflow:auto}.table-component__wrapper.bordered{border:1px solid var(--color-border-primary-default);border-radius:8px}.table-component__wrapper__table{width:100%;border-collapse:separate;border-spacing:0}.table-component__wrapper__table.bordered{border:none}.table-component__wrapper__table__thead{background-color:var(--color-bg-innerisland-default);height:41px}.table-component__wrapper__table__thead.stickyHeader{position:sticky;top:0;z-index:10}.table-component__wrapper__table__thead__tr:hover{background-color:var(--color-bg-island-selected)}.table-component__wrapper__table__thead__th{padding:12px;text-align:left;position:relative}.table-component__wrapper__table__thead__th.bordered{border-left:1px solid var(--color-border-primary-default);border-bottom:none}.table-component__wrapper__table__thead__th.bordered:first-child{border-left:none}.table-component__wrapper__table__thead__th.stickyLeft{position:sticky;left:0;background-color:inherit;z-index:9}.table-component__wrapper__table__thead__th .th-content{display:flex;align-items:center;gap:4px}.table-component__wrapper__table__thead__th .sort-icon{display:inline-flex}.table-component__wrapper__table__tbody__tr:hover{background-color:var(--color-bg-island-selected)}.table-component__wrapper__table__tbody--hoverable{cursor:pointer}.table-component__wrapper__table__tbody__td{padding:12px}.table-component__wrapper__table__tbody__td--bordered{border-top:1px solid var(--color-border-primary-default);border-left:1px solid var(--color-border-primary-default)}.table-component__wrapper__table__tbody__td--bordered:first-child{border-left:none}.table-component__wrapper__table__tbody__td--sticky-left{position:sticky;left:0;background-color:inherit;z-index:8}.table-component__wrapper.borderBottom .table-component__wrapper__table__tbody td{border-bottom:1px solid var(--color-border-primary-default)}.loading_table_init{position:absolute;top:0;left:0;right:0;bottom:0;display:"flex";justify-content:"center";align-items:"center";background-color:"rgba(255, 255, 255, 0.7)";z-index:10}
@@ -11,7 +11,7 @@ const L = {
11
11
  desc: /* @__PURE__ */ n(ae, { viewBox: "0 -4 24 24", "aria-hidden": "true" }),
12
12
  default: /* @__PURE__ */ n(z, { viewBox: "0 -6 24 24", "aria-hidden": "true" })
13
13
  }, le = ({
14
- columns: m,
14
+ columns: p,
15
15
  dataSource: l,
16
16
  rowKey: f,
17
17
  tableClassName: $,
@@ -23,7 +23,7 @@ const L = {
23
23
  borderBottom: y = !1,
24
24
  stickyHeader: H = !1,
25
25
  stickyLeft: b = !1,
26
- bordered: p = !1,
26
+ bordered: m = !1,
27
27
  rowClassName: x,
28
28
  defaultSort: J,
29
29
  onClickTr: d,
@@ -39,7 +39,7 @@ const L = {
39
39
  }, W) => {
40
40
  const T = K.useRef(null), o = !!c && !!u, [A, X] = j(l || []), [s, E] = j(
41
41
  J || null
42
- ), N = te(() => {
42
+ ), w = te(() => {
43
43
  if (!o)
44
44
  return D ? l : A;
45
45
  }, [o, l, A, D]), I = k(
@@ -54,7 +54,7 @@ const L = {
54
54
  })), E({ key: e, order: t });
55
55
  },
56
56
  [o]
57
- ), v = k(
57
+ ), N = k(
58
58
  (e) => typeof f == "function" ? f(e) : String(e[f]),
59
59
  [f]
60
60
  ), Y = k(
@@ -68,26 +68,26 @@ const L = {
68
68
  const e = T.current;
69
69
  if (!e) return;
70
70
  const t = (_) => {
71
- const w = _.target, h = w.closest("tr");
72
- if (!h || w.closest("[data-no-bubble]")) return;
71
+ const v = _.target, h = v.closest("tr");
72
+ if (!h || v.closest("[data-no-bubble]")) return;
73
73
  const r = h.dataset.id;
74
74
  if (!(!r || !d))
75
75
  if (o && c) {
76
76
  const a = c[r];
77
77
  a && d(a);
78
78
  } else {
79
- const a = l == null ? void 0 : l.find((Z) => v(Z) === r);
79
+ const a = l == null ? void 0 : l.find((Z) => N(Z) === r);
80
80
  a && d(a);
81
81
  }
82
82
  };
83
83
  return e.addEventListener("click", t), () => e.removeEventListener("click", t);
84
- }, [l, d, v, o, c]), /* @__PURE__ */ n("div", { className: i("table-component", G), children: /* @__PURE__ */ n(
84
+ }, [l, d, N, o, c]), /* @__PURE__ */ n("div", { className: i("table-component", G), children: /* @__PURE__ */ n(
85
85
  "div",
86
86
  {
87
87
  className: i(
88
88
  "table-component__wrapper",
89
89
  {
90
- bordered: p,
90
+ bordered: m,
91
91
  borderBottom: y
92
92
  },
93
93
  $
@@ -97,7 +97,7 @@ const L = {
97
97
  "table",
98
98
  {
99
99
  className: i("table-component__wrapper__table", {
100
- bordered: p,
100
+ bordered: m,
101
101
  borderBottom: y
102
102
  }),
103
103
  ref: W,
@@ -120,13 +120,13 @@ const L = {
120
120
  U
121
121
  ),
122
122
  onClick: P,
123
- children: m.map((e, t) => /* @__PURE__ */ n(
123
+ children: p.map((e, t) => /* @__PURE__ */ n(
124
124
  "th",
125
125
  {
126
126
  className: i(
127
127
  "table-component__wrapper__table__thead__th",
128
128
  {
129
- bordered: p,
129
+ bordered: m,
130
130
  stickyLeft: b && t === 0
131
131
  },
132
132
  q
@@ -159,39 +159,40 @@ const L = {
159
159
  C,
160
160
  {
161
161
  record: t,
162
- columns: m,
162
+ columns: p,
163
163
  rowKey: f,
164
164
  rowClassName: x,
165
165
  index: u.indexOf(e),
166
166
  stickyLeft: b,
167
- bordered: p,
167
+ bordered: m,
168
168
  id: e
169
169
  },
170
170
  e
171
171
  ) : null;
172
- }) : N == null ? void 0 : N.map((e, t) => /* @__PURE__ */ n(
172
+ }) : w == null ? void 0 : w.map((e, t) => /* @__PURE__ */ n(
173
173
  C,
174
174
  {
175
175
  record: e,
176
- columns: m,
176
+ columns: p,
177
177
  rowKey: f,
178
178
  rowClassName: x,
179
179
  index: t,
180
180
  stickyLeft: b,
181
- bordered: p
181
+ bordered: m
182
182
  },
183
- v(e)
183
+ N(e)
184
184
  )),
185
185
  R ? /* @__PURE__ */ n("div", { className: "loading_table_init", children: /* @__PURE__ */ n(re, { className: "centered" }) }) : null,
186
- !R && Q && B && /* @__PURE__ */ n("tr", { ref: B, children: /* @__PURE__ */ n("td", { colSpan: m.length, children: S || /* @__PURE__ */ n(se, { colSpan: m.length }) }) })
186
+ !R && Q && B && /* @__PURE__ */ n("tr", { ref: B, children: /* @__PURE__ */ n("td", { colSpan: p.length, children: S || /* @__PURE__ */ n(se, { colSpan: p.length }) }) })
187
187
  ]
188
188
  }
189
189
  )
190
190
  ]
191
191
  }
192
192
  )
193
- }
194
- ) });
193
+ },
194
+ "wrapper"
195
+ ) }, "table-component");
195
196
  }, ue = ee(le);
196
197
  export {
197
198
  ue as Table
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triafly-ui-kit",
3
- "version": "1.0.47",
3
+ "version": "1.0.51",
4
4
  "description": "UI Kit from Triafly",
5
5
  "main": "./dist/main.js",
6
6
  "module": "./dist/main.js",