@usememos/ui 26.10.0 → 26.10.2

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 (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +67 -92
  3. package/dist/index.js +3 -48
  4. package/dist/index.js.map +7 -0
  5. package/dist/styles.css +1 -0
  6. package/dist/tokens.css +1 -0
  7. package/dist/types/components/avatar/index.d.ts +16 -0
  8. package/dist/types/components/badge/index.d.ts +10 -0
  9. package/dist/types/components/button/index.d.ts +29 -0
  10. package/dist/types/components/checkbox/index.d.ts +11 -0
  11. package/dist/types/components/collapsible/index.d.ts +15 -0
  12. package/dist/types/components/combobox/index.d.ts +66 -0
  13. package/dist/types/components/dialog/alert-dialog.d.ts +19 -0
  14. package/dist/types/components/dialog/index.d.ts +22 -0
  15. package/dist/types/components/dialog/parts.d.ts +34 -0
  16. package/dist/types/components/field/fieldset.d.ts +11 -0
  17. package/dist/types/components/field/index.d.ts +24 -0
  18. package/dist/types/components/input/index.d.ts +19 -0
  19. package/dist/types/components/kbd/index.d.ts +5 -0
  20. package/dist/types/components/link/index.d.ts +11 -0
  21. package/dist/types/components/menu/index.d.ts +67 -0
  22. package/dist/types/components/popover/index.d.ts +28 -0
  23. package/dist/types/components/prose/index.d.ts +11 -0
  24. package/dist/types/components/radio-group/index.d.ts +15 -0
  25. package/dist/types/components/select/index.d.ts +46 -0
  26. package/dist/types/components/separator/index.d.ts +5 -0
  27. package/dist/types/components/skeleton/index.d.ts +13 -0
  28. package/dist/types/components/spinner/index.d.ts +10 -0
  29. package/dist/types/components/switch/index.d.ts +11 -0
  30. package/dist/types/components/table/index.d.ts +42 -0
  31. package/dist/types/components/tabs/index.d.ts +22 -0
  32. package/dist/types/components/textarea/index.d.ts +9 -0
  33. package/dist/types/components/toast/index.d.ts +19 -0
  34. package/dist/types/components/toggle/index.d.ts +11 -0
  35. package/dist/types/components/toggle-group/index.d.ts +13 -0
  36. package/dist/types/components/tooltip/index.d.ts +24 -0
  37. package/dist/types/index.d.ts +30 -0
  38. package/dist/types/internal/class-name.d.ts +7 -0
  39. package/dist/types/internal/popup.d.ts +9 -0
  40. package/dist/types/internal/size.d.ts +5 -0
  41. package/dist/types/types.d.ts +7 -0
  42. package/llms-full.txt +2181 -0
  43. package/llms.txt +53 -0
  44. package/package.json +34 -157
  45. package/dist/button.cjs +0 -74
  46. package/dist/button.d.cts +0 -15
  47. package/dist/button.d.ts +0 -15
  48. package/dist/button.js +0 -7
  49. package/dist/checkbox.cjs +0 -98
  50. package/dist/checkbox.d.cts +0 -16
  51. package/dist/checkbox.d.ts +0 -16
  52. package/dist/checkbox.js +0 -7
  53. package/dist/chunk-3DNMGJFC.js +0 -216
  54. package/dist/chunk-3VYNJ6UM.js +0 -27
  55. package/dist/chunk-3YY2G3JK.js +0 -125
  56. package/dist/chunk-5GQEJQKE.js +0 -60
  57. package/dist/chunk-6TNEFWVX.js +0 -9
  58. package/dist/chunk-BH4MPO4N.js +0 -25
  59. package/dist/chunk-F6GH4X7N.js +0 -34
  60. package/dist/chunk-HYN2P4OY.js +0 -84
  61. package/dist/chunk-OIUVLPTE.js +0 -54
  62. package/dist/chunk-S6LVYCE6.js +0 -157
  63. package/dist/chunk-SNSDJKJP.js +0 -44
  64. package/dist/chunk-WPO54YPG.js +0 -328
  65. package/dist/chunk-Z3ME5VRQ.js +0 -98
  66. package/dist/control-size-Bz2gyuyO.d.cts +0 -3
  67. package/dist/control-size-Bz2gyuyO.d.ts +0 -3
  68. package/dist/dialog.cjs +0 -203
  69. package/dist/dialog.d.cts +0 -34
  70. package/dist/dialog.d.ts +0 -34
  71. package/dist/dialog.js +0 -8
  72. package/dist/dropdown-menu.cjs +0 -378
  73. package/dist/dropdown-menu.d.cts +0 -60
  74. package/dist/dropdown-menu.d.ts +0 -60
  75. package/dist/dropdown-menu.js +0 -8
  76. package/dist/index.cjs +0 -1223
  77. package/dist/index.d.cts +0 -21
  78. package/dist/index.d.ts +0 -21
  79. package/dist/input.cjs +0 -67
  80. package/dist/input.d.cts +0 -11
  81. package/dist/input.d.ts +0 -11
  82. package/dist/input.js +0 -7
  83. package/dist/popover.cjs +0 -175
  84. package/dist/popover.d.cts +0 -53
  85. package/dist/popover.d.ts +0 -53
  86. package/dist/popover.js +0 -8
  87. package/dist/radio-group.cjs +0 -122
  88. package/dist/radio-group.d.cts +0 -25
  89. package/dist/radio-group.d.ts +0 -25
  90. package/dist/radio-group.js +0 -7
  91. package/dist/select.cjs +0 -266
  92. package/dist/select.d.cts +0 -45
  93. package/dist/select.d.ts +0 -45
  94. package/dist/select.js +0 -8
  95. package/dist/separator.cjs +0 -82
  96. package/dist/separator.d.cts +0 -12
  97. package/dist/separator.d.ts +0 -12
  98. package/dist/separator.js +0 -7
  99. package/dist/switch.cjs +0 -92
  100. package/dist/switch.d.cts +0 -16
  101. package/dist/switch.d.ts +0 -16
  102. package/dist/switch.js +0 -7
  103. package/dist/theme.css +0 -1097
  104. package/dist/tooltip.cjs +0 -148
  105. package/dist/tooltip.d.cts +0 -24
  106. package/dist/tooltip.d.ts +0 -24
  107. package/dist/tooltip.js +0 -8
package/dist/dialog.cjs DELETED
@@ -1,203 +0,0 @@
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/dialog.ts
31
- var dialog_exports = {};
32
- __export(dialog_exports, {
33
- Dialog: () => Dialog2
34
- });
35
- module.exports = __toCommonJS(dialog_exports);
36
-
37
- // src/overlay/dialog.tsx
38
- var import_lucide_react = require("lucide-react");
39
- var React3 = __toESM(require("react"), 1);
40
-
41
- // ../primitives/src/overlay/dialog.tsx
42
- var import_dialog = require("@base-ui/react/dialog");
43
- var React = __toESM(require("react"), 1);
44
- var import_jsx_runtime = require("react/jsx-runtime");
45
- var Root = (props) => {
46
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Root, { "data-scope": "dialog", "data-part": "root", ...props });
47
- };
48
- var Trigger = React.forwardRef((props, ref) => {
49
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Trigger, { ref, "data-scope": "dialog", "data-part": "trigger", ...props });
50
- });
51
- var Portal = (props) => {
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Portal, { "data-scope": "dialog", "data-part": "portal", ...props });
53
- };
54
- var Overlay = React.forwardRef((props, ref) => {
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Backdrop, { ref, "data-scope": "dialog", "data-part": "overlay", ...props });
56
- });
57
- var Content = React.forwardRef((props, ref) => {
58
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Popup, { ref, "data-scope": "dialog", "data-part": "content", ...props });
59
- });
60
- var Close = React.forwardRef((props, ref) => {
61
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Close, { ref, "data-scope": "dialog", "data-part": "close", ...props });
62
- });
63
- var Title = React.forwardRef((props, ref) => {
64
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Title, { ref, "data-scope": "dialog", "data-part": "title", ...props });
65
- });
66
- var Description = React.forwardRef((props, ref) => {
67
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog.Description, { ref, "data-scope": "dialog", "data-part": "description", ...props });
68
- });
69
- Root.displayName = "Dialog.Root";
70
- Trigger.displayName = "Dialog.Trigger";
71
- Portal.displayName = "Dialog.Portal";
72
- Overlay.displayName = "Dialog.Overlay";
73
- Content.displayName = "Dialog.Content";
74
- Close.displayName = "Dialog.Close";
75
- Title.displayName = "Dialog.Title";
76
- Description.displayName = "Dialog.Description";
77
- var Dialog = {
78
- Root,
79
- Trigger,
80
- Portal,
81
- Overlay,
82
- Content,
83
- Close,
84
- Title,
85
- Description
86
- };
87
-
88
- // src/overlay/layer-context.tsx
89
- var React2 = __toESM(require("react"), 1);
90
- var import_jsx_runtime2 = require("react/jsx-runtime");
91
- var OverlayLayerContext = React2.createContext("root");
92
- function OverlayLayerProvider({
93
- children,
94
- value
95
- }) {
96
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(OverlayLayerContext.Provider, { value, children });
97
- }
98
-
99
- // src/shared/cx.ts
100
- var import_clsx = require("clsx");
101
- function cx(...values) {
102
- return (0, import_clsx.clsx)(values);
103
- }
104
-
105
- // src/overlay/dialog.tsx
106
- var import_jsx_runtime3 = require("react/jsx-runtime");
107
- var Root2 = Dialog.Root;
108
- var Trigger2 = Dialog.Trigger;
109
- var Portal2 = Dialog.Portal;
110
- var Overlay2 = React3.forwardRef(({ className, ...props }, ref) => {
111
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
112
- Dialog.Overlay,
113
- {
114
- ref,
115
- className: cx("mui-dialog__overlay", className),
116
- ...props
117
- }
118
- );
119
- });
120
- var Close2 = React3.forwardRef(({ className, children, ...props }, ref) => {
121
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
122
- Dialog.Close,
123
- {
124
- ref,
125
- className: cx("mui-dialog__close", className),
126
- ...props,
127
- children: [
128
- children ?? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.XIcon, { size: 14, "aria-hidden": "true" }),
129
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "sr-only", children: "Close" })
130
- ]
131
- }
132
- );
133
- });
134
- var Content2 = React3.forwardRef(({ className, children, showCloseButton = true, slotProps, ...props }, ref) => {
135
- const closeProps = {
136
- "aria-label": "Close dialog",
137
- ...slotProps?.close
138
- };
139
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Portal2, { children: [
140
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Overlay2, {}),
141
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
142
- Dialog.Content,
143
- {
144
- ref,
145
- className: cx("mui-dialog__content", className),
146
- ...props,
147
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(OverlayLayerProvider, { value: "modal", children: [
148
- children,
149
- showCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Close2, { ...closeProps }) : null
150
- ] })
151
- }
152
- )
153
- ] });
154
- });
155
- var Header = React3.forwardRef(
156
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, className: cx("mui-dialog__header", className), ...props })
157
- );
158
- var Footer = React3.forwardRef(
159
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref, className: cx("mui-dialog__footer", className), ...props })
160
- );
161
- var Title2 = React3.forwardRef(({ className, ...props }, ref) => {
162
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
163
- Dialog.Title,
164
- {
165
- ref,
166
- className: cx("mui-dialog__title", className),
167
- ...props
168
- }
169
- );
170
- });
171
- var Description2 = React3.forwardRef(({ className, ...props }, ref) => {
172
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
173
- Dialog.Description,
174
- {
175
- ref,
176
- className: cx("mui-dialog__description", className),
177
- ...props
178
- }
179
- );
180
- });
181
- Header.displayName = "Dialog.Header";
182
- Footer.displayName = "Dialog.Footer";
183
- Title2.displayName = "Dialog.Title";
184
- Description2.displayName = "Dialog.Description";
185
- Close2.displayName = "Dialog.Close";
186
- Content2.displayName = "Dialog.Content";
187
- Overlay2.displayName = "Dialog.Overlay";
188
- var Dialog2 = {
189
- Root: Root2,
190
- Trigger: Trigger2,
191
- Portal: Portal2,
192
- Overlay: Overlay2,
193
- Content: Content2,
194
- Close: Close2,
195
- Header,
196
- Footer,
197
- Title: Title2,
198
- Description: Description2
199
- };
200
- // Annotate the CommonJS export names for ESM import in node:
201
- 0 && (module.exports = {
202
- Dialog
203
- });
package/dist/dialog.d.cts DELETED
@@ -1,34 +0,0 @@
1
- import * as _base_ui_react from '@base-ui/react';
2
- import * as React from 'react';
3
- import { Dialog as Dialog$2 } from '@base-ui/react/dialog';
4
-
5
- declare const Dialog$1: {
6
- Root: React.FC<Dialog$2.Root.Props<unknown>>;
7
- Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
- Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
9
- Overlay: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- Content: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- Close: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
- Title: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
13
- Description: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
14
- };
15
-
16
- declare const Dialog: {
17
- Root: React.FC<_base_ui_react.DialogRoot.Props<unknown>>;
18
- Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
- Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
20
- Overlay: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
- Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
- showCloseButton?: boolean;
23
- slotProps?: {
24
- close?: React.ComponentPropsWithoutRef<typeof Dialog$1.Close>;
25
- };
26
- } & React.RefAttributes<HTMLDivElement>>;
27
- Close: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
28
- Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
- Footer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
- Title: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
31
- Description: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
32
- };
33
-
34
- export { Dialog };
package/dist/dialog.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import * as _base_ui_react from '@base-ui/react';
2
- import * as React from 'react';
3
- import { Dialog as Dialog$2 } from '@base-ui/react/dialog';
4
-
5
- declare const Dialog$1: {
6
- Root: React.FC<Dialog$2.Root.Props<unknown>>;
7
- Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
- Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
9
- Overlay: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- Content: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
- Close: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
- Title: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
13
- Description: React.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
14
- };
15
-
16
- declare const Dialog: {
17
- Root: React.FC<_base_ui_react.DialogRoot.Props<unknown>>;
18
- Trigger: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
- Portal: React.FC<Omit<Omit<_base_ui_react.DialogPortalProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">>;
20
- Overlay: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogBackdropProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
21
- Content: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogPopupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
22
- showCloseButton?: boolean;
23
- slotProps?: {
24
- close?: React.ComponentPropsWithoutRef<typeof Dialog$1.Close>;
25
- };
26
- } & React.RefAttributes<HTMLDivElement>>;
27
- Close: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogCloseProps, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
28
- Header: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
- Footer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
30
- Title: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogTitleProps, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
31
- Description: React.ForwardRefExoticComponent<Omit<Omit<Omit<_base_ui_react.DialogDescriptionProps, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
32
- };
33
-
34
- export { Dialog };
package/dist/dialog.js DELETED
@@ -1,8 +0,0 @@
1
- import {
2
- Dialog
3
- } from "./chunk-S6LVYCE6.js";
4
- import "./chunk-BH4MPO4N.js";
5
- import "./chunk-6TNEFWVX.js";
6
- export {
7
- Dialog
8
- };
@@ -1,378 +0,0 @@
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/dropdown-menu.ts
31
- var dropdown_menu_exports = {};
32
- __export(dropdown_menu_exports, {
33
- DropdownMenu: () => DropdownMenu2
34
- });
35
- module.exports = __toCommonJS(dropdown_menu_exports);
36
-
37
- // src/overlay/dropdown-menu.tsx
38
- var import_lucide_react = require("lucide-react");
39
-
40
- // ../primitives/src/overlay/dropdown-menu.tsx
41
- var import_menu = require("@base-ui/react/menu");
42
- var React = __toESM(require("react"), 1);
43
- var import_jsx_runtime = require("react/jsx-runtime");
44
- var Root = (props) => {
45
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Root, { "data-scope": "dropdown-menu", "data-part": "root", ...props });
46
- };
47
- var Trigger = React.forwardRef((props, ref) => {
48
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Trigger, { ref, "data-scope": "dropdown-menu", "data-part": "trigger", ...props });
49
- });
50
- var Portal = (props) => {
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Portal, { "data-scope": "dropdown-menu", "data-part": "portal", ...props });
52
- };
53
- var Content = React.forwardRef(
54
- ({
55
- className,
56
- children,
57
- align = "start",
58
- collisionPadding = 8,
59
- sideOffset = 4,
60
- ...props
61
- }, ref) => {
62
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
63
- import_menu.Menu.Positioner,
64
- {
65
- "data-scope": "dropdown-menu",
66
- "data-part": "positioner",
67
- align,
68
- collisionPadding,
69
- sideOffset,
70
- ...props,
71
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
- import_menu.Menu.Popup,
73
- {
74
- ref,
75
- "data-scope": "dropdown-menu",
76
- "data-part": "content",
77
- className,
78
- children
79
- }
80
- )
81
- }
82
- );
83
- }
84
- );
85
- var Item = React.forwardRef((props, ref) => {
86
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Item, { ref, "data-scope": "dropdown-menu", "data-part": "item", ...props });
87
- });
88
- var CheckboxItem = React.forwardRef((props, ref) => {
89
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.CheckboxItem, { ref, "data-scope": "dropdown-menu", "data-part": "checkbox-item", ...props });
90
- });
91
- var CheckboxItemIndicator = React.forwardRef((props, ref) => {
92
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
- import_menu.Menu.CheckboxItemIndicator,
94
- {
95
- ref,
96
- "data-scope": "dropdown-menu",
97
- "data-part": "checkbox-item-indicator",
98
- ...props
99
- }
100
- );
101
- });
102
- var RadioItem = React.forwardRef((props, ref) => {
103
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.RadioItem, { ref, "data-scope": "dropdown-menu", "data-part": "radio-item", ...props });
104
- });
105
- var RadioItemIndicator = React.forwardRef((props, ref) => {
106
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
107
- import_menu.Menu.RadioItemIndicator,
108
- {
109
- ref,
110
- "data-scope": "dropdown-menu",
111
- "data-part": "radio-item-indicator",
112
- ...props
113
- }
114
- );
115
- });
116
- var Label = React.forwardRef((props, ref) => {
117
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.GroupLabel, { ref, "data-scope": "dropdown-menu", "data-part": "label", ...props });
118
- });
119
- var Separator = React.forwardRef((props, ref) => {
120
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Separator, { ref, "data-scope": "dropdown-menu", "data-part": "separator", ...props });
121
- });
122
- var Group = (props) => {
123
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.Group, { "data-scope": "dropdown-menu", "data-part": "group", ...props });
124
- };
125
- var Sub = (props) => {
126
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.SubmenuRoot, { "data-scope": "dropdown-menu", "data-part": "sub", ...props });
127
- };
128
- var SubTrigger = React.forwardRef((props, ref) => {
129
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.SubmenuTrigger, { ref, "data-scope": "dropdown-menu", "data-part": "sub-trigger", ...props });
130
- });
131
- var SubContent = React.forwardRef(
132
- ({
133
- className,
134
- children,
135
- align = "start",
136
- collisionPadding = 8,
137
- sideOffset = 4,
138
- ...props
139
- }, ref) => {
140
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
141
- import_menu.Menu.Positioner,
142
- {
143
- "data-scope": "dropdown-menu",
144
- "data-part": "sub-positioner",
145
- align,
146
- collisionPadding,
147
- sideOffset,
148
- ...props,
149
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
150
- import_menu.Menu.Popup,
151
- {
152
- ref,
153
- "data-scope": "dropdown-menu",
154
- "data-part": "sub-content",
155
- className,
156
- children
157
- }
158
- )
159
- }
160
- );
161
- }
162
- );
163
- var RadioGroup = (props) => {
164
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_menu.Menu.RadioGroup, { "data-scope": "dropdown-menu", "data-part": "radio-group", ...props });
165
- };
166
- Root.displayName = "DropdownMenu.Root";
167
- Trigger.displayName = "DropdownMenu.Trigger";
168
- Portal.displayName = "DropdownMenu.Portal";
169
- Content.displayName = "DropdownMenu.Content";
170
- Item.displayName = "DropdownMenu.Item";
171
- CheckboxItem.displayName = "DropdownMenu.CheckboxItem";
172
- CheckboxItemIndicator.displayName = "DropdownMenu.CheckboxItemIndicator";
173
- RadioItem.displayName = "DropdownMenu.RadioItem";
174
- RadioItemIndicator.displayName = "DropdownMenu.RadioItemIndicator";
175
- Label.displayName = "DropdownMenu.Label";
176
- Separator.displayName = "DropdownMenu.Separator";
177
- Group.displayName = "DropdownMenu.Group";
178
- Sub.displayName = "DropdownMenu.Sub";
179
- SubTrigger.displayName = "DropdownMenu.SubTrigger";
180
- SubContent.displayName = "DropdownMenu.SubContent";
181
- RadioGroup.displayName = "DropdownMenu.RadioGroup";
182
- var DropdownMenu = {
183
- Root,
184
- Trigger,
185
- Portal,
186
- Content,
187
- Item,
188
- CheckboxItem,
189
- CheckboxItemIndicator,
190
- RadioItem,
191
- RadioItemIndicator,
192
- Label,
193
- Separator,
194
- Group,
195
- Sub,
196
- SubTrigger,
197
- SubContent,
198
- RadioGroup
199
- };
200
-
201
- // src/overlay/layer-context.tsx
202
- var React2 = __toESM(require("react"), 1);
203
- var import_jsx_runtime2 = require("react/jsx-runtime");
204
- var OverlayLayerContext = React2.createContext("root");
205
- function useOverlayLayerProps(props) {
206
- const layer = React2.useContext(OverlayLayerContext);
207
- if (layer === "root") {
208
- return props;
209
- }
210
- return {
211
- ...props,
212
- "data-mui-layer": layer
213
- };
214
- }
215
-
216
- // src/shared/cx.ts
217
- var import_clsx = require("clsx");
218
- function cx(...values) {
219
- return (0, import_clsx.clsx)(values);
220
- }
221
-
222
- // src/overlay/dropdown-menu.tsx
223
- var import_jsx_runtime3 = require("react/jsx-runtime");
224
- var Root2 = DropdownMenu.Root;
225
- var Trigger2 = DropdownMenu.Trigger;
226
- var Portal2 = DropdownMenu.Portal;
227
- var Group2 = DropdownMenu.Group;
228
- var Sub2 = DropdownMenu.Sub;
229
- var RadioGroup2 = DropdownMenu.RadioGroup;
230
- function ItemText({ className, ...props }) {
231
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cx("mui-dropdown-menu__item-text", className), ...props });
232
- }
233
- function Shortcut({ className, ...props }) {
234
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cx("mui-dropdown-menu__shortcut", className), ...props });
235
- }
236
- function Content2({
237
- className,
238
- sideOffset = 4,
239
- ...props
240
- }) {
241
- const layerProps = useOverlayLayerProps(props);
242
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
243
- DropdownMenu.Content,
244
- {
245
- className: cx("mui-dropdown-menu__content", className),
246
- sideOffset,
247
- ...layerProps
248
- }
249
- ) });
250
- }
251
- function Item2({
252
- className,
253
- children,
254
- ...props
255
- }) {
256
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
257
- DropdownMenu.Item,
258
- {
259
- className: cx("mui-dropdown-menu__item", className),
260
- ...props,
261
- children: [
262
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true" }),
263
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
264
- ]
265
- }
266
- );
267
- }
268
- function CheckboxItem2({
269
- className,
270
- children,
271
- ...props
272
- }) {
273
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
274
- DropdownMenu.CheckboxItem,
275
- {
276
- className: cx("mui-dropdown-menu__item", className),
277
- ...props,
278
- children: [
279
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.CheckboxItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.CheckIcon, { className: "mui-dropdown-menu__item-indicator", size: 10 }) }) }),
280
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
281
- ]
282
- }
283
- );
284
- }
285
- function RadioItem2({
286
- className,
287
- children,
288
- ...props
289
- }) {
290
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
291
- DropdownMenu.RadioItem,
292
- {
293
- className: cx("mui-dropdown-menu__item", className),
294
- ...props,
295
- children: [
296
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenu.RadioItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.CircleIcon, { className: "mui-dropdown-menu__item-indicator", size: 6, fill: "currentColor" }) }) }),
297
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children })
298
- ]
299
- }
300
- );
301
- }
302
- function Label2({
303
- className,
304
- ...props
305
- }) {
306
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
307
- DropdownMenu.Label,
308
- {
309
- className: cx("mui-dropdown-menu__label", className),
310
- ...props
311
- }
312
- );
313
- }
314
- function Separator2({
315
- className,
316
- ...props
317
- }) {
318
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
319
- DropdownMenu.Separator,
320
- {
321
- className: cx("mui-dropdown-menu__separator", className),
322
- ...props
323
- }
324
- );
325
- }
326
- function SubTrigger2({
327
- className,
328
- children,
329
- ...props
330
- }) {
331
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
332
- DropdownMenu.SubTrigger,
333
- {
334
- className: cx("mui-dropdown-menu__sub-trigger", className),
335
- ...props,
336
- children: [
337
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-leading", "aria-hidden": "true" }),
338
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ItemText, { children }),
339
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mui-dropdown-menu__item-trailing", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.ChevronRightIcon, { size: 12 }) })
340
- ]
341
- }
342
- );
343
- }
344
- function SubContent2({
345
- className,
346
- ...props
347
- }) {
348
- const layerProps = useOverlayLayerProps(props);
349
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
350
- DropdownMenu.SubContent,
351
- {
352
- className: cx("mui-dropdown-menu__content", className),
353
- ...layerProps
354
- }
355
- );
356
- }
357
- var DropdownMenu2 = {
358
- Root: Root2,
359
- Trigger: Trigger2,
360
- Portal: Portal2,
361
- Group: Group2,
362
- Sub: Sub2,
363
- RadioGroup: RadioGroup2,
364
- Content: Content2,
365
- Item: Item2,
366
- CheckboxItem: CheckboxItem2,
367
- RadioItem: RadioItem2,
368
- Label: Label2,
369
- Separator: Separator2,
370
- ItemText,
371
- Shortcut,
372
- SubTrigger: SubTrigger2,
373
- SubContent: SubContent2
374
- };
375
- // Annotate the CommonJS export names for ESM import in node:
376
- 0 && (module.exports = {
377
- DropdownMenu
378
- });