@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.mjs CHANGED
@@ -5030,9 +5030,9 @@ var DateInput_default = {
5030
5030
  popover: "DateInput_popover",
5031
5031
  "modal-close-button-wrapper": "DateInput_modal-close-button-wrapper",
5032
5032
  calendar: "DateInput_calendar",
5033
- calendar__header: "DateInput_calendar__header",
5034
5033
  calendar__header__month: "DateInput_calendar__header__month",
5035
5034
  "calendar__month-button": "DateInput_calendar__month-button",
5035
+ "calendar__grid-element": "DateInput_calendar__grid-element",
5036
5036
  "calendar__week-number": "DateInput_calendar__week-number",
5037
5037
  "calendar__cell-button": "DateInput_calendar__cell-button",
5038
5038
  "calendar__cell-button--today": "DateInput_calendar__cell-button--today",
@@ -5077,6 +5077,7 @@ function CalendarCell({ date, state, onClose }) {
5077
5077
  hidden: isOutsideVisibleRange,
5078
5078
  onKeyDown: closeOnKeyboardBlurForward,
5079
5079
  className: cn(
5080
+ DateInput_default["calendar__grid-element"],
5080
5081
  DateInput_default["calendar__cell-button"],
5081
5082
  isToday(date, timezone) && DateInput_default["calendar__cell-button--today"],
5082
5083
  DateInput_default[`calendar__cell-button--${variant}`],
@@ -5279,6 +5280,11 @@ var CalendarPopoverContent = ({
5279
5280
  }
5280
5281
  };
5281
5282
  if (!isOpen) return null;
5283
+ const paperStyleProps = {
5284
+ elevation: 2,
5285
+ border: "border-default",
5286
+ padding: "x0.75"
5287
+ };
5282
5288
  return /* @__PURE__ */ jsxs40(Fragment4, { children: [
5283
5289
  portalTarget && hasBreakpoint && createPortal(
5284
5290
  /* @__PURE__ */ jsx220(ShowHide, { showBelow: smallScreenBreakpoint, children: /* @__PURE__ */ jsx220(Backdrop, { zIndex: "modal", isMounted, children: /* @__PURE__ */ jsxs40(
@@ -5286,9 +5292,7 @@ var CalendarPopoverContent = ({
5286
5292
  {
5287
5293
  ref: modalRef,
5288
5294
  className: cn(DateInput_default.popover, className),
5289
- elevation: 2,
5290
- border: "border-default",
5291
- padding: "x0.5",
5295
+ ...paperStyleProps,
5292
5296
  children: [
5293
5297
  /* @__PURE__ */ jsx220("div", { className: DateInput_default["modal-close-button-wrapper"], children: /* @__PURE__ */ jsx220(
5294
5298
  Button,
@@ -5315,8 +5319,7 @@ var CalendarPopoverContent = ({
5315
5319
  hideBelow: hasBreakpoint ? smallScreenBreakpoint : void 0,
5316
5320
  className: cn(DateInput_default.popover, className),
5317
5321
  style: floatingStyles.floating,
5318
- elevation: 2,
5319
- border: "border-default",
5322
+ ...paperStyleProps,
5320
5323
  children
5321
5324
  }
5322
5325
  )
@@ -5351,10 +5354,16 @@ function CalendarGrid({ state, ...props }) {
5351
5354
  cellPadding: "0",
5352
5355
  children: [
5353
5356
  /* @__PURE__ */ jsx221("thead", { ...headerProps, children: /* @__PURE__ */ jsxs41("tr", { children: [
5354
- showWeekNumbers && /* @__PURE__ */ jsxs41("th", { className: cn(...typographyCn), children: [
5355
- "# ",
5356
- /* @__PURE__ */ jsx221(VisuallyHidden, { as: "span", children: "Ukenummer" })
5357
- ] }),
5357
+ showWeekNumbers && /* @__PURE__ */ jsxs41(
5358
+ "th",
5359
+ {
5360
+ className: cn(DateInput_default["calendar__grid-element"], ...typographyCn),
5361
+ children: [
5362
+ "# ",
5363
+ /* @__PURE__ */ jsx221(VisuallyHidden, { as: "span", children: "Ukenummer" })
5364
+ ]
5365
+ }
5366
+ ),
5358
5367
  weekDays.map((day, index) => /* @__PURE__ */ jsx221("th", { className: cn(...typographyCn), children: day }, index))
5359
5368
  ] }) }),
5360
5369
  /* @__PURE__ */ jsx221("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => {
@@ -5366,6 +5375,7 @@ function CalendarGrid({ state, ...props }) {
5366
5375
  "td",
5367
5376
  {
5368
5377
  className: cn(
5378
+ DateInput_default["calendar__grid-element"],
5369
5379
  DateInput_default["calendar__week-number"],
5370
5380
  ...typographyCn
5371
5381
  ),
@@ -5424,7 +5434,7 @@ function Calendar(props) {
5424
5434
  }
5425
5435
  };
5426
5436
  return /* @__PURE__ */ jsxs42("div", { ...calendarProps, className: DateInput_default.calendar, children: [
5427
- /* @__PURE__ */ jsxs42("div", { className: DateInput_default.calendar__header, children: [
5437
+ /* @__PURE__ */ jsxs42(HStack, { justifyContent: "space-between", alignItems: "center", children: [
5428
5438
  /* @__PURE__ */ jsx222(
5429
5439
  Button,
5430
5440
  {
@@ -11333,7 +11343,8 @@ var SplitButton = ({
11333
11343
  className: cn(
11334
11344
  SplitButton_default.option,
11335
11345
  purpose === "primary" && SplitButton_default["option--primary"]
11336
- )
11346
+ ),
11347
+ type: "button"
11337
11348
  }
11338
11349
  ),
11339
11350
  /* @__PURE__ */ jsx293(OverflowMenu, { placement: "bottom-end", children: /* @__PURE__ */ jsx293(OverflowMenuList, { children: secondaryActions.map((item, index) => /* @__PURE__ */ jsx293(OverflowMenuButton, { ...item, children: item.children }, index)) }) })