@norges-domstoler/dds-components 9.2.0-beta.0 → 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.
Files changed (216) hide show
  1. package/README.md +2 -1
  2. package/dist/assets/svg/bullets/jordskifterett_bullet1.svg.js +2 -2
  3. package/dist/cjs/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
  4. package/dist/cjs/components/Button/Button.stories.d.ts +4 -4
  5. package/dist/cjs/components/Button/Button.styles.d.ts +1 -0
  6. package/dist/cjs/components/Button/Button.tokens.d.ts +294 -165
  7. package/dist/cjs/components/Card/Card.tokens.d.ts +17 -16
  8. package/dist/cjs/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
  9. package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +2 -2
  10. package/dist/cjs/components/Checkbox/CheckboxGroup.d.ts +1 -3
  11. package/dist/cjs/components/Chip/Chip.tokens.d.ts +8 -6
  12. package/dist/cjs/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
  13. package/dist/cjs/components/Divider/Divider.tokens.d.ts +11 -6
  14. package/dist/cjs/components/Drawer/Drawer.tokens.d.ts +3 -11
  15. package/dist/cjs/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
  16. package/dist/cjs/components/Grid/Grid.d.ts +8 -7
  17. package/dist/cjs/components/Grid/Grid.tokens.d.ts +5 -5
  18. package/dist/cjs/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
  19. package/dist/cjs/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
  20. package/dist/cjs/components/List/List.d.ts +1 -1
  21. package/dist/cjs/components/List/List.tokens.d.ts +21 -9
  22. package/dist/cjs/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
  23. package/dist/cjs/components/Modal/Modal.tokens.d.ts +5 -6
  24. package/dist/cjs/components/OverflowMenu/OverflowMenu.d.ts +4 -3
  25. package/dist/cjs/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
  26. package/dist/cjs/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
  27. package/dist/cjs/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
  28. package/dist/cjs/components/Pagination/Pagination.tokens.d.ts +7 -8
  29. package/dist/cjs/components/Popover/Popover.tokens.d.ts +0 -1
  30. package/dist/cjs/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
  31. package/dist/cjs/components/RadioButton/RadioButton.stories.d.ts +4 -4
  32. package/dist/cjs/components/RadioButton/RadioButtonGroup.d.ts +2 -4
  33. package/dist/cjs/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
  34. package/dist/cjs/components/Search/Search.tokens.d.ts +5 -24
  35. package/dist/cjs/components/Select/Select.tokens.d.ts +14 -127
  36. package/dist/cjs/components/SkipToContent/SkipToContent.d.ts +2 -2
  37. package/dist/cjs/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
  38. package/dist/cjs/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
  39. package/dist/cjs/components/SplitButton/SplitButton.d.ts +11 -0
  40. package/dist/cjs/components/SplitButton/SplitButton.stories.d.ts +9 -0
  41. package/dist/cjs/components/SplitButton/index.d.ts +1 -0
  42. package/dist/cjs/components/Table/Table.tokens.d.ts +0 -19
  43. package/dist/cjs/components/Tabs/Tabs.tokens.d.ts +21 -22
  44. package/dist/cjs/components/Tag/Tag.d.ts +1 -1
  45. package/dist/cjs/components/Tag/Tag.tokens.d.ts +19 -14
  46. package/dist/cjs/components/TextInput/TextInput.tokens.d.ts +0 -3
  47. package/dist/cjs/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
  48. package/dist/cjs/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
  49. package/dist/cjs/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
  50. package/dist/cjs/components/Tooltip/Tooltip.stories.d.ts +2 -2
  51. package/dist/cjs/components/Tooltip/Tooltip.styles.d.ts +4 -1
  52. package/dist/cjs/components/Tooltip/Tooltip.tokens.d.ts +1 -2
  53. package/dist/cjs/components/Typography/Typography.utils.d.ts +195 -1
  54. package/dist/cjs/helpers/Input/Input.tokens.d.ts +2 -68
  55. package/dist/cjs/helpers/Input/Input.types.d.ts +4 -0
  56. package/dist/cjs/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
  57. package/dist/cjs/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
  58. package/dist/cjs/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
  59. package/dist/cjs/helpers/TextOverflowEllipsis/index.d.ts +1 -0
  60. package/dist/cjs/index.d.ts +1 -0
  61. package/dist/cjs/index.js +1475 -1823
  62. package/dist/cjs/utils/color.d.ts +1 -1
  63. package/dist/components/Breadcrumbs/Breadcrumb.tokens.d.ts +2 -8
  64. package/dist/components/Breadcrumbs/Breadcrumb.tokens.js +3 -4
  65. package/dist/components/Breadcrumbs/Breadcrumbs.js +3 -2
  66. package/dist/components/Button/Button.js +7 -4
  67. package/dist/components/Button/Button.stories.d.ts +4 -4
  68. package/dist/components/Button/Button.styles.d.ts +1 -0
  69. package/dist/components/Button/Button.styles.js +49 -24
  70. package/dist/components/Button/Button.tokens.d.ts +294 -165
  71. package/dist/components/Button/Button.tokens.js +232 -349
  72. package/dist/components/Card/Card.js +6 -5
  73. package/dist/components/Card/Card.tokens.d.ts +17 -16
  74. package/dist/components/Card/Card.tokens.js +26 -54
  75. package/dist/components/Card/CardAccordion/CardAccordion.tokens.d.ts +28 -0
  76. package/dist/components/Card/CardAccordion/CardAccordion.tokens.js +37 -0
  77. package/dist/components/Card/CardAccordion/CardAccordionBody.js +4 -3
  78. package/dist/components/Card/CardAccordion/CardAccordionHeader.js +9 -6
  79. package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
  80. package/dist/components/Checkbox/CheckboxGroup.d.ts +1 -3
  81. package/dist/components/Checkbox/CheckboxGroup.js +3 -16
  82. package/dist/components/Chip/Chip.js +9 -9
  83. package/dist/components/Chip/Chip.tokens.d.ts +8 -6
  84. package/dist/components/Chip/Chip.tokens.js +8 -25
  85. package/dist/components/Chip/ChipGroup.js +1 -1
  86. package/dist/components/DescriptionList/DescriptionList.js +3 -2
  87. package/dist/components/DescriptionList/DescriptionList.tokens.d.ts +6 -36
  88. package/dist/components/DescriptionList/DescriptionList.tokens.js +7 -18
  89. package/dist/components/DescriptionList/DescriptionListDesc.js +3 -2
  90. package/dist/components/Divider/Divider.js +6 -6
  91. package/dist/components/Divider/Divider.tokens.d.ts +11 -6
  92. package/dist/components/Divider/Divider.tokens.js +16 -16
  93. package/dist/components/Drawer/Drawer.js +11 -4
  94. package/dist/components/Drawer/Drawer.tokens.d.ts +3 -11
  95. package/dist/components/Drawer/Drawer.tokens.js +10 -26
  96. package/dist/components/GlobalMessage/GlobalMessage.js +13 -10
  97. package/dist/components/GlobalMessage/GlobalMessage.tokens.d.ts +24 -22
  98. package/dist/components/GlobalMessage/GlobalMessage.tokens.js +45 -64
  99. package/dist/components/Grid/Grid.d.ts +8 -7
  100. package/dist/components/Grid/Grid.js +7 -5
  101. package/dist/components/Grid/Grid.tokens.d.ts +5 -5
  102. package/dist/components/Grid/Grid.tokens.js +5 -5
  103. package/dist/components/InternalHeader/InternalHeader.styles.d.ts +3 -2
  104. package/dist/components/InternalHeader/InternalHeader.tokens.d.ts +4 -9
  105. package/dist/components/InternalHeader/InternalHeader.tokens.js +6 -6
  106. package/dist/components/InternalHeader/NavigationItem.js +3 -2
  107. package/dist/components/List/List.d.ts +1 -1
  108. package/dist/components/List/List.js +8 -7
  109. package/dist/components/List/List.tokens.d.ts +21 -9
  110. package/dist/components/List/List.tokens.js +26 -20
  111. package/dist/components/List/ListItem.js +2 -2
  112. package/dist/components/LocalMessage/LocalMessage.js +19 -15
  113. package/dist/components/LocalMessage/LocalMessage.tokens.d.ts +49 -53
  114. package/dist/components/LocalMessage/LocalMessage.tokens.js +94 -127
  115. package/dist/components/Modal/Modal.js +9 -5
  116. package/dist/components/Modal/Modal.tokens.d.ts +5 -6
  117. package/dist/components/Modal/Modal.tokens.js +11 -31
  118. package/dist/components/Modal/ModalActions.js +1 -1
  119. package/dist/components/OverflowMenu/OverflowMenu.d.ts +4 -3
  120. package/dist/components/OverflowMenu/OverflowMenu.js +12 -3
  121. package/dist/components/OverflowMenu/OverflowMenu.stories.d.ts +4 -3
  122. package/dist/components/OverflowMenu/OverflowMenu.tokens.d.ts +2 -8
  123. package/dist/components/OverflowMenu/OverflowMenu.tokens.js +5 -5
  124. package/dist/components/OverflowMenu/OverflowMenu.types.d.ts +8 -6
  125. package/dist/components/OverflowMenu/OverflowMenuGroup.js +1 -0
  126. package/dist/components/OverflowMenu/OverflowMenuItem.js +3 -2
  127. package/dist/components/Pagination/Pagination.js +13 -8
  128. package/dist/components/Pagination/Pagination.tokens.d.ts +7 -8
  129. package/dist/components/Pagination/Pagination.tokens.js +17 -16
  130. package/dist/components/Popover/Popover.tokens.d.ts +0 -1
  131. package/dist/components/Popover/Popover.tokens.js +0 -1
  132. package/dist/components/ProgressTracker/ProgressTracker.tokens.d.ts +9 -6
  133. package/dist/components/ProgressTracker/ProgressTracker.tokens.js +11 -9
  134. package/dist/components/ProgressTracker/ProgressTrackerItem.js +7 -6
  135. package/dist/components/RadioButton/RadioButton.stories.d.ts +4 -4
  136. package/dist/components/RadioButton/RadioButtonGroup.d.ts +2 -4
  137. package/dist/components/RadioButton/RadioButtonGroup.js +3 -15
  138. package/dist/components/RadioButton/RadioButtonGroup.stories.d.ts +1 -1
  139. package/dist/components/Search/Search.js +3 -2
  140. package/dist/components/Search/Search.tokens.d.ts +5 -24
  141. package/dist/components/Search/Search.tokens.js +6 -5
  142. package/dist/components/Select/Select.js +5 -4
  143. package/dist/components/Select/Select.styles.js +13 -14
  144. package/dist/components/Select/Select.tokens.d.ts +14 -127
  145. package/dist/components/Select/Select.tokens.js +28 -36
  146. package/dist/components/SkipToContent/SkipToContent.d.ts +2 -2
  147. package/dist/components/SkipToContent/SkipToContent.js +7 -4
  148. package/dist/components/SkipToContent/SkipToContent.stories.d.ts +1 -1
  149. package/dist/components/SkipToContent/SkipToContent.tokens.d.ts +5 -10
  150. package/dist/components/SkipToContent/SkipToContent.tokens.js +14 -37
  151. package/dist/components/Spinner/Spinner.js +1 -2
  152. package/dist/components/SplitButton/SplitButton.d.ts +11 -0
  153. package/dist/components/SplitButton/SplitButton.js +62 -0
  154. package/dist/components/SplitButton/SplitButton.stories.d.ts +9 -0
  155. package/dist/components/SplitButton/index.d.ts +1 -0
  156. package/dist/components/Table/Row.js +2 -1
  157. package/dist/components/Table/Table.tokens.d.ts +0 -19
  158. package/dist/components/Table/Table.tokens.js +1 -8
  159. package/dist/components/Tabs/Tab.js +8 -5
  160. package/dist/components/Tabs/TabPanel.js +4 -3
  161. package/dist/components/Tabs/Tabs.tokens.d.ts +21 -22
  162. package/dist/components/Tabs/Tabs.tokens.js +31 -79
  163. package/dist/components/Tag/Tag.d.ts +1 -1
  164. package/dist/components/Tag/Tag.js +8 -21
  165. package/dist/components/Tag/Tag.tokens.d.ts +19 -14
  166. package/dist/components/Tag/Tag.tokens.js +14 -41
  167. package/dist/components/TextArea/TextArea.js +3 -2
  168. package/dist/components/TextInput/TextInput.tokens.d.ts +0 -3
  169. package/dist/components/TextInput/TextInput.tokens.js +0 -3
  170. package/dist/components/ToggleBar/ToggleBar.tokens.d.ts +5 -32
  171. package/dist/components/ToggleBar/ToggleBar.tokens.js +7 -5
  172. package/dist/components/ToggleBar/ToggleRadio.styles.js +3 -2
  173. package/dist/components/ToggleButton/ToggleButton.js +14 -8
  174. package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
  175. package/dist/components/ToggleButton/ToggleButton.tokens.d.ts +23 -13
  176. package/dist/components/ToggleButton/ToggleButton.tokens.js +26 -49
  177. package/dist/components/ToggleButton/ToggleButtonGroup.js +2 -2
  178. package/dist/components/Tooltip/Tooltip.js +6 -2
  179. package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
  180. package/dist/components/Tooltip/Tooltip.styles.d.ts +4 -1
  181. package/dist/components/Tooltip/Tooltip.styles.js +15 -4
  182. package/dist/components/Tooltip/Tooltip.tokens.d.ts +1 -2
  183. package/dist/components/Tooltip/Tooltip.tokens.js +14 -24
  184. package/dist/components/Typography/Typography.utils.d.ts +195 -1
  185. package/dist/components/Typography/Typography.utils.js +7 -1
  186. package/dist/helpers/Input/Input.styles.js +3 -2
  187. package/dist/helpers/Input/Input.tokens.d.ts +2 -68
  188. package/dist/helpers/Input/Input.tokens.js +10 -46
  189. package/dist/helpers/Input/Input.types.d.ts +4 -0
  190. package/dist/helpers/SelectionControl/SelectionControl.styles.d.ts +5 -0
  191. package/dist/helpers/SelectionControl/SelectionControl.styles.js +15 -2
  192. package/dist/helpers/SelectionControl/SelectionControl.tokens.d.ts +11 -0
  193. package/dist/helpers/SelectionControl/SelectionControl.tokens.js +14 -1
  194. package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.d.ts +2 -0
  195. package/dist/helpers/TextOverflowEllipsis/TextOverflowEllipsis.js +12 -0
  196. package/dist/helpers/TextOverflowEllipsis/index.d.ts +1 -0
  197. package/dist/index.d.ts +1 -0
  198. package/dist/index.js +1 -0
  199. package/dist/utils/color.d.ts +1 -1
  200. package/package.json +1 -1
  201. package/dist/cjs/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
  202. package/dist/cjs/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
  203. package/dist/cjs/components/List/ListItem.tokens.d.ts +0 -5
  204. package/dist/cjs/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
  205. package/dist/cjs/components/Spinner/Spinner.tokens.d.ts +0 -6
  206. package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.d.ts +0 -4
  207. package/dist/components/Card/CardAccordion/CardAccordionBody.tokens.js +0 -12
  208. package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.d.ts +0 -17
  209. package/dist/components/Card/CardAccordion/CardAccordionHeader.tokens.js +0 -38
  210. package/dist/components/Checkbox/CheckboxGroup.tokens.js +0 -20
  211. package/dist/components/List/ListItem.tokens.d.ts +0 -5
  212. package/dist/components/List/ListItem.tokens.js +0 -12
  213. package/dist/components/RadioButton/RadioButtonGroup.tokens.d.ts +0 -19
  214. package/dist/components/RadioButton/RadioButtonGroup.tokens.js +0 -32
  215. package/dist/components/Spinner/Spinner.tokens.d.ts +0 -6
  216. package/dist/components/Spinner/Spinner.tokens.js +0 -13
