@norges-domstoler/dds-components 0.0.0-dev-20260721121115 → 0.0.0-dev-20260817073942

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/dist/index.cjs CHANGED
@@ -6700,19 +6700,20 @@ var DetailList_module_default = {
6700
6700
  "term": "dds-DetailList-module__term"
6701
6701
  };
6702
6702
  //#endregion
6703
- //#region src/components/Table/normal/Table.module.css
6703
+ //#region src/components/Table/Table.module.css
6704
6704
  var Table_module_default = {
6705
6705
  "wrapper": "dds-Table-module__wrapper",
6706
6706
  "wrapper--scrollable": "dds-Table-module__wrapper--scrollable",
6707
6707
  "table": "dds-Table-module__table",
6708
- "table--with-dividers": "dds-Table-module__table--with-dividers",
6709
- "row--body": "dds-Table-module__row--body",
6710
- "row--colapsible-header--open": "dds-Table-module__row--colapsible-header--open",
6711
- "table--sticky-header": "dds-Table-module__table--sticky-header",
6712
- "table--with-stripes": "dds-Table-module__table--with-stripes",
6713
6708
  "table--small": "dds-Table-module__table--small",
6714
6709
  "table--medium": "dds-Table-module__table--medium",
6715
6710
  "table--large": "dds-Table-module__table--large",
6711
+ "table--sticky-header": "dds-Table-module__table--sticky-header",
6712
+ "table--striped": "dds-Table-module__table--striped",
6713
+ "row--body": "dds-Table-module__row--body",
6714
+ "table--collapsible--striped": "dds-Table-module__table--collapsible--striped",
6715
+ "table--with-dividers": "dds-Table-module__table--with-dividers",
6716
+ "row--collapsible-header--open": "dds-Table-module__row--collapsible-header--open",
6716
6717
  "row": "dds-Table-module__row",
6717
6718
  "row--sum": "dds-Table-module__row--sum",
6718
6719
  "row--selected": "dds-Table-module__row--selected",
@@ -6722,15 +6723,14 @@ var Table_module_default = {
6722
6723
  "cell--right": "dds-Table-module__cell--right",
6723
6724
  "cell--center": "dds-Table-module__cell--center",
6724
6725
  "cell__inner": "dds-Table-module__cell__inner",
6725
- "sort-button": "dds-Table-module__sort-button",
6726
- "collapse-button": "dds-Table-module__collapse-button"
6726
+ "sort-button": "dds-Table-module__sort-button"
6727
6727
  };
6728
6728
  //#endregion
6729
6729
  //#region src/components/DetailList/DetailList.tsx
6730
6730
  const DETAIL_LIST_SIZES = createSizes("small", "medium", "large");
6731
6731
  const DetailList = ({ id, className, style, htmlProps, withDividers = true, striped = true, size = "medium", smallScreenBreakpoint, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DetailListContext, {
6732
6732
  value: { smallScreenBreakpoint },
6733
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", { ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[`body-short-${size}`], Table_module_default.table, DetailList_module_default.list, DetailList_module_default[`list--${size}`], withDividers && Table_module_default["table--with-dividers"], striped && !smallScreenBreakpoint && Table_module_default["table--with-stripes"], striped && smallScreenBreakpoint && DetailList_module_default["list--striped-with-bp"]), style, htmlProps, rest) })
6733
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", { ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default[`body-short-${size}`], Table_module_default.table, DetailList_module_default.list, DetailList_module_default[`list--${size}`], withDividers && Table_module_default["table--with-dividers"], striped && !smallScreenBreakpoint && Table_module_default["table--striped"], striped && smallScreenBreakpoint && DetailList_module_default["list--striped-with-bp"]), style, htmlProps, rest) })
6734
6734
  });
6735
6735
  DetailList.displayName = "DetailList";
6736
6736
  //#endregion
@@ -12133,18 +12133,17 @@ const texts$2 = createTexts({ moreActions: {
12133
12133
  se: "Eanet doaimmat"
12134
12134
  } });
12135
12135
  //#endregion
12136
- //#region src/components/Table/collapsible/Table.context.tsx
12137
- const CollapsibleTableContext = (0, react.createContext)({
12138
- headerValues: [],
12139
- definingColumnIndex: [0]
12140
- });
12141
- const useCollapsibleTableContext = () => (0, react.useContext)(CollapsibleTableContext);
12142
- //#endregion
12143
- //#region src/components/Table/normal/Body.tsx
12136
+ //#region src/components/Table/Body.tsx
12144
12137
  const Body = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { ...props });
12145
12138
  Body.displayName = "Table.Body";
12146
12139
  //#endregion
12147
- //#region src/components/Table/normal/Head.tsx
12140
+ //#region src/components/Table/CollapsibleTable.context.tsx
12141
+ const CollapsibleTableContext = (0, react.createContext)({ labelsStore: /* @__PURE__ */ new Map() });
12142
+ const useCollapsibleTableContext = () => (0, react.useContext)(CollapsibleTableContext);
12143
+ const CollapsibleCellContext = (0, react.createContext)(false);
12144
+ const useIsCollapsibleChild = () => (0, react.useContext)(CollapsibleCellContext);
12145
+ //#endregion
12146
+ //#region src/components/Table/Head.tsx
12148
12147
  const Head = ({ children, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
12149
12148
  ...rest,
12150
12149
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeadContext, {
@@ -12157,36 +12156,39 @@ function useIsInTableHead() {
12157
12156
  return (0, react.useContext)(HeadContext);
12158
12157
  }
12159
12158
  //#endregion
12160
- //#region src/components/Table/normal/Cell.tsx
12161
- const Cell = ({ children, type: _type, layout = "left", collapsibleProps, className, ...rest }) => {
12159
+ //#region src/components/Table/Cell.tsx
12160
+ const Cell = ({ children, type: _type, layout = "left", collapseKey, className, ...rest }) => {
12162
12161
  const isInHead = useIsInTableHead();
12163
12162
  const type = _type ?? (isInHead ? "head" : "data");
12164
- const { isCollapsibleChild } = collapsibleProps ?? {};
12163
+ const isCollapsibleChild = useIsCollapsibleChild();
12164
+ const { collapseBelow, labelsStore } = useCollapsibleTableContext();
12165
+ if (collapseBelow && collapseKey && type === "head") labelsStore.set(collapseKey, children);
12165
12166
  const isComplexLayout = layout === "text and icon";
12166
- return isCollapsibleChild ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionListDesc, { children }) : type === "head" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
12167
+ if (isCollapsibleChild) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionListDesc, { children });
12168
+ const hideBelowCn = !!collapseKey && collapseBelow ? display_module_default[`${collapseBelow}-hide-below`] : void 0;
12169
+ const inner = isComplexLayout ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12170
+ className: Table_module_default.cell__inner,
12171
+ children
12172
+ }) : children;
12173
+ if (type === "head") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
12167
12174
  ...rest,
12168
- className: cn(className, !isComplexLayout && Table_module_default[`cell--${layout}`], Table_module_default["cell--head"]),
12169
- children: isComplexLayout ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12170
- className: Table_module_default.cell__inner,
12171
- children
12172
- }) : children
12173
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
12175
+ className: cn(className, !isComplexLayout && Table_module_default[`cell--${layout}`], Table_module_default["cell--head"], hideBelowCn),
12176
+ children: inner
12177
+ });
12178
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
12174
12179
  ...rest,
