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

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 (34) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/metadata/packages/components/docs/installation.md +9 -117
  3. package/metadata/packages/components/sd-file-selector/info.md +139 -0
  4. package/metadata/packages/components/sd-file-selector/stories/directory.md +6 -0
  5. package/metadata/packages/components/sd-file-selector/stories/disabled.md +5 -0
  6. package/metadata/packages/components/sd-file-selector/stories/help-text.md +19 -0
  7. package/metadata/packages/components/sd-file-selector/stories/hide-value.md +5 -0
  8. package/metadata/packages/components/sd-file-selector/stories/invalid.md +14 -0
  9. package/metadata/packages/components/sd-file-selector/stories/label.md +13 -0
  10. package/metadata/packages/components/sd-file-selector/stories/multiple-files.md +5 -0
  11. package/metadata/packages/components/sd-file-selector/stories/required.md +6 -0
  12. package/metadata/packages/components/sd-file-selector/stories/sizes.md +14 -0
  13. package/metadata/packages/components/sd-file-selector/stories/variant.md +8 -0
  14. package/metadata/packages/components/sd-file-selector/stories/visually-disabled.md +9 -0
  15. package/metadata/packages/components/sd-icon/stories/custom-libraries.md +1 -1
  16. package/metadata/packages/components/sd-tag/info.md +1 -1
  17. package/metadata/packages/icons/default/system.json +23 -23
  18. package/metadata/packages/quickstart/docs/quickstart.md +9 -27
  19. package/metadata/packages/styles/docs/installation.md +8 -56
  20. package/metadata/packages/styles/sd-chip/info.md +12 -8
  21. package/metadata/packages/styles/sd-chip/stories/{variants.md → color.md} +8 -10
  22. package/metadata/packages/styles/sd-chip/stories/outlined.md +8 -0
  23. package/metadata/packages/styles/sd-chip/stories/shade.md +17 -0
  24. package/metadata/packages/styles/sd-chip/stories/sharp.md +8 -0
  25. package/metadata/packages/styles/sd-chip/stories/size.md +8 -0
  26. package/metadata/packages/templates/status-badge.md +3 -3
  27. package/metadata/packages/templates/teaser.md +20 -14
  28. package/metadata/packages/tokens/docs/installation.md +2 -23
  29. package/metadata/packages/tokens/docs/usage.md +3 -27
  30. package/metadata/packages/tokens/tokens.json +4 -0
  31. package/package.json +4 -4
  32. package/metadata/packages/styles/sd-flag/info.md +0 -45
  33. package/metadata/packages/styles/sd-flag/stories/variants.md +0 -40
  34. package/metadata/packages/templates/flag.md +0 -38
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.0-next.9
4
+
5
+ ## 7.0.0-next.8
6
+
7
+ ### Major Changes
8
+
9
+ - 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)_
10
+
11
+ - Removed the `sd-flag` style.
12
+ - 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.
13
+
3
14
  ## 7.0.0-next.7
4
15
 
5
16
  ## 7.0.0-next.6
@@ -12,6 +23,14 @@
12
23
 
13
24
  ## 7.0.0-next.2
14
25
 
26
+ ## 6.30.0
27
+
28
+ ### Minor Changes
29
+
30
+ - 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)_
31
+
32
+ ## 6.29.1
33
+
15
34
  ## 6.29.0
16
35
 
17
36
  ## 6.28.2
@@ -1,8 +1,8 @@
1
1
  # Installation
2
2
 
3
- You can load Solid Components via CDN or by installing it locally.
3
+ Solid Components is installed via npm. For environments without a bundler, see [CDN Hosting](?path=/docs/docs-general-cdn-hosting--docs).
4
4
 
5
- <sd-notification type="info" open id="versioning-info">
5
+ <sd-notification variant="info" open id="versioning-info">
6
6
  The `components`, `styles`, and `tokens` packages now always share the same version. We use fixed versioning to keep
7
7
  them fully in sync, so every release updates all three packages, even if only one of them changed. Make sure to
8
8
  install or update them using the same version number.
@@ -40,98 +40,9 @@ Keep the following in mind for nested components:
40
40
  - _Slotted components_, which are added by your app or website, are not automatically versioned. You need to version them yourself if necessary.
41
41
  - _Nested components_, which are generated by the component itself, are automatically versioned (e.g., `sd-%DASHED-COMPONENTS-VERSION%-button` will generate an `sd-%DASHED-COMPONENTS-VERSION%-spinner` when in the loading state).
42
42
 
43
- ## CDN Installation
43
+ ## Installation
44
44
 
