@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
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -25,6 +25,7 @@ import { useId } from "../util";
|
|
|
25
25
|
export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
26
|
/**
|
|
27
27
|
* Element tooltip anchors to
|
|
28
|
+
* @note Needs to be React.ReactElement, does not support multiple children/react fragment
|
|
28
29
|
*/
|
|
29
30
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
30
31
|
/**
|
|
@@ -32,7 +33,8 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
32
33
|
*/
|
|
33
34
|
open?: boolean;
|
|
34
35
|
/**
|
|
35
|
-
* Tells tooltip to start in open state
|
|
36
|
+
* Tells tooltip to start in open state.
|
|
37
|
+
* Use sparingly synce hover/focus on other elements will close it
|
|
36
38
|
* @note "open"-prop overwrites this
|
|
37
39
|
*/
|
|
38
40
|
defaultOpen?: boolean;
|
|
@@ -42,8 +44,8 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
42
44
|
*/
|
|
43
45
|
placement?: "top" | "right" | "bottom" | "left";
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* Toggles rendering of arrow
|
|
48
|
+
* @default true
|
|
47
49
|
*/
|
|
48
50
|
arrow?: boolean;
|
|
49
51
|
/**
|
|
@@ -52,17 +54,17 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
52
54
|
*/
|
|
53
55
|
offset?: number;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
57
|
+
* Text-content inside tooltip
|
|
56
58
|
*/
|
|
57
59
|
content: string;
|
|
58
60
|
/**
|
|
59
|
-
* Sets max allowed character length
|
|
61
|
+
* Sets max allowed character length.
|
|
60
62
|
* @default 80
|
|
61
63
|
*/
|
|
62
64
|
maxChar?: number;
|
|
63
65
|
/**
|
|
64
66
|
* Adds a delay in milliseconds before opening tooltip
|
|
65
|
-
* @default
|
|
67
|
+
* @default 150
|
|
66
68
|
*/
|
|
67
69
|
delay?: number;
|
|
68
70
|
/**
|
|
@@ -9,7 +9,7 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
|
9
9
|
*/
|
|
10
10
|
level?: "1" | "2" | "3" | "4" | "5" | "6";
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Changes text-sizing
|
|
13
13
|
*/
|
|
14
14
|
size: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
|
17
17
|
*/
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
/**
|
|
20
|
-
* Adds
|
|
20
|
+
* Adds margin-bottom
|
|
21
21
|
* @default false
|
|
22
22
|
*/
|
|
23
23
|
spacing?: boolean;
|