@fragiola/primitives-vue 0.0.0 → 0.2.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/autocomplete-virtual.d.ts +1 -1
  3. package/dist/autocomplete.d.ts +1 -1
  4. package/dist/calendar-preset.d.ts +1 -1
  5. package/dist/calendar-view.d.ts +1 -1
  6. package/dist/calendar.d.ts +1 -1
  7. package/dist/cascade-select.d.ts +1 -1
  8. package/dist/{combobox-virtual-DTRTVq5N.js → combobox-virtual-BDWkgERh.js} +2 -2
  9. package/dist/{combobox-virtual-DTRTVq5N.js.map → combobox-virtual-BDWkgERh.js.map} +1 -1
  10. package/dist/combobox-virtual.d.ts +1 -1
  11. package/dist/combobox-virtual.js +2 -2
  12. package/dist/combobox.d.ts +1 -1
  13. package/dist/combobox.js +1 -1
  14. package/dist/command-virtual.d.ts +1 -1
  15. package/dist/date-field.d.ts +1 -1
  16. package/dist/date-picker-input.d.ts +1 -1
  17. package/dist/date-range-field.d.ts +1 -1
  18. package/dist/date-range-picker-input.d.ts +1 -1
  19. package/dist/{index-t_lSQgLA.d.ts → index-g8zeeaxp.d.ts} +3 -1
  20. package/dist/{index-B8E3X1CK.d.ts → index-lXj_BUUG.d.ts} +5 -0
  21. package/dist/index.d.ts +2 -2
  22. package/dist/index.js +3 -3
  23. package/dist/listbox-virtual.d.ts +1 -1
  24. package/dist/meter.d.ts +1 -1
  25. package/dist/month-calendar.d.ts +1 -1
  26. package/dist/month-range-calendar.d.ts +1 -1
  27. package/dist/multiple-calendar.d.ts +1 -1
  28. package/dist/{number-field-CqxEnwiS.js → number-field-D5pM1f30.js} +28 -4
  29. package/dist/number-field-D5pM1f30.js.map +1 -0
  30. package/dist/number-field.d.ts +1 -1
  31. package/dist/number-field.js +1 -1
  32. package/dist/{parts--mC44S1N.js → parts-DOWIiUdN.js} +13 -3
  33. package/dist/parts-DOWIiUdN.js.map +1 -0
  34. package/dist/progress.d.ts +1 -1
  35. package/dist/range-calendar.d.ts +1 -1
  36. package/dist/select-virtual.d.ts +1 -1
  37. package/dist/slider.d.ts +1 -1
  38. package/dist/time-field.d.ts +1 -1
  39. package/dist/time-range-field.d.ts +1 -1
  40. package/dist/year-calendar.d.ts +1 -1
  41. package/dist/year-range-calendar.d.ts +1 -1
  42. package/package.json +2 -2
  43. package/dist/number-field-CqxEnwiS.js.map +0 -1
  44. package/dist/parts--mC44S1N.js.map +0 -1
