@ndla/ui 50.7.2 → 50.8.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 (98) hide show
  1. package/es/Breadcrumb/BreadcrumbItem.js +7 -7
  2. package/es/CampaignBlock/CampaignBlock.js +7 -7
  3. package/es/CompetenceGoalTab/CompetenceItem.js +9 -9
  4. package/es/CompetenceGoalTab/styles.js +5 -5
  5. package/es/Embed/conceptComponents.js +9 -9
  6. package/es/FileList/FileList.js +7 -7
  7. package/es/Filter/FilterButtons.js +14 -14
  8. package/es/Frontpage/FrontpageAllSubjects.js +12 -12
  9. package/es/LearningPaths/LearningPathInformation.js +14 -5
  10. package/es/LearningPaths/LearningPathMenuContent.js +7 -7
  11. package/es/LinkBlock/LinkBlockSection.js +1 -1
  12. package/es/List/OrderedList.js +4 -1
  13. package/es/List/UnOrderedList.js +1 -1
  14. package/es/NDLAFilm/FilmMovieSearch.js +4 -4
  15. package/es/Navigation/NavigationBox.js +24 -30
  16. package/es/Programme/ProgrammeSubjects.js +1 -1
  17. package/es/Resource/resourceComponents.js +11 -11
  18. package/es/ResourceGroup/ResourceList.js +1 -1
  19. package/es/Search/ActiveFilters.js +6 -6
  20. package/es/Search/ContentTypeResultStyles.js +12 -12
  21. package/es/Search/SearchResult.js +12 -12
  22. package/es/SearchTypeResult/ActiveFilters.js +8 -8
  23. package/es/SearchTypeResult/PopupFilter.js +10 -10
  24. package/es/SearchTypeResult/SearchHeader.js +12 -12
  25. package/es/SearchTypeResult/SearchItem.js +12 -24
  26. package/es/SearchTypeResult/SearchItems.js +3 -3
  27. package/es/SearchTypeResult/components/ItemContexts.js +9 -9
  28. package/es/SnackBar/SnackbarProvider.js +6 -6
  29. package/es/Table/Table.js +6 -6
  30. package/es/TreeStructure/FolderItems.js +6 -6
  31. package/es/all.css +1 -1
  32. package/lib/Breadcrumb/BreadcrumbItem.js +7 -7
  33. package/lib/CampaignBlock/CampaignBlock.d.ts +3 -3
  34. package/lib/CampaignBlock/CampaignBlock.js +7 -7
  35. package/lib/CompetenceGoalTab/CompetenceItem.js +9 -9
  36. package/lib/CompetenceGoalTab/styles.js +5 -5
  37. package/lib/Embed/conceptComponents.js +9 -9
  38. package/lib/FileList/FileList.js +7 -7
  39. package/lib/Filter/FilterButtons.js +14 -14
  40. package/lib/Frontpage/FrontpageAllSubjects.js +12 -12
  41. package/lib/LearningPaths/LearningPathInformation.js +14 -7
  42. package/lib/LearningPaths/LearningPathMenuContent.js +7 -7
  43. package/lib/LinkBlock/LinkBlockSection.js +1 -1
  44. package/lib/List/OrderedList.d.ts +2 -0
  45. package/lib/List/OrderedList.js +5 -2
  46. package/lib/List/UnOrderedList.js +1 -1
  47. package/lib/NDLAFilm/FilmMovieSearch.js +4 -4
  48. package/lib/Navigation/NavigationBox.js +24 -30
  49. package/lib/Programme/ProgrammeSubjects.js +1 -1
  50. package/lib/Resource/resourceComponents.js +11 -11
  51. package/lib/ResourceGroup/ResourceList.js +1 -1
  52. package/lib/Search/ActiveFilters.js +6 -6
  53. package/lib/Search/ContentTypeResultStyles.js +12 -12
  54. package/lib/Search/SearchResult.js +12 -12
  55. package/lib/SearchTypeResult/ActiveFilters.js +8 -8
  56. package/lib/SearchTypeResult/PopupFilter.js +10 -10
  57. package/lib/SearchTypeResult/SearchHeader.js +12 -12
  58. package/lib/SearchTypeResult/SearchItem.js +12 -24
  59. package/lib/SearchTypeResult/SearchItems.js +3 -3
  60. package/lib/SearchTypeResult/components/ItemContexts.js +9 -9
  61. package/lib/SnackBar/SnackbarProvider.js +6 -6
  62. package/lib/Table/Table.js +6 -6
  63. package/lib/TreeStructure/FolderItems.js +6 -6
  64. package/lib/all.css +1 -1
  65. package/package.json +18 -18
  66. package/src/Breadcrumb/BreadcrumbItem.tsx +1 -2
  67. package/src/CampaignBlock/CampaignBlock.tsx +4 -4
  68. package/src/CompetenceGoalTab/CompetenceItem.tsx +0 -1
  69. package/src/CompetenceGoalTab/styles.ts +1 -0
  70. package/src/Embed/conceptComponents.tsx +0 -1
  71. package/src/FileList/FileList.tsx +0 -1
  72. package/src/Filter/FilterButtons.tsx +1 -2
  73. package/src/Frontpage/FrontpageAllSubjects.tsx +3 -3
  74. package/src/LearningPaths/LearningPathInformation.tsx +4 -5
  75. package/src/LearningPaths/LearningPathMenuContent.tsx +1 -2
  76. package/src/LinkBlock/LinkBlockSection.tsx +0 -2
  77. package/src/List/OrderedList.stories.tsx +27 -4
  78. package/src/List/OrderedList.tsx +71 -41
  79. package/src/List/UnOrderedList.tsx +4 -8
  80. package/src/List/UnorderedList.stories.tsx +23 -0
  81. package/src/NDLAFilm/FilmMovieSearch.tsx +2 -0
  82. package/src/Navigation/NavigationBox.tsx +6 -14
  83. package/src/Programme/ProgrammeSubjects.tsx +2 -0
  84. package/src/Resource/resourceComponents.tsx +1 -2
  85. package/src/ResourceGroup/ResourceList.tsx +0 -1
  86. package/src/Search/ActiveFilters.tsx +2 -2
  87. package/src/Search/ContentTypeResultStyles.tsx +0 -1
  88. package/src/Search/SearchResult.tsx +2 -3
  89. package/src/Search/component.search-result.scss +0 -1
  90. package/src/SearchTypeResult/ActiveFilters.tsx +3 -4
  91. package/src/SearchTypeResult/PopupFilter.tsx +1 -1
  92. package/src/SearchTypeResult/SearchHeader.tsx +1 -2
  93. package/src/SearchTypeResult/SearchItem.tsx +0 -4
  94. package/src/SearchTypeResult/SearchItems.tsx +1 -0
  95. package/src/SearchTypeResult/components/ItemContexts.tsx +0 -1
  96. package/src/SnackBar/SnackbarProvider.tsx +0 -1
  97. package/src/Table/Table.tsx +1 -1
  98. package/src/TreeStructure/FolderItems.tsx +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/ui",