45
- ### Bundle
46
-
47
- The bundle registers all Solid Components in a single file. If you're using many Solid Components, this is the most performant way to load and hydrate them. Still, you should ensure that other applications are not loading components with the same tag names via an additional CDN or npm package. This therefore makes most sense in e. g. a CMS context.
48
- You can use the following script tag to load all components:
49
-
50
- <sd-tab-group>
51
- {/* prettier-ignore */}
52
- <sd-tab slot="nav" panel="unversioned"> Unversioned </sd-tab>
53
- {/* prettier-ignore */}
54
- <sd-tab slot="nav" panel="versioned"> Versioned </sd-tab>
55
- <sd-tab-panel name="unversioned">
56
- ```html
57
- <link
58
- rel="stylesheet"
59
- href="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.css"
60
- />
61
- <link
62
- rel="stylesheet"
63
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
64
- />
65
- <script
66
- type="module"
67
- src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.bundle.js"
68
- ></script>
69
- ```
70
- </sd-tab-panel>
71
- <sd-tab-panel name="versioned">
72
- ```html
73
- <link
74
- rel="stylesheet"
75
- href="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn-versioned/solid-components.css"
76
- />
77
- <link
78
- rel="stylesheet"
79
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
80
- />
81
- <script
82
- type="module"
83
- src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn-versioned/solid-components.bundle.js"
84
- ></script>
85
- ```
86
- </sd-tab-panel>
87
- </sd-tab-group>
88
-
89
- ### ESM
90
-
91
- The CDN loader registers all Solid elements up front. Note that, if you're only using a handful of components, it could be more efficient [cherry pick](#cherry-picking) components if you want to load specific ones up front.
92
-
93
- <sd-tab-group>
94
- {/* prettier-ignore */}
95
- <sd-tab slot="nav" panel="unversioned">Unversioned</sd-tab>
96
- {/* prettier-ignore */}
97
- <sd-tab slot="nav" panel="versioned">Versioned</sd-tab>
98
- <sd-tab-panel name="unversioned">
99
- ```html
100
- <link
101
- rel="stylesheet"
102
- href="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.css"
103
- />
104
- <link
105
- rel="stylesheet"
106
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
107
- />
108
- <script
109
- type="module"
110
- src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.js"
111
- ></script>
112
- ```
113
- </sd-tab-panel>
114
- <sd-tab-panel name="versioned">
115
- ```html
116
- <link
117
- rel="stylesheet"
118
- href="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn-versioned/solid-components.css"
119
- />
120
- <link
121
- rel="stylesheet"
122
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
123
- />
124
- <script
125
- type="module"
126
- src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn-versioned/solid-components.js"
127
- ></script>
128
- ```
129
- </sd-tab-panel>
130
- </sd-tab-group>
131
-
132
- ## npm installation
133
-
134
- If you don't want to use the CDN, you can install Solid Components from npm with the following command.
45
+ Install Solid Components from npm:
135
46
 
