@asanchez-sa/abby 0.4.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.
Files changed (32) hide show
  1. package/dist/components/chart/chart.d.ts +5 -74
  2. package/dist/components/chart/chart.js +5 -563
  3. package/dist/components/chart/parts/bar.d.ts +32 -0
  4. package/dist/components/chart/parts/bar.js +348 -0
  5. package/dist/components/chart/parts/{frame.d.ts → categories.d.ts} +5 -4
  6. package/dist/components/chart/parts/categories.js +212 -0
  7. package/dist/components/chart/parts/line.d.ts +43 -0
  8. package/dist/components/chart/parts/line.js +266 -0
  9. package/dist/components/chart/parts/scale.js +1 -44
  10. package/dist/components/chart/parts/scatter.d.ts +67 -0
  11. package/dist/components/chart/parts/scatter.js +157 -0
  12. package/dist/components/chart/parts/surface.d.ts +26 -0
  13. package/dist/components/chart/parts/surface.js +76 -0
  14. package/dist/components/chart/parts/types.js +5 -1
  15. package/dist/components/dialog/dialog.d.ts +21 -3
  16. package/dist/components/dialog/dialog.js +60 -12
  17. package/dist/components/sidebar/sidebar.d.ts +1 -1
  18. package/dist/components/sidebar/sidebar.js +50 -49
  19. package/dist/styles/components.css +80 -0
  20. package/package.json +2 -1
  21. package/skills/agent-ready-ui/SKILL.md +1 -1
  22. package/skills/blocks/SKILL.md +1 -1
  23. package/skills/compose-screens/SKILL.md +10 -7
  24. package/skills/compose-screens/references/charts-and-maps.md +119 -4
  25. package/skills/note-editor/SKILL.md +1 -1
  26. package/skills/note-status/SKILL.md +1 -1
  27. package/skills/setup/SKILL.md +1 -1
  28. package/skills/theming/SKILL.md +1 -1
  29. package/dist/components/chart/parts/axes.js +0 -126
  30. package/dist/components/chart/parts/frame.js +0 -278
  31. package/dist/components/chart/parts/points.d.ts +0 -1
  32. package/dist/components/chart/parts/points.js +0 -139
