@gurpinderjitsingh/recipe-ui 0.1.0 → 0.1.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.
Files changed (93) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  2. package/dist/cjs/app-modal_7.cjs.entry.js +233 -0
  3. package/dist/cjs/app-toast.cjs.entry.js +26 -0
  4. package/dist/cjs/index-CRcwY0Fb.js +1574 -0
  5. package/dist/cjs/index.cjs.js +16 -0
  6. package/dist/cjs/loader.cjs.js +13 -0
  7. package/dist/cjs/recipe-ui.cjs.js +25 -0
  8. package/dist/collection/collection-manifest.json +20 -0
  9. package/dist/collection/components/app-modal/app-modal.css +12 -0
  10. package/dist/collection/components/app-modal/app-modal.js +87 -0
  11. package/dist/collection/components/app-toast/app-toast.css +9 -0
  12. package/dist/collection/components/app-toast/app-toast.js +111 -0
  13. package/dist/collection/components/meal-plan-day/meal-plan-day.css +19 -0
  14. package/dist/collection/components/meal-plan-day/meal-plan-day.js +111 -0
  15. package/dist/collection/components/recipe-card/recipe-card.css +23 -0
  16. package/dist/collection/components/recipe-card/recipe-card.js +149 -0
  17. package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.css +7 -0
  18. package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.js +92 -0
  19. package/dist/collection/components/recipe-form/recipe-form.css +19 -0
  20. package/dist/{recipe-ui/recipe-form-D_DZ8L9Q.js → collection/components/recipe-form/recipe-form.js} +105 -21
  21. package/dist/collection/components/recipe-rating/recipe-rating.css +5 -0
  22. package/dist/collection/components/recipe-rating/recipe-rating.js +107 -0
  23. package/dist/collection/components/recipe-search-bar/recipe-search-bar.css +11 -0
  24. package/dist/collection/components/recipe-search-bar/recipe-search-bar.js +140 -0
  25. package/dist/collection/index.js +12 -0
  26. package/dist/components/app-modal.js +1 -0
  27. package/dist/components/app-toast.js +1 -0
  28. package/dist/components/index.js +1 -0
  29. package/dist/components/meal-plan-day.js +1 -0
  30. package/dist/components/p-B4H61SFd.js +1 -0
  31. package/dist/components/p-BJJZH_Cc.js +1 -0
  32. package/dist/components/p-BJU3HdRm.js +1 -0
  33. package/dist/components/p-BRKGu69u.js +1 -0
  34. package/dist/components/p-BZBToMAv.js +1 -0
  35. package/dist/components/p-BekLK-Pb.js +1 -0
  36. package/dist/components/p-COHQTgKC.js +1 -0
  37. package/dist/components/p-DsyQvPDo.js +1 -0
  38. package/dist/components/p-kbrkhGSm.js +1 -0
  39. package/dist/components/recipe-card.js +1 -0
  40. package/dist/components/recipe-filter-bar.js +1 -0
  41. package/dist/components/recipe-form.js +1 -0
  42. package/dist/components/recipe-rating.js +1 -0
  43. package/dist/components/recipe-search-bar.js +1 -0
  44. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  45. package/dist/esm/app-modal_7.entry.js +225 -0
  46. package/dist/{recipe-ui/app-toast-DjuZTKj8.js → esm/app-toast.entry.js} +3 -6
  47. package/dist/esm/index-CrZUP9M-.js +1567 -0
  48. package/dist/esm/index.js +3 -0
  49. package/dist/esm/loader.js +11 -0
  50. package/dist/esm/recipe-ui.js +21 -0
  51. package/dist/index.cjs.js +1 -0
  52. package/dist/index.js +1 -0
  53. package/dist/recipe-ui/index.esm.js +1 -17
  54. package/dist/recipe-ui/p-6ef28048.entry.js +1 -0
  55. package/dist/recipe-ui/p-CrZUP9M-.js +3 -0
  56. package/dist/recipe-ui/p-DQuL1Twl.js +1 -0
  57. package/dist/recipe-ui/p-e2f3c9b9.entry.js +1 -0
  58. package/dist/recipe-ui/recipe-ui.esm.js +1 -50
  59. package/package.json +1 -1
  60. package/dist/recipe-ui/app-modal-BL_aVG1A.js +0 -23
  61. package/dist/recipe-ui/app-modal-BL_aVG1A.js.map +0 -1
  62. package/dist/recipe-ui/app-modal.entry.js +0 -5
  63. package/dist/recipe-ui/app-modal.entry.js.map +0 -1
  64. package/dist/recipe-ui/app-toast-DjuZTKj8.js.map +0 -1
  65. package/dist/recipe-ui/app-toast.entry.js +0 -5
  66. package/dist/recipe-ui/app-toast.entry.js.map +0 -1
  67. package/dist/recipe-ui/index-DV5P9Jd8.js +0 -4656
  68. package/dist/recipe-ui/index-DV5P9Jd8.js.map +0 -1
  69. package/dist/recipe-ui/index.esm.js.map +0 -1
  70. package/dist/recipe-ui/meal-plan-day-9rmKiM44.js +0 -23
  71. package/dist/recipe-ui/meal-plan-day-9rmKiM44.js.map +0 -1
  72. package/dist/recipe-ui/meal-plan-day.entry.js +0 -5
  73. package/dist/recipe-ui/meal-plan-day.entry.js.map +0 -1
  74. package/dist/recipe-ui/recipe-card-91fhJAz5.js +0 -28
  75. package/dist/recipe-ui/recipe-card-91fhJAz5.js.map +0 -1
  76. package/dist/recipe-ui/recipe-card.entry.js +0 -5
  77. package/dist/recipe-ui/recipe-card.entry.js.map +0 -1
  78. package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js +0 -25
  79. package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js.map +0 -1
  80. package/dist/recipe-ui/recipe-filter-bar.entry.js +0 -5
  81. package/dist/recipe-ui/recipe-filter-bar.entry.js.map +0 -1
  82. package/dist/recipe-ui/recipe-form-D_DZ8L9Q.js.map +0 -1
  83. package/dist/recipe-ui/recipe-form.entry.js +0 -5
  84. package/dist/recipe-ui/recipe-form.entry.js.map +0 -1
  85. package/dist/recipe-ui/recipe-rating-BZDgwNdK.js +0 -23
  86. package/dist/recipe-ui/recipe-rating-BZDgwNdK.js.map +0 -1
  87. package/dist/recipe-ui/recipe-rating.entry.js +0 -5
  88. package/dist/recipe-ui/recipe-rating.entry.js.map +0 -1
  89. package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js +0 -47
  90. package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js.map +0 -1
  91. package/dist/recipe-ui/recipe-search-bar.entry.js +0 -5
  92. package/dist/recipe-ui/recipe-search-bar.entry.js.map +0 -1
  93. package/dist/recipe-ui/recipe-ui.esm.js.map +0 -1
