@ssejal8/recipe-ui-kit 0.1.0
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/.claude/settings.local.json +10 -0
- package/.npmr +1 -0
- package/README.md +354 -0
- package/apps/recipe-web/package.json +31 -0
- package/apps/recipe-web/src/app.css +418 -0
- package/apps/recipe-web/src/app.d.ts +32 -0
- package/apps/recipe-web/src/app.html +25 -0
- package/apps/recipe-web/src/lib/api/mealdb.ts +240 -0
- package/apps/recipe-web/src/lib/components/AppHeader.svelte +290 -0
- package/apps/recipe-web/src/lib/components/ConfirmDialog.svelte +46 -0
- package/apps/recipe-web/src/lib/components/Modal.svelte +33 -0
- package/apps/recipe-web/src/lib/components/RecipeCard.svelte +100 -0
- package/apps/recipe-web/src/lib/components/RecipeForm.svelte +560 -0
- package/apps/recipe-web/src/lib/components/RecipeGrid.svelte +77 -0
- package/apps/recipe-web/src/lib/components/RecipePickerDialog.svelte +185 -0
- package/apps/recipe-web/src/lib/components/Toaster.svelte +111 -0
- package/apps/recipe-web/src/lib/domain/recipe.ts +130 -0
- package/apps/recipe-web/src/lib/domain/validation.ts +189 -0
- package/apps/recipe-web/src/lib/stencil/WebComponent.svelte +145 -0
- package/apps/recipe-web/src/lib/stencil/register.ts +28 -0
- package/apps/recipe-web/src/lib/stores/favorites.svelte.ts +81 -0
- package/apps/recipe-web/src/lib/stores/myRecipes.svelte.ts +98 -0
- package/apps/recipe-web/src/lib/stores/persisted.svelte.ts +73 -0
- package/apps/recipe-web/src/lib/stores/planner.svelte.ts +275 -0
- package/apps/recipe-web/src/lib/stores/theme.svelte.ts +67 -0
- package/apps/recipe-web/src/lib/stores/toast.svelte.ts +66 -0
- package/apps/recipe-web/src/routes/+error.svelte +36 -0
- package/apps/recipe-web/src/routes/+layout.svelte +62 -0
- package/apps/recipe-web/src/routes/+page.svelte +352 -0
- package/apps/recipe-web/src/routes/+page.ts +107 -0
- package/apps/recipe-web/src/routes/favorites/+page.svelte +170 -0
- package/apps/recipe-web/src/routes/my-recipes/+layout.ts +55 -0
- package/apps/recipe-web/src/routes/my-recipes/+page.svelte +180 -0
- package/apps/recipe-web/src/routes/my-recipes/[id]/edit/+page.svelte +104 -0
- package/apps/recipe-web/src/routes/my-recipes/new/+page.svelte +67 -0
- package/apps/recipe-web/src/routes/planner/+page.svelte +422 -0
- package/apps/recipe-web/src/routes/recipes/[id]/+page.svelte +538 -0
- package/apps/recipe-web/src/routes/recipes/[id]/+page.ts +24 -0
- package/apps/recipe-web/static/favicon.svg +8 -0
- package/apps/recipe-web/static/robots.txt +2 -0
- package/apps/recipe-web/svelte.config.js +35 -0
- package/apps/recipe-web/tsconfig.json +14 -0
- package/apps/recipe-web/vite.config.ts +23 -0
- package/package.json +29 -0
- package/packages/recipe-kit-stencil/LICENSE +21 -0
- package/packages/recipe-kit-stencil/README.md +185 -0
- package/packages/recipe-kit-stencil/package-lock.json +4772 -0
- package/packages/recipe-kit-stencil/package.json +91 -0
- package/packages/recipe-kit-stencil/src/components/rk-badge/readme.md +38 -0
- package/packages/recipe-kit-stencil/src/components/rk-badge/rk-badge.css +102 -0
- package/packages/recipe-kit-stencil/src/components/rk-badge/rk-badge.tsx +31 -0
- package/packages/recipe-kit-stencil/src/components/rk-chip/readme.md +52 -0
- package/packages/recipe-kit-stencil/src/components/rk-chip/rk-chip.css +155 -0
- package/packages/recipe-kit-stencil/src/components/rk-chip/rk-chip.tsx +105 -0
- package/packages/recipe-kit-stencil/src/components/rk-empty-state/readme.md +44 -0
- package/packages/recipe-kit-stencil/src/components/rk-empty-state/rk-empty-state.css +64 -0
- package/packages/recipe-kit-stencil/src/components/rk-empty-state/rk-empty-state.tsx +50 -0
- package/packages/recipe-kit-stencil/src/components/rk-meal-slot/readme.md +58 -0
- package/packages/recipe-kit-stencil/src/components/rk-meal-slot/rk-meal-slot.css +225 -0
- package/packages/recipe-kit-stencil/src/components/rk-meal-slot/rk-meal-slot.tsx +182 -0
- package/packages/recipe-kit-stencil/src/components/rk-modal/readme.md +57 -0
- package/packages/recipe-kit-stencil/src/components/rk-modal/rk-modal.css +163 -0
- package/packages/recipe-kit-stencil/src/components/rk-modal/rk-modal.tsx +176 -0
- package/packages/recipe-kit-stencil/src/components/rk-rating/readme.md +42 -0
- package/packages/recipe-kit-stencil/src/components/rk-rating/rk-rating.css +71 -0
- package/packages/recipe-kit-stencil/src/components/rk-rating/rk-rating.tsx +114 -0
- package/packages/recipe-kit-stencil/src/components/rk-recipe-card/readme.md +66 -0
- package/packages/recipe-kit-stencil/src/components/rk-recipe-card/rk-recipe-card.css +280 -0
- package/packages/recipe-kit-stencil/src/components/rk-recipe-card/rk-recipe-card.tsx +179 -0
- package/packages/recipe-kit-stencil/src/components/rk-recipe-card/test/rk-recipe-card.spec.tsx +70 -0
- package/packages/recipe-kit-stencil/src/components/rk-search-bar/readme.md +67 -0
- package/packages/recipe-kit-stencil/src/components/rk-search-bar/rk-search-bar.css +141 -0
- package/packages/recipe-kit-stencil/src/components/rk-search-bar/rk-search-bar.tsx +152 -0
- package/packages/recipe-kit-stencil/src/components/rk-search-bar/test/rk-search-bar.spec.tsx +93 -0
- package/packages/recipe-kit-stencil/src/components/rk-segmented-control/readme.md +41 -0
- package/packages/recipe-kit-stencil/src/components/rk-segmented-control/rk-segmented-control.css +91 -0
- package/packages/recipe-kit-stencil/src/components/rk-segmented-control/rk-segmented-control.tsx +115 -0
- package/packages/recipe-kit-stencil/src/components/rk-tag-input/readme.md +47 -0
- package/packages/recipe-kit-stencil/src/components/rk-tag-input/rk-tag-input.css +146 -0
- package/packages/recipe-kit-stencil/src/components/rk-tag-input/rk-tag-input.tsx +181 -0
- package/packages/recipe-kit-stencil/src/components/rk-tag-input/test/rk-tag-input.spec.tsx +76 -0
- package/packages/recipe-kit-stencil/src/components.d.ts +1192 -0
- package/packages/recipe-kit-stencil/src/global/rk-global.css +104 -0
- package/packages/recipe-kit-stencil/src/index.html +259 -0
- package/packages/recipe-kit-stencil/src/index.ts +6 -0
- package/packages/recipe-kit-stencil/stencil.config.ts +41 -0
- package/packages/recipe-kit-stencil/tsconfig.json +24 -0
|
@@ -0,0 +1,1192 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/**
|
|
4
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
+
* It contains typing information for all components that exist in this project.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
|
|
8
|
+
import { RkMealDropDetail, RkMealRecipeDetail, RkMealSlotDetail } from "./components/rk-meal-slot/rk-meal-slot";
|
|
9
|
+
import { RkFavoriteToggleDetail, RkRecipeCardSelectDetail } from "./components/rk-recipe-card/rk-recipe-card";
|
|
10
|
+
import { RkSegmentOption } from "./components/rk-segmented-control/rk-segmented-control";
|
|
11
|
+
export { RkMealDropDetail, RkMealRecipeDetail, RkMealSlotDetail } from "./components/rk-meal-slot/rk-meal-slot";
|
|
12
|
+
export { RkFavoriteToggleDetail, RkRecipeCardSelectDetail } from "./components/rk-recipe-card/rk-recipe-card";
|
|
13
|
+
export { RkSegmentOption } from "./components/rk-segmented-control/rk-segmented-control";
|
|
14
|
+
export namespace Components {
|
|
15
|
+
/**
|
|
16
|
+
* A small, non-interactive label. Purely slot-driven so hosts can put icons,
|
|
17
|
+
* text or counts inside it.
|
|
18
|
+
*/
|
|
19
|
+
interface RkBadge {
|
|
20
|
+
/**
|
|
21
|
+
* Compact sizing for dense layouts.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
"small": boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Color treatment.
|
|
27
|
+
* @default 'neutral'
|
|
28
|
+
*/
|
|
29
|
+
"tone": 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';
|
|
30
|
+
/**
|
|
31
|
+
* `soft` is tinted, `solid` is filled, `outline` is bordered only.
|
|
32
|
+
* @default 'soft'
|
|
33
|
+
*/
|
|
34
|
+
"variant": 'soft' | 'solid' | 'outline';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A selectable / dismissible filter chip.
|
|
38
|
+
*/
|
|
39
|
+
interface RkChip {
|
|
40
|
+
/**
|
|
41
|
+
* Optional trailing count badge (e.g. number of matching recipes).
|
|
42
|
+
*/
|
|
43
|
+
"count"?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Disables interaction.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
"disabled": boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Renders an "x" button that emits `rkChipDismiss` instead of toggling.
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
"dismissible": boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Visible text.
|
|
56
|
+
* @default ''
|
|
57
|
+
*/
|
|
58
|
+
"label": string;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the chip is currently active.
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
"selected": boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Visual treatment.
|
|
66
|
+
* @default 'neutral'
|
|
67
|
+
*/
|
|
68
|
+
"tone": 'neutral' | 'primary' | 'accent';
|
|
69
|
+
/**
|
|
70
|
+
* Value reported back to the host application in event payloads.
|
|
71
|
+
*/
|
|
72
|
+
"value"?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Placeholder shown when a list has no items, a search returns nothing, or a
|
|
76
|
+
* request fails.
|
|
77
|
+
*/
|
|
78
|
+
interface RkEmptyState {
|
|
79
|
+
/**
|
|
80
|
+
* Removes the dashed border and reduces padding, for inline use.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
"bare": boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Bold headline.
|
|
86
|
+
* @default 'Nothing here yet'
|
|
87
|
+
*/
|
|
88
|
+
"heading": string;
|
|
89
|
+
/**
|
|
90
|
+
* Emoji or short glyph shown above the heading.
|
|
91
|
+
* @default '🍳'
|
|
92
|
+
*/
|
|
93
|
+
"icon": string;
|
|
94
|
+
/**
|
|
95
|
+
* Supporting sentence.
|
|
96
|
+
*/
|
|
97
|
+
"message"?: string;
|
|
98
|
+
/**
|
|
99
|
+
* `error` swaps to a warning treatment.
|
|
100
|
+
* @default 'neutral'
|
|
101
|
+
*/
|
|
102
|
+
"tone": 'neutral' | 'error';
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* One cell of the weekly planner grid: either an empty "add" target or a filled
|
|
106
|
+
* slot showing the planned recipe. Doubles as a drop zone for drag-and-drop
|
|
107
|
+
* planning.
|
|
108
|
+
*/
|
|
109
|
+
interface RkMealSlot {
|
|
110
|
+
/**
|
|
111
|
+
* Day key this slot belongs to, e.g. `monday`. Echoed in event payloads.
|
|
112
|
+
*/
|
|
113
|
+
"day": string;
|
|
114
|
+
/**
|
|
115
|
+
* Disables interaction.
|
|
116
|
+
* @default false
|
|
117
|
+
*/
|
|
118
|
+
"disabled": boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Human-readable meal label shown as the slot caption.
|
|
121
|
+
*/
|
|
122
|
+
"mealLabel"?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Meal type key, e.g. `breakfast`. Echoed in event payloads.
|
|
125
|
+
*/
|
|
126
|
+
"mealType": string;
|
|
127
|
+
/**
|
|
128
|
+
* Id of the planned recipe. Empty means the slot is free.
|
|
129
|
+
*/
|
|
130
|
+
"recipeId"?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Thumbnail of the planned recipe.
|
|
133
|
+
*/
|
|
134
|
+
"recipeImage"?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Title of the planned recipe.
|
|
137
|
+
*/
|
|
138
|
+
"recipeName"?: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* An accessible dialog with a backdrop, Escape handling and focus restoration.
|
|
142
|
+
* The component is presentational: it emits `rkModalClose` and lets the host
|
|
143
|
+
* application own the `open` state.
|
|
144
|
+
*/
|
|
145
|
+
interface RkModal {
|
|
146
|
+
/**
|
|
147
|
+
* Set to false to require an explicit action to dismiss.
|
|
148
|
+
* @default true
|
|
149
|
+
*/
|
|
150
|
+
"dismissible": boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Heading text for the default header.
|
|
153
|
+
* @default ''
|
|
154
|
+
*/
|
|
155
|
+
"heading": string;
|
|
156
|
+
/**
|
|
157
|
+
* Controls visibility.
|
|
158
|
+
* @default false
|
|
159
|
+
*/
|
|
160
|
+
"open": boolean;
|
|
161
|
+
/**
|
|
162
|
+
* Dialog width preset.
|
|
163
|
+
* @default 'md'
|
|
164
|
+
*/
|
|
165
|
+
"size": 'sm' | 'md' | 'lg';
|
|
166
|
+
/**
|
|
167
|
+
* Optional supporting line under the heading.
|
|
168
|
+
*/
|
|
169
|
+
"subheading"?: string;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* A star rating that works as a read-only display or an interactive input.
|
|
173
|
+
*/
|
|
174
|
+
interface RkRating {
|
|
175
|
+
/**
|
|
176
|
+
* Optional count of ratings, rendered as "(24)".
|
|
177
|
+
*/
|
|
178
|
+
"count"?: number;
|
|
179
|
+
/**
|
|
180
|
+
* Accessible label for the group.
|
|
181
|
+
* @default 'Rating'
|
|
182
|
+
*/
|
|
183
|
+
"label": string;
|
|
184
|
+
/**
|
|
185
|
+
* Number of stars.
|
|
186
|
+
* @default 5
|
|
187
|
+
*/
|
|
188
|
+
"max": number;
|
|
189
|
+
/**
|
|
190
|
+
* When true the stars are display-only and not focusable.
|
|
191
|
+
* @default false
|
|
192
|
+
*/
|
|
193
|
+
"readonly": boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Renders the numeric value next to the stars.
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
"showValue": boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Star size in pixels.
|
|
201
|
+
* @default 18
|
|
202
|
+
*/
|
|
203
|
+
"size": number;
|
|
204
|
+
/**
|
|
205
|
+
* Current rating. Supports halves when `readonly`.
|
|
206
|
+
* @default 0
|
|
207
|
+
*/
|
|
208
|
+
"value": number;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The primary recipe tile used across discovery, favorites and search results.
|
|
212
|
+
* All data arrives as individual primitive properties rather than one object
|
|
213
|
+
* prop, so the component works with plain HTML attributes in any framework.
|
|
214
|
+
*/
|
|
215
|
+
interface RkRecipeCard {
|
|
216
|
+
/**
|
|
217
|
+
* Cuisine / region, e.g. "Italian".
|
|
218
|
+
*/
|
|
219
|
+
"area"?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Category, e.g. "Dessert".
|
|
222
|
+
*/
|
|
223
|
+
"category"?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Renders a compact horizontal layout, for dense lists and the planner.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
"compact": boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Whether this recipe is currently favorited.
|
|
231
|
+
* @default false
|
|
232
|
+
*/
|
|
233
|
+
"favorite": boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Hides the favorite button entirely (e.g. inside the planner).
|
|
236
|
+
* @default false
|
|
237
|
+
*/
|
|
238
|
+
"hideFavorite": boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Real href used for accessibility, SEO and middle-click / open-in-new-tab.
|
|
241
|
+
*/
|
|
242
|
+
"href"?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Thumbnail URL.
|
|
245
|
+
*/
|
|
246
|
+
"image"?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Total time in minutes. Hidden when omitted.
|
|
249
|
+
*/
|
|
250
|
+
"minutes"?: number;
|
|
251
|
+
/**
|
|
252
|
+
* Recipe title.
|
|
253
|
+
* @default ''
|
|
254
|
+
*/
|
|
255
|
+
"name": string;
|
|
256
|
+
/**
|
|
257
|
+
* `custom` recipes are user-authored and get an "Owned" badge.
|
|
258
|
+
* @default 'api'
|
|
259
|
+
*/
|
|
260
|
+
"origin": 'api' | 'custom';
|
|
261
|
+
/**
|
|
262
|
+
* Stable identifier echoed back in every event payload.
|
|
263
|
+
*/
|
|
264
|
+
"recipeId": string;
|
|
265
|
+
/**
|
|
266
|
+
* Number of servings. Hidden when omitted.
|
|
267
|
+
*/
|
|
268
|
+
"servings"?: number;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* A debounced search input with a clear affordance and a slot for extra controls.
|
|
272
|
+
*/
|
|
273
|
+
interface RkSearchBar {
|
|
274
|
+
/**
|
|
275
|
+
* Milliseconds to wait after the last keystroke before emitting `rkSearch`.
|
|
276
|
+
* @default 350
|
|
277
|
+
*/
|
|
278
|
+
"debounce": number;
|
|
279
|
+
/**
|
|
280
|
+
* Disables the whole control.
|
|
281
|
+
* @default false
|
|
282
|
+
*/
|
|
283
|
+
"disabled": boolean;
|
|
284
|
+
/**
|
|
285
|
+
* Optional helper text rendered under the field.
|
|
286
|
+
*/
|
|
287
|
+
"hint"?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Accessible label for the input.
|
|
290
|
+
* @default 'Search recipes'
|
|
291
|
+
*/
|
|
292
|
+
"label": string;
|
|
293
|
+
/**
|
|
294
|
+
* Shows a busy indicator (e.g. while the app is fetching results).
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
"loading": boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Placeholder shown when the field is empty.
|
|
300
|
+
* @default 'Search recipes, ingredients, cuisines…'
|
|
301
|
+
*/
|
|
302
|
+
"placeholder": string;
|
|
303
|
+
/**
|
|
304
|
+
* Programmatically focus the input.
|
|
305
|
+
*/
|
|
306
|
+
"setFocus": () => Promise<void>;
|
|
307
|
+
/**
|
|
308
|
+
* Current text in the field. Two-way: updated as the user types.
|
|
309
|
+
* @default ''
|
|
310
|
+
*/
|
|
311
|
+
"value": string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* A single-select segmented control, used for sorting and view switching.
|
|
315
|
+
* `options` is a complex property. Frameworks should assign it as a DOM
|
|
316
|
+
* property; for plain HTML it also accepts a JSON string attribute.
|
|
317
|
+
*/
|
|
318
|
+
interface RkSegmentedControl {
|
|
319
|
+
/**
|
|
320
|
+
* Accessible label for the group.
|
|
321
|
+
* @default 'View options'
|
|
322
|
+
*/
|
|
323
|
+
"label": string;
|
|
324
|
+
/**
|
|
325
|
+
* The available segments. Accepts an array or a JSON-encoded string.
|
|
326
|
+
* @default []
|
|
327
|
+
*/
|
|
328
|
+
"options": RkSegmentOption[] | string;
|
|
329
|
+
/**
|
|
330
|
+
* Stretches the control to fill its container.
|
|
331
|
+
* @default false
|
|
332
|
+
*/
|
|
333
|
+
"stretch": boolean;
|
|
334
|
+
/**
|
|
335
|
+
* The value of the selected segment.
|
|
336
|
+
*/
|
|
337
|
+
"value"?: string;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* A tag / token editor used for recipe tags and free-form ingredient lists.
|
|
341
|
+
* `values` is an array property — the SvelteKit app assigns it as a DOM
|
|
342
|
+
* property. A JSON-encoded or comma-separated string attribute also works.
|
|
343
|
+
*/
|
|
344
|
+
interface RkTagInput {
|
|
345
|
+
/**
|
|
346
|
+
* Prevent editing.
|
|
347
|
+
* @default false
|
|
348
|
+
*/
|
|
349
|
+
"disabled": boolean;
|
|
350
|
+
/**
|
|
351
|
+
* Validation message rendered under the field.
|
|
352
|
+
*/
|
|
353
|
+
"error"?: string;
|
|
354
|
+
/**
|
|
355
|
+
* Visible field label.
|
|
356
|
+
*/
|
|
357
|
+
"label"?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Maximum number of tags. `0` means unlimited.
|
|
360
|
+
* @default 0
|
|
361
|
+
*/
|
|
362
|
+
"maxTags": number;
|
|
363
|
+
/**
|
|
364
|
+
* Placeholder for the entry field.
|
|
365
|
+
* @default 'Add a tag and press Enter'
|
|
366
|
+
*/
|
|
367
|
+
"placeholder": string;
|
|
368
|
+
/**
|
|
369
|
+
* Current tags. Array, JSON string, or comma-separated string.
|
|
370
|
+
* @default []
|
|
371
|
+
*/
|
|
372
|
+
"values": string[] | string;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
export interface RkChipCustomEvent<T> extends CustomEvent<T> {
|
|
376
|
+
detail: T;
|
|
377
|
+
target: HTMLRkChipElement;
|
|
378
|
+
}
|
|
379
|
+
export interface RkMealSlotCustomEvent<T> extends CustomEvent<T> {
|
|
380
|
+
detail: T;
|
|
381
|
+
target: HTMLRkMealSlotElement;
|
|
382
|
+
}
|
|
383
|
+
export interface RkModalCustomEvent<T> extends CustomEvent<T> {
|
|
384
|
+
detail: T;
|
|
385
|
+
target: HTMLRkModalElement;
|
|
386
|
+
}
|
|
387
|
+
export interface RkRatingCustomEvent<T> extends CustomEvent<T> {
|
|
388
|
+
detail: T;
|
|
389
|
+
target: HTMLRkRatingElement;
|
|
390
|
+
}
|
|
391
|
+
export interface RkRecipeCardCustomEvent<T> extends CustomEvent<T> {
|
|
392
|
+
detail: T;
|
|
393
|
+
target: HTMLRkRecipeCardElement;
|
|
394
|
+
}
|
|
395
|
+
export interface RkSearchBarCustomEvent<T> extends CustomEvent<T> {
|
|
396
|
+
detail: T;
|
|
397
|
+
target: HTMLRkSearchBarElement;
|
|
398
|
+
}
|
|
399
|
+
export interface RkSegmentedControlCustomEvent<T> extends CustomEvent<T> {
|
|
400
|
+
detail: T;
|
|
401
|
+
target: HTMLRkSegmentedControlElement;
|
|
402
|
+
}
|
|
403
|
+
export interface RkTagInputCustomEvent<T> extends CustomEvent<T> {
|
|
404
|
+
detail: T;
|
|
405
|
+
target: HTMLRkTagInputElement;
|
|
406
|
+
}
|
|
407
|
+
declare global {
|
|
408
|
+
/**
|
|
409
|
+
* A small, non-interactive label. Purely slot-driven so hosts can put icons,
|
|
410
|
+
* text or counts inside it.
|
|
411
|
+
*/
|
|
412
|
+
interface HTMLRkBadgeElement extends Components.RkBadge, HTMLStencilElement {
|
|
413
|
+
}
|
|
414
|
+
var HTMLRkBadgeElement: {
|
|
415
|
+
prototype: HTMLRkBadgeElement;
|
|
416
|
+
new (): HTMLRkBadgeElement;
|
|
417
|
+
};
|
|
418
|
+
interface HTMLRkChipElementEventMap {
|
|
419
|
+
"rkChipToggle": { value: string; label: string; selected: boolean };
|
|
420
|
+
"rkChipDismiss": { value: string; label: string };
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* A selectable / dismissible filter chip.
|
|
424
|
+
*/
|
|
425
|
+
interface HTMLRkChipElement extends Components.RkChip, HTMLStencilElement {
|
|
426
|
+
addEventListener<K extends keyof HTMLRkChipElementEventMap>(type: K, listener: (this: HTMLRkChipElement, ev: RkChipCustomEvent<HTMLRkChipElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
427
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
428
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
429
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
430
|
+
removeEventListener<K extends keyof HTMLRkChipElementEventMap>(type: K, listener: (this: HTMLRkChipElement, ev: RkChipCustomEvent<HTMLRkChipElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
431
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
432
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
433
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
434
|
+
}
|
|
435
|
+
var HTMLRkChipElement: {
|
|
436
|
+
prototype: HTMLRkChipElement;
|
|
437
|
+
new (): HTMLRkChipElement;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Placeholder shown when a list has no items, a search returns nothing, or a
|
|
441
|
+
* request fails.
|
|
442
|
+
*/
|
|
443
|
+
interface HTMLRkEmptyStateElement extends Components.RkEmptyState, HTMLStencilElement {
|
|
444
|
+
}
|
|
445
|
+
var HTMLRkEmptyStateElement: {
|
|
446
|
+
prototype: HTMLRkEmptyStateElement;
|
|
447
|
+
new (): HTMLRkEmptyStateElement;
|
|
448
|
+
};
|
|
449
|
+
interface HTMLRkMealSlotElementEventMap {
|
|
450
|
+
"rkMealAdd": RkMealSlotDetail;
|
|
451
|
+
"rkMealSwap": RkMealRecipeDetail;
|
|
452
|
+
"rkMealRemove": RkMealRecipeDetail;
|
|
453
|
+
"rkMealOpen": RkMealRecipeDetail;
|
|
454
|
+
"rkMealDrop": RkMealDropDetail;
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* One cell of the weekly planner grid: either an empty "add" target or a filled
|
|
458
|
+
* slot showing the planned recipe. Doubles as a drop zone for drag-and-drop
|
|
459
|
+
* planning.
|
|
460
|
+
*/
|
|
461
|
+
interface HTMLRkMealSlotElement extends Components.RkMealSlot, HTMLStencilElement {
|
|
462
|
+
addEventListener<K extends keyof HTMLRkMealSlotElementEventMap>(type: K, listener: (this: HTMLRkMealSlotElement, ev: RkMealSlotCustomEvent<HTMLRkMealSlotElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
463
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
464
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
465
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
466
|
+
removeEventListener<K extends keyof HTMLRkMealSlotElementEventMap>(type: K, listener: (this: HTMLRkMealSlotElement, ev: RkMealSlotCustomEvent<HTMLRkMealSlotElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
467
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
468
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
469
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
470
|
+
}
|
|
471
|
+
var HTMLRkMealSlotElement: {
|
|
472
|
+
prototype: HTMLRkMealSlotElement;
|
|
473
|
+
new (): HTMLRkMealSlotElement;
|
|
474
|
+
};
|
|
475
|
+
interface HTMLRkModalElementEventMap {
|
|
476
|
+
"rkModalClose": void;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* An accessible dialog with a backdrop, Escape handling and focus restoration.
|
|
480
|
+
* The component is presentational: it emits `rkModalClose` and lets the host
|
|
481
|
+
* application own the `open` state.
|
|
482
|
+
*/
|
|
483
|
+
interface HTMLRkModalElement extends Components.RkModal, HTMLStencilElement {
|
|
484
|
+
addEventListener<K extends keyof HTMLRkModalElementEventMap>(type: K, listener: (this: HTMLRkModalElement, ev: RkModalCustomEvent<HTMLRkModalElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
485
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
486
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
487
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
488
|
+
removeEventListener<K extends keyof HTMLRkModalElementEventMap>(type: K, listener: (this: HTMLRkModalElement, ev: RkModalCustomEvent<HTMLRkModalElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
489
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
490
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
491
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
492
|
+
}
|
|
493
|
+
var HTMLRkModalElement: {
|
|
494
|
+
prototype: HTMLRkModalElement;
|
|
495
|
+
new (): HTMLRkModalElement;
|
|
496
|
+
};
|
|
497
|
+
interface HTMLRkRatingElementEventMap {
|
|
498
|
+
"rkRatingChange": number;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* A star rating that works as a read-only display or an interactive input.
|
|
502
|
+
*/
|
|
503
|
+
interface HTMLRkRatingElement extends Components.RkRating, HTMLStencilElement {
|
|
504
|
+
addEventListener<K extends keyof HTMLRkRatingElementEventMap>(type: K, listener: (this: HTMLRkRatingElement, ev: RkRatingCustomEvent<HTMLRkRatingElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
505
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
506
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
507
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
508
|
+
removeEventListener<K extends keyof HTMLRkRatingElementEventMap>(type: K, listener: (this: HTMLRkRatingElement, ev: RkRatingCustomEvent<HTMLRkRatingElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
509
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
510
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
511
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
512
|
+
}
|
|
513
|
+
var HTMLRkRatingElement: {
|
|
514
|
+
prototype: HTMLRkRatingElement;
|
|
515
|
+
new (): HTMLRkRatingElement;
|
|
516
|
+
};
|
|
517
|
+
interface HTMLRkRecipeCardElementEventMap {
|
|
518
|
+
"rkCardSelect": RkRecipeCardSelectDetail;
|
|
519
|
+
"rkFavoriteToggle": RkFavoriteToggleDetail;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* The primary recipe tile used across discovery, favorites and search results.
|
|
523
|
+
* All data arrives as individual primitive properties rather than one object
|
|
524
|
+
* prop, so the component works with plain HTML attributes in any framework.
|
|
525
|
+
*/
|
|
526
|
+
interface HTMLRkRecipeCardElement extends Components.RkRecipeCard, HTMLStencilElement {
|
|
527
|
+
addEventListener<K extends keyof HTMLRkRecipeCardElementEventMap>(type: K, listener: (this: HTMLRkRecipeCardElement, ev: RkRecipeCardCustomEvent<HTMLRkRecipeCardElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
528
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
529
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
530
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
531
|
+
removeEventListener<K extends keyof HTMLRkRecipeCardElementEventMap>(type: K, listener: (this: HTMLRkRecipeCardElement, ev: RkRecipeCardCustomEvent<HTMLRkRecipeCardElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
532
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
533
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
534
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
535
|
+
}
|
|
536
|
+
var HTMLRkRecipeCardElement: {
|
|
537
|
+
prototype: HTMLRkRecipeCardElement;
|
|
538
|
+
new (): HTMLRkRecipeCardElement;
|
|
539
|
+
};
|
|
540
|
+
interface HTMLRkSearchBarElementEventMap {
|
|
541
|
+
"rkSearch": string;
|
|
542
|
+
"rkClear": void;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* A debounced search input with a clear affordance and a slot for extra controls.
|
|
546
|
+
*/
|
|
547
|
+
interface HTMLRkSearchBarElement extends Components.RkSearchBar, HTMLStencilElement {
|
|
548
|
+
addEventListener<K extends keyof HTMLRkSearchBarElementEventMap>(type: K, listener: (this: HTMLRkSearchBarElement, ev: RkSearchBarCustomEvent<HTMLRkSearchBarElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
549
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
550
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
551
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
552
|
+
removeEventListener<K extends keyof HTMLRkSearchBarElementEventMap>(type: K, listener: (this: HTMLRkSearchBarElement, ev: RkSearchBarCustomEvent<HTMLRkSearchBarElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
553
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
554
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
555
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
556
|
+
}
|
|
557
|
+
var HTMLRkSearchBarElement: {
|
|
558
|
+
prototype: HTMLRkSearchBarElement;
|
|
559
|
+
new (): HTMLRkSearchBarElement;
|
|
560
|
+
};
|
|
561
|
+
interface HTMLRkSegmentedControlElementEventMap {
|
|
562
|
+
"rkSegmentChange": string;
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* A single-select segmented control, used for sorting and view switching.
|
|
566
|
+
* `options` is a complex property. Frameworks should assign it as a DOM
|
|
567
|
+
* property; for plain HTML it also accepts a JSON string attribute.
|
|
568
|
+
*/
|
|
569
|
+
interface HTMLRkSegmentedControlElement extends Components.RkSegmentedControl, HTMLStencilElement {
|
|
570
|
+
addEventListener<K extends keyof HTMLRkSegmentedControlElementEventMap>(type: K, listener: (this: HTMLRkSegmentedControlElement, ev: RkSegmentedControlCustomEvent<HTMLRkSegmentedControlElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
571
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
572
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
573
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
574
|
+
removeEventListener<K extends keyof HTMLRkSegmentedControlElementEventMap>(type: K, listener: (this: HTMLRkSegmentedControlElement, ev: RkSegmentedControlCustomEvent<HTMLRkSegmentedControlElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
575
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
576
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
577
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
578
|
+
}
|
|
579
|
+
var HTMLRkSegmentedControlElement: {
|
|
580
|
+
prototype: HTMLRkSegmentedControlElement;
|
|
581
|
+
new (): HTMLRkSegmentedControlElement;
|
|
582
|
+
};
|
|
583
|
+
interface HTMLRkTagInputElementEventMap {
|
|
584
|
+
"rkTagsChange": string[];
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* A tag / token editor used for recipe tags and free-form ingredient lists.
|
|
588
|
+
* `values` is an array property — the SvelteKit app assigns it as a DOM
|
|
589
|
+
* property. A JSON-encoded or comma-separated string attribute also works.
|
|
590
|
+
*/
|
|
591
|
+
interface HTMLRkTagInputElement extends Components.RkTagInput, HTMLStencilElement {
|
|
592
|
+
addEventListener<K extends keyof HTMLRkTagInputElementEventMap>(type: K, listener: (this: HTMLRkTagInputElement, ev: RkTagInputCustomEvent<HTMLRkTagInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
593
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
594
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
595
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
596
|
+
removeEventListener<K extends keyof HTMLRkTagInputElementEventMap>(type: K, listener: (this: HTMLRkTagInputElement, ev: RkTagInputCustomEvent<HTMLRkTagInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
597
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
598
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
599
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
600
|
+
}
|
|
601
|
+
var HTMLRkTagInputElement: {
|
|
602
|
+
prototype: HTMLRkTagInputElement;
|
|
603
|
+
new (): HTMLRkTagInputElement;
|
|
604
|
+
};
|
|
605
|
+
interface HTMLElementTagNameMap {
|
|
606
|
+
"rk-badge": HTMLRkBadgeElement;
|
|
607
|
+
"rk-chip": HTMLRkChipElement;
|
|
608
|
+
"rk-empty-state": HTMLRkEmptyStateElement;
|
|
609
|
+
"rk-meal-slot": HTMLRkMealSlotElement;
|
|
610
|
+
"rk-modal": HTMLRkModalElement;
|
|
611
|
+
"rk-rating": HTMLRkRatingElement;
|
|
612
|
+
"rk-recipe-card": HTMLRkRecipeCardElement;
|
|
613
|
+
"rk-search-bar": HTMLRkSearchBarElement;
|
|
614
|
+
"rk-segmented-control": HTMLRkSegmentedControlElement;
|
|
615
|
+
"rk-tag-input": HTMLRkTagInputElement;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
declare namespace LocalJSX {
|
|
619
|
+
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K]?: never };
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* A small, non-interactive label. Purely slot-driven so hosts can put icons,
|
|
623
|
+
* text or counts inside it.
|
|
624
|
+
*/
|
|
625
|
+
interface RkBadge {
|
|
626
|
+
/**
|
|
627
|
+
* Compact sizing for dense layouts.
|
|
628
|
+
* @default false
|
|
629
|
+
*/
|
|
630
|
+
"small"?: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Color treatment.
|
|
633
|
+
* @default 'neutral'
|
|
634
|
+
*/
|
|
635
|
+
"tone"?: 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';
|
|
636
|
+
/**
|
|
637
|
+
* `soft` is tinted, `solid` is filled, `outline` is bordered only.
|
|
638
|
+
* @default 'soft'
|
|
639
|
+
*/
|
|
640
|
+
"variant"?: 'soft' | 'solid' | 'outline';
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* A selectable / dismissible filter chip.
|
|
644
|
+
*/
|
|
645
|
+
interface RkChip {
|
|
646
|
+
/**
|
|
647
|
+
* Optional trailing count badge (e.g. number of matching recipes).
|
|
648
|
+
*/
|
|
649
|
+
"count"?: number;
|
|
650
|
+
/**
|
|
651
|
+
* Disables interaction.
|
|
652
|
+
* @default false
|
|
653
|
+
*/
|
|
654
|
+
"disabled"?: boolean;
|
|
655
|
+
/**
|
|
656
|
+
* Renders an "x" button that emits `rkChipDismiss` instead of toggling.
|
|
657
|
+
* @default false
|
|
658
|
+
*/
|
|
659
|
+
"dismissible"?: boolean;
|
|
660
|
+
/**
|
|
661
|
+
* Visible text.
|
|
662
|
+
* @default ''
|
|
663
|
+
*/
|
|
664
|
+
"label"?: string;
|
|
665
|
+
/**
|
|
666
|
+
* Emitted when a dismissible chip's remove button is pressed.
|
|
667
|
+
*/
|
|
668
|
+
"onRkChipDismiss"?: (event: RkChipCustomEvent<{ value: string; label: string }>) => void;
|
|
669
|
+
/**
|
|
670
|
+
* Emitted when the chip is toggled.
|
|
671
|
+
*/
|
|
672
|
+
"onRkChipToggle"?: (event: RkChipCustomEvent<{ value: string; label: string; selected: boolean }>) => void;
|
|
673
|
+
/**
|
|
674
|
+
* Whether the chip is currently active.
|
|
675
|
+
* @default false
|
|
676
|
+
*/
|
|
677
|
+
"selected"?: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* Visual treatment.
|
|
680
|
+
* @default 'neutral'
|
|
681
|
+
*/
|
|
682
|
+
"tone"?: 'neutral' | 'primary' | 'accent';
|
|
683
|
+
/**
|
|
684
|
+
* Value reported back to the host application in event payloads.
|
|
685
|
+
*/
|
|
686
|
+
"value"?: string;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Placeholder shown when a list has no items, a search returns nothing, or a
|
|
690
|
+
* request fails.
|
|
691
|
+
*/
|
|
692
|
+
interface RkEmptyState {
|
|
693
|
+
/**
|
|
694
|
+
* Removes the dashed border and reduces padding, for inline use.
|
|
695
|
+
* @default false
|
|
696
|
+
*/
|
|
697
|
+
"bare"?: boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Bold headline.
|
|
700
|
+
* @default 'Nothing here yet'
|
|
701
|
+
*/
|
|
702
|
+
"heading"?: string;
|
|
703
|
+
/**
|
|
704
|
+
* Emoji or short glyph shown above the heading.
|
|
705
|
+
* @default '🍳'
|
|
706
|
+
*/
|
|
707
|
+
"icon"?: string;
|
|
708
|
+
/**
|
|
709
|
+
* Supporting sentence.
|
|
710
|
+
*/
|
|
711
|
+
"message"?: string;
|
|
712
|
+
/**
|
|
713
|
+
* `error` swaps to a warning treatment.
|
|
714
|
+
* @default 'neutral'
|
|
715
|
+
*/
|
|
716
|
+
"tone"?: 'neutral' | 'error';
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* One cell of the weekly planner grid: either an empty "add" target or a filled
|
|
720
|
+
* slot showing the planned recipe. Doubles as a drop zone for drag-and-drop
|
|
721
|
+
* planning.
|
|
722
|
+
*/
|
|
723
|
+
interface RkMealSlot {
|
|
724
|
+
/**
|
|
725
|
+
* Day key this slot belongs to, e.g. `monday`. Echoed in event payloads.
|
|
726
|
+
*/
|
|
727
|
+
"day": string;
|
|
728
|
+
/**
|
|
729
|
+
* Disables interaction.
|
|
730
|
+
* @default false
|
|
731
|
+
*/
|
|
732
|
+
"disabled"?: boolean;
|
|
733
|
+
/**
|
|
734
|
+
* Human-readable meal label shown as the slot caption.
|
|
735
|
+
*/
|
|
736
|
+
"mealLabel"?: string;
|
|
737
|
+
/**
|
|
738
|
+
* Meal type key, e.g. `breakfast`. Echoed in event payloads.
|
|
739
|
+
*/
|
|
740
|
+
"mealType": string;
|
|
741
|
+
/**
|
|
742
|
+
* Emitted when an empty slot is activated — the host opens a recipe picker.
|
|
743
|
+
*/
|
|
744
|
+
"onRkMealAdd"?: (event: RkMealSlotCustomEvent<RkMealSlotDetail>) => void;
|
|
745
|
+
/**
|
|
746
|
+
* Emitted when a recipe is dropped onto this slot.
|
|
747
|
+
*/
|
|
748
|
+
"onRkMealDrop"?: (event: RkMealSlotCustomEvent<RkMealDropDetail>) => void;
|
|
749
|
+
/**
|
|
750
|
+
* Emitted when the planned recipe is activated — the host navigates.
|
|
751
|
+
*/
|
|
752
|
+
"onRkMealOpen"?: (event: RkMealSlotCustomEvent<RkMealRecipeDetail>) => void;
|
|
753
|
+
/**
|
|
754
|
+
* Emitted when the planned recipe should be cleared.
|
|
755
|
+
*/
|
|
756
|
+
"onRkMealRemove"?: (event: RkMealSlotCustomEvent<RkMealRecipeDetail>) => void;
|
|
757
|
+
/**
|
|
758
|
+
* Emitted when the planned recipe should be replaced.
|
|
759
|
+
*/
|
|
760
|
+
"onRkMealSwap"?: (event: RkMealSlotCustomEvent<RkMealRecipeDetail>) => void;
|
|
761
|
+
/**
|
|
762
|
+
* Id of the planned recipe. Empty means the slot is free.
|
|
763
|
+
*/
|
|
764
|
+
"recipeId"?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Thumbnail of the planned recipe.
|
|
767
|
+
*/
|
|
768
|
+
"recipeImage"?: string;
|
|
769
|
+
/**
|
|
770
|
+
* Title of the planned recipe.
|
|
771
|
+
*/
|
|
772
|
+
"recipeName"?: string;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* An accessible dialog with a backdrop, Escape handling and focus restoration.
|
|
776
|
+
* The component is presentational: it emits `rkModalClose` and lets the host
|
|
777
|
+
* application own the `open` state.
|
|
778
|
+
*/
|
|
779
|
+
interface RkModal {
|
|
780
|
+
/**
|
|
781
|
+
* Set to false to require an explicit action to dismiss.
|
|
782
|
+
* @default true
|
|
783
|
+
*/
|
|
784
|
+
"dismissible"?: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* Heading text for the default header.
|
|
787
|
+
* @default ''
|
|
788
|
+
*/
|
|
789
|
+
"heading"?: string;
|
|
790
|
+
/**
|
|
791
|
+
* Emitted when the user requests dismissal (X, backdrop or Escape).
|
|
792
|
+
*/
|
|
793
|
+
"onRkModalClose"?: (event: RkModalCustomEvent<void>) => void;
|
|
794
|
+
/**
|
|
795
|
+
* Controls visibility.
|
|
796
|
+
* @default false
|
|
797
|
+
*/
|
|
798
|
+
"open"?: boolean;
|
|
799
|
+
/**
|
|
800
|
+
* Dialog width preset.
|
|
801
|
+
* @default 'md'
|
|
802
|
+
*/
|
|
803
|
+
"size"?: 'sm' | 'md' | 'lg';
|
|
804
|
+
/**
|
|
805
|
+
* Optional supporting line under the heading.
|
|
806
|
+
*/
|
|
807
|
+
"subheading"?: string;
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
* A star rating that works as a read-only display or an interactive input.
|
|
811
|
+
*/
|
|
812
|
+
interface RkRating {
|
|
813
|
+
/**
|
|
814
|
+
* Optional count of ratings, rendered as "(24)".
|
|
815
|
+
*/
|
|
816
|
+
"count"?: number;
|
|
817
|
+
/**
|
|
818
|
+
* Accessible label for the group.
|
|
819
|
+
* @default 'Rating'
|
|
820
|
+
*/
|
|
821
|
+
"label"?: string;
|
|
822
|
+
/**
|
|
823
|
+
* Number of stars.
|
|
824
|
+
* @default 5
|
|
825
|
+
*/
|
|
826
|
+
"max"?: number;
|
|
827
|
+
/**
|
|
828
|
+
* Emitted when the user picks a new rating.
|
|
829
|
+
*/
|
|
830
|
+
"onRkRatingChange"?: (event: RkRatingCustomEvent<number>) => void;
|
|
831
|
+
/**
|
|
832
|
+
* When true the stars are display-only and not focusable.
|
|
833
|
+
* @default false
|
|
834
|
+
*/
|
|
835
|
+
"readonly"?: boolean;
|
|
836
|
+
/**
|
|
837
|
+
* Renders the numeric value next to the stars.
|
|
838
|
+
* @default false
|
|
839
|
+
*/
|
|
840
|
+
"showValue"?: boolean;
|
|
841
|
+
/**
|
|
842
|
+
* Star size in pixels.
|
|
843
|
+
* @default 18
|
|
844
|
+
*/
|
|
845
|
+
"size"?: number;
|
|
846
|
+
/**
|
|
847
|
+
* Current rating. Supports halves when `readonly`.
|
|
848
|
+
* @default 0
|
|
849
|
+
*/
|
|
850
|
+
"value"?: number;
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* The primary recipe tile used across discovery, favorites and search results.
|
|
854
|
+
* All data arrives as individual primitive properties rather than one object
|
|
855
|
+
* prop, so the component works with plain HTML attributes in any framework.
|
|
856
|
+
*/
|
|
857
|
+
interface RkRecipeCard {
|
|
858
|
+
/**
|
|
859
|
+
* Cuisine / region, e.g. "Italian".
|
|
860
|
+
*/
|
|
861
|
+
"area"?: string;
|
|
862
|
+
/**
|
|
863
|
+
* Category, e.g. "Dessert".
|
|
864
|
+
*/
|
|
865
|
+
"category"?: string;
|
|
866
|
+
/**
|
|
867
|
+
* Renders a compact horizontal layout, for dense lists and the planner.
|
|
868
|
+
* @default false
|
|
869
|
+
*/
|
|
870
|
+
"compact"?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* Whether this recipe is currently favorited.
|
|
873
|
+
* @default false
|
|
874
|
+
*/
|
|
875
|
+
"favorite"?: boolean;
|
|
876
|
+
/**
|
|
877
|
+
* Hides the favorite button entirely (e.g. inside the planner).
|
|
878
|
+
* @default false
|
|
879
|
+
*/
|
|
880
|
+
"hideFavorite"?: boolean;
|
|
881
|
+
/**
|
|
882
|
+
* Real href used for accessibility, SEO and middle-click / open-in-new-tab.
|
|
883
|
+
*/
|
|
884
|
+
"href"?: string;
|
|
885
|
+
/**
|
|
886
|
+
* Thumbnail URL.
|
|
887
|
+
*/
|
|
888
|
+
"image"?: string;
|
|
889
|
+
/**
|
|
890
|
+
* Total time in minutes. Hidden when omitted.
|
|
891
|
+
*/
|
|
892
|
+
"minutes"?: number;
|
|
893
|
+
/**
|
|
894
|
+
* Recipe title.
|
|
895
|
+
* @default ''
|
|
896
|
+
*/
|
|
897
|
+
"name"?: string;
|
|
898
|
+
/**
|
|
899
|
+
* Emitted on primary activation. The host app performs the navigation.
|
|
900
|
+
*/
|
|
901
|
+
"onRkCardSelect"?: (event: RkRecipeCardCustomEvent<RkRecipeCardSelectDetail>) => void;
|
|
902
|
+
/**
|
|
903
|
+
* Emitted when the favorite button is pressed.
|
|
904
|
+
*/
|
|
905
|
+
"onRkFavoriteToggle"?: (event: RkRecipeCardCustomEvent<RkFavoriteToggleDetail>) => void;
|
|
906
|
+
/**
|
|
907
|
+
* `custom` recipes are user-authored and get an "Owned" badge.
|
|
908
|
+
* @default 'api'
|
|
909
|
+
*/
|
|
910
|
+
"origin"?: 'api' | 'custom';
|
|
911
|
+
/**
|
|
912
|
+
* Stable identifier echoed back in every event payload.
|
|
913
|
+
*/
|
|
914
|
+
"recipeId": string;
|
|
915
|
+
/**
|
|
916
|
+
* Number of servings. Hidden when omitted.
|
|
917
|
+
*/
|
|
918
|
+
"servings"?: number;
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* A debounced search input with a clear affordance and a slot for extra controls.
|
|
922
|
+
*/
|
|
923
|
+
interface RkSearchBar {
|
|
924
|
+
/**
|
|
925
|
+
* Milliseconds to wait after the last keystroke before emitting `rkSearch`.
|
|
926
|
+
* @default 350
|
|
927
|
+
*/
|
|
928
|
+
"debounce"?: number;
|
|
929
|
+
/**
|
|
930
|
+
* Disables the whole control.
|
|
931
|
+
* @default false
|
|
932
|
+
*/
|
|
933
|
+
"disabled"?: boolean;
|
|
934
|
+
/**
|
|
935
|
+
* Optional helper text rendered under the field.
|
|
936
|
+
*/
|
|
937
|
+
"hint"?: string;
|
|
938
|
+
/**
|
|
939
|
+
* Accessible label for the input.
|
|
940
|
+
* @default 'Search recipes'
|
|
941
|
+
*/
|
|
942
|
+
"label"?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Shows a busy indicator (e.g. while the app is fetching results).
|
|
945
|
+
* @default false
|
|
946
|
+
*/
|
|
947
|
+
"loading"?: boolean;
|
|
948
|
+
/**
|
|
949
|
+
* Emitted when the user clears the field with the clear button or Escape.
|
|
950
|
+
*/
|
|
951
|
+
"onRkClear"?: (event: RkSearchBarCustomEvent<void>) => void;
|
|
952
|
+
/**
|
|
953
|
+
* Emitted with the (trimmed) query after the debounce window, or on submit.
|
|
954
|
+
*/
|
|
955
|
+
"onRkSearch"?: (event: RkSearchBarCustomEvent<string>) => void;
|
|
956
|
+
/**
|
|
957
|
+
* Placeholder shown when the field is empty.
|
|
958
|
+
* @default 'Search recipes, ingredients, cuisines…'
|
|
959
|
+
*/
|
|
960
|
+
"placeholder"?: string;
|
|
961
|
+
/**
|
|
962
|
+
* Current text in the field. Two-way: updated as the user types.
|
|
963
|
+
* @default ''
|
|
964
|
+
*/
|
|
965
|
+
"value"?: string;
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* A single-select segmented control, used for sorting and view switching.
|
|
969
|
+
* `options` is a complex property. Frameworks should assign it as a DOM
|
|
970
|
+
* property; for plain HTML it also accepts a JSON string attribute.
|
|
971
|
+
*/
|
|
972
|
+
interface RkSegmentedControl {
|
|
973
|
+
/**
|
|
974
|
+
* Accessible label for the group.
|
|
975
|
+
* @default 'View options'
|
|
976
|
+
*/
|
|
977
|
+
"label"?: string;
|
|
978
|
+
/**
|
|
979
|
+
* Emitted with the newly selected value.
|
|
980
|
+
*/
|
|
981
|
+
"onRkSegmentChange"?: (event: RkSegmentedControlCustomEvent<string>) => void;
|
|
982
|
+
/**
|
|
983
|
+
* The available segments. Accepts an array or a JSON-encoded string.
|
|
984
|
+
* @default []
|
|
985
|
+
*/
|
|
986
|
+
"options"?: RkSegmentOption[] | string;
|
|
987
|
+
/**
|
|
988
|
+
* Stretches the control to fill its container.
|
|
989
|
+
* @default false
|
|
990
|
+
*/
|
|
991
|
+
"stretch"?: boolean;
|
|
992
|
+
/**
|
|
993
|
+
* The value of the selected segment.
|
|
994
|
+
*/
|
|
995
|
+
"value"?: string;
|
|
996
|
+
}
|
|
997
|
+
/**
|
|
998
|
+
* A tag / token editor used for recipe tags and free-form ingredient lists.
|
|
999
|
+
* `values` is an array property — the SvelteKit app assigns it as a DOM
|
|
1000
|
+
* property. A JSON-encoded or comma-separated string attribute also works.
|
|
1001
|
+
*/
|
|
1002
|
+
interface RkTagInput {
|
|
1003
|
+
/**
|
|
1004
|
+
* Prevent editing.
|
|
1005
|
+
* @default false
|
|
1006
|
+
*/
|
|
1007
|
+
"disabled"?: boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
* Validation message rendered under the field.
|
|
1010
|
+
*/
|
|
1011
|
+
"error"?: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* Visible field label.
|
|
1014
|
+
*/
|
|
1015
|
+
"label"?: string;
|
|
1016
|
+
/**
|
|
1017
|
+
* Maximum number of tags. `0` means unlimited.
|
|
1018
|
+
* @default 0
|
|
1019
|
+
*/
|
|
1020
|
+
"maxTags"?: number;
|
|
1021
|
+
/**
|
|
1022
|
+
* Emitted with the full, updated list whenever tags change.
|
|
1023
|
+
*/
|
|
1024
|
+
"onRkTagsChange"?: (event: RkTagInputCustomEvent<string[]>) => void;
|
|
1025
|
+
/**
|
|
1026
|
+
* Placeholder for the entry field.
|
|
1027
|
+
* @default 'Add a tag and press Enter'
|
|
1028
|
+
*/
|
|
1029
|
+
"placeholder"?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* Current tags. Array, JSON string, or comma-separated string.
|
|
1032
|
+
* @default []
|
|
1033
|
+
*/
|
|
1034
|
+
"values"?: string[] | string;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
interface RkBadgeAttributes {
|
|
1038
|
+
"tone": 'neutral' | 'primary' | 'accent' | 'success' | 'warning' | 'danger';
|
|
1039
|
+
"variant": 'soft' | 'solid' | 'outline';
|
|
1040
|
+
"small": boolean;
|
|
1041
|
+
}
|
|
1042
|
+
interface RkChipAttributes {
|
|
1043
|
+
"label": string;
|
|
1044
|
+
"value": string;
|
|
1045
|
+
"selected": boolean;
|
|
1046
|
+
"count": number;
|
|
1047
|
+
"dismissible": boolean;
|
|
1048
|
+
"disabled": boolean;
|
|
1049
|
+
"tone": 'neutral' | 'primary' | 'accent';
|
|
1050
|
+
}
|
|
1051
|
+
interface RkEmptyStateAttributes {
|
|
1052
|
+
"icon": string;
|
|
1053
|
+
"heading": string;
|
|
1054
|
+
"message": string;
|
|
1055
|
+
"tone": 'neutral' | 'error';
|
|
1056
|
+
"bare": boolean;
|
|
1057
|
+
}
|
|
1058
|
+
interface RkMealSlotAttributes {
|
|
1059
|
+
"day": string;
|
|
1060
|
+
"mealType": string;
|
|
1061
|
+
"mealLabel": string;
|
|
1062
|
+
"recipeId": string;
|
|
1063
|
+
"recipeName": string;
|
|
1064
|
+
"recipeImage": string;
|
|
1065
|
+
"disabled": boolean;
|
|
1066
|
+
}
|
|
1067
|
+
interface RkModalAttributes {
|
|
1068
|
+
"open": boolean;
|
|
1069
|
+
"heading": string;
|
|
1070
|
+
"subheading": string;
|
|
1071
|
+
"size": 'sm' | 'md' | 'lg';
|
|
1072
|
+
"dismissible": boolean;
|
|
1073
|
+
}
|
|
1074
|
+
interface RkRatingAttributes {
|
|
1075
|
+
"value": number;
|
|
1076
|
+
"max": number;
|
|
1077
|
+
"readonly": boolean;
|
|
1078
|
+
"size": number;
|
|
1079
|
+
"label": string;
|
|
1080
|
+
"showValue": boolean;
|
|
1081
|
+
"count": number;
|
|
1082
|
+
}
|
|
1083
|
+
interface RkRecipeCardAttributes {
|
|
1084
|
+
"recipeId": string;
|
|
1085
|
+
"name": string;
|
|
1086
|
+
"image": string;
|
|
1087
|
+
"category": string;
|
|
1088
|
+
"area": string;
|
|
1089
|
+
"minutes": number;
|
|
1090
|
+
"servings": number;
|
|
1091
|
+
"favorite": boolean;
|
|
1092
|
+
"origin": 'api' | 'custom';
|
|
1093
|
+
"href": string;
|
|
1094
|
+
"compact": boolean;
|
|
1095
|
+
"hideFavorite": boolean;
|
|
1096
|
+
}
|
|
1097
|
+
interface RkSearchBarAttributes {
|
|
1098
|
+
"value": string;
|
|
1099
|
+
"placeholder": string;
|
|
1100
|
+
"label": string;
|
|
1101
|
+
"debounce": number;
|
|
1102
|
+
"disabled": boolean;
|
|
1103
|
+
"loading": boolean;
|
|
1104
|
+
"hint": string;
|
|
1105
|
+
}
|
|
1106
|
+
interface RkSegmentedControlAttributes {
|
|
1107
|
+
"options": RkSegmentOption[] | string;
|
|
1108
|
+
"value": string;
|
|
1109
|
+
"label": string;
|
|
1110
|
+
"stretch": boolean;
|
|
1111
|
+
}
|
|
1112
|
+
interface RkTagInputAttributes {
|
|
1113
|
+
"values": string[] | string;
|
|
1114
|
+
"placeholder": string;
|
|
1115
|
+
"label": string;
|
|
1116
|
+
"maxTags": number;
|
|
1117
|
+
"disabled": boolean;
|
|
1118
|
+
"error": string;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
interface IntrinsicElements {
|
|
1122
|
+
"rk-badge": Omit<RkBadge, keyof RkBadgeAttributes> & { [K in keyof RkBadge & keyof RkBadgeAttributes]?: RkBadge[K] } & { [K in keyof RkBadge & keyof RkBadgeAttributes as `attr:${K}`]?: RkBadgeAttributes[K] } & { [K in keyof RkBadge & keyof RkBadgeAttributes as `prop:${K}`]?: RkBadge[K] };
|
|
1123
|
+
"rk-chip": Omit<RkChip, keyof RkChipAttributes> & { [K in keyof RkChip & keyof RkChipAttributes]?: RkChip[K] } & { [K in keyof RkChip & keyof RkChipAttributes as `attr:${K}`]?: RkChipAttributes[K] } & { [K in keyof RkChip & keyof RkChipAttributes as `prop:${K}`]?: RkChip[K] };
|
|
1124
|
+
"rk-empty-state": Omit<RkEmptyState, keyof RkEmptyStateAttributes> & { [K in keyof RkEmptyState & keyof RkEmptyStateAttributes]?: RkEmptyState[K] } & { [K in keyof RkEmptyState & keyof RkEmptyStateAttributes as `attr:${K}`]?: RkEmptyStateAttributes[K] } & { [K in keyof RkEmptyState & keyof RkEmptyStateAttributes as `prop:${K}`]?: RkEmptyState[K] };
|
|
1125
|
+
"rk-meal-slot": Omit<RkMealSlot, keyof RkMealSlotAttributes> & { [K in keyof RkMealSlot & keyof RkMealSlotAttributes]?: RkMealSlot[K] } & { [K in keyof RkMealSlot & keyof RkMealSlotAttributes as `attr:${K}`]?: RkMealSlotAttributes[K] } & { [K in keyof RkMealSlot & keyof RkMealSlotAttributes as `prop:${K}`]?: RkMealSlot[K] } & OneOf<"day", RkMealSlot["day"], RkMealSlotAttributes["day"]> & OneOf<"mealType", RkMealSlot["mealType"], RkMealSlotAttributes["mealType"]>;
|
|
1126
|
+
"rk-modal": Omit<RkModal, keyof RkModalAttributes> & { [K in keyof RkModal & keyof RkModalAttributes]?: RkModal[K] } & { [K in keyof RkModal & keyof RkModalAttributes as `attr:${K}`]?: RkModalAttributes[K] } & { [K in keyof RkModal & keyof RkModalAttributes as `prop:${K}`]?: RkModal[K] };
|
|
1127
|
+
"rk-rating": Omit<RkRating, keyof RkRatingAttributes> & { [K in keyof RkRating & keyof RkRatingAttributes]?: RkRating[K] } & { [K in keyof RkRating & keyof RkRatingAttributes as `attr:${K}`]?: RkRatingAttributes[K] } & { [K in keyof RkRating & keyof RkRatingAttributes as `prop:${K}`]?: RkRating[K] };
|
|
1128
|
+
"rk-recipe-card": Omit<RkRecipeCard, keyof RkRecipeCardAttributes> & { [K in keyof RkRecipeCard & keyof RkRecipeCardAttributes]?: RkRecipeCard[K] } & { [K in keyof RkRecipeCard & keyof RkRecipeCardAttributes as `attr:${K}`]?: RkRecipeCardAttributes[K] } & { [K in keyof RkRecipeCard & keyof RkRecipeCardAttributes as `prop:${K}`]?: RkRecipeCard[K] } & OneOf<"recipeId", RkRecipeCard["recipeId"], RkRecipeCardAttributes["recipeId"]>;
|
|
1129
|
+
"rk-search-bar": Omit<RkSearchBar, keyof RkSearchBarAttributes> & { [K in keyof RkSearchBar & keyof RkSearchBarAttributes]?: RkSearchBar[K] } & { [K in keyof RkSearchBar & keyof RkSearchBarAttributes as `attr:${K}`]?: RkSearchBarAttributes[K] } & { [K in keyof RkSearchBar & keyof RkSearchBarAttributes as `prop:${K}`]?: RkSearchBar[K] };
|
|
1130
|
+
"rk-segmented-control": Omit<RkSegmentedControl, keyof RkSegmentedControlAttributes> & { [K in keyof RkSegmentedControl & keyof RkSegmentedControlAttributes]?: RkSegmentedControl[K] } & { [K in keyof RkSegmentedControl & keyof RkSegmentedControlAttributes as `attr:${K}`]?: RkSegmentedControlAttributes[K] } & { [K in keyof RkSegmentedControl & keyof RkSegmentedControlAttributes as `prop:${K}`]?: RkSegmentedControl[K] };
|
|
1131
|
+
"rk-tag-input": Omit<RkTagInput, keyof RkTagInputAttributes> & { [K in keyof RkTagInput & keyof RkTagInputAttributes]?: RkTagInput[K] } & { [K in keyof RkTagInput & keyof RkTagInputAttributes as `attr:${K}`]?: RkTagInputAttributes[K] } & { [K in keyof RkTagInput & keyof RkTagInputAttributes as `prop:${K}`]?: RkTagInput[K] };
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
export { LocalJSX as JSX };
|
|
1135
|
+
declare module "@stencil/core" {
|
|
1136
|
+
export namespace JSX {
|
|
1137
|
+
interface IntrinsicElements {
|
|
1138
|
+
/**
|
|
1139
|
+
* A small, non-interactive label. Purely slot-driven so hosts can put icons,
|
|
1140
|
+
* text or counts inside it.
|
|
1141
|
+
*/
|
|
1142
|
+
"rk-badge": LocalJSX.IntrinsicElements["rk-badge"] & JSXBase.HTMLAttributes<HTMLRkBadgeElement>;
|
|
1143
|
+
/**
|
|
1144
|
+
* A selectable / dismissible filter chip.
|
|
1145
|
+
*/
|
|
1146
|
+
"rk-chip": LocalJSX.IntrinsicElements["rk-chip"] & JSXBase.HTMLAttributes<HTMLRkChipElement>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Placeholder shown when a list has no items, a search returns nothing, or a
|
|
1149
|
+
* request fails.
|
|
1150
|
+
*/
|
|
1151
|
+
"rk-empty-state": LocalJSX.IntrinsicElements["rk-empty-state"] & JSXBase.HTMLAttributes<HTMLRkEmptyStateElement>;
|
|
1152
|
+
/**
|
|
1153
|
+
* One cell of the weekly planner grid: either an empty "add" target or a filled
|
|
1154
|
+
* slot showing the planned recipe. Doubles as a drop zone for drag-and-drop
|
|
1155
|
+
* planning.
|
|
1156
|
+
*/
|
|
1157
|
+
"rk-meal-slot": LocalJSX.IntrinsicElements["rk-meal-slot"] & JSXBase.HTMLAttributes<HTMLRkMealSlotElement>;
|
|
1158
|
+
/**
|
|
1159
|
+
* An accessible dialog with a backdrop, Escape handling and focus restoration.
|
|
1160
|
+
* The component is presentational: it emits `rkModalClose` and lets the host
|
|
1161
|
+
* application own the `open` state.
|
|
1162
|
+
*/
|
|
1163
|
+
"rk-modal": LocalJSX.IntrinsicElements["rk-modal"] & JSXBase.HTMLAttributes<HTMLRkModalElement>;
|
|
1164
|
+
/**
|
|
1165
|
+
* A star rating that works as a read-only display or an interactive input.
|
|
1166
|
+
*/
|
|
1167
|
+
"rk-rating": LocalJSX.IntrinsicElements["rk-rating"] & JSXBase.HTMLAttributes<HTMLRkRatingElement>;
|
|
1168
|
+
/**
|
|
1169
|
+
* The primary recipe tile used across discovery, favorites and search results.
|
|
1170
|
+
* All data arrives as individual primitive properties rather than one object
|
|
1171
|
+
* prop, so the component works with plain HTML attributes in any framework.
|
|
1172
|
+
*/
|
|
1173
|
+
"rk-recipe-card": LocalJSX.IntrinsicElements["rk-recipe-card"] & JSXBase.HTMLAttributes<HTMLRkRecipeCardElement>;
|
|
1174
|
+
/**
|
|
1175
|
+
* A debounced search input with a clear affordance and a slot for extra controls.
|
|
1176
|
+
*/
|
|
1177
|
+
"rk-search-bar": LocalJSX.IntrinsicElements["rk-search-bar"] & JSXBase.HTMLAttributes<HTMLRkSearchBarElement>;
|
|
1178
|
+
/**
|
|
1179
|
+
* A single-select segmented control, used for sorting and view switching.
|
|
1180
|
+
* `options` is a complex property. Frameworks should assign it as a DOM
|
|
1181
|
+
* property; for plain HTML it also accepts a JSON string attribute.
|
|
1182
|
+
*/
|
|
1183
|
+
"rk-segmented-control": LocalJSX.IntrinsicElements["rk-segmented-control"] & JSXBase.HTMLAttributes<HTMLRkSegmentedControlElement>;
|
|
1184
|
+
/**
|
|
1185
|
+
* A tag / token editor used for recipe tags and free-form ingredient lists.
|
|
1186
|
+
* `values` is an array property — the SvelteKit app assigns it as a DOM
|
|
1187
|
+
* property. A JSON-encoded or comma-separated string attribute also works.
|
|
1188
|
+
*/
|
|
1189
|
+
"rk-tag-input": LocalJSX.IntrinsicElements["rk-tag-input"] & JSXBase.HTMLAttributes<HTMLRkTagInputElement>;
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|