### Clone and Run Cornet Starter App Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/CONTRIBUTING.md Clone the repository, install dependencies, and start the development server for the Cornet starter app. ```bash git clone --recurse-submodules git@gitlab.limos.fr:hub-isima/daisyui-vue-kit.git cd daisyui-vue-kit npm install npm run dev ``` -------------------------------- ### DuAccordion Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Demonstrates how to use the DuAccordion component with a list of items. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### Example: Expand Internal Dependencies Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Illustrates how `expandWithInternalDependencies` works by starting with a set containing only 'DuFab' and expanding it to include its dependencies like 'DuButton'. ```typescript // If DuFab internally uses DuButton, and user only imports DuFab: const used = new Set(['DuFab']) const expanded = expandWithInternalDependencies(used, exports, './node_modules/cornet-ui') // expanded now includes both 'DuFab' and 'DuButton' ``` -------------------------------- ### Source File Path Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/INDEX.md Example of how source file paths are formatted within the documentation. ```bash components/Actions/du-button/du-button.vue ``` -------------------------------- ### DuNavbar Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-layout-navigation.md Demonstrates how to use the DuNavbar component with sticky and bordered props, and slots for start, center, and end content. ```vue ``` -------------------------------- ### DuButton Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-actions.md Demonstrates various ways to use the DuButton component, including basic usage, different variants, sizes, styles, shapes, rendering as a link, and disabled states. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### Troubleshooting: Component Import Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Ensure that components are correctly imported in your source files. This example shows a typical import statement for a component from the 'cornet-ui' package. ```javascript import { DuButton } from 'cornet-ui' ``` -------------------------------- ### DuSelect Component Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-input.md Demonstrates various ways to use the DuSelect component, including simple string options, object options with single and multi-select, and returning full objects. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### Component File Structure Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/overview.md Illustrates the typical file organization for a DaisyUI Vue component, including the implementation, types, and Storybook stories. ```tree components/Actions/du-button/ ├── du-button.vue # Implementation ├── du-button.types.ts # Types: BUTTONSize, BUTTONColor └── du-button.stories.ts # Storybook stories ``` -------------------------------- ### Example: Parse Library Exports Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Demonstrates how to use `parseLibraryExports` by reading an `index.ts` file and logging a specific component's export path. ```typescript import { parseLibraryExports } from 'cornet-ui/plugin-vite' import { readFileSync } from 'fs' const indexContent = readFileSync('./lib/index.ts', 'utf-8') const exports = parseLibraryExports(indexContent) console.log(exports.get('DuButton')) // → "./components/Actions/du-button/du-button.vue" ``` -------------------------------- ### DuCountdown Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Shows how to implement the DuCountdown component to display a countdown to a target date. Requires 'cornet-ui' to be installed. ```vue ``` -------------------------------- ### DuTooltip Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md Demonstrates how to use the DuTooltip component with different text and positions. Ensure the component is imported from 'cornet-ui'. ```vue ``` -------------------------------- ### DuCollapse Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Demonstrates how to use the DuCollapse component for a single collapsible section. Ensure 'cornet-ui' is installed. ```vue ``` -------------------------------- ### Install Cornet UI via NPM Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/00-START-HERE.md Install the Cornet UI package using NPM. This is the recommended method for adding the library to your project. ```bash npm install cornet-ui ``` -------------------------------- ### DuMenu Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-layout-navigation.md Shows how to implement the DuMenu component with nested submenus, dynamic active item tracking, and event handling for item selection. ```vue ``` -------------------------------- ### DuModal Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-actions.md A practical example demonstrating how to use the DuModal component in a Vue.js application, including v-model binding and common props. ```APIDOC ## DuModal Usage Example ```vue ``` ``` -------------------------------- ### DuTimeline Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Shows how to implement the DuTimeline component to display a sequence of events. The 'cornet-ui' library must be imported. ```vue ``` -------------------------------- ### Example: Scan Source Content Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Shows how to use `scanSourceContent` to find components used in a code string and check for namespace imports. ```typescript import { scanSourceContent } from 'cornet-ui/plugin-vite' const code = ` import { DuButton, DuSelect } from 'cornet-ui' export const MyComponent = { components: { DuButton } } ` const result = scanSourceContent(code, ['cornet-ui']) console.log(result.used) // → Set { 'DuButton', 'DuSelect' } console.log(result.namespaceImport) // → false ``` -------------------------------- ### DuCard Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Demonstrates how to use the DuCard component with a title, border, and action buttons. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### Example: Generate Exclusion CSS Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Demonstrates the output of `generateExclusionCss`, showing the count of excluded components and a preview of the generated CSS. ```typescript const { css, excludedCount } = generateExclusionCss(exports, used) console.log(excludedCount) // → 22 console.log(css.slice(0, 50)) // → "@source not "./components/Actions/du-dropdown..." ``` -------------------------------- ### Basic Cornet UI Component Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/INDEX.md Example of using Cornet UI components like DuButton and DuSelect within a Vue 3 application. Ensure components are imported in the script setup. ```vue ``` -------------------------------- ### DuTabs Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-layout-navigation.md Illustrates the use of DuTabs with different types and variants, including custom content for each tab using slots. ```vue ``` -------------------------------- ### Contribute to Cornet Library Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/CONTRIBUTING.md Navigate to the library directory, install dependencies, and run linting, type checking, testing, and build commands for the Cornet library. ```bash cd lib npm install npm run lint npm run type-check npm test npm run build ``` -------------------------------- ### DuDropdown Component Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-actions.md Demonstrates basic and controlled DuDropdown configurations. The basic example uses default click behavior, while the controlled example utilizes v-model and hover to manage the open state. ```vue ``` -------------------------------- ### DuAvatar Image and Initials Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Demonstrates how to use DuAvatar with an image source or with initials for fallback display. Includes examples for different sizes and colors. ```vue ``` -------------------------------- ### DuCheckbox Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-input.md Demonstrates how to use the DuCheckbox component in a Vue template, including basic usage, colored variants, and the indeterminate state. ```vue ``` -------------------------------- ### DuToast Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md Shows how to implement a DuToast container to display multiple toast notifications. Requires importing DuToast and DuAlert from 'cornet-ui' and managing toast state with Vue's ref. ```vue ``` -------------------------------- ### DuDrawer Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-layout-navigation.md Demonstrates how to use DuDrawer for a responsive slide-out navigation panel. It includes a navbar with a toggle button and a main content area. ```vue ``` -------------------------------- ### Use DuButton Component Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/00-START-HERE.md Import and use the DuButton component in your Vue.js application. This example demonstrates a basic primary button. ```vue ``` -------------------------------- ### Configure NPM for Local Cornet UI Installation Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Specify Cornet UI as a dependency using the file protocol for local development or embedded source mode. ```json { "dependencies": { "cornet-ui": "file:lib" } } ``` ```json { "dependencies": { "cornet-ui": "file:../path/to/daisyui-vue-kit/lib" } } ``` -------------------------------- ### Install Cornet UI with Git Submodule Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/INDEX.md Add Cornet UI as a Git submodule for source mode installation. This method is useful for managing dependencies directly within your repository. ```bash git submodule add -b lib git@gitlab.limos.fr:hub-isima/daisyui-vue-kit.git lib ``` -------------------------------- ### DuFab Component Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-actions.md Demonstrates how to use the DuFab component with a list of items, a primary variant, and absolute positioning. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### DuInputField Component Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-input.md Demonstrates various ways to use the DuInputField component, including basic text input, email input with validation, date picker, password input with size modification, and input with suggestions. ```vue ``` -------------------------------- ### Configure Vite for Cornet UI Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/README.md Add the Vue plugin and Tailwind CSS to your Vite configuration. This is the minimal setup required. ```typescript // vite.config.ts import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ plugins: [vue(), tailwindcss()], }) ``` -------------------------------- ### Modal Dialog Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Implements a modal dialog using DuModal, with options for placement, close buttons, and closing on escape. Use 'v-model:open' to control visibility. ```vue ``` -------------------------------- ### Use Cornet UI Button Component Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/README.md Import and use the DuButton component from 'cornet-ui'. This example shows a primary button. ```vue ``` -------------------------------- ### DuAlert Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md Demonstrates various configurations of DuAlert, including success alerts with dismiss functionality, error alerts with titles, auto-dismissible info alerts, and warning alerts with centered text. Ensure DuAlert is imported from 'cornet-ui'. ```vue ``` -------------------------------- ### Install Cornet UI via Git Submodule Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Embed Cornet UI source directly into your project for local customization. Add as a submodule on the 'lib' branch. ```bash # Add as submodule on the 'lib' branch git submodule add -b lib git@gitlab.limos.fr:hub-isima/daisyui-vue-kit.git lib # Or from GitHub mirror git submodule add -b lib https://github.com/t-lecoublet/Cornet-UI.git lib ``` -------------------------------- ### Basic Vite Plugin Setup Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Integrate the Cornet UI Vite plugin into your vite.config.ts. Ensure it is listed before the Vue and Tailwind CSS plugins for correct functionality. ```typescript import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import tailwindcss from '@tailwindcss/vite' import cornetPlugin from 'cornet-ui/plugin-vite' export default defineConfig({ plugins: [ cornetPlugin(), vue(), tailwindcss() ] }) ``` -------------------------------- ### Modal Dialog Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/00-START-HERE.md Example of a modal dialog component. It can be controlled using a v-model for its open state and includes a close button and customizable content. ```vue

