@kashi-ui/react 0.6.0 → 0.8.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 (48) hide show
  1. package/README.md +2 -2
  2. package/dist/Accordion.d.ts +15 -0
  3. package/dist/Accordion.js +13 -0
  4. package/dist/Alert.d.ts +11 -0
  5. package/dist/Alert.js +2 -2
  6. package/dist/Avatar.d.ts +6 -0
  7. package/dist/Avatar.js +11 -2
  8. package/dist/Badge.d.ts +9 -1
  9. package/dist/Badge.js +3 -2
  10. package/dist/Breadcrumb.d.ts +23 -0
  11. package/dist/Breadcrumb.js +32 -0
  12. package/dist/Button.d.ts +15 -4
  13. package/dist/Button.js +12 -2
  14. package/dist/Card.d.ts +17 -3
  15. package/dist/Card.js +13 -4
  16. package/dist/Checkbox.d.ts +9 -0
  17. package/dist/Checkbox.js +6 -6
  18. package/dist/DataTable.d.ts +70 -0
  19. package/dist/DataTable.js +59 -0
  20. package/dist/Dialog.d.ts +4 -2
  21. package/dist/Dialog.js +2 -2
  22. package/dist/DropdownMenu.d.ts +35 -0
  23. package/dist/DropdownMenu.js +99 -0
  24. package/dist/Field.d.ts +15 -1
  25. package/dist/Field.js +4 -2
  26. package/dist/Input.d.ts +34 -0
  27. package/dist/Input.js +57 -6
  28. package/dist/Misc.d.ts +22 -0
  29. package/dist/Misc.js +16 -0
  30. package/dist/OtpInput.d.ts +28 -0
  31. package/dist/OtpInput.js +30 -0
  32. package/dist/Pagination.d.ts +25 -0
  33. package/dist/Pagination.js +28 -0
  34. package/dist/Progress.d.ts +24 -0
  35. package/dist/Progress.js +20 -0
  36. package/dist/Skeleton.d.ts +11 -0
  37. package/dist/Skeleton.js +11 -0
  38. package/dist/Stepper.d.ts +20 -0
  39. package/dist/Stepper.js +12 -0
  40. package/dist/Tabs.d.ts +5 -1
  41. package/dist/Tabs.js +8 -9
  42. package/dist/Toast.d.ts +22 -8
  43. package/dist/Toast.js +55 -12
  44. package/dist/Tooltip.d.ts +2 -2
  45. package/dist/Tooltip.js +1 -1
  46. package/dist/index.d.ts +26 -6
  47. package/dist/index.js +12 -2
  48. package/package.json +4 -4
package/dist/Tabs.js CHANGED
@@ -9,34 +9,33 @@ const useTabs = () => {
9
9
  return ctx;
10
10
  };
11
11
  /** زبانه‌ها با الگوی Tabs در WAI-ARIA؛ کلیدهای جهت‌دار در راست‌به‌چپ برعکس عمل می‌کنند */
12
- export function Tabs({ value, defaultValue = "", onChange, variant = "line", block, className, children, ...rest }) {
12
+ export function Tabs({ value, defaultValue = "", onChange, variant = "line", block, orientation = "horizontal", size = "md", className, children, ...rest }) {
13
13
  const id = useId();
14
14
  const [inner, setInner] = useState(defaultValue);
15
15
  const selected = value !== undefined ? value : inner;
16
16
  return (_jsx(TabsCtx.Provider, { value: {
17
17
  id,
18
18
  selected,
19
+ orientation,
19
20
  select: (v) => {
20
21
  if (value === undefined)
21
22
  setInner(v);
22
23
  onChange?.(v);
23
24
  },
24
- }, children: _jsx("div", { className: cx("k-tabs", `k-tabs--${variant}`, block && "k-tabs--block", className), ...rest, children: children }) }));
25
+ }, children: _jsx("div", { className: cx("k-tabs", `k-tabs--${variant}`, block && "k-tabs--block", orientation === "vertical" && "k-tabs--vertical", size === "sm" && "k-tabs--sm", className), "data-orientation": orientation, ...rest, children: children }) }));
25
26
  }
