@kystverket/styrbord 1.20.1 → 2.0.2

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.
Files changed (53) hide show
  1. package/README.md +5 -3
  2. package/dist/src/components/designsystemet/Avatar/Avatar.d.ts +10 -2
  3. package/dist/src/components/designsystemet/Avatar/Avatar.helpers.d.ts +10 -0
  4. package/dist/src/components/designsystemet/Avatar/Avatar.stories.d.ts +1 -0
  5. package/dist/src/components/designsystemet/Button/Button.d.ts +3 -2
  6. package/dist/src/components/designsystemet/Button/Button.stories.d.ts +3 -0
  7. package/dist/src/components/designsystemet/Checkbox/Checkbox.stories.d.ts +15 -15
  8. package/dist/src/components/designsystemet/Chip/Chip.stories.d.ts +5 -13
  9. package/dist/src/components/designsystemet/Details/Details.stories.d.ts +2 -1
  10. package/dist/src/components/designsystemet/Dialog/Dialog.d.ts +2 -2
  11. package/dist/src/components/designsystemet/Dialog/Dialog.stories.d.ts +2 -2
  12. package/dist/src/components/designsystemet/NumberInput/NumberInput.d.ts +2 -2
  13. package/dist/src/components/designsystemet/Paragraph/typography.paragraph.stories.d.ts +6 -9
  14. package/dist/src/components/designsystemet/Tag/Tag.d.ts +3 -4
  15. package/dist/src/components/designsystemet/Tag/Tag.stories.d.ts +1 -1
  16. package/dist/src/components/designsystemet/TextArea/TextArea.d.ts +2 -2
  17. package/dist/src/components/designsystemet/TextArea/TextArea.stories.d.ts +1 -1
  18. package/dist/src/components/designsystemet/TextInput/TextInput.d.ts +2 -2
  19. package/dist/src/components/designsystemet/TextInput/TextInput.stories.d.ts +1 -1
  20. package/dist/src/components/kystverket/Alert/alert.d.ts +4 -4
  21. package/dist/src/components/kystverket/Alert/alert.stories.d.ts +2 -1
  22. package/dist/src/components/kystverket/Box/box.d.ts +10 -0
  23. package/dist/src/components/kystverket/ClickableCard/ClickableCard.stories.d.ts +10 -9
  24. package/dist/src/components/kystverket/ClickableCard/ClickableCard.types.d.ts +5 -6
  25. package/dist/src/components/kystverket/DateAndTimePickers/DateTimePicker/DateTimePicker.d.ts +2 -2
  26. package/dist/src/components/kystverket/DateAndTimePickers/DateTimePicker/DateTimePicker.stories.d.ts +2 -2
  27. package/dist/src/components/kystverket/DateAndTimePickers/Datepicker/Datepicker.d.ts +2 -2
  28. package/dist/src/components/kystverket/DateAndTimePickers/Datepicker/Datepicker.stories.d.ts +2 -2
  29. package/dist/src/components/kystverket/DateAndTimePickers/TimePicker/TimePicker.d.ts +2 -2
  30. package/dist/src/components/kystverket/DateAndTimePickers/TimePicker/TimePicker.stories.d.ts +2 -2
  31. package/dist/src/components/kystverket/Header/Header.d.ts +1 -1
  32. package/dist/src/components/kystverket/Image/svgImage.d.ts +2 -3
  33. package/dist/src/components/kystverket/PageHeading/PageHeading.d.ts +5 -5
  34. package/dist/src/components/kystverket/SlotDialog/SlotDialog.d.ts +2 -2
  35. package/dist/src/components/kystverket/SlotDialog/SlotDialog.stories.d.ts +1 -1
  36. package/dist/src/components/kystverket/Stepper/stepper.d.ts +1 -1
  37. package/dist/src/components/kystverket/Surface/Surface.d.ts +28 -0
  38. package/dist/src/components/kystverket/Surface/Surface.stories.d.ts +80 -0
  39. package/dist/src/components/kystverket/Surface/Surface.types.d.ts +43 -0
  40. package/dist/src/components/kystverket/Typography/typography.accent.stories.d.ts +1 -1
  41. package/dist/src/components/kystverket/Typography/typography.d.ts +0 -5
  42. package/dist/src/components/kystverket/Typography/typography.label.stories.d.ts +1 -1
  43. package/dist/src/main.d.ts +13 -10
  44. package/dist/src/utils/input/input.d.ts +1 -1
  45. package/dist/style.css +1 -1
  46. package/dist/style.js +2639 -2460
  47. package/dist/style.umd.cjs +7 -7
  48. package/package.json +3 -1
  49. package/dist/src/components/designsystemet/Chip/Chip.d.ts +0 -14
  50. package/dist/src/components/designsystemet/Chip/index.d.ts +0 -36
  51. package/dist/src/components/designsystemet/Paragraph/Paragraph.d.ts +0 -10
  52. package/dist/src/components/designsystemet/Text/Text.d.ts +0 -13
  53. package/dist/src/components/designsystemet/Text/Text.stories.d.ts +0 -89
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kystverket/styrbord",
3
- "version": "1.20.1",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "repository": {
@@ -38,6 +38,7 @@
38
38
  "license": "ISC",
39
39
  "dependencies": {
40
40
  "@digdir/designsystemet-css": "~1.21.1",
41
+ "@kystverket/styrbord-tokens": "^1.1.0",
41
42
  "@material-symbols/font-400": "^0.45.9"
42
43
  },
43
44
  "peerDependencies": {
@@ -51,6 +52,7 @@
51
52
  "@milkdown/prose": "^7.19.0",
52
53
  "@milkdown/react": "^7.19.0",
53
54
  "@milkdown/utils": "^7.19.0",
55
+ "boring-avatars": "^2.0.4",
54
56
  "exifr": "^7.1.3",
55
57
  "react": "^19.0.0",
56
58
  "react-dom": "^19.0.0",
@@ -1,14 +0,0 @@
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
- }>;
@@ -1,36 +0,0 @@
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 };
@@ -1,10 +0,0 @@
1
- import { ParagraphProps as DsParagraphProps } from '@digdir/designsystemet-react';
2
- export type ParagraphProps = DsParagraphProps & {
3
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
4
- /** @deprecated Use `weight="medium"` instead. */
5
- strong?: boolean;
6
- weight?: 'regular' | 'medium' | 'semibold';
7
- 'data-color-subtle'?: boolean;
8
- };
9
- export declare const Paragraph: ({ size, strong, weight, "data-color-subtle": colorSubtle, className, children, ...props }: ParagraphProps) => React.JSX.Element;
10
- export default Paragraph;
@@ -1,13 +0,0 @@
1
- import { type ParagraphProps } from '../Paragraph/Paragraph';
2
- import { HTMLAttributes } from 'react';
3
- export declare const colorValues: readonly ["primary", "accent", "neutral", "extra1", "extra2", "success", "danger", "info", "warning", "focus", "lyng", "hav", "stein", "gress", "sol", "himmel", "sand", "fyr", "dyphav", "skog"];
4
- export declare const textWrapValues: readonly ["wrap", "balance", "pretty", "nowrap"];
5
- export declare const textTransformValues: readonly ["none", "capitalize", "uppercase", "lowercase"];
6
- export declare const textAlignValues: readonly ["left", "center", "right", "justify"];
7
- export type TextProps = Pick<ParagraphProps, 'weight' | 'data-color-subtle' | 'data-size' | 'size'> & Omit<HTMLAttributes<HTMLSpanElement>, 'color'> & {
8
- ['data-color']?: (typeof colorValues)[number];
9
- wrap?: (typeof textWrapValues)[number];
10
- transform?: (typeof textTransformValues)[number];
11
- align?: (typeof textAlignValues)[number];
12
- };
13
- export declare const Text: ({ weight, "data-color-subtle": colorSubtle, ["data-color"]: color, wrap, transform, align, className, style, children, ...props }: TextProps) => React.JSX.Element;
@@ -1,89 +0,0 @@
1
- import type { StoryFn, StoryObj } from '@storybook/react-vite';
2
- import { Text, TextProps } from '~/main';
3
- declare const meta: {
4
- title: string;
5
- parameters: {
6
- docs: {
7
- description: {
8
- component: string;
9
- };
10
- };
11
- };
12
- component: ({ weight, "data-color-subtle": colorSubtle, ["data-color"]: color, wrap, transform, align, className, style, children, ...props }: TextProps) => React.JSX.Element;
13
- decorators: ((Story: import("storybook/internal/csf").PartialStoryFn, context: import("storybook/internal/csf").StoryContext) => React.JSX.Element)[];
14
- tags: string[];
15
- argTypes: {
16
- 'data-size': {
17
- control: "select";
18
- options: string[];
19
- table: {
20
- defaultValue: {
21
- summary: string;
22
- };
23
- };
24
- };
25
- weight: {
26
- control: "select";
27
- options: (string | undefined)[];
28
- table: {
29
- defaultValue: {
30
- summary: string;
31
- };
32
- };
33
- };
34
- "data-color": {
35
- control: "select";
36
- options: ("info" | "warning" | "lyng" | "hav" | "stein" | "gress" | "sol" | "himmel" | "sand" | "fyr" | "dyphav" | "skog" | "primary" | "accent" | "neutral" | "extra1" | "extra2" | "success" | "danger" | "focus" | undefined)[];
37
- table: {
38
- defaultValue: {
39
- summary: string;
40
- };
41
- };
42
- };
43
- 'data-color-subtle': {
44
- control: "boolean";
45
- table: {
46
- defaultValue: {
47
- summary: string;
48
- };
49
- };
50
- };
51
- wrap: {
52
- control: "select";
53
- options: ("wrap" | "nowrap" | "balance" | "pretty" | undefined)[];
54
- table: {
55
- defaultValue: {
56
- summary: string;
57
- };
58
- };
59
- };
60
- transform: {
61
- control: "select";
62
- options: ("none" | "capitalize" | "lowercase" | "uppercase" | undefined)[];
63
- table: {
64
- defaultValue: {
65
- summary: string;
66
- };
67
- };
68
- };
69
- align: {
70
- control: "select";
71
- options: ("center" | "justify" | "left" | "right" | undefined)[];
72
- table: {
73
- defaultValue: {
74
- summary: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- export default meta;
81
- type Story = StoryObj<typeof meta>;
82
- export declare const Preview: Story;
83
- export declare const Sizes: StoryFn<typeof Text>;
84
- export declare const Weights: StoryFn<typeof Text>;
85
- export declare const Colors: StoryFn<typeof Text>;
86
- export declare const TextWrap: StoryFn<typeof Text>;
87
- export declare const TextTransform: StoryFn<typeof Text>;
88
- export declare const TextAlign: StoryFn<typeof Text>;
89
- export declare const Examples: StoryFn<typeof Text>;