@amsterdam/design-system-css 0.4.0 → 0.6.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 (177) hide show
  1. package/CHANGELOG.md +51 -2
  2. package/LICENSE.txt +287 -0
  3. package/README.md +11 -0
  4. package/dist/accordion/accordion.css +1 -1
  5. package/dist/accordion/accordion.css.map +1 -1
  6. package/dist/alert/alert.css +1 -1
  7. package/dist/alert/alert.css.map +1 -1
  8. package/dist/badge/badge.css +1 -1
  9. package/dist/badge/badge.css.map +1 -1
  10. package/dist/blockquote/blockquote.css +1 -1
  11. package/dist/blockquote/blockquote.css.map +1 -1
  12. package/dist/breadcrumb/breadcrumb.css +1 -1
  13. package/dist/breadcrumb/breadcrumb.css.map +1 -1
  14. package/dist/button/button.css +1 -1
  15. package/dist/button/button.css.map +1 -1
  16. package/dist/checkbox/checkbox.css +1 -1
  17. package/dist/checkbox/checkbox.css.map +1 -1
  18. package/dist/column/column.css +1 -0
  19. package/dist/column/column.css.map +1 -0
  20. package/dist/dialog/dialog.css +1 -1
  21. package/dist/dialog/dialog.css.map +1 -1
  22. package/dist/fieldset/fieldset.css +1 -0
  23. package/dist/fieldset/fieldset.css.map +1 -0
  24. package/dist/form-label/form-label.css +1 -1
  25. package/dist/form-label/form-label.css.map +1 -1
  26. package/dist/gap/gap.css +1 -0
  27. package/dist/gap/gap.css.map +1 -0
  28. package/dist/grid/grid.css +1 -1
  29. package/dist/grid/grid.css.map +1 -1
  30. package/dist/header/header.css +1 -1
  31. package/dist/header/header.css.map +1 -1
  32. package/dist/heading/heading.css +1 -1
  33. package/dist/heading/heading.css.map +1 -1
  34. package/dist/icon/icon.css +1 -1
  35. package/dist/icon/icon.css.map +1 -1
  36. package/dist/index.css +1 -1
  37. package/dist/index.css.map +1 -1
  38. package/dist/link/link.css +1 -1
  39. package/dist/link/link.css.map +1 -1
  40. package/dist/link-list/link-list.css +1 -1
  41. package/dist/link-list/link-list.css.map +1 -1
  42. package/dist/margin/margin.css +1 -0
  43. package/dist/margin/margin.css.map +1 -0
  44. package/dist/mega-menu/mega-menu.css.map +1 -1
  45. package/dist/ordered-list/ordered-list.css +1 -1
  46. package/dist/ordered-list/ordered-list.css.map +1 -1
  47. package/dist/page-heading/page-heading.css +1 -1
  48. package/dist/page-heading/page-heading.css.map +1 -1
  49. package/dist/page-menu/page-menu.css +1 -1
  50. package/dist/page-menu/page-menu.css.map +1 -1
  51. package/dist/pagination/pagination.css +1 -1
  52. package/dist/pagination/pagination.css.map +1 -1
  53. package/dist/paragraph/paragraph.css +1 -1
  54. package/dist/paragraph/paragraph.css.map +1 -1
  55. package/dist/radio/radio.css +1 -0
  56. package/dist/radio/radio.css.map +1 -0
  57. package/dist/row/row.css +1 -0
  58. package/dist/row/row.css.map +1 -0
  59. package/dist/search-field/search-field.css +1 -1
  60. package/dist/search-field/search-field.css.map +1 -1
  61. package/dist/skip-link/skip-link.css +1 -1
  62. package/dist/skip-link/skip-link.css.map +1 -1
  63. package/dist/switch/switch.css +1 -1
  64. package/dist/switch/switch.css.map +1 -1
  65. package/dist/table/table.css +1 -1
  66. package/dist/table/table.css.map +1 -1
  67. package/dist/tabs/tabs.css +1 -0
  68. package/dist/tabs/tabs.css.map +1 -0
  69. package/dist/text-area/text-area.css +1 -0
  70. package/dist/text-area/text-area.css.map +1 -0
  71. package/dist/text-input/text-input.css +1 -1
  72. package/dist/text-input/text-input.css.map +1 -1
  73. package/dist/top-task-link/top-task-link.css +1 -1
  74. package/dist/top-task-link/top-task-link.css.map +1 -1
  75. package/dist/unordered-list/unordered-list.css +1 -1
  76. package/dist/unordered-list/unordered-list.css.map +1 -1
  77. package/package.json +9 -10
  78. package/src/common/breakpoint.scss +1 -1
  79. package/src/common/calculate-fluid-style.scss +1 -1
  80. package/src/common/hide-input.scss +11 -0
  81. package/src/common/hyphenation.scss +10 -0
  82. package/src/common/input-label-focus.scss +21 -0
  83. package/src/common/size.scss +13 -0
  84. package/src/components/accordion/README.md +2 -0
  85. package/src/components/accordion/accordion.scss +7 -12
  86. package/src/components/alert/README.md +4 -2
  87. package/src/components/alert/alert.scss +3 -5
  88. package/src/components/aspect-ratio/README.md +2 -0
  89. package/src/components/aspect-ratio/aspect-ratio.scss +1 -1
  90. package/src/components/badge/README.md +2 -0
  91. package/src/components/badge/badge.scss +3 -8
  92. package/src/components/blockquote/README.md +2 -0
  93. package/src/components/blockquote/blockquote.scss +6 -8
  94. package/src/components/breadcrumb/README.md +2 -0
  95. package/src/components/breadcrumb/breadcrumb.scss +3 -8
  96. package/src/components/button/README.md +3 -1
  97. package/src/components/button/button.scss +60 -15
  98. package/src/components/card/README.md +5 -3
  99. package/src/components/card/card.scss +1 -1
  100. package/src/components/checkbox/README.md +3 -1
  101. package/src/components/checkbox/checkbox.scss +19 -31
  102. package/src/components/column/README.md +5 -0
  103. package/src/components/column/column.scss +16 -0
  104. package/src/components/dialog/README.md +2 -0
  105. package/src/components/dialog/dialog.scss +7 -9
  106. package/src/components/fieldset/README.md +18 -0
  107. package/src/components/fieldset/fieldset.scss +34 -0
  108. package/src/components/footer/README.md +2 -0
  109. package/src/components/form-label/README.md +2 -0
  110. package/src/components/form-label/form-label.scss +6 -8
  111. package/src/components/gap/README.md +5 -0
  112. package/src/components/gap/gap.scss +16 -0
  113. package/src/components/grid/README.md +5 -3
  114. package/src/components/grid/grid.scss +14 -21
  115. package/src/components/header/README.md +2 -0
  116. package/src/components/header/header.scss +7 -7
  117. package/src/components/heading/README.md +2 -0
  118. package/src/components/heading/heading.scss +16 -43
  119. package/src/components/icon/README.md +3 -1
  120. package/src/components/icon/icon.scss +13 -51
  121. package/src/components/icon-button/README.md +3 -1
  122. package/src/components/icon-button/icon-button.scss +1 -1
  123. package/src/components/image/README.md +3 -1
  124. package/src/components/image/image.scss +2 -2
  125. package/src/components/index.scss +9 -1
  126. package/src/components/link/README.md +2 -0
  127. package/src/components/link/link.scss +3 -36
  128. package/src/components/link-list/README.md +3 -1
  129. package/src/components/link-list/link-list.scss +10 -21
  130. package/src/components/logo/README.md +4 -1
  131. package/src/components/logo/logo.scss +1 -1
  132. package/src/components/margin/README.md +5 -0
  133. package/src/components/margin/margin.scss +12 -0
  134. package/src/components/mark/README.md +2 -0
  135. package/src/components/mark/mark.scss +1 -1
  136. package/src/components/mega-menu/README.md +2 -0
  137. package/src/components/mega-menu/mega-menu.scss +3 -1
  138. package/src/components/ordered-list/README.md +2 -0
  139. package/src/components/ordered-list/ordered-list.scss +8 -9
  140. package/src/components/overlap/README.md +2 -0
  141. package/src/components/overlap/overlap.scss +1 -1
  142. package/src/components/page-heading/README.md +3 -1
  143. package/src/components/page-heading/page-heading.scss +6 -8
  144. package/src/components/page-menu/README.md +3 -1
  145. package/src/components/page-menu/page-menu.scss +3 -8
  146. package/src/components/pagination/README.md +3 -1
  147. package/src/components/pagination/pagination.scss +4 -9
  148. package/src/components/paragraph/README.md +2 -0
  149. package/src/components/paragraph/paragraph.scss +7 -22
  150. package/src/components/radio/README.md +18 -0
  151. package/src/components/radio/radio.scss +157 -0
  152. package/src/components/row/README.md +3 -0
  153. package/src/components/row/row.scss +17 -0
  154. package/src/components/screen/README.md +6 -4
  155. package/src/components/screen/screen.scss +1 -1
  156. package/src/components/search-field/README.md +3 -1
  157. package/src/components/search-field/search-field.scss +9 -12
  158. package/src/components/skip-link/README.md +2 -0
  159. package/src/components/skip-link/skip-link.scss +3 -8
  160. package/src/components/spotlight/README.md +2 -0
  161. package/src/components/spotlight/spotlight.scss +1 -1
  162. package/src/components/switch/README.md +3 -1
  163. package/src/components/switch/switch.scss +11 -10
  164. package/src/components/table/README.md +3 -1
  165. package/src/components/table/table.scss +3 -3
  166. package/src/components/tabs/README.md +32 -0
  167. package/src/components/tabs/tabs.scss +41 -0
  168. package/src/components/text-area/README.md +17 -0
  169. package/src/components/text-area/text-area.scss +70 -0
  170. package/src/components/text-input/README.md +2 -0
  171. package/src/components/text-input/text-input.scss +5 -10
  172. package/src/components/top-task-link/README.md +5 -3
  173. package/src/components/top-task-link/top-task-link.scss +7 -14
  174. package/src/components/unordered-list/README.md +2 -0
  175. package/src/components/unordered-list/unordered-list.scss +8 -9
  176. package/src/components/visually-hidden/README.md +2 -0
  177. package/src/components/visually-hidden/visually-hidden.scss +1 -1
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license EUPL-1.2+
3
+ * Copyright Gemeente Amsterdam
4
+ */
5
+
6
+ @mixin reset {
7
+ box-sizing: border-box;
8
+ margin-block: 0;
9
+ -webkit-text-size-adjust: 100%;
10
+ }
11
+
12
+ .amsterdam-text-area {
13
+ border: none;
14
+ box-shadow: var(--amsterdam-text-area-box-shadow);
15
+ color: var(--amsterdam-text-area-color);
16
+ font-family: var(--amsterdam-text-area-font-family);
17
+ font-size: var(--amsterdam-text-area-font-size);
18
+ font-weight: var(--amsterdam-text-area-font-weight);
19
+ line-height: var(--amsterdam-text-area-line-height);
20
+ max-width: 100%;
21
+ min-height: var(--amsterdam-text-area-min-height);
22
+ outline-offset: var(--amsterdam-text-area-outline-offset);
23
+ padding-block: var(--amsterdam-text-area-padding-block);
24
+ padding-inline: var(--amsterdam-text-area-padding-inline);
25
+ touch-action: manipulation;
26
+ width: 100%;
27
+
28
+ @include reset;
29
+
30
+ &:hover {
31
+ box-shadow: var(--amsterdam-text-area-hover-box-shadow);
32
+ }
33
+ }
34
+
35
+ .amsterdam-text-area::placeholder {
36
+ color: var(--amsterdam-text-area-placeholder-color);
37
+ }
38
+
39
+ .amsterdam-text-area:disabled {
40
+ background-color: var(--amsterdam-text-area-disabled-background-color);
41
+ box-shadow: var(--amsterdam-text-area-disabled-box-shadow);
42
+ color: var(--amsterdam-text-area-disabled-color);
43
+ cursor: var(--amsterdam-text-area-disabled-cursor);
44
+ }
45
+
46
+ .amsterdam-text-area:invalid,
47
+ .amsterdam-text-area[aria-invalid="true"] {
48
+ box-shadow: var(--amsterdam-text-area-invalid-box-shadow);
49
+
50
+ &:hover {
51
+ // TODO: this should be the (currently non-existent) dark red hover color
52
+ box-shadow: var(--amsterdam-text-area-invalid-hover-box-shadow);
53
+ }
54
+ }
55
+
56
+ .amsterdam-text-area--resize-none {
57
+ resize: none;
58
+ }
59
+
60
+ .amsterdam-text-area--resize-horizontal {
61
+ resize: inline;
62
+ }
63
+
64
+ .amsterdam-text-area--resize-vertical {
65
+ resize: block;
66
+ }
67
+
68
+ .amsterdam-text-area--cols {
69
+ width: auto;
70
+ }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Text Input
2
4
 
