@alfadocs/ui-kit 0.33.11 → 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.11",
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]`. */
@@ -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,
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-Db4BQ9eH.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.11",
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",