@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.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/app-modal_7.cjs.entry.js +233 -0
- package/dist/cjs/app-toast.cjs.entry.js +26 -0
- package/dist/cjs/index-CRcwY0Fb.js +1574 -0
- package/dist/cjs/index.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/recipe-ui.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +20 -0
- package/dist/collection/components/app-modal/app-modal.css +12 -0
- package/dist/collection/components/app-modal/app-modal.js +87 -0
- package/dist/collection/components/app-toast/app-toast.css +9 -0
- package/dist/collection/components/app-toast/app-toast.js +111 -0
- package/dist/collection/components/meal-plan-day/meal-plan-day.css +19 -0
- package/dist/collection/components/meal-plan-day/meal-plan-day.js +111 -0
- package/dist/collection/components/recipe-card/recipe-card.css +23 -0
- package/dist/collection/components/recipe-card/recipe-card.js +149 -0
- package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.css +7 -0
- package/dist/collection/components/recipe-filter-bar/recipe-filter-bar.js +92 -0
- package/dist/collection/components/recipe-form/recipe-form.css +19 -0
- package/dist/{recipe-ui/recipe-form-D_DZ8L9Q.js → collection/components/recipe-form/recipe-form.js} +105 -21
- package/dist/collection/components/recipe-rating/recipe-rating.css +5 -0
- package/dist/collection/components/recipe-rating/recipe-rating.js +107 -0
- package/dist/collection/components/recipe-search-bar/recipe-search-bar.css +11 -0
- package/dist/collection/components/recipe-search-bar/recipe-search-bar.js +140 -0
- package/dist/collection/index.js +12 -0
- package/dist/components/app-modal.js +1 -0
- package/dist/components/app-toast.js +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/meal-plan-day.js +1 -0
- package/dist/components/p-B4H61SFd.js +1 -0
- package/dist/components/p-BJJZH_Cc.js +1 -0
- package/dist/components/p-BJU3HdRm.js +1 -0
- package/dist/components/p-BRKGu69u.js +1 -0
- package/dist/components/p-BZBToMAv.js +1 -0
- package/dist/components/p-BekLK-Pb.js +1 -0
- package/dist/components/p-COHQTgKC.js +1 -0
- package/dist/components/p-DsyQvPDo.js +1 -0
- package/dist/components/p-kbrkhGSm.js +1 -0
- package/dist/components/recipe-card.js +1 -0
- package/dist/components/recipe-filter-bar.js +1 -0
- package/dist/components/recipe-form.js +1 -0
- package/dist/components/recipe-rating.js +1 -0
- package/dist/components/recipe-search-bar.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/app-modal_7.entry.js +225 -0
- package/dist/{recipe-ui/app-toast-DjuZTKj8.js → esm/app-toast.entry.js} +3 -6
- package/dist/esm/index-CrZUP9M-.js +1567 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/recipe-ui.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/recipe-ui/index.esm.js +1 -17
- package/dist/recipe-ui/p-6ef28048.entry.js +1 -0
- package/dist/recipe-ui/p-CrZUP9M-.js +3 -0
- package/dist/recipe-ui/p-DQuL1Twl.js +1 -0
- package/dist/recipe-ui/p-e2f3c9b9.entry.js +1 -0
- package/dist/recipe-ui/recipe-ui.esm.js +1 -50
- package/package.json +1 -1
- package/dist/recipe-ui/app-modal-BL_aVG1A.js +0 -23
- package/dist/recipe-ui/app-modal-BL_aVG1A.js.map +0 -1
- package/dist/recipe-ui/app-modal.entry.js +0 -5
- package/dist/recipe-ui/app-modal.entry.js.map +0 -1
- package/dist/recipe-ui/app-toast-DjuZTKj8.js.map +0 -1
- package/dist/recipe-ui/app-toast.entry.js +0 -5
- package/dist/recipe-ui/app-toast.entry.js.map +0 -1
- package/dist/recipe-ui/index-DV5P9Jd8.js +0 -4656
- package/dist/recipe-ui/index-DV5P9Jd8.js.map +0 -1
- package/dist/recipe-ui/index.esm.js.map +0 -1
- package/dist/recipe-ui/meal-plan-day-9rmKiM44.js +0 -23
- package/dist/recipe-ui/meal-plan-day-9rmKiM44.js.map +0 -1
- package/dist/recipe-ui/meal-plan-day.entry.js +0 -5
- package/dist/recipe-ui/meal-plan-day.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-card-91fhJAz5.js +0 -28
- package/dist/recipe-ui/recipe-card-91fhJAz5.js.map +0 -1
- package/dist/recipe-ui/recipe-card.entry.js +0 -5
- package/dist/recipe-ui/recipe-card.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js +0 -25
- package/dist/recipe-ui/recipe-filter-bar-DV-B7Ybe.js.map +0 -1
- package/dist/recipe-ui/recipe-filter-bar.entry.js +0 -5
- package/dist/recipe-ui/recipe-filter-bar.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-form-D_DZ8L9Q.js.map +0 -1
- package/dist/recipe-ui/recipe-form.entry.js +0 -5
- package/dist/recipe-ui/recipe-form.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-rating-BZDgwNdK.js +0 -23
- package/dist/recipe-ui/recipe-rating-BZDgwNdK.js.map +0 -1
- package/dist/recipe-ui/recipe-rating.entry.js +0 -5
- package/dist/recipe-ui/recipe-rating.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js +0 -47
- package/dist/recipe-ui/recipe-search-bar-BVbznAHF.js.map +0 -1
- package/dist/recipe-ui/recipe-search-bar.entry.js +0 -5
- package/dist/recipe-ui/recipe-search-bar.entry.js.map +0 -1
- package/dist/recipe-ui/recipe-ui.esm.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Renders a row of selectable filter chips (e.g. categories/cuisines).
|
|
4
|
+
* `categories` accepts either a JSON string array or an actual array
|
|
5
|
+
* (Stencil auto-parses complex props passed as attributes).
|
|
6
|
+
* Emits `filterChange` with the selected value ('' = all).
|
|
7
|
+
*/
|
|
8
|
+
export class RecipeFilterBar {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.categories = [];
|
|
11
|
+
this.active = '';
|
|
12
|
+
}
|
|
13
|
+
select(value) {
|
|
14
|
+
this.filterChange.emit({ value });
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
const cats = Array.isArray(this.categories) ? this.categories : [];
|
|
18
|
+
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)))));
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "recipe-filter-bar"; }
|
|
21
|
+
static get encapsulation() { return "shadow"; }
|
|
22
|
+
static get originalStyleUrls() {
|
|
23
|
+
return {
|
|
24
|
+
"$": ["recipe-filter-bar.css"]
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
static get styleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["recipe-filter-bar.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"categories": {
|
|
35
|
+
"type": "unknown",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "string[]",
|
|
39
|
+
"resolved": "string[]",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": ""
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"defaultValue": "[]"
|
|
51
|
+
},
|
|
52
|
+
"active": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": ""
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"attribute": "active",
|
|
70
|
+
"defaultValue": "''"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static get events() {
|
|
75
|
+
return [{
|
|
76
|
+
"method": "filterChange",
|
|
77
|
+
"name": "filterChange",
|
|
78
|
+
"bubbles": true,
|
|
79
|
+
"cancelable": true,
|
|
80
|
+
"composed": true,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": ""
|
|
84
|
+
},
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "{ value: string }",
|
|
87
|
+
"resolved": "{ value: string; }",
|
|
88
|
+
"references": {}
|
|
89
|
+
}
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:host { display: block; font-family: system-ui, sans-serif; }
|
|
2
|
+
form { display: flex; flex-direction: column; gap: 14px; }
|
|
3
|
+
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #333; font-weight: 600; }
|
|
4
|
+
input, textarea {
|
|
5
|
+
font-weight: 400; padding: 8px 10px; border: 1px solid #ddd; border-radius: 6px;
|
|
6
|
+
font-size: 14px; font-family: inherit;
|
|
7
|
+
}
|
|
8
|
+
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
|
|
9
|
+
.ingredient-row { display: flex; gap: 6px; }
|
|
10
|
+
.ingredient-row input { flex: 1; }
|
|
11
|
+
.ingredient-row button { border: none; background: #f4f4f4; border-radius: 6px; cursor: pointer; width: 30px; }
|
|
12
|
+
.add-btn {
|
|
13
|
+
align-self: flex-start; border: 1px dashed #bbb; background: none; border-radius: 6px;
|
|
14
|
+
padding: 6px 10px; cursor: pointer; font-size: 13px; color: #555;
|
|
15
|
+
}
|
|
16
|
+
.error { color: #e74c3c; font-size: 12px; font-weight: 400; }
|
|
17
|
+
.footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
|
|
18
|
+
.cancel-btn { border: 1px solid #ddd; background: #fff; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
|
|
19
|
+
.save-btn { border: none; background: #ff6b35; color: #fff; border-radius: 8px; padding: 8px 18px; cursor: pointer; font-weight: 600; }
|
package/dist/{recipe-ui/recipe-form-D_DZ8L9Q.js → collection/components/recipe-form/recipe-form.js}
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
this.cancel = createEvent(this, "cancel", 7);
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Add/edit form for user-created recipes. Performs client-side validation
|
|
4
|
+
* (title required, at least one non-empty ingredient, instructions required)
|
|
5
|
+
* and only emits `save` once the data is valid.
|
|
6
|
+
*/
|
|
7
|
+
export class RecipeForm {
|
|
8
|
+
constructor() {
|
|
10
9
|
this.title = '';
|
|
11
10
|
this.image = '';
|
|
12
11
|
this.category = '';
|
|
@@ -81,15 +80,100 @@ const RecipeForm = class {
|
|
|
81
80
|
render() {
|
|
82
81
|
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"))));
|
|
83
82
|
}
|
|
84
|
-
static get
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
83
|
+
static get is() { return "recipe-form"; }
|
|
84
|
+
static get encapsulation() { return "shadow"; }
|
|
85
|
+
static get originalStyleUrls() {
|
|
86
|
+
return {
|
|
87
|
+
"$": ["recipe-form.css"]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
static get styleUrls() {
|
|
91
|
+
return {
|
|
92
|
+
"$": ["recipe-form.css"]
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
static get properties() {
|
|
96
|
+
return {
|
|
97
|
+
"initialData": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"mutable": false,
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "RecipeFormData | string",
|
|
102
|
+
"resolved": "RecipeFormData | string",
|
|
103
|
+
"references": {
|
|
104
|
+
"RecipeFormData": {
|
|
105
|
+
"location": "local",
|
|
106
|
+
"path": "C:/Users/gurpi/Downloads/recipe-finder-project/recipe-finder/packages/recipe-ui/src/components/recipe-form/recipe-form.tsx",
|
|
107
|
+
"id": "src/components/recipe-form/recipe-form.tsx::RecipeFormData"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"required": false,
|
|
112
|
+
"optional": false,
|
|
113
|
+
"docs": {
|
|
114
|
+
"tags": [],
|
|
115
|
+
"text": "Pass an existing recipe (as a JSON string or object) to edit it"
|
|
116
|
+
},
|
|
117
|
+
"getter": false,
|
|
118
|
+
"setter": false,
|
|
119
|
+
"reflect": false,
|
|
120
|
+
"attribute": "initial-data"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static get states() {
|
|
125
|
+
return {
|
|
126
|
+
"title": {},
|
|
127
|
+
"image": {},
|
|
128
|
+
"category": {},
|
|
129
|
+
"ingredients": {},
|
|
130
|
+
"instructions": {},
|
|
131
|
+
"errors": {}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
static get events() {
|
|
135
|
+
return [{
|
|
136
|
+
"method": "save",
|
|
137
|
+
"name": "save",
|
|
138
|
+
"bubbles": true,
|
|
139
|
+
"cancelable": true,
|
|
140
|
+
"composed": true,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": ""
|
|
144
|
+
},
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "RecipeFormData",
|
|
147
|
+
"resolved": "RecipeFormData",
|
|
148
|
+
"references": {
|
|
149
|
+
"RecipeFormData": {
|
|
150
|
+
"location": "local",
|
|
151
|
+
"path": "C:/Users/gurpi/Downloads/recipe-finder-project/recipe-finder/packages/recipe-ui/src/components/recipe-form/recipe-form.tsx",
|
|
152
|
+
"id": "src/components/recipe-form/recipe-form.tsx::RecipeFormData"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}, {
|
|
157
|
+
"method": "cancel",
|
|
158
|
+
"name": "cancel",
|
|
159
|
+
"bubbles": true,
|
|
160
|
+
"cancelable": true,
|
|
161
|
+
"composed": true,
|
|
162
|
+
"docs": {
|
|
163
|
+
"tags": [],
|
|
164
|
+
"text": ""
|
|
165
|
+
},
|
|
166
|
+
"complexType": {
|
|
167
|
+
"original": "void",
|
|
168
|
+
"resolved": "void",
|
|
169
|
+
"references": {}
|
|
170
|
+
}
|
|
171
|
+
}];
|
|
172
|
+
}
|
|
173
|
+
static get watchers() {
|
|
174
|
+
return [{
|
|
175
|
+
"propName": "initialData",
|
|
176
|
+
"methodName": "onInitialDataChange"
|
|
177
|
+
}];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/** 5-star rating. Read-only display or interactive input. */
|
|
3
|
+
export class RecipeRating {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.value = 0;
|
|
6
|
+
this.readonly = false;
|
|
7
|
+
this.max = 5;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
const stars = Array.from({ length: this.max }, (_, i) => i + 1);
|
|
11
|
+
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")))));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "recipe-rating"; }
|
|
14
|
+
static get encapsulation() { return "shadow"; }
|
|
15
|
+
static get originalStyleUrls() {
|
|
16
|
+
return {
|
|
17
|
+
"$": ["recipe-rating.css"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static get styleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["recipe-rating.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"value": {
|
|
28
|
+
"type": "number",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "number",
|
|
32
|
+
"resolved": "number",
|
|
33
|
+
"references": {}
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"optional": false,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [],
|
|
39
|
+
"text": ""
|
|
40
|
+
},
|
|
41
|
+
"getter": false,
|
|
42
|
+
"setter": false,
|
|
43
|
+
"reflect": false,
|
|
44
|
+
"attribute": "value",
|
|
45
|
+
"defaultValue": "0"
|
|
46
|
+
},
|
|
47
|
+
"readonly": {
|
|
48
|
+
"type": "boolean",
|
|
49
|
+
"mutable": false,
|
|
50
|
+
"complexType": {
|
|
51
|
+
"original": "boolean",
|
|
52
|
+
"resolved": "boolean",
|
|
53
|
+
"references": {}
|
|
54
|
+
},
|
|
55
|
+
"required": false,
|
|
56
|
+
"optional": false,
|
|
57
|
+
"docs": {
|
|
58
|
+
"tags": [],
|
|
59
|
+
"text": ""
|
|
60
|
+
},
|
|
61
|
+
"getter": false,
|
|
62
|
+
"setter": false,
|
|
63
|
+
"reflect": false,
|
|
64
|
+
"attribute": "readonly",
|
|
65
|
+
"defaultValue": "false"
|
|
66
|
+
},
|
|
67
|
+
"max": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "number",
|
|
72
|
+
"resolved": "number",
|
|
73
|
+
"references": {}
|
|
74
|
+
},
|
|
75
|
+
"required": false,
|
|
76
|
+
"optional": false,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": ""
|
|
80
|
+
},
|
|
81
|
+
"getter": false,
|
|
82
|
+
"setter": false,
|
|
83
|
+
"reflect": false,
|
|
84
|
+
"attribute": "max",
|
|
85
|
+
"defaultValue": "5"
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
static get events() {
|
|
90
|
+
return [{
|
|
91
|
+
"method": "ratingChange",
|
|
92
|
+
"name": "ratingChange",
|
|
93
|
+
"bubbles": true,
|
|
94
|
+
"cancelable": true,
|
|
95
|
+
"composed": true,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"complexType": {
|
|
101
|
+
"original": "{ value: number }",
|
|
102
|
+
"resolved": "{ value: number; }",
|
|
103
|
+
"references": {}
|
|
104
|
+
}
|
|
105
|
+
}];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:host { display: block; font-family: system-ui, sans-serif; }
|
|
2
|
+
.wrap { display: flex; gap: 6px; }
|
|
3
|
+
input {
|
|
4
|
+
flex: 1; padding: 10px 14px; border-radius: 8px;
|
|
5
|
+
border: 1px solid #ddd; font-size: 14px; outline: none;
|
|
6
|
+
}
|
|
7
|
+
input:focus { border-color: #ff6b35; }
|
|
8
|
+
button {
|
|
9
|
+
border: none; background: #ff6b35; color: #fff; border-radius: 8px;
|
|
10
|
+
padding: 0 16px; cursor: pointer; font-size: 15px;
|
|
11
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A debounced search input. Emits `search` with the current value
|
|
4
|
+
* after the user stops typing (default 350ms) or presses Enter.
|
|
5
|
+
*/
|
|
6
|
+
export class RecipeSearchBar {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.placeholder = 'Search recipes...';
|
|
9
|
+
this.value = '';
|
|
10
|
+
this.debounceMs = 350;
|
|
11
|
+
this.internalValue = '';
|
|
12
|
+
this.onInput = (e) => {
|
|
13
|
+
this.internalValue = e.target.value;
|
|
14
|
+
clearTimeout(this.timer);
|
|
15
|
+
this.timer = setTimeout(() => {
|
|
16
|
+
this.search.emit({ value: this.internalValue });
|
|
17
|
+
}, this.debounceMs);
|
|
18
|
+
};
|
|
19
|
+
this.onKeyDown = (e) => {
|
|
20
|
+
if (e.key === 'Enter') {
|
|
21
|
+
clearTimeout(this.timer);
|
|
22
|
+
this.search.emit({ value: this.internalValue });
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
componentWillLoad() {
|
|
27
|
+
this.internalValue = this.value;
|
|
28
|
+
}
|
|
29
|
+
onValuePropChange(newVal) {
|
|
30
|
+
this.internalValue = newVal;
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
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")));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "recipe-search-bar"; }
|
|
36
|
+
static get encapsulation() { return "shadow"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["recipe-search-bar.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["recipe-search-bar.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"placeholder": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string",
|
|
54
|
+
"resolved": "string",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"getter": false,
|
|
64
|
+
"setter": false,
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"attribute": "placeholder",
|
|
67
|
+
"defaultValue": "'Search recipes...'"
|
|
68
|
+
},
|
|
69
|
+
"value": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": ""
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"attribute": "value",
|
|
87
|
+
"defaultValue": "''"
|
|
88
|
+
},
|
|
89
|
+
"debounceMs": {
|
|
90
|
+
"type": "number",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "number",
|
|
94
|
+
"resolved": "number",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": ""
|
|
102
|
+
},
|
|
103
|
+
"getter": false,
|
|
104
|
+
"setter": false,
|
|
105
|
+
"reflect": false,
|
|
106
|
+
"attribute": "debounce-ms",
|
|
107
|
+
"defaultValue": "350"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
static get states() {
|
|
112
|
+
return {
|
|
113
|
+
"internalValue": {}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static get events() {
|
|
117
|
+
return [{
|
|
118
|
+
"method": "search",
|
|
119
|
+
"name": "search",
|
|
120
|
+
"bubbles": true,
|
|
121
|
+
"cancelable": true,
|
|
122
|
+
"composed": true,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": ""
|
|
126
|
+
},
|
|
127
|
+
"complexType": {
|
|
128
|
+
"original": "{ value: string }",
|
|
129
|
+
"resolved": "{ value: string; }",
|
|
130
|
+
"references": {}
|
|
131
|
+
}
|
|
132
|
+
}];
|
|
133
|
+
}
|
|
134
|
+
static get watchers() {
|
|
135
|
+
return [{
|
|
136
|
+
"propName": "value",
|
|
137
|
+
"methodName": "onValuePropChange"
|
|
138
|
+
}];
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Barrel export of all component classes. Not required for the actual
|
|
2
|
+
// dist-custom-elements build (Stencil discovers @Component-decorated
|
|
3
|
+
// classes automatically via stencil.config.ts), but useful if a consumer
|
|
4
|
+
// ever wants typed access to the component classes themselves.
|
|
5
|
+
export { RecipeCard } from './components/recipe-card/recipe-card';
|
|
6
|
+
export { RecipeSearchBar } from './components/recipe-search-bar/recipe-search-bar';
|
|
7
|
+
export { RecipeFilterBar } from './components/recipe-filter-bar/recipe-filter-bar';
|
|
8
|
+
export { RecipeRating } from './components/recipe-rating/recipe-rating';
|
|
9
|
+
export { RecipeForm } from './components/recipe-form/recipe-form';
|
|
10
|
+
export { MealPlanDay } from './components/meal-plan-day/meal-plan-day';
|
|
11
|
+
export { AppModal } from './components/app-modal/app-modal';
|
|
12
|
+
export { AppToast } from './components/app-toast/app-toast';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o,d as s}from"./p-BJJZH_Cc.js";const p=o,r=s;export{p as AppModal,r as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as o,d as s}from"./p-BekLK-Pb.js";const p=o,r=s;export{p as AppToast,r as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-BJU3HdRm.js";export{R as RecipeCard}from"./p-B4H61SFd.js";export{R as RecipeSearchBar}from"./p-COHQTgKC.js";export{R as RecipeFilterBar}from"./p-kbrkhGSm.js";export{R as RecipeRating}from"./p-BRKGu69u.js";export{R as RecipeForm}from"./p-DsyQvPDo.js";export{M as MealPlanDay}from"./p-BZBToMAv.js";export{A as AppModal}from"./p-BJJZH_Cc.js";export{A as AppToast}from"./p-BekLK-Pb.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{M as o,d as s}from"./p-BZBToMAv.js";const p=o,r=s;export{p as MealPlanDay,r as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as a,c as i,h as s}from"./p-BJU3HdRm.js";const r=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.favoriteToggle=i(this,"favoriteToggle"),this.cardClick=i(this,"cardClick"),this.category="",this.favorite=!1,this.onFavoriteClick=e=>{e.stopPropagation(),this.favoriteToggle.emit({favorite:!this.favorite})}}render(){return s("div",{key:"abd19b1d63409b52cf66f348131f5f6f77bb47a6",class:"card",onClick:()=>this.cardClick.emit()},s("div",{key:"1292c3f6dfe7d3b399943004f764c41a3d072188",class:"image-wrap"},this.image?s("img",{src:this.image,alt:this.recipeTitle}):s("div",{class:"placeholder"}),s("button",{key:"0efdc01af349d011ca0e11c4df5438b79876b467",class:{"fav-btn":!0,active:this.favorite},onClick:this.onFavoriteClick,"aria-label":"Toggle favorite"},this.favorite?"★":"☆")),s("div",{key:"66c2c4d845d9cc082c07f24f5d827313f6ad51c4",class:"body"},s("h3",{key:"779fc629c3b97b6158f99440d9bb17fafb708dd3"},this.recipeTitle),this.category&&s("span",{key:"259ec599a43a5c8a279ad5993ba36f8602125b76",class:"category"},this.category),s("div",{key:"58ab20f9682b4b73b7d027571496641cbfa76d0b",class:"actions"},s("slot",{key:"28103422d993e58b133c2350e37c06fddf24300f",name:"actions"}))))}static get style(){return":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}"}},[257,"recipe-card",{recipeTitle:[1,"recipe-title"],image:[1],category:[1],favorite:[4]}]);function o(){"undefined"!=typeof customElements&&["recipe-card"].forEach((t=>{"recipe-card"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as R,o as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as s,c as o,h as n}from"./p-BJU3HdRm.js";const i=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.close=o(this,"close"),this.open=!1,this.modalTitle=""}render(){return this.open?n("div",{class:"dialog",onClick:e=>e.stopPropagation()},n("div",{class:"header"},n("h2",null,this.modalTitle),n("button",{class:"close-btn",onClick:()=>this.close.emit(),"aria-label":"Close"},"✕")),n("div",{class:"body"},n("slot",null))):null}static get style(){return":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}"}},[257,"app-modal",{open:[4],modalTitle:[1,"modal-title"]}]);function a(){"undefined"!=typeof customElements&&["app-modal"].forEach((t=>{"app-modal"===t&&(customElements.get(e(t))||customElements.define(e(t),i))}))}a();export{i as A,a as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],s=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);s&&Object.defineProperty(e,o,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},o=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="undefined"!=typeof window?window:{},c=r.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},f=(()=>{try{return!!r.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!f&&(()=>!!r.document&&Object.getOwnPropertyDescriptor(r.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],m=()=>{var t;return(null==(t=r.document)?void 0:t.hidden)?v($):u.raf($)},b=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&u.i?v($):m())},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{y(p),y(h),(d=p.length>0)&&m()},v=t=>Promise.resolve(undefined).then(t),w=b(h,!0),g=t=>{const e=new URL(t,u.u);return e.origin!==r.location.origin?e.href:e.pathname},j=t=>u.u=t;function O(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(a?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var S,k=new WeakMap,M=t=>"sc-"+t.p,E=t=>"object"==(t=typeof t)||"function"===t,A=(t,e,...n)=>{let o=null,l=null,i=!1,r=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!E(o))o=String(o);else if("function"!=typeof t&&void 0===o.i){s("Invalid vNode child");continue}i&&r?c[c.length-1].h+=o:c.push(i?C(null,o):o),r=i}};if(u(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=C(t,null);return f.m=e,c.length>0&&(f.$=c),f.v=l,f},C=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,$:null,m:null,v:null}),N={},x=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},L=(t,e)=>null==t||E(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?String(t):t,_=(t,e)=>{const n=t;return{emit:t=>D(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},D=(t,e,n)=>{const o=u.ce(e,n);return t.dispatchEvent(o),o},H=(t,e,n,s,i,c)=>{if(n===s)return;let f=l(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,o=R(n);let l=R(s);e.remove(...o.filter((t=>t&&!l.includes(t)))),e.add(...l.filter((t=>t&&!o.includes(t))))}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let l;{const e=o(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(l=t[1])}}return l||(l=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const o=E(s);if((f||o&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const o=null==s?"":s;"list"===e?f=!1:null!=n&&t[e]===o||("function"==typeof t.__lookupSetter__(e)?t[e]=o:t.setAttribute(e,o))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!f||4&c||i)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):l(r,a)?a.slice(2):a[2]+e.slice(3),n||s){const o=e.endsWith(U);e=e.replace(W,""),n&&u.rel(t,e,n,o),s&&u.ael(t,e,s,o)}},P=/\s/,R=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(P):[]),U="Capture",W=new RegExp(U+"$"),F=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.m||{},s=e.m||{};for(const t of T(Object.keys(l)))t in s||H(o,t,l[t],void 0,n,e.i);for(const t of T(Object.keys(s)))H(o,t,l[t],s[t],n,e.i)};function T(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var V=!1,q=!1,z=(t,e,n)=>{const o=e.$[n];let l,s,i=0;if(null!=o.h)l=o.O=r.document.createTextNode(o.h);else{if(!r.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=r.document.createElement(o.j),F(null,o,q),o.$){const e="template"===o.j?l.content:l;for(i=0;i<o.$.length;++i)s=z(t,o,i),s&&e.appendChild(s)}}return l["s-hn"]=S,l},I=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===S&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);l<=s;++l)o[l]&&(i=z(null,n,l),i&&(o[l].O=i,G(r,i,e)))},Y=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;t&&t.remove()}}},Z=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.v&&e.v&&(t.v=e.v),!0):t.v===e.v),B=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,s=e.$,i=e.h;null==i?("slot"!==e.j||V||t.S!==e.S&&(e.O["s-sn"]=e.S||"",(t=>{u.i|=1;const e=t.closest(S.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(G(e,t,null!=n?n:null),t["s-sh"]=void 0)}u.i&=-2})(e.O.parentElement)),F(t,e,q),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],b=o[h];const y="template"===n.j?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==b)b=o[--h];else if(Z(d,m,l))B(d,m,l),d=e[++r],m=o[++c];else if(Z(p,b,l))B(p,b,l),p=e[--a],b=o[--h];else if(Z(d,b,l))B(d,b,l),G(y,d.O,p.O.nextSibling),d=e[++r],b=o[--h];else if(Z(p,m,l))B(p,m,l),G(y,p.O,d.O),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].v&&e[f].v===m.v){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=z(e&&e[c],n,u):(B(i,m,l),e[u]=void 0,s=i.O),m=o[++c]):(s=z(e&&e[c],n,c),m=o[++c]),s&&G(d.O.parentNode,s,d.O)}r>a?I(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&Y(e,r,a)})(o,l,e,s,n):null!==s?(null!==t.h&&(o.textContent=""),I(o,null,e,s,0,s.length-1)):!n&&null!==l&&Y(l,0,l.length-1)):t.h!==i&&(o.data=i)},G=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),J=(t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,s=t.k||C(null,null);var i;const r=(i=e)&&i.j===N?e:A(null,null,e);if(S=o.tagName,n&&r.m)for(const t of Object.keys(r.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=o[t]);r.j=null,r.i|=4,t.k=r,r.O=s.O=o.shadowRoot||o,V=!(!(1&l.i)||128&l.i),B(s,r,n)},K=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},Q=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);K(t,t.A);const n=()=>X(t,e);if(!e)return w(n);queueMicrotask((()=>{n()}))},X=(t,e)=>{const n=t.$hostElement$,o=n;if(!o)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=it(o,e?"componentWillLoad":"componentWillUpdate",void 0,n),l=tt(l,(()=>it(o,"componentWillRender",void 0,n))),tt(l,(()=>nt(t,o,e)))},tt=(t,e)=>et(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),et=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,nt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.i,l=((t,e)=>{var n,o,l;const s=M(e),c=i.get(s);if(!r.document)return s;if(t=11===t.nodeType?t:r.document,c)if("string"==typeof c){let l,i=k.get(t=t.head||t);if(i||k.set(t,i=new Set),!i.has(s)){l=r.document.createElement("style"),l.textContent=c;const d=null!=(n=u.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=r.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(c),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=c+e.textContent:t.prepend(l)}else t.append(l);1&e.i&&t.insertBefore(l,null),4&e.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=k.get(t);if(e||k.set(t,e=new Set),!e.has(s)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(c.constructor===n.CSSStyleSheet)o=c;else{o=new n.CSSStyleSheet;for(let t=0;t<c.cssRules.length;t++)o.insertRule(c.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ot(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>lt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},ot=(t,e,n,o)=>{try{e=e.render(),t.i&=-17,t.i|=2,J(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},lt=t=>{const e=t.$hostElement$,n=e,o=t.A;it(n,"componentDidRender",void 0,e),64&t.i?it(n,"componentDidUpdate",void 0,e):(t.i|=64,rt(e),it(n,"componentDidLoad",void 0,e),t.N(e),o||st()),t.M&&(t.M(),t.M=void 0),512&t.i&&v((()=>Q(t,!1))),t.i&=-517},st=()=>{v((()=>D(r,"appload",{detail:{namespace:"recipe-ui"}})))},it=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},rt=t=>t.classList.add("hydrated"),ct=(t,e,n,l)=>{const i=o(t);if(!i)return;const r=t,c=i.l.get(e),u=i.i,f=r;n=L(n,l.t[e][0]);const a=Number.isNaN(c)&&Number.isNaN(n);if(n!==c&&!a){if(i.l.set(e,n),l.L){const t=l.L[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i._.push((()=>{i.D[o](n,c,e)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||Q(i,!1)}}},ut=(e,n)=>{var l,s;const i=e.prototype;{e.watchers&&!n.L&&(n.L=x(e.watchers)),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(l=n.t)?l:{});r.map((([e,[l]])=>{if(31&l||32&l){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,o(this).l.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=o(this);if(s){if(r)return void 0===(32&l?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),r.apply(this,[L(t,l)]),void ct(this,e,t=32&l?this[e]:s.$hostElement$[e],n);ct(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,l,s){u.jmp((()=>{var c;const u=t.get(e),f=o(this);if(this.hasOwnProperty(u),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const t=null==f?void 0:f.i;if(f&&t&&!(8&t)&&s!==l){const o=this,i=null==(c=n.L)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&t||1&r)&&o[i].call(o,s,l,e)}))}return}const a=r.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===s&&void 0===this[u];d&&(s=null!==s&&"false"!==s);const h=Object.getOwnPropertyDescriptor(i,u);p||s==this[u]||h.get&&!h.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.L)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,n])=>{const o=n[1]||e;return t.set(o,e),o}))]))}}return e},ft=async(t,e,n)=>{let o;try{if(!(32&e.i)&&(e.i|=32,e.i&=-1025,o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const e=M(n);if(!i.has(e)){const o=()=>{};((t,e,n)=>{let o=i.get(t);f&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,i.set(t,o)})(e,t,!!(1&n.i)),o()}}const l=e.A,s=()=>Q(e,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),!e.N||1024&e.i||e.N(t)}},at=(t,e)=>{const l={i:e[0],p:e[1]};try{l.t=e[2],l.L=x(t.L),l.H=t.H,l.P=t.P;const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,R:new Map};o.U=new Promise((t=>o.N=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,l)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!o(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=o(t);if(!e)return;const n=e.o,l=()=>{};if(1&e.i)(null==e?void 0:e.D)||(1024&e.i?setTimeout((()=>ft(t,e,n)),1e3):(null==e?void 0:e.U)&&e.U.then((()=>{})));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){K(e,e.A=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),ft(t,e,n)}l()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&u.i||o(t),k.has(t)&&k.delete(t),t.shadowRoot&&k.has(t.shadowRoot)&&k.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${l.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else O.call(this,l)}}),Object.defineProperty(t,"is",{value:l.p,configurable:!0}),ut(t,l)}catch(e){return s(e),t}},dt=t=>u.C=t,pt=t=>Object.assign(u,t),ht=new WeakMap;function mt(t,e){let n=ht.get(e);n||(n={i:0,o:{i:0,p:e.tagName},$hostElement$:e},ht.set(e,n)),J(n,t)}function bt(t){return t}export{c as H,dt as a,pt as b,_ as c,g,A as h,at as p,mt as r,j as s,bt as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as s,p as t,H as e,c as i,h as a}from"./p-BJU3HdRm.js";const r=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.ratingChange=i(this,"ratingChange"),this.value=0,this.readonly=!1,this.max=5}render(){const s=Array.from({length:this.max},((s,t)=>t+1));return a("div",{key:"1e1c67012185e7aaecfcc89671532946262a6957",class:"wrap",role:this.readonly?void 0:"radiogroup"},s.map((s=>a("span",{class:{star:!0,filled:s<=this.value,clickable:!this.readonly},onClick:()=>!this.readonly&&this.ratingChange.emit({value:s})},"★"))))}static get style(){return":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}"}},[1,"recipe-rating",{value:[2],readonly:[4],max:[2]}]);function c(){"undefined"!=typeof customElements&&["recipe-rating"].forEach((t=>{"recipe-rating"===t&&(customElements.get(s(t))||customElements.define(s(t),r))}))}c();export{r as R,c as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as a,H as s,c as t,h as d}from"./p-BJU3HdRm.js";const i=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.assignMeal=t(this,"assignMeal"),this.removeMeal=t(this,"removeMeal"),this.day="",this.meals=[]}render(){const e=Array.isArray(this.meals)?this.meals:[];return d("div",{key:"7a0b592fd4b8d9971d7f4912cecb5f9126be11b3",class:"day-col"},d("h3",{key:"b0f1f6a717ad409e6339219ea2f71b73d73bb1f3"},this.day),d("div",{key:"2c978721af3aad27042572dd7825d5f2b5b659fb",class:"meals"},e.map((e=>d("div",{class:"meal-chip"},e.image&&d("img",{src:e.image,alt:e.title}),d("span",{class:"title"},e.title),d("button",{onClick:()=>this.removeMeal.emit({day:this.day,mealId:e.id}),"aria-label":"Remove meal"},"✕")))),0===e.length&&d("p",{key:"326b5f3201df2416f43debc7257918a60a6ab6dd",class:"empty"},"No meals planned")),d("button",{key:"3532de633a1f6cb83bb70f91a2df8fe1a9fcbc14",class:"add-btn",onClick:()=>this.assignMeal.emit({day:this.day})},"+ Add meal"))}static get style(){return":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}"}},[1,"meal-plan-day",{day:[1],meals:[16]}]);function o(){"undefined"!=typeof customElements&&["meal-plan-day"].forEach((a=>{"meal-plan-day"===a&&(customElements.get(e(a))||customElements.define(e(a),i))}))}o();export{i as M,o as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as s,p as t,H as e,c as o,h as a}from"./p-BJU3HdRm.js";const i=t(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.dismiss=o(this,"dismiss"),this.message="",this.type="info",this.duration=3e3}componentDidLoad(){this.duration>0&&setTimeout((()=>this.dismiss.emit()),this.duration)}render(){return a("div",{key:"d9dcb405ffd97bfa44fee10fe49103bd021938a2",class:`toast ${this.type}`},a("span",{key:"5fd291b9766dc41189f49c11c836654d6663c8d1"},this.message),a("button",{key:"9f93921f20b17520ce339378c5a1ca66ef6a04bc",onClick:()=>this.dismiss.emit(),"aria-label":"Dismiss"},"✕"))}static get style(){return":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}"}},[1,"app-toast",{message:[1],type:[1],duration:[2]}]);function n(){"undefined"!=typeof customElements&&["app-toast"].forEach((t=>{"app-toast"===t&&(customElements.get(s(t))||customElements.define(s(t),i))}))}n();export{i as A,n as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as s,c as a,h as i}from"./p-BJU3HdRm.js";const r=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.search=a(this,"search"),this.placeholder="Search recipes...",this.value="",this.debounceMs=350,this.internalValue="",this.onInput=e=>{this.internalValue=e.target.value,clearTimeout(this.timer),this.timer=setTimeout((()=>{this.search.emit({value:this.internalValue})}),this.debounceMs)},this.onKeyDown=e=>{"Enter"===e.key&&(clearTimeout(this.timer),this.search.emit({value:this.internalValue}))}}componentWillLoad(){this.internalValue=this.value}onValuePropChange(e){this.internalValue=e}render(){return i("div",{key:"fe5eb2928308fb2496badd784e684b19df52501a",class:"wrap"},i("input",{key:"3d4abb23a1155075a8889e015819b37a8569f6f5",type:"search",placeholder:this.placeholder,value:this.internalValue,onInput:this.onInput,onKeyDown:this.onKeyDown}),i("button",{key:"f33f95b5bfcad9146903a2eb4448932a1d68edb7",onClick:()=>this.search.emit({value:this.internalValue}),"aria-label":"Search"},"🔍"))}static get watchers(){return{value:[{onValuePropChange:0}]}}static get style(){return":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}"}},[1,"recipe-search-bar",{placeholder:[1],value:[1],debounceMs:[2,"debounce-ms"],internalValue:[32]},void 0,{value:[{onValuePropChange:0}]}]);function o(){"undefined"!=typeof customElements&&["recipe-search-bar"].forEach((t=>{"recipe-search-bar"===t&&(customElements.get(e(t))||customElements.define(e(t),r))}))}o();export{r as R,o as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as t,H as i,c as a,h as s}from"./p-BJU3HdRm.js";const n=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.save=a(this,"save"),this.cancel=a(this,"cancel"),this.title="",this.image="",this.category="",this.ingredients=[""],this.instructions="",this.errors={},this.onSubmit=e=>{if(e.preventDefault(),!this.validate())return;const t={id:this.initialData?.id,title:this.title.trim(),image:this.image.trim(),category:this.category.trim(),ingredients:this.ingredients.map((e=>e.trim())).filter(Boolean),instructions:this.instructions.trim()};this.save.emit(t)},this.addIngredient=()=>{this.ingredients=[...this.ingredients,""]},this.removeIngredient=e=>{this.ingredients=this.ingredients.filter(((t,i)=>i!==e))}}componentWillLoad(){this.loadInitialData()}onInitialDataChange(){this.loadInitialData()}loadInitialData(){let e;if("string"==typeof this.initialData&&this.initialData)try{e=JSON.parse(this.initialData)}catch{e=void 0}else this.initialData&&"object"==typeof this.initialData&&(e=this.initialData);e&&(this.title=e.title??"",this.image=e.image??"",this.category=e.category??"",this.ingredients=e.ingredients?.length?[...e.ingredients]:[""],this.instructions=e.instructions??"")}validate(){const e={};return this.title.trim()||(e.title="Title is required."),0===this.ingredients.map((e=>e.trim())).filter(Boolean).length&&(e.ingredients="Add at least one ingredient."),this.instructions.trim()||(e.instructions="Instructions are required."),this.errors=e,0===Object.keys(e).length}updateIngredient(e,t){const i=[...this.ingredients];i[e]=t,this.ingredients=i}render(){return s("form",{key:"bb5c6c7f1b421b55515994f0256c5b39ea781632",onSubmit:this.onSubmit},s("slot",{key:"16940e4c8368aa6b546254ff8db7b28885a4409b",name:"header"}),s("label",{key:"7e3d6ba3231039ecdcca6a4c4314cf27038e1732"},"Title",s("input",{key:"f86056de021f040b8bbf3bf67a0d40ba526ad754",type:"text",value:this.title,onInput:e=>this.title=e.target.value}),this.errors.title&&s("span",{key:"54d552a15e037f54b2c6f0fd13cb4b685c25c76c",class:"error"},this.errors.title)),s("label",{key:"376da4904e7919b5540ee8dabf494f6aab053523"},"Image URL",s("input",{key:"761b64f0e5153ca0e2bf61a7db4c4106ae2f79ef",type:"text",value:this.image,onInput:e=>this.image=e.target.value})),s("label",{key:"0b7ff19b8718540b08921bb7f301be5cacf0df36"},"Category",s("input",{key:"4f1bae8316d588e93006a12e0d824579ddbece43",type:"text",value:this.category,onInput:e=>this.category=e.target.value})),s("div",{key:"280d98b91621defa547dbcc35c0cb6da55a67b5f",class:"field"},s("span",{key:"96a015e055b434441eba85dcb89470823d0ebcc8"},"Ingredients"),this.ingredients.map(((e,t)=>s("div",{class:"ingredient-row"},s("input",{type:"text",value:e,onInput:e=>this.updateIngredient(t,e.target.value)}),s("button",{type:"button",onClick:()=>this.removeIngredient(t),"aria-label":"Remove"},"✕")))),s("button",{key:"697cda22eb5bdf42e50ac40669619fbc04140405",type:"button",class:"add-btn",onClick:this.addIngredient},"+ Add ingredient"),this.errors.ingredients&&s("span",{key:"6a46c393bdd9af8e1e1255792d5532daf433f25b",class:"error"},this.errors.ingredients)),s("label",{key:"6abdbe72d381c3a0a56c46560a92b1e533fcce2a"},"Instructions",s("textarea",{key:"1d3b62d6543e42a4cd0755522f657c13e2d1e4a7",rows:5,onInput:e=>this.instructions=e.target.value},this.instructions),this.errors.instructions&&s("span",{key:"b5845bb5cd0ddd40de21f074307513d376a05f56",class:"error"},this.errors.instructions)),s("div",{key:"778adeff176e2d2b080aad59602db6e92a69ea1c",class:"footer"},s("slot",{key:"c9584d6606ed33f616eb8f3035aa4a0fd5086af3",name:"footer"}),s("button",{key:"b2e17dfb528996a1e6a8a1f8aac36b36e3b07c3a",type:"button",class:"cancel-btn",onClick:()=>this.cancel.emit()},"Cancel"),s("button",{key:"a9e91907aa44c8587a2c492f869d0cb5daa942fe",type:"submit",class:"save-btn"},"Save Recipe")))}static get watchers(){return{initialData:[{onInitialDataChange:0}]}}static get style(){return":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}"}},[257,"recipe-form",{initialData:[1,"initial-data"],title:[32],image:[32],category:[32],ingredients:[32],instructions:[32],errors:[32]},void 0,{initialData:[{onInitialDataChange:0}]}]);function d(){"undefined"!=typeof customElements&&["recipe-form"].forEach((t=>{"recipe-form"===t&&(customElements.get(e(t))||customElements.define(e(t),n))}))}d();export{n as R,d}
|