136
47
  ```bash
137
48
  npm install @solid-design-system/components @solid-design-system/tokens
@@ -166,7 +77,7 @@ Alternatively, [you can use a bundler](#bundling).
166
77
 
167
78
  ## Cherry Picking
168
79
 
169
- Cherry picking can be done from [the CDN](#cdn-installation) or from [npm](#npm-installation). This approach will load only the components you need up front, while limiting the number of files the browser has to download. The disadvantage is that you need to import each individual component.
80
+ Cherry picking loads only the components you need up front, limiting the number of files the browser has to download. The disadvantage is that you need to import each individual component.
170
81
 
171
82
  Here's an example that loads only the button component. Again, if you're not using a module resolver, you'll need to adjust the path to point to the folder Solid is in.
172
83
 
@@ -209,7 +120,7 @@ You can copy and paste the code to import a component from the "Importing" secti
209
120
 
210
121
  ## Bundling
211
122
 
212
- Solid Components are distributed as a collection of standard ES modules that [all modern browsers can understand](https://caniuse.com/es6-module). However, importing a lot of modules can result in a lot of HTTP requests and potentially longer load times. Using a CDN can alleviate this, but some users may wish to further optimize their imports with a bundler.
123
+ Solid Components are distributed as a collection of standard ES modules that [all modern browsers can understand](https://caniuse.com/es6-module). However, importing a lot of modules can result in a lot of HTTP requests and potentially longer load times. You can optimize your imports with a bundler.
213
124
 
214
125
  To use Solid with a bundler, first install Solid along with your bundler of choice.
215
126
 
@@ -245,27 +156,8 @@ Once your bundler is configured, you'll be able to import Solid components and u
245
156
 
246
157
  > Component modules include side effects for registration purposes. Because of this, importing directly from `@solid-design-system/components` may result in a larger bundle size than necessary. For optimal tree shaking, always cherry pick, i.e. import components and utilities from their respective files, as shown above.
247
158
 
248
- ## The difference between CDN and npm
159
+ ## cdn/ vs dist/
249
160
 
250
- CDN links all start with `/cdn/<path>` and npm imports use `/dist/<path>`. The `/cdn` files are bundled separately from the `/dist` files. The `/cdn` files come pre-bundled, which means all dependencies are inlined so you do not need to worry about loading additional libraries. The `/dist` files **DO NOT** come pre-bundled, allowing your bundler of choice to more efficiently deduplicate dependencies, resulting in smaller bundles and optimal code sharing.
161
+ The package ships both `cdn/` and `dist/` artifacts. The `/cdn` files are pre-bundled with all dependencies inlined. The `/dist` files are not pre-bundled, allowing your bundler to deduplicate shared dependencies for a smaller total bundle.
251
162
 
252
- TL;DR:
253
-
254
- <sd-tab-group>
255
- {/* prettier-ignore */}
256
- <sd-tab slot="nav" panel="unversioned">Unversioned</sd-tab>
257
- {/* prettier-ignore */}
258
- <sd-tab slot="nav" panel="versioned">Versioned</sd-tab>
259
- <sd-tab-panel name="unversioned">
260
-
261
- - `@solid-design-system/components/cdn` is for CDN users
262
- - `@solid-design-system/components/dist` is for npm users
263
-
264
- </sd-tab-panel>
265
- <sd-tab-panel name="versioned">
266
-
267
- - `@solid-design-system/components/cdn-versioned` is for CDN users
268
- - `@solid-design-system/components/dist-versioned` is for npm users
269
-
270
- </sd-tab-panel>
271
- </sd-tab-group>
163
+ Use `/dist` with a bundler (recommended). Use `/cdn` only when hosting on your own CDN without build tooling — see [CDN Hosting](?path=/docs/general-cdn-hosting--docs).
@@ -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
+ ```
@@ -16,7 +16,7 @@ Here's an example that registers an icon library located in the `/assets/icons`
16
16
  If you use the IIFE bundle, you have to access the `registerIconLibrary()` function from the `SolidComponents` global.
17
17
 
