@hubspot/ui-extensions 0.8.0 → 0.8.2

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.
@@ -206,3 +206,18 @@ export declare const DateInput: "DateInput" & {
206
206
  readonly props?: types.DateInputProps | undefined;
207
207
  readonly children?: true | undefined;
208
208
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DateInput", types.DateInputProps, true>>;
209
+ export declare const Checkbox: "Checkbox" & {
210
+ readonly type?: "Checkbox" | undefined;
211
+ readonly props?: types.CheckboxProps | undefined;
212
+ readonly children?: true | undefined;
213
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Checkbox", types.CheckboxProps, true>>;
214
+ export declare const RadioButton: "RadioButton" & {
215
+ readonly type?: "RadioButton" | undefined;
216
+ readonly props?: types.RadioButtonProps | undefined;
217
+ readonly children?: true | undefined;
218
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"RadioButton", types.RadioButtonProps, true>>;
219
+ export declare const List: "List" & {
220
+ readonly type?: "List" | undefined;
221
+ readonly props?: types.ListProps | undefined;
222
+ readonly children?: true | undefined;
223
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"List", types.ListProps, true>>;
@@ -44,3 +44,6 @@ export const Accordion = createRemoteReactComponent('Accordion');
44
44
  export const MultiSelect = createRemoteReactComponent('MultiSelect');
45
45
  export const Flex = createRemoteReactComponent('Flex');
46
46
  export const DateInput = createRemoteReactComponent('DateInput');
47
+ export const Checkbox = createRemoteReactComponent('Checkbox');
48
+ export const RadioButton = createRemoteReactComponent('RadioButton');
49
+ export const List = createRemoteReactComponent('List');
package/dist/types.d.ts CHANGED
@@ -365,10 +365,16 @@ interface BaseInputProps<T = string, V = string> {
365
365
  /**
366
366
  * The props type for {@link !components.Input}.
367
367
  *
368
- * @interface
369
368
  * @category Component Props
370
369
  */
371
- export type InputProps = BaseInputProps;
370
+ export interface InputProps extends BaseInputProps {
371
+ /**
372
+ * Sets the type of input to render.
373
+ *
374
+ * @defaultValue `"text"`
375
+ */
376
+ type?: 'text' | 'password';
377
+ }
372
378
  /**
373
379
  * The props type for {@link !components.TextArea}.
374
380
  *
@@ -787,6 +793,67 @@ interface Team {
787
793
  name: string;
788
794
  teammates: number[];
789
795
  }
796
+ /**
797
+ * The props type for {@link !components.Checkbox}.
798
+ *
799
+ * @category Component Props
800
+ */
801
+ export interface CheckboxProps {
802
+ /**
803
+ * A string representing the value of the input. This is not displayed on the client-side,
804
+ * but on the server this is the value given to the data submitted with the checkbox's name.
805
+ */
806
+ value?: string;
807
+ /**
808
+ * The current status of the input.
809
+ */
810
+ checked?: boolean;
811
+ /**
812
+ * When set to `true`, the option cannot be selected.
813
+ */
814
+ readonly?: boolean;
815
+ /**
816
+ * The string that displays below the toggle.
817
+ */
818
+ description?: string;
819
+ /**
820
+ * The unique identifier for the checkbox element.
821
+ */
822
+ name?: string;
823
+ /**
824
+ * The size variation of the checkbox.
825
+ *
826
+ * @defaultValue `"default"`
827
+ */
828
+ variant?: 'default' | 'small';
829
+ /**
830
+ * A function that is called when the `checked` input status changes.
831
+ *
832
+ * @event
833
+ */
834
+ onChange?: (checked: boolean, value: string) => void;
835
+ /** The text that displays in the dropdown menu. */
836
+ children?: React.ReactNode;
837
+ /**
838
+ * Use the inline prop to arrange checkboxes side-by-side.
839
+ */
840
+ inline?: boolean;
841
+ /**
842
+ * When set to `true`, the option will be selected by default. Use it to
843
+ * set the default `checked` state when the component is **uncontrolled**.
844
+ */
845
+ initialIsChecked?: boolean;
846
+ /**
847
+ * Accessibility label. It should be present when the checkbox has no label(children).
848
+ */
849
+ 'aria-label'?: string;
850
+ }
851
+ /**
852
+ * The props type for {@link !components.RadioButton}.
853
+ * @category Component Props
854
+ * @interface
855
+ */
856
+ export type RadioButtonProps = Omit<CheckboxProps, 'aria-label'>;
790
857
  export type ToggleGroupOption = {
791
858
  /** The text that displays in the dropdown menu. */
792
859
  label: string;
@@ -1702,4 +1769,21 @@ export interface AccordionProps {
1702
1769
  */
1703
1770
  onClick?: () => void;
1704
1771
  }
1772
+ /**
1773
+ * The props type for {@link !components.List}.
1774
+ *
1775
+ * @category Component Props
1776
+ */
1777
+ export interface ListProps {
1778
+ /**
1779
+ * The content of the list. Each child will be wrapped in an `li` tag.
1780
+ */
1781
+ children: ReactNode;
1782
+ /**
1783
+ * The type of list to render.
1784
+ *
1785
+ * @defaultValue `"unordered"`
1786
+ */
1787
+ variant?: 'unordered' | 'unordered-styled' | 'ordered' | 'ordered-styled' | 'inline' | 'inline-divided';
1788
+ }
1705
1789
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -50,5 +50,5 @@
50
50
  "devDependencies": {
51
51
  "typescript": "5.0.4"
52
52
  },
53
- "gitHead": "80535f127c717f76d07fca05c9f676ec29ad5d18"
53
+ "gitHead": "19c43b6956e7a2397e0b4435b3829bd3e3b5e5bc"
54
54
  }