@mechane-ai/elements 0.11.0 → 0.13.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 (69) hide show
  1. package/README.md +23 -4
  2. package/dist/ai.js +167 -141
  3. package/dist/{categorical-values-FYc43JCa.js → categorical-values-DwobbjBq.js} +2 -2
  4. package/dist/{chart-frame-Bczk5sWj.js → chart-frame-DAxsgMyl.js} +4 -4
  5. package/dist/{chart-input-CbzVN76m.js → chart-input-B0snxbMH.js} +2 -2
  6. package/dist/charts/cartesian.js +6 -6
  7. package/dist/charts/distribution.js +2 -2
  8. package/dist/charts/graph.js +3 -3
  9. package/dist/charts/hierarchy.js +3 -3
  10. package/dist/charts/matrix.js +2 -2
  11. package/dist/charts/timeline.js +4 -4
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-B7xzM3tD.js → code-block-VwrOHz5j.js} +2 -2
  14. package/dist/collections.js +402 -267
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +3 -3
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-CatGOrbo.js → content-link-Oj-MtNYi.js} +1 -1
  21. package/dist/content.js +3 -4
  22. package/dist/elements.css +141 -96
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +22 -23
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +223 -237
  28. package/dist/navigation/commands.js +3 -3
  29. package/dist/navigation.js +26 -12
  30. package/dist/overlays.js +1 -1
  31. package/dist/packages/ai/src/index.d.ts +2 -2
  32. package/dist/packages/ai/src/prompt-input.d.ts +4 -0
  33. package/dist/packages/collections/src/collection-controls.d.ts +1 -1
  34. package/dist/packages/collections/src/data-table.d.ts +24 -6
  35. package/dist/packages/collections/src/index.d.ts +2 -2
  36. package/dist/packages/core/src/actions.d.ts +5 -8
  37. package/dist/packages/feedback/src/async-region.d.ts +15 -9
  38. package/dist/packages/feedback/src/control-placeholders.d.ts +21 -0
  39. package/dist/packages/feedback/src/index.d.ts +4 -3
  40. package/dist/packages/forms/src/field-styles.d.ts +2 -74
  41. package/dist/packages/forms/src/form-actions.d.ts +11 -0
  42. package/dist/packages/forms/src/form-controls.d.ts +1 -1
  43. package/dist/packages/forms/src/forms.d.ts +3 -3
  44. package/dist/packages/forms/src/index.d.ts +2 -0
  45. package/dist/packages/forms/src/select.d.ts +2 -2
  46. package/dist/packages/forms/src/selection-styles.d.ts +0 -13
  47. package/dist/packages/foundations/src/control-styles.d.ts +122 -0
  48. package/dist/packages/foundations/src/style-composition.d.ts +0 -2
  49. package/dist/packages/foundations/src/tokens.stylex.d.ts +13 -2
  50. package/dist/packages/layout/src/frame.stylex.d.ts +0 -1
  51. package/dist/packages/layout/src/index.d.ts +2 -0
  52. package/dist/packages/layout/src/page-content.d.ts +5 -0
  53. package/dist/packages/layout/src/page-toolbar.d.ts +1 -1
  54. package/dist/packages/layout/src/sidebar.d.ts +3 -3
  55. package/dist/packages/navigation/src/index.d.ts +2 -2
  56. package/dist/packages/navigation/src/page-navigation.d.ts +5 -0
  57. package/dist/{pierre-diff--zsiHCCB.js → pierre-diff-sUAU-xeL.js} +1 -1
  58. package/dist/{pierre-theme-D9hnHv3Z.js → pierre-theme-CBAncKdH.js} +1 -1
  59. package/dist/{pierre-tree-D47uA7lb.js → pierre-tree-Db1yaDM2.js} +3 -3
  60. package/dist/src-B0UTwpOz.js +1003 -0
  61. package/dist/{src-D05isEh_.js → src-BNlyCwOr.js} +141 -69
  62. package/dist/{src-Cs0dRc4X.js → src-CVlgjAlw.js} +1 -1
  63. package/dist/src-DMsnWyru.js +1184 -0
  64. package/dist/tokens.js +18 -8
  65. package/package.json +1 -1
  66. package/packages/foundations/src/tokens.stylex.ts +15 -5
  67. package/dist/packages/feedback/src/loading.d.ts +0 -7
  68. package/dist/src-C_heP5kL.js +0 -1264
  69. package/dist/src-DXsGTJgv.js +0 -969
