@norges-domstoler/dds-components 9.1.1 → 9.2.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 +2 -1
- package/dist/assets/svg/bullets/jordskifterett_bullet1.svg.js +2 -2
- package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
- package/dist/cjs/components/Button/Button.stories.d.ts +4 -4
- package/dist/cjs/components/Button/Button.styles.d.ts +1 -0
- package/dist/cjs/components/Button/Button.tokens.d.ts +294 -165
- package/dist/cjs/components/Card/Card.tokens.d.ts +17 -16
- package/dist/cjs/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -3
- package/dist/cjs/components/Chip/Chip.tokens.d.ts +8 -6
- package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
- package/dist/cjs/components/Divider/Divider.tokens.d.ts +11 -6
- package/dist/cjs/components/Drawer/Drawer.tokens.d.ts +3 -11
- package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
- package/dist/cjs/components/Grid/Grid.d.ts +8 -7
- package/dist/cjs/components/Grid/Grid.tokens.d.ts +5 -5
- package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
- package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
- package/dist/cjs/components/List/List.d.ts +1 -1
- package/dist/cjs/components/List/List.tokens.d.ts +21 -9
- package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
- package/dist/cjs/components/Modal/Modal.tokens.d.ts +5 -6
- package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +4 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
- package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
- package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
- package/dist/cjs/components/Pagination/Pagination.tokens.d.ts +7 -8
- package/dist/cjs/components/Popover/Popover.tokens.d.ts +0 -1
- package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
- package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +4 -4
- package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +2 -4
- package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/cjs/components/Search/Search.tokens.d.ts +5 -24
- package/dist/cjs/components/Select/Select.tokens.d.ts +14 -127
- package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +2 -2
- package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/cjs/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
- package/dist/cjs/components/SplitButton/SplitButton.d.ts +11 -0
- package/dist/cjs/components/SplitButton/SplitButton.stories.d.ts +9 -0
- package/dist/cjs/components/SplitButton/index.d.ts +1 -0
- package/dist/cjs/components/Table/Table.tokens.d.ts +0 -19
- package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +21 -22
- package/dist/cjs/components/Tag/Tag.d.ts +1 -1
- package/dist/cjs/components/Tag/Tag.tokens.d.ts +19 -14
- package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +0 -3
- package/dist/cjs/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
- package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
- package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +4 -1
- package/dist/cjs/components/Tooltip/Tooltip.tokens.d.ts +1 -2
- package/dist/cjs/components/Typography/Typography.utils.d.ts +195 -1
- package/dist/cjs/helpers/Input/Input.tokens.d.ts +2 -68
- package/dist/cjs/helpers/Input/Input.types.d.ts +4 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
- package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
- package/dist/cjs/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
- package/dist/cjs/helpers/TextOverflowEllipsis/index.d.ts +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1475 -1822
- package/dist/cjs/utils/color.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
- package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +3 -4
- package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -2
- package/dist/components/Button/Button.js +7 -4
- package/dist/components/Button/Button.stories.d.ts +4 -4
- package/dist/components/Button/Button.styles.d.ts +1 -0
- package/dist/components/Button/Button.styles.js +49 -24
- package/dist/components/Button/Button.tokens.d.ts +294 -165
- package/dist/components/Button/Button.tokens.js +232 -349
- package/dist/components/Card/Card.js +6 -5
- package/dist/components/Card/Card.tokens.d.ts +17 -16
- package/dist/components/Card/Card.tokens.js +26 -54
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
- package/dist/components/Card/CardAccordion/CardAccordion.tokens.js +37 -0
- package/dist/components/Card/CardAccordion/CardAccordionBody.js +4 -3
- package/dist/components/Card/CardAccordion/CardAccordionHeader.js +9 -6
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -3
- package/dist/components/Checkbox/CheckboxGroup.js +3 -16
- package/dist/components/Chip/Chip.js +9 -9
- package/dist/components/Chip/Chip.tokens.d.ts +8 -6
- package/dist/components/Chip/Chip.tokens.js +8 -25
- package/dist/components/Chip/ChipGroup.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.js +3 -2
- package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
- package/dist/components/DescriptionList/DescriptionList.tokens.js +7 -18
- package/dist/components/DescriptionList/DescriptionListDesc.js +3 -2
- package/dist/components/Divider/Divider.js +6 -6
- package/dist/components/Divider/Divider.tokens.d.ts +11 -6
- package/dist/components/Divider/Divider.tokens.js +16 -16
- package/dist/components/Drawer/Drawer.js +11 -4
- package/dist/components/Drawer/Drawer.tokens.d.ts +3 -11
- package/dist/components/Drawer/Drawer.tokens.js +10 -26
- package/dist/components/GlobalMessage/GlobalMessage.js +13 -10
- package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
- package/dist/components/GlobalMessage/GlobalMessage.tokens.js +45 -64
- package/dist/components/Grid/Grid.d.ts +8 -7
- package/dist/components/Grid/Grid.js +7 -5
- package/dist/components/Grid/Grid.tokens.d.ts +5 -5
- package/dist/components/Grid/Grid.tokens.js +5 -5
- package/dist/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
- package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
- package/dist/components/InternalHeader/InternalHeader.tokens.js +6 -6
- package/dist/components/InternalHeader/NavigationItem.js +3 -2
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +8 -7
- package/dist/components/List/List.tokens.d.ts +21 -9
- package/dist/components/List/List.tokens.js +26 -20
- package/dist/components/List/ListItem.js +2 -2
- package/dist/components/LocalMessage/LocalMessage.js +19 -15
- package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
- package/dist/components/LocalMessage/LocalMessage.tokens.js +94 -127
- package/dist/components/Modal/Modal.js +9 -5
- package/dist/components/Modal/Modal.tokens.d.ts +5 -6
- package/dist/components/Modal/Modal.tokens.js +11 -31
- package/dist/components/Modal/ModalActions.js +1 -1
- package/dist/components/OverflowMenu/OverflowMenu.d.ts +4 -3
- package/dist/components/OverflowMenu/OverflowMenu.js +12 -3
- package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
- package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
- package/dist/components/OverflowMenu/OverflowMenu.tokens.js +5 -5
- package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
- package/dist/components/OverflowMenu/OverflowMenuGroup.js +1 -0
- package/dist/components/OverflowMenu/OverflowMenuItem.js +3 -2
- package/dist/components/Pagination/Pagination.js +13 -8
- package/dist/components/Pagination/Pagination.tokens.d.ts +7 -8
- package/dist/components/Pagination/Pagination.tokens.js +17 -16
- package/dist/components/Popover/Popover.tokens.d.ts +0 -1
- package/dist/components/Popover/Popover.tokens.js +0 -1
- package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
- package/dist/components/ProgressTracker/ProgressTracker.tokens.js +11 -9
- package/dist/components/ProgressTracker/ProgressTrackerItem.js +7 -6
- package/dist/components/RadioButton/RadioButton.stories.d.ts +4 -4
- package/dist/components/RadioButton/RadioButtonGroup.d.ts +2 -4
- package/dist/components/RadioButton/RadioButtonGroup.js +3 -15
- package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
- package/dist/components/Search/Search.js +3 -2
- package/dist/components/Search/Search.tokens.d.ts +5 -24
- package/dist/components/Search/Search.tokens.js +6 -5
- package/dist/components/Select/Select.js +5 -3
- package/dist/components/Select/Select.styles.js +13 -14
- package/dist/components/Select/Select.tokens.d.ts +14 -127
- package/dist/components/Select/Select.tokens.js +28 -36
- package/dist/components/SkipToContent/SkipToContent.d.ts +2 -2
- package/dist/components/SkipToContent/SkipToContent.js +7 -4
- package/dist/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
- package/dist/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
- package/dist/components/SkipToContent/SkipToContent.tokens.js +14 -37
- package/dist/components/Spinner/Spinner.js +1 -2
- package/dist/components/SplitButton/SplitButton.d.ts +11 -0
- package/dist/components/SplitButton/SplitButton.js +62 -0
- package/dist/components/SplitButton/SplitButton.stories.d.ts +9 -0
- package/dist/components/SplitButton/index.d.ts +1 -0
- package/dist/components/Table/Row.js +2 -1
- package/dist/components/Table/Table.tokens.d.ts +0 -19
- package/dist/components/Table/Table.tokens.js +1 -8
- package/dist/components/Tabs/Tab.js +8 -5
- package/dist/components/Tabs/TabPanel.js +4 -3
- package/dist/components/Tabs/Tabs.tokens.d.ts +21 -22
- package/dist/components/Tabs/Tabs.tokens.js +31 -79
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +8 -21
- package/dist/components/Tag/Tag.tokens.d.ts +19 -14
- package/dist/components/Tag/Tag.tokens.js +14 -41
- package/dist/components/TextArea/TextArea.js +3 -2
- package/dist/components/TextInput/TextInput.tokens.d.ts +0 -3
- package/dist/components/TextInput/TextInput.tokens.js +0 -3
- package/dist/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
- package/dist/components/ToggleBar/ToggleBar.tokens.js +7 -5
- package/dist/components/ToggleBar/ToggleRadio.styles.js +3 -2
- package/dist/components/ToggleButton/ToggleButton.js +14 -8
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
- package/dist/components/ToggleButton/ToggleButton.tokens.js +26 -49
- package/dist/components/ToggleButton/ToggleButtonGroup.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +6 -2
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.styles.d.ts +4 -1
- package/dist/components/Tooltip/Tooltip.styles.js +15 -4
- package/dist/components/Tooltip/Tooltip.tokens.d.ts +1 -2
- package/dist/components/Tooltip/Tooltip.tokens.js +14 -24
- package/dist/components/Typography/Typography.utils.d.ts +195 -1
- package/dist/components/Typography/Typography.utils.js +7 -1
- package/dist/helpers/Input/Input.styles.js +3 -2
- package/dist/helpers/Input/Input.tokens.d.ts +2 -68
- package/dist/helpers/Input/Input.tokens.js +10 -46
- package/dist/helpers/Input/Input.types.d.ts +4 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
- package/dist/helpers/SelectionControl/SelectionControl.styles.js +15 -2
- package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
- package/dist/helpers/SelectionControl/SelectionControl.tokens.js +14 -1
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
- package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.js +12 -0
- package/dist/helpers/TextOverflowEllipsis/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/color.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
- package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
- package/dist/cjs/components/List/ListItem.tokens.d.ts +0 -5
- package/dist/cjs/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
- package/dist/cjs/components/Spinner/Spinner.tokens.d.ts +0 -6
- package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
- package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.js +0 -12
- package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
- package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.js +0 -38
- package/dist/components/Checkbox/CheckboxGroup.tokens.js +0 -20
- package/dist/components/List/ListItem.tokens.d.ts +0 -5
- package/dist/components/List/ListItem.tokens.js +0 -12
- package/dist/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
- package/dist/components/RadioButton/RadioButtonGroup.tokens.js +0 -32
- package/dist/components/Spinner/Spinner.tokens.d.ts +0 -6
- package/dist/components/Spinner/Spinner.tokens.js +0 -13
|
@@ -11,22 +11,25 @@ import '../../utils/color.js';
|
|
|
11
11
|
import '../../hooks/useScreenSize.js';
|
|
12
12
|
import { useTabsContext } from './Tabs.context.js';
|
|
13
13
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
14
|
-
import {
|
|
14
|
+
import { removeButtonStyling } from '../../helpers/styling/removeButtonStyling.js';
|
|
15
|
+
import { focusVisibleTransitionValue, focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
15
16
|
import '../../helpers/styling/hover.js';
|
|
16
17
|
import '../../helpers/styling/focus.js';
|
|
17
18
|
import '../../helpers/styling/danger.js';
|
|
18
19
|
import '../../helpers/styling/selection.js';
|
|
20
|
+
import { getFontStyling, defaultTypographyType } from '../Typography/Typography.utils.js';
|
|
19
21
|
|
|
22
|
+
var tab = tabsTokens.tab;
|
|
20
23
|
var Button = styled.button.withConfig({
|
|
21
24
|
displayName: "Tab__Button",
|
|
22
25
|
componentId: "sc-1dd8soq-0"
|
|
23
|
-
})(["user-select:text
|
|
26
|
+
})(["", " user-select:text;display:flex;align-items:center;justify-content:center;border-bottom:", ";color:", ";padding:", ";", " @media (prefers-reduced-motion:no-preference){transition:box-shadow 0.2s,border-bottom 0.2s,color 0.2s,", ";}", ";", " &:focus-visible{", " outline-offset:-1px;}&:hover{border-color:", ";color:", ";box-shadow:", ";}"], removeButtonStyling, tab.base.borderBottom, tab.base.color, tab.base.padding, getFontStyling(defaultTypographyType), focusVisibleTransitionValue, function (_ref) {
|
|
24
27
|
var direction = _ref.direction;
|
|
25
|
-
return
|
|
28
|
+
return css(["flex-direction:", ";gap:", ";"], direction, tab[direction].gap);
|
|
26
29
|
}, function (_ref2) {
|
|
27
30
|
var active = _ref2.active;
|
|
28
|
-
return active && css(["", ""],
|
|
29
|
-
},
|
|
31
|
+
return active && css(["background-color:", ";border-color:", ";color:", ";box-shadow:", ";"], tab.active.backgroundColor, tab.active.borderColor, tab.active.color, tab.active.boxShadow);
|
|
32
|
+
}, focusVisible, tab.hover.borderColor, tab.hover.color, tab.hover.boxShadow);
|
|
30
33
|
var Tab = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
31
34
|
var _props$active = props.active,
|
|
32
35
|
active = _props$active === void 0 ? false : _props$active,
|
|
@@ -2,7 +2,7 @@ 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 { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
|
|
5
|
+
import { focusVisibleTransitionValue, focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
6
6
|
import '../../helpers/styling/hover.js';
|
|
7
7
|
import '../../helpers/styling/focus.js';
|
|
8
8
|
import '../../helpers/styling/danger.js';
|
|
@@ -10,13 +10,14 @@ import '../../helpers/styling/selection.js';
|
|
|
10
10
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
11
11
|
import { tabsTokens } from './Tabs.tokens.js';
|
|
12
12
|
|
|
13
|
+
var panel = tabsTokens.panel;
|
|
13
14
|
var Panel = styled.div.withConfig({
|
|
14
15
|
displayName: "TabPanel__Panel",
|
|
15
16
|
componentId: "sc-vkzivq-0"
|
|
16
|
-
})(["
|
|
17
|
+
})(["padding:", ";@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:focus-visible{", "}"], panel.padding, focusVisibleTransitionValue, function (_ref) {
|
|
17
18
|
var active = _ref.active;
|
|
18
19
|
return !active && css(["display:none;"]);
|
|
19
|
-
},
|
|
20
|
+
}, focusVisible);
|
|
20
21
|
var TabPanel = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
21
22
|
var _a$active = _a.active,
|
|
22
23
|
active = _a$active === void 0 ? false : _a$active,
|
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
import { CSSObject } from 'styled-components';
|
|
2
1
|
export declare const tabsTokens: {
|
|
3
|
-
tabList:
|
|
2
|
+
tabList: {
|
|
3
|
+
borderBottom: string;
|
|
4
|
+
};
|
|
4
5
|
tab: {
|
|
5
|
-
base:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
base: {
|
|
7
|
+
borderBottom: string;
|
|
8
|
+
color: string;
|
|
9
|
+
padding: string;
|
|
10
|
+
};
|
|
11
|
+
row: {
|
|
12
|
+
gap: string;
|
|
13
|
+
};
|
|
14
|
+
column: {
|
|
15
|
+
gap: string;
|
|
13
16
|
};
|
|
14
17
|
active: {
|
|
15
|
-
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
color: string;
|
|
20
|
+
boxShadow: string;
|
|
21
|
+
borderColor: string;
|
|
16
22
|
};
|
|
17
23
|
hover: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
focus: {
|
|
24
|
-
base: CSSObject;
|
|
24
|
+
color: string;
|
|
25
|
+
boxShadow: string;
|
|
26
|
+
borderColor: string;
|
|
25
27
|
};
|
|
26
28
|
};
|
|
27
29
|
panel: {
|
|
28
|
-
|
|
29
|
-
focusVisible: {
|
|
30
|
-
base: CSSObject;
|
|
31
|
-
};
|
|
30
|
+
padding: string;
|
|
32
31
|
};
|
|
33
32
|
};
|
|
@@ -1,90 +1,42 @@
|
|
|
1
1
|
import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
|
|
2
|
-
import { removeButtonStyling } from '../../helpers/styling/removeButtonStyling.js';
|
|
3
|
-
import 'styled-components';
|
|
4
|
-
import { focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
5
|
-
import '../../helpers/styling/hover.js';
|
|
6
|
-
import '../../helpers/styling/focus.js';
|
|
7
|
-
import '../../helpers/styling/danger.js';
|
|
8
|
-
import '../../helpers/styling/selection.js';
|
|
9
2
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
var border = ddsBaseTokens.border,
|
|
4
|
+
spacing = ddsBaseTokens.spacing,
|
|
5
|
+
colors = ddsBaseTokens.colors;
|
|
13
6
|
var tabList = {
|
|
14
|
-
borderBottom: "".concat(
|
|
7
|
+
borderBottom: "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid ").concat(border.BordersDdsBorderStyleLightStroke)
|
|
15
8
|
};
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
var tabHoverBase = {
|
|
40
|
-
color: Colors.DdsColorInteractiveDarkest,
|
|
41
|
-
boxShadow: "inset 0 -2px 0 0 ".concat(Colors.DdsColorInteractiveDarker),
|
|
42
|
-
borderBottom: "1px solid ".concat(Colors.DdsColorInteractiveDarker)
|
|
43
|
-
};
|
|
44
|
-
var tabActiveHoverBase = {
|
|
45
|
-
backgroundColor: Colors.DdsColorInteractiveLightest,
|
|
46
|
-
color: Colors.DdsColorInteractiveDarkest,
|
|
47
|
-
boxShadow: "inset 0 -2px 0 0 ".concat(Colors.DdsColorInteractiveDarker),
|
|
48
|
-
borderBottom: "1px solid ".concat(Colors.DdsColorInteractiveDarker)
|
|
9
|
+
var tab = {
|
|
10
|
+
base: {
|
|
11
|
+
borderBottom: "".concat(border.BordersDdsBorderStyleLightStrokeWeight, " solid transparent"),
|
|
12
|
+
color: colors.DdsColorNeutralsGray7,
|
|
13
|
+
padding: spacing.SizesDdsSpacingLocalX05
|
|
14
|
+
},
|
|
15
|
+
row: {
|
|
16
|
+
gap: spacing.SizesDdsSpacingLocalX05
|
|
17
|
+
},
|
|
18
|
+
column: {
|
|
19
|
+
gap: spacing.SizesDdsSpacingLocalX025
|
|
20
|
+
},
|
|
21
|
+
active: {
|
|
22
|
+
backgroundColor: colors.DdsColorInteractiveLightest,
|
|
23
|
+
color: colors.DdsColorInteractiveDarkest,
|
|
24
|
+
boxShadow: "inset 0 -2px 0 0 ".concat(colors.DdsColorInteractiveDarker),
|
|
25
|
+
borderColor: colors.DdsColorInteractiveDarker
|
|
26
|
+
},
|
|
27
|
+
hover: {
|
|
28
|
+
color: colors.DdsColorInteractiveDarkest,
|
|
29
|
+
boxShadow: "inset 0 -2px 0 0 ".concat(colors.DdsColorInteractiveDarker),
|
|
30
|
+
borderColor: colors.DdsColorInteractiveDarker
|
|
31
|
+
}
|
|
49
32
|
};
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
var tabPanelBase = {
|
|
54
|
-
padding: Spacing.SizesDdsSpacingLocalX025
|
|
33
|
+
var panel = {
|
|
34
|
+
padding: spacing.SizesDdsSpacingLocalX025
|
|
55
35
|
};
|
|
56
|
-
var tabPanelFocusVisibleBase = Object.assign({}, focusVisible);
|
|
57
36
|
var tabsTokens = {
|
|
58
37
|
tabList: tabList,
|
|
59
|
-
tab:
|
|
60
|
-
|
|
61
|
-
direction: {
|
|
62
|
-
row: {
|
|
63
|
-
base: tabRowBase
|
|
64
|
-
},
|
|
65
|
-
column: {
|
|
66
|
-
base: tabColumnBase
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
active: {
|
|
70
|
-
base: tabActiveBase
|
|
71
|
-
},
|
|
72
|
-
hover: {
|
|
73
|
-
base: tabHoverBase,
|
|
74
|
-
active: {
|
|
75
|
-
base: tabActiveHoverBase
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
focus: {
|
|
79
|
-
base: tabFocusBase
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
panel: {
|
|
83
|
-
base: tabPanelBase,
|
|
84
|
-
focusVisible: {
|
|
85
|
-
base: tabPanelFocusVisibleBase
|
|
86
|
-
}
|
|
87
|
-
}
|
|
38
|
+
tab: tab,
|
|
39
|
+
panel: panel
|
|
88
40
|
};
|
|
89
41
|
|
|
90
42
|
export { tabsTokens };
|
|
@@ -6,7 +6,7 @@ export declare type TagProps = BaseComponentProps<HTMLSpanElement, {
|
|
|
6
6
|
/**Formål med status eller kategorisering. Påvirker styling. */
|
|
7
7
|
purpose?: TagPurpose;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const Tag: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLSpanElement>, "
|
|
9
|
+
export declare const Tag: import("react").ForwardRefExoticComponent<Pick<import("react").HTMLAttributes<HTMLSpanElement>, "className" | "id"> & {
|
|
10
10
|
/**Tekst som vises i `<Tag />.` */
|
|
11
11
|
text?: string | undefined;
|
|
12
12
|
/**Formål med status eller kategorisering. Påvirker styling. */
|
|
@@ -2,30 +2,19 @@ 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 { tagTokens } from './Tag.tokens.js';
|
|
6
|
-
import { Typography } from '../Typography/Typography/Typography.js';
|
|
7
|
-
import '../../helpers/Backdrop/Backdrop.js';
|
|
8
|
-
import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
|
|
9
|
-
import '../../helpers/HiddenInput/HiddenInput.js';
|
|
10
|
-
import '../../helpers/Input/Input.styles.js';
|
|
11
|
-
import '../../helpers/Input/Input.tokens.js';
|
|
12
|
-
import '../InputMessage/InputMessage.js';
|
|
13
|
-
import '../../helpers/Paper/Paper.js';
|
|
14
|
-
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
5
|
+
import { tagTokens, typographyType } from './Tag.tokens.js';
|
|
15
6
|
import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
|
|
16
|
-
import '
|
|
7
|
+
import { TextOverflowEllipsisWrapper, TextOverflowEllipsisInner } from '../../helpers/TextOverflowEllipsis/TextOverflowEllipsis.js';
|
|
8
|
+
import { getFontStyling } from '../Typography/Typography.utils.js';
|
|
17
9
|
|
|
18
|
-
var
|
|
10
|
+
var wrapper = tagTokens.wrapper;
|
|
11
|
+
var Wrapper = styled(TextOverflowEllipsisWrapper).withConfig({
|
|
19
12
|
displayName: "Tag__Wrapper",
|
|
20
13
|
componentId: "sc-rdxtch-0"
|
|
21
|
-
})(["", " ", ""],
|
|
14
|
+
})(["display:inline-flex;align-items:center;border:", ";border-radius:", ";padding:", ";", " ", ""], wrapper.border, wrapper.borderRadius, wrapper.padding, getFontStyling(typographyType), function (_ref) {
|
|
22
15
|
var purpose = _ref.purpose;
|
|
23
|
-
return css(["", ""],
|
|
16
|
+
return css(["background-color:", ";border-color:", ";"], wrapper.purpose[purpose].backgroundColor, wrapper.purpose[purpose].borderColor);
|
|
24
17
|
});
|
|
25
|
-
var Inner = styled.span.withConfig({
|
|
26
|
-
displayName: "Tag__Inner",
|
|
27
|
-
componentId: "sc-rdxtch-1"
|
|
28
|
-
})(["", ""], tagTokens.inner.base);
|
|
29
18
|
var Tag = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
30
19
|
var text = props.text,
|
|
31
20
|
_props$purpose = props.purpose,
|
|
@@ -36,12 +25,10 @@ var Tag = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
36
25
|
rest = __rest(props, ["text", "purpose", "id", "className", "htmlProps"]);
|
|
37
26
|
|
|
38
27
|
return jsx(Wrapper, Object.assign({}, getBaseHTMLProps(id, className, htmlProps, rest), {
|
|
39
|
-
forwardedAs: "span",
|
|
40
|
-
typographyType: "bodySans01",
|
|
41
28
|
ref: ref,
|
|
42
29
|
purpose: purpose
|
|
43
30
|
}, {
|
|
44
|
-
children: jsx(
|
|
31
|
+
children: jsx(TextOverflowEllipsisInner, {
|
|
45
32
|
children: text
|
|
46
33
|
})
|
|
47
34
|
}));
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StaticTypographyType } from '../Typography';
|
|
2
|
+
export declare const typographyType: StaticTypographyType;
|
|
2
3
|
export declare const tagTokens: {
|
|
3
4
|
wrapper: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
border: string;
|
|
6
|
+
borderRadius: string;
|
|
7
|
+
padding: string;
|
|
8
|
+
purpose: {
|
|
9
|
+
default: {
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
borderColor: string;
|
|
8
12
|
};
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
success: {
|
|
14
|
+
borderColor: string;
|
|
15
|
+
backgroundColor: string;
|
|
11
16
|
};
|
|
12
17
|
danger: {
|
|
13
|
-
|
|
18
|
+
borderColor: string;
|
|
19
|
+
backgroundColor: string;
|
|
14
20
|
};
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
warning: {
|
|
22
|
+
borderColor: string;
|
|
23
|
+
backgroundColor: string;
|
|
17
24
|
};
|
|
18
25
|
info: {
|
|
19
|
-
|
|
26
|
+
borderColor: string;
|
|
27
|
+
backgroundColor: string;
|
|
20
28
|
};
|
|
21
29
|
};
|
|
22
30
|
};
|
|
23
|
-
inner: {
|
|
24
|
-
base: CSSObject;
|
|
25
|
-
};
|
|
26
31
|
};
|
|
@@ -4,51 +4,24 @@ import { localMessageTokens } from '../LocalMessage/LocalMessage.tokens.js';
|
|
|
4
4
|
var colors = ddsBaseTokens.colors,
|
|
5
5
|
borderRadius = ddsBaseTokens.borderRadius,
|
|
6
6
|
spacing = ddsBaseTokens.spacing;
|
|
7
|
-
var
|
|
7
|
+
var typographyType = 'bodySans01';
|
|
8
|
+
var wrapper = {
|
|
8
9
|
border: '1px solid',
|
|
9
10
|
borderRadius: borderRadius.RadiiDdsBorderRadius1Radius,
|
|
10
11
|
padding: "".concat(spacing.SizesDdsSpacingLocalX0125, " ").concat(spacing.SizesDdsSpacingLocalX025),
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
backgroundColor: colors.DdsColorNeutralsGray1,
|
|
22
|
-
borderColor: colors.DdsColorNeutralsGray3
|
|
12
|
+
purpose: {
|
|
13
|
+
"default": {
|
|
14
|
+
backgroundColor: colors.DdsColorNeutralsGray1,
|
|
15
|
+
borderColor: colors.DdsColorNeutralsGray3
|
|
16
|
+
},
|
|
17
|
+
success: localMessageTokens.container.purpose.success,
|
|
18
|
+
danger: localMessageTokens.container.purpose.danger,
|
|
19
|
+
warning: localMessageTokens.container.purpose.warning,
|
|
20
|
+
info: localMessageTokens.container.purpose.info
|
|
21
|
+
}
|
|
23
22
|
};
|
|
24
|
-
var successBase = Object.assign({}, localMessageTokens.container.success.base);
|
|
25
|
-
var warningBase = Object.assign({}, localMessageTokens.container.warning.base);
|
|
26
|
-
var dangerBase = Object.assign({}, localMessageTokens.container.danger.base);
|
|
27
|
-
var infoBase = Object.assign({}, localMessageTokens.container.info.base);
|
|
28
23
|
var tagTokens = {
|
|
29
|
-
wrapper:
|
|
30
|
-
base: wrapperBase,
|
|
31
|
-
type: {
|
|
32
|
-
success: {
|
|
33
|
-
base: successBase
|
|
34
|
-
},
|
|
35
|
-
warning: {
|
|
36
|
-
base: warningBase
|
|
37
|
-
},
|
|
38
|
-
danger: {
|
|
39
|
-
base: dangerBase
|
|
40
|
-
},
|
|
41
|
-
"default": {
|
|
42
|
-
base: defaultBase
|
|
43
|
-
},
|
|
44
|
-
info: {
|
|
45
|
-
base: infoBase
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
inner: {
|
|
50
|
-
base: innerBase
|
|
51
|
-
}
|
|
24
|
+
wrapper: wrapper
|
|
52
25
|
};
|
|
53
26
|
|
|
54
|
-
export { tagTokens };
|
|
27
|
+
export { tagTokens, typographyType };
|
|
@@ -4,7 +4,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { forwardRef, useId, useRef, useState, useEffect } from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { StatefulInput, OuterInputContainer } from '../../helpers/Input/Input.styles.js';
|
|
7
|
-
import {
|
|
7
|
+
import { inputTypographyTypes } from '../../helpers/Input/Input.tokens.js';
|
|
8
8
|
import { getDefaultText, renderInputMessage } from '../../helpers/Input/Input.utils.js';
|
|
9
9
|
import { useCombinedRef } from '../../hooks/useCombinedRefs.js';
|
|
10
10
|
import '../../hooks/useFloatPosition.js';
|
|
@@ -18,13 +18,14 @@ import '../Typography/Typography/Typography.js';
|
|
|
18
18
|
import { Label } from '../Typography/Label/Label.js';
|
|
19
19
|
import '../Typography/Link/Link.js';
|
|
20
20
|
import { textAreaTokens } from './TextArea.tokens.js';
|
|
21
|
+
import { getFontStyling } from '../Typography/Typography.utils.js';
|
|
21
22
|
|
|
22
23
|
var defaultWidth = '320px';
|
|
23
24
|
var textarea = textAreaTokens.textarea;
|
|
24
25
|
var StyledTextArea = styled(StatefulInput).withConfig({
|
|
25
26
|
displayName: "TextArea__StyledTextArea",
|
|
26
27
|
componentId: "sc-dg30pn-0"
|
|
27
|
-
})(["", " ", " height:auto;resize:vertical;vertical-align:bottom;padding-bottom:", ";", ""], scrollbarStyling.webkit, scrollbarStyling.firefox, textarea.paddingBottom,
|
|
28
|
+
})(["", " ", " height:auto;resize:vertical;vertical-align:bottom;padding-bottom:", ";", ""], scrollbarStyling.webkit, scrollbarStyling.firefox, textarea.paddingBottom, getFontStyling(inputTypographyTypes.medium));
|
|
28
29
|
var TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
29
30
|
var id = props.id,
|
|
30
31
|
value = props.value,
|
|
@@ -4,9 +4,6 @@ var colors = ddsBaseTokens.colors,
|
|
|
4
4
|
spacing = ddsBaseTokens.spacing,
|
|
5
5
|
iconSizes = ddsBaseTokens.iconSizes;
|
|
6
6
|
var input = {
|
|
7
|
-
multiline: {
|
|
8
|
-
paddingBottom: spacing.SizesDdsSpacingLocalX05
|
|
9
|
-
},
|
|
10
7
|
withIcon: {
|
|
11
8
|
medium: {
|
|
12
9
|
paddingLeft: "".concat(spacing.SizesDdsSpacingLocalX075NumberPx + iconSizes.DdsIconsizeMediumNumberPx + spacing.SizesDdsSpacingLocalX05NumberPx, "px")
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { StaticTypographyType } from '../Typography';
|
|
2
|
+
import { ToggleBarSize } from './ToggleBar.types';
|
|
3
|
+
export declare const typographyTypes: {
|
|
4
|
+
[k in ToggleBarSize]: StaticTypographyType;
|
|
5
|
+
};
|
|
1
6
|
export declare const toggleBarTokens: {
|
|
2
7
|
outerContainer: {
|
|
3
8
|
gap: string;
|
|
@@ -20,14 +25,6 @@ export declare const toggleBarTokens: {
|
|
|
20
25
|
};
|
|
21
26
|
withText: {
|
|
22
27
|
padding: string;
|
|
23
|
-
font: {
|
|
24
|
-
lineHeight: any;
|
|
25
|
-
fontSize: string;
|
|
26
|
-
letterSpacing: any;
|
|
27
|
-
fontFamily: any;
|
|
28
|
-
fontWeight: any;
|
|
29
|
-
fontStyle: any;
|
|
30
|
-
};
|
|
31
28
|
gap: string;
|
|
32
29
|
};
|
|
33
30
|
};
|
|
@@ -38,14 +35,6 @@ export declare const toggleBarTokens: {
|
|
|
38
35
|
};
|
|
39
36
|
withText: {
|
|
40
37
|
padding: string;
|
|
41
|
-
font: {
|
|
42
|
-
lineHeight: any;
|
|
43
|
-
fontSize: string;
|
|
44
|
-
letterSpacing: any;
|
|
45
|
-
fontFamily: any;
|
|
46
|
-
fontWeight: any;
|
|
47
|
-
fontStyle: any;
|
|
48
|
-
};
|
|
49
38
|
gap: string;
|
|
50
39
|
};
|
|
51
40
|
};
|
|
@@ -56,14 +45,6 @@ export declare const toggleBarTokens: {
|
|
|
56
45
|
};
|
|
57
46
|
withText: {
|
|
58
47
|
padding: string;
|
|
59
|
-
font: {
|
|
60
|
-
lineHeight: any;
|
|
61
|
-
fontSize: string;
|
|
62
|
-
letterSpacing: any;
|
|
63
|
-
fontFamily: any;
|
|
64
|
-
fontWeight: any;
|
|
65
|
-
fontStyle: any;
|
|
66
|
-
};
|
|
67
48
|
gap: string;
|
|
68
49
|
};
|
|
69
50
|
};
|
|
@@ -74,14 +55,6 @@ export declare const toggleBarTokens: {
|
|
|
74
55
|
};
|
|
75
56
|
withText: {
|
|
76
57
|
padding: string;
|
|
77
|
-
font: {
|
|
78
|
-
lineHeight: any;
|
|
79
|
-
fontSize: string;
|
|
80
|
-
letterSpacing: any;
|
|
81
|
-
fontFamily: any;
|
|
82
|
-
fontWeight: any;
|
|
83
|
-
fontStyle: any;
|
|
84
|
-
};
|
|
85
58
|
gap: string;
|
|
86
59
|
};
|
|
87
60
|
};
|
|
@@ -7,6 +7,12 @@ var colors = ddsBaseTokens.colors,
|
|
|
7
7
|
border = ddsBaseTokens.border,
|
|
8
8
|
borderRadius = ddsBaseTokens.borderRadius,
|
|
9
9
|
fontPackages = ddsBaseTokens.fontPackages;
|
|
10
|
+
var typographyTypes = {
|
|
11
|
+
large: 'bodySans04',
|
|
12
|
+
medium: 'bodySans02',
|
|
13
|
+
small: 'bodySans01',
|
|
14
|
+
tiny: 'supportingStyleTiny01'
|
|
15
|
+
};
|
|
10
16
|
var iconSizeTiny = "".concat(calculateHeightWithLineHeight(fontPackages.supportingStyle_tiny_01.numbers.lineHeightNumber, fontPackages.supportingStyle_tiny_01.numbers.fontSizeNumber), "px");
|
|
11
17
|
var iconSizeSmall = "".concat(calculateHeightWithLineHeight(fontPackages.body_sans_01.numbers.lineHeightNumber, fontPackages.body_sans_01.numbers.fontSizeNumber), "px");
|
|
12
18
|
var iconSizeMedium = "".concat(calculateHeightWithLineHeight(fontPackages.body_sans_02.numbers.lineHeightNumber, fontPackages.body_sans_02.numbers.fontSizeNumber), "px");
|
|
@@ -53,7 +59,6 @@ var content = {
|
|
|
53
59
|
},
|
|
54
60
|
withText: {
|
|
55
61
|
padding: "".concat(spacing.SizesDdsSpacingLocalX025, " ").concat(spacing.SizesDdsSpacingLocalX075),
|
|
56
|
-
font: fontPackages.supportingStyle_tiny_01.base,
|
|
57
62
|
gap: spacing.SizesDdsSpacingLocalX05
|
|
58
63
|
}
|
|
59
64
|
},
|
|
@@ -64,7 +69,6 @@ var content = {
|
|
|
64
69
|
},
|
|
65
70
|
withText: {
|
|
66
71
|
padding: "".concat(spacing.SizesDdsSpacingLocalX05, " ").concat(spacing.SizesDdsSpacingLocalX1),
|
|
67
|
-
font: fontPackages.body_sans_01.base,
|
|
68
72
|
gap: spacing.SizesDdsSpacingLocalX05
|
|
69
73
|
}
|
|
70
74
|
},
|
|
@@ -75,7 +79,6 @@ var content = {
|
|
|
75
79
|
},
|
|
76
80
|
withText: {
|
|
77
81
|
padding: "".concat(spacing.SizesDdsSpacingLocalX075, " ").concat(spacing.SizesDdsSpacingLocalX15),
|
|
78
|
-
font: fontPackages.body_sans_02.base,
|
|
79
82
|
gap: spacing.SizesDdsSpacingLocalX05
|
|
80
83
|
}
|
|
81
84
|
},
|
|
@@ -86,7 +89,6 @@ var content = {
|
|
|
86
89
|
},
|
|
87
90
|
withText: {
|
|
88
91
|
padding: "".concat(spacing.SizesDdsSpacingLocalX1, " ").concat(spacing.SizesDdsSpacingLocalX2),
|
|
89
|
-
font: fontPackages.body_sans_04.base,
|
|
90
92
|
gap: spacing.SizesDdsSpacingLocalX1
|
|
91
93
|
}
|
|
92
94
|
}
|
|
@@ -98,4 +100,4 @@ var toggleBarTokens = {
|
|
|
98
100
|
label: label
|
|
99
101
|
};
|
|
100
102
|
|
|
101
|
-
export { toggleBarTokens };
|
|
103
|
+
export { toggleBarTokens, typographyTypes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toggleBarTokens } from './ToggleBar.tokens.js';
|
|
1
|
+
import { toggleBarTokens, typographyTypes } from './ToggleBar.tokens.js';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { focusVisibleTransitionValue, focusVisible } from '../../helpers/styling/focusVisible.js';
|
|
4
4
|
import '../../helpers/styling/hover.js';
|
|
@@ -14,6 +14,7 @@ import '../../helpers/Input/Input.tokens.js';
|
|
|
14
14
|
import '../InputMessage/InputMessage.js';
|
|
15
15
|
import '../../helpers/Paper/Paper.js';
|
|
16
16
|
import '../../helpers/RequiredMarker/RequiredMarker.js';
|
|
17
|
+
import { getFontStyling } from '../Typography/Typography.utils.js';
|
|
17
18
|
|
|
18
19
|
var content = toggleBarTokens.content,
|
|
19
20
|
label = toggleBarTokens.label;
|
|
@@ -23,7 +24,7 @@ var Content = styled.span.withConfig({
|
|
|
23
24
|
})(["display:flex;justify-content:center;align-items:center;word-break:break-word;height:100%;box-sizing:border-box;cursor:pointer;@media (prefers-reduced-motion:no-preference){transition:border-color 0.2s,background-color 0.2s,box-shadow 0.2s,color 0.2s,", ";}background-color:", ";", ""], focusVisibleTransitionValue, content.base.backgroundColor, function (_ref) {
|
|
24
25
|
var size = _ref.size,
|
|
25
26
|
justIcon = _ref.justIcon;
|
|
26
|
-
return css(["", ""], justIcon ? css(["font-size:", ";padding:", ";"], content.size[size].justIcon.fontSize, content.size[size].justIcon.padding) : css(["gap:", ";padding:", ";", ""], content.size[size].withText.gap, content.size[size].withText.padding,
|
|
27
|
+
return css(["", ""], justIcon ? css(["font-size:", ";padding:", ";"], content.size[size].justIcon.fontSize, content.size[size].justIcon.padding) : css(["gap:", ";padding:", ";", ""], content.size[size].withText.gap, content.size[size].withText.padding, getFontStyling(typographyTypes[size])));
|
|
27
28
|
});
|
|
28
29
|
var Label = styled.label.withConfig({
|
|
29
30
|
displayName: "ToggleRadiostyles__Label",
|