12175
- className: cn(className, !isComplexLayout && Table_module_default[`cell--${layout}`]),
12176
- children: isComplexLayout ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12177
- className: Table_module_default.cell__inner,
12178
- children
12179
- }) : children
12180
+ className: cn(className, !isComplexLayout && Table_module_default[`cell--${layout}`], hideBelowCn),
12181
+ children: inner
12180
12182
  });
12181
12183
  };
12182
12184
  Cell.displayName = "Table.Cell";
12183
12185
  //#endregion
12184
- //#region src/components/Table/normal/Foot.tsx
12186
+ //#region src/components/Table/Foot.tsx
12185
12187
  const Foot = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", { ...props });
12186
12188
  Foot.displayName = "Table.Foot";
12187
12189
  //#endregion
12188
- //#region src/components/Table/normal/Row.tsx
12189
- const Row = ({ type: _type, mode = "normal", hoverable, selected, className, ...rest }) => {
12190
+ //#region src/components/Table/Row.tsx
12191
+ const PlainRow = ({ type: _type, mode = "normal", hoverable, selected, className, ...rest }) => {
12190
12192
  const isInHeader = useIsInTableHead();
12191
12193
  const type = _type ?? (isInHeader ? "head" : "body");
12192
12194
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
@@ -12194,9 +12196,100 @@ const Row = ({ type: _type, mode = "normal", hoverable, selected, className, ...
12194
12196
  ...rest
12195
12197
  });
12196
12198
  };
12199
+ const Row = ({ type: _type, className, mode = "normal", children, ref, ...rest }) => {
12200
+ const { t } = useTranslation();
12201
+ const isInHead = useIsInTableHead();
12202
+ const type = _type ?? (isInHead ? "head" : "body");
12203
+ const { collapseBelow, labelsStore } = useCollapsibleTableContext();
12204
+ const [childrenCollapsed, setChildrenCollapsed] = (0, react.useState)(true);
12205
+ const sharedRowProps = (extraClass) => ({
12206
+ type,
12207
+ mode,
12208
+ className: cn(className, extraClass),
12209
+ ...rest
12210
+ });
12211
+ if (!collapseBelow) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12212
+ ref,
12213
+ ...sharedRowProps(),
12214
+ children
12215
+ });
12216
+ const childrenArray = react.Children.toArray(children);
12217
+ const isCollapsingCell = (child) => (0, react.isValidElement)(child) && !!child.props.collapseKey;
12218
+ const definingCells = childrenArray.filter((child) => !isCollapsingCell(child));
12219
+ const collapseCells = childrenArray.filter(isCollapsingCell);
12220
+ if (collapseCells.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12221
+ ref,
12222
+ ...sharedRowProps(),
12223
+ children
12224
+ });
12225
+ const hideAboveCn = collapseBelow !== "xl" ? display_module_default[`${collapseBelow}-hide-above`] : void 0;
12226
+ const hideBelowCn = display_module_default[`${collapseBelow}-hide-below`];
12227
+ if (type === "head") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12228
+ ref,
12229
+ ...sharedRowProps(hideBelowCn),
12230
+ children
12231
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12232
+ ...sharedRowProps(hideAboveCn),
12233
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [definingCells, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("th", {
12234
+ className: Table_module_default["cell--head"],
12235
+ children: [t(texts$1.expand), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts$1.row) })]
12236
+ })] })
12237
+ })] });
12238
+ const descriptionListItems = collapseCells.map((child, index) => {
12239
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionListTerm, { children: labelsStore.get(child.props.collapseKey ?? "") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollapsibleCellContext, {
12240
+ value: true,
12241
+ children: child
12242
+ })] }, `DL-${index}`);
12243
+ });
12244
+ const iconState = childrenCollapsed ? "down" : "up";
12245
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
12246
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12247
+ ref,
12248
+ ...sharedRowProps(hideBelowCn),
12249
+ children
12250
+ }),
12251
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PlainRow, {
12252
+ ...sharedRowProps(cn(hideAboveCn, !childrenCollapsed && Table_module_default["row--collapsible-header--open"])),
12253
+ children: [definingCells, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
12254
+ className: Table_module_default["cell--right"],
12255
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
12256
+ onClick: () => setChildrenCollapsed(!childrenCollapsed),
12257
+ "aria-expanded": !childrenCollapsed,
12258
+ icon: AnimatedChevronUpDownIcon,
12259
+ iconState,
12260
+ purpose: "tertiary",
12261
+ size: "xsmall"
12262
+ })
12263
+ })]
12264
+ }),
12265
+ !childrenCollapsed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlainRow, {
12266
+ ...sharedRowProps(hideAboveCn),
12267
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
12268
+ colSpan: definingCells.length + 1,
12269
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionList, { children: descriptionListItems })
12270
+ })
12271
+ })
12272
+ ] });
12273
+ };
12197
12274
  Row.displayName = "Table.Row";
