@carto/ps-react-ui 4.9.1 → 4.11.1

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.
Files changed (207) hide show
  1. package/dist/category-Dnd2_j0x.js +719 -0
  2. package/dist/category-Dnd2_j0x.js.map +1 -0
  3. package/dist/change-column-DjjwoPt1.js +1143 -0
  4. package/dist/change-column-DjjwoPt1.js.map +1 -0
  5. package/dist/chat.js +1507 -0
  6. package/dist/chat.js.map +1 -0
  7. package/dist/components.js +122 -120
  8. package/dist/components.js.map +1 -1
  9. package/dist/copy-button-DGL1tyli.js +26 -0
  10. package/dist/copy-button-DGL1tyli.js.map +1 -0
  11. package/dist/{data-zoom-layout-0QSptXG_.js → data-zoom-layout-CkVnm6ej.js} +3 -3
  12. package/dist/{data-zoom-layout-0QSptXG_.js.map → data-zoom-layout-CkVnm6ej.js.map} +1 -1
  13. package/dist/{download-config-CzmjOT2T.js → download-config-oJIFZ2WC.js} +9 -8
  14. package/dist/{download-config-CzmjOT2T.js.map → download-config-oJIFZ2WC.js.map} +1 -1
  15. package/dist/{png-item-CS4z1iSH.js → png-item-BE9uEqlD.js} +2 -2
  16. package/dist/png-item-BE9uEqlD.js.map +1 -0
  17. package/dist/{spread-Y9R1f5dm.js → spread-DYNpzgh_.js} +10 -11
  18. package/dist/{spread-Y9R1f5dm.js.map → spread-DYNpzgh_.js.map} +1 -1
  19. package/dist/{table-CQCAnDLb.js → table-C9IMbTr0.js} +50 -53
  20. package/dist/table-C9IMbTr0.js.map +1 -0
  21. package/dist/types/chat/bubbles/chat-error-message.d.ts +2 -0
  22. package/dist/types/chat/bubbles/chat-suggestion-button.d.ts +2 -0
  23. package/dist/types/chat/bubbles/chat-user-message.d.ts +2 -0
  24. package/dist/types/chat/bubbles/index.d.ts +4 -0
  25. package/dist/types/chat/const.d.ts +4 -0
  26. package/dist/types/chat/containers/chat-content.d.ts +2 -0
  27. package/dist/types/chat/containers/chat-footer.d.ts +2 -0
  28. package/dist/types/chat/containers/chat-header.d.ts +2 -0
  29. package/dist/types/chat/containers/chat-starter.d.ts +2 -0
  30. package/dist/types/chat/containers/index.d.ts +4 -0
  31. package/dist/types/chat/containers/styles.d.ts +93 -0
  32. package/dist/types/chat/feedback/chat-loader.d.ts +2 -0
  33. package/dist/types/chat/feedback/chat-rating-action.d.ts +2 -0
  34. package/dist/types/chat/feedback/chat-thinking.d.ts +2 -0
  35. package/dist/types/chat/feedback/chat-tool-code-area.d.ts +2 -0
  36. package/dist/types/chat/feedback/chat-tool-full-view-dialog.d.ts +2 -0
  37. package/dist/types/chat/feedback/chat-tool-group.d.ts +2 -0
  38. package/dist/types/chat/feedback/chat-tool-trace.d.ts +3 -0
  39. package/dist/types/chat/feedback/get-tool-label.d.ts +2 -0
  40. package/dist/types/chat/feedback/index.d.ts +8 -0
  41. package/dist/types/chat/feedback/styles.d.ts +211 -0
  42. package/dist/types/chat/index.d.ts +20 -0
  43. package/dist/types/chat/types.d.ts +184 -0
  44. package/dist/types/chat/use-typewriter.d.ts +30 -0
  45. package/dist/types/components/copy-button/copy-button.d.ts +2 -0
  46. package/dist/types/components/copy-button/types.d.ts +6 -0
  47. package/dist/types/components/index.d.ts +2 -0
  48. package/dist/types/widgets/actions/brush-toggle/style.d.ts +1 -1
  49. package/dist/types/widgets/actions/shared/styles.d.ts +1 -1
  50. package/dist/types/widgets/actions/zoom-toggle/style.d.ts +1 -1
  51. package/dist/types/widgets/echart/types.d.ts +1 -1
  52. package/dist/types/widgets/toolbar-actions/styles.d.ts +1 -1
  53. package/dist/types/widgets-v2/actions/brush-toggle/style.d.ts +1 -1
  54. package/dist/types/widgets-v2/actions/change-column/style.d.ts +1 -1
  55. package/dist/types/widgets-v2/actions/fullscreen/style.d.ts +1 -1
  56. package/dist/types/widgets-v2/actions/index.d.ts +1 -0
  57. package/dist/types/widgets-v2/actions/lock-selection/style.d.ts +1 -1
  58. package/dist/types/widgets-v2/actions/relative-data/style.d.ts +1 -1
  59. package/dist/types/widgets-v2/actions/searcher/style.d.ts +1 -1
  60. package/dist/types/widgets-v2/actions/show-all/index.d.ts +2 -0
  61. package/dist/types/widgets-v2/actions/show-all/labels.d.ts +5 -0
  62. package/dist/types/widgets-v2/actions/show-all/show-all.d.ts +33 -0
  63. package/dist/types/widgets-v2/actions/show-all/style.d.ts +8 -0
  64. package/dist/types/widgets-v2/actions/stack-toggle/style.d.ts +1 -1
  65. package/dist/types/widgets-v2/actions/zoom-toggle/style.d.ts +1 -1
  66. package/dist/types/widgets-v2/category/category-ui.d.ts +9 -2
  67. package/dist/types/widgets-v2/category/category.d.ts +9 -2
  68. package/dist/types/widgets-v2/category/components/category-row-other.d.ts +19 -6
  69. package/dist/types/widgets-v2/category/style.d.ts +21 -2
  70. package/dist/types/widgets-v2/category/types.d.ts +2 -0
  71. package/dist/types/widgets-v2/index.d.ts +3 -2
  72. package/dist/types/widgets-v2/selection-summary/labels.d.ts +7 -2
  73. package/dist/types/widgets-v2/selection-summary/selection-summary.d.ts +13 -6
  74. package/dist/types/widgets-v2/selection-summary/style.d.ts +15 -0
  75. package/dist/widgets/actions.js +115 -114
  76. package/dist/widgets/actions.js.map +1 -1
  77. package/dist/widgets/bar.js +1 -1
  78. package/dist/widgets/category.js +9 -8
  79. package/dist/widgets/category.js.map +1 -1
  80. package/dist/widgets/formula.js +11 -10
  81. package/dist/widgets/formula.js.map +1 -1
  82. package/dist/widgets/histogram.js +7 -6
  83. package/dist/widgets/histogram.js.map +1 -1
  84. package/dist/widgets/markdown.js +9 -8
  85. package/dist/widgets/markdown.js.map +1 -1
  86. package/dist/widgets/pie.js +1 -1
  87. package/dist/widgets/scatterplot.js +1 -1
  88. package/dist/widgets/spread.js +9 -8
  89. package/dist/widgets/spread.js.map +1 -1
  90. package/dist/widgets/table.js +17 -16
  91. package/dist/widgets/table.js.map +1 -1
  92. package/dist/widgets/timeseries.js +1 -1
  93. package/dist/widgets/utils.js +1 -1
  94. package/dist/widgets/wrapper.js +3 -2
  95. package/dist/widgets/wrapper.js.map +1 -1
  96. package/dist/widgets-v2/actions.js +41 -37
  97. package/dist/widgets-v2/bar.js +9 -10
  98. package/dist/widgets-v2/bar.js.map +1 -1
  99. package/dist/widgets-v2/category.js +25 -26
  100. package/dist/widgets-v2/category.js.map +1 -1
  101. package/dist/widgets-v2/formula.js +3 -3
  102. package/dist/widgets-v2/histogram.js +11 -13
  103. package/dist/widgets-v2/histogram.js.map +1 -1
  104. package/dist/widgets-v2/markdown.js +26 -27
  105. package/dist/widgets-v2/markdown.js.map +1 -1
  106. package/dist/widgets-v2/pie.js +8 -10
  107. package/dist/widgets-v2/pie.js.map +1 -1
  108. package/dist/widgets-v2/scatterplot.js +10 -12
  109. package/dist/widgets-v2/scatterplot.js.map +1 -1
  110. package/dist/widgets-v2/spread.js +15 -16
  111. package/dist/widgets-v2/spread.js.map +1 -1
  112. package/dist/widgets-v2/table.js +39 -40
  113. package/dist/widgets-v2/table.js.map +1 -1
  114. package/dist/widgets-v2/timeseries.js +9 -11
  115. package/dist/widgets-v2/timeseries.js.map +1 -1
  116. package/dist/widgets-v2/utils.js +1 -1
  117. package/dist/widgets-v2.js +284 -282
  118. package/dist/widgets-v2.js.map +1 -1
  119. package/package.json +5 -1
  120. package/src/chat/bubbles/chat-agent-message.test.tsx +30 -0
  121. package/src/chat/bubbles/chat-agent-message.tsx +11 -0
  122. package/src/chat/bubbles/chat-error-message.test.tsx +40 -0
  123. package/src/chat/bubbles/chat-error-message.tsx +47 -0
  124. package/src/chat/bubbles/chat-suggestion-button.test.tsx +24 -0
  125. package/src/chat/bubbles/chat-suggestion-button.tsx +27 -0
  126. package/src/chat/bubbles/chat-user-message.test.tsx +27 -0
  127. package/src/chat/bubbles/chat-user-message.tsx +27 -0
  128. package/src/chat/bubbles/index.ts +4 -0
  129. package/src/chat/bubbles/styles.ts +148 -0
  130. package/src/chat/const.ts +4 -0
  131. package/src/chat/containers/chat-content.test.tsx +269 -0
  132. package/src/chat/containers/chat-content.tsx +142 -0
  133. package/src/chat/containers/chat-footer.test.tsx +34 -0
  134. package/src/chat/containers/chat-footer.tsx +78 -0
  135. package/src/chat/containers/chat-header.test.tsx +28 -0
  136. package/src/chat/containers/chat-header.tsx +29 -0
  137. package/src/chat/containers/chat-starter.test.tsx +32 -0
  138. package/src/chat/containers/chat-starter.tsx +75 -0
  139. package/src/chat/containers/index.ts +4 -0
  140. package/src/chat/containers/styles.ts +96 -0
  141. package/src/chat/feedback/chat-actions-container.test.tsx +64 -0
  142. package/src/chat/feedback/chat-actions-container.tsx +7 -0
  143. package/src/chat/feedback/chat-loader.test.tsx +10 -0
  144. package/src/chat/feedback/chat-loader.tsx +31 -0
  145. package/src/chat/feedback/chat-rating-action.tsx +43 -0
  146. package/src/chat/feedback/chat-thinking.test.tsx +15 -0
  147. package/src/chat/feedback/chat-thinking.tsx +23 -0
  148. package/src/chat/feedback/chat-tool-code-area.test.tsx +23 -0
  149. package/src/chat/feedback/chat-tool-code-area.tsx +71 -0
  150. package/src/chat/feedback/chat-tool-full-view-dialog.test.tsx +39 -0
  151. package/src/chat/feedback/chat-tool-full-view-dialog.tsx +121 -0
  152. package/src/chat/feedback/chat-tool-group.test.tsx +84 -0
  153. package/src/chat/feedback/chat-tool-group.tsx +156 -0
  154. package/src/chat/feedback/chat-tool-trace.test.tsx +81 -0
  155. package/src/chat/feedback/chat-tool-trace.tsx +192 -0
  156. package/src/chat/feedback/get-tool-label.test.tsx +91 -0
  157. package/src/chat/feedback/get-tool-label.ts +13 -0
  158. package/src/chat/feedback/index.ts +8 -0
  159. package/src/chat/feedback/styles.ts +229 -0
  160. package/src/chat/index.ts +59 -0
  161. package/src/chat/types.ts +215 -0
  162. package/src/chat/use-typewriter.test.tsx +38 -0
  163. package/src/chat/use-typewriter.ts +82 -0
  164. package/src/components/copy-button/copy-button.test.tsx +41 -0
  165. package/src/components/copy-button/copy-button.tsx +31 -0
  166. package/src/components/copy-button/types.ts +10 -0
  167. package/src/components/index.ts +3 -0
  168. package/src/widgets/echart/types.ts +1 -1
  169. package/src/widgets-v2/actions/brush-toggle/brush-toggle.tsx +1 -1
  170. package/src/widgets-v2/actions/change-column/sortable-column-item.tsx +1 -1
  171. package/src/widgets-v2/actions/download/download.tsx +1 -1
  172. package/src/widgets-v2/actions/download/icons.tsx +1 -1
  173. package/src/widgets-v2/actions/fullscreen/fullscreen.tsx +3 -3
  174. package/src/widgets-v2/actions/index.ts +8 -0
  175. package/src/widgets-v2/actions/lock-selection/lock-selection.tsx +2 -2
  176. package/src/widgets-v2/actions/relative-data/relative-data.tsx +1 -1
  177. package/src/widgets-v2/actions/searcher/searcher-toggle.tsx +1 -1
  178. package/src/widgets-v2/actions/searcher/searcher.tsx +2 -2
  179. package/src/widgets-v2/actions/show-all/index.ts +7 -0
  180. package/src/widgets-v2/actions/show-all/labels.ts +8 -0
  181. package/src/widgets-v2/actions/show-all/show-all.test.tsx +50 -0
  182. package/src/widgets-v2/actions/show-all/show-all.tsx +72 -0
  183. package/src/widgets-v2/actions/show-all/style.ts +8 -0
  184. package/src/widgets-v2/actions/stack-toggle/stack-toggle.tsx +1 -1
  185. package/src/widgets-v2/actions/zoom-toggle/zoom-toggle.tsx +1 -1
  186. package/src/widgets-v2/category/category-ui.test.tsx +26 -10
  187. package/src/widgets-v2/category/category-ui.tsx +13 -3
  188. package/src/widgets-v2/category/category.test.tsx +4 -4
  189. package/src/widgets-v2/category/category.tsx +10 -1
  190. package/src/widgets-v2/category/components/category-row-other.test.tsx +36 -7
  191. package/src/widgets-v2/category/components/category-row-other.tsx +64 -13
  192. package/src/widgets-v2/category/style.ts +35 -4
  193. package/src/widgets-v2/category/types.ts +2 -0
  194. package/src/widgets-v2/index.ts +3 -0
  195. package/src/widgets-v2/selection-summary/labels.ts +8 -4
  196. package/src/widgets-v2/selection-summary/selection-summary.test.tsx +15 -9
  197. package/src/widgets-v2/selection-summary/selection-summary.tsx +42 -22
  198. package/src/widgets-v2/selection-summary/style.ts +15 -0
  199. package/src/widgets-v2/table/table-ui.tsx +4 -4
  200. package/src/widgets-v2/toolbox/toolbox.tsx +1 -1
  201. package/src/widgets-v2/wrapper/widget-wrapper.tsx +1 -1
  202. package/dist/category-DwaeYjpX.js +0 -656
  203. package/dist/category-DwaeYjpX.js.map +0 -1
  204. package/dist/change-column-B4IT0rh6.js +0 -1110
  205. package/dist/change-column-B4IT0rh6.js.map +0 -1
  206. package/dist/png-item-CS4z1iSH.js.map +0 -1
  207. package/dist/table-CQCAnDLb.js.map +0 -1
