@solid-design-system/mcp 7.0.0-next.2 → 7.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/metadata/packages/components/docs/usage.md +4 -4
- package/metadata/packages/components/sd-brandshape/info.md +1 -1
- package/metadata/packages/components/sd-input/info.md +5 -4
- package/metadata/packages/components/sd-popup/info.md +1 -1
- package/metadata/packages/components/sd-range/info.md +1 -1
- package/metadata/packages/components/sd-teaser/info.md +1 -1
- package/metadata/packages/components/sd-teaser-media/info.md +1 -1
- package/metadata/packages/components/sd-textarea/info.md +3 -3
- package/metadata/packages/components/sd-tooltip/info.md +1 -1
- package/metadata/packages/icons/default/system.json +28 -28
- package/metadata/packages/templates/table.md +14 -12
- package/package.json +4 -4
- package/metadata/packages/components/sd-spinner/info.md +0 -53
- package/metadata/packages/components/sd-spinner/stories/size.md +0 -15
- package/metadata/packages/components/sd-spinner/stories/variants.md +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 7.0.0-next.4
|
|
4
|
+
|
|
5
|
+
## 7.0.0-next.3
|
|
6
|
+
|
|
3
7
|
## 7.0.0-next.2
|
|
4
8
|
|
|
9
|
+
## 6.29.0
|
|
10
|
+
|
|
11
|
+
## 6.28.2
|
|
12
|
+
|
|
5
13
|
### Patch Changes
|
|
6
14
|
|
|
7
15
|
- Updated dependencies. See details in the Pull Request _[`#3163`](https://github.com/solid-design-system/solid/pull/3163) [`91ff1c8`](https://github.com/solid-design-system/solid/commit/91ff1c81831fb3522c534306a61b8a5be3562f64) [@rahulsuvarna18](https://github.com/rahulsuvarna18)_
|
|
@@ -94,10 +94,10 @@ Custom elements cannot have self-closing tags. Similar to `<script>` and `<texta
|
|
|
94
94
|
|
|
95
95
|
```html
|
|
96
96
|
<!-- Don't do this -->
|
|
97
|
-
<sd-
|
|
97
|
+
<sd-button />
|
|
98
98
|
|
|
99
99
|
<!-- Always do this -->
|
|
100
|
-
<sd-
|
|
100
|
+
<sd-button></sd-button>
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
### Differences from Native Elements
|
|
@@ -142,10 +142,10 @@ A way to use this method is to hide the `<body>` with `opacity: 0` and add a cla
|
|
|
142
142
|
await Promise.allSettled([
|
|
143
143
|
customElements.whenDefined('sd-button'),
|
|
144
144
|
customElements.whenDefined('sd-icon'),
|
|
145
|
-
customElements.whenDefined('sd-
|
|
145
|
+
customElements.whenDefined('sd-loader')
|
|
146
146
|
]);
|
|
147
147
|
|
|
148
|
-
// Button, icon and
|
|
148
|
+
// Button, icon and loader are registered now! Add
|
|
149
149
|
// the `ready` class so the UI fades in.
|
|
150
150
|
document.body.classList.add('ready');
|
|
151
151
|
</script>
|
|
@@ -15,7 +15,7 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
15
15
|
|
|
16
16
|
### Key Properties
|
|
17
17
|
|
|
18
|
-
- prop.variant:
|
|
18
|
+
- prop.variant: 'neutral-100'|'primary'|'white'|'border-primary'|'border-white'|'primary|80'|'white|80'|'image', default='primary' — The brandshape's theme variant.
|
|
19
19
|
- prop.shapes: ('top'|'middle'|'bottom')[], default=['top', 'middle', 'bottom'] — Defines which shapes of the brandshape should be displayed.
|
|
20
20
|
- prop.dir: 'ltr'|'rtl'|'auto' — The element's directionality.
|
|
21
21
|
- prop.lang: string — The element's language.
|
|
@@ -33,10 +33,10 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
33
33
|
|
|
34
34
|
### Key Properties
|
|
35
35
|
|
|
36
|
-
- prop.type:
|
|
36
|
+
- prop.type: 'date'|'datetime-local'|'email'|'number'|'password'|'search'|'tel'|'text'|'time'|'url', default='text' — The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults
|
|
37
37
|
to `text`.
|
|
38
38
|
- prop.size: 'lg'|'md'|'sm', default='lg' — The input's size.
|
|
39
|
-
- prop.inputmode:
|
|
39
|
+
- prop.inputmode: 'none'|'text'|'decimal'|'numeric'|'tel'|'search'|'email'|'url' — Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
|
|
40
40
|
keyboard on supportive devices.
|
|
41
41
|
- prop.value: string, default='' — The current value of the input, submitted as a name/value pair with form data.
|
|
42
42
|
- prop.defaultValue: string, default='' — The default value of the form control. Primarily used for resetting the form control.
|
|
@@ -64,11 +64,12 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
64
64
|
- prop.pattern: string — A regular expression pattern to validate input against.
|
|
65
65
|
- prop.step: number|'any' — Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is
|
|
66
66
|
implied, allowing any numeric value. Only applies to date and number input types.
|
|
67
|
-
- prop.autocapitalize:
|
|
67
|
+
- prop.autocapitalize: 'off'|'none'|'on'|'sentences'|'words'|'characters' — Controls whether and how text input is automatically capitalized as it is entered by the user.
|
|
68
|
+
- prop.autocorrect: boolean — Indicates whether the browser's autocorrect feature is on or off.
|
|
68
69
|
- prop.autocomplete: string — Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
|
|
69
70
|
[this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
|
|
70
71
|
- prop.autofocus: boolean — Indicates that the input should receive focus on page load.
|
|
71
|
-
- prop.enterkeyhint:
|
|
72
|
+
- prop.enterkeyhint: 'enter'|'done'|'go'|'next'|'previous'|'search'|'send' — Used to customize the label or icon of the Enter key on virtual keyboards.
|
|
72
73
|
- prop.styleOnValid [attr: style-on-valid]: boolean, default=false — Shows success styles if the validity of the input is valid.
|
|
73
74
|
- prop.spellcheck: boolean, default=true — Enables spell checking on the input.
|
|
74
75
|
- prop.valueAsDate: — Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- prop.arrow: boolean, default=false — Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and
|
|
20
20
|
`--arrow-color` custom properties. For additional customizations, you can also target the arrow using
|
|
21
21
|
`::part(arrow)` in your stylesheet.
|
|
22
|
-
- prop.arrowPlacement [attr: arrow-placement]:
|
|
22
|
+
- prop.arrowPlacement [attr: arrow-placement]: 'start'|'end'|'center'|'anchor', default='anchor' — The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the
|
|
23
23
|
anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will
|
|
24
24
|
align the arrow to the start, end, or center of the popover instead.
|
|
25
25
|
- prop.arrowPadding [attr: arrow-padding]: number, default=10 — The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,
|
|
@@ -24,7 +24,7 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
24
24
|
- prop.disabled: boolean, default=false — Disables the range.
|
|
25
25
|
- prop.visuallyDisabled [attr: visually-disabled]: boolean, default=false — Disables the range visually.
|
|
26
26
|
- prop.noTrackBar [attr: no-track-bar]: boolean, default=false — Disables the active track bar.
|
|
27
|
-
- prop.tooltip:
|
|
27
|
+
- prop.tooltip: 'on-interaction'|'hidden'|'always-visible', default='on-interaction' — Defines the thumbs tooltip behaviour.
|
|
28
28
|
- prop.defaultValue: string, default='' — The default value of the form control. Primarily used for resetting the form control.
|
|
29
29
|
- prop.value: — The current values of the input (in ascending order) as a string of space separated values
|
|
30
30
|
- prop.valueAsArray: — Gets or sets the current values of the range as an array of numbers
|
|
@@ -19,7 +19,7 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
19
19
|
|
|
20
20
|
### Key Properties
|
|
21
21
|
|
|
22
|
-
- prop.variant:
|
|
22
|
+
- prop.variant: 'white'|'white border-neutral-400'|'neutral-100'|'primary'|'primary-100', default='white' — Variant of the teaser
|
|
23
23
|
- prop.breakpoint: number, default=448 — Breakpoint where the teaser switches from `vertical` to `horizontal`. `0` is always `horizontal`, `9999` is always `vertical`.
|
|
24
24
|
- prop.inset: boolean, default=false — The teaser's inner padding. This is always set in `white border-neutral-400`.
|
|
25
25
|
- prop.reversedLayout [attr: reversed-layout]: boolean, default=false — Reverses the layout in horizontal variant
|
|
@@ -15,7 +15,7 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
15
15
|
|
|
16
16
|
### Key Properties
|
|
17
17
|
|
|
18
|
-
- prop.variant:
|
|
18
|
+
- prop.variant: 'white'|'neutral-100'|'primary'|'primary-100'|'gradient-light'|'gradient-dark', default='white' — Variant of the teaser
|
|
19
19
|
- prop.open: boolean, default=false — Controls whether the expandable content is visible
|
|
20
20
|
- prop.dir: 'ltr'|'rtl'|'auto' — The element's directionality.
|
|
21
21
|
- prop.lang: string — The element's language.
|
|
@@ -43,12 +43,12 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
43
43
|
- prop.floatingLabel [attr: floating-label]: boolean, default=false — Enables the floating label behavior for the input.
|
|
44
44
|
- prop.minlength: number — The minimum length of input that will be considered valid.
|
|
45
45
|
- prop.maxlength: number — The maximum length of input that will be considered valid.
|
|
46
|
-
- prop.autocapitalize:
|
|
47
|
-
- prop.autocorrect:
|
|
46
|
+
- prop.autocapitalize: 'off'|'none'|'on'|'sentences'|'words'|'characters' — Controls whether and how text input is automatically capitalized as it is entered by the user.
|
|
47
|
+
- prop.autocorrect: boolean — Indicates whether the browser's autocorrect feature is on or off.
|
|
48
48
|
- prop.autocomplete: string — Specifies what permission the browser has to provide assistance in filling out form field values. Refer to
|
|
49
49
|
[this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
|
|
50
50
|
- prop.autofocus: boolean — Indicates that the input should receive focus on page load.
|
|
51
|
-
- prop.enterkeyhint:
|
|
51
|
+
- prop.enterkeyhint: 'enter'|'done'|'go'|'next'|'previous'|'search'|'send' — Used to customize the label or icon of the Enter key on virtual keyboards.
|
|
52
52
|
- prop.styleOnValid [attr: style-on-valid]: boolean, default=false — Shows success styles if the validity of the input is valid.
|
|
53
53
|
- prop.spellcheck: boolean, default=true — Enables spell checking on the textarea.
|
|
54
54
|
- prop.inputmode: 'none'|'text' — Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
|
|
@@ -20,7 +20,7 @@ Use the components tool by passing the args `component` and `example` for any of
|
|
|
20
20
|
|
|
21
21
|
- prop.size: 'lg'|'sm', default='lg' — Sets the size of the default trigger icon.
|
|
22
22
|
- prop.content: string, default='' — The tooltip's content. If you need to display HTML, use the `content` slot instead.
|
|
23
|
-
- prop.placement:
|
|
23
|
+
- prop.placement: 'top'|'top-start'|'top-end'|'bottom'|'bottom-start'|'bottom-end', default='top' — The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
|
|
24
24
|
inside of the viewport.
|
|
25
25
|
- prop.disabled: boolean, default=false — Disables the tooltip so it won't show when triggered.
|
|
26
26
|
- prop.open: boolean, default=false — Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods.
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"displayNameDe": "Sonne",
|
|
30
30
|
"tags": ["sonnig", "hell", "schönes Wetter"]
|
|
31
31
|
},
|
|
32
|
-
{
|
|
33
|
-
"technicalId": "settings",
|
|
34
|
-
"displayNameDe": "Einstellungen",
|
|
35
|
-
"tags": ["anpassen", "Bearbeitung", "Zahnrad"]
|
|
36
|
-
},
|
|
37
32
|
{
|
|
38
33
|
"technicalId": "volume",
|
|
39
34
|
"displayNameDe": "Lautstärke",
|
|
40
35
|
"tags": ["Ton", "Pegel", "Geräuschpegel"]
|
|
41
36
|
},
|
|
37
|
+
{
|
|
38
|
+
"technicalId": "settings",
|
|
39
|
+
"displayNameDe": "Einstellungen",
|
|
40
|
+
"tags": ["anpassen", "Bearbeitung", "Zahnrad"]
|
|
41
|
+
},
|
|
42
42
|
{
|
|
43
43
|
"technicalId": "hand",
|
|
44
44
|
"displayNameDe": "Hand",
|
|
@@ -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": "shopping-cart",
|
|
319
|
-
"displayNameDe": "Einkaufswagen",
|
|
320
|
-
"tags": ["Onlineshop", "Warenkorb", "Erwerb", "Einkauf"]
|
|
321
|
-
},
|
|
322
317
|
{
|
|
323
318
|
"technicalId": "bug",
|
|
324
319
|
"displayNameDe": "Fehler",
|
|
325
320
|
"tags": ["Mangel", "Problem"]
|
|
326
321
|
},
|
|
322
|
+
{
|
|
323
|
+
"technicalId": "shopping-cart",
|
|
324
|
+
"displayNameDe": "Einkaufswagen",
|
|
325
|
+
"tags": ["Onlineshop", "Warenkorb", "Erwerb", "Einkauf"]
|
|
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": "file-read-out",
|
|
619
|
-
"displayNameDe": "Dokument vorlesen",
|
|
620
|
-
"tags": ["vorlesen", "Audio", "Lautstärke"]
|
|
621
|
-
},
|
|
622
617
|
{
|
|
623
618
|
"technicalId": "layers",
|
|
624
619
|
"displayNameDe": "Ebenen",
|
|
625
620
|
"tags": ["gruppieren", "Stapel", "mehrere Folien erzeugen"]
|
|
626
621
|
},
|
|
627
622
|
{
|
|
628
|
-
"technicalId": "file-
|
|
629
|
-
"displayNameDe": "Dokument
|
|
630
|
-
"tags": ["
|
|
623
|
+
"technicalId": "file-read-out",
|
|
624
|
+
"displayNameDe": "Dokument vorlesen",
|
|
625
|
+
"tags": ["vorlesen", "Audio", "Lautstärke"]
|
|
631
626
|
},
|
|
632
627
|
{
|
|
633
628
|
"technicalId": "collapse-left",
|
|
634
629
|
"displayNameDe": "einklappen links",
|
|
635
630
|
"tags": ["komprimieren", "verstecken", "Seitenleiste"]
|
|
636
631
|
},
|
|
632
|
+
{
|
|
633
|
+
"technicalId": "file-wai",
|
|
634
|
+
"displayNameDe": "Dokument wAI",
|
|
635
|
+
"tags": ["Dokument", "Datei", "wAI"]
|
|
636
|
+
},
|
|
637
637
|
{
|
|
638
638
|
"technicalId": "download",
|
|
639
639
|
"displayNameDe": "Download",
|
|
@@ -1084,16 +1084,16 @@
|
|
|
1084
1084
|
"displayNameDe": "Textmarker",
|
|
1085
1085
|
"tags": ["hervorheben", "malen", "farbig", "wichtig"]
|
|
1086
1086
|
},
|
|
1087
|
-
{
|
|
1088
|
-
"technicalId": "e-mail-forward",
|
|
1089
|
-
"displayNameDe": "E-Mail weiterleiten",
|
|
1090
|
-
"tags": ["Pfeil", "weiterleiten", "Brief"]
|
|
1091
|
-
},
|
|
1092
1087
|
{
|
|
1093
1088
|
"technicalId": "arrow-top-left",
|
|
1094
1089
|
"displayNameDe": "Pfeil links oben",
|
|
1095
1090
|
"tags": ["zurück", "oben", "rückwärts"]
|
|
1096
1091
|
},
|
|
1092
|
+
{
|
|
1093
|
+
"technicalId": "e-mail-forward",
|
|
1094
|
+
"displayNameDe": "E-Mail weiterleiten",
|
|
1095
|
+
"tags": ["Pfeil", "weiterleiten", "Brief"]
|
|
1096
|
+
},
|
|
1097
1097
|
{
|
|
1098
1098
|
"technicalId": "external-link",
|
|
1099
1099
|
"displayNameDe": "externer Link",
|
|
@@ -835,18 +835,20 @@ version: 1.0.0
|
|
|
835
835
|
sortData[columnIndex] === 'none' || !header.sortable ? undefined : 'ascending'
|
|
836
836
|
)}
|
|
837
837
|
>
|
|
838
|
-
${
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
838
|
+
${
|
|
839
|
+
header.sortable
|
|
840
|
+
? html` <button
|
|
841
|
+
class="sd-interactive flex items-center gap-1"
|
|
842
|
+
@click="${() => sortTable(columnIndex)}"
|
|
843
|
+
>
|
|
844
|
+
${header.label}<sd-icon
|
|
845
|
+
id="sortIcon-${columnIndex}"
|
|
846
|
+
name=${sortData[columnIndex] === 'none' ? 'system/sort-down' : 'system/sort-down-filled'}
|
|
847
|
+
class="text-[12px]"
|
|
848
|
+
></sd-icon>
|
|
849
|
+
</button>`
|
|
850
|
+
: header.label
|
|
851
|
+
}
|
|
850
852
|
</th>`;
|
|
851
853
|
})}
|
|
852
854
|
</tr>`;
|
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.
|
|
24
|
-
"@solid-design-system/styles": "7.0.0-next.
|
|
25
|
-
"@solid-design-system/tokens": "7.0.0-next.
|
|
23
|
+
"@solid-design-system/components": "7.0.0-next.4",
|
|
24
|
+
"@solid-design-system/styles": "7.0.0-next.4",
|
|
25
|
+
"@solid-design-system/tokens": "7.0.0-next.4"
|
|
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.
|
|
62
|
+
"version": "7.0.0-next.4",
|
|
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,53 +0,0 @@
|
|
|
1
|
-
## Overview
|
|
2
|
-
|
|
3
|
-
`<sd-spinner>` — Used as a visual indicator with a looping animation that shows loading is in process.
|
|
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-spinner, example: variants
|
|
12
|
-
- component: sd-spinner, example: size
|
|
13
|
-
|
|
14
|
-
### Key Properties
|
|
15
|
-
|
|
16
|
-
- prop.color: 'primary'|'white'|'currentColor', default='currentColor' — The color color of the spinner.
|
|
17
|
-
- prop.dir: 'ltr'|'rtl'|'auto' — The element's directionality.
|
|
18
|
-
- prop.lang: string — The element's language.
|
|
19
|
-
|
|
20
|
-
## Guidelines
|
|
21
|
-
|
|
22
|
-
### Use Cases
|
|
23
|
-
|
|
24
|
-
- Indicate that content is being loaded, such as when fetching data from a server or loading a new page.
|
|
25
|
-
- Show ongoing background processes, like file uploads or data processing tasks.
|
|
26
|
-
- Used within buttons or interactive elements to indicate that an action is being processed.
|
|
27
|
-
- Apply to sections of a page that are loading independently, such as widgets or panels.
|
|
28
|
-
- Display when a form is being submitted to show that the submission is in progress.
|
|
29
|
-
|
|
30
|
-
### Rules
|
|
31
|
-
|
|
32
|
-
### Content
|
|
33
|
-
|
|
34
|
-
- Include a label or message to provide context about what is being loaded, especially if the loading time is long.
|
|
35
|
-
|
|
36
|
-
### Behavior and Placement
|
|
37
|
-
|
|
38
|
-
- Use for processes that take a short amount of time (typically under 4 seconds).
|
|
39
|
-
- Apply within specific sections rather than blocking the entire page, unless absolutely necessary.
|
|
40
|
-
- Place in a consistent location relative to the content it is loading.
|
|
41
|
-
|
|
42
|
-
### Styling
|
|
43
|
-
|
|
44
|
-
- Maintain consistency in size and style; avoid using spinners of varying sizes on the same page.
|
|
45
|
-
|
|
46
|
-
### Background
|
|
47
|
-
|
|
48
|
-
- Use light background options like white, neutral-100, primary-100, or use a primary background when inverted.
|
|
49
|
-
|
|
50
|
-
### Accessibility
|
|
51
|
-
|
|
52
|
-
- Assign role="status" or use a live region (e.g., aria-live="polite") to inform screen reader users of ongoing loading.
|
|
53
|
-
- A spinner shouldn’t itself be focusable or interactive, nor prevent from navigating to other parts of the page while loading continues.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Use the CSS property `font-size` to scale the spinner proportionally.
|
|
2
|
-
|
|
3
|
-
```html
|
|
4
|
-
<div class="flex flex-row gap-12">
|
|
5
|
-
<div style="font-size: inherit">
|
|
6
|
-
<sd-spinner color="primary"></sd-spinner>
|
|
7
|
-
</div>
|
|
8
|
-
<div style="font-size: 2rem">
|
|
9
|
-
<sd-spinner color="primary"></sd-spinner>
|
|
10
|
-
</div>
|
|
11
|
-
<div style="font-size: 4rem">
|
|
12
|
-
<sd-spinner color="primary"></sd-spinner>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
```
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<sd-notification variant="warning" open class="mb-4">**Warning:** The `sd-spinner` will be deprecated in the future. Please use the `sd-loader` component instead.</sd-notification>
|
|
2
|
-
**Known browser issues:**
|
|
3
|
-
|
|
4
|
-
- The 'sd-spinner' component may experience spinner animation issues in Safari, causing them to appear wobbly.
|
|
5
|
-
/
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Components/sd-spinner',
|
|
8
|
-
component: 'sd-spinner',
|
|
9
|
-
tags: ['!dev', 'autodocs'],
|
|
10
|
-
args: overrideArgs({ type: 'attribute', name: 'color', value: 'primary' }),
|
|
11
|
-
argTypes,
|
|
12
|
-
parameters: {
|
|
13
|
-
...parameters,
|
|
14
|
-
design: {
|
|
15
|
-
type: 'figma',
|
|
16
|
-
url: 'https://www.figma.com/design/YDktJcseQIIQbsuCpoKS4V/Component-Docs?node-id=2115-17681&node-type=section&t=5PpAC3TA3kYF7ufX-0'
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
export const Default = {
|
|
21
|
-
render: (args: any) => {
|
|
22
|
-
return generateTemplate({ args });
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
Use the `color` attribute to set the spinner's color:
|
|
27
|
-
- `currentColor` (default): used to inherit the `text-color` from the parent element
|
|
28
|
-
- `primary`: used on light backgrounds
|
|
29
|
-
- `white`: used on primary backgrounds
|
|
30
|
-
|
|
31
|
-
```html
|
|
32
|
-
<div class="flex flex-row items-center gap-12">
|
|
33
|
-
<div class="p-4">
|
|
34
|
-
<sd-spinner color="currentColor"></sd-spinner>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="p-4">
|
|
37
|
-
<sd-spinner color="primary"></sd-spinner>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="bg-primary p-4">
|
|
40
|
-
<sd-spinner color="white"></sd-spinner>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
```
|