@norges-domstoler/dds-components 0.0.0-dev-20260902110237 → 0.0.0-dev-20260903060523

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -9094,10 +9094,12 @@ var NewsPopover_module_default = {
9094
9094
  //#region src/components/NewsPopover/NewsPopover.tsx
9095
9095
  const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultActiveSlide = 0, activeSlide: activeSlideProp, setActiveSlide: setActiveSlideProp, isOpen: isOpenProp, isInitiallyOpen = true, setIsOpen: setIsOpenProp, smallScreenBreakpoint = "xs", closeOnClickOutside = true, ref, ...rest }) => {
9096
9096
  if (news.length === 0) throw new Error("NewsPopover must have at least one item in \"news\" prop");
9097
- if (header.length > 35) console.warn("[NewsPopover] header exceeds recommended length (about 35 characters). This may cause wrapping or layout issues depending on theme.");
9097
+ const maxHeaderLength = 45;
9098
+ const maxTextLength = 150;
9099
+ if (header.length > maxHeaderLength) console.warn(`[NewsPopover] header exceeds recommended length (about ${maxHeaderLength} characters). This may cause wrapping or layout issues depending on theme.`);
9098
9100
  news.forEach((n, i) => {
9099
- if (n.heading.length > 35) console.warn(`[NewsPopover] news[${i}].heading exceeds recommended length (about 35 characters). This may cause wrapping or layout issues depending on theme.`);
9100
- if (n.text.length > 135) console.warn(`[NewsPopover] news[${i}].text exceeds recommended length (about 135 characters). This may cause wrapping or layout issues depending on theme.`);
9101
+ if (n.heading.length > maxHeaderLength) console.warn(`[NewsPopover] news[${i}].heading exceeds recommended length (about ${maxHeaderLength} characters). This may cause wrapping or layout issues depending on theme.`);
9102
+ if (n.text.length > maxTextLength) console.warn(`[NewsPopover] news[${i}].text exceeds recommended length (about ${maxTextLength} characters). This may cause wrapping or layout issues depending on theme.`);
9101
9103
  });
9102
9104
  const { t } = useTranslation();
9103
9105
  const [activeSlide, setActiveSlide] = useControllableState({
@@ -9177,7 +9179,7 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
9177
9179
  role: "dialog",
9178
9180
  "aria-labelledby": headerId,
9179
9181
  height: isList ? "368px" : "327px",
9180
- width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "405px"),
9182
+ width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "500px"),
9181
9183
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(HStack, {
9182
9184
  margin: "x0.75 x3 x0.75 x0.75",
9183
9185
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {