@olenbetong/appframe-ds 1.3.0 → 1.3.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,14 @@
1
1
  # @olenbetong/appframe-ds
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2c2ed02: `DataEditToolbar`: the previous/next buttons no longer stack (Designsystemet buttons are `display: flex`, so the navigation group is a flex row now), and the toolbar is a tinted bar with a bottom border in the theme's tokens instead of black-at-12% top and bottom borders, which were invisible in dark mode and doubled up against a tab list above it.
8
+ - c28f772: `InputAdornments`: the hover style is drawn on the wrapper like the focus style (Designsystemet's inner outline, on the whole control), and the inner input no longer shows its own hover outline.
9
+ - Updated dependencies [a4158e8]
10
+ - @olenbetong/appframe-react@2.2.2
11
+
3
12
  ## 1.3.0
4
13
 
5
14
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olenbetong/appframe-ds",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Components that bind Designsystemet components to Appframe data objects",
5
5
  "type": "module",
6
6
  "types": "./es/index.d.ts",
@@ -63,17 +63,17 @@
63
63
  "@atlaskit/pragmatic-drag-and-drop": "3.1.0",
64
64
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "2.2.2",
65
65
  "@base-ui/react": "1.8.0",
66
+ "@olenbetong/appframe-core": "2.14.0",
67
+ "@olenbetong/appframe-data": "1.7.2",
68
+ "@olenbetong/appframe-react": "2.2.2",
66
69
  "clsx": "^2.1.1",
67
70
  "dockview-react": "8.3.1",
68
71
  "localforage": "^1.10.0",
69
72
  "mitt": "^3.0.1",
70
73
  "react": "19.3.0",
71
74
  "react-dom": "19.3.0",
72
- "react-window": "2.3.1",
73
- "temporal-polyfill": "1.0.5",
74
- "@olenbetong/appframe-react": "2.2.1",
75
- "@olenbetong/appframe-core": "2.14.0",
76
- "@olenbetong/appframe-data": "1.7.2"
75
+ "react-window": "2.3.3",
76
+ "temporal-polyfill": "1.0.5"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@digdir/designsystemet-react": "1.22.0",
@@ -90,7 +90,7 @@
90
90
  "@types/react": "19.3.0",
91
91
  "@types/react-dom": "19.3.0",
92
92
  "happy-dom": "20.14.5",
93
- "react-error-boundary": "6.1.5",
93
+ "react-error-boundary": "6.1.6",
94
94
  "react-router": "8.4.0",
95
95
  "typescript": "7.0.2"
96
96
  },
@@ -0,0 +1,23 @@
1
+ /*
2
+ * A toolbar bar above a record form: tinted, so it reads as chrome rather than as part of the
3
+ * form below it. Designsystemet buttons are `display: flex`, so every group of them must be a
4
+ * flex row of its own or the buttons stack.
5
+ */
6
+ @layer ds {
7
+ .DataEditToolbar-root {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: var(--ds-size-1);
11
+ min-height: 48px;
12
+ padding-inline: var(--ds-size-2);
13
+ background: var(--ds-color-neutral-background-tinted);
14
+ border-block-end: var(--ds-border-width-default) solid var(--ds-color-neutral-border-subtle);
15
+ }
16
+
17
+ .DataEditToolbar-navigation {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: var(--ds-size-1);
21
+ margin-inline-start: auto;
22
+ }
23
+ }
@@ -1,3 +1,5 @@
1
+ import "./DataEditToolbar.css";
2
+
1
3
  import { Button, Tooltip } from "@digdir/designsystemet-react";
2
4
  import { ChevronLeftIcon, ChevronRightIcon } from "@navikt/aksel-icons";
3
5
  import type { DataObject } from "@olenbetong/appframe-data";
@@ -55,23 +57,13 @@ export function DataEditToolbar({
55
57
  children,
56
58
  navigationDataObject,
57
59
  showNavigation,
58
- style,
60
+ className,
59
61
  ...props
60
62
  }: DataEditToolbarProps) {
61
63
  let dataObject = useDataObject();
62
64
 
63
65
  return (
64
- <div
65
- style={{
66
- display: "flex",
67
- alignItems: "center",
68
- minHeight: "48px",
69
- borderBottom: "1px solid rgb(0 0 0 / 0.12)",
70
- borderTop: "1px solid rgb(0 0 0 / 0.12)",
71
- ...style,
72
- }}
73
- {...props}
74
- >
66
+ <div className={className ? `DataEditToolbar-root ${className}` : "DataEditToolbar-root"} {...props}>
75
67
  <Tooltip content={getLocalizedString("Save changes")}>
76
68
  <SaveIconButton />
77
69
  </Tooltip>
@@ -83,7 +75,7 @@ export function DataEditToolbar({
83
75
  </Tooltip>
84
76
  {children}
85
77
  {showNavigation && (
86
- <div style={{ marginLeft: "auto" }}>
78
+ <div className="DataEditToolbar-navigation">
87
79
  <IndexNavigator dataObject={navigationDataObject ?? dataObject} />
88
80
  </div>
89
81
  )}
@@ -40,8 +40,13 @@
40
40
  --obInputAdornments-fontSize: var(--ds-font-size-4, 1.125rem);
41
41
  }
42
42
 
43
- .ObInputAdornments-root:hover:not(:focus-within) {
44
- border-color: var(--ds-color-neutral-border-strong, #767676);
43
+ /* The Designsystemet input hover (an inner outline doubling the border), drawn on the wrapper */
44
+ .ObInputAdornments-root:hover:not(
45
+ :focus-within,
46
+ :has(.ObInputAdornments-field:disabled, .ObInputAdornments-field[readonly])
47
+ ) {
48
+ outline: var(--ds-border-width-default, 1px) solid var(--ds-color-neutral-border-default, #b3b3b3);
49
+ outline-offset: -0.1px;
45
50
  }
46
51
 
47
52
  .ObInputAdornments-root:has(.ObInputAdornments-field:focus-visible) {
@@ -68,6 +73,10 @@
68
73
  opacity: 1;
69
74
  }
70
75
 
76
+ .ObInputAdornments-root .ObInputAdornments-field:hover {
77
+ outline: none;
78
+ }
79
+
71
80
  .ObInputAdornments-root .ObInputAdornments-field:focus-visible {
72
81
  box-shadow: none;
73
82
  outline: none;