3
- "version": "50.7.2",
3
+ "version": "50.8.0",
4
4
  "description": "UI component library for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -31,23 +31,23 @@
31
31
  "types"
32
32
  ],
33
33
  "dependencies": {
34
- "@ndla/accordion": "^3.0.17",
35
- "@ndla/button": "^12.0.22",
36
- "@ndla/carousel": "^4.0.22",
37
- "@ndla/core": "^4.3.2",
38
- "@ndla/dropdown-menu": "^1.0.22",
39
- "@ndla/forms": "^5.2.12",
34
+ "@ndla/accordion": "^3.0.19",
35
+ "@ndla/button": "^12.0.24",
36
+ "@ndla/carousel": "^4.0.24",
37
+ "@ndla/core": "^4.3.3",
38
+ "@ndla/dropdown-menu": "^1.0.23",
39
+ "@ndla/forms": "^5.2.14",
40
40
  "@ndla/hooks": "^2.1.4",
41
- "@ndla/icons": "^5.0.1",
41
+ "@ndla/icons": "^5.0.3",
42
42
  "@ndla/licenses": "^7.2.4",
43
- "@ndla/modal": "^5.0.21",
44
- "@ndla/notion": "^6.0.22",
45
- "@ndla/safelink": "^4.1.47",
46
- "@ndla/select": "^3.2.8",
47
- "@ndla/switch": "^1.1.28",
48
- "@ndla/tabs": "^3.2.8",
49
- "@ndla/tooltip": "^6.0.10",
50
- "@ndla/typography": "^0.4.5",
43
+ "@ndla/modal": "^5.0.23",
44
+ "@ndla/notion": "^6.0.24",
45
+ "@ndla/safelink": "^4.1.49",
46
+ "@ndla/select": "^3.2.10",
47
+ "@ndla/switch": "^1.1.29",
48
+ "@ndla/tabs": "^3.2.9",
49
+ "@ndla/tooltip": "^6.0.11",
50
+ "@ndla/typography": "^0.4.6",
51
51
  "@ndla/util": "^4.0.3",
52
52
  "@radix-ui/react-popover": "^1.0.7",
53
53
  "@radix-ui/react-slider": "^1.1.2",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@ndla/types-backend": "^0.2.21",
74
- "@ndla/types-embed": "^4.0.11",
74
+ "@ndla/types-embed": "^4.0.12",
75
75
  "css-loader": "^6.7.3",
76
76
  "mini-css-extract-plugin": "^2.7.5",
77
77
  "sass-loader": "^13.2.2",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "e7073784c24f3d52c8632a7e1e14954667f74897"
84
+ "gitHead": "e5630a5aabe1bb29936ed0308dc2b8e5620cf8f9"
85
85
  }
