w-design-system 0.4.147 → 0.4.149

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.
@@ -26,7 +26,7 @@ export type TableProps<T extends {
26
26
  onRowClick?: (row: T) => void;
27
27
  };
28
28
  export interface StyledTableProps {
29
- height?: string;
29
+ $height?: string;
30
30
  }
31
31
  export declare const Table: <T extends {
32
32
  id: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,KAAK,MAAM,CAAC,CAAC,IAAI;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;IAC3B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;IAC5E,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IACjD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IA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EAAE,EAAE,MAAM,CAAA;CAAE,IAAI;IACjD,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,CAAC;AAUF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAwED,eAAO,MAAM,KAAK,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAA;CAAE,EAAE,0FAa9F,UAAU,CAAC,CAAC,CAAC,4CAgFf,CAAC"}
@@ -1685,7 +1685,7 @@ function t5(A, g) {
1685
1685
  }
1686
1686
  const i5 = c2(["0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}"]);
1687
1687
  Y.div.withConfig({ displayName: "FullScreenWrapper", componentId: "sc-1olsk3u-0" })(["position:fixed;top:0;left:0;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background-color:rgb(164,162,162);z-index:9999;"]);
1688
- const o5 = Y.div.withConfig({ displayName: "ContainerWrapper", componentId: "sc-1olsk3u-1" })([""]), h5 = Y.div.withConfig({ displayName: "ContainerWrapperStyles", componentId: "sc-1olsk3u-2" })(["display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;"]), f5 = Y.img.withConfig({ displayName: "LoadingImage", componentId: "sc-1olsk3u-3" })(["width:", ";height:", ";animation:", " 2s linear infinite;"], ({ $size: A }) => A === "small" ? "30px" : A === "medium" ? "50px" : "70px", ({ $size: A }) => A === "small" ? "30px" : A === "medium" ? "50px" : "70px", i5), a5 = ({ size: A = "medium" }) => o.jsx(o5, { children: o.jsxs(h5, { children: [o.jsx(f5, { src: A1, alt: "loading", $size: A }), o.jsx(l0, { color: M.colors.shade30, size: "x-small", children: "CARREGANDO" })] }) }), B5 = Y.div.withConfig({ displayName: "TableContainer", componentId: "sc-1babzxp-0" })(["display:flex;flex-direction:column;width:100%;height:100%;"]), n5 = Y.table.withConfig({ displayName: "StyledTable", componentId: "sc-1babzxp-1" })(["width:100%;position:relative;border-collapse:collapse;height:", ";"], (A) => A.height || "100%"), r5 = Y.thead.withConfig({ displayName: "Thead", componentId: "sc-1babzxp-2" })(["border-bottom:1px solid ", ";"], M.colors.shade10), w5 = Y.tbody.withConfig({ displayName: "Tbody", componentId: "sc-1babzxp-3" })(["overflow-y:auto;"]), k0 = Y.tr.withConfig({ displayName: "Tr", componentId: "sc-1babzxp-4" })(["background-color:", ";cursor:", ";&:nth-child(even){background-color:", ";}&:hover{background-color:", ";}"], ({ $selected: A, $striped: g }) => A ? M.colors.cyan10 : g ? "white" : "transparent", ({ $clickable: A }) => A ? "pointer" : "default", ({ $selected: A, $striped: g }) => A ? M.colors.cyan10 : g ? M.colors.shade05 : "transparent", ({ $clickable: A, $selected: g }) => A && !g ? M.colors.cyan10 : ""), M5 = Y.th.withConfig({ displayName: "Th", componentId: "sc-1babzxp-5" })(["background-color:", ";position:sticky;z-index:2;top:0;padding:10px;text-align:", ";width:", ";vertical-align:middle;"], M.colors.white, ({ $align: A }) => A || "left", ({ $width: A }) => A || "auto"), q0 = Y.td.withConfig({ displayName: "Td", componentId: "sc-1babzxp-6" })(["padding:12px;width:", ";text-align:", ";"], ({ $width: A }) => A || "auto", ({ $align: A }) => A || "left"), E5 = Y.div.withConfig({ displayName: "ExpandableRow", componentId: "sc-1babzxp-7" })(["padding:8px;min-height:50px;"]), d5 = Y.div.withConfig({ displayName: "LoadingWrapper", componentId: "sc-1babzxp-8" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;"]), D5 = Y.div.withConfig({ displayName: "EmptyStateWrapper", componentId: "sc-1babzxp-9" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:20px;"]), w7 = (A) => {
1688
+ const o5 = Y.div.withConfig({ displayName: "ContainerWrapper", componentId: "sc-1olsk3u-1" })([""]), h5 = Y.div.withConfig({ displayName: "ContainerWrapperStyles", componentId: "sc-1olsk3u-2" })(["display:flex;align-items:center;justify-content:center;flex-direction:column;gap:16px;"]), f5 = Y.img.withConfig({ displayName: "LoadingImage", componentId: "sc-1olsk3u-3" })(["width:", ";height:", ";animation:", " 2s linear infinite;"], ({ $size: A }) => A === "small" ? "30px" : A === "medium" ? "50px" : "70px", ({ $size: A }) => A === "small" ? "30px" : A === "medium" ? "50px" : "70px", i5), a5 = ({ size: A = "medium" }) => o.jsx(o5, { children: o.jsxs(h5, { children: [o.jsx(f5, { src: A1, alt: "loading", $size: A }), o.jsx(l0, { color: M.colors.shade30, size: "x-small", children: "CARREGANDO" })] }) }), B5 = Y.div.withConfig({ displayName: "TableContainer", componentId: "sc-1babzxp-0" })(["display:flex;flex-direction:column;width:100%;height:100%;"]), n5 = Y.table.withConfig({ displayName: "StyledTable", componentId: "sc-1babzxp-1" })(["width:100%;position:relative;border-collapse:collapse;height:", ";"], (A) => A.$height || "auto"), r5 = Y.thead.withConfig({ displayName: "Thead", componentId: "sc-1babzxp-2" })(["border-bottom:1px solid ", ";"], M.colors.shade10), w5 = Y.tbody.withConfig({ displayName: "Tbody", componentId: "sc-1babzxp-3" })(["overflow-y:auto;"]), k0 = Y.tr.withConfig({ displayName: "Tr", componentId: "sc-1babzxp-4" })(["background-color:", ";cursor:", ";&:nth-child(even){background-color:", ";}&:hover{background-color:", ";}"], ({ $selected: A, $striped: g }) => A ? M.colors.cyan10 : g ? "white" : "transparent", ({ $clickable: A }) => A ? "pointer" : "default", ({ $selected: A, $striped: g }) => A ? M.colors.cyan10 : g ? M.colors.shade05 : "transparent", ({ $clickable: A, $selected: g }) => A && !g ? M.colors.cyan10 : ""), M5 = Y.th.withConfig({ displayName: "Th", componentId: "sc-1babzxp-5" })(["background-color:", ";position:sticky;z-index:2;top:0;padding:10px;text-align:", ";width:", ";vertical-align:middle;"], M.colors.white, ({ $align: A }) => A || "left", ({ $width: A }) => A || "auto"), q0 = Y.td.withConfig({ displayName: "Td", componentId: "sc-1babzxp-6" })(["padding:12px;width:", ";text-align:", ";"], ({ $width: A }) => A || "auto", ({ $align: A }) => A || "left"), E5 = Y.div.withConfig({ displayName: "ExpandableRow", componentId: "sc-1babzxp-7" })(["padding:8px;min-height:50px;"]), d5 = Y.div.withConfig({ displayName: "LoadingWrapper", componentId: "sc-1babzxp-8" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;"]), D5 = Y.div.withConfig({ displayName: "EmptyStateWrapper", componentId: "sc-1babzxp-9" })(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:20px;"]), w7 = (A) => {
1689
1689
  const g = L0.c(18), { columns: e, data: I, height: c, loading: C, emptyStateMessage: l, striped: s, rowClickable: h, onRowClick: i } = A, f = c === void 0 ? "auto" : c, a = C !== void 0 && C;
1690
1690
  let D;
1691
1691
  g[0] !== l ? (D = l === void 0 ? { title: "Nenhum registro encontrado", subTitle: "Não há registros para exibir", description: "Não há registros para exibir" } : l, g[0] = l, g[1] = D) : D = g[1];
@@ -1704,7 +1704,7 @@ const o5 = Y.div.withConfig({ displayName: "ContainerWrapper", componentId: "sc-
1704
1704
  }, g[5] = P) : P = g[5];
1705
1705
  const E = P;
1706
1706
  let j;
1707
- return g[6] !== e || g[7] !== I || g[8] !== B || g[9] !== x || g[10] !== n || g[11] !== f || g[12] !== a || g[13] !== i || g[14] !== p || g[15] !== G || g[16] !== w ? (j = o.jsx(B5, { children: o.jsxs(n5, { height: f, children: [o.jsx(r5, { children: o.jsx(k0, { children: e.map(z5) }) }), o.jsx(w5, { children: a ? o.jsx(k0, { children: o.jsx(q0, { colSpan: e.length, children: o.jsx(d5, { children: o.jsx(a5, { size: "small" }) }) }) }) : I.length === 0 ? o.jsx(k0, { children: o.jsx(q0, { colSpan: e.length, children: o.jsx(D5, { children: o.jsx(x4, { title: B.title, subTitle: B.subTitle, description: B.description }) }) }) }) : I.map((d) => o.jsxs(M0.Fragment, { children: [o.jsx(k0, { $striped: w, $clickable: p && !!i, $selected: G === d.id, onClick: () => p && i && n(d), children: e.map((v, u) => o.jsx(q0, { $width: v.width, $align: v.align, children: v.Cell ? v.Cell(d, E) : v.accessor && o.jsx(l0, { color: M.colors.shade50, children: String(d[v.accessor]) }) }, u)) }), x.includes(d.id) && "containerColapsed" in d && typeof d.containerColapsed == "function" && o.jsx(E5, { children: d.containerColapsed(d) })] }, d.id)) })] }) }), g[6] = e, g[7] = I, g[8] = B, g[9] = x, g[10] = n, g[11] = f, g[12] = a, g[13] = i, g[14] = p, g[15] = G, g[16] = w, g[17] = j) : j = g[17], j;
1707
+ return g[6] !== e || g[7] !== I || g[8] !== B || g[9] !== x || g[10] !== n || g[11] !== f || g[12] !== a || g[13] !== i || g[14] !== p || g[15] !== G || g[16] !== w ? (j = o.jsx(B5, { children: o.jsxs(n5, { $height: f, children: [o.jsx(r5, { children: o.jsx(k0, { children: e.map(z5) }) }), o.jsx(w5, { children: a ? o.jsx(k0, { children: o.jsx(q0, { colSpan: e.length, children: o.jsx(d5, { children: o.jsx(a5, { size: "small" }) }) }) }) : I.length === 0 ? o.jsx(k0, { children: o.jsx(q0, { colSpan: e.length, children: o.jsx(D5, { children: o.jsx(x4, { title: B.title, subTitle: B.subTitle, description: B.description }) }) }) }) : I.map((d) => o.jsxs(M0.Fragment, { children: [o.jsx(k0, { $striped: w, $clickable: p && !!i, $selected: G === d.id, onClick: () => p && i && n(d), children: e.map((v, u) => o.jsx(q0, { $width: v.width, $align: v.align, children: v.Cell ? v.Cell(d, E) : v.accessor && o.jsx(l0, { color: M.colors.shade50, children: String(d[v.accessor]) }) }, u)) }), x.includes(d.id) && "containerColapsed" in d && typeof d.containerColapsed == "function" && o.jsx(E5, { children: d.containerColapsed(d) })] }, d.id)) })] }) }), g[6] = e, g[7] = I, g[8] = B, g[9] = x, g[10] = n, g[11] = f, g[12] = a, g[13] = i, g[14] = p, g[15] = G, g[16] = w, g[17] = j) : j = g[17], j;
1708
1708
  };
1709
1709
  function z5(A, g) {
1710
1710
  return o.jsx(M5, { $width: A.width, $align: A.align, children: o.jsx(l0, { color: M.colors.shade30, textTransform: "uppercase", strongBold: !0, children: A.header }) }, g);