@algolia/wizard 0.83.0 → 0.84.0-rc.202.644

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.
@@ -97,14 +97,13 @@ The widget owns its combobox/grid/row relationships, active-option announcements
97
97
  keyboard behavior. Keep its generated roles and accessible names intact; never patch its
98
98
  DOM or add competing ARIA.
99
99
 
100
- The widget renders the input and its label itself. Keep that association intact, and
101
- verify that the generated label names the indexed content (`Search products`, not just
102
- `Search`). A placeholder is only a hint, and the accessible name of a surrounding
103
- `<search>` landmark does not name the input. If the installed widget exposes no supported
104
- way to make its generated label content-specific, use its documented connector or
105
- headless API to render an associated visible or visually-hidden label while preserving
106
- the widget's generated input props and keyboard behavior; never patch its DOM after
107
- rendering.
100
+ The widget renders the input and its label itself. Keep that association intact. The
101
+ generated label names the input `Submit`, and no widget option changes that name (checked
102
+ on `instantsearch.js` 4.118.1). Accept this known widget limitation: do not replace the
103
+ widget with `connectAutocomplete` or another headless build, never patch its DOM, and do
104
+ not search the package source for a label option. Name the generic label in your summary.
105
+ A placeholder is only a hint, and the accessible name of a surrounding `<search>` landmark
106
+ does not name the input, but set both as described below.
108
107
 
109
108
  Use a content-specific placeholder, put the container in the app's existing named search
110
109
  landmark or a `<search aria-label="Product search">`, and preserve any visible search
@@ -146,13 +145,21 @@ Palette lives in `--ais-*` custom properties on `:root` as **RGB triplets consum
146
145
  `rgba()`**, override with triplets only:
147
146
 
148
147
  ```css
149
- :root {
148
+ :root:root {
150
149
  --ais-background-color-rgb: 24, 24, 27; /* not #18181b */
151
150
  --ais-text-color-rgb: 244, 244, 245;
152
151
  --ais-primary-color-rgb: 129, 140, 248;
153
152
  }
154
153
  ```
155
154
 
155
+ `--ais-primary-color-rgb` colors the search icon, the focus ring, and the active item, so set it
156
+ to the app's accent color. The theme sets its own blue in `:root` and in its dark block
157
+ (`:root[data-theme=dark], .dark`), and a theme imported from a component loads after the app's
158
+ global stylesheet. An override with the same specificity therefore loses. Repeat `:root` (as
159
+ above). When the app has a dark mode, also override the dark values with `:root:root.dark` for
160
+ a dark class or `:root:root[data-theme=dark]` for a `data-theme` attribute: `:root:root` alone
161
+ ties with `:root[data-theme=dark]`. The override then wins whatever the import order. Then check that the search icon has the app's accent color, not the theme blue.
162
+
156
163
  Everything else is plain CSS against the widget's classes, or `cssClasses` /
157
164
  `indices[].cssClasses` to add your own names to the same elements. Who owns what:
158
165
 
@@ -89,14 +89,13 @@ The widget owns its combobox/grid/row relationships, active-option announcements
89
89
  keyboard behavior. Keep its generated roles and accessible names intact; never patch its
90
90
  DOM or add competing ARIA.
91
91
 
92
- The widget renders the input and its label itself. Keep that association intact, and
93
- verify that the generated label names the indexed content (`Search products`, not just
94
- `Search`). A placeholder is only a hint, and the accessible name of a surrounding
95
- `<search>` landmark does not name the input. If the installed widget exposes no supported
96
- way to make its generated label content-specific, use its documented connector or
97
- headless API to render an associated visible or visually-hidden label while preserving
98
- the widget's generated input props and keyboard behavior; never patch its DOM after
99
- rendering.
92
+ The widget renders the input and its label itself. Keep that association intact. The
93
+ generated label names the input `Submit`, and no widget option changes that name (checked
94
+ on `react-instantsearch` 7.50.1). Accept this known widget limitation: do not replace the
95
+ widget with `useAutocomplete` or another headless build, never patch its DOM, and do not
96
+ search the package source for a label option. Name the generic label in your summary. A
97
+ placeholder is only a hint, and the accessible name of a surrounding `<search>` landmark
98
+ does not name the input, but set both as described below.
100
99
 
101
100
  Use a content-specific placeholder, put the widget in the app's existing named search
102
101
  landmark or a `<search aria-label="Product search">`, and preserve any visible search
@@ -138,13 +137,21 @@ Palette lives in `--ais-*` custom properties on `:root` as **RGB triplets consum
138
137
  `rgba()`**, override with triplets only:
139
138
 
140
139
  ```css
141
- :root {
140
+ :root:root {
142
141
  --ais-background-color-rgb: 24, 24, 27; /* not #18181b */
143
142
  --ais-text-color-rgb: 244, 244, 245;
144
143
  --ais-primary-color-rgb: 129, 140, 248;
145
144
  }
146
145
  ```
147
146
 
147
+ `--ais-primary-color-rgb` colors the search icon, the focus ring, and the active item, so set it
148
+ to the app's accent color. The theme sets its own blue in `:root` and in its dark block
149
+ (`:root[data-theme=dark], .dark`), and a theme imported from a component loads after the app's
150
+ global stylesheet. An override with the same specificity therefore loses. Repeat `:root` (as
151
+ above). When the app has a dark mode, also override the dark values with `:root:root.dark` for
152
+ a dark class or `:root:root[data-theme=dark]` for a `data-theme` attribute: `:root:root` alone
153
+ ties with `:root[data-theme=dark]`. The override then wins whatever the import order. Then check that the search icon has the app's accent color, not the theme blue.
154
+
148
155
  Everything else is plain CSS against the widget's classes, or the `classNames` /
149
156
  `indices[].classNames` props to add your own names to the same elements. Who owns what:
150
157
 
@@ -198,8 +205,8 @@ Use `insights={true}` and nothing else. The middleware loads `search-insights` f
198
205
  jsDelivr CDN itself; do not install the package, pass `insightsClient`, or declare
199
206
  `window.aa`.
200
207
 
201
- Only if the project has a Content-Security-Policy blocking jsDelivr (the CDN script then
202
- cannot load): install `search-insights` from npm and pass its default export as
208
+ Search the project for a Content-Security-Policy first. If it has one (it blocks jsDelivr,
209
+ so the CDN script cannot load, and it also blocks the Algolia API): install `search-insights` from npm and pass its default export as
203
210
  `insightsClient`:
204
211
 
205
212
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.83.0",
3
+ "version": "0.84.0-rc.202.644",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {