Commit Graph

60 Commits

Author SHA1 Message Date
maoyingjie 658dfbb7d9 fix(table): full-width empty state, sort focus ring and fr column widths
HD-08 scope, against heroui ce90ea3 table sources and their
react-aria/react-stately dependencies:

- TableBody empty state now spans every real leaf column by default
  (self-registered TableColumns — selection and wrapper-rendered ones
  included — reactively following column changes), explicit colspan
  still wins, and the vnode-level empty detection keeps avoiding
  unknown-component setup/render probing
- sorting keeps one activation per click/Enter/Space (single sort path
  via the column) while the baseline focus ring returns: the trigger
  button keeps keyboard focus and forwards its real :focus-visible
  state to the th's existing [data-focus-visible] hook, so the inset
  ring lands on the column header like the pinned source and the UA
  outline is suppressed only inside a column; aria-sort="none" on
  sortable unsorted columns matches useTableColumnHeader and stays
- defaultWidth="Nfr" distributes the remaining width by weight
  instead of silently becoming auto: widths.ts ports react-stately's
  calculateColumnSizes (static px/% first, fr flex-grow sharing,
  min/max violation freezing, cascade rounding); fr mode locks
  table-layout: fixed for exact geometry, re-shares on container
  resize, freezes dragged columns to their pixel width and keeps
  geometry (with flipped drag direction) in RTL; unmeasured
  environments keep native widths
- .table__cell's text-start/font-normal verified to block caller
  inheritance and narrowed to th.hv-table__cell { inherit }, keeping
  the baseline td row-header typography while ancestor align/weight
  cascade into cells again; th scope=row, corner selectors and the
  resizer z-index fix are untouched
- tests/fixtures/table-layout.vue (playground) drives the real-browser
  geometry/drag/RTL/theme verification; m35-m36 contract pins the two
  new CSS markers in the final tarball

Full suite 111 files / 1657 tests, typecheck, build:docs and the
m35-m36 + handbook-styles tarball contracts pass.
2026-10-29 10:59:24 +08:00
maoyingjie dc859fb8ae feat(styles): export shared field variant maps and restore the border fallback
HD-05 scope, against heroui ce90ea3 styles sources:

- add labelVariants/descriptionVariants/fieldErrorVariants/
  textFieldVariants/switchGroupVariants (+ VariantProps types) to
  @heroui-vue/styles and re-export them from @heroui-vue/components;
  variant keys, defaultVariants and slot sets match the pinned
  *.styles.ts files key for key (hv- namespace only)
- Label/Description/FieldError/useTextField/SwitchGroup now consume
  those mappings instead of inline class strings, so the state classes
  have a single source; rendered class output is unchanged and pinned
  by tests/shared-field-styles.test.ts (mapping output <-> component
  output)
- restore the global border-color fallback
  (*, ::after, ::before, ::backdrop, ::file-selector-button ->
  border-color: var(--border, currentColor)) in a new base/base.css,
  imported layer(base) right after preflight like the pinned entry:
  a low-priority default that components, utilities and consumer CSS
  override without !important
- view-transition globals from the pinned base.css stay unported: no
  View Transitions API usage exists in the library or docs site
- shared-styles package contract: packed runtime exports from both
  entries, variant-output assertions, CSS tokens incl. the fallback,
  strict nodenext+bundler type contract, and a real-browser consumer
  fixture (light/dark --border, explicit colors, consumer overrides,
  currentColor fallback) wired into check-package.mjs
- docs: styling layers/border fallback/exports notes, five component
  API pages, compatibility matrix and upstream source records

Full suite 111 files / 1634 tests, typecheck and build:docs pass;
shared-styles + api-root-aliases + handbook-styles verified against
the final tarballs.
2026-10-28 23:36:59 +08:00
maoyingjie 462044c3b8 fix(demos): bound format popover width and keep mobile trigger reachable 2026-10-28 17:49:49 +08:00
maoyingjie 2e3fdd4800 fix(demos): inherit ConfigProvider locale and restore the format-options popover width
HD-03 scope, all against heroui ce90ea3 cn sources:

- calendar-disabled/read-only: restore the today() default value and the
  baseline description lines (日历已禁用 / 日历为只读) inside the
  flex flex-col items-center wrapper
- calendar-controlled: restore the second button row (设为今天/设为圣诞节/
  清空) and the baseline feedback wording (已选日期:…(未选))
- locale inheritance: add a public useLocale() accessor (the components'
  ConfigProvider → en-US/ltr chain) and use it for startOfWeek in
  calendar-controlled, isWeekend in booking-calendar/unavailable-dates and
  the DateFormatter in date-range-picker-format-options instead of the
  hardcoded 'en-US' / 'zh-CN' literals
