@navikt/ds-react 2.1.1-next.1 → 2.1.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 (146) hide show
  1. package/_docs.json +480 -312
  2. package/esm/accordion/Accordion.d.ts +17 -0
  3. package/esm/accordion/AccordionContent.d.ts +10 -0
  4. package/esm/accordion/AccordionHeader.d.ts +10 -0
  5. package/esm/accordion/AccordionItem.d.ts +26 -0
  6. package/esm/accordion/index.d.ts +1 -0
  7. package/esm/alert/Alert.d.ts +31 -0
  8. package/esm/alert/index.d.ts +2 -0
  9. package/esm/button/Button.d.ts +39 -0
  10. package/esm/button/index.d.ts +2 -0
  11. package/esm/chat/Bubble.d.ts +26 -0
  12. package/esm/chat/Chat.d.ts +43 -0
  13. package/esm/chat/index.d.ts +1 -0
  14. package/esm/chips/Chips.d.ts +17 -0
  15. package/esm/chips/Removable.d.ts +23 -0
  16. package/esm/chips/Toggle.d.ts +13 -0
  17. package/esm/chips/index.d.ts +1 -0
  18. package/esm/date/DateInput.d.ts +25 -0
  19. package/esm/date/datepicker/DatePicker.d.ts +97 -0
  20. package/esm/date/datepicker/DatePickerStandalone.d.ts +12 -0
  21. package/esm/date/datepicker/DayButton.d.ts +3 -0
  22. package/esm/date/datepicker/Head.d.ts +3 -0
  23. package/esm/date/datepicker/caption/Caption.d.ts +4 -0
  24. package/esm/date/datepicker/caption/DropdownCaption.d.ts +4 -0
  25. package/esm/date/datepicker/caption/index.d.ts +2 -0
  26. package/esm/date/hooks/index.d.ts +8 -0
  27. package/esm/date/hooks/useDateInputContext.d.ts +18 -0
  28. package/esm/date/hooks/useDatepicker.d.ts +73 -0
  29. package/esm/date/hooks/useMonthPicker.d.ts +68 -0
  30. package/esm/date/hooks/useRangeDatepicker.d.ts +58 -0
  31. package/esm/date/hooks/useSharedMonthContext.d.ts +21 -0
  32. package/esm/date/index.d.ts +6 -0
  33. package/esm/date/monthpicker/MonthButton.d.ts +11 -0
  34. package/esm/date/monthpicker/MonthCaption.d.ts +3 -0
  35. package/esm/date/monthpicker/MonthPicker.d.ts +92 -0
  36. package/esm/date/monthpicker/MonthPickerStandalone.d.ts +11 -0
  37. package/esm/date/monthpicker/MonthSelector.d.ts +3 -0
  38. package/esm/date/utils/check-dates.d.ts +4 -0
  39. package/esm/date/utils/dates-disabled.d.ts +1 -0
  40. package/esm/date/utils/format-date.d.ts +1 -0
  41. package/esm/date/utils/get-dates.d.ts +2 -0
  42. package/esm/date/utils/get-initial-year.d.ts +5 -0
  43. package/esm/date/utils/index.d.ts +10 -0
  44. package/esm/date/utils/is-match.d.ts +4 -0
  45. package/esm/date/utils/labels.d.ts +6 -0
  46. package/esm/date/utils/locale.d.ts +2 -0
  47. package/esm/date/utils/navigation.d.ts +2 -0
  48. package/esm/date/utils/parse-date.d.ts +3 -0
  49. package/esm/form/ConfirmationPanel.d.ts +22 -0
  50. package/esm/form/Fieldset/Fieldset.d.ts +42 -0
  51. package/esm/form/Fieldset/index.d.ts +1 -0
  52. package/esm/form/Fieldset/useFieldset.d.ts +14 -0
  53. package/esm/form/Select.d.ts +26 -0
  54. package/esm/form/Switch.d.ts +27 -0
  55. package/esm/form/TextField.d.ts +31 -0
  56. package/esm/form/Textarea.d.ts +48 -0
  57. package/esm/form/checkbox/Checkbox.d.ts +36 -0
  58. package/esm/form/checkbox/CheckboxGroup.d.ts +28 -0
  59. package/esm/form/checkbox/index.d.ts +2 -0
  60. package/esm/form/checkbox/useCheckbox.d.ts +21 -0
  61. package/esm/form/error-summary/ErrorSummary.d.ts +27 -0
  62. package/esm/form/error-summary/ErrorSummaryItem.d.ts +11 -0
  63. package/esm/form/error-summary/index.d.ts +2 -0
  64. package/esm/form/index.d.ts +10 -0
  65. package/esm/form/radio/Radio.d.ts +18 -0
  66. package/esm/form/radio/RadioGroup.d.ts +38 -0
  67. package/esm/form/radio/index.d.ts +2 -0
  68. package/esm/form/radio/useRadio.d.ts +23 -0
  69. package/esm/form/search/Search.d.ts +57 -0
  70. package/esm/form/search/SearchButton.d.ts +11 -0
  71. package/esm/form/search/index.d.ts +1 -0
  72. package/esm/form/useFormField.d.ts +44 -0
  73. package/esm/grid/Cell.d.ts +26 -0
  74. package/esm/grid/ContentContainer.d.ts +9 -0
  75. package/esm/grid/Grid.d.ts +9 -0
  76. package/esm/grid/index.d.ts +3 -0
  77. package/esm/guide-panel/Guide.d.ts +14 -0
  78. package/esm/guide-panel/GuidePanel.d.ts +18 -0
  79. package/esm/guide-panel/Illustration.d.ts +8 -0
  80. package/esm/guide-panel/index.d.ts +3 -0
  81. package/esm/help-text/HelpText.d.ts +17 -0
  82. package/esm/help-text/index.d.ts +2 -0
  83. package/esm/index.d.ts +27 -0
  84. package/esm/link/Link.d.ts +10 -0
  85. package/esm/link/index.d.ts +2 -0
  86. package/esm/link-panel/LinkPanel.d.ts +22 -0
  87. package/esm/link-panel/LinkPanelDescription.d.ts +7 -0
  88. package/esm/link-panel/LinkPanelTitle.d.ts +8 -0
  89. package/esm/link-panel/index.d.ts +2 -0
  90. package/esm/loader/Loader.d.ts +27 -0
  91. package/esm/loader/index.d.ts +2 -0
  92. package/esm/modal/Modal.d.ts +63 -0
  93. package/esm/modal/ModalContent.d.ts +10 -0
  94. package/esm/modal/index.d.ts +2 -0
  95. package/esm/pagination/Pagination.d.ts +53 -0
  96. package/esm/pagination/PaginationItem.d.ts +22 -0
  97. package/esm/pagination/index.d.ts +1 -0
  98. package/esm/panel/Panel.d.ts +16 -0
  99. package/esm/panel/index.d.ts +2 -0
  100. package/esm/popover/Popover.d.ts +47 -0
  101. package/esm/popover/PopoverContent.d.ts +10 -0
  102. package/esm/popover/index.d.ts +2 -0
  103. package/esm/provider/Provider.d.ts +20 -0
  104. package/esm/provider/index.d.ts +1 -0
  105. package/esm/read-more/ReadMore.d.ts +28 -0
  106. package/esm/read-more/index.d.ts +2 -0
  107. package/esm/stepper/Step.d.ts +28 -0
  108. package/esm/stepper/Stepper.d.ts +41 -0
  109. package/esm/stepper/index.d.ts +1 -0
  110. package/esm/table/Body.d.ts +7 -0
  111. package/esm/table/ColumnHeader.d.ts +17 -0
  112. package/esm/table/DataCell.d.ts +12 -0
  113. package/esm/table/ExpandableRow.d.ts +41 -0
  114. package/esm/table/Header.d.ts +7 -0
  115. package/esm/table/HeaderCell.d.ts +13 -0
  116. package/esm/table/Row.d.ts +17 -0
  117. package/esm/table/Table.d.ts +49 -0
  118. package/esm/table/index.d.ts +8 -0
  119. package/esm/tabs/Tab.d.ts +19 -0
  120. package/esm/tabs/TabList.d.ts +10 -0
  121. package/esm/tabs/TabPanel.d.ts +14 -0
  122. package/esm/tabs/Tabs.d.ts +52 -0
  123. package/esm/tabs/index.d.ts +4 -0
  124. package/esm/tag/Tag.d.ts +14 -0
  125. package/esm/tag/index.d.ts +1 -0
  126. package/esm/toggle-group/ToggleGroup.d.ts +38 -0
  127. package/esm/toggle-group/ToggleItem.d.ts +14 -0
  128. package/esm/toggle-group/index.d.ts +2 -0
  129. package/esm/tooltip/Tooltip.d.ts +53 -0
  130. package/esm/tooltip/index.d.ts +1 -0
  131. package/esm/typography/BodyLong.d.ts +19 -0
  132. package/esm/typography/BodyShort.d.ts +19 -0
  133. package/esm/typography/Detail.d.ts +22 -0
  134. package/esm/typography/ErrorMessage.d.ts +19 -0
  135. package/esm/typography/Heading.d.ts +24 -0
  136. package/esm/typography/Ingress.d.ts +14 -0
  137. package/esm/typography/Label.d.ts +19 -0
  138. package/esm/typography/index.d.ts +7 -0
  139. package/esm/util/AnimateHeight.d.ts +10 -0
  140. package/esm/util/OverridableComponent.d.ts +7 -0
  141. package/esm/util/TextareaAutoSize.d.ts +14 -0
  142. package/esm/util/debounce.d.ts +4 -0
  143. package/esm/util/index.d.ts +13 -0
  144. package/esm/util/mergeRefs.d.ts +2 -0
  145. package/esm/util/useId.d.ts +7 -0
  146. package/package.json +2 -2
