@coveo/atomic 3.35.0-pre.ebf3345026 → 3.35.0-pre.edef92ce19

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 (187) hide show
  1. package/dist/atomic/_atomic.esm.js +1 -1
  2. package/dist/atomic/atomic.esm.js.map +1 -1
  3. package/dist/atomic/components/_index.d.ts +20 -0
  4. package/dist/atomic/components/_index.js +10 -0
  5. package/dist/atomic/components/atomic-focus-trap2.js +1 -1
  6. package/dist/atomic/components/atomic-folded-result-list.js +44 -2
  7. package/dist/atomic/components/atomic-folded-result-list.js.map +1 -1
  8. package/dist/atomic/components/atomic-insight-folded-result-list.js +40 -4
  9. package/dist/atomic/components/atomic-insight-folded-result-list.js.map +1 -1
  10. package/dist/atomic/components/atomic-insight-result-action-bar.js +1 -5
  11. package/dist/atomic/components/atomic-insight-result-action-bar.js.map +1 -1
  12. package/dist/atomic/components/atomic-insight-result-children.js +40 -4
  13. package/dist/atomic/components/atomic-insight-result-children.js.map +1 -1
  14. package/dist/atomic/components/atomic-insight-result-list.js +40 -4
  15. package/dist/atomic/components/atomic-insight-result-list.js.map +1 -1
  16. package/dist/atomic/components/atomic-ipx-recs-list.js +40 -4
  17. package/dist/atomic/components/atomic-ipx-recs-list.js.map +1 -1
  18. package/dist/atomic/components/atomic-recs-interface.js +1 -1
  19. package/dist/atomic/components/atomic-recs-list.js +40 -4
  20. package/dist/atomic/components/atomic-recs-list.js.map +1 -1
  21. package/dist/atomic/components/atomic-refine-modal2.js +1 -1
  22. package/dist/atomic/components/atomic-result-children.js +44 -2
  23. package/dist/atomic/components/atomic-result-children.js.map +1 -1
  24. package/dist/atomic/components/atomic-result-list.js +44 -2
  25. package/dist/atomic/components/atomic-result-list.js.map +1 -1
  26. package/dist/atomic/components/atomic-result-placeholder2.js +37 -1
  27. package/dist/atomic/components/atomic-result-placeholder2.js.map +1 -1
  28. package/dist/atomic/components/atomic-result-section-actions.d.ts +11 -0
  29. package/dist/atomic/components/atomic-result-section-actions.js +8 -0
  30. package/dist/atomic/components/atomic-result-section-actions.js.map +1 -0
  31. package/dist/atomic/components/atomic-result-section-actions2.js +30 -0
  32. package/dist/atomic/components/atomic-result-section-actions2.js.map +1 -0
  33. package/dist/atomic/components/atomic-result-section-badges.d.ts +11 -0
  34. package/dist/atomic/components/atomic-result-section-badges.js +8 -0
  35. package/dist/atomic/components/atomic-result-section-badges.js.map +1 -0
  36. package/dist/atomic/components/atomic-result-section-badges2.js +30 -0
  37. package/dist/atomic/components/atomic-result-section-badges2.js.map +1 -0
  38. package/dist/atomic/components/atomic-result-section-bottom-metadata.d.ts +11 -0
  39. package/dist/atomic/components/atomic-result-section-bottom-metadata.js +8 -0
  40. package/dist/atomic/components/atomic-result-section-bottom-metadata.js.map +1 -0
  41. package/dist/atomic/components/atomic-result-section-bottom-metadata2.js +30 -0
  42. package/dist/atomic/components/atomic-result-section-bottom-metadata2.js.map +1 -0
  43. package/dist/atomic/components/atomic-result-section-children.d.ts +11 -0
  44. package/dist/atomic/components/atomic-result-section-children.js +33 -0
  45. package/dist/atomic/components/atomic-result-section-children.js.map +1 -0
  46. package/dist/atomic/components/atomic-result-section-emphasized.d.ts +11 -0
  47. package/dist/atomic/components/atomic-result-section-emphasized.js +33 -0
  48. package/dist/atomic/components/atomic-result-section-emphasized.js.map +1 -0
  49. package/dist/atomic/components/atomic-result-section-excerpt.d.ts +11 -0
  50. package/dist/atomic/components/atomic-result-section-excerpt.js +8 -0
  51. package/dist/atomic/components/atomic-result-section-excerpt.js.map +1 -0
  52. package/dist/atomic/components/atomic-result-section-excerpt2.js +30 -0
  53. package/dist/atomic/components/atomic-result-section-excerpt2.js.map +1 -0
  54. package/dist/atomic/components/atomic-result-section-title-metadata.d.ts +11 -0
  55. package/dist/atomic/components/atomic-result-section-title-metadata.js +33 -0
  56. package/dist/atomic/components/atomic-result-section-title-metadata.js.map +1 -0
  57. package/dist/atomic/components/atomic-result-section-title.d.ts +11 -0
  58. package/dist/atomic/components/atomic-result-section-title.js +8 -0
  59. package/dist/atomic/components/atomic-result-section-title.js.map +1 -0
  60. package/dist/atomic/components/atomic-result-section-title2.js +30 -0
  61. package/dist/atomic/components/atomic-result-section-title2.js.map +1 -0
  62. package/dist/atomic/components/atomic-result-section-visual.d.ts +11 -0
  63. package/dist/atomic/components/atomic-result-section-visual.js +8 -0
  64. package/dist/atomic/components/atomic-result-section-visual.js.map +1 -0
  65. package/dist/atomic/components/atomic-result-section-visual2.js +33 -0
  66. package/dist/atomic/components/atomic-result-section-visual2.js.map +1 -0
  67. package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
  68. package/dist/atomic/components/atomic-result-table-placeholder2.js.map +1 -1
  69. package/dist/atomic/components/atomic-result.d.ts +11 -0
  70. package/dist/atomic/components/atomic-result.js +8 -0
  71. package/dist/atomic/components/atomic-result.js.map +1 -0
  72. package/dist/atomic/components/atomic-result2.js +158 -0
  73. package/dist/atomic/components/atomic-result2.js.map +1 -0
  74. package/dist/atomic/components/atomic-smart-snippet-answer2.js +1 -1
  75. package/dist/atomic/components/components/commerce/atomic-commerce-facet-number-input/atomic-commerce-facet-number-input.js +0 -1
  76. package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +0 -2
  77. package/dist/atomic/components/components/search/index.js +0 -10
  78. package/dist/atomic/components/components/search/lazy-index.js +0 -10
  79. package/dist/atomic/components/global/environment.js +1 -1
  80. package/dist/atomic/components/index.js.map +1 -1
  81. package/dist/atomic/components/item-layout-sections.js +1 -1
  82. package/dist/atomic/components/item-section-utils.js +9 -0
  83. package/dist/atomic/components/item-section-utils.js.map +1 -0
  84. package/dist/atomic/components/mixins/item-section-mixin.js +6 -6
  85. package/dist/atomic/components/props-utils.js +1 -1
  86. package/dist/atomic/components/result-template-common.js +1 -1
  87. package/dist/atomic/components/utils.js +1 -1
  88. package/dist/atomic/p-36e2c945.entry.js +2 -0
  89. package/dist/atomic/p-36e2c945.entry.js.map +1 -0
  90. package/dist/atomic/p-463336ca.entry.js +2 -0
  91. package/dist/atomic/p-463336ca.entry.js.map +1 -0
  92. package/dist/atomic/p-55c41e00.entry.js +2 -0
  93. package/dist/atomic/p-55c41e00.entry.js.map +1 -0
  94. package/dist/atomic/p-5d0fc7e2.js +2 -0
  95. package/dist/atomic/p-5d0fc7e2.js.map +1 -0
  96. package/dist/atomic/p-73d9e7f3.entry.js +2 -0
  97. package/dist/atomic/p-73d9e7f3.entry.js.map +1 -0
  98. package/dist/atomic/p-7fd58269.entry.js +2 -0
  99. package/dist/atomic/p-7fd58269.entry.js.map +1 -0
  100. package/dist/atomic/p-a9016629.entry.js.map +1 -1
  101. package/dist/atomic/p-e62caa78.entry.js.map +1 -1
  102. package/dist/atomic/{p-7303a7dc.entry.js → p-f454ec81.entry.js} +2 -2
  103. package/dist/atomic/p-f800678c.entry.js +2 -0
  104. package/dist/atomic/p-f800678c.entry.js.map +1 -0
  105. package/dist/cjs/_loader.cjs.js +1 -1
  106. package/dist/cjs/atomic-folded-result-list.cjs.entry.js.map +1 -1
  107. package/dist/cjs/atomic-insight-result-action-bar.cjs.entry.js +3 -6
  108. package/dist/cjs/atomic-insight-result-action-bar.cjs.entry.js.map +1 -1
  109. package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
  110. package/dist/cjs/atomic-result-list.cjs.entry.js.map +1 -1
  111. package/dist/cjs/{atomic-result-placeholder_2.cjs.entry.js → atomic-result-placeholder_8.cjs.entry.js} +70 -2
  112. package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js.map +1 -0
  113. package/dist/cjs/atomic-result-section-children.cjs.entry.js +23 -0
  114. package/dist/cjs/atomic-result-section-children.cjs.entry.js.map +1 -0
  115. package/dist/cjs/atomic-result-section-emphasized.cjs.entry.js +23 -0
  116. package/dist/cjs/atomic-result-section-emphasized.cjs.entry.js.map +1 -0
  117. package/dist/cjs/atomic-result-section-title-metadata.cjs.entry.js +23 -0
  118. package/dist/cjs/atomic-result-section-title-metadata.cjs.entry.js.map +1 -0
  119. package/dist/cjs/atomic-result.cjs.entry.js +141 -0
  120. package/dist/cjs/atomic-result.cjs.entry.js.map +1 -0
  121. package/dist/cjs/atomic.cjs.js +1 -1
  122. package/dist/cjs/index-757bc886.js +18 -2
  123. package/dist/cjs/item-section-utils-37848715.js +11 -0
  124. package/dist/cjs/item-section-utils-37848715.js.map +1 -0
  125. package/dist/cjs/version.cjs.js +2 -2
  126. package/dist/esm/_loader.js +1 -1
  127. package/dist/esm/atomic-folded-result-list.entry.js.map +1 -1
  128. package/dist/esm/atomic-insight-result-action-bar.entry.js +2 -5
  129. package/dist/esm/atomic-insight-result-action-bar.entry.js.map +1 -1
  130. package/dist/esm/atomic-recs-interface.entry.js +1 -1
  131. package/dist/esm/atomic-result-list.entry.js.map +1 -1
  132. package/dist/esm/{atomic-result-placeholder_2.entry.js → atomic-result-placeholder_8.entry.js} +66 -4
  133. package/dist/esm/atomic-result-placeholder_8.entry.js.map +1 -0
  134. package/dist/esm/atomic-result-section-children.entry.js +19 -0
  135. package/dist/esm/atomic-result-section-children.entry.js.map +1 -0
  136. package/dist/esm/atomic-result-section-emphasized.entry.js +19 -0
  137. package/dist/esm/atomic-result-section-emphasized.entry.js.map +1 -0
  138. package/dist/esm/atomic-result-section-title-metadata.entry.js +19 -0
  139. package/dist/esm/atomic-result-section-title-metadata.entry.js.map +1 -0
  140. package/dist/esm/atomic-result.entry.js +137 -0
  141. package/dist/esm/atomic-result.entry.js.map +1 -0
  142. package/dist/esm/atomic.js +1 -1
  143. package/dist/esm/index-3f35faca.js +18 -2
  144. package/dist/esm/item-section-utils-d8aa24b7.js +9 -0
  145. package/dist/esm/item-section-utils-d8aa24b7.js.map +1 -0
  146. package/dist/esm/version.js +2 -2
  147. package/dist/types/components/common/layout/item-layout-sections.d.ts +1 -1
  148. package/dist/types/components/search/atomic-result/atomic-result.d.ts +29 -38
  149. package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +0 -1
  150. package/dist/types/components/search/index.d.ts +0 -10
  151. package/dist/types/components/search/{atomic-result-section-actions → result-template-components/atomic-result-sections}/atomic-result-section-actions.d.ts +3 -9
  152. package/dist/types/components/search/{atomic-result-section-badges → result-template-components/atomic-result-sections}/atomic-result-section-badges.d.ts +3 -9
  153. package/dist/types/components/search/{atomic-result-section-bottom-metadata → result-template-components/atomic-result-sections}/atomic-result-section-bottom-metadata.d.ts +3 -9
  154. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-children.d.ts +10 -0
  155. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-emphasized.d.ts +12 -0
  156. package/dist/types/components/search/{atomic-result-section-excerpt → result-template-components/atomic-result-sections}/atomic-result-section-excerpt.d.ts +3 -9
  157. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-title-metadata.d.ts +13 -0
  158. package/dist/types/components/search/{atomic-result-section-title → result-template-components/atomic-result-sections}/atomic-result-section-title.d.ts +3 -9
  159. package/dist/types/components/search/result-template-components/atomic-result-sections/atomic-result-section-visual.d.ts +20 -0
  160. package/dist/types/components.d.ts +521 -2
  161. package/dist/types/mixins/item-section-mixin.d.ts +3 -3
  162. package/docs/atomic-docs.json +609 -1
  163. package/package.json +8 -5
  164. package/dist/atomic/components/components/search/atomic-result/atomic-result.js +0 -218
  165. package/dist/atomic/components/components/search/atomic-result/atomic-result.tw.css.js +0 -3
  166. package/dist/atomic/components/components/search/atomic-result-section-actions/atomic-result-section-actions.js +0 -25
  167. package/dist/atomic/components/components/search/atomic-result-section-badges/atomic-result-section-badges.js +0 -24
  168. package/dist/atomic/components/components/search/atomic-result-section-bottom-metadata/atomic-result-section-bottom-metadata.js +0 -25
  169. package/dist/atomic/components/components/search/atomic-result-section-children/atomic-result-section-children.js +0 -21
  170. package/dist/atomic/components/components/search/atomic-result-section-emphasized/atomic-result-section-emphasized.js +0 -23
  171. package/dist/atomic/components/components/search/atomic-result-section-excerpt/atomic-result-section-excerpt.js +0 -24
  172. package/dist/atomic/components/components/search/atomic-result-section-title/atomic-result-section-title.js +0 -24
  173. package/dist/atomic/components/components/search/atomic-result-section-title-metadata/atomic-result-section-title-metadata.js +0 -24
  174. package/dist/atomic/components/components/search/atomic-result-section-visual/atomic-result-section-visual.js +0 -29
  175. package/dist/atomic/components/components/search/result-template-component-utils/context/result-context-controller.js +0 -14
  176. package/dist/atomic/p-8641e3a9.entry.js +0 -2
  177. package/dist/atomic/p-8641e3a9.entry.js.map +0 -1
  178. package/dist/atomic/p-d63acdc6.entry.js +0 -2
  179. package/dist/atomic/p-d63acdc6.entry.js.map +0 -1
  180. package/dist/cjs/atomic-result-placeholder_2.cjs.entry.js.map +0 -1
  181. package/dist/esm/atomic-result-placeholder_2.entry.js.map +0 -1
  182. package/dist/types/components/search/atomic-result/atomic-result.tw.css.d.ts +0 -2
  183. package/dist/types/components/search/atomic-result-section-children/atomic-result-section-children.d.ts +0 -16
  184. package/dist/types/components/search/atomic-result-section-emphasized/atomic-result-section-emphasized.d.ts +0 -18
  185. package/dist/types/components/search/atomic-result-section-title-metadata/atomic-result-section-title-metadata.d.ts +0 -19
  186. package/dist/types/components/search/atomic-result-section-visual/atomic-result-section-visual.d.ts +0 -26
  187. /package/dist/atomic/{p-7303a7dc.entry.js.map → p-f454ec81.entry.js.map} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coveo/atomic",