3
5
  A form field in which a user can enter text.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  @mixin reset {
@@ -14,22 +14,17 @@
14
14
  box-shadow: var(--amsterdam-text-input-box-shadow);
15
15
  color: var(--amsterdam-text-input-color);
16
16
  font-family: var(--amsterdam-text-input-font-family);
17
- font-size: var(--amsterdam-text-input-spacious-font-size);
17
+ font-size: var(--amsterdam-text-input-font-size);
18
18
  font-weight: var(--amsterdam-text-input-font-weight);
19
- line-height: var(--amsterdam-text-input-spacious-line-height);
19
+ line-height: var(--amsterdam-text-input-line-height);
20
20
  outline-offset: var(--amsterdam-text-input-outline-offset);
21
- padding-block: 0.5rem;
22
- padding-inline: 1rem;
21
+ padding-block: var(--amsterdam-text-input-padding-block);
22
+ padding-inline: var(--amsterdam-text-input-padding-inline);
23
23
  touch-action: manipulation;
24
24
  width: 100%;
25
25
 
26
26
  @include reset;
27
27
 
28
- .amsterdam-theme--compact & {
29
- font-size: var(--amsterdam-text-input-compact-font-size);
30
- line-height: var(--amsterdam-text-input-compact-line-height);
31
- }
32
-
33
28
  &:hover {
34
29
  box-shadow: var(--amsterdam-text-input-hover-box-shadow);
35
30
  }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Top Task Link
2
4
 
3
5
  A prominent navigation element to quickly start a task.
@@ -10,12 +12,12 @@ A prominent navigation element to quickly start a task.
10
12
  - Keep both texts concise.
11
13
  A title consists of a few words, and the description consists of 1 or 2 short sentences.
12
14
  The description should end with a period or another appropriate punctuation mark.
13
- - For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](?path=/docs/react_layout-grid--docs).
15
+ - For wide windows, place 3 or 4 Top Task Links side by side on the [Grid](/docs/components-layout-grid--docs).
14
16
  If you have more Top Task Links, place them in the next row.
