@a4ui/core 0.8.1 → 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.
@@ -0,0 +1,29 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface DateRange {
3
+ /** 'YYYY-MM-DD' (local) or '' if unset. */
4
+ start: string;
5
+ end: string;
6
+ }
7
+ export interface DateRangePickerProps {
8
+ value: DateRange;
9
+ onChange: (value: DateRange) => void;
10
+ /** Placeholder shown when nothing is selected. */
11
+ label?: string;
12
+ disabled?: boolean;
13
+ months?: string[];
14
+ weekdays?: string[];
15
+ class?: string;
16
+ }
17
+ /**
18
+ * Compact hand-rolled range picker built on the same popover mechanism as
19
+ * `DateField`, but tracking a start/end pair instead of a single day. The
20
+ * first click begins a range, the second completes it (closing the popover);
21
+ * clicking again once complete starts a fresh range.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * const [range, setRange] = createSignal<DateRange>({ start: '2026-03-15', end: '' })
26
+ * <DateRangePicker value={range()} onChange={setRange} label="Stay dates" />
27
+ * ```
28
+ */
29
+ export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface FormFieldProps {
3
+ /** Optional explicit id; otherwise auto-generated. */
4
+ id?: string;
5
+ children: JSX.Element;
6
+ class?: string;
7
+ }
8
+ /**
9
+ * Container/provider that gives `FormLabel`, `FormControl`,
10
+ * `FormDescription`, and `FormError` a shared field id so they wire up
11
+ * `for`/`id`/`aria-describedby` automatically.
12
+ *
13
+ * Pairs well with a schema validator (Valibot/Zod): the consumer computes
14
+ * the error string and passes it to `FormError`.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * <FormField>
19
+ * <FormLabel>Email</FormLabel>
20
+ * <FormControl>
21
+ * {(fieldProps) => <input type="email" {...fieldProps} />}
22
+ * </FormControl>
23
+ * <FormDescription>We'll never share your email.</FormDescription>
24
+ * <FormError>{errors().email}</FormError>
25
+ * </FormField>
26
+ * ```
27
+ */
28
+ export declare function FormField(props: FormFieldProps): JSX.Element;
29
+ /** Label associated with the enclosing `FormField`'s control via `for`. */
30
+ export declare function FormLabel(props: {
31
+ children: JSX.Element;
32
+ class?: string;
33
+ }): JSX.Element;
34
+ /**
35
+ * Render-prop bridge that hands the enclosing `FormField`'s `id` and
36
+ * `aria-describedby` to the caller's control, to be spread onto the actual
37
+ * input/select/textarea element.
38
+ */
39
+ export declare function FormControl(props: {
40
+ children: (fieldProps: {
41
+ id: string;
42
+ 'aria-describedby': string;
43
+ }) => JSX.Element;
44
+ }): JSX.Element;
45
+ /** Helper text for the enclosing `FormField`, linked via `aria-describedby`. */
46
+ export declare function FormDescription(props: {
47
+ children: JSX.Element;
48
+ class?: string;
49
+ }): JSX.Element;
50
+ /**
51
+ * Error text for the enclosing `FormField`, linked via `aria-describedby`.
52
+ * Renders nothing when there is no error to show.
53
+ */
54
+ export declare function FormError(props: {
55
+ children?: JSX.Element;
56
+ class?: string;
57
+ }): JSX.Element;
@@ -2,6 +2,10 @@ import { JSX } from 'solid-js';
2
2
  export interface CalendarCoreProps {
3
3
  /** Currently selected day (for highlight); undefined = none. */
4
4
  selected?: Date;
5
+ /** Range start — endpoints fill, days strictly between get a soft band. */
6
+ rangeStart?: Date;
7
+ /** Range end (see `rangeStart`). */
8
+ rangeEnd?: Date;
5
9
  /** Called with the newly picked day. */
6
10
  onPick: (date: Date) => void;
7
11
  /** 0 = Sunday-first, 1 = Monday-first. @default 0 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a4ui/core",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "A4ui — Spatial Glass design system & component library for SolidJS (Kobalte behavior + Tailwind glass tokens + motion).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -40,6 +40,11 @@
40
40
  "import": "./dist/index.js",
41
41
  "default": "./dist/index.js"
42
42
  },
43
+ "./commerce": {
44
+ "types": "./dist/commerce/index.d.ts",
45
+ "import": "./dist/commerce.js",
46
+ "default": "./dist/commerce.js"
47
+ },
43
48
  "./preset": {
44
49
  "import": "./preset.js",
45
50
  "default": "./preset.js"