@sebgroup/green-core 3.30.0 → 3.32.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 (143) hide show
  1. package/components/coachmark/coachmark.component.js +3 -1
  2. package/components/form-summary/summary.component.d.ts +3 -0
  3. package/components/form-summary/summary.component.js +17 -16
  4. package/components/index.d.ts +1 -0
  5. package/components/index.js +1 -0
  6. package/components/popover/popover.component.js +16 -2
  7. package/components/tooltip/index.d.ts +1 -0
  8. package/components/tooltip/index.js +1 -0
  9. package/components/tooltip/tooltip.component.d.ts +52 -0
  10. package/components/tooltip/tooltip.component.js +339 -0
  11. package/components/tooltip/tooltip.d.ts +2 -0
  12. package/components/tooltip/tooltip.js +6 -0
  13. package/components/tooltip/tooltip.styles.d.ts +2 -0
  14. package/components/tooltip/tooltip.styles.js +120 -0
  15. package/custom-elements.json +15281 -14800
  16. package/gds-element.js +1 -1
  17. package/generated/locales/da.d.ts +5 -0
  18. package/generated/locales/da.js +5 -0
  19. package/generated/locales/de.d.ts +5 -0
  20. package/generated/locales/de.js +5 -0
  21. package/generated/locales/fi.d.ts +5 -0
  22. package/generated/locales/fi.js +5 -0
  23. package/generated/locales/fr.d.ts +5 -0
  24. package/generated/locales/fr.js +5 -0
  25. package/generated/locales/it.d.ts +5 -0
  26. package/generated/locales/it.js +5 -0
  27. package/generated/locales/nl.d.ts +5 -0
  28. package/generated/locales/nl.js +5 -0
  29. package/generated/locales/no.d.ts +5 -0
  30. package/generated/locales/no.js +5 -0
  31. package/generated/locales/sv.d.ts +5 -0
  32. package/generated/locales/sv.js +5 -0
  33. package/generated/mcp/alert/guidelines.md +105 -0
  34. package/generated/mcp/alert/index.json +1 -0
  35. package/generated/mcp/avatar/guidelines.md +40 -0
  36. package/generated/mcp/avatar/index.json +1 -0
  37. package/generated/mcp/badge/guidelines.md +56 -0
  38. package/generated/mcp/badge/index.json +1 -0
  39. package/generated/mcp/blur/guidelines.md +3 -0
  40. package/generated/mcp/blur/index.json +1 -0
  41. package/generated/mcp/breadcrumbs/guidelines.md +35 -0
  42. package/generated/mcp/breadcrumbs/index.json +1 -0
  43. package/generated/mcp/button/guidelines.md +83 -0
  44. package/generated/mcp/button/index.json +1 -0
  45. package/generated/mcp/calendar/guidelines.md +3 -0
  46. package/generated/mcp/calendar/index.json +1 -0
  47. package/generated/mcp/card/guidelines.md +78 -0
  48. package/generated/mcp/card/index.json +1 -0
  49. package/generated/mcp/card-pattern-01/guidelines.md +52 -0
  50. package/generated/mcp/card-pattern-01/index.json +1 -0
  51. package/generated/mcp/checkbox/guidelines.md +91 -0
  52. package/generated/mcp/checkbox/index.json +1 -0
  53. package/generated/mcp/coachmark/guidelines.md +8 -0
  54. package/generated/mcp/coachmark/index.json +1 -0
  55. package/generated/mcp/components.json +59 -1
  56. package/generated/mcp/context-menu/guidelines.md +33 -0
  57. package/generated/mcp/context-menu/index.json +1 -0
  58. package/generated/mcp/datepicker/guidelines.md +44 -0
  59. package/generated/mcp/datepicker/index.json +1 -0
  60. package/generated/mcp/details/guidelines.md +24 -0
  61. package/generated/mcp/details/index.json +1 -0
  62. package/generated/mcp/dialog/guidelines.md +35 -0
  63. package/generated/mcp/dialog/index.json +1 -0
  64. package/generated/mcp/div/guidelines.md +3 -0
  65. package/generated/mcp/div/index.json +1 -0
  66. package/generated/mcp/divider/guidelines.md +24 -0
  67. package/generated/mcp/divider/index.json +1 -0
  68. package/generated/mcp/dropdown/guidelines.md +96 -0
  69. package/generated/mcp/dropdown/index.json +1 -0
  70. package/generated/mcp/fab/guidelines.md +27 -0
  71. package/generated/mcp/fab/index.json +1 -0
  72. package/generated/mcp/filter-chips/guidelines.md +47 -0
  73. package/generated/mcp/filter-chips/index.json +1 -0
  74. package/generated/mcp/flex/guidelines.md +1 -0
  75. package/generated/mcp/flex/index.json +1 -0
  76. package/generated/mcp/form-summary/angular.md +8 -0
  77. package/generated/mcp/form-summary/api.md +7 -0
  78. package/generated/mcp/form-summary/guidelines.md +39 -0
  79. package/generated/mcp/form-summary/index.json +1 -0
  80. package/generated/mcp/form-summary/react.md +8 -0
  81. package/generated/mcp/grid/guidelines.md +3 -0
  82. package/generated/mcp/grid/index.json +1 -0
  83. package/generated/mcp/icons.json +1 -1
  84. package/generated/mcp/index.json +1 -1
  85. package/generated/mcp/input/guidelines.md +127 -0
  86. package/generated/mcp/input/index.json +1 -0
  87. package/generated/mcp/link/guidelines.md +43 -0
  88. package/generated/mcp/link/index.json +1 -0
  89. package/generated/mcp/list/guidelines.md +16 -0
  90. package/generated/mcp/list/index.json +1 -0
  91. package/generated/mcp/list-item-pattern-01/guidelines.md +49 -0
  92. package/generated/mcp/list-item-pattern-01/index.json +1 -0
  93. package/generated/mcp/menu-button/guidelines.md +39 -0
  94. package/generated/mcp/menu-button/index.json +1 -0
  95. package/generated/mcp/pagination/guidelines.md +24 -0
  96. package/generated/mcp/pagination/index.json +1 -0
  97. package/generated/mcp/popover/guidelines.md +3 -0
  98. package/generated/mcp/popover/index.json +1 -0
  99. package/generated/mcp/progress/guidelines.md +42 -0
  100. package/generated/mcp/progress/index.json +1 -0
  101. package/generated/mcp/radio/guidelines.md +74 -0
  102. package/generated/mcp/radio/index.json +1 -0
  103. package/generated/mcp/rich-text/guidelines.md +3 -0
  104. package/generated/mcp/rich-text/index.json +1 -0
  105. package/generated/mcp/segmented-control/guidelines.md +31 -0
  106. package/generated/mcp/segmented-control/index.json +1 -0
  107. package/generated/mcp/select/guidelines.md +29 -0
  108. package/generated/mcp/select/index.json +1 -0
  109. package/generated/mcp/signal/guidelines.md +14 -0
  110. package/generated/mcp/signal/index.json +1 -0
  111. package/generated/mcp/slider/guidelines.md +86 -0
  112. package/generated/mcp/slider/index.json +1 -0
  113. package/generated/mcp/spinner/guidelines.md +6 -0
  114. package/generated/mcp/spinner/index.json +1 -0
  115. package/generated/mcp/switch/guidelines.md +41 -0
  116. package/generated/mcp/switch/index.json +1 -0
  117. package/generated/mcp/table/guidelines.md +169 -0
  118. package/generated/mcp/table/index.json +1 -0
  119. package/generated/mcp/tabs/guidelines.md +64 -0
  120. package/generated/mcp/tabs/index.json +1 -0
  121. package/generated/mcp/text/guidelines.md +3 -0
  122. package/generated/mcp/text/index.json +1 -0
  123. package/generated/mcp/textarea/guidelines.md +73 -0
  124. package/generated/mcp/textarea/index.json +1 -0
  125. package/generated/mcp/theme/guidelines.md +3 -0
  126. package/generated/mcp/theme/index.json +1 -0
  127. package/generated/mcp/tokens.json +1 -1
  128. package/generated/mcp/tooltip/angular.md +25 -0
  129. package/generated/mcp/tooltip/api.md +30 -0
  130. package/generated/mcp/tooltip/guidelines.md +107 -0
  131. package/generated/mcp/tooltip/index.json +9 -0
  132. package/generated/mcp/tooltip/react.md +25 -0
  133. package/generated/mcp/video/guidelines.md +3 -0
  134. package/generated/mcp/video/index.json +1 -0
  135. package/generated/react/form-summary/index.d.ts +6 -1
  136. package/generated/react/index.d.ts +11 -10
  137. package/generated/react/index.js +11 -10
  138. package/generated/react/tooltip/index.d.ts +683 -0
  139. package/generated/react/tooltip/index.js +14 -0
  140. package/package.json +3 -1
  141. package/pure.d.ts +1 -0
  142. package/pure.js +1 -0
  143. package/utils/helpers/custom-element-scoping.js +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-15T13:54:55.150Z",