Confirm Action

Are you sure?

Cancel
``` -------------------------------- ### DuModal Component Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-actions.md Demonstrates how to use the DuModal component in a Vue.js application. It shows how to control the modal's visibility using v-model and configure its behavior with props like closeButton and closeOnEscape. ```vue ``` -------------------------------- ### DuBadge Usage Examples Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Shows various ways to use the DuBadge component for displaying counts or status indicators. Supports different sizes and color variants. Ensure 'cornet-ui' is installed and imported. ```vue ``` -------------------------------- ### Basic Button Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Demonstrates how to use the basic DuButton component with a click handler. ```vue ``` -------------------------------- ### Run Build Command Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Execute the build command to trigger the Vite plugin. The output indicates the number of components used and excluded from the CSS. ```bash npm run build ``` -------------------------------- ### CSS Entry Point (index.css) Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/overview.md Defines the CSS entry point for DaisyUI Vue Kit, using Tailwind's @source directive in embedded mode. ```css @source "./components"; ``` -------------------------------- ### ToastHorizontalPosition Type Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Specifies the horizontal positioning for a toast notification. Options are 'start', 'center', or 'end'. ```typescript export type ToastHorizontalPosition = 'start' | 'center' | 'end' ``` -------------------------------- ### Core Types: Size Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Represents component sizing options. Maps to DaisyUI size prefixes. ```APIDOC ## Type: Size ### Description Represents component sizing options. Maps to DaisyUI size prefixes. ### Type Definition ```typescript type Size = 'default' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' export const AvailableSizes: Size[] = ['default', 'xs', 'sm', 'md', 'lg', 'xl'] ``` ### Usage - `'default'` — No size modifier applied - `'xs'` — Extra small - `'sm'` — Small - `'md'` — Medium - `'lg'` — Large - `'xl'` — Extra large ``` -------------------------------- ### CSS Entry Point: NPM Mode Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/composables-and-utilities.md In NPM mode, the CSS entry point uses a pre-generated class list from the build output. This is typically used in production or when distributing the library. ```css @source "./dist/cornet-classes.txt"; ``` -------------------------------- ### Import Cornet UI CSS Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/README.md Import Tailwind CSS, DaisyUI, and Cornet UI's CSS in your main CSS file. Ensure the order is correct. ```css /* src/main.css */ @import "tailwindcss"; @plugin "daisyui"; @import "cornet-ui/css"; ``` -------------------------------- ### ChatPlacement Type Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Defines the alignment options for chat bubbles, specifying whether they appear on the start (left) or end (right) of the chat interface. ```typescript export type ChatPlacement = 'chat-start' | 'chat-end' ``` -------------------------------- ### DuNavbar Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-layout-navigation.md A flexible top navigation bar component that can be customized with start, center, and end content areas. It supports sticky positioning and borders. ```APIDOC ## DuNavbar ### Description Top navigation bar with flexible content areas. ### Props - `sticky` (boolean, optional, default: `false`) - Stick navbar to top on scroll - `bordered` (boolean, optional, default: `false`) - Show bottom border ### Slots - `start` — Left-side content - `center` — Center content - `end` — Right-side content ### Usage Example ```vue ``` ``` -------------------------------- ### Component File Structure Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/INDEX.md Standard directory structure for DaisyUI Vue components. Includes the main Vue component, TypeScript types, and Storybook stories. ```bash components/{Category}/du-{name}/ ├── du-{name}.vue # Vue component (SFC) ├── du-{name}.types.ts # TypeScript types └── du-{name}.stories.ts # Storybook stories (reference only) ``` -------------------------------- ### Action Components Types: FABMainAction Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Main FAB button configuration. ```APIDOC ## Interface: FABMainAction ### Description Main FAB button configuration. ### Interface Definition ```typescript export interface FABMainAction { label?: string icon?: any customClass?: string variant?: string onClick?: () => void } ``` ``` -------------------------------- ### Define FAB Main Action Configuration Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Defines the configuration for the main action button of a Floating Action Button (FAB). Includes properties for labels, icons, custom styling, and click handlers. ```typescript export interface FABMainAction { label?: string icon?: any customClass?: string variant?: string onClick?: () => void } ``` -------------------------------- ### Configure srcDirs Option Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Define the application source directories to scan for component usage. The plugin recursively searches for component files within these directories. ```typescript cornetPlugin({ srcDirs: ['src', 'app', 'lib'] }) ``` -------------------------------- ### DuKbd Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Displays keyboard keys with customizable sizes. ```APIDOC ## DuKbd ### Description Keyboard key display component. ### Props - `size` (KBDSize) - Optional - Key size. Possible values: 'kbd-xs', 'kbd-sm', 'kbd-md', 'kbd-lg'. ### Usage ```vue ``` ``` -------------------------------- ### Register Cornet UI Components with Named Imports Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Import specific Cornet UI components using named imports in your Vue script setup for explicit usage. ```vue ``` -------------------------------- ### LoadingProps Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Props for configuring the Loading component. ```APIDOC ## LoadingProps ### Description Props for configuring the Loading component. ### Interface ```typescript export interface LoadingProps { animation?: LoadingAnimation size?: Size variant?: Variant } ``` ``` -------------------------------- ### DuRating Component Usage Example Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-input.md Demonstrates how to use the DuRating component in a Vue.js application, including v-model binding and common props like count, size, shape, and clearable. ```vue ``` -------------------------------- ### Configure Vite for Auto-importing Cornet UI Components Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/quick-start.md Enable auto-importing of Cornet UI components by configuring the Vue plugin in `vite.config.ts` to recognize custom element tags starting with 'Du'. ```typescript // vite.config.ts import vue from '@vitejs/plugin-vue' import { defineConfig } from 'vite' export default defineConfig({ plugins: [ vue({ template: { compilerOptions: { isCustomElement: (tag) => tag.startsWith('Du'), }, }, }), ], }) ``` -------------------------------- ### DuLoading Component Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md Demonstrates various animation styles and sizes for the DuLoading component. Ensure 'cornet-ui' is imported. ```vue ``` -------------------------------- ### DuTable with Data and Styling Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-data-display.md Shows how to implement a DuTable component with defined columns and rows, and apply styling such as striping and hover effects. Ensure 'cornet-ui' is imported. ```vue ``` -------------------------------- ### ProgressProps Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Props for configuring the Progress Bar component. ```APIDOC ## ProgressProps ### Description Props for configuring the Progress Bar component. ### Interface ```typescript export interface ProgressProps { value?: number max?: number variant?: Variant size?: Size } ``` ``` -------------------------------- ### Vite Plugin Configuration with Custom Alias Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Configure the Vite plugin to recognize a custom alias for importing Cornet UI components. This is useful when Cornet UI is not installed directly via npm but is linked via a relative path. ```typescript export default defineConfig({ resolve: { alias: { '@ui': fileURLToPath(new URL('./lib', import.meta.url)) } }, plugins: [ cornetPlugin({ packageNames: ['@ui'] }), vue(), tailwindcss() ] }) ``` -------------------------------- ### Vite Plugin for CSS Tree-Shaking Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/00-START-HERE.md Integrate the Cornet UI Vite plugin to automatically detect and include only the CSS for components you use, resulting in smaller CSS bundles. This setup requires importing the plugin and adding it to your Vite configuration. ```typescript import cornetPlugin from 'cornet-ui/plugin-vite' export default { plugins: [cornetPlugin(), vue(), tailwindcss()] } ``` -------------------------------- ### expandWithInternalDependencies Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/vite-plugin.md Expands a set of directly used components to include all their internal dependencies. This is useful for ensuring all necessary components are included in the build. ```APIDOC ## expandWithInternalDependencies ### Description Expands a set of used components with their internal dependencies. ### Parameters - `used` (Set) - Set of directly-used component names - `componentPaths` (Map) - Map of component names to file paths (from `parseLibraryExports`) - `libRoot` (string) - Root directory of Cornet library ### Returns Set - Expanded Set including all dependencies ### Example ```typescript // If DuFab internally uses DuButton, and user only imports DuFab: const used = new Set(['DuFab']) const expanded = expandWithInternalDependencies(used, exports, './node_modules/cornet-ui') // expanded now includes both 'DuFab' and 'DuButton' ``` ``` -------------------------------- ### Map Size Prop to DaisyUI Class Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/composables-and-utilities.md Use `useSizeMapping` to convert a size prop into a DaisyUI CSS class modifier. Pass the component's props and a class prefix (e.g., 'btn'). Example shows mapping 'sm' to 'btn-sm'. ```typescript import { useSizeMapping, type Size } from 'cornet-ui' import { computed } from 'vue' const props = defineProps<{ size: Size }>() // For buttons const { sizeClass } = useSizeMapping(props, 'btn') // props.size = 'sm' → sizeClass.value = 'btn-sm' // For badges const { sizeClass: badgeSize } = useSizeMapping(props, 'badge') // props.size = 'lg' → badgeSize.value = 'badge-lg' // In template const classes = computed(() => ['btn', sizeClass.value].filter(Boolean).join(' ')) ``` -------------------------------- ### ToastProps Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/types.md Props for configuring the Toast container. ```APIDOC ## ToastProps ### Description Props for configuring the Toast container. ### Interface ```typescript export interface ToastProps { horizontalPosition?: ToastHorizontalPosition verticalPosition?: ToastVerticalPosition } ``` ``` -------------------------------- ### Add Cornet UI as a Local File Dependency Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/README.md Use this configuration in your package.json when integrating Cornet UI via embedded/source mode using a local file path. This requires a compatible bundler setup like Vite with the Vue plugin. ```json { "dependencies": { "cornet-ui": "file:lib" } } ``` -------------------------------- ### DuSkeleton Component Usage Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md Shows how to use the DuSkeleton component for placeholder content, including different styling and animation options. Ensure 'cornet-ui' is imported. ```vue ``` -------------------------------- ### Map Variant Prop to DaisyUI Class Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/composables-and-utilities.md Use `useVariantMapping` to convert a variant prop into a DaisyUI semantic color CSS class modifier. Pass the component's props and a class prefix (e.g., 'btn'). Example shows mapping 'primary' to 'btn-primary'. ```typescript import { useVariantMapping, type Variant } from 'cornet-ui' import { computed } from 'vue' const props = defineProps<{ variant: Variant }>() // For buttons const { colorClass } = useVariantMapping(props, 'btn') // props.variant = 'primary' → colorClass.value = 'btn-primary' // For alerts const { colorClass: alertColor } = useVariantMapping(props, 'alert') // props.variant = 'error' → alertColor.value = 'alert-error' // In template const classes = computed(() => ['btn', colorClass.value].filter(Boolean).join(' ')) ``` -------------------------------- ### DuSkeleton Source: https://github.com/hub-isima/daisyui-vue-kit/blob/master/_autodocs/api-reference/components-feedback.md A placeholder skeleton component used to indicate loading states, allowing for CSS-based shaping and optional pulse animation. ```APIDOC ## DuSkeleton ### Description Placeholder skeleton for loading states. Use CSS classes to shape. ### Props #### `variant` (Variant) - Optional - Default: `'default'` Background color variant. #### `animate` (boolean) - Optional - Default: `true` Enable pulse animation. ### Usage Example ```vue ``` ```