@bearmenu/ui 0.5.2 → 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/dist/{chunk-ERMIA7NP.js → chunk-7PPCH42H.js} +3 -3
- package/dist/{chunk-HLQ2IRE7.js → chunk-BAZFVSSG.js} +3 -3
- package/dist/chunk-D5QHEHXJ.js +26 -0
- package/dist/{chunk-UISA4CIG.js → chunk-N2KNBPAQ.js} +2 -2
- package/dist/{chunk-7H54PTVH.js → chunk-PSR7N36A.js} +38 -10
- package/dist/chunk-RIDXFY6M.js +38 -0
- package/dist/chunk-UUJVXN2O.js +82 -0
- package/dist/chunk-WKMLZDUT.js +122 -0
- package/dist/chunk-XK2ZDQVE.js +122 -0
- package/dist/{chunk-4KOMHDZD.js → chunk-Y5D5LP4A.js} +18 -3
- package/dist/chunk-YJ6OBKZJ.js +32 -0
- package/dist/{chunk-ESO2EM3L.js → chunk-ZBBUKXM5.js} +2 -2
- package/dist/chunk-ZFNOCP6W.js +106 -0
- package/dist/components/accordion.js +11 -5
- package/dist/components/alert-dialog.js +5 -3
- package/dist/components/alert.d.ts +5 -2
- package/dist/components/alert.js +25 -9
- package/dist/components/avatar.d.ts +17 -2
- package/dist/components/avatar.js +91 -12
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/breadcrumb.js +5 -2
- package/dist/components/button-group.d.ts +14 -0
- package/dist/components/button-group.js +39 -0
- package/dist/components/button.d.ts +4 -2
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card.d.ts +13 -5
- package/dist/components/card.js +2 -2
- package/dist/components/carousel.d.ts +20 -3
- package/dist/components/carousel.js +72 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/circular-progress.d.ts +16 -0
- package/dist/components/circular-progress.js +105 -0
- package/dist/components/combobox.d.ts +27 -0
- package/dist/components/combobox.js +102 -0
- package/dist/components/command.d.ts +29 -16
- package/dist/components/command.js +2 -2
- package/dist/components/currency-input.d.ts +1 -0
- package/dist/components/currency-input.js +73 -52
- package/dist/components/date-input.d.ts +10 -0
- package/dist/components/date-input.js +40 -0
- package/dist/components/description-list.d.ts +15 -0
- package/dist/components/description-list.js +67 -0
- package/dist/components/dialog.d.ts +13 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +5 -2
- package/dist/components/drawer.js +47 -9
- package/dist/components/dropdown-menu.d.ts +7 -2
- package/dist/components/dropdown-menu.js +22 -6
- package/dist/components/empty-state.js +2 -2
- package/dist/components/field.d.ts +22 -0
- package/dist/components/field.js +130 -0
- package/dist/components/form.d.ts +2 -1
- package/dist/components/form.js +11 -1
- package/dist/components/haptic-button.js +3 -3
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +92 -0
- package/dist/components/input.d.ts +8 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.js +120 -0
- package/dist/components/kbd.d.ts +13 -0
- package/dist/components/kbd.js +49 -0
- package/dist/components/lazy-markdown.d.ts +3 -1
- package/dist/components/lazy-markdown.js +7 -7
- package/dist/components/link-button.js +1 -1
- package/dist/components/multi-select-combobox.js +92 -83
- package/dist/components/multi-select-menu.d.ts +0 -4
- package/dist/components/multi-select-menu.js +28 -17
- package/dist/components/native-select.d.ts +12 -0
- package/dist/components/native-select.js +49 -0
- package/dist/components/pagination.d.ts +5 -2
- package/dist/components/pagination.js +66 -7
- package/dist/components/place-about-tab.js +4 -4
- package/dist/components/place-card.js +1 -1
- package/dist/components/place-details-mobile.js +4 -4
- package/dist/components/popover.d.ts +7 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.d.ts +5 -1
- package/dist/components/progress.js +17 -3
- package/dist/components/radio-group.js +12 -3
- package/dist/components/rating.d.ts +2 -0
- package/dist/components/rating.js +88 -70
- package/dist/components/search-bar.d.ts +1 -2
- package/dist/components/search-bar.js +37 -60
- package/dist/components/searchable-select.js +76 -72
- package/dist/components/select.d.ts +5 -1
- package/dist/components/select.js +30 -14
- package/dist/components/selection-bar.d.ts +11 -0
- package/dist/components/selection-bar.js +65 -0
- package/dist/components/separator.js +3 -2
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton-card.js +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +21 -4
- package/dist/components/sliding-panels.js +9 -6
- package/dist/components/spinner.d.ts +17 -0
- package/dist/components/spinner.js +50 -0
- package/dist/components/stepper.d.ts +18 -0
- package/dist/components/stepper.js +199 -0
- package/dist/components/switch.js +4 -3
- package/dist/components/table.d.ts +23 -5
- package/dist/components/table.js +121 -35
- package/dist/components/tabs.d.ts +3 -1
- package/dist/components/tabs.js +37 -9
- package/dist/components/tag-group.d.ts +9 -0
- package/dist/components/tag-group.js +26 -0
- package/dist/components/tag.d.ts +17 -0
- package/dist/components/tag.js +61 -0
- package/dist/components/text.d.ts +3 -3
- package/dist/components/text.js +1 -1
- package/dist/components/textarea.js +2 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.js +16 -2
- package/package.json +44 -26
- package/src/components/accordion.tsx +11 -6
- package/src/components/alert-dialog.tsx +4 -2
- package/src/components/alert.tsx +20 -8
- package/src/components/avatar.tsx +106 -13
- package/src/components/badge.tsx +12 -11
- package/src/components/breadcrumb.tsx +5 -2
- package/src/components/button-group.stories.tsx +52 -0
- package/src/components/button-group.tsx +40 -0
- package/src/components/button.test.tsx +174 -0
- package/src/components/button.tsx +42 -19
- package/src/components/calendar.tsx +2 -2
- package/src/components/card.tsx +55 -13
- package/src/components/carousel.tsx +85 -13
- package/src/components/checkbox.test.tsx +58 -0
- package/src/components/checkbox.tsx +8 -3
- package/src/components/circular-progress.stories.tsx +39 -0
- package/src/components/circular-progress.tsx +102 -0
- package/src/components/collapsible.stories.tsx +7 -3
- package/src/components/combobox.stories.tsx +82 -0
- package/src/components/combobox.test.tsx +118 -0
- package/src/components/combobox.tsx +136 -0
- package/src/components/command.test.tsx +91 -0
- package/src/components/command.tsx +38 -15
- package/src/components/currency-input.test.tsx +63 -0
- package/src/components/currency-input.tsx +84 -66
- package/src/components/date-input.stories.tsx +31 -0
- package/src/components/date-input.tsx +43 -0
- package/src/components/description-list.stories.tsx +62 -0
- package/src/components/description-list.tsx +68 -0
- package/src/components/dialog.test.tsx +84 -0
- package/src/components/dialog.tsx +64 -24
- package/src/components/drawer.tsx +72 -23
- package/src/components/dropdown-menu.test.tsx +180 -0
- package/src/components/dropdown-menu.tsx +31 -6
- package/src/components/field.stories.tsx +36 -0
- package/src/components/field.test.tsx +157 -0
- package/src/components/field.tsx +146 -0
- package/src/components/form.stories.tsx +3 -2
- package/src/components/form.test.tsx +95 -0
- package/src/components/form.tsx +9 -0
- package/src/components/haptic-button.tsx +1 -1
- package/src/components/input-group.stories.tsx +61 -0
- package/src/components/input-group.tsx +99 -0
- package/src/components/input.test.tsx +103 -0
- package/src/components/input.tsx +24 -7
- package/src/components/item.stories.tsx +52 -0
- package/src/components/item.tsx +115 -0
- package/src/components/kbd.stories.tsx +33 -0
- package/src/components/kbd.tsx +46 -0
- package/src/components/lazy-markdown.tsx +10 -7
- package/src/components/multi-select-combobox.test.tsx +101 -0
- package/src/components/multi-select-combobox.tsx +85 -82
- package/src/components/multi-select-menu.tsx +49 -41
- package/src/components/native-select.stories.tsx +52 -0
- package/src/components/native-select.tsx +45 -0
- package/src/components/pagination.tsx +64 -5
- package/src/components/popover.tsx +66 -3
- package/src/components/progress.tsx +27 -4
- package/src/components/radio-group.test.tsx +64 -0
- package/src/components/radio-group.tsx +11 -3
- package/src/components/rating.test.tsx +112 -0
- package/src/components/rating.tsx +97 -82
- package/src/components/search-bar.stories.tsx +1 -32
- package/src/components/search-bar.tsx +22 -59
- package/src/components/searchable-select.tsx +69 -73
- package/src/components/select.tsx +34 -19
- package/src/components/selection-bar.stories.tsx +37 -0
- package/src/components/selection-bar.tsx +65 -0
- package/src/components/separator.tsx +5 -2
- package/src/components/sheet.tsx +1 -1
- package/src/components/skeleton.tsx +2 -2
- package/src/components/slider.test.tsx +45 -0
- package/src/components/slider.tsx +31 -12
- package/src/components/sliding-panels.tsx +8 -5
- package/src/components/spinner.stories.tsx +35 -0
- package/src/components/spinner.tsx +50 -0
- package/src/components/stepper.stories.tsx +71 -0
- package/src/components/stepper.tsx +220 -0
- package/src/components/switch.test.tsx +52 -0
- package/src/components/switch.tsx +4 -3
- package/src/components/table.tsx +140 -35
- package/src/components/tabs.test.tsx +107 -0
- package/src/components/tabs.tsx +70 -23
- package/src/components/tag-group.stories.tsx +39 -0
- package/src/components/tag-group.tsx +28 -0
- package/src/components/tag.stories.tsx +50 -0
- package/src/components/tag.tsx +63 -0
- package/src/components/text.test.tsx +1 -1
- package/src/components/text.tsx +19 -3
- package/src/components/textarea.test.tsx +48 -0
- package/src/components/textarea.tsx +2 -1
- package/src/components/toast.tsx +4 -3
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +12 -2
- package/src/globals.css +126 -90
- package/dist/chunk-2BMJRXQX.js +0 -80
- package/dist/chunk-4AVS6CV4.js +0 -89
- package/dist/chunk-4UO73SKC.js +0 -26
- package/dist/chunk-CW24PLDW.js +0 -24
- package/dist/chunk-IQASCH2V.js +0 -25
- package/dist/chunk-NKHH23YK.js +0 -31
- package/dist/chunk-QJ54Z7TC.js +0 -83
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
import { Input } from '../chunk-
|
|
1
|
+
import { Input } from '../chunk-RIDXFY6M.js';
|
|
2
2
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
+
var ALLOWED_NAVIGATION_KEYS = /* @__PURE__ */ new Set([
|
|
8
|
+
"Backspace",
|
|
9
|
+
"Tab",
|
|
10
|
+
"Escape",
|
|
11
|
+
"Enter",
|
|
12
|
+
"Delete",
|
|
13
|
+
"Home",
|
|
14
|
+
"End",
|
|
15
|
+
"ArrowLeft",
|
|
16
|
+
"ArrowRight",
|
|
17
|
+
"ArrowUp",
|
|
18
|
+
"ArrowDown"
|
|
19
|
+
]);
|
|
20
|
+
var ALLOWED_SHORTCUT_KEYS = /* @__PURE__ */ new Set(["a", "c", "v", "x", "z"]);
|
|
7
21
|
var CurrencyInput = React.forwardRef(
|
|
8
22
|
(_a, ref) => {
|
|
9
23
|
var _b = _a, {
|
|
10
24
|
value,
|
|
11
25
|
onChange,
|
|
12
26
|
placeholder = "Enter amount",
|
|
13
|
-
currency
|
|
27
|
+
currency = "$",
|
|
14
28
|
locale = "en-US",
|
|
15
29
|
min,
|
|
16
30
|
max,
|
|
17
31
|
disabled = false,
|
|
18
32
|
className,
|
|
19
|
-
error
|
|
33
|
+
error,
|
|
34
|
+
id: providedId
|
|
20
35
|
} = _b, props = __objRest(_b, [
|
|
21
36
|
"value",
|
|
22
37
|
"onChange",
|
|
@@ -27,17 +42,24 @@ var CurrencyInput = React.forwardRef(
|
|
|
27
42
|
"max",
|
|
28
43
|
"disabled",
|
|
29
44
|
"className",
|
|
30
|
-
"error"
|
|
45
|
+
"error",
|
|
46
|
+
"id"
|
|
31
47
|
]);
|
|
48
|
+
const reactId = React.useId();
|
|
49
|
+
const id = providedId != null ? providedId : reactId;
|
|
50
|
+
const errorId = `${id}-error`;
|
|
32
51
|
const [displayValue, setDisplayValue] = React.useState("");
|
|
33
52
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
34
|
-
const formatNumber = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
const formatNumber = React.useCallback(
|
|
54
|
+
(num) => {
|
|
55
|
+
if (num === null || isNaN(num)) return "";
|
|
56
|
+
return new Intl.NumberFormat(locale, {
|
|
57
|
+
minimumFractionDigits: 0,
|
|
58
|
+
maximumFractionDigits: 2
|
|
59
|
+
}).format(num);
|
|
60
|
+
},
|
|
61
|
+
[locale]
|
|
62
|
+
);
|
|
41
63
|
const parseInput = (input) => {
|
|
42
64
|
const cleaned = input.replace(/[^\d.-]/g, "");
|
|
43
65
|
const parsed = parseFloat(cleaned);
|
|
@@ -47,18 +69,14 @@ var CurrencyInput = React.forwardRef(
|
|
|
47
69
|
if (!isFocused) {
|
|
48
70
|
setDisplayValue(formatNumber(value));
|
|
49
71
|
}
|
|
50
|
-
}, [value, isFocused,
|
|
72
|
+
}, [value, isFocused, formatNumber]);
|
|
51
73
|
const handleInputChange = (e) => {
|
|
52
74
|
const inputValue = e.target.value;
|
|
53
75
|
setDisplayValue(inputValue);
|
|
54
76
|
const parsedValue = parseInput(inputValue);
|
|
55
77
|
if (parsedValue !== null) {
|
|
56
|
-
if (min !== void 0 && parsedValue < min)
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
if (max !== void 0 && parsedValue > max) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
78
|
+
if (min !== void 0 && parsedValue < min) return;
|
|
79
|
+
if (max !== void 0 && parsedValue > max) return;
|
|
62
80
|
}
|
|
63
81
|
onChange(parsedValue);
|
|
64
82
|
};
|
|
@@ -77,42 +95,45 @@ var CurrencyInput = React.forwardRef(
|
|
|
77
95
|
}
|
|
78
96
|
};
|
|
79
97
|
const handleKeyDown = (e) => {
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
if (e.keyCode >= 48 && e.keyCode <= 57 || // 0-9
|
|
87
|
-
e.keyCode >= 96 && e.keyCode <= 105 || // numpad 0-9
|
|
88
|
-
e.keyCode === 190 || e.keyCode === 110 || // decimal point
|
|
89
|
-
e.keyCode === 189 || e.keyCode === 109) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
98
|
+
if (ALLOWED_NAVIGATION_KEYS.has(e.key)) return;
|
|
99
|
+
if ((e.ctrlKey || e.metaKey) && ALLOWED_SHORTCUT_KEYS.has(e.key.toLowerCase())) return;
|
|
100
|
+
if (/^[0-9]$/.test(e.key)) return;
|
|
101
|
+
if (e.key === "." || e.key === "-") return;
|
|
92
102
|
e.preventDefault();
|
|
93
103
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
const symbolLength = currency.length;
|
|
105
|
+
const inputPaddingClass = symbolLength <= 1 ? "pl-8" : symbolLength === 2 ? "pl-10" : symbolLength === 3 ? "pl-12" : "pl-14";
|
|
106
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
107
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
108
|
+
/* @__PURE__ */ jsx(
|
|
109
|
+
"span",
|
|
110
|
+
{
|
|
111
|
+
"aria-hidden": true,
|
|
112
|
+
className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",
|
|
113
|
+
children: currency
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ jsx(
|
|
117
|
+
Input,
|
|
118
|
+
__spreadValues({
|
|
119
|
+
ref,
|
|
120
|
+
id,
|
|
121
|
+
type: "text",
|
|
122
|
+
inputMode: "decimal",
|
|
123
|
+
value: displayValue,
|
|
124
|
+
onChange: handleInputChange,
|
|
125
|
+
onFocus: handleFocus,
|
|
126
|
+
onBlur: handleBlur,
|
|
127
|
+
onKeyDown: handleKeyDown,
|
|
128
|
+
placeholder,
|
|
129
|
+
disabled,
|
|
130
|
+
"aria-invalid": error ? true : void 0,
|
|
131
|
+
"aria-describedby": error ? errorId : void 0,
|
|
132
|
+
className: cn(inputPaddingClass, className)
|
|
133
|
+
}, props)
|
|
134
|
+
)
|
|
135
|
+
] }),
|
|
136
|
+
error && /* @__PURE__ */ jsx("p", { id: errorId, className: "ml-1 mt-1 text-sm text-destructive", children: error })
|
|
116
137
|
] });
|
|
117
138
|
}
|
|
118
139
|
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
declare const DateInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
|
4
|
+
/** Native input type. Defaults to "date". */
|
|
5
|
+
type?: "date" | "datetime-local" | "time" | "month" | "week";
|
|
6
|
+
size?: "sm" | "default" | "lg";
|
|
7
|
+
showIcon?: boolean;
|
|
8
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
9
|
+
|
|
10
|
+
export { DateInput };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Input } from '../chunk-RIDXFY6M.js';
|
|
2
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Calendar } from 'lucide-react';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var DateInput = React.forwardRef(
|
|
9
|
+
(_a, ref) => {
|
|
10
|
+
var _b = _a, { className, type = "date", size = "default", showIcon = true } = _b, props = __objRest(_b, ["className", "type", "size", "showIcon"]);
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative w-full", children: [
|
|
12
|
+
showIcon && /* @__PURE__ */ jsx(
|
|
13
|
+
Calendar,
|
|
14
|
+
{
|
|
15
|
+
"aria-hidden": true,
|
|
16
|
+
className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
Input,
|
|
21
|
+
__spreadValues({
|
|
22
|
+
ref,
|
|
23
|
+
type,
|
|
24
|
+
"data-slot": "date-input",
|
|
25
|
+
size,
|
|
26
|
+
className: cn(
|
|
27
|
+
showIcon && "pl-9",
|
|
28
|
+
// Hide the native calendar picker indicator — we render our own icon.
|
|
29
|
+
// The trigger stays on the input itself so click-anywhere still opens the picker.
|
|
30
|
+
"[&::-webkit-calendar-picker-indicator]:opacity-0 [&::-webkit-calendar-picker-indicator]:absolute [&::-webkit-calendar-picker-indicator]:inset-0 [&::-webkit-calendar-picker-indicator]:w-full [&::-webkit-calendar-picker-indicator]:h-full [&::-webkit-calendar-picker-indicator]:cursor-pointer",
|
|
31
|
+
className
|
|
32
|
+
)
|
|
33
|
+
}, props)
|
|
34
|
+
)
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
DateInput.displayName = "DateInput";
|
|
39
|
+
|
|
40
|
+
export { DateInput };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const descriptionListVariants: (props?: ({
|
|
6
|
+
layout?: "grid" | "inline" | "stacked" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const DescriptionList: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDListElement> & VariantProps<(props?: ({
|
|
9
|
+
layout?: "grid" | "inline" | "stacked" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDListElement>>;
|
|
11
|
+
declare const DescriptionItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DescriptionTerm: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
declare const DescriptionDetail: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
14
|
+
|
|
15
|
+
export { DescriptionDetail, DescriptionItem, DescriptionList, DescriptionTerm, descriptionListVariants };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var descriptionListVariants = cva("text-sm", {
|
|
8
|
+
variants: {
|
|
9
|
+
layout: {
|
|
10
|
+
stacked: "flex flex-col gap-3 [&>[data-slot=description-item]]:flex [&>[data-slot=description-item]]:flex-col [&>[data-slot=description-item]]:gap-0.5",
|
|
11
|
+
grid: "grid grid-cols-[max-content_1fr] gap-x-6 gap-y-2 [&>[data-slot=description-item]]:contents [&_[data-slot=description-term]]:text-muted-foreground [&_[data-slot=description-detail]]:text-foreground",
|
|
12
|
+
inline: "flex flex-wrap items-center gap-x-4 gap-y-1 [&_[data-slot=description-term]]:after:content-[':'] [&_[data-slot=description-term]]:after:ml-0.5"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
layout: "stacked"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var DescriptionList = React.forwardRef((_a, ref) => {
|
|
20
|
+
var _b = _a, { className, layout } = _b, props = __objRest(_b, ["className", "layout"]);
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
"dl",
|
|
23
|
+
__spreadValues({
|
|
24
|
+
ref,
|
|
25
|
+
"data-slot": "description-list",
|
|
26
|
+
className: cn(descriptionListVariants({ layout }), className)
|
|
27
|
+
}, props)
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
DescriptionList.displayName = "DescriptionList";
|
|
31
|
+
var DescriptionItem = React.forwardRef(
|
|
32
|
+
(_a, ref) => {
|
|
33
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
34
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, "data-slot": "description-item", className: cn(className) }, props));
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
DescriptionItem.displayName = "DescriptionItem";
|
|
38
|
+
var DescriptionTerm = React.forwardRef(
|
|
39
|
+
(_a, ref) => {
|
|
40
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"dt",
|
|
43
|
+
__spreadValues({
|
|
44
|
+
ref,
|
|
45
|
+
"data-slot": "description-term",
|
|
46
|
+
className: cn("text-xs font-medium uppercase tracking-wide text-muted-foreground", className)
|
|
47
|
+
}, props)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
DescriptionTerm.displayName = "DescriptionTerm";
|
|
52
|
+
var DescriptionDetail = React.forwardRef(
|
|
53
|
+
(_a, ref) => {
|
|
54
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"dd",
|
|
57
|
+
__spreadValues({
|
|
58
|
+
ref,
|
|
59
|
+
"data-slot": "description-detail",
|
|
60
|
+
className: cn("text-sm text-foreground", className)
|
|
61
|
+
}, props)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
DescriptionDetail.displayName = "DescriptionDetail";
|
|
66
|
+
|
|
67
|
+
export { DescriptionDetail, DescriptionItem, DescriptionList, DescriptionTerm, descriptionListVariants };
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
6
|
|
|
5
7
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
6
8
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
9
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
8
10
|
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
11
|
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
declare const
|
|
12
|
+
declare const dialogContentVariants: (props?: ({
|
|
13
|
+
size?: "default" | "sm" | "lg" | "xl" | "full" | null | undefined;
|
|
14
|
+
scrollBehavior?: "inside" | "outside" | null | undefined;
|
|
15
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
16
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
17
|
+
size?: "default" | "sm" | "lg" | "xl" | "full" | null | undefined;
|
|
18
|
+
scrollBehavior?: "inside" | "outside" | null | undefined;
|
|
19
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
20
|
+
showCloseButton?: boolean;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
22
|
declare const DialogHeader: {
|
|
12
23
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
13
24
|
displayName: string;
|
|
@@ -19,4 +30,4 @@ declare const DialogFooter: {
|
|
|
19
30
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
20
31
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
21
32
|
|
|
22
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
33
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogContentVariants };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from '../chunk-
|
|
1
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogContentVariants } from '../chunk-WKMLZDUT.js';
|
|
2
2
|
import '../chunk-FEK5XGZW.js';
|
|
3
3
|
import '../chunk-3GWWZKX7.js';
|
|
@@ -5,14 +5,17 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
declare const Drawer: {
|
|
8
|
-
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
({ shouldScaleBackground, direction, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
11
11
|
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
12
|
declare const DrawerPortal: typeof vaul.Portal;
|
|
13
13
|
declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
14
14
|
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
15
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
|
+
variant?: "flush" | "floating";
|
|
17
|
+
showHandle?: boolean;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
19
|
declare const DrawerHeader: {
|
|
17
20
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
18
21
|
displayName: string;
|
|
@@ -4,13 +4,22 @@ import * as React from 'react';
|
|
|
4
4
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
+
var DrawerDirectionContext = React.createContext("bottom");
|
|
7
8
|
var Drawer = (_a) => {
|
|
8
9
|
var _b = _a, {
|
|
9
|
-
shouldScaleBackground = false
|
|
10
|
+
shouldScaleBackground = false,
|
|
11
|
+
direction = "bottom"
|
|
10
12
|
} = _b, props = __objRest(_b, [
|
|
11
|
-
"shouldScaleBackground"
|
|
13
|
+
"shouldScaleBackground",
|
|
14
|
+
"direction"
|
|
12
15
|
]);
|
|
13
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
+
return /* @__PURE__ */ jsx(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx(
|
|
17
|
+
Drawer$1.Root,
|
|
18
|
+
__spreadValues({
|
|
19
|
+
shouldScaleBackground,
|
|
20
|
+
direction
|
|
21
|
+
}, props)
|
|
22
|
+
) });
|
|
14
23
|
};
|
|
15
24
|
Drawer.displayName = "Drawer";
|
|
16
25
|
var DrawerTrigger = Drawer$1.Trigger;
|
|
@@ -22,26 +31,41 @@ var DrawerOverlay = React.forwardRef((_a, ref) => {
|
|
|
22
31
|
Drawer$1.Overlay,
|
|
23
32
|
__spreadValues({
|
|
24
33
|
ref,
|
|
34
|
+
"data-slot": "drawer-overlay",
|
|
25
35
|
className: cn("fixed inset-0 z-[1000] bg-black/60", className)
|
|
26
36
|
}, props)
|
|
27
37
|
);
|
|
28
38
|
});
|
|
29
39
|
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
30
40
|
var DrawerContent = React.forwardRef((_a, ref) => {
|
|
31
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
41
|
+
var _b = _a, { className, variant = "flush", showHandle, children } = _b, props = __objRest(_b, ["className", "variant", "showHandle", "children"]);
|
|
42
|
+
const direction = React.useContext(DrawerDirectionContext);
|
|
43
|
+
const isVertical = direction === "top" || direction === "bottom";
|
|
44
|
+
const handleEnabled = showHandle != null ? showHandle : direction === "bottom";
|
|
45
|
+
const positionClasses = direction === "bottom" ? "inset-x-0 bottom-0 flex-col rounded-t-2xl border-t [padding-bottom:max(env(safe-area-inset-bottom),0px)]" : direction === "top" ? "inset-x-0 top-0 flex-col rounded-b-2xl border-b [padding-top:max(env(safe-area-inset-top),0px)]" : direction === "left" ? "inset-y-0 left-0 h-full w-3/4 max-w-sm flex-col rounded-r-2xl border-r [padding-left:max(env(safe-area-inset-left),0px)]" : "inset-y-0 right-0 h-full w-3/4 max-w-sm flex-col rounded-l-2xl border-l [padding-right:max(env(safe-area-inset-right),0px)]";
|
|
32
46
|
return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
33
47
|
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
34
48
|
/* @__PURE__ */ jsxs(
|
|
35
49
|
Drawer$1.Content,
|
|
36
50
|
__spreadProps(__spreadValues({
|
|
37
51
|
ref,
|
|
52
|
+
"data-slot": "drawer-content",
|
|
38
53
|
className: cn(
|
|
39
|
-
"fixed
|
|
54
|
+
"fixed z-[1000] flex border-border bg-card shadow-2xl",
|
|
55
|
+
positionClasses,
|
|
56
|
+
isVertical ? "max-h-[90vh]" : "",
|
|
57
|
+
variant === "floating" && "m-3 rounded-2xl border",
|
|
40
58
|
className
|
|
41
59
|
)
|
|
42
60
|
}, props), {
|
|
43
61
|
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
62
|
+
handleEnabled && /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
"aria-hidden": true,
|
|
66
|
+
className: "mx-auto mt-2 h-1.5 w-[60px] shrink-0 rounded-full bg-muted-foreground/30"
|
|
67
|
+
}
|
|
68
|
+
),
|
|
45
69
|
children
|
|
46
70
|
]
|
|
47
71
|
})
|
|
@@ -51,12 +75,24 @@ var DrawerContent = React.forwardRef((_a, ref) => {
|
|
|
51
75
|
DrawerContent.displayName = "DrawerContent";
|
|
52
76
|
var DrawerHeader = (_a) => {
|
|
53
77
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
54
|
-
return /* @__PURE__ */ jsx(
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
"div",
|
|
80
|
+
__spreadValues({
|
|
81
|
+
"data-slot": "drawer-header",
|
|
82
|
+
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className)
|
|
83
|
+
}, props)
|
|
84
|
+
);
|
|
55
85
|
};
|
|
56
86
|
DrawerHeader.displayName = "DrawerHeader";
|
|
57
87
|
var DrawerFooter = (_a) => {
|
|
58
88
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
59
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
"div",
|
|
91
|
+
__spreadValues({
|
|
92
|
+
"data-slot": "drawer-footer",
|
|
93
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
94
|
+
}, props)
|
|
95
|
+
);
|
|
60
96
|
};
|
|
61
97
|
DrawerFooter.displayName = "DrawerFooter";
|
|
62
98
|
var DrawerTitle = React.forwardRef((_a, ref) => {
|
|
@@ -65,6 +101,7 @@ var DrawerTitle = React.forwardRef((_a, ref) => {
|
|
|
65
101
|
Drawer$1.Title,
|
|
66
102
|
__spreadValues({
|
|
67
103
|
ref,
|
|
104
|
+
"data-slot": "drawer-title",
|
|
68
105
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
69
106
|
}, props)
|
|
70
107
|
);
|
|
@@ -76,7 +113,8 @@ var DrawerDescription = React.forwardRef((_a, ref) => {
|
|
|
76
113
|
Drawer$1.Description,
|
|
77
114
|
__spreadValues({
|
|
78
115
|
ref,
|
|
79
|
-
|
|
116
|
+
"data-slot": "drawer-description",
|
|
117
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
80
118
|
}, props)
|
|
81
119
|
);
|
|
82
120
|
});
|
|
@@ -5,13 +5,18 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
|
5
5
|
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
6
|
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
7
7
|
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
-
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>
|
|
8
|
+
declare function DropdownMenuContent({ className, sideOffset, size, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content> & {
|
|
9
|
+
size?: "sm" | "default" | "lg";
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
11
|
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
10
12
|
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
11
13
|
inset?: boolean;
|
|
12
14
|
variant?: "default" | "destructive";
|
|
13
15
|
}): react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
16
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, appearance, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
17
|
+
/** "indicator" shows a check icon (default). "control" renders a styled checkbox box. */
|
|
18
|
+
appearance?: "indicator" | "control";
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
15
20
|
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
16
21
|
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
17
22
|
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
@@ -19,10 +19,12 @@ function DropdownMenuTrigger(_a) {
|
|
|
19
19
|
function DropdownMenuContent(_a) {
|
|
20
20
|
var _b = _a, {
|
|
21
21
|
className,
|
|
22
|
-
sideOffset = 4
|
|
22
|
+
sideOffset = 4,
|
|
23
|
+
size = "default"
|
|
23
24
|
} = _b, props = __objRest(_b, [
|
|
24
25
|
"className",
|
|
25
|
-
"sideOffset"
|
|
26
|
+
"sideOffset",
|
|
27
|
+
"size"
|
|
26
28
|
]);
|
|
27
29
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
28
30
|
DropdownMenuPrimitive.Content,
|
|
@@ -30,7 +32,10 @@ function DropdownMenuContent(_a) {
|
|
|
30
32
|
"data-slot": "dropdown-menu-content",
|
|
31
33
|
sideOffset,
|
|
32
34
|
className: cn(
|
|
33
|
-
"bg-
|
|
35
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) overflow-x-hidden overflow-y-auto rounded-xl border border-border p-1 shadow-xl origin-(--radix-dropdown-menu-content-transform-origin)",
|
|
36
|
+
size === "sm" && "min-w-[6rem] text-xs [&_[data-slot=dropdown-menu-item]]:py-1",
|
|
37
|
+
size === "default" && "min-w-[8rem]",
|
|
38
|
+
size === "lg" && "min-w-[12rem] [&_[data-slot=dropdown-menu-item]]:py-2",
|
|
34
39
|
className
|
|
35
40
|
)
|
|
36
41
|
}, props)
|
|
@@ -67,11 +72,13 @@ function DropdownMenuCheckboxItem(_a) {
|
|
|
67
72
|
var _b = _a, {
|
|
68
73
|
className,
|
|
69
74
|
children,
|
|
70
|
-
checked = false
|
|
75
|
+
checked = false,
|
|
76
|
+
appearance = "indicator"
|
|
71
77
|
} = _b, props = __objRest(_b, [
|
|
72
78
|
"className",
|
|
73
79
|
"children",
|
|
74
|
-
"checked"
|
|
80
|
+
"checked",
|
|
81
|
+
"appearance"
|
|
75
82
|
]);
|
|
76
83
|
return /* @__PURE__ */ jsxs(
|
|
77
84
|
DropdownMenuPrimitive.CheckboxItem,
|
|
@@ -84,7 +91,16 @@ function DropdownMenuCheckboxItem(_a) {
|
|
|
84
91
|
checked
|
|
85
92
|
}, props), {
|
|
86
93
|
children: [
|
|
87
|
-
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children:
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: appearance === "control" ? /* @__PURE__ */ jsx(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
className: cn(
|
|
98
|
+
"inline-flex size-3.5 items-center justify-center rounded-sm border",
|
|
99
|
+
checked === true ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background"
|
|
100
|
+
),
|
|
101
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3" }) })
|
|
102
|
+
}
|
|
103
|
+
) : /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
|
|
88
104
|
children
|
|
89
105
|
]
|
|
90
106
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button } from '../chunk-2BMJRXQX.js';
|
|
1
|
+
import { Button } from '../chunk-ZFNOCP6W.js';
|
|
3
2
|
import '../chunk-R47NEOSI.js';
|
|
3
|
+
import { Text } from '../chunk-Y5D5LP4A.js';
|
|
4
4
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
5
5
|
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
6
6
|
import * as React from 'react';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as _radix_ui_react_slot from '@radix-ui/react-slot';
|
|
2
|
+
import * as class_variance_authority from 'class-variance-authority';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
/** Field id. Auto-generated if omitted. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** Marks the field invalid. */
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
/** Lay out content horizontally instead of stacked. */
|
|
13
|
+
orientation?: "vertical" | "horizontal";
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const FieldLabel: React.ForwardRefExoticComponent<Omit<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & class_variance_authority.VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
16
|
+
declare const FieldControl: React.ForwardRefExoticComponent<Omit<_radix_ui_react_slot.SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
17
|
+
declare const FieldDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
declare const FieldError: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
|
+
declare const FieldSet: React.ForwardRefExoticComponent<React.FieldsetHTMLAttributes<HTMLFieldSetElement> & React.RefAttributes<HTMLFieldSetElement>>;
|
|
20
|
+
declare const FieldLegend: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLLegendElement> & React.RefAttributes<HTMLLegendElement>>;
|
|
21
|
+
|
|
22
|
+
export { Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldLegend, FieldSet };
|