Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
shaharzil committed Feb 26, 2025
2 parents 9b02b2c + f33c729 commit b511ce2
Show file tree
Hide file tree
Showing 48 changed files with 506 additions and 191 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import * as BreadcrumbItemStories from "./BreadcrumbItem.stories";

<Meta of={BreadcrumbItemStories} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ export default {
title: "Components/BreadcrumbsBar/BreadcrumbItem",
component: BreadcrumbItem,
argTypes: metaSettings.argTypes,
decorators: metaSettings.decorators
decorators: metaSettings.decorators,
parameters: {
docs: {
liveEdit: {
scope: { Workspace }
}
}
}
};

export const Overview = {
Expand All @@ -27,6 +34,13 @@ export const Overview = {
args: {
text: "Workspace",
icon: Workspace
},
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import BreadcrumbsBar from "../BreadcrumbsBar";
import BreadcrumbItem from "../BreadcrumbItem/BreadcrumbItem.tsx";
import Avatar from "../../Avatar/Avatar";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export default {
docs: {
transformSource: (src: string) => {
return src.replace(/icon:\s*function[^{]+\{[^}]+\}/g, "icon: <Icon />");
},
liveEdit: {
scope: { Board, Group }
}
}
}
Expand Down Expand Up @@ -78,6 +81,13 @@ export const Overview = {
icon: Group
}
]
},
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

Expand All @@ -103,6 +113,13 @@ export const WithIcons = {
<BreadcrumbItem text="Group" icon={Group} />
</BreadcrumbsBar>
),
parameters: {
docs: {
liveEdit: {
scope: { Workspace, Folder }
}
}
},

name: "With icons"
};
Expand All @@ -120,6 +137,13 @@ export const NavigatableBreadcrumbs = {
</div>
</div>
),
parameters: {
docs: {
liveEdit: {
scope: { person3 }
}
}
},

name: "Navigatable breadcrumbs"
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import {
BUTTON,
HIDDEN_TEXT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ const clickableTemplate = (args: ClickableProps) => {

export const Overview = {
render: clickableTemplate.bind({}),
name: "Overview"
name: "Overview",
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

export const States = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import { Link } from "vibe-storybook-components";
import Counter from "../Counter";
import { CHIP, LABEL, TOOLTIP } from "../../../storybook/components/related-components/component-description-map";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ export const Overview = {

args: {
count: 5
},
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

Expand All @@ -59,9 +66,7 @@ export const Sizes = {
Large
</div>
</>
),

name: "Sizes"
)
};

export const Colors = {
Expand All @@ -84,9 +89,7 @@ export const Colors = {
Light
</div>
</>
),

name: "Colors"
)
};

export const Outline = {
Expand All @@ -109,9 +112,7 @@ export const Outline = {
Light
</div>
</>
),

name: "Outline"
)
};

export const Limits = {
Expand All @@ -130,9 +131,7 @@ export const Limits = {
Three digits limit
</div>
</>
),

name: "Limits"
)
};

export const NotificationCounter = {
Expand Down Expand Up @@ -165,8 +164,13 @@ export const NotificationCounter = {
</div>
);
},

name: "Notification counter"
parameters: {
docs: {
liveEdit: {
scope: { Notifications }
}
}
}
};

export const CounterOnInboxFilters = {
Expand All @@ -183,9 +187,7 @@ export const CounterOnInboxFilters = {
<Counter count={99} color="dark" />
</div>
</>
),

name: "Counter on inbox filters"
)
};

export const CountTheNumberOfUpdates = {
Expand All @@ -204,6 +206,11 @@ export const CountTheNumberOfUpdates = {
</div>
</div>
),

name: "Count the number of updates"
parameters: {
docs: {
liveEdit: {
scope: { AddUpdate, Update }
}
}
}
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import {
DIALOG_CONTENT_CONTAINER,
DROPDOWN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import DialogContentContainer from "../../DialogContentContainer/DialogContentCo
import styles from "./DatePicker.stories.module.scss";
import { RangeDate } from "../types";

// for Chromatic check to always have the same date UI
const MOCK_INITIAL_DATE: RangeDate = { startDate: moment("2023-05-01"), endDate: moment("2023-05-03") };

const metaSettings = createStoryMetaSettingsDecorator({
component: DatePicker,
actionPropsArray: ["onPickDate"]
Expand All @@ -15,12 +18,16 @@ export default {
title: "Components/DatePicker",
component: DatePicker,
argTypes: metaSettings.argTypes,
decorators: metaSettings.decorators
decorators: metaSettings.decorators,
parameters: {
docs: {
liveEdit: {
scope: { MOCK_INITIAL_DATE, styles }
}
}
}
};

// for Chromatic check to always have the same date UI
const MOCK_INITIAL_DATE: RangeDate = { startDate: moment("2023-05-01"), endDate: moment("2023-05-03") };

const DatePickerTemplate = (args: DatePickerProps) => {
const [date, setDate] = useState(MOCK_INITIAL_DATE.startDate);
return (
Expand All @@ -32,7 +39,14 @@ const DatePickerTemplate = (args: DatePickerProps) => {

export const Overview = {
render: DatePickerTemplate.bind({}),
name: "Overview"
name: "Overview",
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

export const SingleDay = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import * as DialogContentContainerStories from "./DialogContentContainer.stories";

<Meta of={DialogContentContainerStories} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ export default {
title: "Components/DialogContentContainer",
component: DialogContentContainer,
argTypes: metaSettings.argTypes,
decorators: metaSettings.decorators
decorators: metaSettings.decorators,
parameters: {
docs: {
liveEdit: {
scope: { DialogContentContainerExample }
}
}
}
};

export const Overview = {
Expand All @@ -24,6 +31,13 @@ export const Overview = {

args: {
children: <DialogContentContainerExample />
},
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

Expand All @@ -32,17 +46,13 @@ export const Popover = {
<DialogContentContainer type={DialogContentContainer.types.POPOVER}>
<DialogContentContainerExample />
</DialogContentContainer>
),

name: "Popover"
)
};

export const Modal = {
render: () => (
<DialogContentContainer type={DialogContentContainer.types.MODAL}>
<DialogContentContainerExample />
</DialogContentContainer>
),

name: "Modal"
)
};
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const Types = {
parameters: {
docs: {
liveEdit: {
scope: { EditableHeading }
scope: { EditableHeading, styles }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import { ACCORDION, DROPDOWN, TABLE } from "../../../storybook/components/related-components/component-description-map";
import { TipCombineMultiple } from "./ExpandCollapse.stories.helpers";
import * as ExpandCollapseStories from "./ExpandCollapse.stories";
Expand Down
Loading

0 comments on commit b511ce2

Please sign in to comment.