@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/toggle.d.ts
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
variant
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { ControlSize, ControlVariant } from "./lib/control-variants.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime204 from "react/jsx-runtime";
|
|
4
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toggle.d.ts
|
|
7
|
+
type ToggleProps = React.ComponentProps<typeof Toggle$1> & {
|
|
8
|
+
/** Visual style of the toggle */
|
|
9
|
+
variant?: ControlVariant;
|
|
10
|
+
/** Size of the toggle */
|
|
11
|
+
size?: ControlSize;
|
|
12
|
+
};
|
|
13
|
+
declare const Toggle: {
|
|
14
|
+
({
|
|
15
|
+
className,
|
|
16
|
+
variant,
|
|
17
|
+
size,
|
|
18
|
+
...props
|
|
19
|
+
}: ToggleProps): react_jsx_runtime204.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Toggle, type ToggleProps };
|
|
24
|
+
//# sourceMappingURL=toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","names":[],"sources":["../src/components/toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;KAgBK,WAAA,GAAc,KAAA,CAAM,sBAAsB;;YAEnC;EAFP;EAAW,IAAA,CAAA,EAIP,WAJO;;cAOV,MAPmB,EAAA;;IAEb,SAAA;IAAA,OAAA;IAAA,IAAA;IAAA,GAAA;EAAA,CAAA,EAK4C,WAL5C,CAAA,EAKuD,oBAAA,CAAA,GAAA,CAAA,OALvD;aAEH,EAAA,MAAA;CAAW"}
|
package/dist/toggle.js
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { controlVariants } from "./lib/control-variants.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
8
|
+
|
|
9
|
+
//#region src/components/toggle.tsx
|
|
10
|
+
const Toggle = ({ className, variant, size, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
12
|
+
className: cn(controlVariants({
|
|
13
|
+
variant,
|
|
14
|
+
size
|
|
15
|
+
}), className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
16
18
|
};
|
|
19
|
+
Toggle.displayName = "Toggle";
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Toggle };
|
|
23
|
+
//# sourceMappingURL=toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.js","names":["BaseToggle"],"sources":["../src/components/toggle.tsx"],"sourcesContent":["'use client'\n\nimport { Toggle as BaseToggle } from '@base-ui/react/toggle'\nimport * as React from 'react'\n\nimport {\n type ControlSize,\n type ControlVariant,\n controlVariants,\n} from '../lib/control-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// Toggle\n// ============================================================================\n\ntype ToggleProps = React.ComponentProps<typeof BaseToggle> & {\n /** Visual style of the toggle */\n variant?: ControlVariant\n /** Size of the toggle */\n size?: ControlSize\n}\n\nconst Toggle = ({ className, variant, size, ...props }: ToggleProps) => {\n return (\n <BaseToggle\n className={cn(controlVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nToggle.displayName = 'Toggle'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { Toggle }\n\nexport type { ToggleProps }\n"],"mappings":";;;;;;;;;AAuBA,MAAM,UAAU,EAAE,WAAW,SAAS,MAAM,GAAG,YAAyB;AACtE,QACE,oBAACA;EACC,WAAW,GAAG,gBAAgB;GAAE;GAAS;GAAM,CAAC,EAAE,UAAU;EAC5D,GAAI;GACJ;;AAIN,OAAO,cAAc"}
|
package/dist/toolbar.d.ts
CHANGED
|
@@ -1,56 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
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
|
-
|
|
1
|
+
import { ControlSize, ControlVariant } from "./lib/control-variants.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime165 from "react/jsx-runtime";
|
|
4
|
+
import { Toolbar } from "@base-ui/react/toolbar";
|
|
5
|
+
|
|
6
|
+
//#region src/components/toolbar.d.ts
|
|
7
|
+
type ToolbarRootProps = React.ComponentProps<typeof Toolbar.Root>;
|
|
8
|
+
declare const ToolbarRoot: {
|
|
9
|
+
({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: ToolbarRootProps): react_jsx_runtime165.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
type ToolbarButtonProps = React.ComponentProps<typeof Toolbar.Button> & {
|
|
16
|
+
/** Visual style of the toolbar button */
|
|
17
|
+
variant?: ControlVariant;
|
|
18
|
+
/** Size of the toolbar button */
|
|
19
|
+
size?: ControlSize;
|
|
20
|
+
};
|
|
21
|
+
declare const ToolbarButton: {
|
|
22
|
+
({
|
|
23
|
+
className,
|
|
24
|
+
variant,
|
|
25
|
+
size,
|
|
26
|
+
...props
|
|
27
|
+
}: ToolbarButtonProps): react_jsx_runtime165.JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
type ToolbarLinkProps = React.ComponentProps<typeof Toolbar.Link>;
|
|
31
|
+
declare const ToolbarLink: {
|
|
32
|
+
({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: ToolbarLinkProps): react_jsx_runtime165.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
type ToolbarInputProps = React.ComponentProps<typeof Toolbar.Input>;
|
|
39
|
+
declare const ToolbarInput: {
|
|
40
|
+
({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: ToolbarInputProps): react_jsx_runtime165.JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
type ToolbarGroupProps = React.ComponentProps<typeof Toolbar.Group>;
|
|
47
|
+
declare const ToolbarGroup: {
|
|
48
|
+
({
|
|
49
|
+
className,
|
|
50
|
+
...props
|
|
51
|
+
}: ToolbarGroupProps): react_jsx_runtime165.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
type ToolbarSeparatorProps = React.ComponentProps<typeof Toolbar.Separator>;
|
|
55
|
+
declare const ToolbarSeparator: {
|
|
56
|
+
({
|
|
57
|
+
className,
|
|
58
|
+
...props
|
|
59
|
+
}: ToolbarSeparatorProps): react_jsx_runtime165.JSX.Element;
|
|
60
|
+
displayName: string;
|
|
61
|
+
};
|
|
62
|
+
//#endregion
|
|
63
|
+
export { ToolbarButton, type ToolbarButtonProps, ToolbarGroup, type ToolbarGroupProps, ToolbarInput, type ToolbarInputProps, ToolbarLink, type ToolbarLinkProps, ToolbarRoot, type ToolbarRootProps, ToolbarSeparator, type ToolbarSeparatorProps };
|
|
64
|
+
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","names":[],"sources":["../src/components/toolbar.tsx"],"sourcesContent":[],"mappings":";;;;;;KAgBK,gBAAA,GAAmB,KAAA,CAAM,sBAAsB,OAAA,CAAY;cAE1D;;;;KAAwC,mBAAgB,oBAAA,CAAA,GAAA,CAAA;EAFzD,WAAA,EAAA,MAAgB;CAAA;KAoBhB,kBAAA,GAAqB,KAAA,CAAM,cApBgC,CAAA,OAoBV,OAAA,CAAY,MApBF,CAAA,GAAA;;EAApB,OAAA,CAAA,EAsBhC,cAtBgC;EAEtC;EAUL,IAAA,CAAA,EAYQ,WAZR;;cAeK,aAzBwC,EAAA;;IAAgB,SAAA;IAAA,OAAA;IAAA,IAAA;IAAA,GAAA;EAAA,CAAA,EA8B3D,kBA9B2D,CAAA,EA8BzC,oBAAA,CAAA,GAAA,CAAA,OA9ByC;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KA6CzD,gBAAA,GAAmB,KAAA,CAAM,cA3BP,CAAA,OA2B6B,OAAA,CAAY,IA3BzC,CAAA;cA6BjB,WA7B4D,EAAA;;IAAxC,SAAM;IAAA,GAAA;EAAA,CAAA,EA6Bc,gBA7Bd,CAAA,EA6B8B,oBAAA,CAAA,GAAA,CAAA,OA7B9B;aAEpB,EAAA,MAAA;;KA6CP,iBAAA,GAAoB,KAAA,CAAM,cA3CX,CAAA,OA2CiC,OAAA,CAAY,KA3C7C,CAAA;AAAA,cA6Cd,YA9BL,EAAA;EAAA,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EA8B8C,iBA9B9C,CAAA,EA8B+D,oBAAA,CAAA,GAAA,CAAA,OA9B/D;;;KAgDI,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,OAAA,CAAY;cAE3D,YAzDH,EAAA;;IAAkB,SAAA;IAAA,GAAA;EAAA,CAAA,EAyD0B,iBAzD1B,CAAA,EAyD2C,oBAAA,CAAA,GAAA,CAAA,OAzD3C;EAAA,WAAA,EAAA,MAAA;AAAA,CAAA;KAqEhB,qBAAA,GAAwB,KAAA,CAAM,cAtDd,CAAA,OAsDoC,OAAA,CAAY,SAtDhD,CAAA;cAwDf,gBAxD0D,EAAA;;IAAxC,SAAM;IAAA,GAAA;EAAA,CAAA,EAwDqB,qBAxDrB,CAAA,EAwD0C,oBAAA,CAAA,GAAA,CAAA,OAxD1C;EAAc,WAAA,EAAA,MAAA;AAAA,CAAA"}
|
package/dist/toolbar.js
CHANGED
|
@@ -1,69 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
);
|
|
16
|
-
m.displayName = "ToolbarRoot";
|
|
17
|
-
const p = ({
|
|
18
|
-
className: o,
|
|
19
|
-
variant: r = "ghost",
|
|
20
|
-
size: n,
|
|
21
|
-
...s
|
|
22
|
-
}) => /* @__PURE__ */ e(
|
|
23
|
-
a.Button,
|
|
24
|
-
{
|
|
25
|
-
className: t(l({ variant: r, size: n }), o),
|
|
26
|
-
...s
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
p.displayName = "ToolbarButton";
|
|
30
|
-
const d = ({ className: o, ...r }) => /* @__PURE__ */ e(
|
|
31
|
-
a.Link,
|
|
32
|
-
{
|
|
33
|
-
className: t(
|
|
34
|
-
"text-sm text-muted-foreground no-underline hover:text-foreground",
|
|
35
|
-
o
|
|
36
|
-
),
|
|
37
|
-
...r
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
d.displayName = "ToolbarLink";
|
|
41
|
-
const u = ({ className: o, ...r }) => /* @__PURE__ */ e(
|
|
42
|
-
a.Input,
|
|
43
|
-
{
|
|
44
|
-
className: t(
|
|
45
|
-
"h-8 rounded-md border border-border bg-background px-2 text-sm outline-none",
|
|
46
|
-
o
|
|
47
|
-
),
|
|
48
|
-
...r
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
u.displayName = "ToolbarInput";
|
|
52
|
-
const b = ({ className: o, ...r }) => /* @__PURE__ */ e(a.Group, { className: t("flex items-center gap-1", o), ...r });
|
|
53
|
-
b.displayName = "ToolbarGroup";
|
|
54
|
-
const c = ({ className: o, ...r }) => /* @__PURE__ */ e(
|
|
55
|
-
a.Separator,
|
|
56
|
-
{
|
|
57
|
-
className: t("mx-1 h-4 w-px shrink-0 bg-border", o),
|
|
58
|
-
...r
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
c.displayName = "ToolbarSeparator";
|
|
62
|
-
export {
|
|
63
|
-
p as ToolbarButton,
|
|
64
|
-
b as ToolbarGroup,
|
|
65
|
-
u as ToolbarInput,
|
|
66
|
-
d as ToolbarLink,
|
|
67
|
-
m as ToolbarRoot,
|
|
68
|
-
c as ToolbarSeparator
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { controlVariants } from "./lib/control-variants.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Toolbar } from "@base-ui/react/toolbar";
|
|
8
|
+
|
|
9
|
+
//#region src/components/toolbar.tsx
|
|
10
|
+
const ToolbarRoot = ({ className, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Toolbar.Root, {
|
|
12
|
+
className: cn("flex items-center gap-1 flex-wrap rounded-md border border-border bg-muted p-1", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
69
15
|
};
|
|
16
|
+
ToolbarRoot.displayName = "ToolbarRoot";
|
|
17
|
+
const ToolbarButton = ({ className, variant = "ghost", size, ...props }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(Toolbar.Button, {
|
|
19
|
+
className: cn(controlVariants({
|
|
20
|
+
variant,
|
|
21
|
+
size
|
|
22
|
+
}), className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
ToolbarButton.displayName = "ToolbarButton";
|
|
27
|
+
const ToolbarLink = ({ className, ...props }) => {
|
|
28
|
+
return /* @__PURE__ */ jsx(Toolbar.Link, {
|
|
29
|
+
className: cn("text-sm text-muted-foreground no-underline hover:text-foreground", className),
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
ToolbarLink.displayName = "ToolbarLink";
|
|
34
|
+
const ToolbarInput = ({ className, ...props }) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(Toolbar.Input, {
|
|
36
|
+
className: cn("h-8 rounded-md border border-border bg-background px-2 text-sm outline-none", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
ToolbarInput.displayName = "ToolbarInput";
|
|
41
|
+
const ToolbarGroup = ({ className, ...props }) => {
|
|
42
|
+
return /* @__PURE__ */ jsx(Toolbar.Group, {
|
|
43
|
+
className: cn("flex items-center gap-1", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
ToolbarGroup.displayName = "ToolbarGroup";
|
|
48
|
+
const ToolbarSeparator = ({ className, ...props }) => {
|
|
49
|
+
return /* @__PURE__ */ jsx(Toolbar.Separator, {
|
|
50
|
+
className: cn("mx-1 h-4 w-px shrink-0 bg-border", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
ToolbarSeparator.displayName = "ToolbarSeparator";
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { ToolbarButton, ToolbarGroup, ToolbarInput, ToolbarLink, ToolbarRoot, ToolbarSeparator };
|
|
58
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","names":["BaseToolbar"],"sources":["../src/components/toolbar.tsx"],"sourcesContent":["'use client'\n\nimport { Toolbar as BaseToolbar } from '@base-ui/react/toolbar'\nimport * as React from 'react'\n\nimport {\n type ControlSize,\n type ControlVariant,\n controlVariants,\n} from '../lib/control-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// ToolbarRoot\n// ============================================================================\n\ntype ToolbarRootProps = React.ComponentProps<typeof BaseToolbar.Root>\n\nconst ToolbarRoot = ({ className, ...props }: ToolbarRootProps) => {\n return (\n <BaseToolbar.Root\n className={cn(\n 'flex items-center gap-1 flex-wrap rounded-md border border-border bg-muted p-1',\n className,\n )}\n {...props}\n />\n )\n}\n\nToolbarRoot.displayName = 'ToolbarRoot'\n\n// ============================================================================\n// ToolbarButton\n// ============================================================================\n\ntype ToolbarButtonProps = React.ComponentProps<typeof BaseToolbar.Button> & {\n /** Visual style of the toolbar button */\n variant?: ControlVariant\n /** Size of the toolbar button */\n size?: ControlSize\n}\n\nconst ToolbarButton = ({\n className,\n variant = 'ghost',\n size,\n ...props\n}: ToolbarButtonProps) => {\n return (\n <BaseToolbar.Button\n className={cn(controlVariants({ variant, size }), className)}\n {...props}\n />\n )\n}\n\nToolbarButton.displayName = 'ToolbarButton'\n\n// ============================================================================\n// ToolbarLink\n// ============================================================================\n\ntype ToolbarLinkProps = React.ComponentProps<typeof BaseToolbar.Link>\n\nconst ToolbarLink = ({ className, ...props }: ToolbarLinkProps) => {\n return (\n <BaseToolbar.Link\n className={cn(\n 'text-sm text-muted-foreground no-underline hover:text-foreground',\n className,\n )}\n {...props}\n />\n )\n}\n\nToolbarLink.displayName = 'ToolbarLink'\n\n// ============================================================================\n// ToolbarInput\n// ============================================================================\n\ntype ToolbarInputProps = React.ComponentProps<typeof BaseToolbar.Input>\n\nconst ToolbarInput = ({ className, ...props }: ToolbarInputProps) => {\n return (\n <BaseToolbar.Input\n className={cn(\n 'h-8 rounded-md border border-border bg-background px-2 text-sm outline-none',\n className,\n )}\n {...props}\n />\n )\n}\n\nToolbarInput.displayName = 'ToolbarInput'\n\n// ============================================================================\n// ToolbarGroup\n// ============================================================================\n\ntype ToolbarGroupProps = React.ComponentProps<typeof BaseToolbar.Group>\n\nconst ToolbarGroup = ({ className, ...props }: ToolbarGroupProps) => {\n return (\n <BaseToolbar.Group className={cn('flex items-center gap-1', className)} {...props} />\n )\n}\n\nToolbarGroup.displayName = 'ToolbarGroup'\n\n// ============================================================================\n// ToolbarSeparator\n// ============================================================================\n\ntype ToolbarSeparatorProps = React.ComponentProps<typeof BaseToolbar.Separator>\n\nconst ToolbarSeparator = ({ className, ...props }: ToolbarSeparatorProps) => {\n return (\n <BaseToolbar.Separator\n className={cn('mx-1 h-4 w-px shrink-0 bg-border', className)}\n {...props}\n />\n )\n}\n\nToolbarSeparator.displayName = 'ToolbarSeparator'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n ToolbarRoot,\n ToolbarButton,\n ToolbarLink,\n ToolbarInput,\n ToolbarGroup,\n ToolbarSeparator,\n}\n\nexport type {\n ToolbarRootProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarInputProps,\n ToolbarGroupProps,\n ToolbarSeparatorProps,\n}\n"],"mappings":";;;;;;;;;AAkBA,MAAM,eAAe,EAAE,WAAW,GAAG,YAA8B;AACjE,QACE,oBAACA,QAAY;EACX,WAAW,GACT,kFACA,UACD;EACD,GAAI;GACJ;;AAIN,YAAY,cAAc;AAa1B,MAAM,iBAAiB,EACrB,WACA,UAAU,S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|
-
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import { TooltipVariant } from "./lib/tooltip-variants.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_jsx_runtime181 from "react/jsx-runtime";
|
|
4
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
5
|
+
|
|
6
|
+
//#region src/components/tooltip.d.ts
|
|
7
|
+
type TooltipProviderProps = React.ComponentProps<typeof Tooltip.Provider>;
|
|
8
|
+
declare const TooltipProvider: {
|
|
9
|
+
(props: TooltipProviderProps): react_jsx_runtime181.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
type TooltipRootProps = React.ComponentProps<typeof Tooltip.Root> & {
|
|
13
|
+
variant?: TooltipVariant;
|
|
14
|
+
};
|
|
15
|
+
declare const TooltipRoot: {
|
|
16
|
+
({
|
|
17
|
+
variant,
|
|
18
|
+
...props
|
|
19
|
+
}: TooltipRootProps): react_jsx_runtime181.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
type TooltipTriggerProps = React.ComponentProps<typeof Tooltip.Trigger>;
|
|
23
|
+
declare const TooltipTrigger: {
|
|
24
|
+
({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: TooltipTriggerProps): react_jsx_runtime181.JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
type TooltipPortalProps = React.ComponentProps<typeof Tooltip.Portal>;
|
|
31
|
+
declare const TooltipPortal: {
|
|
32
|
+
(props: TooltipPortalProps): react_jsx_runtime181.JSX.Element;
|
|
33
|
+
displayName: string;
|
|
34
|
+
};
|
|
35
|
+
type TooltipPositionerProps = React.ComponentProps<typeof Tooltip.Positioner>;
|
|
36
|
+
declare const TooltipPositioner: {
|
|
37
|
+
({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: TooltipPositionerProps): react_jsx_runtime181.JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
type TooltipPopupProps = React.ComponentProps<typeof Tooltip.Popup> & {
|
|
44
|
+
variant?: TooltipVariant;
|
|
45
|
+
};
|
|
46
|
+
declare const TooltipPopup: {
|
|
47
|
+
({
|
|
48
|
+
className,
|
|
49
|
+
variant,
|
|
50
|
+
...props
|
|
51
|
+
}: TooltipPopupProps): react_jsx_runtime181.JSX.Element;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
type TooltipArrowProps = React.ComponentProps<typeof Tooltip.Arrow> & {
|
|
55
|
+
variant?: TooltipVariant;
|
|
56
|
+
};
|
|
57
|
+
declare const TooltipArrow: {
|
|
58
|
+
({
|
|
59
|
+
className,
|
|
60
|
+
variant,
|
|
61
|
+
...props
|
|
62
|
+
}: TooltipArrowProps): react_jsx_runtime181.JSX.Element;
|
|
63
|
+
displayName: string;
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { TooltipArrow, type TooltipArrowProps, TooltipPopup, type TooltipPopupProps, TooltipPortal, type TooltipPortalProps, TooltipPositioner, type TooltipPositionerProps, TooltipProvider, type TooltipProviderProps, TooltipRoot, type TooltipRootProps, TooltipTrigger, type TooltipTriggerProps };
|
|
67
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","names":[],"sources":["../src/components/tooltip.tsx"],"sourcesContent":[],"mappings":";;;;;;KAuBK,oBAAA,GAAuB,KAAA,CAAM,sBAAsB,OAAA,CAAY;cAE9D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