@norges-domstoler/dds-components 0.0.0-dev-20240209091857 → 0.0.0-dev-20240212124253
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.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1855,10 +1855,14 @@ declare const DrawerGroup: {
|
|
|
1855
1855
|
};
|
|
1856
1856
|
|
|
1857
1857
|
type EmptyContentProps = {
|
|
1858
|
+
/**Tittel - kort oppsummering. */
|
|
1858
1859
|
title?: string;
|
|
1860
|
+
/**Nivå på overskriften. Sørg for at den følger hierarkiet på siden. */
|
|
1861
|
+
titleHeadingLevel?: HeadingLevel;
|
|
1862
|
+
/**Melding - beskrivelse og forklaring på hvordan brukeren kan få innhold. */
|
|
1859
1863
|
message: string;
|
|
1860
1864
|
} & HTMLAttributes<HTMLDivElement>;
|
|
1861
|
-
declare function EmptyContent({ title, message, ...rest }: EmptyContentProps): react_jsx_runtime.JSX.Element;
|
|
1865
|
+
declare function EmptyContent({ title, message, titleHeadingLevel, ...rest }: EmptyContentProps): react_jsx_runtime.JSX.Element;
|
|
1862
1866
|
declare namespace EmptyContent {
|
|
1863
1867
|
var displayName: string;
|
|
1864
1868
|
}
|
|
@@ -2597,9 +2601,14 @@ type CheckboxGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2597
2601
|
groupId?: string;
|
|
2598
2602
|
/**Meldingen som vises ved valideringsfeil. Sender error-tilstand til barna når det finnes og setter `aria-describedby` for barna. */
|
|
2599
2603
|
errorMessage?: string;
|
|
2604
|
+
/**Hjelpetekst for gruppen. */
|
|
2600
2605
|
tip?: string;
|
|
2601
2606
|
/**Indikerer at det er påkrevd å velge minst ett alternativ. Innebærer visuell endring. **OBS!** `required` må i tillegg gis til `<Checkbox />` manuelt. */
|
|
2602
2607
|
required?: boolean;
|
|
2608
|
+
/**Gir alle barna `disabled` prop. */
|
|
2609
|
+
disabled?: boolean;
|
|
2610
|
+
/**Gir alle barna `readOnly` prop. */
|
|
2611
|
+
readOnly?: boolean;
|
|
2603
2612
|
}>;
|
|
2604
2613
|
declare const CheckboxGroup: {
|
|
2605
2614
|
(props: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1855,10 +1855,14 @@ declare const DrawerGroup: {
|
|
|
1855
1855
|
};
|
|
1856
1856
|
|
|
1857
1857
|
type EmptyContentProps = {
|
|
1858
|
+
/**Tittel - kort oppsummering. */
|
|
1858
1859
|
title?: string;
|
|
1860
|
+
/**Nivå på overskriften. Sørg for at den følger hierarkiet på siden. */
|
|
1861
|
+
titleHeadingLevel?: HeadingLevel;
|
|
1862
|
+
/**Melding - beskrivelse og forklaring på hvordan brukeren kan få innhold. */
|
|
1859
1863
|
message: string;
|
|
1860
1864
|
} & HTMLAttributes<HTMLDivElement>;
|
|
1861
|
-
declare function EmptyContent({ title, message, ...rest }: EmptyContentProps): react_jsx_runtime.JSX.Element;
|
|
1865
|
+
declare function EmptyContent({ title, message, titleHeadingLevel, ...rest }: EmptyContentProps): react_jsx_runtime.JSX.Element;
|
|
1862
1866
|
declare namespace EmptyContent {
|
|
1863
1867
|
var displayName: string;
|
|
1864
1868
|
}
|
|
@@ -2597,9 +2601,14 @@ type CheckboxGroupProps = BaseComponentPropsWithChildren<HTMLDivElement, {
|
|
|
2597
2601
|
groupId?: string;
|
|
2598
2602
|
/**Meldingen som vises ved valideringsfeil. Sender error-tilstand til barna når det finnes og setter `aria-describedby` for barna. */
|
|
2599
2603
|
errorMessage?: string;
|
|
2604
|
+
/**Hjelpetekst for gruppen. */
|
|
2600
2605
|
tip?: string;
|
|
2601
2606
|
/**Indikerer at det er påkrevd å velge minst ett alternativ. Innebærer visuell endring. **OBS!** `required` må i tillegg gis til `<Checkbox />` manuelt. */
|
|
2602
2607
|
required?: boolean;
|
|
2608
|
+
/**Gir alle barna `disabled` prop. */
|
|
2609
|
+
disabled?: boolean;
|
|
2610
|
+
/**Gir alle barna `readOnly` prop. */
|
|
2611
|
+
readOnly?: boolean;
|
|
2603
2612
|
}>;
|
|
2604
2613
|
declare const CheckboxGroup: {
|
|
2605
2614
|
(props: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -7301,10 +7301,15 @@ var StyledEmptyContentText = import_styled_components46.default.div`
|
|
|
7301
7301
|
flex-direction: column;
|
|
7302
7302
|
gap: ${spacing16.SizesDdsSpacingX1};
|
|
7303
7303
|
`;
|
|
7304
|
-
function EmptyContent({
|
|
7304
|
+
function EmptyContent({
|
|
7305
|
+
title: title3,
|
|
7306
|
+
message: message2,
|
|
7307
|
+
titleHeadingLevel = 5,
|
|
7308
|
+
...rest
|
|
7309
|
+
}) {
|
|
7305
7310
|
return /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(StyledEmptyContent, { ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime207.jsxs)(StyledEmptyContentText, { children: [
|
|
7306
|
-
title3 && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7307
|
-
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(
|
|
7311
|
+
title3 && /* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Heading, { level: titleHeadingLevel, children: title3 }),
|
|
7312
|
+
/* @__PURE__ */ (0, import_jsx_runtime207.jsx)(Paragraph, { children: message2 })
|
|
7308
7313
|
] }) });
|
|
7309
7314
|
}
|
|
7310
7315
|
EmptyContent.displayName = "EmptyContent";
|
|
@@ -11928,6 +11933,11 @@ var import_dds_design_tokens55 = require("@norges-domstoler/dds-design-tokens");
|
|
|
11928
11933
|
// src/components/SelectionControl/SelectionControl.utils.tsx
|
|
11929
11934
|
var selectionControlSizeNumberPx = 18;
|
|
11930
11935
|
var selectionControlSize = `${selectionControlSizeNumberPx}px`;
|
|
11936
|
+
var selectionControlTypographyProps = {
|
|
11937
|
+
color: "inherit",
|
|
11938
|
+
typographyType: "bodySans02",
|
|
11939
|
+
as: "span"
|
|
11940
|
+
};
|
|
11931
11941
|
|
|
11932
11942
|
// src/components/SelectionControl/SelectionControl.tokens.tsx
|
|
11933
11943
|
var { colors: colors29, spacing: spacing33, borderRadius: borderRadius8 } = import_dds_design_tokens55.ddsBaseTokens;
|
|
@@ -12142,6 +12152,9 @@ var Container13 = import_styled_components77.default.label`
|
|
|
12142
12152
|
display: block;
|
|
12143
12153
|
}
|
|
12144
12154
|
|
|
12155
|
+
${({ $readOnly }) => $readOnly && import_styled_components77.css`
|
|
12156
|
+
cursor: default;
|
|
12157
|
+
`}
|
|
12145
12158
|
${({ disabled }) => disabled && import_styled_components77.css`
|
|
12146
12159
|
cursor: not-allowed;
|
|
12147
12160
|
color: ${container14.disabled.color};
|
|
@@ -12219,7 +12232,8 @@ var Checkbox = (0, import_react89.forwardRef)(
|
|
|
12219
12232
|
Container13,
|
|
12220
12233
|
{
|
|
12221
12234
|
$error: error || (checkboxGroup == null ? void 0 : checkboxGroup.error),
|
|
12222
|
-
disabled,
|
|
12235
|
+
disabled: disabled || (checkboxGroup == null ? void 0 : checkboxGroup.disabled),
|
|
12236
|
+
$readOnly: readOnly || (checkboxGroup == null ? void 0 : checkboxGroup.readOnly),
|
|
12223
12237
|
htmlFor: uniqueId,
|
|
12224
12238
|
$hasLabel: hasLabel,
|
|
12225
12239
|
$controlType: "checkbox",
|
|
@@ -12232,7 +12246,7 @@ var Checkbox = (0, import_react89.forwardRef)(
|
|
|
12232
12246
|
...getBaseHTMLProps(uniqueId, restHtmlProps, rest),
|
|
12233
12247
|
ref,
|
|
12234
12248
|
name,
|
|
12235
|
-
disabled,
|
|
12249
|
+
disabled: disabled || readOnly || !!(checkboxGroup == null ? void 0 : checkboxGroup.disabled) || !!(checkboxGroup == null ? void 0 : checkboxGroup.readOnly),
|
|
12236
12250
|
"aria-describedby": spaceSeparatedIdListGenerator([
|
|
12237
12251
|
checkboxGroup == null ? void 0 : checkboxGroup.tipId,
|
|
12238
12252
|
checkboxGroup == null ? void 0 : checkboxGroup.errorMessageId,
|
|
@@ -12247,7 +12261,7 @@ var Checkbox = (0, import_react89.forwardRef)(
|
|
|
12247
12261
|
}
|
|
12248
12262
|
),
|
|
12249
12263
|
/* @__PURE__ */ (0, import_jsx_runtime246.jsx)(CustomSelectionControl, { $controlType: "checkbox" }),
|
|
12250
|
-
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Typography, {
|
|
12264
|
+
hasLabel && /* @__PURE__ */ (0, import_jsx_runtime246.jsx)(Typography, { ...selectionControlTypographyProps, children: label3 })
|
|
12251
12265
|
]
|
|
12252
12266
|
}
|
|
12253
12267
|
);
|
|
@@ -12265,6 +12279,8 @@ var CheckboxGroup = (props) => {
|
|
|
12265
12279
|
errorMessage,
|
|
12266
12280
|
tip,
|
|
12267
12281
|
required = false,
|
|
12282
|
+
disabled = false,
|
|
12283
|
+
readOnly = false,
|
|
12268
12284
|
groupId,
|
|
12269
12285
|
children,
|
|
12270
12286
|
id,
|
|
@@ -12283,7 +12299,9 @@ var CheckboxGroup = (props) => {
|
|
|
12283
12299
|
error: hasErrorMessage,
|
|
12284
12300
|
errorMessageId: errorMessage ? errorMessageId : void 0,
|
|
12285
12301
|
uniqueGroupId,
|
|
12286
|
-
tipId: tip ? tipId : void 0
|
|
12302
|
+
tipId: tip ? tipId : void 0,
|
|
12303
|
+
disabled,
|
|
12304
|
+
readOnly
|
|
12287
12305
|
};
|
|
12288
12306
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(
|
|
12289
12307
|
OuterGroupContainer,
|
|
@@ -12410,7 +12428,7 @@ var RadioButton = (0, import_react92.forwardRef)(
|
|
|
12410
12428
|
children: [
|
|
12411
12429
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(HiddenInput, { ...inputProps, ref }),
|
|
12412
12430
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(CustomSelectionControl, { $controlType: "radio" }),
|
|
12413
|
-
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Typography, {
|
|
12431
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Typography, { ...selectionControlTypographyProps, children: children != null ? children : label3 })
|
|
12414
12432
|
]
|
|
12415
12433
|
}
|
|
12416
12434
|
);
|