18
18
  ```html
19
- <script src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.iife.js"></script>
19
+ <script src="https://your-cdn.example.com/components/%COMPONENTS-VERSION%/cdn/solid-components.iife.js"></script>
20
20
  <script>
21
21
  const { registerIconLibrary } = window['SolidComponents'];
22
22
  registerIconLibrary('my-icons', {
@@ -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",
@@ -6,33 +6,15 @@ To develop with Solid Design System, you need the following three packages:
6
6
  - `@solid-design-system/styles`: Smaller components built with CSS.
7
7
  - `@solid-design-system/tokens`: Tokens and themes for consistent design.
8
8
 
9
- <sd-tab-group>
10
- {/* prettier-ignore */}
11
- <sd-tab slot="nav" panel="npm" variant="container"> NPM </sd-tab>
12
- {/* prettier-ignore */}
13
- <sd-tab slot="nav" panel="cdn" variant="container"> CDN </sd-tab>
14
- <sd-tab-panel name="npm">
15
- ```bash
16
- pnpm i @solid-design-system/components @solid-design-system/styles @solid-design-system/tokens
17
- ```
18
-
19
- ```js
20
- import '@solid-design-system/tokens/dist/themes/ui-light/ui-light.css';
21
- import '@solid-design-system/styles/dist/solid-styles.css';
22
- import '@solid-design-system/components/dist/solid-components.css';
23
- import '@solid-design-system/components/dist/solid-components.js';
24
- ```
25
-
26
- </sd-tab-panel>
27
- <sd-tab-panel name="cdn">
28
- ```html
29
- <link rel="stylesheet" href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css" />
30
- <link rel="stylesheet" href="https://solid-design-system.fe.union-investment.de/styles/%STYLES-VERSION%/cdn/solid-styles.css" />
31
- <link rel="stylesheet" href="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.css" />
32
- <script type="module" src="https://solid-design-system.fe.union-investment.de/components/%COMPONENTS-VERSION%/cdn/solid-components.js"></script>
33
- ```
34
- </sd-tab-panel>
35
- </sd-tab-group>
9
+ ```bash
10
+ pnpm i @solid-design-system/components @solid-design-system/styles @solid-design-system/tokens
11
+ ```
12
+
13
+ ```js
14
+
15
+ ```
16
+
17
+ For environments without a bundler (e.g. a CMS), see [CDN Hosting](?path=/docs/docs-general-cdn-hosting--docs).
36
18
 
37
19
  Now you are ready to use Solid Design System in your project!
38
20
 
@@ -1,8 +1,8 @@
1
1
  # Installation
2
2
 
3
- You can load Solid via CDN or by installing it locally.
3
+ Solid Styles is installed via npm. For environments without a bundler, see [CDN Hosting](?path=/docs/docs-general-cdn-hosting--docs).
4
4
 
5
- <sd-notification type="info" open id="versioning-info">
5
+ <sd-notification variant="info" open id="versioning-info">
6
6
  The `components`, `styles`, and `tokens` packages now always share the same version. We use fixed versioning to keep
7
7
  them fully in sync, so every release updates all three packages, even if only one of them changed. Make sure to
8
8
  install or update them using the same version number.
@@ -37,38 +37,9 @@ Including version numbers in component names provides more control over updates
37
37
  </sd-tab-panel>
38
38
  </sd-tab-group>
39
39
 
40
- ## CDN Installation
40
+ ## Installation
41
41
 
42
- ### Bundle
43
-
44
- The CDN Bundle registers all Solid elements up front. Note that, if you're only using a handful of components, it could be more efficient [cherry pick](#cherry-picking) components if you want to load specific ones up front.
45
-
46
- <sd-tab-group>
47
- {/* prettier-ignore */}
48
- <sd-tab slot="nav" panel="unversioned">Unversioned</sd-tab>
49
- {/* prettier-ignore */}
50
- <sd-tab slot="nav" panel="versioned">Versioned</sd-tab>
51
- <sd-tab-panel name="unversioned">
52
- ```html
53
- <link
54
- rel="stylesheet"
55
- href="https://solid-design-system.fe.union-investment.de/styles/%STYLES-VERSION%/cdn/solid-styles.css"
56
- />
57
- ```
58
- </sd-tab-panel>
59
- <sd-tab-panel name="versioned">
60
- ```html
61
- <link
62
- rel="stylesheet"
63
- href="https://solid-design-system.fe.union-investment.de/styles/%STYLES-VERSION%/cdn-versioned/solid-styles.css"
64
- />
65
- ```
66
- </sd-tab-panel>
67
- </sd-tab-group>
68
-
69
- ## npm installation
70
-
71
- If you don't want to use the CDN, you can install Solid Styles from npm with the following command.
42
+ Install Solid Styles from npm:
72
43
 
73
44
  ```bash
74
45
  npm install @solid-design-system/styles
@@ -99,7 +70,7 @@ Alternatively, you can use a bundler.
99
70
 
100
71
  ## Cherry Picking
101
72
 