@@ -19,7 +19,10 @@ function useStepperButton(context, direction) {
19
19
  const element = shallowRef(null);
20
20
  watch(element, (button, _, onCleanup) => {
21
21
  if (button === null) return;
22
- onCleanup(watchAutoRepeat(button, { onStep: (event) => context.stepBy(direction * context.amount(event), direction > 0 ? "increment-press" : "decrement-press", event) }));
22
+ onCleanup(watchAutoRepeat(button, {
23
+ onStep: (event) => context.stepBy(direction * context.amount(event), direction > 0 ? "increment-press" : "decrement-press", event),
24
+ onEnd: (event) => context.commit(event)
25
+ }));
23
26
  }, { flush: "post" });
24
27
  return {
25
28
  ref: elementSetter(element),
@@ -294,7 +297,8 @@ const NumberFieldRoot = publicComponent(defineComponent({
294
297
  },
295
298
  emits: {
296
299
  "update:value": (_value) => true,
297
- valueChange: (_value, _details) => true
300
+ valueChange: (_value, _details) => true,
301
+ valueCommitted: (_value, _details) => true
298
302
  },
299
303
  setup(props, { attrs, slots, emit }) {
300
304
  const generatedId = useId();
@@ -333,13 +337,28 @@ const NumberFieldRoot = publicComponent(defineComponent({
333
337
  watch(() => own.value.value, (next) => {
334
338
  current = next;
335
339
  }, { flush: "sync" });
340
+ let pending = null;
336
341
  const setValue = (next, details) => {
342
+ if (details.reason === "none") pending = null;
343
+ else if (!Object.is(next, current)) pending = details.reason;
337
344
  current = next;
338
345
  own.set(next, details);
339
346
  setTimeout(() => {
340
347
  current = own.value.value;
341
348
  });
342
349
  };
350
+ /** Reports the value when a change is pending (spec/number-field.md, "Committing"). */
351
+ const commit = (event) => {
352
+ const reason = pending;
353
+ if (reason === null) return;
354
+ pending = null;
355
+ emit("valueCommitted", current, {
356
+ reason,
357
+ event
358
+ });
359
+ };
360
+ /** A key or the wheel commits its step at once. */
361
+ const commitsAtOnce = (reason) => reason === "keyboard" || reason === "wheel";
343
362
  const options = () => ({
344
363
  locale: props.locale,
345
364
  format: props.format
@@ -365,6 +384,7 @@ const NumberFieldRoot = publicComponent(defineComponent({
365
384
  reason,
366
385
  event
367
386
  });
387
+ if (commitsAtOnce(reason)) commit(event);
368
388
  const bound = by > 0 ? props.max : props.min;
369
389
  return bound === void 0 || next !== bound;
370
390
  };
@@ -375,6 +395,7 @@ const NumberFieldRoot = publicComponent(defineComponent({
375
395
  reason,
376
396
  event
377
397
  });
398
+ if (commitsAtOnce(reason)) commit(event);
378
399
  };
379
400
  const onInputText = (text, event) => {
380
401
  if (disabled() || props.readOnly) return false;
@@ -403,6 +424,7 @@ const NumberFieldRoot = publicComponent(defineComponent({
403
424
  reason: "input-blur",
404
425
  event
405
426
  });
427
+ commit(event);
406
428
  };
407
429
  watch(hidden, (element, _, onCleanup) => {
408
430
  if (element === null) return;
@@ -441,6 +463,7 @@ const NumberFieldRoot = publicComponent(defineComponent({
441
463
  amount,
442
464
  stepBy,
443
465
  stepTo,
466
+ commit,
444
467
  onInputText,
445
468
  onInputBlur,
446
469
  setInputElement: elementSetter(input),
@@ -527,8 +550,9 @@ const NumberField = {
527
550
  const amount = context.amount(event);
528
551
  context.stepBy(steps > 0 ? amount : -amount, "scrub", event, Math.abs(steps));
529
552
  },
530
- onEnd: () => {
553
+ onEnd: (event) => {
531
554
  context.scrubbing.value = false;
555
+ context.commit(event);
532
556
  },
533
557
  onCursor: (point) => {
534
558
  context.cursor.value = point;
@@ -578,4 +602,4 @@ const NumberField = {
578
602
  };
579
603
  export { NumberField as t };
580
604
 
581
- //# sourceMappingURL=number-field-CqxEnwiS.js.map
605
+ //# sourceMappingURL=number-field-D5pM1f30.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-field-D5pM1f30.js","names":[],"sources":["../src/components/number-field/number-field-context.ts","../src/components/number-field/use-stepper-button.ts","../src/components/number-field/number-field-decrement.ts","../src/components/number-field/number-field-group.ts","../src/components/number-field/number-field-increment.ts","../src/components/number-field/number-field-input.ts","../src/components/number-field/number-field-root.ts","../src/components/number-field/number-field-scrub-area.ts","../src/components/number-field/number-field-scrub-area-cursor.ts","../src/components/number-field/parts.ts"],"sourcesContent":["import type { ScrubPoint } from \"@fragiola/primitives/number\";\nimport type { ComputedRef, InjectionKey, Ref } from \"vue\";\nimport type { FieldControlBinding } from \"../../composables/use-field-control.ts\";\nimport type { ChangeReason } from \"../../utils/change-details.ts\";\n\n/** The state every part renders with (spec/number-field.md, \"State attributes and ARIA\"). */\nexport interface NumberFieldState {\n /** The value: a number, or `null` while empty. */\n value: number | null;\n /** The Input's text. */\n inputValue: string;\n disabled: boolean;\n readOnly: boolean;\n required: boolean;\n scrubbing: boolean;\n}\n\nexport interface NumberFieldContext {\n state: ComputedRef<NumberFieldState>;\n inputId: () => string;\n min: () => number | undefined;\n max: () => number | undefined;\n format: () => Intl.NumberFormatOptions | undefined;\n /** The value as `format` writes it (`aria-valuetext`), `\"\"` while empty. */\n formattedValue: () => string;\n allowWheelScrub: () => boolean;\n field: FieldControlBinding;\n /** The state attributes and the field's, for every part. */\n attributes: () => Record<string, string>;\n /** The amount of one step for an event's modifier keys (Alt: small, Shift: large). */\n amount: (\n event: { altKey?: boolean; shiftKey?: boolean } | undefined,\n ) => number;\n /**\n * Steps `times` times by `amount` (negative: down) from the value (or the typed text): returns\n * whether another step that way could still change it (a bound not reached).\n */\n stepBy: (\n amount: number,\n reason: ChangeReason,\n event: Event | undefined,\n times?: number,\n ) => boolean;\n /** Sets the value, as a step does (Home and End set a bound). */\n stepTo: (\n value: number,\n reason: ChangeReason,\n event: Event | undefined,\n ) => void;\n /** The Input's text changed: `false` when it is refused (the text stays as it was). */\n onInputText: (text: string, event: Event) => boolean;\n /** The Input lost focus. */\n onInputBlur: (event: Event) => void;\n /** A button press or a scrub ended: reports a pending change (`valueCommitted`). */\n commit: (event: Event | undefined) => void;\n setInputElement: (value: unknown) => void;\n scrubbing: Ref<boolean>;\n /** The virtual cursor of a locked scrub, `null` otherwise. */\n cursor: Ref<ScrubPoint | null>;\n}\n\nexport const NumberFieldKey: InjectionKey<NumberFieldContext> =\n Symbol(\"NumberField\");\n","import { watchAutoRepeat } from \"@fragiola/primitives/number\";\nimport { shallowRef, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport type { NumberFieldContext } from \"./number-field-context.ts\";\n\n/**\n * An Increment's or a Decrement's press and hold (spec/number-field.md, \"Pointer\"), and whether\n * it is disabled: the field disabled or read-only, or its step would change nothing.\n */\nexport function useStepperButton(\n context: NumberFieldContext,\n direction: 1 | -1,\n) {\n const element = shallowRef<HTMLElement | null>(null);\n watch(\n element,\n (button, _, onCleanup) => {\n if (button === null) {\n return;\n }\n onCleanup(\n watchAutoRepeat(button, {\n onStep: (event) =>\n context.stepBy(\n direction * context.amount(event as MouseEvent),\n direction > 0\n ? \"increment-press\"\n : \"decrement-press\",\n event,\n ),\n onEnd: (event) => context.commit(event),\n }),\n );\n },\n { flush: \"post\" },\n );\n return {\n ref: elementSetter(element),\n disabled: () => {\n const { value, disabled, readOnly } = context.state.value;\n const min = context.min();\n const max = context.max();\n const atBound =\n value !== null &&\n (direction > 0\n ? max !== undefined && value >= max\n : min !== undefined && value <= min);\n return disabled || readOnly || atBound;\n },\n };\n}\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\nimport { useStepperButton } from \"./use-stepper-button.ts\";\n\n/**\n * Steps the value down, once or held (spec/number-field.md, \"Pointer\"); out of the tab order, its\n * name the consumer's.\n */\nexport const NumberFieldDecrement: PartComponent<\n Record<never, never>,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldDecrement\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.Decrement\",\n );\n const button = useStepperButton(context, -1);\n return () =>\n renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n type: \"button\",\n tabindex: -1,\n disabled: button.disabled(),\n \"aria-controls\": context.inputId(),\n \"data-primitives-part\": \"number-field-decrement\",\n ...context.attributes(),\n ref: button.ref,\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\n\n/** Groups the Input with its buttons (`role=\"group\"`, spec/number-field.md). */\nexport const NumberFieldGroup: PartComponent<\n Record<never, never>,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldGroup\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.Group\",\n );\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n role: \"group\",\n \"data-primitives-part\": \"number-field-group\",\n ...context.attributes(),\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\nimport { useStepperButton } from \"./use-stepper-button.ts\";\n\n/**\n * Steps the value up, once or held (spec/number-field.md, \"Pointer\"); out of the tab order, its\n * name the consumer's.\n */\nexport const NumberFieldIncrement: PartComponent<\n Record<never, never>,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldIncrement\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.Increment\",\n );\n const button = useStepperButton(context, 1);\n return () =>\n renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n type: \"button\",\n tabindex: -1,\n disabled: button.disabled(),\n \"aria-controls\": context.inputId(),\n \"data-primitives-part\": \"number-field-increment\",\n ...context.attributes(),\n ref: button.ref,\n },\n );\n },\n }),\n);\n","import { defineComponent, nextTick, shallowRef, watch } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\n\n/** The `spinbutton`: a text input with the formatted value (spec/number-field.md, the APG). */\nexport const NumberFieldInput: PartComponent<\n Record<never, never>,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldInput\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.Input\",\n );\n const element = shallowRef<HTMLInputElement | null>(null);\n const setElement = (value: unknown) => {\n context.setInputElement(value);\n const next =\n value instanceof HTMLInputElement\n ? value\n : ((value as { $el?: HTMLInputElement } | null)?.$el ??\n null);\n if (element.value !== next) {\n element.value = next;\n }\n };\n\n // the wheel over the focused Input steps it, and the page does not scroll (a\n // non-passive listener)\n watch(\n [element, context.allowWheelScrub],\n ([input, allowed], _, onCleanup) => {\n if (input === null || !allowed) {\n return;\n }\n const onWheel = (event: WheelEvent) => {\n if (\n input.ownerDocument.activeElement !== input ||\n event.deltaY === 0\n ) {\n return;\n }\n const { disabled, readOnly } = context.state.value;\n if (disabled || readOnly) {\n return;\n }\n event.preventDefault();\n const amount = context.amount(event);\n context.stepBy(\n event.deltaY < 0 ? amount : -amount,\n \"wheel\",\n event,\n );\n };\n input.addEventListener(\"wheel\", onWheel, {\n passive: false,\n });\n onCleanup(() =>\n input.removeEventListener(\"wheel\", onWheel),\n );\n },\n { flush: \"post\" },\n );\n\n const onKeydown = (event: KeyboardEvent) => {\n const { disabled, readOnly } = context.state.value;\n if (disabled || readOnly) {\n return;\n }\n const amount = context.amount(event);\n const large = context.amount({ shiftKey: true });\n switch (event.key) {\n case \"ArrowUp\":\n context.stepBy(amount, \"keyboard\", event);\n break;\n case \"ArrowDown\":\n context.stepBy(-amount, \"keyboard\", event);\n break;\n case \"PageUp\":\n context.stepBy(large, \"keyboard\", event);\n break;\n case \"PageDown\":\n context.stepBy(-large, \"keyboard\", event);\n break;\n case \"Home\": {\n const min = context.min();\n if (min === undefined) {\n return;\n }\n context.stepTo(min, \"keyboard\", event);\n break;\n }\n case \"End\": {\n const max = context.max();\n if (max === undefined) {\n return;\n }\n context.stepTo(max, \"keyboard\", event);\n break;\n }\n default:\n return;\n }\n event.preventDefault();\n };\n\n const onInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n if (!context.onInputText(input.value, event)) {\n // refused: the text stays as it was (spec/number-field.md, \"Typing\")\n input.value = context.state.value.inputValue;\n }\n // a text the render does not change (a controlled value the consumer kept) is\n // re-asserted once the update rendered\n void nextTick().then(() => {\n const text = context.state.value.inputValue;\n if (input.value !== text) {\n input.value = text;\n }\n });\n };\n\n return () => {\n const state = context.state.value;\n const { value, disabled, readOnly, required } = state;\n const min = context.min();\n const max = context.max();\n const integer =\n context.format()?.maximumFractionDigits === 0 &&\n min !== undefined &&\n min >= 0;\n const { field } = context;\n return renderPart(\"input\", { attrs, slots }, props.as, state, {\n id: context.inputId(),\n type: \"text\",\n role: \"spinbutton\",\n inputmode: integer ? \"numeric\" : \"decimal\",\n autocomplete: \"off\",\n autocorrect: \"off\",\n spellcheck: \"false\",\n value: state.inputValue,\n disabled,\n readonly: readOnly,\n \"aria-valuenow\": value ?? undefined,\n \"aria-valuemin\": min,\n \"aria-valuemax\": max,\n \"aria-valuetext\":\n value === null ? undefined : context.formattedValue(),\n \"aria-required\": required ? \"true\" : undefined,\n \"aria-readonly\": readOnly ? \"true\" : undefined,\n ...field.aria(),\n \"data-primitives-part\": \"number-field-input\",\n ...context.attributes(),\n onInput,\n onKeydown,\n onFocus: field.onFocus,\n onBlur: (event: FocusEvent) => {\n context.onInputBlur(event);\n field.onBlur();\n },\n ref: setElement,\n });\n };\n },\n }),\n);\n","import {\n bridgeForm,\n VISUALLY_HIDDEN_INPUT_STYLE,\n} from \"@fragiola/primitives/form\";\nimport {\n clampNumber,\n formatNumber,\n isNumberText,\n parseNumber,\n type ScrubPoint,\n stepNumber,\n} from \"@fragiola/primitives/number\";\nimport {\n computed,\n defineComponent,\n Fragment,\n h,\n type PropType,\n provide,\n ref,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\nimport { useControllable } from \"../../composables/use-controllable.ts\";\nimport { useFieldControl } from \"../../composables/use-field-control.ts\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport type {\n ChangeDetails,\n ChangeReason,\n} from \"../../utils/change-details.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\n\nexport interface NumberFieldRootProps {\n /** A number, or `null` while empty (`v-model:value`). */\n value?: number | null;\n defaultValue?: number | null;\n min?: number;\n max?: number;\n /** The amount of a step (default `1`). */\n step?: number;\n /** The amount of a step with Alt (default `0.1`). */\n smallStep?: number;\n /** The amount of a step with Shift, Page Up and Page Down (default `10`). */\n largeStep?: number;\n /** A step from a value off the grid goes to the grid's next point. */\n snapOnStep?: boolean;\n /** A typed value outside `[min, max]` is clamped on blur (default `true`). */\n clampOnBlur?: boolean;\n /** How the Input writes the value; default: the plain number in the locale. */\n format?: Intl.NumberFormatOptions;\n /** The locale of the format and the parsing (BCP 47; default: the runtime's). */\n locale?: string;\n /** The mouse wheel steps the value over the focused Input. */\n allowWheelScrub?: boolean;\n required?: boolean;\n readOnly?: boolean;\n disabled?: boolean;\n name?: string;\n /** The Input's `id`. */\n id?: string;\n}\n\nexport type NumberFieldRootEmits = {\n \"update:value\": (value: number | null) => true;\n valueChange: (value: number | null, details: ChangeDetails) => true;\n /**\n * The value once a change is complete: on blur after typing, at a key or wheel step, at the\n * release of a button press or a scrub (spec/number-field.md, \"Committing\").\n */\n valueCommitted: (value: number | null, details: ChangeDetails) => true;\n};\n\nconst NUMBER_OR_NULL = [Number, null] as PropType<number | null>;\n\n/**\n * Holds a NumberField's value (`v-model:value`), its text and its hidden form input\n * (spec/number-field.md, the APG spinbutton).\n */\nexport const NumberFieldRoot: PartComponent<\n NumberFieldRootProps,\n NumberFieldState,\n NumberFieldRootEmits\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldRoot\",\n inheritAttrs: false,\n props: {\n ...asProp,\n value: { type: NUMBER_OR_NULL, default: undefined },\n defaultValue: { type: NUMBER_OR_NULL, default: null },\n min: { type: Number, default: undefined },\n max: { type: Number, default: undefined },\n step: { type: Number, default: 1 },\n smallStep: { type: Number, default: 0.1 },\n largeStep: { type: Number, default: 10 },\n snapOnStep: { type: Boolean, default: false },\n clampOnBlur: { type: Boolean, default: true },\n format: {\n type: Object as PropType<Intl.NumberFormatOptions>,\n default: undefined,\n },\n locale: { type: String, default: undefined },\n allowWheelScrub: { type: Boolean, default: false },\n required: { type: Boolean, default: false },\n readOnly: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n name: { type: String, default: undefined },\n id: { type: String, default: undefined },\n },\n emits: {\n \"update:value\": (_value: number | null) => true,\n valueChange: (_value: number | null, _details: ChangeDetails) =>\n true,\n valueCommitted: (_value: number | null, _details: ChangeDetails) =>\n true,\n },\n setup(props, { attrs, slots, emit }) {\n const generatedId = useId();\n const inputId = () => props.id ?? generatedId;\n const own = useControllable<number | null, ChangeDetails>(\n () => props.value,\n props.defaultValue,\n (next, details) => {\n emit(\"update:value\", next);\n emit(\"valueChange\", next, details);\n },\n );\n // the text the user typed, until the blur formats it (`null`: the formatted value)\n const typed = ref<string | null>(null);\n const scrubbing = ref(false);\n const cursor = shallowRef<ScrubPoint | null>(null);\n const input = shallowRef<HTMLElement | null>(null);\n const hidden = shallowRef<HTMLInputElement | null>(null);\n const field = useFieldControl({\n id: inputId,\n labelable: true,\n value: () => own.value.value,\n filled: () => own.value.value !== null,\n input: () => hidden.value,\n focusTarget: () => input.value,\n });\n const disabled = () => props.disabled || field.disabled();\n const formattedValue = computed(() =>\n formatNumber(own.value.value, {\n locale: props.locale,\n format: props.format,\n }),\n );\n const state = computed<NumberFieldState>(() => ({\n value: own.value.value,\n inputValue: typed.value ?? formattedValue.value,\n disabled: disabled(),\n readOnly: props.readOnly,\n required: props.required,\n scrubbing: scrubbing.value,\n }));\n\n // the value as of the last change, so a held button's steps never read a value a\n // controlled consumer has not rendered yet\n let current = own.value.value;\n watch(\n () => own.value.value,\n (next) => {\n current = next;\n },\n { flush: \"sync\" },\n );\n // the reason of the last change not committed yet\n let pending: ChangeReason | null = null;\n const setValue = (next: number | null, details: ChangeDetails) => {\n if (details.reason === \"none\") {\n pending = null;\n } else if (!Object.is(next, current)) {\n pending = details.reason;\n }\n current = next;\n own.set(next, details);\n // an override for the steps of this task only: a consumer that refused the value\n // renders nothing, and the next task steps from the value it kept\n setTimeout(() => {\n current = own.value.value;\n });\n };\n /** Reports the value when a change is pending (spec/number-field.md, \"Committing\"). */\n const commit = (event: Event | undefined) => {\n const reason = pending;\n if (reason === null) {\n return;\n }\n pending = null;\n emit(\"valueCommitted\", current, { reason, event });\n };\n /** A key or the wheel commits its step at once. */\n const commitsAtOnce = (reason: ChangeReason) =>\n reason === \"keyboard\" || reason === \"wheel\";\n const options = () => ({\n locale: props.locale,\n format: props.format,\n });\n /** The value a step starts from: the typed text when it reads as a number. */\n const base = (): number | null => {\n const text = typed.value;\n if (text === null) {\n return current;\n }\n const parsed = parseNumber(text, options());\n return parsed === null || Number.isNaN(parsed)\n ? current\n : parsed;\n };\n const amount = (\n event: { altKey?: boolean; shiftKey?: boolean } | undefined,\n ) =>\n event?.altKey\n ? props.smallStep\n : event?.shiftKey\n ? props.largeStep\n : props.step;\n const stepBy = (\n by: number,\n reason: ChangeReason,\n event: Event | undefined,\n times = 1,\n ) => {\n if (disabled() || props.readOnly) {\n return false;\n }\n let next = base();\n for (let index = 0; index < times; index += 1) {\n next = stepNumber(next, by, {\n min: props.min,\n max: props.max,\n snapOnStep: props.snapOnStep,\n });\n }\n typed.value = null;\n if (!Object.is(next, current)) {\n setValue(next, { reason, event });\n }\n if (commitsAtOnce(reason)) {\n commit(event);\n }\n const bound = by > 0 ? props.max : props.min;\n return bound === undefined || next !== bound;\n };\n const stepTo = (\n next: number,\n reason: ChangeReason,\n event: Event | undefined,\n ) => {\n if (disabled() || props.readOnly) {\n return;\n }\n typed.value = null;\n if (!Object.is(next, current)) {\n setValue(next, { reason, event });\n }\n if (commitsAtOnce(reason)) {\n commit(event);\n }\n };\n const onInputText = (text: string, event: Event) => {\n if (disabled() || props.readOnly) {\n return false;\n }\n if (!isNumberText(text, options())) {\n // refused: the text stays as it was (spec/number-field.md, \"Typing\")\n return false;\n }\n typed.value = text;\n if (text.trim() === \"\") {\n setValue(null, { reason: \"input-clear\", event });\n return true;\n }\n const parsed = parseNumber(text, options());\n if (parsed !== null && !Number.isNaN(parsed)) {\n setValue(parsed, { reason: \"input-change\", event });\n }\n return true;\n };\n const onInputBlur = (event: Event) => {\n if (typed.value === null) {\n return;\n }\n let next = base();\n if (props.clampOnBlur && next !== null) {\n next = clampNumber(next, props.min, props.max);\n }\n typed.value = null;\n if (!Object.is(next, current)) {\n setValue(next, { reason: \"input-blur\", event });\n }\n commit(event);\n };\n\n // a form reset returns it to its default, and writes the rendered value back\n // (Switch's way, docs/decisions.md)\n watch(\n hidden,\n (element, _, onCleanup) => {\n if (element === null) {\n return;\n }\n onCleanup(\n bridgeForm(element, {\n reset: () => {\n const rendered = own.value.value;\n field.reset();\n typed.value = null;\n setValue(props.defaultValue, {\n reason: \"none\",\n });\n // the rendered value, which a patch follows (a controlled\n // field that refuses the reset keeps its input)\n element.value =\n rendered === null ? \"\" : String(rendered);\n // and the Input's text: Vue sets `value` as a property only, so\n // the browser's reset emptied it, and an unchanged value patches\n // nothing\n const text = input.value;\n if (text instanceof HTMLInputElement) {\n text.value =\n rendered === null\n ? \"\"\n : formatNumber(rendered, options());\n }\n },\n invalid: () => input.value,\n }),\n );\n },\n { flush: \"post\" },\n );\n\n const attributes = () => ({\n ...stateAttributes({\n disabled: disabled(),\n readonly: props.readOnly,\n required: props.required,\n scrubbing: scrubbing.value,\n }),\n ...field.attributes(),\n });\n provide(NumberFieldKey, {\n state,\n inputId,\n min: () => props.min,\n max: () => props.max,\n format: () => props.format,\n formattedValue: () => formattedValue.value,\n allowWheelScrub: () => props.allowWheelScrub,\n field,\n attributes,\n amount,\n stepBy,\n stepTo,\n commit,\n onInputText,\n onInputBlur,\n setInputElement: elementSetter(input),\n scrubbing,\n cursor,\n });\n\n return () => {\n const currentState = state.value;\n const { value } = currentState;\n return h(Fragment, [\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n currentState,\n {\n \"data-primitives-part\": \"number-field-root\",\n ...attributes(),\n },\n ),\n h(\"input\", {\n ref: (element: unknown) => {\n hidden.value = element as HTMLInputElement | null;\n },\n type: \"number\",\n \"aria-hidden\": \"true\",\n tabindex: -1,\n name: field.name() ?? props.name,\n value: value === null ? \"\" : String(value),\n min: props.min,\n max: props.max,\n step: \"any\",\n required: currentState.required,\n disabled: currentState.disabled,\n onFocus: () => input.value?.focus(),\n style: VISUALLY_HIDDEN_INPUT_STYLE,\n \"data-primitives-part\": \"number-field-hidden-input\",\n }),\n ]);\n };\n },\n }),\n);\n","import { watchScrub } from \"@fragiola/primitives/number\";\nimport { defineComponent, type PropType, shallowRef, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\n\nexport interface NumberFieldScrubAreaProps {\n /** The axis the pointer scrubs along (default `\"horizontal\"`). */\n direction?: \"horizontal\" | \"vertical\";\n /** The pixels one step takes (default `2`). */\n pixelSensitivity?: number;\n}\n\nconst STYLE = { touchAction: \"none\", userSelect: \"none\" } as const;\n\n/** A press dragged along it steps the value (spec/number-field.md, \"Pointer\": scrub). */\nexport const NumberFieldScrubArea: PartComponent<\n NumberFieldScrubAreaProps,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldScrubArea\",\n inheritAttrs: false,\n props: {\n ...asProp,\n direction: {\n type: String as PropType<\"horizontal\" | \"vertical\">,\n default: \"horizontal\",\n },\n pixelSensitivity: { type: Number, default: 2 },\n },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.ScrubArea\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n watch(\n [element, () => props.direction, () => props.pixelSensitivity],\n ([area, direction, pixelSensitivity], _, onCleanup) => {\n if (area === null) {\n return;\n }\n onCleanup(\n watchScrub(area, {\n direction,\n pixelSensitivity,\n onStart: () => {\n const { disabled, readOnly } =\n context.state.value;\n if (disabled || readOnly) {\n return false;\n }\n context.scrubbing.value = true;\n return true;\n },\n onScrub: (steps, event) => {\n const amount = context.amount(event);\n context.stepBy(\n steps > 0 ? amount : -amount,\n \"scrub\",\n event,\n Math.abs(steps),\n );\n },\n onEnd: (event) => {\n context.scrubbing.value = false;\n context.commit(event);\n },\n onCursor: (point) => {\n context.cursor.value = point;\n },\n }),\n );\n },\n { flush: \"post\" },\n );\n return () =>\n renderPart(\n \"span\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n style: STYLE,\n // a press keeps the focus where it is\n onMousedown: (event: MouseEvent) => {\n if (event.button === 0) {\n event.preventDefault();\n }\n },\n \"data-primitives-part\": \"number-field-scrub-area\",\n ...context.attributes(),\n ref: setElement,\n },\n );\n },\n }),\n);\n","import { defineComponent, h, Teleport } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport {\n NumberFieldKey,\n type NumberFieldState,\n} from \"./number-field-context.ts\";\n\n/**\n * The virtual cursor of a locked scrub (spec/number-field.md, \"Pointer\"), teleported into `body`:\n * rendered only while a mouse scrubs with the pointer locked.\n */\nexport const NumberFieldScrubAreaCursor: PartComponent<\n Record<never, never>,\n NumberFieldState\n> = publicComponent(\n defineComponent({\n name: \"NumberFieldScrubAreaCursor\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n NumberFieldKey,\n \"NumberField.ScrubAreaCursor\",\n );\n return () => {\n const cursor = context.cursor.value;\n if (cursor === null) {\n return null;\n }\n return h(Teleport, { to: \"body\" }, [\n renderPart(\n \"span\",\n { attrs, slots },\n props.as,\n context.state.value,\n {\n style: {\n position: \"fixed\",\n top: 0,\n left: 0,\n pointerEvents: \"none\",\n transform: `translate3d(${cursor.x}px, ${cursor.y}px, 0)`,\n },\n \"data-primitives-part\":\n \"number-field-scrub-area-cursor\",\n ...context.attributes(),\n },\n ),\n ]);\n };\n },\n }),\n);\n","import { NumberFieldDecrement } from \"./number-field-decrement.ts\";\nimport { NumberFieldGroup } from \"./number-field-group.ts\";\nimport { NumberFieldIncrement } from \"./number-field-increment.ts\";\nimport { NumberFieldInput } from \"./number-field-input.ts\";\nimport { NumberFieldRoot } from \"./number-field-root.ts\";\nimport { NumberFieldScrubArea } from \"./number-field-scrub-area.ts\";\nimport { NumberFieldScrubAreaCursor } from \"./number-field-scrub-area-cursor.ts\";\n\n/** spec/number-field.md */\nexport const NumberField = {\n Root: NumberFieldRoot,\n Group: NumberFieldGroup,\n Input: NumberFieldInput,\n Increment: NumberFieldIncrement,\n Decrement: NumberFieldDecrement,\n ScrubArea: NumberFieldScrubArea,\n ScrubAreaCursor: NumberFieldScrubAreaCursor,\n};\n"],"mappings":";;;;;;;;;;;AA6DA,MAAa,iBACT,OAAO,aAAa;;;;;;ACrDxB,SAAgB,iBACZ,SACA,WACF;CACE,MAAM,UAAU,WAA+B,IAAI;CACnD,MACI,UACC,QAAQ,GAAG,cAAc;EACtB,IAAI,WAAW,MACX;EAEJ,UACI,gBAAgB,QAAQ;GACpB,SAAS,UACL,QAAQ,OACJ,YAAY,QAAQ,OAAO,KAAmB,GAC9C,YAAY,IACN,oBACA,mBACN,KACJ;GACJ,QAAQ,UAAU,QAAQ,OAAO,KAAK;EAC1C,CAAC,CACL;CACJ,GACA,EAAE,OAAO,OAAO,CACpB;CACA,OAAO;EACH,KAAK,cAAc,OAAO;EAC1B,gBAAgB;GACZ,MAAM,EAAE,OAAO,UAAU,aAAa,QAAQ,MAAM;GACpD,MAAM,MAAM,QAAQ,IAAI;GACxB,MAAM,MAAM,QAAQ,IAAI;GAMxB,OAAO,YAAY,YAJf,UAAU,SACT,YAAY,IACP,QAAQ,KAAA,KAAa,SAAS,MAC9B,QAAQ,KAAA,KAAa,SAAS;EAE5C;CACJ;AACJ;;;;;;ACjCA,MAAa,uBAGT,gBACA,gBAAgB;CACZ,MAAM;CACN,cAAc;CACd,OAAO;CACP,MAAM,OAAO,EAAE,OAAO,SAAS;EAC3B,MAAM,UAAU,mBACZ,gBACA,uBACJ;EACA,MA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Q;MAC1B,OAAO;KACX;KACA,UAAU,OAAO,UAAU;MACvB,MAAM,SAAS,QAAQ,OAAO,KAAK;MACnC,QAAQ,OACJ,QAAQ,IAAI,SAAS,CAAC,QACtB,SACA,OACA,KAAK,IAAI,KAAK,CAClB;KACJ;KACA,QAAQ,UAAU;MACd,QAAQ,UAAU,QAAQ;MAC1B,QAAQ,OAAO,KAAK;KACxB;KACA,WAAW,UAAU;MACjB,QAAQ,OAAO,QAAQ;KAC3B;IACJ,CAAC,CACL;GACJ,GACA,EAAE,OAAO,OAAO,CACpB;GACA,aACI,WACI,QACA;IAAE;IAAO;GAAM,GACf,MAAM,IACN,QAAQ,MAAM,OACd;IACI,OAAO;IAEP,cAAc,UAAsB;KAChC,IAAI,MAAM,WAAW,GACjB,MAAM,eAAe;IAE7B;IACA,wBAAwB;IACxB,GAAG,QAAQ,WAAW;IACtB,KAAK;GACT,CACJ;EACR;CACJ,CAAC,CE3FU;CACX,iBDGA,gBACA,gBAAgB;EACZ,MAAM;EACN,cAAc;EACd,OAAO;EACP,MAAM,OAAO,EAAE,OAAO,SAAS;GAC3B,MAAM,UAAU,mBACZ,gBACA,6BACJ;GACA,aAAa;IACT,MAAM,SAAS,QAAQ,OAAO;IAC9B,IAAI,WAAW,MACX,OAAO;IAEX,OAAO,EAAE,UAAU,EAAE,IAAI,OAAO,GAAG,CAC/B,WACI,QACA;KAAE;KAAO;IAAM,GACf,MAAM,IACN,QAAQ,MAAM,OACd;KACI,OAAO;MACH,UAAU;MACV,KAAK;MACL,MAAM;MACN,eAAe;MACf,WAAW,eAAe,OAAO,EAAE,MAAM,OAAO,EAAE;KACtD;KACA,wBACI;KACJ,GAAG,QAAQ,WAAW;IAC1B,CACJ,CACJ,CAAC;GACL;EACJ;CACJ,CAAC,CCxCgB;AACrB"}
@@ -1,4 +1,4 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { a as NumberFieldState, i as NumberFieldRootProps, n as NumberFieldScrubAreaProps, r as NumberFieldRootEmits, t as NumberField } from "./index-B8E3X1CK.js";
3
+ import { a as NumberFieldState, i as NumberFieldRootProps, n as NumberFieldScrubAreaProps, r as NumberFieldRootEmits, t as NumberField } from "./index-lXj_BUUG.js";
4
4
  export { type ChangeDetails, type ChangeReason, NumberField, type NumberFieldRootEmits, type NumberFieldRootProps, type NumberFieldScrubAreaProps, type NumberFieldState, type RenderSlotProps };
@@ -1 +1 @@
1
- export { t as NumberField } from "./number-field-CqxEnwiS.js";
1
+ export { t as NumberField } from "./number-field-D5pM1f30.js";
@@ -325,7 +325,7 @@ const ComboboxInput = publicComponent(defineComponent({
325
325
  });
326
326
  context.highlighted.value = null;
327
327
  context.markTyped();
328
- context.pendingHighlight.current = null;
328
+ context.pendingHighlight.current = context.autoHighlight() && element.value !== "" ? "typed" : null;
329
329
  if (!context.open.value) context.setOpen(true, "input-change", event);
330
330
  };
331
331
  return () => {
@@ -532,13 +532,18 @@ const ComboboxList = publicComponent(defineComponent({
532
532
  watch(() => [
533
533
  context.list.value,
534
534
  context.itemCount.value,
535
- context.open.value
535
+ context.open.value,
536
+ context.inputValue.value
536
537
  ], ([list]) => {
537
538
  const pending = context.pendingHighlight.current;
538
539
  if (list === null || pending === null) return;
539
540
  const items = orderedItems(context);
540
541
  if (items.length < list.querySelectorAll("[role=\"option\"]").length) return;
541
542
  context.pendingHighlight.current = null;
543
+ if (pending === "typed") {
544
+ context.highlighted.value = items[0]?.id ?? null;
545
+ return;
546
+ }
542
547
  const selected = context.multiple() ? void 0 : items.find((item) => context.isSelected(item.value));
543
548
  const edge = pending === "first" ? items[0] : items.at(-1);
544
549
  const target = selected ?? (pending === "selected" ? void 0 : edge);
@@ -705,6 +710,10 @@ const ComboboxRoot = publicComponent(defineComponent({
705
710
  type: Boolean,
706
711
  default: false
707
712
  },
713
+ autoHighlight: {
714
+ type: Boolean,
715
+ default: false
716
+ },
708
717
  /** The selected item (or `null`), or the selected items with `multiple`. */
709
718
  value: {
710
719
  type: null,
@@ -818,6 +827,7 @@ const ComboboxRoot = publicComponent(defineComponent({
818
827
  setOpen,
819
828
  field,
820
829
  multiple,
830
+ autoHighlight: () => props.autoHighlight,
821
831
  value,
822
832
  values,
823
833
  inputValue,
@@ -1020,4 +1030,4 @@ const Combobox = {
1020
1030
  };
1021
1031
  export { ComboboxList as n, ComboboxKey as r, Combobox as t };
1022
1032
 
1023
- //# sourceMappingURL=parts--mC44S1N.js.map
1033
+ //# sourceMappingURL=parts-DOWIiUdN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parts-DOWIiUdN.js","names":[],"sources":["../src/components/combobox/combobox-context.ts","../src/components/combobox/combobox-chip.ts","../src/components/combobox/combobox-chip-remove.ts","../src/components/combobox/combobox-chips.ts","../src/components/combobox/combobox-clear.ts","../src/components/combobox/combobox-empty.ts","../src/components/combobox/combobox-group.ts","../src/components/combobox/combobox-group-label.ts","../src/components/combobox/combobox-input.ts","../src/components/combobox/combobox-input-group.ts","../src/components/combobox/combobox-item.ts","../src/components/combobox/combobox-item-indicator.ts","../src/components/combobox/combobox-list.ts","../src/components/combobox/combobox-popup.ts","../src/components/combobox/combobox-portal.ts","../src/components/combobox/combobox-positioner.ts","../src/components/combobox/combobox-root.ts","../src/components/combobox/combobox-separator.ts","../src/components/combobox/combobox-status.ts","../src/components/combobox/combobox-trigger.ts","../src/components/combobox/combobox-value.ts","../src/components/combobox/parts.ts"],"sourcesContent":["import type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport type { ComputedRef, InjectionKey, Ref, ShallowRef } from \"vue\";\nimport type { FieldControlBinding } from \"../../composables/use-field-control.ts\";\nimport type { OverlayRoot } from \"../../composables/use-overlay-root.ts\";\nimport type { ChangeReason } from \"../../utils/change-details.ts\";\n\n/** A rendered Item, as the Root knows it. */\nexport interface ComboboxItemInfo {\n value: unknown;\n disabled: boolean;\n id: string;\n}\n\n/**\n * What is highlighted once the list renders: the first, the last or the selected item, or the\n * first item the typed text kept (`autoHighlight`).\n */\nexport type PendingHighlight = \"first\" | \"last\" | \"selected\" | \"typed\" | null;\n\nexport interface ComboboxContext extends OverlayRoot {\n /** The enclosing field's binding, for the input (spec/field.md). */\n field: FieldControlBinding;\n multiple: () => boolean;\n /** Typing highlights the first item the filter keeps. */\n autoHighlight: () => boolean;\n /** The selected item (or `null`), or the selected items with `multiple`. */\n value: ComputedRef<unknown>;\n /** The selected items, as a list in both modes. */\n values: ComputedRef<readonly unknown[]>;\n inputValue: ComputedRef<string>;\n setInputValue: (value: string, reason: ChangeReason) => void;\n /** Opens or closes; closing without a choice resets the text. */\n setOpen: (open: boolean, reason: ChangeReason, event?: Event) => boolean;\n disabled: () => boolean;\n /** The highlighted item's id. */\n highlighted: Ref<string | null>;\n isSelected: (item: unknown) => boolean;\n /** Chooses an item (spec/combobox.md, \"Choosing an item\"). */\n choose: (item: unknown) => void;\n /** Clears the text and the value. */\n clear: (reason: ChangeReason) => void;\n /** Removes the value at `index` (`multiple`). */\n removeAt: (index: number, reason: ChangeReason) => void;\n /** An item's text (`itemToStringLabel`). */\n label: (item: unknown) => string;\n /** Whether the Root has `items` (it filters them). */\n hasItems: () => boolean;\n /** The matching entries: items, or groups with their matching items. */\n entries: ComputedRef<readonly unknown[]>;\n /** The input's text changed by typing since the list opened. */\n markTyped: () => void;\n items: Map<HTMLElement, ComboboxItemInfo>;\n list: ShallowRef<HTMLElement | null>;\n /** The Trigger button (the overlay root's `trigger` is the input). */\n button: ShallowRef<HTMLElement | null>;\n inputGroup: ShallowRef<HTMLElement | null>;\n chips: ShallowRef<HTMLElement | null>;\n clearButton: ShallowRef<HTMLElement | null>;\n listId: string;\n pendingHighlight: { current: PendingHighlight };\n placed: Ref<{ side: Side; align: Align }>;\n /** Bumped when items register, so `data-empty` and the pending highlight follow. */\n itemCount: Ref<number>;\n}\n\nexport const ComboboxKey: InjectionKey<ComboboxContext> = Symbol(\"Combobox\");\n\nexport interface ComboboxItemState {\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n}\n\nexport const ComboboxItemKey: InjectionKey<ComputedRef<ComboboxItemState>> =\n Symbol(\"ComboboxItem\");\n\nexport const ComboboxGroupKey: InjectionKey<{ labelId: string }> =\n Symbol(\"ComboboxGroup\");\n\n/** The chip's element, read when a key or a press removes it. */\nexport const ComboboxChipKey: InjectionKey<() => HTMLElement | null> =\n Symbol(\"ComboboxChip\");\n\n/** Whether the list holds no item: no matching entry, or no rendered Item. */\nexport function isEmpty(context: ComboboxContext): boolean {\n return context.hasItems()\n ? context.entries.value.length === 0\n : context.itemCount.value === 0;\n}\n\n/** The rendered items of the list, in order. */\nexport function orderedItems(context: ComboboxContext): ComboboxItemInfo[] {\n const list = context.list.value;\n if (list === null) {\n return [];\n }\n return [...list.querySelectorAll<HTMLElement>('[role=\"option\"]')]\n .map((element) => context.items.get(element))\n .filter((item): item is ComboboxItemInfo => item !== undefined);\n}\n\n/** The highlighted item, as registered. */\nexport function highlightedItem(\n context: ComboboxContext,\n): ComboboxItemInfo | undefined {\n const id = context.highlighted.value;\n if (id === null) {\n return undefined;\n }\n for (const item of context.items.values()) {\n if (item.id === id) {\n return item;\n }\n }\n return undefined;\n}\n\n/** The rendered chips, in value order. */\nexport function chipElements(context: ComboboxContext): HTMLElement[] {\n const chips = context.chips.value;\n if (chips === null) {\n return [];\n }\n return [\n ...chips.querySelectorAll<HTMLElement>(\n '[data-primitives-part=\"combobox-chip\"]',\n ),\n ];\n}\n\n/**\n * A press on the InputGroup or the Chips, outside their buttons, chips and input: focuses the\n * input and opens the list (spec/combobox.md, \"Pointer\").\n */\nexport function pressToOpen(context: ComboboxContext, event: MouseEvent): void {\n const target = event.target as Element | null;\n if (\n target === null ||\n target === context.trigger.value ||\n target.closest('button, [data-primitives-part=\"combobox-chip\"]') !==\n null\n ) {\n return;\n }\n event.preventDefault();\n if (context.disabled()) {\n return;\n }\n context.trigger.value?.focus();\n openOnPress(context);\n}\n\n/** A press on the input opens the list, on the selected item in single mode. */\nexport function openOnPress(context: ComboboxContext): void {\n if (context.open.value || context.disabled()) {\n return;\n }\n context.pendingHighlight.current = context.multiple() ? null : \"selected\";\n context.setOpen(true, \"input-press\");\n}\n","import { chipKeyTarget } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport { defineComponent, nextTick, provide, shallowRef } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport { useProvidedDirection } from \"../../direction/direction-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport type { ComboboxDisabledState } from \"./combobox-clear.ts\";\nimport {\n ComboboxChipKey,\n ComboboxKey,\n chipElements,\n} from \"./combobox-context.ts\";\n\n/** One value of a `multiple` combobox; the arrows move between chips (spec/combobox.md). */\nexport const ComboboxChip: PartComponent<\n Record<never, never>,\n ComboboxDisabledState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxChip\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const direction = useProvidedDirection();\n const context = useRequiredContext(ComboboxKey, \"Combobox.Chip\");\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n provide(ComboboxChipKey, () => element.value);\n\n const onKeydown = (event: KeyboardEvent) => {\n if (\n context.disabled() ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey\n ) {\n return;\n }\n const current = event.currentTarget as HTMLElement;\n const chips = chipElements(context);\n const index = chips.indexOf(current);\n const action = chipKeyTarget(\n event.key,\n index,\n chips.length,\n getDirection(current, direction()) === \"rtl\",\n );\n if (action === null) {\n return;\n }\n // a printable character goes on to the input, focused below\n if (event.key.length !== 1 || event.key === \" \") {\n event.preventDefault();\n }\n if (action.open) {\n context.setOpen(true, \"list-navigation\");\n }\n const focus = () => {\n const target =\n action.focus === \"input\"\n ? context.trigger.value\n : chipElements(context)[action.focus];\n target?.focus();\n };\n if (!action.remove) {\n focus();\n return;\n }\n context.removeAt(index, \"none\");\n // the chip's index is in the chips that are left: once they render\n void nextTick().then(focus);\n };\n\n return () => {\n const disabled = context.disabled();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { disabled },\n {\n tabindex: -1,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-primitives-part\": \"combobox-chip\",\n ...stateAttributes({ disabled }),\n onKeydown,\n ref: setElement,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport type { ComboboxDisabledState } from \"./combobox-clear.ts\";\nimport {\n ComboboxChipKey,\n ComboboxKey,\n chipElements,\n} from \"./combobox-context.ts\";\n\n/** Removes its chip's value and returns focus to the input. */\nexport const ComboboxChipRemove: PartComponent<\n Record<never, never>,\n ComboboxDisabledState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxChipRemove\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n ComboboxKey,\n \"Combobox.ChipRemove\",\n );\n const chip = useRequiredContext(\n ComboboxChipKey,\n \"Combobox.ChipRemove\",\n );\n return () => {\n const disabled = context.disabled();\n return renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n { disabled },\n {\n type: \"button\",\n tabindex: -1,\n disabled,\n \"data-primitives-part\": \"combobox-chip-remove\",\n ...stateAttributes({ disabled }),\n onPointerdown: (event: PointerEvent) =>\n event.preventDefault(),\n onClick: () => {\n const element = chip();\n const index =\n element === null\n ? -1\n : chipElements(context).indexOf(element);\n if (index >= 0) {\n context.removeAt(index, \"chip-remove-press\");\n }\n context.trigger.value?.focus();\n },\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { ComboboxKey, pressToOpen } from \"./combobox-context.ts\";\n\n/** `multiple`: holds the chips and the Input; a `toolbar` while it holds a chip. */\nexport const ComboboxChips: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxChips\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Chips\");\n const setChips = elementSetter(context.chips);\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n role:\n context.values.value.length > 0\n ? \"toolbar\"\n : undefined,\n \"data-primitives-part\": \"combobox-chips\",\n onMousedown: (event: MouseEvent) =>\n pressToOpen(context, event),\n ref: setChips,\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxDisabledState {\n disabled: boolean;\n}\n\n/** Clears the text and the value; rendered only while there is a value (spec/combobox.md). */\nexport const ComboboxClear: PartComponent<\n Record<never, never>,\n ComboboxDisabledState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxClear\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Clear\");\n const setClearButton = elementSetter(context.clearButton);\n return () => {\n if (context.values.value.length === 0) {\n return null;\n }\n const disabled = context.disabled();\n return renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n { disabled },\n {\n type: \"button\",\n tabindex: -1,\n disabled,\n \"data-primitives-part\": \"combobox-clear\",\n ...stateAttributes({ disabled }),\n onPointerdown: (event: PointerEvent) =>\n event.preventDefault(),\n onClick: () => {\n context.clear(\"clear-press\");\n context.trigger.value?.focus();\n },\n ref: setClearButton,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { ComboboxKey, isEmpty } from \"./combobox-context.ts\";\n\n/**\n * A polite live region, always rendered; its children are shown only while the list is empty\n * (spec/combobox.md).\n */\nexport const ComboboxEmpty: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxEmpty\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Empty\");\n return () => {\n const empty = isEmpty(context);\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-empty\",\n },\n () => (empty ? slots.default?.({ state: {} }) : []),\n );\n };\n },\n }),\n);\n","import { defineComponent, provide, useId } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { ComboboxGroupKey } from \"./combobox-context.ts\";\n\n/** A `group` of items, named by its GroupLabel (spec/combobox.md). */\nexport const ComboboxGroup: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxGroup\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const labelId = `${useId()}-label`;\n provide(ComboboxGroupKey, { labelId });\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n role: \"group\",\n \"aria-labelledby\": labelId,\n \"data-primitives-part\": \"combobox-group\",\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { ComboboxGroupKey } from \"./combobox-context.ts\";\n\n/** Names its Group. */\nexport const ComboboxGroupLabel: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxGroupLabel\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const group = useRequiredContext(\n ComboboxGroupKey,\n \"Combobox.GroupLabel\",\n );\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n id: group.labelId,\n \"data-primitives-part\": \"combobox-group-label\",\n },\n );\n },\n }),\n);\n","import { chipArrows, stepThroughNone } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport { defineComponent, nextTick } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport { useProvidedDirection } from \"../../direction/direction-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport {\n ComboboxKey,\n chipElements,\n highlightedItem,\n openOnPress,\n orderedItems,\n type PendingHighlight,\n} from \"./combobox-context.ts\";\n\nexport interface ComboboxOpenState {\n open: boolean;\n disabled: boolean;\n}\n\n/**\n * The `combobox`: keeps DOM focus while the list is open; the highlighted item is announced with\n * `aria-activedescendant` (spec/combobox.md, \"Keyboard\").\n */\nexport const ComboboxInput: PartComponent<\n Record<never, never>,\n ComboboxOpenState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxInput\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const direction = useProvidedDirection();\n const context = useRequiredContext(ComboboxKey, \"Combobox.Input\");\n const setInput = elementSetter(context.trigger);\n const openWith = (highlight: PendingHighlight, event?: Event) => {\n context.pendingHighlight.current = highlight;\n context.setOpen(true, \"list-navigation\", event);\n };\n const move = (delta: 1 | -1) => {\n // past an end, the visual focus goes back to the input; from the input, to the near end\n const items = orderedItems(context);\n const index = items.findIndex(\n (item) => item.id === context.highlighted.value,\n );\n context.highlighted.value =\n items[stepThroughNone(items.length, index, delta)]?.id ??\n null;\n };\n\n const onKeydown = (event: KeyboardEvent) => {\n const input = event.currentTarget as HTMLInputElement;\n const open = context.open.value;\n switch (event.key) {\n case \"ArrowDown\":\n case \"ArrowUp\": {\n event.preventDefault();\n if (event.altKey) {\n if (event.key === \"ArrowDown\" && !open) {\n openWith(null, event);\n } else if (event.key === \"ArrowUp\" && open) {\n context.setOpen(\n false,\n \"list-navigation\",\n event,\n );\n }\n return;\n }\n if (!open) {\n openWith(\n event.key === \"ArrowDown\" ? \"first\" : \"last\",\n event,\n );\n return;\n }\n move(event.key === \"ArrowDown\" ? 1 : -1);\n return;\n }\n case \"Enter\":\n if (open) {\n event.preventDefault();\n const active = highlightedItem(context);\n if (active !== undefined && !active.disabled) {\n context.choose(active.value);\n }\n }\n return;\n case \"Escape\":\n // the open list's layer takes Escape first; here the list is closed\n if (\n !open &&\n (context.inputValue.value !== \"\" ||\n context.values.value.length > 0)\n ) {\n event.preventDefault();\n context.clear(\"escape-key\");\n }\n return;\n case \"Tab\":\n if (open) {\n context.setOpen(false, \"focus-out\", event);\n }\n return;\n case \"Backspace\":\n if (\n context.multiple() &&\n input.value === \"\" &&\n context.values.value.length > 0\n ) {\n context.removeAt(\n context.values.value.length - 1,\n \"none\",\n );\n }\n return;\n default: {\n const chips = chipElements(context);\n if (\n context.multiple() &&\n event.key ===\n chipArrows(\n getDirection(input, direction()) === \"rtl\",\n ).previous &&\n input.selectionStart === 0 &&\n input.selectionEnd === 0 &&\n chips.length > 0\n ) {\n event.preventDefault();\n chips.at(-1)?.focus();\n }\n }\n }\n };\n\n const onInput = (event: Event) => {\n const element = event.target as HTMLInputElement;\n context.setInputValue(element.value, \"input-change\");\n // a controlled inputValue the consumer kept does not re-render the input:\n // re-assert it once the consumer's update has rendered\n // (spec/README.md, \"A controlled value the consumer rejects\")\n void nextTick().then(() => {\n if (element.value !== context.inputValue.value) {\n element.value = context.inputValue.value;\n }\n });\n context.highlighted.value = null;\n context.markTyped();\n // autoHighlight: the first item the text keeps, once the list renders\n context.pendingHighlight.current =\n context.autoHighlight() && element.value !== \"\"\n ? \"typed\"\n : null;\n if (!context.open.value) {\n context.setOpen(true, \"input-change\", event);\n }\n };\n\n return () => {\n const open = context.open.value;\n const disabled = context.disabled();\n const highlighted = context.highlighted.value;\n // a rendered option's id only, never a stale one (the item count tracks the options)\n void context.itemCount.value;\n const active =\n highlighted === null\n ? undefined\n : orderedItems(context).find(\n (item) => item.id === highlighted,\n );\n const { field } = context;\n return renderPart(\n \"input\",\n { attrs, slots },\n props.as,\n { open, disabled },\n {\n type: \"text\",\n id: context.triggerId,\n role: \"combobox\",\n autocomplete: \"off\",\n disabled,\n value: context.inputValue.value,\n \"aria-autocomplete\": \"list\",\n \"aria-expanded\": open ? \"true\" : \"false\",\n \"aria-controls\": context.listId,\n \"aria-activedescendant\":\n open && active ? active.id : undefined,\n ...field.aria(),\n \"data-primitives-part\": \"combobox-input\",\n ...field.attributes(),\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onInput,\n onClick: () => openOnPress(context),\n onKeydown,\n onFocus: field.onFocus,\n onBlur: field.onBlur,\n ref: setInput,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey, pressToOpen } from \"./combobox-context.ts\";\nimport type { ComboboxOpenState } from \"./combobox-input.ts\";\n\n/** Holds the Input and its buttons; anchors the list (spec/combobox.md). */\nexport const ComboboxInputGroup: PartComponent<\n Record<never, never>,\n ComboboxOpenState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxInputGroup\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n ComboboxKey,\n \"Combobox.InputGroup\",\n );\n const setInputGroup = elementSetter(context.inputGroup);\n return () => {\n const open = context.open.value;\n const disabled = context.disabled();\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, disabled },\n {\n role: \"group\",\n \"data-primitives-part\": \"combobox-input-group\",\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onMousedown: (event: MouseEvent) =>\n pressToOpen(context, event),\n ref: setInputGroup,\n },\n );\n };\n },\n }),\n);\n","import { scrollIntoViewWithin } from \"@fragiola/primitives/collection\";\nimport {\n computed,\n defineComponent,\n provide,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport type { ComboboxItemState } from \"./combobox-context.ts\";\nimport { ComboboxItemKey, ComboboxKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxItemProps {\n /** The item: written into the input as `itemToStringLabel(value)` when chosen. */\n value: unknown;\n /** Can be highlighted, never chosen. */\n disabled?: boolean;\n}\n\n/** An `option` (spec/combobox.md). */\nexport const ComboboxItem: PartComponent<ComboboxItemProps, ComboboxItemState> =\n publicComponent(\n defineComponent({\n name: \"ComboboxItem\",\n inheritAttrs: false,\n props: {\n ...asProp,\n /** The item: written into the input as `itemToStringLabel(value)` when chosen. */\n value: { type: null, required: true },\n /** Can be highlighted, never chosen. */\n disabled: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n ComboboxKey,\n \"Combobox.Item\",\n );\n const element = shallowRef<HTMLElement | null>(null);\n const setElement = elementSetter(element);\n const id = useId();\n const { items, itemCount } = context;\n watch(\n () => [element.value, props.value, props.disabled] as const,\n ([node, value, disabled], _, onCleanup) => {\n if (node === null) {\n return;\n }\n items.set(node, { value, disabled, id });\n itemCount.value = items.size;\n onCleanup(() => {\n items.delete(node);\n itemCount.value = items.size;\n });\n },\n { flush: \"post\", immediate: true },\n );\n const state = computed(() => ({\n highlighted: context.highlighted.value === id,\n selected: context.isSelected(props.value),\n disabled: props.disabled,\n }));\n provide(ComboboxItemKey, state);\n watch(\n () =>\n [\n state.value.highlighted,\n element.value,\n context.positioner.value,\n ] as const,\n ([highlighted]) => {\n // within the popup only (a list that mounts before it is placed never\n // scrolls the page), and on mount: an item can mount already highlighted\n if (highlighted && element.value) {\n scrollIntoViewWithin(\n element.value,\n context.positioner.value,\n );\n }\n },\n { flush: \"post\", immediate: true },\n );\n return () => {\n const { highlighted, selected, disabled } = state.value;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n state.value,\n {\n role: \"option\",\n id,\n \"aria-selected\": selected ? \"true\" : undefined,\n \"aria-disabled\": disabled ? \"true\" : undefined,\n \"data-primitives-part\": \"combobox-item\",\n ...stateAttributes({\n highlighted,\n selected,\n disabled,\n }),\n onPointermove: () => {\n if (!state.value.highlighted) {\n context.highlighted.value = id;\n }\n },\n // the input keeps DOM focus\n onPointerdown: (event: PointerEvent) =>\n event.preventDefault(),\n onClick: () => {\n if (!props.disabled) {\n context.choose(props.value);\n }\n },\n ref: setElement,\n },\n );\n };\n },\n }),\n );\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { ComboboxItemKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxItemIndicatorState {\n selected: boolean;\n}\n\nexport interface ComboboxItemIndicatorProps {\n /** Rendered while the item is not selected too. */\n keepMounted?: boolean;\n}\n\n/** Marks a selected item; hidden from assistive technologies (spec/combobox.md). */\nexport const ComboboxItemIndicator: PartComponent<\n ComboboxItemIndicatorProps,\n ComboboxItemIndicatorState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxItemIndicator\",\n inheritAttrs: false,\n props: {\n ...asProp,\n /** Rendered while the item is not selected too. */\n keepMounted: { type: Boolean, default: false },\n },\n setup(props, { attrs, slots }) {\n const item = useRequiredContext(\n ComboboxItemKey,\n \"Combobox.ItemIndicator\",\n );\n return () => {\n const selected = item.value.selected;\n if (!selected && !props.keepMounted) {\n return null;\n }\n return renderPart(\n \"span\",\n { attrs, slots },\n props.as,\n { selected },\n {\n \"aria-hidden\": \"true\",\n \"data-primitives-part\": \"combobox-item-indicator\",\n },\n );\n };\n },\n }),\n);\n","import type { VNode } from \"vue\";\nimport { defineComponent, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport type { AsProp, RenderSlotProps } from \"../../utils/render-part.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey, isEmpty, orderedItems } from \"./combobox-context.ts\";\n\nexport interface ComboboxListState {\n empty: boolean;\n}\n\n/**\n * With the Root's `items`, the default slot renders each matching entry (an item, or a group whose\n * `items` are its matching items); without them, it renders once with the state. `entry` is the\n * consumer's own type, named by the slot's annotation\n * (`v-slot=\"{ entry }: { entry: Country }\"`), as React's render function infers it from its\n * parameter: `never` until annotated, so any annotation binds with no cast.\n */\nexport interface ComboboxListSlots {\n default?: (scope: {\n entry: never;\n index: number;\n state: ComboboxListState;\n }) => VNode[];\n render?: (scope: RenderSlotProps<ComboboxListState>) => VNode[];\n}\n\n/**\n * The `listbox`. With the Root's `items`, its default scoped slot renders each matching entry\n * (`v-slot=\"{ entry, index }\"`: an item, or a group); without them, its content as is. Applies\n * the highlight the keyboard asked for once its items render.\n */\nexport const ComboboxList: PublicComponent<{ as?: AsProp }, ComboboxListSlots> =\n publicComponent(\n defineComponent({\n name: \"ComboboxList\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n ComboboxKey,\n \"Combobox.List\",\n );\n const setList = elementSetter(context.list);\n watch(\n // runs when the list opens (a list reopened while it closes keeps its element), or its\n // items or its text change\n () =>\n [\n context.list.value,\n context.itemCount.value,\n context.open.value,\n context.inputValue.value,\n ] as const,\n ([list]) => {\n const pending = context.pendingHighlight.current;\n if (list === null || pending === null) {\n return;\n }\n const items = orderedItems(context);\n // the items register after the list renders them: wait for every one\n if (\n items.length <\n list.querySelectorAll('[role=\"option\"]').length\n ) {\n return;\n }\n context.pendingHighlight.current = null;\n if (pending === \"typed\") {\n context.highlighted.value = items[0]?.id ?? null;\n return;\n }\n const selected = context.multiple()\n ? undefined\n : items.find((item) =>\n context.isSelected(item.value),\n );\n const edge =\n pending === \"first\" ? items[0] : items.at(-1);\n const target =\n selected ??\n (pending === \"selected\" ? undefined : edge);\n context.highlighted.value = target?.id ?? null;\n },\n { flush: \"post\", immediate: true },\n );\n return () => {\n const empty = isEmpty(context);\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { empty },\n {\n role: \"listbox\",\n id: context.listId,\n \"aria-multiselectable\": context.multiple()\n ? \"true\"\n : undefined,\n \"data-primitives-part\": \"combobox-list\",\n ...stateAttributes({ empty }),\n ref: setList,\n },\n () =>\n context.hasItems()\n ? context.entries.value.flatMap(\n (entry, index) =>\n slots.default?.({\n entry,\n index,\n state: { empty },\n }) ?? [],\n )\n : slots.default?.({ state: { empty } }),\n );\n };\n },\n }),\n );\n","import type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxPopupState {\n open: boolean;\n side: Side;\n align: Align;\n}\n\n/** The floating container of the list (no role of its own). */\nexport const ComboboxPopup: PartComponent<\n Record<never, never>,\n ComboboxPopupState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxPopup\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Popup\");\n const setPopup = elementSetter(context.popup);\n return () => {\n const open = context.open.value;\n const status = context.presence.status.value;\n const placed = context.placed.value;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, ...placed },\n {\n \"data-primitives-part\": \"combobox-popup\",\n ...stateAttributes({\n open,\n closed: !open,\n side: placed.side,\n align: placed.align,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n }),\n ref: setPopup,\n },\n );\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type OverlayPortalProps,\n overlayPortalProps,\n useOverlayPortal,\n} from \"../../utils/overlay-portal.ts\";\nimport {\n type ContentSlots,\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxPortalProps extends OverlayPortalProps {}\n\n/** Moves the content to `container` (default: the body) while mounted, or always with `keep-mounted`. */\nexport const ComboboxPortal: PublicComponent<\n ComboboxPortalProps,\n ContentSlots\n> = publicComponent(\n defineComponent({\n name: \"ComboboxPortal\",\n props: overlayPortalProps,\n setup(props, { slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Portal\");\n return useOverlayPortal(context.presence.mounted, props, slots);\n },\n }),\n);\n","import { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport { computed, defineComponent, watch } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport type { PositionerProps } from \"../../composables/use-positioner.ts\";\nimport {\n positionerProps,\n usePositioner,\n} from \"../../composables/use-positioner.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\n\nexport interface ComboboxPositionerState {\n open: boolean;\n side: Side;\n align: Align;\n}\n\n/**\n * Places the list under the InputGroup (else the Chips, else the Input); the open list is a layer\n * (Escape, outside press).\n */\nexport const ComboboxPositioner: PartComponent<\n PositionerProps,\n ComboboxPositionerState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxPositioner\",\n inheritAttrs: false,\n props: { ...asProp, ...positionerProps },\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(\n ComboboxKey,\n \"Combobox.Positioner\",\n );\n const setPositioner = elementSetter(context.positioner);\n const anchor = computed(\n () =>\n context.inputGroup.value ??\n context.chips.value ??\n context.trigger.value,\n );\n const placed = usePositioner(\n props,\n { side: \"bottom\", align: \"start\" },\n anchor,\n context.positioner,\n null,\n context.presence.mounted,\n );\n watch(placed, (value) => (context.placed.value = value), {\n immediate: true,\n });\n watch(\n () => [context.open.value, context.positioner.value] as const,\n ([open, positioner], _, onCleanup) => {\n if (!open || positioner === null) {\n return;\n }\n const session = openOverlaySession(\n positioner.ownerDocument,\n {\n elements: () => [positioner],\n ignore: () => [\n context.trigger.value,\n context.button.value,\n context.inputGroup.value,\n context.chips.value,\n context.clearButton.value,\n ],\n dismiss: (reason, event) =>\n context.setOpen(false, reason, event),\n },\n );\n onCleanup(session.end);\n },\n { flush: \"post\", immediate: true },\n );\n return () => {\n const open = context.open.value;\n return renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n { open, ...placed.value },\n {\n role: \"presentation\",\n hidden: context.presence.mounted.value\n ? undefined\n : true,\n \"data-primitives-part\": \"combobox-positioner\",\n ...stateAttributes({\n open,\n closed: !open,\n side: placed.value.side,\n align: placed.value.align,\n }),\n ref: setPositioner,\n },\n );\n };\n },\n }),\n);\n","import {\n containsFilter,\n filterItems,\n type ItemEquality,\n type ItemFilter,\n type ItemGroup,\n includesItem,\n itemFormValue,\n itemLabel,\n queryIsLabel,\n toggleItem,\n} from \"@fragiola/primitives/collection\";\nimport {\n bridgeForm,\n VISUALLY_HIDDEN_INPUT_STYLE,\n} from \"@fragiola/primitives/form\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport {\n computed,\n defineComponent,\n Fragment,\n h,\n nextTick,\n type PropType,\n provide,\n ref,\n shallowRef,\n toRaw,\n useId,\n watch,\n} from \"vue\";\nimport { useControllable } from \"../../composables/use-controllable.ts\";\nimport { useFieldControl } from \"../../composables/use-field-control.ts\";\nimport {\n overlayRootEmits,\n overlayRootProps,\n useOverlayRoot,\n} from \"../../composables/use-overlay-root.ts\";\nimport type {\n ChangeDetails,\n ChangeReason,\n OpenChangeDetails,\n} from \"../../utils/change-details.ts\";\nimport {\n type ContentSlots,\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport {\n type ComboboxContext,\n type ComboboxItemInfo,\n ComboboxKey,\n} from \"./combobox-context.ts\";\n\nconst NONE: readonly unknown[] = [];\n\n/**\n * `filter` over the consumer's own items: `never` for the item and `unknown` for what\n * `itemToString` takes, so a filter typed for them (`ItemFilter<Country>`, the toolkit's\n * `containsFilter<Country>()`) binds with no cast and no `any`, as Angular's (Epic #22).\n */\nexport type ComboboxFilter = (\n item: never,\n query: string,\n itemToString: (item: unknown) => string,\n) => boolean;\n\n/** `isItemEqualToValue` over the consumer's own items (typed `(a: Country, b: Country)`). */\nexport type ComboboxItemEquality = (item: never, value: never) => boolean;\n\n/** `itemToStringLabel` / `itemToStringValue` over the consumer's own items. */\nexport type ComboboxItemToString = (item: never) => string;\n\nexport interface ComboboxRootProps {\n open?: boolean;\n defaultOpen?: boolean;\n /** The items, or groups of items: the combobox filters them (spec/combobox.md). */\n items?: readonly unknown[];\n /** Whether an item matches the query; `null` turns filtering off. */\n filter?: ComboboxFilter | null;\n /** The most items the list renders; `-1` for no limit. */\n limit?: number;\n locale?: string;\n multiple?: boolean;\n /** Typing highlights the first item the filter keeps, so Enter chooses it (default `false`). */\n autoHighlight?: boolean;\n /** The selected item (or `null`), or the selected items with `multiple`. */\n value?: unknown;\n defaultValue?: unknown;\n inputValue?: string;\n defaultInputValue?: string;\n isItemEqualToValue?: ComboboxItemEquality;\n itemToStringLabel?: ComboboxItemToString;\n itemToStringValue?: ComboboxItemToString;\n name?: string;\n required?: boolean;\n disabled?: boolean;\n}\n\nexport type ComboboxRootEmits = {\n \"update:open\": (open: boolean) => true;\n openChange: (open: boolean, details: OpenChangeDetails) => true;\n openChangeComplete: (open: boolean) => true;\n \"update:value\": (value: unknown) => true;\n valueChange: (value: unknown, details: ChangeDetails) => true;\n \"update:inputValue\": (value: string) => true;\n inputValueChange: (value: string, details: ChangeDetails) => true;\n};\n\n/**\n * Holds the combobox's state (`v-model:value`, `v-model:input-value`, `v-model:open`); renders\n * its hidden form inputs (spec/combobox.md).\n */\nexport const ComboboxRoot: PublicComponent<\n ComboboxRootProps,\n ContentSlots,\n ComboboxRootEmits\n> = publicComponent(\n defineComponent({\n name: \"ComboboxRoot\",\n props: {\n ...overlayRootProps,\n /** The items, or groups of items: the combobox filters them (spec/combobox.md). */\n items: {\n type: Array as PropType<\n readonly (unknown | ItemGroup<unknown>)[]\n >,\n default: undefined,\n },\n /** Whether an item matches the query; `null` turns filtering off. */\n filter: {\n type: Function as PropType<ComboboxFilter | null>,\n default: undefined,\n },\n /** The most items the list renders; `-1` for no limit. */\n limit: { type: Number, default: -1 },\n locale: { type: String, default: undefined },\n multiple: { type: Boolean, default: false },\n autoHighlight: { type: Boolean, default: false },\n /** The selected item (or `null`), or the selected items with `multiple`. */\n value: { type: null, default: undefined },\n defaultValue: {\n type: null,\n default: undefined,\n },\n inputValue: { type: String, default: undefined },\n defaultInputValue: { type: String, default: undefined },\n isItemEqualToValue: {\n type: Function as PropType<ComboboxItemEquality>,\n default: undefined,\n },\n itemToStringLabel: {\n type: Function as PropType<ComboboxItemToString>,\n default: undefined,\n },\n itemToStringValue: {\n type: Function as PropType<ComboboxItemToString>,\n default: undefined,\n },\n name: { type: String, default: undefined },\n required: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n },\n emits: {\n ...overlayRootEmits,\n \"update:value\": (_value: unknown) => true,\n valueChange: (_value: unknown, _details: ChangeDetails) => true,\n \"update:inputValue\": (_value: string) => true,\n inputValueChange: (_value: string, _details: ChangeDetails) => true,\n },\n setup(props, { emit, slots, expose }) {\n const root = useOverlayRoot(props, emit);\n // a template ref on the Root: `close()` and `unmount()` (spec/README.md, \"Lifecycle\")\n expose(root.actions);\n const multiple = () => props.multiple;\n // read at reset time too: the form reset takes the current default (as React does)\n const defaultValue = (): unknown =>\n props.defaultValue ?? (props.multiple ? NONE : null);\n // the consumer's callbacks take its own items, which are the items given here\n const label = (item: unknown) =>\n itemLabel(\n item,\n props.itemToStringLabel as\n | ((item: unknown) => string)\n | undefined,\n );\n const formValue = (item: unknown) =>\n itemFormValue(\n item,\n props.itemToStringValue as\n | ((item: unknown) => string)\n | undefined,\n );\n const valueState = useControllable<unknown, ChangeDetails>(\n () => props.value,\n defaultValue(),\n (next, details) => {\n emit(\"update:value\", next);\n emit(\"valueChange\", next, details);\n },\n );\n const value = computed(() => valueState.value.value);\n const values = computed<readonly unknown[]>(() => {\n const current = value.value;\n if (props.multiple) {\n return (current as readonly unknown[] | null) ?? NONE;\n }\n return current === null || current === undefined\n ? NONE\n : [current];\n });\n const inputState = useControllable<string, ChangeDetails>(\n () => props.inputValue,\n props.defaultInputValue ??\n (props.multiple\n ? \"\"\n : label(props.value ?? defaultValue())),\n (next, details) => {\n emit(\"update:inputValue\", next);\n emit(\"inputValueChange\", next, details);\n },\n );\n const inputValue = computed(() => inputState.value.value);\n\n const hidden = shallowRef<HTMLInputElement | null>(null);\n const field = useFieldControl({\n // the input's rendered id: the consumer's, else the generated one\n id: () => root.trigger.value?.id || root.triggerId,\n labelable: true,\n value: () => value.value,\n filled: () => values.value.length > 0,\n input: () => hidden.value,\n focusTarget: () => root.trigger.value,\n });\n const disabled = () => props.disabled || field.disabled();\n const highlighted = ref<string | null>(null);\n const typed = ref(false);\n const pendingHighlight: ComboboxContext[\"pendingHighlight\"] = {\n current: null,\n };\n\n const setOpen = (\n next: boolean,\n reason: ChangeReason,\n event?: Event,\n ): boolean => {\n // a close the consumer cancels leaves the list, its text and highlight as they are\n const changed = root.setOpen(next, reason, event);\n if ((!next || reason !== \"input-change\") && (changed || next)) {\n typed.value = false;\n }\n if (next || !changed) {\n return changed;\n }\n // a list reopened during its exit animation starts with no highlight\n highlighted.value = null;\n pendingHighlight.current = null;\n if (reason === \"item-press\") {\n return changed;\n }\n // closing without a choice resets the text (spec/combobox.md, \"Choosing an item\")\n const text = props.multiple ? \"\" : label(value.value);\n if (inputValue.value !== text) {\n inputState.set(text, {\n reason: text === \"\" ? \"input-clear\" : \"none\",\n });\n }\n return changed;\n };\n // a value held in the consumer's `ref` is its reactive proxy: compare the raw objects\n const isEqual = (item: unknown, other: unknown) =>\n props.isItemEqualToValue\n ? (props.isItemEqualToValue as ItemEquality<unknown>)(\n item,\n other,\n )\n : Object.is(toRaw(item), toRaw(other));\n\n const filter = computed<ItemFilter<unknown> | null>(() =>\n props.filter === undefined\n ? containsFilter<unknown>(props.locale)\n : (props.filter as ItemFilter<unknown> | null),\n );\n const entries = computed<readonly unknown[]>(() => {\n const items = props.items;\n if (items === undefined) {\n return NONE;\n }\n const query = inputValue.value.trim();\n // a single combobox that opened on its selected item's label shows every item\n const whole =\n !props.multiple &&\n !typed.value &&\n values.value.length > 0 &&\n queryIsLabel(label(values.value[0]), query, props.locale);\n return filterItems(items, whole ? \"\" : query, {\n filter: filter.value,\n limit: props.limit,\n itemToString: label,\n });\n });\n\n const context: ComboboxContext = {\n ...root,\n setOpen,\n field,\n multiple,\n autoHighlight: () => props.autoHighlight,\n value,\n values,\n inputValue,\n setInputValue: (next, reason) =>\n inputState.set(next, { reason }),\n disabled,\n highlighted,\n isSelected: (item) => includesItem(values.value, item, isEqual),\n choose(item) {\n highlighted.value = null;\n if (!props.multiple) {\n valueState.set(item, { reason: \"item-press\" });\n inputState.set(label(item), { reason: \"item-press\" });\n setOpen(false, \"item-press\");\n return;\n }\n valueState.set(toggleItem(values.value, item, isEqual), {\n reason: \"item-press\",\n });\n if (inputValue.value.trim() !== \"\") {\n inputState.set(\"\", { reason: \"input-clear\" });\n setOpen(false, \"item-press\");\n }\n },\n clear(reason) {\n inputState.set(\"\", { reason });\n valueState.set(props.multiple ? [] : null, { reason });\n highlighted.value = null;\n },\n removeAt(index, reason) {\n valueState.set(\n values.value.filter((_, at) => at !== index),\n { reason },\n );\n },\n label,\n hasItems: () => props.items !== undefined,\n entries,\n markTyped: () => {\n typed.value = true;\n },\n items: new Map<HTMLElement, ComboboxItemInfo>(),\n list: shallowRef(null),\n button: shallowRef(null),\n inputGroup: shallowRef(null),\n chips: shallowRef(null),\n clearButton: shallowRef(null),\n listId: `${useId()}-list`,\n pendingHighlight,\n placed: ref<{ side: Side; align: Align }>({\n side: \"bottom\",\n align: \"start\",\n }),\n itemCount: ref(0),\n };\n provide(ComboboxKey, context);\n\n watch(\n hidden,\n (element, _, onCleanup) => {\n if (element === null) {\n return;\n }\n onCleanup(\n bridgeForm(element, {\n reset: () => {\n const initial = defaultValue();\n field.reset();\n valueState.set(initial, { reason: \"none\" });\n inputState.set(\n props.multiple ? \"\" : label(initial),\n { reason: \"none\" },\n );\n // the browser reset the elements: write the state back once rendered\n void nextTick().then(() => {\n const input = root.trigger.value;\n if (\n input instanceof HTMLInputElement &&\n input.value !== inputValue.value\n ) {\n input.value = inputValue.value;\n }\n if (!props.multiple) {\n element.value = formValue(value.value);\n }\n });\n },\n invalid: () => root.trigger.value,\n }),\n );\n },\n { flush: \"post\" },\n );\n\n return () => {\n const fieldName = field.name() ?? props.name;\n const isMultiple = props.multiple;\n const count = values.value.length;\n return h(Fragment, [\n slots.default?.(),\n h(\"input\", {\n ref: (element: unknown) => {\n hidden.value = element as HTMLInputElement | null;\n },\n \"aria-hidden\": \"true\",\n tabindex: -1,\n name: isMultiple ? undefined : fieldName,\n value: isMultiple ? \"\" : formValue(value.value),\n required: isMultiple\n ? props.required && count === 0\n : props.required,\n disabled: disabled(),\n style: VISUALLY_HIDDEN_INPUT_STYLE,\n \"data-primitives-part\": \"combobox-hidden-input\",\n }),\n ...(isMultiple && fieldName !== undefined\n ? values.value.map((item, index) =>\n h(\"input\", {\n // two values may share a form value\n key: index,\n type: \"hidden\",\n name: fieldName,\n value: formValue(item),\n disabled: disabled(),\n \"data-primitives-part\":\n \"combobox-hidden-input\",\n }),\n )\n : []),\n ]);\n };\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\n\n/** Between groups; no role of its own (a `listbox` owns only groups and options). */\nexport const ComboboxSeparator: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxSeparator\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n role: \"presentation\",\n \"data-orientation\": \"horizontal\",\n \"data-primitives-part\": \"combobox-separator\",\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\n\n/** A polite live region for the consumer's text (spec/combobox.md). */\nexport const ComboboxStatus: PartComponent<\n Record<never, never>,\n Record<never, never>\n> = publicComponent(\n defineComponent({\n name: \"ComboboxStatus\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n return () =>\n renderPart(\n \"div\",\n { attrs, slots },\n props.as,\n {},\n {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-status\",\n },\n );\n },\n }),\n);\n","import { defineComponent } from \"vue\";\nimport { elementSetter } from \"../../composables/use-overlay-root.ts\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PartComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { asProp, renderPart } from \"../../utils/render-part.ts\";\nimport { stateAttributes } from \"../../utils/state-attributes.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\nimport type { ComboboxOpenState } from \"./combobox-input.ts\";\n\n/** Toggles the list; not in the tab order, keeps focus in the input. */\nexport const ComboboxTrigger: PartComponent<\n Record<never, never>,\n ComboboxOpenState\n> = publicComponent(\n defineComponent({\n name: \"ComboboxTrigger\",\n inheritAttrs: false,\n props: asProp,\n setup(props, { attrs, slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Trigger\");\n const setButton = elementSetter(context.button);\n return () => {\n const open = context.open.value;\n const disabled = context.disabled();\n return renderPart(\n \"button\",\n { attrs, slots },\n props.as,\n { open, disabled },\n {\n type: \"button\",\n tabindex: -1,\n disabled,\n \"aria-expanded\": open ? \"true\" : \"false\",\n \"aria-controls\": context.listId,\n \"data-primitives-part\": \"combobox-trigger\",\n ...stateAttributes({ \"popup-open\": open, disabled }),\n onPointerdown: (event: PointerEvent) =>\n event.preventDefault(),\n onClick: (event: MouseEvent) => {\n context.pendingHighlight.current = null;\n context.setOpen(\n !context.open.value,\n \"trigger-press\",\n event,\n );\n context.trigger.value?.focus();\n },\n ref: setButton,\n },\n );\n };\n },\n }),\n);\n","import type { VNode } from \"vue\";\nimport { defineComponent } from \"vue\";\nimport { useRequiredContext } from \"../../composables/use-required-context.ts\";\nimport {\n type PublicComponent,\n publicComponent,\n} from \"../../utils/public-component.ts\";\nimport { ComboboxKey } from \"./combobox-context.ts\";\n\n/**\n * The default slot renders the value: an item or `null`, or the list of items with `multiple`.\n * `value` is the consumer's own type, named by the slot's annotation\n * (`v-slot=\"{ value }: { value: Country[] }\"`), as React's render function infers it from its\n * parameter: `never` until annotated, so any annotation binds with no cast.\n */\nexport interface ComboboxValueSlots {\n default?: (scope: { value: never }) => VNode[];\n}\n\n/**\n * Renders the value: its label (labels joined with \", \"), or the default scoped slot\n * (`v-slot=\"{ value }\"`: an item or `null`, or the list of items).\n */\nexport const ComboboxValue: PublicComponent<\n Record<never, never>,\n ComboboxValueSlots\n> = publicComponent(\n defineComponent({\n name: \"ComboboxValue\",\n setup(_, { slots }) {\n const context = useRequiredContext(ComboboxKey, \"Combobox.Value\");\n return () =>\n slots.default?.({ value: context.value.value }) ??\n context.values.value.map(context.label).join(\", \");\n },\n }),\n);\n","import { ComboboxChip } from \"./combobox-chip.ts\";\nimport { ComboboxChipRemove } from \"./combobox-chip-remove.ts\";\nimport { ComboboxChips } from \"./combobox-chips.ts\";\nimport { ComboboxClear } from \"./combobox-clear.ts\";\nimport { ComboboxEmpty } from \"./combobox-empty.ts\";\nimport { ComboboxGroup } from \"./combobox-group.ts\";\nimport { ComboboxGroupLabel } from \"./combobox-group-label.ts\";\nimport { ComboboxInput } from \"./combobox-input.ts\";\nimport { ComboboxInputGroup } from \"./combobox-input-group.ts\";\nimport { ComboboxItem } from \"./combobox-item.ts\";\nimport { ComboboxItemIndicator } from \"./combobox-item-indicator.ts\";\nimport { ComboboxList } from \"./combobox-list.ts\";\nimport { ComboboxPopup } from \"./combobox-popup.ts\";\nimport { ComboboxPortal } from \"./combobox-portal.ts\";\nimport { ComboboxPositioner } from \"./combobox-positioner.ts\";\nimport { ComboboxRoot } from \"./combobox-root.ts\";\nimport { ComboboxSeparator } from \"./combobox-separator.ts\";\nimport { ComboboxStatus } from \"./combobox-status.ts\";\nimport { ComboboxTrigger } from \"./combobox-trigger.ts\";\nimport { ComboboxValue } from \"./combobox-value.ts\";\n\n/** spec/combobox.md */\nexport const Combobox = {\n Root: ComboboxRoot,\n InputGroup: ComboboxInputGroup,\n Input: ComboboxInput,\n Trigger: ComboboxTrigger,\n Clear: ComboboxClear,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Value: ComboboxValue,\n Status: ComboboxStatus,\n Portal: ComboboxPortal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n Empty: ComboboxEmpty,\n List: ComboboxList,\n Group: ComboboxGroup,\n GroupLabel: ComboboxGroupLabel,\n Separator: ComboboxSeparator,\n Item: ComboboxItem,\n ItemIndicator: ComboboxItemIndicator,\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAiEA,MAAa,cAA6C,OAAO,UAAU;AAQ3E,MAAa,kBACT,OAAO,cAAc;AAEzB,MAAa,mBACT,OAAO,eAAe;;AAG1B,MAAa,kBACT,OAAO,cAAc;;AAGzB,SAAgB,QAAQ,SAAmC;CACvD,OAAO,QAAQ,SAAS,IAClB,QAAQ,QAAQ,MAAM,WAAW,IACjC,QAAQ,UAAU,UAAU;AACtC;;AAGA,SAAgB,aAAa,SAA8C;CACvE,MAAM,OAAO,QAAQ,KAAK;CAC1B,IAAI,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otProps } from "./render-part-BaTKiWBp.js";
2
- import { $ as Progress, Q as ProgressStatus, et as ProgressValueSlotProps, it as ProgressState, nt as ProgressLabelProps, rt as ProgressRootProps, tt as ProgressValueSlots } from "./index-t_lSQgLA.js";
2
+ import { $ as Progress, Q as ProgressStatus, et as ProgressValueSlotProps, it as ProgressState, nt as ProgressLabelProps, rt as ProgressRootProps, tt as ProgressValueSlots } from "./index-g8zeeaxp.js";
3
3
  export { Progress, type ProgressLabelProps, type ProgressRootProps, type ProgressState, type ProgressStatus, type ProgressValueSlotProps, type ProgressValueSlots, type RenderSlotProps };
@@ -1,5 +1,5 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { J as Weekday, K as DateRange, X as RangeCalendarRootEmits, Y as RangeCalendar, Z as RangeCalendarRootProps, _i as CalendarGridProps, ci as CalendarPrevButtonProps, di as CalendarHeadingProps, fi as CalendarHeadingState, gi as CalendarGridBodySlots, hi as CalendarGridHeaderSlots, li as CalendarNextButtonProps, mi as CalendarHeaderCellState, ni as CalendarRowProps, oi as CalendarRootSharedProps, pi as CalendarHeaderCellProps, q as PlainDate, ri as CalendarRowSlots, si as CalendarRootState, ui as CalendarPageButtonState, vi as CalendarCellProps, yi as CalendarCellState } from "./index-t_lSQgLA.js";
3
+ import { J as Weekday, K as DateRange, X as RangeCalendarRootEmits, Y as RangeCalendar, Z as RangeCalendarRootProps, _i as CalendarGridProps, ci as CalendarPrevButtonProps, di as CalendarHeadingProps, fi as CalendarHeadingState, gi as CalendarGridBodySlots, hi as CalendarGridHeaderSlots, li as CalendarNextButtonProps, mi as CalendarHeaderCellState, ni as CalendarRowProps, oi as CalendarRootSharedProps, pi as CalendarHeaderCellProps, q as PlainDate, ri as CalendarRowSlots, si as CalendarRootState, ui as CalendarPageButtonState, vi as CalendarCellProps, yi as CalendarCellState } from "./index-g8zeeaxp.js";
4
4
  import { h as CalendarOptions } from "./index-DIZSgXHM.js";
5
5
  export { type CalendarCellProps, type CalendarCellState, type CalendarGridBodySlots, type CalendarGridHeaderSlots, type CalendarGridProps, type CalendarHeaderCellProps, type CalendarHeaderCellState, type CalendarHeadingProps, type CalendarHeadingState, type CalendarNextButtonProps, type CalendarOptions, type CalendarPageButtonState, type CalendarPrevButtonProps, type CalendarRootSharedProps, type CalendarRootState, type CalendarRowProps, type CalendarRowSlots, type ChangeDetails, type ChangeReason, type DateRange, type PlainDate, RangeCalendar, type RangeCalendarRootEmits, type RangeCalendarRootProps, type RenderSlotProps, type Weekday };
@@ -1,3 +1,3 @@
1
- import { Bi as VirtualListProps, G as SelectVirtualListSlots, U as SelectVirtual, W as SelectVirtualListProps, zi as VirtualListEmits } from "./index-t_lSQgLA.js";
1
+ import { Bi as VirtualListProps, G as SelectVirtualListSlots, U as SelectVirtual, W as SelectVirtualListProps, zi as VirtualListEmits } from "./index-g8zeeaxp.js";
2
2
  import { g as SelectItemData, r as Select } from "./index-bC3hHzam.js";
3
3
  export { Select, type SelectItemData, SelectVirtual, type SelectVirtualListProps, type SelectVirtualListSlots, type VirtualListEmits, type VirtualListProps };
package/dist/slider.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { B as SliderRootEmits, F as SliderThumbProps, H as SliderState, I as SliderThumbState, L as SliderValueSlotProps, P as Slider, R as SliderValueSlots, V as SliderRootProps, z as SliderLabelProps } from "./index-t_lSQgLA.js";
3
+ import { B as SliderRootEmits, F as SliderThumbProps, H as SliderState, I as SliderThumbState, L as SliderValueSlotProps, P as Slider, R as SliderValueSlots, V as SliderRootProps, z as SliderLabelProps } from "./index-g8zeeaxp.js";
4
4
  export { type ChangeDetails, type ChangeReason, type RenderSlotProps, Slider, type SliderLabelProps, type SliderRootEmits, type SliderRootProps, type SliderState, type SliderThumbProps, type SliderThumbState, type SliderValueSlotProps, type SliderValueSlots };
@@ -1,4 +1,4 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { A as SegmentType, D as DateSegment, Dn as DateFieldState, En as DateFieldSegmentState, M as TimeFieldRootEmits, N as TimeFieldRootProps, O as PlainTime, Tn as DateFieldInputSlots, bn as DateFieldSegmentProps, j as TimeField, k as SegmentGranularity, wn as DateFieldRootSharedProps } from "./index-t_lSQgLA.js";
3
+ import { A as SegmentType, D as DateSegment, Dn as DateFieldState, En as DateFieldSegmentState, M as TimeFieldRootEmits, N as TimeFieldRootProps, O as PlainTime, Tn as DateFieldInputSlots, bn as DateFieldSegmentProps, j as TimeField, k as SegmentGranularity, wn as DateFieldRootSharedProps } from "./index-g8zeeaxp.js";
4
4
  export { type ChangeDetails, type ChangeReason, type DateFieldInputSlots, type DateFieldRootSharedProps, type DateFieldSegmentProps, type DateFieldSegmentState, type DateFieldState, type DateSegment, type PlainTime, type RenderSlotProps, type SegmentGranularity, type SegmentType, TimeField, type TimeFieldRootEmits, type TimeFieldRootProps };
@@ -1,4 +1,4 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { C as TimeRange, Dn as DateFieldState, E as TimeRangeFieldRootProps, En as DateFieldSegmentState, S as SegmentType, T as TimeRangeFieldRootEmits, Tn as DateFieldInputSlots, b as PlainTime, bn as DateFieldSegmentProps, dn as DateRangeFieldRootSharedProps, fn as RangeEnd, tn as DateRangeFieldInputProps, w as TimeRangeField, x as SegmentGranularity, y as DateSegment } from "./index-t_lSQgLA.js";
3
+ import { C as TimeRange, Dn as DateFieldState, E as TimeRangeFieldRootProps, En as DateFieldSegmentState, S as SegmentType, T as TimeRangeFieldRootEmits, Tn as DateFieldInputSlots, b as PlainTime, bn as DateFieldSegmentProps, dn as DateRangeFieldRootSharedProps, fn as RangeEnd, tn as DateRangeFieldInputProps, w as TimeRangeField, x as SegmentGranularity, y as DateSegment } from "./index-g8zeeaxp.js";
4
4
  export { type ChangeDetails, type ChangeReason, type DateFieldInputSlots, type DateFieldSegmentProps, type DateFieldSegmentState, type DateFieldState, type DateRangeFieldInputProps, type DateRangeFieldRootSharedProps, type DateSegment, type PlainTime, type RangeEnd, type RenderSlotProps, type SegmentGranularity, type SegmentType, type TimeRange, TimeRangeField, type TimeRangeFieldRootEmits, type TimeRangeFieldRootProps };
@@ -1,5 +1,5 @@
1
1
  import { n as ChangeReason, t as ChangeDetails } from "./change-details-Bc4-Xzdm.js";
2
2
  import { n as RenderSlotProps } from "./render-part-BaTKiWBp.js";
3
- import { Ar as MonthCalendar, Br as MonthCalendarHeadingState, Fr as MonthCalendarGridProps, Gr as MonthCalendarCellState, Ir as MonthCalendarNextButtonProps, Lr as MonthCalendarPrevButtonProps, Mr as MonthCalendarRowProps, Nr as MonthCalendarRowSlots, Pr as MonthCalendarGridBodySlots, Rr as MonthCalendarPageButtonState, Ur as MonthCalendarRootSharedProps, Wr as MonthCalendarRootState, _ as YearCalendarRootEmits, f as PlainYear, g as YearCalendar, h as YearRange, jr as MonthCalendarCellProps, m as YearMonthRange, p as PlainYearMonth, v as YearCalendarRootProps, zr as MonthCalendarHeadingProps } from "./index-t_lSQgLA.js";
3
+ import { Ar as MonthCalendar, Br as MonthCalendarHeadingState, Fr as MonthCalendarGridProps, Gr as MonthCalendarCellState, Ir as MonthCalendarNextButtonProps, Lr as MonthCalendarPrevButtonProps, Mr as MonthCalendarRowProps, Nr as MonthCalendarRowSlots, Pr as MonthCalendarGridBodySlots, Rr as MonthCalendarPageButtonState, Ur as MonthCalendarRootSharedProps, Wr as MonthCalendarRootState, _ as YearCalendarRootEmits, f as PlainYear, g as YearCalendar, h as YearRange, jr as MonthCalendarCellProps, m as YearMonthRange, p as PlainYearMonth, v as YearCalendarRootProps, zr as MonthCalendarHeadingProps } from "./index-g8zeeaxp.js";
4
4
  import { c as MonthCalendarItem } from "./index-DqI6n06W.js";
5
5
  export { type ChangeDetails, type ChangeReason, MonthCalendar, type MonthCalendarCellProps, type MonthCalendarCellState, type MonthCalendarGridBodySlots, type MonthCalendarGridProps, type MonthCalendarHeadingProps, type MonthCalendarHeadingState, type MonthCalendarItem, type MonthCalendarNextButtonProps, type MonthCalendarPageButtonState, type MonthCalendarPrevButtonProps, type MonthCalendarRootSharedProps, type MonthCalendarRootState, type MonthCalendarRowProps, type MonthCalendarRowSlots, type PlainYear, type PlainYearMonth, type RenderSlotProps, YearCalendar, type YearCalendarRootEmits, type YearCalendarRootProps, type YearMonthRange, type YearRange };