3
3
  "type": "module",
4
- "version": "3.35.0-pre.ebf3345026",
4
+ "version": "3.35.0-pre.edef92ce19",
5
5
  "description": "A web-component library for building modern UIs interfacing with the Coveo platform",
6
6
  "homepage": "https://docs.coveo.com/en/atomic/latest/",
7
7
  "repository": {
@@ -61,8 +61,9 @@
61
61
  "prod": "npx serve www -l 3333 --no-request-logging",
62
62
  "test": "npm run test:stencil && npm run test:lit",
63
63
  "test:stencil": "stencil test --spec -- src/utils/initialization-utils.spec.ts",
64
- "test:lit": "vitest run",
65
- "test:watch": "vitest",
64
+ "test:lit": "vitest run --project=atomic-default",
65
+ "test:watch": "vitest --project=atomic-default",
66
+ "test:storybook": "vitest run --project=storybook",
66
67
  "e2e": "cypress run --browser chrome",
67
68
  "e2e:firefox": "cypress run --browser firefox",
68
69
  "e2e:watch": "cypress open --browser chrome --e2e",
@@ -81,7 +82,7 @@
81
82
  },
82
83
  "dependencies": {
83
84
  "@coveo/bueno": "1.1.3",
84
- "@coveo/headless": "3.31.3-pre.ebf3345026",
85
+ "@coveo/headless": "3.31.3-pre.edef92ce19",
85
86
  "@lit/context": "1.1.6",
86
87
  "@open-wc/lit-helpers": "0.7.0",
87
88
  "@popperjs/core": "2.11.8",
@@ -110,6 +111,7 @@
110
111
  "@stencil/react-output-target": "0.5.3",
111
112
  "@storybook/addon-a11y": "9.1.2",
112
113
  "@storybook/addon-docs": "9.1.2",
114
+ "@storybook/addon-vitest": "9.1.2",
113
115
  "@storybook/icons": "1.4.0",
114
116
  "@storybook/web-components-vite": "9.1.2",
115
117
  "@tailwindcss/postcss": "4.1.13",
@@ -118,6 +120,7 @@
118
120
  "@types/jest": "29.5.14",
119
121
  "@types/puppeteer": "7.0.4",
120
122
  "@vitest/browser": "3.2.4",
123
+ "@vitest/coverage-v8": "^3.2.4",
121
124
  "@wc-toolkit/storybook-helpers": "9.0.1",
122
125
  "axe-core": "4.10.3",
123
126
  "cypress": "13.7.3",
@@ -153,7 +156,7 @@
153
156
  },
