@hubspot/ui-extensions 0.10.1 → 0.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.
Files changed (129) hide show
  1. package/dist/{pages/home/components.d.ts → __synced__/appHomeRemoteComponents.synced.d.ts} +7 -7
  2. package/dist/{pages/home/components.js → __synced__/appHomeRemoteComponents.synced.js} +1 -0
  3. package/dist/{crm/components.d.ts → __synced__/crmRemoteComponents.synced.d.ts} +40 -41
  4. package/dist/__synced__/crmRemoteComponents.synced.js +15 -0
  5. package/dist/__synced__/experimental/types.synced.d.ts +241 -0
  6. package/dist/__synced__/experimental/types.synced.js +5 -0
  7. package/dist/__synced__/experimentalRemoteComponents.synced.d.ts +94 -0
  8. package/dist/__synced__/experimentalRemoteComponents.synced.js +56 -0
  9. package/dist/__synced__/remoteComponents.synced.d.ts +848 -0
  10. package/dist/__synced__/remoteComponents.synced.js +583 -0
  11. package/dist/__synced__/types/actions.synced.d.ts +57 -0
  12. package/dist/__synced__/types/actions.synced.js +1 -0
  13. package/dist/__synced__/types/components/accordion.synced.d.ts +48 -0
  14. package/dist/__synced__/types/components/accordion.synced.js +1 -0
  15. package/dist/__synced__/types/components/alert.synced.d.ts +24 -0
  16. package/dist/__synced__/types/components/alert.synced.js +1 -0
  17. package/dist/__synced__/types/components/app-home-header-actions.synced.d.ts +39 -0
  18. package/dist/__synced__/types/components/app-home-header-actions.synced.js +1 -0
  19. package/dist/__synced__/types/components/button-row.synced.d.ts +44 -0
  20. package/dist/__synced__/types/components/button-row.synced.js +1 -0
  21. package/dist/__synced__/types/components/button.synced.d.ts +89 -0
  22. package/dist/__synced__/types/components/button.synced.js +1 -0
  23. package/dist/__synced__/types/components/card.synced.d.ts +12 -0
  24. package/dist/__synced__/types/components/card.synced.js +1 -0
  25. package/dist/__synced__/types/components/chart.synced.d.ts +137 -0
  26. package/dist/__synced__/types/components/chart.synced.js +5 -0
  27. package/dist/__synced__/types/components/description-list.synced.d.ts +36 -0
  28. package/dist/__synced__/types/components/description-list.synced.js +1 -0
  29. package/dist/__synced__/types/components/divider.synced.d.ts +14 -0
  30. package/dist/__synced__/types/components/divider.synced.js +1 -0
  31. package/dist/__synced__/types/components/dropdown.synced.d.ts +84 -0
  32. package/dist/__synced__/types/components/dropdown.synced.js +1 -0
  33. package/dist/__synced__/types/components/empty-state.synced.d.ts +51 -0
  34. package/dist/__synced__/types/components/empty-state.synced.js +1 -0
  35. package/dist/__synced__/types/components/error-state.synced.d.ts +24 -0
  36. package/dist/__synced__/types/components/error-state.synced.js +1 -0
  37. package/dist/__synced__/types/components/form.synced.d.ts +29 -0
  38. package/dist/__synced__/types/components/form.synced.js +1 -0
  39. package/dist/__synced__/types/components/heading.synced.d.ts +19 -0
  40. package/dist/__synced__/types/components/heading.synced.js +1 -0
  41. package/dist/__synced__/types/components/icon.synced.d.ts +29 -0
  42. package/dist/__synced__/types/components/icon.synced.js +1 -0
  43. package/dist/__synced__/types/components/iframe.synced.d.ts +20 -0
  44. package/dist/__synced__/types/components/iframe.synced.js +1 -0
  45. package/dist/__synced__/types/components/illustration.synced.d.ts +53 -0
  46. package/dist/__synced__/types/components/illustration.synced.js +43 -0
  47. package/dist/__synced__/types/components/image.synced.d.ts +40 -0
  48. package/dist/__synced__/types/components/image.synced.js +1 -0
  49. package/dist/__synced__/types/components/index.synced.d.ts +38 -0
  50. package/dist/__synced__/types/components/index.synced.js +1 -0
  51. package/dist/__synced__/types/components/inputs.synced.d.ts +350 -0
  52. package/dist/__synced__/types/components/inputs.synced.js +1 -0
  53. package/dist/__synced__/types/components/layouts.synced.d.ts +172 -0
  54. package/dist/__synced__/types/components/layouts.synced.js +1 -0
  55. package/dist/__synced__/types/components/link.synced.d.ts +38 -0
  56. package/dist/__synced__/types/components/link.synced.js +1 -0
  57. package/dist/__synced__/types/components/list.synced.d.ts +18 -0
  58. package/dist/__synced__/types/components/list.synced.js +1 -0
  59. package/dist/__synced__/types/components/loading-spinner.synced.d.ts +31 -0
  60. package/dist/__synced__/types/components/loading-spinner.synced.js +1 -0
  61. package/dist/__synced__/types/components/modal.synced.d.ts +60 -0
  62. package/dist/__synced__/types/components/modal.synced.js +1 -0
  63. package/dist/__synced__/types/components/panel.synced.d.ts +73 -0
  64. package/dist/__synced__/types/components/panel.synced.js +1 -0
  65. package/dist/__synced__/types/components/progress-bar.synced.d.ts +48 -0
  66. package/dist/__synced__/types/components/progress-bar.synced.js +1 -0
  67. package/dist/__synced__/types/components/selects.synced.d.ts +130 -0
  68. package/dist/__synced__/types/components/selects.synced.js +1 -0
  69. package/dist/__synced__/types/components/statistics.synced.d.ts +56 -0
  70. package/dist/__synced__/types/components/statistics.synced.js +1 -0
  71. package/dist/__synced__/types/components/status-tag.synced.d.ts +42 -0
  72. package/dist/__synced__/types/components/status-tag.synced.js +1 -0
  73. package/dist/__synced__/types/components/step-indicator.synced.d.ts +44 -0
  74. package/dist/__synced__/types/components/step-indicator.synced.js +1 -0
  75. package/dist/__synced__/types/components/table.synced.d.ts +138 -0
  76. package/dist/__synced__/types/components/table.synced.js +1 -0
  77. package/dist/__synced__/types/components/tabs.synced.d.ts +55 -0
  78. package/dist/__synced__/types/components/tabs.synced.js +1 -0
  79. package/dist/__synced__/types/components/tag.synced.d.ts +32 -0
  80. package/dist/__synced__/types/components/tag.synced.js +1 -0
  81. package/dist/__synced__/types/components/text.synced.d.ts +93 -0
  82. package/dist/__synced__/types/components/text.synced.js +1 -0
  83. package/dist/__synced__/types/components/tile.synced.d.ts +24 -0
  84. package/dist/__synced__/types/components/tile.synced.js +1 -0
  85. package/dist/__synced__/types/components/toggle.synced.d.ts +60 -0
  86. package/dist/__synced__/types/components/toggle.synced.js +1 -0
  87. package/dist/__synced__/types/components/toggleInputs.synced.d.ts +191 -0
  88. package/dist/__synced__/types/components/toggleInputs.synced.js +1 -0
  89. package/dist/__synced__/types/components/tooltip.synced.d.ts +12 -0
  90. package/dist/__synced__/types/components/tooltip.synced.js +1 -0
  91. package/dist/__synced__/types/context.synced.d.ts +82 -0
  92. package/dist/__synced__/types/context.synced.js +1 -0
  93. package/dist/__synced__/types/crm.synced.d.ts +248 -0
  94. package/dist/__synced__/types/crm.synced.js +1 -0
  95. package/dist/__synced__/types/extension-points.synced.d.ts +122 -0
  96. package/dist/__synced__/types/extension-points.synced.js +9 -0
  97. package/dist/__synced__/types/http-requests.synced.d.ts +106 -0
  98. package/dist/__synced__/types/http-requests.synced.js +8 -0
  99. package/dist/__synced__/types/index.synced.d.ts +8 -0
  100. package/dist/__synced__/types/index.synced.js +9 -0
  101. package/dist/__synced__/types/reactions.synced.d.ts +12 -0
  102. package/dist/__synced__/types/reactions.synced.js +1 -0
  103. package/dist/__synced__/types/shared.synced.d.ts +197 -0
  104. package/dist/__synced__/types/shared.synced.js +179 -0
  105. package/dist/coreComponents.d.ts +9 -5
  106. package/dist/coreComponents.js +15 -1
  107. package/dist/crm/index.d.ts +2 -2
  108. package/dist/crm/index.js +1 -2
  109. package/dist/experimental/index.d.ts +2 -73
  110. package/dist/experimental/index.js +1 -34
  111. package/dist/experimental/testing/internal/types-internal.d.ts +47 -0
  112. package/dist/experimental/testing/internal/types-internal.js +1 -0
  113. package/dist/experimental/testing/type-utils.d.ts +29 -0
  114. package/dist/experimental/testing/type-utils.js +37 -0
  115. package/dist/experimental/testing/types.d.ts +240 -0
  116. package/dist/experimental/testing/types.js +10 -0
  117. package/dist/experimental/types.d.ts +4 -0
  118. package/dist/pages/home/index.d.ts +1 -0
  119. package/dist/pages/home/index.js +1 -0
  120. package/dist/types.d.ts +51 -4
  121. package/dist/types.js +0 -3
  122. package/package.json +4 -7
  123. package/dist/crm/components.js +0 -15
  124. package/dist/experimental/testing/index.d.ts +0 -14
  125. package/dist/experimental/testing/index.js +0 -33
  126. package/dist/experimental/testing/jest/matchers/index.d.ts +0 -6
  127. package/dist/experimental/testing/jest/matchers/index.js +0 -6
  128. package/dist/utils/createExtensionComponent.d.ts +0 -3
  129. package/dist/utils/createExtensionComponent.js +0 -4
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { FormSubmitExtensionEvent } from '../shared.synced';
3
+ import { ReactionsHandler } from '../reactions.synced';
4
+ export type FormInputValues = Record<string, string | number>;
5
+ /**
6
+ * The props type for {@link !components.Form}.
7
+ *
8
+ * @category Component Props
9
+ */
10
+ export interface FormProps {
11
+ /**
12
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
13
+ *
14
+ */
15
+ children: ReactNode;
16
+ /**
17
+ * 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.
18
+ *
19
+ * @event
20
+ */
21
+ onSubmit?: ReactionsHandler<FormSubmitExtensionEvent<FormInputValues>>;
22
+ /** @deprecated the value for `preventDefault` is now always `true`, use `onSubmit` to handle all form submission behavior */
23
+ preventDefault?: boolean;
24
+ /**
25
+ * Specifies how autcomplete behaves in the entire form.
26
+ * @defaultValue `"on"`
27
+ */
28
+ autoComplete?: 'off' | 'on';
29
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * The props type for {@link !components.Heading}.
4
+ *
5
+ * @category Component Props
6
+ */
7
+ export interface HeadingProps {
8
+ /**
9
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
10
+ *
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * When set to true, text will not line break.
15
+ *
16
+ * @defaultValue `false`
17
+ */
18
+ inline?: boolean;
19
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ import { TShirtSizes, IconNames } from '../shared.synced';
2
+ export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
3
+ /**
4
+ * The props type for {@link !components.Icon}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface IconProps {
9
+ /**
10
+ * Sets the icon color. By default, the icon will use `inherit`, which inherits the color from its parent element.
11
+ *
12
+ * @defaultValue `"inherit"`
13
+ */
14
+ color?: IconColor;
15
+ /**
16
+ * Sets the specific icon to display.
17
+ */
18
+ name: IconNames;
19
+ /**
20
+ * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
21
+ *
22
+ * @defaultValue `"medium"`
23
+ */
24
+ size?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
25
+ /**
26
+ * Sets the text that a screenreader will read for this icon.
27
+ */
28
+ screenReaderText?: string;
29
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { TShirtSizes } from '../shared.synced';
2
+ /**
3
+ * The props type for {@link !components.Iframe}.
4
+ *
5
+ * @ignore
6
+ * @experimental
7
+ * @category Component Props
8
+ */
9
+ export interface IframeProps {
10
+ /**
11
+ * Sets the height of the iframe. If this prop is not provided, the iframe defaults size medium.
12
+ *
13
+ * @defaultValue `"medium"`
14
+ */
15
+ height?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
16
+ /**
17
+ * The URL to render into the inline iframe.
18
+ */
19
+ src: string;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The props type for {@link !components.Illustration}.
3
+ *
4
+ * @category Component Props
5
+ */
6
+ export interface IllustrationProps {
7
+ name: IllustrationNames;
8
+ alt: string;
9
+ width?: number;
10
+ height?: number;
11
+ }
12
+ export declare const illustrationNames: {
13
+ readonly lock: "lock";
14
+ readonly unlock: "unlock";
15
+ readonly electronicSignature: "electronic-signature";
16
+ readonly electronicSignatureEmptyState: "electronic-signature-empty-state";
17
+ readonly callingSetUp: "calling-set-up";
18
+ readonly companies: "companies";
19
+ readonly contacts: "contacts";
20
+ readonly multipleObjects: "multiple-objects";
21
+ readonly object: "object";
22
+ readonly task: "task";
23
+ readonly deals: "deals";
24
+ readonly registration: "registration";
25
+ readonly developerSecurityUpdate: "developer-security-update";
26
+ readonly social: "social";
27
+ readonly leads: "leads";
28
+ readonly target: "target";
29
+ readonly emailConfirmation: "email-confirmation";
30
+ readonly successfullyConnectedEmail: "successfully-connected-email";
31
+ readonly contentStrategy: "content-strategy";
32
+ readonly addOnReporting: "add-on-reporting";
33
+ readonly productsShoppingCart: "products-shopping-cart";
34
+ readonly store: "store";
35
+ readonly storeDisabled: "store-disabled";
36
+ readonly customerSupport: "customer-support";
37
+ readonly customerExperience: "customer-experience";
38
+ readonly api: "api";
39
+ readonly integrations: "integrations";
40
+ readonly sandboxAddOn: "sandbox-add-on";
41
+ readonly customObjects: "custom-objects";
42
+ readonly paymentsButton: "payments-button";
43
+ readonly automatedTesting: "automated-testing";
44
+ readonly emptyStateCharts: "empty-state-charts";
45
+ readonly meetings: "meetings-small";
46
+ readonly tickets: "ticket-small";
47
+ readonly errorGeneral: "errors/general";
48
+ readonly errorHourglass: "errors/hourglass";
49
+ readonly middlePaneCards: "settings-middle-pane-cards";
50
+ readonly propertiesSidebar: "settings-properties-sidebar";
51
+ readonly sidebar: "settings-sidebar";
52
+ };
53
+ export type IllustrationNames = keyof typeof illustrationNames;
@@ -0,0 +1,43 @@
1
+ export const illustrationNames = {
2
+ // Standard 1:1 mappings
3
+ lock: 'lock',
4
+ unlock: 'unlock',
5
+ electronicSignature: 'electronic-signature',
6
+ electronicSignatureEmptyState: 'electronic-signature-empty-state',
7
+ callingSetUp: 'calling-set-up',
8
+ companies: 'companies',
9
+ contacts: 'contacts',
10
+ multipleObjects: 'multiple-objects',
11
+ object: 'object',
12
+ task: 'task',
13
+ deals: 'deals',
14
+ registration: 'registration',
15
+ developerSecurityUpdate: 'developer-security-update',
16
+ social: 'social',
17
+ leads: 'leads',
18
+ target: 'target',
19
+ emailConfirmation: 'email-confirmation',
20
+ successfullyConnectedEmail: 'successfully-connected-email',
21
+ contentStrategy: 'content-strategy',
22
+ addOnReporting: 'add-on-reporting',
23
+ productsShoppingCart: 'products-shopping-cart',
24
+ store: 'store',
25
+ storeDisabled: 'store-disabled',
26
+ customerSupport: 'customer-support',
27
+ customerExperience: 'customer-experience',
28
+ api: 'api',
29
+ integrations: 'integrations',
30
+ sandboxAddOn: 'sandbox-add-on',
31
+ customObjects: 'custom-objects',
32
+ paymentsButton: 'payments-button',
33
+ automatedTesting: 'automated-testing',
34
+ emptyStateCharts: 'empty-state-charts',
35
+ // Special mappings that are not 1:1
36
+ meetings: 'meetings-small',
37
+ tickets: 'ticket-small',
38
+ errorGeneral: 'errors/general',
39
+ errorHourglass: 'errors/hourglass',
40
+ middlePaneCards: 'settings-middle-pane-cards',
41
+ propertiesSidebar: 'settings-properties-sidebar',
42
+ sidebar: 'settings-sidebar',
43
+ };
@@ -0,0 +1,40 @@
1
+ import { OverlayComponentProps, HrefProp, ExtensionEvent } from '../shared.synced';
2
+ import { ReactionsHandler } from '../reactions.synced';
3
+ /**
4
+ * The props type for {@link !components.Image}.
5
+ *
6
+ * @category Component Props
7
+ */
8
+ export interface ImageProps extends OverlayComponentProps {
9
+ /**
10
+ * The alt text for the image.
11
+ *
12
+ */
13
+ alt?: string;
14
+ /**
15
+ * If provided, will be used as the href that will be opened in a new browser tab on click.
16
+ *
17
+ */
18
+ href?: HrefProp;
19
+ /**
20
+ * A function that will be called when the image is clicked.
21
+ *
22
+ * @event
23
+ */
24
+ onClick?: ReactionsHandler<ExtensionEvent>;
25
+ /**
26
+ * The URL of the image to display.
27
+ *
28
+ */
29
+ src: string;
30
+ /**
31
+ * The pixel width of the image.
32
+ *
33
+ */
34
+ width?: number;
35
+ /**
36
+ * The pixel height of the image.
37
+ *
38
+ */
39
+ height?: number;
40
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,38 @@
1
+ export type { AlertProps } from './alert.synced';
2
+ export type { ButtonProps, LoadingButtonProps } from './button.synced';
3
+ export type { ButtonRowProps } from './button-row.synced';
4
+ export type { CardProps } from './card.synced';
5
+ export type { ChartProps, LineChartProps, BarChartProps } from './chart.synced';
6
+ export type { DescriptionListProps, DescriptionListItemProps, } from './description-list.synced';
7
+ export type { DividerProps } from './divider.synced';
8
+ export type { EmptyStateProps } from './empty-state.synced';
9
+ export type { ErrorStateProps } from './error-state.synced';
10
+ export type { HeadingProps } from './heading.synced';
11
+ export type { FormProps } from './form.synced';
12
+ export type { IconProps } from './icon.synced';
13
+ export type { IllustrationProps } from './illustration.synced';
14
+ export type { IframeProps } from './iframe.synced';
15
+ export type { ImageProps } from './image.synced';
16
+ export type { InputProps, TextAreaProps, TextareaProps, NumberInputProps, DateInputProps, StepperInputProps, SearchInputProps, TimeInputProps, CurrencyInputProps, } from './inputs.synced';
17
+ export type { StackProps, FlexProps, BoxProps, InlineProps, AutoGridProps, } from './layouts.synced';
18
+ export type { LinkProps } from './link.synced';
19
+ export type { ListProps } from './list.synced';
20
+ export type { LoadingSpinnerProps } from './loading-spinner.synced';
21
+ export type { ModalProps, ModalBodyProps, ModalFooterProps } from './modal.synced';
22
+ export type { ProgressBarProps } from './progress-bar.synced';
23
+ export type { PanelProps, PanelFooterProps, PanelBodyProps, PanelSectionProps, } from './panel.synced';
24
+ export type { SelectProps, MultiSelectProps } from './selects.synced';
25
+ export type { StatisticsProps, StatisticsItemProps, StatisticsTrendProps, } from './statistics.synced';
26
+ export type { StatusTagProps } from './status-tag.synced';
27
+ export type { StepIndicatorProps } from './step-indicator.synced';
28
+ export type { TableProps, TableElementProps, TableCellProps, TableHeaderProps, } from './table.synced';
29
+ export type { TabsProps, TabProps } from './tabs.synced';
30
+ export type { TagProps } from './tag.synced';
31
+ export type { TextProps } from './text.synced';
32
+ export type { TileProps } from './tile.synced';
33
+ export type { ToggleProps } from './toggle.synced';
34
+ export type { CheckboxProps, RadioButtonProps, ToggleGroupProps, CheckboxListProps, RadioButtonListProps, } from './toggleInputs.synced';
35
+ export type { AccordionProps } from './accordion.synced';
36
+ export type { DropdownProps, DropdownButtonItemProps } from './dropdown.synced';
37
+ export type { TooltipProps } from './tooltip.synced';
38
+ export type { HeaderActionsProps, HeaderActionButtonProps, } from './app-home-header-actions.synced';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,350 @@
1
+ /**
2
+ * Generic collection of props for all inputs
3
+ * @internal
4
+ * */
5
+ interface BaseInputProps<T = string, V = string> {
6
+ /**
7
+ * The label text to display for the form input element.
8
+ */
9
+ label: string;
10
+ /**
11
+ * The unique identifier for the input element, this could be thought of as the HTML5 [Input element's name attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name).
12
+ */
13
+ name: string;
14
+ /**
15
+ * The value of the input.
16
+ */
17
+ value?: T;
18
+ /**
19
+ * Determines if the required indicator should be displayed.
20
+ *
21
+ * @defaultValue `false`
22
+ */
23
+ required?: boolean;
24
+ /**
25
+ * Determines if the field is editable or not.
26
+ *
27
+ * @defaultValue `false`
28
+ */
29
+ readOnly?: boolean;
30
+ /**
31
+ * Instructional message to display to the user to help understand the purpose of the input.
32
+ */
33
+ description?: string;
34
+ /**
35
+ * Text that will appear in a tooltip next to the input label.
36
+ */
37
+ tooltip?: string;
38
+ /**
39
+ * Text that appears in the input when it has no value set.
40
+ */
41
+ placeholder?: string;
42
+ /**
43
+ * If set to `true`, `validationMessage` is displayed as an error message, if it was provided. The input will also render its error state to let the user know there is an error. If set to `false`, `validationMessage` is displayed as a success message.
44
+ *
45
+ * @defaultValue `false`
46
+ */
47
+ error?: boolean;
48
+ /**
49
+ * The value of the input on the first render.
50
+ */
51
+ defaultValue?: T;
52
+ /**
53
+ * The text to show under the input for error or success validations.
54
+ */
55
+ validationMessage?: string;
56
+ /**
57
+ * A callback function that is invoked when the value is committed. Currently these times are `onBlur` of the input and when the user submits the form.
58
+ *
59
+ * @event
60
+ */
61
+ onChange?: (value: V) => void;
62
+ /**
63
+ * A function that is called and passed the value every time the field is edited by the user. It is recommended that you do not use this value to update state, that is what `onChange` should be used for. Instead this should be used for validation.
64
+ *
65
+ * @event
66
+ */
67
+ onInput?: (value: V) => void;
68
+ /**
69
+ * A function that is called and passed the value every time the field loses focus.
70
+ *
71
+ * @event
72
+ */
73
+ onBlur?: (value: V) => void;
74
+ /**
75
+ * A function that is called and passed the value every time the field gets focused.
76
+ *
77
+ * @event
78
+ */
79
+ onFocus?: (value: V) => void;
80
+ }
81
+ /**
82
+ * The props type for {@link !components.Input}.
83
+ *
84
+ * @category Component Props
85
+ */
86
+ export interface InputProps extends BaseInputProps {
87
+ /**
88
+ * Sets the type of input to render.
89
+ *
90
+ * @defaultValue `"text"`
91
+ */
92
+ type?: 'text' | 'password';
93
+ }
94
+ /**
95
+ * The props type for {@link !components.TextArea}.
96
+ *
97
+ * @category Component Props
98
+ */
99
+ export interface TextAreaProps extends BaseInputProps {
100
+ /**
101
+ * The visible width of the text field in average character widths.
102
+ */
103
+ cols?: number;
104
+ /**
105
+ * The maximum number of characters (UTF-16 code units) that the user can enter. If not specified, the max length is unlimited.
106
+ */
107
+ maxLength?: number;
108
+ /**
109
+ * The number of visible text lines for the text field.
110
+ */
111
+ rows?: number;
112
+ /**
113
+ * Sets whether the element is resizable, and if so in which directions.
114
+ *
115
+ * @defaultValue `"both"`
116
+ */
117
+ resize?: 'vertical' | 'horizontal' | 'both' | 'none';
118
+ }
119
+ /**
120
+ * Textarea was changed to TextArea. Exporting both for backwards compat
121
+ *
122
+ * @ignore
123
+ * @internal
124
+ * */
125
+ export type TextareaProps = TextAreaProps;
126
+ /**
127
+ * @internal
128
+ * @ignore
129
+ * */
130
+ type BaseInputForNumber = Omit<BaseInputProps<number, number>, 'onInput'>;
131
+ /**
132
+ * The props type for {@link !components.NumberInput}.
133
+ *
134
+ * @category Component Props
135
+ */
136
+ export interface NumberInputProps extends BaseInputForNumber {
137
+ /**
138
+ * Sets the lower bound of the input.
139
+ *
140
+ */
141
+ min?: number;
142
+ /**
143
+ * Sets the upper bound of the input.
144
+ *
145
+ */
146
+ max?: number;
147
+ /**
148
+ * Sets the number of digits to the right of the decimal point.
149
+ *
150
+ */
151
+ precision?: number;
152
+ /**
153
+ * Formats the input as a decimal point (decimal) or percentage (percentage).
154
+ *
155
+ * @defaultValue `"decimal"`
156
+ */
157
+ formatStyle?: 'decimal' | 'percentage';
158
+ /** @deprecated use onChange instead. It doesn't guarantee valid format */
159
+ onInput?: (value: number) => void;
160
+ }
161
+ /**
162
+ * The props type for {@link !components.CurrencyInput}.
163
+ *
164
+ * @category Component Props
165
+ */
166
+ export interface CurrencyInputProps extends BaseInputForNumber {
167
+ /**
168
+ * ISO 4217 currency code (e.g., "USD", "EUR", "JPY")
169
+ * @defaultValue "USD"
170
+ */
171
+ currency?: string;
172
+ /**
173
+ * Sets the number of decimal places for the currency
174
+ * If not provided, defaults to currency-specific precision
175
+ */
176
+ precision?: number;
177
+ /**
178
+ * Sets the lower bound of the input
179
+ */
180
+ min?: number;
181
+ /**
182
+ * Sets the upper bound of the input
183
+ */
184
+ max?: number;
185
+ }
186
+ /**
187
+ * The props type for {@link !components.StepperInput}.
188
+ *
189
+ * @category Component Props
190
+ */
191
+ export interface StepperInputProps extends Omit<NumberInputProps, 'onInput'> {
192
+ /** The amount that the current value will increase or decrease on each step button click.
193
+ * @defaultValue `1`
194
+ */
195
+ stepSize?: number;
196
+ /**
197
+ * Text that will appear in a tooltip next to the step up button when users
198
+ * can't increase the current value.
199
+ */
200
+ maxValueReachedTooltip?: string;
201
+ /**
202
+ * Text that will appear in a tooltip next to the step down button when users
203
+ * can't decrease the current value.
204
+ */
205
+ minValueReachedTooltip?: string;
206
+ }
207
+ /** Object that represents dates. */
208
+ export interface BaseDate {
209
+ /** the four-digit year (e.g., 2023). */
210
+ year: number;
211
+ /** starting at 0, the number of the month (e.g., 0 = January, 11 = December). */
212
+ month: number;
213
+ /** the number of the day (e.g., 1 = the first day of the month).*/
214
+ date: number;
215
+ }
216
+ /** The values used to invoke events on the DateInput component */
217
+ export interface DateInputEventsPayload extends BaseDate {
218
+ /** Selected date with formatting option applied. (e.g., 09/04/1986). */
219
+ formattedDate?: string;
220
+ }
221
+ /**
222
+ * @internal
223
+ * @ignore
224
+ * */
225
+ type BaseDateInputForDate = Omit<BaseInputProps<BaseDate | null, DateInputEventsPayload>, 'onInput' | 'placeholder'>;
226
+ /**
227
+ * The props type for {@link !components.DateInput}.
228
+ *
229
+ * @category Component Props
230
+ */
231
+ export interface DateInputProps extends BaseDateInputForDate {
232
+ /**
233
+ * Sets the earliest date that will be valid.
234
+ */
235
+ min?: BaseDate;
236
+ /**
237
+ * Sets the latest date that will be valid.
238
+ */
239
+ max?: BaseDate;
240
+ /**
241
+ * Sets the message that users will see when they hover over dates before the min date.
242
+ *
243
+ * @defaultValue `"You must choose a newer date"`
244
+ */
245
+ minValidationMessage?: string;
246
+ /**
247
+ * Sets the message that users will see when the hover over dates after the max date.
248
+ *
249
+ * @defaultValue `"You must choose an older date"`
250
+ */
251
+ maxValidationMessage?: string;
252
+ /**
253
+ * Sets the date format that input will display to users.
254
+ *
255
+ * @defaultValue `short`
256
+ *
257
+ * #### Format Options
258
+ *
259
+ * - short: `09/04/1986`
260
+ * - long: `September 4, 1986`
261
+ * - medium : `Sep 4, 1986`
262
+ * - standard: `1986-09-04`
263
+ * - L: `09/04/1986`
264
+ * - LL: `September 4, 1986`
265
+ * - ll : `Sep 4, 1986`
266
+ * - YYYY-MM-DD: `1986-09-04`
267
+ */
268
+ format?: 'YYYY-MM-DD' | 'L' | 'LL' | 'll' | 'short' | 'long' | 'medium' | 'standard';
269
+ /**
270
+ * Sets the timezone that the component will use to calculate valid dates.
271
+ *
272
+ * @defaultValue `"userTz"`
273
+ */
274
+ timezone?: 'userTz' | 'portalTz';
275
+ /**
276
+ * Sets the label of the clear button.
277
+ *
278
+ * @defaultValue `"Clear"`
279
+ */
280
+ clearButtonLabel?: string;
281
+ /**
282
+ * Sets the label of the today button.
283
+ *
284
+ * @defaultValue `"Today"`
285
+ */
286
+ todayButtonLabel?: string;
287
+ }
288
+ /**
289
+ * Object that represents times.
290
+ */
291
+ export interface BaseTime {
292
+ /** The hour for the time (0 to 23) in 24-hour format (e.g. 0 = 12:00 AM, 9 = 9:00 AM, 15 = 3:00 PM). */
293
+ hours: number;
294
+ /** The minutes for the time (0 to 59). */
295
+ minutes: number;
296
+ }
297
+ /**
298
+ * @ignore
299
+ *
300
+ * The values used to invoke events on the TimeInput component
301
+ */
302
+ export interface TimeInputEventsPayload extends BaseTime {
303
+ }
304
+ /**
305
+ * @internal
306
+ * @ignore
307
+ * */
308
+ type BaseTimeInputForTime = Omit<BaseInputProps<BaseTime | null, TimeInputEventsPayload>, 'onInput' | 'placeholder' | 'onChange'>;
309
+ /**
310
+ * The props type for {@link !components.TimeInput}.
311
+ *
312
+ * @category Component Props
313
+ */
314
+ export interface TimeInputProps extends BaseTimeInputForTime {
315
+ /**
316
+ * A callback function that is invoked when the value is changed.
317
+ *
318
+ * @event
319
+ */
320
+ onChange?: (value: TimeInputEventsPayload) => void;
321
+ /**
322
+ * Sets the earliest time that will be valid.
323
+ */
324
+ min?: BaseTime;
325
+ /**
326
+ * Sets the latest time that will be valid.
327
+ */
328
+ max?: BaseTime;
329
+ /**
330
+ * Sets the interval (in minutes) between the dropdown options.
331
+ *
332
+ * @defaultValue `30`
333
+ */
334
+ interval?: number;
335
+ /**
336
+ * Sets the timezone that the component will display alongside times in the TimeInput. This will not modify the available valid inputs.
337
+ *
338
+ */
339
+ timezone?: 'userTz' | 'portalTz';
340
+ }
341
+ /**
342
+ * The props type for {@link !components.SearchInput}.
343
+ *
344
+ * @category Component Props
345
+ */
346
+ export interface SearchInputProps extends BaseInputProps {
347
+ /** Shows a clear button to clear the input. Default is true. */
348
+ clearable?: boolean;
349
+ }
350
+ export {};
@@ -0,0 +1 @@
1
+ export {};