@@ -0,0 +1,18 @@
1
+ import React, { InputHTMLAttributes } from "react";
2
+ import { FormFieldProps } from "../useFormField";
3
+ export interface RadioProps extends Omit<FormFieldProps, "error" | "errorId">, Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value"> {
4
+ /**
5
+ * Radio label
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * The value of the HTML element
10
+ */
11
+ value: any;
12
+ /**
13
+ * Adds a description to extend labling of Radio
14
+ */
15
+ description?: string;
16
+ }
17
+ export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
18
+ export default Radio;
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import { FieldsetProps } from "..";
3
+ export interface RadioGroupContextProps {
4
+ name: string;
5
+ defaultValue?: any;
6
+ value?: any;
7
+ onChange: (value: any) => void;
8
+ required?: boolean;
9
+ }
10
+ export declare const RadioGroupContext: React.Context<RadioGroupContextProps | null>;
11
+ export interface RadioGroupProps extends Omit<FieldsetProps, "onChange" | "errorPropagation" | "defaultValue"> {
12
+ /**
13
+ * Collection of <Radio />-elements
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * Override internal name
18
+ */
19
+ name?: string;
20
+ /**
21
+ * Default checked Radio
22
+ */
23
+ defaultValue?: any;
24
+ /**
25
+ * Controlled state for Radio
26
+ */
27
+ value?: any;
28
+ /**
29
+ * Returns current checked Radio in group
30
+ */
31
+ onChange?: (value: any) => void;
32
+ /**
33
+ * Tells Fieldset if group is required
34
+ */
35
+ required?: boolean;
36
+ }
37
+ export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLFieldSetElement>>;
38
+ export default RadioGroup;
@@ -0,0 +1,2 @@
1
+ export { default as Radio, RadioProps } from "./Radio";
2
+ export { default as RadioGroup, RadioGroupProps } from "./RadioGroup";
@@ -0,0 +1,23 @@
1
+ import { RadioProps } from "./Radio";
2
+ /**
3
+ * Handles props for Radios in context with Fieldset and RadioGroup
4
+ */
5
+ export declare const useRadio: (props: RadioProps) => {
6
+ inputProps: {
7
+ name: string | undefined;
8
+ defaultChecked: boolean | undefined;
9
+ checked: boolean | undefined;
10
+ onChange: (e: any) => void;
11
+ required: boolean | undefined;
12
+ type: string;
13
+ id: string;
14
+ "aria-invalid": boolean;
15
+ "aria-describedby": string | undefined;
16
+ disabled: boolean | undefined;
17
+ };
18
+ showErrorMsg: boolean;
19
+ hasError: boolean;
20
+ errorId: string;
21
+ inputDescriptionId: string;
22
+ size: "medium" | "small";
23
+ };
@@ -0,0 +1,57 @@
1
+ import React, { InputHTMLAttributes } from "react";
2
+ import { FormFieldProps } from "../useFormField";
3
+ import { SearchButtonType } from "./SearchButton";
4
+ export type SearchClearEvent = {
5
+ trigger: "Click";
6
+ event: React.MouseEvent<HTMLButtonElement, MouseEvent>;
7
+ } | {
8
+ trigger: "Escape";
9
+ event: React.KeyboardEvent<HTMLDivElement>;
10
+ };
11
+ export interface SearchProps extends FormFieldProps, Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
12
+ children?: React.ReactNode;
13
+ /**
14
+ * Search label
15
+ * @note Will be hidden by default, is required for accessibility reasons.
16
+ */
17
+ label: React.ReactNode;
18
+ /**
19
+ * Shows label and description for screenreaders-only
20
+ * @default true
21
+ */
22
+ hideLabel?: boolean;
23
+ /**
24
+ * Callback for value-change in input
25
+ */
26
+ onChange?: (value: string) => void;
27
+ /**
28
+ * Callback for click on clear-button or Escape keydown
29
+ */
30
+ onClear?: (e: SearchClearEvent) => void;
31
+ /**
32
+ * aria-label on clear button
33
+ * @default "Tøm"
34
+ */
35
+ clearButtonLabel?: string;
36
+ /**
37
+ * If false, removes clear-button option from input.
38
+ * @default true
39
+ */
40
+ clearButton?: boolean;
41
+ /**
42
+ * Changes button-variant, "simple" removes button
43
+ * @default "primary"
44
+ */
45
+ variant?: "primary" | "secondary" | "simple";
46
+ }
47
+ interface SearchComponent extends React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<HTMLDivElement>> {
48
+ Button: SearchButtonType;
49
+ }
50
+ export interface SearchContextProps {
51
+ disabled?: boolean;
52
+ size: "medium" | "small";
53
+ variant: "primary" | "secondary" | "simple";
54
+ }
55
+ export declare const SearchContext: React.Context<SearchContextProps | null>;
56
+ export declare const Search: SearchComponent;
57
+ export default Search;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { ButtonProps } from "../..";
3
+ export interface SearchButtonProps extends Omit<ButtonProps, "size" | "children" | "variant"> {
4
+ /**
5
+ * Text set after <Search/> icon
6
+ */
7
+ children?: React.ReactNode;
8
+ }
9
+ export type SearchButtonType = React.ForwardRefExoticComponent<SearchButtonProps & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const SearchButton: SearchButtonType;
11
+ export default SearchButton;
@@ -0,0 +1 @@
1
+ export { default as Search, SearchProps, SearchClearEvent } from "./Search";
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ export interface FormFieldProps {
3
+ /**
4
+ * Error message for element
5
+ */
6
+ error?: React.ReactNode;
7
+ /**
8
+ * Override internal errorId
9
+ */
10
+ errorId?: string;
11
+ /**
12
+ * Changes font-size, padding and gaps
13
+ */
14
+ size?: "medium" | "small";
15
+ /**
16
+ * Disables element
17
+ * @note Avoid using if possible for accessibility purposes
18
+ */
19
+ disabled?: boolean;
20
+ /**
21
+ * Adds a description to extend labling of a field
22
+ */
23
+ description?: React.ReactNode;
24
+ /**
25
+ * Override internal id
26
+ */
27
+ id?: string;
28
+ }
29
+ /**
30
+ * Handles props and their state for various form-fields in context with Fieldset
31
+ */
32
+ export declare const useFormField: (props: FormFieldProps, prefix: string) => {
33
+ showErrorMsg: boolean;
34
+ hasError: boolean;
35
+ errorId: string;
36
+ inputDescriptionId: string;
37
+ size: "medium" | "small";
38
+ inputProps: {
39
+ id: string;
40
+ "aria-invalid": boolean;
41
+ "aria-describedby": string | undefined;
42
+ disabled: boolean | undefined;
43
+ };
44
+ };
@@ -0,0 +1,26 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ type Column = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
3
+ export interface CellProps extends HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * Cell content
6
+ */
7
+ children?: React.ReactNode;
8
+ /**
9
+ * Cell columns on width < 448px
10
+ */
11
+ xs: Column;
12
+ /**
13
+ * Cell columns on min-width: 448
14
+ */
15
+ sm?: Column;
16
+ /**
17
+ * Cell columns on min-width: 648
18
+ */
19
+ md?: Column;
20
+ /**
21
+ * Cell columns on min-width: 960px
22
+ */
23
+ lg?: Column;
24
+ }
25
+ export declare const Cell: React.ForwardRefExoticComponent<CellProps & React.RefAttributes<HTMLDivElement>>;
26
+ export default Cell;
@@ -0,0 +1,9 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface ContentContainerProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * ContentContainer content
5
+ */
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const ContentContainer: React.ForwardRefExoticComponent<ContentContainerProps & React.RefAttributes<HTMLDivElement>>;
9
+ export default ContentContainer;
@@ -0,0 +1,9 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface GridProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Collection of <Cell>-elements
5
+ */
6
+ children: React.ReactNode;
7
+ }
8
+ export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
9
+ export default Grid;
@@ -0,0 +1,3 @@
1
+ export { default as Cell, CellProps } from "./Cell";
2
+ export { default as Grid, GridProps } from "./Grid";
3
+ export { default as ContentContainer, ContentContainerProps, } from "./ContentContainer";
@@ -0,0 +1,14 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface GuideProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
3
+ /**
4
+ * Custom svg/img element
5
+ */
6
+ illustration?: React.ReactNode;
7
+ /**
8
+ * Predefined size properties for illustration
9
+ * @default "medium"
10
+ */
11
+ size?: "small" | "medium";
12
+ }
13
+ declare const Guide: React.ForwardRefExoticComponent<GuideProps & React.RefAttributes<HTMLDivElement>>;
14
+ export default Guide;
@@ -0,0 +1,18 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ export interface GuidePanelProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * GuidePanel content
5
+ */
6
+ children: React.ReactNode;
7
+ /**
8
+ * Custom svg/img element
9
+ */
10
+ illustration?: React.ReactNode;
11
+ /**
12
+ * Poster positions guide-illustation above content
13
+ * @default false, renders illustation left of content
14
+ */
15
+ poster?: boolean;
16
+ }
17
+ export declare const GuidePanel: React.ForwardRefExoticComponent<GuidePanelProps & React.RefAttributes<HTMLDivElement>>;
18
+ export default GuidePanel;
@@ -0,0 +1,8 @@
1
+ import React, { SVGProps } from "react";
2
+ interface SVGRProps {
3
+ title?: string;
4
+ titleId?: string;
5
+ }
6
+ export type DefaultIllustrationType = React.FunctionComponent<SVGProps<SVGSVGElement> & SVGRProps>;
7
+ export declare const DefaultIllustration: DefaultIllustrationType;
8
+ export {};
@@ -0,0 +1,3 @@
1
+ export { default as GuidePanel, GuidePanelProps } from "./GuidePanel";
2
+ export { GuideProps } from "./Guide";
3
+ export { DefaultIllustration as GuideDefaultIllustration } from "./Illustration";
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { PopoverProps } from "..";
3
+ export interface HelpTextProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Pick<PopoverProps, "strategy" | "placement"> {
4
+ children: React.ReactNode;
5
+ /**
6
+ * Adds a title-tooltip with the given text
7
+ * @default "hjelp"
8
+ */
9
+ title?: string;
10
+ /**
11
+ * Default dialog-placement on open
12
+ * @default "top"
13
+ */
14
+ placement?: "top" | "bottom" | "right" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
15
+ }
16
+ export declare const HelpText: React.ForwardRefExoticComponent<HelpTextProps & React.RefAttributes<HTMLButtonElement>>;
17
+ export default HelpText;
@@ -0,0 +1,2 @@
1
+ export { default as HelpText } from "./HelpText";
2
+ export { HelpTextProps } from "./HelpText";
package/esm/index.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ export * from "./accordion";
2
+ export * from "./alert";
3
+ export * from "./provider";
4
+ export * from "./button";
5
+ export * from "./date";
6
+ export * from "./form";
7
+ export * from "./grid";
8
+ export * from "./help-text";
9
+ export * from "./guide-panel";
10
+ export * from "./link";
11
+ export * from "./link-panel";
12
+ export * from "./loader";
13
+ export * from "./modal";
14
+ export * from "./pagination";
15
+ export * from "./panel";
16
+ export * from "./popover";
17
+ export * from "./read-more";
18
+ export * from "./chat";
19
+ export * from "./chips";
20
+ export * from "./stepper";
21
+ export * from "./tag";
22
+ export * from "./toggle-group";
23
+ export * from "./table";
24
+ export * from "./tabs";
25
+ export * from "./tooltip";
26
+ export * from "./typography";
27
+ export * from "./util";
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { OverridableComponent } from "..";
3
+ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
+ /**
5
+ * Link text
6
+ */
7
+ children: React.ReactNode;
8
+ }
9
+ export declare const Link: OverridableComponent<LinkProps, HTMLAnchorElement>;
10
+ export default Link;
@@ -0,0 +1,2 @@
1
+ export { default as Link } from "./Link";
2
+ export { LinkProps } from "./Link";
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { OverridableComponent } from "..";
3
+ import { LinkPanelTitleType } from "./LinkPanelTitle";
4
+ import { LinkPanelDescriptionType } from "./LinkPanelDescription";
5
+ export interface LinkPanelProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
6
+ /**
7
+ * Panel content
8
+ */
9
+ children?: React.ReactNode;
10
+ /**
11
+ * Adds border to panel if true
12
+ * @default true
13
+ */
14
+ border?: boolean;
15
+ }
16
+ interface LinkPanelComponentType extends OverridableComponent<LinkPanelProps, HTMLAnchorElement> {
17
+ Title: LinkPanelTitleType;
18
+ Description: LinkPanelDescriptionType;
19
+ }
20
+ export declare const LinkPanelComponent: OverridableComponent<LinkPanelProps, HTMLAnchorElement>;
21
+ declare const LinkPanel: LinkPanelComponentType;
22
+ export default LinkPanel;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface LinkPanelDescriptionProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ children: React.ReactNode;
4
+ }
5
+ export type LinkPanelDescriptionType = React.ForwardRefExoticComponent<LinkPanelDescriptionProps & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const LinkPanelDescription: LinkPanelDescriptionType;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { OverridableComponent } from "..";
3
+ interface LinkPanelTitleProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ children: React.ReactNode;
5
+ }
6
+ export type LinkPanelTitleType = OverridableComponent<LinkPanelTitleProps, HTMLDivElement>;
7
+ export declare const LinkPanelTitle: LinkPanelTitleType;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export { default as LinkPanel } from "./LinkPanel";
2
+ export { LinkPanelProps } from "./LinkPanel";
@@ -0,0 +1,27 @@
1
+ import React, { SVGProps } from "react";
2
+ export interface LoaderProps extends SVGProps<SVGSVGElement> {
3
+ /**
4
+ * Changes Loader width/height
5
+ * 64px | 40px | 32px | 24px | 20px | 16px
6
+ * @default "medium"
7
+ */
8
+ size?: "3xlarge" | "2xlarge" | "xlarge" | "large" | "medium" | "small" | "xsmall";
9
+ /**
10
+ * Title prop on svg
11
+ * @default "venter..."
12
+ */
13
+ title?: React.ReactNode;
14
+ /**
15
+ * Sets svg-background to transparent
16
+ * @default false
17
+ */
18
+ transparent?: boolean;
19
+ /**
20
+ * Colored variants for Loader
21
+ * @default "neutral"
22
+ */
23
+ variant?: "neutral" | "interaction" | "inverted";
24
+ }
25
+ export type LoaderType = React.ForwardRefExoticComponent<LoaderProps & React.RefAttributes<SVGSVGElement>>;
26
+ export declare const Loader: LoaderType;
27
+ export default Loader;
@@ -0,0 +1,2 @@
1
+ export { default as Loader } from "./Loader";
2
+ export { LoaderProps } from "./Loader";
@@ -0,0 +1,63 @@
1
+ import React from "react";
2
+ import ReactModal from "react-modal";
3
+ import { ModalContentType } from "./ModalContent";
4
+ export interface ModalProps {
5
+ /**
6
+ * Modal content
7
+ */
8
+ children: React.ReactNode;
9
+ /**
10
+ * Open state for modal
11
+ */
12
+ open: boolean;
13
+ /**
14
+ * Callback for modal wanting to close
15
+ */
16
+ onClose: () => void;
17
+ /**
18
+ * If modal should close on overlay click (click outside Modal)
19
+ * @default true
20
+ */
21
+ shouldCloseOnOverlayClick?: boolean;
22
+ /**
23
+ * User defined classname for modal
24
+ */
25
+ className?: string;
26
+ /**
27
+ * User defined classname for modal
28
+ */
29
+ overlayClassName?: string;
30
+ /**
31
+ * Removes close-button(X) when false
32
+ * @default true
33
+ */
34
+ closeButton?: boolean;
35
+ /**
36
+ *
37
+ */
38
+ shouldCloseOnEsc?: boolean;
39
+ /**
40
+ * Allows custom styling of ReactModal, in accordance with their typing
41
+ */
42
+ style?: ReactModal.Styles;
43
+ /**
44
+ * Callback for setting parent element modal will attach to
45
+ */
46
+ parentSelector?(): HTMLElement;
47
+ "aria-labelledby"?: string;
48
+ "aria-describedby"?: string;
49
+ "aria-modal"?: boolean;
50
+ /**
51
+ * Sets aria-label on modal
52
+ * @warning This should be set if not using 'aria-labelledby' or 'aria-describedby'
53
+ */
54
+ "aria-label"?: string;
55
+ }
56
+ interface ModalComponent extends ModalLifecycle, React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<ReactModal>> {
57
+ Content: ModalContentType;
58
+ }
59
+ type ModalLifecycle = {
60
+ setAppElement: (element: any) => void;
61
+ };
62
+ export declare const Modal: ModalComponent;
63
+ export default Modal;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ export interface ModalContentProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Modal.Content content
5
+ */
6
+ children: React.ReactNode;
7
+ }
8
+ export type ModalContentType = React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const ModalContent: ModalContentType;
10
+ export default ModalContent;
@@ -0,0 +1,2 @@
1
+ export { default as Modal, ModalProps } from "./Modal";
2
+ export { ModalContentProps } from "./ModalContent";
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { PaginationItemProps, PaginationItemType } from "./PaginationItem";
3
+ export interface PaginationProps extends React.HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Current page
6
+ * @note Pagination indexing starts at 1
7
+ */
8
+ page: number;
9
+ /**
10
+ * Number of always visible pages before and after the current page.
11
+ * @default 1
12
+ */
13
+ siblingCount?: number;
14
+ /**
15
+ * Number of always visible pages at the beginning and end.
16
+ * @default 1
17
+ */
18
+ boundaryCount?: number;
19
+ /**
20
+ * Callback when current page changes
21
+ */
22
+ onPageChange?: (page: number) => void;
23
+ /**
24
+ * Total number of pages
25
+ */
26
+ count: number;
27
+ /**
28
+ * Changes padding, height and font-size
29
+ * @default "medium"
30
+ */
31
+ size?: "medium" | "small" | "xsmall";
32
+ /**
33
+ * Display text alongside "previous" and "next" icons
34
+ * @default false
35
+ */
36
+ prevNextTexts?: boolean;
37
+ /**
38
+ * Override pagination item rendering
39
+ * @default (item: PaginationItemProps) => <PaginationItem {...item} />
40
+ */
41
+ renderItem?: (item: PaginationItemProps) => ReturnType<React.FC>;
42
+ }
43
+ interface PaginationType extends React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>> {
44
+ Item: PaginationItemType;
45
+ }
46
+ export declare const getSteps: ({ page, count, boundaryCount, siblingCount, }: {
47
+ page: any;
48
+ count: any;
49
+ boundaryCount?: number | undefined;
50
+ siblingCount?: number | undefined;
51
+ }) => (string | number)[];
52
+ export declare const Pagination: PaginationType;
53
+ export default Pagination;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { ButtonProps, OverridableComponent } from "..";
3
+ export interface PaginationItemProps extends ButtonProps {
4
+ children: React.ReactNode;
5
+ /**
6
+ * Sets selected styling if true
7
+ * @default false
8
+ */
9
+ selected?: boolean;
10
+ /**
11
+ * The page the item represents
12
+ */
13
+ page: number;
14
+ /**
15
+ * Changes padding, height and font-size
16
+ * @default medium
17
+ */
18
+ size?: "medium" | "small" | "xsmall";
19
+ }
20
+ export type PaginationItemType = OverridableComponent<PaginationItemProps, HTMLAnchorElement>;
21
+ export declare const Item: PaginationItemType;
22
+ export default Item;
@@ -0,0 +1 @@
1
+ export { default as Pagination, PaginationProps } from "./Pagination";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { OverridableComponent } from "..";
3
+ export interface PanelProps extends React.HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Panel content
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * Adds a border to panel when true
10
+ * @default false
11
+ */
12
+ border?: boolean;
13
+ }
14
+ export type PanelType = OverridableComponent<PanelProps, HTMLElement>;
15
+ export declare const Panel: PanelType;
16
+ export default Panel;
@@ -0,0 +1,2 @@
1
+ export { default as Panel } from "./Panel";
2
+ export { PanelProps } from "./Panel";