@navikt/ds-react 2.8.5 → 2.8.7

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.
@@ -46,13 +46,13 @@ const Icon = (_a) => {
46
46
  var { variant } = _a, props = __rest(_a, ["variant"]);
47
47
  switch (variant) {
48
48
  case "error":
49
- return react_1.default.createElement(ds_icons_1.ErrorColored, Object.assign({ title: "Feil" }, props));
49
+ return react_1.default.createElement(ds_icons_1.ErrorFilled, Object.assign({ title: "Feil" }, props));
50
50
  case "warning":
51
- return react_1.default.createElement(ds_icons_1.WarningColored, Object.assign({ title: "Advarsel" }, props));
51
+ return react_1.default.createElement(ds_icons_1.WarningFilled, Object.assign({ title: "Advarsel" }, props));
52
52
  case "info":
53
- return react_1.default.createElement(ds_icons_1.InformationColored, Object.assign({ title: "Informasjon" }, props));
53
+ return react_1.default.createElement(ds_icons_1.InformationFilled, Object.assign({ title: "Informasjon" }, props));
54
54
  case "success":
55
- return react_1.default.createElement(ds_icons_1.SuccessColored, Object.assign({ title: "Suksess" }, props));
55
+ return react_1.default.createElement(ds_icons_1.SuccessFilled, Object.assign({ title: "Suksess" }, props));
56
56
  default:
57
57
  return null;
58
58
  }
@@ -27,18 +27,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Checkbox = void 0;
30
- const react_1 = __importStar(require("react"));
31
30
  const clsx_1 = __importDefault(require("clsx"));
31
+ const react_1 = __importStar(require("react"));
32
+ const typography_1 = require("../../typography");
33
+ const util_1 = require("../../util");
32
34
  const useCheckbox_1 = __importDefault(require("./useCheckbox"));
33
- const __1 = require("../..");
34
35
  exports.Checkbox = (0, react_1.forwardRef)((props, ref) => {
35
36
  const { inputProps, hasError, size } = (0, useCheckbox_1.default)(props);
36
- const Description = size === "medium" ? __1.BodyShort : __1.Detail;
37
+ const Description = size === "medium" ? typography_1.BodyLong : typography_1.Detail;
37
38
  return (react_1.default.createElement("div", { className: (0, clsx_1.default)(props.className, "navds-checkbox", `navds-checkbox--${size}`, {
38
39
  "navds-checkbox--error": hasError,
39
40
  "navds-checkbox--disabled": inputProps.disabled,
40
41
  }) },
41
- react_1.default.createElement("input", Object.assign({}, (0, __1.omit)(props, [
42
+ react_1.default.createElement("input", Object.assign({}, (0, util_1.omit)(props, [
42
43
  "children",
43
44
  "size",
44
45
  "error",
@@ -62,7 +63,7 @@ exports.Checkbox = (0, react_1.forwardRef)((props, ref) => {
62
63
  react_1.default.createElement("span", { className: (0, clsx_1.default)("navds-checkbox__content", {
63
64
  "navds-sr-only": props.hideLabel,
64
65
  }) },
65
- react_1.default.createElement(__1.BodyShort, { as: "span", size: size }, props.children),
66
- props.description && (react_1.default.createElement(Description, { as: "span", size: "small", className: "navds-checkbox__description" }, props.description))))));
66
+ react_1.default.createElement(typography_1.BodyShort, { as: "span", size: size }, props.children),
67
+ props.description && (react_1.default.createElement(Description, { as: "span", className: "navds-checkbox__description" }, props.description))))));
67
68
  });
68
69
  exports.default = exports.Checkbox;
@@ -29,19 +29,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.Radio = void 0;
30
30
  const clsx_1 = __importDefault(require("clsx"));
31
31
  const react_1 = __importStar(require("react"));
32
- const __1 = require("../..");
32
+ const typography_1 = require("../../typography");
33
+ const util_1 = require("../../util");
33
34
  const useRadio_1 = require("./useRadio");
34
35
  exports.Radio = (0, react_1.forwardRef)((props, ref) => {
35
36
  const { inputProps, size, hasError } = (0, useRadio_1.useRadio)(props);
36
- const Description = size === "medium" ? __1.BodyShort : __1.Detail;
37
+ const Description = size === "medium" ? typography_1.BodyLong : typography_1.Detail;
37
38
  return (react_1.default.createElement("div", { className: (0, clsx_1.default)(props.className, "navds-radio", `navds-radio--${size}`, {
38
39
  "navds-radio--error": hasError,
39
40
  "navds-radio--disabled": inputProps.disabled,
40
41
  }) },
41
- react_1.default.createElement("input", Object.assign({}, (0, __1.omit)(props, ["children", "size", "description"]), inputProps, { className: "navds-radio__input", ref: ref })),
42
+ react_1.default.createElement("input", Object.assign({}, (0, util_1.omit)(props, ["children", "size", "description"]), inputProps, { className: "navds-radio__input", ref: ref })),
42
43
  react_1.default.createElement("label", { htmlFor: inputProps.id, className: "navds-radio__label" },
43
44
  react_1.default.createElement("span", { className: "navds-radio__content" },
44
- react_1.default.createElement(__1.BodyShort, { as: "span", size: size }, props.children),
45
- props.description && (react_1.default.createElement(Description, { as: "span", size: "small", className: "navds-radio__description" }, props.description))))));
45
+ react_1.default.createElement(typography_1.BodyShort, { as: "span", size: size }, props.children),
46
+ props.description && (react_1.default.createElement(Description, { as: "span", className: "navds-radio__description" }, props.description))))));
46
47
  });
47
48
  exports.default = exports.Radio;
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { ErrorColored, InformationColored, SuccessColored, WarningColored, } from "@navikt/ds-icons";
12
+ import { ErrorFilled, InformationFilled, SuccessFilled, WarningFilled, } from "@navikt/ds-icons";
13
13
  import cl from "clsx";
14
14
  import React, { forwardRef } from "react";
15
15
  import { BodyLong } from "../typography/BodyLong";
@@ -17,13 +17,13 @@ const Icon = (_a) => {
17
17
  var { variant } = _a, props = __rest(_a, ["variant"]);
18
18
  switch (variant) {
19
19
  case "error":
20
- return React.createElement(ErrorColored, Object.assign({ title: "Feil" }, props));
20
+ return React.createElement(ErrorFilled, Object.assign({ title: "Feil" }, props));
21
21
  case "warning":
22
- return React.createElement(WarningColored, Object.assign({ title: "Advarsel" }, props));
22
+ return React.createElement(WarningFilled, Object.assign({ title: "Advarsel" }, props));
23
23
  case "info":
24
- return React.createElement(InformationColored, Object.assign({ title: "Informasjon" }, props));
24
+ return React.createElement(InformationFilled, Object.assign({ title: "Informasjon" }, props));
25
25
  case "success":
26
- return React.createElement(SuccessColored, Object.assign({ title: "Suksess" }, props));
26
+ return React.createElement(SuccessFilled, Object.assign({ title: "Suksess" }, props));
27
27
  default:
28
28
  return null;
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA4BlD,MAAM,IAAI,GAAG,CAAC,EAAqB,EAAE,EAAE;QAAzB,EAAE,OAAO,OAAY,EAAP,KAAK,cAAnB,WAAqB,CAAF;IAC/B,QAAQ,OAAO,EAAE;QACf,KAAK,OAAO;YACV,OAAO,oBAAC,YAAY,kBAAC,KAAK,EAAC,MAAM,IAAK,KAAK,EAAI,CAAC;QAClD,KAAK,SAAS;YACZ,OAAO,oBAAC,cAAc,kBAAC,KAAK,EAAC,UAAU,IAAK,KAAK,EAAI,CAAC;QACxD,KAAK,MAAM;YACT,OAAO,oBAAC,kBAAkB,kBAAC,KAAK,EAAC,aAAa,IAAK,KAAK,EAAI,CAAC;QAC/D,KAAK,SAAS;YACZ,OAAO,oBAAC,cAAc,kBAAC,KAAK,EAAC,SAAS,IAAK,KAAK,EAAI,CAAC;QACvD;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EAQC,EACD,GAAG,EACH,EAAE;QAVF,EACE,QAAQ,EACR,SAAS,EACT,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,KAAK,OAEf,EADI,IAAI,cAPT,mEAQC,CADQ;IAGN,OAAA,CACH,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,SAAS,EAC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;KACf;AACH,CAAC,CAAC;AAMF,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EAQC,EACD,GAAG,EACH,EAAE;QAVF,EACE,QAAQ,EACR,SAAS,EACT,OAAO,EACP,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,KAAK,OAEf,EADI,IAAI,cAPT,mEAQC,CADQ;IAGN,OAAA,CACH,6CACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,SAAS,EACT,aAAa,EACb,gBAAgB,OAAO,EAAE,EACzB,gBAAgB,IAAI,EAAE,EACtB,EAAE,yBAAyB,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,CACxE;QAED,oBAAC,IAAI,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,mBAAmB,GAAG;QACxD,oBAAC,QAAQ,IAAC,EAAE,EAAC,KAAK,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,sBAAsB,IAC5D,QAAQ,CACA,CACP,CACP,CAAA;CAAA,CACF,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,10 +1,11 @@
1
- import React, { forwardRef } from "react";
2
1
  import cl from "clsx";
2
+ import React, { forwardRef } from "react";
3
+ import { BodyLong, BodyShort, Detail } from "../../typography";
4
+ import { omit } from "../../util";
3
5
  import useCheckbox from "./useCheckbox";
4
- import { BodyShort, Detail, omit } from "../..";
5
6
  export const Checkbox = forwardRef((props, ref) => {
6
7
  const { inputProps, hasError, size } = useCheckbox(props);
7
- const Description = size === "medium" ? BodyShort : Detail;
8
+ const Description = size === "medium" ? BodyLong : Detail;
8
9
  return (React.createElement("div", { className: cl(props.className, "navds-checkbox", `navds-checkbox--${size}`, {
9
10
  "navds-checkbox--error": hasError,
10
11
  "navds-checkbox--disabled": inputProps.disabled,
@@ -34,7 +35,7 @@ export const Checkbox = forwardRef((props, ref) => {
34
35
  "navds-sr-only": props.hideLabel,
35
36
  }) },
36
37
  React.createElement(BodyShort, { as: "span", size: size }, props.children),
37
- props.description && (React.createElement(Description, { as: "span", size: "small", className: "navds-checkbox__description" }, props.description))))));
38
+ props.description && (React.createElement(Description, { as: "span", className: "navds-checkbox__description" }, props.description))))));
38
39
  });