12275
+ const texts$1 = createTexts({
12276
+ expand: {
12277
+ nb: "Utvid",
12278
+ no: "Utvid",
12279
+ nn: "Utvid",
12280
+ en: "Expand",
12281
+ se: "Viiddit"
12282
+ },
12283
+ row: {
12284
+ nb: "raden",
12285
+ no: "raden",
12286
+ nn: "rada",
12287
+ en: "row",
12288
+ se: "gurgadus"
12289
+ }
12290
+ });
12198
12291
  //#endregion
12199
- //#region src/components/Table/normal/SortCell.tsx
12292
+ //#region src/components/Table/SortCell.tsx
12200
12293
  const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
12201
12294
  const { t } = useTranslation();
12202
12295
  const SortIcon = () => {
@@ -12210,7 +12303,7 @@ const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
12210
12303
  ...rest,
12211
12304
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StylelessButton, {
12212
12305
  onClick,
12213
- "aria-description": t(texts$1.changeSort),
12306
+ "aria-description": t(texts.changeSort),
12214
12307
  className: cn(Table_module_default["sort-button"], _key1),
12215
12308
  children: [
12216
12309
  children,
@@ -12224,7 +12317,7 @@ const SortCell = ({ isSorted, sortOrder, onClick, children, ...rest }) => {
12224
12317
  });
12225
12318
  };
12226
12319
  SortCell.displayName = "Table.SortCell";
12227
- const texts$1 = createTexts({ changeSort: {
12320
+ const texts = createTexts({ changeSort: {
12228
12321
  nb: "Aktiver for å endre sorteringsrekkefølge",
12229
12322
  no: "Aktiver for å endre sorteringsrekkefølge",
12230
12323
  nn: "Aktiver for å endre sorteringsrekkjefølgje",
@@ -12232,8 +12325,8 @@ const texts$1 = createTexts({ changeSort: {
12232
12325
  se: "Aktivere rievdadit sorterenortnega"
12233
12326
  } });
12234
12327
  //#endregion
12235
- //#region src/components/Table/normal/Table.tsx
12236
- const Table$1 = ({ size = "medium", stickyHeader, withDividers, withStripes = true, className, children, ...rest }) => {
12328
+ //#region src/components/Table/Table.tsx
12329
+ const Table$1 = ({ size = "medium", stickyHeader, withDividers, withStripes = true, className, children, collapseBelow, ...rest }) => {
12237
12330
  const tgSize = () => {
12238
12331
  switch (size) {
12239
12332
  case "small": return "small";
@@ -12241,15 +12334,23 @@ const Table$1 = ({ size = "medium", stickyHeader, withDividers, withStripes = tr
12241
12334
  case "large": return "medium";
12242
12335
  }
12243
12336
  };
12244
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
12337
+ const labelsStore = (0, react.useRef)(/* @__PURE__ */ new Map());
12338
+ const table = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
12245
12339
  ...rest,
12246
- className: cn(className, Table_module_default.table, Table_module_default[`table--${size}`], withDividers && Table_module_default["table--with-dividers"], withStripes && Table_module_default["table--with-stripes"], stickyHeader && Table_module_default["table--sticky-header"], _key5, typographyStyles_module_default[`body-long-${tgSize()}`]),
12340
+ className: cn(className, Table_module_default.table, Table_module_default[`table--${size}`], withDividers && Table_module_default["table--with-dividers"], withStripes && Table_module_default["table--striped"], withStripes && collapseBelow && Table_module_default["table--collapsible--striped"], stickyHeader && Table_module_default["table--sticky-header"], _key5, typographyStyles_module_default[`body-long-${tgSize()}`]),
12247
12341
  children
12248
12342
  });
12343
+ return collapseBelow ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollapsibleTableContext, {
12344
+ value: {
12345
+ collapseBelow,
12346
+ labelsStore: labelsStore.current
12347
+ },
12348
+ children: table
12349
+ }) : table;
12249
12350
  };
12250
12351
  Table$1.displayName = "Table";
12251
12352
  //#endregion
12252
- //#region src/components/Table/normal/TableWrapper.tsx
12353
+ //#region src/components/Table/TableWrapper.tsx
12253
12354
  const TableWrapper = ({ className, ...rest }) => {
12254
12355
  const container = (0, react.useContext)(ThemeContext)?.el;
12255
12356
  const containerWidth = container ? container.clientWidth : 0;
@@ -12281,7 +12382,7 @@ const TableWrapper = ({ className, ...rest }) => {
12281
12382
  };
12282
12383
  TableWrapper.displayName = "Table.Wrapper";
12283
12384
  //#endregion
12284
- //#region src/components/Table/normal/index.ts
12385
+ //#region src/components/Table/index.ts
12285
12386
  const Table = Table$1;
12286
12387
  Table.Wrapper = TableWrapper;
12287
12388
  Table.Head = Head;
@@ -12291,118 +12392,6 @@ Table.SortCell = SortCell;
12291
12392
  Table.Row = Row;
12292
12393
  Table.Foot = Foot;
12293
12394
  //#endregion
12294
- //#region src/components/Table/collapsible/CollapsibleRow.tsx
12295
- const CollapsibleRow = ({ type: _type, className, mode = "normal", selected, hoverable, children, ref, ...rest }) => {
12296
- const { t } = useTranslation();
12297
- const isInHead = useIsInTableHead();
12298
- const type = _type ?? (isInHead ? "head" : "body");
12299
- const { isCollapsed, headerValues, definingColumnIndex } = useCollapsibleTableContext();
12300
- const [childrenCollapsed, setChildrenCollapsed] = (0, react.useState)(true);
12301
- (0, react.useEffect)(() => {
12302
- if (!isCollapsed) setChildrenCollapsed(true);
12303
- }, [isCollapsed]);
12304
- const rowProps = (isOpenCollapsibleHeader) => {
12305
- return {
12306
- mode,
12307
- selected,
12308
- hoverable,
12309
- className: cn(className, isOpenCollapsibleHeader && Table_module_default["row--colapsible-header--open"]),
12310
- ...rest
12311
- };
12312
- };
12313
- const collapsedHeaderValues = headerValues.filter((column, index) => definingColumnIndex.indexOf(index) === -1);
12314
- const childrenArray = react.Children.toArray(children);
12315
- const collapsedChildren = childrenArray.filter((column, index) => definingColumnIndex.indexOf(index) === -1);
12316
- const prefix = "collapsibleRow";
12317
- const collapsibleIds = [];
12318
- const collapsedRenderedChildren = isCollapsed && collapsedHeaderValues.length > 0 ? collapsedChildren.map(function(child, index) {
12319
- const id = derivativeIdGenerator(prefix, index.toString());
12320
- collapsibleIds.push(id);
12321
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionListTerm, { children: collapsedHeaderValues[index].content }), (0, react.isValidElement)(child) && (0, react.cloneElement)(child, { collapsibleProps: { isCollapsibleChild: true } })] }, `DL-${index}`);
12322
- }) : null;
12323
- const collapsedRows = collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
12324
- ...rowProps(),
12325
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Cell, {
12326
- colSpan: definingColumnIndex.length + 1,
12327
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DescriptionList, { children: collapsedRenderedChildren })
12328
- })
12329
- }) : null;
12330
- const definingColumnCells = childrenArray.slice().filter((column, index) => definingColumnIndex.indexOf(index) > -1).sort((a, b) => {
12331
- return definingColumnIndex.indexOf(childrenArray.indexOf(a)) - definingColumnIndex.indexOf(childrenArray.indexOf(b));
12332
- });
12333
- const headerRow = () => {
12334
- if (type !== "head" || !isCollapsed) return null;
12335
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
12336
- ref,
12337
- ...rowProps(),
12338
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [definingColumnCells, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Table.Cell, {
12339
- type: "head",
12340
- layout: "center",
12341
- children: [t(texts.expand), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VisuallyHidden, { children: t(texts.row) })]
12342
- })] })
12343
- });
12344
- };
12345
- const idList = spaceSeparatedIdListGenerator(collapsibleIds);
12346
- const rowWithChevron = () => {
12347
- if (type !== "body" || !isCollapsed) return null;
12348
- const iconState = childrenCollapsed ? "down" : "up";
12349
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Row, {
12350
- ref,
12351
- ...rowProps(!childrenCollapsed && true),
12352
- children: [definingColumnCells, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Table.Cell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylelessButton, {
12353
- onClick: () => setChildrenCollapsed(!childrenCollapsed),
12354
- "aria-expanded": !childrenCollapsed,
12355
- "aria-controls": idList,
12356
- className: cn(Table_module_default["collapse-button"], _key1),
12357
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
12358
- icon: AnimatedChevronUpDownIcon,
12359
- iconSize: "component",
12360
- iconState
12361
- })
12362
- }) })]
12363
- });
12364
- };
12365
- return isCollapsed && collapsedRenderedChildren && collapsedRenderedChildren.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [headerRow(), type === "body" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [rowWithChevron(), childrenCollapsed ? null : collapsedRows] })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Row, {
12366
- ref,
12367
- ...rowProps(),
12368
- children
12369
- });
12370
- };
12371
- CollapsibleRow.displayName = "CollapsibleTable.Row";
12372
- const texts = createTexts({
12373
- expand: {
12374
- nb: "Utvid",
12375
- no: "Utvid",
12376
- nn: "Utvid",
12377
- en: "Expand",
12378
- se: "Viiddit"
12379
- },
12380
- row: {
12381
- nb: "raden",
12382
- no: "raden",
12383
- nn: "rada",
12384
- en: "row",
12385
- se: "gurgadus"
12386
- }
12387
- });
12388
- //#endregion
12389
- //#region src/components/Table/collapsible/CollapsibleTable.tsx
12390
- const CollapsibleTable$1 = ({ isCollapsed, headerValues, definingColumnIndex = [0], ...rest }) => {
12391
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CollapsibleTableContext, {
12392
- value: {
12393
- isCollapsed,
12394
- headerValues,
12395
- definingColumnIndex
12396
- },
12397
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Table, { ...rest })
12398
- });
12399
- };
12400
- CollapsibleTable$1.displayName = "CollapsibleTable";
12401
- //#endregion
12402
- //#region src/components/Table/collapsible/index.ts
12403
- const CollapsibleTable = CollapsibleTable$1;
12404
- CollapsibleTable.Row = CollapsibleRow;
12405
- //#endregion
12406
12395
  //#region src/components/Tabs/Tabs.context.tsx
12407
12396
  const TabsContext = (0, react.createContext)({
12408
12397
  activeTab: 0,
@@ -13069,8 +13058,6 @@ exports.CloseIcon = CloseIcon;
13069
13058
  exports.CloseSmallIcon = CloseSmallIcon;
13070
13059
  exports.CloudIcon = CloudIcon;
13071
13060
  exports.CollapseIcon = CollapseIcon;
13072
- exports.CollapsibleTable = CollapsibleTable;
13073
- exports.CollapsibleTableRow = CollapsibleRow;
13074
13061
  exports.CommentIcon = CommentIcon;
13075
13062
  exports.Contrast = Contrast;
13076
13063
  exports.CookieBanner = CookieBanner;