@fragiola/primitives-angular 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.
- package/CHANGELOG.md +80 -0
- package/fesm2022/fragiola-primitives-angular-combobox.mjs +24 -1
- package/fesm2022/fragiola-primitives-angular-combobox.mjs.map +1 -1
- package/fesm2022/fragiola-primitives-angular-number-field.mjs +36 -3
- package/fesm2022/fragiola-primitives-angular-number-field.mjs.map +1 -1
- package/package.json +2 -2
- package/types/fragiola-primitives-angular-combobox.d.ts +12 -2
- package/types/fragiola-primitives-angular-number-field.d.ts +10 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @fragiola/primitives-angular
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#123](https://github.com/fragiola/primitives/pull/123) [`18fd0ff`](https://github.com/fragiola/primitives/commit/18fd0ff180f8b7af9586db77b67b105281b89242) Thanks [@maurodesouza](https://github.com/maurodesouza)! - NumberField reports the committed value: `onValueCommitted` (Vue `@value-committed`, Angular `(valueCommitted)`) is called once a change is complete, on blur after typing, at a key or wheel step, at the release of a button press or a scrub. The toolkit's `watchAutoRepeat` takes an `onEnd` callback.
|
|
8
|
+
|
|
9
|
+
Combobox takes `autoHighlight`: typing highlights the first item the text keeps, so Enter chooses it, as Autocomplete's.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [[`18fd0ff`](https://github.com/fragiola/primitives/commit/18fd0ff180f8b7af9586db77b67b105281b89242)]:
|
|
14
|
+
- @fragiola/primitives@0.2.0
|
|
15
|
+
|
|
16
|
+
## 0.1.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [#86](https://github.com/fragiola/primitives/pull/86) [`6c9709d`](https://github.com/fragiola/primitives/commit/6c9709d93ecb80e5eeefd7b0ac5ef2399b02416d) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Calendar systems and time zones, computed in-house on `Intl`, natively in React, Vue and Angular. The toolkit gains `/calendar-systems`: the 13 systems of the catalog (`gregory`, `buddhist`, `japanese`, `roc`, `persian`, `indian`, `islamicCivil`, `islamicTbla`, `islamicUmalqura`, `hebrew`, `coptic`, `ethiopic`, `ethioaa`), one export each, with their fields, eras, leap months, month and year math and names. Every date component takes an injected `calendar` (`calendar={persian}`): the day calendars, pickers, month and year calendars and pickers, CalendarView and the date fields show and edit the system's months, years and eras (an editable era segment where the system has several, 13-month years); values stay ISO, and a month or year picker in a system submits its first day's ISO date with the RFC 9557 annotation (`2026-10-23[u-ca=persian]`). The toolkit gains `/time-zone`: `ZonedDateTime`, the offset lookup, instants, DST gaps and overlaps with Temporal's `disambiguation`, zoned math, RFC 9557 ISO text and `timeZone(id)`. DateField, DateRangeField, DatePickerInput and DateRangePickerInput take `timeZone`, `hideTimeZone` and `disambiguation`: zoned values, a time zone name segment, the typed wall time resolved in the zone, the zoned ISO text submitted. No component imports either entry, so an app that passes no calendar and no zone bundles none of their code.
|
|
21
|
+
|
|
22
|
+
- [#85](https://github.com/fragiola/primitives/pull/85) [`2fef26d`](https://github.com/fragiola/primitives/commit/2fef26d1c42933b683e234fc7eb6038199f46ee1) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The calendar variants, natively in React, Vue and Angular, each in its own entry. `/multiple-calendar` (`MultipleCalendar`, the Calendar's parts): several dates (`PlainDate[]`, sorted), a press or Enter / Space toggles a date, `maxSelected`, `aria-multiselectable`, one hidden input per date with `name`, form reset. `/calendar-preset` (`CalendarPreset`): a button that sets a Calendar's or RangeCalendar's value to a date, a range or a function of today (reason `item-press`), inline or in any picker (a typed picker's segments follow), `data-selected` while current, disabled when out of reach. `/month-calendar`, `/month-range-calendar`, `/year-calendar`, `/year-range-calendar`: APG grids of the 12 months of a year and of pages of 12 years, the calendar's keys mapped to them, `min`, `max`, `isUnavailable`, `columns`, a range mode, `PlainYearMonth` / `PlainYear` values. `/month-picker`, `/month-range-picker`, `/year-picker`, `/year-range-picker`: the DatePicker's parts with a month or year value, submitting `2026-11`, `2026-03/2026-06`, `2026`, `2020/2024`. `/calendar-view` (`CalendarView`: `Root`, `Trigger`): a calendar's day, month and year views, inline or in a picker's popup, the new view's focused cell taking the focus on each switch. The toolkit gains `/month-year` (the month and year values, the 12-item grid and its keys, their `Intl` names). Every existing entry is unchanged.
|
|
23
|
+
|
|
24
|
+
- [#67](https://github.com/fragiola/primitives/pull/67) [`7d8f3c3`](https://github.com/fragiola/primitives/commit/7d8f3c33d312b5244fb0d4eccafc7537a6088abd) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Collections, natively in React, Vue and Angular, each in its own entry. `/listbox` (`Root`, `Item`, `ItemIndicator`, `Group`, `GroupLabel`, `Separator`): the APG listbox that stays on the page, single or `multiple`, the APG's two selection models (`selectionBehavior`: `"toggle"`, where Space toggles and a move never selects, or `"replace"`, where the selection follows the focus and Ctrl moves without selecting), Shift and Ctrl ranges from the keyboard and the pointer, Ctrl+A to select all, the arrows along `orientation` (mirrored in RTL), Home, End, PageUp, PageDown and typeahead, `loopFocus`, focusable disabled options that are never selected, a roving tab stop on the first selected option, hidden inputs for native forms and the Field layer. `/autocomplete` (`Root`, `InputGroup`, `Input`, `Trigger`, `Clear`, `Value`, `Status`, `Portal`, `Positioner`, `Popup`, `Empty`, `List`, `Group`, `GroupLabel`, `Separator`, `Item`): a free-text input whose value is the text, with the APG's four autocomplete behaviours (`mode`: `list`, `both` and `inline` with the inline completion selected after the caret and accepted on blur, `none`), Combobox's built-in filtering (`filter`, `limit`, `locale`, groups), suggestions that may change as they load, `openOnInputClick`, `autoHighlight`, Escape that closes the list then clears the text, and the Input as the form control and the Field's. The toolkit gains `/selection`, the collections mechanism (`createListModel`, `applySelection`, `listKeyTarget`, `listPressSelection`, `pageTarget`), which only list collections import.
|
|
25
|
+
|
|
26
|
+
- [#111](https://github.com/fragiola/primitives/pull/111) [`349a6a2`](https://github.com/fragiola/primitives/commit/349a6a2aec56e0d5f69795cc08c953f94a7cc4cd) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The color controls, natively in React, Vue and Angular, each in its own entry, on the toolkit's new color model. `/color` (toolkit): an immutable `Color` (a plain object in `rgb`, `hsl` or `hsb`, with alpha), `parseColor` (hex, `rgb()`, `hsl()`, `hsb()`; `null` for anything else), `formatColor` (`hex`, `hexa`, the functions, `css`), `convertColor` with a fixed precision per channel (rgb whole numbers, hue, saturation, lightness and brightness to 2 decimals, alpha to 4; round trips unit-tested), the channels' ranges and steps, their `Intl` text, the CSS gradients of a track, an area and a wheel, and an area's and a wheel's keys and geometry. `/color-slider` (`ColorSlider`: `Root`, `Label`, `Output`, `Track`, `Thumb`): the APG slider on one channel, its track a gradient, RTL, vertical, a Field control submitting the color as hex. `/color-area` (`ColorArea`: `Root`, `Thumb`, `Input`): two channels on a 2D area as two APG sliders (one native range input per axis), the focus following the axis a key moved, pointer drag. `/color-wheel` (`ColorWheel`: `Root`, `Track`, `Thumb`): the hue on a ring, wrapping, its inner and outer radius. `/color-field` (`ColorField`: `Root`, `Input`): a hex textbox, or the APG spinbutton for one channel, committed on Enter and blur, a Field control. Only the color components import `/color`; every existing entry is unchanged.
|
|
27
|
+
|
|
28
|
+
- [#112](https://github.com/fragiola/primitives/pull/112) [`bdb079e`](https://github.com/fragiola/primitives/commit/bdb079e4f944166b6c21588e393cef6a3507b180) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The color pickers, natively in React, Vue and Angular, each in its own entry, completing the Color family. `/color-swatch` (`ColorSwatch`): a color over the recipe's checkerboard, an `img` named by the app (else by the color's CSS text). `/color-swatch-picker` (`ColorSwatchPicker`: `Root`, `Item`): the APG listbox of swatches laid out in rows, ArrowUp and ArrowDown moving between the rows, a Field control submitting the color as hex. `/color-picker` (`ColorPicker`: `Root`, `FormatSelect`, `EyeDropperTrigger`): one color shared with the ColorArea, ColorSlider, ColorWheel, ColorField, ColorSwatchPicker and ColorSwatch inside it (a control with its own `value` or `defaultValue` keeps its own state), a format switch converting the value to its space, the browser's eyedropper where `EyeDropper` exists, a Field control submitting the color as hex; it bundles no overlay code. `/color-picker-popover` (`ColorPickerPopover`: `Root`, `Trigger`, `Portal`, `Positioner`, `Popup`): its opt-in non-modal popup on Popover's overlay lifecycle. The four color controls read an enclosing picker. The toolkit adds `openEyeDropper` and `supportsEyeDropper` to `/color` and `rowTarget` to `/selection`. Every other entry is unchanged.
|
|
29
|
+
|
|
30
|
+
- [#113](https://github.com/fragiola/primitives/pull/113) [`ffc61ee`](https://github.com/fragiola/primitives/commit/ffc61ee937691c5440d719919d39f73f0a4a3fbe) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The command palette and the cascade select, natively in React, Vue and Angular, each in its own entry. `/command` (`Command`: `Root`, `Input`, `List`, `Item`, `Group`, `GroupLabel`, `Separator`, `Empty`, `Loading`): the APG combobox with a listbox that is always shown, the focus kept in the input (`aria-activedescendant`), built-in filtering by `commandScore` (substring and word prefix, an Item's `keywords`; `filter` replaces it, `null` turns it off), non-matching Items and empty Groups hidden, the best match highlighted as the text changes, Enter running the highlighted Item's `onSelect`, nested `pages` with Backspace on an empty input going back, `loading` with a busy list and the `Loading` and `Empty` live regions; a Command inside a Dialog opened by Ctrl/⌘+K is a documented composition, not a part. `/command-virtual` (`CommandVirtual.List`): the opt-in virtual list over an `items` array (10 000 items in the conformance suite), so `/command` bundles no `/virtual` code. `/cascade-select` (`CascadeSelect`: `Root`, `Trigger`, `Value`, `Portal`, `Positioner`, `Popup`, `Level`, `Item`, `ItemIndicator`): a select-only combobox whose popup holds one listbox per open level, ArrowRight and ArrowLeft opening and closing a level (swapped in RTL), typeahead per level, the value as the path of keys, `changeOnSelect` to choose a parent, levels opened on hover after a delay with Menu's safe triangle, a Field control submitting the path joined by `valueSeparator`. The toolkit gains `/command` (the scorer, `commandMatches`, `bestMatch`, `commandKeyTarget`) and `/cascade` (the levels of a path and `cascadeKeyAction`). Every other entry is unchanged.
|
|
31
|
+
|
|
32
|
+
- [#42](https://github.com/fragiola/primitives/pull/42) [`9a25db8`](https://github.com/fragiola/primitives/commit/9a25db8bbabbf9839df1d67c7b7d5609a9fc3da3) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Controls and display components, natively in React, Vue and Angular, each in its own entry. `/button`: a native `button` or a `render` element with `role="button"` and a native button's keys (`nativeButton`), `disabled` and `focusableWhenDisabled`. `/radio-group` and `/radio`: the APG radio group (one tab stop at the checked radio, arrows move and check, mirrored in RTL through the direction provider, `loopFocus`, `orientation`), hidden radio inputs (`name`, `required`, form reset) and Field support. `/switch`: the APG switch (`Root`, `Thumb`) with a hidden checkbox input, `uncheckedValue`, `required`, `readOnly` and Field support. `/progress`: a `progressbar` (`Root`, `Label`, `Value`, `Track`, `Indicator`), determinate or indeterminate (`value={null}`), `min`/`max`, `format`/`locale`, `data-progressing`/`data-complete`/`data-indeterminate` and the `--progress-indicator-size` variable. `/avatar`: `Root`, `Image` (rendered only once loaded, `onLoadingStatusChange`) and `Fallback` (`delay`). `/separator`: `role="separator"` with `aria-orientation`, or `decorative`. The toolkit gains `radioKeyTarget` (`/collection`), `progressValue` (`/range`) and a new `/image` entry (`watchImageStatus`).
|
|
33
|
+
|
|
34
|
+
- [#15](https://github.com/fragiola/primitives/pull/15) [`4a14f67`](https://github.com/fragiola/primitives/commit/4a14f670452fb8496e93f6a8da760db076368bb5) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Calendar, RangeCalendar, DatePicker and DateRangePicker, natively in React, Vue and Angular, one entry each (`/calendar`, `/range-calendar`, `/date-picker`, `/date-range-picker`) over shared modules: a month grid with the APG date grid's keyboard (Home and End by week, Page Up and Page Down by month, with Shift by year), `min`, `max`, unavailable dates, several visible months, the locale's names and first weekday from `Intl`, and plain `{ year, month, day }` dates with no time zone. A RangeCalendar previews the range being chosen and swaps a reversed one. The pickers are non-modal popups holding a bound calendar: they open on the value, close on a choice and return focus to the trigger (`data-popup-open` on it). Every part carries `data-primitives-part`, `calendar-*` or `range-calendar-*`, `date-picker-*` or `date-range-picker-*`, by its root.
|
|
35
|
+
|
|
36
|
+
- [#43](https://github.com/fragiola/primitives/pull/43) [`8b728c8`](https://github.com/fragiola/primitives/commit/8b728c80a53e76ce2182c395e181e24a8a67e5bd) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Disclosure components, natively in React, Vue and Angular, each in its own entry. `/collapsible` (`Root`, `Trigger`, `Panel`): the APG disclosure, `open`/`defaultOpen`, `disabled`, and a panel animatable in CSS with no layout jump: `--collapsible-panel-height`/`-width` are the content's size in pixels while it opens or closes (set before the transition starts) and `auto` at rest, with `data-starting-style`/`data-ending-style`; `keepMounted`, and `hiddenUntilFound` (`hidden="until-found"`: the browser's find-in-page opens a closed panel). `/accordion` (`Root`, `Item`, `Header`, `Trigger`, `Panel`): the APG accordion, `value`/`defaultValue` as an array, `multiple`, `disabled`, `orientation`, `loopFocus`, the arrows, Home and End between the enabled triggers (mirrored in RTL), and the same panel mechanics with `--accordion-panel-height`/`-width`. Tabs gains `data-activation-direction` (physical: `left`, `right`, `up`, `down`, `none`) on every part, panel enter and exit states (`data-starting-style`, `data-ending-style`, `inert` while exiting, with `keepMounted`), and the Indicator's physical variables `--active-tab-left`/`-right`/`-top`/`-bottom`/`-width`/`-height`. The toolkit gains `measurePanelSize`, `freezePanelSize`, `panelSizeVariables` and `watchBeforeMatch` (`/presence`), and `accordionKeyTarget`, `activationDirection` and `tabsIndicatorBox` (`/collection`).
|
|
37
|
+
|
|
38
|
+
- [#45](https://github.com/fragiola/primitives/pull/45) [`2cdeeb7`](https://github.com/fragiola/primitives/commit/2cdeeb753fb0af082792230a89e16b5014fd541b) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Drawer and NavigationMenu, natively in React, Vue and Angular, which complete stage 1. The toolkit gains the `/swipe` entry: `watchSwipe` (pointer and touch swipes that lock on an axis after 6 px, with pointer capture, scroll containment and a touch that does not scroll the page), `swipeRelease`, `swipeMovement`, `swipeProgress` and `resolveSnapPoints`; only Drawer imports it. New entry `/drawer`, built on Dialog's parts plus a `Content`: a modal panel at an edge (`swipeDirection`, `"down"` by default) dismissed by a swipe (the new reason `swipe`), with snap points (`snapPoints`, `snapPoint` / `defaultSnapPoint` / `onSnapPointChange`), nested drawers (`data-nested-drawer-open`, `--nested-drawers`), `data-swiping`, `data-swipe-direction`, `data-swipe-dismiss`, `data-expanded` and the variables `--drawer-swipe-movement-x`, `--drawer-swipe-movement-y`, `--drawer-snap-point-offset` and `--drawer-swipe-progress`, and a Drawer handle. New entry `/navigation-menu`: the APG disclosure navigation menu with Base UI's parts (Root, List, Item, Trigger, Icon, Content, Link, Portal, Backdrop, Positioner, Popup, Viewport, Arrow), hover and press opening with delays, the arrow keys between the items, the open key into a Content, one shared popup sized by the open Content (`--popup-width`, `--popup-height`, `--positioner-width`, `--positioner-height`), `data-activation-direction` on the Contents, and nested levels through the overlay tree.
|
|
39
|
+
|
|
40
|
+
- [#41](https://github.com/fragiola/primitives/pull/41) [`61ea9c0`](https://github.com/fragiola/primitives/commit/61ea9c01d64c76faeb14373afaddf31bf7152170) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The Field layer to production, natively in React, Vue and Angular. Field's `validate` may be async (the latest run wins, a value already validated is not validated again), `Field.Error`'s `match` takes a function of the validity, and `validationMode` defaults to the enclosing Form's. New entries `/fieldset` (a `fieldset` named by its Legend, disabling every Field inside it, nested ones too) and `/form` (a native form that validates every field on submission, blocks it and focuses the first invalid field, shows server `errors` on the fields they name and reports `onClearErrors`). Every form control is a Field control: CheckboxGroup joins Checkbox, Select, Slider and Combobox, and the DatePicker and DateRangePicker gain form support (`name`, a visually hidden input with ISO dates, the range as `start/end`, `required`, `disabled`, `readOnly`, form reset). Slider gains `Label`, `Value` (an `<output>`), `format` and `locale` (Angular's value type is now `SliderRootValue`, `SliderValue` being the new directive). New entries `/direction` (`DirectionProvider` and `useDirection` / `injectDirection` / `provideDirection`, read by Tabs, Slider, Menu, Combobox's chips, the calendars and every positioned popup, with the computed direction as fallback) and `/render` (React's `useRender` and `mergeProps`, Vue's `renderPart`, `asProp` and `stateAttributes`, Angular's `dataValue` and `dataValues`). The toolkit's form entry gains `createFieldValidator`, the Form's errors and submission guard; a form bridge now focuses only the first invalid control's primitive; `getDirection` and `anchorFloating` take a provided direction.
|
|
41
|
+
|
|
42
|
+
- [#114](https://github.com/fragiola/primitives/pull/114) [`a875764`](https://github.com/fragiola/primitives/commit/a87576477ac4c06f476a23f9591b244a89addf5e) Thanks [@maurodesouza](https://github.com/maurodesouza)! - DropZone and FileUpload, natively in React, Vue and Angular, each in its own entry. `/drop-zone` (`DropZone.Root`): a drop target for files (native file drag only), an APG button that opens the browser's file dialog on Enter, Space or a click and takes a paste of files (Ctrl/⌘+V), `accept` filtering into accepted and rejected files, `multiple`, `disabled`, `data-drop-target` while files are dragged over it, and a polite live region the app's `announcement` text is written into. `/file-upload` (`FileUpload`: `Root`, `Label`, `Dropzone`, `Trigger`, `HiddenInput`, `ItemGroup`, `Item`, `ItemName`, `ItemSizeText`, `ItemPreview`, `ItemPreviewImage`, `ItemDeleteTrigger`, `ClearTrigger`): a form control holding the accepted files (`value`), checked by `accept`, `maxFiles`, `minFileSize`, `maxFileSize` and `validate` into a rejected list with its reasons (`invalid-type`, `too-large`, `too-small`, `too-many`, the app's own), sizes in the locale's decimal bytes from `Intl.NumberFormat`, image previews through object URLs revoked when they unmount, the focus moved on when an Item is deleted, and a Field control whose files reach the native form through its hidden file input (assigned with a `DataTransfer`), `required` and form reset included; no upload transport. The toolkit gains `/file` (`watchFileDrop`, `openFileDialog`, `acceptsFile`, `acceptFiles`, `checkFiles`, `formatFileSize`, `assignFiles`). Every other entry is unchanged.
|
|
43
|
+
|
|
44
|
+
- [#12](https://github.com/fragiola/primitives/pull/12) [`adcfc42`](https://github.com/fragiola/primitives/commit/adcfc421cdda72b2ff8c91943b43fd3dd4ebb48e) Thanks [@maurodesouza](https://github.com/maurodesouza)! - First version: the framework-free DOM toolkit (`@fragiola/primitives`, one entry per mechanism) and Dialog and Tabs, natively in React, Vue and Angular, one entry per component.
|
|
45
|
+
|
|
46
|
+
- [#14](https://github.com/fragiola/primitives/pull/14) [`7c154f1`](https://github.com/fragiola/primitives/commit/7c154f169d3febbfb10228345e9822f8f25e33f6) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Field, Checkbox, CheckboxGroup, Slider, Select and Combobox, natively in React, Vue and Angular, one entry each (`/field`, `/checkbox`, `/checkbox-group`, `/slider`, `/select`, `/combobox`), with form support: hidden inputs, native submit, reset and validation, and the Field layer. Select keeps DOM focus on its trigger with `aria-activedescendant`, Tab chooses the highlighted option, a printable key on the closed trigger opens the list on the match, and a `modal` option (non-modal by default) locks the scroll and blocks the outside pointer. Combobox filters its `items`, takes object values and `multiple` with chips, and resets its text on Escape. The toolkit's collection entry gains `scrollIntoViewWithin`.
|
|
47
|
+
|
|
48
|
+
- [#40](https://github.com/fragiola/primitives/pull/40) [`aa1fee3`](https://github.com/fragiola/primitives/commit/aa1fee3ac90fd1965446e77ab7bc4227ad08e9cb) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Hardening: the Stage 0 follow-ups and server rendering. Angular's overlays play their exit transition before they unmount, as React's and Vue's, and can be reopened during it; Angular's Tabs Indicator is structural (`*tabsIndicator`), not rendered while no tab is selected. A close made through a controlled `open` uses its own reason for the focus return (a Popover returns focus left inside it); a Tooltip.Provider keeps one delay group when its props change and reads `timeout` reactively; a key on an open Menu trigger leaves no pending highlight; Escape cancels a RangeCalendar's started range before an enclosing picker, dialog or popover closes; Vue decides a calendar's picker binding from its current props, and types the Combobox callbacks by the consumer's own item (`ComboboxFilter`, `ComboboxItemEquality`, `ComboboxItemToString`). Every component renders on the server and hydrates without a mismatch: a calendar with no `locale` renders `en-US` first and takes the document's language once mounted, Angular's ids come from an application's own counter, Angular's hidden inputs are added after hydration, and the Tabs Indicator's `renderBeforeHydration` places it before hydration with an inline script (the toolkit's `placeTabsIndicator`). The toolkit's `createDelayGroup` takes a `timeout` getter, `interceptEscape` a `when` filter, and an overlay session returns focus left inside a closing overlay for its `whenUnfocused` reasons.
|
|
49
|
+
|
|
50
|
+
- [#66](https://github.com/fragiola/primitives/pull/66) [`ff00fb9`](https://github.com/fragiola/primitives/commit/ff00fb90318d343d4ad3bbc2066a4d69278a8016) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Inputs, natively in React, Vue and Angular, each in its own entry. `/label`: a standalone `<label>` that names its control by `for` or by wrapping it, focuses a target `for` cannot label (a Slider's thumb) and selects no text on a double press. `/number-field` (`Root`, `Group`, `Input`, `Increment`, `Decrement`, `ScrubArea`, `ScrubAreaCursor`): the APG spinbutton, a number or `null` with `min`, `max`, `step`, `smallStep`, `largeStep`, `snapOnStep` and `clampOnBlur`, the arrows, Page Up/Down, Home and End, held buttons that repeat, an opt-in wheel (`allowWheelScrub`), a scrub area under the pointer lock with its virtual cursor, `format` and `locale` through `Intl.NumberFormat` with the localized text read back (grouping, decimal separators, Arabic-Indic digits, currency and percent), a hidden number input for native forms and the Field layer. `/meter`: the APG meter (`Root`, `Label`, `Value`, `Track`, `Indicator`), its value written by `format`/`locale`. `/otp-field` (`Root`, `Input`): one native input per slot in a named group with one tab stop, typing forward, Backspace back, Delete, the arrows (mirrored in RTL), paste and one-time-code autofill, `length`, `validationType` (digits, letters, both, any, or a `RegExp`), `mask`, `onValueComplete`, `onValueInvalid`, a hidden input whose pattern refuses an incomplete code, and the Field layer. The toolkit gains `/number` (`formatNumber`, `parseNumber`, `isNumberText`, `stepNumber`, `clampNumber`, `watchAutoRepeat`, `watchScrub`), and `/form` a Label's press and the OTP value rules.
|
|
51
|
+
|
|
52
|
+
- [#110](https://github.com/fragiola/primitives/pull/110) [`b3f9578`](https://github.com/fragiola/primitives/commit/b3f9578876189f63946779be36cd0377a094455c) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Navigation, natively in React, Vue and Angular, each in its own entry. `/link` (`Link`): the APG link on your anchor or your router's link (React `render`, Vue `as`, Angular on `routerLink`'s anchor), `current` (`aria-current="page"`) and `disabled` (`aria-disabled`, still a tab stop, its click stopped in its capture phase so no router navigates); no router dependency. `/breadcrumbs` (`Breadcrumbs`: `Root`, `List`, `Item`, `Link`, `Current`, `Separator`, `Ellipsis`): the APG breadcrumb, a named `nav` of an ordered list, separators hidden from assistive technology, an Ellipsis you compose with a Menu's trigger. `/steps` (`Steps`: `Root`, `List`, `Item`, `Trigger`, `Indicator`, `Separator`, `Content`, `PrevTrigger`, `NextTrigger`, `CompletedContent`): a process in `count` steps, an ordered list with `aria-current="step"`, `step` / `defaultStep` / `onStepChange` (reasons `trigger-press`, `previous-press`, `next-press`), the completed state at `count`, `linear` with `isStepValid`, `orientation`. `/carousel` (`Carousel`: `Root`, `ItemGroup`, `Item`, `PrevTrigger`, `NextTrigger`, `IndicatorGroup`, `Indicator`, `AutoplayTrigger`): the APG carousel, basic or tabbed (`variant`), native CSS scroll snapping, `slidesPerPage`, `slidesPerMove`, `loop`, `orientation`, `spacing`, a mouse drag, `page` and `playing` controlled or not, a rotation every `delay` that focus entering stops and a hover pauses (keeping the time it had left), `aria-live` off while rotating, RTL. Two new change reasons, `autoplay` and `focus-in`. The toolkit gains `/carousel` (the pages, the scroll to a page and the page a scroll settled on, the mouse drag, the hover and focus watch and the rotation's delay). Every existing component entry is unchanged.
|
|
53
|
+
|
|
54
|
+
- [#44](https://github.com/fragiola/primitives/pull/44) [`28add86`](https://github.com/fragiola/primitives/commit/28add86384c2f734c36a3c7d6a30c203b540379c) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Overlays to production, natively in React, Vue and Angular. A tree of nested overlays: an overlay opened from another one's popup is its child, so outside presses, Escape, focus traps and focus-out watches work across a Popover inside a Dialog, menus opened from popovers, and portals, and closing an overlay closes the ones opened from it (the toolkit's `/layers`: `owner`, `backdrops`, `onParentClose`). Every overlay's `onOpenChange` receives `OpenChangeDetails` (`reason`, the new `imperative-action` reason, `event`, `trigger`, `cancel()`, `isCanceled`, `preventUnmountOnClose()`), and every overlay gains `onOpenChangeComplete`, imperative actions (`close()`, `unmount()`: React `actionsRef`, Vue the Root's template ref, Angular the root directive), the Portal's `keepMounted` and `data-closed`. Detached triggers for Dialog, AlertDialog, Popover, Menu and Tooltip: `createHandle()` (`create<Component>Handle`), triggers anywhere with `handle`, `payload` and `id`, the active trigger's payload in the Root's content, `triggerId` / `defaultTriggerId`, and the handle's `open`, `openWithPayload`, `close` and `isOpen`. Dialog gains a `Viewport` part, `data-nested`, `data-nested-dialog-open`, `--nested-dialogs` and Backdrop `forceRender`. New entries `/alert-dialog` (`role="alertdialog"`, no outside dismissal, focus on the least destructive action, built on Dialog's parts) and `/context-menu` (right-click at the pointer, a 500 ms touch long press, Shift+F10 and the ContextMenu key, built on Menu's parts). Menu gains `CheckboxItem`, `CheckboxItemIndicator`, `RadioGroup`, `RadioItem` and `RadioItemIndicator`; Select gains `Group`, `GroupLabel`, `Separator`, `ItemText` and an optional `items`. The toolkit gains `virtualAnchor` (`/positioning`), `watchLongPress` (`/pointer`) and `trapFocus`'s `holdOutsidePress` (`/focus`); `anchorFloating` no longer flips a top or bottom placement's start and end twice in RTL. The Angular portal no longer reads `document` on a server.
|
|
55
|
+
|
|
56
|
+
- [#13](https://github.com/fragiola/primitives/pull/13) [`d5fc5e5`](https://github.com/fragiola/primitives/commit/d5fc5e5ebd5ce18cd7ff58496afd52141befd07e) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Popover, Tooltip and Menu (with submenus), natively in React, Vue and Angular, one entry each (`/popover`, `/tooltip`, `/menu`). Popover focuses its first tabbable element and, after a press outside, returns focus to its trigger unless the press focused something; Tooltip wires `role="tooltip"` and `aria-describedby` and stays open while hovered; Menu is non-modal by default with a `modal` option. The toolkit's sides follow Base UI: `top`, `bottom`, `inline-start`, `inline-end`, `left`, `right`.
|
|
57
|
+
|
|
58
|
+
- [#84](https://github.com/fragiola/primitives/pull/84) [`d1a01e5`](https://github.com/fragiola/primitives/commit/d1a01e5d543c42bb45253c119d7d643ea91e72bc) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Range fields and the pickers' typed input, natively in React, Vue and Angular, each in its own entry. `/date-range-field` (`Root`, `Input` with a required `range`, `"start"` or `"end"`, `Segment`): a start and an end date (or date and time) typed in segments, each an APG spinbutton, as one sequence (typing moves on into the end, Backspace and the arrows cross back), a `DateRange` value once both ends are complete, an end before the start invalid through the hidden inputs' crossed `min` / `max` (`rangeOverflow` / `rangeUnderflow`), `startName` and `endName`, `min`, `max`, `isDateUnavailable`, `granularity`, `required`, `readOnly`, `disabled`, form reset and Field support. `/time-range-field`: the same over a `TimeRange` (no range across midnight). `/date-picker-input` (`DatePickerInput`: `Root`, `Segments`, `Segment`) and `/date-range-picker-input` (`DateRangePickerInput`): opt-in roots that replace the picker's Root and add DateField segments beside its Trigger, bound both ways (a typed entry sets the value only when complete and valid, a chosen date fills the segments, a time granularity's calendar chooses the date part and keeps the typed time), with the picker's form and the segments as the Field control; `/date-picker` and `/date-range-picker` are unchanged. The toolkit's `segmentTarget` moves across several groups, and `/time` gains the `TimeRange` type.
|
|
59
|
+
|
|
60
|
+
- [#70](https://github.com/fragiola/primitives/pull/70) [`0446ffb`](https://github.com/fragiola/primitives/commit/0446ffb8b82dfa6b76016c33e7a11df06feee7f8) Thanks [@maurodesouza](https://github.com/maurodesouza)! - ScrollArea, Pagination and AspectRatio, natively in React, Vue and Angular, each in its own entry, completing stage 2. `/scroll-area` (`Root`, `Viewport`, `Content`, `Scrollbar`, `Thumb`, `Corner`): native scrolling (keyboard, wheel, touch) with custom scrollbars whose thumb drags and whose track takes a press, a scrollbar rendered only while its axis overflows (`keepMounted`), `data-scrolling`, `data-hovering`, the overflow attributes (`data-has-overflow-*`, `data-overflow-{x,y}-{start,end}`, logical in RTL, `overflowEdgeThreshold`) and the `--scroll-area-overflow-*`, `--scroll-area-thumb-*` and `--scroll-area-corner-*` variables, and a viewport tab stop only while it overflows with nothing focusable in it. `/pagination` (`Root`, `Item`, `Ellipsis`, `Previous`, `Next`, `First`, `Last`): a `nav` landmark with `page`/`defaultPage`/`onPageChange`, `count` or `total` and `pageSize`, `siblingCount`, `boundaryCount`, `aria-current="page"`, buttons or links (`nativeButton`), disabled edges. `/aspect-ratio`: one box at a `ratio`. The toolkit gains `/scroll-area` (`createScrollArea`, the scroll area's measurement and pointer) and `/pagination` (`paginationRange`, `pageCount`, `clampPage`), which only these components import.
|
|
61
|
+
|
|
62
|
+
- [#83](https://github.com/fragiola/primitives/pull/83) [`22f6eb0`](https://github.com/fragiola/primitives/commit/22f6eb0a8422ab98c7ab17423d5cbbe556c4b7c0) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Segmented date and time fields, natively in React, Vue and Angular, each in its own entry. `/date-field` (`Root`, `Input`, `Segment`): a date typed in segments, each an APG spinbutton, in the order, digits and names `Intl` gives the locale; digits fill a segment and move on, the arrows step it with a wrap, Page Up/Down by a larger step, Home and End to its edges, ArrowLeft and ArrowRight to the segment on that side of the screen, Backspace erases; `granularity` (`day`, or `hour`, `minute`, `second` for a `PlainDateTime`), `placeholderValue`, `hourCycle`, `min`, `max`, `isDateUnavailable` (invalid values carry `data-invalid`), `locale`, a hidden native `date` or `datetime-local` input for forms, and the Field layer. `/time-field`: the same anatomy over a `PlainTime`, with the locale's hour cycle and the day period typed by its first letter, submitting an ISO time. The toolkit gains `/time` (`PlainTime`, `PlainDateTime`, their comparison, math and ISO text) and `/segments` (the segment editing on `Intl.DateTimeFormat#formatToParts`), written in-house with no date library; only the two fields import them.
|
|
63
|
+
|
|
64
|
+
- [#108](https://github.com/fragiola/primitives/pull/108) [`2f1dc46`](https://github.com/fragiola/primitives/commit/2f1dc468857df4cfacc689463cbc68953fa94b60) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Tags, natively in React, Vue and Angular, each in its own entry. `/tag-group` (`Root`, `Label`, `List`, `Tag`, `TagCell`, `RemoveButton`): React Aria's grid of tags (a `grid` of `row`s with one `gridcell` each, a `group` while empty), one tab stop, the arrows of both axes (mirrored in RTL), Home and End, `loopFocus`, `selectionMode` `none`, `single` or `multiple` (Space, Enter, a press), `disabledKeys` and disabled tags that never take focus, `onRemove` from Delete, Backspace or a RemoveButton with the focus moved to the next tag, else the previous one, else the List, `data-empty`, and the Field layer's label and description. `/tags-input` (`Root`, `Control`, `Input`, `Tag`, `TagText`, `TagRemove`, `TagInput`, `ClearTrigger`): a text input whose Enter, `delimiter` and pasted lists add trimmed tags, refused as duplicates (unless `allowDuplicates`), past `max` or by `validate` (`onValueInvalid` with its `cause`), the tags reached with Backspace and the arrows and removed with Backspace or Delete, `editable` tags edited in place, `blurBehavior` (`"add"`, `"clear"`), a controlled text (`inputValue`), one hidden input per tag for native forms (submit, reset, `required`) and the Field layer. The toolkit gains the tags' keys in `/collection` (`tagGroupKeyTarget`, `removalFocusIndex`, `tagsInputInputKeyTarget`, `tagsInputTagKeyTarget`) and their rules in `/form` (`takeTags`, `editTag`, `typesDelimiter`). Every existing entry is unchanged. Choices, in their own entries too. `/segmented-control` (`Root`, `Item`, `ItemText`, `Indicator`): the APG radio group (a `radiogroup` of `radio` Items, one tab stop, every arrow moves and checks, RTL, `loopFocus`, `orientation`, disabled Items skipped) with an Indicator whose ten `--segment-indicator-*` variables (logical and physical, from the Root's padding box) follow the checked Item on a value change, a resize and the direction, `renderBeforeHydration` and `nonce` as Tabs', a hidden input for native forms (submit, reset, `required`) and the Field layer. `/rating` (`Root`, `Item`, `HiddenInput`): the APG's rating radio group (a `radio` per star, named by the app), `count`, `allowHalf` (half steps by the keys and by the inline-start half of a star, RTL included), `allowClear`, `readOnly`, `disabled`, a pointer preview (`highlighted`, `half`), arrows stepping the value with Home and End, the Root's and the Item's children functions, native forms and the Field layer. The toolkit gains `segmentIndicatorBox` and `placeSegmentIndicator` in `/collection` and `ratingKeyTarget`, `ratingValueAt` and `ratingItemState` in `/range`.
|
|
65
|
+
|
|
66
|
+
- [#109](https://github.com/fragiola/primitives/pull/109) [`dc21e7c`](https://github.com/fragiola/primitives/commit/dc21e7c678aad87c99b8129ca705a7a5775763b3) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Text inputs, natively in React, Vue and Angular, each in its own entry. `/password-input` (`Root`, `Input`, `VisibilityTrigger`): a native input whose `type` switches between `password` and `text`, `visible`, `defaultVisible` and `onVisibleChange`, the trigger an APG toggle button (`aria-pressed`, `aria-controls`) whose pointer press keeps the focus in the Input and whose change keeps its selection, the text hidden again on a form submission and reset, `autoComplete` and every attribute passed through, native forms and the Field layer. `/search-field` (`Root`, `Input`, `ClearButton`): React Aria's search field, `type="search"`, Escape clearing a query and left to the page on an empty field, Enter calling `onSubmit` (Angular `(valueSubmit)`), a ClearButton out of the tab order that focuses the Input, native forms and the Field layer. `/clipboard` (`Root`, `Trigger`, `Indicator`, `Input`): a copy with the asynchronous Clipboard API, `timeout`, `onStatusChange` (`idle`, `copied`, `failed`), a polite live region with the app's `announcement` and `failedAnnouncement`, and on a refused write the Input focused with its text selected (no `execCommand` fallback). `/editable` (`Root`, `Area`, `Preview`, `Input`, `EditTrigger`, `SubmitTrigger`, `CancelTrigger`): a text edited in place, `activationMode` (`focus`, `click`, `dblclick`, `none`), `submitMode` (`enter`, `blur`, `both`, `none`), `onValueCommit` and `onValueRevert`, Escape reverting, the focus returned to the EditTrigger or the Preview, `placeholder`, `maxLength`, `readOnly`, `disabled`, an `input` or a `textarea`, native forms and the Field layer. The change reasons gain `submit-press` and `cancel-press`. The toolkit gains `/clipboard` (`writeClipboard`, `announceText`). Every existing entry is unchanged.
|
|
67
|
+
|
|
68
|
+
- [#69](https://github.com/fragiola/primitives/pull/69) [`da38200`](https://github.com/fragiola/primitives/commit/da382005a845e55717d493aff43ebaa6797f4c59) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Toast and HoverCard, natively in React, Vue and Angular, each in its own entry (`/toast`, `/hover-card`). Toast renders a toast queue that lives outside every framework: `createToastManager` (also from each `/toast` entry) holds the app's notifications, so a plain module can import it and add toasts with no component, with `add`, `update`, `close`, promise toasts (loading, then success or error), a `limit` with the rest queued (their timers wait), priorities, per-toast timeouts and pauses while hovered, focused or the page is hidden. Its Viewport is an F6 landmark with two live regions (polite and assertive) that announce each toast once, in order; its Root swipes away through the toolkit's `/swipe`, stacks with `--toast-index`, `--toast-offset-y` and `--toast-height`, and exits through presence (React `Toast.useToastManager`, Vue `useToastManager`, Angular `injectToastManager`). HoverCard (Base UI's PreviewCard) previews a link on hover and keyboard focus after `delay`, stays open while hovered across a safe area, closes after `closeDelay`, Escape or an outside press, never moves focus, and has detached triggers and the overlay lifecycle. The toolkit gains `/toast` (`createToastManager`, `watchToastViewport`, `measureToastHeight`); no new dependency.
|
|
69
|
+
|
|
70
|
+
- [#65](https://github.com/fragiola/primitives/pull/65) [`8ec7b25`](https://github.com/fragiola/primitives/commit/8ec7b252198cd52289e48d845721a6ce6c5532f4) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Toggles and bars, natively in React, Vue and Angular, each in its own entry. `/toggle`: a pressed button (`aria-pressed`, `data-pressed`), `pressed`/`defaultPressed`/`onPressedChange`, `value` for a group, `disabled`, on Button's behaviour (`nativeButton`). `/toggle-group`: single or `multiple` (the value is always an array of strings), `orientation`, `loopFocus`, `disabled`, one tab stop with the orientation's arrows (mirrored in RTL), Home and End. `/toolbar` (`Root`, `Button`, `Link`, `Input`, `Group`, `Separator`): the APG toolbar, one tab stop for the whole bar, the arrows, Home and End between its items, `orientation`, `loopFocus`, disabled items skipped unless `focusableWhenDisabled`; a ToggleGroup inside it joins its roving focus with no tab stop of its own, and an `Input` keeps its caret keys. `/menubar`: the APG menubar on Menu (its menus are `Menu.Root`s, their triggers the bar's items), one tab stop, the arrows moving between menus and opening the neighbour's while one is open, Down/Up/Enter/Space opening on the first or last item, hover switching once a menu is open, Escape back to the item, submenus and checkable items, `orientation`, `loopFocus`, `modal`, `disabled`, RTL. The toolkit gains the roving focus in `/collection` (`rovingKeyTarget`, `rovingKeys`, `rovingTabStop`, `textFieldKeepsKey`, `inDocumentOrder`).
|
|
71
|
+
|
|
72
|
+
- [#68](https://github.com/fragiola/primitives/pull/68) [`0b436f9`](https://github.com/fragiola/primitives/commit/0b436f9aa9ecf0caeb960998ea42aa672dac396e) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Virtual and async lists, natively in React, Vue and Angular, each an opt-in entry of its own, so a Listbox, Select, Combobox or Autocomplete that does not use them ships the same code. `/listbox-virtual` (`ListboxVirtual.Root` over `items`), `/select-virtual`, `/combobox-virtual` and `/autocomplete-virtual` (a `List` that replaces the component's List) render only the options in view of a list of thousands, with measured or fixed sizes (`itemSize`, `measure`), `overscan`, the keys, the typeahead, ranges and select all over every item, `aria-activedescendant` and the tab stop always on a rendered option, `aria-setsize` and `aria-posinset` on every option, `loading` (`data-loading`, `aria-busy`) and `onLoadMore` when the last row comes into view (Angular: a row directive per component and `loadMore`). `/async-list` (`useAsyncList`, Angular `injectAsyncList`) loads pages through a loader, with the filter text, load more, the loading and error states and a stale load aborted. The toolkit gains `/virtual` (`createVirtualizer`, `virtualLayout`, `pageIndex`, `scrollContainer`: written in-house, no new dependency) and `/async-list` (`createAsyncList`).
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- [#107](https://github.com/fragiola/primitives/pull/107) [`aa1ac78`](https://github.com/fragiola/primitives/commit/aa1ac78d75e4a0cf425e750a370c88f6afcecc53) Thanks [@maurodesouza](https://github.com/maurodesouza)! - The date family is smaller for an app that passes no `calendar` and no `timeZone`, with no behaviour change: the calendar systems and time zones carry the code they change, and the shared calendar, field and segment code calls one optional hook per concern. `/segments` is 427 B (min + gzip) smaller than after the calendar systems, every segmented field about 400 B, the React and Vue month and year pickers about 550 B, CalendarView about 300 B. `CalendarSystem` gains its segment hooks (`segmentFormat`, `segmentRange`, `segmentSample`, `segmentValuesOf`, `segmentsToDate`), `CalendarUnits` gains `page`, `today` and `nearest`, `TimeZone` gains `choose`, `wallTime`, `segmentOptions`, `segmentText` and `segmentsToDateTime`. Angular's `/month-calendar` no longer exports `ISO_UNITS` (use `unitsOf`). `pnpm size` budgets every date entry (`docs/size.md`, "Date budgets").
|
|
77
|
+
|
|
78
|
+
- [#65](https://github.com/fragiola/primitives/pull/65) [`8ccbff9`](https://github.com/fragiola/primitives/commit/8ccbff9b67b1664fd862942d5d11e8c9eaec5643) Thanks [@maurodesouza](https://github.com/maurodesouza)! - Stage 1 follow-ups. A Checkbox writes its rendered state back onto its hidden input after a form reset, so a controlled checkbox that refuses the reset keeps a matching input. The Tabs Indicator takes a `nonce` for its `renderBeforeHydration` script (Angular: `*tabsIndicator="true; nonce: cspNonce"`, else Angular's `CSP_NONCE`), so it runs under a Content Security Policy. An async `validate` in a mode that does not validate on change hides a shown error at once on a change. In a native form that mixes a picker and native controls, the browser no longer moves the focus on to a later invalid native control after the picker's trigger took it (the toolkit's form bridge). A calendar with no `locale` follows a later change of the document's `lang` (the toolkit's `watchDocumentLanguage`). A hover-opened Tooltip and NavigationMenu panel close when the pointer leaves the window or the iframe at once (the toolkit's `watchPointerExit`).
|
|
79
|
+
- Updated dependencies [[`6c9709d`](https://github.com/fragiola/primitives/commit/6c9709d93ecb80e5eeefd7b0ac5ef2399b02416d), [`2fef26d`](https://github.com/fragiola/primitives/commit/2fef26d1c42933b683e234fc7eb6038199f46ee1), [`7d8f3c3`](https://github.com/fragiola/primitives/commit/7d8f3c33d312b5244fb0d4eccafc7537a6088abd), [`349a6a2`](https://github.com/fragiola/primitives/commit/349a6a2aec56e0d5f69795cc08c953f94a7cc4cd), [`bdb079e`](https://github.com/fragiola/primitives/commit/bdb079e4f944166b6c21588e393cef6a3507b180), [`ffc61ee`](https://github.com/fragiola/primitives/commit/ffc61ee937691c5440d719919d39f73f0a4a3fbe), [`9a25db8`](https://github.com/fragiola/primitives/commit/9a25db8bbabbf9839df1d67c7b7d5609a9fc3da3), [`aa1ac78`](https://github.com/fragiola/primitives/commit/aa1ac78d75e4a0cf425e750a370c88f6afcecc53), [`8b728c8`](https://github.com/fragiola/primitives/commit/8b728c80a53e76ce2182c395e181e24a8a67e5bd), [`2cdeeb7`](https://github.com/fragiola/primitives/commit/2cdeeb753fb0af082792230a89e16b5014fd541b), [`61ea9c0`](https://github.com/fragiola/primitives/commit/61ea9c01d64c76faeb14373afaddf31bf7152170), [`a875764`](https://github.com/fragiola/primitives/commit/a87576477ac4c06f476a23f9591b244a89addf5e), [`adcfc42`](https://github.com/fragiola/primitives/commit/adcfc421cdda72b2ff8c91943b43fd3dd4ebb48e), [`7c154f1`](https://github.com/fragiola/primitives/commit/7c154f169d3febbfb10228345e9822f8f25e33f6), [`aa1fee3`](https://github.com/fragiola/primitives/commit/aa1fee3ac90fd1965446e77ab7bc4227ad08e9cb), [`ff00fb9`](https://github.com/fragiola/primitives/commit/ff00fb90318d343d4ad3bbc2066a4d69278a8016), [`b3f9578`](https://github.com/fragiola/primitives/commit/b3f9578876189f63946779be36cd0377a094455c), [`28add86`](https://github.com/fragiola/primitives/commit/28add86384c2f734c36a3c7d6a30c203b540379c), [`d5fc5e5`](https://github.com/fragiola/primitives/commit/d5fc5e5ebd5ce18cd7ff58496afd52141befd07e), [`d1a01e5`](https://github.com/fragiola/primitives/commit/d1a01e5d543c42bb45253c119d7d643ea91e72bc), [`0446ffb`](https://github.com/fragiola/primitives/commit/0446ffb8b82dfa6b76016c33e7a11df06feee7f8), [`22f6eb0`](https://github.com/fragiola/primitives/commit/22f6eb0a8422ab98c7ab17423d5cbbe556c4b7c0), [`8ccbff9`](https://github.com/fragiola/primitives/commit/8ccbff9b67b1664fd862942d5d11e8c9eaec5643), [`2f1dc46`](https://github.com/fragiola/primitives/commit/2f1dc468857df4cfacc689463cbc68953fa94b60), [`dc21e7c`](https://github.com/fragiola/primitives/commit/dc21e7c678aad87c99b8129ca705a7a5775763b3), [`da38200`](https://github.com/fragiola/primitives/commit/da382005a845e55717d493aff43ebaa6797f4c59), [`8ec7b25`](https://github.com/fragiola/primitives/commit/8ec7b252198cd52289e48d845721a6ce6c5532f4), [`0b436f9`](https://github.com/fragiola/primitives/commit/0b436f9aa9ecf0caeb960998ea42aa672dac396e)]:
|
|
80
|
+
- @fragiola/primitives@0.1.0
|
|
@@ -17,6 +17,10 @@ var ComboboxRoot = class ComboboxRoot {
|
|
|
17
17
|
...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
|
|
18
18
|
transform: booleanAttribute
|
|
19
19
|
});
|
|
20
|
+
this.autoHighlight = input(false, {
|
|
21
|
+
...ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {},
|
|
22
|
+
transform: booleanAttribute
|
|
23
|
+
});
|
|
20
24
|
this.open = input(void 0, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
21
25
|
this.openChange = output();
|
|
22
26
|
this.defaultOpen = input(false, ...ngDevMode ? [{ debugName: "defaultOpen" }] : /* istanbul ignore next */ []);
|
|
@@ -326,6 +330,13 @@ var ComboboxRoot = class ComboboxRoot {
|
|
|
326
330
|
isRequired: false,
|
|
327
331
|
transformFunction: null
|
|
328
332
|
},
|
|
333
|
+
autoHighlight: {
|
|
334
|
+
classPropertyName: "autoHighlight",
|
|
335
|
+
publicName: "autoHighlight",
|
|
336
|
+
isSignal: true,
|
|
337
|
+
isRequired: false,
|
|
338
|
+
transformFunction: null
|
|
339
|
+
},
|
|
329
340
|
open: {
|
|
330
341
|
classPropertyName: "open",
|
|
331
342
|
publicName: "open",
|
|
@@ -479,6 +490,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
479
490
|
required: false
|
|
480
491
|
}]
|
|
481
492
|
}],
|
|
493
|
+
autoHighlight: [{
|
|
494
|
+
type: i0.Input,
|
|
495
|
+
args: [{
|
|
496
|
+
isSignal: true,
|
|
497
|
+
alias: "autoHighlight",
|
|
498
|
+
required: false
|
|
499
|
+
}]
|
|
500
|
+
}],
|
|
482
501
|
open: [{
|
|
483
502
|
type: i0.Input,
|
|
484
503
|
args: [{
|
|
@@ -1062,7 +1081,7 @@ var ComboboxInput = class ComboboxInput {
|
|
|
1062
1081
|
root.setInputValue(this.input.value, "input-change");
|
|
1063
1082
|
root.highlighted.set(null);
|
|
1064
1083
|
root.markTyped();
|
|
1065
|
-
root.pendingHighlight.set(null);
|
|
1084
|
+
root.pendingHighlight.set(root.autoHighlight() && this.input.value !== "" ? "typed" : null);
|
|
1066
1085
|
if (!root.overlay.open()) root.setOpen(true, "input-change");
|
|
1067
1086
|
this.flush();
|
|
1068
1087
|
if (this.input.value !== root.inputValue()) this.input.value = root.inputValue();
|
|
@@ -1506,6 +1525,10 @@ var ComboboxList = class ComboboxList {
|
|
|
1506
1525
|
if (!root.itemsRegistered()) return;
|
|
1507
1526
|
root.pendingHighlight.set(null);
|
|
1508
1527
|
const items = root.orderedItems();
|
|
1528
|
+
if (pending === "typed") {
|
|
1529
|
+
root.highlighted.set(items[0]?.id ?? null);
|
|
1530
|
+
return;
|
|
1531
|
+
}
|
|
1509
1532
|
const selected = root.multiple() ? void 0 : items.find((item) => root.isSelected(item.value));
|
|
1510
1533
|
const edge = pending === "first" ? items[0] : items.at(-1);
|
|
1511
1534
|
const target = selected ?? (pending === "selected" ? void 0 : edge);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragiola-primitives-angular-combobox.mjs","names":[],"sources":["../../combobox/directives/combobox-root.directive.ts","../../combobox/directives/combobox-chip.directive.ts","../../combobox/directives/combobox-chip-remove.directive.ts","../../combobox/directives/combobox-chips.directive.ts","../../combobox/directives/combobox-clear.directive.ts","../../combobox/directives/combobox-empty.directive.ts","../../combobox/directives/combobox-group.directive.ts","../../combobox/directives/combobox-group-label.directive.ts","../../combobox/directives/combobox-input.directive.ts","../../combobox/directives/combobox-input-group.directive.ts","../../combobox/directives/combobox-item.directive.ts","../../combobox/directives/combobox-item-indicator.directive.ts","../../combobox/directives/combobox-list.directive.ts","../../combobox/directives/combobox-popup.directive.ts","../../combobox/directives/combobox-portal.directive.ts","../../combobox/directives/combobox-positioner.directive.ts","../../combobox/directives/combobox-separator.directive.ts","../../combobox/directives/combobox-status.directive.ts","../../combobox/directives/combobox-trigger.directive.ts","../../combobox/inject/inject-combobox.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n} from \"@angular/core\";\nimport {\n containsFilter,\n filterItems,\n type ItemEquality,\n type ItemFilter,\n includesItem,\n itemFormValue,\n itemLabel,\n queryIsLabel,\n toggleItem,\n} from \"@fragiola/primitives/collection\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport { fieldControl } from \"@fragiola/primitives-angular/field\";\nimport {\n type ChangeDetails,\n type ChangeReason,\n controllable,\n createHiddenInput,\n createOverlayRoot,\n injectFlush,\n injectId,\n type OpenChangeEvent,\n type OverlayActions,\n placementSignal,\n setInputAttribute,\n type ValueChangeEvent,\n} from \"@fragiola/primitives-angular/internal\";\n\n/** An item, a value, or a list of values: the consumer's own type (spec/combobox.md, \"API\"). */\n// `unknown` in the declarations (no `any`): a template narrows it to its own item type\nexport type ComboboxItemValue = 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 `any`.\n */\ntype ConsumerFilter = (\n item: never,\n query: string,\n itemToString: (item: unknown) => string,\n) => boolean;\n\n/** A rendered Item, as the Root knows it. */\nexport interface ComboboxItemInfo {\n value: ComboboxItemValue;\n disabled: boolean;\n id: string;\n}\n\n/** What the keyboard highlights once the list renders: the first, the last or the selected item. */\nexport type PendingHighlight = \"first\" | \"last\" | \"selected\" | null;\n\nexport interface ComboboxState {\n open: boolean;\n disabled: boolean;\n /** The selected item (or `null`), or the selected items with `multiple`. */\n value: ComboboxItemValue;\n inputValue: string;\n}\n\nconst NONE: readonly ComboboxItemValue[] = [];\n\n/**\n * Holds the combobox's state and renders its hidden form inputs (spec/combobox.md):\n * `<ng-container comboboxRoot #combobox=\"comboboxRoot\" [items]=\"fruits\" [(value)]=\"value\">`.\n * `value()`, `inputValue()` and `state()` are the current state, bound or its own: the consumer\n * renders the chips with `@for (item of combobox.value(); ...)` (Angular has no Value part). The\n * overlay's `trigger` is the input, the Trigger button is `button`.\n */\n@Directive({ selector: \"[comboboxRoot]\", exportAs: \"comboboxRoot\" })\nexport class ComboboxRoot implements OverlayActions {\n /** The items, or groups of items: the combobox filters them, the List renders the matches. */\n readonly items = input<readonly ComboboxItemValue[] | undefined>(undefined);\n /** Whether an item matches the query; `null` turns filtering off. */\n // The callbacks take the consumer's own items: their parameters are `never` in the\n // declarations, so a function typed for them (`(country: Country) => string`) binds with no\n // `any`; the Root calls them with the items it was given.\n readonly filter = input<ConsumerFilter | null | undefined>(undefined);\n /** The most items the list renders; `-1` for no limit. */\n readonly limit = input(-1);\n readonly locale = input<string | undefined>(undefined);\n readonly multiple = input(false, { transform: booleanAttribute });\n readonly open = input<boolean | undefined>(undefined);\n readonly openChange = output<boolean>();\n readonly defaultOpen = input(false);\n /** Every requested change with its details, before it happens (`details.cancel()` keeps it). */\n readonly openChangeDetails = output<OpenChangeEvent>();\n /** An opening's or a closing's transition has finished (spec/README.md, \"Lifecycle\"). */\n readonly openChangeComplete = output<boolean>();\n /** The bound value (`[(value)]`); `value()` is the current one. */\n readonly boundValue = input<ComboboxItemValue>(undefined, {\n alias: \"value\",\n });\n readonly valueChange = output<ComboboxItemValue>();\n readonly defaultValue = input<ComboboxItemValue>(undefined);\n readonly valueChangeDetails = output<ValueChangeEvent<ComboboxItemValue>>();\n /** The bound text (`[(inputValue)]`); `inputValue()` is the current one. */\n readonly boundInputValue = input<string | undefined>(undefined, {\n alias: \"inputValue\",\n });\n readonly inputValueChange = output<string>();\n readonly defaultInputValue = input<string | undefined>(undefined);\n readonly inputValueChangeDetails = output<ValueChangeEvent<string>>();\n readonly isItemEqualToValue = input<ItemEquality<never> | undefined>(\n undefined,\n );\n readonly itemToStringLabel = input<((item: never) => string) | undefined>(\n undefined,\n );\n readonly itemToStringValue = input<((item: never) => string) | undefined>(\n undefined,\n );\n private readonly equality = computed(\n () =>\n this.isItemEqualToValue() as\n | ItemEquality<ComboboxItemValue>\n | undefined,\n );\n readonly name = input<string | undefined>(undefined);\n readonly required = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** The input's id, once it has one: the field's label points at it. */\n readonly inputElementId = signal<string | undefined>(undefined);\n /** The visually hidden input: the single value's form entry, and what the browser validates. */\n private readonly hidden = createHiddenInput(\n inject(ElementRef).nativeElement,\n { \"data-primitives-part\": \"combobox-hidden-input\" },\n );\n readonly overlay = createOverlayRoot(\n this,\n (event) => this.openChangeDetails.emit(event),\n \"primitives-combobox\",\n );\n private readonly fallbackValue = (): ComboboxItemValue =>\n this.defaultValue() ?? (this.multiple() ? NONE : null);\n private readonly selection = controllable<ComboboxItemValue, ChangeDetails>(\n this.boundValue,\n this.valueChange,\n this.fallbackValue,\n (value, details) => this.valueChangeDetails.emit({ value, details }),\n );\n /** The selected item (or `null`), or the selected items with `multiple`. */\n readonly value = this.selection.value;\n /** The selected items, as a list in both modes. */\n readonly values = computed<readonly ComboboxItemValue[]>(() => {\n const value = this.value();\n if (this.multiple()) {\n return (value as readonly ComboboxItemValue[] | null) ?? NONE;\n }\n return value === null || value === undefined ? NONE : [value];\n });\n private readonly text = controllable<string, ChangeDetails>(\n this.boundInputValue,\n this.inputValueChange,\n () =>\n this.defaultInputValue() ??\n (this.multiple()\n ? \"\"\n : this.label(this.boundValue() ?? this.fallbackValue())),\n (value, details) =>\n this.inputValueChangeDetails.emit({ value, details }),\n );\n /** The text in the input. */\n readonly inputValue = this.text.value;\n /** The enclosing field's binding, for the input (spec/field.md). */\n readonly field = fieldControl({\n id: this.inputElementId,\n labelable: true,\n value: this.value,\n filled: computed(() => this.values().length > 0),\n input: () => this.hidden,\n focusTarget: () => this.overlay.trigger(),\n });\n /** Its own `disabled`, or the field's. */\n readonly isDisabled = computed(\n () => this.disabled() || this.field.disabled(),\n );\n /** The highlighted item's id. */\n readonly highlighted = signal<string | null>(null);\n private readonly registered = new Map<HTMLElement, ComboboxItemInfo>();\n /** Follows the registered items, so `data-empty` and the pending highlight follow. */\n readonly itemCount = signal(0);\n readonly list = signal<HTMLElement | null>(null);\n readonly button = signal<HTMLElement | null>(null);\n readonly inputGroup = signal<HTMLElement | null>(null);\n readonly chips = signal<HTMLElement | null>(null);\n readonly clearButton = signal<HTMLElement | null>(null);\n readonly listId = `${injectId(\"primitives-combobox\")}-list`;\n /** What to highlight once the list renders, after the keyboard or a press opened it. */\n readonly pendingHighlight = signal<PendingHighlight>(null);\n readonly placed = placementSignal({ side: \"bottom\", align: \"start\" });\n /** The input's text changed by typing since the list opened. */\n private readonly typed = signal(false);\n private readonly flush = injectFlush();\n\n readonly state = computed<ComboboxState>(() => ({\n open: this.overlay.open(),\n disabled: this.isDisabled(),\n value: this.value(),\n inputValue: this.inputValue(),\n }));\n\n private readonly resolvedFilter = computed(() => {\n const filter = this.filter() as\n | ItemFilter<ComboboxItemValue>\n | null\n | undefined;\n return filter === undefined\n ? containsFilter<ComboboxItemValue>(this.locale())\n : filter;\n });\n /** Whether the Root has `items` (it filters them). */\n readonly hasItems = computed(() => this.items() !== undefined);\n /** The matching entries: items, or groups with their matching items. */\n readonly entries = computed<readonly ComboboxItemValue[]>(() => {\n const items = this.items();\n if (items === undefined) {\n return NONE;\n }\n const query = this.inputValue().trim();\n const values = this.values();\n // a single combobox that opened on its selected item's label shows every item\n const whole =\n !this.multiple() &&\n !this.typed() &&\n values.length > 0 &&\n queryIsLabel(this.label(values[0]), query, this.locale());\n return filterItems(items, whole ? \"\" : query, {\n filter: this.resolvedFilter(),\n limit: this.limit(),\n itemToString: (item) => this.label(item),\n });\n });\n /** Whether the list holds no item: no matching entry, or no rendered Item without `items`. */\n readonly empty = computed(() =>\n this.hasItems() ? this.entries().length === 0 : this.itemCount() === 0,\n );\n\n constructor() {\n const hidden = this.hidden;\n effect(() => {\n const multiple = this.multiple();\n const values = this.values();\n setInputAttribute(\n hidden,\n \"name\",\n multiple ? null : (this.fieldName() ?? null),\n );\n hidden.value = multiple ? \"\" : this.formValue(this.value());\n hidden.required = multiple\n ? this.required() && values.length === 0\n : this.required();\n hidden.disabled = this.isDisabled();\n });\n // `multiple`: one `type=\"hidden\"` input per value, in value order, after the hidden input\n let formEntries: HTMLInputElement[] = [];\n afterRenderEffect(() => {\n const name = this.fieldName();\n const values = this.multiple() ? this.values() : NONE;\n const disabled = this.isDisabled();\n untracked(() => {\n for (const entry of formEntries) {\n entry.remove();\n }\n formEntries = [];\n if (name === undefined || hidden.parentNode === null) {\n return;\n }\n let after: Node = hidden;\n for (const item of values) {\n const entry = hidden.ownerDocument.createElement(\"input\");\n entry.type = \"hidden\";\n entry.name = name;\n entry.setAttribute(\"value\", this.formValue(item));\n entry.disabled = disabled;\n entry.setAttribute(\n \"data-primitives-part\",\n \"combobox-hidden-input\",\n );\n after.parentNode?.insertBefore(entry, after.nextSibling);\n after = entry;\n formEntries.push(entry);\n }\n });\n });\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = bridgeForm(hidden, {\n reset: () => this.reset(),\n invalid: () => this.overlay.trigger(),\n });\n });\n inject(DestroyRef).onDestroy(() => {\n stop?.();\n for (const entry of formEntries) {\n entry.remove();\n }\n });\n }\n\n /** The field's `name`, else its own. */\n private fieldName(): string | undefined {\n return this.field.name() ?? this.name();\n }\n\n /** An item's text (`itemToStringLabel`). */\n label(item: ComboboxItemValue): string {\n return itemLabel(\n item,\n this.itemToStringLabel() as\n | ((item: ComboboxItemValue) => string)\n | undefined,\n );\n }\n\n /** An item's form value (`itemToStringValue`). */\n formValue(item: ComboboxItemValue): string {\n return itemFormValue(\n item,\n this.itemToStringValue() as\n | ((item: ComboboxItemValue) => string)\n | undefined,\n );\n }\n\n isSelected(item: ComboboxItemValue): boolean {\n return includesItem(this.values(), item, this.equality());\n }\n\n setInputValue(next: string, reason: ChangeReason): void {\n this.text.set(next, { reason });\n }\n\n /** The input's text changed by typing. */\n markTyped(): void {\n this.typed.set(true);\n }\n\n /**\n * Opens or closes the list, and renders it at once; returns whether it changed. Closing\n * without a choice resets the text (spec/combobox.md, \"Choosing an item\"); a close the\n * consumer cancels leaves the list, its text and highlight as they are.\n */\n setOpen(next: boolean, reason: ChangeReason, event?: Event): boolean {\n if (next && reason !== \"input-change\") {\n this.typed.set(false);\n }\n const changed = this.overlay.setOpen(next, reason, event);\n if (next || !changed) {\n return changed;\n }\n this.typed.set(false);\n if (reason !== \"item-press\") {\n const text = this.multiple() ? \"\" : this.label(this.value());\n if (untracked(this.inputValue) !== text) {\n this.text.set(text, {\n reason: text === \"\" ? \"input-clear\" : \"none\",\n });\n }\n }\n // a list reopened during its exit animation starts with no highlight\n this.highlighted.set(null);\n this.pendingHighlight.set(null);\n this.flush();\n return changed;\n }\n\n /** Chooses an item (spec/combobox.md, \"Choosing an item\"). */\n choose(item: ComboboxItemValue): void {\n this.highlighted.set(null);\n if (!this.multiple()) {\n this.selection.set(item, { reason: \"item-press\" });\n this.text.set(this.label(item), { reason: \"item-press\" });\n this.setOpen(false, \"item-press\");\n return;\n }\n this.selection.set(toggleItem(this.values(), item, this.equality()), {\n reason: \"item-press\",\n });\n if (this.inputValue().trim() !== \"\") {\n this.text.set(\"\", { reason: \"input-clear\" });\n this.setOpen(false, \"item-press\");\n } else {\n this.flush();\n }\n }\n\n /** Clears the text and the value. */\n clear(reason: ChangeReason): void {\n this.text.set(\"\", { reason });\n this.selection.set(this.multiple() ? [] : null, { reason });\n this.highlighted.set(null);\n this.flush();\n }\n\n /** Removes the value at `index` (`multiple`), and renders at once. */\n removeAt(index: number, reason: ChangeReason): void {\n this.selection.set(\n this.values().filter((_, at) => at !== index),\n { reason },\n );\n this.flush();\n }\n\n /** Moves the highlight, and renders it before the next key. */\n highlight(id: string | null): void {\n this.highlighted.set(id);\n this.flush();\n }\n\n /** The rendered items of the list, in order. */\n orderedItems(): ComboboxItemInfo[] {\n const list = this.list();\n if (list === null) {\n return [];\n }\n return [...list.querySelectorAll<HTMLElement>('[role=\"option\"]')]\n .map((element) => this.registered.get(element))\n .filter((item): item is ComboboxItemInfo => item !== undefined);\n }\n\n /** Whether every option rendered in the list has registered. */\n itemsRegistered(): boolean {\n const list = this.list();\n return (\n list === null ||\n [...list.querySelectorAll<HTMLElement>('[role=\"option\"]')].every(\n (element) => this.registered.has(element),\n )\n );\n }\n\n /** The rendered chips, in value order. */\n chipElements(): HTMLElement[] {\n const chips = this.chips();\n if (chips === null) {\n return [];\n }\n return [\n ...chips.querySelectorAll<HTMLElement>(\n '[data-primitives-part=\"combobox-chip\"]',\n ),\n ];\n }\n\n registerItem(element: HTMLElement, info: ComboboxItemInfo): () => void {\n this.registered.set(element, info);\n this.itemCount.set(this.registered.size);\n return () => {\n this.registered.delete(element);\n this.itemCount.set(this.registered.size);\n };\n }\n\n /** A press on the input opens the list, on the selected item in single mode. */\n openOnPress(): void {\n if (this.overlay.open() || this.isDisabled()) {\n return;\n }\n this.pendingHighlight.set(this.multiple() ? null : \"selected\");\n this.setOpen(true, \"input-press\");\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 */\n pressToOpen(event: MouseEvent): void {\n const target = event.target as Element | null;\n const input = this.overlay.trigger();\n if (\n target === null ||\n target === input ||\n target.closest('button, [data-primitives-part=\"combobox-chip\"]') !==\n null\n ) {\n return;\n }\n event.preventDefault();\n if (this.isDisabled()) {\n return;\n }\n input?.focus();\n this.openOnPress();\n }\n\n /** A form reset: the default value, and its label in the input. */\n private reset(): void {\n const fallback = this.fallbackValue();\n this.field.reset();\n this.selection.set(fallback, { reason: \"none\" });\n this.text.set(this.multiple() ? \"\" : this.label(fallback), {\n reason: \"none\",\n });\n this.flush();\n // the browser reset the elements after the state changed: a state that did not change\n // is not written again\n const input = this.overlay.trigger();\n if (input instanceof HTMLInputElement) {\n input.value = this.inputValue();\n }\n this.hidden.value = this.multiple() ? \"\" : this.formValue(this.value());\n }\n\n /** Closes the list (reason `imperative-action`). */\n close(): void {\n this.setOpen(false, \"imperative-action\");\n }\n\n /** Ends a running exit now, or the exit held by `preventUnmountOnClose()`. */\n unmount(): void {\n this.overlay.unmount();\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport { chipKeyTarget } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport {\n dataValues,\n injectHost,\n injectProvidedDirection,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * One value of a `multiple` combobox; the arrows move between chips (spec/combobox.md):\n * `<div comboboxChip>`, one per value, in value order.\n */\n@Directive({\n selector: \"[comboboxChip]\",\n exportAs: \"comboboxChip\",\n host: {\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-chip\",\n \"[attr.aria-disabled]\": \"state().disabled ? 'true' : null\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(keydown)\": \"onKeyDown($event)\",\n },\n})\nexport class ComboboxChip {\n /** A DirectionProvider's direction, else `null` (the computed one is read). */\n private readonly direction = injectProvidedDirection();\n private readonly root = inject(ComboboxRoot);\n /** The chip's element, read when a key or a press removes it. */\n readonly element = injectHost();\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n if (\n this.state().disabled ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey\n ) {\n return;\n }\n const chips = root.chipElements();\n const index = chips.indexOf(this.element);\n const action = chipKeyTarget(\n event.key,\n index,\n chips.length,\n getDirection(this.element, this.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.remove) {\n // rendered at once: the focus target is a chip of the new list\n root.removeAt(index, \"none\");\n }\n if (action.open) {\n root.setOpen(true, \"list-navigation\");\n }\n const target =\n action.focus === \"input\"\n ? root.overlay.trigger()\n : root.chipElements()[action.focus];\n target?.focus();\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport { dataValues } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxChip } from \"./combobox-chip.directive.ts\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Removes its chip's value and returns focus to the input: `<button comboboxChipRemove>`. */\n@Directive({\n selector: \"[comboboxChipRemove]\",\n exportAs: \"comboboxChipRemove\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-chip-remove\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick()\",\n },\n})\nexport class ComboboxChipRemove {\n private readonly root = inject(ComboboxRoot);\n private readonly chip = inject(ComboboxChip);\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onClick(): void {\n const root = this.root;\n const index = root.chipElements().indexOf(this.chip.element);\n if (index >= 0) {\n root.removeAt(index, \"chip-remove-press\");\n }\n root.overlay.trigger()?.focus();\n }\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { registerHost } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * `multiple`: holds the chips and the Input; a `toolbar` while it holds a chip (spec/combobox.md):\n * `<div comboboxChips>`.\n */\n@Directive({\n selector: \"[comboboxChips]\",\n exportAs: \"comboboxChips\",\n host: {\n \"data-primitives-part\": \"combobox-chips\",\n \"[attr.role]\": \"root.values().length > 0 ? 'toolbar' : null\",\n \"(mousedown)\": \"root.pressToOpen($event)\",\n },\n})\nexport class ComboboxChips {\n protected readonly root = inject(ComboboxRoot);\n\n constructor() {\n registerHost(this.root.chips);\n }\n}\n","import { computed, DestroyRef, Directive, effect, inject } from \"@angular/core\";\nimport {\n conditionalView,\n dataValue,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * Clears the text and the value; structural, so it is rendered only while there is a value\n * (spec/combobox.md): `<button *comboboxClear aria-label=\"Clear fruit\">×</button>`. The directive\n * writes its attributes on the element it renders, and keeps focus in the input.\n */\n@Directive({ selector: \"[comboboxClear]\", exportAs: \"comboboxClear\" })\nexport class ComboboxClear {\n private readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n\n constructor() {\n const root = this.root;\n const onPointerDown = (event: Event) => event.preventDefault();\n const onClick = () => {\n root.clear(\"clear-press\");\n root.overlay.trigger()?.focus();\n };\n const element = conditionalView(\n computed(() => root.values().length > 0),\n (button) => {\n writeAttributes(button, {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-clear\",\n });\n button.addEventListener(\"pointerdown\", onPointerDown);\n button.addEventListener(\"click\", onClick);\n },\n );\n effect((onCleanup) => {\n const button = element();\n const disabled = this.state().disabled;\n if (button === null) {\n return;\n }\n writeAttributes(button, {\n disabled: disabled ? \"\" : null,\n \"data-disabled\": dataValue(disabled),\n });\n root.clearButton.set(button);\n onCleanup(() => {\n if (root.clearButton() === button) {\n root.clearButton.set(null);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => root.clearButton.set(null));\n }\n}\n","import { afterRenderEffect, Directive, inject, untracked } from \"@angular/core\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * A polite live region, always rendered; its children are shown only while the list is empty\n * (spec/combobox.md): `<div comboboxEmpty>No fruit found.</div>`. A live region must exist before\n * its text changes, so the element stays and the directive takes its child nodes out, keeping\n * them (and Angular's bindings in them) until the list is empty again.\n */\n@Directive({\n selector: \"[comboboxEmpty]\",\n host: {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-empty\",\n },\n})\nexport class ComboboxEmpty {\n private readonly root = inject(ComboboxRoot);\n\n constructor() {\n const host = injectHost();\n const kept = document.createDocumentFragment();\n afterRenderEffect({\n write: () => {\n const empty = this.root.empty();\n untracked(() => {\n if (empty) {\n host.append(kept);\n } else {\n kept.append(...host.childNodes);\n }\n });\n },\n });\n }\n}\n","import { Directive } from \"@angular/core\";\nimport { injectId } from \"@fragiola/primitives-angular/internal\";\n\n/** A `group` of items, named by its GroupLabel (spec/combobox.md): `<div comboboxGroup>`. */\n@Directive({\n selector: \"[comboboxGroup]\",\n exportAs: \"comboboxGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"combobox-group\",\n \"[attr.aria-labelledby]\": \"labelId\",\n },\n})\nexport class ComboboxGroup {\n /** Its GroupLabel's id. */\n readonly labelId = `${injectId(\"primitives-combobox-group\")}-label`;\n}\n","import { Directive } from \"@angular/core\";\nimport { injectEnclosing } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxGroup } from \"./combobox-group.directive.ts\";\n\n/** Names its Group: `<div comboboxGroupLabel>`. */\n@Directive({\n selector: \"[comboboxGroupLabel]\",\n host: {\n \"data-primitives-part\": \"combobox-group-label\",\n \"[attr.id]\": \"group.labelId\",\n },\n})\nexport class ComboboxGroupLabel {\n protected readonly group = injectEnclosing(\n ComboboxGroup,\n \"comboboxGroup\",\n \"ComboboxGroupLabel\",\n );\n}\n","import { afterNextRender, computed, Directive, inject } from \"@angular/core\";\nimport { chipArrows, stepThroughNone } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport { writeFieldAria } from \"@fragiola/primitives-angular/field\";\nimport {\n dataValues,\n injectFlush,\n injectProvidedDirection,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n ComboboxRoot,\n type PendingHighlight,\n} from \"./combobox-root.directive.ts\";\n\n/**\n * The `combobox`: `<input comboboxInput>`. It keeps DOM focus while the list is open; the\n * highlighted item is announced with `aria-activedescendant` (spec/combobox.md, \"Keyboard\").\n */\n@Directive({\n selector: \"input[comboboxInput]\",\n exportAs: \"comboboxInput\",\n host: {\n type: \"text\",\n role: \"combobox\",\n autocomplete: \"off\",\n \"aria-autocomplete\": \"list\",\n \"data-primitives-part\": \"combobox-input\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[value]\": \"root.inputValue()\",\n // the attribute follows the value, as React's controlled input: a server render writes\n // it, so the page rendered in the browser alone has it too (spec/README.md, \"Server\n // rendering\")\n \"[attr.value]\": \"root.inputValue()\",\n \"[attr.aria-expanded]\": \"String(state().open)\",\n \"[attr.aria-controls]\": \"root.listId\",\n \"[attr.aria-activedescendant]\": \"activeId()\",\n \"[attr.data-invalid]\": \"root.field.data().invalid\",\n \"[attr.data-valid]\": \"root.field.data().valid\",\n \"[attr.data-dirty]\": \"root.field.data().dirty\",\n \"[attr.data-touched]\": \"root.field.data().touched\",\n \"[attr.data-filled]\": \"root.field.data().filled\",\n \"[attr.data-focused]\": \"root.field.data().focused\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(input)\": \"onInput()\",\n \"(click)\": \"root.openOnPress()\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(focus)\": \"root.field.focused()\",\n \"(blur)\": \"root.field.blurred()\",\n },\n})\nexport class ComboboxInput {\n /** A DirectionProvider's direction, else `null` (the computed one is read). */\n private readonly direction = injectProvidedDirection();\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n /** The highlighted item, while the list is open and the item is rendered. */\n private readonly active = computed(() => {\n this.root.itemCount();\n const highlighted = this.root.highlighted();\n if (!this.state().open || highlighted === null) {\n return undefined;\n }\n return this.root.orderedItems().find((item) => item.id === highlighted);\n });\n protected readonly activeId = computed(() => this.active()?.id ?? null);\n protected readonly String = String;\n private readonly input = registerHost<HTMLInputElement>(\n this.root.overlay.singleTrigger,\n );\n private readonly flush = injectFlush();\n\n constructor() {\n const { field } = this.root;\n const host = this.input;\n writeFieldAria(field, host, {\n \"aria-labelledby\": field.labelledBy,\n \"aria-describedby\": field.describedBy,\n \"aria-invalid\": field.ariaInvalid,\n });\n // the consumer's own id wins (the label's `for` points at it)\n afterNextRender(() => {\n if (host.id === \"\") {\n host.id = this.root.overlay.triggerId;\n }\n this.root.inputElementId.set(host.id);\n });\n }\n\n protected onInput(): void {\n const root = this.root;\n root.setInputValue(this.input.value, \"input-change\");\n root.highlighted.set(null);\n root.markTyped();\n // typing never highlights: drop what an earlier key asked for\n root.pendingHighlight.set(null);\n if (!root.overlay.open()) {\n root.setOpen(true, \"input-change\");\n }\n // a bound `inputValue` the consumer kept unchanged does not re-run the binding: put the\n // accepted text back (React re-asserts a controlled value too)\n this.flush();\n if (this.input.value !== root.inputValue()) {\n this.input.value = root.inputValue();\n }\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n const input = this.input;\n const open = root.overlay.open();\n const openWith = (highlight: PendingHighlight) => {\n root.pendingHighlight.set(highlight);\n root.setOpen(true, \"list-navigation\");\n };\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);\n } else if (event.key === \"ArrowUp\" && open) {\n root.setOpen(false, \"list-navigation\");\n }\n return;\n }\n if (!open) {\n openWith(event.key === \"ArrowDown\" ? \"first\" : \"last\");\n return;\n }\n // past an end, the visual focus goes back to the input; from the input, to the\n // near end\n const items = root.orderedItems();\n const index = items.findIndex(\n (item) => item.id === root.highlighted(),\n );\n const delta = event.key === \"ArrowDown\" ? 1 : -1;\n root.highlight(\n items[stepThroughNone(items.length, index, delta)]?.id ??\n null,\n );\n return;\n }\n case \"Enter\":\n if (open) {\n event.preventDefault();\n const active = this.active();\n if (active !== undefined && !active.disabled) {\n root.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 (root.inputValue() !== \"\" || root.values().length > 0)\n ) {\n event.preventDefault();\n root.clear(\"escape-key\");\n }\n return;\n case \"Tab\":\n if (open) {\n root.setOpen(false, \"focus-out\");\n }\n return;\n case \"Backspace\":\n if (\n root.multiple() &&\n input.value === \"\" &&\n root.values().length > 0\n ) {\n root.removeAt(root.values().length - 1, \"none\");\n }\n return;\n default: {\n const chips = root.chipElements();\n if (\n root.multiple() &&\n event.key ===\n chipArrows(\n getDirection(input, this.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","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Holds the Input and its buttons; anchors the list (spec/combobox.md): `<div comboboxInputGroup>`. */\n@Directive({\n selector: \"[comboboxInputGroup]\",\n exportAs: \"comboboxInputGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"combobox-input-group\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(mousedown)\": \"root.pressToOpen($event)\",\n },\n})\nexport class ComboboxInputGroup {\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n registerHost(this.root.inputGroup);\n }\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from \"@angular/core\";\nimport { scrollIntoViewWithin } from \"@fragiola/primitives/collection\";\nimport {\n dataValues,\n injectHost,\n injectId,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n} from \"./combobox-root.directive.ts\";\n\nexport interface ComboboxItemState {\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n}\n\n/**\n * An `option`: `<div comboboxItem [value]=\"fruit\">`. When chosen, the input's text becomes\n * `itemToStringLabel(value)`. A disabled item can be highlighted, never chosen.\n */\n@Directive({\n selector: \"[comboboxItem]\",\n exportAs: \"comboboxItem\",\n host: {\n role: \"option\",\n \"data-primitives-part\": \"combobox-item\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-selected]\": \"state().selected ? 'true' : null\",\n \"[attr.aria-disabled]\": \"state().disabled ? 'true' : null\",\n \"[attr.data-highlighted]\": \"data().highlighted\",\n \"[attr.data-selected]\": \"data().selected\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointermove)\": \"onPointerMove()\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick()\",\n },\n})\nexport class ComboboxItem {\n private readonly root = inject(ComboboxRoot);\n readonly value = input.required<ComboboxItemValue>();\n readonly disabled = input(false, { transform: booleanAttribute });\n protected readonly id = injectId(\"primitives-combobox-item\");\n readonly state = computed<ComboboxItemState>(() => ({\n highlighted: this.root.highlighted() === this.id,\n selected: this.root.isSelected(this.value()),\n disabled: this.disabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n const host = injectHost();\n const root = this.root;\n let unregister: (() => void) | null = null;\n effect(() => {\n const value = this.value();\n const disabled = this.disabled();\n untracked(() => {\n unregister?.();\n unregister = root.registerItem(host, {\n value,\n disabled,\n id: this.id,\n });\n });\n });\n inject(DestroyRef).onDestroy(() => unregister?.());\n // within the popup only: a list that mounts before it is placed never scrolls the page\n afterRenderEffect(() => {\n if (this.state().highlighted) {\n scrollIntoViewWithin(host, this.root.overlay.positioner());\n }\n });\n }\n\n protected onPointerMove(): void {\n if (!this.state().highlighted) {\n this.root.highlighted.set(this.id);\n }\n }\n\n protected onClick(): void {\n if (!this.disabled()) {\n this.root.choose(this.value());\n }\n }\n}\n","import { computed, Directive, inject, input } from \"@angular/core\";\nimport {\n conditionalView,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxItem } from \"./combobox-item.directive.ts\";\n\n/**\n * Marks a selected item, hidden from assistive technologies (spec/combobox.md); structural, so it\n * is rendered only while its item is selected: `<span *comboboxItemIndicator>✓</span>`, or\n * `*comboboxItemIndicator=\"true\"` to keep it. The directive writes its attributes on the element\n * it renders.\n */\n@Directive({\n selector: \"[comboboxItemIndicator]\",\n exportAs: \"comboboxItemIndicator\",\n})\nexport class ComboboxItemIndicator {\n private readonly item = inject(ComboboxItem);\n /** Rendered while the item is not selected too. */\n readonly keepMounted = input(false, {\n alias: \"comboboxItemIndicator\",\n // `*comboboxItemIndicator` alone gives \"\": not kept\n transform: (value: unknown) => value === true || value === \"true\",\n });\n readonly state = computed(() => ({\n selected: this.item.state().selected,\n }));\n\n constructor() {\n conditionalView(\n computed(() => this.state().selected || this.keepMounted()),\n (element) =>\n writeAttributes(element, {\n \"aria-hidden\": \"true\",\n \"data-primitives-part\": \"combobox-item-indicator\",\n }),\n );\n }\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n inject,\n untracked,\n} from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n} from \"./combobox-root.directive.ts\";\n\n/**\n * The `listbox`: `<div comboboxList #list=\"comboboxList\">`. With the Root's `items`, its\n * `entries()` are the matching items, or groups with their matching items: the consumer renders\n * them with `@for (entry of list.entries(); ...)` (the List's render function in Angular).\n * Applies the highlight the keyboard asked for once its items render.\n */\n@Directive({\n selector: \"[comboboxList]\",\n exportAs: \"comboboxList\",\n host: {\n role: \"listbox\",\n \"data-primitives-part\": \"combobox-list\",\n \"[attr.id]\": \"root.listId\",\n \"[attr.aria-multiselectable]\": \"root.multiple() ? 'true' : null\",\n \"[attr.data-empty]\": \"data().empty\",\n },\n})\nexport class ComboboxList {\n protected readonly root = inject(ComboboxRoot);\n /** The matching entries (with the Root's `items`). */\n readonly entries = computed<readonly ComboboxItemValue[]>(() =>\n this.root.entries(),\n );\n readonly state = computed(() => ({ empty: this.root.empty() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n const root = this.root;\n registerHost(root.list);\n afterRenderEffect(() => {\n const list = root.list();\n const pending = root.pendingHighlight();\n root.itemCount();\n // runs when the list opens too: a list reopened while it closes keeps its element\n root.overlay.open();\n if (list === null || pending === null) {\n return;\n }\n untracked(() => {\n // the rendered options register after the list: wait for every one of them\n if (!root.itemsRegistered()) {\n return;\n }\n root.pendingHighlight.set(null);\n const items = root.orderedItems();\n const selected = root.multiple()\n ? undefined\n : items.find((item) => root.isSelected(item.value));\n const edge = pending === \"first\" ? items[0] : items.at(-1);\n const target =\n selected ?? (pending === \"selected\" ? undefined : edge);\n root.highlighted.set(target?.id ?? null);\n });\n });\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** The floating container of the list (no role of its own): `<div comboboxPopup>`. */\n@Directive({\n selector: \"[comboboxPopup]\",\n exportAs: \"comboboxPopup\",\n host: {\n \"data-primitives-part\": \"combobox-popup\",\n \"[attr.data-open]\": \"data().open\",\n \"[attr.data-closed]\": \"data().closed\",\n \"[attr.data-side]\": \"data().side\",\n \"[attr.data-align]\": \"data().align\",\n \"[attr.data-starting-style]\": \"data()['starting-style']\",\n \"[attr.data-ending-style]\": \"data()['ending-style']\",\n },\n})\nexport class ComboboxPopup {\n private readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n ...this.root.placed(),\n }));\n protected readonly data = computed(() => {\n const status = this.root.overlay.presence.status();\n const state = this.state();\n return dataValues({\n ...state,\n closed: !state.open,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n });\n });\n\n constructor() {\n registerHost(this.root.overlay.popup);\n }\n}\n","import { Directive, inject, input } from \"@angular/core\";\nimport {\n mountPortal,\n type OverlayPortalOptions,\n portalOptions,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * Moves the positioner to the end of `body` while the list is open or closing (always with\n * `keepMounted`): `*comboboxPortal`.\n */\n@Directive({ selector: \"[comboboxPortal]\" })\nexport class ComboboxPortal {\n /**\n * `container` (default: `document.body`), `keepMounted` (default `false`: rendered, hidden, while\n * closed); an element: the container alone (`*comboboxPortal=\"element\"`).\n */\n readonly options = input<OverlayPortalOptions, unknown>(\n {},\n { alias: \"comboboxPortal\", transform: portalOptions },\n );\n\n constructor() {\n mountPortal(\n inject(ComboboxRoot).overlay.presence.mounted,\n this.options,\n );\n }\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n inject,\n input,\n untracked,\n} from \"@angular/core\";\nimport { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport {\n dataValues,\n positionOverlay,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\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): `<div comboboxPositioner>`.\n */\n@Directive({\n selector: \"[comboboxPositioner]\",\n exportAs: \"comboboxPositioner\",\n host: {\n role: \"presentation\",\n \"data-primitives-part\": \"combobox-positioner\",\n \"[attr.hidden]\": \"root.overlay.presence.mounted() ? null : ''\",\n \"[attr.data-open]\": \"data().open\",\n \"[attr.data-closed]\": \"data().closed\",\n \"[attr.data-side]\": \"data().side\",\n \"[attr.data-align]\": \"data().align\",\n },\n})\nexport class ComboboxPositioner {\n protected readonly root = inject(ComboboxRoot);\n readonly side = input<Side | undefined>(undefined);\n readonly align = input<Align | undefined>(undefined);\n readonly sideOffset = input<number | undefined>(undefined);\n readonly alignOffset = input<number | undefined>(undefined);\n readonly collisionPadding = input<number | undefined>(undefined);\n readonly anchor = input<Element | null | undefined>(undefined);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n ...this.root.placed(),\n }));\n protected readonly data = computed(() =>\n dataValues({ ...this.state(), closed: !this.state().open }),\n );\n\n constructor() {\n const root = this.root;\n const overlay = root.overlay;\n const positioner = registerHost(overlay.positioner);\n positionOverlay(\n this,\n { side: \"bottom\", align: \"start\" },\n {\n anchor: computed(\n () =>\n root.inputGroup() ?? root.chips() ?? overlay.trigger(),\n ),\n positioner,\n mounted: overlay.presence.mounted,\n },\n root.placed,\n );\n afterRenderEffect((onCleanup) => {\n const open = overlay.open();\n const ignored = [\n overlay.trigger(),\n root.button(),\n root.inputGroup(),\n root.chips(),\n root.clearButton(),\n ];\n if (!open) {\n return;\n }\n untracked(() => {\n const session = openOverlaySession(positioner.ownerDocument, {\n elements: () => [positioner],\n ignore: () => ignored,\n dismiss: (reason, event) =>\n root.setOpen(false, reason, event),\n });\n onCleanup(session.end);\n });\n });\n }\n}\n","import { Directive } from \"@angular/core\";\n\n/** Between groups; no role of its own (a `listbox` owns only groups and options). */\n@Directive({\n selector: \"[comboboxSeparator]\",\n host: {\n role: \"presentation\",\n \"data-orientation\": \"horizontal\",\n \"data-primitives-part\": \"combobox-separator\",\n },\n})\nexport class ComboboxSeparator {}\n","import { Directive } from \"@angular/core\";\n\n/** A polite live region for the consumer's text (spec/combobox.md): `<div comboboxStatus>`. */\n@Directive({\n selector: \"[comboboxStatus]\",\n host: {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-status\",\n },\n})\nexport class ComboboxStatus {}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Toggles the list; not in the tab order, keeps focus in the input: `<button comboboxTrigger>`. */\n@Directive({\n selector: \"[comboboxTrigger]\",\n exportAs: \"comboboxTrigger\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-trigger\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.aria-expanded]\": \"String(state().open)\",\n \"[attr.aria-controls]\": \"root.listId\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick($event)\",\n },\n})\nexport class ComboboxTrigger {\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n protected readonly String = String;\n\n constructor() {\n registerHost(this.root.button);\n }\n\n protected onClick(event: MouseEvent): void {\n const root = this.root;\n root.pendingHighlight.set(null);\n root.setOpen(!root.overlay.open(), \"trigger-press\", event);\n root.overlay.trigger()?.focus();\n }\n}\n","import type { Signal } from \"@angular/core\";\nimport { injectEnclosing } from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n type ComboboxState,\n} from \"../directives/combobox-root.directive.ts\";\n\n/** The part hook of the enclosing `[comboboxRoot]`: its state, and `choose` / `clear`. */\nexport function injectCombobox(): {\n state: Signal<ComboboxState>;\n choose: (item: ComboboxItemValue) => void;\n clear: () => void;\n} {\n const root = injectEnclosing(\n ComboboxRoot,\n \"comboboxRoot\",\n \"injectCombobox\",\n );\n return {\n state: root.state,\n choose: (item) => root.choose(item),\n clear: () => root.clear(\"none\"),\n };\n}\n"],"mappings":";;;;;;;;AA4EA,MAAM,OAAqC,CAAA;AAU3C,IAAa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,UAAA;GAAA,MAAA;GAAe,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAf;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAe,cAAA;GAAA,UAAA;GAAA,MAAA;IAAA,YAAA;KAAA,QAAA;KAAA,YAAA;KAAA,wBAAA;IAAA;IAAA,WAAA;KAAA,eAAA;KAAA,SAAA;IAAA;IAAA,YAAA;KAAA,iBAAA;KAAA,sBAAA;KAAA,sBAAA;KAAA,wBAAA;KAAA,sBAAA;IAAA;GAAA;GAAA,UAAA,CAAA,iBAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAf,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EAhB3B,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;GACV,MAAM;IACF,MAAM;IACN,UAAU;IACV,wBAAwB;IACxB,mBAAmB;IACnB,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,wBAAwB;IACxB,iBAAiB;IACjB,WAAW;GACd;EACJ,CAAA;;;;ACdD,SAAgB,iBAAc;CAK1B,MAAM,OAAO,gBACT,cACA,gBACA,gBAAgB;CAEpB,OAAO;EACH,OAAO,KAAK;EACZ,SAAS,SAAS,KAAK,OAAO,IAAI;EAClC,aAAa,KAAK,MAAM,MAAM;CACjC;AACL"}
|
|
1
|
+
{"version":3,"file":"fragiola-primitives-angular-combobox.mjs","names":[],"sources":["../../combobox/directives/combobox-root.directive.ts","../../combobox/directives/combobox-chip.directive.ts","../../combobox/directives/combobox-chip-remove.directive.ts","../../combobox/directives/combobox-chips.directive.ts","../../combobox/directives/combobox-clear.directive.ts","../../combobox/directives/combobox-empty.directive.ts","../../combobox/directives/combobox-group.directive.ts","../../combobox/directives/combobox-group-label.directive.ts","../../combobox/directives/combobox-input.directive.ts","../../combobox/directives/combobox-input-group.directive.ts","../../combobox/directives/combobox-item.directive.ts","../../combobox/directives/combobox-item-indicator.directive.ts","../../combobox/directives/combobox-list.directive.ts","../../combobox/directives/combobox-popup.directive.ts","../../combobox/directives/combobox-portal.directive.ts","../../combobox/directives/combobox-positioner.directive.ts","../../combobox/directives/combobox-separator.directive.ts","../../combobox/directives/combobox-status.directive.ts","../../combobox/directives/combobox-trigger.directive.ts","../../combobox/inject/inject-combobox.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n} from \"@angular/core\";\nimport {\n containsFilter,\n filterItems,\n type ItemEquality,\n type ItemFilter,\n includesItem,\n itemFormValue,\n itemLabel,\n queryIsLabel,\n toggleItem,\n} from \"@fragiola/primitives/collection\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport { fieldControl } from \"@fragiola/primitives-angular/field\";\nimport {\n type ChangeDetails,\n type ChangeReason,\n controllable,\n createHiddenInput,\n createOverlayRoot,\n injectFlush,\n injectId,\n type OpenChangeEvent,\n type OverlayActions,\n placementSignal,\n setInputAttribute,\n type ValueChangeEvent,\n} from \"@fragiola/primitives-angular/internal\";\n\n/** An item, a value, or a list of values: the consumer's own type (spec/combobox.md, \"API\"). */\n// `unknown` in the declarations (no `any`): a template narrows it to its own item type\nexport type ComboboxItemValue = 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 `any`.\n */\ntype ConsumerFilter = (\n item: never,\n query: string,\n itemToString: (item: unknown) => string,\n) => boolean;\n\n/** A rendered Item, as the Root knows it. */\nexport interface ComboboxItemInfo {\n value: ComboboxItemValue;\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 ComboboxState {\n open: boolean;\n disabled: boolean;\n /** The selected item (or `null`), or the selected items with `multiple`. */\n value: ComboboxItemValue;\n inputValue: string;\n}\n\nconst NONE: readonly ComboboxItemValue[] = [];\n\n/**\n * Holds the combobox's state and renders its hidden form inputs (spec/combobox.md):\n * `<ng-container comboboxRoot #combobox=\"comboboxRoot\" [items]=\"fruits\" [(value)]=\"value\">`.\n * `value()`, `inputValue()` and `state()` are the current state, bound or its own: the consumer\n * renders the chips with `@for (item of combobox.value(); ...)` (Angular has no Value part). The\n * overlay's `trigger` is the input, the Trigger button is `button`.\n */\n@Directive({ selector: \"[comboboxRoot]\", exportAs: \"comboboxRoot\" })\nexport class ComboboxRoot implements OverlayActions {\n /** The items, or groups of items: the combobox filters them, the List renders the matches. */\n readonly items = input<readonly ComboboxItemValue[] | undefined>(undefined);\n /** Whether an item matches the query; `null` turns filtering off. */\n // The callbacks take the consumer's own items: their parameters are `never` in the\n // declarations, so a function typed for them (`(country: Country) => string`) binds with no\n // `any`; the Root calls them with the items it was given.\n readonly filter = input<ConsumerFilter | null | undefined>(undefined);\n /** The most items the list renders; `-1` for no limit. */\n readonly limit = input(-1);\n readonly locale = input<string | undefined>(undefined);\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Typing highlights the first item the filter keeps, so Enter chooses it (default `false`). */\n readonly autoHighlight = input(false, { transform: booleanAttribute });\n readonly open = input<boolean | undefined>(undefined);\n readonly openChange = output<boolean>();\n readonly defaultOpen = input(false);\n /** Every requested change with its details, before it happens (`details.cancel()` keeps it). */\n readonly openChangeDetails = output<OpenChangeEvent>();\n /** An opening's or a closing's transition has finished (spec/README.md, \"Lifecycle\"). */\n readonly openChangeComplete = output<boolean>();\n /** The bound value (`[(value)]`); `value()` is the current one. */\n readonly boundValue = input<ComboboxItemValue>(undefined, {\n alias: \"value\",\n });\n readonly valueChange = output<ComboboxItemValue>();\n readonly defaultValue = input<ComboboxItemValue>(undefined);\n readonly valueChangeDetails = output<ValueChangeEvent<ComboboxItemValue>>();\n /** The bound text (`[(inputValue)]`); `inputValue()` is the current one. */\n readonly boundInputValue = input<string | undefined>(undefined, {\n alias: \"inputValue\",\n });\n readonly inputValueChange = output<string>();\n readonly defaultInputValue = input<string | undefined>(undefined);\n readonly inputValueChangeDetails = output<ValueChangeEvent<string>>();\n readonly isItemEqualToValue = input<ItemEquality<never> | undefined>(\n undefined,\n );\n readonly itemToStringLabel = input<((item: never) => string) | undefined>(\n undefined,\n );\n readonly itemToStringValue = input<((item: never) => string) | undefined>(\n undefined,\n );\n private readonly equality = computed(\n () =>\n this.isItemEqualToValue() as\n | ItemEquality<ComboboxItemValue>\n | undefined,\n );\n readonly name = input<string | undefined>(undefined);\n readonly required = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** The input's id, once it has one: the field's label points at it. */\n readonly inputElementId = signal<string | undefined>(undefined);\n /** The visually hidden input: the single value's form entry, and what the browser validates. */\n private readonly hidden = createHiddenInput(\n inject(ElementRef).nativeElement,\n { \"data-primitives-part\": \"combobox-hidden-input\" },\n );\n readonly overlay = createOverlayRoot(\n this,\n (event) => this.openChangeDetails.emit(event),\n \"primitives-combobox\",\n );\n private readonly fallbackValue = (): ComboboxItemValue =>\n this.defaultValue() ?? (this.multiple() ? NONE : null);\n private readonly selection = controllable<ComboboxItemValue, ChangeDetails>(\n this.boundValue,\n this.valueChange,\n this.fallbackValue,\n (value, details) => this.valueChangeDetails.emit({ value, details }),\n );\n /** The selected item (or `null`), or the selected items with `multiple`. */\n readonly value = this.selection.value;\n /** The selected items, as a list in both modes. */\n readonly values = computed<readonly ComboboxItemValue[]>(() => {\n const value = this.value();\n if (this.multiple()) {\n return (value as readonly ComboboxItemValue[] | null) ?? NONE;\n }\n return value === null || value === undefined ? NONE : [value];\n });\n private readonly text = controllable<string, ChangeDetails>(\n this.boundInputValue,\n this.inputValueChange,\n () =>\n this.defaultInputValue() ??\n (this.multiple()\n ? \"\"\n : this.label(this.boundValue() ?? this.fallbackValue())),\n (value, details) =>\n this.inputValueChangeDetails.emit({ value, details }),\n );\n /** The text in the input. */\n readonly inputValue = this.text.value;\n /** The enclosing field's binding, for the input (spec/field.md). */\n readonly field = fieldControl({\n id: this.inputElementId,\n labelable: true,\n value: this.value,\n filled: computed(() => this.values().length > 0),\n input: () => this.hidden,\n focusTarget: () => this.overlay.trigger(),\n });\n /** Its own `disabled`, or the field's. */\n readonly isDisabled = computed(\n () => this.disabled() || this.field.disabled(),\n );\n /** The highlighted item's id. */\n readonly highlighted = signal<string | null>(null);\n private readonly registered = new Map<HTMLElement, ComboboxItemInfo>();\n /** Follows the registered items, so `data-empty` and the pending highlight follow. */\n readonly itemCount = signal(0);\n readonly list = signal<HTMLElement | null>(null);\n readonly button = signal<HTMLElement | null>(null);\n readonly inputGroup = signal<HTMLElement | null>(null);\n readonly chips = signal<HTMLElement | null>(null);\n readonly clearButton = signal<HTMLElement | null>(null);\n readonly listId = `${injectId(\"primitives-combobox\")}-list`;\n /** What to highlight once the list renders, after the keyboard or a press opened it. */\n readonly pendingHighlight = signal<PendingHighlight>(null);\n readonly placed = placementSignal({ side: \"bottom\", align: \"start\" });\n /** The input's text changed by typing since the list opened. */\n private readonly typed = signal(false);\n private readonly flush = injectFlush();\n\n readonly state = computed<ComboboxState>(() => ({\n open: this.overlay.open(),\n disabled: this.isDisabled(),\n value: this.value(),\n inputValue: this.inputValue(),\n }));\n\n private readonly resolvedFilter = computed(() => {\n const filter = this.filter() as\n | ItemFilter<ComboboxItemValue>\n | null\n | undefined;\n return filter === undefined\n ? containsFilter<ComboboxItemValue>(this.locale())\n : filter;\n });\n /** Whether the Root has `items` (it filters them). */\n readonly hasItems = computed(() => this.items() !== undefined);\n /** The matching entries: items, or groups with their matching items. */\n readonly entries = computed<readonly ComboboxItemValue[]>(() => {\n const items = this.items();\n if (items === undefined) {\n return NONE;\n }\n const query = this.inputValue().trim();\n const values = this.values();\n // a single combobox that opened on its selected item's label shows every item\n const whole =\n !this.multiple() &&\n !this.typed() &&\n values.length > 0 &&\n queryIsLabel(this.label(values[0]), query, this.locale());\n return filterItems(items, whole ? \"\" : query, {\n filter: this.resolvedFilter(),\n limit: this.limit(),\n itemToString: (item) => this.label(item),\n });\n });\n /** Whether the list holds no item: no matching entry, or no rendered Item without `items`. */\n readonly empty = computed(() =>\n this.hasItems() ? this.entries().length === 0 : this.itemCount() === 0,\n );\n\n constructor() {\n const hidden = this.hidden;\n effect(() => {\n const multiple = this.multiple();\n const values = this.values();\n setInputAttribute(\n hidden,\n \"name\",\n multiple ? null : (this.fieldName() ?? null),\n );\n hidden.value = multiple ? \"\" : this.formValue(this.value());\n hidden.required = multiple\n ? this.required() && values.length === 0\n : this.required();\n hidden.disabled = this.isDisabled();\n });\n // `multiple`: one `type=\"hidden\"` input per value, in value order, after the hidden input\n let formEntries: HTMLInputElement[] = [];\n afterRenderEffect(() => {\n const name = this.fieldName();\n const values = this.multiple() ? this.values() : NONE;\n const disabled = this.isDisabled();\n untracked(() => {\n for (const entry of formEntries) {\n entry.remove();\n }\n formEntries = [];\n if (name === undefined || hidden.parentNode === null) {\n return;\n }\n let after: Node = hidden;\n for (const item of values) {\n const entry = hidden.ownerDocument.createElement(\"input\");\n entry.type = \"hidden\";\n entry.name = name;\n entry.setAttribute(\"value\", this.formValue(item));\n entry.disabled = disabled;\n entry.setAttribute(\n \"data-primitives-part\",\n \"combobox-hidden-input\",\n );\n after.parentNode?.insertBefore(entry, after.nextSibling);\n after = entry;\n formEntries.push(entry);\n }\n });\n });\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = bridgeForm(hidden, {\n reset: () => this.reset(),\n invalid: () => this.overlay.trigger(),\n });\n });\n inject(DestroyRef).onDestroy(() => {\n stop?.();\n for (const entry of formEntries) {\n entry.remove();\n }\n });\n }\n\n /** The field's `name`, else its own. */\n private fieldName(): string | undefined {\n return this.field.name() ?? this.name();\n }\n\n /** An item's text (`itemToStringLabel`). */\n label(item: ComboboxItemValue): string {\n return itemLabel(\n item,\n this.itemToStringLabel() as\n | ((item: ComboboxItemValue) => string)\n | undefined,\n );\n }\n\n /** An item's form value (`itemToStringValue`). */\n formValue(item: ComboboxItemValue): string {\n return itemFormValue(\n item,\n this.itemToStringValue() as\n | ((item: ComboboxItemValue) => string)\n | undefined,\n );\n }\n\n isSelected(item: ComboboxItemValue): boolean {\n return includesItem(this.values(), item, this.equality());\n }\n\n setInputValue(next: string, reason: ChangeReason): void {\n this.text.set(next, { reason });\n }\n\n /** The input's text changed by typing. */\n markTyped(): void {\n this.typed.set(true);\n }\n\n /**\n * Opens or closes the list, and renders it at once; returns whether it changed. Closing\n * without a choice resets the text (spec/combobox.md, \"Choosing an item\"); a close the\n * consumer cancels leaves the list, its text and highlight as they are.\n */\n setOpen(next: boolean, reason: ChangeReason, event?: Event): boolean {\n if (next && reason !== \"input-change\") {\n this.typed.set(false);\n }\n const changed = this.overlay.setOpen(next, reason, event);\n if (next || !changed) {\n return changed;\n }\n this.typed.set(false);\n if (reason !== \"item-press\") {\n const text = this.multiple() ? \"\" : this.label(this.value());\n if (untracked(this.inputValue) !== text) {\n this.text.set(text, {\n reason: text === \"\" ? \"input-clear\" : \"none\",\n });\n }\n }\n // a list reopened during its exit animation starts with no highlight\n this.highlighted.set(null);\n this.pendingHighlight.set(null);\n this.flush();\n return changed;\n }\n\n /** Chooses an item (spec/combobox.md, \"Choosing an item\"). */\n choose(item: ComboboxItemValue): void {\n this.highlighted.set(null);\n if (!this.multiple()) {\n this.selection.set(item, { reason: \"item-press\" });\n this.text.set(this.label(item), { reason: \"item-press\" });\n this.setOpen(false, \"item-press\");\n return;\n }\n this.selection.set(toggleItem(this.values(), item, this.equality()), {\n reason: \"item-press\",\n });\n if (this.inputValue().trim() !== \"\") {\n this.text.set(\"\", { reason: \"input-clear\" });\n this.setOpen(false, \"item-press\");\n } else {\n this.flush();\n }\n }\n\n /** Clears the text and the value. */\n clear(reason: ChangeReason): void {\n this.text.set(\"\", { reason });\n this.selection.set(this.multiple() ? [] : null, { reason });\n this.highlighted.set(null);\n this.flush();\n }\n\n /** Removes the value at `index` (`multiple`), and renders at once. */\n removeAt(index: number, reason: ChangeReason): void {\n this.selection.set(\n this.values().filter((_, at) => at !== index),\n { reason },\n );\n this.flush();\n }\n\n /** Moves the highlight, and renders it before the next key. */\n highlight(id: string | null): void {\n this.highlighted.set(id);\n this.flush();\n }\n\n /** The rendered items of the list, in order. */\n orderedItems(): ComboboxItemInfo[] {\n const list = this.list();\n if (list === null) {\n return [];\n }\n return [...list.querySelectorAll<HTMLElement>('[role=\"option\"]')]\n .map((element) => this.registered.get(element))\n .filter((item): item is ComboboxItemInfo => item !== undefined);\n }\n\n /** Whether every option rendered in the list has registered. */\n itemsRegistered(): boolean {\n const list = this.list();\n return (\n list === null ||\n [...list.querySelectorAll<HTMLElement>('[role=\"option\"]')].every(\n (element) => this.registered.has(element),\n )\n );\n }\n\n /** The rendered chips, in value order. */\n chipElements(): HTMLElement[] {\n const chips = this.chips();\n if (chips === null) {\n return [];\n }\n return [\n ...chips.querySelectorAll<HTMLElement>(\n '[data-primitives-part=\"combobox-chip\"]',\n ),\n ];\n }\n\n registerItem(element: HTMLElement, info: ComboboxItemInfo): () => void {\n this.registered.set(element, info);\n this.itemCount.set(this.registered.size);\n return () => {\n this.registered.delete(element);\n this.itemCount.set(this.registered.size);\n };\n }\n\n /** A press on the input opens the list, on the selected item in single mode. */\n openOnPress(): void {\n if (this.overlay.open() || this.isDisabled()) {\n return;\n }\n this.pendingHighlight.set(this.multiple() ? null : \"selected\");\n this.setOpen(true, \"input-press\");\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 */\n pressToOpen(event: MouseEvent): void {\n const target = event.target as Element | null;\n const input = this.overlay.trigger();\n if (\n target === null ||\n target === input ||\n target.closest('button, [data-primitives-part=\"combobox-chip\"]') !==\n null\n ) {\n return;\n }\n event.preventDefault();\n if (this.isDisabled()) {\n return;\n }\n input?.focus();\n this.openOnPress();\n }\n\n /** A form reset: the default value, and its label in the input. */\n private reset(): void {\n const fallback = this.fallbackValue();\n this.field.reset();\n this.selection.set(fallback, { reason: \"none\" });\n this.text.set(this.multiple() ? \"\" : this.label(fallback), {\n reason: \"none\",\n });\n this.flush();\n // the browser reset the elements after the state changed: a state that did not change\n // is not written again\n const input = this.overlay.trigger();\n if (input instanceof HTMLInputElement) {\n input.value = this.inputValue();\n }\n this.hidden.value = this.multiple() ? \"\" : this.formValue(this.value());\n }\n\n /** Closes the list (reason `imperative-action`). */\n close(): void {\n this.setOpen(false, \"imperative-action\");\n }\n\n /** Ends a running exit now, or the exit held by `preventUnmountOnClose()`. */\n unmount(): void {\n this.overlay.unmount();\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport { chipKeyTarget } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport {\n dataValues,\n injectHost,\n injectProvidedDirection,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * One value of a `multiple` combobox; the arrows move between chips (spec/combobox.md):\n * `<div comboboxChip>`, one per value, in value order.\n */\n@Directive({\n selector: \"[comboboxChip]\",\n exportAs: \"comboboxChip\",\n host: {\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-chip\",\n \"[attr.aria-disabled]\": \"state().disabled ? 'true' : null\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(keydown)\": \"onKeyDown($event)\",\n },\n})\nexport class ComboboxChip {\n /** A DirectionProvider's direction, else `null` (the computed one is read). */\n private readonly direction = injectProvidedDirection();\n private readonly root = inject(ComboboxRoot);\n /** The chip's element, read when a key or a press removes it. */\n readonly element = injectHost();\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n if (\n this.state().disabled ||\n event.ctrlKey ||\n event.metaKey ||\n event.altKey\n ) {\n return;\n }\n const chips = root.chipElements();\n const index = chips.indexOf(this.element);\n const action = chipKeyTarget(\n event.key,\n index,\n chips.length,\n getDirection(this.element, this.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.remove) {\n // rendered at once: the focus target is a chip of the new list\n root.removeAt(index, \"none\");\n }\n if (action.open) {\n root.setOpen(true, \"list-navigation\");\n }\n const target =\n action.focus === \"input\"\n ? root.overlay.trigger()\n : root.chipElements()[action.focus];\n target?.focus();\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport { dataValues } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxChip } from \"./combobox-chip.directive.ts\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Removes its chip's value and returns focus to the input: `<button comboboxChipRemove>`. */\n@Directive({\n selector: \"[comboboxChipRemove]\",\n exportAs: \"comboboxChipRemove\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-chip-remove\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick()\",\n },\n})\nexport class ComboboxChipRemove {\n private readonly root = inject(ComboboxRoot);\n private readonly chip = inject(ComboboxChip);\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n protected onClick(): void {\n const root = this.root;\n const index = root.chipElements().indexOf(this.chip.element);\n if (index >= 0) {\n root.removeAt(index, \"chip-remove-press\");\n }\n root.overlay.trigger()?.focus();\n }\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { registerHost } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * `multiple`: holds the chips and the Input; a `toolbar` while it holds a chip (spec/combobox.md):\n * `<div comboboxChips>`.\n */\n@Directive({\n selector: \"[comboboxChips]\",\n exportAs: \"comboboxChips\",\n host: {\n \"data-primitives-part\": \"combobox-chips\",\n \"[attr.role]\": \"root.values().length > 0 ? 'toolbar' : null\",\n \"(mousedown)\": \"root.pressToOpen($event)\",\n },\n})\nexport class ComboboxChips {\n protected readonly root = inject(ComboboxRoot);\n\n constructor() {\n registerHost(this.root.chips);\n }\n}\n","import { computed, DestroyRef, Directive, effect, inject } from \"@angular/core\";\nimport {\n conditionalView,\n dataValue,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * Clears the text and the value; structural, so it is rendered only while there is a value\n * (spec/combobox.md): `<button *comboboxClear aria-label=\"Clear fruit\">×</button>`. The directive\n * writes its attributes on the element it renders, and keeps focus in the input.\n */\n@Directive({ selector: \"[comboboxClear]\", exportAs: \"comboboxClear\" })\nexport class ComboboxClear {\n private readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({ disabled: this.root.isDisabled() }));\n\n constructor() {\n const root = this.root;\n const onPointerDown = (event: Event) => event.preventDefault();\n const onClick = () => {\n root.clear(\"clear-press\");\n root.overlay.trigger()?.focus();\n };\n const element = conditionalView(\n computed(() => root.values().length > 0),\n (button) => {\n writeAttributes(button, {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-clear\",\n });\n button.addEventListener(\"pointerdown\", onPointerDown);\n button.addEventListener(\"click\", onClick);\n },\n );\n effect((onCleanup) => {\n const button = element();\n const disabled = this.state().disabled;\n if (button === null) {\n return;\n }\n writeAttributes(button, {\n disabled: disabled ? \"\" : null,\n \"data-disabled\": dataValue(disabled),\n });\n root.clearButton.set(button);\n onCleanup(() => {\n if (root.clearButton() === button) {\n root.clearButton.set(null);\n }\n });\n });\n inject(DestroyRef).onDestroy(() => root.clearButton.set(null));\n }\n}\n","import { afterRenderEffect, Directive, inject, untracked } from \"@angular/core\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * A polite live region, always rendered; its children are shown only while the list is empty\n * (spec/combobox.md): `<div comboboxEmpty>No fruit found.</div>`. A live region must exist before\n * its text changes, so the element stays and the directive takes its child nodes out, keeping\n * them (and Angular's bindings in them) until the list is empty again.\n */\n@Directive({\n selector: \"[comboboxEmpty]\",\n host: {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-empty\",\n },\n})\nexport class ComboboxEmpty {\n private readonly root = inject(ComboboxRoot);\n\n constructor() {\n const host = injectHost();\n const kept = document.createDocumentFragment();\n afterRenderEffect({\n write: () => {\n const empty = this.root.empty();\n untracked(() => {\n if (empty) {\n host.append(kept);\n } else {\n kept.append(...host.childNodes);\n }\n });\n },\n });\n }\n}\n","import { Directive } from \"@angular/core\";\nimport { injectId } from \"@fragiola/primitives-angular/internal\";\n\n/** A `group` of items, named by its GroupLabel (spec/combobox.md): `<div comboboxGroup>`. */\n@Directive({\n selector: \"[comboboxGroup]\",\n exportAs: \"comboboxGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"combobox-group\",\n \"[attr.aria-labelledby]\": \"labelId\",\n },\n})\nexport class ComboboxGroup {\n /** Its GroupLabel's id. */\n readonly labelId = `${injectId(\"primitives-combobox-group\")}-label`;\n}\n","import { Directive } from \"@angular/core\";\nimport { injectEnclosing } from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxGroup } from \"./combobox-group.directive.ts\";\n\n/** Names its Group: `<div comboboxGroupLabel>`. */\n@Directive({\n selector: \"[comboboxGroupLabel]\",\n host: {\n \"data-primitives-part\": \"combobox-group-label\",\n \"[attr.id]\": \"group.labelId\",\n },\n})\nexport class ComboboxGroupLabel {\n protected readonly group = injectEnclosing(\n ComboboxGroup,\n \"comboboxGroup\",\n \"ComboboxGroupLabel\",\n );\n}\n","import { afterNextRender, computed, Directive, inject } from \"@angular/core\";\nimport { chipArrows, stepThroughNone } from \"@fragiola/primitives/collection\";\nimport { getDirection } from \"@fragiola/primitives/direction\";\nimport { writeFieldAria } from \"@fragiola/primitives-angular/field\";\nimport {\n dataValues,\n injectFlush,\n injectProvidedDirection,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n ComboboxRoot,\n type PendingHighlight,\n} from \"./combobox-root.directive.ts\";\n\n/**\n * The `combobox`: `<input comboboxInput>`. It keeps DOM focus while the list is open; the\n * highlighted item is announced with `aria-activedescendant` (spec/combobox.md, \"Keyboard\").\n */\n@Directive({\n selector: \"input[comboboxInput]\",\n exportAs: \"comboboxInput\",\n host: {\n type: \"text\",\n role: \"combobox\",\n autocomplete: \"off\",\n \"aria-autocomplete\": \"list\",\n \"data-primitives-part\": \"combobox-input\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[value]\": \"root.inputValue()\",\n // the attribute follows the value, as React's controlled input: a server render writes\n // it, so the page rendered in the browser alone has it too (spec/README.md, \"Server\n // rendering\")\n \"[attr.value]\": \"root.inputValue()\",\n \"[attr.aria-expanded]\": \"String(state().open)\",\n \"[attr.aria-controls]\": \"root.listId\",\n \"[attr.aria-activedescendant]\": \"activeId()\",\n \"[attr.data-invalid]\": \"root.field.data().invalid\",\n \"[attr.data-valid]\": \"root.field.data().valid\",\n \"[attr.data-dirty]\": \"root.field.data().dirty\",\n \"[attr.data-touched]\": \"root.field.data().touched\",\n \"[attr.data-filled]\": \"root.field.data().filled\",\n \"[attr.data-focused]\": \"root.field.data().focused\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(input)\": \"onInput()\",\n \"(click)\": \"root.openOnPress()\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(focus)\": \"root.field.focused()\",\n \"(blur)\": \"root.field.blurred()\",\n },\n})\nexport class ComboboxInput {\n /** A DirectionProvider's direction, else `null` (the computed one is read). */\n private readonly direction = injectProvidedDirection();\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n /** The highlighted item, while the list is open and the item is rendered. */\n private readonly active = computed(() => {\n this.root.itemCount();\n const highlighted = this.root.highlighted();\n if (!this.state().open || highlighted === null) {\n return undefined;\n }\n return this.root.orderedItems().find((item) => item.id === highlighted);\n });\n protected readonly activeId = computed(() => this.active()?.id ?? null);\n protected readonly String = String;\n private readonly input = registerHost<HTMLInputElement>(\n this.root.overlay.singleTrigger,\n );\n private readonly flush = injectFlush();\n\n constructor() {\n const { field } = this.root;\n const host = this.input;\n writeFieldAria(field, host, {\n \"aria-labelledby\": field.labelledBy,\n \"aria-describedby\": field.describedBy,\n \"aria-invalid\": field.ariaInvalid,\n });\n // the consumer's own id wins (the label's `for` points at it)\n afterNextRender(() => {\n if (host.id === \"\") {\n host.id = this.root.overlay.triggerId;\n }\n this.root.inputElementId.set(host.id);\n });\n }\n\n protected onInput(): void {\n const root = this.root;\n root.setInputValue(this.input.value, \"input-change\");\n root.highlighted.set(null);\n root.markTyped();\n // typing highlights nothing, or the first item the text keeps (`autoHighlight`): drop\n // what an earlier key asked for\n root.pendingHighlight.set(\n root.autoHighlight() && this.input.value !== \"\" ? \"typed\" : null,\n );\n if (!root.overlay.open()) {\n root.setOpen(true, \"input-change\");\n }\n // a bound `inputValue` the consumer kept unchanged does not re-run the binding: put the\n // accepted text back (React re-asserts a controlled value too)\n this.flush();\n if (this.input.value !== root.inputValue()) {\n this.input.value = root.inputValue();\n }\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n const input = this.input;\n const open = root.overlay.open();\n const openWith = (highlight: PendingHighlight) => {\n root.pendingHighlight.set(highlight);\n root.setOpen(true, \"list-navigation\");\n };\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);\n } else if (event.key === \"ArrowUp\" && open) {\n root.setOpen(false, \"list-navigation\");\n }\n return;\n }\n if (!open) {\n openWith(event.key === \"ArrowDown\" ? \"first\" : \"last\");\n return;\n }\n // past an end, the visual focus goes back to the input; from the input, to the\n // near end\n const items = root.orderedItems();\n const index = items.findIndex(\n (item) => item.id === root.highlighted(),\n );\n const delta = event.key === \"ArrowDown\" ? 1 : -1;\n root.highlight(\n items[stepThroughNone(items.length, index, delta)]?.id ??\n null,\n );\n return;\n }\n case \"Enter\":\n if (open) {\n event.preventDefault();\n const active = this.active();\n if (active !== undefined && !active.disabled) {\n root.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 (root.inputValue() !== \"\" || root.values().length > 0)\n ) {\n event.preventDefault();\n root.clear(\"escape-key\");\n }\n return;\n case \"Tab\":\n if (open) {\n root.setOpen(false, \"focus-out\");\n }\n return;\n case \"Backspace\":\n if (\n root.multiple() &&\n input.value === \"\" &&\n root.values().length > 0\n ) {\n root.removeAt(root.values().length - 1, \"none\");\n }\n return;\n default: {\n const chips = root.chipElements();\n if (\n root.multiple() &&\n event.key ===\n chipArrows(\n getDirection(input, this.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","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Holds the Input and its buttons; anchors the list (spec/combobox.md): `<div comboboxInputGroup>`. */\n@Directive({\n selector: \"[comboboxInputGroup]\",\n exportAs: \"comboboxInputGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"combobox-input-group\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(mousedown)\": \"root.pressToOpen($event)\",\n },\n})\nexport class ComboboxInputGroup {\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n registerHost(this.root.inputGroup);\n }\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n untracked,\n} from \"@angular/core\";\nimport { scrollIntoViewWithin } from \"@fragiola/primitives/collection\";\nimport {\n dataValues,\n injectHost,\n injectId,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n} from \"./combobox-root.directive.ts\";\n\nexport interface ComboboxItemState {\n highlighted: boolean;\n selected: boolean;\n disabled: boolean;\n}\n\n/**\n * An `option`: `<div comboboxItem [value]=\"fruit\">`. When chosen, the input's text becomes\n * `itemToStringLabel(value)`. A disabled item can be highlighted, never chosen.\n */\n@Directive({\n selector: \"[comboboxItem]\",\n exportAs: \"comboboxItem\",\n host: {\n role: \"option\",\n \"data-primitives-part\": \"combobox-item\",\n \"[attr.id]\": \"id\",\n \"[attr.aria-selected]\": \"state().selected ? 'true' : null\",\n \"[attr.aria-disabled]\": \"state().disabled ? 'true' : null\",\n \"[attr.data-highlighted]\": \"data().highlighted\",\n \"[attr.data-selected]\": \"data().selected\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointermove)\": \"onPointerMove()\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick()\",\n },\n})\nexport class ComboboxItem {\n private readonly root = inject(ComboboxRoot);\n readonly value = input.required<ComboboxItemValue>();\n readonly disabled = input(false, { transform: booleanAttribute });\n protected readonly id = injectId(\"primitives-combobox-item\");\n readonly state = computed<ComboboxItemState>(() => ({\n highlighted: this.root.highlighted() === this.id,\n selected: this.root.isSelected(this.value()),\n disabled: this.disabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n const host = injectHost();\n const root = this.root;\n let unregister: (() => void) | null = null;\n effect(() => {\n const value = this.value();\n const disabled = this.disabled();\n untracked(() => {\n unregister?.();\n unregister = root.registerItem(host, {\n value,\n disabled,\n id: this.id,\n });\n });\n });\n inject(DestroyRef).onDestroy(() => unregister?.());\n // within the popup only: a list that mounts before it is placed never scrolls the page\n afterRenderEffect(() => {\n if (this.state().highlighted) {\n scrollIntoViewWithin(host, this.root.overlay.positioner());\n }\n });\n }\n\n protected onPointerMove(): void {\n if (!this.state().highlighted) {\n this.root.highlighted.set(this.id);\n }\n }\n\n protected onClick(): void {\n if (!this.disabled()) {\n this.root.choose(this.value());\n }\n }\n}\n","import { computed, Directive, inject, input } from \"@angular/core\";\nimport {\n conditionalView,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxItem } from \"./combobox-item.directive.ts\";\n\n/**\n * Marks a selected item, hidden from assistive technologies (spec/combobox.md); structural, so it\n * is rendered only while its item is selected: `<span *comboboxItemIndicator>✓</span>`, or\n * `*comboboxItemIndicator=\"true\"` to keep it. The directive writes its attributes on the element\n * it renders.\n */\n@Directive({\n selector: \"[comboboxItemIndicator]\",\n exportAs: \"comboboxItemIndicator\",\n})\nexport class ComboboxItemIndicator {\n private readonly item = inject(ComboboxItem);\n /** Rendered while the item is not selected too. */\n readonly keepMounted = input(false, {\n alias: \"comboboxItemIndicator\",\n // `*comboboxItemIndicator` alone gives \"\": not kept\n transform: (value: unknown) => value === true || value === \"true\",\n });\n readonly state = computed(() => ({\n selected: this.item.state().selected,\n }));\n\n constructor() {\n conditionalView(\n computed(() => this.state().selected || this.keepMounted()),\n (element) =>\n writeAttributes(element, {\n \"aria-hidden\": \"true\",\n \"data-primitives-part\": \"combobox-item-indicator\",\n }),\n );\n }\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n inject,\n untracked,\n} from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n} from \"./combobox-root.directive.ts\";\n\n/**\n * The `listbox`: `<div comboboxList #list=\"comboboxList\">`. With the Root's `items`, its\n * `entries()` are the matching items, or groups with their matching items: the consumer renders\n * them with `@for (entry of list.entries(); ...)` (the List's render function in Angular).\n * Applies the highlight the keyboard asked for once its items render.\n */\n@Directive({\n selector: \"[comboboxList]\",\n exportAs: \"comboboxList\",\n host: {\n role: \"listbox\",\n \"data-primitives-part\": \"combobox-list\",\n \"[attr.id]\": \"root.listId\",\n \"[attr.aria-multiselectable]\": \"root.multiple() ? 'true' : null\",\n \"[attr.data-empty]\": \"data().empty\",\n },\n})\nexport class ComboboxList {\n protected readonly root = inject(ComboboxRoot);\n /** The matching entries (with the Root's `items`). */\n readonly entries = computed<readonly ComboboxItemValue[]>(() =>\n this.root.entries(),\n );\n readonly state = computed(() => ({ empty: this.root.empty() }));\n protected readonly data = computed(() => dataValues(this.state()));\n\n constructor() {\n const root = this.root;\n registerHost(root.list);\n afterRenderEffect(() => {\n const list = root.list();\n const pending = root.pendingHighlight();\n root.itemCount();\n // runs when the list opens too: a list reopened while it closes keeps its element\n root.overlay.open();\n if (list === null || pending === null) {\n return;\n }\n untracked(() => {\n // the rendered options register after the list: wait for every one of them\n if (!root.itemsRegistered()) {\n return;\n }\n root.pendingHighlight.set(null);\n const items = root.orderedItems();\n if (pending === \"typed\") {\n root.highlighted.set(items[0]?.id ?? null);\n return;\n }\n const selected = root.multiple()\n ? undefined\n : items.find((item) => root.isSelected(item.value));\n const edge = pending === \"first\" ? items[0] : items.at(-1);\n const target =\n selected ?? (pending === \"selected\" ? undefined : edge);\n root.highlighted.set(target?.id ?? null);\n });\n });\n }\n}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** The floating container of the list (no role of its own): `<div comboboxPopup>`. */\n@Directive({\n selector: \"[comboboxPopup]\",\n exportAs: \"comboboxPopup\",\n host: {\n \"data-primitives-part\": \"combobox-popup\",\n \"[attr.data-open]\": \"data().open\",\n \"[attr.data-closed]\": \"data().closed\",\n \"[attr.data-side]\": \"data().side\",\n \"[attr.data-align]\": \"data().align\",\n \"[attr.data-starting-style]\": \"data()['starting-style']\",\n \"[attr.data-ending-style]\": \"data()['ending-style']\",\n },\n})\nexport class ComboboxPopup {\n private readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n ...this.root.placed(),\n }));\n protected readonly data = computed(() => {\n const status = this.root.overlay.presence.status();\n const state = this.state();\n return dataValues({\n ...state,\n closed: !state.open,\n \"starting-style\": status === \"starting\",\n \"ending-style\": status === \"ending\",\n });\n });\n\n constructor() {\n registerHost(this.root.overlay.popup);\n }\n}\n","import { Directive, inject, input } from \"@angular/core\";\nimport {\n mountPortal,\n type OverlayPortalOptions,\n portalOptions,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/**\n * Moves the positioner to the end of `body` while the list is open or closing (always with\n * `keepMounted`): `*comboboxPortal`.\n */\n@Directive({ selector: \"[comboboxPortal]\" })\nexport class ComboboxPortal {\n /**\n * `container` (default: `document.body`), `keepMounted` (default `false`: rendered, hidden, while\n * closed); an element: the container alone (`*comboboxPortal=\"element\"`).\n */\n readonly options = input<OverlayPortalOptions, unknown>(\n {},\n { alias: \"comboboxPortal\", transform: portalOptions },\n );\n\n constructor() {\n mountPortal(\n inject(ComboboxRoot).overlay.presence.mounted,\n this.options,\n );\n }\n}\n","import {\n afterRenderEffect,\n computed,\n Directive,\n inject,\n input,\n untracked,\n} from \"@angular/core\";\nimport { openOverlaySession } from \"@fragiola/primitives/overlay\";\nimport type { Align, Side } from \"@fragiola/primitives/positioning\";\nimport {\n dataValues,\n positionOverlay,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\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): `<div comboboxPositioner>`.\n */\n@Directive({\n selector: \"[comboboxPositioner]\",\n exportAs: \"comboboxPositioner\",\n host: {\n role: \"presentation\",\n \"data-primitives-part\": \"combobox-positioner\",\n \"[attr.hidden]\": \"root.overlay.presence.mounted() ? null : ''\",\n \"[attr.data-open]\": \"data().open\",\n \"[attr.data-closed]\": \"data().closed\",\n \"[attr.data-side]\": \"data().side\",\n \"[attr.data-align]\": \"data().align\",\n },\n})\nexport class ComboboxPositioner {\n protected readonly root = inject(ComboboxRoot);\n readonly side = input<Side | undefined>(undefined);\n readonly align = input<Align | undefined>(undefined);\n readonly sideOffset = input<number | undefined>(undefined);\n readonly alignOffset = input<number | undefined>(undefined);\n readonly collisionPadding = input<number | undefined>(undefined);\n readonly anchor = input<Element | null | undefined>(undefined);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n ...this.root.placed(),\n }));\n protected readonly data = computed(() =>\n dataValues({ ...this.state(), closed: !this.state().open }),\n );\n\n constructor() {\n const root = this.root;\n const overlay = root.overlay;\n const positioner = registerHost(overlay.positioner);\n positionOverlay(\n this,\n { side: \"bottom\", align: \"start\" },\n {\n anchor: computed(\n () =>\n root.inputGroup() ?? root.chips() ?? overlay.trigger(),\n ),\n positioner,\n mounted: overlay.presence.mounted,\n },\n root.placed,\n );\n afterRenderEffect((onCleanup) => {\n const open = overlay.open();\n const ignored = [\n overlay.trigger(),\n root.button(),\n root.inputGroup(),\n root.chips(),\n root.clearButton(),\n ];\n if (!open) {\n return;\n }\n untracked(() => {\n const session = openOverlaySession(positioner.ownerDocument, {\n elements: () => [positioner],\n ignore: () => ignored,\n dismiss: (reason, event) =>\n root.setOpen(false, reason, event),\n });\n onCleanup(session.end);\n });\n });\n }\n}\n","import { Directive } from \"@angular/core\";\n\n/** Between groups; no role of its own (a `listbox` owns only groups and options). */\n@Directive({\n selector: \"[comboboxSeparator]\",\n host: {\n role: \"presentation\",\n \"data-orientation\": \"horizontal\",\n \"data-primitives-part\": \"combobox-separator\",\n },\n})\nexport class ComboboxSeparator {}\n","import { Directive } from \"@angular/core\";\n\n/** A polite live region for the consumer's text (spec/combobox.md): `<div comboboxStatus>`. */\n@Directive({\n selector: \"[comboboxStatus]\",\n host: {\n role: \"status\",\n \"aria-live\": \"polite\",\n \"aria-atomic\": \"true\",\n \"data-primitives-part\": \"combobox-status\",\n },\n})\nexport class ComboboxStatus {}\n","import { computed, Directive, inject } from \"@angular/core\";\nimport {\n dataValues,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { ComboboxRoot } from \"./combobox-root.directive.ts\";\n\n/** Toggles the list; not in the tab order, keeps focus in the input: `<button comboboxTrigger>`. */\n@Directive({\n selector: \"[comboboxTrigger]\",\n exportAs: \"comboboxTrigger\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"combobox-trigger\",\n \"[attr.disabled]\": \"data().disabled\",\n \"[attr.aria-expanded]\": \"String(state().open)\",\n \"[attr.aria-controls]\": \"root.listId\",\n \"[attr.data-popup-open]\": \"data().open\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"(pointerdown)\": \"$event.preventDefault()\",\n \"(click)\": \"onClick($event)\",\n },\n})\nexport class ComboboxTrigger {\n protected readonly root = inject(ComboboxRoot);\n readonly state = computed(() => ({\n open: this.root.overlay.open(),\n disabled: this.root.isDisabled(),\n }));\n protected readonly data = computed(() => dataValues(this.state()));\n protected readonly String = String;\n\n constructor() {\n registerHost(this.root.button);\n }\n\n protected onClick(event: MouseEvent): void {\n const root = this.root;\n root.pendingHighlight.set(null);\n root.setOpen(!root.overlay.open(), \"trigger-press\", event);\n root.overlay.trigger()?.focus();\n }\n}\n","import type { Signal } from \"@angular/core\";\nimport { injectEnclosing } from \"@fragiola/primitives-angular/internal\";\nimport {\n type ComboboxItemValue,\n ComboboxRoot,\n type ComboboxState,\n} from \"../directives/combobox-root.directive.ts\";\n\n/** The part hook of the enclosing `[comboboxRoot]`: its state, and `choose` / `clear`. */\nexport function injectCombobox(): {\n state: Signal<ComboboxState>;\n choose: (item: ComboboxItemValue) => void;\n clear: () => void;\n} {\n const root = injectEnclosing(\n ComboboxRoot,\n \"comboboxRoot\",\n \"injectCombobox\",\n );\n return {\n state: root.state,\n choose: (item) => root.choose(item),\n clear: () => root.clear(\"none\"),\n };\n}\n"],"mappings":";;;;;;;;AA+EA,MAAM,OAAqC,CAAA;AAU3C,IAAa,eAAb,MAAa,aAAY;CA2KrB,cAAA;EAzKS,KAAA,QAAQ,MAAgD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAKlE,KAAA,SAAS,MAAyC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAE5D,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACjB,KAAA,SAAS,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAC7C,KAAA,WAAW,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAErD,KAAA,gBAAgB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,gBAAA,+BAAA,CAAA;GAAI,WAAW;EAAgB,CAAA;EAC1D,KAAA,OAAO,MAA2B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAC5C,KAAA,aAAa,OAAM;EACnB,KAAA,cAAc,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAE1B,KAAA,oBAAoB,OAAM;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B3B,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;GACV,MAAM;IACF,MAAM;IACN,UAAU;IACV,wBAAwB;IACxB,mBAAmB;IACnB,wBAAwB;IACxB,wBAAwB;IACxB,0BAA0B;IAC1B,wBAAwB;IACxB,iBAAiB;IACjB,WAAW;GACd;EACJ,CAAA;;;;ACdD,SAAgB,iBAAc;CAK1B,MAAM,OAAO,gBACT,cACA,gBACA,gBAAgB;CAEpB,OAAO;EACH,OAAO,KAAK;EACZ,SAAS,SAAS,KAAK,OAAO,IAAI;EAClC,aAAa,KAAK,MAAM,MAAM;CACjC;AACL"}
|
|
@@ -8,7 +8,10 @@ function stepperButton(root, direction) {
|
|
|
8
8
|
const host = injectHost();
|
|
9
9
|
let stop = null;
|
|
10
10
|
afterNextRender(() => {
|
|
11
|
-
stop = watchAutoRepeat(host, {
|
|
11
|
+
stop = watchAutoRepeat(host, {
|
|
12
|
+
onStep: (event) => root.stepBy(direction * root.amount(event), direction > 0 ? "increment-press" : "decrement-press", event),
|
|
13
|
+
onEnd: (event) => root.commit(event)
|
|
14
|
+
});
|
|
12
15
|
});
|
|
13
16
|
inject(DestroyRef).onDestroy(() => stop?.());
|
|
14
17
|
return { disabled: computed(() => {
|
|
@@ -29,6 +32,7 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
29
32
|
this.valueChange = output();
|
|
30
33
|
this.defaultValue = input(null, ...ngDevMode ? [{ debugName: "defaultValue" }] : /* istanbul ignore next */ []);
|
|
31
34
|
this.valueChangeDetails = output();
|
|
35
|
+
this.valueCommitted = output();
|
|
32
36
|
this.min = input(void 0, {
|
|
33
37
|
...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
|
|
34
38
|
transform: optionalNumber
|
|
@@ -85,6 +89,7 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
85
89
|
value,
|
|
86
90
|
details
|
|
87
91
|
}));
|
|
92
|
+
this.pending = null;
|
|
88
93
|
this.typed = signal(null, ...ngDevMode ? [{ debugName: "typed" }] : /* istanbul ignore next */ []);
|
|
89
94
|
this.scrubbing = signal(false, ...ngDevMode ? [{ debugName: "scrubbing" }] : /* istanbul ignore next */ []);
|
|
90
95
|
this.cursor = signal(null, ...ngDevMode ? [{ debugName: "cursor" }] : /* istanbul ignore next */ []);
|
|
@@ -189,6 +194,7 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
189
194
|
reason,
|
|
190
195
|
event
|
|
191
196
|
});
|
|
197
|
+
if (commitsAtOnce(reason)) this.commit(event);
|
|
192
198
|
const bound = amount > 0 ? max : min;
|
|
193
199
|
return bound === void 0 || next !== bound;
|
|
194
200
|
}
|
|
@@ -199,6 +205,7 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
199
205
|
reason,
|
|
200
206
|
event
|
|
201
207
|
});
|
|
208
|
+
if (commitsAtOnce(reason)) this.commit(event);
|
|
202
209
|
}
|
|
203
210
|
inputText(text, event) {
|
|
204
211
|
if (!this.interactive()) return false;
|
|
@@ -231,6 +238,19 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
231
238
|
reason: "input-blur",
|
|
232
239
|
event
|
|
233
240
|
});
|
|
241
|
+
this.commit(event);
|
|
242
|
+
}
|
|
243
|
+
commit(event) {
|
|
244
|
+
const reason = this.pending;
|
|
245
|
+
if (reason === null) return;
|
|
246
|
+
this.pending = null;
|
|
247
|
+
this.valueCommitted.emit({
|
|
248
|
+
value: untracked(this.own.value),
|
|
249
|
+
details: {
|
|
250
|
+
reason,
|
|
251
|
+
event
|
|
252
|
+
}
|
|
253
|
+
});
|
|
234
254
|
}
|
|
235
255
|
interactive() {
|
|
236
256
|
return !untracked(this.isDisabled) && !untracked(this.readOnly);
|
|
@@ -246,6 +266,8 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
246
266
|
return parsed === null || Number.isNaN(parsed) ? value : parsed;
|
|
247
267
|
}
|
|
248
268
|
setValue(next, details) {
|
|
269
|
+
if (details.reason === "none") this.pending = null;
|
|
270
|
+
else if (!Object.is(untracked(this.own.value), next)) this.pending = details.reason;
|
|
249
271
|
this.own.set(next, details);
|
|
250
272
|
this.flush();
|
|
251
273
|
}
|
|
@@ -392,7 +414,8 @@ var NumberFieldRoot = class NumberFieldRoot {
|
|
|
392
414
|
},
|
|
393
415
|
outputs: {
|
|
394
416
|
valueChange: "valueChange",
|
|
395
|
-
valueChangeDetails: "valueChangeDetails"
|
|
417
|
+
valueChangeDetails: "valueChangeDetails",
|
|
418
|
+
valueCommitted: "valueCommitted"
|
|
396
419
|
},
|
|
397
420
|
host: {
|
|
398
421
|
attributes: { "data-primitives-part": "number-field-root" },
|
|
@@ -465,6 +488,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
465
488
|
type: i0.Output,
|
|
466
489
|
args: ["valueChangeDetails"]
|
|
467
490
|
}],
|
|
491
|
+
valueCommitted: [{
|
|
492
|
+
type: i0.Output,
|
|
493
|
+
args: ["valueCommitted"]
|
|
494
|
+
}],
|
|
468
495
|
min: [{
|
|
469
496
|
type: i0.Input,
|
|
470
497
|
args: [{
|
|
@@ -587,6 +614,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
587
614
|
}]
|
|
588
615
|
}
|
|
589
616
|
});
|
|
617
|
+
function commitsAtOnce(reason) {
|
|
618
|
+
return reason === "keyboard" || reason === "wheel";
|
|
619
|
+
}
|
|
590
620
|
var NumberFieldDecrement = class NumberFieldDecrement {
|
|
591
621
|
constructor() {
|
|
592
622
|
this.root = inject(NumberFieldRoot);
|
|
@@ -1029,7 +1059,10 @@ var NumberFieldScrubArea = class NumberFieldScrubArea {
|
|
|
1029
1059
|
const amount = root.amount(event);
|
|
1030
1060
|
root.stepBy(steps > 0 ? amount : -amount, "scrub", event, Math.abs(steps));
|
|
1031
1061
|
},
|
|
1032
|
-
onEnd: () =>
|
|
1062
|
+
onEnd: (event) => {
|
|
1063
|
+
root.scrubbing.set(false);
|
|
1064
|
+
root.commit(event);
|
|
1065
|
+
},
|
|
1033
1066
|
onCursor: (point) => root.cursor.set(point)
|
|
1034
1067
|
}));
|
|
1035
1068
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragiola-primitives-angular-number-field.mjs","names":[],"sources":["../../number-field/utils/stepper-button.ts","../../number-field/directives/number-field-root.directive.ts","../../number-field/directives/number-field-decrement.directive.ts","../../number-field/directives/number-field-group.directive.ts","../../number-field/directives/number-field-increment.directive.ts","../../number-field/directives/number-field-input.directive.ts","../../number-field/directives/number-field-scrub-area.directive.ts","../../number-field/directives/number-field-scrub-area-cursor.directive.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n inject,\n type Signal,\n} from \"@angular/core\";\nimport { watchAutoRepeat } from \"@fragiola/primitives/number\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport type { NumberFieldRoot } from \"../directives/number-field-root.directive.ts\";\n\n/**\n * An Increment's or a Decrement's press and hold (spec/number-field.md, \"Pointer\"), in its\n * directive's injection context, and whether it is disabled: the field disabled or read-only, or\n * its step would change nothing (the value at the bound it steps to). The press is watched in the\n * browser only, once rendered.\n */\nexport function stepperButton(\n root: NumberFieldRoot,\n direction: 1 | -1,\n): { disabled: Signal<boolean> } {\n const host = injectHost();\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = watchAutoRepeat(host, {\n onStep: (event) =>\n root.stepBy(\n direction * root.amount(event as MouseEvent),\n direction > 0 ? \"increment-press\" : \"decrement-press\",\n event,\n ),\n });\n });\n inject(DestroyRef).onDestroy(() => stop?.());\n return {\n disabled: computed(() => {\n const { value, disabled, readOnly } = root.state();\n const min = root.min();\n const max = root.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 {\n afterNextRender,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n} from \"@angular/core\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport {\n clampNumber,\n formatNumber,\n isNumberText,\n parseNumber,\n type ScrubPoint,\n stepNumber,\n} from \"@fragiola/primitives/number\";\nimport { fieldControl } from \"@fragiola/primitives-angular/field\";\nimport {\n type ChangeDetails,\n type ChangeReason,\n controllable,\n createHiddenInput,\n dataValues,\n injectFlush,\n injectHost,\n injectId,\n setInputAttribute,\n type ValueChangeEvent,\n} from \"@fragiola/primitives-angular/internal\";\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\n/** An optional number input: `min=\"1\"` and `[min]=\"1\"` give `1`, nothing gives `undefined`. */\nexport function optionalNumber(value: unknown): number | undefined {\n if (value === undefined || value === null || value === \"\") {\n return undefined;\n }\n const number = Number(value);\n return Number.isNaN(number) ? undefined : number;\n}\n\n/**\n * Holds a NumberField's value, its text and its hidden form input, rendered right after it\n * (spec/number-field.md, the APG spinbutton): `<div numberFieldRoot [(value)]=\"quantity\"\n * name=\"quantity\">` around its Group, Input and buttons. Every part carries its state\n * (`data-disabled`, `data-readonly`, `data-required`, `data-scrubbing`, and the Field's).\n */\n@Directive({\n selector: \"[numberFieldRoot]\",\n exportAs: \"numberFieldRoot\",\n host: {\n \"data-primitives-part\": \"number-field-root\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"[attr.data-readonly]\": \"data().readonly\",\n \"[attr.data-required]\": \"data().required\",\n \"[attr.data-scrubbing]\": \"data().scrubbing\",\n \"[attr.data-invalid]\": \"data().invalid\",\n \"[attr.data-valid]\": \"data().valid\",\n \"[attr.data-dirty]\": \"data().dirty\",\n \"[attr.data-touched]\": \"data().touched\",\n \"[attr.data-filled]\": \"data().filled\",\n \"[attr.data-focused]\": \"data().focused\",\n },\n})\nexport class NumberFieldRoot {\n /** A number, or `null` while empty; bound, the field is controlled. */\n readonly value = input<number | null | undefined>(undefined);\n readonly valueChange = output<number | null>();\n readonly defaultValue = input<number | null>(null);\n readonly valueChangeDetails = output<ValueChangeEvent<number | null>>();\n readonly min = input(undefined, { transform: optionalNumber });\n readonly max = input(undefined, { transform: optionalNumber });\n /** The amount of a step (default `1`). */\n readonly step = input(1, { transform: optionalNumber });\n /** The amount of a step with Alt (default `0.1`). */\n readonly smallStep = input(0.1, { transform: optionalNumber });\n /** The amount of a step with Shift, Page Up and Page Down (default `10`). */\n readonly largeStep = input(10, { transform: optionalNumber });\n /** A step from a value off the grid goes to the grid's next point. */\n readonly snapOnStep = input(false, { transform: booleanAttribute });\n /** A typed value outside `[min, max]` is clamped on blur (default `true`). */\n readonly clampOnBlur = input(true, { transform: booleanAttribute });\n /** How the Input writes the value; default: the plain number in the locale. */\n readonly format = input<Intl.NumberFormatOptions | undefined>(undefined);\n /** The locale of the format and the parsing (BCP 47; default: the runtime's). */\n readonly locale = input<string | undefined>(undefined);\n /** The mouse wheel steps the value over the focused Input. */\n readonly allowWheelScrub = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly readOnly = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly name = input<string | undefined>(undefined);\n /** The Input's `id` (generated unless given, or the Field's control id). */\n readonly id = input<string | undefined>(undefined);\n\n private readonly host = injectHost();\n private readonly flush = injectFlush();\n private readonly generatedId = injectId(\"primitives-number-field\");\n /** The Input's `id`. */\n readonly inputId = computed(() => this.id() ?? this.generatedId);\n private readonly own = controllable<number | null, ChangeDetails>(\n this.value,\n this.valueChange,\n () => this.defaultValue(),\n (value, details) => this.valueChangeDetails.emit({ value, details }),\n );\n /** The text the user typed, until the blur formats it (`null`: the formatted value). */\n private readonly typed = signal<string | null>(null);\n /** A ScrubArea scrubs. */\n readonly scrubbing = signal(false);\n /** The virtual cursor of a locked scrub, `null` while none. */\n readonly cursor = signal<ScrubPoint | null>(null);\n /** The Input's element, once rendered. */\n readonly inputElement = signal<HTMLInputElement | null>(null);\n private readonly hidden = createHiddenInput(this.host, {\n type: \"number\",\n step: \"any\",\n \"data-primitives-part\": \"number-field-hidden-input\",\n });\n readonly field = fieldControl({\n id: this.inputId,\n labelable: true,\n value: this.own.value,\n filled: computed(() => this.own.value() !== null),\n input: () => this.hidden,\n focusTarget: () => this.inputElement(),\n });\n readonly isDisabled = computed(\n () => this.disabled() || this.field.disabled(),\n );\n /** The value as `format` writes it (`aria-valuetext`), `\"\"` while empty. */\n readonly formattedValue = computed(() =>\n formatNumber(this.own.value(), {\n locale: this.locale(),\n format: this.format(),\n }),\n );\n /** The Input's text: the typed text, else the formatted value. */\n readonly inputValue = computed(() => this.typed() ?? this.formattedValue());\n readonly state = computed<NumberFieldState>(() => ({\n value: this.own.value(),\n inputValue: this.inputValue(),\n disabled: this.isDisabled(),\n readOnly: this.readOnly(),\n required: this.required(),\n scrubbing: this.scrubbing(),\n }));\n /** The state attributes and the field's, for every part. */\n readonly data = computed(() => {\n const state = this.state();\n const field = this.field.data();\n return {\n ...dataValues({\n disabled: state.disabled,\n readonly: state.readOnly,\n required: state.required,\n scrubbing: state.scrubbing,\n }),\n invalid: field.invalid,\n valid: field.valid,\n dirty: field.dirty,\n touched: field.touched,\n filled: field.filled,\n focused: field.focused,\n };\n });\n\n constructor() {\n const hidden = this.hidden;\n const formName = computed(\n () => this.field.name() ?? this.name() ?? null,\n );\n effect(() => {\n const state = this.state();\n setInputAttribute(hidden, \"name\", formName());\n setInputAttribute(hidden, \"min\", this.attribute(this.min()));\n setInputAttribute(hidden, \"max\", this.attribute(this.max()));\n hidden.value = state.value === null ? \"\" : String(state.value);\n hidden.required = state.required;\n hidden.disabled = state.disabled;\n });\n const onHiddenFocus = () => untracked(this.inputElement)?.focus();\n hidden.addEventListener(\"focus\", onHiddenFocus);\n\n // a form reset returns it to its default, and writes the rendered value back (Switch's way)\n const destroyRef = inject(DestroyRef);\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = bridgeForm(hidden, {\n reset: () => {\n this.field.reset();\n this.typed.set(null);\n this.own.set(untracked(this.defaultValue), {\n reason: \"none\",\n });\n this.flush();\n // the browser reset the inputs after the state: write the state back (a\n // controlled field that refuses the reset keeps its value)\n const value = untracked(this.own.value);\n hidden.value = value === null ? \"\" : String(value);\n const element = untracked(this.inputElement);\n if (element !== null) {\n element.value = untracked(this.inputValue);\n }\n },\n invalid: () => untracked(this.inputElement),\n });\n });\n destroyRef.onDestroy(() => {\n stop?.();\n hidden.removeEventListener(\"focus\", onHiddenFocus);\n });\n }\n\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 if (event?.altKey) {\n return untracked(this.smallStep) ?? 0.1;\n }\n if (event?.shiftKey) {\n return untracked(this.largeStep) ?? 10;\n }\n return untracked(this.step) ?? 1;\n }\n\n /**\n * Steps `times` times by `amount` (negative: down) from the value, or the typed text when it\n * reads as a number (spec/number-field.md, \"Stepping\"); returns whether another step that way\n * could still change it (a bound not reached).\n */\n stepBy(\n amount: number,\n reason: ChangeReason,\n event: Event | undefined,\n times = 1,\n ): boolean {\n if (!this.interactive()) {\n return false;\n }\n const min = untracked(this.min);\n const max = untracked(this.max);\n let next = this.base();\n for (let index = 0; index < times; index += 1) {\n next = stepNumber(next, amount, {\n min,\n max,\n snapOnStep: untracked(this.snapOnStep),\n });\n }\n this.typed.set(null);\n this.setValue(next, { reason, event });\n const bound = amount > 0 ? max : min;\n return bound === undefined || next !== bound;\n }\n\n /** Sets the value, as a step does (Home and End set a bound). */\n stepTo(next: number, reason: ChangeReason, event: Event | undefined): void {\n if (!this.interactive()) {\n return;\n }\n this.typed.set(null);\n this.setValue(next, { reason, event });\n }\n\n /**\n * The Input's text changed (spec/number-field.md, \"Typing\"): refused (`false`, the text goes\n * back) when it holds a character no number is written with; kept otherwise, and the value\n * follows it when it reads as a number, or becomes `null` when it is empty.\n */\n inputText(text: string, event: Event): boolean {\n if (!this.interactive()) {\n return false;\n }\n const options = {\n locale: untracked(this.locale),\n format: untracked(this.format),\n };\n if (!isNumberText(text, options)) {\n return false;\n }\n this.typed.set(text);\n if (text.trim() === \"\") {\n this.setValue(null, { reason: \"input-clear\", event });\n return true;\n }\n const parsed = parseNumber(text, options);\n if (parsed !== null && !Number.isNaN(parsed)) {\n this.setValue(parsed, { reason: \"input-change\", event });\n }\n return true;\n }\n\n /** The Input lost focus: the value is clamped (`clampOnBlur`) and the text formatted. */\n inputBlur(event: Event): void {\n if (untracked(this.typed) === null) {\n return;\n }\n let next = this.base();\n if (untracked(this.clampOnBlur) && next !== null) {\n next = clampNumber(next, untracked(this.min), untracked(this.max));\n }\n this.typed.set(null);\n this.setValue(next, { reason: \"input-blur\", event });\n }\n\n private interactive(): boolean {\n return !untracked(this.isDisabled) && !untracked(this.readOnly);\n }\n\n /** The value a step starts from: the typed text when it reads as a number. */\n private base(): number | null {\n const text = untracked(this.typed);\n const value = untracked(this.own.value);\n if (text === null) {\n return value;\n }\n const parsed = parseNumber(text, {\n locale: untracked(this.locale),\n format: untracked(this.format),\n });\n return parsed === null || Number.isNaN(parsed) ? value : parsed;\n }\n\n /**\n * Reports a change, then renders it at once: a controlled value comes back through its binding\n * before the next key, and the hidden input holds it when the Field validates (AGENTS.md,\n * \"Porting\", 8).\n */\n private setValue(next: number | null, details: ChangeDetails): void {\n this.own.set(next, details);\n this.flush();\n }\n\n private attribute(value: number | undefined): string | null {\n return value === undefined ? null : String(value);\n }\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { stepperButton } from \"../utils/stepper-button.ts\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * Steps the value down, once or held (spec/number-field.md, \"Pointer\"):\n * `<button numberFieldDecrement aria-label=\"...\">`, out of the tab order, its name the consumer's.\n */\n@Directive({\n selector: \"button[numberFieldDecrement]\",\n exportAs: \"numberFieldDecrement\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"number-field-decrement\",\n \"[attr.disabled]\": \"button.disabled() ? '' : null\",\n \"[attr.aria-controls]\": \"root.inputId()\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldDecrement {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n protected readonly button = stepperButton(this.root, -1);\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/** Groups the Input with its buttons (`role=\"group\"`, spec/number-field.md): `<div numberFieldGroup>`. */\n@Directive({\n selector: \"[numberFieldGroup]\",\n exportAs: \"numberFieldGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"number-field-group\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldGroup {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { stepperButton } from \"../utils/stepper-button.ts\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * Steps the value up, once or held (spec/number-field.md, \"Pointer\"):\n * `<button numberFieldIncrement aria-label=\"...\">`, out of the tab order, its name the consumer's.\n */\n@Directive({\n selector: \"button[numberFieldIncrement]\",\n exportAs: \"numberFieldIncrement\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"number-field-increment\",\n \"[attr.disabled]\": \"button.disabled() ? '' : null\",\n \"[attr.aria-controls]\": \"root.inputId()\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldIncrement {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n protected readonly button = stepperButton(this.root, 1);\n}\n","import {\n afterRenderEffect,\n computed,\n DestroyRef,\n Directive,\n inject,\n} from \"@angular/core\";\nimport { writeFieldAria } from \"@fragiola/primitives-angular/field\";\nimport {\n injectFlush,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * The `spinbutton`: a text input showing the formatted value (spec/number-field.md, the APG\n * spinbutton): `<input numberFieldInput>`, its name the consumer's (a Label, `aria-label` or\n * `Field.Label`).\n */\n@Directive({\n selector: \"input[numberFieldInput]\",\n exportAs: \"numberFieldInput\",\n host: {\n type: \"text\",\n role: \"spinbutton\",\n autocomplete: \"off\",\n autocorrect: \"off\",\n spellcheck: \"false\",\n \"data-primitives-part\": \"number-field-input\",\n \"[attr.id]\": \"root.inputId()\",\n \"[attr.inputmode]\": \"inputMode()\",\n \"[value]\": \"root.inputValue()\",\n // the attribute follows the value, as React's controlled input: a server render writes\n // it, so the page rendered in the browser alone has it too (spec/README.md, \"Server\n // rendering\"), and a form reset restores the rendered text\n \"[attr.value]\": \"root.inputValue()\",\n \"[attr.disabled]\": \"root.data().disabled\",\n \"[attr.readonly]\": \"root.data().readonly\",\n \"[attr.aria-valuenow]\": \"root.state().value\",\n \"[attr.aria-valuemin]\": \"root.min() ?? null\",\n \"[attr.aria-valuemax]\": \"root.max() ?? null\",\n \"[attr.aria-valuetext]\": \"valueText()\",\n \"[attr.aria-required]\": \"root.state().required ? 'true' : null\",\n \"[attr.aria-readonly]\": \"root.state().readOnly ? 'true' : null\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n \"(input)\": \"onInput($event)\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(focus)\": \"root.field.focused()\",\n \"(blur)\": \"onBlur($event)\",\n },\n})\nexport class NumberFieldInput {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n private readonly input = registerHost<HTMLInputElement>(\n this.root.inputElement,\n );\n private readonly flush = injectFlush();\n /** `numeric` when the format writes no decimals and `min` is not negative, else `decimal`. */\n protected readonly inputMode = computed(() => {\n const min = this.root.min();\n return this.root.format()?.maximumFractionDigits === 0 &&\n min !== undefined &&\n min >= 0\n ? \"numeric\"\n : \"decimal\";\n });\n protected readonly valueText = computed(() =>\n this.root.state().value === null ? null : this.root.formattedValue(),\n );\n\n constructor() {\n const { field } = this.root;\n const host = this.input;\n writeFieldAria(field, host, {\n \"aria-labelledby\": field.labelledBy,\n \"aria-describedby\": field.describedBy,\n \"aria-invalid\": field.ariaInvalid,\n });\n\n // the wheel over the focused Input steps it, and the page does not scroll (a non-passive\n // listener, spec/number-field.md \"Pointer\"); in the browser only\n const onWheel = (event: WheelEvent) => {\n const root = this.root;\n if (\n host.ownerDocument.activeElement !== host ||\n event.deltaY === 0 ||\n root.isDisabled() ||\n root.readOnly()\n ) {\n return;\n }\n event.preventDefault();\n const amount = root.amount(event);\n root.stepBy(event.deltaY < 0 ? amount : -amount, \"wheel\", event);\n };\n let listening = false;\n afterRenderEffect(() => {\n const allowed = this.root.allowWheelScrub();\n if (allowed && !listening) {\n host.addEventListener(\"wheel\", onWheel, { passive: false });\n } else if (!allowed && listening) {\n host.removeEventListener(\"wheel\", onWheel);\n }\n listening = allowed;\n });\n inject(DestroyRef).onDestroy(() =>\n host.removeEventListener(\"wheel\", onWheel),\n );\n }\n\n protected onInput(event: Event): void {\n this.root.inputText(this.input.value, event);\n // a refused text, or a bound value the consumer kept, does not re-run the binding: put the\n // field's text back (React re-asserts a controlled value too)\n this.flush();\n const text = this.root.inputValue();\n if (this.input.value !== text) {\n this.input.value = text;\n }\n }\n\n protected onBlur(event: FocusEvent): void {\n this.root.inputBlur(event);\n this.root.field.blurred();\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n if (root.isDisabled() || root.readOnly()) {\n return;\n }\n const amount = root.amount(event);\n const large = root.amount({ shiftKey: true });\n switch (event.key) {\n case \"ArrowUp\":\n root.stepBy(amount, \"keyboard\", event);\n break;\n case \"ArrowDown\":\n root.stepBy(-amount, \"keyboard\", event);\n break;\n case \"PageUp\":\n root.stepBy(large, \"keyboard\", event);\n break;\n case \"PageDown\":\n root.stepBy(-large, \"keyboard\", event);\n break;\n case \"Home\": {\n const min = root.min();\n if (min === undefined) {\n return;\n }\n root.stepTo(min, \"keyboard\", event);\n break;\n }\n case \"End\": {\n const max = root.max();\n if (max === undefined) {\n return;\n }\n root.stepTo(max, \"keyboard\", event);\n break;\n }\n default:\n return;\n }\n event.preventDefault();\n }\n}\n","import {\n afterRenderEffect,\n Directive,\n inject,\n input,\n numberAttribute,\n} from \"@angular/core\";\nimport { watchScrub } from \"@fragiola/primitives/number\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * A press dragged along it steps the value (spec/number-field.md, \"Pointer\": scrub):\n * `<span numberFieldScrubArea>` around a label or an icon, and the ScrubAreaCursor. Its\n * structural style keeps a touch drag from scrolling and its text from being selected.\n */\n@Directive({\n selector: \"[numberFieldScrubArea]\",\n exportAs: \"numberFieldScrubArea\",\n host: {\n \"data-primitives-part\": \"number-field-scrub-area\",\n \"[style.touch-action]\": \"'none'\",\n \"[style.user-select]\": \"'none'\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n \"(mousedown)\": \"onMouseDown($event)\",\n },\n})\nexport class NumberFieldScrubArea {\n /** The axis the pointer scrubs along (default `\"horizontal\"`). */\n readonly direction = input<\"horizontal\" | \"vertical\">(\"horizontal\");\n /** The pixels one step takes (default `2`). */\n readonly pixelSensitivity = input(2, { transform: numberAttribute });\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n\n constructor() {\n const host = injectHost();\n const root = this.root;\n // in the browser only, once rendered, again when its options change\n afterRenderEffect((onCleanup) => {\n const stop = watchScrub(host, {\n direction: this.direction(),\n pixelSensitivity: this.pixelSensitivity(),\n onStart: () => {\n if (root.isDisabled() || root.readOnly()) {\n return false;\n }\n root.scrubbing.set(true);\n return true;\n },\n onScrub: (steps, event) => {\n const amount = root.amount(event);\n root.stepBy(\n steps > 0 ? amount : -amount,\n \"scrub\",\n event,\n Math.abs(steps),\n );\n },\n onEnd: () => root.scrubbing.set(false),\n onCursor: (point) => root.cursor.set(point),\n });\n onCleanup(stop);\n });\n }\n\n protected onMouseDown(event: MouseEvent): void {\n // a press keeps the focus where it is\n if (event.button === 0) {\n event.preventDefault();\n }\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n DOCUMENT,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport {\n conditionalView,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * The virtual cursor of a locked scrub (spec/number-field.md, \"Pointer\"): structural,\n * `<span *numberFieldScrubAreaCursor>` inside the ScrubArea, rendered only while a mouse scrubs\n * with the pointer locked, its element moved to the document's `body` (React's portal). The\n * directive writes its attributes and its structural style on the element it renders. A server\n * renders none (no scrub runs there).\n */\n@Directive({\n selector: \"[numberFieldScrubAreaCursor]\",\n exportAs: \"numberFieldScrubAreaCursor\",\n})\nexport class NumberFieldScrubAreaCursor {\n private readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n\n constructor() {\n const root = this.root;\n const body = inject(DOCUMENT).body;\n // Angular removes a view's nodes wherever they are when it clears the view\n const element = conditionalView(\n computed(() => root.cursor() !== null),\n (rendered) => body.appendChild(rendered),\n );\n effect(() => {\n const rendered = element();\n const cursor = root.cursor();\n const data = root.data();\n if (rendered === null || cursor === null) {\n return;\n }\n untracked(() => {\n writeAttributes(rendered, {\n \"data-primitives-part\": \"number-field-scrub-area-cursor\",\n ...Object.fromEntries(\n Object.entries(data).map(([key, value]) => [\n `data-${key}`,\n value,\n ]),\n ),\n });\n Object.assign(rendered.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 });\n });\n // destroyed with an enclosing view, Angular detaches only the view's own place: the node\n // moved to the body goes too\n inject(DestroyRef).onDestroy(() => untracked(element)?.remove());\n }\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,cACZ,MACA,WAAiB;CAEjB,MAAM,OAAO,WAAU;CACvB,IAAI,OAA4B;CAChC,sBAAqB;EACjB,OAAO,gBAAgB,MAAM,EACzB,SAAS,UACL,KAAK,OACD,YAAY,KAAK,OAAO,KAAmB,GAC3C,YAAY,IAAI,oBAAoB,mBACpC,KAAK,EAEhB,CAAA;CACL,CAAC;CACD,OAAO,UAAU,CAAC,CAAC,gBAAgB,OAAM,CAAE;CAC3C,OAAO,EACH,UAAU,eAAc;EACpB,MAAM,EAAE,OAAO,UAAU,aAAa,KAAK,MAAK;EAChD,MAAM,MAAM,KAAK,IAAG;EACpB,MAAM,MAAM,KAAK,IAAG;EAMpB,OAAO,YAAY,YAJf,UAAU,SACT,YAAY,IACP,QAAQ,UAAa,SAAS,MAC9B,QAAQ,UAAa,SAAS;CAE5C,CAAC,EACJ;AACL;ACEA,SAAgB,eAAe,OAAc;CACzC,IAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,IACnD;CAEJ,MAAM,SAAS,OAAO,KAAK;CAC3B,OAAO,OAAO,MAAM,MAAM,IAAI,SAAY;AAC9C;AAyBA,IAAa,kBAAb,MAAa,gBAAe;CAuGxB,cAAA;EArGS,KAAA,QAAQ,MAAiC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EACnD,KAAA,cAAc,OAAM;EACpB,KAAA,eAAe,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;EACzC,KAAA,qBAAqB,OAAM;EAC3B,KAAA,MAAM,MAAM,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,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AAa,QAAQ,WAAW,MAChC;GAEJ,gBAAe;IACX,gBAAgB,UAAU;KACtB,wBAAwB;KACxB,GAAG,OAAO,YACN,OAAO,QAAQ,IAAI,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CACvC,QAAQ,OACR,KACH,CAAA,CAAC;IAET,CAAA;IACD,OAAO,OAAO,SAAS,OAAO;KAC1B,UAAU;KACV,KAAK;KACL,MAAM;KACN,eAAe;KACf,WAAW,eAAe,OAAO,EAAC,MAAO,OAAO,EAAC;IACpD,CAAA;GACL,CAAC;EACL,CAAC;EAGD,OAAO,UAAU,CAAC,CAAC,gBAAgB,UAAU,OAAO,CAAC,EAAE,OAAM,CAAE;CACnE;CAzCS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,UAAA,CAAA,4BAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EAJtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;EACb,CAAA"}
|
|
1
|
+
{"version":3,"file":"fragiola-primitives-angular-number-field.mjs","names":[],"sources":["../../number-field/utils/stepper-button.ts","../../number-field/directives/number-field-root.directive.ts","../../number-field/directives/number-field-decrement.directive.ts","../../number-field/directives/number-field-group.directive.ts","../../number-field/directives/number-field-increment.directive.ts","../../number-field/directives/number-field-input.directive.ts","../../number-field/directives/number-field-scrub-area.directive.ts","../../number-field/directives/number-field-scrub-area-cursor.directive.ts"],"sourcesContent":["import {\n afterNextRender,\n computed,\n DestroyRef,\n inject,\n type Signal,\n} from \"@angular/core\";\nimport { watchAutoRepeat } from \"@fragiola/primitives/number\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport type { NumberFieldRoot } from \"../directives/number-field-root.directive.ts\";\n\n/**\n * An Increment's or a Decrement's press and hold (spec/number-field.md, \"Pointer\"), in its\n * directive's injection context, and whether it is disabled: the field disabled or read-only, or\n * its step would change nothing (the value at the bound it steps to). The press is watched in the\n * browser only, once rendered.\n */\nexport function stepperButton(\n root: NumberFieldRoot,\n direction: 1 | -1,\n): { disabled: Signal<boolean> } {\n const host = injectHost();\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = watchAutoRepeat(host, {\n onStep: (event) =>\n root.stepBy(\n direction * root.amount(event as MouseEvent),\n direction > 0 ? \"increment-press\" : \"decrement-press\",\n event,\n ),\n onEnd: (event) => root.commit(event),\n });\n });\n inject(DestroyRef).onDestroy(() => stop?.());\n return {\n disabled: computed(() => {\n const { value, disabled, readOnly } = root.state();\n const min = root.min();\n const max = root.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 {\n afterNextRender,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n inject,\n input,\n output,\n signal,\n untracked,\n} from \"@angular/core\";\nimport { bridgeForm } from \"@fragiola/primitives/form\";\nimport {\n clampNumber,\n formatNumber,\n isNumberText,\n parseNumber,\n type ScrubPoint,\n stepNumber,\n} from \"@fragiola/primitives/number\";\nimport { fieldControl } from \"@fragiola/primitives-angular/field\";\nimport {\n type ChangeDetails,\n type ChangeReason,\n controllable,\n createHiddenInput,\n dataValues,\n injectFlush,\n injectHost,\n injectId,\n setInputAttribute,\n type ValueChangeEvent,\n} from \"@fragiola/primitives-angular/internal\";\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\n/** An optional number input: `min=\"1\"` and `[min]=\"1\"` give `1`, nothing gives `undefined`. */\nexport function optionalNumber(value: unknown): number | undefined {\n if (value === undefined || value === null || value === \"\") {\n return undefined;\n }\n const number = Number(value);\n return Number.isNaN(number) ? undefined : number;\n}\n\n/**\n * Holds a NumberField's value, its text and its hidden form input, rendered right after it\n * (spec/number-field.md, the APG spinbutton): `<div numberFieldRoot [(value)]=\"quantity\"\n * name=\"quantity\">` around its Group, Input and buttons. Every part carries its state\n * (`data-disabled`, `data-readonly`, `data-required`, `data-scrubbing`, and the Field's).\n */\n@Directive({\n selector: \"[numberFieldRoot]\",\n exportAs: \"numberFieldRoot\",\n host: {\n \"data-primitives-part\": \"number-field-root\",\n \"[attr.data-disabled]\": \"data().disabled\",\n \"[attr.data-readonly]\": \"data().readonly\",\n \"[attr.data-required]\": \"data().required\",\n \"[attr.data-scrubbing]\": \"data().scrubbing\",\n \"[attr.data-invalid]\": \"data().invalid\",\n \"[attr.data-valid]\": \"data().valid\",\n \"[attr.data-dirty]\": \"data().dirty\",\n \"[attr.data-touched]\": \"data().touched\",\n \"[attr.data-filled]\": \"data().filled\",\n \"[attr.data-focused]\": \"data().focused\",\n },\n})\nexport class NumberFieldRoot {\n /** A number, or `null` while empty; bound, the field is controlled. */\n readonly value = input<number | null | undefined>(undefined);\n readonly valueChange = output<number | null>();\n readonly defaultValue = input<number | null>(null);\n readonly valueChangeDetails = output<ValueChangeEvent<number | null>>();\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 readonly valueCommitted = output<ValueChangeEvent<number | null>>();\n readonly min = input(undefined, { transform: optionalNumber });\n readonly max = input(undefined, { transform: optionalNumber });\n /** The amount of a step (default `1`). */\n readonly step = input(1, { transform: optionalNumber });\n /** The amount of a step with Alt (default `0.1`). */\n readonly smallStep = input(0.1, { transform: optionalNumber });\n /** The amount of a step with Shift, Page Up and Page Down (default `10`). */\n readonly largeStep = input(10, { transform: optionalNumber });\n /** A step from a value off the grid goes to the grid's next point. */\n readonly snapOnStep = input(false, { transform: booleanAttribute });\n /** A typed value outside `[min, max]` is clamped on blur (default `true`). */\n readonly clampOnBlur = input(true, { transform: booleanAttribute });\n /** How the Input writes the value; default: the plain number in the locale. */\n readonly format = input<Intl.NumberFormatOptions | undefined>(undefined);\n /** The locale of the format and the parsing (BCP 47; default: the runtime's). */\n readonly locale = input<string | undefined>(undefined);\n /** The mouse wheel steps the value over the focused Input. */\n readonly allowWheelScrub = input(false, { transform: booleanAttribute });\n readonly required = input(false, { transform: booleanAttribute });\n readonly readOnly = input(false, { transform: booleanAttribute });\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly name = input<string | undefined>(undefined);\n /** The Input's `id` (generated unless given, or the Field's control id). */\n readonly id = input<string | undefined>(undefined);\n\n private readonly host = injectHost();\n private readonly flush = injectFlush();\n private readonly generatedId = injectId(\"primitives-number-field\");\n /** The Input's `id`. */\n readonly inputId = computed(() => this.id() ?? this.generatedId);\n private readonly own = controllable<number | null, ChangeDetails>(\n this.value,\n this.valueChange,\n () => this.defaultValue(),\n (value, details) => this.valueChangeDetails.emit({ value, details }),\n );\n /** The reason of the last change not committed yet. */\n private pending: ChangeReason | null = null;\n /** The text the user typed, until the blur formats it (`null`: the formatted value). */\n private readonly typed = signal<string | null>(null);\n /** A ScrubArea scrubs. */\n readonly scrubbing = signal(false);\n /** The virtual cursor of a locked scrub, `null` while none. */\n readonly cursor = signal<ScrubPoint | null>(null);\n /** The Input's element, once rendered. */\n readonly inputElement = signal<HTMLInputElement | null>(null);\n private readonly hidden = createHiddenInput(this.host, {\n type: \"number\",\n step: \"any\",\n \"data-primitives-part\": \"number-field-hidden-input\",\n });\n readonly field = fieldControl({\n id: this.inputId,\n labelable: true,\n value: this.own.value,\n filled: computed(() => this.own.value() !== null),\n input: () => this.hidden,\n focusTarget: () => this.inputElement(),\n });\n readonly isDisabled = computed(\n () => this.disabled() || this.field.disabled(),\n );\n /** The value as `format` writes it (`aria-valuetext`), `\"\"` while empty. */\n readonly formattedValue = computed(() =>\n formatNumber(this.own.value(), {\n locale: this.locale(),\n format: this.format(),\n }),\n );\n /** The Input's text: the typed text, else the formatted value. */\n readonly inputValue = computed(() => this.typed() ?? this.formattedValue());\n readonly state = computed<NumberFieldState>(() => ({\n value: this.own.value(),\n inputValue: this.inputValue(),\n disabled: this.isDisabled(),\n readOnly: this.readOnly(),\n required: this.required(),\n scrubbing: this.scrubbing(),\n }));\n /** The state attributes and the field's, for every part. */\n readonly data = computed(() => {\n const state = this.state();\n const field = this.field.data();\n return {\n ...dataValues({\n disabled: state.disabled,\n readonly: state.readOnly,\n required: state.required,\n scrubbing: state.scrubbing,\n }),\n invalid: field.invalid,\n valid: field.valid,\n dirty: field.dirty,\n touched: field.touched,\n filled: field.filled,\n focused: field.focused,\n };\n });\n\n constructor() {\n const hidden = this.hidden;\n const formName = computed(\n () => this.field.name() ?? this.name() ?? null,\n );\n effect(() => {\n const state = this.state();\n setInputAttribute(hidden, \"name\", formName());\n setInputAttribute(hidden, \"min\", this.attribute(this.min()));\n setInputAttribute(hidden, \"max\", this.attribute(this.max()));\n hidden.value = state.value === null ? \"\" : String(state.value);\n hidden.required = state.required;\n hidden.disabled = state.disabled;\n });\n const onHiddenFocus = () => untracked(this.inputElement)?.focus();\n hidden.addEventListener(\"focus\", onHiddenFocus);\n\n // a form reset returns it to its default, and writes the rendered value back (Switch's way)\n const destroyRef = inject(DestroyRef);\n let stop: (() => void) | null = null;\n afterNextRender(() => {\n stop = bridgeForm(hidden, {\n reset: () => {\n this.field.reset();\n this.typed.set(null);\n this.own.set(untracked(this.defaultValue), {\n reason: \"none\",\n });\n this.flush();\n // the browser reset the inputs after the state: write the state back (a\n // controlled field that refuses the reset keeps its value)\n const value = untracked(this.own.value);\n hidden.value = value === null ? \"\" : String(value);\n const element = untracked(this.inputElement);\n if (element !== null) {\n element.value = untracked(this.inputValue);\n }\n },\n invalid: () => untracked(this.inputElement),\n });\n });\n destroyRef.onDestroy(() => {\n stop?.();\n hidden.removeEventListener(\"focus\", onHiddenFocus);\n });\n }\n\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 if (event?.altKey) {\n return untracked(this.smallStep) ?? 0.1;\n }\n if (event?.shiftKey) {\n return untracked(this.largeStep) ?? 10;\n }\n return untracked(this.step) ?? 1;\n }\n\n /**\n * Steps `times` times by `amount` (negative: down) from the value, or the typed text when it\n * reads as a number (spec/number-field.md, \"Stepping\"); returns whether another step that way\n * could still change it (a bound not reached).\n */\n stepBy(\n amount: number,\n reason: ChangeReason,\n event: Event | undefined,\n times = 1,\n ): boolean {\n if (!this.interactive()) {\n return false;\n }\n const min = untracked(this.min);\n const max = untracked(this.max);\n let next = this.base();\n for (let index = 0; index < times; index += 1) {\n next = stepNumber(next, amount, {\n min,\n max,\n snapOnStep: untracked(this.snapOnStep),\n });\n }\n this.typed.set(null);\n this.setValue(next, { reason, event });\n if (commitsAtOnce(reason)) {\n this.commit(event);\n }\n const bound = amount > 0 ? max : min;\n return bound === undefined || next !== bound;\n }\n\n /** Sets the value, as a step does (Home and End set a bound). */\n stepTo(next: number, reason: ChangeReason, event: Event | undefined): void {\n if (!this.interactive()) {\n return;\n }\n this.typed.set(null);\n this.setValue(next, { reason, event });\n if (commitsAtOnce(reason)) {\n this.commit(event);\n }\n }\n\n /**\n * The Input's text changed (spec/number-field.md, \"Typing\"): refused (`false`, the text goes\n * back) when it holds a character no number is written with; kept otherwise, and the value\n * follows it when it reads as a number, or becomes `null` when it is empty.\n */\n inputText(text: string, event: Event): boolean {\n if (!this.interactive()) {\n return false;\n }\n const options = {\n locale: untracked(this.locale),\n format: untracked(this.format),\n };\n if (!isNumberText(text, options)) {\n return false;\n }\n this.typed.set(text);\n if (text.trim() === \"\") {\n this.setValue(null, { reason: \"input-clear\", event });\n return true;\n }\n const parsed = parseNumber(text, options);\n if (parsed !== null && !Number.isNaN(parsed)) {\n this.setValue(parsed, { reason: \"input-change\", event });\n }\n return true;\n }\n\n /** The Input lost focus: the value is clamped (`clampOnBlur`) and the text formatted. */\n inputBlur(event: Event): void {\n if (untracked(this.typed) === null) {\n return;\n }\n let next = this.base();\n if (untracked(this.clampOnBlur) && next !== null) {\n next = clampNumber(next, untracked(this.min), untracked(this.max));\n }\n this.typed.set(null);\n this.setValue(next, { reason: \"input-blur\", event });\n this.commit(event);\n }\n\n /** Reports the value when a change is pending (spec/number-field.md, \"Committing\"). */\n commit(event: Event | undefined): void {\n const reason = this.pending;\n if (reason === null) {\n return;\n }\n this.pending = null;\n this.valueCommitted.emit({\n value: untracked(this.own.value),\n details: { reason, event },\n });\n }\n\n private interactive(): boolean {\n return !untracked(this.isDisabled) && !untracked(this.readOnly);\n }\n\n /** The value a step starts from: the typed text when it reads as a number. */\n private base(): number | null {\n const text = untracked(this.typed);\n const value = untracked(this.own.value);\n if (text === null) {\n return value;\n }\n const parsed = parseNumber(text, {\n locale: untracked(this.locale),\n format: untracked(this.format),\n });\n return parsed === null || Number.isNaN(parsed) ? value : parsed;\n }\n\n /**\n * Reports a change, then renders it at once: a controlled value comes back through its binding\n * before the next key, and the hidden input holds it when the Field validates (AGENTS.md,\n * \"Porting\", 8).\n */\n private setValue(next: number | null, details: ChangeDetails): void {\n if (details.reason === \"none\") {\n this.pending = null;\n } else if (!Object.is(untracked(this.own.value), next)) {\n this.pending = details.reason;\n }\n this.own.set(next, details);\n this.flush();\n }\n\n private attribute(value: number | undefined): string | null {\n return value === undefined ? null : String(value);\n }\n}\n\n/** A key or the wheel commits its step at once. */\nfunction commitsAtOnce(reason: ChangeReason): boolean {\n return reason === \"keyboard\" || reason === \"wheel\";\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { stepperButton } from \"../utils/stepper-button.ts\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * Steps the value down, once or held (spec/number-field.md, \"Pointer\"):\n * `<button numberFieldDecrement aria-label=\"...\">`, out of the tab order, its name the consumer's.\n */\n@Directive({\n selector: \"button[numberFieldDecrement]\",\n exportAs: \"numberFieldDecrement\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"number-field-decrement\",\n \"[attr.disabled]\": \"button.disabled() ? '' : null\",\n \"[attr.aria-controls]\": \"root.inputId()\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldDecrement {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n protected readonly button = stepperButton(this.root, -1);\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/** Groups the Input with its buttons (`role=\"group\"`, spec/number-field.md): `<div numberFieldGroup>`. */\n@Directive({\n selector: \"[numberFieldGroup]\",\n exportAs: \"numberFieldGroup\",\n host: {\n role: \"group\",\n \"data-primitives-part\": \"number-field-group\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldGroup {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n}\n","import { Directive, inject } from \"@angular/core\";\nimport { stepperButton } from \"../utils/stepper-button.ts\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * Steps the value up, once or held (spec/number-field.md, \"Pointer\"):\n * `<button numberFieldIncrement aria-label=\"...\">`, out of the tab order, its name the consumer's.\n */\n@Directive({\n selector: \"button[numberFieldIncrement]\",\n exportAs: \"numberFieldIncrement\",\n host: {\n type: \"button\",\n tabindex: \"-1\",\n \"data-primitives-part\": \"number-field-increment\",\n \"[attr.disabled]\": \"button.disabled() ? '' : null\",\n \"[attr.aria-controls]\": \"root.inputId()\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n },\n})\nexport class NumberFieldIncrement {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n protected readonly button = stepperButton(this.root, 1);\n}\n","import {\n afterRenderEffect,\n computed,\n DestroyRef,\n Directive,\n inject,\n} from \"@angular/core\";\nimport { writeFieldAria } from \"@fragiola/primitives-angular/field\";\nimport {\n injectFlush,\n registerHost,\n} from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * The `spinbutton`: a text input showing the formatted value (spec/number-field.md, the APG\n * spinbutton): `<input numberFieldInput>`, its name the consumer's (a Label, `aria-label` or\n * `Field.Label`).\n */\n@Directive({\n selector: \"input[numberFieldInput]\",\n exportAs: \"numberFieldInput\",\n host: {\n type: \"text\",\n role: \"spinbutton\",\n autocomplete: \"off\",\n autocorrect: \"off\",\n spellcheck: \"false\",\n \"data-primitives-part\": \"number-field-input\",\n \"[attr.id]\": \"root.inputId()\",\n \"[attr.inputmode]\": \"inputMode()\",\n \"[value]\": \"root.inputValue()\",\n // the attribute follows the value, as React's controlled input: a server render writes\n // it, so the page rendered in the browser alone has it too (spec/README.md, \"Server\n // rendering\"), and a form reset restores the rendered text\n \"[attr.value]\": \"root.inputValue()\",\n \"[attr.disabled]\": \"root.data().disabled\",\n \"[attr.readonly]\": \"root.data().readonly\",\n \"[attr.aria-valuenow]\": \"root.state().value\",\n \"[attr.aria-valuemin]\": \"root.min() ?? null\",\n \"[attr.aria-valuemax]\": \"root.max() ?? null\",\n \"[attr.aria-valuetext]\": \"valueText()\",\n \"[attr.aria-required]\": \"root.state().required ? 'true' : null\",\n \"[attr.aria-readonly]\": \"root.state().readOnly ? 'true' : null\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n \"(input)\": \"onInput($event)\",\n \"(keydown)\": \"onKeyDown($event)\",\n \"(focus)\": \"root.field.focused()\",\n \"(blur)\": \"onBlur($event)\",\n },\n})\nexport class NumberFieldInput {\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n private readonly input = registerHost<HTMLInputElement>(\n this.root.inputElement,\n );\n private readonly flush = injectFlush();\n /** `numeric` when the format writes no decimals and `min` is not negative, else `decimal`. */\n protected readonly inputMode = computed(() => {\n const min = this.root.min();\n return this.root.format()?.maximumFractionDigits === 0 &&\n min !== undefined &&\n min >= 0\n ? \"numeric\"\n : \"decimal\";\n });\n protected readonly valueText = computed(() =>\n this.root.state().value === null ? null : this.root.formattedValue(),\n );\n\n constructor() {\n const { field } = this.root;\n const host = this.input;\n writeFieldAria(field, host, {\n \"aria-labelledby\": field.labelledBy,\n \"aria-describedby\": field.describedBy,\n \"aria-invalid\": field.ariaInvalid,\n });\n\n // the wheel over the focused Input steps it, and the page does not scroll (a non-passive\n // listener, spec/number-field.md \"Pointer\"); in the browser only\n const onWheel = (event: WheelEvent) => {\n const root = this.root;\n if (\n host.ownerDocument.activeElement !== host ||\n event.deltaY === 0 ||\n root.isDisabled() ||\n root.readOnly()\n ) {\n return;\n }\n event.preventDefault();\n const amount = root.amount(event);\n root.stepBy(event.deltaY < 0 ? amount : -amount, \"wheel\", event);\n };\n let listening = false;\n afterRenderEffect(() => {\n const allowed = this.root.allowWheelScrub();\n if (allowed && !listening) {\n host.addEventListener(\"wheel\", onWheel, { passive: false });\n } else if (!allowed && listening) {\n host.removeEventListener(\"wheel\", onWheel);\n }\n listening = allowed;\n });\n inject(DestroyRef).onDestroy(() =>\n host.removeEventListener(\"wheel\", onWheel),\n );\n }\n\n protected onInput(event: Event): void {\n this.root.inputText(this.input.value, event);\n // a refused text, or a bound value the consumer kept, does not re-run the binding: put the\n // field's text back (React re-asserts a controlled value too)\n this.flush();\n const text = this.root.inputValue();\n if (this.input.value !== text) {\n this.input.value = text;\n }\n }\n\n protected onBlur(event: FocusEvent): void {\n this.root.inputBlur(event);\n this.root.field.blurred();\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n const root = this.root;\n if (root.isDisabled() || root.readOnly()) {\n return;\n }\n const amount = root.amount(event);\n const large = root.amount({ shiftKey: true });\n switch (event.key) {\n case \"ArrowUp\":\n root.stepBy(amount, \"keyboard\", event);\n break;\n case \"ArrowDown\":\n root.stepBy(-amount, \"keyboard\", event);\n break;\n case \"PageUp\":\n root.stepBy(large, \"keyboard\", event);\n break;\n case \"PageDown\":\n root.stepBy(-large, \"keyboard\", event);\n break;\n case \"Home\": {\n const min = root.min();\n if (min === undefined) {\n return;\n }\n root.stepTo(min, \"keyboard\", event);\n break;\n }\n case \"End\": {\n const max = root.max();\n if (max === undefined) {\n return;\n }\n root.stepTo(max, \"keyboard\", event);\n break;\n }\n default:\n return;\n }\n event.preventDefault();\n }\n}\n","import {\n afterRenderEffect,\n Directive,\n inject,\n input,\n numberAttribute,\n} from \"@angular/core\";\nimport { watchScrub } from \"@fragiola/primitives/number\";\nimport { injectHost } from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * A press dragged along it steps the value (spec/number-field.md, \"Pointer\": scrub):\n * `<span numberFieldScrubArea>` around a label or an icon, and the ScrubAreaCursor. Its\n * structural style keeps a touch drag from scrolling and its text from being selected.\n */\n@Directive({\n selector: \"[numberFieldScrubArea]\",\n exportAs: \"numberFieldScrubArea\",\n host: {\n \"data-primitives-part\": \"number-field-scrub-area\",\n \"[style.touch-action]\": \"'none'\",\n \"[style.user-select]\": \"'none'\",\n \"[attr.data-disabled]\": \"root.data().disabled\",\n \"[attr.data-readonly]\": \"root.data().readonly\",\n \"[attr.data-required]\": \"root.data().required\",\n \"[attr.data-scrubbing]\": \"root.data().scrubbing\",\n \"[attr.data-invalid]\": \"root.data().invalid\",\n \"[attr.data-valid]\": \"root.data().valid\",\n \"[attr.data-dirty]\": \"root.data().dirty\",\n \"[attr.data-touched]\": \"root.data().touched\",\n \"[attr.data-filled]\": \"root.data().filled\",\n \"[attr.data-focused]\": \"root.data().focused\",\n \"(mousedown)\": \"onMouseDown($event)\",\n },\n})\nexport class NumberFieldScrubArea {\n /** The axis the pointer scrubs along (default `\"horizontal\"`). */\n readonly direction = input<\"horizontal\" | \"vertical\">(\"horizontal\");\n /** The pixels one step takes (default `2`). */\n readonly pixelSensitivity = input(2, { transform: numberAttribute });\n protected readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n\n constructor() {\n const host = injectHost();\n const root = this.root;\n // in the browser only, once rendered, again when its options change\n afterRenderEffect((onCleanup) => {\n const stop = watchScrub(host, {\n direction: this.direction(),\n pixelSensitivity: this.pixelSensitivity(),\n onStart: () => {\n if (root.isDisabled() || root.readOnly()) {\n return false;\n }\n root.scrubbing.set(true);\n return true;\n },\n onScrub: (steps, event) => {\n const amount = root.amount(event);\n root.stepBy(\n steps > 0 ? amount : -amount,\n \"scrub\",\n event,\n Math.abs(steps),\n );\n },\n onEnd: (event) => {\n root.scrubbing.set(false);\n root.commit(event);\n },\n onCursor: (point) => root.cursor.set(point),\n });\n onCleanup(stop);\n });\n }\n\n protected onMouseDown(event: MouseEvent): void {\n // a press keeps the focus where it is\n if (event.button === 0) {\n event.preventDefault();\n }\n }\n}\n","import {\n computed,\n DestroyRef,\n Directive,\n DOCUMENT,\n effect,\n inject,\n untracked,\n} from \"@angular/core\";\nimport {\n conditionalView,\n writeAttributes,\n} from \"@fragiola/primitives-angular/internal\";\nimport { NumberFieldRoot } from \"./number-field-root.directive.ts\";\n\n/**\n * The virtual cursor of a locked scrub (spec/number-field.md, \"Pointer\"): structural,\n * `<span *numberFieldScrubAreaCursor>` inside the ScrubArea, rendered only while a mouse scrubs\n * with the pointer locked, its element moved to the document's `body` (React's portal). The\n * directive writes its attributes and its structural style on the element it renders. A server\n * renders none (no scrub runs there).\n */\n@Directive({\n selector: \"[numberFieldScrubAreaCursor]\",\n exportAs: \"numberFieldScrubAreaCursor\",\n})\nexport class NumberFieldScrubAreaCursor {\n private readonly root = inject(NumberFieldRoot);\n readonly state = this.root.state;\n\n constructor() {\n const root = this.root;\n const body = inject(DOCUMENT).body;\n // Angular removes a view's nodes wherever they are when it clears the view\n const element = conditionalView(\n computed(() => root.cursor() !== null),\n (rendered) => body.appendChild(rendered),\n );\n effect(() => {\n const rendered = element();\n const cursor = root.cursor();\n const data = root.data();\n if (rendered === null || cursor === null) {\n return;\n }\n untracked(() => {\n writeAttributes(rendered, {\n \"data-primitives-part\": \"number-field-scrub-area-cursor\",\n ...Object.fromEntries(\n Object.entries(data).map(([key, value]) => [\n `data-${key}`,\n value,\n ]),\n ),\n });\n Object.assign(rendered.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 });\n });\n // destroyed with an enclosing view, Angular detaches only the view's own place: the node\n // moved to the body goes too\n inject(DestroyRef).onDestroy(() => untracked(element)?.remove());\n }\n}\n"],"mappings":";;;;;;AAiBA,SAAgB,cACZ,MACA,WAAiB;CAEjB,MAAM,OAAO,WAAU;CACvB,IAAI,OAA4B;CAChC,sBAAqB;EACjB,OAAO,gBAAgB,MAAM;GACzB,SAAS,UACL,KAAK,OACD,YAAY,KAAK,OAAO,KAAmB,GAC3C,YAAY,IAAI,oBAAoB,mBACpC,KAAK;GAEb,QAAQ,UAAU,KAAK,OAAO,KAAK;EACtC,CAAA;CACL,CAAC;CACD,OAAO,UAAU,CAAC,CAAC,gBAAgB,OAAM,CAAE;CAC3C,OAAO,EACH,UAAU,eAAc;EACpB,MAAM,EAAE,OAAO,UAAU,aAAa,KAAK,MAAK;EAChD,MAAM,MAAM,KAAK,IAAG;EACpB,MAAM,MAAM,KAAK,IAAG;EAMpB,OAAO,YAAY,YAJf,UAAU,SACT,YAAY,IACP,QAAQ,UAAa,SAAS,MAC9B,QAAQ,UAAa,SAAS;CAE5C,CAAC,EACJ;AACL;ACCA,SAAgB,eAAe,OAAc;CACzC,IAAI,UAAU,UAAa,UAAU,QAAQ,UAAU,IACnD;CAEJ,MAAM,SAAS,OAAO,KAAK;CAC3B,OAAO,OAAO,MAAM,MAAM,IAAI,SAAY;AAC9C;AAyBA,IAAa,kBAAb,MAAa,gBAAe;CA8GxB,cAAA;EA5GS,KAAA,QAAQ,MAAiC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAC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AU,OAAO,CAAC,EAAE,OAAM,CAAE;CACnE;CAzCS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA1B;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAA0B,cAAA;GAAA,UAAA;GAAA,UAAA,CAAA,4BAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAA1B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA0B,YAAA,CAAA;EAJtC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,UAAU;EACb,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fragiola/primitives-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Headless, accessible Angular primitives (Dialog, Tabs, ...) of Fragiola Primitives: standalone directives, one secondary entry point per component, styled by you.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"./package.json": "./package.json"
|
|
431
431
|
},
|
|
432
432
|
"dependencies": {
|
|
433
|
-
"@fragiola/primitives": "0.
|
|
433
|
+
"@fragiola/primitives": "0.2.0"
|
|
434
434
|
},
|
|
435
435
|
"peerDependencies": {
|
|
436
436
|
"@angular/core": "^22.0.0"
|
|
@@ -47,8 +47,11 @@ interface ComboboxItemInfo {
|
|
|
47
47
|
disabled: boolean;
|
|
48
48
|
id: string;
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
51
|
-
|
|
50
|
+
/**
|
|
51
|
+
* What is highlighted once the list renders: the first, the last or the selected item, or the
|
|
52
|
+
* first item the typed text kept (`autoHighlight`).
|
|
53
|
+
*/
|
|
54
|
+
type PendingHighlight = "first" | "last" | "selected" | "typed" | null;
|
|
52
55
|
interface ComboboxState {
|
|
53
56
|
open: boolean;
|
|
54
57
|
disabled: boolean;
|
|
@@ -72,6 +75,8 @@ export declare class ComboboxRoot implements OverlayActions$1 {
|
|
|
72
75
|
readonly limit: import("@angular/core").InputSignal<number>;
|
|
73
76
|
readonly locale: import("@angular/core").InputSignal<string | undefined>;
|
|
74
77
|
readonly multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
78
|
+
/** Typing highlights the first item the filter keeps, so Enter chooses it (default `false`). */
|
|
79
|
+
readonly autoHighlight: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
75
80
|
readonly open: import("@angular/core").InputSignal<boolean | undefined>;
|
|
76
81
|
readonly openChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
77
82
|
readonly defaultOpen: import("@angular/core").InputSignal<boolean>;
|
|
@@ -233,6 +238,11 @@ export declare class ComboboxRoot implements OverlayActions$1 {
|
|
|
233
238
|
"required": false;
|
|
234
239
|
"isSignal": true;
|
|
235
240
|
};
|
|
241
|
+
"autoHighlight": {
|
|
242
|
+
"alias": "autoHighlight";
|
|
243
|
+
"required": false;
|
|
244
|
+
"isSignal": true;
|
|
245
|
+
};
|
|
236
246
|
"open": {
|
|
237
247
|
"alias": "open";
|
|
238
248
|
"required": false;
|
|
@@ -24,6 +24,11 @@ export declare class NumberFieldRoot {
|
|
|
24
24
|
readonly valueChange: import("@angular/core").OutputEmitterRef<number | null>;
|
|
25
25
|
readonly defaultValue: import("@angular/core").InputSignal<number | null>;
|
|
26
26
|
readonly valueChangeDetails: import("@angular/core").OutputEmitterRef<ValueChangeEvent$1<number | null>>;
|
|
27
|
+
/**
|
|
28
|
+
* The value once a change is complete: on blur after typing, at a key or wheel step, at the
|
|
29
|
+
* release of a button press or a scrub (spec/number-field.md, "Committing").
|
|
30
|
+
*/
|
|
31
|
+
readonly valueCommitted: import("@angular/core").OutputEmitterRef<ValueChangeEvent$1<number | null>>;
|
|
27
32
|
readonly min: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
28
33
|
readonly max: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
29
34
|
/** The amount of a step (default `1`). */
|
|
@@ -54,6 +59,8 @@ export declare class NumberFieldRoot {
|
|
|
54
59
|
/** The Input's `id`. */
|
|
55
60
|
readonly inputId: import("@angular/core").Signal<string>;
|
|
56
61
|
private readonly own;
|
|
62
|
+
/** The reason of the last change not committed yet. */
|
|
63
|
+
private pending;
|
|
57
64
|
/** The text the user typed, until the blur formats it (`null`: the formatted value). */
|
|
58
65
|
private readonly typed;
|
|
59
66
|
/** A ScrubArea scrubs. */
|
|
@@ -105,6 +112,8 @@ export declare class NumberFieldRoot {
|
|
|
105
112
|
inputText(text: string, event: Event): boolean;
|
|
106
113
|
/** The Input lost focus: the value is clamped (`clampOnBlur`) and the text formatted. */
|
|
107
114
|
inputBlur(event: Event): void;
|
|
115
|
+
/** Reports the value when a change is pending (spec/number-field.md, "Committing"). */
|
|
116
|
+
commit(event: Event | undefined): void;
|
|
108
117
|
private interactive;
|
|
109
118
|
/** The value a step starts from: the typed text when it reads as a number. */
|
|
110
119
|
private base;
|
|
@@ -205,6 +214,7 @@ export declare class NumberFieldRoot {
|
|
|
205
214
|
}, {
|
|
206
215
|
"valueChange": "valueChange";
|
|
207
216
|
"valueChangeDetails": "valueChangeDetails";
|
|
217
|
+
"valueCommitted": "valueCommitted";
|
|
208
218
|
}, never, never, true, never>;
|
|
209
219
|
}
|
|
210
220
|
/**
|