@@ -1,15 +1,14 @@
1
1
  import { __rest } from 'tslib';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { forwardRef, useId } from 'react';
4
- import styled from 'styled-components';
4
+ import styled, { css } from 'styled-components';
5
5
  import { Icon } from '../Icon/Icon.js';
6
- import { focusVisibleTransitionValue } from '../../helpers/styling/focusVisible.js';
6
+ import { focusVisibleTransitionValue, focusVisible } from '../../helpers/styling/focusVisible.js';
7
7
  import '../../helpers/styling/hover.js';
8
8
  import '../../helpers/styling/focus.js';
9
9
  import '../../helpers/styling/danger.js';
10
10
  import { selection } from '../../helpers/styling/selection.js';
11
- import { buttonTokens } from '../Button/Button.tokens.js';
12
- import { toggleButtonTokens } from './ToggleButton.tokens.js';
11
+ import { toggleButtonTokens, typographyType } from './ToggleButton.tokens.js';
13
12
  import { getBaseHTMLProps } from '../../types/BaseComponentProps.js';
14
13
  import '../../helpers/Backdrop/Backdrop.js';
15
14
  import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
@@ -19,15 +18,20 @@ import '../../helpers/Input/Input.tokens.js';
19
18
  import '../InputMessage/InputMessage.js';
