@dmitriikapustin/ui 0.3.7 → 0.4.1

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/dist/index.d.cts CHANGED
@@ -239,6 +239,10 @@ declare const IconlyEyeOff: ({ size, color, className }: IconProps) => react_jsx
239
239
  declare const IconlyClose: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
240
240
  declare const IconlyMenu: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
241
241
  declare const IconlyShield: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
242
+ declare const IconlyCategory: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
243
+ declare const IconlySetting: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
244
+ declare const IconlyFolder: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
245
+ declare const IconlyLink: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
242
246
  declare const IconlySmile: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
243
247
  declare const IconlyAttach: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
244
248
  declare const IconlyInfo: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
@@ -252,7 +256,6 @@ declare const IconlyInfoCircle: ({ size, color, className }: IconProps) => react
252
256
  declare const IconlySuccess: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
253
257
  declare const IconlyWarning: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
254
258
  declare const IconlyError: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
255
- declare const IconlyLink: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
256
259
 
257
260
  type CardActionVariant = 'primary' | 'ghost' | 'secondary' | 'outline';
258
261
  interface CardAction {
@@ -474,6 +477,40 @@ interface DropdownMenuProps {
474
477
  }
475
478
  declare function DropdownMenu({ trigger, items, align, className, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
476
479
 
480
+ interface SegmentedControlOption<T extends string> {
481
+ value: T;
482
+ label: ReactNode;
483
+ /** Опциональное disabled-состояние для отдельной опции. */
484
+ disabled?: boolean;
485
+ }
486
+ interface SegmentedControlProps<T extends string> {
487
+ /** Список опций. Минимум 2. */
488
+ options: ReadonlyArray<SegmentedControlOption<T>>;
489
+ /** Текущее активное значение. */
490
+ value: T;
491
+ /** Callback при смене значения. */
492
+ onChange: (next: T) => void;
493
+ /** Размер контрола. `md` (default) — 32px высота, `sm` — 28px (для inline в Header). */
494
+ size?: 'sm' | 'md';
495
+ /** aria-label для role=group container. Например `"Language"`, `"Theme"`. */
496
+ ariaLabel: string;
497
+ className?: string;
498
+ }
499
+ /**
500
+ * Generic segmented toggle — pill-контейнер с N сегментами, активный с фоном.
501
+ * Useс-кейсы: language picker, theme picker, view-mode toggle, period selector.
502
+ *
503
+ * ```tsx
504
+ * <SegmentedControl
505
+ * options={[{ value: 'ru', label: 'RU' }, { value: 'en', label: 'EN' }]}
506
+ * value={locale}
507
+ * onChange={setLocale}
508
+ * ariaLabel="Language"
509
+ * />
510
+ * ```
511
+ */
512
+ declare function SegmentedControl<T extends string>({ options, value, onChange, size, ariaLabel, className, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
513
+
477
514
  interface NavItem {
478
515
  label: string;
479
516
  href: string;
@@ -739,6 +776,30 @@ interface ComparisonTableProps {
739
776
  }
740
777
  declare function ComparisonTable({ columns, rows, className }: ComparisonTableProps): react_jsx_runtime.JSX.Element;
741
778
 
779
+ interface BottomSheetProps {
780
+ /** Контролируемое состояние. Если undefined — uncontrolled (через `defaultOpen` + internal state). */
781
+ open?: boolean;
782
+ /** Callback при смене состояния. Вызывается и в controlled, и в uncontrolled режиме. */
783
+ onOpenChange?: (open: boolean) => void;
784
+ /** Начальное состояние в uncontrolled-режиме. Default `false`. */
785
+ defaultOpen?: boolean;
786
+ /** Порог свайпа вниз для закрытия (px). Default 80. */
787
+ swipeCloseThreshold?: number;
788
+ children: ReactNode;
789
+ className?: string;
790
+ }
791
+ interface BottomSheetPartProps {
792
+ children?: ReactNode;
793
+ className?: string;
794
+ }
795
+ declare function BottomSheet({ open: controlledOpen, onOpenChange, defaultOpen, swipeCloseThreshold, children, className, }: BottomSheetProps): react_jsx_runtime.JSX.Element;
796
+ declare namespace BottomSheet {
797
+ var Bar: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
798
+ var Panel: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
799
+ var Handle: ({ className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
800
+ var Trigger: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
801
+ }
802
+
742
803
  interface PromoBentoItemProps {
743
804
  pill?: {
744
805
  icon?: ReactNode;
@@ -1103,4 +1164,4 @@ interface LandingLayoutProps {
1103
1164
  }
1104
1165
  declare function LandingLayout({ mode, nav, footer, children, className, }: LandingLayoutProps): react_jsx_runtime.JSX.Element;
1105
1166
 
1106
- export { Alert, AppCard, AppTopLine, ArticleBarChart, type ArticleBarChartProps, ArticleBody, type ArticleBodyProps, ArticleChatBlock, type ArticleChatBlockProps, ArticleFigure, type ArticleFigureProps, ArticleFooter, type ArticleFooterProps, ArticleHeading, type ArticleHeadingProps, ArticleHero, type ArticleHeroProps, ArticleLayout, type ArticleLayoutProps, ArticleLineChart, type ArticleLineChartProps, ArticleLinkButton, type ArticleLinkButtonProps, ArticleList, type ArticleListProps, ArticleNarrow, ArticleNote, type ArticleNoteProps, ArticleScatterChart, type ArticleScatterChartProps, ArticleTable, type ArticleTableColumn, type ArticleTableProps, type ArticleTableRow, ArticleWide, Avatar, Badge, BentoGrid, Breadcrumbs, Button, CTASection, Card, type ChartSeries, ChatInput, ChatMessage, Checkbox, CodeInput, ComparisonTable, Divider, DropdownMenu, EmptyState, FAQSection, FeatureGrid, Footer, FormField, Gallery, Header, HeroSection, IconBadge, IconButton, IconWithText, IconlyActivity, IconlyAttach, IconlyBook, IconlyCheck, IconlyChevronDown, IconlyChevronLeft, IconlyChevronRight, IconlyClock, IconlyClose, IconlyError, IconlyEye, IconlyEyeOff, IconlyHeart, IconlyInfo, IconlyInfoCircle, IconlyLink, IconlyLock, IconlyMail, IconlyMenu, IconlyMoon, IconlyQuote, IconlyRoadmap, IconlySandbox, IconlySearch, IconlySend, IconlyShield, IconlySmile, IconlyStar, IconlySuccess, IconlySun, IconlyWarning, Input, LandingLayout, Logo, LogoCloud, MenuItem, Modal, Pagination, PasswordInput, PricingCard, type PricingFeature, ProfileNav, PromoActionCards, PromoBento, PromoDevicesCTA, PromoHero, PromoHeroForm, PromoPricing, PromoShowcase, PromoSplit, PromoTestimonials, PromoTrustGrid, Radio, type ScatterPoint, SearchBar, Select, Sidebar, type SidebarItem, Skeleton, Spinner, StampCard, Stat, StatBadge, StatsBar, Link as StyledLink, Tabs, Tag, TestimonialCard, Textarea, TicketButton, Toast, Toggle, Tooltip, TopPromo };
1167
+ export { Alert, AppCard, AppTopLine, ArticleBarChart, type ArticleBarChartProps, ArticleBody, type ArticleBodyProps, ArticleChatBlock, type ArticleChatBlockProps, ArticleFigure, type ArticleFigureProps, ArticleFooter, type ArticleFooterProps, ArticleHeading, type ArticleHeadingProps, ArticleHero, type ArticleHeroProps, ArticleLayout, type ArticleLayoutProps, ArticleLineChart, type ArticleLineChartProps, ArticleLinkButton, type ArticleLinkButtonProps, ArticleList, type ArticleListProps, ArticleNarrow, ArticleNote, type ArticleNoteProps, ArticleScatterChart, type ArticleScatterChartProps, ArticleTable, type ArticleTableColumn, type ArticleTableProps, type ArticleTableRow, ArticleWide, Avatar, Badge, BentoGrid, BottomSheet, Breadcrumbs, Button, CTASection, Card, type ChartSeries, ChatInput, ChatMessage, Checkbox, CodeInput, ComparisonTable, Divider, DropdownMenu, EmptyState, FAQSection, FeatureGrid, Footer, FormField, Gallery, Header, HeroSection, IconBadge, IconButton, IconWithText, IconlyActivity, IconlyAttach, IconlyBook, IconlyCategory, IconlyCheck, IconlyChevronDown, IconlyChevronLeft, IconlyChevronRight, IconlyClock, IconlyClose, IconlyError, IconlyEye, IconlyEyeOff, IconlyFolder, IconlyHeart, IconlyInfo, IconlyInfoCircle, IconlyLink, IconlyLock, IconlyMail, IconlyMenu, IconlyMoon, IconlyQuote, IconlyRoadmap, IconlySandbox, IconlySearch, IconlySend, IconlySetting, IconlyShield, IconlySmile, IconlyStar, IconlySuccess, IconlySun, IconlyWarning, Input, LandingLayout, Logo, LogoCloud, MenuItem, Modal, Pagination, PasswordInput, PricingCard, type PricingFeature, ProfileNav, PromoActionCards, PromoBento, PromoDevicesCTA, PromoHero, PromoHeroForm, PromoPricing, PromoShowcase, PromoSplit, PromoTestimonials, PromoTrustGrid, Radio, type ScatterPoint, SearchBar, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, Sidebar, type SidebarItem, Skeleton, Spinner, StampCard, Stat, StatBadge, StatsBar, Link as StyledLink, Tabs, Tag, TestimonialCard, Textarea, TicketButton, Toast, Toggle, Tooltip, TopPromo };
package/dist/index.d.ts CHANGED
@@ -239,6 +239,10 @@ declare const IconlyEyeOff: ({ size, color, className }: IconProps) => react_jsx
239
239
  declare const IconlyClose: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
240
240
  declare const IconlyMenu: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
241
241
  declare const IconlyShield: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
242
+ declare const IconlyCategory: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
243
+ declare const IconlySetting: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
244
+ declare const IconlyFolder: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
245
+ declare const IconlyLink: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
242
246
  declare const IconlySmile: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
243
247
  declare const IconlyAttach: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
244
248
  declare const IconlyInfo: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
@@ -252,7 +256,6 @@ declare const IconlyInfoCircle: ({ size, color, className }: IconProps) => react
252
256
  declare const IconlySuccess: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
253
257
  declare const IconlyWarning: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
254
258
  declare const IconlyError: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
255
- declare const IconlyLink: ({ size, color, className }: IconProps) => react_jsx_runtime.JSX.Element;
256
259
 
257
260
  type CardActionVariant = 'primary' | 'ghost' | 'secondary' | 'outline';
258
261
  interface CardAction {
@@ -474,6 +477,40 @@ interface DropdownMenuProps {
474
477
  }
475
478
  declare function DropdownMenu({ trigger, items, align, className, }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
476
479
 
480
+ interface SegmentedControlOption<T extends string> {
481
+ value: T;
482
+ label: ReactNode;
483
+ /** Опциональное disabled-состояние для отдельной опции. */
484
+ disabled?: boolean;
485
+ }
486
+ interface SegmentedControlProps<T extends string> {
487
+ /** Список опций. Минимум 2. */
488
+ options: ReadonlyArray<SegmentedControlOption<T>>;
489
+ /** Текущее активное значение. */
490
+ value: T;
491
+ /** Callback при смене значения. */
492
+ onChange: (next: T) => void;
493
+ /** Размер контрола. `md` (default) — 32px высота, `sm` — 28px (для inline в Header). */
494
+ size?: 'sm' | 'md';
495
+ /** aria-label для role=group container. Например `"Language"`, `"Theme"`. */
496
+ ariaLabel: string;
497
+ className?: string;
498
+ }
499
+ /**
500
+ * Generic segmented toggle — pill-контейнер с N сегментами, активный с фоном.
501
+ * Useс-кейсы: language picker, theme picker, view-mode toggle, period selector.
502
+ *
503
+ * ```tsx
504
+ * <SegmentedControl
505
+ * options={[{ value: 'ru', label: 'RU' }, { value: 'en', label: 'EN' }]}
506
+ * value={locale}
507
+ * onChange={setLocale}
508
+ * ariaLabel="Language"
509
+ * />
510
+ * ```
511
+ */
512
+ declare function SegmentedControl<T extends string>({ options, value, onChange, size, ariaLabel, className, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
513
+
477
514
  interface NavItem {
478
515
  label: string;
479
516
  href: string;
@@ -739,6 +776,30 @@ interface ComparisonTableProps {
739
776
  }
740
777
  declare function ComparisonTable({ columns, rows, className }: ComparisonTableProps): react_jsx_runtime.JSX.Element;
741
778
 
779
+ interface BottomSheetProps {
780
+ /** Контролируемое состояние. Если undefined — uncontrolled (через `defaultOpen` + internal state). */
781
+ open?: boolean;
782
+ /** Callback при смене состояния. Вызывается и в controlled, и в uncontrolled режиме. */
783
+ onOpenChange?: (open: boolean) => void;
784
+ /** Начальное состояние в uncontrolled-режиме. Default `false`. */
785
+ defaultOpen?: boolean;
786
+ /** Порог свайпа вниз для закрытия (px). Default 80. */
787
+ swipeCloseThreshold?: number;
788
+ children: ReactNode;
789
+ className?: string;
790
+ }
791
+ interface BottomSheetPartProps {
792
+ children?: ReactNode;
793
+ className?: string;
794
+ }
795
+ declare function BottomSheet({ open: controlledOpen, onOpenChange, defaultOpen, swipeCloseThreshold, children, className, }: BottomSheetProps): react_jsx_runtime.JSX.Element;
796
+ declare namespace BottomSheet {
797
+ var Bar: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
798
+ var Panel: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
799
+ var Handle: ({ className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
800
+ var Trigger: ({ children, className }: BottomSheetPartProps) => react_jsx_runtime.JSX.Element;
801
+ }
802
+
742
803
  interface PromoBentoItemProps {
743
804
  pill?: {
744
805
  icon?: ReactNode;
@@ -1103,4 +1164,4 @@ interface LandingLayoutProps {
1103
1164
  }
1104
1165
  declare function LandingLayout({ mode, nav, footer, children, className, }: LandingLayoutProps): react_jsx_runtime.JSX.Element;
1105
1166
 
1106
- export { Alert, AppCard, AppTopLine, ArticleBarChart, type ArticleBarChartProps, ArticleBody, type ArticleBodyProps, ArticleChatBlock, type ArticleChatBlockProps, ArticleFigure, type ArticleFigureProps, ArticleFooter, type ArticleFooterProps, ArticleHeading, type ArticleHeadingProps, ArticleHero, type ArticleHeroProps, ArticleLayout, type ArticleLayoutProps, ArticleLineChart, type ArticleLineChartProps, ArticleLinkButton, type ArticleLinkButtonProps, ArticleList, type ArticleListProps, ArticleNarrow, ArticleNote, type ArticleNoteProps, ArticleScatterChart, type ArticleScatterChartProps, ArticleTable, type ArticleTableColumn, type ArticleTableProps, type ArticleTableRow, ArticleWide, Avatar, Badge, BentoGrid, Breadcrumbs, Button, CTASection, Card, type ChartSeries, ChatInput, ChatMessage, Checkbox, CodeInput, ComparisonTable, Divider, DropdownMenu, EmptyState, FAQSection, FeatureGrid, Footer, FormField, Gallery, Header, HeroSection, IconBadge, IconButton, IconWithText, IconlyActivity, IconlyAttach, IconlyBook, IconlyCheck, IconlyChevronDown, IconlyChevronLeft, IconlyChevronRight, IconlyClock, IconlyClose, IconlyError, IconlyEye, IconlyEyeOff, IconlyHeart, IconlyInfo, IconlyInfoCircle, IconlyLink, IconlyLock, IconlyMail, IconlyMenu, IconlyMoon, IconlyQuote, IconlyRoadmap, IconlySandbox, IconlySearch, IconlySend, IconlyShield, IconlySmile, IconlyStar, IconlySuccess, IconlySun, IconlyWarning, Input, LandingLayout, Logo, LogoCloud, MenuItem, Modal, Pagination, PasswordInput, PricingCard, type PricingFeature, ProfileNav, PromoActionCards, PromoBento, PromoDevicesCTA, PromoHero, PromoHeroForm, PromoPricing, PromoShowcase, PromoSplit, PromoTestimonials, PromoTrustGrid, Radio, type ScatterPoint, SearchBar, Select, Sidebar, type SidebarItem, Skeleton, Spinner, StampCard, Stat, StatBadge, StatsBar, Link as StyledLink, Tabs, Tag, TestimonialCard, Textarea, TicketButton, Toast, Toggle, Tooltip, TopPromo };
1167
+ export { Alert, AppCard, AppTopLine, ArticleBarChart, type ArticleBarChartProps, ArticleBody, type ArticleBodyProps, ArticleChatBlock, type ArticleChatBlockProps, ArticleFigure, type ArticleFigureProps, ArticleFooter, type ArticleFooterProps, ArticleHeading, type ArticleHeadingProps, ArticleHero, type ArticleHeroProps, ArticleLayout, type ArticleLayoutProps, ArticleLineChart, type ArticleLineChartProps, ArticleLinkButton, type ArticleLinkButtonProps, ArticleList, type ArticleListProps, ArticleNarrow, ArticleNote, type ArticleNoteProps, ArticleScatterChart, type ArticleScatterChartProps, ArticleTable, type ArticleTableColumn, type ArticleTableProps, type ArticleTableRow, ArticleWide, Avatar, Badge, BentoGrid, BottomSheet, Breadcrumbs, Button, CTASection, Card, type ChartSeries, ChatInput, ChatMessage, Checkbox, CodeInput, ComparisonTable, Divider, DropdownMenu, EmptyState, FAQSection, FeatureGrid, Footer, FormField, Gallery, Header, HeroSection, IconBadge, IconButton, IconWithText, IconlyActivity, IconlyAttach, IconlyBook, IconlyCategory, IconlyCheck, IconlyChevronDown, IconlyChevronLeft, IconlyChevronRight, IconlyClock, IconlyClose, IconlyError, IconlyEye, IconlyEyeOff, IconlyFolder, IconlyHeart, IconlyInfo, IconlyInfoCircle, IconlyLink, IconlyLock, IconlyMail, IconlyMenu, IconlyMoon, IconlyQuote, IconlyRoadmap, IconlySandbox, IconlySearch, IconlySend, IconlySetting, IconlyShield, IconlySmile, IconlyStar, IconlySuccess, IconlySun, IconlyWarning, Input, LandingLayout, Logo, LogoCloud, MenuItem, Modal, Pagination, PasswordInput, PricingCard, type PricingFeature, ProfileNav, PromoActionCards, PromoBento, PromoDevicesCTA, PromoHero, PromoHeroForm, PromoPricing, PromoShowcase, PromoSplit, PromoTestimonials, PromoTrustGrid, Radio, type ScatterPoint, SearchBar, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, Sidebar, type SidebarItem, Skeleton, Spinner, StampCard, Stat, StatBadge, StatsBar, Link as StyledLink, Tabs, Tag, TestimonialCard, Textarea, TicketButton, Toast, Toggle, Tooltip, TopPromo };