@carto/ps-react-ui 4.9.0 → 4.11.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/category-Dnd2_j0x.js +719 -0
- package/dist/category-Dnd2_j0x.js.map +1 -0
- package/dist/change-column-BiuuHCDN.js +1156 -0
- package/dist/change-column-BiuuHCDN.js.map +1 -0
- package/dist/chat.js +1507 -0
- package/dist/chat.js.map +1 -0
- package/dist/components.js +125 -122
- package/dist/components.js.map +1 -1
- package/dist/copy-button-DGL1tyli.js +26 -0
- package/dist/copy-button-DGL1tyli.js.map +1 -0
- package/dist/{data-zoom-layout-BH0LPwSy.js → data-zoom-layout--YiY6ko_.js} +5 -4
- package/dist/{data-zoom-layout-BH0LPwSy.js.map → data-zoom-layout--YiY6ko_.js.map} +1 -1
- package/dist/{download-config-DNLkypdN.js → download-config-oJIFZ2WC.js} +10 -9
- package/dist/{download-config-DNLkypdN.js.map → download-config-oJIFZ2WC.js.map} +1 -1
- package/dist/{lasso-tool-BYbxrJ-7.js → lasso-tool-CDFj4zKY.js} +2 -1
- package/dist/lasso-tool-CDFj4zKY.js.map +1 -0
- package/dist/{spread-CTuIXZSM.js → spread-CPis22AE.js} +5 -4
- package/dist/{spread-CTuIXZSM.js.map → spread-CPis22AE.js.map} +1 -1
- package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
- package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
- package/dist/types/chat/bubbles/index.d.ts +4 -0
- package/dist/types/chat/const.d.ts +4 -0
- package/dist/types/chat/containers/chat-content.d.ts +2 -0
- package/dist/types/chat/containers/chat-footer.d.ts +2 -0
- package/dist/types/chat/containers/chat-header.d.ts +2 -0
- package/dist/types/chat/containers/chat-starter.d.ts +2 -0
- package/dist/types/chat/containers/index.d.ts +4 -0
- package/dist/types/chat/containers/styles.d.ts +93 -0
- package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
- package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
- package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
- package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
- package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
- package/dist/types/chat/feedback/index.d.ts +8 -0
- package/dist/types/chat/feedback/styles.d.ts +211 -0
- package/dist/types/chat/index.d.ts +20 -0
- package/dist/types/chat/types.d.ts +184 -0
- package/dist/types/chat/use-typewriter.d.ts +30 -0
- package/dist/types/components/copy-button/copy-button.d.ts +2 -0
- package/dist/types/components/copy-button/types.d.ts +6 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/lasso-tool/styles.d.ts +1 -0
- package/dist/types/components/measurement-tools/styles.d.ts +1 -0
- package/dist/types/widgets-v2/actions/index.d.ts +1 -0
- package/dist/types/widgets-v2/actions/show-all/index.d.ts +2 -0
- package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
- package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
- package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -0
- package/dist/types/widgets-v2/category/category-ui.d.ts +9 -2
- package/dist/types/widgets-v2/category/category.d.ts +9 -2
- package/dist/types/widgets-v2/category/components/category-row-other.d.ts +19 -6
- package/dist/types/widgets-v2/category/style.d.ts +21 -2
- package/dist/types/widgets-v2/category/types.d.ts +2 -0
- package/dist/types/widgets-v2/index.d.ts +3 -2
- package/dist/types/widgets-v2/selection-summary/labels.d.ts +7 -2
- package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +13 -6
- package/dist/types/widgets-v2/selection-summary/style.d.ts +15 -0
- package/dist/types/widgets-v2/wrapper/style.d.ts +1 -2
- package/dist/types/widgets-v2/wrapper/widget-wrapper.d.ts +6 -1
- package/dist/widgets/actions.js +116 -115
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/bar.js +1 -1
- package/dist/widgets/category.js +10 -9
- package/dist/widgets/category.js.map +1 -1
- package/dist/widgets/formula.js +12 -11
- package/dist/widgets/formula.js.map +1 -1
- package/dist/widgets/histogram.js +8 -7
- package/dist/widgets/histogram.js.map +1 -1
- package/dist/widgets/markdown.js +10 -9
- package/dist/widgets/markdown.js.map +1 -1
- package/dist/widgets/pie.js +1 -1
- package/dist/widgets/scatterplot.js +1 -1
- package/dist/widgets/spread.js +10 -9
- package/dist/widgets/spread.js.map +1 -1
- package/dist/widgets/table.js +18 -17
- package/dist/widgets/table.js.map +1 -1
- package/dist/widgets/timeseries.js +1 -1
- package/dist/widgets/utils.js +1 -1
- package/dist/widgets/wrapper.js +4 -3
- package/dist/widgets/wrapper.js.map +1 -1
- package/dist/widgets-v2/actions.js +41 -37
- package/dist/widgets-v2/bar.js +9 -8
- package/dist/widgets-v2/bar.js.map +1 -1
- package/dist/widgets-v2/category.js +23 -22
- package/dist/widgets-v2/category.js.map +1 -1
- package/dist/widgets-v2/formula.js +24 -23
- package/dist/widgets-v2/formula.js.map +1 -1
- package/dist/widgets-v2/histogram.js +11 -10
- package/dist/widgets-v2/histogram.js.map +1 -1
- package/dist/widgets-v2/markdown.js +10 -9
- package/dist/widgets-v2/markdown.js.map +1 -1
- package/dist/widgets-v2/pie.js +8 -7
- package/dist/widgets-v2/pie.js.map +1 -1
- package/dist/widgets-v2/scatterplot.js +10 -9
- package/dist/widgets-v2/scatterplot.js.map +1 -1
- package/dist/widgets-v2/spread.js +10 -9
- package/dist/widgets-v2/spread.js.map +1 -1
- package/dist/widgets-v2/table.js +17 -16
- package/dist/widgets-v2/table.js.map +1 -1
- package/dist/widgets-v2/timeseries.js +9 -8
- package/dist/widgets-v2/timeseries.js.map +1 -1
- package/dist/widgets-v2/utils.js +1 -1
- package/dist/widgets-v2.js +343 -338
- package/dist/widgets-v2.js.map +1 -1
- package/package.json +9 -3
- package/src/chat/bubbles/chat-agent-message.test.tsx +30 -0
- package/src/chat/bubbles/chat-agent-message.tsx +11 -0
- package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
- package/src/chat/bubbles/chat-error-message.tsx +47 -0
- package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
- package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
- package/src/chat/bubbles/chat-user-message.tsx +27 -0
- package/src/chat/bubbles/index.ts +4 -0
- package/src/chat/bubbles/styles.ts +148 -0
- package/src/chat/const.ts +4 -0
- package/src/chat/containers/chat-content.test.tsx +269 -0
- package/src/chat/containers/chat-content.tsx +142 -0
- package/src/chat/containers/chat-footer.test.tsx +34 -0
- package/src/chat/containers/chat-footer.tsx +78 -0
- package/src/chat/containers/chat-header.test.tsx +28 -0
- package/src/chat/containers/chat-header.tsx +29 -0
- package/src/chat/containers/chat-starter.test.tsx +32 -0
- package/src/chat/containers/chat-starter.tsx +75 -0
- package/src/chat/containers/index.ts +4 -0
- package/src/chat/containers/styles.ts +96 -0
- package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
- package/src/chat/feedback/chat-actions-container.tsx +7 -0
- package/src/chat/feedback/chat-loader.test.tsx +10 -0
- package/src/chat/feedback/chat-loader.tsx +31 -0
- package/src/chat/feedback/chat-rating-action.tsx +43 -0
- package/src/chat/feedback/chat-thinking.test.tsx +15 -0
- package/src/chat/feedback/chat-thinking.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
- package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
- package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
- package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
- package/src/chat/feedback/chat-tool-group.tsx +156 -0
- package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
- package/src/chat/feedback/chat-tool-trace.tsx +192 -0
- package/src/chat/feedback/get-tool-label.test.tsx +91 -0
- package/src/chat/feedback/get-tool-label.ts +13 -0
- package/src/chat/feedback/index.ts +8 -0
- package/src/chat/feedback/styles.ts +229 -0
- package/src/chat/index.ts +59 -0
- package/src/chat/types.ts +215 -0
- package/src/chat/use-typewriter.test.tsx +38 -0
- package/src/chat/use-typewriter.ts +82 -0
- package/src/components/copy-button/copy-button.test.tsx +41 -0
- package/src/components/copy-button/copy-button.tsx +31 -0
- package/src/components/copy-button/types.ts +10 -0
- package/src/components/index.ts +3 -0
- package/src/components/lasso-tool/styles.ts +1 -0
- package/src/components/measurement-tools/styles.ts +1 -0
- package/src/widgets-v2/actions/index.ts +8 -0
- package/src/widgets-v2/actions/show-all/index.ts +7 -0
- package/src/widgets-v2/actions/show-all/labels.ts +8 -0
- package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
- package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
- package/src/widgets-v2/actions/show-all/style.ts +8 -0
- package/src/widgets-v2/category/category-ui.test.tsx +26 -10
- package/src/widgets-v2/category/category-ui.tsx +13 -3
- package/src/widgets-v2/category/category.test.tsx +4 -4
- package/src/widgets-v2/category/category.tsx +10 -1
- package/src/widgets-v2/category/components/category-row-other.test.tsx +36 -7
- package/src/widgets-v2/category/components/category-row-other.tsx +64 -13
- package/src/widgets-v2/category/style.ts +35 -4
- package/src/widgets-v2/category/types.ts +2 -0
- package/src/widgets-v2/index.ts +3 -0
- package/src/widgets-v2/selection-summary/labels.ts +8 -4
- package/src/widgets-v2/selection-summary/selection-summary.test.tsx +15 -9
- package/src/widgets-v2/selection-summary/selection-summary.tsx +42 -22
- package/src/widgets-v2/selection-summary/style.ts +15 -0
- package/src/widgets-v2/wrapper/style.ts +1 -2
- package/src/widgets-v2/wrapper/widget-wrapper.test.tsx +30 -0
- package/src/widgets-v2/wrapper/widget-wrapper.tsx +11 -1
- package/dist/category-DwaeYjpX.js +0 -656
- package/dist/category-DwaeYjpX.js.map +0 -1
- package/dist/change-column-Cidl_M-4.js +0 -1110
- package/dist/change-column-Cidl_M-4.js.map +0 -1
- package/dist/lasso-tool-BYbxrJ-7.js.map +0 -1
|
@@ -13,6 +13,9 @@ export declare const styles: {
|
|
|
13
13
|
gap: number;
|
|
14
14
|
py: number;
|
|
15
15
|
};
|
|
16
|
+
listScroll: {
|
|
17
|
+
pr: number;
|
|
18
|
+
};
|
|
16
19
|
rowSingle: {
|
|
17
20
|
display: string;
|
|
18
21
|
flexDirection: string;
|
|
@@ -150,17 +153,33 @@ export declare const styles: {
|
|
|
150
153
|
};
|
|
151
154
|
otherRow: {
|
|
152
155
|
display: string;
|
|
153
|
-
justifyContent: string;
|
|
154
156
|
alignItems: string;
|
|
157
|
+
gap: number;
|
|
155
158
|
py: number;
|
|
156
159
|
px: number;
|
|
157
160
|
};
|
|
161
|
+
otherLabelButton: {
|
|
162
|
+
cursor: string;
|
|
163
|
+
userSelect: string;
|
|
164
|
+
borderRadius: number;
|
|
165
|
+
px: number;
|
|
166
|
+
ml: number;
|
|
167
|
+
transition: string;
|
|
168
|
+
'&:hover': {
|
|
169
|
+
bgcolor: string;
|
|
170
|
+
};
|
|
171
|
+
'&:focus-visible': {
|
|
172
|
+
outline: string;
|
|
173
|
+
outlineColor: string;
|
|
174
|
+
outlineOffset: number;
|
|
175
|
+
};
|
|
176
|
+
};
|
|
158
177
|
otherLabel: {
|
|
159
|
-
fontStyle: string;
|
|
160
178
|
color: string;
|
|
161
179
|
fontWeight: string;
|
|
162
180
|
};
|
|
163
181
|
otherCount: {
|
|
164
182
|
color: string;
|
|
183
|
+
fontVariantNumeric: string;
|
|
165
184
|
};
|
|
166
185
|
};
|
|
@@ -42,6 +42,8 @@ export type CategorySeriesConfig = WidgetSeries;
|
|
|
42
42
|
export interface CategoryLabels {
|
|
43
43
|
other?: string;
|
|
44
44
|
otherCount?: string;
|
|
45
|
+
/** Tooltip shown over the clickable "Others" row. Defaults to `'Show all'`. */
|
|
46
|
+
showAll?: string;
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Visual density of the bar primitive. `'small'` (default) keeps the
|
|
@@ -9,7 +9,7 @@ import { Toolbox } from './toolbox/toolbox';
|
|
|
9
9
|
import { DEFAULT_TOOLBOX_LABELS } from './toolbox/labels';
|
|
10
10
|
import { Echart, EchartUI, DEFAULT_INIT_OPTS } from './echart';
|
|
11
11
|
import { DEFAULT_NOTE_LABELS } from './note/labels';
|
|
12
|
-
import { Searcher, SearcherToggle, StackToggle, ZoomToggle, BrushToggle, RelativeData, Download, LockSelection, ChangeColumn } from './actions';
|
|
12
|
+
import { Searcher, SearcherToggle, StackToggle, ShowAllToggle, ZoomToggle, BrushToggle, RelativeData, Download, LockSelection, ChangeColumn } from './actions';
|
|
13
13
|
import { Formula, FormulaUI } from './formula';
|
|
14
14
|
import { Markdown, MarkdownUI } from './markdown';
|
|
15
15
|
import { Spread, SpreadUI } from './spread';
|
|
@@ -59,6 +59,7 @@ export declare const Widget: {
|
|
|
59
59
|
readonly Searcher: typeof Searcher;
|
|
60
60
|
readonly SearcherToggle: typeof SearcherToggle;
|
|
61
61
|
readonly StackToggle: typeof StackToggle;
|
|
62
|
+
readonly ShowAllToggle: typeof ShowAllToggle;
|
|
62
63
|
readonly ZoomToggle: typeof ZoomToggle;
|
|
63
64
|
readonly BrushToggle: typeof BrushToggle;
|
|
64
65
|
readonly RelativeData: typeof RelativeData;
|
|
@@ -95,7 +96,7 @@ export type { ToolboxLabels } from './toolbox/labels';
|
|
|
95
96
|
export type { EchartProps, EchartUIProps, EchartsEventHandler } from './echart';
|
|
96
97
|
export type { NoteProps, NoteMarkdownProps } from './note/widget-note';
|
|
97
98
|
export type { NoteLabels } from './note/labels';
|
|
98
|
-
export type { SearcherProps, SearcherToggleProps, StackToggleProps, ZoomToggleProps, BrushToggleProps, RelativeDataProps, DownloadProps, DownloadItem, FullScreenTriggerProps, FullScreenSlotProps, LockSelectionProps, LockSelectionKey, ChangeColumnProps, ChangeColumnItem, } from './actions';
|
|
99
|
+
export type { SearcherProps, SearcherToggleProps, StackToggleProps, ShowAllToggleProps, ZoomToggleProps, BrushToggleProps, RelativeDataProps, DownloadProps, DownloadItem, FullScreenTriggerProps, FullScreenSlotProps, LockSelectionProps, LockSelectionKey, ChangeColumnProps, ChangeColumnItem, } from './actions';
|
|
99
100
|
export type { FormulaUIProps, FormulaDataItem, FormulaWidgetData, } from './formula';
|
|
100
101
|
export type { MarkdownUIProps, MarkdownWidgetData } from './markdown';
|
|
101
102
|
export type { PieDatum, PieWidgetData } from './pie';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface SelectionSummaryLabels {
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Optional custom renderer for the count. Defaults to the built-in two-tone
|
|
5
|
+
* `selected / total` rendering. Receives the already-resolved displayed
|
|
6
|
+
* number (which equals `total` when nothing is selected).
|
|
7
|
+
*/
|
|
8
|
+
summary?: (selected: number, total: number) => ReactNode;
|
|
4
9
|
clear: string;
|
|
5
10
|
}
|
|
6
11
|
export declare const DEFAULT_SELECTION_SUMMARY_LABELS: SelectionSummaryLabels;
|
|
@@ -4,19 +4,26 @@ import { SelectionSummaryLabels } from './labels';
|
|
|
4
4
|
export interface SelectionSummaryProps {
|
|
5
5
|
/** Number of currently selected items. */
|
|
6
6
|
count: number;
|
|
7
|
-
/** Optional total — when 0 the component renders nothing (no data
|
|
7
|
+
/** Optional total — when `undefined` or `0` the component renders nothing (no data). */
|
|
8
8
|
total?: number;
|
|
9
|
-
/** Clear callback.
|
|
9
|
+
/** Clear callback. The Clear control is shown only when `count > 0` and `onClear` is provided. */
|
|
10
10
|
onClear?: () => void;
|
|
11
11
|
labels?: Partial<SelectionSummaryLabels>;
|
|
12
12
|
icon?: ComponentType<SvgIconProps>;
|
|
13
13
|
iconProps?: SvgIconProps;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
+
* Renders a `selected / total` count.
|
|
17
|
+
*
|
|
16
18
|
* Render rules:
|
|
17
|
-
* - `
|
|
18
|
-
* - `count === 0` →
|
|
19
|
-
*
|
|
20
|
-
* - `count > 0`
|
|
19
|
+
* - `!total` (undefined or 0) → render nothing (no data to summarize).
|
|
20
|
+
* - `count === 0` → display `total / total` (everything is implicitly in
|
|
21
|
+
* scope); no Clear button.
|
|
22
|
+
* - `count > 0` → display `count / total` + Clear (when `onClear` is given).
|
|
23
|
+
*
|
|
24
|
+
* The count is two-tone by default (selected number bold/`text.primary`,
|
|
25
|
+
* ` / total` in `text.secondary`). Pass `labels.summary` to render a custom
|
|
26
|
+
* node instead — it receives the already-resolved displayed number (which
|
|
27
|
+
* equals `total` when nothing is selected).
|
|
21
28
|
*/
|
|
22
29
|
export declare function SelectionSummary({ count, total, onClear, labels, icon: Icon, iconProps, }: SelectionSummaryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -8,6 +8,21 @@ export declare const styles: {
|
|
|
8
8
|
label: {
|
|
9
9
|
color: "text.secondary";
|
|
10
10
|
};
|
|
11
|
+
count: {
|
|
12
|
+
display: "inline-flex";
|
|
13
|
+
alignItems: "baseline";
|
|
14
|
+
gap: number;
|
|
15
|
+
};
|
|
16
|
+
selected: {
|
|
17
|
+
color: "text.primary";
|
|
18
|
+
fontWeight: number;
|
|
19
|
+
};
|
|
20
|
+
separator: {
|
|
21
|
+
color: "text.secondary";
|
|
22
|
+
};
|
|
23
|
+
total: {
|
|
24
|
+
color: "text.secondary";
|
|
25
|
+
};
|
|
11
26
|
clear: {
|
|
12
27
|
color: "primary.main";
|
|
13
28
|
cursor: "pointer";
|
|
@@ -5,10 +5,9 @@ export declare const styles: {
|
|
|
5
5
|
width: string;
|
|
6
6
|
minWidth: number;
|
|
7
7
|
bgcolor: "background.paper";
|
|
8
|
-
border: "1px solid";
|
|
9
|
-
borderColor: "divider";
|
|
10
8
|
borderRadius: number;
|
|
11
9
|
overflow: "hidden";
|
|
10
|
+
boxShadow: "none";
|
|
12
11
|
'&::before': {
|
|
13
12
|
display: "none";
|
|
14
13
|
};
|
|
@@ -23,6 +23,11 @@ export interface WrapperProps {
|
|
|
23
23
|
*/
|
|
24
24
|
defaultCollapsed?: boolean;
|
|
25
25
|
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Visual variant. `'elevation'` (default) renders a borderless shell;
|
|
28
|
+
* `'outlined'` adds a 1px divider border around the card.
|
|
29
|
+
*/
|
|
30
|
+
variant?: 'outlined' | 'elevation';
|
|
26
31
|
labels?: Partial<WrapperLabels>;
|
|
27
32
|
/**
|
|
28
33
|
* Icon shown at the right edge of the summary row. Accordion rotates it
|
|
@@ -48,4 +53,4 @@ export interface WrapperProps {
|
|
|
48
53
|
* render inside the summary row; everything else (`<Content>`, `<Footer>`,
|
|
49
54
|
* loose nodes) renders inside the details panel.
|
|
50
55
|
*/
|
|
51
|
-
export declare function Wrapper({ title, collapsed, onCollapseChange, defaultCollapsed, disabled, labels, expandIcon: ExpandIcon, iconProps, sx, children, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export declare function Wrapper({ title, collapsed, onCollapseChange, defaultCollapsed, disabled, variant, labels, expandIcon: ExpandIcon, iconProps, sx, children, }: WrapperProps): import("react/jsx-runtime").JSX.Element;
|