@amsterdam/design-system-react 0.1.5 → 0.1.6

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 (77) hide show
  1. package/dist/AspectRatio/AspectRatio.d.ts +10 -0
  2. package/dist/AspectRatio/AspectRatio.test.d.ts +1 -0
  3. package/dist/AspectRatio/index.d.ts +2 -0
  4. package/dist/Card/Card.d.ts +18 -0
  5. package/dist/Card/Card.test.d.ts +1 -0
  6. package/dist/Card/index.d.ts +2 -0
  7. package/dist/Hero/Hero.d.ts +15 -0
  8. package/dist/Hero/Hero.test.d.ts +1 -0
  9. package/dist/Hero/index.d.ts +1 -0
  10. package/dist/Switch/Switch.d.ts +4 -0
  11. package/dist/Switch/Switch.test.d.ts +1 -0
  12. package/dist/Switch/index.d.ts +1 -0
  13. package/dist/buttons/Button/Button.d.ts +12 -0
  14. package/dist/buttons/Button/Button.test.d.ts +1 -0
  15. package/dist/buttons/Button/index.d.ts +2 -0
  16. package/dist/containers/Accordion/Accordion.d.ts +17 -0
  17. package/dist/containers/Accordion/Accordion.test.d.ts +1 -0
  18. package/dist/containers/Accordion/AccordionContext.d.ts +8 -0
  19. package/dist/containers/Accordion/AccordionSection.d.ts +12 -0
  20. package/dist/containers/Accordion/AccordionSection.test.d.ts +1 -0
  21. package/dist/containers/Accordion/index.d.ts +3 -0
  22. package/dist/containers/Accordion/useFocusWithArrow.test.d.ts +1 -0
  23. package/dist/containers/Accordion/useFocusWithArrows.d.ts +24 -0
  24. package/dist/containers/Footer/Footer.d.ts +23 -0
  25. package/dist/containers/Footer/Footer.test.d.ts +1 -0
  26. package/dist/containers/Footer/index.d.ts +1 -0
  27. package/dist/containers/VisuallyHidden/VisuallyHidden.d.ts +8 -0
  28. package/dist/containers/VisuallyHidden/VisuallyHidden.test.d.ts +1 -0
  29. package/dist/containers/VisuallyHidden/index.d.ts +1 -0
  30. package/dist/forms/Checkbox/Checkbox.d.ts +12 -0
  31. package/dist/forms/Checkbox/Checkbox.test.d.ts +1 -0
  32. package/dist/forms/Checkbox/index.d.ts +2 -0
  33. package/dist/forms/FormLabel/FormLabel.d.ts +9 -0
  34. package/dist/forms/FormLabel/FormLabel.test.d.ts +1 -0
  35. package/dist/forms/FormLabel/index.d.ts +1 -0
  36. package/dist/index.cjs.js +40 -40
  37. package/dist/index.esm.js +40 -40
  38. package/dist/layout/GridCell/GridCell.d.ts +18 -0
  39. package/dist/layout/GridCell/index.d.ts +2 -0
  40. package/dist/layout/PageGrid/PageGrid.d.ts +10 -0
  41. package/dist/layout/PageGrid/index.d.ts +2 -0
  42. package/dist/media/Icon/Icon.d.ts +12 -0
  43. package/dist/media/Icon/Icon.test.d.ts +1 -0
  44. package/dist/media/Icon/index.d.ts +2 -0
  45. package/dist/navigation/Breadcrumb/Breadcrumb.d.ts +11 -0
  46. package/dist/navigation/Breadcrumb/Breadcrumb.test.d.ts +1 -0
  47. package/dist/navigation/Breadcrumb/index.d.ts +2 -0
  48. package/dist/navigation/Link/Link.d.ts +21 -0
  49. package/dist/navigation/Link/Link.test.d.ts +1 -0
  50. package/dist/navigation/Link/index.d.ts +2 -0
  51. package/dist/navigation/PageMenu/PageMenu.d.ts +20 -0
  52. package/dist/navigation/PageMenu/PageMenu.test.d.ts +1 -0
  53. package/dist/navigation/PageMenu/index.d.ts +2 -0
  54. package/dist/navigation/TopTaskLink/TopTaskLink.d.ts +10 -0
  55. package/dist/navigation/TopTaskLink/TopTaskLink.test.d.ts +1 -0
  56. package/dist/navigation/TopTaskLink/index.d.ts +1 -0
  57. package/dist/text/Blockquote/Blockquote.d.ts +15 -0
  58. package/dist/text/Blockquote/Blockquote.test.d.ts +1 -0
  59. package/dist/text/Blockquote/index.d.ts +2 -0
  60. package/dist/text/Heading/Heading.d.ts +29 -0
  61. package/dist/text/Heading/Heading.test.d.ts +1 -0
  62. package/dist/text/Heading/index.d.ts +2 -0
  63. package/dist/text/OrderedList/OrderedList.d.ts +17 -0
  64. package/dist/text/OrderedList/OrderedList.test.d.ts +1 -0
  65. package/dist/text/OrderedList/index.d.ts +2 -0
  66. package/dist/text/PageHeading/PageHeading.d.ts +15 -0
  67. package/dist/text/PageHeading/PageHeading.test.d.ts +1 -0
  68. package/dist/text/PageHeading/index.d.ts +2 -0
  69. package/dist/text/Paragraph/Paragraph.d.ts +18 -0
  70. package/dist/text/Paragraph/Paragraph.test.d.ts +1 -0
  71. package/dist/text/Paragraph/index.d.ts +2 -0
  72. package/dist/text/UnorderedList/UnorderedList.d.ts +17 -0
  73. package/dist/text/UnorderedList/UnorderedList.test.d.ts +1 -0
  74. package/dist/text/UnorderedList/index.d.ts +2 -0
  75. package/dist/tsconfig.test.tsbuildinfo +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +25 -26
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes, PropsWithChildren } from 'react';
6
+ export type Ratio = 'extra-tall' | 'tall' | 'square' | 'wide' | 'extra-wide';
7
+ export interface AspectRatioProps extends PropsWithChildren<HTMLAttributes<HTMLDivElement>> {
8
+ ratio?: Ratio;
9
+ }
10
+ export declare const AspectRatio: import("react").ForwardRefExoticComponent<AspectRatioProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { AspectRatio } from './AspectRatio';
2
+ export type { AspectRatioProps, Ratio } from './AspectRatio';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { AnchorHTMLAttributes, ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
+ export declare const CardHeadingGroup: ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
7
+ children?: import("react").ReactNode;
8
+ } & RefAttributes<HTMLElement>>;
9
+ export declare const CardLink: ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & {
10
+ children?: import("react").ReactNode;
11
+ } & RefAttributes<HTMLAnchorElement>>;
12
+ export interface CardProps extends PropsWithChildren<HTMLAttributes<HTMLElement>> {
13
+ }
14
+ export interface CardComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement> & CardProps> {
15
+ HeadingGroup: typeof CardHeadingGroup;
16
+ Link: typeof CardLink;
17
+ }
18
+ export declare const Card: CardComponent;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card';
2
+ export type { CardProps } from './Card';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes } from 'react';
6
+ export interface HeroProps extends HTMLAttributes<HTMLHeadingElement> {
7
+ /**
8
+ * De kleur van de titel
9
+ * Gebruik deze property om de titel in tegenovergestelde kleur te tonen.
10
+ */
11
+ inverseColor?: boolean;
12
+ }
13
+ export declare const Hero: import("react").ForwardRefExoticComponent<HeroProps & {
14
+ children?: import("react").ReactNode;
15
+ } & import("react").RefAttributes<HTMLHeadingElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { Hero } from './Hero';
@@ -0,0 +1,4 @@
1
+ import { InputHTMLAttributes } from 'react';
2
+ export declare const Switch: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
3
+ children?: import("react").ReactNode;
4
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { Switch } from './Switch';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2021 Robbert Broersma
4
+ * Copyright (c) 2023 Gemeente Amsterdam
5
+ */
6
+ import { ButtonHTMLAttributes } from 'react';
7
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
8
+ variant?: 'primary' | 'secondary' | 'tertiary';
9
+ }
10
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & {
11
+ children?: import("react").ReactNode;
12
+ } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './Button';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import type { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
6
+ import { HTMLAttributes, PropsWithChildren } from 'react';
7
+ import { AccordionSection } from './AccordionSection';
8
+ import { HeadingLevel } from '../../text/Heading/Heading';
9
+ export interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
10
+ children?: ReactNode;
11
+ headingLevel: HeadingLevel;
12
+ section?: boolean;
13
+ }
14
+ export interface AccordionComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLDivElement>> & RefAttributes<HTMLDivElement> & AccordionProps> {
15
+ Section: typeof AccordionSection;
16
+ }
17
+ export declare const Accordion: AccordionComponent;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { HeadingLevel } from '../../text/Heading/Heading';
3
+ export interface AccordionContextValue {
4
+ headingLevel: HeadingLevel;
5
+ section?: boolean;
6
+ }
7
+ declare const AccordionContext: import("react").Context<AccordionContextValue>;
8
+ export default AccordionContext;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes } from 'react';
6
+ export interface AccordionSectionProps extends HTMLAttributes<HTMLElement> {
7
+ label: string;
8
+ expanded?: boolean;
9
+ }
10
+ export declare const AccordionSection: import("react").ForwardRefExoticComponent<AccordionSectionProps & {
11
+ children?: import("react").ReactNode;
12
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,3 @@
1
+ export { Accordion } from './Accordion';
2
+ export type { AccordionProps } from './Accordion';
3
+ export type { AccordionSectionProps } from './AccordionSection';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import type { KeyboardEvent, RefObject } from 'react';
6
+ export declare const KeyboardKeys: {
7
+ ArrowUp: string;
8
+ ArrowDown: string;
9
+ ArrowRight: string;
10
+ ArrowLeft: string;
11
+ Home: string;
12
+ End: string;
13
+ };
14
+ /**
15
+ * Focus on children with arrow keys and home / end buttons.
16
+ *
17
+ * @param ref Component ref
18
+ * @param rotating Jump to first item from last or vice versa
19
+ * @param horizontally In case you need to navigate horizontally, using left / right arrow buttons
20
+ */
21
+ declare const useFocusWithArrows: (ref: RefObject<HTMLDivElement>, rotating?: boolean, horizontally?: boolean) => {
22
+ keyDown: (e: KeyboardEvent) => void;
23
+ };
24
+ export default useFocusWithArrows;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
6
+ import { GridCellProps } from '../../layout/GridCell';
7
+ export declare const FooterTop: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
8
+ children?: import("react").ReactNode;
9
+ } & RefAttributes<HTMLDivElement>>;
10
+ export type FooterColumnProps = HTMLAttributes<HTMLDivElement> & GridCellProps;
11
+ export declare const FooterColumn: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & GridCellProps & {
12
+ children?: import("react").ReactNode;
13
+ } & RefAttributes<HTMLDivElement>>;
14
+ export declare const FooterBottom: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
15
+ children?: import("react").ReactNode;
16
+ } & RefAttributes<HTMLDivElement>>;
17
+ interface FooterComponent extends ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLElement>> & RefAttributes<HTMLElement>> {
18
+ Top: typeof FooterTop;
19
+ Bottom: typeof FooterBottom;
20
+ Column: typeof FooterColumn;
21
+ }
22
+ export declare const Footer: FooterComponent;
23
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { Footer } from './Footer';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { HTMLAttributes } from 'react';
6
+ export declare const VisuallyHidden: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
7
+ children?: import("react").ReactNode;
8
+ } & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { VisuallyHidden } from './VisuallyHidden';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2023 Gemeente Amsterdam
4
+ */
5
+ import { InputHTMLAttributes } from 'react';
6
+ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
7
+ invalid?: boolean;
8
+ indeterminate?: boolean;
9
+ }
10
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & {
11
+ children?: import("react").ReactNode;
12
+ } & import("react").RefAttributes<HTMLInputElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './Checkbox';
2
+ export type { CheckboxProps } from './Checkbox';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright (c) 2021 Robbert Broersma
4
+ * Copyright (c) 2023 Gemeente Amsterdam
5
+ */
6
+ import { LabelHTMLAttributes } from 'react';
7
+ export declare const FormLabel: import("react").ForwardRefExoticComponent<LabelHTMLAttributes<HTMLLabelElement> & {
8
+ children?: import("react").ReactNode;
9
+ } & import("react").RefAttributes<HTMLLabelElement>>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1 @@
1
+ export { FormLabel } from './FormLabel';