@norges-domstoler/dds-components 5.4.0 → 5.5.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/README.md +8 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +3 -3
- package/dist/cjs/components/Button/Button.d.ts +3 -3
- package/dist/cjs/components/Button/Button.stories.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.d.ts +3 -3
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.d.ts +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/cjs/components/Chip/Chip.d.ts +3 -3
- package/dist/cjs/components/Chip/Chip.stories.d.ts +3 -3
- package/dist/cjs/components/Datepicker/Datepicker.d.ts +10 -8
- package/dist/cjs/components/Datepicker/Datepicker.stories.d.ts +3 -6
- package/dist/cjs/components/DescriptionList/DescriptionList.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionList.stories.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionListDesc.d.ts +3 -3
- package/dist/cjs/components/DescriptionList/DescriptionListGroup.d.ts +3 -3
- package/dist/cjs/components/Divider/Divider.d.ts +3 -3
- package/dist/cjs/components/Divider/Divider.stories.d.ts +3 -3
- package/dist/cjs/components/Drawer/Drawer.d.ts +3 -3
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +3 -3
- package/dist/cjs/components/GlobalMessage/GlobalMessage.d.ts +3 -3
- package/dist/cjs/components/GlobalMessage/GlobalMessage.stories.d.ts +3 -3
- package/dist/cjs/components/InputMessage/InputMessage.d.ts +3 -3
- package/dist/cjs/components/InputMessage/InputMessage.stories.d.ts +3 -3
- package/dist/cjs/components/InternalHeader/InternalHeader.stories.d.ts +10 -5
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +3 -3
- package/dist/cjs/components/InternalHeader/InternalHeader.types.d.ts +2 -0
- package/dist/cjs/components/List/List.d.ts +3 -3
- package/dist/cjs/components/List/List.stories.d.ts +3 -3
- package/dist/cjs/components/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +3 -3
- package/dist/cjs/components/Modal/Modal.d.ts +3 -3
- package/dist/cjs/components/Modal/Modal.stories.d.ts +3 -3
- package/dist/cjs/components/Modal/ModalBody.d.ts +3 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +3 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +3 -3
- package/dist/cjs/components/Pagination/Pagination.d.ts +3 -3
- package/dist/cjs/components/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/cjs/components/Popover/Popover.d.ts +3 -3
- package/dist/cjs/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/cjs/components/RadioButton/RadioButton.d.ts +3 -3
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/cjs/components/Select/Select.styles.d.ts +1 -0
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +3 -3
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +3 -3
- package/dist/cjs/components/Spinner/Spinner.d.ts +1 -1
- package/dist/cjs/components/Stepper/Stepper.d.ts +3 -3
- package/dist/cjs/components/Stepper/Stepper.stories.d.ts +3 -3
- package/dist/cjs/components/Tabs/Tab.d.ts +3 -3
- package/dist/cjs/components/Tabs/TabPanel.d.ts +3 -3
- package/dist/cjs/components/Tabs/Tabs.d.ts +3 -3
- package/dist/cjs/components/Tag/Tag.d.ts +3 -3
- package/dist/cjs/components/Tag/Tag.stories.d.ts +3 -3
- package/dist/cjs/components/ToggleBar/ToggleRadio.d.ts +4 -4
- package/dist/cjs/components/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +3 -3
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +3 -3
- package/dist/cjs/components/Typography/Caption/Caption.d.ts +10 -0
- package/dist/cjs/components/Typography/Caption/Caption.stories.d.ts +28 -0
- package/dist/cjs/components/Typography/Caption/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Heading/Heading.d.ts +21 -0
- package/dist/cjs/components/Typography/Heading/Heading.stories.d.ts +37 -0
- package/dist/cjs/components/Typography/Heading/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Label/Label.d.ts +13 -0
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +30 -0
- package/dist/cjs/components/Typography/Label/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Legend/Legend.d.ts +10 -0
- package/dist/cjs/components/Typography/Legend/Legend.stories.d.ts +28 -0
- package/dist/cjs/components/Typography/Legend/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Link/Link.d.ts +23 -0
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +47 -0
- package/dist/cjs/components/Typography/Link/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Paragraph/Paragraph.d.ts +16 -0
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +35 -0
- package/dist/cjs/components/Typography/Paragraph/index.d.ts +1 -0
- package/dist/cjs/components/Typography/Typography/Typography.d.ts +25 -0
- package/dist/{components → cjs/components/Typography}/Typography/Typography.stories.d.ts +2 -1
- package/dist/cjs/components/Typography/Typography/Typography.types.d.ts +37 -0
- package/dist/cjs/components/Typography/Typography/index.d.ts +2 -0
- package/dist/cjs/components/Typography/Typography.tokens.d.ts +401 -100
- package/dist/cjs/components/Typography/Typography.utils.d.ts +9 -0
- package/dist/cjs/components/Typography/index.d.ts +6 -1
- package/dist/cjs/components/Typography/stories/Examples.stories.d.ts +5 -0
- package/dist/cjs/components/Typography/stories/TypographyComponents.stories.d.ts +42 -0
- package/dist/cjs/components/Typography/{Body.stories.d.ts → stories/TypographyTypes.stories.d.ts} +1 -1
- package/dist/cjs/index.js +791 -702
- package/dist/cjs/types/BaseComponentProps.d.ts +2 -2
- package/dist/cjs/utils/color.d.ts +24 -0
- package/dist/components/Breadcrumbs/Breadcrumb.js +2 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +3 -3
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.stories.d.ts +3 -3
- package/dist/components/Button/Button.styles.js +6 -3
- package/dist/components/Button/Button.tokens.js +6 -0
- package/dist/components/Card/Card.js +6 -2
- package/dist/components/Card/Card.tokens.js +5 -1
- package/dist/components/Card/CardAccordion/CardAccordion.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +3 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +11 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.js +10 -2
- package/dist/components/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.styles.js +5 -1
- package/dist/components/Checkbox/Checkbox.tokens.js +4 -1
- package/dist/components/Checkbox/CheckboxGroup.js +12 -4
- package/dist/components/Chip/Chip.d.ts +3 -3
- package/dist/components/Chip/Chip.js +2 -1
- package/dist/components/Chip/Chip.stories.d.ts +3 -3
- package/dist/components/Datepicker/Datepicker.d.ts +10 -8
- package/dist/components/Datepicker/Datepicker.js +44 -11
- package/dist/components/Datepicker/Datepicker.stories.d.ts +3 -6
- package/dist/components/DescriptionList/DescriptionList.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionList.js +7 -3
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionListDesc.d.ts +3 -3
- package/dist/components/DescriptionList/DescriptionListDesc.js +1 -1
- package/dist/components/DescriptionList/DescriptionListGroup.d.ts +3 -3
- package/dist/components/Divider/Divider.d.ts +3 -3
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/Divider.stories.d.ts +3 -3
- package/dist/components/Drawer/Drawer.d.ts +3 -3
- package/dist/components/Drawer/Drawer.js +25 -9
- package/dist/components/Drawer/Drawer.stories.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.js +5 -3
- package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +3 -3
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +4 -1
- package/dist/components/InputMessage/InputMessage.d.ts +3 -3
- package/dist/components/InputMessage/InputMessage.js +5 -3
- package/dist/components/InputMessage/InputMessage.stories.d.ts +3 -3
- package/dist/components/InternalHeader/InternalHeader.js +10 -7
- package/dist/components/InternalHeader/InternalHeader.stories.d.ts +10 -5
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +3 -3
- package/dist/components/InternalHeader/InternalHeader.styles.js +8 -2
- package/dist/components/InternalHeader/InternalHeader.types.d.ts +2 -0
- package/dist/components/InternalHeader/NavigationItem.js +5 -1
- package/dist/components/List/List.d.ts +3 -3
- package/dist/components/List/List.js +6 -2
- package/dist/components/List/List.stories.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.js +10 -4
- package/dist/components/LocalMessage/LocalMessage.stories.d.ts +3 -3
- package/dist/components/LocalMessage/LocalMessage.tokens.js +5 -2
- package/dist/components/Modal/Modal.d.ts +3 -3
- package/dist/components/Modal/Modal.js +23 -9
- package/dist/components/Modal/Modal.stories.d.ts +3 -3
- package/dist/components/Modal/Modal.tokens.js +5 -0
- package/dist/components/Modal/ModalBody.d.ts +3 -3
- package/dist/components/Modal/ModalBody.js +3 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +3 -3
- package/dist/components/OverflowMenu/OverflowMenu.js +17 -9
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +3 -3
- package/dist/components/OverflowMenu/OverflowMenuItem.js +8 -2
- package/dist/components/Pagination/Pagination.d.ts +3 -3
- package/dist/components/Pagination/Pagination.js +9 -7
- package/dist/components/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +12 -4
- package/dist/components/Popover/Popover.stories.d.ts +3 -3
- package/dist/components/Popover/PopoverGroup.js +3 -1
- package/dist/components/RadioButton/RadioButton.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.js +9 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +3 -3
- package/dist/components/RadioButton/RadioButton.styles.js +4 -0
- package/dist/components/RadioButton/RadioButton.tokens.js +4 -1
- package/dist/components/RadioButton/RadioButtonGroup.js +12 -4
- package/dist/components/ScrollableContainer/ScrollableContainer.js +5 -1
- package/dist/components/ScrollableContainer/Scrollbar.js +1 -3
- package/dist/components/Search/Search.js +12 -4
- package/dist/components/Select/Select.js +34 -19
- package/dist/components/Select/Select.styles.d.ts +1 -0
- package/dist/components/Select/Select.styles.js +27 -11
- package/dist/components/Select/Select.tokens.js +5 -0
- package/dist/components/SkipToContent/SkipToContent.d.ts +3 -3
- package/dist/components/SkipToContent/SkipToContent.js +4 -0
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +3 -3
- package/dist/components/SkipToContent/SkipToContent.tokens.js +5 -0
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Stepper/Step.js +6 -2
- package/dist/components/Stepper/Stepper.d.ts +3 -3
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/Stepper.stories.d.ts +3 -3
- package/dist/components/Table/Cell.tokens.js +5 -0
- package/dist/components/Table/Row.tokens.js +5 -0
- package/dist/components/Table/SortCell.js +10 -4
- package/dist/components/Table/Table.js +9 -3
- package/dist/components/Table/TableWrapper.js +2 -0
- package/dist/components/Tabs/Tab.d.ts +3 -3
- package/dist/components/Tabs/Tab.js +9 -3
- package/dist/components/Tabs/TabList.js +8 -4
- package/dist/components/Tabs/TabPanel.d.ts +3 -3
- package/dist/components/Tabs/TabPanel.js +5 -1
- package/dist/components/Tabs/TabPanels.js +3 -1
- package/dist/components/Tabs/Tabs.d.ts +3 -3
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.tokens.js +6 -1
- package/dist/components/Tag/Tag.d.ts +3 -3
- package/dist/components/Tag/Tag.js +2 -1
- package/dist/components/Tag/Tag.stories.d.ts +3 -3
- package/dist/components/TextInput/CharCounter.js +3 -2
- package/dist/components/TextInput/TextInput.js +9 -3
- package/dist/components/TextInput/TextInput.styles.js +9 -1
- package/dist/components/ToggleBar/ToggleBar.js +10 -4
- package/dist/components/ToggleBar/ToggleBar.tokens.js +1 -0
- package/dist/components/ToggleBar/ToggleRadio.d.ts +4 -4
- package/dist/components/ToggleBar/ToggleRadio.js +8 -2
- package/dist/components/ToggleBar/ToggleRadio.styles.js +11 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButton.js +14 -5
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +3 -3
- package/dist/components/ToggleButton/ToggleButton.tokens.js +6 -1
- package/dist/components/ToggleButton/ToggleButtonGroup.js +3 -2
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.js +6 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +3 -3
- package/dist/components/Tooltip/Tooltip.styles.js +7 -3
- package/dist/components/Typography/Caption/Caption.d.ts +10 -0
- package/dist/components/Typography/Caption/Caption.js +23 -0
- package/dist/components/Typography/Caption/Caption.stories.d.ts +28 -0
- package/dist/components/Typography/Caption/index.d.ts +1 -0
- package/dist/components/Typography/Heading/Heading.d.ts +21 -0
- package/dist/components/Typography/Heading/Heading.js +56 -0
- package/dist/components/Typography/Heading/Heading.stories.d.ts +37 -0
- package/dist/components/Typography/Heading/index.d.ts +1 -0
- package/dist/components/Typography/Label/Label.d.ts +13 -0
- package/dist/components/Typography/Label/Label.js +22 -0
- package/dist/components/Typography/Label/Label.stories.d.ts +30 -0
- package/dist/components/Typography/Label/index.d.ts +1 -0
- package/dist/components/Typography/Legend/Legend.d.ts +10 -0
- package/dist/components/Typography/Legend/Legend.js +23 -0
- package/dist/components/Typography/Legend/Legend.stories.d.ts +28 -0
- package/dist/components/Typography/Legend/index.d.ts +1 -0
- package/dist/components/Typography/Link/Link.d.ts +23 -0
- package/dist/components/Typography/Link/Link.js +45 -0
- package/dist/components/Typography/Link/Link.stories.d.ts +47 -0
- package/dist/components/Typography/Link/index.d.ts +1 -0
- package/dist/components/Typography/Paragraph/Paragraph.d.ts +16 -0
- package/dist/components/Typography/Paragraph/Paragraph.js +25 -0
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +35 -0
- package/dist/components/Typography/Paragraph/index.d.ts +1 -0
- package/dist/components/Typography/Typography/Typography.d.ts +25 -0
- package/dist/components/Typography/Typography/Typography.js +101 -0
- package/dist/{cjs/components → components/Typography}/Typography/Typography.stories.d.ts +2 -1
- package/dist/components/Typography/Typography/Typography.types.d.ts +37 -0
- package/dist/components/Typography/Typography/index.d.ts +2 -0
- package/dist/components/Typography/Typography.tokens.d.ts +401 -100
- package/dist/components/Typography/Typography.tokens.js +354 -482
- package/dist/components/Typography/Typography.utils.d.ts +9 -0
- package/dist/components/Typography/Typography.utils.js +75 -0
- package/dist/components/Typography/index.d.ts +6 -1
- package/dist/components/Typography/stories/Examples.stories.d.ts +5 -0
- package/dist/components/Typography/stories/TypographyComponents.stories.d.ts +42 -0
- package/dist/components/Typography/{Body.stories.d.ts → stories/TypographyTypes.stories.d.ts} +1 -1
- package/dist/helpers/Input/Input.styles.js +11 -3
- package/dist/helpers/Input/Input.tokens.js +4 -1
- package/dist/helpers/Paper/Paper.js +6 -2
- package/dist/hooks/useScreenSize.js +17 -0
- package/dist/index.js +7 -1
- package/dist/types/BaseComponentProps.d.ts +2 -2
- package/dist/utils/color.d.ts +24 -0
- package/dist/utils/color.js +31 -1
- package/package.json +3 -3
- package/dist/cjs/components/Typography/Examples.stories.d.ts +0 -7
- package/dist/cjs/components/Typography/Typography.d.ts +0 -49
- package/dist/cjs/components/Typography/Typography.types.d.ts +0 -13
- package/dist/components/Typography/Examples.stories.d.ts +0 -7
- package/dist/components/Typography/Typography.d.ts +0 -49
- package/dist/components/Typography/Typography.js +0 -172
- package/dist/components/Typography/Typography.types.d.ts +0 -13
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { TagProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").HTMLAttributes<HTMLSpanElement> | undefined;
|
|
6
|
-
} & Pick<import("react").HTMLAttributes<HTMLSpanElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLSpanElement>, "id" | "className"> & {
|
|
7
5
|
text?: string | undefined;
|
|
8
6
|
purpose?: import("./Tag").TagPurpose | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
htmlProps?: import("react").HTMLAttributes<HTMLSpanElement> | undefined;
|
|
9
9
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
10
10
|
argTypes: {
|
|
11
11
|
text: {
|
|
@@ -2,9 +2,10 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useId } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import { charCounterTokens } from './CharCounter.tokens.js';
|
|
6
|
-
import { Typography } from '../Typography/Typography.js';
|
|
7
5
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
6
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
7
|
+
import '../Typography/Link/Link.js';
|
|
8
|
+
import { charCounterTokens } from './CharCounter.tokens.js';
|
|
8
9
|
|
|
9
10
|
var Wrapper = styled(Typography).withConfig({
|
|
10
11
|
displayName: "CharCounter__Wrapper",
|
|
@@ -3,12 +3,18 @@ import { __rest } from 'tslib';
|
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { forwardRef, useRef, useState, useEffect, useId } from 'react';
|
|
5
5
|
import { textInputTokens } from './TextInput.tokens.js';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
7
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
8
|
+
import '../../helpers/HiddenInput/HiddenInput.js';
|
|
8
9
|
import { OuterInputContainer, InputContainer, StatefulInput } from '../../helpers/Input/Input.styles.js';
|
|
9
|
-
import
|
|
10
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
11
|
+
import '../../helpers/Paper/Paper.js';
|
|
10
12
|
import { RequiredMarker } from '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
11
13
|
import { InputMessage } from '../InputMessage/InputMessage.js';
|
|
14
|
+
import CharCounter from './CharCounter.js';
|
|
15
|
+
import { TextArea, Label, MessageContainer } from './TextInput.styles.js';
|
|
16
|
+
import { spaceSeparatedIdListGenerator, derivativeIdGenerator } from '../../utils/idGenerator.js';
|
|
17
|
+
import '../../utils/color.js';
|
|
12
18
|
|
|
13
19
|
var TextInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
14
20
|
var label = _a.label,
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
2
|
import { textInputTokens } from './TextInput.tokens.js';
|
|
3
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
6
|
+
import '../../helpers/HiddenInput/HiddenInput.js';
|
|
3
7
|
import { StatefulInput, Label as Label$1 } from '../../helpers/Input/Input.styles.js';
|
|
4
|
-
import { scrollbarStyling } from '../ScrollableContainer/scrollbarStyling.js';
|
|
5
8
|
import { inputTokens } from '../../helpers/Input/Input.tokens.js';
|
|
9
|
+
import '../../helpers/Paper/Paper.js';
|
|
10
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
11
|
+
import '../ScrollableContainer/Scrollbar.js';
|
|
12
|
+
import '../ScrollableContainer/ScrollableContainer.js';
|
|
13
|
+
import { scrollbarStyling } from '../ScrollableContainer/scrollbarStyling.js';
|
|
6
14
|
|
|
7
15
|
var TextArea = styled(StatefulInput).withConfig({
|
|
8
16
|
displayName: "TextInputstyles__TextArea",
|
|
@@ -3,12 +3,18 @@ import { __rest } from 'tslib';
|
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import { useId, useState } from 'react';
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import '../../helpers/styling/focusVisible.js';
|
|
7
|
+
import '../../helpers/styling/hover.js';
|
|
8
|
+
import '../../helpers/styling/focus.js';
|
|
9
|
+
import '../../helpers/styling/danger.js';
|
|
8
10
|
import { selection } from '../../helpers/styling/selection.js';
|
|
9
|
-
import { combineHandlers } from '../../utils/combineHandlers.js';
|
|
10
11
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
|
-
import {
|
|
12
|
+
import { combineHandlers } from '../../utils/combineHandlers.js';
|
|
13
|
+
import '../../utils/color.js';
|
|
14
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
15
|
+
import '../Typography/Link/Link.js';
|
|
16
|
+
import { ToggleBarContext } from './ToggleBar.context.js';
|
|
17
|
+
import { toggleBarTokens } from './ToggleBar.tokens.js';
|
|
12
18
|
|
|
13
19
|
var OuterContainer = styled.div.withConfig({
|
|
14
20
|
displayName: "ToggleBar__OuterContainer",
|
|
@@ -8,12 +8,12 @@ export declare type ToggleRadioProps = BaseComponentProps<HTMLInputElement, {
|
|
|
8
8
|
/**Ikonet som vises i komponenten. */
|
|
9
9
|
icon?: SvgIcon;
|
|
10
10
|
} & PickedInputHTMLAttributes, Omit<InputHTMLAttributes<HTMLInputElement>, keyof PickedInputHTMLAttributes>>;
|
|
11
|
-
export declare const ToggleRadio: import("react").ForwardRefExoticComponent<{
|
|
12
|
-
htmlProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "name" | "checked" | "value" | "onChange" | "aria-label" | "aria-labelledby"> | undefined;
|
|
13
|
-
} & Pick<Omit<InputHTMLAttributes<HTMLInputElement>, "name" | "checked" | "value" | "onChange" | "aria-label" | "aria-labelledby">, "className" | "id"> & {
|
|
11
|
+
export declare const ToggleRadio: import("react").ForwardRefExoticComponent<Pick<Omit<InputHTMLAttributes<HTMLInputElement>, "name" | "checked" | "value" | "onChange" | "aria-label" | "aria-labelledby">, "className" | "id"> & {
|
|
14
12
|
/**Ledetekst som vises i komponenten. */
|
|
15
13
|
label?: string | undefined;
|
|
16
14
|
/**Ikonet som vises i komponenten. */
|
|
17
15
|
icon?: SvgIcon | undefined;
|
|
18
|
-
} & PickedInputHTMLAttributes &
|
|
16
|
+
} & PickedInputHTMLAttributes & {
|
|
17
|
+
htmlProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "name" | "checked" | "value" | "onChange" | "aria-label" | "aria-labelledby"> | undefined;
|
|
18
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
19
|
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useId } from 'react';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
5
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
6
6
|
import { HiddenInput } from '../../helpers/HiddenInput/HiddenInput.js';
|
|
7
|
+
import '../../helpers/Input/Input.styles.js';
|
|
8
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
9
|
+
import '../../helpers/Paper/Paper.js';
|
|
10
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
7
11
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
8
12
|
import { Icon } from '../Icon/Icon.js';
|
|
13
|
+
import { useToggleBarContext } from './ToggleBar.context.js';
|
|
14
|
+
import { Label, Content } from './ToggleRadio.styles.js';
|
|
9
15
|
|
|
10
16
|
/**Beregner om en ToggleRadio skal være checked eller ikke.
|
|
11
17
|
*
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { toggleBarTokens } from './ToggleBar.tokens.js';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { focusVisibleTransitionValue, focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
|
+
import '../../helpers/styling/hover.js';
|
|
5
|
+
import '../../helpers/styling/focus.js';
|
|
6
|
+
import '../../helpers/styling/danger.js';
|
|
7
|
+
import '../../helpers/styling/selection.js';
|
|
8
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
4
11
|
import { HiddenInput } from '../../helpers/HiddenInput/HiddenInput.js';
|
|
12
|
+
import '../../helpers/Input/Input.styles.js';
|
|
13
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
14
|
+
import '../../helpers/Paper/Paper.js';
|
|
15
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
5
16
|
|
|
6
17
|
var content = toggleBarTokens.content,
|
|
7
18
|
label = toggleBarTokens.label;
|
|
@@ -7,11 +7,11 @@ export declare type ToggleButtonProps = BaseComponentProps<HTMLInputElement, {
|
|
|
7
7
|
/** Ikon. */
|
|
8
8
|
icon?: SvgIcon;
|
|
9
9
|
}, InputHTMLAttributes<HTMLInputElement>>;
|
|
10
|
-
export declare const ToggleButton: import("react").ForwardRefExoticComponent<{
|
|
11
|
-
htmlProps?: InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
12
|
-
} & Pick<InputHTMLAttributes<HTMLInputElement>, "className" | "id"> & {
|
|
10
|
+
export declare const ToggleButton: import("react").ForwardRefExoticComponent<Pick<InputHTMLAttributes<HTMLInputElement>, "className" | "id"> & {
|
|
13
11
|
/**Ledetekst for inputelementet. */
|
|
14
12
|
label?: string | undefined;
|
|
15
13
|
/** Ikon. */
|
|
16
14
|
icon?: SvgIcon | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
htmlProps?: InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
17
17
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -2,18 +2,27 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef, useId } from 'react';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
+
import { Icon } from '../Icon/Icon.js';
|
|
6
|
+
import { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
|
|
7
|
+
import '../../helpers/styling/hover.js';
|
|
8
|
+
import '../../helpers/styling/focus.js';
|
|
9
|
+
import '../../helpers/styling/danger.js';
|
|
10
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
5
11
|
import { buttonTokens } from '../Button/Button.tokens.js';
|
|
6
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
7
12
|
import { toggleButtonTokens } from './ToggleButton.tokens.js';
|
|
8
|
-
import { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
|
|
9
|
-
import { HiddenInput } from '../../helpers/HiddenInput/HiddenInput.js';
|
|
10
13
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
|
-
import
|
|
14
|
+
import '../../helpers/Backdrop/Backdrop.js';
|
|
15
|
+
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
16
|
+
import { HiddenInput } from '../../helpers/HiddenInput/HiddenInput.js';
|
|
17
|
+
import '../../helpers/Input/Input.styles.js';
|
|
18
|
+
import '../../helpers/Input/Input.tokens.js';
|
|
19
|
+
import '../../helpers/Paper/Paper.js';
|
|
20
|
+
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
12
21
|
|
|
13
22
|
var Content = styled.span.withConfig({
|
|
14
23
|
displayName: "ToggleButton__Content",
|
|
15
24
|
componentId: "sc-ya01sa-0"
|
|
16
|
-
})(["display:flex;align-items:center;width:100%;height:100%;box-sizing:border-box;@media (prefers-reduced-motion:no-preference){transition:border-color 0.2s,background-color 0.2s,box-shadow 0.2s;}", ";cursor:pointer;", " width:fit-content;", " ", " ", " &::selection,*::selection{", "}&:hover{", "}"], focusVisibleTransitionValue, buttonTokens.base, buttonTokens.appearance.rounded.base, buttonTokens.sizes.small.text.base, toggleButtonTokens.base,
|
|
25
|
+
})(["display:flex;align-items:center;width:100%;height:100%;box-sizing:border-box;@media (prefers-reduced-motion:no-preference){transition:border-color 0.2s,background-color 0.2s,box-shadow 0.2s;}", ";cursor:pointer;", " width:fit-content;", " ", " ", " &::selection,*::selection{", "}&:hover{", "}"], focusVisibleTransitionValue, buttonTokens.base, buttonTokens.appearance.rounded.base, buttonTokens.sizes.small.text.base, toggleButtonTokens.base, selection, toggleButtonTokens.hover.base);
|
|
17
26
|
var Container = styled.label.withConfig({
|
|
18
27
|
displayName: "ToggleButton__Container",
|
|
19
28
|
componentId: "sc-ya01sa-1"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ToggleButtonProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: import("react").InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
6
|
-
} & Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "id" | "className"> & {
|
|
7
5
|
label?: string | undefined;
|
|
8
6
|
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
htmlProps?: import("react").InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
9
9
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
10
|
argTypes: {
|
|
11
11
|
label: {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
import
|
|
2
|
+
import 'styled-components';
|
|
3
3
|
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
|
+
import '../../helpers/styling/hover.js';
|
|
5
|
+
import '../../helpers/styling/focus.js';
|
|
6
|
+
import '../../helpers/styling/danger.js';
|
|
7
|
+
import '../../helpers/styling/selection.js';
|
|
8
|
+
import { checkboxTokens } from '../Checkbox/Checkbox.tokens.js';
|
|
4
9
|
|
|
5
10
|
var Colors = ddsBaseTokens.colors,
|
|
6
11
|
Spacing = ddsBaseTokens.spacing;
|
|
@@ -2,9 +2,10 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useId } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import { toggleButtonTokens } from './ToggleButton.tokens.js';
|
|
6
5
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
7
|
-
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
import { Typography } from '../Typography/Typography/Typography.js';
|
|
7
|
+
import '../Typography/Link/Link.js';
|
|
8
|
+
import { toggleButtonTokens } from './ToggleButton.tokens.js';
|
|
8
9
|
|
|
9
10
|
var Group = styled.div.withConfig({
|
|
10
11
|
displayName: "ToggleButtonGroup__Group",
|
|
@@ -15,9 +15,7 @@ export declare type TooltipProps = BaseComponentProps<HTMLDivElement, {
|
|
|
15
15
|
/**`id` for tooltip. */
|
|
16
16
|
tooltipId?: string;
|
|
17
17
|
} & PickedHTMLAttributes, Omit<HTMLAttributes<HTMLDivElement>, 'children' | keyof PickedHTMLAttributes>>;
|
|
18
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<{
|
|
19
|
-
htmlProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children"> | undefined; /**`id` for tooltip. */
|
|
20
|
-
} & Pick<Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children">, "className" | "id"> & {
|
|
18
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children">, "className" | "id"> & {
|
|
21
19
|
/**Innhold i tooltip. */
|
|
22
20
|
text: string;
|
|
23
21
|
/**Plassering i forhold til anchor-elementet. */
|
|
@@ -28,5 +26,7 @@ export declare const Tooltip: React.ForwardRefExoticComponent<{
|
|
|
28
26
|
delay?: number | undefined;
|
|
29
27
|
/**`id` for tooltip. */
|
|
30
28
|
tooltipId?: string | undefined;
|
|
31
|
-
} & PickedHTMLAttributes &
|
|
29
|
+
} & PickedHTMLAttributes & {
|
|
30
|
+
htmlProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "style" | "onMouseLeave" | "onMouseOver" | "children"> | undefined;
|
|
31
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export {};
|
|
@@ -2,13 +2,15 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import { __rest } from 'tslib';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { forwardRef, useId, useState, useEffect, Children, isValidElement, cloneElement } from 'react';
|
|
5
|
-
import { Container, TooltipWrapper, ArrowWrapper, SvgArrow } from './Tooltip.styles.js';
|
|
6
|
-
import { tooltipTokens } from './Tooltip.tokens.js';
|
|
7
|
-
import { useFloatPosition } from '../../hooks/useFloatPosition.js';
|
|
8
5
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
9
6
|
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
10
|
-
import {
|
|
7
|
+
import { useFloatPosition } from '../../hooks/useFloatPosition.js';
|
|
8
|
+
import '../../hooks/useScreenSize.js';
|
|
11
9
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
10
|
+
import { combineHandlers } from '../../utils/combineHandlers.js';
|
|
11
|
+
import '../../utils/color.js';
|
|
12
|
+
import { Container, TooltipWrapper, ArrowWrapper, SvgArrow } from './Tooltip.styles.js';
|
|
13
|
+
import { tooltipTokens } from './Tooltip.tokens.js';
|
|
12
14
|
|
|
13
15
|
var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
16
|
var text = props.text,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { TooltipProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<{
|
|
5
|
-
htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver"> | undefined;
|
|
6
|
-
} & Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
7
5
|
text: string;
|
|
8
6
|
placement?: import("../../hooks").Placement | undefined;
|
|
9
7
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> & import("react").RefAttributes<HTMLElement>;
|
|
@@ -13,6 +11,8 @@ declare const _default: {
|
|
|
13
11
|
style?: import("react").CSSProperties | undefined;
|
|
14
12
|
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
15
13
|
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver"> | undefined;
|
|
16
16
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
argTypes: {
|
|
18
18
|
text: {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { typographyTokens } from '../Typography/Typography.tokens.js';
|
|
3
|
-
import { tooltipTokens } from './Tooltip.tokens.js';
|
|
4
2
|
import { visibilityTransition } from '../../helpers/styling/visibilityTransition.js';
|
|
3
|
+
import '../../helpers/styling/focusVisible.js';
|
|
4
|
+
import '../../helpers/styling/hover.js';
|
|
5
|
+
import '../../helpers/styling/focus.js';
|
|
6
|
+
import '../../helpers/styling/danger.js';
|
|
7
|
+
import { selection } from '../../helpers/styling/selection.js';
|
|
8
|
+
import { tooltipTokens } from './Tooltip.tokens.js';
|
|
5
9
|
|
|
6
10
|
var SvgArrow = styled.svg.withConfig({
|
|
7
11
|
displayName: "Tooltipstyles__SvgArrow",
|
|
@@ -18,7 +22,7 @@ var Container = styled.div.withConfig({
|
|
|
18
22
|
var TooltipWrapper = styled.div.withConfig({
|
|
19
23
|
displayName: "Tooltipstyles__TooltipWrapper",
|
|
20
24
|
componentId: "sc-1cna5tc-3"
|
|
21
|
-
})(["&::selection{", "}", " width:fit-content;position:absolute;z-index:20;text-align:center;", ""],
|
|
25
|
+
})(["&::selection{", "}", " width:fit-content;position:absolute;z-index:20;text-align:center;", ""], selection, function (_ref) {
|
|
22
26
|
var open = _ref.open;
|
|
23
27
|
return visibilityTransition(open);
|
|
24
28
|
}, tooltipTokens.wrapper.base);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
2
|
+
import { BaseTypographyProps } from '../Typography';
|
|
3
|
+
export declare type CaptionProps = BaseComponentPropsWithChildren<HTMLTableCaptionElement, BaseTypographyProps>;
|
|
4
|
+
export declare const Caption: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLTableCaptionElement>, "id" | "className"> & {
|
|
5
|
+
withMargins?: boolean | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
9
|
+
htmlProps?: import("react").HTMLAttributes<HTMLTableCaptionElement> | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { getBaseHTMLProps } from '../../../types/BaseComponentProps.js';
|
|
5
|
+
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
|
|
7
|
+
var Caption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
8
|
+
var id = props.id,
|
|
9
|
+
className = props.className,
|
|
10
|
+
htmlProps = props.htmlProps,
|
|
11
|
+
children = props.children,
|
|
12
|
+
rest = __rest(props, ["id", "className", "htmlProps", "children"]);
|
|
13
|
+
|
|
14
|
+
return jsx(Typography, Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest), {
|
|
15
|
+
ref: ref,
|
|
16
|
+
typographyType: "headingSans03",
|
|
17
|
+
as: "caption"
|
|
18
|
+
}, {
|
|
19
|
+
children: children
|
|
20
|
+
}));
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export { Caption };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CaptionProps } from '.';
|
|
2
|
+
declare type StoryTProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
} & CaptionProps;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLTableCaptionElement>, "id" | "className"> & {
|
|
8
|
+
withMargins?: boolean | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
12
|
+
htmlProps?: import("react").HTMLAttributes<HTMLTableCaptionElement> | undefined;
|
|
13
|
+
} & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
14
|
+
argTypes: {
|
|
15
|
+
withMargins: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
text: {
|
|
21
|
+
control: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
export declare const Default: (args: StoryTProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Caption';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
2
|
+
import { BaseTypographyProps, TypographyHeadingType } from '../Typography';
|
|
3
|
+
export declare type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
4
|
+
export declare type HeadingProps = BaseComponentPropsWithChildren<HTMLHeadingElement, {
|
|
5
|
+
/**Nivå på overskriften. Komponenten returnerer HTML heading element med dette nivået med default styling. */
|
|
6
|
+
level: HeadingLevel;
|
|
7
|
+
/**Spesifiserer typografistil basert på utvalget for HTML heading elementer. */
|
|
8
|
+
typographyType?: TypographyHeadingType;
|
|
9
|
+
} & BaseTypographyProps>;
|
|
10
|
+
export declare const Heading: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHeadingElement>, "id" | "className"> & {
|
|
11
|
+
/**Nivå på overskriften. Komponenten returnerer HTML heading element med dette nivået med default styling. */
|
|
12
|
+
level: HeadingLevel;
|
|
13
|
+
/**Spesifiserer typografistil basert på utvalget for HTML heading elementer. */
|
|
14
|
+
typographyType?: TypographyHeadingType | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
withMargins?: boolean | undefined;
|
|
17
|
+
} & {
|
|
18
|
+
children?: import("react").ReactNode;
|
|
19
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
20
|
+
htmlProps?: import("react").HTMLAttributes<HTMLHeadingElement> | undefined;
|
|
21
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { getBaseHTMLProps } from '../../../types/BaseComponentProps.js';
|
|
5
|
+
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
|
|
7
|
+
var getHeadingElement = function getHeadingElement(level) {
|
|
8
|
+
return "h".concat(level);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var getDefaultTypographyType = function getDefaultTypographyType(h) {
|
|
12
|
+
switch (h) {
|
|
13
|
+
case 'h1':
|
|
14
|
+
return 'headingSans06';
|
|
15
|
+
|
|
16
|
+
case 'h2':
|
|
17
|
+
return 'headingSans05';
|
|
18
|
+
|
|
19
|
+
case 'h3':
|
|
20
|
+
return 'headingSans04';
|
|
21
|
+
|
|
22
|
+
case 'h4':
|
|
23
|
+
return 'headingSans03';
|
|
24
|
+
|
|
25
|
+
case 'h5':
|
|
26
|
+
return 'headingSans02';
|
|
27
|
+
|
|
28
|
+
case 'h6':
|
|
29
|
+
return 'headingSans01';
|
|
30
|
+
|
|
31
|
+
default:
|
|
32
|
+
return 'headingSans06';
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var Heading = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
|
+
var id = props.id,
|
|
38
|
+
className = props.className,
|
|
39
|
+
htmlProps = props.htmlProps,
|
|
40
|
+
children = props.children,
|
|
41
|
+
typographyType = props.typographyType,
|
|
42
|
+
level = props.level,
|
|
43
|
+
rest = __rest(props, ["id", "className", "htmlProps", "children", "typographyType", "level"]);
|
|
44
|
+
|
|
45
|
+
var headingElement = getHeadingElement(level);
|
|
46
|
+
var headingProps = Object.assign(Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest)), {
|
|
47
|
+
typographyType: typographyType ? typographyType : getDefaultTypographyType(headingElement),
|
|
48
|
+
as: headingElement,
|
|
49
|
+
ref: ref
|
|
50
|
+
});
|
|
51
|
+
return jsx(Typography, Object.assign({}, headingProps, {
|
|
52
|
+
children: children
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export { Heading };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HeadingProps } from '.';
|
|
2
|
+
declare type StoryTProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
} & HeadingProps;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHeadingElement>, "id" | "className"> & {
|
|
8
|
+
level: import("./Heading").HeadingLevel;
|
|
9
|
+
typographyType?: import("..").TypographyHeadingType | undefined;
|
|
10
|
+
} & {
|
|
11
|
+
withMargins?: boolean | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
children?: import("react").ReactNode;
|
|
14
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
15
|
+
htmlProps?: import("react").HTMLAttributes<HTMLHeadingElement> | undefined;
|
|
16
|
+
} & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
argTypes: {
|
|
18
|
+
typographyType: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
withMargins: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
text: {
|
|
29
|
+
control: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
36
|
+
export declare const Overview: () => JSX.Element;
|
|
37
|
+
export declare const Default: (args: StoryTProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Heading';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LabelHTMLAttributes } from 'react';
|
|
2
|
+
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
3
|
+
import { BaseTypographyProps } from '../Typography';
|
|
4
|
+
declare type PickedHTMLAttributes = Pick<LabelHTMLAttributes<HTMLLabelElement>, 'htmlFor'>;
|
|
5
|
+
export declare type LabelProps = BaseComponentPropsWithChildren<HTMLLabelElement, BaseTypographyProps & PickedHTMLAttributes, Omit<LabelHTMLAttributes<HTMLLabelElement>, keyof PickedHTMLAttributes>>;
|
|
6
|
+
export declare const Label: import("react").ForwardRefExoticComponent<Pick<Omit<LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "className" | "id"> & {
|
|
7
|
+
withMargins?: boolean | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
children?: import("react").ReactNode;
|
|
10
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & PickedHTMLAttributes & {
|
|
11
|
+
htmlProps?: Omit<LabelHTMLAttributes<HTMLLabelElement>, "htmlFor"> | undefined;
|
|
12
|
+
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { getBaseHTMLProps } from '../../../types/BaseComponentProps.js';
|
|
5
|
+
import { Typography } from '../Typography/Typography.js';
|
|
6
|
+
|
|
7
|
+
var Label = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
8
|
+
var id = props.id,
|
|
9
|
+
className = props.className,
|
|
10
|
+
htmlProps = props.htmlProps,
|
|
11
|
+
children = props.children,
|
|
12
|
+
rest = __rest(props, ["id", "className", "htmlProps", "children"]);
|
|
13
|
+
|
|
14
|
+
return jsx(Typography, Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest), {
|
|
15
|
+
ref: ref,
|
|
16
|
+
typographyType: "supportingStyleLabel01"
|
|
17
|
+
}, {
|
|
18
|
+
children: children
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { Label };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LabelProps } from '.';
|
|
2
|
+
declare type StoryTProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
} & LabelProps;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "id" | "className"> & {
|
|
8
|
+
withMargins?: boolean | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
12
|
+
htmlFor?: string | undefined;
|
|
13
|
+
} & {
|
|
14
|
+
htmlProps?: Omit<import("react").LabelHTMLAttributes<HTMLLabelElement>, "htmlFor"> | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
16
|
+
argTypes: {
|
|
17
|
+
withMargins: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
text: {
|
|
23
|
+
control: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
|
30
|
+
export declare const Default: (args: StoryTProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Label';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponentPropsWithChildren } from '../../../types';
|
|
2
|
+
import { BaseTypographyProps } from '../Typography';
|
|
3
|
+
export declare type LegendProps = BaseComponentPropsWithChildren<HTMLLegendElement, BaseTypographyProps>;
|
|
4
|
+
export declare const Legend: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLLegendElement>, "id" | "className"> & {
|
|
5
|
+
withMargins?: boolean | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
children?: import("react").ReactNode;
|
|
8
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "style"> & {
|
|
9
|
+
htmlProps?: import("react").HTMLAttributes<HTMLLegendElement> | undefined;
|
|
10
|
+
} & import("react").RefAttributes<HTMLLegendElement>>;
|