@momentum-design/components 0.142.6 → 0.143.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ import { CSSResult } from 'lit';
2
+ import { Component } from '../../models';
3
+ import type { EmptyStateHeadingTagName, EmptyStateLayout, EmptyStateSize } from './emptystate.types';
4
+ /**
5
+ * The `mdc-emptystate` gives people context when a view has no content and helps them decide what to do next. It supports views with no content yet, empty collections, and searches or filters that return no results.
6
+ *
7
+ * **When to use**
8
+ *
9
+ * - Use `mdc-emptystate` when a collection is empty and people need context or a next step.
10
+ * - Use `mdc-emptystate` when filters or a search query leave a view without results; explain how to adjust the query or filters when that helps.
11
+ * - Use `mdc-emptystate` for views with no content yet that can guide people toward creating or adding content.
12
+ *
13
+ * **When not to use**
14
+ *
15
+ * - Do not use `mdc-emptystate` to represent content that is still loading. Use `mdc-skeleton` when the content layout is known or `mdc-spinner` when it is not.
16
+ * - Do not use `mdc-emptystate` for a short status beside a control. Use `mdc-statusmessage` instead.
17
+ *
18
+ * @tagname mdc-emptystate
19
+ *
20
+ * @dependency mdc-text
21
+ *
22
+ * @slot illustration - optional illustration / icon
23
+ * @slot heading - optional rich heading content; takes precedence over the heading property
24
+ * @slot actions - optional action buttons
25
+ *
26
+ * @cssproperty --mdc-emptystate-max-width - The maximum width of the empty state content
27
+ * @cssproperty --mdc-emptystate-align-items - Alignment of the empty state content and actions
28
+ * @cssproperty --mdc-emptystate-illustration-size - Size of a slotted illustration
29
+ * @cssproperty --mdc-emptystate-text-align - Text alignment of the heading and description
30
+ *
31
+ * @csspart content - The container for the illustration, text, and actions
32
+ * @csspart text-and-actions - The container for the heading, description, and action controls
33
+ * @csspart text - The container for the heading and description
34
+ */
35
+ declare class EmptyState extends Component {
36
+ /**
37
+ * The layout of the empty state component.
38
+ * Can be 'horizontal' or 'vertical'.
39
+ *
40
+ * @default 'vertical'
41
+ */
42
+ layout: EmptyStateLayout;
43
+ /**
44
+ * The size of the empty state component.
45
+ * Can be 'medium' or 'large'.
46
+ *
47
+ * @default 'medium'
48
+ */
49
+ size: EmptyStateSize;
50
+ /**
51
+ * The heading text. A heading slot takes precedence when consumers need rich
52
+ * heading content.
53
+ * Omit it for search or filter results when it would repeat the description.
54
+ */
55
+ heading?: string;
56
+ /**
57
+ * Required supporting text that explains the empty state and what the user can do next.
58
+ */
59
+ description?: string;
60
+ /**
61
+ * The HTML tag used for a heading rendered from the heading property. Choose a heading level that fits the page structure.
62
+ * Slotted heading content controls its own semantics.
63
+ * Use a non-heading tag when the title should not create a section heading.
64
+ *
65
+ * @default 'h2'
66
+ */
67
+ headingTagName: EmptyStateHeadingTagName;
68
+ /** @internal */
69
+ hasActions: boolean;
70
+ private handleActionsSlotChange;
71
+ render(): import("lit-html").TemplateResult<1>;
72
+ static styles: Array<CSSResult>;
73
+ }
74
+ export default EmptyState;
@@ -0,0 +1,111 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { html, nothing } from 'lit';
11
+ import { property, state } from 'lit/decorators.js';
12
+ import { Component } from '../../models';
13
+ import { DEFAULTS } from './emptystate.constants';
14
+ import styles from './emptystate.styles';
15
+ /**
16
+ * @tagname mdc-emptystate
17
+ *
18
+ * @dependency mdc-text
19
+ *
20
+ * @slot illustration - optional illustration / icon
21
+ * @slot heading - optional rich heading content; takes precedence over the heading property
22
+ * @slot actions - optional action buttons
23
+ *
24
+ * @cssproperty --mdc-emptystate-max-width - The maximum width of the empty state content
25
+ * @cssproperty --mdc-emptystate-align-items - Alignment of the empty state content and actions
26
+ * @cssproperty --mdc-emptystate-illustration-size - Size of a slotted illustration
27
+ * @cssproperty --mdc-emptystate-text-align - Text alignment of the heading and description
28
+ *
29
+ * @csspart content - The container for the illustration, text, and actions
30
+ * @csspart text-and-actions - The container for the heading, description, and action controls
31
+ * @csspart text - The container for the heading and description
32
+ */
33
+ class EmptyState extends Component {
34
+ constructor() {
35
+ super(...arguments);
36
+ /**
37
+ * The layout of the empty state component.
38
+ * Can be 'horizontal' or 'vertical'.
39
+ *
40
+ * @default 'vertical'
41
+ */
42
+ this.layout = DEFAULTS.LAYOUT;
43
+ /**
44
+ * The size of the empty state component.
45
+ * Can be 'medium' or 'large'.
46
+ *
47
+ * @default 'medium'
48
+ */
49
+ this.size = DEFAULTS.SIZE;
50
+ /**
51
+ * The HTML tag used for a heading rendered from the heading property. Choose a heading level that fits the page structure.
52
+ * Slotted heading content controls its own semantics.
53
+ * Use a non-heading tag when the title should not create a section heading.
54
+ *
55
+ * @default 'h2'
56
+ */
57
+ this.headingTagName = DEFAULTS.HEADING_TAG_NAME;
58
+ /** @internal */
59
+ this.hasActions = false;
60
+ }
61
+ handleActionsSlotChange(event) {
62
+ const slot = event.target;
63
+ this.hasActions = slot.assignedElements({ flatten: true }).length > 0;
64
+ }
65
+ render() {
66
+ return html `
67
+ <div part="content">
68
+ <slot name="illustration"></slot>
69
+ <div part="text-and-actions">
70
+ <div part="text">
71
+ <slot name="heading">
72
+ ${this.heading
73
+ ? html `<mdc-text type="heading-small-medium" tagname="${this.headingTagName}">${this.heading}</mdc-text>`
74
+ : nothing}
75
+ </slot>
76
+ ${this.description
77
+ ? html `<mdc-text type="body-small-regular" tagname="span">${this.description}</mdc-text>`
78
+ : nothing}
79
+ </div>
80
+ <slot name="actions" ?hidden="${!this.hasActions}" @slotchange="${this.handleActionsSlotChange}"></slot>
81
+ </div>
82
+ </div>
83
+ `;
84
+ }
85
+ }
86
+ EmptyState.styles = [...Component.styles, ...styles];
87
+ __decorate([
88
+ property({ type: String, reflect: true }),
89
+ __metadata("design:type", String)
90
+ ], EmptyState.prototype, "layout", void 0);
91
+ __decorate([
92
+ property({ type: String, reflect: true }),
93
+ __metadata("design:type", String)
94
+ ], EmptyState.prototype, "size", void 0);
95
+ __decorate([
96
+ property({ type: String, reflect: true }),
97
+ __metadata("design:type", String)
98
+ ], EmptyState.prototype, "heading", void 0);
99
+ __decorate([
100
+ property({ type: String, reflect: true }),
101
+ __metadata("design:type", String)
102
+ ], EmptyState.prototype, "description", void 0);
103
+ __decorate([
104
+ property({ type: String, reflect: true, attribute: 'heading-tag-name' }),
105
+ __metadata("design:type", String)
106
+ ], EmptyState.prototype, "headingTagName", void 0);
107
+ __decorate([
108
+ state(),
109
+ __metadata("design:type", Object)
110
+ ], EmptyState.prototype, "hasActions", void 0);
111
+ export default EmptyState;
@@ -0,0 +1,15 @@
1
+ declare const TAG_NAME: "mdc-emptystate";
2
+ declare const LAYOUT: {
3
+ readonly VERTICAL: "vertical";
4
+ readonly HORIZONTAL: "horizontal";
5
+ };
6
+ declare const SIZE: {
7
+ readonly MEDIUM: "medium";
8
+ readonly LARGE: "large";
9
+ };
10
+ declare const DEFAULTS: {
11
+ LAYOUT: "vertical";
12
+ SIZE: "medium";
13
+ HEADING_TAG_NAME: "h2";
14
+ };
15
+ export { TAG_NAME, LAYOUT, SIZE, DEFAULTS };
@@ -0,0 +1,17 @@
1
+ import utils from '../../utils/tag-name';
2
+ import { VALID_TEXT_TAGS } from '../text/text.constants';
3
+ const TAG_NAME = utils.constructTagName('emptystate');
4
+ const LAYOUT = {
5
+ VERTICAL: 'vertical',
6
+ HORIZONTAL: 'horizontal',
7
+ };
8
+ const SIZE = {
9
+ MEDIUM: 'medium',
10
+ LARGE: 'large',
11
+ };
12
+ const DEFAULTS = {
13
+ LAYOUT: LAYOUT.VERTICAL,
14
+ SIZE: SIZE.MEDIUM,
15
+ HEADING_TAG_NAME: VALID_TEXT_TAGS.H2,
16
+ };
17
+ export { TAG_NAME, LAYOUT, SIZE, DEFAULTS };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("lit").CSSResult[];
2
+ export default _default;
@@ -0,0 +1,79 @@
1
+ import { css } from 'lit';
2
+ const styles = css `
3
+ :host {
4
+ --mdc-emptystate-max-width: 19.75rem;
5
+ --mdc-emptystate-align-items: center;
6
+ --mdc-emptystate-illustration-size: 5.5rem;
7
+ --mdc-emptystate-text-align: center;
8
+
9
+ width: 100%;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ }
14
+
15
+ :host([layout='horizontal']) {
16
+ --mdc-emptystate-align-items: flex-start;
17
+ --mdc-emptystate-text-align: start;
18
+ }
19
+
20
+ :host([size='large']) {
21
+ --mdc-emptystate-max-width: 31rem;
22
+ --mdc-emptystate-illustration-size: 12rem;
23
+ }
24
+
25
+ [part='content'] {
26
+ display: flex;
27
+ flex-direction: column;
28
+ align-items: var(--mdc-emptystate-align-items);
29
+ gap: var(--mds-spacing-theme-gap-xl);
30
+ max-width: var(--mdc-emptystate-max-width);
31
+ }
32
+
33
+ :host([layout='horizontal']) [part='content'] {
34
+ flex-direction: row;
35
+ }
36
+
37
+ ::slotted(mdc-illustration[slot='illustration']) {
38
+ --mdc-illustration-size: var(--mdc-emptystate-illustration-size);
39
+ }
40
+
41
+ [part='text-and-actions'] {
42
+ display: flex;
43
+ flex-direction: column;
44
+ align-items: var(--mdc-emptystate-align-items);
45
+ gap: var(--mds-spacing-theme-gap-xl);
46
+ }
47
+
48
+ [part='text'] {
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: var(--mdc-emptystate-align-items);
52
+ gap: var(--mds-spacing-theme-gap-xs);
53
+ text-align: var(--mdc-emptystate-text-align);
54
+ }
55
+
56
+ slot[name='heading'] {
57
+ display: contents;
58
+ }
59
+
60
+ [part='text'] mdc-text[type='body-small-regular'] {
61
+ color: var(--mds-color-theme-text-secondary-normal);
62
+ }
63
+
64
+ mdc-text::part(text) {
65
+ margin: 0;
66
+ }
67
+
68
+ slot[name='actions'] {
69
+ display: flex;
70
+ flex-direction: column;
71
+ align-items: var(--mdc-emptystate-align-items);
72
+ gap: var(--mds-spacing-theme-gap-sm);
73
+ }
74
+
75
+ slot[name='actions'][hidden] {
76
+ display: none;
77
+ }
78
+ `;
79
+ export default [styles];
@@ -0,0 +1,9 @@
1
+ import type { ValueOf } from '../../utils/types';
2
+ import type { TagName } from '../text/text.types';
3
+ import { SIZE, LAYOUT } from './emptystate.constants';
4
+ interface Events {
5
+ }
6
+ type EmptyStateLayout = ValueOf<typeof LAYOUT>;
7
+ type EmptyStateSize = ValueOf<typeof SIZE>;
8
+ type EmptyStateHeadingTagName = TagName;
9
+ export type { Events, EmptyStateLayout, EmptyStateSize, EmptyStateHeadingTagName };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import EmptyState from './emptystate.component';
2
+ import '../text';
3
+ declare global {
4
+ interface HTMLElementTagNameMap {
5
+ ['mdc-emptystate']: EmptyState;
6
+ }
7
+ }
8
+ export default EmptyState;
@@ -0,0 +1,5 @@
1
+ import EmptyState from './emptystate.component';
2
+ import { TAG_NAME } from './emptystate.constants';
3
+ import '../text';
4
+ EmptyState.register(TAG_NAME);
5
+ export default EmptyState;
@@ -173,8 +173,8 @@
173
173
  "attribute": "disabled",
