@navikt/ds-react 2.9.7 → 3.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.
Files changed (130) hide show
  1. package/_docs.json +101 -0
  2. package/cjs/accordion/Accordion.js +8 -2
  3. package/cjs/accordion/AccordionContent.js +3 -3
  4. package/cjs/accordion/AccordionContext.js +10 -0
  5. package/cjs/accordion/AccordionHeader.js +14 -12
  6. package/cjs/accordion/AccordionItem.js +18 -5
  7. package/cjs/alert/Alert.js +5 -5
  8. package/cjs/chips/Removable.js +2 -2
  9. package/cjs/chips/Toggle.js +2 -2
  10. package/cjs/date/DateInput.js +2 -2
  11. package/cjs/date/datepicker/caption/Caption.js +3 -3
  12. package/cjs/date/datepicker/caption/DropdownCaption.js +3 -3
  13. package/cjs/date/monthpicker/MonthCaption.js +3 -3
  14. package/cjs/expansion-card/ExpansionCard.js +1 -1
  15. package/cjs/expansion-card/ExpansionCardDescription.js +1 -1
  16. package/cjs/form/Select.js +2 -2
  17. package/cjs/form/Switch.js +2 -2
  18. package/cjs/form/search/Search.js +3 -3
  19. package/cjs/form/search/SearchButton.js +2 -2
  20. package/cjs/help-text/HelpText.js +3 -3
  21. package/cjs/help-text/HelpTextIcon.js +20 -0
  22. package/cjs/link-panel/LinkPanel.js +2 -2
  23. package/cjs/modal/Modal.js +2 -2
  24. package/cjs/pagination/Pagination.js +4 -4
  25. package/cjs/read-more/ReadMore.js +5 -7
  26. package/cjs/stepper/Step.js +4 -2
  27. package/cjs/table/ColumnHeader.js +2 -2
  28. package/cjs/table/ExpandableRow.js +2 -3
  29. package/cjs/tabs/TabList.js +2 -2
  30. package/esm/accordion/Accordion.d.ts +12 -0
  31. package/esm/accordion/Accordion.js +8 -2
  32. package/esm/accordion/Accordion.js.map +1 -1
  33. package/esm/accordion/AccordionContent.js +3 -3
  34. package/esm/accordion/AccordionContent.js.map +1 -1
  35. package/esm/accordion/AccordionContext.d.ts +8 -0
  36. package/esm/accordion/AccordionContext.js +8 -0
  37. package/esm/accordion/AccordionContext.js.map +1 -0
  38. package/esm/accordion/AccordionHeader.js +14 -12
  39. package/esm/accordion/AccordionHeader.js.map +1 -1
  40. package/esm/accordion/AccordionItem.js +19 -6
  41. package/esm/accordion/AccordionItem.js.map +1 -1
  42. package/esm/alert/Alert.js +5 -5
  43. package/esm/alert/Alert.js.map +1 -1
  44. package/esm/chips/Removable.js +2 -2
  45. package/esm/chips/Removable.js.map +1 -1
  46. package/esm/chips/Toggle.js +2 -2
  47. package/esm/chips/Toggle.js.map +1 -1
  48. package/esm/date/DateInput.js +2 -2
  49. package/esm/date/DateInput.js.map +1 -1
  50. package/esm/date/datepicker/caption/Caption.js +3 -3
  51. package/esm/date/datepicker/caption/Caption.js.map +1 -1
  52. package/esm/date/datepicker/caption/DropdownCaption.js +3 -3
  53. package/esm/date/datepicker/caption/DropdownCaption.js.map +1 -1
  54. package/esm/date/monthpicker/MonthCaption.js +3 -3
  55. package/esm/date/monthpicker/MonthCaption.js.map +1 -1
  56. package/esm/expansion-card/ExpansionCard.js +1 -1
  57. package/esm/expansion-card/ExpansionCard.js.map +1 -1
  58. package/esm/expansion-card/ExpansionCardDescription.js +1 -1
  59. package/esm/expansion-card/ExpansionCardDescription.js.map +1 -1
  60. package/esm/form/Fieldset/useFieldset.d.ts +1 -1
  61. package/esm/form/Select.js +2 -2
  62. package/esm/form/Select.js.map +1 -1
  63. package/esm/form/Switch.js +2 -2
  64. package/esm/form/Switch.js.map +1 -1
  65. package/esm/form/checkbox/useCheckbox.d.ts +1 -1
  66. package/esm/form/radio/useRadio.d.ts +1 -1
  67. package/esm/form/search/Search.js +3 -3
  68. package/esm/form/search/Search.js.map +1 -1
  69. package/esm/form/search/SearchButton.js +2 -2
  70. package/esm/form/search/SearchButton.js.map +1 -1
  71. package/esm/form/useFormField.d.ts +1 -1
  72. package/esm/help-text/HelpText.js +3 -3
  73. package/esm/help-text/HelpText.js.map +1 -1
  74. package/esm/help-text/HelpTextIcon.d.ts +5 -0
  75. package/esm/help-text/HelpTextIcon.js +14 -0
  76. package/esm/help-text/HelpTextIcon.js.map +1 -0
  77. package/esm/link-panel/LinkPanel.js +2 -2
  78. package/esm/link-panel/LinkPanel.js.map +1 -1
  79. package/esm/modal/Modal.js +2 -2
  80. package/esm/modal/Modal.js.map +1 -1
  81. package/esm/pagination/Pagination.js +4 -4
  82. package/esm/pagination/Pagination.js.map +1 -1
  83. package/esm/read-more/ReadMore.js +5 -7
  84. package/esm/read-more/ReadMore.js.map +1 -1
  85. package/esm/stepper/Step.js +4 -2
  86. package/esm/stepper/Step.js.map +1 -1
  87. package/esm/table/ColumnHeader.js +2 -2
  88. package/esm/table/ColumnHeader.js.map +1 -1
  89. package/esm/table/ExpandableRow.js +2 -3
  90. package/esm/table/ExpandableRow.js.map +1 -1
  91. package/esm/tabs/TabList.js +3 -3
  92. package/esm/tabs/TabList.js.map +1 -1
  93. package/esm/util/index.d.ts +1 -1
  94. package/package.json +3 -3
  95. package/src/accordion/Accordion.tsx +43 -3
  96. package/src/accordion/AccordionContent.tsx +14 -11
  97. package/src/accordion/AccordionContext.tsx +15 -0
  98. package/src/accordion/AccordionHeader.tsx +20 -20
  99. package/src/accordion/AccordionItem.tsx +25 -6
  100. package/src/accordion/accordion.stories.tsx +217 -16
  101. package/src/alert/Alert.tsx +9 -9
  102. package/src/button/button.stories.tsx +8 -8
  103. package/src/chips/Removable.tsx +2 -2
  104. package/src/chips/Toggle.tsx +2 -2
  105. package/src/date/DateInput.tsx +2 -2
  106. package/src/date/datepicker/caption/Caption.tsx +3 -3
  107. package/src/date/datepicker/caption/DropdownCaption.tsx +3 -3
  108. package/src/date/monthpicker/MonthCaption.tsx +3 -3
  109. package/src/expansion-card/ExpansionCard.tsx +1 -1
  110. package/src/expansion-card/ExpansionCardDescription.tsx +1 -1
  111. package/src/form/Select.tsx +3 -2
  112. package/src/form/Switch.tsx +4 -5
  113. package/src/form/search/Search.tsx +6 -3
  114. package/src/form/search/SearchButton.tsx +2 -2
  115. package/src/help-text/HelpText.tsx +3 -6
  116. package/src/help-text/HelpTextIcon.tsx +45 -0
  117. package/src/link/link.stories.tsx +7 -5
  118. package/src/link-panel/LinkPanel.tsx +3 -2
  119. package/src/list/list.stories.tsx +9 -9
  120. package/src/modal/Modal.tsx +4 -3
  121. package/src/pagination/Pagination.tsx +5 -4
  122. package/src/read-more/ReadMore.tsx +14 -11
  123. package/src/read-more/readmore.stories.tsx +5 -2
  124. package/src/stepper/Step.tsx +22 -5
  125. package/src/stepper/stepper.stories.tsx +1 -3
  126. package/src/table/ColumnHeader.tsx +8 -4
  127. package/src/table/ExpandableRow.tsx +2 -6
  128. package/src/tabs/TabList.tsx +4 -4
  129. package/src/tabs/Tabs.stories.tsx +49 -25
  130. package/src/toggle-group/ToggleGroup.stories.tsx +12 -7
