@kystverket/styrbord 2.1.0 → 2.3.0

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/README.md CHANGED
@@ -15,6 +15,13 @@ Alle komponentene og typene i Designsystemet er tilgjengelig i Styrbord med føl
15
15
  - Komponenter merket med 🌈 i menyen er uendret fra Designsystemet.
16
16
  - Komponenter merket med 🌈+⚓ i menyen er Designsystem-komponenter som er utvidet med Kystverkets behov. Bruk og egenskap skal i stor grad overlappe.
17
17
 
18
+ ## Endringer som kan skape visuell endring
19
+
20
+ ### 2026-10-16
21
+
22
+ Default weight på label endret til medium fra semibold.
23
+ data-font-weight endret til data-weight for å matche designsystemet.
24
+
18
25
  ## Migrere fra 1.x?
19
26
 
20
27
  Mat KI-agenten med [v2.md](Versjon 2 - Endringer). Den vil da klare å migrere det meste uten problemer. Testet med Claude Code med Opus 5.5.
@@ -0,0 +1,16 @@
1
+ import type { SideSheetPlacement } from '~/components/kystverket/SideSheet/SideSheet.types';
2
+ interface ResizeHandleProps {
3
+ sheetRef: React.RefObject<HTMLElement | null>;
4
+ placement: SideSheetPlacement;
5
+ pinned: boolean;
6
+ onResize: (width: number) => void;
7
+ onResizingChange: (resizing: boolean) => void;
8
+ onReset: () => void;
9
+ }
10
+ /**
11
+ * Draggable edge for `SideSheet allowResize`. Follows the WAI-ARIA window splitter pattern: a
12
+ * focusable `separator` whose value is the sheet's width in pixels, adjustable with the arrow
13
+ * keys (Shift for bigger steps) and Home/End. Double-click resets to the `size` prop.
14
+ */
15
+ export declare function ResizeHandle({ sheetRef, placement, pinned, onResize, onResizingChange, onReset, }: Readonly<ResizeHandleProps>): React.JSX.Element;
16
+ export {};
@@ -26,6 +26,7 @@ declare const _default: {
26
26
  onClose?: (() => void) | undefined;
27
27
  placement?: import("~/main").SideSheetPlacement | undefined;
28
28
  size?: import("~/main").SideSheetSize | undefined;
29
+ allowResize?: boolean | undefined;
29
30
  pinnable?: boolean | undefined;
30
31
  pinned?: boolean | undefined;
31
32
  onPinnedChange?: ((pinned: boolean) => void) | undefined;
@@ -50,6 +51,7 @@ export declare const OpenInNewWindow: StoryFn<typeof SideSheet>;
50
51
  export declare const WithBackButton: StoryFn<typeof SideSheet>;
51
52
  export declare const WithActionsScrollbarDividers: StoryFn<typeof SideSheet>;
52
53
  export declare const Pinnable: StoryFn<typeof SideSheet>;
54
+ export declare const Resizable: StoryFn<typeof SideSheet>;
53
55
  export declare const LeftPlacement: StoryFn<typeof SideSheet>;
54
56
  export declare const SmallSize: StoryFn<typeof SideSheet>;
55
57
  export declare const LargeSize: StoryFn<typeof SideSheet>;
@@ -6,6 +6,14 @@ export interface SideSheetProps {
6
6
  onClose?: () => void;
7
7
  placement?: SideSheetPlacement;
8
8
  size?: SideSheetSize;
9
+ /**
10
+ * Let the user change the sheet's width by dragging the edge facing the page, or with the
11
+ * arrow keys when the handle has focus. `size` is the starting width, and double-clicking the
12
+ * handle goes back to it. The width is kept while the sheet is mounted and starts over when
13
+ * `size` changes. Hidden on phones, where the sheet is full width.
14
+ * Default: `false`.
15
+ */
16
+ allowResize?: boolean;
9
17
  /**
10
18
  * Show a pin button in the header that lets the user toggle overlay/push.
11
19
  * Default: `false`.