174
174
  "reflects": true,
175
175
  "inheritedFrom": {
176
- "name": "DisabledMixin",
177
- "module": "utils/mixins/DisabledMixin.js"
176
+ "name": "AccordionButton",
177
+ "module": "components/accordionbutton/accordionbutton.component.js"
178
178
  }
179
179
  },
180
180
  {
@@ -493,8 +493,8 @@
493
493
  "default": "undefined",
494
494
  "fieldName": "disabled",
495
495
  "inheritedFrom": {
496
- "name": "DisabledMixin",
497
- "module": "src/utils/mixins/DisabledMixin.ts"
496
+ "name": "AccordionButton",
497
+ "module": "src/components/accordionbutton/accordionbutton.component.ts"
498
498
  }
499
499
  },
500
500
  {
@@ -18584,6 +18584,198 @@
18584
18584
  }
18585
18585
  ]
18586
18586
  },
18587
+ {
18588
+ "kind": "javascript-module",
18589
+ "path": "components/emptystate/emptystate.component.js",
18590
+ "declarations": [
18591
+ {
18592
+ "kind": "class",
18593
+ "description": "",
18594
+ "name": "EmptyState",
18595
+ "cssProperties": [
18596
+ {
18597
+ "description": "The maximum width of the empty state content",
18598
+ "name": "--mdc-emptystate-max-width"
18599
+ },
18600
+ {
18601
+ "description": "Alignment of the empty state content and actions",
18602
+ "name": "--mdc-emptystate-align-items"
18603
+ },
18604
+ {
18605
+ "description": "Size of a slotted illustration",
18606
+ "name": "--mdc-emptystate-illustration-size"
18607
+ },
18608
+ {
18609
+ "description": "Text alignment of the heading and description",
18610
+ "name": "--mdc-emptystate-text-align"
18611
+ }
18612
+ ],
18613
+ "cssParts": [
18614
+ {
18615
+ "description": "The container for the illustration, text, and actions",
18616
+ "name": "content"
18617
+ },
18618
+ {
18619
+ "description": "The container for the heading, description, and action controls",
18620
+ "name": "text-and-actions"
18621
+ },
18622
+ {
18623
+ "description": "The container for the heading and description",
18624
+ "name": "text"
18625
+ }
18626
+ ],
18627
+ "slots": [
18628
+ {
18629
+ "description": "optional illustration / icon",
18630
+ "name": "illustration"
18631
+ },
18632
+ {
18633
+ "description": "optional rich heading content; takes precedence over the heading property",
18634
+ "name": "heading"
18635
+ },
18636
+ {
18637
+ "description": "optional action buttons",
18638
+ "name": "actions"
18639
+ }
18640
+ ],
18641
+ "members": [
18642
+ {
18643
+ "kind": "field",
18644
+ "name": "description",
18645
+ "type": {
18646
+ "text": "string | undefined"
18647
+ },
18648
+ "description": "Required supporting text that explains the empty state and what the user can do next.",
18649
+ "attribute": "description",
18650
+ "reflects": true
18651
+ },
18652
+ {
18653
+ "kind": "method",
18654
+ "name": "handleActionsSlotChange",
18655
+ "privacy": "private",
18656
+ "return": {
18657
+ "type": {
18658
+ "text": "void"
18659
+ }
18660
+ },
18661
+ "parameters": [
18662
+ {
18663
+ "name": "event",
18664
+ "type": {
18665
+ "text": "Event"
18666
+ }
18667
+ }
18668
+ ]
18669
+ },
18670
+ {
18671
+ "kind": "field",
18672
+ "name": "heading",
18673
+ "type": {
18674
+ "text": "string | undefined"
18675
+ },
18676
+ "description": "The heading text. A heading slot takes precedence when consumers need rich\nheading content.\nOmit it for search or filter results when it would repeat the description.",
18677
+ "attribute": "heading",
18678
+ "reflects": true
18679
+ },
18680
+ {
18681
+ "kind": "field",
18682
+ "name": "headingTagName",
18683
+ "type": {
18684
+ "text": "EmptyStateHeadingTagName"
18685
+ },
18686
+ "description": "The HTML tag used for a heading rendered from the heading property. Choose a heading level that fits the page structure.\nSlotted heading content controls its own semantics.\nUse a non-heading tag when the title should not create a section heading.",
18687
+ "default": "'h2'",
18688
+ "attribute": "heading-tag-name",
18689
+ "reflects": true
18690
+ },
18691
+ {
18692
+ "kind": "field",
18693
+ "name": "layout",
18694
+ "type": {
18695
+ "text": "EmptyStateLayout"
18696
+ },
18697
+ "description": "The layout of the empty state component.\nCan be 'horizontal' or 'vertical'.",
18698
+ "default": "'vertical'",
18699
+ "attribute": "layout",
18700
+ "reflects": true
18701
+ },
18702
+ {
18703
+ "kind": "field",
18704
+ "name": "size",
18705
+ "type": {
18706
+ "text": "EmptyStateSize"
18707
+ },
18708
+ "description": "The size of the empty state component.\nCan be 'medium' or 'large'.",
18709
+ "default": "'medium'",
18710
+ "attribute": "size",
18711
+ "reflects": true
18712
+ }
18713
+ ],
18714
+ "attributes": [
18715
+ {
18716
+ "name": "layout",
18717
+ "type": {
18718
+ "text": "EmptyStateLayout"
18719
+ },
18720
+ "description": "The layout of the empty state component.\nCan be 'horizontal' or 'vertical'.",
18721
+ "default": "'vertical'",
18722
+ "fieldName": "layout"
18723
+ },
18724
+ {
18725
+ "name": "size",
18726
+ "type": {
18727
+ "text": "EmptyStateSize"
18728
+ },
18729
+ "description": "The size of the empty state component.\nCan be 'medium' or 'large'.",
18730
+ "default": "'medium'",
18731
+ "fieldName": "size"
18732
+ },
18733
+ {
18734
+ "name": "heading",
18735
+ "type": {
18736
+ "text": "string | undefined"
18737
+ },
18738
+ "description": "The heading text. A heading slot takes precedence when consumers need rich\nheading content.\nOmit it for search or filter results when it would repeat the description.",
18739
+ "fieldName": "heading"
18740
+ },
18741
+ {
18742
+ "name": "description",
18743
+ "type": {
18744
+ "text": "string | undefined"
18745
+ },
18746
+ "description": "Required supporting text that explains the empty state and what the user can do next.",
18747
+ "fieldName": "description"
18748
+ },
18749
+ {
18750
+ "name": "heading-tag-name",
18751
+ "type": {
18752
+ "text": "EmptyStateHeadingTagName"
18753
+ },
18754
+ "description": "The HTML tag used for a heading rendered from the heading property. Choose a heading level that fits the page structure.\nSlotted heading content controls its own semantics.\nUse a non-heading tag when the title should not create a section heading.",
18755
+ "default": "'h2'",
18756
+ "fieldName": "headingTagName"
18757
+ }
18758
+ ],
18759
+ "superclass": {
18760
+ "name": "Component",
18761
+ "module": "/src/models"
18762
+ },
18763
+ "tagName": "mdc-emptystate",
18764
+ "jsDoc": "/**\n * @tagname mdc-emptystate\n *\n * @dependency mdc-text\n *\n * @slot illustration - optional illustration / icon\n * @slot heading - optional rich heading content; takes precedence over the heading property\n * @slot actions - optional action buttons\n *\n * @cssproperty --mdc-emptystate-max-width - The maximum width of the empty state content\n * @cssproperty --mdc-emptystate-align-items - Alignment of the empty state content and actions\n * @cssproperty --mdc-emptystate-illustration-size - Size of a slotted illustration\n * @cssproperty --mdc-emptystate-text-align - Text alignment of the heading and description\n *\n * @csspart content - The container for the illustration, text, and actions\n * @csspart text-and-actions - The container for the heading, description, and action controls\n * @csspart text - The container for the heading and description\n */",
18765
+ "customElement": true
18766
+ }
18767
+ ],
18768
+ "exports": [
18769
+ {
18770
+ "kind": "js",
18771
+ "name": "default",
18772
+ "declaration": {
18773
+ "name": "EmptyState",
18774
+ "module": "components/emptystate/emptystate.component.js"
18775
+ }
18776
+ }
18777
+ ]
18778
+ },
18587
18779
  {
18588
18780
  "kind": "javascript-module",
18589
18781
  "path": "components/filterchip/filterchip.component.js",
package/dist/index.d.ts CHANGED
@@ -95,6 +95,7 @@ import Verticaltablist from './components/verticaltablist';
95
95
  import StatusMessage from './components/statusmessage';
96
96
  import FocusTrap from './components/focustrap';
97
97
  import CheckboxTree from './components/checkboxtree';
98
+ import EmptyState from './components/emptystate';
98
99
  import type { AvatarSize } from './components/avatar/avatar.types';
99
100
  import type { BadgeType } from './components/badge/badge.types';
100
101
  import type { ColorType as ChipColorType } from './components/staticchip/staticchip.types';
@@ -125,6 +126,6 @@ import type { TimePickerChangeEvent, TimePickerInputEvent } from './components/t
125
126
  import type { DatePickerChangeEvent, DatePickerInputEvent } from './components/datepicker/datepicker.types';
126
127
  import type { CalendarDateSelectedEvent, CalendarMonthChangedEvent } from './components/calendar/calendar.types';
127
128
  import type { ListBoxChangeEvent } from './components/listbox/listbox.types';
128
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, BrandVisualProvider, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
129
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, BrandVisualProvider, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, EmptyState, };
129
130
  export type { AvatarSize, BadgeType, ChipColorType, ButtonColor, ButtonVariant, IconButtonSize, MenuPopoverActionEvent, MenuPopoverChangeEvent, MenuSectionChangeEvent, PillButtonSize, PopoverPlacement, PresenceType, SkeletonVariant, SelectChangeEvent, SelectInputEvent, SpinnerSize, SpinnerVariant, SliderChangeEvent, StatusMessageSeverity, TextType, TypewriterType, InputInputEvent, InputChangeEvent, InputFocusEvent, InputBlurEvent, InputClearEvent, VirtualizedListScrollEvent, TablistChangeEvent, TextareaInputEvent, TextareaChangeEvent, TextareaFocusEvent, TextareaBlurEvent, TextareaLimitExceededEvent, ToggleOnChangeEvent, CheckboxOnChangeEvent, LinkButtonSize, TimePickerChangeEvent, TimePickerInputEvent, DatePickerChangeEvent, DatePickerInputEvent, CalendarDateSelectedEvent, CalendarMonthChangedEvent, VerticaltablistChangeEvent, ListBoxChangeEvent, };