102
- Cherry picking can be done from [the CDN](#cdn-installation) or from [npm](#npm-installation). This approach will load only the styles you need up front, while limiting the number of files the browser has to download. The disadvantage is that you need to import each individual style.
73
+ Cherry picking loads only the styles you need up front, limiting the number of files the browser has to download. The disadvantage is that you need to import each individual style.
103
74
 
104
75
  Here's an example that loads only the mark style that would work in Vite.
105
76
 
@@ -135,27 +106,8 @@ Here's an example that loads only the mark style that would work in Vite.
135
106
 
136
107
  tbd.
137
108
 
138
- ## The difference between CDN and npm
139
-
140
- CDN links all start with `/cdn/<path>` and npm imports use `/dist/<path>`. The `/cdn` files are already minified, while `npm` can be easily patched.
141
-
142
- TL;DR:
143
-
144
- <sd-tab-group>
145
- {/* prettier-ignore */}
146
- <sd-tab slot="nav" panel="unversioned">Unversioned</sd-tab>
147
- {/* prettier-ignore */}
148
- <sd-tab slot="nav" panel="versioned">Versioned</sd-tab>
149
- <sd-tab-panel name="unversioned">
150
-
151
- - `@solid-design-system/styles/cdn` is for CDN users
152
- - `@solid-design-system/styles/dist` is for npm users
153
-
154
- </sd-tab-panel>
155
- <sd-tab-panel name="versioned">
109
+ ## cdn/ vs dist/
156
110
 
157
- - `@solid-design-system/styles/cdn-versioned` is for CDN users
158
- - `@solid-design-system/styles/dist-versioned` is for npm users
111
+ The package ships both `cdn/` and `dist/` artifacts. The `/cdn` files are already minified. The `/dist` files can be more easily patched and are better suited for bundlers.
159
112
 
160
- </sd-tab-panel>
161
- </sd-tab-group>
113
+ Use `/dist` with a bundler (recommended). Use `/cdn` only when hosting on your own CDN without build tooling — see [CDN Hosting](?path=/docs/general-cdn-hosting--docs).
@@ -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>
@@ -2,7 +2,7 @@
2
2
 
3
3
  This page guides you through installing and setting up the `@solid-design-system/tokens` package to use themes and/or design tokens in your project.
4
4
 
5
- <sd-notification type="info" open>
5
+ <sd-notification variant="info" open>
6
6
  The `components`, `styles`, and `tokens` packages always share the same version. We use fixed versioning to keep them
7
7
  fully in sync, so every release updates all three packages, even if only one of them changed. Make sure to install or
8
8
  update them using the same version number.
@@ -23,29 +23,12 @@ npm install @solid-design-system/tokens
23
23
 
24
24
  ## Import a theme
25
25
 
26
- Load at least one theme — either via NPM import or a CDN `<link>` tag. This only needs to be done **once per document**. Every component and embedded consumer on the page will automatically inherit the theme.
26
+ Load at least one theme via NPM import. This only needs to be done **once per document**. Every component and embedded consumer on the page will automatically inherit the theme.
27
27
 
28
- <sd-tab-group>
29
- {/* prettier-ignore */}
30
- <sd-tab slot="nav" panel="npm" variant="container">NPM</sd-tab>
31
- {/* prettier-ignore */}
32
- <sd-tab slot="nav" panel="cdn" variant="container">CDN</sd-tab>
33
- <sd-tab-panel name="npm">
34
28
  ```js
35
- ```
36
29
 
37
- </sd-tab-panel>
38
- <sd-tab-panel name="cdn">
39
- ```html
40
- <link
41
- rel="stylesheet"
42
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
43
- />
44
30
  ```
45
31
 
46
- </sd-tab-panel>
47
- </sd-tab-group>
48
-
49
32
  ## Next steps
50
33
 
51
34
  Depending on the theme, make sure the following page-level concerns are covered.
@@ -416,10 +399,6 @@ Deprecated variables:
416
399
  - `--sd-button--size-md-border-radius` replace with `--sd-button-border-radius`
417
400
  - `--sd-button--size-sm-border-radius` replace with `--sd-button-border-radius`
418
401
  - `--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
402
  - `--sd-form-control-color-icon` replace with `--sd-form-control-color-icon-fill`
424
403
  - `--sd-menu-color-icon` replace with `--sd-menu-item-color-icon-fill`
425
404
  - `--sd-menu-color-text` replace with `--sd-menu-item-color-text`
@@ -16,17 +16,9 @@ This page covers advanced usage patterns for `@solid-design-system/tokens`. Make
16
16
 
17
17
  To automatically respect the user's OS-level preference, use the `prefers-color-scheme` media query on your `<link>` tags:
18
18
 
19
- ```html
20
- <link
21
- rel="stylesheet"
22
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-light/ui-light.css"
23
- media="(prefers-color-scheme: light)"
24
- />
25
- <link
26
- rel="stylesheet"
27
- href="https://solid-design-system.fe.union-investment.de/tokens/%TOKENS-VERSION%/cdn/themes/ui-dark/ui-dark.css"
28
- media="(prefers-color-scheme: dark)"
29
- />
19
+ ```css
20
+ @import '@solid-design-system/tokens/dist/themes/ui-light/ui-light.css' (prefers-color-scheme: light);
21
+ @import '@solid-design-system/tokens/dist/themes/ui-dark/ui-dark.css' (prefers-color-scheme: dark);
30
22
  ```
31
23
 
32
24
  For further information on how to make this more dynamic, check out [this article](https://pepelsbey.dev/articles/native-light-dark/).
@@ -136,22 +128,6 @@ The following CSS variables (tokens) are deprecated and will be removed in a fut
136
128
  <td>`--sd-button--secondary--inverted--color-border`</td>
137
129
  <td>`--sd-button-secondary-inverted-color-border`</td>
138
130
  </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
131
  <tr>
156
132
  <td>`--sd-form-control-color-icon`</td>
157
133
  <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.9",
24
+ "@solid-design-system/styles": "7.0.0-next.9",
25
+ "@solid-design-system/tokens": "7.0.0-next.9"
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.9",
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
- ```