@smilodon/core 1.22.0 → 1.23.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/README.md CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  > **Verification status:** `EnhancedSelect`'s public `virtualize` setting chunks large-list rendering but does not bound the final option DOM. Viewport-windowed rendering remains behind a private test seam and is not production-activated. ARIA and keyboard behaviors have automated coverage in progress; WCAG conformance and manual assistive-technology review have not been certified. See [known limitations](../../docs/KNOWN-LIMITATIONS.md#viewport-virtualization-status) and the [Phase 4 certification record](../../docs/architecture/PHASE-4-CERTIFICATION.md).
14
14
 
15
- > **Next Core candidate (unpublished):** Core `1.22.0` adds the truncated search-query tooltip and isolated icon-root support for React-node remove icons. See the [release candidate record](../../docs/releases/WEB-1.22.0-RELEASE.md) for package pairing and qualification status.
15
+ > **Next Core candidate (unpublished):** Core `1.23.0` adds dropdown border controls, group/option stacking and loading-state styling, plus fixes for disabled-option clicks, pointer-reopen active state, and final-chip placeholder timing. See the [release candidate record](../../docs/releases/WEB-1.23.0-RELEASE.md).
16
16
 
17
17
  > **Issue #100:** `multiSelectDisplay.scrollToLatestChip` is available in `@smilodon/core@1.17.0`. See [Multi-Select Display Modes](#multi-select-display-modes) and the [release verification](../../docs/releases/WEB-1.17.0-REGISTRY-VERIFICATION.json).
18
18
 
@@ -31,6 +31,10 @@ select.updateConfig({
31
31
  })
32
32
  ```
33
33
 
34
+ ## Active option state on open
35
+
36
+ Pointer-opening or reopening the dropdown preserves selected styling without assigning the selected option as the keyboard-active option. Active identity and `aria-activedescendant` are cleared for pointer opens; actual pointer hover remains native. Keyboard navigation establishes an active option, and keyboard focus/open continues to expose the selected active option where applicable. This keeps selection, hover, and keyboard navigation as separate states.
37
+
34
38
  ## Selected-label tooltip
35
39
 
36
40
  Core displays the full selected display label in a shared tooltip when the closed single-select value or a multi-select chip is visually truncated. The tooltip appears on pointer hover or keyboard focus; a label that fits does not open one. It uses the same configured item-label resolver as the visible selection, so custom `serverSide.getLabelFromItem` labels are reflected. Search queries are not treated as selected values. Multi-select chip labels become tab stops only while truncated, and Escape dismisses the tooltip without moving focus. This behavior covers selected values and chips, not custom option content in the dropdown.
@@ -70,6 +74,26 @@ select.updateConfig({
70
74
 
71
75
  The bucket exposes `::part(loading)`, `::part(loading-icon)`, `::part(loading-spinner)`, `::part(loading-message)`, and `::part(loading-content)`. Layout can be adjusted with `--select-busy-gap`, `--select-busy-padding`, `--select-busy-color`, `--select-busy-bg`, and the existing `--select-spinner-size` token. `minDisplayTime` is a visual minimum after request completion; it does not delay acceptance, pagination, or `aria-busy` updates.
72
76
 
77
+ ### Group, option, and loading presentation hooks
78
+
79
+ Sticky group headers keep their current defaults and can be adjusted with `--select-group-header-position`, `--select-group-header-top`, and `--select-group-header-z-index`. The same properties can be set at runtime with `styles.groupHeader.position`, `.top`, and `.zIndex`. Group headers expose `::part(group-header)`.
80
+
81
+ The individual option stacking token is `--select-option-z-index` (default `auto`). It applies to built-in option hosts and custom-rendered option roots. A positioned option with a raised z-index can overlap a sticky header; a child cannot escape its dropdown or another ancestor stacking/clipping context.
82
+
83
+ The separate searching state now exposes `::part(searching)`, `::part(searching-spinner)`, and `::part(searching-message)` while retaining the legacy `::part(loading)` hook. Set its accessible status text through the Core instance config:
84
+
85
+ ```ts
86
+ select.updateConfig({ searchingMessage: 'Searching the catalog…' });
87
+ ```
88
+
89
+ `loadMore.label` customizes the keyboard-accessible manual action, and its container and button expose `::part(load-more-container)` and `::part(load-more-button)`:
90
+
91
+ ```ts
92
+ select.updateConfig({ loadMore: { enabled: true, label: 'Show more products' } });
93
+ ```
94
+
95
+ `styles.loader` provides shared `gap`, `padding`, `color`, `background`, `fontSize`, `textAlign`, `alignItems`, and `justifyContent` styling for busy and searching containers. `styles.classNames.loader` is applied to both and updated when configuration changes. These settings complement the existing busy bucket slots and do not style or replace the infinite-scroll sentinel; the sentinel remains visually transparent and continues to drive observation.
96
+
73
97
  ## Acknowledged data loading
74
98
 
75
99
  The acknowledged protocol provides per-instance data-loading configuration and request completion on `EnhancedSelect`. It is included in the published Core package; the legacy protocol remains the default. Remote and hybrid search or cursor pagination require explicit acknowledged-protocol opt-in. There is no global acknowledged-loading default. See the [Core 1.19.0 release record](../../docs/releases/WEB-1.19.0-RELEASE.md) for the tested scope and browser limitations.
@@ -567,10 +591,43 @@ enhanced-select {
567
591
  /* Dropdown */
568
592
  --select-dropdown-bg: white;
569
593
  --select-dropdown-border: #ccc;
594
+ --select-dropdown-border-width: 1px;
595
+ --select-dropdown-border-style: solid;
570
596
  --select-dropdown-shadow: 0 4px 6px rgba(0,0,0,0.1);
571
597
  }
572
598
  ```