@@ -1,5 +1,5 @@
1
- import { l as e } from "../src-C_heP5kL.js";
2
- import { s as t } from "../src-Cs0dRc4X.js";
1
+ import { l as e } from "../src-DMsnWyru.js";
2
+ import { s as t } from "../src-CVlgjAlw.js";
3
3
  import { n } from "../navigation-D2_sGy3C.js";
4
4
  import "@stylexjs/stylex";
5
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
@@ -57,7 +57,7 @@ function u({ open: n, onOpenChange: o, title: s, commands: c, trigger: u, placeh
57
57
  children: (e) => /* @__PURE__ */ i(a.Item, {
58
58
  value: e,
59
59
  disabled: e.disabled,
60
- className: "x78zum5 x9f619 x6s0dn4 xaml1ju x1uey4wk xwu7q15 xn9t2bk x5g2kb4 x1ok0vyi xbixft xpvm0e4 x1hz01jw xj57cvi xtqrqnz x1778rvt x1ypdohk xf2ykmf x1480za7 xd12npn xwj21n9 x1m8qfh3",
60
+ className: "x78zum5 x9f619 x6s0dn4 xaml1ju x17tes2r xwu7q15 xn9t2bk x5g2kb4 x1ok0vyi xbixft xpvm0e4 x1hz01jw xj57cvi xtqrqnz x1778rvt x1ypdohk xf2ykmf x1480za7 xd12npn xwj21n9 x1m8qfh3",
61
61
  onClick: () => {
62
62
  o(!1), e.onSelect();
63
63
  },
@@ -5,7 +5,21 @@ import "@stylexjs/stylex";
5
5
  import { jsx as i } from "react/jsx-runtime";
6
6
  import { Tabs as a } from "@base-ui/react/tabs";
7
7
  // packages/navigation/src/page-navigation.tsx
8
- function o({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections", embedded: a = !1 }) {
8
+ function o({ items: e, embedded: t = !1 }) {
9
+ return /* @__PURE__ */ i("div", {
10
+ "aria-hidden": !0,
11
+ inert: !0,
12
+ ...{
13
+ 0: { className: "x78zum5 xxhr3t xeuugli xw2csxc xso031l x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal" },
14
+ 1: { className: "x78zum5 xxhr3t xeuugli xw2csxc x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal x1qhh985" }
15
+ }[!!t | 0],
16
+ children: e.map((e) => /* @__PURE__ */ i("span", {
17
+ className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 x2lah0s xid9utz xn9t2bk x1doqdfy xkrqix3 xuxw1ft x153jb6y x1mkgjtd x1s9zmfe x1kl8fbi x1s928wv x1j6awrg x1ccaobo x1xrz1ek x3cntg4 xyhc2n1 x13qnu6 x9v5kkp x19rmrnh x1bqaal",
18
+ children: e.label
19
+ }, e.id))
20
+ });
21
+ }
22
+ function s({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections", embedded: a = !1 }) {
9
23
  return /* @__PURE__ */ i("nav", {
10
24
  "aria-label": r,
11
25
  tabIndex: 0,
@@ -30,11 +44,11 @@ function o({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections",
30
44
  });
31
45
  }
32
46
  // packages/navigation/src/skip-link.tsx
33
- function s(e) {
47
+ function c(e) {
34
48
  return /* @__PURE__ */ i("a", { ...r({ className: "xixxii4 x1ridm32 x12hha37 xkwijxb x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
35
49
  }
36
50
  // packages/navigation/src/tabs.tsx
37
- function c({ className: e, style: t, ...r }) {
51
+ function l({ className: e, style: t, ...r }) {
38
52
  return /* @__PURE__ */ i(a.Root, {
39
53
  ...r,
40
54
  ...n({
@@ -44,7 +58,7 @@ function c({ className: e, style: t, ...r }) {
44
58
  })
45
59
  });
46
60
  }
47
- function l({ className: e, style: t, ...r }) {
61
+ function u({ className: e, style: t, ...r }) {
48
62
  return /* @__PURE__ */ i(a.List, {
49
63
  ...r,
50
64
  ...n({
@@ -54,7 +68,7 @@ function l({ className: e, style: t, ...r }) {
54
68
  })
55
69
  });
56
70
  }
57
- function u({ className: e, style: t, ...r }) {
71
+ function d({ className: e, style: t, ...r }) {
58
72
  return /* @__PURE__ */ i(a.Tab, {
59
73
  ...r,
60
74
  ...n({
@@ -64,7 +78,7 @@ function u({ className: e, style: t, ...r }) {
64
78
  })
65
79
  });
66
80
  }
67
- function d({ className: e, style: t, ...r }) {
81
+ function f({ className: e, style: t, ...r }) {
68
82
  return /* @__PURE__ */ i(a.Panel, {
69
83
  ...r,
70
84
  ...n({
@@ -74,10 +88,10 @@ function d({ className: e, style: t, ...r }) {
74
88
  })
75
89
  });
76
90
  }
77
- var f = {
78
- Root: c,
79
- List: l,
80
- Tab: u,
81
- Panel: d
91
+ var p = {
92
+ Root: l,
93
+ List: u,
94
+ Tab: d,
95
+ Panel: f
82
96
  };
83
- export { t as Breadcrumb, e as Kbd, o as PageNavigation, s as SkipLink, f as Tabs };
97
+ export { t as Breadcrumb, e as Kbd, s as PageNavigation, o as PageNavigationPlaceholder, c as SkipLink, p as Tabs };
package/dist/overlays.js CHANGED
@@ -1 +1 @@
1
- export { o as AlertDialog, s as Dialog, a as Drawer, i as Menu, r as Popover, n as Preview, t as Tooltip } from "./src-Cs0dRc4X.js";
1
+ export { o as AlertDialog, s as Dialog, a as Drawer, i as Menu, r as Popover, n as Preview, t as Tooltip } from "./src-CVlgjAlw.js";
@@ -8,7 +8,7 @@ export type { MessageActionProps } from './message-action.tsx';
8
8
  export { MessageAction } from './message-action.tsx';
9
9
  export type { MessageBoundaryProps } from './message-boundary.tsx';
10
10
  export { MessageBoundary } from './message-boundary.tsx';
11
- export type { PromptInputProps } from './prompt-input.tsx';
12
- export { PromptInput } from './prompt-input.tsx';
11
+ export type { PromptInputProps, PromptInputPlaceholderProps } from './prompt-input.tsx';
12
+ export { PromptInput, PromptInputPlaceholder } from './prompt-input.tsx';
13
13
  export type { Source, SourcesProps, InlineCitationProps } from './sources.tsx';
14
14
  export { Sources, InlineCitation } from './sources.tsx';
@@ -1,4 +1,8 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
+ export type PromptInputPlaceholderProps = {
3
+ readonly compact?: boolean;
4
+ };
5
+ export declare function PromptInputPlaceholder({ compact }: PromptInputPlaceholderProps): ReactNode;
2
6
  export type PromptInputProps = {
3
7
  readonly label: string;
4
8
  readonly value: string;
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export type CollectionToolbarProps = {
3
3
  readonly label: string;
4
- readonly children: ReactNode;
4
+ readonly children?: ReactNode;
5
5
  readonly actions?: ReactNode;
6
6
  };
7
7
  export declare function CollectionToolbar({ label, children, actions }: CollectionToolbarProps): ReactNode;
@@ -1,22 +1,40 @@
1
1
  import type { ReactNode } from 'react';
2
- type ColumnAlignment = 'start' | 'end';
2
+ type TableSizing = 'content' | 'fill';
3
3
  type RowSizing = 'fixed' | 'content';
4
- export type DataTableColumn<Row> = {
4
+ export type DataTableColumnRole = 'primary' | 'text' | 'status' | 'number' | 'timestamp' | 'actions';
5
+ export type DataTableColumnLayout = {
5
6
  readonly id: string;
6
7
  readonly label: string;
7
- readonly cell: (row: Row) => ReactNode;
8
- readonly align?: ColumnAlignment;
8
+ readonly role: DataTableColumnRole;
9
9
  readonly width?: number;
10
10
  readonly secondary?: boolean;
11
+ };
12
+ export type DataTableColumn<Row> = DataTableColumnLayout & {
13
+ readonly cell: (row: Row) => ReactNode;
11
14
  readonly truncate?: boolean;
12
15
  readonly sortable?: boolean;
13
16
  };
17
+ export type DataTablePlaceholderProps = {
18
+ readonly columns: ReadonlyArray<DataTableColumnLayout & {
19
+ readonly placeholder?: ReactNode;
20
+ }>;
21
+ readonly sizing?: TableSizing;
22
+ readonly rowSizing?: RowSizing;
23
+ readonly hideHeaders?: boolean;
24
+ };
25
+ export declare function DataTablePlaceholder({ columns: suppliedColumns, sizing, rowSizing, hideHeaders, }: DataTablePlaceholderProps): ReactNode;
14
26
  export type DataTableTextProps = {
15
27
  readonly children: string;
16
28
  readonly secondary?: string | undefined;
17
29
  readonly leading?: ReactNode;
30
+ readonly trailing?: ReactNode;
31
+ };
32
+ export type DataTableTextPlaceholderProps = {
33
+ readonly leading?: ReactNode;
34
+ readonly secondary?: boolean;
18
35
  };
19
- export declare function DataTableText({ children, secondary, leading }: DataTableTextProps): ReactNode;
36
+ export declare function DataTableText({ children, secondary, leading, trailing }: DataTableTextProps): ReactNode;
37
+ export declare function DataTableTextPlaceholder({ leading, secondary }: DataTableTextPlaceholderProps): ReactNode;
20
38
  export type DataTableSort = {
21
39
  readonly columnId: string;
22
40
  readonly direction: 'ascending' | 'descending';
@@ -71,5 +89,5 @@ export type DataTableProps<Row> = SortProperties<Row> & OptionalSelection<Row> &
71
89
  readonly onEndReached?: () => void;
72
90
  readonly footer?: ReactNode;
73
91
  };
74
- export declare function DataTable<Row extends object>({ rows, columns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, }: DataTableProps<Row>): ReactNode;
92
+ export declare function DataTable<Row extends object>({ rows, columns: suppliedColumns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, rowAction, activeRowId, focusRowId, hideCaption, hideHeaders, rowSizing, window, endContent, onEndReached, footer, }: DataTableProps<Row>): ReactNode;
75
93
  export {};
@@ -1,7 +1,7 @@
1
1
  export type { CollectionToolbarProps, FilterChip, FilterChipsProps, ColumnChoice, ColumnControlsProps, CollectionPaginationProps, } from './collection-controls.tsx';
2
2
  export { CollectionToolbar, FilterChips, ColumnControls, CollectionPagination } from './collection-controls.tsx';
3
- export type { DataTableColumn, DataTableSort, DataTableWindow, DataTableProps, DataTableRowAction, DataTableTextProps, } from './data-table.tsx';
4
- export { DataTable, DataTableText } from './data-table.tsx';
3
+ export type { DataTableColumn, DataTableColumnLayout, DataTablePlaceholderProps, DataTableColumnRole, DataTableSort, DataTableWindow, DataTableProps, DataTableRowAction, DataTableTextProps, DataTableTextPlaceholderProps, } from './data-table.tsx';
4
+ export { DataTable, DataTableText, DataTablePlaceholder, DataTableTextPlaceholder } from './data-table.tsx';
5
5
  export type { CollectionEndProps, CollectionScrollProps } from './collection-scroll.tsx';
6
6
  export { CollectionEnd, CollectionScroll } from './collection-scroll.tsx';
7
7
  export type { InspectorProps } from './inspector.tsx';
@@ -1,10 +1,9 @@
1
1
  import { Button as BaseButton } from '@base-ui/react/button';
2
2
  import { useRender } from '@base-ui/react/use-render';
3
3
  import type { ComponentProps, ReactNode } from 'react';
4
- import type { ControlStyle, PlacementStyle } from '../../foundations/src/style-composition.ts';
4
+ import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
5
5
  type ButtonVariant = 'solid' | 'outline' | 'ghost';
6
6
  type ButtonTone = 'neutral' | 'danger';
7
- type ControlSize = 'sm' | 'md';
8
7
  type PendingProps = {
9
8
  readonly pending?: boolean;
10
9
  readonly pendingLabel?: string | undefined;
@@ -12,15 +11,13 @@ type PendingProps = {
12
11
  type ButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
13
12
  readonly variant?: ButtonVariant;
14
13
  readonly tone?: ButtonTone;
15
- readonly size?: ControlSize;
16
- readonly xstyle?: ControlStyle;
14
+ readonly xstyle?: PlacementStyle;
17
15
  };
18
16
  type IconButtonProps = Omit<ButtonProps, 'aria-label' | 'pendingLabel'> & {
19
17
  readonly 'aria-label': string;
20
18
  };
21
19
  type IconLinkProps = Omit<useRender.ComponentProps<'a'>, 'aria-label'> & {
22
20
  readonly 'aria-label': string;
23
- readonly 'size'?: ControlSize;
24
21
  readonly 'xstyle'?: PlacementStyle;
25
22
  };
26
23
  type TextButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
@@ -30,9 +27,9 @@ type TextButtonProps = ComponentProps<typeof BaseButton> & PendingProps & {
30
27
  type TextLinkProps = ComponentProps<'a'> & {
31
28
  readonly xstyle?: PlacementStyle;
32
29
  };
33
- export declare function Button({ variant, tone, size, pending, pendingLabel, children, className, style, xstyle, disabled, ...props }: ButtonProps): ReactNode;
34
- export declare function IconButton({ size, children, xstyle, ...props }: IconButtonProps): ReactNode;
30
+ export declare function Button(props: ButtonProps): ReactNode;
31
+ export declare function IconButton({ children, ...props }: IconButtonProps): ReactNode;
35
32
  export declare function TextButton({ tone, pending, pendingLabel, children, className, style, xstyle, disabled, ...props }: TextButtonProps): ReactNode;
36
33
  export declare function TextLink({ xstyle, ...props }: TextLinkProps): ReactNode;
37
- export declare function IconLink({ size, children, xstyle, render, ref, ...props }: IconLinkProps): ReactNode;
34
+ export declare function IconLink({ children, xstyle, render, ref, ...props }: IconLinkProps): ReactNode;
38
35
  export {};
@@ -1,17 +1,23 @@
1
1
  import type { ReactNode } from 'react';
2
+ export type LoadingScopeProps = {
3
+ readonly identity: string | number;
4
+ readonly children: ReactNode;
5
+ };
6
+ export declare function LoadingScope({ identity, children }: LoadingScopeProps): ReactNode;
2
7
  export type ContentRevealProps = {
3
8
  readonly enter: boolean;
4
- readonly fill?: boolean | undefined;
5
9
  readonly children: ReactNode;
6
10
  };
7
- export declare function ContentReveal({ enter, fill, children }: ContentRevealProps): ReactNode;
11
+ export declare function ContentReveal({ enter, children }: ContentRevealProps): ReactNode;
12
+ export type AsyncRegionState = 'pending' | 'ready' | 'failed';
8
13
  export type AsyncRegionProps = {
9
- readonly pending: boolean;
10
14
  readonly label: string;
11
15
  readonly placeholder: ReactNode;
12
- readonly children?: ReactNode;
13
- readonly fill?: boolean | undefined;
14
- readonly startedAt?: number | undefined;
15
- readonly delayMs?: number | undefined;
16
- };
17
- export declare function AsyncRegion({ pending, label, placeholder, children, fill, startedAt, delayMs, }: AsyncRegionProps): ReactNode;
16
+ } & ({
17
+ readonly state: 'pending';
18
+ readonly children?: never;
19
+ } | {
20
+ readonly state: 'ready' | 'failed';
21
+ readonly children: ReactNode;
22
+ });
23
+ export declare function AsyncRegion(props: AsyncRegionProps): ReactNode;
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
3
+ export type ButtonPlaceholderProps = {
4
+ readonly xstyle?: PlacementStyle;
5
+ } & ({
6
+ readonly icon: true;
7
+ readonly width?: never;
8
+ } | {
9
+ readonly icon?: false;
10
+ readonly width?: number | string;
11
+ });
12
+ export type FieldPlaceholderProps = {
13
+ readonly label?: string;
14
+ readonly hint?: string;
15
+ readonly multiline?: boolean;
16
+ readonly rows?: number;
17
+ readonly width?: number | string;
18
+ readonly xstyle?: PlacementStyle;
19
+ };
20
+ export declare function ButtonPlaceholder({ width, icon, xstyle }: ButtonPlaceholderProps): ReactNode;
21
+ export declare function FieldPlaceholder({ label, hint, multiline, rows, width, xstyle, }: FieldPlaceholderProps): ReactNode;
@@ -1,5 +1,6 @@
1
1
  export { EmptyState, Notice } from './feedback.tsx';
2
- export { Loading } from './loading.tsx';
2
+ export type { ButtonPlaceholderProps, FieldPlaceholderProps } from './control-placeholders.tsx';
3
+ export { ButtonPlaceholder, FieldPlaceholder } from './control-placeholders.tsx';
3
4
  export type { ProgressProps, MeterProps } from './progress.tsx';
4
5
  export { Progress, Meter } from './progress.tsx';
5
6
  export type { SkeletonProps, SkeletonTextProps, SpinnerProps } from './skeleton.tsx';
@@ -8,5 +9,5 @@ export type { ExternalToast as ToastOptions } from 'sonner';
8
9
  export { toast } from 'sonner';
9
10
  export type { ToasterProps } from './toast.tsx';
10
11
  export { Toaster } from './toast.tsx';
11
- export type { AsyncRegionProps, ContentRevealProps } from './async-region.tsx';
12
- export { AsyncRegion, ContentReveal } from './async-region.tsx';
12
+ export type { AsyncRegionProps, AsyncRegionState, ContentRevealProps, LoadingScopeProps } from './async-region.tsx';
13
+ export { AsyncRegion, ContentReveal, LoadingScope } from './async-region.tsx';
@@ -1,29 +1,5 @@
1
1
  import * as stylex from '@stylexjs/stylex';
2
2
  export declare const fieldStyles: Readonly<{
3
- readonly root: Readonly<{
4
- readonly display: stylex.StyleXClassNameFor<"display", "flex">;
5
- readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
6
- readonly gap: stylex.StyleXClassNameFor<"gap", string>;
7
- readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
8
- readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
9
- readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
10
- readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
11
- }>;
12
- readonly label: Readonly<{
13
- readonly color: stylex.StyleXClassNameFor<"color", string>;
14
- readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
15
- readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
16
- readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
17
- readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
18
- readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
19
- }>;
20
- readonly description: Readonly<{
21
- readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
22
- readonly color: stylex.StyleXClassNameFor<"color", string>;
23
- readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
24
- readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
25
- readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
26
- }>;
27
3
  readonly error: Readonly<{
28
4
  readonly color: stylex.StyleXClassNameFor<"color", string>;
29
5
  readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
@@ -31,24 +7,6 @@ export declare const fieldStyles: Readonly<{
31
7
  readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
32
8
  }>;
33
9
  readonly input: Readonly<{
34
- readonly display: stylex.StyleXClassNameFor<"display", "block">;
35
- readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
36
- readonly width: stylex.StyleXClassNameFor<"width", "100%">;
37
- readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
38
- readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
39
- readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
40
- readonly color: stylex.StyleXClassNameFor<"color", string>;
41
- readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
42
- readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
43
- readonly borderColor: stylex.StyleXClassNameFor<"borderColor", string>;
44
- readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
45
- readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
46
- readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
47
- readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
48
- readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
49
- readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
50
- readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
51
- readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
52
10
  readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
53
11
  readonly outlineWidth: stylex.StyleXVar<string>;
54
12
  readonly outlineStyle: "solid";
@@ -67,40 +25,10 @@ export declare const fieldStyles: Readonly<{
67
25
  readonly color: stylex.StyleXVar<string>;
68
26
  }>;
69
27
  }>;
70
- readonly textarea: Readonly<{
71
- readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 144>;
72
- readonly resize: stylex.StyleXClassNameFor<"resize", "vertical">;
73
- readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
74
- }>;
75
28
  readonly compactTextarea: Readonly<{
76
29
  readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 80>;
77
30
  readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "30dvh">;
78
31
  }>;
79
32
  }>;
80
- export declare const textareaAppearanceStyles: Readonly<{
81
- readonly field: {};
82
- readonly plain: Readonly<{
83
- readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
84
- readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "30dvh">;
85
- readonly fieldSizing: stylex.StyleXClassNameFor<"fieldSizing", "content">;
86
- readonly resize: stylex.StyleXClassNameFor<"resize", "none">;
87
- readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
88
- readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
89
- readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", 0>;
90
- readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
91
- readonly ':focus-visible': stylex.StyleXClassNameFor<":focus-visible", {
92
- readonly outlineStyle: "none";
93
- }>;
94
- readonly ':disabled': stylex.StyleXClassNameFor<":disabled", {
95
- readonly backgroundColor: "transparent";
96
- }>;
97
- }>;
98
- }>;
99
- export declare const inputSizeStyles: Readonly<{
100
- readonly sm: Readonly<{
101
- readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
102
- readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
103
- readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
104
- }>;
105
- readonly md: {};
106
- }>;
33
+ export type TextareaAppearance = 'field' | 'plain';
34
+ export declare const textareaAppearanceStyles: Readonly<Record<TextareaAppearance, stylex.StyleXStyles>>;
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
3
+ type FormActionsAlignment = 'start' | 'end';
4
+ export type FormActionsProps = {
5
+ readonly children: ReactNode;
6
+ readonly align?: FormActionsAlignment;
7
+ readonly separated?: boolean;
8
+ readonly xstyle?: PlacementStyle;
9
+ };
10
+ export declare function FormActions({ children, align, separated, xstyle }: FormActionsProps): ReactNode;
11
+ export {};
@@ -39,7 +39,7 @@ declare function FieldsetRoot({ className, style, xstyle, ...props }: FieldsetRo
39
39
  declare function FieldsetLegend({ className, style, ...props }: FieldsetLegendProps): ReactNode;
40
40
  declare function InputGroupRoot({ xstyle, ...props }: InputGroupRootProps): ReactNode;
41
41
  declare function InputGroupAddon(props: InputGroupAddonProps): ReactNode;
42
- declare function InputGroupInput({ className, style, xstyle, size, ...props }: InputProps): ReactNode;
42
+ declare function InputGroupInput({ className, style, xstyle, ...props }: InputProps): ReactNode;
43
43
  declare function NumberFieldRoot({ className, style, xstyle, ...props }: NumberFieldRootProps): ReactNode;
44
44
  declare function NumberFieldGroup({ className, style, ...props }: NumberFieldGroupProps): ReactNode;
45
45
  declare function NumberFieldInput({ className, style, ...props }: NumberFieldInputProps): ReactNode;
@@ -3,6 +3,7 @@ import { Input as BaseInput } from '@base-ui/react/input';
3
3
  import type { ComponentProps, ReactNode } from 'react';
4
4
  import type { TextValueProperties } from '../../foundations/src/control-state.ts';
5
5
  import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
6
+ import type { TextareaAppearance } from './field-styles.ts';
6
7
  type FieldRootProps = ComponentProps<typeof BaseField.Root> & {
7
8
  readonly xstyle?: PlacementStyle;
8
9
  };
@@ -11,14 +12,13 @@ type FieldDescriptionProps = ComponentProps<typeof BaseField.Description>;
11
12
  type FieldErrorProps = ComponentProps<typeof BaseField.Error>;
12
13
  type BaseInputProps = ComponentProps<typeof BaseInput>;
13
14
  export type InputProps = Omit<BaseInputProps, 'value' | 'defaultValue' | 'onChange' | 'onValueChange' | 'readOnly' | 'size'> & TextValueProperties<NonNullable<BaseInputProps['value']>, NonNullable<BaseInputProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
14
- readonly size?: 'sm' | 'md';
15
15
  readonly xstyle?: PlacementStyle;
16
16
  };
17
17
  type NativeTextareaProps = ComponentProps<'textarea'>;
18
18
  type TextareaProps = Omit<NativeTextareaProps, 'value' | 'defaultValue' | 'onChange' | 'readOnly'> & TextValueProperties<NonNullable<NativeTextareaProps['value']>, NonNullable<NativeTextareaProps['onChange']>, NonNullable<BaseInputProps['onValueChange']>> & {
19
19
  readonly xstyle?: PlacementStyle;
20
20
  readonly compact?: boolean;
21
- readonly appearance?: 'field' | 'plain';
21
+ readonly appearance?: TextareaAppearance;
22
22
  };
23
23
  declare function FieldRoot({ className, style, xstyle, ...props }: FieldRootProps): ReactNode;
24
24
  declare function FieldLabel({ className, style, ...props }: FieldLabelProps): ReactNode;
@@ -30,6 +30,6 @@ export declare const Field: {
30
30
  Description: typeof FieldDescription;
31
31
  Error: typeof FieldError;
32
32
  };
33
- export declare function Input({ className, style, xstyle, size, ...props }: InputProps): ReactNode;
33
+ export declare function Input({ className, style, xstyle, ...props }: InputProps): ReactNode;
34
34
  export declare function Textarea({ compact, appearance, value, defaultValue, onValueChange, name, disabled, readOnly, required, className, style, xstyle, ...props }: TextareaProps): ReactNode;
35
35
  export {};
@@ -2,6 +2,8 @@ export { Combobox } from './combobox.tsx';
2
2
  export type { AgentAvatarPickerProps } from './agent-avatar-picker.tsx';
3
3
  export { AgentAvatarPicker } from './agent-avatar-picker.tsx';
4
4
  export { FilePicker, Fieldset, InputGroup, NumberField, Slider } from './form-controls.tsx';
5
+ export type { FormActionsProps } from './form-actions.tsx';
6
+ export { FormActions } from './form-actions.tsx';
5
7
  export { Field, Input, Textarea } from './forms.tsx';
6
8
  export { Select } from './select.tsx';
7
9
  export { Checkbox, RadioGroup, Switch, ToggleGroup } from './selection.tsx';
@@ -1,12 +1,12 @@
1
1
  import { Select as BaseSelect } from '@base-ui/react/select';
2
2
  import type { ComponentProps, ReactNode } from 'react';
3
3
  import type { OpenStateProperties, ReadOnlyValueProperties, ValueStateProperties } from '../../foundations/src/control-state.ts';
4
- import type { ControlStyle, PlacementStyle } from '../../foundations/src/style-composition.ts';
4
+ import type { PlacementStyle } from '../../foundations/src/style-composition.ts';
5
5
  type SelectVariant = 'outline' | 'ghost';
6
6
  type SelectRootProps<Value, Multiple extends boolean | undefined> = Omit<BaseSelect.Root.Props<Value, Multiple>, 'value' | 'defaultValue' | 'onValueChange' | 'open' | 'defaultOpen' | 'onOpenChange'> & OpenStateProperties<NonNullable<BaseSelect.Root.Props<Value, Multiple>['onOpenChange']>> & (ValueStateProperties<Exclude<BaseSelect.Root.Props<Value, Multiple>['value'], undefined>, NonNullable<BaseSelect.Root.Props<Value, Multiple>['onValueChange']>> | ReadOnlyValueProperties<Exclude<BaseSelect.Root.Props<Value, Multiple>['value'], undefined>, NonNullable<BaseSelect.Root.Props<Value, Multiple>['onValueChange']>>);
7
7
  type SelectTriggerProps = ComponentProps<typeof BaseSelect.Trigger> & {
8
8
  readonly variant?: SelectVariant;
9
- readonly xstyle?: ControlStyle;
9
+ readonly xstyle?: PlacementStyle;
10
10
  };
11
11
  type SelectValueProps = ComponentProps<typeof BaseSelect.Value> & {
12
12
  readonly xstyle?: PlacementStyle;
@@ -3,22 +3,10 @@ import { conditions } from '../../foundations/src/tokens.stylex.ts';
3
3
  export declare const selectionStyles: Readonly<{
4
4
  readonly trigger: Readonly<{
5
5
  readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
6
- readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
7
6
  readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
8
7
  readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
9
8
  readonly gap: stylex.StyleXClassNameFor<"gap", string>;
10
- readonly minHeight: stylex.StyleXClassNameFor<"minHeight", string>;
11
- readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", 0>;
12
- readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
13
9
  readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
14
- readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 1>;
15
- readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "solid">;
16
- readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
17
- readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
18
- readonly fontWeight: stylex.StyleXClassNameFor<"fontWeight", string>;
19
- readonly WebkitFontSmoothing: stylex.StyleXClassNameFor<"WebkitFontSmoothing", "antialiased">;
20
- readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
21
- readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
22
10
  readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "left">;
23
11
  readonly color: stylex.StyleXClassNameFor<"color", string>;
24
12
  readonly cursor: stylex.StyleXClassNameFor<"cursor", "pointer">;
@@ -51,7 +39,6 @@ export declare const selectionStyles: Readonly<{
51
39
  readonly ghost: Readonly<{
52
40
  readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
53
41
  readonly borderColor: stylex.StyleXClassNameFor<"borderColor", "transparent">;
54
- readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
55
42
  }>;
56
43
  readonly value: Readonly<{
57
44
  readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;