@tensor_1/react 2.0.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 (89) hide show
  1. package/dist/chart.cjs +127 -0
  2. package/dist/chart.d.cts +24 -0
  3. package/dist/chart.d.ts +3 -0
  4. package/dist/chart.js +5 -0
  5. package/dist/components/Alert.d.ts +13 -0
  6. package/dist/components/Alert.js +14 -0
  7. package/dist/components/AppShell.d.ts +12 -0
  8. package/dist/components/AppShell.js +12 -0
  9. package/dist/components/Avatar.d.ts +30 -0
  10. package/dist/components/Avatar.js +26 -0
  11. package/dist/components/Button.d.ts +18 -0
  12. package/dist/components/Button.js +30 -0
  13. package/dist/components/Card.d.ts +13 -0
  14. package/dist/components/Card.js +19 -0
  15. package/dist/components/Chart.d.ts +24 -0
  16. package/dist/components/Chart.js +83 -0
  17. package/dist/components/Checkbox.d.ts +10 -0
  18. package/dist/components/Checkbox.js +35 -0
  19. package/dist/components/CommandPalette.d.ts +30 -0
  20. package/dist/components/CommandPalette.js +26 -0
  21. package/dist/components/Comments.d.ts +19 -0
  22. package/dist/components/Comments.js +22 -0
  23. package/dist/components/DetailLayout.d.ts +16 -0
  24. package/dist/components/DetailLayout.js +11 -0
  25. package/dist/components/Drawer.d.ts +14 -0
  26. package/dist/components/Drawer.js +27 -0
  27. package/dist/components/Field.d.ts +16 -0
  28. package/dist/components/Field.js +14 -0
  29. package/dist/components/Input.d.ts +18 -0
  30. package/dist/components/Input.js +38 -0
  31. package/dist/components/Kanban.d.ts +21 -0
  32. package/dist/components/Kanban.js +26 -0
  33. package/dist/components/Label.d.ts +13 -0
  34. package/dist/components/Label.js +12 -0
  35. package/dist/components/List.d.ts +21 -0
  36. package/dist/components/List.js +21 -0
  37. package/dist/components/Modal.d.ts +15 -0
  38. package/dist/components/Modal.js +19 -0
  39. package/dist/components/PageHeader.d.ts +18 -0
  40. package/dist/components/PageHeader.js +15 -0
  41. package/dist/components/Pagination.d.ts +11 -0
  42. package/dist/components/Pagination.js +53 -0
  43. package/dist/components/Peek.d.ts +17 -0
  44. package/dist/components/Peek.js +34 -0
  45. package/dist/components/Popover.d.ts +18 -0
  46. package/dist/components/Popover.js +9 -0
  47. package/dist/components/Progress.d.ts +14 -0
  48. package/dist/components/Progress.js +20 -0
  49. package/dist/components/Prose.d.ts +21 -0
  50. package/dist/components/Prose.js +15 -0
  51. package/dist/components/Radio.d.ts +14 -0
  52. package/dist/components/Radio.js +18 -0
  53. package/dist/components/Select.d.ts +9 -0
  54. package/dist/components/Select.js +17 -0
  55. package/dist/components/Sidebar.d.ts +39 -0
  56. package/dist/components/Sidebar.js +89 -0
  57. package/dist/components/Spinner.d.ts +10 -0
  58. package/dist/components/Spinner.js +16 -0
  59. package/dist/components/Stat.d.ts +21 -0
  60. package/dist/components/Stat.js +18 -0
  61. package/dist/components/States.d.ts +38 -0
  62. package/dist/components/States.js +43 -0
  63. package/dist/components/StatusPill.d.ts +15 -0
  64. package/dist/components/StatusPill.js +18 -0
  65. package/dist/components/Switch.d.ts +9 -0
  66. package/dist/components/Switch.js +14 -0
  67. package/dist/components/Table.d.ts +34 -0
  68. package/dist/components/Table.js +62 -0
  69. package/dist/components/Tabs.d.ts +19 -0
  70. package/dist/components/Tabs.js +31 -0
  71. package/dist/components/Textarea.d.ts +9 -0
  72. package/dist/components/Textarea.js +18 -0
  73. package/dist/components/Timeline.d.ts +16 -0
  74. package/dist/components/Timeline.js +21 -0
  75. package/dist/components/Toast.d.ts +19 -0
  76. package/dist/components/Toast.js +29 -0
  77. package/dist/components/Tooltip.d.ts +16 -0
  78. package/dist/components/Tooltip.js +7 -0
  79. package/dist/components/Tree.d.ts +28 -0
  80. package/dist/components/Tree.js +69 -0
  81. package/dist/cx.d.ts +3 -0
  82. package/dist/cx.js +6 -0
  83. package/dist/hooks/useDialog.d.ts +3 -0
  84. package/dist/hooks/useDialog.js +21 -0
  85. package/dist/index.cjs +1040 -0
  86. package/dist/index.d.cts +534 -0
  87. package/dist/index.d.ts +40 -0
  88. package/dist/index.js +106 -0
  89. package/package.json +47 -0