@@ -0,0 +1 @@
1
+ import{t as e,p as s,H as t,c as i,h as r}from"./p-BJU3HdRm.js";const c=s(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.filterChange=i(this,"filterChange"),this.categories=[],this.active=""}select(e){this.filterChange.emit({value:e})}render(){const e=Array.isArray(this.categories)?this.categories:[];return r("div",{key:"13bc63f39ebfc55c0f05c035b63036121f7b3930",class:"wrap"},r("button",{key:"8aeb99775268204433a8f9831eca9873066c7b9e",class:{chip:!0,active:""===this.active},onClick:()=>this.select("")},"All"),e.map((e=>r("button",{class:{chip:!0,active:this.active===e},onClick:()=>this.select(e)},e))))}static get style(){return":host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}"}},[1,"recipe-filter-bar",{categories:[16],active:[1]}]);function a(){"undefined"!=typeof customElements&&["recipe-filter-bar"].forEach((s=>{"recipe-filter-bar"===s&&(customElements.get(e(s))||customElements.define(e(s),c))}))}a();export{c as R,a as d}
@@ -0,0 +1 @@
1
+ import{R as o,d as s}from"./p-B4H61SFd.js";const p=o,r=s;export{p as RecipeCard,r as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{R as o,d as r}from"./p-kbrkhGSm.js";const s=o,m=r;export{s as RecipeFilterBar,m as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{R as o,d as s}from"./p-DsyQvPDo.js";const p=o,r=s;export{p as RecipeForm,r as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{R as o,d as s}from"./p-BRKGu69u.js";const p=o,r=s;export{p as RecipeRating,r as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{R as o,d as s}from"./p-COHQTgKC.js";const p=o,r=s;export{p as RecipeSearchBar,r as defineCustomElement}
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };
@@ -0,0 +1,225 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index-CrZUP9M-.js';
2
+
3
+ const recipeCardCss = () => `:host{display:block;font-family:system-ui, sans-serif}.card{border:1px solid #e5e5e5;border-radius:12px;overflow:hidden;cursor:pointer;background:#fff;transition:box-shadow 0.15s ease, transform 0.15s ease}.card:hover{box-shadow:0 4px 16px rgba(0, 0, 0, 0.08);transform:translateY(-2px)}.image-wrap{position:relative;aspect-ratio:4 / 3;background:#f2f2f2}.image-wrap img{width:100%;height:100%;object-fit:cover;display:block}.placeholder{width:100%;height:100%;background:linear-gradient(135deg, #eee, #ddd)}.fav-btn{position:absolute;top:8px;right:8px;border:none;background:rgba(255, 255, 255, 0.9);border-radius:50%;width:32px;height:32px;font-size:16px;cursor:pointer;color:#f5a623}.fav-btn.active{color:#ff6b35}.body{padding:12px 14px}h3{margin:0 0 4px;font-size:15px;line-height:1.3}.category{font-size:12px;color:#777;text-transform:uppercase;letter-spacing:0.03em}.actions{margin-top:8px}`;
4
+
5
+ const RecipeCard = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.favoriteToggle = createEvent(this, "favoriteToggle");
9
+ this.cardClick = createEvent(this, "cardClick");
10
+ /** Category / cuisine label */
11
+ this.category = '';
12
+ /** Whether this recipe is currently favorited */
13
+ this.favorite = false;
14
+ this.onFavoriteClick = (e) => {
15
+ e.stopPropagation();
16
+ this.favoriteToggle.emit({ favorite: !this.favorite });
17
+ };
18
+ }
19
+ render() {
20
+ return (h("div", { key: 'abd19b1d63409b52cf66f348131f5f6f77bb47a6', class: "card", onClick: () => this.cardClick.emit() }, h("div", { key: '1292c3f6dfe7d3b399943004f764c41a3d072188', class: "image-wrap" }, this.image ? h("img", { src: this.image, alt: this.recipeTitle }) : h("div", { class: "placeholder" }), h("button", { key: '0efdc01af349d011ca0e11c4df5438b79876b467', class: { 'fav-btn': true, active: this.favorite }, onClick: this.onFavoriteClick, "aria-label": "Toggle favorite" }, this.favorite ? '★' : '☆')), h("div", { key: '66c2c4d845d9cc082c07f24f5d827313f6ad51c4', class: "body" }, h("h3", { key: '779fc629c3b97b6158f99440d9bb17fafb708dd3' }, this.recipeTitle), this.category && h("span", { key: '259ec599a43a5c8a279ad5993ba36f8602125b76', class: "category" }, this.category), h("div", { key: '58ab20f9682b4b73b7d027571496641cbfa76d0b', class: "actions" }, h("slot", { key: '28103422d993e58b133c2350e37c06fddf24300f', name: "actions" })))));
21
+ }
22
+ };
23
+ RecipeCard.style = recipeCardCss();
24
+
25
+ const recipeSearchBarCss = () => `:host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:6px}input{flex:1;padding:10px 14px;border-radius:8px;border:1px solid #ddd;font-size:14px;outline:none}input:focus{border-color:#ff6b35}button{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:0 16px;cursor:pointer;font-size:15px}`;
26
+
27
+ const RecipeSearchBar = class {
28
+ constructor(hostRef) {
29
+ registerInstance(this, hostRef);
30
+ this.search = createEvent(this, "search");
31
+ this.placeholder = 'Search recipes...';
32
+ this.value = '';
33
+ this.debounceMs = 350;
34
+ this.internalValue = '';
35
+ this.onInput = (e) => {
36
+ this.internalValue = e.target.value;
37
+ clearTimeout(this.timer);
38
+ this.timer = setTimeout(() => {
39
+ this.search.emit({ value: this.internalValue });
40
+ }, this.debounceMs);
41
+ };
42
+ this.onKeyDown = (e) => {
43
+ if (e.key === 'Enter') {
44
+ clearTimeout(this.timer);
45
+ this.search.emit({ value: this.internalValue });
46
+ }
47
+ };
48
+ }
49
+ componentWillLoad() {
50
+ this.internalValue = this.value;
51
+ }
52
+ onValuePropChange(newVal) {
53
+ this.internalValue = newVal;
54
+ }
55
+ render() {
56
+ return (h("div", { key: 'fe5eb2928308fb2496badd784e684b19df52501a', class: "wrap" }, h("input", { key: '3d4abb23a1155075a8889e015819b37a8569f6f5', type: "search", placeholder: this.placeholder, value: this.internalValue, onInput: this.onInput, onKeyDown: this.onKeyDown }), h("button", { key: 'f33f95b5bfcad9146903a2eb4448932a1d68edb7', onClick: () => this.search.emit({ value: this.internalValue }), "aria-label": "Search" }, "\uD83D\uDD0D")));
57
+ }
58
+ static get watchers() { return {
59
+ "value": [{
60
+ "onValuePropChange": 0
61
+ }]
62
+ }; }
63
+ };
64
+ RecipeSearchBar.style = recipeSearchBarCss();
65
+
66
+ const recipeFilterBarCss = () => `:host{display:block;font-family:system-ui, sans-serif}.wrap{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid #ddd;background:#fff;border-radius:999px;padding:6px 14px;font-size:13px;cursor:pointer;color:#444}.chip.active{background:#ff6b35;border-color:#ff6b35;color:#fff}`;
67
+
68
+ const RecipeFilterBar = class {
69
+ constructor(hostRef) {
70
+ registerInstance(this, hostRef);
71
+ this.filterChange = createEvent(this, "filterChange");
72
+ this.categories = [];
73
+ this.active = '';
74
+ }
75
+ select(value) {
76
+ this.filterChange.emit({ value });
77
+ }
78
+ render() {
79
+ const cats = Array.isArray(this.categories) ? this.categories : [];
80
+ return (h("div", { key: '13bc63f39ebfc55c0f05c035b63036121f7b3930', class: "wrap" }, h("button", { key: '8aeb99775268204433a8f9831eca9873066c7b9e', class: { chip: true, active: this.active === '' }, onClick: () => this.select('') }, "All"), cats.map((c) => (h("button", { class: { chip: true, active: this.active === c }, onClick: () => this.select(c) }, c)))));
81
+ }
82
+ };
83
+ RecipeFilterBar.style = recipeFilterBarCss();
84
+
85
+ const recipeRatingCss = () => `:host{display:inline-block;font-family:system-ui, sans-serif}.wrap{display:flex;gap:2px}.star{font-size:18px;color:#ddd}.star.filled{color:#f5a623}.star.clickable{cursor:pointer}`;
86
+
87
+ const RecipeRating = class {
88
+ constructor(hostRef) {
89
+ registerInstance(this, hostRef);
90
+ this.ratingChange = createEvent(this, "ratingChange");
91
+ this.value = 0;
92
+ this.readonly = false;
93
+ this.max = 5;
94
+ }
95
+ render() {
96
+ const stars = Array.from({ length: this.max }, (_, i) => i + 1);
97
+ return (h("div", { key: '1e1c67012185e7aaecfcc89671532946262a6957', class: "wrap", role: this.readonly ? undefined : 'radiogroup' }, stars.map((s) => (h("span", { class: { star: true, filled: s <= this.value, clickable: !this.readonly }, onClick: () => !this.readonly && this.ratingChange.emit({ value: s }) }, "\u2605")))));
98
+ }
99
+ };
100
+ RecipeRating.style = recipeRatingCss();
101
+
102
+ const recipeFormCss = () => `:host{display:block;font-family:system-ui, sans-serif}form{display:flex;flex-direction:column;gap:14px}label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#333;font-weight:600}input,textarea{font-weight:400;padding:8px 10px;border:1px solid #ddd;border-radius:6px;font-size:14px;font-family:inherit}.field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}.ingredient-row{display:flex;gap:6px}.ingredient-row input{flex:1}.ingredient-row button{border:none;background:#f4f4f4;border-radius:6px;cursor:pointer;width:30px}.add-btn{align-self:flex-start;border:1px dashed #bbb;background:none;border-radius:6px;padding:6px 10px;cursor:pointer;font-size:13px;color:#555}.error{color:#e74c3c;font-size:12px;font-weight:400}.footer{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}.cancel-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 16px;cursor:pointer}.save-btn{border:none;background:#ff6b35;color:#fff;border-radius:8px;padding:8px 18px;cursor:pointer;font-weight:600}`;
103
+
104
+ const RecipeForm = class {
105
+ constructor(hostRef) {
106
+ registerInstance(this, hostRef);
107
+ this.save = createEvent(this, "save");
108
+ this.cancel = createEvent(this, "cancel");
109
+ this.title = '';
110
+ this.image = '';
111
+ this.category = '';
112
+ this.ingredients = [''];
113
+ this.instructions = '';
114
+ this.errors = {};
115
+ this.onSubmit = (e) => {
116
+ e.preventDefault();
117
+ if (!this.validate())
118
+ return;
119
+ const data = {
120
+ id: this.initialData?.id,
121
+ title: this.title.trim(),
122
+ image: this.image.trim(),
123
+ category: this.category.trim(),
124
+ ingredients: this.ingredients.map((i) => i.trim()).filter(Boolean),
125
+ instructions: this.instructions.trim(),
126
+ };
127
+ this.save.emit(data);
128
+ };
129
+ this.addIngredient = () => {
130
+ this.ingredients = [...this.ingredients, ''];
131
+ };
132
+ this.removeIngredient = (index) => {
133
+ this.ingredients = this.ingredients.filter((_, i) => i !== index);
134
+ };
135
+ }
136
+ componentWillLoad() {
137
+ this.loadInitialData();
138
+ }
139
+ onInitialDataChange() {
140
+ this.loadInitialData();
141
+ }
142
+ loadInitialData() {
143
+ let data;
144
+ if (typeof this.initialData === 'string' && this.initialData) {
145
+ try {
146
+ data = JSON.parse(this.initialData);
147
+ }
148
+ catch {
149
+ data = undefined;
150
+ }
151
+ }
152
+ else if (this.initialData && typeof this.initialData === 'object') {
153
+ data = this.initialData;
154
+ }
155
+ if (data) {
156
+ this.title = data.title ?? '';
157
+ this.image = data.image ?? '';
158
+ this.category = data.category ?? '';
159
+ this.ingredients = data.ingredients?.length ? [...data.ingredients] : [''];
160
+ this.instructions = data.instructions ?? '';
161
+ }
162
+ }
163
+ validate() {
164
+ const errors = {};
165
+ if (!this.title.trim())
166
+ errors.title = 'Title is required.';
167
+ const cleanIngredients = this.ingredients.map((i) => i.trim()).filter(Boolean);
168
+ if (cleanIngredients.length === 0)
169
+ errors.ingredients = 'Add at least one ingredient.';
170
+ if (!this.instructions.trim())
171
+ errors.instructions = 'Instructions are required.';
172
+ this.errors = errors;
173
+ return Object.keys(errors).length === 0;
174
+ }
175
+ updateIngredient(index, value) {
176
+ const next = [...this.ingredients];
177
+ next[index] = value;
178
+ this.ingredients = next;
179
+ }
180
+ render() {
181
+ return (h("form", { key: 'bb5c6c7f1b421b55515994f0256c5b39ea781632', onSubmit: this.onSubmit }, h("slot", { key: '16940e4c8368aa6b546254ff8db7b28885a4409b', name: "header" }), h("label", { key: '7e3d6ba3231039ecdcca6a4c4314cf27038e1732' }, "Title", h("input", { key: 'f86056de021f040b8bbf3bf67a0d40ba526ad754', type: "text", value: this.title, onInput: (e) => (this.title = e.target.value) }), this.errors.title && h("span", { key: '54d552a15e037f54b2c6f0fd13cb4b685c25c76c', class: "error" }, this.errors.title)), h("label", { key: '376da4904e7919b5540ee8dabf494f6aab053523' }, "Image URL", h("input", { key: '761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef', type: "text", value: this.image, onInput: (e) => (this.image = e.target.value) })), h("label", { key: '0b7ff19b8718540b08921bb7f301be5cacf0df36' }, "Category", h("input", { key: '4f1bae8316d588e93006a12e0d824579ddbece43', type: "text", value: this.category, onInput: (e) => (this.category = e.target.value) })), h("div", { key: '280d98b91621defa547dbcc35c0cb6da55a67b5f', class: "field" }, h("span", { key: '96a015e055b434441eba85dcb89470823d0ebcc8' }, "Ingredients"), this.ingredients.map((ing, i) => (h("div", { class: "ingredient-row" }, h("input", { type: "text", value: ing, onInput: (e) => this.updateIngredient(i, e.target.value) }), h("button", { type: "button", onClick: () => this.removeIngredient(i), "aria-label": "Remove" }, "\u2715")))), h("button", { key: '697cda22eb5bdf42e50ac40669619fbc04140405', type: "button", class: "add-btn", onClick: this.addIngredient }, "+ Add ingredient"), this.errors.ingredients && h("span", { key: '6a46c393bdd9af8e1e1255792d5532daf433f25b', class: "error" }, this.errors.ingredients)), h("label", { key: '6abdbe72d381c3a0a56c46560a92b1e533fcce2a' }, "Instructions", h("textarea", { key: '1d3b62d6543e42a4cd0755522f657c13e2d1e4a7', rows: 5, onInput: (e) => (this.instructions = e.target.value) }, this.instructions), this.errors.instructions && h("span", { key: 'b5845bb5cd0ddd40de21f074307513d376a05f56', class: "error" }, this.errors.instructions)), h("div", { key: '778adeff176e2d2b080aad59602db6e92a69ea1c', class: "footer" }, h("slot", { key: 'c9584d6606ed33f616eb8f3035aa4a0fd5086af3', name: "footer" }), h("button", { key: 'b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a', type: "button", class: "cancel-btn", onClick: () => this.cancel.emit() }, "Cancel"), h("button", { key: 'a9e91907aa44c8587a2c492f869d0cb5daa942fe', type: "submit", class: "save-btn" }, "Save Recipe"))));
182
+ }
183
+ static get watchers() { return {
184
+ "initialData": [{
185
+ "onInitialDataChange": 0
186
+ }]
187
+ }; }
188
+ };
189
+ RecipeForm.style = recipeFormCss();
190
+
191
+ const mealPlanDayCss = () => `:host{display:block;font-family:system-ui, sans-serif}.day-col{border:1px solid #eee;border-radius:10px;padding:10px;min-width:150px;display:flex;flex-direction:column;gap:8px;background:#fafafa}h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:0.04em;color:#555}.meals{display:flex;flex-direction:column;gap:6px;min-height:40px}.meal-chip{display:flex;align-items:center;gap:6px;background:#fff;border:1px solid #eee;border-radius:8px;padding:4px 6px;font-size:12px}.meal-chip img{width:24px;height:24px;border-radius:4px;object-fit:cover}.meal-chip .title{flex:1}.meal-chip button{border:none;background:none;cursor:pointer;color:#999}.empty{font-size:12px;color:#aaa;margin:4px 0}.add-btn{border:1px dashed #ccc;background:none;border-radius:8px;padding:6px;font-size:12px;cursor:pointer;color:#666}`;
192
+
193
+ const MealPlanDay = class {
194
+ constructor(hostRef) {
195
+ registerInstance(this, hostRef);
196
+ this.assignMeal = createEvent(this, "assignMeal");
197
+ this.removeMeal = createEvent(this, "removeMeal");
198
+ this.day = '';
199
+ this.meals = [];
200
+ }
201
+ render() {
202
+ const meals = Array.isArray(this.meals) ? this.meals : [];
203
+ return (h("div", { key: '7a0b592fd4b8d9971d7f4912cecb5f9126be11b3', class: "day-col" }, h("h3", { key: 'b0f1f6a717ad409e6339219ea2f71b73d73bb1f3' }, this.day), h("div", { key: '2c978721af3aad27042572dd7825d5f2b5b659fb', class: "meals" }, meals.map((m) => (h("div", { class: "meal-chip" }, m.image && h("img", { src: m.image, alt: m.title }), h("span", { class: "title" }, m.title), h("button", { onClick: () => this.removeMeal.emit({ day: this.day, mealId: m.id }), "aria-label": "Remove meal" }, "\u2715")))), meals.length === 0 && h("p", { key: '326b5f3201df2416f43debc7257918a60a6ab6dd', class: "empty" }, "No meals planned")), h("button", { key: '3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14', class: "add-btn", onClick: () => this.assignMeal.emit({ day: this.day }) }, "+ Add meal")));
204
+ }
205
+ };
206
+ MealPlanDay.style = mealPlanDayCss();
207
+
208
+ const appModalCss = () => `:host{font-family:system-ui, sans-serif}.overlay{position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);display:flex;align-items:center;justify-content:center;z-index:1000}.dialog{background:#fff;border-radius:12px;min-width:320px;max-width:90vw;max-height:85vh;overflow-y:auto;padding:20px;box-shadow:0 10px 40px rgba(0,0,0,0.2)}.header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.header h2{margin:0;font-size:18px}.close-btn{border:none;background:none;font-size:16px;cursor:pointer;color:#666}`;
209
+
210
+ const AppModal = class {
211
+ constructor(hostRef) {
212
+ registerInstance(this, hostRef);
213
+ this.close = createEvent(this, "close");
214
+ this.open = false;
215
+ this.modalTitle = '';
216
+ }
217
+ render() {
218
+ if (!this.open)
219
+ return null;
220
+ return (h("div", { class: "dialog", onClick: (e) => e.stopPropagation() }, h("div", { class: "header" }, h("h2", null, this.modalTitle), h("button", { class: "close-btn", onClick: () => this.close.emit(), "aria-label": "Close" }, "\u2715")), h("div", { class: "body" }, h("slot", null))));
221
+ }
222
+ };
223
+ AppModal.style = appModalCss();
224
+
225
+ export { AppModal as app_modal, MealPlanDay as meal_plan_day, RecipeCard as recipe_card, RecipeFilterBar as recipe_filter_bar, RecipeForm as recipe_form, RecipeRating as recipe_rating, RecipeSearchBar as recipe_search_bar };
@@ -1,11 +1,11 @@
1
- import { r as registerInstance, a as createEvent, h } from './index-DV5P9Jd8.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-CrZUP9M-.js';
2
2
 
3
3
  const appToastCss = () => `:host{font-family:system-ui, sans-serif;display:block}.toast{display:flex;align-items:center;gap:10px;padding:10px 16px;border-radius:8px;color:#fff;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,0.15)}.toast.success{background:#2ecc71}.toast.error{background:#e74c3c}.toast.info{background:#3498db}button{border:none;background:none;color:inherit;cursor:pointer;margin-left:auto}`;
4
4
 
5
5
  const AppToast = class {
6
6
  constructor(hostRef) {
7
7
  registerInstance(this, hostRef);
8
- this.dismiss = createEvent(this, "dismiss", 7);
8
+ this.dismiss = createEvent(this, "dismiss");
9
9
  this.message = '';
10
10
  this.type = 'info';
11
11
  this.duration = 3000;
@@ -21,7 +21,4 @@ const AppToast = class {
21
21
  };
22
22
  AppToast.style = appToastCss();
23
23
 
24
- export { AppToast as A };
25
- //# sourceMappingURL=app-toast-DjuZTKj8.js.map
26
-
27
- //# sourceMappingURL=app-toast-DjuZTKj8.js.map
24
+ export { AppToast as app_toast };