@digdir/designsystemet-react 1.0.0-next.40 → 1.0.0-next.41

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.
@@ -22,7 +22,7 @@ const FieldCounter = react.forwardRef(function FieldCounter({ limit, under = '%d
22
22
  field?.addEventListener('input', onInput);
23
23
  return () => field?.removeEventListener('input', onInput);
24
24
  }, [setCount]);
25
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsxRuntime.jsx(ValidationMessage.ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'success', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
25
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsxRuntime.jsx(ValidationMessage.ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'neutral', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
26
26
  });
27
27
 
28
28
  exports.FieldCounter = FieldCounter;
@@ -20,7 +20,7 @@ const FieldCounter = forwardRef(function FieldCounter({ limit, under = '%d tegn
20
20
  field?.addEventListener('input', onInput);
21
21
  return () => field?.removeEventListener('input', onInput);
22
22
  }, [setCount]);
23
- return (jsxs(Fragment, { children: [jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsx(ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'success', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
23
+ return (jsxs(Fragment, { children: [jsx("div", { "data-field": 'description', className: 'ds-sr-only', "aria-live": 'polite', ref: counterRef, children: hasExceededLimit && label(over, remainder) }), jsx(ValidationMessage, { "data-color": hasExceededLimit ? 'danger' : 'neutral', ref: ref, ...rest, children: label(hasExceededLimit ? over : under, remainder) })] }));
24
24
  });
25
25
 
26
26
  export { FieldCounter };
@@ -7,7 +7,7 @@ export type ValidationMessageProps = MergeRight<Omit<DefaultProps, 'data-color'>
7
7
  * Sets color and icon.
8
8
  * @default 'danger'
9
9
  */
10
- 'data-color'?: Extract<SeverityColors, 'success' | 'danger'>;
10
+ 'data-color'?: SeverityColors | 'neutral';
11
11
  /**
12
12
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
13
13
  * @default false
@@ -283,7 +283,7 @@ export declare const ValidationMessage: React.ForwardRefExoticComponent<{
283
283
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
284
284
  onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
285
285
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
286
- 'data-color'?: Extract<SeverityColors, "success" | "danger"> | undefined;
286
+ 'data-color'?: (SeverityColors | "neutral") | undefined;
287
287
  asChild?: boolean | undefined;
288
288
  } & React.RefAttributes<HTMLParagraphElement>>;
289
289
  //# sourceMappingURL=ValidationMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ValidationMessage/ValidationMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAC7C,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GAAG,cAAc,CAAC,oBAAoB,CAAC,EACvE;IACE;;;OAGG;IACH,YA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAVX,cAAc,GAAG,SAAS;cAK/B,OAAO;8CAmBnB,CAAC"}
@@ -290,7 +290,7 @@ export declare const FieldCounter: React.ForwardRefExoticComponent<{
290
290
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
291
291
  onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
292
292
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
293
- 'data-color'?: Extract<import("../../../colors").SeverityColors, "success" | "danger"> | undefined;
293
+ 'data-color'?: (import("../../../colors").SeverityColors | "neutral") | undefined;
294
294
  asChild?: boolean | undefined;
295
295
  } & React.RefAttributes<HTMLParagraphElement>>;
296
296
  //# sourceMappingURL=FieldCounter.d.ts.map
@@ -288,7 +288,7 @@ declare const Field: React.ForwardRefExoticComponent<{
288
288
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLParagraphElement> | undefined;
289
289
  onTransitionEnd?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
290
290
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLParagraphElement> | undefined;
291
- 'data-color'?: Extract<import("../../../colors").SeverityColors, "success" | "danger"> | undefined;
291
+ 'data-color'?: (import("../../../colors").SeverityColors | "neutral") | undefined;
292
292
  asChild?: boolean | undefined;
293
293
  } & React.RefAttributes<HTMLParagraphElement>>;
294
294
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "1.0.0-next.40",
4
+ "version": "1.0.0-next.41",
5
5
  "description": "React components for Designsystemet",
6
6
  "author": "Designsystemet team",
7
7
  "repository": {