@asanchez-sa/abby 0.2.0 → 0.4.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/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +2 -1
- package/dist/components/alert-dialog/alert-dialog.d.ts +10 -1
- package/dist/components/alert-dialog/alert-dialog.js +80 -3
- package/dist/components/badge/badge.d.ts +3 -2
- package/dist/components/badge/badge.js +27 -11
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +3 -2
- package/dist/components/calendar/calendar.d.ts +26 -5
- package/dist/components/calendar/calendar.js +387 -72
- package/dist/components/chart/chart.d.ts +76 -0
- package/dist/components/chart/chart.js +565 -0
- package/dist/components/chart/parts/axes.js +126 -0
- package/dist/components/chart/parts/frame.d.ts +31 -0
- package/dist/components/chart/parts/frame.js +278 -0
- package/dist/components/chart/parts/legend.d.ts +16 -0
- package/dist/components/chart/parts/legend.js +82 -0
- package/dist/components/chart/parts/points.d.ts +1 -0
- package/dist/components/chart/parts/points.js +139 -0
- package/dist/components/chart/parts/scale.js +139 -0
- package/dist/components/chart/parts/table.js +105 -0
- package/dist/components/chart/parts/types.d.ts +44 -0
- package/dist/components/chart/parts/types.js +8 -0
- package/dist/components/dialog/dialog.d.ts +9 -1
- package/dist/components/dialog/dialog.js +82 -3
- package/dist/components/field/field.d.ts +5 -1
- package/dist/components/field/field.js +25 -21
- package/dist/components/filter-chip/filter-chip.d.ts +36 -0
- package/dist/components/filter-chip/filter-chip.js +97 -0
- package/dist/components/graph/graph.d.ts +151 -0
- package/dist/components/graph/graph.js +959 -0
- package/dist/components/input/input.d.ts +8 -1
- package/dist/components/input/input.js +2 -2
- package/dist/components/meter/meter.d.ts +52 -3
- package/dist/components/meter/meter.js +535 -33
- package/dist/components/model-selector/model-selector.d.ts +38 -3
- package/dist/components/model-selector/model-selector.js +331 -73
- package/dist/components/note-editor/parts/suggestions.js +2 -2
- package/dist/components/number-input/number-input.d.ts +14 -3
- package/dist/components/number-input/number-input.js +193 -34
- package/dist/components/otp-input/otp-input.d.ts +6 -2
- package/dist/components/otp-input/otp-input.js +40 -20
- package/dist/components/sheet/sheet.js +1 -1
- package/dist/components/spinner/spinner.d.ts +7 -1
- package/dist/components/spinner/spinner.js +86 -26
- package/dist/components/switch/switch.d.ts +9 -2
- package/dist/components/switch/switch.js +23 -17
- package/dist/components/toast/toast.d.ts +19 -2
- package/dist/components/toast/toast.js +211 -49
- package/dist/components/toggle/toggle.d.ts +18 -4
- package/dist/components/toggle/toggle.js +167 -32
- package/dist/components/week-strip/week-strip.d.ts +27 -5
- package/dist/components/week-strip/week-strip.js +288 -134
- package/package.json +4 -1
- package/skills/agent-ready-ui/SKILL.md +1 -1
- package/skills/blocks/SKILL.md +1 -1
- package/skills/compose-screens/SKILL.md +97 -10
- package/skills/compose-screens/references/calendar-week.md +77 -0
- package/skills/compose-screens/references/charts-and-maps.md +183 -0
- package/skills/compose-screens/references/filter-chips.md +61 -0
- package/skills/compose-screens/references/number-units.md +52 -0
- 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
|
@@ -4,7 +4,7 @@ import { ButtonLook } from "../button/button.js";
|
|
|
4
4
|
import { DateMatchers } from "../calendar/calendar.js";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
/** The colors a mark can take. A mark never says something by color alone: its label does. */
|
|
7
|
-
type WeekStripTone = "primary" | "muted" | "destructive" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5";
|
|
7
|
+
type WeekStripTone = "primary" | "muted" | "destructive" | "warning" | "success" | "chart-1" | "chart-2" | "chart-3" | "chart-4" | "chart-5";
|
|
8
8
|
/** What's on a day. Screen readers and agents hear `label` and `description` after the date. */
|
|
9
9
|
type WeekStripMark = {
|
|
10
10
|
/** Up to three dots under the day number. */
|
|
@@ -13,6 +13,14 @@ type WeekStripMark = {
|
|
|
13
13
|
label?: string;
|
|
14
14
|
/** A dot in the corner, for a day that needs attention. `true` is `"destructive"`. */
|
|
15
15
|
corner?: boolean | WeekStripTone;
|
|
16
|
+
/**
|
|
17
|
+
* A bar as tall as this value against the largest of the days shown, up to
|
|
18
|
+
* 44px. Zero draws none. The `label`, and the dots or the check, sit under it
|
|
19
|
+
* instead of replacing each other. Without a `label`, the value is the day's name.
|
|
20
|
+
*/
|
|
21
|
+
bar?: number;
|
|
22
|
+
/** A check in place of the dots, for a day that is closed. `true` is `"success"`. */
|
|
23
|
+
check?: boolean | WeekStripTone;
|
|
16
24
|
/** What the dots or the corner mean, read after the date and the label. */
|
|
17
25
|
description?: string;
|
|
18
26
|
};
|
|
@@ -71,6 +79,8 @@ type WeekStripOptions = {
|
|
|
71
79
|
marks?: (date: string) => WeekStripMark | undefined;
|
|
72
80
|
/** Whether nothing can be picked or focused. */
|
|
73
81
|
disabled?: boolean;
|
|
82
|
+
/** Whether no day is selected or can be: the days stay focusable and are read with their marks. */
|
|
83
|
+
readOnly?: boolean;
|
|
74
84
|
/** Drives the strip from anywhere. Create one with `createWeekStripController()`. */
|
|
75
85
|
controller?: WeekStripController;
|
|
76
86
|
};
|
|
@@ -79,6 +89,7 @@ type WeekStripRootState = {
|
|
|
79
89
|
days: string[];
|
|
80
90
|
scroll: boolean;
|
|
81
91
|
disabled: boolean;
|
|
92
|
+
readOnly: boolean;
|
|
82
93
|
};
|
|
83
94
|
type WeekStripHeadingState = {
|
|
84
95
|
/** The month or months shown, like "November 2026". */
|
|
@@ -92,6 +103,7 @@ type WeekStripDaysState = {
|
|
|
92
103
|
/** The days shown, as ISO dates. */
|
|
93
104
|
days: string[];
|
|
94
105
|
scroll: boolean;
|
|
106
|
+
readOnly: boolean;
|
|
95
107
|
};
|
|
96
108
|
type WeekStripDayState = {
|
|
97
109
|
date: string;
|
|
@@ -109,8 +121,17 @@ type WeekStripDayState = {
|
|
|
109
121
|
disabled: boolean;
|
|
110
122
|
faded: boolean;
|
|
111
123
|
scroll: boolean;
|
|
124
|
+
readOnly: boolean;
|
|
112
125
|
marks: WeekStripMark | undefined;
|
|
126
|
+
/** The largest `bar` among the days shown, which the tallest bar is measured against. */
|
|
127
|
+
barMax: number;
|
|
113
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
* A bar's height in px: its share of the largest value, up to 44. The largest
|
|
131
|
+
* one is 44 and a value of zero is 0; any other value keeps at least 2px so it
|
|
132
|
+
* can be seen.
|
|
133
|
+
*/
|
|
134
|
+
declare function weekStripBarHeight(value: number | undefined, max: number): number;
|
|
114
135
|
/** Drives a week strip from anywhere: pass it as `controller`. */
|
|
115
136
|
declare function createWeekStripController(): WeekStripController;
|
|
116
137
|
/**
|
|
@@ -142,7 +163,7 @@ type WeekStripProps = WeekStripOptions & Omit<PartProps<"div", WeekStripRootStat
|
|
|
142
163
|
size?: WeekStripSize;
|
|
143
164
|
};
|
|
144
165
|
/** Without children it renders Previous, the heading, Next and the days; in scroll mode, only the days. */
|
|
145
|
-
declare function WeekStrip({ value, defaultValue, onValueChange, week, defaultWeek, onWeekChange, scroll, start, length, weekStartsOn, locale, timeZone, today, unavailable, faded, marks, disabled, controller, label, size, className, children, ...props }: WeekStripProps): import("react").JSX.Element | null;
|
|
166
|
+
declare function WeekStrip({ value, defaultValue, onValueChange, week, defaultWeek, onWeekChange, scroll, start, length, weekStartsOn, locale, timeZone, today, unavailable, faded, marks, disabled, readOnly, controller, label, size, className, children, ...props }: WeekStripProps): import("react").JSX.Element | null;
|
|
146
167
|
/** The month or months shown, like "November 2026". Children replace the text. */
|
|
147
168
|
declare function WeekStripHeading({ className, children, ...props }: PartProps<"h2", WeekStripHeadingState>): import("react").JSX.Element | null;
|
|
148
169
|
type WeekStripStepProps = PartProps<"button", WeekStripStepState> & ButtonLook & {
|
|
@@ -169,9 +190,10 @@ type WeekStripMarksProps = {
|
|
|
169
190
|
className?: string;
|
|
170
191
|
};
|
|
171
192
|
/**
|
|
172
|
-
* A day's marks: its label, else up to three dots, and its corner
|
|
173
|
-
*
|
|
193
|
+
* A day's marks: its label, else up to three dots or a check, and its corner
|
|
194
|
+
* dot. With a `bar` the label and the dots or the check sit side by side under
|
|
195
|
+
* it. It keeps its height without marks, so every day lines up. Decorative: the
|
|
174
196
|
* day's name carries what they mean.
|
|
175
197
|
*/
|
|
176
198
|
declare function WeekStripMarks({ marks, className }: WeekStripMarksProps): import("react").JSX.Element;
|
|
177
|
-
export { WeekStrip, type WeekStripController, WeekStripDay, type WeekStripDayProps, type WeekStripDayState, WeekStripDays, type WeekStripDaysState, WeekStripHeading, type WeekStripHeadingState, type WeekStripMark, WeekStripMarks, type WeekStripMarksProps, WeekStripNext, type WeekStripOptions, WeekStripPrevious, type WeekStripProps, type WeekStripRootState, type WeekStripSize, type WeekStripStepProps, type WeekStripStepState, type WeekStripTone, type WeekStripValueChangeReason, type WeekStripWeekChangeReason, createWeekStripController, useWeekStrip, weekStripLayout, weekStripParts };
|
|
199
|
+
export { WeekStrip, type WeekStripController, WeekStripDay, type WeekStripDayProps, type WeekStripDayState, WeekStripDays, type WeekStripDaysState, WeekStripHeading, type WeekStripHeadingState, type WeekStripMark, WeekStripMarks, type WeekStripMarksProps, WeekStripNext, type WeekStripOptions, WeekStripPrevious, type WeekStripProps, type WeekStripRootState, type WeekStripSize, type WeekStripStepProps, type WeekStripStepState, type WeekStripTone, type WeekStripValueChangeReason, type WeekStripWeekChangeReason, createWeekStripController, useWeekStrip, weekStripBarHeight, weekStripLayout, weekStripParts };
|