@sebgroup/green-core 3.23.0 → 3.24.1
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.
- package/assets/icons/regular/satellite.svg +6 -0
- package/assets/icons/solid/satellite.svg +5 -0
- package/components/button/button.component.js +6 -1
- package/components/calendar/calendar.component.js +2 -1
- package/components/context-menu/context-menu.component.js +3 -0
- package/components/datepicker/datepicker.component.js +57 -13
- package/components/icon/icons/index.d.ts +1 -0
- package/components/icon/icons/index.js +1 -0
- package/components/icon/icons/pure.d.ts +1 -0
- package/components/icon/icons/pure.js +1 -0
- package/components/icon/icons/satellite.component.d.ts +18 -0
- package/components/icon/icons/satellite.component.js +25 -0
- package/components/icon/icons/satellite.d.ts +2 -0
- package/components/icon/icons/satellite.js +6 -0
- package/components/link/link.styles.js +23 -3
- package/components/popover/popover.component.js +3 -2
- package/components/table/table.stories.data.js +186 -182
- package/custom-elements.json +27017 -26394
- package/gds-element.js +1 -1
- package/generated/mcp/alert/index.json +0 -1
- package/generated/mcp/avatar/index.json +0 -1
- package/generated/mcp/badge/index.json +0 -1
- package/generated/mcp/blur/index.json +0 -1
- package/generated/mcp/breadcrumbs/index.json +0 -1
- package/generated/mcp/button/index.json +0 -1
- package/generated/mcp/calendar/index.json +0 -1
- package/generated/mcp/card/index.json +0 -1
- package/generated/mcp/card-pattern-01/index.json +0 -1
- package/generated/mcp/checkbox/index.json +0 -1
- package/generated/mcp/coachmark/index.json +0 -1
- package/generated/mcp/components.json +1 -44
- package/generated/mcp/context-menu/index.json +0 -1
- package/generated/mcp/datepicker/index.json +0 -1
- package/generated/mcp/details/index.json +0 -1
- package/generated/mcp/dialog/index.json +0 -1
- package/generated/mcp/div/index.json +0 -1
- package/generated/mcp/divider/index.json +0 -1
- package/generated/mcp/dropdown/index.json +0 -1
- package/generated/mcp/fab/index.json +0 -1
- package/generated/mcp/filter-chips/index.json +0 -1
- package/generated/mcp/flex/index.json +0 -1
- package/generated/mcp/form-summary/index.json +0 -1
- package/generated/mcp/grid/index.json +0 -1
- package/generated/mcp/icon-satellite/angular.md +15 -0
- package/generated/mcp/icon-satellite/api.md +31 -0
- package/generated/mcp/icon-satellite/index.json +8 -0
- package/generated/mcp/icon-satellite/react.md +15 -0
- package/generated/mcp/icons.json +13 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/input/index.json +0 -1
- package/generated/mcp/link/index.json +0 -1
- package/generated/mcp/list/index.json +0 -1
- package/generated/mcp/list-item-pattern-01/index.json +0 -1
- package/generated/mcp/menu-button/index.json +0 -1
- package/generated/mcp/pagination/index.json +0 -1
- package/generated/mcp/popover/index.json +0 -1
- package/generated/mcp/radio/index.json +0 -1
- package/generated/mcp/rich-text/index.json +0 -1
- package/generated/mcp/segmented-control/index.json +0 -1
- package/generated/mcp/select/index.json +0 -1
- package/generated/mcp/signal/index.json +0 -1
- package/generated/mcp/spinner/index.json +0 -1
- package/generated/mcp/switch/index.json +0 -1
- package/generated/mcp/table/index.json +0 -1
- package/generated/mcp/tabs/index.json +0 -1
- package/generated/mcp/text/index.json +0 -1
- package/generated/mcp/textarea/index.json +0 -1
- package/generated/mcp/theme/index.json +0 -1
- package/generated/mcp/tokens.json +1 -1
- package/generated/mcp/video/index.json +0 -1
- package/generated/react/icons/icon-satellite/index.d.ts +691 -0
- package/generated/react/icons/icon-satellite/index.js +14 -0
- package/generated/react/index.d.ts +2 -1
- package/generated/react/index.js +2 -1
- package/package.json +2 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/helpers/has-changed.d.ts +8 -0
- package/utils/helpers/has-changed.js +10 -0
- package/generated/mcp/alert/guidelines.md +0 -105
- package/generated/mcp/avatar/guidelines.md +0 -40
- package/generated/mcp/badge/guidelines.md +0 -56
- package/generated/mcp/blur/guidelines.md +0 -3
- package/generated/mcp/breadcrumbs/guidelines.md +0 -35
- package/generated/mcp/button/guidelines.md +0 -83
- package/generated/mcp/calendar/guidelines.md +0 -3
- package/generated/mcp/card/guidelines.md +0 -78
- package/generated/mcp/card-pattern-01/guidelines.md +0 -52
- package/generated/mcp/checkbox/guidelines.md +0 -91
- package/generated/mcp/coachmark/guidelines.md +0 -8
- package/generated/mcp/context-menu/guidelines.md +0 -33
- package/generated/mcp/datepicker/guidelines.md +0 -44
- package/generated/mcp/details/guidelines.md +0 -24
- package/generated/mcp/dialog/guidelines.md +0 -35
- package/generated/mcp/div/guidelines.md +0 -3
- package/generated/mcp/divider/guidelines.md +0 -24
- package/generated/mcp/dropdown/guidelines.md +0 -96
- package/generated/mcp/fab/guidelines.md +0 -27
- package/generated/mcp/filter-chips/guidelines.md +0 -47
- package/generated/mcp/flex/guidelines.md +0 -1
- package/generated/mcp/form-summary/guidelines.md +0 -39
- package/generated/mcp/grid/guidelines.md +0 -3
- package/generated/mcp/input/guidelines.md +0 -127
- package/generated/mcp/link/guidelines.md +0 -43
- package/generated/mcp/list/guidelines.md +0 -16
- package/generated/mcp/list-item-pattern-01/guidelines.md +0 -49
- package/generated/mcp/menu-button/guidelines.md +0 -39
- package/generated/mcp/pagination/guidelines.md +0 -24
- package/generated/mcp/popover/guidelines.md +0 -3
- package/generated/mcp/radio/guidelines.md +0 -74
- package/generated/mcp/rich-text/guidelines.md +0 -3
- package/generated/mcp/segmented-control/guidelines.md +0 -31
- package/generated/mcp/select/guidelines.md +0 -29
- package/generated/mcp/signal/guidelines.md +0 -14
- package/generated/mcp/spinner/guidelines.md +0 -6
- package/generated/mcp/switch/guidelines.md +0 -41
- package/generated/mcp/table/guidelines.md +0 -169
- package/generated/mcp/tabs/guidelines.md +0 -64
- package/generated/mcp/text/guidelines.md +0 -3
- package/generated/mcp/textarea/guidelines.md +0 -73
- package/generated/mcp/theme/guidelines.md +0 -3
- package/generated/mcp/video/guidelines.md +0 -3
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Pagination
|
|
2
|
-
|
|
3
|
-
Pagination helps users navigate large result sets by dividing content into clear, manageable pages.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Usage
|
|
9
|
-
|
|
10
|
-
Pagination is used to divide large amounts of content into smaller pages, making it easier to navigate and understand a dataset. It is most useful when content cannot be displayed at once, or when users need to move through information in a defined order.
|
|
11
|
-
|
|
12
|
-
Use pagination when it improves readability and control, for example in tables or long lists, search results, or content listings. Avoid using pagination for small datasets or when continuous scrolling provides a better experience.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Behaviour
|
|
17
|
-
|
|
18
|
-
Pagination should clearly indicate the current page and keep navigation consistent and predictable. Unavailable actions should be disabled at the start or end of the page range. When used with data tables, the item range and total number of items should be displayed.
|
|
19
|
-
|
|
20
|
-
### Accessibility
|
|
21
|
-
|
|
22
|
-
Pagination should use a semantic navigation structure and ensure that all controls are keyboard accessible. The current page should be communicated programmatically, and visual styling alone should not be relied on to convey state.
|
|
23
|
-
|
|
24
|
-
### Do's and don'ts
|
|
@@ -1,74 +0,0 @@
|
|
|
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
|
-
### Do's and don'ts
|
|
56
|
-
|
|
57
|
-
### Read only
|
|
58
|
-
|
|
59
|
-
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.
|
|
60
|
-
|
|
61
|
-
[Read more about the read only pattern](http://seb.io/patterns/read-only)
|
|
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
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
|
@@ -1,29 +0,0 @@
|
|
|
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/patterns/read-only)
|
|
23
|
-
|
|
24
|
-
### Do's and don'ts
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## UX Guidelines
|
|
28
|
-
|
|
29
|
-
### Writing UX text for selects
|
|
@@ -1,14 +0,0 @@
|
|
|
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.
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
### Do's and Don'ts
|
|
27
|
-
|
|
28
|
-
### Read only
|
|
29
|
-
|
|
30
|
-
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.
|
|
31
|
-
|
|
32
|
-
[Read more about the read only pattern](https://seb.io/patterns/read-only)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
## UX Guidelines
|
|
36
|
-
|
|
37
|
-
### Writing UX text for toggle
|
|
38
|
-
|
|
39
|
-
### Keep labels short
|
|
40
|
-
|
|
41
|
-
### Provide context where needed
|
|
@@ -1,169 +0,0 @@
|
|
|
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
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# Textarea
|
|
2
|
-
|
|
3
|
-
Textarea allow users to input text and digits on multiple lines.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
### Variants
|
|
9
|
-
|
|
10
|
-
We provide two versions of textarea.
|
|
11
|
-
|
|
12
|
-
- **Default**
|
|
13
|
-
- **Floating label** (coming soon): Can only be used in specific contexts. Limited features due to accessibility.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Features
|
|
18
|
-
|
|
19
|
-
#### Label
|
|
20
|
-
|
|
21
|
-
All input fields must have a label to ensure clarity and accessibility. Labels help users understand the purpose of the field, including those using assistive technologies.
|
|
22
|
-
|
|
23
|
-
#### Optional field indicator
|
|
24
|
-
|
|
25
|
-
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.
|
|
26
|
-
|
|
27
|
-
#### Support text
|
|
28
|
-
|
|
29
|
-
Use this to explain how to fill in the field, for example how to count or what to include.
|
|
30
|
-
|
|
31
|
-
### Contextual help
|
|
32
|
-
|
|
33
|
-
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.
|
|
34
|
-
|
|
35
|
-
- Use a tooltip if space is limited.
|
|
36
|
-
- Use a modal for large amounts of text.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
#### Leading icon
|
|
41
|
-
|
|
42
|
-
A leading icon visually reinforces the purpose of the field, helping users to understand what type of information is needed.
|
|
43
|
-
|
|
44
|
-
#### Clearable
|
|
45
|
-
|
|
46
|
-
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.
|
|
47
|
-
|
|
48
|
-
#### Error message
|
|
49
|
-
|
|
50
|
-
Used to indicate that a selection must be made from the dropdown or that there is an error with the selected option.
|
|
51
|
-
|
|
52
|
-
### Character counter
|
|
53
|
-
|
|
54
|
-
For fields with a character limit, a counter can be added to show users how many characters they have left.
|
|
55
|
-
|
|
56
|
-
The counter starts with the maximum allowed characters. As the user types, the remaining characters decrease. When the limit is nearly reached, the counter turns yellow. When or if the user exceeds the limit, the counter turns red.
|
|
57
|
-
|
|
58
|
-
If the user ignores this and attempts to submit, an error message will appear indicating that the maximum character limit has been reached.
|
|
59
|
-
|
|
60
|
-
### Resize
|
|
61
|
-
|
|
62
|
-
The default Textarea has a fixed height based on the expected input. This helps users understand how much text the field is intended for. If the field should be resizable, there are two options:
|
|
63
|
-
|
|
64
|
-
- **Automatic**: Adjusts dynamically as the user types.
|
|
65
|
-
- **Manual**: Users can resize it by dragging the corner.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
### Read only
|
|
70
|
-
|
|
71
|
-
The read only state 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. Long content should remain readable and should not be unnecessarily truncated.
|
|
72
|
-
|
|
73
|
-
[Read more about the read only pattern](https://seb.io/patterns/read-only)
|