@kystverket/styrbord 1.9.11 → 1.11.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/dist/src/components/designsystemet/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/src/components/designsystemet/Chip/Chip.d.ts +14 -0
- package/dist/src/components/designsystemet/Chip/index.d.ts +36 -0
- package/dist/src/components/kystverket/ColorTokenCollections/Colors.stories.d.ts +33 -0
- package/dist/src/data/ais/AisShipTypes.stories.d.ts +8 -0
- package/dist/src/data/ais/shipTypes.d.ts +79 -0
- package/dist/src/main.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/style.js +1088 -929
- package/dist/style.umd.cjs +7 -7
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare const Disabled: {
|
|
|
41
41
|
} | {
|
|
42
42
|
name: string;
|
|
43
43
|
disabled: boolean;
|
|
44
|
+
id?: string | undefined | undefined;
|
|
44
45
|
children?: React.ReactNode;
|
|
45
46
|
className?: string | undefined | undefined;
|
|
46
47
|
width?: number | string | undefined | undefined;
|
|
@@ -65,7 +66,6 @@ export declare const Disabled: {
|
|
|
65
66
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
66
67
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
67
68
|
hidden?: boolean | undefined | undefined;
|
|
68
|
-
id?: string | undefined | undefined;
|
|
69
69
|
lang?: string | undefined | undefined;
|
|
70
70
|
nonce?: string | undefined | undefined;
|
|
71
71
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -358,6 +358,7 @@ export declare const Disabled: {
|
|
|
358
358
|
} | {
|
|
359
359
|
name: string;
|
|
360
360
|
disabled: boolean;
|
|
361
|
+
id?: string | undefined | undefined;
|
|
361
362
|
children?: React.ReactNode;
|
|
362
363
|
className?: string | undefined | undefined;
|
|
363
364
|
width?: number | string | undefined | undefined;
|
|
@@ -382,7 +383,6 @@ export declare const Disabled: {
|
|
|
382
383
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
383
384
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
384
385
|
hidden?: boolean | undefined | undefined;
|
|
385
|
-
id?: string | undefined | undefined;
|
|
386
386
|
lang?: string | undefined | undefined;
|
|
387
387
|
nonce?: string | undefined | undefined;
|
|
388
388
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -675,6 +675,7 @@ export declare const Disabled: {
|
|
|
675
675
|
} | {
|
|
676
676
|
name: string;
|
|
677
677
|
disabled: boolean;
|
|
678
|
+
id?: string | undefined | undefined;
|
|
678
679
|
children?: React.ReactNode;
|
|
679
680
|
className?: string | undefined | undefined;
|
|
680
681
|
width?: number | string | undefined | undefined;
|
|
@@ -699,7 +700,6 @@ export declare const Disabled: {
|
|
|
699
700
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
700
701
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
701
702
|
hidden?: boolean | undefined | undefined;
|
|
702
|
-
id?: string | undefined | undefined;
|
|
703
703
|
lang?: string | undefined | undefined;
|
|
704
704
|
nonce?: string | undefined | undefined;
|
|
705
705
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChipButtonProps, ChipRemovableProps, ChipCheckboxProps, ChipRadioProps } from '@digdir/designsystemet-react';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export declare const ChipButton: FC<ChipButtonProps & {
|
|
4
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ChipRemovable: FC<ChipRemovableProps & {
|
|
7
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ChipCheckbox: FC<ChipCheckboxProps & {
|
|
10
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ChipRadio: FC<ChipRadioProps & {
|
|
13
|
+
ref?: React.Ref<HTMLLabelElement>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ChipButton, ChipCheckbox, ChipRadio, ChipRemovable } from './Chip';
|
|
2
|
+
type Chip = {
|
|
3
|
+
/**
|
|
4
|
+
* Chip.Button used for interaction
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <Chip.Button>Click me</Chip.Button>
|
|
8
|
+
*/
|
|
9
|
+
Button: typeof ChipButton;
|
|
10
|
+
/**
|
|
11
|
+
* Chip.Checkbox used for multiselection
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <Chip.Checkbox name="language" value="nynorsk">Nynorsk</Chip.Checkbox>
|
|
15
|
+
* <Chip.Checkbox name="language" value="bokmål">Bokmål</Chip.Checkbox>
|
|
16
|
+
*/
|
|
17
|
+
Checkbox: typeof ChipCheckbox;
|
|
18
|
+
/**
|
|
19
|
+
* Chip.Radio used for single selection
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Chip.Radio name="language" value="nynorsk">Nynorsk</Chip.Radio>
|
|
23
|
+
* <Chip.Radio name="language" value="bokmål">Bokmål</Chip.Radio>
|
|
24
|
+
*/
|
|
25
|
+
Radio: typeof ChipRadio;
|
|
26
|
+
/**
|
|
27
|
+
* Chip.Removable used for interaction
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* <Chip.Removable>Click to remove me</Chip.Removable>
|
|
31
|
+
*/
|
|
32
|
+
Removable: typeof ChipRemovable;
|
|
33
|
+
};
|
|
34
|
+
declare const ChipComponent: Chip;
|
|
35
|
+
export type { ChipButtonProps, ChipCheckboxProps, ChipRadioProps, ChipRemovableProps, } from '@digdir/designsystemet-react';
|
|
36
|
+
export { ChipButton, ChipCheckbox, ChipComponent as Chip, ChipRadio, ChipRemovable };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
type ColorScheme = 'light' | 'dark';
|
|
3
|
+
type StoryArgs = {
|
|
4
|
+
colorScheme: ColorScheme;
|
|
5
|
+
};
|
|
6
|
+
declare const meta: {
|
|
7
|
+
title: string;
|
|
8
|
+
tags: string[];
|
|
9
|
+
component: ({ colorScheme }: StoryArgs) => React.JSX.Element;
|
|
10
|
+
args: {
|
|
11
|
+
colorScheme: "light";
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
colorScheme: {
|
|
15
|
+
options: ColorScheme[];
|
|
16
|
+
control: {
|
|
17
|
+
type: "inline-radio";
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
parameters: {
|
|
23
|
+
docs: {
|
|
24
|
+
description: {
|
|
25
|
+
component: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
render: (args: StoryArgs) => React.JSX.Element;
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const AllColors: Story;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export interface AisShipType {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly aisCodes: readonly string[];
|
|
5
|
+
readonly color: string;
|
|
6
|
+
readonly borderColor: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const AIS_SHIP_TYPES: readonly [{
|
|
9
|
+
readonly id: "passasjer";
|
|
10
|
+
readonly label: "Passasjer";
|
|
11
|
+
readonly aisCodes: readonly ["40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69"];
|
|
12
|
+
readonly color: "#085382";
|
|
13
|
+
readonly borderColor: "#022C55";
|
|
14
|
+
}, {
|
|
15
|
+
readonly id: "fritidsbat";
|
|
16
|
+
readonly label: "Fritidsbåt";
|
|
17
|
+
readonly aisCodes: readonly ["37"];
|
|
18
|
+
readonly color: "#83A9C0";
|
|
19
|
+
readonly borderColor: "#085382";
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "seilbat";
|
|
22
|
+
readonly label: "Seilbåt";
|
|
23
|
+
readonly aisCodes: readonly ["36"];
|
|
24
|
+
readonly color: "#83A9C0";
|
|
25
|
+
readonly borderColor: "#085382";
|
|
26
|
+
}, {
|
|
27
|
+
readonly id: "frakt";
|
|
28
|
+
readonly label: "Frakt";
|
|
29
|
+
readonly aisCodes: readonly ["33", "34", "53", "54", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79"];
|
|
30
|
+
readonly color: "#58A752";
|
|
31
|
+
readonly borderColor: "#0C6F06";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "tank";
|
|
34
|
+
readonly label: "Tank";
|
|
35
|
+
readonly aisCodes: readonly ["80", "81", "82", "83", "84", "85", "86", "87", "88", "89"];
|
|
36
|
+
readonly color: "#535E62";
|
|
37
|
+
readonly borderColor: "#19191A";
|
|
38
|
+
}, {
|
|
39
|
+
readonly id: "fiske";
|
|
40
|
+
readonly label: "Fiske";
|
|
41
|
+
readonly aisCodes: readonly ["30"];
|
|
42
|
+
readonly color: "#F48B68";
|
|
43
|
+
readonly borderColor: "#EC481E";
|
|
44
|
+
}, {
|
|
45
|
+
readonly id: "tau";
|
|
46
|
+
readonly label: "Tau";
|
|
47
|
+
readonly aisCodes: readonly ["31", "32", "52"];
|
|
48
|
+
readonly color: "#FFD666";
|
|
49
|
+
readonly borderColor: "#CC9600";
|
|
50
|
+
}, {
|
|
51
|
+
readonly id: "militaer";
|
|
52
|
+
readonly label: "Militær";
|
|
53
|
+
readonly aisCodes: readonly ["35"];
|
|
54
|
+
readonly color: "#5D6533";
|
|
55
|
+
readonly borderColor: "#013200";
|
|
56
|
+
}, {
|
|
57
|
+
readonly id: "redning";
|
|
58
|
+
readonly label: "Redning";
|
|
59
|
+
readonly aisCodes: readonly ["51", "55", "58"];
|
|
60
|
+
readonly color: "#FFEA00";
|
|
61
|
+
readonly borderColor: "#19191A";
|
|
62
|
+
}, {
|
|
63
|
+
readonly id: "los";
|
|
64
|
+
readonly label: "Los";
|
|
65
|
+
readonly aisCodes: readonly ["50"];
|
|
66
|
+
readonly color: "#FF701A";
|
|
67
|
+
readonly borderColor: "#820000";
|
|
68
|
+
}, {
|
|
69
|
+
readonly id: "ukjent";
|
|
70
|
+
readonly label: "Ukjent";
|
|
71
|
+
readonly aisCodes: readonly ["20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "56", "57", "59", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99"];
|
|
72
|
+
readonly color: "#CCCCCC";
|
|
73
|
+
readonly borderColor: "#404040";
|
|
74
|
+
}];
|
|
75
|
+
export type AisShipTypeEntry = (typeof AIS_SHIP_TYPES)[number];
|
|
76
|
+
export type AisShipTypeId = AisShipTypeEntry['id'];
|
|
77
|
+
export type AisCode = AisShipTypeEntry['aisCodes'][number];
|
|
78
|
+
export declare function getShipTypeByAisCode(code: string | number): AisShipTypeEntry | undefined;
|
|
79
|
+
export declare function getShipTypeById(id: AisShipTypeId): AisShipTypeEntry | undefined;
|
package/dist/src/main.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import './css/index.scss';
|
|
2
2
|
import '@material-symbols/font-400/outlined.css';
|
|
3
3
|
export type { SupportedLanguage, ScreenSize } from './utils/types';
|
|
4
|
+
export { AIS_SHIP_TYPES, getShipTypeByAisCode, getShipTypeById } from './data/ais/shipTypes';
|
|
5
|
+
export type { AisShipType, AisShipTypeEntry, AisShipTypeId, AisCode } from './data/ais/shipTypes';
|
|
4
6
|
export { default as DeprecatedErrorLabel, type ErrorLabelProps as DeprecatedErrorLabelProps, } from './components/deprecated/ErrorLabel/errorLabel';
|
|
5
7
|
export { default as DeprecatedInputLabel, type InputLabelProps as DeprecatedInputLabelProps, } from './components/deprecated/InputLabel/inputLabel';
|
|
6
8
|
export { Details as DeprecatedDetails, type DetailsProps as DeprecatedDetailsProps, } from './components/deprecated/Details/Details';
|
|
@@ -85,6 +87,8 @@ export { SideSheet, type SideSheetProps } from './components/kystverket/SideShee
|
|
|
85
87
|
export type { SideSheetSize, SideSheetPlacement, SideSheetMode, SideSheetHeadingSize, SideSheetLayoutProps, } from './components/kystverket/SideSheet/SideSheet.types';
|
|
86
88
|
export { Suggestion } from './components/designsystemet/Suggestion/Suggestion';
|
|
87
89
|
export type { SuggestionProps } from './components/designsystemet/Suggestion/Suggestion';
|
|
90
|
+
export type { ChipButtonProps, ChipCheckboxProps, ChipRadioProps, ChipRemovableProps, } from './components/designsystemet/Chip';
|
|
91
|
+
export { Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable } from './components/designsystemet/Chip';
|
|
88
92
|
export { RovingFocusItem, RovingFocusRoot, omit, useCheckboxGroup, useDebounceCallback, useIsomorphicLayoutEffect, useMediaQuery, usePagination, useRadioGroup, useSynchronizedAnimation, } from '@digdir/designsystemet-react';
|
|
89
93
|
export type { Size, UseRadioGroupProps, UseCheckboxGroupProps, UsePaginationProps, MergeRight, LabelRequired, } from '@digdir/designsystemet-react';
|
|
90
94
|
export type { BadgePositionProps, BadgeProps } from '@digdir/designsystemet-react';
|
|
@@ -97,8 +101,6 @@ export type { CardBlockProps, CardProps } from '@digdir/designsystemet-react';
|
|
|
97
101
|
export { Card, CardBlock } from '@digdir/designsystemet-react';
|
|
98
102
|
export type { CheckboxProps } from '@digdir/designsystemet-react';
|
|
99
103
|
export { Checkbox } from '@digdir/designsystemet-react';
|
|
100
|
-
export type { ChipButtonProps, ChipCheckboxProps, ChipRadioProps, ChipRemovableProps, } from '@digdir/designsystemet-react';
|
|
101
|
-
export { Chip, ChipButton, ChipCheckbox, ChipRadio, ChipRemovable } from '@digdir/designsystemet-react';
|
|
102
104
|
export type { DetailsContentProps, DetailsProps, DetailsSummaryProps } from '@digdir/designsystemet-react';
|
|
103
105
|
export { Details, DetailsContent, DetailsSummary } from '@digdir/designsystemet-react';
|
|
104
106
|
export type { DialogBlockProps, DialogTriggerContextProps, DialogTriggerProps } from '@digdir/designsystemet-react';
|