@cahyo-dimas/freeday 1.13.0 → 1.13.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.
- package/CHANGELOG.md +13 -0
- package/README.id.md +1 -1
- package/README.md +1 -1
- package/adapters/react/components/FdyCombo.tsx +4 -0
- package/adapters/vue/components/FdyCombo.vue +4 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
Semua perubahan penting dicatat di sini. Format longgar mengikuti
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/); tiap versi = git tag.
|
|
5
5
|
|
|
6
|
+
## [1.13.1] — 2026-08-01
|
|
7
|
+
### Fixed
|
|
8
|
+
- **`FdyCombo` can be selected with the mouse again (#38).** Clicking an option did nothing — the
|
|
9
|
+
listbox closed and no `update:modelValue` fired (keyboard select still worked, which is why a
|
|
10
|
+
keyboard-only smoke test missed it). The option `<li>` isn't focusable, so a `mousedown` moved focus
|
|
11
|
+
off the combobox button; the root's `focusout` handler then closed the list — removing the `<li>` —
|
|
12
|
+
*before* `mouseup`, so the browser never generated a `click` and `choose()` was never reached. Added
|
|
13
|
+
`@mousedown.prevent` (Vue) / `onMouseDown` `preventDefault` (React) on the option so focus stays on the
|
|
14
|
+
button and the click lands — the same pattern the sibling `FdyDatepicker` / `FdyAutocomplete` (and the
|
|
15
|
+
vanilla `freeday-select.js`, fixed in v1.6.1) already use. Both adapters; no API change; keyboard and
|
|
16
|
+
hover paths untouched. Verified with trusted CDP mouse events (a synthetic `dispatchEvent` won't
|
|
17
|
+
reproduce it — untrusted events run no default action, so focus never moves).
|
|
18
|
+
|
|
6
19
|
## [1.13.0] — 2026-07-30
|
|
7
20
|
### Added
|
|
8
21
|
- **`FdyDatepicker` clear affordance — an optional date can now be unset (#37A).** A new `clearable`
|
package/README.id.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **Lebih banyak _free day_ buat dev — UI kit-nya sudah siap pakai.**
|
|
6
6
|
|
|
7
7
|
[](https://cahyo-dimas.github.io/freeday-ui-kit/)
|
|
8
|
-
[](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.13.1)
|
|
9
9
|
|
|
10
10
|
UI KIT yang token-driven & framework-agnostic — satu sumber kebenaran untuk warna, tipografi,
|
|
11
11
|
spasi, dan komponen. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> **More free days for devs — the UI kit is ready to use.**
|
|
6
6
|
|
|
7
7
|
[](https://cahyo-dimas.github.io/freeday-ui-kit/)
|
|
8
|
-
[](https://github.com/cahyo-dimas/freeday-ui-kit/tree/v1.13.1)
|
|
9
9
|
|
|
10
10
|
A token-driven, framework-agnostic UI kit — one source of truth for color, typography,
|
|
11
11
|
spacing, and components. Blueprint: `docs/superpowers/specs/2026-07-21-freeday-ui-kit-design.md`.
|
|
@@ -148,12 +148,16 @@ export function FdyCombo<T extends string>(props: FdyComboProps<T>): JSX.Element
|
|
|
148
148
|
</button>
|
|
149
149
|
<ul id={listboxId} ref={listboxRef} className="fdy-combo__listbox" role="listbox" hidden={!open}>
|
|
150
150
|
{props.options.map((opt: FdyComboOption<T>, i: number): JSX.Element => (
|
|
151
|
+
// onMouseDown preventDefault keeps focus on the button: the option <li> isn't focusable, so a
|
|
152
|
+
// plain mousedown moves focus out of the combo, fires onBlur (focusout), and closes the list
|
|
153
|
+
// before the click lands. Same pattern as FdyDatepicker/FdyAutocomplete.
|
|
151
154
|
<li
|
|
152
155
|
id={optionId(i)}
|
|
153
156
|
key={opt.value}
|
|
154
157
|
className={i === highlighted ? 'fdy-combo__option is-highlighted' : 'fdy-combo__option'}
|
|
155
158
|
role="option"
|
|
156
159
|
aria-selected={opt.value === props.value}
|
|
160
|
+
onMouseDown={(e: React.MouseEvent): void => e.preventDefault()}
|
|
157
161
|
onClick={(): void => choose(i)}
|
|
158
162
|
onMouseMove={(): void => setHighlight(i)}
|
|
159
163
|
>
|
|
@@ -214,6 +214,9 @@ onBeforeUnmount((): void => {
|
|
|
214
214
|
<span class="fdy-combo__value" :class="{ 'fdy-combo__value--placeholder': isPlaceholder }">{{ selectedLabel }}</span>
|
|
215
215
|
</button>
|
|
216
216
|
<ul :id="listboxId" ref="listboxEl" class="fdy-combo__listbox" role="listbox" popover="manual" :hidden="!open">
|
|
217
|
+
<!-- @mousedown.prevent keeps focus on the button: the option <li> isn't focusable, so a plain
|
|
218
|
+
mousedown moves focus out of the combo, fires @focusout, and closes the list before the click
|
|
219
|
+
lands — mouse-select would silently do nothing. Same pattern as FdyDatepicker/FdyAutocomplete. -->
|
|
217
220
|
<li
|
|
218
221
|
v-for="(opt, i) in options"
|
|
219
222
|
:id="optionId(i)"
|
|
@@ -222,6 +225,7 @@ onBeforeUnmount((): void => {
|
|
|
222
225
|
:class="{ 'is-highlighted': i === highlighted }"
|
|
223
226
|
role="option"
|
|
224
227
|
:aria-selected="opt.value === modelValue"
|
|
228
|
+
@mousedown.prevent
|
|
225
229
|
@click="choose(i)"
|
|
226
230
|
@mousemove="setHighlight(i)"
|
|
227
231
|
>
|