573
599
 
600
+ `--select-dropdown-border` continues to accept a **color only**. Width and style are independent tokens, so a dashed panel can be configured without replacing the border shorthand:
601
+
602
+ ```css
603
+ enhanced-select.custom-panel {
604
+ --select-dropdown-border: #64748b;
605
+ --select-dropdown-border-width: 2px;
606
+ --select-dropdown-border-style: dashed;
607
+ }
608
+
609
+ enhanced-select.borderless-panel {
610
+ --select-dropdown-border-style: none;
611
+ }
612
+ ```
613
+
614
+ The default remains `1px solid`. The closed field and dropdown panel are available as `::part(button)` and `::part(listbox)`. CSS variables are suitable for themeable defaults; `::part()` can style a part directly. An instance's `styles.dropdown` configuration is applied as inline styling and wins for overlapping properties. Runtime changes update the existing panel, without remounting:
615
+
616
+ ```ts
617
+ select.updateConfig({
618
+ styles: { dropdown: { borderWidth: '2px', borderStyle: 'dotted', borderColor: '#64748b' } },
619
+ });
620
+
621
+ // Release these inline overrides and return to the CSS token/stylesheet values.
622
+ select.updateConfig({
623
+ styles: { dropdown: { borderWidth: '', borderStyle: '', borderColor: '' } },
624
+ });
625
+ ```
626
+
627
+ You can also remove a border directly with `enhanced-select::part(listbox) { border: none; }`. If a runtime `styles.dropdown` value sets the same property, clear that runtime value before expecting the part rule or token fallback to apply. Dark mode retains explicit input and dropdown border colors; hover/focus input colors remain independently customizable with `--select-input-hover-border` and `--select-input-focus-border` (and the `--select-dark-*` state tokens).
628
+
629
+ With `prefers-contrast: more`, Smilodon adds an independent focus outline around the input container. This leaves the consumer-authored shell border dimensions and styling intact.
630
+
574
631
  #### Dark Mode (Opt-in)
575
632
 
576
633
  Dark mode is **opt-in only** and can be enabled by adding a class or data attribute:
@@ -625,6 +682,8 @@ enhanced-select.dark-mode {
625
682
  --select-input-height /* Input container height */
626
683
  --select-dropdown-bg /* Dropdown background (white) */
627
684
  --select-dropdown-border /* Dropdown border color (#ccc) */
685
+ --select-dropdown-border-width /* Dropdown border width (1px) */
686
+ --select-dropdown-border-style /* Dropdown border style (solid) */
628
687
  --select-dropdown-shadow /* Dropdown shadow */
629
688
  --select-empty-padding /* Empty/no-results container padding */
630
689
  --select-empty-color /* Text color for empty/no-results models */
@@ -804,12 +863,15 @@ If you need a dimmed option to remain hoverable, focusable, or selectable, confi
804
863
  disabledOptionBehavior: {
805
864
  hoverable: true,
806
865
  focusable: true,
807
- selectable: false
866
+ selectable: false,
867
+ closeOnClick: false
808
868
  }
809
869
  }
810
870
  }
811
871
  ```
812
872
 
873
+ `closeOnClick` defaults to `false`, so clicking a disabled option keeps the dropdown open and leaves selection unchanged. Set it to `true` to close after that blocked click; it never makes the disabled option selectable. Disabled options remain pointer-targetable for Core event handling while default hover, keyboard navigation, and selection restrictions remain in effect.
874
+
813
875
  Styling hooks:
814
876
 
815
877
  - `styles.disabledOption`