@lglab/compose-ui 0.27.0 → 0.29.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/accordion.d.ts +49 -40
- package/dist/accordion.d.ts.map +1 -0
- package/dist/accordion.js +47 -45
- package/dist/accordion.js.map +1 -0
- package/dist/alert-dialog.d.ts +93 -87
- package/dist/alert-dialog.d.ts.map +1 -0
- package/dist/alert-dialog.js +94 -111
- package/dist/alert-dialog.js.map +1 -0
- package/dist/autocomplete.d.ts +99 -96
- package/dist/autocomplete.d.ts.map +1 -0
- package/dist/autocomplete.js +92 -116
- package/dist/autocomplete.js.map +1 -0
- package/dist/avatar.d.ts +56 -47
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +66 -79
- package/dist/avatar.js.map +1 -0
- package/dist/badge.d.ts +48 -0
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +196 -0
- package/dist/badge.js.map +1 -0
- package/dist/button.d.ts +26 -21
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +24 -24
- package/dist/button.js.map +1 -0
- package/dist/card.d.ts +105 -99
- package/dist/card.d.ts.map +1 -0
- package/dist/card.js +105 -66
- package/dist/card.js.map +1 -0
- package/dist/checkbox-group.d.ts +16 -12
- package/dist/checkbox-group.d.ts.map +1 -0
- package/dist/checkbox-group.js +18 -14
- package/dist/checkbox-group.js.map +1 -0
- package/dist/checkbox.d.ts +25 -19
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/checkbox.js +26 -32
- package/dist/checkbox.js.map +1 -0
- package/dist/collapsible.d.ts +32 -26
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +32 -32
- package/dist/collapsible.js.map +1 -0
- package/dist/combobox.d.ts +191 -182
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +176 -250
- package/dist/combobox.js.map +1 -0
- package/dist/context-menu.d.ts +151 -138
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +151 -173
- package/dist/context-menu.js.map +1 -0
- package/dist/dialog.d.ts +101 -92
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +101 -105
- package/dist/dialog.js.map +1 -0
- package/dist/drawer.d.ts +109 -99
- package/dist/drawer.d.ts.map +1 -0
- package/dist/drawer.js +120 -111
- package/dist/drawer.js.map +1 -0
- package/dist/field.d.ts +61 -54
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +58 -27
- package/dist/field.js.map +1 -0
- package/dist/fieldset.d.ts +24 -19
- package/dist/fieldset.d.ts.map +1 -0
- package/dist/fieldset.js +26 -18
- package/dist/fieldset.js.map +1 -0
- package/dist/form.d.ts +16 -12
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +18 -8
- package/dist/form.js.map +1 -0
- package/dist/index.d.ts +44 -2077
- package/dist/index.js +44 -314
- package/dist/input.d.ts +16 -12
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +19 -9
- package/dist/input.js.map +1 -0
- package/dist/lib/arrow-svg.js +28 -0
- package/dist/lib/arrow-svg.js.map +1 -0
- package/dist/lib/button-variants.d.ts +6 -0
- package/dist/lib/button-variants.d.ts.map +1 -0
- package/dist/lib/button-variants.js +31 -0
- package/dist/lib/button-variants.js.map +1 -0
- package/dist/lib/control-variants.d.ts +6 -0
- package/dist/lib/control-variants.d.ts.map +1 -0
- package/dist/lib/control-variants.js +37 -0
- package/dist/lib/control-variants.js.map +1 -0
- package/dist/lib/form-variants.js +11 -0
- package/dist/lib/form-variants.js.map +1 -0
- package/dist/lib/tooltip-variants.d.ts +5 -0
- package/dist/lib/tooltip-variants.d.ts.map +1 -0
- package/dist/lib/tooltip-variants.js +36 -0
- package/dist/lib/tooltip-variants.js.map +1 -0
- package/dist/lib/utils.js +11 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/menu.d.ts +151 -138
- package/dist/menu.d.ts.map +1 -0
- package/dist/menu.js +151 -146
- package/dist/menu.js.map +1 -0
- package/dist/menubar.d.ts +168 -155
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +163 -169
- package/dist/menubar.js.map +1 -0
- package/dist/meter.d.ts +53 -43
- package/dist/meter.d.ts.map +1 -0
- package/dist/meter.js +59 -64
- package/dist/meter.js.map +1 -0
- package/dist/navigation-menu.d.ts +111 -96
- package/dist/navigation-menu.d.ts.map +1 -0
- package/dist/navigation-menu.js +117 -175
- package/dist/navigation-menu.js.map +1 -0
- package/dist/number-field.d.ts +64 -54
- package/dist/number-field.d.ts.map +1 -0
- package/dist/number-field.js +61 -69
- package/dist/number-field.js.map +1 -0
- package/dist/popover.d.ts +90 -82
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +85 -94
- package/dist/popover.js.map +1 -0
- package/dist/preview-card.d.ts +58 -54
- package/dist/preview-card.d.ts.map +1 -0
- package/dist/preview-card.js +57 -81
- package/dist/preview-card.js.map +1 -0
- package/dist/progress.d.ts +48 -40
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +46 -50
- package/dist/progress.js.map +1 -0
- package/dist/radio-group.d.ts +16 -12
- package/dist/radio-group.d.ts.map +1 -0
- package/dist/radio-group.js +18 -14
- package/dist/radio-group.js.map +1 -0
- package/dist/radio.d.ts +24 -19
- package/dist/radio.d.ts.map +1 -0
- package/dist/radio.js +25 -34
- package/dist/radio.js.map +1 -0
- package/dist/scroll-area.d.ts +57 -47
- package/dist/scroll-area.d.ts.map +1 -0
- package/dist/scroll-area.js +54 -56
- package/dist/scroll-area.js.map +1 -0
- package/dist/select.d.ts +146 -133
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +133 -167
- package/dist/select.js.map +1 -0
- package/dist/separator.d.ts +17 -12
- package/dist/separator.d.ts.map +1 -0
- package/dist/separator.js +19 -23
- package/dist/separator.js.map +1 -0
- package/dist/skeleton.d.ts +20 -0
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +27 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.d.ts +56 -47
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +53 -62
- package/dist/slider.js.map +1 -0
- package/dist/styles/default.css +26 -0
- package/dist/switch.d.ts +24 -19
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +23 -39
- package/dist/switch.js.map +1 -0
- package/dist/tabs.d.ts +60 -49
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tabs.js +76 -84
- package/dist/tabs.js.map +1 -0
- package/dist/textarea.d.ts +15 -11
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +18 -14
- package/dist/textarea.js.map +1 -0
- package/dist/toast.d.ts +87 -81
- package/dist/toast.d.ts.map +1 -0
- package/dist/toast.js +79 -150
- package/dist/toast.js.map +1 -0
- package/dist/toggle-group.d.ts +34 -29
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +31 -34
- package/dist/toggle-group.js.map +1 -0
- package/dist/toggle.d.ts +24 -21
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +22 -15
- package/dist/toggle.js.map +1 -0
- package/dist/toolbar.d.ts +64 -56
- package/dist/toolbar.d.ts.map +1 -0
- package/dist/toolbar.js +57 -68
- package/dist/toolbar.js.map +1 -0
- package/dist/tooltip.d.ts +67 -62
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +65 -90
- package/dist/tooltip.js.map +1 -0
- package/package.json +12 -8
- package/dist/arrow-svg-C6zQTvgS.js +0 -40
- package/dist/button-variants-CbFMPwc8.js +0 -33
- package/dist/control-variants-Bwep4n0y.js +0 -37
- package/dist/form-variants-LJ8gIbk0.js +0 -9
- package/dist/utils-B6yFEsav.js +0 -8
package/dist/number-field.d.ts
CHANGED
|
@@ -1,54 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime99 from "react/jsx-runtime";
|
|
3
|
+
import { NumberField } from "@base-ui/react/number-field";
|
|
4
|
+
|
|
5
|
+
//#region src/components/number-field.d.ts
|
|
6
|
+
type NumberFieldRootProps = React.ComponentProps<typeof NumberField.Root>;
|
|
7
|
+
declare const NumberFieldRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: NumberFieldRootProps): react_jsx_runtime99.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
type NumberFieldScrubAreaProps = React.ComponentProps<typeof NumberField.ScrubArea>;
|
|
15
|
+
declare const NumberFieldScrubArea: {
|
|
16
|
+
({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: NumberFieldScrubAreaProps): react_jsx_runtime99.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
type NumberFieldScrubAreaCursorProps = React.ComponentProps<typeof NumberField.ScrubAreaCursor>;
|
|
23
|
+
declare const NumberFieldScrubAreaCursor: {
|
|
24
|
+
({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: NumberFieldScrubAreaCursorProps): react_jsx_runtime99.JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
type NumberFieldGroupProps = React.ComponentProps<typeof NumberField.Group>;
|
|
31
|
+
declare const NumberFieldGroup: {
|
|
32
|
+
({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: NumberFieldGroupProps): react_jsx_runtime99.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
type NumberFieldInputProps = React.ComponentProps<typeof NumberField.Input>;
|
|
39
|
+
declare const NumberFieldInput: {
|
|
40
|
+
({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: NumberFieldInputProps): react_jsx_runtime99.JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
type NumberFieldDecrementProps = React.ComponentProps<typeof NumberField.Decrement>;
|
|
47
|
+
declare const NumberFieldDecrement: {
|
|
48
|
+
({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: NumberFieldDecrementProps): react_jsx_runtime99.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
type NumberFieldIncrementProps = React.ComponentProps<typeof NumberField.Increment>;
|
|
55
|
+
declare const NumberFieldIncrement: {
|
|
56
|
+
({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: NumberFieldIncrementProps): react_jsx_runtime99.JSX.Element;
|
|
60
|
+
displayName: string;
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { NumberFieldDecrement, type NumberFieldDecrementProps, NumberFieldGroup, type NumberFieldGroupProps, NumberFieldIncrement, type NumberFieldIncrementProps, NumberFieldInput, type NumberFieldInputProps, NumberFieldRoot, type NumberFieldRootProps, NumberFieldScrubArea, NumberFieldScrubAreaCursor, type NumberFieldScrubAreaCursorProps, type NumberFieldScrubAreaProps };
|
|
64
|
+
//# sourceMappingURL=number-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-field.d.ts","names":[],"sources":["../src/components/number-field.tsx"],"sourcesContent":[],"mappings":";;;;;KAYK,oBAAA,GAAuB,KAAA,CAAM,sBAAsB,WAAA,CAAgB;cAElE;;;;KAA4C,uBAAoB,mBAAA,CAAA,GAAA,CAAA;EAFjE,WAAA,EAAA,MAAA;CAAoB;KAYpB,yBAAA,GAA4B,KAAA,CAAM,cAZiC,CAAA,OAYX,WAAA,CAAgB,SAZL,CAAA;cAclE,oBAd4B,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAcO,yBAdP,CAAA,EAcgC,mBAAA,CAAA,GAAA,CAAA,OAdhC;EAE1C,WAAA,EAAA,MAEL;CAAA;KAyBI,+BAAA,GAAkC,KAAA,CAAM,sBACpC,WAAA,CAAgB;cAGnB,0BA/B4C,EAAA;;IAAoB,SAAA;IAAA,GAAA;EAAA,CAAA,EAkCnE,+BAlCmE,CAAA,EAkCpC,mBAAA,CAAA,GAAA,CAAA,OAlCoC;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KAiDjE,qBAAA,GAAwB,KAAA,CAAM,cAvCL,CAAA,OAuC2B,WAAA,CAAgB,KAvC3C,CAAA;cAyCxB,gBAzCuE,EAAA;;IAA5C,SAAM;IAAA,GAAA;EAAA,CAAA,EAyCY,qBAzCZ,CAAA,EAyCiC,mBAAA,CAAA,GAAA,CAAA,OAzCjC;EAAc,WAAA,EAAA,MAAA;AAAA,CAAA;KAmDhD,qBAAA,GAAwB,KAAA,CAAM,cA1ClC,CAAA,OA0CwD,WAAA,CAAgB,KA1CxE,CAAA;cA4CK;;IAnDiD,SAAA;IAAA,GAAA;EAAA,CAAA,EAmDJ,qBAnDI,CAAA,EAmDiB,mBAAA,CAAA,GAAA,CAAA,OAnDjB;aAAyB,EAAA,MAAA;CAAA;AAAA,KAqE3E,yBAAA,GAA4B,KAAA,CAAM,cAtDH,CAAA,OAsDyB,WAAA,CAAgB,SAtDzC,CAAA;cAwD9B,oBAxD8B,EAAA;;IAC3B,SAAA;IAAA,GAAgB;EAAA,CAAA,EAuD8B,yBAvD9B,CAAA,EAuDuD,mBAAA,CAAA,GAAA,CAAA,OAvDvD;aADoB,EAAA,MAAA;CAAc;AAAA,KA0EtD,yBAAA,GAA4B,KAAA,CAAM,cA5DtC,CAAA,OA4D4D,WAAA,CAAgB,SA5D5E,CAAA;cA8DK,oBA9DL,EAAA;;;;KA8DsD,4BAAyB,mBAAA,CAAA,GAAA,CAAA;aArE7E,EAAA,MAAA"}
|
package/dist/number-field.js
CHANGED
|
@@ -1,70 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
m.displayName = "NumberFieldScrubArea";
|
|
16
|
-
const a = ({
|
|
17
|
-
className: e,
|
|
18
|
-
...r
|
|
19
|
-
}) => /* @__PURE__ */ t(
|
|
20
|
-
o.ScrubAreaCursor,
|
|
21
|
-
{
|
|
22
|
-
className: n("drop-shadow-[0_1px_1px_rgba(0,0,0,0.5)] filter", e),
|
|
23
|
-
...r
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
a.displayName = "NumberFieldScrubAreaCursor";
|
|
27
|
-
const d = ({ className: e, ...r }) => /* @__PURE__ */ t(o.Group, { className: n("flex", e), ...r });
|
|
28
|
-
d.displayName = "NumberFieldGroup";
|
|
29
|
-
const b = ({ className: e, ...r }) => /* @__PURE__ */ t(
|
|
30
|
-
o.Input,
|
|
31
|
-
{
|
|
32
|
-
className: n(
|
|
33
|
-
"h-9 w-24 border-t border-b border-border bg-transparent text-center text-base text-foreground tabular-nums outline-none",
|
|
34
|
-
e
|
|
35
|
-
),
|
|
36
|
-
...r
|
|
37
|
-
}
|
|
38
|
-
);
|
|
39
|
-
b.displayName = "NumberFieldInput";
|
|
40
|
-
const c = ({ className: e, ...r }) => /* @__PURE__ */ t(
|
|
41
|
-
o.Decrement,
|
|
42
|
-
{
|
|
43
|
-
className: n(
|
|
44
|
-
"flex size-9 items-center justify-center rounded-l-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted",
|
|
45
|
-
e
|
|
46
|
-
),
|
|
47
|
-
...r
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
c.displayName = "NumberFieldDecrement";
|
|
51
|
-
const l = ({ className: e, ...r }) => /* @__PURE__ */ t(
|
|
52
|
-
o.Increment,
|
|
53
|
-
{
|
|
54
|
-
className: n(
|
|
55
|
-
"flex size-9 items-center justify-center rounded-r-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted",
|
|
56
|
-
e
|
|
57
|
-
),
|
|
58
|
-
...r
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
l.displayName = "NumberFieldIncrement";
|
|
62
|
-
export {
|
|
63
|
-
c as NumberFieldDecrement,
|
|
64
|
-
d as NumberFieldGroup,
|
|
65
|
-
l as NumberFieldIncrement,
|
|
66
|
-
b as NumberFieldInput,
|
|
67
|
-
u as NumberFieldRoot,
|
|
68
|
-
m as NumberFieldScrubArea,
|
|
69
|
-
a as NumberFieldScrubAreaCursor
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { fieldRootStyles } from "./lib/form-variants.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { NumberField } from "@base-ui/react/number-field";
|
|
8
|
+
|
|
9
|
+
//#region src/components/number-field.tsx
|
|
10
|
+
const NumberFieldRoot = ({ className, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(NumberField.Root, {
|
|
12
|
+
className: cn(fieldRootStyles, className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
70
15
|
};
|
|
16
|
+
NumberFieldRoot.displayName = "NumberFieldRoot";
|
|
17
|
+
const NumberFieldScrubArea = ({ className, ...props }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(NumberField.ScrubArea, {
|
|
19
|
+
className: cn("cursor-ew-resize select-none", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
NumberFieldScrubArea.displayName = "NumberFieldScrubArea";
|
|
24
|
+
const NumberFieldScrubAreaCursor = ({ className, ...props }) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(NumberField.ScrubAreaCursor, {
|
|
26
|
+
className: cn("drop-shadow-[0_1px_1px_rgba(0,0,0,0.5)] filter", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
NumberFieldScrubAreaCursor.displayName = "NumberFieldScrubAreaCursor";
|
|
31
|
+
const NumberFieldGroup = ({ className, ...props }) => {
|
|
32
|
+
return /* @__PURE__ */ jsx(NumberField.Group, {
|
|
33
|
+
className: cn("flex", className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
NumberFieldGroup.displayName = "NumberFieldGroup";
|
|
38
|
+
const NumberFieldInput = ({ className, ...props }) => {
|
|
39
|
+
return /* @__PURE__ */ jsx(NumberField.Input, {
|
|
40
|
+
className: cn("h-9 w-24 border-t border-b border-border bg-transparent text-center text-base text-foreground tabular-nums outline-none", className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
NumberFieldInput.displayName = "NumberFieldInput";
|
|
45
|
+
const NumberFieldDecrement = ({ className, ...props }) => {
|
|
46
|
+
return /* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
47
|
+
className: cn("flex size-9 items-center justify-center rounded-l-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted", className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
NumberFieldDecrement.displayName = "NumberFieldDecrement";
|
|
52
|
+
const NumberFieldIncrement = ({ className, ...props }) => {
|
|
53
|
+
return /* @__PURE__ */ jsx(NumberField.Increment, {
|
|
54
|
+
className: cn("flex size-9 items-center justify-center rounded-r-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted", className),
|
|
55
|
+
...props
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
NumberFieldIncrement.displayName = "NumberFieldIncrement";
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
export { NumberFieldDecrement, NumberFieldGroup, NumberFieldIncrement, NumberFieldInput, NumberFieldRoot, NumberFieldScrubArea, NumberFieldScrubAreaCursor };
|
|
62
|
+
//# sourceMappingURL=number-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-field.js","names":["BaseNumberField"],"sources":["../src/components/number-field.tsx"],"sourcesContent":["'use client'\n\nimport { NumberField as BaseNumberField } from '@base-ui/react/number-field'\nimport * as React from 'react'\n\nimport { fieldRootStyles } from '../lib/form-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// NumberFieldRoot\n// ============================================================================\n\ntype NumberFieldRootProps = React.ComponentProps<typeof BaseNumberField.Root>\n\nconst NumberFieldRoot = ({ className, ...props }: NumberFieldRootProps) => {\n return <BaseNumberField.Root className={cn(fieldRootStyles, className)} {...props} />\n}\n\nNumberFieldRoot.displayName = 'NumberFieldRoot'\n\n// ============================================================================\n// NumberFieldScrubArea\n// ============================================================================\n\ntype NumberFieldScrubAreaProps = React.ComponentProps<typeof BaseNumberField.ScrubArea>\n\nconst NumberFieldScrubArea = ({ className, ...props }: NumberFieldScrubAreaProps) => {\n return (\n <BaseNumberField.ScrubArea\n className={cn('cursor-ew-resize select-none', className)}\n {...props}\n />\n )\n}\n\nNumberFieldScrubArea.displayName = 'NumberFieldScrubArea'\n\n// ============================================================================\n// NumberFieldScrubAreaCursor\n// ============================================================================\n\ntype NumberFieldScrubAreaCursorProps = React.ComponentProps<\n typeof BaseNumberField.ScrubAreaCursor\n>\n\nconst NumberFieldScrubAreaCursor = ({\n className,\n ...props\n}: NumberFieldScrubAreaCursorProps) => {\n return (\n <BaseNumberField.ScrubAreaCursor\n className={cn('drop-shadow-[0_1px_1px_rgba(0,0,0,0.5)] filter', className)}\n {...props}\n />\n )\n}\n\nNumberFieldScrubAreaCursor.displayName = 'NumberFieldScrubAreaCursor'\n\n// ============================================================================\n// NumberFieldGroup\n// ============================================================================\n\ntype NumberFieldGroupProps = React.ComponentProps<typeof BaseNumberField.Group>\n\nconst NumberFieldGroup = ({ className, ...props }: NumberFieldGroupProps) => {\n return <BaseNumberField.Group className={cn('flex', className)} {...props} />\n}\n\nNumberFieldGroup.displayName = 'NumberFieldGroup'\n\n// ============================================================================\n// NumberFieldInput\n// ============================================================================\n\ntype NumberFieldInputProps = React.ComponentProps<typeof BaseNumberField.Input>\n\nconst NumberFieldInput = ({ className, ...props }: NumberFieldInputProps) => {\n return (\n <BaseNumberField.Input\n className={cn(\n 'h-9 w-24 border-t border-b border-border bg-transparent text-center text-base text-foreground tabular-nums outline-none',\n className,\n )}\n {...props}\n />\n )\n}\n\nNumberFieldInput.displayName = 'NumberFieldInput'\n\n// ============================================================================\n// NumberFieldDecrement\n// ============================================================================\n\ntype NumberFieldDecrementProps = React.ComponentProps<typeof BaseNumberField.Decrement>\n\nconst NumberFieldDecrement = ({ className, ...props }: NumberFieldDecrementProps) => {\n return (\n <BaseNumberField.Decrement\n className={cn(\n 'flex size-9 items-center justify-center rounded-l-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted',\n className,\n )}\n {...props}\n />\n )\n}\n\nNumberFieldDecrement.displayName = 'NumberFieldDecrement'\n\n// ============================================================================\n// NumberFieldIncrement\n// ============================================================================\n\ntype NumberFieldIncrementProps = React.ComponentProps<typeof BaseNumberField.Increment>\n\nconst NumberFieldIncrement = ({ className, ...props }: NumberFieldIncrementProps) => {\n return (\n <BaseNumberField.Increment\n className={cn(\n 'flex size-9 items-center justify-center rounded-r-md border border-border bg-background text-foreground select-none transition-colors hover:bg-muted active:bg-muted',\n className,\n )}\n {...props}\n />\n )\n}\n\nNumberFieldIncrement.displayName = 'NumberFieldIncrement'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n NumberFieldRoot,\n NumberFieldScrubArea,\n NumberFieldScrubAreaCursor,\n NumberFieldGroup,\n NumberFieldInput,\n NumberFieldDecrement,\n NumberFieldIncrement,\n}\n\nexport type {\n NumberFieldRootProps,\n NumberFieldScrubAreaProps,\n NumberFieldScrubAreaCursorProps,\n NumberFieldGroupProps,\n NumberFieldInputProps,\n NumberFieldDecrementProps,\n NumberFieldIncrementProps,\n}\n"],"mappings":";;;;;;;;;AAcA,MAAM,mBAAmB,EAAE,WAAW,GAAG,YAAkC;AACzE,QAAO,oBAACA,YAAgB;EAAK,WAAW,GAAG,iBAAiB,UAAU;EAAE,GAAI;GAAS;;AAGvF,gBAAgB,cAAc;AAQ9B,MAAM,wBAAwB,EAAE,WAAW,GAAG,YAAuC;AACnF,QACE,oBAACA,YAAgB;EACf,WAAW,GAAG,gCAAgC,UAAU;EACxD,GAAI;GACJ;;AAIN,qBAAqB,cAAc;AAUnC,MAAM,8BAA8B,EAClC,WACA,GAAG,YACkC;AACrC,QACE,oBAACA,YAAgB;EACf,WAAW,GAAG,kDAAkD,UAAU;EAC1E,GAAI;GACJ;;AAIN,2BAA2B,cAAc;AAQzC,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QAAO,oBAACA,YAAgB;EAAM,WAAW,GAAG,QAAQ,UAAU;EAAE,GAAI;GAAS;;AAG/E,iBAAiB,cAAc;AAQ/B,MAAM,oBAAoB,EAAE,WAAW,GAAG,YAAmC;AAC3E,QACE,oBAACA,YAAgB;EACf,WAAW,GACT,2HACA,UACD;EACD,GAAI;GACJ;;AAIN,iBAAiB,cAAc;AAQ/B,MAAM,wBAAwB,EAAE,WAAW,GAAG,YAAuC;AACnF,QACE,oBAACA,YAAgB;EACf,WAAW,GACT,wKACA,UACD;EACD,GAAI;GACJ;;AAIN,qBAAqB,cAAc;AAQnC,MAAM,wBAAwB,EAAE,WAAW,GAAG,YAAuC;AACnF,QACE,oBAACA,YAAgB;EACf,WAAW,GACT,wKACA,UACD;EACD,GAAI;GACJ;;AAIN,qBAAqB,cAAc"}
|
package/dist/popover.d.ts
CHANGED
|
@@ -1,82 +1,90 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime106 from "react/jsx-runtime";
|
|
3
|
+
import { Popover } from "@base-ui/react/popover";
|
|
4
|
+
|
|
5
|
+
//#region src/components/popover.d.ts
|
|
6
|
+
type PopoverRootProps = React.ComponentProps<typeof Popover.Root>;
|
|
7
|
+
declare const PopoverRoot: {
|
|
8
|
+
(props: PopoverRootProps): react_jsx_runtime106.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
type PopoverTriggerProps = React.ComponentProps<typeof Popover.Trigger>;
|
|
12
|
+
declare const PopoverTrigger: {
|
|
13
|
+
({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: PopoverTriggerProps): react_jsx_runtime106.JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
type PopoverPortalProps = React.ComponentProps<typeof Popover.Portal>;
|
|
20
|
+
declare const PopoverPortal: {
|
|
21
|
+
(props: PopoverPortalProps): react_jsx_runtime106.JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
type PopoverBackdropProps = React.ComponentProps<typeof Popover.Backdrop>;
|
|
25
|
+
declare const PopoverBackdrop: {
|
|
26
|
+
({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: PopoverBackdropProps): react_jsx_runtime106.JSX.Element;
|
|
30
|
+
displayName: string;
|
|
31
|
+
};
|
|
32
|
+
type PopoverPositionerProps = React.ComponentProps<typeof Popover.Positioner>;
|
|
33
|
+
declare const PopoverPositioner: {
|
|
34
|
+
({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: PopoverPositionerProps): react_jsx_runtime106.JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
type PopoverPopupProps = React.ComponentProps<typeof Popover.Popup>;
|
|
41
|
+
declare const PopoverPopup: {
|
|
42
|
+
({
|
|
43
|
+
className,
|
|
44
|
+
...props
|
|
45
|
+
}: PopoverPopupProps): react_jsx_runtime106.JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
48
|
+
type PopoverArrowProps = React.ComponentProps<typeof Popover.Arrow>;
|
|
49
|
+
declare const PopoverArrow: {
|
|
50
|
+
({
|
|
51
|
+
className,
|
|
52
|
+
...props
|
|
53
|
+
}: PopoverArrowProps): react_jsx_runtime106.JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
type PopoverTitleProps = React.ComponentProps<typeof Popover.Title>;
|
|
57
|
+
declare const PopoverTitle: {
|
|
58
|
+
({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: PopoverTitleProps): react_jsx_runtime106.JSX.Element;
|
|
62
|
+
displayName: string;
|
|
63
|
+
};
|
|
64
|
+
type PopoverDescriptionProps = React.ComponentProps<typeof Popover.Description>;
|
|
65
|
+
declare const PopoverDescription: {
|
|
66
|
+
({
|
|
67
|
+
className,
|
|
68
|
+
...props
|
|
69
|
+
}: PopoverDescriptionProps): react_jsx_runtime106.JSX.Element;
|
|
70
|
+
displayName: string;
|
|
71
|
+
};
|
|
72
|
+
type PopoverCloseProps = React.ComponentProps<typeof Popover.Close>;
|
|
73
|
+
declare const PopoverClose: {
|
|
74
|
+
({
|
|
75
|
+
className,
|
|
76
|
+
...props
|
|
77
|
+
}: PopoverCloseProps): react_jsx_runtime106.JSX.Element;
|
|
78
|
+
displayName: string;
|
|
79
|
+
};
|
|
80
|
+
type PopoverViewportProps = React.ComponentProps<typeof Popover.Viewport>;
|
|
81
|
+
declare const PopoverViewport: {
|
|
82
|
+
({
|
|
83
|
+
className,
|
|
84
|
+
...props
|
|
85
|
+
}: PopoverViewportProps): react_jsx_runtime106.JSX.Element;
|
|
86
|
+
displayName: string;
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
export { PopoverArrow, type PopoverArrowProps, PopoverBackdrop, type PopoverBackdropProps, PopoverClose, type PopoverCloseProps, PopoverDescription, type PopoverDescriptionProps, PopoverPopup, type PopoverPopupProps, PopoverPortal, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerProps, PopoverRoot, type PopoverRootProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, PopoverViewport, type PopoverViewportProps };
|
|
90
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","names":[],"sources":["../src/components/popover.tsx"],"sourcesContent":[],"mappings":"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"}
|
package/dist/popover.js
CHANGED
|
@@ -1,95 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const d = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
13
|
-
r.Backdrop,
|
|
14
|
-
{
|
|
15
|
-
className: a(
|
|
16
|
-
"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
|
|
17
|
-
"transition-opacity duration-200",
|
|
18
|
-
"data-starting-style:opacity-0 data-ending-style:opacity-0",
|
|
19
|
-
o
|
|
20
|
-
),
|
|
21
|
-
...t
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
d.displayName = "PopoverBackdrop";
|
|
25
|
-
const l = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
26
|
-
r.Positioner,
|
|
27
|
-
{
|
|
28
|
-
className: a(
|
|
29
|
-
"z-50 outline-none",
|
|
30
|
-
"h-(--positioner-height) w-(--positioner-width)",
|
|
31
|
-
"max-w-(--available-width)",
|
|
32
|
-
"transition-[top,left,right,bottom,transform]",
|
|
33
|
-
"duration-[0.35s]",
|
|
34
|
-
"ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
35
|
-
"data-instant:transition-none",
|
|
36
|
-
o
|
|
37
|
-
),
|
|
38
|
-
sideOffset: 8,
|
|
39
|
-
...t
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
l.displayName = "PopoverPositioner";
|
|
43
|
-
const c = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
44
|
-
r.Popup,
|
|
45
|
-
{
|
|
46
|
-
className: a(
|
|
47
|
-
"rounded-md bg-background px-4 py-3 text-foreground shadow-sm border relative",
|
|
48
|
-
"h-(--popup-height,auto) w-(--popup-width,auto)",
|
|
49
|
-
"max-w-[500px]",
|
|
50
|
-
"origin-(--transform-origin)",
|
|
51
|
-
"border-border",
|
|
52
|
-
"transition-[transform,scale,opacity]",
|
|
53
|
-
"data-ending-style:scale-90 data-ending-style:opacity-0",
|
|
54
|
-
"data-starting-style:scale-90 data-starting-style:opacity-0",
|
|
55
|
-
"dark:shadow-none",
|
|
56
|
-
"origin-(--transform-origin)",
|
|
57
|
-
o
|
|
58
|
-
),
|
|
59
|
-
...t
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
c.displayName = "PopoverPopup";
|
|
63
|
-
const m = ({ className: o, ...t }) => /* @__PURE__ */ e(
|
|
64
|
-
r.Arrow,
|
|
65
|
-
{
|
|
66
|
-
className: a(
|
|
67
|
-
"flex data-[side=bottom]:top-[-9px] data-[side=left]:right-[-14px] data-[side=left]:rotate-90 data-[side=right]:left-[-14px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-11px] data-[side=top]:rotate-180",
|
|
68
|
-
o
|
|
69
|
-
),
|
|
70
|
-
...t,
|
|
71
|
-
children: /* @__PURE__ */ e(i, {})
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
m.displayName = "PopoverArrow";
|
|
75
|
-
const P = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Title, { className: a("text-sm font-semibold", o), ...t });
|
|
76
|
-
P.displayName = "PopoverTitle";
|
|
77
|
-
const g = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Description, { className: a("text-sm", o), ...t });
|
|
78
|
-
g.displayName = "PopoverDescription";
|
|
79
|
-
const u = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Close, { className: a(o), ...t });
|
|
80
|
-
u.displayName = "PopoverClose";
|
|
81
|
-
const v = ({ className: o, ...t }) => /* @__PURE__ */ e(r.Viewport, { className: a(o), ...t });
|
|
82
|
-
v.displayName = "PopoverViewport";
|
|
83
|
-
export {
|
|
84
|
-
m as PopoverArrow,
|
|
85
|
-
d as PopoverBackdrop,
|
|
86
|
-
u as PopoverClose,
|
|
87
|
-
g as PopoverDescription,
|
|
88
|
-
c as PopoverPopup,
|
|
89
|
-
n as PopoverPortal,
|
|
90
|
-
l as PopoverPositioner,
|
|
91
|
-
s as PopoverRoot,
|
|
92
|
-
P as PopoverTitle,
|
|
93
|
-
p as PopoverTrigger,
|
|
94
|
-
v as PopoverViewport
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { ArrowSvg } from "./lib/arrow-svg.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Popover } from "@base-ui/react/popover";
|
|
8
|
+
|
|
9
|
+
//#region src/components/popover.tsx
|
|
10
|
+
const PopoverRoot = (props) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Popover.Root, { ...props });
|
|
95
12
|
};
|
|
13
|
+
PopoverRoot.displayName = "PopoverRoot";
|
|
14
|
+
const PopoverTrigger = ({ className, ...props }) => {
|
|
15
|
+
return /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
16
|
+
className: cn(className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
21
|
+
const PopoverPortal = (props) => {
|
|
22
|
+
return /* @__PURE__ */ jsx(Popover.Portal, { ...props });
|
|
23
|
+
};
|
|
24
|
+
PopoverPortal.displayName = "PopoverPortal";
|
|
25
|
+
const PopoverBackdrop = ({ className, ...props }) => {
|
|
26
|
+
return /* @__PURE__ */ jsx(Popover.Backdrop, {
|
|
27
|
+
className: cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm", "transition-opacity duration-200", "data-starting-style:opacity-0 data-ending-style:opacity-0", className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
PopoverBackdrop.displayName = "PopoverBackdrop";
|
|
32
|
+
const PopoverPositioner = ({ className, ...props }) => {
|
|
33
|
+
return /* @__PURE__ */ jsx(Popover.Positioner, {
|
|
34
|
+
className: cn("z-50 outline-none", "h-(--positioner-height) w-(--positioner-width)", "max-w-(--available-width)", "transition-[top,left,right,bottom,transform]", "duration-[0.35s]", "ease-[cubic-bezier(0.22,1,0.36,1)]", "data-instant:transition-none", className),
|
|
35
|
+
sideOffset: 8,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
PopoverPositioner.displayName = "PopoverPositioner";
|
|
40
|
+
const PopoverPopup = ({ className, ...props }) => {
|
|
41
|
+
return /* @__PURE__ */ jsx(Popover.Popup, {
|
|
42
|
+
className: cn("rounded-md bg-background px-4 py-3 text-foreground shadow-sm border relative", "h-(--popup-height,auto) w-(--popup-width,auto)", "max-w-[500px]", "origin-(--transform-origin)", "border-border", "transition-[transform,scale,opacity]", "data-ending-style:scale-90 data-ending-style:opacity-0", "data-starting-style:scale-90 data-starting-style:opacity-0", "dark:shadow-none", "origin-(--transform-origin)", className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
PopoverPopup.displayName = "PopoverPopup";
|
|
47
|
+
const PopoverArrow = ({ className, ...props }) => {
|
|
48
|
+
return /* @__PURE__ */ jsx(Popover.Arrow, {
|
|
49
|
+
className: cn("flex data-[side=bottom]:top-[-9px] data-[side=left]:right-[-14px] data-[side=left]:rotate-90 data-[side=right]:left-[-14px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-11px] data-[side=top]:rotate-180", className),
|
|
50
|
+
...props,
|
|
51
|
+
children: /* @__PURE__ */ jsx(ArrowSvg, {})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
PopoverArrow.displayName = "PopoverArrow";
|
|
55
|
+
const PopoverTitle = ({ className, ...props }) => {
|
|
56
|
+
return /* @__PURE__ */ jsx(Popover.Title, {
|
|
57
|
+
className: cn("text-sm font-semibold", className),
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
62
|
+
const PopoverDescription = ({ className, ...props }) => {
|
|
63
|
+
return /* @__PURE__ */ jsx(Popover.Description, {
|
|
64
|
+
className: cn("text-sm", className),
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
69
|
+
const PopoverClose = ({ className, ...props }) => {
|
|
70
|
+
return /* @__PURE__ */ jsx(Popover.Close, {
|
|
71
|
+
className: cn(className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
PopoverClose.displayName = "PopoverClose";
|
|
76
|
+
const PopoverViewport = ({ className, ...props }) => {
|
|
77
|
+
return /* @__PURE__ */ jsx(Popover.Viewport, {
|
|
78
|
+
className: cn(className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
PopoverViewport.displayName = "PopoverViewport";
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { PopoverArrow, PopoverBackdrop, PopoverClose, PopoverDescription, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, PopoverViewport };
|
|
86
|
+
//# sourceMappingURL=popover.js.map
|