@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/card.d.ts
CHANGED
|
@@ -1,99 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as react_jsx_runtime218 from "react/jsx-runtime";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region src/components/card.d.ts
|
|
7
|
+
declare const cardVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "outline" | "elevated" | null | undefined;
|
|
9
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
|
+
type CardVariant = VariantProps<typeof cardVariants>['variant'];
|
|
11
|
+
type CardRootProps = React.ComponentProps<'article'> & VariantProps<typeof cardVariants>;
|
|
12
|
+
/**
|
|
13
|
+
* The root container for a card component.
|
|
14
|
+
* Renders as an `<article>` for semantic HTML.
|
|
15
|
+
*/
|
|
16
|
+
declare const CardRoot: React.ForwardRefExoticComponent<Omit<CardRootProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
17
|
+
type CardMediaProps = React.ComponentProps<'div'>;
|
|
18
|
+
/**
|
|
19
|
+
* Container for media content (images, videos) within a card.
|
|
20
|
+
* Use Tailwind aspect-* classes for aspect ratios (e.g., className="aspect-video").
|
|
21
|
+
*/
|
|
22
|
+
declare const CardMedia: {
|
|
23
|
+
({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: CardMediaProps): react_jsx_runtime218.JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
type CardHeaderProps = React.ComponentProps<'header'>;
|
|
30
|
+
/**
|
|
31
|
+
* Container for the card's header content (title, description).
|
|
32
|
+
*/
|
|
33
|
+
declare const CardHeader: {
|
|
34
|
+
({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: CardHeaderProps): react_jsx_runtime218.JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
41
|
+
type CardTitleProps = React.ComponentProps<'h3'> & {
|
|
42
|
+
/** The heading level to render */
|
|
43
|
+
as?: HeadingLevel;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* The card's title. Renders as an `<h3>` by default.
|
|
47
|
+
* Use the `as` prop to change the heading level.
|
|
48
|
+
*/
|
|
49
|
+
declare const CardTitle: {
|
|
50
|
+
({
|
|
51
|
+
as: Component,
|
|
52
|
+
className,
|
|
53
|
+
...props
|
|
54
|
+
}: CardTitleProps): react_jsx_runtime218.JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
type CardDescriptionProps = React.ComponentProps<'p'>;
|
|
58
|
+
/**
|
|
59
|
+
* Secondary text content for the card.
|
|
60
|
+
*/
|
|
61
|
+
declare const CardDescription: {
|
|
62
|
+
({
|
|
63
|
+
className,
|
|
64
|
+
...props
|
|
65
|
+
}: CardDescriptionProps): react_jsx_runtime218.JSX.Element;
|
|
66
|
+
displayName: string;
|
|
67
|
+
};
|
|
68
|
+
type CardContentProps = React.ComponentProps<'div'>;
|
|
69
|
+
/**
|
|
70
|
+
* Container for the main content of the card.
|
|
71
|
+
*/
|
|
72
|
+
declare const CardContent: {
|
|
73
|
+
({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: CardContentProps): react_jsx_runtime218.JSX.Element;
|
|
77
|
+
displayName: string;
|
|
78
|
+
};
|
|
79
|
+
type CardSectionProps = React.ComponentProps<'section'>;
|
|
80
|
+
/**
|
|
81
|
+
* A distinct section within a card, useful for multi-section layouts.
|
|
82
|
+
* Use Separator component between sections if visual dividers are needed.
|
|
83
|
+
*/
|
|
84
|
+
declare const CardSection: {
|
|
85
|
+
({
|
|
86
|
+
className,
|
|
87
|
+
...props
|
|
88
|
+
}: CardSectionProps): react_jsx_runtime218.JSX.Element;
|
|
89
|
+
displayName: string;
|
|
90
|
+
};
|
|
91
|
+
type CardFooterProps = React.ComponentProps<'footer'>;
|
|
92
|
+
/**
|
|
93
|
+
* Container for card actions and footer content.
|
|
94
|
+
* Use Separator component above footer if a visual divider is needed.
|
|
95
|
+
*/
|
|
96
|
+
declare const CardFooter: {
|
|
97
|
+
({
|
|
98
|
+
className,
|
|
99
|
+
...props
|
|
100
|
+
}: CardFooterProps): react_jsx_runtime218.JSX.Element;
|
|
101
|
+
displayName: string;
|
|
102
|
+
};
|
|
103
|
+
//#endregion
|
|
104
|
+
export { CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, CardRoot, type CardRootProps, CardSection, type CardSectionProps, CardTitle, type CardTitleProps, CardVariant };
|
|
105
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","names":[],"sources":["../src/components/card.tsx"],"sourcesContent":[],"mappings":";;;;;;cAWM;;IAWJ,+BAAA,CAAA;KAEU,WAAA,GAAc,oBAAoB;AArBhB,KA2BzB,aAAA,GAAgB,KAAA,CAAM,cARzB,CAAA,SAAA,CAAA,GAQqD,YARrD,CAAA,OAQyE,YARzE,CAAA;AAEF;;;;cAYM,QAZgC,EAYxB,KAAA,CAAA,yBAZwB,CAYxB,IAZwB,CAYxB,aAZwB,EAAA,KAAA,CAAA,GAYxB,KAAA,CAAA,aAZwB,CAYxB,WAZwB,CAAA,CAAA;AAAgC,KA8BjE,cAAA,GAAiB,KAAA,CAAM,cAxBV,CAAA,KAAA,CAAA;;;;;cA8BZ,SA9B6D,EAAA;EAM7D,CAAA;IAAA,SAUL;IAAA,GAAA;EAAA,CAAA,EAc2C,cAd3C,CAAA,EAcyD,oBAAA,CAAA,GAAA,CAAA,OAdzD;EAAA,WAAA,EAAA,MAAA;;KAiCI,eAAA,GAAkB,KAAA,CAAM,cA3Cf,CAAA,QAAA,CAAA;;;;cAgDR,UAhDQ,EAAA;EAkBT,CAAA;IAAA,SAAA;IAAA,GAAc;EAAS,CAAT,EA8B0B,eA9BjB,CAAA,EA8BgC,oBAAA,CAAA,GAAA,CAAA,OA9BlB;EAMpC,WAAA,EAWL,MAAA;CAAA;KAuBI,YAAA;KAEA,cAAA,GAAiB,KAAA,CAAM,cApCgB,CAAA,IAAA,CAAA,GAAA;;EAAc,EAAA,CAAA,EAsCnD,YAtCmD;AAAA,CAAA;AAmBf;;;;cA0BrC,SArBsD,EAAA;EAAA,CAAA;IAAA,EAAA,WAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAqBM,cArBN,CAAA,EAqBoB,oBAAA,CAAA,GAAA,CAAA,OArBpB;EAUvD,WAAA,EAAA,MAAY;AAAA,CAAA;KA0BZ,oBAAA,GAAuB,KAAA,CAAM,cAxBf,CAAA,GAAA,CAAA;;;;AAEA,cA2Bb,eAbL,EAAA;EAAA,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAaiD,oBAbjD,CAAA,EAaqE,oBAAA,CAAA,GAAA,CAAA,OAbrE;;;KAuBI,gBAAA,GAAmB,KAAA,CAAM,cA9BoC,CAAA,KAAA,CAAA;;;AAAc;AAehC,cAoB1C,WAbL,EAAA;EAAA,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAa6C,gBAb7C,CAAA,EAa6D,oBAAA,CAAA,GAAA,CAAA,OAb7D;;;KAuBI,gBAAA,GAAmB,KAAA,CAAM,cAzBwC,CAAA,SAAA,CAAA;;AAAA;AAU1B;;cAqBtC;;IAhBwC,SAAA;IAAA,GAAA;EAAA,CAAA,EAgBA,gBAhBA,CAAA,EAgBgB,oBAAA,CAAA,GAAA,CAAA,OAhBhB;aAAgB,EAAA,MAAA;CAAA;AAAA,KA0BzD,eAAA,GAAkB,KAAA,CAAM,cAhBC,CAAA,QAAA,CAAA;AAAc;;;;cAsBtC,UAhBwD,EAAA;EAAA,CAAA;IAAA,SAAA;IAAA,GAAA;EAAA,CAAA,EAgBjB,eAhBiB,CAAA,EAgBF,oBAAA,CAAA,GAAA,CAAA,OAhBE;EAUzD,WAAA,EAAA,MAAe;AAAuB,CAAA"}
|
package/dist/card.js
CHANGED
|
@@ -1,67 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
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
|
-
c.displayName = "CardMedia";
|
|
40
|
-
const m = ({ className: a, ...e }) => /* @__PURE__ */ r("header", { className: t("flex flex-col gap-1 p-4", a), ...e });
|
|
41
|
-
m.displayName = "CardHeader";
|
|
42
|
-
const p = ({ as: a = "h3", className: e, ...o }) => /* @__PURE__ */ r(
|
|
43
|
-
a,
|
|
44
|
-
{
|
|
45
|
-
className: t("text-base font-semibold leading-tight", e),
|
|
46
|
-
...o
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
p.displayName = "CardTitle";
|
|
50
|
-
const f = ({ className: a, ...e }) => /* @__PURE__ */ r("p", { className: t("text-sm", a), ...e });
|
|
51
|
-
f.displayName = "CardDescription";
|
|
52
|
-
const C = ({ className: a, ...e }) => /* @__PURE__ */ r("div", { className: t("p-4 pt-0", a), ...e });
|
|
53
|
-
C.displayName = "CardContent";
|
|
54
|
-
const u = ({ className: a, ...e }) => /* @__PURE__ */ r("section", { className: t("p-4", a), ...e });
|
|
55
|
-
u.displayName = "CardSection";
|
|
56
|
-
const N = ({ className: a, ...e }) => /* @__PURE__ */ r("footer", { className: t("flex items-center p-4", a), ...e });
|
|
57
|
-
N.displayName = "CardFooter";
|
|
58
|
-
export {
|
|
59
|
-
C as CardContent,
|
|
60
|
-
f as CardDescription,
|
|
61
|
-
N as CardFooter,
|
|
62
|
-
m as CardHeader,
|
|
63
|
-
c as CardMedia,
|
|
64
|
-
l as CardRoot,
|
|
65
|
-
u as CardSection,
|
|
66
|
-
p as CardTitle
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/components/card.tsx
|
|
9
|
+
const cardVariants = cva("rounded-lg bg-card text-card-foreground transition-colors", {
|
|
10
|
+
variants: { variant: {
|
|
11
|
+
default: "border shadow-xs",
|
|
12
|
+
outline: "border",
|
|
13
|
+
elevated: "shadow-md"
|
|
14
|
+
} },
|
|
15
|
+
defaultVariants: { variant: "default" }
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* The root container for a card component.
|
|
19
|
+
* Renders as an `<article>` for semantic HTML.
|
|
20
|
+
*/
|
|
21
|
+
const CardRoot = React.forwardRef(({ className, variant, ...props }, ref) => {
|
|
22
|
+
return /* @__PURE__ */ jsx("article", {
|
|
23
|
+
ref,
|
|
24
|
+
className: cn(cardVariants({ variant }), className),
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
CardRoot.displayName = "CardRoot";
|
|
29
|
+
/**
|
|
30
|
+
* Container for media content (images, videos) within a card.
|
|
31
|
+
* Use Tailwind aspect-* classes for aspect ratios (e.g., className="aspect-video").
|
|
32
|
+
*/
|
|
33
|
+
const CardMedia = ({ className, ...props }) => {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
className: cn("overflow-hidden", "[&>img]:h-full [&>img]:w-full [&>img]:object-cover", className),
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
67
38
|
};
|
|
39
|
+
CardMedia.displayName = "CardMedia";
|
|
40
|
+
/**
|
|
41
|
+
* Container for the card's header content (title, description).
|
|
42
|
+
*/
|
|
43
|
+
const CardHeader = ({ className, ...props }) => {
|
|
44
|
+
return /* @__PURE__ */ jsx("header", {
|
|
45
|
+
className: cn("flex flex-col gap-1 p-4", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
CardHeader.displayName = "CardHeader";
|
|
50
|
+
/**
|
|
51
|
+
* The card's title. Renders as an `<h3>` by default.
|
|
52
|
+
* Use the `as` prop to change the heading level.
|
|
53
|
+
*/
|
|
54
|
+
const CardTitle = ({ as: Component = "h3", className, ...props }) => {
|
|
55
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
56
|
+
className: cn("text-base font-semibold leading-tight", className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
CardTitle.displayName = "CardTitle";
|
|
61
|
+
/**
|
|
62
|
+
* Secondary text content for the card.
|
|
63
|
+
*/
|
|
64
|
+
const CardDescription = ({ className, ...props }) => {
|
|
65
|
+
return /* @__PURE__ */ jsx("p", {
|
|
66
|
+
className: cn("text-sm", className),
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
CardDescription.displayName = "CardDescription";
|
|
71
|
+
/**
|
|
72
|
+
* Container for the main content of the card.
|
|
73
|
+
*/
|
|
74
|
+
const CardContent = ({ className, ...props }) => {
|
|
75
|
+
return /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: cn("p-4 pt-0", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
CardContent.displayName = "CardContent";
|
|
81
|
+
/**
|
|
82
|
+
* A distinct section within a card, useful for multi-section layouts.
|
|
83
|
+
* Use Separator component between sections if visual dividers are needed.
|
|
84
|
+
*/
|
|
85
|
+
const CardSection = ({ className, ...props }) => {
|
|
86
|
+
return /* @__PURE__ */ jsx("section", {
|
|
87
|
+
className: cn("p-4", className),
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
CardSection.displayName = "CardSection";
|
|
92
|
+
/**
|
|
93
|
+
* Container for card actions and footer content.
|
|
94
|
+
* Use Separator component above footer if a visual divider is needed.
|
|
95
|
+
*/
|
|
96
|
+
const CardFooter = ({ className, ...props }) => {
|
|
97
|
+
return /* @__PURE__ */ jsx("footer", {
|
|
98
|
+
className: cn("flex items-center p-4", className),
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
CardFooter.displayName = "CardFooter";
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
export { CardContent, CardDescription, CardFooter, CardHeader, CardMedia, CardRoot, CardSection, CardTitle };
|
|
106
|
+
//# sourceMappingURL=card.js.map
|
package/dist/card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../src/components/card.tsx"],"sourcesContent":["'use client'\n\nimport { type VariantProps, cva } from 'class-variance-authority'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// Card Variants\n// ============================================================================\n\nconst cardVariants = cva('rounded-lg bg-card text-card-foreground transition-colors', {\n variants: {\n variant: {\n default: 'border shadow-xs',\n outline: 'border',\n elevated: 'shadow-md',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n})\n\nexport type CardVariant = VariantProps<typeof cardVariants>['variant']\n\n// ============================================================================\n// CardRoot\n// ============================================================================\n\ntype CardRootProps = React.ComponentProps<'article'> & VariantProps<typeof cardVariants>\n\n/**\n * The root container for a card component.\n * Renders as an `<article>` for semantic HTML.\n */\nconst CardRoot = React.forwardRef<HTMLElement, CardRootProps>(\n ({ className, variant, ...props }, ref) => {\n return (\n <article\n ref={ref}\n className={cn(cardVariants({ variant }), className)}\n {...props}\n />\n )\n },\n)\n\nCardRoot.displayName = 'CardRoot'\n\n// ============================================================================\n// CardMedia\n// ============================================================================\n\ntype CardMediaProps = React.ComponentProps<'div'>\n\n/**\n * Container for media content (images, videos) within a card.\n * Use Tailwind aspect-* classes for aspect ratios (e.g., className=\"aspect-video\").\n */\nconst CardMedia = ({ className, ...props }: CardMediaProps) => {\n return (\n <div\n className={cn(\n 'overflow-hidden',\n '[&>img]:h-full [&>img]:w-full [&>img]:object-cover',\n className,\n )}\n {...props}\n />\n )\n}\n\nCardMedia.displayName = 'CardMedia'\n\n// ============================================================================\n// CardHeader\n// ============================================================================\n\ntype CardHeaderProps = React.ComponentProps<'header'>\n\n/**\n * Container for the card's header content (title, description).\n */\nconst CardHeader = ({ className, ...props }: CardHeaderProps) => {\n return <header className={cn('flex flex-col gap-1 p-4', className)} {...props} />\n}\n\nCardHeader.displayName = 'CardHeader'\n\n// ============================================================================\n// CardTitle\n// ============================================================================\n\ntype HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\ntype CardTitleProps = React.ComponentProps<'h3'> & {\n /** The heading level to render */\n as?: HeadingLevel\n}\n\n/**\n * The card's title. Renders as an `<h3>` by default.\n * Use the `as` prop to change the heading level.\n */\nconst CardTitle = ({ as: Component = 'h3', className, ...props }: CardTitleProps) => {\n return (\n <Component\n className={cn('text-base font-semibold leading-tight', className)}\n {...props}\n />\n )\n}\n\nCardTitle.displayName = 'CardTitle'\n\n// ============================================================================\n// CardDescription\n// ============================================================================\n\ntype CardDescriptionProps = React.ComponentProps<'p'>\n\n/**\n * Secondary text content for the card.\n */\nconst CardDescription = ({ className, ...props }: CardDescriptionProps) => {\n return <p className={cn('text-sm', className)} {...props} />\n}\n\nCardDescription.displayName = 'CardDescription'\n\n// ============================================================================\n// CardContent\n// ============================================================================\n\ntype CardContentProps = React.ComponentProps<'div'>\n\n/**\n * Container for the main content of the card.\n */\nconst CardContent = ({ className, ...props }: CardContentProps) => {\n return <div className={cn('p-4 pt-0', className)} {...props} />\n}\n\nCardContent.displayName = 'CardContent'\n\n// ============================================================================\n// CardSection\n// ============================================================================\n\ntype CardSectionProps = React.ComponentProps<'section'>\n\n/**\n * A distinct section within a card, useful for multi-section layouts.\n * Use Separator component between sections if visual dividers are needed.\n */\nconst CardSection = ({ className, ...props }: CardSectionProps) => {\n return <section className={cn('p-4', className)} {...props} />\n}\n\nCardSection.displayName = 'CardSection'\n\n// ============================================================================\n// CardFooter\n// ============================================================================\n\ntype CardFooterProps = React.ComponentProps<'footer'>\n\n/**\n * Container for card actions and footer content.\n * Use Separator component above footer if a visual divider is needed.\n */\nconst CardFooter = ({ className, ...props }: CardFooterProps) => {\n return <footer className={cn('flex items-center p-4', className)} {...props} />\n}\n\nCardFooter.displayName = 'CardFooter'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport {\n CardRoot,\n CardMedia,\n CardHeader,\n CardTitle,\n CardDescription,\n CardContent,\n CardSection,\n CardFooter,\n}\n\nexport type {\n CardRootProps,\n CardMediaProps,\n CardHeaderProps,\n CardTitleProps,\n CardDescriptionProps,\n CardContentProps,\n CardSectionProps,\n CardFooterProps,\n}\n"],"mappings":";;;;;;;;AAWA,MAAM,eAAe,IAAI,6DAA6D;CACpF,UAAU,EACR,SAAS;EACP,SAAS;EACT,SAAS;EACT,UAAU;EACX,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CAAC;;;;;AAcF,MAAM,WAAW,MAAM,YACpB,EAAE,WAAW,SAAS,GAAG,SAAS,QAAQ;AACzC,QACE,oBAAC;EACM;EACL,WAAW,GAAG,aAAa,EAAE,SAAS,CAAC,EAAE,UAAU;EACnD,GAAI;GACJ;EAGP;AAED,SAAS,cAAc;;;;;AAYvB,MAAM,aAAa,EAAE,WAAW,GAAG,YAA4B;AAC7D,QACE,oBAAC;EACC,WAAW,GACT,mBACA,sDACA,UACD;EACD,GAAI;GACJ;;AAIN,UAAU,cAAc;;;;AAWxB,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAAC;EAAO,WAAW,GAAG,2BAA2B,UAAU;EAAE,GAAI;GAAS;;AAGnF,WAAW,cAAc;;;;;AAiBzB,MAAM,aAAa,EAAE,IAAI,YAAY,MAAM,WAAW,GAAG,YAA4B;AACnF,QACE,oBAAC;EACC,WAAW,GAAG,yCAAyC,UAAU;EACjE,GAAI;GACJ;;AAIN,UAAU,cAAc;;;;AAWxB,MAAM,mBAAmB,EAAE,WAAW,GAAG,YAAkC;AACzE,QAAO,oBAAC;EAAE,WAAW,GAAG,WAAW,UAAU;EAAE,GAAI;GAAS;;AAG9D,gBAAgB,cAAc;;;;AAW9B,MAAM,eAAe,EAAE,WAAW,GAAG,YAA8B;AACjE,QAAO,oBAAC;EAAI,WAAW,GAAG,YAAY,UAAU;EAAE,GAAI;GAAS;;AAGjE,YAAY,cAAc;;;;;AAY1B,MAAM,eAAe,EAAE,WAAW,GAAG,YAA8B;AACjE,QAAO,oBAAC;EAAQ,WAAW,GAAG,OAAO,UAAU;EAAE,GAAI;GAAS;;AAGhE,YAAY,cAAc;;;;;AAY1B,MAAM,cAAc,EAAE,WAAW,GAAG,YAA6B;AAC/D,QAAO,oBAAC;EAAO,WAAW,GAAG,yBAAyB,UAAU;EAAE,GAAI;GAAS;;AAGjF,WAAW,cAAc"}
|
package/dist/checkbox-group.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime228 from "react/jsx-runtime";
|
|
3
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
4
|
+
|
|
5
|
+
//#region src/components/checkbox-group.d.ts
|
|
6
|
+
type CheckboxGroupRootProps = React.ComponentProps<typeof CheckboxGroup>;
|
|
7
|
+
declare const CheckboxGroupRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: CheckboxGroupRootProps): react_jsx_runtime228.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { CheckboxGroupRoot, type CheckboxGroupRootProps };
|
|
16
|
+
//# sourceMappingURL=checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.d.ts","names":[],"sources":["../src/components/checkbox-group.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,sBAAA,GAAyB,KAAA,CAAM,sBAAsB;cAEpD;;;;KAA8C,yBAAsB,oBAAA,CAAA,GAAA,CAAA;EAFrE,WAAA,EAAA,MAAA;CAAsB"}
|
package/dist/checkbox-group.js
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
m as CheckboxGroupRoot
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
7
|
+
|
|
8
|
+
//#region src/components/checkbox-group.tsx
|
|
9
|
+
const CheckboxGroupRoot = ({ className, ...props }) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
11
|
+
className: cn("flex flex-col items-start gap-2", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
15
14
|
};
|
|
15
|
+
CheckboxGroupRoot.displayName = "CheckboxGroupRoot";
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { CheckboxGroupRoot };
|
|
19
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","names":["BaseCheckboxGroup"],"sources":["../src/components/checkbox-group.tsx"],"sourcesContent":["'use client'\n\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// CheckboxGroupRoot\n// ============================================================================\n\ntype CheckboxGroupRootProps = React.ComponentProps<typeof BaseCheckboxGroup>\n\nconst CheckboxGroupRoot = ({ className, ...props }: CheckboxGroupRootProps) => {\n return (\n <BaseCheckboxGroup\n className={cn('flex flex-col items-start gap-2', className)}\n {...props}\n />\n )\n}\n\nCheckboxGroupRoot.displayName = 'CheckboxGroupRoot'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { CheckboxGroupRoot }\n\nexport type { CheckboxGroupRootProps }\n"],"mappings":";;;;;;;;AAaA,MAAM,qBAAqB,EAAE,WAAW,GAAG,YAAoC;AAC7E,QACE,oBAACA;EACC,WAAW,GAAG,mCAAmC,UAAU;EAC3D,GAAI;GACJ;;AAIN,kBAAkB,cAAc"}
|
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime216 from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
4
|
+
|
|
5
|
+
//#region src/components/checkbox.d.ts
|
|
6
|
+
type CheckboxRootProps = React.ComponentProps<typeof Checkbox.Root>;
|
|
7
|
+
declare const CheckboxRoot: {
|
|
8
|
+
({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: CheckboxRootProps): react_jsx_runtime216.JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
type CheckboxIndicatorProps = React.ComponentProps<typeof Checkbox.Indicator>;
|
|
15
|
+
declare const CheckboxIndicator: {
|
|
16
|
+
({
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...props
|
|
20
|
+
}: CheckboxIndicatorProps): react_jsx_runtime216.JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { CheckboxIndicator, type CheckboxIndicatorProps, CheckboxRoot, type CheckboxRootProps };
|
|
25
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../src/components/checkbox.tsx"],"sourcesContent":[],"mappings":";;;;;KAWK,iBAAA,GAAoB,KAAA,CAAM,sBAAsB,QAAA,CAAa;cAE5D;;;;KAAyC,oBAAiB,oBAAA,CAAA,GAAA,CAAA;EAF3D,WAAA,EAAA,MAAA;CAAiB;KAyBjB,sBAAA,GAAyB,KAAA,CAAM,cAzB8B,CAAA,OAyBR,QAAA,CAAa,SAzBL,CAAA;cA2B5D,iBA3ByB,EAAA;EAAc,CAAA;IAAA,SAAA;IAAA,QAAA;IAAA,GAAA;EAAA,CAAA,EA2BiB,sBA3BjB,CAAA,EA2BuC,oBAAA,CAAA,GAAA,CAAA,OA3BvC;EAEvC,WAAA,EAAA,MAeL;CAAA"}
|
package/dist/checkbox.js
CHANGED
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
15
|
-
e
|
|
16
|
-
),
|
|
17
|
-
...r
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
d.displayName = "CheckboxRoot";
|
|
21
|
-
const n = ({ className: e, children: r, ...i }) => /* @__PURE__ */ t(
|
|
22
|
-
a.Indicator,
|
|
23
|
-
{
|
|
24
|
-
className: o("flex items-center justify-center data-unchecked:hidden", e),
|
|
25
|
-
...i,
|
|
26
|
-
children: r
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
n.displayName = "CheckboxIndicator";
|
|
30
|
-
export {
|
|
31
|
-
n as CheckboxIndicator,
|
|
32
|
-
d as CheckboxRoot
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "./lib/utils.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
7
|
+
|
|
8
|
+
//#region src/components/checkbox.tsx
|
|
9
|
+
const CheckboxRoot = ({ className, ...props }) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
11
|
+
className: cn("flex size-5 items-center justify-center rounded-sm border border-input bg-transparent", "transition-colors duration-150", "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", "data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground", "data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground", "data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
33
14
|
};
|
|
15
|
+
CheckboxRoot.displayName = "CheckboxRoot";
|
|
16
|
+
const CheckboxIndicator = ({ className, children, ...props }) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
18
|
+
className: cn("flex items-center justify-center data-unchecked:hidden", className),
|
|
19
|
+
...props,
|
|
20
|
+
children
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
CheckboxIndicator.displayName = "CheckboxIndicator";
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { CheckboxIndicator, CheckboxRoot };
|
|
27
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["BaseCheckbox"],"sources":["../src/components/checkbox.tsx"],"sourcesContent":["'use client'\n\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils'\n\n// ============================================================================\n// CheckboxRoot\n// ============================================================================\n\ntype CheckboxRootProps = React.ComponentProps<typeof BaseCheckbox.Root>\n\nconst CheckboxRoot = ({ className, ...props }: CheckboxRootProps) => {\n return (\n <BaseCheckbox.Root\n className={cn(\n 'flex size-5 items-center justify-center rounded-sm border border-input bg-transparent',\n 'transition-colors duration-150',\n 'focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n 'data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground',\n 'data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground',\n 'data-disabled:cursor-not-allowed data-disabled:opacity-50',\n className,\n )}\n {...props}\n />\n )\n}\n\nCheckboxRoot.displayName = 'CheckboxRoot'\n\n// ============================================================================\n// CheckboxIndicator\n// ============================================================================\n\ntype CheckboxIndicatorProps = React.ComponentProps<typeof BaseCheckbox.Indicator>\n\nconst CheckboxIndicator = ({ className, children, ...props }: CheckboxIndicatorProps) => {\n return (\n <BaseCheckbox.Indicator\n className={cn('flex items-center justify-center data-unchecked:hidden', className)}\n {...props}\n >\n {children}\n </BaseCheckbox.Indicator>\n )\n}\n\nCheckboxIndicator.displayName = 'CheckboxIndicator'\n\n// ============================================================================\n// Exports\n// ============================================================================\n\nexport { CheckboxRoot, CheckboxIndicator }\n\nexport type { CheckboxRootProps, CheckboxIndicatorProps }\n"],"mappings":";;;;;;;;AAaA,MAAM,gBAAgB,EAAE,WAAW,GAAG,YAA+B;AACnE,QACE,oBAACA,SAAa;EACZ,WAAW,GACT,yFACA,kCACA,qFACA,4FACA,8GACA,6DACA,UACD;EACD,GAAI;GACJ;;AAIN,aAAa,cAAc;AAQ3B,MAAM,qBAAqB,EAAE,WAAW,UAAU,GAAG,YAAoC;AACvF,QACE,oBAACA,SAAa;EACZ,WAAW,GAAG,0DAA0D,UAAU;EAClF,GAAI;EAEH;GACsB;;AAI7B,kBAAkB,cAAc"}
|