@@ -1,4 +1,4 @@
1
- import { Star } from "@navikt/ds-icons";
1
+ import { StarIcon } from "@navikt/aksel-icons";
2
2
  import React from "react";
3
3
  import { Button } from "./index";
4
4
 
@@ -45,7 +45,7 @@ export const Default = {
45
45
  variant={props.variant}
46
46
  size={props.size}
47
47
  loading={props.loading}
48
- icon={props.icon ? <Star /> : undefined}
48
+ icon={props.icon ? <StarIcon /> : undefined}
49
49
  iconPosition={props.iconPosition}
50
50
  >
51
51
  {props.children}
@@ -159,7 +159,7 @@ export const Icon = () => (
159
159
  <Button
160
160
  key={variant}
161
161
  variant={variant}
162
- icon={<Star title="Stjerne" />}
162
+ icon={<StarIcon title="Stjerne" />}
163
163
  />
164
164
  ))}
165
165
  </div>
@@ -169,7 +169,7 @@ export const Icon = () => (
169
169
  key={variant}
170
170
  variant={variant}
171
171
  size="small"
172
- icon={<Star title="Stjerne" />}
172
+ icon={<StarIcon title="Stjerne" />}
173
173
  />
174
174
  ))}
175
175
  </div>
@@ -179,7 +179,7 @@ export const Icon = () => (
179
179
  key={variant}
180
180
  variant={variant}
181
181
  size="xsmall"
182
- icon={<Star title="Stjerne" />}
182
+ icon={<StarIcon title="Stjerne" />}
183
183
  />
184
184
  ))}
