@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 +10 -0
- package/package.json +13 -15
- package/src/grid/slots/index.tsx +15 -8
- package/src/grid/slots/slots.css +14 -3
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.
|
|
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.
|
|
61
|
+
"@base-ui/react": "1.8.0",
|
|
64
62
|
"clsx": "^2.1.1",
|
|
65
|
-
"dockview-react": "8.
|
|
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-
|
|
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.
|
|
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.
|
|
86
|
-
"@types/react": "19.
|
|
87
|
-
"@types/react-dom": "19.
|
|
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.
|
|
90
|
-
"react": "
|
|
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
|
},
|
package/src/grid/slots/index.tsx
CHANGED
|
@@ -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
|
-
<
|
|
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
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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
|
-
</
|
|
258
|
+
</Badge.Position>
|
|
252
259
|
);
|
|
253
260
|
}
|
|
254
261
|
|
package/src/grid/slots/slots.css
CHANGED
|
@@ -12,9 +12,20 @@
|
|
|
12
12
|
width: 100%;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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 {
|