UNPKG

@ark-ui/solid

Version:

A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.

70 lines (58 loc) 4.07 kB
import * as zagSwitch from '@zag-js/switch'; import { CheckedChangeDetails } from '@zag-js/switch'; export { CheckedChangeDetails as SwitchCheckedChangeDetails, anatomy as switchAnatomy } from '@zag-js/switch'; import * as solid_js from 'solid-js'; import { Accessor, JSX } from 'solid-js'; import { PropTypes } from '@zag-js/solid'; import { O as Optional, M as MaybeAccessor } from '../../types-Bc0WfPsv.js'; import { HTMLProps, PolymorphicProps } from '../factory.js'; interface UseSwitchProps extends Optional<Omit<zagSwitch.Props, 'dir' | 'getRootNode'>, 'id'> { } interface UseSwitchReturn extends Accessor<zagSwitch.Api<PropTypes>> { } declare const useSwitch: (props?: MaybeAccessor<UseSwitchProps>) => UseSwitchReturn; interface UseSwitchContext extends UseSwitchReturn { } declare const useSwitchContext: () => UseSwitchContext; interface SwitchContextProps { children: (context: UseSwitchContext) => JSX.Element; } declare const SwitchContext: (props: SwitchContextProps) => JSX.Element; interface SwitchControlBaseProps extends PolymorphicProps<'span'> { } interface SwitchControlProps extends HTMLProps<'span'>, SwitchControlBaseProps { } declare const SwitchControl: (props: SwitchControlProps) => solid_js.JSX.Element; interface SwitchHiddenInputBaseProps extends PolymorphicProps<'input'> { } interface SwitchHiddenInputProps extends HTMLProps<'input'>, SwitchHiddenInputBaseProps { } declare const SwitchHiddenInput: (props: SwitchHiddenInputProps) => solid_js.JSX.Element; interface SwitchLabelBaseProps extends PolymorphicProps<'span'> { } interface SwitchLabelProps extends HTMLProps<'span'>, SwitchLabelBaseProps { } declare const SwitchLabel: (props: SwitchLabelProps) => solid_js.JSX.Element; interface SwitchRootBaseProps extends UseSwitchProps, PolymorphicProps<'label'> { } interface SwitchRootProps extends HTMLProps<'label'>, SwitchRootBaseProps { } declare const SwitchRoot: (props: SwitchRootProps) => solid_js.JSX.Element; interface RootProviderProps { value: UseSwitchReturn; } interface SwitchRootProviderBaseProps extends PolymorphicProps<'label'> { } interface SwitchRootProviderProps extends HTMLProps<'label'>, RootProviderProps, SwitchRootProviderBaseProps { } declare const SwitchRootProvider: (props: SwitchRootProviderProps) => solid_js.JSX.Element; interface SwitchThumbBaseProps extends PolymorphicProps<'span'> { } interface SwitchThumbProps extends HTMLProps<'span'>, SwitchThumbBaseProps { } declare const SwitchThumb: (props: SwitchThumbProps) => solid_js.JSX.Element; declare const _switch_CheckedChangeDetails: typeof CheckedChangeDetails; declare namespace _switch { export { _switch_CheckedChangeDetails as CheckedChangeDetails, SwitchContext as Context, type SwitchContextProps as ContextProps, SwitchControl as Control, type SwitchControlBaseProps as ControlBaseProps, type SwitchControlProps as ControlProps, SwitchHiddenInput as HiddenInput, type SwitchHiddenInputBaseProps as HiddenInputBaseProps, type SwitchHiddenInputProps as HiddenInputProps, SwitchLabel as Label, type SwitchLabelBaseProps as LabelBaseProps, type SwitchLabelProps as LabelProps, SwitchRoot as Root, type SwitchRootBaseProps as RootBaseProps, type SwitchRootProps as RootProps, SwitchRootProvider as RootProvider, type SwitchRootProviderBaseProps as RootProviderBaseProps, type SwitchRootProviderProps as RootProviderProps, SwitchThumb as Thumb, type SwitchThumbBaseProps as ThumbBaseProps, type SwitchThumbProps as ThumbProps }; } export { _switch as Switch, SwitchContext, type SwitchContextProps, SwitchControl, type SwitchControlBaseProps, type SwitchControlProps, SwitchHiddenInput, type SwitchHiddenInputBaseProps, type SwitchHiddenInputProps, SwitchLabel, type SwitchLabelBaseProps, type SwitchLabelProps, SwitchRoot, type SwitchRootBaseProps, type SwitchRootProps, SwitchRootProvider, type SwitchRootProviderBaseProps, type SwitchRootProviderProps, SwitchThumb, type SwitchThumbBaseProps, type SwitchThumbProps, type UseSwitchContext, type UseSwitchProps, type UseSwitchReturn, useSwitch, useSwitchContext };