- date-range-picker-format-options: restore the pinned w-full popover class;
  the pinned source positions the popover against the initial containing
  block (full viewport width — verified on the reference docs at desktop and
  narrow), while Reka's shrink-to-fit positioning wrapper collapses the same
  class. A scoped adapter rule (.hv-date-range-picker__popover.w-full →
  100vw, layering-safe like the dropdown static-wrapper adapter) restores
  the baseline effect: viewport-wide popover, 252px calendar, stretched
  time rows, identical boundary clamping

- tests: locale dynamic-switching regressions covering zh-CN/en-US for week
  start, weekend rules (with ar-EG flipping the weekend for a observable
  rule change) and range formatting; full suite 110 files / 1627 tests,
  typecheck, build:docs and the date-range-picker / api-root-aliases /
  calendar tarball contracts pass
2026-10-28 16:35:26 +08:00
maoyingjie f8de4529f6 fix(dropdown): preserve grouped root attrs and events without breaking seams 2026-10-28 12:35:35 +08:00
maoyingjie 2a1a074ac3 fix: align field placeholder tokens and docs control semantics 2026-10-28 00:03:01 +08:00
maoyingjie 202e3a5b5d fix: enforce handbook scrollbar and reduced motion contracts 2026-10-27 21:10:51 +08:00
maoyingjie ee5fce9adb feat: migrate public ColorPicker composition 2026-10-27 17:47:52 +08:00
maoyingjie 8d9adda8da feat: publish ColorSwatchPicker and shared swatch picker parts 2026-10-27 14:42:29 +08:00
maoyingjie 6a7a89be6b feat: publish ColorField and shared color input parts 2026-10-27 11:53:02 +08:00
maoyingjie ce6c43eb47 feat: migrate public ColorSlider with docs and tests 2026-10-27 09:16:32 +08:00
maoyingjie ae364578ce feat: add public ColorArea components, docs, and package contract 2026-10-26 23:51:31 +08:00
maoyingjie ff7c4ee45a feat: migrate public DateRangePicker with shared range field and calendar owners 2026-10-26 23:05:36 +08:00
maoyingjie 9a69f92233 feat: migrate public DatePicker with shared field and calendar owners 2026-10-26 22:01:27 +08:00
maoyingjie 07f6aeadb6 feat: migrate RangeCalendar public components and demos 2026-10-26 21:25:25 +08:00
maoyingjie 97263d82e1 feat: migrate public TimeField with shared date input parts 2026-10-26 17:56:41 +08:00
maoyingjie 270dea5cff feat: migrate ColorSwatch and public color boundary 2026-10-26 13:25:21 +08:00
maoyingjie 647c39035d merge: integrate public collection picker migration
# Conflicts:
#	AGENTS.md
#	docs/compatibility.md
#	docs/upstream.md
#	docs/verification.md
#	package.json
#	packages/styles/src/index.ts
#	packages/vue/src/index.ts
#	packages/vue/src/types.ts
#	tests/package/README.md
2026-10-25 20:55:18 +08:00
maoyingjie fc1f98a15e feat: establish composed color picker protocol 2026-10-25 19:52:12 +08:00
maoyingjie 3e9be13b19 fix(pickers): repair data-slot selectors and align demos with the baseline
The CSS port prefixed data-slot attribute values with hv-, so the compiled
selectors never matched the DOM and the ComboBox trigger chevron never
rotated. Only class names get the prefix; slot values stay byte-identical.

Also commit typed text as the value when allowsCustomValue finds no record,
restore the baseline search-field shell in all 24 Autocomplete demos, and
correct both doc pages against the pinned upstream sources.
2026-10-25 17:46:32 +08:00
maoyingjie 5e688680e9 feat(autocomplete): migrate Autocomplete with popover-owned filtering
Port the fixed-baseline Autocomplete onto the B02a collection protocol. The
trigger is the single Tab entry; opening moves focus to the search box inside the
popover, which owns filtering, aria-activedescendant and keyboard navigation
while the list only tracks an active row.

- Seven parts: root (field, value/open models, form value, owner wiring),
  trigger (anchor + activation), value (scoped slot with selectedItems and
  selectedText instead of copied item subtrees), indicator, clear button,
  popover (measured trigger width), filter (owns the search text and composes the
  inner SearchFieldInput into the combobox control).
- Filter exposes input-value/update:inputValue/inputChange, matching ComboBox.
- Confirming the active row in multiple mode now toggles it instead of replacing
  the accepted set (ComboBox shared the same bug).
- ComboBox shows the accepted label on the first render via a display value that
  falls back to the selected record, so preselected fields are readable before
  the selection watcher runs (including SSR).
- Popovers measure the anchor with a ResizeObserver because Reka does not publish
  the anchor size; the caller's root class is merged again so the trigger fills
  the field width.
