@norges-domstoler/dds-components 2.1.0 → 2.3.1
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/dist/index.es.js +1633 -1072
- package/dist/index.js +1642 -1073
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumb.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumb.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.stories.d.ts +19 -0
- package/dist/{components → src/components}/Breadcrumbs/index.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.d.ts +2 -4
- package/dist/src/components/Button/Button.stories.d.ts +56 -0
- package/dist/{components → src/components}/Button/Button.styles.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Button/Button.types.d.ts +13 -5
- package/dist/{components → src/components}/Button/index.d.ts +0 -0
- package/dist/{components → src/components}/Card/Card.d.ts +3 -0
- package/dist/src/components/Card/Card.stories.d.ts +11 -0
- package/dist/{components → src/components}/Card/Card.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Card/CardAccordion/CardAccordion.d.ts +2 -0
- package/dist/src/components/Card/CardAccordion/CardAccordionBody.d.ts +18 -0
- package/dist/{components → src/components}/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -0
- package/dist/src/components/Card/CardAccordion/CardAccordionHeader.d.ts +17 -0
- package/dist/{components → src/components}/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Card/index.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +0 -2
- package/dist/src/components/Checkbox/Checkbox.stories.d.ts +47 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.styles.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/Checkbox.tokens.d.ts +0 -0
- package/dist/src/components/Checkbox/Checkbox.types.d.ts +13 -0
- package/dist/src/components/Checkbox/CheckboxGroup.d.ts +17 -0
- package/dist/src/components/Checkbox/CheckboxGroup.stories.d.ts +46 -0
- package/dist/{components → src/components}/Checkbox/CheckboxGroup.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/CheckboxGroupContext.d.ts +0 -0
- package/dist/{components → src/components}/Checkbox/index.d.ts +0 -0
- package/dist/{components → src/components}/Datepicker/Datepicker.d.ts +3 -3
- package/dist/src/components/Datepicker/Datepicker.stories.d.ts +55 -0
- package/dist/{components → src/components}/Datepicker/Datepicker.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Datepicker/index.d.ts +0 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionList.d.ts +2 -0
- package/dist/src/components/DescriptionList/DescriptionList.stories.d.ts +14 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionListDesc.d.ts +2 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionListDesc.tokens.d.ts +0 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionListGroup.d.ts +5 -3
- package/dist/{components → src/components}/DescriptionList/DescriptionListGroup.tokens.d.ts +0 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionListTerm.d.ts +0 -0
- package/dist/{components → src/components}/DescriptionList/DescriptionListTerm.tokens.d.ts +0 -0
- package/dist/{components → src/components}/DescriptionList/index.d.ts +0 -0
- package/dist/{components → src/components}/Divider/Divider.d.ts +2 -0
- package/dist/src/components/Divider/Divider.stories.d.ts +13 -0
- package/dist/{components → src/components}/Divider/Divider.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Divider/index.d.ts +0 -0
- package/dist/src/components/Drawer/Drawer.d.ts +45 -0
- package/dist/src/components/Drawer/Drawer.stories.d.ts +20 -0
- package/dist/{components → src/components}/Drawer/Drawer.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Drawer/DrawerGroup.d.ts +4 -0
- package/dist/{components → src/components}/Drawer/index.d.ts +0 -0
- package/dist/{components → src/components}/GlobalMessage/GlobalMessage.d.ts +8 -0
- package/dist/src/components/GlobalMessage/GlobalMessage.stories.d.ts +27 -0
- package/dist/{components → src/components}/GlobalMessage/GlobalMessage.tokens.d.ts +0 -0
- package/dist/{components → src/components}/GlobalMessage/index.d.ts +0 -0
- package/dist/{helpers → src/components}/IconWrapper/IconWrapper.d.ts +5 -2
- package/dist/src/components/IconWrapper/IconWrapper.stories.d.ts +22 -0
- package/dist/{helpers → src/components}/IconWrapper/index.d.ts +0 -0
- package/dist/src/components/InputMessage/InputMessage.d.ts +14 -0
- package/dist/src/components/InputMessage/InputMessage.stories.d.ts +19 -0
- package/dist/{helpers → src/components}/InputMessage/InputMessage.tokens.d.ts +0 -2
- package/dist/src/components/InputMessage/index.d.ts +1 -0
- package/dist/{components → src/components}/InternalHeader/InternalHeader.d.ts +0 -0
- package/dist/src/components/InternalHeader/InternalHeader.stories.d.ts +40 -0
- package/dist/{components → src/components}/InternalHeader/InternalHeader.styles.d.ts +4 -4
- package/dist/{components → src/components}/InternalHeader/InternalHeader.tokens.d.ts +0 -0
- package/dist/{components → src/components}/InternalHeader/InternalHeader.types.d.ts +7 -0
- package/dist/{components → src/components}/InternalHeader/InternalHeaderListItem.d.ts +0 -0
- package/dist/{components → src/components}/InternalHeader/NavigationItem.d.ts +0 -0
- package/dist/{components → src/components}/InternalHeader/index.d.ts +0 -0
- package/dist/src/components/List/List.d.ts +16 -0
- package/dist/src/components/List/List.stories.d.ts +14 -0
- package/dist/{components → src/components}/List/List.tokens.d.ts +0 -0
- package/dist/{components → src/components}/List/ListItem.d.ts +0 -0
- package/dist/{components → src/components}/List/ListItem.tokens.d.ts +0 -0
- package/dist/{components → src/components}/List/index.d.ts +0 -0
- package/dist/src/components/LocalMessage/LocalMessage.d.ts +32 -0
- package/dist/src/components/LocalMessage/LocalMessage.stories.d.ts +35 -0
- package/dist/{components → src/components}/LocalMessage/LocalMessage.tokens.d.ts +2 -2
- package/dist/{components → src/components}/LocalMessage/index.d.ts +0 -0
- package/dist/src/components/Modal/Modal.d.ts +25 -0
- package/dist/src/components/Modal/Modal.stories.d.ts +24 -0
- package/dist/{components → src/components}/Modal/Modal.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Modal/ModalActions.d.ts +0 -0
- package/dist/{components → src/components}/Modal/ModalBody.d.ts +2 -0
- package/dist/{components → src/components}/Modal/index.d.ts +0 -0
- package/dist/{components → src/components}/OverflowMenu/OverflowMenu.d.ts +4 -4
- package/dist/src/components/OverflowMenu/OverflowMenu.stories.d.ts +21 -0
- package/dist/{components → src/components}/OverflowMenu/OverflowMenu.tokens.d.ts +0 -0
- package/dist/{components → src/components}/OverflowMenu/OverflowMenu.types.d.ts +12 -4
- package/dist/{components → src/components}/OverflowMenu/OverflowMenuGroup.d.ts +5 -0
- package/dist/{components → src/components}/OverflowMenu/OverflowMenuItem.d.ts +1 -1
- package/dist/{components → src/components}/OverflowMenu/index.d.ts +0 -0
- package/dist/src/components/Pagination/Pagination.d.ts +49 -0
- package/dist/src/components/Pagination/Pagination.stories.d.ts +46 -0
- package/dist/{components → src/components}/Pagination/Pagination.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Pagination/index.d.ts +0 -0
- package/dist/{components → src/components}/Pagination/paginationGenerator.d.ts +0 -0
- package/dist/src/components/Popover/Popover.d.ts +51 -0
- package/dist/src/components/Popover/Popover.stories.d.ts +50 -0
- package/dist/{components → src/components}/Popover/Popover.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Popover/PopoverGroup.d.ts +5 -0
- package/dist/{components → src/components}/Popover/index.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.d.ts +0 -2
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +40 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.styles.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButton.tokens.d.ts +0 -0
- package/dist/src/components/RadioButton/RadioButton.types.d.ts +9 -0
- package/dist/src/components/RadioButton/RadioButtonGroup.d.ts +28 -0
- package/dist/src/components/RadioButton/RadioButtonGroup.stories.d.ts +47 -0
- package/dist/{components → src/components}/RadioButton/RadioButtonGroup.tokens.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/RadioButtonGroupContext.d.ts +0 -0
- package/dist/{components → src/components}/RadioButton/index.d.ts +1 -0
- package/dist/{components → src/components}/Search/Search.d.ts +11 -9
- package/dist/src/components/Search/Search.stories.d.ts +30 -0
- package/dist/{components → src/components}/Search/Search.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Search/index.d.ts +0 -0
- package/dist/src/components/Select/MultiSelect.stories.d.ts +74 -0
- package/dist/{components → src/components}/Select/Select.d.ts +10 -2
- package/dist/src/components/Select/Select.stories.d.ts +73 -0
- package/dist/{components → src/components}/Select/Select.styles.d.ts +1 -1
- package/dist/{components → src/components}/Select/Select.tokens.d.ts +2 -2
- package/dist/{components → src/components}/Select/index.d.ts +0 -0
- package/dist/src/components/SkipToContent/SkipToContent.d.ts +18 -0
- package/dist/src/components/SkipToContent/SkipToContent.stories.d.ts +31 -0
- package/dist/{components → src/components}/SkipToContent/SkipToContent.tokens.d.ts +0 -0
- package/dist/{components → src/components}/SkipToContent/index.d.ts +0 -0
- package/dist/{components → src/components}/Spinner/Spinner.d.ts +4 -2
- package/dist/src/components/Spinner/Spinner.stories.d.ts +21 -0
- package/dist/{components → src/components}/Spinner/Spinner.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Spinner/index.d.ts +0 -0
- package/dist/{components → src/components}/Table/Body.d.ts +0 -0
- package/dist/{components → src/components}/Table/Cell.d.ts +2 -0
- package/dist/{components → src/components}/Table/Cell.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Table/Foot.d.ts +0 -0
- package/dist/{components → src/components}/Table/Head.d.ts +0 -0
- package/dist/src/components/Table/Row.d.ts +23 -0
- package/dist/{components → src/components}/Table/Row.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Table/SortCell.d.ts +6 -0
- package/dist/{components → src/components}/Table/Table.d.ts +4 -0
- package/dist/src/components/Table/Table.stories.d.ts +28 -0
- package/dist/{components → src/components}/Table/TableWrapper.d.ts +0 -0
- package/dist/{components → src/components}/Table/index.d.ts +0 -0
- package/dist/{components → src/components}/Table/tableData.d.ts +0 -0
- package/dist/src/components/Tabs/Tab.d.ts +32 -0
- package/dist/src/components/Tabs/TabList.d.ts +3 -0
- package/dist/src/components/Tabs/TabPanel.d.ts +9 -0
- package/dist/src/components/Tabs/TabPanels.d.ts +3 -0
- package/dist/src/components/Tabs/Tabs.context.d.ts +17 -0
- package/dist/src/components/Tabs/Tabs.d.ts +23 -0
- package/dist/src/components/Tabs/Tabs.stories.d.ts +10 -0
- package/dist/src/components/Tabs/Tabs.tokens.d.ts +35 -0
- package/dist/src/components/Tabs/index.d.ts +5 -0
- package/dist/{components → src/components}/TextInput/CharCounter.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/CharCounter.tokens.d.ts +0 -0
- package/dist/{components → src/components}/TextInput/TextInput.d.ts +0 -2
- package/dist/src/components/TextInput/TextInput.stories.d.ts +68 -0
- package/dist/{components → src/components}/TextInput/TextInput.styles.d.ts +3 -2
- package/dist/{components → src/components}/TextInput/TextInput.tokens.d.ts +2 -2
- package/dist/src/components/TextInput/TextInput.types.d.ts +6 -0
- package/dist/{components → src/components}/TextInput/index.d.ts +0 -0
- package/dist/src/components/ToggleButton/ToggelButtonGroup.stories.d.ts +9 -0
- package/dist/src/components/ToggleButton/ToggleButton.d.ts +15 -0
- package/dist/src/components/ToggleButton/ToggleButton.stories.d.ts +12 -0
- package/dist/src/components/ToggleButton/ToggleButton.tokens.d.ts +22 -0
- package/dist/src/components/ToggleButton/ToggleButtonGroup.d.ts +12 -0
- package/dist/src/components/ToggleButton/index.d.ts +2 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +28 -0
- package/dist/src/components/Tooltip/Tooltip.stories.d.ts +29 -0
- package/dist/{components → src/components}/Tooltip/Tooltip.styles.d.ts +0 -0
- package/dist/{components → src/components}/Tooltip/Tooltip.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Tooltip/index.d.ts +0 -0
- package/dist/src/components/Typography/Body.stories.d.ts +11 -0
- package/dist/src/components/Typography/Examples.stories.d.ts +8 -0
- package/dist/src/components/Typography/Typography.d.ts +32 -0
- package/dist/src/components/Typography/Typography.stories.d.ts +58 -0
- package/dist/{components → src/components}/Typography/Typography.tokens.d.ts +0 -0
- package/dist/{components → src/components}/Typography/Typography.types.d.ts +0 -0
- package/dist/{components → src/components}/Typography/index.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Backdrop/Backdrop.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Backdrop/Backdrop.utils.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Backdrop/index.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Chevron/AnimatedChevronUpDown.d.ts +3 -3
- package/dist/{helpers → src/helpers}/Chevron/AnimatedChevronUpDown.styles.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Chevron/index.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Input/Input.styles.d.ts +3 -2
- package/dist/{helpers → src/helpers}/Input/Input.tokens.d.ts +0 -0
- package/dist/src/helpers/Input/Input.types.d.ts +19 -0
- package/dist/{helpers → src/helpers}/Input/index.d.ts +1 -0
- package/dist/{helpers → src/helpers}/Input/inputFieldStylingBase.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Paper/Paper.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Paper/Paper.tokens.d.ts +0 -0
- package/dist/{helpers → src/helpers}/Paper/index.d.ts +0 -0
- package/dist/src/helpers/RequiredMarker/RequiredMarker.d.ts +2 -0
- package/dist/src/helpers/RequiredMarker/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts +5 -0
- package/dist/{helpers → src/helpers}/styling/danger.d.ts +0 -0
- package/dist/{helpers → src/helpers}/styling/focus.d.ts +0 -0
- package/dist/{helpers → src/helpers}/styling/focusVisible.d.ts +0 -0
- package/dist/src/helpers/styling/hideInput.d.ts +7 -0
- package/dist/{helpers → src/helpers}/styling/hover.d.ts +0 -0
- package/dist/{helpers → src/helpers}/styling/index.d.ts +2 -0
- package/dist/src/helpers/styling/removeButtonStyling.d.ts +9 -0
- package/dist/src/helpers/styling/scrollbarStyling.d.ts +1 -0
- package/dist/{helpers → src/helpers}/styling/visibilityTransition.d.ts +0 -0
- package/dist/{hooks → src/hooks}/index.d.ts +1 -0
- package/dist/{hooks → src/hooks}/useCombinedRefs.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFloatPosition.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useFocusTrap.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useId.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useMountTransition.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useOnClickOutside.d.ts +0 -0
- package/dist/{hooks → src/hooks}/useOnKeyDown.d.ts +0 -0
- package/dist/src/hooks/useRoveFocus.d.ts +3 -0
- package/dist/src/hooks/useScreenSize.d.ts +8 -0
- package/dist/{index.d.ts → src/index.d.ts} +4 -1
- package/dist/{helpers → src/utils}/color.d.ts +0 -0
- package/dist/{utils → src/utils}/combineHandlers.d.ts +0 -0
- package/dist/{utils → src/utils}/getScrollbarSize.d.ts +0 -0
- package/dist/{utils → src/utils}/idGenerator.d.ts +0 -0
- package/dist/{utils → src/utils}/index.d.ts +2 -0
- package/dist/{helpers/functions.d.ts → src/utils/text.d.ts} +0 -0
- package/package.json +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionBody.d.ts +0 -12
- package/dist/components/Card/CardAccordion/CardAccordionHeader.d.ts +0 -11
- package/dist/components/Checkbox/Checkbox.types.d.ts +0 -10
- package/dist/components/Checkbox/CheckboxGroup.d.ts +0 -15
- package/dist/components/Drawer/Drawer.d.ts +0 -29
- package/dist/components/List/List.d.ts +0 -12
- package/dist/components/LocalMessage/LocalMessage.d.ts +0 -20
- package/dist/components/Modal/Modal.d.ts +0 -15
- package/dist/components/Pagination/Pagination.d.ts +0 -29
- package/dist/components/Popover/Popover.d.ts +0 -33
- package/dist/components/RadioButton/RadioButton.types.d.ts +0 -8
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +0 -20
- package/dist/components/SkipToContent/SkipToContent.d.ts +0 -12
- package/dist/components/Table/Row.d.ts +0 -15
- package/dist/components/TextInput/TextInput.types.d.ts +0 -7
- package/dist/components/Tooltip/Tooltip.d.ts +0 -18
- package/dist/components/Typography/Typography.d.ts +0 -22
- package/dist/helpers/Input/Input.types.d.ts +0 -12
- package/dist/helpers/InputMessage/InputMessage.d.ts +0 -10
- package/dist/helpers/RequiredMarker.d.ts +0 -3
- package/dist/helpers/scrollbarStyling.d.ts +0 -2
- package/dist/helpers/styling/removeButtonStyling.d.ts +0 -1
- package/dist/hooks/useRoveFocus.d.ts +0 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HTMLAttributes, ElementType, AnchorHTMLAttributes, LabelHTMLAttributes } from 'react';
|
|
2
|
+
import { CSSObject } from 'styled-components';
|
|
3
|
+
import { TypographyType, TextColor } from './Typography.types';
|
|
4
|
+
export declare function isTextColor(color: string): color is TextColor;
|
|
5
|
+
export declare const getTextColor: (color: TextColor | string) => string;
|
|
6
|
+
export declare type TypographyInteractionProps = {
|
|
7
|
+
hover?: CSSObject;
|
|
8
|
+
active?: CSSObject;
|
|
9
|
+
};
|
|
10
|
+
export declare type TypographyProps = {
|
|
11
|
+
/**Styling basert på det typografiske utvalget definert i Figma. Returnerer default HTML tag for hver type. **OBS!** Ved bruk av `'a'` er det flere tilgjengelige props, se under. */
|
|
12
|
+
typographyType?: TypographyType;
|
|
13
|
+
/**Spesifiserer om tekstelementet skal ha spacing definert i Elsa. Brukes hovedsakelig i artikler og lignende. **OBS!** har forskjellig virkning på ulike typografityper. `body` og `lead`-typer får margin på bunnen, `heading`-typer får margin på bunnen og padding på toppen mens `supportingStyles` får margin topp og bunn. */
|
|
14
|
+
withMargins?: boolean;
|
|
15
|
+
/**HTML tag som skal brukes istedenfor default definert via `typographyType`. */
|
|
16
|
+
as?: ElementType;
|
|
17
|
+
/** Spesifiserer om lenka er ekstern ved `typographyType='a'` eller `as='a'`.*/
|
|
18
|
+
externalLink?: boolean;
|
|
19
|
+
/**Tekstfarge fra utvalget eller custom. **OBS!** Bruk farger fra `@dds-design-tokens`. */
|
|
20
|
+
color?: TextColor | string;
|
|
21
|
+
/**Setter `bold` styling. */
|
|
22
|
+
bold?: boolean;
|
|
23
|
+
/**Setter `italic` styling. */
|
|
24
|
+
italic?: boolean;
|
|
25
|
+
/**Setter en linje under. */
|
|
26
|
+
underline?: boolean;
|
|
27
|
+
/**Støtte for å enkelt kunne endre på hover- og active-styling. Bruk `@dds-design-tokens` til farger osv. */
|
|
28
|
+
interactionProps?: TypographyInteractionProps;
|
|
29
|
+
/**nativ `target`-prop ved `typographyType='a'`. */
|
|
30
|
+
target?: string;
|
|
31
|
+
} & (HTMLAttributes<HTMLElement> | LabelHTMLAttributes<HTMLLabelElement> | AnchorHTMLAttributes<HTMLAnchorElement>);
|
|
32
|
+
export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TypographyProps } from '.';
|
|
3
|
+
declare type StoryTProps = {
|
|
4
|
+
text: string;
|
|
5
|
+
} & TypographyProps;
|
|
6
|
+
declare const _default: {
|
|
7
|
+
title: string;
|
|
8
|
+
component: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
|
|
9
|
+
argTypes: {
|
|
10
|
+
typographyType: {
|
|
11
|
+
control: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
bold: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
italic: {
|
|
21
|
+
control: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
withMargins: {
|
|
26
|
+
control: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
externalLink: {
|
|
31
|
+
control: {
|
|
32
|
+
type: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
color: {
|
|
36
|
+
control: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
href: {
|
|
41
|
+
control: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
text: {
|
|
46
|
+
control: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
parameters: {
|
|
52
|
+
controls: {
|
|
53
|
+
exclude: string[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export default _default;
|
|
58
|
+
export declare const Default: (args: StoryTProps) => JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
3
|
declare type SvgChevronProps = {
|
|
4
4
|
isUp?: boolean;
|
|
5
|
-
height?:
|
|
6
|
-
width?:
|
|
5
|
+
height?: Property.Height<string>;
|
|
6
|
+
width?: Property.Width<string>;
|
|
7
7
|
};
|
|
8
8
|
export declare const AnimatedChevronUpDown: ({ isUp, height, width }: SvgChevronProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps, StyledInputProps, StyledLabelProps } from './Input.types';
|
|
3
|
-
export declare const inputStyling: ({ readOnly,
|
|
4
|
-
export declare const Input: import("styled-components").StyledComponent<"input", any, Pick<InputProps, "readOnly" | "
|
|
3
|
+
export declare const inputStyling: ({ readOnly, hasLabel, disabled, hasErrorMessage }: StyledInputProps) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<any>>;
|
|
4
|
+
export declare const Input: import("styled-components").StyledComponent<"input", any, Pick<InputProps, "readOnly" | "disabled"> & {
|
|
5
5
|
hasErrorMessage: boolean;
|
|
6
|
+
hasLabel: boolean;
|
|
6
7
|
}, never>;
|
|
7
8
|
export declare const SingleLineLabel: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../components/Typography").TypographyProps & import("react").RefAttributes<HTMLElement>>, any, StyledLabelProps, never>;
|
|
8
9
|
export declare const InputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
export declare type InputProps = {
|
|
4
|
+
/**Ledetekst for input. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/**Bredde for inputfeltet. */
|
|
7
|
+
width?: Property.Width<string>;
|
|
8
|
+
/**Hjelpetekst. */
|
|
9
|
+
tip?: string;
|
|
10
|
+
/**Feilmelding. Setter også error state. */
|
|
11
|
+
errorMessage?: string;
|
|
12
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
13
|
+
export declare type StyledInputProps = Pick<InputProps, 'readOnly' | 'disabled'> & {
|
|
14
|
+
hasErrorMessage: boolean;
|
|
15
|
+
hasLabel: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare type StyledLabelProps = {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RequiredMarker';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const scrollbarStyling: import("styled-components").FlattenSimpleInterpolation;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -12,7 +12,7 @@ export * from './components/Search';
|
|
|
12
12
|
export * from './components/Typography';
|
|
13
13
|
export * from './components/Table';
|
|
14
14
|
export * from './components/Breadcrumbs';
|
|
15
|
-
export * from './
|
|
15
|
+
export * from './components/IconWrapper';
|
|
16
16
|
export * from './components/Pagination';
|
|
17
17
|
export * from './components/Divider';
|
|
18
18
|
export * from './components/List';
|
|
@@ -27,3 +27,6 @@ export * from './components/Modal';
|
|
|
27
27
|
export * from './components/Drawer';
|
|
28
28
|
export * from './components/OverflowMenu';
|
|
29
29
|
export * from './components/Popover';
|
|
30
|
+
export * from './components/InputMessage';
|
|
31
|
+
export * from './components/ToggleButton';
|
|
32
|
+
export * from './components/Tabs';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
export declare type CardAccordionBodyProps = {
|
|
4
|
-
isExpanded?: boolean;
|
|
5
|
-
headerId?: string;
|
|
6
|
-
paddingTop?: CSS.Property.PaddingTop<string>;
|
|
7
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
8
|
-
export declare const CardAccordionBody: import("react").ForwardRefExoticComponent<{
|
|
9
|
-
isExpanded?: boolean | undefined;
|
|
10
|
-
headerId?: string | undefined;
|
|
11
|
-
paddingTop?: CSS.Property.PaddingTop<string> | undefined;
|
|
12
|
-
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
export declare type CardAccordionHeaderProps = {
|
|
3
|
-
isExpanded?: boolean;
|
|
4
|
-
toggleExpanded?: () => void;
|
|
5
|
-
bodyId?: string;
|
|
6
|
-
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
|
-
export declare const CardAccordionHeader: import("react").ForwardRefExoticComponent<{
|
|
8
|
-
isExpanded?: boolean | undefined;
|
|
9
|
-
toggleExpanded?: (() => void) | undefined;
|
|
10
|
-
bodyId?: string | undefined;
|
|
11
|
-
} & ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
-
export declare type CheckboxProps = {
|
|
3
|
-
label?: string;
|
|
4
|
-
error?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
readOnly?: boolean;
|
|
7
|
-
indeterminate?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
style?: React.CSSProperties;
|
|
10
|
-
} & InputHTMLAttributes<HTMLInputElement>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
declare type Direction = 'column' | 'row';
|
|
3
|
-
export declare type CheckboxGroupProps = {
|
|
4
|
-
label?: string;
|
|
5
|
-
direction?: Direction;
|
|
6
|
-
groupId?: string;
|
|
7
|
-
errorMessage?: string;
|
|
8
|
-
tip?: string;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
className?: string;
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
style?: React.CSSProperties;
|
|
13
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
14
|
-
export declare const CheckboxGroup: ({ label, direction, errorMessage, tip, required, groupId, children, className, style, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
-
import { Property } from 'csstype';
|
|
3
|
-
export declare type DrawerSize = 'small' | 'large';
|
|
4
|
-
export declare type DrawerPlacement = 'left' | 'right';
|
|
5
|
-
export declare type WidthProps = {
|
|
6
|
-
minWidth?: Property.MinWidth<string>;
|
|
7
|
-
maxWidth?: Property.MaxWidth<string>;
|
|
8
|
-
width?: Property.Width<string>;
|
|
9
|
-
};
|
|
10
|
-
export declare type DrawerProps = {
|
|
11
|
-
isOpen?: boolean;
|
|
12
|
-
placement?: DrawerPlacement;
|
|
13
|
-
size?: DrawerSize;
|
|
14
|
-
onClose?: () => void;
|
|
15
|
-
parentElement?: HTMLElement;
|
|
16
|
-
header?: string | ReactNode;
|
|
17
|
-
widthProps?: WidthProps;
|
|
18
|
-
triggerRef?: RefObject<HTMLElement>;
|
|
19
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
20
|
-
export declare const Drawer: import("react").ForwardRefExoticComponent<{
|
|
21
|
-
isOpen?: boolean | undefined;
|
|
22
|
-
placement?: DrawerPlacement | undefined;
|
|
23
|
-
size?: DrawerSize | undefined;
|
|
24
|
-
onClose?: (() => void) | undefined;
|
|
25
|
-
parentElement?: HTMLElement | undefined;
|
|
26
|
-
header?: string | ReactNode;
|
|
27
|
-
widthProps?: WidthProps | undefined;
|
|
28
|
-
triggerRef?: RefObject<HTMLElement> | undefined;
|
|
29
|
-
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { TypographyBodyType } from '../Typography';
|
|
3
|
-
export declare type ListType = 'ordered' | 'unordered';
|
|
4
|
-
export declare type ListTypographyType = TypographyBodyType | 'inherit';
|
|
5
|
-
export declare type ListProps = {
|
|
6
|
-
listType?: ListType;
|
|
7
|
-
typographyType?: ListTypographyType;
|
|
8
|
-
} & HTMLAttributes<HTMLUListElement | HTMLOListElement>;
|
|
9
|
-
export declare const List: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
listType?: ListType | undefined;
|
|
11
|
-
typographyType?: ListTypographyType | undefined;
|
|
12
|
-
} & HTMLAttributes<HTMLUListElement | HTMLOListElement> & import("react").RefAttributes<HTMLUListElement | HTMLOListElement>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
export declare type LocalMessagePurpose = 'info' | 'warning' | 'danger' | 'confidential' | 'success' | 'tips';
|
|
4
|
-
export declare type LocalMessageLayout = 'horisontal' | 'vertical';
|
|
5
|
-
export declare type LocalMessageProps = {
|
|
6
|
-
message?: string;
|
|
7
|
-
purpose?: LocalMessagePurpose;
|
|
8
|
-
closable?: boolean;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
width?: CSS.Property.Width<string>;
|
|
11
|
-
layout?: LocalMessageLayout;
|
|
12
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
13
|
-
export declare const LocalMessage: import("react").ForwardRefExoticComponent<{
|
|
14
|
-
message?: string | undefined;
|
|
15
|
-
purpose?: LocalMessagePurpose | undefined;
|
|
16
|
-
closable?: boolean | undefined;
|
|
17
|
-
onClose?: (() => void) | undefined;
|
|
18
|
-
width?: CSS.Property.Width<string> | undefined;
|
|
19
|
-
layout?: LocalMessageLayout | undefined;
|
|
20
|
-
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
-
export declare type ModalProps = {
|
|
3
|
-
onClose?: () => void;
|
|
4
|
-
isOpen?: boolean;
|
|
5
|
-
parentElement?: HTMLElement;
|
|
6
|
-
header?: string | ReactNode;
|
|
7
|
-
triggerRef?: RefObject<HTMLElement>;
|
|
8
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
9
|
-
export declare const Modal: import("react").ForwardRefExoticComponent<{
|
|
10
|
-
onClose?: (() => void) | undefined;
|
|
11
|
-
isOpen?: boolean | undefined;
|
|
12
|
-
parentElement?: HTMLElement | undefined;
|
|
13
|
-
header?: string | ReactNode;
|
|
14
|
-
triggerRef?: RefObject<HTMLElement> | undefined;
|
|
15
|
-
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare type PaginationOption = {
|
|
3
|
-
label: string;
|
|
4
|
-
value: number;
|
|
5
|
-
};
|
|
6
|
-
export declare type PaginationProps = {
|
|
7
|
-
itemsAmount: number;
|
|
8
|
-
defaultItemsPerPage?: number;
|
|
9
|
-
defaultActivePage?: number;
|
|
10
|
-
withPagination?: boolean;
|
|
11
|
-
withCounter?: boolean;
|
|
12
|
-
withSelect?: boolean;
|
|
13
|
-
selectOptions?: PaginationOption[];
|
|
14
|
-
onSelectOptionChange?: (option: PaginationOption | null) => void;
|
|
15
|
-
smallScreen?: boolean;
|
|
16
|
-
onChange?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void;
|
|
17
|
-
} & Omit<HTMLAttributes<HTMLElement>, 'onChange'>;
|
|
18
|
-
export declare const Pagination: import("react").ForwardRefExoticComponent<{
|
|
19
|
-
itemsAmount: number;
|
|
20
|
-
defaultItemsPerPage?: number | undefined;
|
|
21
|
-
defaultActivePage?: number | undefined;
|
|
22
|
-
withPagination?: boolean | undefined;
|
|
23
|
-
withCounter?: boolean | undefined;
|
|
24
|
-
withSelect?: boolean | undefined;
|
|
25
|
-
selectOptions?: PaginationOption[] | undefined;
|
|
26
|
-
onSelectOptionChange?: ((option: PaginationOption | null) => void) | undefined;
|
|
27
|
-
smallScreen?: boolean | undefined;
|
|
28
|
-
onChange?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>, page: number) => void) | undefined;
|
|
29
|
-
} & Omit<HTMLAttributes<HTMLElement>, "onChange"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as CSS from 'csstype';
|
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
-
import { Placement } from '../../hooks';
|
|
4
|
-
export declare type PopoverSizeProps = {
|
|
5
|
-
width?: CSS.Property.Width<string>;
|
|
6
|
-
height?: CSS.Property.Height<string>;
|
|
7
|
-
minWidth?: CSS.Property.MinWidth<string>;
|
|
8
|
-
minHeight?: CSS.Property.MinHeight<string>;
|
|
9
|
-
maxWidth?: CSS.Property.MaxWidth<string>;
|
|
10
|
-
maxHeight?: CSS.Property.MaxHeight<string>;
|
|
11
|
-
};
|
|
12
|
-
export declare type PopoverProps = {
|
|
13
|
-
title?: string | ReactNode;
|
|
14
|
-
onCloseButtonClick?: () => void;
|
|
15
|
-
onCloseButtonBlur?: () => void;
|
|
16
|
-
isOpen?: boolean;
|
|
17
|
-
withCloseButton?: boolean;
|
|
18
|
-
anchorElement?: HTMLElement;
|
|
19
|
-
placement?: Placement;
|
|
20
|
-
offset?: number;
|
|
21
|
-
sizeProps?: PopoverSizeProps;
|
|
22
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
23
|
-
export declare const Popover: import("react").ForwardRefExoticComponent<{
|
|
24
|
-
title?: string | ReactNode;
|
|
25
|
-
onCloseButtonClick?: (() => void) | undefined;
|
|
26
|
-
onCloseButtonBlur?: (() => void) | undefined;
|
|
27
|
-
isOpen?: boolean | undefined;
|
|
28
|
-
withCloseButton?: boolean | undefined;
|
|
29
|
-
anchorElement?: HTMLElement | undefined;
|
|
30
|
-
placement?: Placement | undefined;
|
|
31
|
-
offset?: number | undefined;
|
|
32
|
-
sizeProps?: PopoverSizeProps | undefined;
|
|
33
|
-
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEvent, HTMLAttributes } from 'react';
|
|
2
|
-
declare type Direction = 'column' | 'row';
|
|
3
|
-
export declare type RadioButtonGroupProps = {
|
|
4
|
-
name?: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
errorMessage?: string;
|
|
7
|
-
tip?: string;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
readOnly?: boolean;
|
|
10
|
-
direction?: Direction;
|
|
11
|
-
value?: string | number;
|
|
12
|
-
groupId?: string;
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
required?: boolean;
|
|
15
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>, value: unknown) => void;
|
|
16
|
-
className?: string;
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
19
|
-
export declare const RadioButtonGroup: ({ name, label, groupId, errorMessage, tip, disabled, readOnly, direction, value, children, required, onChange, className, style, ...rest }: RadioButtonGroupProps) => JSX.Element;
|
|
20
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import * as CSS from 'csstype';
|
|
3
|
-
export declare type SkipToContentProps = {
|
|
4
|
-
text?: string;
|
|
5
|
-
href: string;
|
|
6
|
-
top?: CSS.Property.Top<string | number>;
|
|
7
|
-
} & HTMLAttributes<HTMLAnchorElement>;
|
|
8
|
-
export declare const SkipToContent: import("react").ForwardRefExoticComponent<{
|
|
9
|
-
text?: string | undefined;
|
|
10
|
-
href: string;
|
|
11
|
-
top?: CSS.Property.Top<string | number> | undefined;
|
|
12
|
-
} & HTMLAttributes<HTMLAnchorElement> & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
export declare type TableRowType = 'body' | 'head';
|
|
3
|
-
export declare type RowMode = 'normal' | 'sum';
|
|
4
|
-
export declare type TableRowProps = {
|
|
5
|
-
type?: TableRowType;
|
|
6
|
-
mode?: RowMode;
|
|
7
|
-
selected?: boolean;
|
|
8
|
-
hoverable?: boolean;
|
|
9
|
-
} & HTMLAttributes<HTMLTableRowElement>;
|
|
10
|
-
export declare const Row: import("react").ForwardRefExoticComponent<{
|
|
11
|
-
type?: TableRowType | undefined;
|
|
12
|
-
mode?: RowMode | undefined;
|
|
13
|
-
selected?: boolean | undefined;
|
|
14
|
-
hoverable?: boolean | undefined;
|
|
15
|
-
} & HTMLAttributes<HTMLTableRowElement> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
-
import { InputProps } from '../../helpers/Input';
|
|
3
|
-
export declare type TextInputProps = {
|
|
4
|
-
multiline?: boolean;
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
} & InputProps & InputHTMLAttributes<HTMLTextAreaElement>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import { Placement } from '../../hooks';
|
|
3
|
-
declare type AnchorElement = React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
4
|
-
export declare type TooltipProps = {
|
|
5
|
-
text: string;
|
|
6
|
-
placement?: Placement;
|
|
7
|
-
children: AnchorElement;
|
|
8
|
-
delay?: number;
|
|
9
|
-
tooltipId?: string;
|
|
10
|
-
} & HTMLAttributes<HTMLDivElement>;
|
|
11
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<{
|
|
12
|
-
text: string;
|
|
13
|
-
placement?: Placement | undefined;
|
|
14
|
-
children: AnchorElement;
|
|
15
|
-
delay?: number | undefined;
|
|
16
|
-
tooltipId?: string | undefined;
|
|
17
|
-
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
export {};
|