@solid-design-system/mcp 7.0.0-next.7 → 7.0.0-next.8

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 (30) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/metadata/packages/components/sd-file-selector/info.md +139 -0
  3. package/metadata/packages/components/sd-file-selector/stories/directory.md +6 -0
  4. package/metadata/packages/components/sd-file-selector/stories/disabled.md +5 -0
  5. package/metadata/packages/components/sd-file-selector/stories/help-text.md +19 -0
  6. package/metadata/packages/components/sd-file-selector/stories/hide-value.md +5 -0
  7. package/metadata/packages/components/sd-file-selector/stories/invalid.md +14 -0
  8. package/metadata/packages/components/sd-file-selector/stories/label.md +13 -0
  9. package/metadata/packages/components/sd-file-selector/stories/multiple-files.md +5 -0
  10. package/metadata/packages/components/sd-file-selector/stories/required.md +6 -0
  11. package/metadata/packages/components/sd-file-selector/stories/sizes.md +14 -0
  12. package/metadata/packages/components/sd-file-selector/stories/variant.md +8 -0
  13. package/metadata/packages/components/sd-file-selector/stories/visually-disabled.md +9 -0
  14. package/metadata/packages/components/sd-tag/info.md +1 -1
  15. package/metadata/packages/icons/default/system.json +23 -23
  16. package/metadata/packages/styles/sd-chip/info.md +12 -8
  17. package/metadata/packages/styles/sd-chip/stories/{variants.md → color.md} +8 -10
  18. package/metadata/packages/styles/sd-chip/stories/outlined.md +8 -0
  19. package/metadata/packages/styles/sd-chip/stories/shade.md +17 -0
  20. package/metadata/packages/styles/sd-chip/stories/sharp.md +8 -0
  21. package/metadata/packages/styles/sd-chip/stories/size.md +8 -0
  22. package/metadata/packages/templates/status-badge.md +3 -3
  23. package/metadata/packages/templates/teaser.md +20 -14
  24. package/metadata/packages/tokens/docs/installation.md +0 -4
  25. package/metadata/packages/tokens/docs/usage.md +0 -16
  26. package/metadata/packages/tokens/tokens.json +4 -0
  27. package/package.json +4 -4
  28. package/metadata/packages/styles/sd-flag/info.md +0 -45
  29. package/metadata/packages/styles/sd-flag/stories/variants.md +0 -40
  30. package/metadata/packages/templates/flag.md +0 -38
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.0-next.8
4
+
5
+ ### Major Changes
6
+
7
+ - Consolidated `sd-chip` and `sd-flag`: _[`#3267`](https://github.com/solid-design-system/solid/pull/3267) [`12db708`](https://github.com/solid-design-system/solid/commit/12db708ea227bc2ce2a7835d12190ee1ae40f891) [@auroraVasconcelos](https://github.com/auroraVasconcelos)_
8
+
9
+ - Removed the `sd-flag` style.
10
+ - Added `sd-chip--color-{primary,neutral,white}`, `sd-chip--shade-{subtle,low,medium,high}`, `sd-chip--size-{sm,lg}`, `sd-chip--outline` and `sd-chip--sharp` classes.
11
+
3
12
  ## 7.0.0-next.7
4
13
 
5
14
  ## 7.0.0-next.6
@@ -12,6 +21,14 @@
12
21
 
13
22
  ## 7.0.0-next.2
14
23
 
24
+ ## 6.30.0
25
+
26
+ ### Minor Changes
27
+
28
+ - Add `sd-file-selector` component. _[`#3237`](https://github.com/solid-design-system/solid/pull/3237) [`cdab3e1`](https://github.com/solid-design-system/solid/commit/cdab3e1c704558ad4d437d9d19d5ad8db5062547) [@auroraVasconcelos](https://github.com/auroraVasconcelos)_
29
+
30
+ ## 6.29.1
31
+
15
32
  ## 6.29.0
16
33
 
17
34
  ## 6.28.2
@@ -0,0 +1,139 @@
1
+ ## Overview
2
+
3
+ `<sd-file-selector>` — Used to select a file by clicking or dragging a file into a drop-area.
4
+
5
+ ## API
6
+
7
+ ### Examples
8
+
9
+ Use the components tool by passing the args `component` and `example` for any of these combinations:
10
+
11
+ - component: sd-file-selector, example: variant
12
+ - component: sd-file-selector, example: sizes
13
+ - component: sd-file-selector, example: label
14
+ - component: sd-file-selector, example: disabled
15
+ - component: sd-file-selector, example: visually-disabled
16
+ - component: sd-file-selector, example: help-text
17
+ - component: sd-file-selector, example: multiple-files
18
+ - component: sd-file-selector, example: hide-value
19
+ - component: sd-file-selector, example: required
20
+ - component: sd-file-selector, example: invalid
21
+ - component: sd-file-selector, example: directory
22
+
23
+ ### Key Properties
24
+
25
+ - prop.files: — The selected files as a `FileList` object. The `FileList` behaves like an array, so you can get the number of
26
+ selected files via its `length` property.
27
+ - prop.name: string, default='' — The name of the file selector, submitted as a name/value pair with form data.
28
+ - prop.title: string, default='' — The `title` attribute specifies extra information about an element most often as a default browser tooltip text when the mouse moves over the element.
29
+ - prop.value: — The value of the file selector contains a string that represents the path of the selected file. If multiple
30
+ files are selected, the value represents the first file in the list. The only valid value when setting a file
31
+ input is an empty string.
32
+ - prop.defaultValue: string, default='' — The default value of the form control. Primarily used for resetting the form control.
33
+ - prop.size: 'sm'|'md'|'lg', default='lg' — The file selector's size.
34
+ - prop.label: string, default='' — The file selector's label, this field is required to ensure accessibility. It is visually hidden by default, use the `showLabel` property to display it.
35
+ - prop.showLabel [attr: show-label]: boolean, default=false — Visually displays the file selector's label.
36
+ - prop.helpText [attr: help-text]: string, default='' — The file selector's help text. If you need to display HTML, use the `help-text` slot instead.
37
+ - prop.disabled: boolean, default=false — Disables the file selector.
38
+ - prop.visuallyDisabled [attr: visually-disabled]: boolean, default=false — Styles the input as if it was disabled and enables aria-disabled
39
+ - prop.droparea [attr: drop-area]: boolean, default=false — Draw the file selector as a drop area.
40
+ - prop.accept: string, default='' — Comma-separated list of supported file types (e.g. `.jpg,.png,image/*`).
41
+ - prop.styleOnValid [attr: style-on-valid]: boolean, default=false — Shows success styles if the validity of the input is valid.
42
+ - prop.capture: 'user'|'environment' — Specifies which camera to use for capture of image or video data. Works only when not using a droparea.
43
+ - prop.multiple: boolean, default=false — Indicates whether the user can select more than one file. Has no effect if `webkitdirectory` is set.
44
+ - prop.webkitdirectory: boolean, default=false — Indicates that the file selector should let the user select directories instead of files. Non-standard, but
45
+ supported by all major browsers.
46
+ - prop.form: string, default='' — By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
47
+ to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
48
+ the same document or shadow root for this to work.
49
+ - prop.required: boolean, default=false — Makes the input a required field.
50
+ - prop.hideValue [attr: hide-value]: boolean, default=false — Suppresses the value from being displayed in the file selector.
51
+ - prop.validity: — Gets the validity state object.
52
+ - prop.validationMessage: — Gets the validation message.
53
+ - prop.dir: 'ltr'|'rtl'|'auto' — The element's directionality.
54
+ - prop.lang: string — The element's language.
55
+
56
+ ### Events
57
+
58
+ - event.sd-blur: Emitted when the control loses focus.
59
+ - event.sd-change: Emitted when an alteration to the control's value is committed by the user.
60
+ - event.sd-error: Emitted when multiple files are selected via drag and drop, without the `multiple` property being set.
61
+ - event.sd-focus: Emitted when the control gains focus.
62
+ - event.sd-input: Emitted when the control receives input.
63
+
64
+ ### Slots
65
+
66
+ - slot.label: The file selector's label. Alternatively, you can use the `label` attribute.
67
+ - slot.help-text: Text that describes how to use the file selector. Alternatively, you can use the `help-text` attribute.
68
+
69
+ ### CSS Parts
70
+
71
+ - part.form-control: The form control that wraps the label, input, and help text.
72
+ - part.form-control-label: The label's wrapper.
73
+ - part.form-control-input: The input's wrapper.
74
+ - part.form-control-help-text: The help text's wrapper.
75
+ - part.button-wrapper: The wrapper around the button and text value.
76
+ - part.button: The sd-button acting as a file input trigger.
77
+ - part.value: The chosen files or placeholder text for the file input.
78
+ - part.droparea: The element wrapping the drop zone.
79
+ - part.droparea-background: The background of the drop zone.
80
+ - part.droparea-icon: The container that wraps the icon for the drop zone.
81
+ - part.droparea-value: The text for the drop zone.
82
+ - part.invalid-icon-message: The container that wraps the invalid icon and message.
83
+ - part.invalid-icon: The invalid icon.
84
+ - part.invalid-message: The invalid message.
85
+
86
+ ## Guidelines
87
+
88
+ ### Use Cases
89
+
90
+ - Select files or documents as part of a form submission.
91
+ - Attach supporting files in profile or account settings.
92
+ - Replace or update assets in content management workflows.
93
+ - Handle single or multiple file selections within any form or multi-step forms.
94
+
95
+ #### Default
96
+
97
+ Use the `default` variant when the select action is secondary to other form fields, or when space is limited.
98
+
99
+ - Inline file selector in dense or compact forms.
100
+ - Single-file selection where minimal visual weight is needed.
101
+ - Flows where the selection action sits alongside other inputs.
102
+
103
+ #### Drop Area
104
+
105
+ Use the `drop-area` variant when file selector is the primary action on the page or step.
106
+
107
+ - Dedicated selector steps in multi-step flows.
108
+ - Scenarios where drag-and-drop is a likely or preferred interaction.
109
+ - Select flows that support multiple files at once.
110
+
111
+ ### Rules
112
+
113
+ <b>Do not mix both variants within the same form or flow.</b>
114
+
115
+ ### Label and Help Text
116
+
117
+ - Always provide a descriptive label (e.g., "Select file", "Signed contract").
118
+ - Use help text to communicate accepted file types and size limits
119
+ - Do not rely on the drop-area copy alone to convey constraints.
120
+
121
+ ### Error Handling
122
+
123
+ - Use error-text to surface validation errors: below the component (default variant) or next to each individual file selector when the "show selected files" attribute is active (drop-area variant).
124
+ - Write error text in plain language with a clear solution (e.g., "The file is too large. Maximum allowed size is 5 MB.").
125
+
126
+ ### Per-error-type copy guidance
127
+
128
+ - Provide distinct error messages for each failure scenario rather than a generic fallback — for example: wrong file type, file too large, empty file, too many files, or selection failure.
129
+
130
+ ### Background
131
+
132
+ - Use light background options such as white, neutral-100, or primary-100.
133
+
134
+ ### Accessibility
135
+
136
+ - Use `visually-disabled` to keep disabled elements focusable and tooltip-accessible.
137
+ - Associate error text via `aria-describedby` so they are announced on focus.
138
+ - Use the `visually-disabled` attribute to keep disabled elements focusable, hoverable, and able to show tooltips, as they’re otherwise removed from the tab order and inaccessible to screen readers.
139
+ - A label must always be provided, even when it is visually hidden. The label is used to provide an accessible name for the file selector, ensuring that screen reader users can identify the purpose of the control.
@@ -0,0 +1,6 @@
1
+ Use the `webkitdirectory` attribute to allow directory selection.
2
+ **Note:** As it is a non-standard attribute, browser support may vary. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#webkitdirectory) for more information.
3
+
4
+ ```html
5
+ <sd-file-selector label="Select a directory to upload" show-label webkitdirectory></sd-file-selector>
6
+ ```
@@ -0,0 +1,5 @@
1
+ Use the `disabled` attribute to disable the file selector.
2
+
3
+ ```html
4
+ <sd-file-selector label="Select a file to upload" disabled></sd-file-selector>
5
+ ```
@@ -0,0 +1,19 @@
1
+ Use the `help-text` attribute to provide additional context or instructions as:
2
+
3
+ - file size restrictions
4
+ - file format requirements
5
+ - file selection limit
6
+ For help-text that contain HTML, use the help-text slot instead.
7
+
8
+ ```html
9
+ <div class="flex flex-col gap-10">
10
+ <sd-file-selector
11
+ label="Select a file to upload"
12
+ help-text="Max file size is 3 MB. Only PDF, JPG and PNG files are supported."
13
+ >
14
+ </sd-file-selector>
15
+ <sd-file-selector label="Select a file to upload">
16
+ <div slot="help-text" class="text-lg">Max file size is 3 MB. Only PDF, JPG and PNG files are supported.</div>
17
+ </sd-file-selector>
18
+ </div>
19
+ ```
@@ -0,0 +1,5 @@
1
+ Use the `hide-value` attribute where you don’t want to show the selected value.
2
+
3
+ ```html
4
+ <sd-file-selector label="Select a file to upload" hide-value></sd-file-selector>
5
+ ```
@@ -0,0 +1,14 @@
1
+ The component gets `invalid` state when the form is not valid.
2
+
3
+ ```html
4
+ <form id="invalid-form">
5
+ <sd-file-selector id="invalid-file-selector" label="Select a file to upload" show-label> </sd-file-selector>
6
+ </form>
7
+ <script type="module">
8
+ await Promise.all([customElements.whenDefined('sd-file-selector')]).then(() => {
9
+ const fileSelector = document.getElementById('invalid-file-selector');
10
+ fileSelector.setCustomValidity('Please select a file.');
11
+ fileSelector.reportValidity();
12
+ });
13
+ </script>
14
+ ```
@@ -0,0 +1,13 @@
1
+ Use the `label` attribute to add an accessible label to the file selector.
2
+ For labels that contain HTML, use the label slot instead.
3
+ This label is visually hidden by default, to display it, use the `show-label` attribute.
4
+
5
+ ```html
6
+ <div class="flex flex-col gap-10">
7
+ <sd-file-selector label="Select a file to upload"></sd-file-selector>
8
+ <sd-file-selector label="Select a file to upload" show-label></sd-file-selector>
9
+ <sd-file-selector label="Select a file to upload" show-label>
10
+ <div slot="label" class="text-lg">Label slot</div>
11
+ </sd-file-selector>
12
+ </div>
13
+ ```
@@ -0,0 +1,5 @@
1
+ Use the `multiple` attribute to allow multiple files selection.
2
+
3
+ ```html
4
+ <sd-file-selector label="Select a file to upload" multiple></sd-file-selector>
5
+ ```
@@ -0,0 +1,6 @@
1
+ Use the `required` attribute to make the file selector a required field. This can be used for form validation purposes.
2
+ **Note:** For accessibility reasons, required fields must always display a visible label and value.
3
+
4
+ ```html
5
+ <sd-file-selector label="Required" show-label required></sd-file-selector>
6
+ ```
@@ -0,0 +1,14 @@
1
+ Use the `size` attribute to change the size:
2
+
3
+ - `lg` (default)
4
+ - `md`
5
+ - `sm`
6
+ On drop-area variant “md” and “sm” sizes are not available.
7
+
8
+ ```html
9
+ <div class="flex flex-col gap-10">
10
+ <sd-file-selector size="lg" label="sd-file-selector large size"></sd-file-selector>
11
+ <sd-file-selector size="md" label="sd-file-selector medium size"></sd-file-selector>
12
+ <sd-file-selector size="sm" label="sd-file-selector small size"></sd-file-selector>
13
+ </div>
14
+ ```
@@ -0,0 +1,8 @@
1
+ Use the `drop-area` attribute to switch to a drop area appearance.
2
+
3
+ ```html
4
+ <div class="flex flex-col gap-10">
5
+ <sd-file-selector label="sd-file-selector default variant"></sd-file-selector>
6
+ <sd-file-selector drop-area label="sd-file-selector drop area variant"></sd-file-selector>
7
+ </div>
8
+ ```
@@ -0,0 +1,9 @@
1
+ Use the `visually-disabled` attribute to style the component as if it was disabled and enable `aria-disabled` to allow it to be reachable by screen readers. When using this attribute, make sure to provide ways to inform the user why the element is disabled and how to enable it. This can be done by using the `help-text` attribute or wrapping the element in a sd-tooltip. Disabling elements is not recommended for accessibility reasons.
2
+
3
+ ```html
4
+ <div class="w-[250px] pt-12">
5
+ <sd-tooltip content="Visually disabled" trigger="hover focus" size="sm" placement="top">
6
+ <sd-file-selector value="Visually disabled" label="Select a file to upload" visually-disabled></sd-file-selector
7
+ ></sd-tooltip>
8
+ </div>
9
+ ```
@@ -72,4 +72,4 @@ Use the components tool by passing the args `component` and `example` for any of
72
72
 
73
73
  ### Interactivity
74
74
 
75
- - Tags are interactive elements which trigger an action; to label or categorise items without any interaction use [sd-chip](./?path=/docs/styles-sd-chip--docs) or [sd-flag](./?path=/docs/styles-sd-flag--docs) instead.
75
+ - Tags are interactive elements which trigger an action; to label or categorise items without any interaction use [sd-chip](./?path=/docs/styles-sd-chip--docs) instead.
@@ -79,16 +79,16 @@
79
79
  "displayNameDe": "Herz voll",
80
80
  "tags": ["Favoriten", "gespeichert", "gemerkt"]
81
81
  },
82
- {
83
- "technicalId": "flash-on",
84
- "displayNameDe": "Blitz an",
85
- "tags": ["Taschenlampe an", "Foto"]
86
- },
87
82
  {
88
83
  "technicalId": "battery-full",
89
84
  "displayNameDe": "Batterie voll\n",
90
85
  "tags": ["voll", "Akku", "Ladestatus"]
91
86
  },
87
+ {
88
+ "technicalId": "flash-on",
89
+ "displayNameDe": "Blitz an",
90
+ "tags": ["Taschenlampe an", "Foto"]
91
+ },
92
92
  {
93
93
  "technicalId": "sort-down",
94
94
  "displayNameDe": "sortieren absteigend",
@@ -314,16 +314,16 @@
314
314
  "displayNameDe": "einklappen unten",
315
315
  "tags": ["verstecken", "komprimieren", "Seitenleiste"]
316
316
  },
317
- {
318
- "technicalId": "bug",
319
- "displayNameDe": "Fehler",
320
- "tags": ["Mangel", "Problem"]
321
- },
322
317
  {
323
318
  "technicalId": "shopping-cart",
324
319
  "displayNameDe": "Einkaufswagen",
325
320
  "tags": ["Onlineshop", "Warenkorb", "Erwerb", "Einkauf"]
326
321
  },
322
+ {
323
+ "technicalId": "bug",
324
+ "displayNameDe": "Fehler",
325
+ "tags": ["Mangel", "Problem"]
326
+ },
327
327
  {
328
328
  "technicalId": "eraser",
329
329
  "displayNameDe": "Radiergummi",
@@ -614,26 +614,26 @@
614
614
  "displayNameDe": "Bildschirm Cursor",
615
615
  "tags": ["klicken", "auswählen"]
616
616
  },
617
- {
618
- "technicalId": "layers",
619
- "displayNameDe": "Ebenen",
620
- "tags": ["gruppieren", "Stapel", "mehrere Folien erzeugen"]
621
- },
622
617
  {
623
618
  "technicalId": "file-read-out",
624
619
  "displayNameDe": "Dokument vorlesen",
625
620
  "tags": ["vorlesen", "Audio", "Lautstärke"]
626
621
  },
627
622
  {
628
- "technicalId": "collapse-left",
629
- "displayNameDe": "einklappen links",
630
- "tags": ["komprimieren", "verstecken", "Seitenleiste"]
623
+ "technicalId": "layers",
624
+ "displayNameDe": "Ebenen",
625
+ "tags": ["gruppieren", "Stapel", "mehrere Folien erzeugen"]
631
626
  },
632
627
  {
633
628
  "technicalId": "file-wai",
634
629
  "displayNameDe": "Dokument wAI",
635
630
  "tags": ["Dokument", "Datei", "wAI"]
636
631
  },
632
+ {
633
+ "technicalId": "collapse-left",
634
+ "displayNameDe": "einklappen links",
635
+ "tags": ["komprimieren", "verstecken", "Seitenleiste"]
636
+ },
637
637
  {
638
638
  "technicalId": "download",
639
639
  "displayNameDe": "Download",
@@ -1044,16 +1044,16 @@
1044
1044
  "displayNameDe": "antworten",
1045
1045
  "tags": ["Rückmeldung", "Nachricht", "Kommunikation"]
1046
1046
  },
1047
- {
1048
- "technicalId": "password",
1049
- "displayNameDe": "Passwort",
1050
- "tags": ["sicherheitsgeschützt", "privat", "verschlüsselt"]
1051
- },
1052
1047
  {
1053
1048
  "technicalId": "e-mail-send",
1054
1049
  "displayNameDe": "E-Mail abschicken",
1055
1050
  "tags": ["Brief", "E-Mail", "Kommunikation"]
1056
1051
  },
1052
+ {
1053
+ "technicalId": "password",
1054
+ "displayNameDe": "Passwort",
1055
+ "tags": ["sicherheitsgeschützt", "privat", "verschlüsselt"]
1056
+ },
1057
1057
  {
1058
1058
  "technicalId": "e-mail-exclamation",
1059
1059
  "displayNameDe": "E-Mail Ausrufezeichen",
@@ -8,13 +8,17 @@
8
8
 
9
9
  Use the styles tool (with `style` + `example` args) to retrieve the HTML for any of these examples:
10
10
 
11
- - sd-chip/variants
11
+ - sd-chip/color
12
+ - sd-chip/shade
13
+ - sd-chip/size
14
+ - sd-chip/outlined
15
+ - sd-chip/sharp
12
16
 
13
17
  ## Guidelines
14
18
 
15
19
  ### Use Cases
16
20
 
17
- - Display selected items or categories within sd-teaser, such as chosen filters, tags, or interests.
21
+ - Display selected items or categories within [sd-teaser](./?path=/docs/components-sd-teaser--docs), such as chosen filters, tags, or interests.
18
22
  - Indicate attributes of items, such as “New,” “Featured,” or “Verified”.
19
23
  - Communicate user roles, like “Moderator” or “Admin”.
20
24
 
@@ -24,15 +28,15 @@ Use the styles tool (with `style` + `example` args) to retrieve the HTML for any
24
28
 
25
29
  - Keep chip text short and easily scannable. Long text disrupts layouts and diminishes the chip’s visual impact.
26
30
  - Avoid overuse. Too many chips in one area can create visual clutter.
27
- - Use the “&--variantproperty to apply the color variant that best works on the background, keeping it consistent throughout the product.
31
+ - Use the “&--colorand “&--shade” properties to apply the color that best works on the background, and “&--outlined” for a border-only style, keeping it consistent throughout the product.
28
32
 
29
- ### Chips and Flags
33
+ ### Chips and Tags
30
34
 
31
- - sd-chip and [sd-flag](./?path=/docs/styles-sd-flag--docs) can be used for similar purposes. Use them consistently throughout your product and, if both are needed, be sure to define which categories each should be used for (e.g. a chip on an article teaser informs about its subject, the flag about the type of article).
35
+ - Use only as a non-interactive element; for interactive elements (e.g., a dynamic filter), use [sd-tag](./?path=/docs/components-sd-tag--docs) instead.
32
36
 
33
- ### Chips and Tags
37
+ ### Corner Style
34
38
 
35
- - Use only as a non-interactive element; for interactive elements (e.g., a dynamic filter), use [sd-tag](./?path=/docs/styles-sd-tag--docs) instead.
39
+ - Use sharp="true" when sd-chip sits directly on top of an image or a container with no padding, so the rounded corners aren’t cut off at the edge. For all other placements, use sharp="true".
36
40
 
37
41
  ### Accessibility
38
42
 
@@ -43,7 +47,7 @@ Use the styles tool (with `style` + `example` args) to retrieve the HTML for any
43
47
  ### Related Templates
44
48
 
45
49
  - chip--docs
46
- - teaser--docs
50
+ - tab-group--docs
47
51
  - status-badge--docs
48
52
 
49
53
  Use the templates tool (with `template` arg) to retrieve the full code for any of these templates.
@@ -23,18 +23,16 @@ args
23
23
  }
24
24
  };
