From 8ae015f2d8463658ae605686dc68f70c15cf877a Mon Sep 17 00:00:00 2001 From: Vicki League Date: Wed, 6 Aug 2025 16:16:17 -0400 Subject: [PATCH] [CL-372] Add required type attr to buttons in stories (#15892) --- .../src/anon-layout/anon-layout.stories.ts | 2 +- .../src/async-actions/standalone.stories.ts | 4 +- libs/components/src/badge/badge.stories.ts | 58 +++++++++---------- libs/components/src/banner/banner.stories.ts | 4 +- libs/components/src/button/button.stories.ts | 44 +++++++------- .../src/dialog/dialog/dialog.stories.ts | 28 ++++----- .../simple-dialog/simple-dialog.stories.ts | 30 +++++----- .../src/form-field/form-field.stories.ts | 22 +++---- .../src/icon-button/icon-button.stories.ts | 6 +- libs/components/src/item/item.stories.ts | 22 +++---- libs/components/src/link/link.stories.ts | 16 ++--- libs/components/src/menu/menu.stories.ts | 2 +- .../src/navigation/nav-item.stories.ts | 4 +- .../components/src/popover/popover.stories.ts | 2 +- .../components/src/section/section.stories.ts | 12 ++-- libs/components/src/tabs/tabs.stories.ts | 4 +- 16 files changed, 132 insertions(+), 128 deletions(-) diff --git a/libs/components/src/anon-layout/anon-layout.stories.ts b/libs/components/src/anon-layout/anon-layout.stories.ts index 9abc84d2860..339f76ec06b 100644 --- a/libs/components/src/anon-layout/anon-layout.stories.ts +++ b/libs/components/src/anon-layout/anon-layout.stories.ts @@ -98,7 +98,7 @@ export default {
Secondary Projected Content (optional)
- + `, diff --git a/libs/components/src/async-actions/standalone.stories.ts b/libs/components/src/async-actions/standalone.stories.ts index 07a1e2a98a2..1ed6f6c5a59 100644 --- a/libs/components/src/async-actions/standalone.stories.ts +++ b/libs/components/src/async-actions/standalone.stories.ts @@ -13,10 +13,10 @@ import { AsyncActionsModule } from "./async-actions.module"; import { BitActionDirective } from "./bit-action.directive"; const template = /*html*/ ` - - `; + `; @Component({ template, diff --git a/libs/components/src/badge/badge.stories.ts b/libs/components/src/badge/badge.stories.ts index a151547ef6a..0e5f44cc5c0 100644 --- a/libs/components/src/badge/badge.stories.ts +++ b/libs/components/src/badge/badge.stories.ts @@ -47,7 +47,7 @@ export const Primary: Story = { link (args)}>Badge
- button + button
`, @@ -108,40 +108,40 @@ export const VariantsAndInteractionStates: Story = { props: args, template: /*html*/ ` Default - - - - - - - + + + + + + +

Hover - - - - - - - + + + + + + +

Focus Visible - - - - - - - + + + + + + +

Disabled - - - - - - - + + + + + + + `, }), }; diff --git a/libs/components/src/banner/banner.stories.ts b/libs/components/src/banner/banner.stories.ts index 8338c9240b9..a7649a28228 100644 --- a/libs/components/src/banner/banner.stories.ts +++ b/libs/components/src/banner/banner.stories.ts @@ -49,10 +49,10 @@ export const Base: Story = { render: (args) => { return { props: args, - template: ` + template: /*html*/ ` (args)}> Content Really Long Text Lorem Ipsum Ipsum Ipsum - + `, }; diff --git a/libs/components/src/button/button.stories.ts b/libs/components/src/button/button.stories.ts index 29a9e367fcc..180f5cb4aa9 100644 --- a/libs/components/src/button/button.stories.ts +++ b/libs/components/src/button/button.stories.ts @@ -31,7 +31,7 @@ export const Default: Story = { render: (args) => ({ props: args, template: /*html*/ ` - + `, }), args: { @@ -58,9 +58,9 @@ export const Small: Story = { props: args, template: /*html*/ `
- - - + + +
`, }), @@ -86,15 +86,15 @@ export const Disabled: Story = { export const DisabledWithAttribute: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` @if (disabled) { - - - + + + } @else { - - - + + + } `, }), @@ -107,12 +107,12 @@ export const DisabledWithAttribute: Story = { export const Block: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` - + [block]="true" Link - + block Link `, @@ -125,16 +125,16 @@ export const Block: Story = { export const WithIcon: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ `
-
- @@ -149,11 +149,11 @@ export const InteractionStates: Story = { props: args, template: /*html*/ `
- - - - - + + + + +
Anchor diff --git a/libs/components/src/dialog/dialog/dialog.stories.ts b/libs/components/src/dialog/dialog/dialog.stories.ts index bb8b2450de2..7cf8b774a23 100644 --- a/libs/components/src/dialog/dialog/dialog.stories.ts +++ b/libs/components/src/dialog/dialog/dialog.stories.ts @@ -78,16 +78,17 @@ type Story = StoryObj; export const Default: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` Foobar Dialog body text goes here. - - + + - + + `, @@ -166,7 +167,7 @@ export const ScrollingContent: Story = { export const TabContent: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` @@ -176,8 +177,8 @@ export const TabContent: Story = { - - + + `, @@ -211,7 +212,7 @@ export const WithCards: Story = {

Foo

- + @@ -231,7 +232,7 @@ export const WithCards: Story = {

Bar

- + @@ -248,9 +249,10 @@ export const WithCards: Story = { - - + + - + + `, @@ -43,14 +43,14 @@ export const Default: Story = { export const CustomIcon: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` Premium Subscription Available Message Content - - + + `, @@ -60,13 +60,13 @@ export const CustomIcon: Story = { export const HideIcon: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` Premium Subscription Available Message Content - - + + `, @@ -76,7 +76,7 @@ export const HideIcon: Story = { export const ScrollingContent: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` Alert Dialog @@ -87,8 +87,8 @@ export const ScrollingContent: Story = { end of sequence! - - + + `, @@ -101,13 +101,13 @@ export const ScrollingContent: Story = { export const TextOverflow: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` Alert Dialogdialogdialogdialogdialogdialogdialogdialogdialogdialogdialogdialogdialog Message Contentcontentcontentcontentcontentcontentcontentcontentcontentcontentcontent - - + + `, diff --git a/libs/components/src/form-field/form-field.stories.ts b/libs/components/src/form-field/form-field.stories.ts index fc6d29c11ad..9fe8b057d4e 100644 --- a/libs/components/src/form-field/form-field.stories.ts +++ b/libs/components/src/form-field/form-field.stories.ts @@ -346,11 +346,11 @@ export const ButtonInputGroup: Story = { - + - - - + + + `, }), @@ -363,11 +363,11 @@ export const DisabledButtonInputGroup: Story = { template: /*html*/ ` Label - + - - - + + + `, @@ -382,9 +382,9 @@ export const PartiallyDisabledButtonInputGroup: Story = { Label - - - + + + `, }), diff --git a/libs/components/src/icon-button/icon-button.stories.ts b/libs/components/src/icon-button/icon-button.stories.ts index fdcda07f021..45022a55535 100644 --- a/libs/components/src/icon-button/icon-button.stories.ts +++ b/libs/components/src/icon-button/icon-button.stories.ts @@ -29,7 +29,7 @@ export const Default: Story = { render: (args) => ({ props: args, template: /*html*/ ` - + `, }), }; @@ -76,7 +76,7 @@ export const NavContrast: Story = { template: /*html*/ `
- +
`, }), @@ -91,7 +91,7 @@ export const Contrast: Story = { template: /*html*/ `
- +
`, }), diff --git a/libs/components/src/item/item.stories.ts b/libs/components/src/item/item.stories.ts index 6187266c40c..15b81f3f67e 100644 --- a/libs/components/src/item/item.stories.ts +++ b/libs/components/src/item/item.stories.ts @@ -66,7 +66,7 @@ export const Default: Story = { props: args, template: /*html*/ ` - - @@ -187,7 +187,7 @@ export const TextOverflowWrap: Story = { const multipleActionListTemplate = /*html*/ ` - @@ -429,7 +429,7 @@ export const WithoutBorderRadius: Story = { template: /*html*/ ` - +
-
-
- +
`, @@ -134,7 +134,7 @@ export const Inline: Story = { props: args, template: /*html*/ ` - On the internet paragraphs often contain inline links, but few know that can be used for similar purposes. + On the internet paragraphs often contain inline links, but few know that can be used for similar purposes. `, }), @@ -147,10 +147,10 @@ export const Disabled: Story = { render: (args) => ({ props: args, template: /*html*/ ` - - + +
- +
`, }), diff --git a/libs/components/src/menu/menu.stories.ts b/libs/components/src/menu/menu.stories.ts index f1f4d8df000..7c4894cbb2f 100644 --- a/libs/components/src/menu/menu.stories.ts +++ b/libs/components/src/menu/menu.stories.ts @@ -57,7 +57,7 @@ export const ClosedMenu: Story = { props: args, template: /*html*/ `
- +
diff --git a/libs/components/src/navigation/nav-item.stories.ts b/libs/components/src/navigation/nav-item.stories.ts index 94d7d33cea3..c3f7e526ecb 100644 --- a/libs/components/src/navigation/nav-item.stories.ts +++ b/libs/components/src/navigation/nav-item.stories.ts @@ -86,9 +86,10 @@ export const WithoutRoute: Story = { export const WithChildButtons: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ ` + `; diff --git a/libs/components/src/section/section.stories.ts b/libs/components/src/section/section.stories.ts index 53e6bc078c5..f28cca0af7b 100644 --- a/libs/components/src/section/section.stories.ts +++ b/libs/components/src/section/section.stories.ts @@ -69,7 +69,7 @@ export const HeaderVariants: Story = {

Title with icon button suffix

- + `, }), @@ -88,7 +88,7 @@ export const HeaderEndSlotVariants: Story = {

Title with end slot icon button

- + `, }), @@ -103,7 +103,7 @@ export const HeaderWithPadding: Story = {

Card as immediate sibling

- +

bit-section-header has padding

@@ -114,7 +114,7 @@ export const HeaderWithPadding: Story = {

Card nested in immediate sibling

- +
@@ -127,7 +127,7 @@ export const HeaderWithPadding: Story = {

Item as immediate sibling

- + bit-section-header has padding @@ -138,7 +138,7 @@ export const HeaderWithPadding: Story = {

Item nested in immediate sibling

- + diff --git a/libs/components/src/tabs/tabs.stories.ts b/libs/components/src/tabs/tabs.stories.ts index 0fe88c57a16..3be63b433aa 100644 --- a/libs/components/src/tabs/tabs.stories.ts +++ b/libs/components/src/tabs/tabs.stories.ts @@ -153,7 +153,7 @@ export const PreserveContentTabs: Story = { export const KeyboardNavigation: Story = { render: (args) => ({ props: args, - template: ` + template: /*html*/ `

@@ -174,7 +174,7 @@ export const KeyboardNavigation: Story = {

This tab has no focusable content, but the panel should still be focusable

- + `, }), };