@constructive-io/ui 0.3.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +17 -22
- package/dist/components/alert-dialog.cjs +333 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +32 -0
- package/dist/components/alert-dialog.d.ts +16 -15
- package/dist/components/alert-dialog.js +89 -102
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/alert.cjs +119 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +19 -0
- package/dist/components/alert.d.ts +10 -5
- package/dist/components/alert.js +62 -6
- package/dist/components/alert.js.map +1 -1
- package/dist/components/app-bar.cjs +367 -0
- package/dist/components/app-bar.cjs.map +1 -0
- package/dist/components/app-bar.d.cts +26 -0
- package/dist/components/app-bar.d.ts +26 -0
- package/dist/components/app-bar.js +344 -0
- package/dist/components/app-bar.js.map +1 -0
- package/dist/components/app-shell.cjs +1792 -0
- package/dist/components/app-shell.cjs.map +1 -0
- package/dist/components/app-shell.d.cts +106 -0
- package/dist/components/app-shell.d.ts +106 -0
- package/dist/components/app-shell.js +1771 -0
- package/dist/components/app-shell.js.map +1 -0
- package/dist/components/autocomplete.cjs +418 -0
- package/dist/components/autocomplete.cjs.map +1 -0
- package/dist/components/autocomplete.d.cts +28 -0
- package/dist/components/autocomplete.d.ts +15 -15
- package/dist/components/autocomplete.js +9 -30
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.cjs +51 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +12 -0
- package/dist/components/avatar.d.ts +3 -4
- package/dist/components/avatar.js +11 -1
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.cjs +66 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +15 -0
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/breadcrumb.cjs +118 -0
- package/dist/components/breadcrumb.cjs.map +1 -0
- package/dist/components/breadcrumb.d.cts +14 -0
- package/dist/components/breadcrumb.d.ts +9 -9
- package/dist/components/breadcrumb.js +19 -83
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button.cjs +169 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +20 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +105 -21
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar-rac.cjs +85 -0
- package/dist/components/calendar-rac.cjs.map +1 -0
- package/dist/components/calendar-rac.d.cts +13 -0
- package/dist/components/calendar-rac.d.ts +3 -3
- package/dist/components/card.cjs +99 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +18 -0
- package/dist/components/card.d.ts +7 -8
- package/dist/components/card.js +23 -8
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +18 -0
- package/dist/components/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group.d.cts +7 -0
- package/dist/components/checkbox-group.d.ts +2 -2
- package/dist/components/checkbox.cjs +121 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +8 -0
- package/dist/components/checkbox.d.ts +3 -3
- package/dist/components/checkbox.js +73 -41
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/collapsible.cjs +127 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +44 -0
- package/dist/components/collapsible.d.ts +8 -18
- package/dist/components/collapsible.js +7 -27
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/combobox.cjs +551 -0
- package/dist/components/combobox.cjs.map +1 -0
- package/dist/components/combobox.d.cts +43 -0
- package/dist/components/combobox.d.ts +17 -18
- package/dist/components/combobox.js +37 -48
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.cjs +236 -0
- package/dist/components/command.cjs.map +1 -0
- package/dist/components/command.d.cts +23 -0
- package/dist/components/command.d.ts +14 -15
- package/dist/components/command.js +5 -38
- package/dist/components/command.js.map +1 -1
- package/dist/components/dialog.cjs +431 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +30 -0
- package/dist/components/dialog.d.ts +13 -18
- package/dist/components/dialog.js +75 -119
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dock.cjs +121 -0
- package/dist/components/dock.cjs.map +1 -0
- package/dist/components/dock.d.cts +30 -0
- package/dist/components/dock.d.ts +1 -2
- package/dist/components/dock.js +7 -5
- package/dist/components/dock.js.map +1 -1
- package/dist/components/drawer.cjs +149 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +15 -0
- package/dist/components/drawer.d.ts +10 -11
- package/dist/components/drawer.js +11 -40
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.cjs +292 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +52 -0
- package/dist/components/dropdown-menu.d.ts +23 -21
- package/dist/components/dropdown-menu.js +67 -191
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.cjs +106 -0
- package/dist/components/empty.cjs.map +1 -0
- package/dist/components/empty.d.cts +15 -0
- package/dist/components/empty.d.ts +15 -0
- package/dist/components/empty.js +99 -0
- package/dist/components/empty.js.map +1 -0
- package/dist/components/field.cjs +295 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +46 -0
- package/dist/components/field.d.ts +34 -39
- package/dist/components/field.js +220 -72
- package/dist/components/field.js.map +1 -1
- package/dist/components/flickering-grid.cjs +176 -0
- package/dist/components/flickering-grid.cjs.map +1 -0
- package/dist/components/flickering-grid.d.cts +15 -0
- package/dist/components/flickering-grid.js +25 -2
- package/dist/components/flickering-grid.js.map +1 -1
- package/dist/components/flow-zoom-panel.cjs +194 -0
- package/dist/components/flow-zoom-panel.cjs.map +1 -0
- package/dist/components/flow-zoom-panel.d.cts +12 -0
- package/dist/components/flow-zoom-panel.d.ts +12 -0
- package/dist/components/flow-zoom-panel.js +173 -0
- package/dist/components/flow-zoom-panel.js.map +1 -0
- package/dist/components/form-control.cjs +193 -0
- package/dist/components/form-control.cjs.map +1 -0
- package/dist/components/form-control.d.cts +14 -0
- package/dist/components/form-control.d.ts +1 -2
- package/dist/components/form-control.js +2 -4
- package/dist/components/form-control.js.map +1 -1
- package/dist/components/form.cjs +208 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +36 -0
- package/dist/components/form.d.ts +7 -8
- package/dist/components/input-group.cjs +184 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +17 -0
- package/dist/components/input-group.d.ts +6 -7
- package/dist/components/input-group.js +3 -2
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input.cjs +62 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +10 -0
- package/dist/components/input.d.ts +1 -2
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/json-input.cjs +351 -0
- package/dist/components/json-input.cjs.map +1 -0
- package/dist/components/json-input.d.cts +25 -0
- package/dist/components/json-input.d.ts +3 -3
- package/dist/components/json-input.js +89 -112
- package/dist/components/json-input.js.map +1 -1
- package/dist/components/label.cjs +29 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +10 -0
- package/dist/components/label.d.ts +1 -2
- package/dist/components/motion-grid.cjs +108 -0
- package/dist/components/motion-grid.cjs.map +1 -0
- package/dist/components/motion-grid.d.cts +19 -0
- package/dist/components/motion-grid.d.ts +1 -2
- package/dist/components/motion-grid.js +9 -4
- package/dist/components/motion-grid.js.map +1 -1
- package/dist/components/multi-select.cjs +796 -0
- package/dist/components/multi-select.cjs.map +1 -0
- package/dist/components/multi-select.d.cts +198 -0
- package/dist/components/multi-select.js +54 -162
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/page-header.cjs +19 -0
- package/dist/components/page-header.cjs.map +1 -0
- package/dist/components/page-header.d.cts +17 -0
- package/dist/components/page-header.d.ts +2 -2
- package/dist/components/pagination.cjs +295 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.d.cts +18 -0
- package/dist/components/pagination.d.ts +7 -8
- package/dist/components/pagination.js +152 -29
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/popover.cjs +140 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +39 -0
- package/dist/components/popover.d.ts +13 -9
- package/dist/components/popover.js +56 -132
- package/dist/components/popover.js.map +1 -1
- package/dist/components/portal.cjs +109 -0
- package/dist/components/portal.cjs.map +1 -0
- package/dist/components/portal.d.cts +117 -0
- package/dist/components/portal.d.ts +16 -7
- package/dist/components/portal.js +13 -8
- package/dist/components/portal.js.map +1 -1
- package/dist/components/progress.cjs +31 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +9 -0
- package/dist/components/progress.d.ts +1 -2
- package/dist/components/progress.js +1 -2
- package/dist/components/progress.js.map +1 -1
- package/dist/components/progressive-blur-scroll-container.cjs +144 -0
- package/dist/components/progressive-blur-scroll-container.cjs.map +1 -0
- package/dist/components/progressive-blur-scroll-container.d.cts +25 -0
- package/dist/components/progressive-blur-scroll-container.d.ts +2 -2
- package/dist/components/progressive-blur.cjs +70 -0
- package/dist/components/progressive-blur.cjs.map +1 -0
- package/dist/components/progressive-blur.d.cts +16 -0
- package/dist/components/progressive-blur.d.ts +2 -2
- package/dist/components/radio-group.cjs +52 -0
- package/dist/components/radio-group.cjs.map +1 -0
- package/dist/components/radio-group.d.cts +10 -0
- package/dist/components/radio-group.d.ts +3 -3
- package/dist/components/radio-group.js +21 -10
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/record-picker.cjs +420 -0
- package/dist/components/record-picker.cjs.map +1 -0
- package/dist/components/record-picker.d.cts +16 -0
- package/dist/components/record-picker.d.ts +2 -2
- package/dist/components/record-picker.js +76 -43
- package/dist/components/record-picker.js.map +1 -1
- package/dist/components/resizable.cjs +76 -0
- package/dist/components/resizable.cjs.map +1 -0
- package/dist/components/resizable.d.cts +10 -0
- package/dist/components/resizable.d.ts +3 -4
- package/dist/components/responsive-diagram.cjs +67 -0
- package/dist/components/responsive-diagram.cjs.map +1 -0
- package/dist/components/responsive-diagram.d.cts +10 -0
- package/dist/components/responsive-diagram.d.ts +2 -2
- package/dist/components/scroll-area.cjs +92 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +11 -0
- package/dist/components/scroll-area.d.ts +5 -6
- package/dist/components/select.cjs +329 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +46 -0
- package/dist/components/select.d.ts +13 -14
- package/dist/components/select.js +76 -67
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +26 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +10 -0
- package/dist/components/separator.d.ts +1 -2
- package/dist/components/sheet.cjs +489 -0
- package/dist/components/sheet.cjs.map +1 -0
- package/dist/components/sheet.d.cts +107 -0
- package/dist/components/sheet.d.ts +14 -19
- package/dist/components/sheet.js +119 -264
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.cjs +1300 -0
- package/dist/components/sidebar.cjs.map +1 -0
- package/dist/components/sidebar.d.cts +70 -0
- package/dist/components/sidebar.d.ts +32 -39
- package/dist/components/sidebar.js +401 -362
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.cjs +36 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +10 -0
- package/dist/components/skeleton.d.ts +5 -2
- package/dist/components/skeleton.js +19 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/sonner.cjs +25 -0
- package/dist/components/sonner.cjs.map +1 -0
- package/dist/components/sonner.d.cts +10 -0
- package/dist/components/sonner.d.ts +2 -2
- package/dist/components/stack/index.cjs +1516 -0
- package/dist/components/stack/index.cjs.map +1 -0
- package/dist/components/stack/index.d.cts +672 -0
- package/dist/components/stack/index.d.ts +36 -38
- package/dist/components/stack/index.js +42 -31
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/stepper.cjs +314 -0
- package/dist/components/stepper.cjs.map +1 -0
- package/dist/components/stepper.d.cts +31 -0
- package/dist/components/stepper.d.ts +9 -8
- package/dist/components/stepper.js +22 -15
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch.cjs +46 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +7 -0
- package/dist/components/switch.d.ts +1 -2
- package/dist/components/switch.js +9 -5
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.cjs +133 -0
- package/dist/components/table.cjs.map +1 -0
- package/dist/components/table.d.cts +22 -0
- package/dist/components/table.d.ts +19 -12
- package/dist/components/table.js +72 -13
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.cjs +53 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +9 -0
- package/dist/components/tabs.d.ts +4 -5
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/tags.cjs +451 -0
- package/dist/components/tags.cjs.map +1 -0
- package/dist/components/tags.d.cts +40 -0
- package/dist/components/tags.d.ts +10 -10
- package/dist/components/tags.js +129 -154
- package/dist/components/tags.js.map +1 -1
- package/dist/components/textarea.cjs +56 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +9 -0
- package/dist/components/textarea.d.ts +1 -2
- package/dist/components/toast/index.cjs +612 -0
- package/dist/components/toast/index.cjs.map +1 -0
- package/dist/components/toast/index.d.cts +52 -0
- package/dist/components/toast/index.js +90 -127
- package/dist/components/toast/index.js.map +1 -1
- package/dist/components/tooltip.cjs +92 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +28 -0
- package/dist/components/tooltip.d.ts +5 -6
- package/dist/components/tooltip.js +23 -130
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/unlink-button.cjs +197 -0
- package/dist/components/unlink-button.cjs.map +1 -0
- package/dist/components/unlink-button.d.cts +14 -0
- package/dist/components/unlink-button.d.ts +2 -2
- package/dist/components/unlink-button.js +105 -21
- package/dist/components/unlink-button.js.map +1 -1
- package/dist/index.cjs +2040 -1577
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +492 -509
- package/dist/index.d.ts +492 -509
- package/dist/index.js +1862 -1443
- package/dist/index.js.map +1 -1
- package/package.json +286 -45
- package/src/styles/globals.css +155 -203
- package/dist/components/org-chart/index.d.ts +0 -54
- package/dist/components/org-chart/index.js +0 -861
- package/dist/components/org-chart/index.js.map +0 -1
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var dialog = require('@base-ui/react/dialog');
|
|
6
|
+
var lucideReact = require('lucide-react');
|
|
7
|
+
var portal = require('@constructive-io/ui/portal');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var tailwindMerge = require('tailwind-merge');
|
|
10
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
var scrollArea = require('@base-ui/react/scroll-area');
|
|
13
|
+
|
|
14
|
+
function _interopNamespace(e) {
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
16
|
+
var n = Object.create(null);
|
|
17
|
+
if (e) {
|
|
18
|
+
Object.keys(e).forEach(function (k) {
|
|
19
|
+
if (k !== 'default') {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return e[k]; }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
n.default = e;
|
|
29
|
+
return Object.freeze(n);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
+
|
|
34
|
+
function cn(...inputs) {
|
|
35
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
36
|
+
}
|
|
37
|
+
function composeRefs(...refs) {
|
|
38
|
+
return (node) => {
|
|
39
|
+
refs.forEach((ref) => {
|
|
40
|
+
if (typeof ref === "function") {
|
|
41
|
+
ref(node);
|
|
42
|
+
} else if (ref != null) {
|
|
43
|
+
ref.current = node;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function mergeProps(slotProps, childProps) {
|
|
49
|
+
const overrideProps = { ...childProps };
|
|
50
|
+
for (const propName in childProps) {
|
|
51
|
+
if (propName === "ref") continue;
|
|
52
|
+
const slotPropValue = slotProps[propName];
|
|
53
|
+
const childPropValue = childProps[propName];
|
|
54
|
+
if (/^on[A-Z]/.test(propName) && typeof slotPropValue === "function" && typeof childPropValue === "function") {
|
|
55
|
+
overrideProps[propName] = (...args) => {
|
|
56
|
+
childPropValue(...args);
|
|
57
|
+
slotPropValue(...args);
|
|
58
|
+
};
|
|
59
|
+
} else if (propName === "className" && typeof slotPropValue === "string" && typeof childPropValue === "string") {
|
|
60
|
+
overrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();
|
|
61
|
+
} else if (propName === "style" && typeof slotPropValue === "object" && typeof childPropValue === "object") {
|
|
62
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { ...slotProps, ...overrideProps };
|
|
66
|
+
}
|
|
67
|
+
function isSlottable(child) {
|
|
68
|
+
return React__namespace.isValidElement(child);
|
|
69
|
+
}
|
|
70
|
+
var Slot = React__namespace.forwardRef((props, forwardedRef) => {
|
|
71
|
+
const { children, ...slotProps } = props;
|
|
72
|
+
if (isSlottable(children)) {
|
|
73
|
+
const childProps = children.props;
|
|
74
|
+
const childRef = childProps.ref;
|
|
75
|
+
return React__namespace.cloneElement(children, {
|
|
76
|
+
...mergeProps(slotProps, childProps),
|
|
77
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
if (React__namespace.Children.count(children) > 1) {
|
|
81
|
+
const childrenArray = React__namespace.Children.toArray(children);
|
|
82
|
+
const slottableChild = childrenArray.find(
|
|
83
|
+
(child) => React__namespace.isValidElement(child) && child.type === Slottable
|
|
84
|
+
);
|
|
85
|
+
if (slottableChild) {
|
|
86
|
+
const newElement = slottableChild.props.children;
|
|
87
|
+
if (isSlottable(newElement)) {
|
|
88
|
+
const newElementProps = newElement.props;
|
|
89
|
+
const newChildren = childrenArray.map((child) => {
|
|
90
|
+
if (child === slottableChild) {
|
|
91
|
+
return React__namespace.Children.count(newElementProps.children) > 1 ? React__namespace.Children.only(null) : newElementProps.children;
|
|
92
|
+
}
|
|
93
|
+
return child;
|
|
94
|
+
});
|
|
95
|
+
const childRef = newElementProps.ref;
|
|
96
|
+
return React__namespace.cloneElement(newElement, {
|
|
97
|
+
...mergeProps(slotProps, newElementProps),
|
|
98
|
+
ref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,
|
|
99
|
+
children: newChildren
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
105
|
+
});
|
|
106
|
+
Slot.displayName = "Slot";
|
|
107
|
+
function Slottable({ children }) {
|
|
108
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
109
|
+
}
|
|
110
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
111
|
+
"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
112
|
+
{
|
|
113
|
+
defaultVariants: {
|
|
114
|
+
size: "default",
|
|
115
|
+
static: false,
|
|
116
|
+
variant: "default"
|
|
117
|
+
},
|
|
118
|
+
variants: {
|
|
119
|
+
static: {
|
|
120
|
+
false: "motion-safe:active:not-disabled:scale-[0.96]",
|
|
121
|
+
true: null
|
|
122
|
+
},
|
|
123
|
+
size: {
|
|
124
|
+
default: "h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
125
|
+
icon: "size-10 pointer-coarse:size-11",
|
|
126
|
+
"icon-lg": "size-11",
|
|
127
|
+
"icon-sm": "size-8 pointer-coarse:size-11",
|
|
128
|
+
"icon-xl": 'size-11 [&_svg:not([class*="size-"])]:size-5',
|
|
129
|
+
"icon-xs": 'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*="size-"])]:size-4',
|
|
130
|
+
lg: "h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]",
|
|
131
|
+
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11",
|
|
132
|
+
xl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*="size-"])]:size-5',
|
|
133
|
+
xs: 'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*="size-"])]:size-3.5'
|
|
134
|
+
},
|
|
135
|
+
variant: {
|
|
136
|
+
default: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
137
|
+
destructive: "not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none",
|
|
138
|
+
"destructive-outline": "border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8",
|
|
139
|
+
ghost: "border-transparent hover:bg-accent data-pressed:bg-accent",
|
|
140
|
+
link: "border-transparent underline-offset-4 hover:underline",
|
|
141
|
+
outline: "border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64",
|
|
142
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
var Button = React__namespace.forwardRef(
|
|
148
|
+
({ className, variant, size, static: isStatic, asChild, children, type = "button", ...props }, ref) => {
|
|
149
|
+
const buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));
|
|
150
|
+
const Comp = asChild ? Slot : "button";
|
|
151
|
+
if (asChild) {
|
|
152
|
+
const SlottedComp = Comp;
|
|
153
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
154
|
+
SlottedComp,
|
|
155
|
+
{
|
|
156
|
+
ref,
|
|
157
|
+
className: buttonClasses,
|
|
158
|
+
"data-slot": "button",
|
|
159
|
+
...props,
|
|
160
|
+
children
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
return /* @__PURE__ */ jsxRuntime.jsx("button", { ref, type, className: buttonClasses, "data-slot": "button", ...props, children });
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
Button.displayName = "Button";
|
|
168
|
+
var ScrollArea = React__namespace.forwardRef(
|
|
169
|
+
({ className, children, scrollFade = false, scrollbarGutter = false, ...props }, ref) => {
|
|
170
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
171
|
+
scrollArea.ScrollArea.Root,
|
|
172
|
+
{
|
|
173
|
+
ref,
|
|
174
|
+
className: cn("size-full min-h-0", className),
|
|
175
|
+
...props,
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
178
|
+
scrollArea.ScrollArea.Viewport,
|
|
179
|
+
{
|
|
180
|
+
className: cn(
|
|
181
|
+
"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
|
|
182
|
+
scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
|
|
183
|
+
scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"
|
|
184
|
+
),
|
|
185
|
+
"data-slot": "scroll-area-viewport",
|
|
186
|
+
children
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation: "vertical" }),
|
|
190
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, { orientation: "horizontal" }),
|
|
191
|
+
/* @__PURE__ */ jsxRuntime.jsx(scrollArea.ScrollArea.Corner, { "data-slot": "scroll-area-corner" })
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
ScrollArea.displayName = "ScrollArea";
|
|
198
|
+
function ScrollBar({
|
|
199
|
+
className,
|
|
200
|
+
orientation = "vertical",
|
|
201
|
+
...props
|
|
202
|
+
}) {
|
|
203
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
204
|
+
scrollArea.ScrollArea.Scrollbar,
|
|
205
|
+
{
|
|
206
|
+
className: cn(
|
|
207
|
+
"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
"data-slot": "scroll-area-scrollbar",
|
|
211
|
+
orientation,
|
|
212
|
+
...props,
|
|
213
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
scrollArea.ScrollArea.Thumb,
|
|
215
|
+
{
|
|
216
|
+
className: "relative flex-1 rounded-full bg-foreground/20",
|
|
217
|
+
"data-slot": "scroll-area-thumb"
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
var Dialog = dialog.Dialog.Root;
|
|
224
|
+
function DialogPortal({ container: containerProp, ...props }) {
|
|
225
|
+
const rootContainer = portal.useRootPortalContainer();
|
|
226
|
+
const container = containerProp === void 0 ? rootContainer ?? void 0 : containerProp;
|
|
227
|
+
const style = {
|
|
228
|
+
...props.style ?? {},
|
|
229
|
+
// Ensure floating overlays inside dialogs (select/menu/popover/tooltip) stack above the dialog.
|
|
230
|
+
// Nested Base UI portals inherit this var via Base UI portal nesting.
|
|
231
|
+
["--z-layer-floating"]: "var(--z-layer-floating-elevated)"
|
|
232
|
+
};
|
|
233
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, { container, ...props, style });
|
|
234
|
+
}
|
|
235
|
+
function DialogTrigger({ asChild, children, render, nativeButton, ...props }) {
|
|
236
|
+
const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
|
|
237
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
+
dialog.Dialog.Trigger,
|
|
239
|
+
{
|
|
240
|
+
"data-slot": "dialog-trigger",
|
|
241
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
242
|
+
render: render ?? childRender,
|
|
243
|
+
...props,
|
|
244
|
+
children: childRender ? void 0 : children
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
function DialogClose({ asChild, children, render, nativeButton, ...props }) {
|
|
249
|
+
const childRender = render === void 0 && asChild && React__namespace.isValidElement(children) ? children : void 0;
|
|
250
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
251
|
+
dialog.Dialog.Close,
|
|
252
|
+
{
|
|
253
|
+
"data-slot": "dialog-close",
|
|
254
|
+
nativeButton: nativeButton ?? (childRender ? true : void 0),
|
|
255
|
+
render: render ?? childRender,
|
|
256
|
+
...props,
|
|
257
|
+
children: childRender ? void 0 : children
|
|
258
|
+
}
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
function DialogBackdrop({
|
|
262
|
+
className,
|
|
263
|
+
...props
|
|
264
|
+
}) {
|
|
265
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
266
|
+
dialog.Dialog.Backdrop,
|
|
267
|
+
{
|
|
268
|
+
className: cn(
|
|
269
|
+
"fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/32 backdrop-blur-sm transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0",
|
|
270
|
+
className
|
|
271
|
+
),
|
|
272
|
+
"data-slot": "dialog-backdrop",
|
|
273
|
+
...props
|
|
274
|
+
}
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
function DialogViewport({
|
|
278
|
+
className,
|
|
279
|
+
...props
|
|
280
|
+
}) {
|
|
281
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
282
|
+
dialog.Dialog.Viewport,
|
|
283
|
+
{
|
|
284
|
+
className: cn(
|
|
285
|
+
"fixed inset-0 z-[var(--z-layer-modal-content)] grid grid-rows-[1fr_auto_3fr] justify-items-center p-4",
|
|
286
|
+
className
|
|
287
|
+
),
|
|
288
|
+
"data-slot": "dialog-viewport",
|
|
289
|
+
...props
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
function DialogPopup({
|
|
294
|
+
className,
|
|
295
|
+
children,
|
|
296
|
+
showCloseButton = true,
|
|
297
|
+
bottomStickOnMobile = true,
|
|
298
|
+
...props
|
|
299
|
+
}) {
|
|
300
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
301
|
+
/* @__PURE__ */ jsxRuntime.jsx(DialogBackdrop, {}),
|
|
302
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
303
|
+
DialogViewport,
|
|
304
|
+
{
|
|
305
|
+
className: cn(
|
|
306
|
+
bottomStickOnMobile && "max-sm:grid-rows-[1fr_auto] max-sm:pt-12"
|
|
307
|
+
),
|
|
308
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
309
|
+
dialog.Dialog.Popup,
|
|
310
|
+
{
|
|
311
|
+
className: cn(
|
|
312
|
+
"-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-lg scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border bg-popover bg-clip-padding text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
|
|
313
|
+
bottomStickOnMobile && "max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 max-sm:before:hidden max-sm:before:rounded-none",
|
|
314
|
+
className
|
|
315
|
+
),
|
|
316
|
+
"data-slot": "dialog-popup",
|
|
317
|
+
...props,
|
|
318
|
+
children: [
|
|
319
|
+
/* @__PURE__ */ jsxRuntime.jsx(portal.ModalPortalScope, { children }),
|
|
320
|
+
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
|
|
321
|
+
dialog.Dialog.Close,
|
|
322
|
+
{
|
|
323
|
+
"aria-label": "Close",
|
|
324
|
+
nativeButton: true,
|
|
325
|
+
render: (closeProps) => {
|
|
326
|
+
const { nativeButton: _, ...rest } = closeProps;
|
|
327
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
328
|
+
Button,
|
|
329
|
+
{
|
|
330
|
+
...rest,
|
|
331
|
+
className: "absolute end-2 top-2",
|
|
332
|
+
size: "icon",
|
|
333
|
+
variant: "ghost",
|
|
334
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {})
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
)
|
|
343
|
+
}
|
|
344
|
+
)
|
|
345
|
+
] });
|
|
346
|
+
}
|
|
347
|
+
function DialogHeader({ className, ...props }) {
|
|
348
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
className: cn(
|
|
352
|
+
"flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4",
|
|
353
|
+
className
|
|
354
|
+
),
|
|
355
|
+
"data-slot": "dialog-header",
|
|
356
|
+
...props
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
function DialogFooter({
|
|
361
|
+
className,
|
|
362
|
+
variant = "default",
|
|
363
|
+
...props
|
|
364
|
+
}) {
|
|
365
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
className: cn(
|
|
369
|
+
"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]",
|
|
370
|
+
variant === "default" && "border-t bg-muted/50 py-4",
|
|
371
|
+
variant === "bare" && "in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6",
|
|
372
|
+
className
|
|
373
|
+
),
|
|
374
|
+
"data-slot": "dialog-footer",
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
function DialogTitle({ className, ...props }) {
|
|
380
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
381
|
+
dialog.Dialog.Title,
|
|
382
|
+
{
|
|
383
|
+
className: cn("font-heading text-xl leading-none", className),
|
|
384
|
+
"data-slot": "dialog-title",
|
|
385
|
+
...props
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
function DialogDescription({
|
|
390
|
+
className,
|
|
391
|
+
...props
|
|
392
|
+
}) {
|
|
393
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
394
|
+
dialog.Dialog.Description,
|
|
395
|
+
{
|
|
396
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
397
|
+
"data-slot": "dialog-description",
|
|
398
|
+
...props
|
|
399
|
+
}
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
function DialogPanel({ className, ...props }) {
|
|
403
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
404
|
+
"div",
|
|
405
|
+
{
|
|
406
|
+
className: cn(
|
|
407
|
+
"px-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-header]))]:pt-6 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer]))]:pb-6! in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer].border-t))]:pb-1 pb-6",
|
|
408
|
+
className
|
|
409
|
+
),
|
|
410
|
+
"data-slot": "dialog-panel",
|
|
411
|
+
...props
|
|
412
|
+
}
|
|
413
|
+
) });
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
exports.Dialog = Dialog;
|
|
417
|
+
exports.DialogBackdrop = DialogBackdrop;
|
|
418
|
+
exports.DialogClose = DialogClose;
|
|
419
|
+
exports.DialogContent = DialogPopup;
|
|
420
|
+
exports.DialogDescription = DialogDescription;
|
|
421
|
+
exports.DialogFooter = DialogFooter;
|
|
422
|
+
exports.DialogHeader = DialogHeader;
|
|
423
|
+
exports.DialogOverlay = DialogBackdrop;
|
|
424
|
+
exports.DialogPanel = DialogPanel;
|
|
425
|
+
exports.DialogPopup = DialogPopup;
|
|
426
|
+
exports.DialogPortal = DialogPortal;
|
|
427
|
+
exports.DialogTitle = DialogTitle;
|
|
428
|
+
exports.DialogTrigger = DialogTrigger;
|
|
429
|
+
exports.DialogViewport = DialogViewport;
|
|
430
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
431
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/utils.ts","../../src/lib/slot.tsx","../../src/components/button.tsx","../../src/components/scroll-area.tsx","../../src/components/dialog.tsx"],"names":["twMerge","clsx","React","cva","React2","jsx","React3","jsxs","ScrollAreaPrimitive","DialogPrimitive","useRootPortalContainer","React4","ModalPortalScope","XIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,MAAM,MAAA,EAAsB;AAC1C,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACGA,SAAS,eAAkB,IAAA,EAA0D;AACpF,EAAA,OAAO,CAAC,IAAA,KAAS;AAChB,IAAA,IAAA,CAAK,OAAA,CAAQ,CAAC,GAAA,KAAQ;AACrB,MAAA,IAAI,OAAO,QAAQ,UAAA,EAAY;AAC9B,QAAA,GAAA,CAAI,IAAI,CAAA;AAAA,MACT,CAAA,MAAA,IAAW,OAAO,IAAA,EAAM;AACvB,QAAC,IAAyC,OAAA,GAAU,IAAA;AAAA,MACrD;AAAA,IACD,CAAC,CAAA;AAAA,EACF,CAAA;AACD;AAMA,SAAS,UAAA,CACR,WACA,UAAA,EAC0B;AAC1B,EAAA,MAAM,aAAA,GAAyC,EAAE,GAAG,UAAA,EAAW;AAE/D,EAAA,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AAAA,MACA,WAAA,EAAU,eAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACEA,cAAAA;AAAA,IAACI,aAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,mCAAA,EAAqC,SAAS,CAAA;AAAA,MAC5D,WAAA,EAAU,cAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB;AAAA,EACzB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAsC;AACpC,EAAA,uBACEJ,cAAAA;AAAA,IAACI,aAAA,CAAgB,WAAA;AAAA,IAAhB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,+BAAA,EAAiC,SAAS,CAAA;AAAA,MACxD,WAAA,EAAU,oBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACEJ,cAAAA,CAAC,UAAA,EAAA,EACC,QAAA,kBAAAA,cAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,+SAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,WAAA,EAAU,cAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ","file":"dialog.cjs","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as React from 'react';\n\n/**\n * Merges refs into a single callback ref.\n * React 19 compatible - handles refs as regular props.\n */\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T> {\n\treturn (node) => {\n\t\trefs.forEach((ref) => {\n\t\t\tif (typeof ref === 'function') {\n\t\t\t\tref(node);\n\t\t\t} else if (ref != null) {\n\t\t\t\t(ref as React.MutableRefObject<T | null>).current = node;\n\t\t\t}\n\t\t});\n\t};\n}\n\n/**\n * Merges props, handling special cases for className, style, and event handlers.\n * Excludes 'ref' from merging as it's handled separately.\n */\nfunction mergeProps(\n\tslotProps: Record<string, unknown>,\n\tchildProps: Record<string, unknown>,\n): Record<string, unknown> {\n\tconst overrideProps: Record<string, unknown> = { ...childProps };\n\n\tfor (const propName in childProps) {\n\t\t// Skip ref - handled separately for composition\n\t\tif (propName === 'ref') continue;\n\n\t\tconst slotPropValue = slotProps[propName];\n\t\tconst childPropValue = childProps[propName];\n\n\t\t// Compose event handlers\n\t\tif (/^on[A-Z]/.test(propName) && typeof slotPropValue === 'function' && typeof childPropValue === 'function') {\n\t\t\toverrideProps[propName] = (...args: unknown[]) => {\n\t\t\t\tchildPropValue(...args);\n\t\t\t\tslotPropValue(...args);\n\t\t\t};\n\t\t}\n\t\t// Merge className\n\t\telse if (propName === 'className' && typeof slotPropValue === 'string' && typeof childPropValue === 'string') {\n\t\t\toverrideProps[propName] = `${slotPropValue} ${childPropValue}`.trim();\n\t\t}\n\t\t// Merge style\n\t\telse if (propName === 'style' && typeof slotPropValue === 'object' && typeof childPropValue === 'object') {\n\t\t\toverrideProps[propName] = { ...slotPropValue, ...childPropValue };\n\t\t}\n\t}\n\n\treturn { ...slotProps, ...overrideProps };\n}\n\n/**\n * Merges props from a parent component with a child element's props,\n * including proper ref composition. Use this in render prop patterns\n * where the parent needs to merge its props with the child's.\n *\n * @param parentProps - Props from the parent component (e.g., triggerProps from Base UI)\n * @param childElement - The child React element whose props will be merged\n * @returns Merged props object ready to pass to React.cloneElement\n */\nfunction mergePropsWithRef<T = HTMLElement>(\n\tparentProps: Record<string, unknown>,\n\tchildElement: React.ReactElement,\n): Record<string, unknown> {\n\tconst childProps = childElement.props as Record<string, unknown>;\n\tconst parentRef = parentProps.ref as React.Ref<T> | undefined;\n\tconst childRef = childProps.ref as React.Ref<T> | undefined;\n\n\tconst mergedProps = mergeProps(parentProps, childProps);\n\n\t// Compose refs if either exists\n\tif (parentRef || childRef) {\n\t\tmergedProps.ref = composeRefs(parentRef, childRef);\n\t}\n\n\treturn mergedProps;\n}\n\n/**\n * Check if a value is a valid slottable child (single React element).\n */\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n\treturn React.isValidElement(child);\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n\tchildren?: React.ReactNode;\n}\n\n/**\n * Slot component - renders its child element with merged props.\n * Used for the `asChild` pattern where parent props are passed to child.\n * React 19 compatible - accesses ref from props instead of element.ref.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n\tconst { children, ...slotProps } = props;\n\n\t// Handle single child\n\tif (isSlottable(children)) {\n\t\tconst childProps = children.props as Record<string, unknown>;\n\t\t// React 19: ref is now a regular prop, not element.ref\n\t\tconst childRef = childProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...mergeProps(slotProps, childProps),\n\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t} as React.Attributes);\n\t}\n\n\t// Handle multiple children - wrap Slottable content\n\tif (React.Children.count(children) > 1) {\n\t\tconst childrenArray = React.Children.toArray(children);\n\t\tconst slottableChild = childrenArray.find(\n\t\t\t(child) => React.isValidElement(child) && child.type === Slottable,\n\t\t) as React.ReactElement<{ children: React.ReactNode }> | undefined;\n\n\t\tif (slottableChild) {\n\t\t\tconst newElement = slottableChild.props.children;\n\t\t\tif (isSlottable(newElement)) {\n\t\t\t\tconst newElementProps = newElement.props as Record<string, unknown> & { children?: React.ReactNode };\n\t\t\t\tconst newChildren = childrenArray.map((child) => {\n\t\t\t\t\tif (child === slottableChild) {\n\t\t\t\t\t\treturn React.Children.count(newElementProps.children) > 1\n\t\t\t\t\t\t\t? React.Children.only(null)\n\t\t\t\t\t\t\t: newElementProps.children;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t});\n\n\t\t\t\t// React 19: ref is now a regular prop\n\t\t\t\tconst childRef = newElementProps.ref as React.Ref<HTMLElement> | undefined;\n\n\t\t\t\treturn React.cloneElement(newElement, {\n\t\t\t\t\t...mergeProps(slotProps, newElementProps),\n\t\t\t\t\tref: forwardedRef ? composeRefs(forwardedRef, childRef) : childRef,\n\t\t\t\t\tchildren: newChildren,\n\t\t\t\t} as React.Attributes);\n\t\t\t}\n\t\t}\n\t}\n\n\t// Fallback: render children as-is (shouldn't normally happen with proper usage)\n\treturn <>{children}</>;\n});\n\nSlot.displayName = 'Slot';\n\n/**\n * Slottable component - marks content that should receive slot props.\n * Used when Slot has multiple children and you want to specify which one receives props.\n */\nfunction Slottable({ children }: { children: React.ReactNode }) {\n\treturn <>{children}</>;\n}\n\nexport { Slot, Slottable, composeRefs, mergeProps, mergePropsWithRef };\n","import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { Slot } from '../lib/slot';\nimport { cn } from '../lib/utils';\n\nconst buttonVariants = cva(\n\t\"[&_svg]:-mx-0.5 relative inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg border font-medium text-sm outline-none transition-[box-shadow,scale] duration-150 ease-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-64 motion-reduce:transition-shadow [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: 'default',\n\t\t\tstatic: false,\n\t\t\tvariant: 'default',\n\t\t},\n\t\tvariants: {\n\t\t\tstatic: {\n\t\t\t\tfalse: 'motion-safe:active:not-disabled:scale-[0.96]',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: 'h-10 min-w-10 px-[calc(--spacing(3)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\ticon: 'size-10 pointer-coarse:size-11',\n\t\t\t\t'icon-lg': 'size-11',\n\t\t\t\t'icon-sm': 'size-8 pointer-coarse:size-11',\n\t\t\t\t'icon-xl': 'size-11 [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\t'icon-xs':\n\t\t\t\t\t'size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:size-11 not-in-data-[slot=input-group]:[&_svg:not([class*=\"size-\"])]:size-4',\n\t\t\t\tlg: 'h-11 min-w-11 px-[calc(--spacing(3.5)-1px)]',\n\t\t\t\tsm:\n\t\t\t\t\t'h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11',\n\t\t\t\txl: 'h-12 min-w-12 px-[calc(--spacing(4)-1px)] text-lg [&_svg:not([class*=\"size-\"])]:size-5',\n\t\t\t\txs:\n\t\t\t\t\t'h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-xs before:rounded-[calc(var(--radius-md)-1px)] pointer-coarse:min-h-11 pointer-coarse:min-w-11 [&_svg:not([class*=\"size-\"])]:size-3.5',\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-primary bg-primary text-primary-foreground shadow-primary/24 shadow-xs hover:bg-primary/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\tdestructive:\n\t\t\t\t\t'not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] border-destructive bg-destructive text-white shadow-destructive/24 shadow-xs hover:bg-destructive/90 [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none',\n\t\t\t\t'destructive-outline':\n\t\t\t\t\t'border-destructive/40 bg-transparent bg-clip-padding text-destructive shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:border-destructive/60 [:hover,[data-pressed]]:bg-destructive/8',\n\t\t\t\tghost: 'border-transparent hover:bg-accent data-pressed:bg-accent',\n\t\t\t\tlink: 'border-transparent underline-offset-4 hover:underline',\n\t\t\t\toutline:\n\t\t\t\t\t'border-border bg-background bg-clip-padding shadow-xs not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/4%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/8%)] [:disabled,:active,[data-pressed]]:shadow-none [:hover,[data-pressed]]:bg-accent/50 dark:[:hover,[data-pressed]]:bg-input/64',\n\t\t\t\tsecondary:\n\t\t\t\t\t'border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/90 [:active,[data-pressed]]:bg-secondary/80',\n\t\t\t},\n\t\t},\n\t},\n);\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n\tvariant?: VariantProps<typeof buttonVariants>['variant'];\n\tsize?: VariantProps<typeof buttonVariants>['size'];\n\t/** Disables tactile press scaling when motion would distract from the interaction. */\n\tstatic?: boolean;\n\t/** When true, merges props onto the child element instead of rendering a button */\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, static: isStatic, asChild, children, type = 'button', ...props }, ref) => {\n\t\tconst buttonClasses = cn(buttonVariants({ className, size, static: isStatic, variant }));\n\t\tconst Comp = asChild ? Slot : 'button';\n\n\t\tif (asChild) {\n\t\t\tconst SlottedComp = Comp as typeof Slot;\n\t\t\treturn (\n\t\t\t\t<SlottedComp\n\t\t\t\t\tref={ref as React.Ref<HTMLElement>}\n\t\t\t\t\tclassName={buttonClasses}\n\t\t\t\t\tdata-slot=\"button\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SlottedComp>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button ref={ref} type={type} className={buttonClasses} data-slot=\"button\" {...props}>\n\t\t\t\t{children}\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"../lib/utils\";\n\ntype ScrollAreaProps = ScrollAreaPrimitive.Root.Props & {\n scrollFade?: boolean;\n scrollbarGutter?: boolean;\n};\n\nconst ScrollArea = React.forwardRef<HTMLDivElement, ScrollAreaProps>(\n (\n { className, children, scrollFade = false, scrollbarGutter = false, ...props },\n ref\n ) => {\n return (\n <ScrollAreaPrimitive.Root\n ref={ref}\n className={cn(\"size-full min-h-0\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n className={cn(\n \"h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n scrollFade &&\n \"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]\",\n scrollbarGutter &&\n \"data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5\",\n )}\n data-slot=\"scroll-area-viewport\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar orientation=\"vertical\" />\n <ScrollBar orientation=\"horizontal\" />\n <ScrollAreaPrimitive.Corner data-slot=\"scroll-area-corner\" />\n </ScrollAreaPrimitive.Root>\n );\n }\n);\nScrollArea.displayName = \"ScrollArea\";\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n className={cn(\n \"m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100\",\n className,\n )}\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n className=\"relative flex-1 rounded-full bg-foreground/20\"\n data-slot=\"scroll-area-thumb\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n","\"use client\";\n\nimport * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XIcon } from \"lucide-react\";\nimport { ModalPortalScope, useRootPortalContainer } from \"@constructive-io/ui/portal\";\nimport { cn } from \"../lib/utils\";\nimport { Button } from \"./button\";\nimport { ScrollArea } from \"./scroll-area\";\n\nconst Dialog = DialogPrimitive.Root;\n\nfunction DialogPortal({ container: containerProp, ...props }: DialogPrimitive.Portal.Props) {\n const rootContainer = useRootPortalContainer();\n const container = containerProp === undefined ? (rootContainer ?? undefined) : containerProp;\n\n const style = {\n ...(props.style ?? {}),\n // Ensure floating overlays inside dialogs (select/menu/popover/tooltip) stack above the dialog.\n // Nested Base UI portals inherit this var via Base UI portal nesting.\n ['--z-layer-floating' as any]: 'var(--z-layer-floating-elevated)',\n } satisfies React.CSSProperties;\n\n return <DialogPrimitive.Portal container={container} {...props} style={style} />;\n}\n\ntype DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger> & {\n /** When true, merges props onto the child element instead of rendering a button */\n asChild?: boolean;\n};\n\nfunction DialogTrigger({ asChild, children, render, nativeButton, ...props }: DialogTriggerProps) {\n const childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n return (\n <DialogPrimitive.Trigger\n data-slot=\"dialog-trigger\"\n nativeButton={nativeButton ?? (childRender ? true : undefined)}\n render={render ?? childRender}\n {...props}\n >\n {childRender ? undefined : children}\n </DialogPrimitive.Trigger>\n );\n}\n\ntype DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close> & {\n /** When true, merges props onto the child element instead of rendering a button */\n asChild?: boolean;\n};\n\nfunction DialogClose({ asChild, children, render, nativeButton, ...props }: DialogCloseProps) {\n const childRender = render === undefined && asChild && React.isValidElement(children) ? children : undefined;\n\n return (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n nativeButton={nativeButton ?? (childRender ? true : undefined)}\n render={render ?? childRender}\n {...props}\n >\n {childRender ? undefined : children}\n </DialogPrimitive.Close>\n );\n}\n\nfunction DialogBackdrop({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n className={cn(\n \"fixed inset-0 z-[var(--z-layer-modal-backdrop)] bg-black/32 backdrop-blur-sm transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0\",\n className,\n )}\n data-slot=\"dialog-backdrop\"\n {...props}\n />\n );\n}\n\nfunction DialogViewport({\n className,\n ...props\n}: DialogPrimitive.Viewport.Props) {\n return (\n <DialogPrimitive.Viewport\n className={cn(\n \"fixed inset-0 z-[var(--z-layer-modal-content)] grid grid-rows-[1fr_auto_3fr] justify-items-center p-4\",\n className,\n )}\n data-slot=\"dialog-viewport\"\n {...props}\n />\n );\n}\n\nfunction DialogPopup({\n className,\n children,\n showCloseButton = true,\n bottomStickOnMobile = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n bottomStickOnMobile?: boolean;\n}) {\n return (\n <DialogPortal>\n <DialogBackdrop />\n <DialogViewport\n className={cn(\n bottomStickOnMobile && \"max-sm:grid-rows-[1fr_auto] max-sm:pt-12\",\n )}\n >\n <DialogPrimitive.Popup\n className={cn(\n \"-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-lg scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-2xl border bg-popover bg-clip-padding text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-2xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0 dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]\",\n bottomStickOnMobile &&\n \"max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 max-sm:before:hidden max-sm:before:rounded-none\",\n className,\n )}\n data-slot=\"dialog-popup\"\n {...props}\n >\n {/* ModalPortalScope creates a scoped portal container for floating elements inside */}\n <ModalPortalScope>\n {children}\n </ModalPortalScope>\n {showCloseButton && (\n <DialogPrimitive.Close\n aria-label=\"Close\"\n nativeButton={true}\n render={(closeProps) => {\n const { nativeButton: _, ...rest } = closeProps as Record<string, unknown>;\n return (\n <Button\n {...rest}\n className=\"absolute end-2 top-2\"\n size=\"icon\"\n variant=\"ghost\"\n >\n <XIcon />\n </Button>\n );\n }}\n />\n )}\n </DialogPrimitive.Popup>\n </DialogViewport>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n className={cn(\n \"flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4\",\n className,\n )}\n data-slot=\"dialog-header\"\n {...props}\n />\n );\n}\n\nfunction DialogFooter({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & {\n variant?: \"default\" | \"bare\";\n}) {\n return (\n <div\n className={cn(\n \"flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]\",\n variant === \"default\" && \"border-t bg-muted/50 py-4\",\n variant === \"bare\" &&\n \"in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6\",\n className,\n )}\n data-slot=\"dialog-footer\"\n {...props}\n />\n );\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n className={cn(\"font-heading text-xl leading-none\", className)}\n data-slot=\"dialog-title\"\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n className={cn(\"text-muted-foreground text-sm\", className)}\n data-slot=\"dialog-description\"\n {...props}\n />\n );\n}\n\nfunction DialogPanel({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <ScrollArea>\n <div\n className={cn(\n \"px-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-header]))]:pt-6 in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer]))]:pb-6! in-[[data-slot=dialog-popup]:not(:has([data-slot=dialog-footer].border-t))]:pb-1 pb-6\",\n className,\n )}\n data-slot=\"dialog-panel\"\n {...props}\n />\n </ScrollArea>\n );\n}\n\nexport {\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogClose,\n DialogBackdrop,\n DialogBackdrop as DialogOverlay,\n DialogPopup,\n DialogPopup as DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n DialogPanel,\n DialogViewport,\n};\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
3
|
+
|
|
4
|
+
declare const Dialog: typeof Dialog$1.Root;
|
|
5
|
+
declare function DialogPortal({ container: containerProp, ...props }: Dialog$1.Portal.Props): React.JSX.Element;
|
|
6
|
+
type DialogTriggerProps = React.ComponentProps<typeof Dialog$1.Trigger> & {
|
|
7
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function DialogTrigger({ asChild, children, render, nativeButton, ...props }: DialogTriggerProps): React.JSX.Element;
|
|
11
|
+
type DialogCloseProps = React.ComponentProps<typeof Dialog$1.Close> & {
|
|
12
|
+
/** When true, merges props onto the child element instead of rendering a button */
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare function DialogClose({ asChild, children, render, nativeButton, ...props }: DialogCloseProps): React.JSX.Element;
|
|
16
|
+
declare function DialogBackdrop({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
|
|
17
|
+
declare function DialogViewport({ className, ...props }: Dialog$1.Viewport.Props): React.JSX.Element;
|
|
18
|
+
declare function DialogPopup({ className, children, showCloseButton, bottomStickOnMobile, ...props }: Dialog$1.Popup.Props & {
|
|
19
|
+
showCloseButton?: boolean;
|
|
20
|
+
bottomStickOnMobile?: boolean;
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
23
|
+
declare function DialogFooter({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
24
|
+
variant?: "default" | "bare";
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): React.JSX.Element;
|
|
27
|
+
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): React.JSX.Element;
|
|
28
|
+
declare function DialogPanel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPanel, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport };
|
|
@@ -1,35 +1,30 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
|
|
4
3
|
|
|
5
4
|
declare const Dialog: typeof Dialog$1.Root;
|
|
6
|
-
declare function DialogPortal({
|
|
7
|
-
type DialogTriggerProps =
|
|
5
|
+
declare function DialogPortal({ container: containerProp, ...props }: Dialog$1.Portal.Props): React.JSX.Element;
|
|
6
|
+
type DialogTriggerProps = React.ComponentProps<typeof Dialog$1.Trigger> & {
|
|
8
7
|
/** When true, merges props onto the child element instead of rendering a button */
|
|
9
8
|
asChild?: boolean;
|
|
10
|
-
/** Whether the child renders a native button. Defaults to true when asChild is used. */
|
|
11
|
-
nativeButton?: boolean;
|
|
12
9
|
};
|
|
13
|
-
declare function DialogTrigger({ asChild,
|
|
14
|
-
type DialogCloseProps =
|
|
10
|
+
declare function DialogTrigger({ asChild, children, render, nativeButton, ...props }: DialogTriggerProps): React.JSX.Element;
|
|
11
|
+
type DialogCloseProps = React.ComponentProps<typeof Dialog$1.Close> & {
|
|
15
12
|
/** When true, merges props onto the child element instead of rendering a button */
|
|
16
13
|
asChild?: boolean;
|
|
17
|
-
/** Whether the child renders a native button. Defaults to true when asChild is used. */
|
|
18
|
-
nativeButton?: boolean;
|
|
19
14
|
};
|
|
20
|
-
declare function DialogClose({ asChild,
|
|
21
|
-
declare function DialogBackdrop({ className, ...props }: Dialog$1.Backdrop.Props):
|
|
22
|
-
declare function DialogViewport({ className, ...props }: Dialog$1.Viewport.Props):
|
|
15
|
+
declare function DialogClose({ asChild, children, render, nativeButton, ...props }: DialogCloseProps): React.JSX.Element;
|
|
16
|
+
declare function DialogBackdrop({ className, ...props }: Dialog$1.Backdrop.Props): React.JSX.Element;
|
|
17
|
+
declare function DialogViewport({ className, ...props }: Dialog$1.Viewport.Props): React.JSX.Element;
|
|
23
18
|
declare function DialogPopup({ className, children, showCloseButton, bottomStickOnMobile, ...props }: Dialog$1.Popup.Props & {
|
|
24
19
|
showCloseButton?: boolean;
|
|
25
20
|
bottomStickOnMobile?: boolean;
|
|
26
|
-
}):
|
|
27
|
-
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">):
|
|
21
|
+
}): React.JSX.Element;
|
|
22
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
28
23
|
declare function DialogFooter({ className, variant, ...props }: React.ComponentProps<"div"> & {
|
|
29
24
|
variant?: "default" | "bare";
|
|
30
|
-
}):
|
|
31
|
-
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props):
|
|
32
|
-
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props):
|
|
33
|
-
declare function DialogPanel({ className, ...props }: React.ComponentProps<"div">):
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
declare function DialogTitle({ className, ...props }: Dialog$1.Title.Props): React.JSX.Element;
|
|
27
|
+
declare function DialogDescription({ className, ...props }: Dialog$1.Description.Props): React.JSX.Element;
|
|
28
|
+
declare function DialogPanel({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
34
29
|
|
|
35
30
|
export { Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPanel, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport };
|