@navikt/ds-react 4.7.1 → 4.7.3

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/_docs.json CHANGED
@@ -1296,6 +1296,111 @@
1296
1296
  }
1297
1297
  }
1298
1298
  },
1299
+ {
1300
+ "filePath": "src/chips/Removable.tsx",
1301
+ "displayName": "Removable",
1302
+ "props": {
1303
+ "variant": {
1304
+ "defaultValue": {
1305
+ "value": "action"
1306
+ },
1307
+ "description": "Chip-variants",
1308
+ "name": "variant",
1309
+ "parent": {
1310
+ "fileName": "src/chips/Removable.tsx",
1311
+ "name": "RemovableChipsProps"
1312
+ },
1313
+ "declarations": [
1314
+ {
1315
+ "fileName": "src/chips/Removable.tsx",
1316
+ "name": "RemovableChipsProps"
1317
+ }
1318
+ ],
1319
+ "required": false,
1320
+ "type": {
1321
+ "name": "\"action\" | \"neutral\""
1322
+ }
1323
+ },
1324
+ "removeLabel": {
1325
+ "defaultValue": {
1326
+ "value": "slett"
1327
+ },
1328
+ "description": "Replaces label read for screen-readers",
1329
+ "name": "removeLabel",
1330
+ "parent": {
1331
+ "fileName": "src/chips/Removable.tsx",
1332
+ "name": "RemovableChipsProps"
1333
+ },
1334
+ "declarations": [
1335
+ {
1336
+ "fileName": "src/chips/Removable.tsx",
1337
+ "name": "RemovableChipsProps"
1338
+ }
1339
+ ],
1340
+ "required": false,
1341
+ "type": {
1342
+ "name": "string"
1343
+ }
1344
+ },
1345
+ "onDelete": {
1346
+ "defaultValue": null,
1347
+ "description": "Click callback",
1348
+ "name": "onDelete",
1349
+ "parent": {
1350
+ "fileName": "src/chips/Removable.tsx",
1351
+ "name": "RemovableChipsProps"
1352
+ },
1353
+ "declarations": [
1354
+ {
1355
+ "fileName": "src/chips/Removable.tsx",
1356
+ "name": "RemovableChipsProps"
1357
+ }
1358
+ ],
1359
+ "required": false,
1360
+ "type": {
1361
+ "name": "(() => void)"
1362
+ }
1363
+ },
1364
+ "className": {
1365
+ "defaultValue": null,
1366
+ "description": "",
1367
+ "name": "className",
1368
+ "parent": {
1369
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
1370
+ "name": "HTMLAttributes"
1371
+ },
1372
+ "declarations": [
1373
+ {
1374
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
1375
+ "name": "HTMLAttributes"
1376
+ }
1377
+ ],
1378
+ "required": false,
1379
+ "type": {
1380
+ "name": "string"
1381
+ }
1382
+ },
1383
+ "ref": {
1384
+ "defaultValue": null,
1385
+ "description": "Allows getting a ref to the component instance.\nOnce the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).\n@see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom",
1386
+ "name": "ref",
1387
+ "parent": {
1388
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
1389
+ "name": "RefAttributes"
1390
+ },
1391
+ "declarations": [
1392
+ {
1393
+ "fileName": "aksel/node_modules/@types/react/ts5.0/index.d.ts",
1394
+ "name": "RefAttributes"
1395
+ }
1396
+ ],
1397
+ "required": false,
1398
+ "type": {
1399
+ "name": "Ref<HTMLButtonElement>"
1400
+ }
1401
+ }
1402
+ }
1403
+ },
1299
1404
  {
1300
1405
  "filePath": "src/chips/Toggle.tsx",
1301
1406
  "displayName": "ToggleChips",
@@ -5494,7 +5599,7 @@
5494
5599
  "defaultValue": {
5495
5600
  "value": "medium"
5496
5601
  },
5497
- "description": "Changes Loader width/height\n64px | 40px | 32px | 24px | 20px | 16px",
5602
+ "description": "Changes Loader width/height\n88px | 64px | 40px | 32px | 24px | 20px | 16px",
5498
5603
  "name": "size",
5499
5604
  "parent": {
5500
5605
  "fileName": "src/loader/Loader.tsx",
@@ -42,8 +42,8 @@ const aksel_icons_1 = require("@navikt/aksel-icons");
42
42
  const clsx_1 = __importDefault(require("clsx"));
43
43
  const react_1 = __importStar(require("react"));
44
44
  exports.RemovableChips = (0, react_1.forwardRef)((_a, ref) => {
45
- var { className, children, variant = "action", as: Component = "button", removeLabel = "slett", onDelete } = _a, rest = __rest(_a, ["className", "children", "variant", "as", "removeLabel", "onDelete"]);
46
- return (react_1.default.createElement(Component, Object.assign({}, rest, { ref: ref, className: (0, clsx_1.default)("navds-chips__chip navds-chips__removable navds-chips--icon-right", className, `navds-chips__removable--${variant}`), "aria-label": `${children} ${removeLabel}`, onClick: (e) => {
45
+ var { className, children, variant = "action", removeLabel = "slett", onDelete, type = "button" } = _a, rest = __rest(_a, ["className", "children", "variant", "removeLabel", "onDelete", "type"]);
46
+ return (react_1.default.createElement("button", Object.assign({}, rest, { ref: ref, type: type, className: (0, clsx_1.default)("navds-chips__chip navds-chips__removable navds-chips--icon-right", className, `navds-chips__removable--${variant}`), "aria-label": `${children} ${removeLabel}`, onClick: (e) => {
47
47
  var _a;
48
48
  onDelete === null || onDelete === void 0 ? void 0 : onDelete();
49
49
  (_a = rest === null || rest === void 0 ? void 0 : rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest, e);
@@ -77,8 +77,14 @@ exports.Stepper = (0, react_1.forwardRef)((_a, ref) => {
77
77
  orientation,
78
78
  interactive,
79
79
  } }, react_1.default.Children.map(children, (step, index) => {
80
- var _a, _b;
81
- return (react_1.default.createElement("li", { className: (0, clsx_1.default)("navds-stepper__item"), key: index + ((_b = (_a = children === null || children === void 0 ? void 0 : children.toString) === null || _a === void 0 ? void 0 : _a.call(children)) !== null && _b !== void 0 ? _b : "") },
80
+ var _a, _b, _c, _d, _e;
81
+ return (react_1.default.createElement("li", { className: (0, clsx_1.default)("navds-stepper__item", {
82
+ "navds-stepper__item--behind": activeStep > index,
83
+ "navds-stepper__item--completed": react_1.default.isValidElement(step) &&
84
+ ((_a = step === null || step === void 0 ? void 0 : step.props) === null || _a === void 0 ? void 0 : _a.completed),
85
+ "navds-stepper__item--non-interactive": react_1.default.isValidElement(step) &&
86
+ !((_c = (_b = step === null || step === void 0 ? void 0 : step.props) === null || _b === void 0 ? void 0 : _b.interactive) !== null && _c !== void 0 ? _c : interactive),
87
+ }), key: index + ((_e = (_d = children === null || children === void 0 ? void 0 : children.toString) === null || _d === void 0 ? void 0 : _d.call(children)) !== null && _e !== void 0 ? _e : "") },
82
88
  react_1.default.createElement("span", { className: "navds-stepper__line navds-stepper__line--1" }),
83
89
  react_1.default.isValidElement(step)
84
90
  ? react_1.default.cloneElement(step, Object.assign(Object.assign({}, step.props), { unsafe_index: index }))
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { OverridableComponent } from "../util/OverridableComponent";
3
2
  export interface RemovableChipsProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
3
  children: string;
5
4
  /**
@@ -17,5 +16,5 @@ export interface RemovableChipsProps extends React.ButtonHTMLAttributes<HTMLButt
17
16
  */
18
17
  onDelete?: () => void;
19
18
  }
20
- export declare const RemovableChips: OverridableComponent<RemovableChipsProps, HTMLButtonElement>;
19
+ export declare const RemovableChips: React.ForwardRefExoticComponent<RemovableChipsProps & React.RefAttributes<HTMLButtonElement>>;
21
20
  export default RemovableChips;
@@ -13,8 +13,8 @@ import { XMarkIcon } from "@navikt/aksel-icons";
13
13
  import cl from "clsx";
14
14
  import React, { forwardRef } from "react";
15
15
  export const RemovableChips = forwardRef((_a, ref) => {
16
- var { className, children, variant = "action", as: Component = "button", removeLabel = "slett", onDelete } = _a, rest = __rest(_a, ["className", "children", "variant", "as", "removeLabel", "onDelete"]);
17
- return (React.createElement(Component, Object.assign({}, rest, { ref: ref, className: cl("navds-chips__chip navds-chips__removable navds-chips--icon-right", className, `navds-chips__removable--${variant}`), "aria-label": `${children} ${removeLabel}`, onClick: (e) => {
16
+ var { className, children, variant = "action", removeLabel = "slett", onDelete, type = "button" } = _a, rest = __rest(_a, ["className", "children", "variant", "removeLabel", "onDelete", "type"]);
17
+ return (React.createElement("button", Object.assign({}, rest, { ref: ref, type: type, className: cl("navds-chips__chip navds-chips__removable navds-chips--icon-right", className, `navds-chips__removable--${variant}`), "aria-label": `${children} ${removeLabel}`, onClick: (e) => {
18
18
  var _a;
19
19
  onDelete === null || onDelete === void 0 ? void 0 : onDelete();
20
20
  (_a = rest === null || rest === void 0 ? void 0 : rest.onClick) === null || _a === void 0 ? void 0 : _a.call(rest, e);
@@ -1 +1 @@
1
- {"version":3,"file":"Removable.js","sourceRoot":"","sources":["../../src/chips/Removable.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAsB1C,MAAM,CAAC,MAAM,cAAc,GAGvB,UAAU,CACZ,CACE,EAQC,EACD,GAAG,EACH,EAAE;QAVF,EACE,SAAS,EACT,QAAQ,EACR,OAAO,GAAG,QAAQ,EAClB,EAAE,EAAE,SAAS,GAAG,QAAQ,EACxB,WAAW,GAAG,OAAO,EACrB,QAAQ,OAET,EADI,IAAI,cAPT,qEAQC,CADQ;IAIT,OAAO,CACL,oBAAC,SAAS,oBACJ,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,kEAAkE,EAClE,SAAS,EACT,2BAA2B,OAAO,EAAE,CACrC,gBACW,GAAG,QAAQ,IAAI,WAAW,EAAE,EACxC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;;YACb,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,EAAI,CAAC;YACb,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,qDAAG,CAAC,CAAC,CAAC;QACrB,CAAC;QAED,8BAAM,SAAS,EAAC,wBAAwB,IAAE,QAAQ,CAAQ;QAC1D,8BAAM,SAAS,EAAC,6BAA6B;YAC3C,oBAAC,SAAS,0BAAe,CACpB,CACG,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"Removable.js","sourceRoot":"","sources":["../../src/chips/Removable.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAqB1C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAItC,CACE,EAQC,EACD,GAAG,EACH,EAAE;QAVF,EACE,SAAS,EACT,QAAQ,EACR,OAAO,GAAG,QAAQ,EAClB,WAAW,GAAG,OAAO,EACrB,QAAQ,EACR,IAAI,GAAG,QAAQ,OAEhB,EADI,IAAI,cAPT,uEAQC,CADQ;IAIT,OAAO,CACL,gDACM,IAAI,IACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,EAAE,CACX,kEAAkE,EAClE,SAAS,EACT,2BAA2B,OAAO,EAAE,CACrC,gBACW,GAAG,QAAQ,IAAI,WAAW,EAAE,EACxC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;;YACb,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,EAAI,CAAC;YACb,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,qDAAG,CAAC,CAAC,CAAC;QACrB,CAAC;QAED,8BAAM,SAAS,EAAC,wBAAwB,IAAE,QAAQ,CAAQ;QAC1D,8BAAM,SAAS,EAAC,6BAA6B;YAC3C,oBAAC,SAAS,0BAAe,CACpB,CACA,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -2,7 +2,7 @@ import React, { SVGProps } from "react";
2
2
  export interface LoaderProps extends SVGProps<SVGSVGElement> {
3
3
  /**
4
4
  * Changes Loader width/height
5
- * 64px | 40px | 32px | 24px | 20px | 16px
5
+ * 88px | 64px | 40px | 32px | 24px | 20px | 16px
6
6
  * @default "medium"
7
7
  */
8
8
  size?: "3xlarge" | "2xlarge" | "xlarge" | "large" | "medium" | "small" | "xsmall";
@@ -48,8 +48,14 @@ export const Stepper = forwardRef((_a, ref) => {
48
48
  orientation,
49
49
  interactive,
50
50
  } }, React.Children.map(children, (step, index) => {
51
- var _a, _b;
52
- return (React.createElement("li", { className: cl("navds-stepper__item"), key: index + ((_b = (_a = children === null || children === void 0 ? void 0 : children.toString) === null || _a === void 0 ? void 0 : _a.call(children)) !== null && _b !== void 0 ? _b : "") },
51
+ var _a, _b, _c, _d, _e;
52
+ return (React.createElement("li", { className: cl("navds-stepper__item", {
53
+ "navds-stepper__item--behind": activeStep > index,
54
+ "navds-stepper__item--completed": React.isValidElement(step) &&
55
+ ((_a = step === null || step === void 0 ? void 0 : step.props) === null || _a === void 0 ? void 0 : _a.completed),
56
+ "navds-stepper__item--non-interactive": React.isValidElement(step) &&
57
+ !((_c = (_b = step === null || step === void 0 ? void 0 : step.props) === null || _b === void 0 ? void 0 : _b.interactive) !== null && _c !== void 0 ? _c : interactive),
58
+ }), key: index + ((_e = (_d = children === null || children === void 0 ? void 0 : children.toString) === null || _d === void 0 ? void 0 : _d.call(children)) !== null && _e !== void 0 ? _e : "") },
53
59
  React.createElement("span", { className: "navds-stepper__line navds-stepper__line--1" }),
54
60
  React.isValidElement(step)
55
61
  ? React.cloneElement(step, Object.assign(Object.assign({}, step.props), { unsafe_index: index }))
@@ -1 +1 @@
1
- {"version":3,"file":"Stepper.js","sourceRoot":"","sources":["../../src/stepper/Stepper.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,MAAM,MAAM,CAAC;AACtB,OAAO,IAA0B,MAAM,QAAQ,CAAC;AAiDhD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAA6B,IAAI,CAAC,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,OAAO,GAAqB,UAAU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GAAG,KAAK;oBACjD,gCAAgC,EAC9B,KAAK,CAAC,cAAc,CAAmB,IAAI,CAAC;yBAC5C,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,SAAS,CAAA;oBACxB,sCAAsC,EACpC,KAAK,CAAC,cAAc,CAAmB,IAAI,CAAC;wBAC5C,CAAC,CAAC,MAAA,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,0CAAE,WAAW,mCAAI,WAAW,CAAC;iBAC7C,CAAC,EACF,GAAG,EAAE,KAAK,GAAG,CAAC,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,wDAAI,mCAAI,EAAE,CAAC;gBAE3C,8BAAM,SAAS,EAAC,4CAA4C,GAAG;gBAC9D,KAAK,CAAC,cAAc,CAAmB,IAAI,CAAC;oBAC3C,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,kCAClB,IAAI,CAAC,KAAK,KACb,YAAY,EAAE,KAAK,IACnB;oBACJ,CAAC,CAAC,IAAI;gBACR,8BAAM,SAAS,EAAC,4CAA4C,GAAG,CAC5D,CACN,CAAC;QACJ,CAAC,CAAC,CACsB,CACvB,CACN,CAAC;AACJ,CAAC,CACkB,CAAC;AAEtB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AAEpB,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/ds-react",
3
- "version": "4.7.1",
3
+ "version": "4.7.3",
4
4
  "description": "Aksel react-components for NAV designsystem",
5
5
  "author": "Aksel | NAV designsystem team",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@floating-ui/react": "0.24.1",
41
- "@navikt/aksel-icons": "^4.7.1",
41
+ "@navikt/aksel-icons": "^4.7.3",
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,7 +1,6 @@
1
1
  import { XMarkIcon } from "@navikt/aksel-icons";
2
2
  import cl from "clsx";
3
3
  import React, { forwardRef } from "react";
4
- import { OverridableComponent } from "../util/OverridableComponent";
5
4
 
6
5
  export interface RemovableChipsProps
7
6
  extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -22,26 +21,27 @@ export interface RemovableChipsProps
22
21
  onDelete?: () => void;
23
22
  }
24
23
 
25
- export const RemovableChips: OverridableComponent<
26
- RemovableChipsProps,
27
- HTMLButtonElement
28
- > = forwardRef(
24
+ export const RemovableChips = forwardRef<
25
+ HTMLButtonElement,
26
+ RemovableChipsProps
27
+ >(
29
28
  (
30
29
  {
31
30
  className,
32
31
  children,
33
32
  variant = "action",
34
- as: Component = "button",
35
33
  removeLabel = "slett",
36
34
  onDelete,
35
+ type = "button",
37
36
  ...rest
38
37
  },
39
38
  ref
40
39
  ) => {
41
40
  return (
42
- <Component
41
+ <button
43
42
  {...rest}
44
43
  ref={ref}
44
+ type={type}
45
45
  className={cl(
46
46
  "navds-chips__chip navds-chips__removable navds-chips--icon-right",
47
47
  className,
@@ -57,7 +57,7 @@ export const RemovableChips: OverridableComponent<
57
57
  <span className="navds-chips__removable-icon">
58
58
  <XMarkIcon aria-hidden />
59
59
  </span>
60
- </Component>
60
+ </button>
61
61
  );
62
62
  }
63
63
  );
@@ -5,7 +5,7 @@ import { useId } from "..";
5
5
  export interface LoaderProps extends SVGProps<SVGSVGElement> {
6
6
  /**
7
7
  * Changes Loader width/height
8
- * 64px | 40px | 32px | 24px | 20px | 16px
8
+ * 88px | 64px | 40px | 32px | 24px | 20px | 16px
9
9
  * @default "medium"
10
10
  */
11
11
  size?:
@@ -114,7 +114,15 @@ export const Stepper: StepperComponent = forwardRef<
114
114
  {React.Children.map(children, (step, index) => {
115
115
  return (
116
116
  <li
117
- className={cl("navds-stepper__item")}
117
+ className={cl("navds-stepper__item", {
118
+ "navds-stepper__item--behind": activeStep > index,
119
+ "navds-stepper__item--completed":
120
+ React.isValidElement<StepperStepProps>(step) &&
121
+ step?.props?.completed,
122
+ "navds-stepper__item--non-interactive":
123
+ React.isValidElement<StepperStepProps>(step) &&
124
+ !(step?.props?.interactive ?? interactive),
125
+ })}
118
126
  key={index + (children?.toString?.() ?? "")}
119
127
  >
120
128
  <span className="navds-stepper__line navds-stepper__line--1" />
@@ -11,8 +11,8 @@ export default {
11
11
  orientation: {
12
12
  control: {
13
13
  type: "radio",
14
- options: ["horizontal", "vertical"],
15
14
  },
15
+ options: ["horizontal", "vertical"],
16
16
  },
17
17
  activeStep: {
18
18
  control: {