@imfusion/web-ui 0.6.4-dev.31.gcef47041 → 0.6.4-dev.37.g60acf81d

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.
@@ -7,8 +7,7 @@ declare const button: (props?: ({
7
7
  radius?: "sm" | "md" | "lg" | "none" | "round" | null | undefined;
8
8
  context?: "default" | "oncolor" | null | undefined;
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
- type UpstreamButton = React.ComponentProps<typeof ButtonPrimitive>;
11
- interface Props extends UpstreamButton, VariantProps<typeof button> {
10
+ interface Props extends React.ComponentProps<typeof ButtonPrimitive>, VariantProps<typeof button> {
12
11
  /** Leading slot — typically a label. When present, the label aligns right and the icon pins left. */
13
12
  startIcon?: React.ReactNode;
14
13
  /** Trailing slot — typically an icon. When present, the label aligns left and the icon pins right. */
@@ -1,6 +1,5 @@
1
1
  import { Collapsible as CollapsiblePrimitive } from '@base-ui/react/collapsible';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type UpstreamRoot = React.ComponentProps<typeof CollapsiblePrimitive.Root>;
4
3
  declare const collapsibleRoot: (props?: ({
5
4
  variant?: "default" | "solid" | null | undefined;
6
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -10,7 +9,7 @@ declare const collapsibleRoot: (props?: ({
10
9
  * @see https://base-ui.com/react/components/collapsible
11
10
  * @llm https://base-ui.com/react/components/collapsible.md
12
11
  */
13
- export declare function Root({ variant, ...props }: UpstreamRoot & VariantProps<typeof collapsibleRoot>): import("react/jsx-runtime").JSX.Element;
12
+ export declare function Root({ variant, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root> & VariantProps<typeof collapsibleRoot>): import("react/jsx-runtime").JSX.Element;
14
13
  export declare namespace Root {
15
14
  var displayName: string;
16
15
  }
@@ -1,9 +1,7 @@
1
1
  import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
2
2
  type BorderColor = "primary" | "fg-minor" | "fg-support" | "none";
3
3
  type BorderStyle = "solid" | "dashed" | "none";
4
- type UpstreamRoot<Payload = unknown> = React.ComponentProps<typeof DrawerPrimitive.Root<Payload>>;
5
- type UpstreamPopup = React.ComponentProps<typeof DrawerPrimitive.Popup>;
6
- interface RootProps<Payload = unknown> extends UpstreamRoot<Payload> {
4
+ interface RootProps<Payload = unknown> extends React.ComponentProps<typeof DrawerPrimitive.Root<Payload>> {
7
5
  /**
8
6
  * Colour of the border on the panel's open edge. Inherited by Drawer.Popup;
9
7
  * a Popup-level prop overrides it.
@@ -47,7 +45,7 @@ export declare function Viewport(props: React.ComponentProps<typeof DrawerPrimit
47
45
  export declare namespace Viewport {
48
46
  var displayName: string;
49
47
  }
50
- interface PopupProps extends UpstreamPopup {
48
+ interface PopupProps extends React.ComponentProps<typeof DrawerPrimitive.Popup> {
51
49
  /**
52
50
  * Colour of the border on the open edge. Overrides the value inherited from
53
51
  * Drawer.Root; defaults to it when unset.
@@ -0,0 +1,2 @@
1
+ export * as NumberField from './number-field';
2
+ export { numberFieldMeta } from './number-field.meta';
@@ -0,0 +1,66 @@
1
+ import { NumberField as NumberFieldPrimitive } from '@base-ui/react/number-field';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ declare const numberFieldGroup: (props?: ({
4
+ variant?: "primary" | "outline" | "ghost" | "filled" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export declare function Root({ step, format, ...props }: React.ComponentProps<typeof NumberFieldPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
8
+ export declare namespace Root {
9
+ var displayName: string;
10
+ }
11
+ interface GroupProps extends React.ComponentProps<typeof NumberFieldPrimitive.Group>, VariantProps<typeof numberFieldGroup> {
12
+ }
13
+ /** NumberField.Group — bordered box grouping the input with the stepper controls. */
14
+ export declare function Group({ variant, size, ...props }: GroupProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare namespace Group {
16
+ var displayName: string;
17
+ }
18
+ /** NumberField.Input — transparent, borderless mono numeric field. */
19
+ export declare function Input(props: React.ComponentProps<typeof NumberFieldPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
20
+ export declare namespace Input {
21
+ var displayName: string;
22
+ }
23
+ /** NumberField.Increment — full-height square control that increases the value. */
24
+ export declare function Increment(props: React.ComponentProps<typeof NumberFieldPrimitive.Increment>): import("react/jsx-runtime").JSX.Element;
25
+ export declare namespace Increment {
26
+ var displayName: string;
27
+ }
28
+ /** NumberField.Decrement — full-height square control that decreases the value. */
29
+ export declare function Decrement(props: React.ComponentProps<typeof NumberFieldPrimitive.Decrement>): import("react/jsx-runtime").JSX.Element;
30
+ export declare namespace Decrement {
31
+ var displayName: string;
32
+ }
33
+ /** NumberField.ScrubArea — draggable region that scrubs the value on pointer move. */
34
+ export declare function ScrubArea(props: React.ComponentProps<typeof NumberFieldPrimitive.ScrubArea>): import("react/jsx-runtime").JSX.Element;
35
+ export declare namespace ScrubArea {
36
+ var displayName: string;
37
+ }
38
+ /** NumberField.ScrubAreaCursor — virtual cursor shown while scrubbing under pointer lock. */
39
+ export declare function ScrubAreaCursor(props: React.ComponentProps<typeof NumberFieldPrimitive.ScrubAreaCursor>): import("react/jsx-runtime").JSX.Element;
40
+ export declare namespace ScrubAreaCursor {
41
+ var displayName: string;
42
+ }
43
+ interface StepperProps extends React.ComponentProps<typeof NumberFieldPrimitive.Root>, VariantProps<typeof numberFieldGroup> {
44
+ /** Control placement relative to the input. @default "trailing" */
45
+ layout?: "trailing" | "flanking";
46
+ /** Surface treatment applied to the group. @default "outline" */
47
+ variant?: "outline" | "primary" | "filled" | "ghost";
48
+ /** Control height, matching Input's scale. @default "md" */
49
+ size?: "sm" | "md" | "lg";
50
+ /**
51
+ * Content rendered above the field as a drag handle: pressing it and moving
52
+ * sideways changes the value. Usually the field's label. The scrub cursor is
53
+ * supplied automatically.
54
+ */
55
+ scrub?: React.ReactNode;
56
+ }
57
+ /**
58
+ * NumberField.Stepper — pre-composed Root → Group → Input + controls. Use the
59
+ * individual parts instead when a custom composition (e.g. with `Field` or
60
+ * `ScrubArea`) is needed.
61
+ */
62
+ export declare function Stepper({ layout, variant, size, scrub, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
63
+ export declare namespace Stepper {
64
+ var displayName: string;
65
+ }
66
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ComponentMeta } from '../../types/meta';
2
+ export declare const numberFieldMeta: ComponentMeta;
@@ -1,8 +1,5 @@
1
1
  import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type UpstreamTrigger = React.ComponentProps<typeof PopoverPrimitive.Trigger>;
4
- type UpstreamPositioner = React.ComponentProps<typeof PopoverPrimitive.Positioner>;
5
- type UpstreamPopup = React.ComponentProps<typeof PopoverPrimitive.Popup>;
6
3
  declare const popoverTrigger: (props?: ({
7
4
  variant?: "primary" | "secondary" | "positive" | "negative" | "outline" | "ghost" | null | undefined;
8
5
  inline?: boolean | null | undefined;
@@ -23,7 +20,7 @@ export declare namespace Root {
23
20
  var displayName: string;
24
21
  }
25
22
  /** Popover.Trigger — button that opens the popover. */
26
- export declare function Trigger({ variant, inline, ...props }: UpstreamTrigger & VariantProps<typeof popoverTrigger>): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Trigger({ variant, inline, ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger> & VariantProps<typeof popoverTrigger>): import("react/jsx-runtime").JSX.Element;
27
24
  export declare namespace Trigger {
28
25
  var displayName: string;
29
26
  }
@@ -42,7 +39,7 @@ export declare function Positioner(props: React.ComponentProps<typeof PopoverPri
42
39
  export declare namespace Positioner {
43
40
  var displayName: string;
44
41
  }
45
- interface PopupProps extends UpstreamPopup, VariantProps<typeof popoverPopup> {
42
+ interface PopupProps extends React.ComponentProps<typeof PopoverPrimitive.Popup>, VariantProps<typeof popoverPopup> {
46
43
  /** Match to the Trigger variant to tint the popup border accordingly. */
47
44
  variant?: VariantProps<typeof popoverPopup>["variant"];
48
45
  }
@@ -91,7 +88,7 @@ type InlineProps = {
91
88
  /** Hover delay in ms before the popover opens. @default 150 */
92
89
  delay?: number;
93
90
  /** Which side of the trigger the popup appears on. @default 'top' */
94
- side?: UpstreamPositioner["side"];
91
+ side?: React.ComponentProps<typeof PopoverPrimitive.Positioner>["side"];
95
92
  /** Gap between trigger and popup in px. @default 6 */
96
93
  sideOffset?: number;
97
94
  };
@@ -1,7 +1,6 @@
1
1
  import { Select as SelectPrimitive } from '@base-ui/react/select';
2
- type UpstreamRoot<Value = unknown, Multiple extends boolean | undefined = false> = React.ComponentProps<typeof SelectPrimitive.Root<Value, Multiple>>;
3
2
  type UpstreamItem = React.ComponentProps<typeof SelectPrimitive.Item>;
4
- interface RootProps<Value = unknown, Multiple extends boolean | undefined = false> extends UpstreamRoot<Value, Multiple> {
3
+ interface RootProps<Value = unknown, Multiple extends boolean | undefined = false> extends React.ComponentProps<typeof SelectPrimitive.Root<Value, Multiple>> {
5
4
  }
6
5
  /**
7
6
  * Select.Root — accessible select / listbox primitive.
@@ -1,10 +1,9 @@
1
1
  import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type UpstreamSeparator = React.ComponentProps<typeof SeparatorPrimitive>;
4
3
  declare const separator: (props?: ({
5
4
  variant?: "solid" | "dashed" | "dotted" | null | undefined;
6
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
- interface Props extends UpstreamSeparator, VariantProps<typeof separator> {
6
+ interface Props extends React.ComponentProps<typeof SeparatorPrimitive>, VariantProps<typeof separator> {
8
7
  }
9
8
  /**
10
9
  * Separator — visual divider between content sections.
@@ -1,6 +1,5 @@
1
1
  import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type UpstreamList = React.ComponentProps<typeof TabsPrimitive.List>;
4
3
  declare const tabsList: (props?: ({
5
4
  fill?: boolean | null | undefined;
6
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -14,7 +13,7 @@ export declare function Root(props: React.ComponentProps<typeof TabsPrimitive.Ro
14
13
  export declare namespace Root {
15
14
  var displayName: string;
16
15
  }
17
- interface ListProps extends UpstreamList, VariantProps<typeof tabsList> {
16
+ interface ListProps extends React.ComponentProps<typeof TabsPrimitive.List>, VariantProps<typeof tabsList> {
18
17
  /**
19
18
  * Give every tab an equal share of the list's length (equal width when
20
19
  * horizontal). When vertical, this only takes effect if the list is stretched
@@ -1,7 +1,5 @@
1
1
  import { Toast as ToastPrimitive } from '@base-ui/react/toast';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- type UpstreamViewport = React.ComponentProps<typeof ToastPrimitive.Viewport>;
4
- type UpstreamRoot = React.ComponentProps<typeof ToastPrimitive.Root>;
5
3
  declare const toastViewport: (props?: ({
6
4
  position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right" | null | undefined;
7
5
  width?: "default" | "content" | "compact" | "wide" | null | undefined;
@@ -39,7 +37,7 @@ export declare function Portal(props: React.ComponentProps<typeof ToastPrimitive
39
37
  export declare namespace Portal {
40
38
  var displayName: string;
41
39
  }
42
- interface ViewportProps extends UpstreamViewport, VariantProps<typeof toastViewport> {
40
+ interface ViewportProps extends React.ComponentProps<typeof ToastPrimitive.Viewport>, VariantProps<typeof toastViewport> {
43
41
  /** Which edge or corner of the screen the stack anchors to. */
44
42
  position?: VariantProps<typeof toastViewport>["position"];
45
43
  /** Width treatment for the toast stack. */
@@ -54,7 +52,7 @@ export declare function Viewport({ position, width, ...props }: ViewportProps):
54
52
  export declare namespace Viewport {
55
53
  var displayName: string;
56
54
  }
57
- interface RootProps extends UpstreamRoot, VariantProps<typeof toastRoot> {
55
+ interface RootProps extends React.ComponentProps<typeof ToastPrimitive.Root>, VariantProps<typeof toastRoot> {
58
56
  /** Semantic treatment for the toast surface. */
59
57
  variant?: VariantProps<typeof toastRoot>["variant"];
60
58
  }
@@ -1,6 +1,5 @@
1
1
  import { Toggle as TogglePrimitive } from '@base-ui/react/toggle';
2
- type UpstreamToggle = React.ComponentProps<typeof TogglePrimitive>;
3
- interface Props extends UpstreamToggle {
2
+ interface Props extends React.ComponentProps<typeof TogglePrimitive> {
4
3
  }
5
4
  /**
6
5
  * Toggle - a two-state button. Use standalone for a
@@ -1,6 +1,5 @@
1
1
  import { ToggleGroup as ToggleGroupPrimitive } from '@base-ui/react/toggle-group';
2
- type UpstreamRoot = React.ComponentProps<typeof ToggleGroupPrimitive>;
3
- interface Props extends UpstreamRoot {
2
+ interface Props extends React.ComponentProps<typeof ToggleGroupPrimitive> {
4
3
  }
5
4
  /**
6
5
  * ToggleGroup - a set of connected `Toggle`s sharing one value. Single-select by
@@ -1,8 +1,6 @@
1
1
  import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  type UpstreamTrigger = React.ComponentProps<typeof TooltipPrimitive.Trigger>;
4
- type UpstreamPositioner = React.ComponentProps<typeof TooltipPrimitive.Positioner>;
5
- type UpstreamPopup = React.ComponentProps<typeof TooltipPrimitive.Popup>;
6
4
  declare const tooltipTrigger: (props?: ({
7
5
  variant?: "primary" | "secondary" | "positive" | "negative" | null | undefined;
8
6
  inline?: boolean | null | undefined;
@@ -65,7 +63,7 @@ export declare function Positioner({ sideOffset, ...props }: React.ComponentProp
65
63
  export declare namespace Positioner {
66
64
  var displayName: string;
67
65
  }
68
- interface PopupProps extends UpstreamPopup, VariantProps<typeof tooltipPopup> {
66
+ interface PopupProps extends React.ComponentProps<typeof TooltipPrimitive.Popup>, VariantProps<typeof tooltipPopup> {
69
67
  /** Match to the Trigger variant to tint the popup border accordingly. */
70
68
  variant?: VariantProps<typeof tooltipPopup>["variant"];
71
69
  }
@@ -92,7 +90,7 @@ type InlineProps = {
92
90
  /** Hover delay in ms before the tooltip opens. @default 150 */
93
91
  delay?: number;
94
92
  /** Which side of the trigger the popup appears on. @default 'top' */
95
- side?: UpstreamPositioner["side"];
93
+ side?: React.ComponentProps<typeof TooltipPrimitive.Positioner>["side"];
96
94
  /** Gap between trigger and popup in px. @default 13 */
97
95
  sideOffset?: number;
98
96
  };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export { Checkbox, checkboxMeta } from './components/checkbox';
5
5
  export { Field, fieldMeta } from './components/field';
6
6
  export { Fieldset, fieldsetMeta } from './components/fieldset';
7
7
  export { Input, inputMeta } from './components/input';
8
+ export { NumberField, numberFieldMeta } from './components/number-field';
8
9
  export { Select, selectMeta } from './components/select';
9
10
  export { Slider, sliderMeta } from './components/slider';
10
11
  export { Switch, switchMeta } from './components/switch';