130
131
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
package/dist/index.js CHANGED
@@ -97,11 +97,12 @@ import Verticaltablist from './components/verticaltablist';
97
97
  import StatusMessage from './components/statusmessage';
98
98
  import FocusTrap from './components/focustrap';
99
99
  import CheckboxTree from './components/checkboxtree';
100
+ import EmptyState from './components/emptystate';
100
101
  // Constants / Utils Imports
101
102
  import { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, PILL_BUTTON_SIZES, } from './components/button/button.constants';
102
103
  import { SKELETON_VARIANTS } from './components/skeleton/skeleton.constants';
103
104
  import { inMemoryCache, webAPIAssetsCache } from './utils/assets-cache';
104
105
  // Components Exports
105
- export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, BrandVisualProvider, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, };
106
+ export { Accordion, AccordionButton, AccordionGroup, AlertChip, Animation, AnnouncementDialog, Appheader, Avatar, AvatarButton, Badge, Brandvisual, BrandVisualProvider, Bullet, Button, ButtonGroup, ButtonLink, Calendar, Card, CardButton, CardCheckbox, CardRadio, Checkbox, Chip, Coachmark, ControlTypeProvider, DatePicker, Dialog, Divider, FilterChip, FormfieldGroup, Icon, IconProvider, Illustration, IllustrationProvider, Input, InputChip, Link, LinkButton, Linksimple, List, Listheader, ListItem, Marker, MenuBar, MenuItem, MenuItemCheckbox, MenuItemRadio, MenuPopover, MenuSection, NavMenuItem, NumberInput, OptGroup, Option, Password, Popover, Presence, Progressbar, Progressspinner, Radio, RadioGroup, ResponsiveSettingsProvider, ScreenreaderAnnouncer, Searchfield, Searchpopover, Select, SelectListbox, SideNavigation, Skeleton, Spinner, StaticChip, StaticCheckbox, StaticRadio, StaticToggle, Stepper, StepperConnector, StepperItem, Tab, TabList, Text, Textarea, TimePicker, ThemeProvider, Toast, Toggle, Typewriter, ToggleTip, Tooltip, VirtualizedList, Combobox, Slider, ListBox, Banner, Buttonsimple, Verticaltablist, StatusMessage, FocusTrap, CheckboxTree, EmptyState, };
106
107
  // Constants / Utils Exports
