@asanchez-sa/abby 0.1.3 → 0.2.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/README.md +1 -1
- package/dist/components/input/input.d.ts +5 -2
- package/dist/components/input/input.js +32 -17
- package/dist/components/otp-input/otp-input.d.ts +8 -2
- package/dist/components/otp-input/otp-input.js +35 -20
- package/dist/components/team-mark/team-mark.d.ts +26 -0
- package/dist/components/team-mark/team-mark.js +101 -0
- package/package.json +2 -1
- package/skills/agent-ready-ui/SKILL.md +1 -1
- package/skills/blocks/SKILL.md +1 -1
- package/skills/compose-screens/SKILL.md +40 -1
- 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
- package/src/blocks/shell/parts/marks.tsx +18 -4
- package/src/blocks/shell/parts/rail.tsx +7 -7
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ vp run bump minor --dry-run # comprueba todo y muestra el plan sin cambiar nada
|
|
|
49
49
|
|
|
50
50
|
`scripts/bump.ts` comprueba que la etiqueta y la versión no existen y que Intent no tiene revisiones pendientes. Después cambia `version` en `package.json`, compila, marca la versión en las skills, registra su revisión, hace commit (`Release <versión>`), crea la etiqueta `v<versión>` y sube la rama y la etiqueta. Con `--no-push` se queda en el commit y la etiqueta. Una prerrelease (`0.2.0-beta.1`) se publica con la etiqueta `next` de npm, sin mover `latest`.
|
|
51
51
|
|
|
52
|
-
La etiqueta lanza el workflow `Release` (`.github/workflows/release.yml`), que corre `vp check`, `vp test` y `vp run build`, y
|
|
52
|
+
La etiqueta lanza el workflow `Release` (`.github/workflows/release.yml`), que corre `vp check`, `vp test` y `vp run build`, publica y escribe la release de GitHub con los commits de la versión (`scripts/release-notes.ts`). npm confía en él por OIDC (trusted publishing): no hay token guardado en GitHub. La versión tarda hasta unos 10 minutos en poder instalarse.
|
|
53
53
|
|
|
54
54
|
A mano, con `npm login` hecho: `vp run build`, luego `vp run release -- --publish --dry-run` para ver qué se publicaría y `vp run release -- --publish` para publicar.
|
|
55
55
|
|
|
@@ -5,5 +5,8 @@ import { Input as Input$1 } from "@ui-sdk/react/input";
|
|
|
5
5
|
* capsule. A control that grows to several lines adds `rounded-2xl`.
|
|
6
6
|
*/
|
|
7
7
|
declare const inputClasses = "h-9 w-full min-w-0 rounded-full border border-input bg-transparent px-3.5 py-1 text-base transition-colors file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder focus-field data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-input/50 data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30";
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type InputProps = Omit<ComponentProps<typeof Input$1>, "size"> & {
|
|
9
|
+
size?: "default" | "lg";
|
|
10
|
+
};
|
|
11
|
+
declare function Input({ className, size, ...props }: InputProps): import("react").JSX.Element;
|
|
12
|
+
export { Input, type InputProps, inputClasses };
|
|
@@ -9,35 +9,50 @@ import { Input as Input$1 } from "@ui-sdk/react/input";
|
|
|
9
9
|
* capsule. A control that grows to several lines adds `rounded-2xl`.
|
|
10
10
|
*/
|
|
11
11
|
const inputClasses = "h-9 w-full min-w-0 rounded-full border border-input bg-transparent px-3.5 py-1 text-base transition-colors file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder focus-field data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:bg-input/50 data-disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30";
|
|
12
|
+
/**
|
|
13
|
+
* `size="lg"`: the 44px of `Button`'s `lg`, so a field and its button line
|
|
14
|
+
* up, as in Alma's sign-in. Its text is Alma's 15/20, the size `heading-3`
|
|
15
|
+
* carries, at regular weight; under `md` it stays at 16px, which keeps a
|
|
16
|
+
* phone from zooming in.
|
|
17
|
+
*/
|
|
18
|
+
const inputLgClasses = "h-11 px-4.5 md:text-heading-3 md:font-normal";
|
|
12
19
|
function Input(t0) {
|
|
13
|
-
const $ = c(
|
|
20
|
+
const $ = c(11);
|
|
14
21
|
let className;
|
|
15
22
|
let props;
|
|
23
|
+
let t1;
|
|
16
24
|
if ($[0] !== t0) {
|
|
17
|
-
({className, ...props} = t0);
|
|
25
|
+
({className, size: t1, ...props} = t0);
|
|
18
26
|
$[0] = t0;
|
|
19
27
|
$[1] = className;
|
|
20
28
|
$[2] = props;
|
|
29
|
+
$[3] = t1;
|
|
21
30
|
} else {
|
|
22
31
|
className = $[1];
|
|
23
32
|
props = $[2];
|
|
33
|
+
t1 = $[3];
|
|
24
34
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
36
|
+
const t2 = size === "lg" && inputLgClasses;
|
|
37
|
+
let t3;
|
|
38
|
+
if ($[4] !== className || $[5] !== t2) {
|
|
39
|
+
t3 = cnState([inputClasses, t2], className);
|
|
40
|
+
$[4] = className;
|
|
41
|
+
$[5] = t2;
|
|
42
|
+
$[6] = t3;
|
|
43
|
+
} else t3 = $[6];
|
|
44
|
+
let t4;
|
|
45
|
+
if ($[7] !== props || $[8] !== size || $[9] !== t3) {
|
|
46
|
+
t4 = /* @__PURE__ */ jsx(Input$1, {
|
|
47
|
+
"data-size": size,
|
|
48
|
+
className: t3,
|
|
35
49
|
...props
|
|
36
50
|
});
|
|
37
|
-
$[
|
|
38
|
-
$[
|
|
39
|
-
$[
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
$[7] = props;
|
|
52
|
+
$[8] = size;
|
|
53
|
+
$[9] = t3;
|
|
54
|
+
$[10] = t4;
|
|
55
|
+
} else t4 = $[10];
|
|
56
|
+
return t4;
|
|
42
57
|
}
|
|
43
58
|
export { Input, inputClasses };
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import { VariantProps } from "../../utilities/cn/index.js";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
3
|
import { OTPInput as OTPInput$1, OTPInputGroup as OTPInputGroup$1, OTPInputSeparator as OTPInputSeparator$1, OTPInputSlot as OTPInputSlot$1, createOTPInputController } from "@ui-sdk/react/otp-input";
|
|
3
4
|
declare function OTPInput({ className, ...props }: ComponentProps<typeof OTPInput$1>): import("react").JSX.Element;
|
|
4
5
|
declare function OTPInputGroup({ className, ...props }: ComponentProps<typeof OTPInputGroup$1>): import("react").JSX.Element;
|
|
6
|
+
declare const otpInputSlotVariants: (props?: ({
|
|
7
|
+
size?: "default" | "lg" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
|
+
type OTPInputSlotProps = ComponentProps<typeof OTPInputSlot$1> & VariantProps<typeof otpInputSlotVariants>;
|
|
5
10
|
/**
|
|
6
11
|
* One cell, with the look of `Input`: a one-character field, so a circle. The one real input sits over all the
|
|
7
12
|
* cells and takes focus, so the active cell draws the focus ring and the
|
|
8
|
-
* caret itself.
|
|
13
|
+
* caret itself. `size="lg"` is the 48px cell of a screen that asks only for
|
|
14
|
+
* the code; the default stays at a field's 36px.
|
|
9
15
|
*/
|
|
10
|
-
declare function OTPInputSlot({ className, ...props }:
|
|
16
|
+
declare function OTPInputSlot({ className, size, ...props }: OTPInputSlotProps): import("react").JSX.Element;
|
|
11
17
|
declare function OTPInputSeparator({ className, ...props }: ComponentProps<typeof OTPInputSeparator$1>): import("react").JSX.Element;
|
|
12
18
|
export { OTPInput, OTPInputGroup, OTPInputSeparator, OTPInputSlot, createOTPInputController };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { cnState } from "../../utilities/cn/index.js";
|
|
2
|
+
import { cnState, cva } from "../../utilities/cn/index.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { OTPInput as OTPInput$1, OTPInputGroup as OTPInputGroup$1, OTPInputSeparator as OTPInputSeparator$1, OTPInputSlot as OTPInputSlot$1, createOTPInputController } from "@ui-sdk/react/otp-input";
|
|
@@ -19,7 +19,7 @@ function OTPInput(t0) {
|
|
|
19
19
|
}
|
|
20
20
|
let t1;
|
|
21
21
|
if ($[3] !== className) {
|
|
22
|
-
t1 = cnState("group/otp-input flex w-fit items-center gap-2 data-disabled:cursor-not-allowed data-disabled:opacity-50", className);
|
|
22
|
+
t1 = cnState("group/otp-input flex w-fit items-center gap-2 data-disabled:cursor-not-allowed data-disabled:opacity-50 has-data-[size=lg]:gap-3", className);
|
|
23
23
|
$[3] = className;
|
|
24
24
|
$[4] = t1;
|
|
25
25
|
} else t1 = $[4];
|
|
@@ -50,7 +50,7 @@ function OTPInputGroup(t0) {
|
|
|
50
50
|
}
|
|
51
51
|
let t1;
|
|
52
52
|
if ($[3] !== className) {
|
|
53
|
-
t1 = cnState("flex items-center gap-1.5", className);
|
|
53
|
+
t1 = cnState("flex items-center gap-1.5 has-data-[size=lg]:gap-2", className);
|
|
54
54
|
$[3] = className;
|
|
55
55
|
$[4] = t1;
|
|
56
56
|
} else t1 = $[4];
|
|
@@ -66,41 +66,56 @@ function OTPInputGroup(t0) {
|
|
|
66
66
|
} else t2 = $[7];
|
|
67
67
|
return t2;
|
|
68
68
|
}
|
|
69
|
+
const otpInputSlotVariants = cva("relative flex items-center justify-center rounded-full border border-input bg-transparent transition-colors focus-outline group-has-aria-invalid/otp-input:border-destructive group-has-aria-invalid/otp-input:ring-3 group-has-aria-invalid/otp-input:ring-destructive/20 after:pointer-events-none after:absolute after:hidden after:w-px after:bg-foreground data-active:focus-mark data-disabled:bg-input/50 data-fake-caret:after:block data-fake-caret:after:caret-blink dark:bg-input/30", {
|
|
70
|
+
variants: { size: {
|
|
71
|
+
default: "size-9 text-base after:h-4 md:text-sm",
|
|
72
|
+
lg: "size-12 text-xl leading-6 tabular-nums after:h-5"
|
|
73
|
+
} },
|
|
74
|
+
defaultVariants: { size: "default" }
|
|
75
|
+
});
|
|
69
76
|
/**
|
|
70
77
|
* One cell, with the look of `Input`: a one-character field, so a circle. The one real input sits over all the
|
|
71
78
|
* cells and takes focus, so the active cell draws the focus ring and the
|
|
72
|
-
* caret itself.
|
|
79
|
+
* caret itself. `size="lg"` is the 48px cell of a screen that asks only for
|
|
80
|
+
* the code; the default stays at a field's 36px.
|
|
73
81
|
*/
|
|
74
82
|
function OTPInputSlot(t0) {
|
|
75
|
-
const $ = c(
|
|
83
|
+
const $ = c(11);
|
|
76
84
|
let className;
|
|
77
85
|
let props;
|
|
86
|
+
let size;
|
|
78
87
|
if ($[0] !== t0) {
|
|
79
|
-
({className, ...props} = t0);
|
|
88
|
+
({className, size, ...props} = t0);
|
|
80
89
|
$[0] = t0;
|
|
81
90
|
$[1] = className;
|
|
82
91
|
$[2] = props;
|
|
92
|
+
$[3] = size;
|
|
83
93
|
} else {
|
|
84
94
|
className = $[1];
|
|
85
95
|
props = $[2];
|
|
96
|
+
size = $[3];
|
|
86
97
|
}
|
|
87
|
-
|
|
88
|
-
if ($[3] !== className) {
|
|
89
|
-
t1 = cnState("relative flex size-9 items-center justify-center rounded-full border border-input bg-transparent text-base transition-colors focus-outline group-has-aria-invalid/otp-input:border-destructive group-has-aria-invalid/otp-input:ring-3 group-has-aria-invalid/otp-input:ring-destructive/20 after:pointer-events-none after:absolute after:hidden after:h-4 after:w-px after:bg-foreground data-active:focus-mark data-disabled:bg-input/50 data-fake-caret:after:block data-fake-caret:after:caret-blink md:text-sm dark:bg-input/30", className);
|
|
90
|
-
$[3] = className;
|
|
91
|
-
$[4] = t1;
|
|
92
|
-
} else t1 = $[4];
|
|
98
|
+
const t1 = size ?? "default";
|
|
93
99
|
let t2;
|
|
94
|
-
if ($[
|
|
95
|
-
t2 =
|
|
96
|
-
|
|
100
|
+
if ($[4] !== className || $[5] !== size) {
|
|
101
|
+
t2 = cnState(otpInputSlotVariants({ size }), className);
|
|
102
|
+
$[4] = className;
|
|
103
|
+
$[5] = size;
|
|
104
|
+
$[6] = t2;
|
|
105
|
+
} else t2 = $[6];
|
|
106
|
+
let t3;
|
|
107
|
+
if ($[7] !== props || $[8] !== t1 || $[9] !== t2) {
|
|
108
|
+
t3 = /* @__PURE__ */ jsx(OTPInputSlot$1, {
|
|
109
|
+
"data-size": t1,
|
|
110
|
+
className: t2,
|
|
97
111
|
...props
|
|
98
112
|
});
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
|
|
103
|
-
|
|
113
|
+
$[7] = props;
|
|
114
|
+
$[8] = t1;
|
|
115
|
+
$[9] = t2;
|
|
116
|
+
$[10] = t3;
|
|
117
|
+
} else t3 = $[10];
|
|
118
|
+
return t3;
|
|
104
119
|
}
|
|
105
120
|
function OTPInputSeparator(t0) {
|
|
106
121
|
const $ = c(8);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
type TeamMarkProps = Omit<ComponentProps<"span">, "children" | "color"> & {
|
|
3
|
+
/** The team's name. The initials come from it when `initials` is missing. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Up to two letters drawn on the tile: "CN". */
|
|
6
|
+
initials?: string;
|
|
7
|
+
/** The team's color, any CSS color. Without one, the tile is Alma's neutral `track`. */
|
|
8
|
+
color?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A team's tile: its initials on Alma's 36px square with 10px corners. It has
|
|
12
|
+
* two looks, one per board in Paper:
|
|
13
|
+
*
|
|
14
|
+
* - With `color`, the rail's tile: the color at 22% over the surface and the
|
|
15
|
+
* letters the same color mixed toward the text's, at 12px. The surface is
|
|
16
|
+
* `--team-mark-surface`, the page's background by default: set it to
|
|
17
|
+
* `var(--sidebar)` on the sidebar's paper.
|
|
18
|
+
* - Without it, the tile of an invitation in Auth: Alma's neutral `track`
|
|
19
|
+
* with ink letters at 13px, for a team whose color the app doesn't know.
|
|
20
|
+
*
|
|
21
|
+
* It only repeats the name beside it (a row's title, a button's name), so it
|
|
22
|
+
* takes `aria-hidden`. Set the size with `className` (`size-full` to fill a
|
|
23
|
+
* button).
|
|
24
|
+
*/
|
|
25
|
+
declare function TeamMark({ name, initials, color, className, style, ...props }: TeamMarkProps): import("react").JSX.Element;
|
|
26
|
+
export { TeamMark, type TeamMarkProps };
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../utilities/cn/index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
// src/components/team-mark/team-mark.tsx
|
|
6
|
+
/** The first letter of the first and the last word: "Casa Norte" gives "CN". */
|
|
7
|
+
function initialsOf(name) {
|
|
8
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
9
|
+
return (words.length > 1 ? [words[0], words.at(-1)] : words).map((word) => word[0].toUpperCase()).join("");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A team's tile: its initials on Alma's 36px square with 10px corners. It has
|
|
13
|
+
* two looks, one per board in Paper:
|
|
14
|
+
*
|
|
15
|
+
* - With `color`, the rail's tile: the color at 22% over the surface and the
|
|
16
|
+
* letters the same color mixed toward the text's, at 12px. The surface is
|
|
17
|
+
* `--team-mark-surface`, the page's background by default: set it to
|
|
18
|
+
* `var(--sidebar)` on the sidebar's paper.
|
|
19
|
+
* - Without it, the tile of an invitation in Auth: Alma's neutral `track`
|
|
20
|
+
* with ink letters at 13px, for a team whose color the app doesn't know.
|
|
21
|
+
*
|
|
22
|
+
* It only repeats the name beside it (a row's title, a button's name), so it
|
|
23
|
+
* takes `aria-hidden`. Set the size with `className` (`size-full` to fill a
|
|
24
|
+
* button).
|
|
25
|
+
*/
|
|
26
|
+
function TeamMark(t0) {
|
|
27
|
+
const $ = c(22);
|
|
28
|
+
let className;
|
|
29
|
+
let color;
|
|
30
|
+
let initials;
|
|
31
|
+
let name;
|
|
32
|
+
let props;
|
|
33
|
+
let style;
|
|
34
|
+
if ($[0] !== t0) {
|
|
35
|
+
({name, initials, color, className, style, ...props} = t0);
|
|
36
|
+
$[0] = t0;
|
|
37
|
+
$[1] = className;
|
|
38
|
+
$[2] = color;
|
|
39
|
+
$[3] = initials;
|
|
40
|
+
$[4] = name;
|
|
41
|
+
$[5] = props;
|
|
42
|
+
$[6] = style;
|
|
43
|
+
} else {
|
|
44
|
+
className = $[1];
|
|
45
|
+
color = $[2];
|
|
46
|
+
initials = $[3];
|
|
47
|
+
name = $[4];
|
|
48
|
+
props = $[5];
|
|
49
|
+
style = $[6];
|
|
50
|
+
}
|
|
51
|
+
const t1 = color ? "team" : "neutral";
|
|
52
|
+
let t2;
|
|
53
|
+
if ($[7] !== className || $[8] !== color) {
|
|
54
|
+
t2 = cn("grid size-9 shrink-0 place-items-center rounded-lg font-semibold select-none", color ? [
|
|
55
|
+
"text-xs",
|
|
56
|
+
"bg-[color-mix(in_oklab,var(--team-color)_22%,var(--team-mark-surface,var(--background)))]",
|
|
57
|
+
"text-[color-mix(in_oklab,var(--team-color)_72%,var(--foreground))]",
|
|
58
|
+
"dark:text-[color-mix(in_oklab,var(--team-color)_64%,var(--foreground))]"
|
|
59
|
+
] : "bg-sidebar-accent text-sm leading-4 text-foreground", className);
|
|
60
|
+
$[7] = className;
|
|
61
|
+
$[8] = color;
|
|
62
|
+
$[9] = t2;
|
|
63
|
+
} else t2 = $[9];
|
|
64
|
+
let t3;
|
|
65
|
+
if ($[10] !== color || $[11] !== style) {
|
|
66
|
+
t3 = color ? {
|
|
67
|
+
"--team-color": color,
|
|
68
|
+
...style
|
|
69
|
+
} : style;
|
|
70
|
+
$[10] = color;
|
|
71
|
+
$[11] = style;
|
|
72
|
+
$[12] = t3;
|
|
73
|
+
} else t3 = $[12];
|
|
74
|
+
let t4;
|
|
75
|
+
if ($[13] !== initials || $[14] !== name) {
|
|
76
|
+
t4 = initials ?? initialsOf(name);
|
|
77
|
+
$[13] = initials;
|
|
78
|
+
$[14] = name;
|
|
79
|
+
$[15] = t4;
|
|
80
|
+
} else t4 = $[15];
|
|
81
|
+
let t5;
|
|
82
|
+
if ($[16] !== props || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4) {
|
|
83
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
84
|
+
"aria-hidden": "true",
|
|
85
|
+
"data-slot": "team-mark",
|
|
86
|
+
"data-color": t1,
|
|
87
|
+
className: t2,
|
|
88
|
+
style: t3,
|
|
89
|
+
...props,
|
|
90
|
+
children: t4
|
|
91
|
+
});
|
|
92
|
+
$[16] = props;
|
|
93
|
+
$[17] = t1;
|
|
94
|
+
$[18] = t2;
|
|
95
|
+
$[19] = t3;
|
|
96
|
+
$[20] = t4;
|
|
97
|
+
$[21] = t5;
|
|
98
|
+
} else t5 = $[21];
|
|
99
|
+
return t5;
|
|
100
|
+
}
|
|
101
|
+
export { TeamMark };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asanchez-sa/abby",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Sistema de diseño para React sobre ui-sdk y Tailwind CSS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
"./table": "./dist/components/table/table.js",
|
|
144
144
|
"./tabs": "./dist/components/tabs/tabs.js",
|
|
145
145
|
"./task": "./dist/components/task/task.js",
|
|
146
|
+
"./team-mark": "./dist/components/team-mark/team-mark.js",
|
|
146
147
|
"./terminal": "./dist/components/terminal/terminal.js",
|
|
147
148
|
"./test-results": "./dist/components/test-results/test-results.js",
|
|
148
149
|
"./textarea": "./dist/components/textarea/textarea.js",
|
package/skills/blocks/SKILL.md
CHANGED
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
accessible and usable by agents.
|
|
12
12
|
type: core
|
|
13
13
|
library: abby
|
|
14
|
-
library_version: 0.
|
|
14
|
+
library_version: 0.2.0
|
|
15
15
|
requires:
|
|
16
16
|
- setup
|
|
17
17
|
sources:
|
|
@@ -102,6 +102,44 @@ import { Button } from "abby/button";
|
|
|
102
102
|
export const Small = () => <Button size="xs">Undo archive</Button>;
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
+
A screen that asks for one thing (a sign-in, a code) uses the touch size. An `Input` with `size="lg"` measures what a `Button` with `size="lg"` does, so a field and its button stack as one column. An `OTPInputSlot` with `size="lg"` is a 48px cell with the digit at 20px, and the groups and the separator space out with it. The default size of either doesn't change.
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
import { Button } from "abby/button";
|
|
109
|
+
import { Field, FieldLabel } from "abby/field";
|
|
110
|
+
import { Input } from "abby/input";
|
|
111
|
+
import { OTPInput, OTPInputGroup, OTPInputSlot } from "abby/otp-input";
|
|
112
|
+
|
|
113
|
+
export function SignIn() {
|
|
114
|
+
return (
|
|
115
|
+
<form className="flex w-90 flex-col gap-3">
|
|
116
|
+
<Field>
|
|
117
|
+
<FieldLabel>Email</FieldLabel>
|
|
118
|
+
<Input size="lg" type="email" />
|
|
119
|
+
</Field>
|
|
120
|
+
<Button size="lg" type="submit">
|
|
121
|
+
Send code
|
|
122
|
+
</Button>
|
|
123
|
+
</form>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function Code() {
|
|
128
|
+
return (
|
|
129
|
+
<Field>
|
|
130
|
+
<FieldLabel>Code</FieldLabel>
|
|
131
|
+
<OTPInput maxLength={6}>
|
|
132
|
+
<OTPInputGroup>
|
|
133
|
+
{[0, 1, 2, 3, 4, 5].map((index) => (
|
|
134
|
+
<OTPInputSlot key={index} index={index} size="lg" />
|
|
135
|
+
))}
|
|
136
|
+
</OTPInputGroup>
|
|
137
|
+
</OTPInput>
|
|
138
|
+
</Field>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
105
143
|
### Draw icons with `Icon`
|
|
106
144
|
|
|
107
145
|
Icons come from `@hugeicons/core-free-icons` through `Icon`, which sets abby's size and stroke and hides the icon from screen readers. Pass `label` only when the icon says something no text around it says.
|
|
@@ -305,6 +343,7 @@ export function Shell() {
|
|
|
305
343
|
}
|
|
306
344
|
```
|
|
307
345
|
|
|
346
|
+
- A team's tile (its initials on its color, 36px with 10px corners) is `TeamMark` from `abby/team-mark`: `<TeamMark name="Casa Norte" color="#8b6a3e" />`. Without `color` it's Alma's neutral tile with ink letters, for a team whose color the app doesn't know, such as an invitation. It repeats the name beside it, so it's hidden from screen readers and agents. On the sidebar's paper set `--team-mark-surface` to `var(--sidebar)`, and inside a rail's button add `className="size-full"`.
|
|
308
347
|
- A rail's button is `size="icon"`: a 36px circle whose name shows only in its tooltip. Its badge is `variant="dot"`: a dot while the column is open, the count once collapsed. Put what the badge says in the button's `aria-describedby`.
|
|
309
348
|
- A two-line row (a name and a line under it) is `size="lg"`, 48px. A row that's a link takes `render={<a href="…" />}`: the button turns it into a link an agent follows, so don't pass `LinkPart` there.
|
|
310
349
|
- `SidebarInsetHeader` is the page's top bar, lined up with the window's controls; while the sidebar is collapsed, put a `SidebarTrigger` first in it.
|
|
@@ -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.2.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
package/skills/theming/SKILL.md
CHANGED
|
@@ -20,13 +20,27 @@ export function tint(color: string, surface = "var(--background)"): CSSPropertie
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The assistant's logo: an ink tile with its violet core and white dots. It
|
|
25
|
+
* is a logo, so its colors are fixed and don't turn over in dark, as Alma's
|
|
26
|
+
* "Dark ink" asks: the tile stays #1D1D1F, and in dark a 1px white line at
|
|
27
|
+
* 14% sets it apart from the dark paper. The line is 1px at every size
|
|
28
|
+
* (`non-scaling-stroke`), and half of it, inside the edge, shows.
|
|
29
|
+
*/
|
|
24
30
|
export function AssistantMark({ className }: { className?: string }) {
|
|
25
31
|
return (
|
|
26
32
|
<svg viewBox="0 0 24 24" aria-hidden="true" className={className}>
|
|
27
|
-
<rect
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
<rect
|
|
34
|
+
width="24"
|
|
35
|
+
height="24"
|
|
36
|
+
rx="7"
|
|
37
|
+
fill="#1d1d1f"
|
|
38
|
+
strokeWidth="1"
|
|
39
|
+
vectorEffect="non-scaling-stroke"
|
|
40
|
+
className="stroke-transparent dark:stroke-[#ffffff24]"
|
|
41
|
+
/>
|
|
42
|
+
<circle cx="12" cy="12" r="2.6" fill="#8e5be0" />
|
|
43
|
+
<g fill="#ffffff">
|
|
30
44
|
<circle cx="16.2" cy="10.4" r="1" />
|
|
31
45
|
<circle cx="9.4" cy="15.8" r="1" />
|
|
32
46
|
<circle cx="8.6" cy="8.9" r="0.9" opacity="0.8" />
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
SidebarMenuButton,
|
|
20
20
|
SidebarMenuItem,
|
|
21
21
|
} from "abby/sidebar";
|
|
22
|
+
import { TeamMark } from "abby/team-mark";
|
|
22
23
|
import type { ShellWorkspace } from "../data.ts";
|
|
23
24
|
import type { ShellTexts } from "../texts.ts";
|
|
24
25
|
import { initialsOf, tint } from "./marks.tsx";
|
|
@@ -122,13 +123,12 @@ export function Rail({ workspace, texts, page, href }: RailProps) {
|
|
|
122
123
|
render={<a href={href("home")} />}
|
|
123
124
|
data-team=""
|
|
124
125
|
>
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
</span>
|
|
126
|
+
<TeamMark
|
|
127
|
+
name={team.name}
|
|
128
|
+
initials={team.initials}
|
|
129
|
+
color={team.color}
|
|
130
|
+
className="size-full [--team-mark-surface:var(--sidebar)]"
|
|
131
|
+
/>
|
|
132
132
|
<span>{team.name}</span>
|
|
133
133
|
</SidebarMenuButton>
|
|
134
134
|
</SidebarMenuItem>
|