Skip to content

Commit aa814b4

Browse files
authored
chore(docs): update misc web component Storybook docs (#19200)
* chore(docs): update modal wc sb docs * chore(docs): update multi-select sb docs * chore(docs): update notifications wc sb docs * chore(docs): update number-input wc sb docs * chore(docs): update overflow-menu wc sb docs * chore(docs): update pagination wc sb docs * chore(docs): remove unneeded comments * chore(docs): update docs * chore(docs): fix typos
1 parent adf68cb commit aa814b4

File tree

81 files changed

+366
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+366
-615
lines changed

packages/react/src/components/Modal/Modal.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
1616
 | 
1717
[Accessibility](https://www.carbondesignsystem.com/components/modal/accessibility)
1818

19-
{/* <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> */}
20-
2119
## Table of Contents
2220

2321
- [Modal](#modal)
@@ -35,8 +33,6 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
3533
- [References](#references)
3634
- [Feedback](#feedback)
3735

38-
{/* <!-- END doctoc generated TOC please keep comment here to allow auto update --> */}
39-
4036
## Overview
4137

4238
`<Modal>` allows you to use its bespoke set of contents. `children` prop maps to
@@ -111,8 +107,6 @@ const ModalStateManager = ({
111107
};
112108
```
113109

114-
{/* <!-- prettier-ignore-start --> */}
115-
116110
<Unstyled>
117111
<InlineNotification
118112
title="Warning"
@@ -130,7 +124,7 @@ const ModalStateManager = ({
130124

131125
There are four responsive
132126
[modal sizes](https://www.carbondesignsystem.com/components/modal/usage/#modal-sizes):
133-
`xs`, `small`, default, and `large`. You can set it via the `size` prop.
127+
`xs`, `sm`, `md` (default), and `lg`. You can set it via the `size` prop.
134128

135129
```jsx
136130
<ComposedModal size="lg">

packages/react/src/components/MultiSelect/MultiSelect.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
3434
## Overview
3535

3636
The `MultiSelect` component is a variant of the `Dropdown` component that allows
37-
for multiple items to be selected. `MultiSelect` stays open while items are The
38-
`MultiSelect` component is a variant of the `Dropdown` component that allows for
39-
multiple items to be selected. `MultiSelect` stays open while items are being
40-
selected.
37+
for multiple items to be selected. `MultiSelect` stays open while items are
38+
being selected.
4139

4240
<Canvas
4341
of={MultiSelect.Default}

packages/react/src/components/Notification/Notification.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { Canvas, ArgTypes, Meta } from '@storybook/blocks';
1313
## Table of Contents
1414

1515
- [Notification](#Notification)
16-
- [Overview](#overview)
17-
- [ActionableNotification](#ActionableNotification)
18-
- [InlineNotification & ToastNotification](#InlineNotification-and-ToastNotification)
16+
- [Overview](#overview)
17+
- [ActionableNotification](#actionablenotification)
18+
- [InlineNotification & ToastNotification](#inlinenotification-and-toastnotification)
1919
- [Component API](#component-api)
2020
- [Actionable](#actionable)
2121
- [Inline](#inline)

packages/react/src/components/OverflowMenu/OverflowMenu.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ import { stackblitzPrefillConfig } from '../../../previewer/codePreviewer';
1414

1515
## Table of Contents
1616

17+
- [Overview](#overview)
18+
- [data-floating-menu-container](#data-floating-menu-container)
19+
- [Render Custom Icon](#render-custom-icon)
20+
- [Customizing the tooltip](#customizing-the-tooltip)
21+
- [Component API](#component-api)
22+
- [Feedback](#feedback)
23+
1724
## Overview
1825

1926
The overflow menu component is a clickable element that contains additional

packages/web-components/.storybook/_container.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,19 @@ body {
6666
block-size: 100vh;
6767
inline-size: 100%;
6868
}
69+
70+
// Following styles are needed to ensure that the Canvas containers render correctly
71+
.docs-story div div {
72+
transform: none;
73+
}
74+
75+
// Disable stylelint max-nesting-depth
76+
/* stylelint-disable */
77+
.sbdocs {
78+
&.sbdocs-preview,
79+
.docs-story,
80+
.docs-story div {
81+
overflow: visible;
82+
}
83+
}
84+
/* stylelint-enable */

packages/web-components/src/components/badge-indicator/badge-indicator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CDSBadgeIndicator extends LitElement {
3636
return html`${displayCount}`;
3737
}
3838

39-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
39+
static styles = styles;
4040
}
4141

4242
export default CDSBadgeIndicator;

packages/web-components/src/components/button/button-skeleton.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class CDSButtonSkeleton extends CDSButton {
7373
`;
7474
}
7575

76-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
76+
static styles = styles;
7777
}
7878

7979
export default CDSButtonSkeleton;

packages/web-components/src/components/button/button.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,13 +413,13 @@ in a position and will render the tooltip accordingly. Accepted options are
413413
By using the `stacked` attribute with the `button-set` component, you can
414414
arrange your two `button` elements vertically
415415

416-
<cds-button-set stacked="">
416+
<cds-button-set stacked>
417417
<cds-button kind="secondary">Secondary button</cds-button>
418418
<cds-button kind="primary">Primary button</cds-button>
419419
</cds-button-set>
420420

421421
```html
422-
<cds-button-set stacked="">
422+
<cds-button-set stacked>
423423
<cds-button kind="secondary">Secondary button</cds-button>
424424
<cds-button kind="primary">Primary button</cds-button>
425425
</cds-button-set>

packages/web-components/src/components/data-table/table-expanded-row.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class CDSTableExpandedRow extends HostListenerMixin(LitElement) {
9292
return `${prefix}-table-row`;
9393
}
9494

95-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
95+
static styles = styles;
9696
}
9797

9898
export default CDSTableExpandedRow;

packages/web-components/src/components/form/form-item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CDSFormItem extends LitElement {
2121
return html` <slot></slot> `;
2222
}
2323

24-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
24+
static styles = styles;
2525
}
2626

2727
export default CDSFormItem;

packages/web-components/src/components/icon-button/icon-button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class CDSIconButton extends CDSButton {
119119
`;
120120
}
121121

122-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
122+
static styles = styles;
123123
}
124124

125125
export default CDSIconButton;

packages/web-components/src/components/icon-indicator/icon-indicator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class CDSIconIndicator extends LitElement {
119119
return html`${icon()}${this.label}`;
120120
}
121121

122-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
122+
static styles = styles;
123123
}
124124

125125
export default CDSIconIndicator;

packages/web-components/src/components/inline-loading/inline-loading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class CDSInlineLoading extends LitElement {
130130
`;
131131
}
132132

133-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
133+
static styles = styles;
134134
}
135135

136136
export default CDSInlineLoading;

packages/web-components/src/components/link/link.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class CDSLink extends FocusMixin(LitElement) {
218218
...LitElement.shadowRootOptions,
219219
delegatesFocus: true,
220220
};
221-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
221+
static styles = styles;
222222
}
223223

224224
export default CDSLink;

packages/web-components/src/components/menu/menu-item-divider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ class CDSmenuItemDivider extends LitElement {
2222
}
2323
super.connectedCallback();
2424
}
25-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
25+
static styles = styles;
2626
}
2727
export default CDSmenuItemDivider;

packages/web-components/src/components/menu/menu-item-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ class CDSmenuItemGroup extends LitElement {
3131
</ul>
3232
`;
3333
}
34-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
34+
static styles = styles;
3535
}
3636
export default CDSmenuItemGroup;

packages/web-components/src/components/menu/menu-item-radio-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ class CDSmenuItemRadioGroup extends LitElement {
103103
</ul>
104104
`;
105105
}
106-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
106+
static styles = styles;
107107
}
108108
export default CDSmenuItemRadioGroup;

packages/web-components/src/components/menu/menu-item-selectable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ class CDSmenuItemSelectable extends LitElement {
9393
</cds-menu-item>
9494
`;
9595
}
96-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
96+
static styles = styles;
9797
}
9898
export default CDSmenuItemSelectable;

packages/web-components/src/components/menu/menu-item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,6 @@ class CDSmenuItem extends HostListenerMixin(HostListenerMixin(LitElement)) {
299299
}
300300
};
301301

302-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
302+
static styles = styles;
303303
}
304304
export default CDSmenuItem;

packages/web-components/src/components/menu/menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,6 @@ class CDSMenu extends HostListenerMixin(LitElement) {
512512
const activeEl = this.activeitems[0]?.item ?? document.activeElement;
513513
activeEl.focus();
514514
};
515-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
515+
static styles = styles;
516516
}
517517
export default CDSMenu;

packages/web-components/src/components/modal/docs/overview.mdx

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/web-components/src/components/modal/modal-body-content.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CDSModalBodyContent extends LitElement {
2121
return html`<slot></slot>`;
2222
}
2323

24-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
24+
static styles = styles;
2525
}
2626

2727
export default CDSModalBodyContent;

packages/web-components/src/components/modal/modal-body.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CDSModalBody extends LitElement {
2121
return html` <slot></slot> `;
2222
}
2323

24-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
24+
static styles = styles;
2525
}
2626

2727
export default CDSModalBody;

packages/web-components/src/components/modal/modal-footer-button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { carbonElement as customElement } from '../../globals/decorators/carbon-
1818
*/
1919
@customElement(`${prefix}-modal-footer-button`)
2020
class CDSModalFooterButton extends CDSButton {
21-
static styles = [buttonStyles, styles]; // `styles` here is a `CSSResult` generated by custom Vite loader
21+
static styles = [buttonStyles, styles];
2222
}
2323

2424
export default CDSModalFooterButton;

packages/web-components/src/components/modal/modal-footer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class CDSModalFooter extends LitElement {
5151
return `${prefix}-button,${prefix}-modal-footer-button`;
5252
}
5353

54-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
54+
static styles = styles;
5555
}
5656

5757
export default CDSModalFooter;

packages/web-components/src/components/modal/modal-heading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CDSModalHeading extends LitElement {
2121
return html` <slot></slot> `;
2222
}
2323

24-
static styles = styles; // `styles` here is a `CSSResult` generated by custom Vite loader
24+
static styles = styles;
2525
}
2626

2727
export default CDSModalHeading;

0 commit comments

Comments
 (0)