@kystverket/styrbord 1.1.27 → 1.2.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.
@@ -1,15 +1,15 @@
1
1
  import React from 'react';
2
- import { AlertLevel, TextSize, Width } from './alert.types';
3
- export interface AlertProps {
4
- level: AlertLevel;
5
- size?: TextSize;
2
+ import { AlertProps as DsAlertProps } from '@digdir/designsystemet-react';
3
+ export type AlertProps = DsAlertProps & {
4
+ level?: 'info' | 'success' | 'warning' | 'error';
6
5
  title?: string;
7
6
  text?: string;
8
7
  children?: React.ReactNode;
9
- width?: Width;
8
+ width?: 'content' | 'md' | 'full';
9
+ 'data-size'?: 'sm' | 'md' | 'lg';
10
10
  className?: string;
11
11
  role?: 'status';
12
12
  onDismiss?: () => void;
13
- }
14
- declare const Alert: ({ level, size, width, title, text, className, ...props }: AlertProps) => React.JSX.Element;
13
+ };
14
+ declare const Alert: ({ level, title, "data-size": dataSize, text, width, className, ...props }: AlertProps) => React.JSX.Element;
15
15
  export default Alert;
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/react';
2
2
  import { AlertProps } from './alert';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ level, size, width, title, text, className, ...props }: AlertProps) => React.JSX.Element;
5
+ component: ({ level, title, "data-size": dataSize, text, width, className, ...props }: AlertProps) => React.JSX.Element;
6
6
  decorators: ((Story: import("@storybook/types").PartialStoryFn) => React.JSX.Element)[];
7
7
  tags: string[];
8
8
  argTypes: {};
@@ -10,8 +10,12 @@ declare const meta: {
10
10
  export default meta;
11
11
  type Story = StoryObj<typeof meta>;
12
12
  export declare const Default: Story;
13
- export declare const Small: Story;
13
+ export declare const Warning: Story;
14
+ export declare const Success: Story;
15
+ export declare const Danger: Story;
16
+ export declare const DangerAlt: Story;
17
+ export declare const SmallSize: Story;
18
+ export declare const NormalSize: Story;
19
+ export declare const LargeSizeWithDismiss: Story;
14
20
  export declare const DefaultKort: Story;
15
- export declare const LargeWithDismiss: Story;
16
- export declare const ClassNameCustomWidth: Story;
17
21
  export declare const WithErrorDismiss: Story;
@@ -1,2 +1,2 @@
1
- export declare const iconIdList: readonly ["add_location_alt", "add_location", "add", "adjust", "anchor", "archive", "arrow_back", "arrow_forward", "arrow_right_alt", "article", "calendar_month", "change_history", "chat", "check_circle", "check", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "content_copy", "data_table", "delete", "description", "directions_boat", "distance", "domain", "download", "edit_document", "edit_location_alt", "edit_location", "edit_square", "edit", "error", "event", "explore_nearby", "explore", "favorite", "file_map", "file_save", "format_align_center", "format_align_left", "format_align_right", "globe_uk", "inbox", "info", "keyboard_arrow_down", "keyboard_arrow_up", "layers", "lightbulb", "link", "location_chip", "lock", "login", "logout", "mail", "map_pin_heart", "map", "menu", "mode_cool", "more_vert", "move", "numbers", "open_in_new", "pending_actions", "person_add", "person_pin_circle", "person_pin", "person", "pin_drop", "radio_button_checked", "radio_button_unchecked", "sailing", "save", "send", "settings_input_antenna", "settings", "severe_cold", "source_environment", "stylus", "timeline", "video_library", "videocam", "view_list", "warning", "zoom_in_map", "zoom_out_map", "picture_as_pdf", "pan_zoom"];
1
+ export declare const iconIdList: readonly ["add_location_alt", "add_location", "add", "adjust", "anchor", "archive", "arrow_back", "arrow_forward", "arrow_right_alt", "article", "calendar_month", "change_history", "chat", "check_circle", "check", "chevron_left", "chevron_right", "circle", "close", "cloud_alert", "cloud_done", "content_copy", "data_table", "delete", "description", "directions_boat", "distance", "domain", "download", "edit_document", "edit_location_alt", "edit_location", "edit_square", "edit", "error", "event", "explore_nearby", "explore", "favorite", "file_map", "file_save", "format_align_center", "format_align_left", "format_align_right", "globe_uk", "inbox", "info", "info_i", "keyboard_arrow_down", "keyboard_arrow_up", "layers", "lightbulb", "link", "location_chip", "lock", "login", "logout", "mail", "map_pin_heart", "map", "menu", "mode_cool", "more_vert", "move", "numbers", "open_in_new", "pending_actions", "person_add", "person_pin_circle", "person_pin", "person", "pin_drop", "radio_button_checked", "radio_button_unchecked", "sailing", "save", "send", "settings_input_antenna", "settings", "severe_cold", "source_environment", "stylus", "timeline", "video_library", "videocam", "view_list", "warning", "zoom_in_map", "zoom_out_map", "picture_as_pdf", "pan_zoom"];
2
2
  export type IconId = (typeof iconIdList)[number];
@@ -8,7 +8,6 @@ export { default as DeprecatedCard, type CardProps as DeprecatedCardProps } from
8
8
  export { FilePreviewer, type FilePreviewerProps } from './components/kystverket/FilePreviewer';
9
9
  export { default as KyvDivider } from './components/kystverket/KyvDivider/kyvDivider';
10
10
  export { default as Alert } from './components/kystverket/Alert/alert';
11
- export type { AlertLevel } from './components/kystverket/Alert/alert.types';
12
11
  export type { AlertProps } from './components/kystverket/Alert/alert';
13
12
  export { default as Box } from './components/kystverket/Box/box';
14
13
  export type { BoxProps } from './components/kystverket/Box/box';