@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/tooltip.js
CHANGED
|
@@ -1,93 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"data-ending-style:scale-90 data-ending-style:opacity-0",
|
|
15
|
-
"data-instant:duration-0"
|
|
16
|
-
],
|
|
17
|
-
{
|
|
18
|
-
variants: {
|
|
19
|
-
variant: {
|
|
20
|
-
default: "bg-foreground text-background",
|
|
21
|
-
secondary: "bg-secondary text-secondary-foreground",
|
|
22
|
-
outline: "bg-background text-foreground border border-border shadow-xs"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "default"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
), m = {
|
|
30
|
-
default: {
|
|
31
|
-
fill: "fill-foreground",
|
|
32
|
-
stroke: "fill-foreground"
|
|
33
|
-
},
|
|
34
|
-
secondary: {
|
|
35
|
-
fill: "fill-secondary",
|
|
36
|
-
stroke: "fill-secondary"
|
|
37
|
-
},
|
|
38
|
-
outline: {
|
|
39
|
-
fill: "fill-background",
|
|
40
|
-
stroke: "fill-border"
|
|
41
|
-
}
|
|
42
|
-
}, n = l.createContext("default"), g = (t) => /* @__PURE__ */ r(a.Provider, { ...t });
|
|
43
|
-
g.displayName = "TooltipProvider";
|
|
44
|
-
const y = ({ variant: t = "default", ...o }) => /* @__PURE__ */ r(n.Provider, { value: t, children: /* @__PURE__ */ r(a.Root, { ...o }) });
|
|
45
|
-
y.displayName = "TooltipRoot";
|
|
46
|
-
const x = ({ className: t, ...o }) => /* @__PURE__ */ r(a.Trigger, { className: e(t), delay: 200, ...o });
|
|
47
|
-
x.displayName = "TooltipTrigger";
|
|
48
|
-
const T = (t) => /* @__PURE__ */ r(a.Portal, { ...t });
|
|
49
|
-
T.displayName = "TooltipPortal";
|
|
50
|
-
const v = ({ className: t, ...o }) => /* @__PURE__ */ r(
|
|
51
|
-
a.Positioner,
|
|
52
|
-
{
|
|
53
|
-
className: e("z-50 outline-none", t),
|
|
54
|
-
sideOffset: 8,
|
|
55
|
-
...o
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
v.displayName = "TooltipPositioner";
|
|
59
|
-
const P = ({ className: t, variant: o, ...i }) => {
|
|
60
|
-
const s = l.useContext(n), d = o ?? s;
|
|
61
|
-
return /* @__PURE__ */ r(
|
|
62
|
-
a.Popup,
|
|
63
|
-
{
|
|
64
|
-
className: e(u({ variant: d }), t),
|
|
65
|
-
...i
|
|
66
|
-
}
|
|
67
|
-
);
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import { ArrowSvg } from "./lib/arrow-svg.js";
|
|
5
|
+
import { tooltipArrowVariants, tooltipPopupVariants } from "./lib/tooltip-variants.js";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
9
|
+
|
|
10
|
+
//#region src/components/tooltip.tsx
|
|
11
|
+
const TooltipVariantContext = React.createContext("default");
|
|
12
|
+
const TooltipProvider = (props) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(Tooltip.Provider, { ...props });
|
|
68
14
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
className: e(
|
|
76
|
-
"flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180",
|
|
77
|
-
t
|
|
78
|
-
),
|
|
79
|
-
...i,
|
|
80
|
-
children: /* @__PURE__ */ r(c, { fillClassName: p.fill, strokeClassName: p.stroke })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
15
|
+
TooltipProvider.displayName = "TooltipProvider";
|
|
16
|
+
const TooltipRoot = ({ variant = "default", ...props }) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(TooltipVariantContext.Provider, {
|
|
18
|
+
value: variant,
|
|
19
|
+
children: /* @__PURE__ */ jsx(Tooltip.Root, { ...props })
|
|
20
|
+
});
|
|
83
21
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
y as TooltipRoot,
|
|
92
|
-
x as TooltipTrigger
|
|
22
|
+
TooltipRoot.displayName = "TooltipRoot";
|
|
23
|
+
const TooltipTrigger = ({ className, ...props }) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
25
|
+
className: cn(className),
|
|
26
|
+
delay: 200,
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
93
29
|
};
|
|
30
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
31
|
+
const TooltipPortal = (props) => {
|
|
32
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, { ...props });
|
|
33
|
+
};
|
|
34
|
+
TooltipPortal.displayName = "TooltipPortal";
|
|
35
|
+
const TooltipPositioner = ({ className, ...props }) => {
|
|
36
|
+
return /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
37
|
+
className: cn("z-50 outline-none", className),
|
|
38
|
+
sideOffset: 8,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
TooltipPositioner.displayName = "TooltipPositioner";
|
|
43
|
+
const TooltipPopup = ({ className, variant, ...props }) => {
|
|
44
|
+
const contextVariant = React.useContext(TooltipVariantContext);
|
|
45
|
+
const resolvedVariant = variant ?? contextVariant;
|
|
46
|
+
return /* @__PURE__ */ jsx(Tooltip.Popup, {
|
|
47
|
+
className: cn(tooltipPopupVariants({ variant: resolvedVariant }), className),
|
|
48
|
+
...props
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
TooltipPopup.displayName = "TooltipPopup";
|
|
52
|
+
const TooltipArrow = ({ className, variant, ...props }) => {
|
|
53
|
+
const contextVariant = React.useContext(TooltipVariantContext);
|
|
54
|
+
const arrowColors = tooltipArrowVariants[variant ?? contextVariant];
|
|
55
|
+
return /* @__PURE__ */ jsx(Tooltip.Arrow, {
|
|
56
|
+
className: cn("flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180", className),
|
|
57
|
+
...props,
|
|
58
|
+
children: /* @__PURE__ */ jsx(ArrowSvg, {
|
|
59
|
+
fillClassName: arrowColors.fill,
|
|
60
|
+
strokeClassName: arrowColors.stroke
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
TooltipArrow.displayName = "TooltipArrow";
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { TooltipArrow, TooltipPopup, TooltipPortal, TooltipPositioner, TooltipProvider, TooltipRoot, TooltipTrigger };
|
|
68
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":["BaseTooltip"],"sources":["../src/components/tooltip.tsx"],"sourcesContent":["'use client'\n\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip'\nimport * as React from 'react'\n\nimport { ArrowSvg } from '../lib/arrow-svg'\nimport {\n type TooltipVariant,\n tooltipArrowVariants,\n tooltipPopupVariants,\n} from '../lib/tooltip-variants'\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// TooltipVariantContext\n// ============================================================================\n\nconst TooltipVariantContext = React.createContext<TooltipVariant>('default')\n\n// ============================================================================\n// TooltipProvider\n// ============================================================================\n\ntype TooltipProviderProps = React.ComponentProps<typeof BaseTooltip.Provider>\n\nconst TooltipProvider = (props: TooltipProviderProps) => {\n return <BaseTooltip.Provider {...props} />\n}\n\nTooltipProvider.displayName = 'TooltipProvider'\n\n// ============================================================================\n// TooltipRoot\n// ============================================================================\n\ntype TooltipRootProps = React.ComponentProps<typeof BaseTooltip.Root> & {\n variant?: TooltipVariant\n}\n\nconst TooltipRoot = ({ variant = 'default', ...props }: TooltipRootProps) => {\n return (\n <TooltipVariantContext.Provider value={variant}>\n <BaseTooltip.Root {...props} />\n </TooltipVariantContext.Provider>\n )\n}\n\nTooltipRoot.displayName = 'TooltipRoot'\n\n// ============================================================================\n// TooltipTrigger\n// ============================================================================\n\ntype TooltipTriggerProps = React.ComponentProps<typeof BaseTooltip.Trigger>\n\nconst TooltipTrigger = ({ className, ...props }: TooltipTriggerProps) => {\n return <BaseTooltip.Trigger className={cn(className)} delay={200} {...props} />\n}\n\nTooltipTrigger.displayName = 'TooltipTrigger'\n\n// ============================================================================\n// TooltipPortal\n// ============================================================================\n\ntype TooltipPortalProps = React.ComponentProps<typeof BaseTooltip.Portal>\n\nconst TooltipPortal = (props: TooltipPortalProps) => {\n return <BaseTooltip.Portal {...props} />\n}\n\nTooltipPortal.displayName = 'TooltipPortal'\n\n// ============================================================================\n// TooltipPositioner\n// ============================================================================\n\ntype TooltipPositionerProps = React.ComponentProps<typeof BaseTooltip.Positioner>\n\nconst TooltipPositioner = ({ className, ...props }: TooltipPositionerProps) => {\n return (\n <BaseTooltip.Positioner\n className={cn('z-50 outline-none', className)}\n sideOffset={8}\n {...props}\n />\n )\n}\n\nTooltipPositioner.displayName = 'TooltipPositioner'\n\n// ============================================================================\n// TooltipPopup\n// ============================================================================\n\ntype TooltipPopupProps = React.ComponentProps<typeof BaseTooltip.Popup> & {\n variant?: TooltipVariant\n}\n\nconst TooltipPopup = ({ className, variant, ...props }: TooltipPopupProps) => {\n const contextVariant = React.useContext(TooltipVariantContext)\n const resolvedVariant = variant ?? contextVariant\n\n return (\n <BaseTooltip.Popup\n className={cn(tooltipPopupVariants({ variant: resolvedVariant }), className)}\n {...props}\n />\n )\n}\n\nTooltipPopup.displayName = 'TooltipPopup'\n\n// ============================================================================\n// TooltipArrow\n// ============================================================================\n\ntype TooltipArrowProps = React.ComponentProps<typeof BaseTooltip.Arrow> & {\n variant?: TooltipVariant\n}\n\nconst TooltipArrow = ({ className, variant, ...props }: TooltipArrowProps) => {\n const contextVariant = React.useContext(TooltipVariantContext)\n const resolvedVariant = variant ?? contextVariant\n const arrowColors = tooltipArrowVariants[resolvedVariant]\n\n return (\n <BaseTooltip.Arrow\n className={cn(\n 'flex data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180',\n className,\n )}\n {...props}\n >\n <ArrowSvg fillClassName={arrowColors.fill} strokeClassName={arrowColors.stroke} />\n </BaseTooltip.Arrow>\n )\n}\n\nTooltipArrow.displayName = 'TooltipArrow'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n TooltipProvider,\n TooltipRoot,\n TooltipTrigger,\n TooltipPortal,\n TooltipPositioner,\n TooltipPopup,\n TooltipArrow,\n}\n\nexport type {\n TooltipProviderProps,\n TooltipRootProps,\n TooltipTriggerProps,\n TooltipPortalProps,\n TooltipPositionerProps,\n TooltipPopupProps,\n TooltipArrowProps,\n}\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,wBAAwB,MAAM,cAA8B,UAAU;AAQ5E,MAAM,mBAAmB,UAAgC;AACvD,QAAO,oBAACA,QAAY,YAAS,GAAI,QAAS;;AAG5C,gBAAgB,cAAc;AAU9B,MAAM,eAAe,EAAE,UAAU,WAAW,GAAG,YAA8B;AAC3E,QACE,oBAAC,sBAAsB;EAAS,OAAO;YACrC,oBAACA,QAAY,QAAK,GAAI,QAAS;GACA;;AAIrC,YAAY,cAAc;AAQ1B,MAAM,kBAAkB,EAAE,WAAW,GAAG,YAAiC;AACvE,QAAO,oBAACA,QAAY;EAAQ,WAAW,GAAG,UAAU;EAAE,OAAO;EAAK,GAAI;GAAS;;AAGjF,eAAe,cAAc;AAQ7B,MAAM,iBAAiB,UAA8B;AACnD,QAAO,oBAACA,QAAY,UAAO,GAAI,QAAS;;AAG1C,cAAc,cAAc;AAQ5B,MAAM,qBAAqB,EAAE,WAAW,GAAG,YAAoC;AAC7E,QACE,oBAACA,QAAY;EACX,WAAW,GAAG,qBAAqB,UAAU;EAC7C,YAAY;EACZ,GAAI;GACJ;;AAIN,kBAAkB,cAAc;AAUhC,MAAM,gBAAgB,EAAE,WAAW,SAAS,GAAG,YAA+B;CAC5E,MAAM,iBAAiB,MAAM,WAAW,sBAAsB;CAC9D,MAAM,kBAAkB,WAAW;AAEnC,QACE,oBAACA,QAAY;EACX,WAAW,GAAG,qBAAqB,EAAE,SAAS,iBAAiB,CAAC,EAAE,UAAU;EAC5E,GAAI;GACJ;;AAIN,aAAa,cAAc;AAU3B,MAAM,gBAAgB,EAAE,WAAW,SAAS,GAAG,YAA+B;CAC5E,MAAM,iBAAiB,MAAM,WAAW,sBAAsB;CAE9D,MAAM,cAAc,qBADI,WAAW;AAGnC,QACE,oBAACA,QAAY;EACX,WAAW,GACT,qNACA,UACD;EACD,GAAI;YAEJ,oBAAC;GAAS,eAAe,YAAY;GAAM,iBAAiB,YAAY;IAAU;GAChE;;AAIxB,aAAa,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lglab/compose-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "A collection of components built with Base UI & Tailwind CSS",
|
|
5
5
|
"author": "LGLab",
|
|
6
6
|
"license": "MIT",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"import": "./dist/avatar.js",
|
|
43
43
|
"types": "./dist/avatar.d.ts"
|
|
44
44
|
},
|
|
45
|
+
"./badge": {
|
|
46
|
+
"import": "./dist/badge.js",
|
|
47
|
+
"types": "./dist/badge.d.ts"
|
|
48
|
+
},
|
|
45
49
|
"./button": {
|
|
46
50
|
"import": "./dist/button.js",
|
|
47
51
|
"types": "./dist/button.d.ts"
|
|
@@ -146,6 +150,10 @@
|
|
|
146
150
|
"import": "./dist/separator.js",
|
|
147
151
|
"types": "./dist/separator.d.ts"
|
|
148
152
|
},
|
|
153
|
+
"./skeleton": {
|
|
154
|
+
"import": "./dist/skeleton.js",
|
|
155
|
+
"types": "./dist/skeleton.d.ts"
|
|
156
|
+
},
|
|
149
157
|
"./slider": {
|
|
150
158
|
"import": "./dist/slider.js",
|
|
151
159
|
"types": "./dist/slider.d.ts"
|
|
@@ -205,18 +213,14 @@
|
|
|
205
213
|
"@types/node": "^25.0.10",
|
|
206
214
|
"@types/react": "^19.2.9",
|
|
207
215
|
"@types/react-dom": "^19.2.3",
|
|
208
|
-
"@vitejs/plugin-react": "^5.1.2",
|
|
209
216
|
"globals": "^17.1.0",
|
|
210
217
|
"react": "^19.2.3",
|
|
211
218
|
"react-dom": "^19.2.3",
|
|
212
|
-
"
|
|
219
|
+
"tsdown": "^0.12.5",
|
|
213
220
|
"typescript": "~5.9.3",
|
|
214
|
-
"typescript-eslint": "^8.53.1"
|
|
215
|
-
"vite": "^7.3.1",
|
|
216
|
-
"vite-plugin-dts": "^4.5.4",
|
|
217
|
-
"vite-plugin-static-copy": "^3.1.6"
|
|
221
|
+
"typescript-eslint": "^8.53.1"
|
|
218
222
|
},
|
|
219
223
|
"scripts": {
|
|
220
|
-
"build": "
|
|
224
|
+
"build": "tsdown"
|
|
221
225
|
}
|
|
222
226
|
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { c as o } from "./utils-B6yFEsav.js";
|
|
4
|
-
function n({
|
|
5
|
-
fillClassName: s = "fill-background",
|
|
6
|
-
strokeClassName: e = "fill-border",
|
|
7
|
-
className: a,
|
|
8
|
-
...i
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ l(
|
|
11
|
-
"svg",
|
|
12
|
-
{
|
|
13
|
-
width: "20",
|
|
14
|
-
height: "10",
|
|
15
|
-
viewBox: "0 0 20 10",
|
|
16
|
-
fill: "none",
|
|
17
|
-
className: o(a),
|
|
18
|
-
...i,
|
|
19
|
-
children: [
|
|
20
|
-
/* @__PURE__ */ r(
|
|
21
|
-
"path",
|
|
22
|
-
{
|
|
23
|
-
d: "M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V10H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 2.60207C10.622 2.2598 10.0447 2.25979 9.66437 2.60207Z",
|
|
24
|
-
className: s
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ r(
|
|
28
|
-
"path",
|
|
29
|
-
{
|
|
30
|
-
d: "M10.3333 3.34539L5.47654 7.71648C4.55842 8.54279 3.36693 9 2.13172 9H0V8H2.13172C3.11989 8 4.07308 7.63423 4.80758 6.97318L9.66437 2.60207C10.0447 2.25979 10.622 2.2598 11.0023 2.60207L15.8591 6.97318C16.5936 7.63423 17.5468 8 18.5349 8H20V9H18.5349C17.2998 9 16.1083 8.54278 15.1901 7.71648L10.3333 3.34539Z",
|
|
31
|
-
className: e
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
export {
|
|
39
|
-
n as A
|
|
40
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { cva as e } from "class-variance-authority";
|
|
2
|
-
const t = e(
|
|
3
|
-
[
|
|
4
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all select-none [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
5
|
-
],
|
|
6
|
-
{
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
10
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
11
|
-
outline: "border border-border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
12
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
13
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
14
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
15
|
-
},
|
|
16
|
-
size: {
|
|
17
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
18
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
19
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
20
|
-
icon: "size-9",
|
|
21
|
-
"icon-sm": "size-8",
|
|
22
|
-
"icon-lg": "size-10"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultVariants: {
|
|
26
|
-
variant: "default",
|
|
27
|
-
size: "default"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
export {
|
|
32
|
-
t as b
|
|
33
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { cva as e } from "class-variance-authority";
|
|
2
|
-
const a = e(
|
|
3
|
-
[
|
|
4
|
-
"inline-flex items-center justify-center gap-2 rounded-md",
|
|
5
|
-
"text-sm font-medium",
|
|
6
|
-
"[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
|
|
7
|
-
"select-none transition-colors duration-200",
|
|
8
|
-
"border border-border bg-background shadow-xs"
|
|
9
|
-
],
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: [
|
|
14
|
-
"hover:bg-accent hover:text-accent-foreground",
|
|
15
|
-
"data-pressed:border-primary data-pressed:bg-primary data-pressed:text-primary-foreground data-pressed:shadow-none",
|
|
16
|
-
"data-popup-open:border-primary data-popup-open:bg-primary data-popup-open:text-primary-foreground data-popup-open:shadow-none"
|
|
17
|
-
],
|
|
18
|
-
ghost: ["hover:bg-accent"]
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
sm: "h-8 min-w-8 px-2.5 gap-1.5",
|
|
22
|
-
default: "h-9 min-w-9 px-3",
|
|
23
|
-
lg: "h-10 min-w-10 px-3.5",
|
|
24
|
-
icon: "size-9",
|
|
25
|
-
"icon-sm": "size-8",
|
|
26
|
-
"icon-lg": "size-10"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
defaultVariants: {
|
|
30
|
-
variant: "default",
|
|
31
|
-
size: "default"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
export {
|
|
36
|
-
a as c
|
|
37
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const e = "flex w-full rounded-md text-sm h-9 px-3 bg-transparent text-foreground border border-input transition-colors duration-200 placeholder:text-muted-foreground aria-invalid:border-destructive aria-invalid:ring-destructive/20", t = "flex items-center gap-2 text-sm font-medium text-foreground data-disabled:opacity-50", r = "text-sm text-muted-foreground", s = "text-sm text-destructive", o = "flex flex-col gap-1.5", a = "flex items-center gap-2";
|
|
2
|
-
export {
|
|
3
|
-
o as a,
|
|
4
|
-
r as d,
|
|
5
|
-
s as e,
|
|
6
|
-
a as f,
|
|
7
|
-
e as i,
|
|
8
|
-
t as l
|
|
9
|
-
};
|