@oblkf/oui-react 0.0.0-stage → 0.1.0

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.
Files changed (61) hide show
  1. package/README.md +75 -2
  2. package/dist/cn.d.ts +7 -0
  3. package/dist/components/OuAccordion.d.ts +12 -0
  4. package/dist/components/OuAlert.d.ts +10 -0
  5. package/dist/components/OuAvatar.d.ts +11 -0
  6. package/dist/components/OuAvatarGroup.d.ts +5 -0
  7. package/dist/components/OuBadge.d.ts +9 -0
  8. package/dist/components/OuBanner.d.ts +5 -0
  9. package/dist/components/OuBreadcrumb.d.ts +9 -0
  10. package/dist/components/OuButton.d.ts +9 -0
  11. package/dist/components/OuButtonGroup.d.ts +5 -0
  12. package/dist/components/OuCard.d.ts +9 -0
  13. package/dist/components/OuCheckbox.d.ts +9 -0
  14. package/dist/components/OuCheckboxGroup.d.ts +13 -0
  15. package/dist/components/OuCode.d.ts +5 -0
  16. package/dist/components/OuDropdown.d.ts +8 -0
  17. package/dist/components/OuDropdownItem.d.ts +6 -0
  18. package/dist/components/OuEmptyState.d.ts +8 -0
  19. package/dist/components/OuInput.d.ts +10 -0
  20. package/dist/components/OuKbd.d.ts +5 -0
  21. package/dist/components/OuLabel.d.ts +6 -0
  22. package/dist/components/OuLink.d.ts +10 -0
  23. package/dist/components/OuList.d.ts +5 -0
  24. package/dist/components/OuListItem.d.ts +10 -0
  25. package/dist/components/OuMeter.d.ts +9 -0
  26. package/dist/components/OuModal.d.ts +11 -0
  27. package/dist/components/OuNumberInput.d.ts +10 -0
  28. package/dist/components/OuPagination.d.ts +7 -0
  29. package/dist/components/OuPopover.d.ts +8 -0
  30. package/dist/components/OuProgress.d.ts +9 -0
  31. package/dist/components/OuProgressRing.d.ts +12 -0
  32. package/dist/components/OuRadioGroup.d.ts +14 -0
  33. package/dist/components/OuRating.d.ts +8 -0
  34. package/dist/components/OuSegmented.d.ts +12 -0
  35. package/dist/components/OuSelect.d.ts +6 -0
  36. package/dist/components/OuSeparator.d.ts +5 -0
  37. package/dist/components/OuSheet.d.ts +14 -0
  38. package/dist/components/OuSkeleton.d.ts +4 -0
  39. package/dist/components/OuSlider.d.ts +10 -0
  40. package/dist/components/OuSpinner.d.ts +8 -0
  41. package/dist/components/OuStat.d.ts +10 -0
  42. package/dist/components/OuSteps.d.ts +10 -0
  43. package/dist/components/OuSwitch.d.ts +9 -0
  44. package/dist/components/OuTable.d.ts +13 -0
  45. package/dist/components/OuTabs.d.ts +13 -0
  46. package/dist/components/OuTag.d.ts +7 -0
  47. package/dist/components/OuTagInput.d.ts +7 -0
  48. package/dist/components/OuTextarea.d.ts +5 -0
  49. package/dist/components/OuTimeline.d.ts +13 -0
  50. package/dist/components/OuToast.d.ts +10 -0
  51. package/dist/components/OuToaster.d.ts +6 -0
  52. package/dist/components/OuToggle.d.ts +8 -0
  53. package/dist/components/OuTooltip.d.ts +10 -0
  54. package/dist/components/button-variants.d.ts +12 -0
  55. package/dist/index.d.ts +54 -0
  56. package/dist/index.js +1726 -0
  57. package/dist/styles.css +2 -0
  58. package/dist/useToast.d.ts +30 -0
  59. package/dist/utils/cn.d.ts +7 -0
  60. package/package.json +50 -3
  61. package/tokens.css +136 -0