2
+ "generatedAt": "2026-10-23T12:21:25.298Z",
3
3
  "components": [
4
4
  {
5
5
  "name": "gds-alert",
@@ -9,6 +9,7 @@
9
9
  "path": "alert/",
10
10
  "files": [
11
11
  "api",
12
+ "guidelines",
12
13
  "angular",
13
14
  "react"
14
15
  ]
@@ -21,6 +22,7 @@
21
22
  "path": "avatar/",
22
23
  "files": [
23
24
  "api",
25
+ "guidelines",
24
26
  "angular",
25
27
  "react"
26
28
  ]
@@ -57,6 +59,7 @@
57
59
  "path": "badge/",
58
60
  "files": [
59
61
  "api",
62
+ "guidelines",
60
63
  "angular",
61
64
  "react"
62
65
  ]
@@ -69,6 +72,7 @@
69
72
  "path": "blur/",
70
73
  "files": [
71
74
  "api",
75
+ "guidelines",
72
76
  "angular",
73
77
  "react"
74
78
  ]
@@ -93,6 +97,7 @@
93
97
  "path": "breadcrumbs/",
94
98
  "files": [
95
99
  "api",
100
+ "guidelines",
96
101
  "angular",
97
102
  "react"
98
103
  ]
@@ -105,6 +110,7 @@
105
110
  "path": "button/",
106
111
  "files": [
107
112
  "api",
113
+ "guidelines",
108
114
  "angular",
109
115
  "react"
110
116
  ]
@@ -117,6 +123,7 @@
117
123
  "path": "calendar/",
118
124
  "files": [
119
125
  "api",
126
+ "guidelines",
120
127
  "angular",
121
128
  "react"
122
129
  ]
@@ -129,6 +136,7 @@
129
136
  "path": "card/",
130
137
  "files": [
131
138
  "api",
139
+ "guidelines",
132
140
  "angular",
133
141
  "react"
134
142
  ]
@@ -153,6 +161,7 @@
153
161
  "path": "card-pattern-01/",
154
162
  "files": [
155
163
  "api",
164
+ "guidelines",
156
165
  "angular",
157
166
  "react"
158
167
  ]
@@ -165,6 +174,7 @@
165
174
  "path": "checkbox/",
166
175
  "files": [
167
176
  "api",
177
+ "guidelines",
168
178
  "angular",
169
179
  "react"
170
180
  ]
@@ -189,6 +199,7 @@
189
199
  "path": "coachmark/",
190
200
  "files": [
191
201
  "api",
202
+ "guidelines",
192
203
  "angular",
193
204
  "react"
194
205
  ]
@@ -201,6 +212,7 @@
201
212
  "path": "context-menu/",
202
213
  "files": [
203
214
  "api",
215
+ "guidelines",
204
216
  "angular",
205
217
  "react"
206
218
  ]
@@ -213,6 +225,7 @@
213
225
  "path": "datepicker/",
214
226
  "files": [
215
227
  "api",
228
+ "guidelines",
216
229
  "angular",
217
230
  "react"
218
231
  ]
@@ -225,6 +238,7 @@
225
238
  "path": "details/",
226
239
  "files": [
227
240
  "api",
241
+ "guidelines",
228
242
  "angular",
229
243
  "react"
230
244
  ]
@@ -237,6 +251,7 @@
237
251
  "path": "dialog/",
238
252
  "files": [
239
253
  "api",
254
+ "guidelines",
240
255
  "angular",
241
256
  "react"
242
257
  ]
@@ -249,6 +264,7 @@
249
264
  "path": "div/",
250
265
  "files": [
251
266
  "api",
267
+ "guidelines",
252
268
  "angular",
253
269
  "react"
254
270
  ]
@@ -261,6 +277,7 @@
261
277
  "path": "divider/",
262
278
  "files": [
263
279
  "api",
280
+ "guidelines",
264
281
  "angular",
265
282
  "react"
266
283
  ]
@@ -273,6 +290,7 @@
273
290
  "path": "dropdown/",
274
291
  "files": [
275
292
  "api",
293
+ "guidelines",
276
294
  "angular",
277
295
  "react"
278
296
  ],
@@ -295,6 +313,7 @@
295
313
  "path": "fab/",
296
314
  "files": [
297
315
  "api",
316
+ "guidelines",
298
317
  "angular",
299
318
  "react"
300
319
  ]
@@ -319,6 +338,7 @@
319
338
  "path": "filter-chips/",
320
339
  "files": [
321
340
  "api",
341
+ "guidelines",
322
342
  "angular",
323
343
  "react"
324
344
  ]
@@ -331,6 +351,7 @@
331
351
  "path": "flex/",
332
352
  "files": [
333
353
  "api",
354
+ "guidelines",
334
355
  "instructions",
335
356
  "angular",
336
357
  "react"
@@ -344,6 +365,7 @@
344
365
  "path": "form-summary/",
345
366
  "files": [
346
367
  "api",
368
+ "guidelines",
347
369
  "angular",
348
370
  "react"
349
371
  ]
@@ -392,6 +414,7 @@
392
414
  "path": "grid/",
393
415
  "files": [
394
416
  "api",
417
+ "guidelines",
395
418
  "angular",
396
419
  "react"
397
420
  ]
@@ -440,6 +463,7 @@
440
463
  "path": "input/",
441
464
  "files": [
442
465
  "api",
466
+ "guidelines",
443
467
  "angular",
444
468
  "react"
445
469
  ]
@@ -452,6 +476,7 @@
452
476
  "path": "link/",
453
477
  "files": [
454
478
  "api",
479
+ "guidelines",
455
480
  "angular",
456
481
  "react"
457
482
  ]
@@ -464,6 +489,7 @@
464
489
  "path": "list/",
465
490
  "files": [
466
491
  "api",
492
+ "guidelines",
467
493
  "angular",
468
494
  "react"
469
495
  ]
@@ -488,6 +514,7 @@
488
514
  "path": "list-item-pattern-01/",
489
515
  "files": [
490
516
  "api",
517
+ "guidelines",
491
518
  "angular",
492
519
  "react"
493
520
  ]
@@ -512,6 +539,7 @@
512
539
  "path": "menu-button/",
513
540
  "files": [
514
541
  "api",
542
+ "guidelines",
515
543
  "angular",
516
544
  "react"
517
545
  ]
@@ -560,6 +588,7 @@
560
588
  "path": "pagination/",
561
589
  "files": [
562
590
  "api",
591
+ "guidelines",
563
592
  "angular",
564
593
  "react"
565
594
  ]
@@ -572,6 +601,7 @@
572
601
  "path": "popover/",
573
602
  "files": [
574
603
  "api",
604
+ "guidelines",
575
605
  "angular",
576
606
  "react"
577
607
  ]
@@ -584,6 +614,7 @@
584
614
  "path": "progress/",
585
615
  "files": [
586
616
  "api",
617
+ "guidelines",
587
618
  "angular",
588
619
  "react"
589
620
  ]
@@ -596,6 +627,7 @@
596
627
  "path": "radio/",
597
628
  "files": [
598
629
  "api",
630
+ "guidelines",
599
631
  "instructions",
600
632
  "angular",
601
633
  "react"
@@ -621,6 +653,7 @@
621
653
  "path": "rich-text/",
622
654
  "files": [
623
655
  "api",
656
+ "guidelines",
624
657
  "angular",
625
658
  "react"
626
659
  ]
@@ -645,6 +678,7 @@
645
678
  "path": "segmented-control/",
646
679
  "files": [
647
680
  "api",
681
+ "guidelines",
648
682
  "angular",
649
683
  "react"
650
684
  ],
@@ -663,6 +697,7 @@
663
697
  "path": "select/",
664
698
  "files": [
665
699
  "api",
700
+ "guidelines",
666
701
  "angular",
667
702
  "react"
668
703
  ]
@@ -711,6 +746,7 @@
711
746
  "path": "signal/",
712
747
  "files": [
713
748
  "api",
749
+ "guidelines",
714
750
  "angular",
715
751
  "react"
716
752
  ]
@@ -723,6 +759,7 @@
723
759
  "path": "slider/",
724
760
  "files": [
725
761
  "api",
762
+ "guidelines",
726
763
  "angular",
727
764
  "react"
728
765
  ]
@@ -735,6 +772,7 @@
735
772
  "path": "spinner/",
736
773
  "files": [
737
774
  "api",
775
+ "guidelines",
738
776
  "angular",
739
777
  "react"
740
778
  ]
@@ -747,6 +785,7 @@
747
785
  "path": "switch/",
748
786
  "files": [
749
787
  "api",
788
+ "guidelines",
750
789
  "angular",
751
790
  "react"
752
791
  ]
@@ -783,6 +822,7 @@
783
822
  "path": "table/",
784
823
  "files": [
785
824
  "api",
825
+ "guidelines",
786
826
  "angular",
787
827
  "react"
788
828
  ]
@@ -795,6 +835,7 @@
795
835
  "path": "tabs/",
796
836
  "files": [
797
837
  "api",
838
+ "guidelines",
798
839
  "angular",
799
840
  "react"
800
841
  ]
@@ -807,6 +848,7 @@
807
848
  "path": "text/",
808
849
  "files": [
809
850
  "api",
851
+ "guidelines",
810
852
  "instructions",
811
853
  "angular",
812
854
  "react"
@@ -820,6 +862,7 @@
820
862
  "path": "textarea/",
821
863
  "files": [
822
864
  "api",
865
+ "guidelines",
823
866
  "angular",
824
867
  "react"
825
868
  ]
@@ -832,6 +875,20 @@
832
875
  "path": "theme/",
833
876
  "files": [
834
877
  "api",
878
+ "guidelines",
879
+ "angular",
880
+ "react"
881
+ ]
882
+ },
883
+ {
884
+ "name": "gds-tooltip",
885
+ "tagName": "gds-tooltip",
886
+ "className": "GdsTooltip",
887
+ "description": "",
888
+ "path": "tooltip/",
889
+ "files": [
890
+ "api",
891
+ "guidelines",
835
892
  "angular",
836
893
  "react"
837
894
  ]
@@ -844,6 +901,7 @@
844
901
  "path": "video/",
845
902
  "files": [
846
903
  "api",
904
+ "guidelines",
847
905
  "angular",
848
906
  "react"
849
907
  ]
@@ -0,0 +1,33 @@
1
+ # Context menu
2
+
3
+ A context menu displays a list of contextual actions.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Custom trigger button
9
+
10
+ The context menu trigger button can have an icon or custom text slotted.
11
+
12
+ ### Menu item
13
+
14
+ In a menu item you can slot in text and icons along other layout components.
15
+
16
+ ### Label
17
+
18
+ It can be visually displayed, or hidden but still available to screen readers.
19
+
20
+ ### Guidelines
21
+
22
+ Use the context menu to give users all the options when you can’t fit them in the regular view, or to avoid cluttering the interface.
23
+
24
+ ### Destructive items
25
+
26
+ Some items in the menu may be destructive. Typical example is Delete. These items behave like the delete-button and should be displayed in red.
27
+
28
+ ### Do's and don'ts
29
+
30
+
31
+ ## UX Guidelines
32
+
33
+ ### Writing UX text for context menus
@@ -2,6 +2,7 @@
2
2
  "name": "gds-context-menu",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,44 @@
1
+ # Datepicker
2
+
3
+ ⁠The datepicker allows users to select a date.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Features
9
+
10
+ - Configurable date format display
11
+ - `plain` mode to hide labels and error messages
12
+ - Clearable for quick state reset
13
+ - Min and max dates
14
+ - Can be configured with visible or hidden week numbers
15
+ - Individual dates can be marked as disabled in the calendar
16
+ - Buttons in the calendar footer are configurable
17
+
18
+
19
+
20
+ ### Usage
21
+
22
+ Use datepicker when a complete date should be entered.
23
+
24
+ ### Size
25
+
26
+ The datepicker comes in two sizes.
27
+
28
+ - **Large** (default)
29
+ - **Small**: used in tables and in some special cases where the space is very limited.
30
+
31
+
32
+
33
+ ### Read only
34
+
35
+ Displays the entered value together with its label. Have no visual cues associated with text entry, such as an active input cursor or editable states.
36
+
37
+ [Read more about the read only pattern](http://seb.io/pattern/read-only)
38
+
39
+ ### Do's and don'ts
40
+
41
+
42
+ ## UX Guidelines
43
+
44
+ ### Writing UX text for date pickers
@@ -2,6 +2,7 @@
2
2
  "name": "gds-datepicker",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,24 @@
1
+ # Details
2
+
3
+ The details component is a collapsible section that helps organize and hide content until needed.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Usage
9
+
10
+ Details provide similar semantics and functionality as the native `<details>` html element, including the ability to connect several details together to form an accordion.
11
+
12
+ Accordions or single details components are commonly used to manage dense information in interfaces like FAQs, settings panels, or forms. Saving space, reducing cognitive overload, and improving scannability while maintaining a clean, organized layout.
13
+
14
+ Use it when presenting large amounts of secondary or optional information that users don’t need to see all at once.
15
+
16
+ ### Size
17
+
18
+ The details component comes in two sizes:
19
+
20
+ * **Large** (default)
21
+
22
+ * **Small**
23
+
24
+ ### Do's and don'ts
@@ -2,6 +2,7 @@
2
2
  "name": "gds-details",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,35 @@
1
+ # Dialog
2
+
3
+ ⁠A dialog appears in front of content to provide critical information or ask for a decision.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Features
9
+
10
+ Dialogs are modal, meaning they block interaction with the rest of the application or interface until the user addresses the dialog (e.g., by clicking a button, entering input, or closing it). This ensures the user focuses on the dialog's content before returning to the main workflow, and also ensures that keyboard and screen reader focus is kept within the dialog.
11
+
12
+ By default, the dialog will close when the user clicks the backdrop, but this behavior can be opted out from if the dialog needs to stay open until a flow is completed, for example.
13
+
14
+ ### Variants
15
+
16
+ The dialog can be shown either as a regular dialog window or as a slide-out.
17
+
18
+ #### Regular
19
+
20
+ The regular window is positioned in the center of the screen.
21
+
22
+ #### Slide-out
23
+
24
+ The slide-out is positioned on the right-hand side and always takes up the full height of the viewport (minus padding). Width can be customized to suite various needs.
25
+
26
+ ### Usage
27
+
28
+ Dialogs are powerful tools for focusing user attention, but their use should be deliberate to avoid disrupting the user experience.
29
+
30
+ ### Do's and don'ts
31
+
32
+
33
+ ## UX Guidelines
34
+
35
+ ### Writing UX text for dialogs
@@ -2,6 +2,7 @@
2
2
  "name": "gds-dialog",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,3 @@
1
+ # Div
2
+
3
+ Div is a base element in the declarative layout system.
@@ -2,6 +2,7 @@
2
2
  "name": "gds-div",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,24 @@
1
+ # Divider
2
+
3
+ Divider creates visual and semantic separation between content.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Features
9
+
10
+ #### Colors
11
+
12
+ The color of the divider line can be set to a color token.
13
+
14
+ #### Spacing
15
+
16
+ Spacing around the divider can be controlled using the `size` attribute.
17
+
18
+ ### Usage
19
+
20
+ Use dividers to support visual hierarchy when headings or spacing alone aren’t sufficient, such as between groups of menu items.
21
+
22
+ By default dividers have a semantic meaning in the browser but it can be marked as presentational using `role="presentation"` .
23
+
24
+ ### Do's and don'ts
@@ -2,6 +2,7 @@
2
2
  "name": "gds-divider",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -0,0 +1,96 @@
1
+ # Dropdown
2
+
3
+ A dropdown enables the user to choose one or multiple options from a list.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Sizes
9
+
10
+ - **Large**
11
+ - **Small**: Used in tables and in certain cases where space is very limited. (Custom layouts are not supported.)
12
+
13
+
14
+
15
+ ### Features
16
+
17
+ #### Label
18
+
19
+ All dropdown fields must have a label to ensure clarity and accessibility. Labels help users understand the purpose of the field, including those using assistive technologies.
20
+
21
+ #### Optional field indicator
22
+
23
+ We only ask for required information. If some fields are optional, we let users know by adding "(optional)" in brackets next to the field label. The word "(optional)" is shown in regular font weight to distinguish it from the label.
24
+
25
+ #### Support text
26
+
27
+ Use this to explain how to fill in the field, for example how to count or what to include.
28
+
29
+ ### Contextual help
30
+
31
+ If the label and support text aren’t enough to explain a field, we can use the info icon. Clicking the icon shows additional support text between the label support and the field.
32
+
33
+ - Use a tooltip if space is limited.
34
+ - Use a modal for large amounts of text.
35
+
36
+
37
+
38
+ #### Leading icon
39
+
40
+ A leading icon visually reinforces the purpose of the field, helping users to understand what type of information is needed.
41
+
42
+ ### Single select
43
+
44
+ Use this version when users should select only one option from the list.
45
+
46
+ ### Multi select
47
+
48
+ Use this version when users should be able to select one or multiple options from the list.
49
+
50
+ ### Search
51
+
52
+ A search field can be used to filter the options.
53
+
54
+ - If the list is long (e.g., 10+ items), searching helps users find what they need faster.
55
+ - When items are similar or not in a predictable order, searching improves efficiency.
56
+ - If users have a specific item in mind, typing is often faster than scrolling.
57
+ - Search helps users who navigate with keyboards or screen readers find options more quickly.
58
+
59
+
60
+
61
+ ### Option groups
62
+
63
+ If the options can be grouped, this helps users find choices in large lists. The group can include a badge showing the number of options it contains.
64
+
65
+ ### Custom option layout
66
+
67
+ The text slot for each dropdown and option supports a custom layout with multiple values, typically used for account selection. These layouts can be customised for specific use cases. Note that these fields are taller than a regular dropdown.
68
+
69
+ #### Combo box
70
+
71
+ This field allows users to type directly into it, like a standard input field. As they type, a list of matching options appears. If they enter an option that isn’t in the list, it is still accepted as a valid choice.
72
+
73
+ #### Clearable
74
+
75
+ To make it easy for users to clear a field, an x-icon button can be placed at the end of the field. This is commonly used in search/filter forms.
76
+
77
+ #### Error message
78
+
79
+ Used to indicate that a selection must be made from the dropdown or that there is an error with the selected option.
80
+
81
+ ### Read only
82
+
83
+ The read only displays the selected value, but removes affordances that suggest the list can be opened or changed.
84
+
85
+ [Read more about the read only pattern](https://seb.io/pattern/read-only)
86
+
87
+
88
+ ## UX Guidelines
89
+
90
+ ### Writing UX text for drop-downs
91
+
92
+ ### Use clear and informative words
93
+
94
+ ### Placeholder text
95
+
96
+ ### Capitalisation rules
@@ -2,6 +2,7 @@
2
2
  "name": "gds-dropdown",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  },