@@ -32,8 +32,7 @@ interface AutoCollapseProps {
32
32
  }
33
33
 
34
34
  const StyledListItem = styled.li<AutoCollapseProps>`
35
- margin-bottom: 0;
36
- margin-left: 0;
35
+ padding: 0;
37
36
  display: inline-flex;
38
37
  align-items: center;
39
38
  :before {
@@ -29,9 +29,9 @@ interface Props {
29
29
  language: string;
30
30
  };
31
31
  headingLevel?: HeadingLevel;
32
- url?: {
33
- url: string;
34
- text: string;
32
+ url: {
33
+ url?: string;
34
+ text?: string;
35
35
  };
36
36
  image?: Image;
37
37
  imageSide?: 'left' | 'right';
@@ -104,7 +104,7 @@ const CampaignBlock = ({
104
104
  <StyledDescription lang={description.language === 'nb' ? 'no' : description.language}>
105
105
  {description.text}
106
106
  </StyledDescription>
107
- {url && (
107
+ {url.url && (
108
108
  <StyledLink to={getPossiblyRelativeUrl(url.url, path)}>
109
109
  {url.text}
110
110
  <Forward />
@@ -36,7 +36,6 @@ const GoalsInfo = styled.p`
36
36
  `;
37
37
 
38
38
  const GoalList = styled.ul`
39
- margin: 0;
40
39
  padding: 0;
41
40
  list-style-type: none;
42
41
  `;
@@ -21,6 +21,7 @@ export const ListItemContent = styled.div`
21
21
  export const GoalItem = styled.li`
22
22
  margin: ${spacing.medium} 0;
23
23
  border-bottom: 1px solid ${colors.brand.neutral7};
24
+ padding: 0;
24
25
  `;
25
26
 
26
27
  export const GoalsHeading = styled.h3`
@@ -160,7 +160,6 @@ const StyledList = styled.ul`
160
160
  align-items: center;
161
161
  list-style: none;