39
40
  export default Checkbox;
40
41
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../src/form/checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAqChD,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAE1D,MAAM,WAAW,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAE3D,OAAO,CACL,6BACE,SAAS,EAAE,EAAE,CACX,KAAK,CAAC,SAAS,EACf,gBAAgB,EAChB,mBAAmB,IAAI,EAAE,EACzB;YACE,uBAAuB,EAAE,QAAQ;YACjC,0BAA0B,EAAE,UAAU,CAAC,QAAQ;SAChD,CACF;QAED,+CACM,IAAI,CAAC,KAAK,EAAE;YACd,UAAU;YACV,MAAM;YACN,OAAO;YACP,aAAa;YACb,WAAW;YACX,eAAe;YACf,SAAS;SACV,CAAC,EACE,UAAU,IACd,IAAI,EAAC,UAAU,EACf,SAAS,EAAC,uBAAuB,kBACnB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAA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C,SAAS,IAAC,EAAE,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,IAC5B,KAAK,CAAC,QAAQ,CACL;gBACX,KAAK,CAAC,WAAW,IAAI,CACpB,oBAAC,WAAW,IAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAC,6BAA6B,IAC3D,KAAK,CAAC,WAAW,CACN,CACf,CACI,CACD,CACJ,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import cl from "clsx";
2
2
  import React, { forwardRef } from "react";
