@dust-tt/sparkle 0.2.213 → 0.2.214-pr2
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.
- package/dist/cjs/_index.d.ts +2 -0
- package/dist/cjs/components/Breadcrumbs.d.ts +13 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stories/Breadcrumbs.stories.d.ts +8 -0
- package/dist/esm/_index.d.ts +2 -0
- package/dist/esm/components/Breadcrumbs.d.ts +13 -0
- package/dist/esm/index.js +15 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stories/Breadcrumbs.stories.d.ts +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/_index.ts +3 -0
- package/src/components/Breadcrumbs.tsx +56 -0
- package/src/stories/Breadcrumbs.stories.tsx +31 -0
package/dist/cjs/_index.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ import { Markdown } from "./components/Markdown";
|
|
|
98
98
|
export { Markdown };
|
|
99
99
|
import { DataTable } from "./components/DataTable";
|
|
100
100
|
export { DataTable };
|
|
101
|
+
import { Breadcrumbs } from "@sparkle/components/Breadcrumbs";
|
|
102
|
+
export { Breadcrumbs };
|
|
101
103
|
import { LogoHorizontalColor as LogoHorizontalColorLogo, LogoHorizontalColorLayer1 as LogoHorizontalColorLogoLayer1, LogoHorizontalColorLayer2 as LogoHorizontalColorLogoLayer2, LogoHorizontalDark as LogoHorizontalDarkLogo, LogoHorizontalWhite as LogoHorizontalWhiteLogo, LogoSquareColor as LogoSquareColorLogo, LogoSquareColorLayer1 as LogoSquareColorLogoLayer1, LogoSquareColorLayer2 as LogoSquareColorLogoLayer2, LogoSquareDark as LogoSquareDarkLogo, LogoSquareWhite as LogoSquareWhiteLogo } from "./logo/dust";
|
|
102
104
|
export { LogoHorizontalColorLogo, LogoHorizontalColorLogoLayer1, LogoHorizontalColorLogoLayer2, LogoHorizontalDarkLogo, LogoHorizontalWhiteLogo, LogoSquareColorLogo, LogoSquareColorLogoLayer1, LogoSquareColorLogoLayer2, LogoSquareDarkLogo, LogoSquareWhiteLogo, };
|
|
103
105
|
import { Ai21 as Ai21Logo, Anthropic as AnthropicLogo, AnthropicWhite as AnthropicWhiteLogo, Claude as ClaudeLogo, Cohere as CohereLogo, Confluence as ConfluenceLogo, Drive as DriveLogo, Gemini as GeminiLogo, Github as GithubLogo, GithubWhite as GithubWhiteLogo, Gong as GongLogo, Google as GoogleLogo, GoogleDoc as GoogleDocLogo, GooglePdf as GooglePdfLogo, GoogleSlide as GoogleSlideLogo, GoogleSpreadsheet as GoogleSpreadsheetLogo, Gpt3 as Gpt3Logo, Gpt4 as Gpt4Logo, HuggingFace as HuggingFaceLogo, Intercom as IntercomLogo, Microsoft as MicrosoftLogo, MicrosoftExcel as MicrosoftExcelLogo, MicrosoftPowerpoint as MicrosoftPowerpointLogo, MicrosoftWord as MicrosoftWordLogo, Mistral as MistralLogo, Notion as NotionLogo, Office as OfficeLogo, Openai as OpenaiLogo, OpenaiWhite as OpenaiWhiteLogo, Replicate as ReplicateLogo, Salesforce as SalesforceLogo, Slack as SlackLogo, Zapier as ZapierLogo, Zendesk as ZendeskLogo } from "./logo/platforms";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
type BreadcrumbProps = {
|
|
4
|
+
items: {
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ComponentType<{
|
|
7
|
+
className?: string;
|
|
8
|
+
}>;
|
|
9
|
+
href?: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
export declare function Breadcrumbs({ items }: BreadcrumbProps): React.JSX.Element;
|
|
13
|
+
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -129182,6 +129182,20 @@ DataTable.Caption = function Caption(_a) {
|
|
|
129182
129182
|
return (React.createElement("caption", __assign({ className: className }, props), children));
|
|
129183
129183
|
};
|
|
129184
129184
|
|
|
129185
|
+
function Breadcrumbs(_a) {
|
|
129186
|
+
var items = _a.items;
|
|
129187
|
+
var components = React.useContext(SparkleContext).components;
|
|
129188
|
+
var Link = components.link;
|
|
129189
|
+
return (React.createElement("div", { className: "gap-2 s-flex s-flex-row s-items-center" }, items.map(function (item, index) { return (React.createElement("div", { key: index, className: "s-flex s-flex-row s-items-center s-gap-1" },
|
|
129190
|
+
React.createElement(Icon, { visual: item.icon, className: "s-text-brand" }),
|
|
129191
|
+
React.createElement("div", null, item.href ? (React.createElement(Link, { href: item.href, className: index === items.length - 1
|
|
129192
|
+
? "s-text-element-900"
|
|
129193
|
+
: "s-text-element-700" }, item.label)) : (React.createElement("span", { className: index === items.length - 1
|
|
129194
|
+
? "s-text-element-900"
|
|
129195
|
+
: "s-text-element-700" }, item.label))),
|
|
129196
|
+
index === items.length - 1 ? null : (React.createElement(SvgChevronRight$1, { className: "s-text-element-500" })))); })));
|
|
129197
|
+
}
|
|
129198
|
+
|
|
129185
129199
|
var SvgLogoHorizontalColor = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 96 24" }, props),
|
|
129186
129200
|
React__namespace.createElement("path", { fill: "#FCD34D", d: "M84 12H72v12h12V12Z" }),
|
|
129187
129201
|
React__namespace.createElement("path", { fill: "#6EE7B7", d: "M12 24c6.627 0 12-5.373 12-12S18.627 0 12 0 0 5.373 0 12s5.373 12 12 12Z" }),
|
|
@@ -129279,6 +129293,7 @@ exports.BookmarkIcon = SvgBookmark$1;
|
|
|
129279
129293
|
exports.BookmarkStrokeIcon = SvgBookmark;
|
|
129280
129294
|
exports.BracesIcon = SvgBraces$1;
|
|
129281
129295
|
exports.BracesStrokeIcon = SvgBraces;
|
|
129296
|
+
exports.Breadcrumbs = Breadcrumbs;
|
|
129282
129297
|
exports.Button = Button;
|
|
129283
129298
|
exports.CardButton = CardButton;
|
|
129284
129299
|
exports.CardIcon = SvgCard$1;
|