@coveo/atomic 3.33.8-pre.adbf7397e2 → 3.33.8-pre.b577091ab5
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/dist/atomic/_atomic.esm.js +1 -1
- package/dist/atomic/atomic.esm.js.map +1 -1
- package/dist/atomic/autoloader/index.cjs.js +2 -2
- package/dist/atomic/autoloader/index.esm.js +2 -2
- package/dist/atomic/components/_index.d.ts +2 -0
- package/dist/atomic/components/_index.js +3 -1
- package/dist/atomic/components/analytics-config.js +1 -1
- package/dist/atomic/components/atomic-category-facet.js +1 -1
- package/dist/atomic/components/atomic-citation.js +1 -1
- package/dist/atomic/components/atomic-facet-manager.js +1 -1
- package/dist/atomic/components/atomic-facet.js +1 -1
- package/dist/atomic/components/atomic-format-currency.js +1 -1
- package/dist/atomic/components/atomic-format-number.js +1 -1
- package/dist/atomic/components/atomic-format-unit.js +1 -1
- package/dist/atomic/components/atomic-generated-answer-feedback-modal.js +1 -1
- package/dist/atomic/components/atomic-html2.js +1 -1
- package/dist/atomic/components/atomic-insight-edit-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-facet.js +1 -1
- package/dist/atomic/components/atomic-insight-folded-result-list.js +1 -1
- package/dist/atomic/components/atomic-insight-full-search-button.js +1 -1
- package/dist/atomic/components/atomic-insight-history-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-interface.js +1 -1
- package/dist/atomic/components/atomic-insight-no-results.js +1 -1
- package/dist/atomic/components/atomic-insight-numeric-facet.js +1 -1
- package/dist/atomic/components/atomic-insight-pager.js +3 -3
- package/dist/atomic/components/atomic-insight-query-error.js +1 -1
- package/dist/atomic/components/atomic-insight-refine-modal2.js +2 -2
- package/dist/atomic/components/atomic-insight-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-insight-result-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result-attach-to-case-indicator.js +1 -1
- package/dist/atomic/components/atomic-insight-result-children.js +1 -1
- package/dist/atomic/components/atomic-insight-result-list.js +1 -1
- package/dist/atomic/components/atomic-insight-result-quickview-action.js +1 -1
- package/dist/atomic/components/atomic-insight-result2.js +1 -1
- package/dist/atomic/components/atomic-insight-search-box.js +3 -4
- package/dist/atomic/components/atomic-insight-search-box.js.map +1 -1
- package/dist/atomic/components/atomic-insight-smart-snippet-feedback-modal2.js +2 -2
- package/dist/atomic/components/atomic-insight-tabs.js +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-session2.js +1 -1
- package/dist/atomic/components/atomic-insight-user-actions-toggle.js +1 -1
- package/dist/atomic/components/atomic-ipx-body2.js +2 -2
- package/dist/atomic/components/atomic-ipx-button.js +2 -2
- package/dist/atomic/components/atomic-ipx-embedded.js +1 -1
- package/dist/atomic/components/atomic-ipx-modal.js +2 -2
- package/dist/atomic/components/atomic-ipx-recs-list.js +1 -1
- package/dist/atomic/components/atomic-ipx-refine-modal2.js +1 -1
- package/dist/atomic/components/atomic-ipx-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-ipx-result-link.js +1 -1
- package/dist/atomic/components/atomic-ipx-tabs.js +1 -1
- package/dist/atomic/components/atomic-load-more-results.js +1 -1
- package/dist/atomic/components/atomic-no-results.js +1 -1
- package/dist/atomic/components/atomic-numeric-facet.js +1 -2
- package/dist/atomic/components/atomic-numeric-facet.js.map +1 -1
- package/dist/atomic/components/atomic-pager.js +3 -3
- package/dist/atomic/components/atomic-query-error.js +1 -1
- package/dist/atomic/components/atomic-quickview-modal2.js +1 -1
- package/dist/atomic/components/atomic-quickview.js +1 -1
- package/dist/atomic/components/atomic-recs-error.js +1 -1
- package/dist/atomic/components/atomic-recs-interface.js +1 -1
- package/dist/atomic/components/atomic-recs-list.js +1 -1
- package/dist/atomic/components/atomic-refine-modal2.js +1 -1
- package/dist/atomic/components/atomic-refine-toggle.js +1 -1
- package/dist/atomic/components/atomic-relevance-inspector.js +1 -46
- package/dist/atomic/components/atomic-relevance-inspector.js.map +1 -1
- package/dist/atomic/components/atomic-relevance-inspector2.js +50 -0
- package/dist/atomic/components/atomic-relevance-inspector2.js.map +1 -0
- package/dist/atomic/components/atomic-result-children.js +1 -1
- package/dist/atomic/components/atomic-result-fields-list.js +1 -1
- package/dist/atomic/components/atomic-result-link.js +1 -1
- package/dist/atomic/components/atomic-result-list.js +1 -1
- package/dist/atomic/components/atomic-result-placeholder2.js +2 -2
- package/dist/atomic/components/atomic-result-table-placeholder2.js +1 -1
- package/dist/atomic/components/atomic-search-box-instant-results.js +2 -2
- package/dist/atomic/components/atomic-search-box-instant-results.js.map +1 -1
- package/dist/atomic/components/atomic-search-box-query-suggestions2.js +2 -2
- package/dist/atomic/components/atomic-search-box-query-suggestions2.js.map +1 -1
- package/dist/atomic/components/atomic-search-box-recent-queries2.js +2 -2
- package/dist/atomic/components/atomic-search-box-recent-queries2.js.map +1 -1
- package/dist/atomic/components/atomic-search-box.js +5 -6
- package/dist/atomic/components/atomic-search-box.js.map +1 -1
- package/dist/atomic/components/atomic-search-interface.d.ts +11 -0
- package/dist/atomic/components/atomic-search-interface.js +552 -0
- package/dist/atomic/components/atomic-search-interface.js.map +1 -0
- package/dist/atomic/components/atomic-smart-snippet-answer2.js +1 -1
- package/dist/atomic/components/atomic-smart-snippet-collapse-wrapper2.js +2 -2
- package/dist/atomic/components/atomic-smart-snippet-expandable-answer2.js +1 -1
- package/dist/atomic/components/atomic-smart-snippet-feedback-modal2.js +2 -2
- package/dist/atomic/components/atomic-smart-snippet-source2.js +1 -1
- package/dist/atomic/components/atomic-sort-dropdown.js +2 -2
- package/dist/atomic/components/atomic-sort-expression.js +1 -1
- package/dist/atomic/components/atomic-stencil-facet-date-input.js +3 -3
- package/dist/atomic/components/atomic-suggestion-renderer2.js +1 -1
- package/dist/atomic/components/atomic-suggestion-renderer2.js.map +1 -1
- package/dist/atomic/components/atomic-tab-manager.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.js +11 -21
- package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +7 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-layout/atomic-commerce-layout.js +10 -19
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.js +1 -1
- package/dist/atomic/components/components/common/suggestions/suggestion-manager.js +1 -1
- package/dist/atomic/components/components/common/suggestions/{suggestions-common.js → suggestions-events.js} +16 -18
- package/dist/atomic/components/components/common/suggestions/suggestions-types.js +1 -0
- package/dist/atomic/components/components/common/suggestions/suggestions-utils.js +18 -0
- package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.js +9 -20
- package/dist/atomic/components/components/search/index.js +0 -1
- package/dist/atomic/components/components/search/lazy-index.js +0 -1
- package/dist/atomic/components/facet-number-input.js +2 -2
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- package/dist/atomic/components/stencil-query-suggestions.js.map +1 -1
- package/dist/atomic/components/stencil-suggestion-manager.js +20 -2
- package/dist/atomic/components/stencil-suggestion-manager.js.map +1 -1
- package/dist/atomic/components/{suggestions-common.js → suggestions-events.js} +18 -20
- package/dist/atomic/components/suggestions-events.js.map +1 -0
- package/dist/atomic/components/tab-button.js +1 -1
- package/dist/atomic/components/tab-popover.js +1 -1
- package/dist/atomic/index.esm.js +1 -1
- package/dist/atomic/index.esm.js.map +1 -1
- package/dist/atomic/{p-41c5d5fa.entry.js → p-021f01d6.entry.js} +2 -2
- package/dist/atomic/{p-a3fa6695.entry.js → p-035f8dc8.entry.js} +2 -2
- package/dist/atomic/p-0a051b8d.js +2 -0
- package/dist/atomic/p-0a051b8d.js.map +1 -0
- package/dist/atomic/p-16f4ce98.js +2 -0
- package/dist/atomic/p-16f4ce98.js.map +1 -0
- package/dist/atomic/p-1992b245.entry.js +2 -0
- package/dist/atomic/{p-9d023f0b.entry.js → p-1ef658d8.entry.js} +2 -2
- package/dist/atomic/{p-10b5e0f3.entry.js → p-20341936.entry.js} +2 -2
- package/dist/atomic/{p-3db62800.entry.js → p-26a51a77.entry.js} +2 -2
- package/dist/atomic/p-26a51a77.entry.js.map +1 -0
- package/dist/atomic/{p-15406648.entry.js → p-2ca352f4.entry.js} +2 -2
- package/dist/atomic/{p-97e42c43.entry.js → p-31aa052e.entry.js} +2 -2
- package/dist/atomic/{p-8bac9d25.entry.js → p-31f1e44e.entry.js} +2 -2
- package/dist/atomic/p-31f1e44e.entry.js.map +1 -0
- package/dist/atomic/{p-45840906.entry.js → p-330e6e7c.entry.js} +2 -2
- package/dist/atomic/{p-7a6468a7.entry.js → p-36fab158.entry.js} +2 -2
- package/dist/atomic/{p-9727f36b.entry.js → p-37374964.entry.js} +2 -2
- package/dist/atomic/{p-7b1a3cab.entry.js → p-3a2c900c.entry.js} +2 -2
- package/dist/atomic/{p-0610b3e7.entry.js → p-3b20b011.entry.js} +2 -2
- package/dist/atomic/{p-9b241ca5.entry.js → p-3c8d109e.entry.js} +2 -2
- package/dist/atomic/{p-9b241ca5.entry.js.map → p-3c8d109e.entry.js.map} +1 -1
- package/dist/atomic/{p-c08f4ee6.entry.js → p-3f912e98.entry.js} +2 -2
- package/dist/atomic/{p-9e771351.entry.js → p-40635c2d.entry.js} +2 -2
- package/dist/atomic/{p-c9fe4f77.entry.js → p-43d708cb.entry.js} +2 -2
- package/dist/atomic/{p-b0c50194.entry.js → p-48f57fd8.entry.js} +2 -2
- package/dist/atomic/{p-7dd3d72f.entry.js → p-4b3d253b.entry.js} +2 -2
- package/dist/atomic/p-4b7a19db.js +2 -0
- package/dist/atomic/p-4b7a19db.js.map +1 -0
- package/dist/atomic/{p-aed46103.entry.js → p-52ba404c.entry.js} +2 -2
- package/dist/atomic/{p-87c6c206.entry.js → p-534b6a0a.entry.js} +2 -2
- package/dist/atomic/{p-f0012580.entry.js → p-594488f2.entry.js} +2 -2
- package/dist/atomic/{p-8df7270f.entry.js → p-604c4085.entry.js} +2 -2
- package/dist/atomic/{p-d50c96c2.entry.js → p-627e1265.entry.js} +2 -2
- package/dist/atomic/{p-004adbb8.entry.js → p-6329ff94.entry.js} +2 -2
- package/dist/atomic/{p-e3af1bb4.entry.js → p-6e6d686e.entry.js} +2 -2
- package/dist/atomic/{p-33899ab5.entry.js → p-75e00690.entry.js} +2 -2
- package/dist/atomic/{p-25eabe15.entry.js → p-78b70622.entry.js} +2 -2
- package/dist/atomic/{p-094b61d4.entry.js → p-7a625c7e.entry.js} +2 -2
- package/dist/atomic/{p-c23a07f5.entry.js → p-7b0b9e9b.entry.js} +2 -2
- package/dist/atomic/{p-394c600f.entry.js → p-7b899b57.entry.js} +2 -2
- package/dist/atomic/{p-5100a30e.js → p-7c578825.js} +2 -2
- package/dist/atomic/{p-e6a7e7b2.entry.js → p-7dfcd6af.entry.js} +2 -2
- package/dist/atomic/{p-780170e5.entry.js → p-811d6dcb.entry.js} +2 -2
- package/dist/atomic/{p-9147b0db.entry.js → p-8256cd44.entry.js} +2 -2
- package/dist/atomic/{p-0e27d4f2.entry.js → p-83c9244a.entry.js} +2 -2
- package/dist/atomic/{p-f4780315.entry.js → p-877d35b1.entry.js} +2 -2
- package/dist/atomic/{p-bd99fcc1.entry.js → p-939eaaac.entry.js} +2 -2
- package/dist/atomic/{p-9b92b4e2.entry.js → p-93e29b24.entry.js} +2 -2
- package/dist/atomic/{p-b6377fb6.entry.js → p-98c5b9b8.entry.js} +2 -2
- package/dist/atomic/{p-bf49fed3.entry.js → p-99b8d52d.entry.js} +2 -2
- package/dist/atomic/{p-160553ce.entry.js → p-a3efa89e.entry.js} +2 -2
- package/dist/atomic/{p-c538c8ac.entry.js → p-a53c7821.entry.js} +2 -2
- package/dist/atomic/{p-3c823399.entry.js → p-a760d9f9.entry.js} +2 -2
- package/dist/atomic/{p-9349aa1a.entry.js → p-aa2a81fd.entry.js} +2 -2
- package/dist/atomic/{p-ce41c447.entry.js → p-ae060711.entry.js} +2 -2
- package/dist/atomic/p-af93b44c.js.map +1 -1
- package/dist/atomic/{p-b4c34553.entry.js → p-b0b17e21.entry.js} +2 -2
- package/dist/atomic/{p-867fd04d.entry.js → p-b28011e6.entry.js} +2 -2
- package/dist/atomic/{p-e1c99e2e.entry.js → p-b2ff1330.entry.js} +2 -2
- package/dist/atomic/{p-05530e9e.entry.js → p-bb9a95d4.entry.js} +2 -2
- package/dist/atomic/{p-dee60597.entry.js → p-bc0d6d3d.entry.js} +2 -2
- package/dist/atomic/{p-0e5dc57f.entry.js → p-c126ee6b.entry.js} +2 -2
- package/dist/atomic/{p-754909fe.entry.js → p-c1999888.entry.js} +2 -2
- package/dist/atomic/{p-80683e4c.entry.js → p-c49cfa0c.entry.js} +2 -2
- package/dist/atomic/p-c8468b1d.entry.js +2 -0
- package/dist/atomic/p-c8468b1d.entry.js.map +1 -0
- package/dist/atomic/{p-2d27675d.entry.js → p-c88a3d2d.entry.js} +2 -2
- package/dist/atomic/p-c88a3d2d.entry.js.map +1 -0
- package/dist/atomic/{p-a278ffde.entry.js → p-d00a12e9.entry.js} +2 -2
- package/dist/atomic/{p-a37fae7c.entry.js → p-d0f47b33.entry.js} +2 -2
- package/dist/atomic/p-d0f47b33.entry.js.map +1 -0
- package/dist/atomic/p-d24d34a7.entry.js +2 -0
- package/dist/atomic/{p-7f40e57d.entry.js → p-d364064c.entry.js} +2 -2
- package/dist/atomic/{p-856e858c.entry.js → p-d785121d.entry.js} +2 -2
- package/dist/atomic/{p-7d63bf7b.entry.js → p-d93adf52.entry.js} +2 -2
- package/dist/atomic/{p-843c195c.entry.js → p-dad0f186.entry.js} +2 -2
- package/dist/atomic/{p-2a4e9425.entry.js → p-de066001.entry.js} +2 -2
- package/dist/atomic/{p-8a7a23b7.entry.js → p-e162805d.entry.js} +2 -2
- package/dist/atomic/{p-441b1a7b.entry.js → p-e23b3334.entry.js} +2 -2
- package/dist/atomic/p-e2afb475.entry.js +2 -0
- package/dist/atomic/{p-bd32625e.entry.js → p-ea446721.entry.js} +2 -2
- package/dist/atomic/{p-07b6424c.entry.js → p-ee6771f1.entry.js} +2 -2
- package/dist/atomic/{p-abb14108.entry.js → p-f0c2dfe8.entry.js} +2 -2
- package/dist/atomic/{p-4b4b2626.entry.js → p-f22bcb8c.entry.js} +2 -2
- package/dist/atomic/{p-d4ad7336.entry.js → p-fa8b7c4c.entry.js} +2 -2
- package/dist/atomic/{p-1c6f7489.entry.js → p-fbfe913d.entry.js} +2 -2
- package/dist/atomic/p-fbfe913d.entry.js.map +1 -0
- package/dist/atomic/p-fcf3f7d7.entry.js +2 -0
- package/dist/atomic/{p-6de44060.entry.js.map → p-fcf3f7d7.entry.js.map} +1 -1
- package/dist/atomic/{p-f936f55e.entry.js → p-fea7bf3b.entry.js} +2 -2
- package/dist/cjs/_index.cjs.js +5 -2
- package/dist/cjs/_loader.cjs.js +1 -1
- package/dist/cjs/{analytics-config-438befe9.js → analytics-config-8fe77b5f.js} +2 -2
- package/dist/cjs/{analytics-config-438befe9.js.map → analytics-config-8fe77b5f.js.map} +1 -1
- package/dist/cjs/atomic-category-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-citation.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic-facet-number-input.cjs.entry.js +2 -2
- package/dist/cjs/atomic-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-currency.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-number.cjs.entry.js +1 -1
- package/dist/cjs/atomic-format-unit.cjs.entry.js +1 -1
- package/dist/cjs/atomic-generated-answer-feedback-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-html.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-edit-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-folded-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-full-search-button.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-history-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-no-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-numeric-facet.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-pager.cjs.entry.js +3 -3
- package/dist/cjs/atomic-insight-query-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-refine-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-attach-to-case-indicator.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-children.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result-quickview-action.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-result.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-search-box.cjs.entry.js +5 -5
- package/dist/cjs/atomic-insight-search-box.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-insight-smart-snippet-feedback-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-insight-tabs.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-user-actions-session_2.cjs.entry.js +1 -1
- package/dist/cjs/atomic-insight-user-actions-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-body.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-button.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-embedded.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-ipx-recs-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-refine-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-ipx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/atomic-load-more-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-no-results.cjs.entry.js +1 -1
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js +1 -2
- package/dist/cjs/atomic-numeric-facet.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-pager.cjs.entry.js +3 -3
- package/dist/cjs/atomic-query-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-quickview-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-quickview.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-error.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +2 -2
- package/dist/cjs/atomic-recs-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-refine-modal.cjs.entry.js +1 -1
- package/dist/cjs/atomic-refine-toggle.cjs.entry.js +1 -1
- package/dist/cjs/atomic-relevance-inspector.cjs.entry.js +2 -2
- package/dist/cjs/atomic-result-children.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-fields-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-link.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-list.cjs.entry.js +1 -1
- package/dist/cjs/atomic-result-placeholder_8.cjs.entry.js +3 -3
- package/dist/cjs/atomic-search-box-instant-results.cjs.entry.js +3 -3
- package/dist/cjs/atomic-search-box-instant-results.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js +5 -5
- package/dist/cjs/atomic-search-box-query-suggestions_2.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-search-box.cjs.entry.js +7 -7
- package/dist/cjs/atomic-search-box.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +511 -0
- package/dist/cjs/atomic-search-interface.cjs.entry.js.map +1 -0
- package/dist/cjs/atomic-smart-snippet-answer_2.cjs.entry.js +2 -2
- package/dist/cjs/atomic-smart-snippet-collapse-wrapper_2.cjs.entry.js +3 -3
- package/dist/cjs/atomic-smart-snippet-feedback-modal.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/atomic-sort-expression.cjs.entry.js +1 -1
- package/dist/cjs/atomic-stencil-facet-date-input.cjs.entry.js +3 -3
- package/dist/cjs/atomic-suggestion-renderer.cjs.entry.js +1 -1
- package/dist/cjs/atomic-suggestion-renderer.cjs.entry.js.map +1 -1
- package/dist/cjs/atomic-tab-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-button.cjs.entry.js +1 -1
- package/dist/cjs/atomic-tab-manager.cjs.entry.js +1 -1
- package/dist/cjs/atomic.cjs.js +1 -1
- package/dist/cjs/index-757bc886.js +8 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/stencil-query-suggestions-03268ecc.js.map +1 -1
- package/dist/cjs/{stencil-suggestion-manager-c0878ef2.js → stencil-suggestion-manager-2cba6d69.js} +4 -4
- package/dist/cjs/{stencil-suggestion-manager-c0878ef2.js.map → stencil-suggestion-manager-2cba6d69.js.map} +1 -1
- package/dist/cjs/{suggestions-common-5097a362.js → suggestions-events-63dd0640.js} +17 -21
- package/dist/cjs/suggestions-events-63dd0640.js.map +1 -0
- package/dist/cjs/suggestions-utils-61000808.js +25 -0
- package/dist/cjs/suggestions-utils-61000808.js.map +1 -0
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/_index.js +2 -1
- package/dist/esm/_loader.js +1 -1
- package/dist/esm/{analytics-config-d6a24455.js → analytics-config-9d3a5ccd.js} +2 -2
- package/dist/esm/{analytics-config-d6a24455.js.map → analytics-config-9d3a5ccd.js.map} +1 -1
- package/dist/esm/atomic-category-facet.entry.js +1 -1
- package/dist/esm/atomic-citation.entry.js +1 -1
- package/dist/esm/atomic-facet-manager.entry.js +1 -1
- package/dist/esm/atomic-facet-number-input.entry.js +2 -2
- package/dist/esm/atomic-facet.entry.js +1 -1
- package/dist/esm/atomic-format-currency.entry.js +1 -1
- package/dist/esm/atomic-format-number.entry.js +1 -1
- package/dist/esm/atomic-format-unit.entry.js +1 -1
- package/dist/esm/atomic-generated-answer-feedback-modal.entry.js +1 -1
- package/dist/esm/atomic-html.entry.js +1 -1
- package/dist/esm/atomic-insight-edit-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-facet.entry.js +1 -1
- package/dist/esm/atomic-insight-folded-result-list.entry.js +1 -1
- package/dist/esm/atomic-insight-full-search-button.entry.js +1 -1
- package/dist/esm/atomic-insight-history-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-interface.entry.js +2 -2
- package/dist/esm/atomic-insight-no-results.entry.js +1 -1
- package/dist/esm/atomic-insight-numeric-facet.entry.js +1 -1
- package/dist/esm/atomic-insight-pager.entry.js +3 -3
- package/dist/esm/atomic-insight-query-error.entry.js +1 -1
- package/dist/esm/atomic-insight-refine-modal.entry.js +2 -2
- package/dist/esm/atomic-insight-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-insight-result-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result-attach-to-case-indicator.entry.js +1 -1
- package/dist/esm/atomic-insight-result-children.entry.js +1 -1
- package/dist/esm/atomic-insight-result-list.entry.js +1 -1
- package/dist/esm/atomic-insight-result-quickview-action.entry.js +1 -1
- package/dist/esm/atomic-insight-result.entry.js +1 -1
- package/dist/esm/atomic-insight-search-box.entry.js +4 -4
- package/dist/esm/atomic-insight-search-box.entry.js.map +1 -1
- package/dist/esm/atomic-insight-smart-snippet-feedback-modal.entry.js +2 -2
- package/dist/esm/atomic-insight-tabs.entry.js +1 -1
- package/dist/esm/atomic-insight-user-actions-session_2.entry.js +1 -1
- package/dist/esm/atomic-insight-user-actions-toggle.entry.js +1 -1
- package/dist/esm/atomic-ipx-body.entry.js +2 -2
- package/dist/esm/atomic-ipx-button.entry.js +2 -2
- package/dist/esm/atomic-ipx-embedded.entry.js +1 -1
- package/dist/esm/atomic-ipx-modal.entry.js +2 -2
- package/dist/esm/atomic-ipx-recs-list.entry.js +1 -1
- package/dist/esm/atomic-ipx-refine-modal.entry.js +1 -1
- package/dist/esm/atomic-ipx-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-ipx-result-link.entry.js +1 -1
- package/dist/esm/atomic-ipx-tabs.entry.js +1 -1
- package/dist/esm/atomic-load-more-results.entry.js +1 -1
- package/dist/esm/atomic-no-results.entry.js +1 -1
- package/dist/esm/atomic-numeric-facet.entry.js +1 -2
- package/dist/esm/atomic-numeric-facet.entry.js.map +1 -1
- package/dist/esm/atomic-pager.entry.js +3 -3
- package/dist/esm/atomic-query-error.entry.js +1 -1
- package/dist/esm/atomic-quickview-modal.entry.js +1 -1
- package/dist/esm/atomic-quickview.entry.js +1 -1
- package/dist/esm/atomic-recs-error.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +2 -2
- package/dist/esm/atomic-recs-list.entry.js +1 -1
- package/dist/esm/atomic-refine-modal.entry.js +1 -1
- package/dist/esm/atomic-refine-toggle.entry.js +1 -1
- package/dist/esm/atomic-relevance-inspector.entry.js +2 -2
- package/dist/esm/atomic-result-children.entry.js +1 -1
- package/dist/esm/atomic-result-fields-list.entry.js +1 -1
- package/dist/esm/atomic-result-link.entry.js +1 -1
- package/dist/esm/atomic-result-list.entry.js +1 -1
- package/dist/esm/atomic-result-placeholder_8.entry.js +3 -3
- package/dist/esm/atomic-search-box-instant-results.entry.js +2 -2
- package/dist/esm/atomic-search-box-instant-results.entry.js.map +1 -1
- package/dist/esm/atomic-search-box-query-suggestions_2.entry.js +3 -3
- package/dist/esm/atomic-search-box-query-suggestions_2.entry.js.map +1 -1
- package/dist/esm/atomic-search-box.entry.js +6 -6
- package/dist/esm/atomic-search-box.entry.js.map +1 -1
- package/dist/esm/atomic-search-interface.entry.js +507 -0
- package/dist/esm/atomic-search-interface.entry.js.map +1 -0
- package/dist/esm/atomic-smart-snippet-answer_2.entry.js +2 -2
- package/dist/esm/atomic-smart-snippet-collapse-wrapper_2.entry.js +3 -3
- package/dist/esm/atomic-smart-snippet-feedback-modal.entry.js +2 -2
- package/dist/esm/atomic-sort-dropdown.entry.js +2 -2
- package/dist/esm/atomic-sort-expression.entry.js +1 -1
- package/dist/esm/atomic-stencil-facet-date-input.entry.js +3 -3
- package/dist/esm/atomic-suggestion-renderer.entry.js +1 -1
- package/dist/esm/atomic-suggestion-renderer.entry.js.map +1 -1
- package/dist/esm/atomic-tab-bar_2.entry.js +1 -1
- package/dist/esm/atomic-tab-button.entry.js +1 -1
- package/dist/esm/atomic-tab-manager.entry.js +1 -1
- package/dist/esm/atomic.js +1 -1
- package/dist/esm/index-3f35faca.js +8 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stencil-query-suggestions-5d6a46d7.js.map +1 -1
- package/dist/esm/{stencil-suggestion-manager-486094dd.js → stencil-suggestion-manager-376f83e8.js} +2 -2
- package/dist/esm/{stencil-suggestion-manager-486094dd.js.map → stencil-suggestion-manager-376f83e8.js.map} +1 -1
- package/dist/esm/{suggestions-common-2b20db26.js → suggestions-events-b7a6f007.js} +18 -20
- package/dist/esm/suggestions-events-b7a6f007.js.map +1 -0
- package/dist/esm/suggestions-utils-591559a0.js +22 -0
- package/dist/esm/suggestions-utils-591559a0.js.map +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.d.ts +1 -3
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +1 -1
- package/dist/types/components/commerce/atomic-commerce-layout/atomic-commerce-layout.d.ts +3 -3
- package/dist/types/components/commerce/atomic-commerce-search-box-instant-products/atomic-commerce-search-box-instant-products.d.ts +1 -1
- package/dist/types/components/commerce/atomic-commerce-search-box-query-suggestions/atomic-commerce-search-box-query-suggestions.d.ts +1 -1
- package/dist/types/components/commerce/atomic-commerce-search-box-recent-queries/atomic-commerce-search-box-recent-queries.d.ts +1 -1
- package/dist/types/components/common/atomic-suggestion-renderer/atomic-suggestion-renderer.d.ts +1 -1
- package/dist/types/components/common/suggestions/instant-item.d.ts +1 -1
- package/dist/types/components/common/suggestions/query-suggestions.d.ts +1 -1
- package/dist/types/components/common/suggestions/recent-queries.d.ts +1 -1
- package/dist/types/components/common/suggestions/stencil-instant-item.d.ts +1 -1
- package/dist/types/components/common/suggestions/stencil-query-suggestions.d.ts +1 -1
- package/dist/types/components/common/suggestions/stencil-recent-queries.d.ts +1 -1
- package/dist/types/components/common/suggestions/stencil-suggestion-manager.d.ts +1 -1
- package/dist/types/components/common/suggestions/suggestion-manager.d.ts +1 -1
- package/dist/types/components/common/suggestions/suggestions-events.d.ts +14 -0
- package/dist/types/components/common/suggestions/{suggestions-common.d.ts → suggestions-types.d.ts} +6 -16
- package/dist/types/components/common/suggestions/suggestions-utils.d.ts +15 -0
- package/dist/types/components/search/atomic-search-box/atomic-search-box.d.ts +1 -1
- package/dist/types/components/search/atomic-search-interface/atomic-search-interface.d.ts +44 -46
- package/dist/types/components/search/atomic-search-interface/interfaces.d.ts +1 -2
- package/dist/types/components/search/atomic-search-layout/atomic-search-layout.d.ts +1 -3
- package/dist/types/components/search/index.d.ts +0 -1
- package/dist/types/components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results.d.ts +1 -1
- package/dist/types/components.d.ts +167 -4
- package/dist/types/decorators/types.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/docs/atomic-docs.json +577 -14
- package/package.json +4 -4
- package/dist/atomic/components/components/common/layout/layout-styles-controller.js +0 -40
- package/dist/atomic/components/components/common/layout/mobile-breakpoint-controller.js +0 -26
- package/dist/atomic/components/components/search/atomic-search-interface/analytics-config.js +0 -57
- package/dist/atomic/components/components/search/atomic-search-interface/atomic-search-interface.js +0 -493
- package/dist/atomic/components/suggestions-common.js.map +0 -1
- package/dist/atomic/p-0edea6f9.entry.js +0 -2
- package/dist/atomic/p-1c6f7489.entry.js.map +0 -1
- package/dist/atomic/p-29fd6768.js +0 -2
- package/dist/atomic/p-29fd6768.js.map +0 -1
- package/dist/atomic/p-2d27675d.entry.js.map +0 -1
- package/dist/atomic/p-3db62800.entry.js.map +0 -1
- package/dist/atomic/p-6de44060.entry.js +0 -2
- package/dist/atomic/p-7601c3de.js +0 -2
- package/dist/atomic/p-7601c3de.js.map +0 -1
- package/dist/atomic/p-8bac9d25.entry.js.map +0 -1
- package/dist/atomic/p-97829295.entry.js +0 -2
- package/dist/atomic/p-a37fae7c.entry.js.map +0 -1
- package/dist/atomic/p-c2b4b401.entry.js +0 -2
- package/dist/cjs/suggestions-common-5097a362.js.map +0 -1
- package/dist/esm/suggestions-common-2b20db26.js.map +0 -1
- package/dist/types/components/common/layout/layout-styles-controller.d.ts +0 -22
- package/dist/types/components/common/layout/mobile-breakpoint-controller.d.ts +0 -18
- /package/dist/atomic/{p-41c5d5fa.entry.js.map → p-021f01d6.entry.js.map} +0 -0
- /package/dist/atomic/{p-a3fa6695.entry.js.map → p-035f8dc8.entry.js.map} +0 -0
- /package/dist/atomic/{p-0edea6f9.entry.js.map → p-1992b245.entry.js.map} +0 -0
- /package/dist/atomic/{p-9d023f0b.entry.js.map → p-1ef658d8.entry.js.map} +0 -0
- /package/dist/atomic/{p-10b5e0f3.entry.js.map → p-20341936.entry.js.map} +0 -0
- /package/dist/atomic/{p-15406648.entry.js.map → p-2ca352f4.entry.js.map} +0 -0
- /package/dist/atomic/{p-97e42c43.entry.js.map → p-31aa052e.entry.js.map} +0 -0
- /package/dist/atomic/{p-45840906.entry.js.map → p-330e6e7c.entry.js.map} +0 -0
- /package/dist/atomic/{p-7a6468a7.entry.js.map → p-36fab158.entry.js.map} +0 -0
- /package/dist/atomic/{p-9727f36b.entry.js.map → p-37374964.entry.js.map} +0 -0
- /package/dist/atomic/{p-7b1a3cab.entry.js.map → p-3a2c900c.entry.js.map} +0 -0
- /package/dist/atomic/{p-0610b3e7.entry.js.map → p-3b20b011.entry.js.map} +0 -0
- /package/dist/atomic/{p-c08f4ee6.entry.js.map → p-3f912e98.entry.js.map} +0 -0
- /package/dist/atomic/{p-9e771351.entry.js.map → p-40635c2d.entry.js.map} +0 -0
- /package/dist/atomic/{p-c9fe4f77.entry.js.map → p-43d708cb.entry.js.map} +0 -0
- /package/dist/atomic/{p-b0c50194.entry.js.map → p-48f57fd8.entry.js.map} +0 -0
- /package/dist/atomic/{p-7dd3d72f.entry.js.map → p-4b3d253b.entry.js.map} +0 -0
- /package/dist/atomic/{p-aed46103.entry.js.map → p-52ba404c.entry.js.map} +0 -0
- /package/dist/atomic/{p-87c6c206.entry.js.map → p-534b6a0a.entry.js.map} +0 -0
- /package/dist/atomic/{p-f0012580.entry.js.map → p-594488f2.entry.js.map} +0 -0
- /package/dist/atomic/{p-8df7270f.entry.js.map → p-604c4085.entry.js.map} +0 -0
- /package/dist/atomic/{p-d50c96c2.entry.js.map → p-627e1265.entry.js.map} +0 -0
- /package/dist/atomic/{p-004adbb8.entry.js.map → p-6329ff94.entry.js.map} +0 -0
- /package/dist/atomic/{p-e3af1bb4.entry.js.map → p-6e6d686e.entry.js.map} +0 -0
- /package/dist/atomic/{p-33899ab5.entry.js.map → p-75e00690.entry.js.map} +0 -0
- /package/dist/atomic/{p-25eabe15.entry.js.map → p-78b70622.entry.js.map} +0 -0
- /package/dist/atomic/{p-094b61d4.entry.js.map → p-7a625c7e.entry.js.map} +0 -0
- /package/dist/atomic/{p-c23a07f5.entry.js.map → p-7b0b9e9b.entry.js.map} +0 -0
- /package/dist/atomic/{p-394c600f.entry.js.map → p-7b899b57.entry.js.map} +0 -0
- /package/dist/atomic/{p-5100a30e.js.map → p-7c578825.js.map} +0 -0
- /package/dist/atomic/{p-e6a7e7b2.entry.js.map → p-7dfcd6af.entry.js.map} +0 -0
- /package/dist/atomic/{p-780170e5.entry.js.map → p-811d6dcb.entry.js.map} +0 -0
- /package/dist/atomic/{p-9147b0db.entry.js.map → p-8256cd44.entry.js.map} +0 -0
- /package/dist/atomic/{p-0e27d4f2.entry.js.map → p-83c9244a.entry.js.map} +0 -0
- /package/dist/atomic/{p-f4780315.entry.js.map → p-877d35b1.entry.js.map} +0 -0
- /package/dist/atomic/{p-bd99fcc1.entry.js.map → p-939eaaac.entry.js.map} +0 -0
- /package/dist/atomic/{p-9b92b4e2.entry.js.map → p-93e29b24.entry.js.map} +0 -0
- /package/dist/atomic/{p-b6377fb6.entry.js.map → p-98c5b9b8.entry.js.map} +0 -0
- /package/dist/atomic/{p-bf49fed3.entry.js.map → p-99b8d52d.entry.js.map} +0 -0
- /package/dist/atomic/{p-160553ce.entry.js.map → p-a3efa89e.entry.js.map} +0 -0
- /package/dist/atomic/{p-c538c8ac.entry.js.map → p-a53c7821.entry.js.map} +0 -0
- /package/dist/atomic/{p-3c823399.entry.js.map → p-a760d9f9.entry.js.map} +0 -0
- /package/dist/atomic/{p-9349aa1a.entry.js.map → p-aa2a81fd.entry.js.map} +0 -0
- /package/dist/atomic/{p-ce41c447.entry.js.map → p-ae060711.entry.js.map} +0 -0
- /package/dist/atomic/{p-b4c34553.entry.js.map → p-b0b17e21.entry.js.map} +0 -0
- /package/dist/atomic/{p-867fd04d.entry.js.map → p-b28011e6.entry.js.map} +0 -0
- /package/dist/atomic/{p-e1c99e2e.entry.js.map → p-b2ff1330.entry.js.map} +0 -0
- /package/dist/atomic/{p-05530e9e.entry.js.map → p-bb9a95d4.entry.js.map} +0 -0
- /package/dist/atomic/{p-dee60597.entry.js.map → p-bc0d6d3d.entry.js.map} +0 -0
- /package/dist/atomic/{p-0e5dc57f.entry.js.map → p-c126ee6b.entry.js.map} +0 -0
- /package/dist/atomic/{p-754909fe.entry.js.map → p-c1999888.entry.js.map} +0 -0
- /package/dist/atomic/{p-80683e4c.entry.js.map → p-c49cfa0c.entry.js.map} +0 -0
- /package/dist/atomic/{p-a278ffde.entry.js.map → p-d00a12e9.entry.js.map} +0 -0
- /package/dist/atomic/{p-97829295.entry.js.map → p-d24d34a7.entry.js.map} +0 -0
- /package/dist/atomic/{p-7f40e57d.entry.js.map → p-d364064c.entry.js.map} +0 -0
- /package/dist/atomic/{p-856e858c.entry.js.map → p-d785121d.entry.js.map} +0 -0
- /package/dist/atomic/{p-7d63bf7b.entry.js.map → p-d93adf52.entry.js.map} +0 -0
- /package/dist/atomic/{p-843c195c.entry.js.map → p-dad0f186.entry.js.map} +0 -0
- /package/dist/atomic/{p-2a4e9425.entry.js.map → p-de066001.entry.js.map} +0 -0
- /package/dist/atomic/{p-8a7a23b7.entry.js.map → p-e162805d.entry.js.map} +0 -0
- /package/dist/atomic/{p-441b1a7b.entry.js.map → p-e23b3334.entry.js.map} +0 -0
- /package/dist/atomic/{p-c2b4b401.entry.js.map → p-e2afb475.entry.js.map} +0 -0
- /package/dist/atomic/{p-bd32625e.entry.js.map → p-ea446721.entry.js.map} +0 -0
- /package/dist/atomic/{p-07b6424c.entry.js.map → p-ee6771f1.entry.js.map} +0 -0
- /package/dist/atomic/{p-abb14108.entry.js.map → p-f0c2dfe8.entry.js.map} +0 -0
- /package/dist/atomic/{p-4b4b2626.entry.js.map → p-f22bcb8c.entry.js.map} +0 -0
- /package/dist/atomic/{p-d4ad7336.entry.js.map → p-fa8b7c4c.entry.js.map} +0 -0
- /package/dist/atomic/{p-f936f55e.entry.js.map → p-fea7bf3b.entry.js.map} +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["getPartialInstantItemElement","i18n","itemTitle","itemUniqueId","ariaLabel","t","title","interpolation","escapeValue","key","encodeForDomAttribute","part","getPartialInstantItemShowAllElement","InstantItemShowAllButton","h","class","getClassNameForButtonStyle","AtomicSearchBoxInstantResults","this","results","display","templateHasError","maxResultsPerQuery","density","imageSize","setRenderFunction","resultRenderingFunction","itemRenderingFunction","componentWillLoad","dispatchSearchBoxSuggestionsEvent","bindings","initialize","host","error","getLink","el","atomicResult","tagName","querySelector","shadowRoot","handleLinkClick","hasModifier","setTarget","value","setAttribute","initialTarget","getAttribute","click","renderItems","suggestedQuery","store","isMobile","instantResults","state","length","elements","map","result","partialItem","ariaLabelGenerator","uniqueId","content","interactiveResult","buildInteractiveInstantResult","engine","options","itemTemplateProvider","getTemplateContent","stopPropagation","renderingFunction","onSelect","e","link","target","ctrlKey","metaKey","push","clearSuggestions","searchBoxController","updateText","q","submit","buildInstantResults","ItemTemplateProvider","includeDefaultTemplate","templateElements","Array","from","querySelectorAll","getResultTemplateRegistered","setResultTemplateRegistered","getTemplateHasError","setTemplateHasError","position","parentNode","children","indexOf","panel","onSuggestedQueryChange","updateQuery","getSuggestionElements","console","warn","Promise","resolve","unsubscribe","subscribe","isLoading","render","element"],"sources":["src/components/common/suggestions/stencil-instant-item.tsx","src/components/search/search-box-suggestions/atomic-search-box-instant-results/atomic-search-box-instant-results.tsx"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport {encodeForDomAttribute} from '../../../utils/string-utils';\nimport {getClassNameForButtonStyle} from '../stencil-button-style';\nimport {SearchBoxSuggestionElement} from './suggestions-common';\n\nexport const getPartialInstantItemElement = (\n i18n: i18n,\n itemTitle: string,\n itemUniqueId: string\n): Pick<SearchBoxSuggestionElement, 'ariaLabel' | 'key' | 'part'> => {\n return {\n ariaLabel: i18n.t('instant-results-suggestion-label', {\n title: itemTitle,\n interpolation: {escapeValue: false},\n }),\n key: `instant-result-${encodeForDomAttribute(itemUniqueId)}`,\n part: 'instant-results-item',\n };\n};\n\nexport const getPartialInstantItemShowAllElement = (\n i18n: i18n\n): Pick<SearchBoxSuggestionElement, 'key' | 'part' | 'ariaLabel'> => {\n return {\n key: 'instant-results-show-all-button',\n part: 'instant-results-show-all',\n ariaLabel: i18n.t('show-all-results'),\n };\n};\n\ninterface InstantItemShowAllButtonProps {\n i18n: i18n;\n}\nexport const InstantItemShowAllButton: FunctionalComponent<\n InstantItemShowAllButtonProps\n> = ({i18n}) => {\n return (\n <div\n part=\"instant-results-show-all-button\"\n class={getClassNameForButtonStyle('text-primary')}\n >\n {i18n.t('show-all-results')}\n </div>\n );\n};\n","import {\n buildInstantResults,\n buildInteractiveInstantResult,\n InstantResults,\n Result,\n SearchBox,\n} from '@coveo/headless';\nimport {Component, Element, State, h, Prop, Method} from '@stencil/core';\nimport {InitializableComponent} from '../../../../utils/initialization-utils';\nimport {encodeForDomAttribute} from '../../../../utils/string-utils';\nimport {ItemTemplateProvider} from '../../../common/item-list/item-template-provider';\nimport {ItemRenderingFunction} from '../../../common/item-list/stencil-item-list-common';\nimport {\n ItemDisplayDensity,\n ItemDisplayImageSize,\n ItemDisplayLayout,\n} from '../../../common/layout/display-options';\nimport {\n getPartialInstantItemElement,\n getPartialInstantItemShowAllElement,\n InstantItemShowAllButton,\n} from '../../../common/suggestions/stencil-instant-item';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-common';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\n\nexport type AriaLabelGenerator = (\n bindings: Bindings,\n result: Result\n) => string | undefined;\n\n/**\n * 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.\n *\n * This component does not support accessibility out-of-the-box. To do so, see [Instant Results Accessibility](https://docs.coveo.com/en/atomic/latest/usage/accessibility/#instant-results-accessibility).\n *\n * This component is not supported on mobile.\n *\n * @slot default - The default slot where the instant results are rendered.\n */\n@Component({\n tag: 'atomic-search-box-instant-results',\n shadow: true,\n})\nexport class AtomicSearchBoxInstantResults implements InitializableComponent {\n public bindings!: SearchBoxSuggestionsBindings<SearchBox, Bindings>;\n private itemRenderingFunction: ItemRenderingFunction;\n private results: Result[] = [];\n private itemTemplateProvider!: ItemTemplateProvider;\n private instantResults!: InstantResults;\n private display: ItemDisplayLayout = 'list';\n\n @Element() public host!: HTMLElement;\n\n @State() public error!: Error;\n @State() private templateHasError = false;\n\n /**\n * Sets a rendering function to bypass the standard HTML template mechanism for rendering results.\n * You can use this function while working with web frameworks that don't use plain HTML syntax, e.g., React, Angular or Vue.\n *\n * Do not use this method if you integrate Atomic in a plain HTML deployment.\n *\n * @param resultRenderingFunction\n */\n @Method() public async setRenderFunction(\n resultRenderingFunction: ItemRenderingFunction\n ) {\n this.itemRenderingFunction = resultRenderingFunction;\n }\n /**\n * The maximum number of results to show.\n */\n @Prop({reflect: true}) public maxResultsPerQuery = 4;\n /**\n * The spacing of various elements in the result list, including the gap between results, the gap between parts of a result, and the font sizes of different parts in a result.\n */\n @Prop({reflect: true}) public density: ItemDisplayDensity = 'normal';\n /**\n * The expected size of the image displayed in the results.\n */\n @Prop({reflect: true}) public imageSize: ItemDisplayImageSize = 'icon';\n /**\n * The callback to generate an [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) for a given result so that accessibility tools can fully describe what's visually rendered by a result.\n *\n * By default, or if an empty string is returned, `result.title` is used.\n */\n @Prop() public ariaLabelGenerator?: AriaLabelGenerator;\n\n public componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox, Bindings>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private getLink(el: HTMLElement): HTMLElement | null {\n const atomicResult =\n el.tagName === 'ATOMIC-RESULT' ? el : el?.querySelector('atomic-result');\n\n return (\n atomicResult?.shadowRoot?.querySelector(\n 'atomic-result-link a:not([slot])'\n ) || null\n );\n }\n\n private handleLinkClick(el: HTMLElement, hasModifier: boolean) {\n const setTarget = (value: string) => el.setAttribute('target', value);\n const initialTarget = el.getAttribute('target');\n\n hasModifier && setTarget('_blank');\n el.click();\n hasModifier && setTarget(initialTarget || '');\n\n return true;\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n if (!this.bindings.suggestedQuery() || this.bindings.store.isMobile()) {\n return [];\n }\n const results = this.instantResults.state.results.length\n ? this.instantResults.state.results\n : this.results;\n\n const elements: SearchBoxSuggestionElement[] = results.map(\n (result: Result) => {\n const partialItem = getPartialInstantItemElement(\n this.bindings.i18n,\n this.ariaLabelGenerator?.(this.bindings, result) || result.title,\n result.uniqueId\n );\n return {\n ...partialItem,\n content: (\n <atomic-result\n key={`instant-result-${encodeForDomAttribute(result.uniqueId)}`}\n part=\"outline\"\n result={result}\n interactiveResult={buildInteractiveInstantResult(\n this.bindings.engine,\n {\n options: {result},\n }\n )}\n display={this.display}\n density={this.density}\n imageSize={this.imageSize}\n content={this.itemTemplateProvider.getTemplateContent(result)}\n stopPropagation={false}\n renderingFunction={this.itemRenderingFunction}\n ></atomic-result>\n ),\n onSelect: (e: MouseEvent) => {\n const link = this.getLink(e.target as HTMLElement);\n\n if (!link) {\n return;\n }\n this.handleLinkClick(link, e.ctrlKey || e.metaKey);\n },\n };\n }\n );\n if (elements.length) {\n const partialItem = getPartialInstantItemShowAllElement(\n this.bindings.i18n\n );\n elements.push({\n ...partialItem,\n content: <InstantItemShowAllButton i18n={this.bindings.i18n} />,\n onSelect: () => {\n this.bindings.clearSuggestions();\n this.bindings.searchBoxController.updateText(\n this.instantResults.state.q\n );\n this.bindings.searchBoxController.submit();\n },\n });\n }\n return elements;\n }\n\n public initialize(): SearchBoxSuggestions {\n this.instantResults = buildInstantResults(this.bindings.engine, {\n options: {\n maxResultsPerQuery: this.maxResultsPerQuery,\n },\n });\n\n this.itemTemplateProvider = new ItemTemplateProvider({\n includeDefaultTemplate: true,\n templateElements: Array.from(\n this.host.querySelectorAll('atomic-result-template')\n ),\n getResultTemplateRegistered: () => true,\n setResultTemplateRegistered: () => {},\n getTemplateHasError: () => this.templateHasError,\n setTemplateHasError: (value: boolean) => {\n this.templateHasError = value;\n },\n bindings: this.bindings,\n });\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n panel: 'right',\n onSuggestedQueryChange: (q) => {\n this.instantResults.updateQuery(q);\n return this.onSuggestedQueryChange();\n },\n renderItems: () => this.renderItems(),\n };\n }\n\n private onSuggestedQueryChange() {\n if (\n !this.bindings.getSuggestionElements().length &&\n !this.bindings.searchBoxController.state.value\n ) {\n console.warn(\n \"There doesn't seem to be any query suggestions configured. Make sure to include either an atomic-search-box-query-suggestions or atomic-search-box-recent-queries in your search box in order to see some instant results.\"\n );\n }\n\n return new Promise<void>((resolve) => {\n const unsubscribe = this.instantResults.subscribe(() => {\n const state = this.instantResults.state;\n if (!state.isLoading) {\n if (state.results.length) {\n this.results = state.results;\n }\n unsubscribe();\n resolve();\n }\n });\n });\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n"],"mappings":"sUAMO,MAAMA,EAA+B,CAC1CC,EACAC,EACAC,KAEO,CACLC,UAAWH,EAAKI,EAAE,mCAAoC,CACpDC,MAAOJ,EACPK,cAAe,CAACC,YAAa,SAE/BC,IAAK,kBAAkBC,EAAsBP,KAC7CQ,KAAM,yBAIH,MAAMC,EACXX,IAEO,CACLQ,IAAK,kCACLE,KAAM,2BACNP,UAAWH,EAAKI,EAAE,sBAOf,MAAMQ,EAET,EAAEZ,UAEFa,EAAA,OACEH,KAAK,kCACLI,MAAOC,EAA2B,iBAEjCf,EAAKI,EAAE,qB,MCMDY,EAA6B,M,yBAGhCC,KAAAC,QAAoB,GAGpBD,KAAAE,QAA6B,OAKpBF,KAAAG,iBAAmB,MAkBNH,KAAAI,mBAAqB,EAIrBJ,KAAAK,QAA8B,SAI9BL,KAAAM,UAAkC,O,2CA1B5B,M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vF,KAAKkC,eAAesD,WAAU,KAChD,MAAMrD,EAAQnC,KAAKkC,eAAeC,MAClC,IAAKA,EAAMsD,UAAW,CACpB,GAAItD,EAAMlC,QAAQmC,OAAQ,CACxBpC,KAAKC,QAAUkC,EAAMlC,O,CAEvBsF,IACAD,G,IAEF,G,CAIC,MAAAI,GACL,GAAI1F,KAAKe,MAAO,CACd,OACEnB,EAAA,0BAAAL,IAAA,2CACEoG,QAAS3F,KAAKc,KACdC,MAAOf,KAAKe,O","ignoreList":[]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{h as t,f as s}from"./p-dc3df5ce.js";import{B as e}from"./p-b93ccff9.js";import{isNullOrUndefined as i}from"@coveo/bueno";import{D as n}from"./p-f284897c.js";import{d as r}from"./p-01c91b69.js";import{e as o,a}from"./p-7601c3de.js";const h=`<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="7" cy="7" r="6.5" stroke="currentColor"/>\n<path d="M16 16L12 12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const u=(s,e)=>{const i=()=>{const t="flex bg-background w-full border border-neutral rounded-md focus-within:ring-3 absolute top-0 left-0";const e=s.disabled?"focus-within:border-disabled focus-within:ring-neutral":"focus-within:border-primary focus-within:ring-ring-primary";return[t,e].join(" ")};return t("div",{part:"wrapper",class:i(),onFocusout:s.onFocusout},e)};const c=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M15 1.00012L1.00012 14.9999" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M0.999878 1L14.9999 15" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n`;const l=({inputRef:s,bindings:i,onClick:n,...r})=>t("div",{part:"clear-button-wrapper",class:"ml-2 flex items-center justify-center py-2"},t(e,{style:"text-transparent",part:"clear-button",class:"text-neutral-dark flex h-8 w-8 shrink-0 items-center justify-center",onClick:()=>{n?.();s?.focus()},ariaLabel:i.i18n.t("clear"),...r},t("atomic-icon",{part:"clear-icon",icon:c,class:"h-4 w-4"})));function g(t){return{autocomplete:"off",autocapitalize:"off",autocorrect:"off",...t.activeDescendant&&{"aria-activedescendant":t.activeDescendant},"aria-autocomplete":"both","aria-haspopup":"true","aria-controls":t.id}}function f(t,s){const e=t?.parentNode;if(!e){return}if(t.value==="\n"){return}e.dataset.replicatedValue=s??t.value}function d(t){const s=t?.parentNode;if(s){delete s.dataset.replicatedValue}}function p(t){const s=t?.parentNode;if(s){s.classList.remove("expanded")}}function m(t){const s=t?.parentNode;if(s){s.classList.add("expanded")}}const w=({textAreaRef:s,loading:e,bindings:i,onInput:n,onFocus:r,onBlur:o,onChange:a,onKeyDown:h,onKeyUp:u,value:c,ariaLabel:w,onClear:b,popup:v,...y})=>t("div",{class:"flex grow overflow-hidden"},t("div",{part:"textarea-expander",class:"grid grow overflow-hidden"},t("textarea",{part:"textarea","aria-label":w,placeholder:i.i18n.t("search"),class:"placeholder-neutral-dark",rows:1,onInput:t=>{n?.(t);f(s)},onKeyDown:t=>{f(s);if(t.key==="Enter"){if(t.shiftKey){return}t.preventDefault()}h?.(t)},onKeyUp:t=>{u?.(t);if(t.key==="Enter"){t.preventDefault();return}f(s)},onBlur:t=>{o?.(t);p(s);f(s)},onChange:t=>{a?.(t);f(s)},onFocus:t=>{r?.(t);const e=t.target;f(s??e);m(s??e)},autocomplete:"off",...v&&g(v),...y,value:c})),e&&t("div",{class:"searchbox-button-wrapper ml-2 flex items-center justify-center"},t("span",{part:"loading",class:"loading mr-2 grid h-5 w-5 animate-spin place-items-center rounded-full bg-linear-to-r"})),!e&&c&&t(l,{inputRef:s,bindings:i,onClick:()=>{b();d(s)}}));function b(t,s){let e;const i=new Promise(((t,i)=>{e=setTimeout((()=>{i(new Error("Promise timed out."))}),s)}));return Promise.race([t,i]).then((()=>{clearTimeout(e)}))}class v{constructor(t){this.ownerSearchBoxProps=t;this.suggestions=[];this.leftSuggestionElements=[];this.rightSuggestionElements=[];this.leftPanel=undefined;this.rightPanel=undefined;this.activeDescendant="";this.suggestedQuery="";this.keyboardActiveDescendant="";this.queryDataAttribute="data-query";this.suggestionEvents=[];this.previousActiveDescendantElement=null;this.leftSuggestions=[];this.rightSuggestions=[];this.triggerSuggestions=r((()=>this.executeQuerySuggestion()),this.ownerSearchBoxProps.getSuggestionDelay())}get partialSuggestionBindings(){return{suggestedQuery:()=>this.suggestedQuery,clearSuggestions:()=>this.clearSuggestions(),triggerSuggestions:()=>this.triggerSuggestions(),getSuggestions:()=>this.suggestions,getSuggestionElements:()=>this.allSuggestionElements}}get activeDescendantElement(){if(!this.hasActiveDescendant){return null}return this.leftPanel?.querySelector(`#${this.activeDescendant}`)||this.rightPanel?.querySelector(`#${this.activeDescendant}`)||null}onSubmit(){this.clickOnActiveElement();this.clearSuggestions()}updateActiveDescendant(t=""){this.activeDescendant=t;s(this.ownerSearchBoxProps.getHost())}updateKeyboardActiveDescendant(t=""){this.keyboardActiveDescendant=t}clickOnActiveElement(){this.activeDescendantElement?.click();this.updateActiveDescendant()}isRightPanelInFocus(){if(i(this.panelInFocus)||i(this.rightPanel)){return false}return this.panelInFocus===this.rightPanel}initializeSuggestions(t){this.suggestions=this.suggestionEvents.map((s=>s(t)))}registerSuggestionsFromEvent(t,s){t.preventDefault();t.stopPropagation();this.suggestionEvents.push(t.detail);this.suggestions.push(t.detail(s))}registerSuggestions(t){this.suggestions.push(t)}get isDoubleList(){return Boolean(this.leftSuggestionElements.length&&this.rightSuggestionElements.length)}focusPanel(t){const s=t==="left"?this.leftPanel:this.rightPanel;if(this.panelInFocus===s){return}if(s?.firstElementChild){const t=this.previousActiveDescendantElement&&s.contains(this.previousActiveDescendantElement);const e=t?this.previousActiveDescendantElement:s.firstElementChild;this.updateDescendants(e.id)}}clearSuggestions(){this.clearSuggestionElements();this.updateActiveDescendant()}async focusNextValue(){if(!this.hasSuggestions||!this.nextOrFirstValue){return}await this.focusValue(this.nextOrFirstValue)}async focusValue(t){this.updateKeyboardActiveDescendant(t.id);this.updateActiveDescendant(t.id);this.scrollActiveDescendantIntoView();await this.updateQueryFromSuggestion()}async onSuggestionMouseOver(t,s,e){const i=s==="left"?this.leftPanel:this.rightPanel;this.updateKeyboardActiveDescendant();if(this.panelInFocus===i){this.updateActiveDescendant(e)}else{this.updateDescendants(e)}if(t.query){await this.updateSuggestedQuery(t.query)}}async onSuggestionClick(t,s){if(t.query){this.clearSuggestions();await this.updateOwnerSearchboxQuery(t.query)}t.onSelect?.(s)}get hasSuggestions(){return!!this.allSuggestionElements.length}get allSuggestionElements(){return[...this.leftSuggestionElements,...this.rightSuggestionElements]}async focusPreviousValue(){if(this.firstValue===this.activeDescendantElement){this.updateKeyboardActiveDescendant();this.updateActiveDescendant();return}if(!this.hasSuggestions||!this.previousOrLastValue){return}await this.focusValue(this.previousOrLastValue)}get hasActiveDescendant(){return this.activeDescendant!==""}async executeQuerySuggestion(){this.updateActiveDescendant();const t=await Promise.allSettled(this.suggestions.map((t=>b(t.onInput?t.onInput():Promise.resolve(),this.ownerSearchBoxProps.getSuggestionTimeout()))));const s=[];t.forEach(((t,e)=>{if(t.status==="fulfilled"){s.push(this.suggestions[e])}else{this.ownerSearchBoxProps.getLogger().warn("Some query suggestions are not being shown because the promise timed out.")}}));const e=(t,e=false)=>s.filter((s=>s.panel===t||!s.panel&&e)).sort(this.sortSuggestions);this.leftSuggestions=e("left",true);this.leftSuggestionElements=this.getAndFilterLeftSuggestionElements();this.rightSuggestions=e("right");this.rightSuggestionElements=this.getSuggestionElements(this.rightSuggestions);const i=this.allSuggestionElements.find(o)?.query||"";await this.updateSuggestedQuery(i)}get lastValue(){return this.panelInFocus?.lastElementChild}get previousOrLastValue(){if(!this.hasActiveDescendant){return this.lastValue?.firstChild}const t=this.activeDescendantElement?.parentElement;return t?.previousElementSibling?.firstChild||this.firstValue?.firstChild}sortSuggestions(t,s){return t.position-s.position}get nextOrFirstValue(){if(!this.hasActiveDescendant){return this.firstValue?.firstChild}const t=this.activeDescendantElement?.parentElement;return t?.nextElementSibling?.firstChild||this.firstValue?.firstChild}get firstValue(){return this.panelInFocus?.firstElementChild}get panelInFocus(){if(this.leftPanel?.contains(this.activeDescendantElement)){return this.leftPanel}if(this.rightPanel?.contains(this.activeDescendantElement)){return this.rightPanel}return this.leftPanel||this.rightPanel}scrollActiveDescendantIntoView(){this.activeDescendantElement?.scrollIntoView({block:"nearest"})}async updateQueryFromSuggestion(){const t=this.activeDescendantElement?.getAttribute(this.queryDataAttribute);await this.updateOwnerSearchboxQuery(t||"")}async updateOwnerSearchboxQuery(t){if(t&&this.ownerSearchBoxProps.getSearchBoxValue()!==t){this.ownerSearchBoxProps.updateQuery(t);await this.updateSuggestedQuery(t)}}async updateSuggestedQuery(t){await Promise.allSettled(this.suggestions.map((s=>b(s.onSuggestedQueryChange?s.onSuggestedQueryChange(t):Promise.resolve(),this.ownerSearchBoxProps.getSuggestionTimeout()))));this.suggestedQuery=t;this.updateSuggestionElements(t);s(this.ownerSearchBoxProps.getHost())}updateSuggestionElements(t){if(!this.isPanelInFocus(this.leftPanel,t)){this.leftSuggestionElements=this.getAndFilterLeftSuggestionElements()}if(!this.isPanelInFocus(this.rightPanel,t)){this.rightSuggestionElements=this.getSuggestionElements(this.rightSuggestions)}}forceUpdate(){this.updateSuggestionElements(this.suggestedQuery);s(this.ownerSearchBoxProps.getHost())}isPanelInFocus(t,s){if(!this.activeDescendantElement){return false}if(s){const e=n.sanitize(s);return!!t?.querySelector(`[${this.queryDataAttribute}="${CSS.escape(e)}"]`)}return this.activeDescendantElement?.closest("ul")===t}getAndFilterLeftSuggestionElements(){const t=this.getSuggestionElements(this.leftSuggestions);const s=new Set;const e=t.filter((t=>{if(i(t.query)){return true}if(s.has(t.query)){return false}else{s.add(t.query);return true}}));return e}getSuggestionElements(t){const s=t.flatMap((t=>t.renderItems()));const e=this.ownerSearchBoxProps.getNumberOfSuggestionsToDisplay()+s.filter(a).length;return s.slice(0,e)}updateDescendants(t=""){const s=this.activeDescendantElement;this.previousActiveDescendantElement=s;this.updateActiveDescendant(t)}clearSuggestionElements(){this.leftSuggestionElements=[];this.rightSuggestionElements=[]}}export{v as S,h as a,w as b,u as c};
|
2
|
-
//# sourceMappingURL=p-29fd6768.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["SearchBoxWrapper","props","children","getClasses","baseClasses","focusClasses","disabled","join","h","part","class","onFocusout","TextAreaClearButton","inputRef","bindings","onClick","defaultButtonProps","Button","style","focus","ariaLabel","i18n","t","icon","ClearSlim","getPopupAttributes","autocomplete","autocapitalize","autocorrect","activeDescendant","id","syncTextWithReplica","elem","value","parent","parentNode","dataset","replicatedValue","resetReplicaText","collapseTextArea","classList","remove","expandTextArea","add","SearchTextArea","textAreaRef","loading","onInput","onFocus","onBlur","onChange","onKeyDown","onKeyUp","onClear","popup","defaultInputProps","placeholder","rows","e","key","shiftKey","preventDefault","target","promiseTimeout","prom","ms","timeout","Promise","_","reject","setTimeout","Error","race","then","clearTimeout","SuggestionManager","constructor","ownerSearchBoxProps","this","suggestions","leftSuggestionElements","rightSuggestionElements","leftPanel","undefined","rightPanel","suggestedQuery","keyboardActiveDescendant","queryDataAttribute","suggestionEvents","previousActiveDescendantElement","leftSuggestions","rightSuggestions","triggerSuggestions","debounce","executeQuerySuggestion","getSuggestionDelay","partialSuggestionBindings","clearSuggestions","getSuggestions","getSuggestionElements","allSuggestionElements","activeDescendantElement","hasActiveDescendant","querySelector","onSubmit","clickOnActiveElement","updateActiveDescendant","forceUpdate","getHost","updateKeyboardActiveDescendant","click","isRightPanelInFocus","isNullOrUndefined","panelInFocus","initializeSuggestions","map","event","registerSuggestionsFromEvent","stopPropagation","push","detail","registerSuggestions","isDoubleList","Boolean","length","focusPanel","side","panel","firstElementChild","panelHasActiveDescendant","contains","newValue","updateDescendants","clearSuggestionElements","focusNextValue","hasSuggestions","nextOrFirstValue","focusValue","scrollActiveDescendantIntoView","updateQueryFromSuggestion","onSuggestionMouseOver","item","thisPanel","query","updateSuggestedQuery","onSuggestionClick","updateOwnerSearchboxQuery","onSelect","focusPreviousValue","firstValue","previousOrLastValue","settled","allSettled","suggestion","resolve","getSuggestionTimeout","fulfilledSuggestions","forEach","j","status","getLogger","warn","splitSuggestions","isDefault","filter","sort","sortSuggestions","getAndFilterLeftSuggestionElements","defaultSuggestedQuery","find","elementHasQuery","lastValue","lastElementChild","firstChild","parentOfActiveDescendant","parentElement","previousElementSibling","a","b","position","nextElementSibling","scrollIntoView","block","getAttribute","getSearchBoxValue","updateQuery","onSuggestedQueryChange","updateSuggestionElements","isPanelInFocus","escaped","DOMPurify","sanitize","CSS","escape","closest","suggestionElements","filterOnDuplicate","Set","out","suggestionElement","has","elements","flatMap","renderItems","max","getNumberOfSuggestionsToDisplay","elementHasNoQuery","slice","newPrevDescendantElement"],"sources":["src/components/common/search-box/stencil-search-box-wrapper.tsx","src/components/common/search-box/stencil-text-area-clear-button.tsx","src/components/common/search-box/stencil-search-text-area.tsx","src/utils/promise-utils.ts","src/components/common/suggestions/stencil-suggestion-manager.ts"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\n\ninterface Props {\n disabled: boolean;\n onFocusout?: (event: FocusEvent) => void;\n}\n\nexport const SearchBoxWrapper: FunctionalComponent<Props> = (\n props,\n children\n) => {\n const getClasses = () => {\n const baseClasses =\n 'flex bg-background w-full border border-neutral rounded-md focus-within:ring-3 absolute top-0 left-0';\n const focusClasses = props.disabled\n ? 'focus-within:border-disabled focus-within:ring-neutral'\n : 'focus-within:border-primary focus-within:ring-ring-primary';\n\n return [baseClasses, focusClasses].join(' ');\n };\n\n return (\n <div part=\"wrapper\" class={getClasses()} onFocusout={props.onFocusout}>\n {children}\n </div>\n );\n};\n","import {FunctionalComponent, h} from '@stencil/core';\nimport ClearSlim from '../../../images/clear-slim.svg';\nimport {AnyBindings} from '../interface/bindings';\nimport {Button, StencilButtonProps} from '../stencil-button';\n\ninterface Props extends Partial<StencilButtonProps> {\n bindings: AnyBindings;\n inputRef: HTMLInputElement | HTMLTextAreaElement | null;\n}\n\nexport const TextAreaClearButton: FunctionalComponent<Props> = ({\n inputRef,\n bindings,\n onClick,\n ...defaultButtonProps\n}) => (\n <div\n part=\"clear-button-wrapper\"\n class=\"ml-2 flex items-center justify-center py-2\"\n >\n <Button\n style=\"text-transparent\"\n part=\"clear-button\"\n class=\"text-neutral-dark flex h-8 w-8 shrink-0 items-center justify-center\"\n onClick={() => {\n onClick?.();\n inputRef?.focus();\n }}\n ariaLabel={bindings.i18n.t('clear')}\n {...defaultButtonProps}\n >\n <atomic-icon\n part=\"clear-icon\"\n icon={ClearSlim}\n class=\"h-4 w-4\"\n ></atomic-icon>\n </Button>\n </div>\n);\n","import {FunctionalComponent, h} from '@stencil/core';\nimport {JSXBase} from '@stencil/core/internal';\nimport {AnyBindings} from '../interface/bindings';\nimport {TextAreaClearButton} from './stencil-text-area-clear-button';\n\ninterface Props extends JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement> {\n textAreaRef: HTMLTextAreaElement;\n loading: boolean;\n bindings: AnyBindings;\n value: string;\n ariaLabel: string;\n onClear(): void;\n popup?: {\n id: string;\n activeDescendant: string;\n expanded: boolean;\n hasSuggestions: boolean;\n };\n}\n\nfunction getPopupAttributes(props: Required<Props>['popup']) {\n return {\n autocomplete: 'off',\n autocapitalize: 'off',\n autocorrect: 'off',\n ...(props.activeDescendant && {\n 'aria-activedescendant': props.activeDescendant,\n }),\n 'aria-autocomplete': 'both',\n 'aria-haspopup': 'true',\n 'aria-controls': props.id,\n };\n}\n\nfunction syncTextWithReplica(elem: HTMLTextAreaElement, value?: string) {\n const parent = elem?.parentNode as HTMLElement;\n if (!parent) {\n return;\n }\n if (elem.value === '\\n') {\n return;\n }\n parent.dataset.replicatedValue = value ?? elem.value;\n}\n\nfunction resetReplicaText(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n delete parent.dataset.replicatedValue;\n }\n}\n\nfunction collapseTextArea(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n parent.classList.remove('expanded');\n }\n}\n\nfunction expandTextArea(elem: HTMLTextAreaElement) {\n const parent = elem?.parentNode as HTMLElement;\n if (parent) {\n parent.classList.add('expanded');\n }\n}\n\nexport const SearchTextArea: FunctionalComponent<Props> = ({\n textAreaRef,\n loading,\n bindings,\n onInput,\n onFocus,\n onBlur,\n onChange,\n onKeyDown,\n onKeyUp,\n value,\n ariaLabel,\n onClear,\n popup,\n ...defaultInputProps\n}) => (\n <div class=\"flex grow overflow-hidden\">\n <div part=\"textarea-expander\" class=\"grid grow overflow-hidden\">\n <textarea\n part=\"textarea\"\n aria-label={ariaLabel}\n placeholder={bindings.i18n.t('search')}\n class=\"placeholder-neutral-dark\"\n rows={1}\n onInput={(e) => {\n onInput?.(e);\n syncTextWithReplica(textAreaRef);\n }}\n onKeyDown={(e) => {\n syncTextWithReplica(textAreaRef);\n if (e.key === 'Enter') {\n if (e.shiftKey) {\n return;\n }\n e.preventDefault();\n }\n onKeyDown?.(e);\n }}\n onKeyUp={(e) => {\n onKeyUp?.(e);\n if (e.key === 'Enter') {\n e.preventDefault();\n return;\n }\n syncTextWithReplica(textAreaRef);\n }}\n onBlur={(e) => {\n onBlur?.(e);\n collapseTextArea(textAreaRef);\n syncTextWithReplica(textAreaRef);\n }}\n onChange={(e) => {\n onChange?.(e);\n syncTextWithReplica(textAreaRef);\n }}\n onFocus={(e) => {\n onFocus?.(e);\n const target = e.target as HTMLTextAreaElement;\n syncTextWithReplica(textAreaRef ?? target);\n expandTextArea(textAreaRef ?? target);\n }}\n autocomplete=\"off\"\n {...(popup && getPopupAttributes(popup))}\n {...defaultInputProps}\n value={value}\n />\n </div>\n\n {loading && (\n <div class=\"searchbox-button-wrapper ml-2 flex items-center justify-center\">\n <span\n part=\"loading\"\n class=\"loading mr-2 grid h-5 w-5 animate-spin place-items-center rounded-full bg-linear-to-r\"\n ></span>\n </div>\n )}\n {!loading && value && (\n <TextAreaClearButton\n inputRef={textAreaRef}\n bindings={bindings}\n onClick={() => {\n onClear();\n resetReplicaText(textAreaRef);\n }}\n />\n )}\n </div>\n);\n","export function promiseTimeout<T>(prom: T | Promise<T>, ms: number) {\n let id: NodeJS.Timeout;\n const timeout = new Promise((_, reject) => {\n id = setTimeout(() => {\n reject(new Error('Promise timed out.'));\n }, ms);\n });\n return Promise.race([prom, timeout]).then(() => {\n clearTimeout(id);\n });\n}\n","import {isNullOrUndefined} from '@coveo/bueno';\nimport {forceUpdate} from '@stencil/core';\nimport DOMPurify from 'dompurify';\nimport {debounce} from '../../../utils/debounce-utils';\nimport {promiseTimeout} from '../../../utils/promise-utils';\nimport {\n elementHasNoQuery,\n elementHasQuery,\n type SearchBoxSuggestionElement,\n type SearchBoxSuggestionsBindings,\n type SearchBoxSuggestionsEvent,\n} from './suggestions-common';\n\n/**\n * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.\n */\nexport interface SearchBoxSuggestions {\n /**\n * The search box will sort the position of suggestions using this value, the lowest value being first.\n * By default, the DOM position will be used.\n */\n position: number;\n /**\n * Whether the suggestions should be listed in the right or left panel. By default, the suggestions are listed in the right panel.\n */\n panel?: 'left' | 'right';\n /**\n * Method that returns the list of elements which will be rendered in the list of suggestions.\n */\n renderItems(): SearchBoxSuggestionElement[];\n /**\n * Hook called when the user changes the search box's input value. This can lead to all the query suggestions being updated.\n */\n onInput?(): Promise<unknown>;\n /**\n * Hook called when the current suggested query changes as the user navigates the list of suggestions.\n * This is used for instant results, which are rendered based on the current suggested query.\n * @param q The new current suggested query.\n */\n onSuggestedQueryChange?(q: string): Promise<unknown>;\n}\n\ninterface SearchBoxProps {\n getSearchBoxValue: () => string;\n updateQuery: (suggestedQuery: string) => void;\n getSuggestionTimeout: () => number;\n getNumberOfSuggestionsToDisplay: () => number;\n getSuggestionDelay: () => number;\n getLogger: () => Pick<typeof console, 'warn'>;\n getHost: () => HTMLElement;\n}\n\nexport class SuggestionManager<SearchBoxController> {\n public suggestions: SearchBoxSuggestions[] = [];\n public leftSuggestionElements: SearchBoxSuggestionElement[] = [];\n public rightSuggestionElements: SearchBoxSuggestionElement[] = [];\n public leftPanel: HTMLElement | undefined = undefined;\n public rightPanel: HTMLElement | undefined = undefined;\n public triggerSuggestions: () => Promise<void>;\n public activeDescendant = '';\n public suggestedQuery = '';\n public keyboardActiveDescendant = '';\n\n private queryDataAttribute = 'data-query';\n private suggestionEvents: SearchBoxSuggestionsEvent<SearchBoxController>[] =\n [];\n\n private previousActiveDescendantElement: HTMLElement | null = null;\n private leftSuggestions: SearchBoxSuggestions[] = [];\n private rightSuggestions: SearchBoxSuggestions[] = [];\n\n constructor(private ownerSearchBoxProps: SearchBoxProps) {\n this.triggerSuggestions = debounce(\n () => this.executeQuerySuggestion(),\n this.ownerSearchBoxProps.getSuggestionDelay()\n );\n }\n\n public get partialSuggestionBindings(): Pick<\n SearchBoxSuggestionsBindings<SearchBoxController>,\n | 'suggestedQuery'\n | 'clearSuggestions'\n | 'triggerSuggestions'\n | 'getSuggestions'\n | 'getSuggestionElements'\n > {\n return {\n suggestedQuery: () => this.suggestedQuery,\n clearSuggestions: () => this.clearSuggestions(),\n triggerSuggestions: () => this.triggerSuggestions(),\n getSuggestions: () => this.suggestions,\n getSuggestionElements: () => this.allSuggestionElements,\n };\n }\n\n public get activeDescendantElement(): HTMLElement | null {\n if (!this.hasActiveDescendant) {\n return null;\n }\n\n return (\n this.leftPanel?.querySelector(`#${this.activeDescendant}`) ||\n this.rightPanel?.querySelector(`#${this.activeDescendant}`) ||\n null\n );\n }\n\n public onSubmit() {\n this.clickOnActiveElement();\n this.clearSuggestions();\n }\n\n public updateActiveDescendant(id = '') {\n this.activeDescendant = id;\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n public updateKeyboardActiveDescendant(id = '') {\n this.keyboardActiveDescendant = id;\n }\n\n public clickOnActiveElement() {\n this.activeDescendantElement?.click();\n this.updateActiveDescendant();\n }\n\n public isRightPanelInFocus() {\n if (\n isNullOrUndefined(this.panelInFocus) ||\n isNullOrUndefined(this.rightPanel)\n ) {\n return false;\n }\n\n return this.panelInFocus === this.rightPanel;\n }\n\n public initializeSuggestions(\n bindings: SearchBoxSuggestionsBindings<SearchBoxController>\n ) {\n this.suggestions = this.suggestionEvents.map((event) => event(bindings));\n }\n\n public registerSuggestionsFromEvent(\n event: CustomEvent<SearchBoxSuggestionsEvent<SearchBoxController>>,\n bindings: SearchBoxSuggestionsBindings<SearchBoxController>\n ) {\n event.preventDefault();\n event.stopPropagation();\n this.suggestionEvents.push(event.detail);\n this.suggestions.push(event.detail(bindings));\n }\n\n public registerSuggestions(suggestions: SearchBoxSuggestions) {\n this.suggestions.push(suggestions);\n }\n\n public get isDoubleList() {\n return Boolean(\n this.leftSuggestionElements.length && this.rightSuggestionElements.length\n );\n }\n\n public focusPanel(side: 'left' | 'right') {\n const panel = side === 'left' ? this.leftPanel : this.rightPanel;\n\n if (this.panelInFocus === panel) {\n return;\n }\n if (panel?.firstElementChild) {\n const panelHasActiveDescendant =\n this.previousActiveDescendantElement &&\n panel.contains(this.previousActiveDescendantElement);\n const newValue = panelHasActiveDescendant\n ? this.previousActiveDescendantElement!\n : (panel.firstElementChild as HTMLElement);\n this.updateDescendants(newValue.id);\n }\n }\n\n public clearSuggestions() {\n this.clearSuggestionElements();\n this.updateActiveDescendant();\n }\n\n public async focusNextValue() {\n if (!this.hasSuggestions || !this.nextOrFirstValue) {\n return;\n }\n\n await this.focusValue(this.nextOrFirstValue as HTMLElement);\n }\n\n public async focusValue(value: HTMLElement) {\n this.updateKeyboardActiveDescendant(value.id);\n this.updateActiveDescendant(value.id);\n this.scrollActiveDescendantIntoView();\n await this.updateQueryFromSuggestion();\n }\n\n public async onSuggestionMouseOver(\n item: SearchBoxSuggestionElement,\n side: 'left' | 'right',\n id: string\n ) {\n const thisPanel = side === 'left' ? this.leftPanel : this.rightPanel;\n // When hovering, always reset the keyboard active descendant\n this.updateKeyboardActiveDescendant();\n if (this.panelInFocus === thisPanel) {\n this.updateActiveDescendant(id);\n } else {\n this.updateDescendants(id);\n }\n if (item.query) {\n await this.updateSuggestedQuery(item.query);\n }\n }\n\n public async onSuggestionClick(item: SearchBoxSuggestionElement, e: Event) {\n if (item.query) {\n this.clearSuggestions();\n await this.updateOwnerSearchboxQuery(item.query);\n }\n item.onSelect?.(e);\n }\n\n public get hasSuggestions() {\n return !!this.allSuggestionElements.length;\n }\n\n public get allSuggestionElements() {\n return [...this.leftSuggestionElements, ...this.rightSuggestionElements];\n }\n\n public async focusPreviousValue() {\n if (this.firstValue === this.activeDescendantElement) {\n this.updateKeyboardActiveDescendant();\n this.updateActiveDescendant();\n return;\n }\n\n if (!this.hasSuggestions || !this.previousOrLastValue) {\n return;\n }\n\n await this.focusValue(this.previousOrLastValue as HTMLElement);\n }\n\n public get hasActiveDescendant() {\n return this.activeDescendant !== '';\n }\n\n private async executeQuerySuggestion() {\n this.updateActiveDescendant();\n const settled = await Promise.allSettled(\n this.suggestions.map((suggestion) =>\n promiseTimeout(\n suggestion.onInput ? suggestion.onInput() : Promise.resolve(),\n this.ownerSearchBoxProps.getSuggestionTimeout()\n )\n )\n );\n\n const fulfilledSuggestions: SearchBoxSuggestions[] = [];\n\n settled.forEach((prom, j) => {\n if (prom.status === 'fulfilled') {\n fulfilledSuggestions.push(this.suggestions[j]);\n } else {\n this.ownerSearchBoxProps\n .getLogger()\n .warn(\n 'Some query suggestions are not being shown because the promise timed out.'\n );\n }\n });\n\n const splitSuggestions = (side: 'left' | 'right', isDefault = false) =>\n fulfilledSuggestions\n .filter(\n (suggestion) =>\n suggestion.panel === side || (!suggestion.panel && isDefault)\n )\n .sort(this.sortSuggestions);\n\n this.leftSuggestions = splitSuggestions('left', true);\n this.leftSuggestionElements = this.getAndFilterLeftSuggestionElements();\n\n this.rightSuggestions = splitSuggestions('right');\n this.rightSuggestionElements = this.getSuggestionElements(\n this.rightSuggestions\n );\n\n const defaultSuggestedQuery =\n this.allSuggestionElements.find(elementHasQuery)?.query || '';\n\n await this.updateSuggestedQuery(defaultSuggestedQuery);\n }\n\n private get lastValue() {\n return this.panelInFocus?.lastElementChild;\n }\n\n private get previousOrLastValue() {\n if (!this.hasActiveDescendant) {\n return this.lastValue?.firstChild;\n }\n\n const parentOfActiveDescendant =\n this.activeDescendantElement?.parentElement;\n return (\n parentOfActiveDescendant?.previousElementSibling?.firstChild ||\n this.firstValue?.firstChild\n );\n }\n\n private sortSuggestions(a: SearchBoxSuggestions, b: SearchBoxSuggestions) {\n return a.position - b.position;\n }\n\n private get nextOrFirstValue() {\n if (!this.hasActiveDescendant) {\n return this.firstValue?.firstChild;\n }\n\n const parentOfActiveDescendant =\n this.activeDescendantElement?.parentElement;\n return (\n parentOfActiveDescendant?.nextElementSibling?.firstChild ||\n this.firstValue?.firstChild\n );\n }\n\n private get firstValue() {\n return this.panelInFocus?.firstElementChild;\n }\n\n private get panelInFocus() {\n if (this.leftPanel?.contains(this.activeDescendantElement)) {\n return this.leftPanel;\n }\n if (this.rightPanel?.contains(this.activeDescendantElement)) {\n return this.rightPanel;\n }\n return this.leftPanel || this.rightPanel;\n }\n\n private scrollActiveDescendantIntoView() {\n this.activeDescendantElement?.scrollIntoView({\n block: 'nearest',\n });\n }\n\n private async updateQueryFromSuggestion() {\n const suggestedQuery = this.activeDescendantElement?.getAttribute(\n this.queryDataAttribute\n );\n await this.updateOwnerSearchboxQuery(suggestedQuery || '');\n }\n\n private async updateOwnerSearchboxQuery(query: string) {\n if (query && this.ownerSearchBoxProps.getSearchBoxValue() !== query) {\n this.ownerSearchBoxProps.updateQuery(query);\n await this.updateSuggestedQuery(query);\n }\n }\n\n private async updateSuggestedQuery(suggestedQuery: string) {\n await Promise.allSettled(\n this.suggestions.map((suggestion) =>\n promiseTimeout(\n suggestion.onSuggestedQueryChange\n ? suggestion.onSuggestedQueryChange(suggestedQuery)\n : Promise.resolve(),\n this.ownerSearchBoxProps.getSuggestionTimeout()\n )\n )\n );\n this.suggestedQuery = suggestedQuery;\n this.updateSuggestionElements(suggestedQuery);\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n private updateSuggestionElements(query: string) {\n if (!this.isPanelInFocus(this.leftPanel, query)) {\n this.leftSuggestionElements = this.getAndFilterLeftSuggestionElements();\n }\n\n if (!this.isPanelInFocus(this.rightPanel, query)) {\n this.rightSuggestionElements = this.getSuggestionElements(\n this.rightSuggestions\n );\n }\n }\n\n public forceUpdate() {\n this.updateSuggestionElements(this.suggestedQuery);\n forceUpdate(this.ownerSearchBoxProps.getHost());\n }\n\n private isPanelInFocus(\n panel: HTMLElement | undefined,\n query: string\n ): boolean {\n if (!this.activeDescendantElement) {\n return false;\n }\n\n if (query) {\n const escaped = DOMPurify.sanitize(query);\n return !!panel?.querySelector(\n `[${this.queryDataAttribute}=\"${CSS.escape(escaped)}\"]`\n );\n }\n\n return this.activeDescendantElement?.closest('ul') === panel;\n }\n\n private getAndFilterLeftSuggestionElements() {\n const suggestionElements = this.getSuggestionElements(this.leftSuggestions);\n const filterOnDuplicate = new Set();\n\n const out = suggestionElements.filter((suggestionElement) => {\n if (isNullOrUndefined(suggestionElement.query)) {\n return true;\n }\n if (filterOnDuplicate.has(suggestionElement.query)) {\n return false;\n } else {\n filterOnDuplicate.add(suggestionElement.query);\n return true;\n }\n });\n\n return out;\n }\n\n private getSuggestionElements(suggestions: SearchBoxSuggestions[]) {\n const elements = suggestions.flatMap((suggestion) =>\n suggestion.renderItems()\n );\n\n const max =\n this.ownerSearchBoxProps.getNumberOfSuggestionsToDisplay() +\n elements.filter(elementHasNoQuery).length;\n\n return elements.slice(0, max);\n }\n\n private updateDescendants(activeDescendant = '') {\n const newPrevDescendantElement = this.activeDescendantElement;\n this.previousActiveDescendantElement = newPrevDescendantElement;\n this.updateActiveDescendant(activeDescendant);\n }\n\n private clearSuggestionElements() {\n this.leftSuggestionElements = [];\n this.rightSuggestionElements = [];\n }\n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AAMmL,EAA2BlI,KAAKuB,wBACtCvB,KAAKW,gCAAkCuH,EACvClI,KAAK4B,uBAAuB7E,E,CAGtB,uBAAAwG,GACNvD,KAAKE,uBAAyB,GAC9BF,KAAKG,wBAA0B,E","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["SubmitButton","bindings","disabled","onClick","h","part","class","Button","style","ariaLabel","i18n","t","icon","SearchSlimIcon","atomicSearchBoxCss","AtomicSearchBoxStyle0","AtomicSearchBox","this","searchBoxSuggestionEventsQueue","isExpanded","numberOfQueries","suggestionTimeout","suggestionDelay","disableSearch","minimumQueryLength","clearFilters","enableQuerySyntax","disconnectedCallback","updateBreakpoints","once","host","renderTextBox","searchLabel","props","loading","searchBoxState","isLoading","value","title","onFocus","onInput","e","target","onKeyDown","onClear","searchBox","clear","suggestionManager","clearSuggestions","popup","id","activeDescendant","expanded","hasSuggestions","SearchTextArea","textAreaRef","ref","el","triggerTextAreaChange","isStandaloneSearchBox","initialize","randomID","initializeSearchboxController","initializeSuggestionManager","updateRedirectionUrl","redirectionUrl","updateRedirectUrl","registerNewSearchBoxController","buildStandaloneSearchBox","engine","options","searchBoxOptions","overwrite","buildSearchBox","componentWillUpdate","redirectTo","analytics","data","storage","SafeStorage","setJSON","StorageItems","STANDALONE_SEARCH_BOX_DATA","afterRedirection","event","redirect","emit","defaultPrevented","window","location","href","registerSuggestions","push","registerSuggestionsFromEvent","suggestionBindings","registerSearchboxSuggestionEvents","forEach","evt","watchRedirectionUrl","SuggestionManager","getNumberOfSuggestionsToDisplay","updateQuery","query","updateText","getSearchBoxValue","getSuggestionTimeout","getSuggestionDelay","getHost","getLogger","logger","initializeSuggestions","spreadProperties","partialSuggestionBindings","Object","defineProperties","get","enumerable","searchBoxController","isStandalone","numberOfSuggestions","highlightOptions","notMatchDelimiters","open","close","correctionDelimiters","isSearchDisabledForEndUser","triggerSuggestions","announceNewSuggestionsToScreenReader","onSubmit","keyboardActiveDescendant","submit","key","preventDefault","focusNextValue","announceNewActiveSuggestionToScreenReader","focusPreviousValue","hasActiveDescendant","state","focusPanel","updateKeyboardActiveDescendant","dispatchEvent","Event","renderSuggestion","item","index","lastIndex","side","isSelected","hideIfLast","suggestion","isDoubleList","onSuggestionClick","onMouseOver","onSuggestionMouseOver","renderPanel","elements","setRef","getRef","length","onMouseDown","map","shouldShowSuggestions","renderSuggestions","role","leftSuggestionElements","leftPanel","rightSuggestionElements","rightPanel","renderAbsolutePositionSpacer","rows","queryValue","isNullOrUndefined","trim","getSearchInputLabel","isMacOS","hasKeyboard","activeDescendantElement","suggestionsAriaMessage","elsLength","allSuggestionElements","filter","elementHasQuery","searchBoxAriaMessage","count","render","isDisabled","suggestions","Host","SearchBoxWrapper","onFocusout","isFocusingOut","__decorate","InitializeBindings","BindStateToController","AriaLiveRegion"],"sources":["src/components/common/search-box/stencil-submit-button.tsx","src/components/search/atomic-search-box/atomic-search-box.pcss?tag=atomic-search-box&encapsulation=shadow","src/components/search/atomic-search-box/atomic-search-box.tsx"],"sourcesContent":["import {FunctionalComponent, h} from '@stencil/core';\nimport SearchSlimIcon from '../../../images/search-slim.svg';\nimport {AnyBindings} from '../interface/bindings';\nimport {Button} from '../stencil-button';\n\ninterface Props {\n bindings: AnyBindings;\n disabled: boolean;\n onClick: () => void;\n}\n\nexport const SubmitButton: FunctionalComponent<Props> = ({\n bindings,\n disabled,\n onClick,\n}) => (\n <div\n part=\"submit-button-wrapper\"\n class=\"mr-2 flex items-center justify-center py-2\"\n >\n <Button\n style=\"text-primary\"\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-full\"\n part=\"submit-button\"\n ariaLabel={bindings.i18n.t('search')}\n onClick={() => {\n onClick?.();\n }}\n disabled={disabled}\n >\n <atomic-icon\n part=\"submit-icon\"\n icon={SearchSlimIcon}\n class=\"h-4 w-4\"\n ></atomic-icon>\n </Button>\n </div>\n);\n","@import '../../../global/global.pcss';\n@import '../../common/search-box/search-box.pcss';\n\n[part~='instant-results-item'] {\n @apply p-3;\n}\n\n[part~='instant-results-show-all'] {\n @apply border-t-neutral justify-center border-t py-1;\n margin-top: auto;\n box-sizing: content-box;\n button {\n background-color: transparent;\n }\n}\n\n[part~='suggestions-left'] + [part~='suggestions-right'] {\n @apply border-l-neutral border-l;\n}\n\n[part~='suggestions-wrapper'] {\n flex-direction: column;\n @media (width >= theme(--breakpoint-desktop)) {\n flex-direction: row;\n }\n}\n\n:host {\n @apply relative z-10;\n}\n","import {isNullOrUndefined} from '@coveo/bueno';\nimport {\n SearchBox,\n SearchBoxState,\n buildSearchBox,\n StandaloneSearchBox,\n StandaloneSearchBoxState,\n buildStandaloneSearchBox,\n SearchBoxOptions,\n} from '@coveo/headless';\nimport {\n Component,\n h,\n State,\n Prop,\n Listen,\n Watch,\n Element,\n Event,\n EventEmitter,\n Host,\n} from '@stencil/core';\nimport {hasKeyboard, isMacOS} from '../../../utils/device-utils';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {\n SafeStorage,\n StandaloneSearchBoxData,\n StorageItems,\n} from '../../../utils/local-storage-utils';\nimport {updateBreakpoints} from '../../../utils/replace-breakpoint-utils';\nimport {AriaLiveRegion} from '../../../utils/stencil-accessibility-utils';\nimport {\n isFocusingOut,\n once,\n randomID,\n spreadProperties,\n} from '../../../utils/utils';\nimport {RedirectionPayload} from '../../common/search-box/redirection-payload';\nimport {SearchBoxWrapper} from '../../common/search-box/stencil-search-box-wrapper';\nimport {SearchTextArea} from '../../common/search-box/stencil-search-text-area';\nimport {SubmitButton} from '../../common/search-box/stencil-submit-button';\nimport {SuggestionManager} from '../../common/suggestions/stencil-suggestion-manager';\nimport {\n SearchBoxSuggestionElement,\n SearchBoxSuggestionsBindings,\n SearchBoxSuggestionsEvent,\n elementHasQuery,\n} from '../../common/suggestions/suggestions-common';\nimport {Bindings} from '../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-search-box` component creates a search box with built-in support for suggestions.\n *\n * @slot default - The default slot where you can add child components to the search box.\n *\n * @part wrapper - The search box wrapper.\n * @part input - The search box input.\n * @part loading - The search box loading animation.\n * @part clear-button - The button to clear the search box of input.\n * @part clear-icon - The clear button's icon.\n * @part submit-button - The search box submit button.\n * @part submit-icon - The search box submit button's icon.\n * @part suggestions - A list of suggested query corrections on each panel.\n * @part suggestions-left - A list of suggested query corrections on the left panel.\n * @part suggestions-right - A list of suggested query corrections on the right panel.\n * @part suggestions-wrapper - The wrapper that contains suggestion panels.\n * @part suggestions-single-list - The wrapper that contains 1 suggestion list.\n * @part suggestions-double-list - The wrapper that contains 2 suggestion lists.\n * @part suggestion - A suggested query correction.\n * @part active-suggestion - The currently active suggestion.\n * @part suggestion-divider - An item in the list that separates groups of suggestions.\n * @part suggestion-with-query - An item in the list that will update the search box query.\n *\n * @part query-suggestion-item - A suggestion from the `atomic-search-box-query-suggestions` component.\n * @part query-suggestion-content - The contents of a suggestion from the `atomic-search-box-query-suggestions` component.\n * @part query-suggestion-icon - The icon of a suggestion from the `atomic-search-box-query-suggestions` component.\n * @part query-suggestion-text - The text of a suggestion from the `atomic-search-box-query-suggestions` component.\n *\n * @part recent-query-item - A suggestion from the `atomic-search-box-recent-queries` component.\n * @part recent-query-content - The contents of a suggestion from the `atomic-search-box-recent-queries` component.\n * @part recent-query-icon - The icon of a suggestion from the `atomic-search-box-recent-queries` component.\n * @part recent-query-text - The text of a suggestion from the `atomic-search-box-recent-queries` component.\n * @part recent-query-text-highlight - The highlighted portion of the text of a suggestion from the `atomic-search-box-recent-queries` component.\n * @part recent-query-title-item - The clear button above suggestions from the `atomic-search-box-recent-queries` component.\n * @part recent-query-title-content - The contents of the clear button above suggestions from the `atomic-search-box-recent-queries` component.\n * @part recent-query-title - The \"recent searches\" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.\n * @part recent-query-clear - The \"clear\" text of the clear button above suggestions from the `atomic-search-box-recent-queries` component.\n *\n * @part instant-results-item - An instant result rendered by an `atomic-search-box-instant-results` component.\n * @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.\n * @part instant-results-show-all-button - The button inside the clickable suggestion from the `atomic-search-box-instant-results` component.\n */\n@Component({\n tag: 'atomic-search-box',\n styleUrl: 'atomic-search-box.pcss',\n shadow: true,\n})\nexport class AtomicSearchBox implements InitializableComponent<Bindings> {\n @InitializeBindings() public bindings!: Bindings;\n private searchBox!: SearchBox | StandaloneSearchBox;\n private searchBoxSuggestionEventsQueue: CustomEvent<\n SearchBoxSuggestionsEvent<SearchBox | StandaloneSearchBox>\n >[] = [];\n private id!: string;\n private textAreaRef!: HTMLTextAreaElement;\n private suggestionManager!: SuggestionManager<\n SearchBox | StandaloneSearchBox\n >;\n\n @Element() private host!: HTMLElement;\n\n @BindStateToController('searchBox')\n @State()\n private searchBoxState!: SearchBoxState | StandaloneSearchBoxState;\n @State() public error!: Error;\n @State() private isExpanded = false;\n\n /**\n * The amount of queries displayed when the user interacts with the search box.\n * By default, a mix of query suggestions and recent queries will be shown.\n * You can configure those settings using the following components as children:\n * - atomic-search-box-query-suggestions\n * - atomic-search-box-recent-queries\n */\n @Prop({reflect: true}) public numberOfQueries = 8;\n\n /**\n * Defining this option makes the search box standalone (see [Use a\n * Standalone Search Box](https://docs.coveo.com/en/atomic/latest/usage/ssb/)).\n *\n * This option defines the default URL the user should be redirected to, when a query is submitted.\n * If a query pipeline redirect is triggered, it will redirect to that URL instead\n * (see [query pipeline triggers](https://docs.coveo.com/en/1458)).\n */\n @Prop({reflect: true}) public redirectionUrl?: string;\n\n /**\n * The timeout for suggestion queries, in milliseconds.\n * If a suggestion query times out, the suggestions from that particular query won't be shown.\n */\n @Prop() public suggestionTimeout = 400;\n\n /**\n * The delay for suggestion queries on input, in milliseconds.\n *\n * The suggestion request will be delayed until the end user stops typing for at least the specified amount of time.\n *\n * This delay is used to avoid sending too many requests to the Coveo Platform when the user is typing, as well as reducing potential input lag on low end devices.\n * A higher delay will reduce input lag, at the cost of suggestions freshness.\n */\n @Prop() public suggestionDelay = 0;\n\n /**\n * Whether to prevent the user from triggering searches and query suggestions from the component.\n * Perfect for use cases where you need to disable the search conditionally.\n * For the specific case when you need to disable the search based on the length of the query, refer to {@link minimumQueryLength}.\n */\n @Prop({reflect: true}) public disableSearch = false;\n\n /**\n * The minimum query length required to enable search.\n * For example, to disable the search for empty queries, set this to `1`.\n */\n @Prop({reflect: true}) public minimumQueryLength = 0;\n\n /**\n * Whether to clear all active query filters when the end user submits a new query from the search box.\n * Setting this option to \"false\" is not recommended & can lead to an increasing number of queries returning no results.\n */\n @Prop({reflect: true}) public clearFilters = true;\n\n /**\n * Whether to interpret advanced [Coveo Cloud query syntax](https://docs.coveo.com/en/1814/) in the query.\n * You should only enable query syntax in the search box if you have good reasons to do so, as it\n * requires end users to be familiar with Coveo Cloud query syntax, otherwise they will likely be surprised\n * by the search box behaviour.\n *\n * 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.\n */\n @Prop({reflect: true}) public enableQuerySyntax = false;\n\n /**\n * 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.\n *\n * Example:\n * ```html\n * <script>\n * document.querySelector('atomic-search-box').addEventListener((e) => {\n * e.preventDefault();\n * // handle redirection\n * });\n * </script>\n * ...\n * <atomic-search-box redirection-url=\"/search\"></atomic-search-box>\n * ```\n */\n @Event({\n eventName: 'redirect',\n })\n public redirect!: EventEmitter<RedirectionPayload>;\n\n @AriaLiveRegion('search-box')\n protected searchBoxAriaMessage!: string;\n\n @AriaLiveRegion('search-suggestions', true)\n protected suggestionsAriaMessage!: string;\n\n private isStandaloneSearchBox(\n searchBox: SearchBox | StandaloneSearchBox\n ): searchBox is StandaloneSearchBox {\n return 'redirectTo' in searchBox;\n }\n\n public initialize() {\n this.id ||= randomID('atomic-search-box-');\n\n this.initializeSearchboxController();\n this.initializeSuggestionManager();\n }\n\n private updateRedirectionUrl() {\n if (this.isStandaloneSearchBox(this.searchBox) && this.redirectionUrl) {\n this.searchBox.updateRedirectUrl(this.redirectionUrl);\n } else {\n this.registerNewSearchBoxController();\n }\n }\n\n private registerNewSearchBoxController() {\n this.disconnectedCallback();\n this.initialize();\n }\n\n private initializeSearchboxController() {\n this.searchBox = this.redirectionUrl\n ? buildStandaloneSearchBox(this.bindings.engine, {\n options: {\n ...this.searchBoxOptions,\n redirectionUrl: this.redirectionUrl,\n overwrite: true,\n },\n })\n : buildSearchBox(this.bindings.engine, {\n options: this.searchBoxOptions,\n });\n }\n\n public componentWillUpdate() {\n if (\n !('redirectTo' in this.searchBoxState) ||\n !('afterRedirection' in this.searchBox)\n ) {\n return;\n }\n\n const {redirectTo, value, analytics} = this.searchBoxState;\n\n if (redirectTo === '') {\n return;\n }\n const data: StandaloneSearchBoxData = {\n value,\n enableQuerySyntax: this.enableQuerySyntax,\n analytics,\n };\n const storage = new SafeStorage();\n storage.setJSON(StorageItems.STANDALONE_SEARCH_BOX_DATA, data);\n\n this.searchBox.afterRedirection();\n const event = this.redirect.emit({redirectTo, value});\n if (!event.defaultPrevented) {\n window.location.href = redirectTo;\n }\n }\n\n public disconnectedCallback = () => {};\n\n @Listen('atomic/searchBoxSuggestion/register')\n public registerSuggestions(\n event: CustomEvent<\n SearchBoxSuggestionsEvent<SearchBox | StandaloneSearchBox>\n >\n ) {\n if (!this.bindings) {\n this.searchBoxSuggestionEventsQueue.push(event);\n } else {\n this.suggestionManager.registerSuggestionsFromEvent(\n event,\n this.suggestionBindings\n );\n }\n }\n\n private registerSearchboxSuggestionEvents() {\n this.searchBoxSuggestionEventsQueue.forEach((evt) => {\n this.suggestionManager.registerSuggestionsFromEvent(\n evt,\n this.suggestionBindings\n );\n });\n this.searchBoxSuggestionEventsQueue = [];\n }\n\n @Watch('redirectionUrl')\n watchRedirectionUrl() {\n this.updateRedirectionUrl();\n }\n\n private initializeSuggestionManager() {\n if (this.suggestionManager) {\n return;\n }\n\n this.suggestionManager = new SuggestionManager({\n getNumberOfSuggestionsToDisplay: () => this.numberOfQueries,\n updateQuery: (query) => this.searchBox.updateText(query),\n getSearchBoxValue: () => this.searchBoxState.value,\n getSuggestionTimeout: () => this.suggestionTimeout,\n getSuggestionDelay: () => this.suggestionDelay,\n getHost: () => this.host,\n getLogger: () => this.bindings.engine.logger,\n });\n this.suggestionManager.initializeSuggestions(this.suggestionBindings);\n }\n\n private get suggestionBindings(): SearchBoxSuggestionsBindings<\n SearchBox | StandaloneSearchBox\n > {\n return spreadProperties(\n this.bindings,\n this.suggestionManager.partialSuggestionBindings,\n this.partialSuggestionBindings\n );\n }\n\n private get partialSuggestionBindings(): Pick<\n SearchBoxSuggestionsBindings<SearchBox | StandaloneSearchBox>,\n | 'id'\n | 'isStandalone'\n | 'searchBoxController'\n | 'numberOfQueries'\n | 'clearFilters'\n > {\n return Object.defineProperties(\n {...this.bindings},\n {\n id: {\n get: () => this.id,\n enumerable: true,\n },\n searchBoxController: {\n get: () => this.searchBox,\n enumerable: true,\n },\n isStandalone: {\n get: () => !!this.redirectionUrl,\n enumerable: true,\n },\n numberOfQueries: {\n get: () => this.numberOfQueries,\n enumerable: true,\n },\n clearFilters: {\n get: () => this.clearFilters,\n enumerable: true,\n },\n }\n ) as unknown as Pick<\n SearchBoxSuggestionsBindings<SearchBox | StandaloneSearchBox>,\n | 'id'\n | 'isStandalone'\n | 'searchBoxController'\n | 'numberOfQueries'\n | 'clearFilters'\n >;\n }\n\n private get searchBoxOptions(): SearchBoxOptions {\n return {\n id: this.id,\n numberOfSuggestions: 0,\n highlightOptions: {\n notMatchDelimiters: {\n open: '<span class=\"font-bold\">',\n close: '</span>',\n },\n correctionDelimiters: {\n open: '<span class=\"font-normal\">',\n close: '</span>',\n },\n },\n clearFilters: this.clearFilters,\n enableQuerySyntax: this.enableQuerySyntax,\n };\n }\n\n private updateBreakpoints = once(() => updateBreakpoints(this.host));\n\n private async onInput(value: string) {\n this.searchBox.updateText(value);\n\n if (this.isSearchDisabledForEndUser(value)) {\n this.suggestionManager.clearSuggestions();\n return;\n }\n this.isExpanded = true;\n await this.suggestionManager.triggerSuggestions();\n this.announceNewSuggestionsToScreenReader();\n }\n\n private async onFocus() {\n if (this.isExpanded) {\n return;\n }\n this.isExpanded = true;\n await this.suggestionManager.triggerSuggestions();\n this.announceNewSuggestionsToScreenReader();\n }\n\n private onSubmit() {\n this.isExpanded = false;\n if (this.suggestionManager.keyboardActiveDescendant) {\n this.suggestionManager.onSubmit();\n return;\n }\n\n this.searchBox.submit();\n }\n\n private async onKeyDown(e: KeyboardEvent) {\n if (this.isSearchDisabledForEndUser(this.searchBoxState.value)) {\n return;\n }\n\n switch (e.key) {\n case 'Enter':\n this.onSubmit();\n break;\n case 'Escape':\n this.suggestionManager.clearSuggestions();\n break;\n case 'ArrowDown':\n e.preventDefault();\n await this.suggestionManager.focusNextValue();\n this.announceNewActiveSuggestionToScreenReader();\n break;\n case 'ArrowUp':\n e.preventDefault();\n await this.suggestionManager.focusPreviousValue();\n this.announceNewActiveSuggestionToScreenReader();\n break;\n case 'ArrowRight':\n if (\n this.suggestionManager.hasActiveDescendant ||\n !this.searchBox.state.value\n ) {\n e.preventDefault();\n this.suggestionManager.focusPanel('right');\n this.announceNewActiveSuggestionToScreenReader();\n }\n break;\n case 'ArrowLeft':\n if (\n this.suggestionManager.hasActiveDescendant ||\n !this.searchBox.state.value\n ) {\n e.preventDefault();\n this.suggestionManager.focusPanel('left');\n this.announceNewActiveSuggestionToScreenReader();\n }\n break;\n case 'Tab':\n this.suggestionManager.clearSuggestions();\n break;\n default:\n if (this.suggestionManager.keyboardActiveDescendant) {\n this.suggestionManager.updateKeyboardActiveDescendant();\n }\n break;\n }\n }\n\n private triggerTextAreaChange(value: string) {\n this.textAreaRef.value = value;\n this.textAreaRef.dispatchEvent(new window.Event('change'));\n }\n\n private renderSuggestion(\n item: SearchBoxSuggestionElement,\n index: number,\n lastIndex: number,\n side: 'left' | 'right'\n ) {\n const id = `${this.id}-${side}-suggestion-${item.key}`;\n\n const isSelected = id === this.suggestionManager.activeDescendant;\n\n if (index === lastIndex && item.hideIfLast) {\n return null;\n }\n\n return (\n <atomic-suggestion-renderer\n i18n={this.bindings.i18n}\n id={id}\n suggestion={item}\n isSelected={isSelected}\n side={side}\n index={index}\n lastIndex={lastIndex}\n isDoubleList={this.suggestionManager.isDoubleList}\n onClick={(e: Event) => {\n this.suggestionManager.onSuggestionClick(item, e);\n if (item.key === 'recent-query-clear') {\n return;\n }\n\n this.isExpanded = false;\n }}\n onMouseOver={() => {\n this.suggestionManager.onSuggestionMouseOver(item, side, id);\n }}\n ></atomic-suggestion-renderer>\n );\n }\n\n private renderPanel(\n side: 'left' | 'right',\n elements: SearchBoxSuggestionElement[],\n setRef: (el: HTMLElement | undefined) => void,\n getRef: () => HTMLElement | undefined\n ) {\n if (!elements.length) {\n return null;\n }\n\n return (\n <div\n part={`suggestions suggestions-${side}`}\n ref={setRef}\n class=\"flex grow basis-1/2 flex-col\"\n onMouseDown={(e) => {\n if (e.target === getRef()) {\n e.preventDefault();\n }\n }}\n >\n {elements.map((suggestion, index) =>\n this.renderSuggestion(suggestion, index, elements.length - 1, side)\n )}\n </div>\n );\n }\n\n private get shouldShowSuggestions() {\n return (\n this.suggestionManager.hasSuggestions &&\n this.isExpanded &&\n !this.isSearchDisabledForEndUser(this.searchBoxState.value)\n );\n }\n\n private renderSuggestions() {\n return (\n <div\n id={`${this.id}-popup`}\n part={`suggestions-wrapper ${\n this.suggestionManager.isDoubleList\n ? 'suggestions-double-list'\n : 'suggestions-single-list'\n }`}\n class={`bg-background border-neutral absolute top-full left-0 z-10 flex w-full rounded-md border ${\n this.shouldShowSuggestions ? '' : 'hidden'\n }`}\n role=\"application\"\n aria-label={this.bindings.i18n.t(\n this.suggestionManager.isDoubleList\n ? 'search-suggestions-double-list'\n : 'search-suggestions-single-list'\n )}\n {...(this.suggestionManager.activeDescendant && {\n 'aria-activedescendant': this.suggestionManager.activeDescendant,\n })}\n >\n {this.renderPanel(\n 'left',\n this.suggestionManager.leftSuggestionElements,\n (el) => (this.suggestionManager.leftPanel = el),\n () => this.suggestionManager.leftPanel\n )}\n {this.renderPanel(\n 'right',\n this.suggestionManager.rightSuggestionElements,\n (el) => (this.suggestionManager.rightPanel = el),\n () => this.suggestionManager.rightPanel\n )}\n </div>\n );\n }\n\n private renderTextBox = (searchLabel: string) => {\n const props = {\n loading: this.searchBoxState.isLoading,\n bindings: this.bindings,\n value: this.searchBoxState.value,\n title: searchLabel,\n ariaLabel: searchLabel,\n onFocus: () => this.onFocus(),\n onInput: (e: Event) =>\n this.onInput(\n (e.target as HTMLInputElement | HTMLTextAreaElement).value\n ),\n onKeyDown: (e: KeyboardEvent) => this.onKeyDown(e),\n onClear: () => {\n this.searchBox.clear();\n this.suggestionManager.clearSuggestions();\n },\n popup: {\n id: `${this.id}-popup`,\n activeDescendant: this.suggestionManager.activeDescendant,\n expanded: this.isExpanded,\n hasSuggestions: this.suggestionManager.hasSuggestions,\n },\n };\n\n return (\n <SearchTextArea\n textAreaRef={this.textAreaRef}\n ref={(el) => (this.textAreaRef = el as HTMLTextAreaElement)}\n {...props}\n onClear={() => {\n props.onClear();\n this.triggerTextAreaChange('');\n }}\n />\n );\n };\n\n private renderAbsolutePositionSpacer() {\n return (\n <textarea\n aria-hidden\n part=\"textarea-spacer\"\n class=\"invisible w-full px-4 py-3.5 text-lg\"\n rows={1}\n ></textarea>\n );\n }\n\n private isSearchDisabledForEndUser(queryValue?: string) {\n if (isNullOrUndefined(queryValue)) {\n return this.disableSearch;\n }\n\n if (queryValue.trim().length < this.minimumQueryLength) {\n return true;\n }\n\n return this.disableSearch;\n }\n\n private getSearchInputLabel(minimumQueryLength = 0) {\n if (this.isSearchDisabledForEndUser(this.searchBoxState.value)) {\n return this.bindings.i18n.t('search-disabled', {\n length: minimumQueryLength,\n });\n }\n\n if (isMacOS()) {\n return this.bindings.i18n.t('search-box-with-suggestions-macos');\n }\n if (!hasKeyboard()) {\n return this.bindings.i18n.t('search-box-with-suggestions-keyboardless');\n }\n return this.bindings.i18n.t('search-box-with-suggestions');\n }\n\n private announceNewActiveSuggestionToScreenReader() {\n const ariaLabel = this.suggestionManager.activeDescendantElement?.ariaLabel;\n if (isMacOS() && ariaLabel) {\n this.suggestionsAriaMessage = ariaLabel;\n }\n }\n\n private announceNewSuggestionsToScreenReader() {\n const elsLength =\n this.suggestionManager.allSuggestionElements.filter(\n elementHasQuery\n ).length;\n this.searchBoxAriaMessage = elsLength\n ? this.bindings.i18n.t(\n this.searchBoxState.value\n ? 'query-suggestions-available'\n : 'query-suggestions-available-no-query',\n {\n count: elsLength,\n query: this.searchBoxState.value,\n }\n )\n : this.bindings.i18n.t('query-suggestions-unavailable');\n }\n\n public render() {\n this.updateBreakpoints();\n\n const searchLabel = this.getSearchInputLabel(this.minimumQueryLength);\n const isDisabled = this.isSearchDisabledForEndUser(\n this.searchBoxState.value\n );\n if (!this.suggestionManager.suggestions.length) {\n this.registerSearchboxSuggestionEvents();\n }\n\n return (\n <Host>\n {this.renderAbsolutePositionSpacer()}\n {[\n <SearchBoxWrapper\n disabled={isDisabled}\n onFocusout={(event) => {\n if (!isFocusingOut(event)) {\n return;\n }\n this.suggestionManager.clearSuggestions();\n this.isExpanded = false;\n }}\n >\n {this.renderTextBox(searchLabel)}\n <SubmitButton\n bindings={this.bindings}\n disabled={isDisabled}\n onClick={() => {\n this.searchBox.submit();\n this.suggestionManager.clearSuggestions();\n }}\n />\n {this.renderSuggestions()}\n </SearchBoxWrapper>,\n !this.suggestionManager.suggestions.length && (\n <slot>\n <atomic-search-box-recent-queries></atomic-search-box-recent-queries>\n <atomic-search-box-query-suggestions></atomic-search-box-query-suggestions>\n </slot>\n ),\n ]}\n </Host>\n );\n }\n}\n"],"mappings":"mwBAWO,MAAMA,EAA2C,EACtDC,WACAC,WACAC,aAEAC,EAAA,OACEC,KAAK,wBACLC,MAAM,8CAENF,EAACG,EAAM,CACLC,MA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kBAAkBoI,sBAAsBC,OAC3CC,GACAvB,OACJ7I,KAAKqK,qBAAuBJ,EACxBjK,KAAKhB,SAASS,KAAKC,EACjBM,KAAKkB,eAAeE,MAChB,8BACA,uCACJ,CACEkJ,MAAOL,EACP5E,MAAOrF,KAAKkB,eAAeE,QAG/BpB,KAAKhB,SAASS,KAAKC,EAAE,gC,CAGpB,MAAA6K,GACLvK,KAAKW,oBAEL,MAAMI,EAAcf,KAAK4J,oBAAoB5J,KAAKO,oBAClD,MAAMiK,EAAaxK,KAAK4G,2BACtB5G,KAAKkB,eAAeE,OAEtB,IAAKpB,KAAK8B,kBAAkB2I,YAAY5B,OAAQ,CAC9C7I,KAAK8E,mC,CAGP,OACE3F,EAACuL,EAAI,CAAAxD,IAAA,4CACFlH,KAAKuJ,+BACL,CACCpK,EAACwL,EAAgB,CAAAzD,IAAA,2CACfjI,SAAUuL,EACVI,WAAazG,IACX,IAAK0G,EAAc1G,GAAQ,CACzB,M,CAEFnE,KAAK8B,kBAAkBC,mBACvB/B,KAAKE,WAAa,KAAK,GAGxBF,KAAKc,cAAcC,GACpB5B,EAACJ,EAAY,CAAAmI,IAAA,2CACXlI,SAAUgB,KAAKhB,SACfC,SAAUuL,EACVtL,QAAS,KACPc,KAAK4B,UAAUqF,SACfjH,KAAK8B,kBAAkBC,kBAAkB,IAG5C/B,KAAKiJ,sBAEPjJ,KAAK8B,kBAAkB2I,YAAY5B,QAClC1J,EAAA,QAAA+H,IAAA,4CACE/H,EAAA,oCAAA+H,IAAA,6CACA/H,EAAA,uCAAA+H,IAAA,+C,kGAnoBiB4D,EAAA,CAA5BC,K,+BAeOD,EAAA,CAFPE,EAAsB,c,qCA2FbF,EAAA,CADTG,EAAe,e,2CAINH,EAAA,CADTG,EAAe,qBAAsB,O","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["atomicInsightSearchBoxCss","AtomicInsightSearchBoxStyle0","AtomicInsightSearchBox","this","isExpanded","disableSearch","numberOfSuggestions","initialize","id","randomID","searchBoxOptions","highlightOptions","notMatchDelimiters","open","close","correctionDelimiters","fetchQuerySuggestions","registerQuerySuggest","loadInsightSearchActions","bindings","engine","searchBox","buildInsightSearchBox","options","dispatch","count","suggestionManager","SuggestionManager","getNumberOfSuggestionsToDisplay","updateQuery","query","updateText","getSearchBoxValue","searchBoxState","value","getSuggestionTimeout","getSuggestionDelay","getHost","host","getLogger","logger","registerSuggestions","position","renderItems","state","suggestions","map","suggestion","renderSuggestionItem","onInput","panel","onSubmit","activeDescendantElement","clickOnActiveElement","submit","clearSuggestions","onKeyDown","e","key","preventDefault","focusNextValue","announceNewActiveSuggestionToScreenReader","focusPreviousValue","triggerTextAreaChange","textAreaRef","dispatchEvent","window","Event","renderSuggestion","item","index","lastIndex","isSelected","activeDescendant","suggestedQuery","hideIfLast","h","i18n","side","isDoubleList","onClick","onSuggestionClick","onMouseOver","onSuggestionMouseOver","hasQuery","partialItem","getPartialSearchBoxSuggestionElement","content","QuerySuggestionContainer","QuerySuggestionIcon","icon","SearchSlimIcon","hasSuggestion","length","QuerySuggestionText","onSelect","selectSuggestion","rawValue","renderPanel","elements","setRef","getRef","part","ref","class","onMouseDown","target","renderSuggestions","hasSuggestions","updateActiveDescendant","role","t","allSuggestionElements","el","leftPanel","getSearchInputLabel","isMacOS","hasKeyboard","onFocus","triggerSuggestions","announceNewSuggestionsToScreenReader","ariaLabel","suggestionsAriaMessage","numberOfSuggestionsToAnnounce","filter","elementHasQuery","searchBoxAriaMessage","render","SearchBoxWrapper","disabled","onFocusout","event","isFocusingOut","SearchTextArea","loading","isLoading","placeholder","onClear","clear","__decorate","InitializeBindings","BindStateToController","AriaLiveRegion"],"sources":["src/components/insight/atomic-insight-search-box/atomic-insight-search-box.pcss?tag=atomic-insight-search-box&encapsulation=shadow","src/components/insight/atomic-insight-search-box/atomic-insight-search-box.tsx"],"sourcesContent":["@import '../../../global/global.pcss';\n@import '../../common/search-box/search-box.pcss';\n\n[part='wrapper'] {\n @apply z-10;\n}\n\n:host {\n position: relative;\n}\n\n[part='input'] {\n padding-top: 0.675rem;\n padding-bottom: 0.675rem;\n}\n\n[part='submit-icon'] {\n @apply text-on-background;\n}\n\n[part='submit-button'] {\n @apply flex w-10 items-center justify-center;\n}\n\n.loading::after {\n content: '';\n @apply bg-background absolute h-5/6 w-5/6 rounded-full;\n}\n\n[part='clear-button-wrapper'] {\n @apply mr-2 py-0;\n}\n\n[part='clear-icon'] {\n @apply h-3 w-3;\n}\n\n[part='textarea-expander'] {\n &::after {\n @apply p-2 px-4;\n }\n}\n\n[part='textarea-expander'] {\n [part='textarea'] {\n @apply p-2 px-4;\n }\n}\n","import {loadInsightSearchActions} from '@coveo/headless/insight';\nimport {\n buildSearchBox as buildInsightSearchBox,\n SearchBox as InsightSearchBox,\n SearchBoxState as InsightSearchBoxState,\n Suggestion as InsightSuggestion,\n} from '@coveo/headless/insight';\nimport {Component, Element, h, Prop, State} from '@stencil/core';\nimport SearchSlimIcon from '../../../images/search-slim.svg';\nimport {hasKeyboard, isMacOS} from '../../../utils/device-utils';\nimport {\n BindStateToController,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {AriaLiveRegion} from '../../../utils/stencil-accessibility-utils';\nimport {isFocusingOut, randomID} from '../../../utils/utils';\nimport {SearchBoxWrapper} from '../../common/search-box/stencil-search-box-wrapper';\nimport {SearchTextArea} from '../../common/search-box/stencil-search-text-area';\nimport {\n getPartialSearchBoxSuggestionElement,\n QuerySuggestionContainer,\n QuerySuggestionIcon,\n QuerySuggestionText,\n} from '../../common/suggestions/stencil-query-suggestions';\nimport {SuggestionManager} from '../../common/suggestions/stencil-suggestion-manager';\nimport {\n elementHasQuery,\n SearchBoxSuggestionElement,\n} from '../../common/suggestions/suggestions-common';\nimport {InsightBindings} from '../atomic-insight-interface/atomic-insight-interface';\n\n/**\n * @internal\n */\n@Component({\n tag: 'atomic-insight-search-box',\n styleUrl: 'atomic-insight-search-box.pcss',\n shadow: true,\n})\nexport class AtomicInsightSearchBox {\n @InitializeBindings() public bindings!: InsightBindings;\n\n private searchBox!: InsightSearchBox;\n private id!: string;\n private textAreaRef!: HTMLTextAreaElement;\n private suggestionManager!: SuggestionManager<InsightSearchBox>;\n\n @Element() private host!: HTMLElement;\n\n @BindStateToController('searchBox')\n @State()\n private searchBoxState!: InsightSearchBoxState;\n @State() public error!: Error;\n @State() private isExpanded = false;\n\n /**\n * Whether to prevent the user from triggering a search from the component.\n * Perfect for use cases where you need to disable the search conditionally, like when the input is empty.\n */\n @Prop({reflect: true}) public disableSearch = false;\n /**\n * The number of query suggestions to display when interacting with the search box.\n */\n @Prop({reflect: true}) public numberOfSuggestions = 5;\n\n @AriaLiveRegion('search-box')\n protected searchBoxAriaMessage!: string;\n\n @AriaLiveRegion('search-suggestions', true)\n protected suggestionsAriaMessage!: string;\n\n public initialize() {\n this.id = randomID('atomic-search-box-');\n\n const searchBoxOptions = {\n id: this.id,\n numberOfSuggestions: 0,\n highlightOptions: {\n notMatchDelimiters: {\n open: '<span class=\"font-bold\">',\n close: '</span>',\n },\n correctionDelimiters: {\n open: '<span class=\"font-normal\">',\n close: '</span>',\n },\n },\n };\n\n const {fetchQuerySuggestions, registerQuerySuggest} =\n loadInsightSearchActions(this.bindings.engine);\n\n this.searchBox = buildInsightSearchBox(this.bindings.engine, {\n options: searchBoxOptions,\n });\n\n this.bindings.engine.dispatch(\n registerQuerySuggest({id: this.id, count: this.numberOfSuggestions})\n );\n\n this.suggestionManager = new SuggestionManager({\n getNumberOfSuggestionsToDisplay: () => this.numberOfSuggestions,\n updateQuery: (query) => this.searchBox.updateText(query),\n getSearchBoxValue: () => this.searchBoxState.value,\n getSuggestionTimeout: () => 500,\n getSuggestionDelay: () => 0,\n getHost: () => this.host,\n getLogger: () => this.bindings.engine.logger,\n });\n\n this.suggestionManager.registerSuggestions({\n position: 0,\n renderItems: () =>\n this.searchBox.state.suggestions.map((suggestion) =>\n this.renderSuggestionItem(suggestion)\n ),\n onInput: () => this.bindings.engine.dispatch(fetchQuerySuggestions({id: this.id})),\n panel: 'left',\n });\n }\n\n private onSubmit() {\n if (this.suggestionManager.activeDescendantElement) {\n this.suggestionManager.clickOnActiveElement();\n return;\n }\n\n this.searchBox.submit();\n this.suggestionManager.clearSuggestions();\n }\n\n private async onKeyDown(e: KeyboardEvent) {\n if (this.disableSearch) {\n return;\n }\n\n switch (e.key) {\n case 'Enter':\n this.onSubmit();\n break;\n case 'Escape':\n this.suggestionManager.clearSuggestions();\n break;\n case 'ArrowDown':\n e.preventDefault();\n await this.suggestionManager.focusNextValue();\n this.announceNewActiveSuggestionToScreenReader();\n break;\n case 'ArrowUp':\n e.preventDefault();\n await this.suggestionManager.focusPreviousValue();\n this.announceNewActiveSuggestionToScreenReader();\n break;\n case 'Tab':\n this.suggestionManager.clearSuggestions();\n break;\n }\n }\n\n private triggerTextAreaChange(value: string) {\n this.textAreaRef.value = value;\n this.textAreaRef.dispatchEvent(new window.Event('change'));\n }\n\n private renderSuggestion(\n item: SearchBoxSuggestionElement,\n index: number,\n lastIndex: number\n ) {\n const id = `${this.id}-suggestion-${item.key}`;\n\n const isSelected =\n id === this.suggestionManager.activeDescendant ||\n this.suggestionManager.suggestedQuery === item.query;\n\n if (index === lastIndex && item.hideIfLast) {\n return null;\n }\n\n return (\n <atomic-suggestion-renderer\n i18n={this.bindings.i18n}\n id={id}\n suggestion={item}\n isSelected={isSelected}\n side={'left'}\n index={index}\n lastIndex={lastIndex}\n isDoubleList={false}\n onClick={(e: Event) => {\n this.suggestionManager.onSuggestionClick(item, e);\n }}\n onMouseOver={() => {\n this.suggestionManager.onSuggestionMouseOver(item, 'left', id);\n }}\n ></atomic-suggestion-renderer>\n );\n }\n\n private renderSuggestionItem(\n suggestion: InsightSuggestion\n ): SearchBoxSuggestionElement {\n const hasQuery = this.searchBox.state.value !== '';\n const partialItem = getPartialSearchBoxSuggestionElement(\n suggestion,\n this.bindings.i18n\n );\n\n return {\n ...partialItem,\n content: (\n <QuerySuggestionContainer>\n <QuerySuggestionIcon\n icon={SearchSlimIcon}\n hasSuggestion={this.searchBoxState.suggestions.length > 1}\n />\n\n <QuerySuggestionText suggestion={suggestion} hasQuery={hasQuery} />\n </QuerySuggestionContainer>\n ),\n onSelect: () => {\n this.searchBox.selectSuggestion(suggestion.rawValue);\n },\n };\n }\n\n private renderPanel(\n elements: SearchBoxSuggestionElement[],\n setRef: (el: HTMLElement | undefined) => void,\n getRef: () => HTMLElement | undefined\n ) {\n if (!elements.length) {\n return null;\n }\n\n return (\n <div\n part={'suggestions'}\n ref={setRef}\n class=\"flex grow basis-1/2 flex-col\"\n onMouseDown={(e) => {\n if (e.target === getRef()) {\n e.preventDefault();\n }\n }}\n >\n {elements.map((suggestion, index) =>\n this.renderSuggestion(suggestion, index, elements.length - 1)\n )}\n </div>\n );\n }\n\n private renderSuggestions() {\n if (!this.suggestionManager.hasSuggestions) {\n this.suggestionManager.updateActiveDescendant();\n return null;\n }\n\n return (\n <div\n id={`${this.id}-popup`}\n part=\"suggestions-wrapper\"\n class={`bg-background border-neutral absolute top-full left-0 z-10 flex w-full rounded-md border ${\n this.suggestionManager.hasSuggestions && this.isExpanded\n ? ''\n : 'hidden'\n }`}\n role=\"application\"\n aria-label={this.bindings.i18n.t('search-suggestions-single-list')}\n {...(this.suggestionManager.activeDescendant && {\n 'aria-activedescendant': this.suggestionManager.activeDescendant,\n })}\n >\n {this.renderPanel(\n this.suggestionManager.allSuggestionElements,\n (el) => (this.suggestionManager.leftPanel = el),\n () => this.suggestionManager.leftPanel\n )}\n </div>\n );\n }\n\n private getSearchInputLabel() {\n if (isMacOS()) {\n return this.bindings.i18n.t('search-box-with-suggestions-macos');\n }\n if (!hasKeyboard()) {\n return this.bindings.i18n.t('search-box-with-suggestions-keyboardless');\n }\n return this.bindings.i18n.t('search-box-with-suggestions');\n }\n\n private async onFocus() {\n if (this.isExpanded) {\n return;\n }\n this.isExpanded = true;\n await this.suggestionManager.triggerSuggestions();\n this.announceNewSuggestionsToScreenReader();\n }\n\n private async onInput(value: string) {\n this.searchBox.updateText(value);\n this.isExpanded = true;\n await this.suggestionManager.triggerSuggestions();\n this.announceNewSuggestionsToScreenReader();\n }\n\n private announceNewActiveSuggestionToScreenReader() {\n const ariaLabel = this.suggestionManager.activeDescendantElement?.ariaLabel;\n if (isMacOS() && ariaLabel) {\n this.suggestionsAriaMessage = ariaLabel;\n }\n }\n\n private announceNewSuggestionsToScreenReader() {\n const numberOfSuggestionsToAnnounce =\n this.suggestionManager.allSuggestionElements.filter(\n elementHasQuery\n ).length;\n this.searchBoxAriaMessage = numberOfSuggestionsToAnnounce\n ? this.bindings.i18n.t(\n this.searchBoxState.value\n ? 'query-suggestions-available'\n : 'query-suggestions-available-no-query',\n {\n count: numberOfSuggestionsToAnnounce,\n query: this.searchBoxState.value,\n }\n )\n : this.bindings.i18n.t('query-suggestions-unavailable');\n }\n\n public render() {\n return (\n <SearchBoxWrapper\n disabled={this.disableSearch}\n onFocusout={(event) => {\n if (!isFocusingOut(event)) {\n return;\n }\n this.suggestionManager.clearSuggestions();\n this.isExpanded = false;\n }}\n >\n <atomic-icon\n part=\"submit-icon\"\n icon={SearchSlimIcon}\n class=\"my-auto mr-0 ml-4 h-4 w-4\"\n />\n <SearchTextArea\n textAreaRef={this.textAreaRef}\n loading={this.searchBoxState.isLoading}\n ref={(el) => el && (this.textAreaRef = el)}\n bindings={this.bindings}\n value={this.searchBoxState.value}\n ariaLabel={this.getSearchInputLabel()}\n placeholder={this.bindings.i18n.t('search-ellipsis')}\n onFocus={() => this.onFocus()}\n onKeyDown={(e) => this.onKeyDown(e)}\n onClear={() => {\n this.searchBox.clear();\n this.triggerTextAreaChange('');\n }}\n onInput={(e) => this.onInput((e.target as HTMLInputElement).value)}\n />\n {this.renderSuggestions()}\n </SearchBoxWrapper>\n );\n }\n}\n"],"mappings":"ysBAAA,MAAMA,EAA4B,smpEAClC,MAAAC,EAAeD,E,iXCsCFE,EAAsB,M,yBAchBC,KAAAC,WAAa,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C,EAAA,CAA5BC,K,+BAWOD,EAAA,CAFPE,EAAsB,c,qCAiBbF,EAAA,CADTG,EAAe,e,2CAINH,EAAA,CADTG,EAAe,qBAAsB,O","ignoreList":[]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{h as n,F as r,r as t,c as e}from"./p-dc3df5ce.js";import{buildSearchStatus as i,buildPager as a}from"@coveo/headless";import{A as o}from"./p-022fb63e.js";import{A as l}from"./p-e4572887.js";import{H as s,I as c,B as d}from"./p-ff2d324d.js";import{r as w}from"./p-a12e1c59.js";import{c as m}from"./p-cc0bf58b.js";import{P as h,a as p,b as g,c as b,d as v}from"./p-211d7d6a.js";import"./p-c9074946.js";import"./p-1580513b.js";import"./p-05de7ca3.js";import"./p-cae02339.js";import"./p-f284897c.js";import"./p-0462f723.js";import"./p-b93ccff9.js";import"./p-21ab6f55.js";import"./p-82398f4a.js";const u=(t,e)=>{if(t.hasError||!t.isAppLoaded||!t.hasItems){return n(s,null)}return n(r,null,...e)};const f='/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer properties {\n *, :before, :after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-x-reverse: 0;\n --tw-divide-y-reverse: 0;\n --tw-border-style: solid;\n --tw-gradient-position: initial;\n --tw-gradient-from: #0000;\n --tw-gradient-via: #0000;\n --tw-gradient-to: #0000;\n --tw-gradient-stops: initial;\n --tw-gradient-via-stops: initial;\n --tw-gradient-from-position: 0%;\n --tw-gradient-via-position: 50%;\n --tw-gradient-to-position: 100%;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-blur: initial;\n --tw-brightness: initial;\n --tw-contrast: initial;\n --tw-grayscale: initial;\n --tw-hue-rotate: initial;\n --tw-invert: initial;\n --tw-opacity: initial;\n --tw-saturate: initial;\n --tw-sepia: initial;\n --tw-drop-shadow: initial;\n --tw-drop-shadow-color: initial;\n --tw-drop-shadow-alpha: 100%;\n --tw-drop-shadow-size: initial;\n --tw-duration: initial;\n --tw-ease: initial;\n --tw-content: "";\n }\n}\n@layer theme, base, components, utilities;\n@layer theme;\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, var(--atomic-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",\n "Courier New", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n }\n @supports (color: color-mix(in lab, red, red)) {\n ::placeholder {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n ::-webkit-calendar-picker-indicator {\n line-height: 1;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden="until-found"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .\\@container {\n container-type: inline-size;\n }\n .pointer-events-auto {\n pointer-events: auto;\n }\n .pointer-events-none {\n pointer-events: none;\n }\n .collapse {\n visibility: collapse;\n }\n .invisible {\n visibility: hidden;\n }\n .visible {\n visibility: visible;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .static {\n position: static;\n }\n .sticky {\n position: sticky;\n }\n .inset-0 {\n inset: calc(0.25rem * 0);\n }\n .-top-2 {\n top: calc(0.25rem * -2);\n }\n .-top-4 {\n top: calc(0.25rem * -4);\n }\n .top-0 {\n top: calc(0.25rem * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .top-6 {\n top: calc(0.25rem * 6);\n }\n .top-\\[4px\\] {\n top: 4px;\n }\n .top-full {\n top: 100%;\n }\n .top-px {\n top: 1px;\n }\n .-right-2 {\n right: calc(0.25rem * -2);\n }\n .right-0 {\n right: calc(0.25rem * 0);\n }\n .right-2 {\n right: calc(0.25rem * 2);\n }\n .right-6 {\n right: calc(0.25rem * 6);\n }\n .right-12 {\n right: calc(0.25rem * 12);\n }\n .right-20 {\n right: calc(0.25rem * 20);\n }\n .right-px {\n right: 1px;\n }\n .bottom-0 {\n bottom: calc(0.25rem * 0);\n }\n .bottom-1 {\n bottom: calc(0.25rem * 1);\n }\n .bottom-2 {\n bottom: calc(0.25rem * 2);\n }\n .bottom-px {\n bottom: 1px;\n }\n .left-0 {\n left: calc(0.25rem * 0);\n }\n .left-1 {\n left: calc(0.25rem * 1);\n }\n .left-2 {\n left: calc(0.25rem * 2);\n }\n .left-\\[15px\\] {\n left: 15px;\n }\n .isolate {\n isolation: isolate;\n }\n .z-0 {\n z-index: 0;\n }\n .z-1 {\n z-index: 1;\n }\n .z-10 {\n z-index: 10;\n }\n .z-9998 {\n z-index: 9998;\n }\n .z-9999 {\n z-index: 9999;\n }\n .order-last {\n order: 9999;\n }\n .col-span-2 {\n grid-column: span 2 / span 2;\n }\n .container {\n width: 100%;\n }\n @media (width >= 1024px) {\n .container {\n max-width: 1024px;\n }\n }\n @media (width >= 40rem) {\n .container {\n max-width: 40rem;\n }\n }\n @media (width >= 48rem) {\n .container {\n max-width: 48rem;\n }\n }\n @media (width >= 64rem) {\n .container {\n max-width: 64rem;\n }\n }\n @media (width >= 80rem) {\n .container {\n max-width: 80rem;\n }\n }\n @media (width >= 96rem) {\n .container {\n max-width: 96rem;\n }\n }\n .m-0 {\n margin: calc(0.25rem * 0);\n }\n .m-2 {\n margin: calc(0.25rem * 2);\n }\n .mx-0 {\n margin-inline: calc(0.25rem * 0);\n }\n .mx-0\\.5 {\n margin-inline: calc(0.25rem * 0.5);\n }\n .mx-1 {\n margin-inline: calc(0.25rem * 1);\n }\n .mx-6 {\n margin-inline: calc(0.25rem * 6);\n }\n .mx-16 {\n margin-inline: calc(0.25rem * 16);\n }\n .mx-auto {\n margin-inline: auto;\n }\n .my-2 {\n margin-block: calc(0.25rem * 2);\n }\n .my-3 {\n margin-block: calc(0.25rem * 3);\n }\n .my-4 {\n margin-block: calc(0.25rem * 4);\n }\n .my-6 {\n margin-block: calc(0.25rem * 6);\n }\n .my-auto {\n margin-block: auto;\n }\n .mt-0 {\n margin-top: calc(0.25rem * 0);\n }\n .mt-1 {\n margin-top: calc(0.25rem * 1);\n }\n .mt-1\\.5 {\n margin-top: calc(0.25rem * 1.5);\n }\n .mt-2 {\n margin-top: calc(0.25rem * 2);\n }\n .mt-2\\.5 {\n margin-top: calc(0.25rem * 2.5);\n }\n .mt-3 {\n margin-top: calc(0.25rem * 3);\n }\n .mt-4 {\n margin-top: calc(0.25rem * 4);\n }\n .mt-6 {\n margin-top: calc(0.25rem * 6);\n }\n .mt-7 {\n margin-top: calc(0.25rem * 7);\n }\n .mt-8 {\n margin-top: calc(0.25rem * 8);\n }\n .mt-10 {\n margin-top: calc(0.25rem * 10);\n }\n .mt-px {\n margin-top: 1px;\n }\n .mr-0 {\n margin-right: calc(0.25rem * 0);\n }\n .mr-0\\.5 {\n margin-right: calc(0.25rem * 0.5);\n }\n .mr-1 {\n margin-right: calc(0.25rem * 1);\n }\n .mr-1\\.5 {\n margin-right: calc(0.25rem * 1.5);\n }\n .mr-2 {\n margin-right: calc(0.25rem * 2);\n }\n .mr-3 {\n margin-right: calc(0.25rem * 3);\n }\n .mr-6 {\n margin-right: calc(0.25rem * 6);\n }\n .mb-0 {\n margin-bottom: calc(0.25rem * 0);\n }\n .mb-1 {\n margin-bottom: calc(0.25rem * 1);\n }\n .mb-2 {\n margin-bottom: calc(0.25rem * 2);\n }\n .mb-3 {\n margin-bottom: calc(0.25rem * 3);\n }\n .mb-4 {\n margin-bottom: calc(0.25rem * 4);\n }\n .mb-6 {\n margin-bottom: calc(0.25rem * 6);\n }\n .ml-0\\.5 {\n margin-left: calc(0.25rem * 0.5);\n }\n .ml-1 {\n margin-left: calc(0.25rem * 1);\n }\n .ml-2 {\n margin-left: calc(0.25rem * 2);\n }\n .ml-4 {\n margin-left: calc(0.25rem * 4);\n }\n .ml-6 {\n margin-left: calc(0.25rem * 6);\n }\n .ml-auto {\n margin-left: auto;\n }\n .box-border {\n box-sizing: border-box;\n }\n .box-content {\n box-sizing: content-box;\n }\n .line-clamp-1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n .line-clamp-2 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n }\n .line-clamp-3 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n }\n .line-clamp-4 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 4;\n }\n .line-clamp-none {\n overflow: visible;\n display: block;\n -webkit-box-orient: horizontal;\n -webkit-line-clamp: unset;\n }\n .block {\n display: block;\n }\n .contents {\n display: contents;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .hidden {\n display: none;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .table {\n display: table;\n }\n .aspect-square-\\[auto\\] {\n aspect-ratio: 1 / 1;\n height: auto;\n }\n @supports not (aspect-ratio: 1 / 1) {\n .aspect-square-\\[auto\\] {\n height: auto;\n }\n }\n .aspect-square-\\[auto\\] {\n aspect-ratio: 1 / 1;\n height: auto;\n }\n @supports not (aspect-ratio: 1 / 1) {\n .aspect-square-\\[auto\\] {\n height: auto;\n }\n }\n .aspect-square {\n aspect-ratio: 1 / 1;\n }\n .size-\\[27px\\] {\n width: 27px;\n height: 27px;\n }\n .h-1 {\n height: calc(0.25rem * 1);\n }\n .h-2 {\n height: calc(0.25rem * 2);\n }\n .h-2\\.5 {\n height: calc(0.25rem * 2.5);\n }\n .h-3 {\n height: calc(0.25rem * 3);\n }\n .h-4 {\n height: calc(0.25rem * 4);\n }\n .h-5 {\n height: calc(0.25rem * 5);\n }\n .h-5\\/6 {\n height: calc(5/6 * 100%);\n }\n .h-6 {\n height: calc(0.25rem * 6);\n }\n .h-7 {\n height: calc(0.25rem * 7);\n }\n .h-8 {\n height: calc(0.25rem * 8);\n }\n .h-9 {\n height: calc(0.25rem * 9);\n }\n .h-10 {\n height: calc(0.25rem * 10);\n }\n .h-12 {\n height: calc(0.25rem * 12);\n }\n .h-\\[2\\.6rem\\] {\n height: 2.6rem;\n }\n .h-\\[9px\\] {\n height: 9px;\n }\n .h-auto {\n height: auto;\n }\n .h-full {\n height: 100%;\n }\n .max-h-96 {\n max-height: calc(0.25rem * 96);\n }\n .min-h-10 {\n min-height: calc(0.25rem * 10);\n }\n .min-lines-2 {\n min-height: calc(var(--line-height) * 2);\n }\n .min-lines-2 {\n min-height: calc(var(--line-height) * 2);\n }\n .min-lines-3 {\n min-height: calc(var(--line-height) * 3);\n }\n .min-lines-3 {\n min-height: calc(var(--line-height) * 3);\n }\n .w-0\\.5 {\n width: calc(0.25rem * 0.5);\n }\n .w-1 {\n width: calc(0.25rem * 1);\n }\n .w-1\\/2 {\n width: calc(1/2 * 100%);\n }\n .w-2 {\n width: calc(0.25rem * 2);\n }\n .w-2\\.5 {\n width: calc(0.25rem * 2.5);\n }\n .w-3 {\n width: calc(0.25rem * 3);\n }\n .w-3\\.5 {\n width: calc(0.25rem * 3.5);\n }\n .w-3\\/5 {\n width: calc(3/5 * 100%);\n }\n .w-4 {\n width: calc(0.25rem * 4);\n }\n .w-5 {\n width: calc(0.25rem * 5);\n }\n .w-5\\/6 {\n width: calc(5/6 * 100%);\n }\n .w-6 {\n width: calc(0.25rem * 6);\n }\n .w-7 {\n width: calc(0.25rem * 7);\n }\n .w-8 {\n width: calc(0.25rem * 8);\n }\n .w-9 {\n width: calc(0.25rem * 9);\n }\n .w-10 {\n width: calc(0.25rem * 10);\n }\n .w-12 {\n width: calc(0.25rem * 12);\n }\n .w-20 {\n width: calc(0.25rem * 20);\n }\n .w-26 {\n width: calc(0.25rem * 26);\n }\n .w-28 {\n width: calc(0.25rem * 28);\n }\n .w-32 {\n width: calc(0.25rem * 32);\n }\n .w-36 {\n width: calc(0.25rem * 36);\n }\n .w-44 {\n width: calc(0.25rem * 44);\n }\n .w-48 {\n width: calc(0.25rem * 48);\n }\n .w-60 {\n width: calc(0.25rem * 60);\n }\n .w-64 {\n width: calc(0.25rem * 64);\n }\n .w-72 {\n width: calc(0.25rem * 72);\n }\n .w-100 {\n width: calc(0.25rem * 100);\n }\n .w-\\[2\\.6rem\\] {\n width: 2.6rem;\n }\n .w-auto {\n width: auto;\n }\n .w-fit {\n width: fit-content;\n }\n .w-full {\n width: 100%;\n }\n .w-max {\n width: max-content;\n }\n .max-w-4\\/5 {\n max-width: calc(4/5 * 100%);\n }\n .max-w-60 {\n max-width: calc(0.25rem * 60);\n }\n .max-w-\\[30ch\\] {\n max-width: 30ch;\n }\n .max-w-full {\n max-width: 100%;\n }\n .max-w-lg {\n max-width: 32rem;\n }\n .max-w-max {\n max-width: max-content;\n }\n .min-w-0 {\n min-width: calc(0.25rem * 0);\n }\n .min-w-10 {\n min-width: calc(0.25rem * 10);\n }\n .min-w-20 {\n min-width: calc(0.25rem * 20);\n }\n .min-w-24 {\n min-width: calc(0.25rem * 24);\n }\n .min-w-full {\n min-width: 100%;\n }\n .flex-1 {\n flex: 1;\n }\n .flex-none {\n flex: none;\n }\n .flex-shrink {\n flex-shrink: 1;\n }\n .shrink-0 {\n flex-shrink: 0;\n }\n .flex-grow {\n flex-grow: 1;\n }\n .grow {\n flex-grow: 1;\n }\n .basis-1\\/2 {\n flex-basis: calc(1/2 * 100%);\n }\n .basis-8 {\n flex-basis: calc(0.25rem * 8);\n }\n .border-collapse {\n border-collapse: collapse;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-x-1\\/2 {\n --tw-translate-x: calc(1/2 * 100%);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .scale-75 {\n --tw-scale-x: 75%;\n --tw-scale-y: 75%;\n --tw-scale-z: 75%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .scale-100 {\n --tw-scale-x: 100%;\n --tw-scale-y: 100%;\n --tw-scale-z: 100%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .rotate-180 {\n rotate: 180deg;\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n }\n .animate-spin {\n animation: spin 1s linear infinite;\n }\n .cursor-\\[inherit\\] {\n cursor: inherit;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .resize-none {\n resize: none;\n }\n .list-outside {\n list-style-position: outside;\n }\n .list-decimal {\n list-style-type: decimal;\n }\n .list-disc {\n list-style-type: disc;\n }\n .list-none {\n list-style-type: none;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-\\[min-content_1fr\\] {\n grid-template-columns: min-content 1fr;\n }\n .grid-cols-\\[min-content_auto\\] {\n grid-template-columns: min-content auto;\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-nowrap {\n flex-wrap: nowrap;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .place-items-center {\n place-items: center;\n }\n .content-center {\n align-content: center;\n }\n .items-baseline {\n align-items: baseline;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-0\\.5 {\n gap: calc(0.25rem * 0.5);\n }\n .gap-1 {\n gap: calc(0.25rem * 1);\n }\n .gap-2 {\n gap: calc(0.25rem * 2);\n }\n .gap-3 {\n gap: calc(0.25rem * 3);\n }\n .gap-4 {\n gap: calc(0.25rem * 4);\n }\n .gap-8 {\n gap: calc(0.25rem * 8);\n }\n :where(.space-y-1 > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(0.25rem * 1) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(0.25rem * 1) * calc(1 - var(--tw-space-y-reverse)));\n }\n .gap-x-1\\.5 {\n column-gap: calc(0.25rem * 1.5);\n }\n .gap-x-2 {\n column-gap: calc(0.25rem * 2);\n }\n .gap-x-4 {\n column-gap: calc(0.25rem * 4);\n }\n :where(.space-x-1\\.5 > :not(:last-child)) {\n --tw-space-x-reverse: 0;\n margin-inline-start: calc(calc(0.25rem * 1.5) * var(--tw-space-x-reverse));\n margin-inline-end: calc(calc(0.25rem * 1.5) * calc(1 - var(--tw-space-x-reverse)));\n }\n .gap-y-0\\.5 {\n row-gap: calc(0.25rem * 0.5);\n }\n :where(.divide-y > :not(:last-child)) {\n --tw-divide-y-reverse: 0;\n border-bottom-style: var(--tw-border-style);\n border-top-style: var(--tw-border-style);\n border-top-width: calc(1px * var(--tw-divide-y-reverse));\n border-bottom-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n }\n :where(.divide-neutral > :not(:last-child)) {\n border-color: var(--atomic-neutral);\n }\n .self-center {\n align-self: center;\n }\n .self-start {\n align-self: flex-start;\n }\n .truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .overflow-auto {\n overflow: auto;\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-x-auto {\n overflow-x: auto;\n }\n .overflow-x-clip {\n overflow-x: clip;\n }\n .overflow-x-scroll {\n overflow-x: scroll;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .overflow-y-visible {\n overflow-y: visible;\n }\n .scroll-smooth {\n scroll-behavior: smooth;\n }\n .rounded {\n border-radius: var(--atomic-border-radius);\n }\n .rounded-3xl {\n border-radius: 1.5rem;\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--atomic-border-radius-lg);\n }\n .rounded-md {\n border-radius: var(--atomic-border-radius-md);\n }\n .rounded-none {\n border-radius: 0;\n }\n .rounded-sm {\n border-radius: var(--atomic-border-radius);\n }\n .rounded-xl {\n border-radius: var(--atomic-border-radius-xl);\n }\n .rounded-tl-none {\n border-top-left-radius: 0;\n }\n .rounded-r-none {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-r {\n border-right-style: var(--tw-border-style);\n border-right-width: 1px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-l {\n border-left-style: var(--tw-border-style);\n border-left-width: 1px;\n }\n .border-solid {\n --tw-border-style: solid;\n border-style: solid;\n }\n .border-gray-200 {\n border-color: oklch(0.928 0.006 264.531);\n }\n .border-neutral {\n border-color: var(--atomic-neutral);\n }\n .border-neutral-dark {\n border-color: var(--atomic-neutral-dark);\n }\n .border-neutral-dim {\n border-color: var(--atomic-neutral-dim);\n }\n .border-primary {\n border-color: var(--atomic-primary);\n }\n .border-primary-light {\n border-color: var(--atomic-primary-light);\n }\n .border-t-neutral {\n border-top-color: var(--atomic-neutral);\n }\n .border-b-neutral {\n border-bottom-color: var(--atomic-neutral);\n }\n .border-b-neutral-dim {\n border-bottom-color: var(--atomic-neutral-dim);\n }\n .border-l-neutral {\n border-left-color: var(--atomic-neutral);\n }\n .border-l-neutral-dim {\n border-left-color: var(--atomic-neutral-dim);\n }\n .bg-\\[\\#F1F2FF\\] {\n background-color: #F1F2FF;\n }\n .bg-\\[rgba\\(40\\,40\\,40\\,0\\.8\\)\\] {\n background-color: rgba(40,40,40,0.8);\n }\n .bg-background {\n background-color: var(--atomic-background);\n }\n .bg-error {\n background-color: var(--atomic-error);\n }\n .bg-gray-50 {\n background-color: oklch(0.985 0.002 247.839);\n }\n .bg-neutral {\n background-color: var(--atomic-neutral);\n }\n .bg-neutral-dark {\n background-color: var(--atomic-neutral-dark);\n }\n .bg-neutral-light {\n background-color: var(--atomic-neutral-light);\n }\n .bg-primary {\n background-color: var(--atomic-primary);\n }\n .bg-primary-background {\n background-color: var(--atomic-primary-background);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: #fff;\n }\n .bg-linear-to-l {\n --tw-gradient-position: to left;\n }\n @supports (background-image: linear-gradient(in lab, red, red)) {\n .bg-linear-to-l {\n --tw-gradient-position: to left in oklab;\n }\n }\n .bg-linear-to-l {\n background-image: linear-gradient(var(--tw-gradient-stops));\n }\n .bg-linear-to-r {\n --tw-gradient-position: to right;\n }\n @supports (background-image: linear-gradient(in lab, red, red)) {\n .bg-linear-to-r {\n --tw-gradient-position: to right in oklab;\n }\n }\n .bg-linear-to-r {\n background-image: linear-gradient(var(--tw-gradient-stops));\n }\n .from-background\\/60 {\n --tw-gradient-from: color-mix(in srgb, #ffffff 60%, transparent);\n }\n @supports (color: color-mix(in lab, red, red)) {\n .from-background\\/60 {\n --tw-gradient-from: color-mix(in oklab, var(--atomic-background) 60%, transparent);\n }\n }\n .from-background\\/60 {\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n .from-more-results-progress-bar-color-from {\n --tw-gradient-from: var(\n --atomic-more-results-progress-bar-color-from,\n var(--atomic-primary-dark)\n );\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n .to-more-results-progress-bar-color-to {\n --tw-gradient-to: var(\n --atomic-more-results-progress-bar-color-to,\n var(--atomic-primary-light)\n );\n --tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));\n }\n .fill-current {\n fill: currentcolor;\n }\n .stroke-\\[1\\.25\\] {\n stroke-width: 1.25;\n }\n .object-contain {\n object-fit: contain;\n }\n .p-0 {\n padding: calc(0.25rem * 0);\n }\n .p-1 {\n padding: calc(0.25rem * 1);\n }\n .p-2 {\n padding: calc(0.25rem * 2);\n }\n .p-2\\.5 {\n padding: calc(0.25rem * 2.5);\n }\n .p-3 {\n padding: calc(0.25rem * 3);\n }\n .p-3\\.5 {\n padding: calc(0.25rem * 3.5);\n }\n .p-4 {\n padding: calc(0.25rem * 4);\n }\n .p-6 {\n padding: calc(0.25rem * 6);\n }\n .p-7 {\n padding: calc(0.25rem * 7);\n }\n .p-8 {\n padding: calc(0.25rem * 8);\n }\n .px-1 {\n padding-inline: calc(0.25rem * 1);\n }\n .px-2 {\n padding-inline: calc(0.25rem * 2);\n }\n .px-2\\.5 {\n padding-inline: calc(0.25rem * 2.5);\n }\n .px-3 {\n padding-inline: calc(0.25rem * 3);\n }\n .px-4 {\n padding-inline: calc(0.25rem * 4);\n }\n .px-6 {\n padding-inline: calc(0.25rem * 6);\n }\n .px-9 {\n padding-inline: calc(0.25rem * 9);\n }\n .py-0\\.5 {\n padding-block: calc(0.25rem * 0.5);\n }\n .py-1 {\n padding-block: calc(0.25rem * 1);\n }\n .py-1\\.5 {\n padding-block: calc(0.25rem * 1.5);\n }\n .py-2 {\n padding-block: calc(0.25rem * 2);\n }\n .py-2\\.5 {\n padding-block: calc(0.25rem * 2.5);\n }\n .py-3 {\n padding-block: calc(0.25rem * 3);\n }\n .py-3\\.5 {\n padding-block: calc(0.25rem * 3.5);\n }\n .py-4 {\n padding-block: calc(0.25rem * 4);\n }\n .py-4\\.5 {\n padding-block: calc(0.25rem * 4.5);\n }\n .py-5 {\n padding-block: calc(0.25rem * 5);\n }\n .py-6 {\n padding-block: calc(0.25rem * 6);\n }\n .pt-0\\.5 {\n padding-top: calc(0.25rem * 0.5);\n }\n .pt-8 {\n padding-top: calc(0.25rem * 8);\n }\n .pr-2 {\n padding-right: calc(0.25rem * 2);\n }\n .pr-6 {\n padding-right: calc(0.25rem * 6);\n }\n .pr-24 {\n padding-right: calc(0.25rem * 24);\n }\n .pb-1 {\n padding-bottom: calc(0.25rem * 1);\n }\n .pb-3 {\n padding-bottom: calc(0.25rem * 3);\n }\n .pb-4 {\n padding-bottom: calc(0.25rem * 4);\n }\n .pb-5 {\n padding-bottom: calc(0.25rem * 5);\n }\n .pb-6 {\n padding-bottom: calc(0.25rem * 6);\n }\n .pl-0 {\n padding-left: calc(0.25rem * 0);\n }\n .pl-1 {\n padding-left: calc(0.25rem * 1);\n }\n .pl-3 {\n padding-left: calc(0.25rem * 3);\n }\n .pl-7 {\n padding-left: calc(0.25rem * 7);\n }\n .pl-9 {\n padding-left: calc(0.25rem * 9);\n }\n .pl-10 {\n padding-left: calc(0.25rem * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-left {\n text-align: left;\n }\n .align-baseline {\n vertical-align: baseline;\n }\n .align-bottom {\n vertical-align: bottom;\n }\n .align-middle {\n vertical-align: middle;\n }\n .font-sans {\n font-family: var(--atomic-font-family);\n }\n .set-font-size-sm {\n --font-size: var(--atomic-text-sm);\n font-size: var(--font-size);\n --line-height: calc(var(--font-size) * var(--atomic-line-height-ratio));\n line-height: var(--line-height);\n }\n .set-font-size-sm {\n --font-size: var(--atomic-text-sm);\n font-size: var(--font-size);\n --line-height: calc(var(--font-size) * var(--atomic-line-height-ratio));\n line-height: var(--line-height);\n }\n .text-2xl {\n font-size: var(--atomic-text-2xl);\n line-height: var(--tw-leading, calc(2 / 1.5));\n }\n .text-base {\n font-size: var(--atomic-text-base);\n line-height: var(--tw-leading, calc(1.5 / 1));\n }\n .text-lg {\n font-size: var(--atomic-text-lg);\n line-height: var(--tw-leading, calc(1.75 / 1.125));\n }\n .text-sm {\n font-size: var(--atomic-text-sm);\n line-height: var(--tw-leading, calc(1.25 / 0.875));\n }\n .text-xl {\n font-size: var(--atomic-text-xl);\n line-height: var(--tw-leading, calc(1.75 / 1.25));\n }\n .text-xs {\n font-size: 0.75rem;\n line-height: var(--tw-leading, calc(1 / 0.75));\n }\n .text-xs\\/\\[1rem\\] {\n font-size: 0.75rem;\n line-height: 1rem;\n }\n .leading-4 {\n --tw-leading: calc(0.25rem * 4);\n line-height: calc(0.25rem * 4);\n }\n .leading-5 {\n --tw-leading: calc(0.25rem * 5);\n line-height: calc(0.25rem * 5);\n }\n .leading-6 {\n --tw-leading: calc(0.25rem * 6);\n line-height: calc(0.25rem * 6);\n }\n .leading-8 {\n --tw-leading: calc(0.25rem * 8);\n line-height: calc(0.25rem * 8);\n }\n .leading-10 {\n --tw-leading: calc(0.25rem * 10);\n line-height: calc(0.25rem * 10);\n }\n .leading-\\[1\\.5\\] {\n --tw-leading: 1.5;\n line-height: 1.5;\n }\n .leading-\\[calc\\(1\\/\\.75\\)\\] {\n --tw-leading: calc(1 / .75);\n line-height: calc(1 / .75);\n }\n .leading-\\[var\\(--line-height\\)\\] {\n --tw-leading: var(--line-height);\n line-height: var(--line-height);\n }\n .leading-none {\n --tw-leading: 1;\n line-height: 1;\n }\n .font-bold {\n --tw-font-weight: var(--atomic-font-bold);\n font-weight: var(--atomic-font-bold);\n }\n .font-light {\n --tw-font-weight: 300;\n font-weight: 300;\n }\n .font-medium {\n --tw-font-weight: 500;\n font-weight: 500;\n }\n .font-normal {\n --tw-font-weight: var(--atomic-font-normal);\n font-weight: var(--atomic-font-normal);\n }\n .font-semibold {\n --tw-font-weight: 600;\n font-weight: 600;\n }\n .break-words {\n overflow-wrap: break-word;\n }\n .break-all {\n word-break: break-all;\n }\n .break-keep {\n word-break: keep-all;\n }\n .text-ellipsis {\n text-overflow: ellipsis;\n }\n .whitespace-normal {\n white-space: normal;\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .whitespace-pre-wrap {\n white-space: pre-wrap;\n }\n .text-\\[\\#54698D\\] {\n color: #54698D;\n }\n .text-\\[inherit\\] {\n color: inherit;\n }\n .text-black {\n color: #000;\n }\n .text-error {\n color: var(--atomic-error);\n }\n .text-gray-500 {\n color: oklch(0.551 0.027 264.364);\n }\n .text-gray-600 {\n color: oklch(0.446 0.03 256.802);\n }\n .text-gray-700 {\n color: oklch(0.373 0.034 259.733);\n }\n .text-gray-900 {\n color: oklch(0.21 0.034 264.665);\n }\n .text-green-600 {\n color: oklch(0.627 0.194 149.214);\n }\n .text-inline-code {\n color: var(--atomic-inline-code);\n }\n .text-neutral {\n color: var(--atomic-neutral);\n }\n .text-neutral-dark {\n color: var(--atomic-neutral-dark);\n }\n .text-on-background {\n color: var(--atomic-on-background);\n }\n .text-on-primary {\n color: var(--atomic-on-primary);\n }\n .text-primary {\n color: var(--atomic-primary);\n }\n .text-primary-light {\n color: var(--atomic-primary-light);\n }\n .text-rating-icon-active {\n color: var(--atomic-rating-icon-active-color, #f6ce3c);\n }\n .text-rating-icon-inactive {\n color: var(\n --atomic-rating-icon-inactive-color,\n var(--atomic-neutral)\n );\n }\n .text-success {\n color: var(--atomic-success);\n }\n .text-transparent {\n color: transparent;\n }\n .capitalize {\n text-transform: capitalize;\n }\n .lowercase {\n text-transform: lowercase;\n }\n .italic {\n font-style: italic;\n }\n .line-through {\n text-decoration-line: line-through;\n }\n .placeholder-neutral-dark::placeholder {\n color: var(--atomic-neutral-dark);\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-50 {\n opacity: 50%;\n }\n .opacity-80 {\n opacity: 80%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-inner-primary {\n --tw-shadow: inset 0 0 0 1px var(--tw-shadow-color, var(--atomic-primary));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0px 2px 8px var(--tw-shadow-color, rgba(229, 232, 232, 0.75));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-t-lg {\n --tw-shadow: 0px -2px 8px var(--tw-shadow-color, rgba(229, 232, 232, 0.75));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-1 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-3 {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-primary {\n --tw-ring-color: var(--atomic-primary);\n }\n .ring-primary-light {\n --tw-ring-color: var(--atomic-primary-light);\n }\n .ring-ring-primary {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .outline-error {\n outline-color: var(--atomic-error);\n }\n .outline-neutral {\n outline-color: var(--atomic-neutral);\n }\n .outline-primary {\n outline-color: var(--atomic-primary);\n }\n .blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .grayscale {\n --tw-grayscale: grayscale(100%);\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .invert {\n --tw-invert: invert(100%);\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .filter {\n filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);\n }\n .transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));\n transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));\n }\n .transition-\\[visibility\\] {\n transition-property: visibility;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));\n transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));\n transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));\n transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function, cubic-bezier(0.4, 0, 0.2, 1)));\n transition-duration: var(--tw-duration, var(--default-transition-duration, 150ms));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .duration-500 {\n --tw-duration: 500ms;\n transition-duration: 500ms;\n }\n .ease-in-out {\n --tw-ease: cubic-bezier(0.4, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n }\n .\\[grid-area\\:modal\\] {\n grid-area: modal;\n }\n .\\[scrollbar-gutter\\:stable_both-edges\\] {\n scrollbar-gutter: stable both-edges;\n }\n @media (hover: hover) {\n .group-hover\\:visible:is(:where(.group):hover *) {\n visibility: visible;\n }\n }\n @media (hover: hover) {\n .group-hover\\:text-error:is(:where(.group):hover *) {\n color: var(--atomic-error);\n }\n }\n @media (hover: hover) {\n .group-hover\\:text-primary:is(:where(.group):hover *) {\n color: var(--atomic-primary);\n }\n }\n @media (hover: hover) {\n .group-hover\\:text-primary-light:is(:where(.group):hover *) {\n color: var(--atomic-primary-light);\n }\n }\n .group-focus\\:text-primary:is(:where(.group):focus *) {\n color: var(--atomic-primary);\n }\n .group-focus\\:text-primary-light:is(:where(.group):focus *) {\n color: var(--atomic-primary-light);\n }\n .group-focus-visible\\:text-error:is(:where(.group):focus-visible *) {\n color: var(--atomic-error);\n }\n .group-focus-visible\\:text-primary:is(:where(.group):focus-visible *) {\n color: var(--atomic-primary);\n }\n .peer-focus-within\\:border-primary-light:is(:where(.peer):focus-within ~ *) {\n border-color: var(--atomic-primary-light);\n }\n .peer-focus-within\\:text-primary-light:is(:where(.peer):focus-within ~ *) {\n color: var(--atomic-primary-light);\n }\n @media (hover: hover) {\n .peer-hover\\:border-primary-light:is(:where(.peer):hover ~ *) {\n border-color: var(--atomic-primary-light);\n }\n }\n @media (hover: hover) {\n .peer-hover\\:text-error:is(:where(.peer):hover ~ *) {\n color: var(--atomic-error);\n }\n }\n @media (hover: hover) {\n .peer-hover\\:text-primary-light:is(:where(.peer):hover ~ *) {\n color: var(--atomic-primary-light);\n }\n }\n .before\\:inline::before {\n content: var(--tw-content);\n display: inline;\n }\n .before\\:content-\\[\\\'\\,\\\\00a0\\\'\\]::before {\n content: var(--tw-content);\n --tw-content: \',\\00a0\';\n content: var(--tw-content);\n }\n .after\\:absolute::after {\n content: var(--tw-content);\n position: absolute;\n }\n .after\\:-bottom-0\\.5::after {\n content: var(--tw-content);\n bottom: calc(0.25rem * -0.5);\n }\n .after\\:block::after {\n content: var(--tw-content);\n display: block;\n }\n .after\\:h-1::after {\n content: var(--tw-content);\n height: calc(0.25rem * 1);\n }\n .after\\:w-full::after {\n content: var(--tw-content);\n width: 100%;\n }\n .after\\:rounded::after {\n content: var(--tw-content);\n border-radius: var(--atomic-border-radius);\n }\n .after\\:bg-primary::after {\n content: var(--tw-content);\n background-color: var(--atomic-primary);\n }\n .focus-within\\:border-disabled:focus-within {\n border-color: var(--atomic-disabled);\n }\n .focus-within\\:border-primary:focus-within {\n border-color: var(--atomic-primary);\n }\n .focus-within\\:ring-3:focus-within {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .focus-within\\:ring-neutral:focus-within {\n --tw-ring-color: var(--atomic-neutral);\n }\n .focus-within\\:ring-ring-primary:focus-within {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n @media (hover: hover) {\n .hover\\:border:hover {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n }\n @media (hover: hover) {\n .hover\\:border-error:hover {\n border-color: var(--atomic-error);\n }\n }\n @media (hover: hover) {\n .hover\\:border-primary-light:hover {\n border-color: var(--atomic-primary-light);\n }\n }\n @media (hover: hover) {\n .hover\\:bg-error:hover {\n background-color: var(--atomic-error);\n }\n }\n @media (hover: hover) {\n .hover\\:bg-neutral-light:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n @media (hover: hover) {\n .hover\\:bg-primary-light:hover {\n background-color: var(--atomic-primary-light);\n }\n }\n @media (hover: hover) {\n .hover\\:bg-transparent:hover {\n background-color: transparent;\n }\n }\n @media (hover: hover) {\n .hover\\:fill-white:hover {\n fill: #fff;\n }\n }\n @media (hover: hover) {\n .hover\\:text-primary-light:hover {\n color: var(--atomic-primary-light);\n }\n }\n @media (hover: hover) {\n .hover\\:underline:hover {\n text-decoration-line: underline;\n }\n }\n @media (hover: hover) {\n .hover\\:opacity-100:hover {\n opacity: 100%;\n }\n }\n @media (hover: hover) {\n .hover\\:shadow-sm:hover {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:opacity-100:focus {\n opacity: 100%;\n }\n .focus\\:outline-hidden:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n @media (forced-colors: active) {\n .focus\\:outline-hidden:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n }\n .focus-visible\\:border:focus-visible {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .focus-visible\\:border-error:focus-visible {\n border-color: var(--atomic-error);\n }\n .focus-visible\\:border-primary:focus-visible {\n border-color: var(--atomic-primary);\n }\n .focus-visible\\:border-primary-light:focus-visible {\n border-color: var(--atomic-primary-light);\n }\n .focus-visible\\:bg-error:focus-visible {\n background-color: var(--atomic-error);\n }\n .focus-visible\\:bg-neutral-light:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .focus-visible\\:bg-primary-light:focus-visible {\n background-color: var(--atomic-primary-light);\n }\n .focus-visible\\:text-primary-light:focus-visible {\n color: var(--atomic-primary-light);\n }\n .focus-visible\\:underline:focus-visible {\n text-decoration-line: underline;\n }\n .focus-visible\\:ring-2:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .focus-visible\\:outline-none:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n @media (width >= 40rem) {\n .sm\\:px-6 {\n padding-inline: calc(0.25rem * 6);\n }\n }\n .\\[part\\=\\"breadcrumb-button\\"\\]\\:visible:is(part="breadcrumb-button") {\n visibility: visible;\n }\n}\n@layer theme, base, components, utilities;\n@layer components {\n .input-primary {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n }\n @media (hover: hover) {\n .input-primary:hover {\n border-color: var(--atomic-primary-light);\n }\n }\n .input-primary:focus-visible {\n border-color: var(--atomic-primary);\n }\n .input-primary:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .input-primary:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .input-primary:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-radio {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n .btn-radio::before {\n content: var(--tw-content);\n --tw-content: attr(value);\n content: var(--tw-content);\n }\n .btn-primary {\n border-radius: var(--atomic-border-radius);\n background-color: var(--atomic-primary);\n color: var(--atomic-on-primary);\n }\n @media (hover: hover) {\n .btn-primary:hover {\n background-color: var(--atomic-primary-light);\n }\n }\n .btn-primary:focus-visible {\n background-color: var(--atomic-primary-light);\n }\n .btn-primary:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-primary:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-primary:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-primary:disabled {\n cursor: not-allowed;\n }\n .btn-primary:disabled {\n background-color: var(--atomic-disabled);\n }\n .btn-outline-primary {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-primary);\n }\n @media (hover: hover) {\n .btn-outline-primary:hover {\n border-color: var(--atomic-primary-light);\n }\n }\n @media (hover: hover) {\n .btn-outline-primary:hover {\n color: var(--atomic-primary-light);\n }\n }\n .btn-outline-primary:focus-visible {\n border-color: var(--atomic-primary);\n }\n .btn-outline-primary:focus-visible {\n color: var(--atomic-primary);\n }\n .btn-outline-primary:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-outline-primary:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-outline-primary:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-primary:disabled {\n cursor: not-allowed;\n }\n .btn-outline-primary:disabled {\n border-color: var(--atomic-neutral);\n }\n .btn-outline-primary:disabled {\n color: var(--atomic-neutral);\n }\n .btn-text-primary {\n border-radius: var(--atomic-border-radius);\n background-color: var(--atomic-background);\n color: var(--atomic-primary);\n }\n @media (hover: hover) {\n .btn-text-primary:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n .btn-text-primary:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .btn-text-primary:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-neutral {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-outline-neutral:hover {\n border-color: var(--atomic-primary);\n }\n }\n @media (hover: hover) {\n .btn-outline-neutral:hover {\n color: var(--atomic-primary);\n }\n }\n .btn-outline-neutral:focus-visible {\n border-color: var(--atomic-primary);\n }\n .btn-outline-neutral:focus-visible {\n color: var(--atomic-primary);\n }\n .btn-outline-neutral:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-outline-neutral:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-outline-neutral:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-neutral:disabled {\n cursor: not-allowed;\n }\n .btn-outline-neutral:disabled {\n border-color: var(--atomic-neutral);\n }\n .btn-outline-neutral:disabled {\n color: var(--atomic-on-background);\n }\n .btn-outline-neutral:disabled {\n opacity: 50%;\n }\n .btn-outline-bg-neutral {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-outline-bg-neutral:hover {\n border-color: var(--atomic-primary);\n }\n }\n @media (hover: hover) {\n .btn-outline-bg-neutral:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n @media (hover: hover) {\n .btn-outline-bg-neutral:hover {\n color: var(--atomic-primary);\n }\n }\n .btn-outline-bg-neutral:focus-visible {\n border-color: var(--atomic-primary);\n }\n .btn-outline-bg-neutral:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .btn-outline-bg-neutral:focus-visible {\n color: var(--atomic-primary);\n }\n .btn-outline-bg-neutral:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-outline-bg-neutral:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-outline-bg-neutral:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-bg-neutral:disabled {\n cursor: not-allowed;\n }\n .btn-outline-bg-neutral:disabled {\n border-color: var(--atomic-neutral);\n }\n .btn-outline-bg-neutral:disabled {\n color: var(--atomic-on-background);\n }\n .btn-outline-bg-neutral:disabled {\n opacity: 50%;\n }\n .btn-outline-bg-error {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-outline-bg-error:hover {\n border-color: var(--atomic-primary);\n }\n }\n @media (hover: hover) {\n .btn-outline-bg-error:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n @media (hover: hover) {\n .btn-outline-bg-error:hover {\n color: var(--atomic-primary);\n }\n }\n .btn-outline-bg-error:focus-visible {\n border-color: var(--atomic-primary);\n }\n .btn-outline-bg-error:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .btn-outline-bg-error:focus-visible {\n color: var(--atomic-primary);\n }\n .btn-outline-bg-error:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-outline-bg-error:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-outline-bg-error:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-bg-error:disabled {\n cursor: not-allowed;\n }\n .btn-outline-bg-error:disabled {\n border-color: var(--atomic-neutral);\n }\n .btn-outline-bg-error:disabled {\n color: var(--atomic-on-background);\n }\n .btn-outline-bg-error:disabled {\n opacity: 50%;\n }\n .btn-outline-error {\n border-radius: var(--atomic-border-radius);\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-outline-error:hover {\n border-color: var(--atomic-error);\n }\n }\n @media (hover: hover) {\n .btn-outline-error:hover {\n color: var(--atomic-error);\n }\n }\n .btn-outline-error:focus-visible {\n border-color: var(--atomic-error);\n }\n .btn-outline-error:focus-visible {\n color: var(--atomic-error);\n }\n .btn-outline-error:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .btn-outline-error:focus-visible {\n --tw-ring-color: var(--atomic-ring-primary);\n }\n .btn-outline-error:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-outline-error:disabled {\n cursor: not-allowed;\n }\n .btn-outline-error:disabled {\n border-color: var(--atomic-neutral);\n }\n .btn-outline-error:disabled {\n color: var(--atomic-on-background);\n }\n .btn-outline-error:disabled {\n opacity: 50%;\n }\n .btn-text-neutral {\n border-radius: var(--atomic-border-radius);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-text-neutral:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n @media (hover: hover) {\n .btn-text-neutral:hover {\n color: var(--atomic-primary);\n }\n }\n .btn-text-neutral:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .btn-text-neutral:focus-visible {\n color: var(--atomic-primary);\n }\n .btn-text-neutral:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-text-transparent {\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-text-transparent:hover {\n color: var(--atomic-primary-light);\n }\n }\n .btn-text-transparent:focus-visible {\n color: var(--atomic-primary-light);\n }\n .btn-square-neutral {\n border-style: var(--tw-border-style);\n border-width: 1px;\n border-color: var(--atomic-neutral);\n background-color: var(--atomic-background);\n color: var(--atomic-on-background);\n }\n @media (hover: hover) {\n .btn-square-neutral:hover {\n background-color: var(--atomic-neutral-light);\n }\n }\n .btn-square-neutral:focus-visible {\n background-color: var(--atomic-neutral-light);\n }\n .btn-square-neutral:focus-visible {\n --tw-outline-style: none;\n outline-style: none;\n }\n .btn-page {\n display: grid;\n height: calc(0.25rem * 10);\n width: calc(0.25rem * 10);\n place-items: center;\n border-style: var(--tw-border-style);\n border-width: 0px;\n font-size: var(--atomic-text-lg);\n line-height: var(--tw-leading, calc(1.75 / 1.125));\n }\n @media (hover: hover) {\n .btn-page:hover {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n }\n .btn-page:focus-visible {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .btn-page.selected {\n border-style: var(--tw-border-style);\n border-width: 2px;\n border-color: var(--atomic-primary);\n --tw-font-weight: var(--atomic-font-bold);\n font-weight: var(--atomic-font-bold);\n }\n}\n@layer base {\n :host {\n display: block;\n }\n :host, button, input, select {\n font-family: var(--atomic-font-family);\n font-size: var(--atomic-text-base);\n line-height: var(--tw-leading, calc(1.5 / 1));\n --tw-font-weight: var(--atomic-font-normal);\n font-weight: var(--atomic-font-normal);\n }\n button {\n cursor: pointer;\n }\n :host(.atomic-hidden) {\n display: none;\n }\n .ripple {\n position: absolute;\n pointer-events: none;\n transform: scale(0);\n border-radius: 50%;\n animation: ripple var(--animation-duration) linear;\n }\n .ripple-relative {\n position: relative;\n }\n .ripple-parent {\n overflow: hidden;\n }\n @keyframes ripple {\n to {\n transform: scale(4);\n opacity: 0;\n }\n }\n}\n@property --tw-translate-x {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-scale-x {\n syntax: "*";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: "*";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: "*";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-rotate-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: "*";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: "*";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-space-x-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-divide-y-reverse {\n syntax: "*";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-gradient-position {\n syntax: "*";\n inherits: false;\n}\n@property --tw-gradient-from {\n syntax: "<color>";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-via {\n syntax: "<color>";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-to {\n syntax: "<color>";\n inherits: false;\n initial-value: #0000;\n}\n@property --tw-gradient-stops {\n syntax: "*";\n inherits: false;\n}\n@property --tw-gradient-via-stops {\n syntax: "*";\n inherits: false;\n}\n@property --tw-gradient-from-position {\n syntax: "<length-percentage>";\n inherits: false;\n initial-value: 0%;\n}\n@property --tw-gradient-via-position {\n syntax: "<length-percentage>";\n inherits: false;\n initial-value: 50%;\n}\n@property --tw-gradient-to-position {\n syntax: "<length-percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-leading {\n syntax: "*";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: "<length>";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: "*";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: "*";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: "*";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-blur {\n syntax: "*";\n inherits: false;\n}\n@property --tw-brightness {\n syntax: "*";\n inherits: false;\n}\n@property --tw-contrast {\n syntax: "*";\n inherits: false;\n}\n@property --tw-grayscale {\n syntax: "*";\n inherits: false;\n}\n@property --tw-hue-rotate {\n syntax: "*";\n inherits: false;\n}\n@property --tw-invert {\n syntax: "*";\n inherits: false;\n}\n@property --tw-opacity {\n syntax: "*";\n inherits: false;\n}\n@property --tw-saturate {\n syntax: "*";\n inherits: false;\n}\n@property --tw-sepia {\n syntax: "*";\n inherits: false;\n}\n@property --tw-drop-shadow {\n syntax: "*";\n inherits: false;\n}\n@property --tw-drop-shadow-color {\n syntax: "*";\n inherits: false;\n}\n@property --tw-drop-shadow-alpha {\n syntax: "<percentage>";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-drop-shadow-size {\n syntax: "*";\n inherits: false;\n}\n@property --tw-duration {\n syntax: "*";\n inherits: false;\n}\n@property --tw-ease {\n syntax: "*";\n inherits: false;\n}\n@property --tw-content {\n syntax: "*";\n initial-value: "";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-space-x-reverse: 0;\n --tw-divide-y-reverse: 0;\n --tw-border-style: solid;\n --tw-gradient-position: initial;\n --tw-gradient-from: #0000;\n --tw-gradient-via: #0000;\n --tw-gradient-to: #0000;\n --tw-gradient-stops: initial;\n --tw-gradient-via-stops: initial;\n --tw-gradient-from-position: 0%;\n --tw-gradient-via-position: 50%;\n --tw-gradient-to-position: 100%;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-blur: initial;\n --tw-brightness: initial;\n --tw-contrast: initial;\n --tw-grayscale: initial;\n --tw-hue-rotate: initial;\n --tw-invert: initial;\n --tw-opacity: initial;\n --tw-saturate: initial;\n --tw-sepia: initial;\n --tw-drop-shadow: initial;\n --tw-drop-shadow-color: initial;\n --tw-drop-shadow-alpha: 100%;\n --tw-drop-shadow-size: initial;\n --tw-duration: initial;\n --tw-ease: initial;\n --tw-content: "";\n }\n }\n}\n';const y=f;var x=undefined&&undefined.__decorate||function(n,r,t,e){var i=arguments.length,a=i<3?r:e===null?e=Object.getOwnPropertyDescriptor(r,t):e,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(n,r,t,e);else for(var l=n.length-1;l>=0;l--)if(o=n[l])a=(i<3?o(a):i>3?o(r,t,a):o(r,t))||a;return i>3&&a&&Object.defineProperty(r,t,a),a};const k=class{constructor(n){t(this,n);this.scrollToTopEvent=e(this,"atomic/scrollToTop",7);this.isAppLoaded=false;this.numberOfPages=5;this.previousButtonIcon=o;this.nextButtonIcon=l;this.radioGroupName=w("atomic-pager-");this.pagerState=undefined;this.searchStatusState=undefined;this.error=undefined;this.isAppLoaded=false;this.numberOfPages=5;this.previousButtonIcon=o;this.nextButtonIcon=l}initialize(){this.searchStatus=i(this.bindings.engine);this.pager=a(this.bindings.engine,{options:{numberOfPages:this.numberOfPages}});m(this.bindings.store,(n=>{this.isAppLoaded=n}))}render(){return n(u,{key:"227984449aa93173867e06dde5d38b7f999647b3",hasError:this.searchStatusState.hasError,hasItems:this.searchStatusState.hasResults,isAppLoaded:this.isAppLoaded},n(h,{key:"8de0c991a0435c307fcd6ea9d3afc2d360ba9c7a",i18n:this.bindings.i18n},n(p,{key:"6cfc995533d08e90042a8c7ddce596352b0b64cd",icon:this.previousButtonIcon,disabled:!this.pagerState.hasPreviousPage,i18n:this.bindings.i18n,onClick:()=>{this.pager.previousPage();this.focusOnFirstResultAndScrollToTop()}}),n(g,{key:"3110b9c8c348a9f52cf6568ef083dda6eca15d40",i18n:this.bindings.i18n},this.pagerState.currentPages.map((r=>n(b,{isSelected:this.pager.isCurrentPage(r),ariaLabel:this.bindings.i18n.t("page-number",{pageNumber:r}),onChecked:()=>{this.pager.selectPage(r);this.focusOnFirstResultAndScrollToTop()},page:r,groupName:this.radioGroupName,text:r.toLocaleString(this.bindings.i18n.language)})))),n(v,{key:"77d2397e1346753b18db870cb1d5fe8c5f67e07c",icon:this.nextButtonIcon,disabled:!this.pagerState.hasNextPage,i18n:this.bindings.i18n,onClick:()=>{this.pager.nextPage();this.focusOnFirstResultAndScrollToTop()}})))}async focusOnFirstResultAndScrollToTop(){await(this.bindings.store.state.resultList?.focusOnFirstResultAfterNextSearch());this.scrollToTopEvent.emit()}};x([c()],k.prototype,"bindings",void 0);x([d("pager")],k.prototype,"pagerState",void 0);x([d("searchStatus")],k.prototype,"searchStatusState",void 0);k.style=y;export{k as atomic_pager};
|
2
|
-
//# sourceMappingURL=p-6de44060.entry.js.map
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{c as o}from"./p-c9074946.js";import{b as t}from"./p-1580513b.js";const e=["atomic-search-box","atomic-insight-search-box","atomic-commerce-search-box"];const n=o=>"updateComplete"in o&&o.updateComplete instanceof Promise;const s=async(o,e,s)=>{await customElements.whenDefined(o.nodeName.toLowerCase());if(n(o)){await o.updateComplete}else if("componentOnReady"in o){await o.componentOnReady()}e.dispatchEvent(t("atomic/searchBoxSuggestion/register",s))};const a=(t,n,a=e)=>{const i=o(n,e.join(", "));if(!i){throw new Error(`The "${n.nodeName.toLowerCase()}" component was not handled, as it is not a child of the following elements: ${a.join(", ")}`)}void s(i,n,t)};function i(o){return!o.query||o.query.trim()===""}function c(o){return!!o.query&&o.query.trim()!==""}export{i as a,a as d,c as e};
|
2
|
-
//# sourceMappingURL=p-7601c3de.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["searchBoxElements","isLitElementLoosely","candidate","updateComplete","Promise","dispatchSearchBoxSuggestionsEventEventually","async","interfaceElement","element","event","customElements","whenDefined","nodeName","toLowerCase","componentOnReady","dispatchEvent","buildCustomEvent","dispatchSearchBoxSuggestionsEvent","allowedSearchBoxElements","closest","join","Error","elementHasNoQuery","el","query","trim","elementHasQuery"],"sources":["src/components/common/suggestions/suggestions-common.ts"],"sourcesContent":["import type {VNode} from '@stencil/core';\nimport type {HTMLStencilElement} from '@stencil/core/internal';\nimport type {LitElement} from 'lit';\nimport {closest} from '../../../utils/dom-utils';\nimport {buildCustomEvent} from '../../../utils/event-utils';\nimport type {AnyBindings} from '../interface/bindings';\n\n/**\n * Element which will be rendered in the list of suggestions.\n */\nexport interface SearchBoxSuggestionElement {\n /**\n * Stable identity which enables Stencil to reuse DOM elements for better performance.\n * The best way to pick a key is to use a string that uniquely identifies that list item among its siblings (often your data will already have IDs).\n */\n key: string;\n /**\n * Rendered content of the element.\n *\n * @remarks\n * The `VNode` type will be deprecated in v4 as we are detaching from Stencil.\n */\n content: Element | VNode;\n /**\n * Hook called when the selection is selected.\n * @param e DOM event.\n */\n onSelect?(e: Event): void;\n /**\n * The query associated with the suggestion which will replace the query in the search box if the suggestion is selected.\n */\n query?: string;\n /**\n * For improved accessibility, provide this property with additional information.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label\n */\n ariaLabel?: string;\n /**\n * Adds a specific shadow part attribute that can be selected with the CSS ::part pseudo-element.\n * https://developer.mozilla.org/en-US/docs/Web/CSS/::part\n */\n part?: string;\n /**\n * Hide the suggestion if it's the last in the list.\n */\n hideIfLast?: boolean;\n}\n\n/**\n * List of suggestions that will be displayed along other lists (e.g recent queries) when the search box's input is selected.\n */\nexport interface SearchBoxSuggestions {\n /**\n * The search box will sort the position of suggestions using this value. The lowest value being first.\n * By default, the DOM position will be used.\n */\n position: number;\n /**\n * Whether the suggestions should be listed in the right or left panel. By default, the suggestions are listed in the right panel.\n */\n panel?: 'left' | 'right';\n /**\n * Method that returns the list of elements which will be rendered in the list of suggestions.\n */\n renderItems(): SearchBoxSuggestionElement[];\n /**\n * Hook called when the user changes the search box's input value. This can lead to all the query suggestions being updated.\n */\n onInput?(): Promise<unknown>;\n /**\n * Hook called when the suggested query changes as a user traverses through the list of suggestions.\n * This is used for instant results, which are rendered based on the current suggested query.\n * @param q The new suggested query.\n */\n onSuggestedQueryChange?(q: string): Promise<unknown>;\n}\n\n/**\n * Event sent from the registered query suggestions to the parent search box.\n */\nexport type SearchBoxSuggestionsEvent<\n SearchBoxController,\n Bindings = AnyBindings,\n> = (\n /**\n * The bindings passed from the search box to the suggestions.\n */\n bindings: SearchBoxSuggestionsBindings<SearchBoxController, Bindings>\n) => SearchBoxSuggestions;\n\nconst searchBoxElements = [\n 'atomic-search-box',\n 'atomic-insight-search-box',\n 'atomic-commerce-search-box',\n] as const;\n\n/**\n * The bindings passed from the search box to the suggestions.\n */\nexport type SearchBoxSuggestionsBindings<\n SearchBoxController,\n Bindings = AnyBindings,\n> = Bindings & {\n /**\n * The unique id of the search box.\n */\n id: string;\n /**\n * Whether the search box is [standalone](https://docs.coveo.com/en/atomic/latest/usage/ssb/).\n */\n isStandalone: boolean;\n /**\n * The search box headless controller.\n */\n searchBoxController: SearchBoxController;\n /**\n * The number of queries to display when the user interacts with the search box.\n */\n numberOfQueries: number;\n /**\n * Whether to clear all active query filters when the end user submits a new query from the search box.\n */\n clearFilters: boolean;\n /**\n * Retrieves the suggested query, meaning the query that would be sent if the search is executed.\n * The suggested query changes as a user traverses through the list of suggestions.\n */\n suggestedQuery(): string;\n /**\n * Removes the current suggestions.\n */\n clearSuggestions(): void;\n /**\n * Triggers update & retrieval of all suggestions.\n */\n triggerSuggestions(): void;\n /**\n * Retrieves the current suggestions.\n */\n getSuggestions(): SearchBoxSuggestions[];\n /**\n * Retrieves the current suggestions elements.\n */\n getSuggestionElements(): SearchBoxSuggestionElement[];\n};\n\nconst isLitElementLoosely = (candidate: unknown): candidate is LitElement =>\n 'updateComplete' in (candidate as LitElement) &&\n (candidate as LitElement).updateComplete instanceof Promise;\n\nconst dispatchSearchBoxSuggestionsEventEventually = async <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n interfaceElement: Element,\n element: HTMLElement,\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>\n) => {\n await customElements.whenDefined(interfaceElement.nodeName.toLowerCase());\n if (isLitElementLoosely(interfaceElement)) {\n await interfaceElement.updateComplete;\n } else if ('componentOnReady' in interfaceElement) {\n await (interfaceElement as HTMLStencilElement).componentOnReady();\n }\n element.dispatchEvent(\n buildCustomEvent('atomic/searchBoxSuggestion/register', event)\n );\n};\n\n/**\n * Dispatches an event which retrieves the `SearchBoxSuggestionsBindings` on a configured parent search box.\n * @param event Event sent from the registered query suggestions to the parent search box.\n * @param element Element on which to dispatch the event, which must be the child of a configured search box.\n */\nexport const dispatchSearchBoxSuggestionsEvent = <\n SearchBoxController,\n Bindings = AnyBindings,\n>(\n event: SearchBoxSuggestionsEvent<SearchBoxController, Bindings>,\n element: HTMLElement,\n allowedSearchBoxElements: readonly (typeof searchBoxElements)[number][] = searchBoxElements\n) => {\n const interfaceElement = closest(element, searchBoxElements.join(', '));\n if (!interfaceElement) {\n throw new Error(\n `The \"${element.nodeName.toLowerCase()}\" component was not handled, as it is not a child of the following elements: ${allowedSearchBoxElements.join(\n ', '\n )}`\n );\n }\n void dispatchSearchBoxSuggestionsEventEventually(\n interfaceElement,\n element,\n event\n );\n};\n\nexport function elementHasNoQuery(el: SearchBoxSuggestionElement) {\n return !el.query || el.query.trim() === '';\n}\n\nexport function elementHasQuery(el: SearchBoxSuggestionElement) {\n return !!el.query && el.query.trim() !== '';\n}\n"],"mappings":"wEA0FA,MAAMA,EAAoB,CACxB,oBACA,4BACA,8BAqDF,MAAMC,EAAuBC,GAC3B,mBAAqBA,GACpBA,EAAyBC,0BAA0BC,QAEtD,MAAMC,EAA8CC,MAIlDC,EACAC,EACAC,WAEMC,eAAeC,YAAYJ,EAAiBK,SAASC,eAC3D,GAAIZ,EAAoBM,GAAmB,OACnCA,EAAiBJ,c,MAClB,GAAI,qBAAsBI,EAAkB,OAC1CA,EAAwCO,kB,CAEjDN,EAAQO,cACNC,EAAiB,sCAAuCP,GACzD,E,MAQUQ,EAAoC,CAI/CR,EACAD,EACAU,EAA0ElB,KAE1E,MAAMO,EAAmBY,EAAQX,EAASR,EAAkBoB,KAAK,OACjE,IAAKb,EAAkB,CACrB,MAAM,IAAIc,MACR,QAAQb,EAAQI,SAASC,6FAA6FK,EAAyBE,KAC7I,Q,MAIDf,EACHE,EACAC,EACAC,EACD,E,SAGaa,EAAkBC,GAChC,OAAQA,EAAGC,OAASD,EAAGC,MAAMC,SAAW,EAC1C,C,SAEgBC,EAAgBH,GAC9B,QAASA,EAAGC,OAASD,EAAGC,MAAMC,SAAW,EAC3C,Q","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["AtomicSearchBoxQuerySuggestions","componentWillLoad","dispatchSearchBoxSuggestionsEvent","bindings","this","initialize","host","error","engine","registerQuerySuggest","fetchQuerySuggestions","loadQuerySuggestActions","dispatch","id","count","numberOfQueries","position","Array","from","parentNode","children","indexOf","onInput","renderItems","hasQuery","searchBoxController","state","value","max","maxWithQuery","maxWithoutQuery","suggestions","slice","map","suggestion","renderItem","partialItem","getPartialSearchBoxSuggestionElement","i18n","content","h","QuerySuggestionContainer","QuerySuggestionIcon","icon","SearchIcon","hasSuggestion","getSuggestions","length","QuerySuggestionText","onSelect","selectSuggestion","rawValue","render","key","element","getPartialRecentQueryElement","part","query","encodeForDomAttribute","ariaLabel","t","interpolation","escapeValue","getPartialRecentQueryClearElement","hideIfLast","RecentQueriesContainer","_","class","RecentQueryIcon","RecentQueryText","innerHTML","HighlightUtils","highlightString","openingDelimiter","closingDelimiter","highlights","offset","RecentQueryClear","AtomicSearchBoxRecentQueries","warnUser","once","logger","warn","renderIcon","Clock","storage","SafeStorage","recentQueriesList","buildRecentQueriesList","initialState","queries","retrieveLocalStorage","options","maxLength","clearFilters","subscribe","updateLocalStorage","getParsedJSON","StorageItems","RECENT_QUERIES","analyticsEnabled","disableFeature","setJSON","removeItem","filteredQueries","filter","recentQuery","toLowerCase","startsWith","suggestionElements","unshift","renderClear","clear","triggerSuggestions","isStandalone","updateText","submit","executeRecentQuery"],"sources":["src/components/search/search-box-suggestions/atomic-search-box-query-suggestions/atomic-search-box-query-suggestions.tsx","src/components/common/suggestions/stencil-recent-queries.tsx","src/components/search/search-box-suggestions/atomic-search-box-recent-queries/atomic-search-box-recent-queries.tsx"],"sourcesContent":["import {\n loadQuerySuggestActions,\n SearchBox,\n SearchEngine,\n Suggestion,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport SearchIcon from '../../../../images/search.svg';\nimport {\n getPartialSearchBoxSuggestionElement,\n QuerySuggestionContainer,\n QuerySuggestionIcon,\n QuerySuggestionText,\n} from '../../../common/suggestions/stencil-query-suggestions';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-common';\n\n/**\n * The `atomic-search-box-query-suggestions` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of query suggestion behavior.\n */\n@Component({\n tag: 'atomic-search-box-query-suggestions',\n shadow: true,\n})\nexport class AtomicSearchBoxQuerySuggestions {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox>;\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly.\n */\n @Prop() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery?: number;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private initialize(): SearchBoxSuggestions {\n const engine = this.bindings.engine as SearchEngine<{\n querySet: string;\n querySuggest: string;\n }>;\n const {registerQuerySuggest, fetchQuerySuggestions} =\n loadQuerySuggestActions(engine);\n\n engine.dispatch(\n registerQuerySuggest({\n id: this.bindings.id,\n count: this.bindings.numberOfQueries,\n })\n );\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n onInput: () =>\n engine.dispatch(\n fetchQuerySuggestions({\n id: this.bindings.id,\n })\n ),\n renderItems: () => this.renderItems(),\n };\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n return this.bindings.searchBoxController.state.suggestions\n .slice(0, max)\n .map((suggestion) => this.renderItem(suggestion));\n }\n\n private renderItem(suggestion: Suggestion) {\n const hasQuery = this.bindings.searchBoxController.state.value !== '';\n const partialItem = getPartialSearchBoxSuggestionElement(\n suggestion,\n this.bindings.i18n\n );\n\n return {\n ...partialItem,\n content: (\n <QuerySuggestionContainer>\n <QuerySuggestionIcon\n icon={this.icon || SearchIcon}\n hasSuggestion={this.bindings.getSuggestions().length > 1}\n />\n\n <QuerySuggestionText suggestion={suggestion} hasQuery={hasQuery} />\n </QuerySuggestionContainer>\n ),\n onSelect: () => {\n this.bindings.searchBoxController.selectSuggestion(suggestion.rawValue);\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n","import {HighlightUtils} from '@coveo/headless';\nimport {FunctionalComponent, h} from '@stencil/core';\nimport {i18n} from 'i18next';\nimport {encodeForDomAttribute} from '../../../utils/string-utils';\nimport {SearchBoxSuggestionElement} from './suggestions-common';\n\nexport const getPartialRecentQueryElement = (\n value: string,\n i18n: i18n\n): Pick<SearchBoxSuggestionElement, 'ariaLabel' | 'key' | 'query' | 'part'> => {\n return {\n part: 'recent-query-item',\n query: value,\n key: `recent-${encodeForDomAttribute(value)}`,\n ariaLabel: i18n.t('recent-query-suggestion-label', {\n query: value,\n interpolation: {escapeValue: false},\n }),\n };\n};\n\nexport const getPartialRecentQueryClearElement = (\n i18n: i18n\n): Pick<\n SearchBoxSuggestionElement,\n 'ariaLabel' | 'key' | 'part' | 'hideIfLast'\n> => {\n return {\n key: 'recent-query-clear',\n ariaLabel: i18n.t('clear-recent-searches', {\n interpolation: {escapeValue: false},\n }),\n part: 'recent-query-title-item suggestion-divider',\n hideIfLast: true,\n };\n};\n\nexport const RecentQueriesContainer: FunctionalComponent = (_, children) => {\n return (\n <div\n part=\"recent-query-content\"\n class=\"flex items-center text-left break-all\"\n >\n {children}\n </div>\n );\n};\n\ninterface RecentQueryIconProps {\n icon: string;\n}\n\nexport const RecentQueryIcon: FunctionalComponent<RecentQueryIconProps> = ({\n icon,\n}) => {\n return (\n <atomic-icon\n part=\"recent-query-icon\"\n icon={icon}\n class=\"mr-2 h-4 w-4 shrink-0\"\n ></atomic-icon>\n );\n};\n\ninterface RecentQueryTextProps {\n query: string;\n value: string;\n}\n\nexport const RecentQueryText: FunctionalComponent<RecentQueryTextProps> = ({\n query,\n value,\n}) => {\n if (query === '') {\n return (\n <span part=\"recent-query-text\" class=\"line-clamp-2 break-all\">\n {value}\n </span>\n );\n }\n return (\n <span\n part=\"recent-query-text\"\n class=\"line-clamp-2 break-all\"\n innerHTML={HighlightUtils.highlightString({\n content: value,\n openingDelimiter:\n '<span part=\"recent-query-text-highlight\" class=\"font-bold\">',\n closingDelimiter: '</span>',\n highlights: [\n {\n offset: query.length,\n length: value.length - query.length,\n },\n ],\n })}\n ></span>\n );\n};\n\ninterface RecentQueryClearProps {\n i18n: i18n;\n}\n\nexport const RecentQueryClear: FunctionalComponent<RecentQueryClearProps> = ({\n i18n,\n}) => {\n return (\n <div part=\"recent-query-title-content\" class=\"flex w-full justify-between\">\n <span class=\"font-bold\" part=\"recent-query-title\">\n {i18n.t('recent-searches')}\n </span>\n <span part=\"recent-query-clear\">{i18n.t('clear')}</span>\n </div>\n );\n};\n","import {\n buildRecentQueriesList,\n RecentQueriesList,\n SearchBox,\n} from '@coveo/headless';\nimport {Component, Element, Prop, State, h} from '@stencil/core';\nimport Clock from '../../../../images/clock.svg';\nimport {SafeStorage, StorageItems} from '../../../../utils/local-storage-utils';\nimport {once} from '../../../../utils/utils';\nimport {\n getPartialRecentQueryClearElement,\n getPartialRecentQueryElement,\n RecentQueriesContainer,\n RecentQueryClear,\n RecentQueryIcon,\n RecentQueryText,\n} from '../../../common/suggestions/stencil-recent-queries';\nimport {\n dispatchSearchBoxSuggestionsEvent,\n SearchBoxSuggestionElement,\n SearchBoxSuggestions,\n SearchBoxSuggestionsBindings,\n} from '../../../common/suggestions/suggestions-common';\nimport {Bindings} from '../../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-search-box-recent-queries` component can be added as a child of an `atomic-search-box` component, allowing for the configuration of recent query suggestions.\n */\n@Component({\n tag: 'atomic-search-box-recent-queries',\n shadow: true,\n})\nexport class AtomicSearchBoxRecentQueries {\n private bindings!: SearchBoxSuggestionsBindings<SearchBox, Bindings>;\n private recentQueriesList!: RecentQueriesList;\n private storage!: SafeStorage;\n\n @Element() private host!: HTMLElement;\n\n @State() public error!: Error;\n\n /**\n * The SVG icon to display.\n *\n * - Use a value that starts with `http://`, `https://`, `./`, or `../`, to fetch and display an icon from a given location.\n * - Use a value that starts with `assets://`, to display an icon from the Atomic package.\n * - Use a stringified SVG to display it directly.\n */\n @Prop() public icon?: string;\n\n /**\n * The maximum number of suggestions that will be displayed if the user has typed something into the input field.\n */\n @Prop({reflect: true}) public maxWithQuery = 3;\n /**\n * The maximum number of suggestions that will be displayed initially when the input field is empty.\n */\n @Prop({reflect: true}) public maxWithoutQuery?: number;\n\n componentWillLoad() {\n try {\n dispatchSearchBoxSuggestionsEvent<SearchBox, Bindings>(\n (bindings) => {\n this.bindings = bindings;\n return this.initialize();\n },\n this.host,\n ['atomic-search-box']\n );\n } catch (error) {\n this.error = error as Error;\n }\n }\n\n private renderIcon() {\n return this.icon || Clock;\n }\n\n private initialize(): SearchBoxSuggestions {\n this.storage = new SafeStorage();\n this.recentQueriesList = buildRecentQueriesList(this.bindings.engine, {\n initialState: {queries: this.retrieveLocalStorage()},\n options: {maxLength: 1000, clearFilters: this.bindings.clearFilters},\n });\n\n this.recentQueriesList.subscribe(() => this.updateLocalStorage());\n\n return {\n position: Array.from(this.host.parentNode!.children).indexOf(this.host),\n renderItems: () => this.renderItems(),\n };\n }\n\n private retrieveLocalStorage() {\n return this.storage.getParsedJSON(StorageItems.RECENT_QUERIES, []);\n }\n\n private updateLocalStorage() {\n if (!this.recentQueriesList.state.analyticsEnabled) {\n return this.disableFeature();\n }\n\n return this.storage.setJSON(\n StorageItems.RECENT_QUERIES,\n this.recentQueriesList.state.queries\n );\n }\n\n private warnUser = once(() =>\n this.bindings.engine.logger.warn(\n 'Because analytics are disabled, the recent queries feature is deactivated.'\n )\n );\n\n private disableFeature() {\n this.warnUser();\n this.storage.removeItem(StorageItems.RECENT_QUERIES);\n }\n\n private renderItems(): SearchBoxSuggestionElement[] {\n if (!this.recentQueriesList.state.analyticsEnabled) {\n return [];\n }\n\n const query = this.bindings.searchBoxController.state.value;\n const hasQuery = query !== '';\n const max = hasQuery ? this.maxWithQuery : this.maxWithoutQuery;\n const filteredQueries = this.recentQueriesList.state.queries\n .filter((recentQuery) =>\n recentQuery.toLowerCase().startsWith(query.toLowerCase())\n )\n .slice(0, max);\n\n const suggestionElements: SearchBoxSuggestionElement[] =\n filteredQueries.map((value) => this.renderItem(value));\n if (suggestionElements.length) {\n suggestionElements.unshift(this.renderClear());\n }\n\n return suggestionElements;\n }\n\n private renderClear(): SearchBoxSuggestionElement {\n const partialItem = getPartialRecentQueryClearElement(this.bindings.i18n);\n\n return {\n ...partialItem,\n content: <RecentQueryClear i18n={this.bindings.i18n} />,\n onSelect: () => {\n this.recentQueriesList.clear();\n this.bindings.triggerSuggestions();\n },\n };\n }\n\n private renderItem(value: string): SearchBoxSuggestionElement {\n const query = this.bindings.searchBoxController.state.value;\n const partialItem = getPartialRecentQueryElement(value, this.bindings.i18n);\n return {\n ...partialItem,\n content: (\n <RecentQueriesContainer>\n <RecentQueryIcon icon={this.renderIcon()} />\n <RecentQueryText query={query} value={value} />\n </RecentQueriesContainer>\n ),\n\n onSelect: () => {\n if (this.bindings.isStandalone) {\n this.bindings.searchBoxController.updateText(value);\n this.bindings.searchBoxController.submit();\n return;\n }\n\n this.recentQueriesList.executeRecentQuery(\n this.recentQueriesList.state.queries.indexOf(value)\n );\n },\n };\n }\n\n public render() {\n if (this.error) {\n return (\n <atomic-component-error\n element={this.host}\n error={this.error}\n ></atomic-component-error>\n );\n }\n }\n}\n"],"mappings":"0hBA4BaA,EAA+B,M,6HAwB1C,iBAAAC,GACE,IACEC,GACGC,IACCC,KAAKD,SAAWA,EAChB,OAAOC,KAAKC,YAAY,GAE1BD,KAAKE,KACL,CAAC,qB,CAEH,MAAOC,GACPH,KAAKG,MAAQA,C,EAIT,UAAAF,GACN,MAAMG,EAASJ,KAAKD,SAASK,OAI7B,MAAMC,qBAACA,EAAoBC,sBAAEA,GAC3BC,EAAwBH,GAE1BA,EAAOI,SACLH,EAAqB,CACnBI,GAAIT,KAAKD,SAASU,GAClBC,MAAOV,KAAKD,SAASY,mBAIzB,MAAO,CACLC,SAAUC,MAAMC,KAAKd,KAAKE,KAAKa,WAAYC,UAAUC,QAAQjB,KAAKE,MAClEgB,QAAS,IACPd,EAAOI,SACLF,EAAsB,CACpBG,GAAIT,KAAKD,SAASU,MAGxBU,YAAa,IAAMnB,KAAKmB,c,CAIpB,WAAAA,GACN,MAAMC,EAAWpB,KAAKD,SAASsB,oBAAoBC,MAAMC,QAAU,GACnE,MAAMC,EAAMJ,EAAWpB,KAAKyB,aAAezB,KAAK0B,gBAChD,OAAO1B,K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B,oBAAoB0F,WAAWxF,GAC7CvB,KAAKD,SAASsB,oBAAoB2F,SAClC,M,CAGFhH,KAAKmF,kBAAkB8B,mBACrBjH,KAAKmF,kBAAkB7D,MAAMgE,QAAQrE,QAAQM,GAC9C,E,CAKA,MAAAyB,GACL,GAAIhD,KAAKG,MAAO,CACd,OACEiC,EAAA,0BAAAa,IAAA,2CACEC,QAASlD,KAAKE,KACdC,MAAOH,KAAKG,O","ignoreList":[]}
|
@@ -1,2 +0,0 @@
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-dc3df5ce.js";import{buildDateRange as i}from"@coveo/headless";import{p as a}from"./p-54fca818.js";import{B as n}from"./p-b93ccff9.js";import"./p-35e58270.js";import"./p-0462f723.js";import"./p-1580513b.js";import"./p-21ab6f55.js";const d=class{constructor(s){t(this,s);this.applyInput=e(this,"atomic/dateInputApply",7);this.max="9999-12-31";this.start=undefined;this.end=undefined;this.bindings=undefined;this.rangeGetter=undefined;this.rangeSetter=undefined;this.facetId=undefined;this.label=undefined;this.min=undefined;this.max="9999-12-31"}connectedCallback(){const t=this.rangeGetter();this.start=t?a(t.start).toDate():undefined;this.end=t?a(t.end).toDate():undefined}componentDidUpdate(){if(!this.startRef.value&&!this.endRef.value){this.startRef.min=this.min||this.formattedDateValue("1401-01-01");this.endRef.max=this.max||"";this.startRef.max=this.max||"";this.endRef.min=this.min||""}}apply(){if(!this.startRef.validity.valid||!this.endRef.validity.valid){return}this.applyInput.emit({start:this.start,end:this.end});const t=i({start:this.start,end:this.end.setHours(23,59,59,999)});this.rangeSetter(t)}formattedDateValue(t){if(!t){return""}return a(t).format("YYYY-MM-DD")}render(){const t=this.bindings.i18n.t(this.label);const e=this.bindings.i18n.t("start");const i=this.bindings.i18n.t("end");const d=this.bindings.i18n.t("date-input-start",{label:t});const h=this.bindings.i18n.t("date-input-end",{label:t});const r=this.bindings.i18n.t("apply");const p=this.bindings.i18n.t("date-input-apply",{label:t});const c="input-primary p-2.5";const l="text-neutral-dark self-center";const o="yyyy-mm-dd";const u="^(1[4-9]\\d{2}|2\\d{3})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$";const f=this.rangeGetter();return s("form",{key:"60acc60ec8b30e3eaa4d0e2e1426732925ff352c",class:"mt-4 grid grid-cols-[min-content_1fr] gap-2 px-2",onSubmit:t=>{t.preventDefault();this.apply();return false}},s("label",{key:"a43bd6b7f3ae352a7592e9de3390e5b8e180cb29",part:"input-label",class:l,htmlFor:`${this.facetId}_start`},e,":"),s("input",{key:"7908bdd17fb8d035d2b75ab02417b13cd1516bd2",id:`${this.facetId}_start`,part:"input-start",type:"date",ref:t=>this.startRef=t,class:c,"aria-label":d,placeholder:o,pattern:u,required:true,min:this.min||this.formattedDateValue("1401-01-01"),max:this.end?this.formattedDateValue(this.end):this.max,value:this.formattedDateValue(f?.start),onInput:t=>this.start=a(t.target.value).toDate()}),s("label",{key:"d5d35be72e99ae7488fae004a61682d597ab7d7f",part:"input-label",class:l,htmlFor:`${this.facetId}_end`},i,":"),s("input",{key:"b6b30c327c78cecef22c0b6eeec8cbf29b1d711a",id:`${this.facetId}_end`,part:"input-end",type:"date",ref:t=>this.endRef=t,class:c,"aria-label":h,placeholder:o,pattern:u,required:true,min:this.formattedDateValue(this.start)||this.min,max:this.max,value:this.formattedDateValue(f?.end),onInput:t=>this.end=a(t.target.value).toDate()}),s(n,{key:"d0b34163e43a90cf982155bf7eeb315212c9e1d2",style:"outline-primary",type:"submit",part:"input-apply-button",class:"col-span-2 truncate p-2.5",ariaLabel:p,text:r}))}};export{d as atomic_stencil_facet_date_input};
|
2
|
-
//# sourceMappingURL=p-97829295.entry.js.map
|