@alfadocs/ui-kit 0.33.11 → 0.35.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "packageVersion": "0.33.11",
3
+ "packageVersion": "0.35.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -0,0 +1,3 @@
1
+ export { ProductLockup } from './product-lockup';
2
+ export type { ProductLockupProps } from './product-lockup';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,54 @@
1
+ import { type ComponentPropsWithoutRef } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const productName: (props?: ({
4
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ tone?: "gradient" | "solid" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type LockupSize = NonNullable<VariantProps<typeof productName>['size']>;
8
+ export type ProductLockupProps = {
9
+ /**
10
+ * The product name paired with the Alfadocs wordmark — e.g. `"Builders"`
11
+ * renders as "Alfadocs Builders". Passed verbatim (product names are not
12
+ * translated); the lockup's accessible name becomes `Alfadocs <name>`.
13
+ */
14
+ name: string;
15
+ /**
16
+ * Render the name as a solid `--foreground` ink, upright (no gradient, no
17
+ * italic), and pair it with the monochrome wordmark. Use for print,
18
+ * single-colour reproductions, or any constrained context where the
19
+ * gradient/serif treatment is inappropriate.
20
+ */
21
+ monochrome?: boolean;
22
+ /** Lockup size. Drives both the wordmark and the name's cap height. */
23
+ size?: LockupSize;
24
+ className?: string;
25
+ } & Omit<ComponentPropsWithoutRef<'span'>, 'role' | 'aria-label' | 'aria-hidden' | 'children' | 'className'>;
26
+ /**
27
+ * The standard lockup pairing the Alfadocs wordmark with a product name
28
+ * ("Alfadocs Builders", "Alfadocs MyApp"). Every marketplace app should use
29
+ * this rather than hand-rolling a wordmark + typed span.
30
+ *
31
+ * The whole lockup is exposed to assistive tech as a single `img` named
32
+ * `Alfadocs <name>`; the inner wordmark and the visible name are both
33
+ * decorative so the brand isn't announced twice.
34
+ */
35
+ export declare const ProductLockup: import("react").ForwardRefExoticComponent<{
36
+ /**
37
+ * The product name paired with the Alfadocs wordmark — e.g. `"Builders"`
38
+ * renders as "Alfadocs Builders". Passed verbatim (product names are not
39
+ * translated); the lockup's accessible name becomes `Alfadocs <name>`.
40
+ */
41
+ name: string;
42
+ /**
43
+ * Render the name as a solid `--foreground` ink, upright (no gradient, no
44
+ * italic), and pair it with the monochrome wordmark. Use for print,
45
+ * single-colour reproductions, or any constrained context where the
46
+ * gradient/serif treatment is inappropriate.
47
+ */
48
+ monochrome?: boolean;
49
+ /** Lockup size. Drives both the wordmark and the name's cap height. */
50
+ size?: LockupSize;
51
+ className?: string;
52
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "aria-hidden" | "className" | "role" | "children" | "aria-label"> & import("react").RefAttributes<HTMLSpanElement>>;
53
+ export {};
54
+ //# sourceMappingURL=product-lockup.d.ts.map
@@ -62,9 +62,30 @@ export interface BookingDetails {
62
62
  export interface BookingValue {
63
63
  insuranceType?: InsuranceType;
64
64
  specialtyId?: string;
65
+ /**
66
+ * Multi-select form of `specialtyId` — set this instead of (or alongside)
67
+ * `specialtyId` when `specialtyPickerStyle='multi-select'`. The cascade
68
+ * reads this array first and treats services / operators / slots as a
69
+ * union of the selected specialties. When both are set, the array wins.
70
+ * Added in 0.34.0.
71
+ */
72
+ specialtyIds?: string[];
65
73
  serviceId?: string;
74
+ /**
75
+ * Multi-select form of `serviceId` — see `specialtyIds`. Set when
76
+ * `servicePickerStyle='multi-select'`. Union semantics. Added in 0.34.0.
77
+ */
78
+ serviceIds?: string[];
66
79
  /** May be the literal `'all'` sentinel to mean "no operator preference". */
67
80
  operatorId?: string;
81
+ /**
82
+ * Multi-select form of `operatorId` — see `specialtyIds`. Set when
83
+ * `operatorPickerStyle='multi-select'`. The kit doesn't filter slots by
84
+ * operator itself (the consumer owns slot resolution), but consumers
85
+ * using multi-select operator typically filter `availableSlots` to the
86
+ * union of `operatorIds` before passing the data in. Added in 0.34.0.
87
+ */
88
+ operatorIds?: string[];
68
89
  /** YYYY-MM-DD. */
69
90
  date?: string;
70
91
  /** Opaque key from `availableSlots[date]`. */
@@ -194,6 +215,49 @@ export interface BookingProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ari
194
215
  * this signal.
195
216
  */
196
217
  onWindowChange?: (startIso: string, endIso: string) => void;
218
+ /**
219
+ * @default 'select'
220
+ * UI rendered for the Specialty step. Independent of layout `variant`.
221
+ *
222
+ * - `'select'` (default): the kit's `<Select>` dropdown — current behaviour.
223
+ * - `'combobox'`: single-select `<Combobox>` with type-ahead search.
224
+ * Pays off for long specialty lists (>10 entries).
225
+ * - `'multi-select'`: multi-select `<MultiSelect>` with chip-rendered
226
+ * selections. Writes to `value.specialtyIds` (array). The cascade reads
227
+ * the array as a union — services / operators / slots are filtered
228
+ * by ANY of the selected specialties. Added in 0.34.0.
229
+ */
230
+ specialtyPickerStyle?: 'select' | 'combobox' | 'multi-select';
231
+ /**
232
+ * @default 'cards' for `variant='inline-list'`, `'select'` for others
233
+ * UI rendered for the Service step. Independent of layout `variant`.
234
+ *
235
+ * - `'cards'`: visual card grid (the long-standing `ServiceCardGroup`
236
+ * used by inline-list). Card layout, one row per service with icon,
237
+ * label, and duration.
238
+ * - `'select'`: compact `<Select>` dropdown (default for the chrome-
239
+ * denser variants — calendar / flexible / accordion / progress).
240
+ * - `'combobox'`: single-select `<Combobox>` with type-ahead search.
241
+ * - `'multi-select'`: multi-select `<MultiSelect>` writing to
242
+ * `value.serviceIds`. Cascade reads as union — operators / slots are
243
+ * filtered by ANY of the selected services. Added in 0.34.0.
244
+ */
245
+ servicePickerStyle?: 'select' | 'combobox' | 'multi-select' | 'cards';
246
+ /**
247
+ * @default 'select'
248
+ * UI rendered for the Operator step. Independent of layout `variant`.
249
+ *
250
+ * - `'select'` (default): `<Select>` dropdown including the implicit
251
+ * `'all'` "any operator" sentinel.
252
+ * - `'combobox'`: single-select `<Combobox>` with type-ahead search.
253
+ * - `'multi-select'`: multi-select `<MultiSelect>` writing to
254
+ * `value.operatorIds`. The kit doesn't filter slots by operator
255
+ * itself — the consumer owns slot resolution — but consumers using
256
+ * multi-select operator typically filter `availableSlots` to the
257
+ * union of selected operators before passing the data in. Added
258
+ * in 0.34.0.
259
+ */
260
+ operatorPickerStyle?: 'select' | 'combobox' | 'multi-select';
197
261
  /**
198
262
  * @default 'month-calendar'
199
263
  * Selects the date + slot picker rendered inside the cascade's date
@@ -66,8 +66,24 @@ export interface CascadeOutputs {
66
66
  export declare function deriveCascade(inputs: CascadeInputs): CascadeOutputs;
67
67
  export declare function resetOnInsuranceChange(value: BookingValue, next: InsuranceType | undefined): BookingValue;
68
68
  export declare function resetOnSpecialtyChange(value: BookingValue, next: string | undefined): BookingValue;
69
+ /**
70
+ * Multi-select counterpart to `resetOnSpecialtyChange`. Writes the
71
+ * `specialtyIds` array form and clears any single-form `specialtyId`
72
+ * so the cascade reads the array. Added in 0.34.0.
73
+ */
74
+ export declare function resetOnSpecialtyIdsChange(value: BookingValue, next: string[] | undefined): BookingValue;
69
75
  export declare function resetOnServiceChange(value: BookingValue, next: string | undefined): BookingValue;
76
+ /** Multi-select counterpart to `resetOnServiceChange`. Added in 0.34.0. */
77
+ export declare function resetOnServiceIdsChange(value: BookingValue, next: string[] | undefined): BookingValue;
70
78
  export declare function resetOnOperatorChange(value: BookingValue, next: string | undefined): BookingValue;
79
+ /** Multi-select counterpart to `resetOnOperatorChange`. Added in 0.34.0. */
80
+ export declare function resetOnOperatorIdsChange(value: BookingValue, next: string[] | undefined): BookingValue;
81
+ /** Returns the effective specialty selection as an array. Empty when nothing picked. */
82
+ export declare function resolveSpecialtyIds(value: BookingValue): string[];
83
+ /** Returns the effective service selection as an array. Empty when nothing picked. */
84
+ export declare function resolveServiceIds(value: BookingValue): string[];
85
+ /** Returns the effective operator selection as an array. Empty when nothing picked. */
86
+ export declare function resolveOperatorIds(value: BookingValue): string[];
71
87
  export declare function resetOnDateChange(value: BookingValue, next: string | undefined): BookingValue;
72
88
  export declare function resetOnSlotChange(value: BookingValue, next: string | undefined): BookingValue;
73
89
  export declare function applyAutoSelects(value: BookingValue, inputs: CascadePolicy & {
@@ -1,4 +1,4 @@
1
- import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-Db4BQ9eH.js";
1
+ import { B as A, C as R, O as a, b as s } from "../../_chunks/booking-eM0y0NIR.js";
2
2
  export {
3
3
  A as Booking,
4
4
  R as CONFIRMATION_CHANNEL_ORDER,
@@ -51,6 +51,7 @@ export * from './kbd';
51
51
  export * from './key-value-pair';
52
52
  export * from './list';
53
53
  export * from './logo';
54
+ export * from '../brand/product-lockup';
54
55
  export * from './map-view';
55
56
  export * from './rating';
56
57
  export * from './skeleton';