107
108
  export { BUTTON_COLORS, BUTTON_VARIANTS, ICON_BUTTON_SIZES, inMemoryCache, PILL_BUTTON_SIZES, SKELETON_VARIANTS, webAPIAssetsCache, };
@@ -0,0 +1,34 @@
1
+ import Component from '../../components/emptystate';
2
+ /**
3
+ * The `mdc-emptystate` gives people context when a view has no content and helps them decide what to do next. It supports views with no content yet, empty collections, and searches or filters that return no results.
4
+ *
5
+ * **When to use**
6
+ *
7
+ * - Use `mdc-emptystate` when a collection is empty and people need context or a next step.
8
+ * - Use `mdc-emptystate` when filters or a search query leave a view without results; explain how to adjust the query or filters when that helps.
9
+ * - Use `mdc-emptystate` for views with no content yet that can guide people toward creating or adding content.
10
+ *
11
+ * **When not to use**
12
+ *
13
+ * - Do not use `mdc-emptystate` to represent content that is still loading. Use `mdc-skeleton` when the content layout is known or `mdc-spinner` when it is not.
14
+ * - Do not use `mdc-emptystate` for a short status beside a control. Use `mdc-statusmessage` instead.
15
+ *
16
+ * @tagname mdc-emptystate
17
+ *
18
+ * @dependency mdc-text
19
+ *
20
+ * @slot illustration - optional illustration / icon
21
+ * @slot heading - optional rich heading content; takes precedence over the heading property
22
+ * @slot actions - optional action buttons
23
+ *
24
+ * @cssproperty --mdc-emptystate-max-width - The maximum width of the empty state content
25
+ * @cssproperty --mdc-emptystate-align-items - Alignment of the empty state content and actions
26
+ * @cssproperty --mdc-emptystate-illustration-size - Size of a slotted illustration
27
+ * @cssproperty --mdc-emptystate-text-align - Text alignment of the heading and description
28
+ *
29
+ * @csspart content - The container for the illustration, text, and actions
30
+ * @csspart text-and-actions - The container for the heading, description, and action controls
31
+ * @csspart text - The container for the heading and description
32
+ */
33
+ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
34
+ export default reactWrapper;
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import Component from '../../components/emptystate';
4
+ import { TAG_NAME } from '../../components/emptystate/emptystate.constants';
5
+ /**
6
+ * @tagname mdc-emptystate
7
+ *
8
+ * @dependency mdc-text
9
+ *
10
+ * @slot illustration - optional illustration / icon
11
+ * @slot heading - optional rich heading content; takes precedence over the heading property
12
+ * @slot actions - optional action buttons
13
+ *
14
+ * @cssproperty --mdc-emptystate-max-width - The maximum width of the empty state content
15
+ * @cssproperty --mdc-emptystate-align-items - Alignment of the empty state content and actions
16
+ * @cssproperty --mdc-emptystate-illustration-size - Size of a slotted illustration
17
+ * @cssproperty --mdc-emptystate-text-align - Text alignment of the heading and description
18
+ *
19
+ * @csspart content - The container for the illustration, text, and actions
20
+ * @csspart text-and-actions - The container for the heading, description, and action controls
21
+ * @csspart text - The container for the heading and description
22
+ */
23
+ const reactWrapper = createComponent({
24
+ tagName: TAG_NAME,
25
+ elementClass: Component,
26
+ react: React,
27
+ events: {},
28
+ displayName: 'EmptyState',
29
+ });
30
+ export default reactWrapper;