recipe-planner-ui 1.6.1 → 1.6.2
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/cjs/rp-filter-chips_6.cjs.entry.js +1 -1
- package/dist/collection/components/rp-search-bar/rp-search-bar.css +11 -2
- package/dist/components/rp-search-bar.js +1 -1
- package/dist/esm/rp-filter-chips_6.entry.js +1 -1
- package/dist/recipe-planner-ui/{p-22441648.entry.js → p-7c6d16b1.entry.js} +1 -1
- package/dist/recipe-planner-ui/recipe-planner-ui.esm.js +1 -1
- package/package.json +1 -1
|
@@ -278,7 +278,7 @@ const RecipeCard = class {
|
|
|
278
278
|
};
|
|
279
279
|
RecipeCard.style = rpRecipeCardCss();
|
|
280
280
|
|
|
281
|
-
const rpSearchBarCss = () => `.sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.
|
|
281
|
+
const rpSearchBarCss = () => `.sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus,.field.sc-rp-search-bar:focus-visible{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.submit.sc-rp-search-bar:focus-visible,.clear.sc-rp-search-bar:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (max-width: 560px){.bar.sc-rp-search-bar{padding-inline-start:var(--rp-space-3);gap:var(--rp-space-1)}.submit.sc-rp-search-bar{display:grid;place-items:center;width:38px;height:38px;padding:0}.submit-text.sc-rp-search-bar{display:none}.submit-icon.sc-rp-search-bar{display:block}}@media (prefers-reduced-motion: reduce){.bar.sc-rp-search-bar,.icon.sc-rp-search-bar,.clear.sc-rp-search-bar,.submit.sc-rp-search-bar{transition:none}.submit.sc-rp-search-bar:active{transform:none}}`;
|
|
282
282
|
|
|
283
283
|
const SearchBar = class {
|
|
284
284
|
constructor(hostRef) {
|
|
@@ -59,7 +59,9 @@
|
|
|
59
59
|
color: var(--rp-color-text-subtle);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
/* Both states, so a keyboard focus does not reinstate the outline the wrapper replaces. */
|
|
63
|
+
.field:focus,
|
|
64
|
+
.field:focus-visible {
|
|
63
65
|
outline: none;
|
|
64
66
|
}
|
|
65
67
|
|
|
@@ -128,7 +130,14 @@
|
|
|
128
130
|
stroke-linecap: round;
|
|
129
131
|
}
|
|
130
132
|
|
|
131
|
-
|
|
133
|
+
/**
|
|
134
|
+
* The input is deliberately absent here.
|
|
135
|
+
*
|
|
136
|
+
* Focusing it already lights the whole bar — `.bar:focus-within` draws the border and the
|
|
137
|
+
* halo — so an outline on the field as well drew a second, smaller box *inside* the first.
|
|
138
|
+
* One focus indicator per control: the wrapper is that indicator, which is the point of
|
|
139
|
+
* putting the border there rather than on the input.
|
|
140
|
+
*/
|
|
132
141
|
.submit:focus-visible,
|
|
133
142
|
.clear:focus-visible {
|
|
134
143
|
outline: var(--rp-focus-ring);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,H as a,c as e,h as s,a as c,t as o}from"./index.js";const t=r(class extends a{constructor(r){super(),!1!==r&&this.__registerHost(),this.rpSearch=e(this,"rpSearch"),this.rpClear=e(this,"rpClear")}value="";placeholder="Search recipes";label="Search recipes";draft="";rpSearch;rpClear;onValueChange(r){this.draft=r??""}componentWillLoad(){this.draft=this.value??""}onSubmit=r=>{r.preventDefault(),this.rpSearch.emit(this.draft.trim())};onInput=r=>{this.draft=r.target.value};onClear=()=>{this.draft="",this.rpClear.emit()};render(){return s(c,{key:"98c0c2367f27c061759b4fcae36b09fb4f88a720"},s("form",{key:"de043755e60e10f39b102605b5347416abf9dc8f",class:"bar",role:"search",onSubmit:this.onSubmit},s("svg",{key:"f5fdf365cd2901deb885068afece74c843a9d174",class:"icon",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},s("circle",{key:"9ad873f8544081cbd16f7666e428565ade2cdbed",cx:"11",cy:"11",r:"7"}),s("path",{key:"d6284fb25056636002e6cde74a1bd7bf36f40291",d:"m20 20-3.6-3.6"})),s("input",{key:"17288bc6a472a736d78d8beef70316547c7eb11f",type:"search",class:"field",value:this.draft,placeholder:this.placeholder,"aria-label":this.label,onInput:this.onInput}),this.draft&&s("button",{key:"468a3c549bad63863a6bce18d0d46335705ace89",type:"button",class:"clear",onClick:this.onClear,"aria-label":"Clear search"},s("svg",{key:"70bab6cfdea49c209208e19a496ab24429bf704e",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},s("path",{key:"dcafa21163e380fed6ff35dff0e8f1915b7d5500",d:"M6 6l12 12M18 6L6 18"}))),s("button",{key:"24ac96852bb46844121597ee647c5e35304b9df9",type:"submit",class:"submit","aria-label":"Search"},s("span",{key:"d6e9577315a844403e120fb705a180f49c8f5733",class:"submit-text"},"Search"),s("svg",{key:"9fa48cfa05c8d8a3b5f328131c12a5b954069e56",class:"submit-icon",viewBox:"0 0 24 24",width:"17",height:"17","aria-hidden":"true"},s("circle",{key:"e9367a2e0ee4e05f3b39cbd728f2ea968a1c129f",cx:"11",cy:"11",r:"7"}),s("path",{key:"f2f41503b77ae140224746a419f792ceb77ea5ff",d:"m20 20-3.6-3.6"})))))}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return".sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.
|
|
1
|
+
import{p as r,H as a,c as e,h as s,a as c,t as o}from"./index.js";const t=r(class extends a{constructor(r){super(),!1!==r&&this.__registerHost(),this.rpSearch=e(this,"rpSearch"),this.rpClear=e(this,"rpClear")}value="";placeholder="Search recipes";label="Search recipes";draft="";rpSearch;rpClear;onValueChange(r){this.draft=r??""}componentWillLoad(){this.draft=this.value??""}onSubmit=r=>{r.preventDefault(),this.rpSearch.emit(this.draft.trim())};onInput=r=>{this.draft=r.target.value};onClear=()=>{this.draft="",this.rpClear.emit()};render(){return s(c,{key:"98c0c2367f27c061759b4fcae36b09fb4f88a720"},s("form",{key:"de043755e60e10f39b102605b5347416abf9dc8f",class:"bar",role:"search",onSubmit:this.onSubmit},s("svg",{key:"f5fdf365cd2901deb885068afece74c843a9d174",class:"icon",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},s("circle",{key:"9ad873f8544081cbd16f7666e428565ade2cdbed",cx:"11",cy:"11",r:"7"}),s("path",{key:"d6284fb25056636002e6cde74a1bd7bf36f40291",d:"m20 20-3.6-3.6"})),s("input",{key:"17288bc6a472a736d78d8beef70316547c7eb11f",type:"search",class:"field",value:this.draft,placeholder:this.placeholder,"aria-label":this.label,onInput:this.onInput}),this.draft&&s("button",{key:"468a3c549bad63863a6bce18d0d46335705ace89",type:"button",class:"clear",onClick:this.onClear,"aria-label":"Clear search"},s("svg",{key:"70bab6cfdea49c209208e19a496ab24429bf704e",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},s("path",{key:"dcafa21163e380fed6ff35dff0e8f1915b7d5500",d:"M6 6l12 12M18 6L6 18"}))),s("button",{key:"24ac96852bb46844121597ee647c5e35304b9df9",type:"submit",class:"submit","aria-label":"Search"},s("span",{key:"d6e9577315a844403e120fb705a180f49c8f5733",class:"submit-text"},"Search"),s("svg",{key:"9fa48cfa05c8d8a3b5f328131c12a5b954069e56",class:"submit-icon",viewBox:"0 0 24 24",width:"17",height:"17","aria-hidden":"true"},s("circle",{key:"e9367a2e0ee4e05f3b39cbd728f2ea968a1c129f",cx:"11",cy:"11",r:"7"}),s("path",{key:"f2f41503b77ae140224746a419f792ceb77ea5ff",d:"m20 20-3.6-3.6"})))))}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return".sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus,.field.sc-rp-search-bar:focus-visible{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.submit.sc-rp-search-bar:focus-visible,.clear.sc-rp-search-bar:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (max-width: 560px){.bar.sc-rp-search-bar{padding-inline-start:var(--rp-space-3);gap:var(--rp-space-1)}.submit.sc-rp-search-bar{display:grid;place-items:center;width:38px;height:38px;padding:0}.submit-text.sc-rp-search-bar{display:none}.submit-icon.sc-rp-search-bar{display:block}}@media (prefers-reduced-motion: reduce){.bar.sc-rp-search-bar,.icon.sc-rp-search-bar,.clear.sc-rp-search-bar,.submit.sc-rp-search-bar{transition:none}.submit.sc-rp-search-bar:active{transform:none}}"}},[514,"rp-search-bar",{value:[1],placeholder:[1],label:[1],draft:[32]},void 0,{value:[{onValueChange:0}]}]);function i(){"undefined"!=typeof customElements&&["rp-search-bar"].forEach((r=>{"rp-search-bar"===r&&(customElements.get(o(r))||customElements.define(o(r),t))}))}i();const n=t,p=i;export{n as RpSearchBar,p as defineCustomElement}
|
|
@@ -276,7 +276,7 @@ const RecipeCard = class {
|
|
|
276
276
|
};
|
|
277
277
|
RecipeCard.style = rpRecipeCardCss();
|
|
278
278
|
|
|
279
|
-
const rpSearchBarCss = () => `.sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.
|
|
279
|
+
const rpSearchBarCss = () => `.sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus,.field.sc-rp-search-bar:focus-visible{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.submit.sc-rp-search-bar:focus-visible,.clear.sc-rp-search-bar:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (max-width: 560px){.bar.sc-rp-search-bar{padding-inline-start:var(--rp-space-3);gap:var(--rp-space-1)}.submit.sc-rp-search-bar{display:grid;place-items:center;width:38px;height:38px;padding:0}.submit-text.sc-rp-search-bar{display:none}.submit-icon.sc-rp-search-bar{display:block}}@media (prefers-reduced-motion: reduce){.bar.sc-rp-search-bar,.icon.sc-rp-search-bar,.clear.sc-rp-search-bar,.submit.sc-rp-search-bar{transition:none}.submit.sc-rp-search-bar:active{transform:none}}`;
|
|
280
280
|
|
|
281
281
|
const SearchBar = class {
|
|
282
282
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as e,h as a,H as s,g as o}from"./p-xM9qpraa.js";const t=class{constructor(a){r(this,a),this.rpFilterChange=e(this,"rpFilterChange")}options=[];selected=null;label="Filter";rpFilterChange;select(r){this.rpFilterChange.emit(this.selected===r?null:r)}render(){const r=Array.isArray(this.options)?this.options:[];return a(s,{key:"c87ecafe77bff6d1fb9c38911e186ef6c53010d9"},a("div",{key:"a9db225e2972cc98a8e08c2d594b7ec8eb18ae61",class:"chips",role:"group","aria-label":this.label},r.map((r=>a("button",{key:r,type:"button",class:{chip:!0,"is-selected":this.selected===r},"aria-pressed":String(this.selected===r),onClick:()=>this.select(r)},r)))))}};t.style=".sc-rp-filter-chips-h{display:block;font-family:var(--rp-font-sans)}.chips.sc-rp-filter-chips{display:flex;flex-wrap:wrap;gap:var(--rp-space-2)}.chip.sc-rp-filter-chips{padding:6px var(--rp-space-4);font:inherit;font-size:var(--rp-font-size-sm);font-weight:500;color:var(--rp-color-text-body);cursor:pointer;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease), border-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease), box-shadow var(--rp-duration-fast) var(--rp-ease)}.chip.sc-rp-filter-chips:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken);border-color:var(--rp-color-border-strong);transform:translateY(-1px)}.chip.sc-rp-filter-chips:active{transform:translateY(0) scale(0.97)}.chip.is-selected.sc-rp-filter-chips{color:var(--rp-color-accent-contrast);background:var(--rp-color-accent);border-color:var(--rp-color-accent);box-shadow:var(--rp-shadow-sm)}.chip.is-selected.sc-rp-filter-chips:hover{color:var(--rp-color-accent-contrast);background:var(--rp-color-accent-hover);border-color:var(--rp-color-accent-hover)}.chip.sc-rp-filter-chips:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (prefers-reduced-motion: reduce){.chip.sc-rp-filter-chips{transition:none}.chip.sc-rp-filter-chips:hover,.chip.sc-rp-filter-chips:active{transform:none}}";const i=class{constructor(e){r(this,e)}items=[];render(){const r=Array.isArray(this.items)?this.items:[];return a(s,{key:"bac56b8cde1f6366b2000e35974d2d262eac5a34"},a("section",{key:"33c203ac97781768cdeb20e5d0cfa48cc2d7cb1e",class:"wrap"},a("slot",{key:"1b100975a1335b37dfdb893cc67ec6d95c55340c",name:"heading"},a("h2",{key:"1f2d395da7a663bde5fb1bf03bd28c805106bd72",class:"heading"},"Ingredients")),0===r.length?a("p",{class:"empty"},"No ingredients listed for this recipe."):a("ul",{class:"list"},r.map(((r,e)=>a("li",{class:"row",key:`${r.name}-${e}`},a("span",{class:"name"},r.name),a("span",{class:"measure"},r.measure))))),a("div",{key:"d6dcf8d7bab40e3403cc5baaae4e829794232143",class:"note"},a("slot",{key:"6a99c2eca87e8f44e90bb6d5d422cf80a4b1c7af"}))))}};i.style=".sc-rp-ingredient-list-h{display:block;font-family:var(--rp-font-sans);color:var(--rp-color-text)}.heading.sc-rp-ingredient-list{margin:0 0 var(--rp-space-4);font-family:var(--rp-font-serif);font-size:var(--rp-font-size-xl);font-weight:600;letter-spacing:-0.015em}.list.sc-rp-ingredient-list{margin:0;padding:var(--rp-space-2);list-style:none;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-xs);overflow:hidden}.row.sc-rp-ingredient-list{display:flex;justify-content:space-between;gap:var(--rp-space-4);padding:var(--rp-space-3);font-size:var(--rp-font-size-md);border-radius:var(--rp-radius-sm);transition:background-color var(--rp-duration-fast) var(--rp-ease)}.row.sc-rp-ingredient-list:hover{background:var(--rp-color-highlight-soft)}.name.sc-rp-ingredient-list{color:var(--rp-color-text-body)}.measure.sc-rp-ingredient-list{flex-shrink:0;font-size:var(--rp-font-size-sm);font-weight:600;color:var(--rp-caramel-600);font-variant-numeric:tabular-nums}.empty.sc-rp-ingredient-list{margin:0;padding:var(--rp-space-5);font-size:var(--rp-font-size-md);color:var(--rp-color-text-muted);text-align:center;background:var(--rp-color-surface-sunken);border:1px dashed var(--rp-color-border-strong);border-radius:var(--rp-radius-lg)}.note.sc-rp-ingredient-list{margin-top:var(--rp-space-3);font-size:var(--rp-font-size-sm);color:var(--rp-color-text-muted);text-align:center}.note.sc-rp-ingredient-list:not(:has(*)){display:none}@media (prefers-reduced-motion: reduce){.row.sc-rp-ingredient-list{transition:none}}";const c='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',n=class{constructor(a){r(this,a),this.rpClose=e(this,"rpClose")}get el(){return o(this)}open=!1;heading="";rpClose;previouslyFocused=null;lockedScrollY=0;onOpenChange(r){r?(this.previouslyFocused=document.activeElement,document.addEventListener("keydown",this.onKeydown),this.lockBackground(),requestAnimationFrame((()=>this.focusFirstField()))):(document.removeEventListener("keydown",this.onKeydown),this.unlockBackground(),this.previouslyFocused?.focus(),this.previouslyFocused=null)}lockBackground(){document.body.dataset.rpModalLock||(this.lockedScrollY=window.scrollY,document.body.dataset.rpModalLock="true",document.body.style.position="fixed",document.body.style.top=`-${this.lockedScrollY}px`,document.body.style.insetInline="0",document.body.style.overflowY="scroll")}unlockBackground(){document.body.dataset.rpModalLock&&(delete document.body.dataset.rpModalLock,document.body.style.removeProperty("position"),document.body.style.removeProperty("top"),document.body.style.removeProperty("inset-inline"),document.body.style.removeProperty("overflow-y"),window.scrollTo(0,this.lockedScrollY))}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){document.removeEventListener("keydown",this.onKeydown),this.unlockBackground()}async focusFirstField(){const r=this.el.querySelector(c);r?.focus()}onKeydown=r=>{if(this.open)return"Escape"===r.key?(r.preventDefault(),void this.rpClose.emit()):void("Tab"===r.key&&this.trapFocus(r))};trapFocus(r){const e=Array.from(this.el.querySelectorAll(c));if(0===e.length)return;const a=e[0],s=e[e.length-1],o=document.activeElement;r.shiftKey&&o===a?(r.preventDefault(),s.focus()):r.shiftKey||o!==s||(r.preventDefault(),a.focus())}onBackdropClick=r=>{r.target===r.currentTarget&&this.rpClose.emit()};render(){return this.open?a(s,null,a("div",{class:"backdrop",onClick:this.onBackdropClick},a("div",{class:"dialog",role:"dialog","aria-modal":"true","aria-label":this.heading},a("header",{class:"head"},a("h2",{class:"heading"},this.heading),a("button",{type:"button",class:"close",onClick:()=>this.rpClose.emit(),"aria-label":"Close dialog"},a("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},a("path",{d:"M6 6l12 12M18 6L6 18"})))),a("div",{class:"body"},a("slot",null)),a("footer",{class:"foot"},a("slot",{name:"footer"}))))):null}static get watchers(){return{open:[{onOpenChange:0}]}}};n.style=".sc-rp-modal-h{display:contents;font-family:var(--rp-font-sans)}.sc-rp-modal-h:not([open]){display:none}.backdrop.sc-rp-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:var(--rp-space-4);background:var(--rp-modal-backdrop, rgb(44 24 16 / 0.42));backdrop-filter:blur(6px)}.dialog.sc-rp-modal{display:flex;flex-direction:column;width:min(560px, 100%);max-height:min(80vh, 640px);overflow:hidden;color:var(--rp-color-text);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-xl);box-shadow:var(--rp-shadow-xl)}.head.sc-rp-modal{display:flex;gap:var(--rp-space-3);align-items:center;justify-content:space-between;padding:var(--rp-space-5) var(--rp-space-5) var(--rp-space-4);border-bottom:1px solid var(--rp-color-border)}.heading.sc-rp-modal{margin:0;font-family:var(--rp-font-serif);font-size:var(--rp-font-size-xl);font-weight:600;letter-spacing:-0.015em}.close.sc-rp-modal{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;padding:0;color:var(--rp-color-text-muted);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.close.sc-rp-modal svg.sc-rp-modal{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.close.sc-rp-modal:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken);transform:rotate(90deg)}.close.sc-rp-modal:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}.body.sc-rp-modal{flex:1;padding:var(--rp-space-5);font-size:var(--rp-font-size-md);color:var(--rp-color-text-body);overflow-y:auto}.body.sc-rp-modal:has(rp-select[open]){overflow:visible;position:relative;z-index:1}.foot.sc-rp-modal{display:flex;gap:var(--rp-space-2);justify-content:flex-end;padding:var(--rp-space-4) var(--rp-space-5) var(--rp-space-5);background:var(--rp-color-surface-sunken);border-top:1px solid var(--rp-color-border)}.foot.sc-rp-modal:not(:has(*)){display:none}@media (prefers-reduced-motion: no-preference){.backdrop.sc-rp-modal{animation:rp-backdrop-in var(--rp-duration) var(--rp-ease)}.dialog.sc-rp-modal{animation:rp-modal-in var(--rp-duration) var(--rp-ease)}@keyframes rp-backdrop-in{from{opacity:0}}@keyframes rp-modal-in{from{opacity:0;transform:translateY(12px) scale(0.97)}}}@media (prefers-reduced-motion: reduce){.close.sc-rp-modal{transition:none}.close.sc-rp-modal:hover{transform:none}}";const p=class{constructor(a){r(this,a),this.rpFavoriteToggle=e(this,"rpFavoriteToggle")}get el(){return o(this)}recipeId;recipeTitle;image;category;href;hrefLabel;area;minutes;favorite=!1;imageLoading=!0;imageFailed=!1;pulsing=!1;pulseTimer;rpFavoriteToggle;disconnectedCallback(){clearTimeout(this.pulseTimer)}toggleFavorite=()=>{this.pulsing=!0,clearTimeout(this.pulseTimer),this.pulseTimer=setTimeout((()=>this.pulsing=!1),400),this.rpFavoriteToggle.emit({recipeId:this.recipeId,favorite:!this.favorite})};onImageRef=r=>{r?.complete&&(this.imageLoading=!1)};render(){const r=!0===this.favorite,e=this.image&&!this.imageFailed;return a(s,{key:"5ebbbdda28510540fe58d94e5936c0fdda6bb30f"},a("article",{key:"d5e8f2df7bf56be63708f7b845ab92390ca8c890",class:"card"},a("div",{key:"fcc51c15fa6325dc4e0e99080a5212d0eff56dd9",class:{media:!0,"is-loading":e&&this.imageLoading}},e?a("img",{src:this.image,alt:"",loading:"lazy",width:"320",height:"240",ref:this.onImageRef,onLoad:()=>this.imageLoading=!1,onError:()=>this.imageFailed=!0}):a("div",{class:"media-fallback","aria-hidden":"true"}),a("div",{key:"f734875845b7354091016a125df352c22813fdd4",class:"scrim","aria-hidden":"true"}),a("div",{key:"d9adaa68e15ba279e782732be0c8469656e05a13",class:"badges"},a("slot",{key:"1115a3ba435e26b0b7ca04144722bf4f6732fc9c"})),a("button",{key:"3c3b1f4822e17f02096a004b4da9ad7b5b83d763",type:"button",class:{favorite:!0,"is-pulsing":this.pulsing},onClick:this.toggleFavorite,"aria-pressed":r?"true":"false","aria-label":r?`Remove ${this.recipeTitle} from favorites`:`Add ${this.recipeTitle} to favorites`},a("svg",{key:"1d3895443869e4962d27ad56cbdb0c13c9d6a757",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},a("path",{key:"01d40fc3bfcc511ff532e1e7eb54892d89236eb7",d:"M12 21s-7.5-4.7-9.3-9A5.2 5.2 0 0 1 12 6.5 5.2 5.2 0 0 1 21.3 12c-1.8 4.3-9.3 9-9.3 9z"})))),this.href&&a("a",{key:"371d1e65eac91bebed9d153ce5478c9af95a2aef",class:"cover-link",href:this.href},a("span",{key:"5161a6b3ac5298a70d234b054c5e1605ef7268ab",class:"sr-only"},this.hrefLabel??this.recipeTitle)),a("div",{key:"5697df4daea43b488813033ad8921a201e6fd1c0",class:"body"},a("h3",{key:"ed3e24ad4b80d14b91869f12253d970de66f053b",class:"title"},this.recipeTitle),a("div",{key:"2bf4fc90966b0bb4dac79713fc2cbe57ff16bcc0",class:"meta"},this.category&&a("span",{key:"56fcda921b9a905065d09f94e72592a99b275db4",class:"pill pill-category"},this.category),this.area&&a("span",{key:"0d2931d3b84e3c45069a419ae4ca354d88dc4900",class:"pill"},this.area),this.minutes?a("span",{class:"pill"},this.minutes," min"):null)),a("div",{key:"6459a7aec703fcb5503167bfde35cd9b9ab0f120",class:"actions"},a("slot",{key:"0b09ea038f33db09046481c61bc1ee6d14cf1110",name:"actions"}))))}};p.style=".sc-rp-recipe-card-h{display:block;font-family:var(--rp-font-sans);color:var(--rp-color-text)}.card.sc-rp-recipe-card{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-sm);transition:transform var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease), border-color var(--rp-duration) var(--rp-ease)}.cover-link.sc-rp-recipe-card{position:absolute;inset:0;z-index:1;border-radius:inherit}.actions.sc-rp-recipe-card{position:relative}.favorite.sc-rp-recipe-card,.actions.sc-rp-recipe-card,.badges.sc-rp-recipe-card{z-index:2}.cover-link.sc-rp-recipe-card:focus-visible{outline:var(--rp-focus-ring);outline-offset:-2px}.sr-only.sc-rp-recipe-card{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.sc-rp-recipe-card-h:hover .card.sc-rp-recipe-card{border-color:var(--rp-color-border-strong);box-shadow:var(--rp-shadow-lg);transform:translateY(-4px)}.media.sc-rp-recipe-card{position:relative;aspect-ratio:4 / 3;overflow:hidden;background:var(--rp-color-surface-sunken)}.media.sc-rp-recipe-card img.sc-rp-recipe-card{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--rp-duration-slow) var(--rp-ease), opacity var(--rp-duration) var(--rp-ease)}.sc-rp-recipe-card-h:hover .media.sc-rp-recipe-card img.sc-rp-recipe-card{transform:scale(1.04)}.media.is-loading.sc-rp-recipe-card img.sc-rp-recipe-card{opacity:0}.media-fallback.sc-rp-recipe-card{width:100%;height:100%;background:radial-gradient(circle at 30% 25%, var(--rp-card-fallback-sheen, rgb(255 255 255 / 0.55)), transparent 55%), linear-gradient( 135deg, var(--rp-card-fallback-from, var(--rp-caramel-100)), var(--rp-card-fallback-to, var(--rp-cream-400)) )}.scrim.sc-rp-recipe-card{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom, rgb(44 24 16 / 0.18) 0%, transparent 34%)}.badges.sc-rp-recipe-card{position:absolute;inset-block-start:var(--rp-space-3);inset-inline-start:var(--rp-space-3);display:flex;flex-wrap:wrap;gap:var(--rp-space-1)}.favorite.sc-rp-recipe-card{position:absolute;inset-block-start:var(--rp-space-3);inset-inline-end:var(--rp-space-3);display:grid;place-items:center;width:36px;height:36px;padding:0;cursor:pointer;background:var(--rp-card-favorite-bg, rgb(255 255 255 / 0.82));backdrop-filter:blur(8px);border:1px solid var(--rp-card-favorite-border, rgb(255 255 255 / 0.6));border-radius:50%;box-shadow:var(--rp-shadow-sm);transition:transform var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.favorite.sc-rp-recipe-card:hover{background:var(--rp-color-surface);transform:scale(1.08)}.favorite.sc-rp-recipe-card:active{transform:scale(0.94)}.favorite.sc-rp-recipe-card svg.sc-rp-recipe-card{fill:none;stroke:var(--rp-card-favorite-stroke, var(--rp-espresso-800));stroke-width:1.9;stroke-linejoin:round;transition:fill var(--rp-duration-fast) var(--rp-ease), stroke var(--rp-duration-fast) var(--rp-ease)}[favorite].sc-rp-recipe-card-h .favorite.sc-rp-recipe-card svg.sc-rp-recipe-card{fill:var(--rp-color-favorite);stroke:var(--rp-color-favorite-strong)}[favorite].sc-rp-recipe-card-h .favorite.sc-rp-recipe-card:hover svg.sc-rp-recipe-card{fill:var(--rp-color-favorite-strong)}.favorite.sc-rp-recipe-card:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}.body.sc-rp-recipe-card{flex:1;padding:var(--rp-space-4) var(--rp-space-4) var(--rp-space-3)}.title.sc-rp-recipe-card{margin:0;font-family:var(--rp-font-serif);font-size:1.0625rem;font-weight:600;line-height:1.28;letter-spacing:-0.01em;color:var(--rp-color-text);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}.meta.sc-rp-recipe-card{display:flex;flex-wrap:wrap;gap:var(--rp-space-1);margin-top:var(--rp-space-3)}.pill.sc-rp-recipe-card{padding:3px 10px;font-size:var(--rp-font-size-xs);font-weight:500;letter-spacing:0.01em;color:var(--rp-color-text-muted);background:var(--rp-color-surface-sunken);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);white-space:nowrap}.pill-category.sc-rp-recipe-card{color:var(--rp-caramel-600);background:var(--rp-color-highlight-soft);border-color:transparent}.actions.sc-rp-recipe-card{display:flex;flex-wrap:wrap;gap:var(--rp-space-2);align-items:center;padding:0 var(--rp-space-4) var(--rp-space-4)}.actions.sc-rp-recipe-card:not(:has(*)){display:none}@media (prefers-reduced-motion: no-preference){.media.is-loading.sc-rp-recipe-card::after{content:'';position:absolute;inset:0;background:linear-gradient( 100deg, transparent 20%, rgb(255 255 255 / 0.7) 50%, transparent 80% );background-size:220% 100%;animation:rp-card-shimmer 1.6s var(--rp-ease) infinite}@keyframes rp-card-shimmer{from{background-position:180% 0}to{background-position:-80% 0}}.favorite.is-pulsing.sc-rp-recipe-card{animation:rp-favorite-pop 400ms var(--rp-ease)}@keyframes rp-favorite-pop{0%{transform:scale(1)}35%{transform:scale(0.86)}70%{transform:scale(1.16)}100%{transform:scale(1)}}.favorite.is-pulsing.sc-rp-recipe-card svg.sc-rp-recipe-card{animation:rp-heart-beat 400ms var(--rp-ease);transform-origin:center}@keyframes rp-heart-beat{0%{transform:scale(1)}30%{transform:scale(0.7)}55%{transform:scale(1.35)}75%{transform:scale(0.94)}100%{transform:scale(1)}}}@media (prefers-reduced-motion: reduce){.card.sc-rp-recipe-card,.media.sc-rp-recipe-card img.sc-rp-recipe-card,.favorite.sc-rp-recipe-card{transition:none}.sc-rp-recipe-card-h:hover .card.sc-rp-recipe-card{transform:none}.sc-rp-recipe-card-h:hover .media.sc-rp-recipe-card img.sc-rp-recipe-card{transform:none}.media.is-loading.sc-rp-recipe-card img.sc-rp-recipe-card{opacity:1}}";const d=class{constructor(a){r(this,a),this.rpSearch=e(this,"rpSearch"),this.rpClear=e(this,"rpClear")}value="";placeholder="Search recipes";label="Search recipes";draft="";rpSearch;rpClear;onValueChange(r){this.draft=r??""}componentWillLoad(){this.draft=this.value??""}onSubmit=r=>{r.preventDefault(),this.rpSearch.emit(this.draft.trim())};onInput=r=>{this.draft=r.target.value};onClear=()=>{this.draft="",this.rpClear.emit()};render(){return a(s,{key:"98c0c2367f27c061759b4fcae36b09fb4f88a720"},a("form",{key:"de043755e60e10f39b102605b5347416abf9dc8f",class:"bar",role:"search",onSubmit:this.onSubmit},a("svg",{key:"f5fdf365cd2901deb885068afece74c843a9d174",class:"icon",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},a("circle",{key:"9ad873f8544081cbd16f7666e428565ade2cdbed",cx:"11",cy:"11",r:"7"}),a("path",{key:"d6284fb25056636002e6cde74a1bd7bf36f40291",d:"m20 20-3.6-3.6"})),a("input",{key:"17288bc6a472a736d78d8beef70316547c7eb11f",type:"search",class:"field",value:this.draft,placeholder:this.placeholder,"aria-label":this.label,onInput:this.onInput}),this.draft&&a("button",{key:"468a3c549bad63863a6bce18d0d46335705ace89",type:"button",class:"clear",onClick:this.onClear,"aria-label":"Clear search"},a("svg",{key:"70bab6cfdea49c209208e19a496ab24429bf704e",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},a("path",{key:"dcafa21163e380fed6ff35dff0e8f1915b7d5500",d:"M6 6l12 12M18 6L6 18"}))),a("button",{key:"24ac96852bb46844121597ee647c5e35304b9df9",type:"submit",class:"submit","aria-label":"Search"},a("span",{key:"d6e9577315a844403e120fb705a180f49c8f5733",class:"submit-text"},"Search"),a("svg",{key:"9fa48cfa05c8d8a3b5f328131c12a5b954069e56",class:"submit-icon",viewBox:"0 0 24 24",width:"17",height:"17","aria-hidden":"true"},a("circle",{key:"e9367a2e0ee4e05f3b39cbd728f2ea968a1c129f",cx:"11",cy:"11",r:"7"}),a("path",{key:"f2f41503b77ae140224746a419f792ceb77ea5ff",d:"m20 20-3.6-3.6"})))))}static get watchers(){return{value:[{onValueChange:0}]}}};d.style=".sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.field.sc-rp-search-bar:focus-visible,.submit.sc-rp-search-bar:focus-visible,.clear.sc-rp-search-bar:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (max-width: 560px){.bar.sc-rp-search-bar{padding-inline-start:var(--rp-space-3);gap:var(--rp-space-1)}.submit.sc-rp-search-bar{display:grid;place-items:center;width:38px;height:38px;padding:0}.submit-text.sc-rp-search-bar{display:none}.submit-icon.sc-rp-search-bar{display:block}}@media (prefers-reduced-motion: reduce){.bar.sc-rp-search-bar,.icon.sc-rp-search-bar,.clear.sc-rp-search-bar,.submit.sc-rp-search-bar{transition:none}.submit.sc-rp-search-bar:active{transform:none}}";const l=class{constructor(a){r(this,a),this.rpSelectChange=e(this,"rpSelectChange")}get el(){return o(this)}options=[];value="";label="";placeholder="Choose…";open=!1;disabled=!1;compact=!1;dropUp=!1;activeIndex=-1;rpSelectChange;triggerEl;listEl;pressedOption=null;typeBuffer="";typeTimer;onOpenChange(r){if(!r)return window.removeEventListener("resize",this.position),window.removeEventListener("scroll",this.onAncestorScroll,!0),this.el.style.removeProperty("--rp-select-max-height"),void(this.dropUp=!1);this.activeIndex=Math.max(0,this.normalizedOptions.findIndex((r=>r.value===this.value))),requestAnimationFrame((()=>requestAnimationFrame((()=>{this.position(),this.scrollActiveIntoView()})))),window.addEventListener("resize",this.position),window.addEventListener("scroll",this.onAncestorScroll,!0)}onOptionsChange(){this.open&&requestAnimationFrame((()=>requestAnimationFrame((()=>this.position()))))}disconnectedCallback(){clearTimeout(this.typeTimer),window.removeEventListener("resize",this.position),window.removeEventListener("scroll",this.onAncestorScroll,!0)}onAncestorScroll=r=>{r.target!==this.listEl&&this.position()};position=()=>{if(!this.open||!this.triggerEl)return;const r=this.triggerEl.getBoundingClientRect(),e=this.clippingBounds(),a=Math.min(window.innerHeight,e.bottom),s=Math.max(0,e.top),o=a-r.bottom-8-12,t=r.top-s-8-12,i=o<(this.listEl?Math.min(260,this.listEl.scrollHeight):Math.min(260,40*this.normalizedOptions.length+8))&&t>o;this.dropUp=i;const c=Math.max(96,Math.floor(i?t:o));this.el.style.setProperty("--rp-select-max-height",`${c}px`)};clippingBounds(){let r=this.el.parentElement;for(;r&&r!==document.body;){const e=getComputedStyle(r);if("visible"!==e.overflow&&"visible"!==e.overflowY){const e=r.getBoundingClientRect();if(e.height>0)return{top:e.top,bottom:e.bottom}}r=r.parentElement}return{top:0,bottom:window.innerHeight}}async focusControl(){this.triggerEl?.focus()}onDocumentPointerDown(r){this.open&&(this.el.contains(r.target)||(this.open=!1))}get normalizedOptions(){return Array.isArray(this.options)?this.options:[]}get selectedOption(){return this.normalizedOptions.find((r=>r.value===this.value))}choose(r,e){this.value=r.value,this.open=!1,this.rpSelectChange.emit(r.value),this.triggerEl?.focus(),e&&this.swallowGhostClick(e.x,e.y)}swallowGhostClick(r,e){const a=a=>{Math.hypot(a.clientX-r,a.clientY-e)>24||(a.preventDefault(),a.stopPropagation(),s())},s=()=>{window.clearTimeout(o),document.removeEventListener("click",a,!0)};document.addEventListener("click",a,!0);const o=window.setTimeout(s,500)}scrollActiveIntoView(){const r=this.listEl?.querySelector(".option.is-active");r?.scrollIntoView({block:"nearest"})}move(r){const e=this.normalizedOptions;if(0===e.length)return;const a=this.activeIndex+r;this.activeIndex=a<0?e.length-1:a%e.length,requestAnimationFrame((()=>this.scrollActiveIntoView()))}typeAhead(r){clearTimeout(this.typeTimer),this.typeBuffer+=r.toLowerCase(),this.typeTimer=setTimeout((()=>this.typeBuffer=""),600);const e=this.normalizedOptions.findIndex((r=>r.label.toLowerCase().startsWith(this.typeBuffer)));-1!==e&&(this.open?(this.activeIndex=e,requestAnimationFrame((()=>this.scrollActiveIntoView()))):this.choose(this.normalizedOptions[e]))}onKeyDown=r=>{if(!this.disabled)switch(r.key){case"ArrowDown":return r.preventDefault(),void(this.open?this.move(1):this.open=!0);case"ArrowUp":return r.preventDefault(),void(this.open?this.move(-1):this.open=!0);case"Home":if(!this.open)return;return r.preventDefault(),this.activeIndex=0,void requestAnimationFrame((()=>this.scrollActiveIntoView()));case"End":if(!this.open)return;return r.preventDefault(),this.activeIndex=this.normalizedOptions.length-1,void requestAnimationFrame((()=>this.scrollActiveIntoView()));case"Enter":case" ":return r.preventDefault(),void(this.open?this.activeIndex>=0&&this.choose(this.normalizedOptions[this.activeIndex]):this.open=!0);case"Escape":if(!this.open)return;return r.preventDefault(),void(this.open=!1);case"Tab":return void(this.open=!1);default:1!==r.key.length||r.metaKey||r.ctrlKey||r.altKey||(r.preventDefault(),this.typeAhead(r.key))}};render(){const r=this.normalizedOptions,e=this.selectedOption,o="rp-select-list";return a(s,{key:"ff24ed1943638d0a255238846b55f6a2e0042824"},a("div",{key:"e2750500d5d349f64e66e9d9a28d3f5c37ba4e78",class:"wrap"},a("button",{key:"3ff9611c6f105d1fdc26ca9c332bf2f18efc8983",type:"button",class:"trigger",ref:r=>this.triggerEl=r,disabled:this.disabled,role:"combobox","aria-expanded":this.open?"true":"false","aria-controls":o,"aria-haspopup":"listbox","aria-label":this.label||void 0,"aria-activedescendant":this.open&&this.activeIndex>=0?`rp-select-option-${this.activeIndex}`:void 0,onKeyDown:this.onKeyDown,onPointerDown:r=>{this.disabled||(r.preventDefault(),this.triggerEl?.focus(),this.open=!this.open)}},a("span",{key:"26f8595bad37815f436366c4c3d3fc5a923d7aa5",class:{"trigger-value":!0,"is-placeholder":!e}},e?.label??this.placeholder),a("svg",{key:"782c3417d87d24cfabcc0548d2caf4b604006720",class:"chevron",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},a("path",{key:"f11b0cf117312f97a8e94dbd664f769a542515d9",d:"m6 9 6 6 6-6"}))),this.open&&a("div",{key:"76bca46ff9374b459da8a53881c4672b9db7f4a0",class:"list",id:o,role:"listbox",tabindex:-1,"aria-label":this.label||void 0,ref:r=>this.listEl=r},0===r.length?a("p",{class:"empty"},"No options"):r.map(((r,e)=>a("button",{key:r.value,id:`rp-select-option-${e}`,type:"button",role:"option","aria-selected":r.value===this.value?"true":"false",class:{option:!0,"is-selected":r.value===this.value,"is-active":e===this.activeIndex},onPointerDown:e=>{"mouse"===e.pointerType?(e.preventDefault(),this.choose(r)):this.pressedOption={value:r.value,x:e.clientX,y:e.clientY}},onPointerUp:e=>{if("mouse"===e.pointerType)return;const a=this.pressedOption;this.pressedOption=null,a&&a.value===r.value&&(Math.hypot(e.clientX-a.x,e.clientY-a.y)>10||this.choose(r,{x:e.clientX,y:e.clientY}))},onPointerCancel:()=>this.pressedOption=null,onMouseEnter:()=>this.activeIndex=e},a("span",{class:"option-text"},r.label),r.value===this.value&&a("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},a("path",{d:"m5 13 4 4L19 7"}))))))))}static get watchers(){return{open:[{onOpenChange:0}],options:[{onOptionsChange:0}]}}};l.style=".sc-rp-select-h{display:block;font-family:var(--rp-font-sans)}.wrap.sc-rp-select{position:relative}.trigger.sc-rp-select{display:flex;gap:var(--rp-space-2);align-items:center;justify-content:space-between;width:100%;padding:11px var(--rp-space-4);font-family:var(--rp-font-sans);font-size:var(--rp-font-size-md);font-weight:500;letter-spacing:-0.005em;color:var(--rp-color-text);text-align:start;cursor:pointer;background:var(--rp-color-surface);border:1px solid var(--rp-color-border-strong);border-radius:var(--rp-radius-md);transition:border-color var(--rp-duration-fast) var(--rp-ease), box-shadow var(--rp-duration-fast) var(--rp-ease)}.trigger.sc-rp-select:hover:not(:disabled){border-color:var(--rp-color-text-subtle)}.trigger.sc-rp-select:focus-visible,[open].sc-rp-select-h .trigger.sc-rp-select{outline:none;border-color:var(--rp-color-focus);box-shadow:var(--rp-focus-halo)}.trigger.sc-rp-select:disabled{cursor:not-allowed;opacity:0.55}.trigger-value.sc-rp-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trigger-value.is-placeholder.sc-rp-select{color:var(--rp-color-text-subtle)}.chevron.sc-rp-select{flex-shrink:0;fill:none;stroke:var(--rp-color-text-muted);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform var(--rp-duration-fast) var(--rp-ease)}[open].sc-rp-select-h .chevron.sc-rp-select{transform:rotate(180deg)}.list.sc-rp-select{position:absolute;inset-block-start:calc(100% + var(--rp-space-1));inset-inline:0;z-index:40;max-height:min(260px, var(--rp-select-max-height, 260px));padding:var(--rp-space-1);overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-lg)}[drop-up].sc-rp-select-h .list.sc-rp-select{inset-block-start:auto;inset-block-end:calc(100% + var(--rp-space-1))}.option.sc-rp-select{display:flex;gap:var(--rp-space-2);align-items:center;justify-content:space-between;width:100%;padding:9px var(--rp-space-3);font-family:var(--rp-font-sans);font-size:var(--rp-font-size-md);font-weight:500;letter-spacing:-0.005em;line-height:1.4;color:var(--rp-color-text-body);text-align:start;cursor:pointer;background:none;border:none;border-radius:var(--rp-radius-sm);transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.option-text.sc-rp-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option.sc-rp-select svg.sc-rp-select{flex-shrink:0;fill:none;stroke:var(--rp-color-highlight);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.option.is-active.sc-rp-select{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.option.is-selected.sc-rp-select{font-weight:600;color:var(--rp-color-text)}.empty.sc-rp-select{margin:0;padding:var(--rp-space-4) var(--rp-space-3);font-size:var(--rp-font-size-sm);font-weight:500;color:var(--rp-color-text-subtle);text-align:center}[compact].sc-rp-select-h .trigger.sc-rp-select{padding:4px var(--rp-space-2);font-size:var(--rp-font-size-xs);color:var(--rp-color-text-muted);border-color:var(--rp-color-border);border-radius:var(--rp-radius-sm)}[compact].sc-rp-select-h .list.sc-rp-select{min-width:148px}[compact].sc-rp-select-h .option.sc-rp-select{padding:7px var(--rp-space-3);font-size:var(--rp-font-size-sm)}@media (prefers-reduced-motion: no-preference){.list.sc-rp-select{animation:rp-select-in var(--rp-duration-fast) var(--rp-ease);transform-origin:top}@keyframes rp-select-in{from{opacity:0;transform:translateY(-4px) scale(0.99)}}}@media (prefers-reduced-motion: reduce){.trigger.sc-rp-select,.chevron.sc-rp-select,.option.sc-rp-select{transition:none}}";export{t as rp_filter_chips,i as rp_ingredient_list,n as rp_modal,p as rp_recipe_card,d as rp_search_bar,l as rp_select}
|
|
1
|
+
import{r,c as e,h as a,H as s,g as o}from"./p-xM9qpraa.js";const t=class{constructor(a){r(this,a),this.rpFilterChange=e(this,"rpFilterChange")}options=[];selected=null;label="Filter";rpFilterChange;select(r){this.rpFilterChange.emit(this.selected===r?null:r)}render(){const r=Array.isArray(this.options)?this.options:[];return a(s,{key:"c87ecafe77bff6d1fb9c38911e186ef6c53010d9"},a("div",{key:"a9db225e2972cc98a8e08c2d594b7ec8eb18ae61",class:"chips",role:"group","aria-label":this.label},r.map((r=>a("button",{key:r,type:"button",class:{chip:!0,"is-selected":this.selected===r},"aria-pressed":String(this.selected===r),onClick:()=>this.select(r)},r)))))}};t.style=".sc-rp-filter-chips-h{display:block;font-family:var(--rp-font-sans)}.chips.sc-rp-filter-chips{display:flex;flex-wrap:wrap;gap:var(--rp-space-2)}.chip.sc-rp-filter-chips{padding:6px var(--rp-space-4);font:inherit;font-size:var(--rp-font-size-sm);font-weight:500;color:var(--rp-color-text-body);cursor:pointer;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease), border-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease), box-shadow var(--rp-duration-fast) var(--rp-ease)}.chip.sc-rp-filter-chips:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken);border-color:var(--rp-color-border-strong);transform:translateY(-1px)}.chip.sc-rp-filter-chips:active{transform:translateY(0) scale(0.97)}.chip.is-selected.sc-rp-filter-chips{color:var(--rp-color-accent-contrast);background:var(--rp-color-accent);border-color:var(--rp-color-accent);box-shadow:var(--rp-shadow-sm)}.chip.is-selected.sc-rp-filter-chips:hover{color:var(--rp-color-accent-contrast);background:var(--rp-color-accent-hover);border-color:var(--rp-color-accent-hover)}.chip.sc-rp-filter-chips:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (prefers-reduced-motion: reduce){.chip.sc-rp-filter-chips{transition:none}.chip.sc-rp-filter-chips:hover,.chip.sc-rp-filter-chips:active{transform:none}}";const i=class{constructor(e){r(this,e)}items=[];render(){const r=Array.isArray(this.items)?this.items:[];return a(s,{key:"bac56b8cde1f6366b2000e35974d2d262eac5a34"},a("section",{key:"33c203ac97781768cdeb20e5d0cfa48cc2d7cb1e",class:"wrap"},a("slot",{key:"1b100975a1335b37dfdb893cc67ec6d95c55340c",name:"heading"},a("h2",{key:"1f2d395da7a663bde5fb1bf03bd28c805106bd72",class:"heading"},"Ingredients")),0===r.length?a("p",{class:"empty"},"No ingredients listed for this recipe."):a("ul",{class:"list"},r.map(((r,e)=>a("li",{class:"row",key:`${r.name}-${e}`},a("span",{class:"name"},r.name),a("span",{class:"measure"},r.measure))))),a("div",{key:"d6dcf8d7bab40e3403cc5baaae4e829794232143",class:"note"},a("slot",{key:"6a99c2eca87e8f44e90bb6d5d422cf80a4b1c7af"}))))}};i.style=".sc-rp-ingredient-list-h{display:block;font-family:var(--rp-font-sans);color:var(--rp-color-text)}.heading.sc-rp-ingredient-list{margin:0 0 var(--rp-space-4);font-family:var(--rp-font-serif);font-size:var(--rp-font-size-xl);font-weight:600;letter-spacing:-0.015em}.list.sc-rp-ingredient-list{margin:0;padding:var(--rp-space-2);list-style:none;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-xs);overflow:hidden}.row.sc-rp-ingredient-list{display:flex;justify-content:space-between;gap:var(--rp-space-4);padding:var(--rp-space-3);font-size:var(--rp-font-size-md);border-radius:var(--rp-radius-sm);transition:background-color var(--rp-duration-fast) var(--rp-ease)}.row.sc-rp-ingredient-list:hover{background:var(--rp-color-highlight-soft)}.name.sc-rp-ingredient-list{color:var(--rp-color-text-body)}.measure.sc-rp-ingredient-list{flex-shrink:0;font-size:var(--rp-font-size-sm);font-weight:600;color:var(--rp-caramel-600);font-variant-numeric:tabular-nums}.empty.sc-rp-ingredient-list{margin:0;padding:var(--rp-space-5);font-size:var(--rp-font-size-md);color:var(--rp-color-text-muted);text-align:center;background:var(--rp-color-surface-sunken);border:1px dashed var(--rp-color-border-strong);border-radius:var(--rp-radius-lg)}.note.sc-rp-ingredient-list{margin-top:var(--rp-space-3);font-size:var(--rp-font-size-sm);color:var(--rp-color-text-muted);text-align:center}.note.sc-rp-ingredient-list:not(:has(*)){display:none}@media (prefers-reduced-motion: reduce){.row.sc-rp-ingredient-list{transition:none}}";const c='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',n=class{constructor(a){r(this,a),this.rpClose=e(this,"rpClose")}get el(){return o(this)}open=!1;heading="";rpClose;previouslyFocused=null;lockedScrollY=0;onOpenChange(r){r?(this.previouslyFocused=document.activeElement,document.addEventListener("keydown",this.onKeydown),this.lockBackground(),requestAnimationFrame((()=>this.focusFirstField()))):(document.removeEventListener("keydown",this.onKeydown),this.unlockBackground(),this.previouslyFocused?.focus(),this.previouslyFocused=null)}lockBackground(){document.body.dataset.rpModalLock||(this.lockedScrollY=window.scrollY,document.body.dataset.rpModalLock="true",document.body.style.position="fixed",document.body.style.top=`-${this.lockedScrollY}px`,document.body.style.insetInline="0",document.body.style.overflowY="scroll")}unlockBackground(){document.body.dataset.rpModalLock&&(delete document.body.dataset.rpModalLock,document.body.style.removeProperty("position"),document.body.style.removeProperty("top"),document.body.style.removeProperty("inset-inline"),document.body.style.removeProperty("overflow-y"),window.scrollTo(0,this.lockedScrollY))}componentDidLoad(){this.open&&this.onOpenChange(!0)}disconnectedCallback(){document.removeEventListener("keydown",this.onKeydown),this.unlockBackground()}async focusFirstField(){const r=this.el.querySelector(c);r?.focus()}onKeydown=r=>{if(this.open)return"Escape"===r.key?(r.preventDefault(),void this.rpClose.emit()):void("Tab"===r.key&&this.trapFocus(r))};trapFocus(r){const e=Array.from(this.el.querySelectorAll(c));if(0===e.length)return;const a=e[0],s=e[e.length-1],o=document.activeElement;r.shiftKey&&o===a?(r.preventDefault(),s.focus()):r.shiftKey||o!==s||(r.preventDefault(),a.focus())}onBackdropClick=r=>{r.target===r.currentTarget&&this.rpClose.emit()};render(){return this.open?a(s,null,a("div",{class:"backdrop",onClick:this.onBackdropClick},a("div",{class:"dialog",role:"dialog","aria-modal":"true","aria-label":this.heading},a("header",{class:"head"},a("h2",{class:"heading"},this.heading),a("button",{type:"button",class:"close",onClick:()=>this.rpClose.emit(),"aria-label":"Close dialog"},a("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},a("path",{d:"M6 6l12 12M18 6L6 18"})))),a("div",{class:"body"},a("slot",null)),a("footer",{class:"foot"},a("slot",{name:"footer"}))))):null}static get watchers(){return{open:[{onOpenChange:0}]}}};n.style=".sc-rp-modal-h{display:contents;font-family:var(--rp-font-sans)}.sc-rp-modal-h:not([open]){display:none}.backdrop.sc-rp-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:var(--rp-space-4);background:var(--rp-modal-backdrop, rgb(44 24 16 / 0.42));backdrop-filter:blur(6px)}.dialog.sc-rp-modal{display:flex;flex-direction:column;width:min(560px, 100%);max-height:min(80vh, 640px);overflow:hidden;color:var(--rp-color-text);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-xl);box-shadow:var(--rp-shadow-xl)}.head.sc-rp-modal{display:flex;gap:var(--rp-space-3);align-items:center;justify-content:space-between;padding:var(--rp-space-5) var(--rp-space-5) var(--rp-space-4);border-bottom:1px solid var(--rp-color-border)}.heading.sc-rp-modal{margin:0;font-family:var(--rp-font-serif);font-size:var(--rp-font-size-xl);font-weight:600;letter-spacing:-0.015em}.close.sc-rp-modal{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;padding:0;color:var(--rp-color-text-muted);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.close.sc-rp-modal svg.sc-rp-modal{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.close.sc-rp-modal:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken);transform:rotate(90deg)}.close.sc-rp-modal:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}.body.sc-rp-modal{flex:1;padding:var(--rp-space-5);font-size:var(--rp-font-size-md);color:var(--rp-color-text-body);overflow-y:auto}.body.sc-rp-modal:has(rp-select[open]){overflow:visible;position:relative;z-index:1}.foot.sc-rp-modal{display:flex;gap:var(--rp-space-2);justify-content:flex-end;padding:var(--rp-space-4) var(--rp-space-5) var(--rp-space-5);background:var(--rp-color-surface-sunken);border-top:1px solid var(--rp-color-border)}.foot.sc-rp-modal:not(:has(*)){display:none}@media (prefers-reduced-motion: no-preference){.backdrop.sc-rp-modal{animation:rp-backdrop-in var(--rp-duration) var(--rp-ease)}.dialog.sc-rp-modal{animation:rp-modal-in var(--rp-duration) var(--rp-ease)}@keyframes rp-backdrop-in{from{opacity:0}}@keyframes rp-modal-in{from{opacity:0;transform:translateY(12px) scale(0.97)}}}@media (prefers-reduced-motion: reduce){.close.sc-rp-modal{transition:none}.close.sc-rp-modal:hover{transform:none}}";const p=class{constructor(a){r(this,a),this.rpFavoriteToggle=e(this,"rpFavoriteToggle")}get el(){return o(this)}recipeId;recipeTitle;image;category;href;hrefLabel;area;minutes;favorite=!1;imageLoading=!0;imageFailed=!1;pulsing=!1;pulseTimer;rpFavoriteToggle;disconnectedCallback(){clearTimeout(this.pulseTimer)}toggleFavorite=()=>{this.pulsing=!0,clearTimeout(this.pulseTimer),this.pulseTimer=setTimeout((()=>this.pulsing=!1),400),this.rpFavoriteToggle.emit({recipeId:this.recipeId,favorite:!this.favorite})};onImageRef=r=>{r?.complete&&(this.imageLoading=!1)};render(){const r=!0===this.favorite,e=this.image&&!this.imageFailed;return a(s,{key:"5ebbbdda28510540fe58d94e5936c0fdda6bb30f"},a("article",{key:"d5e8f2df7bf56be63708f7b845ab92390ca8c890",class:"card"},a("div",{key:"fcc51c15fa6325dc4e0e99080a5212d0eff56dd9",class:{media:!0,"is-loading":e&&this.imageLoading}},e?a("img",{src:this.image,alt:"",loading:"lazy",width:"320",height:"240",ref:this.onImageRef,onLoad:()=>this.imageLoading=!1,onError:()=>this.imageFailed=!0}):a("div",{class:"media-fallback","aria-hidden":"true"}),a("div",{key:"f734875845b7354091016a125df352c22813fdd4",class:"scrim","aria-hidden":"true"}),a("div",{key:"d9adaa68e15ba279e782732be0c8469656e05a13",class:"badges"},a("slot",{key:"1115a3ba435e26b0b7ca04144722bf4f6732fc9c"})),a("button",{key:"3c3b1f4822e17f02096a004b4da9ad7b5b83d763",type:"button",class:{favorite:!0,"is-pulsing":this.pulsing},onClick:this.toggleFavorite,"aria-pressed":r?"true":"false","aria-label":r?`Remove ${this.recipeTitle} from favorites`:`Add ${this.recipeTitle} to favorites`},a("svg",{key:"1d3895443869e4962d27ad56cbdb0c13c9d6a757",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},a("path",{key:"01d40fc3bfcc511ff532e1e7eb54892d89236eb7",d:"M12 21s-7.5-4.7-9.3-9A5.2 5.2 0 0 1 12 6.5 5.2 5.2 0 0 1 21.3 12c-1.8 4.3-9.3 9-9.3 9z"})))),this.href&&a("a",{key:"371d1e65eac91bebed9d153ce5478c9af95a2aef",class:"cover-link",href:this.href},a("span",{key:"5161a6b3ac5298a70d234b054c5e1605ef7268ab",class:"sr-only"},this.hrefLabel??this.recipeTitle)),a("div",{key:"5697df4daea43b488813033ad8921a201e6fd1c0",class:"body"},a("h3",{key:"ed3e24ad4b80d14b91869f12253d970de66f053b",class:"title"},this.recipeTitle),a("div",{key:"2bf4fc90966b0bb4dac79713fc2cbe57ff16bcc0",class:"meta"},this.category&&a("span",{key:"56fcda921b9a905065d09f94e72592a99b275db4",class:"pill pill-category"},this.category),this.area&&a("span",{key:"0d2931d3b84e3c45069a419ae4ca354d88dc4900",class:"pill"},this.area),this.minutes?a("span",{class:"pill"},this.minutes," min"):null)),a("div",{key:"6459a7aec703fcb5503167bfde35cd9b9ab0f120",class:"actions"},a("slot",{key:"0b09ea038f33db09046481c61bc1ee6d14cf1110",name:"actions"}))))}};p.style=".sc-rp-recipe-card-h{display:block;font-family:var(--rp-font-sans);color:var(--rp-color-text)}.card.sc-rp-recipe-card{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-sm);transition:transform var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease), border-color var(--rp-duration) var(--rp-ease)}.cover-link.sc-rp-recipe-card{position:absolute;inset:0;z-index:1;border-radius:inherit}.actions.sc-rp-recipe-card{position:relative}.favorite.sc-rp-recipe-card,.actions.sc-rp-recipe-card,.badges.sc-rp-recipe-card{z-index:2}.cover-link.sc-rp-recipe-card:focus-visible{outline:var(--rp-focus-ring);outline-offset:-2px}.sr-only.sc-rp-recipe-card{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.sc-rp-recipe-card-h:hover .card.sc-rp-recipe-card{border-color:var(--rp-color-border-strong);box-shadow:var(--rp-shadow-lg);transform:translateY(-4px)}.media.sc-rp-recipe-card{position:relative;aspect-ratio:4 / 3;overflow:hidden;background:var(--rp-color-surface-sunken)}.media.sc-rp-recipe-card img.sc-rp-recipe-card{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--rp-duration-slow) var(--rp-ease), opacity var(--rp-duration) var(--rp-ease)}.sc-rp-recipe-card-h:hover .media.sc-rp-recipe-card img.sc-rp-recipe-card{transform:scale(1.04)}.media.is-loading.sc-rp-recipe-card img.sc-rp-recipe-card{opacity:0}.media-fallback.sc-rp-recipe-card{width:100%;height:100%;background:radial-gradient(circle at 30% 25%, var(--rp-card-fallback-sheen, rgb(255 255 255 / 0.55)), transparent 55%), linear-gradient( 135deg, var(--rp-card-fallback-from, var(--rp-caramel-100)), var(--rp-card-fallback-to, var(--rp-cream-400)) )}.scrim.sc-rp-recipe-card{position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom, rgb(44 24 16 / 0.18) 0%, transparent 34%)}.badges.sc-rp-recipe-card{position:absolute;inset-block-start:var(--rp-space-3);inset-inline-start:var(--rp-space-3);display:flex;flex-wrap:wrap;gap:var(--rp-space-1)}.favorite.sc-rp-recipe-card{position:absolute;inset-block-start:var(--rp-space-3);inset-inline-end:var(--rp-space-3);display:grid;place-items:center;width:36px;height:36px;padding:0;cursor:pointer;background:var(--rp-card-favorite-bg, rgb(255 255 255 / 0.82));backdrop-filter:blur(8px);border:1px solid var(--rp-card-favorite-border, rgb(255 255 255 / 0.6));border-radius:50%;box-shadow:var(--rp-shadow-sm);transition:transform var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.favorite.sc-rp-recipe-card:hover{background:var(--rp-color-surface);transform:scale(1.08)}.favorite.sc-rp-recipe-card:active{transform:scale(0.94)}.favorite.sc-rp-recipe-card svg.sc-rp-recipe-card{fill:none;stroke:var(--rp-card-favorite-stroke, var(--rp-espresso-800));stroke-width:1.9;stroke-linejoin:round;transition:fill var(--rp-duration-fast) var(--rp-ease), stroke var(--rp-duration-fast) var(--rp-ease)}[favorite].sc-rp-recipe-card-h .favorite.sc-rp-recipe-card svg.sc-rp-recipe-card{fill:var(--rp-color-favorite);stroke:var(--rp-color-favorite-strong)}[favorite].sc-rp-recipe-card-h .favorite.sc-rp-recipe-card:hover svg.sc-rp-recipe-card{fill:var(--rp-color-favorite-strong)}.favorite.sc-rp-recipe-card:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}.body.sc-rp-recipe-card{flex:1;padding:var(--rp-space-4) var(--rp-space-4) var(--rp-space-3)}.title.sc-rp-recipe-card{margin:0;font-family:var(--rp-font-serif);font-size:1.0625rem;font-weight:600;line-height:1.28;letter-spacing:-0.01em;color:var(--rp-color-text);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}.meta.sc-rp-recipe-card{display:flex;flex-wrap:wrap;gap:var(--rp-space-1);margin-top:var(--rp-space-3)}.pill.sc-rp-recipe-card{padding:3px 10px;font-size:var(--rp-font-size-xs);font-weight:500;letter-spacing:0.01em;color:var(--rp-color-text-muted);background:var(--rp-color-surface-sunken);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);white-space:nowrap}.pill-category.sc-rp-recipe-card{color:var(--rp-caramel-600);background:var(--rp-color-highlight-soft);border-color:transparent}.actions.sc-rp-recipe-card{display:flex;flex-wrap:wrap;gap:var(--rp-space-2);align-items:center;padding:0 var(--rp-space-4) var(--rp-space-4)}.actions.sc-rp-recipe-card:not(:has(*)){display:none}@media (prefers-reduced-motion: no-preference){.media.is-loading.sc-rp-recipe-card::after{content:'';position:absolute;inset:0;background:linear-gradient( 100deg, transparent 20%, rgb(255 255 255 / 0.7) 50%, transparent 80% );background-size:220% 100%;animation:rp-card-shimmer 1.6s var(--rp-ease) infinite}@keyframes rp-card-shimmer{from{background-position:180% 0}to{background-position:-80% 0}}.favorite.is-pulsing.sc-rp-recipe-card{animation:rp-favorite-pop 400ms var(--rp-ease)}@keyframes rp-favorite-pop{0%{transform:scale(1)}35%{transform:scale(0.86)}70%{transform:scale(1.16)}100%{transform:scale(1)}}.favorite.is-pulsing.sc-rp-recipe-card svg.sc-rp-recipe-card{animation:rp-heart-beat 400ms var(--rp-ease);transform-origin:center}@keyframes rp-heart-beat{0%{transform:scale(1)}30%{transform:scale(0.7)}55%{transform:scale(1.35)}75%{transform:scale(0.94)}100%{transform:scale(1)}}}@media (prefers-reduced-motion: reduce){.card.sc-rp-recipe-card,.media.sc-rp-recipe-card img.sc-rp-recipe-card,.favorite.sc-rp-recipe-card{transition:none}.sc-rp-recipe-card-h:hover .card.sc-rp-recipe-card{transform:none}.sc-rp-recipe-card-h:hover .media.sc-rp-recipe-card img.sc-rp-recipe-card{transform:none}.media.is-loading.sc-rp-recipe-card img.sc-rp-recipe-card{opacity:1}}";const d=class{constructor(a){r(this,a),this.rpSearch=e(this,"rpSearch"),this.rpClear=e(this,"rpClear")}value="";placeholder="Search recipes";label="Search recipes";draft="";rpSearch;rpClear;onValueChange(r){this.draft=r??""}componentWillLoad(){this.draft=this.value??""}onSubmit=r=>{r.preventDefault(),this.rpSearch.emit(this.draft.trim())};onInput=r=>{this.draft=r.target.value};onClear=()=>{this.draft="",this.rpClear.emit()};render(){return a(s,{key:"98c0c2367f27c061759b4fcae36b09fb4f88a720"},a("form",{key:"de043755e60e10f39b102605b5347416abf9dc8f",class:"bar",role:"search",onSubmit:this.onSubmit},a("svg",{key:"f5fdf365cd2901deb885068afece74c843a9d174",class:"icon",viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true"},a("circle",{key:"9ad873f8544081cbd16f7666e428565ade2cdbed",cx:"11",cy:"11",r:"7"}),a("path",{key:"d6284fb25056636002e6cde74a1bd7bf36f40291",d:"m20 20-3.6-3.6"})),a("input",{key:"17288bc6a472a736d78d8beef70316547c7eb11f",type:"search",class:"field",value:this.draft,placeholder:this.placeholder,"aria-label":this.label,onInput:this.onInput}),this.draft&&a("button",{key:"468a3c549bad63863a6bce18d0d46335705ace89",type:"button",class:"clear",onClick:this.onClear,"aria-label":"Clear search"},a("svg",{key:"70bab6cfdea49c209208e19a496ab24429bf704e",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},a("path",{key:"dcafa21163e380fed6ff35dff0e8f1915b7d5500",d:"M6 6l12 12M18 6L6 18"}))),a("button",{key:"24ac96852bb46844121597ee647c5e35304b9df9",type:"submit",class:"submit","aria-label":"Search"},a("span",{key:"d6e9577315a844403e120fb705a180f49c8f5733",class:"submit-text"},"Search"),a("svg",{key:"9fa48cfa05c8d8a3b5f328131c12a5b954069e56",class:"submit-icon",viewBox:"0 0 24 24",width:"17",height:"17","aria-hidden":"true"},a("circle",{key:"e9367a2e0ee4e05f3b39cbd728f2ea968a1c129f",cx:"11",cy:"11",r:"7"}),a("path",{key:"f2f41503b77ae140224746a419f792ceb77ea5ff",d:"m20 20-3.6-3.6"})))))}static get watchers(){return{value:[{onValueChange:0}]}}};d.style=".sc-rp-search-bar-h{display:block;font-family:var(--rp-font-sans)}.bar.sc-rp-search-bar{display:flex;gap:var(--rp-space-2);align-items:center;padding:5px 5px 5px var(--rp-space-4);background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-pill);box-shadow:var(--rp-shadow-sm);transition:border-color var(--rp-duration) var(--rp-ease), box-shadow var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:hover{border-color:var(--rp-color-border-strong)}.bar.sc-rp-search-bar:focus-within{border-color:var(--rp-color-focus);box-shadow:var(--rp-shadow-sm), var(--rp-focus-halo)}.icon.sc-rp-search-bar{flex-shrink:0;fill:none;stroke:var(--rp-color-text-subtle);stroke-width:2;stroke-linecap:round;transition:stroke var(--rp-duration) var(--rp-ease)}.bar.sc-rp-search-bar:focus-within .icon.sc-rp-search-bar{stroke:var(--rp-color-focus)}.field.sc-rp-search-bar{flex:1;min-width:0;padding:var(--rp-space-2) 0;font:inherit;font-size:var(--rp-font-size-md);color:var(--rp-color-text);background:none;border:none}.field.sc-rp-search-bar::placeholder{color:var(--rp-color-text-subtle)}.field.sc-rp-search-bar:focus,.field.sc-rp-search-bar:focus-visible{outline:none}.field.sc-rp-search-bar::-webkit-search-cancel-button{display:none}.clear.sc-rp-search-bar{display:grid;place-items:center;width:30px;height:30px;padding:0;color:var(--rp-color-text-subtle);cursor:pointer;background:none;border:none;border-radius:50%;transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.clear.sc-rp-search-bar svg.sc-rp-search-bar{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.clear.sc-rp-search-bar:hover{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.submit.sc-rp-search-bar{flex-shrink:0;padding:var(--rp-space-2) var(--rp-space-5);font:inherit;font-size:var(--rp-font-size-md);font-weight:600;color:var(--rp-color-accent-contrast);cursor:pointer;background:var(--rp-color-accent);border:none;border-radius:var(--rp-radius-pill);transition:background-color var(--rp-duration-fast) var(--rp-ease), transform var(--rp-duration-fast) var(--rp-ease)}.submit.sc-rp-search-bar:hover{background:var(--rp-color-accent-hover)}.submit.sc-rp-search-bar:active{transform:scale(0.97)}.submit-icon.sc-rp-search-bar{display:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}.submit.sc-rp-search-bar:focus-visible,.clear.sc-rp-search-bar:focus-visible{outline:var(--rp-focus-ring);outline-offset:var(--rp-focus-offset)}@media (max-width: 560px){.bar.sc-rp-search-bar{padding-inline-start:var(--rp-space-3);gap:var(--rp-space-1)}.submit.sc-rp-search-bar{display:grid;place-items:center;width:38px;height:38px;padding:0}.submit-text.sc-rp-search-bar{display:none}.submit-icon.sc-rp-search-bar{display:block}}@media (prefers-reduced-motion: reduce){.bar.sc-rp-search-bar,.icon.sc-rp-search-bar,.clear.sc-rp-search-bar,.submit.sc-rp-search-bar{transition:none}.submit.sc-rp-search-bar:active{transform:none}}";const l=class{constructor(a){r(this,a),this.rpSelectChange=e(this,"rpSelectChange")}get el(){return o(this)}options=[];value="";label="";placeholder="Choose…";open=!1;disabled=!1;compact=!1;dropUp=!1;activeIndex=-1;rpSelectChange;triggerEl;listEl;pressedOption=null;typeBuffer="";typeTimer;onOpenChange(r){if(!r)return window.removeEventListener("resize",this.position),window.removeEventListener("scroll",this.onAncestorScroll,!0),this.el.style.removeProperty("--rp-select-max-height"),void(this.dropUp=!1);this.activeIndex=Math.max(0,this.normalizedOptions.findIndex((r=>r.value===this.value))),requestAnimationFrame((()=>requestAnimationFrame((()=>{this.position(),this.scrollActiveIntoView()})))),window.addEventListener("resize",this.position),window.addEventListener("scroll",this.onAncestorScroll,!0)}onOptionsChange(){this.open&&requestAnimationFrame((()=>requestAnimationFrame((()=>this.position()))))}disconnectedCallback(){clearTimeout(this.typeTimer),window.removeEventListener("resize",this.position),window.removeEventListener("scroll",this.onAncestorScroll,!0)}onAncestorScroll=r=>{r.target!==this.listEl&&this.position()};position=()=>{if(!this.open||!this.triggerEl)return;const r=this.triggerEl.getBoundingClientRect(),e=this.clippingBounds(),a=Math.min(window.innerHeight,e.bottom),s=Math.max(0,e.top),o=a-r.bottom-8-12,t=r.top-s-8-12,i=o<(this.listEl?Math.min(260,this.listEl.scrollHeight):Math.min(260,40*this.normalizedOptions.length+8))&&t>o;this.dropUp=i;const c=Math.max(96,Math.floor(i?t:o));this.el.style.setProperty("--rp-select-max-height",`${c}px`)};clippingBounds(){let r=this.el.parentElement;for(;r&&r!==document.body;){const e=getComputedStyle(r);if("visible"!==e.overflow&&"visible"!==e.overflowY){const e=r.getBoundingClientRect();if(e.height>0)return{top:e.top,bottom:e.bottom}}r=r.parentElement}return{top:0,bottom:window.innerHeight}}async focusControl(){this.triggerEl?.focus()}onDocumentPointerDown(r){this.open&&(this.el.contains(r.target)||(this.open=!1))}get normalizedOptions(){return Array.isArray(this.options)?this.options:[]}get selectedOption(){return this.normalizedOptions.find((r=>r.value===this.value))}choose(r,e){this.value=r.value,this.open=!1,this.rpSelectChange.emit(r.value),this.triggerEl?.focus(),e&&this.swallowGhostClick(e.x,e.y)}swallowGhostClick(r,e){const a=a=>{Math.hypot(a.clientX-r,a.clientY-e)>24||(a.preventDefault(),a.stopPropagation(),s())},s=()=>{window.clearTimeout(o),document.removeEventListener("click",a,!0)};document.addEventListener("click",a,!0);const o=window.setTimeout(s,500)}scrollActiveIntoView(){const r=this.listEl?.querySelector(".option.is-active");r?.scrollIntoView({block:"nearest"})}move(r){const e=this.normalizedOptions;if(0===e.length)return;const a=this.activeIndex+r;this.activeIndex=a<0?e.length-1:a%e.length,requestAnimationFrame((()=>this.scrollActiveIntoView()))}typeAhead(r){clearTimeout(this.typeTimer),this.typeBuffer+=r.toLowerCase(),this.typeTimer=setTimeout((()=>this.typeBuffer=""),600);const e=this.normalizedOptions.findIndex((r=>r.label.toLowerCase().startsWith(this.typeBuffer)));-1!==e&&(this.open?(this.activeIndex=e,requestAnimationFrame((()=>this.scrollActiveIntoView()))):this.choose(this.normalizedOptions[e]))}onKeyDown=r=>{if(!this.disabled)switch(r.key){case"ArrowDown":return r.preventDefault(),void(this.open?this.move(1):this.open=!0);case"ArrowUp":return r.preventDefault(),void(this.open?this.move(-1):this.open=!0);case"Home":if(!this.open)return;return r.preventDefault(),this.activeIndex=0,void requestAnimationFrame((()=>this.scrollActiveIntoView()));case"End":if(!this.open)return;return r.preventDefault(),this.activeIndex=this.normalizedOptions.length-1,void requestAnimationFrame((()=>this.scrollActiveIntoView()));case"Enter":case" ":return r.preventDefault(),void(this.open?this.activeIndex>=0&&this.choose(this.normalizedOptions[this.activeIndex]):this.open=!0);case"Escape":if(!this.open)return;return r.preventDefault(),void(this.open=!1);case"Tab":return void(this.open=!1);default:1!==r.key.length||r.metaKey||r.ctrlKey||r.altKey||(r.preventDefault(),this.typeAhead(r.key))}};render(){const r=this.normalizedOptions,e=this.selectedOption,o="rp-select-list";return a(s,{key:"ff24ed1943638d0a255238846b55f6a2e0042824"},a("div",{key:"e2750500d5d349f64e66e9d9a28d3f5c37ba4e78",class:"wrap"},a("button",{key:"3ff9611c6f105d1fdc26ca9c332bf2f18efc8983",type:"button",class:"trigger",ref:r=>this.triggerEl=r,disabled:this.disabled,role:"combobox","aria-expanded":this.open?"true":"false","aria-controls":o,"aria-haspopup":"listbox","aria-label":this.label||void 0,"aria-activedescendant":this.open&&this.activeIndex>=0?`rp-select-option-${this.activeIndex}`:void 0,onKeyDown:this.onKeyDown,onPointerDown:r=>{this.disabled||(r.preventDefault(),this.triggerEl?.focus(),this.open=!this.open)}},a("span",{key:"26f8595bad37815f436366c4c3d3fc5a923d7aa5",class:{"trigger-value":!0,"is-placeholder":!e}},e?.label??this.placeholder),a("svg",{key:"782c3417d87d24cfabcc0548d2caf4b604006720",class:"chevron",viewBox:"0 0 24 24",width:"14",height:"14","aria-hidden":"true"},a("path",{key:"f11b0cf117312f97a8e94dbd664f769a542515d9",d:"m6 9 6 6 6-6"}))),this.open&&a("div",{key:"76bca46ff9374b459da8a53881c4672b9db7f4a0",class:"list",id:o,role:"listbox",tabindex:-1,"aria-label":this.label||void 0,ref:r=>this.listEl=r},0===r.length?a("p",{class:"empty"},"No options"):r.map(((r,e)=>a("button",{key:r.value,id:`rp-select-option-${e}`,type:"button",role:"option","aria-selected":r.value===this.value?"true":"false",class:{option:!0,"is-selected":r.value===this.value,"is-active":e===this.activeIndex},onPointerDown:e=>{"mouse"===e.pointerType?(e.preventDefault(),this.choose(r)):this.pressedOption={value:r.value,x:e.clientX,y:e.clientY}},onPointerUp:e=>{if("mouse"===e.pointerType)return;const a=this.pressedOption;this.pressedOption=null,a&&a.value===r.value&&(Math.hypot(e.clientX-a.x,e.clientY-a.y)>10||this.choose(r,{x:e.clientX,y:e.clientY}))},onPointerCancel:()=>this.pressedOption=null,onMouseEnter:()=>this.activeIndex=e},a("span",{class:"option-text"},r.label),r.value===this.value&&a("svg",{viewBox:"0 0 24 24",width:"15",height:"15","aria-hidden":"true"},a("path",{d:"m5 13 4 4L19 7"}))))))))}static get watchers(){return{open:[{onOpenChange:0}],options:[{onOptionsChange:0}]}}};l.style=".sc-rp-select-h{display:block;font-family:var(--rp-font-sans)}.wrap.sc-rp-select{position:relative}.trigger.sc-rp-select{display:flex;gap:var(--rp-space-2);align-items:center;justify-content:space-between;width:100%;padding:11px var(--rp-space-4);font-family:var(--rp-font-sans);font-size:var(--rp-font-size-md);font-weight:500;letter-spacing:-0.005em;color:var(--rp-color-text);text-align:start;cursor:pointer;background:var(--rp-color-surface);border:1px solid var(--rp-color-border-strong);border-radius:var(--rp-radius-md);transition:border-color var(--rp-duration-fast) var(--rp-ease), box-shadow var(--rp-duration-fast) var(--rp-ease)}.trigger.sc-rp-select:hover:not(:disabled){border-color:var(--rp-color-text-subtle)}.trigger.sc-rp-select:focus-visible,[open].sc-rp-select-h .trigger.sc-rp-select{outline:none;border-color:var(--rp-color-focus);box-shadow:var(--rp-focus-halo)}.trigger.sc-rp-select:disabled{cursor:not-allowed;opacity:0.55}.trigger-value.sc-rp-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trigger-value.is-placeholder.sc-rp-select{color:var(--rp-color-text-subtle)}.chevron.sc-rp-select{flex-shrink:0;fill:none;stroke:var(--rp-color-text-muted);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;transition:transform var(--rp-duration-fast) var(--rp-ease)}[open].sc-rp-select-h .chevron.sc-rp-select{transform:rotate(180deg)}.list.sc-rp-select{position:absolute;inset-block-start:calc(100% + var(--rp-space-1));inset-inline:0;z-index:40;max-height:min(260px, var(--rp-select-max-height, 260px));padding:var(--rp-space-1);overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:var(--rp-color-surface);border:1px solid var(--rp-color-border);border-radius:var(--rp-radius-lg);box-shadow:var(--rp-shadow-lg)}[drop-up].sc-rp-select-h .list.sc-rp-select{inset-block-start:auto;inset-block-end:calc(100% + var(--rp-space-1))}.option.sc-rp-select{display:flex;gap:var(--rp-space-2);align-items:center;justify-content:space-between;width:100%;padding:9px var(--rp-space-3);font-family:var(--rp-font-sans);font-size:var(--rp-font-size-md);font-weight:500;letter-spacing:-0.005em;line-height:1.4;color:var(--rp-color-text-body);text-align:start;cursor:pointer;background:none;border:none;border-radius:var(--rp-radius-sm);transition:color var(--rp-duration-fast) var(--rp-ease), background-color var(--rp-duration-fast) var(--rp-ease)}.option-text.sc-rp-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.option.sc-rp-select svg.sc-rp-select{flex-shrink:0;fill:none;stroke:var(--rp-color-highlight);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.option.is-active.sc-rp-select{color:var(--rp-color-text);background:var(--rp-color-surface-sunken)}.option.is-selected.sc-rp-select{font-weight:600;color:var(--rp-color-text)}.empty.sc-rp-select{margin:0;padding:var(--rp-space-4) var(--rp-space-3);font-size:var(--rp-font-size-sm);font-weight:500;color:var(--rp-color-text-subtle);text-align:center}[compact].sc-rp-select-h .trigger.sc-rp-select{padding:4px var(--rp-space-2);font-size:var(--rp-font-size-xs);color:var(--rp-color-text-muted);border-color:var(--rp-color-border);border-radius:var(--rp-radius-sm)}[compact].sc-rp-select-h .list.sc-rp-select{min-width:148px}[compact].sc-rp-select-h .option.sc-rp-select{padding:7px var(--rp-space-3);font-size:var(--rp-font-size-sm)}@media (prefers-reduced-motion: no-preference){.list.sc-rp-select{animation:rp-select-in var(--rp-duration-fast) var(--rp-ease);transform-origin:top}@keyframes rp-select-in{from{opacity:0;transform:translateY(-4px) scale(0.99)}}}@media (prefers-reduced-motion: reduce){.trigger.sc-rp-select,.chevron.sc-rp-select,.option.sc-rp-select{transition:none}}";export{t as rp_filter_chips,i as rp_ingredient_list,n as rp_modal,p as rp_recipe_card,d as rp_search_bar,l as rp_select}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-xM9qpraa.js";export{s as setNonce}from"./p-xM9qpraa.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,o={};return""!==a&&(o.resourcesUrl=new URL(".",a).href),e(o)})().then((async e=>(await o(),a([["p-b3485d04",[[774,"rp-day-slot",{day:[513],dayLabel:[1,"day-label"],meals:[16],days:[16],dayLabels:[16],normalized:[32],dropActive:[32],draggingId:[32],pointerKind:[32]}]]],["p-7a8ee97f",[[514,"rp-filter-menu",{label:[1],options:[16],selected:[1],searchPlaceholder:[1,"search-placeholder"],searchable:[4],open:[1540],filterText:[32],activeIndex:[32]},[[5,"pointerdown","onDocumentPointerDown"],[4,"keydown","onDocumentKeydown"]],{open:[{onOpenChange:0}]}]]],["p-
|
|
1
|
+
import{p as e,b as a}from"./p-xM9qpraa.js";export{s as setNonce}from"./p-xM9qpraa.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,o={};return""!==a&&(o.resourcesUrl=new URL(".",a).href),e(o)})().then((async e=>(await o(),a([["p-b3485d04",[[774,"rp-day-slot",{day:[513],dayLabel:[1,"day-label"],meals:[16],days:[16],dayLabels:[16],normalized:[32],dropActive:[32],draggingId:[32],pointerKind:[32]}]]],["p-7a8ee97f",[[514,"rp-filter-menu",{label:[1],options:[16],selected:[1],searchPlaceholder:[1,"search-placeholder"],searchable:[4],open:[1540],filterText:[32],activeIndex:[32]},[[5,"pointerdown","onDocumentPointerDown"],[4,"keydown","onDocumentKeydown"]],{open:[{onOpenChange:0}]}]]],["p-7c6d16b1",[[514,"rp-filter-chips",{options:[16],selected:[1],label:[1]}],[774,"rp-ingredient-list",{items:[16]}],[774,"rp-modal",{open:[516],heading:[1],focusFirstField:[64]},null,{open:[{onOpenChange:0}]}],[774,"rp-recipe-card",{recipeId:[1,"recipe-id"],recipeTitle:[1,"recipe-title"],image:[1],category:[1],href:[1],hrefLabel:[1,"href-label"],area:[1],minutes:[2],favorite:[516],imageLoading:[32],imageFailed:[32],pulsing:[32]}],[514,"rp-search-bar",{value:[1],placeholder:[1],label:[1],draft:[32]},null,{value:[{onValueChange:0}]}],[514,"rp-select",{options:[16],value:[1025],label:[1],placeholder:[1],open:[1540],disabled:[516],compact:[516],dropUp:[1540,"drop-up"],activeIndex:[32],focusControl:[64]},[[5,"pointerdown","onDocumentPointerDown"]],{open:[{onOpenChange:0}],options:[{onOptionsChange:0}]}]]]],e))));
|