26
27
  export function TabList({ className, children, ...rest }) {
27
28
  const ref = useRef(null);
29
+ const { orientation } = useTabs();
28
30
  const onKeyDown = (e) => {
29
31
  const tabs = [...(ref.current?.querySelectorAll('[role="tab"]:not(:disabled)') ?? [])];
30
32
  const i = tabs.indexOf(document.activeElement);
31
33
  if (i < 0)
32
34
  return;
33
35
  const rtl = getComputedStyle(ref.current).direction === "rtl";
34
- const moves = {
35
- ArrowLeft: rtl ? i + 1 : i - 1,
36
- ArrowRight: rtl ? i - 1 : i + 1,
37
- Home: 0,
38
- End: tabs.length - 1,
39
- };
36
+ const moves = orientation === "vertical"
37
+ ? { ArrowDown: i + 1, ArrowUp: i - 1, Home: 0, End: tabs.length - 1 }
38
+ : { ArrowLeft: rtl ? i + 1 : i - 1, ArrowRight: rtl ? i - 1 : i + 1, Home: 0, End: tabs.length - 1 };
40
39
  if (!(e.key in moves))
41
40
  return;
42
41
  e.preventDefault();
@@ -44,7 +43,7 @@ export function TabList({ className, children, ...rest }) {
44
43
  next.focus();
45
44
  next.click(); // فعال‌سازی خودکار با فوکوس
46
45
  };
47
- return (_jsx("div", { ref: ref, role: "tablist", className: cx("k-tabs__list", className), onKeyDown: onKeyDown, ...rest, children: children }));
46
+ return (_jsx("div", { ref: ref, role: "tablist", "aria-orientation": orientation, className: cx("k-tabs__list", className), onKeyDown: onKeyDown, ...rest, children: children }));
48
47
  }
49
48
  export function Tab({ value, className, children, disabled, ...rest }) {
50
49
  const { id, selected, select } = useTabs();
package/dist/Toast.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type ReactNode } from "react";
2
2
  export type ToastTone = "neutral" | "success" | "error" | "warning" | "info";
3
3
  export interface ToastOptions {
4
+ /** شناسهٔ دلخواه؛ toast() با همین شناسه اعلان قبلی را به‌روز می‌کند */
5
+ id?: number | string;
4
6
  title: ReactNode;
5
7
  description?: ReactNode;
6
8
  tone?: ToastTone;
@@ -12,21 +14,33 @@ export interface ToastOptions {
12
14
  };
13
15
  }
14
16
  /** نمایش اعلان کوتاه؛ شناسهٔ آن را برمی‌گرداند */
15
- export declare function toast(options: ToastOptions | string): number;
17
+ export declare function toast(options: ToastOptions | string): number | string;
16
18
  export declare namespace toast {
17
- var success: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => number;
18
- var error: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => number;
19
- var warning: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => number;
20
- var info: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => number;
21
- var dismiss: (id: number) => void;
19
+ var success: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => string | number;
20
+ var error: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => string | number;
21
+ var warning: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => string | number;
22
+ var info: (title: ReactNode, o?: Omit<ToastOptions, "title" | "tone">) => string | number;
23
+ var dismiss: (id: number | string) => void;
24
+ var promise: <T>(promise: Promise<T>, msgs: {
25
+ loading: ReactNode;
26
+ success: Msg<T>;
27
+ error: Msg<unknown>;
28
+ }) => Promise<T>;
22
29
  }
30
+ type Msg<T> = ReactNode | ((value: T) => ReactNode);
31
+ export type ToastPlacement = "top-start" | "top-center" | "top-end" | "bottom-start" | "bottom-center" | "bottom-end";
23
32
  export interface ToasterProps {
24
- /** @default "bottom" */
33
+ /** جای اعلان‌ها؛ در RTL «end» سمت چپ است @default "bottom-end" */
34
+ placement?: ToastPlacement;
35
+ /** @deprecated از placement استفاده کنید */
25
36
  position?: "top" | "bottom";
37
+ /** بیشترین تعداد اعلان هم‌زمان؛ قدیمی‌ترها پنهان می‌شوند @default 5 */
38
+ max?: number;
26
39
  /** @default "اعلان‌ها" */
27
40
  label?: string;
28
41
  /** @default "بستن اعلان" */
29
42
  closeLabel?: string;
30
43
  }
31
44
  /** محل نمایش اعلان‌ها؛ یک بار در ریشهٔ برنامه قرار دهید */
32
- export declare function Toaster({ position, label, closeLabel }: ToasterProps): import("react").JSX.Element;
45
+ export declare function Toaster({ placement, position, max, label, closeLabel }: ToasterProps): import("react").JSX.Element;
46
+ export {};
package/dist/Toast.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState, useSyncExternalStore } from "react";
2
+ import { useEffect, useId, useRef, useState, useSyncExternalStore } from "react";
3
+ import { isDev } from "./utils.js";
3
4
  import { cx } from "./cx.js";