20
19
  import '../../helpers/Paper/Paper.js';
21
20
  import '../../helpers/RequiredMarker/RequiredMarker.js';
21
+ import { getFontStyling } from '../Typography/Typography.utils.js';
22
22
 
23
+ var toggleButton = toggleButtonTokens.toggleButton;
23
24
  var Content = styled.span.withConfig({
24
25
  displayName: "ToggleButton__Content",
25
26
  componentId: "sc-ya01sa-0"
26
- })(["display:flex;align-items:center;width:100%;height:100%;box-sizing:border-box;@media (prefers-reduced-motion:no-preference){transition:border-color 0.2s,background-color 0.2s,box-shadow 0.2s;}", ";cursor:pointer;", " width:fit-content;", " ", " ", " &::selection,*::selection{", "}&:hover{", "}"], focusVisibleTransitionValue, buttonTokens.base, buttonTokens.appearance.rounded.base, buttonTokens.sizes.small.text.base, toggleButtonTokens.base, selection, toggleButtonTokens.hover.base);
27
+ })(["display:flex;align-items:center;width:100%;height:100%;box-sizing:border-box;cursor:pointer;width:fit-content;border:", ";background-color:", ";color:", ";border-radius:", ";padding:", ";", " @media (prefers-reduced-motion:no-preference){transition:border-color 0.2s,background-color 0.2s,box-shadow 0.2s,", ";}", " &::selection,*::selection{", "}&:hover{background-color:", ";box-shadow:", ";border-color:", ";}"], toggleButton.border, toggleButton.backgroundColor, toggleButton.color, toggleButton.borderRadius, toggleButton.padding, getFontStyling(typographyType), focusVisibleTransitionValue, function (_ref) {
28
+ var hasIcon = _ref.hasIcon;
29
+ return hasIcon && css(["gap:", ";"], toggleButton.gap);
30
+ }, selection, toggleButton.hover.backgroundColor, toggleButton.hover.boxShadow, toggleButton.hover.borderColor);
27
31
  var Container = styled.label.withConfig({
28
32
  displayName: "ToggleButton__Container",
29
33
  componentId: "sc-ya01sa-1"
30
- })(["width:fit-content;", ":checked + ", "{", "}", ":checked + ", ":hover{", "}", ":focus-visible + ", "{", "}"], HiddenInput, Content, toggleButtonTokens.checked.base, HiddenInput, Content, toggleButtonTokens.checked.hover.base, HiddenInput, Content, toggleButtonTokens.focus.base);
34
+ })(["width:fit-content;", ":checked + ", "{background-color:", ";border-color:", ";color:", ";}", ":checked + ", ":hover{background-color:", ";border-color:", ";box-shadow:", ";}", ":focus-visible + ", "{", "}"], HiddenInput, Content, toggleButton.checked.backgroundColor, toggleButton.checked.borderColor, toggleButton.checked.color, HiddenInput, Content, toggleButton.checked.hover.backgroundColor, toggleButton.checked.hover.borderColor, toggleButton.checked.hover.boxShadow, HiddenInput, Content, focusVisible);
31
35
  var ToggleButton = /*#__PURE__*/forwardRef(function (_a, ref) {
32
36
  var id = _a.id,
33
37
  label = _a.label,
@@ -46,12 +50,14 @@ var ToggleButton = /*#__PURE__*/forwardRef(function (_a, ref) {
46
50
  htmlFor: uniqueId
47
51
  };
48
52
  return jsxs(Container, Object.assign({}, containerProps, {
49
- children: [jsx(HiddenInput, Object.assign({}, inputProps)), jsxs(Content, {
53
+ children: [jsx(HiddenInput, Object.assign({}, inputProps)), jsxs(Content, Object.assign({
54
+ hasIcon: !!icon
55
+ }, {
50
56
  children: [icon && jsx(Icon, {
51
57
  icon: icon,
52
58
  iconSize: "inherit"
53
59
  }), " ", label]
54
- })]
60
+ }))]
55
61
  }));
56
62
  });
57
63
 
@@ -1,11 +1,11 @@
1
1
  import { ToggleButtonProps } from '.';
2
2
  declare const _default: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked">, "id" | "className"> & {
4
+ component: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onBlur" | "name" | "value" | "defaultChecked" | "defaultValue" | "aria-describedby" | "onChange" | "checked">, "id" | "className"> & {
5
5
  label?: string | undefined;
6
6
  icon?: import("../../icons/utils").SvgIcon | undefined;
7
7
  } & import("../../types").CheckboxPickedHTMLAttributes & {
8
- htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "defaultValue" | "aria-describedby" | "onBlur" | "onChange" | "name" | "value" | "checked"> | undefined;
8
+ htmlProps?: Omit<import("react").InputHTMLAttributes<HTMLInputElement>, "onBlur" | "name" | "value" | "defaultChecked" | "defaultValue" | "aria-describedby" | "onChange" | "checked"> | undefined;
9
9
  } & import("react").RefAttributes<HTMLInputElement>>;
