@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
@@ -0,0 +1,74 @@
1
+ # Radio
2
+
3
+ A radio button is a form control that allows users to select one of the predefined set of choices.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Variants
9
+
10
+ - **Default**
11
+ - **Contained**: used only in combination with other contained form components.
12
+ - **Contained extended(coming soon)**: The contained version but including Label support text.
13
+
14
+
15
+
16
+ ### Features
17
+
18
+ #### Label
19
+
20
+ All individual radio buttons must have a label to ensure clarity and accessibility. When radio buttons are grouped, the group must have a header label. Labels help users understand the purpose of the radio buttons, including those using assistive technologies.
21
+
22
+ #### Label support
23
+
24
+ This can be used for both the header and individual radio buttons. Use this to explain how to fill in the field, for example how to count or what to include. Contained radio buttons don’t have support text for the individual radio buttons.
25
+
26
+ ### Contextual help
27
+
28
+ If the label and support text are not 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.
29
+
30
+ - Use a tooltip if space is limited.
31
+ - Use a modal for large amounts of text.
32
+
33
+
34
+
35
+ ### Error message
36
+
37
+ If an error occurs we mark the entire group of options with error. The error is described with an error message.
38
+
39
+ ### Behaviour
40
+
41
+ - **Mutual exclusivity**: Only one radio button within a group can be selected at a time.
42
+ - **Defaults**: Aim for having one option pre-selected.
43
+
44
+
45
+
46
+ ### Alignment
47
+
48
+ We can align the radio buttons both horizontal and vertical.
49
+
50
+ - **Vertical**: This is the default alignment. It's easier to read and scan the available options.
51
+ - **Horizontal**: Only used for a small set of options if the page shouldn't be to long, but try to avoid.
52
+
53
+
54
+
55
+ ### Read only
56
+
57
+ Shows the selected option without allowing the selection to be changed. Keep all options visible when the alternatives provide important context for understanding the selected value. If only the selected value is relevant, consider presenting it as text instead.
58
+
59
+ [Read more about the read only pattern](http://seb.io/patterns/read-only)
60
+
61
+ ### Do's and don'ts
62
+
63
+
64
+ ## UX Guidelines
65
+
66
+ ### Writing UX text for radio buttons
67
+
68
+ ### Radio button options
69
+
70
+ ### We ask the customers, they answer
71
+
72
+ ### Be consistent
73
+
74
+ ### Keep it simple
@@ -3,6 +3,7 @@
3
3
  "files": {
4
4
  "api": "api.md",
5
5
  "instructions": "instructions.md",
6
+ "guidelines": "guidelines.md",
6
7
  "angular": "angular.md",
7
8
  "react": "react.md"
8
9
  }
@@ -0,0 +1,3 @@
1
+ # Rich text
2
+
3
+ Rich text can be used to wrap generic HTML content and apply typography styles.
@@ -2,6 +2,7 @@
2
2
  "name": "gds-rich-text",
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,31 @@
1
+ # Segmented control
2
+
3
+ Segmented control allows users to select a single option, immediately changing the display to reflect their selection. It is used for switching views or view options, not for navigation.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Size
9
+
10
+ The segmented control comes in two sizes large (default) and small.
11
+
12
+ ### Behaviour
13
+
14
+ Component acts as button and trigger a change on click. By default the first item is selected. Only one segment can be active simultaneously.
15
+
16
+ ### Icons
17
+
18
+ Each segment button has optional leading and trailing icons. Use icons when you need to reinforce the meaning of the label.
19
+
20
+ ### Overflow
21
+
22
+ Segments can have different widths depending on the content. If there are too many segments to fit in the container, scroll buttons will appear to the left and/or right.
23
+
24
+ Segment width can also be controlled individually.
25
+
26
+ ### Do's and don'ts
27
+
28
+
29
+ ## UX Guidelines
30
+
31
+ ### Writing UX text for segmented controls
@@ -2,6 +2,7 @@
2
2
  "name": "gds-segmented-control",
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,29 @@
1
+ # Select
2
+
3
+ A select enables the user to choose one or multiple options from a list.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Usage
9
+
10
+ Use this component instead of dropdown when you need to leverage the inherent behavior of the native select element, for example when native accessibility features, some of which are not currently replicable in custom dropdowns, are required. Usability on mobile devices is also sometimes better with native select elements.
11
+
12
+ Don't use this component when you need to customize the dropdown behavior or appearance, or when you need to display complex content in the dropdown, or require multi-select functionality.
13
+
14
+ ### Option list
15
+
16
+ The appearance and behavior of the option list will be handled according to each browser.
17
+
18
+ ### Read only
19
+
20
+ The read only displays the selected value, but removes affordances that suggest the list can be opened or changed.
21
+
22
+ [Read more about the read only pattern](https://seb.io/pattern/read-only)
23
+
24
+ ### Do's and don'ts
25
+
26
+
27
+ ## UX Guidelines
28
+
29
+ ### Writing UX text for selects
@@ -2,6 +2,7 @@
2
2
  "name": "gds-select",
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,14 @@
1
+ # Signal
2
+
3
+ A signal draws attention to notifications and new content.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Usage
9
+
10
+ The signal is mainly used on buttons and menu buttons. The signal's style matches the button's rank and variant by default.
11
+
12
+ ### Example
13
+
14
+ On the intranet we use the signal on the “What's new?”-button to indicate a new function or feauture has been released. The button will trigger a popover with more information about what is new.
@@ -2,6 +2,7 @@
2
2
  "name": "gds-signal",
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,86 @@
1
+ # Slider
2
+
3
+ A slider allows users to select a value or range of values by moving handles along a track.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### When to use
9
+
10
+ Use a slider when users benefit from adjusting a value visually. 

11
+ It works well when:
12
+
13
+ - The value is part of a continuous or stepped range, such as volume, amount or intensity.
14
+ - Adjusting and exploring the value is more important than entering a precise number.
15
+
16
+
17
+
18
+ ### Behaviour
19
+
20
+ The slider can be adjusted using pointer, touch or keyboard.
21
+
22
+ - Moving the handle updates the value according to the defined step.
23
+ - The value indicator displays the current value while the slider is being adjusted.
24
+ - The slider should provide immediate visual feedback as the value changes.
25
+
26
+
27
+
28
+ ### Value, range and step
29
+
30
+ A slider can be used to select a single value or a range between two values.
31
+
32
+ - **Single value** – uses one handle to select a value between a defined minimum and maximum.
33
+ - **Range** – uses two handles to select a lower and upper value within a defined minimum and maximum.
34
+
35
+ Both types can use steps to define the interval between selectable values. Tick marks can be used to visually represent fixed steps when users choose between a limited set of predefined values.
36
+
37
+ ### Value display
38
+
39
+ By default, the slider includes a textbox that displays the selected value and allows users to enter a precise value. The textbox can be omitted when the selected value or its effect is clearly displayed elsewhere in the interface. For example, adjusting an interest rate could update a monthly cost displayed in a separate summary or card.
40
+
41
+ #### Textbox
42
+
43
+ For a single-value slider, one textbox displays the selected value. For a range slider, two textboxes display the selected lower and upper values. The slider and textbox should always stay synchronised. Changing the value in either one should update the other.
44
+
45
+ #### Value indicator
46
+
47
+ A bubble appears next to the handle while the slider is being adjusted. It displays the current value and updates as the handle moves. For a range slider, the value indicator displays the value of the handle currently being adjusted.
48
+
49
+ ### Sizes
50
+
51
+ As all form components the slider comes in both large and small.
52
+
53
+ ### Read only
54
+
55
+ Displays the selected value or range without allowing the handles to be moved. The value should not rely on the handle position alone. The value is provided as text so it can be easily understood and accessed by assistive technologies.
56
+ If the slider itself does not add useful context in read only mode, consider presenting the resulting value as text instead.
57
+
58
+ [Read more about the read only pattern](http://seb.io/pattern/read-only)
59
+
60
+ ### Accessibility
61
+
62
+ The slider is built on the native HTML , providing built-in semantics and keyboard interaction.
A slider must expose its current value, minimum value and maximum value to assistive technologies. This is handled out of the box when using the slider component from Green.
63
+
64
+ Ensure that:
65
+
66
+ - The slider has an accessible name describing what the value controls.
67
+ - The selected value is communicated through more than the visual position of the handle.
68
+
69
+
70
+
71
+ #### Keyboard
72
+
73
+ When the slider has focus:
74
+
75
+ - Arrow right / Arrow up increases the value by one step.
76
+ - Arrow left / Arrow down decreases the value by one step.
77
+ - Home moves to the minimum value.
78
+ - End moves to the maximum value.
79
+
80
+
81
+
82
+ ### Do's and don'ts
83
+
84
+ ### Min and max labels
85
+
86
+ Min and max labels can be used to show the lowest and highest values of the slider. Use them when the boundaries help users understand the scale and make a selection. Labels aren’t needed when the scale is already clear from the surrounding context.
@@ -2,6 +2,7 @@
2
2
  "name": "gds-slider",
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,6 @@
1
+ # Spinner
2
+
3
+
4
+ ## UX Guidelines
5
+
6
+ ### Writing UX text for spinners
@@ -2,6 +2,7 @@
2
2
  "name": "gds-spinner",
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,41 @@
1
+ # Switch
2
+
3
+ A toggle lets users switch a setting on or off.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Behaviour
9
+
10
+ Changing the switch updates the state immediately. The current state should always be clear to the user, and the component should provide feedback for different interaction states such as hover, focus, pressed, and disabled.
11
+
12
+ ### Size
13
+
14
+ The switch is available in two sizes: default and small. The small size should only be used in compact views where space is limited, such as dense layouts or smaller components.
15
+
16
+ ### Label
17
+
18
+ Labels describe the setting, not the state. They should be short and specific, remain clear in both on and off states, and not require additional context to understand.
19
+
20
+ For example, use labels like “Email notifications”, “Show balance”, or “Enable dark mode”. Avoid labels such as “On / Off”, “Active”, or “Enabled”, as they do not clearly communicate what the toggle controls.
21
+
22
+ ### Accessibility
23
+
24
+ A toggle must have a visible and persistent label and communicate its state programmatically as on or off. It should be operable via keyboard and include a visible focus indicator. The state should not rely on color alone to be understood, and the component must meet contrast requirements in all states.
25
+
26
+ ### Read only
27
+
28
+ Shows the current state without allowing it to be changed. Keep the label and make the current state clear. Since a switch normally represents an immediate on or off setting, users should be able to understand the state without relying on the position or visual appearance of the switch alone.
29
+
30
+ [Read more about the read only pattern](https://seb.io/pattern/read-only)
31
+
32
+ ### Do's and Don'ts
33
+
34
+
35
+ ## UX Guidelines
36
+
37
+ ### Writing UX text for toggle
38
+
39
+ ### Keep labels short
40
+
41
+ ### Provide context where needed
@@ -2,6 +2,7 @@
2
2
  "name": "gds-switch",
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,169 @@
1
+ # Table
2
+
3
+ A table displays structured data for overview and comparison.
4
+
5
+
6
+ ## Overview
7
+
8
+ The table component is used to display structured data in rows and columns. It supports overview, comparison and data-driven tasks where users need to scan or interact with multiple items. Tables should represent meaningful data relationships and must not be used for layout or visual alignment.
9
+
10
+ ### Density
11
+
12
+ The density property allows customizing the table's visual spacing with these options:
13
+
14
+ * **Comfortable** (Default) - Standard spacing for balanced readability
15
+
16
+ * **Compact** - Reduced spacing to maximize information density
17
+
18
+ * **Spacious** - Increased spacing for enhanced readability
19
+
20
+ ### Variants
21
+
22
+ The `variant` property controls the visual style of the table container card. There are three variants available:
23
+
24
+ 1. **Primary**
25
+
26
+ 2. **Secondary**
27
+
28
+ 3. **Tertiary**
29
+
30
+
31
+ **Naming will change on the next major release:**
32
+ Primary - Neutral 01, Secondary - Neutral 02, Tertiary - Neutral 02 (Outlined boolean).
33
+
34
+ ### Striped
35
+
36
+ When the `striped`option is enabled, alternating background colors are applied to even rows.
37
+
38
+ ### Sorting
39
+
40
+ Table head cells can support sorting when enabled. Sorting helps users organise data and compare values within a column.
41
+
42
+ * A sorting indicator is shown on hover when sorting is enabled.
43
+
44
+ * Selecting a column head sorts the table by that column.
45
+
46
+ * The sorting indicator remains visible while the column is sorted.
47
+
48
+ * Selecting the same column head again reverses the sort order.
49
+
50
+ * In right-aligned columns, the sorting indicator is positioned to the left, with the column label placed to the right.
51
+
52
+ * Only one column can be sorted at a time.
53
+
54
+ #### Sorting guidelines
55
+
56
+ * Enable sorting only when it adds clear value for the user.
57
+
58
+ * Use sorting primarily for columns with comparable values, such as numbers, dates or statuses.
59
+
60
+ * Avoid enabling sorting on columns where order is not meaningful.
61
+
62
+ * Ensure the sorting state is clearly communicated visually.
63
+
64
+ #### Sorting accessibility considerations
65
+
66
+ * Sorting must be available using keyboard interaction.
67
+
68
+ * The current sort state should be communicated to assistive technologies.
69
+
70
+ * The sorting indicator should not be the only way to convey sorting state.
71
+
72
+ ### Interactions
73
+
74
+ Tables may support interaction when it helps users complete their task. Only add interaction when it adds clear value and does not reduce clarity. Supported behaviours may include:
75
+
76
+ * Column sorting
77
+
78
+ * Row selection
79
+
80
+ * Bulk actions
81
+
82
+ * Interactive cells such as links or status indicators
83
+
84
+ ### Cell
85
+
86
+ The table supports multiple cell types, each mapped to corresponding Green Design System components and their available properties. Any cell type can be used in the main value, lead or trail slot.
87
+
88
+ 1. **Badge**
89
+
90
+ 2. **Image**
91
+
92
+ 3. **Icon**
93
+
94
+ 4. **Button**
95
+
96
+ 5. **Link**
97
+
98
+ 6. **Context menu**
99
+
100
+ 7. **Formatted text - Number, account, date**
101
+
102
+ ### Actions
103
+
104
+ All the cell content types can be used on actions. Actions accepts an array of cell types such as buttons. When you need to use two buttons align them to the left. If you have more than two buttons use the context menu. Actions will always show in the end of the row.
105
+
106
+ ### Formatting
107
+
108
+ **Column justification**
109
+ Columns are left-aligned by default, with options for right alignment and space-between layouts. This is useful for columns where values and actions need clear separation and consistent alignment across rows.
110
+
111
+ **Column width and wrapping**
112
+ Columns can have custom width. When width is set, content will wrap within the cell.
113
+
114
+ **Cell vertical alignment**
115
+ Cells are vertically centered by default and can be aligned to the start. Start alignment is recommended when content wraps, ensuring consistent top alignment across rows.
116
+
117
+ **Sortable columns**
118
+ Columns are left-aligned by default, with the label on the left and the sorting indicator on the right. For right-aligned columns, the sorting indicator is placed on the left and the label on the right.
119
+
120
+ ### Responsive
121
+
122
+ When the responsive option is enabled, the table adapts its layout for smaller screens. Horizontal scrolling is used until the viewport is smaller than 760px, at which point rows are restructured into a card-like format with column names on the left and corresponding values on the right.
123
+
124
+ ### Headline and summery
125
+
126
+ The table supports optional **headline** and **summary** properties to ensure a consistent presentation. Use headline and summary to describe the data, not interactions or controls. Keep both short and descriptive
127
+
128
+ * **Headline** An optional title that describes the content of the table.
129
+
130
+ * **Summary** An optional short description that provides additional context about the table content.
131
+
132
+ ### Searchable
133
+
134
+ If the table is searchable (set by a boolean), the header shows a search field.
135
+
136
+ ### Settings
137
+
138
+ If you enable the settings, a dropdown for choosing columns is visable.
139
+
140
+ ### Pagination
141
+
142
+ The pagination is placed in the footer, ([read more about the pagination here](https://seb.io/component/pagination)), and displays an item range indicating the currently visible rows and the total number of items, for example “1–10 of 100”.
143
+
144
+ ### Plain
145
+
146
+ When the `plain` option is enabled, the table is rendered without a header or footer, displaying only the data table.
147
+
148
+ ### Slots
149
+
150
+ The table supports state slots for error, empty and no results states. The table header includes dedicated slots for other Green Design System components, such as dropdowns or buttons, used for filtering and exporting data.
151
+
152
+ ### Guidelines
153
+
154
+ * Use clear and descriptive column labels.
155
+
156
+ * Keep the structure predictable and consistent.
157
+
158
+ * Text content should be left-aligned for readability.
159
+
160
+ * Numeric values should be right-aligned, preferably aligned by decimal, to support comparison.
161
+
162
+ * Avoid repeating information in table cells when it can be communicated through the column header.
163
+
164
+ ### Do's and Don'ts
165
+
166
+
167
+ ## UX Guidelines
168
+
169
+ ### Writing UX text for table
@@ -2,6 +2,7 @@
2
2
  "name": "gds-table",
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,64 @@
1
+ # Tabs
2
+
3
+ Tabs organize related content into separate panels, displaying one section at a time.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### Usage
9
+
10
+ Use tabs when content can be divided into distinct sections that belong to the same context and hierarchy level.
11
+
12
+ Examples:
13
+
14
+ - Account details, Transactions, and Documents
15
+ - Overview, Holdings, and Activity
16
+ - Personal information, Contact details, and Preferences
17
+
18
+
19
+
20
+ ### Number of tabs
21
+
22
+ Tabs work best when the number of options is limited. As the number of tabs increases, they become harder to scan and compare. If many options are required, consider whether another pattern would better support the user's task. When tabs exceed the available width, the tab bar becomes horizontally scrollable.
23
+
24
+ In a mobile device it will have the same behaviour.
25
+
26
+ ### Sizes
27
+
28
+ The tabs are available in large and small. Use the large default and the small variant only in contexts where you use other component in size small.
29
+
30
+ ### Leading and trailing content
31
+
32
+ Tab items can include optional leading and trailing content. Use leading content, such as icons or avatars, to help identify a tab. Use trailing content, such as badges or counts, to provide additional context about the tab's content.
33
+
34
+ ### Tabs vs. segmented control
35
+
36
+ Tabs and segmented controls may appear similar but serve different purposes.
37
+
38
+ Use tabs when switching between different content panels.
39
+
40
+ Examples:
41
+
42
+ - Overview, Transactions, and Documents
43
+ - Personal details, Contact details, and Security settings
44
+
45
+ Use segmented control when changing a setting, mode, filter, or representation of content.
46
+
47
+ Examples:
48
+
49
+ - List view or Grid view
50
+ - Week, Month, or Year
51
+ - Amount or Percentage
52
+
53
+ Think of tabs as organizing content into sections, while segmented controls change how content is displayed.
54
+
55
+ ### Do's and don'ts
56
+
57
+
58
+ ## UX Guidelines
59
+
60
+ ### Writing UX text for tabs
61
+
62
+ ### Tab labels
63
+
64
+ ### Common tab labels in overviews
@@ -2,6 +2,7 @@
2
2
  "name": "gds-tabs",
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
+ # Text
2
+
3
+ Text summary
@@ -3,6 +3,7 @@
3
3
  "files": {
4
4
  "api": "api.md",
5
5
  "instructions": "instructions.md",
6
+ "guidelines": "guidelines.md",
6
7
  "angular": "angular.md",
7
8
  "react": "react.md"
8
9
  }