@amsterdam/design-system-react 0.1.8 → 0.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.
package/LICENSE.md CHANGED
@@ -11,7 +11,7 @@ The Work is provided under the terms of this Licence when the Licensor (as
11
11
  defined below) has placed the following notice immediately following the
12
12
  copyright notice for the Work:
13
13
 
14
- Licensed under the EUPL
14
+ Licensed under the EUPL
15
15
 
16
16
  or has expressed by any other means his willingness to license under the EUPL.
17
17
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { DialogHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
6
+ export interface DialogProps extends PropsWithChildren<DialogHTMLAttributes<HTMLDialogElement>> {
7
+ actions?: ReactNode;
8
+ }
9
+ export declare const Dialog: import("react").ForwardRefExoticComponent<DialogProps & import("react").RefAttributes<HTMLDialogElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Dialog } from './Dialog';
2
+ export type { DialogProps } from './Dialog';
@@ -10,7 +10,6 @@ export type GridColumnNumbers = {
10
10
  medium: GridColumnNumber;
11
11
  wide: GridColumnNumber;
12
12
  };
13
- type GridDensity = 'low' | 'high';
14
13
  type GridPaddingSize = 'small' | 'medium' | 'large';
15
14
  type GridPaddingVerticalProp = {
16
15
  paddingBottom?: never;
@@ -27,11 +26,14 @@ type GridPaddingTopAndBottomProps = {
27
26
  };
28
27
  export type GridProps = {
29
28
  /**
30
- * The density of the grid: low (for websites) or high (for applications).
31
- * Adjusts the pace with which columns get wider, and the start width as well.
32
- * This is to be implemented more generally – it will be moved into a theme soon.
29
+ * Opts in to a less spacious layout.
30
+ * Decreases whitespace between columns and to the sides of the grid.
31
+ * This usually works well for applications.
32
+ * @todo Implement more generally – it will be moved into a theme soon.
33
33
  */
34
- density?: GridDensity;
34
+ compact?: boolean;
35
+ /** The amount of vertical whitespace between rows of the grid. */
36
+ gapVertical?: 'small' | 'large';
35
37
  } & (GridPaddingVerticalProp | GridPaddingTopAndBottomProps) & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
36
38
  interface GridComponent extends ForwardRefExoticComponent<GridProps & RefAttributes<HTMLDivElement>> {
37
39
  Cell: typeof GridCell;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { ForwardRefExoticComponent, RefAttributes, SVGProps } from 'react';
6
+ type LogoBrand = 'amsterdam' | 'ggd-amsterdam' | 'stadsarchief' | 'stadsbank-van-lening' | 'vga-verzekeringen';
7
+ export interface LogoProps extends SVGProps<SVGSVGElement> {
8
+ brand?: LogoBrand;
9
+ }
10
+ export declare const Logo: ForwardRefExoticComponent<Omit<LogoProps, "ref"> & RefAttributes<SVGSVGElement>>;
11
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoAmsterdam: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoAmsterdam;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoGgdAmsterdam: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoGgdAmsterdam;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoStadsarchief: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoStadsarchief;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoStadsbankVanLening: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoStadsbankVanLening;
@@ -0,0 +1,3 @@
1
+ import { type SVGProps } from 'react';
2
+ declare const LogoVgaVerzekeringen: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default LogoVgaVerzekeringen;
@@ -0,0 +1,5 @@
1
+ export { default as LogoAmsterdam } from './LogoAmsterdam';
2
+ export { default as LogoGgdAmsterdam } from './LogoGgdAmsterdam';
3
+ export { default as LogoStadsarchief } from './LogoStadsarchief';
4
+ export { default as LogoStadsbankVanLening } from './LogoStadsbankVanLening';
5
+ export { default as LogoVgaVerzekeringen } from './LogoVgaVerzekeringen';
@@ -0,0 +1,2 @@
1
+ export { Logo } from './Logo';
2
+ export type { LogoProps } from './Logo';
@@ -3,7 +3,13 @@
3
3
  * Copyright (c) 2023 Gemeente Amsterdam
4
4
  */
5
5
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
- type PageMenuProps = PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
6
+ type PageMenuProps = {
7
+ /**
8
+ * Whether the page menu’s items align to its end.
9
+ * If the menu itself aligns to the end of its container, you should set this to `true`.
10
+ */
11
+ alignEnd?: boolean;
12
+ } & PropsWithChildren<HTMLAttributes<HTMLUListElement>>;
7
13
  interface PageMenuComponent extends ForwardRefExoticComponent<PageMenuProps & RefAttributes<HTMLElement>> {
8
14
  Link: typeof PageMenuLink;
9
15
  Button: typeof PageMenuButton;