@norges-domstoler/dds-components 7.1.0 → 8.0.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 +1 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/cjs/components/Button/Button.stories.d.ts +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/cjs/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/cjs/components/DescriptionList/DescriptionList.stories.d.ts +1 -1
- package/dist/cjs/components/Divider/Divider.stories.d.ts +1 -1
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +1 -1
- package/dist/cjs/components/GlobalMessage/GlobalMessage.stories.d.ts +1 -1
- package/dist/cjs/components/InputMessage/InputMessage.stories.d.ts +1 -1
- package/dist/cjs/components/List/List.stories.d.ts +1 -1
- package/dist/cjs/components/LocalMessage/LocalMessage.stories.d.ts +1 -1
- package/dist/cjs/components/Modal/Modal.stories.d.ts +1 -1
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/cjs/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/cjs/components/Popover/Popover.d.ts +12 -4
- package/dist/cjs/components/Popover/Popover.stories.d.ts +4 -2
- package/dist/cjs/components/Popover/Popover.tokens.d.ts +11 -8
- package/dist/cjs/components/ProgressTracker/ProgressTracker.context.d.ts +6 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.d.ts +12 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.stories.d.ts +40 -0
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +69 -0
- package/dist/cjs/components/ProgressTracker/ProgressTrackerItem.d.ts +24 -0
- package/dist/cjs/components/ProgressTracker/index.d.ts +1 -0
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/cjs/components/Search/Search.d.ts +2 -2
- package/dist/cjs/components/Search/Search.stories.d.ts +7 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +4 -1
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/cjs/components/Table/Cell.d.ts +1 -1
- package/dist/cjs/components/Table/Table.d.ts +4 -0
- package/dist/cjs/components/Table/Table.stories.d.ts +7 -0
- package/dist/cjs/components/Table/Table.tokens.d.ts +72 -0
- package/dist/cjs/components/Tag/Tag.stories.d.ts +1 -1
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Caption/Caption.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Heading/Heading.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Label/Label.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Legend/Legend.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/cjs/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/cjs/helpers/Paper/Paper.d.ts +8 -1
- package/dist/cjs/helpers/Paper/Paper.tokens.d.ts +5 -2
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/useFocusTrap.d.ts +1 -1
- package/dist/cjs/hooks/useReturnFocusOnBlur.d.ts +31 -0
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1224 -1060
- package/dist/cjs/utils/getFocusableElements.d.ts +2 -0
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Button/Button.styles.js +1 -1
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +1 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/Chip/Chip.stories.d.ts +1 -1
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +1 -1
- package/dist/components/Divider/Divider.stories.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +3 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +1 -1
- package/dist/components/GlobalMessage/GlobalMessage.stories.d.ts +1 -1
- package/dist/components/Grid/Grid.context.js +1 -0
- package/dist/components/Grid/Grid.js +1 -0
- package/dist/components/Grid/Grid.tokens.js +1 -0
- package/dist/components/Grid/Grid.utils.js +1 -0
- package/dist/components/InputMessage/InputMessage.stories.d.ts +1 -1
- package/dist/components/List/List.stories.d.ts +1 -1
- package/dist/components/LocalMessage/LocalMessage.stories.d.ts +1 -1
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Modal/Modal.stories.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.js +1 -0
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +1 -1
- package/dist/components/OverflowMenu/OverflowMenuItem.js +2 -1
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts +12 -4
- package/dist/components/Popover/Popover.js +47 -22
- package/dist/components/Popover/Popover.stories.d.ts +4 -2
- package/dist/components/Popover/Popover.tokens.d.ts +11 -8
- package/dist/components/Popover/Popover.tokens.js +17 -28
- package/dist/components/Popover/PopoverGroup.js +9 -20
- package/dist/components/ProgressTracker/ProgressTracker.context.d.ts +6 -0
- package/dist/components/ProgressTracker/ProgressTracker.context.js +10 -0
- package/dist/components/ProgressTracker/ProgressTracker.d.ts +12 -0
- package/dist/components/ProgressTracker/ProgressTracker.js +93 -0
- package/dist/components/ProgressTracker/ProgressTracker.stories.d.ts +40 -0
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +69 -0
- package/dist/components/ProgressTracker/ProgressTracker.tokens.js +80 -0
- package/dist/components/ProgressTracker/ProgressTrackerItem.d.ts +24 -0
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +168 -0
- package/dist/components/ProgressTracker/index.d.ts +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +2 -2
- package/dist/components/Search/Search.js +36 -28
- package/dist/components/Search/Search.stories.d.ts +7 -1
- package/dist/components/Search/Search.tokens.d.ts +4 -1
- package/dist/components/Search/Search.tokens.js +6 -2
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/components/Table/Cell.d.ts +1 -1
- package/dist/components/Table/Cell.js +6 -4
- package/dist/components/Table/Row.js +12 -5
- package/dist/components/Table/SortCell.js +8 -11
- package/dist/components/Table/Table.d.ts +4 -0
- package/dist/components/Table/Table.js +8 -3
- package/dist/components/Table/Table.stories.d.ts +7 -0
- package/dist/components/Table/Table.tokens.d.ts +72 -0
- package/dist/components/Table/Table.tokens.js +69 -0
- package/dist/components/Tabs/Tab.js +2 -1
- package/dist/components/Tabs/TabList.js +1 -0
- package/dist/components/Tabs/TabPanels.js +1 -0
- package/dist/components/Tag/Tag.stories.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/Typography/Caption/Caption.stories.d.ts +1 -1
- package/dist/components/Typography/Heading/Heading.stories.d.ts +1 -1
- package/dist/components/Typography/Label/Label.stories.d.ts +1 -1
- package/dist/components/Typography/Legend/Legend.stories.d.ts +1 -1
- package/dist/components/Typography/Link/Link.stories.d.ts +1 -1
- package/dist/components/Typography/Paragraph/Paragraph.stories.d.ts +1 -1
- package/dist/components/Typography/Typography/Typography.js +1 -1
- package/dist/helpers/Paper/Paper.d.ts +8 -1
- package/dist/helpers/Paper/Paper.js +38 -2
- package/dist/helpers/Paper/Paper.tokens.d.ts +5 -2
- package/dist/helpers/Paper/Paper.tokens.js +8 -10
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useFocusTrap.d.ts +1 -1
- package/dist/hooks/useFocusTrap.js +4 -2
- package/dist/hooks/useReturnFocusOnBlur.d.ts +31 -0
- package/dist/hooks/useReturnFocusOnBlur.js +65 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/getFocusableElements.d.ts +2 -0
- package/dist/utils/getFocusableElements.js +5 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/components/Stepper/Step.d.ts +0 -20
- package/dist/cjs/components/Stepper/Stepper.context.d.ts +0 -6
- package/dist/cjs/components/Stepper/Stepper.d.ts +0 -11
- package/dist/cjs/components/Stepper/Stepper.stories.d.ts +0 -25
- package/dist/cjs/components/Stepper/Stepper.tokens.d.ts +0 -39
- package/dist/cjs/components/Stepper/index.d.ts +0 -2
- package/dist/cjs/components/Table/Cell.tokens.d.ts +0 -31
- package/dist/cjs/components/Table/Row.tokens.d.ts +0 -32
- package/dist/components/Stepper/Step.d.ts +0 -20
- package/dist/components/Stepper/Step.js +0 -118
- package/dist/components/Stepper/Stepper.context.d.ts +0 -6
- package/dist/components/Stepper/Stepper.context.js +0 -10
- package/dist/components/Stepper/Stepper.d.ts +0 -11
- package/dist/components/Stepper/Stepper.js +0 -66
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -25
- package/dist/components/Stepper/Stepper.tokens.d.ts +0 -39
- package/dist/components/Stepper/Stepper.tokens.js +0 -49
- package/dist/components/Stepper/index.d.ts +0 -2
- package/dist/components/Table/Cell.tokens.d.ts +0 -31
- package/dist/components/Table/Cell.tokens.js +0 -60
- package/dist/components/Table/Row.tokens.d.ts +0 -32
- package/dist/components/Table/Row.tokens.js +0 -73
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SearchProps } from './Search';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("../../helpers").InputProps, "tip"> & {
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("../../helpers").InputProps, "label" | "tip"> & {
|
|
5
5
|
componentSize?: import("./Search").SearchSize | undefined;
|
|
6
6
|
buttonProps?: ({
|
|
7
7
|
onClick: (event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
@@ -15,6 +15,11 @@ declare const _default: {
|
|
|
15
15
|
type: string;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
+
label: {
|
|
19
|
+
control: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
18
23
|
};
|
|
19
24
|
parameters: {
|
|
20
25
|
controls: {
|
|
@@ -24,5 +29,6 @@ declare const _default: {
|
|
|
24
29
|
};
|
|
25
30
|
export default _default;
|
|
26
31
|
export declare const Overview: (args: SearchProps) => JSX.Element;
|
|
32
|
+
export declare const OverviewSizes: (args: SearchProps) => JSX.Element;
|
|
27
33
|
export declare const Default: (args: SearchProps) => JSX.Element;
|
|
28
34
|
export declare const WithButton: (args: SearchProps) => JSX.Element;
|
|
@@ -33,9 +33,12 @@ var input = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
var
|
|
36
|
+
var horisontalContainer = {
|
|
37
37
|
gap: spacing.SizesDdsSpacingLocalX05
|
|
38
38
|
};
|
|
39
|
+
var outerContainer = {
|
|
40
|
+
gap: spacing.SizesDdsSpacingLocalX0125
|
|
41
|
+
};
|
|
39
42
|
var icon = {
|
|
40
43
|
base: {
|
|
41
44
|
left: spacing.SizesDdsSpacingLocalX075,
|
|
@@ -54,7 +57,8 @@ var icon = {
|
|
|
54
57
|
var searchTokens = {
|
|
55
58
|
input: input,
|
|
56
59
|
icon: icon,
|
|
57
|
-
|
|
60
|
+
horisontalContainer: horisontalContainer,
|
|
61
|
+
outerContainer: outerContainer
|
|
58
62
|
};
|
|
59
63
|
|
|
60
64
|
export { searchTokens };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SkipToContentProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLAnchorElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLAnchorElement>, "id" | "className"> & {
|
|
5
5
|
text?: string | undefined;
|
|
6
6
|
href: string;
|
|
7
7
|
top?: import("csstype").Property.Top<string | number> | undefined;
|
|
@@ -4,7 +4,7 @@ export declare type TableCellLayout = 'left' | 'right' | 'center' | 'text and ic
|
|
|
4
4
|
export declare type TableCellProps = {
|
|
5
5
|
/**Type celle. Returnerer enten `<td>` eller `<th>`. */
|
|
6
6
|
type?: TableCellType;
|
|
7
|
-
/**Layout av innholdet i cellen. 'tekst and icon' legger
|
|
7
|
+
/**Layout av innholdet i cellen. 'tekst and icon' legger `gap` mellom barna og andre barnet i cellen. */
|
|
8
8
|
layout?: TableCellLayout;
|
|
9
9
|
} & (TdHTMLAttributes<HTMLTableCellElement> | ThHTMLAttributes<HTMLTableCellElement>);
|
|
10
10
|
export declare const Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
@@ -2,7 +2,9 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { tableTokens } from './Table.tokens.js';
|
|
6
|
+
|
|
7
|
+
var cell = tableTokens.cell;
|
|
6
8
|
|
|
7
9
|
var layoutStyle = function layoutStyle(layout) {
|
|
8
10
|
switch (layout) {
|
|
@@ -13,7 +15,7 @@ var layoutStyle = function layoutStyle(layout) {
|
|
|
13
15
|
return css(["justify-content:flex-end;"]);
|
|
14
16
|
|
|
15
17
|
case 'text and icon':
|
|
16
|
-
return css(["
|
|
18
|
+
return css(["gap:", ";"], cell.layout.textAndIcon.gap);
|
|
17
19
|
|
|
18
20
|
default:
|
|
19
21
|
case 'left':
|
|
@@ -24,9 +26,9 @@ var layoutStyle = function layoutStyle(layout) {
|
|
|
24
26
|
var StyledCell = styled.td.withConfig({
|
|
25
27
|
displayName: "Cell__StyledCell",
|
|
26
28
|
componentId: "sc-ghfpfs-0"
|
|
27
|
-
})(["", "
|
|
29
|
+
})(["", ""], function (_ref) {
|
|
28
30
|
var type = _ref.type;
|
|
29
|
-
return type && css(["", ""],
|
|
31
|
+
return type === 'head' && css(["background-color:", ";"], cell.head.backgroundColor);
|
|
30
32
|
});
|
|
31
33
|
var InnerCell = styled.div.withConfig({
|
|
32
34
|
displayName: "Cell__InnerCell",
|
|
@@ -2,24 +2,31 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { focusVisibleInset } from '../../helpers/styling/focusVisible.js';
|
|
6
|
+
import '../../helpers/styling/hover.js';
|
|
7
|
+
import '../../helpers/styling/focus.js';
|
|
8
|
+
import '../../helpers/styling/danger.js';
|
|
9
|
+
import '../../helpers/styling/selection.js';
|
|
10
|
+
import { tableTokens } from './Table.tokens.js';
|
|
11
|
+
|
|
12
|
+
var row = tableTokens.row;
|
|
6
13
|
|
|
7
14
|
var bodyStyles = function bodyStyles(mode, selected) {
|
|
8
|
-
return css(["", " ", ""], mode && css(["", ""],
|
|
15
|
+
return css(["", " ", ""], mode === 'sum' && css(["font-weight:600;border-top:", ";border-bottom:", ";background-color:", ";"], row.body.mode.sum.borderTop, row.body.mode.sum.borderBottom, row.body.mode.sum.backgroundColor), selected && css(["background-color:", ";"], row.body.selected.backgroundColor));
|
|
9
16
|
};
|
|
10
17
|
|
|
11
18
|
var StyledRow = styled.tr.withConfig({
|
|
12
19
|
displayName: "Row__StyledRow",
|
|
13
20
|
componentId: "sc-15vvjkk-0"
|
|
14
|
-
})(["@media (prefers-reduced-motion:no-preference){transition:background-color 0.2s,border-color 0.2s,box-shadow 0.2s;}", " ", ""], function (_ref) {
|
|
21
|
+
})(["@media (prefers-reduced-motion:no-preference){transition:background-color 0.2s,border-color 0.2s,box-shadow 0.2s;}", " color:", ";", " ", ""], row.base.font, row.base.color, function (_ref) {
|
|
15
22
|
var type = _ref.type;
|
|
16
|
-
return type && css([""
|
|
23
|
+
return type === 'head' && css(["font-weight:600;text-align:left;"]);
|
|
17
24
|
}, function (_ref2) {
|
|
18
25
|
var type = _ref2.type,
|
|
19
26
|
mode = _ref2.mode,
|
|
20
27
|
selected = _ref2.selected,
|
|
21
28
|
hoverable = _ref2.hoverable;
|
|
22
|
-
return type === 'body' && css(["&:nth-of-type(even){", "
|
|
29
|
+
return type === 'body' && css(["&:nth-of-type(even){background-color:", ";", "}&:nth-of-type(odd){background-color:", ";", "}", " &:focus-visible,&.focus-visible{", "}"], row.body.even.backgroundColor, bodyStyles(mode, selected), row.body.odd.backgroundColor, bodyStyles(mode, selected), hoverable && css(["&:hover{background-color:", ";}"], row.body.hover.backgroundColor), focusVisibleInset);
|
|
23
30
|
});
|
|
24
31
|
var Row = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
25
32
|
var _a$type = _a.type,
|
|
@@ -2,7 +2,7 @@ import { __rest } from 'tslib';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Cell } from './Cell.js';
|
|
5
|
-
import {
|
|
5
|
+
import { tableTokens } from './Table.tokens.js';
|
|
6
6
|
import { Icon } from '../Icon/Icon.js';
|
|
7
7
|
import '../../icons/utils/StyledSvg.js';
|
|
8
8
|
import { ChevronDownIcon } from '../../icons/tsx/chevronDown.js';
|
|
@@ -10,33 +10,30 @@ import { ChevronUpIcon } from '../../icons/tsx/chevronUp.js';
|
|
|
10
10
|
import { UnfoldMoreIcon } from '../../icons/tsx/unfoldMore.js';
|
|
11
11
|
import styled from 'styled-components';
|
|
12
12
|
import { removeButtonStyling } from '../../helpers/styling/removeButtonStyling.js';
|
|
13
|
-
import '../../helpers/styling/focusVisible.js';
|
|
13
|
+
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
14
14
|
import '../../helpers/styling/hover.js';
|
|
15
15
|
import '../../helpers/styling/focus.js';
|
|
16
16
|
import '../../helpers/styling/danger.js';
|
|
17
17
|
import '../../helpers/styling/selection.js';
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
displayName: "SortCell__SortIcon",
|
|
21
|
-
componentId: "sc-1l3jzvh-0"
|
|
22
|
-
})(["", ""], cellTokens.head.sortCell.icon.base);
|
|
19
|
+
var cell = tableTokens.cell;
|
|
23
20
|
var StyledButton = styled.button.withConfig({
|
|
24
21
|
displayName: "SortCell__StyledButton",
|
|
25
|
-
componentId: "sc-1l3jzvh-
|
|
26
|
-
})(["", " display:flex;align-items:center;&:focus-visible{", "}"], removeButtonStyling,
|
|
22
|
+
componentId: "sc-1l3jzvh-0"
|
|
23
|
+
})(["user-select:text;", " display:flex;align-items:center;gap:", ";&:focus-visible{", "}"], removeButtonStyling, cell.sort.gap, focusVisible);
|
|
27
24
|
|
|
28
25
|
var makeSortIcon = function makeSortIcon(isSorted, sortOrder) {
|
|
29
26
|
if (!isSorted || !sortOrder) {
|
|
30
|
-
return jsx(
|
|
27
|
+
return jsx(Icon, {
|
|
31
28
|
icon: UnfoldMoreIcon,
|
|
32
29
|
iconSize: "inherit"
|
|
33
30
|
});
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
return sortOrder === 'ascending' ? jsx(
|
|
33
|
+
return sortOrder === 'ascending' ? jsx(Icon, {
|
|
37
34
|
icon: ChevronDownIcon,
|
|
38
35
|
iconSize: "inherit"
|
|
39
|
-
}) : jsx(
|
|
36
|
+
}) : jsx(Icon, {
|
|
40
37
|
icon: ChevronUpIcon,
|
|
41
38
|
iconSize: "inherit"
|
|
42
39
|
});
|
|
@@ -5,10 +5,14 @@ export declare type TableProps = {
|
|
|
5
5
|
density?: TableDensity;
|
|
6
6
|
/**Spesifiserer om cellene i `<Head>` skal bli sticky ved scrolling. */
|
|
7
7
|
stickyHeader?: boolean;
|
|
8
|
+
/**Legger skillelinjer mellom radene. */
|
|
9
|
+
withDividers?: boolean;
|
|
8
10
|
} & HTMLAttributes<HTMLTableElement>;
|
|
9
11
|
export declare const Table: import("react").ForwardRefExoticComponent<{
|
|
10
12
|
/**Spesifiserer hvor romslige cellene i tabellen skal være. */
|
|
11
13
|
density?: TableDensity | undefined;
|
|
12
14
|
/**Spesifiserer om cellene i `<Head>` skal bli sticky ved scrolling. */
|
|
13
15
|
stickyHeader?: boolean | undefined;
|
|
16
|
+
/**Legger skillelinjer mellom radene. */
|
|
17
|
+
withDividers?: boolean | undefined;
|
|
14
18
|
} & HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
@@ -10,17 +10,22 @@ import { selection } from '../../helpers/styling/selection.js';
|
|
|
10
10
|
import '../ScrollableContainer/Scrollbar.js';
|
|
11
11
|
import '../ScrollableContainer/ScrollableContainer.js';
|
|
12
12
|
import { scrollbarStyling } from '../ScrollableContainer/scrollbarStyling.js';
|
|
13
|
-
import {
|
|
13
|
+
import { tableTokens } from './Table.tokens.js';
|
|
14
14
|
|
|
15
|
+
var cell = tableTokens.cell,
|
|
16
|
+
row = tableTokens.row;
|
|
15
17
|
var StyledTable = styled.table.withConfig({
|
|
16
18
|
displayName: "Table__StyledTable",
|
|
17
19
|
componentId: "sc-bw0w0a-0"
|
|
18
|
-
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
20
|
+
})(["border-spacing:0;border-collapse:collapse;*::selection{", "}", " ", " ", " ", " ", ""], selection, scrollbarStyling.webkit, scrollbarStyling.firefox, function (_ref) {
|
|
19
21
|
var density = _ref.density;
|
|
20
|
-
return
|
|
22
|
+
return css(["td,th{padding:", ";}"], cell.density[density].padding);
|
|
21
23
|
}, function (_ref2) {
|
|
22
24
|
var stickyHeader = _ref2.stickyHeader;
|
|
23
25
|
return stickyHeader && css(["tr[type='head']{th[type='head']{position:sticky;top:0;}}"]);
|
|
26
|
+
}, function (_ref3) {
|
|
27
|
+
var withDividers = _ref3.withDividers;
|
|
28
|
+
return withDividers && css(["tr[type='body']{border-bottom:", ";}"], row.body.withDividers.borderBottom);
|
|
24
29
|
});
|
|
25
30
|
var Table = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
26
31
|
var _a$density = _a.density,
|
|
@@ -4,6 +4,7 @@ declare const _default: {
|
|
|
4
4
|
component: import("react").ForwardRefExoticComponent<{
|
|
5
5
|
density?: import("./Table").TableDensity | undefined;
|
|
6
6
|
stickyHeader?: boolean | undefined;
|
|
7
|
+
withDividers?: boolean | undefined;
|
|
7
8
|
} & import("react").HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
8
9
|
argTypes: {
|
|
9
10
|
stickyHeader: {
|
|
@@ -11,10 +12,16 @@ declare const _default: {
|
|
|
11
12
|
type: string;
|
|
12
13
|
};
|
|
13
14
|
};
|
|
15
|
+
withDividers: {
|
|
16
|
+
control: {
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
14
20
|
};
|
|
15
21
|
};
|
|
16
22
|
export default _default;
|
|
17
23
|
export declare const Default: (args: TableProps) => JSX.Element;
|
|
24
|
+
export declare const withDividers: (args: TableProps) => JSX.Element;
|
|
18
25
|
export declare const Focusable: (args: TableProps) => JSX.Element;
|
|
19
26
|
export declare const Compact: (args: TableProps) => JSX.Element;
|
|
20
27
|
export declare const StickyHeader: (args: TableProps) => JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const tableTokens: {
|
|
2
|
+
row: {
|
|
3
|
+
base: {
|
|
4
|
+
color: string;
|
|
5
|
+
font: {
|
|
6
|
+
lineHeight: any;
|
|
7
|
+
fontSize: string;
|
|
8
|
+
letterSpacing: any;
|
|
9
|
+
fontFamily: any;
|
|
10
|
+
fontWeight: any;
|
|
11
|
+
fontStyle: any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
body: {
|
|
15
|
+
odd: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
even: {
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
};
|
|
21
|
+
hover: {
|
|
22
|
+
backgroundColor: string;
|
|
23
|
+
};
|
|
24
|
+
selected: {
|
|
25
|
+
backgroundColor: string;
|
|
26
|
+
};
|
|
27
|
+
mode: {
|
|
28
|
+
sum: {
|
|
29
|
+
font: {
|
|
30
|
+
lineHeight: any;
|
|
31
|
+
fontSize: string;
|
|
32
|
+
letterSpacing: any;
|
|
33
|
+
fontFamily: any;
|
|
34
|
+
fontWeight: any;
|
|
35
|
+
fontStyle: any;
|
|
36
|
+
};
|
|
37
|
+
borderTop: string;
|
|
38
|
+
borderBottom: string;
|
|
39
|
+
backgroundColor: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
withDividers: {
|
|
43
|
+
borderBottom: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
cell: {
|
|
48
|
+
density: {
|
|
49
|
+
normal: {
|
|
50
|
+
padding: string;
|
|
51
|
+
};
|
|
52
|
+
compact: {
|
|
53
|
+
padding: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
head: {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
};
|
|
59
|
+
sort: {
|
|
60
|
+
gap: string;
|
|
61
|
+
icon: {
|
|
62
|
+
marginInlineStart: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
layout: {
|
|
66
|
+
textAndIcon: {
|
|
67
|
+
gap: string;
|
|
68
|
+
marginRight: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ddsBaseTokens, ddsReferenceTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
+
|
|
3
|
+
var colors = ddsBaseTokens.colors,
|
|
4
|
+
fontPackages = ddsBaseTokens.fontPackages,
|
|
5
|
+
border = ddsBaseTokens.border,
|
|
6
|
+
spacing = ddsBaseTokens.spacing;
|
|
7
|
+
var textDefault = ddsReferenceTokens.textDefault;
|
|
8
|
+
var row = {
|
|
9
|
+
base: {
|
|
10
|
+
color: textDefault.textColor,
|
|
11
|
+
font: fontPackages.body_sans_02.base
|
|
12
|
+
},
|
|
13
|
+
body: {
|
|
14
|
+
odd: {
|
|
15
|
+
backgroundColor: colors.DdsColorNeutralsWhite
|
|
16
|
+
},
|
|
17
|
+
even: {
|
|
18
|
+
backgroundColor: colors.DdsColorNeutralsGray1
|
|
19
|
+
},
|
|
20
|
+
hover: {
|
|
21
|
+
backgroundColor: colors.DdsColorInteractiveLightest
|
|
22
|
+
},
|
|
23
|
+
selected: {
|
|
24
|
+
backgroundColor: colors.DdsColorInteractiveLightest
|
|
25
|
+
},
|
|
26
|
+
mode: {
|
|
27
|
+
sum: {
|
|
28
|
+
font: fontPackages.body_sans_02.base,
|
|
29
|
+
borderTop: "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid ").concat(colors.DdsColorNeutralsGray4),
|
|
30
|
+
borderBottom: "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid ").concat(colors.DdsColorNeutralsGray4),
|
|
31
|
+
backgroundColor: colors.DdsColorNeutralsWhite
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
withDividers: {
|
|
35
|
+
borderBottom: "1px solid ".concat(colors.DdsColorNeutralsGray4)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var cell = {
|
|
40
|
+
density: {
|
|
41
|
+
normal: {
|
|
42
|
+
padding: "".concat(spacing.SizesDdsSpacingLocalX15, " ").concat(spacing.SizesDdsSpacingLocalX075)
|
|
43
|
+
},
|
|
44
|
+
compact: {
|
|
45
|
+
padding: "".concat(spacing.SizesDdsSpacingLocalX075)
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
head: {
|
|
49
|
+
backgroundColor: colors.DdsColorPrimaryLightest
|
|
50
|
+
},
|
|
51
|
+
sort: {
|
|
52
|
+
gap: spacing.SizesDdsSpacingLocalX05,
|
|
53
|
+
icon: {
|
|
54
|
+
marginInlineStart: spacing.SizesDdsSpacingLocalX05
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
layout: {
|
|
58
|
+
textAndIcon: {
|
|
59
|
+
gap: spacing.SizesDdsSpacingLocalX075,
|
|
60
|
+
marginRight: spacing.SizesDdsSpacingLocalX075
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var tableTokens = {
|
|
65
|
+
row: row,
|
|
66
|
+
cell: cell
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { tableTokens };
|
|
@@ -7,6 +7,7 @@ import { tabsTokens } from './Tabs.tokens.js';
|
|
|
7
7
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
8
8
|
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
9
9
|
import '../../hooks/useFloatPosition.js';
|
|
10
|
+
import '../../utils/color.js';
|
|
10
11
|
import '../../hooks/useScreenSize.js';
|
|
11
12
|
import { useTabsContext } from './Tabs.context.js';
|
|
12
13
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
@@ -19,7 +20,7 @@ import '../../helpers/styling/selection.js';
|
|
|
19
20
|
var Button = styled.button.withConfig({
|
|
20
21
|
displayName: "Tab__Button",
|
|
21
22
|
componentId: "sc-1dd8soq-0"
|
|
22
|
-
})(["
|
|
23
|
+
})(["user-select:text;@media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s,border-bottom 0.2s,color 0.2s,", ";}", " ", ";", " &:focus-visible{", "}&:hover{", "}"], focusVisibleTransitionValue, tabsTokens.tab.base, function (_ref) {
|
|
23
24
|
var direction = _ref.direction;
|
|
24
25
|
return tabsTokens.tab.direction[direction].base;
|
|
25
26
|
}, function (_ref2) {
|
|
@@ -9,6 +9,7 @@ import { useOnClickOutside } from '../../hooks/useOnClickOutside.js';
|
|
|
9
9
|
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
10
10
|
import '../../hooks/useFloatPosition.js';
|
|
11
11
|
import { useRoveFocus } from '../../hooks/useRoveFocus.js';
|
|
12
|
+
import '../../utils/color.js';
|
|
12
13
|
import '../../hooks/useScreenSize.js';
|
|
13
14
|
import { useTabsContext } from './Tabs.context.js';
|
|
14
15
|
import '../ScrollableContainer/Scrollbar.js';
|
|
@@ -3,6 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { forwardRef, Children, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
5
5
|
import '../../hooks/useFloatPosition.js';
|
|
6
|
+
import '../../utils/color.js';
|
|
6
7
|
import '../../hooks/useScreenSize.js';
|
|
7
8
|
import { useTabsContext } from './Tabs.context.js';
|
|
8
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TagProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLSpanElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLSpanElement>, "id" | "className"> & {
|
|
5
5
|
text?: string | undefined;
|
|
6
6
|
purpose?: import("./Tag").TagPurpose | undefined;
|
|
7
7
|
} & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToggleButtonProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "id" | "className"> & {
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
icon?: import("../../icons/utils").SvgIcon | undefined;
|
|
7
7
|
} & {
|
|
@@ -5,10 +5,10 @@ import { forwardRef, useId, useState, useEffect, Children, isValidElement, clone
|
|
|
5
5
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
6
6
|
import { useOnKeyDown } from '../../hooks/useOnKeyDown.js';
|
|
7
7
|
import { useFloatPosition } from '../../hooks/useFloatPosition.js';
|
|
8
|
-
import '../../hooks/useScreenSize.js';
|
|
9
|
-
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
10
8
|
import { combineHandlers } from '../../utils/combineHandlers.js';
|
|
11
9
|
import '../../utils/color.js';
|
|
10
|
+
import '../../hooks/useScreenSize.js';
|
|
11
|
+
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
12
12
|
import { Container, TooltipWrapper, ArrowWrapper, SvgArrow } from './Tooltip.styles.js';
|
|
13
13
|
import { tooltipTokens } from './Tooltip.tokens.js';
|
|
14
14
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TooltipProps } from '.';
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "style" | "children" | "onMouseLeave" | "onMouseOver">, "
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").HTMLAttributes<HTMLDivElement>, "style" | "children" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
|
|
5
5
|
text: string;
|
|
6
6
|
placement?: import("../..").Placement | undefined;
|
|
7
7
|
children: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> & import("react").RefAttributes<HTMLElement>;
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & CaptionProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLTableCaptionElement>, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLTableCaptionElement>, "id" | "className"> & {
|
|
8
8
|
withMargins?: boolean | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
children?: import("react").ReactNode;
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & HeadingProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHeadingElement>, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLHeadingElement>, "id" | "className"> & {
|
|
8
8
|
level: import("./Heading").HeadingLevel;
|
|
9
9
|
typographyType?: import("..").TypographyHeadingType | undefined;
|
|
10
10
|
} & {
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & LabelProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").LabelHTMLAttributes<HTMLLabelElement>, "htmlFor">, "id" | "className"> & {
|
|
8
8
|
showRequiredStyling?: boolean | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
withMargins?: boolean | undefined;
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & LegendProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLLegendElement>, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLLegendElement>, "id" | "className"> & {
|
|
8
8
|
withMargins?: boolean | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
children?: import("react").ReactNode;
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & LinkProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "href" | "target">, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "href" | "target">, "id" | "className"> & {
|
|
8
8
|
external?: boolean | undefined;
|
|
9
9
|
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | undefined;
|
|
10
10
|
} & {
|
|
@@ -4,7 +4,7 @@ declare type StoryTProps = {
|
|
|
4
4
|
} & ParagraphProps;
|
|
5
5
|
declare const _default: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLParagraphElement>, "
|
|
7
|
+
component: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLParagraphElement>, "id" | "className"> & {
|
|
8
8
|
typographyType?: ("bodySans01" | "bodySans02" | "bodySans03" | "bodySans04") | import("..").TypographyLeadType | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
withMargins?: boolean | undefined;
|
|
@@ -18,7 +18,7 @@ import { getTextColor } from '../../../utils/color.js';
|
|
|
18
18
|
var StyledTypography = styled.p.withConfig({
|
|
19
19
|
displayName: "Typography__StyledTypography",
|
|
20
20
|
componentId: "sc-1tegrnl-0"
|
|
21
|
-
})(["
|
|
21
|
+
})(["user-select:text;&::selection,*::selection{", "}", " ", " ", " color:", ";", " ", ";"], selection, function (_ref) {
|
|
22
22
|
var typographyType = _ref.typographyType,
|
|
23
23
|
externalLink = _ref.externalLink,
|
|
24
24
|
interactionProps = _ref.interactionProps;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
declare type Elevation = 1 | 2 | 3 | 4;
|
|
2
|
+
declare type Border = 'light' | 'dark';
|
|
3
|
+
declare type PaperProps = {
|
|
4
|
+
elevation?: Elevation;
|
|
5
|
+
border?: Border;
|
|
6
|
+
};
|
|
7
|
+
export declare const Paper: import("styled-components").StyledComponent<"div", any, PaperProps, never>;
|
|
8
|
+
export {};
|
|
@@ -1,14 +1,50 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
2
|
import '../styling/focusVisible.js';
|
|
3
3
|
import '../styling/hover.js';
|
|
4
4
|
import '../styling/focus.js';
|
|
5
5
|
import '../styling/danger.js';
|
|
6
6
|
import { selection } from '../styling/selection.js';
|
|
7
7
|
import { paperTokens } from './Paper.tokens.js';
|
|
8
|
+
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
9
|
+
|
|
10
|
+
var outerShadow = ddsBaseTokens.outerShadow,
|
|
11
|
+
border = ddsBaseTokens.border;
|
|
12
|
+
|
|
13
|
+
var getElevation = function getElevation(elevation) {
|
|
14
|
+
switch (elevation) {
|
|
15
|
+
case 1:
|
|
16
|
+
return outerShadow.DdsShadow1Onlight;
|
|
17
|
+
|
|
18
|
+
case 2:
|
|
19
|
+
return outerShadow.DdsShadow2Onlight;
|
|
20
|
+
|
|
21
|
+
case 3:
|
|
22
|
+
return outerShadow.DdsShadow3Onlight;
|
|
23
|
+
|
|
24
|
+
case 4:
|
|
25
|
+
return outerShadow.DdsShadow4Onlight;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
var getBorder = function getBorder(borderStyle) {
|
|
30
|
+
switch (borderStyle) {
|
|
31
|
+
case 'light':
|
|
32
|
+
return "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid ").concat(border.BordersDdsBorderStyleLightStroke);
|
|
33
|
+
|
|
34
|
+
case 'dark':
|
|
35
|
+
return "".concat(border.BordersDdsBorderStyleDarkStrokeWeight, " solid ").concat(border.BordersDdsBorderStyleDarkStroke);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
8
38
|
|
|
9
39
|
var Paper = styled.div.withConfig({
|
|
10
40
|
displayName: "Paper",
|
|
11
41
|
componentId: "sc-mrbi8q-0"
|
|
12
|
-
})(["box-sizing:border-box;margin:0;&::selection,*::selection{", "}", ""],
|
|
42
|
+
})(["box-sizing:border-box;margin:0;background-color:", ";font-family:", ";border-radius:", ";&::selection,*::selection{", "}", " border:", ""], paperTokens.paper.backgroundColor, paperTokens.paper.fontFamily, paperTokens.paper.borderRadius, selection, function (_ref) {
|
|
43
|
+
var elevation = _ref.elevation;
|
|
44
|
+
return elevation && css(["box-shadow:", ";"], getElevation(elevation));
|
|
45
|
+
}, function (_ref2) {
|
|
46
|
+
var border = _ref2.border;
|
|
47
|
+
return border ? getBorder(border) : 'none';
|
|
48
|
+
});
|
|
13
49
|
|
|
14
50
|
export { Paper };
|