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

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
@@ -9061,10 +9061,12 @@ var NewsPopover_module_default = {
9061
9061
  //#region src/components/NewsPopover/NewsPopover.tsx
9062
9062
  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 }) => {
9063
9063
  if (news.length === 0) throw new Error("NewsPopover must have at least one item in \"news\" prop");
9064
- if (header.length > 35) console.warn("[NewsPopover] header exceeds recommended length (about 35 characters). This may cause wrapping or layout issues depending on theme.");
9064
+ const maxHeaderLength = 45;
9065
+ const maxTextLength = 150;
9066
+ if (header.length > maxHeaderLength) console.warn(`[NewsPopover] header exceeds recommended length (about ${maxHeaderLength} characters). This may cause wrapping or layout issues depending on theme.`);
9065
9067
  news.forEach((n, i) => {
9066
- 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.`);
9067
- 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.`);
9068
+ 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.`);
9069
+ 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.`);
9068
9070
  });
9069
9071
  const { t } = useTranslation();
9070
9072
  const [activeSlide, setActiveSlide] = useControllableState({
@@ -9103,7 +9105,8 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
9103
9105
  }), /* @__PURE__ */ jsxs(VStack, {
9104
9106
  gap: "x0.75",
9105
9107
  alignItems: "center",
9106
- margin: "x0.75 x0.75 x1 x0.75",
9108
+ margin: "x0.75 x0.75 0 x0.75",
9109
+ height: styleUpToBreakpoint("100%", smallScreenBreakpoint, "130px"),
9107
9110
  children: [/* @__PURE__ */ jsx(Heading, {
9108
9111
  level: 3,
9109
9112
  children: el.heading
@@ -9143,8 +9146,7 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
9143
9146
  border: "border-subtle",
9144
9147
  role: "dialog",
9145
9148
  "aria-labelledby": headerId,
9146
- height: isList ? "368px" : "327px",
9147
- width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "405px"),
9149
+ width: styleUpToBreakpoint("100%", smallScreenBreakpoint, "500px"),
9148
9150
  children: [/* @__PURE__ */ jsx(HStack, {
9149
9151
  margin: "x0.75 x3 x0.75 x0.75",
9150
9152
  children: /* @__PURE__ */ jsx(Heading, {
@@ -9155,14 +9157,13 @@ const NewsPopover = ({ id, className, style, htmlProps, header, news, defaultAct
9155
9157
  })
9156
9158
  }), /* @__PURE__ */ jsxs(VStack, {
9157
9159
  alignItems: "center",
9158
- height: isList ? "299px" : void 0,
9159
9160
  "aria-live": "polite",
9161
+ marginBlock: "0 x1.5",
9160
9162
  children: [
9161
9163
  content,
9162
9164
  isList && /* @__PURE__ */ jsxs(HStack, {
9163
9165
  alignItems: "center",
9164
9166
  gap: "x1",
9165
- marginBlock: "auto 0",
9166
9167
  children: [
9167
9168
  /* @__PURE__ */ jsx(Button, {
9168
9169
  "aria-label": t(commonTexts.previousPage),