Skip to content

Commit 587333c

Browse files
committed
Feat(web): Stabilization of the EmptyState component #DS-1694
1 parent 5bfeae7 commit 587333c

File tree

10 files changed

+26
-29
lines changed

10 files changed

+26
-29
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@use 'theme' as theme;
33
@use '../../tools/breakpoint';
44

5-
.UNSTABLE_EmptyState {
5+
.EmptyState {
66
display: grid;
77
justify-content: center;
88
padding: theme.$root-padding;
@@ -13,7 +13,7 @@
1313
}
1414
}
1515

16-
.UNSTABLE_EmptyState__section {
16+
.EmptyState__section {
1717
display: grid;
1818
width: 100%;
1919
max-width: 400px;

packages/web/src/scss/components/UNSTABLE_EmptyState/README.md renamed to packages/web/src/scss/components/EmptyState/README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
1-
# UNSTABLE EmptyState
2-
3-
⚠️ This component is UNSTABLE. It may significantly change at any point in the future.
4-
Please use it with caution.
1+
# EmptyState
52

63
EmptyState component should be included at the error pages or empty state pages as the carrier of an information and links to elsewhere.
74

85
EmptyState component is a composition of the following components:
96

10-
- [UNSTABLE_EmptyState](#unstable-emptystate)
11-
- [UNSTABLE_EmptyStateSection](#unstable-emptystatesection)
7+
- [EmptyState](#unstable-emptystate)
8+
- [EmptyStateSection](#unstable-emptystatesection)
129

1310
## Component Composition
1411

15-
### UNSTABLE_EmptyState
12+
### EmptyState
1613

17-
The `UNSTABLE_EmptyState` component is a main container responsible for positioning the [UNSTABLE_EmptyStateSection](#unstable-emptystatesection) components or content.
14+
The `EmptyState` component is a main container responsible for positioning the [EmptyStateSection](#unstable-emptystatesection) components or content.
1815

1916
```html
20-
<div class="Stack Stack--hasSpacing UNSTABLE_EmptyState" style="--stack-spacing: var(--spirit-space-700);">
21-
<!-- UNSTABLE_EmptyStateSection components or content go here -->
17+
<div class="Stack Stack--hasSpacing EmptyState" style="--stack-spacing: var(--spirit-space-700);">
18+
<!-- EmptyStateSection components or content go here -->
2219
</div>
2320
```
2421

2522
This component is based on the [Stack][stack] component and accepts all its variants. For more information about `Stack` usage options, see the [Stack documentation][stack].
2623

27-
### UNSTABLE_EmptyStateSection
24+
### EmptyStateSection
2825

29-
The `UNSTABLE_EmptyStateSection` component is a container for the content of each section.
26+
The `EmptyStateSection` component is a container for the content of each section.
3027

3128
```html
32-
<div class="Stack UNSTABLE_EmptyState__section">
33-
<!-- UNSTABLE_EmptyStateSection content go here -->
29+
<div class="Stack EmptyState__section">
30+
<!-- EmptyStateSection content go here -->
3431
</div>
3532
```
3633

@@ -39,21 +36,21 @@ This component is based on the [Stack][stack] component and accepts all its vari
3936
### Full Example
4037

4138
```html
42-
<div class="Stack Stack--hasSpacing UNSTABLE_EmptyState" style="--stack-spacing: var(--spirit-space-700);">
43-
<div class="Stack UNSTABLE_EmptyState__section">Placeholder</div>
44-
<div class="Stack Stack--hasSpacing UNSTABLE_EmptyState__section" style="--stack-spacing: var(--spirit-space-500);">
39+
<div class="Stack Stack--hasSpacing EmptyState" style="--stack-spacing: var(--spirit-space-700);">
40+
<div class="Stack EmptyState__section">Placeholder</div>
41+
<div class="Stack Stack--hasSpacing EmptyState__section" style="--stack-spacing: var(--spirit-space-500);">
4542
<h2 class="typography-heading-xsmall-bold">Headline</h2>
4643
<p color="secondary" class="typography-body-medium-text-regular">Description</p>
4744
</div>
48-
<div class="Stack UNSTABLE_EmptyState__section">
45+
<div class="Stack EmptyState__section">
4946
<div
5047
class="Flex Flex--noWrap Flex--alignmentXStretch Flex--tablet--alignmentXCenter Flex--alignmentYStretch Flex--vertical Flex--tablet--horizontalReversed"
5148
>
5249
<a href="#" role="button" class="Button Button--primary Button--medium">Action</a>
5350
<a href="#" role="button" class="Button Button--secondary Button--medium">Action</a>
5451
</div>
5552
</div>
56-
<div class="Stack UNSTABLE_EmptyState__section"><a href="#" class="link-primary">Link to something</a></div>
53+
<div class="Stack EmptyState__section"><a href="#" class="link-primary">Link to something</a></div>
5754
</div>
5855
```
5956

packages/web/src/scss/components/UNSTABLE_EmptyState/index.html renamed to packages/web/src/scss/components/EmptyState/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#> web/layout/default title="Empty State" parentPageName="Components" isUnstable=true }}
1+
{{#> web/layout/default title="Empty State" parentPageName="Components" }}
22

33
<section class="py-900 py-tablet-1000">
44

@@ -8,8 +8,8 @@ <h2 class="docs-Heading">Default</h2>
88

99
<div class="docs-Stack docs-Stack--stretch">
1010

11-
<div class="Stack Stack--hasSpacing UNSTABLE_EmptyState" style="--stack-spacing: var(--spirit-space-900);">
12-
<div class="Stack UNSTABLE_EmptyState__section">
11+
<div class="Stack Stack--hasSpacing EmptyState" style="--stack-spacing: var(--spirit-space-900);">
12+
<div class="Stack EmptyState__section">
1313
<div class="docs-Placeholder" style="max-width: 400px">
1414
<svg xmlns="http://www.w3.org/2000/svg" width="82" height="40" viewBox="0 0 82 40" fill="none">
1515
<rect x="1.5" y="0.5" width="79" height="39" stroke="#b9b9b9" stroke-dasharray="4 4"></rect>
@@ -21,20 +21,20 @@ <h2 class="docs-Heading">Default</h2>
2121
<p class="typography-body-small-regular text-secondary">Replace me with your own component</p></div>
2222
</div>
2323
</div>
24-
<div class="Stack Stack--hasSpacing UNSTABLE_EmptyState__section"
24+
<div class="Stack Stack--hasSpacing EmptyState__section"
2525
style="--stack-spacing: var(--spirit-space-600);">
2626
<h2 class="typography-heading-xsmall-bold">Headline</h2>
2727
<p class="typography-body-medium-regular">
2828
In publishing and graphic design, lorem ipsum is common placeholder text used to demonstrate the graphic elements
2929
</p>
3030
</div>
31-
<div class="Stack UNSTABLE_EmptyState__section">
31+
<div class="Stack EmptyState__section">
3232
<div class="Flex Flex--noWrap Flex--alignmentXStretch Flex--tablet--alignmentXCenter Flex--alignmentYStretch Flex--vertical Flex--tablet--horizontalReversed">
3333
<a href="#" role="button" class="Button Button--primary Button--medium">Action</a>
3434
<a href="#" role="button" class="Button Button--secondary Button--medium">Action</a>
3535
</div>
3636
</div>
37-
<div class="Stack UNSTABLE_EmptyState__section"><a href="#" class="link-primary">Link to something</a></div>
37+
<div class="Stack EmptyState__section"><a href="#" class="link-primary">Link to something</a></div>
3838
</div>
3939

4040
</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@forward 'EmptyState';

packages/web/src/scss/components/UNSTABLE_EmptyState/index.scss

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/web/src/scss/components/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@forward 'Divider';
1212
@forward 'Drawer';
1313
@forward 'Dropdown';
14+
@forward 'EmptyState';
1415
@forward 'FieldGroup';
1516
@forward 'FileUploader';
1617
@forward 'Flex';
@@ -37,5 +38,4 @@
3738
@forward 'Toast';
3839
@forward 'Toggle';
3940
@forward 'Tooltip';
40-
@forward 'UNSTABLE_EmptyState';
4141
@forward 'UNSTABLE_Header';
28.9 KB
Loading
1.88 KB
Loading
206 Bytes
Loading

0 commit comments

Comments
 (0)