@magicx-eng/ai-autocomplete-react 0.41.2 → 0.43.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
@@ -837,6 +837,15 @@ Every class name the package emits is namespaced — `aia-*` for its own (hashed
837
837
 
838
838
  Override on the container (via `className`). The variables are declared with `:where()` (zero specificity), so a value you set on the container always wins.
839
839
 
840
+ The full input also accepts `--aia-input-radius` and `--aia-written-text-font-weight` on its container or an ancestor. Omit them to retain the default `10px` radius and `300` weight; changing `mode` does not reset these overrides. In dropdown-only integrations, style your own input directly.
841
+
842
+ ```css
843
+ .my-search {
844
+ --aia-input-radius: 0;
845
+ --aia-written-text-font-weight: 500;
846
+ }
847
+ ```
848
+
840
849
  | Variable | Light | Dark | Description |
841
850
  |---|---|---|---|
842
851
  | `--aia-font-family` | `inherit` | `inherit` | Font used by the library. Defaults to `inherit` so the library picks up your page's font automatically. Set this to pin a specific font on the library without changing the surrounding page. |
@@ -849,12 +858,14 @@ Override on the container (via `className`). The variables are declared with `:w
849
858
  | `--aia-option-font-size` | `19px` | `19px` | Option font size |
850
859
  | `--aia-written-text-color` | `#000000` | `#ffffff` | Input text |
851
860
  | `--aia-written-text-font-size` | `19px` | `19px` | Input text font size |
861
+ | `--aia-written-text-font-weight` | `300` | `300` | Written text weight in the full input. Completed chips keep their own typography. |
852
862
  | `--aia-caret-color` | `--aia-written-text-color` | `--aia-written-text-color` | Editor caret color. Override independently of input text color. |
853
863
  | `--aia-submit-bg` | `#000000` | `#ffffff` | Submit button background. Solid + full-opacity at rest, even when the input is empty/disabled. |
854
864
  | `--aia-submit-color` | `#ffffff` | `#000000` | Submit button arrow color |
855
865
  | `--aia-submit-bg-disabled` | `--aia-submit-bg` | `--aia-submit-bg` | Submit background when disabled (empty input). Defaults to the enabled background so themed colors aren't washed out. Set this for a faded rest state. |
856
866
  | `--aia-submit-color-disabled` | `--aia-submit-color` | `--aia-submit-color` | Submit arrow color when disabled. Defaults to the enabled color. |
857
867
  | `--aia-border` | `rgba(17, 24, 39, 0.14)` | `#505050` | Input container border color |
868
+ | `--aia-input-radius` | `10px` | `10px` | Full input corner radius. Set `0` for square corners. |
858
869
  | `--aia-shadow` | `none` | `none` | Input container elevation (box-shadow). Flat by default; set it to add one |
859
870
  | `--aia-dropdown-offset` | `13px` | `13px` | Gap between the input box and the dropdown (the dropdown's margin toward the input). |
860
871
  | `--aia-content-inset-left` | `16px` | `16px` | Left inset of the SDK's content: the input wrapper's left padding, and the line the dropdown's content (parameter label, option text, product strip) starts on. Set it when you pad the field to clear a leading icon of your own, so the dropdown's content stays aligned under the typed text. Practical minimum is `10px` (the option text's own inset); both surfaces floor it there. |
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@
17
17
  10px the two sides would diverge; flooring both keeps them together. */
18
18
  padding: 12px 16px 12px max(10px, var(--aia-content-inset-left, 16px));
19
19
  border: 1px solid var(--aia-border, #b0b0b0);
20
- border-radius: 10px;
20
+ border-radius: var(--aia-input-radius, 10px);
21
21
  background: var(--aia-surface, #ffffff);
22
22
  /* Flat by default; consumers can set --aia-shadow for elevation. */
23
23
  box-shadow: var(--aia-shadow, none);
@@ -66,7 +66,7 @@
66
66
  --aia-caret-color,
67
67
  var(--aia-written-text-color, var(--aia-color-text-default, #fff))
68
68
  );
69
- font-weight: 300;
69
+ font-weight: var(--aia-written-text-font-weight, 300);
70
70
  /* Align the text's inline box with the pill list (also vertical-align: middle)
71
71
  so they share a vertical center when pills stretch the line box to ~36px. */
72
72
  vertical-align: middle;