tam_select 1.2.4 → 1.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d83036c60f51e481343b204bc7e6333c92cc36d6c2d1190656cd956b0e3c4301
4
- data.tar.gz: 0576a3df23baad11bc818b4a2d9c05ccc035e7c7ae369b67606ef1c03c398aea
3
+ metadata.gz: 60a23594de91ae0fa0fc49d9331f88f1a8763560c25ef23cf875dffb8bb577b9
4
+ data.tar.gz: ce59e0c83ee8b153d1808e87b1484e2151992629c79f21fbf2ef5a478be59ce3
5
5
  SHA512:
6
- metadata.gz: 0bd5a3e7eb8d90cb9d18b801a55943abc9da582a33a0616ceadbf8e1a27fcff5ea5df795bae552b4e64d97c3c6e7cb298069285afddae4499c64af1b1cd0579e
7
- data.tar.gz: 8aed36fcd88674f2cb3d91794ca224f75f909f79d805ba6d67cc613dd9bcf624ee7e2358a39ddcefaf5ff2cd24b27e9583e21ca1bd63e3eaa4b1289c04b87eac
6
+ metadata.gz: 0d9da7b5dacc5d5a32df2c24042372d006622c913c4b807aff535ba0d686e433c88d6d7ae17f5642ffbe2bedfa8494c0310c9da34e47c4d94ecfd2425165358d
7
+ data.tar.gz: 9b57340a577efc343d421db811183f0dfea8682d254d910e2cb32fa7f59729a5857f26e85041c70b39969feadde1117db74faac94c7f2540fdc50a6925e7c878
data/CHANGELOG.md ADDED
@@ -0,0 +1,164 @@
1
+ # Changelog
2
+
3
+ ## 1.4.1
4
+
5
+ - Publish the gem and npm package with trusted publishing (OIDC) instead of
6
+ stored API tokens, and skip a registry that already has the version so a
7
+ failed release can be re-run.
8
+ - 1.4.0 was tagged but its release failed, so it never reached RubyGems or npm.
9
+ This is the first published release containing the 1.4.0 changes below.
10
+
11
+ ## 1.4.0
12
+
13
+ - Keep a single select's `prompt:` as an always-present blank option. Rails
14
+ renders a prompt only while the field is empty, so after choosing a value
15
+ and re-rendering (filters, validation errors) the clear button disappeared.
16
+ - Add `config.tam_select.default_select`, which renders every select as a Tam
17
+ Select: Simple Form's `:select` type and Rails' `select_tag`, `select`,
18
+ `collection_select` and `grouped_collection_select` (so `f.select` too),
19
+ each with a blank option unless given. Opt a field out with
20
+ `data: { tam_select: false }`. `tam_select:install` generates
21
+ `config/initializers/tam_select.rb` with it enabled.
22
+ - Add a blank option to single selects by default in `tam_select_tag` and the
23
+ Simple Form input (also when `selected:` or `default:` is given), so they
24
+ can be cleared and show their placeholder. Pass `include_blank: false` or
25
+ a `prompt` to control it.
26
+ - Add a `tamSelectOptions` getter to the Stimulus controller, so an app can
27
+ subclass it (`import TamSelectController from "tam-select/stimulus"`) and
28
+ add its own defaults, theme or computed options while the rest of the
29
+ controller keeps updating with the package.
30
+ - The helper and Simple Form input no longer send `searchable: true` unless
31
+ it is given, leaving the decision to the JavaScript default or the app's
32
+ controller.
33
+ - Serve the Rails integration from the gem, so `bundle update tam_select` is
34
+ the whole update. With importmap, the engine pins the library and the
35
+ Stimulus controller, autoloads the helper, the Simple Form input (when Simple
36
+ Form is present) and the controller concerns, and ships a Tailwind entry
37
+ point for tailwindcss-rails 4.4+. An app file with the same path overrides
38
+ the gem's. jsbundling apps now depend on the `tam-select` npm package.
39
+ - Add `bin/rails generate tam_select:update` to upgrade apps installed by
40
+ 1.3 or earlier: it removes copies that were never changed and reports the
41
+ ones that were. `tam_select:install` is safe to re-run.
42
+ - Hide the clear button, search icon, and menu with an inline style as well
43
+ as the `hidden` class. In Tailwind v4 the clear button's `inline-flex`
44
+ outranked `hidden`, so it showed even with nothing to clear.
45
+ - Size the open menu like a native select: it is at least as wide as the
46
+ control and grows to fit its widest option, up to the new
47
+ `maxDropdownWidth` (default `480`), shifting to stay inside the viewport.
48
+ This is now the default (`dropdownWidth: "auto"`) for inline and portaled
49
+ menus, and RTL menus grow from the control's right edge. Use
50
+ `dropdownWidth: "trigger"` to keep the previous behaviour.
51
+ - Add `width: "auto"` (alias `"fit"`), which sizes the closed control to its
52
+ widest option so choosing a shorter one never resizes it. `width: "resolve"`
53
+ now honours an inline width on the native select.
54
+ - Keep auto-width menus inside overflow-clipping ancestors (cards, modals,
55
+ scrolling tables), keep their width steady while filtering, and cache text
56
+ measurements so large lists stay fast.
57
+ - Stop re-requesting a failed remote page in a loop: loaded options stay
58
+ listed with the error, and Load more retries.
59
+ - `selectValue` accepts a copied or stale item object, `createItem` is typed
60
+ as possibly `null`, a `dir="auto"` ancestor no longer hides an RTL page,
61
+ and snapshot recovery also removes a stale portaled dropdown.
62
+ - The Stimulus controller rebuilds selects left on the page after a cached
63
+ frame navigation (`data-turbo-action="advance"`).
64
+ - Treat the native select as the source of truth for the selection, and act on
65
+ the exact option used so duplicate values select and deselect correctly.
66
+ - Emit no change when re-picking the current value; keep already selected
67
+ options when `selectOnClose` runs, and select only once in single mode.
68
+ - Clear a single select to its empty option, and hide Clear when it has none.
69
+ - Reopen a single select on its selection, keep growing type-ahead matches,
70
+ toggle Ctrl+A off at the selection limit, and honour sorters in optgroups.
71
+ - Render the active row in virtual lists on navigation and open, and keep
72
+ focus and `aria-activedescendant` on the trigger when search is hidden.
73
+ - Prefer `noResultsState` over `emptyState` for searches with no matches, and
74
+ inherit direction from the nearest `dir` ancestor.
75
+ - Fix tag drag highlighting, special-character values, and cross-group drops.
76
+ - Make Load more a button, load the next page when the first cannot scroll,
77
+ and keep loaded pages after picking a remote option with no query.
78
+ - Close and lock an open select when it is disabled; make `destroy()`
79
+ idempotent and safe for newer instances; recover markup from page snapshots
80
+ and tear down before `turbo:before-cache` in the Stimulus controller.
81
+ - Keep the selected option in single-select lists, marked with its check, and
82
+ open on it like a native select; `hideSelected` now hides it in either mode.
83
+ - Keep selected-option styling when the active option moves, and style the
84
+ active option distinctly from the selected one.
85
+ - Polish default styles: matching dropdown radius, inset option list, valid
86
+ `origin-top` animation origin, a coloured check, and higher-contrast details,
87
+ group headers, messages, and dark-mode spinner.
88
+ - Omit blank `detail`, `meta`, and `image` values from `tam_select_payload` so
89
+ remote options never render empty details or broken images.
90
+ - Merge string-keyed `tam_options`/`options` without duplicate JSON keys, and
91
+ add `selectAll`/`deselectAll` actions to the generated Stimulus controller.
92
+ - Fix Space being blocked in the single-select search input; Space now opens
93
+ the dropdown only from the focused trigger.
94
+ - Run type-ahead only from the trigger, so keys typed into the search input
95
+ filter results without also moving the active option ahead of the filter.
96
+ - Add multiline wrapping for long option labels and details, plus native title
97
+ tooltips; wrapped lists avoid fixed-height virtualization so rows stay aligned.
98
+ - Add viewport-clamped automatic dropdown widths, measured with the rendered
99
+ option font, so the opened menu fits its widest option without widening its
100
+ closed control or shifting page layout.
101
+ - Polish multi-select bulk actions with icons, live match counts, native disabled
102
+ states, a discoverable keyboard shortcut, and compact selection-count badges.
103
+ - Preserve the active scroll position when virtualized options are replaced so
104
+ large menus no longer jump back to their first items while scrolling.
105
+ - Keep internal option-list scrolling from resizing portaled menus, and measure
106
+ their natural content height so viewport-constrained menus can grow again.
107
+ - Add opt-in multi-select bulk actions, localized live selection counts, and
108
+ hidden selected results, with matching JavaScript and Stimulus action APIs.
109
+ - Keep bulk changes scoped to loaded search matches, respecting disabled groups,
110
+ selection limits, and cancelable per-item events; emit one change per batch.
111
+ - Support composition input without premature search, tag creation, or Enter
112
+ selection, and keep search accessible after reaching the selection limit.
113
+ - Improve phone and tablet behavior with touch-optimized controls, 16px mobile
114
+ search text, virtual-keyboard-aware menu sizing, viewport edge clamping, and
115
+ live Visual Viewport repositioning for portaled dropdowns.
116
+ - Honor the operating system's reduced-motion preference and add mobile search
117
+ input hints without changing native select form behavior.
118
+ - Present dropdown options with larger, menu-oriented text while keeping the
119
+ selected single value compact and aligned with standard input sizing.
120
+ - Keep rich option images and details in the dropdown instead of allowing them
121
+ to increase the height of the closed single-select control.
122
+ - Prevent portaled dropdowns from flashing at an oversized width or height by
123
+ positioning them before first paint and animating only opacity and transform.
124
+ - Keep the clear button and chevron grouped at the control's trailing edge
125
+ instead of letting competing auto margins push the clear icon inward.
126
+ - Render the clear action as a compact icon-only control and place it after the
127
+ chevron so the X occupies the trailing edge without reserving 44px of width.
128
+ - Make the default resolved width fill its parent reliably in flex and grid layouts.
129
+ - Keep pointer hover and keyboard active states visually consistent without scrolling the menu on pointer movement.
130
+ - Tighten control and dropdown corners from 12px to 8px.
131
+ - Refresh the default theme with compact, proportional styling: thinner borders,
132
+ tighter padding, faster transitions, and a cohesive dropdown that matches the
133
+ control border and radius exactly.
134
+ - Replace heavy box-shadow focus rings with outline-based halos that render
135
+ correctly over `overflow-hidden` controls.
136
+ - Switch hover highlight from a solid blue fill to a subtle `bg-zinc-100` tint,
137
+ with keyboard-active and selected states using soft blue backgrounds instead.
138
+ - Remove the DaisyUI theme preset and its auto-detection logic; the `default`
139
+ theme is now the only style that resolves from `"auto"`.
140
+ - Add a remote/API search demo section to the playground (GitHub API,
141
+ custom transport, paginated infinite scroll) with a live event log.
142
+ - Add a virtual scroll demo section to the playground with 1 500 and 5 000
143
+ item datasets, performance metrics, and DOM node counts.
144
+ - Add an RTL layout demo section to the playground with Arabic, Hebrew,
145
+ and mixed-direction selects.
146
+
147
+ ## 1.3.0 - 2026-08-24
148
+
149
+ - Add secure custom result and selection templates.
150
+ - Add localized messages and accessible action labels.
151
+ - Add cancelable lifecycle events and matching completion events.
152
+ - Synchronize native option mutations and form resets automatically.
153
+ - Add custom remote transports, parameters, response processing, and caching.
154
+ - Add dropdown portals with viewport-aware placement for modals and clipped containers.
155
+ - Expand the Stimulus action API and npm package exports.
156
+ - Move single-select search into a dedicated dropdown row while keeping the
157
+ closed control consistent with Tailwind and Simple Form fields.
158
+ - Limit the DaisyUI preset to semantic color utilities and remove its component
159
+ class coupling.
160
+
161
+ ## 1.2.6
162
+
163
+ - Add advanced search, option groups, virtual scrolling, RTL, tag drag-and-drop,
164
+ animation presets, TypeScript types, Rails generators, and visual polish.