@imfusion/web-ui 0.6.4-dev.8.g41d03f2f → 0.7.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 (141) hide show
  1. package/CHANGELOG.md +391 -0
  2. package/README.md +22 -55
  3. package/dist/assets/vendors/base-ui.d.ts +2 -3
  4. package/dist/breakpoints/min-width.d.ts +3 -7
  5. package/dist/breakpoints/registry.d.ts +3 -9
  6. package/dist/{code-Ce8uiPsv.js → code-D2lwxHgd.js} +15 -15
  7. package/dist/codegen/gen-breakpoints-css.d.ts +0 -4
  8. package/dist/codegen/gen-token-css.d.ts +0 -2
  9. package/dist/components/app-shell/app-shell.d.ts +7 -11
  10. package/dist/components/button/button.d.ts +7 -12
  11. package/dist/components/callout/callout.d.ts +11 -18
  12. package/dist/components/card/card.d.ts +11 -10
  13. package/dist/components/checkbox/checkbox.d.ts +2 -38
  14. package/dist/components/chip/chip.cva.d.ts +2 -4
  15. package/dist/components/chip/chip.d.ts +1 -1
  16. package/dist/components/code/code.d.ts +2 -2
  17. package/dist/components/collapsible/collapsible.d.ts +4 -35
  18. package/dist/components/copy-button/copy-button.d.ts +1 -1
  19. package/dist/components/drawer/drawer.d.ts +17 -100
  20. package/dist/components/field/field.d.ts +7 -67
  21. package/dist/components/fieldset/fieldset.d.ts +2 -15
  22. package/dist/components/icon/icon.d.ts +2 -2
  23. package/dist/components/input/input.d.ts +2 -8
  24. package/dist/components/logo/imfusion/imfusion.d.ts +2 -5
  25. package/dist/components/logo/imfusion/marks.d.ts +10 -0
  26. package/dist/components/logo/logo.d.ts +3 -3
  27. package/dist/components/navigation-menu/subs/flyout-link.d.ts +5 -19
  28. package/dist/components/navigation-menu/subs/inline-submenu.d.ts +2 -4
  29. package/dist/components/navigation-menu/subs/link.d.ts +6 -23
  30. package/dist/components/navigation-menu/subs/overlay.d.ts +6 -51
  31. package/dist/components/navigation-menu/subs/shared.d.ts +4 -14
  32. package/dist/components/navigation-menu/subs/structure.d.ts +7 -29
  33. package/dist/components/navigation-menu/subs/trigger.d.ts +11 -20
  34. package/dist/components/number-field/index.d.ts +2 -0
  35. package/dist/components/number-field/number-field.d.ts +72 -0
  36. package/dist/components/number-field/number-field.meta.d.ts +2 -0
  37. package/dist/components/popover/popover.d.ts +23 -98
  38. package/dist/components/row/row.d.ts +1 -1
  39. package/dist/components/select/select.d.ts +26 -189
  40. package/dist/components/separator/separator.d.ts +5 -4
  41. package/dist/components/slider/slider.d.ts +7 -77
  42. package/dist/components/spinner/spinner.d.ts +13 -8
  43. package/dist/components/stack/stack.d.ts +3 -4
  44. package/dist/components/switch/switch.d.ts +2 -31
  45. package/dist/components/table/table.d.ts +10 -18
  46. package/dist/components/tabs/tabs.d.ts +18 -52
  47. package/dist/components/toast/toast.d.ts +16 -103
  48. package/dist/components/toggle/toggle.d.ts +3 -21
  49. package/dist/components/toggle-group/toggle-group.d.ts +3 -20
  50. package/dist/components/tooltip/tooltip.d.ts +26 -85
  51. package/dist/components/typo/typo.d.ts +25 -25
  52. package/dist/docgen/gen-docgen.utils.d.ts +3 -4
  53. package/dist/hooks/use-color-scheme.d.ts +5 -11
  54. package/dist/hooks/use-media-query.d.ts +2 -7
  55. package/dist/{icons-Cy1HAosO.js → icons-CaGCCwG-.js} +7 -7
  56. package/dist/icons.js +1 -1
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +1486 -1368
  59. package/dist/integrations/code-highlight/highlighter.d.ts +1 -56
  60. package/dist/integrations/code-highlight.js +41 -189
  61. package/dist/integrations/image-display-options/image-display-options-view.utils.d.ts +0 -1
  62. package/dist/integrations/image-display-options.js +54 -54
  63. package/dist/llms/evals/runner/affected.d.ts +2 -0
  64. package/dist/llms/evals/runner/benchmark.d.ts +12 -0
  65. package/dist/llms/evals/runner/compare.d.ts +2 -0
  66. package/dist/llms/evals/runner/config.d.ts +29 -0
  67. package/dist/llms/evals/runner/evidence.d.ts +7 -0
  68. package/dist/llms/evals/runner/execute.d.ts +32 -0
  69. package/dist/llms/evals/runner/grade.d.ts +10 -0
  70. package/dist/llms/evals/runner/report-md.d.ts +2 -0
  71. package/dist/llms/evals/runner/report.d.ts +4 -0
  72. package/dist/llms/evals/runner/run.d.ts +2 -0
  73. package/dist/llms/evals/runner/scenario.d.ts +3 -0
  74. package/dist/llms/evals/runner/types.d.ts +140 -0
  75. package/dist/llms/evals/runner/workspace.d.ts +2 -0
  76. package/dist/llms/evals/runner/write-generated.d.ts +1 -0
  77. package/dist/provider/web-ui-provider.d.ts +4 -1
  78. package/dist/style.css +1 -1
  79. package/dist/tabs-BS6rqrrA.js +398 -0
  80. package/dist/tokens/apply.d.ts +4 -9
  81. package/dist/tokens/control-registry.d.ts +3 -6
  82. package/dist/tokens/types.d.ts +7 -24
  83. package/dist/tokens/use-token-controls.d.ts +3 -12
  84. package/dist/types/meta.d.ts +15 -32
  85. package/dist/utils/index.d.ts +1 -0
  86. package/dist/utils/resolve-state-props.d.ts +4 -0
  87. package/dist/vite/brand-assets.d.ts +3 -0
  88. package/dist/vite/index.d.ts +2 -0
  89. package/dist/vite/readable-css-module-names.d.ts +11 -0
  90. package/dist/vite.js +55 -0
  91. package/dist/web-ui-cli.js +322 -0
  92. package/docs/user-guide/AgentTooling.mdx +133 -0
  93. package/docs/user-guide/BrandAssets.mdx +103 -0
  94. package/docs/user-guide/Changelog.mdx +26 -0
  95. package/docs/user-guide/GettingStarted.mdx +71 -0
  96. package/docs/user-guide/HowItsBuilt.mdx +114 -0
  97. package/docs/user-guide/Tokens.mdx +88 -0
  98. package/docs/user-guide/UsagePatterns.mdx +123 -0
  99. package/package.json +28 -22
  100. package/src/assets/public/favicon/apple-touch-icon.png +0 -0
  101. package/src/assets/public/favicon/favicon-16.png +0 -0
  102. package/src/assets/public/favicon/favicon-32.png +0 -0
  103. package/src/assets/public/favicon/favicon.ico +0 -0
  104. package/src/assets/public/favicon/favicon.svg +7 -0
  105. package/src/assets/public/favicon/icon-192.png +0 -0
  106. package/src/assets/public/favicon/icon-512.png +0 -0
  107. package/src/assets/public/favicon/og-image.png +0 -0
  108. package/src/assets/public/spinner/imfusion-spinner-black.webp +0 -0
  109. package/src/assets/public/spinner/imfusion-spinner-blue.webp +0 -0
  110. package/src/assets/public/spinner/imfusion-spinner-white.webp +0 -0
  111. package/src/docgen/doc.gen.json +3255 -603
  112. package/src/llms/install-templates/AGENTS.md +4 -4
  113. package/src/llms/install-templates/hooks/baseline-staleness.sh +9 -2
  114. package/src/llms/llms.gen.txt +7 -1
  115. package/src/llms/skills/imf-web-ui/SKILL.md +44 -21
  116. package/src/llms/skills/imf-web-ui-audit/SKILL.md +25 -11
  117. package/src/llms/skills/imf-web-ui-components/SKILL.md +7 -3
  118. package/src/llms/skills/imf-web-ui-conventions/SKILL.md +3 -2
  119. package/src/llms/skills/imf-web-ui-conventions/templates/AUDIT_CHECKLIST.md +0 -1
  120. package/src/llms/skills/imf-web-ui-conventions/templates/REPORT.md +21 -2
  121. package/src/llms/skills/imf-web-ui-conventions/topics/agent-tooling.md +15 -10
  122. package/src/llms/skills/imf-web-ui-conventions/topics/assets.md +7 -4
  123. package/src/llms/skills/imf-web-ui-conventions/topics/data.md +3 -1
  124. package/src/llms/skills/imf-web-ui-conventions/topics/docs-structure.md +2 -2
  125. package/src/llms/skills/imf-web-ui-conventions/topics/git.md +4 -2
  126. package/src/llms/skills/imf-web-ui-conventions/topics/library-setup.md +10 -1
  127. package/src/llms/skills/imf-web-ui-conventions/topics/styling.md +2 -2
  128. package/src/llms/skills/imf-web-ui-conventions/topics/tokens.md +4 -2
  129. package/src/llms/skills/imf-web-ui-conventions/topics/tooling.md +13 -11
  130. package/src/llms/skills/imf-web-ui-setup/SKILL.md +17 -9
  131. package/src/llms/skills/imf-web-ui-update/SKILL.md +47 -19
  132. package/src/llms/skills/imf-web-ui-ux/SKILL.md +6 -3
  133. package/src/llms/tokens.gen.json +79 -15
  134. package/bin/install.js +0 -446
  135. package/dist/build/vite-css-module-names/index.d.ts +0 -20
  136. package/dist/build/vite-css-module-names.js +0 -17
  137. package/dist/components/spinner/spinner.geometry.d.ts +0 -37
  138. package/dist/integrations/code-highlight/languages/cmake.d.ts +0 -1
  139. package/dist/integrations/code-highlight/languages/cpp.d.ts +0 -1
  140. package/dist/tabs-DIe1Utiy.js +0 -371
  141. /package/dist/{meta-CySnRuVp.js → meta-j-7HGrWv.js} +0 -0
