@navecss/base-ui 0.0.0-stage → 0.1.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 (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +187 -2
  3. package/dist/accordion/index.d.ts +2 -0
  4. package/dist/accordion/index.js +2 -0
  5. package/dist/accordion/parts.generated.d.ts +31 -0
  6. package/dist/accordion/parts.generated.js +9 -0
  7. package/dist/button/index.d.ts +2 -0
  8. package/dist/button/index.js +3 -0
  9. package/dist/button/parts.generated.d.ts +8 -0
  10. package/dist/button/parts.generated.js +4 -0
  11. package/dist/checkbox/index.d.ts +2 -0
  12. package/dist/checkbox/index.js +2 -0
  13. package/dist/checkbox/parts.generated.d.ts +13 -0
  14. package/dist/checkbox/parts.generated.js +6 -0
  15. package/dist/checkbox-group/index.d.ts +2 -0
  16. package/dist/checkbox-group/index.js +3 -0
  17. package/dist/checkbox-group/parts.generated.d.ts +8 -0
  18. package/dist/checkbox-group/parts.generated.js +5 -0
  19. package/dist/collapsible/index.d.ts +2 -0
  20. package/dist/collapsible/index.js +2 -0
  21. package/dist/collapsible/parts.generated.d.ts +18 -0
  22. package/dist/collapsible/parts.generated.js +7 -0
  23. package/dist/dialog/index.d.ts +2 -0
  24. package/dist/dialog/index.js +2 -0
  25. package/dist/dialog/parts.generated.d.ts +54 -0
  26. package/dist/dialog/parts.generated.js +14 -0
  27. package/dist/field/index.d.ts +2 -0
  28. package/dist/field/index.js +2 -0
  29. package/dist/field/parts.generated.d.ts +40 -0
  30. package/dist/field/parts.generated.js +12 -0
  31. package/dist/fieldset/index.d.ts +2 -0
  32. package/dist/fieldset/index.js +2 -0
  33. package/dist/fieldset/parts.generated.d.ts +11 -0
  34. package/dist/fieldset/parts.generated.js +6 -0
  35. package/dist/form/index.d.ts +2 -0
  36. package/dist/form/index.js +3 -0
  37. package/dist/form/parts.generated.d.ts +11 -0
  38. package/dist/form/parts.generated.js +4 -0
  39. package/dist/index.d.ts +23 -0
  40. package/dist/index.js +24 -0
  41. package/dist/input/index.d.ts +2 -0
  42. package/dist/input/index.js +3 -0
  43. package/dist/input/parts.generated.d.ts +8 -0
  44. package/dist/input/parts.generated.js +5 -0
  45. package/dist/menu/index.d.ts +2 -0
  46. package/dist/menu/index.js +2 -0
  47. package/dist/menu/parts.generated.d.ts +116 -0
  48. package/dist/menu/parts.generated.js +25 -0
  49. package/dist/number-field/index.d.ts +2 -0
  50. package/dist/number-field/index.js +2 -0
  51. package/dist/number-field/parts.generated.d.ts +40 -0
  52. package/dist/number-field/parts.generated.js +11 -0
  53. package/dist/part.d.ts +23 -0
  54. package/dist/part.js +59 -0
  55. package/dist/popover/index.d.ts +2 -0
  56. package/dist/popover/index.js +2 -0
  57. package/dist/popover/parts.generated.d.ts +64 -0
  58. package/dist/popover/parts.generated.js +16 -0
  59. package/dist/radio/index.d.ts +2 -0
  60. package/dist/radio/index.js +2 -0
  61. package/dist/radio/parts.generated.d.ts +11 -0
  62. package/dist/radio/parts.generated.js +6 -0
  63. package/dist/radio-group/index.d.ts +2 -0
  64. package/dist/radio-group/index.js +3 -0
  65. package/dist/radio-group/parts.generated.d.ts +8 -0
  66. package/dist/radio-group/parts.generated.js +5 -0
  67. package/dist/select/index.d.ts +2 -0
  68. package/dist/select/index.js +2 -0
  69. package/dist/select/parts.generated.d.ts +99 -0
  70. package/dist/select/parts.generated.js +23 -0
  71. package/dist/slider/index.d.ts +2 -0
  72. package/dist/slider/index.js +2 -0
  73. package/dist/slider/parts.generated.d.ts +40 -0
  74. package/dist/slider/parts.generated.js +11 -0
  75. package/dist/styles.css +161 -0
  76. package/dist/switch/index.d.ts +2 -0
  77. package/dist/switch/index.js +2 -0
  78. package/dist/switch/parts.generated.d.ts +13 -0
  79. package/dist/switch/parts.generated.js +6 -0
  80. package/dist/tabs/index.d.ts +2 -0
  81. package/dist/tabs/index.js +2 -0
  82. package/dist/tabs/parts.generated.d.ts +35 -0
  83. package/dist/tabs/parts.generated.js +9 -0
  84. package/dist/toggle/index.d.ts +2 -0
  85. package/dist/toggle/index.js +3 -0
  86. package/dist/toggle/parts.generated.d.ts +10 -0
  87. package/dist/toggle/parts.generated.js +4 -0
  88. package/dist/toggle-group/index.d.ts +2 -0
  89. package/dist/toggle-group/index.js +3 -0
  90. package/dist/toggle-group/parts.generated.d.ts +8 -0
  91. package/dist/toggle-group/parts.generated.js +5 -0
  92. package/dist/toolbar/index.d.ts +2 -0
  93. package/dist/toolbar/index.js +2 -0
  94. package/dist/toolbar/parts.generated.d.ts +35 -0
  95. package/dist/toolbar/parts.generated.js +9 -0
  96. package/dist/tooltip/index.d.ts +2 -0
  97. package/dist/tooltip/index.js +2 -0
  98. package/dist/tooltip/parts.generated.d.ts +49 -0
  99. package/dist/tooltip/parts.generated.js +13 -0
  100. package/package.json +192 -3
@@ -0,0 +1,2 @@
1
+ export { Input } from './parts.generated.ts';
2
+ export type * from '@base-ui/react/input';
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+ /* eslint-disable import-x/export -- the named export wins over the star re-export, as TypeScript has it */
3
+ export { Input } from "./parts.generated.js";
@@ -0,0 +1,8 @@
1
+ import { Input as Base } from '@base-ui/react/input';
2
+ export declare const Input: typeof Base;
3
+ export declare namespace Input {
4
+ type Props = Base.Props;
5
+ type State = Base.State;
6
+ type ChangeEventReason = Base.ChangeEventReason;
7
+ type ChangeEventDetails = Base.ChangeEventDetails;
8
+ }
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ // Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
3
+ import { Input as Base } from '@base-ui/react/input';
4
+ import { wrapPart } from "../part.js";
5
+ export const Input = /*#__PURE__*/ (() => wrapPart(Base, 'nave-base-ui-input'))();
@@ -0,0 +1,2 @@
1
+ export * as Menu from './parts.generated.ts';
2
+ export type * from '@base-ui/react/menu';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as Menu from "./parts.generated.js";
@@ -0,0 +1,116 @@
1
+ import type { ReactElement, RefAttributes } from 'react';
2
+ import { Menu as Base } from '@base-ui/react/menu';
3
+ import { type VariantProps } from '../part.ts';
4
+ export declare const Arrow: typeof Base.Arrow;
5
+ export declare namespace Arrow {
6
+ type State = Base.Arrow.State;
7
+ type Props = Base.Arrow.Props;
8
+ }
9
+ export declare const Backdrop: typeof Base.Backdrop;
10
+ export declare namespace Backdrop {
11
+ type State = Base.Backdrop.State;
12
+ type Props = Base.Backdrop.Props;
13
+ }
14
+ export declare const CheckboxItem: typeof Base.CheckboxItem;
15
+ export declare namespace CheckboxItem {
16
+ type State = Base.CheckboxItem.State;
17
+ type Props = Base.CheckboxItem.Props;
18
+ type ChangeEventReason = Base.CheckboxItem.ChangeEventReason;
19
+ type ChangeEventDetails = Base.CheckboxItem.ChangeEventDetails;
20
+ }
21
+ export declare const CheckboxItemIndicator: typeof Base.CheckboxItemIndicator;
22
+ export declare namespace CheckboxItemIndicator {
23
+ type Props = Base.CheckboxItemIndicator.Props;
24
+ type State = Base.CheckboxItemIndicator.State;
25
+ }
26
+ export declare const Group: typeof Base.Group;
27
+ export declare namespace Group {
28
+ type Props = Base.Group.Props;
29
+ type State = Base.Group.State;
30
+ }
31
+ export declare const GroupLabel: typeof Base.GroupLabel;
32
+ export declare namespace GroupLabel {
33
+ type Props = Base.GroupLabel.Props;
34
+ type State = Base.GroupLabel.State;
35
+ }
36
+ export declare const Item: typeof Base.Item;
37
+ export declare namespace Item {
38
+ type State = Base.Item.State;
39
+ type Props = Base.Item.Props;
40
+ }
41
+ export declare const LinkItem: typeof Base.LinkItem;
42
+ export declare namespace LinkItem {
43
+ type State = Base.LinkItem.State;
44
+ type Props = Base.LinkItem.Props;
45
+ }
46
+ export declare const Popup: typeof Base.Popup;
47
+ export declare namespace Popup {
48
+ type Props = Base.Popup.Props;
49
+ type State = Base.Popup.State;
50
+ }
51
+ export declare const Portal: typeof Base.Portal;
52
+ export declare namespace Portal {
53
+ type State = Base.Portal.State;
54
+ type Props = Base.Portal.Props;
55
+ }
56
+ export declare const Positioner: typeof Base.Positioner;
57
+ export declare namespace Positioner {
58
+ type State = Base.Positioner.State;
59
+ type Props = Base.Positioner.Props;
60
+ }
61
+ export declare const RadioGroup: typeof Base.RadioGroup;
62
+ export declare namespace RadioGroup {
63
+ type Props = Base.RadioGroup.Props;
64
+ type State = Base.RadioGroup.State;
65
+ type ChangeEventReason = Base.RadioGroup.ChangeEventReason;
66
+ type ChangeEventDetails = Base.RadioGroup.ChangeEventDetails;
67
+ }
68
+ export declare const RadioItem: typeof Base.RadioItem;
69
+ export declare namespace RadioItem {
70
+ type State = Base.RadioItem.State;
71
+ type Props = Base.RadioItem.Props;
72
+ }
73
+ export declare const RadioItemIndicator: typeof Base.RadioItemIndicator;
74
+ export declare namespace RadioItemIndicator {
75
+ type Props = Base.RadioItemIndicator.Props;
76
+ type State = Base.RadioItemIndicator.State;
77
+ }
78
+ export declare const Root: typeof Base.Root;
79
+ export declare namespace Root {
80
+ type State = Base.Root.State;
81
+ type Props<Payload = unknown> = Base.Root.Props<Payload>;
82
+ type Actions = Base.Root.Actions;
83
+ type ChangeEventReason = Base.Root.ChangeEventReason;
84
+ type ChangeEventDetails = Base.Root.ChangeEventDetails;
85
+ type Orientation = Base.Root.Orientation;
86
+ }
87
+ export declare const SubmenuRoot: typeof Base.SubmenuRoot;
88
+ export declare namespace SubmenuRoot {
89
+ type Props = Base.SubmenuRoot.Props;
90
+ type State = Base.SubmenuRoot.State;
91
+ type ChangeEventReason = Base.SubmenuRoot.ChangeEventReason;
92
+ type ChangeEventDetails = Base.SubmenuRoot.ChangeEventDetails;
93
+ }
94
+ export declare const Trigger: <Payload>(props: Omit<Base.Trigger.Props<Payload>, 'ref'> & RefAttributes<HTMLElement> & VariantProps) => ReactElement;
95
+ export declare namespace Trigger {
96
+ type Props<Payload = unknown> = Base.Trigger.Props<Payload> & VariantProps;
97
+ type State = Base.Trigger.State;
98
+ }
99
+ export declare const Viewport: typeof Base.Viewport;
100
+ export declare namespace Viewport {
101
+ type Props = Base.Viewport.Props;
102
+ type State = Base.Viewport.State;
103
+ }
104
+ export declare const Separator: typeof Base.Separator;
105
+ export declare namespace Separator {
106
+ type Props = Base.Separator.Props;
107
+ type State = Base.Separator.State;
108
+ }
109
+ export declare const SubmenuTrigger: typeof Base.SubmenuTrigger;
110
+ export declare namespace SubmenuTrigger {
111
+ type Props = Base.SubmenuTrigger.Props;
112
+ type State = Base.SubmenuTrigger.State;
113
+ }
114
+ export declare const Handle: typeof Base.Handle;
115
+ export type Handle<Payload> = Base.Handle<Payload>;
116
+ export declare const createHandle: typeof Base.createHandle;
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+ import { Menu as Base } from '@base-ui/react/menu';
3
+ import { wrapPart, wrapVariantPart } from "../part.js";
4
+ export const Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, 'nave-base-ui-arrow'))();
5
+ export const Backdrop = /*#__PURE__*/ (() => Base.Backdrop)();
6
+ export const CheckboxItem = /*#__PURE__*/ (() => wrapPart(Base.CheckboxItem, 'nave-base-ui-item'))();
7
+ export const CheckboxItemIndicator = /*#__PURE__*/ (() => Base.CheckboxItemIndicator)();
8
+ export const Group = /*#__PURE__*/ (() => Base.Group)();
9
+ export const GroupLabel = /*#__PURE__*/ (() => wrapPart(Base.GroupLabel, 'nave-base-ui-group-label'))();
10
+ export const Item = /*#__PURE__*/ (() => wrapPart(Base.Item, 'nave-base-ui-item'))();
11
+ export const LinkItem = /*#__PURE__*/ (() => wrapPart(Base.LinkItem, 'nave-base-ui-item'))();
12
+ export const Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, 'nave-base-ui-list-popup'))();
13
+ export const Portal = /*#__PURE__*/ (() => Base.Portal)();
14
+ export const Positioner = /*#__PURE__*/ (() => Base.Positioner)();
15
+ export const RadioGroup = /*#__PURE__*/ (() => Base.RadioGroup)();
16
+ export const RadioItem = /*#__PURE__*/ (() => wrapPart(Base.RadioItem, 'nave-base-ui-item'))();
17
+ export const RadioItemIndicator = /*#__PURE__*/ (() => Base.RadioItemIndicator)();
18
+ export const Root = /*#__PURE__*/ (() => Base.Root)();
19
+ export const SubmenuRoot = /*#__PURE__*/ (() => Base.SubmenuRoot)();
20
+ export const Trigger = /*#__PURE__*/ (() => wrapVariantPart(Base.Trigger, 'nave-base-ui-button'))();
21
+ export const Viewport = /*#__PURE__*/ (() => Base.Viewport)();
22
+ export const Separator = /*#__PURE__*/ (() => wrapPart(Base.Separator, 'nave-base-ui-separator'))();
23
+ export const SubmenuTrigger = /*#__PURE__*/ (() => wrapPart(Base.SubmenuTrigger, 'nave-base-ui-item'))();
24
+ export const Handle = /*#__PURE__*/ (() => Base.Handle)();
25
+ export const createHandle = /*#__PURE__*/ (() => Base.createHandle)();
@@ -0,0 +1,2 @@
1
+ export * as NumberField from './parts.generated.ts';
2
+ export type * from '@base-ui/react/number-field';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as NumberField from "./parts.generated.js";
@@ -0,0 +1,40 @@
1
+ import { NumberField as Base } from '@base-ui/react/number-field';
2
+ export declare const Root: typeof Base.Root;
3
+ export declare namespace Root {
4
+ type State = Base.Root.State;
5
+ type Props = Base.Root.Props;
6
+ type ChangeEventReason = Base.Root.ChangeEventReason;
7
+ type ChangeEventDetails = Base.Root.ChangeEventDetails;
8
+ type CommitEventReason = Base.Root.CommitEventReason;
9
+ type CommitEventDetails = Base.Root.CommitEventDetails;
10
+ }
11
+ export declare const Group: typeof Base.Group;
12
+ export declare namespace Group {
13
+ type State = Base.Group.State;
14
+ type Props = Base.Group.Props;
15
+ }
16
+ export declare const Increment: typeof Base.Increment;
17
+ export declare namespace Increment {
18
+ type State = Base.Increment.State;
19
+ type Props = Base.Increment.Props;
20
+ }
21
+ export declare const Decrement: typeof Base.Decrement;
22
+ export declare namespace Decrement {
23
+ type State = Base.Decrement.State;
24
+ type Props = Base.Decrement.Props;
25
+ }
26
+ export declare const Input: typeof Base.Input;
27
+ export declare namespace Input {
28
+ type State = Base.Input.State;
29
+ type Props = Base.Input.Props;
30
+ }
31
+ export declare const ScrubArea: typeof Base.ScrubArea;
32
+ export declare namespace ScrubArea {
33
+ type State = Base.ScrubArea.State;
34
+ type Props = Base.ScrubArea.Props;
35
+ }
36
+ export declare const ScrubAreaCursor: typeof Base.ScrubAreaCursor;
37
+ export declare namespace ScrubAreaCursor {
38
+ type State = Base.ScrubAreaCursor.State;
39
+ type Props = Base.ScrubAreaCursor.Props;
40
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ // Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
3
+ import { NumberField as Base } from '@base-ui/react/number-field';
4
+ import { wrapPart } from "../part.js";
5
+ export const Root = /*#__PURE__*/ (() => Base.Root)();
6
+ export const Group = /*#__PURE__*/ (() => wrapPart(Base.Group, 'nave-base-ui-number-field-group'))();
7
+ export const Increment = /*#__PURE__*/ (() => wrapPart(Base.Increment, 'nave-base-ui-number-field-stepper'))();
8
+ export const Decrement = /*#__PURE__*/ (() => wrapPart(Base.Decrement, 'nave-base-ui-number-field-stepper'))();
9
+ export const Input = /*#__PURE__*/ (() => wrapPart(Base.Input, 'nave-base-ui-number-field-input'))();
10
+ export const ScrubArea = /*#__PURE__*/ (() => wrapPart(Base.ScrubArea, 'nave-base-ui-number-field-scrub-area'))();
11
+ export const ScrubAreaCursor = /*#__PURE__*/ (() => Base.ScrubAreaCursor)();
package/dist/part.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export interface VariantProps {
2
+ size?: 'md' | 'sm';
3
+ variant?: 'primary' | 'secondary';
4
+ }
5
+ export interface SizeProps {
6
+ size?: 'md' | 'sm';
7
+ }
8
+ /**
9
+ * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the
10
+ * installed Base UI does not have stays absent.
11
+ */
12
+ export declare const wrapPart: <P>(part: P, className: string) => P;
13
+ /**
14
+ * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it
15
+ * is given is the type the generated module declares for it, written from Base UI's own public
16
+ * `Props` so that a generic part (a trigger's `Payload`) stays generic.
17
+ */
18
+ export declare const wrapVariantPart: <T>(part: unknown, className: string) => T;
19
+ /**
20
+ * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have
21
+ * stays absent, as for `wrapPart`.
22
+ */
23
+ export declare const wrapSizePart: <T>(part: unknown, className: string) => T;
package/dist/part.js ADDED
@@ -0,0 +1,59 @@
1
+ 'use client';
2
+ /**
3
+ * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's
4
+ * class added to its `className` (a string is joined after Nave's class, a function of state is
5
+ * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props
6
+ * turned into `data-nave-*` attributes. Everything else (every other prop, the ref, `render`) goes
7
+ * to Base UI's part untouched, and nothing here reads state, layout or style: what the wrapper adds
8
+ * is chosen by the props the consumer passed.
9
+ */
10
+ import { createElement, forwardRef, useMemo, } from 'react';
11
+ const join = (own, consumer) => consumer === undefined || consumer === '' ? own : `${own} ${consumer}`;
12
+ /**
13
+ * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,
14
+ * so a consumer that passes the same function gets the same function through and a memoized part
15
+ * does not re-render for it.
16
+ */
17
+ const useClassName = (own, consumer) => useMemo(() => typeof consumer === 'function'
18
+ ? (state) => join(own, consumer(state))
19
+ : join(own, consumer), [own, consumer]);
20
+ /**
21
+ * The attributes a non-default variant or size renders as, and the props left over. `variant` and
22
+ * `size` are consumed here and never reach Base UI's part, which has no such props.
23
+ */
24
+ const variantAttributes = (props, variants) => {
25
+ const { size, variant, ...rest } = props;
26
+ return {
27
+ ...rest,
28
+ ...(variants === 'variant' && variant === 'primary' && { 'data-nave-variant': 'primary' }),
29
+ ...(size === 'sm' && { 'data-nave-size': 'sm' }),
30
+ };
31
+ };
32
+ const build = (part, own, variants) => forwardRef(function NaveBaseUiPart(props, ref) {
33
+ const forwarded = variants === undefined ? props : variantAttributes(props, variants);
34
+ const className = useClassName(own, forwarded.className);
35
+ return createElement(part, { ...forwarded, className, ref });
36
+ });
37
+ /**
38
+ * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the
39
+ * peer floor): the export stays absent instead of becoming a component that throws when rendered.
40
+ */
41
+ const wrap = (part, className, variants) => part === undefined
42
+ ? part
43
+ : build(part, className, variants);
44
+ /**
45
+ * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the
46
+ * installed Base UI does not have stays absent.
47
+ */
48
+ export const wrapPart = (part, className) => wrap(part, className, undefined);
49
+ /**
50
+ * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it
51
+ * is given is the type the generated module declares for it, written from Base UI's own public
52
+ * `Props` so that a generic part (a trigger's `Payload`) stays generic.
53
+ */
54
+ export const wrapVariantPart = (part, className) => wrap(part, className, 'variant');
55
+ /**
56
+ * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have
57
+ * stays absent, as for `wrapPart`.
58
+ */
59
+ export const wrapSizePart = (part, className) => wrap(part, className, 'size');
@@ -0,0 +1,2 @@
1
+ export * as Popover from './parts.generated.ts';
2
+ export type * from '@base-ui/react/popover';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as Popover from "./parts.generated.js";
@@ -0,0 +1,64 @@
1
+ import type { ReactElement, RefAttributes } from 'react';
2
+ import { Popover as Base } from '@base-ui/react/popover';
3
+ import { type VariantProps } from '../part.ts';
4
+ export declare const Root: typeof Base.Root;
5
+ export declare namespace Root {
6
+ type State = Base.Root.State;
7
+ type Props<Payload = unknown> = Base.Root.Props<Payload>;
8
+ type Actions = Base.Root.Actions;
9
+ type ChangeEventReason = Base.Root.ChangeEventReason;
10
+ type ChangeEventDetails = Base.Root.ChangeEventDetails;
11
+ }
12
+ export declare const Trigger: <Payload>(props: Omit<Base.Trigger.Props<Payload>, 'ref'> & RefAttributes<HTMLElement> & VariantProps) => ReactElement;
13
+ export declare namespace Trigger {
14
+ type State = Base.Trigger.State;
15
+ type Props<Payload = unknown> = Base.Trigger.Props<Payload> & VariantProps;
16
+ }
17
+ export declare const Portal: typeof Base.Portal;
18
+ export declare namespace Portal {
19
+ type State = Base.Portal.State;
20
+ type Props = Base.Portal.Props;
21
+ }
22
+ export declare const Positioner: typeof Base.Positioner;
23
+ export declare namespace Positioner {
24
+ type State = Base.Positioner.State;
25
+ type Props = Base.Positioner.Props;
26
+ }
27
+ export declare const Popup: typeof Base.Popup;
28
+ export declare namespace Popup {
29
+ type State = Base.Popup.State;
30
+ type Props = Base.Popup.Props;
31
+ }
32
+ export declare const Arrow: typeof Base.Arrow;
33
+ export declare namespace Arrow {
34
+ type State = Base.Arrow.State;
35
+ type Props = Base.Arrow.Props;
36
+ }
37
+ export declare const Backdrop: typeof Base.Backdrop;
38
+ export declare namespace Backdrop {
39
+ type State = Base.Backdrop.State;
40
+ type Props = Base.Backdrop.Props;
41
+ }
42
+ export declare const Title: typeof Base.Title;
43
+ export declare namespace Title {
44
+ type State = Base.Title.State;
45
+ type Props = Base.Title.Props;
46
+ }
47
+ export declare const Description: typeof Base.Description;
48
+ export declare namespace Description {
49
+ type State = Base.Description.State;
50
+ type Props = Base.Description.Props;
51
+ }
52
+ export declare const Close: (props: Omit<Base.Close.Props, 'ref'> & RefAttributes<HTMLButtonElement> & VariantProps) => ReactElement;
53
+ export declare namespace Close {
54
+ type State = Base.Close.State;
55
+ type Props = Base.Close.Props & VariantProps;
56
+ }
57
+ export declare const Viewport: typeof Base.Viewport;
58
+ export declare namespace Viewport {
59
+ type Props = Base.Viewport.Props;
60
+ type State = Base.Viewport.State;
61
+ }
62
+ export declare const createHandle: typeof Base.createHandle;
63
+ export declare const Handle: typeof Base.Handle;
64
+ export type Handle<Payload> = Base.Handle<Payload>;
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+ import { Popover as Base } from '@base-ui/react/popover';
3
+ import { wrapPart, wrapVariantPart } from "../part.js";
4
+ export const Root = /*#__PURE__*/ (() => Base.Root)();
5
+ export const Trigger = /*#__PURE__*/ (() => wrapVariantPart(Base.Trigger, 'nave-base-ui-button'))();
6
+ export const Portal = /*#__PURE__*/ (() => Base.Portal)();
7
+ export const Positioner = /*#__PURE__*/ (() => Base.Positioner)();
8
+ export const Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, 'nave-base-ui-popover-popup'))();
9
+ export const Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, 'nave-base-ui-arrow'))();
10
+ export const Backdrop = /*#__PURE__*/ (() => Base.Backdrop)();
11
+ export const Title = /*#__PURE__*/ (() => wrapPart(Base.Title, 'nave-base-ui-title'))();
12
+ export const Description = /*#__PURE__*/ (() => wrapPart(Base.Description, 'nave-base-ui-description'))();
13
+ export const Close = /*#__PURE__*/ (() => wrapVariantPart(Base.Close, 'nave-base-ui-button'))();
14
+ export const Viewport = /*#__PURE__*/ (() => Base.Viewport)();
15
+ export const createHandle = /*#__PURE__*/ (() => Base.createHandle)();
16
+ export const Handle = /*#__PURE__*/ (() => Base.Handle)();
@@ -0,0 +1,2 @@
1
+ export * as Radio from './parts.generated.ts';
2
+ export type * from '@base-ui/react/radio';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as Radio from "./parts.generated.js";
@@ -0,0 +1,11 @@
1
+ import { Radio as Base } from '@base-ui/react/radio';
2
+ export declare const Root: typeof Base.Root;
3
+ export declare namespace Root {
4
+ type State = Base.Root.State;
5
+ type Props<TValue = any> = Base.Root.Props<TValue>;
6
+ }
7
+ export declare const Indicator: typeof Base.Indicator;
8
+ export declare namespace Indicator {
9
+ type Props = Base.Indicator.Props;
10
+ type State = Base.Indicator.State;
11
+ }
@@ -0,0 +1,6 @@
1
+ 'use client';
2
+ // Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
3
+ import { Radio as Base } from '@base-ui/react/radio';
4
+ import { wrapPart } from "../part.js";
5
+ export const Root = /*#__PURE__*/ (() => wrapPart(Base.Root, 'nave-base-ui-radio'))();
6
+ export const Indicator = /*#__PURE__*/ (() => wrapPart(Base.Indicator, 'nave-base-ui-radio-indicator'))();
@@ -0,0 +1,2 @@
1
+ export { RadioGroup } from './parts.generated.ts';
2
+ export type * from '@base-ui/react/radio-group';
@@ -0,0 +1,3 @@
1
+ 'use client';
2
+ /* eslint-disable import-x/export -- the named export wins over the star re-export, as TypeScript has it */
3
+ export { RadioGroup } from "./parts.generated.js";
@@ -0,0 +1,8 @@
1
+ import { RadioGroup as Base } from '@base-ui/react/radio-group';
2
+ export declare const RadioGroup: typeof Base;
3
+ export declare namespace RadioGroup {
4
+ type State = Base.State;
5
+ type Props<TValue = any> = Base.Props<TValue>;
6
+ type ChangeEventReason = Base.ChangeEventReason;
7
+ type ChangeEventDetails = Base.ChangeEventDetails;
8
+ }
@@ -0,0 +1,5 @@
1
+ 'use client';
2
+ // Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
3
+ import { RadioGroup as Base } from '@base-ui/react/radio-group';
4
+ import { wrapPart } from "../part.js";
5
+ export const RadioGroup = /*#__PURE__*/ (() => wrapPart(Base, 'nave-base-ui-choice-group'))();
@@ -0,0 +1,2 @@
1
+ export * as Select from './parts.generated.ts';
2
+ export type * from '@base-ui/react/select';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as Select from "./parts.generated.js";
@@ -0,0 +1,99 @@
1
+ import { Select as Base } from '@base-ui/react/select';
2
+ export declare const Root: typeof Base.Root;
3
+ export declare namespace Root {
4
+ type Props<Value, Multiple extends boolean | undefined = false> = Base.Root.Props<Value, Multiple>;
5
+ type State = Base.Root.State;
6
+ type Actions = Base.Root.Actions;
7
+ type ChangeEventReason = Base.Root.ChangeEventReason;
8
+ type ChangeEventDetails = Base.Root.ChangeEventDetails;
9
+ }
10
+ export declare const Label: typeof Base.Label;
11
+ export declare namespace Label {
12
+ type State = Base.Label.State;
13
+ type Props = Base.Label.Props;
14
+ }
15
+ export declare const Trigger: typeof Base.Trigger;
16
+ export declare namespace Trigger {
17
+ type State = Base.Trigger.State;
18
+ type Props = Base.Trigger.Props;
19
+ }
20
+ export declare const Value: typeof Base.Value;
21
+ export declare namespace Value {
22
+ type State = Base.Value.State;
23
+ type Props = Base.Value.Props;
24
+ }
25
+ export declare const Icon: typeof Base.Icon;
26
+ export declare namespace Icon {
27
+ type State = Base.Icon.State;
28
+ type Props = Base.Icon.Props;
29
+ }
30
+ export declare const Portal: typeof Base.Portal;
31
+ export declare namespace Portal {
32
+ type State = Base.Portal.State;
33
+ type Props = Base.Portal.Props;
34
+ }
35
+ export declare const Backdrop: typeof Base.Backdrop;
36
+ export declare namespace Backdrop {
37
+ type State = Base.Backdrop.State;
38
+ type Props = Base.Backdrop.Props;
39
+ }
40
+ export declare const Positioner: typeof Base.Positioner;
41
+ export declare namespace Positioner {
42
+ type State = Base.Positioner.State;
43
+ type Props = Base.Positioner.Props;
44
+ }
45
+ export declare const Popup: typeof Base.Popup;
46
+ export declare namespace Popup {
47
+ type Props = Base.Popup.Props;
48
+ type State = Base.Popup.State;
49
+ }
50
+ export declare const List: typeof Base.List;
51
+ export declare namespace List {
52
+ type Props = Base.List.Props;
53
+ type State = Base.List.State;
54
+ }
55
+ export declare const Item: typeof Base.Item;
56
+ export declare namespace Item {
57
+ type State = Base.Item.State;
58
+ type Props = Base.Item.Props;
59
+ }
60
+ export declare const ItemIndicator: typeof Base.ItemIndicator;
61
+ export declare namespace ItemIndicator {
62
+ type State = Base.ItemIndicator.State;
63
+ type Props = Base.ItemIndicator.Props;
64
+ }
65
+ export declare const ItemText: typeof Base.ItemText;
66
+ export declare namespace ItemText {
67
+ type State = Base.ItemText.State;
68
+ type Props = Base.ItemText.Props;
69
+ }
70
+ export declare const Arrow: typeof Base.Arrow;
71
+ export declare namespace Arrow {
72
+ type State = Base.Arrow.State;
73
+ type Props = Base.Arrow.Props;
74
+ }
75
+ export declare const ScrollDownArrow: typeof Base.ScrollDownArrow;
76
+ export declare namespace ScrollDownArrow {
77
+ type State = Base.ScrollDownArrow.State;
78
+ type Props = Base.ScrollDownArrow.Props;
79
+ }
80
+ export declare const ScrollUpArrow: typeof Base.ScrollUpArrow;
81
+ export declare namespace ScrollUpArrow {
82
+ type State = Base.ScrollUpArrow.State;
83
+ type Props = Base.ScrollUpArrow.Props;
84
+ }
85
+ export declare const Group: typeof Base.Group;
86
+ export declare namespace Group {
87
+ type State = Base.Group.State;
88
+ type Props = Base.Group.Props;
89
+ }
90
+ export declare const GroupLabel: typeof Base.GroupLabel;
91
+ export declare namespace GroupLabel {
92
+ type State = Base.GroupLabel.State;
93
+ type Props = Base.GroupLabel.Props;
94
+ }
95
+ export declare const Separator: typeof Base.Separator;
96
+ export declare namespace Separator {
97
+ type Props = Base.Separator.Props;
98
+ type State = Base.Separator.State;
99
+ }
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ // Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
3
+ import { Select as Base } from '@base-ui/react/select';
4
+ import { wrapPart } from "../part.js";
5
+ export const Root = /*#__PURE__*/ (() => Base.Root)();
6
+ export const Label = /*#__PURE__*/ (() => wrapPart(Base.Label, 'nave-base-ui-label'))();
7
+ export const Trigger = /*#__PURE__*/ (() => wrapPart(Base.Trigger, 'nave-base-ui-select-trigger'))();
8
+ export const Value = /*#__PURE__*/ (() => wrapPart(Base.Value, 'nave-base-ui-select-value'))();
9
+ export const Icon = /*#__PURE__*/ (() => wrapPart(Base.Icon, 'nave-base-ui-select-icon'))();
10
+ export const Portal = /*#__PURE__*/ (() => Base.Portal)();
11
+ export const Backdrop = /*#__PURE__*/ (() => Base.Backdrop)();
12
+ export const Positioner = /*#__PURE__*/ (() => Base.Positioner)();
13
+ export const Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, 'nave-base-ui-list-popup'))();
14
+ export const List = /*#__PURE__*/ (() => Base.List)();
15
+ export const Item = /*#__PURE__*/ (() => wrapPart(Base.Item, 'nave-base-ui-item'))();
16
+ export const ItemIndicator = /*#__PURE__*/ (() => Base.ItemIndicator)();
17
+ export const ItemText = /*#__PURE__*/ (() => Base.ItemText)();
18
+ export const Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, 'nave-base-ui-arrow'))();
19
+ export const ScrollDownArrow = /*#__PURE__*/ (() => Base.ScrollDownArrow)();
20
+ export const ScrollUpArrow = /*#__PURE__*/ (() => Base.ScrollUpArrow)();
21
+ export const Group = /*#__PURE__*/ (() => Base.Group)();
22
+ export const GroupLabel = /*#__PURE__*/ (() => wrapPart(Base.GroupLabel, 'nave-base-ui-group-label'))();
23
+ export const Separator = /*#__PURE__*/ (() => wrapPart(Base.Separator, 'nave-base-ui-separator'))();
@@ -0,0 +1,2 @@
1
+ export * as Slider from './parts.generated.ts';
2
+ export type * from '@base-ui/react/slider';
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ export * as Slider from "./parts.generated.js";
@@ -0,0 +1,40 @@
1
+ import { Slider as Base } from '@base-ui/react/slider';
2
+ export declare const Root: typeof Base.Root;
3
+ export declare namespace Root {
4
+ type State = Base.Root.State;
5
+ type Props<Value extends number | readonly number[] = number | readonly number[]> = Base.Root.Props<Value>;
6
+ type ChangeEventReason = Base.Root.ChangeEventReason;
7
+ type ChangeEventDetails = Base.Root.ChangeEventDetails;
8
+ type CommitEventReason = Base.Root.CommitEventReason;
9
+ type CommitEventDetails = Base.Root.CommitEventDetails;
10
+ }
11
+ export declare const Label: typeof Base.Label;
12
+ export declare namespace Label {
13
+ type State = Base.Label.State;
14
+ type Props = Base.Label.Props;
15
+ }
16
+ export declare const Value: typeof Base.Value;
17
+ export declare namespace Value {
18
+ type State = Base.Value.State;
19
+ type Props = Base.Value.Props;
20
+ }
21
+ export declare const Control: typeof Base.Control;
22
+ export declare namespace Control {
23
+ type State = Base.Control.State;
24
+ type Props = Base.Control.Props;
25
+ }
26
+ export declare const Track: typeof Base.Track;
27
+ export declare namespace Track {
28
+ type State = Base.Track.State;
29
+ type Props = Base.Track.Props;
30
+ }
31
+ export declare const Thumb: typeof Base.Thumb;
32
+ export declare namespace Thumb {
33
+ type State = Base.Thumb.State;
34
+ type Props = Base.Thumb.Props;
35
+ }
36
+ export declare const Indicator: typeof Base.Indicator;
37
+ export declare namespace Indicator {
38
+ type State = Base.Indicator.State;
39
+ type Props = Base.Indicator.Props;
40
+ }