@pismo/marola 1.0.0-beta.30 → 1.0.0-beta.32

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,46 +1,46 @@
1
1
  import '../../assets/Table.css';
2
- import { jsxs as g, jsx as a } from "react/jsx-runtime";
3
- import * as p from "react";
2
+ import { jsxs as g, jsx as r } from "react/jsx-runtime";
3
+ import * as i from "react";
4
4
  import { useState as w } from "react";
5
- import { c as d } from "../../clsx-DB4S2d7J.js";
5
+ import { c as y } from "../../clsx-DB4S2d7J.js";
6
6
  import { paginationDefaultTranslations as u, Pagination as T } from "../Pagination/Pagination.js";
7
7
  import { sortTooltipDefaultTranslations as m, SortTooltip as f } from "../SortTooltip/SortTooltip.js";
8
8
  import { TableProvider as x, useTable as N } from "./TableContext.js";
9
- const C = (l) => /* @__PURE__ */ p.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ p.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ p.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ p.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ p.createElement("defs", null, /* @__PURE__ */ p.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ p.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1ysnl_43", E = "_th__wrapper_1ysnl_118", k = "_tr_1ysnl_134", v = "_td_1ysnl_138", t = {
10
- "u-typography-h1": "_u-typography-h1_1ysnl_1",
11
- "u-typography-h2": "_u-typography-h2_1ysnl_8",
12
- "u-typography-h3": "_u-typography-h3_1ysnl_15",
13
- "u-typography-h4": "_u-typography-h4_1ysnl_22",
14
- "u-typography-h5": "_u-typography-h5_1ysnl_29",
15
- "u-typography-h6": "_u-typography-h6_1ysnl_36",
16
- "u-typography-base": "_u-typography-base_1ysnl_43",
9
+ const C = (a) => /* @__PURE__ */ i.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ i.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ i.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ i.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ i.createElement("defs", null, /* @__PURE__ */ i.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ i.createElement("rect", { width: 7, height: 10, fill: "white" })))), L = "_table_1tnti_43", E = "_th__wrapper_1tnti_117", k = "_tr_1tnti_137", v = "_td_1tnti_141", e = {
10
+ "u-typography-h1": "_u-typography-h1_1tnti_1",
11
+ "u-typography-h2": "_u-typography-h2_1tnti_8",
12
+ "u-typography-h3": "_u-typography-h3_1tnti_15",
13
+ "u-typography-h4": "_u-typography-h4_1tnti_22",
14
+ "u-typography-h5": "_u-typography-h5_1tnti_29",
15
+ "u-typography-h6": "_u-typography-h6_1tnti_36",
16
+ "u-typography-base": "_u-typography-base_1tnti_43",
17
17
  table: L,
18
- "u-typography-base--xxl": "_u-typography-base--xxl_1ysnl_49",
19
- "u-typography-base--xl": "_u-typography-base--xl_1ysnl_53",
20
- "u-typography-base--lg": "_u-typography-base--lg_1ysnl_57",
21
- "u-typography-base--sm": "_u-typography-base--sm_1ysnl_61",
22
- "u-typography-base--bold": "_u-typography-base--bold_1ysnl_65",
23
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1ysnl_68",
24
- "u-typography-base--underlined": "_u-typography-base--underlined_1ysnl_71",
25
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1ysnl_74",
26
- "table--fixed": "_table--fixed_1ysnl_82",
27
- "table--full-width": "_table--full-width_1ysnl_85",
28
- "table--white-theme": "_table--white-theme_1ysnl_88",
29
- "table--transparent-theme": "_table--transparent-theme_1ysnl_91",
30
- "cell--left-alignment": "_cell--left-alignment_1ysnl_94",
31
- "cell--center-alignment": "_cell--center-alignment_1ysnl_98",
32
- "cell--right-alignment": "_cell--right-alignment_1ysnl_102",
18
+ "u-typography-base--xxl": "_u-typography-base--xxl_1tnti_49",
19
+ "u-typography-base--xl": "_u-typography-base--xl_1tnti_53",
20
+ "u-typography-base--lg": "_u-typography-base--lg_1tnti_57",
21
+ "u-typography-base--sm": "_u-typography-base--sm_1tnti_61",
22
+ "u-typography-base--bold": "_u-typography-base--bold_1tnti_65",
23
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1tnti_68",
24
+ "u-typography-base--underlined": "_u-typography-base--underlined_1tnti_71",
25
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1tnti_74",
26
+ "table--fixed": "_table--fixed_1tnti_82",
27
+ "table--full-width": "_table--full-width_1tnti_85",
28
+ "table--white-theme": "_table--white-theme_1tnti_88",
29
+ "table--transparent-theme": "_table--transparent-theme_1tnti_91",
30
+ "cell--left-alignment": "_cell--left-alignment_1tnti_94",
31
+ "cell--center-alignment": "_cell--center-alignment_1tnti_98",
32
+ "cell--right-alignment": "_cell--right-alignment_1tnti_102",
33
33
  th__wrapper: E,
34
- "th__wrapper--pressed": "_th__wrapper--pressed_1ysnl_121",
35
- "th__wrapper--clickable": "_th__wrapper--clickable_1ysnl_125",
36
- "th__sort-icon-container": "_th__sort-icon-container_1ysnl_128",
37
- "tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1ysnl_134",
34
+ "th__wrapper--pressed": "_th__wrapper--pressed_1tnti_122",
35
+ "th__wrapper--clickable": "_th__wrapper--clickable_1tnti_128",
36
+ "th__sort-icon-container": "_th__sort-icon-container_1tnti_131",
37
+ "tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_1tnti_137",
38
38
  tr: k,
39
39
  td: v,
40
- "tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1ysnl_143",
41
- "td__row-or-cell--clickable": "_td__row-or-cell--clickable_1ysnl_144",
42
- "td__row-or-cell--disabled": "_td__row-or-cell--disabled_1ysnl_148",
43
- "td-wrapper": "_td-wrapper_1ysnl_152"
40
+ "tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_1tnti_147",
41
+ "td__row-or-cell--clickable": "_td__row-or-cell--clickable_1tnti_148",
42
+ "td__row-or-cell--disabled": "_td__row-or-cell--disabled_1tnti_152",
43
+ "td-wrapper": "_td-wrapper_1tnti_156"
44
44
  }, B = {
45
45
  pt: {
46
46
  ...u.pt,
@@ -60,80 +60,80 @@ const C = (l) => /* @__PURE__ */ p.createElement("svg", { width: 7, height: 10,
60
60
  of: "de",
61
61
  results: "resultados"
62
62
  }
63
- }, s = ({
64
- children: l,
65
- theme: e = "white",
66
- fullWidth: r = !0,
67
- className: n,
68
- paginationProps: _,
63
+ }, _ = ({
64
+ children: a,
65
+ theme: t = "white",
66
+ fullWidth: l = !0,
67
+ className: s,
68
+ paginationProps: n,
69
69
  isFixed: o,
70
- language: y,
70
+ language: p,
71
71
  translations: b,
72
72
  ...h
73
73
  }) => {
74
- const c = d(
75
- t.table,
76
- r && t["table--full-width"],
77
- o && t["table--fixed"],
78
- t[`table--${e}-theme`],
79
- n
80
- ), i = y && B[y] || b;
81
- return /* @__PURE__ */ g(x, { initialTranslations: i, children: [
82
- /* @__PURE__ */ a("table", { ...h, className: c, children: l }),
83
- _ && /* @__PURE__ */ a(T, { ..._, t: i })
74
+ const c = y(
75
+ e.table,
76
+ l && e["table--full-width"],
77
+ o && e["table--fixed"],
78
+ e[`table--${t}-theme`],
79
+ s
80
+ ), d = p && B[p] || b;
81
+ return /* @__PURE__ */ g(x, { initialTranslations: d, children: [
82
+ /* @__PURE__ */ r("table", { ...h, className: c, children: a }),
83
+ n && /* @__PURE__ */ r(T, { ...n, t: d })
84
84
  ] });
85
- }, H = ({ children: l, ...e }) => /* @__PURE__ */ a("thead", { ...e, children: l }), P = ({ children: l, ...e }) => /* @__PURE__ */ a("tbody", { ...e, children: l }), D = ({ children: l, onClick: e, disabled: r, className: n, ..._ }) => {
86
- const o = d(
87
- t.tr,
88
- e && !r ? t["tr__row-or-cell--clickable"] : r ? t["tr__row-or-cell--disabled"] : "",
89
- n
85
+ }, H = ({ children: a, ...t }) => /* @__PURE__ */ r("thead", { ...t, children: a }), P = ({ children: a, ...t }) => /* @__PURE__ */ r("tbody", { ...t, children: a }), D = ({ children: a, onClick: t, disabled: l, className: s, ...n }) => {
86
+ const o = y(
87
+ e.tr,
88
+ t && !l ? e["tr__row-or-cell--clickable"] : l ? e["tr__row-or-cell--disabled"] : "",
89
+ s
90
90
  );
91
- return /* @__PURE__ */ a("tr", { ..._, className: o, onClick: () => !r && (e == null ? void 0 : e()), children: l });
92
- }, M = ({ children: l, onClick: e, disabled: r, className: n, align: _ = "left", ...o }) => {
93
- const y = d(
94
- t.td,
95
- e && !r ? t["td__row-or-cell--clickable"] : r ? t["td__row-or-cell--disabled"] : "",
96
- t[`cell--${_}-alignment`],
97
- n
91
+ return /* @__PURE__ */ r("tr", { ...n, className: o, onClick: () => !l && (t == null ? void 0 : t()), children: a });
92
+ }, M = ({ children: a, onClick: t, disabled: l, className: s, align: n = "left", ...o }) => {
93
+ const p = y(
94
+ e.td,
95
+ t && !l ? e["td__row-or-cell--clickable"] : l ? e["td__row-or-cell--disabled"] : "",
96
+ e[`cell--${n}-alignment`],
97
+ s
98
98
  );
99
- return /* @__PURE__ */ a("td", { ...o, className: y, onClick: () => !r && (e == null ? void 0 : e()), children: /* @__PURE__ */ a("span", { className: t["td-wrapper"], children: l }) });
100
- }, O = ({ children: l, onSort: e, sortType: r, className: n, classNameTooltip: _, align: o = "left", ...y }) => {
101
- const { translations: b } = N(), [h, c] = w(!1), i = d(
102
- t.th__wrapper,
103
- h ? t["th__wrapper--pressed"] : "",
104
- e ? t["th__wrapper--clickable"] : "",
105
- n
99
+ return /* @__PURE__ */ r("td", { ...o, className: p, onClick: () => !l && (t == null ? void 0 : t()), children: /* @__PURE__ */ r("span", { className: e["td-wrapper"], children: a }) });
100
+ }, O = ({ children: a, onSort: t, sortType: l, className: s, classNameTooltip: n, align: o = "left", ...p }) => {
101
+ const { translations: b } = N(), [h, c] = w(!1), d = y(
102
+ e.th__wrapper,
103
+ h ? e["th__wrapper--pressed"] : "",
104
+ t ? e["th__wrapper--clickable"] : "",
105
+ s
106
106
  );
107
- return /* @__PURE__ */ a("th", { ...y, className: t[`cell--${o}-alignment`], children: /* @__PURE__ */ a("span", { className: i, onClick: e && (() => c(!h)), children: e ? /* @__PURE__ */ g(
107
+ return /* @__PURE__ */ r("th", { ...p, className: e[`cell--${o}-alignment`], children: /* @__PURE__ */ r("span", { className: d, onClick: t && (() => c(!h)), children: t ? /* @__PURE__ */ g(
108
108
  f,
109
109
  {
110
110
  onClose: () => c(!1),
111
- onSort: e,
111
+ onSort: t,
112
112
  show: h,
113
- sortType: r,
114
- className: _,
113
+ sortType: l,
114
+ className: n,
115
115
  t: b,
116
116
  children: [
117
- /* @__PURE__ */ a("span", { children: l }),
118
- /* @__PURE__ */ a("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ a(C, {}) })
117
+ /* @__PURE__ */ r("span", { children: a }),
118
+ /* @__PURE__ */ r("span", { className: e["th__sort-icon-container"], children: /* @__PURE__ */ r(C, { width: 12, height: 12 }) })
119
119
  ]
120
120
  }
121
- ) : /* @__PURE__ */ a("span", { children: l }) }) });
121
+ ) : /* @__PURE__ */ r("span", { children: a }) }) });
122
122
  };
123
- s.THead = H;
124
- s.THead.displayName = "Table.THead";
125
- s.TBody = P;
126
- s.TBody.displayName = "Table.TBody";
127
- s.Tr = D;
128
- s.Tr.displayName = "Table.Tr";
129
- s.Td = M;
130
- s.Td.displayName = "Table.Td";
131
- s.Th = O;
132
- s.Th.displayName = "Table.Th";
123
+ _.THead = H;
124
+ _.THead.displayName = "Table.THead";
125
+ _.TBody = P;
126
+ _.TBody.displayName = "Table.TBody";
127
+ _.Tr = D;
128
+ _.Tr.displayName = "Table.Tr";
129
+ _.Td = M;
130
+ _.Td.displayName = "Table.Td";
131
+ _.Th = O;
132
+ _.Th.displayName = "Table.Th";
133
133
  export {
134
134
  P as TBody,
135
135
  H as THead,
136
- s as Table,
136
+ _ as Table,
137
137
  M as Td,
138
138
  O as Th,
139
139
  D as Tr
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "1.0.0-beta.30",
4
+ "version": "1.0.0-beta.32",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",