10
10
  argTypes: {
11
11
  label: {
@@ -1,22 +1,32 @@
1
- import { CSSObject } from 'styled-components';
1
+ export declare const typographyType: import("../Typography").StaticTypographyType;
2
2
  export declare const toggleButtonTokens: {
3
- base: CSSObject;
4
- hover: {
5
- base: CSSObject;
6
- };
7
- focus: {
8
- base: CSSObject;
9
- };
10
- checked: {
11
- base: CSSObject;
3
+ toggleButton: {
4
+ border: string;
5
+ backgroundColor: string;
6
+ color: string;
7
+ gap: string;
8
+ borderRadius: string;
9
+ padding: string;
12
10
  hover: {
13
- base: CSSObject;
11
+ backgroundColor: string;
12
+ boxShadow: string;
13
+ borderColor: string;
14
+ };
15
+ checked: {
16
+ color: string;
17
+ hover: {
18
+ backgroundColor: string;
19
+ boxShadow: string;
20
+ borderColor: string;
21
+ };
22
+ borderColor: string;
23
+ backgroundColor: string;
14
24
  };
15
25
  };
16
26
  group: {
17
- base: CSSObject;
27
+ gap: string;
18
28
  };
19
29
  container: {
20
- base: CSSObject;
30
+ gap: string;
21
31
  };
22
32
  };
@@ -1,59 +1,36 @@
1
1
  import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
2
- import 'styled-components';
3
- import { focusVisible } from '../../helpers/styling/focusVisible.js';
4
- import '../../helpers/styling/hover.js';
5
- import '../../helpers/styling/focus.js';
6
- import '../../helpers/styling/danger.js';
7
- import '../../helpers/styling/selection.js';
8
2
  import '../../helpers/SelectionControl/SelectionControl.styles.js';
9
3
  import { selectionControlTokens } from '../../helpers/SelectionControl/SelectionControl.tokens.js';
4
+ import { buttonTokens, typographyTypes } from '../Button/Button.tokens.js';
10
5
 
11
- var Colors = ddsBaseTokens.colors,
12
- Spacing = ddsBaseTokens.spacing;
13
- var base = {
14
- backgroundColor: Colors.DdsColorNeutralsWhite,
15
- color: Colors.DdsColorNeutralsGray7,
16
- gap: Spacing.SizesDdsSpacingLocalX05,
17
- boxShadow: 'none'
6
+ var colors = ddsBaseTokens.colors,
7
+ spacing = ddsBaseTokens.spacing;
8
+ var button = buttonTokens.button;
9
+ var selectionControl = selectionControlTokens.selectionControl;
10
+ var typographyType = typographyTypes.small;
11
+ var toggleButton = {
12
+ border: button.base.border,
13
+ backgroundColor: colors.DdsColorNeutralsWhite,
14
+ color: colors.DdsColorNeutralsGray7,
15
+ gap: spacing.SizesDdsSpacingLocalX05,
16
+ borderRadius: button.appearances.rounded.base.borderRadius,
17
+ padding: button.sizes.small.text.padding,
18
+ hover: selectionControl.hover.base,
19
+ checked: Object.assign(Object.assign({}, selectionControl.checked.base), {
20
+ color: colors.DdsColorNeutralsWhite,
21
+ hover: selectionControl.checked.hover
22
+ })
18
23
  };
19
- var hoverBase = Object.assign({}, selectionControlTokens.selectionControl.hover.base);
20
- var checkedBase = Object.assign(Object.assign({}, selectionControlTokens.selectionControl.checked.base), {
21
- color: Colors.DdsColorNeutralsWhite
22
- });
23
- var checkedHoverBase = Object.assign(Object.assign({}, selectionControlTokens.selectionControl.checked.hover), {
24
- color: Colors.DdsColorNeutralsWhite
25
- });
26
- var focusBase = Object.assign({}, focusVisible);
27
- var groupBase = {
28
- display: 'flex',
29
- gap: Spacing.SizesDdsSpacingLocalX075,
30
- flexWrap: 'wrap'
24
+ var group = {
25
+ gap: spacing.SizesDdsSpacingLocalX075
31
26
  };
32
- var containerBase = {
33
- display: 'flex',
34
- flexDirection: 'column',
35
- gap: Spacing.SizesDdsSpacingLocalX05
27
+ var container = {
28
+ gap: spacing.SizesDdsSpacingLocalX05
36
29
  };
37
30
  var toggleButtonTokens = {
38
- base: base,
39
- hover: {
40
- base: hoverBase
41
- },
42
- focus: {
43
- base: focusBase
44
- },
45
- checked: {
46
- base: checkedBase,
47
- hover: {
48
- base: checkedHoverBase
49
- }
50
- },
51
- group: {
52
- base: groupBase
53
- },
54
- container: {
55
- base: containerBase
56
- }
31
+ toggleButton: toggleButton,
32
+ group: group,
33
+ container: container
57
34
  };
58
35
 
59
- export { toggleButtonTokens };
36
+ export { toggleButtonTokens, typographyType };
@@ -18,14 +18,14 @@ import { toggleButtonTokens } from './ToggleButton.tokens.js';
18
18
  var Group = styled.div.withConfig({
19
19
  displayName: "ToggleButtonGroup__Group",
20
20
  componentId: "sc-14ijdag-0"
21
- })(["", " ", ""], toggleButtonTokens.group.base, function (_ref) {
21
+ })(["gap:", ";display:flex;flex-wrap:wrap;", ""], toggleButtonTokens.group.gap, function (_ref) {
22
22
  var direction = _ref.direction;
23
23
  return css(["flex-direction:", ";"], direction);
24
24
  });
25
25
  var Container = styled.div.withConfig({
26
26
  displayName: "ToggleButtonGroup__Container",
27
27
  componentId: "sc-14ijdag-1"
28
- })(["", ""], toggleButtonTokens.container.base);
28
+ })(["display:flex;flex-direction:column;gap:", ";"], toggleButtonTokens.container.gap);
29
29
  var ToggleButtonGroup = function ToggleButtonGroup(props) {
30
30
  var children = props.children,
31
31
  _props$direction = props.direction,
@@ -12,6 +12,7 @@ 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
 
15
+ var svgArrow = tooltipTokens.svgArrow;
15
16
  var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
16
17
  var text = props.text,
17
18
  _props$placement = props.placement,
@@ -99,14 +100,17 @@ var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
99
100
  };
100
101
  return jsxs(Container, Object.assign({}, containerProps, {
101
102
  children: [anchorElement, jsxs(TooltipWrapper, Object.assign({}, wrapperProps, {
103
+ elevation: 1,
104
+ border: "light"
105
+ }, {
102
106
  children: [text, jsx(ArrowWrapper, Object.assign({}, arrowWrapperProps, {
103
107
  children: jsxs(SvgArrow, {
104
108
  children: [jsx("path", {
105
109
  d: "M16.5858 6.58579L10.8787 0.87868C10.3161 0.316071 9.55301 0 8.75736 0H27.2426C26.447 0 25.6839 0.31607 25.1213 0.878679L19.4142 6.58579C18.6332 7.36684 17.3668 7.36684 16.5858 6.58579Z",
106
- fill: tooltipTokens.svgArrow.background.fill
110
+ fill: svgArrow.background.fill
107
111
  }), jsx("path", {
108
112
  d: "M8 0C7.72386 0 7.5 0.223858 7.5 0.5C7.5 0.776142 7.72386 1 8 1V0ZM11.1716 1.67157L10.818 2.02513L10.818 2.02513L11.1716 1.67157ZM19.4142 7.08579L19.0607 6.73223L19.0607 6.73223L19.4142 7.08579ZM24.8284 1.67157L25.182 2.02513L25.182 2.02512L24.8284 1.67157ZM28 1C28.2761 1 28.5 0.776142 28.5 0.5C28.5 0.223858 28.2761 0 28 0V1ZM8 1H8.34315V0H8V1ZM10.818 2.02513L16.2322 7.43934L16.9393 6.73223L11.5251 1.31802L10.818 2.02513ZM19.7678 7.43934L25.182 2.02513L24.4749 1.31802L19.0607 6.73223L19.7678 7.43934ZM27.6569 1H28V0H27.6569V1ZM25.182 2.02512C25.8384 1.36875 26.7286 1 27.6569 1V0C26.4634 0 25.3188 0.474104 24.4749 1.31802L25.182 2.02512ZM16.2322 7.43934C17.2085 8.41565 18.7915 8.41565 19.7678 7.43934L19.0607 6.73223C18.4749 7.31802 17.5251 7.31802 16.9393 6.73223L16.2322 7.43934ZM8.34315 1C9.2714 1 10.1616 1.36875 10.818 2.02513L11.5251 1.31802C10.6812 0.474106 9.53662 0 8.34315 0V1Z",
109
- fill: tooltipTokens.svgArrow.border.fill
113
+ fill: svgArrow.border.fill
110
114
  })]
111
115
  })
112
116
  }))]
@@ -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>, "children" | "style" | "onMouseLeave" | "onMouseOver">, "id" | "className"> & {
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>;
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
13
13
  onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
14
14
  } & {
15
- htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "style" | "onMouseLeave" | "onMouseOver"> | undefined;
15
+ htmlProps?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "style" | "children" | "onMouseLeave" | "onMouseOver"> | undefined;
16
16
  } & import("react").RefAttributes<HTMLDivElement>>;
17
17
  argTypes: {
18
18
  text: {
@@ -4,5 +4,8 @@ export declare const Container: import("styled-components").StyledComponent<"div
4
4
  declare type WrapperProps = {
5
5
  open: boolean;
6
6
  };
7
- export declare const TooltipWrapper: import("styled-components").StyledComponent<"div", any, WrapperProps, never>;
7
+ export declare const TooltipWrapper: import("styled-components").StyledComponent<"div", any, {
8
+ elevation?: (1 | 2 | 3 | 4) | undefined;
9
+ border?: ("light" | "dark") | undefined;
10
+ } & WrapperProps, never>;
8
11
  export {};
@@ -1,12 +1,23 @@
1
1
  import styled from 'styled-components';
2
+ import '../../helpers/Backdrop/Backdrop.js';
3
+ import 'react/jsx-runtime';
4
+ import '../../helpers/Chevron/AnimatedChevronUpDown.styles.js';
5
+ import '../../helpers/HiddenInput/HiddenInput.js';
6
+ import '../../helpers/Input/Input.styles.js';
7
+ import '../../helpers/Input/Input.tokens.js';
8
+ import '../InputMessage/InputMessage.js';
9
+ import { Paper } from '../../helpers/Paper/Paper.js';
10
+ import '../../helpers/RequiredMarker/RequiredMarker.js';
2
11
  import { visibilityTransition } from '../../helpers/styling/visibilityTransition.js';
3
12
  import '../../helpers/styling/focusVisible.js';
4
13
  import '../../helpers/styling/hover.js';
5
14
  import '../../helpers/styling/focus.js';
6
15
  import '../../helpers/styling/danger.js';
7
- import { selection } from '../../helpers/styling/selection.js';
16
+ import '../../helpers/styling/selection.js';
17
+ import { getFontStyling, defaultTypographyType } from '../Typography/Typography.utils.js';
8
18
  import { tooltipTokens } from './Tooltip.tokens.js';
9
19
 
20
+ var wrapper = tooltipTokens.wrapper;
10
21
  var SvgArrow = styled.svg.withConfig({
11
22
  displayName: "Tooltipstyles__SvgArrow",
12
23
  componentId: "sc-1cna5tc-0"
@@ -19,12 +30,12 @@ var Container = styled.div.withConfig({
19
30
  displayName: "Tooltipstyles__Container",
20
31
  componentId: "sc-1cna5tc-2"
21
32
  })(["width:fit-content;"]);
22
- var TooltipWrapper = styled.div.withConfig({
33
+ var TooltipWrapper = styled(Paper).withConfig({
23
34
  displayName: "Tooltipstyles__TooltipWrapper",
24
35
  componentId: "sc-1cna5tc-3"
25
- })(["&::selection{", "}", " width:fit-content;position:absolute;z-index:20;text-align:center;", ""], selection, function (_ref) {
36
+ })(["", " width:fit-content;position:absolute;z-index:20;text-align:center;padding:", ";", ";"], function (_ref) {
26
37
  var open = _ref.open;
27
38
  return visibilityTransition(open);
28
- }, tooltipTokens.wrapper.base);
39
+ }, wrapper.padding, getFontStyling(defaultTypographyType));
29
40
 
30
41
  export { ArrowWrapper, Container, SvgArrow, TooltipWrapper };
@@ -1,7 +1,6 @@
1
- import { CSSObject } from 'styled-components';
2
1
  export declare const tooltipTokens: {
3
2
  wrapper: {
4
- base: CSSObject;
3
+ padding: string;
5
4
  };
6
5
  svgArrow: {
7
6
  border: {
@@ -1,31 +1,21 @@
1
1
  import { ddsBaseTokens } from '@norges-domstoler/dds-design-tokens';
2
2
 
3
- var Border = ddsBaseTokens.border,
4
- Colors = ddsBaseTokens.colors,
5
- FontPackages = ddsBaseTokens.fontPackages,
6
- Spacing = ddsBaseTokens.spacing,
7
- OuterShadow = ddsBaseTokens.outerShadow,
8
- BorderRadius = ddsBaseTokens.borderRadius;
9
- var wrapperBase = Object.assign(Object.assign({
10
- border: "".concat(Border.BordersDdsBorderStyleLightStroke, " solid ").concat(Border.BordersDdsBorderFocusBaseStrokeWeight),
11
- backgroundColor: Colors.DdsColorNeutralsWhite
12
- }, FontPackages.body_sans_02.base), {
13
- padding: "".concat(Spacing.SizesDdsSpacingLocalX075),
14
- boxShadow: OuterShadow.DdsShadow1Onlight,
15
- borderRadius: BorderRadius.RadiiDdsBorderRadius1Radius
16
- });
17
- var tooltipTokens = {
18
- wrapper: {
19
- base: wrapperBase
3
+ var colors = ddsBaseTokens.colors,
4
+ spacing = ddsBaseTokens.spacing;
5
+ var wrapper = {
6
+ padding: "".concat(spacing.SizesDdsSpacingLocalX075)
7
+ };
8
+ var svgArrow = {
9
+ border: {
10
+ fill: colors.DdsColorPrimaryLighter
20
11
  },
21
- svgArrow: {
22
- border: {
23
- fill: Colors.DdsColorPrimaryLighter
24
- },
25
- background: {
26
- fill: Colors.DdsColorNeutralsWhite
27
- }
12
+ background: {
13
+ fill: colors.DdsColorNeutralsWhite
28
14
  }
29
15
  };
16
+ var tooltipTokens = {
17
+ wrapper: wrapper,
18
+ svgArrow: svgArrow
19
+ };
30
20
 
31
21
  export { tooltipTokens };
@@ -1,5 +1,199 @@
1
1
  import { ElementType } from 'react';
2
- import { TypographyType, TypographyHeadingType, InlineElement, TypographyInteractionStyling, StaticTypographyType } from './Typography/Typography.types';
2
+ import { TypographyType, TypographyHeadingType, InlineElement, TypographyInteractionStyling, StaticTypographyType, TypographyBodyType } from './Typography/Typography.types';
3
+ export declare const defaultTypographyType: TypographyBodyType;
4
+ export declare const getFontStyling: (type: StaticTypographyType, withColor?: boolean) => {
5
+ lineHeight: any;
6
+ fontSize: string;
7
+ letterSpacing: any;
8
+ fontFamily: any;
9
+ fontWeight: any;
10
+ fontStyle: any;
11
+ color: string | undefined;
12
+ } | {
13
+ lineHeight: any;
14
+ fontSize: string;
15
+ letterSpacing: any;
16
+ fontFamily: any;
17
+ fontWeight: any;
18
+ fontStyle: any;
19
+ color: string | undefined;
20
+ } | {
21
+ lineHeight: any;
22
+ fontSize: string;
23
+ letterSpacing: any;
24
+ fontFamily: any;
25
+ fontWeight: any;
26
+ fontStyle: any;
27
+ color: string | undefined;
28
+ } | {
29
+ lineHeight: any;
30
+ fontSize: string;
31
+ letterSpacing: any;
32
+ fontFamily: any;
33
+ fontWeight: any;
34
+ fontStyle: any;
35
+ color: string | undefined;
36
+ } | {
37
+ lineHeight: any;
38
+ fontSize: string;
39
+ letterSpacing: any;
40
+ fontFamily: any;
41
+ fontWeight: any;
42
+ fontStyle: any;
43
+ color: string | undefined;
44
+ } | {
45
+ lineHeight: any;
46
+ fontSize: string;
47
+ letterSpacing: any;
48
+ fontFamily: any;
49
+ fontWeight: any;
50
+ fontStyle: any;
51
+ color: string | undefined;
52
+ } | {
53
+ lineHeight: any;
54
+ fontSize: string;
55
+ letterSpacing: any;
56
+ fontFamily: any;
57
+ fontWeight: any;
58
+ fontStyle: any;
59
+ color: string | undefined;
60
+ } | {
61
+ lineHeight: any;
62
+ fontSize: string;
63
+ letterSpacing: any;
64
+ fontFamily: any;
65
+ fontWeight: any;
66
+ fontStyle: any;
67
+ color: string | undefined;
68
+ } | {
69
+ lineHeight: any;
70
+ fontSize: string;
71
+ letterSpacing: any;
72
+ fontFamily: any;
73
+ fontWeight: any;
74
+ fontStyle: any;
75
+ color: string | undefined;
76
+ } | {
77
+ lineHeight: any;
78
+ fontSize: string;
79
+ letterSpacing: any;
80
+ fontFamily: any;
81
+ fontWeight: any;
82
+ fontStyle: any;
83
+ color: string | undefined;
84
+ } | {
85
+ lineHeight: any;
86
+ fontSize: string;
87
+ letterSpacing: any;
88
+ fontFamily: any;
89
+ fontWeight: any;
90
+ fontStyle: any;
91
+ color: string | undefined;
92
+ } | {
93
+ lineHeight: any;
94
+ fontSize: string;
95
+ letterSpacing: any;
96
+ fontFamily: any;
97
+ fontWeight: any;
98
+ fontStyle: any;
99
+ color: string | undefined;
100
+ } | {
101
+ lineHeight: any;
102
+ fontSize: string;
103
+ letterSpacing: any;
104
+ fontFamily: any;
105
+ fontWeight: any;
106
+ fontStyle: any;
107
+ color: string | undefined;
108
+ } | {
109
+ lineHeight: any;
110
+ fontSize: string;
111
+ letterSpacing: any;
112
+ fontFamily: any;
113
+ fontWeight: any;
114
+ fontStyle: any;
115
+ color: string | undefined;
116
+ } | {
117
+ lineHeight: any;
118
+ fontSize: string;
119
+ letterSpacing: any;
120
+ fontFamily: any;
121
+ fontWeight: any;
122
+ fontStyle: any;
123
+ color: string | undefined;
124
+ } | {
125
+ lineHeight: any;
126
+ fontSize: string;
127
+ letterSpacing: any;
128
+ fontFamily: any;
129
+ fontWeight: any;
130
+ fontStyle: any;
131
+ color: string | undefined;
132
+ } | {
133
+ lineHeight: any;
134
+ fontSize: string;
135
+ letterSpacing: any;
136
+ fontFamily: any;
137
+ fontWeight: any;
138
+ fontStyle: any;
139
+ color: string | undefined;
140
+ } | {
141
+ lineHeight: any;
142
+ fontSize: string;
143
+ letterSpacing: any;
144
+ fontFamily: any;
145
+ fontWeight: any;
146
+ fontStyle: any;
147
+ color: string | undefined;
148
+ } | {
149
+ lineHeight: any;
150
+ fontSize: string;
151
+ letterSpacing: any;
152
+ fontFamily: any;
153
+ fontWeight: any;
154
+ fontStyle: any;
155
+ color: string | undefined;
156
+ } | {
157
+ lineHeight: any;
158
+ fontSize: string;
159
+ letterSpacing: any;
160
+ fontFamily: any;
161
+ fontWeight: any;
162
+ fontStyle: any;
163
+ color: string | undefined;
164
+ } | {
165
+ lineHeight: any;
166
+ fontSize: string;
167
+ letterSpacing: any;
168
+ fontFamily: any;
169
+ fontWeight: any;
170
+ fontStyle: any;
171
+ color: string | undefined;
172
+ } | {
173
+ lineHeight: any;
174
+ fontSize: string;
175
+ letterSpacing: any;
176
+ fontFamily: any;
177
+ fontWeight: any;
178
+ fontStyle: any;
179
+ color: string | undefined;
180
+ } | {
181
+ lineHeight: any;
182
+ fontSize: string;
183
+ letterSpacing: any;
184
+ fontFamily: any;
185
+ fontWeight: any;
186
+ fontStyle: any;
187
+ color: string | undefined;
188
+ } | {
189
+ lineHeight: any;
190
+ fontSize: string;
191
+ letterSpacing: any;
192
+ fontFamily: any;
193
+ fontWeight: any;
194
+ fontStyle: any;
195
+ color: string | undefined;
196
+ };
3
197
  export declare const getElementType: (element: string) => ElementType;
4
198
  export declare const isHeading: (type: TypographyType) => type is TypographyHeadingType;
5
199
  export declare const inlineElements: ElementType[];
@@ -6,6 +6,12 @@ import '../../helpers/styling/focus.js';
6
6
  import '../../helpers/styling/danger.js';
7
7
  import '../../helpers/styling/selection.js';
8
8
 
9
+ var defaultTypographyType = 'bodySans02';
10
+ var getFontStyling = function getFontStyling(type, withColor) {
11
+ return Object.assign({
12
+ color: withColor ? typographyTokens.typographyType[type].base.color : undefined
13
+ }, typographyTokens.typographyType[type].base.font);
14
+ };
9
15
  var getElementType = function getElementType(element) {
10
16
  switch (element) {
11
17
  case 'a':
@@ -67,4 +73,4 @@ var getAnchorStyling = function getAnchorStyling(external, interactionStyling, t
67
73
  return css(["", " color:", ";width:fit-content;text-decoration:underline;@media (prefers-reduced-motion:no-preference){transition:", ";}", " &:hover{color:", ";", "}", " &:focus-visible,&.focus-visible,&:focus-visible::selection,&.focus-visible::selection{", "}"], typographyType ? css(["", ";", ""], typographyTokens.typographyType[typographyType].base.font, getMarginStyling(typographyType, 'a', withMargins)) : css(["font:inherit;", ""], getMarginStyling('a', 'a', withMargins)), typographyTokens.typographyType.a.base.color, focusVisibleLinkTransitionValue, external && css(["display:inline-flex;align-items:center;gap:", ";"], typographyTokens.typographyType.a.base.gap), typographyTokens.typographyType.a.hover.color, interactionStyling && interactionStyling.hover && css(["", ""], interactionStyling.hover), interactionStyling && interactionStyling.active && css(["&:active{", "}"], interactionStyling.active), focusVisibleLink);
68
74
  };
69
75
 
70
- export { getAdditionalFontStyle, getAnchorStyling, getElementType, getMarginStyling, inlineElements, isInlineElement };
76
+ export { defaultTypographyType, getAdditionalFontStyle, getAnchorStyling, getElementType, getFontStyling, getMarginStyling, inlineElements, isInlineElement };
@@ -1,10 +1,11 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { inputTokens } from './Input.tokens.js';
2
+ import { inputTokens, inputTypographyTypes } from './Input.tokens.js';
3
3
  import '../styling/focusVisible.js';
4
4
  import { hoverInputfield, hoverDangerInputfield } from '../styling/hover.js';
5
5
  import { focusInputfield, focusDangerInputfield } from '../styling/focus.js';
6
6
  import { dangerInputfield } from '../styling/danger.js';
7
7
  import { selection } from '../styling/selection.js';
8
+ import { getFontStyling } from '../../components/Typography/Typography.utils.js';
8
9
 
9
10
  var input = inputTokens.input,
10
11
  container = inputTokens.container;
@@ -17,7 +18,7 @@ var StatefulInput = styled(Input).withConfig({
17
18
  componentId: "sc-1oz9x8w-1"
18
19
  })(["-webkit-appearance:textfield;", " ", " &:enabled:read-only{border:none;outline:none;cursor:default;background-color:", ";padding-left:0;}&:disabled{cursor:not-allowed;color:", ";background-color:", ";}"], function (_ref) {
19
20
  var componentSize = _ref.componentSize;
20
- return componentSize && css(["padding:", ";", ""], input.sizes[componentSize].padding, input.sizes[componentSize].font);
21
+ return componentSize && css(["padding:", ";", ""], input.sizes[componentSize].padding, getFontStyling(inputTypographyTypes[componentSize]));
21
22
  }, function (_ref2) {
22
23
  var hasErrorMessage = _ref2.hasErrorMessage;
23
24
  return hasErrorMessage && css(["", " &:hover:enabled:read-write{", "}&:focus:enabled:read-write,&:active:enabled:read-write{", "}"], dangerInputfield, hoverDangerInputfield, focusDangerInputfield);