162
162
  > li {
163
- margin: 0;
164
163
  font-family: ${fonts.sans};
165
164
  font-weight: ${fonts.weight.semibold};
166
165
  border-radius: ${misc.borderRadius};
@@ -33,7 +33,6 @@ const FileListHeaderWrapper = styled.div`
33
33
  `;
34
34
 
35
35
  const FilesList = styled.ul`
36
- margin: 0;
37
36
  padding: 0;
38
37
  `;
39
38
 
@@ -35,7 +35,6 @@ const StyledButtonElementWrapper = styled.div`
35
35
 
36
36
  const StyledList = styled.ul`
37
37
  list-style: none;
38
- margin: 0;
39
38
  padding: 0;
40
39
  ${mq.range({ from: breakpoints.tablet })} {
41
40
  column-count: 2;
@@ -47,7 +46,7 @@ const StyledList = styled.ul`
47
46
  }
48
47
  `;
49
48
  const StyledListItem = styled.li`
50
- margin-bottom: 0;
49
+ padding-bottom: 0;
51
50
  break-inside: avoid;
52
51
  `;
53
52
 
@@ -26,15 +26,15 @@ const StyledList = styled.ul`
26
26
  padding: 0;
27
27
  ${mq.range({ from: breakpoints.tablet })} {
28
28
  column-count: 2;
29
- column-gap: 20px;
29
+ gap: 20px;
30
30
  }
31
31
  ${mq.range({ from: breakpoints.tabletWide })} {
32
32
  column-count: 3;
33
- column-gap: 20px;
33
+ gap: 20px;
34
34
  }
35
35
  `;
36
36
  const StyledListItem = styled.li`
37
- margin-bottom: 0;
37
+ padding: 0;
38
38
  break-inside: avoid;
39
39
  `;
40
40
 
@@ -20,6 +20,9 @@ const StyledWrapper = styled.div<StyledWrapperProps>`
20
20
  background: transparent;
21
21
  max-width: 720px;
22
22
  margin: ${spacingUnit * 0.75}px ${spacing.normal} ${spacing.xsmall} 0 !important;
23
+ ul {
24
+ padding-left: ${spacing.normal};
25
+ }
23
26
  ${mq.range({ from: breakpoints.desktop })} {
24
27
  margin: ${spacingUnit * 0.75}px ${spacing.normal} ${spacing.xsmall} 0 !important;
25
28
  padding: ${spacing.normal} ${spacing.large} ${spacing.large} ${spacing.xxlarge};
@@ -30,9 +33,6 @@ const StyledWrapper = styled.div<StyledWrapperProps>`
30
33
  ${mq.range({ from: breakpoints.tablet, until: breakpoints.desktop })} {
31
34
  margin: 0;
32
35
  padding: ${spacing.small} ${spacing.normal};
33
- ul {
34
- padding: 0 ${spacingUnit * 0.75}px;
35
- }
36
36
  }
37
37
  ${mq.range({ from: breakpoints.tablet })} {
38
38
  ${(props) =>
@@ -45,8 +45,7 @@ const StyledWrapper = styled.div<StyledWrapperProps>`
45
45
 
46
46
  const LicenseWrapper = styled.div`
47
47
  ul {
48
- margin-left: 0;
49
- margin-bottom: ${spacing.small};
48
+ padding-left: 0;
50
49
  }
51
50
  `;
52
51
 
@@ -27,7 +27,7 @@ type StyledMenuItemProps = {
27
27
  };
28
28
 
29
29
  const StyledMenuItem = styled.li<StyledMenuItemProps>`
30
- margin: 0;
30
+ padding: 0;
31
31
  a {
32
32
  box-shadow: none;
33
33
  display: inline-flex;
@@ -153,7 +153,6 @@ type StyledNavigationProps = {
153
153
  const StyledNavigation = styled.nav<StyledNavigationProps>`
154
154
  > ul {
155
155
  list-style: none;
156
- margin: 0;
157
156
  padding: 0;
158
157
  }
159
158
  margin-bottom: ${spacing.medium};
@@ -20,10 +20,8 @@ const StyledList = styled.ul`
20
20
  gap: ${spacing.small};
21
21
  list-style: none;
22
22
  padding: 0px;
23
- margin: 0px;
24
23
  li {
25
24
  padding: 0px;
26
- margin: 0px;
27
25
  }
28
26
  `;
29
27
 
@@ -49,7 +49,7 @@ export const Default: StoryObj = {};
49
49
 
50
50
  export const Letters: StoryObj = {
51
51
  args: {
52
- 'data-type': 'letters',
52
+ type: 'letters',
53
53
  },
54
54
  };
55
55
 
@@ -69,7 +69,7 @@ export const WithNumbersAndLetters: StoryFn = () => (
69
69
  <li>Listepunkt 2</li>
70
70
  <li>
71
71
  Listepunkt 3
72
- <OrderedList data-type="letters">
72
+ <OrderedList>
73
73
  <li>Listepunkt 1</li>
74
74
  <li>Listepunkt 2</li>
75
75
  <li>Listepunkt 3</li>
@@ -84,7 +84,7 @@ export const WithNumbersAndLetters: StoryFn = () => (
84
84
  );
85
85
 
86
86
  export const StartingAtFive: StoryFn = () => (
87
- <OrderedList start={5} className="ol-reset-5">
87
+ <OrderedList start={5} data-type="letters" className="ol-reset-5">
88
88
  <li>Listepunkt 1</li>
89
89
  <li>Listepunkt 2</li>
90
90
  <li>
@@ -99,7 +99,7 @@ export const StartingAtFive: StoryFn = () => (
99
99
  <li>Listepunkt 2</li>
100
100
  <li>
101
101
  Listepunkt 3
102
- <OrderedList className="ol-reset-5" data-type="letters" start={5}>
102
+ <OrderedList className="ol-reset-5" start={5}>
103
103
  <li>Listepunkt 1</li>
104
104
  <li>Listepunkt 2</li>
105
105
  <li>Listepunkt 3</li>
@@ -112,3 +112,26 @@ export const StartingAtFive: StoryFn = () => (
112
112
  <li>Listepunkt 4</li>
113
113
  </OrderedList>
114
114
  );
115
+
116
+ export const NoStyle: StoryFn = () => (
117
+ <ol>
118
+ <li>Listepunkt 1</li>
119
+ <li>Listepunkt 2</li>
120
+ <li>
121
+ Listepunkt 3
122
+ <ol>
123
+ <li>Listepunkt 1</li>
124
+ <li>Listepunkt 2</li>
125
+ <li>
126
+ Listepunkt 3
127
+ <ol>
128
+ <li>Listepunkt 1</li>
129
+ <li>Listepunkt 2</li>
130
+ <li>Listepunkt 3</li>
131
+ </ol>
132
+ </li>
133
+ </ol>
134
+ </li>
135
+ <li>Listepunkt 4</li>
136
+ </ol>
137
+ );
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  import { forwardRef, HTMLAttributes } from 'react';
10
+ import { css } from '@emotion/react';
10
11
  import styled from '@emotion/styled';
11
12
  import { fonts, spacing } from '@ndla/core';
12
13
 
@@ -21,65 +22,62 @@ export const generateListResets = (counterName: string) => {
21
22
  return styles;
22
23
  };
23
24
 
24
- const StyledOl = styled.ol`
25
- margin-top: 0;
26
- margin-left: ${spacing.normal};
27
- ${fonts.sizes('18px', '29px')};
28
- list-style-type: none;
29
- padding-left: ${spacing.medium} !important;
30
-
31
- // Child ordered lists
32
- ol {
33
- padding-left: ${spacing.medium};
34
- margin-left: 0;
35
- }
36
- // List item
37
- li {
38
- margin-top: ${spacing.nsmall};
25
+ export const LetterCSS = css`
26
+ padding-left: ${spacing.medium};
27
+ > li {
28
+ counter-increment: level1;
39
29
 
40
- p {
41
- margin-bottom: ${spacing.nsmall} !important;
30
+ :before {
31
+ content: counter(level1, upper-alpha) '.';
42
32
  }
43
- }
44
- counter-reset: level1;
45
- ${generateListResets('level1')};
46
-
47
- &[data-type='letters'] {
48
- > li {
49
- &:before {
50
- content: counter(level1, upper-alpha) '.';
51
- }
52
-
53
- > ol[data-type='letters'] {
54
- > li:before {
33
+ > ol[data-type='letters'] {
34
+ > li {
35
+ :before {
55
36
  content: counter(level1, lower-alpha) '.';
56
37
  }
57
- ol[data-type='letters'] {
58
- > li:before {
59
- content: counter(level1, lower-roman) '.';
38
+ > ol[data-type='letters'] {
39
+ padding-left: 0;
40
+ > li {
41
+ padding-left: ${spacing.normal};
42
+ :before {
43
+ left: ${spacing.small};
44
+ position: absolute;
45
+ content: counter(level1, lower-roman) '.';
46
+ transform: translateX(-100%);
47
+ }
48
+ > ol[data-type='letters'] {
49
+ padding-left: 0;
50
+ > li {
51
+ padding-left: ${spacing.normal};
52
+ :before {
53
+ left: ${spacing.small};
54
+ position: absolute;
55
+ content: counter(level1, lower-roman) '.';
56
+ transform: translateX(-100%);
57
+ }
58
+ }
59
+ }
60
60
  }
61
61
  }
62
62
  }
63
63
  }
64
64
  }
65
+ `;
65
66
 
67
+ export const NumberCSS = css`
68
+ padding-left: ${spacing.normal};
66
69
  > li {
67
- min-height: ${spacing.normal};
68
70
  counter-increment: level1;
69
- &:before {
70
- position: absolute;
71
- transform: translateX(-100%);
71
+ :before {
72
72
  content: counter(level1, decimal) '.';
73
- padding-right: ${spacing.nsmall};
74
73
  }
75
-
76
74
  > ol:not([data-type='letters']) {
77
75
  counter-reset: level2;
78
76
  ${generateListResets('level2')};
79
77
  > li {
80
78
  padding-left: ${spacing.nsmall};
81
79
  counter-increment: level2;
82
- &:before {
80
+ :before {
83
81
  content: counter(level1, decimal) '.' counter(level2, decimal) '.';
84
82
  }
85
83
  > ol:not([data-type='letters']) {
@@ -88,7 +86,7 @@ const StyledOl = styled.ol`
88
86
  > li {
89
87
  padding-left: ${spacing.medium};
90
88
  counter-increment: level3;
91
- &:before {
89
+ :before {
92
90
  content: counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '.';
93
91
  }
94
92
  > ol:not([data-type='letters']) {
@@ -97,7 +95,7 @@ const StyledOl = styled.ol`
97
95
  > li {
98
96
  padding-left: ${spacing.large};
99
97
  counter-increment: level4;
100
- &:before {
98
+ :before {
101
99
  content: counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '.'
102
100
  counter(level4, decimal) '.';
103
101
  }
@@ -110,6 +108,38 @@ const StyledOl = styled.ol`
110
108
  }
111
109
  `;
112
110
 
111
+ const StyledOl = styled.ol`
112
+ ${fonts.sizes('18px', '29px')};
113
+ ${generateListResets('level1')};
114
+ padding: 0;
115
+ list-style-type: none;
116
+ counter-reset: level1;
117
+
118
+ margin-left: ${spacing.normal};
119
+
120
+ > li {
121
+ margin-top: ${spacing.nsmall};
122
+ padding-top: 0;
123
+ position: relative;
124
+ ::before {
125
+ position: absolute;
126
+ left: -${spacing.normal};
127
+ }
128
+ > ol {
129
+ padding-bottom: 0;
130
+ margin-left: 0;
131
+ }
132
+ }
133
+
134
+ &:not([data-type='letters']) {
135
+ ${NumberCSS}
136
+ }
137
+
138
+ &[data-type='letters'] {
139
+ ${LetterCSS}
140
+ }
141
+ `;
142
+
113
143
  interface Props extends HTMLAttributes<HTMLOListElement> {
114
144
  type?: 'letters';
115
145
  start?: number;
@@ -11,14 +11,12 @@ import styled from '@emotion/styled';
11
11
  import { colors, fonts, spacing } from '@ndla/core';
12
12
 
13
13
  const StyledUl = styled.ul`
14
- padding-left: ${spacing.nsmall} !important;
15
- margin-left: ${spacing.normal} !important;
16
- margin-top: 0;
14
+ padding-left: ${spacing.nsmall};
15
+ margin-left: ${spacing.normal};
17
16
  ${fonts.sizes('18px', '29px')};
18
17
 
19
18
  ul {
20
- padding-left: ${spacing.nsmall};
21
- margin-left: 0 !important;
19
+ margin-left: 0;
22
20
  }
23
21
 
24
22
  > li {
@@ -28,11 +26,9 @@ const StyledUl = styled.ul`
28
26
  }
29
27
  // List item
30
28
  li {
29
+ padding-top: 0;
31
30
  padding-left: ${spacing.nsmall};
32
31
  margin-top: ${spacing.nsmall};
33
- p {
34
- margin-bottom: ${spacing.nsmall} !important;
35
- }
36
32
  }
37
33
  `;
38
34
 
@@ -44,3 +44,26 @@ export const Default: StoryFn = () => (
44
44
  <li>Listepunkt 4</li>
45
45
  </UnOrderedList>
46
46
  );
47
+
48
+ export const NoStyle: StoryFn = () => (
49
+ <ul>
50
+ <li>Listepunkt 1</li>
51
+ <li>Listepunkt 2</li>
52
+ <li>
53
+ Listepunkt 3
54
+ <ul>
55
+ <li>Listepunkt 1</li>
56
+ <li>Listepunkt 2</li>
57
+ <li>
58
+ Listepunkt 3
59
+ <ul>
60
+ <li>Listepunkt 1</li>
61
+ <li>Listepunkt 2</li>
62
+ <li>Listepunkt 3</li>
63
+ </ul>
64
+ </li>
65
+ </ul>
66
+ </li>
67
+ <li>Listepunkt 4</li>
68
+ </ul>
69
+ );
@@ -33,9 +33,11 @@ const StyledUl = styled.ul`
33
33
  display: flex;
34
34
  flex-direction: column;
35
35
  list-style-type: none;
36
+ padding-bottom: ${spacing.nsmall};
36
37
  li {
37
38
  flex: 1;
38
39
  width: 100%;
40
+ padding-bottom: ${spacing.xsmall};
39
41
  a {
40
42
  color: ${colors.white};
41
43
  &:hover,
@@ -36,26 +36,28 @@ const StyledHeading = styled(Heading)`
36
36
 
37
37
  const StyledList = styled.ul`
38
38
  list-style: none;
39
- margin: 0;
40
39
  padding: 0;
40
+ display: flex;
41
+ flex-direction: column;
42
+ gap: ${spacing.xxsmall};
41
43
 
42
44
  &[data-direction='horizontal'] {
43
45
  ${mq.range({ from: breakpoints.tablet })} {
44
46
  column-count: 2;
45
- column-gap: 20px;
47
+ gap: 20px;
46
48
  display: grid;
47
49
  grid-template-columns: repeat(2, 1fr);
48
50
  }
49
51
  ${mq.range({ from: breakpoints.tabletWide })} {
50
52
  column-count: 3;
51
- column-gap: 20px;
53
+ gap: 20px;
52
54
  grid-template-columns: repeat(3, 1fr);
53
55
  }
54
56
  }
55
57
  `;
56
58
 
57
59
  const StyledListItem = styled.li`
58
- margin-bottom: 0;
60
+ padding: 0;
59
61
  break-inside: avoid;
60
62
 
61
63
  &[data-direction='floating'] {
@@ -67,15 +69,6 @@ const StyledListItem = styled.li`
67
69
  }
68
70
  `;
69
71
 
70
- const StyledSpacingElement = styled.span`
71
- display: block;
72
- width: 100%;
73
- height: 2px;
74
- ${mq.range({ from: breakpoints.tablet })} {
75
- height: 20px;
76
- }
77
- `;
78
-
79
72
  const StyledButtonContent = styled.span`
80
73
  display: flex;
81
74
  width: 100%;
@@ -247,7 +240,6 @@ export const NavigationBox = ({
247
240
  </StyledButtonContent>
248
241
  </ListElementType>
249
242
  </StyledListElementWrapper>
250
- {listDirection !== 'floating' && <StyledSpacingElement />}
251
243
  </StyledListItem>
252
244
  ))}
253
245
  </StyledList>
@@ -17,8 +17,10 @@ import { NavigationBox } from '../Navigation';
17
17
  const GradesMenu = styled.ul`
18
18
  display: flex;
19
19
  gap: ${spacing.small};
20
+ padding-left: 0;
20
21
  li {
21
22
  list-style: none;
23
+ padding: 0;
22
24
  }
23
25
  `;
24
26
 
@@ -58,7 +58,6 @@ export const resourceHeadingStyle = css`
58
58
  const StyledTagList = styled.ul`
59
59
  list-style: none;
60
60
  display: flex;
61
- margin: 0;
62
61
  margin-left: ${spacing.small};
63
62
  padding: 2px;
64
63
  gap: ${spacing.xsmall};
@@ -69,7 +68,7 @@ const StyledTagList = styled.ul`
69
68
  `;
70
69
 
71
70
  const StyledTagListElement = styled.li`
72
- margin: 0;
71
+ padding: 0;
73
72
  ${fonts.sizes(14)};
74
73
  `;
75
74
 
@@ -16,7 +16,6 @@ import { Resource } from '../types';
16
16
 
17
17
  const StyledResourceList = styled.ul`
18
18
  list-style: none;
19
- margin: 0;
20
19
  padding: 0;
21
20
  font-family: ${fonts.sans};
22
21
  `;
@@ -73,10 +73,10 @@ const StyledActiveFilterWrapper = styled('li')`
73
73
  margin-bottom: ${spacing.xsmall};
74
74
 
75
75
  ${mq.range({ from: breakpoints.tabletWide })} {
76
- margin: 0 ${spacing.small} 0 0;
76
+ padding: 0 ${spacing.small} 0 0;
77
77
 
78
78
  &:last-of-type {
79
- margin-right: 0;
79
+ padding-right: 0;
80
80
  }
81
81
  }
82
82
  `;
@@ -95,7 +95,6 @@ export const StyledListItem = styled.li<StyledListItemProps>`
95
95
  export const StyledList = styled.ul<inMenuProps>`
96
96
  list-style: none;
97
97
  padding: 0;
98
- margin: 0;
99
98
  ${(props) => {
100
99
  if (props.animateList && props.animateList > 0) {
101
100
  return animations.toggledContentWithSwitchAnimation(
@@ -137,7 +137,7 @@ const StyledSubjects = styled.div`
137
137
  }
138
138
 
139
139
  li {
140
- margin: 0;
140
+ padding: 0;
141
141
  position: relative;
142
142
  line-height: 1rem;
143
143
 
@@ -332,10 +332,9 @@ const EmptyResultList = styled.article`
332
332
 
333
333
  const ResultList = styled.ul`
334
334
  list-style: none;
335
- margin: 0;
336
335
  padding: 0;
337
336
  ${mq.range({ from: breakpoints.desktop })} {
338
- margin: ${spacing.medium} 0 0 0;
337
+ padding: ${spacing.medium} 0 0 0;
339
338
  }
340
339
  `;
341
340
 
@@ -293,7 +293,6 @@
293
293
  align-items: center;
294
294
  flex-wrap: wrap;
295
295
  list-style: none;
296
- margin: 0;
297
296
  padding: 0;
298
297
  }
299
298