@asanchez-sa/abby 0.5.0 → 0.6.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/components/dialog/dialog.d.ts +21 -3
- package/dist/components/dialog/dialog.js +60 -12
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/sidebar/sidebar.js +50 -49
- package/dist/styles/components.css +14 -0
- package/package.json +1 -1
- package/skills/agent-ready-ui/SKILL.md +1 -1
- package/skills/blocks/SKILL.md +1 -1
- package/skills/compose-screens/SKILL.md +4 -2
- package/skills/note-editor/SKILL.md +1 -1
- package/skills/note-status/SKILL.md +1 -1
- package/skills/setup/SKILL.md +1 -1
- package/skills/theming/SKILL.md +1 -1
|
@@ -6,9 +6,27 @@ declare function Dialog(props: DialogProps): import("react").JSX.Element;
|
|
|
6
6
|
type DialogTriggerProps = ComponentProps<typeof DialogTrigger$1> & ButtonLook;
|
|
7
7
|
declare function DialogTrigger({ variant, size, className, ...props }: DialogTriggerProps): import("react").JSX.Element;
|
|
8
8
|
declare function DialogBackdrop({ className, ...props }: ComponentProps<typeof DialogBackdrop$1>): import("react").JSX.Element;
|
|
9
|
-
|
|
10
|
-
/**
|
|
9
|
+
type DialogContentProps = ComponentProps<typeof DialogContent$1> & {
|
|
10
|
+
/**
|
|
11
|
+
* Fills the screen on a phone (under 768px), for a long form: a 52px bar
|
|
12
|
+
* with the close and the title, a body that scrolls (`DialogBody`) and the
|
|
13
|
+
* actions fixed at the bottom. From 768px it is the centered dialog.
|
|
14
|
+
*/
|
|
15
|
+
fullscreen?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function DialogContent({ className, fullscreen, ...props }: DialogContentProps): import("react").JSX.Element;
|
|
18
|
+
/**
|
|
19
|
+
* The title and description, stacked 6px apart as in Alma's dialogs. In a
|
|
20
|
+
* full-screen dialog on a phone it is the 52px bar: a close button first
|
|
21
|
+
* (44px there, wherever it sits from 768px) and the title at 13px.
|
|
22
|
+
*/
|
|
11
23
|
declare function DialogHeader({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
24
|
+
/**
|
|
25
|
+
* What sits between the header and the footer. It adds nothing to a centered
|
|
26
|
+
* dialog, where its children are the content's own; in a full-screen dialog
|
|
27
|
+
* on a phone it is the part that scrolls, 20px down and 16px in.
|
|
28
|
+
*/
|
|
29
|
+
declare function DialogBody({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
12
30
|
declare const dialogFooterVariants: (props?: ({
|
|
13
31
|
variant?: "default" | "inline" | null | undefined;
|
|
14
32
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -19,4 +37,4 @@ declare function DialogDescription({ className, ...props }: ComponentProps<typeo
|
|
|
19
37
|
type DialogCloseProps = ComponentProps<typeof DialogClose$1> & ButtonLook;
|
|
20
38
|
declare function DialogClose({ variant, size, className, ...props }: DialogCloseProps): import("react").JSX.Element;
|
|
21
39
|
declare function DialogShortcut({ className, ...props }: ComponentProps<typeof DialogShortcut$1>): import("react").JSX.Element;
|
|
22
|
-
export { Dialog, DialogBackdrop, DialogClose, type DialogCloseProps, DialogContent, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogProps, DialogShortcut, DialogTitle, DialogTrigger, type DialogTriggerProps, createDialogController, dialogFooterVariants };
|
|
40
|
+
export { Dialog, DialogBackdrop, DialogBody, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, type DialogFooterProps, DialogHeader, type DialogProps, DialogShortcut, DialogTitle, DialogTrigger, type DialogTriggerProps, createDialogController, dialogFooterVariants };
|
|
@@ -89,6 +89,53 @@ function DialogBackdrop(t0) {
|
|
|
89
89
|
return t2;
|
|
90
90
|
}
|
|
91
91
|
function DialogContent(t0) {
|
|
92
|
+
const $ = c(10);
|
|
93
|
+
let className;
|
|
94
|
+
let props;
|
|
95
|
+
let t1;
|
|
96
|
+
if ($[0] !== t0) {
|
|
97
|
+
({className, fullscreen: t1, ...props} = t0);
|
|
98
|
+
$[0] = t0;
|
|
99
|
+
$[1] = className;
|
|
100
|
+
$[2] = props;
|
|
101
|
+
$[3] = t1;
|
|
102
|
+
} else {
|
|
103
|
+
className = $[1];
|
|
104
|
+
props = $[2];
|
|
105
|
+
t1 = $[3];
|
|
106
|
+
}
|
|
107
|
+
const t2 = (t1 === void 0 ? false : t1) ? "" : void 0;
|
|
108
|
+
let t3;
|
|
109
|
+
if ($[4] !== className) {
|
|
110
|
+
t3 = cnState([
|
|
111
|
+
"grid gap-4 bg-popover p-(--dialog-padding) text-sm [--dialog-padding:--spacing(4)] text-popover-foreground shadow-lg ring-1 ring-foreground/10 outline-none",
|
|
112
|
+
"data-[presentation=dialog]:popup-motion data-[presentation=dialog]:fixed data-[presentation=dialog]:inset-0 data-[presentation=dialog]:m-auto data-[presentation=dialog]:h-fit data-[presentation=dialog]:max-h-[calc(100%-2rem)] data-[presentation=dialog]:w-full data-[presentation=dialog]:max-w-[calc(100%-2rem)] data-[presentation=dialog]:overflow-y-auto data-[presentation=dialog]:rounded-2xl data-[presentation=dialog]:[--popup-duration:var(--transition-duration-modal)] data-[presentation=dialog]:data-starting-style:scale-[0.96] data-[presentation=dialog]:data-closed:scale-[0.96] data-[presentation=dialog]:sm:max-w-sm",
|
|
113
|
+
"data-[presentation=sheet]:rounded-t-2xl",
|
|
114
|
+
"dialog-fullscreen:top-(--visual-viewport-top,0px) dialog-fullscreen:m-0 dialog-fullscreen:flex dialog-fullscreen:h-(--visual-viewport-height,100dvh) dialog-fullscreen:max-h-none dialog-fullscreen:max-w-none dialog-fullscreen:flex-col dialog-fullscreen:gap-0 dialog-fullscreen:overflow-hidden dialog-fullscreen:rounded-none dialog-fullscreen:bg-background dialog-fullscreen:p-0 dialog-fullscreen:text-foreground dialog-fullscreen:shadow-none dialog-fullscreen:ring-0 dialog-fullscreen:data-closed:scale-100 dialog-fullscreen:data-starting-style:scale-100"
|
|
115
|
+
], className);
|
|
116
|
+
$[4] = className;
|
|
117
|
+
$[5] = t3;
|
|
118
|
+
} else t3 = $[5];
|
|
119
|
+
let t4;
|
|
120
|
+
if ($[6] !== props || $[7] !== t2 || $[8] !== t3) {
|
|
121
|
+
t4 = /* @__PURE__ */ jsx(DialogContent$1, {
|
|
122
|
+
"data-fullscreen": t2,
|
|
123
|
+
className: t3,
|
|
124
|
+
...props
|
|
125
|
+
});
|
|
126
|
+
$[6] = props;
|
|
127
|
+
$[7] = t2;
|
|
128
|
+
$[8] = t3;
|
|
129
|
+
$[9] = t4;
|
|
130
|
+
} else t4 = $[9];
|
|
131
|
+
return t4;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The title and description, stacked 6px apart as in Alma's dialogs. In a
|
|
135
|
+
* full-screen dialog on a phone it is the 52px bar: a close button first
|
|
136
|
+
* (44px there, wherever it sits from 768px) and the title at 13px.
|
|
137
|
+
*/
|
|
138
|
+
function DialogHeader(t0) {
|
|
92
139
|
const $ = c(8);
|
|
93
140
|
let className;
|
|
94
141
|
let props;
|
|
@@ -103,17 +150,14 @@ function DialogContent(t0) {
|
|
|
103
150
|
}
|
|
104
151
|
let t1;
|
|
105
152
|
if ($[3] !== className) {
|
|
106
|
-
t1 =
|
|
107
|
-
"grid gap-4 bg-popover p-(--dialog-padding) text-sm [--dialog-padding:--spacing(4)] text-popover-foreground shadow-lg ring-1 ring-foreground/10 outline-none",
|
|
108
|
-
"data-[presentation=dialog]:popup-motion data-[presentation=dialog]:fixed data-[presentation=dialog]:inset-0 data-[presentation=dialog]:m-auto data-[presentation=dialog]:h-fit data-[presentation=dialog]:max-h-[calc(100%-2rem)] data-[presentation=dialog]:w-full data-[presentation=dialog]:max-w-[calc(100%-2rem)] data-[presentation=dialog]:overflow-y-auto data-[presentation=dialog]:rounded-2xl data-[presentation=dialog]:[--popup-duration:var(--transition-duration-modal)] data-[presentation=dialog]:data-starting-style:scale-[0.96] data-[presentation=dialog]:data-closed:scale-[0.96] data-[presentation=dialog]:sm:max-w-sm",
|
|
109
|
-
"data-[presentation=sheet]:rounded-t-2xl"
|
|
110
|
-
], className);
|
|
153
|
+
t1 = cn("flex flex-col gap-1.5", "dialog-fullscreen:h-13 dialog-fullscreen:shrink-0 dialog-fullscreen:flex-row dialog-fullscreen:items-center dialog-fullscreen:gap-2 dialog-fullscreen:border-b dialog-fullscreen:pr-4 dialog-fullscreen:pl-2", "dialog-fullscreen:*:data-[slot=dialog-title]:min-w-0 dialog-fullscreen:*:data-[slot=dialog-title]:flex-1 dialog-fullscreen:*:data-[slot=dialog-title]:truncate dialog-fullscreen:*:data-[slot=dialog-title]:text-label dialog-fullscreen:*:data-[slot=dialog-title]:font-semibold", "dialog-fullscreen:*:data-[slot=dialog-close]:static dialog-fullscreen:*:data-[slot=dialog-close]:size-11 dialog-fullscreen:*:data-[slot=dialog-close]:shrink-0 dialog-fullscreen:*:data-[slot=dialog-close]:text-foreground", className);
|
|
111
154
|
$[3] = className;
|
|
112
155
|
$[4] = t1;
|
|
113
156
|
} else t1 = $[4];
|
|
114
157
|
let t2;
|
|
115
158
|
if ($[5] !== props || $[6] !== t1) {
|
|
116
|
-
t2 = /* @__PURE__ */ jsx(
|
|
159
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
160
|
+
"data-slot": "dialog-header",
|
|
117
161
|
className: t1,
|
|
118
162
|
...props
|
|
119
163
|
});
|
|
@@ -123,8 +167,12 @@ function DialogContent(t0) {
|
|
|
123
167
|
} else t2 = $[7];
|
|
124
168
|
return t2;
|
|
125
169
|
}
|
|
126
|
-
/**
|
|
127
|
-
|
|
170
|
+
/**
|
|
171
|
+
* What sits between the header and the footer. It adds nothing to a centered
|
|
172
|
+
* dialog, where its children are the content's own; in a full-screen dialog
|
|
173
|
+
* on a phone it is the part that scrolls, 20px down and 16px in.
|
|
174
|
+
*/
|
|
175
|
+
function DialogBody(t0) {
|
|
128
176
|
const $ = c(8);
|
|
129
177
|
let className;
|
|
130
178
|
let props;
|
|
@@ -139,14 +187,14 @@ function DialogHeader(t0) {
|
|
|
139
187
|
}
|
|
140
188
|
let t1;
|
|
141
189
|
if ($[3] !== className) {
|
|
142
|
-
t1 = cn("flex flex-col gap-
|
|
190
|
+
t1 = cn("contents dialog-fullscreen:flex dialog-fullscreen:min-h-0 dialog-fullscreen:flex-1 dialog-fullscreen:flex-col dialog-fullscreen:gap-6 dialog-fullscreen:overflow-y-auto dialog-fullscreen:px-4 dialog-fullscreen:py-5", className);
|
|
143
191
|
$[3] = className;
|
|
144
192
|
$[4] = t1;
|
|
145
193
|
} else t1 = $[4];
|
|
146
194
|
let t2;
|
|
147
195
|
if ($[5] !== props || $[6] !== t1) {
|
|
148
196
|
t2 = /* @__PURE__ */ jsx("div", {
|
|
149
|
-
"data-slot": "dialog-
|
|
197
|
+
"data-slot": "dialog-body",
|
|
150
198
|
className: t1,
|
|
151
199
|
...props
|
|
152
200
|
});
|
|
@@ -182,7 +230,7 @@ function DialogFooter(t0) {
|
|
|
182
230
|
const t1 = variant ?? "default";
|
|
183
231
|
let t2;
|
|
184
232
|
if ($[4] !== className || $[5] !== variant) {
|
|
185
|
-
t2 = cn(dialogFooterVariants({ variant }), className);
|
|
233
|
+
t2 = cn(dialogFooterVariants({ variant }), "dialog-fullscreen:m-0 dialog-fullscreen:shrink-0 dialog-fullscreen:flex-col-reverse dialog-fullscreen:items-stretch dialog-fullscreen:border-t dialog-fullscreen:bg-background dialog-fullscreen:px-4 dialog-fullscreen:pt-3 dialog-fullscreen:pb-[max(--spacing(8),env(safe-area-inset-bottom))] dialog-fullscreen:*:h-11", className);
|
|
186
234
|
$[4] = className;
|
|
187
235
|
$[5] = variant;
|
|
188
236
|
$[6] = t2;
|
|
@@ -337,4 +385,4 @@ function DialogShortcut(t0) {
|
|
|
337
385
|
} else t2 = $[7];
|
|
338
386
|
return t2;
|
|
339
387
|
}
|
|
340
|
-
export { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogShortcut, DialogTitle, DialogTrigger, createDialogController, dialogFooterVariants };
|
|
388
|
+
export { Dialog, DialogBackdrop, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogShortcut, DialogTitle, DialogTrigger, createDialogController, dialogFooterVariants };
|
|
@@ -98,7 +98,7 @@ declare function SidebarMenu({ className, ...props }: ComponentProps<"ul">): imp
|
|
|
98
98
|
declare function SidebarMenuItem({ className, ...props }: ComponentProps<"li">): import("react").JSX.Element;
|
|
99
99
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
100
100
|
variant?: "default" | "outline" | null | undefined;
|
|
101
|
-
size?: "default" | "icon" | "lg" | "sm" | null | undefined;
|
|
101
|
+
size?: "default" | "icon" | "lg" | "sm" | "touch" | null | undefined;
|
|
102
102
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
103
103
|
type SidebarMenuButtonProps = ComponentProps<typeof Button> & VariantProps<typeof sidebarMenuButtonVariants> & {
|
|
104
104
|
/** Marks the page or section the user is on. */
|
|
@@ -989,6 +989,7 @@ const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w
|
|
|
989
989
|
default: "h-8 text-sm",
|
|
990
990
|
sm: "h-7 text-xs",
|
|
991
991
|
lg: "h-12 items-start py-1.5 text-sm",
|
|
992
|
+
touch: "h-11 gap-3 text-body [&_svg]:size-4.5",
|
|
992
993
|
icon: "size-9 justify-center rounded-full p-0 text-muted-foreground [&_svg]:size-4.5 [&>:not(svg):not([aria-hidden])]:sr-only"
|
|
993
994
|
}
|
|
994
995
|
},
|
|
@@ -1024,40 +1025,40 @@ function SidebarMenuButton(t0) {
|
|
|
1024
1025
|
}
|
|
1025
1026
|
const isActive = t1 === void 0 ? false : t1;
|
|
1026
1027
|
const { open, isMobile } = useSidebar();
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
const
|
|
1030
|
-
const
|
|
1031
|
-
let
|
|
1032
|
-
if ($[7] !== className || $[8] !==
|
|
1033
|
-
|
|
1028
|
+
const resolved = size ?? (isMobile ? "touch" : "default");
|
|
1029
|
+
const tooltipOff = resolved === "icon" ? false : open || isMobile;
|
|
1030
|
+
const t2 = isActive ? "" : void 0;
|
|
1031
|
+
const t3 = isActive ? "page" : void 0;
|
|
1032
|
+
let t4;
|
|
1033
|
+
if ($[7] !== className || $[8] !== resolved || $[9] !== variant) {
|
|
1034
|
+
t4 = cnState(sidebarMenuButtonVariants({
|
|
1034
1035
|
variant,
|
|
1035
|
-
size
|
|
1036
|
+
size: resolved
|
|
1036
1037
|
}), className);
|
|
1037
1038
|
$[7] = className;
|
|
1038
|
-
$[8] =
|
|
1039
|
+
$[8] = resolved;
|
|
1039
1040
|
$[9] = variant;
|
|
1040
|
-
$[10] =
|
|
1041
|
-
} else
|
|
1042
|
-
let
|
|
1043
|
-
if ($[11] !==
|
|
1044
|
-
|
|
1041
|
+
$[10] = t4;
|
|
1042
|
+
} else t4 = $[10];
|
|
1043
|
+
let t5;
|
|
1044
|
+
if ($[11] !== resolved || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
|
|
1045
|
+
t5 = {
|
|
1045
1046
|
"data-slot": "sidebar-menu-button",
|
|
1046
|
-
"data-size":
|
|
1047
|
-
"data-active":
|
|
1048
|
-
"aria-current":
|
|
1049
|
-
className:
|
|
1047
|
+
"data-size": resolved,
|
|
1048
|
+
"data-active": t2,
|
|
1049
|
+
"aria-current": t3,
|
|
1050
|
+
className: t4
|
|
1050
1051
|
};
|
|
1051
|
-
$[11] =
|
|
1052
|
-
$[12] =
|
|
1053
|
-
$[13] =
|
|
1054
|
-
$[14] =
|
|
1055
|
-
$[15] =
|
|
1056
|
-
} else
|
|
1057
|
-
const own =
|
|
1058
|
-
let
|
|
1052
|
+
$[11] = resolved;
|
|
1053
|
+
$[12] = t2;
|
|
1054
|
+
$[13] = t3;
|
|
1055
|
+
$[14] = t4;
|
|
1056
|
+
$[15] = t5;
|
|
1057
|
+
} else t5 = $[15];
|
|
1058
|
+
const own = t5;
|
|
1059
|
+
let t6;
|
|
1059
1060
|
if ($[16] !== own || $[17] !== props) {
|
|
1060
|
-
|
|
1061
|
+
t6 = props.render ? /* @__PURE__ */ jsx(LinkPart, {
|
|
1061
1062
|
...own,
|
|
1062
1063
|
...props
|
|
1063
1064
|
}) : /* @__PURE__ */ jsx(Button, {
|
|
@@ -1066,38 +1067,38 @@ function SidebarMenuButton(t0) {
|
|
|
1066
1067
|
});
|
|
1067
1068
|
$[16] = own;
|
|
1068
1069
|
$[17] = props;
|
|
1069
|
-
$[18] =
|
|
1070
|
-
} else
|
|
1071
|
-
const button =
|
|
1070
|
+
$[18] = t6;
|
|
1071
|
+
} else t6 = $[18];
|
|
1072
|
+
const button = t6;
|
|
1072
1073
|
if (!tooltip) return button;
|
|
1073
|
-
let
|
|
1074
|
+
let t7;
|
|
1074
1075
|
if ($[19] !== button) {
|
|
1075
|
-
|
|
1076
|
+
t7 = /* @__PURE__ */ jsx(TooltipTrigger, { render: button });
|
|
1076
1077
|
$[19] = button;
|
|
1077
|
-
$[20] =
|
|
1078
|
-
} else
|
|
1079
|
-
let
|
|
1078
|
+
$[20] = t7;
|
|
1079
|
+
} else t7 = $[20];
|
|
1080
|
+
let t8;
|
|
1080
1081
|
if ($[21] !== tooltip) {
|
|
1081
|
-
|
|
1082
|
+
t8 = /* @__PURE__ */ jsx(TooltipContent$1, {
|
|
1082
1083
|
side: "right",
|
|
1083
1084
|
"data-agent-hidden": "",
|
|
1084
1085
|
children: tooltip
|
|
1085
1086
|
});
|
|
1086
1087
|
$[21] = tooltip;
|
|
1087
|
-
$[22] =
|
|
1088
|
-
} else
|
|
1089
|
-
let
|
|
1090
|
-
if ($[23] !==
|
|
1091
|
-
|
|
1088
|
+
$[22] = t8;
|
|
1089
|
+
} else t8 = $[22];
|
|
1090
|
+
let t9;
|
|
1091
|
+
if ($[23] !== t7 || $[24] !== t8 || $[25] !== tooltipOff) {
|
|
1092
|
+
t9 = /* @__PURE__ */ jsxs(Tooltip, {
|
|
1092
1093
|
disabled: tooltipOff,
|
|
1093
|
-
children: [
|
|
1094
|
+
children: [t7, t8]
|
|
1094
1095
|
});
|
|
1095
|
-
$[23] =
|
|
1096
|
-
$[24] =
|
|
1096
|
+
$[23] = t7;
|
|
1097
|
+
$[24] = t8;
|
|
1097
1098
|
$[25] = tooltipOff;
|
|
1098
|
-
$[26] =
|
|
1099
|
-
} else
|
|
1100
|
-
return
|
|
1099
|
+
$[26] = t9;
|
|
1100
|
+
} else t9 = $[26];
|
|
1101
|
+
return t9;
|
|
1101
1102
|
}
|
|
1102
1103
|
function SidebarMenuAction(t0) {
|
|
1103
1104
|
const $ = c(10);
|
|
@@ -1118,7 +1119,7 @@ function SidebarMenuAction(t0) {
|
|
|
1118
1119
|
const showOnHover = t1 === void 0 ? false : t1;
|
|
1119
1120
|
let t2;
|
|
1120
1121
|
if ($[4] !== className || $[5] !== showOnHover) {
|
|
1121
|
-
t2 = cnState(cn("absolute top-0.5 right-0 flex size-7 items-center justify-center rounded-full p-0 text-sidebar-foreground transition-transform ease-out sidebar-collapsed:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-0.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-0 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", focusRing, showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0"), className);
|
|
1122
|
+
t2 = cnState(cn("absolute top-0.5 right-0 flex size-7 items-center justify-center rounded-full p-0 text-sidebar-foreground transition-transform ease-out sidebar-collapsed:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-0.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-0 peer-data-[size=touch]/menu-button:top-2 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", focusRing, showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0"), className);
|
|
1122
1123
|
$[4] = className;
|
|
1123
1124
|
$[5] = showOnHover;
|
|
1124
1125
|
$[6] = t2;
|
|
@@ -1163,7 +1164,7 @@ function SidebarMenuBadge(t0) {
|
|
|
1163
1164
|
const t4 = dot && "top-1.75 right-1.75 size-2 min-w-0 p-0";
|
|
1164
1165
|
let t5;
|
|
1165
1166
|
if ($[5] !== className || $[6] !== t3 || $[7] !== t4) {
|
|
1166
|
-
t5 = cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-medium text-sidebar-foreground tabular-nums select-none sidebar-collapsed:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", t3, t4, className);
|
|
1167
|
+
t5 = cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 text-xs font-medium text-sidebar-foreground tabular-nums select-none sidebar-collapsed:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-[size=touch]/menu-button:top-3 peer-data-active/menu-button:text-sidebar-accent-foreground", t3, t4, className);
|
|
1167
1168
|
$[5] = className;
|
|
1168
1169
|
$[6] = t3;
|
|
1169
1170
|
$[7] = t4;
|
|
@@ -366,4 +366,18 @@
|
|
|
366
366
|
* sidebar (a rail, a column that peeks) keep their own shape: a rail is
|
|
367
367
|
* already icons, and a column that hides and peeks never folds its rows.
|
|
368
368
|
*/
|
|
369
|
+
/*
|
|
370
|
+
* A dialog that fills a phone's screen (`DialogContent fullscreen`, under
|
|
371
|
+
* 768px, presented as a dialog), and its header, body and footer. Each is a
|
|
372
|
+
* direct child of the content, so a dialog nested inside isn't touched.
|
|
373
|
+
*/
|
|
374
|
+
@custom-variant dialog-fullscreen {
|
|
375
|
+
@media (width < 48rem) {
|
|
376
|
+
&:is([data-fullscreen][data-presentation="dialog"]),
|
|
377
|
+
:is([data-fullscreen][data-presentation="dialog"]) > & {
|
|
378
|
+
@slot;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
369
383
|
@custom-variant sidebar-collapsed (&:where([data-collapsible="icon"] *):not(:where([data-slot="sidebar-panel"]:not([data-variant])) *));
|
package/package.json
CHANGED
package/skills/blocks/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ metadata:
|
|
|
15
15
|
accessible and usable by agents.
|
|
16
16
|
type: core
|
|
17
17
|
library: abby
|
|
18
|
-
library_version: 0.
|
|
18
|
+
library_version: 0.6.0
|
|
19
19
|
requires:
|
|
20
20
|
- setup
|
|
21
21
|
sources:
|
|
@@ -104,9 +104,11 @@ A destructive action (delete a key, remove a person, close an organization) take
|
|
|
104
104
|
|
|
105
105
|
Popups (dialog, popover, menu, select, tooltip) open in the browser's top layer and render in place: there are no Portal, Positioner or Overlay parts. Placement (`side`, `align`, `sideOffset`) goes on the Content part. `presentation="sheet"` on `Dialog` opens it as a sheet.
|
|
106
106
|
|
|
107
|
+
A long form (an invitation, a settings form) takes `fullscreen` on `DialogContent`: on a phone (under 768px) it fills the screen, with `DialogHeader` as a 52px bar, the form in `DialogBody`, which scrolls, and `DialogFooter` fixed at the bottom with 44px actions across. From 768px the same markup is the centered dialog, and `DialogBody` adds nothing. Put a `DialogClose` with only an icon first in the header, placed where it sits from 768px (`className="absolute end-2 top-2"`): on a phone it becomes the bar's 44px close. Put the description in the body, and hide a Cancel button on a phone (`className="max-md:hidden"`), where the bar closes the dialog.
|
|
108
|
+
|
|
107
109
|
### Use the sizes, not classes that resize
|
|
108
110
|
|
|
109
|
-
Every control has one height per size: `xs` 24px, `sm` 28px (the usual button), `default` 36px (every field too) and `lg` 44px, the touch size. Buttons and one-line fields are capsules. A button with only an icon is a circle and uses `icon-xs`, `icon-sm`, `icon` or `icon-lg`, and needs an `aria-label`.
|
|
111
|
+
Every control has one height per size: `xs` 24px, `sm` 28px (the usual button), `default` 36px (every field too) and `lg` 44px, the touch size. Buttons and one-line fields are capsules. A button with only an icon is a circle and uses `icon-xs`, `icon-sm`, `icon` or `icon-lg`, and needs an `aria-label`. Rows in a list stay 32px, except in the sidebar's sheet on a phone: there a `SidebarMenuButton` with no `size` takes `size="touch"` (44px, an 18px icon, a 14px name).
|
|
110
112
|
|
|
111
113
|
```tsx
|
|
112
114
|
import { Button } from "abby/button";
|
|
@@ -12,7 +12,7 @@ metadata:
|
|
|
12
12
|
and keep both usable by an agent without loading the editor.
|
|
13
13
|
type: core
|
|
14
14
|
library: abby
|
|
15
|
-
library_version: 0.
|
|
15
|
+
library_version: 0.6.0
|
|
16
16
|
sources:
|
|
17
17
|
- src/components/note-status/note-status.tsx
|
|
18
18
|
- src/components/note-place/note-place.tsx
|
package/skills/setup/SKILL.md
CHANGED