@@ -1,104 +1,44 @@
1
1
  import { Field as FieldPrimitive } from '@base-ui/react/field';
2
- type UpstreamRoot = React.ComponentProps<typeof FieldPrimitive.Root>;
3
- type UpstreamItem = React.ComponentProps<typeof FieldPrimitive.Item>;
4
- type UpstreamLabel = React.ComponentProps<typeof FieldPrimitive.Label>;
5
- type UpstreamDescription = React.ComponentProps<typeof FieldPrimitive.Description>;
6
- type UpstreamControl = React.ComponentProps<typeof FieldPrimitive.Control>;
7
- type UpstreamError = React.ComponentProps<typeof FieldPrimitive.Error>;
8
- type UpstreamValidity = React.ComponentProps<typeof FieldPrimitive.Validity>;
9
- type RootProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
10
- name?: string;
11
- actionsRef?: UpstreamRoot["actionsRef"];
12
- dirty?: boolean;
13
- touched?: boolean;
14
- /** @default false */
15
- disabled?: boolean;
16
- invalid?: boolean;
17
- validate?: UpstreamRoot["validate"];
18
- /** @default "onSubmit" */
19
- validationMode?: UpstreamRoot["validationMode"];
20
- /** @default 0 */
21
- validationDebounceTime?: number;
22
- className?: UpstreamRoot["className"];
23
- style?: UpstreamRoot["style"];
24
- render?: UpstreamRoot["render"];
25
- };
26
2
  /**
27
3
  * Field.Root — groups a label, control, validation state, and supporting copy.
28
4
  *
29
5
  * @doc https://base-ui.com/react/components/field
30
6
  * @llm https://base-ui.com/react/components/field.md
31
7
  */