185
185
  </div>
@@ -193,7 +193,7 @@ export const IconWText = () => (
193
193
  <Button
194
194
  key={variant}
195
195
  variant={variant}
196
- icon={<Star title="Stjerne" />}
196
+ icon={<StarIcon title="Stjerne" />}
197
197
  iconPosition={i % 2 ? "left" : "right"}
198
198
  >
199
199
  {varSwitch[variant]}
@@ -206,7 +206,7 @@ export const IconWText = () => (
206
206
  key={variant}
207
207
  variant={variant}
208
208
  size="small"
209
- icon={<Star title="Stjerne" />}
209
+ icon={<StarIcon title="Stjerne" />}
210
210
  iconPosition={i % 2 ? "left" : "right"}
211
211
  >
212
212
  {varSwitch[variant]}
@@ -219,7 +219,7 @@ export const IconWText = () => (
219
219
  key={variant}
220
220
  variant={variant}
221
221
  size="xsmall"
222
- icon={<Star title="Stjerne" />}
222
+ icon={<StarIcon title="Stjerne" />}
223
223
  iconPosition={i % 2 ? "left" : "right"}
224
224
  >
225
225
  {varSwitch[variant]}
@@ -1,4 +1,4 @@
1
- import { Close } from "@navikt/ds-icons";
1
+ import { XMarkIcon } from "@navikt/aksel-icons";
2
2
  import cl from "clsx";
3
3
  import React, { forwardRef } from "react";
4
4
  import { OverridableComponent } from "../util/OverridableComponent";
@@ -58,7 +58,7 @@ export const RemovableChips: OverridableComponent<
58
58
  >
59
59
  <span className="navds-chips__chip-text">{children}</span>
60
60
  <span className="navds-chips__removable-icon">
61
- <Close aria-hidden />
61
+ <XMarkIcon aria-hidden />
62
62
  </span>
63
63
  </Component>
64
64
  );
@@ -1,4 +1,4 @@
1
- import { SuccessStroke } from "@navikt/ds-icons";
1
+ import { CheckmarkIcon } from "@navikt/aksel-icons";
2
2
  import cl from "clsx";
3
3
  import React, { forwardRef } from "react";
4
4
  import { OverridableComponent } from "../util/OverridableComponent";
@@ -30,7 +30,7 @@ export const ToggleChips: ToggleChipsType = forwardRef(
30
30
  aria-pressed={selected}
31
31
  >
32
32
  {selected && (
33
- <SuccessStroke aria-hidden className="navds-chips__toggle-icon" />
33
+ <CheckmarkIcon aria-hidden className="navds-chips__toggle-icon" />
34
34
  )}
35
35
  <span className="navds-chips__chip-text">{children}</span>
36
36
  </Component>
@@ -1,4 +1,4 @@
1
- import { Calender } from "@navikt/ds-icons";
1
+ import { CalendarIcon } from "@navikt/aksel-icons";
2
2
  import cl from "clsx";
3
3
  import React, { forwardRef, InputHTMLAttributes } from "react";
4
4
  import { BodyShort, Button, ErrorMessage, Label, omit } from "..";
@@ -124,7 +124,7 @@ const DateInput: DateInputType = forwardRef<HTMLInputElement, DateInputProps>(
124
124
  tabIndex={open ? -1 : 0}
125
125
  disabled={inputProps.disabled}
126
126
  icon={
127
- <Calender
127
+ <CalendarIcon
128
128
  title={
129
129
  open
130
130
  ? conditionalVariables.iconTitle.close
@@ -1,4 +1,4 @@
1
- import { Left, Right } from "@navikt/ds-icons";
1
+ import { ArrowLeftIcon, ArrowRightIcon } from "@navikt/aksel-icons";
2
2
  import React from "react";
3
3
  import { CaptionProps, useDayPicker, useNavigation } from "react-day-picker";
4
4
  import { Button, Label } from "../../..";
@@ -32,13 +32,13 @@ export const DatePickerCaption = ({ displayMonth, id }: CaptionProps) => {
32
32
  variant="tertiary"
33
33
  disabled={!previousMonth}
34
34
  onClick={() => previousMonth && goToMonth(previousMonth)}
35
- icon={<Left title="velg forrige måned" />}
35
+ icon={<ArrowLeftIcon title="velg forrige måned" />}
36
36
  className="navds-date__caption-button"
37
37
  type="button"
38
38
  />
39
39
  <Button
40
40
  aria-label={nextLabel}
41
- icon={<Right title="velg neste måned" />}
41
+ icon={<ArrowRightIcon title="velg neste måned" />}
42
42
  onClick={() => nextMonth && goToMonth(nextMonth)}
43
43
  disabled={!nextMonth}
44
44
  variant="tertiary"
@@ -1,4 +1,4 @@
1
- import { Left, Right } from "@navikt/ds-icons";
1
+ import { ArrowLeftIcon, ArrowRightIcon } from "@navikt/aksel-icons";
2
2
  import setMonth from "date-fns/setMonth";
3
3
  import setYear from "date-fns/setYear";
4
4
  import startOfMonth from "date-fns/startOfMonth";
@@ -58,7 +58,7 @@ export const DropdownCaption = ({ displayMonth, id }: CaptionProps) => {
58
58
  variant="tertiary"
59
59
  disabled={!previousMonth}
60
60
  onClick={() => previousMonth && goToMonth(previousMonth)}
61
- icon={<Left title="velg forrige måned" />}
61
+ icon={<ArrowLeftIcon title="velg forrige måned" />}
62
62
  className="navds-date__caption-button"
63
63
  type="button"
64
64
  />
@@ -94,7 +94,7 @@ export const DropdownCaption = ({ displayMonth, id }: CaptionProps) => {
94
94
 
95
95
  <Button
96
96
  aria-label={nextLabel}
97
- icon={<Right title="velg neste måned" />}
97
+ icon={<ArrowRightIcon title="velg neste måned" />}
98
98
  onClick={() => nextMonth && goToMonth(nextMonth)}
99
99
  disabled={!nextMonth}
100
100
  variant="tertiary"
@@ -1,4 +1,4 @@
1
- import { Left, Right } from "@navikt/ds-icons";
1
+ import { ArrowLeftIcon, ArrowRightIcon } from "@navikt/aksel-icons";
2
2
  import setYear from "date-fns/setYear";
3
3
  import startOfMonth from "date-fns/startOfMonth";
4
4
  import startOfYear from "date-fns/startOfYear";
@@ -61,7 +61,7 @@ export const MonthCaption = () => {
61
61
  disabled={hasPrevYear()}
62
62
  onClick={() => handleButtonClick(-1)}
63
63
  aria-label={labelPrevYear(locale?.code)}
64
- icon={<Left aria-hidden />}
64
+ icon={<ArrowLeftIcon aria-hidden />}
65
65
  variant="tertiary"
66
66
  type="button"
67
67
  />
@@ -90,7 +90,7 @@ export const MonthCaption = () => {
90
90
  disabled={hasNextYear()}
91
91
  onClick={() => handleButtonClick(1)}
92
92
  aria-label={labelNextYear(locale?.code)}
93
- icon={<Right aria-hidden />}
93
+ icon={<ArrowRightIcon aria-hidden />}
94
94
  variant="tertiary"
95
95
  type="button"
96
96
  />
@@ -113,7 +113,7 @@ export const ExpansionCard = forwardRef<HTMLDivElement, ExpansionCardProps>(
113
113
  `navds-expansioncard--${size}`,
114
114
  {
115
115
  "navds-expansioncard--open": open ?? _open,
116
- "navds-expansioncard--no-fade": !shouldFade.current,
116
+ "navds-expansioncard--no-animation": !shouldFade.current,
117
117
  }
118
118
  )}
119
119
  ref={ref}
@@ -18,7 +18,7 @@ export const ExpansionCardDescription: ExpansionCardDescriptionType =
18
18
 
19
19
  if (panelContext === null) {
20
20
  console.error(
21
- "<ExpansionCard.Header> has to be used within an <ExpansionCard>"
21
+ "<ExpansionCard.Description> has to be used within an <ExpansionCard>"
22
22
  );
23
23
  return null;
24
24
  }
@@ -1,6 +1,7 @@
1
1
  import React, { forwardRef, SelectHTMLAttributes } from "react";
2
2
  import cl from "clsx";
3
- import { Expand } from "@navikt/ds-icons";
3
+
4
+ import { ChevronDownIcon } from "@navikt/aksel-icons";
4
5
  import { BodyLong, Label, ErrorMessage, omit, Detail } from "..";
5
6
  import { FormFieldProps, useFormField } from "./useFormField";
6
7
 
@@ -113,7 +114,7 @@ export const Select = forwardRef<HTMLSelectElement, SelectProps>(
113
114
  >
114
115
  {children}
115
116
  </select>
116
- <Expand className="navds-select__chevron" aria-hidden />
117
+ <ChevronDownIcon className="navds-select__chevron" aria-hidden />
117
118
  </div>
118
119
  <div
119
120
  className="navds-form-field__error"
@@ -10,9 +10,9 @@ import { FormFieldProps, useFormField } from "./useFormField";
10
10
 
11
11
  const SelectedIcon = () => (
12
12
  <svg
13
- width="12px"
14
- height="12px"
15
- viewBox="0 0 12 12"
13
+ width="12"
14
+ height="10"
15
+ viewBox="0 0 12 10"
16
16
  fill="none"
17
17
  xmlns="http://www.w3.org/2000/svg"
18
18
  focusable={false}
@@ -23,9 +23,8 @@ const SelectedIcon = () => (
23
23
  <path
24
24
  fillRule="evenodd"
25
25
  clipRule="evenodd"
26
- d="M4.01386 8L10.25 2L11 2.75L4.01386 9.5L1 6.5L1.75 5.75L4.01386 8Z"
26
+ d="M11.2674 0.647802C11.8762 1.20971 11.9141 2.1587 11.3522 2.76743L5.35221 9.26743C5.07531 9.56739 4.68813 9.74155 4.27998 9.74971C3.87184 9.75787 3.478 9.59933 3.18934 9.31067L0.68934 6.81067C0.103553 6.22488 0.103553 5.27513 0.68934 4.68935C1.27513 4.10356 2.22487 4.10356 2.81066 4.68935L4.20673 6.08541L9.14779 0.732587C9.7097 0.123856 10.6587 0.0858967 11.2674 0.647802Z"
27
27
  fill="currentColor"
28
- stroke="currentColor"
29
28
  />
30
29
  </svg>
31
30
  );
@@ -1,4 +1,4 @@
1
- import { Close, Search as SearchIcon } from "@navikt/ds-icons";
1
+ import { XMarkIcon, MagnifyingGlassIcon } from "@navikt/aksel-icons";
2
2
  import cl from "clsx";
3
3
  import React, {
4
4
  forwardRef,
@@ -194,7 +194,10 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
194
194
  <div className="navds-search__wrapper">
195
195
  <div className="navds-search__wrapper-inner">
196
196
  {variant === "simple" && (
197
- <SearchIcon aria-hidden className="navds-search__search-icon" />
197
+ <MagnifyingGlassIcon
198
+ aria-hidden
199
+ className="navds-search__search-icon"
200
+ />
198
201
  )}
199
202
  <input
200
203
  ref={mergedRef}
@@ -222,7 +225,7 @@ export const Search = forwardRef<HTMLInputElement, SearchProps>(
222
225
  <span className="navds-sr-only">
223
226
  {clearButtonLabel ? clearButtonLabel : "Tøm"}
224
227
  </span>
225
- <Close aria-hidden />
228
+ <XMarkIcon aria-hidden />
226
229
  </button>
227
230
  )}
228
231
  </div>
@@ -1,8 +1,8 @@
1
- import { Search } from "@navikt/ds-icons";
2
1
  import cl from "clsx";
3
2
  import React, { forwardRef, useContext } from "react";
4
3
  import { Button, ButtonProps } from "../..";
5
4
  import { SearchContext } from "./Search";
5
+ import { MagnifyingGlassIcon } from "@navikt/aksel-icons";
6
6
 
7
7
  export interface SearchButtonProps
8
8
  extends Omit<ButtonProps, "size" | "children" | "variant"> {
@@ -41,7 +41,7 @@ const SearchButton: SearchButtonType = forwardRef(
41
41
  onClick?.(e);
42
42
  }}
43
43
  icon={
44
- <Search
44
+ <MagnifyingGlassIcon
45
45
  {...(children ? { "aria-hidden": true } : { title: "Søk" })}
46
46
  />
47
47
  }
@@ -1,7 +1,7 @@
1
- import { Helptext as HelpTextIcon, HelptextFilled } from "@navikt/ds-icons";
2
1
  import cl from "clsx";
3
2
  import React, { forwardRef, useMemo, useRef, useState } from "react";
4
3
  import { Popover, PopoverProps, mergeRefs } from "..";
4
+ import { HelpTextIcon } from "./HelpTextIcon";
5
5
 
6
6
  export interface HelpTextProps
7
7
  extends React.ButtonHTMLAttributes<HTMLButtonElement>,
@@ -61,11 +61,8 @@ export const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(
61
61
  type="button"
62
62
  aria-expanded={open}
63
63
  >
64
- <HelpTextIcon className="navds-help-text__icon" title={title} />
65
- <HelptextFilled
66
- className="navds-help-text__icon navds-help-text__icon--filled"
67
- title={title}
68
- />
64
+ <HelpTextIcon title={title} />
65
+ <HelpTextIcon filled title={title} />
69
66
  </button>
70
67
  <Popover
71
68
  onClose={() => setOpen(false)}
@@ -0,0 +1,45 @@
1
+ import cl from "clsx";
2
+ import React from "react";
3
+ import { useId } from "../util/useId";
4
+
5
+ export const HelpTextIcon = ({
6
+ title,
7
+ filled = false,
8
+ }: {
9
+ title: string;
10
+ filled?: boolean;
11
+ }) => {
12
+ let titleId: string | undefined = useId();
13
+ titleId = title ? `title-${titleId}` : undefined;
14
+ return (
15
+ <svg
16
+ width="1em"
17
+ height="1em"
18
+ viewBox="0 0 24 24"
19
+ fill="none"
20
+ xmlns="http://www.w3.org/2000/svg"
21
+ focusable={false}
22
+ role="img"
23
+ aria-labelledby={titleId}
24
+ className={cl("navds-help-text__icon", {
25
+ "navds-help-text__icon--filled": filled,
26
+ })}
27
+ >
28
+ {title ? <title id={titleId}>{title}</title> : null}
29
+ <circle
30
+ cx="12"
31
+ cy="12"
32
+ r="11"
33
+ strokeWidth="2"
34
+ stroke="currentColor"
35
+ fill={filled ? "currentColor" : "transparent"}
36
+ />
37
+ <path
38
+ fillRule="evenodd"
39
+ clipRule="evenodd"
40
+ d="M9.75 9C9.75 7.75736 10.7574 6.75 12 6.75H12.1716C13.3195 6.75 14.25 7.68054 14.25 8.82843C14.25 9.37966 14.031 9.90832 13.6412 10.2981L12.6412 11.2981C11.7504 12.1889 11.25 13.3971 11.25 14.6569C11.25 15.0711 11.5858 15.4069 12 15.4069C12.4142 15.4069 12.75 15.0711 12.75 14.6569C12.75 13.7949 13.0924 12.9682 13.7019 12.3588L14.7019 11.3588C15.373 10.6877 15.75 9.77748 15.75 8.82843C15.75 6.85212 14.1479 5.25 12.1716 5.25H12C9.92893 5.25 8.25 6.92893 8.25 9V9.5C8.25 9.91421 8.58579 10.25 9 10.25C9.41421 10.25 9.75 9.91421 9.75 9.5V9ZM12 16.5C11.4477 16.5 11 16.9477 11 17.5C11 18.0523 11.4477 18.5 12 18.5C12.5523 18.5 13 18.0523 13 17.5C13 16.9477 12.5523 16.5 12 16.5Z"
41
+ fill={filled ? "var(--a-surface-default)" : "currentColor"}
42
+ />
43
+ </svg>
44
+ );
45
+ };
@@ -1,10 +1,10 @@
1
- import { Add } from "@navikt/ds-icons";
1
+ import { PlusCircleFillIcon } from "@navikt/aksel-icons";
2
2
  import React from "react";
3
3
  import {
4
+ BodyLong,
5
+ Alert as DsAlert,
4
6
  ConfirmationPanel as DsConfirmationPanel,
5
7
  Link,
6
- Alert as DsAlert,
7
- BodyLong,
8
8
  } from "..";
9
9
  export default {
10
10
  title: "ds-react/Link",
@@ -15,7 +15,8 @@ export const Default = {
15
15
  render: (props) => {
16
16
  const LinkD = () => (
17
17
  <Link href="#">
18
- {props.icon && <Add />}Ex aliqua incididunt {props.icon && <Add />}
18
+ {props.icon && <PlusCircleFillIcon />}Ex aliqua incididunt{" "}
19
+ {props.icon && <PlusCircleFillIcon />}
19
20
  </Link>
20
21
  );
21
22
 
@@ -41,7 +42,8 @@ export const Default = {
41
42
 
42
43
  const DemoLink = () => (
43
44
  <Link href="#">
44
- <Add aria-hidden /> Ex aliqua incididunt <Add aria-hidden />
45
+ <PlusCircleFillIcon aria-hidden /> Ex aliqua incididunt{" "}
46
+ <PlusCircleFillIcon aria-hidden />
45
47
  </Link>
46
48
  );
47
49
 
@@ -1,12 +1,13 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import { Panel, OverridableComponent } from "..";
3
- import { Next } from "@navikt/ds-icons";
3
+
4
4
  import cl from "clsx";
5
5
  import { LinkPanelTitle, LinkPanelTitleType } from "./LinkPanelTitle";
6
6
  import {
7
7
  LinkPanelDescription,
8
8
  LinkPanelDescriptionType,
9
9
  } from "./LinkPanelDescription";
10
+ import { ChevronRightIcon } from "@navikt/aksel-icons";
10
11
 
11
12
  export interface LinkPanelProps
12
13
  extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
@@ -41,7 +42,7 @@ export const LinkPanelComponent: OverridableComponent<
41
42
  className={cl("navds-link-panel", className)}
42
43
  >
43
44
  <div className="navds-link-panel__content">{children}</div>
44
- <Next className="navds-link-panel__chevron" aria-hidden />
45
+ <ChevronRightIcon className="navds-link-panel__chevron" aria-hidden />
45
46
  </Panel>
46
47
  );
47
48
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
- BabyChangingRoom,
3
- Braille,
4
- Cognition,
5
- Refresh,
6
- } from "@navikt/ds-icons";
2
+ BabyWrappedIcon,
3
+ BrailleIcon,
4
+ HeadHeartIcon,
5
+ RecycleIcon,
6
+ } from "@navikt/aksel-icons";
7
7
  import { Meta } from "@storybook/react";
8
8
  import React from "react";
9
9
  import { List } from "..";
@@ -97,20 +97,20 @@ export const Icons = {
97
97
  <List>
98
98
  <List.Item
99
99
  title="Lorem Ipsum Dolor Sit Amet"
100
- icon={<Braille aria-hidden />}
100
+ icon={<BrailleIcon aria-hidden />}
101
101
  >
102
102
  Beskrivelsen på punkter er nærmere forklart <a href="/">her</a>
103
103
  </List.Item>
104
104
  <List.Item
105
105
  title="Consectetur Adipiscing Elit"
106
- icon={<Cognition aria-hidden />}
106
+ icon={<HeadHeartIcon aria-hidden />}
107
107
  >
108
108
  Beskrivelsen på punkter er nærmere forklart <a href="/">her</a>
109
109
  </List.Item>
110
- <List.Item icon={<BabyChangingRoom aria-hidden />}>
110
+ <List.Item icon={<BabyWrappedIcon aria-hidden />}>
111
111
  Beskrivelsen på punkter er nærmere forklart <a href="/">her</a>
112
112
  </List.Item>
113
- <List.Item icon={<Refresh aria-hidden />}>
113
+ <List.Item icon={<RecycleIcon aria-hidden />}>
114
114
  Beskrivelsen på punkter er nærmere forklart <a href="/">her</a>
115
115
  </List.Item>
116
116
  </List>
@@ -1,9 +1,10 @@
1
1
  import React, { forwardRef, useEffect, useMemo, useRef } from "react";
2
2
  import cl from "clsx";
3
3
  import ReactModal from "react-modal";
4
- import { Close } from "@navikt/ds-icons";
4
+
5
5
  import { Button, mergeRefs, useProvider } from "..";
6
6
  import ModalContent, { ModalContentType } from "./ModalContent";
7
+ import { XMarkIcon } from "@navikt/aksel-icons";
7
8
 
8
9
  export interface ModalProps {
9
10
  /**
@@ -144,10 +145,10 @@ export const Modal = forwardRef<ReactModal, ModalProps>(
144
145
  "navds-modal__button--shake": shouldCloseOnOverlayClick,
145
146
  })}
146
147
  size="small"
147
- variant="tertiary"
148
+ variant="tertiary-neutral"
148
149
  ref={buttonRef}
149
150
  onClick={onClose}
150
- icon={<Close title="Lukk modalvindu" />}
151
+ icon={<XMarkIcon title="Lukk modalvindu" />}
151
152
  />
152
153
  )}
153
154
  </ReactModal>
@@ -1,6 +1,7 @@
1
- import React, { forwardRef } from "react";
2
1
  import cl from "clsx";
3
- import { Back, Next } from "@navikt/ds-icons";
2
+ import React, { forwardRef } from "react";
3
+
4
+ import { ChevronLeftIcon, ChevronRightIcon } from "@navikt/aksel-icons";
4
5
  import { BodyShort } from "..";
5
6
  import PaginationItem, {
6
7
  PaginationItemProps,
@@ -145,7 +146,7 @@ export const Pagination = forwardRef<HTMLElement, PaginationProps>(
145
146
  page={page - 1}
146
147
  size={size}
147
148
  icon={
148
- <Back
149
+ <ChevronLeftIcon
149
150
  className="navds-pagination__prev-next-icon"
150
151
  {...(prevNextTexts
151
152
  ? { "aria-hidden": true }
@@ -199,7 +200,7 @@ export const Pagination = forwardRef<HTMLElement, PaginationProps>(
199
200
  page={page + 1}
200
201
  size={size}
201
202
  icon={
202
- <Next
203
+ <ChevronRightIcon
203
204
  className="navds-pagination__prev-next-icon"
204
205
  {...(prevNextTexts
205
206
  ? { "aria-hidden": true }
@@ -1,9 +1,7 @@
1
1
  import React, { forwardRef, useState } from "react";
2
2
  import cl from "clsx";
3
- import { Expand } from "@navikt/ds-icons";
4
3
  import { BodyLong } from "../typography";
5
- import { ExpandFilled } from "@navikt/ds-icons";
6
- import AnimateHeight from "../util/AnimateHeight";
4
+ import { ChevronDownIcon } from "@navikt/aksel-icons";
7
5
 
8
6
  export interface ReadMoreProps
9
7
  extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -74,18 +72,23 @@ export const ReadMore = forwardRef<HTMLButtonElement, ReadMoreProps>(
74
72
  }}
75
73
  aria-expanded={isOpened}
76
74
  >
77
- <Expand className="navds-read-more__expand-icon" aria-hidden />
78
- <ExpandFilled
79
- className="navds-read-more__expand-icon navds-read-more__expand-icon--filled"
75
+ <ChevronDownIcon
76
+ className="navds-read-more__expand-icon"
80
77
  aria-hidden
81
78
  />
82
79
  <span>{header}</span>
83
80
  </button>
84
- <AnimateHeight height={isOpened ? "auto" : 0} duration={250}>
85
- <BodyLong as="div" className="navds-read-more__content" size={size}>
86
- {children}
87
- </BodyLong>
88
- </AnimateHeight>
81
+
82
+ <BodyLong
83
+ as="div"
84
+ aria-hidden={!isOpened}
85
+ className={cl("navds-read-more__content", {
86
+ "navds-read-more__content--closed": !isOpened,
87
+ })}
88
+ size={size}
89
+ >
90
+ {children}
91
+ </BodyLong>
89
92
  </div>
90
93
  );
91
94
  }
@@ -26,8 +26,11 @@ export const Default = {
26
26
  header="Grunnen til at vi spør om dette og i tillegg ber om vedlegg"
27
27
  size={props.size}
28
28
  >
29
- Command station, this is ST 321. Code Clearance Blue. We're starting our
30
- approach. Deactivate the security shield.
29
+ <div style={{ maxWidth: 300 }}>
30
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia,
31
+ tempore corporis exercitationem minus dignissimos eius aspernatur
32
+ fugiat iusto.
33
+ </div>
31
34
  </ReadMore>
32
35
  );
33
36
  },
@@ -1,4 +1,3 @@
1
- import { SuccessFilled } from "@navikt/ds-icons";
2
1
  import cl from "clsx";
3
2
  import React, { forwardRef, useContext } from "react";
4
3
  import { Label, OverridableComponent } from "..";
@@ -27,6 +26,25 @@ export interface StepperStepProps
27
26
  interactive?: boolean;
28
27
  }
29
28
 
29
+ const CompletedIcon = () => (
30
+ <svg
31
+ width="14"
32
+ height="10"
33
+ viewBox="0 0 14 10"
34
+ fill="none"
35
+ xmlns="http://www.w3.org/2000/svg"
36
+ focusable={false}
37
+ role="img"
38
+ aria-hidden
39
+ aria-label="Fullført"
40
+ >
41
+ <path
42
+ d="M4.93563 6.41478L11.3755 0.404669C11.9796 -0.160351 12.9294 -0.130672 13.4959 0.47478C14.0624 1.08027 14.0299 2.03007 13.4249 2.59621L5.92151 9.59934C5.64138 9.85904 5.27598 10 4.90064 10C4.5069 10 4.12756 9.84621 3.83953 9.56111L1.33953 7.06111C0.75401 6.47558 0.75401 5.52542 1.33953 4.93989C1.92506 4.35437 2.87522 4.35437 3.46075 4.93989L4.93563 6.41478Z"
43
+ fill="currentColor"
44
+ />
45
+ </svg>
46
+ );
47
+
30
48
  export interface StepperStepType
31
49
  extends OverridableComponent<StepperStepProps, HTMLAnchorElement> {}
32
50
 
@@ -74,10 +92,9 @@ export const StepComponent: OverridableComponent<
74
92
  }}
75
93
  >
76
94
  {completed ? (
77
- <SuccessFilled
78
- aria-hidden
79
- className="navds-stepper__circle navds-stepper__circle--success"
80
- />
95
+ <span className="navds-stepper__circle navds-stepper__circle--success">
96
+ <CompletedIcon />
97
+ </span>
81
98
  ) : (
82
99
  <Label className="navds-stepper__circle" as="span" aria-hidden="true">
83
100
  {unsafe_index + 1}
@@ -175,9 +175,7 @@ export const CompletedSteps = () => {
175
175
  onStepChange={(step) => setActiveStep(step)}
176
176
  >
177
177
  <Stepper.Step completed={activeStep > 1}>Start søknad</Stepper.Step>
178
- <Stepper.Step completed={activeStep > 2}>
179
- Personopplysninger
180
- </Stepper.Step>
178
+ <Stepper.Step completed>Personopplysninger</Stepper.Step>
181
179
  <Stepper.Step completed={activeStep > 3}>Saksopplysninger</Stepper.Step>
182
180
  <Stepper.Step completed={activeStep >= 4}>
183
181
  Søknadstekst for en veldig spesifikk prosess i NAV som har lang tekst