### Install Konturio UI Packages Source: https://context7.com/konturio/ui/llms.txt Installs the necessary Konturio UI packages, including the core UI kit, default icons, default theme, and floating services, along with `clsx` and `react`. ```bash npm install @konturio/ui-kit @konturio/default-icons @konturio/default-theme @konturio/floating clsx react ``` -------------------------------- ### Modal Component Examples in React Source: https://context7.com/konturio/ui/llms.txt Illustrates the usage of the Modal component, showcasing basic modal implementation, handling backdrop clicks and ESC key presses for dismissal, and customizing the z-index. This example uses React and the @konturio/ui-kit library. ```tsx import { Modal } from '@konturio/ui-kit'; import { useState } from 'react'; function ModalExamples() { const [isOpen, setIsOpen] = useState(false); const [confirmOpen, setConfirmOpen] = useState(false); const handleCancel = (reason: 'esc' | 'click_outside') => { console.log('Modal closed by:', reason); setIsOpen(false); }; return (
{/* Basic modal */} {isOpen && (

Modal Title

Modal content goes here.

)} {/* Modal with custom z-index */} {confirmOpen && ( setConfirmOpen(false)} zIndex="1000" >

Confirm Action

Are you sure you want to proceed?

)}
); } ``` -------------------------------- ### Release Packages with Lerna Source: https://github.com/konturio/ui/blob/v5/README.md This command initiates the release process for packages managed by Lerna. It handles version bumping, changelog generation, and publishing to a package registry. Ensure you are on the main branch and have pushed your changes before running this. ```sh npm run release ``` -------------------------------- ### Panel Component Examples in React Source: https://context7.com/konturio/ui/llms.txt Demonstrates various configurations of the Panel component, including basic collapsible panels, panels with header icons, custom controls, height constraints, and modal display modes. It utilizes React and the @konturio/ui-kit library. ```tsx import { Panel, PanelIcon } from '@konturio/ui-kit'; import { useState } from 'react'; import { InfoIcon, CloseIcon } from '@konturio/default-icons'; function PanelExamples() { const [isOpen, setIsOpen] = useState(true); const [showModal, setShowModal] = useState(false); return (
{/* Basic collapsible panel */} setIsOpen(!isOpen)} >

Panel content goes here. This panel can be collapsed.

{/* Panel with header icon */} } isOpen={true} >

Panel with an icon in the header.

{/* Panel with custom controls */} , onClick: () => console.log('Close clicked'), } ]} >

Panel with custom header controls.

{/* Panel with height constraints */}

Content with constrained height and vertical resize.

More content...

Even more content...

{/* Panel displayed in modal */} setShowModal(false) }} >

This panel is displayed in a modal overlay.

); } ``` -------------------------------- ### Tooltip Component Examples (React) Source: https://context7.com/konturio/ui/llms.txt Illustrates the use of the Tooltip component from the '@konturio/floating' package. It covers simple, compound, and programmatically controlled tooltips with various placement and content options. Includes `SimpleTooltip`, `Tooltip`, `TooltipTrigger`, `TooltipContent`, `FloatingProvider`, and `TooltipService`. ```tsx import { Tooltip, TooltipTrigger, TooltipContent, SimpleTooltip, FloatingProvider } from '@konturio/floating'; function TooltipExamples() { return (
{/* Simple tooltip (all-in-one) */} {/* Compound tooltip with more control */}
Rich Content

Tooltips can contain any React content.

{/* Tooltip with different placements */} Info icon Aligned to the right, starting at top {/* Bigger tooltip variant */}
); } ``` ```tsx // Tooltip Service for programmatic tooltips import { TooltipService } from '@konturio/floating'; function TooltipServiceExample() { const tooltipService = new TooltipService(); return ( ); } function MapTooltipConsumer() { const { useTooltip } = require('@konturio/floating'); const tooltip = useTooltip({ placement: 'top' }); const handleMouseMove = (e: React.MouseEvent) => { tooltip.show({ x: e.clientX, y: e.clientY }, 'Tooltip at cursor position'); }; const handleMouseLeave = () => { tooltip.close(); }; return (
Move mouse here for position-based tooltip
); } ``` -------------------------------- ### Textarea Component Examples in React Source: https://context7.com/konturio/ui/llms.txt Demonstrates the usage of the Textarea component from '@konturio/ui-kit'. Supports resizable dimensions, animated placeholders, and error states. It takes value, onChange, renderLabel, placeholder, and error props for configuration. ```tsx import { Textarea } from '@konturio/ui-kit'; import { useState } from 'react'; function TextareaExamples() { const [description, setDescription] = useState(''); return (
{/* Basic textarea */}