3
- import { BodyShort, Detail, omit } from "../..";
3
+ import { BodyLong, BodyShort, Detail } from "../../typography";
4
+ import { omit } from "../../util";
4
5
  import { useRadio } from "./useRadio";
5
6
  export const Radio = forwardRef((props, ref) => {
6
7
  const { inputProps, size, hasError } = useRadio(props);
7
- const Description = size === "medium" ? BodyShort : Detail;
8
+ const Description = size === "medium" ? BodyLong : Detail;
8
9
  return (React.createElement("div", { className: cl(props.className, "navds-radio", `navds-radio--${size}`, {
9
10
  "navds-radio--error": hasError,
10
11
  "navds-radio--disabled": inputProps.disabled,
@@ -13,7 +14,7 @@ export const Radio = forwardRef((props, ref) => {
13
14
  React.createElement("label", { htmlFor: inputProps.id, className: "navds-radio__label" },
14
15
  React.createElement("span", { className: "navds-radio__content" },
15
16
  React.createElement(BodyShort, { as: "span", size: size }, props.children),
16
- props.description && (React.createElement(Description, { as: "span", size: "small", className: "navds-radio__description" }, props.description))))));
17
+ props.description && (React.createElement(Description, { as: "span", className: "navds-radio__description" }, props.description))))));
17
18
  });
18
19
  export default Radio;
19
20
  //# sourceMappingURL=Radio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/form/radio/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AAC/D,OAAO,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AC,WAAW,CACN,CACf,CACI,CACD,CACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-react",
3
- "version": "2.8.5",
3
+ "version": "2.8.7",
4
4
  "description": "Aksel react-components for NAV designsystem",
5
5
  "author": "Aksel | NAV designsystem team",
6
6
  "license": "MIT",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@floating-ui/react": "0.17.0",
40
- "@navikt/aksel-icons": "^2.8.5",
41
- "@navikt/ds-icons": "^2.8.5",
40
+ "@navikt/aksel-icons": "^2.8.7",
41
+ "@navikt/ds-icons": "^2.8.7",
42
42
  "@radix-ui/react-tabs": "1.0.0",
43
43
  "@radix-ui/react-toggle-group": "1.0.0",
44
44
  "clsx": "^1.2.1",
@@ -1,8 +1,8 @@
1
1
  import {
2
- ErrorColored,
3
- InformationColored,
4
- SuccessColored,
5
- WarningColored,
2
+ ErrorFilled,
3
+ InformationFilled,
4
+ SuccessFilled,
5
+ WarningFilled,
6
6
  } from "@navikt/ds-icons";
7
7
  import cl from "clsx";
8
8
  import React, { forwardRef } from "react";
@@ -37,13 +37,13 @@ export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
37
37
  const Icon = ({ variant, ...props }) => {
38
38
  switch (variant) {
39
39
  case "error":
40
- return <ErrorColored title="Feil" {...props} />;
40
+ return <ErrorFilled title="Feil" {...props} />;
41
41
  case "warning":
42
- return <WarningColored title="Advarsel" {...props} />;
42
+ return <WarningFilled title="Advarsel" {...props} />;
43
43
  case "info":
44
- return <InformationColored title="Informasjon" {...props} />;
44
+ return <InformationFilled title="Informasjon" {...props} />;
45
45
  case "success":
46
- return <SuccessColored title="Suksess" {...props} />;
46
+ return <SuccessFilled title="Suksess" {...props} />;
47
47
  default:
48
48
  return null;
49
49
  }
@@ -1,8 +1,9 @@
1
- import React, { forwardRef, InputHTMLAttributes } from "react";
2
1
  import cl from "clsx";
3
- import useCheckbox from "./useCheckbox";
2
+ import React, { forwardRef, InputHTMLAttributes } from "react";
3
+ import { BodyLong, BodyShort, Detail } from "../../typography";
4
+ import { omit } from "../../util";
4
5
  import { FormFieldProps } from "../useFormField";
5
- import { BodyShort, Detail, omit } from "../..";
6
+ import useCheckbox from "./useCheckbox";
6
7
 
7
8
  export interface CheckboxProps
8
9
  extends FormFieldProps,
@@ -43,7 +44,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
43
44
  (props, ref) => {
44
45
  const { inputProps, hasError, size } = useCheckbox(props);
45
46
 
46
- const Description = size === "medium" ? BodyShort : Detail;
47
+ const Description = size === "medium" ? BodyLong : Detail;
47
48
 
48
49
  return (
49
50
  <div
@@ -93,11 +94,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
93
94
  {props.children}
94
95
  </BodyShort>
95
96
  {props.description && (
96
- <Description
97
- as="span"
98
- size="small"
99
- className="navds-checkbox__description"
100
- >
97
+ <Description as="span" className="navds-checkbox__description">
101
98
  {props.description}
102
99
  </Description>
103
100
  )}
@@ -1,6 +1,7 @@
1
1
  import cl from "clsx";
2
2
  import React, { forwardRef, InputHTMLAttributes } from "react";
3
- import { BodyShort, Detail, omit } from "../..";
3
+ import { BodyLong, BodyShort, Detail } from "../../typography";
4
+ import { omit } from "../../util";
4
5
  import { FormFieldProps } from "../useFormField";
5
6
  import { useRadio } from "./useRadio";
6
7
 
@@ -24,7 +25,7 @@ export interface RadioProps
24
25
  export const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
25
26
  const { inputProps, size, hasError } = useRadio(props);
26
27
 
27
- const Description = size === "medium" ? BodyShort : Detail;
28
+ const Description = size === "medium" ? BodyLong : Detail;
28
29
 
29
30
  return (
30
31
  <div
@@ -45,11 +46,7 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>((props, ref) => {
45
46
  {props.children}
46
47
  </BodyShort>
47
48
  {props.description && (
48
- <Description
49
- as="span"
50
- size="small"
51
- className="navds-radio__description"
52
- >
49
+ <Description as="span" className="navds-radio__description">
53
50
  {props.description}
54
51
  </Description>
55
52
  )}