@navikt/ds-react 0.18.2 → 0.18.5
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/_docs.json +186 -209
- package/cjs/form/ConfirmationPanel.js +10 -5
- package/esm/accordion/Accordion.d.ts +1 -1
- package/esm/accordion/AccordionContent.d.ts +3 -1
- package/esm/accordion/AccordionContent.js.map +1 -1
- package/esm/accordion/AccordionHeader.d.ts +1 -1
- package/esm/accordion/AccordionItem.d.ts +6 -5
- package/esm/accordion/AccordionItem.js.map +1 -1
- package/esm/alert/Alert.d.ts +3 -2
- package/esm/alert/Alert.js.map +1 -1
- package/esm/button/Button.d.ts +1 -2
- package/esm/button/Button.js.map +1 -1
- package/esm/form/ConfirmationPanel.d.ts +9 -1
- package/esm/form/ConfirmationPanel.js +10 -5
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/Fieldset/Fieldset.d.ts +4 -1
- package/esm/form/Fieldset/Fieldset.js.map +1 -1
- package/esm/form/Select.d.ts +2 -2
- package/esm/form/Switch.d.ts +1 -0
- package/esm/form/Switch.js.map +1 -1
- package/esm/form/TextField.d.ts +4 -4
- package/esm/form/Textarea.d.ts +10 -3
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.d.ts +2 -2
- package/esm/form/checkbox/CheckboxGroup.d.ts +2 -2
- package/esm/form/error-summary/ErrorSummary.d.ts +2 -2
- package/esm/form/radio/Radio.d.ts +1 -1
- package/esm/form/radio/RadioGroup.d.ts +4 -4
- package/esm/form/search/Search.d.ts +2 -2
- package/esm/form/useFormField.d.ts +1 -0
- package/esm/form/useFormField.js.map +1 -1
- package/esm/help-text/HelpText.d.ts +12 -1
- package/esm/help-text/HelpText.js.map +1 -1
- package/esm/link-panel/LinkPanel.d.ts +2 -1
- package/esm/link-panel/LinkPanel.js.map +1 -1
- package/esm/loader/Loader.d.ts +6 -2
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.d.ts +4 -4
- package/esm/pagination/Pagination.d.ts +1 -0
- package/esm/pagination/Pagination.js.map +1 -1
- package/esm/panel/Panel.d.ts +1 -1
- package/esm/popover/Popover.d.ts +7 -6
- package/esm/popover/Popover.js.map +1 -1
- package/esm/speech-bubble/SpeechBubble.d.ts +3 -3
- package/esm/step-indicator/Step.d.ts +2 -0
- package/esm/step-indicator/Step.js.map +1 -1
- package/esm/stepper/Step.d.ts +2 -1
- package/esm/stepper/Step.js.map +1 -1
- package/esm/table/ColumnHeader.d.ts +1 -1
- package/esm/table/DataCell.d.ts +1 -1
- package/esm/table/ExpandableRow.d.ts +1 -1
- package/esm/table/HeaderCell.d.ts +1 -1
- package/esm/table/index.d.ts +1 -1
- package/esm/table/index.js.map +1 -1
- package/esm/tabs/Tab.d.ts +2 -2
- package/esm/tabs/TabList.d.ts +1 -1
- package/esm/tabs/TabPanel.d.ts +1 -1
- package/esm/tabs/Tabs.d.ts +1 -4
- package/esm/tabs/Tabs.js.map +1 -1
- package/esm/tag/Tag.d.ts +3 -4
- package/esm/tag/Tag.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.d.ts +1 -1
- package/esm/tooltip/Tooltip.d.ts +8 -6
- package/esm/tooltip/Tooltip.js.map +1 -1
- package/esm/typography/BodyLong.d.ts +1 -1
- package/esm/typography/BodyShort.d.ts +1 -1
- package/esm/typography/Detail.d.ts +1 -1
- package/esm/typography/Heading.d.ts +2 -2
- package/esm/typography/Ingress.d.ts +1 -1
- package/esm/typography/Label.d.ts +1 -1
- package/package.json +2 -2
- package/src/accordion/Accordion.tsx +1 -1
- package/src/accordion/AccordionContent.tsx +3 -1
- package/src/accordion/AccordionHeader.tsx +1 -1
- package/src/accordion/AccordionItem.tsx +6 -5
- package/src/alert/Alert.tsx +3 -2
- package/src/button/Button.tsx +1 -2
- package/src/form/ConfirmationPanel.tsx +38 -13
- package/src/form/Fieldset/Fieldset.tsx +4 -1
- package/src/form/Select.tsx +2 -2
- package/src/form/Switch.tsx +1 -0
- package/src/form/TextField.tsx +4 -4
- package/src/form/Textarea.tsx +10 -3
- package/src/form/checkbox/Checkbox.tsx +2 -2
- package/src/form/checkbox/CheckboxGroup.tsx +2 -2
- package/src/form/error-summary/ErrorSummary.tsx +2 -2
- package/src/form/radio/Radio.tsx +1 -1
- package/src/form/radio/RadioGroup.tsx +4 -4
- package/src/form/search/Search.tsx +2 -2
- package/src/form/useFormField.ts +1 -0
- package/src/help-text/HelpText.tsx +12 -1
- package/src/link-panel/LinkPanel.tsx +2 -1
- package/src/loader/Loader.tsx +5 -4
- package/src/modal/Modal.tsx +4 -4
- package/src/pagination/Pagination.tsx +1 -0
- package/src/panel/Panel.tsx +1 -1
- package/src/popover/Popover.tsx +7 -6
- package/src/speech-bubble/SpeechBubble.tsx +3 -3
- package/src/step-indicator/Step.tsx +2 -0
- package/src/stepper/Step.tsx +2 -1
- package/src/table/ColumnHeader.tsx +1 -1
- package/src/table/DataCell.tsx +1 -1
- package/src/table/ExpandableRow.tsx +1 -1
- package/src/table/HeaderCell.tsx +1 -1
- package/src/table/index.ts +1 -1
- package/src/tabs/Tab.tsx +2 -2
- package/src/tabs/TabList.tsx +1 -1
- package/src/tabs/TabPanel.tsx +1 -1
- package/src/tabs/Tabs.tsx +1 -4
- package/src/tag/Tag.tsx +3 -4
- package/src/toggle-group/ToggleGroup.tsx +1 -1
- package/src/tooltip/Tooltip.tsx +8 -6
- package/src/typography/BodyLong.tsx +1 -1
- package/src/typography/BodyShort.tsx +1 -1
- package/src/typography/Detail.tsx +1 -1
- package/src/typography/Heading.tsx +2 -2
- package/src/typography/Ingress.tsx +1 -1
- package/src/typography/Label.tsx +1 -1
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import cl from "classnames";
|
|
3
3
|
import { BodyLong, Checkbox, CheckboxProps } from "..";
|
|
4
|
+
import ErrorMessage from "./ErrorMessage";
|
|
5
|
+
import { useFormField } from "./useFormField";
|
|
4
6
|
|
|
5
7
|
export interface ConfirmationPanelProps
|
|
6
|
-
extends Omit<
|
|
8
|
+
extends Omit<
|
|
9
|
+
CheckboxProps,
|
|
10
|
+
"children" | "indeterminate" | "hideLabel" | "error"
|
|
11
|
+
> {
|
|
7
12
|
/**
|
|
8
13
|
* Additional information on panel
|
|
9
14
|
*/
|
|
@@ -12,30 +17,50 @@ export interface ConfirmationPanelProps
|
|
|
12
17
|
* Checkbox label
|
|
13
18
|
*/
|
|
14
19
|
label: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Error message for element
|
|
22
|
+
*/
|
|
23
|
+
error?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Override internal errorId
|
|
26
|
+
*/
|
|
27
|
+
errorId?: string;
|
|
15
28
|
}
|
|
16
29
|
|
|
17
30
|
export const ConfirmationPanel = forwardRef<
|
|
18
31
|
HTMLDivElement,
|
|
19
32
|
ConfirmationPanelProps
|
|
20
33
|
>(({ className, children, label, ...props }, ref) => {
|
|
34
|
+
const { errorId, showErrorMsg, hasError, size, inputProps } = useFormField(
|
|
35
|
+
props,
|
|
36
|
+
"confirmationPanel"
|
|
37
|
+
);
|
|
38
|
+
|
|
21
39
|
return (
|
|
22
40
|
<div
|
|
23
41
|
ref={ref}
|
|
24
|
-
className={cl("navds-confirmation-panel", className, {
|
|
25
|
-
"navds-confirmation-panel--small":
|
|
26
|
-
"navds-confirmation-panel--error":
|
|
42
|
+
className={cl("navds-confirmation-panel", "navds-form-field", className, {
|
|
43
|
+
"navds-confirmation-panel--small": size === "small",
|
|
44
|
+
"navds-confirmation-panel--error": hasError,
|
|
27
45
|
"navds-confirmation-panel--checked": !!props.checked,
|
|
28
46
|
})}
|
|
29
47
|
>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
48
|
+
<div className="navds-confirmation-panel__inner">
|
|
49
|
+
{children && (
|
|
50
|
+
<BodyLong
|
|
51
|
+
size={props.size}
|
|
52
|
+
className="navds-confirmation-panel__content"
|
|
53
|
+
>
|
|
54
|
+
{children}
|
|
55
|
+
</BodyLong>
|
|
56
|
+
)}
|
|
57
|
+
<Checkbox {...props} {...inputProps} error={hasError} size={size}>
|
|
58
|
+
{label}
|
|
59
|
+
</Checkbox>
|
|
60
|
+
</div>
|
|
61
|
+
<div id={errorId} aria-relevant="additions removals" aria-live="polite">
|
|
62
|
+
{showErrorMsg && <ErrorMessage size={size}>{props.error}</ErrorMessage>}
|
|
63
|
+
</div>
|
|
39
64
|
</div>
|
|
40
65
|
);
|
|
41
66
|
});
|
|
@@ -7,7 +7,7 @@ import { useFieldset } from "./useFieldset";
|
|
|
7
7
|
|
|
8
8
|
export type FieldsetContextProps = {
|
|
9
9
|
/**
|
|
10
|
-
* Error message applied to element
|
|
10
|
+
* Error message applied to element,
|
|
11
11
|
*/
|
|
12
12
|
error?: React.ReactNode;
|
|
13
13
|
/**
|
|
@@ -18,6 +18,9 @@ export type FieldsetContextProps = {
|
|
|
18
18
|
* Changes paddings, margins and font-sizes
|
|
19
19
|
*/
|
|
20
20
|
size: "medium" | "small";
|
|
21
|
+
/**
|
|
22
|
+
* Sets fieldset and all form-children to disabled
|
|
23
|
+
*/
|
|
21
24
|
disabled: boolean;
|
|
22
25
|
};
|
|
23
26
|
|
package/src/form/Select.tsx
CHANGED
|
@@ -9,11 +9,11 @@ export interface SelectProps
|
|
|
9
9
|
extends FormFieldProps,
|
|
10
10
|
Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
11
11
|
/**
|
|
12
|
-
* Collection of <option
|
|
12
|
+
* Collection of <option />-elements
|
|
13
13
|
*/
|
|
14
14
|
children: React.ReactNode;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Exposes the HTML size attribute
|
|
17
17
|
*/
|
|
18
18
|
htmlSize?: number;
|
|
19
19
|
/**
|
package/src/form/Switch.tsx
CHANGED
package/src/form/TextField.tsx
CHANGED
|
@@ -8,15 +8,15 @@ export interface TextFieldProps
|
|
|
8
8
|
extends FormFieldProps,
|
|
9
9
|
Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Controlled value
|
|
12
12
|
*/
|
|
13
13
|
value?: string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Defaults input-value without needing controlled-state
|
|
16
16
|
*/
|
|
17
17
|
defaultValue?: string;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Exposes the HTML size attribute
|
|
20
20
|
*/
|
|
21
21
|
htmlSize?: number;
|
|
22
22
|
/**
|
|
@@ -28,7 +28,7 @@ export interface TextFieldProps
|
|
|
28
28
|
*/
|
|
29
29
|
label: React.ReactNode;
|
|
30
30
|
/**
|
|
31
|
-
* Type of form control
|
|
31
|
+
* Type of form control. Picking the correct type helps user fill inn their required information
|
|
32
32
|
* @default "text"
|
|
33
33
|
*/
|
|
34
34
|
type?: "email" | "number" | "password" | "tel" | "text" | "url";
|
package/src/form/Textarea.tsx
CHANGED
|
@@ -13,18 +13,25 @@ export interface TextareaProps
|
|
|
13
13
|
extends FormFieldProps,
|
|
14
14
|
React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Allowed character-count for content
|
|
17
|
+
* @note This is just a visual validator, you need to set actual character-limits if needed
|
|
17
18
|
*/
|
|
18
19
|
maxLength?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Controlled value
|
|
22
|
+
*/
|
|
19
23
|
value?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Defaults input-value without needing controlled-state
|
|
26
|
+
*/
|
|
20
27
|
defaultValue?: string;
|
|
21
28
|
/**
|
|
22
|
-
* Maximum number of rows to display.
|
|
29
|
+
* Maximum number of character rows to display.
|
|
23
30
|
* @bug Internal scrolling with `maxLength` scrolls over maxLength-text
|
|
24
31
|
*/
|
|
25
32
|
maxRows?: number;
|
|
26
33
|
/**
|
|
27
|
-
* Minimum number of rows to display.
|
|
34
|
+
* Minimum number of character-rows to display when empty.
|
|
28
35
|
*/
|
|
29
36
|
minRows?: number;
|
|
30
37
|
/**
|
|
@@ -8,12 +8,12 @@ export interface CheckboxProps
|
|
|
8
8
|
extends Omit<FormFieldProps, "errorId">,
|
|
9
9
|
Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value"> {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Adds error indication on checkbox
|
|
12
12
|
* @default false
|
|
13
13
|
*/
|
|
14
14
|
error?: boolean;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Checkbox label
|
|
17
17
|
*/
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
/**
|
|
@@ -18,11 +18,11 @@ export interface CheckboxGroupProps
|
|
|
18
18
|
"onChange" | "errorPropagation" | "defaultValue"
|
|
19
19
|
> {
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Collection of <Checkbox/>
|
|
22
22
|
*/
|
|
23
23
|
children: React.ReactNode;
|
|
24
24
|
/**
|
|
25
|
-
* Controlled state for
|
|
25
|
+
* Controlled state for checkboxes.
|
|
26
26
|
*/
|
|
27
27
|
value?: any[];
|
|
28
28
|
/**
|
|
@@ -5,7 +5,7 @@ import ErrorSummaryItem, { ErrorSummaryItemType } from "./ErrorSummaryItem";
|
|
|
5
5
|
|
|
6
6
|
export interface ErrorSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Collectipn of ErrorSummary.Item
|
|
9
9
|
*/
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
/**
|
|
@@ -18,7 +18,7 @@ export interface ErrorSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
18
18
|
*/
|
|
19
19
|
heading?: React.ReactNode;
|
|
20
20
|
/**
|
|
21
|
-
* Allows setting a different HTML
|
|
21
|
+
* Allows setting a different HTML h-tag
|
|
22
22
|
* @default "h2"
|
|
23
23
|
*/
|
|
24
24
|
headingTag?: React.ElementType<any>;
|
package/src/form/radio/Radio.tsx
CHANGED
|
@@ -21,7 +21,7 @@ export interface RadioGroupProps
|
|
|
21
21
|
"onChange" | "errorPropagation" | "defaultValue"
|
|
22
22
|
> {
|
|
23
23
|
/**
|
|
24
|
-
* Collection of <Radio
|
|
24
|
+
* Collection of <Radio />-elements
|
|
25
25
|
*/
|
|
26
26
|
children: React.ReactNode;
|
|
27
27
|
/**
|
|
@@ -29,15 +29,15 @@ export interface RadioGroupProps
|
|
|
29
29
|
*/
|
|
30
30
|
name?: string;
|
|
31
31
|
/**
|
|
32
|
-
* Default checked
|
|
32
|
+
* Default checked Radio
|
|
33
33
|
*/
|
|
34
34
|
defaultValue?: any;
|
|
35
35
|
/**
|
|
36
|
-
* Controlled state for
|
|
36
|
+
* Controlled state for Radio
|
|
37
37
|
*/
|
|
38
38
|
value?: any;
|
|
39
39
|
/**
|
|
40
|
-
* Returns current checked
|
|
40
|
+
* Returns current checked Radio in group
|
|
41
41
|
*/
|
|
42
42
|
onChange?: (value: any) => void;
|
|
43
43
|
/**
|
|
@@ -26,7 +26,7 @@ export interface SearchProps
|
|
|
26
26
|
children?: React.ReactNode;
|
|
27
27
|
/**
|
|
28
28
|
* Search label
|
|
29
|
-
* @
|
|
29
|
+
* @note Will be hidden by default, is required for accessibility reasons.
|
|
30
30
|
*/
|
|
31
31
|
label: React.ReactNode;
|
|
32
32
|
/**
|
|
@@ -53,7 +53,7 @@ export interface SearchProps
|
|
|
53
53
|
*/
|
|
54
54
|
clearButton?: boolean;
|
|
55
55
|
/**
|
|
56
|
-
* Changes button-variant
|
|
56
|
+
* Changes button-variant, "simple" removes button
|
|
57
57
|
* @default "primary"
|
|
58
58
|
*/
|
|
59
59
|
variant?: "primary" | "secondary" | "simple";
|
package/src/form/useFormField.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Helptext as HelpTextIcon } from "@navikt/ds-icons";
|
|
2
|
+
import { Placement } from "@popperjs/core";
|
|
2
3
|
import cl from "classnames";
|
|
3
4
|
import React, { forwardRef, useRef, useState } from "react";
|
|
4
5
|
import mergeRefs from "react-merge-refs";
|
|
@@ -8,9 +9,19 @@ export interface HelpTextProps
|
|
|
8
9
|
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
9
10
|
Pick<PopoverProps, "strategy" | "placement"> {
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* Helptext-dialog content
|
|
12
13
|
*/
|
|
13
14
|
children: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Adds a title-tooltip with the given text
|
|
17
|
+
* @default "hjelp"
|
|
18
|
+
*/
|
|
19
|
+
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Default dialog-placement on open
|
|
22
|
+
* @default "top"
|
|
23
|
+
*/
|
|
24
|
+
placement?: Placement;
|
|
14
25
|
}
|
|
15
26
|
|
|
16
27
|
export const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { useId } from "..";
|
|
|
4
4
|
|
|
5
5
|
export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
6
6
|
/**
|
|
7
|
-
* Changes
|
|
7
|
+
* Changes Loader width/height
|
|
8
8
|
* 64px | 40px | 32px | 24px | 20px | 16px
|
|
9
9
|
* @default "medium"
|
|
10
10
|
*/
|
|
@@ -14,12 +14,13 @@ export interface LoaderProps extends SVGProps<SVGSVGElement> {
|
|
|
14
14
|
* @default "venter..."
|
|
15
15
|
*/
|
|
16
16
|
title?: React.ReactNode;
|
|
17
|
-
|
|
18
|
-
*
|
|
17
|
+
/**
|
|
18
|
+
* Sets svg-background to transparent
|
|
19
|
+
* @default false
|
|
19
20
|
*/
|
|
20
21
|
transparent?: boolean;
|
|
21
22
|
/**
|
|
22
|
-
* Colored variants for
|
|
23
|
+
* Colored variants for Loader
|
|
23
24
|
* @default "neutral"
|
|
24
25
|
*/
|
|
25
26
|
variant?: "neutral" | "interaction" | "inverted";
|
package/src/modal/Modal.tsx
CHANGED
|
@@ -16,11 +16,11 @@ export interface ModalProps {
|
|
|
16
16
|
*/
|
|
17
17
|
open: boolean;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Callback for modal wanting to close
|
|
20
20
|
*/
|
|
21
21
|
onClose: () => void;
|
|
22
22
|
/**
|
|
23
|
-
* If modal should close on overlay click
|
|
23
|
+
* If modal should close on overlay click (click outside Modal)
|
|
24
24
|
* @default true
|
|
25
25
|
*/
|
|
26
26
|
shouldCloseOnOverlayClick?: boolean;
|
|
@@ -29,12 +29,12 @@ export interface ModalProps {
|
|
|
29
29
|
*/
|
|
30
30
|
className?: string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Removes close-button(X) when false
|
|
33
33
|
* @default true
|
|
34
34
|
*/
|
|
35
35
|
closeButton?: boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Callback for
|
|
37
|
+
* Callback for setting parent element modal will attach to
|
|
38
38
|
*/
|
|
39
39
|
parentSelector?(): HTMLElement;
|
|
40
40
|
"aria-labelledby"?: string;
|
package/src/panel/Panel.tsx
CHANGED
package/src/popover/Popover.tsx
CHANGED
|
@@ -13,6 +13,10 @@ import { useClientLayoutEffect } from "..";
|
|
|
13
13
|
import PopoverContent, { PopoverContentType } from "./PopoverContent";
|
|
14
14
|
|
|
15
15
|
export interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
/**
|
|
17
|
+
* Popover content
|
|
18
|
+
*/
|
|
19
|
+
children: React.ReactNode;
|
|
16
20
|
/**
|
|
17
21
|
* Element popover anchors to
|
|
18
22
|
*/
|
|
@@ -25,18 +29,15 @@ export interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
25
29
|
* onClose callback
|
|
26
30
|
*/
|
|
27
31
|
onClose: () => void;
|
|
28
|
-
/**
|
|
29
|
-
* Popover content
|
|
30
|
-
*/
|
|
31
|
-
children: React.ReactNode;
|
|
32
32
|
/**
|
|
33
33
|
* Orientation for popover
|
|
34
|
+
* @note Try to keep general usage to "top", "bottom", "left", "right"
|
|
34
35
|
* @default "right"
|
|
35
36
|
*/
|
|
36
37
|
placement?: Placement;
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
39
|
+
* Adds a arrow from dialog to anchor when true
|
|
40
|
+
* @default true
|
|
40
41
|
*/
|
|
41
42
|
arrow?: boolean;
|
|
42
43
|
/**
|
|
@@ -4,7 +4,7 @@ import Bubble, { BubbleType } from "./Bubble";
|
|
|
4
4
|
|
|
5
5
|
export interface SpeechBubbleProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
7
|
-
* Children of type <Bubble />
|
|
7
|
+
* Children of type <SpeechBubble.Bubble />
|
|
8
8
|
*/
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
/**
|
|
@@ -12,11 +12,11 @@ export interface SpeechBubbleProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
*/
|
|
13
13
|
topText?: React.ReactNode;
|
|
14
14
|
/**
|
|
15
|
-
* Illustration for messenger
|
|
15
|
+
* Illustration for messenger. Regular text for initials works to
|
|
16
16
|
*/
|
|
17
17
|
illustration: React.ReactNode;
|
|
18
18
|
/**
|
|
19
|
-
* Background color bubbles
|
|
19
|
+
* Background color on bubbles
|
|
20
20
|
*/
|
|
21
21
|
backgroundColor?: string;
|
|
22
22
|
/**
|
|
@@ -11,10 +11,12 @@ export interface StepIndicatorStepProps
|
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
/**
|
|
13
13
|
* Disables interaction with element
|
|
14
|
+
* @note We recommend not using disabled if possible
|
|
14
15
|
*/
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
/**
|
|
17
18
|
* Handled by StepIndicator
|
|
19
|
+
* @private
|
|
18
20
|
*/
|
|
19
21
|
index?: number;
|
|
20
22
|
}
|
package/src/stepper/Step.tsx
CHANGED
|
@@ -6,11 +6,12 @@ import { Label, OverridableComponent } from "..";
|
|
|
6
6
|
export interface StepperStepProps
|
|
7
7
|
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
8
8
|
/**
|
|
9
|
-
* Text content
|
|
9
|
+
* Text content by indicator
|
|
10
10
|
*/
|
|
11
11
|
children: string;
|
|
12
12
|
/**
|
|
13
13
|
* Handled by Stepper
|
|
14
|
+
* @private
|
|
14
15
|
*/
|
|
15
16
|
index?: number;
|
|
16
17
|
}
|
package/src/table/DataCell.tsx
CHANGED
package/src/table/HeaderCell.tsx
CHANGED
package/src/table/index.ts
CHANGED
|
@@ -5,4 +5,4 @@ export { ExpandableRowProps } from "./ExpandableRow";
|
|
|
5
5
|
export { HeaderProps } from "./Header";
|
|
6
6
|
export { HeaderCellProps } from "./HeaderCell";
|
|
7
7
|
export { RowProps } from "./Row";
|
|
8
|
-
export { default as Table, TableProps } from "./Table";
|
|
8
|
+
export { default as Table, TableProps, SortState } from "./Table";
|
package/src/tabs/Tab.tsx
CHANGED
|
@@ -7,11 +7,11 @@ import { TabsContext } from "./Tabs";
|
|
|
7
7
|
export interface TabProps
|
|
8
8
|
extends Omit<React.HTMLAttributes<HTMLButtonElement>, "children"> {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Tab label
|
|
11
11
|
*/
|
|
12
12
|
label?: React.ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* Icon
|
|
14
|
+
* Tab Icon
|
|
15
15
|
*/
|
|
16
16
|
icon?: React.ReactNode;
|
|
17
17
|
/**
|
package/src/tabs/TabList.tsx
CHANGED
package/src/tabs/TabPanel.tsx
CHANGED
package/src/tabs/Tabs.tsx
CHANGED
|
@@ -7,9 +7,6 @@ import TabPanel, { TabPanelType } from "./TabPanel";
|
|
|
7
7
|
|
|
8
8
|
export interface TabsProps
|
|
9
9
|
extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "dir"> {
|
|
10
|
-
/**
|
|
11
|
-
* Tabs elements
|
|
12
|
-
*/
|
|
13
10
|
children: React.ReactNode;
|
|
14
11
|
/**
|
|
15
12
|
* Changes padding and font-size
|
|
@@ -17,7 +14,7 @@ export interface TabsProps
|
|
|
17
14
|
*/
|
|
18
15
|
size?: "medium" | "small";
|
|
19
16
|
/**
|
|
20
|
-
* onChange
|
|
17
|
+
* onChange callback for selected Tab
|
|
21
18
|
*/
|
|
22
19
|
onChange?: (value: string) => void;
|
|
23
20
|
/**
|
package/src/tag/Tag.tsx
CHANGED
|
@@ -4,16 +4,15 @@ import { BodyShort, Detail } from "..";
|
|
|
4
4
|
|
|
5
5
|
export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
|
|
6
6
|
/**
|
|
7
|
-
* Tag
|
|
7
|
+
* Tag label
|
|
8
8
|
*/
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
/**
|
|
11
|
-
* Changes background
|
|
12
|
-
*
|
|
11
|
+
* Changes background and border color
|
|
13
12
|
*/
|
|
14
13
|
variant: "warning" | "error" | "info" | "success";
|
|
15
14
|
/**
|
|
16
|
-
* Changes
|
|
15
|
+
* Changes padding and font-sizes
|
|
17
16
|
* @default "medium"
|
|
18
17
|
*/
|
|
19
18
|
size?: "medium" | "small";
|