4
5
  import { CloseIcon, ErrorIcon, InfoIcon, SuccessIcon, WarningIcon } from "./icons.js";
5
6
  // مخزن سادهٔ سراسری؛ هر جای برنامه می‌تواند toast() را صدا بزند
@@ -19,25 +20,43 @@ function dismiss(id) {
19
20
  emit();
20
21
  }, 200);
21
22
  }
22
- /** نمایش اعلان کوتاه؛ شناسهٔ آن را برمی‌گرداند */
23
- export function toast(options) {
24
- const o = typeof options === "string" ? { title: options } : options;
25
- const id = nextId++;
26
- items = [...items, { ...o, id }];
23
+ function upsert(o) {
24
+ const id = o.id ?? nextId++;
25
+ const existing = items.find((t) => t.id === id);
26
+ const item = { ...o, id, closing: false, version: (existing?.version ?? 0) + 1 };
27
+ items = existing ? items.map((t) => (t.id === id ? item : t)) : [...items, item];
27
28
  emit();
28
29
  return id;
29
30
  }
31
+ /** نمایش اعلان کوتاه؛ شناسهٔ آن را برمی‌گرداند */
32
+ export function toast(options) {
33
+ return upsert(typeof options === "string" ? { title: options } : options);
34
+ }
30
35
  toast.success = (title, o = {}) => toast({ ...o, title, tone: "success" });
31
36
  toast.error = (title, o = {}) => toast({ ...o, title, tone: "error" });
32
37
  toast.warning = (title, o = {}) => toast({ ...o, title, tone: "warning" });
33
38
  toast.info = (title, o = {}) => toast({ ...o, title, tone: "info" });
34
39
  toast.dismiss = dismiss;
40
+ /**
41
+ * اعلان برای کار زمان‌بر: «در حال ذخیره…» و سپس «ذخیره شد» یا پیام خطا، در همان اعلان.
42
+ * toast.promise(save(), { loading: "در حال ذخیره…", success: "ذخیره شد", error: (e) => e.message })
43
+ */
44
+ toast.promise = (promise, msgs) => {
45
+ const id = upsert({ title: msgs.loading, tone: "info", duration: Infinity, loading: true });
46
+ const show = (m, v) => (typeof m === "function" ? m(v) : m);
47
+ promise.then((v) => upsert({ id, title: show(msgs.success, v), tone: "success" }), (e) => upsert({ id, title: show(msgs.error, e), tone: "error" }));
48
+ return promise;
49
+ };
35
50
  const ICONS = {
36
51
  neutral: InfoIcon, info: InfoIcon, success: SuccessIcon, warning: WarningIcon, error: ErrorIcon,
37
52
  };
38
53
  function ToastView({ t, closeLabel }) {
39
54
  const duration = t.duration ?? (t.action ? Infinity : 5000);
40
55
  const remaining = useRef(duration);
56
+ // اعلان به‌روزشده (مثلاً پس از toast.promise) زمانش از نو شروع می‌شود
57
+ useEffect(() => {
58
+ remaining.current = duration;
59
+ }, [t.version]);
41
60
  const started = useRef(0);
42
61
  const timer = useRef();
43
62
  const [paused, setPaused] = useState(false);
@@ -51,15 +70,39 @@ function ToastView({ t, closeLabel }) {
51
70
  clearTimeout(timer.current);
52
71
  remaining.current -= Date.now() - started.current;
53
72
  };
54
- }, [paused, t.closing]);
73
+ }, [paused, t.closing, t.version]);
55
74
  const Icon = ICONS[t.tone ?? "neutral"];