- 24 baseline previews, Chinese doc page, navigation, 17 behaviour tests, 5
  demo/document contracts and an independent tarball consumption script for both
  pickers.

Not included: the full bundler/NodeNext type matrix (B02d).
2026-10-25 17:20:17 +08:00
maoyingjie 46e4df7e85 feat(combo-box): migrate ComboBox with input-owned focus and filtering
Port the fixed-baseline ComboBox onto the B02a collection protocol: the input
keeps real DOM focus, the list only tracks an active row, and filtering reuses
the owner filter instead of a second collection kernel.

- Five parts: root (field text control, value/input/open models, form value,
  owner wiring), InputGroup (composes the caller's Input into the combobox
  control and anchors the popover), Trigger, Value, Popover.
- Closed-state metadata is planned from the slot tree, so filtering, the initial
  value label and form-value="text" work before the list has mounted.
- Selection text syncs on selection changes only, so allows-custom-value typing
  is not overwritten; read-only and disabled are injected onto the composed
  input because it reads the text-field protocol, not the field context.
- 24 baseline previews, the Chinese doc page, navigation, 19 behaviour tests and
  6 demo/document contracts. Async demo uses a local async source with abort,
  loading and incremental append (documented adaptations).

Not included: independent tarball consumption (B02d).
2026-10-25 16:59:16 +08:00
maoyingjie db18d0d3da feat: establish composed color field and input group protocols 2026-10-25 15:20:02 +08:00
maoyingjie 1b972a78ba feat(collection): add optional filtering and virtual focus for composite pickers
ComboBox and Autocomplete need two capabilities the collection protocol did not
express: filtering a collection by an external input value, and keeping DOM focus
in the composite's input while an active option is tracked for
aria-activedescendant.

Both are opt-in members on CollectionOwner plus optionId/reveal on the owned
collection. Standalone ListBox and Select provide none of them and keep their
previous behaviour: DOM focus still moves into the list, one roving tab stop, no
row filtering.

Filtered rows stay mounted with data-filtered (display:none) so their text and
accepted selection survive; only display, aria positions and keyboard navigation
see the visible subset. Under virtual focus the list never takes DOM focus,
never exposes a roving tab stop, and leaves keyboard handling to the composite;
reveal() scrolls a virtualized window and waits for the row to mount before the
composite reads its id.

Includes the playground verification page, a ten-case suite and the B02a section
of the migration report.
2026-10-25 14:53:49 +08:00
maoyingjie 712b6c6037 feat: establish color slider geometry and picker composition 2026-10-25 14:37:48 +08:00
maoyingjie 57d7cbb2d6 feat: establish shared color state and area interaction foundation 2026-10-25 11:10:47 +08:00
maoyingjie af6bfda3ee feat: migrate Tag, TagGroup and ErrorMessage with collection and focus contracts
Port the fixed HeroUI baseline tag/tag-group/error-message components onto the
existing collection selection/registry protocols instead of a second state model.

- TagGroup owns selection, disabled scope, removal requests and name/description
  wiring; TagGroupList renders the role=grid node and Tag renders role=row.
- Removal has one path: a press inside the remove subtree is a removal request,
  so custom remove buttons work without a second event source; focus follows the
  next neighbour only after the item is actually gone.
- ErrorMessage keeps the baseline slot marker and reuses the field part ids
  without gaining validation or aria-invalid semantics.
- Ship the 12 tag-group and 2 error-message previews, both doc pages, navigation,
  a 35-case behavioural suite and independent tarball consumption checks.
2026-10-25 10:45:43 +08:00
maoyingjie cfc97fdc07 feat: establish shared calendar range selection foundation 2026-10-25 10:22:22 +08:00
maoyingjie 53b4639b0e fix: portal dropdown surfaces and close the review capability gaps
- Root and submenu surfaces render through the dropdown portal with the overlay
  z-index, so clipping/isolation ancestors no longer cut the menu; panel height
  is capped by the floating available height and the animation origin maps the
  real transform origin.
- Standalone Menu is a static in-flow list: no scroll lock, no outside pointer
  blocking, no floating placement and no focus stealing.
- Selection ownership is isolated per level: section disabled keys add to the
  menu list, and a nested Menu resets the section owner.
- closeOnSelect resolves item > menu policy > per-mode default for selection
  items; actions and radio items close, checkboxes stay open.
- Business keys no longer become DOM ids (instance ids + data-key), and submenu
  surfaces label themselves from the real trigger.
- Long-press keydown runs the caller's handlers first and only opens when not
  cancelled; submenu panels merge caller keydown with the internal Escape.
- Link items render a real anchor, aria labels land on the role=menu node,
  submenu panels forward placement/offset/collision props and caller attrs, and
  the popover provides the default Surface variant.
