@sebgroup/green-core 3.14.0 → 3.15.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.
- package/components/avatar/avatar.component.js +1 -0
- package/components/avatar/avatar.styles.js +4 -1
- package/components/pagination/pagination.component.d.ts +5 -1
- package/components/pagination/pagination.component.js +33 -2
- package/components/pagination/pagination.styles.js +4 -0
- package/custom-elements.json +65802 -65733
- package/gds-element.js +1 -1
- package/generated/mcp/button/guidelines.md +11 -16
- package/generated/mcp/card-pattern-01/guidelines.md +6 -6
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/filter-chips/guidelines.md +14 -8
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/list-item-pattern-01/guidelines.md +61 -0
- package/generated/mcp/pagination/api.md +2 -1
- package/generated/mcp/tabs/guidelines.md +24 -37
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +9 -9
- package/generated/react/index.js +9 -9
- package/generated/react/pagination/index.d.ts +1 -0
- package/package.json +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
package/gds-element.js
CHANGED
|
@@ -16,7 +16,7 @@ class GdsElement extends LitElement {
|
|
|
16
16
|
/**
|
|
17
17
|
* The semantic version of this element. Can be used for troubleshooting to verify the version being used.
|
|
18
18
|
*/
|
|
19
|
-
this.semanticVersion = "3.
|
|
19
|
+
this.semanticVersion = "3.15.0";
|
|
20
20
|
this.syncFirstRender = false;
|
|
21
21
|
this._isUsingTransitionalStyles = false;
|
|
22
22
|
this._dynamicStylesController = new DynamicStylesController(this);
|
|
@@ -9,7 +9,7 @@ A button can be tapped or clicked to perform an action.
|
|
|
9
9
|
|
|
10
10
|
Variant is used to communicate the intent of the button, such as positive, negative, notice.
|
|
11
11
|
|
|
12
|
-
Rank determines the priority of the button, and can be primary, secondary or tertiary. All variants are each available in those three ranks.
|
|
12
|
+
Rank determines the priority of the button, and can be primary, secondary or tertiary. All variants are each available in those three ranks.
|
|
13
13
|
|
|
14
14
|
### Neutral
|
|
15
15
|
|
|
@@ -37,13 +37,7 @@ The icon button comes in the same ranks and variants as regular buttons.
|
|
|
37
37
|
|
|
38
38
|
### Split button
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
The split button always has a primary action. This action is most likely to be used by the customer as the default action.When users click on the primary action, it triggers this action directly, such as submitting a form, confirming a selection, or initiating a process.
|
|
43
|
-
|
|
44
|
-
The users can click on the dropdown arrow to reveal a dropdown menu providing secondary or additional options.
|
|
45
|
-
|
|
46
|
-
The split button comes in both primary and secondary.
|
|
40
|
+
The split button always has a primary action. This action is most likely to be used by the customer as the default action. The users can click on the icon button to reveal a context menu providing secondary or additional options.
|
|
47
41
|
|
|
48
42
|
### Next and back button
|
|
49
43
|
|
|
@@ -58,17 +52,18 @@ Choose size depending on context. Avoid to mix different sizes in the same conte
|
|
|
58
52
|
|
|
59
53
|
### Desktop placements
|
|
60
54
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
- **Left**: In overviews and widgets, the user tends to read from top to bottom following the left side, therefore the buttons are kept to the left. Place the primary button furthest to the left.
|
|
56
|
+
- **Right**: Modals and flows move the user forward (interpreted as to the right in western culture), therefore the buttons are placed to the right. Place the primary button furthest to the right.
|
|
57
|
+
|
|
58
|
+
|
|
64
59
|
|
|
65
60
|
### In a mobile device
|
|
66
61
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
- **One button**, use the full width of the content area.
|
|
63
|
+
- **Two buttons**, aim to place them side by side. It is allowed to stack them if needed.
|
|
64
|
+
- **Three buttons**, consider the need for all of them. "cancel or close" might be x in the top right corner. Worst case scenario: place two buttons side by side and one tertiary button under.
|
|
65
|
+
|
|
66
|
+
|
|
72
67
|
|
|
73
68
|
### Do’s and don’ts
|
|
74
69
|
|
|
@@ -11,17 +11,17 @@ All card patterns are built on top of the base card component. Card pattern 01 i
|
|
|
11
11
|
|
|
12
12
|
Each variant consists of:
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
- **header slot** – img, icon or custom
|
|
15
|
+
- **main area** – includes heading and excerpt
|
|
16
|
+
- **footer** **slot** – supports actions depending on card type (see below).
|
|
17
|
+
|
|
18
|
+
|
|
19
19
|
|
|
20
20
|
### Header
|
|
21
21
|
|
|
22
22
|
#### Empty
|
|
23
23
|
|
|
24
|
-
No header content.
|
|
24
|
+
No header content.
|
|
25
25
|
|
|
26
26
|
#### Image
|
|
27
27
|
|
|
@@ -5,13 +5,14 @@ Filter chips allow users to narrow down the data they want to see on the page.
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### States
|
|
9
|
+
|
|
10
|
+
The filter chip component comes in two states, "enabled" - can be selected and "selected" - can be unselected.
|
|
11
|
+
|
|
12
|
+
- **Enabled** – The default state, displaying only a label. Use this variant when presenting available filter options.
|
|
13
|
+
- **Selected** – When selected, the chips updates to show a checkmark icon alongside the label, indicating an active filter. The selected filter can be unselected.
|
|
9
14
|
|
|
10
|
-
The filter chip component comes in two variants, each supporting a different stage of the filtering experience:
|
|
11
15
|
|
|
12
|
-
* **Selectable** – The default state, displaying only a label. Use this variant when presenting available filter options. When selected the chips updates to show a checkmark icon alongside the label, indicating an active filter.
|
|
13
|
-
|
|
14
|
-
* **Removable** – Used to represent an applied filter. This chip includes a label and a close (×) icon, allowing users to remove the filter with a single click or tap.
|
|
15
16
|
|
|
16
17
|
### Example
|
|
17
18
|
|
|
@@ -23,9 +24,14 @@ To improve clarity and support informed decisions, display the number of results
|
|
|
23
24
|
|
|
24
25
|
The filter chips comes in two sizes:
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
- **Large** (default)
|
|
28
|
+
- **Small**
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Removable filter chips
|
|
33
|
+
|
|
34
|
+
If the purpose is to display an already applied filter that can be removed, use a **Button** with a trailing remove icon. This pattern clearly communicates that the filter is active and that the available action is to remove it, rather than change its selection state.
|
|
29
35
|
|
|
30
36
|
### Do's and don'ts
|
|
31
37
|
|
package/generated/mcp/icons.json
CHANGED
package/generated/mcp/index.json
CHANGED
|
@@ -1 +1,62 @@
|
|
|
1
1
|
# List item pattern 01
|
|
2
|
+
|
|
3
|
+
List item pattern 01 is built on top of the base list and list item components and supports slot-based composition for flexible layouts and supports interactive row behavior.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
### Items
|
|
9
|
+
|
|
10
|
+
Use items property to get predefined styling for 2-3 columns.
|
|
11
|
+
|
|
12
|
+
Note: Use custom content directly in the row to be slotted into main, if you want to show more columns.
|
|
13
|
+
|
|
14
|
+
#### With single item
|
|
15
|
+
|
|
16
|
+
### Selectable and linked
|
|
17
|
+
|
|
18
|
+
#### Selectable
|
|
19
|
+
|
|
20
|
+
Enable `selectable` to show a checkbox and support checked/unchecked states.
|
|
21
|
+
|
|
22
|
+
#### Href
|
|
23
|
+
|
|
24
|
+
Add `href` to make the row interactive as a link. Displays a chevron in the trail slot.
|
|
25
|
+
|
|
26
|
+
#### selectable + href
|
|
27
|
+
|
|
28
|
+
Combine checkbox selection and link navigation in the same row.
|
|
29
|
+
|
|
30
|
+
### Padding inline
|
|
31
|
+
|
|
32
|
+
Use the `padding-inline` property to customize horizontal padding on a list item. Set to `0` to remove padding. Defaults to `s`.
|
|
33
|
+
|
|
34
|
+
#### With custom padding-inline
|
|
35
|
+
|
|
36
|
+
#### With no padding-inline
|
|
37
|
+
|
|
38
|
+
### Slots
|
|
39
|
+
|
|
40
|
+
List item pattern 01 is built on top of the base list and list item components and supports slot-based composition for flexible layouts and interactions.
|
|
41
|
+
|
|
42
|
+
### Lead slot
|
|
43
|
+
|
|
44
|
+
Use for icons, avatars, or custom leading content. When `selectable` is enabled, it shows a checkbox.
|
|
45
|
+
|
|
46
|
+
#### With icon
|
|
47
|
+
|
|
48
|
+
#### With avatar
|
|
49
|
+
|
|
50
|
+
#### With no lead
|
|
51
|
+
|
|
52
|
+
### Main
|
|
53
|
+
|
|
54
|
+
Use custom content directly in the row.
|
|
55
|
+
|
|
56
|
+
#### Custom content - text
|
|
57
|
+
|
|
58
|
+
#### Custom content - badge
|
|
59
|
+
|
|
60
|
+
### Lead slot
|
|
61
|
+
|
|
62
|
+
Use for actions such as links or buttons. When `href` is set, the row renders a chevron link in the trail.
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
| `options` | `array` | `-` | Options array to set the nunber of items per page. Defaults to `[5, 10, 25, 50]` |
|
|
18
18
|
| `jump` | `boolean` | `-` | Enables first and last button |
|
|
19
19
|
| `hideOptions` | `boolean` | `-` | Hide options |
|
|
20
|
+
| `simple` | `boolean` | `-` | Enables a compact navigation mode with only previous/next arrows and a centered "Page N" indicator. |
|
|
20
21
|
| `density` | `DensityMode` | `-` | Controls density mode on pagination Accepts: `comfortable`, `compact`, `spacious` |
|
|
21
|
-
| `label` | `string` | `-` | The text summary to display on the left side (e.g. "1-10 of 100").
|
|
22
|
+
| `label` | `string` | `-` | The text summary to display on the left side (e.g. "1-10 of 100"). |
|
|
22
23
|
| `margin` | `string \| undefined` | `-` | Style Expression Property that controls the `margin` property. Only accepts space tokens. |
|
|
23
24
|
| `'margin-inline'` | `string \| undefined` | `-` | Style Expression Property that controls the `margin-inline` property. Only accepts space tokens. |
|
|
24
25
|
| `'margin-block'` | `string \| undefined` | `-` | Style Expression Property that controls the `margin-block` property. Only accepts space tokens. |
|
|
@@ -1,65 +1,52 @@
|
|
|
1
1
|
# Tabs
|
|
2
2
|
|
|
3
|
-
Tabs
|
|
3
|
+
Tabs organize related content into separate panels, displaying one section at a time.
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
## Overview
|
|
7
7
|
|
|
8
|
-
###
|
|
8
|
+
### Usage
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Use tabs when content can be divided into distinct sections that belong to the same context and hierarchy level.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Examples:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
- Account details, Transactions, and Documents
|
|
15
|
+
- Overview, Holdings, and Activity
|
|
16
|
+
- Personal information, Contact details, and Preferences
|
|
15
17
|
|
|
16
|
-
### Tabs vs segmented control
|
|
17
18
|
|
|
18
|
-
Tabs and segmented controls can look similar, but they serve very different purposes. Choosing the wrong component leads to user confusion and misaligned expectations.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
### Number of tabs
|
|
21
21
|
|
|
22
|
-
|
|
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
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* The content under each tab is meaningfully different in nature
|
|
27
|
-
|
|
28
|
-
* Users are unlikely to need to compare the contents of multiple tabs at once
|
|
29
|
-
|
|
30
|
-
* The tabs act as primary or secondary navigation within the page
|
|
31
|
-
|
|
32
|
-
* Content groupings are based on different topics, data sets, or tasks
|
|
33
|
-
|
|
34
|
-
#### Use segmented control when
|
|
35
|
-
|
|
36
|
-
Use segmented control to **filter or toggle the presentation of the same underlying content**. The data does not change — only how it is displayed or sorted.
|
|
24
|
+
### Leading and trailing content
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
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.
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
* The options act as filters or view toggles within a single context
|
|
43
|
-
|
|
44
|
-
* The component is embedded within a form or a content area, not used as page navigation
|
|
28
|
+
### Tabs vs. segmented control
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
Tabs and segmented controls may appear similar but serve different purposes.
|
|
47
31
|
|
|
48
|
-
|
|
32
|
+
Use tabs when switching between different content panels.
|
|
49
33
|
|
|
50
|
-
|
|
34
|
+
Examples:
|
|
51
35
|
|
|
52
|
-
|
|
36
|
+
- Overview, Transactions, and Documents
|
|
37
|
+
- Personal details, Contact details, and Security settings
|
|
53
38
|
|
|
54
|
-
|
|
39
|
+
Use segmented control when changing a setting, mode, filter, or representation of content.
|
|
55
40
|
|
|
56
|
-
|
|
41
|
+
Examples:
|
|
57
42
|
|
|
58
|
-
|
|
43
|
+
- List view or Grid view
|
|
44
|
+
- Week, Month, or Year
|
|
45
|
+
- Amount or Percentage
|
|
59
46
|
|
|
60
|
-
|
|
47
|
+
Think of tabs as organizing content into sections, while segmented controls change how content is displayed.
|
|
61
48
|
|
|
62
|
-
###
|
|
49
|
+
### Do's and don'ts
|
|
63
50
|
|
|
64
51
|
|
|
65
52
|
## UX Guidelines
|
|
@@ -10,13 +10,13 @@ export * from './card-linked/index.js';
|
|
|
10
10
|
export * from './checkbox/index.js';
|
|
11
11
|
export * from './coachmark/index.js';
|
|
12
12
|
export * from './context-menu/index.js';
|
|
13
|
-
export * from './details/index.js';
|
|
14
13
|
export * from './datepicker/index.js';
|
|
15
|
-
export * from './
|
|
14
|
+
export * from './details/index.js';
|
|
16
15
|
export * from './div/index.js';
|
|
16
|
+
export * from './dialog/index.js';
|
|
17
17
|
export * from './divider/index.js';
|
|
18
|
-
export * from './fab/index.js';
|
|
19
18
|
export * from './dropdown/index.js';
|
|
19
|
+
export * from './fab/index.js';
|
|
20
20
|
export * from './filter-chips/index.js';
|
|
21
21
|
export * from './flex/index.js';
|
|
22
22
|
export * from './form-summary/index.js';
|
|
@@ -27,8 +27,8 @@ export * from './input/index.js';
|
|
|
27
27
|
export * from './link/index.js';
|
|
28
28
|
export * from './list/index.js';
|
|
29
29
|
export * from './mask/index.js';
|
|
30
|
-
export * from './menu-button/index.js';
|
|
31
30
|
export * from './pagination/index.js';
|
|
31
|
+
export * from './menu-button/index.js';
|
|
32
32
|
export * from './backdrop/index.js';
|
|
33
33
|
export * from './popover/index.js';
|
|
34
34
|
export * from './radio/index.js';
|
|
@@ -37,15 +37,15 @@ export * from './segmented-control/index.js';
|
|
|
37
37
|
export * from './select/index.js';
|
|
38
38
|
export * from './signal/index.js';
|
|
39
39
|
export * from './spinner/index.js';
|
|
40
|
-
export * from './table/index.js';
|
|
41
40
|
export * from './switch/index.js';
|
|
41
|
+
export * from './table/index.js';
|
|
42
42
|
export * from './tabs/index.js';
|
|
43
43
|
export * from './text/index.js';
|
|
44
44
|
export * from './textarea/index.js';
|
|
45
45
|
export * from './theme/index.js';
|
|
46
46
|
export * from './video/index.js';
|
|
47
|
-
export * from './list-item-pattern-01/index.js';
|
|
48
47
|
export * from './card-pattern-01/index.js';
|
|
48
|
+
export * from './list-item-pattern-01/index.js';
|
|
49
49
|
export * from './avatar-group/index.js';
|
|
50
50
|
export * from './breadcrumb/index.js';
|
|
51
51
|
export * from './checkbox-group/index.js';
|
|
@@ -56,10 +56,12 @@ export * from './formatted-date/index.js';
|
|
|
56
56
|
export * from './formatted-number/index.js';
|
|
57
57
|
export * from './list-item/index.js';
|
|
58
58
|
export * from './radio-group/index.js';
|
|
59
|
-
export * from './sensitive-account/index.js';
|
|
60
59
|
export * from './segment/index.js';
|
|
60
|
+
export * from './sensitive-account/index.js';
|
|
61
61
|
export * from './sensitive-date/index.js';
|
|
62
62
|
export * from './sensitive-number/index.js';
|
|
63
|
+
export * from './tab/index.js';
|
|
64
|
+
export * from './tab-panel/index.js';
|
|
63
65
|
export * from './icons/icon-ai/index.js';
|
|
64
66
|
export * from './icons/icon-airplane-up/index.js';
|
|
65
67
|
export * from './icons/icon-archive/index.js';
|
|
@@ -371,8 +373,6 @@ export * from './icons/icon-youtube/index.js';
|
|
|
371
373
|
export * from './icons/icon-zap/index.js';
|
|
372
374
|
export * from './icons/icon-zoom-in/index.js';
|
|
373
375
|
export * from './icons/icon-zoom-out/index.js';
|
|
374
|
-
export * from './tab/index.js';
|
|
375
|
-
export * from './tab-panel/index.js';
|
|
376
376
|
export * from './menu-item/index.js';
|
|
377
377
|
export * from './menu-heading/index.js';
|
|
378
378
|
export * from './option/index.js';
|
package/generated/react/index.js
CHANGED
|
@@ -10,13 +10,13 @@ export * from "./card-linked/index.js";
|
|
|
10
10
|
export * from "./checkbox/index.js";
|
|
11
11
|
export * from "./coachmark/index.js";
|
|
12
12
|
export * from "./context-menu/index.js";
|
|
13
|
-
export * from "./details/index.js";
|
|
14
13
|
export * from "./datepicker/index.js";
|
|
15
|
-
export * from "./
|
|
14
|
+
export * from "./details/index.js";
|
|
16
15
|
export * from "./div/index.js";
|
|
16
|
+
export * from "./dialog/index.js";
|
|
17
17
|
export * from "./divider/index.js";
|
|
18
|
-
export * from "./fab/index.js";
|
|
19
18
|
export * from "./dropdown/index.js";
|
|
19
|
+
export * from "./fab/index.js";
|
|
20
20
|
export * from "./filter-chips/index.js";
|
|
21
21
|
export * from "./flex/index.js";
|
|
22
22
|
export * from "./form-summary/index.js";
|
|
@@ -27,8 +27,8 @@ export * from "./input/index.js";
|
|
|
27
27
|
export * from "./link/index.js";
|
|
28
28
|
export * from "./list/index.js";
|
|
29
29
|
export * from "./mask/index.js";
|
|
30
|
-
export * from "./menu-button/index.js";
|
|
31
30
|
export * from "./pagination/index.js";
|
|
31
|
+
export * from "./menu-button/index.js";
|
|
32
32
|
export * from "./backdrop/index.js";
|
|
33
33
|
export * from "./popover/index.js";
|
|
34
34
|
export * from "./radio/index.js";
|
|
@@ -37,15 +37,15 @@ export * from "./segmented-control/index.js";
|
|
|
37
37
|
export * from "./select/index.js";
|
|
38
38
|
export * from "./signal/index.js";
|
|
39
39
|
export * from "./spinner/index.js";
|
|
40
|
-
export * from "./table/index.js";
|
|
41
40
|
export * from "./switch/index.js";
|
|
41
|
+
export * from "./table/index.js";
|
|
42
42
|
export * from "./tabs/index.js";
|
|
43
43
|
export * from "./text/index.js";
|
|
44
44
|
export * from "./textarea/index.js";
|
|
45
45
|
export * from "./theme/index.js";
|
|
46
46
|
export * from "./video/index.js";
|
|
47
|
-
export * from "./list-item-pattern-01/index.js";
|
|
48
47
|
export * from "./card-pattern-01/index.js";
|
|
48
|
+
export * from "./list-item-pattern-01/index.js";
|
|
49
49
|
export * from "./avatar-group/index.js";
|
|
50
50
|
export * from "./breadcrumb/index.js";
|
|
51
51
|
export * from "./checkbox-group/index.js";
|
|
@@ -56,10 +56,12 @@ export * from "./formatted-date/index.js";
|
|
|
56
56
|
export * from "./formatted-number/index.js";
|
|
57
57
|
export * from "./list-item/index.js";
|
|
58
58
|
export * from "./radio-group/index.js";
|
|
59
|
-
export * from "./sensitive-account/index.js";
|
|
60
59
|
export * from "./segment/index.js";
|
|
60
|
+
export * from "./sensitive-account/index.js";
|
|
61
61
|
export * from "./sensitive-date/index.js";
|
|
62
62
|
export * from "./sensitive-number/index.js";
|
|
63
|
+
export * from "./tab/index.js";
|
|
64
|
+
export * from "./tab-panel/index.js";
|
|
63
65
|
export * from "./icons/icon-ai/index.js";
|
|
64
66
|
export * from "./icons/icon-airplane-up/index.js";
|
|
65
67
|
export * from "./icons/icon-archive/index.js";
|
|
@@ -371,8 +373,6 @@ export * from "./icons/icon-youtube/index.js";
|
|
|
371
373
|
export * from "./icons/icon-zap/index.js";
|
|
372
374
|
export * from "./icons/icon-zoom-in/index.js";
|
|
373
375
|
export * from "./icons/icon-zoom-out/index.js";
|
|
374
|
-
export * from "./tab/index.js";
|
|
375
|
-
export * from "./tab-panel/index.js";
|
|
376
376
|
export * from "./menu-item/index.js";
|
|
377
377
|
export * from "./menu-heading/index.js";
|
|
378
378
|
export * from "./option/index.js";
|
package/package.json
CHANGED