@usememos/ui 26.10.0 → 26.10.1
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 +65 -92
- package/dist/InterVariable-Italic.woff2 +0 -0
- package/dist/InterVariable.woff2 +0 -0
- package/dist/OFL.txt +92 -0
- package/dist/index.js +3 -48
- package/dist/index.js.map +7 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.css +1 -0
- package/dist/types/components/avatar/index.d.ts +16 -0
- package/dist/types/components/badge/index.d.ts +10 -0
- package/dist/types/components/button/index.d.ts +29 -0
- package/dist/types/components/checkbox/index.d.ts +11 -0
- package/dist/types/components/collapsible/index.d.ts +15 -0
- package/dist/types/components/combobox/index.d.ts +66 -0
- package/dist/types/components/dialog/alert-dialog.d.ts +19 -0
- package/dist/types/components/dialog/index.d.ts +22 -0
- package/dist/types/components/dialog/parts.d.ts +34 -0
- package/dist/types/components/field/fieldset.d.ts +11 -0
- package/dist/types/components/field/index.d.ts +24 -0
- package/dist/types/components/input/index.d.ts +19 -0
- package/dist/types/components/kbd/index.d.ts +5 -0
- package/dist/types/components/link/index.d.ts +11 -0
- package/dist/types/components/menu/index.d.ts +67 -0
- package/dist/types/components/popover/index.d.ts +28 -0
- package/dist/types/components/prose/index.d.ts +11 -0
- package/dist/types/components/radio-group/index.d.ts +15 -0
- package/dist/types/components/select/index.d.ts +46 -0
- package/dist/types/components/separator/index.d.ts +5 -0
- package/dist/types/components/skeleton/index.d.ts +13 -0
- package/dist/types/components/spinner/index.d.ts +10 -0
- package/dist/types/components/switch/index.d.ts +11 -0
- package/dist/types/components/table/index.d.ts +42 -0
- package/dist/types/components/tabs/index.d.ts +22 -0
- package/dist/types/components/textarea/index.d.ts +9 -0
- package/dist/types/components/toast/index.d.ts +19 -0
- package/dist/types/components/toggle/index.d.ts +11 -0
- package/dist/types/components/toggle-group/index.d.ts +13 -0
- package/dist/types/components/tooltip/index.d.ts +24 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/internal/class-name.d.ts +7 -0
- package/dist/types/internal/popup.d.ts +9 -0
- package/dist/types/internal/size.d.ts +5 -0
- package/dist/types/types.d.ts +7 -0
- package/llms-full.txt +2145 -0
- package/llms.txt +53 -0
- package/package.json +34 -157
- package/dist/button.cjs +0 -74
- package/dist/button.d.cts +0 -15
- package/dist/button.d.ts +0 -15
- package/dist/button.js +0 -7
- package/dist/checkbox.cjs +0 -98
- package/dist/checkbox.d.cts +0 -16
- package/dist/checkbox.d.ts +0 -16
- package/dist/checkbox.js +0 -7
- package/dist/chunk-3DNMGJFC.js +0 -216
- package/dist/chunk-3VYNJ6UM.js +0 -27
- package/dist/chunk-3YY2G3JK.js +0 -125
- package/dist/chunk-5GQEJQKE.js +0 -60
- package/dist/chunk-6TNEFWVX.js +0 -9
- package/dist/chunk-BH4MPO4N.js +0 -25
- package/dist/chunk-F6GH4X7N.js +0 -34
- package/dist/chunk-HYN2P4OY.js +0 -84
- package/dist/chunk-OIUVLPTE.js +0 -54
- package/dist/chunk-S6LVYCE6.js +0 -157
- package/dist/chunk-SNSDJKJP.js +0 -44
- package/dist/chunk-WPO54YPG.js +0 -328
- package/dist/chunk-Z3ME5VRQ.js +0 -98
- package/dist/control-size-Bz2gyuyO.d.cts +0 -3
- package/dist/control-size-Bz2gyuyO.d.ts +0 -3
- package/dist/dialog.cjs +0 -203
- package/dist/dialog.d.cts +0 -34
- package/dist/dialog.d.ts +0 -34
- package/dist/dialog.js +0 -8
- package/dist/dropdown-menu.cjs +0 -378
- package/dist/dropdown-menu.d.cts +0 -60
- package/dist/dropdown-menu.d.ts +0 -60
- package/dist/dropdown-menu.js +0 -8
- package/dist/index.cjs +0 -1223
- package/dist/index.d.cts +0 -21
- package/dist/index.d.ts +0 -21
- package/dist/input.cjs +0 -67
- package/dist/input.d.cts +0 -11
- package/dist/input.d.ts +0 -11
- package/dist/input.js +0 -7
- package/dist/popover.cjs +0 -175
- package/dist/popover.d.cts +0 -53
- package/dist/popover.d.ts +0 -53
- package/dist/popover.js +0 -8
- package/dist/radio-group.cjs +0 -122
- package/dist/radio-group.d.cts +0 -25
- package/dist/radio-group.d.ts +0 -25
- package/dist/radio-group.js +0 -7
- package/dist/select.cjs +0 -266
- package/dist/select.d.cts +0 -45
- package/dist/select.d.ts +0 -45
- package/dist/select.js +0 -8
- package/dist/separator.cjs +0 -82
- package/dist/separator.d.cts +0 -12
- package/dist/separator.d.ts +0 -12
- package/dist/separator.js +0 -7
- package/dist/switch.cjs +0 -92
- package/dist/switch.d.cts +0 -16
- package/dist/switch.d.ts +0 -16
- package/dist/switch.js +0 -7
- package/dist/theme.css +0 -1097
- package/dist/tooltip.cjs +0 -148
- package/dist/tooltip.d.cts +0 -24
- package/dist/tooltip.d.ts +0 -24
- package/dist/tooltip.js +0 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 usememos
|
|
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,117 +1,90 @@
|
|
|
1
1
|
# @usememos/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Memos UI design system: tokens, foundation styles and React components for memos, the website, the web clipper and future usememos projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Calm, dense and tactile: pure grays, ink for emphasis, and a little depth that shows what holds a value and what you can press.
|
|
6
|
+
- Light, Dark and High contrast themes, all from CSS custom properties.
|
|
7
|
+
- One package, `@usememos/ui`. ESM only, for React 18 or later, with behavior from [Base UI](https://base-ui.com).
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
The package ships the tokens, the foundation styles and 28 components, each with a page in [docs/components](docs/components/README.md). Versions follow memos' CalVer (`26.10.0`, `26.10.1`) and do not signal breaking changes, so pin an exact version. [docs/](docs/README.md) is the design system and the source of truth for the package.
|
|
10
|
+
|
|
11
|
+
## Use it
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install @usememos/ui
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
Load the tokens first, then the styles:
|
|
12
18
|
|
|
13
|
-
```
|
|
14
|
-
import
|
|
19
|
+
```ts
|
|
20
|
+
import '@usememos/ui/tokens.css';
|
|
21
|
+
import '@usememos/ui/styles.css';
|
|
15
22
|
```
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
- `tokens.css` defines every token as a CSS custom property on `:root`, on a shadow root's `:host`, and on any `.mu-root` element.
|
|
25
|
+
- `styles.css` holds the foundation classes (`mu-s-md`, `mu-raised`, `mu-recessed`, `mu-key`, `mu-popup`, `mu-icon`, the `mu-` type scale) and the component styles.
|
|
26
|
+
|
|
27
|
+
Use tokens through their variables (`var(--ink)`, `var(--space-4)`), never as copied values.
|
|
28
|
+
|
|
29
|
+
Then build screens from the components. `lucide-react` is a peer dependency: icons are passed to components as elements.
|
|
18
30
|
|
|
19
31
|
```tsx
|
|
20
|
-
import { Button,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</Dialog.Content>
|
|
32
|
-
</Dialog.Root>;
|
|
33
|
-
|
|
34
|
-
<Select.Root defaultValue="react">
|
|
35
|
-
<Select.Trigger aria-label="Framework">
|
|
36
|
-
<Select.Value placeholder="Pick one" />
|
|
37
|
-
</Select.Trigger>
|
|
38
|
-
<Select.Content>
|
|
39
|
-
<Select.Item value="react">React</Select.Item>
|
|
40
|
-
<Select.Item value="vue">Vue</Select.Item>
|
|
41
|
-
</Select.Content>
|
|
42
|
-
</Select.Root>;
|
|
43
|
-
```
|
|
32
|
+
import { Button, Menu, Toast } from '@usememos/ui';
|
|
33
|
+
import { Ellipsis, Pin, Plus, Trash2 } from 'lucide-react';
|
|
34
|
+
|
|
35
|
+
export function App() {
|
|
36
|
+
return (
|
|
37
|
+
<Toast.Provider>
|
|
38
|
+
<NewNote />
|
|
39
|
+
<Toast.Viewport />
|
|
40
|
+
</Toast.Provider>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```css
|
|
66
|
-
:root {
|
|
67
|
-
--mui-color-background: oklch(0.985 0.0015 260);
|
|
68
|
-
--mui-color-foreground: oklch(0.205 0.004 260);
|
|
69
|
-
--mui-color-card: oklch(1 0 0);
|
|
70
|
-
--mui-color-popover: oklch(1 0 0);
|
|
71
|
-
--mui-color-primary: oklch(0.245 0.006 260);
|
|
72
|
-
--mui-color-primary-foreground: oklch(0.99 0 0);
|
|
73
|
-
--mui-color-secondary: oklch(0.952 0.002 260);
|
|
74
|
-
--mui-color-border: oklch(0.895 0.003 260);
|
|
75
|
-
--mui-color-input: oklch(0.84 0.003 260);
|
|
76
|
-
--mui-color-ring: oklch(0.52 0.085 155);
|
|
44
|
+
function NewNote() {
|
|
45
|
+
const toasts = Toast.useToastManager();
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<Button variant="primary" icon={<Plus />} onClick={() => toasts.add({ title: 'Note created' })}>
|
|
49
|
+
New note
|
|
50
|
+
</Button>
|
|
51
|
+
<Menu.Root>
|
|
52
|
+
<Menu.Trigger render={<Button variant="ghost" icon={<Ellipsis />} aria-label="More actions" />} />
|
|
53
|
+
<Menu.Popup align="end">
|
|
54
|
+
<Menu.Item icon={<Pin />}>Pin</Menu.Item>
|
|
55
|
+
<Menu.Separator />
|
|
56
|
+
<Menu.Item icon={<Trash2 />} danger>
|
|
57
|
+
Delete
|
|
58
|
+
</Menu.Item>
|
|
59
|
+
</Menu.Popup>
|
|
60
|
+
</Menu.Root>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
77
63
|
}
|
|
78
64
|
```
|
|
79
65
|
|
|
80
|
-
|
|
66
|
+
Components with more than one element are namespaces of parts named after Base UI's (`Menu.Root`, `Menu.Trigger`, `Menu.Popup`). Each part takes Base UI's props, plus the few listed on its docs page.
|
|
81
67
|
|
|
82
|
-
|
|
83
|
-
<html class="dark">
|
|
84
|
-
<!-- app -->
|
|
85
|
-
</html>
|
|
86
|
-
```
|
|
68
|
+
### For coding agents
|
|
87
69
|
|
|
88
|
-
|
|
70
|
+
The package ships `llms.txt`, an index of the docs, and `llms-full.txt`, every docs page in one file. Point an agent at `node_modules/@usememos/ui/llms-full.txt` before it builds a screen.
|
|
89
71
|
|
|
90
|
-
|
|
91
|
-
<div data-mui-theme="dark">{/* app */}</div>
|
|
92
|
-
```
|
|
72
|
+
### Themes
|
|
93
73
|
|
|
94
|
-
|
|
74
|
+
Set `data-theme="light"`, `"dark"` or `"contrast"` on the root element, or on any element to theme its subtree. Without the attribute the tokens are Light. The package does not read `prefers-color-scheme`; the app does, so a saved preference can win over the system setting.
|
|
95
75
|
|
|
96
|
-
|
|
97
|
-
<Button className="my-custom-styles">Custom Button</Button>
|
|
98
|
-
```
|
|
76
|
+
### Inside another page
|
|
99
77
|
|
|
100
|
-
|
|
78
|
+
In a browser extension or an embed, mount the UI under a `.mu-root` element or inside a shadow root. The package has no global selectors beyond `:root`, `:host` and `.mu-root`.
|
|
101
79
|
|
|
102
|
-
|
|
103
|
-
pnpm docs
|
|
104
|
-
pnpm test
|
|
105
|
-
pnpm test:browser
|
|
106
|
-
pnpm build
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
The browser test project uses Vitest Browser Mode with Playwright. On a new machine, install Chromium once:
|
|
80
|
+
## Develop
|
|
110
81
|
|
|
111
|
-
```
|
|
112
|
-
|
|
82
|
+
```sh
|
|
83
|
+
npm install
|
|
84
|
+
npm test # unit tests (vitest), including tokens.css against the docs
|
|
85
|
+
npm run test:e2e # browser tests (Playwright)
|
|
86
|
+
npm run typecheck
|
|
87
|
+
npm run build # the published files, in packages/ui/dist
|
|
113
88
|
```
|
|
114
89
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
MIT © [usememos](https://github.com/usememos)
|
|
90
|
+
See [AGENTS.md](AGENTS.md) for the rules, the workflow and releasing.
|
|
Binary file
|
|
Binary file
|
package/dist/OFL.txt
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Copyright (c) 2016-2018 The Inter Project Authors (me@rsms.me)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
-----------------------------------------------------------
|
|
8
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
9
|
+
-----------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
PREAMBLE
|
|
12
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
13
|
+
development of collaborative font projects, to support the font creation
|
|
14
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
15
|
+
open framework in which fonts may be shared and improved in partnership
|
|
16
|
+
with others.
|
|
17
|
+
|
|
18
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
19
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
20
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
21
|
+
redistributed and/or sold with any software provided that any reserved
|
|
22
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
23
|
+
however, cannot be released under any other type of license. The
|
|
24
|
+
requirement for fonts to remain under this license does not apply
|
|
25
|
+
to any document created using the fonts or their derivatives.
|
|
26
|
+
|
|
27
|
+
DEFINITIONS
|
|
28
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
29
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
30
|
+
include source files, build scripts and documentation.
|
|
31
|
+
|
|
32
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
33
|
+
copyright statement(s).
|
|
34
|
+
|
|
35
|
+
"Original Version" refers to the collection of Font Software components as
|
|
36
|
+
distributed by the Copyright Holder(s).
|
|
37
|
+
|
|
38
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
39
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
40
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
41
|
+
new environment.
|
|
42
|
+
|
|
43
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
44
|
+
writer or other person who contributed to the Font Software.
|
|
45
|
+
|
|
46
|
+
PERMISSION AND CONDITIONS
|
|
47
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
48
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
49
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
50
|
+
Software, subject to the following conditions:
|
|
51
|
+
|
|
52
|
+
1) Neither the Font Software nor any of its individual components,
|
|
53
|
+
in Original or Modified Versions, may be sold by itself.
|
|
54
|
+
|
|
55
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
56
|
+
redistributed and/or sold with any software, provided that each copy
|
|
57
|
+
contains the above copyright notice and this license. These can be
|
|
58
|
+
included either as stand-alone text files, human-readable headers or
|
|
59
|
+
in the appropriate machine-readable metadata fields within text or
|
|
60
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
61
|
+
|
|
62
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
63
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
64
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
65
|
+
presented to the users.
|
|
66
|
+
|
|
67
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
68
|
+
Software shall not be used to promote, endorse or advertise any
|
|
69
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
70
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
71
|
+
permission.
|
|
72
|
+
|
|
73
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
74
|
+
must be distributed entirely under this license, and must not be
|
|
75
|
+
distributed under any other license. The requirement for fonts to
|
|
76
|
+
remain under this license does not apply to any document created
|
|
77
|
+
using the Font Software.
|
|
78
|
+
|
|
79
|
+
TERMINATION
|
|
80
|
+
This license becomes null and void if any of the above conditions are
|
|
81
|
+
not met.
|
|
82
|
+
|
|
83
|
+
DISCLAIMER
|
|
84
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
85
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
86
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
87
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
88
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
89
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
90
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
91
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
92
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -1,48 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
Select
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
Separator
|
|
6
|
-
} from "./chunk-SNSDJKJP.js";
|
|
7
|
-
import {
|
|
8
|
-
Switch
|
|
9
|
-
} from "./chunk-OIUVLPTE.js";
|
|
10
|
-
import {
|
|
11
|
-
Tooltip
|
|
12
|
-
} from "./chunk-Z3ME5VRQ.js";
|
|
13
|
-
import {
|
|
14
|
-
Button
|
|
15
|
-
} from "./chunk-F6GH4X7N.js";
|
|
16
|
-
import {
|
|
17
|
-
Checkbox
|
|
18
|
-
} from "./chunk-5GQEJQKE.js";
|
|
19
|
-
import {
|
|
20
|
-
Input
|
|
21
|
-
} from "./chunk-3VYNJ6UM.js";
|
|
22
|
-
import {
|
|
23
|
-
Dialog
|
|
24
|
-
} from "./chunk-S6LVYCE6.js";
|
|
25
|
-
import {
|
|
26
|
-
DropdownMenu
|
|
27
|
-
} from "./chunk-WPO54YPG.js";
|
|
28
|
-
import {
|
|
29
|
-
Popover
|
|
30
|
-
} from "./chunk-3YY2G3JK.js";
|
|
31
|
-
import "./chunk-BH4MPO4N.js";
|
|
32
|
-
import {
|
|
33
|
-
RadioGroup
|
|
34
|
-
} from "./chunk-HYN2P4OY.js";
|
|
35
|
-
import "./chunk-6TNEFWVX.js";
|
|
36
|
-
export {
|
|
37
|
-
Button,
|
|
38
|
-
Checkbox,
|
|
39
|
-
Dialog,
|
|
40
|
-
DropdownMenu,
|
|
41
|
-
Input,
|
|
42
|
-
Popover,
|
|
43
|
-
RadioGroup,
|
|
44
|
-
Select,
|
|
45
|
-
Separator,
|
|
46
|
-
Switch,
|
|
47
|
-
Tooltip
|
|
48
|
-
};
|
|
1
|
+
'use client';
|
|
2
|
+
var We=Object.defineProperty;var S=(r,o)=>{for(var e in o)We(r,e,{get:o[e],enumerable:!0})};var ce={};S(ce,{Close:()=>to,Description:()=>oo,Footer:()=>ro,Popup:()=>je,Root:()=>Ye,Title:()=>eo,Trigger:()=>Ze});import{AlertDialog as Qe}from"@base-ui/react/alert-dialog";import{X as Je}from"lucide-react";import{forwardRef as A}from"react";function l(...r){return r.filter(Boolean).join(" ")}function a(r,o){return typeof o=="function"?e=>l(r,o(e)):l(r,o)}import{Button as Xe}from"@base-ui/react/button";import{forwardRef as qe}from"react";import{createContext as Ke,useContext as Ue}from"react";var c=Ke(void 0);function p(r){let o=Ue(c);return r??o??"md"}import{jsx as le,jsxs as _e}from"react/jsx-runtime";function z({variant:r="neutral",size:o="md",iconOnly:e=!1}={}){return l("mu-button",`mu-button-${r}`,e&&"mu-button-icon","mu-base",`mu-s-${o}`,"mu-focus","mu-hit")}var O=qe(function({variant:o="neutral",size:e,icon:t,loading:s=!1,loadingLabel:n,disabled:i,focusableWhenDisabled:m,className:P,children:g,...x},B){let v=p(e),_=t!==void 0&&(g==null||g===!1);return _e(Xe,{ref:B,...x,...s&&n?{"aria-label":n}:null,disabled:i||s,focusableWhenDisabled:s||m,"aria-busy":s||void 0,"data-loading":s?"":void 0,className:a(z({variant:o,size:v,iconOnly:_}),P),children:[t,_?null:le("span",{className:"mu-button-label",children:g}),s?le("span",{className:"mu-spinner","aria-hidden":!0}):null]})});import{jsx as h,jsxs as ue}from"react/jsx-runtime";function J(r,o,e){let t=A(function({className:x,...B},v){return h(r.Trigger,{ref:v,...B,className:a(`mu-${o}-trigger`,x)})}),s=A(function({container:x,sheet:B=!0,closeLabel:v="Close",className:_,children:$e,...Oe},Ve){return ue(r.Portal,{container:x,children:[h(r.Backdrop,{className:"mu-dialog-backdrop"}),h(r.Viewport,{className:l("mu-dialog-viewport",B&&"mu-dialog-sheet"),children:ue(r.Popup,{ref:Ve,...Oe,className:a(`mu-dialog-popup mu-${o}-popup mu-popup mu-base mu-s-md`,_),children:[$e,e?h(r.Close,{className:"mu-dialog-x",render:h(O,{variant:"ghost",size:"sm",icon:h(Je,{}),"aria-label":v})}):null]})})]})}),n=A(function({className:x,...B},v){return h(r.Title,{ref:v,...B,className:a("mu-dialog-title mu-title",x)})}),i=A(function({className:x,...B},v){return h(r.Description,{ref:v,...B,className:a("mu-dialog-description mu-body",x)})}),m=A(function({className:x,...B},v){return h(r.Close,{ref:v,...B,className:a(`mu-${o}-close`,x)})}),P=A(function({className:x,...B},v){return h("div",{ref:v,...B,className:l("mu-dialog-footer",x)})});return{Root:r.Root,Trigger:t,Popup:s,Title:n,Description:i,Close:m,Footer:P}}var I=J(Qe,"alert-dialog",!1),Ye=I.Root,Ze=I.Trigger,je=I.Popup,eo=I.Title,oo=I.Description,to=I.Close,ro=I.Footer;var fe={};S(fe,{Fallback:()=>ao,Image:()=>no,Root:()=>so});import{Avatar as te}from"@base-ui/react/avatar";import{forwardRef as re}from"react";import{jsx as se}from"react/jsx-runtime";var so=re(function({size:o,className:e,...t},s){let n=p(o);return se(te.Root,{ref:s,...t,className:a(`mu-avatar-root mu-base mu-s-${n}`,e)})}),no=re(function({className:o,...e},t){return se(te.Image,{ref:t,...e,className:a("mu-avatar-image",o)})}),ao=re(function({className:o,...e},t){return se(te.Fallback,{ref:t,...e,className:a("mu-avatar-fallback",o)})});import{mergeProps as io}from"@base-ui/react/merge-props";import{useRender as po}from"@base-ui/react/use-render";import{forwardRef as mo}from"react";import{Fragment as uo,jsxs as co}from"react/jsx-runtime";var lo=mo(function({tone:o="neutral",icon:e,render:t,children:s,...n},i){return po({defaultTagName:"span",render:t,ref:i,props:io({className:`mu-badge mu-badge-${o} mu-base mu-s-sm`,children:co(uo,{children:[e,s]})},n)})});import{Checkbox as de}from"@base-ui/react/checkbox";import{Check as fo,Minus as Po}from"lucide-react";import{forwardRef as xo}from"react";import{jsx as V}from"react/jsx-runtime";var go=xo(function({size:o,className:e,...t},s){let n=p(o);return V(de.Root,{ref:s,...t,className:a(`mu-checkbox mu-s-${n} mu-focus mu-hit`,e),children:V(de.Indicator,{className:"mu-checkbox-indicator",render:(i,m)=>V("span",{...i,children:m.indeterminate?V(Po,{"aria-hidden":!0}):V(fo,{"aria-hidden":!0})})})})});var Pe={};S(Pe,{Panel:()=>So,Root:()=>To,Trigger:()=>Ro});import{Collapsible as ne}from"@base-ui/react/collapsible";import{ChevronDown as bo}from"lucide-react";import{forwardRef as ae}from"react";import{jsx as W,jsxs as Bo}from"react/jsx-runtime";var To=ae(function({size:o,className:e,...t},s){let n=p(o);return W(c.Provider,{value:n,children:W(ne.Root,{ref:s,...t,className:a("mu-collapsible",e)})})}),Ro=ae(function({className:o,children:e,...t},s){let n=p();return Bo(ne.Trigger,{ref:s,...t,className:a(`mu-collapsible-trigger ${z({variant:"ghost",size:n})}`,o),children:[W("span",{className:"mu-button-label",children:e}),W(bo,{className:"mu-collapsible-chevron","aria-hidden":!0})]})}),So=ae(function({className:o,...e},t){return W(ne.Panel,{ref:t,...e,className:a("mu-collapsible-panel",o)})});var xe={};S(xe,{Collection:()=>No,Empty:()=>Do,Group:()=>Ho,GroupLabel:()=>ko,Input:()=>zo,Item:()=>Io,List:()=>wo,Popup:()=>Eo,Root:()=>Mo,Separator:()=>Go,useFilter:()=>Lo});import{Combobox as b}from"@base-ui/react/combobox";import{Check as Co,ChevronsUpDown as yo,Search as ho}from"lucide-react";import{forwardRef as E}from"react";var vo=["side","align","sideOffset","alignOffset","collisionPadding","collisionAvoidance","collisionBoundary","sticky","anchor","positionMethod","arrowPadding","disableAnchorTracking","alignItemWithTrigger"];function N(r){let o={},e={};for(let[t,s]of Object.entries(r))vo.includes(t)?s!==void 0&&(o[t]=s):e[t]=s;return[o,e]}import{jsx as d,jsxs as ge}from"react/jsx-runtime";var No=b.Collection,Lo=b.useFilter;function Mo({size:r,...o}){let e=p(r);return d(c.Provider,{value:e,children:d(b.Root,{...o})})}var zo=E(function({icon:o=d(ho,{}),triggerLabel:e="Show options",className:t,style:s,...n},i){let m=p();return ge(b.InputGroup,{className:l("mu-input-root mu-combobox-input-root mu-base",`mu-s-${m}`,t),style:s,children:[o!==null?d("span",{className:"mu-input-prefix",children:o}):null,d(b.Input,{ref:i,...n,className:"mu-input"}),d("span",{className:"mu-input-suffix",children:d(b.Trigger,{className:"mu-combobox-trigger mu-focus","aria-label":e,children:d(yo,{"aria-hidden":!0})})})]})}),Eo=E(function({container:o,className:e,...t},s){let n=p(),[i,m]=N(t);return d(b.Portal,{container:o,children:d(b.Positioner,{sideOffset:4,align:"start",...i,className:"mu-positioner",children:d(b.Popup,{ref:s,...m,className:a(`mu-combobox-popup mu-popup mu-popup-motion mu-base mu-s-${n}`,e)})})})}),wo=E(function({className:o,...e},t){return d(b.List,{ref:t,...e,className:a("mu-combobox-list",o)})}),Io=E(function({icon:o,className:e,children:t,...s},n){return ge(b.Item,{ref:n,...s,className:a("mu-combobox-item",e),children:[o,d("span",{className:"mu-combobox-item-text",children:t}),d("span",{className:"mu-combobox-indicator",children:d(b.ItemIndicator,{render:d(Co,{"aria-hidden":!0}),children:null})})]})}),Do=E(function({className:o,...e},t){return d(b.Empty,{ref:t,...e,className:a("mu-combobox-empty mu-body",o)})}),Ho=E(function({className:o,...e},t){return d(b.Group,{ref:t,...e,className:a("mu-combobox-group",o)})}),ko=E(function({className:o,...e},t){return d(b.GroupLabel,{ref:t,...e,className:a("mu-combobox-group-label mu-label-xs",o)})}),Go=E(function({className:o,...e},t){return d(b.Separator,{ref:t,...e,className:a("mu-combobox-separator",o)})});var be={};S(be,{Close:()=>Ko,Description:()=>Wo,Footer:()=>Uo,Popup:()=>Oo,Root:()=>Ao,Title:()=>Vo,Trigger:()=>$o});import{Dialog as Fo}from"@base-ui/react/dialog";var D=J(Fo,"dialog",!0),Ao=D.Root,$o=D.Trigger,Oo=D.Popup,Vo=D.Title,Wo=D.Description,Ko=D.Close,Uo=D.Footer;var Te={};S(Te,{Description:()=>Qo,Error:()=>Yo,Item:()=>Jo,Label:()=>_o,Root:()=>qo});import{Field as K}from"@base-ui/react/field";import{CircleAlert as Xo}from"lucide-react";import{forwardRef as U}from"react";import{jsx as H,jsxs as Zo}from"react/jsx-runtime";var qo=U(function({size:o,className:e,...t},s){let n=p(o);return H(c.Provider,{value:n,children:H(K.Root,{ref:s,...t,className:a("mu-field-root",e)})})}),_o=U(function({className:o,...e},t){return H(K.Label,{ref:t,...e,className:a("mu-field-label mu-label",o)})}),Jo=U(function({className:o,...e},t){return H(K.Item,{ref:t,...e,className:a("mu-field-item",o)})}),Qo=U(function({className:o,...e},t){return H(K.Description,{ref:t,...e,className:a("mu-field-description mu-caption",o)})}),Yo=U(function({className:o,children:e,...t},s){return Zo(K.Error,{ref:s,...t,className:a("mu-field-error mu-caption",o),children:[H(Xo,{className:"mu-icon","aria-hidden":!0}),H("span",{children:e})]})});var Be={};S(Be,{Legend:()=>et,Root:()=>jo});import{Fieldset as Re}from"@base-ui/react/fieldset";import{forwardRef as Se}from"react";import{jsx as ie}from"react/jsx-runtime";var jo=Se(function({size:o,className:e,...t},s){let n=p(o);return ie(c.Provider,{value:n,children:ie(Re.Root,{ref:s,...t,className:a("mu-fieldset-root",e)})})}),et=Se(function({className:o,...e},t){return ie(Re.Legend,{ref:t,...e,className:a("mu-fieldset-legend mu-label",o)})});import{Input as ot}from"@base-ui/react/input";import{forwardRef as tt}from"react";import{jsx as pe,jsxs as st}from"react/jsx-runtime";var rt=tt(function({size:o,prefix:e,suffix:t,className:s,style:n,...i},m){let P=p(o);return st("span",{className:l("mu-input-root mu-base",`mu-s-${P}`,s),style:n,children:[e!==void 0?pe("span",{className:"mu-input-prefix",children:e}):null,pe(ot,{ref:m,...i,className:"mu-input"}),t!==void 0?pe("span",{className:"mu-input-suffix",children:t}):null]})});import{mergeProps as nt}from"@base-ui/react/merge-props";import{useRender as at}from"@base-ui/react/use-render";import{forwardRef as it}from"react";var pt=it(function({render:o,...e},t){return at({defaultTagName:"kbd",render:o,ref:t,props:nt({className:"mu-kbd mu-label-xs"},e)})});import{mergeProps as mt}from"@base-ui/react/merge-props";import{useRender as lt}from"@base-ui/react/use-render";import{ArrowUpRight as ut}from"lucide-react";import{forwardRef as ct}from"react";import{Fragment as Pt,jsx as dt,jsxs as xt}from"react/jsx-runtime";var ft=ct(function({muted:o=!1,external:e=!1,underline:t="hover",render:s,children:n,...i},m){return lt({defaultTagName:"a",render:s,ref:m,props:mt({className:`mu-link${o?" mu-link-muted":""}${t==="always"?" mu-link-underline":""} mu-focus`,...e?{target:"_blank",rel:"noopener noreferrer"}:null,children:xt(Pt,{children:[n,e?dt(ut,{className:"mu-icon","aria-hidden":!0}):null]})},i)})});var Ce={};S(Ce,{CheckboxItem:()=>Bt,Group:()=>yt,GroupLabel:()=>ht,Item:()=>St,Popup:()=>Rt,RadioGroup:()=>vt,RadioItem:()=>Ct,Root:()=>bt,Separator:()=>Nt,SubmenuRoot:()=>Lt,SubmenuTrigger:()=>Mt,Trigger:()=>Tt});import{Menu as T}from"@base-ui/react/menu";import{Check as ve,ChevronRight as gt}from"lucide-react";import{forwardRef as L}from"react";import{Fragment as zt,jsx as u,jsxs as Y}from"react/jsx-runtime";function bt({size:r,...o}){let e=p(r);return u(c.Provider,{value:e,children:u(T.Root,{...o})})}var Tt=L(function({className:o,...e},t){return u(T.Trigger,{ref:t,...e,className:a("mu-menu-trigger",o)})}),Rt=L(function({container:o,className:e,...t},s){let n=p(),[i,m]=N(t);return u(T.Portal,{container:o,children:u(T.Positioner,{sideOffset:4,...i,className:"mu-positioner",children:u(T.Popup,{ref:s,...m,className:a(`mu-menu-popup mu-popup mu-popup-motion mu-base mu-s-${n}`,e)})})})});function Q({icon:r,shortcut:o,children:e}){return Y(zt,{children:[r,u("span",{className:"mu-menu-label",children:e}),o!==void 0?u("span",{className:"mu-menu-shortcut",children:o}):null]})}var St=L(function({icon:o,shortcut:e,danger:t=!1,className:s,children:n,...i},m){return u(T.Item,{ref:m,...i,className:a(`mu-menu-item${t?" mu-menu-item-danger":""}`,s),children:u(Q,{icon:o,shortcut:e,children:n})})}),Bt=L(function({icon:o,shortcut:e,className:t,children:s,...n},i){return Y(T.CheckboxItem,{ref:i,...n,className:a("mu-menu-item mu-menu-checkbox-item",t),children:[u(Q,{icon:o,shortcut:e,children:s}),u("span",{className:"mu-menu-indicator",children:u(T.CheckboxItemIndicator,{render:u(ve,{"aria-hidden":!0})})})]})}),vt=L(function({className:o,...e},t){return u(T.RadioGroup,{ref:t,...e,className:a("mu-menu-radio-group",o)})}),Ct=L(function({icon:o,shortcut:e,className:t,children:s,...n},i){return Y(T.RadioItem,{ref:i,...n,className:a("mu-menu-item mu-menu-radio-item",t),children:[u(Q,{icon:o,shortcut:e,children:s}),u("span",{className:"mu-menu-indicator",children:u(T.RadioItemIndicator,{render:u(ve,{"aria-hidden":!0})})})]})}),yt=L(function({className:o,...e},t){return u(T.Group,{ref:t,...e,className:a("mu-menu-group",o)})}),ht=L(function({className:o,...e},t){return u(T.GroupLabel,{ref:t,...e,className:a("mu-menu-group-label mu-label-xs",o)})}),Nt=L(function({className:o,...e},t){return u(T.Separator,{ref:t,...e,className:a("mu-menu-separator",o)})}),Lt=T.SubmenuRoot,Mt=L(function({icon:o,className:e,children:t,...s},n){return Y(T.SubmenuTrigger,{ref:n,...s,className:a("mu-menu-item mu-menu-submenu-trigger",e),children:[u(Q,{icon:o,children:t}),u(gt,{className:"mu-menu-chevron","aria-hidden":!0})]})});var ye={};S(ye,{Close:()=>kt,Description:()=>Ht,Popup:()=>It,Root:()=>Et,Title:()=>Dt,Trigger:()=>wt});import{Popover as w}from"@base-ui/react/popover";import{forwardRef as X}from"react";import{jsx as k}from"react/jsx-runtime";var Et=w.Root,wt=X(function({className:o,...e},t){return k(w.Trigger,{ref:t,...e,className:a("mu-popover-trigger",o)})}),It=X(function({container:o,className:e,...t},s){let[n,i]=N(t);return k(w.Portal,{container:o,children:k(w.Positioner,{sideOffset:6,...n,className:"mu-positioner",children:k(w.Popup,{ref:s,...i,className:a("mu-popover-popup mu-popup mu-popup-motion mu-base mu-s-md",e)})})})}),Dt=X(function({className:o,...e},t){return k(w.Title,{ref:t,...e,className:a("mu-popover-title mu-label",o)})}),Ht=X(function({className:o,...e},t){return k(w.Description,{ref:t,...e,className:a("mu-popover-description mu-body-sm",o)})}),kt=X(function({className:o,...e},t){return k(w.Close,{ref:t,...e,className:a("mu-popover-close",o)})});import{forwardRef as Gt}from"react";import{jsx as At}from"react/jsx-runtime";var Ft=Gt(function({size:o="md",className:e,...t},s){return At("div",{ref:s,...t,className:l("mu-prose",o==="sm"&&"mu-prose-sm",e)})});import{Radio as he}from"@base-ui/react/radio";import{RadioGroup as $t}from"@base-ui/react/radio-group";import{forwardRef as Ne}from"react";import{jsx as Z}from"react/jsx-runtime";var Ot=Ne(function({size:o,orientation:e="vertical",className:t,...s},n){let i=p(o);return Z(c.Provider,{value:i,children:Z($t,{ref:n,"aria-orientation":e,...s,"data-orientation":e,className:a(`mu-radio-group mu-s-${i}`,t)})})}),Vt=Ne(function({size:o,className:e,...t},s){let n=p(o);return Z(he.Root,{ref:s,...t,className:a(`mu-radio mu-s-${n} mu-focus mu-hit`,e),children:Z(he.Indicator,{className:"mu-radio-indicator"})})});var Le={};S(Le,{Group:()=>Zt,GroupLabel:()=>jt,Item:()=>Yt,Popup:()=>Qt,Root:()=>qt,Separator:()=>er,Trigger:()=>_t,Value:()=>Jt});import{Select as R}from"@base-ui/react/select";import{Check as Wt,ChevronDown as Kt,ChevronsUpDown as Ut,ChevronUp as Xt}from"lucide-react";import{forwardRef as G}from"react";import{jsx as f,jsxs as me}from"react/jsx-runtime";function qt({size:r,...o}){let e=p(r);return f(c.Provider,{value:e,children:f(R.Root,{...o})})}var _t=G(function({className:o,children:e,...t},s){let n=p();return me(R.Trigger,{ref:s,...t,className:a(`mu-select-trigger ${z({variant:"neutral",size:n})}`,o),children:[e,f(R.Icon,{className:"mu-select-icon",children:f(Ut,{"aria-hidden":!0})})]})}),Jt=G(function({className:o,...e},t){return f(R.Value,{ref:t,...e,className:a("mu-select-value",o)})}),Qt=G(function({container:o,className:e,children:t,...s},n){let i=p(),[m,P]=N(s);return f(R.Portal,{container:o,children:f(R.Positioner,{sideOffset:4,...m,className:"mu-positioner mu-select-positioner",children:me(R.Popup,{ref:n,...P,className:a(`mu-select-popup mu-popup mu-popup-motion mu-base mu-s-${i}`,e),children:[f(R.ScrollUpArrow,{className:"mu-select-scroll-arrow",render:g=>f("div",{...g,children:f(Xt,{"aria-hidden":!0})})}),f(R.List,{className:"mu-select-list",children:t}),f(R.ScrollDownArrow,{className:"mu-select-scroll-arrow",render:g=>f("div",{...g,children:f(Kt,{"aria-hidden":!0})})})]})})})}),Yt=G(function({icon:o,className:e,children:t,...s},n){return me(R.Item,{ref:n,...s,className:a("mu-select-item",e),children:[o,f(R.ItemText,{className:"mu-select-item-text",children:t}),f("span",{className:"mu-select-indicator",children:f(R.ItemIndicator,{render:f(Wt,{"aria-hidden":!0}),children:null})})]})}),Zt=G(function({className:o,...e},t){return f(R.Group,{ref:t,...e,className:a("mu-select-group",o)})}),jt=G(function({className:o,...e},t){return f(R.GroupLabel,{ref:t,...e,className:a("mu-select-group-label mu-label-xs",o)})}),er=G(function({className:o,...e},t){return f(R.Separator,{ref:t,...e,className:a("mu-select-separator",o)})});import{Separator as or}from"@base-ui/react/separator";import{forwardRef as tr}from"react";import{jsx as sr}from"react/jsx-runtime";var rr=tr(function({className:o,...e},t){return sr(or,{ref:t,...e,className:a("mu-separator",o)})});import{mergeProps as nr}from"@base-ui/react/merge-props";import{useRender as ar}from"@base-ui/react/use-render";import{forwardRef as ir}from"react";var pr=ir(function({width:o,height:e,round:t=!1,size:s,render:n,...i},m){let P=p(s);return ar({defaultTagName:"div",render:n,ref:m,props:nr({className:`mu-skeleton${t?" mu-skeleton-round":""} mu-s-${P}`,"aria-hidden":!0,style:{width:o??(t?e:void 0),height:e}},i)})});import{mergeProps as mr}from"@base-ui/react/merge-props";import{useRender as lr}from"@base-ui/react/use-render";import{forwardRef as ur}from"react";var cr=ur(function({size:o,label:e="Loading",render:t,...s},n){let i=p(o);return lr({defaultTagName:"span",render:t,ref:n,props:mr({className:`mu-spinner mu-s-${i}`,role:"status","aria-label":e},s)})});import{Switch as Me}from"@base-ui/react/switch";import{forwardRef as fr}from"react";import{jsx as ze}from"react/jsx-runtime";var dr=fr(function({size:o,className:e,...t},s){let n=p(o);return ze(Me.Root,{ref:s,...t,className:a(`mu-switch mu-s-${n} mu-focus mu-hit`,e),children:ze(Me.Thumb,{className:"mu-switch-thumb"})})});var Ee={};S(Ee,{Body:()=>br,Caption:()=>Br,Cell:()=>Sr,Head:()=>Rr,Header:()=>gr,Root:()=>xr,Row:()=>Tr});import{forwardRef as F}from"react";import{jsx as M}from"react/jsx-runtime";var Pr={sm:"mu-body-sm",md:"mu-body",lg:"mu-body-lg"},xr=F(function({size:o,className:e,...t},s){let n=p(o);return M(c.Provider,{value:n,children:M("div",{className:"mu-table-scroll",children:M("table",{ref:s,...t,className:l("mu-table mu-base",`mu-s-${n}`,Pr[n],e)})})})}),gr=F(function({className:o,...e},t){return M("thead",{ref:t,...e,className:l("mu-table-header",o)})}),br=F(function({className:o,...e},t){return M("tbody",{ref:t,...e,className:l("mu-table-body",o)})}),Tr=F(function({className:o,...e},t){return M("tr",{ref:t,...e,className:l("mu-table-row",o)})}),Rr=F(function({num:o=!1,scope:e="col",className:t,...s},n){return M("th",{ref:n,scope:e,...s,className:l("mu-table-head mu-label-sm",o&&"mu-table-num",t)})}),Sr=F(function({num:o=!1,muted:e=!1,className:t,...s},n){return M("td",{ref:n,...s,className:l("mu-table-cell",o&&"mu-table-num",e&&"mu-table-muted",t)})}),Br=F(function({className:o,...e},t){return M("caption",{ref:t,...e,className:l("mu-table-caption mu-caption",o)})});var we={};S(we,{List:()=>Cr,Panel:()=>hr,Root:()=>vr,Tab:()=>yr});import{Tabs as q}from"@base-ui/react/tabs";import{forwardRef as ee}from"react";import{jsx as j,jsxs as Ie}from"react/jsx-runtime";var vr=ee(function({size:o,className:e,...t},s){let n=p(o);return j(c.Provider,{value:n,children:j(q.Root,{ref:s,...t,className:a("mu-tabs-root",e)})})}),Cr=ee(function({className:o,children:e,...t},s){let n=p();return Ie(q.List,{ref:s,...t,className:a(`mu-tabs-list mu-segmented mu-base mu-s-${n}`,o),children:[j(q.Indicator,{className:"mu-tabs-indicator mu-segmented-key"}),e]})}),yr=ee(function({icon:o,className:e,children:t,...s},n){return Ie(q.Tab,{ref:n,...s,className:a("mu-tabs-tab mu-segmented-item mu-focus",e),children:[o,t]})}),hr=ee(function({className:o,...e},t){return j(q.Panel,{ref:t,...e,className:a("mu-tabs-panel mu-focus",o)})});import{Field as Nr}from"@base-ui/react/field";import{forwardRef as Lr}from"react";import{jsx as De}from"react/jsx-runtime";var Mr=Lr(function({size:o,rows:e=3,className:t,...s},n){let i=p(o);return De(Nr.Control,{ref:n,...s,render:De("textarea",{rows:e}),className:a(`mu-textarea mu-base mu-s-${i}`,t)})});var ke={};S(ke,{Provider:()=>kr,Viewport:()=>Ar,createToastManager:()=>Fr,useToastManager:()=>Gr});import{Toast as C}from"@base-ui/react/toast";import{CircleAlert as zr,CircleCheck as Er,Info as wr,TriangleAlert as Ir,X as Dr}from"lucide-react";import{forwardRef as Hr}from"react";import{jsx as y,jsxs as He}from"react/jsx-runtime";var kr=C.Provider,Gr=C.useToastManager,Fr=C.createToastManager,Ar=Hr(function({container:o,closeLabel:e="Close",className:t,...s},n){return y(C.Portal,{container:o,children:y(C.Viewport,{ref:n,...s,className:a("mu-toast-viewport",t),children:y(Vr,{closeLabel:e})})})}),$r={neutral:wr,success:Er,warning:Ir,danger:zr},Or=r=>r==="success"||r==="warning"||r==="danger"?r:"neutral";function Vr({closeLabel:r}){let{toasts:o}=C.useToastManager();return o.map(e=>{let t=Or(e.type),s=$r[t];return y(C.Root,{toast:e,className:l("mu-toast mu-popup mu-base mu-s-md",`mu-toast-${t}`),children:He(C.Content,{className:"mu-toast-content",children:[y(s,{className:"mu-toast-icon","aria-hidden":!0}),He("div",{className:"mu-toast-text",children:[y(C.Title,{className:"mu-toast-title mu-label"}),y(C.Description,{className:"mu-toast-description mu-body-sm"})]}),y(C.Action,{className:l("mu-toast-action",z({variant:"neutral",size:"sm"}))}),y(C.Close,{className:"mu-toast-close",render:y(O,{variant:"ghost",size:"sm",icon:y(Dr,{}),"aria-label":r})})]})},e.id)})}import{Toggle as Wr}from"@base-ui/react/toggle";import{forwardRef as Kr}from"react";import{jsx as Xr,jsxs as qr}from"react/jsx-runtime";var Ur=Kr(function({size:o,icon:e,className:t,children:s,...n},i){let m=p(o),P=e!==void 0&&(s==null||s===!1);return qr(Wr,{ref:i,...n,className:a(`mu-toggle${P?" mu-toggle-icon":""} mu-base mu-s-${m} mu-focus mu-hit`,t),children:[e,P?null:Xr("span",{className:"mu-toggle-label",children:s})]})});import{ToggleGroup as _r}from"@base-ui/react/toggle-group";import{forwardRef as Jr,useCallback as Qr,useLayoutEffect as Yr,useRef as Zr}from"react";import{jsx as Ge,jsxs as os}from"react/jsx-runtime";var jr=Jr(function({size:o,multiple:e=!1,className:t,children:s,...n},i){let m=p(o),P=Zr(null),g=Qr(x=>{P.current=x,typeof i=="function"?i(x):i&&(i.current=x)},[i]);return es(P,!e),Ge(c.Provider,{value:m,children:os(_r,{ref:g,multiple:e,...n,className:a(e?`mu-toggle-group mu-s-${m}`:`mu-toggle-group mu-segmented mu-base mu-s-${m}`,t),children:[e?null:Ge("span",{className:"mu-segmented-key","aria-hidden":!0}),s]})})});function es(r,o){Yr(()=>{let e=r.current;if(!o||!e)return;let t=()=>{let i=e.querySelector(":scope > .mu-toggle[data-pressed]");i?(e.style.setProperty("--key-left",`${i.offsetLeft}px`),e.style.setProperty("--key-width",`${i.offsetWidth}px`),e.dataset.keyed=""):delete e.dataset.keyed};t();let s=new MutationObserver(t);s.observe(e,{subtree:!0,attributes:!0,attributeFilter:["data-pressed"],childList:!0});let n=new ResizeObserver(t);n.observe(e);for(let i of e.children)n.observe(i);return()=>{s.disconnect(),n.disconnect()}},[r,o])}var Ae={};S(Ae,{Popup:()=>ns,Provider:()=>ts,Root:()=>rs,Trigger:()=>ss});import{Tooltip as $}from"@base-ui/react/tooltip";import{forwardRef as Fe}from"react";import{jsx as oe,jsxs as as}from"react/jsx-runtime";var ts=$.Provider,rs=$.Root,ss=Fe(function({delay:o=400,className:e,...t},s){return oe($.Trigger,{ref:s,delay:o,...t,className:a("mu-tooltip-trigger",e)})}),ns=Fe(function({container:o,shortcut:e,className:t,children:s,...n},i){let[m,P]=N(n);return oe($.Portal,{container:o,children:oe($.Positioner,{sideOffset:6,...m,className:"mu-positioner",children:as($.Popup,{ref:i,...P,className:a("mu-tooltip-popup mu-popup-motion mu-label-sm",t),children:[s,e!==void 0?oe("span",{className:"mu-tooltip-shortcut",children:e}):null]})})})});export{ce as AlertDialog,fe as Avatar,lo as Badge,O as Button,go as Checkbox,Pe as Collapsible,xe as Combobox,be as Dialog,Te as Field,Be as Fieldset,rt as Input,pt as Kbd,ft as Link,Ce as Menu,ye as Popover,Ft as Prose,Vt as Radio,Ot as RadioGroup,Le as Select,rr as Separator,pr as Skeleton,cr as Spinner,dr as Switch,Ee as Table,we as Tabs,Mr as Textarea,ke as Toast,Ur as Toggle,jr as ToggleGroup,Ae as Tooltip,z as buttonClasses};
|
|
3
|
+
//# sourceMappingURL=index.js.map
|