56
- return (_jsxs("li", { className: cx("k-toast", t.tone && t.tone !== "neutral" && `k-toast--${t.tone}`), "data-state": t.closing ? "closing" : "open", role: t.tone === "error" ? "alert" : "status", onMouseEnter: () => setPaused(true), onMouseLeave: () => setPaused(false), onFocus: () => setPaused(true), onBlur: () => setPaused(false), onKeyDown: (e) => e.key === "Escape" && dismiss(t.id), children: [_jsx("span", { className: "k-toast__icon", "aria-hidden": "true", children: _jsx(Icon, {}) }), _jsxs("div", { className: "k-toast__content", children: [_jsx("p", { className: "k-toast__title", children: t.title }), t.description && _jsx("p", { className: "k-toast__description", children: t.description }), t.action && (_jsx("button", { type: "button", className: "k-btn k-btn--link k-toast__action", onClick: () => {
75
+ const icon = t.loading ? _jsx("span", { className: "k-spinner k-spinner--sm", style: { color: "inherit" } }) : _jsx(Icon, {});
76
+ return (_jsxs("li", { className: cx("k-toast", t.tone && t.tone !== "neutral" && `k-toast--${t.tone}`), "data-state": t.closing ? "closing" : "open", role: t.tone === "error" ? "alert" : "status", onMouseEnter: () => setPaused(true), onMouseLeave: () => setPaused(false), onFocus: () => setPaused(true), onBlur: () => setPaused(false), onKeyDown: (e) => e.key === "Escape" && dismiss(t.id), children: [_jsx("span", { className: "k-toast__icon", "aria-hidden": "true", children: icon }), _jsxs("div", { className: "k-toast__content", children: [_jsx("p", { className: "k-toast__title", children: t.title }), t.description && _jsx("p", { className: "k-toast__description", children: t.description }), t.action && (_jsx("button", { type: "button", className: "k-btn k-btn--link k-toast__action", onClick: () => {
57
77
  t.action.onClick();
58
78
  dismiss(t.id);
59
- }, children: t.action.label }))] }), _jsx("button", { type: "button", className: "k-btn k-btn--tertiary k-btn--icon k-btn--sm k-toast__close", "aria-label": closeLabel, onClick: () => dismiss(t.id), children: _jsx(CloseIcon, {}) }), Number.isFinite(duration) && _jsx("span", { className: "k-toast__progress", "aria-hidden": "true", style: { animationDuration: `${duration}ms` } })] }));
79
+ }, children: t.action.label }))] }), _jsx("button", { type: "button", className: "k-btn k-btn--tertiary k-btn--icon k-btn--sm k-toast__close", "aria-label": closeLabel, onClick: () => dismiss(t.id), children: _jsx(CloseIcon, {}) }), Number.isFinite(duration) && _jsx("span", { className: "k-toast__progress", "aria-hidden": "true", style: { animationDuration: `${duration}ms` } }, t.version)] }));
60
80
  }
81
+ // اگر چند Toaster هم‌زمان در صفحه باشد، فقط آخرینِ نصب‌شده اعلان‌ها را نشان می‌دهد تا تکراری نشوند
82
+ let toasters = [];
83
+ const toasterListeners = new Set();
84
+ const emitToasters = () => toasterListeners.forEach((l) => l());
85
+ const subscribeToasters = (l) => {
86
+ toasterListeners.add(l);
87
+ return () => toasterListeners.delete(l);
88
+ };
61
89
  /** محل نمایش اعلان‌ها؛ یک بار در ریشهٔ برنامه قرار دهید */
62
- export function Toaster({ position = "bottom", label = "اعلان‌ها", closeLabel = "بستن اعلان" }) {
63
- const list = useSyncExternalStore(subscribe, () => items, () => items);
64
- return (_jsx("section", { "aria-label": label, children: _jsx("ol", { className: cx("k-toaster", position === "top" && "k-toaster--top"), "aria-live": "polite", children: list.map((t) => _jsx(ToastView, { t: t, closeLabel: closeLabel }, t.id)) }) }));
90
+ export function Toaster({ placement, position, max = 5, label = "اعلان‌ها", closeLabel = "بستن اعلان" }) {
91
+ const id = useId();
92
+ const all = useSyncExternalStore(subscribe, () => items, () => items);
93
+ const active = useSyncExternalStore(subscribeToasters, () => toasters[toasters.length - 1], () => undefined);
94
+ useEffect(() => {
95
+ toasters = [...toasters, id];
96
+ if (isDev() && toasters.length > 1)
97
+ console.warn("[kashi] بیش از یک <Toaster> در صفحه است؛ فقط آخرین آن‌ها اعلان‌ها را نشان می‌دهد.");
98
+ emitToasters();
99
+ return () => {
100
+ toasters = toasters.filter((t) => t !== id);
101
+ emitToasters();
102
+ };
103
+ }, [id]);
104
+ // تا وقتی Toasterی ثبت نشده (مثلاً رندر سرور) همین Toaster نشان می‌دهد
105
+ const list = active === undefined || active === id ? all.slice(-max) : [];
106
+ const place = placement ?? (position === "top" ? "top-end" : "bottom-end");
107
+ return (_jsx("section", { "aria-label": label, children: _jsx("ol", { className: cx("k-toaster", `k-toaster--${place}`), "data-placement": place, "aria-live": "polite", children: list.map((t) => _jsx(ToastView, { t: t, closeLabel: closeLabel }, t.id)) }) }));
65
108
  }
package/dist/Tooltip.d.ts CHANGED
@@ -4,8 +4,8 @@ export interface TooltipProps {
4
4
  content: ReactNode;
5
5
  /** عنصر فوکوس‌پذیر، معمولاً یک دکمه */
6
6
  children: ReactElement;
7
- /** @default "top" */
8
- placement?: "top" | "bottom";
7
+ /** «start»/«end» کنار عنصر؛ در RTL «start» سمت راست است @default "top" */
8
+ placement?: "top" | "bottom" | "start" | "end";
9
9
  /** تأخیر نمایش با hover بر حسب میلی‌ثانیه @default 300 */
10
10
  delay?: number;
11
11
  }
package/dist/Tooltip.js CHANGED
@@ -30,5 +30,5 @@ export function Tooltip({ content, children, placement = "top", delay = 300 }) {
30
30
  "aria-describedby": [children.props["aria-describedby"], id].filter(Boolean).join(" "),
31
31
  })
