tailwind-ux-kit 1.0.106 → 1.0.109

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,32 +1,37 @@
1
1
  import { default as React } from 'react';
2
+ type Variant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light" | "link";
3
+ type Size = "xs" | "sm" | "md" | "lg" | "xl";
4
+ type Shape = "rounded" | "pill" | "flat";
2
5
  interface ToggleOption<T> {
3
- label: React.ReactNode | string;
4
- value: T;
5
- disabled?: boolean;
6
+ readonly label: React.ReactNode | string;
7
+ readonly value: T;
8
+ readonly disabled?: boolean;
6
9
  }
7
10
  interface ClassNames {
8
- root?: string;
9
- label?: string;
10
- group?: string;
11
- option?: string;
12
- selectedOption?: string;
11
+ readonly root?: string;
12
+ readonly label?: string;
13
+ readonly group?: string;
14
+ readonly option?: string;
15
+ readonly selectedOption?: string;
13
16
  }
14
- type Variant = "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light" | "link";
15
- type Size = "xs" | "sm" | "md" | "lg" | "xl";
16
17
  interface ToggleSwitchProps<T> {
17
- options: ToggleOption<T>[];
18
- selected: T;
19
- onChange: (value: T) => void;
20
- label?: string;
21
- disabled?: boolean;
22
- shape?: "rounded" | "pill" | "flat";
23
- variant?: Variant;
24
- size?: Size;
25
- className?: string;
26
- classNames?: ClassNames;
27
- id?: string;
28
- name?: string;
29
- renderOption?: (option: ToggleOption<T>, selected: boolean) => React.ReactNode;
18
+ readonly options: readonly ToggleOption<T>[];
19
+ readonly selected: T;
20
+ readonly onChange: (value: T) => void;
21
+ readonly label?: string;
22
+ readonly disabled?: boolean;
23
+ readonly shape?: Shape;
24
+ readonly variant?: Variant;
25
+ readonly size?: Size;
26
+ readonly className?: string;
27
+ readonly classNames?: ClassNames;
28
+ readonly id?: string;
29
+ readonly name?: string;
30
+ readonly renderOption?: (option: ToggleOption<T>, selected: boolean) => React.ReactNode;
30
31
  }
31
32
  declare function Toggler<T>({ options, selected, onChange, label, disabled, shape, variant, size, className, classNames, id, name, renderOption, }: ToggleSwitchProps<T>): import("react/jsx-runtime").JSX.Element;
32
- export default Toggler;
33
+ declare namespace Toggler {
34
+ var displayName: string;
35
+ }
36
+ declare const _default: typeof Toggler;
37
+ export default _default;