@norges-domstoler/dds-components 0.0.0-dev-20260605084306 → 0.0.0-dev-20260608090013
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.css +17 -19
- package/dist/index.css.map +1 -1
- package/dist/index.js +27 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -6785,7 +6785,6 @@ var DateInput_default = {
|
|
|
6785
6785
|
segment: "DateInput_segment",
|
|
6786
6786
|
segment__placeholder: "DateInput_segment__placeholder",
|
|
6787
6787
|
"segment__placeholder--invisible": "DateInput_segment__placeholder--invisible",
|
|
6788
|
-
"clear-button--inactive": "DateInput_clear-button--inactive",
|
|
6789
6788
|
"icon-wrapper--disabled": "DateInput_icon-wrapper--disabled",
|
|
6790
6789
|
"popover-button": "DateInput_popover-button",
|
|
6791
6790
|
"icon-wrapper--readonly": "DateInput_icon-wrapper--readonly",
|
|
@@ -6801,8 +6800,8 @@ var DateInput_default = {
|
|
|
6801
6800
|
"calendar__cell-button": "DateInput_calendar__cell-button",
|
|
6802
6801
|
"calendar__cell-button--today": "DateInput_calendar__cell-button--today",
|
|
6803
6802
|
"calendar__cell-button--default": "DateInput_calendar__cell-button--default",
|
|
6804
|
-
"calendar__cell-button--selected": "DateInput_calendar__cell-button--selected",
|
|
6805
6803
|
"calendar__cell-button--unavailable": "DateInput_calendar__cell-button--unavailable",
|
|
6804
|
+
"calendar__cell-button--selected": "DateInput_calendar__cell-button--selected",
|
|
6806
6805
|
"calendar__cell-button--unavailable--today": "DateInput_calendar__cell-button--unavailable--today"
|
|
6807
6806
|
};
|
|
6808
6807
|
|
|
@@ -6829,28 +6828,31 @@ function CalendarCell({ date, state, onClose }) {
|
|
|
6829
6828
|
isDisabled,
|
|
6830
6829
|
isUnavailable
|
|
6831
6830
|
} = (0, import_calendar.useCalendarCell)({ date }, state, ref);
|
|
6832
|
-
if (
|
|
6831
|
+
if (isOutsideVisibleRange) {
|
|
6833
6832
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("td", { ...cellProps });
|
|
6834
6833
|
}
|
|
6835
|
-
const variant = isSelected ? "selected" : isUnavailable || isDisabled ? "unavailable" : "default";
|
|
6836
6834
|
const closeOnKeyboardBlurForward = (event) => {
|
|
6837
6835
|
if (event.key === "Tab" && event.shiftKey === false) {
|
|
6838
6836
|
onClose();
|
|
6839
6837
|
}
|
|
6840
6838
|
};
|
|
6839
|
+
const isEffectivelyUnavailable = isUnavailable || isDisabled;
|
|
6840
|
+
const isUnavailableToday = isEffectivelyUnavailable && (0, import_date.isToday)(date, timezone);
|
|
6841
6841
|
return /* @__PURE__ */ (0, import_jsx_runtime241.jsx)("td", { ...cellProps, children: /* @__PURE__ */ (0, import_jsx_runtime241.jsx)(
|
|
6842
6842
|
"button",
|
|
6843
6843
|
{
|
|
6844
6844
|
...buttonProps,
|
|
6845
6845
|
type: "button",
|
|
6846
6846
|
ref,
|
|
6847
|
-
hidden: isOutsideVisibleRange,
|
|
6848
6847
|
onKeyDown: closeOnKeyboardBlurForward,
|
|
6849
6848
|
className: cn(
|
|
6850
6849
|
DateInput_default["calendar__grid-element"],
|
|
6851
6850
|
DateInput_default["calendar__cell-button"],
|
|
6852
6851
|
(0, import_date.isToday)(date, timezone) && DateInput_default["calendar__cell-button--today"],
|
|
6853
|
-
DateInput_default[`calendar__cell-button
|
|
6852
|
+
DateInput_default[`calendar__cell-button--default`],
|
|
6853
|
+
isSelected && DateInput_default[`calendar__cell-button--selected`],
|
|
6854
|
+
isEffectivelyUnavailable && DateInput_default[`calendar__cell-button--unavailable`],
|
|
6855
|
+
isUnavailableToday && DateInput_default["calendar__cell-button--unavailable--today"],
|
|
6854
6856
|
typographyStyles_default["body-short-small"],
|
|
6855
6857
|
focusable
|
|
6856
6858
|
),
|
|
@@ -7223,6 +7225,8 @@ function Calendar(props) {
|
|
|
7223
7225
|
nextButtonProps: { onPress: onNext },
|
|
7224
7226
|
title
|
|
7225
7227
|
} = (0, import_calendar3.useCalendar)(props, state);
|
|
7228
|
+
const isPrevDisabled = !!props.minValue && state.visibleRange.start.compare(props.minValue) <= 0;
|
|
7229
|
+
const isNextDisabled = !!props.maxValue && state.visibleRange.end.compare(props.maxValue) >= 0;
|
|
7226
7230
|
const { onClose, closeButtonRef } = (0, import_react43.useContext)(CalendarPopoverContext);
|
|
7227
7231
|
const closeOnKeyboardBlurBack = (event) => {
|
|
7228
7232
|
var _a;
|
|
@@ -7237,6 +7241,7 @@ function Calendar(props) {
|
|
|
7237
7241
|
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
7238
7242
|
Button,
|
|
7239
7243
|
{
|
|
7244
|
+
"aria-hidden": optAttr(isPrevDisabled),
|
|
7240
7245
|
type: "button",
|
|
7241
7246
|
"aria-label": t(texts7.previousMonth),
|
|
7242
7247
|
onClick: (e) => onPrev == null ? void 0 : onPrev(e),
|
|
@@ -7244,7 +7249,10 @@ function Calendar(props) {
|
|
|
7244
7249
|
purpose: "tertiary",
|
|
7245
7250
|
icon: ArrowLeftIcon,
|
|
7246
7251
|
htmlProps: { onKeyDown: closeOnKeyboardBlurBack },
|
|
7247
|
-
className:
|
|
7252
|
+
className: cn(
|
|
7253
|
+
DateInput_default["calendar__month-button"],
|
|
7254
|
+
isPrevDisabled && utilStyles_default.invisible
|
|
7255
|
+
)
|
|
7248
7256
|
}
|
|
7249
7257
|
),
|
|
7250
7258
|
/* @__PURE__ */ (0, import_jsx_runtime244.jsx)(
|
|
@@ -7260,12 +7268,16 @@ function Calendar(props) {
|
|
|
7260
7268
|
Button,
|
|
7261
7269
|
{
|
|
7262
7270
|
type: "button",
|
|
7271
|
+
"aria-hidden": optAttr(isNextDisabled),
|
|
7263
7272
|
"aria-label": t(texts7.nextMonth),
|
|
7264
7273
|
onClick: (e) => onNext == null ? void 0 : onNext(e),
|
|
7265
7274
|
size: "small",
|
|
7266
7275
|
purpose: "tertiary",
|
|
7267
7276
|
icon: ArrowRightIcon,
|
|
7268
|
-
className:
|
|
7277
|
+
className: cn(
|
|
7278
|
+
DateInput_default["calendar__month-button"],
|
|
7279
|
+
isNextDisabled && utilStyles_default.invisible
|
|
7280
|
+
)
|
|
7269
7281
|
}
|
|
7270
7282
|
)
|
|
7271
7283
|
] }),
|
|
@@ -7760,7 +7772,7 @@ function DateField({
|
|
|
7760
7772
|
absolute: true,
|
|
7761
7773
|
"aria-label": t(texts9.clearDate),
|
|
7762
7774
|
"aria-hidden": !hasValue,
|
|
7763
|
-
className: cn(!hasValue &&
|
|
7775
|
+
className: cn(!hasValue && utilStyles_default.invisible),
|
|
7764
7776
|
size: componentSize,
|
|
7765
7777
|
onClick: clearDate
|
|
7766
7778
|
}
|
|
@@ -11397,7 +11409,6 @@ var import_react76 = require("react");
|
|
|
11397
11409
|
var Pagination_default = {
|
|
11398
11410
|
list: "Pagination_list",
|
|
11399
11411
|
list__item: "Pagination_list__item",
|
|
11400
|
-
"list__item--hidden": "Pagination_list__item--hidden",
|
|
11401
11412
|
indicators: "Pagination_indicators",
|
|
11402
11413
|
"truncation-icon": "Pagination_truncation-icon"
|
|
11403
11414
|
};
|
|
@@ -12288,7 +12299,7 @@ var Pagination = ({
|
|
|
12288
12299
|
{
|
|
12289
12300
|
className: cn(
|
|
12290
12301
|
Pagination_default.list__item,
|
|
12291
|
-
isOnFirstPage &&
|
|
12302
|
+
isOnFirstPage && utilStyles_default.invisible
|
|
12292
12303
|
),
|
|
12293
12304
|
"aria-hidden": isOnFirstPage,
|
|
12294
12305
|
children: previousPageButton
|
|
@@ -12300,7 +12311,7 @@ var Pagination = ({
|
|
|
12300
12311
|
{
|
|
12301
12312
|
className: cn(
|
|
12302
12313
|
Pagination_default.list__item,
|
|
12303
|
-
isOnLastPage &&
|
|
12314
|
+
isOnLastPage && utilStyles_default.invisible
|
|
12304
12315
|
),
|
|
12305
12316
|
"aria-hidden": isOnLastPage,
|
|
12306
12317
|
children: nextPageButton
|
|
@@ -12321,7 +12332,7 @@ var Pagination = ({
|
|
|
12321
12332
|
{
|
|
12322
12333
|
className: cn(
|
|
12323
12334
|
Pagination_default.list__item,
|
|
12324
|
-
isOnFirstPage &&
|
|
12335
|
+
isOnFirstPage && utilStyles_default.invisible
|
|
12325
12336
|
),
|
|
12326
12337
|
"aria-hidden": isOnFirstPage,
|
|
12327
12338
|
children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|
|
@@ -12343,7 +12354,7 @@ var Pagination = ({
|
|
|
12343
12354
|
{
|
|
12344
12355
|
className: cn(
|
|
12345
12356
|
Pagination_default.list__item,
|
|
12346
|
-
isOnFirstPage &&
|
|
12357
|
+
isOnFirstPage && utilStyles_default.invisible
|
|
12347
12358
|
),
|
|
12348
12359
|
"aria-hidden": isOnFirstPage,
|
|
12349
12360
|
children: previousPageButton
|
|
@@ -12364,7 +12375,7 @@ var Pagination = ({
|
|
|
12364
12375
|
{
|
|
12365
12376
|
className: cn(
|
|
12366
12377
|
Pagination_default.list__item,
|
|
12367
|
-
isOnLastPage &&
|
|
12378
|
+
isOnLastPage && utilStyles_default.invisible
|
|
12368
12379
|
),
|
|
12369
12380
|
"aria-hidden": isOnLastPage,
|
|
12370
12381
|
children: nextPageButton
|
|
@@ -12375,7 +12386,7 @@ var Pagination = ({
|
|
|
12375
12386
|
{
|
|
12376
12387
|
className: cn(
|
|
12377
12388
|
Pagination_default.list__item,
|
|
12378
|
-
isOnLastPage &&
|
|
12389
|
+
isOnLastPage && utilStyles_default.invisible
|
|
12379
12390
|
),
|
|
12380
12391
|
"aria-hidden": isOnLastPage,
|
|
12381
12392
|
children: /* @__PURE__ */ (0, import_jsx_runtime310.jsx)(
|