@alfadocs/ui-kit 0.33.10 → 0.34.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.10",
3
+ "packageVersion": "0.34.0",
4
4
  "components": [
5
5
  {
6
6
  "kind": "component",
@@ -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]`. */
@@ -179,6 +200,64 @@ export interface BookingProps extends Omit<ComponentPropsWithoutRef<'div'>, 'ari
179
200
  * reflect the new ISO when this fires.
180
201
  */
181
202
  onDateSelect?: (iso: string) => void;
203
+ /**
204
+ * Fires when the visible 4-day window starts or shifts. Used by
205
+ * two-query consumers to lazy-fetch `dailySlots/{date}` for the
206
+ * newly-visible days. Receives the inclusive ISO date strings of
207
+ * the first and last visible day in the window. Fires on mount
208
+ * (with the resolved initial window) and on every prev/next
209
+ * arrow click, internal jump-to-next-available action, and
210
+ * automatic re-sync triggered by `availableDates` arriving.
211
+ *
212
+ * Only fires when `datePickerStyle='four-day-grid'` — the
213
+ * month-calendar picker has no "window" concept; consumers using
214
+ * that style fetch availability per visible month and don't need
215
+ * this signal.
216
+ */
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';
182
261
  /**
183
262
  * @default 'month-calendar'
184
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-x4GlW5cb.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,
package/dist/index.js CHANGED
@@ -126,7 +126,7 @@ import { S as Tn, a as bn } from "./_chunks/suggestion-chip-C4kxWUIs.js";
126
126
  import { s as Rn } from "./_chunks/suggestion-chip.agent-6sNWFj7m.js";
127
127
  import { T as hn, t as Fn } from "./_chunks/transcript-panel-DyhTpAP7.js";
128
128
  import { T as Ln } from "./_chunks/typing-indicator-DHeVN4ob.js";
129
- import { B as kn, C as On, O as _n, b as yn } from "./_chunks/booking-x4GlW5cb.js";
129
+ import { B as kn, C as On, O as _n, b as yn } from "./_chunks/booking-eM0y0NIR.js";
130
130
  import { C as Mn, c as Dn, r as wn } from "./_chunks/calendar-YHFknAGv.js";
131
131
  import { O as vn, o as Hn } from "./_chunks/operator-hero-7LiiP7zi.js";
132
132
  import { P as Gn, p as Un } from "./_chunks/patient-search-CBq62kmL.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.33.10",
3
+ "version": "0.34.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",