154
157
  "peerDependencies": {
155
158
  "@coveo/bueno": "1.1.3",
156
- "@coveo/headless": "3.31.3-pre.ebf3345026",
159
+ "@coveo/headless": "3.31.3-pre.edef92ce19",
157
160
  "typescript": ">=5.0.0"
158
161
  },
159
162
  "peerDependenciesMeta": {
@@ -1,218 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement } from 'lit';
8
- import { customElement, property } from 'lit/decorators.js';
9
- import { ref } from 'lit/directives/ref.js';
10
- import { resultComponentClass, } from "../../common/item-list/item-list-common";
11
- import { CustomRenderController } from "../../common/layout/custom-render-controller";
12
- import { ItemLayoutController } from "../../common/layout/item-layout-controller";
13
- import { booleanConverter } from "../../../converters/boolean-converter";
14
- import { withTailwindStyles } from "../../../decorators/with-tailwind-styles";
15
- import { ChildrenUpdateCompleteMixin } from "../../../mixins/children-update-complete-mixin";
16
- import { parentNodeToString } from "../../../utils/dom-utils";
17
- import styles from './atomic-result.tw.css';
18
- /**
19
- * The `atomic-result` component is used internally by the `atomic-result-list` and `atomic-folded-result-list` components.
20
- */
21
- let AtomicResult = class AtomicResult extends ChildrenUpdateCompleteMixin(LitElement) {
22
- constructor() {
23
- super(...arguments);
24
- /**
25
- * The result link to use when the result is clicked in a grid layout.
26
- *
27
- * @default - An `atomic-result-link` without any customization.
28
- */
29
- this.linkContent = new DocumentFragment();
30
- /**
31
- * How results should be displayed.
32
- */
33
- this.display = 'list';
34
- /**
35
- * How large or small results should be.
36
- */
37
- this.density = 'normal';
38
- /**
39
- * The size of the visual section in result list items.
40
- *
41
- * This is overwritten by the image size defined in the result content, if it exists.
42
- */
43
- this.imageSize = 'icon';
44
- /**
45
- * The classes to add to the result element.
46
- */
47
- this.classes = '';
48
- this.resolveResult = (event) => {
49
- event.preventDefault();
50
- event.stopPropagation();
51
- event.detail(this.result);
52
- };
53
- this.resolveInteractiveResult = (event) => {
54
- event.preventDefault();
55
- event.stopPropagation();
56
- if (this.interactiveResult) {
57
- event.detail(this.interactiveResult);
58
- }
59
- };
60
- this.resolveStopPropagation = (event) => {
61
- event.detail(this.stopPropagation);
62
- };
63
- this.resolveResultDisplayConfig = (event) => {
64
- event.preventDefault();
65
- event.stopPropagation();
66
- event.detail({
67
- density: this.density,
68
- imageSize: this.imageSize,
69
- });
70
- };
71
- this.handleClick = (event) => {
72
- if (this.stopPropagation) {
73
- event.stopPropagation();
74
- }
75
- if (this.display === 'grid') {
76
- this.clickLinkContainer();
77
- }
78
- };
79
- this.clickLinkContainer = () => {
80
- this.shadowRoot
81
- ?.querySelector('.link-container > atomic-result-link a:not([slot])')
82
- ?.click();
83
- };
84
- }
85
- async connectedCallback() {
86
- super.connectedCallback();
87
- new CustomRenderController(this, {
88
- renderingFunction: () => this.renderingFunction,
89
- itemData: () => this.result,
90
- rootElementRef: () => this.resultRootRef,
91
- linkContainerRef: () => this.linkContainerRef,
92
- onRenderComplete: (element, output) => {
93
- this.itemLayoutController.applyLayoutClassesToElement(element, output);
94
- },
95
- });
96
- this.itemLayoutController = new ItemLayoutController(this, {
97
- elementPrefix: 'atomic-result',
98
- renderingFunction: () => this.renderingFunction,
99
- content: () => this.content,
100
- layoutConfig: () => ({
101
- display: this.display,
102
- density: this.density,
103
- imageSize: this.imageSize,
104
- }),
105
- itemClasses: () => this.classes,
106
- });
107
- this.addEventListener('atomic/resolveResult', this.resolveResult);
108
- this.addEventListener('atomic/resolveInteractiveResult', this.resolveInteractiveResult);
109
- this.addEventListener('atomic/resolveStopPropagation', this.resolveStopPropagation);
110
- this.addEventListener('atomic/resolveResultDisplayConfig', this.resolveResultDisplayConfig);
111
- this.addEventListener('click', this.handleClick);
112
- await this.getUpdateComplete();
113
- this.classList.add('hydrated');
114
- }
115
- disconnectedCallback() {
116
- super.disconnectedCallback();
117
- this.removeEventListener('atomic/resolveResult', this.resolveResult);
118
- this.removeEventListener('atomic/resolveInteractiveResult', this.resolveInteractiveResult);
119
- this.removeEventListener('atomic/resolveStopPropagation', this.resolveStopPropagation);
120
- this.removeEventListener('atomic/resolveResultDisplayConfig', this.resolveResultDisplayConfig);
121
- this.removeEventListener('click', this.handleClick);
122
- }
123
- getContentHTML() {
124
- if (!this.content) {
125
- console.warn('atomic-result: content property is undefined. Cannot get content HTML.', this);
126
- return '';
127
- }
128
- return parentNodeToString(this.content);
129
- }
130
- getLinkHTML() {
131
- return parentNodeToString(this.linkContent ?? new HTMLElement());
132
- }
133
- render() {
134
- if (this.renderingFunction !== undefined) {
135
- return html `
136
- <div class=${resultComponentClass}>
137
- <div
138
- class="result-root"
139
- ${ref((el) => {
140
- this.resultRootRef = el;
141
- })}
142
- ></div>
143
- <div
144
- class="link-container"
145
- ${ref((el) => {
146
- this.linkContainerRef = el;
147
- })}
148
- ></div>
149
- </div>
150
- `;
151
- }
152
- // Handle case where content is undefined and layout was not created
153
- if (!this.itemLayoutController.getLayout()) {
154
- return html `<div class=${resultComponentClass}></div>`;
155
- }
156
- return html `
157
- <div class=${resultComponentClass}>
158
- <div
159
- class="result-root ${this.itemLayoutController.getCombinedClasses().join(' ')}"
160
- .innerHTML=${this.getContentHTML()}
161
- ></div>
162
- <div class="link-container" .innerHTML=${this.getLinkHTML()}></div>
163
- </div>
164
- `;
165
- }
166
- firstUpdated(_changedProperties) {
167
- if (this.loadingFlag && this.store) {
168
- this.store.unsetLoadingFlag(this.loadingFlag);
169
- }
170
- }
171
- };
172
- AtomicResult.styles = styles;
173
- __decorate([
174
- property({
175
- attribute: 'stop-propagation',
176
- type: Boolean,
177
- converter: booleanConverter,
178
- reflect: true,
179
- })
180
- ], AtomicResult.prototype, "stopPropagation", void 0);
181
- __decorate([
182
- property({ type: Object })
183
- ], AtomicResult.prototype, "result", void 0);
184
- __decorate([
185
- property({ type: Object, attribute: 'interactive-result' })
186
- ], AtomicResult.prototype, "interactiveResult", void 0);
187
- __decorate([
188
- property({ type: Object })
189
- ], AtomicResult.prototype, "store", void 0);
190
- __decorate([
191
- property({ type: Object })
192
- ], AtomicResult.prototype, "content", void 0);
193
- __decorate([
194
- property({ type: Object, attribute: 'link-content' })
195
- ], AtomicResult.prototype, "linkContent", void 0);
196
- __decorate([
197
- property({ reflect: true, type: String })
198
- ], AtomicResult.prototype, "display", void 0);
199
- __decorate([
200
- property({ reflect: true, type: String })
201
- ], AtomicResult.prototype, "density", void 0);
202
- __decorate([
203
- property({ reflect: true, type: String, attribute: 'image-size' })
204
- ], AtomicResult.prototype, "imageSize", void 0);
205
- __decorate([
206
- property({ type: String })
207
- ], AtomicResult.prototype, "classes", void 0);
208
- __decorate([
209
- property({ type: String, attribute: 'loading-flag' })
210
- ], AtomicResult.prototype, "loadingFlag", void 0);
211
- __decorate([
212
- property({ type: Object, attribute: 'rendering-function' })
213
- ], AtomicResult.prototype, "renderingFunction", void 0);
214
- AtomicResult = __decorate([
215
- customElement('atomic-result'),
216
- withTailwindStyles
217
- ], AtomicResult);
218
- export { AtomicResult };
@@ -1,3 +0,0 @@
1
- import { css } from 'lit';
2
- const styles = css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties;:host{@layer components{:host{font-family:var(--atomic-font-family);--tw-font-weight:var(--atomic-font-normal);font-weight:var(--atomic-font-normal)}.result-root{&.with-sections{display:grid;justify-items:stretch;&.display-list{@media (width >= 1024px){&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr)}&.image-icon,&.image-large,&.image-small{grid-template-areas:"badges badges . actions" "visual title title title" "visual title-metadata title-metadata title-metadata" "visual emphasized emphasized emphasized" "visual excerpt excerpt excerpt" "visual bottom-metadata bottom-metadata bottom-metadata" "visual children children children";grid-template-columns:minmax(0,min-content) auto 1fr auto}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content))}&.image-none{grid-template-areas:"badges . actions" "title title title" "title-metadata title-metadata title-metadata" "emphasized emphasized emphasized" "excerpt excerpt excerpt" "bottom-metadata bottom-metadata bottom-metadata" "children children children";grid-template-columns:auto 1fr auto;grid-template-rows:repeat(6,auto)}}}&.display-table{&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr)}&.image-icon,&.image-large,&.image-small{grid-template-areas:"badges badges . actions" "visual title title title" "visual title-metadata title-metadata title-metadata" "visual emphasized emphasized emphasized" "visual excerpt excerpt excerpt" "visual bottom-metadata bottom-metadata bottom-metadata" "visual children children children";grid-template-columns:minmax(0,min-content) auto 1fr auto}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content))}&.image-none{grid-template-areas:"badges . actions" "title title title" "title-metadata title-metadata title-metadata" "emphasized emphasized emphasized" "excerpt excerpt excerpt" "bottom-metadata bottom-metadata bottom-metadata" "children children children";grid-template-columns:auto 1fr auto;grid-template-rows:repeat(6,auto)}}&.display-list{@media not all and (width >= 1024px){&.image-large{grid-template-areas:"visual" "badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(8,auto)}&.image-small{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual ." "excerpt excerpt" "bottom-metadata bottom-metadata" "actions actions" "children children";grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto)}&.image-icon,&.image-small{grid-template-columns:auto minmax(0,1fr)}&.image-icon{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual excerpt" "visual bottom-metadata" "visual actions" "visual children";grid-template-rows:repeat(7,auto) 1fr}&.image-none{grid-template-areas:"badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(7,auto)}}}&.display-grid{grid-template-areas:"badges" "visual" "title" "title-metadata" "emphasized" "excerpt" "children" "bottom-metadata" "actions";grid-template-columns:100%;grid-template-rows:repeat(9,auto);a,button{position:relative}@media not all and (width >= 1024px){&.image-large{&.image-large{grid-template-areas:"visual" "badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(8,auto)}&.image-small{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual ." "excerpt excerpt" "bottom-metadata bottom-metadata" "actions actions" "children children";grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto)}&.image-icon,&.image-small{grid-template-columns:auto minmax(0,1fr)}&.image-icon{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual excerpt" "visual bottom-metadata" "visual actions" "visual children";grid-template-rows:repeat(7,auto) 1fr}&.image-none{grid-template-areas:"badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(7,auto)}}}}}atomic-table-element{display:none}}.link-container{display:none}}}atomic-result-section-actions,atomic-result-section-badges{text-align:left}atomic-result-section-title-metadata{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}atomic-result-section-emphasized{font-weight:500;--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:.5rem}@property --tw-font-weight{syntax:"*";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}`;
3
- export default styles;
@@ -1,25 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section allows the information seeker to perform an action on an item without having to view its details.
12
- * For example, in Commerce you can add an item to the cart directly or add it to a wish list to view at a later time.
13
- *
14
- * Behavior:
15
- * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
16
- * ** You should ensure that elements inside of it have `height: var(--line-height)`.
17
- * * Is a wrapping flexbox with a gap.
18
- * * May appear over, next to, or beneath the visual section.
19
- */
20
- let AtomicResultSectionActions = class AtomicResultSectionActions extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-actions{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:actions;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;atomic-result-quickview{display:inline-block}@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem;--row-height:2.5rem}&.density-normal{margin-top:1.75rem}&.density-compact,&.density-normal{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.display-grid{&.image-large{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{margin-top:.75rem}}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}}}`) {
21
- };
22
- AtomicResultSectionActions = __decorate([
23
- customElement('atomic-result-section-actions')
24
- ], AtomicResultSectionActions);
25
- export { AtomicResultSectionActions };
@@ -1,24 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section provides badges that highlight special features of the item.
12
- *
13
- * Behavior:
14
- * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
15
- * ** You should ensure that elements inside of it have `height: var(--line-height)`.
16
- * * Is a wrapping flexbox with a gap.
17
- * * May appear over, next to, or beneath the visual section.
18
- */
19
- let AtomicResultSectionBadges = class AtomicResultSectionBadges extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-badges{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:badges;margin-bottom:1rem;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}}&.display-grid{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.image-icon{&.density-comfortable{margin-bottom:2rem}&.density-normal{margin-bottom:1.5rem}}}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}}}}`) {
20
- };
21
- AtomicResultSectionBadges = __decorate([
22
- customElement('atomic-result-section-badges')
23
- ], AtomicResultSectionBadges);
24
- export { AtomicResultSectionBadges };
@@ -1,25 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section displays additional descriptive information about the item.
12
- *
13
- * Behavior:
14
- * * Has a maximum height of two lines.
15
- * ** We recommend that you use `atomic-result-fields-list` to ensure that the fields in this section don’t overflow.
16
- * * Exposes the `--line-height` variable so child elements can adjust to the current line height.
17
- * * Has a defined CSS `color` property for text.
18
- * * Has a font weight.
19
- */
20
- let AtomicResultSectionBottomMetadata = class AtomicResultSectionBottomMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-bottom-metadata{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);grid-area:bottom-metadata;--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);@media (width >= 1024px){&.display-list{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}&.display-grid{&.density-comfortable{margin-top:1.75rem;max-height:4rem}&.density-normal{margin-top:1.375rem;max-height:3.5rem}&.density-compact{margin-top:.9375rem;max-height:3.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.display-grid{&.image-large{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.image-icon,&.image-none,&.image-small{max-height:3rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5rem}}}}&.display-table{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}}}`) {
21
- };
22
- AtomicResultSectionBottomMetadata = __decorate([
23
- customElement('atomic-result-section-bottom-metadata')
24
- ], AtomicResultSectionBottomMetadata);
25
- export { AtomicResultSectionBottomMetadata };
@@ -1,21 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section displays the folded results, available when using the <atomic-result-children> component.
12
- *
13
- * Behavior:
14
- * * Shows children at the bottom of the result, indented and wrapped in a border.
15
- */
16
- let AtomicResultSectionChildren = class AtomicResultSectionChildren extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */@layer properties;atomic-result-section-children{&.with-sections{grid-area:children;@media (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}@media not all and (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.display-grid{&.image-large{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.75rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.5rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}}&.display-table{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`) {
17
- };
18
- AtomicResultSectionChildren = __decorate([
19
- customElement('atomic-result-section-children')
20
- ], AtomicResultSectionChildren);
21
- export { AtomicResultSectionChildren };
@@ -1,23 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section displays the field that's important for its search criteria.
12
- * For example, in Commerce, a product's cost is often more important than the title itself.
13
- *
14
- * Behavior:
15
- * * Has a very large font size.
16
- * * Is the second closest element beneath the title section.
17
- */
18
- let AtomicResultSectionEmphasized = class AtomicResultSectionEmphasized extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-emphasized{font-weight:500;--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:.5rem;&.with-sections{grid-area:emphasized;overflow:hidden;text-overflow:ellipsis}}`) {
19
- };
20
- AtomicResultSectionEmphasized = __decorate([
21
- customElement('atomic-result-section-emphasized')
22
- ], AtomicResultSectionEmphasized);
23
- export { AtomicResultSectionEmphasized };
@@ -1,24 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section contains an informative summary of the item's content.
12
- *
13
- * Behavior:
14
- * * Has a fixed height of one to three lines, depending on the layout and density.
15
- * * Ellipses overflowing text.
16
- * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
17
- * * Has a defined CSS `color` property for text.
18
- */
19
- let AtomicResultSectionExcerpt = class AtomicResultSectionExcerpt extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-excerpt{&.with-sections{text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);display:-webkit-box;grid-area:excerpt;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;@media (width >= 1024px){&.density-comfortable{--font-size:var(--atomic-text-lg);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);-webkit-line-clamp:3}&.density-comfortable,&.density-compact{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}&.density-compact{-webkit-line-clamp:1}&.display-list{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem}&.density-normal{margin-top:1.75rem}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.display-grid{&.image-large{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{display:-webkit-box;margin-top:.75rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}}}}&.display-table{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}}}`) {
20
- };
21
- AtomicResultSectionExcerpt = __decorate([
22
- customElement('atomic-result-section-excerpt')
23
- ], AtomicResultSectionExcerpt);
24
- export { AtomicResultSectionExcerpt };
@@ -1,24 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section identifies the item by its name, and its main use is to make the result list scannable.
12
- * This is usually the page title.
13
- *
14
- * Behavior:
15
- * * Has a fixed height of two lines on grid layouts.
16
- * * Exposes the `--line-height` CSS variable so child elements can adjust to the current line height.
17
- * * Has a defined CSS `color` property for text.
18
- */
19
- let AtomicResultSectionTitle = class AtomicResultSectionTitle extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-title{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-on-background);grid-area:title;--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.density-comfortable{--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}@media (width >= 1024px){&.display-grid{display:-webkit-box;overflow:hidden;word-break:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:2}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-large{--font-size:var(--atomic-text-xl);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio))}&.image-icon,&.image-large,&.image-none,&.image-small{font-size:var(--font-size);line-height:var(--line-height)}&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-lg);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));display:-webkit-box;max-height:3rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}}}}}`) {
20
- };
21
- AtomicResultSectionTitle = __decorate([
22
- customElement('atomic-result-section-title')
23
- ], AtomicResultSectionTitle);
24
- export { AtomicResultSectionTitle };
@@ -1,24 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section surfaces some fields that are directly related to the title of the item.
12
- * For example, in Commerce, this could be the item's rating, which is tied to the nature of the product itself,
13
- * rather than to the product's description.
14
- *
15
- * Behavior:
16
- * * Has a very small font size.
17
- * * Is the closest element beneath the title section.
18
- */
19
- let AtomicResultSectionTitleMetadata = class AtomicResultSectionTitleMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-title-metadata{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.with-sections{grid-area:title-metadata;margin-top:.475rem;overflow:hidden;text-overflow:ellipsis}}`) {
20
- };
21
- AtomicResultSectionTitleMetadata = __decorate([
22
- customElement('atomic-result-section-title-metadata')
23
- ], AtomicResultSectionTitleMetadata);
24
- export { AtomicResultSectionTitleMetadata };
@@ -1,29 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, LitElement } from 'lit';
8
- import { customElement, property } from 'lit/decorators.js';
9
- import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
10
- /**
11
- * This section provides visual information about the item.
12
- * For example, in Commerce, an image is a great shorthand for a result category.
13
- * An icon can quickly show the item type, or an avatar can help identify to whom it is related.
14
- *
15
- * Behavior:
16
- * * Has a fixed size that depends on the specified image size, the layout, the density, and the screen size.
17
- * ** When the image size is set to `icon`, this section stays very small.
18
- * ** You should ensure that elements inside of it take the available space.
19
- * * Always has a 1:1 aspect ratio.
20
- */
21
- let AtomicResultSectionVisual = class AtomicResultSectionVisual extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */atomic-result-section-visual{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{grid-area:visual;&.image-icon{border-radius:var(--atomic-border-radius);height:2rem;width:2rem}&.image-none{display:none}@media (width >= 1024px){&.display-list{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}&.display-grid{margin-bottom:.5rem;&.image-large,&.image-small{width:100%;&.density-comfortable{margin:0 auto 2rem}&.density-normal{margin:0 auto 1.5rem}&.density-compact{margin:0 auto 1rem}}&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:19.75rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:14rem}}}}@media not all and (width >= 1024px){&.display-list{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.display-grid{&.image-large{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.image-icon,&.image-none,&.image-small{&.image-large,&.image-small{width:100%;&.density-comfortable{margin-bottom:1rem}&.density-normal{margin-bottom:.75rem}&.density-compact{margin-bottom:.5rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:9rem}height:10.25rem;width:10.25rem}}}}&.display-table{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}}}`) {
22
- };
23
- __decorate([
24
- property({ reflect: true, attribute: 'image-size', type: Object })
25
- ], AtomicResultSectionVisual.prototype, "imageSize", void 0);
26
- AtomicResultSectionVisual = __decorate([
27
- customElement('atomic-result-section-visual')
28
- ], AtomicResultSectionVisual);
29
- export { AtomicResultSectionVisual };
@@ -1,14 +0,0 @@
1
- import { ItemContextController, } from "../../../common/item-list/context/item-context-controller";
2
- /**
3
- * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing result context in result template components.
4
- *
5
- * @param host - The Lit component instance
6
- * @param options - Configuration options
7
- * @returns ItemContextController instance configured for atomic-result
8
- */
9
- export function createResultContextController(host, options = {}) {
10
- return new ItemContextController(host, {
11
- parentName: 'atomic-result',
12
- folded: options.folded ?? false,
13
- });
14
- }