@navikt/ds-react 5.13.0 → 5.14.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/_docs.json +206 -135
- package/cjs/accordion/AccordionHeader.js +2 -4
- package/cjs/button/Button.js +11 -12
- package/cjs/chips/Removable.js +3 -6
- package/cjs/copybutton/CopyButton.js +4 -5
- package/cjs/date/datepicker/DatePicker.js +4 -2
- package/cjs/date/datepicker/parts/WeekRow.js +2 -2
- package/cjs/date/monthpicker/MonthPicker.js +4 -3
- package/cjs/date/parts/DateWrapper.js +2 -2
- package/cjs/dropdown/Menu/GroupedList/GroupedItem.js +3 -6
- package/cjs/dropdown/Menu/List/Item.js +3 -6
- package/cjs/dropdown/Toggle.js +6 -5
- package/cjs/form/ConfirmationPanel.js +2 -2
- package/cjs/form/Textarea.js +2 -1
- package/cjs/form/checkbox/Checkbox.js +3 -2
- package/cjs/form/combobox/Combobox.js +2 -2
- package/cjs/form/combobox/FilteredOptions/filteredOptionsContext.js +3 -4
- package/cjs/form/combobox/Input/inputContext.js +2 -2
- package/cjs/form/combobox/SelectedOptions/selectedOptionsContext.js +2 -5
- package/cjs/form/error-summary/ErrorSummary.js +2 -2
- package/cjs/form/radio/Radio.js +3 -2
- package/cjs/form/radio/RadioGroup.js +2 -2
- package/cjs/form/search/Search.js +2 -1
- package/cjs/form/search/SearchButton.js +2 -4
- package/cjs/form/useFormField.js +2 -2
- package/cjs/guide-panel/Illustration.js +2 -2
- package/cjs/help-text/HelpText.js +5 -7
- package/cjs/help-text/HelpTextIcon.js +2 -2
- package/cjs/list/List.js +2 -2
- package/cjs/loader/Loader.js +2 -1
- package/cjs/modal/Modal.js +21 -18
- package/cjs/popover/Popover.js +6 -5
- package/cjs/read-more/ReadMore.js +2 -4
- package/cjs/stepper/Step.js +6 -6
- package/cjs/table/DataCell.js +2 -2
- package/cjs/table/ExpandableRow.js +9 -9
- package/cjs/table/HeaderCell.js +2 -1
- package/cjs/tabs/TabList.js +2 -1
- package/cjs/tag/Tag.js +4 -2
- package/cjs/timeline/Pin.js +2 -2
- package/cjs/timeline/period/ClickablePeriod.js +2 -2
- package/cjs/toggle-group/ToggleGroup.js +2 -2
- package/cjs/tooltip/Tooltip.js +6 -5
- package/cjs/util/Slot.js +2 -5
- package/cjs/util/TextareaAutoSize.js +7 -5
- package/cjs/util/composeEventHandlers.js +17 -0
- package/cjs/util/hooks/index.js +19 -0
- package/cjs/util/hooks/package.json +6 -0
- package/cjs/util/hooks/useClientLayoutEffect.js +7 -0
- package/cjs/util/hooks/useMergeRefs.js +37 -0
- package/cjs/util/{usePrevious.js → hooks/usePrevious.js} +2 -1
- package/cjs/util/index.js +7 -7
- package/cjs/util/types/index.js +2 -0
- package/cjs/util/types/package.json +6 -0
- package/esm/accordion/AccordionHeader.js +2 -4
- package/esm/accordion/AccordionHeader.js.map +1 -1
- package/esm/button/Button.d.ts +1 -1
- package/esm/button/Button.js +12 -13
- package/esm/button/Button.js.map +1 -1
- package/esm/chips/Chips.d.ts +1 -1
- package/esm/chips/Removable.js +3 -6
- package/esm/chips/Removable.js.map +1 -1
- package/esm/chips/Toggle.d.ts +1 -1
- package/esm/copybutton/CopyButton.js +4 -5
- package/esm/copybutton/CopyButton.js.map +1 -1
- package/esm/date/datepicker/DatePicker.js +5 -3
- package/esm/date/datepicker/DatePicker.js.map +1 -1
- package/esm/date/datepicker/parts/WeekRow.js +1 -1
- package/esm/date/datepicker/parts/WeekRow.js.map +1 -1
- package/esm/date/monthpicker/MonthPicker.js +4 -3
- package/esm/date/monthpicker/MonthPicker.js.map +1 -1
- package/esm/date/parts/DateWrapper.js +1 -1
- package/esm/date/parts/DateWrapper.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.d.ts +1 -1
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js +3 -6
- package/esm/dropdown/Menu/GroupedList/GroupedItem.js.map +1 -1
- package/esm/dropdown/Menu/GroupedList/index.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.d.ts +1 -1
- package/esm/dropdown/Menu/List/Item.js +3 -6
- package/esm/dropdown/Menu/List/Item.js.map +1 -1
- package/esm/dropdown/Menu/List/index.d.ts +1 -1
- package/esm/dropdown/Toggle.js +6 -5
- package/esm/dropdown/Toggle.js.map +1 -1
- package/esm/expansion-card/ExpansionCard.d.ts +1 -1
- package/esm/expansion-card/ExpansionCardTitle.d.ts +1 -1
- package/esm/form/ConfirmationPanel.js +1 -1
- package/esm/form/ConfirmationPanel.js.map +1 -1
- package/esm/form/Textarea.js +2 -1
- package/esm/form/Textarea.js.map +1 -1
- package/esm/form/checkbox/Checkbox.js +2 -1
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/combobox/Combobox.js +3 -3
- package/esm/form/combobox/Combobox.js.map +1 -1
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js +1 -2
- package/esm/form/combobox/FilteredOptions/filteredOptionsContext.js.map +1 -1
- package/esm/form/combobox/Input/inputContext.js +1 -1
- package/esm/form/combobox/Input/inputContext.js.map +1 -1
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js +1 -1
- package/esm/form/combobox/SelectedOptions/selectedOptionsContext.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.js +1 -1
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/error-summary/ErrorSummaryItem.d.ts +1 -1
- package/esm/form/radio/Radio.js +2 -1
- package/esm/form/radio/Radio.js.map +1 -1
- package/esm/form/radio/RadioGroup.js +1 -1
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/form/search/Search.js +4 -3
- package/esm/form/search/Search.js.map +1 -1
- package/esm/form/search/SearchButton.js +2 -4
- package/esm/form/search/SearchButton.js.map +1 -1
- package/esm/form/useFormField.js +1 -1
- package/esm/form/useFormField.js.map +1 -1
- package/esm/guide-panel/Illustration.js +1 -1
- package/esm/guide-panel/Illustration.js.map +1 -1
- package/esm/help-text/HelpText.d.ts +0 -5
- package/esm/help-text/HelpText.js +6 -8
- package/esm/help-text/HelpText.js.map +1 -1
- package/esm/help-text/HelpTextIcon.js +1 -1
- package/esm/internal-header/InternalHeader.d.ts +1 -1
- package/esm/internal-header/InternalHeaderButton.d.ts +1 -1
- package/esm/internal-header/InternalHeaderTitle.d.ts +1 -1
- package/esm/internal-header/InternalHeaderUserButton.d.ts +1 -1
- package/esm/layout/box/Box.d.ts +1 -1
- package/esm/layout/page/parts/PageBlock.d.ts +1 -1
- package/esm/layout/stack/HStack.d.ts +1 -1
- package/esm/layout/stack/Stack.d.ts +1 -1
- package/esm/layout/stack/VStack.d.ts +1 -1
- package/esm/link/Link.d.ts +1 -1
- package/esm/link-panel/LinkPanel.d.ts +1 -1
- package/esm/link-panel/LinkPanelTitle.d.ts +1 -1
- package/esm/list/List.js +1 -1
- package/esm/loader/Loader.js +2 -1
- package/esm/loader/Loader.js.map +1 -1
- package/esm/modal/Modal.js +21 -18
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/types.d.ts +1 -1
- package/esm/pagination/PaginationItem.d.ts +1 -1
- package/esm/panel/Panel.d.ts +1 -1
- package/esm/popover/Popover.d.ts +1 -1
- package/esm/popover/Popover.js +4 -3
- package/esm/popover/Popover.js.map +1 -1
- package/esm/read-more/ReadMore.js +2 -4
- package/esm/read-more/ReadMore.js.map +1 -1
- package/esm/stepper/Step.d.ts +1 -1
- package/esm/stepper/Step.js +6 -6
- package/esm/stepper/Step.js.map +1 -1
- package/esm/table/AnimateHeight.js.map +1 -0
- package/esm/table/DataCell.d.ts +4 -0
- package/esm/table/DataCell.js +2 -2
- package/esm/table/DataCell.js.map +1 -1
- package/esm/table/ExpandableRow.js +8 -8
- package/esm/table/ExpandableRow.js.map +1 -1
- package/esm/table/HeaderCell.d.ts +4 -0
- package/esm/table/HeaderCell.js +2 -1
- package/esm/table/HeaderCell.js.map +1 -1
- package/esm/tabs/Tab.d.ts +1 -1
- package/esm/tabs/TabList.js +3 -2
- package/esm/tabs/TabList.js.map +1 -1
- package/esm/tabs/Tabs.d.ts +1 -1
- package/esm/tag/Tag.d.ts +4 -0
- package/esm/tag/Tag.js +4 -2
- package/esm/tag/Tag.js.map +1 -1
- package/esm/timeline/Pin.js +3 -3
- package/esm/timeline/Pin.js.map +1 -1
- package/esm/timeline/period/ClickablePeriod.js +3 -3
- package/esm/timeline/period/ClickablePeriod.js.map +1 -1
- package/esm/toggle-group/ToggleGroup.js +1 -1
- package/esm/toggle-group/ToggleGroup.js.map +1 -1
- package/esm/tooltip/Tooltip.js +6 -5
- 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/ErrorMessage.d.ts +1 -1
- package/esm/typography/Heading.d.ts +1 -1
- package/esm/typography/Ingress.d.ts +1 -1
- package/esm/typography/Label.d.ts +1 -1
- package/esm/util/Slot.js +1 -1
- package/esm/util/Slot.js.map +1 -1
- package/esm/util/TextareaAutoSize.js +5 -3
- package/esm/util/TextareaAutoSize.js.map +1 -1
- package/esm/util/composeEventHandlers.d.ts +8 -0
- package/esm/util/composeEventHandlers.js +14 -0
- package/esm/util/composeEventHandlers.js.map +1 -0
- package/esm/util/hooks/index.d.ts +8 -0
- package/esm/util/hooks/index.js +9 -0
- package/esm/util/hooks/index.js.map +1 -0
- package/esm/util/hooks/useClientLayoutEffect.js +5 -0
- package/esm/util/hooks/useClientLayoutEffect.js.map +1 -0
- package/esm/util/{useEventListener.d.ts → hooks/useEventListener.d.ts} +1 -1
- package/esm/util/hooks/useEventListener.js.map +1 -0
- package/esm/util/hooks/useId.js.map +1 -0
- package/esm/util/hooks/useMedia.js.map +1 -0
- package/esm/util/hooks/useMergeRefs.d.ts +15 -0
- package/esm/util/hooks/useMergeRefs.js +30 -0
- package/esm/util/hooks/useMergeRefs.js.map +1 -0
- package/esm/util/hooks/usePrevious.d.ts +1 -0
- package/esm/util/{usePrevious.js → hooks/usePrevious.js} +1 -2
- package/esm/util/hooks/usePrevious.js.map +1 -0
- package/esm/util/index.d.ts +4 -5
- package/esm/util/index.js +3 -5
- package/esm/util/index.js.map +1 -1
- package/esm/util/types/OverridableComponent.js.map +1 -0
- package/esm/util/types/index.d.ts +1 -0
- package/esm/util/types/index.js +2 -0
- package/esm/util/types/index.js.map +1 -0
- package/package.json +3 -3
- package/src/accordion/AccordionHeader.tsx +2 -4
- package/src/accordion/AccordionItem.tsx +2 -2
- package/src/alert/alert.stories.tsx +1 -2
- package/src/button/Button.tsx +14 -19
- package/src/chips/Chips.tsx +1 -1
- package/src/chips/Removable.tsx +3 -4
- package/src/chips/Toggle.tsx +1 -1
- package/src/copybutton/CopyButton.tsx +4 -5
- package/src/copybutton/copy-button.stories.tsx +1 -1
- package/src/date/datepicker/DatePicker.tsx +5 -3
- package/src/date/datepicker/parts/WeekRow.tsx +1 -1
- package/src/date/monthpicker/MonthPicker.tsx +4 -3
- package/src/date/parts/DateWrapper.tsx +1 -1
- package/src/dropdown/Menu/GroupedList/GroupedItem.tsx +23 -23
- package/src/dropdown/Menu/GroupedList/index.tsx +1 -1
- package/src/dropdown/Menu/List/Item.tsx +23 -23
- package/src/dropdown/Menu/List/index.tsx +1 -1
- package/src/dropdown/Toggle.tsx +10 -6
- package/src/expansion-card/ExpansionCard.tsx +1 -1
- package/src/expansion-card/ExpansionCardTitle.tsx +1 -1
- package/src/form/ConfirmationPanel.tsx +1 -1
- package/src/form/Textarea.tsx +2 -1
- package/src/form/checkbox/Checkbox.tsx +2 -1
- package/src/form/combobox/Combobox.tsx +3 -6
- package/src/form/combobox/FilteredOptions/filteredOptionsContext.tsx +1 -2
- package/src/form/combobox/Input/inputContext.tsx +1 -1
- package/src/form/combobox/SelectedOptions/selectedOptionsContext.tsx +1 -1
- package/src/form/combobox/combobox.stories.tsx +10 -11
- package/src/form/error-summary/ErrorSummary.tsx +1 -1
- package/src/form/error-summary/ErrorSummaryItem.tsx +1 -1
- package/src/form/radio/Radio.tsx +2 -1
- package/src/form/radio/RadioGroup.tsx +1 -1
- package/src/form/search/Search.tsx +3 -3
- package/src/form/search/SearchButton.tsx +2 -4
- package/src/form/useFormField.ts +1 -1
- package/src/guide-panel/Illustration.tsx +1 -1
- package/src/help-text/HelpText.tsx +7 -25
- package/src/help-text/HelpTextIcon.tsx +1 -1
- package/src/help-text/help-text.stories.tsx +58 -68
- package/src/internal-header/InternalHeader.tsx +1 -1
- package/src/internal-header/InternalHeaderButton.tsx +1 -1
- package/src/internal-header/InternalHeaderTitle.tsx +1 -1
- package/src/internal-header/InternalHeaderUserButton.tsx +1 -1
- package/src/layout/box/Box.tsx +1 -1
- package/src/layout/page/parts/PageBlock.tsx +1 -1
- package/src/layout/stack/HStack.tsx +1 -1
- package/src/layout/stack/Stack.tsx +1 -1
- package/src/layout/stack/VStack.tsx +1 -1
- package/src/link/Link.tsx +1 -1
- package/src/link/{link.stories.tsx → stories/link.stories.tsx} +2 -2
- package/src/link-panel/LinkPanel.tsx +1 -1
- package/src/link-panel/LinkPanelTitle.tsx +1 -1
- package/src/list/List.tsx +1 -1
- package/src/loader/Loader.tsx +2 -1
- package/src/modal/Modal.tsx +30 -30
- package/src/modal/types.ts +1 -1
- package/src/pagination/PaginationItem.tsx +1 -1
- package/src/panel/Panel.tsx +1 -1
- package/src/popover/Popover.tsx +4 -7
- package/src/read-more/ReadMore.tsx +2 -4
- package/src/stepper/Step.tsx +8 -5
- package/src/table/DataCell.tsx +6 -1
- package/src/table/ExpandableRow.tsx +11 -6
- package/src/table/HeaderCell.tsx +6 -1
- package/src/table/stories/table.stories.tsx +43 -29
- package/src/table/stories/tests/table.stories.tsx +2 -3
- package/src/tabs/Tab.tsx +1 -1
- package/src/tabs/TabList.tsx +4 -2
- package/src/tabs/Tabs.tsx +1 -1
- package/src/tag/Tag.tsx +9 -2
- package/src/tag/tag.stories.tsx +27 -1
- package/src/timeline/Pin.tsx +3 -6
- package/src/timeline/period/ClickablePeriod.tsx +3 -6
- package/src/toggle-group/ToggleGroup.tsx +1 -1
- package/src/tooltip/Tooltip.tsx +11 -22
- package/src/typography/BodyLong.tsx +1 -1
- package/src/typography/BodyShort.tsx +1 -1
- package/src/typography/Detail.tsx +1 -1
- package/src/typography/ErrorMessage.tsx +1 -1
- package/src/typography/Heading.tsx +1 -1
- package/src/typography/Ingress.tsx +1 -1
- package/src/typography/Label.tsx +1 -1
- package/src/typography/stories/bodylong.stories.tsx +1 -2
- package/src/typography/stories/bodyshort.stories.tsx +1 -2
- package/src/typography/stories/detail.stories.tsx +1 -2
- package/src/typography/stories/error-message.stories.tsx +1 -2
- package/src/typography/stories/heading.stories.tsx +1 -2
- package/src/typography/stories/ingress.stories.tsx +1 -2
- package/src/typography/stories/label.stories.tsx +1 -2
- package/src/util/Slot.tsx +1 -1
- package/src/util/TextareaAutoSize.tsx +7 -3
- package/src/util/__tests__/useMedia.test.tsx +1 -1
- package/src/util/composeEventHandlers.ts +19 -0
- package/src/util/hooks/index.ts +8 -0
- package/src/util/hooks/useCallbackRef.ts +1 -1
- package/src/util/hooks/useClientLayoutEffect.ts +5 -0
- package/src/util/hooks/useControllableState.ts +1 -1
- package/src/util/hooks/useMergeRefs.ts +32 -0
- package/src/util/{usePrevious.ts → hooks/usePrevious.ts} +1 -4
- package/src/util/index.ts +4 -5
- package/src/util/types/index.ts +1 -0
- package/cjs/util/RandomIcon.js +0 -38
- package/cjs/util/mergeRefs.js +0 -16
- package/cjs/util/useClientLayoutEffect.js +0 -10
- package/esm/util/AnimateHeight.js.map +0 -1
- package/esm/util/OverridableComponent.js.map +0 -1
- package/esm/util/RandomIcon.d.ts +0 -2
- package/esm/util/RandomIcon.js +0 -9
- package/esm/util/RandomIcon.js.map +0 -1
- package/esm/util/mergeRefs.d.ts +0 -2
- package/esm/util/mergeRefs.js +0 -14
- package/esm/util/mergeRefs.js.map +0 -1
- package/esm/util/useClientLayoutEffect.js +0 -8
- package/esm/util/useClientLayoutEffect.js.map +0 -1
- package/esm/util/useEventListener.js.map +0 -1
- package/esm/util/useId.js.map +0 -1
- package/esm/util/useMedia.js.map +0 -1
- package/esm/util/usePrevious.d.ts +0 -2
- package/esm/util/usePrevious.js.map +0 -1
- package/src/util/mergeRefs.tsx +0 -16
- package/src/util/useClientLayoutEffect.ts +0 -11
- /package/cjs/{util → table}/AnimateHeight.js +0 -0
- /package/cjs/util/{useEventListener.js → hooks/useEventListener.js} +0 -0
- /package/cjs/util/{useId.js → hooks/useId.js} +0 -0
- /package/cjs/util/{useMedia.js → hooks/useMedia.js} +0 -0
- /package/cjs/util/{OverridableComponent.js → types/OverridableComponent.js} +0 -0
- /package/esm/{util → table}/AnimateHeight.d.ts +0 -0
- /package/esm/{util → table}/AnimateHeight.js +0 -0
- /package/esm/util/{useClientLayoutEffect.d.ts → hooks/useClientLayoutEffect.d.ts} +0 -0
- /package/esm/util/{useEventListener.js → hooks/useEventListener.js} +0 -0
- /package/esm/util/{useId.d.ts → hooks/useId.d.ts} +0 -0
- /package/esm/util/{useId.js → hooks/useId.js} +0 -0
- /package/esm/util/{useMedia.d.ts → hooks/useMedia.d.ts} +0 -0
- /package/esm/util/{useMedia.js → hooks/useMedia.js} +0 -0
- /package/esm/util/{OverridableComponent.d.ts → types/OverridableComponent.d.ts} +0 -0
- /package/esm/util/{OverridableComponent.js → types/OverridableComponent.js} +0 -0
- /package/src/{util → link/stories}/RandomIcon.tsx +0 -0
- /package/src/{util → table}/AnimateHeight.tsx +0 -0
- /package/src/util/{useEventListener.ts → hooks/useEventListener.ts} +0 -0
- /package/src/util/{useId.ts → hooks/useId.ts} +0 -0
- /package/src/util/{useMedia.ts → hooks/useMedia.ts} +0 -0
- /package/src/util/{OverridableComponent.ts → types/OverridableComponent.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
|
-
import React, { forwardRef,
|
|
2
|
+
import React, { forwardRef, useRef } from "react";
|
|
3
3
|
import { BodyShort, ErrorMessage, Label } from "../../typography";
|
|
4
|
-
import {
|
|
4
|
+
import { useMergeRefs } from "../../util/hooks/useMergeRefs";
|
|
5
5
|
import ClearButton from "./ClearButton";
|
|
6
6
|
import ComboboxWrapper from "./ComboboxWrapper";
|
|
7
7
|
import FilteredOptions from "./FilteredOptions/FilteredOptions";
|
|
@@ -50,10 +50,7 @@ export const Combobox = forwardRef<
|
|
|
50
50
|
size = "medium",
|
|
51
51
|
} = useInputContext();
|
|
52
52
|
|
|
53
|
-
const mergedInputRef =
|
|
54
|
-
() => mergeRefs([inputRef, ref]),
|
|
55
|
-
[inputRef, ref],
|
|
56
|
-
);
|
|
53
|
+
const mergedInputRef = useMergeRefs(inputRef, ref);
|
|
57
54
|
|
|
58
55
|
return (
|
|
59
56
|
<ComboboxWrapper
|
|
@@ -7,8 +7,7 @@ import React, {
|
|
|
7
7
|
useMemo,
|
|
8
8
|
useState,
|
|
9
9
|
} from "react";
|
|
10
|
-
import { useClientLayoutEffect } from "../../../util";
|
|
11
|
-
import usePrevious from "../../../util/usePrevious";
|
|
10
|
+
import { useClientLayoutEffect, usePrevious } from "../../../util/hooks";
|
|
12
11
|
import { useInputContext } from "../Input/inputContext";
|
|
13
12
|
import { useCustomOptionsContext } from "../customOptionsContext";
|
|
14
13
|
import { ComboboxProps } from "../types";
|
|
@@ -8,7 +8,7 @@ import React, {
|
|
|
8
8
|
useRef,
|
|
9
9
|
useState,
|
|
10
10
|
} from "react";
|
|
11
|
-
import { useClientLayoutEffect } from "../../../util";
|
|
11
|
+
import { useClientLayoutEffect } from "../../../util/hooks";
|
|
12
12
|
import { FormFieldType, useFormField } from "../../useFormField";
|
|
13
13
|
|
|
14
14
|
interface InputContextType extends FormFieldType {
|
|
@@ -5,7 +5,7 @@ import React, {
|
|
|
5
5
|
useMemo,
|
|
6
6
|
useState,
|
|
7
7
|
} from "react";
|
|
8
|
-
import usePrevious from "../../../util/
|
|
8
|
+
import { usePrevious } from "../../../util/hooks";
|
|
9
9
|
import { useInputContext } from "../Input/inputContext";
|
|
10
10
|
import { useCustomOptionsContext } from "../customOptionsContext";
|
|
11
11
|
import { ComboboxProps } from "../types";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { expect, jest } from "@storybook/jest";
|
|
2
1
|
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
3
|
-
import { userEvent, within } from "@storybook/
|
|
2
|
+
import { expect, fn, userEvent, within } from "@storybook/test";
|
|
4
3
|
import React, { useId, useMemo, useState } from "react";
|
|
5
4
|
import { Chips, ComboboxProps, TextField, UNSAFE_Combobox } from "../../index";
|
|
6
5
|
|
|
@@ -427,14 +426,14 @@ export const AddWhenAddNewDisabledTest: StoryObject = {
|
|
|
427
426
|
};
|
|
428
427
|
|
|
429
428
|
export const TestThatCallbacksOnlyFireWhenExpected: StoryObj<{
|
|
430
|
-
onChange: ReturnType<typeof
|
|
431
|
-
onClear: ReturnType<typeof
|
|
432
|
-
onToggleSelected: ReturnType<typeof
|
|
429
|
+
onChange: ReturnType<typeof fn>;
|
|
430
|
+
onClear: ReturnType<typeof fn>;
|
|
431
|
+
onToggleSelected: ReturnType<typeof fn>;
|
|
433
432
|
}> = {
|
|
434
433
|
args: {
|
|
435
|
-
onChange:
|
|
436
|
-
onClear:
|
|
437
|
-
onToggleSelected:
|
|
434
|
+
onChange: fn(),
|
|
435
|
+
onClear: fn(),
|
|
436
|
+
onToggleSelected: fn(),
|
|
438
437
|
},
|
|
439
438
|
render: (props) => {
|
|
440
439
|
return (
|
|
@@ -469,9 +468,9 @@ export const TestThatCallbacksOnlyFireWhenExpected: StoryObj<{
|
|
|
469
468
|
|
|
470
469
|
export const TestCasingWhenAutoCompleting = {
|
|
471
470
|
args: {
|
|
472
|
-
onChange:
|
|
473
|
-
onClear:
|
|
474
|
-
onToggleSelected:
|
|
471
|
+
onChange: fn(),
|
|
472
|
+
onClear: fn(),
|
|
473
|
+
onToggleSelected: fn(),
|
|
475
474
|
},
|
|
476
475
|
render: (props) => {
|
|
477
476
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { HTMLAttributes, forwardRef, isValidElement } from "react";
|
|
3
3
|
import { BodyShort, Heading } from "../../typography";
|
|
4
|
-
import { useId } from "../../util";
|
|
4
|
+
import { useId } from "../../util/hooks";
|
|
5
5
|
import ErrorSummaryItem, { ErrorSummaryItemType } from "./ErrorSummaryItem";
|
|
6
6
|
|
|
7
7
|
export interface ErrorSummaryProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../../util";
|
|
3
|
+
import { OverridableComponent } from "../../util/types";
|
|
4
4
|
|
|
5
5
|
export interface ErrorSummaryItemProps
|
|
6
6
|
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
package/src/form/radio/Radio.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
3
|
import { BodyShort } from "../../typography";
|
|
4
|
-
import { omit
|
|
4
|
+
import { omit } from "../../util";
|
|
5
|
+
import { useId } from "../../util/hooks";
|
|
5
6
|
import { RadioProps } from "./types";
|
|
6
7
|
import { useRadio } from "./useRadio";
|
|
7
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef, useContext } from "react";
|
|
3
|
-
import { useId } from "../../util";
|
|
3
|
+
import { useId } from "../../util/hooks";
|
|
4
4
|
import { Fieldset, FieldsetContext, FieldsetProps } from "../Fieldset";
|
|
5
5
|
|
|
6
6
|
export interface RadioGroupContextProps {
|
|
@@ -3,13 +3,13 @@ import React, {
|
|
|
3
3
|
InputHTMLAttributes,
|
|
4
4
|
forwardRef,
|
|
5
5
|
useCallback,
|
|
6
|
-
useMemo,
|
|
7
6
|
useRef,
|
|
8
7
|
useState,
|
|
9
8
|
} from "react";
|
|
10
9
|
import { MagnifyingGlassIcon, XMarkIcon } from "@navikt/aksel-icons";
|
|
11
10
|
import { BodyShort, ErrorMessage, Label } from "../../typography";
|
|
12
|
-
import {
|
|
11
|
+
import { omit } from "../../util";
|
|
12
|
+
import { useMergeRefs } from "../../util/hooks/useMergeRefs";
|
|
13
13
|
import { FormFieldProps, useFormField } from "../useFormField";
|
|
14
14
|
import SearchButton, { SearchButtonType } from "./SearchButton";
|
|
15
15
|
import { SearchContext } from "./context";
|
|
@@ -118,7 +118,7 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
|
|
|
118
118
|
} = props;
|
|
119
119
|
|
|
120
120
|
const searchRef = useRef<HTMLInputElement | null>(null);
|
|
121
|
-
const mergedRef =
|
|
121
|
+
const mergedRef = useMergeRefs(searchRef, ref);
|
|
122
122
|
|
|
123
123
|
const [internalValue, setInternalValue] = useState(defaultValue ?? "");
|
|
124
124
|
|
|
@@ -2,6 +2,7 @@ import cl from "clsx";
|
|
|
2
2
|
import React, { forwardRef, useContext } from "react";
|
|
3
3
|
import { MagnifyingGlassIcon } from "@navikt/aksel-icons";
|
|
4
4
|
import { Button, ButtonProps } from "../../button";
|
|
5
|
+
import { composeEventHandlers } from "../../util/composeEventHandlers";
|
|
5
6
|
import { SearchContext } from "./context";
|
|
6
7
|
|
|
7
8
|
export interface SearchButtonProps
|
|
@@ -36,10 +37,7 @@ const SearchButton: SearchButtonType = forwardRef(
|
|
|
36
37
|
variant={variant === "secondary" ? "secondary" : "primary"}
|
|
37
38
|
className={cl("navds-search__button-search", className)}
|
|
38
39
|
disabled={context?.disabled ?? disabled}
|
|
39
|
-
onClick={(
|
|
40
|
-
handleClick();
|
|
41
|
-
onClick?.(e);
|
|
42
|
-
}}
|
|
40
|
+
onClick={composeEventHandlers(onClick, handleClick)}
|
|
43
41
|
icon={
|
|
44
42
|
<MagnifyingGlassIcon
|
|
45
43
|
{...(children ? { "aria-hidden": true } : { title: "Søk" })}
|
package/src/form/useFormField.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
|
-
import React, { forwardRef,
|
|
2
|
+
import React, { forwardRef, useRef, useState } from "react";
|
|
3
3
|
import { Popover, PopoverProps } from "../popover";
|
|
4
|
-
import {
|
|
4
|
+
import { composeEventHandlers } from "../util/composeEventHandlers";
|
|
5
|
+
import { useMergeRefs } from "../util/hooks/useMergeRefs";
|
|
5
6
|
import { HelpTextIcon } from "./HelpTextIcon";
|
|
6
7
|
|
|
7
8
|
export interface HelpTextProps
|
|
@@ -13,23 +14,6 @@ export interface HelpTextProps
|
|
|
13
14
|
* @default "hjelp"
|
|
14
15
|
*/
|
|
15
16
|
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Default dialog-placement on open
|
|
18
|
-
* @default "top"
|
|
19
|
-
*/
|
|
20
|
-
placement?:
|
|
21
|
-
| "top"
|
|
22
|
-
| "bottom"
|
|
23
|
-
| "right"
|
|
24
|
-
| "left"
|
|
25
|
-
| "top-start"
|
|
26
|
-
| "top-end"
|
|
27
|
-
| "bottom-start"
|
|
28
|
-
| "bottom-end"
|
|
29
|
-
| "right-start"
|
|
30
|
-
| "right-end"
|
|
31
|
-
| "left-start"
|
|
32
|
-
| "left-end";
|
|
33
17
|
/**
|
|
34
18
|
* Classname for wrapper
|
|
35
19
|
*/
|
|
@@ -54,7 +38,7 @@ export const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(
|
|
|
54
38
|
{
|
|
55
39
|
className,
|
|
56
40
|
children,
|
|
57
|
-
placement
|
|
41
|
+
placement,
|
|
58
42
|
strategy = "absolute",
|
|
59
43
|
title = "hjelp",
|
|
60
44
|
onClick,
|
|
@@ -64,7 +48,8 @@ export const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(
|
|
|
64
48
|
ref,
|
|
65
49
|
) => {
|
|
66
50
|
const buttonRef = useRef<HTMLButtonElement | null>(null);
|
|
67
|
-
const mergedRef =
|
|
51
|
+
const mergedRef = useMergeRefs(buttonRef, ref);
|
|
52
|
+
|
|
68
53
|
const [open, setOpen] = useState(false);
|
|
69
54
|
|
|
70
55
|
return (
|
|
@@ -72,10 +57,7 @@ export const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(
|
|
|
72
57
|
<button
|
|
73
58
|
{...rest}
|
|
74
59
|
ref={mergedRef}
|
|
75
|
-
onClick={(
|
|
76
|
-
setOpen((x) => !x);
|
|
77
|
-
onClick?.(e);
|
|
78
|
-
}}
|
|
60
|
+
onClick={composeEventHandlers(onClick, () => setOpen((x) => x))}
|
|
79
61
|
className={cl(className, "navds-help-text__button")}
|
|
80
62
|
type="button"
|
|
81
63
|
aria-expanded={open}
|
|
@@ -1,63 +1,57 @@
|
|
|
1
|
+
import { Meta, StoryFn, StoryObj } from "@storybook/react";
|
|
1
2
|
import React, { useEffect, useRef } from "react";
|
|
2
3
|
import { BodyLong, Heading, HelpText } from "..";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const meta: Meta<typeof HelpText> = {
|
|
5
6
|
title: "ds-react/HelpText",
|
|
6
7
|
component: HelpText,
|
|
7
8
|
parameters: {
|
|
8
9
|
chromatic: { delay: 300 },
|
|
9
10
|
},
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
export const Default: StoryObj<typeof HelpText> = {
|
|
15
|
+
render: (props) => (
|
|
16
|
+
<HelpText {...props}>Id ullamco excepteur elit fugiat labore.</HelpText>
|
|
17
|
+
),
|
|
18
|
+
|
|
19
|
+
args: {
|
|
20
|
+
title: "Show tooltip",
|
|
21
|
+
},
|
|
10
22
|
argTypes: {
|
|
11
23
|
placement: {
|
|
12
|
-
control: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
],
|
|
28
|
-
},
|
|
24
|
+
control: { type: "radio" },
|
|
25
|
+
options: [
|
|
26
|
+
"top",
|
|
27
|
+
"bottom",
|
|
28
|
+
"right",
|
|
29
|
+
"left",
|
|
30
|
+
"top-start",
|
|
31
|
+
"top-end",
|
|
32
|
+
"bottom-start",
|
|
33
|
+
"bottom-end",
|
|
34
|
+
"right-start",
|
|
35
|
+
"right-end",
|
|
36
|
+
"left-start",
|
|
37
|
+
"left-end",
|
|
38
|
+
],
|
|
29
39
|
},
|
|
30
40
|
strategy: {
|
|
31
|
-
control: {
|
|
32
|
-
|
|
33
|
-
options: ["fixed", "absolute"],
|
|
34
|
-
},
|
|
41
|
+
control: { type: "radio" },
|
|
42
|
+
options: ["fixed", "absolute"],
|
|
35
43
|
},
|
|
36
44
|
},
|
|
37
45
|
};
|
|
38
46
|
|
|
39
|
-
export const
|
|
40
|
-
render: (props: any) => {
|
|
41
|
-
return (
|
|
42
|
-
<HelpText title="show tooltip" strategy="fixed" {...props}>
|
|
43
|
-
Id ullamco excepteur elit fugiat labore.
|
|
44
|
-
</HelpText>
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
args: {
|
|
49
|
-
title: "show tooltip",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const Open = () => {
|
|
47
|
+
export const Open: StoryFn = () => {
|
|
54
48
|
const ref = useRef<HTMLButtonElement | null>(null);
|
|
55
49
|
useEffect(() => {
|
|
56
50
|
ref.current && ref.current.click();
|
|
57
51
|
}, []);
|
|
58
52
|
|
|
59
53
|
return (
|
|
60
|
-
<HelpText ref={ref} title="
|
|
54
|
+
<HelpText ref={ref} title="Show tooltip" strategy="fixed">
|
|
61
55
|
Incididunt laborum eiusmod ullamco id aliquip officia ex irure aliqua
|
|
62
56
|
laboris id ea do nisi. Ex esse ad duis culpa non aliquip exercitation eu
|
|
63
57
|
culpa cupidatat nisi. Deserunt voluptate consectetur cillum elit qui ad
|
|
@@ -66,35 +60,31 @@ export const Open = () => {
|
|
|
66
60
|
);
|
|
67
61
|
};
|
|
68
62
|
|
|
69
|
-
export const WrapperClassName =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
ab quam ea quas?
|
|
78
|
-
</BodyLong>
|
|
63
|
+
export const WrapperClassName: StoryFn = () => (
|
|
64
|
+
<div>
|
|
65
|
+
<BodyLong spacing>
|
|
66
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta
|
|
67
|
+
perspiciatis vero voluptatum, asperiores cumque, deserunt accusantium
|
|
68
|
+
ullam ipsa accusamus officia cupiditate quae unde esse culpa, ratione ab
|
|
69
|
+
quam ea quas?
|
|
70
|
+
</BodyLong>
|
|
79
71
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
<Heading level="2" size="medium">
|
|
73
|
+
67 år og 1 måneder øklasdjkl askdak døkasøk daøkdkølasøkld asølkdøka
|
|
74
|
+
<HelpText wrapperClassName="testClass">
|
|
75
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta
|
|
76
|
+
perspiciatis vero voluptatum, asperiores cumque, deserunt accusantium
|
|
77
|
+
ullam ipsa accusamus officia cupiditate quae unde esse culpa, ratione ab
|
|
78
|
+
quam ea quas?
|
|
79
|
+
</HelpText>
|
|
80
|
+
<style>{`.testClass {display: inline-block; margin-left: 0.5rem; vertical-align: middle;}`}</style>
|
|
81
|
+
</Heading>
|
|
90
82
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
};
|
|
83
|
+
<BodyLong spacing>
|
|
84
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Soluta
|
|
85
|
+
perspiciatis vero voluptatum, asperiores cumque, deserunt accusantium
|
|
86
|
+
ullam ipsa accusamus officia cupiditate quae unde esse culpa, ratione ab
|
|
87
|
+
quam ea quas?
|
|
88
|
+
</BodyLong>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { HTMLAttributes, forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../util/
|
|
3
|
+
import { OverridableComponent } from "../util/types";
|
|
4
4
|
import InternalHeaderButton, {
|
|
5
5
|
InternalHeaderButtonProps,
|
|
6
6
|
} from "./InternalHeaderButton";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../util/
|
|
3
|
+
import { OverridableComponent } from "../util/types";
|
|
4
4
|
|
|
5
5
|
export interface InternalHeaderButtonProps
|
|
6
6
|
extends React.AnchorHTMLAttributes<HTMLButtonElement> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../util/
|
|
3
|
+
import { OverridableComponent } from "../util/types";
|
|
4
4
|
|
|
5
5
|
export interface InternalHeaderTitleProps
|
|
6
6
|
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -2,7 +2,7 @@ import cl from "clsx";
|
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
3
|
import { ChevronDownIcon } from "@navikt/aksel-icons";
|
|
4
4
|
import { BodyShort, Detail } from "../typography";
|
|
5
|
-
import { OverridableComponent } from "../util/
|
|
5
|
+
import { OverridableComponent } from "../util/types";
|
|
6
6
|
import InternalHeaderButton from "./InternalHeaderButton";
|
|
7
7
|
|
|
8
8
|
export interface InternalHeaderUserButtonProps
|
package/src/layout/box/Box.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../../util/
|
|
3
|
+
import { OverridableComponent } from "../../util/types";
|
|
4
4
|
import { getResponsiveProps } from "../utilities/css";
|
|
5
5
|
import {
|
|
6
6
|
BackgroundToken,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../../../util/
|
|
3
|
+
import { OverridableComponent } from "../../../util/types";
|
|
4
4
|
|
|
5
5
|
export const widths = ["text", "md", "lg", "xl", "2xl"] as const;
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
|
-
import { OverridableComponent } from "../../util/
|
|
2
|
+
import { OverridableComponent } from "../../util/types";
|
|
3
3
|
import { Stack, StackProps } from "./Stack";
|
|
4
4
|
|
|
5
5
|
export type HStackProps = Omit<StackProps, "direction">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { HTMLAttributes, forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../../util/
|
|
3
|
+
import { OverridableComponent } from "../../util/types";
|
|
4
4
|
import { getResponsiveProps, getResponsiveValue } from "../utilities/css";
|
|
5
5
|
import { ResponsiveProp, SpacingScale } from "../utilities/types";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
|
-
import { OverridableComponent } from "../../util/
|
|
2
|
+
import { OverridableComponent } from "../../util/types";
|
|
3
3
|
import { Stack, StackProps } from "./Stack";
|
|
4
4
|
|
|
5
5
|
export type VStackProps = Omit<StackProps, "direction" | "wrap">;
|
package/src/link/Link.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../util/
|
|
3
|
+
import { OverridableComponent } from "../util/types";
|
|
4
4
|
|
|
5
5
|
export interface LinkProps
|
|
6
6
|
extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
@@ -2,7 +2,7 @@ import cl from "clsx";
|
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
3
|
import { ChevronRightIcon } from "@navikt/aksel-icons";
|
|
4
4
|
import { Panel } from "../panel";
|
|
5
|
-
import { OverridableComponent } from "../util";
|
|
5
|
+
import { OverridableComponent } from "../util/types";
|
|
6
6
|
import {
|
|
7
7
|
LinkPanelDescription,
|
|
8
8
|
LinkPanelDescriptionProps,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
import { OverridableComponent } from "../util/
|
|
3
|
+
import { OverridableComponent } from "../util/types";
|
|
4
4
|
|
|
5
5
|
export interface LinkPanelTitleProps
|
|
6
6
|
extends React.HTMLAttributes<HTMLDivElement> {
|
package/src/list/List.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { forwardRef, useContext } from "react";
|
|
3
3
|
import { BodyShort, Heading } from "../typography";
|
|
4
|
-
import { useId } from "../util/
|
|
4
|
+
import { useId } from "../util/hooks";
|
|
5
5
|
import { ListItem } from "./ListItem";
|
|
6
6
|
import { ListContext } from "./context";
|
|
7
7
|
import { ListProps } from "./types";
|
package/src/loader/Loader.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import cl from "clsx";
|
|
2
2
|
import React, { SVGProps, forwardRef } from "react";
|
|
3
|
-
import { omit
|
|
3
|
+
import { omit } from "../util";
|
|
4
|
+
import { useId } from "../util/hooks";
|
|
4
5
|
|
|
5
6
|
export interface LoaderProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
|
|
6
7
|
/**
|