@norges-domstoler/dds-components 25.0.1 → 25.1.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.
package/dist/index.mjs CHANGED
@@ -11,8 +11,8 @@ import { I18nProvider, useLocale } from "@react-aria/i18n";
11
11
  import { useCalendarState } from "@react-stately/calendar";
12
12
  import { useDateField, useDatePicker, useDateSegment, useTimeField } from "@react-aria/datepicker";
13
13
  import { useDateFieldState, useDatePickerState, useTimeFieldState } from "@react-stately/datepicker";
14
- import { useButton } from "@react-aria/button";
15
14
  import { createFocusManager } from "@react-aria/focus";
15
+ import { useButton } from "@react-aria/button";
16
16
  import { fromEvent } from "file-selector";
17
17
  import ReactSelect, { components } from "react-select";
18
18
  // src/components/Typography/typographyStyles.module.css
@@ -130,14 +130,6 @@ var utilStyles_module_default = {
130
130
  "center-absolute-y": "dds-utilStyles-module__center-absolute-y",
131
131
  "center-absolute-x": "dds-utilStyles-module__center-absolute-x"
132
132
  };
133
- // src/components/helpers/AccordionBase/AccordionBase.module.css
134
- var AccordionBase_module_default = {
135
- "header-button": "dds-AccordionBase-module__header-button",
136
- "header__content": "dds-AccordionBase-module__header__content",
137
- "body": "dds-AccordionBase-module__body",
138
- "body--animated": "dds-AccordionBase-module__body--animated",
139
- "body--hidden": "dds-AccordionBase-module__body--hidden"
140
- };
141
133
  // src/hooks/useCallbackRef/useCallbackRef.ts
