@coveo/atomic 3.64.0 → 3.65.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.
Files changed (68) hide show
  1. package/custom-elements.json +9436 -9292
  2. package/dist/cjs/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.cjs +108 -13
  3. package/dist/cjs/components/commerce/product-list/product-template-provider.cjs +2 -0
  4. package/dist/cjs/components/common/atomic-focus-trap/atomic-focus-trap.cjs +11 -1
  5. package/dist/cjs/components/common/atomic-layout-section/layout.cjs +6 -2
  6. package/dist/cjs/components/common/atomic-modal/atomic-modal.cjs +8 -1
  7. package/dist/cjs/components/common/atomic-tab-popover/atomic-tab-popover.cjs +1 -0
  8. package/dist/cjs/components/common/facets/facet-common.cjs +21 -2
  9. package/dist/cjs/components/common/facets/timeframe-facet-common.cjs +2 -2
  10. package/dist/cjs/components/common/generated-answer/generated-content/markdown-utils.cjs +1 -0
  11. package/dist/cjs/components/common/item-list/result-template-provider.cjs +1 -0
  12. package/dist/cjs/components/common/result-templates/result-template-controller.cjs +1 -0
  13. package/dist/cjs/components/common/suggestions/suggestion-manager.cjs +3 -0
  14. package/dist/cjs/components/insight/atomic-insight-facet/atomic-insight-facet.cjs +2 -2
  15. package/dist/cjs/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.cjs +1 -0
  16. package/dist/cjs/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.cjs +1 -0
  17. package/dist/cjs/components/insight/atomic-insight-user-actions-session/user-action.cjs +1 -0
  18. package/dist/cjs/components/search/atomic-facet-manager/atomic-facet-manager.cjs +7 -3
  19. package/dist/cjs/components/search/atomic-popover/atomic-popover.cjs +1 -2
  20. package/dist/cjs/components/search/atomic-rating-range-facet/atomic-rating-range-facet.cjs +3 -4
  21. package/dist/cjs/components/search/atomic-search-box/atomic-search-box.cjs +107 -13
  22. package/dist/cjs/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.cjs +1 -0
  23. package/dist/cjs/components/search/atomic-search-layout/atomic-search-layout.tw.css.cjs +12 -2
  24. package/dist/cjs/global/environment.cjs +1 -1
  25. package/dist/cjs/utils/tailwind.global.tw.css.cjs +1 -1
  26. package/dist/cjs/versions.cjs +1 -1
  27. package/dist/esm/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +109 -14
  28. package/dist/esm/components/commerce/product-list/product-template-provider.js +2 -0
  29. package/dist/esm/components/common/atomic-focus-trap/atomic-focus-trap.js +11 -1
  30. package/dist/esm/components/common/atomic-layout-section/layout.js +6 -2
  31. package/dist/esm/components/common/atomic-modal/atomic-modal.js +9 -2
  32. package/dist/esm/components/common/atomic-tab-popover/atomic-tab-popover.js +1 -0
  33. package/dist/esm/components/common/facets/facet-common.js +16 -3
  34. package/dist/esm/components/common/facets/timeframe-facet-common.js +2 -2
  35. package/dist/esm/components/common/generated-answer/generated-content/markdown-utils.js +1 -0
  36. package/dist/esm/components/common/item-list/result-template-provider.js +1 -0
  37. package/dist/esm/components/common/result-templates/result-template-controller.js +1 -0
  38. package/dist/esm/components/common/suggestions/suggestion-manager.js +3 -0
  39. package/dist/esm/components/insight/atomic-insight-facet/atomic-insight-facet.js +2 -2
  40. package/dist/esm/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.js +1 -0
  41. package/dist/esm/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.js +1 -0
  42. package/dist/esm/components/insight/atomic-insight-user-actions-session/user-action.js +1 -0
  43. package/dist/esm/components/search/atomic-facet-manager/atomic-facet-manager.js +8 -4
  44. package/dist/esm/components/search/atomic-popover/atomic-popover.js +1 -2
  45. package/dist/esm/components/search/atomic-rating-range-facet/atomic-rating-range-facet.js +3 -4
  46. package/dist/esm/components/search/atomic-search-box/atomic-search-box.js +109 -15
  47. package/dist/esm/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.js +1 -0
  48. package/dist/esm/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +1 -1
  49. package/dist/esm/global/environment.js +1 -1
  50. package/dist/esm/utils/tailwind.global.tw.css.js +1 -1
  51. package/dist/esm/versions.js +1 -1
  52. package/dist/types/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.d.ts +23 -6
  53. package/dist/types/components/commerce/product-list/product-template-provider.d.ts +2 -0
  54. package/dist/types/components/common/atomic-focus-trap/atomic-focus-trap.d.ts +1 -0
  55. package/dist/types/components/common/atomic-modal/atomic-modal.d.ts +6 -0
  56. package/dist/types/components/common/atomic-tab-popover/atomic-tab-popover.d.ts +1 -0
  57. package/dist/types/components/common/facets/facet-common.d.ts +2 -0
  58. package/dist/types/components/common/generated-answer/generated-content/markdown-utils.d.ts +1 -0
  59. package/dist/types/components/common/item-list/result-template-provider.d.ts +1 -0
  60. package/dist/types/components/common/layout/item-layout-sections.d.ts +1 -1
  61. package/dist/types/components/common/result-templates/result-template-controller.d.ts +1 -0
  62. package/dist/types/components/insight/atomic-insight-result-attach-to-case-indicator/atomic-insight-result-attach-to-case-indicator.d.ts +1 -0
  63. package/dist/types/components/insight/atomic-insight-user-actions-session/atomic-insight-user-actions-session.d.ts +1 -0
  64. package/dist/types/components/insight/atomic-insight-user-actions-session/user-action.d.ts +1 -0
  65. package/dist/types/components/search/atomic-facet-manager/atomic-facet-manager.d.ts +6 -1
  66. package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +23 -6
  67. package/dist/types/components/search/atomic-search-box-instant-results/atomic-search-box-instant-results.d.ts +1 -0
  68. package/package.json +30 -26
