@pismo/marola 2.0.0 → 2.0.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.
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: <T extends string | object>({ labelKey, valueKey, options, type, value, onChange, onInputChange, classNameWrapper, "data-testid-wrapper": dataTestId, classNameInputWrapper, ...props }: import('./Autocomplete.tsx').AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
4
+ component: <T extends string | object>({ labelKey, valueKey, renderOption, customSelectedOptionLabel, options, type, value, onChange, onInputChange, classNameWrapper, "data-testid-wrapper": dataTestId, classNameInputWrapper, ...props }: import('./Autocomplete.tsx').AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {
7
7
  layout: string;
@@ -11,6 +11,8 @@ export default meta;
11
11
  type Story = StoryObj<typeof meta>;
12
12
  export declare const Simple: Story;
13
13
  export declare const WithObjectsOptions: Story;
14
+ export declare const WithObjectsOptionsAndCustomLabel: Story;
15
+ export declare const WithObjectsOptionsAndCustomLabelComponent: Story;
14
16
  export declare const WithAHugeList: Story;
15
17
  export declare const WithLabel: Story;
16
18
  export declare const WithSearch: Story;
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
- type RadioButtonProps = {
2
+ export type RadioButtonProps = {
3
3
  /** Space separated list of CSS classes to apply */
4
4
  className?: string;
5
5
  /** Name */
6
6
  name?: string;
7
7
  /** Component label */
8
8
  label?: React.ReactNode;
9
+ /** Component default value */
10
+ defaultValue?: string | number | boolean;
9
11
  /** Checked state */
10
12
  checked?: boolean;
11
13
  /** Disabled state */
@@ -13,7 +15,8 @@ type RadioButtonProps = {
13
15
  /** TestId to use in tests if needed */
14
16
  'data-testid'?: string;
15
17
  /** Action that is triggered when the Radio button value changes */
16
- onChange: (state: boolean) => void;
18
+ onChange: (value: unknown, event?: Event) => void;
19
+ /** Component children */
20
+ children?: React.ReactNode;
17
21
  };
18
- export declare const RadioButton: ({ className, name, label, checked, disabled, "data-testid": dataTestId, onChange, }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
19
- export {};
22
+ export declare const RadioButton: ({ className, name, label, disabled, defaultValue, checked, "data-testid": dataTestId, onChange, children, }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;