orbital-ds 0.7.0 → 0.9.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/AGENTS.md +145 -80
- package/README.md +87 -73
- package/components.manifest.json +1326 -1267
- package/contract.json +226 -168
- package/dist/hooks/use-ds-messages.d.ts +36 -0
- package/dist/hooks/use-ds-messages.js +12 -0
- package/dist/hooks/use-ds-motion.d.ts +17 -0
- package/dist/hooks/use-ds-motion.js +50 -0
- package/dist/lib/i18n.d.ts +46 -0
- package/dist/lib/i18n.js +109 -0
- package/dist/lib/motion.d.ts +74 -0
- package/dist/lib/motion.js +97 -0
- package/dist/styles.css +876 -528
- package/dist/themes/friendly.css +362 -318
- package/dist/themes/friendly.meta.json +75 -14
- package/dist/themes/friendly.scoped.css +362 -318
- package/dist/themes/qratia.meta.json +42 -12
- package/dist/themes/tactile.css +575 -429
- package/dist/themes/tactile.fonts.css +3 -2
- package/dist/themes/tactile.guide.md +82 -49
- package/dist/themes/tactile.meta.json +175 -16
- package/dist/themes/tactile.scoped.css +575 -429
- package/dist/themes/twitter.css +354 -298
- package/dist/themes/twitter.meta.json +83 -61
- package/dist/themes/twitter.scoped.css +354 -298
- package/dist/themes/zyro.css +443 -389
- package/dist/themes/zyro.meta.json +67 -14
- package/dist/themes/zyro.scoped.css +443 -389
- package/dist/ui/accordion.js +5 -5
- package/dist/ui/alert-dialog.js +3 -3
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.js +9 -3
- package/dist/ui/attachment.d.ts +1 -1
- package/dist/ui/attachment.js +4 -4
- package/dist/ui/avatar.js +6 -6
- package/dist/ui/ayuda.js +3 -2
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.js +9 -3
- package/dist/ui/banner.d.ts +14 -0
- package/dist/ui/banner.js +88 -0
- package/dist/ui/breadcrumb.js +7 -3
- package/dist/ui/bubble.js +6 -6
- package/dist/ui/button-group.js +4 -4
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.js +5 -5
- package/dist/ui/calendar.js +33 -6
- package/dist/ui/card.js +4 -4
- package/dist/ui/carousel.js +15 -8
- package/dist/ui/chart.js +7 -3
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/combobox.js +7 -7
- package/dist/ui/command.js +13 -11
- package/dist/ui/context-menu.js +8 -8
- package/dist/ui/dialog.js +10 -6
- package/dist/ui/drawer.js +9 -9
- package/dist/ui/dropdown-menu.js +8 -8
- package/dist/ui/empty.js +3 -3
- package/dist/ui/field.js +2 -2
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/i18n-provider.d.ts +11 -0
- package/dist/ui/i18n-provider.js +18 -0
- package/dist/ui/icon-tile.d.ts +1 -1
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-group.js +11 -9
- package/dist/ui/input-otp.js +3 -3
- package/dist/ui/input.js +1 -1
- package/dist/ui/item.d.ts +1 -1
- package/dist/ui/item.js +3 -3
- package/dist/ui/kbd.js +1 -1
- package/dist/ui/label.js +1 -1
- package/dist/ui/marker.d.ts +1 -1
- package/dist/ui/marker.js +2 -2
- package/dist/ui/menubar.js +9 -9
- package/dist/ui/message-scroller.js +5 -2
- package/dist/ui/message.js +2 -2
- package/dist/ui/motion-provider.d.ts +11 -0
- package/dist/ui/motion-provider.js +16 -0
- package/dist/ui/native-select.js +4 -4
- package/dist/ui/navigation-menu.js +7 -6
- package/dist/ui/pagination.js +19 -11
- package/dist/ui/popover.js +2 -2
- package/dist/ui/progress.js +2 -2
- package/dist/ui/questionnaire.js +20 -15
- package/dist/ui/radio-group.js +2 -2
- package/dist/ui/resizable.js +2 -2
- package/dist/ui/scroll-area.js +3 -3
- package/dist/ui/select.js +6 -6
- package/dist/ui/separator.js +1 -1
- package/dist/ui/sheet.js +6 -4
- package/dist/ui/sidebar.js +42 -30
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +6 -6
- package/dist/ui/sonner.js +25 -8
- package/dist/ui/spinner.js +4 -1
- package/dist/ui/switch.js +2 -2
- package/dist/ui/table.js +3 -3
- package/dist/ui/tabs.js +5 -5
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toast.js +15 -12
- package/dist/ui/toggle-group.js +2 -2
- package/dist/ui/toggle.js +6 -4
- package/dist/ui/tooltip.js +2 -2
- package/docs/CONTRACT.md +183 -153
- package/package.json +160 -142
- package/scripts/brand-core.mjs +153 -0
- package/scripts/doctor.mjs +128 -7
- package/scripts/i18n.mjs +111 -0
- package/scripts/init.mjs +294 -57
- package/scripts/setup.mjs +99 -0
package/dist/ui/accordion.js
CHANGED
|
@@ -8,7 +8,7 @@ function Accordion({ className, ...props }) {
|
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "accordion",
|
|
10
10
|
className: cn(
|
|
11
|
-
"flex w-full flex-col overflow-hidden rounded-
|
|
11
|
+
"flex w-full flex-col overflow-hidden rounded-panel border",
|
|
12
12
|
className
|
|
13
13
|
),
|
|
14
14
|
...props
|
|
@@ -20,7 +20,7 @@ function AccordionItem({ className, ...props }) {
|
|
|
20
20
|
AccordionPrimitive.Item,
|
|
21
21
|
{
|
|
22
22
|
"data-slot": "accordion-item",
|
|
23
|
-
className: cn("not-last:border-b data-open:bg-
|
|
23
|
+
className: cn("not-last:border-b data-open:bg-(--ds-row-hover)", className),
|
|
24
24
|
...props
|
|
25
25
|
}
|
|
26
26
|
);
|
|
@@ -30,12 +30,12 @@ function AccordionTrigger({
|
|
|
30
30
|
children,
|
|
31
31
|
...props
|
|
32
32
|
}) {
|
|
33
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
33
|
+
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { "data-slot": "accordion-header", className: "flex", children: /* @__PURE__ */ jsxs(
|
|
34
34
|
AccordionPrimitive.Trigger,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "accordion-trigger",
|
|
37
37
|
className: cn(
|
|
38
|
-
"group/accordion-trigger relative flex flex-1 items-start justify-between gap-6 border border-transparent p-4 text-left text-sm font-medium transition-all outline-none hover:underline aria-disabled:pointer-events-none aria-disabled:opacity-
|
|
38
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between gap-6 border border-transparent p-4 text-left text-sm font-medium transition-all duration-(--ds-motion-snap) outline-none hover:underline aria-disabled:pointer-events-none aria-disabled:opacity-(--ds-disabled-opacity) **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
39
39
|
className
|
|
40
40
|
),
|
|
41
41
|
...props,
|
|
@@ -56,7 +56,7 @@ function AccordionContent({
|
|
|
56
56
|
AccordionPrimitive.Panel,
|
|
57
57
|
{
|
|
58
58
|
"data-slot": "accordion-content",
|
|
59
|
-
className: "overflow-hidden px-4 text-sm data-open:animate-accordion-
|
|
59
|
+
className: "overflow-hidden px-4 text-sm data-open:animate-accordion-open data-closed:animate-accordion-close",
|
|
60
60
|
...props,
|
|
61
61
|
children: /* @__PURE__ */ jsx(
|
|
62
62
|
"div",
|
package/dist/ui/alert-dialog.js
CHANGED
|
@@ -20,7 +20,7 @@ function AlertDialogOverlay({
|
|
|
20
20
|
{
|
|
21
21
|
"data-slot": "alert-dialog-overlay",
|
|
22
22
|
className: cn(
|
|
23
|
-
"fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-
|
|
23
|
+
"fixed inset-0 isolate z-(--ds-z-overlay) bg-scrim duration-(--ds-motion-fast) supports-backdrop-filter:backdrop-blur-(--ds-scrim-blur) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
24
24
|
className
|
|
25
25
|
),
|
|
26
26
|
...props
|
|
@@ -40,7 +40,7 @@ function AlertDialogContent({
|
|
|
40
40
|
"data-slot": "alert-dialog-content",
|
|
41
41
|
"data-size": size,
|
|
42
42
|
className: cn(
|
|
43
|
-
"group/alert-dialog-content fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full -translate-x-1/2 -translate-y-1/2 gap-
|
|
43
|
+
"group/alert-dialog-content fixed top-1/2 left-1/2 z-(--ds-z-overlay) grid w-full -translate-x-1/2 -translate-y-1/2 gap-(--ds-overlay-gap) rounded-overlay bg-popover p-(--ds-overlay-p) text-popover-foreground shadow-dialog ring-(length:--ds-layer-ring-w) ring-(--ds-layer-ring) duration-(--ds-motion-fast) outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
44
44
|
className
|
|
45
45
|
),
|
|
46
46
|
...props
|
|
@@ -105,7 +105,7 @@ function AlertDialogTitle({
|
|
|
105
105
|
{
|
|
106
106
|
"data-slot": "alert-dialog-title",
|
|
107
107
|
className: cn(
|
|
108
|
-
"text-lg font-
|
|
108
|
+
"text-lg font-(--ds-overlay-title-weight) sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
109
109
|
className
|
|
110
110
|
),
|
|
111
111
|
...props
|
package/dist/ui/alert.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
variant?: "default" | "destructive" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
9
9
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
package/dist/ui/alert.js
CHANGED
|
@@ -2,12 +2,17 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "../lib/utils";
|
|
4
4
|
const alertVariants = cva(
|
|
5
|
-
"group/alert relative grid w-full gap-0.5 rounded-lg border px-
|
|
5
|
+
"group/alert relative grid w-full gap-0.5 rounded-lg border px-(--ds-alert-px) py-(--ds-alert-py) text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",
|
|
6
6
|
{
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
default: "bg-card text-card-foreground",
|
|
10
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
10
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current",
|
|
11
|
+
// Estados: fondo suave y texto del estado (pares con contraste AA comprobado por check:ds).
|
|
12
|
+
info: "border-info/30 bg-info-soft text-info *:data-[slot=alert-description]:text-info",
|
|
13
|
+
success: "border-success/30 bg-success-soft text-success *:data-[slot=alert-description]:text-success",
|
|
14
|
+
warning: "border-warning/30 bg-warning-soft text-warning *:data-[slot=alert-description]:text-warning",
|
|
15
|
+
danger: "border-danger/30 bg-danger-soft text-danger *:data-[slot=alert-description]:text-danger"
|
|
11
16
|
}
|
|
12
17
|
},
|
|
13
18
|
defaultVariants: {
|
|
@@ -24,6 +29,7 @@ function Alert({
|
|
|
24
29
|
"div",
|
|
25
30
|
{
|
|
26
31
|
"data-slot": "alert",
|
|
32
|
+
"data-variant": variant ?? "default",
|
|
27
33
|
role: "alert",
|
|
28
34
|
className: cn(alertVariants({ variant }), className),
|
|
29
35
|
...props
|
|
@@ -36,7 +42,7 @@ function AlertTitle({ className, ...props }) {
|
|
|
36
42
|
{
|
|
37
43
|
"data-slot": "alert-title",
|
|
38
44
|
className: cn(
|
|
39
|
-
"font-
|
|
45
|
+
"font-(--ds-overlay-title-weight) group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",
|
|
40
46
|
className
|
|
41
47
|
),
|
|
42
48
|
...props
|
package/dist/ui/attachment.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
import { Button } from './button.js';
|
|
6
6
|
|
|
7
7
|
declare const attachmentVariants: (props?: ({
|
|
8
|
-
size?: "default" | "
|
|
8
|
+
size?: "default" | "xs" | "sm" | null | undefined;
|
|
9
9
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
11
|
declare function Attachment({ className, state, size, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & {
|
package/dist/ui/attachment.js
CHANGED
|
@@ -5,13 +5,13 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
6
|
import { Button } from "./button";
|
|
7
7
|
const attachmentVariants = cva(
|
|
8
|
-
"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-
|
|
8
|
+
"group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-chip border bg-card text-card-foreground transition-colors duration-(--ds-motion-snap) focus-within:ring-(length:--ds-ring-width) focus-within:ring-(--ds-ring-color) has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-danger/30 data-[state=idle]:border-dashed",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
size: {
|
|
12
12
|
default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
|
|
13
13
|
sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
|
|
14
|
-
xs: "gap-1.5 rounded-
|
|
14
|
+
xs: "gap-1.5 rounded-item text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
|
|
15
15
|
},
|
|
16
16
|
orientation: {
|
|
17
17
|
horizontal: "min-w-40 items-center",
|
|
@@ -40,7 +40,7 @@ function Attachment({
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
const attachmentMediaVariants = cva(
|
|
43
|
-
"relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-lg group-data-[state=error]/attachment:bg-
|
|
43
|
+
"relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-lg group-data-[state=error]/attachment:bg-danger-soft group-data-[state=error]/attachment:text-danger group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5",
|
|
44
44
|
{
|
|
45
45
|
variants: {
|
|
46
46
|
variant: {
|
|
@@ -109,7 +109,7 @@ function AttachmentDescription({
|
|
|
109
109
|
{
|
|
110
110
|
"data-slot": "attachment-description",
|
|
111
111
|
className: cn(
|
|
112
|
-
"mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-
|
|
112
|
+
"mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-danger",
|
|
113
113
|
"max-w-full",
|
|
114
114
|
className
|
|
115
115
|
),
|
package/dist/ui/avatar.js
CHANGED
|
@@ -12,7 +12,7 @@ function Avatar({
|
|
|
12
12
|
"data-slot": "avatar",
|
|
13
13
|
"data-size": size,
|
|
14
14
|
className: cn(
|
|
15
|
-
"group/avatar relative flex size-
|
|
15
|
+
"group/avatar relative flex size-(--ds-avatar-md) shrink-0 rounded-avatar select-none after:absolute after:inset-0 after:rounded-avatar after:border after:border-border after:mix-blend-darken data-[size=lg]:size-(--ds-avatar-lg) data-[size=sm]:size-(--ds-avatar-sm) dark:after:mix-blend-lighten",
|
|
16
16
|
className
|
|
17
17
|
),
|
|
18
18
|
...props
|
|
@@ -25,7 +25,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
25
25
|
{
|
|
26
26
|
"data-slot": "avatar-image",
|
|
27
27
|
className: cn(
|
|
28
|
-
"aspect-square size-full rounded-
|
|
28
|
+
"aspect-square size-full rounded-avatar object-cover",
|
|
29
29
|
className
|
|
30
30
|
),
|
|
31
31
|
...props
|
|
@@ -41,7 +41,7 @@ function AvatarFallback({
|
|
|
41
41
|
{
|
|
42
42
|
"data-slot": "avatar-fallback",
|
|
43
43
|
className: cn(
|
|
44
|
-
"flex size-full items-center justify-center rounded-
|
|
44
|
+
"flex size-full items-center justify-center rounded-avatar bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
45
45
|
className
|
|
46
46
|
),
|
|
47
47
|
...props
|
|
@@ -54,7 +54,7 @@ function AvatarBadge({ className, ...props }) {
|
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "avatar-badge",
|
|
56
56
|
className: cn(
|
|
57
|
-
"absolute right-0 bottom-0 z-(--ds-z-raised) inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-
|
|
57
|
+
"absolute right-0 bottom-0 z-(--ds-z-raised) inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-(length:--ds-avatar-ring-w) ring-background select-none",
|
|
58
58
|
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
59
59
|
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
60
60
|
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
@@ -70,7 +70,7 @@ function AvatarGroup({ className, ...props }) {
|
|
|
70
70
|
{
|
|
71
71
|
"data-slot": "avatar-group",
|
|
72
72
|
className: cn(
|
|
73
|
-
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-
|
|
73
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-(length:--ds-avatar-ring-w) *:data-[slot=avatar]:ring-background",
|
|
74
74
|
className
|
|
75
75
|
),
|
|
76
76
|
...props
|
|
@@ -86,7 +86,7 @@ function AvatarGroupCount({
|
|
|
86
86
|
{
|
|
87
87
|
"data-slot": "avatar-group-count",
|
|
88
88
|
className: cn(
|
|
89
|
-
"relative flex size-
|
|
89
|
+
"relative flex size-(--ds-avatar-md) shrink-0 items-center justify-center rounded-avatar bg-muted text-sm text-muted-foreground ring-(length:--ds-avatar-ring-w) ring-background group-has-data-[size=lg]/avatar-group:size-(--ds-avatar-lg) group-has-data-[size=sm]/avatar-group:size-(--ds-avatar-sm) [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
90
90
|
className
|
|
91
91
|
),
|
|
92
92
|
...props
|
package/dist/ui/ayuda.js
CHANGED
|
@@ -10,13 +10,14 @@ function Ayuda({ children, etiqueta }) {
|
|
|
10
10
|
/* @__PURE__ */ jsx(
|
|
11
11
|
PopoverTrigger,
|
|
12
12
|
{
|
|
13
|
+
"data-slot": "help-trigger",
|
|
13
14
|
type: "button",
|
|
14
15
|
"aria-label": `Qu\xE9 es: ${etiqueta}`,
|
|
15
|
-
className: "text-muted-foreground hover:text-foreground inline-flex shrink-0 items-center rounded-full outline-none focus-visible:ring-
|
|
16
|
+
className: "text-muted-foreground hover:text-foreground inline-flex shrink-0 items-center rounded-full outline-none focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color)",
|
|
16
17
|
children: /* @__PURE__ */ jsx(CircleHelpIcon, { "aria-hidden": "true", className: "size-3.5" })
|
|
17
18
|
}
|
|
18
19
|
),
|
|
19
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-72 text-sm font-normal", side: "top", children })
|
|
20
|
+
/* @__PURE__ */ jsx(PopoverContent, { "data-slot": "help-content", className: "w-72 text-sm font-normal", side: "top", children })
|
|
20
21
|
] });
|
|
21
22
|
}
|
|
22
23
|
export {
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { useRender } from '@base-ui/react/use-render';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
7
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | "info" | "success" | "warning" | "danger" | "neutral" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
10
|
|
package/dist/ui/badge.js
CHANGED
|
@@ -3,16 +3,22 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../lib/utils";
|
|
5
5
|
const badgeVariants = cva(
|
|
6
|
-
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-
|
|
6
|
+
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-badge border border-transparent px-(--ds-badge-px) py-(--ds-badge-py) text-xs font-(--ds-label-weight) whitespace-nowrap transition-all duration-(--ds-motion-snap) focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(--ds-invalid-ring) [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
11
11
|
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
12
12
|
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
13
|
-
outline: "border-border bg-
|
|
13
|
+
outline: "border-border bg-(--ds-field-bg) text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
14
14
|
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
15
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
15
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
16
|
+
// Estados: etiqueta suave con el texto del estado (contraste AA comprobado por check:ds).
|
|
17
|
+
info: "bg-info-soft text-info",
|
|
18
|
+
success: "bg-success-soft text-success",
|
|
19
|
+
warning: "bg-warning-soft text-warning",
|
|
20
|
+
danger: "bg-danger-soft text-danger",
|
|
21
|
+
neutral: "bg-neutral-soft text-neutral"
|
|
16
22
|
}
|
|
17
23
|
},
|
|
18
24
|
defaultVariants: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const bannerVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "info" | "success" | "warning" | "danger" | "brand" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare function Banner({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof bannerVariants>): React.JSX.Element;
|
|
9
|
+
declare function BannerContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function BannerTitle({ className, ...props }: React.ComponentProps<"strong">): React.JSX.Element;
|
|
11
|
+
declare function BannerDescription({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
12
|
+
declare function BannerActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { Banner, BannerActions, BannerContent, BannerDescription, BannerTitle, bannerVariants };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
const bannerVariants = cva(
|
|
5
|
+
"group/banner flex w-full items-center gap-3 border-b px-(--ds-banner-px) py-(--ds-banner-py) text-sm [&>svg]:shrink-0 [&>svg:not([class*='size-'])]:size-4",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "border-border bg-inset text-inset-foreground",
|
|
10
|
+
brand: "border-transparent bg-primary text-primary-foreground [&_a]:text-primary-foreground",
|
|
11
|
+
info: "border-info/30 bg-info-soft text-info",
|
|
12
|
+
success: "border-success/30 bg-success-soft text-success",
|
|
13
|
+
warning: "border-warning/30 bg-warning-soft text-warning",
|
|
14
|
+
danger: "border-danger/30 bg-danger-soft text-danger"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
variant: "default"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
function Banner({
|
|
23
|
+
className,
|
|
24
|
+
variant,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "banner",
|
|
31
|
+
"data-variant": variant ?? "default",
|
|
32
|
+
role: "status",
|
|
33
|
+
className: cn(bannerVariants({ variant }), className),
|
|
34
|
+
...props
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function BannerContent({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "banner-content",
|
|
43
|
+
className: cn(
|
|
44
|
+
"flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 gap-y-1 [&_a]:font-medium [&_a]:underline [&_a]:underline-offset-3",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function BannerTitle({ className, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"strong",
|
|
54
|
+
{
|
|
55
|
+
"data-slot": "banner-title",
|
|
56
|
+
className: cn("font-semibold", className),
|
|
57
|
+
...props
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function BannerDescription({ className, ...props }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "banner-description",
|
|
66
|
+
className: cn("opacity-90", className),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function BannerActions({ className, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "banner-actions",
|
|
76
|
+
className: cn("ml-auto flex shrink-0 items-center gap-2", className),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
Banner,
|
|
83
|
+
BannerActions,
|
|
84
|
+
BannerContent,
|
|
85
|
+
BannerDescription,
|
|
86
|
+
BannerTitle,
|
|
87
|
+
bannerVariants
|
|
88
|
+
};
|
package/dist/ui/breadcrumb.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
3
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
5
|
import { cn } from "../lib/utils";
|
|
5
6
|
import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
7
|
+
import { useDsMessages } from "../hooks/use-ds-messages";
|
|
6
8
|
function Breadcrumb({ className, ...props }) {
|
|
9
|
+
const t = useDsMessages();
|
|
7
10
|
return /* @__PURE__ */ jsx(
|
|
8
11
|
"nav",
|
|
9
12
|
{
|
|
10
|
-
"aria-label":
|
|
13
|
+
"aria-label": t.breadcrumb,
|
|
11
14
|
"data-slot": "breadcrumb",
|
|
12
15
|
className: cn(className),
|
|
13
16
|
...props
|
|
@@ -46,7 +49,7 @@ function BreadcrumbLink({
|
|
|
46
49
|
defaultTagName: "a",
|
|
47
50
|
props: mergeProps(
|
|
48
51
|
{
|
|
49
|
-
className: cn("transition-colors hover:text-foreground", className)
|
|
52
|
+
className: cn("transition-colors duration-(--ds-motion-snap) hover:text-foreground", className)
|
|
50
53
|
},
|
|
51
54
|
props
|
|
52
55
|
),
|
|
@@ -90,6 +93,7 @@ function BreadcrumbEllipsis({
|
|
|
90
93
|
className,
|
|
91
94
|
...props
|
|
92
95
|
}) {
|
|
96
|
+
const t = useDsMessages();
|
|
93
97
|
return /* @__PURE__ */ jsxs(
|
|
94
98
|
"span",
|
|
95
99
|
{
|
|
@@ -103,7 +107,7 @@ function BreadcrumbEllipsis({
|
|
|
103
107
|
...props,
|
|
104
108
|
children: [
|
|
105
109
|
/* @__PURE__ */ jsx(MoreHorizontalIcon, {}),
|
|
106
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children:
|
|
110
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: t.breadcrumbMore })
|
|
107
111
|
]
|
|
108
112
|
}
|
|
109
113
|
);
|
package/dist/ui/bubble.js
CHANGED
|
@@ -14,17 +14,17 @@ function BubbleGroup({ className, ...props }) {
|
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
16
|
const bubbleVariants = cva(
|
|
17
|
-
"group/bubble relative flex w-fit max-w-
|
|
17
|
+
"group/bubble relative flex w-fit max-w-(--ds-bubble-max-w) min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",
|
|
18
18
|
{
|
|
19
19
|
variants: {
|
|
20
20
|
variant: {
|
|
21
21
|
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
22
22
|
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
23
23
|
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
24
|
-
tinted: "*:data-[slot=bubble-content]:bg-
|
|
25
|
-
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-
|
|
24
|
+
tinted: "*:data-[slot=bubble-content]:bg-(--ds-bubble-tinted) *:data-[slot=bubble-content]:text-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-(--ds-bubble-tinted-hover)",
|
|
25
|
+
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-(--ds-field-bg)",
|
|
26
26
|
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
27
|
-
destructive: "*:data-[slot=bubble-content]:bg-
|
|
27
|
+
destructive: "*:data-[slot=bubble-content]:bg-danger-soft *:data-[slot=bubble-content]:text-danger [&>[data-slot=bubble-content]:is(button,a):hover]:bg-danger-soft"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
defaultVariants: {
|
|
@@ -59,7 +59,7 @@ function BubbleContent({
|
|
|
59
59
|
props: mergeProps(
|
|
60
60
|
{
|
|
61
61
|
className: cn(
|
|
62
|
-
"w-fit max-w-full min-w-0 overflow-hidden rounded-
|
|
62
|
+
"w-fit max-w-full min-w-0 overflow-hidden rounded-bubble border border-transparent px-(--ds-bubble-px) py-(--ds-bubble-py) text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:duration-(--ds-motion-snap) [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-(length:--ds-ring-width) [button,a]:focus-visible:ring-(--ds-ring-color)",
|
|
63
63
|
className
|
|
64
64
|
)
|
|
65
65
|
},
|
|
@@ -72,7 +72,7 @@ function BubbleContent({
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
const bubbleReactionsVariants = cva(
|
|
75
|
-
"absolute z-(--ds-z-raised) flex w-fit shrink-0 items-center justify-center gap-1 rounded-
|
|
75
|
+
"absolute z-(--ds-z-raised) flex w-fit shrink-0 items-center justify-center gap-1 rounded-(--ds-radius-pill) bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",
|
|
76
76
|
{
|
|
77
77
|
variants: {
|
|
78
78
|
side: {
|
package/dist/ui/button-group.js
CHANGED
|
@@ -5,12 +5,12 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
6
|
import { Separator } from "./separator";
|
|
7
7
|
const buttonGroupVariants = cva(
|
|
8
|
-
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-(--ds-z-raised) has-[>[data-slot=button-group]]:gap-2
|
|
8
|
+
"flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-(--ds-z-raised) has-[>[data-slot=button-group]]:gap-2 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
orientation: {
|
|
12
|
-
horizontal: "
|
|
13
|
-
vertical: "flex-col
|
|
12
|
+
horizontal: "[&>[data-slot]:has(~[data-slot])]:rounded-r-none [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0",
|
|
13
|
+
vertical: "flex-col [&>[data-slot]:has(~[data-slot])]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
@@ -44,7 +44,7 @@ function ButtonGroupText({
|
|
|
44
44
|
props: mergeProps(
|
|
45
45
|
{
|
|
46
46
|
className: cn(
|
|
47
|
-
"flex items-center gap-2 rounded-
|
|
47
|
+
"flex items-center gap-2 rounded-button border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
48
48
|
className
|
|
49
49
|
)
|
|
50
50
|
},
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare const buttonVariants: (props?: ({
|
|
7
7
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
8
|
-
size?: "default" | "
|
|
8
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Button({ className, variant, size, render, nativeButton: _nativeButton, ...props }: useRender.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
11
11
|
nativeButton?: boolean;
|
package/dist/ui/button.js
CHANGED
|
@@ -3,12 +3,12 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
4
|
import { cn } from "../lib/utils";
|
|
5
5
|
const buttonVariants = cva(
|
|
6
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-
|
|
6
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-button border border-transparent bg-clip-padding text-sm font-(--ds-button-weight) whitespace-nowrap transition-all duration-(--ds-motion-snap) outline-none select-none focus-visible:border-ring focus-visible:ring-(length:--ds-ring-width) focus-visible:ring-(--ds-ring-color) active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-(--ds-disabled-opacity) aria-invalid:border-(--ds-invalid-border) aria-invalid:ring-(length:--ds-ring-width) aria-invalid:ring-(--ds-invalid-ring) [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
7
7
|
{
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
11
|
-
outline: "border-border bg-
|
|
11
|
+
outline: "border-border bg-(--ds-field-bg) hover:bg-(--ds-field-bg-hover) hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
12
12
|
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
13
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
14
14
|
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
@@ -16,13 +16,13 @@ const buttonVariants = cva(
|
|
|
16
16
|
},
|
|
17
17
|
size: {
|
|
18
18
|
default: "h-(--ds-control-h-md) gap-1.5 px-(--ds-button-px-md) has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5",
|
|
19
|
-
xs: "h-
|
|
19
|
+
xs: "h-(--ds-control-h-xs) gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
|
|
20
20
|
sm: "h-(--ds-control-h-sm) gap-1 px-(--ds-button-px-sm) has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
21
21
|
lg: "h-(--ds-control-h-lg) gap-1.5 px-(--ds-button-px-lg) has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
22
22
|
icon: "size-(--ds-control-h-md)",
|
|
23
|
-
"icon-xs": "size-
|
|
23
|
+
"icon-xs": "size-(--ds-control-h-xs) [&_svg:not([class*='size-'])]:size-3",
|
|
24
24
|
"icon-sm": "size-(--ds-control-h-sm)",
|
|
25
|
-
"icon-lg": "size-
|
|
25
|
+
"icon-lg": "size-(--ds-control-h-lg)"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
defaultVariants: {
|
package/dist/ui/calendar.js
CHANGED
|
@@ -25,7 +25,7 @@ function Calendar({
|
|
|
25
25
|
{
|
|
26
26
|
showOutsideDays,
|
|
27
27
|
className: cn(
|
|
28
|
-
"group/calendar bg-background p-3 [--cell-radius:var(--radius-
|
|
28
|
+
"group/calendar bg-background p-3 [--cell-radius:var(--radius-control)] [--cell-size:var(--ds-control-h-sm)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
29
29
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
30
30
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
31
31
|
className
|
|
@@ -49,12 +49,12 @@ function Calendar({
|
|
|
49
49
|
),
|
|
50
50
|
button_previous: cn(
|
|
51
51
|
buttonVariants({ variant: buttonVariant }),
|
|
52
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-
|
|
52
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-(--ds-disabled-opacity)",
|
|
53
53
|
defaultClassNames.button_previous
|
|
54
54
|
),
|
|
55
55
|
button_next: cn(
|
|
56
56
|
buttonVariants({ variant: buttonVariant }),
|
|
57
|
-
"size-(--cell-size) p-0 select-none aria-disabled:opacity-
|
|
57
|
+
"size-(--cell-size) p-0 select-none aria-disabled:opacity-(--ds-disabled-opacity)",
|
|
58
58
|
defaultClassNames.button_next
|
|
59
59
|
),
|
|
60
60
|
month_caption: cn(
|
|
@@ -81,7 +81,7 @@ function Calendar({
|
|
|
81
81
|
month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
|
|
82
82
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
83
83
|
weekday: cn(
|
|
84
|
-
"flex-1 rounded-(--cell-radius) text-
|
|
84
|
+
"flex-1 rounded-(--cell-radius) text-xs font-normal text-muted-foreground select-none",
|
|
85
85
|
defaultClassNames.weekday
|
|
86
86
|
),
|
|
87
87
|
week: cn("mt-2 flex w-full", defaultClassNames.week),
|
|
@@ -90,7 +90,7 @@ function Calendar({
|
|
|
90
90
|
defaultClassNames.week_number_header
|
|
91
91
|
),
|
|
92
92
|
week_number: cn(
|
|
93
|
-
"text-
|
|
93
|
+
"text-xs text-muted-foreground select-none",
|
|
94
94
|
defaultClassNames.week_number
|
|
95
95
|
),
|
|
96
96
|
day: cn(
|
|
@@ -143,6 +143,33 @@ function Calendar({
|
|
|
143
143
|
}
|
|
144
144
|
return /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
145
145
|
},
|
|
146
|
+
// Ganchos para la PERSONALIDAD de un tema: mismas etiquetas que las de
|
|
147
|
+
// react-day-picker, con `data-slot` (y las flechas, como botones).
|
|
148
|
+
Day: ({ day: _day, modifiers: _modifiers, ...props2 }) => /* @__PURE__ */ jsx("td", { "data-slot": "calendar-day", ...props2 }),
|
|
149
|
+
Weekday: (props2) => /* @__PURE__ */ jsx("th", { "data-slot": "calendar-weekday", ...props2 }),
|
|
150
|
+
MonthCaption: ({
|
|
151
|
+
calendarMonth: _calendarMonth,
|
|
152
|
+
displayIndex: _displayIndex,
|
|
153
|
+
...props2
|
|
154
|
+
}) => /* @__PURE__ */ jsx("div", { "data-slot": "calendar-caption", ...props2 }),
|
|
155
|
+
PreviousMonthButton: (props2) => /* @__PURE__ */ jsx(
|
|
156
|
+
"button",
|
|
157
|
+
{
|
|
158
|
+
"data-slot": "button",
|
|
159
|
+
"data-variant": buttonVariant,
|
|
160
|
+
"data-calendar-nav": "previous",
|
|
161
|
+
...props2
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
NextMonthButton: (props2) => /* @__PURE__ */ jsx(
|
|
165
|
+
"button",
|
|
166
|
+
{
|
|
167
|
+
"data-slot": "button",
|
|
168
|
+
"data-variant": buttonVariant,
|
|
169
|
+
"data-calendar-nav": "next",
|
|
170
|
+
...props2
|
|
171
|
+
}
|
|
172
|
+
),
|
|
146
173
|
DayButton: ({ ...props2 }) => /* @__PURE__ */ jsx(CalendarDayButton, { locale, ...props2 }),
|
|
147
174
|
WeekNumber: ({ children, ...props2 }) => {
|
|
148
175
|
return /* @__PURE__ */ jsx("td", { ...props2, children: /* @__PURE__ */ jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
@@ -176,7 +203,7 @@ function CalendarDayButton({
|
|
|
176
203
|
"data-range-end": modifiers.range_end,
|
|
177
204
|
"data-range-middle": modifiers.range_middle,
|
|
178
205
|
className: cn(
|
|
179
|
-
"relative isolate z-(--ds-z-raised) flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-(--ds-z-raised) group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-(length:--ds-ring-width) group-data-[focused=true]/day:ring-ring
|
|
206
|
+
"relative isolate z-(--ds-z-raised) flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-(--ds-z-raised) group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-(length:--ds-ring-width) group-data-[focused=true]/day:ring-(--ds-ring-color) data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
|
|
180
207
|
defaultClassNames.day,
|
|
181
208
|
className
|
|
182
209
|
),
|