@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.
- package/LICENSE +21 -0
- package/README.md +187 -2
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +2 -0
- package/dist/accordion/parts.generated.d.ts +31 -0
- package/dist/accordion/parts.generated.js +9 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +3 -0
- package/dist/button/parts.generated.d.ts +8 -0
- package/dist/button/parts.generated.js +4 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/parts.generated.d.ts +13 -0
- package/dist/checkbox/parts.generated.js +6 -0
- package/dist/checkbox-group/index.d.ts +2 -0
- package/dist/checkbox-group/index.js +3 -0
- package/dist/checkbox-group/parts.generated.d.ts +8 -0
- package/dist/checkbox-group/parts.generated.js +5 -0
- package/dist/collapsible/index.d.ts +2 -0
- package/dist/collapsible/index.js +2 -0
- package/dist/collapsible/parts.generated.d.ts +18 -0
- package/dist/collapsible/parts.generated.js +7 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/parts.generated.d.ts +54 -0
- package/dist/dialog/parts.generated.js +14 -0
- package/dist/field/index.d.ts +2 -0
- package/dist/field/index.js +2 -0
- package/dist/field/parts.generated.d.ts +40 -0
- package/dist/field/parts.generated.js +12 -0
- package/dist/fieldset/index.d.ts +2 -0
- package/dist/fieldset/index.js +2 -0
- package/dist/fieldset/parts.generated.d.ts +11 -0
- package/dist/fieldset/parts.generated.js +6 -0
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +3 -0
- package/dist/form/parts.generated.d.ts +11 -0
- package/dist/form/parts.generated.js +4 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +24 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +3 -0
- package/dist/input/parts.generated.d.ts +8 -0
- package/dist/input/parts.generated.js +5 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/parts.generated.d.ts +116 -0
- package/dist/menu/parts.generated.js +25 -0
- package/dist/number-field/index.d.ts +2 -0
- package/dist/number-field/index.js +2 -0
- package/dist/number-field/parts.generated.d.ts +40 -0
- package/dist/number-field/parts.generated.js +11 -0
- package/dist/part.d.ts +23 -0
- package/dist/part.js +59 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/parts.generated.d.ts +64 -0
- package/dist/popover/parts.generated.js +16 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/parts.generated.d.ts +11 -0
- package/dist/radio/parts.generated.js +6 -0
- package/dist/radio-group/index.d.ts +2 -0
- package/dist/radio-group/index.js +3 -0
- package/dist/radio-group/parts.generated.d.ts +8 -0
- package/dist/radio-group/parts.generated.js +5 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +2 -0
- package/dist/select/parts.generated.d.ts +99 -0
- package/dist/select/parts.generated.js +23 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +2 -0
- package/dist/slider/parts.generated.d.ts +40 -0
- package/dist/slider/parts.generated.js +11 -0
- package/dist/styles.css +161 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/parts.generated.d.ts +13 -0
- package/dist/switch/parts.generated.js +6 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/parts.generated.d.ts +35 -0
- package/dist/tabs/parts.generated.js +9 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +3 -0
- package/dist/toggle/parts.generated.d.ts +10 -0
- package/dist/toggle/parts.generated.js +4 -0
- package/dist/toggle-group/index.d.ts +2 -0
- package/dist/toggle-group/index.js +3 -0
- package/dist/toggle-group/parts.generated.d.ts +8 -0
- package/dist/toggle-group/parts.generated.js +5 -0
- package/dist/toolbar/index.d.ts +2 -0
- package/dist/toolbar/index.js +2 -0
- package/dist/toolbar/parts.generated.d.ts +35 -0
- package/dist/toolbar/parts.generated.js +9 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/parts.generated.d.ts +49 -0
- package/dist/tooltip/parts.generated.js +13 -0
- package/package.json +192 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nave Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,188 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @navecss/base-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
NaveCSS styles Base UI's components with Nave's tokens: the same parts, the same props, pre-styled.
|
|
4
|
+
|
|
5
|
+
This package is not affiliated with, endorsed by or sponsored by MUI or the Base UI project.
|
|
6
|
+
|
|
7
|
+
`@base-ui/react` is a separately installed peer, built and maintained by its own maintainers; this package does not include it. You change `@base-ui/react/<component>` to `@navecss/base-ui/<component>` in your imports, add one stylesheet, and every part keeps Base UI's props, types, refs and behaviour while gaining Nave's styling. The styling is zero-runtime styling: static classes and one static stylesheet, with all behaviour still Base UI's.
|
|
8
|
+
|
|
9
|
+
On this page: [Install](#install) · [Use it](#use-it) · [The stylesheet](#the-stylesheet) · [Variants](#variants) · [Overriding](#overriding) · [What is styled](#what-is-styled) · [Things to know](#things-to-know) · [License](#license)
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add @navecss/base-ui @navecss/tokens @base-ui/react react react-dom
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @navecss/base-ui @navecss/tokens @base-ui/react react react-dom
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It needs `@base-ui/react` 1.3 or later in the 1.x line, React 18 or 19, and `@navecss/tokens`. It does not need `@navecss/core`.
|
|
22
|
+
|
|
23
|
+
## Use it
|
|
24
|
+
|
|
25
|
+
Change the prefix of an import, and nothing else:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { Dialog } from '@base-ui/react/dialog'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Dialog } from '@navecss/base-ui/dialog'
|
|
33
|
+
|
|
34
|
+
export default function RenameDialog() {
|
|
35
|
+
return (
|
|
36
|
+
<Dialog.Root>
|
|
37
|
+
<Dialog.Trigger>Rename</Dialog.Trigger>
|
|
38
|
+
<Dialog.Portal>
|
|
39
|
+
<Dialog.Backdrop />
|
|
40
|
+
<Dialog.Popup>
|
|
41
|
+
<Dialog.Title>Rename file</Dialog.Title>
|
|
42
|
+
<Dialog.Description>Choose a new name for this file.</Dialog.Description>
|
|
43
|
+
<Dialog.Close>Done</Dialog.Close>
|
|
44
|
+
</Dialog.Popup>
|
|
45
|
+
</Dialog.Portal>
|
|
46
|
+
</Dialog.Root>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Every subpath of Base UI that this package wraps is listed under [What is styled](#what-is-styled). Each one also re-exports every type Base UI exports there, so type imports change the same way. The package root, `@navecss/base-ui`, re-exports the same components.
|
|
52
|
+
|
|
53
|
+
## The stylesheet
|
|
54
|
+
|
|
55
|
+
Import Nave's tokens, then this package's stylesheet, before any stylesheet of yours that declares a `@layer`:
|
|
56
|
+
|
|
57
|
+
```css
|
|
58
|
+
/* app.css */
|
|
59
|
+
@import url('@navecss/tokens/css');
|
|
60
|
+
@import url('@navecss/base-ui/styles.css');
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Both files begin with Nave's `@layer` order statement, and the order holds only if that statement is the first `@layer` declaration your page sees. The stylesheet is already built: nothing in your build needs to know about Nave, so it takes no plugin and no directive. Every rule in it sits in `@layer components.nave`, it declares no custom property and sets no `z-index`.
|
|
64
|
+
|
|
65
|
+
Nave's colours need Chrome or Edge 125, Firefox 128 or Safari 18, and your CSS build has to target the same floor, or it rewrites the colours into a form that does not follow the page's colour scheme. In Vite:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
build: { cssTarget: ['chrome125', 'edge125', 'firefox128', 'safari18', 'ios18'] },
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
[Why that floor](https://github.com/navecss/navecss/blob/main/docs/04-adr/0005-browser-floor.md).
|
|
72
|
+
|
|
73
|
+
Tokens are CSS custom properties. If you scope a token yourself, set it on the part's own class or on `:root`, never on an ancestor of a part Base UI portals: a portalled popup renders outside that ancestor, so the token never reaches it.
|
|
74
|
+
|
|
75
|
+
## Variants
|
|
76
|
+
|
|
77
|
+
The Button family takes two optional props.
|
|
78
|
+
|
|
79
|
+
| Prop | Values | Default |
|
|
80
|
+
| --------- | -------------------------- | ------------- |
|
|
81
|
+
| `variant` | `'secondary'`, `'primary'` | `'secondary'` |
|
|
82
|
+
| `size` | `'md'`, `'sm'` | `'md'` |
|
|
83
|
+
|
|
84
|
+
They are accepted by `Button`, `Toolbar.Button`, and the trigger and close parts of Dialog and Popover, `Menu.Trigger` and `Tooltip.Trigger`. `Toggle` takes `size` only. Both are typed as those unions and neither reaches the DOM as a prop.
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { Button } from '@navecss/base-ui/button'
|
|
88
|
+
|
|
89
|
+
export default function SaveButton() {
|
|
90
|
+
return (
|
|
91
|
+
<Button variant="primary" size="sm">
|
|
92
|
+
Save
|
|
93
|
+
</Button>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Overriding
|
|
99
|
+
|
|
100
|
+
There are three steps, from the lightest:
|
|
101
|
+
|
|
102
|
+
1. **Tokens.** Re-theme with Nave's tokens and every part follows. Nothing else is needed for a different palette, radius or spacing.
|
|
103
|
+
2. **`className`.** Pass a class to any part, as a string or as Base UI's function of the part's state. Put its rules in `@layer components.consumer`: that layer comes after Nave's, so your class wins in every state, whatever the specificity of Nave's rule. It also means that restyling a property restyles it in every state: set `background-color` on a Button and your colour replaces the `primary` variant's hover and active colours and a disabled button's too, so write the states you want yourself.
|
|
104
|
+
3. **The raw Base UI part.** Import the part from `@base-ui/react/<component>` and style it from scratch. It mixes freely with wrapped parts.
|
|
105
|
+
|
|
106
|
+
```css
|
|
107
|
+
/* menu.module.css */
|
|
108
|
+
@layer components.consumer {
|
|
109
|
+
.popup {
|
|
110
|
+
border-radius: var(--nave-radius-control);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import { Menu } from '@navecss/base-ui/menu'
|
|
117
|
+
|
|
118
|
+
export default function ActionsMenu() {
|
|
119
|
+
return (
|
|
120
|
+
<Menu.Root>
|
|
121
|
+
<Menu.Trigger>Actions</Menu.Trigger>
|
|
122
|
+
<Menu.Portal>
|
|
123
|
+
<Menu.Positioner>
|
|
124
|
+
<Menu.Popup className="popup">
|
|
125
|
+
<Menu.Item>Rename</Menu.Item>
|
|
126
|
+
<Menu.Item>Delete</Menu.Item>
|
|
127
|
+
</Menu.Popup>
|
|
128
|
+
</Menu.Positioner>
|
|
129
|
+
</Menu.Portal>
|
|
130
|
+
</Menu.Root>
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Behaviour is Base UI's. Parts Nave does not style, such as `Portal`, `Positioner`, `Provider` and `Form`, are Base UI's own parts, passed through unchanged.
|
|
136
|
+
|
|
137
|
+
## What is styled
|
|
138
|
+
|
|
139
|
+
| Group | Subpaths |
|
|
140
|
+
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
141
|
+
| Overlays | `@navecss/base-ui/dialog`, `@navecss/base-ui/popover`, `@navecss/base-ui/menu`, `@navecss/base-ui/select`, `@navecss/base-ui/tooltip` |
|
|
142
|
+
| Disclosure | `@navecss/base-ui/accordion`, `@navecss/base-ui/collapsible`, `@navecss/base-ui/tabs` |
|
|
143
|
+
| Controls | `@navecss/base-ui/button`, `@navecss/base-ui/input`, `@navecss/base-ui/number-field`, `@navecss/base-ui/field`, `@navecss/base-ui/fieldset`, `@navecss/base-ui/form`, `@navecss/base-ui/checkbox`, `@navecss/base-ui/checkbox-group`, `@navecss/base-ui/radio`, `@navecss/base-ui/radio-group`, `@navecss/base-ui/switch`, `@navecss/base-ui/slider`, `@navecss/base-ui/toggle`, `@navecss/base-ui/toggle-group`, `@navecss/base-ui/toolbar` |
|
|
144
|
+
|
|
145
|
+
Version 1 does not paint everything. It has no highlight on the hovered or arrowed item of a menu or select, no scrim colour behind a dialog (its backdrop has no paint, and this package recommends no value for one), no motion on popups, tooltips or the tab indicator, an arrow that sits on physical sides only (top, bottom, left and right, not the logical start and end), and no fill on a slider's range. Button comes in `secondary` and `primary`, in sizes `md` and `sm`, and no other. What it leaves out you can add with a class of your own, as above.
|
|
146
|
+
|
|
147
|
+
## Things to know
|
|
148
|
+
|
|
149
|
+
When a disclosure trigger's last child is an `svg`, that icon turns when the panel opens. A lone icon counts as the last child, so put a decorative leading icon inside an element of its own:
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
import { Accordion } from '@navecss/base-ui/accordion'
|
|
153
|
+
|
|
154
|
+
export default function ShippingAccordion() {
|
|
155
|
+
return (
|
|
156
|
+
<Accordion.Root>
|
|
157
|
+
<Accordion.Item value="shipping">
|
|
158
|
+
<Accordion.Header>
|
|
159
|
+
<Accordion.Trigger>
|
|
160
|
+
<span>
|
|
161
|
+
<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true">
|
|
162
|
+
<circle cx="8" cy="8" r="6" />
|
|
163
|
+
</svg>
|
|
164
|
+
</span>
|
|
165
|
+
Shipping
|
|
166
|
+
<svg viewBox="0 0 16 16" width="16" height="16" aria-hidden="true">
|
|
167
|
+
<path d="M3 6l5 5 5-5" />
|
|
168
|
+
</svg>
|
|
169
|
+
</Accordion.Trigger>
|
|
170
|
+
</Accordion.Header>
|
|
171
|
+
<Accordion.Panel>Orders ship within two working days.</Accordion.Panel>
|
|
172
|
+
</Accordion.Item>
|
|
173
|
+
</Accordion.Root>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The Accordion and Collapsible panels set `overflow: hidden` so their height can animate, which also clips anything drawn outside the panel's box, focus rings included. Each panel insets its content by enough for Nave's focus ring: at both sides, above its first element and below its last. That inset reaches elements only, so a panel that starts or ends with bare text gets none there, and your own margins on those elements replace it. Keep at least the width plus the offset of your focus ring clear around any focusable element at the panel's edge.
|
|
179
|
+
|
|
180
|
+
When nothing inside a popup can take focus, Base UI focuses the popup itself and the browser draws its focus ring around the panel. This package leaves that ring alone. Removing it with `outline: 0`, as Base UI's own demos do, leaves a keyboard user with no visible sign of where focus is.
|
|
181
|
+
|
|
182
|
+
In Base UI 1.8.0, `Menu.LinkItem` has no disabled state: a `disabled` prop reaches the `<a>` as a plain attribute, the link still activates, and it does not take the disabled colour Nave gives the other menu items.
|
|
183
|
+
|
|
184
|
+
When the reader's system asks for reduced motion, this package turns off the motion of Accordion and Collapsible panels opening and closing, the turn of the icon in their triggers and the switch's slide, even if you have changed Nave's motion tokens. Motion you add or restyle yourself is yours to switch off.
|
|
185
|
+
|
|
186
|
+
## License
|
|
187
|
+
|
|
188
|
+
MIT. See [LICENSE](https://github.com/navecss/navecss/blob/main/packages/base-ui/LICENSE).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Accordion as Base } from '@base-ui/react/accordion';
|
|
2
|
+
export declare const Root: typeof Base.Root;
|
|
3
|
+
export declare namespace Root {
|
|
4
|
+
type Value<TValue = any> = Base.Root.Value<TValue>;
|
|
5
|
+
type State<TValue = any> = Base.Root.State<TValue>;
|
|
6
|
+
type Props<TValue = any> = Base.Root.Props<TValue>;
|
|
7
|
+
type ChangeEventReason = Base.Root.ChangeEventReason;
|
|
8
|
+
type ChangeEventDetails = Base.Root.ChangeEventDetails;
|
|
9
|
+
}
|
|
10
|
+
export declare const Item: typeof Base.Item;
|
|
11
|
+
export declare namespace Item {
|
|
12
|
+
type State = Base.Item.State;
|
|
13
|
+
type Props = Base.Item.Props;
|
|
14
|
+
type ChangeEventReason = Base.Item.ChangeEventReason;
|
|
15
|
+
type ChangeEventDetails = Base.Item.ChangeEventDetails;
|
|
16
|
+
}
|
|
17
|
+
export declare const Header: typeof Base.Header;
|
|
18
|
+
export declare namespace Header {
|
|
19
|
+
type State = Base.Header.State;
|
|
20
|
+
type Props = Base.Header.Props;
|
|
21
|
+
}
|
|
22
|
+
export declare const Trigger: typeof Base.Trigger;
|
|
23
|
+
export declare namespace Trigger {
|
|
24
|
+
type State = Base.Trigger.State;
|
|
25
|
+
type Props = Base.Trigger.Props;
|
|
26
|
+
}
|
|
27
|
+
export declare const Panel: typeof Base.Panel;
|
|
28
|
+
export declare namespace Panel {
|
|
29
|
+
type State = Base.Panel.State;
|
|
30
|
+
type Props = Base.Panel.Props;
|
|
31
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
|
|
3
|
+
import { Accordion as Base } from '@base-ui/react/accordion';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const Root = /*#__PURE__*/ (() => Base.Root)();
|
|
6
|
+
export const Item = /*#__PURE__*/ (() => wrapPart(Base.Item, 'nave-base-ui-accordion-item'))();
|
|
7
|
+
export const Header = /*#__PURE__*/ (() => wrapPart(Base.Header, 'nave-base-ui-accordion-header'))();
|
|
8
|
+
export const Trigger = /*#__PURE__*/ (() => wrapPart(Base.Trigger, 'nave-base-ui-disclosure-trigger nave-base-ui-disclosure-icon'))();
|
|
9
|
+
export const Panel = /*#__PURE__*/ (() => wrapPart(Base.Panel, 'nave-base-ui-accordion-panel'))();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactElement, RefAttributes } from 'react';
|
|
2
|
+
import { Button as Base } from '@base-ui/react/button';
|
|
3
|
+
import { type VariantProps } from '../part.ts';
|
|
4
|
+
export declare const Button: (props: Omit<Base.Props, 'ref'> & RefAttributes<HTMLElement> & VariantProps) => ReactElement;
|
|
5
|
+
export declare namespace Button {
|
|
6
|
+
type State = Base.State;
|
|
7
|
+
type Props = Base.Props & VariantProps;
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Checkbox as Base } from '@base-ui/react/checkbox';
|
|
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
|
+
}
|
|
9
|
+
export declare const Indicator: typeof Base.Indicator;
|
|
10
|
+
export declare namespace Indicator {
|
|
11
|
+
type State = Base.Indicator.State;
|
|
12
|
+
type Props = Base.Indicator.Props;
|
|
13
|
+
}
|
|
@@ -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 { Checkbox as Base } from '@base-ui/react/checkbox';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const Root = /*#__PURE__*/ (() => wrapPart(Base.Root, 'nave-base-ui-checkbox'))();
|
|
6
|
+
export const Indicator = /*#__PURE__*/ (() => wrapPart(Base.Indicator, 'nave-base-ui-checkbox-indicator'))();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CheckboxGroup as Base } from '@base-ui/react/checkbox-group';
|
|
2
|
+
export declare const CheckboxGroup: typeof Base;
|
|
3
|
+
export declare namespace CheckboxGroup {
|
|
4
|
+
type State = Base.State;
|
|
5
|
+
type Props = Base.Props;
|
|
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 { CheckboxGroup as Base } from '@base-ui/react/checkbox-group';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const CheckboxGroup = /*#__PURE__*/ (() => wrapPart(Base, 'nave-base-ui-choice-group'))();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Collapsible as Base } from '@base-ui/react/collapsible';
|
|
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
|
+
}
|
|
9
|
+
export declare const Trigger: typeof Base.Trigger;
|
|
10
|
+
export declare namespace Trigger {
|
|
11
|
+
type State = Base.Trigger.State;
|
|
12
|
+
type Props = Base.Trigger.Props;
|
|
13
|
+
}
|
|
14
|
+
export declare const Panel: typeof Base.Panel;
|
|
15
|
+
export declare namespace Panel {
|
|
16
|
+
type State = Base.Panel.State;
|
|
17
|
+
type Props = Base.Panel.Props;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
|
|
3
|
+
import { Collapsible as Base } from '@base-ui/react/collapsible';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const Root = /*#__PURE__*/ (() => Base.Root)();
|
|
6
|
+
export const Trigger = /*#__PURE__*/ (() => wrapPart(Base.Trigger, 'nave-base-ui-disclosure-trigger nave-base-ui-disclosure-icon'))();
|
|
7
|
+
export const Panel = /*#__PURE__*/ (() => wrapPart(Base.Panel, 'nave-base-ui-collapsible-panel'))();
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactElement, RefAttributes } from 'react';
|
|
2
|
+
import { Dialog as Base } from '@base-ui/react/dialog';
|
|
3
|
+
import { type VariantProps } from '../part.ts';
|
|
4
|
+
export declare const Backdrop: typeof Base.Backdrop;
|
|
5
|
+
export declare namespace Backdrop {
|
|
6
|
+
type Props = Base.Backdrop.Props;
|
|
7
|
+
type State = Base.Backdrop.State;
|
|
8
|
+
}
|
|
9
|
+
export declare const Close: (props: Omit<Base.Close.Props, 'ref'> & RefAttributes<HTMLButtonElement> & VariantProps) => ReactElement;
|
|
10
|
+
export declare namespace Close {
|
|
11
|
+
type Props = Base.Close.Props & VariantProps;
|
|
12
|
+
type State = Base.Close.State;
|
|
13
|
+
}
|
|
14
|
+
export declare const Description: typeof Base.Description;
|
|
15
|
+
export declare namespace Description {
|
|
16
|
+
type Props = Base.Description.Props;
|
|
17
|
+
type State = Base.Description.State;
|
|
18
|
+
}
|
|
19
|
+
export declare const Popup: typeof Base.Popup;
|
|
20
|
+
export declare namespace Popup {
|
|
21
|
+
type Props = Base.Popup.Props;
|
|
22
|
+
type State = Base.Popup.State;
|
|
23
|
+
}
|
|
24
|
+
export declare const Portal: typeof Base.Portal;
|
|
25
|
+
export declare namespace Portal {
|
|
26
|
+
type State = Base.Portal.State;
|
|
27
|
+
type Props = Base.Portal.Props;
|
|
28
|
+
}
|
|
29
|
+
export declare const Root: typeof Base.Root;
|
|
30
|
+
export declare namespace Root {
|
|
31
|
+
type State = Base.Root.State;
|
|
32
|
+
type Props<Payload = unknown> = Base.Root.Props<Payload>;
|
|
33
|
+
type Actions = Base.Root.Actions;
|
|
34
|
+
type ChangeEventReason = Base.Root.ChangeEventReason;
|
|
35
|
+
type ChangeEventDetails = Base.Root.ChangeEventDetails;
|
|
36
|
+
}
|
|
37
|
+
export declare const Viewport: typeof Base.Viewport;
|
|
38
|
+
export declare namespace Viewport {
|
|
39
|
+
type State = Base.Viewport.State;
|
|
40
|
+
type Props = Base.Viewport.Props;
|
|
41
|
+
}
|
|
42
|
+
export declare const Title: typeof Base.Title;
|
|
43
|
+
export declare namespace Title {
|
|
44
|
+
type Props = Base.Title.Props;
|
|
45
|
+
type State = Base.Title.State;
|
|
46
|
+
}
|
|
47
|
+
export declare const Trigger: <Payload>(props: Omit<Base.Trigger.Props<Payload>, 'ref'> & RefAttributes<HTMLElement> & VariantProps) => ReactElement;
|
|
48
|
+
export declare namespace Trigger {
|
|
49
|
+
type Props<Payload = unknown> = Base.Trigger.Props<Payload> & VariantProps;
|
|
50
|
+
type State = Base.Trigger.State;
|
|
51
|
+
}
|
|
52
|
+
export declare const createHandle: typeof Base.createHandle;
|
|
53
|
+
export declare const Handle: typeof Base.Handle;
|
|
54
|
+
export type Handle<Payload> = Base.Handle<Payload>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Dialog as Base } from '@base-ui/react/dialog';
|
|
3
|
+
import { wrapPart, wrapVariantPart } from "../part.js";
|
|
4
|
+
export const Backdrop = /*#__PURE__*/ (() => Base.Backdrop)();
|
|
5
|
+
export const Close = /*#__PURE__*/ (() => wrapVariantPart(Base.Close, 'nave-base-ui-button'))();
|
|
6
|
+
export const Description = /*#__PURE__*/ (() => wrapPart(Base.Description, 'nave-base-ui-description'))();
|
|
7
|
+
export const Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, 'nave-base-ui-dialog-popup'))();
|
|
8
|
+
export const Portal = /*#__PURE__*/ (() => Base.Portal)();
|
|
9
|
+
export const Root = /*#__PURE__*/ (() => Base.Root)();
|
|
10
|
+
export const Viewport = /*#__PURE__*/ (() => Base.Viewport)();
|
|
11
|
+
export const Title = /*#__PURE__*/ (() => wrapPart(Base.Title, 'nave-base-ui-title'))();
|
|
12
|
+
export const Trigger = /*#__PURE__*/ (() => wrapVariantPart(Base.Trigger, 'nave-base-ui-button'))();
|
|
13
|
+
export const createHandle = /*#__PURE__*/ (() => Base.createHandle)();
|
|
14
|
+
export const Handle = /*#__PURE__*/ (() => Base.Handle)();
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Field as Base } from '@base-ui/react/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 Actions = Base.Root.Actions;
|
|
7
|
+
}
|
|
8
|
+
export declare const Label: typeof Base.Label;
|
|
9
|
+
export declare namespace Label {
|
|
10
|
+
type State = Base.Label.State;
|
|
11
|
+
type Props = Base.Label.Props;
|
|
12
|
+
}
|
|
13
|
+
declare const FieldError: typeof Base.Error;
|
|
14
|
+
declare namespace FieldError {
|
|
15
|
+
type State = Base.Error.State;
|
|
16
|
+
type Props = Base.Error.Props;
|
|
17
|
+
}
|
|
18
|
+
export { FieldError as Error };
|
|
19
|
+
export declare const Description: typeof Base.Description;
|
|
20
|
+
export declare namespace Description {
|
|
21
|
+
type State = Base.Description.State;
|
|
22
|
+
type Props = Base.Description.Props;
|
|
23
|
+
}
|
|
24
|
+
export declare const Control: typeof Base.Control;
|
|
25
|
+
export declare namespace Control {
|
|
26
|
+
type State = Base.Control.State;
|
|
27
|
+
type Props = Base.Control.Props;
|
|
28
|
+
type ChangeEventReason = Base.Control.ChangeEventReason;
|
|
29
|
+
type ChangeEventDetails = Base.Control.ChangeEventDetails;
|
|
30
|
+
}
|
|
31
|
+
export declare const Validity: typeof Base.Validity;
|
|
32
|
+
export declare namespace Validity {
|
|
33
|
+
type State = Base.Validity.State;
|
|
34
|
+
type Props = Base.Validity.Props;
|
|
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// Generated by scripts/generate-wrappers.ts: change the roster or the generator, not this file.
|
|
3
|
+
import { Field as Base } from '@base-ui/react/field';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const Root = /*#__PURE__*/ (() => wrapPart(Base.Root, 'nave-base-ui-field'))();
|
|
6
|
+
export const Label = /*#__PURE__*/ (() => wrapPart(Base.Label, 'nave-base-ui-label'))();
|
|
7
|
+
const FieldError = /*#__PURE__*/ (() => wrapPart(Base.Error, 'nave-base-ui-field-error'))();
|
|
8
|
+
export { FieldError as Error };
|
|
9
|
+
export const Description = /*#__PURE__*/ (() => wrapPart(Base.Description, 'nave-base-ui-field-description'))();
|
|
10
|
+
export const Control = /*#__PURE__*/ (() => wrapPart(Base.Control, 'nave-base-ui-input'))();
|
|
11
|
+
export const Validity = /*#__PURE__*/ (() => Base.Validity)();
|
|
12
|
+
export const Item = /*#__PURE__*/ (() => Base.Item)();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fieldset as Base } from '@base-ui/react/fieldset';
|
|
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
|
+
}
|
|
7
|
+
export declare const Legend: typeof Base.Legend;
|
|
8
|
+
export declare namespace Legend {
|
|
9
|
+
type State = Base.Legend.State;
|
|
10
|
+
type Props = Base.Legend.Props;
|
|
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 { Fieldset as Base } from '@base-ui/react/fieldset';
|
|
4
|
+
import { wrapPart } from "../part.js";
|
|
5
|
+
export const Root = /*#__PURE__*/ (() => wrapPart(Base.Root, 'nave-base-ui-fieldset'))();
|
|
6
|
+
export const Legend = /*#__PURE__*/ (() => wrapPart(Base.Legend, 'nave-base-ui-legend'))();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Form as Base } from '@base-ui/react/form';
|
|
2
|
+
export declare const Form: typeof Base;
|
|
3
|
+
export declare namespace Form {
|
|
4
|
+
type Props<FormValues extends Record<string, any> = Record<string, any>> = Base.Props<FormValues>;
|
|
5
|
+
type State = Base.State;
|
|
6
|
+
type Actions = Base.Actions;
|
|
7
|
+
type ValidationMode = Base.ValidationMode;
|
|
8
|
+
type SubmitEventReason = Base.SubmitEventReason;
|
|
9
|
+
type SubmitEventDetails = Base.SubmitEventDetails;
|
|
10
|
+
type Values<FormValues extends Record<string, any> = Record<string, any>> = Base.Values<FormValues>;
|
|
11
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './accordion/index.ts';
|
|
2
|
+
export * from './button/index.ts';
|
|
3
|
+
export * from './checkbox-group/index.ts';
|
|
4
|
+
export * from './checkbox/index.ts';
|
|
5
|
+
export * from './collapsible/index.ts';
|
|
6
|
+
export * from './dialog/index.ts';
|
|
7
|
+
export * from './field/index.ts';
|
|
8
|
+
export * from './fieldset/index.ts';
|
|
9
|
+
export * from './form/index.ts';
|
|
10
|
+
export * from './input/index.ts';
|
|
11
|
+
export * from './menu/index.ts';
|
|
12
|
+
export * from './number-field/index.ts';
|
|
13
|
+
export * from './popover/index.ts';
|
|
14
|
+
export * from './radio-group/index.ts';
|
|
15
|
+
export * from './radio/index.ts';
|
|
16
|
+
export * from './select/index.ts';
|
|
17
|
+
export * from './slider/index.ts';
|
|
18
|
+
export * from './switch/index.ts';
|
|
19
|
+
export * from './tabs/index.ts';
|
|
20
|
+
export * from './toggle-group/index.ts';
|
|
21
|
+
export * from './toggle/index.ts';
|
|
22
|
+
export * from './toolbar/index.ts';
|
|
23
|
+
export * from './tooltip/index.ts';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
export * from "./accordion/index.js";
|
|
3
|
+
export * from "./button/index.js";
|
|
4
|
+
export * from "./checkbox-group/index.js";
|
|
5
|
+
export * from "./checkbox/index.js";
|
|
6
|
+
export * from "./collapsible/index.js";
|
|
7
|
+
export * from "./dialog/index.js";
|
|
8
|
+
export * from "./field/index.js";
|
|
9
|
+
export * from "./fieldset/index.js";
|
|
10
|
+
export * from "./form/index.js";
|
|
11
|
+
export * from "./input/index.js";
|
|
12
|
+
export * from "./menu/index.js";
|
|
13
|
+
export * from "./number-field/index.js";
|
|
14
|
+
export * from "./popover/index.js";
|
|
15
|
+
export * from "./radio-group/index.js";
|
|
16
|
+
export * from "./radio/index.js";
|
|
17
|
+
export * from "./select/index.js";
|
|
18
|
+
export * from "./slider/index.js";
|
|
19
|
+
export * from "./switch/index.js";
|
|
20
|
+
export * from "./tabs/index.js";
|
|
21
|
+
export * from "./toggle-group/index.js";
|
|
22
|
+
export * from "./toggle/index.js";
|
|
23
|
+
export * from "./toolbar/index.js";
|
|
24
|
+
export * from "./tooltip/index.js";
|