32
- export declare function Root({ className, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Root(props: React.ComponentProps<typeof FieldPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
33
9
  export declare namespace Root {
34
10
  var displayName: string;
35
11
  }
36
- type ItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
37
- /** @default false */
38
- disabled?: boolean;
39
- className?: UpstreamItem["className"];
40
- style?: UpstreamItem["style"];
41
- render?: UpstreamItem["render"];
42
- };
43
12
  /** Field.Item — groups one checkable option with its label and description. */
44
- export declare function Item({ className, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Item(props: React.ComponentProps<typeof FieldPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
45
14
  export declare namespace Item {
46
15
  var displayName: string;
47
16
  }
48
- type LabelProps = Omit<React.LabelHTMLAttributes<HTMLLabelElement>, "className" | "style"> & {
49
- /** @default true */
50
- nativeLabel?: boolean;
51
- className?: UpstreamLabel["className"];
52
- style?: UpstreamLabel["style"];
53
- render?: UpstreamLabel["render"];
54
- };
55
17
  /** Field.Label — an accessible label automatically associated with the control. */
56
- export declare function Label({ className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Label(props: React.ComponentProps<typeof FieldPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
57
19
  export declare namespace Label {
58
20
  var displayName: string;
59
21
  }
60
- type DescriptionProps = Omit<React.HTMLAttributes<HTMLParagraphElement>, "className" | "style"> & {
61
- className?: UpstreamDescription["className"];
62
- style?: UpstreamDescription["style"];
63
- render?: UpstreamDescription["render"];
64
- };
65
22
  /** Field.Description — supporting information for a field. */
66
- export declare function Description({ className, ...props }: DescriptionProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Description(props: React.ComponentProps<typeof FieldPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
67
24
  export declare namespace Description {
68
25
  var displayName: string;
69
26
  }
70
- type ControlProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "defaultValue"> & {
71
- defaultValue?: UpstreamControl["defaultValue"];
72
- onValueChange?: UpstreamControl["onValueChange"];
73
- className?: UpstreamControl["className"];
74
- style?: UpstreamControl["style"];
75
- render?: UpstreamControl["render"];
76
- };
77
27
  /** Field.Control — a native input control with Field labeling and validation. */
78
- export declare function Control({ className, ...props }: ControlProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function Control(props: React.ComponentProps<typeof FieldPrimitive.Control>): import("react/jsx-runtime").JSX.Element;
79
29
  export declare namespace Control {
80
30
  var displayName: string;
81
31
  }
82
- type ErrorProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
83
- match?: UpstreamError["match"];
84
- className?: UpstreamError["className"];
85
- style?: UpstreamError["style"];
86
- render?: UpstreamError["render"];
87
- };
88
32
  /** Field.Error — an inline validation message shown when its match condition fails. */
89
- export declare function Error({ className, ...props }: ErrorProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function Error(props: React.ComponentProps<typeof FieldPrimitive.Error>): import("react/jsx-runtime").JSX.Element;
90
34
  export declare namespace Error {
91
35
  var displayName: string;
92
36
  }
93
- type ValidityProps = {
94
- children: UpstreamValidity["children"];
95
- };
96
37
  /**
97
38
  * Field.Validity — renderless access to the field validity data for custom messages.
98
39
  * Its function child owns the rendered element and therefore its identity and styling.
99
40
  */
100
- export declare function Validity({ children }: ValidityProps): import("react/jsx-runtime").JSX.Element;
41
+ export declare function Validity({ children }: React.ComponentProps<typeof FieldPrimitive.Validity>): import("react/jsx-runtime").JSX.Element;
101
42
  export declare namespace Validity {
102
43
  var displayName: string;
103
44
  }
104
- export {};
@@ -1,29 +1,16 @@
1
1
  import { Fieldset as FieldsetPrimitive } from '@base-ui/react/fieldset';
2
- type UpstreamRoot = React.ComponentProps<typeof FieldsetPrimitive.Root>;
3
- type UpstreamLegend = React.ComponentProps<typeof FieldsetPrimitive.Legend>;
4
- type RootProps = Omit<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, "className" | "style"> & {
5
- className?: UpstreamRoot["className"];
6
- style?: UpstreamRoot["style"];
7
- render?: UpstreamRoot["render"];
8
- };
9
2
  /**
10
3
  * Fieldset.Root — semantic grouping for related form controls and a shared legend.
11
4
  *
12
5
  * @doc https://base-ui.com/react/components/fieldset
13
6
  * @llm https://base-ui.com/react/components/fieldset.md
14
7
  */
15
- export declare function Root({ className, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Root(props: React.ComponentProps<typeof FieldsetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
16
9
  export declare namespace Root {
17
10
  var displayName: string;
18
11
  }
19
- type LegendProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> & {
20
- className?: UpstreamLegend["className"];
21
- style?: UpstreamLegend["style"];
22
- render?: UpstreamLegend["render"];
23
- };
24
12
  /** Fieldset.Legend — the accessible label for its related controls. */
25
- export declare function Legend({ className, ...props }: LegendProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Legend(props: React.ComponentProps<typeof FieldsetPrimitive.Legend>): import("react/jsx-runtime").JSX.Element;
26
14
  export declare namespace Legend {
27
15
  var displayName: string;
28
16
  }
29
- export {};
@@ -3,7 +3,7 @@ import { IconComponent } from './types';
3
3
  export declare const ICON_VARIANTS: readonly ["inherit", "main", "support", "minor", "brand", "primary", "positive", "negative", "warning", "info", "oncolor", "accent-1", "accent-2", "accent-3"];
4
4
  export type IconVariant = (typeof ICON_VARIANTS)[number];
5
5
  declare const icon: (props?: ({
6
- variant?: "primary" | "positive" | "negative" | "main" | "inherit" | "support" | "minor" | "brand" | "warning" | "info" | "oncolor" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
6
+ variant?: "primary" | "positive" | "negative" | "oncolor" | "main" | "inherit" | "support" | "minor" | "brand" | "warning" | "info" | "accent-1" | "accent-2" | "accent-3" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  type Props = Omit<React.ComponentProps<IconComponent>, "color"> & VariantProps<typeof icon> & {
9
9
  /** Icon component imported from `@imfusion/web-ui/icons`. */
@@ -12,5 +12,5 @@ type Props = Omit<React.ComponentProps<IconComponent>, "color"> & VariantProps<t
12
12
  size?: React.SVGProps<SVGSVGElement>["width"];
13
13
  };
14
14
  /** Icon — renders an icon component with a semantic Web UI foreground color. */
15
- export declare function Icon({ glyph: Glyph, variant, size, width, height, className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Icon({ glyph: Glyph, variant, size, width, height, ...props }: Props): import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -5,16 +5,10 @@ declare const input: (props?: ({
5
5
  size?: "sm" | "md" | "lg" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  type UpstreamInput = React.ComponentProps<typeof InputPrimitive>;
8
- type Props = Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "size"> & VariantProps<typeof input> & {
9
- value?: UpstreamInput["value"];
10
- defaultValue?: UpstreamInput["defaultValue"];
11
- onValueChange?: UpstreamInput["onValueChange"];
8
+ interface Props extends Omit<UpstreamInput, "size">, VariantProps<typeof input> {
12
9
  /** Called when the search input's clear button is pressed. */
13
10
  onClear?: () => void;
14
- className?: UpstreamInput["className"];
15
- style?: UpstreamInput["style"];
16
- render?: UpstreamInput["render"];
17
- };
11
+ }
18
12
  /**
19
13
  * Single-line text input. Also called a text field or input field.
20
14
  * Wraps Base UI Input for controlled/uncontrolled state, form integration,
@@ -1,16 +1,13 @@
1
1
  import { Logo } from '../logo';
2
2
  type Props = Omit<React.ComponentProps<typeof Logo>, "src" | "alt"> & {
3
- /** Render the compact glyph instead of the full wordmark. */
3
+ /** Render the compact glyph instead of the full lockup. */
4
4
  glyph?: boolean;
5
5
  /** Override the accessible label. Defaults to "ImFusion". */
6
6
  alt?: string;
7
7
  };
8
8
  /**
9
9
  * ImFusion's own logo — the generic {@link Logo} primitive pre-wired with the
10
- * ImFusion marks and the brand variant. The single branded entry point and the
11
- * only export from this module; external consumers compose `<Logo src={…} />`
12
- * with their own asset. Pass `glyph` for the compact mark; the default is the
13
- * full wordmark.
10
+ * ImFusion marks and the brand variant. Pass `glyph` for the compact mark.
14
11
  */
15
12
  export declare function ImFusionLogo({ glyph, alt, variant, ...props }: Props): import("react/jsx-runtime").JSX.Element;
16
13
  export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * ImFusion mark geometry as plain data, so non-React consumers (the Storybook
3
+ * manager) render the same shapes as {@link ImFusionLogo}. Not exported from the package.
4
+ */
5
+ export type Mark = {
6
+ viewBox: string;
7
+ shapes: readonly (readonly ["path" | "polygon" | "rect", Readonly<Record<string, string>>])[];
8
+ };
9
+ export declare const standardMark: Mark;
10
+ export declare const glyphMark: Mark;
@@ -2,14 +2,14 @@ import { ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  declare const logo: (props?: ({
4
4
  size?: "sm" | "md" | "lg" | "hero" | "xs" | "xl" | "fit" | null | undefined;
5
- variant?: "main" | "inherit" | "support" | "minor" | "brand" | "oncolor" | null | undefined;
5
+ variant?: "oncolor" | "main" | "inherit" | "support" | "minor" | "brand" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  type Props = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & VariantProps<typeof logo> & {
8
- /** Logo source — an image URL or an inline SVG node. Required; this primitive carries no brand default (see `ImFusionLogo` for our own mark). */
8
+ /** Logo source — an image URL or inline SVG node. No brand default; see `ImFusionLogo` for the ImFusion mark. */
9
9
  src: string | ReactNode;
10
10
  alt: string;
11
11
  /** Explicit height — overrides `size` variant when set. */
12
12
  height?: string | number;
13
13
  };
14
- export declare function Logo({ src, alt, size, variant, height, className, style, ...props }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Logo({ src, alt, size, variant, height, style, ...props }: Props): import("react/jsx-runtime").JSX.Element;
15
15
  export {};
@@ -1,24 +1,10 @@
1
- import { UpstreamLink } from './shared';
2
- type FlyoutLinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & {
3
- /**
4
- * Marks the link as the current page — renders it in full primary colour.
5
- * @default false
6
- */
7
- active?: UpstreamLink["active"];
8
- /** @default false */
9
- closeOnClick?: UpstreamLink["closeOnClick"];
10
- className?: UpstreamLink["className"];
11
- render?: UpstreamLink["render"];
12
- };
1
+ import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
13
2
  /**
14
- * NavigationMenu.FlyoutLink — a quiet text link inside a flyout `Content`, the
15
- * lightweight alternative to a `LinkCard` when a card is too heavy. Renders an
16
- * `<a>`. A trailing `ArrowRight` slides in on hover/focus and the label nudges to
17
- * meet it; the current page is marked in primary. When a custom `render` is
18
- * supplied the icon is omitted — the consumer's element owns its content.
3
+ * NavigationMenu.FlyoutLink — a quiet text link inside a flyout `Content`, the lightweight
4
+ * alternative to `LinkCard`. Renders an `<a>`; a trailing `ArrowRight` slides in on hover/focus,
5
+ * and the current page is marked in primary. A custom `render` omits the icon.
19
6
  */
20
- export declare function FlyoutLink({ className, children, render, ...props }: FlyoutLinkProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function FlyoutLink({ children, render, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): import("react/jsx-runtime").JSX.Element;
21
8
  export declare namespace FlyoutLink {
22
9
  var displayName: string;
23
10
  }
24
- export {};
@@ -29,10 +29,8 @@ type InlineSubmenuProps = {
29
29
  *
30
30
  * A curated partial over the namespace's own primitives (a nested vertical
31
31
  * `Root` without a `Portal`, plus the rail/detail layout). Drop it directly
32
- * inside a `NavigationMenu.Content`. It bakes in Base UI's viewport
33
- * responsiveness: the nested Root flips `orientation` at `md` via `useMediaQuery`
34
- * and the CSS flips the rail from a horizontal tab strip to a side rail at the
35
- * same breakpoint — no work for the consumer, no container queries.
32
+ * inside a `NavigationMenu.Content`. Switches from a tab strip to a side rail
33
+ * at `md` — no work for the consumer, no container queries.
36
34
  */
37
35
  export declare function InlineSubmenu({ items, defaultValue }: InlineSubmenuProps): import("react/jsx-runtime").JSX.Element;
38
36
  export declare namespace InlineSubmenu {
@@ -1,15 +1,5 @@
1
+ import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
1
2
  import { UpstreamLink } from './shared';
2
- type LinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & {
3
- /**
4
- * Marks the link as the current page — renders it in full primary colour.
5
- * @default false
6
- */
7
- active?: UpstreamLink["active"];
8
- /** @default false */
9
- closeOnClick?: UpstreamLink["closeOnClick"];
10
- className?: UpstreamLink["className"];
11
- render?: UpstreamLink["render"];
12
- };
13
3
  /**
14
4
  * NavigationMenu.Link — a top-strip (rail) link: a peer of `Trigger` for a
15
5
  * section that navigates directly instead of opening a flyout. Renders an `<a>`.
@@ -18,22 +8,21 @@ type LinkProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"
18
8
  * A trailing `ArrowRight` slides in on hover/focus. When a custom `render` is
19
9
  * supplied the icon is omitted — the consumer's element owns its content.
20
10
  */
21
- export declare function Link({ className, children, render, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Link({ children, render, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Link>): import("react/jsx-runtime").JSX.Element;
22
12
  export declare namespace Link {
23
13
  var displayName: string;
24
14
  }
25
- type LinkListProps = React.HTMLAttributes<HTMLUListElement>;
26
15
  /**
27
16
  * NavigationMenu.LinkList — a reset `<ul>` that lays out a flyout's `LinkCard`s
28
17
  * (a responsive two-column grid that collapses to one column on narrow flyouts).
29
18
  * Owns the flyout list layout so consumers wrap each card in an `<li>` and add no
30
19
  * layout styling of their own. Renders a `<ul>`.
31
20
  */
32
- export declare function LinkList({ className, ...props }: LinkListProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function LinkList(props: React.HTMLAttributes<HTMLUListElement>): import("react/jsx-runtime").JSX.Element;
33
22
  export declare namespace LinkList {
34
23
  var displayName: string;
35
24
  }
36
- type LinkCardProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "title"> & {
25
+ interface LinkCardProps extends Omit<UpstreamLink, "title"> {
37
26
  /** Card heading — the link label. */
38
27
  title: React.ReactNode;
39
28
  /** Supporting line beneath the title. */
@@ -42,13 +31,7 @@ type LinkCardProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "classN
42
31
  image?: string;
43
32
  /** Alt text for `image`. */
44
33
  imageAlt?: string;
45
- /** Marks the card as the current page. @default false */
46
- active?: UpstreamLink["active"];
47
- /** @default false */
48
- closeOnClick?: UpstreamLink["closeOnClick"];
49
- className?: UpstreamLink["className"];
50
- render?: UpstreamLink["render"];
51
- };
34
+ }
52
35
  /**
53
36
  * NavigationMenu.LinkCard — a rich flyout entry (optional image + title +
54
37
  * description) for the bigger menus. Built on the `Card` primitive (like
@@ -57,7 +40,7 @@ type LinkCardProps = Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "classN
57
40
  * thick primary bar along the card's bottom edge on hover and when active. Use
58
41
  * where a plain `NavigationMenu.FlyoutLink` is too sparse.
59
42
  */
60
- export declare function LinkCard({ title, description, image, imageAlt, className, ...props }: LinkCardProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function LinkCard({ title, description, image, imageAlt, ...props }: LinkCardProps): import("react/jsx-runtime").JSX.Element;
61
44
  export declare namespace LinkCard {
62
45
  var displayName: string;
63
46
  }
@@ -1,75 +1,30 @@
1
- import { UpstreamArrow, UpstreamBackdrop, UpstreamPopup, UpstreamPortal, UpstreamPositioner } from './shared';
2
- type PortalProps = {
3
- container?: UpstreamPortal["container"];
4
- /** @default false */
5
- keepMounted?: UpstreamPortal["keepMounted"];
6
- children?: UpstreamPortal["children"];
7
- };
1
+ import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
8
2
  /** NavigationMenu.Portal — renders the positioner outside the main document flow. */
9
- export declare function Portal(props: PortalProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function Portal(props: React.ComponentProps<typeof NavigationMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
10
4
  export declare namespace Portal {
11
5
  var displayName: string;
12
6
  }
13
- type PositionerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
14
- /** @default 'bottom' */
15
- side?: UpstreamPositioner["side"];
16
- /** @default 'start' */
17
- align?: UpstreamPositioner["align"];
18
- /** @default 0 */
19
- sideOffset?: UpstreamPositioner["sideOffset"];
20
- /** @default 0 */
21
- alignOffset?: UpstreamPositioner["alignOffset"];
22
- /** @default 5 */
23
- arrowPadding?: UpstreamPositioner["arrowPadding"];
24
- anchor?: UpstreamPositioner["anchor"];
25
- /** @default 'absolute' */
26
- positionMethod?: UpstreamPositioner["positionMethod"];
27
- /** @default false */
28
- disableAnchorTracking?: UpstreamPositioner["disableAnchorTracking"];
29
- collisionAvoidance?: UpstreamPositioner["collisionAvoidance"];
30
- /** @default 'clipping-ancestors' */
31
- collisionBoundary?: UpstreamPositioner["collisionBoundary"];
32
- /** @default 5 */
33
- collisionPadding?: UpstreamPositioner["collisionPadding"];
34
- /** @default false */
35
- sticky?: UpstreamPositioner["sticky"];
36
- className?: UpstreamPositioner["className"];
37
- render?: UpstreamPositioner["render"];
38
- };
39
7
  /**
40
8
  * NavigationMenu.Positioner — anchors the popup to the active trigger.
41
9
  * Defaults to `align="start"` (DESIGN.md §5) so the flyout reads as anchored to
42
10
  * the trigger edge rather than centered. Renders a `<div>`.
43
11
  */
44
- export declare function Positioner({ align, className, ...props }: PositionerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Positioner({ align, ...props }: React.ComponentProps<typeof NavigationMenuPrimitive.Positioner>): import("react/jsx-runtime").JSX.Element;
45
13
  export declare namespace Positioner {
46
14
  var displayName: string;
47
15
  }
48
- type PopupProps = Omit<React.HTMLAttributes<HTMLElement>, "className"> & {
49
- className?: UpstreamPopup["className"];
50
- render?: UpstreamPopup["render"];
51
- };
52
16
  /** NavigationMenu.Popup — the shared flyout surface holding the active Content. Renders a `<nav>`. */
53
- export declare function Popup({ className, ...props }: PopupProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function Popup(props: React.ComponentProps<typeof NavigationMenuPrimitive.Popup>): import("react/jsx-runtime").JSX.Element;
54
18
  export declare namespace Popup {
55
19
  var displayName: string;
56
20
  }
57
- type ArrowProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
58
- className?: UpstreamArrow["className"];
59
- render?: UpstreamArrow["render"];
60
- };
61
21
  /** NavigationMenu.Arrow — a pointer anchored to the popup edge. Receives data-side for orientation. Renders a `<div>`. */
62
- export declare function Arrow({ className, ...props }: ArrowProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function Arrow(props: React.ComponentProps<typeof NavigationMenuPrimitive.Arrow>): import("react/jsx-runtime").JSX.Element;
63
23
  export declare namespace Arrow {
64
24
  var displayName: string;
65
25
  }
66
- type BackdropProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
67
- className?: UpstreamBackdrop["className"];
68
- render?: UpstreamBackdrop["render"];
69
- };
70
26
  /** NavigationMenu.Backdrop — overlay beneath the popup. Receives data-open/data-closed for transitions. Renders a `<div>`. */
71
- export declare function Backdrop({ className, ...props }: BackdropProps): import("react/jsx-runtime").JSX.Element;
27
+ export declare function Backdrop(props: React.ComponentProps<typeof NavigationMenuPrimitive.Backdrop>): import("react/jsx-runtime").JSX.Element;
72
28
  export declare namespace Backdrop {
73
29
  var displayName: string;
74
30
  }
75
- export {};
@@ -1,20 +1,10 @@
1
1
  import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
2
2
  /**
3
- * Shared upstream type aliases for the NavigationMenu sub-parts. Each sub-part
4
- * file lives beside its own `.module.css`; these Base UI prop types are the one
5
- * thing they all reference, so they live here rather than being restated.
3
+ * Upstream types for the NavigationMenu parts that add Web UI props on top, and
4
+ * the orientation union those parts share. A part that only passes upstream
5
+ * props through annotates them inline instead.
6
6
  */
7
- export type UpstreamRoot = React.ComponentProps<typeof NavigationMenuPrimitive.Root>;
8
- export type UpstreamList = React.ComponentProps<typeof NavigationMenuPrimitive.List>;
9
- export type UpstreamItem = React.ComponentProps<typeof NavigationMenuPrimitive.Item>;
7
+ export type UpstreamRoot<Value = unknown> = React.ComponentProps<typeof NavigationMenuPrimitive.Root<Value>>;
10
8
  export type UpstreamTrigger = React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>;
11
- export type UpstreamIcon = React.ComponentProps<typeof NavigationMenuPrimitive.Icon>;
12
- export type UpstreamContent = React.ComponentProps<typeof NavigationMenuPrimitive.Content>;
13
9
  export type UpstreamLink = React.ComponentProps<typeof NavigationMenuPrimitive.Link>;
14
- export type UpstreamPortal = React.ComponentProps<typeof NavigationMenuPrimitive.Portal>;
15
- export type UpstreamPositioner = React.ComponentProps<typeof NavigationMenuPrimitive.Positioner>;
16
- export type UpstreamPopup = React.ComponentProps<typeof NavigationMenuPrimitive.Popup>;
17
- export type UpstreamViewport = React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>;
18
- export type UpstreamArrow = React.ComponentProps<typeof NavigationMenuPrimitive.Arrow>;
19
- export type UpstreamBackdrop = React.ComponentProps<typeof NavigationMenuPrimitive.Backdrop>;
20
10
  export type Orientation = "horizontal" | "vertical";
@@ -1,15 +1,13 @@
1
1
  import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
2
- import { Orientation, UpstreamContent, UpstreamItem, UpstreamList, UpstreamRoot, UpstreamViewport } from './shared';
3
- type RootProps<Value = unknown> = Omit<React.ComponentProps<typeof NavigationMenuPrimitive.Root<Value>>, "className" | "orientation"> & {
2
+ import { Orientation, UpstreamRoot } from './shared';
3
+ interface RootProps<Value = unknown> extends Omit<UpstreamRoot<Value>, "orientation"> {
4
4
  /**
5
5
  * Layout of the menu. `horizontal` is a top nav bar; `vertical` stacks the
6
6
  * whole menu into a side rail with flyouts opening to the side.
7
7
  * @default 'horizontal'
8
8
  */
9
9
  orientation?: Orientation;
10
- className?: UpstreamRoot["className"];
11
- render?: UpstreamRoot["render"];
12
- };
10
+ }
13
11
  /**
14
12
  * NavigationMenu.Root — groups all parts and manages which item is open.
15
13
  * Renders a `<nav>`.
@@ -21,43 +19,23 @@ export declare function Root<Value = unknown>({ orientation, className, ...props
21
19
  export declare namespace Root {
22
20
  var displayName: string;
23
21
  }
24
- type ListProps = Omit<React.HTMLAttributes<HTMLUListElement>, "className"> & {
25
- className?: UpstreamList["className"];
26
- render?: UpstreamList["render"];
27
- };
28
22
  /** NavigationMenu.List — the strip of items. Renders a `<ul>`. */
29
- export declare function List({ className, ...props }: ListProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function List(props: React.ComponentProps<typeof NavigationMenuPrimitive.List>): import("react/jsx-runtime").JSX.Element;
30
24
  export declare namespace List {
31
25
  var displayName: string;
32
26
  }
33
- type ItemProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, "className"> & {
34
- /** Unique identifier for controlled use; auto-generated when omitted. */
35
- value?: UpstreamItem["value"];
36
- className?: UpstreamItem["className"];
37
- render?: UpstreamItem["render"];
38
- };
39
27
  /** NavigationMenu.Item — a single item in the list. Renders a `<li>`. */
40
- export declare function Item({ className, ...props }: ItemProps): import("react/jsx-runtime").JSX.Element;
28
+ export declare function Item(props: React.ComponentProps<typeof NavigationMenuPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
41
29
  export declare namespace Item {
42
30
  var displayName: string;
43
31
  }
44
- type ContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
45
- /** @default false */
46
- keepMounted?: UpstreamContent["keepMounted"];
47
- className?: UpstreamContent["className"];
48
- render?: UpstreamContent["render"];
49
- };
50
32
  /** NavigationMenu.Content — an item's flyout body; moved into the shared Popup when active. Renders a `<div>`. */
51
- export declare function Content({ className, ...props }: ContentProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function Content(props: React.ComponentProps<typeof NavigationMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
52
34
  export declare namespace Content {
53
35
  var displayName: string;
54
36
  }
55
- type ViewportProps = Omit<React.HTMLAttributes<HTMLDivElement>, "className"> & {
56
- className?: UpstreamViewport["className"];
57
- render?: UpstreamViewport["render"];
58
- };
59
37
  /** NavigationMenu.Viewport — clips the current content for direction-aware transitions. Renders a `<div>`. */
60
- export declare function Viewport({ className, ...props }: ViewportProps): import("react/jsx-runtime").JSX.Element;
38
+ export declare function Viewport(props: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>): import("react/jsx-runtime").JSX.Element;
61
39
  export declare namespace Viewport {
62
40
  var displayName: string;
63
41
  }
@@ -1,10 +1,10 @@
1
- import { UpstreamIcon, UpstreamTrigger } from './shared';
2
- type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className"> & {
1
+ import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
2
+ import { UpstreamTrigger } from './shared';
3
+ interface TriggerProps extends UpstreamTrigger {
3
4
  /**
4
- * Marks this section as the current page so it shows the active treatment even
5
- * when its flyout is closed — the "active trail" anchor for a nav where the
6
- * open section isn't the current one. Base UI's Trigger has no active state of
7
- * its own, so this stamps `data-active`.
5
+ * Marks this section as the current page, showing the active treatment even when its
6
+ * flyout is closed. Base UI's Trigger has no active state of its own, so this stamps
7
+ * `data-active`.
8
8
  * @default false
9
9
  */
10
10
  active?: boolean;
@@ -20,27 +20,18 @@ type TriggerProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "classNa
20
20
  * @default false
21
21
  */
22
22
  nested?: boolean;
23
- /** @default true */
24
- nativeButton?: UpstreamTrigger["nativeButton"];
25
- className?: UpstreamTrigger["className"];
26
- render?: UpstreamTrigger["render"];
27
- };
23
+ }
28
24
  /**
29
25
  * NavigationMenu.Trigger — opens an item's flyout on hover or click. Renders a
30
- * `<button>`. Ships a built-in `ChevronDown` (rotates when open) so consumers
31
- * don't hand-author an indicator; pass `hideChevron` to supply a custom `Icon`,
32
- * and `nested` when the trigger opens a submenu from inside another flyout.
26
+ * `<button>` with a built-in `ChevronDown` that rotates when open; pass
27
+ * `hideChevron` for a custom `Icon`, and `nested` for a trigger inside a flyout.
33
28
  */
34
- export declare function Trigger({ active, hideChevron, nested, children, className, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
29
+ export declare function Trigger({ active, hideChevron, nested, children, ...props }: TriggerProps): import("react/jsx-runtime").JSX.Element;
35
30
  export declare namespace Trigger {
36
31
  var displayName: string;
37
32
  }
38
- type IconProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "className"> & {
39
- className?: UpstreamIcon["className"];
40
- render?: UpstreamIcon["render"];
41
- };
42
33
  /** NavigationMenu.Icon — a chevron/marker that rotates when its trigger is open. Renders a `<span>`. */
43
- export declare function Icon({ className, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function Icon(props: React.ComponentProps<typeof NavigationMenuPrimitive.Icon>): import("react/jsx-runtime").JSX.Element;
44
35
  export declare namespace Icon {
45
36
  var displayName: string;
46
37
  }
@@ -0,0 +1,2 @@
1
+ export * as NumberField from './number-field';
2
+ export { numberFieldMeta } from './number-field.meta';