@agregio-solutions/design-system 1.53.0 → 1.54.0

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.
@@ -1070,13 +1070,9 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ja]+=1);const D8=l.createCont
1070
1070
  */function l4(e,t){return e?MC(e)?Ul.createElement(e,t):e:null}function MC(e){return VC(e)||typeof e=="function"||jC(e)}function VC(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function jC(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}const KC=M.tr`
1071
1071
  background-color: var(--color-content-neutral-primary-reversed);
1072
1072
 
1073
- &[data-depth="1"] {
1073
+ &[data-sub-row-expanded="true"] {
1074
1074
  background-color: var(--color-content-message-informative-lighter);
1075
1075
  }
1076
-
1077
- &[data-depth="2"] {
1078
- background-color: var(--color-content-action-action-lighter);
1079
- }
1080
1076
  `;function L7({children:e,depth:t=0,...n}){return h.jsx(KC,{...n,"data-depth":t,children:e})}const OC=M(w7)`
1081
1077
  &[data-fullwidth="true"] {
1082
1078
  width: 100%;
@@ -1232,6 +1228,10 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ja]+=1);const D8=l.createCont
1232
1228
 
1233
1229
  tr {
1234
1230
  border-bottom: 1px solid var(--color-content-neutral-stroke);
1231
+
1232
+ &[data-is-sub-row="true"]:has(~ [data-is-sub-row="true"]) {
1233
+ border-bottom: none;
1234
+ }
1235
1235
  }
1236
1236
  }
1237
1237
  `;function H7({children:e,...t}){return h.jsx(QC,{...t,children:e})}const eD=M.div`
@@ -1244,7 +1244,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Ja]+=1);const D8=l.createCont
1244
1244
  width: 100%;
1245
1245
  `,aD=M.td`
1246
1246
  padding: var(--spacing-sm);
1247
- `;function uD({table:e,pagination:t,renderSubComponent:n,...r}){var u;const a=e.getState().columnFilters.length>0||((u=e.getState().globalFilter)==null?void 0:u.length)>0;return h.jsxs("div",{...r,children:[h.jsx(rD,{children:h.jsxs(H7,{children:[h.jsx("thead",{children:e.getHeaderGroups().map(o=>h.jsx("tr",{children:o.headers.map(i=>h.jsx(l.Fragment,{children:l4(i.column.columnDef.header,i.getContext())},i.id))},o.id))}),h.jsx("tbody",{children:e.getRowModel().rows.map(o=>h.jsxs(l.Fragment,{children:[h.jsx(L7,{depth:o.depth,children:o.getVisibleCells().map(i=>h.jsx(l.Fragment,{children:l4(i.column.columnDef.cell,i.getContext())},i.id))}),o.getIsExpanded()&&!!n&&h.jsx("tr",{children:h.jsx(aD,{colSpan:o.getVisibleCells().length,children:n({row:o})})})]},o.id))})]})}),e.getRowCount()===0&&h.jsx(tD,{withFilters:a}),!!t&&h.jsx(N7,{count:e.getRowCount(),onPageChange:e.setPageIndex,pageIndex:t.pageIndex,onItemsPerPageChange:e.setPageSize,itemsPerPage:t.pageSize,style:{marginTop:"16px"}})]})}const oD=M.td`
1247
+ `;function uD({table:e,pagination:t,renderSubComponent:n,...r}){var u;const a=e.getState().columnFilters.length>0||((u=e.getState().globalFilter)==null?void 0:u.length)>0;return h.jsxs("div",{...r,children:[h.jsx(rD,{children:h.jsxs(H7,{children:[h.jsx("thead",{children:e.getHeaderGroups().map(o=>h.jsx("tr",{children:o.headers.map(i=>h.jsx(l.Fragment,{children:l4(i.column.columnDef.header,i.getContext())},i.id))},o.id))}),h.jsx("tbody",{children:e.getRowModel().rows.map(o=>h.jsxs(l.Fragment,{children:[h.jsx(L7,{depth:o.depth,"data-sub-row-expanded":o.getIsExpanded(),"data-is-sub-row":!!o.getParentRow(),children:o.getVisibleCells().map(i=>h.jsx(l.Fragment,{children:l4(i.column.columnDef.cell,i.getContext())},i.id))}),o.getIsExpanded()&&!!n&&h.jsx("tr",{children:h.jsx(aD,{colSpan:o.getVisibleCells().length,children:n({row:o})})})]},o.id))})]})}),e.getRowCount()===0&&h.jsx(tD,{withFilters:a}),!!t&&h.jsx(N7,{count:e.getRowCount(),onPageChange:e.setPageIndex,pageIndex:t.pageIndex,onItemsPerPageChange:e.setPageSize,itemsPerPage:t.pageSize,style:{marginTop:"16px"}})]})}const oD=M.td`
1248
1248
  padding: 0;
1249
1249
 
1250
1250
  &[data-border="left"],
@@ -24045,13 +24045,9 @@ function jx(e) {
24045
24045
  const _x = M.tr`
24046
24046
  background-color: var(--color-content-neutral-primary-reversed);
24047
24047
 
24048
- &[data-depth="1"] {
24048
+ &[data-sub-row-expanded="true"] {
24049
24049
  background-color: var(--color-content-message-informative-lighter);
24050
24050
  }
24051
-
24052
- &[data-depth="2"] {
24053
- background-color: var(--color-content-action-action-lighter);
24054
- }
24055
24051
  `;
24056
24052
  function Zx({
24057
24053
  children: e,
@@ -24510,6 +24506,10 @@ const Xx = M.div`
24510
24506
 
24511
24507
  tr {
24512
24508
  border-bottom: 1px solid var(--color-content-neutral-stroke);
24509
+
24510
+ &[data-is-sub-row="true"]:has(~ [data-is-sub-row="true"]) {
24511
+ border-bottom: none;
24512
+ }
24513
24513
  }
24514
24514
  }
24515
24515
  `;
@@ -24566,10 +24566,18 @@ function yP({
24566
24566
  i.getContext()
24567
24567
  ) }, i.id)) }, o.id)) }),
24568
24568
  /* @__PURE__ */ h("tbody", { children: e.getRowModel().rows.map((o) => /* @__PURE__ */ J(D9, { children: [
24569
- /* @__PURE__ */ h(Zx, { depth: o.depth, children: o.getVisibleCells().map((i) => /* @__PURE__ */ h($.Fragment, { children: b4(
24570
- i.column.columnDef.cell,
24571
- i.getContext()
24572
- ) }, i.id)) }),
24569
+ /* @__PURE__ */ h(
24570
+ Zx,
24571
+ {
24572
+ depth: o.depth,
24573
+ "data-sub-row-expanded": o.getIsExpanded(),
24574
+ "data-is-sub-row": !!o.getParentRow(),
24575
+ children: o.getVisibleCells().map((i) => /* @__PURE__ */ h($.Fragment, { children: b4(
24576
+ i.column.columnDef.cell,
24577
+ i.getContext()
24578
+ ) }, i.id))
24579
+ }
24580
+ ),
24573
24581
  o.getIsExpanded() && !!n && /* @__PURE__ */ h("tr", { children: /* @__PURE__ */ h(
24574
24582
  pD,
24575
24583
  {
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  type Props = {
3
3
  /**
4
4
  * The level of the row, mainly to change its background color. Defaults to "root".
5
+ * @deprecated sub rows styling are now handled internally
5
6
  */
6
7
  depth?: number;
7
8
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agregio-solutions/design-system",
3
- "version": "1.53.0",
3
+ "version": "1.54.0",
4
4
  "description": "React Component library and Storybook that is part of the Design System for Agregio Solutions",
5
5
  "type": "module",
6
6
  "module": "dist/design-system.js",