@@ -0,0 +1,39 @@
1
+ import * as react from 'react';
2
+ import { ReactNode, AnchorHTMLAttributes, HTMLAttributes } from 'react';
3
+
4
+ interface SidebarProps extends HTMLAttributes<HTMLElement> {
5
+ collapsed?: boolean;
6
+ onToggle?: () => void;
7
+ brand?: ReactNode;
8
+ toggleIcon?: ReactNode;
9
+ children?: ReactNode;
10
+ }
11
+ declare function Sidebar({ collapsed, onToggle, brand, toggleIcon, children, className, ...props }: SidebarProps): react.JSX.Element;
12
+ interface SidebarSectionProps {
13
+ label?: string;
14
+ children?: ReactNode;
15
+ }
16
+ declare function SidebarSection({ label, children }: SidebarSectionProps): react.JSX.Element;
17
+ interface NavItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
18
+ icon?: ReactNode;
19
+ badge?: ReactNode;
20
+ active?: boolean;
21
+ as?: 'a' | 'button';
22
+ children?: ReactNode;
23
+ }
24
+ declare function NavItem({ icon, badge, active, as: Tag, children, className, ...props }: NavItemProps): react.JSX.Element;
25
+ interface NavGroupProps {
26
+ icon?: ReactNode;
27
+ label: ReactNode;
28
+ children?: ReactNode;
29
+ defaultExpanded?: boolean;
30
+ }
31
+ declare function NavGroup({ icon, label, children, defaultExpanded }: NavGroupProps): react.JSX.Element;
32
+ interface SubNavItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
33
+ active?: boolean;
34
+ as?: 'a' | 'button';
35
+ children?: ReactNode;
36
+ }
37
+ declare function SubNavItem({ active, as: Tag, children, className, ...props }: SubNavItemProps): react.JSX.Element;
38
+
39
+ export { NavGroup, type NavGroupProps, NavItem, type NavItemProps, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, SubNavItem, type SubNavItemProps };
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { cx } from "../cx.js";
5
+ const ChevronIcon = () => /* @__PURE__ */ jsx("svg", { className: "uix-navgroup__chevron", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M2 4l4 4 4-4" }) });
6
+ function Sidebar({ collapsed, onToggle, brand, toggleIcon, children, className, ...props }) {
7
+ return /* @__PURE__ */ jsxs("nav", { className: cx("uix-sidebar", className), "data-collapsed": collapsed || void 0, ...props, children: [
8
+ (brand != null || onToggle) && /* @__PURE__ */ jsxs("div", { className: "uix-sidebar__head", children: [
9
+ brand && /* @__PURE__ */ jsx("div", { className: "uix-sidebar__brand", children: brand }),
10
+ onToggle && /* @__PURE__ */ jsx("button", { className: "uix-sidebar__toggle", onClick: onToggle, "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar", children: toggleIcon ?? /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", stroke: "currentColor", strokeWidth: 1.5, "aria-hidden": "true", children: [
11
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "4", width: "12", height: "1.5", rx: ".75" }),
12
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "8.25", width: "8", height: "1.5", rx: ".75" }),
13
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "12.5", width: "12", height: "1.5", rx: ".75" })
14
+ ] }) })
15
+ ] }),
16
+ children
17
+ ] });
18
+ }
19
+ function SidebarSection({ label, children }) {
20
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
21
+ label && /* @__PURE__ */ jsx("div", { className: "uix-sidebar__eyebrow", children: label }),
22
+ children
23
+ ] });
24
+ }
25
+ function NavItem({ icon, badge, active, as: Tag = "a", children, className, ...props }) {
26
+ if (Tag === "button") {
27
+ const { href: _href, ...btnProps } = props;
28
+ return /* @__PURE__ */ jsxs(
29
+ "button",
30
+ {
31
+ className: cx("uix-navitem", className),
32
+ "aria-current": active ? "page" : void 0,
33
+ ...btnProps,
34
+ children: [
35
+ icon && /* @__PURE__ */ jsx("span", { className: "uix-navitem__icon", "aria-hidden": "true", children: icon }),
36
+ /* @__PURE__ */ jsx("span", { className: "uix-navitem__label", children }),
37
+ badge != null && /* @__PURE__ */ jsx("span", { className: "uix-navitem__badge", children: badge })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ return /* @__PURE__ */ jsxs(
43
+ "a",
44
+ {
45
+ className: cx("uix-navitem", className),
46
+ "aria-current": active ? "page" : void 0,
47
+ ...props,
48
+ children: [
49
+ icon && /* @__PURE__ */ jsx("span", { className: "uix-navitem__icon", "aria-hidden": "true", children: icon }),
50
+ /* @__PURE__ */ jsx("span", { className: "uix-navitem__label", children }),
51
+ badge != null && /* @__PURE__ */ jsx("span", { className: "uix-navitem__badge", children: badge })
52
+ ]
53
+ }
54
+ );
55
+ }
56
+ function NavGroup({ icon, label, children, defaultExpanded = true }) {
57
+ const [expanded, setExpanded] = useState(defaultExpanded);
58
+ return /* @__PURE__ */ jsxs("div", { className: "uix-navgroup", children: [
59
+ /* @__PURE__ */ jsxs(
60
+ "button",
61
+ {
62
+ className: "uix-navitem uix-navgroup__trigger",
63
+ "aria-expanded": expanded,
64
+ onClick: () => setExpanded((v) => !v),
65
+ children: [
66
+ icon && /* @__PURE__ */ jsx("span", { className: "uix-navitem__icon", "aria-hidden": "true", children: icon }),
67
+ /* @__PURE__ */ jsx("span", { className: "uix-navitem__label", children: label }),
68
+ /* @__PURE__ */ jsx(ChevronIcon, {})
69
+ ]
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx("div", { className: "uix-navgroup__panel", children: /* @__PURE__ */ jsx("div", { children }) })
73
+ ] });
74
+ }
75
+ function SubNavItem({ active, as: Tag = "a", children, className, ...props }) {
76
+ const cls = cx("uix-navitem uix-subitem", className);
77
+ if (Tag === "button") {
78
+ const { href: _href, ...btnProps } = props;
79
+ return /* @__PURE__ */ jsx("button", { className: cls, "aria-current": active ? "page" : void 0, ...btnProps, children: /* @__PURE__ */ jsx("span", { className: "uix-navitem__label", children }) });
80
+ }
81
+ return /* @__PURE__ */ jsx("a", { className: cls, "aria-current": active ? "page" : void 0, ...props, children: /* @__PURE__ */ jsx("span", { className: "uix-navitem__label", children }) });
82
+ }
83
+ export {
84
+ NavGroup,
85
+ NavItem,
86
+ Sidebar,
87
+ SidebarSection,
88
+ SubNavItem
89
+ };
@@ -0,0 +1,10 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
5
+ size?: 'md' | 'lg';
6
+ accent?: boolean;
7
+ }
8
+ declare function Spinner({ size, accent, className, ...props }: SpinnerProps): react.JSX.Element;
9
+
10
+ export { Spinner, type SpinnerProps };
@@ -0,0 +1,16 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function Spinner({ size = "md", accent, className, ...props }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "span",
6
+ {
7
+ className: cx("uix-spinner", accent && "uix-spinner--accent", size === "lg" && "uix-spinner--lg", className),
8
+ role: "status",
9
+ "aria-label": "Loading",
10
+ ...props
11
+ }
12
+ );
13
+ }
14
+ export {
15
+ Spinner
16
+ };
@@ -0,0 +1,21 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface StatTrend {
5
+ direction: 'up' | 'down';
6
+ label: ReactNode;
7
+ }
8
+ interface StatProps extends HTMLAttributes<HTMLDivElement> {
9
+ label: ReactNode;
10
+ value: ReactNode;
11
+ /** Optional icon shown at the trailing edge of the label row. */
12
+ icon?: ReactNode;
13
+ /** Supporting line under the value (e.g. "vs last week"). */
14
+ meta?: ReactNode;
15
+ /** Trend chip rendered before the meta text. */
16
+ trend?: StatTrend;
17
+ }
18
+ /** KPI / stat tile over `.uix-stat`. */
19
+ declare function Stat({ label, value, icon, meta, trend, className, ...props }: StatProps): react.JSX.Element;
20
+
21
+ export { Stat, type StatProps, type StatTrend };
@@ -0,0 +1,18 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function Stat({ label, value, icon, meta, trend, className, ...props }) {
4
+ return /* @__PURE__ */ jsxs("div", { className: cx("uix-stat", className), ...props, children: [
5
+ /* @__PURE__ */ jsxs("div", { className: "uix-stat__label", children: [
6
+ /* @__PURE__ */ jsx("span", { children: label }),
7
+ icon
8
+ ] }),
9
+ /* @__PURE__ */ jsx("div", { className: "uix-stat__value", children: value }),
10
+ (meta != null || trend != null) && /* @__PURE__ */ jsxs("div", { className: "uix-stat__meta", children: [
11
+ trend != null && /* @__PURE__ */ jsx("span", { className: cx("uix-stat__trend", `uix-stat__trend--${trend.direction}`), children: trend.label }),
12
+ meta
13
+ ] })
14
+ ] });
15
+ }
16
+ export {
17
+ Stat
18
+ };
@@ -0,0 +1,38 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
5
+ icon?: ReactNode;
6
+ title?: ReactNode;
7
+ /** Supporting copy / description. */
8
+ children?: ReactNode;
9
+ /** Primary action (e.g. a Button) shown under the body. */
10
+ action?: ReactNode;
11
+ }
12
+ /** Centered empty state over `.uix-empty`. */
13
+ declare function EmptyState({ icon, title, children, action, className, ...props }: EmptyStateProps): react.JSX.Element;
14
+ interface ErrorStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
15
+ icon?: ReactNode;
16
+ title?: ReactNode;
17
+ /** Error detail / message. */
18
+ detail?: ReactNode;
19
+ /** Recovery action (e.g. a Retry Button). */
20
+ action?: ReactNode;
21
+ }
22
+ /** Error state over `.uix-empty` with a danger-toned icon; `role="alert"`. */
23
+ declare function ErrorState({ icon, title, detail, action, className, ...props }: ErrorStateProps): react.JSX.Element;
24
+ interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
25
+ variant?: 'block' | 'text' | 'circle';
26
+ width?: number | string;
27
+ height?: number | string;
28
+ }
29
+ /** Shimmer placeholder over `.uix-skeleton`. */
30
+ declare function Skeleton({ variant, width, height, className, style, ...props }: SkeletonProps): react.JSX.Element;
31
+ interface LoadingStateProps extends HTMLAttributes<HTMLDivElement> {
32
+ /** Number of skeleton rows to render. */
33
+ rows?: number;
34
+ }
35
+ /** A stack of skeleton rows for list/section loading. `role="status"`. */
36
+ declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react.JSX.Element;
37
+
38
+ export { EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, LoadingState, type LoadingStateProps, Skeleton, type SkeletonProps };
@@ -0,0 +1,43 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function EmptyState({ icon, title, children, action, className, ...props }) {
4
+ return /* @__PURE__ */ jsxs("div", { className: cx("uix-empty", className), ...props, children: [
5
+ icon != null && /* @__PURE__ */ jsx("div", { className: "uix-empty__icon", children: icon }),
6
+ title != null && /* @__PURE__ */ jsx("div", { className: "uix-empty__title", children: title }),
7
+ children,
8
+ action
9
+ ] });
10
+ }
11
+ function ErrorState({ icon, title, detail, action, className, ...props }) {
12
+ return /* @__PURE__ */ jsxs("div", { className: cx("uix-empty", "uix-empty--danger", className), role: "alert", ...props, children: [
13
+ icon != null && /* @__PURE__ */ jsx("div", { className: "uix-empty__icon uix-empty__icon--danger", children: icon }),
14
+ title != null && /* @__PURE__ */ jsx("div", { className: "uix-empty__title", children: title }),
15
+ detail != null && /* @__PURE__ */ jsx("p", { children: detail }),
16
+ action
17
+ ] });
18
+ }
19
+ function Skeleton({ variant = "block", width, height, className, style, ...props }) {
20
+ const dims = { width, height, ...style };
21
+ return /* @__PURE__ */ jsx(
22
+ "div",
23
+ {
24
+ className: cx(
25
+ "uix-skeleton",
26
+ variant === "text" && "uix-skeleton--text",
27
+ variant === "circle" && "uix-skeleton--circle",
28
+ className
29
+ ),
30
+ style: dims,
31
+ ...props
32
+ }
33
+ );
34
+ }
35
+ function LoadingState({ rows = 3, className, ...props }) {
36
+ return /* @__PURE__ */ jsx("div", { className: cx("uix-stack", className), role: "status", "aria-busy": "true", ...props, children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: `${92 - i % 3 * 14}%` }, i)) });
37
+ }
38
+ export {
39
+ EmptyState,
40
+ ErrorState,
41
+ LoadingState,
42
+ Skeleton
43
+ };
@@ -0,0 +1,15 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ type PillTone = 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'critical' | 'muted';
5
+ type PillTreatment = 'filled' | 'outline';
6
+ interface StatusPillProps extends HTMLAttributes<HTMLSpanElement> {
7
+ tone?: PillTone;
8
+ /** 'filled' (default) = tinted wash; 'outline' = transparent fill + tone-tinted border. */
9
+ treatment?: PillTreatment;
10
+ dot?: boolean;
11
+ children?: ReactNode;
12
+ }
13
+ declare function StatusPill({ tone, treatment, dot, children, className, ...props }: StatusPillProps): react.JSX.Element;
14
+
15
+ export { type PillTone, type PillTreatment, StatusPill, type StatusPillProps };
@@ -0,0 +1,18 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function StatusPill({ tone = "neutral", treatment = "filled", dot, children, className, ...props }) {
4
+ return /* @__PURE__ */ jsxs(
5
+ "span",
6
+ {
7
+ className: cx("uix-pill", `uix-pill--${tone}`, treatment === "outline" && "uix-pill--outline", className),
8
+ ...props,
9
+ children: [
10
+ dot && /* @__PURE__ */ jsx("span", { className: "uix-pill__dot", "aria-hidden": "true" }),
11
+ children
12
+ ]
13
+ }
14
+ );
15
+ }
16
+ export {
17
+ StatusPill
18
+ };
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+ import { InputHTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
5
+ label?: ReactNode;
6
+ }
7
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLInputElement>>;
8
+
9
+ export { Switch, type SwitchProps };
@@ -0,0 +1,14 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cx } from "../cx.js";
4
+ const Switch = forwardRef(
5
+ ({ label, className, ...props }, ref) => /* @__PURE__ */ jsxs("label", { className: cx("uix-switch", className), children: [
6
+ /* @__PURE__ */ jsx("input", { type: "checkbox", role: "switch", ref, ...props }),
7
+ /* @__PURE__ */ jsx("span", { className: "uix-switch__track" }),
8
+ label
9
+ ] })
10
+ );
11
+ Switch.displayName = "Switch";
12
+ export {
13
+ Switch
14
+ };
@@ -0,0 +1,34 @@
1
+ import * as react from 'react';
2
+ import { TableHTMLAttributes, HTMLAttributes, ReactNode, TdHTMLAttributes, ThHTMLAttributes } from 'react';
3
+
4
+ interface TableWrapProps extends HTMLAttributes<HTMLDivElement> {
5
+ children?: ReactNode;
6
+ }
7
+ declare function TableWrap({ children, className, ...props }: TableWrapProps): react.JSX.Element;
8
+ type TableDensity = 'compact' | 'standard' | 'comfortable';
9
+ type SortDirection = 'ascending' | 'descending' | 'none';
10
+ interface TableProps extends TableHTMLAttributes<HTMLTableElement> {
11
+ density?: TableDensity;
12
+ zebra?: boolean;
13
+ pinnedCol?: boolean;
14
+ rowPeek?: boolean;
15
+ v2?: boolean;
16
+ }
17
+ declare function Table({ density, zebra, pinnedCol, rowPeek, v2, className, children, ...props }: TableProps): react.JSX.Element;
18
+ interface ThProps extends ThHTMLAttributes<HTMLTableCellElement> {
19
+ sortable?: boolean;
20
+ sortDirection?: SortDirection;
21
+ onSort?: () => void;
22
+ }
23
+ declare function Th({ sortable, sortDirection, onSort, className, children, onClick, ...props }: ThProps): react.JSX.Element;
24
+ interface TdProps extends TdHTMLAttributes<HTMLTableCellElement> {
25
+ pinned?: boolean;
26
+ }
27
+ declare function Td({ pinned, className, children, ...props }: TdProps): react.JSX.Element;
28
+ interface TrProps extends HTMLAttributes<HTMLTableRowElement> {
29
+ selected?: boolean;
30
+ pinned?: boolean;
31
+ }
32
+ declare function Tr({ selected, pinned, className, children, ...props }: TrProps): react.JSX.Element;
33
+
34
+ export { type SortDirection, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Td, type TdProps, Th, type ThProps, Tr, type TrProps };
@@ -0,0 +1,62 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function TableWrap({ children, className, ...props }) {
4
+ return /* @__PURE__ */ jsx("div", { className: cx("uix-table-wrap", className), ...props, children });
5
+ }
6
+ function Table({
7
+ density = "standard",
8
+ zebra = true,
9
+ pinnedCol,
10
+ rowPeek,
11
+ v2,
12
+ className,
13
+ children,
14
+ ...props
15
+ }) {
16
+ return /* @__PURE__ */ jsx(
17
+ "table",
18
+ {
19
+ className: cx("uix-table", !zebra && "uix-table--no-zebra", pinnedCol && "uix-table--pinned-col", className),
20
+ "data-density": density !== "standard" ? density : void 0,
21
+ "data-uix-rowpeek": rowPeek || void 0,
22
+ "data-uix-table-v2": v2 || void 0,
23
+ ...props,
24
+ children
25
+ }
26
+ );
27
+ }
28
+ function Th({ sortable, sortDirection, onSort, className, children, onClick, ...props }) {
29
+ return /* @__PURE__ */ jsx(
30
+ "th",
31
+ {
32
+ className,
33
+ "data-sort": sortable || void 0,
34
+ "aria-sort": sortDirection && sortDirection !== "none" ? sortDirection : void 0,
35
+ onClick: sortable ? onSort ?? onClick : onClick,
36
+ ...props,
37
+ children
38
+ }
39
+ );
40
+ }
41
+ function Td({ pinned, className, children, ...props }) {
42
+ return /* @__PURE__ */ jsx("td", { className, "data-pinned": pinned || void 0, ...props, children });
43
+ }
44
+ function Tr({ selected, pinned, className, children, ...props }) {
45
+ return /* @__PURE__ */ jsx(
46
+ "tr",
47
+ {
48
+ className,
49
+ "aria-selected": selected || void 0,
50
+ "data-pinned": pinned || void 0,
51
+ ...props,
52
+ children
53
+ }
54
+ );
55
+ }
56
+ export {
57
+ Table,
58
+ TableWrap,
59
+ Td,
60
+ Th,
61
+ Tr
62
+ };
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface TabsProps {
5
+ variant?: 'line' | 'enclosed' | 'pill';
6
+ value?: string;
7
+ onChange?: (value: string) => void;
8
+ children?: ReactNode;
9
+ className?: string;
10
+ }
11
+ declare function Tabs({ variant, value, onChange, children, className }: TabsProps): react.JSX.Element;
12
+ interface TabProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {
13
+ value: string;
14
+ children?: ReactNode;
15
+ disabled?: boolean;
16
+ }
17
+ declare function Tab({ value, children, disabled, className, onClick, ...props }: TabProps): react.JSX.Element;
18
+
19
+ export { Tab, type TabProps, Tabs, type TabsProps };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { createContext, useContext } from "react";
4
+ import { cx } from "../cx.js";
5
+ const TabsCtx = createContext({});
6
+ function Tabs({ variant = "line", value, onChange, children, className }) {
7
+ return /* @__PURE__ */ jsx(TabsCtx.Provider, { value: { value, onChange }, children: /* @__PURE__ */ jsx("div", { role: "tablist", className: cx("uix-tabs", `uix-tabs--${variant}`, className), children }) });
8
+ }
9
+ function Tab({ value, children, disabled, className, onClick, ...props }) {
10
+ const ctx = useContext(TabsCtx);
11
+ const selected = ctx.value === value;
12
+ return /* @__PURE__ */ jsx(
13
+ "button",
14
+ {
15
+ role: "tab",
16
+ className: cx("uix-tab", className),
17
+ "aria-selected": selected,
18
+ disabled,
19
+ onClick: (e) => {
20
+ ctx.onChange?.(value);
21
+ onClick?.(e);
22
+ },
23
+ ...props,
24
+ children
25
+ }
26
+ );
27
+ }
28
+ export {
29
+ Tab,
30
+ Tabs
31
+ };
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+ import { TextareaHTMLAttributes } from 'react';
3
+
4
+ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
5
+ invalid?: boolean;
6
+ }
7
+ declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
8
+
9
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { cx } from "../cx.js";
4
+ const Textarea = forwardRef(
5
+ ({ invalid, className, ...props }, ref) => /* @__PURE__ */ jsx(
6
+ "textarea",
7
+ {
8
+ ref,
9
+ className: cx("uix-textarea", className),
10
+ "aria-invalid": invalid || void 0,
11
+ ...props
12
+ }
13
+ )
14
+ );
15
+ Textarea.displayName = "Textarea";
16
+ export {
17
+ Textarea
18
+ };
@@ -0,0 +1,16 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
5
+ children?: ReactNode;
6
+ }
7
+ /** Activity timeline container over `.uix-timeline`. */
8
+ declare function Timeline({ children, className, ...props }: TimelineProps): react.JSX.Element;
9
+ interface TimelineItemProps extends HTMLAttributes<HTMLDivElement> {
10
+ meta?: ReactNode;
11
+ children?: ReactNode;
12
+ }
13
+ /** A timeline entry over `.uix-timeline__item` (node + connecting line + body). */
14
+ declare function TimelineItem({ meta, children, className, ...props }: TimelineItemProps): react.JSX.Element;
15
+
16
+ export { Timeline, TimelineItem, type TimelineItemProps, type TimelineProps };
@@ -0,0 +1,21 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function Timeline({ children, className, ...props }) {
4
+ return /* @__PURE__ */ jsx("div", { className: cx("uix-timeline", className), ...props, children });
5
+ }
6
+ function TimelineItem({ meta, children, className, ...props }) {
7
+ return /* @__PURE__ */ jsxs("div", { className: cx("uix-timeline__item", className), ...props, children: [
8
+ /* @__PURE__ */ jsxs("div", { className: "uix-timeline__rail", children: [
9
+ /* @__PURE__ */ jsx("span", { className: "uix-timeline__node" }),
10
+ /* @__PURE__ */ jsx("span", { className: "uix-timeline__line" })
11
+ ] }),
12
+ /* @__PURE__ */ jsxs("div", { className: "uix-timeline__body", children: [
13
+ meta != null && /* @__PURE__ */ jsx("div", { className: "uix-timeline__meta", children: meta }),
14
+ children
15
+ ] })
16
+ ] });
17
+ }
18
+ export {
19
+ Timeline,
20
+ TimelineItem
21
+ };
@@ -0,0 +1,19 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ type ToastTone = 'success' | 'danger' | 'info';
5
+ interface ToastProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
6
+ title?: ReactNode;
7
+ message?: ReactNode;
8
+ tone?: ToastTone;
9
+ icon?: ReactNode;
10
+ onClose?: () => void;
11
+ leaving?: boolean;
12
+ }
13
+ declare function Toast({ title, message, tone, icon, onClose, leaving, className, ...props }: ToastProps): react.JSX.Element;
14
+ interface ToasterProps extends HTMLAttributes<HTMLDivElement> {
15
+ children?: ReactNode;
16
+ }
17
+ declare function Toaster({ children, className, ...props }: ToasterProps): react.JSX.Element;
18
+
19
+ export { Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps };
@@ -0,0 +1,29 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { cx } from "../cx.js";
3
+ function Toast({ title, message, tone, icon, onClose, leaving, className, ...props }) {
4
+ return /* @__PURE__ */ jsxs(
5
+ "div",
6
+ {
7
+ className: cx("uix-toast", tone && `uix-toast--${tone}`, className),
8
+ "data-leaving": leaving || void 0,
9
+ role: "status",
10
+ "aria-live": "polite",
11
+ ...props,
12
+ children: [
13
+ icon && /* @__PURE__ */ jsx("div", { className: "uix-toast__icon", children: icon }),
14
+ /* @__PURE__ */ jsxs("div", { className: "uix-toast__body", children: [
15
+ title && /* @__PURE__ */ jsx("div", { className: "uix-toast__title", children: title }),
16
+ message && /* @__PURE__ */ jsx("div", { className: "uix-toast__msg", children: message })
17
+ ] }),
18
+ onClose && /* @__PURE__ */ jsx("button", { className: "uix-toast__close", onClick: onClose, "aria-label": "Dismiss", children: "\xD7" })
19
+ ]
20
+ }
21
+ );
22
+ }
23
+ function Toaster({ children, className, ...props }) {
24
+ return /* @__PURE__ */ jsx("div", { className: cx("uix-toaster", className), "aria-live": "polite", "aria-atomic": "false", ...props, children });
25
+ }
26
+ export {
27
+ Toast,
28
+ Toaster
29
+ };
@@ -0,0 +1,16 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface TooltipProps extends HTMLAttributes<HTMLSpanElement> {
5
+ /** Tooltip text. Rendered via the CSS `[data-uix-tip]` hover/focus tooltip. */
6
+ label: string;
7
+ children?: ReactNode;
8
+ }
9
+ /**
10
+ * Thin wrapper over the CSS-only tooltip (`[data-uix-tip]`). Wraps its children
11
+ * in a span carrying the attribute; the bubble is drawn entirely in CSS on
12
+ * hover/focus. For keyboard reveal, ensure a focusable child or pass `tabIndex`.
13
+ */
14
+ declare function Tooltip({ label, children, ...props }: TooltipProps): react.JSX.Element;
15
+
16
+ export { Tooltip, type TooltipProps };
@@ -0,0 +1,7 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ function Tooltip({ label, children, ...props }) {
3
+ return /* @__PURE__ */ jsx("span", { "data-uix-tip": label, ...props, children });
4
+ }
5
+ export {
6
+ Tooltip
7
+ };