142
134
  /**
143
135
  * Hook som returnerer en callback-funksjon som refererer til den nyeste versjonen av den opprinnelige funksjonen.
@@ -956,6 +948,14 @@ const useWindowResize = (handler) => {
956
948
  return () => window.removeEventListener("resize", handler);
957
949
  }, [handler]);
958
950
  };
951
+ // src/components/helpers/AccordionBase/AccordionBase.module.css
952
+ var AccordionBase_module_default = {
953
+ "header-button": "dds-AccordionBase-module__header-button",
954
+ "header__content": "dds-AccordionBase-module__header__content",
955
+ "body": "dds-AccordionBase-module__body",
956
+ "body--animated": "dds-AccordionBase-module__body--animated",
957
+ "body--hidden": "dds-AccordionBase-module__body--hidden"
958
+ };
959
959
  // src/components/helpers/AccordionBase/useAccordion.tsx
960
960
  /**
961
961
  * Implementerer trekkspill-mønsteret; header som utvider og trekker sammen et panel. Håndterer oppførsel, UU og visuelle effekter.
@@ -1063,12 +1063,6 @@ function handleElementWithBackdropUnmount(container) {
1063
1063
  if (isNaN(scrollY)) return;
1064
1064
  window.scrollTo(0, scrollY * -1);
1065
1065
  }
1066
- // src/components/helpers/Backdrop/Backdrop.module.css
1067
- var Backdrop_module_default = {
1068
- "backdrop": "dds-Backdrop-module__backdrop",
1069
- "backdrop--visible": "dds-Backdrop-module__backdrop--visible",
1070
- "backdrop--hidden": "dds-Backdrop-module__backdrop--hidden"
1071
- };
1072
1066
  // src/types/BaseComponentProps.ts
1073
1067
  function pruneUndefined(obj) {
1074
1068
  return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== void 0));
@@ -1545,15 +1539,6 @@ const GridChild = ({ id, className, htmlProps, style, gridRow, gridArea, justify
1545
1539
  }, htmlProps, rest) });
1546
1540
  };
1547
1541
  GridChild.displayName = "GridChild";
1548
- // src/components/layout/Paper/Paper.module.css
1549
- var Paper_module_default = {
1550
- "background": "dds-Paper-module__background",
1551
- "border": "dds-Paper-module__border",
1552
- "container": "dds-Paper-module__container",
1553
- "shadow--small": "dds-Paper-module__shadow--small",
1554
- "shadow--medium": "dds-Paper-module__shadow--medium",
1555
- "shadow--large": "dds-Paper-module__shadow--large"
1556
- };
1557
1542
  // src/components/layout/common/surface.module.css
1558
1543
  var surface_module_default = {
1559
1544
  "border-radius--button": "dds-surface-module__border-radius--button",
@@ -1563,6 +1548,15 @@ var surface_module_default = {
1563
1548
  "border-radius--rounded": "dds-surface-module__border-radius--rounded",
1564
1549
  "border-radius--0": "dds-surface-module__border-radius--0"
1565
1550
  };
1551
+ // src/components/layout/Paper/Paper.module.css
1552
+ var Paper_module_default = {
1553
+ "background": "dds-Paper-module__background",
1554
+ "border": "dds-Paper-module__border",
1555
+ "container": "dds-Paper-module__container",
1556
+ "shadow--small": "dds-Paper-module__shadow--small",
1557
+ "shadow--medium": "dds-Paper-module__shadow--medium",
1558
+ "shadow--large": "dds-Paper-module__shadow--large"
1559
+ };
1566
1560
  // src/components/layout/Paper/Paper.tsx
1567
1561
  const Paper = ({ id, elevation, border, borderRadius = "surface", background = "surface-paper-default", className, htmlProps, style, ...rest }) => {
1568
1562
  const styleVariables = {
@@ -1592,6 +1586,12 @@ const HStack = ({ id, className, style, htmlProps, ...rest }) => {
1592
1586
  });
1593
1587
  };
1594
1588
  HStack.displayName = "HStack";
1589
+ // src/components/helpers/Backdrop/Backdrop.module.css
1590
+ var Backdrop_module_default = {
1591
+ "backdrop": "dds-Backdrop-module__backdrop",
1592
+ "backdrop--visible": "dds-Backdrop-module__backdrop--visible",
1593
+ "backdrop--hidden": "dds-Backdrop-module__backdrop--hidden"
1594
+ };
1595
1595
  // src/components/helpers/Backdrop/Backdrop.tsx
1596
1596
  /**
1597
1597
  * Backdrop-komponent, viser et bakgrunnslag for et element som skal låse applikasjonen i bakgrunnen (Modal el.l.).
@@ -1631,438 +1631,222 @@ const Backdrop = ({ isMounted, zIndex, ...props }) => {
1631
1631
  });
1632
1632
  };
1633
1633
  Backdrop.displayName = "Backdrop";
1634
- // src/components/helpers/Dropdown/DropdownItem.module.css
1635
- var DropdownItem_module_default = {
1636
- "item": "dds-DropdownItem-module__item",
1637
- "default": "dds-DropdownItem-module__default",
1638
- "danger": "dds-DropdownItem-module__danger",
1639
- "item--interactive": "dds-DropdownItem-module__item--interactive",
1640
- "item--loading": "dds-DropdownItem-module__item--loading"
1641
- };
1642
- // src/components/Badge/Badge.module.css
1643
- var Badge_module_default = {
1644
- "container": "dds-Badge-module__container",
1645
- "notification": "dds-Badge-module__notification",
1646
- "action": "dds-Badge-module__action",
1647
- "neutral": "dds-Badge-module__neutral",
1648
- "subtle": "dds-Badge-module__subtle"
1634
+ // src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.module.css
1635
+ var TextOverflowEllipsis_module_default = {
1636
+ "wrapper": "dds-TextOverflowEllipsis-module__wrapper",
1637
+ "inner": "dds-TextOverflowEllipsis-module__inner"
1649
1638
  };
1650
- const Badge = ({ id, className, style, htmlProps, purpose = "notification", size = "medium", children, max = 9, showZero = false, ...rest }) => {
1651
- const hasChildren = !!children || showZero && children === 0;
1652
- const heightVariant = hasChildren ? "withChildren" : "noChildren";
1653
- const height = {
1654
- withChildren: {
1655
- xsmall: "18px",
1656
- small: "21px",
1657
- medium: "24px",
1658
- large: "27px"
1659
- },
1660
- noChildren: {
1661
- xsmall: "x0.5",
1662
- small: "x0.75",
1663
- medium: "x1",
1664
- large: "x1.5"
1665
- }
1666
- };
1667
- const color = {
1668
- notification: "text-on-notification",
1669
- action: "text-on-action",
1670
- neutral: "text-on-inverse",
1671
- subtle: "text-default"
1672
- };
1673
- const displayValue = hasChildren && max && children > max ? `${max}+` : children;
1674
- if (!(!showZero && children === 0 ? false : true)) return null;
1675
- return /* @__PURE__ */ jsx(Box, {
1676
- as: "span",
1677
- paddingInline: hasChildren ? "x0.25" : void 0,
1678
- minWidth: height[heightVariant][size],
1679
- maxWidth: "fit-content",
1680
- height: height[heightVariant][size],
1681
- display: "inline-flex",
1682
- alignItems: "center",
1683
- justifyContent: "center",
1684
- ...getBaseHTMLProps(id, cn(className, Badge_module_default.container, Badge_module_default[purpose], typographyStyles_module_default[`body-short-${size}`]), style, htmlProps, rest),
1685
- children: /* @__PURE__ */ jsx(Typography, {
1686
- as: "span",
1687
- typographyType: `body-short-${size}`,
1688
- color: color[purpose],
1689
- children: displayValue
1690
- })
1639
+ // src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.tsx
1640
+ function TextOverflowEllipsisWrapper({ className, ...rest }) {
1641
+ return /* @__PURE__ */ jsx("span", {
1642
+ ...rest,
1643
+ className: cn(className, TextOverflowEllipsis_module_default.wrapper)
1644
+ });
1645
+ }
1646
+ function TextOverflowEllipsisInner({ className, ...rest }) {
1647
+ return /* @__PURE__ */ jsx("span", {
1648
+ ...rest,
1649
+ className: cn(className, TextOverflowEllipsis_module_default.inner)
1691
1650
  });
1651
+ }
1652
+ // src/components/helpers/styling/focus.module.css
1653
+ const _key1 = "dds-focus-module__focusable";
1654
+ var focus_module_default = {
1655
+ "focused": "dds-focus-module__focused",
1656
+ "focusable": "dds-focus-module__focusable",
1657
+ "focusable-focus": "dds-focus-module__focusable-focus",
1658
+ "focusable-within": "dds-focus-module__focusable-within",
1659
+ "has-focusable-input": "dds-focus-module__has-focusable-input",
1660
+ "focusable-sibling": "dds-focus-module__focusable-sibling",
1661
+ "focus-styled-sibling": "dds-focus-module__focus-styled-sibling",
1662
+ "focusable--inset": "dds-focus-module__focusable--inset"
1692
1663
  };
1693
- Badge.displayName = "Badge";
1694
- // src/components/Icon/Icon.tsx
1695
- const getSize = (iconSize) => {
1696
- switch (iconSize) {
1697
- case "component": return "var(--dds-size-icon-component)";
1698
- case "inherit": return "1em";
1699
- default: return `var(--dds-size-${iconSize})`;
1664
+ // src/components/Typography/Typography/Typography.module.css
1665
+ var Typography_module_default = { "container": "dds-Typography-module__container" };
1666
+ // src/components/Typography/Typography/Typography.types.ts
1667
+ const TG_BODY_SHORT_TYPES = [
1668
+ "body-short-xsmall",
1669
+ "body-short-small",
1670
+ "body-short-medium",
1671
+ "body-short-large"
1672
+ ];
1673
+ const TG_BODY_LONG_TYPES = [
1674
+ "body-long-xsmall",
1675
+ "body-long-small",
1676
+ "body-long-medium",
1677
+ "body-long-large"
1678
+ ];
1679
+ const TG_BODY_TYPES = [...TG_BODY_SHORT_TYPES, ...TG_BODY_LONG_TYPES];
1680
+ const TG_LEAD_TYPES = ["lead-medium"];
1681
+ const TG_HEADING_TYPES = [
1682
+ "heading-xxsmall",
1683
+ "heading-xsmall",
1684
+ "heading-small",
1685
+ "heading-medium",
1686
+ "heading-large",
1687
+ "heading-xlarge",
1688
+ "heading-xxlarge"
1689
+ ];
1690
+ // src/components/Typography/Typography/Typography.utils.ts
1691
+ const getElementType = (element) => {
1692
+ switch (element) {
1693
+ case "a": return "a";
1694
+ case "heading-xxsmall": return "h6";
1695
+ case "heading-xsmall": return "h5";
1696
+ case "heading-small": return "h4";
1697
+ case "heading-medium": return "h3";
1698
+ case "heading-large": return "h2";
1699
+ case "heading-xlarge":
1700
+ case "heading-xxlarge": return "h1";
1701
+ case "label-medium": return "label";
1702
+ default: return "p";
1700
1703
  }
1701
1704
  };
1702
- [...SIZE_SCALE];
1703
- function Icon(props) {
1704
- const { id, iconSize = "6", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
1705
- const size = getSize(iconSize);
1706
- return /* @__PURE__ */ jsx(icon, {
1707
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
1708
- height: size,
1709
- width: size,
1710
- fill: color,
1711
- "aria-hidden": htmlProps?.["aria-hidden"] ?? true,
1712
- ...iconState ? { iconState } : {}
1713
- });
1714
- }
1715
- Icon.displayName = "Icon";
1716
- // src/components/Spinner/Spinner.module.css
1717
- var Spinner_module_default = {
1718
- "svg": "dds-Spinner-module__svg",
1719
- "jordskifterett": "dds-Spinner-module__jordskifterett",
1720
- "lagmannsrett": "dds-Spinner-module__lagmannsrett",
1721
- "tingrett": "dds-Spinner-module__tingrett"
1705
+ const isHeading = (type) => {
1706
+ return TG_HEADING_TYPES.includes(type);
1722
1707
  };
1723
- // src/i18n/LanguageProvider.tsx
1724
- const LanguageContext = createContext(void 0);
1725
- function LanguageProvider({ language, children }) {
1726
- return /* @__PURE__ */ jsx(LanguageContext, {
1727
- value: { language },
1728
- children
1729
- });
1730
- }
1731
- function useLanguage() {
1732
- const lang = useContext(LanguageContext)?.language;
1733
- if (!lang) throw new Error("useLangage must be used within DdsProvider.");
1734
- return lang;
1735
- }
1736
- // src/i18n/translation.tsx
1737
- function useTranslation() {
1738
- const lang = useLanguage();
1739
- const t = (text) => text[lang];
1740
- return {
1741
- t,
1742
- lang
1743
- };
1744
- }
1745
- function createTexts(texts) {
1746
- return texts;
1747
- }
1748
- // src/i18n/commonTexts.tsx
1749
- const commonTexts = createTexts({
1750
- clearSelect: {
1751
- no: "Tøm nedtrekksliste",
1752
- nb: "Tøm nedtrekksliste",
1753
- nn: "Tøm nedtrekksliste",
1754
- en: "Clear selection",
1755
- se: "Gidde válljemiid"
1756
- },
1757
- close: {
1758
- nb: "Lukk",
1759
- no: "Lukk",
1760
- nn: "Lukk",
1761
- en: "Close",
1762
- se: "Gidde"
1763
- },
1764
- closeMessage: {
1765
- nb: "Lukk melding",
1766
- no: "Lukk melding",
1767
- nn: "Lukk melding",
1768
- en: "Close message",
1769
- se: "Gidde dieđu"
1770
- },
1771
- loading: {
1772
- nb: "Innlastning pågår",
1773
- no: "Innlastning pågår",
1774
- nn: "Innlastning pågår",
1775
- en: "Loading",
1776
- se: "Viežžamin"
1777
- },
1778
- nextPage: {
1779
- nb: "Neste side",
1780
- no: "Neste side",
1781
- nn: "Neste side",
1782
- en: "Next page",
1783
- se: "Boahte siidu"
1784
- },
1785
- previousPage: {
1786
- nb: "Forrige side",
1787
- no: "Forrige side",
1788
- nn: "Førre side",
1789
- en: "Previous page",
1790
- se: "Ovddit siidu"
1791
- },
1792
- page: (page) => ({
1793
- nb: `Side ${page}`,
1794
- no: `Side ${page}`,
1795
- nn: `Side ${page}`,
1796
- en: `Page ${page}`,
1797
- se: `Siidu ${page}`
1798
- }),
1799
- currentPage: (page) => ({
1800
- nb: `Nåværende side (${page})`,
1801
- no: `Nåværende side (${page})`,
1802
- nn: `Noverande side (${page})`,
1803
- en: `Current page (${page})`,
1804
- se: `Dála siidu (${page})`
1805
- }),
1806
- pageOf: (current, max) => ({
1807
- nb: `Side ${current} av ${max}`,
1808
- no: `Side ${current} av ${max}`,
1809
- nn: `Side ${current} ${max}`,
1810
- en: `Page ${current} of ${max}`,
1811
- se: `Siidu ${current} ${max}`
1812
- })
1813
- });
1814
- // src/components/Spinner/Spinner.tsx
1815
- function Spinner(props) {
1816
- const { size = "var(--dds-size-6)", color = "icon-action-resting", tooltip, id, className, htmlProps, style, ...rest } = props;
1817
- const { t } = useTranslation();
1818
- const uniqueId = `${useId()}-spinnerTitle`;
1819
- return /* @__PURE__ */ jsxs("svg", {
1820
- viewBox: "0 0 25 25",
1821
- role: "progressbar",
1822
- "aria-labelledby": uniqueId,
1823
- ...getBaseHTMLProps(id, cn(className, Spinner_module_default.svg), {
1708
+ const isLegend = (as) => {
1709
+ return as === "legend";
1710
+ };
1711
+ const isCaption = (as) => {
1712
+ return as === "caption";
1713
+ };
1714
+ const inlineElements = [
1715
+ "a",
1716
+ "abbr",
1717
+ "audio",
1718
+ "b",
1719
+ "bdi",
1720
+ "bdo",
1721
+ "big",
1722
+ "br",
1723
+ "button",
1724
+ "canvas",
1725
+ "cite",
1726
+ "code",
1727
+ "data",
1728
+ "datalist",
1729
+ "del",
1730
+ "dfn",
1731
+ "em",
1732
+ "embed",
1733
+ "i",
1734
+ "iframe",
1735
+ "img",
1736
+ "input",
1737
+ "ins",
1738
+ "kbd",
1739
+ "label",
1740
+ "map",
1741
+ "mark",
1742
+ "meter",
1743
+ "noscript",
1744
+ "object",
1745
+ "output",
1746
+ "picture",
1747
+ "progress",
1748
+ "q",
1749
+ "ruby",
1750
+ "s",
1751
+ "samp",
1752
+ "script",
1753
+ "select",
1754
+ "slot",
1755
+ "small",
1756
+ "span",
1757
+ "strong",
1758
+ "sub",
1759
+ "sup",
1760
+ "svg",
1761
+ "template",
1762
+ "textarea",
1763
+ "time",
1764
+ "u",
1765
+ "var",
1766
+ "video",
1767
+ "wbr"
1768
+ ];
1769
+ const isInlineElement = (as) => inlineElements.indexOf(as) !== -1;
1770
+ const getColorCn = (color) => {
1771
+ if (!isTextColor(color)) return null;
1772
+ const [prefix] = color.split("-", 1);
1773
+ return typographyStyles_module_default[`${prefix}-color--${color.slice(prefix.length + 1)}`] || null;
1774
+ };
1775
+ // src/components/Typography/Typography/Typography.tsx
1776
+ const isAnchorProps = (props) => props.typographyType === "a";
1777
+ const Typography = (props) => {
1778
+ const { typographyType = "body-long-medium", as: propAs, children, bold, underline, italic, style, id, withMargins, color, className, htmlProps = {}, ...rest } = props;
1779
+ const as = propAs ? propAs : getElementType(typographyType);
1780
+ let relProp;
1781
+ if (isAnchorProps(props)) relProp = as === "a" ? "noopener noreferer" : void 0;
1782
+ return /* @__PURE__ */ jsx(Box, {
1783
+ ...getBaseHTMLProps(id, cn(className, getColorCn(color), Typography_module_default.container, typographyStyles_module_default[typographyType], withMargins && typographyStyles_module_default[`${typographyType}--margins`], isLegend(as) && typographyStyles_module_default.legend, isCaption(as) && typographyStyles_module_default.caption, isCaption(as) && withMargins && typographyStyles_module_default["caption--withMargins"], bold && typographyStyles_module_default.bold, underline && typographyStyles_module_default.underline, italic && typographyStyles_module_default.italic, as === "a" && "dds-focus-module__focusable"), {
1824
1784
  ...style,
1825
- width: size,
1826
- height: size,
1827
- ["--dds-color-spinner"]: getTextColor(color)
1785
+ color: color && !isTextColor(color) ? getTextColor(color) : void 0
1828
1786
  }, htmlProps, rest),
1829
- children: [
1830
- /* @__PURE__ */ jsx("title", {
1831
- id: uniqueId,
1832
- children: tooltip ?? t(commonTexts.loading)
1833
- }),
1834
- /* @__PURE__ */ jsx("circle", {
1835
- cx: "12",
1836
- cy: "12.25",
1837
- r: "6",
1838
- className: Spinner_module_default.jordskifterett
1839
- }),
1840
- /* @__PURE__ */ jsx("rect", {
1841
- x: "4",
1842
- y: "10.25",
1843
- width: "16",
1844
- height: "4",
1845
- className: Spinner_module_default.lagmannsrett
1846
- }),
1847
- /* @__PURE__ */ jsx("path", {
1848
- d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
1849
- className: Spinner_module_default.tingrett
1850
- })
1851
- ]
1787
+ as,
1788
+ rel: relProp,
1789
+ children
1852
1790
  });
1853
- }
1854
- Spinner.displayName = "Spinner";
1855
- // src/components/helpers/styling/focus.module.css
1856
- const _key1 = "dds-focus-module__focusable";
1857
- var focus_module_default = {
1858
- "focused": "dds-focus-module__focused",
1859
- "focusable": "dds-focus-module__focusable",
1860
- "focusable-focus": "dds-focus-module__focusable-focus",
1861
- "focusable-within": "dds-focus-module__focusable-within",
1862
- "has-focusable-input": "dds-focus-module__has-focusable-input",
1863
- "focusable-sibling": "dds-focus-module__focusable-sibling",
1864
- "focus-styled-sibling": "dds-focus-module__focus-styled-sibling",
1865
- "focusable--inset": "dds-focus-module__focusable--inset"
1866
1791
  };
1867
- // src/components/helpers/Dropdown/DropdownItem.tsx
1868
- const DropdownItem = ({ icon, className, children: propChildren, purpose = "default", loading, loadingTooltip, badgeProps, ...rest }) => {
1869
- const itemCns = [
1870
- DropdownItem_module_default.item,
1871
- DropdownItem_module_default[purpose],
1872
- typographyStyles_module_default["body-short-medium"]
1873
- ];
1874
- const interactiveItemCns = [
1875
- ...itemCns,
1876
- focus_module_default["focusable--inset"],
1877
- DropdownItem_module_default["item--interactive"]
1878
- ];
1879
- const children = loading ? /* @__PURE__ */ jsx("span", {
1880
- className: cn(loading && utilStyles_module_default.invisible),
1881
- children: propChildren
1882
- }) : propChildren;
1883
- const cns = rest.as === "span" ? itemCns : interactiveItemCns;
1884
- return /* @__PURE__ */ jsxs(Box, {
1885
- display: "flex",
1886
- alignItems: "center",
1887
- padding: "x0.75",
1888
- gap: "x0.25",
1889
- width: "100%",
1890
- className: cn(className, ...cns, loading && DropdownItem_module_default["item--loading"]),
1891
- "aria-disabled": loading ? true : void 0,
1892
- ...rest,
1893
- children: [
1894
- loading && /* @__PURE__ */ jsx("span", {
1895
- className: cn(utilStyles_module_default["center-absolute"]),
1896
- children: /* @__PURE__ */ jsx(Spinner, {
1897
- size: "var(--dds-size-icon-component)",
1898
- tooltip: loadingTooltip
1899
- })
1900
- }),
1901
- icon && /* @__PURE__ */ jsx(Icon, {
1902
- iconSize: "inherit",
1903
- icon,
1904
- className: cn(loading && utilStyles_module_default.invisible)
1905
- }),
1906
- children,
1907
- badgeProps && /* @__PURE__ */ jsx(Box, {
1908
- as: Badge,
1909
- ...badgeProps,
1910
- size: "small",
1911
- marginInline: "x0.25 0"
1912
- })
1913
- ]
1792
+ Typography.displayName = "Typography";
1793
+ // src/components/Typography/Caption/Caption.tsx
1794
+ const Caption = ({ typographyType = "heading-large", id, className, style, htmlProps, children, ...rest }) => {
1795
+ return /* @__PURE__ */ jsx(Typography, {
1796
+ ...getBaseHTMLProps(id, className, style, htmlProps, rest),
1797
+ typographyType,
1798
+ as: "caption",
1799
+ children
1914
1800
  });
1915
1801
  };
1916
- // src/components/helpers/Dropdown/DropdownHeader.tsx
1917
- const DropdownHeader = ({ className, ...rest }) => {
1918
- return /* @__PURE__ */ jsx(Box, {
1919
- as: "h2",
1920
- padding: "x0.75 x0.75 0 x0.75",
1921
- ...rest,
1922
- className: cn(className, typographyStyles_module_default["heading-xsmall"])
1802
+ Caption.displayName = "Caption";
1803
+ // src/components/Typography/Heading/Heading.tsx
1804
+ const getHeadingElement = (level) => `h${level}`;
1805
+ const getDefaultTypographyType = (h) => {
1806
+ switch (h) {
1807
+ case "h1": return "heading-xlarge";
1808
+ case "h2": return "heading-large";
1809
+ case "h3": return "heading-medium";
1810
+ case "h4": return "heading-small";
1811
+ case "h5": return "heading-xsmall";
1812
+ case "h6": return "heading-xxsmall";
1813
+ default: return "heading-xlarge";
1814
+ }
1815
+ };
1816
+ const Heading = ({ id, className, style, htmlProps, children, typographyType, level, withMargins, withMarginsOverInput, ...rest }) => {
1817
+ const headingElement = getHeadingElement(level);
1818
+ const standardTypographyType = typographyType ?? getDefaultTypographyType(headingElement);
1819
+ return /* @__PURE__ */ jsx(Typography, {
1820
+ ...getBaseHTMLProps(id, cn(className, withMarginsOverInput && typographyStyles_module_default["heading--margins-over-input"]), style, htmlProps, rest),
1821
+ typographyType: standardTypographyType,
1822
+ as: headingElement,
1823
+ withMargins: optAttr(withMargins || withMarginsOverInput),
1824
+ children
1923
1825
  });
1924
1826
  };
1925
- // src/components/helpers/HiddenInput/HiddenInput.tsx
1926
- /**
1927
- * Usynlig `<input>` til bruk for skjermlesere, typisk for custom radioknapper o.l..
1928
- *
1929
- * @component
1930
- * @param {Object} props - Standard HTML-attributter for komponenten.
1931
- *
1932
- * @returns {JSX.Element} Et usynlig `<input>`-element.
1933
-
1934
- * @example
1935
- * ```tsx
1936
- * <label htmlFor="id">
1937
- * <HiddenInput id="id" />
1938
- * //visuell erstatning for input
1939
- * </label>
1940
- * });
1941
- * ```
1942
- */
1943
- const HiddenInput = ({ className, ...rest }) => /* @__PURE__ */ jsx("input", {
1944
- className: cn(className, utilStyles_module_default["hide-input"]),
1945
- ...rest
1946
- });
1947
- // src/components/helpers/StylelessButton/StylelessButton.tsx
1948
- /**
1949
- * Normalisert `<button>` uten styling. Base for custom buttom styling.
1950
- *
1951
- * @component
1952
- * @template T ekstra props ved behov.
1953
- * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
1954
- *
1955
- * @returns {JSX.Element} `<button>`-element uten styling.
1956
-
1957
- * @example
1958
- * ```tsx
1959
- * <StylelessButton className="min-styling">
1960
- * Tekst
1961
- * </StylelessButton>
1962
- * ```
1963
- */
1964
- const StylelessButton = ({ className, ...rest }) => /* @__PURE__ */ jsx("button", {
1965
- ...rest,
1966
- className: cn(className, utilStyles_module_default["remove-button-styling"], utilStyles_module_default["normalize-button"])
1967
- });
1968
- // src/components/helpers/StylelessList/StylelessList.tsx
1969
- /**
1970
- * Normalisert `<ul>` uten styling. Base for custom ul styling.
1971
- *
1972
- * @component
1973
- * @template T ekstra props ved behov.
1974
- * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
1975
- *
1976
- * @returns {JSX.Element} `<ul>`-element uten styling.
1977
-
1978
- * @example
1979
- * ```tsx
1980
- * <StylelessList className="min-styling">
1981
- * <li>item</li>
1982
- * <li>item</li>
1983
- * </StylelessList>
1984
- * ```
1985
- */
1986
- const StylelessList = ({ className, ...rest }) => /* @__PURE__ */ jsx("ul", {
1987
- ...rest,
1988
- className: cn(className, utilStyles_module_default["remove-list-styling"])
1989
- });
1990
- /**
1991
- * Normalisert `<ol>` uten styling. Base for custom ol styling.
1992
- *
1993
- * @component
1994
- * @template T ekstra props ved behov.
1995
- * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
1996
- *
1997
- * @returns {JSX.Element} `<ol>`-element uten styling.
1998
-
1999
- * @example
2000
- * ```tsx
2001
- * <StylelessOList className="min-styling">
2002
- * <li>item</li>
2003
- * <li>item</li>
2004
- * </StylelessOList>
2005
- * ```
2006
- */
2007
- const StylelessOList = ({ className, ...rest }) => /* @__PURE__ */ jsx("ol", {
2008
- ...rest,
2009
- className: cn(className, utilStyles_module_default["remove-list-styling"])
2010
- });
2011
- // src/components/helpers/styling/utils.ts
2012
- /**
2013
- * Styling utils i TS (CSS-in-JS)
2014
- */
2015
- /**
2016
- * DDS utils
2017
- */
2018
- const outlineOffset = "var(--dds-spacing-x0-125)";
2019
- const outlineInset = "calc(var(--dds-spacing-x0-125) * -1)";
2020
- const focusVisible = {
2021
- outline: "var(--dds-color-focus-outside) 2px solid",
2022
- outlineOffset,
2023
- boxShadow: "0 0 0 2px var(--dds-color-focus-inside)"
2024
- };
2025
- const focusVisibleTransitionValue = "outline-offset var(--dds-motion-micro-state)";
2026
- const focusVisibleInset = {
2027
- outline: "var(--dds-color-focus-outside) 2px solid",
2028
- outlineOffset: outlineInset
2029
- };
2030
- const scrollbarStyling = {
2031
- scrollbarColor: "var(--dds-color-surface-scrollbar) transparent",
2032
- scrollbarWidth: "thin"
2033
- };
2034
- /**
2035
- * Generelle utils
2036
- */
2037
- const hideInput = {
2038
- clip: "rect(0 0 0 0)",
2039
- position: "absolute",
2040
- height: "1px",
2041
- width: "1px",
2042
- margin: 0
2043
- };
2044
- const inheritLinkStyling = {
2045
- color: "inherit",
2046
- textDecoration: "inherit"
2047
- };
2048
- const removeButtonStyling = {
2049
- background: "none",
2050
- color: "inherit",
2051
- border: "none",
2052
- padding: 0,
2053
- font: "inherit",
2054
- cursor: "pointer",
2055
- outline: "inherit"
2056
- };
2057
- const removeListStyling = {
2058
- listStyle: "none",
2059
- padding: 0,
2060
- margin: 0
2061
- };
2062
- const normalizeButton = {
2063
- margin: 0,
2064
- textTransform: "none"
1827
+ Heading.displayName = "Heading";
1828
+ // src/components/Icon/Icon.tsx
1829
+ const getSize = (iconSize) => {
1830
+ switch (iconSize) {
1831
+ case "component": return "var(--dds-size-icon-component)";
1832
+ case "inherit": return "1em";
1833
+ default: return `var(--dds-size-${iconSize})`;
1834
+ }
2065
1835
  };
1836
+ [...SIZE_SCALE];
1837
+ function Icon(props) {
1838
+ const { id, iconSize = "6", color = "currentcolor", icon, className, style, htmlProps, iconState, ...rest } = props;
1839
+ const size = getSize(iconSize);
1840
+ return /* @__PURE__ */ jsx(icon, {
1841
+ ...getBaseHTMLProps(id, className, style, htmlProps, rest),
1842
+ height: size,
1843
+ width: size,
1844
+ fill: color,
1845
+ "aria-hidden": htmlProps?.["aria-hidden"] ?? true,
1846
+ ...iconState ? { iconState } : {}
1847
+ });
1848
+ }
1849
+ Icon.displayName = "Icon";
2066
1850
  // src/components/Icon/Icon.module.css
2067
1851
  var Icon_module_default = { "svg": "dds-Icon-module__svg" };
2068
1852
  // src/components/Icon/utils/SvgWrapper.tsx
@@ -3398,6 +3182,18 @@ function ReceiptIcon(props) {
3398
3182
  children: /* @__PURE__ */ jsx("path", { d: "M16.667 20.2454C17.058 20.2454 17.441 20.3571 17.7705 20.5676L17.7725 20.5696L18.7002 21.1653L18.7686 21.2024C18.8398 21.2342 18.9175 21.2507 18.9961 21.2502H19C19.0662 21.2502 19.1299 21.2238 19.1768 21.177C19.2236 21.1302 19.2499 21.0664 19.25 21.0002V3.00024C19.25 2.93402 19.2235 2.87035 19.1768 2.82349C19.1299 2.7766 19.0663 2.75024 19 2.75024H18.9961C18.8915 2.74967 18.7887 2.77859 18.7002 2.83423L17.7725 3.43091L17.7705 3.43188C17.4409 3.64243 17.0581 3.75415 16.667 3.75415C16.2759 3.75415 15.8931 3.64243 15.5635 3.43188L15.5615 3.43091L14.6289 2.8313C14.5406 2.77497 14.4378 2.74536 14.333 2.74536C14.2281 2.74536 14.1255 2.77577 14.0371 2.83228L14.0361 2.8313L13.1055 3.43091L13.1035 3.43188C12.8152 3.61606 12.4862 3.72493 12.1465 3.74927L12 3.75415C11.6089 3.75415 11.2261 3.64243 10.8965 3.43188L10.8945 3.43091L9.96289 2.8313C9.87456 2.77498 9.77176 2.74536 9.66699 2.74536C9.56204 2.74536 9.45953 2.77577 9.37109 2.83228L9.37012 2.8313L8.43848 3.43091L8.43652 3.43188C8.10694 3.64243 7.72411 3.75415 7.33301 3.75415C6.94191 3.75415 6.55908 3.64243 6.22949 3.43188L6.22754 3.43091L5.2998 2.83423C5.21127 2.77859 5.10848 2.74967 5.00391 2.75024H5C4.9337 2.75024 4.87013 2.7766 4.82324 2.82349C4.77646 2.87035 4.75 2.93402 4.75 3.00024V21.0002C4.75009 21.0664 4.77644 21.1302 4.82324 21.177C4.87011 21.2238 4.93377 21.2502 5 21.2502H5.00391C5.10854 21.2508 5.21123 21.221 5.2998 21.1653L6.22754 20.5696L6.22949 20.5676C6.55904 20.3571 6.94197 20.2454 7.33301 20.2454C7.72405 20.2454 8.10697 20.3571 8.43652 20.5676L8.43848 20.5686L9.37012 21.1682H9.37109C9.45946 21.2246 9.56216 21.2541 9.66699 21.2542C9.77182 21.2542 9.87452 21.2246 9.96289 21.1682L10.8945 20.5696L10.8965 20.5676C11.226 20.3571 11.609 20.2454 12 20.2454C12.391 20.2454 12.774 20.3571 13.1035 20.5676L13.1055 20.5696L14.0371 21.1682L14.1055 21.2053C14.1766 21.2377 14.2542 21.2542 14.333 21.2542C14.4118 21.2541 14.4894 21.2377 14.5605 21.2053L14.6289 21.1682L15.5615 20.5686L15.5635 20.5676C15.893 20.3571 16.2759 20.2454 16.667 20.2454ZM13 15.2502C13.4142 15.2502 13.75 15.586 13.75 16.0002C13.7498 16.4143 13.4141 16.7502 13 16.7502H8C7.5859 16.7502 7.25018 16.4143 7.25 16.0002C7.25 15.586 7.58579 15.2502 8 15.2502H13ZM16 11.2502C16.4142 11.2502 16.75 11.586 16.75 12.0002C16.7498 12.4143 16.4141 12.7502 16 12.7502H8C7.5859 12.7502 7.25018 12.4143 7.25 12.0002C7.25 11.586 7.58579 11.2502 8 11.2502H16ZM14 7.25024C14.4142 7.25024 14.75 7.58603 14.75 8.00024C14.7498 8.41431 14.4141 8.75024 14 8.75024H8C7.5859 8.75024 7.25018 8.41431 7.25 8.00024C7.25 7.58603 7.58579 7.25024 8 7.25024H14ZM20.75 21.0002C20.7499 21.4643 20.5654 21.9094 20.2373 22.2375C19.9098 22.5649 19.4659 22.7485 19.0029 22.7493L19.0039 22.7502L19.001 22.7493L19 22.7502V22.7493C18.611 22.7506 18.2296 22.6421 17.9004 22.4348L17.8945 22.4309L16.9629 21.8313C16.8746 21.775 16.7718 21.7454 16.667 21.7454C16.562 21.7454 16.4595 21.7758 16.3711 21.8323L16.3701 21.8313L15.4385 22.4309L15.4365 22.4319C15.1069 22.6424 14.7241 22.7542 14.333 22.7542C13.9419 22.7542 13.5591 22.6424 13.2295 22.4319L13.2275 22.4309L12.2959 21.8313C12.2076 21.775 12.1048 21.7454 12 21.7454C11.8951 21.7454 11.7925 21.7758 11.7041 21.8323L11.7031 21.8313L10.7725 22.4309L10.7705 22.4319C10.4409 22.6424 10.0581 22.7542 9.66699 22.7542C9.27589 22.7541 8.89306 22.6424 8.56348 22.4319L8.56152 22.4309L7.62891 21.8313C7.54057 21.775 7.43778 21.7454 7.33301 21.7454C7.22806 21.7454 7.12554 21.7758 7.03711 21.8323L7.03613 21.8313L6.10547 22.4309L6.09961 22.4348C5.77042 22.6421 5.38897 22.7506 5 22.7493H4.99805L4.99609 22.7502V22.7493C4.53345 22.7482 4.08995 22.5647 3.7627 22.2375C3.43458 21.9094 3.25009 21.4643 3.25 21.0002V3.00024C3.25 2.53619 3.43461 2.09111 3.7627 1.76294C4.08996 1.43567 4.53338 1.25225 4.99609 1.25122V1.25024L4.99805 1.25122L5 1.25024V1.25122C5.38905 1.24986 5.77037 1.35829 6.09961 1.56567L6.10547 1.5686V1.56958L7.03711 2.16821L7.10547 2.20532C7.17664 2.23766 7.25424 2.25415 7.33301 2.25415C7.41178 2.25415 7.48937 2.23766 7.56055 2.20532L7.62891 2.16821L8.56152 1.5686L8.56348 1.56763C8.89303 1.35714 9.27595 1.24536 9.66699 1.24536C10.0092 1.24536 10.3451 1.33098 10.6445 1.49341L10.7705 1.56763L10.7725 1.56958L11.7041 2.16821L11.7725 2.20532C11.8436 2.23766 11.9212 2.25415 12 2.25415L12.0781 2.24927C12.1553 2.23819 12.2296 2.21049 12.2959 2.16821L13.2275 1.56958L13.2295 1.56763C13.559 1.35714 13.942 1.24536 14.333 1.24536C14.6752 1.24536 15.0111 1.33097 15.3105 1.49341L15.4365 1.56763L15.4385 1.5686L16.3701 2.16821H16.3711C16.4595 2.2246 16.5622 2.25415 16.667 2.25415C16.7718 2.25415 16.8745 2.2246 16.9629 2.16821L17.8945 1.56958L17.9004 1.56567C18.2296 1.35829 18.611 1.24986 19 1.25122V1.25024L19.001 1.25122L19.0039 1.25024L19.0029 1.25122C19.466 1.252 19.9098 1.43544 20.2373 1.76294C20.5654 2.09111 20.75 2.53619 20.75 3.00024V21.0002Z" })
3399
3183
  });
3400
3184
  }
3185
+ // src/components/Icon/icons/recorder.tsx
3186
+ /** Settings and tools. Search terms: opptak, recording, utstyr, equipment. */
3187
+ function RecorderIcon(props) {
3188
+ return /* @__PURE__ */ jsxs(SvgWrapper, {
3189
+ ...props,
3190
+ children: [
3191
+ /* @__PURE__ */ jsx("path", { d: "M17 20.25C17.4142 20.25 17.75 20.5858 17.75 21C17.75 21.4142 17.4142 21.75 17 21.75H7C6.58579 21.75 6.25 21.4142 6.25 21C6.25 20.5858 6.58579 20.25 7 20.25H17Z" }),
3192
+ /* @__PURE__ */ jsx("path", { d: "M21.25 6C21.25 5.30964 20.6904 4.75 20 4.75H4C3.30964 4.75 2.75 5.30964 2.75 6V15C2.75 15.6904 3.30964 16.25 4 16.25H20C20.6904 16.25 21.25 15.6904 21.25 15V6ZM22.75 15C22.75 16.5188 21.5188 17.75 20 17.75H4C2.48122 17.75 1.25 16.5188 1.25 15V6C1.25 4.48122 2.48122 3.25 4 3.25H20C21.5188 3.25 22.75 4.48122 22.75 6V15Z" }),
3193
+ /* @__PURE__ */ jsx("path", { d: "M15.2845 10.1422C15.5793 10.2896 15.5793 10.7104 15.2845 10.8578L9.57889 13.7106C9.31292 13.8435 9 13.6501 9 13.3528L9 7.64721C9 7.34986 9.31292 7.15646 9.57889 7.28944L15.2845 10.1422Z" })
3194
+ ]
3195
+ });
3196
+ }
3401
3197
  // src/components/Icon/icons/redo.tsx
3402
3198
  /** Edit. Search terms: gjenta, redo, frem, forward, pil, arrow. */
3403
3199
  function RedoIcon(props) {
@@ -4039,6 +3835,7 @@ var icons_exports = /* @__PURE__ */ __exportAll({
4039
3835
  PublishIcon: () => PublishIcon,
4040
3836
  QuestionAnswerIcon: () => QuestionAnswerIcon,
4041
3837
  ReceiptIcon: () => ReceiptIcon,
3838
+ RecorderIcon: () => RecorderIcon,
4042
3839
  RedoIcon: () => RedoIcon,
4043
3840
  RefreshIcon: () => RefreshIcon,
4044
3841
  ReplayIcon: () => ReplayIcon,
@@ -4078,403 +3875,619 @@ var icons_exports = /* @__PURE__ */ __exportAll({
4078
3875
  ZoomInIcon: () => ZoomInIcon,
4079
3876
  ZoomOutIcon: () => ZoomOutIcon
4080
3877
  });
4081
- // src/components/ThemeProvider/ThemeProvider.module.css
4082
- var ThemeProvider_module_default = {
4083
- "global-variables": "dds-ThemeProvider-module__global-variables",
4084
- "global-styles": "dds-ThemeProvider-module__global-styles"
3878
+ // src/components/Typography/Label/Label.module.css
3879
+ var Label_module_default = {
3880
+ "read-only": "dds-Label-module__read-only",
3881
+ "read-only__icon": "dds-Label-module__read-only__icon"
4085
3882
  };
4086
- // src/components/ThemeProvider/ThemeProvider.tsx
4087
- const defaultTheme = "core-light";
4088
- const ddsThemes = Object.keys(ddsTokens);
4089
- new Set(ddsThemes.map((theme) => theme.split("-")[0]));
4090
- new Set(ddsThemes.map((theme) => theme.split("-")[1]));
4091
- const ThemeContext = createContext(void 0);
4092
- function ThemeProvider({ theme = defaultTheme, children }) {
4093
- const themeRef = useRef(null);
4094
- const [element, setElement] = useState(null);
4095
- useEffect(() => {
4096
- setElement(themeRef.current);
4097
- }, []);
4098
- return /* @__PURE__ */ jsx("div", {
4099
- ref: themeRef,
4100
- className: cn(`dds-${theme}`, ThemeProvider_module_default["global-variables"], ThemeProvider_module_default["global-styles"], "dds-themed"),
4101
- children: /* @__PURE__ */ jsx(ThemeContext, {
4102
- value: {
4103
- theme,
4104
- el: element
4105
- },
4106
- children
4107
- })
3883
+ // src/components/Typography/Label/Label.tsx
3884
+ const Label = ({ showRequiredStyling, readOnly, id, className, style, htmlProps, children, afterLabelContent, ...rest }) => {
3885
+ const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
3886
+ readOnly && /* @__PURE__ */ jsx(Icon, {
3887
+ icon: LockFilledIcon,
3888
+ iconSize: "4",
3889
+ className: Label_module_default["read-only__icon"]
3890
+ }),
3891
+ children,
3892
+ showRequiredStyling && /* @__PURE__ */ jsx(RequiredMarker, {})
3893
+ ] });
3894
+ const labelProps = { ...getBaseHTMLProps(id, cn(className, readOnly && Label_module_default["read-only"]), style, htmlProps, rest) };
3895
+ return afterLabelContent ? /* @__PURE__ */ jsxs(Typography, {
3896
+ typographyType: "label-medium",
3897
+ as: "div",
3898
+ withMargins: rest.withMargins,
3899
+ children: [/* @__PURE__ */ jsx(Typography, {
3900
+ ...labelProps,
3901
+ typographyType: "label-medium",
3902
+ withMargins: false,
3903
+ children: content
3904
+ }), afterLabelContent]
3905
+ }) : /* @__PURE__ */ jsx(Typography, {
3906
+ ...labelProps,
3907
+ typographyType: "label-medium",
3908
+ children: content
4108
3909
  });
4109
- }
4110
- /**
4111
- * Hook for å hente gjeldende tema og temanavn. Brukes inni ThemeProvider.
4112
- *
4113
- * @returns tema med JS-konstanter og navnet på temaet.
4114
- */
4115
- function useTheme() {
4116
- const themeName = useContext(ThemeContext)?.theme;
4117
- if (!themeName) throw new Error("useTheme must be used inside a ThemeProvider or DdsProvider");
4118
- return {
4119
- theme: ddsTokens[themeName],
4120
- themeName
4121
- };
4122
- }
4123
- // src/DdsProvider/DdsProvider.tsx
4124
- function DdsProvider({ language, theme, children }) {
4125
- return /* @__PURE__ */ jsx(LanguageProvider, {
4126
- language,
4127
- children: /* @__PURE__ */ jsx(ThemeProvider, {
4128
- theme,
4129
- children
4130
- })
3910
+ };
3911
+ Label.displayName = "Label";
3912
+ // src/components/Typography/Legend/Legend.tsx
3913
+ const Legend = ({ id, className, style, htmlProps, typographyType = "heading-large", withMarginsOverInput, withMargins, ...rest }) => {
3914
+ return /* @__PURE__ */ jsx(Typography, {
3915
+ ...getBaseHTMLProps(id, cn(className, withMarginsOverInput && typographyStyles_module_default["legend--margins-over-input"]), style, htmlProps, rest),
3916
+ as: "legend",
3917
+ typographyType,
3918
+ withMargins: optAttr(withMargins || withMarginsOverInput)
4131
3919
  });
4132
- }
4133
- // src/components/Accordion/Accordion.module.css
4134
- var Accordion_module_default = {
4135
- "container": "dds-Accordion-module__container",
4136
- "header-button": "dds-Accordion-module__header-button",
4137
- "chevron": "dds-Accordion-module__chevron"
4138
3920
  };
4139
- // src/components/Accordion/Accordion.tsx
4140
- const Accordion = ({ isInitiallyExpanded = false, isExpanded, onChange, id, children, className, style, htmlProps, ...rest }) => {
4141
- const { id: accordionId, isExpanded: expanded, toggleExpanded, bodyContentRef, headerProps, bodyProps } = useAccordion({
4142
- isInitiallyExpanded,
4143
- isExpanded,
4144
- onChange,
4145
- id
3921
+ Legend.displayName = "Legend";
3922
+ // src/components/Typography/Link/Link.tsx
3923
+ const Link = ({ id, className, htmlProps, children, typographyType, withMargins, withVisited, style, color, as: propAs, isAnchor: propIsAnchor, withIconStyling, ...rest }) => {
3924
+ const as = propAs ? propAs : "a";
3925
+ const aProps = as === "a" || propIsAnchor ? { rel: "noopener noreferrer" } : {};
3926
+ return /* @__PURE__ */ jsx(ElementAs, {
3927
+ as,
3928
+ ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default.a, withIconStyling && typographyStyles_module_default["a--with-icon"], withVisited && typographyStyles_module_default["a--visited"], typographyType && typographyStyles_module_default[typographyType], typographyType && withMargins && typographyStyles_module_default[`${typographyType}--margins`], _key1, getColorCn(color)), {
3929
+ ...style,
3930
+ color: color && !isTextColor(color) ? getTextColor(color) : void 0
3931
+ }, htmlProps, rest),
3932
+ ...aProps,
3933
+ children
4146
3934
  });
4147
- return /* @__PURE__ */ jsx("div", {
4148
- ...getBaseHTMLProps(accordionId, cn(className, Accordion_module_default.container), style, htmlProps, rest),
4149
- children: /* @__PURE__ */ jsx(AccordionContextProvider, {
4150
- headerProps,
4151
- bodyProps,
4152
- isExpanded: expanded,
4153
- toggleExpanded,
4154
- bodyContentRef,
4155
- children
4156
- })
3935
+ };
3936
+ Link.displayName = "Link";
3937
+ [...TG_BODY_TYPES, ...TG_LEAD_TYPES];
3938
+ const Paragraph = ({ id, className, style, htmlProps, children, typographyType = "body-long-medium", ...rest }) => {
3939
+ return /* @__PURE__ */ jsx(Typography, {
3940
+ ...getBaseHTMLProps(id, className, style, htmlProps, rest),
3941
+ typographyType,
3942
+ children
4157
3943
  });
4158
3944
  };
4159
- Accordion.displayName = "Accordion";
4160
- // src/components/Accordion/AccordionHeader.tsx
4161
- const AccordionHeader = ({ children, className, style, htmlProps, typographyType = "heading-medium", bold, ...rest }) => {
4162
- const { isExpanded, headerProps } = useAccordionContext();
4163
- const { id, ...restHeaderProps } = headerProps ?? {};
4164
- const iconState = isExpanded ? "up" : "down";
3945
+ Paragraph.displayName = "Paragraph";
3946
+ // src/components/Badge/Badge.module.css
3947
+ var Badge_module_default = {
3948
+ "container": "dds-Badge-module__container",
3949
+ "notification": "dds-Badge-module__notification",
3950
+ "action": "dds-Badge-module__action",
3951
+ "neutral": "dds-Badge-module__neutral",
3952
+ "subtle": "dds-Badge-module__subtle"
3953
+ };
3954
+ const Badge = ({ id, className, style, htmlProps, purpose = "notification", size = "medium", children, max = 9, showZero = false, ...rest }) => {
3955
+ const hasChildren = !!children || showZero && children === 0;
3956
+ const heightVariant = hasChildren ? "withChildren" : "noChildren";
3957
+ const height = {
3958
+ withChildren: {
3959
+ xsmall: "18px",
3960
+ small: "21px",
3961
+ medium: "24px",
3962
+ large: "27px"
3963
+ },
3964
+ noChildren: {
3965
+ xsmall: "x0.5",
3966
+ small: "x0.75",
3967
+ medium: "x1",
3968
+ large: "x1.5"
3969
+ }
3970
+ };
3971
+ const color = {
3972
+ notification: "text-on-notification",
3973
+ action: "text-on-action",
3974
+ neutral: "text-on-inverse",
3975
+ subtle: "text-default"
3976
+ };
3977
+ const displayValue = hasChildren && max && children > max ? `${max}+` : children;
3978
+ if (!(!showZero && children === 0 ? false : true)) return null;
4165
3979
  return /* @__PURE__ */ jsx(Box, {
4166
- as: StylelessButton,
4167
- padding: "x1 x1.5 x1 x1",
4168
- ...getBaseHTMLProps(id, cn(className, Accordion_module_default["header-button"], AccordionBase_module_default["header-button"], _key1), style, htmlProps, rest),
4169
- ...restHeaderProps,
4170
- children: /* @__PURE__ */ jsxs("div", {
4171
- className: cn(AccordionBase_module_default.header__content, typographyStyles_module_default[typographyType], bold && typographyStyles_module_default.bold),
4172
- children: [/* @__PURE__ */ jsx(Icon, {
4173
- icon: AnimatedChevronUpDownIcon,
4174
- iconSize: "component",
4175
- className: Accordion_module_default.chevron,
4176
- iconState
4177
- }), children]
3980
+ as: "span",
3981
+ paddingInline: hasChildren ? "x0.25" : void 0,
3982
+ minWidth: height[heightVariant][size],
3983
+ maxWidth: "fit-content",
3984
+ height: height[heightVariant][size],
3985
+ display: "inline-flex",
3986
+ alignItems: "center",
3987
+ justifyContent: "center",
3988
+ ...getBaseHTMLProps(id, cn(className, Badge_module_default.container, Badge_module_default[purpose], typographyStyles_module_default[`body-short-${size}`]), style, htmlProps, rest),
3989
+ children: /* @__PURE__ */ jsx(Typography, {
3990
+ as: "span",
3991
+ typographyType: `body-short-${size}`,
3992
+ color: color[purpose],
3993
+ children: displayValue
4178
3994
  })
4179
3995
  });
4180
3996
  };
4181
- AccordionHeader.displayName = "AccordionHeader";
4182
- // src/components/Accordion/AccordionBody.tsx
4183
- const AccordionBody = ({ children, className, style, htmlProps, ...rest }) => {
4184
- const { bodyContentRef, bodyProps } = useAccordionContext();
4185
- const { className: bodyContextCn, id, height, ...restBodyProps } = bodyProps ?? {};
4186
- return /* @__PURE__ */ jsx(Box, {
4187
- height: `${height}px`,
4188
- ...getBaseHTMLProps(id, cn(className, bodyContextCn), style, htmlProps, rest),
4189
- ...restBodyProps,
4190
- children: /* @__PURE__ */ jsx(Box, {
4191
- ref: bodyContentRef,
4192
- padding: "x0.5 x1.5 x2 x1",
4193
- children
4194
- })
4195
- });
3997
+ Badge.displayName = "Badge";
3998
+ // src/i18n/LanguageProvider.tsx
3999
+ const LanguageContext = createContext(void 0);
4000
+ function LanguageProvider({ language, children }) {
4001
+ return /* @__PURE__ */ jsx(LanguageContext, {
4002
+ value: { language },
4003
+ children
4004
+ });
4005
+ }
4006
+ function useLanguage() {
4007
+ const lang = useContext(LanguageContext)?.language;
4008
+ if (!lang) throw new Error("useLangage must be used within DdsProvider.");
4009
+ return lang;
4010
+ }
4011
+ // src/i18n/translation.tsx
4012
+ function useTranslation() {
4013
+ const lang = useLanguage();
4014
+ const t = (text) => text[lang];
4015
+ return {
4016
+ t,
4017
+ lang
4018
+ };
4019
+ }
4020
+ function createTexts(texts) {
4021
+ return texts;
4022
+ }
4023
+ // src/i18n/commonTexts.tsx
4024
+ const commonTexts = createTexts({
4025
+ clearSelect: {
4026
+ no: "Tøm nedtrekksliste",
4027
+ nb: "Tøm nedtrekksliste",
4028
+ nn: "Tøm nedtrekksliste",
4029
+ en: "Clear selection",
4030
+ se: "Gidde válljemiid"
4031
+ },
4032
+ close: {
4033
+ nb: "Lukk",
4034
+ no: "Lukk",
4035
+ nn: "Lukk",
4036
+ en: "Close",
4037
+ se: "Gidde"
4038
+ },
4039
+ closeMessage: {
4040
+ nb: "Lukk melding",
4041
+ no: "Lukk melding",
4042
+ nn: "Lukk melding",
4043
+ en: "Close message",
4044
+ se: "Gidde dieđu"
4045
+ },
4046
+ loading: {
4047
+ nb: "Innlastning pågår",
4048
+ no: "Innlastning pågår",
4049
+ nn: "Innlastning pågår",
4050
+ en: "Loading",
4051
+ se: "Viežžamin"
4052
+ },
4053
+ nextPage: {
4054
+ nb: "Neste side",
4055
+ no: "Neste side",
4056
+ nn: "Neste side",
4057
+ en: "Next page",
4058
+ se: "Boahte siidu"
4059
+ },
4060
+ previousPage: {
4061
+ nb: "Forrige side",
4062
+ no: "Forrige side",
4063
+ nn: "Førre side",
4064
+ en: "Previous page",
4065
+ se: "Ovddit siidu"
4066
+ },
4067
+ page: (page) => ({
4068
+ nb: `Side ${page}`,
4069
+ no: `Side ${page}`,
4070
+ nn: `Side ${page}`,
4071
+ en: `Page ${page}`,
4072
+ se: `Siidu ${page}`
4073
+ }),
4074
+ currentPage: (page) => ({
4075
+ nb: `Nåværende side (${page})`,
4076
+ no: `Nåværende side (${page})`,
4077
+ nn: `Noverande side (${page})`,
4078
+ en: `Current page (${page})`,
4079
+ se: `Dála siidu (${page})`
4080
+ }),
4081
+ pageOf: (current, max) => ({
4082
+ nb: `Side ${current} av ${max}`,
4083
+ no: `Side ${current} av ${max}`,
4084
+ nn: `Side ${current} ${max}`,
4085
+ en: `Page ${current} of ${max}`,
4086
+ se: `Siidu ${current} ${max}`
4087
+ })
4088
+ });
4089
+ // src/components/Spinner/Spinner.module.css
4090
+ var Spinner_module_default = {
4091
+ "svg": "dds-Spinner-module__svg",
4092
+ "jordskifterett": "dds-Spinner-module__jordskifterett",
4093
+ "lagmannsrett": "dds-Spinner-module__lagmannsrett",
4094
+ "tingrett": "dds-Spinner-module__tingrett"
4095
+ };
4096
+ // src/components/Spinner/Spinner.tsx
4097
+ function Spinner(props) {
4098
+ const { size = "var(--dds-size-6)", color = "icon-action-resting", tooltip, id, className, htmlProps, style, ...rest } = props;
4099
+ const { t } = useTranslation();
4100
+ const uniqueId = `${useId()}-spinnerTitle`;
4101
+ return /* @__PURE__ */ jsxs("svg", {
4102
+ viewBox: "0 0 25 25",
4103
+ role: "progressbar",
4104
+ "aria-labelledby": uniqueId,
4105
+ ...getBaseHTMLProps(id, cn(className, Spinner_module_default.svg), {
4106
+ ...style,
4107
+ width: size,
4108
+ height: size,
4109
+ ["--dds-color-spinner"]: getTextColor(color)
4110
+ }, htmlProps, rest),
4111
+ children: [
4112
+ /* @__PURE__ */ jsx("title", {
4113
+ id: uniqueId,
4114
+ children: tooltip ?? t(commonTexts.loading)
4115
+ }),
4116
+ /* @__PURE__ */ jsx("circle", {
4117
+ cx: "12",
4118
+ cy: "12.25",
4119
+ r: "6",
4120
+ className: Spinner_module_default.jordskifterett
4121
+ }),
4122
+ /* @__PURE__ */ jsx("rect", {
4123
+ x: "4",
4124
+ y: "10.25",
4125
+ width: "16",
4126
+ height: "4",
4127
+ className: Spinner_module_default.lagmannsrett
4128
+ }),
4129
+ /* @__PURE__ */ jsx("path", {
4130
+ d: "M12 16.6154C16.4183 16.6154 20 12.7581 20 8H4C4 12.7581 7.58172 16.6154 12 16.6154Z",
4131
+ className: Spinner_module_default.tingrett
4132
+ })
4133
+ ]
4134
+ });
4135
+ }
4136
+ Spinner.displayName = "Spinner";
4137
+ // src/components/helpers/Dropdown/DropdownItem.module.css
4138
+ var DropdownItem_module_default = {
4139
+ "item": "dds-DropdownItem-module__item",
4140
+ "default": "dds-DropdownItem-module__default",
4141
+ "danger": "dds-DropdownItem-module__danger",
4142
+ "item--interactive": "dds-DropdownItem-module__item--interactive",
4143
+ "item--loading": "dds-DropdownItem-module__item--loading"
4144
+ };
4145
+ // src/components/helpers/Dropdown/DropdownItem.tsx
4146
+ const DropdownItem = ({ icon, className, children: propChildren, purpose = "default", loading, loadingTooltip, badgeProps, ...rest }) => {
4147
+ const itemCns = [
4148
+ DropdownItem_module_default.item,
4149
+ DropdownItem_module_default[purpose],
4150
+ typographyStyles_module_default["body-short-medium"]
4151
+ ];
4152
+ const interactiveItemCns = [
4153
+ ...itemCns,
4154
+ focus_module_default["focusable--inset"],
4155
+ DropdownItem_module_default["item--interactive"]
4156
+ ];
4157
+ const children = loading ? /* @__PURE__ */ jsx("span", {
4158
+ className: cn(loading && utilStyles_module_default.invisible),
4159
+ children: propChildren
4160
+ }) : propChildren;
4161
+ const cns = rest.as === "span" ? itemCns : interactiveItemCns;
4162
+ return /* @__PURE__ */ jsxs(Box, {
4163
+ display: "flex",
4164
+ alignItems: "center",
4165
+ padding: "x0.75",
4166
+ gap: "x0.25",
4167
+ width: "100%",
4168
+ className: cn(className, ...cns, loading && DropdownItem_module_default["item--loading"]),
4169
+ "aria-disabled": loading ? true : void 0,
4170
+ ...rest,
4171
+ children: [
4172
+ loading && /* @__PURE__ */ jsx("span", {
4173
+ className: cn(utilStyles_module_default["center-absolute"]),
4174
+ children: /* @__PURE__ */ jsx(Spinner, {
4175
+ size: "var(--dds-size-icon-component)",
4176
+ tooltip: loadingTooltip
4177
+ })
4178
+ }),
4179
+ icon && /* @__PURE__ */ jsx(Icon, {
4180
+ iconSize: "inherit",
4181
+ icon,
4182
+ className: cn(loading && utilStyles_module_default.invisible)
4183
+ }),
4184
+ children,
4185
+ badgeProps && /* @__PURE__ */ jsx(Box, {
4186
+ as: Badge,
4187
+ ...badgeProps,
4188
+ size: "small",
4189
+ marginInline: "x0.25 0"
4190
+ })
4191
+ ]
4192
+ });
4193
+ };
4194
+ // src/components/helpers/Dropdown/DropdownHeader.tsx
4195
+ const DropdownHeader = ({ className, ...rest }) => {
4196
+ return /* @__PURE__ */ jsx(Box, {
4197
+ as: "h2",
4198
+ padding: "x0.75 x0.75 0 x0.75",
4199
+ ...rest,
4200
+ className: cn(className, typographyStyles_module_default["heading-xsmall"])
4201
+ });
4202
+ };
4203
+ // src/components/helpers/HiddenInput/HiddenInput.tsx
4204
+ /**
4205
+ * Usynlig `<input>` til bruk for skjermlesere, typisk for custom radioknapper o.l..
4206
+ *
4207
+ * @component
4208
+ * @param {Object} props - Standard HTML-attributter for komponenten.
4209
+ *
4210
+ * @returns {JSX.Element} Et usynlig `<input>`-element.
4211
+
4212
+ * @example
4213
+ * ```tsx
4214
+ * <label htmlFor="id">
4215
+ * <HiddenInput id="id" />
4216
+ * //visuell erstatning for input
4217
+ * </label>
4218
+ * });
4219
+ * ```
4220
+ */
4221
+ const HiddenInput = ({ className, ...rest }) => /* @__PURE__ */ jsx("input", {
4222
+ className: cn(className, utilStyles_module_default["hide-input"]),
4223
+ ...rest
4224
+ });
4225
+ // src/components/helpers/StylelessButton/StylelessButton.tsx
4226
+ /**
4227
+ * Normalisert `<button>` uten styling. Base for custom buttom styling.
4228
+ *
4229
+ * @component
4230
+ * @template T ekstra props ved behov.
4231
+ * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
4232
+ *
4233
+ * @returns {JSX.Element} `<button>`-element uten styling.
4234
+
4235
+ * @example
4236
+ * ```tsx
4237
+ * <StylelessButton className="min-styling">
4238
+ * Tekst
4239
+ * </StylelessButton>
4240
+ * ```
4241
+ */
4242
+ const StylelessButton = ({ className, ...rest }) => /* @__PURE__ */ jsx("button", {
4243
+ ...rest,
4244
+ className: cn(className, utilStyles_module_default["remove-button-styling"], utilStyles_module_default["normalize-button"])
4245
+ });
4246
+ // src/components/helpers/StylelessList/StylelessList.tsx
4247
+ /**
4248
+ * Normalisert `<ul>` uten styling. Base for custom ul styling.
4249
+ *
4250
+ * @component
4251
+ * @template T ekstra props ved behov.
4252
+ * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
4253
+ *
4254
+ * @returns {JSX.Element} `<ul>`-element uten styling.
4255
+
4256
+ * @example
4257
+ * ```tsx
4258
+ * <StylelessList className="min-styling">
4259
+ * <li>item</li>
4260
+ * <li>item</li>
4261
+ * </StylelessList>
4262
+ * ```
4263
+ */
4264
+ const StylelessList = ({ className, ...rest }) => /* @__PURE__ */ jsx("ul", {
4265
+ ...rest,
4266
+ className: cn(className, utilStyles_module_default["remove-list-styling"])
4267
+ });
4268
+ /**
4269
+ * Normalisert `<ol>` uten styling. Base for custom ol styling.
4270
+ *
4271
+ * @component
4272
+ * @template T ekstra props ved behov.
4273
+ * @param {Object & T} props - Standard HTML-attributter for komponenten med mulig utvidelse.
4274
+ *
4275
+ * @returns {JSX.Element} `<ol>`-element uten styling.
4276
+
4277
+ * @example
4278
+ * ```tsx
4279
+ * <StylelessOList className="min-styling">
4280
+ * <li>item</li>
4281
+ * <li>item</li>
4282
+ * </StylelessOList>
4283
+ * ```
4284
+ */
4285
+ const StylelessOList = ({ className, ...rest }) => /* @__PURE__ */ jsx("ol", {
4286
+ ...rest,
4287
+ className: cn(className, utilStyles_module_default["remove-list-styling"])
4288
+ });
4289
+ // src/components/helpers/styling/utils.ts
4290
+ /**
4291
+ * Styling utils i TS (CSS-in-JS)
4292
+ */
4293
+ /**
4294
+ * DDS utils
4295
+ */
4296
+ const outlineOffset = "var(--dds-spacing-x0-125)";
4297
+ const outlineInset = "calc(var(--dds-spacing-x0-125) * -1)";
4298
+ const focusVisible = {
4299
+ outline: "var(--dds-color-focus-outside) 2px solid",
4300
+ outlineOffset,
4301
+ boxShadow: "0 0 0 2px var(--dds-color-focus-inside)"
4302
+ };
4303
+ const focusVisibleTransitionValue = "outline-offset var(--dds-motion-micro-state)";
4304
+ const focusVisibleInset = {
4305
+ outline: "var(--dds-color-focus-outside) 2px solid",
4306
+ outlineOffset: outlineInset
4196
4307
  };
4197
- AccordionBody.displayName = "AccordionBody";
4198
- // src/components/BackLink/BackLink.module.css
4199
- var BackLink_module_default = { "icon": "dds-BackLink-module__icon" };
4200
- // src/components/BackLink/BackLink.tsx
4201
- const BackLink = ({ label, ref, as = "a", ...rest }) => {
4202
- const { t } = useTranslation();
4203
- return /* @__PURE__ */ jsx("nav", {
4204
- ref,
4205
- "aria-label": t(texts$30.goBack),
4206
- className: typographyStyles_module_default["body-short-medium"],
4207
- children: /* @__PURE__ */ jsxs(HStack, {
4208
- as,
4209
- className: cn(typographyStyles_module_default.a, _key1),
4210
- rel: "noopener noreferer",
4211
- ...rest,
4212
- children: [/* @__PURE__ */ jsx(Icon, {
4213
- icon: ArrowLeftIcon,
4214
- iconSize: "component",
4215
- className: cn(BackLink_module_default.icon)
4216
- }), label]
4217
- })
4218
- });
4308
+ const scrollbarStyling = {
4309
+ scrollbarColor: "var(--dds-color-surface-scrollbar) transparent",
4310
+ scrollbarWidth: "thin"
4219
4311
  };
4220
- BackLink.displayName = "BackLink";
4221
- const texts$30 = createTexts({ goBack: {
4222
- nb: "Gå tilbake",
4223
- no: "Gå tilbake",
4224
- nn: "Gå tilbake",
4225
- en: "Go back",
4226
- se: "Mana ruovttoluotta"
4227
- } });
4228
- // src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.module.css
4229
- var TextOverflowEllipsis_module_default = {
4230
- "wrapper": "dds-TextOverflowEllipsis-module__wrapper",
4231
- "inner": "dds-TextOverflowEllipsis-module__inner"
4312
+ /**
4313
+ * Generelle utils
4314
+ */
4315
+ const hideInput = {
4316
+ clip: "rect(0 0 0 0)",
4317
+ position: "absolute",
4318
+ height: "1px",
4319
+ width: "1px",
4320
+ margin: 0
4232
4321
  };
4233
- // src/components/Typography/Typography/TextOverflowEllipsis/TextOverflowEllipsis.tsx
4234
- function TextOverflowEllipsisWrapper({ className, ...rest }) {
4235
- return /* @__PURE__ */ jsx("span", {
4236
- ...rest,
4237
- className: cn(className, TextOverflowEllipsis_module_default.wrapper)
4238
- });
4239
- }
4240
- function TextOverflowEllipsisInner({ className, ...rest }) {
4241
- return /* @__PURE__ */ jsx("span", {
4242
- ...rest,
4243
- className: cn(className, TextOverflowEllipsis_module_default.inner)
4244
- });
4245
- }
4246
- // src/components/Typography/Typography/Typography.module.css
4247
- var Typography_module_default = { "container": "dds-Typography-module__container" };
4248
- // src/components/Typography/Typography/Typography.types.ts
4249
- const TG_BODY_SHORT_TYPES = [
4250
- "body-short-xsmall",
4251
- "body-short-small",
4252
- "body-short-medium",
4253
- "body-short-large"
4254
- ];
4255
- const TG_BODY_LONG_TYPES = [
4256
- "body-long-xsmall",
4257
- "body-long-small",
4258
- "body-long-medium",
4259
- "body-long-large"
4260
- ];
4261
- const TG_BODY_TYPES = [...TG_BODY_SHORT_TYPES, ...TG_BODY_LONG_TYPES];
4262
- const TG_LEAD_TYPES = ["lead-medium"];
4263
- const TG_HEADING_TYPES = [
4264
- "heading-xxsmall",
4265
- "heading-xsmall",
4266
- "heading-small",
4267
- "heading-medium",
4268
- "heading-large",
4269
- "heading-xlarge",
4270
- "heading-xxlarge"
4271
- ];
4272
- // src/components/Typography/Typography/Typography.utils.ts
4273
- const getElementType = (element) => {
4274
- switch (element) {
4275
- case "a": return "a";
4276
- case "heading-xxsmall": return "h6";
4277
- case "heading-xsmall": return "h5";
4278
- case "heading-small": return "h4";
4279
- case "heading-medium": return "h3";
4280
- case "heading-large": return "h2";
4281
- case "heading-xlarge":
4282
- case "heading-xxlarge": return "h1";
4283
- case "label-medium": return "label";
4284
- default: return "p";
4285
- }
4322
+ const inheritLinkStyling = {
4323
+ color: "inherit",
4324
+ textDecoration: "inherit"
4286
4325
  };
4287
- const isHeading = (type) => {
4288
- return TG_HEADING_TYPES.includes(type);
4326
+ const removeButtonStyling = {
4327
+ background: "none",
4328
+ color: "inherit",
4329
+ border: "none",
4330
+ padding: 0,
4331
+ font: "inherit",
4332
+ cursor: "pointer",
4333
+ outline: "inherit"
4289
4334
  };
4290
- const isLegend = (as) => {
4291
- return as === "legend";
4335
+ const removeListStyling = {
4336
+ listStyle: "none",
4337
+ padding: 0,
4338
+ margin: 0
4292
4339
  };
4293
- const isCaption = (as) => {
4294
- return as === "caption";
4340
+ const normalizeButton = {
4341
+ margin: 0,
4342
+ textTransform: "none"
4295
4343
  };
4296
- const inlineElements = [
4297
- "a",
4298
- "abbr",
4299
- "audio",
4300
- "b",
4301
- "bdi",
4302
- "bdo",
4303
- "big",
4304
- "br",
4305
- "button",
4306
- "canvas",
4307
- "cite",
4308
- "code",
4309
- "data",
4310
- "datalist",
4311
- "del",
4312
- "dfn",
4313
- "em",
4314
- "embed",
4315
- "i",
4316
- "iframe",
4317
- "img",
4318
- "input",
4319
- "ins",
4320
- "kbd",
4321
- "label",
4322
- "map",
4323
- "mark",
4324
- "meter",
4325
- "noscript",
4326
- "object",
4327
- "output",
4328
- "picture",
4329
- "progress",
4330
- "q",
4331
- "ruby",
4332
- "s",
4333
- "samp",
4334
- "script",
4335
- "select",
4336
- "slot",
4337
- "small",
4338
- "span",
4339
- "strong",
4340
- "sub",
4341
- "sup",
4342
- "svg",
4343
- "template",
4344
- "textarea",
4345
- "time",
4346
- "u",
4347
- "var",
4348
- "video",
4349
- "wbr"
4350
- ];
4351
- const isInlineElement = (as) => inlineElements.indexOf(as) !== -1;
4352
- const getColorCn = (color) => {
4353
- if (!isTextColor(color)) return null;
4354
- const [prefix] = color.split("-", 1);
4355
- return typographyStyles_module_default[`${prefix}-color--${color.slice(prefix.length + 1)}`] || null;
4344
+ // src/components/ThemeProvider/ThemeProvider.module.css
4345
+ var ThemeProvider_module_default = {
4346
+ "global-variables": "dds-ThemeProvider-module__global-variables",
4347
+ "global-styles": "dds-ThemeProvider-module__global-styles"
4356
4348
  };
4357
- // src/components/Typography/Typography/Typography.tsx
4358
- const isAnchorProps = (props) => props.typographyType === "a";
4359
- const Typography = (props) => {
4360
- const { typographyType = "body-long-medium", as: propAs, children, bold, underline, italic, style, id, withMargins, color, className, htmlProps = {}, ...rest } = props;
4361
- const as = propAs ? propAs : getElementType(typographyType);
4362
- let relProp;
4363
- if (isAnchorProps(props)) relProp = as === "a" ? "noopener noreferer" : void 0;
4364
- return /* @__PURE__ */ jsx(Box, {
4365
- ...getBaseHTMLProps(id, cn(className, getColorCn(color), Typography_module_default.container, typographyStyles_module_default[typographyType], withMargins && typographyStyles_module_default[`${typographyType}--margins`], isLegend(as) && typographyStyles_module_default.legend, isCaption(as) && typographyStyles_module_default.caption, isCaption(as) && withMargins && typographyStyles_module_default["caption--withMargins"], bold && typographyStyles_module_default.bold, underline && typographyStyles_module_default.underline, italic && typographyStyles_module_default.italic, as === "a" && "dds-focus-module__focusable"), {
4366
- ...style,
4367
- color: color && !isTextColor(color) ? getTextColor(color) : void 0
4368
- }, htmlProps, rest),
4369
- as,
4370
- rel: relProp,
4371
- children
4349
+ // src/components/ThemeProvider/ThemeProvider.tsx
4350
+ const defaultTheme = "core-light";
4351
+ const ddsThemes = Object.keys(ddsTokens);
4352
+ new Set(ddsThemes.map((theme) => theme.split("-")[0]));
4353
+ new Set(ddsThemes.map((theme) => theme.split("-")[1]));
4354
+ const ThemeContext = createContext(void 0);
4355
+ function ThemeProvider({ theme = defaultTheme, children }) {
4356
+ const themeRef = useRef(null);
4357
+ const [element, setElement] = useState(null);
4358
+ useEffect(() => {
4359
+ setElement(themeRef.current);
4360
+ }, []);
4361
+ return /* @__PURE__ */ jsx("div", {
4362
+ ref: themeRef,
4363
+ className: cn(`dds-${theme}`, ThemeProvider_module_default["global-variables"], ThemeProvider_module_default["global-styles"], "dds-themed"),
4364
+ children: /* @__PURE__ */ jsx(ThemeContext, {
4365
+ value: {
4366
+ theme,
4367
+ el: element
4368
+ },
4369
+ children
4370
+ })
4372
4371
  });
4373
- };
4374
- Typography.displayName = "Typography";
4375
- // src/components/Typography/Caption/Caption.tsx
4376
- const Caption = ({ typographyType = "heading-large", id, className, style, htmlProps, children, ...rest }) => {
4377
- return /* @__PURE__ */ jsx(Typography, {
4378
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
4379
- typographyType,
4380
- as: "caption",
4381
- children
4372
+ }
4373
+ /**
4374
+ * Hook for å hente gjeldende tema og temanavn. Brukes inni ThemeProvider.
4375
+ *
4376
+ * @returns tema med JS-konstanter og navnet på temaet.
4377
+ */
4378
+ function useTheme() {
4379
+ const themeName = useContext(ThemeContext)?.theme;
4380
+ if (!themeName) throw new Error("useTheme must be used inside a ThemeProvider or DdsProvider");
4381
+ return {
4382
+ theme: ddsTokens[themeName],
4383
+ themeName
4384
+ };
4385
+ }
4386
+ // src/DdsProvider/DdsProvider.tsx
4387
+ function DdsProvider({ language, theme, children }) {
4388
+ return /* @__PURE__ */ jsx(LanguageProvider, {
4389
+ language,
4390
+ children: /* @__PURE__ */ jsx(ThemeProvider, {
4391
+ theme,
4392
+ children
4393
+ })
4382
4394
  });
4395
+ }
4396
+ // src/components/Accordion/Accordion.module.css
4397
+ var Accordion_module_default = {
4398
+ "container": "dds-Accordion-module__container",
4399
+ "header-button": "dds-Accordion-module__header-button",
4400
+ "chevron": "dds-Accordion-module__chevron"
4383
4401
  };
4384
- Caption.displayName = "Caption";
4385
- // src/components/Typography/Heading/Heading.tsx
4386
- const getHeadingElement = (level) => `h${level}`;
4387
- const getDefaultTypographyType = (h) => {
4388
- switch (h) {
4389
- case "h1": return "heading-xlarge";
4390
- case "h2": return "heading-large";
4391
- case "h3": return "heading-medium";
4392
- case "h4": return "heading-small";
4393
- case "h5": return "heading-xsmall";
4394
- case "h6": return "heading-xxsmall";
4395
- default: return "heading-xlarge";
4396
- }
4397
- };
4398
- const Heading = ({ id, className, style, htmlProps, children, typographyType, level, withMargins, withMarginsOverInput, ...rest }) => {
4399
- const headingElement = getHeadingElement(level);
4400
- const standardTypographyType = typographyType ?? getDefaultTypographyType(headingElement);
4401
- return /* @__PURE__ */ jsx(Typography, {
4402
- ...getBaseHTMLProps(id, cn(className, withMarginsOverInput && typographyStyles_module_default["heading--margins-over-input"]), style, htmlProps, rest),
4403
- typographyType: standardTypographyType,
4404
- as: headingElement,
4405
- withMargins: optAttr(withMargins || withMarginsOverInput),
4406
- children
4402
+ // src/components/Accordion/Accordion.tsx
4403
+ const Accordion = ({ isInitiallyExpanded = false, isExpanded, onChange, id, children, className, style, htmlProps, ...rest }) => {
4404
+ const { id: accordionId, isExpanded: expanded, toggleExpanded, bodyContentRef, headerProps, bodyProps } = useAccordion({
4405
+ isInitiallyExpanded,
4406
+ isExpanded,
4407
+ onChange,
4408
+ id
4407
4409
  });
4408
- };
4409
- Heading.displayName = "Heading";
4410
- // src/components/Typography/Label/Label.module.css
4411
- var Label_module_default = {
4412
- "read-only": "dds-Label-module__read-only",
4413
- "read-only__icon": "dds-Label-module__read-only__icon"
4414
- };
4415
- // src/components/Typography/Label/Label.tsx
4416
- const Label = ({ showRequiredStyling, readOnly, id, className, style, htmlProps, children, afterLabelContent, ...rest }) => {
4417
- const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [
4418
- readOnly && /* @__PURE__ */ jsx(Icon, {
4419
- icon: LockFilledIcon,
4420
- iconSize: "4",
4421
- className: Label_module_default["read-only__icon"]
4422
- }),
4423
- children,
4424
- showRequiredStyling && /* @__PURE__ */ jsx(RequiredMarker, {})
4425
- ] });
4426
- const labelProps = { ...getBaseHTMLProps(id, cn(className, readOnly && Label_module_default["read-only"]), style, htmlProps, rest) };
4427
- return afterLabelContent ? /* @__PURE__ */ jsxs(Typography, {
4428
- typographyType: "label-medium",
4429
- as: "div",
4430
- withMargins: rest.withMargins,
4431
- children: [/* @__PURE__ */ jsx(Typography, {
4432
- ...labelProps,
4433
- typographyType: "label-medium",
4434
- withMargins: false,
4435
- children: content
4436
- }), afterLabelContent]
4437
- }) : /* @__PURE__ */ jsx(Typography, {
4438
- ...labelProps,
4439
- typographyType: "label-medium",
4440
- children: content
4410
+ return /* @__PURE__ */ jsx("div", {
4411
+ ...getBaseHTMLProps(accordionId, cn(className, Accordion_module_default.container), style, htmlProps, rest),
4412
+ children: /* @__PURE__ */ jsx(AccordionContextProvider, {
4413
+ headerProps,
4414
+ bodyProps,
4415
+ isExpanded: expanded,
4416
+ toggleExpanded,
4417
+ bodyContentRef,
4418
+ children
4419
+ })
4441
4420
  });
4442
4421
  };
4443
- Label.displayName = "Label";
4444
- // src/components/Typography/Legend/Legend.tsx
4445
- const Legend = ({ id, className, style, htmlProps, typographyType = "heading-large", withMarginsOverInput, withMargins, ...rest }) => {
4446
- return /* @__PURE__ */ jsx(Typography, {
4447
- ...getBaseHTMLProps(id, cn(className, withMarginsOverInput && typographyStyles_module_default["legend--margins-over-input"]), style, htmlProps, rest),
4448
- as: "legend",
4449
- typographyType,
4450
- withMargins: optAttr(withMargins || withMarginsOverInput)
4422
+ Accordion.displayName = "Accordion";
4423
+ // src/components/Accordion/AccordionHeader.tsx
4424
+ const AccordionHeader = ({ children, className, style, htmlProps, typographyType = "heading-medium", bold, ...rest }) => {
4425
+ const { isExpanded, headerProps } = useAccordionContext();
4426
+ const { id, ...restHeaderProps } = headerProps ?? {};
4427
+ const iconState = isExpanded ? "up" : "down";
4428
+ return /* @__PURE__ */ jsx(Box, {
4429
+ as: StylelessButton,
4430
+ padding: "x1 x1.5 x1 x1",
4431
+ ...getBaseHTMLProps(id, cn(className, Accordion_module_default["header-button"], AccordionBase_module_default["header-button"], _key1), style, htmlProps, rest),
4432
+ ...restHeaderProps,
4433
+ children: /* @__PURE__ */ jsxs("div", {
4434
+ className: cn(AccordionBase_module_default.header__content, typographyStyles_module_default[typographyType], bold && typographyStyles_module_default.bold),
4435
+ children: [/* @__PURE__ */ jsx(Icon, {
4436
+ icon: AnimatedChevronUpDownIcon,
4437
+ iconSize: "component",
4438
+ className: Accordion_module_default.chevron,
4439
+ iconState
4440
+ }), children]
4441
+ })
4451
4442
  });
4452
4443
  };
4453
- Legend.displayName = "Legend";
4454
- // src/components/Typography/Link/Link.tsx
4455
- const Link = ({ id, className, htmlProps, children, typographyType, withMargins, withVisited, style, color, as: propAs, isAnchor: propIsAnchor, withIconStyling, ...rest }) => {
4456
- const as = propAs ? propAs : "a";
4457
- const aProps = as === "a" || propIsAnchor ? { rel: "noopener noreferrer" } : {};
4458
- return /* @__PURE__ */ jsx(ElementAs, {
4459
- as,
4460
- ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default.a, withIconStyling && typographyStyles_module_default["a--with-icon"], withVisited && typographyStyles_module_default["a--visited"], typographyType && typographyStyles_module_default[typographyType], typographyType && withMargins && typographyStyles_module_default[`${typographyType}--margins`], _key1, getColorCn(color)), {
4461
- ...style,
4462
- color: color && !isTextColor(color) ? getTextColor(color) : void 0
4463
- }, htmlProps, rest),
4464
- ...aProps,
4465
- children
4444
+ AccordionHeader.displayName = "AccordionHeader";
4445
+ // src/components/Accordion/AccordionBody.tsx
4446
+ const AccordionBody = ({ children, className, style, htmlProps, ...rest }) => {
4447
+ const { bodyContentRef, bodyProps } = useAccordionContext();
4448
+ const { className: bodyContextCn, id, height, ...restBodyProps } = bodyProps ?? {};
4449
+ return /* @__PURE__ */ jsx(Box, {
4450
+ height: `${height}px`,
4451
+ ...getBaseHTMLProps(id, cn(className, bodyContextCn), style, htmlProps, rest),
4452
+ ...restBodyProps,
4453
+ children: /* @__PURE__ */ jsx(Box, {
4454
+ ref: bodyContentRef,
4455
+ padding: "x0.5 x1.5 x2 x1",
4456
+ children
4457
+ })
4466
4458
  });
4467
4459
  };
4468
- Link.displayName = "Link";
4469
- [...TG_BODY_TYPES, ...TG_LEAD_TYPES];
4470
- const Paragraph = ({ id, className, style, htmlProps, children, typographyType = "body-long-medium", ...rest }) => {
4471
- return /* @__PURE__ */ jsx(Typography, {
4472
- ...getBaseHTMLProps(id, className, style, htmlProps, rest),
4473
- typographyType,
4474
- children
4460
+ AccordionBody.displayName = "AccordionBody";
4461
+ // src/components/BackLink/BackLink.module.css
4462
+ var BackLink_module_default = { "icon": "dds-BackLink-module__icon" };
4463
+ // src/components/BackLink/BackLink.tsx
4464
+ const BackLink = ({ label, ref, as = "a", ...rest }) => {
4465
+ const { t } = useTranslation();
4466
+ return /* @__PURE__ */ jsx("nav", {
4467
+ ref,
4468
+ "aria-label": t(texts$30.goBack),
4469
+ className: typographyStyles_module_default["body-short-medium"],
4470
+ children: /* @__PURE__ */ jsxs(HStack, {
4471
+ as,
4472
+ className: cn(typographyStyles_module_default.a, _key1),
4473
+ rel: "noopener noreferer",
4474
+ ...rest,
4475
+ children: [/* @__PURE__ */ jsx(Icon, {
4476
+ icon: ArrowLeftIcon,
4477
+ iconSize: "component",
4478
+ className: cn(BackLink_module_default.icon)
4479
+ }), label]
4480
+ })
4475
4481
  });
4476
4482
  };
4477
- Paragraph.displayName = "Paragraph";
4483
+ BackLink.displayName = "BackLink";
4484
+ const texts$30 = createTexts({ goBack: {
4485
+ nb: "Gå tilbake",
4486
+ no: "Gå tilbake",
4487
+ nn: "Gå tilbake",
4488
+ en: "Go back",
4489
+ se: "Mana ruovttoluotta"
4490
+ } });
4478
4491
  // src/components/Breadcrumbs/Breadcrumb.tsx
4479
4492
  const isAnchorTypographyProps = (props) => {
4480
4493
  return props.href != void 0;
@@ -4493,8 +4506,14 @@ const Breadcrumb = ({ children, ref, ...rest }) => {
4493
4506
  });
4494
4507
  };
4495
4508
  Breadcrumb.displayName = "Breadcrumb";
4496
- // src/components/Breadcrumbs/Breadcrumbs.module.css
4497
- var Breadcrumbs_module_default = { "icon": "dds-Breadcrumbs-module__icon" };
4509
+ // src/components/ButtonGroup/ButtonGroup.context.tsx
4510
+ const ButtonGroupContext = createContext({});
4511
+ const useButtonGroupContext = () => useContext(ButtonGroupContext);
4512
+ // src/components/helpers/styling/common.module.css
4513
+ var common_module_default = {
4514
+ "badge--on-corner": "dds-common-module__badge--on-corner",
4515
+ "button": "dds-common-module__button"
4516
+ };
4498
4517
  // src/components/Button/Button.module.css
4499
4518
  var Button_module_default = {
4500
4519
  "button": "dds-Button-module__button",
@@ -4519,14 +4538,6 @@ var Button_module_default = {
4519
4538
  "button--primary-danger": "dds-Button-module__button--primary-danger",
4520
4539
  "button--secondary-danger": "dds-Button-module__button--secondary-danger"
4521
4540
  };
4522
- // src/components/ButtonGroup/ButtonGroup.context.tsx
4523
- const ButtonGroupContext = createContext({});
4524
- const useButtonGroupContext = () => useContext(ButtonGroupContext);
4525
- // src/components/helpers/styling/common.module.css
4526
- var common_module_default = {
4527
- "badge--on-corner": "dds-common-module__badge--on-corner",
4528
- "button": "dds-common-module__button"
4529
- };
4530
4541
  // src/components/Button/Button.tsx
4531
4542
  const Button = ({ as: propAs, children, purpose = "primary", size: propSize = "medium", iconPosition = "left", loading, loadingTooltip, fullWidth = false, icon, iconState, onClick, onFocus, onBlur, badgeProps, id, ref, className, style, htmlProps, ...props }) => {
4532
4543
  const { purpose: groupPurpose, size: groupSize } = useButtonGroupContext();
@@ -4716,6 +4727,14 @@ const OverflowMenuLink = ({ onClick, ref, ...rest }) => {
4716
4727
  }) });
4717
4728
  };
4718
4729
  OverflowMenuLink.displayName = "OverflowMenuLink";
4730
+ // src/components/VisuallyHidden/VisuallyHidden.tsx
4731
+ const VisuallyHidden = ({ id, as: asProp, className, style, htmlProps, ...rest }) => {
4732
+ return /* @__PURE__ */ jsx(ElementAs, {
4733
+ as: asProp ?? "span",
4734
+ ...getBaseHTMLProps(id, cn(className, utilStyles_module_default["visually-hidden"]), style, htmlProps, rest)
4735
+ });
4736
+ };
4737
+ VisuallyHidden.displayName = "VisuallyHidden";
4719
4738
  // src/components/Toggle/Toggle.module.css
4720
4739
  var Toggle_module_default = {
4721
4740
  "label": "dds-Toggle-module__label",
@@ -4731,14 +4750,6 @@ var Toggle_module_default = {
4731
4750
  "label--disabled": "dds-Toggle-module__label--disabled",
4732
4751
  "label--read-only": "dds-Toggle-module__label--read-only"
4733
4752
  };
4734
- // src/components/VisuallyHidden/VisuallyHidden.tsx
4735
- const VisuallyHidden = ({ id, as: asProp, className, style, htmlProps, ...rest }) => {
4736
- return /* @__PURE__ */ jsx(ElementAs, {
4737
- as: asProp ?? "span",
4738
- ...getBaseHTMLProps(id, cn(className, utilStyles_module_default["visually-hidden"]), style, htmlProps, rest)
4739
- });
4740
- };
4741
- VisuallyHidden.displayName = "VisuallyHidden";
4742
4753
  const Toggle = ({ id, children, size = "medium", checked: checkedProp, defaultChecked, onChange, disabled, readOnly, isLoading, className, style, htmlProps = {}, ...rest }) => {
4743
4754
  const { t } = useTranslation();
4744
4755
  const generatedId = useId();
@@ -4914,6 +4925,8 @@ const OverflowMenuGroup = ({ children, onClose, onOpen, setIsOpen: propSetIsOpen
4914
4925
  });
4915
4926
  };
4916
4927
  OverflowMenuGroup.displayName = "OverflowMenuGroup";
4928
+ // src/components/Breadcrumbs/Breadcrumbs.module.css
4929
+ var Breadcrumbs_module_default = { "icon": "dds-Breadcrumbs-module__icon" };
4917
4930
  // src/components/Breadcrumbs/Breadcrumbs.tsx
4918
4931
  const Breadcrumbs = ({ children, smallScreenBreakpoint, id, className, style, htmlProps, ...rest }) => {
4919
4932
  const chevronIcon = /* @__PURE__ */ jsx(Icon, {
@@ -5129,14 +5142,6 @@ const CardExpandableBody = ({ children, className, style, htmlProps, padding, ..
5129
5142
  });
5130
5143
  };
5131
5144
  CardExpandableBody.displayName = "CardExpandableBody";
5132
- // src/components/Card/CardSelectionControl/CardSelectable.context.tsx
5133
- const CardSelectableContext = createContext({});
5134
- const useCardSelectableContext = () => useContext(CardSelectableContext);
5135
- // src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
5136
- const CheckboxGroupContext = createContext(null);
5137
- const useCheckboxGroup = () => {
5138
- return useContext(CheckboxGroupContext);
5139
- };
5140
5145
  // src/components/SelectionControl/SelectionControl.module.css
5141
5146
  var SelectionControl_module_default = {
5142
5147
  "container": "dds-SelectionControl-module__container",
@@ -5194,6 +5199,11 @@ const renderGroupLabel = ({ id, showRequiredStyling, readOnly, label }) => {
5194
5199
  });
5195
5200
  else return null;
5196
5201
  };
5202
+ // src/components/SelectionControl/Checkbox/CheckboxGroupContext.tsx
5203
+ const CheckboxGroupContext = createContext(null);
5204
+ const useCheckboxGroup = () => {
5205
+ return useContext(CheckboxGroupContext);
5206
+ };
5197
5207
  // src/components/SelectionControl/Checkbox/Checkbox.tsx
5198
5208
  const Checkbox = ({ id, name, label, error = false, disabled, readOnly, indeterminate, "aria-describedby": ariaDescribedby, className, htmlProps = {}, style, children, size, ...rest }) => {
5199
5209
  const generatedId = useId();
@@ -5478,6 +5488,9 @@ const RadioButtonGroup = ({ name, label, groupId, errorMessage, tip, disabled =
5478
5488
  });
5479
5489
  };
5480
5490
  RadioButtonGroup.displayName = "RadioButtonGroup";
5491
+ // src/components/Card/CardSelectionControl/CardSelectable.context.tsx
5492
+ const CardSelectableContext = createContext({});
5493
+ const useCardSelectableContext = () => useContext(CardSelectableContext);
5481
5494
  // src/components/Card/CardSelectionControl/CardSelectable.tsx
5482
5495
  const CardSelectable = (props) => {
5483
5496
  const { appearance = "filled", cardType: cardTypeProp, id, padding, controlPlacementProps = {}, "aria-describedby": ariaDescribedby, className, htmlProps, style, ...rest } = props;
@@ -5573,14 +5586,6 @@ const CardSelectableGroup = ({ name, cardType, errorMessage, disabled, readOnly,
5573
5586
  })] }) : mainContent;
5574
5587
  };
5575
5588
  CardSelectableGroup.displayName = "CardSelectableGroup";
5576
- // src/components/Chip/Chip.module.css
5577
- var Chip_module_default = {
5578
- "container": "dds-Chip-module__container",
5579
- "selection-control": "dds-Chip-module__selection-control",
5580
- "removable": "dds-Chip-module__removable",
5581
- "selection-control-spacing": "dds-Chip-module__selection-control-spacing",
5582
- "selection-control--no-indicator": "dds-Chip-module__selection-control--no-indicator"
5583
- };
5584
5589
  // src/components/helpers/Input/Input.module.css
5585
5590
  var Input_module_default = {
5586
5591
  "container": "dds-Input-module__container",
@@ -5631,6 +5636,25 @@ var Input_module_default = {
5631
5636
  "input-group__absolute-el--small": "dds-Input-module__input-group__absolute-el--small",
5632
5637
  "input-group__absolute-el--xsmall": "dds-Input-module__input-group__absolute-el--xsmall"
5633
5638
  };
5639
+ // src/components/InlineButton/InlineButton.module.css
5640
+ var InlineButton_module_default = { "button": "dds-InlineButton-module__button" };
5641
+ // src/components/InlineButton/InlineButton.tsx
5642
+ const InlineButton = ({ className, color, icon, children, ...rest }) => /* @__PURE__ */ jsx(StylelessButton, {
5643
+ className: cn(className, focus_module_default.focusable, typographyStyles_module_default.a, InlineButton_module_default.button, getColorCn(color)),
5644
+ ...rest,
5645
+ children: icon ? /* @__PURE__ */ jsx(Icon, {
5646
+ icon,
5647
+ iconSize: "component"
5648
+ }) : children
5649
+ });
5650
+ // src/components/Chip/Chip.module.css
5651
+ var Chip_module_default = {
5652
+ "container": "dds-Chip-module__container",
5653
+ "selection-control": "dds-Chip-module__selection-control",
5654
+ "removable": "dds-Chip-module__removable",
5655
+ "selection-control-spacing": "dds-Chip-module__selection-control-spacing",
5656
+ "selection-control--no-indicator": "dds-Chip-module__selection-control--no-indicator"
5657
+ };
5634
5658
  const ChipBase = ({ htmlProps, size = "medium", id, className, style, children, icon, ...rest }) => {
5635
5659
  const hasIcon = !!icon;
5636
5660
  return /* @__PURE__ */ jsxs(Paper, {
@@ -5887,94 +5911,6 @@ var DateInput_module_default = {
5887
5911
  "calendar__cell-button--selected": "dds-DateInput-module__calendar__cell-button--selected",
5888
5912
  "calendar__cell-button--unavailable--today": "dds-DateInput-module__calendar__cell-button--unavailable--today"
5889
5913
  };
5890
- // src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
5891
- function CalendarCell({ ...props }) {
5892
- return /* @__PURE__ */ jsx(Box, {
5893
- textAlign: "center",
5894
- className: cn(typographyStyles_module_default["text-color--subtle"], DateInput_module_default.calendar__th),
5895
- ...props
5896
- });
5897
- }
5898
- CalendarCell.displayName = "CalendarCell";
5899
- // src/components/date-inputs/DatePicker/constants.ts
5900
- const LOCALE = {
5901
- nb: "nb-NO",
5902
- no: "no-NO",
5903
- nn: "nn-NO",
5904
- en: "en-GB",
5905
- se: "se-NO"
5906
- };
5907
- // src/components/date-inputs/DatePicker/Calendar/CalendarDate.tsx
5908
- function CalendarDate$1({ date, state, onClose }) {
5909
- const ref = useRef(null);
5910
- const { buttonProps, cellProps, isOutsideVisibleRange, formattedDate, isSelected, isDisabled, isUnavailable } = useCalendarCell({ date }, state, ref);
5911
- if (isOutsideVisibleRange) return /* @__PURE__ */ jsx("td", { ...cellProps });
5912
- const closeOnKeyboardBlurForward = (event) => {
5913
- if (event.key === "Tab" && event.shiftKey === false) onClose();
5914
- };
5915
- const isEffectivelyUnavailable = isUnavailable || isDisabled;
5916
- const isUnavailableToday = isEffectivelyUnavailable && isToday(date, "Europe/Oslo");
5917
- return /* @__PURE__ */ jsx("td", {
5918
- ...cellProps,
5919
- children: /* @__PURE__ */ jsx(Box, {
5920
- ...buttonProps,
5921
- as: "button",
5922
- type: "button",
5923
- ref,
5924
- onKeyDown: closeOnKeyboardBlurForward,
5925
- height: "100%",
5926
- width: "100%",
5927
- display: "flex",
5928
- alignItems: "center",
5929
- justifyContent: "center",
5930
- className: cn(DateInput_module_default["calendar__cell-button"], isToday(date, "Europe/Oslo") && DateInput_module_default["calendar__cell-button--today"], DateInput_module_default[`calendar__cell-button--default`], isSelected && DateInput_module_default[`calendar__cell-button--selected`], isEffectivelyUnavailable && DateInput_module_default[`calendar__cell-button--unavailable`], isUnavailableToday && DateInput_module_default["calendar__cell-button--unavailable--today"], typographyStyles_module_default["body-short-small"], _key1),
5931
- children: formattedDate
5932
- })
5933
- });
5934
- }
5935
- CalendarDate$1.displayName = "CalendarDate";
5936
- // src/components/date-inputs/utils/getWeekNumber.ts
5937
- /**
5938
- * Calculates the week number following the ISO-8601 format.
5939
- * @returns week number, 1 indexed
5940
- */
5941
- function getWeekNumber(date) {
5942
- const dayOfWeek = getDayOfWeek(date);
5943
- const dayOfYear = getDayOfYear(date);
5944
- const jan1DayOfWeek = getDayOfWeek(startOfYear(date));
5945
- if (dayOfYear <= 8 - jan1DayOfWeek && jan1DayOfWeek > 4) {
5946
- if (jan1DayOfWeek === 5 || jan1DayOfWeek === 6 && isLeapYear(date.subtract({ years: 1 }))) return 53;
5947
- return 52;
5948
- }
5949
- if (getDayOfYear(endOfYear(date)) - dayOfYear < 4 - dayOfWeek) return 1;
5950
- const weekNum = (dayOfYear + (7 - dayOfWeek) + (jan1DayOfWeek - 1)) / 7;
5951
- if (jan1DayOfWeek > 4) return weekNum - 1;
5952
- return weekNum;
5953
- }
5954
- /**
5955
- * Mon = 1
5956
- * Tue = 2
5957
- * Wed = 3
5958
- * Thu = 4
5959
- * Fri = 5
5960
- * Sat = 6
5961
- * Sun = 7
5962
- * @returns day of week, 1 indexed
5963
- */
5964
- function getDayOfWeek(date) {
5965
- const weekStart = startOfWeek(date, "no-NO");
5966
- return date.calendar.toJulianDay(date) - weekStart.calendar.toJulianDay(weekStart) + 1;
5967
- }
5968
- /**
5969
- * @returns day of year, 1 indexed
5970
- */
5971
- function getDayOfYear(date) {
5972
- const yearStart = startOfYear(date);
5973
- return date.calendar.toJulianDay(date) - yearStart.calendar.toJulianDay(yearStart) + 1;
5974
- }
5975
- function isLeapYear(date) {
5976
- return date.year % 4 === 0 && date.year % 100 !== 0 || date.year % 400 === 0;
5977
- }
5978
5914
  // src/components/date-inputs/DatePicker/CalendarPopover.tsx
5979
5915
  const CalendarPopoverContext = createContext({
5980
5916
  anchorRef: null,
@@ -6075,6 +6011,94 @@ const CalendarPopoverContent = ({ children, className, smallScreenBreakpoint })
6075
6011
  children
6076
6012
  })] });
6077
6013
  };
6014
+ // src/components/date-inputs/utils/getWeekNumber.ts
6015
+ /**
6016
+ * Calculates the week number following the ISO-8601 format.
6017
+ * @returns week number, 1 indexed
6018
+ */
6019
+ function getWeekNumber(date) {
6020
+ const dayOfWeek = getDayOfWeek(date);
6021
+ const dayOfYear = getDayOfYear(date);
6022
+ const jan1DayOfWeek = getDayOfWeek(startOfYear(date));
6023
+ if (dayOfYear <= 8 - jan1DayOfWeek && jan1DayOfWeek > 4) {
6024
+ if (jan1DayOfWeek === 5 || jan1DayOfWeek === 6 && isLeapYear(date.subtract({ years: 1 }))) return 53;
6025
+ return 52;
6026
+ }
6027
+ if (getDayOfYear(endOfYear(date)) - dayOfYear < 4 - dayOfWeek) return 1;
6028
+ const weekNum = (dayOfYear + (7 - dayOfWeek) + (jan1DayOfWeek - 1)) / 7;
6029
+ if (jan1DayOfWeek > 4) return weekNum - 1;
6030
+ return weekNum;
6031
+ }
6032
+ /**
6033
+ * Mon = 1
6034
+ * Tue = 2
6035
+ * Wed = 3
6036
+ * Thu = 4
6037
+ * Fri = 5
6038
+ * Sat = 6
6039
+ * Sun = 7
6040
+ * @returns day of week, 1 indexed
6041
+ */
6042
+ function getDayOfWeek(date) {
6043
+ const weekStart = startOfWeek(date, "no-NO");
6044
+ return date.calendar.toJulianDay(date) - weekStart.calendar.toJulianDay(weekStart) + 1;
6045
+ }
6046
+ /**
6047
+ * @returns day of year, 1 indexed
6048
+ */
6049
+ function getDayOfYear(date) {
6050
+ const yearStart = startOfYear(date);
6051
+ return date.calendar.toJulianDay(date) - yearStart.calendar.toJulianDay(yearStart) + 1;
6052
+ }
6053
+ function isLeapYear(date) {
6054
+ return date.year % 4 === 0 && date.year % 100 !== 0 || date.year % 400 === 0;
6055
+ }
6056
+ // src/components/date-inputs/DatePicker/Calendar/CalendarCell.tsx
6057
+ function CalendarCell({ ...props }) {
6058
+ return /* @__PURE__ */ jsx(Box, {
6059
+ textAlign: "center",
6060
+ className: cn(typographyStyles_module_default["text-color--subtle"], DateInput_module_default.calendar__th),
6061
+ ...props
6062
+ });
6063
+ }
6064
+ CalendarCell.displayName = "CalendarCell";
6065
+ // src/components/date-inputs/DatePicker/constants.ts
6066
+ const LOCALE = {
6067
+ nb: "nb-NO",
6068
+ no: "no-NO",
6069
+ nn: "nn-NO",
6070
+ en: "en-GB",
6071
+ se: "se-NO"
6072
+ };
6073
+ // src/components/date-inputs/DatePicker/Calendar/CalendarDate.tsx
6074
+ function CalendarDate$1({ date, state, onClose }) {
6075
+ const ref = useRef(null);
6076
+ const { buttonProps, cellProps, isOutsideVisibleRange, formattedDate, isSelected, isDisabled, isUnavailable } = useCalendarCell({ date }, state, ref);
6077
+ if (isOutsideVisibleRange) return /* @__PURE__ */ jsx("td", { ...cellProps });
6078
+ const closeOnKeyboardBlurForward = (event) => {
6079
+ if (event.key === "Tab" && event.shiftKey === false) onClose();
6080
+ };
6081
+ const isEffectivelyUnavailable = isUnavailable || isDisabled;
6082
+ const isUnavailableToday = isEffectivelyUnavailable && isToday(date, "Europe/Oslo");
6083
+ return /* @__PURE__ */ jsx("td", {
6084
+ ...cellProps,
6085
+ children: /* @__PURE__ */ jsx(Box, {
6086
+ ...buttonProps,
6087
+ as: "button",
6088
+ type: "button",
6089
+ ref,
6090
+ onKeyDown: closeOnKeyboardBlurForward,
6091
+ height: "100%",
6092
+ width: "100%",
6093
+ display: "flex",
6094
+ alignItems: "center",
6095
+ justifyContent: "center",
6096
+ className: cn(DateInput_module_default["calendar__cell-button"], isToday(date, "Europe/Oslo") && DateInput_module_default["calendar__cell-button--today"], DateInput_module_default[`calendar__cell-button--default`], isSelected && DateInput_module_default[`calendar__cell-button--selected`], isEffectivelyUnavailable && DateInput_module_default[`calendar__cell-button--unavailable`], isUnavailableToday && DateInput_module_default["calendar__cell-button--unavailable--today"], typographyStyles_module_default["body-short-small"], _key1),
6097
+ children: formattedDate
6098
+ })
6099
+ });
6100
+ }
6101
+ CalendarDate$1.displayName = "CalendarDate";
6078
6102
  // src/components/date-inputs/DatePicker/Calendar/CalendarGrid.tsx
6079
6103
  function CalendarGrid({ state, ...props }) {
6080
6104
  const { t } = useTranslation();
@@ -6321,23 +6345,128 @@ function Calendar(props) {
6321
6345
  }), /* @__PURE__ */ jsx(CalendarGrid, { state })]
6322
6346
  });
6323
6347
  }
6324
- Calendar.displayName = "Calendar";
6325
- const texts$24 = createTexts({
6326
- nextMonth: {
6327
- nb: "Neste måned",
6328
- no: "Neste måned",
6329
- nn: "Neste månad",
6330
- en: "Next month",
6331
- se: "Boahte mánu"
6332
- },
6333
- previousMonth: {
6334
- nb: "Forrige måned",
6335
- no: "Forrige måned",
6336
- nn: "Førre månad",
6337
- en: "Previous month",
6338
- se: "Ovddit mánu"
6339
- }
6340
- });
6348
+ Calendar.displayName = "Calendar";
6349
+ const texts$24 = createTexts({
6350
+ nextMonth: {
6351
+ nb: "Neste måned",
6352
+ no: "Neste måned",
6353
+ nn: "Neste månad",
6354
+ en: "Next month",
6355
+ se: "Boahte mánu"
6356
+ },
6357
+ previousMonth: {
6358
+ nb: "Forrige måned",
6359
+ no: "Forrige måned",
6360
+ nn: "Førre månad",
6361
+ en: "Previous month",
6362
+ se: "Ovddit mánu"
6363
+ }
6364
+ });
6365
+ // src/components/date-inputs/utils/useFocusManagerRef.ts
6366
+ function useFocusManagerRef(ref) {
6367
+ const domRef = useRef(null);
6368
+ useImperativeHandle(ref, () => ({
6369
+ ...createDOMRef(domRef),
6370
+ focus() {
6371
+ createFocusManager(domRef).focusFirst({ tabbable: true });
6372
+ }
6373
+ }));
6374
+ return domRef;
6375
+ }
6376
+ function createDOMRef(ref) {
6377
+ return { UNSAFE_getDOMNode() {
6378
+ return ref.current;
6379
+ } };
6380
+ }
6381
+ // src/components/helpers/ClearButton/ClearButton.tsx
6382
+ const ClearButton = ({ className, absolute = true, hasIconToRight, size = "medium", ...rest }) => /* @__PURE__ */ jsx(Box, {
6383
+ as: Button,
6384
+ className: cn(className, Button_module_default.clear, absolute && utilStyles_module_default["center-absolute-y"], absolute && !hasIconToRight && Input_module_default[`input-group__btn-right`], absolute && hasIconToRight && Input_module_default[`input-group__btn-right-with-right-icon--${size}`]),
6385
+ icon: CloseSmallIcon,
6386
+ purpose: "tertiary",
6387
+ type: "button",
6388
+ size,
6389
+ ...rest
6390
+ });
6391
+ ClearButton.displayName = "ClearButton";
6392
+ // src/components/helpers/Input/Input.tsx
6393
+ const Input$1 = ({ className, ...rest }) => /* @__PURE__ */ jsx("input", {
6394
+ className: cn(className, Input_module_default.input, _key1),
6395
+ ...rest
6396
+ });
6397
+ Input$1.displayName = "Input";
6398
+ const StatefulInput = ({ className, componentSize = "medium", hasErrorMessage, ...rest }) => /* @__PURE__ */ jsx(Input$1, {
6399
+ className: cn(className, Input_module_default["input--stateful"], Input_module_default[`input--${componentSize}`], typographyStyles_module_default[`body-short-${componentSize}`], hasErrorMessage && Input_module_default["input--stateful-danger"]),
6400
+ ...rest
6401
+ });
6402
+ StatefulInput.displayName = "StatefulInput";
6403
+ // src/components/helpers/Input/Input.utils.tsx
6404
+ function getDefaultText(value, defaultValue) {
6405
+ if (typeof value === "string") return value;
6406
+ if (typeof defaultValue === "string") return defaultValue;
6407
+ return "";
6408
+ }
6409
+ function getInputWidth(width, defaultW) {
6410
+ const fallback = defaultW ? defaultW : "var(--dds-input-default-width)";
6411
+ if (isBreakpointObject(width)) return BREAKPOINTS.reduce((acc, bp) => {
6412
+ return {
6413
+ ...acc,
6414
+ [bp]: bp in width ? width[bp] : fallback
6415
+ };
6416
+ }, {});
6417
+ return width ?? fallback;
6418
+ }
6419
+ // src/components/Typography/Label/Label.utils.tsx
6420
+ function renderLabel(props) {
6421
+ const { label, ...rest } = props;
6422
+ if (!!label) return /* @__PURE__ */ jsx(Label, {
6423
+ ...rest,
6424
+ withMargins: true,
6425
+ children: label
6426
+ });
6427
+ return null;
6428
+ }
6429
+ // src/components/date-inputs/common/DateInput.tsx
6430
+ function DateInput({ errorMessage, tip, componentSize = "medium", style, className, disabled, active, internalRef, readOnly, required, children, prefix: button, suffix: suffixEl, labelProps, fieldProps, groupProps, width, clearable, ref, afterLabelContent, tipId, errorMessageId, ...props }) {
6431
+ const hasErrorMessage = !!errorMessage;
6432
+ const { isOpen } = useContext(CalendarPopoverContext);
6433
+ return /* @__PURE__ */ jsxs("div", {
6434
+ ...groupProps,
6435
+ className: cn(className, Input_module_default.container, DateInput_module_default["date-group"]),
6436
+ ref,
6437
+ children: [
6438
+ renderLabel({
6439
+ ...labelProps,
6440
+ label: props.label,
6441
+ showRequiredStyling: required,
6442
+ readOnly,
6443
+ afterLabelContent
6444
+ }),
6445
+ /* @__PURE__ */ jsxs(Box, {
6446
+ style,
6447
+ width: getInputWidth(width, "fit-content"),
6448
+ className: cn(Input_module_default["input-group"], typographyStyles_module_default[`body-short-${componentSize}`], DateInput_module_default["input-group"]),
6449
+ children: [
6450
+ button,
6451
+ /* @__PURE__ */ jsx(HStack, {
6452
+ ...fieldProps,
6453
+ ref: internalRef,
6454
+ className: cn(Input_module_default.input, Input_module_default[`input--${componentSize}`], Input_module_default["input--stateful"], Input_module_default["input--hover"], hasErrorMessage && Input_module_default["input--stateful-danger"], clearable && Input_module_default[`input-with-btn-right--${componentSize}`], DateInput_module_default["date-segment-container"], Input_module_default[`input-with-icon--${componentSize}`], isOpen && focus_module_default.focused, disabled && "disabled", disabled && Input_module_default.disabled, active && "active", readOnly && "read-only", readOnly && Input_module_default["read-only"], focus_module_default["focusable-within"]),
6455
+ children
6456
+ }),
6457
+ suffixEl
6458
+ ]
6459
+ }),
6460
+ renderInputMessage({
6461
+ tip,
6462
+ errorMessage,
6463
+ tipId,
6464
+ errorMessageId
6465
+ })
6466
+ ]
6467
+ });
6468
+ }
6469
+ DateInput.displayName = "DateInput";
6341
6470
  // src/components/date-inputs/DatePicker/DateField/CalendarButton.tsx
6342
6471
  function CalendarButton({ componentSize = "medium", isReadOnly, ...props }) {
6343
6472
  const ref = useRef(null);
@@ -6431,95 +6560,6 @@ function DateSegment({ segment, state, componentSize, errorMessageId, tipId }) {
6431
6560
  });
6432
6561
  }
6433
6562
  DateSegment.displayName = "DateSegment";
6434
- // src/components/helpers/ClearButton/ClearButton.tsx
6435
- const ClearButton = ({ className, absolute = true, hasIconToRight, size = "medium", ...rest }) => /* @__PURE__ */ jsx(Box, {
6436
- as: Button,
6437
- className: cn(className, Button_module_default.clear, absolute && utilStyles_module_default["center-absolute-y"], absolute && !hasIconToRight && Input_module_default[`input-group__btn-right`], absolute && hasIconToRight && Input_module_default[`input-group__btn-right-with-right-icon--${size}`]),
6438
- icon: CloseSmallIcon,
6439
- purpose: "tertiary",
6440
- type: "button",
6441
- size,
6442
- ...rest
6443
- });
6444
- ClearButton.displayName = "ClearButton";
6445
- // src/components/helpers/Input/Input.tsx
6446
- const Input$1 = ({ className, ...rest }) => /* @__PURE__ */ jsx("input", {
6447
- className: cn(className, Input_module_default.input, _key1),
6448
- ...rest
6449
- });
6450
- Input$1.displayName = "Input";
6451
- const StatefulInput = ({ className, componentSize = "medium", hasErrorMessage, ...rest }) => /* @__PURE__ */ jsx(Input$1, {
6452
- className: cn(className, Input_module_default["input--stateful"], Input_module_default[`input--${componentSize}`], typographyStyles_module_default[`body-short-${componentSize}`], hasErrorMessage && Input_module_default["input--stateful-danger"]),
6453
- ...rest
6454
- });
6455
- StatefulInput.displayName = "StatefulInput";
6456
- // src/components/helpers/Input/Input.utils.tsx
6457
- function getDefaultText(value, defaultValue) {
6458
- if (typeof value === "string") return value;
6459
- if (typeof defaultValue === "string") return defaultValue;
6460
- return "";
6461
- }
6462
- function getInputWidth(width, defaultW) {
6463
- const fallback = defaultW ? defaultW : "var(--dds-input-default-width)";
6464
- if (isBreakpointObject(width)) return BREAKPOINTS.reduce((acc, bp) => {
6465
- return {
6466
- ...acc,
6467
- [bp]: bp in width ? width[bp] : fallback
6468
- };
6469
- }, {});
6470
- return width ?? fallback;
6471
- }
6472
- // src/components/Typography/Label/Label.utils.tsx
6473
- function renderLabel(props) {
6474
- const { label, ...rest } = props;
6475
- if (!!label) return /* @__PURE__ */ jsx(Label, {
6476
- ...rest,
6477
- withMargins: true,
6478
- children: label
6479
- });
6480
- return null;
6481
- }
6482
- // src/components/date-inputs/common/DateInput.tsx
6483
- function DateInput({ errorMessage, tip, componentSize = "medium", style, className, disabled, active, internalRef, readOnly, required, children, prefix: button, suffix: suffixEl, labelProps, fieldProps, groupProps, width, clearable, ref, afterLabelContent, tipId, errorMessageId, ...props }) {
6484
- const hasErrorMessage = !!errorMessage;
6485
- const { isOpen } = useContext(CalendarPopoverContext);
6486
- return /* @__PURE__ */ jsxs("div", {
6487
- ...groupProps,
6488
- className: cn(className, Input_module_default.container, DateInput_module_default["date-group"]),
6489
- ref,
6490
- children: [
6491
- renderLabel({
6492
- ...labelProps,
6493
- label: props.label,
6494
- showRequiredStyling: required,
6495
- readOnly,
6496
- afterLabelContent
6497
- }),
6498
- /* @__PURE__ */ jsxs(Box, {
6499
- style,
6500
- width: getInputWidth(width, "fit-content"),
6501
- className: cn(Input_module_default["input-group"], typographyStyles_module_default[`body-short-${componentSize}`], DateInput_module_default["input-group"]),
6502
- children: [
6503
- button,
6504
- /* @__PURE__ */ jsx(HStack, {
6505
- ...fieldProps,
6506
- ref: internalRef,
6507
- className: cn(Input_module_default.input, Input_module_default[`input--${componentSize}`], Input_module_default["input--stateful"], Input_module_default["input--hover"], hasErrorMessage && Input_module_default["input--stateful-danger"], clearable && Input_module_default[`input-with-btn-right--${componentSize}`], DateInput_module_default["date-segment-container"], Input_module_default[`input-with-icon--${componentSize}`], isOpen && focus_module_default.focused, disabled && "disabled", disabled && Input_module_default.disabled, active && "active", readOnly && "read-only", readOnly && Input_module_default["read-only"], focus_module_default["focusable-within"]),
6508
- children
6509
- }),
6510
- suffixEl
6511
- ]
6512
- }),
6513
- renderInputMessage({
6514
- tip,
6515
- errorMessage,
6516
- tipId,
6517
- errorMessageId
6518
- })
6519
- ]
6520
- });
6521
- }
6522
- DateInput.displayName = "DateInput";
6523
6563
  // src/components/date-inputs/DatePicker/DateField/DateField.tsx
6524
6564
  function DateField({ componentSize = "medium", buttonProps, groupProps, ref, clearable, errorMessageId, tipId, ...props }) {
6525
6565
  const { locale } = useLocale();
@@ -6586,22 +6626,6 @@ const texts$22 = createTexts({ clearDate: {
6586
6626
  nn: "Tøm dato",
6587
6627
  se: "Gurre dáhtona"
6588
6628
  } });
6589
- // src/components/date-inputs/utils/useFocusManagerRef.ts
6590
- function useFocusManagerRef(ref) {
6591
- const domRef = useRef(null);
6592
- useImperativeHandle(ref, () => ({
6593
- ...createDOMRef(domRef),
6594
- focus() {
6595
- createFocusManager(domRef).focusFirst({ tabbable: true });
6596
- }
6597
- }));
6598
- return domRef;
6599
- }
6600
- function createDOMRef(ref) {
6601
- return { UNSAFE_getDOMNode() {
6602
- return ref.current;
6603
- } };
6604
- }
6605
6629
  // src/components/date-inputs/DatePicker/DatePicker.tsx
6606
6630
  const refIsFocusable = (ref) => {
6607
6631
  return typeof ref === "object" && ref !== null && "focus" in ref;
@@ -6812,21 +6836,6 @@ const DescriptionListGroup = ({ children, margin, minWidth, maxWidth, id, classN
6812
6836
  children
6813
6837
  });
6814
6838
  DescriptionListGroup.displayName = "DescriptionListGroup";
6815
- // src/components/DetailList/DetailList.context.tsx
6816
- const DetailListContext = createContext({});
6817
- const useDetailListContext = () => useContext(DetailListContext);
6818
- // src/components/DetailList/DetailList.module.css
6819
- var DetailList_module_default = {
6820
- "list": "dds-DetailList-module__list",
6821
- "list--striped-with-bp": "dds-DetailList-module__list--striped-with-bp",
6822
- "row": "dds-DetailList-module__row",
6823
- "list--small": "dds-DetailList-module__list--small",
6824
- "list--medium": "dds-DetailList-module__list--medium",
6825
- "list--large": "dds-DetailList-module__list--large",
6826
- "column": "dds-DetailList-module__column",
6827
- "cell": "dds-DetailList-module__cell",
6828
- "term": "dds-DetailList-module__term"
6829
- };
6830
6839
  // src/components/Table/Table.module.css
6831
6840
  var Table_module_default = {
6832
6841
  "wrapper": "dds-Table-module__wrapper",
@@ -6839,6 +6848,8 @@ var Table_module_default = {
6839
6848
  "table--striped": "dds-Table-module__table--striped",
6840
6849
  "row--body": "dds-Table-module__row--body",
6841
6850
  "table--collapsible--striped": "dds-Table-module__table--collapsible--striped",
6851
+ "standard-row": "dds-Table-module__standard-row",
6852
+ "dl-row": "dds-Table-module__dl-row",
6842
6853
  "table--with-dividers": "dds-Table-module__table--with-dividers",
6843
6854
  "row--collapsible-header--open": "dds-Table-module__row--collapsible-header--open",
6844
6855
  "row": "dds-Table-module__row",
@@ -6853,6 +6864,21 @@ var Table_module_default = {
6853
6864
  "sort-button": "dds-Table-module__sort-button",
6854
6865
  "filter-cell": "dds-Table-module__filter-cell"
6855
6866
  };
6867
+ // src/components/DetailList/DetailList.context.tsx
6868
+ const DetailListContext = createContext({});
6869
+ const useDetailListContext = () => useContext(DetailListContext);
6870
+ // src/components/DetailList/DetailList.module.css
6871
+ var DetailList_module_default = {
6872
+ "list": "dds-DetailList-module__list",
6873
+ "list--striped-with-bp": "dds-DetailList-module__list--striped-with-bp",
6874
+ "row": "dds-DetailList-module__row",
6875
+ "list--small": "dds-DetailList-module__list--small",
6876
+ "list--medium": "dds-DetailList-module__list--medium",
6877
+ "list--large": "dds-DetailList-module__list--large",
6878
+ "column": "dds-DetailList-module__column",
6879
+ "cell": "dds-DetailList-module__cell",
6880
+ "term": "dds-DetailList-module__term"
6881
+ };
6856
6882
  // src/components/DetailList/DetailList.tsx
6857
6883
  const DETAIL_LIST_SIZES = createSizes("small", "medium", "large");
6858
6884
  const DetailList = ({ id, className, style, htmlProps, withDividers = true, striped = true, size = "medium", smallScreenBreakpoint, ...rest }) => /* @__PURE__ */ jsx(DetailListContext, {
@@ -6891,6 +6917,9 @@ const DetailListTerm = ({ className, ...rest }) => /* @__PURE__ */ jsx("dt", {
6891
6917
  ...rest
6892
6918
  });
6893
6919
  DetailListTerm.displayName = "DetailListTerm";
6920
+ // src/components/Drawer/Drawer.context.tsx
6921
+ const DrawerContext = createContext({});
6922
+ const useDrawerContext = () => useContext(DrawerContext);
6894
6923
  // src/components/Drawer/Drawer.module.css
6895
6924
  var Drawer_module_default = {
6896
6925
  "container": "dds-Drawer-module__container",
@@ -6904,9 +6933,6 @@ var Drawer_module_default = {
6904
6933
  "drawer-header": "dds-Drawer-module__drawer-header",
6905
6934
  "button--close": "dds-Drawer-module__button--close"
6906
6935
  };
6907
- // src/components/Drawer/Drawer.context.tsx
6908
- const DrawerContext = createContext({});
6909
- const useDrawerContext = () => useContext(DrawerContext);
6910
6936
  const Drawer = ({ children, header, placement = "right", parentElement, size = "small", className, style, htmlProps, maxWidth, minWidth = "300px", width, withBackdrop, ref, ...rest }) => {
6911
6937
  const themeContext = useContext(ThemeContext);
6912
6938
  if (!themeContext) throw new Error("Drawer must be used within a DdsProvider");
@@ -7075,8 +7101,6 @@ function EmptyContent({ headerText, children, headerHeadingLevel = 2, ...rest })
7075
7101
  });
7076
7102
  }
7077
7103
  EmptyContent.displayName = "EmptyContent";
7078
- // src/components/ErrorSummary/ErrorSummary.module.css
7079
- var ErrorSummary_module_default = { "container": "dds-ErrorSummary-module__container" };
7080
7104
  // src/components/List/List.module.css
7081
7105
  var List_module_default = {
7082
7106
  "list": "dds-List-module__list",
@@ -7100,6 +7124,8 @@ const ListItem = ({ className, ...rest }) => /* @__PURE__ */ jsx("li", {
7100
7124
  className: cn(className, List_module_default.li)
7101
7125
  });
7102
7126
  ListItem.displayName = "ListItem";
7127
+ // src/components/ErrorSummary/ErrorSummary.module.css
7128
+ var ErrorSummary_module_default = { "container": "dds-ErrorSummary-module__container" };
7103
7129
  // src/components/ErrorSummary/ErrorSummary.tsx
7104
7130
  const ErrorSummary = ({ heading: pHeading, className, style, children, id, htmlProps, ...props }) => {
7105
7131
  const { t } = useTranslation();
@@ -7187,16 +7213,6 @@ const texts$20 = createTexts({ favourite: {
7187
7213
  en: "Mark as favourite",
7188
7214
  se: "Merke favorihta"
7189
7215
  } });
7190
- // src/components/Feedback/Feedback.module.css
7191
- var Feedback_module_default = {
7192
- "rating-container": "dds-Feedback-module__rating-container",
7193
- "rating-container--horizontal": "dds-Feedback-module__rating-container--horizontal",
7194
- "rating-container--vertical": "dds-Feedback-module__rating-container--vertical",
7195
- "rating-submitted-title": "dds-Feedback-module__rating-submitted-title",
7196
- "button": "dds-Feedback-module__button"
7197
- };
7198
- // src/components/TextArea/TextArea.module.css
7199
- var TextArea_module_default = { "textarea": "dds-TextArea-module__textarea" };
7200
7216
  // src/components/helpers/CharCounter/CharCounter.module.css
7201
7217
  var CharCounter_module_default = { "container": "dds-CharCounter-module__container" };
7202
7218
  // src/components/helpers/CharCounter/CharCounter.tsx
@@ -7235,6 +7251,8 @@ const texts$19 = createTexts({ charsWritten: (current, max, remain) => ({
7235
7251
  en: `${current} of ${max} characters used. ${remain} remaining.`,
7236
7252
  se: `${current} ${max} mearkabustáva leat ${max} čállon ${remain}.`
7237
7253
  }) });
7254
+ // src/components/TextArea/TextArea.module.css
7255
+ var TextArea_module_default = { "textarea": "dds-TextArea-module__textarea" };
7238
7256
  // src/components/TextArea/TextArea.tsx
7239
7257
  const TextArea = ({ id, value, defaultValue, onChange, errorMessage, required = false, tip, label, readOnly, "aria-required": ariaRequired = false, "aria-describedby": ariaDescribedby, maxLength, withCharacterCounter = true, className, style, width, ref, ...rest }) => {
7240
7258
  const generatedId = useId();
@@ -7307,6 +7325,14 @@ const TextArea = ({ id, value, defaultValue, onChange, errorMessage, required =
7307
7325
  });
7308
7326
  };
7309
7327
  TextArea.displayName = "TextArea";
7328
+ // src/components/Feedback/Feedback.module.css
7329
+ var Feedback_module_default = {
7330
+ "rating-container": "dds-Feedback-module__rating-container",
7331
+ "rating-container--horizontal": "dds-Feedback-module__rating-container--horizontal",
7332
+ "rating-container--vertical": "dds-Feedback-module__rating-container--vertical",
7333
+ "rating-submitted-title": "dds-Feedback-module__rating-submitted-title",
7334
+ "button": "dds-Feedback-module__button"
7335
+ };
7310
7336
  // src/components/Feedback/CommentComponent.tsx
7311
7337
  const CommentComponent = ({ rating, feedbackText, positiveFeedbackLabel, negativeFeedbackLabel, ratingSubmittedTitle, textAreaTip, loading, handleSubmit, handleFeedbackTextChange }) => {
7312
7338
  const { t } = useTranslation();
@@ -7340,8 +7366,6 @@ const texts$18 = createTexts({ send: {
7340
7366
  en: "Send",
7341
7367
  se: "Sádde"
7342
7368
  } });
7343
- // src/components/Feedback/utils.tsx
7344
- const getButtonSize = (layout) => layout === "vertical" ? "medium" : "small";
7345
7369
  // src/components/Tooltip/Tooltip.tsx
7346
7370
  const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100, style, onMouseLeave, onMouseOver, keepMounted = true, id, ref, className, htmlProps, ...rest }) => {
7347
7371
  const generatedId = useId();
@@ -7433,6 +7457,8 @@ const Tooltip = ({ text, placement = "bottom", children, tooltipId, delay = 100,
7433
7457
  });
7434
7458
  };
7435
7459
  Tooltip.displayName = "Tooltip";
7460
+ // src/components/Feedback/utils.tsx
7461
+ const getButtonSize = (layout) => layout === "vertical" ? "medium" : "small";
7436
7462
  // src/components/Feedback/RatingComponent.tsx
7437
7463
  const RatingComponent = ({ layout, ratingLabel, loading, thumbUpTooltip, thumbDownTooltip, handleRatingChange }) => {
7438
7464
  const { t } = useTranslation();
@@ -8341,61 +8367,6 @@ const texts$12 = createTexts({ noValue: {
8341
8367
  en: "Not filled out",
8342
8368
  se: "Ii leat devdon"
8343
8369
  } });
8344
- // src/components/GlobalMessage/GlobalMessage.module.css
8345
- var GlobalMessage_module_default = {
8346
- "container": "dds-GlobalMessage-module__container",
8347
- "container--info": "dds-GlobalMessage-module__container--info",
8348
- "icon": "dds-GlobalMessage-module__icon",
8349
- "container--danger": "dds-GlobalMessage-module__container--danger",
8350
- "container--warning": "dds-GlobalMessage-module__container--warning"
8351
- };
8352
- const icons$2 = {
8353
- info: InfoIcon,
8354
- danger: ErrorIcon,
8355
- warning: WarningIcon
8356
- };
8357
- const GlobalMessage = ({ purpose = "info", closable, onClose, children, id, className, style, htmlProps, ...rest }) => {
8358
- const { t } = useTranslation();
8359
- const [isClosed, setClosed] = useState(false);
8360
- return !isClosed ? /* @__PURE__ */ jsxs(HStack, {
8361
- ...getBaseHTMLProps(id, cn(className, GlobalMessage_module_default.container, GlobalMessage_module_default[`container--${purpose}`], typographyStyles_module_default["body-short-medium"]), style, htmlProps, rest),
8362
- alignItems: "center",
8363
- justifyContent: "space-between",
8364
- width: "100%",
8365
- padding: "0 x1",
8366
- children: [/* @__PURE__ */ jsxs(HStack, {
8367
- alignItems: "center",
8368
- paddingBlock: "x0.75",
8369
- paddingInline: closable ? "x0 x0.75" : " x0 x1.5",
8370
- children: [/* @__PURE__ */ jsx(Icon, {
8371
- icon: icons$2[purpose],
8372
- iconSize: "component",
8373
- className: GlobalMessage_module_default.icon
8374
- }), children]
8375
- }), closable && /* @__PURE__ */ jsx(Button, {
8376
- icon: CloseIcon,
8377
- purpose: "tertiary",
8378
- onClick: () => {
8379
- setClosed(true);
8380
- onClose?.();
8381
- },
8382
- size: "small",
8383
- "aria-label": t(commonTexts.closeMessage)
8384
- })]
8385
- }) : null;
8386
- };
8387
- GlobalMessage.displayName = "GlobalMessage";
8388
- // src/components/InlineButton/InlineButton.module.css
8389
- var InlineButton_module_default = { "button": "dds-InlineButton-module__button" };
8390
- // src/components/InlineButton/InlineButton.tsx
8391
- const InlineButton = ({ className, color, icon, children, ...rest }) => /* @__PURE__ */ jsx(StylelessButton, {
8392
- className: cn(className, focus_module_default.focusable, typographyStyles_module_default.a, InlineButton_module_default.button, getColorCn(color)),
8393
- ...rest,
8394
- children: icon ? /* @__PURE__ */ jsx(Icon, {
8395
- icon,
8396
- iconSize: "component"
8397
- }) : children
8398
- });
8399
8370
  // src/components/InlineEdit/InlineEdit.context.tsx
8400
8371
  const InlineEditContext = createContext({});
8401
8372
  const useInlineEditContext = () => useContext(InlineEditContext);
@@ -8439,6 +8410,37 @@ const InlineEditContextProvider = (props) => {
8439
8410
  });
8440
8411
  };
8441
8412
  InlineEditContextProvider.displayName = "InlineEditContextProvider";
8413
+ // src/utils/createClearChangeEvent.tsx
8414
+ /**
8415
+ * Lager en change-event som kan resette verdien i et input-felt.
8416
+ * Dette vil resultere i en event som har: event.target.value = ''.
8417
+ *
8418
+ * @param elementId Id'en til et gitt input-felt
8419
+ * @returns En change-event som har en tom streng som target value
8420
+ */
8421
+ function createClearChangeEvent(elementId) {
8422
+ const element = document.getElementById(elementId);
8423
+ if (!element) throw new Error(`Element by id '${elementId}' not found.`);
8424
+ if (element instanceof HTMLInputElement) element.value = "";
8425
+ else if (element instanceof HTMLSelectElement) element.selectedIndex = 0;
8426
+ return {
8427
+ target: element,
8428
+ currentTarget: element,
8429
+ bubbles: true,
8430
+ cancelable: false,
8431
+ defaultPrevented: false,
8432
+ eventPhase: 0,
8433
+ isTrusted: false,
8434
+ preventDefault: () => null,
8435
+ stopPropagation: () => null,
8436
+ nativeEvent: new Event("input"),
8437
+ persist: () => null,
8438
+ type: "change",
8439
+ timeStamp: Date.now(),
8440
+ isDefaultPrevented: () => false,
8441
+ isPropagationStopped: () => false
8442
+ };
8443
+ }
8442
8444
  // src/components/InlineEdit/InlineEdit.module.css
8443
8445
  var InlineEdit_module_default = {
8444
8446
  "inline-input": "dds-InlineEdit-module__inline-input",
@@ -8501,37 +8503,6 @@ const inlineSelectCns = (hasErrorState, showEditingIcon, hasValue) => [
8501
8503
  hasValue && Input_module_default["input-with-icon-and-button-right--small"],
8502
8504
  InlineEdit_module_default["inline-select"]
8503
8505
  ];
8504
- // src/utils/createClearChangeEvent.tsx
8505
- /**
8506
- * Lager en change-event som kan resette verdien i et input-felt.
8507
- * Dette vil resultere i en event som har: event.target.value = ''.
8508
- *
8509
- * @param elementId Id'en til et gitt input-felt
8510
- * @returns En change-event som har en tom streng som target value
8511
- */
8512
- function createClearChangeEvent(elementId) {
8513
- const element = document.getElementById(elementId);
8514
- if (!element) throw new Error(`Element by id '${elementId}' not found.`);
8515
- if (element instanceof HTMLInputElement) element.value = "";
8516
- else if (element instanceof HTMLSelectElement) element.selectedIndex = 0;
8517
- return {
8518
- target: element,
8519
- currentTarget: element,
8520
- bubbles: true,
8521
- cancelable: false,
8522
- defaultPrevented: false,
8523
- eventPhase: 0,
8524
- isTrusted: false,
8525
- preventDefault: () => null,
8526
- stopPropagation: () => null,
8527
- nativeEvent: new Event("input"),
8528
- persist: () => null,
8529
- type: "change",
8530
- timeStamp: Date.now(),
8531
- isDefaultPrevented: () => false,
8532
- isPropagationStopped: () => false
8533
- };
8534
- }
8535
8506
  // src/components/InlineEdit/InlineField.tsx
8536
8507
  function InlineField(props) {
8537
8508
  const { elementType, id, error, errorMessage, width = "140px", hideIcon, ref, className, "aria-describedby": ariaDescribedby, ...rest } = props;
@@ -8818,17 +8789,10 @@ const texts$10 = createTexts({
8818
8789
  se: "Siidu navigášuvdna"
8819
8790
  }
8820
8791
  });
8821
- // src/components/LocalMessage/LocalMessage.module.css
8822
- var LocalMessage_module_default = {
8823
- "container": "dds-LocalMessage-module__container",
8824
- "container--info": "dds-LocalMessage-module__container--info",
8825
- "container--warning": "dds-LocalMessage-module__container--warning",
8826
- "container--danger": "dds-LocalMessage-module__container--danger",
8827
- "container--success": "dds-LocalMessage-module__container--success",
8828
- "container--tips": "dds-LocalMessage-module__container--tips"
8829
- };
8830
- // src/components/LocalMessage/LocalMessage.tsx
8831
- const L_MESSAGE_PURPOSES = createPurposes("info", "success", "warning", "danger", "tips");
8792
+ // src/components/messages/MessageBase/MessageBase.module.css
8793
+ var MessageBase_module_default = { "container": "dds-MessageBase-module__container" };
8794
+ // src/components/messages/MessageBase/MessageBase.tsx
8795
+ const MESSAGE_PURPOSES = createPurposes("info", "success", "warning", "danger", "tips");
8832
8796
  const icons$1 = {
8833
8797
  info: InfoIcon,
8834
8798
  danger: ErrorIcon,
@@ -8836,10 +8800,97 @@ const icons$1 = {
8836
8800
  success: CheckCircledIcon,
8837
8801
  tips: TipIcon
8838
8802
  };
8839
- const LocalMessage = ({ purpose = "info", closable, onClose, width, layout = "horisontal", children, id, className, style, htmlProps, ...rest }) => {
8803
+ const MessageBase = ({ children, id, className, style, htmlProps, purpose = "info", heading, closable, onClose, gridLayout, headingLevel = 2, containerGridTemplateStyles, ...rest }) => {
8840
8804
  const { t } = useTranslation();
8841
8805
  const [isOpen, setOpen] = useState(true);
8842
- const gridLayout = closable ? `${layout}-closable` : layout;
8806
+ const basePurpose = purpose === "tips" ? "info" : purpose;
8807
+ const purposeStyles = {
8808
+ "--dds-color-message-border": `var(--dds-color-border-${basePurpose})`,
8809
+ "--dds-color-message-background": `var(--dds-color-surface-${basePurpose}-default)`,
8810
+ "--dds-color-message-icon": `var(--dds-color-icon-on-${basePurpose}-default)`
8811
+ };
8812
+ return isOpen ? /* @__PURE__ */ jsxs(Grid, {
8813
+ ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"], MessageBase_module_default.container), {
8814
+ ...style,
8815
+ ...purposeStyles
8816
+ }, htmlProps, rest),
8817
+ marginInline: "x0",
8818
+ ...containerGridTemplateStyles[gridLayout],
8819
+ children: [
8820
+ /* @__PURE__ */ jsx(GridChild, {
8821
+ as: Icon,
8822
+ gridArea: "icon",
8823
+ icon: icons$1[purpose],
8824
+ iconSize: "component"
8825
+ }),
8826
+ heading && /* @__PURE__ */ jsx(GridChild, {
8827
+ as: Heading,
8828
+ level: headingLevel,
8829
+ typographyType: "heading-small",
8830
+ gridArea: "heading",
8831
+ children: heading
8832
+ }),
8833
+ /* @__PURE__ */ jsx(GridChild, {
8834
+ gridArea: "text",
8835
+ children
8836
+ }),
8837
+ closable && /* @__PURE__ */ jsx(GridChild, {
8838
+ gridArea: "close-btn",
8839
+ children: /* @__PURE__ */ jsx(Button, {
8840
+ icon: CloseIcon,
8841
+ purpose: "tertiary",
8842
+ onClick: () => {
8843
+ setOpen(false);
8844
+ onClose?.();
8845
+ },
8846
+ size: "xsmall",
8847
+ "aria-label": t(commonTexts.closeMessage)
8848
+ })
8849
+ })
8850
+ ]
8851
+ }) : null;
8852
+ };
8853
+ MessageBase.displayName = "MessageBase";
8854
+ // src/components/messages/GlobalMessage/GlobalMessage.module.css
8855
+ var GlobalMessage_module_default = { "container": "dds-GlobalMessage-module__container" };
8856
+ MESSAGE_PURPOSES.filter((purpose) => purpose !== "tips" && purpose !== "success");
8857
+ const GlobalMessage = (props) => {
8858
+ const gridLayout = `message${props.closable ? "-closable" : ""}${props.heading ? "-heading" : ""}`;
8859
+ return /* @__PURE__ */ jsx(MessageBase, {
8860
+ gridLayout,
8861
+ containerGridTemplateStyles: {
8862
+ message: {
8863
+ gridTemplateAreas: `"icon text"`,
8864
+ gridTemplateColumns: "min-content 1fr"
8865
+ },
8866
+ "message-closable": {
8867
+ gridTemplateAreas: `"icon text close-btn"`,
8868
+ gridTemplateColumns: "min-content 1fr min-content"
8869
+ },
8870
+ "message-heading": {
8871
+ gridTemplateAreas: `"icon heading" ". text"`,
8872
+ gridTemplateColumns: "min-content 1fr"
8873
+ },
8874
+ "message-closable-heading": {
8875
+ gridTemplateAreas: `"icon heading close-btn" ". text text"`,
8876
+ gridTemplateColumns: "min-content 1fr min-content"
8877
+ }
8878
+ },
8879
+ className: GlobalMessage_module_default.container,
8880
+ rowGap: "x0.5",
8881
+ columnGap: "x0.75",
8882
+ padding: "x0.75",
8883
+ width: "100%",
8884
+ ...props
8885
+ });
8886
+ };
8887
+ GlobalMessage.displayName = "GlobalMessage";
8888
+ // src/components/messages/LocalMessage/LocalMessage.module.css
8889
+ var LocalMessage_module_default = { "container": "dds-LocalMessage-module__container" };
8890
+ // src/components/messages/LocalMessage/LocalMessage.tsx
8891
+ const L_MESSAGE_PURPOSES = MESSAGE_PURPOSES;
8892
+ const LocalMessage = ({ layout = "horisontal", ...rest }) => {
8893
+ const gridLayout = `${layout}${rest.closable ? "-closable" : ""}${rest.heading ? "-heading" : ""}`;
8843
8894
  const containerGridTemplateStyles = {
8844
8895
  horisontal: {
8845
8896
  gridTemplateAreas: `"icon text"`,
@@ -8849,6 +8900,14 @@ const LocalMessage = ({ purpose = "info", closable, onClose, width, layout = "ho
8849
8900
  gridTemplateAreas: `"icon text close-btn"`,
8850
8901
  gridTemplateColumns: "min-content 1fr min-content"
8851
8902
  },
8903
+ "horisontal-heading": {
8904
+ gridTemplateAreas: `"icon heading" ". text"`,
8905
+ gridTemplateColumns: "min-content 1fr"
8906
+ },
8907
+ "horisontal-closable-heading": {
8908
+ gridTemplateAreas: `"icon heading close-btn" ". text text"`,
8909
+ gridTemplateColumns: "min-content 1fr min-content"
8910
+ },
8852
8911
  vertical: {
8853
8912
  gridTemplateAreas: `"icon" "text"`,
8854
8913
  gridTemplateColumns: "1fr"
@@ -8856,42 +8915,26 @@ const LocalMessage = ({ purpose = "info", closable, onClose, width, layout = "ho
8856
8915
  "vertical-closable": {
8857
8916
  gridTemplateAreas: `"icon close-btn" "text text"`,
8858
8917
  gridTemplateColumns: "1fr min-content"
8918
+ },
8919
+ "vertical-heading": {
8920
+ gridTemplateAreas: `"icon" "heading" "text"`,
8921
+ gridTemplateColumns: "1fr"
8922
+ },
8923
+ "vertical-closable-heading": {
8924
+ gridTemplateAreas: `"icon close-btn" "heading heading" "text text"`,
8925
+ gridTemplateColumns: "1fr min-content"
8859
8926
  }
8860
8927
  };
8861
- return isOpen ? /* @__PURE__ */ jsxs(Grid, {
8862
- ...getBaseHTMLProps(id, cn(className, typographyStyles_module_default["body-short-medium"], LocalMessage_module_default.container, LocalMessage_module_default[`container--${purpose}`]), style, htmlProps, rest),
8863
- width,
8928
+ const hasDenseLayout = gridLayout === "vertical" || gridLayout === "vertical-closable";
8929
+ return /* @__PURE__ */ jsx(MessageBase, {
8930
+ gridLayout,
8931
+ containerGridTemplateStyles,
8932
+ className: LocalMessage_module_default.container,
8864
8933
  padding: "x0.75 x0.75 x0.75 x0.5",
8865
- rowGap: "x0.5",
8934
+ rowGap: hasDenseLayout ? "x0.25" : "x0.5",
8866
8935
  columnGap: "x0.5",
8867
- marginInline: "x0",
8868
- ...containerGridTemplateStyles[gridLayout],
8869
- children: [
8870
- /* @__PURE__ */ jsx(GridChild, {
8871
- as: Icon,
8872
- gridArea: "icon",
8873
- iconSize: "component",
8874
- icon: icons$1[purpose],
8875
- color: `var(--dds-color-icon-on-${purpose === "tips" ? "info" : purpose}-default)`
8876
- }),
8877
- /* @__PURE__ */ jsx(GridChild, {
8878
- gridArea: "text",
8879
- children
8880
- }),
8881
- closable && /* @__PURE__ */ jsx(GridChild, {
8882
- as: Button,
8883
- gridArea: "close-btn",
8884
- icon: CloseIcon,
8885
- purpose: "tertiary",
8886
- onClick: () => {
8887
- setOpen(false);
8888
- onClose?.();
8889
- },
8890
- size: "xsmall",
8891
- "aria-label": t(commonTexts.closeMessage)
8892
- })
8893
- ]
8894
- }) : null;
8936
+ ...rest
8937
+ });
8895
8938
  };
8896
8939
  LocalMessage.displayName = "LocalMessage";
8897
8940
  // src/components/Modal/Modal.module.css
@@ -9144,47 +9187,6 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
9144
9187
  }) : null;
9145
9188
  };
9146
9189
  NewsPopover.displayName = "NewsPopover";
9147
- // src/components/Pagination/Pagination.module.css
9148
- var Pagination_module_default = { "truncation-icon": "dds-Pagination-module__truncation-icon" };
9149
- // src/components/Pagination/paginationGenerator.tsx
9150
- const arrayRange = (start, end) => {
9151
- const length = end - start + 1;
9152
- return Array.from({ length }, (_, idx) => idx + start);
9153
- };
9154
- function PaginationGenerator(pagesAmount, activePage) {
9155
- const siblingsCount = 1;
9156
- const maxPagesShown = 7;
9157
- const pagesBeforeTruncator = 5;
9158
- const truncator = "truncator";
9159
- let pageRange;
9160
- if (pagesAmount > 4) {
9161
- const middleStartPage = Math.max(1, activePage < pagesBeforeTruncator || pagesAmount <= maxPagesShown ? 1 : activePage + siblingsCount + 1 >= pagesAmount ? pagesAmount - 4 : activePage > 4 && pagesAmount > maxPagesShown ? activePage - siblingsCount : 1);
9162
- const middleEndOffset = activePage < pagesBeforeTruncator && pagesAmount > maxPagesShown ? pagesBeforeTruncator : activePage < pagesBeforeTruncator && pagesAmount <= maxPagesShown ? pagesAmount : activePage + siblingsCount + 1 < pagesAmount - 1 ? activePage + siblingsCount : activePage + siblingsCount + 1 === pagesAmount - 1 ? pagesAmount : pagesAmount;
9163
- const middleEndPage = Math.min(pagesAmount, middleEndOffset);
9164
- pageRange = arrayRange(middleStartPage, middleEndPage);
9165
- const truncatedLeft = middleStartPage > 2 && pagesAmount > maxPagesShown;
9166
- const truncatedRight = pagesAmount - middleEndPage > 1 && pagesAmount > maxPagesShown;
9167
- if (truncatedLeft && truncatedRight) pageRange = [
9168
- 1,
9169
- truncator,
9170
- ...pageRange,
9171
- truncator,
9172
- pagesAmount
9173
- ];
9174
- else if (truncatedLeft && !truncatedRight) pageRange = [
9175
- 1,
9176
- truncator,
9177
- ...pageRange
9178
- ];
9179
- else if (!truncatedLeft && truncatedRight) pageRange = [
9180
- ...pageRange,
9181
- truncator,
9182
- pagesAmount
9183
- ];
9184
- return [...pageRange];
9185
- }
9186
- return arrayRange(1, pagesAmount);
9187
- }
9188
9190
  // src/components/Select/Select.module.css
9189
9191
  var Select_module_default = {
9190
9192
  "container--disabled": "dds-Select-module__container--disabled",
@@ -9727,6 +9729,47 @@ const createSelectOptions = (...args) => args.map((v) => ({
9727
9729
  label: v,
9728
9730
  value: v
9729
9731
  }));
9732
+ // src/components/Pagination/Pagination.module.css
9733
+ var Pagination_module_default = { "truncation-icon": "dds-Pagination-module__truncation-icon" };
9734
+ // src/components/Pagination/paginationGenerator.tsx
9735
+ const arrayRange = (start, end) => {
9736
+ const length = end - start + 1;
9737
+ return Array.from({ length }, (_, idx) => idx + start);
9738
+ };
9739
+ function PaginationGenerator(pagesAmount, activePage) {
9740
+ const siblingsCount = 1;
9741
+ const maxPagesShown = 7;
9742
+ const pagesBeforeTruncator = 5;
9743
+ const truncator = "truncator";
9744
+ let pageRange;
9745
+ if (pagesAmount > 4) {
9746
+ const middleStartPage = Math.max(1, activePage < pagesBeforeTruncator || pagesAmount <= maxPagesShown ? 1 : activePage + siblingsCount + 1 >= pagesAmount ? pagesAmount - 4 : activePage > 4 && pagesAmount > maxPagesShown ? activePage - siblingsCount : 1);
9747
+ const middleEndOffset = activePage < pagesBeforeTruncator && pagesAmount > maxPagesShown ? pagesBeforeTruncator : activePage < pagesBeforeTruncator && pagesAmount <= maxPagesShown ? pagesAmount : activePage + siblingsCount + 1 < pagesAmount - 1 ? activePage + siblingsCount : activePage + siblingsCount + 1 === pagesAmount - 1 ? pagesAmount : pagesAmount;
9748
+ const middleEndPage = Math.min(pagesAmount, middleEndOffset);
9749
+ pageRange = arrayRange(middleStartPage, middleEndPage);
9750
+ const truncatedLeft = middleStartPage > 2 && pagesAmount > maxPagesShown;
9751
+ const truncatedRight = pagesAmount - middleEndPage > 1 && pagesAmount > maxPagesShown;
9752
+ if (truncatedLeft && truncatedRight) pageRange = [
9753
+ 1,
9754
+ truncator,
9755
+ ...pageRange,
9756
+ truncator,
9757
+ pagesAmount
9758
+ ];
9759
+ else if (truncatedLeft && !truncatedRight) pageRange = [
9760
+ 1,
9761
+ truncator,
9762
+ ...pageRange
9763
+ ];
9764
+ else if (!truncatedLeft && truncatedRight) pageRange = [
9765
+ ...pageRange,
9766
+ truncator,
9767
+ pagesAmount
9768
+ ];
9769
+ return [...pageRange];
9770
+ }
9771
+ return arrayRange(1, pagesAmount);
9772
+ }
9730
9773
  // src/components/Pagination/Pagination.tsx
9731
9774
  const Pagination = ({ itemsAmount, defaultItemsPerPage = 10, defaultActivePage = 1, activePage: activePageProp, withPagination = true, withCounter, withSelect, selectOptions, smallScreenBreakpoint, onChange, onSelectOptionChange, id, className, style, htmlProps, ref, ...rest }) => {
9732
9775
  const { t } = useTranslation();
@@ -12340,11 +12383,11 @@ const Row = ({ type: _type, className, mode = "normal", children, ref, ...rest }
12340
12383
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
12341
12384
  /* @__PURE__ */ jsx(PlainRow, {
12342
12385
  ref,
12343
- ...sharedRowProps(hideBelowCn),
12386
+ ...sharedRowProps(cn(hideBelowCn, Table_module_default["standard-row"])),
12344
12387
  children
12345
12388
  }),
12346
12389
  /* @__PURE__ */ jsxs(PlainRow, {
12347
- ...sharedRowProps(cn(hideAboveCn, !childrenCollapsed && Table_module_default["row--collapsible-header--open"])),
12390
+ ...sharedRowProps(cn(hideAboveCn, Table_module_default["standard-row"], !childrenCollapsed && Table_module_default["row--collapsible-header--open"])),
12348
12391
  children: [definingCells, /* @__PURE__ */ jsx("td", {
12349
12392
  className: Table_module_default["cell--right"],
12350
12393
  children: /* @__PURE__ */ jsx(Button, {
@@ -12358,7 +12401,7 @@ const Row = ({ type: _type, className, mode = "normal", children, ref, ...rest }
12358
12401
  })]
12359
12402
  }),
12360
12403
  !childrenCollapsed && /* @__PURE__ */ jsx(PlainRow, {
12361
- ...sharedRowProps(hideAboveCn),
12404
+ ...sharedRowProps(cn(hideAboveCn, Table_module_default["dl-row"])),
12362
12405
  children: /* @__PURE__ */ jsx("td", {
12363
12406
  colSpan: definingCells.length + 1,
12364
12407
  children: /* @__PURE__ */ jsx(DescriptionList, { children: descriptionListItems })
@@ -13060,6 +13103,6 @@ const ToggleRadio = ({ value, name, onChange, checked, "aria-label": ariaLabel,
13060
13103
  });
13061
13104
  };
13062
13105
  ToggleRadio.displayName = "ToggleRadio";
13063
- export { Accordion, AccordionBody, AccordionContextProvider, AccordionHeader, AddTabButton, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowDownUpIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRightIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, Backdrop, Badge, BarChartBoxedIcon, BarChartIcon, Bleed, BlockIcon, BookIcon, Box, Breadcrumb, Breadcrumbs, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, Calendar, CalendarIcon, CalendarMonthIcon, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, Caption, Card, CardExpandable, CardExpandableBody, CardExpandableHeader, CardSelectable, CardSelectableGroup, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipButton, ChipCheckbox, ChipGroup, ChipRadio, ChipRemovable, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CommentIcon, Contrast, CookieBanner, CookieBannerCheckbox, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, DateRangeIcon, DdsProvider, DeathsIcon, DescriptionList, DescriptionListDesc, DescriptionListGroup, DescriptionListTerm, DesktopIcon, DesktopMobileIcon, DetailList, DetailListDesc, DetailListRow, DetailListTerm, Divider, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, DropdownHeader, DropdownItem, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, EmptyContent, ErrorIcon, ErrorSummary, ErrorSummaryItem, ExclaimIcon, ExpandIcon, FacebookIcon, FamilyIcon, FavStar, Feedback, FeedbackIcon, Fieldset, FieldsetGroup, FileAddIcon, FileIcon, FileShieldedIcon, FileSignedIcon, FileTextIcon, FileUploader, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, FooterList, FooterListGroup, FooterListHeader, FooterLogo, FooterSocialsGroup, FooterSocialsList, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, Grid, GridChild, GroupIcon, GuardianIcon, HStack, Heading, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, Icon, ImageIcon, InfoIcon, InlineButton, InlineEditInput, InlineEditSelect, InlineEditTextArea, InputMessage, InstagramIcon, InternalHeader, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, LagmannsrettIcon, LanguageIcon, Legend, LineChartIcon, Link, LinkIcon, LinkOffIcon, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, LocalMessage, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, ModalBody, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NewsPopover, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, OnlineMeetingIcon, OpenExternalIcon, OverflowMenu, OverflowMenuButton, OverflowMenuDivider, OverflowMenuGroup, OverflowMenuLink, OverflowMenuList, OverflowMenuListHeader, OverflowMenuSpan, OverflowMenuToggle, Pagination, PaletteIcon, PanelLeftIcon, Paper, PaperPlaneIcon, Paragraph, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, PinIcon, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, PowerOfAttorneyIcon, PrintIcon, ProgressBar, ProgressTracker, ProgressTrackerItem, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, ReceiptIcon, RedoIcon, RefreshIcon, ReplayIcon, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, SearchIcon, SearchSuggestions, SectionIcon, Select, SettingsIcon, ShowHide, Skeleton, SkipToContent, SmsIcon, Spinner, SplitButton, StarFilledIcon, StarHalfFilledIcon, StarIcon, StickyNoteIcon, StylelessButton, StylelessList, StylelessOList, SunHalfFilledIcon, SunIcon, SupportIcon, SyncIcon, TG_BODY_LONG_TYPES, TG_BODY_SHORT_TYPES, TG_BODY_TYPES, TG_HEADING_TYPES, TG_LEAD_TYPES, Tab, TabList, TabPanel, TabPanels, Table, Body as TableBody, Cell as TableCell, FilterCell as TableFilterCell, Foot as TableFoot, Head as TableHead, Row as TableRow, SortCell as TableSortCell, TableWrapper, Tabs, Tag, TextArea, TextInput, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, TingrettIcon, TipIcon, Toggle, ToggleBar, ToggleRadio, Tooltip, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, WarningIcon, WebexIcon, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, icons_exports as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
13106
+ export { Accordion, AccordionBody, AccordionContextProvider, AccordionHeader, AddTabButton, AddressShieldedIcon, AgreementIcon, AnimatedChevronUpDownIcon, AppsIcon, ArchiveIcon, ArrowDownIcon, ArrowDownUpIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpDownIcon, ArrowUpIcon, ArrowUpRightIcon, AttachmentIcon, BORDER_COLORS, BORDER_RADII, BackLink, Backdrop, Badge, BarChartBoxedIcon, BarChartIcon, Bleed, BlockIcon, BookIcon, Box, Breadcrumb, Breadcrumbs, BriefcaseIcon, BuildIcon, BuildingIcon, Button, ButtonGroup, Calendar, CalendarIcon, CalendarMonthIcon, CalendarViewDayIcon, CalendarViewMonthIcon, CalendarViewWeekIcon, CallIcon, Caption, Card, CardExpandable, CardExpandableBody, CardExpandableHeader, CardSelectable, CardSelectableGroup, CaringIcon, ChatIcon, CheckCircledIcon, CheckIcon, Checkbox, CheckboxGroup, ChecklistIcon, ChevronDownIcon, ChevronFirstIcon, ChevronLastIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, Chip, ChipButton, ChipCheckbox, ChipGroup, ChipRadio, ChipRemovable, CircleFilledIcon, CircleIcon, CloseCircledIcon, CloseIcon, CloseSmallIcon, CloudIcon, CollapseIcon, CommentIcon, Contrast, CookieBanner, CookieBannerCheckbox, CopyIcon, CourtIcon, DETAIL_LIST_SIZES, DatePicker, DateRangeIcon, DdsProvider, DeathsIcon, DescriptionList, DescriptionListDesc, DescriptionListGroup, DescriptionListTerm, DesktopIcon, DesktopMobileIcon, DetailList, DetailListDesc, DetailListRow, DetailListTerm, Divider, DoubleChevronLeftIcon, DoubleChevronRightIcon, DownloadDoneIcon, DownloadIcon, DragHandleIcon, Drawer, DrawerGroup, DropdownHeader, DropdownItem, ELEVATIONS, EditAltIcon, EditIcon, ElementAs, EmptyContent, ErrorIcon, ErrorSummary, ErrorSummaryItem, ExclaimIcon, ExpandIcon, FacebookIcon, FamilyIcon, FavStar, Feedback, FeedbackIcon, Fieldset, FieldsetGroup, FileAddIcon, FileIcon, FileShieldedIcon, FileSignedIcon, FileTextIcon, FileUploader, FilterIcon, FilterListIcon, FindInPageIcon, FlagFilledIcon, FlagIcon, FlickrIcon, FloppyDiskIcon, FolderAddIcon, FolderIcon, FolderShieldedIcon, Footer, FooterLeft, FooterList, FooterListGroup, FooterListHeader, FooterLogo, FooterSocialsGroup, FooterSocialsList, FormSummary, FormSummaryEditButton, FormSummaryEmptyValue, FormSummaryError, FormSummaryField, FormSummaryFields, FormSummaryHeader, FormSummaryHeading, FormSummaryLabel, FormSummaryValue, FullscreenExitIcon, FullscreenIcon, GavelIcon, GlobalMessage, Grid, GridChild, GroupIcon, GuardianIcon, HStack, Heading, HelpFilledIcon, HelpIcon, HelpSimpleIcon, HiddenInput, HomeIcon, HourglassEmptyIcon, Icon, ImageIcon, InfoIcon, InlineButton, InlineEditInput, InlineEditSelect, InlineEditTextArea, InputMessage, InstagramIcon, InternalHeader, JordskifterettIcon, JordskiftesakIcon, KeyIcon, L_MESSAGE_PURPOSES, Label, LagmannsrettIcon, LanguageIcon, Legend, LineChartIcon, Link, LinkIcon, LinkOffIcon, LinkedInIcon, List, ListAltIcon, ListIcon, ListItem, LocalMessage, LocationIcon, LocationOffIcon, LockFilledIcon, LockIcon, LockOpenIcon, LoginIcon, LogoutIcon, MailIcon, MailOpenIcon, MapIcon, MenuIcon, MinusCircledIcon, MinusIcon, Modal, ModalActions, ModalBody, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, NativeSelect, NewsPopover, NotarialIcon, NotebookPenIcon, NotificationsIcon, NotificationsOffIcon, OnlineMeetingIcon, OpenExternalIcon, OverflowMenu, OverflowMenuButton, OverflowMenuDivider, OverflowMenuGroup, OverflowMenuLink, OverflowMenuList, OverflowMenuListHeader, OverflowMenuSpan, OverflowMenuToggle, Pagination, PaletteIcon, PanelLeftIcon, Paper, PaperPlaneIcon, Paragraph, PayoutIcon, PdfIcon, PersonAddIcon, PersonIcon, PersonShieldedIcon, PhoneInput, PinIcon, PlusCircledIcon, PlusIcon, Popover, PopoverGroup, PowerOfAttorneyIcon, PrintIcon, ProgressBar, ProgressTracker, ProgressTrackerItem, PublishIcon, QuestionAnswerIcon, RadioButton, RadioButtonGroup, ReceiptIcon, RecorderIcon, RedoIcon, RefreshIcon, ReplayIcon, RowsIcon, ScaleIcon, ScreenSize, Search, SearchAutocompleteWrapper, SearchIcon, SearchSuggestions, SectionIcon, Select, SettingsIcon, ShowHide, Skeleton, SkipToContent, SmsIcon, Spinner, SplitButton, StarFilledIcon, StarHalfFilledIcon, StarIcon, StickyNoteIcon, StylelessButton, StylelessList, StylelessOList, SunHalfFilledIcon, SunIcon, SupportIcon, SyncIcon, TG_BODY_LONG_TYPES, TG_BODY_SHORT_TYPES, TG_BODY_TYPES, TG_HEADING_TYPES, TG_LEAD_TYPES, Tab, TabList, TabPanel, TabPanels, Table, Body as TableBody, Cell as TableCell, FilterCell as TableFilterCell, Foot as TableFoot, Head as TableHead, Row as TableRow, SortCell as TableSortCell, TableWrapper, Tabs, Tag, TextArea, TextInput, TextOverflowEllipsisInner, TextOverflowEllipsisWrapper, ThumbDownFilledIcon, ThumbDownIcon, ThumbUpFilledIcon, ThumbUpIcon, TimeIcon, TimePicker, TingrettIcon, TipIcon, Toggle, ToggleBar, ToggleRadio, Tooltip, TrashIcon, TrendingDownIcon, TrendingUpIcon, Typography, UndoIcon, UnfoldLessIcon, UnfoldMoreIcon, UploadIcon, VStack, VisibilityOffIcon, VisibilityOnIcon, VisuallyHidden, WarningIcon, WebexIcon, XIcon, ZoomInIcon, ZoomOutIcon, calendarDateToNativeDate, cn, createPurposes, createSelectOptions, createSizes, dateValueToNativeDate, focusVisible, focusVisibleInset, focusVisibleTransitionValue, getBaseHTMLProps, getColorCn, getElementType, handleElementWithBackdropMount, handleElementWithBackdropUnmount, hideInput, icons_exports as icons, inheritLinkStyling, inlineElements, isAnchorTypographyProps, isBorderColor, isBorderRadius, isCaption, isElevation, isHeading, isInlineElement, isKeyboardEvent, isLegend, isPaperBackground, nativeDateToCalendarDate, nativeDateToDateValue, nativeDateToTime, normalizeButton, outlineInset, outlineOffset, removeButtonStyling, removeListStyling, renderInputMessage, scrollbarStyling, useAccordion, useAccordionContext, useCallbackRef, useCombinedRef, useControllableGroupState, useControllableState, useFloatPosition, useFocusTrap, useIsMounted, useMountTransition, useOnClickOutside, useOnKeyDown, useReturnFocusOnBlur, useRoveFocus, useScreenSize, useTheme, useWindowResize };
13064
13107
 
13065
13108
  //# sourceMappingURL=index.mjs.map