32
32
  : children;
33
- return (_jsxs("span", { className: "k-tooltip-anchor", onMouseEnter: () => show(delay), onMouseLeave: hide, onFocus: () => show(0), onBlur: hide, children: [child, _jsx("span", { role: "tooltip", id: id, className: cx("k-tooltip", placement === "bottom" && "k-tooltip--bottom"), hidden: !open, children: content })] }));
33
+ return (_jsxs("span", { className: "k-tooltip-anchor", onMouseEnter: () => show(delay), onMouseLeave: hide, onFocus: () => show(0), onBlur: hide, children: [child, _jsx("span", { role: "tooltip", id: id, className: cx("k-tooltip", placement !== "top" && `k-tooltip--${placement}`), hidden: !open, children: content })] }));
34
34
  }
package/dist/index.d.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  export { Button } from "./Button.js";
2
2
  export type { ButtonProps, ButtonVariant, ButtonSize } from "./Button.js";
3
3
  export { Input, Textarea } from "./Input.js";
4
- export type { InputProps, InputSize, TextareaProps } from "./Input.js";
4
+ export type { InputProps, InputSize, InputClassNames, TextareaProps } from "./Input.js";
5
5
  export { Badge } from "./Badge.js";
6
6
  export type { BadgeProps, BadgeTone } from "./Badge.js";
7
- export { Card, CardHeader, CardTitle, CardDescription, CardBody, CardFooter } from "./Card.js";
8
- export type { CardProps } from "./Card.js";
7
+ export { Card, CardHeader, CardTitle, CardDescription, CardBody, CardFooter, CardMedia } from "./Card.js";
8
+ export type { CardProps, CardHeaderProps, CardMediaProps } from "./Card.js";
9
9
  export { Alert } from "./Alert.js";
10
10
  export type { AlertProps, AlertTone } from "./Alert.js";
11
- export { Avatar, AvatarGroup, initials } from "./Avatar.js";
11
+ export { Avatar, AvatarGroup, initials, autoTone } from "./Avatar.js";
12
12
  export type { AvatarProps, AvatarGroupProps, AvatarSize, AvatarStatus } from "./Avatar.js";
13
13
  export { Checkbox, Switch } from "./Checkbox.js";
14
- export type { CheckboxProps, SwitchProps } from "./Checkbox.js";
14
+ export type { CheckboxProps, SwitchProps, CheckClassNames } from "./Checkbox.js";
15
15
  export { cx } from "./cx.js";
16
16
  export { toFaDigits } from "./utils.js";
17
17
  export { NationalIdInput } from "./NationalIdInput.js";
@@ -37,8 +37,28 @@ export type { TabsProps, TabListProps, TabProps, TabPanelProps } from "./Tabs.js
37
37
  export { Dialog } from "./Dialog.js";
38
38
  export type { DialogProps } from "./Dialog.js";
39
39
  export { Toaster, toast } from "./Toast.js";
40
- export type { ToasterProps, ToastOptions, ToastTone } from "./Toast.js";
40
+ export type { ToasterProps, ToastOptions, ToastTone, ToastPlacement } from "./Toast.js";
41
41
  export { Tooltip } from "./Tooltip.js";