@@ -7,6 +7,6 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  };
@@ -7,7 +7,7 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  menuPaper: {
13
13
  overflow: "hidden";
@@ -14,7 +14,7 @@ export declare const styles: {
14
14
  };
15
15
  };
16
16
  triggerActive: {
17
- background: (theme: Theme) => any;
17
+ background: (theme: Theme) => string;
18
18
  };
19
19
  dialogPaper: {
20
20
  width: string;
@@ -1,5 +1,6 @@
1
1
  export { Searcher, SearcherToggle, setSearcherText, filterBySearchText, DEFAULT_SEARCHER_LABELS, type SearcherProps, type SearcherToggleProps, type SearcherLabels, } from './searcher';
2
2
  export { StackToggle, addStack, DEFAULT_STACK_TOGGLE_LABELS, type StackToggleProps, type StackToggleLabels, } from './stack-toggle';
3
+ export { ShowAllToggle, setShowAll, SHOW_ALL_ID, DEFAULT_SHOW_ALL_LABELS, type ShowAllToggleProps, type ShowAllLabels, } from './show-all';
3
4
  export { ZoomToggle, addZoom, createAddZoom, ZOOM_LAYOUT, DEFAULT_ZOOM_TOGGLE_LABELS, type ZoomToggleProps, type ZoomToggleLabels, } from './zoom-toggle';
4
5
  export { BrushToggle, addBrush, DEFAULT_BRUSH_TOGGLE_LABELS, type BrushToggleProps, type BrushToggleLabels, } from './brush-toggle';
5
6
  export { RelativeData, toRelativeData, createPercentFormatter, DEFAULT_RELATIVE_DATA_LABELS, type RelativeDataProps, type RelativeDataLabels, } from './relative-data';
@@ -7,6 +7,6 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  };
@@ -7,6 +7,6 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  };
@@ -7,7 +7,7 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  input: {
13
13
  width: string;
@@ -0,0 +1,2 @@
1
+ export { ShowAllToggle, setShowAll, SHOW_ALL_ID, type ShowAllToggleProps, } from './show-all';
2
+ export { DEFAULT_SHOW_ALL_LABELS, type ShowAllLabels } from './labels';
@@ -0,0 +1,5 @@
1
+ export interface ShowAllLabels {
2
+ /** Tooltip + aria-label for the collapse (✕) button shown while expanded. */
3
+ toggle: string;
4
+ }
5
+ export declare const DEFAULT_SHOW_ALL_LABELS: ShowAllLabels;
@@ -0,0 +1,33 @@
1
+ import { ComponentType } from 'react';
2
+ import { SvgIconProps } from '@mui/material';
3
+ import { ShowAllLabels } from './labels';
4
+ /**
5
+ * The `show-all` flag is a pure UI signal (no data/config transform): the
6
+ * Category overflow row writes it `true` via {@link setShowAll}, the
7
+ * composer reads it with `useTransformEnabled(id, SHOW_ALL_ID)` to drop the
8
+ * row cap, and this button writes it back `false` to collapse. Stored under
9
+ * `transformStates` so `useTransformEnabled` can observe it like any other
10
+ * action flag — but it never registers a pipeline transform, so toggling it
11
+ * never re-runs the data pipeline.
12
+ */
13
+ export declare const SHOW_ALL_ID = "show-all";
14
+ export interface ShowAllToggleProps {
15
+ labels?: Partial<ShowAllLabels>;
16
+ icon?: ComponentType<SvgIconProps>;
17
+ iconProps?: SvgIconProps;
18
+ }
19
+ /**
20
+ * Collapse (✕) affordance shown while a widget is expanded into its
21
+ * "show all" state. Clicking it clears the `show-all` flag, returning the
22
+ * widget to its capped view. Mount it conditionally (only while the flag is
23
+ * set) so it doesn't occupy a `Widget.Toolbox` visibility-budget slot when
24
+ * the widget is collapsed.
25
+ */
26
+ export declare function ShowAllToggle({ labels, icon: Icon, iconProps, }: ShowAllToggleProps): import("react/jsx-runtime").JSX.Element;
27
+ /**
28
+ * Imperatively writes the `show-all` flag into the widget store. Mirrors
29
+ * {@link setSearcherText} — used by the Category overflow row (to expand)
30
+ * and the {@link ShowAllToggle} button (to collapse) without routing through
31
+ * a re-rendered subscription.
32
+ */
33
+ export declare function setShowAll(widgetId: string, value: boolean): void;
@@ -0,0 +1,8 @@
1
+ export declare const styles: {
2
+ toggle: {
3
+ p: number;
4
+ '& .MuiSvgIcon-root': {
5
+ fontSize: number;
6
+ };
7
+ };
8
+ };
@@ -7,6 +7,6 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  };
@@ -7,6 +7,6 @@ export declare const styles: {
7
7
  };