15
17
  Try to distribute the amount of links on wide windows over rows of 3 or 4 links.
16
18
  If this is not possible, leave the last cells of the grid empty.
17
- - If you have a group of links for which a description is unnecessary or illogical, use a [Link List](?path=/docs/react_navigation-link--docs).
19
+ - If you have a group of links for which a description is unnecessary or illogical, use a [Link List](/docs/components-navigation-link--docs).
18
20
 
19
21
  ## Relevant WCAG requirements
20
22
 
21
- The Top Task Link is subject to the same requirements as [regular links](https://amsterdam.github.io/design-system/?path=/docs/react_navigation-link--docs).
23
+ The Top Task Link is subject to the same requirements as [regular links](/docs/components-navigation-link--docs).
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
+ @import "../../common/hyphenation";
7
+
6
8
  .amsterdam-top-task-link {
7
9
  break-inside: avoid;
8
10
  display: flex;
@@ -20,18 +22,14 @@
20
22
  .amsterdam-top-task-link__label {
21
23
  color: var(--amsterdam-top-task-link-label-color);
22
24
  font-family: var(--amsterdam-top-task-link-label-font-family);
23
- font-size: var(--amsterdam-top-task-link-label-spacious-font-size);
25
+ font-size: var(--amsterdam-top-task-link-label-font-size);
24
26
  font-weight: var(--amsterdam-top-task-link-label-font-weight);
25
27
  line-height: var(--amsterdam-top-task-link-label-line-height);
26
28
  text-decoration-line: var(--amsterdam-top-task-link-label-text-decoration-line);
27
29
  text-decoration-thickness: var(--amsterdam-top-task-link-label-text-decoration-thickness);
28
30
  text-underline-offset: var(--amsterdam-top-task-link-label-text-underline-offset);
29
31
 
30
- .amsterdam-theme--compact & {
31
- font-size: var(--amsterdam-top-task-link-label-compact-font-size);
32
- line-height: var(--amsterdam-top-task-link-label-compact-line-height);
33
- }
34
-
32
+ @include hyphenation;
35
33
  @include reset;
36
34
  }
37
35
 
@@ -43,14 +41,9 @@
43
41
  .amsterdam-top-task-link__description {
44
42
  color: var(--amsterdam-top-task-link-description-color);
45
43
  font-family: var(--amsterdam-top-task-link-description-font-family);
46
- font-size: var(--amsterdam-top-task-link-description-spacious-font-size);
44
+ font-size: var(--amsterdam-top-task-link-description-font-size);
47
45
  font-weight: var(--amsterdam-top-task-link-description-font-weight);
48
- line-height: var(--amsterdam-top-task-link-description-spacious-line-height);
49
-
50
- .amsterdam-theme--compact & {
51
- font-size: var(--amsterdam-top-task-link-description-compact-font-size);
52
- line-height: var(--amsterdam-top-task-link-description-compact-line-height);
53
- }
46
+ line-height: var(--amsterdam-top-task-link-description-line-height);
54
47
 
55
48
  @include reset;
56
49
  }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Unordered List
2
4
 
3
5
  A list is a vertical group of related content.
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
- /** Apply border box sizing, reset whitespace and list styles. */
6
+ /** Apply border box sizing, reset white space and list styles. */
7
7
  @mixin reset {
8
8
  box-sizing: border-box;
9
9
  list-style: none;
@@ -24,9 +24,9 @@
24
24
  .amsterdam-unordered-list:not(.amsterdam-unordered-list--no-markers) {
25
25
  color: var(--amsterdam-unordered-list-color);
26
26
  font-family: var(--amsterdam-unordered-list-font-family);
27
- font-size: var(--amsterdam-unordered-list-spacious-font-size);
27
+ font-size: var(--amsterdam-unordered-list-font-size);
28
28
  font-weight: var(--amsterdam-unordered-list-font-weight);
29
- line-height: var(--amsterdam-unordered-list-spacious-line-height);
29
+ line-height: var(--amsterdam-unordered-list-line-height);
30
30
  list-style-type: var(--amsterdam-unordered-list-list-style-type);
31
31
 
32
32
  /** List items are responsible for indentation and marker positioning. */
@@ -36,6 +36,10 @@
36
36
  }
37
37
  }
38
38
 
39
+ .amsterdam-unordered-list--inverse-color:not(.amsterdam-unordered-list--no-markers) {
40
+ color: var(--amsterdam-unordered-list-inverse-color);
41
+ }
42
+
39
43
  /** A nested list has a different marker and less indentation for correct alignment. */
40
44
  :is(.amsterdam-ordered-list, .amsterdam-unordered-list) .amsterdam-unordered-list {
41
45
  list-style-type: var(--amsterdam-unordered-list-unordered-list-list-style-type);
@@ -45,8 +49,3 @@
45
49
  padding-inline-start: var(--amsterdam-unordered-list-unordered-list-item-padding-inline-start);
46
50
  }
47
51
  }
48
-
49
- .amsterdam-theme--compact .amsterdam-unordered-list:not(.amsterdam-unordered-list--no-markers) {
50
- font-size: var(--amsterdam-unordered-list-compact-font-size);
51
- line-height: var(--amsterdam-unordered-list-compact-line-height);
52
- }
@@ -1,3 +1,5 @@
1
+ <!-- @license CC0-1.0 -->
2
+
1
3
  # Visually Hidden
2
4
 
3
5
  Hides content from sighted users but keeps it accessible to non-visual user agents, such as screen readers.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license EUPL-1.2+
3
- * Copyright (c) 2023 Gemeente Amsterdam
3
+ * Copyright Gemeente Amsterdam
4
4
  */
5
5
 
6
6
  // Source: https://css-tricks.com/inclusively-hidden/