package/README.md CHANGED
@@ -1,3 +1,76 @@
1
- # Temporary Holding Version
1
+ # @oblkf/oui-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ОБЛАКОФ UI для **React** — библиотека компонентов на дизайн-токенах (Tailwind v4).
4
+ Та же визуальная система, что и в [`@oblkf/oui-vue`](../../OUI), один набор токенов.
5
+
6
+ ## Установка
7
+
8
+ Два способа — Tailwind в проекте **не обязателен**. Peer: `react`, `react-dom` (>=18).
9
+
10
+ ### Вариант 1 — без Tailwind (проще)
11
+
12
+ ```bash
13
+ pnpm add @oblkf/oui-react
14
+ ```
15
+
16
+ ```tsx
17
+ // один раз в точке входа приложения (main.tsx):
18
+ import '@oblkf/oui-react/styles.css'
19
+ ```
20
+
21
+ Готово — весь CSS (включая токены тем) приходит из `styles.css` (собран заранее, без
22
+ глобального reset-а, только `box-sizing`). Tailwind настраивать не нужно.
23
+
24
+ ### Вариант 2 — с Tailwind v4 (итоговый файл стилей меньше)
25
+
26
+ ```bash
27
+ pnpm add @oblkf/oui-react @oblkf/oui-tokens
28
+ ```
29
+
30
+ ```css
31
+ @import 'tailwindcss';
32
+ @import '@oblkf/oui-tokens';
33
+ @source '../node_modules/@oblkf/oui-react/dist';
34
+ ```
35
+
36
+ ## Использование
37
+
38
+ ```tsx
39
+ import { OuButton, OuModal, ouToast } from '@oblkf/oui-react'
40
+
41
+ function Example() {
42
+ const [open, setOpen] = useState(false)
43
+ return (
44
+ <>
45
+ <OuButton variant="brand" onClick={() => setOpen(true)}>
46
+ Открыть
47
+ </OuButton>
48
+ <OuModal open={open} onOpenChange={setOpen} title="Привет">
49
+ Содержимое модалки
50
+ </OuModal>
51
+ </>
52
+ )
53
+ }
54
+ ```
55
+
56
+ Тосты — компонент `<OuToaster />` один раз в корне приложения + программный вызов `ouToast(...)`:
57
+
58
+ ```tsx
59
+ import { OuToaster, ouToast } from '@oblkf/oui-react'
60
+ // в корне: <OuToaster position="bottom-right" />
61
+ ouToast.success('Сохранено', { description: 'Изменения применены' })
62
+ ```
63
+
64
+ ## Конвенции API (отличия от Vue)
65
+
66
+ - Контролируемые поля: `checked` + `onCheckedChange` (Checkbox/Switch), `value` + `onValueChange`
67
+ (Slider/Rating/Segmented/RadioGroup/NumberInput/TagInput), `open` + `onOpenChange` (Modal/Sheet).
68
+ - Слоты Vue → пропсы `ReactNode`: `leading`, `trailing`, `header`, `footer`, `action`, `icon`,
69
+ и `children` для основного содержимого.
70
+ - Тёмная тема — класс `.dark` на `<html>`.
71
+
72
+ ## Сборка
73
+
74
+ ```bash
75
+ pnpm --filter @oblkf/oui-react build # → dist/ (ESM + .d.ts)
76
+ ```
package/dist/cn.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /**
3
+ * Объединяет классы Tailwind, корректно разрешая конфликты утилит
4
+ * (например, переданный `p-6` перебьёт базовый `p-4`). Используется всеми
5
+ * компонентами OUI для слияния базовых классов с `class` из props.
6
+ */
7
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,12 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuAccordionItem {
3
+ value: string;
4
+ title: string;
5
+ content: ReactNode;
6
+ }
7
+ export interface OuAccordionProps {
8
+ items: OuAccordionItem[];
9
+ multiple?: boolean;
10
+ className?: string;
11
+ }
12
+ export declare function OuAccordion({ items, multiple, className }: OuAccordionProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ type Variant = 'info' | 'success' | 'warning' | 'destructive';
3
+ export interface OuAlertProps {
4
+ variant?: Variant;
5
+ title?: string;
6
+ className?: string;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuAlert({ variant, title, className, children }: OuAlertProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ type Size = 'sm' | 'md' | 'lg' | 'xl';
3
+ type Status = 'online' | 'offline' | 'away';
4
+ export interface OuAvatarProps extends HTMLAttributes<HTMLSpanElement> {
5
+ src?: string;
6
+ name?: string;
7
+ size?: Size;
8
+ status?: Status;
9
+ }
10
+ export declare function OuAvatar({ src, name, size, status, className, ...rest }: OuAvatarProps): import("react").JSX.Element;
11
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuAvatarGroupProps extends HTMLAttributes<HTMLDivElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuAvatarGroup({ className, children, ...rest }: OuAvatarGroupProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ type Variant = 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'outline';
3
+ export interface OuBadgeProps extends HTMLAttributes<HTMLSpanElement> {
4
+ variant?: Variant;
5
+ dot?: boolean;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function OuBadge({ variant, dot, className, children, ...rest }: OuBadgeProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuBannerProps extends HTMLAttributes<HTMLDivElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuBanner({ className, children, ...rest }: OuBannerProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export interface OuBreadcrumbItem {
2
+ label: string;
3
+ href?: string;
4
+ }
5
+ export interface OuBreadcrumbProps {
6
+ items: OuBreadcrumbItem[];
7
+ className?: string;
8
+ }
9
+ export declare function OuBreadcrumb({ items, className }: OuBreadcrumbProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from 'react';
2
+ import { type OuButtonVariant, type OuButtonSize } from './button-variants';
3
+ export interface OuButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
4
+ variant?: OuButtonVariant;
5
+ size?: OuButtonSize;
6
+ loading?: boolean;
7
+ children?: ReactNode;
8
+ }
9
+ export declare const OuButton: import("react").ForwardRefExoticComponent<OuButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuButtonGroup({ className, children, ...rest }: OuButtonGroupProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuCardProps extends HTMLAttributes<HTMLDivElement> {
3
+ hover?: boolean;
4
+ padded?: boolean;
5
+ header?: ReactNode;
6
+ footer?: ReactNode;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuCard({ hover, padded, header, footer, className, children, ...rest }: OuCardProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuCheckboxProps {
3
+ checked?: boolean;
4
+ onCheckedChange?: (checked: boolean) => void;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuCheckbox({ checked, onCheckedChange, disabled, className, children, }: OuCheckboxProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ interface Option {
2
+ label: string;
3
+ value: string | number;
4
+ disabled?: boolean;
5
+ }
6
+ export interface OuCheckboxGroupProps {
7
+ options: Option[];
8
+ value: (string | number)[];
9
+ onValueChange?: (v: (string | number)[]) => void;
10
+ className?: string;
11
+ }
12
+ export declare function OuCheckboxGroup({ options, value, onValueChange, className, }: OuCheckboxGroupProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuCodeProps extends HTMLAttributes<HTMLElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuCode({ className, children, ...rest }: OuCodeProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuDropdownProps {
3
+ trigger: ReactNode;
4
+ align?: 'start' | 'end';
5
+ className?: string;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function OuDropdown({ trigger, align, className, children }: OuDropdownProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export interface OuDropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ destructive?: boolean;
4
+ children?: ReactNode;
5
+ }
6
+ export declare function OuDropdownItem({ destructive, className, children, ...rest }: OuDropdownItemProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuEmptyStateProps extends HTMLAttributes<HTMLDivElement> {
3
+ title: string;
4
+ description?: string;
5
+ icon?: ReactNode;
6
+ action?: ReactNode;
7
+ }
8
+ export declare function OuEmptyState({ title, description, icon, action, className, ...rest }: OuEmptyStateProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ type Size = 'sm' | 'md' | 'lg';
3
+ export interface OuInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
4
+ invalid?: boolean;
5
+ size?: Size;
6
+ leading?: ReactNode;
7
+ trailing?: ReactNode;
8
+ }
9
+ export declare function OuInput({ invalid, size, leading, trailing, className, ...rest }: OuInputProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuKbdProps extends HTMLAttributes<HTMLElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuKbd({ className, children, ...rest }: OuKbdProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { LabelHTMLAttributes, ReactNode } from 'react';
2
+ export interface OuLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
3
+ htmlFor?: string;
4
+ children?: ReactNode;
5
+ }
6
+ export declare function OuLabel({ className, children, ...rest }: OuLabelProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { AnchorHTMLAttributes, ReactNode } from 'react';
2
+ type Variant = 'default' | 'muted' | 'underline';
3
+ export interface OuLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
4
+ href?: string;
5
+ variant?: Variant;
6
+ external?: boolean;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuLink({ href, variant, external, className, children, ...rest }: OuLinkProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuListProps extends HTMLAttributes<HTMLUListElement> {
3
+ children?: ReactNode;
4
+ }
5
+ export declare function OuList({ className, children, ...rest }: OuListProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { LiHTMLAttributes, ReactNode } from 'react';
2
+ export interface OuListItemProps extends LiHTMLAttributes<HTMLLIElement> {
3
+ title?: string;
4
+ subtitle?: string;
5
+ clickable?: boolean;
6
+ leading?: ReactNode;
7
+ trailing?: ReactNode;
8
+ children?: ReactNode;
9
+ }
10
+ export declare function OuListItem({ title, subtitle, clickable, leading, trailing, className, children, ...rest }: OuListItemProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface OuMeterProps extends HTMLAttributes<HTMLDivElement> {
3
+ value: number;
4
+ max: number;
5
+ unit?: string;
6
+ label?: string;
7
+ showValue?: boolean;
8
+ }
9
+ export declare function OuMeter({ value, max, unit, label, showValue, className, ...rest }: OuMeterProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuModalProps {
3
+ open: boolean;
4
+ onOpenChange: (open: boolean) => void;
5
+ title?: string;
6
+ header?: ReactNode;
7
+ footer?: ReactNode;
8
+ className?: string;
9
+ children?: ReactNode;
10
+ }
11
+ export declare function OuModal({ open, onOpenChange, title, header, footer, className, children, }: OuModalProps): import("react").ReactPortal | null;
@@ -0,0 +1,10 @@
1
+ export interface OuNumberInputProps {
2
+ value?: number;
3
+ onValueChange?: (v: number) => void;
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare function OuNumberInput({ value, onValueChange, min, max, step, disabled, className, }: OuNumberInputProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface OuPaginationProps {
2
+ total: number;
3
+ page?: number;
4
+ onPageChange?: (p: number) => void;
5
+ className?: string;
6
+ }
7
+ export declare function OuPagination({ total, page, onPageChange, className }: OuPaginationProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuPopoverProps {
3
+ trigger: ReactNode;
4
+ align?: 'start' | 'end';
5
+ className?: string;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function OuPopover({ trigger, align, className, children }: OuPopoverProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ type Variant = 'primary' | 'brand' | 'success' | 'warning' | 'destructive';
3
+ export interface OuProgressProps extends HTMLAttributes<HTMLDivElement> {
4
+ value?: number;
5
+ max?: number;
6
+ variant?: Variant;
7
+ }
8
+ export declare function OuProgress({ value, max, variant, className, ...rest }: OuProgressProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ type Variant = 'primary' | 'success' | 'warning' | 'destructive';
3
+ export interface OuProgressRingProps extends HTMLAttributes<HTMLDivElement> {
4
+ value?: number;
5
+ max?: number;
6
+ size?: number;
7
+ stroke?: number;
8
+ variant?: Variant;
9
+ showLabel?: boolean;
10
+ }
11
+ export declare function OuProgressRing({ value, max, size, stroke, variant, showLabel, className, ...rest }: OuProgressRingProps): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,14 @@
1
+ interface Option {
2
+ label: string;
3
+ value: string | number;
4
+ disabled?: boolean;
5
+ }
6
+ export interface OuRadioGroupProps {
7
+ options: Option[];
8
+ value?: string | number;
9
+ onValueChange?: (v: string | number) => void;
10
+ name?: string;
11
+ className?: string;
12
+ }
13
+ export declare function OuRadioGroup({ options, value, onValueChange, name, className, }: OuRadioGroupProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface OuRatingProps {
2
+ value?: number;
3
+ onValueChange?: (v: number) => void;
4
+ max?: number;
5
+ readonly?: boolean;
6
+ className?: string;
7
+ }
8
+ export declare function OuRating({ value, onValueChange, max, readonly, className, }: OuRatingProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ interface Option {
2
+ label: string;
3
+ value: string | number;
4
+ }
5
+ export interface OuSegmentedProps {
6
+ options: Option[];
7
+ value?: string | number;
8
+ onValueChange?: (v: string | number) => void;
9
+ className?: string;
10
+ }
11
+ export declare function OuSegmented({ options, value, onValueChange, className }: OuSegmentedProps): import("react").JSX.Element;
12
+ export {};
@@ -0,0 +1,6 @@
1
+ import { type ReactNode, type SelectHTMLAttributes } from 'react';
2
+ export interface OuSelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
3
+ invalid?: boolean;
4
+ children?: ReactNode;
5
+ }
6
+ export declare function OuSelect({ invalid, className, children, ...rest }: OuSelectProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface OuSeparatorProps extends HTMLAttributes<HTMLDivElement> {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ }
5
+ export declare function OuSeparator({ orientation, className, ...rest }: OuSeparatorProps): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { type ReactNode } from 'react';
2
+ type Side = 'left' | 'right' | 'top' | 'bottom';
3
+ export interface OuSheetProps {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ side?: Side;
7
+ title?: string;
8
+ header?: ReactNode;
9
+ footer?: ReactNode;
10
+ className?: string;
11
+ children?: ReactNode;
12
+ }
13
+ export declare function OuSheet({ open, onOpenChange, side, title, header, footer, className, children, }: OuSheetProps): import("react").ReactPortal | null;
14
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface OuSkeletonProps extends HTMLAttributes<HTMLDivElement> {
3
+ }
4
+ export declare function OuSkeleton({ className, ...rest }: OuSkeletonProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface OuSliderProps {
2
+ value?: number;
3
+ onValueChange?: (v: number) => void;
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare function OuSlider({ value, onValueChange, min, max, step, disabled, className, }: OuSliderProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { SVGAttributes } from 'react';
2
+ type Size = 'sm' | 'md' | 'lg';
3
+ export interface OuSpinnerProps extends SVGAttributes<SVGSVGElement> {
4
+ size?: Size;
5
+ label?: string;
6
+ }
7
+ export declare function OuSpinner({ size, label, className, ...rest }: OuSpinnerProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuStatProps extends HTMLAttributes<HTMLDivElement> {
3
+ label: string;
4
+ value: string | number;
5
+ hint?: string;
6
+ delta?: string;
7
+ trend?: 'up' | 'down';
8
+ icon?: ReactNode;
9
+ }
10
+ export declare function OuStat({ label, value, hint, delta, trend, icon, className, ...rest }: OuStatProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface OuStepsItem {
2
+ label: string;
3
+ description?: string;
4
+ }
5
+ export interface OuStepsProps {
6
+ steps: OuStepsItem[];
7
+ current?: number;
8
+ className?: string;
9
+ }
10
+ export declare function OuSteps({ steps, current, className }: OuStepsProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuSwitchProps {
3
+ checked?: boolean;
4
+ onCheckedChange?: (checked: boolean) => void;
5
+ disabled?: boolean;
6
+ className?: string;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuSwitch({ checked, onCheckedChange, disabled, className, children, }: OuSwitchProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface OuTableColumn {
3
+ key: string;
4
+ label: string;
5
+ align?: 'left' | 'right' | 'center';
6
+ }
7
+ export interface OuTableProps {
8
+ columns: OuTableColumn[];
9
+ rows: Record<string, unknown>[];
10
+ cells?: Record<string, (value: unknown, row: Record<string, unknown>) => ReactNode>;
11
+ className?: string;
12
+ }
13
+ export declare function OuTable({ columns, rows, cells, className }: OuTableProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface OuTabsItem {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface OuTabsProps {
7
+ tabs: OuTabsItem[];
8
+ value?: string;
9
+ onValueChange?: (v: string) => void;
10
+ panels?: Record<string, ReactNode>;
11
+ className?: string;
12
+ }
13
+ export declare function OuTabs({ tabs, value, onValueChange, panels, className }: OuTabsProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface OuTagProps extends HTMLAttributes<HTMLSpanElement> {
3
+ removable?: boolean;
4
+ onRemove?: () => void;
5
+ children?: ReactNode;
6
+ }
7
+ export declare function OuTag({ removable, onRemove, className, children, ...rest }: OuTagProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export interface OuTagInputProps {
2
+ value: string[];
3
+ onValueChange?: (v: string[]) => void;
4
+ placeholder?: string;
5
+ className?: string;
6
+ }
7
+ export declare function OuTagInput({ value, onValueChange, placeholder, className, }: OuTagInputProps): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { type TextareaHTMLAttributes } from 'react';
2
+ export interface OuTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ invalid?: boolean;
4
+ }
5
+ export declare function OuTextarea({ invalid, rows, className, ...rest }: OuTextareaProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ type OuTimelineVariant = 'default' | 'primary' | 'success' | 'warning' | 'destructive';
2
+ export interface OuTimelineItem {
3
+ title: string;
4
+ description?: string;
5
+ time?: string;
6
+ variant?: OuTimelineVariant;
7
+ }
8
+ export interface OuTimelineProps {
9
+ items: OuTimelineItem[];
10
+ className?: string;
11
+ }
12
+ export declare function OuTimeline({ items, className }: OuTimelineProps): import("react").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ type Variant = 'info' | 'success' | 'warning' | 'destructive';
2
+ export interface OuToastProps {
3
+ variant?: Variant;
4
+ title: string;
5
+ description?: string;
6
+ onClose?: () => void;
7
+ className?: string;
8
+ }
9
+ export declare function OuToast({ variant, title, description, onClose, className, }: OuToastProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ type Pos = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
2
+ export interface OuToasterProps {
3
+ position?: Pos;
4
+ }
5
+ export declare function OuToaster({ position }: OuToasterProps): import("react").ReactPortal | null;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export interface OuToggleProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ pressed?: boolean;
4
+ onPressedChange?: (pressed: boolean) => void;
5
+ disabled?: boolean;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function OuToggle({ pressed, onPressedChange, disabled, className, children, onClick, ...rest }: OuToggleProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from 'react';
2
+ type Side = 'top' | 'bottom' | 'left' | 'right';
3
+ export interface OuTooltipProps {
4
+ text: string;
5
+ side?: Side;
6
+ className?: string;
7
+ children?: ReactNode;
8
+ }
9
+ export declare function OuTooltip({ text, side, className, children }: OuTooltipProps): import("react").JSX.Element;
10
+ export {};