@coveo/atomic 3.33.4 → 3.33.5-pre.0b6ca95bda
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/components/analytics-config.js +1 -1
- package/dist/atomic/components/analytics-config.js.map +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-breadbox/atomic-commerce-breadbox.tw.css.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-category-facet/atomic-commerce-category-facet.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-facet-number-input/atomic-commerce-facet-number-input.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-interface/atomic-commerce-interface.js +98 -89
- package/dist/atomic/components/components/commerce/atomic-commerce-layout/atomic-commerce-layout.tw.css.js +5 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-product-list/atomic-commerce-product-list.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-interface/atomic-commerce-recommendation-interface.js +1 -1
- package/dist/atomic/components/components/commerce/atomic-commerce-recommendation-list/atomic-commerce-recommendation-list.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-commerce-search-box/atomic-commerce-search-box.js +7 -2
- package/dist/atomic/components/components/commerce/atomic-product/atomic-product.tw.css.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.tw.css.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js +2 -1
- package/dist/atomic/components/components/commerce/atomic-product-section-actions/atomic-product-section-actions.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-badges/atomic-product-section-badges.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-bottom-metadata/atomic-product-section-bottom-metadata.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-children/atomic-product-section-children.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-description/atomic-product-section-description.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-emphasized/atomic-product-section-emphasized.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-metadata/atomic-product-section-metadata.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-name/atomic-product-section-name.js +1 -2
- package/dist/atomic/components/components/commerce/atomic-product-section-visual/atomic-product-section-visual.js +1 -2
- package/dist/atomic/components/components/common/atomic-icon/atomic-icon.js +1 -1
- package/dist/atomic/components/components/common/atomic-rating/atomic-rating.tw.css.js +1 -2
- package/dist/atomic/components/components/common/atomic-rating/rating-utils.js +11 -0
- package/dist/atomic/components/components/common/atomic-rating/rating.js +0 -11
- package/dist/atomic/components/components/common/facets/facet-common.tw.css.js +1 -2
- package/dist/atomic/components/components/common/facets/facet-search/facet-search.tw.css.js +1 -2
- package/dist/atomic/components/components/common/facets/facet-value-box/facet-value-box.tw.css.js +1 -2
- package/dist/atomic/components/components/common/facets/facet-value-checkbox/facet-value-checkbox.tw.css.js +1 -2
- package/dist/atomic/components/components/common/item-list/styles/grid-display.tw.css.js +1 -2
- package/dist/atomic/components/components/common/item-list/styles/list-display.tw.css.js +1 -2
- package/dist/atomic/components/components/common/item-list/styles/placeholders.tw.css.js +1 -1
- package/dist/atomic/components/components/common/item-list/styles/table-display.tw.css.js +1 -2
- package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.tw.css.js +5 -1
- package/dist/atomic/components/global/environment.js +1 -1
- package/dist/atomic/components/index.js.map +1 -1
- package/dist/atomic/components/utils/coveo.tw.css.js +7 -1
- package/dist/atomic/components/utils/tailwind.global.tw.css.js +7 -2
- package/dist/atomic/index.esm.js.map +1 -1
- package/dist/atomic/{p-b8634400.entry.js → p-1980ff16.entry.js} +2 -2
- package/dist/atomic/{p-a1d7fe61.entry.js → p-4c029532.entry.js} +2 -2
- package/dist/atomic/{p-3dbda99d.js → p-82c1d868.js} +2 -2
- package/dist/atomic/{p-3dbda99d.js.map → p-82c1d868.js.map} +1 -1
- package/dist/atomic/{p-ae4076fc.entry.js → p-df6f872b.entry.js} +2 -2
- package/dist/cjs/{analytics-config-deec65cf.js → analytics-config-bfa1c9c7.js} +2 -2
- package/dist/cjs/analytics-config-bfa1c9c7.js.map +1 -0
- package/dist/cjs/atomic-insight-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-recs-interface.cjs.entry.js +1 -1
- package/dist/cjs/atomic-search-interface.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/version.cjs.js +2 -2
- package/dist/esm/{analytics-config-b6aff736.js → analytics-config-e264ae7c.js} +2 -2
- package/dist/esm/analytics-config-e264ae7c.js.map +1 -0
- package/dist/esm/atomic-insight-interface.entry.js +1 -1
- package/dist/esm/atomic-recs-interface.entry.js +1 -1
- package/dist/esm/atomic-search-interface.entry.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/components/commerce/atomic-commerce-interface/atomic-commerce-interface.d.ts +20 -20
- package/dist/types/components/commerce/product-template-component-utils/stencil-product-template-decorators.d.ts +0 -20
- package/dist/types/components/common/atomic-rating/rating-utils.d.ts +1 -0
- package/dist/types/components/common/atomic-rating/rating.d.ts +0 -1
- package/docs/atomic-docs.json +1 -1
- package/package.json +6 -6
- package/dist/cjs/analytics-config-deec65cf.js.map +0 -1
- package/dist/esm/analytics-config-b6aff736.js.map +0 -1
- package/dist/types/components/commerce/product-list/stencil-product-template-provider.d.ts +0 -8
- package/dist/types/components/commerce/sort/stencil-option.d.ts +0 -10
- /package/dist/atomic/{p-b8634400.entry.js.map → p-1980ff16.entry.js.map} +0 -0
- /package/dist/atomic/{p-a1d7fe61.entry.js.map → p-4c029532.entry.js.map} +0 -0
- /package/dist/atomic/{p-ae4076fc.entry.js.map → p-df6f872b.entry.js.map} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}:host{position:relative;@layer components{& :host{font-family:var(--atomic-font-family);--tw-font-weight:var(--atomic-font-normal);font-weight:var(--atomic-font-normal)}& .result-root{&.with-sections{justify-items:stretch;display:grid;&.display-list{@media (width>=1024px){&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr);grid-template-columns:minmax(0,min-content) auto 1fr auto;grid-template-areas:"badges badges.actions""visual title title title""visual title-metadata title-metadata title-metadata""visual emphasized emphasized emphasized""visual excerpt excerpt excerpt""visual bottom-metadata bottom-metadata bottom-metadata""visual children children children"}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content));grid-template-columns:minmax(0,min-content) auto 1fr auto;grid-template-areas:"badges badges.actions""visual title title title""visual title-metadata title-metadata title-metadata""visual emphasized emphasized emphasized""visual excerpt excerpt excerpt""visual bottom-metadata bottom-metadata bottom-metadata""visual children children children"}&.image-none{grid-template-rows:repeat(6,auto);grid-template-columns:auto 1fr auto;grid-template-areas:"badges.actions""title title title""title-metadata title-metadata title-metadata""emphasized emphasized emphasized""excerpt excerpt excerpt""bottom-metadata bottom-metadata bottom-metadata""children children children"}}}&.display-table{&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr);grid-template-columns:minmax(0,min-content) auto 1fr auto;grid-template-areas:"badges badges.actions""visual title title title""visual title-metadata title-metadata title-metadata""visual emphasized emphasized emphasized""visual excerpt excerpt excerpt""visual bottom-metadata bottom-metadata bottom-metadata""visual children children children"}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content));grid-template-columns:minmax(0,min-content) auto 1fr auto;grid-template-areas:"badges badges.actions""visual title title title""visual title-metadata title-metadata title-metadata""visual emphasized emphasized emphasized""visual excerpt excerpt excerpt""visual bottom-metadata bottom-metadata bottom-metadata""visual children children children"}&.image-none{grid-template-rows:repeat(6,auto);grid-template-columns:auto 1fr auto;grid-template-areas:"badges.actions""title title title""title-metadata title-metadata title-metadata""emphasized emphasized emphasized""excerpt excerpt excerpt""bottom-metadata bottom-metadata bottom-metadata""children children children"}}&.display-list{@media not all and (width>=1024px){&.image-large{grid-template-rows:repeat(8,auto);grid-template-columns:100%;grid-template-areas:"visual""badges""title""title-metadata""emphasized""excerpt""bottom-metadata""actions""children"}&.image-small{grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto);grid-template-columns:auto minmax(0,1fr);grid-template-areas:"badges badges""visual title""visual title-metadata""visual emphasized""visual.""excerpt excerpt""bottom-metadata bottom-metadata""actions actions""children children"}&.image-icon{grid-template-rows:repeat(7,auto) 1fr;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"badges badges""visual title""visual title-metadata""visual emphasized""visual excerpt""visual bottom-metadata""visual actions""visual children"}&.image-none{grid-template-rows:repeat(7,auto);grid-template-columns:100%;grid-template-areas:"badges""title""title-metadata""emphasized""excerpt""bottom-metadata""actions""children"}}}&.display-grid{grid-template-rows:repeat(9,auto);grid-template-columns:100%;grid-template-areas:"badges""visual""title""title-metadata""emphasized""excerpt""children""bottom-metadata""actions";& a,& button{position:relative}@media not all and (width>=1024px){&.image-large{&.image-large{grid-template-rows:repeat(8,auto);grid-template-columns:100%;grid-template-areas:"visual""badges""title""title-metadata""emphasized""excerpt""bottom-metadata""actions""children"}&.image-small{grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto);grid-template-columns:auto minmax(0,1fr);grid-template-areas:"badges badges""visual title""visual title-metadata""visual emphasized""visual.""excerpt excerpt""bottom-metadata bottom-metadata""actions actions""children children"}&.image-icon{grid-template-rows:repeat(7,auto) 1fr;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"badges badges""visual title""visual title-metadata""visual emphasized""visual excerpt""visual bottom-metadata""visual actions""visual children"}&.image-none{grid-template-rows:repeat(7,auto);grid-template-columns:100%;grid-template-areas:"badges""title""title-metadata""emphasized""excerpt""bottom-metadata""actions""children"}}}}}& atomic-table-element{display:none}}& .link-container{display:none}}& .result-root.display-grid{grid-template-areas:"badges""visual""title""title-metadata""emphasized""excerpt""bottom-metadata""actions""children"}& .with-sections{&.display-grid{&.image-large,&.image-small,&.image-icon,&.image-none{& atomic-product-section-name{min-height:calc(var(--line-height)*2);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}@media (width>=1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-small atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{width:2rem;height:2rem}}@media not all and (width>=1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-small atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;max-width:4.75rem;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{width:2rem;height:2rem}}&.density-comfortable{&.image-icon,&.image-none,&.image-small,&.image-large{& atomic-product-section-description{margin-top:1.25rem}}}&.density-normal{&.image-icon,&.image-none,&.image-small,&.image-large{& atomic-product-section-description{margin-top:.75rem}}}&.density-compact{&.image-icon,&.image-none,&.image-small,&.image-large{& atomic-product-section-description{margin-top:.25rem}}@media (width>=1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-small atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{width:2rem;height:2rem}}@media not all and (width>=1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-small atomic-product-section-children .product-child{aspect-ratio:1;width:16.65%;max-width:4.75rem;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{width:2rem;height:2rem}}}}}}@property --tw-font-weight{syntax:"*";inherits:false}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;:host{@layer components{:host{font-family:var(--atomic-font-family);--tw-font-weight:var(--atomic-font-normal);font-weight:var(--atomic-font-normal)}.result-root{&.with-sections{display:grid;justify-items:stretch;&.display-list{@media (width >= 1024px){&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr)}&.image-icon,&.image-large,&.image-small{grid-template-areas:"badges badges . actions" "visual title title title" "visual title-metadata title-metadata title-metadata" "visual emphasized emphasized emphasized" "visual excerpt excerpt excerpt" "visual bottom-metadata bottom-metadata bottom-metadata" "visual children children children";grid-template-columns:minmax(0,min-content) auto 1fr auto}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content))}&.image-none{grid-template-areas:"badges . actions" "title title title" "title-metadata title-metadata title-metadata" "emphasized emphasized emphasized" "excerpt excerpt excerpt" "bottom-metadata bottom-metadata bottom-metadata" "children children children";grid-template-columns:auto 1fr auto;grid-template-rows:repeat(6,auto)}}}&.display-table{&.image-large,&.image-small{grid-template-rows:repeat(6,auto) minmax(0,1fr)}&.image-icon,&.image-large,&.image-small{grid-template-areas:"badges badges . actions" "visual title title title" "visual title-metadata title-metadata title-metadata" "visual emphasized emphasized emphasized" "visual excerpt excerpt excerpt" "visual bottom-metadata bottom-metadata bottom-metadata" "visual children children children";grid-template-columns:minmax(0,min-content) auto 1fr auto}&.image-icon{grid-template-rows:repeat(7,minmax(0,min-content))}&.image-none{grid-template-areas:"badges . actions" "title title title" "title-metadata title-metadata title-metadata" "emphasized emphasized emphasized" "excerpt excerpt excerpt" "bottom-metadata bottom-metadata bottom-metadata" "children children children";grid-template-columns:auto 1fr auto;grid-template-rows:repeat(6,auto)}}&.display-list{@media not all and (width >= 1024px){&.image-large{grid-template-areas:"visual" "badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(8,auto)}&.image-small{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual ." "excerpt excerpt" "bottom-metadata bottom-metadata" "actions actions" "children children";grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto)}&.image-icon,&.image-small{grid-template-columns:auto minmax(0,1fr)}&.image-icon{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual excerpt" "visual bottom-metadata" "visual actions" "visual children";grid-template-rows:repeat(7,auto) 1fr}&.image-none{grid-template-areas:"badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(7,auto)}}}&.display-grid{grid-template-areas:"badges" "visual" "title" "title-metadata" "emphasized" "excerpt" "children" "bottom-metadata" "actions";grid-template-columns:100%;grid-template-rows:repeat(9,auto);a,button{position:relative}@media not all and (width >= 1024px){&.image-large{&.image-large{grid-template-areas:"visual" "badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(8,auto)}&.image-small{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual ." "excerpt excerpt" "bottom-metadata bottom-metadata" "actions actions" "children children";grid-template-rows:repeat(4,auto) minmax(0,1fr) repeat(3,auto)}&.image-icon,&.image-small{grid-template-columns:auto minmax(0,1fr)}&.image-icon{grid-template-areas:"badges badges" "visual title" "visual title-metadata" "visual emphasized" "visual excerpt" "visual bottom-metadata" "visual actions" "visual children";grid-template-rows:repeat(7,auto) 1fr}&.image-none{grid-template-areas:"badges" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children";grid-template-columns:100%;grid-template-rows:repeat(7,auto)}}}}}atomic-table-element{display:none}}.link-container{display:none}}position:relative;.result-root.display-grid{grid-template-areas:"badges" "visual" "title" "title-metadata" "emphasized" "excerpt" "bottom-metadata" "actions" "children"}.with-sections{&.display-grid{&.image-icon,&.image-large,&.image-none,&.image-small{atomic-product-section-name{display:-webkit-box;min-height:calc(var(--line-height)*2);overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}}@media (width >= 1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-small atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{height:2rem;width:2rem}}@media not all and (width >= 1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-small atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}max-width:4.75rem;width:16.65%}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{height:2rem;width:2rem}}&.density-comfortable{&.image-icon,&.image-large,&.image-none,&.image-small{& atomic-product-section-description{margin-top:1.25rem}}}&.density-normal{&.image-icon,&.image-large,&.image-none,&.image-small{& atomic-product-section-description{margin-top:.75rem}}}&.density-compact{&.image-icon,&.image-large,&.image-none,&.image-small{& atomic-product-section-description{margin-top:.25rem}}@media (width >= 1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-small atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{height:2rem;width:2rem}}@media not all and (width >= 1024px){&.image-large atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.65%}&.image-small atomic-product-section-children .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}max-width:4.75rem;width:16.65%}&.image-icon atomic-product-section-children .product-child,&.image-none atomic-product-section-children .product-child{height:2rem;width:2rem}}}}}}@property --tw-font-weight{syntax:"*";inherits:false}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}`;
|
|
4
3
|
export default styles;
|
package/dist/atomic/components/components/commerce/atomic-product-link/atomic-product-link.tw.css.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
3
|
-
atomic-product-link{& a{color:var(--atomic-on-background);&:hover,&:focus-visible{color:var(--atomic-primary);text-decoration:underline}&:focus{outline:none}&:visited{color:var(--atomic-visited)}}}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-link{a{color:var(--atomic-on-background);&:focus-visible,&:hover{color:var(--atomic-primary);text-decoration:underline}&:focus{outline:none}&:visited{color:var(--atomic-visited)}}}`;
|
|
4
3
|
export default styles;
|
package/dist/atomic/components/components/commerce/atomic-product-rating/atomic-product-rating.js
CHANGED
|
@@ -9,13 +9,14 @@ import { html, LitElement } from 'lit';
|
|
|
9
9
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
10
10
|
import { when } from 'lit/directives/when.js';
|
|
11
11
|
import ratingStyles from "../../common/atomic-rating/atomic-rating.tw.css.js";
|
|
12
|
-
import { computeNumberOfStars
|
|
12
|
+
import { computeNumberOfStars } from "../../common/atomic-rating/rating-utils.js";
|
|
13
13
|
import { bindingGuard } from "../../../decorators/binding-guard";
|
|
14
14
|
import { bindings } from "../../../decorators/bindings.js";
|
|
15
15
|
import { createProductContextController } from "../../../decorators/commerce/product-template-decorators.js";
|
|
16
16
|
import { errorGuard } from "../../../decorators/error-guard";
|
|
17
17
|
import { LightDomMixin } from "../../../mixins/light-dom";
|
|
18
18
|
const Star = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"13\" viewBox=\"0 0 13 13\">\n <path\n d=\"m 2.6226137,7.5483827 -1.73646599,-1.67659 c -0.58287,-0.56277 -0.2895686,-1.54878 0.50612799,-1.70148 l 2.630348,-0.50477 c 0.31897,-0.06121 0.58834,-0.27352 0.72239,-0.56935 l 0.84414,-1.86293 c 0.35481,-0.78302702 1.46689,-0.78302802 1.8217,0 l 0.84414,1.86293 c 0.13405,0.29583 0.40342,0.50814 0.72239,0.56935 l 2.6303203,0.50477 c 0.7957,0.1527 1.089,1.13871 0.5062,1.70148 l -1.73651,1.67659 c -0.23632,0.22817 -0.34551,0.55786 -0.2921,0.88198 l 0.45461,2.7587403 c 0.1357,0.824 -0.7386003,1.4416 -1.4698203,1.0382 l -2.087,-1.1515 c -0.30069,-0.1659 -0.66547,-0.1659 -0.96616,0 l -2.087,1.1515 c -0.73122,0.4034 -1.60555,-0.2142 -1.46978,-1.0382 l 0.45457,-2.7587403 c 0.05341,-0.32412 -0.05578,-0.65381 -0.2921,-0.88198 z\"\n stroke-width=\"0.8125\"\n />\n</svg>";
|
|
19
|
+
import { renderRating } from '../../common/atomic-rating/rating';
|
|
19
20
|
/**
|
|
20
21
|
* The `atomic-product-rating` element renders a star rating.
|
|
21
22
|
*
|
|
@@ -19,8 +19,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
19
19
|
*
|
|
20
20
|
* @slot default - The actions to display.
|
|
21
21
|
*/
|
|
22
|
-
let AtomicProductSectionActions = class AtomicProductSectionActions extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
23
|
-
atomic-product-section-actions{text-align:left;&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{max-height:calc(2*var(--row-height,2rem) + .5rem);--row-height:2rem;flex-wrap:wrap;grid-area:actions;gap:.5rem;display:flex;& atomic-result-quickview{display:inline-block}@media (width>=1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}&.density-normal,&.density-compact{margin-bottom:1rem}}&.display-grid{&.density-comfortable{--row-height:2.5rem;margin-top:2.25rem}&.density-normal{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:1.75rem}&.density-compact{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:1.25rem}}}@media not all and (width>=1024px){&.display-list{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.display-grid{&.image-large{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.image-small,&.image-icon,&.image-none{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{margin-top:.75rem}}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}&.density-normal,&.density-compact{margin-bottom:1rem}}}}`) {
|
|
22
|
+
let AtomicProductSectionActions = class AtomicProductSectionActions extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-actions{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:actions;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;atomic-result-quickview{display:inline-block}@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem;--row-height:2.5rem}&.density-normal{margin-top:1.75rem}&.density-compact,&.density-normal{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.display-grid{&.image-large{--row-height:2.5rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5em}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{margin-top:.75rem}}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}&.density-compact,&.density-normal{margin-bottom:1rem}}}}`) {
|
|
24
23
|
};
|
|
25
24
|
AtomicProductSectionActions = __decorate([
|
|
26
25
|
customElement('atomic-product-section-actions')
|
|
@@ -18,8 +18,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
18
18
|
*
|
|
19
19
|
* @slot default - The badges to display.
|
|
20
20
|
*/
|
|
21
|
-
let AtomicProductSectionBadges = class AtomicProductSectionBadges extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
22
|
-
atomic-product-section-badges{text-align:left;&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{max-height:calc(2*var(--row-height,2rem) + .5rem);--row-height:2rem;flex-wrap:wrap;grid-area:badges;gap:.5rem;margin-bottom:1rem;display:flex;@media (width>=1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}}&.display-grid{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.image-icon{&.density-comfortable{margin-bottom:2rem}&.density-normal{margin-bottom:1.5rem}}}}@media not all and (width>=1024px){&.display-list{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-small,&.image-icon,&.image-none{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}}}}`) {
|
|
21
|
+
let AtomicProductSectionBadges = class AtomicProductSectionBadges extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-badges{text-align:left;&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{display:flex;flex-wrap:wrap;gap:.5rem;grid-area:badges;margin-bottom:1rem;max-height:calc(var(--row-height, 2rem)*2 + .5rem);--row-height:2rem;@media (width >= 1024px){&.display-list{&.density-comfortable{margin-bottom:1.5rem}}&.display-grid{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.image-icon{&.density-comfortable{margin-bottom:2rem}&.density-normal{margin-bottom:1.5rem}}}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}}}&.display-table{&.density-comfortable{margin-bottom:1.5rem}}}}`) {
|
|
23
22
|
};
|
|
24
23
|
AtomicProductSectionBadges = __decorate([
|
|
25
24
|
customElement('atomic-product-section-badges')
|
|
@@ -18,8 +18,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
18
18
|
*
|
|
19
19
|
* @slot default - The metadata to display.
|
|
20
20
|
*/
|
|
21
|
-
let AtomicProductSectionBottomMetadata = class AtomicProductSectionBottomMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
22
|
-
atomic-product-section-bottom-metadata{&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{color:var(--atomic-neutral-dark);--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);grid-area:bottom-metadata;@media (width>=1024px){&.display-list{&.density-comfortable{max-height:4rem;margin-top:1.25rem}&.density-normal{max-height:3.5rem;margin-top:.875rem}&.density-compact{max-height:3.25rem;margin-top:.6875rem}}&.display-grid{&.density-comfortable{max-height:4rem;margin-top:1.75rem}&.density-normal{max-height:3.5rem;margin-top:1.375rem}&.density-compact{max-height:3.25rem;margin-top:.9375rem}}}@media not all and (width>=1024px){&.display-list{&.density-comfortable{max-height:4rem;margin-top:.75rem}&.density-normal{max-height:3.5rem;margin-top:.625rem}&.density-compact{max-height:3.25rem;margin-top:.4375rem}}&.display-grid{&.image-large{&.density-comfortable{max-height:4rem;margin-top:.75rem}&.density-normal{max-height:3.5rem;margin-top:.625rem}&.density-compact{max-height:3.25rem;margin-top:.4375rem}}&.image-small,&.image-icon,&.image-none{max-height:3rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5rem}}}}&.display-table{&.density-comfortable{max-height:4rem;margin-top:1.25rem}&.density-normal{max-height:3.5rem;margin-top:.875rem}&.density-compact{max-height:3.25rem;margin-top:.6875rem}}}}`) {
|
|
21
|
+
let AtomicProductSectionBottomMetadata = class AtomicProductSectionBottomMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-bottom-metadata{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);grid-area:bottom-metadata;--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);@media (width >= 1024px){&.display-list{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}&.display-grid{&.density-comfortable{margin-top:1.75rem;max-height:4rem}&.density-normal{margin-top:1.375rem;max-height:3.5rem}&.density-compact{margin-top:.9375rem;max-height:3.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.display-grid{&.image-large{&.density-comfortable{margin-top:.75rem;max-height:4rem}&.density-normal{margin-top:.625rem;max-height:3.5rem}&.density-compact{margin-top:.4375rem;max-height:3.25rem}}&.image-icon,&.image-none,&.image-small{max-height:3rem;&.density-comfortable{margin-top:1rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.5rem}}}}&.display-table{&.density-comfortable{margin-top:1.25rem;max-height:4rem}&.density-normal{margin-top:.875rem;max-height:3.5rem}&.density-compact{margin-top:.6875rem;max-height:3.25rem}}}}`) {
|
|
23
22
|
};
|
|
24
23
|
AtomicProductSectionBottomMetadata = __decorate([
|
|
25
24
|
customElement('atomic-product-section-bottom-metadata')
|
|
@@ -15,8 +15,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
15
15
|
*
|
|
16
16
|
* @slot default - The child products to display.
|
|
17
17
|
*/
|
|
18
|
-
let AtomicProductSectionChildren = class AtomicProductSectionChildren extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
19
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}atomic-product-section-children{&.with-sections{grid-area:children;@media (width>=1024px){&.display-list{& atomic-result-children::part(children-root),& atomic-insight-result-children::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px}&.density-comfortable{& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-top:1.25rem;margin-bottom:1.25rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-top:.875rem;margin-bottom:.875rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-top:.475rem;margin-bottom:.475rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1rem}}}}@media not all and (width>=1024px){&.display-list{& atomic-result-children::part(children-root),& atomic-insight-result-children::part(children-root){border-top-style:var(--tw-border-style);border-top-width:1px;border-top-color:var(--atomic-neutral)}}&.display-grid{&.image-large{& atomic-result-children::part(children-root),& atomic-insight-result-children::part(children-root){border-top-style:var(--tw-border-style);border-top-width:1px;border-top-color:var(--atomic-neutral)}}&.image-small,&.image-icon,&.image-none{&.density-comfortable{margin-top:1.25rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){margin-inline:calc(var(--spacing,.25rem)*-4);margin-top:calc(var(--spacing,.25rem)*4);padding-top:1.75rem;padding-inline:calc(var(--spacing,.25rem)*4)}&::part(show-hide-button){margin-top:1.25rem;margin-bottom:1.25rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){margin-inline:calc(var(--spacing,.25rem)*-4);margin-top:calc(var(--spacing,.25rem)*4);padding-top:1.5rem;padding-inline:calc(var(--spacing,.25rem)*4)}&::part(show-hide-button){margin-top:.875rem;margin-bottom:.875rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){margin-inline:calc(var(--spacing,.25rem)*-4);margin-top:calc(var(--spacing,.25rem)*4);padding-top:1rem;padding-inline:calc(var(--spacing,.25rem)*4)}&::part(show-hide-button){margin-top:.475rem;margin-bottom:.475rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1rem}}}}}&.display-table{& atomic-result-children::part(children-root),& atomic-insight-result-children::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px}&.density-comfortable{& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-top:1.25rem;margin-bottom:1.25rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-top:.875rem;margin-bottom:.875rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;& atomic-result-children,& atomic-insight-result-children{&::part(children-root){border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:16px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-top:.475rem;margin-bottom:.475rem}}&.child-result:not(.last-child),& .placeholder{margin-bottom:1rem}}}}&.with-sections{&.image-icon,&.image-none{& .product-child{width:calc(var(--spacing,.25rem)*8);height:calc(var(--spacing,.25rem)*8)}}&.display-grid{&.image-large,&.image-small{& .product-child{aspect-ratio:1;aspect-ratio:1;width:16.6667%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}}@media not all and (width>=1024px){&.image-small .product-child{max-width:calc(var(--spacing,.25rem)*19)}}}&.display-list{@media (width>=1024px){&.image-large.density-comfortable,&.image-large.density-normal{& .product-child{width:calc(var(--spacing,.25rem)*27);height:calc(var(--spacing,.25rem)*27)}}&.image-small,&.image-large.density-compact{& .product-child{width:calc(var(--spacing,.25rem)*8);height:calc(var(--spacing,.25rem)*8)}}}@media not all and (width>=1024px){&.image-large .product-child{aspect-ratio:1;aspect-ratio:1;width:16.6667%;height:auto;@supports not (aspect-ratio:1 / 1){&{height:auto}}}&.image-small .product-child{width:calc(var(--spacing,.25rem)*8);height:calc(var(--spacing,.25rem)*8)}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}`) {
|
|
18
|
+
let AtomicProductSectionChildren = class AtomicProductSectionChildren extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;atomic-product-section-children{&.with-sections{grid-area:children;@media (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}@media not all and (width >= 1024px){&.display-list{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.display-grid{&.image-large{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-top:1px var(--tw-border-style) var(--atomic-neutral)}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.75rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1.5rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){margin-inline:calc(var(--spacing, .25rem)*-4);margin-top:calc(var(--spacing, .25rem)*4);padding-top:1rem;padding-inline:calc(var(--spacing, .25rem)*4)}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}}&.display-table{atomic-insight-result-children::part(children-root),atomic-result-children::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px}&.density-comfortable{atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:1.25rem;padding:1.75rem}&::part(show-hide-button){margin-bottom:1.25rem;margin-top:1.25rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.75rem}}&.density-normal{margin-top:1rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.875rem;padding:1.5rem}&::part(show-hide-button){margin-bottom:.875rem;margin-top:.875rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1.5rem}}&.density-compact{margin-top:.75rem;atomic-insight-result-children,atomic-result-children{&::part(children-root){border-color:var(--atomic-neutral);border-radius:16px;border-style:var(--tw-border-style);border-width:1px;margin-top:.475rem;padding:1rem}&::part(show-hide-button){margin-bottom:.475rem;margin-top:.475rem}}&.child-result:not(.last-child),.placeholder{margin-bottom:1rem}}}}&.with-sections{&.image-icon,&.image-none{.product-child{height:calc(var(--spacing, .25rem)*8);width:calc(var(--spacing, .25rem)*8)}}&.display-grid{&.image-large,&.image-small{.product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.66667%}}@media not all and (width >= 1024px){&.image-small .product-child{max-width:calc(var(--spacing, .25rem)*19)}}}&.display-list{@media (width >= 1024px){&.image-large.density-comfortable,&.image-large.density-normal{.product-child{height:calc(var(--spacing, .25rem)*27);width:calc(var(--spacing, .25rem)*27)}}&.image-large.density-compact,&.image-small{.product-child{height:calc(var(--spacing, .25rem)*8);width:calc(var(--spacing, .25rem)*8)}}}@media not all and (width >= 1024px){&.image-large .product-child{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}width:16.66667%}&.image-small .product-child{height:calc(var(--spacing, .25rem)*8);width:calc(var(--spacing, .25rem)*8)}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`) {
|
|
20
19
|
};
|
|
21
20
|
AtomicProductSectionChildren = __decorate([
|
|
22
21
|
customElement('atomic-product-section-children')
|
|
@@ -18,8 +18,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
18
18
|
*
|
|
19
19
|
* @slot default - The description to display.
|
|
20
20
|
*/
|
|
21
|
-
let AtomicProductSectionDescription = class AtomicProductSectionDescription extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
22
|
-
atomic-product-section-description{&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{color:var(--atomic-neutral-dark);-webkit-line-clamp:2;-webkit-box-orient:vertical;grid-area:excerpt;display:-webkit-box;overflow:hidden;@media (width>=1024px){&.density-comfortable{--font-size:var(--atomic-text-lg);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}&.density-compact{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}&.display-list{&.density-comfortable{max-height:4.5rem;margin-top:1.75rem}&.density-normal{max-height:2.5rem;margin-top:1.25rem}&.density-compact{max-height:1.25rem;margin-top:1rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem}&.density-normal{margin-top:1.75rem}&.density-compact{margin-top:1.25rem}}}@media not all and (width>=1024px){&.display-list{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.display-grid{&.image-large{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.image-small,&.image-icon,&.image-none{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{-webkit-line-clamp:1;-webkit-box-orient:vertical;margin-top:.75rem;display:-webkit-box;overflow:hidden}}}}&.display-table{&.density-comfortable{max-height:4.5rem;margin-top:1.75rem}&.density-normal{max-height:2.5rem;margin-top:1.25rem}&.density-compact{max-height:1.25rem;margin-top:1rem}}}&.with-sections{&.display-grid{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.25rem}}}}`) {
|
|
21
|
+
let AtomicProductSectionDescription = class AtomicProductSectionDescription extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-description{&.with-sections{text-overflow:ellipsis}&.with-sections{color:var(--atomic-neutral-dark);display:-webkit-box;grid-area:excerpt;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;@media (width >= 1024px){&.density-comfortable{--font-size:var(--atomic-text-lg);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);-webkit-line-clamp:3}&.density-comfortable,&.density-compact{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}&.density-compact{-webkit-line-clamp:1}&.display-list{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}&.display-grid{&.density-comfortable{margin-top:2.25rem}&.density-normal{margin-top:1.75rem}&.density-compact{margin-top:1.25rem}}}@media not all and (width >= 1024px){&.display-list{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.display-grid{&.image-large{&.density-comfortable,&.density-normal{max-height:2.5rem}&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}}&.image-icon,&.image-none,&.image-small{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:1rem}&.density-compact{display:-webkit-box;margin-top:.75rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}}}}&.display-table{&.density-comfortable{margin-top:1.75rem;max-height:4.5rem}&.density-normal{margin-top:1.25rem;max-height:2.5rem}&.density-compact{margin-top:1rem;max-height:1.25rem}}}&.with-sections{&.display-grid{&.density-comfortable{margin-top:1.25rem}&.density-normal{margin-top:.75rem}&.density-compact{margin-top:.25rem}}}}`) {
|
|
23
22
|
};
|
|
24
23
|
AtomicProductSectionDescription = __decorate([
|
|
25
24
|
customElement('atomic-product-section-description')
|
|
@@ -17,8 +17,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
17
17
|
*
|
|
18
18
|
* @slot default - The emphasized field to display.
|
|
19
19
|
*/
|
|
20
|
-
let AtomicProductSectionEmphasized = class AtomicProductSectionEmphasized extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
21
|
-
atomic-product-section-emphasized{--font-size:var(--atomic-text-2xl);font-weight:500;font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:.5rem;&.with-sections{text-overflow:ellipsis;grid-area:emphasized;overflow:hidden}}`) {
|
|
20
|
+
let AtomicProductSectionEmphasized = class AtomicProductSectionEmphasized extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-emphasized{font-weight:500;--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);margin-top:.5rem;&.with-sections{grid-area:emphasized;overflow:hidden;text-overflow:ellipsis}}`) {
|
|
22
21
|
};
|
|
23
22
|
AtomicProductSectionEmphasized = __decorate([
|
|
24
23
|
customElement('atomic-product-section-emphasized')
|
|
@@ -18,8 +18,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
18
18
|
*
|
|
19
19
|
* @slot default - The metadata to display.
|
|
20
20
|
*/
|
|
21
|
-
let AtomicProductSectionMetadata = class AtomicProductSectionMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
22
|
-
atomic-product-section-metadata{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.with-sections{text-overflow:ellipsis;grid-area:title-metadata;margin-top:.475rem;overflow:hidden}}`) {
|
|
21
|
+
let AtomicProductSectionMetadata = class AtomicProductSectionMetadata extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-metadata{--font-size:var(--atomic-text-sm);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.with-sections{grid-area:title-metadata;margin-top:.475rem;overflow:hidden;text-overflow:ellipsis}}`) {
|
|
23
22
|
};
|
|
24
23
|
AtomicProductSectionMetadata = __decorate([
|
|
25
24
|
customElement('atomic-product-section-metadata')
|
|
@@ -17,8 +17,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
17
17
|
*
|
|
18
18
|
* @slot default - The name to display.
|
|
19
19
|
*/
|
|
20
|
-
let AtomicProductSectionName = class AtomicProductSectionName extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
21
|
-
atomic-product-section-name{&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{color:var(--atomic-on-background);--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);grid-area:title;&.density-comfortable{--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}@media (width>=1024px){&.display-grid{word-break:break-word;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}@media not all and (width>=1024px){&.display-list{--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-large{--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.image-small,&.image-icon,&.image-none{--font-size:var(--atomic-text-lg);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3rem;display:-webkit-box;overflow:hidden}}}}& .with-sections{&.display-grid{min-height:calc(var(--line-height)*2);-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}}}`) {
|
|
20
|
+
let AtomicProductSectionName = class AtomicProductSectionName extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-name{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{color:var(--atomic-on-background);grid-area:title;--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height);&.density-comfortable{--font-size:var(--atomic-text-2xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}@media (width >= 1024px){&.display-grid{display:-webkit-box;overflow:hidden;word-break:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:2}}@media not all and (width >= 1024px){&.display-list{--font-size:var(--atomic-text-xl);font-size:var(--font-size);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));line-height:var(--line-height)}&.display-grid{&.image-large{--font-size:var(--atomic-text-xl);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio))}&.image-icon,&.image-large,&.image-none,&.image-small{font-size:var(--font-size);line-height:var(--line-height)}&.image-icon,&.image-none,&.image-small{--font-size:var(--atomic-text-lg);--line-height:calc(var(--font-size)*var(--atomic-line-height-ratio));display:-webkit-box;max-height:3rem;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}}}}.with-sections{&.display-grid{display:-webkit-box;min-height:calc(var(--line-height)*2);overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}}}`) {
|
|
22
21
|
};
|
|
23
22
|
AtomicProductSectionName = __decorate([
|
|
24
23
|
customElement('atomic-product-section-name')
|
|
@@ -18,8 +18,7 @@ import { ItemSectionMixin } from "../../../mixins/item-section-mixin";
|
|
|
18
18
|
*
|
|
19
19
|
* @slot default - The image to display.
|
|
20
20
|
*/
|
|
21
|
-
let AtomicProductSectionVisual = class AtomicProductSectionVisual extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
22
|
-
atomic-product-section-visual{&.with-sections{text-overflow:ellipsis;overflow:hidden}&.with-sections{grid-area:visual;&.image-icon{border-radius:var(--atomic-border-radius);width:2rem;height:2rem}&.image-none{display:none}@media (width>=1024px){&.display-list{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{width:10rem;height:10rem}&.density-comfortable,&.density-normal{width:20.375rem;height:20.375rem}}&.image-small{width:10rem;height:10rem}}&.display-grid{margin-bottom:.5rem;&.image-large,&.image-small{width:100%;&.density-comfortable{margin:0 auto 2rem}&.density-normal{margin:0 auto 1.5rem}&.density-compact{margin:0 auto 1rem}}&.image-large{aspect-ratio:1;height:auto;@supports not (aspect-ratio:1 / 1){&{height:19.75rem}}}&.image-small{aspect-ratio:1;height:auto;@supports not (aspect-ratio:1 / 1){&{height:14rem}}}}}@media not all and (width>=1024px){&.display-list{margin-right:1rem;&.image-large{aspect-ratio:1;width:100%;height:auto;margin-bottom:1rem;margin-right:0;@supports not (aspect-ratio:1 / 1){&{height:7.25rem}}}&.image-small{width:24vw;height:24vw;margin-bottom:1rem}&.image-icon{margin-bottom:0}}&.display-grid{&.image-large{margin-right:1rem;&.image-large{aspect-ratio:1;width:100%;height:auto;margin-bottom:1rem;margin-right:0;@supports not (aspect-ratio:1 / 1){&{height:7.25rem}}}&.image-small{width:24vw;height:24vw;margin-bottom:1rem}&.image-icon{margin-bottom:0}}&.image-small,&.image-icon,&.image-none{&.image-large,&.image-small{width:100%;&.density-comfortable{margin-bottom:1rem}&.density-normal{margin-bottom:.75rem}&.density-compact{margin-bottom:.5rem}}&.image-small{aspect-ratio:1;width:10.25rem;height:10.25rem;@supports not (aspect-ratio:1 / 1){&{height:9rem}}}}}}&.display-table{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{width:10rem;height:10rem}&.density-comfortable,&.density-normal{width:20.375rem;height:20.375rem}}&.image-small{width:10rem;height:10rem}}}& .with-sections{&.image-icon{& atomic-product-image::part(previous-button),& atomic-product-image::part(next-button),& atomic-product-image::part(indicator){display:none}}}}`) {
|
|
21
|
+
let AtomicProductSectionVisual = class AtomicProductSectionVisual extends ItemSectionMixin(LitElement, css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */atomic-product-section-visual{&.with-sections{overflow:hidden;text-overflow:ellipsis}&.with-sections{grid-area:visual;&.image-icon{border-radius:var(--atomic-border-radius);height:2rem;width:2rem}&.image-none{display:none}@media (width >= 1024px){&.display-list{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}&.display-grid{margin-bottom:.5rem;&.image-large,&.image-small{width:100%;&.density-comfortable{margin:0 auto 2rem}&.density-normal{margin:0 auto 1.5rem}&.density-compact{margin:0 auto 1rem}}&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:19.75rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:14rem}}}}@media not all and (width >= 1024px){&.display-list{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.display-grid{&.image-large{margin-right:1rem;&.image-large{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:7.25rem}margin-bottom:1rem;margin-right:0;width:100%}&.image-small{height:24vw;margin-bottom:1rem;width:24vw}&.image-icon{margin-bottom:0}}&.image-icon,&.image-none,&.image-small{&.image-large,&.image-small{width:100%;&.density-comfortable{margin-bottom:1rem}&.density-normal{margin-bottom:.75rem}&.density-compact{margin-bottom:.5rem}}&.image-small{aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:9rem}height:10.25rem;width:10.25rem}}}}&.display-table{margin-right:1rem;&.density-comfortable{margin-right:1.5rem}&.image-large{&.density-compact{height:10rem;width:10rem}&.density-comfortable,&.density-normal{height:20.375rem;width:20.375rem}}&.image-small{height:10rem;width:10rem}}}.with-sections{&.image-icon{atomic-product-image::part(indicator),atomic-product-image::part(next-button),atomic-product-image::part(previous-button){display:none}}}}`) {
|
|
23
22
|
};
|
|
24
23
|
__decorate([
|
|
25
24
|
property({ reflect: true, attribute: 'image-size', type: Object })
|
|
@@ -87,7 +87,7 @@ let AtomicIcon = class AtomicIcon extends LightDomMixin(InitializeBindingsMixin(
|
|
|
87
87
|
return svg `${guard([this.svg], () => unsafeSVG(this.svg))}`;
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
AtomicIcon.styles = css`@layer components{atomic-icon{fill:currentColor;aspect-ratio:1;height:auto
|
|
90
|
+
AtomicIcon.styles = css`@layer components{atomic-icon{display:inline-block;fill:currentColor;aspect-ratio:1/1;height:auto;@supports not (aspect-ratio:1/1){height:auto}>svg{aspect-ratio:1/1;height:auto;max-height:100%;width:100%}}}`;
|
|
91
91
|
__decorate([
|
|
92
92
|
property({ type: String, reflect: true })
|
|
93
93
|
], AtomicIcon.prototype, "icon", void 0);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer components{atomic-product-rating{& .text-rating-icon-active,& .text-rating-icon-inactive{& svg path{stroke:var(--atomic-rating-icon-outline-color,none)}}}}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer components{atomic-product-rating{.text-rating-icon-active,.text-rating-icon-inactive{& svg path{stroke:var(--atomic-rating-icon-outline-color,none)}}}}`;
|
|
4
3
|
export default styles;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldValueIsNaNError } from "../../commerce/product-template-component-utils/error";
|
|
2
|
+
export const computeNumberOfStars = (value, field) => {
|
|
3
|
+
if (value === null) {
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
const valueAsNumber = parseFloat(`${value}`);
|
|
7
|
+
if (Number.isNaN(valueAsNumber)) {
|
|
8
|
+
throw new FieldValueIsNaNError(field, value);
|
|
9
|
+
}
|
|
10
|
+
return valueAsNumber;
|
|
11
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import { styleMap } from 'lit/directives/style-map.js';
|
|
3
3
|
import { multiClassMap, tw } from "../../../directives/multi-class-map";
|
|
4
|
-
import { FieldValueIsNaNError } from '../../commerce/product-template-component-utils/error';
|
|
5
4
|
/**
|
|
6
5
|
* Renders a rating component.
|
|
7
6
|
*
|
|
@@ -64,13 +63,3 @@ export const renderRating = ({ props }) => {
|
|
|
64
63
|
</div>
|
|
65
64
|
</div>`;
|
|
66
65
|
};
|
|
67
|
-
export const computeNumberOfStars = (value, field) => {
|
|
68
|
-
if (value === null) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
const valueAsNumber = parseFloat(`${value}`);
|
|
72
|
-
if (Number.isNaN(valueAsNumber)) {
|
|
73
|
-
throw new FieldValueIsNaNError(field, value);
|
|
74
|
-
}
|
|
75
|
-
return valueAsNumber;
|
|
76
|
-
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.value-count{margin-left:calc(var(--spacing,.25rem)*1.5);color:var(--atomic-neutral-dark);[part=value-exclude-button]+&{margin-right:calc(var(--spacing,.25rem)*2)}}:host(.popover-nested){min-width:var(--container-2xs,18rem);&::part(label-button){display:none}&::part(facet){--tw-shadow:0px 2px 8px var(--tw-shadow-color,#e5e8e8bf);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}&::part(values){margin-top:calc(var(--spacing,.25rem)*0);max-height:calc(var(--spacing,.25rem)*96);overflow-y:auto}&::part(search-wrapper){margin-bottom:calc(var(--spacing,.25rem)*2)}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;.value-count{color:var(--atomic-neutral-dark);margin-left:calc(var(--spacing, .25rem)*1.5);[part=value-exclude-button]+&{margin-right:calc(var(--spacing, .25rem)*2)}}:host(.popover-nested){min-width:var(--container-2xs,18rem);&::part(label-button){display:none}&::part(facet){--tw-shadow:0px 2px 8px var(--tw-shadow-color,hsla(180,6%,90%,.75));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}&::part(values){margin-top:calc(var(--spacing, .25rem)*0);max-height:calc(var(--spacing, .25rem)*96);overflow-y:auto}&::part(search-wrapper){margin-bottom:calc(var(--spacing, .25rem)*2)}}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}`;
|
|
4
3
|
export default styles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
3
|
-
input[type=text]:focus-visible~.search-icon{color:var(--atomic-primary)}input[type=text]:hover~.search-icon{color:var(--atomic-primary-light)}.search-icon atomic-icon{width:var(--atomic-facet-search-icon-size,.75rem);height:var(--atomic-facet-search-icon-size,.75rem)}.search-clear-button atomic-icon{width:var(--atomic-facet-search-clear-icon-size,.625rem);height:var(--atomic-facet-search-clear-icon-size,.625rem)}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */input[type=text]:focus-visible~.search-icon{color:var(--atomic-primary)}input[type=text]:hover~.search-icon{color:var(--atomic-primary-light)}.search-icon atomic-icon{height:var(--atomic-facet-search-icon-size,.75rem);width:var(--atomic-facet-search-icon-size,.75rem)}.search-clear-button atomic-icon{height:var(--atomic-facet-search-clear-icon-size,.625rem);width:var(--atomic-facet-search-clear-icon-size,.625rem)}`;
|
|
4
3
|
export default styles;
|
package/dist/atomic/components/components/common/facets/facet-value-box/facet-value-box.tw.css.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
.box-container{padding-inline:calc(var(--spacing,.25rem)*2);grid-template-columns:repeat(var(--atomic-facet-boxes-per-row,4),minmax(0,1fr));gap:var(--atomic-facet-boxes-gap,.5rem);display:grid}.value-box .value-label,.value-box-count{width:100%;display:block}.value-box.selected{box-shadow:0 0 0 1px var(--atomic-primary)}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */.box-container{display:grid;gap:var(--atomic-facet-boxes-gap,.5rem);grid-template-columns:repeat(var(--atomic-facet-boxes-per-row,4),minmax(0,1fr));padding-inline:calc(var(--spacing, .25rem)*2)}.value-box .value-label,.value-box-count{display:block;width:100%}.value-box.selected{box-shadow:0 0 0 1px var(--atomic-primary)}`;
|
|
4
3
|
export default styles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
.value-checkbox{width:var(--atomic-facet-checkbox-size,1rem);height:var(--atomic-facet-checkbox-size,1rem);left:calc(var(--spacing,.25rem)*2);z-index:1;position:absolute}.value-checkbox+label{cursor:pointer;text-overflow:ellipsis;white-space:nowrap;width:100%;padding-block:calc(var(--spacing,.25rem)*2.5);padding-right:calc(var(--spacing,.25rem)*2);padding-left:calc(var(--spacing,.25rem)*8);color:var(--atomic-on-background);flex-direction:row;display:flex;overflow:hidden;&:hover{@media (hover:hover){&{background-color:var(--atomic-neutral-light)}}}}.value-checkbox.selected:focus-visible+label .value-label,.value-checkbox.selected:hover+label .value-label{color:var(--atomic-primary)}.value-checkbox.excluded:focus-visible+label .value-label,.value-checkbox.excluded:hover+label .value-label{color:var(--atomic-error)}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */.value-checkbox{height:var(--atomic-facet-checkbox-size,1rem);left:calc(var(--spacing, .25rem)*2);position:absolute;width:var(--atomic-facet-checkbox-size,1rem);z-index:1}.value-checkbox+label{color:var(--atomic-on-background);cursor:pointer;display:flex;flex-direction:row;overflow:hidden;padding-block:calc(var(--spacing, .25rem)*2.5);padding-left:calc(var(--spacing, .25rem)*8);padding-right:calc(var(--spacing, .25rem)*2);text-overflow:ellipsis;white-space:nowrap;width:100%;&:hover{@media (hover:hover){background-color:var(--atomic-neutral-light)}}}.value-checkbox.selected:focus-visible+label .value-label,.value-checkbox.selected:hover+label .value-label{color:var(--atomic-primary)}.value-checkbox.excluded:focus-visible+label .value-label,.value-checkbox.excluded:hover+label .value-label{color:var(--atomic-error)}`;
|
|
4
3
|
export default styles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}:host{& [part~=outline][part~=result-list-grid-clickable-container]{border:1px solid #0000;border-radius:1rem;padding:1rem;transition:all .12s ease-out;position:relative;&:hover{border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);box-shadow:0px 10px 25px var(--atomic-neutral);cursor:pointer}}& [part=result-list-grid-clickable]:focus-visible{border-style:var(--tw-border-style);border-width:2px;border-color:var(--atomic-primary);color:var(--atomic-primary);cursor:pointer;text-align:center;border-radius:2px;text-decoration:underline;display:inline-block;position:absolute}& [part=result-list-grid-clickable]:not(:focus){clip:rect(1px,1px,1px,1px);padding:0;position:absolute;overflow:hidden}& .list-wrapper{word-break:break-word}& .list-root.display-grid{justify-content:space-evenly;display:grid;& .result-component{box-sizing:border-box;height:100%}}& .list-root.display-grid{@media (width>=1024px){&{grid-template-columns:repeat(auto-fit,minmax(17rem,1fr))}&.density-comfortable{grid-row-gap:4rem;grid-column-gap:1.5rem}&.density-normal,&.density-compact{grid-row-gap:3rem;grid-column-gap:1.5rem}&.image-large{grid-template-columns:repeat(auto-fill,minmax(19rem,1fr))}&.image-small{@media not all and (width>=1024px){&{grid-template-columns:repeat(3,1fr)}}@media (width>=1024px){&{grid-template-columns:repeat(3,1fr)}}@media (width>=1280px){&{grid-template-columns:repeat(4,1fr)}}}}}& .list-root.display-grid{@media not all and (width>=1024px){&.image-large{@media not all and (width>=768px){&{grid-template-columns:minmax(auto,35rem)}&.density-comfortable{& [part~=outline]{&:before{margin:2rem 0}}}&.density-normal{& [part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{& [part~=outline]{&:before{margin:1rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.5rem 0}}}}& [part~=outline]{&:before{content:" ";background-color:var(--atomic-neutral);height:1px;display:block}&:first-of-type:before{display:none}}& atomic-result-placeholder{&:before{background-color:#0000}}}@media (width>=768px){&{grid-column-gap:.5rem;grid-row-gap:.5rem;grid-template-columns:1fr 1fr}& [part~=outline]{border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:1rem;padding:1rem}& atomic-result-placeholder{border-color:#0000}}}&.image-small,&.image-icon,&.image-none{grid-column-gap:.5rem;grid-row-gap:.5rem;& [part~=outline]{border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:1rem;padding:1rem}& atomic-result-placeholder{border-color:#0000}@media not all and (width>=640px){&{grid-template-columns:minmax(0,1fr)}}@media (width>=768px){&{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}@media (width>=1024px){&{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)}}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;:host{[part~=outline][part~=result-list-grid-clickable-container]{border:1px solid transparent;border-radius:1rem;padding:1rem;position:relative;transition:all .12s ease-out;&:hover{border-color:var(--atomic-neutral);border-style:var(--tw-border-style);border-width:1px;box-shadow:0 10px 25px var(--atomic-neutral);cursor:pointer}}[part=result-list-grid-clickable]:focus-visible{border-color:var(--atomic-primary);border-radius:2px;border-style:var(--tw-border-style);border-width:2px;color:var(--atomic-primary);cursor:pointer;display:inline-block;position:absolute;text-align:center;text-decoration:underline}[part=result-list-grid-clickable]:not(:focus){clip:rect(1px,1px,1px,1px);overflow:hidden;padding:0;position:absolute}.list-wrapper{word-break:break-word}.list-root.display-grid{display:grid;justify-content:space-evenly;.result-component{box-sizing:border-box;height:100%}}.list-root.display-grid{@media (width >= 1024px){grid-template-columns:repeat(auto-fit,minmax(17rem,1fr));&.density-comfortable{grid-row-gap:4rem;grid-column-gap:1.5rem}&.density-compact,&.density-normal{grid-row-gap:3rem;grid-column-gap:1.5rem}&.image-large{grid-template-columns:repeat(auto-fill,minmax(19rem,1fr))}&.image-small{@media not all and (width >= 1024px){grid-template-columns:repeat(3,1fr)}@media (width >= 1024px){grid-template-columns:repeat(3,1fr)}@media (min-width:1280px){grid-template-columns:repeat(4,1fr)}}}}.list-root.display-grid{@media not all and (width >= 1024px){&.image-large{@media not all and (min-width:768px){grid-template-columns:minmax(auto,35rem);&.density-comfortable{[part~=outline]{&:before{margin:2rem 0}}}&.density-normal{[part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{[part~=outline]{&:before{margin:1rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.5rem 0}}}}[part~=outline]{&:before{background-color:var(--atomic-neutral);content:" ";display:block;height:1px}&:first-of-type:before{display:none}}atomic-result-placeholder{&:before{background-color:transparent}}}@media (min-width:768px){grid-column-gap:.5rem;grid-row-gap:.5rem;grid-template-columns:1fr 1fr;[part~=outline]{border-color:var(--atomic-neutral);border-radius:1rem;border-style:var(--tw-border-style);border-width:1px;padding:1rem}atomic-result-placeholder{border-color:transparent}}}&.image-icon,&.image-none,&.image-small{grid-column-gap:.5rem;grid-row-gap:.5rem;[part~=outline]{border-color:var(--atomic-neutral);border-radius:1rem;border-style:var(--tw-border-style);border-width:1px;padding:1rem}atomic-result-placeholder{border-color:transparent}@media not all and (min-width:640px){grid-template-columns:minmax(0,1fr)}@media (min-width:768px){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}@media (width >= 1024px){grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)}}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`;
|
|
4
3
|
export default styles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}[part~=divider]{margin-bottom:1rem;&:not(:last-child){border-bottom-color:var(--atomic-neutral);padding-bottom:1rem}}.list-root.display-list{flex-direction:column;display:flex;& .result-component,& atomic-result-placeholder{width:auto}@media (width>=1024px){&.density-comfortable{& [part~=outline]{&:before{margin:2rem 0}}}&.density-normal{& [part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{& [part~=outline]{&:before{margin:1rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.5rem 0}}}}& [part~=outline]{&:before{content:" ";background-color:var(--atomic-neutral);height:1px;display:block}&:first-of-type:before{display:none}}& atomic-result-placeholder{&:before{background-color:#0000}}}@media not all and (width>=1024px){&.image-large{grid-template-columns:minmax(auto,35rem);justify-content:space-evenly;display:grid;&.density-comfortable{& [part~=outline]{&:before{margin:2rem 0}}}&.density-normal{& [part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{& [part~=outline]{&:before{margin:1rem 0}}@media not all and (width>=1024px){& [part~=outline]{&:before{margin:1.5rem 0}}}}& [part~=outline]{&:before{content:" ";background-color:var(--atomic-neutral);height:1px;display:block}&:first-of-type:before{display:none}}& atomic-result-placeholder{&:before{background-color:#0000}}}&.image-small,&.image-icon,&.image-none{grid-row-gap:1rem;& [part~=outline]{border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);border-radius:1rem;padding:1rem}& atomic-result-placeholder{border-color:#0000}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;[part~=divider]{margin-bottom:1rem;&:not(:last-child){border-bottom-color:var(--atomic-neutral);padding-bottom:1rem}}.list-root.display-list{display:flex;flex-direction:column;.result-component,atomic-result-placeholder{width:auto}@media (width >= 1024px){&.density-comfortable{[part~=outline]{&:before{margin:2rem 0}}}&.density-normal{[part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{[part~=outline]{&:before{margin:1rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.5rem 0}}}}[part~=outline]{&:before{background-color:var(--atomic-neutral);content:" ";display:block;height:1px}&:first-of-type:before{display:none}}atomic-result-placeholder{&:before{background-color:transparent}}}@media not all and (width >= 1024px){&.image-large{display:grid;grid-template-columns:minmax(auto,35rem);justify-content:space-evenly;&.density-comfortable{[part~=outline]{&:before{margin:2rem 0}}}&.density-normal{[part~=outline]{&:before{margin:1.5rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.75rem 0}}}}&.density-compact{[part~=outline]{&:before{margin:1rem 0}}@media not all and (width >= 1024px){[part~=outline]{&:before{margin:1.5rem 0}}}}[part~=outline]{&:before{background-color:var(--atomic-neutral);content:" ";display:block;height:1px}&:first-of-type:before{display:none}}atomic-result-placeholder{&:before{background-color:transparent}}}&.image-icon,&.image-none,&.image-small{grid-row-gap:1rem;[part~=outline]{border-color:var(--atomic-neutral);border-radius:1rem;border-style:var(--tw-border-style);border-width:1px;padding:1rem}atomic-result-placeholder{border-color:transparent}}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`;
|
|
4
3
|
export default styles;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`.list-wrapper.placeholder{
|
|
2
|
+
const styles = css`.list-wrapper.placeholder{.result-component,table.list-root{display:none}}.list-wrapper:not(.placeholder){atomic-result-placeholder,atomic-result-table-placeholder{display:none}}.list-root.loading{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse{0%,to{opacity:.6}50%{opacity:.2}}`;
|
|
3
3
|
export default styles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com
|
|
3
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}.list-wrapper.display-table{display:grid;overflow-x:auto}.list-root.display-table{border-spacing:0;border-collapse:separate;min-width:100%;& th,& td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--atomic-neutral);font-family:var(--atomic-font-family);font-size:var(--atomic-text-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));white-space:nowrap;line-height:1rem;&:not(:first-child){border-left:none}&:first-child{min-width:19rem}}& th{background-color:var(--atomic-neutral-light);color:#000;padding:1rem var(--padding);text-align:left;border-bottom:none;font-weight:700;&:first-child{border-top-left-radius:var(--atomic-border-radius-xl)}&:last-child{border-top-right-radius:var(--atomic-border-radius-xl)}}& td{color:var(--atomic-neutral-dark);vertical-align:top;padding:var(--padding);border-top:none}&.density-comfortable{--padding:2rem}&.density-normal{--padding:1.5rem}&.density-compact{--padding:1rem}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}`;
|
|
2
|
+
const styles = css`/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */@layer properties;.list-wrapper.display-table{display:grid;overflow-x:auto}.list-root.display-table{border-collapse:separate;border-spacing:0;min-width:100%;td,th{border-color:var(--atomic-neutral);border-style:var(--tw-border-style);border-width:1px;font-family:var(--atomic-font-family);font-size:var(--atomic-text-sm);line-height:var(--tw-leading,var(--text-sm--line-height,1.42857));line-height:1rem;white-space:nowrap;&:not(:first-child){border-left:none}&:first-child{min-width:19rem}}th{background-color:var(--atomic-neutral-light);border-bottom:none;color:#000;font-weight:700;padding:1rem var(--padding);text-align:left;&:first-child{border-top-left-radius:var(--atomic-border-radius-xl)}&:last-child{border-top-right-radius:var(--atomic-border-radius-xl)}}td{border-top:none;color:var(--atomic-neutral-dark);padding:var(--padding);vertical-align:top}&.density-comfortable{--padding:2rem}&.density-normal{--padding:1.5rem}&.density-compact{--padding:1rem}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-border-style:solid}}}`;
|
|
4
3
|
export default styles;
|
package/dist/atomic/components/components/search/atomic-search-layout/atomic-search-layout.tw.css.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
const styles = css`.atomic-modal-opened{overflow-y:hidden}atomic-layout-section[section=search]{grid-area:atomic-section-search}atomic-layout-section[section=facets]{grid-area:atomic-section-facets}atomic-layout-section[section=main]{grid-area:atomic-section-main}atomic-layout-section[section=status]{grid-area:atomic-section-status}atomic-layout-section[section=pagination]{grid-area:atomic-section-pagination}atomic-search-layout{grid-template-areas:".atomic-section-search."".atomic-section-main.";grid-template-columns:var(--atomic-layout-spacing-x)minmax(0,1fr)
|
|
2
|
+
const styles = css`.atomic-modal-opened{overflow-y:hidden}atomic-layout-section[section=search]{grid-area:atomic-section-search}atomic-layout-section[section=facets]{grid-area:atomic-section-facets}atomic-layout-section[section=main]{grid-area:atomic-section-main}atomic-layout-section[section=status]{grid-area:atomic-section-status}atomic-layout-section[section=pagination]{grid-area:atomic-section-pagination}atomic-search-layout{display:none;grid-template-areas:". atomic-section-search ." ". atomic-section-main .";grid-template-columns:var(--atomic-layout-spacing-x) minmax(0,1fr) var(
|
|
3
|
+
--atomic-layout-spacing-x
|
|
4
|
+
);height:100%;width:100%;atomic-layout-section[section=search]{justify-self:center;margin:var(--atomic-layout-spacing-y) 0;max-width:var(--atomic-layout-max-search-box-input-width,678px);width:100%;atomic-search-box{&::part(suggestions-double-list){max-width:var(
|
|
5
|
+
--atomic-layout-max-search-box-double-suggestions-width,800px
|
|
6
|
+
);width:125%}&::part(suggestions-left){flex-basis:var(--atomic-layout-search-box-left-suggestions-width,30%)}&::part(suggestions-right){flex-basis:calc(100% - var(--atomic-layout-search-box-left-suggestions-width, 30%))}}}atomic-layout-section[section=facets]{display:none;& *{margin-bottom:var(--atomic-layout-spacing-y)}}atomic-layout-section[section=main]{margin-bottom:var(--atomic-layout-spacing-y)}atomic-layout-section[section=horizontal-facets]{display:flex;flex-wrap:wrap;margin-bottom:var(--atomic-layout-spacing-y);row-gap:.5rem;&>*{max-width:100%}&>atomic-popover,&>atomic-segmented-facet{margin-right:.5rem}&>atomic-popover{display:none}}atomic-layout-section[section=status]{display:grid;grid-template-areas:"atomic-breadbox atomic-breadbox" "atomic-query-summary atomic-sort" "atomic-did-you-mean atomic-did-you-mean" "atomic-notifications atomic-notifications";justify-content:space-between;&>*{margin-bottom:var(--atomic-layout-spacing-y)}atomic-breadbox{grid-area:atomic-breadbox}atomic-query-summary{align-self:center;grid-area:atomic-query-summary;overflow:hidden}atomic-sort-dropdown{justify-self:end}atomic-refine-toggle,atomic-sort-dropdown{grid-area:atomic-sort}atomic-did-you-mean{grid-area:atomic-did-you-mean}atomic-notifications{grid-area:atomic-notifications}}atomic-layout-section[section=results]{atomic-smart-snippet,atomic-smart-snippet-suggestions{margin-bottom:1.5rem}}atomic-layout-section[section=pagination]{align-items:center;display:flex;flex-direction:column;justify-content:space-between;atomic-load-more-results{width:100%}&:has(:only-child){justify-content:center}&>*{margin-top:var(--atomic-layout-spacing-y)}@media only screen and (min-width:50rem){flex-direction:row}}}`;
|
|
3
7
|
export default styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;MCjCa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,CACH,QAAQ,WAAW,sCAAsC,UAAU,YAAY,CAChF,CAAC;KACH;;;ACfH,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;SAIpC,gBAAgB,CAAI,OAAgB,EAAE,UAAkB;IACtE,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QACpC,MAAM,KAAK,GAAG,gBAAgB,CAC5B,oBAAoB,EACpB,CAAC,IAAO;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB,CACF,CAAC;QACF,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;YACjC,MAAM,CACJ,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CACnE,CAAC;SACH;KACF,CAAC,CAAC;AACL;;ACoDA;;;;;;;;;;SAUgB,mBAAmB,CAAoB,OAAgB;IACrE,OAAO,gBAAgB,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACxD;;;;","names":[],"sources":["src/components/commerce/product-template-component-utils/stencil-product-template-decorators.tsx","src/components/common/item-list/context/item-context-controller.ts","src/components/common/item-list/fetch-item-context.ts","src/decorators/commerce/product-template-decorators.ts"],"sourcesContent":["import {Product} from '@coveo/headless/commerce';\nimport {\n InteractiveItemContext,\n InteractiveItemContextEvent,\n ItemContext,\n ItemContextEvent,\n itemContext,\n} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * A [StencilJS property decorator](https://stenciljs.com/) to be used for product template components.\n * This allows the Stencil component to fetch the current product from its rendered parent, the `atomic-product` component.\n *\n * Example:\n * ```\n * @ProductContext() private product!: Product;\n * ```\n *\n * For more information and examples, view the [Utilities section](https://github.com/coveo/ui-kit/tree/master/packages/atomic#utilities) of the Coveo Atomic README.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `createProductContextController` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function ProductContext(opts: {folded: boolean} = {folded: false}) {\n return ItemContext({parentName: 'atomic-product', folded: opts.folded});\n}\n\nexport function InteractiveProductContext() {\n return InteractiveItemContext();\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent = InteractiveItemContextEvent;\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This method is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered \"atomic-product\".\n * @returns A promise that resolves on initialization of the parent \"atomic-product\" element, or rejects when there is no parent \"atomic-product\" element.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function productContext<T extends Product>(element: Element) {\n return itemContext<T>(element, 'atomic-product');\n}\n","import type {LitElement, ReactiveController, ReactiveControllerHost} from 'lit';\nimport type {InitializableComponent} from '@/src/decorators/types.js';\nimport {buildCustomEvent} from '@/src/utils/event-utils';\n\ntype LitElementWithError = Omit<\n Pick<InitializableComponent, 'error'>,\n 'error'\n> &\n LitElement & {\n error: Error | null;\n };\n\nconst itemContextEventName = 'atomic/resolveResult';\n\nexport class MissingParentError extends Error {\n constructor(elementName: string, parentName: string) {\n super(\n `The \"${elementName}\" element must be the child of an \"${parentName}\" element.`\n );\n }\n}\n\nfunction extractFolded<T = Record<string, unknown>>(\n item: Record<string, unknown>,\n returnFolded: boolean\n): T {\n if (returnFolded) {\n if ('children' in item) {\n return item as T;\n } else {\n return {children: [], result: item} as T;\n }\n }\n\n if ('children' in item && 'result' in item) {\n return item.result as T;\n }\n return item as T;\n}\n\n/**\n * A reactive controller that manages item context data from parent components.\n * Handles fetching item data via custom events and manages error states.\n */\nexport class ItemContextController<T = Record<string, unknown>>\n implements ReactiveController\n{\n private host: ReactiveControllerHost & LitElementWithError;\n private parentName: string;\n private folded: boolean;\n private _item: T | null = null;\n private _error: MissingParentError | null = null;\n\n constructor(\n host: ReactiveControllerHost & LitElementWithError,\n options: {parentName?: string; folded?: boolean} = {}\n ) {\n this.host = host;\n this.parentName = options.parentName ?? 'atomic-result';\n this.folded = options.folded ?? false;\n host.addController(this);\n }\n\n get item(): T | null {\n return this._error ? null : this._item;\n }\n\n get error(): MissingParentError | null {\n return this._error;\n }\n\n get hasError(): boolean {\n return this._error !== null;\n }\n\n hostConnected(): void {\n this._resolveItemContext();\n }\n\n private _resolveItemContext(): void {\n const event = buildCustomEvent(\n itemContextEventName,\n (item: Record<string, unknown>) => {\n this._item = extractFolded<T>(item, this.folded);\n this._error = null;\n this.host.error = null;\n this.host.requestUpdate();\n }\n );\n\n const canceled = this.host.dispatchEvent(event);\n if (canceled) {\n const elementName = (this.host as Element).nodeName.toLowerCase();\n this._error = new MissingParentError(elementName, this.parentName);\n this._item = null;\n this.host.error = this._error;\n this.host.requestUpdate();\n }\n }\n}\n\ntype ItemContextEventHandler<T> = (item: T) => void;\nexport type ItemContextEvent<T> = CustomEvent<ItemContextEventHandler<T>>;\n","import {closest} from '../../../utils/dom-utils.js';\nimport {buildCustomEvent} from '../../../utils/event-utils.js';\nimport {MissingParentError} from './context/item-context-controller.js';\n\nconst itemContextEventName = 'atomic/resolveResult';\n\ntype ItemContextEventHandler<T> = (item: T) => void;\n\nexport function fetchItemContext<T>(element: Element, parentName: string) {\n return new Promise<T>((resolve, reject) => {\n const event = buildCustomEvent<ItemContextEventHandler<T>>(\n itemContextEventName,\n (item: T) => {\n return resolve(item);\n }\n );\n element.dispatchEvent(event);\n\n if (!closest(element, parentName)) {\n reject(\n new MissingParentError(element.nodeName.toLowerCase(), parentName)\n );\n }\n });\n}\n","import type {InteractiveProduct, Product} from '@coveo/headless/commerce';\nimport type {LitElement} from 'lit';\nimport {\n InteractiveItemContextController,\n type InteractiveItemContextEvent,\n} from '@/src/components/common/item-list/context/interactive-item-context-controller';\nimport {\n ItemContextController,\n type ItemContextEvent,\n} from '@/src/components/common/item-list/context/item-context-controller';\nimport {fetchItemContext} from '@/src/components/common/item-list/fetch-item-context';\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing product context in product template components.\n *\n * @param host - The Lit component instance\n * @param options - Configuration options\n * @returns ItemContextController instance configured for atomic-product\n *\n * @example\n * ```typescript\n * @customElement('my-product-component')\n * export class MyProductComponent extends LitElement {\n * private productController = createProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.productController.item;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createProductContextController(\n host: LitElement & {error: Error | null},\n options: {folded?: boolean} = {}\n): ItemContextController<Product> {\n return new ItemContextController<Product>(host, {\n parentName: 'atomic-product',\n folded: options.folded ?? false,\n });\n}\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive product context in product template components.\n *\n * @param host - The Lit component instance\n * @returns InteractiveItemContextController instance\n *\n * @example\n * ```typescript\n * @customElement('my-interactive-product-component')\n * export class MyInteractiveProductComponent extends LitElement {\n * private interactiveProductController = createInteractiveProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.interactiveProductController.interactiveItem;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createInteractiveProductContextController(\n host: LitElement & {error: Error}\n): InteractiveItemContextController<InteractiveProduct> {\n return new InteractiveItemContextController<InteractiveProduct>(host);\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent<\n T extends InteractiveProduct = InteractiveProduct,\n> = InteractiveItemContextEvent<T>;\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.\n * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.\n */\nexport function fetchProductContext<T extends Product>(element: Element) {\n return fetchItemContext<T>(element, 'atomic-product');\n}\n"],"version":3}
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;;;;;;;;;;;SAYgB,cAAc,CAAoB,OAAgB;IAChE,OAAO,WAAW,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACnD;;MCHa,kBAAmB,SAAQ,KAAK;IAC3C,YAAY,WAAmB,EAAE,UAAkB;QACjD,KAAK,CACH,QAAQ,WAAW,sCAAsC,UAAU,YAAY,CAChF,CAAC;KACH;;;ACfH,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;SAIpC,gBAAgB,CAAI,OAAgB,EAAE,UAAkB;IACtE,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM;QACpC,MAAM,KAAK,GAAG,gBAAgB,CAC5B,oBAAoB,EACpB,CAAC,IAAO;YACN,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;SACtB,CACF,CAAC;QACF,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE;YACjC,MAAM,CACJ,IAAI,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,UAAU,CAAC,CACnE,CAAC;SACH;KACF,CAAC,CAAC;AACL;;ACoDA;;;;;;;;;;SAUgB,mBAAmB,CAAoB,OAAgB;IACrE,OAAO,gBAAgB,CAAI,OAAO,EAAE,gBAAgB,CAAC,CAAC;AACxD;;;;","names":[],"sources":["src/components/commerce/product-template-component-utils/stencil-product-template-decorators.tsx","src/components/common/item-list/context/item-context-controller.ts","src/components/common/item-list/fetch-item-context.ts","src/decorators/commerce/product-template-decorators.ts"],"sourcesContent":["import {Product} from '@coveo/headless/commerce';\nimport {itemContext} from '../../common/item-list/stencil-item-decorators';\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This method is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the method in the [connectedCallback lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered \"atomic-product\".\n * @returns A promise that resolves on initialization of the parent \"atomic-product\" element, or rejects when there is no parent \"atomic-product\" element.\n *\n * @deprecated should only be used for Stencil components. For Lit components, use `fetchProductContext` from \\@/src/decorators/commerce/product-template-decorators.ts\n */\nexport function productContext<T extends Product>(element: Element) {\n return itemContext<T>(element, 'atomic-product');\n}\n","import type {LitElement, ReactiveController, ReactiveControllerHost} from 'lit';\nimport type {InitializableComponent} from '@/src/decorators/types.js';\nimport {buildCustomEvent} from '@/src/utils/event-utils';\n\ntype LitElementWithError = Omit<\n Pick<InitializableComponent, 'error'>,\n 'error'\n> &\n LitElement & {\n error: Error | null;\n };\n\nconst itemContextEventName = 'atomic/resolveResult';\n\nexport class MissingParentError extends Error {\n constructor(elementName: string, parentName: string) {\n super(\n `The \"${elementName}\" element must be the child of an \"${parentName}\" element.`\n );\n }\n}\n\nfunction extractFolded<T = Record<string, unknown>>(\n item: Record<string, unknown>,\n returnFolded: boolean\n): T {\n if (returnFolded) {\n if ('children' in item) {\n return item as T;\n } else {\n return {children: [], result: item} as T;\n }\n }\n\n if ('children' in item && 'result' in item) {\n return item.result as T;\n }\n return item as T;\n}\n\n/**\n * A reactive controller that manages item context data from parent components.\n * Handles fetching item data via custom events and manages error states.\n */\nexport class ItemContextController<T = Record<string, unknown>>\n implements ReactiveController\n{\n private host: ReactiveControllerHost & LitElementWithError;\n private parentName: string;\n private folded: boolean;\n private _item: T | null = null;\n private _error: MissingParentError | null = null;\n\n constructor(\n host: ReactiveControllerHost & LitElementWithError,\n options: {parentName?: string; folded?: boolean} = {}\n ) {\n this.host = host;\n this.parentName = options.parentName ?? 'atomic-result';\n this.folded = options.folded ?? false;\n host.addController(this);\n }\n\n get item(): T | null {\n return this._error ? null : this._item;\n }\n\n get error(): MissingParentError | null {\n return this._error;\n }\n\n get hasError(): boolean {\n return this._error !== null;\n }\n\n hostConnected(): void {\n this._resolveItemContext();\n }\n\n private _resolveItemContext(): void {\n const event = buildCustomEvent(\n itemContextEventName,\n (item: Record<string, unknown>) => {\n this._item = extractFolded<T>(item, this.folded);\n this._error = null;\n this.host.error = null;\n this.host.requestUpdate();\n }\n );\n\n const canceled = this.host.dispatchEvent(event);\n if (canceled) {\n const elementName = (this.host as Element).nodeName.toLowerCase();\n this._error = new MissingParentError(elementName, this.parentName);\n this._item = null;\n this.host.error = this._error;\n this.host.requestUpdate();\n }\n }\n}\n\ntype ItemContextEventHandler<T> = (item: T) => void;\nexport type ItemContextEvent<T> = CustomEvent<ItemContextEventHandler<T>>;\n","import {closest} from '../../../utils/dom-utils.js';\nimport {buildCustomEvent} from '../../../utils/event-utils.js';\nimport {MissingParentError} from './context/item-context-controller.js';\n\nconst itemContextEventName = 'atomic/resolveResult';\n\ntype ItemContextEventHandler<T> = (item: T) => void;\n\nexport function fetchItemContext<T>(element: Element, parentName: string) {\n return new Promise<T>((resolve, reject) => {\n const event = buildCustomEvent<ItemContextEventHandler<T>>(\n itemContextEventName,\n (item: T) => {\n return resolve(item);\n }\n );\n element.dispatchEvent(event);\n\n if (!closest(element, parentName)) {\n reject(\n new MissingParentError(element.nodeName.toLowerCase(), parentName)\n );\n }\n });\n}\n","import type {InteractiveProduct, Product} from '@coveo/headless/commerce';\nimport type {LitElement} from 'lit';\nimport {\n InteractiveItemContextController,\n type InteractiveItemContextEvent,\n} from '@/src/components/common/item-list/context/interactive-item-context-controller';\nimport {\n ItemContextController,\n type ItemContextEvent,\n} from '@/src/components/common/item-list/context/item-context-controller';\nimport {fetchItemContext} from '@/src/components/common/item-list/fetch-item-context';\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing product context in product template components.\n *\n * @param host - The Lit component instance\n * @param options - Configuration options\n * @returns ItemContextController instance configured for atomic-product\n *\n * @example\n * ```typescript\n * @customElement('my-product-component')\n * export class MyProductComponent extends LitElement {\n * private productController = createProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.productController.item;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createProductContextController(\n host: LitElement & {error: Error | null},\n options: {folded?: boolean} = {}\n): ItemContextController<Product> {\n return new ItemContextController<Product>(host, {\n parentName: 'atomic-product',\n folded: options.folded ?? false,\n });\n}\n\n/**\n * Creates a [Lit reactive controller](https://lit.dev/docs/composition/controllers/) for managing interactive product context in product template components.\n *\n * @param host - The Lit component instance\n * @returns InteractiveItemContextController instance\n *\n * @example\n * ```typescript\n * @customElement('my-interactive-product-component')\n * export class MyInteractiveProductComponent extends LitElement {\n * private interactiveProductController = createInteractiveProductContextController(this);\n *\n * @state() product!: Product;\n *\n * render() {\n * this.product = this.interactiveProductController.interactiveItem;\n * return html`<div>${this.product?.ec_name}</div>`;\n * }\n * }\n * ```\n */\nexport function createInteractiveProductContextController(\n host: LitElement & {error: Error}\n): InteractiveItemContextController<InteractiveProduct> {\n return new InteractiveItemContextController<InteractiveProduct>(host);\n}\n\nexport type ProductContextEvent<T = Product> = ItemContextEvent<T>;\nexport type InteractiveProductContextEvent<\n T extends InteractiveProduct = InteractiveProduct,\n> = InteractiveItemContextEvent<T>;\n\n/**\n * Retrieves `Product` on a rendered `atomic-product`.\n *\n * This utility function is useful for building custom product template elements, see [Create a Product List](https://docs.coveo.com/en/atomic/latest/cc-search/create-custom-components/native-components/#custom-product-template-component-example) for more information.\n *\n * You should use the utility function in the [`connectedCallback` lifecycle method](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements#using_the_lifecycle_callbacks).\n *\n * @param element - The element that the event is dispatched to, which must be the child of a rendered `atomic-product`.\n * @returns A promise that resolves on initialization of the parent `atomic-product` element, or rejects when there is no parent `atomic-product` element.\n */\nexport function fetchProductContext<T extends Product>(element: Element) {\n return fetchItemContext<T>(element, 'atomic-product');\n}\n"],"version":3}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
const css = `@theme inline static{
|
|
1
|
+
const css = `@theme inline static{--atomic-primary:#126ce0;--atomic-primary-light:#399ffe;--atomic-primary-dark:#1a50ad;--atomic-on-primary:#fff;--atomic-ring-primary:rgba(19,114,236,.5);--atomic-neutral-dark:#626971;--atomic-neutral-dim:#bfc4c8;--atomic-neutral:#e5e8e8;--atomic-neutral-light:#f6f7f9;--atomic-neutral-lighter:#f2f2f2;--atomic-background:#fff;--atomic-on-background:#282829;--atomic-success:#12a244;--atomic-error:#ce3f00;--atomic-visited:#752e9c;--atomic-disabled:#c5cacf;--atomic-success-background:#d4fcf0;--atomic-error-background:#fcbdc0;--atomic-primary-background:#edf6ff;--atomic-inline-code:#cd2113;--atomic-border-radius:0.25rem;--atomic-border-radius-md:0.5rem;--atomic-border-radius-lg:0.75rem;--atomic-border-radius-xl:1rem;--atomic-font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Ubuntu,roboto,noto,arial,sans-serif;--atomic-font-normal:400;--atomic-font-bold:700;--atomic-text-base:0.875rem;--atomic-text-sm:0.75rem;--atomic-text-lg:1rem;--atomic-text-xl:1.125rem;--atomic-text-2xl:1.5rem;--atomic-line-height-ratio:1.5;--atomic-layout-spacing-x:1.5rem;--atomic-layout-spacing-y:1rem}@theme inline static{--color-primary:var(--atomic-primary);--color-primary-light:var(--atomic-primary-light);--color-primary-dark:var(--atomic-primary-dark);--color-on-primary:var(--atomic-on-primary);--color-ring-primary:var(--atomic-ring-primary);--color-primary-background:var(--atomic-primary-background);--color-neutral-dark:var(--atomic-neutral-dark);--color-neutral-dim:var(--atomic-neutral-dim);--color-neutral:var(--atomic-neutral);--color-neutral-light:var(--atomic-neutral-light);--color-neutral-lighter:var(--atomic-neutral-lighter);--color-background:var(--atomic-background);--color-on-background:var(--atomic-on-background);--color-success:var(--atomic-success);--color-error:var(--atomic-error);--color-visited:var(--atomic-visited);--color-disabled:var(--atomic-disabled);--color-inline-code:var(--atomic-inline-code);--color-rating-icon-inactive:var(
|
|
2
|
+
--atomic-rating-icon-inactive-color,var(--atomic-neutral)
|
|
3
|
+
);--color-rating-icon-active:var(--atomic-rating-icon-active-color,#f6ce3c);--color-rating-icon-outline:var(--atomic-rating-icon-outline-color,none);--color-more-results-progress-bar-color-from:var(
|
|
4
|
+
--atomic-more-results-progress-bar-color-from,var(--atomic-primary-dark)
|
|
5
|
+
);--color-more-results-progress-bar-color-to:var(
|
|
6
|
+
--atomic-more-results-progress-bar-color-to,var(--atomic-primary-light)
|
|
7
|
+
);--text-sm:var(--atomic-text-sm);--text-base:var(--atomic-text-base);--text-lg:var(--atomic-text-lg);--text-xl:var(--atomic-text-xl);--text-2xl:var(--atomic-text-2xl);--font-weight-normal:var(--atomic-font-normal);--font-weight-bold:var(--atomic-font-bold);--shadow-inner-primary:inset 0 0 0 1px var(--atomic-primary);--shadow-lg:0px 2px 8px hsla(180,6%,90%,.75);--shadow-t-lg:0px -2px 8px hsla(180,6%,90%,.75);--radius:var(--atomic-border-radius);--radius-xs:var(--atomic-border-radius);--radius-sm:var(--atomic-border-radius);--radius-md:var(--atomic-border-radius-md);--radius-lg:var(--atomic-border-radius-lg);--radius-xl:var(--atomic-border-radius-xl);--font-sans:var(--atomic-font-family);--breakpoint-desktop:1024px}@theme{--animate-slide-down-modal:slideDown 0.5s linear forwards;--animate-scale-up-modal:scaleUp 0.5s cubic-bezier(0.165,0.84,0.44,1) forwards}`;
|
|
2
8
|
export default css;
|