@digdir/designsystemet-react 1.13.3 → 1.14.0
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/cjs/components/checkbox/checkbox.js +2 -2
- package/dist/cjs/components/radio/radio.js +2 -2
- package/dist/cjs/components/suggestion/suggestion-clear.js +2 -4
- package/dist/cjs/components/switch/switch.js +2 -2
- package/dist/esm/components/checkbox/checkbox.js +2 -2
- package/dist/esm/components/radio/radio.js +2 -2
- package/dist/esm/components/suggestion/suggestion-clear.js +2 -4
- package/dist/esm/components/switch/switch.js +2 -2
- package/dist/types/components/button/button.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/types/components/error-summary/error-summary.d.ts +3 -2
- package/dist/types/components/error-summary/error-summary.d.ts.map +1 -1
- package/dist/types/components/radio/radio.d.ts +4 -0
- package/dist/types/components/radio/radio.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +1 -1
- package/dist/types/components/suggestion/suggestion-clear.d.ts +4 -4
- package/dist/types/components/suggestion/suggestion-clear.d.ts.map +1 -1
- package/dist/types/components/switch/switch.d.ts +4 -0
- package/dist/types/components/switch/switch.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -14,8 +14,8 @@ var validationMessage = require('../validation-message/validation-message.js');
|
|
|
14
14
|
* @example
|
|
15
15
|
* <Checkbox label="I agree" value="agree" />
|
|
16
16
|
*/
|
|
17
|
-
const Checkbox = react.forwardRef(function Checkbox({ 'data-size': size, className, style, children, label: label$1, description, error, ...rest }, ref) {
|
|
18
|
-
return (jsxRuntime.jsxs(index.Field, { "data-size": size, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
17
|
+
const Checkbox = react.forwardRef(function Checkbox({ 'data-size': size, className, style, children, label: label$1, description, error, variant, ...rest }, ref) {
|
|
18
|
+
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
exports.Checkbox = Checkbox;
|
|
@@ -14,8 +14,8 @@ var validationMessage = require('../validation-message/validation-message.js');
|
|
|
14
14
|
* @example
|
|
15
15
|
* <Radio label="I agree" value="agree" />
|
|
16
16
|
*/
|
|
17
|
-
const Radio = react.forwardRef(function Radio({ 'data-size': size, className, style, children, label: label$1, description, error, ...rest }, ref) {
|
|
18
|
-
return (jsxRuntime.jsxs(index.Field, { "data-size": size, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'radio', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
17
|
+
const Radio = react.forwardRef(function Radio({ 'data-size': size, className, style, children, label: label$1, description, error, variant, ...rest }, ref) {
|
|
18
|
+
return (jsxRuntime.jsxs(index.Field, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'radio', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description }), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
exports.Radio = Radio;
|
|
@@ -17,10 +17,8 @@ var react = require('react');
|
|
|
17
17
|
* </Suggestion>
|
|
18
18
|
*/
|
|
19
19
|
const SuggestionClear = react.forwardRef(function SuggestionClear({ 'aria-label': label = 'Tøm', ...rest }, ref) {
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
jsxRuntime.jsx("del", { "aria-label": label, hidden: true, ref: ref, suppressHydrationWarning // Since <ds-suggestion> adds attributes
|
|
23
|
-
: true, ...rest }));
|
|
20
|
+
return (jsxRuntime.jsx("button", { "aria-label": label, hidden: true, ref: ref, suppressHydrationWarning // Since <ds-suggestion> adds attributes
|
|
21
|
+
: true, type: 'reset', ...rest }));
|
|
24
22
|
});
|
|
25
23
|
|
|
26
24
|
exports.SuggestionClear = SuggestionClear;
|
|
@@ -13,8 +13,8 @@ var label = require('../label/label.js');
|
|
|
13
13
|
* @example
|
|
14
14
|
* <Switch label="I agree" value="agree" />
|
|
15
15
|
*/
|
|
16
|
-
const Switch = react.forwardRef(function Switch({ 'data-size': size, children, className, description, label: label$1, position, style, ...rest }, ref) {
|
|
17
|
-
return (jsxRuntime.jsxs(index.Field, { className: className, "data-position": position, "data-size": size, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', role: 'switch', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description })] }));
|
|
16
|
+
const Switch = react.forwardRef(function Switch({ 'data-size': size, children, className, description, label: label$1, position, style, variant, ...rest }, ref) {
|
|
17
|
+
return (jsxRuntime.jsxs(index.Field, { className: className, "data-position": position, "data-size": size, "data-variant": variant, style: style, children: [jsxRuntime.jsx(input.Input, { type: 'checkbox', role: 'switch', ref: ref, ...rest }), !!label$1 && jsxRuntime.jsx(label.Label, { weight: 'regular', children: label$1 }), !!description && jsxRuntime.jsx("div", { "data-field": 'description', children: description })] }));
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
exports.Switch = Switch;
|
|
@@ -12,8 +12,8 @@ import { ValidationMessage } from '../validation-message/validation-message.js';
|
|
|
12
12
|
* @example
|
|
13
13
|
* <Checkbox label="I agree" value="agree" />
|
|
14
14
|
*/
|
|
15
|
-
const Checkbox = forwardRef(function Checkbox({ 'data-size': size, className, style, children, label, description, error, ...rest }, ref) {
|
|
16
|
-
return (jsxs(FieldComponent, { "data-size": size, className: className, style: style, children: [jsx(Input, { type: 'checkbox', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
15
|
+
const Checkbox = forwardRef(function Checkbox({ 'data-size': size, className, style, children, label, description, error, variant, ...rest }, ref) {
|
|
16
|
+
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsx(Input, { type: 'checkbox', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export { Checkbox };
|
|
@@ -12,8 +12,8 @@ import { ValidationMessage } from '../validation-message/validation-message.js';
|
|
|
12
12
|
* @example
|
|
13
13
|
* <Radio label="I agree" value="agree" />
|
|
14
14
|
*/
|
|
15
|
-
const Radio = forwardRef(function Radio({ 'data-size': size, className, style, children, label, description, error, ...rest }, ref) {
|
|
16
|
-
return (jsxs(FieldComponent, { "data-size": size, className: className, style: style, children: [jsx(Input, { type: 'radio', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
15
|
+
const Radio = forwardRef(function Radio({ 'data-size': size, className, style, children, label, description, error, variant, ...rest }, ref) {
|
|
16
|
+
return (jsxs(FieldComponent, { "data-size": size, "data-variant": variant, className: className, style: style, children: [jsx(Input, { type: 'radio', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description }), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export { Radio };
|
|
@@ -15,10 +15,8 @@ import { forwardRef } from 'react';
|
|
|
15
15
|
* </Suggestion>
|
|
16
16
|
*/
|
|
17
17
|
const SuggestionClear = forwardRef(function SuggestionClear({ 'aria-label': label = 'Tøm', ...rest }, ref) {
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
jsx("del", { "aria-label": label, hidden: true, ref: ref, suppressHydrationWarning // Since <ds-suggestion> adds attributes
|
|
21
|
-
: true, ...rest }));
|
|
18
|
+
return (jsx("button", { "aria-label": label, hidden: true, ref: ref, suppressHydrationWarning // Since <ds-suggestion> adds attributes
|
|
19
|
+
: true, type: 'reset', ...rest }));
|
|
22
20
|
});
|
|
23
21
|
|
|
24
22
|
export { SuggestionClear };
|
|
@@ -11,8 +11,8 @@ import { Label } from '../label/label.js';
|
|
|
11
11
|
* @example
|
|
12
12
|
* <Switch label="I agree" value="agree" />
|
|
13
13
|
*/
|
|
14
|
-
const Switch = forwardRef(function Switch({ 'data-size': size, children, className, description, label, position, style, ...rest }, ref) {
|
|
15
|
-
return (jsxs(FieldComponent, { className: className, "data-position": position, "data-size": size, style: style, children: [jsx(Input, { type: 'checkbox', role: 'switch', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description })] }));
|
|
14
|
+
const Switch = forwardRef(function Switch({ 'data-size': size, children, className, description, label, position, style, variant, ...rest }, ref) {
|
|
15
|
+
return (jsxs(FieldComponent, { className: className, "data-position": position, "data-size": size, "data-variant": variant, style: style, children: [jsx(Input, { type: 'checkbox', role: 'switch', ref: ref, ...rest }), !!label && jsx(Label, { weight: 'regular', children: label }), !!description && jsx("div", { "data-field": 'description', children: description })] }));
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export { Switch };
|
|
@@ -53,7 +53,7 @@ export type ButtonProps = MergeRight<DefaultProps & Omit<ButtonHTMLAttributes<HT
|
|
|
53
53
|
* @example
|
|
54
54
|
* <Button>Click me</Button>
|
|
55
55
|
*/
|
|
56
|
-
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "
|
|
56
|
+
export declare const Button: import("react").ForwardRefExoticComponent<Omit<DefaultProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "variant" | "command" | "commandfor" | "commandFor" | "icon" | "loading" | "asChild"> & {
|
|
57
57
|
/**
|
|
58
58
|
* Specify which variant to use
|
|
59
59
|
* @default 'primary'
|
|
@@ -23,6 +23,10 @@ export type CheckboxProps = MergeRight<DefaultProps & Omit<InputProps, 'type' |
|
|
|
23
23
|
* Error message for field
|
|
24
24
|
*/
|
|
25
25
|
error?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* If outline, the checkbox will have a border.
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'outline';
|
|
26
30
|
} & LabelRequired>;
|
|
27
31
|
/**
|
|
28
32
|
* Checkbox used to select multiple options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,aAAa,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,4GA6BpB,CAAC"}
|
|
@@ -12,7 +12,7 @@ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
|
|
|
12
12
|
* </Dialog>
|
|
13
13
|
* </Dialog.TriggerContext>
|
|
14
14
|
*/
|
|
15
|
-
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "
|
|
15
|
+
export declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "variant" | "command" | "commandfor" | "commandFor" | "icon" | "loading" | "asChild"> & {
|
|
16
16
|
variant?: "primary" | "secondary" | "tertiary";
|
|
17
17
|
'data-color'?: import("packages/types/dist/types").Color | Extract<import("packages/types/dist/types").SeverityColors, "danger">;
|
|
18
18
|
icon?: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DSErrorSummaryElement } from '@digdir/designsystemet-web';
|
|
1
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
3
|
import type { DefaultProps } from '../../types';
|
|
3
4
|
export type ErrorSummaryProps = {
|
|
@@ -5,7 +6,7 @@ export type ErrorSummaryProps = {
|
|
|
5
6
|
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
6
7
|
*/
|
|
7
8
|
asChild?: ReactNode;
|
|
8
|
-
} & Omit<HTMLAttributes<
|
|
9
|
+
} & Omit<HTMLAttributes<DSErrorSummaryElement> & DefaultProps, 'data-color'>;
|
|
9
10
|
/**
|
|
10
11
|
* ErrorSummary component, used to display a list of errors.
|
|
11
12
|
*
|
|
@@ -27,5 +28,5 @@ export declare const ErrorSummary: import("react").ForwardRefExoticComponent<{
|
|
|
27
28
|
* @deprecated This is not supported anymore, as the element needs to be `ds-error-summary`
|
|
28
29
|
*/
|
|
29
30
|
asChild?: ReactNode;
|
|
30
|
-
} & Omit<HTMLAttributes<
|
|
31
|
+
} & Omit<HTMLAttributes<DSErrorSummaryElement> & DefaultProps, "data-color"> & import("react").RefAttributes<DSErrorSummaryElement>>;
|
|
31
32
|
//# sourceMappingURL=error-summary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-summary.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"error-summary.d.ts","sourceRoot":"","sources":["../../../src/components/error-summary/error-summary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,CAAC,qBAAqB,CAAC,GAAG,YAAY,EAAE,YAAY,CAAC,CAAC;AAE7E;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY;IAtBvB;;OAEG;cACO,SAAS;oIAmCnB,CAAC"}
|
|
@@ -23,6 +23,10 @@ export type RadioProps = MergeRight<DefaultProps & Omit<InputProps, 'type' | 'ro
|
|
|
23
23
|
* Error message for field
|
|
24
24
|
*/
|
|
25
25
|
error?: ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* If outline, the radio will have a border.
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'outline';
|
|
26
30
|
} & LabelRequired>;
|
|
27
31
|
/**
|
|
28
32
|
* Radio used to select multiple options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;QAEI;IACJ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAIxD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EACzD;IACE;;QAEI;IACJ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,aAAa,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,yGA2BhB,CAAC"}
|
|
@@ -22,7 +22,7 @@ export type SearchButtonProps = MergeRight<ButtonProps, {
|
|
|
22
22
|
* <SearchButton>Søk</SearchButton>
|
|
23
23
|
* </Search>
|
|
24
24
|
*/
|
|
25
|
-
export declare const SearchButton: import("react").ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "
|
|
25
|
+
export declare const SearchButton: import("react").ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "variant" | "command" | "commandfor" | "commandFor" | "icon" | "loading" | "asChild"> & {
|
|
26
26
|
variant?: "primary" | "secondary" | "tertiary";
|
|
27
27
|
'data-color'?: import("packages/types/dist/types").Color | Extract<import("packages/types/dist/types").SeverityColors, "danger">;
|
|
28
28
|
icon?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
3
|
import type { MergeRight } from '../../utilities';
|
|
4
|
-
export type SuggestionClearProps = MergeRight<DefaultProps &
|
|
4
|
+
export type SuggestionClearProps = MergeRight<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, {
|
|
5
5
|
/**
|
|
6
6
|
* Aria label for the clear button
|
|
7
7
|
* @default 'Tøm'
|
|
@@ -20,11 +20,11 @@ export type SuggestionClearProps = MergeRight<DefaultProps & DelHTMLAttributes<H
|
|
|
20
20
|
* <Suggestion.List />
|
|
21
21
|
* </Suggestion>
|
|
22
22
|
*/
|
|
23
|
-
export declare const SuggestionClear: import("react").ForwardRefExoticComponent<Omit<DefaultProps &
|
|
23
|
+
export declare const SuggestionClear: import("react").ForwardRefExoticComponent<Omit<DefaultProps & ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & {
|
|
24
24
|
/**
|
|
25
25
|
* Aria label for the clear button
|
|
26
26
|
* @default 'Tøm'
|
|
27
27
|
*/
|
|
28
28
|
'aria-label'?: string;
|
|
29
|
-
} & import("react").RefAttributes<
|
|
29
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
//# sourceMappingURL=suggestion-clear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-clear.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-clear.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"suggestion-clear.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-clear.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAc,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAC3C,YAAY,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,EACtD;IACE;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CACF,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;IApBxB;;;OAGG;mBACY,MAAM;qDA8BvB,CAAC"}
|
|
@@ -25,6 +25,10 @@ export type SwitchProps = MergeRight<DefaultProps & Omit<InputHTMLAttributes<HTM
|
|
|
25
25
|
* @default start
|
|
26
26
|
*/
|
|
27
27
|
position?: FieldProps['position'];
|
|
28
|
+
/**
|
|
29
|
+
* If outline, the switch will have a border.
|
|
30
|
+
*/
|
|
31
|
+
variant?: 'outline';
|
|
28
32
|
} & LabelRequired>;
|
|
29
33
|
/**
|
|
30
34
|
* Switch used to toggle options.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3E;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/switch/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3E;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,aAAa,CAClB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM,0GA2BjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digdir/designsystemet-react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.14.0",
|
|
5
5
|
"description": "React components for Designsystemet",
|
|
6
6
|
"author": "Designsystemet team",
|
|
7
7
|
"repository": {
|
|
@@ -37,33 +37,33 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/dom": "^1.7.6",
|
|
39
39
|
"@floating-ui/react": "0.26.23",
|
|
40
|
-
"@navikt/aksel-icons": "^8.
|
|
40
|
+
"@navikt/aksel-icons": "^8.10.3",
|
|
41
41
|
"@radix-ui/react-slot": "^1.2.4",
|
|
42
|
-
"@tanstack/react-virtual": "^3.13.
|
|
42
|
+
"@tanstack/react-virtual": "^3.13.24",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
|
-
"@digdir/designsystemet-types": "1.
|
|
45
|
-
"@digdir/designsystemet-web": "1.
|
|
44
|
+
"@digdir/designsystemet-types": "1.14.0",
|
|
45
|
+
"@digdir/designsystemet-web": "1.14.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@rollup/plugin-commonjs": "29.0.2",
|
|
49
49
|
"@rollup/plugin-node-resolve": "16.0.3",
|
|
50
|
-
"@storybook/addon-docs": "10.3.
|
|
51
|
-
"@storybook/addon-vitest": "10.3.
|
|
52
|
-
"@storybook/react-vite": "10.3.
|
|
50
|
+
"@storybook/addon-docs": "10.3.6",
|
|
51
|
+
"@storybook/addon-vitest": "10.3.6",
|
|
52
|
+
"@storybook/react-vite": "10.3.6",
|
|
53
53
|
"@testing-library/jest-dom": "6.9.1",
|
|
54
54
|
"@testing-library/react": "16.3.2",
|
|
55
55
|
"@testing-library/user-event": "14.6.1",
|
|
56
56
|
"@types/react": "19.2.14",
|
|
57
57
|
"@types/react-dom": "19.2.3",
|
|
58
|
-
"react": "19.2.
|
|
59
|
-
"react-dom": "19.2.
|
|
58
|
+
"react": "19.2.5",
|
|
59
|
+
"react-dom": "19.2.5",
|
|
60
60
|
"rimraf": "6.1.3",
|
|
61
|
-
"rollup": "4.60.
|
|
61
|
+
"rollup": "4.60.2",
|
|
62
62
|
"rollup-plugin-copy": "3.5.0",
|
|
63
|
-
"storybook": "10.3.
|
|
63
|
+
"storybook": "10.3.6",
|
|
64
64
|
"tsx": "4.21.0",
|
|
65
65
|
"typescript": "5.9.3",
|
|
66
|
-
"@digdir/designsystemet-css": "^1.
|
|
66
|
+
"@digdir/designsystemet-css": "^1.14.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "pnpm run clean && tsc -b tsconfig.lib.json --emitDeclarationOnly false && rollup -c --bundleConfigAsCjs",
|