@telefonica/mistica 15.16.2 → 15.16.4
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.
- package/css/mistica.css +1 -1
- package/dist/package-version.js +1 -1
- package/dist/sheet.css.d.ts +1 -1
- package/dist/sheet.js +72 -72
- package/dist/table.js +12 -12
- package/dist-es/package-version.js +1 -1
- package/dist-es/sheet.js +99 -99
- package/dist-es/style.css +1 -1
- package/dist-es/table.js +31 -31
- package/package.json +1 -1
package/dist-es/table.js
CHANGED
|
@@ -78,9 +78,9 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
return target;
|
|
79
79
|
}
|
|
80
80
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
81
|
-
import * as
|
|
82
|
-
import { getPrefixedDataAttributes as
|
|
83
|
-
import { table as
|
|
81
|
+
import * as x from "react";
|
|
82
|
+
import { getPrefixedDataAttributes as V } from "./utils/dom.js";
|
|
83
|
+
import { table as X, boxed as W, collapsedRowsInMobile as E, fullWidth as M, hiddenHeadersInDesktop as ee, hiddenHeadersInMobile as te, cellTextAlign as _, verticalAlign as N, rowFirstItem as L, rowLastItem as R, rowLastCollapsedItem as H, collapsedRowHeaderItem as le, mobileCellHeading as re, collapsedRowTitle as ae, actionsTableCell as Y, topActions as oe, scrollContainer as se, scrollOverResponsiveLayout as ne, vars as ie } from "./table.css-mistica.js";
|
|
84
84
|
import { vars as j } from "./skins/skin-contract.css-mistica.js";
|
|
85
85
|
import ce, { Text1 as F, textProps as h, Text2 as me } from "./text.js";
|
|
86
86
|
import { InternalBoxed as pe } from "./boxed.js";
|
|
@@ -113,7 +113,7 @@ const P = {
|
|
|
113
113
|
}),
|
|
114
114
|
small: !0,
|
|
115
115
|
bleedY: !0
|
|
116
|
-
})), q = "left",
|
|
116
|
+
})), q = "left", Oe = /*#__PURE__*/ x.forwardRef((_param, $)=>{
|
|
117
117
|
var { dataAttributes: a, heading: m = [], content: k = [], boxed: b, responsive: J, fullWidth: u = !0, maxHeight: v, emptyCase: A, columnTextAlign: T = q, rowVerticalAlign: C = "middle", columnWidth: p, hideHeaders: g, scrollOverResponsiveLayout: K, rowHeaderIndex: s } = _param, S = _object_without_properties(_param, [
|
|
118
118
|
"dataAttributes",
|
|
119
119
|
"heading",
|
|
@@ -133,11 +133,11 @@ const P = {
|
|
|
133
133
|
const z = (l)=>{
|
|
134
134
|
var _T_l;
|
|
135
135
|
return Array.isArray(T) ? (_T_l = T[l]) !== null && _T_l !== void 0 ? _T_l : q : T;
|
|
136
|
-
}, r = J === "collapse-rows", B = g === !0 || g === "mobile", Q = g === !0 || g === "desktop", y = k.some((l)=>!Array.isArray(l) && l.actions.length > 0),
|
|
137
|
-
className: c(
|
|
136
|
+
}, r = J === "collapse-rows", B = g === !0 || g === "mobile", Q = g === !0 || g === "desktop", y = k.some((l)=>!Array.isArray(l) && l.actions.length > 0), D = /* @__PURE__ */ f("table", {
|
|
137
|
+
className: c(X, {
|
|
138
138
|
[W]: b,
|
|
139
|
-
[
|
|
140
|
-
[
|
|
139
|
+
[E]: r,
|
|
140
|
+
[M]: u,
|
|
141
141
|
[ee]: Q,
|
|
142
142
|
[te]: B || r
|
|
143
143
|
}),
|
|
@@ -155,8 +155,8 @@ const P = {
|
|
|
155
155
|
children: [
|
|
156
156
|
m.map((l, o)=>/* @__PURE__ */ e("th", {
|
|
157
157
|
scope: "col",
|
|
158
|
-
className: c(
|
|
159
|
-
[
|
|
158
|
+
className: c(_[z(o)], N[C], {
|
|
159
|
+
[L]: o === 0,
|
|
160
160
|
[R]: o === m.length - 1 && !y
|
|
161
161
|
}),
|
|
162
162
|
style: {
|
|
@@ -172,9 +172,9 @@ const P = {
|
|
|
172
172
|
/* @__PURE__ */ e("tbody", {
|
|
173
173
|
children: k.length > 0 ? k.map((l, o)=>{
|
|
174
174
|
var _l_actions;
|
|
175
|
-
const n = Array.isArray(l) ? l : l.cells, i = Array.isArray(l) ? [] : (_l_actions = l.actions) !== null && _l_actions !== void 0 ? _l_actions : [],
|
|
175
|
+
const n = Array.isArray(l) ? l : l.cells, i = Array.isArray(l) ? [] : (_l_actions = l.actions) !== null && _l_actions !== void 0 ? _l_actions : [], w = /* @__PURE__ */ e(be, {
|
|
176
176
|
space: 16,
|
|
177
|
-
children: i.map((d, t)=>"Icon" in d || "checkedProps" in d ? /* @__PURE__ */ e(ke, _object_spread({}, d), t) : /* @__PURE__ */ e(
|
|
177
|
+
children: i.map((d, t)=>"Icon" in d || "checkedProps" in d ? /* @__PURE__ */ e(ke, _object_spread({}, d), t) : /* @__PURE__ */ e(x.Fragment, {
|
|
178
178
|
children: d
|
|
179
179
|
}, t))
|
|
180
180
|
}), I = i.length ? `calc(${G.small} * ${i.length} + 16px * ${i.length - 1})` : "0px";
|
|
@@ -187,10 +187,10 @@ const P = {
|
|
|
187
187
|
n.map((d, t)=>{
|
|
188
188
|
const U = s === n.length - 1 ? t === n.length - 2 || n.length === 1 : t === n.length - 1;
|
|
189
189
|
return /* @__PURE__ */ f(t === s ? "th" : "td", {
|
|
190
|
-
className: c(
|
|
191
|
-
[
|
|
190
|
+
className: c(N[C], {
|
|
191
|
+
[L]: t === 0,
|
|
192
192
|
[R]: t === n.length - 1 && !y,
|
|
193
|
-
[
|
|
193
|
+
[H]: U && r,
|
|
194
194
|
[le]: t === s && r
|
|
195
195
|
}),
|
|
196
196
|
style: {
|
|
@@ -222,7 +222,7 @@ const P = {
|
|
|
222
222
|
as: "div",
|
|
223
223
|
wordBreak: !1,
|
|
224
224
|
children: /* @__PURE__ */ e("div", {
|
|
225
|
-
className: c(
|
|
225
|
+
className: c(_[z(t)], {
|
|
226
226
|
[ae]: t === s && r
|
|
227
227
|
}),
|
|
228
228
|
children: d
|
|
@@ -232,18 +232,18 @@ const P = {
|
|
|
232
232
|
}, t);
|
|
233
233
|
}),
|
|
234
234
|
i.length > 0 ? /* @__PURE__ */ e("td", {
|
|
235
|
-
className: c(
|
|
236
|
-
[
|
|
235
|
+
className: c(N[C], Y, R, {
|
|
236
|
+
[L]: n.length === 0
|
|
237
237
|
}),
|
|
238
238
|
align: "right",
|
|
239
239
|
style: {
|
|
240
240
|
width: `calc(${I} + 12px)`
|
|
241
241
|
},
|
|
242
|
-
children:
|
|
242
|
+
children: w
|
|
243
243
|
}) : y && /* @__PURE__ */ e("td", {
|
|
244
|
-
className:
|
|
244
|
+
className: Y
|
|
245
245
|
}),
|
|
246
|
-
r && i.length > 0 && /* @__PURE__ */ e("td", {
|
|
246
|
+
process.env.NODE_ENV !== "test" && r && i.length > 0 && /* @__PURE__ */ e("td", {
|
|
247
247
|
className: oe,
|
|
248
248
|
style: {
|
|
249
249
|
position: "absolute",
|
|
@@ -251,7 +251,7 @@ const P = {
|
|
|
251
251
|
right: b ? `calc(${P.boxed} - ${Z})` : 0,
|
|
252
252
|
width: I
|
|
253
253
|
},
|
|
254
|
-
children:
|
|
254
|
+
children: w
|
|
255
255
|
})
|
|
256
256
|
]
|
|
257
257
|
}, o));
|
|
@@ -259,7 +259,7 @@ const P = {
|
|
|
259
259
|
children: /* @__PURE__ */ e("td", {
|
|
260
260
|
colSpan: m.length,
|
|
261
261
|
className: c({
|
|
262
|
-
[
|
|
262
|
+
[H]: r
|
|
263
263
|
}),
|
|
264
264
|
children: typeof A == "string" ? /* @__PURE__ */ e(de, {
|
|
265
265
|
paddingY: 56,
|
|
@@ -274,13 +274,13 @@ const P = {
|
|
|
274
274
|
})
|
|
275
275
|
})
|
|
276
276
|
]
|
|
277
|
-
}),
|
|
277
|
+
}), O = function() {
|
|
278
278
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1;
|
|
279
279
|
return {
|
|
280
280
|
className: c(se, {
|
|
281
281
|
[ne]: l,
|
|
282
|
-
[
|
|
283
|
-
[
|
|
282
|
+
[E]: r,
|
|
283
|
+
[M]: u
|
|
284
284
|
}),
|
|
285
285
|
style: he({
|
|
286
286
|
[ie.maxHeight]: typeof v == "number" ? `${v}px` : v !== null && v !== void 0 ? v : "auto"
|
|
@@ -299,13 +299,13 @@ const P = {
|
|
|
299
299
|
dataAttributes: _object_spread({
|
|
300
300
|
"component-name": "Table"
|
|
301
301
|
}, a),
|
|
302
|
-
children: /* @__PURE__ */ e("div", _object_spread_props(_object_spread({},
|
|
303
|
-
children:
|
|
302
|
+
children: /* @__PURE__ */ e("div", _object_spread_props(_object_spread({}, O()), {
|
|
303
|
+
children: D
|
|
304
304
|
}))
|
|
305
305
|
}) : /* @__PURE__ */ e("div", _object_spread_props(_object_spread({
|
|
306
306
|
ref: $
|
|
307
|
-
},
|
|
308
|
-
children:
|
|
307
|
+
}, V(a, "Table"), O(K)), {
|
|
308
|
+
children: D
|
|
309
309
|
}));
|
|
310
310
|
});
|
|
311
|
-
export {
|
|
311
|
+
export { Oe as Table };
|