@@ -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
- declare function DialogContent({ className, ...props }: ComponentProps<typeof DialogContent$1>): import("react").JSX.Element;
10
- /** The title and description, stacked 6px apart as in Alma's dialogs. */
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 = cnState([
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(DialogContent$1, {
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
- /** The title and description, stacked 6px apart as in Alma's dialogs. */
127
- function DialogHeader(t0) {
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-1.5", className);
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-header",
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 tooltipOff = size === "icon" ? false : open || isMobile;
1028
- const t2 = size ?? "default";
1029
- const t3 = isActive ? "" : void 0;
1030
- const t4 = isActive ? "page" : void 0;
1031
- let t5;
1032
- if ($[7] !== className || $[8] !== size || $[9] !== variant) {
1033
- t5 = cnState(sidebarMenuButtonVariants({
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] = size;
1039
+ $[8] = resolved;
1039
1040
  $[9] = variant;
1040
- $[10] = t5;
1041
- } else t5 = $[10];
1042
- let t6;
1043
- if ($[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) {
1044
- t6 = {
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": t2,
1047
- "data-active": t3,
1048
- "aria-current": t4,
1049
- className: t5
1047
+ "data-size": resolved,
1048
+ "data-active": t2,
1049
+ "aria-current": t3,
1050
+ className: t4
1050
1051
  };
1051
- $[11] = t2;
1052
- $[12] = t3;
1053
- $[13] = t4;
1054
- $[14] = t5;
1055
- $[15] = t6;
1056
- } else t6 = $[15];
1057
- const own = t6;
1058
- let t7;
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
- t7 = props.render ? /* @__PURE__ */ jsx(LinkPart, {
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] = t7;
1070
- } else t7 = $[18];
1071
- const button = t7;
1070
+ $[18] = t6;
1071
+ } else t6 = $[18];
1072
+ const button = t6;
1072
1073
  if (!tooltip) return button;
1073
- let t8;
1074
+ let t7;
1074
1075
  if ($[19] !== button) {
1075
- t8 = /* @__PURE__ */ jsx(TooltipTrigger, { render: button });
1076
+ t7 = /* @__PURE__ */ jsx(TooltipTrigger, { render: button });
1076
1077
  $[19] = button;
1077
- $[20] = t8;
1078
- } else t8 = $[20];
1079
- let t9;
1078
+ $[20] = t7;
1079
+ } else t7 = $[20];
1080
+ let t8;
1080
1081
  if ($[21] !== tooltip) {
1081
- t9 = /* @__PURE__ */ jsx(TooltipContent$1, {
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] = t9;
1088
- } else t9 = $[22];
1089
- let t10;
1090
- if ($[23] !== t8 || $[24] !== t9 || $[25] !== tooltipOff) {
1091
- t10 = /* @__PURE__ */ jsxs(Tooltip, {
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: [t8, t9]
1094
+ children: [t7, t8]
1094
1095
  });
1095
- $[23] = t8;
1096
- $[24] = t9;
1096
+ $[23] = t7;
1097
+ $[24] = t8;
1097
1098
  $[25] = tooltipOff;
1098
- $[26] = t10;
1099
- } else t10 = $[26];
1100
- return t10;
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;
@@ -130,6 +130,72 @@
130
130
  }
131
131
  }
132
132
 
133
+ /*
134
+ * A TanStack chart in abby's look. The library paints with SVG attributes and
135
+ * reads its palette and tooltip from `--ts-chart-*`; these rules win over the
136
+ * attributes, so any chart definition takes the theme without passing one:
137
+ * the palette is `chart-1` … `chart-5`, the grid and the axes are hairlines,
138
+ * a tick's label is `subtle`, and the tooltip is abby's `Tooltip`.
139
+ */
140
+ @utility chart-surface {
141
+ --ts-chart-1: var(--chart-1);
142
+ --ts-chart-2: var(--chart-2);
143
+ --ts-chart-3: var(--chart-3);
144
+ --ts-chart-4: var(--chart-4);
145
+ --ts-chart-5: var(--chart-5);
146
+ --ts-chart-6: var(--muted-foreground);
147
+ --ts-chart-focus-fill: var(--accent);
148
+ --ts-chart-crosshair-marker-fill: var(--background);
149
+ --ts-chart-crosshair-label-halo: var(--background);
150
+ --ts-chart-tooltip-background: var(--foreground);
151
+ --ts-chart-tooltip-color: var(--background);
152
+ --ts-chart-tooltip-border: 0;
153
+ --ts-chart-tooltip-border-radius: var(--radius-md);
154
+ --ts-chart-tooltip-padding: --spacing(1.5) --spacing(3);
155
+ --ts-chart-tooltip-font: var(--font-weight-normal) var(--text-xs) / var(--text-xs--line-height)
156
+ var(--font-sans);
157
+ --ts-chart-tooltip-shadow: none;
158
+ --ts-chart-tooltip-max-width: --spacing(80);
159
+ --ts-chart-tooltip-active-row-background: transparent;
160
+ --ts-chart-tooltip-active-row-shadow: none;
161
+ --ts-chart-tooltip-active-row-font-weight: var(--font-weight-medium);
162
+
163
+ & .ts-chart {
164
+ @apply focus-ring rounded-xs;
165
+ font-family: inherit;
166
+ font-variant-numeric: tabular-nums;
167
+ }
168
+
169
+ & .ts-chart > [data-ts-key="background"] {
170
+ fill: transparent;
171
+ }
172
+
173
+ & .ts-chart__grid,
174
+ & .ts-chart__axes line {
175
+ stroke: var(--border);
176
+ stroke-opacity: 1;
177
+ }
178
+
179
+ & .ts-chart__axes text {
180
+ fill: var(--subtle);
181
+ fill-opacity: 1;
182
+ }
183
+
184
+ /* A tick a chart sets in medium (the current day or week) reads in `foreground`. */
185
+ & .ts-chart__axes text[font-weight="500"] {
186
+ fill: var(--foreground);
187
+ }
188
+
189
+ & .ts-chart-tooltip__title {
190
+ font-weight: var(--font-weight-medium) !important;
191
+ }
192
+
193
+ & .ts-chart__axes text:is([data-ts-key="x-label"], [data-ts-key="y-label"]) {
194
+ fill: var(--muted-foreground);
195
+ font-weight: var(--font-weight-medium);
196
+ }
197
+ }
198
+
133
199
  /* The surface of a popup that floats over the page: a popover, a menu, a list of options. */
134
200
  @utility popup-surface {
135
201
  @apply bg-popover text-popover-foreground shadow-md ring-1 ring-border outline-none;
@@ -300,4 +366,18 @@
300
366
  * sidebar (a rail, a column that peeks) keep their own shape: a rail is
301
367
  * already icons, and a column that hides and peeks never folds its rows.
302
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
+
303
383
  @custom-variant sidebar-collapsed (&:where([data-collapsible="icon"] *):not(:where([data-slot="sidebar-panel"]:not([data-variant])) *));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asanchez-sa/abby",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Sistema de diseño para React sobre ui-sdk y Tailwind CSS.",
5
5
  "keywords": [
6
6
  "agents",
@@ -177,6 +177,7 @@
177
177
  "@fontsource-variable/geist-mono": "^5.3.0",
178
178
  "@hugeicons/core-free-icons": "^4.4.0",
179
179
  "@hugeicons/react": "^1.1.10",
180
+ "@tanstack/charts": "1.5.0",
180
181
  "@tiptap/core": "3.32.2",
181
182
  "@tiptap/extension-list": "3.32.2",
182
183
  "@tiptap/extension-unique-id": "3.32.2",
@@ -11,7 +11,7 @@ metadata:
11
11
  risky steps and the app keeping its rules.
12
12
  type: core
13
13
  library: abby
14
- library_version: 0.4.0
14
+ library_version: 0.6.0
15
15
  requires:
16
16
  - compose-screens
17
17
  sources:
@@ -11,7 +11,7 @@ metadata:
11
11
  agent reads.
12
12
  type: lifecycle
13
13
  library: abby
14
- library_version: 0.4.0
14
+ library_version: 0.6.0
15
15
  sources:
16
16
  - src/blocks/notes/notes-block.tsx
17
17
  - src/blocks/notes/adapters.ts
@@ -4,17 +4,18 @@ description: "Use when building screens, forms, dialogs, menus or lists from
4
4
  abby components: parts and their composition, button looks on trigger parts,
5
5
  Icon and Link, sizes, Field for labels and errors, items for lists, controlled
6
6
  state, popups without portals, bar charts of counts by day or week (stacked
7
- into parts, with their legend and notes), line charts of a trend by week, maps
8
- of nodes joined by lines, rows of filter chips, a chip that opens a menu to
9
- narrow a list, a unit inside a number field. Takes precedence over generic
10
- ui-sdk or shadcn examples."
7
+ into parts, with their legend and notes), line charts of a trend by week,
8
+ scatter charts of rows by two numbers, charts of your own from TanStack
9
+ Charts, maps of nodes joined by lines, rows of filter chips, a chip that opens
10
+ a menu to narrow a list, a unit inside a number field. Takes precedence over
11
+ generic ui-sdk or shadcn examples."
11
12
  metadata:
12
13
  purpose: Shows how abby's styled components compose into screens, where they
13
14
  differ from shadcn and from raw ui-sdk, and which choices keep them
14
15
  accessible and usable by agents.
15
16
  type: core
16
17
  library: abby
17
- library_version: 0.4.0
18
+ library_version: 0.6.0
18
19
  requires:
19
20
  - setup
20
21
  sources:
@@ -103,9 +104,11 @@ A destructive action (delete a key, remove a person, close an organization) take
103
104
 
104
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.
105
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
+
106
109
  ### Use the sizes, not classes that resize
107
110
 
108
- 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).
109
112
 
110
113
  ```tsx
111
114
  import { Button } from "abby/button";
@@ -370,7 +373,7 @@ Read [the filter chip reference](references/filter-chips.md) for an example row.
370
373
 
371
374
  ### Show counts or trends by day or week with `BarChart` and `LineChart`
372
375
 
373
- `BarChart` from `abby/chart` draws one column of bars per category, with a tooltip for each value and a table for screen readers. `LineChart` from the same entry draws one trend line over the categories, with reference lines and small charts that share a scale. Read [the charts and maps reference](references/charts-and-maps.md) when you build one: its `data`, `series`, `highlight`, forecast and colors, and its `LineChart` section for `mark`, `domain` and `size="sm"`. For bars made of parts that add up to a total (`stacked`, with `totals`, a `note` and `ChartLegend`), read its stacked section.
376
+ `BarChart` from `abby/chart` draws one column of bars per category, with a tooltip for each value and a table for screen readers. `LineChart` from the same entry draws one trend line over the categories, with reference lines and small charts that share a scale. Read [the charts and maps reference](references/charts-and-maps.md) when you build one: its `data`, `series`, `highlight`, forecast and colors, and its `LineChart` section for `mark`, `domain` and `size="sm"`. For bars made of parts that add up to a total (`stacked`, with `totals`, a `note` and `ChartLegend`), read its stacked section. `ScatterChart` plots the app's own rows by two numbers, sized and colored by two more, and `Chart` draws a TanStack Charts definition of your own in abby's look: each has its section there.
374
377
 
375
378
  ### Build a window with a rail and a column
376
379