@hubspot/ui-extensions 0.8.50 → 0.8.52

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.
@@ -721,3 +721,53 @@ export declare const LineChart: "LineChart" & {
721
721
  readonly props?: types.ChartProps | undefined;
722
722
  readonly children?: true | undefined;
723
723
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LineChart", types.ChartProps, true>>;
724
+ /**
725
+ * `Tabs` allow you to group related content in a compact space, allowing users to switch between views without leaving the page.
726
+ * @example
727
+ * ```tsx
728
+ * <Tabs defaultSelected="1">
729
+ * <Tab tabId="1">First tab content</Tab>
730
+ * <Tab tabId="2">Second tab content</Tab>
731
+ * </Tabs>
732
+ * ```
733
+ *
734
+ * **Links:**
735
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tabs Documentation}
736
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/tabs-example Tabs Example}
737
+ */
738
+ export declare const Tabs: "Tabs" & {
739
+ readonly type?: "Tabs" | undefined;
740
+ readonly props?: types.TabsProps | undefined;
741
+ readonly children?: true | undefined;
742
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tabs", types.TabsProps, true>>;
743
+ /**
744
+ * Each `Tab` represents a single tab (or "view") within the parent `Tabs` component.
745
+ * @example
746
+ * ```tsx
747
+ * <Tabs defaultSelected="1">
748
+ * <Tab tabId="1">First tab content</Tab>
749
+ * <Tab tabId="2">Second tab content</Tab>
750
+ * </Tabs>
751
+ * ```
752
+ *
753
+ * **Links:**
754
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tabs Documentation}
755
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/tabs-example Tabs Example}
756
+ */
757
+ export declare const Tab: "Tab" & {
758
+ readonly type?: "Tab" | undefined;
759
+ readonly props?: types.TabProps | undefined;
760
+ readonly children?: true | undefined;
761
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tab", types.TabProps, true>>;
762
+ /**
763
+ * The `Illustration` component renders an illustration.
764
+ *
765
+ * **Links:**
766
+ *
767
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/illustration Illustration Docs}
768
+ */
769
+ export declare const Illustration: "Illustration" & {
770
+ readonly type?: "Illustration" | undefined;
771
+ readonly props?: types.IllustrationProps | undefined;
772
+ readonly children?: true | undefined;
773
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Illustration", types.IllustrationProps, true>>;
@@ -481,3 +481,41 @@ export const BarChart = createRemoteReactComponent('BarChart');
481
481
  * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/charts-example Charts Example}
482
482
  */
483
483
  export const LineChart = createRemoteReactComponent('LineChart');
484
+ /**
485
+ * `Tabs` allow you to group related content in a compact space, allowing users to switch between views without leaving the page.
486
+ * @example
487
+ * ```tsx
488
+ * <Tabs defaultSelected="1">
489
+ * <Tab tabId="1">First tab content</Tab>
490
+ * <Tab tabId="2">Second tab content</Tab>
491
+ * </Tabs>
492
+ * ```
493
+ *
494
+ * **Links:**
495
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tabs Documentation}
496
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/tabs-example Tabs Example}
497
+ */
498
+ export const Tabs = createRemoteReactComponent('Tabs');
499
+ /**
500
+ * Each `Tab` represents a single tab (or "view") within the parent `Tabs` component.
501
+ * @example
502
+ * ```tsx
503
+ * <Tabs defaultSelected="1">
504
+ * <Tab tabId="1">First tab content</Tab>
505
+ * <Tab tabId="2">Second tab content</Tab>
506
+ * </Tabs>
507
+ * ```
508
+ *
509
+ * **Links:**
510
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/tabs Documentation}
511
+ * - {@link https://github.com/HubSpot/ui-extensions-examples/tree/main/tabs-example Tabs Example}
512
+ */
513
+ export const Tab = createRemoteReactComponent('Tab');
514
+ /**
515
+ * The `Illustration` component renders an illustration.
516
+ *
517
+ * **Links:**
518
+ *
519
+ * - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/illustration Illustration Docs}
520
+ */
521
+ export const Illustration = createRemoteReactComponent('Illustration');
@@ -7,26 +7,6 @@ declare const Iframe: "Iframe" & {
7
7
  readonly props?: types.IframeProps | undefined;
8
8
  readonly children?: true | undefined;
9
9
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Iframe", types.IframeProps, true>>;
10
- /** @experimental */
11
- export declare const Tab: "Tab" & {
12
- readonly type?: "Tab" | undefined;
13
- readonly props?: experimentalTypes.TabProps | undefined;
14
- readonly children?: true | undefined;
15
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tab", experimentalTypes.TabProps, true>>;
16
- /** @experimental */
17
- export declare const Tabs: "Tabs" & {
18
- readonly type?: "Tabs" | undefined;
19
- readonly props?: experimentalTypes.TabsProps | undefined;
20
- readonly children?: ("Tab" & {
21
- readonly type?: "Tab" | undefined;
22
- readonly props?: experimentalTypes.TabProps | undefined;
23
- readonly children?: true | undefined;
24
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tab", experimentalTypes.TabProps, true>>) | undefined;
25
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tabs", experimentalTypes.TabsProps, "Tab" & {
26
- readonly type?: "Tab" | undefined;
27
- readonly props?: experimentalTypes.TabProps | undefined;
28
- readonly children?: true | undefined;
29
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tab", experimentalTypes.TabProps, true>>>>;
30
10
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
31
11
  declare const MediaObject: "MediaObject" & {
32
12
  readonly type?: "MediaObject" | undefined;
@@ -2,10 +2,6 @@ import { createRemoteReactComponent } from '@remote-ui/react';
2
2
  export { useCrmProperties } from './hooks/useCrmProperties';
3
3
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
4
4
  const Iframe = createRemoteReactComponent('Iframe');
5
- /** @experimental */
6
- export const Tab = createRemoteReactComponent('Tab');
7
- /** @experimental */
8
- export const Tabs = createRemoteReactComponent('Tabs');
9
5
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
10
6
  const MediaObject = createRemoteReactComponent('MediaObject', {
11
7
  fragmentProps: ['itemRight', 'itemLeft'],
@@ -1,68 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { RemoteFragment } from '@remote-ui/core';
3
3
  import type { AllDistances, ExtensionEvent, ReactionsHandler } from '../types';
4
- /**
5
- * @ignore
6
- * @experimental do not use in production
7
- */
8
- export interface TabsProps {
9
- /**
10
- * Sets the content that will render inside the component.
11
- */
12
- children?: ReactNode;
13
- /**
14
- * Callback when the selected tab changes.
15
- */
16
- onSelectedChange?: (selectedId: string | number) => void;
17
- /**
18
- * The initially selected tab ID.
19
- */
20
- defaultSelected?: string | number;
21
- /**
22
- * The currently selected tab ID (controlled component).
23
- */
24
- selected?: string | number;
25
- /**
26
- * Visual style variant of the tabs.
27
- * @defaultValue 'default'
28
- */
29
- variant?: 'default' | 'enclosed';
30
- /**
31
- * Whether the tab should fill available space.
32
- */
33
- fill?: boolean;
34
- }
35
- /**
36
- * @ignore
37
- * @experimental do not use in production
38
- */
39
- export interface TabProps {
40
- /**
41
- * Whether the tab is disabled.
42
- */
43
- disabled?: boolean;
44
- /**
45
- * Unique identifier for the tab.
46
- */
47
- tabId?: string | number;
48
- /**
49
- * The title text of the tab.
50
- */
51
- title?: string;
52
- /**
53
- * The content to display when this tab is selected.
54
- */
55
- children?: ReactNode;
56
- /**
57
- * The tooltip text of the tab.
58
- */
59
- tooltip?: string;
60
- /**
61
- * The tab's tooltip placement
62
- * @defaultValue 'top'
63
- */
64
- tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
65
- }
66
4
  /**
67
5
  * @ignore
68
6
  * @experimental do not use in production
package/dist/types.d.ts CHANGED
@@ -1256,8 +1256,8 @@ export type TextProps = {
1256
1256
  format?: TextFormatOptions;
1257
1257
  /**
1258
1258
  * @interface
1259
- * truncates long strings to a single line. If the full string doesnt fit in one line,
1260
- * its shown in a tooltip on hover.
1259
+ * truncates long strings to a single line. If the full string doesn't fit in one line,
1260
+ * it's shown in a tooltip on hover.
1261
1261
  *
1262
1262
  * - `false` => no truncation(default).
1263
1263
  * - `true` => truncates the string to a single line. Full-text will show inside the tooltip.
@@ -1798,6 +1798,7 @@ export interface CrmHostActions {
1798
1798
  export interface UiePlatformActions {
1799
1799
  copyTextToClipboard: Clipboard['writeText'];
1800
1800
  closeOverlay: CloseOverlayAction;
1801
+ reloadPage: ReloadPageAction;
1801
1802
  }
1802
1803
  /** @ignore */
1803
1804
  export interface StandardCrmExtensionPoint extends ExtensionPointContract {
@@ -2772,4 +2773,111 @@ export type ProxyMetadata = {
2772
2773
  userId?: number;
2773
2774
  portalId?: number;
2774
2775
  };
2776
+ export interface TabsProps {
2777
+ /**
2778
+ * Sets the content that will render inside the component.
2779
+ */
2780
+ children?: ReactNode;
2781
+ /**
2782
+ * Callback when the selected tab changes.
2783
+ */
2784
+ onSelectedChange?: ((selectedId: string) => void) | ((selectedId: number) => void) | ((selectedId: number | string) => void);
2785
+ /**
2786
+ * The initially selected tab ID.
2787
+ */
2788
+ defaultSelected?: string | number;
2789
+ /**
2790
+ * The currently selected tab ID (controlled component).
2791
+ */
2792
+ selected?: string | number;
2793
+ /**
2794
+ * Visual style variant of the tabs.
2795
+ * @defaultValue 'default'
2796
+ */
2797
+ variant?: 'default' | 'enclosed';
2798
+ /**
2799
+ * Whether the tab should fill available space.
2800
+ */
2801
+ fill?: boolean;
2802
+ }
2803
+ export interface TabProps {
2804
+ /**
2805
+ * Whether the tab is disabled.
2806
+ */
2807
+ disabled?: boolean;
2808
+ /**
2809
+ * Unique identifier for the tab.
2810
+ */
2811
+ tabId?: string | number;
2812
+ /**
2813
+ * The title text of the tab.
2814
+ */
2815
+ title?: string;
2816
+ /**
2817
+ * The content to display when this tab is selected.
2818
+ */
2819
+ children?: ReactNode;
2820
+ /**
2821
+ * The tooltip text of the tab.
2822
+ */
2823
+ tooltip?: string;
2824
+ /**
2825
+ * The tab's tooltip placement
2826
+ * @defaultValue 'top'
2827
+ */
2828
+ tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
2829
+ }
2830
+ /**
2831
+ * The props type for {@link !components.Illustration}.
2832
+ *
2833
+ * @category Component Props
2834
+ */
2835
+ export interface IllustrationProps {
2836
+ name: IllustrationNames;
2837
+ alt: string;
2838
+ width?: number;
2839
+ height?: number;
2840
+ }
2841
+ export declare const illustrationNames: {
2842
+ readonly lock: "lock";
2843
+ readonly unlock: "unlock";
2844
+ readonly electronicSignature: "electronic-signature";
2845
+ readonly electronicSignatureEmptyState: "electronic-signature-empty-state";
2846
+ readonly callingSetUp: "calling-set-up";
2847
+ readonly companies: "companies";
2848
+ readonly contacts: "contacts";
2849
+ readonly multipleObjects: "multiple-objects";
2850
+ readonly object: "object";
2851
+ readonly task: "task";
2852
+ readonly deals: "deals";
2853
+ readonly registration: "registration";
2854
+ readonly developerSecurityUpdate: "developer-security-update";
2855
+ readonly social: "social";
2856
+ readonly leads: "leads";
2857
+ readonly target: "target";
2858
+ readonly emailConfirmation: "email-confirmation";
2859
+ readonly successfullyConnectedEmail: "successfully-connected-email";
2860
+ readonly contentStrategy: "content-strategy";
2861
+ readonly addOnReporting: "add-on-reporting";
2862
+ readonly productsShoppingCart: "products-shopping-cart";
2863
+ readonly store: "store";
2864
+ readonly storeDisabled: "store-disabled";
2865
+ readonly customerSupport: "customer-support";
2866
+ readonly customerExperience: "customer-experience";
2867
+ readonly api: "api";
2868
+ readonly integrations: "integrations";
2869
+ readonly sandboxAddOn: "sandbox-add-on";
2870
+ readonly customObjects: "custom-objects";
2871
+ readonly paymentsButton: "payments-button";
2872
+ readonly automatedTesting: "automated-testing";
2873
+ readonly middlePaneCards: "middle-pane-cards";
2874
+ readonly propertiesSidebar: "properties-sidebar";
2875
+ readonly emptyStateCharts: "empty-state-charts";
2876
+ readonly meetings: "meetings-small";
2877
+ readonly tickets: "ticket-small";
2878
+ readonly sidebar: "settings-sidebar";
2879
+ readonly errorGeneral: "errors/general";
2880
+ readonly errorHourglass: "errors/hourglass";
2881
+ };
2882
+ export type IllustrationNames = keyof typeof illustrationNames;
2775
2883
  export {};
package/dist/types.js CHANGED
@@ -198,3 +198,46 @@ export class RemoteEvent {
198
198
  this.targetValue = value;
199
199
  }
200
200
  }
201
+ export const illustrationNames = {
202
+ // Standard 1:1 mappings
203
+ lock: 'lock',
204
+ unlock: 'unlock',
205
+ electronicSignature: 'electronic-signature',
206
+ electronicSignatureEmptyState: 'electronic-signature-empty-state',
207
+ callingSetUp: 'calling-set-up',
208
+ companies: 'companies',
209
+ contacts: 'contacts',
210
+ multipleObjects: 'multiple-objects',
211
+ object: 'object',
212
+ task: 'task',
213
+ deals: 'deals',
214
+ registration: 'registration',
215
+ developerSecurityUpdate: 'developer-security-update',
216
+ social: 'social',
217
+ leads: 'leads',
218
+ target: 'target',
219
+ emailConfirmation: 'email-confirmation',
220
+ successfullyConnectedEmail: 'successfully-connected-email',
221
+ contentStrategy: 'content-strategy',
222
+ addOnReporting: 'add-on-reporting',
223
+ productsShoppingCart: 'products-shopping-cart',
224
+ store: 'store',
225
+ storeDisabled: 'store-disabled',
226
+ customerSupport: 'customer-support',
227
+ customerExperience: 'customer-experience',
228
+ api: 'api',
229
+ integrations: 'integrations',
230
+ sandboxAddOn: 'sandbox-add-on',
231
+ customObjects: 'custom-objects',
232
+ paymentsButton: 'payments-button',
233
+ automatedTesting: 'automated-testing',
234
+ middlePaneCards: 'middle-pane-cards',
235
+ propertiesSidebar: 'properties-sidebar',
236
+ emptyStateCharts: 'empty-state-charts',
237
+ // Special mappings that are not 1:1
238
+ meetings: 'meetings-small',
239
+ tickets: 'ticket-small',
240
+ sidebar: 'settings-sidebar',
241
+ errorGeneral: 'errors/general',
242
+ errorHourglass: 'errors/hourglass',
243
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.50",
3
+ "version": "0.8.52",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -60,5 +60,5 @@
60
60
  "react-reconciler": "^0.29.0",
61
61
  "typescript": "5.0.4"
62
62
  },
63
- "gitHead": "0274315aed3fa8709f2ba403335e98316ceb7d2a"
63
+ "gitHead": "49d7e6ce23cf06a54cbe038f11bb1b5e57358254"
64
64
  }