@hubspot/ui-extensions 0.8.18 → 0.8.21

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.
@@ -271,3 +271,8 @@ export declare const ModalFooter: "ModalFooter" & {
271
271
  readonly props?: types.ModalFooterProps | undefined;
272
272
  readonly children?: true | undefined;
273
273
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ModalFooter", types.ModalFooterProps, true>>;
274
+ export declare const Icon: "Icon" & {
275
+ readonly type?: "Icon" | undefined;
276
+ readonly props?: types.IconProps | undefined;
277
+ readonly children?: true | undefined;
278
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Icon", types.IconProps, true>>;
@@ -57,3 +57,4 @@ export const StepperInput = createRemoteReactComponent('StepperInput');
57
57
  export const Modal = createRemoteReactComponent('Modal');
58
58
  export const ModalBody = createRemoteReactComponent('ModalBody');
59
59
  export const ModalFooter = createRemoteReactComponent('ModalFooter');
60
+ export const Icon = createRemoteReactComponent('Icon');
@@ -1 +1,14 @@
1
- export { Tooltip, Slider, Icon } from './experimentalComponents';
1
+ import type * as types from '../types';
2
+ /** @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. */
3
+ declare const Tooltip: "Tooltip" & {
4
+ readonly type?: "Tooltip" | undefined;
5
+ readonly props?: types.TooltipProps | undefined;
6
+ readonly children?: true | undefined;
7
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tooltip", types.TooltipProps, true>>;
8
+ /** @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. */
9
+ declare const Slider: "Slider" & {
10
+ readonly type?: "Slider" | undefined;
11
+ readonly props?: types.SliderProps | undefined;
12
+ readonly children?: true | undefined;
13
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Slider", types.SliderProps, true>>;
14
+ export { Tooltip, Slider };
@@ -1 +1,6 @@
1
- export { Tooltip, Slider, Icon } from './experimentalComponents';
1
+ import { createRemoteReactComponent } from '@remote-ui/react';
2
+ /** @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. */
3
+ const Tooltip = createRemoteReactComponent('Tooltip');
4
+ /** @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. */
5
+ const Slider = createRemoteReactComponent('Slider');
6
+ export { Tooltip, Slider };
package/dist/types.d.ts CHANGED
@@ -32,7 +32,7 @@ export interface AlertProps {
32
32
  *
33
33
  * @defaultValue `"info"`
34
34
  */
35
- variant?: 'info' | 'warning' | 'success' | 'error' | 'danger';
35
+ variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
36
36
  }
37
37
  /**
38
38
  * The props type for {@link !components.Button}.
@@ -41,7 +41,7 @@ export interface AlertProps {
41
41
  */
42
42
  export interface ButtonProps {
43
43
  /**
44
- * A function that will be invoked when the button is clicked.
44
+ * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
45
45
  *
46
46
  * @event
47
47
  */
@@ -93,6 +93,31 @@ export interface ButtonRowProps {
93
93
  * @defaultValue `false`
94
94
  */
95
95
  disableDropdown?: boolean;
96
+ /**
97
+ * Controls the appearance and text content of the dropdown button.
98
+ */
99
+ dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
100
+ }
101
+ /** Configures the Dropdown Button in the ButtonRow component */
102
+ export interface ButtonRownDropDownButtonOptionsProps {
103
+ /**
104
+ * Sets the content for the dropdown button.
105
+ *
106
+ * @defaultValue `"More"`
107
+ */
108
+ text?: string;
109
+ /**
110
+ * Sets the size of the dropdown button.
111
+ *
112
+ * @defaultValue `"md"`
113
+ */
114
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
115
+ /**
116
+ * Controls the appearance of the dropdown button
117
+ *
118
+ * @defaultValue `"secondary"`
119
+ */
120
+ variant?: 'primary' | 'secondary' | 'transparent';
96
121
  }
97
122
  /**
98
123
  * The props type for {@link !components.Card}.
@@ -232,16 +257,12 @@ export interface FormProps {
232
257
  */
233
258
  children: ReactNode;
234
259
  /**
235
- * The function that is called when the form is submitted. It will receive a FormSubmitExtensionEvent as an argument and its return value will be ignored.
260
+ * The function that is called when the form is submitted. It will receive a FormSubmitExtensionEvent as an argument and its return value will be ignored. This function should be used instead of Button's `onClick` for the Form's submit button.
236
261
  *
237
262
  * @event
238
263
  */
239
264
  onSubmit?: ReactionsHandler<FormSubmitExtensionEvent<FormInputValues>>;
240
- /**
241
- * When set to `true`, `event.preventDefault()` will be invoked before the `onSubmit` function is called, preventing the default HTML form behavior.
242
- *
243
- * @defaultValue `false`
244
- */
265
+ /** @deprecated the value for `preventDefault` is now always `true`, use `onSubmit` to handle all form submission behavior */
245
266
  preventDefault?: boolean;
246
267
  }
247
268
  /**
@@ -273,7 +294,7 @@ export interface IconProps {
273
294
  /**
274
295
  * Sets the specific icon to display.
275
296
  */
276
- type: IconTypes;
297
+ name: IconNames;
277
298
  /**
278
299
  * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
279
300
  *
@@ -285,7 +306,7 @@ export interface IconProps {
285
306
  */
286
307
  screenReaderText?: string;
287
308
  }
288
- export declare const iconTypes: {
309
+ export declare const iconNames: {
289
310
  readonly success: "success";
290
311
  readonly remove: "remove";
291
312
  readonly add: "add";
@@ -321,7 +342,7 @@ export declare const iconTypes: {
321
342
  readonly save: "saveEditableView";
322
343
  readonly notification: "notification";
323
344
  };
324
- export type IconTypes = keyof typeof iconTypes;
345
+ export type IconNames = keyof typeof iconNames;
325
346
  /**
326
347
  * The props type for {@link !components.Image}.
327
348
  *
@@ -1356,7 +1377,7 @@ export type ReloadPageAction = () => void;
1356
1377
  /** @ignore */
1357
1378
  export type FetchCrmObjectPropertiesAction = (properties: string[] | '*') => Promise<Record<string, string>>;
1358
1379
  /** @ignore */
1359
- export type OpenIframeModalAction = (action: OpenIframeActionPayload) => void;
1380
+ export type OpenIframeModalAction = (action: OpenIframeActionPayload, onClose?: () => void) => void;
1360
1381
  /** @ignore */
1361
1382
  export type refreshObjectPropertiesAction = () => void;
1362
1383
  /** @ignore */
@@ -2216,6 +2237,12 @@ export interface DropdownProps {
2216
2237
  * @defaultValue `"md"`
2217
2238
  */
2218
2239
  buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2240
+ /**
2241
+ * Disables the ability to focus and click-to-expand of the dropdown button
2242
+ *
2243
+ * @defaultValue `false`
2244
+ */
2245
+ disabled?: boolean;
2219
2246
  }
2220
2247
  /**
2221
2248
  * @ignore
package/dist/types.js CHANGED
@@ -17,7 +17,7 @@ export class FormSubmitExtensionEvent extends ExtensionEvent {
17
17
  this.targetValue = value;
18
18
  }
19
19
  }
20
- export const iconTypes = {
20
+ export const iconNames = {
21
21
  success: 'success',
22
22
  remove: 'remove',
23
23
  add: 'add',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.18",
3
+ "version": "0.8.21",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,5 +51,5 @@
51
51
  "devDependencies": {
52
52
  "typescript": "5.0.4"
53
53
  },
54
- "gitHead": "d924c3162f175d778889bab358648e629d88b025"
54
+ "gitHead": "1086b156684d2a06f3ca78dc3d0d504ce9c8f0c4"
55
55
  }
@@ -1,19 +0,0 @@
1
- import type * as types from '../types';
2
- /** @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. */
3
- export declare const Tooltip: "Tooltip" & {
4
- readonly type?: "Tooltip" | undefined;
5
- readonly props?: types.TooltipProps | undefined;
6
- readonly children?: true | undefined;
7
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tooltip", types.TooltipProps, true>>;
8
- /** @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. */
9
- export declare const Slider: "Slider" & {
10
- readonly type?: "Slider" | undefined;
11
- readonly props?: types.SliderProps | undefined;
12
- readonly children?: true | undefined;
13
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Slider", types.SliderProps, true>>;
14
- /** @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. */
15
- export declare const Icon: "Icon" & {
16
- readonly type?: "Icon" | undefined;
17
- readonly props?: types.IconProps | undefined;
18
- readonly children?: true | undefined;
19
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Icon", types.IconProps, true>>;
@@ -1,7 +0,0 @@
1
- import { createRemoteReactComponent } from '@remote-ui/react';
2
- /** @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. */
3
- export const Tooltip = createRemoteReactComponent('Tooltip');
4
- /** @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. */
5
- export const Slider = createRemoteReactComponent('Slider');
6
- /** @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. */
7
- export const Icon = createRemoteReactComponent('Icon');