@kystverket/styrbord 0.302.2 → 0.302.4
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 +10 -17
- package/dist/main.js +2941 -2911
- package/dist/main.umd.cjs +11 -11
- package/dist/src/components/kystverket/Box/box.d.ts +2 -2
- package/dist/src/components/kystverket/Box/box.types.d.ts +9 -4
- package/dist/storybook/styrbordDecorator.d.ts +0 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { BorderRadiusProps, Spacing, SpacingProps,
|
|
2
|
+
import { BorderRadiusProps, BorderWidthProps, Spacing, SpacingProps, BoxStyleProps } from './box.types';
|
|
3
3
|
import { ScreenSize } from '~/utils/types';
|
|
4
4
|
import { AllSizes, TypographyPrefix } from '../Typography/typography.util';
|
|
5
5
|
type WrapType = boolean | 'reverse';
|
|
@@ -30,6 +30,6 @@ type HorizontalBoxProps = BaseBoxProps & {
|
|
|
30
30
|
horizontal: true | ScreenSize;
|
|
31
31
|
justify?: 'start' | 'center' | 'end' | 'between' | 'stretch';
|
|
32
32
|
};
|
|
33
|
-
export type BoxProps = (VerticalBoxProps | HorizontalBoxProps) & SpacingProps & BorderRadiusProps &
|
|
33
|
+
export type BoxProps = (VerticalBoxProps | HorizontalBoxProps) & SpacingProps & BorderRadiusProps & BorderWidthProps & BoxStyleProps;
|
|
34
34
|
declare const Box: ({ className, radius, width, gap, wrap, align, grow, shrink, basis, show, hide, container, children, ...props }: BoxProps) => React.JSX.Element;
|
|
35
35
|
export default Box;
|
|
@@ -5,10 +5,15 @@ export type SpacingProps = {
|
|
|
5
5
|
[K in SpacingKey]?: Spacing;
|
|
6
6
|
};
|
|
7
7
|
export type BorderRadiusProps = {
|
|
8
|
-
radius?: 'sm' | 'md' | 'lg' | 'full';
|
|
8
|
+
radius?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
11
|
-
color?: 'action' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' | 'navy';
|
|
12
|
-
subtle?: boolean;
|
|
10
|
+
export type BorderWidthProps = {
|
|
13
11
|
border?: 'sm' | 'md' | 'lg';
|
|
14
12
|
};
|
|
13
|
+
export declare const boxBackgroundColors: readonly ["primary", "neutral", "danger", "success", "warning", "info", "navy", "white"];
|
|
14
|
+
export type BoxBackgroundColor = (typeof boxBackgroundColors)[number];
|
|
15
|
+
export declare const boxBackgroundVariants: readonly ["default", "tinted", "hover", "active"];
|
|
16
|
+
export type BoxBackgroundVariant = (typeof boxBackgroundVariants)[number];
|
|
17
|
+
export type BoxStyleProps = {
|
|
18
|
+
color?: `${BoxBackgroundColor}` | `${BoxBackgroundColor}/${BoxBackgroundVariant}`;
|
|
19
|
+
};
|