8
8
  };
9
9
  toggleActive: {
10
- background: (theme: Theme) => any;
10
+ background: (theme: Theme) => string;
11
11
  };
12
12
  };
@@ -23,7 +23,7 @@ export interface CategoryUIProps {
23
23
  * Caps the number of visible category rows.
24
24
  *
25
25
  * - `undefined` (omitted) — caps at {@link DEFAULT_MAX_ITEMS} (20).
26
- * Surplus rows fold into a single italic "Other (X more)" footer.
26
+ * Surplus rows fold into a single "Others <count>" footer row.
27
27
  * `undefined` cannot mean "no cap" because it's consumed by the
28
28
  * default-parameter syntax — pass `null` instead.
29
29
  * - positive finite N — same as the default but with a custom cap.
@@ -44,6 +44,13 @@ export interface CategoryUIProps {
44
44
  maxItems?: number | null;
45
45
  /** Labels for the "Other" overflow row. `{count}` placeholder is replaced. */
46
46
  labels?: CategoryLabels;
47
+ /**
48
+ * When provided, the "Other" overflow row becomes a button — clicking it
49
+ * fires `onShowAll`, which a composer typically wires to expand the widget
50
+ * (drop the row cap) so every category becomes reachable. When omitted the
51
+ * overflow row stays a static summary.
52
+ */
53
+ onShowAll?: () => void;
47
54
  /** Manual override for the bar-width denominator. */
48
55
  maxOverride?: number;
49
56
  /**
@@ -78,4 +85,4 @@ export interface CategoryUIProps {
78
85
  * Returns `null` when there's nothing to render — `Widget.State` is the
79
86
  * empty-state authority in the canonical compositor.
80
87
  */
81
- export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
88
+ export declare function CategoryUI({ data, selection, onSelectionChange, formatter, labelFormatter, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryUIProps): import("react/jsx-runtime").JSX.Element | null;
@@ -7,7 +7,7 @@ export interface CategoryProps {
7
7
  /** Per-series metadata. Enables the legend + overrides palette per index. */
8
8
  series?: readonly CategorySeriesConfig[];
9
9
  /**
10
- * Cap visible rows; overflow folds into "Other (X more)". Default 20
10
+ * Cap visible rows; overflow folds into an "Others <count>" row. Default 20
11
11
  * (when omitted). Pass `0` to swap the cap for a scrollable viewport
12
12
  * (composers use this when the user opens the SearcherToggle —
13
13
  * `maxItems = searcherOpen ? 0 : userMaxItems`). Pass `null` to disable
@@ -16,6 +16,13 @@ export interface CategoryProps {
16
16
  maxItems?: number | null;
17
17
  /** Labels for the "Other" overflow row. */
18
18
  labels?: CategoryLabels;
19
+ /**
20
+ * When provided, the "Other" overflow row becomes a button that fires this
21
+ * callback. Composers wire it to expand the widget (e.g. flip the
22
+ * `show-all` flag) so every category is shown. Forwarded to
23
+ * {@link CategoryUI}.
24
+ */
25
+ onShowAll?: () => void;
19
26
  /**
20
27
  * Manual override for the bar-width denominator. When omitted, the
21
28
  * bridge auto-fills from the widget store's `rawData` so bar widths
@@ -45,4 +52,4 @@ export interface CategoryProps {
45
52
  * `onSelectionChange` follow the destination-owned principle: the
46
53
  * consumer keeps the list in their own store and passes it through.
47
54
  */
48
- export declare function Category({ selection, onSelectionChange, series, maxItems, labels, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
55
+ export declare function Category({ selection, onSelectionChange, series, maxItems, labels, onShowAll, maxOverride, size, stacked, }: CategoryProps): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,26 @@
1
1
  export interface CategoryRowOtherProps {
2
2
  hiddenCount: number;
3
- /** Label for the overflow row. Defaults to `'Other'`. */
3
+ /** Label for the overflow row. Defaults to `'Others'`. */
4
4
  otherLabel?: string;
5
- /** Count text with `{count}` placeholder. Defaults to `'{count} more'`. */
5
+ /** Count text with `{count}` placeholder. Defaults to `'{count}'`. */
6
6
  otherCountLabel?: string;
7
+ /**
8
+ * When provided, the row becomes a button: clicking it (or Enter/Space)
9
+ * fires `onShowAll`, expanding the widget to reveal every category. When
10
+ * omitted the row renders as a static, non-interactive summary.
11
+ */
12
+ onShowAll?: () => void;
13
+ /** Tooltip shown over the button form. Defaults to `'Show all'`. */
14
+ showAllLabel?: string;
7
15
  }
8
16
  /**
9
- * Static "Other (X more)" overflow summary row. Rendered after the last
10
- * visible category row when `data.length > maxItems`. Non-interactive
11
- * no selection, no keyboard target.
17
+ * Overflow summary row rendered after the last visible category row when
18
+ * `data.length > maxItems`. Shows `Others <count>` (count muted, no
19
+ * parentheses).
20
+ *
21
+ * When `onShowAll` is supplied the row is an interactive button — clicking
22
+ * it (or Enter/Space) expands the widget to show all categories, mirroring
23
+ * the Searcher's full-list view. Without `onShowAll` it stays a static,
24
+ * non-interactive summary (backward-compatible default).
12
25
  */
13
- export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function CategoryRowOther({ hiddenCount, otherLabel, otherCountLabel, onShowAll, showAllLabel, }: CategoryRowOtherProps): import("react/jsx-runtime").JSX.Element;
@@ -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
- allSelected: string;
3
- selections: (count: number) => string;
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 to summarize). */
7
+ /** Optional total — when `undefined` or `0` the component renders nothing (no data). */
8
8
  total?: number;
9
- /** Clear callback. Shown only when count > 0. */
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
- * - `total === 0` → render nothing.
18
- * - `count === 0` → render `labels.allSelected` (matches v1 default),
19
- * prefixed with the optional `icon` glyph when provided.
20
- * - `count > 0` render `labels.selections(count)` + Clear (when `onClear`).
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";