@usefragments/ui 1.3.3 → 1.5.0
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/assets/ui.css +1212 -798
- package/dist/chart.cjs +60 -24
- package/dist/chart.js +38 -24
- package/dist/colorpicker.cjs +56 -9
- package/dist/colorpicker.js +34 -9
- package/dist/components/Badge/Badge.module.scss.cjs +23 -16
- package/dist/components/Badge/Badge.module.scss.js +23 -16
- package/dist/components/Badge/index.cjs +8 -1
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +8 -1
- package/dist/components/Button/Button.module.scss.cjs +16 -13
- package/dist/components/Button/Button.module.scss.js +16 -13
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Card/index.cjs +2 -2
- package/dist/components/Card/index.d.ts +4 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Card/index.js +2 -2
- package/dist/components/Chart/index.d.ts +3 -0
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
- package/dist/components/ColorPicker/index.d.ts +4 -0
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +23 -23
- package/dist/components/Combobox/Combobox.module.scss.js +23 -23
- package/dist/components/Command/Command.module.scss.cjs +11 -11
- package/dist/components/Command/Command.module.scss.js +11 -11
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +13 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +14 -11
- package/dist/components/ConversationList/index.cjs +26 -22
- package/dist/components/ConversationList/index.d.ts +5 -1
- package/dist/components/ConversationList/index.d.ts.map +1 -1
- package/dist/components/ConversationList/index.js +27 -23
- package/dist/components/DataTable/index.d.ts +4 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Editor/index.d.ts +4 -1
- package/dist/components/Editor/index.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Markdown/index.d.ts +16 -0
- package/dist/components/Markdown/index.d.ts.map +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- package/dist/components/Message/Message.module.scss.cjs +23 -20
- package/dist/components/Message/Message.module.scss.js +24 -21
- package/dist/components/Message/index.cjs +5 -1
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +5 -1
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
- package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
- package/dist/components/Pagination/Pagination.module.scss.js +7 -7
- package/dist/components/Progress/Progress.module.scss.cjs +28 -25
- package/dist/components/Progress/Progress.module.scss.js +28 -25
- package/dist/components/Progress/index.cjs +3 -0
- package/dist/components/Progress/index.d.ts +8 -8
- package/dist/components/Progress/index.d.ts.map +1 -1
- package/dist/components/Progress/index.js +3 -0
- package/dist/components/Prompt/Prompt.module.scss.cjs +52 -22
- package/dist/components/Prompt/Prompt.module.scss.js +52 -22
- package/dist/components/Prompt/index.cjs +197 -2
- package/dist/components/Prompt/index.d.ts +98 -3
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +198 -3
- package/dist/components/Select/Select.module.scss.cjs +29 -17
- package/dist/components/Select/Select.module.scss.js +30 -18
- package/dist/components/Select/index.cjs +45 -8
- package/dist/components/Select/index.d.ts +17 -2
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +45 -8
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +45 -42
- package/dist/components/Sidebar/Sidebar.module.scss.js +45 -42
- package/dist/components/Sidebar/index.cjs +2 -0
- package/dist/components/Sidebar/index.d.ts +6 -1
- package/dist/components/Sidebar/index.d.ts.map +1 -1
- package/dist/components/Sidebar/index.js +2 -0
- package/dist/components/Text/Text.module.scss.cjs +63 -51
- package/dist/components/Text/Text.module.scss.js +63 -51
- package/dist/components/Text/index.d.ts +4 -2
- package/dist/components/Text/index.d.ts.map +1 -1
- package/dist/data-table.cjs +210 -28
- package/dist/data-table.js +189 -29
- package/dist/datepicker.cjs +63 -14
- package/dist/datepicker.js +41 -14
- package/dist/editor.cjs +67 -16
- package/dist/editor.js +45 -16
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/markdown.cjs +63 -19
- package/dist/markdown.js +41 -19
- package/fragments.json +1 -1
- package/package.json +2 -2
- package/src/components/Badge/Badge.contract.json +28 -5
- package/src/components/Badge/Badge.module.scss +21 -0
- package/src/components/Badge/index.tsx +10 -1
- package/src/components/Button/Button.contract.json +9 -3
- package/src/components/Button/Button.module.scss +34 -0
- package/src/components/Button/index.tsx +11 -1
- package/src/components/Card/Card.contract.json +5 -0
- package/src/components/Card/index.tsx +6 -3
- package/src/components/Chart/Chart.contract.json +7 -0
- package/src/components/Chart/index.tsx +44 -27
- package/src/components/CodeBlock/CodeBlock.contract.json +7 -0
- package/src/components/CodeBlock/CodeBlock.module.scss +7 -2
- package/src/components/ColorPicker/ColorPicker.contract.json +9 -1
- package/src/components/ColorPicker/index.tsx +42 -12
- package/src/components/Combobox/Combobox.module.scss +4 -13
- package/src/components/ConversationList/ConversationList.contract.json +16 -1
- package/src/components/ConversationList/ConversationList.module.scss +12 -0
- package/src/components/ConversationList/index.tsx +40 -26
- package/src/components/DataTable/DataTable.contract.json +8 -1
- package/src/components/DataTable/index.tsx +282 -51
- package/src/components/DatePicker/DatePicker.contract.json +8 -1
- package/src/components/DatePicker/index.tsx +51 -22
- package/src/components/Editor/Editor.contract.json +19 -1
- package/src/components/Editor/index.tsx +67 -23
- package/src/components/Listbox/Listbox.module.scss +3 -11
- package/src/components/Markdown/Markdown.contract.json +15 -1
- package/src/components/Markdown/Markdown.module.scss +18 -1
- package/src/components/Markdown/index.tsx +58 -24
- package/src/components/Menu/Menu.module.scss +12 -2
- package/src/components/Message/Message.contract.json +3 -0
- package/src/components/Message/Message.module.scss +33 -4
- package/src/components/Message/index.tsx +7 -1
- package/src/components/Pagination/Pagination.contract.json +1 -0
- package/src/components/Pagination/Pagination.module.scss +5 -4
- package/src/components/Progress/Progress.contract.json +9 -27
- package/src/components/Progress/Progress.module.scss +5 -1
- package/src/components/Progress/index.tsx +56 -62
- package/src/components/Prompt/Prompt.contract.json +40 -1
- package/src/components/Prompt/Prompt.module.scss +351 -4
- package/src/components/Prompt/index.tsx +324 -0
- package/src/components/Select/Select.contract.json +11 -1
- package/src/components/Select/Select.module.scss +80 -13
- package/src/components/Select/index.tsx +73 -7
- package/src/components/Sidebar/Sidebar.contract.json +1 -0
- package/src/components/Sidebar/Sidebar.module.scss +10 -0
- package/src/components/Sidebar/index.tsx +7 -0
- package/src/components/Text/Text.contract.json +7 -4
- package/src/components/Text/Text.module.scss +18 -0
- package/src/components/Text/index.tsx +4 -2
- package/src/index.ts +1 -0
- package/src/tokens/_mixins.scss +39 -4
- package/src/tokens/_variables.scss +30 -0
|
@@ -10,9 +10,10 @@ type ButtonBaseProps = {
|
|
|
10
10
|
* @see https://usefragments.com/components/button#variants
|
|
11
11
|
* @remarks
|
|
12
12
|
* - `"link"` — accent-coloured, transparent; for tertiary CTAs like "View all →"
|
|
13
|
+
* - `"quiet"` — neutral text button with no box and no height floor; for meta lines and footnotes
|
|
13
14
|
* - `"icon"` — convenience alias for outlined + icon-only layout
|
|
14
15
|
* - `"outline"` — alias for `"outlined"` */
|
|
15
|
-
variant?: "primary" | "secondary" | "ghost" | "link" | "danger" | "outlined" | "outline" | "icon";
|
|
16
|
+
variant?: "primary" | "secondary" | "ghost" | "link" | "quiet" | "danger" | "outlined" | "outline" | "icon";
|
|
16
17
|
/** Button size. `"xs"` is for inline row-action controls (accept/dismiss, table-row icons) where `"sm"` is too tall.
|
|
17
18
|
* @default "md"
|
|
18
19
|
* @see https://usefragments.com/components/button#sizes */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;gDAO4C;IAC5C,OAAO,CAAC,EACJ,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,SAAS,GACT,MAAM,CAAC;IACX;;+DAE2D;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,sHAAsH;IACtH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;iEAC6D;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAGF,MAAM,WAAW,mBACf,SAAQ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACxF,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf;AAGD,MAAM,WAAW,mBACf,SAAQ,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC;IACxF,EAAE,EAAE,GAAG,CAAC;CACT;AAED,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG,mBAAmB,CAAC;AAgIpE,eAAO,MAAM,MAAM;;CAEjB,CAAC"}
|
|
@@ -92,9 +92,9 @@ function CardHeader({ children, divided, className, ...htmlProps }) {
|
|
|
92
92
|
const classes = [Card_module.default.header, divided && Card_module.default.headerDivided, className].filter(Boolean).join(" ");
|
|
93
93
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ...htmlProps, className: classes, children });
|
|
94
94
|
}
|
|
95
|
-
function CardTitle({ children, className, ...htmlProps }) {
|
|
95
|
+
function CardTitle({ children, as: Component = "h3", className, ...htmlProps }) {
|
|
96
96
|
const classes = [Card_module.default.title, className].filter(Boolean).join(" ");
|
|
97
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...htmlProps, className: classes, children });
|
|
98
98
|
}
|
|
99
99
|
function CardDescription({ children, className, ...htmlProps }) {
|
|
100
100
|
const classes = [Card_module.default.description, className].filter(Boolean).join(" ");
|
|
@@ -32,6 +32,9 @@ export interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
32
32
|
}
|
|
33
33
|
export interface CardTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
34
34
|
children: React.ReactNode;
|
|
35
|
+
/** Semantic heading level.
|
|
36
|
+
* @default "h3" */
|
|
37
|
+
as?: "h2" | "h3" | "h4" | "h5" | "h6";
|
|
35
38
|
}
|
|
36
39
|
export interface CardDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
37
40
|
children: React.ReactNode;
|
|
@@ -47,7 +50,7 @@ export interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
47
50
|
}
|
|
48
51
|
declare function CardRoot({ children, variant: variantProp, padding, as: Component, className, style, ...htmlProps }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
49
52
|
declare function CardHeader({ children, divided, className, ...htmlProps }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
-
declare function CardTitle({ children, className, ...htmlProps }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function CardTitle({ children, as: Component, className, ...htmlProps }: CardTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
51
54
|
declare function CardDescription({ children, className, ...htmlProps }: CardDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
52
55
|
declare function CardBody({ children, padding, className, ...htmlProps }: CardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
53
56
|
declare function CardFooter({ children, className, ...htmlProps }: CardFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Card/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;GAGG;AACH,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACpF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;;;gEAS4D;IAC5D,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7E;uBACmB;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC;4BACwB;IACxB,EAAE,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,eAAgB,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,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -73,9 +73,9 @@ function CardHeader({ children, divided, className, ...htmlProps }) {
|
|
|
73
73
|
const classes = [styles.header, divided && styles.headerDivided, className].filter(Boolean).join(" ");
|
|
74
74
|
return /* @__PURE__ */ jsx("div", { ...htmlProps, className: classes, children });
|
|
75
75
|
}
|
|
76
|
-
function CardTitle({ children, className, ...htmlProps }) {
|
|
76
|
+
function CardTitle({ children, as: Component = "h3", className, ...htmlProps }) {
|
|
77
77
|
const classes = [styles.title, className].filter(Boolean).join(" ");
|
|
78
|
-
return /* @__PURE__ */ jsx(
|
|
78
|
+
return /* @__PURE__ */ jsx(Component, { ...htmlProps, className: classes, children });
|
|
79
79
|
}
|
|
80
80
|
function CardDescription({ children, className, ...htmlProps }) {
|
|
81
81
|
const classes = [styles.description, className].filter(Boolean).join(" ");
|
|
@@ -36,6 +36,7 @@ export interface ChartLegendContentProps {
|
|
|
36
36
|
}[];
|
|
37
37
|
}
|
|
38
38
|
type RechartsLegendProps = Record<string, unknown>;
|
|
39
|
+
declare function loadChartDeps(): Promise<void>;
|
|
39
40
|
export declare function useChartConfig(): ChartConfig;
|
|
40
41
|
export declare function ChartContainer({ config, children, className, style, summary, dataTable, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, ...htmlProps }: ChartContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
41
42
|
export declare function ChartTooltipContent({ active, payload, label, indicator, hideLabel, hideIndicator, labelFormatter, valueFormatter, }: ChartTooltipContentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -60,6 +61,8 @@ export declare const Chart: typeof ChartContainer & {
|
|
|
60
61
|
TooltipContent: typeof ChartTooltipContent;
|
|
61
62
|
Legend: typeof ChartLegend;
|
|
62
63
|
LegendContent: typeof ChartLegendContent;
|
|
64
|
+
/** Start resolving recharts before first render (optional). */
|
|
65
|
+
preload: typeof loadChartDeps;
|
|
63
66
|
};
|
|
64
67
|
export {};
|
|
65
68
|
//#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AAiB,GAAG;IACvB,SAAS,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,cAAc,CAAC,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;IAC5D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IACzF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,OAAO,EACP,GAAG,KAAK,EACT,EAAE,iBAAiB,kDAgCnB;AAMD,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,uBAAuB,kDAyBtE;AAMD,KAAK,gBAAgB,GAAG,mBAAmB,GAAG;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CACzF,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,kDAmBlE;AAED,eAAO,MAAM,KAAK;;;;;;IAMhB,+DAA+D;;CAE/D,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const container = "
|
|
4
|
-
const title = "
|
|
5
|
-
const wrapper = "
|
|
6
|
-
const header = "
|
|
7
|
-
const filename = "
|
|
8
|
-
const copyButton = "
|
|
9
|
-
const copied = "
|
|
10
|
-
const copyOverlay = "
|
|
11
|
-
const withCopyOverlay = "
|
|
12
|
-
const codeContainer = "
|
|
13
|
-
const loading = "
|
|
14
|
-
const icon = "
|
|
15
|
-
const persistentCopy = "
|
|
16
|
-
const persistentCopyWrapper = "
|
|
17
|
-
const withLineNumbers = "
|
|
18
|
-
const withDiff = "
|
|
19
|
-
const compact = "
|
|
20
|
-
const wordWrap = "
|
|
21
|
-
const caption = "
|
|
22
|
-
const collapseButton = "
|
|
23
|
-
const tabbedPanel = "
|
|
3
|
+
const container = "_container_1nldn_1";
|
|
4
|
+
const title = "_title_1nldn_5";
|
|
5
|
+
const wrapper = "_wrapper_1nldn_14";
|
|
6
|
+
const header = "_header_1nldn_21";
|
|
7
|
+
const filename = "_filename_1nldn_31";
|
|
8
|
+
const copyButton = "_copyButton_1nldn_39";
|
|
9
|
+
const copied = "_copied_1nldn_77";
|
|
10
|
+
const copyOverlay = "_copyOverlay_1nldn_82";
|
|
11
|
+
const withCopyOverlay = "_withCopyOverlay_1nldn_93";
|
|
12
|
+
const codeContainer = "_codeContainer_1nldn_100";
|
|
13
|
+
const loading = "_loading_1nldn_101";
|
|
14
|
+
const icon = "_icon_1nldn_105";
|
|
15
|
+
const persistentCopy = "_persistentCopy_1nldn_109";
|
|
16
|
+
const persistentCopyWrapper = "_persistentCopyWrapper_1nldn_115";
|
|
17
|
+
const withLineNumbers = "_withLineNumbers_1nldn_199";
|
|
18
|
+
const withDiff = "_withDiff_1nldn_203";
|
|
19
|
+
const compact = "_compact_1nldn_227";
|
|
20
|
+
const wordWrap = "_wordWrap_1nldn_244";
|
|
21
|
+
const caption = "_caption_1nldn_254";
|
|
22
|
+
const collapseButton = "_collapseButton_1nldn_260";
|
|
23
|
+
const tabbedPanel = "_tabbedPanel_1nldn_303";
|
|
24
24
|
const styles = {
|
|
25
25
|
container,
|
|
26
26
|
title,
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const container = "
|
|
2
|
-
const title = "
|
|
3
|
-
const wrapper = "
|
|
4
|
-
const header = "
|
|
5
|
-
const filename = "
|
|
6
|
-
const copyButton = "
|
|
7
|
-
const copied = "
|
|
8
|
-
const copyOverlay = "
|
|
9
|
-
const withCopyOverlay = "
|
|
10
|
-
const codeContainer = "
|
|
11
|
-
const loading = "
|
|
12
|
-
const icon = "
|
|
13
|
-
const persistentCopy = "
|
|
14
|
-
const persistentCopyWrapper = "
|
|
15
|
-
const withLineNumbers = "
|
|
16
|
-
const withDiff = "
|
|
17
|
-
const compact = "
|
|
18
|
-
const wordWrap = "
|
|
19
|
-
const caption = "
|
|
20
|
-
const collapseButton = "
|
|
21
|
-
const tabbedPanel = "
|
|
1
|
+
const container = "_container_1nldn_1";
|
|
2
|
+
const title = "_title_1nldn_5";
|
|
3
|
+
const wrapper = "_wrapper_1nldn_14";
|
|
4
|
+
const header = "_header_1nldn_21";
|
|
5
|
+
const filename = "_filename_1nldn_31";
|
|
6
|
+
const copyButton = "_copyButton_1nldn_39";
|
|
7
|
+
const copied = "_copied_1nldn_77";
|
|
8
|
+
const copyOverlay = "_copyOverlay_1nldn_82";
|
|
9
|
+
const withCopyOverlay = "_withCopyOverlay_1nldn_93";
|
|
10
|
+
const codeContainer = "_codeContainer_1nldn_100";
|
|
11
|
+
const loading = "_loading_1nldn_101";
|
|
12
|
+
const icon = "_icon_1nldn_105";
|
|
13
|
+
const persistentCopy = "_persistentCopy_1nldn_109";
|
|
14
|
+
const persistentCopyWrapper = "_persistentCopyWrapper_1nldn_115";
|
|
15
|
+
const withLineNumbers = "_withLineNumbers_1nldn_199";
|
|
16
|
+
const withDiff = "_withDiff_1nldn_203";
|
|
17
|
+
const compact = "_compact_1nldn_227";
|
|
18
|
+
const wordWrap = "_wordWrap_1nldn_244";
|
|
19
|
+
const caption = "_caption_1nldn_254";
|
|
20
|
+
const collapseButton = "_collapseButton_1nldn_260";
|
|
21
|
+
const tabbedPanel = "_tabbedPanel_1nldn_303";
|
|
22
22
|
const styles = {
|
|
23
23
|
container,
|
|
24
24
|
title,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
declare function loadColorfulDeps(): Promise<void>;
|
|
2
3
|
export interface ColorPickerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
|
|
3
4
|
/** Label text above the picker */
|
|
4
5
|
label?: string;
|
|
@@ -25,5 +26,8 @@ export interface ColorPickerProps extends Omit<React.HTMLAttributes<HTMLDivEleme
|
|
|
25
26
|
}
|
|
26
27
|
export declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>> & {
|
|
27
28
|
Root: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
/** Start resolving react-colorful before first render (optional). */
|
|
30
|
+
preload: typeof loadColorfulDeps;
|
|
28
31
|
};
|
|
32
|
+
export {};
|
|
29
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ColorPicker/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,iBAAS,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkBzC;AAqBD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EACpC,UAAU,GAAG,cAAc,CAC5B;IACC,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,4CAA4C;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yBAAyB;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AA4HD,eAAO,MAAM,WAAW;;IAEtB,qEAAqE;;CAErE,CAAC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const wrapper = "
|
|
4
|
-
const label = "
|
|
5
|
-
const helper = "
|
|
6
|
-
const helperError = "
|
|
7
|
-
const errorMessage = "
|
|
8
|
-
const inputWrapper = "
|
|
9
|
-
const inputWrapperSm = "
|
|
10
|
-
const inputWrapperLg = "
|
|
11
|
-
const inputSm = "
|
|
12
|
-
const inputLg = "
|
|
13
|
-
const input = "
|
|
14
|
-
const chips = "
|
|
15
|
-
const chip = "
|
|
16
|
-
const chipLabel = "
|
|
17
|
-
const chipRemove = "
|
|
18
|
-
const trigger = "
|
|
19
|
-
const positioner = "
|
|
20
|
-
const popup = "
|
|
21
|
-
const item = "
|
|
22
|
-
const itemIndicator = "
|
|
23
|
-
const empty = "
|
|
24
|
-
const group = "
|
|
25
|
-
const groupLabel = "
|
|
3
|
+
const wrapper = "_wrapper_1hwb3_1";
|
|
4
|
+
const label = "_label_1hwb3_6";
|
|
5
|
+
const helper = "_helper_1hwb3_19";
|
|
6
|
+
const helperError = "_helperError_1hwb3_26";
|
|
7
|
+
const errorMessage = "_errorMessage_1hwb3_30";
|
|
8
|
+
const inputWrapper = "_inputWrapper_1hwb3_36";
|
|
9
|
+
const inputWrapperSm = "_inputWrapperSm_1hwb3_74";
|
|
10
|
+
const inputWrapperLg = "_inputWrapperLg_1hwb3_78";
|
|
11
|
+
const inputSm = "_inputSm_1hwb3_82";
|
|
12
|
+
const inputLg = "_inputLg_1hwb3_86";
|
|
13
|
+
const input = "_input_1hwb3_36";
|
|
14
|
+
const chips = "_chips_1hwb3_119";
|
|
15
|
+
const chip = "_chip_1hwb3_119";
|
|
16
|
+
const chipLabel = "_chipLabel_1hwb3_139";
|
|
17
|
+
const chipRemove = "_chipRemove_1hwb3_145";
|
|
18
|
+
const trigger = "_trigger_1hwb3_180";
|
|
19
|
+
const positioner = "_positioner_1hwb3_226";
|
|
20
|
+
const popup = "_popup_1hwb3_231";
|
|
21
|
+
const item = "_item_1hwb3_269";
|
|
22
|
+
const itemIndicator = "_itemIndicator_1hwb3_318";
|
|
23
|
+
const empty = "_empty_1hwb3_332";
|
|
24
|
+
const group = "_group_1hwb3_347";
|
|
25
|
+
const groupLabel = "_groupLabel_1hwb3_353";
|
|
26
26
|
const styles = {
|
|
27
27
|
wrapper,
|
|
28
28
|
label,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const wrapper = "
|
|
2
|
-
const label = "
|
|
3
|
-
const helper = "
|
|
4
|
-
const helperError = "
|
|
5
|
-
const errorMessage = "
|
|
6
|
-
const inputWrapper = "
|
|
7
|
-
const inputWrapperSm = "
|
|
8
|
-
const inputWrapperLg = "
|
|
9
|
-
const inputSm = "
|
|
10
|
-
const inputLg = "
|
|
11
|
-
const input = "
|
|
12
|
-
const chips = "
|
|
13
|
-
const chip = "
|
|
14
|
-
const chipLabel = "
|
|
15
|
-
const chipRemove = "
|
|
16
|
-
const trigger = "
|
|
17
|
-
const positioner = "
|
|
18
|
-
const popup = "
|
|
19
|
-
const item = "
|
|
20
|
-
const itemIndicator = "
|
|
21
|
-
const empty = "
|
|
22
|
-
const group = "
|
|
23
|
-
const groupLabel = "
|
|
1
|
+
const wrapper = "_wrapper_1hwb3_1";
|
|
2
|
+
const label = "_label_1hwb3_6";
|
|
3
|
+
const helper = "_helper_1hwb3_19";
|
|
4
|
+
const helperError = "_helperError_1hwb3_26";
|
|
5
|
+
const errorMessage = "_errorMessage_1hwb3_30";
|
|
6
|
+
const inputWrapper = "_inputWrapper_1hwb3_36";
|
|
7
|
+
const inputWrapperSm = "_inputWrapperSm_1hwb3_74";
|
|
8
|
+
const inputWrapperLg = "_inputWrapperLg_1hwb3_78";
|
|
9
|
+
const inputSm = "_inputSm_1hwb3_82";
|
|
10
|
+
const inputLg = "_inputLg_1hwb3_86";
|
|
11
|
+
const input = "_input_1hwb3_36";
|
|
12
|
+
const chips = "_chips_1hwb3_119";
|
|
13
|
+
const chip = "_chip_1hwb3_119";
|
|
14
|
+
const chipLabel = "_chipLabel_1hwb3_139";
|
|
15
|
+
const chipRemove = "_chipRemove_1hwb3_145";
|
|
16
|
+
const trigger = "_trigger_1hwb3_180";
|
|
17
|
+
const positioner = "_positioner_1hwb3_226";
|
|
18
|
+
const popup = "_popup_1hwb3_231";
|
|
19
|
+
const item = "_item_1hwb3_269";
|
|
20
|
+
const itemIndicator = "_itemIndicator_1hwb3_318";
|
|
21
|
+
const empty = "_empty_1hwb3_332";
|
|
22
|
+
const group = "_group_1hwb3_347";
|
|
23
|
+
const groupLabel = "_groupLabel_1hwb3_353";
|
|
24
24
|
const styles = {
|
|
25
25
|
wrapper,
|
|
26
26
|
label,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const command = "
|
|
4
|
-
const inputWrapper = "
|
|
5
|
-
const input = "
|
|
6
|
-
const list = "
|
|
7
|
-
const item = "
|
|
8
|
-
const itemActive = "
|
|
9
|
-
const itemDisabled = "
|
|
10
|
-
const group = "
|
|
11
|
-
const groupHeading = "
|
|
12
|
-
const empty = "
|
|
13
|
-
const separator = "
|
|
3
|
+
const command = "_command_18jdg_1";
|
|
4
|
+
const inputWrapper = "_inputWrapper_18jdg_11";
|
|
5
|
+
const input = "_input_18jdg_11";
|
|
6
|
+
const list = "_list_18jdg_70";
|
|
7
|
+
const item = "_item_18jdg_76";
|
|
8
|
+
const itemActive = "_itemActive_18jdg_114";
|
|
9
|
+
const itemDisabled = "_itemDisabled_18jdg_119";
|
|
10
|
+
const group = "_group_18jdg_125";
|
|
11
|
+
const groupHeading = "_groupHeading_18jdg_129";
|
|
12
|
+
const empty = "_empty_18jdg_136";
|
|
13
|
+
const separator = "_separator_18jdg_143";
|
|
14
14
|
const styles = {
|
|
15
15
|
command,
|
|
16
16
|
inputWrapper,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const command = "
|
|
2
|
-
const inputWrapper = "
|
|
3
|
-
const input = "
|
|
4
|
-
const list = "
|
|
5
|
-
const item = "
|
|
6
|
-
const itemActive = "
|
|
7
|
-
const itemDisabled = "
|
|
8
|
-
const group = "
|
|
9
|
-
const groupHeading = "
|
|
10
|
-
const empty = "
|
|
11
|
-
const separator = "
|
|
1
|
+
const command = "_command_18jdg_1";
|
|
2
|
+
const inputWrapper = "_inputWrapper_18jdg_11";
|
|
3
|
+
const input = "_input_18jdg_11";
|
|
4
|
+
const list = "_list_18jdg_70";
|
|
5
|
+
const item = "_item_18jdg_76";
|
|
6
|
+
const itemActive = "_itemActive_18jdg_114";
|
|
7
|
+
const itemDisabled = "_itemDisabled_18jdg_119";
|
|
8
|
+
const group = "_group_18jdg_125";
|
|
9
|
+
const groupHeading = "_groupHeading_18jdg_129";
|
|
10
|
+
const empty = "_empty_18jdg_136";
|
|
11
|
+
const separator = "_separator_18jdg_143";
|
|
12
12
|
const styles = {
|
|
13
13
|
command,
|
|
14
14
|
inputWrapper,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const conversationList = "
|
|
4
|
-
const content = "
|
|
5
|
-
const loadingHistory = "
|
|
6
|
-
const dateSeparator = "
|
|
7
|
-
const dateSeparatorLine = "
|
|
8
|
-
const dateSeparatorText = "
|
|
9
|
-
const typingIndicator = "
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
3
|
+
const conversationList = "_conversationList_zr7xl_1";
|
|
4
|
+
const content = "_content_zr7xl_16";
|
|
5
|
+
const loadingHistory = "_loadingHistory_zr7xl_25";
|
|
6
|
+
const dateSeparator = "_dateSeparator_zr7xl_52";
|
|
7
|
+
const dateSeparatorLine = "_dateSeparatorLine_zr7xl_59";
|
|
8
|
+
const dateSeparatorText = "_dateSeparatorText_zr7xl_65";
|
|
9
|
+
const typingIndicator = "_typingIndicator_zr7xl_76";
|
|
10
|
+
const withoutAvatar = "_withoutAvatar_zr7xl_83";
|
|
11
|
+
const typingAvatar = "_typingAvatar_zr7xl_87";
|
|
12
|
+
const typingContent = "_typingContent_zr7xl_103";
|
|
13
|
+
const typingDot = "_typingDot_zr7xl_112";
|
|
13
14
|
const styles = {
|
|
14
15
|
conversationList,
|
|
15
16
|
content,
|
|
@@ -18,6 +19,7 @@ const styles = {
|
|
|
18
19
|
dateSeparatorLine,
|
|
19
20
|
dateSeparatorText,
|
|
20
21
|
typingIndicator,
|
|
22
|
+
withoutAvatar,
|
|
21
23
|
typingAvatar,
|
|
22
24
|
typingContent,
|
|
23
25
|
typingDot
|
|
@@ -33,3 +35,4 @@ exports.typingAvatar = typingAvatar;
|
|
|
33
35
|
exports.typingContent = typingContent;
|
|
34
36
|
exports.typingDot = typingDot;
|
|
35
37
|
exports.typingIndicator = typingIndicator;
|
|
38
|
+
exports.withoutAvatar = withoutAvatar;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
const conversationList = "
|
|
2
|
-
const content = "
|
|
3
|
-
const loadingHistory = "
|
|
4
|
-
const dateSeparator = "
|
|
5
|
-
const dateSeparatorLine = "
|
|
6
|
-
const dateSeparatorText = "
|
|
7
|
-
const typingIndicator = "
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
1
|
+
const conversationList = "_conversationList_zr7xl_1";
|
|
2
|
+
const content = "_content_zr7xl_16";
|
|
3
|
+
const loadingHistory = "_loadingHistory_zr7xl_25";
|
|
4
|
+
const dateSeparator = "_dateSeparator_zr7xl_52";
|
|
5
|
+
const dateSeparatorLine = "_dateSeparatorLine_zr7xl_59";
|
|
6
|
+
const dateSeparatorText = "_dateSeparatorText_zr7xl_65";
|
|
7
|
+
const typingIndicator = "_typingIndicator_zr7xl_76";
|
|
8
|
+
const withoutAvatar = "_withoutAvatar_zr7xl_83";
|
|
9
|
+
const typingAvatar = "_typingAvatar_zr7xl_87";
|
|
10
|
+
const typingContent = "_typingContent_zr7xl_103";
|
|
11
|
+
const typingDot = "_typingDot_zr7xl_112";
|
|
11
12
|
const styles = {
|
|
12
13
|
conversationList,
|
|
13
14
|
content,
|
|
@@ -16,6 +17,7 @@ const styles = {
|
|
|
16
17
|
dateSeparatorLine,
|
|
17
18
|
dateSeparatorText,
|
|
18
19
|
typingIndicator,
|
|
20
|
+
withoutAvatar,
|
|
19
21
|
typingAvatar,
|
|
20
22
|
typingContent,
|
|
21
23
|
typingDot
|
|
@@ -31,5 +33,6 @@ export {
|
|
|
31
33
|
typingAvatar,
|
|
32
34
|
typingContent,
|
|
33
35
|
typingDot,
|
|
34
|
-
typingIndicator
|
|
36
|
+
typingIndicator,
|
|
37
|
+
withoutAvatar
|
|
35
38
|
};
|
|
@@ -23,8 +23,11 @@ function _interopNamespaceDefault(e) {
|
|
|
23
23
|
}
|
|
24
24
|
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
25
25
|
const ConversationListContext = React__namespace.createContext(null);
|
|
26
|
+
function useOptionalConversationList() {
|
|
27
|
+
return React__namespace.useContext(ConversationListContext);
|
|
28
|
+
}
|
|
26
29
|
function useConversationList() {
|
|
27
|
-
const context =
|
|
30
|
+
const context = useOptionalConversationList();
|
|
28
31
|
if (!context) {
|
|
29
32
|
throw new Error("useConversationList must be used within a ConversationList");
|
|
30
33
|
}
|
|
@@ -67,9 +70,15 @@ function TypingIndicator({
|
|
|
67
70
|
className,
|
|
68
71
|
...htmlProps
|
|
69
72
|
}) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
var _a;
|
|
74
|
+
const showAvatar = (((_a = useOptionalConversationList()) == null ? void 0 : _a.showAvatars) ?? true) && Boolean(avatar);
|
|
75
|
+
const classes = [
|
|
76
|
+
ConversationList_module.default.typingIndicator,
|
|
77
|
+
!showAvatar && ConversationList_module.default.withoutAvatar,
|
|
78
|
+
className
|
|
79
|
+
].filter(Boolean).join(" ");
|
|
80
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...htmlProps, className: classes, role: "status", "aria-label": `${name} is typing`, children: [
|
|
81
|
+
showAvatar && /* @__PURE__ */ jsxRuntime.jsx("div", { className: ConversationList_module.default.typingAvatar, children: avatar }),
|
|
73
82
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: ConversationList_module.default.typingContent, children: [
|
|
74
83
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ConversationList_module.default.typingDot }),
|
|
75
84
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: ConversationList_module.default.typingDot }),
|
|
@@ -79,6 +88,7 @@ function TypingIndicator({
|
|
|
79
88
|
}
|
|
80
89
|
function ConversationListRoot({
|
|
81
90
|
children,
|
|
91
|
+
showAvatars = true,
|
|
82
92
|
autoScroll = "smart",
|
|
83
93
|
onScrollTop,
|
|
84
94
|
loadingHistory = false,
|
|
@@ -91,7 +101,6 @@ function ConversationListRoot({
|
|
|
91
101
|
const containerRef = React__namespace.useRef(null);
|
|
92
102
|
const contentRef = React__namespace.useRef(null);
|
|
93
103
|
const isNearBottomRef = React__namespace.useRef(true);
|
|
94
|
-
const prevChildrenCountRef = React__namespace.useRef(0);
|
|
95
104
|
const userOnScroll = htmlProps.onScroll;
|
|
96
105
|
const checkIsNearBottom = React__namespace.useCallback(() => {
|
|
97
106
|
const container = containerRef.current;
|
|
@@ -118,24 +127,18 @@ function ConversationListRoot({
|
|
|
118
127
|
}
|
|
119
128
|
}, [checkIsNearBottom, onScrollTop, scrollTopThreshold, userOnScroll]);
|
|
120
129
|
React__namespace.useEffect(() => {
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
scrollToBottom();
|
|
129
|
-
}
|
|
130
|
-
}, [children, autoScroll, scrollToBottom]);
|
|
131
|
-
React__namespace.useEffect(() => {
|
|
132
|
-
if (autoScroll) {
|
|
133
|
-
scrollToBottom("instant");
|
|
134
|
-
}
|
|
130
|
+
const content = contentRef.current;
|
|
131
|
+
if (!content || !autoScroll) return;
|
|
132
|
+
const observer = new ResizeObserver(() => {
|
|
133
|
+
if (autoScroll === true || isNearBottomRef.current) scrollToBottom("instant");
|
|
134
|
+
});
|
|
135
|
+
observer.observe(content);
|
|
136
|
+
return () => observer.disconnect();
|
|
135
137
|
}, [autoScroll, scrollToBottom]);
|
|
136
|
-
const contextValue = {
|
|
137
|
-
scrollToBottom
|
|
138
|
-
|
|
138
|
+
const contextValue = React__namespace.useMemo(() => ({
|
|
139
|
+
scrollToBottom,
|
|
140
|
+
showAvatars
|
|
141
|
+
}), [scrollToBottom, showAvatars]);
|
|
139
142
|
const hasChildren = React__namespace.Children.count(children) > 0;
|
|
140
143
|
const classes = [
|
|
141
144
|
ConversationList_module.default.conversationList,
|
|
@@ -167,3 +170,4 @@ exports.ConversationListRoot = ConversationListRoot;
|
|
|
167
170
|
exports.DateSeparator = DateSeparator;
|
|
168
171
|
exports.TypingIndicator = TypingIndicator;
|
|
169
172
|
exports.useConversationList = useConversationList;
|
|
173
|
+
exports.useOptionalConversationList = useOptionalConversationList;
|
|
@@ -3,6 +3,8 @@ export type AutoScrollBehavior = boolean | 'smart';
|
|
|
3
3
|
export interface ConversationListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/** Message components */
|
|
5
5
|
children: React.ReactNode;
|
|
6
|
+
/** Show avatars for messages and typing indicators in this conversation */
|
|
7
|
+
showAvatars?: boolean;
|
|
6
8
|
/** Auto-scroll behavior: true (always), false (never), or 'smart' (only when near bottom) */
|
|
7
9
|
autoScroll?: AutoScrollBehavior;
|
|
8
10
|
/** Callback when user scrolls to top (for loading history) */
|
|
@@ -30,11 +32,13 @@ export interface TypingIndicatorProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
30
32
|
}
|
|
31
33
|
interface ConversationListContextValue {
|
|
32
34
|
scrollToBottom: () => void;
|
|
35
|
+
showAvatars: boolean;
|
|
33
36
|
}
|
|
37
|
+
export declare function useOptionalConversationList(): ConversationListContextValue | null;
|
|
34
38
|
export declare function useConversationList(): ConversationListContextValue;
|
|
35
39
|
declare function DateSeparator({ date, format: customFormat, className, ...htmlProps }: DateSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
36
40
|
declare function TypingIndicator({ name, avatar, className, ...htmlProps }: TypingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
declare function ConversationListRoot({ children, autoScroll, onScrollTop, loadingHistory, emptyState, scrollTopThreshold, scrollBottomThreshold, className, ...htmlProps }: ConversationListProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
declare function ConversationListRoot({ children, showAvatars, autoScroll, onScrollTop, loadingHistory, emptyState, scrollTopThreshold, scrollBottomThreshold, className, ...htmlProps }: ConversationListProps): import("react/jsx-runtime").JSX.Element;
|
|
38
42
|
export declare const ConversationList: typeof ConversationListRoot & {
|
|
39
43
|
DateSeparator: typeof DateSeparator;
|
|
40
44
|
TypingIndicator: typeof TypingIndicator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConversationList/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnD,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACjF,yBAAyB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,6FAA6F;IAC7F,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC9D,uDAAuD;IACvD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iDAAiD;IACjD,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,0DAA0D;IAC1D,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4DAA4D;IAC5D,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,sBAAsB;IACtB,IAAI,EAAE,IAAI,CAAC;IACX,6BAA6B;IAC7B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAChF,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAMD,UAAU,4BAA4B;IACpC,cAAc,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