42
42
  export type { TooltipProps } from "./Tooltip.js";
43
43
  export { RelativeTime } from "./RelativeTime.js";
44
44
  export type { RelativeTimeProps } from "./RelativeTime.js";
45
+ export { Breadcrumb } from "./Breadcrumb.js";
46
+ export type { BreadcrumbProps, BreadcrumbItem } from "./Breadcrumb.js";
47
+ export { Pagination, pageRange } from "./Pagination.js";
48
+ export type { PaginationProps } from "./Pagination.js";
49
+ export { Progress, Spinner } from "./Progress.js";
50
+ export type { ProgressProps, SpinnerProps } from "./Progress.js";
51
+ export { Skeleton } from "./Skeleton.js";
52
+ export type { SkeletonProps } from "./Skeleton.js";
53
+ export { Divider, Kbd, EmptyState } from "./Misc.js";
54
+ export type { DividerProps, KbdProps, EmptyStateProps } from "./Misc.js";
55
+ export { DropdownMenu, MenuItem, MenuSeparator, MenuLabel } from "./DropdownMenu.js";
56
+ export type { DropdownMenuProps, MenuItemProps } from "./DropdownMenu.js";
57
+ export { DataTable } from "./DataTable.js";
58
+ export type { DataTableProps, Column, SortState } from "./DataTable.js";
59
+ export { OtpInput } from "./OtpInput.js";
60
+ export type { OtpInputProps } from "./OtpInput.js";
61
+ export { Accordion, AccordionItem } from "./Accordion.js";
62
+ export type { AccordionProps, AccordionItemProps } from "./Accordion.js";
63
+ export { Stepper } from "./Stepper.js";
64
+ export type { StepperProps, Step } from "./Stepper.js";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  export { Button } from "./Button.js";
2
2
  export { Input, Textarea } from "./Input.js";
3
3
  export { Badge } from "./Badge.js";
4
- export { Card, CardHeader, CardTitle, CardDescription, CardBody, CardFooter } from "./Card.js";
4
+ export { Card, CardHeader, CardTitle, CardDescription, CardBody, CardFooter, CardMedia } from "./Card.js";
5
5
  export { Alert } from "./Alert.js";
6
- export { Avatar, AvatarGroup, initials } from "./Avatar.js";
6
+ export { Avatar, AvatarGroup, initials, autoTone } from "./Avatar.js";
7
7
  export { Checkbox, Switch } from "./Checkbox.js";
8
8
  export { cx } from "./cx.js";
9
9
  export { toFaDigits } from "./utils.js";
@@ -21,3 +21,13 @@ export { Dialog } from "./Dialog.js";
21
21
  export { Toaster, toast } from "./Toast.js";
22
22
  export { Tooltip } from "./Tooltip.js";
23
23
  export { RelativeTime } from "./RelativeTime.js";
24
+ export { Breadcrumb } from "./Breadcrumb.js";
25
+ export { Pagination, pageRange } from "./Pagination.js";
26
+ export { Progress, Spinner } from "./Progress.js";
27
+ export { Skeleton } from "./Skeleton.js";
28
+ export { Divider, Kbd, EmptyState } from "./Misc.js";
29
+ export { DropdownMenu, MenuItem, MenuSeparator, MenuLabel } from "./DropdownMenu.js";
30
+ export { DataTable } from "./DataTable.js";
31
+ export { OtpInput } from "./OtpInput.js";
32
+ export { Accordion, AccordionItem } from "./Accordion.js";
33
+ export { Stepper } from "./Stepper.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kashi-ui/react",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "کامپوننت‌های React دیزاین‌سیستم کاشی",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "test": "node --test test/*.test.mjs"
23
23
  },
24
24
  "peerDependencies": {
25
- "@kashi-ui/css": "^0.6.0",
25
+ "@kashi-ui/css": "^0.8.0",
26
26
  "react": ">=18"
27
27
  },
28
28
  "devDependencies": {
@@ -59,7 +59,7 @@
59
59
  }
60
60
  },
61
61
  "dependencies": {
62
- "@kashi-ui/bank-logos": "^0.6.0",
63
- "@kashi-ui/persian": "^0.6.0"
62
+ "@kashi-ui/bank-logos": "^0.8.0",
63
+ "@kashi-ui/persian": "^0.8.0"
64
64
  }
65
65
  }