@wire-ui/solid 0.1.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 (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +341 -0
  3. package/dist/components/accordion/Accordion.d.ts +13 -0
  4. package/dist/components/accordion/Accordion.types.d.ts +48 -0
  5. package/dist/components/accordion/index.d.ts +2 -0
  6. package/dist/components/alert/Alert.d.ts +30 -0
  7. package/dist/components/alert/Alert.types.d.ts +25 -0
  8. package/dist/components/alert/index.d.ts +2 -0
  9. package/dist/components/avatar/Avatar.d.ts +35 -0
  10. package/dist/components/avatar/Avatar.types.d.ts +29 -0
  11. package/dist/components/avatar/index.d.ts +2 -0
  12. package/dist/components/badge/Badge.d.ts +3 -0
  13. package/dist/components/badge/Badge.types.d.ts +14 -0
  14. package/dist/components/badge/index.d.ts +2 -0
  15. package/dist/components/button/Button.d.ts +4 -0
  16. package/dist/components/button/Button.types.d.ts +26 -0
  17. package/dist/components/button/index.d.ts +2 -0
  18. package/dist/components/card/Card.d.ts +3 -0
  19. package/dist/components/card/Card.types.d.ts +18 -0
  20. package/dist/components/card/index.d.ts +2 -0
  21. package/dist/components/checkbox/Checkbox.d.ts +13 -0
  22. package/dist/components/checkbox/Checkbox.types.d.ts +33 -0
  23. package/dist/components/checkbox/index.d.ts +2 -0
  24. package/dist/components/divider/Divider.d.ts +24 -0
  25. package/dist/components/divider/Divider.types.d.ts +27 -0
  26. package/dist/components/divider/index.d.ts +2 -0
  27. package/dist/components/drawer/Drawer.d.ts +17 -0
  28. package/dist/components/drawer/Drawer.types.d.ts +30 -0
  29. package/dist/components/drawer/index.d.ts +2 -0
  30. package/dist/components/dropdown/Dropdown.d.ts +11 -0
  31. package/dist/components/dropdown/Dropdown.types.d.ts +22 -0
  32. package/dist/components/dropdown/index.d.ts +2 -0
  33. package/dist/components/icon/Icon.d.ts +3 -0
  34. package/dist/components/icon/Icon.types.d.ts +15 -0
  35. package/dist/components/icon/index.d.ts +3 -0
  36. package/dist/components/image/Image.d.ts +3 -0
  37. package/dist/components/image/Image.types.d.ts +20 -0
  38. package/dist/components/image/index.d.ts +2 -0
  39. package/dist/components/index.d.ts +26 -0
  40. package/dist/components/input/Input.d.ts +12 -0
  41. package/dist/components/input/Input.types.d.ts +37 -0
  42. package/dist/components/input/index.d.ts +2 -0
  43. package/dist/components/list/List.d.ts +3 -0
  44. package/dist/components/list/List.types.d.ts +9 -0
  45. package/dist/components/list/index.d.ts +2 -0
  46. package/dist/components/modal/Modal.d.ts +15 -0
  47. package/dist/components/modal/Modal.types.d.ts +26 -0
  48. package/dist/components/modal/index.d.ts +2 -0
  49. package/dist/components/otp/OTP.d.ts +10 -0
  50. package/dist/components/otp/OTP.types.d.ts +32 -0
  51. package/dist/components/otp/index.d.ts +2 -0
  52. package/dist/components/password/Password.d.ts +15 -0
  53. package/dist/components/password/Password.types.d.ts +37 -0
  54. package/dist/components/password/index.d.ts +2 -0
  55. package/dist/components/progress-bar/ProgressBar.d.ts +3 -0
  56. package/dist/components/progress-bar/ProgressBar.types.d.ts +16 -0
  57. package/dist/components/progress-bar/index.d.ts +2 -0
  58. package/dist/components/radio/Radio.d.ts +13 -0
  59. package/dist/components/radio/Radio.types.d.ts +33 -0
  60. package/dist/components/radio/index.d.ts +2 -0
  61. package/dist/components/rating/Rating.d.ts +20 -0
  62. package/dist/components/rating/Rating.types.d.ts +20 -0
  63. package/dist/components/rating/index.d.ts +2 -0
  64. package/dist/components/search/Search.d.ts +15 -0
  65. package/dist/components/search/Search.types.d.ts +51 -0
  66. package/dist/components/search/index.d.ts +2 -0
  67. package/dist/components/select/Select.d.ts +21 -0
  68. package/dist/components/select/Select.types.d.ts +38 -0
  69. package/dist/components/select/index.d.ts +2 -0
  70. package/dist/components/switch/Switch.d.ts +9 -0
  71. package/dist/components/switch/Switch.types.d.ts +16 -0
  72. package/dist/components/switch/index.d.ts +2 -0
  73. package/dist/components/textarea/Textarea.d.ts +12 -0
  74. package/dist/components/textarea/Textarea.types.d.ts +39 -0
  75. package/dist/components/textarea/index.d.ts +2 -0
  76. package/dist/components/timeago/Timeago.d.ts +3 -0
  77. package/dist/components/timeago/Timeago.types.d.ts +45 -0
  78. package/dist/components/timeago/index.d.ts +2 -0
  79. package/dist/components/tooltip/Tooltip.d.ts +11 -0
  80. package/dist/components/tooltip/Tooltip.types.d.ts +21 -0
  81. package/dist/components/tooltip/index.d.ts +2 -0
  82. package/dist/index.d.ts +31 -0
  83. package/dist/primitives/create-click-outside.d.ts +12 -0
  84. package/dist/primitives/create-interactive-state.d.ts +50 -0
  85. package/dist/primitives/index.d.ts +3 -0
  86. package/dist/types/common.d.ts +19 -0
  87. package/dist/types/index.d.ts +1 -0
  88. package/dist/utils/helper.d.ts +3 -0
  89. package/dist/utils/index.d.ts +2 -0
  90. package/dist/utils/merge-props.d.ts +26 -0
  91. package/dist/wire-ui-solid.cjs.js +1 -0
  92. package/dist/wire-ui-solid.es.js +2627 -0
  93. package/package.json +92 -0
@@ -0,0 +1,33 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface CheckboxRootProps {
3
+ value?: (string | number)[];
4
+ defaultValue?: (string | number)[];
5
+ onChange?: (value: (string | number)[]) => void;
6
+ name?: string;
7
+ children?: JSX.Element;
8
+ class?: string;
9
+ }
10
+ export interface CheckboxItemProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children'> {
11
+ value: string | number;
12
+ disabled?: boolean;
13
+ children?: JSX.Element;
14
+ }
15
+ export interface CheckboxIndicatorProps {
16
+ children?: JSX.Element;
17
+ class?: string;
18
+ }
19
+ export interface CheckboxLabelProps {
20
+ children?: JSX.Element;
21
+ class?: string;
22
+ }
23
+ export interface CheckboxContextValue {
24
+ readonly values: (string | number)[];
25
+ readonly name: string;
26
+ toggle: (itemValue: string | number) => void;
27
+ isChecked: (itemValue: string | number) => boolean;
28
+ }
29
+ export interface CheckboxItemContextValue {
30
+ readonly value: string | number;
31
+ readonly disabled: boolean;
32
+ readonly checked: boolean;
33
+ }
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './Checkbox';
2
+ export type { CheckboxRootProps, CheckboxItemProps, CheckboxIndicatorProps, CheckboxLabelProps, } from './Checkbox.types';
@@ -0,0 +1,24 @@
1
+ import { DividerProps } from './Divider.types';
2
+ /**
3
+ * A headless visual or semantic divider.
4
+ *
5
+ * Exposes `data-orientation` so consumers can style horizontal vs vertical
6
+ * variants purely via CSS:
7
+ *
8
+ * ```css
9
+ * [data-orientation="horizontal"] { width: 100%; height: 1px; }
10
+ * [data-orientation="vertical"] { width: 1px; height: 100%; }
11
+ * ```
12
+ *
13
+ * @example
14
+ * // Decorative (default) — screen readers skip it
15
+ * <Divider class="bg-gray-200" />
16
+ *
17
+ * // Semantic — announced by screen readers
18
+ * <Divider decorative={false} />
19
+ *
20
+ * // Vertical
21
+ * <Divider orientation="vertical" class="h-full bg-gray-200" />
22
+ */
23
+ declare function Divider(props: DividerProps): import("solid-js").JSX.Element;
24
+ export { Divider };
@@ -0,0 +1,27 @@
1
+ import { JSX } from 'solid-js';
2
+ /**
3
+ * Divider Component Types
4
+ */
5
+ /**
6
+ * Props for the Divider component.
7
+ *
8
+ * When `decorative` is true (default), the element is purely visual — it
9
+ * carries `role="none"` and `aria-hidden="true"` so screen readers skip it.
10
+ *
11
+ * When `decorative` is false, it becomes a semantic separator with
12
+ * `role="separator"` and `aria-orientation` set, which screen readers announce.
13
+ */
14
+ export interface DividerProps extends JSX.HTMLAttributes<HTMLDivElement> {
15
+ /**
16
+ * Visual orientation of the divider line.
17
+ * Exposed as `data-orientation="horizontal|vertical"` for CSS targeting.
18
+ * @default 'horizontal'
19
+ */
20
+ orientation?: 'horizontal' | 'vertical';
21
+ /**
22
+ * When true, the divider is purely presentational and hidden from
23
+ * assistive technology. When false, it is announced as a separator.
24
+ * @default true
25
+ */
26
+ decorative?: boolean;
27
+ }
@@ -0,0 +1,2 @@
1
+ export { Divider } from './Divider';
2
+ export type { DividerProps } from './Divider.types';
@@ -0,0 +1,17 @@
1
+ import { JSX } from 'solid-js';
2
+ import { DrawerCloseProps, DrawerContentProps, DrawerHeaderProps, DrawerOverlayProps, DrawerPortalProps, DrawerRootProps } from './Drawer.types';
3
+ declare function Root(props: DrawerRootProps): JSX.Element;
4
+ declare function Portal(props: DrawerPortalProps): JSX.Element;
5
+ declare function Overlay(props: DrawerOverlayProps): JSX.Element;
6
+ declare function Content(props: DrawerContentProps): JSX.Element;
7
+ declare function Header(props: DrawerHeaderProps): JSX.Element;
8
+ declare function Close(props: DrawerCloseProps): JSX.Element;
9
+ export declare const Drawer: {
10
+ Root: typeof Root;
11
+ Portal: typeof Portal;
12
+ Overlay: typeof Overlay;
13
+ Content: typeof Content;
14
+ Header: typeof Header;
15
+ Close: typeof Close;
16
+ };
17
+ export {};
@@ -0,0 +1,30 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface DrawerRootProps {
3
+ open?: boolean;
4
+ defaultOpen?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ children?: JSX.Element;
7
+ }
8
+ export interface DrawerPortalProps {
9
+ children?: JSX.Element;
10
+ container?: HTMLElement;
11
+ }
12
+ export interface DrawerOverlayProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onClick'> {
13
+ children?: JSX.Element;
14
+ class?: string;
15
+ onClick?: JSX.EventHandler<HTMLDivElement, MouseEvent>;
16
+ }
17
+ export interface DrawerContentProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onClick'> {
18
+ children?: JSX.Element;
19
+ class?: string;
20
+ onClick?: JSX.EventHandler<HTMLDivElement, MouseEvent>;
21
+ }
22
+ export interface DrawerHeaderProps extends JSX.HTMLAttributes<HTMLDivElement> {
23
+ children?: JSX.Element;
24
+ class?: string;
25
+ }
26
+ export type DrawerCloseProps = JSX.ButtonHTMLAttributes<HTMLButtonElement>;
27
+ export interface DrawerContextValue {
28
+ readonly open: boolean;
29
+ onOpenChange: (open: boolean) => void;
30
+ }
@@ -0,0 +1,2 @@
1
+ export { Drawer } from './Drawer';
2
+ export type { DrawerRootProps, DrawerPortalProps, DrawerOverlayProps, DrawerContentProps, DrawerHeaderProps, DrawerCloseProps, } from './Drawer.types';
@@ -0,0 +1,11 @@
1
+ import { JSX } from 'solid-js';
2
+ import { DropdownMenuProps, DropdownRootProps, DropdownTriggerProps } from './Dropdown.types';
3
+ declare function Root(props: DropdownRootProps): JSX.Element;
4
+ declare function Trigger(props: DropdownTriggerProps): JSX.Element;
5
+ declare function Menu(props: DropdownMenuProps): JSX.Element;
6
+ export declare const Dropdown: {
7
+ Root: typeof Root;
8
+ Trigger: typeof Trigger;
9
+ Menu: typeof Menu;
10
+ };
11
+ export {};
@@ -0,0 +1,22 @@
1
+ import { JSX } from 'solid-js';
2
+ import { HorizontalPosition } from '../../types/common';
3
+ export type DropdownPosition = Extract<HorizontalPosition, 'left' | 'right'>;
4
+ export interface DropdownRootProps extends JSX.HTMLAttributes<HTMLDivElement> {
5
+ open?: boolean;
6
+ defaultOpen?: boolean;
7
+ onOpenChange?: (open: boolean) => void;
8
+ children?: JSX.Element;
9
+ class?: string;
10
+ }
11
+ export interface DropdownTriggerProps extends Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
12
+ children?: JSX.Element;
13
+ }
14
+ export interface DropdownMenuProps extends JSX.HTMLAttributes<HTMLDivElement> {
15
+ position?: DropdownPosition;
16
+ children?: JSX.Element;
17
+ class?: string;
18
+ }
19
+ export interface DropdownContextValue {
20
+ readonly open: boolean;
21
+ onOpenChange: (open: boolean) => void;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { Dropdown } from './Dropdown';
2
+ export type { DropdownRootProps, DropdownTriggerProps, DropdownMenuProps, DropdownPosition } from './Dropdown.types';
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './Icon.types';
2
+ declare function Icon(props: IconProps): import("solid-js").JSX.Element;
3
+ export { Icon };
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'solid-js';
2
+ export declare const iconNames: readonly ["alert", "arrow-down", "arrow-left", "arrow-right", "attachment", "audio-file", "bullet-points", "call-end", "call-ingoing", "call", "caret-down", "chat-bubble", "chat-widget", "close-circle", "csv-file", "doc-file", "double-chevron-down", "edit", "emoji", "envelope", "export", "filter-funnel", "generic-file", "home", "menu", "message", "missed-chat", "mute", "pdf-file", "plus", "popout", "search", "searches", "send", "share-screen", "text-file", "thumbs-down", "thumbs-up", "user", "video-call-off", "video-call-on", "video-file", "volume-down", "volume-up", "warning-triangle", "x"];
3
+ export type IconName = (typeof iconNames)[number];
4
+ export declare const iconSizes: readonly ["xsmall", "small", "medium", "large", "xlarge", "xxlarge"];
5
+ export type IconSize = (typeof iconSizes)[number];
6
+ export interface IconProps extends JSX.SvgSVGAttributes<SVGSVGElement> {
7
+ /** The icon name that matches an SVG asset. */
8
+ type: IconName;
9
+ /** A size modifier that increases or decreases the icon size. */
10
+ size?: IconSize;
11
+ /** Accessible label for the icon. */
12
+ label?: string;
13
+ /** Map of icon names to raw SVG strings. Must be provided by the consumer. */
14
+ icons?: Partial<Record<IconName, string>>;
15
+ }
@@ -0,0 +1,3 @@
1
+ export { Icon } from './Icon';
2
+ export { iconNames, iconSizes } from './Icon.types';
3
+ export type { IconName, IconSize, IconProps } from './Icon.types';
@@ -0,0 +1,3 @@
1
+ import { ImageProps } from './Image.types';
2
+ declare function Image(props: ImageProps): import("solid-js").JSX.Element;
3
+ export { Image };
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'solid-js';
2
+ /**
3
+ * Image Component Types
4
+ *
5
+ * Type definitions for the Image component including props
6
+ * and related types.
7
+ */
8
+ /**
9
+ * Props interface for Image component
10
+ */
11
+ export interface ImageProps extends JSX.HTMLAttributes<HTMLDivElement> {
12
+ /** Source path of the image */
13
+ src: string;
14
+ /** Alt text for the image */
15
+ alt?: string;
16
+ /** Horizontal alignment of the image */
17
+ position?: string;
18
+ /** Callback fired when the image has loaded or errored */
19
+ onImageLoaded?: () => void;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { Image } from './Image';
2
+ export type { ImageProps } from './Image.types';
@@ -0,0 +1,26 @@
1
+ export { Accordion } from './accordion';
2
+ export { Alert } from './alert';
3
+ export { Avatar } from './avatar';
4
+ export { Badge } from './badge';
5
+ export { Button } from './button';
6
+ export { Card } from './card';
7
+ export { Checkbox } from './checkbox';
8
+ export { Divider } from './divider';
9
+ export { Drawer } from './drawer';
10
+ export { Dropdown } from './dropdown';
11
+ export { Icon } from './icon';
12
+ export { Image } from './image';
13
+ export { Input } from './input';
14
+ export { List } from './list';
15
+ export { Modal } from './modal';
16
+ export { OTP } from './otp';
17
+ export { Password } from './password';
18
+ export { ProgressBar } from './progress-bar';
19
+ export { Radio } from './radio';
20
+ export { Rating } from './rating';
21
+ export { Search } from './search';
22
+ export { Select } from './select';
23
+ export { Switch } from './switch';
24
+ export { Textarea } from './textarea';
25
+ export { Timeago } from './timeago';
26
+ export { Tooltip } from './tooltip';
@@ -0,0 +1,12 @@
1
+ import { InputErrorProps, InputFieldProps, InputLabelProps, InputRootProps } from './Input.types';
2
+ declare function Root(props: InputRootProps): import("solid-js").JSX.Element;
3
+ declare function Field(props: InputFieldProps): import("solid-js").JSX.Element;
4
+ declare function Label(props: InputLabelProps): import("solid-js").JSX.Element;
5
+ declare function ErrorMessage(props: InputErrorProps): import("solid-js").JSX.Element;
6
+ export declare const Input: {
7
+ Root: typeof Root;
8
+ Field: typeof Field;
9
+ Label: typeof Label;
10
+ Error: typeof ErrorMessage;
11
+ };
12
+ export {};
@@ -0,0 +1,37 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface InputRootProps {
3
+ value?: string;
4
+ defaultValue?: string;
5
+ onChange?: (value: string) => void;
6
+ onFocus?: () => void;
7
+ onBlur?: () => void;
8
+ /** Set by the consumer to show an error state. Use the key in errorMessage to display the message. */
9
+ invalidType?: string;
10
+ errorMessage?: Record<string, string>;
11
+ isRequired?: boolean;
12
+ isSuccess?: boolean;
13
+ id?: string;
14
+ children?: JSX.Element;
15
+ class?: string;
16
+ }
17
+ export type InputFieldProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'defaultValue'>;
18
+ export interface InputLabelProps {
19
+ children?: JSX.Element;
20
+ class?: string;
21
+ }
22
+ export interface InputErrorProps {
23
+ children?: JSX.Element;
24
+ class?: string;
25
+ }
26
+ export interface InputContextValue {
27
+ readonly value: string;
28
+ readonly inputId: string;
29
+ readonly isActive: boolean;
30
+ readonly invalidType: string;
31
+ readonly isSuccess: boolean;
32
+ readonly isRequired: boolean;
33
+ readonly errorMessage: Record<string, string>;
34
+ handleChange: (value: string) => void;
35
+ handleFocus: () => void;
36
+ handleBlur: () => void;
37
+ }
@@ -0,0 +1,2 @@
1
+ export { Input } from './Input';
2
+ export type { InputRootProps, InputFieldProps, InputLabelProps, InputErrorProps } from './Input.types';
@@ -0,0 +1,3 @@
1
+ import { ListProps } from './List.types';
2
+ declare function List(props: ListProps): import("solid-js").JSX.Element;
3
+ export { List };
@@ -0,0 +1,9 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface ListProps extends JSX.HTMLAttributes<HTMLUListElement | HTMLOListElement> {
3
+ /** Whether to render as ordered list (ol) or unordered list (ul). */
4
+ isOrdered?: boolean;
5
+ /** Visual style type of the list. */
6
+ type?: string;
7
+ /** Size of the list items. */
8
+ size?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ export { List } from './List';
2
+ export type { ListProps } from './List.types';
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'solid-js';
2
+ import { ModalCloseProps, ModalContentProps, ModalOverlayProps, ModalPortalProps, ModalRootProps } from './Modal.types';
3
+ declare function Root(props: ModalRootProps): JSX.Element;
4
+ declare function Portal(props: ModalPortalProps): JSX.Element;
5
+ declare function Overlay(props: ModalOverlayProps): JSX.Element;
6
+ declare function Content(props: ModalContentProps): JSX.Element;
7
+ declare function Close(props: ModalCloseProps): JSX.Element;
8
+ export declare const Modal: {
9
+ Root: typeof Root;
10
+ Portal: typeof Portal;
11
+ Overlay: typeof Overlay;
12
+ Content: typeof Content;
13
+ Close: typeof Close;
14
+ };
15
+ export {};
@@ -0,0 +1,26 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface ModalRootProps {
3
+ open?: boolean;
4
+ defaultOpen?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ children?: JSX.Element;
7
+ }
8
+ export interface ModalPortalProps {
9
+ children?: JSX.Element;
10
+ container?: HTMLElement;
11
+ }
12
+ export interface ModalOverlayProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onClick'> {
13
+ children?: JSX.Element;
14
+ class?: string;
15
+ onClick?: JSX.EventHandler<HTMLDivElement, MouseEvent>;
16
+ }
17
+ export interface ModalContentProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onClick'> {
18
+ children?: JSX.Element;
19
+ class?: string;
20
+ onClick?: JSX.EventHandler<HTMLDivElement, MouseEvent>;
21
+ }
22
+ export type ModalCloseProps = JSX.ButtonHTMLAttributes<HTMLButtonElement>;
23
+ export interface ModalContextValue {
24
+ readonly open: boolean;
25
+ onOpenChange: (open: boolean) => void;
26
+ }
@@ -0,0 +1,2 @@
1
+ export { Modal } from './Modal';
2
+ export type { ModalRootProps, ModalPortalProps, ModalOverlayProps, ModalContentProps, ModalCloseProps, } from './Modal.types';
@@ -0,0 +1,10 @@
1
+ import { OTPRootProps, OTPSeparatorProps, OTPSlotProps } from './OTP.types';
2
+ declare function Root(props: OTPRootProps): import("solid-js").JSX.Element;
3
+ declare function Slot(props: OTPSlotProps): import("solid-js").JSX.Element;
4
+ declare function Separator(props: OTPSeparatorProps): import("solid-js").JSX.Element;
5
+ export declare const OTP: {
6
+ Root: typeof Root;
7
+ Slot: typeof Slot;
8
+ Separator: typeof Separator;
9
+ };
10
+ export {};
@@ -0,0 +1,32 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface OTPContextValue {
3
+ readonly chars: string[];
4
+ readonly length: number;
5
+ readonly disabled: boolean;
6
+ readonly isComplete: boolean;
7
+ registerRef: (index: number, el: HTMLInputElement | null) => void;
8
+ handleChange: (index: number, value: string) => void;
9
+ handleKeyDown: (index: number, e: KeyboardEvent) => void;
10
+ handlePaste: (index: number, e: ClipboardEvent) => void;
11
+ }
12
+ export interface OTPRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onChange'> {
13
+ /** Number of slots (default: 6) */
14
+ length?: number;
15
+ /** Controlled value */
16
+ value?: string;
17
+ /** Initial uncontrolled value */
18
+ defaultValue?: string;
19
+ /** Called on every change with the current full value string */
20
+ onChange?: (value: string) => void;
21
+ /** Called once all slots are filled */
22
+ onComplete?: (value: string) => void;
23
+ /** Restrict input to numeric or alphanumeric characters (default: 'numeric') */
24
+ pattern?: 'numeric' | 'alphanumeric';
25
+ /** Disables all slots */
26
+ disabled?: boolean;
27
+ }
28
+ export interface OTPSlotProps extends JSX.InputHTMLAttributes<HTMLInputElement> {
29
+ /** Zero-based slot index */
30
+ index: number;
31
+ }
32
+ export type OTPSeparatorProps = JSX.HTMLAttributes<HTMLSpanElement>;
@@ -0,0 +1,2 @@
1
+ export { OTP } from './OTP';
2
+ export type { OTPRootProps, OTPSlotProps, OTPSeparatorProps } from './OTP.types';
@@ -0,0 +1,15 @@
1
+ import { JSX } from 'solid-js';
2
+ import { PasswordErrorProps, PasswordFieldProps, PasswordLabelProps, PasswordRootProps, PasswordToggleProps } from './Password.types';
3
+ declare function Root(props: PasswordRootProps): JSX.Element;
4
+ declare function Field(props: PasswordFieldProps): JSX.Element;
5
+ declare function Toggle(props: PasswordToggleProps): JSX.Element;
6
+ declare function Label(props: PasswordLabelProps): JSX.Element;
7
+ declare function ErrorMessage(props: PasswordErrorProps): JSX.Element;
8
+ export declare const Password: {
9
+ Root: typeof Root;
10
+ Field: typeof Field;
11
+ Toggle: typeof Toggle;
12
+ Label: typeof Label;
13
+ Error: typeof ErrorMessage;
14
+ };
15
+ export {};
@@ -0,0 +1,37 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface PasswordContextValue {
3
+ readonly inputId: string;
4
+ readonly value: string;
5
+ readonly visible: boolean;
6
+ readonly isRequired: boolean;
7
+ readonly invalidType: string;
8
+ readonly errorMessage: Record<string, string>;
9
+ setVisible: (v: boolean) => void;
10
+ handleChange: (value: string) => void;
11
+ handleFocus: () => void;
12
+ handleBlur: () => void;
13
+ }
14
+ export interface PasswordRootProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onFocus' | 'onBlur'> {
15
+ /** Controlled value */
16
+ value?: string;
17
+ /** Initial value (uncontrolled) */
18
+ defaultValue?: string;
19
+ /** Called on every change */
20
+ onChange?: (value: string) => void;
21
+ /** Called when the field gains focus */
22
+ onFocus?: () => void;
23
+ /** Called when the field loses focus */
24
+ onBlur?: () => void;
25
+ /** Mark as required — shows * in label and sets required attribute */
26
+ isRequired?: boolean;
27
+ /** Error messages keyed by type, displayed by Password.Error */
28
+ errorMessage?: Record<string, string>;
29
+ /** Set by the consumer to show an error state */
30
+ invalidType?: string;
31
+ /** HTML id forwarded to the input */
32
+ id?: string;
33
+ }
34
+ export type PasswordFieldProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'type' | 'value' | 'onChange'>;
35
+ export type PasswordToggleProps = JSX.ButtonHTMLAttributes<HTMLButtonElement>;
36
+ export type PasswordLabelProps = JSX.LabelHTMLAttributes<HTMLLabelElement>;
37
+ export type PasswordErrorProps = JSX.HTMLAttributes<HTMLElement>;
@@ -0,0 +1,2 @@
1
+ export { Password } from './Password';
2
+ export type { PasswordRootProps, PasswordFieldProps, PasswordToggleProps, PasswordLabelProps, PasswordErrorProps, } from './Password.types';
@@ -0,0 +1,3 @@
1
+ import { ProgressBarProps } from './ProgressBar.types';
2
+ declare function ProgressBar(props: ProgressBarProps): import("solid-js").JSX.Element;
3
+ export { ProgressBar };
@@ -0,0 +1,16 @@
1
+ import { JSX } from 'solid-js';
2
+ /**
3
+ * ProgressBar Component Types
4
+ *
5
+ * Type definitions for the ProgressBar component including props
6
+ * and related types.
7
+ */
8
+ /**
9
+ * Props interface for ProgressBar component
10
+ */
11
+ export interface ProgressBarProps extends JSX.HTMLAttributes<HTMLDivElement> {
12
+ /** The progress percentage value (0-100) */
13
+ percentage?: number;
14
+ /** The size of the progress bar */
15
+ size?: string;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { ProgressBar } from './ProgressBar';
2
+ export type { ProgressBarProps } from './ProgressBar.types';
@@ -0,0 +1,13 @@
1
+ import { JSX } from 'solid-js';
2
+ import { RadioIndicatorProps, RadioItemProps, RadioLabelProps, RadioRootProps } from './Radio.types';
3
+ declare function Root(props: RadioRootProps): JSX.Element;
4
+ declare function Item(props: RadioItemProps): JSX.Element;
5
+ declare function Indicator(props: RadioIndicatorProps): JSX.Element;
6
+ declare function Label(props: RadioLabelProps): JSX.Element;
7
+ export declare const Radio: {
8
+ Root: typeof Root;
9
+ Item: typeof Item;
10
+ Indicator: typeof Indicator;
11
+ Label: typeof Label;
12
+ };
13
+ export {};
@@ -0,0 +1,33 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface RadioRootProps {
3
+ value?: string | number;
4
+ defaultValue?: string | number;
5
+ onChange?: (value: string | number) => void;
6
+ name?: string;
7
+ children?: JSX.Element;
8
+ class?: string;
9
+ }
10
+ export interface RadioItemProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children'> {
11
+ value: string | number;
12
+ disabled?: boolean;
13
+ children?: JSX.Element;
14
+ }
15
+ export interface RadioIndicatorProps {
16
+ children?: JSX.Element;
17
+ class?: string;
18
+ }
19
+ export interface RadioLabelProps {
20
+ children?: JSX.Element;
21
+ class?: string;
22
+ }
23
+ export interface RadioContextValue {
24
+ readonly selectedValue: string | number | undefined;
25
+ readonly name: string;
26
+ select: (itemValue: string | number) => void;
27
+ isSelected: (itemValue: string | number) => boolean;
28
+ }
29
+ export interface RadioItemContextValue {
30
+ readonly value: string | number;
31
+ readonly disabled: boolean;
32
+ readonly checked: boolean;
33
+ }
@@ -0,0 +1,2 @@
1
+ export { Radio } from './Radio';
2
+ export type { RadioRootProps, RadioItemProps, RadioIndicatorProps, RadioLabelProps } from './Radio.types';
@@ -0,0 +1,20 @@
1
+ import { RatingProps } from './Rating.types';
2
+ /**
3
+ * A headless n-star rating widget.
4
+ *
5
+ * State is exposed via data attributes on each star button:
6
+ * data-filled — star is at or below the selected value
7
+ * data-highlighted — star is at or below the current hover/selected value
8
+ * data-disabled — component is disabled
9
+ *
10
+ * Style freely via `starClass` and `[data-*]:` Tailwind variants.
11
+ *
12
+ * @example
13
+ * <Rating
14
+ * defaultValue={3}
15
+ * onChange={(v) => console.log(v)}
16
+ * starClass="size-6 text-gray-300 [data-highlighted]:text-yellow-400 [data-filled]:text-yellow-400"
17
+ * />
18
+ */
19
+ declare function Rating(props: RatingProps): import("solid-js").JSX.Element;
20
+ export { Rating };
@@ -0,0 +1,20 @@
1
+ import { JSX } from 'solid-js';
2
+ /**
3
+ * Rating Component Types
4
+ */
5
+ export interface RatingProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'onChange'> {
6
+ /** Controlled rating value (1–max) */
7
+ value?: number;
8
+ /** Initial uncontrolled value */
9
+ defaultValue?: number;
10
+ /** Callback fired when a star is selected */
11
+ onChange?: (value: number) => void;
12
+ /** Number of stars to render (default: 5) */
13
+ max?: number;
14
+ /** Disables all interaction */
15
+ disabled?: boolean;
16
+ /** Read-only display — no interaction, no hover preview */
17
+ readOnly?: boolean;
18
+ /** class applied to each individual star button */
19
+ starClass?: string;
20
+ }
@@ -0,0 +1,2 @@
1
+ export { Rating } from './Rating';
2
+ export type { RatingProps } from './Rating.types';