@sebgroup/green-core 3.31.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 (124) hide show
  1. package/components/form-summary/summary.component.d.ts +3 -0
  2. package/components/form-summary/summary.component.js +17 -16
  3. package/custom-elements.json +25457 -25436
  4. package/gds-element.js +1 -1
  5. package/generated/locales/da.d.ts +5 -0
  6. package/generated/locales/da.js +5 -0
  7. package/generated/locales/de.d.ts +5 -0
  8. package/generated/locales/de.js +5 -0
  9. package/generated/locales/fi.d.ts +5 -0
  10. package/generated/locales/fi.js +5 -0
  11. package/generated/locales/fr.d.ts +5 -0
  12. package/generated/locales/fr.js +5 -0
  13. package/generated/locales/it.d.ts +5 -0
  14. package/generated/locales/it.js +5 -0
  15. package/generated/locales/nl.d.ts +5 -0
  16. package/generated/locales/nl.js +5 -0
  17. package/generated/locales/no.d.ts +5 -0
  18. package/generated/locales/no.js +5 -0
  19. package/generated/locales/sv.d.ts +5 -0
  20. package/generated/locales/sv.js +5 -0
  21. package/generated/mcp/alert/guidelines.md +105 -0
  22. package/generated/mcp/alert/index.json +1 -0
  23. package/generated/mcp/avatar/guidelines.md +40 -0
  24. package/generated/mcp/avatar/index.json +1 -0
  25. package/generated/mcp/badge/guidelines.md +56 -0
  26. package/generated/mcp/badge/index.json +1 -0
  27. package/generated/mcp/blur/guidelines.md +3 -0
  28. package/generated/mcp/blur/index.json +1 -0
  29. package/generated/mcp/breadcrumbs/guidelines.md +35 -0
  30. package/generated/mcp/breadcrumbs/index.json +1 -0
  31. package/generated/mcp/button/guidelines.md +83 -0
  32. package/generated/mcp/button/index.json +1 -0
  33. package/generated/mcp/calendar/guidelines.md +3 -0
  34. package/generated/mcp/calendar/index.json +1 -0
  35. package/generated/mcp/card/guidelines.md +78 -0
  36. package/generated/mcp/card/index.json +1 -0
  37. package/generated/mcp/card-pattern-01/guidelines.md +52 -0
  38. package/generated/mcp/card-pattern-01/index.json +1 -0
  39. package/generated/mcp/checkbox/guidelines.md +91 -0
  40. package/generated/mcp/checkbox/index.json +1 -0
  41. package/generated/mcp/coachmark/guidelines.md +8 -0
  42. package/generated/mcp/coachmark/index.json +1 -0
  43. package/generated/mcp/components.json +47 -1
  44. package/generated/mcp/context-menu/guidelines.md +33 -0
  45. package/generated/mcp/context-menu/index.json +1 -0
  46. package/generated/mcp/datepicker/guidelines.md +44 -0
  47. package/generated/mcp/datepicker/index.json +1 -0
  48. package/generated/mcp/details/guidelines.md +24 -0
  49. package/generated/mcp/details/index.json +1 -0
  50. package/generated/mcp/dialog/guidelines.md +35 -0
  51. package/generated/mcp/dialog/index.json +1 -0
  52. package/generated/mcp/div/guidelines.md +3 -0
  53. package/generated/mcp/div/index.json +1 -0
  54. package/generated/mcp/divider/guidelines.md +24 -0
  55. package/generated/mcp/divider/index.json +1 -0
  56. package/generated/mcp/dropdown/guidelines.md +96 -0
  57. package/generated/mcp/dropdown/index.json +1 -0
  58. package/generated/mcp/fab/guidelines.md +27 -0
  59. package/generated/mcp/fab/index.json +1 -0
  60. package/generated/mcp/filter-chips/guidelines.md +47 -0
  61. package/generated/mcp/filter-chips/index.json +1 -0
  62. package/generated/mcp/flex/guidelines.md +1 -0
  63. package/generated/mcp/flex/index.json +1 -0
  64. package/generated/mcp/form-summary/angular.md +8 -0
  65. package/generated/mcp/form-summary/api.md +7 -0
  66. package/generated/mcp/form-summary/guidelines.md +39 -0
  67. package/generated/mcp/form-summary/index.json +1 -0
  68. package/generated/mcp/form-summary/react.md +8 -0
  69. package/generated/mcp/grid/guidelines.md +3 -0
  70. package/generated/mcp/grid/index.json +1 -0
  71. package/generated/mcp/icons.json +1 -1
  72. package/generated/mcp/index.json +1 -1
  73. package/generated/mcp/input/guidelines.md +127 -0
  74. package/generated/mcp/input/index.json +1 -0
  75. package/generated/mcp/link/guidelines.md +43 -0
  76. package/generated/mcp/link/index.json +1 -0
  77. package/generated/mcp/list/guidelines.md +16 -0
  78. package/generated/mcp/list/index.json +1 -0
  79. package/generated/mcp/list-item-pattern-01/guidelines.md +49 -0
  80. package/generated/mcp/list-item-pattern-01/index.json +1 -0
  81. package/generated/mcp/menu-button/guidelines.md +39 -0
  82. package/generated/mcp/menu-button/index.json +1 -0
  83. package/generated/mcp/pagination/guidelines.md +24 -0
  84. package/generated/mcp/pagination/index.json +1 -0
  85. package/generated/mcp/popover/guidelines.md +3 -0
  86. package/generated/mcp/popover/index.json +1 -0
  87. package/generated/mcp/progress/guidelines.md +42 -0
  88. package/generated/mcp/progress/index.json +1 -0
  89. package/generated/mcp/radio/guidelines.md +74 -0
  90. package/generated/mcp/radio/index.json +1 -0
  91. package/generated/mcp/rich-text/guidelines.md +3 -0
  92. package/generated/mcp/rich-text/index.json +1 -0
  93. package/generated/mcp/segmented-control/guidelines.md +31 -0
  94. package/generated/mcp/segmented-control/index.json +1 -0
  95. package/generated/mcp/select/guidelines.md +29 -0
  96. package/generated/mcp/select/index.json +1 -0
  97. package/generated/mcp/signal/guidelines.md +14 -0
  98. package/generated/mcp/signal/index.json +1 -0
  99. package/generated/mcp/slider/guidelines.md +86 -0
  100. package/generated/mcp/slider/index.json +1 -0
  101. package/generated/mcp/spinner/guidelines.md +6 -0
  102. package/generated/mcp/spinner/index.json +1 -0
  103. package/generated/mcp/switch/guidelines.md +41 -0
  104. package/generated/mcp/switch/index.json +1 -0
  105. package/generated/mcp/table/guidelines.md +169 -0
  106. package/generated/mcp/table/index.json +1 -0
  107. package/generated/mcp/tabs/guidelines.md +64 -0
  108. package/generated/mcp/tabs/index.json +1 -0
  109. package/generated/mcp/text/guidelines.md +3 -0
  110. package/generated/mcp/text/index.json +1 -0
  111. package/generated/mcp/textarea/guidelines.md +73 -0
  112. package/generated/mcp/textarea/index.json +1 -0
  113. package/generated/mcp/theme/guidelines.md +3 -0
  114. package/generated/mcp/theme/index.json +1 -0
  115. package/generated/mcp/tokens.json +1 -1
  116. package/generated/mcp/tooltip/guidelines.md +107 -0
  117. package/generated/mcp/tooltip/index.json +1 -0
  118. package/generated/mcp/video/guidelines.md +3 -0
  119. package/generated/mcp/video/index.json +1 -0
  120. package/generated/react/form-summary/index.d.ts +6 -1
  121. package/generated/react/index.d.ts +10 -10
  122. package/generated/react/index.js +10 -10
  123. package/package.json +1 -1
  124. package/utils/helpers/custom-element-scoping.js +1 -1