25
25
  /**
26
- Use the `sd-chip--*` classes for alternative appearances:
26
+ Use the `&--color-*` classes to switch between color families:
27
27
 
28
- - primary-200 is the default appearance
29
- - `sd-chip--primary-300`
30
- - `sd-chip--primary-500`
31
- - `sd-chip--white`
28
+ - sd-chip--color-primary is the default appearance
29
+ - `sd-chip--color-neutral`
30
+ - `sd-chip--color-white`
32
31
 
33
32
  ```html
34
- <div class="flex gap-12">
35
- <div class="sd-chip">primary-200</div>
36
- <div class="sd-chip sd-chip--primary-300">primary-300</div>
37
- <div class="sd-chip sd-chip--primary-500">primary-500</div>
38
- <div class="sd-chip sd-chip--white">white</div>
33
+ <div class="flex gap-12 items-center">
34
+ <div class="sd-chip sd-chip--color-primary">primary</div>
35
+ <div class="sd-chip sd-chip--color-neutral">neutral</div>
36
+ <div class="sd-chip sd-chip--color-white">white</div>
39
37
  </div>
40
38
  ```
@@ -0,0 +1,8 @@
1
+ Use the `sd-chip--outline` class to switch between a filled or border-only style.
2
+
3
+ ```html
4
+ <div class="flex gap-12 items-center">
5
+ <div class="sd-chip">filled</div>
6
+ <div class="sd-chip sd-chip--outline">outlined</div>
7
+ </div>
8
+ ```
@@ -0,0 +1,17 @@
1
+ Use the `&--shade-*` classes to select an emphasis level within the chosen color:
2
+
3
+ - sd-chip--shade-subtle is the default appearance
4
+ - `sd-chip--shade-low`
5
+ - `sd-chip--shade-medium`
6
+ - `sd-chip--shade-high`
7
+ - `sd-chip--shade-none` (white only)
8
+
9
+ ```html
10
+ <div class="flex gap-12 items-center">
11
+ <div class="sd-chip sd-chip--shade-subtle">subtle</div>
12
+ <div class="sd-chip sd-chip--shade-low">low</div>
13
+ <div class="sd-chip sd-chip--shade-medium">medium</div>
14
+ <div class="sd-chip sd-chip--shade-high">high</div>
15
+ <div class="sd-chip sd-chip--shade-none">none</div>
16
+ </div>
17
+ ```
@@ -0,0 +1,8 @@
1
+ Use the `sd-chip--sharp` class to switch the corner style.
2
+
3
+ ```html
4
+ <div class="flex gap-12 items-center">
5
+ <div class="sd-chip">rounded</div>
6
+ <div class="sd-chip sd-chip--sharp">sharp</div>
7
+ </div>
8
+ ```
@@ -0,0 +1,8 @@
1
+ Use the `sd-chip--size-lg` class to have a larger chip.
2
+
3
+ ```html
4
+ <div class="flex gap-12 items-center">
5
+ <div class="sd-chip">sm</div>
6
+ <div class="sd-chip sd-chip--size-lg">lg</div>
7
+ </div>
8
+ ```
@@ -4,7 +4,7 @@ title: Status Badge
4
4
  components:
5
5
  - sd-button
6
6
  - sd-chip
7
- - sd-chip--primary-200
7
+ - sd-chip--shade-low
8
8
  - sd-container
9
9
  - sd-container--variant-neutral-100
10
10
  - sd-headline
@@ -131,7 +131,7 @@ version: 1.0.0
131
131
  Available
132
132
  </div>
133
133
  </div>
134
- <span class="sd-chip sd-chip--primary-200">Authorized for telephone information</span>
134
+ <span class="sd-chip sd-chip--shade-low">Authorized for telephone information</span>
135
135
  </div>
136
136
 
137
137
  <sd-button class="edit-button" variant="secondary">
@@ -179,7 +179,7 @@ version: 1.0.0
179
179
  Be right back
180
180
  </div>
181
181
  </div>
182
- <span class="sd-chip sd-chip--primary-200">Not authorized for telephone information</span>
182
+ <span class="sd-chip sd-chip--shade-low">Not authorized for telephone information</span>
183
183
  </div>
184
184
 
185
185
  <sd-button class="edit-button" variant="secondary">
@@ -4,13 +4,11 @@ title: Teaser
4
4
  components:
5
5
  - sd-button
6
6
  - sd-chip
7
- - sd-chip--primary-200
8
- - sd-chip--primary-500
9
- - sd-chip--white
10
- - sd-flag
11
- - sd-flag--neutral-200
12
- - sd-flag--neutral-300
13
- - sd-flag--white
7
+ - sd-chip--color-neutral
8
+ - sd-chip--color-white
9
+ - sd-chip--shade-low
10
+ - sd-chip--sharp
11
+ - sd-chip--size-lg
14
12
  - sd-headline
15
13
  - sd-headline--inverted
16
14
  - sd-headline--size-3xl
@@ -165,7 +163,7 @@ version: 1.0.0
165
163
  </div>
166
164
  ```
167
165
 
168
- ## Template: Teaser with Chip and Flag
166
+ ## Template: Teaser with Chip
169
167
 
170
168
  ```html
171
169
  <div class="flex flex-col gap-8">
@@ -179,8 +177,10 @@ version: 1.0.0
179
177
  alt="Colleagues in a casual office meeting, smiling and interacting, symbolizing collaboration and the value of office spaces."
180
178
  class="aspect-video object-cover"
181
179
  />
182
- <span class="absolute top-3 left-4 sd-chip sd-chip--primary-500">Remote Work</span>
183
- <span class="absolute top-2 right-0 sd-flag sd-flag--white">Research</span>
180
+ <span class="absolute top-3 left-4 sd-chip sd-chip--color-white">Remote Work</span>
181
+ <span class="absolute top-3 right-0 sd-chip sd-chip--color-neutral sd-chip--shade-low sd-chip--size-lg"
182
+ >Research</span
183
+ >
184
184
  </div>
185
185
  <div slot="meta" class="meta-info">
186
186
  <span class="sd-meta sd-meta--inverted sd-meta--light sd-meta--size-sm sd-meta--pipe">05.06.2024</span>
@@ -200,8 +200,11 @@ version: 1.0.0
200
200
  <h3 slot="headline" class="sd-headline sd-headline--size-lg">
201
201
  ECB interest rate cut: a trend reversal on the real estate markets?
202
202
  </h3>
203
- <span class="absolute top-3 left-4 sd-chip sd-chip--primary-200">Investment</span>
204
- <span class="absolute top-2 right-0 sd-flag sd-flag--neutral-200">Trends</span>
203
+ <span class="absolute top-3 left-4 sd-chip">Investment</span>
204
+ <span
205
+ class="absolute top-3 right-0 sd-chip sd-chip--color-neutral sd-chip--shade-low sd-chip--size-lg sd-chip--sharp"
206
+ >Trends</span
207
+ >
205
208
  <div slot="media" class="flex flex-wrap h-[189px] content-center justify-center">
206
209
  <sd-icon class="text-[96px]" name="content/house-percent" color="primary"></sd-icon>
207
210
  </div>
@@ -232,8 +235,11 @@ version: 1.0.0
232
235
  alt="City skyline, highlighting growth in real estate transactions."
233
236
  class="aspect-video sm:aspect-[3/4] md:aspect-[16/9] object-cover w-full"
234
237
  />
235
- <span class="absolute top-3 left-4 sd-chip sd-chip--white">Real Estate</span>
236
- <span class="absolute top-2 right-0 sd-flag sd-flag--neutral-300">Analytics</span>
238
+ <span class="absolute top-3 left-4 sd-chip sd-chip--color-white">Real Estate</span>
239
+ <span
240
+ class="absolute top-3 right-0 sd-chip sd-chip--color-neutral sd-chip--shade-low sd-chip--size-lg sd-chip--sharp"
241
+ >Analytics</span
242
+ >
237
243
  </div>
238
244
  </sd-teaser>
239
245
  </div>
@@ -416,10 +416,6 @@ Deprecated variables:
416
416
  - `--sd-button--size-md-border-radius` replace with `--sd-button-border-radius`
417
417
  - `--sd-button--size-sm-border-radius` replace with `--sd-button-border-radius`
418
418
  - `--sd-button--secondary--inverted--color-border` replace with `--sd-button-secondary-inverted-color-border`
419
- - `--sd-chip-font-size` replace with `--sd-marker-font-size`
420
- - `--sd-chip-border-width` replace with `--sd-marker-border-width`
421
- - `--sd-chip-font-weight` replace with `--sd-marker-font-weight`
422
- - `--sd-flag-border-width` replace with `--sd-marker-border-width`
423
419
  - `--sd-form-control-color-icon` replace with `--sd-form-control-color-icon-fill`
424
420
  - `--sd-menu-color-icon` replace with `--sd-menu-item-color-icon-fill`
425
421
  - `--sd-menu-color-text` replace with `--sd-menu-item-color-text`
@@ -136,22 +136,6 @@ The following CSS variables (tokens) are deprecated and will be removed in a fut
136
136
  <td>`--sd-button--secondary--inverted--color-border`</td>
137
137
  <td>`--sd-button-secondary-inverted-color-border`</td>
138
138
  </tr>
139
- <tr>
140
- <td>`--sd-chip-font-size`</td>
141
- <td>`--sd-marker-font-size`</td>
142
- </tr>
143
- <tr>
144
- <td>`--sd-chip-border-width`</td>
145
- <td>`--sd-marker-border-width`</td>
146
- </tr>
147
- <tr>
148
- <td>`--sd-chip-font-weight`</td>
149
- <td>`--sd-marker-font-weight`</td>
150
- </tr>
151
- <tr>
152
- <td>`--sd-flag-border-width`</td>
153
- <td>`--sd-marker-border-width`</td>
154
- </tr>
155
139
  <tr>
156
140
  <td>`--sd-form-control-color-icon`</td>
157
141
  <td>`--sd-form-control-color-icon-fill`</td>
@@ -32,6 +32,8 @@
32
32
  "--background-color-neutral-500",
33
33
  "--background-color-neutral-600",
34
34
  "--background-color-neutral-800",
35
+ "--background-color-neutral-blue",
36
+ "--background-color-neutral-grey",
35
37
  "--background-color-primary-100",
36
38
  "--background-color-primary-200",
37
39
  "--background-color-primary-300",
@@ -40,6 +42,7 @@
40
42
  "--background-color-primary",
41
43
  "--background-color-success",
42
44
  "--background-color-warning",
45
+ "--background-color-white-translucent",
43
46
  "--background-color-white",
44
47
  "--border-color-accent-550",
45
48
  "--border-color-accent",
@@ -49,6 +52,7 @@
49
52
  "--border-color-neutral-500",
50
53
  "--border-color-neutral-600",
51
54
  "--border-color-neutral-800",
55
+ "--border-color-neutral-blue",
52
56
  "--border-color-primary-100",
53
57
  "--border-color-primary-200",
54
58
  "--border-color-primary-400",
package/package.json CHANGED
@@ -20,9 +20,9 @@
20
20
  "prettier": "^3.9.5",
21
21
  "tsx": "^4.23.1",
22
22
  "typescript": "^5.9.3",
23
- "@solid-design-system/components": "7.0.0-next.7",
24
- "@solid-design-system/styles": "7.0.0-next.7",
25
- "@solid-design-system/tokens": "7.0.0-next.7"
23
+ "@solid-design-system/components": "7.0.0-next.8",
24
+ "@solid-design-system/styles": "7.0.0-next.8",
25
+ "@solid-design-system/tokens": "7.0.0-next.8"
26
26
  },
27
27
  "exports": {
28
28
  ".": {
@@ -59,7 +59,7 @@
59
59
  "directory": "packages/mcp"
60
60
  },
61
61
  "type": "module",
62
- "version": "7.0.0-next.7",
62
+ "version": "7.0.0-next.8",
63
63
  "scripts": {
64
64
  "build": "pnpm run build:components && pnpm run build:tokens && pnpm run build:ts && pnpm run build:metadata && cd ../.. && pnpm exec prettier --write --log-level warn packages/mcp/metadata",
65
65
  "build:components": "cd ../components && pnpm exec node scripts/make-metadata.js --outdir dist",
@@ -1,45 +0,0 @@
1
- ## Overview
2
-
3
- `sd-flag` – Used as a small, non-interactive label that represents a category.
4
-
5
- ## API
6
-
7
- ### Examples
8
-
9
- Use the styles tool (with `style` + `example` args) to retrieve the HTML for any of these examples:
10
-
11
- - sd-flag/variants
12
-
13
- ## Guidelines
14
-
15
- ### Use Cases
16
-
17
- - Indicate the status of items with visual labels, such as “New,” “Featured,” “Expired,” or “Limited Stock”.
18
- - Label content type, like “Video,” “Article,” or “Podcast” to help users quickly identify the nature of the content.
19
-
20
- ### Rules
21
-
22
- ### Label and Styling
23
-
24
- - Keep flag text short and easily scannable. Long text disrupts layouts and diminishes the flag’s visual impact.
25
- - Use the “&--variant” property to apply the color variant that best works on the background, keeping it consistent throughout the product.
26
-
27
- ### Chips and Flags
28
-
29
- - [sd-chip](./?path=/docs/styles-sd-chip--docs) and sd-flag can be used for similar purposes. Use them consistently throughout your product and, if both are needed, be sure to define which categories each should be used for (e.g. a chip on an article teaser informs about its subject, the flag about the type of article).
30
-
31
- ### Chips and Tags
32
-
33
- - Use only as a non-interactive element; for interactive elements (e.g., a dynamic filter), use [sd-tag](./?path=/docs/styles-sd-tag--docs) instead.
34
-
35
- ### Accessibility
36
-
37
- - Present flags as static labels (no focus or click behavior) to ensure screen readers don’t treat them as actionable elements.
38
- - If the flag conveys crucial information (e.g., “Expired”), include that text in the accessible name or description for the surrounding context.
39
-
40
- ### Related Templates
41
-
42
- - flag--docs
43
- - teaser--docs
44
-
45
- Use the templates tool (with `template` arg) to retrieve the full code for any of these templates.
@@ -1,40 +0,0 @@
1
- <sd-notification variant="info" open class="only-theme-kid mb-4">Add "shadow-sm" manually with css property box-shadow.</sd-notification>
2
- /
3
- export default {
4
- title: 'Styles/sd-flag',
5
- tags: ['!dev', 'autodocs'],
6
- component: 'sd-flag',
7
- parameters: {
8
- ...parameters,
9
- design: {
10
- type: 'figma',
11
- url: 'https://www.figma.com/design/YDktJcseQIIQbsuCpoKS4V/Component-Docs?node-id=2106-34451&t=ohgrgpEVGgKzqMzU-4'
12
- }
13
- },
14
- args: overrideArgs([{ type: 'slot', name: 'default', value: 'Flag' }]),
15
- argTypes
16
- };
17
- export const Default = {
18
- render: (args: any) => {
19
- return generateTemplate({
20
- options: { templateContent: '<span class="%CLASSES%">%SLOT%</span>' },
21
- args
22
- });
23
- }
24
- };
25
- /**
26
- Use the `sd-flag--*` classes for alternative appearances:
27
-
28
- - neutral-200 is the default appearance
29
- - `sd-flag--neutral-300`
30
- - `sd-flag--neutral-500`
31
- - `sd-flag--white`
32
-
33
- ```html
34
- <div class="flex gap-4 bg-neutral-100 p-8">
35
- <div class="sd-flag">Default</div>
36
- <div class="sd-flag sd-flag--neutral-300">Neutral 300</div>
37
- <div class="sd-flag sd-flag--neutral-500">Neutral 500</div>
38
- <div class="sd-flag sd-flag--white">White</div>
39
- </div>
40
- ```
@@ -1,38 +0,0 @@
1
- ---
2
- name: flag
3
- title: Flag
4
- components:
5
- - sd-flag
6
- - sd-flag--neutral-200
7
- - sd-flag--neutral-300
8
- - sd-flag--neutral-500
9
- - sd-flag--white
10
- version: 1.0.0
11
- ---
12
-
13
- ## Template: Background Options
14
-
15
- ```html
16
- <div class="grid grid-cols-2 grid-rows-3">
17
- <div class="bg-white pt-[32px] flex justify-end border border-neutral-200">
18
- <div class="sd-flag sd-flag--neutral-200">neutral-200</div>
19
- </div>
20
- <div class="bg-neutral-100 pt-[32px] flex justify-end">
21
- <div class=" sd-flag sd-flag--neutral-300">neutral-300</div>
22
- </div>
23
- <div class="bg-primary-100 pt-[32px] flex justify-end">
24
- <div class="sd-flag sd-flag--neutral-500">neutral-500</div>
25
- </div>
26
- <div class="bg-primary pt-[32px] flex justify-end">
27
- <div class="sd-flag sd-flag--white">white</div>
28
- </div>
29
- <div slot="media" class="relative">
30
- <img
31
- class="aspect-video object-cover"
32
- src="./placeholders/images/coffeeshop.jpg"
33
- alt="A group of people sitting in a coffee shop"
34
- />
35
- <div class="absolute top-[32px] right-0 sd-flag sd-flag--white">white</div>
36
- </div>
37
- </div>
38
- ```