@smilodon/core 1.20.0 → 1.21.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
@@ -29,6 +29,10 @@ select.updateConfig({
29
29
  })
30
30
  ```
31
31
 
32
+ ## Selected-label tooltip
33
+
34
+ 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.
35
+
32
36
  ## Custom busy bucket (Core 1.13.0)
33
37
 
34
38
  Introduced in `@smilodon/core@1.13.0` (Issue #90), the busy bucket keeps request state in Core and lets the host customize its presentation. Use the native slots with the Web Component or Vanilla API:
@@ -630,6 +634,7 @@ enhanced-select.dark-mode {
630
634
  --select-arrow-width /* Container width (40px) */
631
635
  --select-arrow-container-position /* Arrow container position (absolute) */
632
636
  --select-arrow-border-radius /* Container border radius */
637
+ --select-dropdown-arrow-container-padding /* Padding inside the arrow container (0) */
633
638
 
634
639
  /* Group headers (when using groupedItems or flat items with `group` property) */
635
640
  --select-group-header-padding /* Padding inside header (8px 12px) */
@@ -652,6 +657,17 @@ enhanced-select.dark-mode {
652
657
  --select-checkmark-color
653
658
  ```
654
659
 
660
+ The inner selected-value/chip/search wrapper and the arrow container have independent padding tokens:
661
+
662
+ ```css
663
+ enhanced-select {
664
+ --select-input-content-padding: 4px;
665
+ --select-dropdown-arrow-container-padding: 8px 4px;
666
+ }
667
+ ```
668
+
669
+ Both accept the standard CSS `padding` shorthand and update live. The input-content token does not affect the outer `--select-input-padding` shell. When unset, wrap/vertical multi-select keeps its 12px logical inline-end gap; horizontal multi-select keeps zero content padding and its separate arrow/clear scroll-padding. Explicit input-content padding replaces the complete mode-specific fallback.
670
+
655
671
  **Dark Mode (Opt-in)**
656
672
  ```css
657
673
  --select-dark-bg /* Dark input background (#1f2937) */
@@ -689,7 +705,11 @@ The component implements keyboard interaction paths including:
689
705
  | `PageUp` / `PageDown` | Jump 10 options up/down |
690
706
  | `Escape` | Close dropdown |
691
707
  | `Tab` | Close dropdown and move focus |
692
- | `Ctrl+A` (multi-select) | Select all options |
708
+ | `Space` in a searchable input | Insert a space at the caret and update search through the native input event |
709
+ | `Space` in a non-searchable select | Activate the active option |
710
+ | `Enter` | Activate the active option |
711
+ | `Ctrl+A` / `Cmd+A` in a searchable input | Use the browser's native select-all-text behavior; selected options are unchanged |
712
+ | `Ctrl+A` / `Cmd+A` (non-searchable multi-select) | Select all options |
693
713
  | Type characters | Type-ahead search |
694
714
 
695
715
  When an empty single-select opens, it has no active option and does not expose `aria-activedescendant` until keyboard navigation begins. Press `ArrowDown` to activate the first selectable option. If a value is already selected, opening the list activates that selected option.
@@ -919,6 +939,39 @@ enhanced-select {
919
939
  }
920
940
  ```
921
941
 
942
+ #### Multi-select chip animations
943
+
944
+ Core exposes separate entry and opt-in exit animation tokens. The legacy
945
+ `--select-badge-animation` continues to control entry when
946
+ `--select-badge-enter-animation` is unset. Exit defaults to `none`, so the
947
+ selected value is removed immediately unless an exit animation is configured.
948
+
949
+ ```css
950
+ enhanced-select {
951
+ --select-badge-enter-animation: badgeEnter 180ms ease-out both;
952
+ --select-badge-exit-animation: badgeExit 140ms ease-in both;
953
+ }
954
+ ```
955
+
956
+ `badgeEnter` and `badgeExit` are built-in keyframes. Arbitrary keyframe names
957
+ declared in the consuming document cannot be resolved from inside the
958
+ component's Shadow DOM through a custom property. Use the exposed parts for
959
+ consumer-defined keyframes:
960
+
961
+ ```css
962
+ @keyframes app-chip-exit {
963
+ to { opacity: 0; transform: translateY(-6px) scale(0.96); }
964
+ }
965
+
966
+ enhanced-select::part(chip-exiting) {
967
+ animation: app-chip-exit 140ms ease-in both;
968
+ }
969
+ ```
970
+
971
+ Selection state and events update immediately. The exiting chip remains only
972
+ for its visual animation and is inert, hidden from assistive technology, and
973
+ removed on animation completion (or immediately for reduced motion).
974
+
922
975
  **Complete CSS Variables Reference**
923
976
 
924
977
  The canonical styling inventory now lives in: