@norges-domstoler/dds-components 21.2.1 → 21.2.2

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.js CHANGED
@@ -5379,9 +5379,9 @@ var DateInput_default = {
5379
5379
  popover: "DateInput_popover",
5380
5380
  "modal-close-button-wrapper": "DateInput_modal-close-button-wrapper",
5381
5381
  calendar: "DateInput_calendar",
5382
- calendar__header: "DateInput_calendar__header",
5383
5382
  calendar__header__month: "DateInput_calendar__header__month",
5384
5383
  "calendar__month-button": "DateInput_calendar__month-button",
5384
+ "calendar__grid-element": "DateInput_calendar__grid-element",
5385
5385
  "calendar__week-number": "DateInput_calendar__week-number",
5386
5386
  "calendar__cell-button": "DateInput_calendar__cell-button",
5387
5387
  "calendar__cell-button--today": "DateInput_calendar__cell-button--today",
@@ -5426,6 +5426,7 @@ function CalendarCell({ date, state, onClose }) {
5426
5426
  hidden: isOutsideVisibleRange,
5427
5427
  onKeyDown: closeOnKeyboardBlurForward,
5428
5428
  className: cn(
5429
+ DateInput_default["calendar__grid-element"],
5429
5430
  DateInput_default["calendar__cell-button"],
5430
5431
  (0, import_date.isToday)(date, timezone) && DateInput_default["calendar__cell-button--today"],
5431
5432
  DateInput_default[`calendar__cell-button--${variant}`],
@@ -5613,6 +5614,11 @@ var CalendarPopoverContent = ({
5613
5614
  }
5614
5615
  };
5615
5616
  if (!isOpen) return null;
5617
+ const paperStyleProps = {
5618
+ elevation: 2,
5619
+ border: "border-default",
5620
+ padding: "x0.75"
5621
+ };
5616
5622
  return /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(import_jsx_runtime220.Fragment, { children: [
5617
5623
  portalTarget && hasBreakpoint && (0, import_react_dom2.createPortal)(
5618
5624
  /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(ShowHide, { showBelow: smallScreenBreakpoint, children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(Backdrop, { zIndex: "modal", isMounted, children: /* @__PURE__ */ (0, import_jsx_runtime220.jsxs)(
@@ -5620,9 +5626,7 @@ var CalendarPopoverContent = ({
5620
5626
  {
5621
5627
  ref: modalRef,
5622
5628
  className: cn(DateInput_default.popover, className),
5623
- elevation: 2,
5624
- border: "border-default",
5625
- padding: "x0.5",
5629
+ ...paperStyleProps,
5626
5630
  children: [
5627
5631
  /* @__PURE__ */ (0, import_jsx_runtime220.jsx)("div", { className: DateInput_default["modal-close-button-wrapper"], children: /* @__PURE__ */ (0, import_jsx_runtime220.jsx)(
5628
5632
  Button,
@@ -5649,8 +5653,7 @@ var CalendarPopoverContent = ({
5649
5653
  hideBelow: hasBreakpoint ? smallScreenBreakpoint : void 0,
5650
5654
  className: cn(DateInput_default.popover, className),
5651
5655
  style: floatingStyles.floating,
5652
- elevation: 2,
5653
- border: "border-default",
5656
+ ...paperStyleProps,
5654
5657
  children
5655
5658
  }
5656
5659
  )
@@ -5685,10 +5688,16 @@ function CalendarGrid({ state, ...props }) {
5685
5688
  cellPadding: "0",
5686
5689
  children: [
5687
5690
  /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("thead", { ...headerProps, children: /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("tr", { children: [
5688
- showWeekNumbers && /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)("th", { className: cn(...typographyCn), children: [
5689
- "# ",
5690
- /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(VisuallyHidden, { as: "span", children: "Ukenummer" })
5691
- ] }),
5691
+ showWeekNumbers && /* @__PURE__ */ (0, import_jsx_runtime221.jsxs)(
5692
+ "th",
5693
+ {
5694
+ className: cn(DateInput_default["calendar__grid-element"], ...typographyCn),
5695
+ children: [
5696
+ "# ",
5697
+ /* @__PURE__ */ (0, import_jsx_runtime221.jsx)(VisuallyHidden, { as: "span", children: "Ukenummer" })
5698
+ ]
5699
+ }
5700
+ ),
5692
5701
  weekDays.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("th", { className: cn(...typographyCn), children: day }, index))
5693
5702
  ] }) }),
5694
5703
  /* @__PURE__ */ (0, import_jsx_runtime221.jsx)("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => {
@@ -5700,6 +5709,7 @@ function CalendarGrid({ state, ...props }) {
5700
5709
  "td",
5701
5710
  {
5702
5711
  className: cn(
5712
+ DateInput_default["calendar__grid-element"],
5703
5713
  DateInput_default["calendar__week-number"],
5704
5714
  ...typographyCn
5705
5715
  ),
@@ -5758,7 +5768,7 @@ function Calendar(props) {
5758
5768
  }
5759
5769
  };
5760
5770
  return /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { ...calendarProps, className: DateInput_default.calendar, children: [
5761
- /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)("div", { className: DateInput_default.calendar__header, children: [
5771
+ /* @__PURE__ */ (0, import_jsx_runtime222.jsxs)(HStack, { justifyContent: "space-between", alignItems: "center", children: [
5762
5772
  /* @__PURE__ */ (0, import_jsx_runtime222.jsx)(
5763
5773
  Button,
5764
5774
  {
@@ -11581,7 +11591,8 @@ var SplitButton = ({
11581
11591
  className: cn(
11582
11592
  SplitButton_default.option,
11583
11593
  purpose === "primary" && SplitButton_default["option--primary"]
11584
- )
11594
+ ),
11595
+ type: "button"
11585
11596
  }
11586
11597
  ),
11587
11598
  /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime294.jsx)(OverflowMenuButton, { ...item, children: item.children }, index)) }) })