@langchain/macaw-components 1.6.1 → 1.6.2
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/catalog.json +710 -710
- package/dist/docs/ControlSizeMatrix.d.ts +16 -0
- package/dist/docs/ControlSizeMatrix.js +34 -0
- package/dist/docs/ControlSizeMatrix.js.map +1 -0
- package/dist/docs/overviewEntries.d.ts +10 -0
- package/dist/docs/overviewEntries.js +557 -0
- package/dist/docs/overviewEntries.js.map +1 -0
- package/dist/docs/phosphor-icon-catalog.d.ts +9 -0
- package/dist/docs/phosphor-icon-catalog.js +459 -0
- package/dist/docs/phosphor-icon-catalog.js.map +1 -0
- package/dist/icons/LongTailPhosphorIcons.js +2 -2
- package/dist/icons/WeightedPhosphorIcons.js +9 -9
- package/package.json +2 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ControlSize } from '../utils/componentSizes.js';
|
|
3
|
+
interface ControlVariantGridProps<Variant extends string> {
|
|
4
|
+
variants: {
|
|
5
|
+
value: Variant;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
children: (variant: Variant) => ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function ControlVariantGrid<Variant extends string>({ variants, children, }: ControlVariantGridProps<Variant>): import("react").JSX.Element;
|
|
11
|
+
interface ControlSizeMatrixProps<Variant extends string> {
|
|
12
|
+
variants: ControlVariantGridProps<Variant>['variants'];
|
|
13
|
+
children: (size: ControlSize, variant: Variant) => ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare function ControlSizeMatrix<Variant extends string>({ variants, children, }: ControlSizeMatrixProps<Variant>): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../utils/componentSizes.js";
|
|
2
|
+
import { Text } from "../components/Text/Text.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region packages/components/src/docs/ControlSizeMatrix.tsx
|
|
5
|
+
function ControlVariantGrid({ variants, children }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: "grid w-[48rem] max-w-full grid-cols-1 gap-space-6 sm:grid-cols-2",
|
|
8
|
+
children: variants.map(({ value, label }) => /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: "flex min-w-0 flex-col gap-space-5",
|
|
10
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
11
|
+
as: "h3",
|
|
12
|
+
weight: "medium",
|
|
13
|
+
children: label
|
|
14
|
+
}), children(value)]
|
|
15
|
+
}, value))
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function ControlSizeMatrix({ variants, children }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(ControlVariantGrid, {
|
|
20
|
+
variants,
|
|
21
|
+
children: (variant) => Object.values(CONTROL_SIZES).map(({ name }) => /* @__PURE__ */ jsxs("div", {
|
|
22
|
+
className: "flex min-w-0 flex-col gap-space-2",
|
|
23
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
24
|
+
variant: "xs",
|
|
25
|
+
color: "secondary",
|
|
26
|
+
children: name
|
|
27
|
+
}), children(name, variant)]
|
|
28
|
+
}, name))
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { ControlSizeMatrix, ControlVariantGrid };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=ControlSizeMatrix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ControlSizeMatrix.js","names":[],"sources":["../../src/docs/ControlSizeMatrix.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Text } from '../components/Text/Text';\nimport { CONTROL_SIZES } from '../utils/componentSizes';\nimport type { ControlSize } from '../utils/componentSizes';\n\ninterface ControlVariantGridProps<Variant extends string> {\n variants: { value: Variant; label: string }[];\n children: (variant: Variant) => ReactNode;\n}\n\nexport function ControlVariantGrid<Variant extends string>({\n variants,\n children,\n}: ControlVariantGridProps<Variant>) {\n return (\n <div className=\"grid w-[48rem] max-w-full grid-cols-1 gap-space-6 sm:grid-cols-2\">\n {variants.map(({ value, label }) => (\n <div key={value} className=\"flex min-w-0 flex-col gap-space-5\">\n <Text as=\"h3\" weight=\"medium\">\n {label}\n </Text>\n {children(value)}\n </div>\n ))}\n </div>\n );\n}\n\ninterface ControlSizeMatrixProps<Variant extends string> {\n variants: ControlVariantGridProps<Variant>['variants'];\n children: (size: ControlSize, variant: Variant) => ReactNode;\n}\n\nexport function ControlSizeMatrix<Variant extends string>({\n variants,\n children,\n}: ControlSizeMatrixProps<Variant>) {\n return (\n <ControlVariantGrid variants={variants}>\n {(variant) =>\n Object.values(CONTROL_SIZES).map(({ name }) => (\n <div key={name} className=\"flex min-w-0 flex-col gap-space-2\">\n <Text variant=\"xs\" color=\"secondary\">\n {name}\n </Text>\n {children(name, variant)}\n </div>\n ))\n }\n </ControlVariantGrid>\n );\n}\n"],"mappings":";;;;AAWA,SAAgB,mBAA2C,EACzD,UACA,YACmC;CACnC,OACE,oBAAC,OAAD;EAAK,WAAU;EACZ,UAAA,SAAS,KAAK,EAAE,OAAO,YACtB,qBAAC,OAAD;GAAiB,WAAU;GAA3B,UAAA,CACE,oBAAC,MAAD;IAAM,IAAG;IAAK,QAAO;IAClB,UAAA;GACG,CAAA,GACL,SAAS,KAAK,CACZ;EALK,GAAA,KAKL,CACN;CACE,CAAA;AAET;AAOA,SAAgB,kBAA0C,EACxD,UACA,YACkC;CAClC,OACE,oBAAC,oBAAD;EAA8B;EAC1B,WAAA,YACA,OAAO,OAAO,aAAa,CAAC,CAAC,KAAK,EAAE,WAClC,qBAAC,OAAD;GAAgB,WAAU;GAA1B,UAAA,CACE,oBAAC,MAAD;IAAM,SAAQ;IAAK,OAAM;IACtB,UAAA;GACG,CAAA,GACL,SAAS,MAAM,OAAO,CACpB;EALK,GAAA,IAKL,CACN;CAEe,CAAA;AAExB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
type OverviewEntry = {
|
|
3
|
+
name: string;
|
|
4
|
+
category: string;
|
|
5
|
+
storybookTitle?: string;
|
|
6
|
+
bodyClassName?: string;
|
|
7
|
+
render: () => ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const additionalOverviewEntries: OverviewEntry[];
|
|
10
|
+
export {};
|