- Wrapper parts declare real props/emits, plus the missing official capability
  props (disallowEmptySelection, escapeKeyBehavior, shouldFocusWrap, autoFocus,
  shouldCloseOnSelect, close, empty slot, isKeyboardDismissDisabled,
  shouldCloseOnInteractOutside, placement/offset family, scoped slots).
- Ship an independent consumer fixture for browser-level verification.
2026-10-24 22:56:44 +08:00
maoyingjie 043a5418f3 fix: align Dropdown/Menu with the HeroUI baseline after fidelity audit
- menu-item.css keys disabled styling off the presence attribute Reka emits.
- Dropdown surfaces drive the ported enter/exit animations and use data-side
  for placement-specific motion.
- One role=menu per popup; items render their key as DOM id; submenu surfaces
  point aria-labelledby at the real trigger; MenuSection names its group from a
  nested Header.
- Custom (asChild) triggers stay keyboard focusable; library Button/Avatar keep
  their own layout instead of the custom-trigger rules.
- Items emit data-focused/data-hovered/data-pressed, expose the upstream render
  props to slots, and merge caller classes through tailwind-variants.
- Submenu triggers declare hasSubmenu explicitly and forward class/ARIA; the
  default submenu indicator uses the baseline chevron artwork.
- Demos restore Kbd slot="keyboard" (27x), IconSquarePlus, and remove the added
  comment, stray space and duplicated indicator SVGs.
- Document the page after the official structure and API tables, including
  renamed props, Vue extensions and remaining gaps.
2026-10-24 22:14:10 +08:00
maoyingjie 835d2e4d90 feat: migrate Calendar and calendar year picker 2026-10-24 20:59:19 +08:00
maoyingjie 06ddb6662a feat: migrate Menu and Dropdown with selection and submenus
Port HeroUI menu family and Dropdown from ce90ea3: Reka DropdownMenu base,
MenuKey[] selection with section owners, 17 official demos, dropdown docs
and B01 tests. Long-press stays demo-level; submenu close is level-scoped.
2026-10-24 20:43:04 +08:00
maoyingjie 8c04632438 merge: integrate reviewed Toast and Table with Select and DateField main 2026-10-24 07:25:36 +08:00
maoyingjie ed41af5294 feat: migrate Toast and Table with reviewed state focus and SSR contracts 2026-10-24 07:19:26 +08:00
maoyingjie 01f0776805 feat: migrate DateField and shared date input group 2026-10-23 23:56:18 +08:00
maoyingjie 3c878d2582 Merge Select migration and browser verification
# Conflicts:
#	AGENTS.md
#	docs/migration-handoff.md
#	docs/upstream.md
#	docs/verification.md
#	package.json
#	packages/styles/src/index.ts
#	packages/vue/src/index.ts
#	packages/vue/src/types.ts
#	tests/package/README.md
2026-10-23 23:00:28 +08:00
maoyingjie 2b569451b6 feat: migrate Select with field, collection and SSR contracts 2026-10-23 22:05:44 +08:00
maoyingjie 0cfe7b6195 merge: integrate reviewed AlertDialog Drawer with ListBox main 2026-10-23 18:36:19 +08:00
maoyingjie 0ec20aaa6a feat: migrate AlertDialog and Drawer with reviewed overlay lifecycles 2026-10-23 18:34:07 +08:00
maoyingjie 65db60a7ac feat: migrate ListBox with virtual collection and accessible parts 2026-10-23 15:02:30 +08:00
maoyingjie 9f44ffb310 merge: integrate reviewed M30-M32 with NumberField Slider and migration lessons 2026-10-23 13:55:44 +08:00
maoyingjie 1fa2929a24 feat: migrate Pagination Header and InputOTP with field and event regressions 2026-10-23 13:49:44 +08:00
maoyingjie 4da45b109e feat: migrate Slider with native range semantics and strict ESM declarations 2026-10-23 13:12:26 +08:00
maoyingjie 23527d4e4c feat: migrate NumberField with form integration and docs 2026-10-23 11:48:29 +08:00
maoyingjie b2525bb04d feat: migrate Toolbar with teleport-safe focus ownership 2026-10-23 10:50:42 +08:00
maoyingjie 9c93647ad2 feat: migrate button groups and toggle buttons with focus regressions 2026-10-23 09:57:41 +08:00
maoyingjie 99df0f1c91 feat: migrate ScrollShadow and Tabs with docs and keyboard support 2026-10-23 00:25:45 +08:00
maoyingjie 2b4ac04df1 feat: migrate Modal Popover and Tooltip with shared overlay foundation 2026-10-22 23:39:51 +08:00
maoyingjie b086d7f30d feat: add Disclosure DisclosureGroup and Accordion 2026-10-22 18:25:08 +08:00
maoyingjie 73bd7da5fa feat: add ProgressBar ProgressCircle and Meter 2026-10-22 14:33:15 +08:00