@sigx/daisyui 0.1.6
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.
- package/LICENSE +21 -0
- package/README.md +235 -0
- package/dist/buttons/Button.d.ts +18 -0
- package/dist/buttons/Button.d.ts.map +1 -0
- package/dist/buttons/ButtonGroup.d.ts +18 -0
- package/dist/buttons/ButtonGroup.d.ts.map +1 -0
- package/dist/buttons/index.d.ts +5 -0
- package/dist/buttons/index.d.ts.map +1 -0
- package/dist/buttons/index.js +2 -0
- package/dist/buttons-Dtj_5Uc3.js +61 -0
- package/dist/buttons-Dtj_5Uc3.js.map +1 -0
- package/dist/data/Table.d.ts +92 -0
- package/dist/data/Table.d.ts.map +1 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data-wxNpnX83.js +153 -0
- package/dist/data-wxNpnX83.js.map +1 -0
- package/dist/feedback/Accordion.d.ts +87 -0
- package/dist/feedback/Accordion.d.ts.map +1 -0
- package/dist/feedback/Badge.d.ts +73 -0
- package/dist/feedback/Badge.d.ts.map +1 -0
- package/dist/feedback/Countdown.d.ts +33 -0
- package/dist/feedback/Countdown.d.ts.map +1 -0
- package/dist/feedback/Diff.d.ts +43 -0
- package/dist/feedback/Diff.d.ts.map +1 -0
- package/dist/feedback/FileInput.d.ts +28 -0
- package/dist/feedback/FileInput.d.ts.map +1 -0
- package/dist/feedback/Indicator.d.ts +47 -0
- package/dist/feedback/Indicator.d.ts.map +1 -0
- package/dist/feedback/Kbd.d.ts +31 -0
- package/dist/feedback/Kbd.d.ts.map +1 -0
- package/dist/feedback/Modal.d.ts +51 -0
- package/dist/feedback/Modal.d.ts.map +1 -0
- package/dist/feedback/RadialProgress.d.ts +35 -0
- package/dist/feedback/RadialProgress.d.ts.map +1 -0
- package/dist/feedback/Rating.d.ts +34 -0
- package/dist/feedback/Rating.d.ts.map +1 -0
- package/dist/feedback/Skeleton.d.ts +24 -0
- package/dist/feedback/Skeleton.d.ts.map +1 -0
- package/dist/feedback/Steps.d.ts +60 -0
- package/dist/feedback/Steps.d.ts.map +1 -0
- package/dist/feedback/Swap.d.ts +53 -0
- package/dist/feedback/Swap.d.ts.map +1 -0
- package/dist/feedback/Timeline.d.ts +76 -0
- package/dist/feedback/Timeline.d.ts.map +1 -0
- package/dist/feedback/Toast.d.ts +30 -0
- package/dist/feedback/Toast.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +31 -0
- package/dist/feedback/index.d.ts.map +1 -0
- package/dist/feedback/index.js +2 -0
- package/dist/feedback-DFutN-Kz.js +817 -0
- package/dist/feedback-DFutN-Kz.js.map +1 -0
- package/dist/forms/Checkbox.d.ts +15 -0
- package/dist/forms/Checkbox.d.ts.map +1 -0
- package/dist/forms/FormField.d.ts +16 -0
- package/dist/forms/FormField.d.ts.map +1 -0
- package/dist/forms/Input.d.ts +19 -0
- package/dist/forms/Input.d.ts.map +1 -0
- package/dist/forms/Radio.d.ts +78 -0
- package/dist/forms/Radio.d.ts.map +1 -0
- package/dist/forms/Range.d.ts +15 -0
- package/dist/forms/Range.d.ts.map +1 -0
- package/dist/forms/Select.d.ts +28 -0
- package/dist/forms/Select.d.ts.map +1 -0
- package/dist/forms/Textarea.d.ts +17 -0
- package/dist/forms/Textarea.d.ts.map +1 -0
- package/dist/forms/Toggle.d.ts +15 -0
- package/dist/forms/Toggle.d.ts.map +1 -0
- package/dist/forms/index.d.ts +17 -0
- package/dist/forms/index.d.ts.map +1 -0
- package/dist/forms/index.js +2 -0
- package/dist/forms-CuvlRMro.js +362 -0
- package/dist/forms-CuvlRMro.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/layout/Card.d.ts +65 -0
- package/dist/layout/Card.d.ts.map +1 -0
- package/dist/layout/Carousel.d.ts +56 -0
- package/dist/layout/Carousel.d.ts.map +1 -0
- package/dist/layout/Chat.d.ts +54 -0
- package/dist/layout/Chat.d.ts.map +1 -0
- package/dist/layout/Container.d.ts +17 -0
- package/dist/layout/Container.d.ts.map +1 -0
- package/dist/layout/Divider.d.ts +22 -0
- package/dist/layout/Divider.d.ts.map +1 -0
- package/dist/layout/Flex.d.ts +59 -0
- package/dist/layout/Flex.d.ts.map +1 -0
- package/dist/layout/Footer.d.ts +25 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/Hero.d.ts +52 -0
- package/dist/layout/Hero.d.ts.map +1 -0
- package/dist/layout/Join.d.ts +40 -0
- package/dist/layout/Join.d.ts.map +1 -0
- package/dist/layout/Link.d.ts +20 -0
- package/dist/layout/Link.d.ts.map +1 -0
- package/dist/layout/Mask.d.ts +26 -0
- package/dist/layout/Mask.d.ts.map +1 -0
- package/dist/layout/Mockup.d.ts +95 -0
- package/dist/layout/Mockup.d.ts.map +1 -0
- package/dist/layout/Stack.d.ts +45 -0
- package/dist/layout/Stack.d.ts.map +1 -0
- package/dist/layout/index.d.ts +46 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout-0aaJX4B2.js +554 -0
- package/dist/layout-0aaJX4B2.js.map +1 -0
- package/dist/navigation/Breadcrumbs.d.ts +22 -0
- package/dist/navigation/Breadcrumbs.d.ts.map +1 -0
- package/dist/navigation/Drawer.d.ts +25 -0
- package/dist/navigation/Drawer.d.ts.map +1 -0
- package/dist/navigation/Dropdown.d.ts +40 -0
- package/dist/navigation/Dropdown.d.ts.map +1 -0
- package/dist/navigation/MenuComponent.d.ts +54 -0
- package/dist/navigation/MenuComponent.d.ts.map +1 -0
- package/dist/navigation/Navbar.d.ts +23 -0
- package/dist/navigation/Navbar.d.ts.map +1 -0
- package/dist/navigation/Pagination.d.ts +12 -0
- package/dist/navigation/Pagination.d.ts.map +1 -0
- package/dist/navigation/Tabs.d.ts +35 -0
- package/dist/navigation/Tabs.d.ts.map +1 -0
- package/dist/navigation/index.d.ts +15 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/navigation-4cwyfLvr.js +285 -0
- package/dist/navigation-4cwyfLvr.js.map +1 -0
- package/dist/shared/styles.d.ts +79 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/styles-DFkMxi90.js +126 -0
- package/dist/styles-DFkMxi90.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +73 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme-D9CUMvuT.js +118 -0
- package/dist/theme-D9CUMvuT.js.map +1 -0
- package/dist/typography/Text.d.ts +47 -0
- package/dist/typography/Text.d.ts.map +1 -0
- package/dist/typography/index.d.ts +3 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography/index.js +2 -0
- package/dist/typography-CU1RMGKA.js +112 -0
- package/dist/typography-CU1RMGKA.js.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-DFutN-Kz.js","names":[],"sources":["../src/feedback/Modal.tsx","../src/feedback/Badge.tsx","../src/feedback/Accordion.tsx","../src/feedback/FileInput.tsx","../src/feedback/Rating.tsx","../src/feedback/Skeleton.tsx","../src/feedback/Steps.tsx","../src/feedback/Timeline.tsx","../src/feedback/Toast.tsx","../src/feedback/Kbd.tsx","../src/feedback/RadialProgress.tsx","../src/feedback/Countdown.tsx","../src/feedback/Diff.tsx","../src/feedback/Swap.tsx","../src/feedback/Indicator.tsx"],"sourcesContent":["import { component, compound, DefineProp, DefineSlot, DefineModel, DefineEvent, Portal, onMounted, effect } from 'sigx';\r\n\r\n// ============================================\r\n// Modal Component\r\n// ============================================\r\n\r\nexport type ModalProps = \r\n & DefineModel<boolean>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Modal dialog component with DaisyUI styling.\r\n * Uses Portal to render at document.body level for proper backdrop display.\r\n * Uses native HTML dialog element with showModal() for proper ESC key support.\r\n * Uses two-way model binding for open/close state.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Modal model={isOpen}>\r\n * <Modal.Header>Modal Title</Modal.Header>\r\n * <Modal.Body>Modal content goes here</Modal.Body>\r\n * <Modal.Actions>\r\n * <Button variant=\"primary\">Confirm</Button>\r\n * </Modal.Actions>\r\n * </Modal>\r\n * ```\r\n */\r\nconst _Modal = component<ModalProps>(({ props, slots, emit }) => {\r\n let dialogRef: HTMLDialogElement | null = null;\r\n\r\n const close = () => {\r\n if (props.model) props.model.value = false;\r\n };\r\n\r\n // Handle close event from native dialog (triggered by ESC key, form submission, or close() method)\r\n const handleClose = () => {\r\n close();\r\n };\r\n\r\n // Handle backdrop click - only close if clicking directly on the dialog backdrop\r\n const handleClick = (e: MouseEvent) => {\r\n // Only close if clicking directly on the dialog element (backdrop area)\r\n if (e.target === dialogRef) {\r\n close();\r\n }\r\n };\r\n\r\n // Effect to sync dialog open state with model value\r\n onMounted(() => {\r\n effect(() => {\r\n if (!dialogRef) return;\r\n \r\n const isOpen = props.model?.value;\r\n const isDialogOpen = dialogRef.open;\r\n \r\n if (isOpen && !isDialogOpen) {\r\n dialogRef.showModal();\r\n } else if (!isOpen && isDialogOpen) {\r\n dialogRef.close();\r\n }\r\n });\r\n });\r\n\r\n return () => {\r\n return (\r\n <Portal>\r\n <dialog \r\n ref={(el: HTMLDialogElement) => dialogRef = el}\r\n class=\"modal\"\r\n onClose={handleClose}\r\n onClick={handleClick}\r\n >\r\n <div class={`modal-box ${props.class ?? ''}`}>\r\n {slots.default?.()}\r\n </div>\r\n <form method=\"dialog\" class=\"modal-backdrop\">\r\n <button>close</button>\r\n </form>\r\n </dialog>\r\n </Portal>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// ModalHeader Component\r\n// ============================================\r\n\r\nexport type ModalHeaderProps = \r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'close'>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Modal.Header component for modal title area with optional close button.\r\n */\r\nconst ModalHeader = component<ModalHeaderProps>(({ props, slots, emit }) => {\r\n return () => (\r\n <div class={`flex items-center justify-between ${props.class ?? ''}`}>\r\n <h3 class=\"text-lg font-bold\">{slots.default?.()}</h3>\r\n <form method=\"dialog\">\r\n <button \r\n type=\"button\"\r\n class=\"btn btn-sm btn-circle btn-ghost\"\r\n onClick={() => emit('close')}\r\n >\r\n ✕\r\n </button>\r\n </form>\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// ModalBody Component\r\n// ============================================\r\n\r\nexport type ModalBodyProps = \r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Modal.Body component for modal content area.\r\n */\r\nconst ModalBody = component<ModalBodyProps>(({ props, slots }) => {\r\n return () => (\r\n <div class={`py-4 ${props.class ?? ''}`}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// ModalActions Component\r\n// ============================================\r\n\r\nexport type ModalActionsProps = \r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n/**\r\n * Modal.Actions component for modal action buttons.\r\n */\r\nconst ModalActions = component<ModalActionsProps>(({ props, slots }) => {\r\n return () => (\r\n <div class={`modal-action ${props.class ?? ''}`}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n\r\n/**\r\n * Modal compound component with Header, Body, and Actions sub-components.\r\n */\r\nexport const Modal = compound(_Modal, {\r\n Header: ModalHeader,\r\n Body: ModalBody,\r\n Actions: ModalActions,\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Badge Component\r\n// ============================================\r\n\r\nexport type BadgeVariant = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | 'ghost' | 'neutral';\r\nexport type BadgeSize = 'xs' | 'sm' | 'md' | 'lg';\r\n\r\nexport type BadgeProps = \r\n & DefineProp<'variant', BadgeVariant, false>\r\n & DefineProp<'size', BadgeSize, false>\r\n & DefineProp<'outline', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nconst badgeVariantClasses: Record<BadgeVariant, string> = {\r\n primary: 'badge-primary',\r\n secondary: 'badge-secondary',\r\n accent: 'badge-accent',\r\n info: 'badge-info',\r\n success: 'badge-success',\r\n warning: 'badge-warning',\r\n error: 'badge-error',\r\n ghost: 'badge-ghost',\r\n neutral: 'badge-neutral'\r\n};\r\n\r\nconst badgeSizeClasses: Record<BadgeSize, string> = {\r\n xs: 'badge-xs',\r\n sm: 'badge-sm',\r\n md: '',\r\n lg: 'badge-lg'\r\n};\r\n\r\n/**\r\n * Badge component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Badge variant=\"success\">Active</Badge>\r\n * <Badge variant=\"error\" size=\"lg\" outline>Error</Badge>\r\n * ```\r\n */\r\nexport const Badge = component<BadgeProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['badge'];\r\n \r\n if (props.variant) classes.push(badgeVariantClasses[props.variant]);\r\n if (props.size) {\r\n const sizeClass = badgeSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n if (props.outline) classes.push('badge-outline');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <span class={getClasses()}>\r\n {slots.default?.()}\r\n </span>\r\n );\r\n});\r\n\r\n// ============================================\r\n// Loading Component\r\n// ============================================\r\n\r\nexport type LoadingSize = 'xs' | 'sm' | 'md' | 'lg';\r\nexport type LoadingType = 'spinner' | 'dots' | 'ring' | 'ball' | 'bars' | 'infinity';\r\n\r\nexport type LoadingProps = \r\n & DefineProp<'type', LoadingType, false>\r\n & DefineProp<'size', LoadingSize, false>\r\n & DefineProp<'class', string, false>;\r\n\r\nconst loadingTypeClasses: Record<LoadingType, string> = {\r\n spinner: 'loading-spinner',\r\n dots: 'loading-dots',\r\n ring: 'loading-ring',\r\n ball: 'loading-ball',\r\n bars: 'loading-bars',\r\n infinity: 'loading-infinity'\r\n};\r\n\r\nconst loadingSizeClasses: Record<LoadingSize, string> = {\r\n xs: 'loading-xs',\r\n sm: 'loading-sm',\r\n md: 'loading-md',\r\n lg: 'loading-lg'\r\n};\r\n\r\n/**\r\n * Loading indicator component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Loading type=\"spinner\" size=\"lg\" />\r\n * <Loading type=\"dots\" />\r\n * ```\r\n */\r\nexport const Loading = component<LoadingProps>(({ props }) => {\r\n const getClasses = () => {\r\n const classes = ['loading'];\r\n \r\n classes.push(loadingTypeClasses[props.type ?? 'spinner']);\r\n classes.push(loadingSizeClasses[props.size ?? 'md']);\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n return () => <span class={getClasses()}></span>;\r\n});\r\n\r\n// ============================================\r\n// Alert Component\r\n// ============================================\r\n\r\nexport type AlertVariant = 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type AlertProps = \r\n & DefineProp<'variant', AlertVariant, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineSlot<'icon'>;\r\n\r\nconst alertVariantClasses: Record<AlertVariant, string> = {\r\n info: 'alert-info',\r\n success: 'alert-success',\r\n warning: 'alert-warning',\r\n error: 'alert-error'\r\n};\r\n\r\nconst defaultIcons: Record<AlertVariant, string> = {\r\n info: 'ℹ️',\r\n success: '✅',\r\n warning: '⚠️',\r\n error: '❌'\r\n};\r\n\r\n/**\r\n * Alert component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Alert variant=\"success\">Operation completed successfully!</Alert>\r\n * <Alert variant=\"error\">An error occurred.</Alert>\r\n * ```\r\n */\r\nexport const Alert = component<AlertProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['alert'];\r\n \r\n if (props.variant) classes.push(alertVariantClasses[props.variant]);\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div role=\"alert\" class={getClasses()}>\r\n {slots.icon?.() ?? (props.variant && <span>{defaultIcons[props.variant]}</span>)}\r\n <span>{slots.default?.()}</span>\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// Progress Component\r\n// ============================================\r\n\r\nexport type ProgressColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type ProgressProps = \r\n & DefineProp<'value', number, false>\r\n & DefineProp<'max', number, false>\r\n & DefineProp<'color', ProgressColor, false>\r\n & DefineProp<'class', string, false>;\r\n\r\nconst progressColorClasses: Record<ProgressColor, string> = {\r\n primary: 'progress-primary',\r\n secondary: 'progress-secondary',\r\n accent: 'progress-accent',\r\n info: 'progress-info',\r\n success: 'progress-success',\r\n warning: 'progress-warning',\r\n error: 'progress-error'\r\n};\r\n\r\n/**\r\n * Progress bar component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Progress value={75} max={100} color=\"primary\" />\r\n * ```\r\n */\r\nexport const Progress = component<ProgressProps>(({ props }) => {\r\n const getClasses = () => {\r\n const classes = ['progress', 'w-full'];\r\n \r\n if (props.color) classes.push(progressColorClasses[props.color]);\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <progress \r\n class={getClasses()} \r\n value={props.value} \r\n max={props.max ?? 100}\r\n ></progress>\r\n );\r\n});\r\n\r\n// ============================================\r\n// Tooltip Component\r\n// ============================================\r\n\r\nexport type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';\r\nexport type TooltipColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type TooltipProps = \r\n & DefineProp<'tip', string>\r\n & DefineProp<'position', TooltipPosition, false>\r\n & DefineProp<'color', TooltipColor, false>\r\n & DefineProp<'open', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nconst tooltipPositionClasses: Record<TooltipPosition, string> = {\r\n top: 'tooltip-top',\r\n bottom: 'tooltip-bottom',\r\n left: 'tooltip-left',\r\n right: 'tooltip-right'\r\n};\r\n\r\nconst tooltipColorClasses: Record<TooltipColor, string> = {\r\n primary: 'tooltip-primary',\r\n secondary: 'tooltip-secondary',\r\n accent: 'tooltip-accent',\r\n info: 'tooltip-info',\r\n success: 'tooltip-success',\r\n warning: 'tooltip-warning',\r\n error: 'tooltip-error'\r\n};\r\n\r\n/**\r\n * Tooltip component with DaisyUI styling.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Tooltip tip=\"This is a tooltip\" position=\"top\">\r\n * <Button>Hover me</Button>\r\n * </Tooltip>\r\n * ```\r\n */\r\nexport const Tooltip = component<TooltipProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['tooltip'];\r\n \r\n if (props.position) classes.push(tooltipPositionClasses[props.position]);\r\n if (props.color) classes.push(tooltipColorClasses[props.color]);\r\n if (props.open) classes.push('tooltip-open');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()} data-tip={props.tip}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n","import { component, compound, DefineProp, DefineSlot, DefineModel, DefineEvent } from 'sigx';\r\n\r\n// ============================================\r\n// Accordion Component\r\n// ============================================\r\n\r\nexport interface AccordionItem {\r\n id: string;\r\n title: string;\r\n content: string;\r\n}\r\n\r\nexport type AccordionVariant = 'arrow' | 'plus' | 'none';\r\nexport type AccordionType = 'radio' | 'details';\r\n\r\nexport type AccordionProps = \r\n & DefineProp<'items', AccordionItem[], false>\r\n & DefineModel<'activeId', string>\r\n & DefineProp<'variant', AccordionVariant, false>\r\n & DefineProp<'join', boolean, false>\r\n & DefineProp<'type', AccordionType, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineEvent<'change', string>;\r\n\r\n/**\r\n * Accordion component with DaisyUI styling.\r\n * Only one item can be open at a time.\r\n * \r\n * Supports two types:\r\n * - 'radio' (default): Uses hidden radio inputs for mutual exclusivity\r\n * - 'details': Uses native HTML details/summary elements (searchable content)\r\n * \r\n * @example\r\n * ```tsx\r\n * const activeId = signal('');\r\n * const items = [\r\n * { id: '1', title: 'Question 1', content: 'Answer 1' },\r\n * { id: '2', title: 'Question 2', content: 'Answer 2' }\r\n * ];\r\n * <Accordion items={items} model:activeId={activeId} variant=\"arrow\" />\r\n * ```\r\n */\r\nconst _Accordion = component<AccordionProps>(({ props, slots, emit }) => {\r\n const name = `accordion-${Math.random().toString(36).slice(2)}`;\r\n\r\n const getVariantClass = () => {\r\n if (props.variant === 'arrow') return 'collapse-arrow';\r\n if (props.variant === 'plus') return 'collapse-plus';\r\n return '';\r\n };\r\n\r\n const handleChange = (id: string, checked: boolean) => {\r\n if (checked) {\r\n if (props.activeId) props.activeId.value = id;\r\n emit('change', id);\r\n } else if (props.activeId?.value === id) {\r\n // When unchecked (details toggle), clear the active ID\r\n if (props.activeId) props.activeId.value = '';\r\n emit('change', '');\r\n }\r\n };\r\n\r\n const handleDetailsToggle = (id: string, e: Event) => {\r\n const details = e.target as HTMLDetailsElement;\r\n handleChange(id, details.open);\r\n };\r\n\r\n return () => {\r\n const variantClass = getVariantClass();\r\n const containerClass = props.join \r\n ? 'join join-vertical bg-base-100 w-full' \r\n : 'w-full space-y-2';\r\n const itemBorderClass = props.join \r\n ? 'join-item border-base-300 border' \r\n : 'border border-base-300';\r\n const useDetails = props.type === 'details';\r\n\r\n // Check if default slot has actual content\r\n const defaultContent = slots.default?.();\r\n const hasDefaultContent = Array.isArray(defaultContent) && defaultContent.length > 0;\r\n\r\n if (hasDefaultContent) {\r\n return (\r\n <div class={`${containerClass} ${props.class ?? ''}`}>\r\n {defaultContent}\r\n </div>\r\n );\r\n }\r\n\r\n // Use details/summary elements for searchable content\r\n if (useDetails) {\r\n return (\r\n <div class={`${containerClass} ${props.class ?? ''}`}>\r\n {props.items?.map(item => (\r\n <details \r\n class={`collapse ${variantClass} bg-base-100 ${itemBorderClass}`}\r\n name={name}\r\n open={props.activeId?.value === item.id}\r\n onToggle={(e) => handleDetailsToggle(item.id, e)}\r\n >\r\n <summary class=\"collapse-title font-semibold\">\r\n {item.title}\r\n </summary>\r\n <div class=\"collapse-content text-sm\">\r\n <p>{item.content}</p>\r\n </div>\r\n </details>\r\n ))}\r\n </div>\r\n );\r\n }\r\n\r\n // Use radio inputs (default) for mutual exclusivity\r\n return (\r\n <div class={`${containerClass} ${props.class ?? ''}`}>\r\n {props.items?.map(item => (\r\n <div class={`collapse ${variantClass} bg-base-100 ${itemBorderClass}`}>\r\n <input \r\n type=\"radio\" \r\n name={name}\r\n checked={props.activeId?.value === item.id}\r\n onChange={(e) => handleChange(item.id, (e.target as HTMLInputElement).checked)}\r\n />\r\n <div class=\"collapse-title font-semibold\">\r\n {item.title}\r\n </div>\r\n <div class=\"collapse-content text-sm\">\r\n <p>{item.content}</p>\r\n </div>\r\n </div>\r\n ))}\r\n </div>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// AccordionItem Component\r\n// ============================================\r\n\r\nexport type AccordionItemType = 'radio' | 'details';\r\n\r\nexport type AccordionItemProps = \r\n & DefineProp<'title', string>\r\n & DefineProp<'name', string, false>\r\n & DefineProp<'open', boolean, false>\r\n & DefineProp<'forceOpen', boolean, false>\r\n & DefineProp<'forceClose', boolean, false>\r\n & DefineProp<'variant', AccordionVariant, false>\r\n & DefineProp<'type', AccordionItemType, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineSlot<'title'>\r\n & DefineEvent<'toggle', boolean>;\r\n\r\n/**\r\n * Individual accordion item with customizable content.\r\n * \r\n * Supports two types:\r\n * - 'radio' (default): Uses hidden radio input for mutual exclusivity\r\n * - 'details': Uses native HTML details/summary element (searchable content)\r\n * \r\n * @example\r\n * ```tsx\r\n * <AccordionItem title=\"Click to expand\" variant=\"arrow\">\r\n * <p>Hidden content goes here</p>\r\n * </AccordionItem>\r\n * ```\r\n */\r\nconst _AccordionItem = component<AccordionItemProps>(({ props, slots, emit }) => {\r\n const getVariantClass = () => {\r\n if (props.variant === 'arrow') return 'collapse-arrow';\r\n if (props.variant === 'plus') return 'collapse-plus';\r\n return '';\r\n };\r\n\r\n const getForceClass = () => {\r\n if (props.forceOpen) return 'collapse-open';\r\n if (props.forceClose) return 'collapse-close';\r\n return '';\r\n };\r\n\r\n return () => {\r\n const variantClass = getVariantClass();\r\n const forceClass = getForceClass();\r\n const baseClass = `collapse ${variantClass} ${forceClass} bg-base-100 border border-base-300 ${props.class ?? ''}`;\r\n const useDetails = props.type === 'details';\r\n\r\n // Get title content - prefer slot if it has content, otherwise use prop\r\n const titleContent = slots.title?.();\r\n const hasSlotTitle = Array.isArray(titleContent) && titleContent.length > 0;\r\n const title = hasSlotTitle ? titleContent : props.title;\r\n\r\n if (useDetails) {\r\n return (\r\n <details \r\n class={baseClass}\r\n name={props.name ?? 'accordion'}\r\n open={props.open}\r\n onToggle={(e) => emit('toggle', (e.target as HTMLDetailsElement).open)}\r\n >\r\n <summary class=\"collapse-title font-semibold\">\r\n {title}\r\n </summary>\r\n <div class=\"collapse-content text-sm\">\r\n {slots.default?.()}\r\n </div>\r\n </details>\r\n );\r\n }\r\n\r\n return (\r\n <div class={baseClass}>\r\n <input \r\n type=\"radio\" \r\n name={props.name ?? 'accordion'}\r\n checked={props.open}\r\n onChange={(e) => emit('toggle', (e.target as HTMLInputElement).checked)}\r\n />\r\n <div class=\"collapse-title font-semibold\">\r\n {title}\r\n </div>\r\n <div class=\"collapse-content text-sm\">\r\n {slots.default?.()}\r\n </div>\r\n </div>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// Collapse Component (single collapsible)\r\n// ============================================\r\n\r\nexport type CollapseProps = \r\n & DefineModel<boolean>\r\n & DefineProp<'title', string>\r\n & DefineProp<'variant', AccordionVariant, false>\r\n & DefineProp<'forceOpen', boolean, false>\r\n & DefineProp<'forceClose', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineSlot<'title'>\r\n & DefineEvent<'toggle', boolean>;\r\n\r\n/**\r\n * Collapsible component for showing/hiding content.\r\n * Uses a checkbox input for independent toggling.\r\n * \r\n * @example\r\n * ```tsx\r\n * const isOpen = signal(false);\r\n * <Collapse model={isOpen} title=\"Click to expand\" variant=\"arrow\">\r\n * <p>Content that can be collapsed</p>\r\n * </Collapse>\r\n * ```\r\n */\r\nconst _Collapse = component<CollapseProps>(({ props, slots, emit }) => {\r\n const getVariantClass = () => {\r\n if (props.variant === 'arrow') return 'collapse-arrow';\r\n if (props.variant === 'plus') return 'collapse-plus';\r\n return '';\r\n };\r\n\r\n const getForceClass = () => {\r\n if (props.forceOpen) return 'collapse-open';\r\n if (props.forceClose) return 'collapse-close';\r\n return '';\r\n };\r\n\r\n const handleChange = (e: Event) => {\r\n const checked = (e.target as HTMLInputElement).checked;\r\n if (props.model) props.model.value = checked;\r\n emit('toggle', checked);\r\n };\r\n\r\n return () => {\r\n const variantClass = getVariantClass();\r\n const forceClass = getForceClass();\r\n \r\n // Get title content - prefer slot if it has content, otherwise use prop\r\n const titleContent = slots.title?.();\r\n const hasSlotTitle = Array.isArray(titleContent) && titleContent.length > 0;\r\n const title = hasSlotTitle ? titleContent : props.title;\r\n\r\n return (\r\n <div class={`collapse ${variantClass} ${forceClass} bg-base-100 border border-base-300 ${props.class ?? ''}`}>\r\n <input \r\n type=\"checkbox\"\r\n checked={props.model?.value ?? false}\r\n onChange={handleChange}\r\n />\r\n <div class=\"collapse-title font-semibold\">\r\n {title}\r\n </div>\r\n <div class=\"collapse-content text-sm\">\r\n {slots.default?.()}\r\n </div>\r\n </div>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// Compound Exports\r\n// ============================================\r\n\r\n/**\r\n * Accordion with compound components for flexible usage.\r\n * \r\n * @example Using items array:\r\n * ```tsx\r\n * <Accordion items={items} model:activeId={activeId} variant=\"arrow\" />\r\n * ```\r\n * \r\n * @example Using compound pattern:\r\n * ```tsx\r\n * <Accordion variant=\"arrow\">\r\n * <Accordion.Item title=\"Question 1\">Answer 1</Accordion.Item>\r\n * <Accordion.Item title=\"Question 2\">Answer 2</Accordion.Item>\r\n * </Accordion>\r\n * ```\r\n */\r\nexport const Accordion = compound(_Accordion, {\r\n Item: _AccordionItem,\r\n Collapse: _Collapse,\r\n});\r\n","import { component, DefineProp, DefineEvent } from 'sigx';\r\n\r\n// ============================================\r\n// FileInput Types\r\n// ============================================\r\n\r\nexport type FileInputSize = 'xs' | 'sm' | 'md' | 'lg';\r\nexport type FileInputColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type FileInputProps = \r\n & DefineProp<'accept', string, false>\r\n & DefineProp<'multiple', boolean, false>\r\n & DefineProp<'size', FileInputSize, false>\r\n & DefineProp<'color', FileInputColor, false>\r\n & DefineProp<'bordered', boolean, false>\r\n & DefineProp<'ghost', boolean, false>\r\n & DefineProp<'disabled', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'change', FileList | null>;\r\n\r\nconst fileInputSizeClasses: Record<FileInputSize, string> = {\r\n xs: 'file-input-xs',\r\n sm: 'file-input-sm',\r\n md: '',\r\n lg: 'file-input-lg'\r\n};\r\n\r\nconst fileInputColorClasses: Record<FileInputColor, string> = {\r\n primary: 'file-input-primary',\r\n secondary: 'file-input-secondary',\r\n accent: 'file-input-accent',\r\n info: 'file-input-info',\r\n success: 'file-input-success',\r\n warning: 'file-input-warning',\r\n error: 'file-input-error'\r\n};\r\n\r\n// ============================================\r\n// FileInput Component\r\n// ============================================\r\n\r\n/**\r\n * File input component with DaisyUI styling.\r\n * Provides styled file upload controls with events for handling selected files.\r\n * \r\n * @example\r\n * ```tsx\r\n * <FileInput \r\n * accept=\"image/*\" \r\n * onChange={(files) => handleFiles(files)} \r\n * color=\"primary\"\r\n * bordered\r\n * />\r\n * \r\n * <FileInput \r\n * multiple\r\n * accept=\".pdf,.doc,.docx\"\r\n * size=\"lg\"\r\n * color=\"secondary\"\r\n * onChange={(files) => uploadDocuments(files)}\r\n * />\r\n * ```\r\n */\r\nexport const FileInput = component<FileInputProps>(({ props, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['file-input', 'w-full'];\r\n \r\n if (props.size) {\r\n const sizeClass = fileInputSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n \r\n if (props.color) classes.push(fileInputColorClasses[props.color]);\r\n if (props.bordered) classes.push('file-input-bordered');\r\n if (props.ghost) classes.push('file-input-ghost');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n const handleChange = (e: Event) => {\r\n const target = e.target as HTMLInputElement;\r\n emit('change', target.files);\r\n };\r\n\r\n return () => (\r\n <input \r\n type=\"file\"\r\n class={getClasses()}\r\n accept={props.accept}\r\n multiple={props.multiple}\r\n disabled={props.disabled}\r\n onChange={handleChange}\r\n />\r\n );\r\n});\r\n","import { component, DefineProp, DefineModel, DefineEvent } from 'sigx';\r\n\r\n// ============================================\r\n// Rating Types\r\n// ============================================\r\n\r\nexport type RatingSize = 'xs' | 'sm' | 'md' | 'lg';\r\nexport type RatingMask = 'star' | 'star-2' | 'heart' | 'circle' | 'diamond' | 'hexagon' | 'decagon' | 'triangle';\r\nexport type RatingColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type RatingProps = \r\n & DefineModel<number>\r\n & DefineProp<'max', number, false>\r\n & DefineProp<'size', RatingSize, false>\r\n & DefineProp<'mask', RatingMask, false>\r\n & DefineProp<'half', boolean, false>\r\n & DefineProp<'readOnly', boolean, false>\r\n & DefineProp<'color', RatingColor, false>\r\n & DefineProp<'class', string, false>\r\n & DefineEvent<'change', number>;\r\n\r\nconst ratingSizeClasses: Record<RatingSize, string> = {\r\n xs: 'rating-xs',\r\n sm: 'rating-sm',\r\n md: '',\r\n lg: 'rating-lg'\r\n};\r\n\r\nconst ratingMaskClasses: Record<RatingMask, string> = {\r\n 'star': 'mask-star',\r\n 'star-2': 'mask-star-2',\r\n 'heart': 'mask-heart',\r\n 'circle': 'mask-circle',\r\n 'diamond': 'mask-diamond',\r\n 'hexagon': 'mask-hexagon',\r\n 'decagon': 'mask-decagon',\r\n 'triangle': 'mask-triangle'\r\n};\r\n\r\nconst ratingColorClasses: Record<RatingColor, string> = {\r\n primary: 'bg-primary',\r\n secondary: 'bg-secondary',\r\n accent: 'bg-accent',\r\n info: 'bg-info',\r\n success: 'bg-success',\r\n warning: 'bg-warning',\r\n error: 'bg-error'\r\n};\r\n\r\n// ============================================\r\n// Rating Component\r\n// ============================================\r\n\r\n/**\r\n * Rating component with DaisyUI styling and two-way model binding.\r\n * Supports different sizes, mask shapes, colors, and half-star ratings.\r\n * \r\n * @example\r\n * ```tsx\r\n * const rating = signal(3);\r\n * \r\n * // Basic rating with model binding\r\n * <Rating model={rating} max={5} mask=\"star\" color=\"warning\" />\r\n * \r\n * // Read-only rating\r\n * <Rating model={rating} readOnly />\r\n * \r\n * // Half-star rating\r\n * <Rating model={rating} half max={5} color=\"primary\" />\r\n * \r\n * // Heart-shaped rating\r\n * <Rating model={rating} mask=\"heart\" color=\"error\" />\r\n * \r\n * // With change event\r\n * <Rating \r\n * model={rating} \r\n * onChange={(value) => console.log('New rating:', value)} \r\n * />\r\n * ```\r\n */\r\nexport const Rating = component<RatingProps>(({ props, emit }) => {\r\n const max = () => props.max ?? 5;\r\n const name = `rating-${Math.random().toString(36).slice(2)}`;\r\n\r\n const getContainerClasses = () => {\r\n const classes = ['rating'];\r\n \r\n if (props.size) {\r\n const sizeClass = ratingSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n if (props.half) classes.push('rating-half');\r\n if (props.class) classes.push(props.class);\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n const getInputClasses = (value: number) => {\r\n const classes = ['mask'];\r\n \r\n classes.push(ratingMaskClasses[props.mask ?? 'star-2']);\r\n if (props.color) classes.push(ratingColorClasses[props.color]);\r\n else classes.push('bg-orange-400');\r\n \r\n if (props.half && value % 1 === 0.5) {\r\n classes.push('rating-half', 'mask-half-1');\r\n } else if (props.half && value % 1 === 0) {\r\n classes.push('mask-half-2');\r\n }\r\n \r\n return classes.join(' ');\r\n };\r\n\r\n const handleChange = (value: number) => {\r\n if (!props.readOnly) {\r\n if (props.model) props.model.value = value;\r\n emit('change', value);\r\n }\r\n };\r\n\r\n return () => {\r\n const values = props.half \r\n ? Array.from({ length: max() * 2 }, (_, i) => (i + 1) * 0.5)\r\n : Array.from({ length: max() }, (_, i) => i + 1);\r\n\r\n return (\r\n <div class={getContainerClasses()}>\r\n {/* Hidden radio for 0 rating */}\r\n <input \r\n type=\"radio\" \r\n name={name} \r\n class=\"rating-hidden\"\r\n checked={(props.model?.value ?? 0) === 0}\r\n onChange={() => handleChange(0)}\r\n disabled={props.readOnly}\r\n />\r\n {values.map(value => (\r\n <input \r\n type=\"radio\"\r\n name={name}\r\n class={getInputClasses(value)}\r\n checked={(props.model?.value ?? 0) === value}\r\n onChange={() => handleChange(value)}\r\n disabled={props.readOnly}\r\n />\r\n ))}\r\n </div>\r\n );\r\n };\r\n});\r\n","import { component, DefineProp } from 'sigx';\r\n\r\n// ============================================\r\n// Skeleton Types\r\n// ============================================\r\n\r\nexport type SkeletonProps = \r\n & DefineProp<'width', string, false>\r\n & DefineProp<'height', string, false>\r\n & DefineProp<'circle', boolean, false>\r\n & DefineProp<'class', string, false>;\r\n\r\n// ============================================\r\n// Skeleton Component\r\n// ============================================\r\n\r\n/**\r\n * Skeleton loading placeholder component.\r\n * Displays animated loading placeholders for content.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Basic skeleton\r\n * <Skeleton width=\"100%\" height=\"2rem\" />\r\n * \r\n * // Circle skeleton for avatar\r\n * <Skeleton circle width=\"4rem\" height=\"4rem\" />\r\n * \r\n * // Card skeleton layout\r\n * <div class=\"space-y-2\">\r\n * <Skeleton circle width=\"3rem\" height=\"3rem\" />\r\n * <Skeleton width=\"100%\" height=\"1rem\" />\r\n * <Skeleton width=\"80%\" height=\"1rem\" />\r\n * </div>\r\n * ```\r\n */\r\nexport const Skeleton = component<SkeletonProps>(({ props }) => {\r\n const getClasses = () => {\r\n const classes = ['skeleton'];\r\n if (props.circle) classes.push('rounded-full');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const getStyle = () => {\r\n const style: Record<string, string> = {};\r\n if (props.width) style.width = props.width;\r\n if (props.height) style.height = props.height;\r\n return style;\r\n };\r\n\r\n return () => <div class={getClasses()} style={getStyle()}></div>;\r\n});\r\n","import { component, compound, DefineProp, DefineModel, DefineEvent, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Steps Types\r\n// ============================================\r\n\r\nexport interface StepItem {\r\n id: string;\r\n label: string;\r\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n content?: string;\r\n}\r\n\r\nexport type StepColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type StepsProps = \r\n & DefineProp<'items', StepItem[], false>\r\n & DefineModel<string> // Current step ID\r\n & DefineProp<'vertical', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineEvent<'change', string>;\r\n\r\nexport type StepProps = \r\n & DefineProp<'id', string, false>\r\n & DefineProp<'color', StepColor, false>\r\n & DefineProp<'active', boolean, false>\r\n & DefineProp<'completed', boolean, false>\r\n & DefineProp<'content', string, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineEvent<'click', string>;\r\n\r\n// ============================================\r\n// Steps Component\r\n// ============================================\r\n\r\n/**\r\n * Steps component for multi-step processes with model binding.\r\n * Supports horizontal and vertical layouts, with color customization.\r\n * \r\n * @example\r\n * ```tsx\r\n * const currentStep = signal('step1');\r\n * \r\n * // Using items prop\r\n * const steps = [\r\n * { id: 'step1', label: 'Register', color: 'primary' },\r\n * { id: 'step2', label: 'Choose plan' },\r\n * { id: 'step3', label: 'Purchase', color: 'success' }\r\n * ];\r\n * <Steps items={steps} model={currentStep} />\r\n * \r\n * // Using compound pattern\r\n * <Steps model={currentStep}>\r\n * <Steps.Step id=\"step1\" color=\"primary\">Register</Steps.Step>\r\n * <Steps.Step id=\"step2\">Choose plan</Steps.Step>\r\n * <Steps.Step id=\"step3\">Purchase</Steps.Step>\r\n * </Steps>\r\n * \r\n * // Vertical layout\r\n * <Steps vertical model={currentStep}>\r\n * <Steps.Step id=\"1\">Step 1</Steps.Step>\r\n * <Steps.Step id=\"2\">Step 2</Steps.Step>\r\n * </Steps>\r\n * ```\r\n */\r\nconst _Steps = component<StepsProps>(({ props, slots, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['steps'];\r\n if (props.vertical) classes.push('steps-vertical');\r\n else classes.push('w-full');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const isStepCompleted = (stepId: string) => {\r\n const stepIndex = props.items?.findIndex(s => s.id === stepId) ?? -1;\r\n const currentIndex = props.items?.findIndex(s => s.id === props.model?.value) ?? -1;\r\n return stepIndex <= currentIndex;\r\n };\r\n\r\n const handleStepClick = (stepId: string) => {\r\n if (props.model) props.model.value = stepId;\r\n emit('change', stepId);\r\n };\r\n\r\n return () => {\r\n // If using slots (compound pattern)\r\n if (slots.default) {\r\n return (\r\n <ul class={getClasses()}>\r\n {slots.default()}\r\n </ul>\r\n );\r\n }\r\n\r\n // Using items prop\r\n return (\r\n <ul class={getClasses()}>\r\n {props.items?.map(step => {\r\n const completed = isStepCompleted(step.id);\r\n const colorClass = step.color && completed ? `step-${step.color}` : (completed ? 'step-primary' : '');\r\n \r\n return (\r\n <li \r\n class={`step ${colorClass}`}\r\n data-content={step.content}\r\n onClick={() => handleStepClick(step.id)}\r\n >\r\n {step.label}\r\n </li>\r\n );\r\n })}\r\n </ul>\r\n );\r\n };\r\n});\r\n\r\n// ============================================\r\n// Step Component (Individual Step)\r\n// ============================================\r\n\r\n/**\r\n * Steps.Step component - Individual step item with customizable color and state.\r\n */\r\nconst Step = component<StepProps>(({ props, slots, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['step'];\r\n \r\n // Determine if step should show color\r\n if (props.completed || props.active) {\r\n if (props.color) {\r\n classes.push(`step-${props.color}`);\r\n } else {\r\n classes.push('step-primary');\r\n }\r\n }\r\n \r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <li \r\n class={getClasses()}\r\n data-content={props.content}\r\n onClick={() => props.id && emit('click', props.id)}\r\n >\r\n {slots.default?.()}\r\n </li>\r\n );\r\n});\r\n\r\n/**\r\n * Steps compound component with Step sub-component.\r\n */\r\nexport const Steps = compound(_Steps, {\r\n Step: Step,\r\n});\r\n\r\nexport type { StepProps as StepCompProps };\r\n","import { component, compound, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Timeline Types\r\n// ============================================\r\n\r\nexport interface TimelineItemData {\r\n id: string;\r\n title: string;\r\n description?: string;\r\n time?: string;\r\n icon?: string;\r\n color?: 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n}\r\n\r\nexport type TimelineColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type TimelineProps = \r\n & DefineProp<'items', TimelineItemData[], false>\r\n & DefineProp<'vertical', boolean, false>\r\n & DefineProp<'snap', boolean, false>\r\n & DefineProp<'compact', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nexport type TimelineItemProps = \r\n & DefineProp<'color', TimelineColor, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'start'>\r\n & DefineSlot<'middle'>\r\n & DefineSlot<'end'>\r\n & DefineSlot<'default'>;\r\n\r\nexport type TimelineStartProps = \r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nexport type TimelineMiddleProps = \r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nexport type TimelineEndProps = \r\n & DefineProp<'boxed', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n// ============================================\r\n// Timeline Component\r\n// ============================================\r\n\r\n/**\r\n * Timeline component for displaying chronological events.\r\n * Supports vertical and horizontal layouts with color customization.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Using items prop\r\n * const events = [\r\n * { id: '1', title: 'Started', time: '2024', color: 'primary' },\r\n * { id: '2', title: 'In Progress', time: '2025' },\r\n * { id: '3', title: 'Completed', time: '2026', color: 'success' }\r\n * ];\r\n * <Timeline items={events} vertical />\r\n * \r\n * // Using compound pattern\r\n * <Timeline vertical>\r\n * <Timeline.Item>\r\n * <Timeline.Start>2024</Timeline.Start>\r\n * <Timeline.Middle>●</Timeline.Middle>\r\n * <Timeline.End boxed>Started project</Timeline.End>\r\n * </Timeline.Item>\r\n * <hr />\r\n * <Timeline.Item color=\"success\">\r\n * <Timeline.Start>2025</Timeline.Start>\r\n * <Timeline.Middle>✓</Timeline.Middle>\r\n * <Timeline.End boxed>Completed!</Timeline.End>\r\n * </Timeline.Item>\r\n * </Timeline>\r\n * ```\r\n */\r\nconst _Timeline = component<TimelineProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['timeline'];\r\n if (props.vertical) classes.push('timeline-vertical');\r\n if (props.snap) classes.push('timeline-snap-icon');\r\n if (props.compact) classes.push('timeline-compact');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n // If using slots (compound pattern)\r\n if (slots.default) {\r\n return () => (\r\n <ul class={getClasses()}>\r\n {slots.default?.()}\r\n </ul>\r\n );\r\n }\r\n\r\n // Using items prop\r\n return () => (\r\n <ul class={getClasses()}>\r\n {props.items?.map((item, index) => (\r\n <li>\r\n {index > 0 && <hr class={item.color ? `bg-${item.color}` : ''} />}\r\n \r\n {item.time && (\r\n <div class=\"timeline-start\">{item.time}</div>\r\n )}\r\n \r\n <div class=\"timeline-middle\">\r\n {item.icon ? (\r\n <span>{item.icon}</span>\r\n ) : (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"w-5 h-5\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n )}\r\n </div>\r\n \r\n <div class=\"timeline-end timeline-box\">\r\n <div class=\"font-medium\">{item.title}</div>\r\n {item.description && <p class=\"text-sm opacity-70\">{item.description}</p>}\r\n </div>\r\n \r\n {index < (props.items?.length ?? 0) - 1 && (\r\n <hr class={props.items?.[index + 1]?.color ? `bg-${props.items[index + 1].color}` : ''} />\r\n )}\r\n </li>\r\n ))}\r\n </ul>\r\n );\r\n});\r\n\r\n// ============================================\r\n// TimelineItem Component\r\n// ============================================\r\n\r\n/**\r\n * Timeline.Item component - Individual timeline entry.\r\n */\r\nconst TimelineItem = component<TimelineItemProps>(({ props, slots }) => {\r\n return () => (\r\n <li class={props.class}>\r\n {slots.start && <div class=\"timeline-start\">{slots.start()}</div>}\r\n {slots.middle && <div class=\"timeline-middle\">{slots.middle()}</div>}\r\n {slots.end && <div class=\"timeline-end\">{slots.end()}</div>}\r\n {slots.default?.()}\r\n </li>\r\n );\r\n});\r\n\r\n// ============================================\r\n// TimelineStart Component\r\n// ============================================\r\n\r\n/**\r\n * Timeline.Start component - Left/top content area.\r\n */\r\nconst TimelineStart = component<TimelineStartProps>(({ props, slots }) => {\r\n return () => (\r\n <div class={`timeline-start ${props.class ?? ''}`}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// TimelineMiddle Component\r\n// ============================================\r\n\r\n/**\r\n * Timeline.Middle component - Center icon/marker area.\r\n */\r\nconst TimelineMiddle = component<TimelineMiddleProps>(({ props, slots }) => {\r\n return () => (\r\n <div class={`timeline-middle ${props.class ?? ''}`}>\r\n {slots.default?.() ?? (\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"w-5 h-5\">\r\n <path fill-rule=\"evenodd\" d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\" clip-rule=\"evenodd\" />\r\n </svg>\r\n )}\r\n </div>\r\n );\r\n});\r\n\r\n// ============================================\r\n// TimelineEnd Component\r\n// ============================================\r\n\r\n/**\r\n * Timeline.End component - Right/bottom content area.\r\n */\r\nconst TimelineEnd = component<TimelineEndProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['timeline-end'];\r\n if (props.boxed) classes.push('timeline-box');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n\r\n/**\r\n * Timeline compound component with Item, Start, Middle, and End sub-components.\r\n */\r\nexport const Timeline = compound(_Timeline, {\r\n Item: TimelineItem,\r\n Start: TimelineStart,\r\n Middle: TimelineMiddle,\r\n End: TimelineEnd,\r\n});\r\n\r\nexport type {\r\n TimelineItemProps as TimelineItemCompProps,\r\n TimelineStartProps as TimelineStartCompProps,\r\n TimelineMiddleProps as TimelineMiddleCompProps,\r\n TimelineEndProps as TimelineEndCompProps\r\n};\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Toast Types\r\n// ============================================\r\n\r\nexport type ToastPosition = \r\n | 'top-start' \r\n | 'top-center' \r\n | 'top-end' \r\n | 'middle-start' \r\n | 'middle-center' \r\n | 'middle-end' \r\n | 'bottom-start' \r\n | 'bottom-center' \r\n | 'bottom-end';\r\n\r\nexport type ToastProps = \r\n & DefineProp<'position', ToastPosition, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nconst toastPositionClasses: Record<ToastPosition, string> = {\r\n 'top-start': 'toast-top toast-start',\r\n 'top-center': 'toast-top toast-center',\r\n 'top-end': 'toast-top toast-end',\r\n 'middle-start': 'toast-middle toast-start',\r\n 'middle-center': 'toast-middle toast-center',\r\n 'middle-end': 'toast-middle toast-end',\r\n 'bottom-start': 'toast-bottom toast-start',\r\n 'bottom-center': 'toast-bottom toast-center',\r\n 'bottom-end': 'toast-bottom toast-end'\r\n};\r\n\r\n// ============================================\r\n// Toast Component\r\n// ============================================\r\n\r\n/**\r\n * Toast container component for positioning notifications.\r\n * Use with Alert components for styled notifications.\r\n * \r\n * @example\r\n * ```tsx\r\n * <Toast position=\"bottom-end\">\r\n * <Alert variant=\"success\">Message sent!</Alert>\r\n * </Toast>\r\n * \r\n * <Toast position=\"top-center\">\r\n * <Alert variant=\"info\">New notification</Alert>\r\n * <Alert variant=\"success\">Action completed</Alert>\r\n * </Toast>\r\n * \r\n * // Multiple toasts\r\n * <Toast position=\"bottom-start\">\r\n * {notifications.map(n => (\r\n * <Alert variant={n.type}>{n.message}</Alert>\r\n * ))}\r\n * </Toast>\r\n * ```\r\n */\r\nexport const Toast = component<ToastProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['toast'];\r\n const position: ToastPosition = props.position ?? 'bottom-end';\r\n classes.push(toastPositionClasses[position]);\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Kbd Types\r\n// ============================================\r\n\r\nexport type KbdSize = 'xs' | 'sm' | 'md' | 'lg';\r\n\r\nexport type KbdProps = \r\n & DefineProp<'size', KbdSize, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\nconst kbdSizeClasses: Record<KbdSize, string> = {\r\n xs: 'kbd-xs',\r\n sm: 'kbd-sm',\r\n md: '',\r\n lg: 'kbd-lg'\r\n};\r\n\r\n// ============================================\r\n// Kbd Component\r\n// ============================================\r\n\r\n/**\r\n * Keyboard key component for displaying keyboard shortcuts.\r\n * Renders styled keyboard key indicators.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Single key\r\n * <Kbd>K</Kbd>\r\n * \r\n * // Key combination\r\n * <Kbd>⌘</Kbd> + <Kbd>K</Kbd>\r\n * \r\n * // Different sizes\r\n * <Kbd size=\"xs\">Ctrl</Kbd>\r\n * <Kbd size=\"lg\">Enter</Kbd>\r\n * \r\n * // Full shortcut display\r\n * <div class=\"flex gap-1\">\r\n * <Kbd>Ctrl</Kbd>\r\n * <Kbd>Shift</Kbd>\r\n * <Kbd>P</Kbd>\r\n * </div>\r\n * ```\r\n */\r\nexport const Kbd = component<KbdProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['kbd'];\r\n if (props.size) {\r\n const sizeClass = kbdSizeClasses[props.size];\r\n if (sizeClass) classes.push(sizeClass);\r\n }\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => <kbd class={getClasses()}>{slots.default?.()}</kbd>;\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// RadialProgress Types\r\n// ============================================\r\n\r\nexport type RadialProgressColor = 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error';\r\n\r\nexport type RadialProgressProps = \r\n & DefineProp<'value', number>\r\n & DefineProp<'size', string, false>\r\n & DefineProp<'thickness', string, false>\r\n & DefineProp<'color', RadialProgressColor, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>;\r\n\r\n// ============================================\r\n// RadialProgress Component\r\n// ============================================\r\n\r\n/**\r\n * Radial/circular progress indicator component.\r\n * Displays progress as a circular arc with customizable size and color.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Basic progress\r\n * <RadialProgress value={70}>70%</RadialProgress>\r\n * \r\n * // With color\r\n * <RadialProgress value={85} color=\"primary\">85%</RadialProgress>\r\n * \r\n * // Custom size and thickness\r\n * <RadialProgress \r\n * value={50} \r\n * size=\"12rem\" \r\n * thickness=\"4px\"\r\n * color=\"success\"\r\n * >\r\n * 50%\r\n * </RadialProgress>\r\n * \r\n * // With custom content\r\n * <RadialProgress value={100} color=\"success\">\r\n * <span class=\"text-2xl\">✓</span>\r\n * </RadialProgress>\r\n * ```\r\n */\r\nexport const RadialProgress = component<RadialProgressProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['radial-progress'];\r\n if (props.color) classes.push(`text-${props.color}`);\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const getStyle = () => {\r\n const style: Record<string, string> = {\r\n '--value': String(props.value ?? 0)\r\n };\r\n if (props.size) style['--size'] = props.size;\r\n if (props.thickness) style['--thickness'] = props.thickness;\r\n return style;\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()} style={getStyle()} role=\"progressbar\">\r\n {slots.default?.() ?? `${props.value}%`}\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp } from 'sigx';\r\n\r\n// ============================================\r\n// Countdown Types\r\n// ============================================\r\n\r\nexport type CountdownProps = \r\n & DefineProp<'value', number>\r\n & DefineProp<'class', string, false>;\r\n\r\n// ============================================\r\n// Countdown Component\r\n// ============================================\r\n\r\n/**\r\n * Countdown component with animated number transitions.\r\n * Value should be between 0 and 99 for proper display.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Single countdown\r\n * <Countdown value={42} />\r\n * \r\n * // Timer display with multiple countdowns\r\n * <div class=\"flex gap-2\">\r\n * <Countdown value={hours()} />:\r\n * <Countdown value={minutes()} />:\r\n * <Countdown value={seconds()} />\r\n * </div>\r\n * \r\n * // With labels\r\n * <div class=\"flex gap-4\">\r\n * <div class=\"flex flex-col items-center\">\r\n * <Countdown value={15} />\r\n * <span class=\"text-sm\">days</span>\r\n * </div>\r\n * <div class=\"flex flex-col items-center\">\r\n * <Countdown value={10} />\r\n * <span class=\"text-sm\">hours</span>\r\n * </div>\r\n * </div>\r\n * ```\r\n */\r\nexport const Countdown = component<CountdownProps>(({ props }) => {\r\n const getClasses = () => {\r\n const classes = ['countdown'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <span class={getClasses()}>\r\n <span style={{ '--value': props.value ?? 0 }}></span>\r\n </span>\r\n );\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Diff Types\r\n// ============================================\r\n\r\nexport type DiffProps = \r\n & DefineProp<'aspectRatio', string, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'first'>\r\n & DefineSlot<'second'>;\r\n\r\n// ============================================\r\n// Diff Component\r\n// ============================================\r\n\r\n/**\r\n * Diff component for side-by-side comparison of two items.\r\n * Creates a draggable slider to reveal differences between two elements.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Image comparison\r\n * <Diff\r\n * slots={{\r\n * first: () => <img src=\"before.jpg\" alt=\"Before\" />,\r\n * second: () => <img src=\"after.jpg\" alt=\"After\" />\r\n * }}\r\n * />\r\n * \r\n * // Custom aspect ratio\r\n * <Diff aspectRatio=\"4/3\">\r\n * <template #first>\r\n * <img src=\"original.png\" />\r\n * </template>\r\n * <template #second>\r\n * <img src=\"edited.png\" />\r\n * </template>\r\n * </Diff>\r\n * \r\n * // With any content\r\n * <Diff>\r\n * <template #first>\r\n * <div class=\"bg-primary p-8\">Version A</div>\r\n * </template>\r\n * <template #second>\r\n * <div class=\"bg-secondary p-8\">Version B</div>\r\n * </template>\r\n * </Diff>\r\n * ```\r\n */\r\nexport const Diff = component<DiffProps>(({ props, slots }) => {\r\n const getClasses = () => {\r\n const classes = ['diff'];\r\n if (!props.aspectRatio) classes.push('aspect-[16/9]');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const getStyle = () => {\r\n if (props.aspectRatio) {\r\n return { aspectRatio: props.aspectRatio };\r\n }\r\n return {};\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()} style={getStyle()}>\r\n <div class=\"diff-item-1\">\r\n {slots.first?.()}\r\n </div>\r\n <div class=\"diff-item-2\">\r\n {slots.second?.()}\r\n </div>\r\n <div class=\"diff-resizer\"></div>\r\n </div>\r\n );\r\n});\r\n","import { component, DefineProp, DefineModel, DefineEvent, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Swap Types\r\n// ============================================\r\n\r\nexport type SwapProps = \r\n & DefineModel<boolean>\r\n & DefineProp<'rotate', boolean, false>\r\n & DefineProp<'flip', boolean, false>\r\n & DefineProp<'active', boolean, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'on'>\r\n & DefineSlot<'off'>\r\n & DefineEvent<'change', boolean>;\r\n\r\n// ============================================\r\n// Swap Component\r\n// ============================================\r\n\r\n/**\r\n * Swap component to toggle between two states/elements with animation.\r\n * Supports model binding for controlled state management.\r\n * \r\n * @example\r\n * ```tsx\r\n * const active = signal(false);\r\n * \r\n * // Basic swap with model binding\r\n * <Swap \r\n * model={active} \r\n * rotate\r\n * slots={{\r\n * on: () => \"🌙\",\r\n * off: () => \"☀️\"\r\n * }}\r\n * />\r\n * \r\n * // Theme toggle\r\n * <Swap \r\n * model={isDarkMode} \r\n * rotate\r\n * onChange={(checked) => setTheme(checked ? 'dark' : 'light')}\r\n * >\r\n * <template #on>\r\n * <svg>...</svg> <!-- Moon icon -->\r\n * </template>\r\n * <template #off>\r\n * <svg>...</svg> <!-- Sun icon -->\r\n * </template>\r\n * </Swap>\r\n * \r\n * // Flip animation\r\n * <Swap model={active} flip>\r\n * <template #on>😈</template>\r\n * <template #off>😇</template>\r\n * </Swap>\r\n * \r\n * // Hamburger menu toggle\r\n * <Swap model={menuOpen} rotate>\r\n * <template #on>✕</template>\r\n * <template #off>☰</template>\r\n * </Swap>\r\n * ```\r\n */\r\nexport const Swap = component<SwapProps>(({ props, slots, emit }) => {\r\n const getClasses = () => {\r\n const classes = ['swap'];\r\n if (props.rotate) classes.push('swap-rotate');\r\n if (props.flip) classes.push('swap-flip');\r\n if (props.active || props.model?.value) classes.push('swap-active');\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n const handleChange = (e: Event) => {\r\n const checked = (e.target as HTMLInputElement).checked;\r\n if (props.model) props.model.value = checked;\r\n emit('change', checked);\r\n };\r\n\r\n return () => (\r\n <label class={getClasses()}>\r\n <input \r\n type=\"checkbox\" \r\n checked={props.model?.value ?? props.active ?? false}\r\n onChange={handleChange}\r\n />\r\n <div class=\"swap-on\">{slots.on?.()}</div>\r\n <div class=\"swap-off\">{slots.off?.()}</div>\r\n </label>\r\n );\r\n});\r\n","import { component, DefineProp, DefineSlot } from 'sigx';\r\n\r\n// ============================================\r\n// Indicator Types\r\n// ============================================\r\n\r\nexport type IndicatorPosition = \r\n | 'top-start' \r\n | 'top-center' \r\n | 'top-end' \r\n | 'middle-start' \r\n | 'middle-center' \r\n | 'middle-end' \r\n | 'bottom-start' \r\n | 'bottom-center' \r\n | 'bottom-end';\r\n\r\nexport type IndicatorProps = \r\n & DefineProp<'position', IndicatorPosition, false>\r\n & DefineProp<'class', string, false>\r\n & DefineSlot<'default'>\r\n & DefineSlot<'indicator'>;\r\n\r\nconst indicatorPositionClasses: Record<IndicatorPosition, string> = {\r\n 'top-start': 'indicator-top indicator-start',\r\n 'top-center': 'indicator-top indicator-center',\r\n 'top-end': 'indicator-top indicator-end',\r\n 'middle-start': 'indicator-middle indicator-start',\r\n 'middle-center': 'indicator-middle indicator-center',\r\n 'middle-end': 'indicator-middle indicator-end',\r\n 'bottom-start': 'indicator-bottom indicator-start',\r\n 'bottom-center': 'indicator-bottom indicator-center',\r\n 'bottom-end': 'indicator-bottom indicator-end'\r\n};\r\n\r\n// ============================================\r\n// Indicator Component\r\n// ============================================\r\n\r\n/**\r\n * Indicator component to place an element on the corner of another element.\r\n * Commonly used for notification badges, status dots, etc.\r\n * \r\n * @example\r\n * ```tsx\r\n * // Badge indicator\r\n * <Indicator \r\n * position=\"top-end\"\r\n * slots={{\r\n * indicator: () => <Badge variant=\"error\">99+</Badge>\r\n * }}\r\n * >\r\n * <Button>Inbox</Button>\r\n * </Indicator>\r\n * \r\n * // Status dot on avatar\r\n * <Indicator position=\"bottom-end\">\r\n * <template #indicator>\r\n * <span class=\"badge badge-xs badge-success\"></span>\r\n * </template>\r\n * <img src=\"/avatar.jpg\" class=\"w-12 h-12 rounded-full\" />\r\n * </Indicator>\r\n * \r\n * // Multiple indicators\r\n * <Indicator position=\"top-start\">\r\n * <template #indicator>\r\n * <Badge variant=\"info\">New</Badge>\r\n * </template>\r\n * <Indicator position=\"top-end\">\r\n * <template #indicator>\r\n * <Badge variant=\"error\">3</Badge>\r\n * </template>\r\n * <Card>Content</Card>\r\n * </Indicator>\r\n * </Indicator>\r\n * ```\r\n */\r\nexport const Indicator = component<IndicatorProps>(({ props, slots }) => {\r\n const position = props.position ?? 'top-end';\r\n const positionClass = indicatorPositionClasses[position];\r\n\r\n const getClasses = () => {\r\n const classes = ['indicator'];\r\n if (props.class) classes.push(props.class);\r\n return classes.join(' ');\r\n };\r\n\r\n return () => (\r\n <div class={getClasses()}>\r\n <span class={`indicator-item ${positionClass}`}>\r\n {slots.indicator?.()}\r\n </span>\r\n {slots.default?.()}\r\n </div>\r\n );\r\n});\r\n"],"mappings":";;AA2JA,MAAa,QAAQ,SA/HN,WAAuB,EAAE,OAAO,OAAO,WAAW;CAC7D,IAAI,YAAsC;CAE1C,MAAM,cAAc;AAChB,MAA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BAAgB;CAChB,iBAAiB;CACjB,cAAc;CACd,gBAAgB;CAChB,iBAAiB;CACjB,cAAc;CACjB;AA4CD,MAAa,YAAY,WAA2B,EAAE,OAAO,YAAY;CAErE,MAAM,gBAAgB,yBADL,MAAM,YAAY;CAGnC,MAAM,mBAAmB;EACrB,MAAM,UAAU,CAAC,YAAY;AAC7B,MAAI,MAAM,MAAO,SAAQ,KAAK,MAAM,MAAM;AAC1C,SAAO,QAAQ,KAAK,IAAI;;AAG5B,cACI,qBAAC,OAAA;EAAI,OAAO,YAAY;aACpB,oBAAC,QAAA;GAAK,OAAO,kBAAkB;aAC1B,MAAM,aAAa;IACjB,EACN,MAAM,WAAW,CAAA;GAChB;EAEZ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DefineProp, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
export type CheckboxSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export type CheckboxColor = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
|
|
4
|
+
export type CheckboxProps = DefineModel<boolean> & DefineProp<"size", CheckboxSize, false> & DefineProp<"color", CheckboxColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineProp<"label", string, false> & DefineEvent<"change", boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Checkbox component with DaisyUI styling.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const agreed = signal(false);
|
|
11
|
+
* <Checkbox model={agreed} label="I agree to the terms" color="primary" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const Checkbox: import("@sigx/runtime-core").ComponentFactory<CheckboxProps, void, {}>;
|
|
15
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/forms/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAMvE,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE1G,MAAM,MAAM,aAAa,GACnB,WAAW,CAAC,OAAO,CAAC,GACpB,UAAU,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,GACzC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAmBrC;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ,wEAwBnB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot } from "sigx";
|
|
2
|
+
export type FormFieldProps = DefineProp<"label", string, false> & DefineProp<"error", string, false> & DefineProp<"hint", string, false> & DefineProp<"required", boolean, false> & DefineProp<"class", string, false> & DefineSlot<"default">;
|
|
3
|
+
/**
|
|
4
|
+
* FormField wrapper component that provides label, error, and hint support.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <FormField label="Email" error={emailError} required>
|
|
9
|
+
* <Input sync={email} type="email" />
|
|
10
|
+
* </FormField>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const FormField: import("@sigx/runtime-core").ComponentFactory<FormFieldProps, void, {
|
|
14
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../src/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAMzD,MAAM,MAAM,cAAc,GACpB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GACjC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5B;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS;;EAuBpB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DefineProp, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
export type InputSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export type InputVariant = "bordered" | "ghost";
|
|
4
|
+
export type InputColor = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
|
|
5
|
+
export type InputProps = DefineModel<string | number> & DefineProp<"placeholder", string, false> & DefineProp<"type", "text" | "password" | "email" | "number" | "search" | "url", false> & DefineProp<"size", InputSize, false> & DefineProp<"variant", InputVariant, false> & DefineProp<"color", InputColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"readOnly", boolean, false> & DefineProp<"maxLength", number, false> & DefineProp<"class", string, false> & DefineEvent<"input", InputEvent> & DefineEvent<"change", Event> & DefineEvent<"focus", FocusEvent> & DefineEvent<"blur", FocusEvent>;
|
|
6
|
+
/**
|
|
7
|
+
* Input component with DaisyUI styling.
|
|
8
|
+
*
|
|
9
|
+
* Uses the new model binding architecture for efficient two-way binding.
|
|
10
|
+
* The model tuple is forwarded directly to the native input element.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const form = signal({ name: "" });
|
|
15
|
+
* <Input model={() => form.name} placeholder="Enter your name" variant="bordered" />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const Input: import("@sigx/runtime-core").ComponentFactory<InputProps, void, {}>;
|
|
19
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/forms/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAMvE,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC;AAChD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAIvG,MAAM,MAAM,UAAU,GAChB,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,GAC5B,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,GACxC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,EAAE,KAAK,CAAC,GACtF,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,GAC1C,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,GAChC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,GAC5B,WAAW,CAAC,OAAO,EAAE,UAAU,CAAC,GAChC,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AAmBtC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,qEAyChB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
export type RadioSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export type RadioColor = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
|
|
4
|
+
export type RadioGroupProps = DefineModel<string> & DefineProp<"name", string> & DefineProp<"size", RadioSize, false> & DefineProp<"color", RadioColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineProp<"direction", "horizontal" | "vertical", false> & DefineSlot<"default"> & DefineEvent<"change", string>;
|
|
5
|
+
export type RadioItemProps = DefineProp<"value", string> & DefineProp<"label", string, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false>;
|
|
6
|
+
export type StandaloneRadioProps = DefineProp<"checked", boolean, false> & DefineProp<"name", string> & DefineProp<"value", string> & DefineProp<"size", RadioSize, false> & DefineProp<"color", RadioColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineProp<"label", string, false> & DefineEvent<"change", string>;
|
|
7
|
+
/**
|
|
8
|
+
* Radio compound component with Item sub-component for grouped radio buttons.
|
|
9
|
+
*
|
|
10
|
+
* @example Using compound pattern (recommended):
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const color = signal("red");
|
|
13
|
+
* <Radio model={color} name="color">
|
|
14
|
+
* <Radio.Item value="red" label="Red" />
|
|
15
|
+
* <Radio.Item value="blue" label="Blue" />
|
|
16
|
+
* </Radio>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example Using standalone Radio buttons:
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Radio.Standalone name="color" value="red" label="Red" checked={color === "red"} onChange={setColor} />
|
|
22
|
+
* <Radio.Standalone name="color" value="blue" label="Blue" checked={color === "blue"} onChange={setColor} />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const Radio: ((props: {
|
|
26
|
+
class?: string | undefined;
|
|
27
|
+
size?: RadioSize | undefined;
|
|
28
|
+
disabled?: boolean | undefined;
|
|
29
|
+
color?: RadioColor | undefined;
|
|
30
|
+
model?: import("@sigx/runtime-core").Model<string> | undefined;
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
33
|
+
} & {
|
|
34
|
+
"onUpdate:modelValue"?: ((detail: string) => void) | undefined;
|
|
35
|
+
onChange?: ((detail: string) => void) | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
slots?: Partial<{
|
|
38
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
39
|
+
}> | undefined;
|
|
40
|
+
} & {
|
|
41
|
+
model?: import("@sigx/runtime-core").Model<string> | import("@sigx/runtime-core").ModelBinding<string> | (() => string) | undefined;
|
|
42
|
+
} & JSX.IntrinsicAttributes & import("@sigx/runtime-core").ComponentAttributeExtensions & {
|
|
43
|
+
ref?: import("@sigx/runtime-core").Ref<void> | undefined;
|
|
44
|
+
children?: any;
|
|
45
|
+
}) => import("@sigx/runtime-core").JSXElement) & {
|
|
46
|
+
__setup: import("@sigx/runtime-core").SetupFn<{
|
|
47
|
+
model?: import("@sigx/runtime-core").Model<string> | undefined;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
size?: RadioSize | undefined;
|
|
50
|
+
color?: RadioColor | undefined;
|
|
51
|
+
disabled?: boolean | undefined;
|
|
52
|
+
class?: string | undefined;
|
|
53
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
54
|
+
change?: import("@sigx/runtime-core").EventDefinition<string> | undefined;
|
|
55
|
+
}, RadioGroupProps, void, {
|
|
56
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
57
|
+
}>;
|
|
58
|
+
__name?: string;
|
|
59
|
+
__props: {
|
|
60
|
+
model?: import("@sigx/runtime-core").Model<string> | undefined;
|
|
61
|
+
name?: string | undefined;
|
|
62
|
+
size?: RadioSize | undefined;
|
|
63
|
+
color?: RadioColor | undefined;
|
|
64
|
+
disabled?: boolean | undefined;
|
|
65
|
+
class?: string | undefined;
|
|
66
|
+
direction?: "vertical" | "horizontal" | undefined;
|
|
67
|
+
change?: import("@sigx/runtime-core").EventDefinition<string> | undefined;
|
|
68
|
+
};
|
|
69
|
+
__events: RadioGroupProps;
|
|
70
|
+
__ref: void;
|
|
71
|
+
__slots: {
|
|
72
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
73
|
+
};
|
|
74
|
+
} & {
|
|
75
|
+
Item: import("@sigx/runtime-core").ComponentFactory<RadioItemProps, void, {}>;
|
|
76
|
+
Standalone: import("@sigx/runtime-core").ComponentFactory<StandaloneRadioProps, void, {}>;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../src/forms/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAmC,MAAM,MAAM,CAAC;AAM9H,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClD,MAAM,MAAM,UA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AAC,GAClC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAoCpC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGhB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DefineProp, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
export type RangeSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export type RangeColor = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
|
|
4
|
+
export type RangeProps = DefineModel<number> & DefineProp<"min", number, false> & DefineProp<"max", number, false> & DefineProp<"step", number, false> & DefineProp<"size", RangeSize, false> & DefineProp<"color", RangeColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineEvent<"change", number>;
|
|
5
|
+
/**
|
|
6
|
+
* Range slider component with DaisyUI styling.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const volume = signal(50);
|
|
11
|
+
* <Range model={volume} min={0} max={100} step={1} color="primary" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const Range: import("@sigx/runtime-core").ComponentFactory<RangeProps, void, {}>;
|
|
15
|
+
//# sourceMappingURL=Range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["../../src/forms/Range.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAMvE,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvG,MAAM,MAAM,UAAU,GAChB,WAAW,CAAC,MAAM,CAAC,GACnB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAChC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAChC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GACjC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAmBpC;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,qEAwBhB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DefineProp, DefineSlot, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
import type { InputSize, InputVariant, InputColor } from "./Input";
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type SelectProps = DefineModel<string> & DefineProp<"options", SelectOption[], false> & DefineProp<"placeholder", string, false> & DefineProp<"size", InputSize, false> & DefineProp<"variant", InputVariant, false> & DefineProp<"color", InputColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineSlot<"default"> & DefineEvent<"change", string>;
|
|
9
|
+
/**
|
|
10
|
+
* Select component with DaisyUI styling and model binding support.
|
|
11
|
+
*
|
|
12
|
+
* Uses the new model binding architecture for efficient two-way binding.
|
|
13
|
+
* The model tuple is forwarded directly to the native select element.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const form = signal({ choice: "" });
|
|
18
|
+
* const options = [
|
|
19
|
+
* { value: "a", label: "Option A" },
|
|
20
|
+
* { value: "b", label: "Option B" }
|
|
21
|
+
* ];
|
|
22
|
+
* <Select model={() => form.choice} options={options} placeholder="Select an option" />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const Select: import("@sigx/runtime-core").ComponentFactory<SelectProps, void, {
|
|
26
|
+
default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/forms/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnF,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMnE,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,WAAW,GACjB,WAAW,CAAC,MAAM,CAAC,GACnB,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,CAAC,GAC5C,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,GACxC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,GAC1C,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,SAAS,CAAC,GACrB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAmBpC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM;;EAiDjB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DefineProp, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
import type { InputSize, InputVariant, InputColor } from "./Input";
|
|
3
|
+
export type TextareaProps = DefineModel<string> & DefineProp<"placeholder", string, false> & DefineProp<"rows", number, false> & DefineProp<"size", InputSize, false> & DefineProp<"variant", InputVariant, false> & DefineProp<"color", InputColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineEvent<"input", string> & DefineEvent<"change", string>;
|
|
4
|
+
/**
|
|
5
|
+
* Textarea component with DaisyUI styling.
|
|
6
|
+
*
|
|
7
|
+
* Uses the new model binding architecture for efficient two-way binding.
|
|
8
|
+
* The model tuple is forwarded directly to the native textarea element.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const form = signal({ bio: "" });
|
|
13
|
+
* <Textarea model={() => form.bio} placeholder="Tell us about yourself" rows={5} />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const Textarea: import("@sigx/runtime-core").ComponentFactory<TextareaProps, void, {}>;
|
|
17
|
+
//# sourceMappingURL=Textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../src/forms/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMnE,MAAM,MAAM,aAAa,GACnB,WAAW,CAAC,MAAM,CAAC,GACnB,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,GACxC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GACjC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,GACpC,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,GAC1C,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,GAC5B,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAEpC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,wEAoCnB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DefineProp, DefineEvent, DefineModel } from "sigx";
|
|
2
|
+
export type ToggleSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export type ToggleColor = "primary" | "secondary" | "accent" | "info" | "success" | "warning" | "error";
|
|
4
|
+
export type ToggleProps = DefineModel<boolean> & DefineProp<"size", ToggleSize, false> & DefineProp<"color", ToggleColor, false> & DefineProp<"disabled", boolean, false> & DefineProp<"class", string, false> & DefineProp<"label", string, false> & DefineEvent<"change", boolean>;
|
|
5
|
+
/**
|
|
6
|
+
* Toggle/switch component with DaisyUI styling.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const enabled = signal(false);
|
|
11
|
+
* <Toggle model={enabled} label="Enable notifications" color="primary" />
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const Toggle: import("@sigx/runtime-core").ComponentFactory<ToggleProps, void, {}>;
|
|
15
|
+
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toggle.d.ts","sourceRoot":"","sources":["../../src/forms/Toggle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAMvE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAExG,MAAM,MAAM,WAAW,GACjB,WAAW,CAAC,OAAO,CAAC,GACpB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,GACrC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,GACvC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAmBrC;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,sEAwBjB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { Input } from "./Input";
|
|
2
|
+
export type { InputProps, InputSize, InputVariant, InputColor } from "./Input";
|
|
3
|
+
export { Textarea } from "./Textarea";
|
|
4
|
+
export type { TextareaProps } from "./Textarea";
|
|
5
|
+
export { Select } from "./Select";
|
|
6
|
+
export type { SelectProps, SelectOption } from "./Select";
|
|
7
|
+
export { FormField } from "./FormField";
|
|
8
|
+
export type { FormFieldProps } from "./FormField";
|
|
9
|
+
export { Toggle } from "./Toggle";
|
|
10
|
+
export type { ToggleProps, ToggleSize, ToggleColor } from "./Toggle";
|
|
11
|
+
export { Checkbox } from "./Checkbox";
|
|
12
|
+
export type { CheckboxProps, CheckboxSize, CheckboxColor } from "./Checkbox";
|
|
13
|
+
export { Radio } from "./Radio";
|
|
14
|
+
export type { RadioGroupProps, RadioItemProps, RadioSize, RadioColor, StandaloneRadioProps } from "./Radio";
|
|
15
|
+
export { Range } from "./Range";
|
|
16
|
+
export type { RangeProps, RangeSize, RangeColor } from "./Range";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG/E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG7E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAG5G,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|