UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

135 lines (132 loc) 6.41 kB
export { default as Text } from './Text/index.js'; export { default as Button } from './Button/index.js'; export { default as Badge } from './Badge/index.js'; export { default as Alert } from './Alert/index.js'; export { default as IconButton } from './IconButton/index.js'; export { default as IconRoundedButton } from './IconRoundedButton/index.js'; export { default as NavButton } from './NavButton/index.js'; export { default as SelectionButton } from './SelectionButton/index.js'; export { default as Table } from './Table/index.js'; export { default as CheckBox } from './CheckBox/index.js'; import * as react from 'react'; import { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react'; import { StoreApi } from 'zustand'; export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.js'; export { default as TextArea } from './TextArea/index.js'; export { default as Toast } from './Toast/index.js'; export { default as Toaster } from './Toast/Toaster/index.js'; export { default as Divider } from './Divider/index.js'; export { default as useToastStore } from './Toast/ToastStore/index.js'; export { default as Input } from './Input/index.js'; export { default as Search } from './Search/index.js'; export { default as Chips } from './Chips/index.js'; export { default as ProgressBar } from './ProgressBar/index.js'; export { default as ProgressCircle } from './ProgressCircle/index.js'; export { default as Stepper } from './Stepper/index.js'; export { default as Calendar } from './Calendar/index.js'; export { default as Modal } from './Modal/index.js'; export { CardAccordation } from './Accordation/index.js'; export { AlternativesList } from './Alternative/index.js'; export { AlertDialog } from './AlertDialog/index.js'; export { MultipleChoiceList } from './MultipleChoice/index.js'; export { default as IconRender } from './IconRender/index.js'; export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger } from './DropdownMenu/index.js'; export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js'; export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js'; export { CardActivitiesResults, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.js'; export { Skeleton, SkeletonCard, SkeletonCircle, SkeletonList, SkeletonRectangle, SkeletonRounded, SkeletonTable, SkeletonText } from './Skeleton/index.js'; export { default as NotFound } from './NotFound/index.js'; export { AuthProvider, ProtectedRoute, PublicRoute, getRootDomain, useAuth, useAuthGuard, useRouteAuth, withAuth } from './Auth/index.js'; export { createZustandAuthAdapter } from './Auth/zustandAuthAdapter/index.js'; export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.js'; export { useApiConfig } from './Auth/useApiConfig/index.js'; export { Quiz, QuizAlternative, QuizContent, QuizFooter, QuizHeader, QuizHeaderResult, QuizListResult, QuizListResultByMateria, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle } from './Quiz/index.js'; export { useQuizStore } from './Quiz/useQuizStore/index.js'; import 'react/jsx-runtime'; /** * CheckboxList size variants */ type CheckboxListSize = 'small' | 'medium' | 'large'; /** * CheckboxList visual state */ type CheckboxListState = 'default' | 'hovered' | 'focused' | 'invalid' | 'disabled'; /** * CheckboxList store interface */ interface CheckboxListStore { values: string[]; setValues: (values: string[]) => void; toggleValue: (value: string) => void; onValuesChange?: (values: string[]) => void; disabled: boolean; name: string; } type CheckboxListStoreApi = StoreApi<CheckboxListStore>; /** * CheckboxList component for flexible checkbox group composition * * Uses Zustand for state management with automatic store injection. * Allows complete control over layout and styling by composing with CheckboxListItem. * * @example * ```tsx * <CheckboxList defaultValues={["option1"]} onValuesChange={setValues}> * <div className="flex items-center gap-3"> * <CheckboxListItem value="option1" id="c1" /> * <label htmlFor="c1">Option 1</label> * </div> * <div className="flex items-center gap-3"> * <CheckboxListItem value="option2" id="c2" /> * <label htmlFor="c2">Option 2</label> * </div> * </CheckboxList> * ``` */ declare const CheckboxList: react.ForwardRefExoticComponent<{ /** Current selected values */ values?: string[]; /** Default selected values for uncontrolled usage */ defaultValues?: string[]; /** Callback when selection changes */ onValuesChange?: (values: string[]) => void; /** Group name for all checkboxes */ name?: string; /** Disabled state for the entire group */ disabled?: boolean; /** Additional CSS classes */ className?: string; /** Children components */ children: ReactNode; } & Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValues"> & react.RefAttributes<HTMLDivElement>>; /** * CheckboxListItem component for use within CheckboxList * * A checkbox without label that works within CheckboxList context. * Provides just the checkbox input for maximum flexibility in composition. * * @example * ```tsx * <CheckboxList defaultValues={["option1"]}> * <div className="flex items-center gap-3"> * <CheckboxListItem value="option1" id="c1" /> * <label htmlFor="c1">Option 1</label> * </div> * </CheckboxList> * ``` */ declare const CheckboxListItem: react.ForwardRefExoticComponent<{ /** Value for this checkbox item */ value: string; /** Store reference (automatically injected by CheckboxList) */ store?: CheckboxListStoreApi; /** Disabled state for this specific item */ disabled?: boolean; /** Size variant */ size?: CheckboxListSize; /** Visual state */ state?: CheckboxListState; /** Additional CSS classes */ className?: string; } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>; export { CheckboxList, CheckboxListItem };