@@ -2,6 +2,7 @@ import { type Result, type Template } from '@coveo/headless';
2
2
  import type { ItemTarget } from '../layout/item-layout-utils';
3
3
  import type { AnyBindings } from '../interface/bindings';
4
4
  import { TemplateProvider, type TemplateProviderProps } from '../template-provider/template-provider';
5
+ import '../../search/atomic-result-link/atomic-result-link.js';
5
6
  export declare class ResultTemplateProvider extends TemplateProvider<Result> {
6
7
  private gridCellLinkTarget?;
7
8
  constructor(props: TemplateProviderProps<Result> & {
@@ -1,4 +1,4 @@
1
- declare const allTags: Set<"atomic-result-section-actions" | "atomic-result-section-badges" | "atomic-result-section-bottom-metadata" | "atomic-result-section-excerpt" | "atomic-result-section-title" | "atomic-result-section-visual" | "atomic-product-section-actions" | "atomic-product-section-badges" | "atomic-product-section-bottom-metadata" | "atomic-product-section-children" | "atomic-product-section-description" | "atomic-product-section-emphasized" | "atomic-product-section-metadata" | "atomic-product-section-name" | "atomic-product-section-visual" | "atomic-result-section-children" | "atomic-result-section-emphasized" | "atomic-result-section-title-metadata">;
1
+ declare const allTags: Set<"atomic-product-section-name" | "atomic-product-section-visual" | "atomic-result-section-actions" | "atomic-result-section-badges" | "atomic-result-section-bottom-metadata" | "atomic-result-section-excerpt" | "atomic-result-section-title" | "atomic-result-section-visual" | "atomic-product-section-actions" | "atomic-product-section-badges" | "atomic-product-section-bottom-metadata" | "atomic-product-section-children" | "atomic-product-section-description" | "atomic-product-section-emphasized" | "atomic-product-section-metadata" | "atomic-result-section-children" | "atomic-result-section-emphasized" | "atomic-result-section-title-metadata">;
2
2
  type SetValueType<T> = T extends Set<infer U> ? U : never;
3
3
  export type ItemSectionTagName = SetValueType<typeof allTags>;
4
4
  export declare function isResultSectionNode(element: Node): boolean;
@@ -1,6 +1,7 @@
1
1
  import type { ResultTemplate, ResultTemplateCondition } from '@coveo/headless';
2
2
  import type { ReactiveControllerHost } from 'lit';
3
3
  import { BaseTemplateController, type TemplateContent } from '../template-controller/base-template-controller';
4
+ import '../../search/atomic-result-link/atomic-result-link.js';
4
5
  type ResultTemplateHost = ReactiveControllerHost & HTMLElement & {
5
6
  error?: Error;
6
7
  };
@@ -2,6 +2,7 @@ import { type AttachToCase } from '@coveo/headless/insight';
2
2
  import { LitElement, nothing } from 'lit';
3
3
  import type { InsightBindings } from '../atomic-insight-interface/atomic-insight-interface';
4
4
  import type { InitializableComponent } from '../../../decorators/types';
5
+ import '../../common/atomic-icon/atomic-icon.js';
5
6
  /**
6
7
  * The `atomic-insight-result-attach-to-case-indicator` component can be included inside a result template to indicate whether a result is attached to the current case.
7
8
  *
@@ -2,6 +2,7 @@ import type { UserAction as IUserAction } from '@coveo/headless/insight';
2
2
  import { LitElement } from 'lit';
3
3
  import type { InsightBindings } from '../atomic-insight-interface/atomic-insight-interface';
4
4
  import type { InitializableComponent } from '../../../decorators/types';
5
+ import '../../common/atomic-icon/atomic-icon.js';
5
6
  /**
6
7
  * Internal component used by the `atomic-insight-user-actions-modal`. Do not use directly.
7
8
  *
@@ -1,6 +1,7 @@
1
1
  import type { UserAction as IUserAction } from '@coveo/headless/insight';
2
2
  import type { InsightBindings } from '../atomic-insight-interface/atomic-insight-interface';
3
3
  import type { FunctionalComponent } from '../../../utils/functional-component-utils';
4
+ import '../../common/atomic-icon/atomic-icon.js';
4
5
  interface UserActionProps {
5
6
  action: IUserAction;
6
7
  bindings: InsightBindings;
@@ -12,7 +12,10 @@ declare const AtomicFacetManager_base: import("../../../mixins/mixin-common").Co
12
12
  * 2. **Managing visibility** - Controls which facets should be visible or hidden based on available values and dependencies.
13
13
  * 3. **Managing collapse state** - Automatically expands or collapses facets based on the `collapse-facets-after` property.
14
14
  *
15
- * @slot default - Facet components are slotted within to leverage this functionality.
15
+ * A facet wrapped in an `atomic-popover` is managed like any other facet, and its popover moves along with it.
16
+ * Because a popover always displays its facet expanded, such a facet is never collapsed and does not count towards `collapse-facets-after`.
17
+ *
18
+ * @slot default - Facet components, or `atomic-popover` components wrapping a facet, are slotted within to leverage this functionality.
16
19
  */
17
20
  export declare class AtomicFacetManager extends AtomicFacetManager_base implements InitializableComponent<Bindings> {
18
21
  private static readonly propsSchema;
@@ -26,6 +29,8 @@ export declare class AtomicFacetManager extends AtomicFacetManager_base implemen
26
29
  *
27
30
  * Using the value `0` collapses all facets.
28
31
  * Using the value `-1` disables the feature and keeps all facets expanded. Useful when you want to set the collapse state for each facet individually.
32
+ *
33
+ * Facets wrapped in an `atomic-popover` are always expanded and are not counted.
29
34
  */
30
35
  collapseFacetsAfter: number;
31
36
  constructor();
@@ -1,5 +1,5 @@
1
1
  import { type SearchBox, type StandaloneSearchBox } from '@coveo/headless';
2
- import { type CSSResultGroup, LitElement } from 'lit';
2
+ import { type CSSResultGroup, LitElement, type TemplateResult } from 'lit';
3
3
  import type { Bindings } from '../atomic-search-interface/atomic-search-interface';
4
4
  import type { InitializableComponent } from '../../../decorators/types';
5
5
  import { AriaLiveRegionController } from '../../../utils/accessibility-utils';
@@ -39,10 +39,11 @@ import '@coveo/atomic-legacy/atomic-suggestion-renderer';
39
39
  * @part recent-query-icon - The icon of a suggestion from the `atomic-search-box-recent-queries` component.
40
40
  * @part recent-query-text - The text of a suggestion from the `atomic-search-box-recent-queries` component.
41
41
  * @part recent-query-text-highlight - The highlighted portion of the text of a suggestion from the `atomic-search-box-recent-queries` component.
42
- * @part recent-query-title-item - The clear button above suggestions from the `atomic-search-box-recent-queries` component.
43
- * @part recent-query-title-content - The contents of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
44
- * @part recent-query-title - The "recent searches" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
45
- * @part recent-query-clear - The "clear" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.
42
+ * @part recent-query-title-item - The clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
43
+ * @part recent-query-title-content - The contents of the clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
44
+ * @part recent-query-title - The "recent searches" title above the recent queries from the `atomic-search-box-recent-queries` component.
45
+ * @part recent-query-clear - The "clear" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `top`.
46
+ * @part recent-query-clear-button - The button below suggestions to clear the recent queries from the `atomic-search-box-recent-queries` component, when `clear-recent-button-position` is `bottom`.
46
47
  *
47
48
  * @part instant-results-item - An instant result rendered by an `atomic-search-box-instant-results` component.
48
49
  * @part instant-results-show-all - The clickable suggestion to show all items for the current instant results search rendered by an `atomic-search-box-instant-results` component.
@@ -51,6 +52,7 @@ import '@coveo/atomic-legacy/atomic-suggestion-renderer';
51
52
  * @event redirect - Event that is emitted when a standalone search box redirection is triggered. By default, the search box will directly change the URL and redirect accordingly, so if you want to handle the redirection differently, use this event.
52
53
  */
53
54
  export declare class AtomicSearchBox extends LitElement implements InitializableComponent<Bindings> {
55
+ private static readonly propsSchema;
54
56
  static shadowRootOptions: {
55
57
  delegatesFocus: boolean;
56
58
  clonable?: boolean;
@@ -65,6 +67,8 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
65
67
  isExpanded: boolean;
66
68
  private searchBoxState;
67
69
  private textAreaRef;
70
+ private setLeftPanel;
71
+ private setRightPanel;
68
72
  private searchBoxSuggestionEventsQueue;
69
73
  private suggestionManager;
70
74
  searchBox: SearchBox | StandaloneSearchBox;
@@ -127,6 +131,16 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
127
131
  * When the `redirection-url` property is set and redirects to a page with more `atomic-search-box` components, all `atomic-search-box` components need to have the same `enable-query-syntax` value.
128
132
  */
129
133
  enableQuerySyntax: boolean;
134
+ /**
135
+ * The position of the option to clear the recent queries.
136
+ *
137
+ * - `top`: The option is the first suggestion, next to the "Recent searches" title.
138
+ * - `bottom`: The option is a button below the suggestions, so the arrow keys only navigate through the suggestions and the button is reached with the Tab key.
139
+ *
140
+ * In the next major version of Atomic (v4), `bottom` will become the default behavior. To adopt it ahead of time, set this property to `bottom`.
141
+ */
142
+ clearRecentButtonPosition: 'top' | 'bottom';
143
+ constructor();
130
144
  connectedCallback(): void;
131
145
  disconnectedCallback(): void;
132
146
  willUpdate(): void;
@@ -153,11 +167,14 @@ export declare class AtomicSearchBox extends LitElement implements Initializable
153
167
  private announceClearSearchBoxToScreenReader;
154
168
  private renderAbsolutePositionSpacer;
155
169
  private renderTextBox;
170
+ private get clearRecentQueriesElement();
171
+ private renderRecentQueriesTitle;
172
+ private renderClearRecentQueriesButton;
156
173
  private renderSuggestions;
157
174
  private renderPanel;
158
175
  private renderSuggestion;
159
176
  private renderSlotContent;
160
- render(): import("lit-html").TemplateResult<1>;
177
+ render(): TemplateResult<1>;
161
178
  }
162
179
  declare global {
163
180
  interface HTMLElementTagNameMap {
@@ -5,6 +5,7 @@ import type { ItemDisplayDensity, ItemDisplayImageSize } from '../../common/layo
5
5
  import type { SearchBoxSuggestions, SearchBoxSuggestionsBindings } from '../../common/suggestions/suggestions-types';
6
6
  import type { Bindings } from '../atomic-search-interface/interfaces';
7
7
  import type { SearchBoxSuggestionsComponent } from '../../../decorators/types';
8
+ import '../atomic-result/atomic-result.js';
8
9
  type AriaLabelGenerator = (bindings: Bindings, result: Result) => string | undefined;
9
10
  /**
10
11
  * The `atomic-search-box-instant-results` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of instant results behavior.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
- "version": "3.64.0",
3
+ "version": "3.65.0",
4
4
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
5
5
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
6
6
  "license": "Apache-2.0",
@@ -55,9 +55,9 @@
55
55
  "./custom-elements-manifest": "./custom-elements.json"
56
56
  },
57
57
  "dependencies": {
58
- "@coveo/atomic-legacy": "0.1.9",
58
+ "@coveo/atomic-legacy": "0.1.10",
59
59
  "@coveo/bueno": "1.1.9",
60
- "@coveo/headless": "3.58.0",
60
+ "@coveo/headless": "3.58.1",
61
61
  "@coveo/relay-event-types": "20.7.1",
62
62
  "@lit/context": "1.1.6",
63
63
  "@open-wc/lit-helpers": "0.7.0",
@@ -66,9 +66,9 @@
66
66
  "@stencil/core": "4.20.0",
67
67
  "cssnano": "8.0.10",
68
68
  "dayjs": "1.11.23",
69
- "dompurify": "3.4.15",
69
+ "dompurify": "3.4.17",
70
70
  "escape-html": "1.0.3",
71
- "i18next": "26.4.2",
71
+ "i18next": "26.5.3",
72
72
  "i18next-http-backend": "4.0.2",
73
73
  "lit": "3.3.3",
74
74
  "marked": "12.0.2"
@@ -80,46 +80,48 @@
80
80
  "@playwright/test": "1.62.1",
81
81
  "@rollup/plugin-replace": "6.0.3",
82
82
  "@rslib/core": "0.23.2",
83
- "@storybook/addon-a11y": "10.6.0",
84
- "@storybook/addon-docs": "10.6.0",
85
- "@storybook/addon-mcp": "0.7.0",
86
- "@storybook/addon-vitest": "10.6.0",
87
- "@storybook/icons": "2.1.0",
88
- "@storybook/web-components-vite": "10.6.0",
83
+ "@size-limit/preset-small-lib": "14.1.0",
84
+ "@storybook/addon-a11y": "10.6.3",
85
+ "@storybook/addon-docs": "10.6.3",
86
+ "@storybook/addon-mcp": "10.6.3",
87
+ "@storybook/addon-vitest": "10.6.3",
88
+ "@storybook/icons": "2.2.0",
89
+ "@storybook/web-components-vite": "10.6.3",
89
90
  "@tailwindcss/postcss": "4.3.3",
90
91
  "@tailwindcss/vite": "4.3.3",
91
92
  "@types/escape-html": "1.0.4",
92
93
  "@types/node": "24.13.6",
93
- "@vitest/browser-playwright": "4.1.11",
94
+ "@vitest/browser-playwright": "4.1.12",
94
95
  "@wc-toolkit/storybook-helpers": "10.5.1",
95
- "chromatic": "18.9.4",
96
- "handlebars": "4.7.9",
96
+ "chromatic": "18.13.0",
97
+ "handlebars": "4.7.10",
97
98
  "lit-html": "3.3.3",
98
- "local-web-server": "5.4.0",
99
+ "local-web-server": "5.4.2",
99
100
  "msw": "2.15.0",
100
101
  "msw-storybook-addon": "2.0.7",
101
102
  "natural-orderby": "5.0.0",
102
103
  "playwright": "1.62.1",
103
- "postcss": "8.5.28",
104
+ "postcss": "8.5.31",
104
105
  "postcss-load-config": "6.0.1",
105
- "prettier": "3.9.8",
106
- "publint": "0.3.24",
106
+ "prettier": "3.9.10",
107
+ "publint": "0.3.25",
107
108
  "puppeteer": "25.9.0",
108
109
  "react": "19.2.8",
109
110
  "remark-gfm": "4.0.1",
110
- "shadow-dom-testing-library": "1.14.1",
111
- "storybook": "10.6.0",
112
- "storybook-addon-pseudo-states": "10.6.0",
111
+ "shadow-dom-testing-library": "1.14.2",
112
+ "size-limit": "14.1.0",
113
+ "storybook": "10.6.3",
114
+ "storybook-addon-pseudo-states": "10.6.3",
113
115
  "tailwindcss": "4.3.3",
114
116
  "ts-dedent": "2.3.0",
115
117
  "ts-lit-plugin": "2.0.2",
116
118
  "typescript": "6.0.3",
117
- "vite": "8.3.0",
118
- "vitest": "4.1.11"
119
+ "vite": "8.3.4",
120
+ "vitest": "4.1.12"
119
121
  },
120
122
  "peerDependencies": {
121
123
  "@coveo/bueno": "^1.1.9",
122
- "@coveo/headless": "^3.58.0",
124
+ "@coveo/headless": "^3.58.1",
123
125
  "typescript": ">=5.0.0"
124
126
  },
125
127
  "peerDependenciesMeta": {
@@ -155,8 +157,9 @@
155
157
  "web:cdn": "node ./scripts/start-cdn.mjs",
156
158
  "e2e": "playwright test",
157
159
  "e2e:csp": "node ./csp/test.mjs || exit 0",
158
- "test": "pnpm run test:lit",
160
+ "test": "pnpm run test:lit && pnpm run test:node",
159
161
  "test:lit": "vitest run --project=atomic-default",
162
+ "test:node": "vitest run --project=atomic-node",
160
163
  "test:watch": "vitest --project=atomic-default",
161
164
  "test:storybook": "vitest run --project=storybook",
162
165
  "test:storybook-utils": "vitest run --project=storybookPure",
@@ -165,6 +168,7 @@
165
168
  "validate:definitions": "tsc --noEmit --esModuleInterop --skipLibCheck ./dist/types/components.d.ts",
166
169
  "chromatic": "chromatic",
167
170
  "validate:light-dom-styles": "node ./scripts/check-light-dom-host-selectors.mjs",
168
- "validate:no-new-light-dom": "node ./scripts/check-no-new-light-dom-components.mjs"
171
+ "validate:no-new-light-dom": "node ./scripts/check-no-new-light-dom-components.mjs",
172
+ "size": "node ../../scripts/size-limit.mjs run"
169
173
  }
170
174
  }