@@ -0,0 +1,73 @@
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/pattern/read-only)
@@ -2,6 +2,7 @@
2
2
  "name": "gds-textarea",
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
+ # Theme
2
+
3
+ Theme summary
@@ -2,6 +2,7 @@
2
2
  "name": "gds-theme",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-20T14:04:05.382Z",
2
+ "generatedAt": "2026-10-23T12:21:25.198Z",
3
3
  "categories": {
4
4
  "space": {
5
5
  "description": "Spacing tokens for padding, margin, gap, and other spacing",
@@ -0,0 +1,107 @@
1
+ # Tooltip
2
+
3
+ A tooltip provides short, supplementary information about an element on hover or focus.
4
+
5
+
6
+ ## Overview
7
+
8
+ ### When to use
9
+
10
+ Tooltips should help users understand an unfamiliar element or provide additional context without interrupting the task. A common use case is an icon-only button where the tooltip describes the action, for example “Download”, “Copy” or “More options”. If the information is important enough that users should always see it, display it directly in the interface instead.
11
+
12
+ #### Use a tooltip when
13
+
14
+ - An icon or control may not be immediately understood without a label.
15
+ - A short explanation can clarify the meaning or purpose of an element.
16
+ - The information is helpful but not essential for completing the task.
17
+ - Additional context would otherwise add unnecessary visual clutter to the interface.
18
+
19
+
20
+
21
+ #### Avoid using a tooltip for:
22
+
23
+ - information users need in order to understand or complete a task. (essential instructions).
24
+ - validation error messages.
25
+ - important warnings or status information
26
+ - information that users need to compare or reference.
27
+ - repeating text that is already visible in the interface.
28
+ - long information texts.
29
+
30
+
31
+
32
+ ### Behaviour
33
+
34
+ #### A tooltip appears when the associated element receives:
35
+
36
+ - Pointer hover.
37
+ - Keyboard focus.
38
+
39
+
40
+
41
+ #### The tooltip should disappear when:
42
+
43
+ - The pointer leaves the trigger.
44
+ - Focus moves away from the trigger.
45
+ - The user presses Esc.
46
+
47
+
48
+
49
+ #### Delay
50
+
51
+ Use a short delay before showing a tooltip on hover to prevent tooltips from appearing while users simply move the pointer across the interface.
52
+ For keyboard focus, the tooltip should appear without creating unnecessary delay in the interaction.
53
+
54
+ ### Placement
55
+
56
+ The tooltip should appear close to its trigger without covering the trigger itself. Preferred placement can be determined by the component, but the tooltip should automatically change position when there is not enough available space. Placement should adapt to the viewport rather than causing the tooltip to be clipped or extend outside the visible area.
57
+
58
+ #### Typical placements are:
59
+
60
+ - Top
61
+ - Bottom
62
+ - Left
63
+ - Right
64
+
65
+
66
+
67
+ ### Variants
68
+
69
+ Tooltips are available with or without a pointer. Use a pointer when the tooltip needs to be clearly associated with a larger area or element. For smaller elements, such as icon buttons, a pointer is often unnecessary as the connection is already clear. Both variants can be used depending on the context and placement.
70
+
71
+ ### Accessibility
72
+
73
+ Tooltips is available to both pointer and keyboard users. The trigger is focusable when it is an interactive element, and the tooltip is displayed when the trigger receives keyboard focus. The tooltip is programmatically associated with its trigger so assistive technologies can access the same information.
74
+
75
+ #### Tooltip vs accessible name
76
+
77
+ A tooltip does not automatically replace an accessible name.
78
+ For example, an icon-only button still needs an accessible name such as “Download statement”, regardless of whether the same text is visually presented in a tooltip. Avoid using a tooltip as the only way of making an otherwise inaccessible control understandable.
79
+
80
+ #### Touch devices
81
+
82
+ Tooltips should not contain information that is only available through hover, since hover is not reliably available on touch devices.
83
+ If information is important for mobile users, consider displaying it directly in the interface or using another pattern designed for explicit interaction. Do not make essential functionality dependent on a tooltip.
84
+
85
+ ### Tooltip vs popover
86
+
87
+ Use a tooltip for short, supplementary, non-interactive information.
88
+
89
+ Use a popover when the content:
90
+
91
+ - Requires user interaction.
92
+ - Contains links, buttons or other controls.
93
+ - Contains more extensive information.
94
+ - Needs to remain open while the user interacts with it.
95
+
96
+
97
+
98
+ #### A useful rule of thumb
99
+
100
+ Tooltip = short information only.

101
+
102
+ Popover = information and interaction.
103
+
104
+
105
+ ## UX Guidelines
106
+
107
+ ### Writing UX text for tooltip
@@ -2,6 +2,7 @@
2
2
  "name": "gds-tooltip",
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
+ # Video
2
+
3
+ Video summary
@@ -2,6 +2,7 @@
2
2
  "name": "gds-video",
3
3
  "files": {
4
4
  "api": "api.md",
5
+ "guidelines": "guidelines.md",
5
6
  "angular": "angular.md",
6
7
  "react": "react.md"
7
8
  }
@@ -1,7 +1,11 @@
1
1
  import { GdsFormSummary as GdsFormSummaryClass } from '../../../components/form-summary/summary.component';
2
2
  import { getReactComponent } from '../../../utils/react';
3
+ type GdsFormSummaryProps = React.ComponentProps<ReturnType<typeof getReactComponent<GdsFormSummaryClass>>> & {
4
+ /** Fired when an item in the summary is clicked, before focus moves to the related control. The detail object contains the control. Can be cancelled with event.preventDefault() to handle focus yourself. */
5
+ onGdsControlFocus?: (event: CustomEvent<any>) => void;
6
+ };
3
7
  export declare const GdsFormSummary: {
4
- (props: React.ComponentProps<ReturnType<typeof getReactComponent<GdsFormSummaryClass>>> & {
8
+ (props: GdsFormSummaryProps & {
5
9
  ref?: React.Ref<GdsFormSummaryClass>;
6
10
  }): import("react").ReactElement<Omit<Omit<{
7
11
  hideErrors?: boolean;
@@ -676,3 +680,4 @@ export declare const GdsFormSummary: {
676
680
  } & import("react").RefAttributes<HTMLElement>, string | import("react").JSXElementConstructor<any>>;
677
681
  displayName: string;
678
682
  };
683
+ export {};
@@ -1,7 +1,7 @@
1
1
  export * from './alert/index.js';
2
2
  export * from './avatar/index.js';
3
- export * from './blur/index.js';
4
3
  export * from './badge/index.js';
4
+ export * from './blur/index.js';
5
5
  export * from './breadcrumbs/index.js';
6
6
  export * from './button/index.js';
7
7
  export * from './calendar/index.js';
@@ -33,8 +33,8 @@ export * from './pagination/index.js';
33
33
  export * from './backdrop/index.js';
34
34
  export * from './popover/index.js';
35
35
  export * from './progress/index.js';
36
- export * from './radio/index.js';
37
36
  export * from './rich-text/index.js';
37
+ export * from './radio/index.js';
38
38
  export * from './segmented-control/index.js';
39
39
  export * from './select/index.js';
40
40
  export * from './signal/index.js';
@@ -45,9 +45,9 @@ export * from './table/index.js';
45
45
  export * from './tabs/index.js';
46
46
  export * from './text/index.js';
47
47
  export * from './textarea/index.js';
48
+ export * from './theme/index.js';
48
49
  export * from './tooltip/index.js';
49
50
  export * from './video/index.js';
50
- export * from './theme/index.js';
51
51
  export * from './card-pattern-01/index.js';
52
52
  export * from './list-item-pattern-01/index.js';
53
53
  export * from './avatar-group/index.js';
@@ -59,13 +59,6 @@ export * from './formatted-account/index.js';
59
59
  export * from './formatted-date/index.js';
60
60
  export * from './formatted-number/index.js';
61
61
  export * from './list-item/index.js';
62
- export * from './radio-group/index.js';
63
- export * from './segment/index.js';
64
- export * from './sensitive-account/index.js';
65
- export * from './sensitive-date/index.js';
66
- export * from './sensitive-number/index.js';
67
- export * from './tab/index.js';
68
- export * from './tab-panel/index.js';
69
62
  export * from './icons/icon-ai/index.js';
70
63
  export * from './icons/icon-airplane-up/index.js';
71
64
  export * from './icons/icon-archive/index.js';
@@ -378,5 +371,12 @@ export * from './icons/icon-youtube/index.js';
378
371
  export * from './icons/icon-zap/index.js';
379
372
  export * from './icons/icon-zoom-in/index.js';
380
373
  export * from './icons/icon-zoom-out/index.js';
374
+ export * from './radio-group/index.js';
375
+ export * from './sensitive-account/index.js';
376
+ export * from './segment/index.js';
377
+ export * from './sensitive-date/index.js';
378
+ export * from './sensitive-number/index.js';
379
+ export * from './tab/index.js';
380
+ export * from './tab-panel/index.js';
381
381
  export * from './menu-item/index.js';
382
382
  export * from './menu-heading/index.js';
@@ -1,7 +1,7 @@
1
1
  export * from "./alert/index.js";
2
2
  export * from "./avatar/index.js";
3
- export * from "./blur/index.js";
4
3
  export * from "./badge/index.js";
4
+ export * from "./blur/index.js";
5
5
  export * from "./breadcrumbs/index.js";
6
6
  export * from "./button/index.js";
7
7
  export * from "./calendar/index.js";
@@ -33,8 +33,8 @@ export * from "./pagination/index.js";
33
33
  export * from "./backdrop/index.js";
34
34
  export * from "./popover/index.js";
35
35
  export * from "./progress/index.js";
36
- export * from "./radio/index.js";
37
36
  export * from "./rich-text/index.js";
37
+ export * from "./radio/index.js";
38
38
  export * from "./segmented-control/index.js";
39
39
  export * from "./select/index.js";
40
40
  export * from "./signal/index.js";
@@ -45,9 +45,9 @@ export * from "./table/index.js";
45
45
  export * from "./tabs/index.js";
46
46
  export * from "./text/index.js";
47
47
  export * from "./textarea/index.js";
48
+ export * from "./theme/index.js";
48
49
  export * from "./tooltip/index.js";
49
50
  export * from "./video/index.js";
50
- export * from "./theme/index.js";
51
51
  export * from "./card-pattern-01/index.js";
52
52
  export * from "./list-item-pattern-01/index.js";
53
53
  export * from "./avatar-group/index.js";
@@ -59,13 +59,6 @@ export * from "./formatted-account/index.js";
59
59
  export * from "./formatted-date/index.js";
60
60
  export * from "./formatted-number/index.js";
61
61
  export * from "./list-item/index.js";
62
- export * from "./radio-group/index.js";
63
- export * from "./segment/index.js";
64
- export * from "./sensitive-account/index.js";
65
- export * from "./sensitive-date/index.js";
66
- export * from "./sensitive-number/index.js";
67
- export * from "./tab/index.js";
68
- export * from "./tab-panel/index.js";
69
62
  export * from "./icons/icon-ai/index.js";
70
63
  export * from "./icons/icon-airplane-up/index.js";
71
64
  export * from "./icons/icon-archive/index.js";
@@ -378,5 +371,12 @@ export * from "./icons/icon-youtube/index.js";
378
371
  export * from "./icons/icon-zap/index.js";
379
372
  export * from "./icons/icon-zoom-in/index.js";
380
373
  export * from "./icons/icon-zoom-out/index.js";
374
+ export * from "./radio-group/index.js";
375
+ export * from "./sensitive-account/index.js";
376
+ export * from "./segment/index.js";
377
+ export * from "./sensitive-date/index.js";
378
+ export * from "./sensitive-number/index.js";
379
+ export * from "./tab/index.js";
380
+ export * from "./tab-panel/index.js";
381
381
  export * from "./menu-item/index.js";
382
382
  export * from "./menu-heading/index.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sebgroup/green-core",
3
3
  "description": "A carefully crafted set of Web Components, laying the foundation of the Green Design System.",
4
- "version": "3.31.0",
4
+ "version": "3.32.0",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  import "../../chunks/chunk.H2T4A5YY.js";
2
2
  import { html as litHtml } from "lit";
3
- const VER_SUFFIX = "-9527d2";
3
+ const VER_SUFFIX = "-fcf43b";
4
4
  class ScopedElementRegistry {
5
5
  static get instance() {
6
6
  if (!globalThis.__gdsElementLookupTable?.[VER_SUFFIX])