@usememos/ui 26.10.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 (66) hide show
  1. package/README.md +117 -0
  2. package/dist/button.cjs +74 -0
  3. package/dist/button.d.cts +15 -0
  4. package/dist/button.d.ts +15 -0
  5. package/dist/button.js +7 -0
  6. package/dist/checkbox.cjs +98 -0
  7. package/dist/checkbox.d.cts +16 -0
  8. package/dist/checkbox.d.ts +16 -0
  9. package/dist/checkbox.js +7 -0
  10. package/dist/chunk-3DNMGJFC.js +216 -0
  11. package/dist/chunk-3VYNJ6UM.js +27 -0
  12. package/dist/chunk-3YY2G3JK.js +125 -0
  13. package/dist/chunk-5GQEJQKE.js +60 -0
  14. package/dist/chunk-6TNEFWVX.js +9 -0
  15. package/dist/chunk-BH4MPO4N.js +25 -0
  16. package/dist/chunk-F6GH4X7N.js +34 -0
  17. package/dist/chunk-HYN2P4OY.js +84 -0
  18. package/dist/chunk-OIUVLPTE.js +54 -0
  19. package/dist/chunk-S6LVYCE6.js +157 -0
  20. package/dist/chunk-SNSDJKJP.js +44 -0
  21. package/dist/chunk-WPO54YPG.js +328 -0
  22. package/dist/chunk-Z3ME5VRQ.js +98 -0
  23. package/dist/control-size-Bz2gyuyO.d.cts +3 -0
  24. package/dist/control-size-Bz2gyuyO.d.ts +3 -0
  25. package/dist/dialog.cjs +203 -0
  26. package/dist/dialog.d.cts +34 -0
  27. package/dist/dialog.d.ts +34 -0
  28. package/dist/dialog.js +8 -0
  29. package/dist/dropdown-menu.cjs +378 -0
  30. package/dist/dropdown-menu.d.cts +60 -0
  31. package/dist/dropdown-menu.d.ts +60 -0
  32. package/dist/dropdown-menu.js +8 -0
  33. package/dist/index.cjs +1223 -0
  34. package/dist/index.d.cts +21 -0
  35. package/dist/index.d.ts +21 -0
  36. package/dist/index.js +48 -0
  37. package/dist/input.cjs +67 -0
  38. package/dist/input.d.cts +11 -0
  39. package/dist/input.d.ts +11 -0
  40. package/dist/input.js +7 -0
  41. package/dist/popover.cjs +175 -0
  42. package/dist/popover.d.cts +53 -0
  43. package/dist/popover.d.ts +53 -0
  44. package/dist/popover.js +8 -0
  45. package/dist/radio-group.cjs +122 -0
  46. package/dist/radio-group.d.cts +25 -0
  47. package/dist/radio-group.d.ts +25 -0
  48. package/dist/radio-group.js +7 -0
  49. package/dist/select.cjs +266 -0
  50. package/dist/select.d.cts +45 -0
  51. package/dist/select.d.ts +45 -0
  52. package/dist/select.js +8 -0
  53. package/dist/separator.cjs +82 -0
  54. package/dist/separator.d.cts +12 -0
  55. package/dist/separator.d.ts +12 -0
  56. package/dist/separator.js +7 -0
  57. package/dist/switch.cjs +92 -0
  58. package/dist/switch.d.cts +16 -0
  59. package/dist/switch.d.ts +16 -0
  60. package/dist/switch.js +7 -0
  61. package/dist/theme.css +1097 -0
  62. package/dist/tooltip.cjs +148 -0
  63. package/dist/tooltip.d.cts +24 -0
  64. package/dist/tooltip.d.ts +24 -0
  65. package/dist/tooltip.js +8 -0
  66. package/package.json +172 -0
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # @usememos/ui
2
+
3
+ Opinionated React UI kit with explicit CSS delivery and compound component APIs.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @usememos/ui react react-dom
9
+ ```
10
+
11
+ Import the packaged theme once:
12
+
13
+ ```tsx
14
+ import "@usememos/ui/theme.css";
15
+ ```
16
+
17
+ ## Compound API
18
+
19
+ ```tsx
20
+ import { Button, Dialog, Input, Select } from "@usememos/ui";
21
+
22
+ <Input aria-label="Project name" placeholder="Project name" />;
23
+
24
+ <Dialog.Root>
25
+ <Dialog.Trigger render={<Button />}>Open dialog</Dialog.Trigger>
26
+ <Dialog.Content>
27
+ <Dialog.Header>
28
+ <Dialog.Title>Team access</Dialog.Title>
29
+ <Dialog.Description>Review the current members.</Dialog.Description>
30
+ </Dialog.Header>
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
+ ```
44
+
45
+ ## Public Entrypoints
46
+
47
+ - `@usememos/ui`
48
+ - `@usememos/ui/theme.css`
49
+ - `@usememos/ui/button`
50
+ - `@usememos/ui/checkbox`
51
+ - `@usememos/ui/dialog`
52
+ - `@usememos/ui/dropdown-menu`
53
+ - `@usememos/ui/input`
54
+ - `@usememos/ui/popover`
55
+ - `@usememos/ui/radio-group`
56
+ - `@usememos/ui/select`
57
+ - `@usememos/ui/separator`
58
+ - `@usememos/ui/switch`
59
+ - `@usememos/ui/tooltip`
60
+
61
+ ## Customization
62
+
63
+ Theme overrides are done with CSS variables on `:root`, `[data-mui-theme]`, or any subtree wrapper:
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);
77
+ }
78
+ ```
79
+
80
+ Dark mode is supported out of the box:
81
+
82
+ ```html
83
+ <html class="dark">
84
+ <!-- app -->
85
+ </html>
86
+ ```
87
+
88
+ or on any subtree:
89
+
90
+ ```tsx
91
+ <div data-mui-theme="dark">{/* app */}</div>
92
+ ```
93
+
94
+ Components also accept `className` for local overrides:
95
+
96
+ ```tsx
97
+ <Button className="my-custom-styles">Custom Button</Button>
98
+ ```
99
+
100
+ ## Development
101
+
102
+ ```bash
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:
110
+
111
+ ```bash
112
+ pnpm exec playwright install chromium
113
+ ```
114
+
115
+ ## License
116
+
117
+ MIT © [usememos](https://github.com/usememos)
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/button.ts
31
+ var button_exports = {};
32
+ __export(button_exports, {
33
+ Button: () => Button
34
+ });
35
+ module.exports = __toCommonJS(button_exports);
36
+
37
+ // src/foundation/button.tsx
38
+ var React = __toESM(require("react"), 1);
39
+
40
+ // src/shared/cx.ts
41
+ var import_clsx = require("clsx");
42
+ function cx(...values) {
43
+ return (0, import_clsx.clsx)(values);
44
+ }
45
+
46
+ // src/foundation/button.tsx
47
+ var import_jsx_runtime = require("react/jsx-runtime");
48
+ var Button = React.forwardRef(
49
+ ({
50
+ className,
51
+ variant = "default",
52
+ size = "md",
53
+ disabled,
54
+ ...props
55
+ }, ref) => {
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ "button",
58
+ {
59
+ ref,
60
+ className: cx("mui-button", className),
61
+ "data-size": size,
62
+ "data-variant": variant,
63
+ "data-disabled": disabled ? "" : void 0,
64
+ disabled,
65
+ ...props
66
+ }
67
+ );
68
+ }
69
+ );
70
+ Button.displayName = "Button";
71
+ // Annotate the CommonJS export names for ESM import in node:
72
+ 0 && (module.exports = {
73
+ Button
74
+ });
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { C as ControlSize } from './control-size-Bz2gyuyO.cjs';
3
+
4
+ type ButtonVariant = "default" | "secondary" | "outline" | "ghost" | "destructive" | "link";
5
+ type ButtonSize = ControlSize | "icon";
6
+ type ButtonProps = React.ComponentPropsWithoutRef<"button"> & {
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ };
10
+ declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
11
+ variant?: ButtonVariant;
12
+ size?: ButtonSize;
13
+ } & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { C as ControlSize } from './control-size-Bz2gyuyO.js';
3
+
4
+ type ButtonVariant = "default" | "secondary" | "outline" | "ghost" | "destructive" | "link";
5
+ type ButtonSize = ControlSize | "icon";
6
+ type ButtonProps = React.ComponentPropsWithoutRef<"button"> & {
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ };
10
+ declare const Button: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
11
+ variant?: ButtonVariant;
12
+ size?: ButtonSize;
13
+ } & React.RefAttributes<HTMLButtonElement>>;
14
+
15
+ export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
package/dist/button.js ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-F6GH4X7N.js";
4
+ import "./chunk-6TNEFWVX.js";
5
+ export {
6
+ Button
7
+ };
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/checkbox.ts
31
+ var checkbox_exports = {};
32
+ __export(checkbox_exports, {
33
+ Checkbox: () => Checkbox2
34
+ });
35
+ module.exports = __toCommonJS(checkbox_exports);
36
+
37
+ // src/foundation/checkbox.tsx
38
+ var import_lucide_react = require("lucide-react");
39
+
40
+ // ../primitives/src/foundation/checkbox.tsx
41
+ var import_checkbox = require("@base-ui/react/checkbox");
42
+ var React = __toESM(require("react"), 1);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
44
+ var Root = React.forwardRef((props, ref) => {
45
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
46
+ import_checkbox.Checkbox.Root,
47
+ {
48
+ ref,
49
+ "data-scope": "checkbox",
50
+ "data-part": "root",
51
+ ...props
52
+ }
53
+ );
54
+ });
55
+ var Indicator = React.forwardRef((props, ref) => {
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
+ import_checkbox.Checkbox.Indicator,
58
+ {
59
+ ref,
60
+ "data-scope": "checkbox",
61
+ "data-part": "indicator",
62
+ ...props
63
+ }
64
+ );
65
+ });
66
+ Root.displayName = "Checkbox.Root";
67
+ Indicator.displayName = "Checkbox.Indicator";
68
+ var Checkbox = {
69
+ Root,
70
+ Indicator
71
+ };
72
+
73
+ // src/shared/cx.ts
74
+ var import_clsx = require("clsx");
75
+ function cx(...values) {
76
+ return (0, import_clsx.clsx)(values);
77
+ }
78
+
79
+ // src/foundation/checkbox.tsx
80
+ var import_jsx_runtime2 = require("react/jsx-runtime");
81
+ function Checkbox2({ className, children, size = "md", ...props }) {
82
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
83
+ Checkbox.Root,
84
+ {
85
+ className: cx("mui-checkbox", className),
86
+ "data-size": size,
87
+ ...props,
88
+ children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Checkbox.Indicator, { className: "mui-checkbox__indicator", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.CheckIcon, { size: 10, strokeWidth: 3 }) }),
90
+ children
91
+ ]
92
+ }
93
+ );
94
+ }
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ Checkbox
98
+ });
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as _base_ui_react from '@base-ui/react';
4
+ import { C as ControlSize } from './control-size-Bz2gyuyO.cjs';
5
+
6
+ declare const Checkbox$1: {
7
+ Root: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
8
+ Indicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ };
10
+
11
+ type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox$1.Root> & {
12
+ size?: ControlSize;
13
+ };
14
+ declare function Checkbox({ className, children, size, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as _base_ui_react from '@base-ui/react';
4
+ import { C as ControlSize } from './control-size-Bz2gyuyO.js';
5
+
6
+ declare const Checkbox$1: {
7
+ Root: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxRootProps, "ref"> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
8
+ Indicator: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.CheckboxIndicatorProps, "ref"> & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
9
+ };
10
+
11
+ type CheckboxProps = React.ComponentPropsWithoutRef<typeof Checkbox$1.Root> & {
12
+ size?: ControlSize;
13
+ };
14
+ declare function Checkbox({ className, children, size, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1,7 @@
1
+ import {
2
+ Checkbox
3
+ } from "./chunk-5GQEJQKE.js";
4
+ import "./chunk-6TNEFWVX.js";
5
+ export {
6
+ Checkbox
7
+ };
@@ -0,0 +1,216 @@
1
+ import {
2
+ useOverlayLayerProps
3
+ } from "./chunk-BH4MPO4N.js";
4
+ import {
5
+ cx
6
+ } from "./chunk-6TNEFWVX.js";
7
+
8
+ // src/selection/select.tsx
9
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
10
+
11
+ // ../primitives/src/selection/select.tsx
12
+ import * as React from "react";
13
+ import { Select as SelectPrimitive } from "@base-ui/react/select";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var Root = (props) => {
16
+ return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-scope": "select", "data-part": "root", ...props });
17
+ };
18
+ var Group = (props) => {
19
+ return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-scope": "select", "data-part": "group", ...props });
20
+ };
21
+ var Value = React.forwardRef((props, ref) => {
22
+ return /* @__PURE__ */ jsx(SelectPrimitive.Value, { ref, "data-scope": "select", "data-part": "value", ...props });
23
+ });
24
+ var Trigger = React.forwardRef((props, ref) => {
25
+ return /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref, "data-scope": "select", "data-part": "trigger", ...props });
26
+ });
27
+ var Portal = (props) => {
28
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { "data-scope": "select", "data-part": "portal", ...props });
29
+ };
30
+ var Content = React.forwardRef(
31
+ ({
32
+ className,
33
+ children,
34
+ finalFocus,
35
+ align = "start",
36
+ collisionPadding = 8,
37
+ sideOffset = 4,
38
+ ...props
39
+ }, ref) => {
40
+ return /* @__PURE__ */ jsx(
41
+ SelectPrimitive.Positioner,
42
+ {
43
+ "data-scope": "select",
44
+ "data-part": "positioner",
45
+ align,
46
+ collisionPadding,
47
+ sideOffset,
48
+ ...props,
49
+ children: /* @__PURE__ */ jsx(
50
+ SelectPrimitive.Popup,
51
+ {
52
+ ref,
53
+ "data-scope": "select",
54
+ "data-part": "content",
55
+ className,
56
+ finalFocus,
57
+ children
58
+ }
59
+ )
60
+ }
61
+ );
62
+ }
63
+ );
64
+ var Viewport = React.forwardRef((props, ref) => {
65
+ return /* @__PURE__ */ jsx(SelectPrimitive.List, { ref, "data-scope": "select", "data-part": "viewport", ...props });
66
+ });
67
+ var Label = React.forwardRef((props, ref) => {
68
+ return /* @__PURE__ */ jsx(SelectPrimitive.GroupLabel, { ref, "data-scope": "select", "data-part": "label", ...props });
69
+ });
70
+ var Item = React.forwardRef((props, ref) => {
71
+ return /* @__PURE__ */ jsx(SelectPrimitive.Item, { ref, "data-scope": "select", "data-part": "item", ...props });
72
+ });
73
+ var ItemText = React.forwardRef((props, ref) => {
74
+ return /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { ref, "data-scope": "select", "data-part": "item-text", ...props });
75
+ });
76
+ var ItemIndicator = React.forwardRef((props, ref) => {
77
+ return /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { ref, "data-scope": "select", "data-part": "item-indicator", ...props });
78
+ });
79
+ var Separator = React.forwardRef((props, ref) => {
80
+ return /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, "data-scope": "select", "data-part": "separator", ...props });
81
+ });
82
+ var ScrollUpButton = React.forwardRef((props, ref) => {
83
+ return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpArrow, { ref, "data-scope": "select", "data-part": "scroll-up-button", ...props });
84
+ });
85
+ var ScrollDownButton = React.forwardRef((props, ref) => {
86
+ return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownArrow, { ref, "data-scope": "select", "data-part": "scroll-down-button", ...props });
87
+ });
88
+ Root.displayName = "Select.Root";
89
+ Group.displayName = "Select.Group";
90
+ Value.displayName = "Select.Value";
91
+ Trigger.displayName = "Select.Trigger";
92
+ Portal.displayName = "Select.Portal";
93
+ Content.displayName = "Select.Content";
94
+ Viewport.displayName = "Select.Viewport";
95
+ Label.displayName = "Select.Label";
96
+ Item.displayName = "Select.Item";
97
+ ItemText.displayName = "Select.ItemText";
98
+ ItemIndicator.displayName = "Select.ItemIndicator";
99
+ Separator.displayName = "Select.Separator";
100
+ ScrollUpButton.displayName = "Select.ScrollUpButton";
101
+ ScrollDownButton.displayName = "Select.ScrollDownButton";
102
+ var Select = {
103
+ Root,
104
+ Group,
105
+ Value,
106
+ Trigger,
107
+ Portal,
108
+ Content,
109
+ Viewport,
110
+ Label,
111
+ Item,
112
+ ItemText,
113
+ ItemIndicator,
114
+ Separator,
115
+ ScrollUpButton,
116
+ ScrollDownButton
117
+ };
118
+
119
+ // src/selection/select.tsx
120
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
121
+ var Root2 = Select.Root;
122
+ var Group2 = Select.Group;
123
+ var Value2 = Select.Value;
124
+ function Trigger2({
125
+ className,
126
+ children,
127
+ size = "md",
128
+ ...props
129
+ }) {
130
+ return /* @__PURE__ */ jsxs(
131
+ Select.Trigger,
132
+ {
133
+ className: cx("mui-select__trigger", className),
134
+ "data-size": size,
135
+ ...props,
136
+ children: [
137
+ /* @__PURE__ */ jsx2("span", { className: "mui-select__value-slot", children }),
138
+ /* @__PURE__ */ jsx2("span", { className: "mui-select__icon-slot", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(ChevronDownIcon, { className: "mui-select__icon", size: 12 }) })
139
+ ]
140
+ }
141
+ );
142
+ }
143
+ function Content2({
144
+ className,
145
+ children,
146
+ ...props
147
+ }) {
148
+ const layerProps = useOverlayLayerProps(props);
149
+ return /* @__PURE__ */ jsx2(Select.Portal, { children: /* @__PURE__ */ jsxs(
150
+ Select.Content,
151
+ {
152
+ className: cx("mui-select__content", className),
153
+ ...layerProps,
154
+ children: [
155
+ /* @__PURE__ */ jsx2(Select.ScrollUpButton, { className: "mui-select__scroll-button", children: /* @__PURE__ */ jsx2(ChevronUpIcon, { size: 12 }) }),
156
+ /* @__PURE__ */ jsx2(Select.Viewport, { className: "mui-select__viewport", children }),
157
+ /* @__PURE__ */ jsx2(Select.ScrollDownButton, { className: "mui-select__scroll-button", children: /* @__PURE__ */ jsx2(ChevronDownIcon, { size: 12 }) })
158
+ ]
159
+ }
160
+ ) });
161
+ }
162
+ function Label2({
163
+ className,
164
+ ...props
165
+ }) {
166
+ return /* @__PURE__ */ jsx2(
167
+ Select.Label,
168
+ {
169
+ className: cx("mui-select__label", className),
170
+ ...props
171
+ }
172
+ );
173
+ }
174
+ function Item2({
175
+ className,
176
+ children,
177
+ ...props
178
+ }) {
179
+ return /* @__PURE__ */ jsxs(
180
+ Select.Item,
181
+ {
182
+ className: cx("mui-select__item", className),
183
+ ...props,
184
+ children: [
185
+ /* @__PURE__ */ jsx2("span", { className: "mui-select__item-leading", "aria-hidden": "true", children: /* @__PURE__ */ jsx2(Select.ItemIndicator, { className: "mui-select__item-indicator", children: /* @__PURE__ */ jsx2(CheckIcon, { size: 10 }) }) }),
186
+ /* @__PURE__ */ jsx2(Select.ItemText, { className: "mui-select__item-text", children })
187
+ ]
188
+ }
189
+ );
190
+ }
191
+ function Separator2({
192
+ className,
193
+ ...props
194
+ }) {
195
+ return /* @__PURE__ */ jsx2(
196
+ Select.Separator,
197
+ {
198
+ className: cx("mui-select__separator", className),
199
+ ...props
200
+ }
201
+ );
202
+ }
203
+ var Select2 = {
204
+ Root: Root2,
205
+ Group: Group2,
206
+ Value: Value2,
207
+ Trigger: Trigger2,
208
+ Content: Content2,
209
+ Label: Label2,
210
+ Item: Item2,
211
+ Separator: Separator2
212
+ };
213
+
214
+ export {
215
+ Select2 as Select
216
+ };
@@ -0,0 +1,27 @@
1
+ import {
2
+ cx
3
+ } from "./chunk-6TNEFWVX.js";
4
+
5
+ // src/foundation/input.tsx
6
+ import * as React from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var Input = React.forwardRef(
9
+ ({ className, disabled, size = "md", ...props }, ref) => {
10
+ return /* @__PURE__ */ jsx(
11
+ "input",
12
+ {
13
+ ref,
14
+ className: cx("mui-input", className),
15
+ "data-disabled": disabled ? "" : void 0,
16
+ "data-size": size,
17
+ disabled,
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ );
23
+ Input.displayName = "Input";
24
+
25
+ export {
26
+ Input
27
+ };