@olenbetong/appframe-ds 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @olenbetong/appframe-ds
2
2
 
3
+ ## 1.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 61855a9: Fix the AfGrid sort-order and filter-count badge: it is now anchored to the header icon button instead of floating beside it (where the column header clipped it), and uses a compact 1rem size.
8
+ - Updated dependencies [986cea3]
9
+ - Updated dependencies [2787329]
10
+ - @olenbetong/appframe-data@1.7.1
11
+ - @olenbetong/appframe-react@2.1.4
12
+
3
13
  ## 1.0.0
4
14
 
5
15
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olenbetong/appframe-ds",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Components that bind Designsystemet components to Appframe data objects",
5
5
  "type": "module",
6
6
  "types": "./es/index.d.ts",
@@ -35,8 +35,6 @@
35
35
  "@mui/x-data-grid-premium": ">=8.0.0 <9.0.0",
36
36
  "@mui/x-license": ">=8.0.0 <9.0.0",
37
37
  "@navikt/aksel-icons": ">=8.16.1",
38
- "react": ">=19.2.8",
39
- "react-dom": ">=19.2.8",
40
38
  "react-error-boundary": ">=6.1.2",
41
39
  "react-router": ">=8.3.0"
42
40
  },
@@ -60,16 +58,18 @@
60
58
  "dependencies": {
61
59
  "@atlaskit/pragmatic-drag-and-drop": "2.0.2",
62
60
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "2.2.0",
63
- "@base-ui/react": "1.7.0",
61
+ "@base-ui/react": "1.8.0",
64
62
  "clsx": "^2.1.1",
65
- "dockview-react": "8.2.0",
63
+ "dockview-react": "8.3.0",
66
64
  "localforage": "^1.10.0",
67
65
  "mitt": "^3.0.1",
66
+ "react": "19.3.0",
67
+ "react-dom": "19.3.0",
68
68
  "react-virtualized-auto-sizer": "^1.0.26",
69
69
  "react-window": "^1.8.11",
70
+ "@olenbetong/appframe-data": "1.7.1",
70
71
  "@olenbetong/appframe-core": "2.13.1",
71
- "@olenbetong/appframe-data": "1.7.0",
72
- "@olenbetong/appframe-react": "2.1.3"
72
+ "@olenbetong/appframe-react": "2.1.4"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@digdir/designsystemet-react": "1.21.0",
@@ -78,18 +78,16 @@
78
78
  "@mui/material": "9.4.0",
79
79
  "@mui/x-data-grid-premium": "8.29.3",
80
80
  "@mui/x-license": "8.29.3",
81
- "@navikt/aksel-icons": "8.16.1",
81
+ "@navikt/aksel-icons": "8.16.2",
82
82
  "@testing-library/dom": "^10.4.1",
83
83
  "@testing-library/jest-dom": "^7.0.1",
84
84
  "@testing-library/react": "16.3.3",
85
- "@testing-library/user-event": "^14.6.6",
86
- "@types/react": "19.2.18",
87
- "@types/react-dom": "19.2.5",
85
+ "@testing-library/user-event": "^14.6.7",
86
+ "@types/react": "19.3.0",
87
+ "@types/react-dom": "19.3.0",
88
88
  "@types/react-window": "^1.8.8",
89
- "happy-dom": "^20.12.0",
90
- "react": "19.2.8",
91
- "react-dom": "19.2.8",
92
- "react-error-boundary": "6.1.4",
89
+ "happy-dom": "^20.14.3",
90
+ "react-error-boundary": "6.1.5",
93
91
  "react-router": "8.3.1",
94
92
  "typescript": "7.0.2"
95
93
  },
@@ -237,18 +237,25 @@ function BaseBadge(props: GridSlotProps["baseBadge"]) {
237
237
  let { badgeContent, children, invisible, color, variant, overlap, className, ...other } = props;
238
238
  let count = typeof badgeContent === "number" ? badgeContent : Number(badgeContent);
239
239
 
240
+ // The badge must wrap the element it decorates so Designsystemet anchors it to
241
+ // that element's corner. Rendering it as a sibling put the badge on an empty
242
+ // box next to the icon, where it was clipped by the column header.
240
243
  return (
241
- <span {...(other as any)} className={clsx("AfGrid-badgeWrapper", className)}>
244
+ <Badge.Position
245
+ {...(other as any)}
246
+ className={clsx("AfGrid-badge", className)}
247
+ placement="top-right"
248
+ overlap={overlap === "circular" ? "circle" : "rectangle"}
249
+ >
242
250
  {children}
243
251
  {!invisible && (
244
- <Badge.Position placement="top-right" overlap={overlap === "circular" ? "circle" : "rectangle"}>
245
- <Badge
246
- count={variant === "dot" || Number.isNaN(count) ? undefined : count}
247
- data-color={color === "error" ? "danger" : color === "primary" ? "accent" : "neutral"}
248
- />
249
- </Badge.Position>
252
+ <Badge
253
+ aria-hidden
254
+ count={variant === "dot" || Number.isNaN(count) ? undefined : count}
255
+ data-color={color === "error" ? "danger" : color === "primary" ? "accent" : "neutral"}
256
+ />
250
257
  )}
251
- </span>
258
+ </Badge.Position>
252
259
  );
253
260
  }
254
261
 
@@ -12,9 +12,20 @@
12
12
  width: 100%;
13
13
  }
14
14
 
15
- .AfGrid-badgeWrapper {
16
- position: relative;
17
- display: inline-flex;
15
+ /* Sort-order and filter-count badges on header icon buttons: a compact number
16
+ pinned to the button corner instead of Designsystemet's default 1.5rem badge. */
17
+ .AfGrid-badge .ds-badge {
18
+ --dsc-badge-size--count: var(--ds-size-4, 1rem);
19
+ --dsc-badge-padding: 0 var(--ds-size-1, 0.25rem);
20
+
21
+ /* Pull the badge down from the default 14% so its top edge stays inside the
22
+ header row instead of being cropped. */
23
+ --dsc-badge-top: 32%;
24
+ }
25
+
26
+ .AfGrid-badge .ds-badge::before {
27
+ font-size: var(--ds-font-size-1, 0.75rem);
28
+ line-height: 1;
18
29
  }
19
30
 
20
31
  .AfGrid-linearProgress {