veleta-templates 0.0.21 → 0.0.22
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/types/types/interfaces.d.ts +1 -0
- package/dist/veleta-templates/index-DwwvSqLV.js +4582 -0
- package/dist/veleta-templates/index.esm.js +1 -0
- package/dist/{esm → veleta-templates}/veleta-default-template.entry.js +64 -4
- package/dist/{esm → veleta-templates}/veleta-menu-tabs.entry.js +3 -3
- package/dist/veleta-templates/veleta-templates.css +8 -1
- package/dist/veleta-templates/veleta-templates.esm.js +47 -1
- package/package.json +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/index-DuBg4oOk.js +0 -1496
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -13
- package/dist/cjs/veleta-default-template.cjs.entry.js +0 -155
- package/dist/cjs/veleta-menu-tabs.cjs.entry.js +0 -48
- package/dist/cjs/veleta-templates.cjs.js +0 -25
- package/dist/collection/collection-manifest.json +0 -14
- package/dist/collection/components/default-template/components/menu-tabs/menu-tabs.css +0 -68
- package/dist/collection/components/default-template/components/menu-tabs/menu-tabs.js +0 -110
- package/dist/collection/components/default-template/default-template.css +0 -213
- package/dist/collection/components/default-template/default-template.js +0 -183
- package/dist/collection/components.js +0 -2
- package/dist/collection/index.js +0 -1
- package/dist/collection/types/index.js +0 -1
- package/dist/collection/types/interfaces.js +0 -1
- package/dist/collection/utils/data-helpers.js +0 -7
- package/dist/collection/utils/prop-parser.js +0 -81
- package/dist/components/index.js +0 -1
- package/dist/components/p-Bn5G3Oo7.js +0 -1
- package/dist/components/veleta-default-template.js +0 -1
- package/dist/components/veleta-menu-tabs.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/index-fw0ZKjNE.js +0 -1470
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -11
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/veleta-templates.js +0 -21
- package/dist/esm-es5/app-globals-DQuL1Twl.js +0 -1
- package/dist/esm-es5/index-fw0ZKjNE.js +0 -1
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +0 -1
- package/dist/esm-es5/veleta-default-template.entry.js +0 -1
- package/dist/esm-es5/veleta-menu-tabs.entry.js +0 -1
- package/dist/esm-es5/veleta-templates.js +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/veleta-templates/p-1ef4fdaa.system.entry.js +0 -1
- package/dist/veleta-templates/p-24ad7b94.entry.js +0 -1
- package/dist/veleta-templates/p-31ab2ac4.entry.js +0 -1
- package/dist/veleta-templates/p-8bcdfedb.system.entry.js +0 -1
- package/dist/veleta-templates/p-BPEIAwuB.system.js +0 -2
- package/dist/veleta-templates/p-BbPAtVJG.system.js +0 -1
- package/dist/veleta-templates/p-BbeGEl3Z.system.js +0 -1
- package/dist/veleta-templates/p-DQuL1Twl.js +0 -1
- package/dist/veleta-templates/p-YWpyar7R.system.js +0 -1
- package/dist/veleta-templates/p-fw0ZKjNE.js +0 -2
- package/dist/veleta-templates/veleta-templates.js +0 -127
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { parseMenu } from "../../utils/prop-parser";
|
|
3
|
-
import { formatPrice } from "../../utils/data-helpers";
|
|
4
|
-
export class DefaultTemplate {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.expandedDishes = {};
|
|
7
|
-
this.activeSectionId = '';
|
|
8
|
-
this.sectionVisibility = new Map();
|
|
9
|
-
this.isScrollingByTab = false;
|
|
10
|
-
this.toggleDish = (id) => {
|
|
11
|
-
this.expandedDishes = Object.assign(Object.assign({}, this.expandedDishes), { [id]: !this.expandedDishes[id] });
|
|
12
|
-
};
|
|
13
|
-
this.handleTabClick = (sectionId) => {
|
|
14
|
-
const sectionEl = this.el.querySelector(`#section-${sectionId}`);
|
|
15
|
-
if (sectionEl) {
|
|
16
|
-
this.isScrollingByTab = true;
|
|
17
|
-
this.activeSectionId = sectionId; // Force active state on click
|
|
18
|
-
const headerOffset = 95; // Account for sticky tabs and observer threshold
|
|
19
|
-
const elementPosition = sectionEl.getBoundingClientRect().top;
|
|
20
|
-
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
|
|
21
|
-
window.scrollTo({
|
|
22
|
-
top: offsetPosition,
|
|
23
|
-
behavior: 'smooth',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
this.handleScroll = () => {
|
|
28
|
-
if (this.isScrollingByTab) {
|
|
29
|
-
clearTimeout(this.scrollTimeout);
|
|
30
|
-
this.scrollTimeout = setTimeout(() => {
|
|
31
|
-
this.isScrollingByTab = false;
|
|
32
|
-
this.updateActiveSection();
|
|
33
|
-
}, 150);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
this.updateActiveSection();
|
|
37
|
-
};
|
|
38
|
-
this.updateActiveSection = () => {
|
|
39
|
-
if (this.isScrollingByTab)
|
|
40
|
-
return;
|
|
41
|
-
const sections = Array.from(this.el.querySelectorAll('.menu-section'));
|
|
42
|
-
if (sections.length === 0)
|
|
43
|
-
return;
|
|
44
|
-
const isBottom = window.innerHeight + window.pageYOffset >=
|
|
45
|
-
document.documentElement.scrollHeight - 10;
|
|
46
|
-
let newActiveId = this.activeSectionId;
|
|
47
|
-
if (isBottom) {
|
|
48
|
-
// Find the last visible section at the bottom of the page
|
|
49
|
-
for (let i = sections.length - 1; i >= 0; i--) {
|
|
50
|
-
if (this.sectionVisibility.get(sections[i].id)) {
|
|
51
|
-
newActiveId = sections[i].id.replace('section-', '');
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
// Find the first visible section
|
|
58
|
-
for (const section of sections) {
|
|
59
|
-
if (this.sectionVisibility.get(section.id)) {
|
|
60
|
-
newActiveId = section.id.replace('section-', '');
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
if (newActiveId !== this.activeSectionId) {
|
|
66
|
-
this.activeSectionId = newActiveId;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Menu data as JSON string (for compatibility with HTML attributes)
|
|
71
|
-
*/
|
|
72
|
-
this.dataJson = '{}';
|
|
73
|
-
}
|
|
74
|
-
componentDidLoad() {
|
|
75
|
-
this.initIntersectionObserver();
|
|
76
|
-
window.addEventListener('scroll', this.handleScroll);
|
|
77
|
-
}
|
|
78
|
-
disconnectedCallback() {
|
|
79
|
-
if (this.observer) {
|
|
80
|
-
this.observer.disconnect();
|
|
81
|
-
}
|
|
82
|
-
window.removeEventListener('scroll', this.handleScroll);
|
|
83
|
-
clearTimeout(this.scrollTimeout);
|
|
84
|
-
}
|
|
85
|
-
initIntersectionObserver() {
|
|
86
|
-
const options = {
|
|
87
|
-
root: null,
|
|
88
|
-
rootMargin: '-90px 0px -10% 0px', // Detect items just below header
|
|
89
|
-
threshold: 0,
|
|
90
|
-
};
|
|
91
|
-
this.observer = new IntersectionObserver((entries) => {
|
|
92
|
-
entries.forEach((entry) => {
|
|
93
|
-
this.sectionVisibility.set(entry.target.id, entry.isIntersecting);
|
|
94
|
-
});
|
|
95
|
-
if (!this.isScrollingByTab) {
|
|
96
|
-
this.updateActiveSection();
|
|
97
|
-
}
|
|
98
|
-
}, options);
|
|
99
|
-
const sections = this.el.querySelectorAll('.menu-section');
|
|
100
|
-
sections.forEach((section) => this.observer.observe(section));
|
|
101
|
-
}
|
|
102
|
-
render() {
|
|
103
|
-
var _a;
|
|
104
|
-
const menuData = parseMenu(this.data, this.dataJson);
|
|
105
|
-
if (!menuData) {
|
|
106
|
-
return h("div", { class: "menu-loading" }, "Loading...");
|
|
107
|
-
}
|
|
108
|
-
const { business, sections, templateData } = menuData;
|
|
109
|
-
const theme = templateData === null || templateData === void 0 ? void 0 : templateData.theme;
|
|
110
|
-
const primaryColor = (theme === null || theme === void 0 ? void 0 : theme.primaryColor) || '#18181b';
|
|
111
|
-
const sortedSections = [...(sections || [])].sort((a, b) => a.order - b.order);
|
|
112
|
-
return (h("div", { class: "menu-wrapper" }, h("header", { class: "menu-header" }, (business === null || business === void 0 ? void 0 : business.name) && h("h1", { class: "business-name" }, business.name), (business === null || business === void 0 ? void 0 : business.description) && (h("p", { class: "business-description" }, business.description))), h("veleta-menu-tabs", { sections: sortedSections.map((s) => ({ id: s.id, title: s.title })), activeSectionId: this.activeSectionId || ((_a = sortedSections[0]) === null || _a === void 0 ? void 0 : _a.id), onTabClick: (ev) => this.handleTabClick(ev.detail) }), h("main", { class: "menu-content" }, sortedSections.map((section) => {
|
|
113
|
-
var _a;
|
|
114
|
-
return (h("section", { key: section.id, id: `section-${section.id}`, class: "menu-section" }, h("h2", { class: "section-title", style: { borderColor: primaryColor } }, section.title), section.description && (h("p", { class: "section-description" }, section.description)), h("div", { class: "dishes-list" }, (_a = section.dishes) === null || _a === void 0 ? void 0 : _a.sort((a, b) => a.order - b.order).map((dish) => (h("div", { key: dish.id, class: `dish-item ${this.expandedDishes[dish.id] ? 'expanded' : ''}`, onClick: () => this.toggleDish(dish.id) }, h("div", { class: "dish-header" }, h("span", { class: "dish-name" }, dish.name), h("span", { class: "dish-price" }, formatPrice(dish.price))), dish.description && (h("div", { class: "dish-details" }, h("p", { class: "dish-description" }, dish.description)))))))));
|
|
115
|
-
}))));
|
|
116
|
-
}
|
|
117
|
-
static get is() { return "veleta-default-template"; }
|
|
118
|
-
static get originalStyleUrls() {
|
|
119
|
-
return {
|
|
120
|
-
"$": ["default-template.scss"]
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
static get styleUrls() {
|
|
124
|
-
return {
|
|
125
|
-
"$": ["default-template.css"]
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
static get properties() {
|
|
129
|
-
return {
|
|
130
|
-
"data": {
|
|
131
|
-
"type": "unknown",
|
|
132
|
-
"mutable": false,
|
|
133
|
-
"complexType": {
|
|
134
|
-
"original": "Menu",
|
|
135
|
-
"resolved": "Menu",
|
|
136
|
-
"references": {
|
|
137
|
-
"Menu": {
|
|
138
|
-
"location": "import",
|
|
139
|
-
"path": "../../types/interfaces",
|
|
140
|
-
"id": "src/types/interfaces.ts::Menu",
|
|
141
|
-
"referenceLocation": "Menu"
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
"required": false,
|
|
146
|
-
"optional": true,
|
|
147
|
-
"docs": {
|
|
148
|
-
"tags": [],
|
|
149
|
-
"text": "Menu data as object (recommended for frameworks like Angular, React, Vue)"
|
|
150
|
-
},
|
|
151
|
-
"getter": false,
|
|
152
|
-
"setter": false
|
|
153
|
-
},
|
|
154
|
-
"dataJson": {
|
|
155
|
-
"type": "string",
|
|
156
|
-
"mutable": false,
|
|
157
|
-
"complexType": {
|
|
158
|
-
"original": "string",
|
|
159
|
-
"resolved": "string",
|
|
160
|
-
"references": {}
|
|
161
|
-
},
|
|
162
|
-
"required": false,
|
|
163
|
-
"optional": false,
|
|
164
|
-
"docs": {
|
|
165
|
-
"tags": [],
|
|
166
|
-
"text": "Menu data as JSON string (for compatibility with HTML attributes)"
|
|
167
|
-
},
|
|
168
|
-
"getter": false,
|
|
169
|
-
"setter": false,
|
|
170
|
-
"reflect": false,
|
|
171
|
-
"attribute": "data-json",
|
|
172
|
-
"defaultValue": "'{}'"
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
static get states() {
|
|
177
|
-
return {
|
|
178
|
-
"expandedDishes": {},
|
|
179
|
-
"activeSectionId": {}
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
static get elementRef() { return "el"; }
|
|
183
|
-
}
|
package/dist/collection/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './interfaces';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parsea un prop que puede ser un string JSON o un array/objeto directo.
|
|
3
|
-
* Compatible con Angular/Ionic (objetos directos) y Astro/vanilla JS (strings JSON).
|
|
4
|
-
*/
|
|
5
|
-
export function parseList(json) {
|
|
6
|
-
try {
|
|
7
|
-
// Si ya es un array (Angular/Ionic pasa objetos directamente), devolverlo directamente
|
|
8
|
-
if (Array.isArray(json)) {
|
|
9
|
-
return json;
|
|
10
|
-
}
|
|
11
|
-
// Si es string, parsearlo (Astro, vanilla JS, etc. pasan strings JSON)
|
|
12
|
-
if (typeof json === 'string') {
|
|
13
|
-
const cleaned = json.trim();
|
|
14
|
-
// Si está vacío o es el valor por defecto, retornar array vacío
|
|
15
|
-
if (!cleaned || cleaned === '[]' || cleaned === '{}') {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
const res = JSON.parse(cleaned);
|
|
19
|
-
return Array.isArray(res) ? res : [];
|
|
20
|
-
}
|
|
21
|
-
return [];
|
|
22
|
-
}
|
|
23
|
-
catch (_a) {
|
|
24
|
-
// Intentar parsear sin las comillas externas si están escapadas
|
|
25
|
-
if (typeof json === 'string') {
|
|
26
|
-
try {
|
|
27
|
-
const unescaped = json.replace(/"/g, '"').replace(/'/g, "'");
|
|
28
|
-
const res = JSON.parse(unescaped);
|
|
29
|
-
return Array.isArray(res) ? res : [];
|
|
30
|
-
}
|
|
31
|
-
catch (_b) {
|
|
32
|
-
return [];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return [];
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Parsea un prop de tema que puede ser un string JSON o un objeto directo.
|
|
40
|
-
* Compatible con Angular/Ionic (objetos directos) y Astro/vanilla JS (strings JSON).
|
|
41
|
-
*/
|
|
42
|
-
export function parseTheme(themeJson) {
|
|
43
|
-
try {
|
|
44
|
-
// Si ya es un objeto (Angular/Ionic pasa objetos directamente), devolverlo
|
|
45
|
-
if (typeof themeJson === 'object' && themeJson !== null && !Array.isArray(themeJson)) {
|
|
46
|
-
return themeJson;
|
|
47
|
-
}
|
|
48
|
-
// Si es string, parsearlo (Astro, vanilla JS, etc. pasan strings JSON)
|
|
49
|
-
if (typeof themeJson === 'string') {
|
|
50
|
-
const cleaned = themeJson.trim();
|
|
51
|
-
if (!cleaned || cleaned === '{}') {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
const res = JSON.parse(cleaned);
|
|
55
|
-
return res && typeof res === 'object' && !Array.isArray(res)
|
|
56
|
-
? res
|
|
57
|
-
: null;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
catch (_a) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Parsea los props de un menú (objeto directo o string JSON).
|
|
67
|
-
*/
|
|
68
|
-
export function parseMenu(data, dataJson) {
|
|
69
|
-
if (data && typeof data === 'object' && !Array.isArray(data)) {
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
if (dataJson && typeof dataJson === 'string' && dataJson !== '{}') {
|
|
73
|
-
try {
|
|
74
|
-
return JSON.parse(dataJson);
|
|
75
|
-
}
|
|
76
|
-
catch (e) {
|
|
77
|
-
console.warn('Error parsing menu dataJson:', e);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}
|
package/dist/components/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,c="undefined"!=typeof window?window:{},r=c.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},f=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!f&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],m=(t,e)=>n=>{t.push(n),d||(d=!0,e&&4&u.i?v(y):u.raf(y))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},y=()=>{b(p),b(h),(d=p.length>0)&&u.raf(y)},v=t=>Promise.resolve(void 0).then(t),$=m(h,!0),j=t=>{const e=new URL(t,u.u);return e.origin!==c.location.origin?e.href:e.pathname},w=t=>u.u=t,O=new WeakMap,g=t=>"sc-"+t.p,S=t=>"object"==(t=typeof t)||"function"===t,k=(t,e,...n)=>{let l=null,o=null,s=!1,i=!1;const c=[],r=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?r(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!S(l))&&(l+=""),s&&i?c[c.length-1].h+=l:c.push(s?M(null,l):l),i=s)};if(r(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=M(t,null);return u.m=e,c.length>0&&(u.v=c),u.$=o,u},M=(t,e)=>({i:0,j:t,h:null!=e?e:null,O:null,v:null,m:null,$:null}),E={},C=(t,e)=>null==t||S(t)?t:1&e?t+"":t,A=(t,e)=>{const n=t;return{emit:t=>L(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},L=(t,e,n)=>{const l=u.ce(e,n);return t.dispatchEvent(l),l},_=(t,e,n,s,i,r)=>{if(n===s)return;let f=o(t,e),a=e.toLowerCase();if("class"===e){const e=t.classList,l=D(n);let o=D(s);e.remove(...l.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}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 o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=S(s);if((f||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?f=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!f||4&r||i)&&!l&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}}else if(e="-"===e[2]?e.slice(3):o(c,a)?a.slice(2):a[2]+e.slice(3),n||s){const l=e.endsWith(H);e=e.replace(P,""),n&&u.rel(t,e,n,l),s&&u.ael(t,e,s,l)}},x=/\s/,D=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(x):[]),H="Capture",P=RegExp(H+"$"),R=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of U(Object.keys(o)))t in s||_(l,t,o[t],void 0,n,e.i);for(const t of U(Object.keys(s)))_(l,t,o[t],s[t],n,e.i)};function U(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var W=!1,N=(t,n,l)=>{const o=n.v[l];let s,i,r=0;if(null!=o.h)s=o.O=c.document.createTextNode(o.h);else{if(!c.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=o.O=c.document.createElement(o.j),R(null,o,W),o.v){const e="template"===o.j?s.content:s;for(r=0;r<o.v.length;++r)i=N(t,o,r),i&&e.appendChild(i)}}return s["s-hn"]=e,s},V=(t,e,n,l,o,s)=>{let i,c=t;for("template"===n.j&&(c=c.content);o<=s;++o)l[o]&&(i=N(null,n,o),i&&(l[o].O=i,T(c,i,e)))},q=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;t&&t.remove()}}},z=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),F=(t,e,n=!1)=>{const l=e.O=t.O,o=t.v,s=e.v,i=e.h;null==i?(R(t,e,W),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,c=0,r=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=l.length-1,m=l[0],b=l[h];const y="template"===n.j?t.content:t;for(;c<=a&&r<=h;)if(null==d)d=e[++c];else if(null==p)p=e[--a];else if(null==m)m=l[++r];else if(null==b)b=l[--h];else if(z(d,m,o))F(d,m,o),d=e[++c],m=l[++r];else if(z(p,b,o))F(p,b,o),p=e[--a],b=l[--h];else if(z(d,b,o))F(d,b,o),T(y,d.O,p.O.nextSibling),d=e[++c],b=l[--h];else if(z(p,m,o))F(p,m,o),T(y,p.O,d.O),p=e[--a],m=l[++r];else{for(u=-1,f=c;f<=a;++f)if(e[f]&&null!==e[f].$&&e[f].$===m.$){u=f;break}u>=0?(i=e[u],i.j!==m.j?s=N(e&&e[r],n,u):(F(i,m,o),e[u]=void 0,s=i.O),m=l[++r]):(s=N(e&&e[r],n,r),m=l[++r]),s&&T(d.O.parentNode,s,d.O)}c>a?V(t,null==l[h+1]?null:l[h+1].O,n,l,r,h):r>h&&q(e,c,a)})(l,o,e,s,n):null!==s?(null!==t.h&&(l.textContent=""),V(l,null,e,s,0,s.length-1)):!n&&null!==o&&q(o,0,o.length-1)):t.h!==i&&(l.data=i)},T=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),Y=(t,n,l=!1)=>{const o=t.$hostElement$,s=t.S||M(null,null),i=(t=>t&&t.j===E)(n)?n:k(null,null,n);if(e=o.tagName,l&&i.m)for(const t of Object.keys(i.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.m[t]=o[t]);i.j=null,i.i|=4,t.S=i,i.O=s.O=o,F(s,i,l)},Z=(t,e)=>{if(e&&!t.k&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.k=()=>{e["s-p"].splice(n-1,1),l()})))}},B=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Z(t,t.M);const n=()=>G(t,e);if(!e)return $(n);queueMicrotask((()=>{n()}))},G=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw 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 o;return o=et(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=I(o,(()=>et(l,"componentWillRender",void 0,n))),I(o,(()=>K(t,l,e)))},I=(t,e)=>J(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),J=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,K=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l;((t,e)=>{var n,l,o;const s=g(e),r=i.get(s);if(!c.document)return s;if(t=11===t.nodeType?t:c.document,r)if("string"==typeof r){let o,i=O.get(t=t.head||t);if(i||O.set(t,i=new Set),!i.has(s)){o=c.document.createElement("style"),o.textContent=r;const d=null!=(n=u.C)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=c.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=d&&o.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(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(f){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),a?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=O.get(t);if(e||O.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===n.CSSStyleSheet)l=r;else{l=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}})(t.$hostElement$.getRootNode(),e)})(t);Q(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>X(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},Q=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,Y(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},X=t=>{const e=t.$hostElement$,n=e,l=t.M;et(n,"componentDidRender",void 0,e),64&t.i?et(n,"componentDidUpdate",void 0,e):(t.i|=64,nt(e),et(n,"componentDidLoad",void 0,e),t.A(e),l||tt()),t.k&&(t.k(),t.k=void 0),512&t.i&&v((()=>B(t,!1))),t.i&=-517},tt=()=>{v((()=>L(c,"appload",{detail:{namespace:"veleta-templates"}})))},et=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},nt=t=>t.classList.add("hydrated"),lt=(t,e,n,o)=>{const i=l(t);if(!i)return;const c=t,r=i.o.get(e),u=i.i,f=c;if(!((n=C(n,o.t[e][0]))===r||Number.isNaN(r)&&Number.isNaN(n))){if(i.o.set(e,n),o.L){const t=o.L[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&u||1&o)&&(f?f[l](n,r,e):i._.push((()=>{i.D[l](n,r,e)})))}catch(t){s(t,c)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,r,e)&&!(16&u))return;16&u||B(i,!1)}}},ot=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n.L&&(n.L=e.watchers),e.deserializers&&!n.H&&(n.H=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const c=Object.entries(null!=(o=n.t)?o:{});c.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:c}=t(i,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):((t,e)=>l(this).o.get(e))(0,e)},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(c)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),c.call(this,C(t,o)),void lt(this,e,t=32&o?this[e]:s.$hostElement$[e],n);lt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var r;const u=t.get(e),f=l(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!==o){const l=this,i=null==(r=n.L)?void 0:r[e];null==i||i.forEach((n=>{const[[i,c]]=Object.entries(n);null!=l[i]&&(128&t||1&c)&&l[i].call(l,s,o,e)}))}return}const a=c.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.L)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},st=(t,e)=>{const o={i:e[0],p:e[1]};try{o.t=e[2],o.L=t.L,o.H=t.H,o.P=t.P;const c=t.prototype.connectedCallback,r=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,R:new Map};l.U=new Promise((t=>l.A=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e.D)||(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"]){Z(e,e.M=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}})),(async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=g(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);f&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.M,s=()=>B(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.k&&(e.k(),e.k=void 0),e.A&&e.A(t)}})(t,e,n)}o()}})(this),c&&c.call(this)},disconnectedCallback(){(async t=>{O.has(t)&&O.delete(t),t.shadowRoot&&O.has(t.shadowRoot)&&O.delete(t.shadowRoot)})(this),r&&r.call(this)},__attachShadow(){this.shadowRoot=this}}),Object.defineProperty(t,"is",{value:o.p,configurable:!0}),ot(t,o)}catch(e){return s(e),t}},it=t=>u.C=t,ct=t=>Object.assign(u,t);function rt(t,e){Y({$hostElement$:e},t)}function ut(t){return t}export{r as H,A as c,j as getAssetPath,k as h,st as p,rt as render,w as setAssetPath,it as setNonce,ct as setPlatformOptions,ut as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as e,H as o,c as s,h as n}from"./index.js";const a=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.tabClick=s(this,"tabClick"),this.sections=[],this.activeSectionId=""}handleActiveSectionChange(){this.scrollToActiveTab()}componentDidLoad(){this.scrollToActiveTab()}scrollToActiveTab(){requestAnimationFrame((()=>{const t=this.el.querySelector(".menu-tab-item.active"),e=this.el.querySelector(".menu-tabs-scroll");t&&e&&e.scrollTo({left:t.offsetLeft-e.offsetWidth/2+t.offsetWidth/2,behavior:"smooth"})}))}render(){return n("div",{key:"5dd9fed4c2b1cb90ec4dfc059fd00ac094c1677c",class:"menu-tabs-container"},n("div",{key:"84ade7b110bd91d1b8fa6a40344191989074af19",class:"menu-tabs-scroll"},this.sections.map((t=>n("button",{key:t.id,class:"menu-tab-item "+(this.activeSectionId===t.id?"active":""),onClick:()=>this.tabClick.emit(t.id)},t.title)))))}get el(){return this}static get watchers(){return{activeSectionId:[{handleActiveSectionChange:0}]}}static get style(){return'.menu-tabs-container{position:-webkit-sticky;position:sticky;top:0;z-index:100;background-color:white;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:0;margin-bottom:24px}.menu-tabs-scroll{display:-ms-flexbox;display:flex;gap:12px;overflow-x:auto;padding:0 20px;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-overflow-scrolling:touch}.menu-tabs-scroll::after{content:"";padding-right:20px}.menu-tabs-scroll::-webkit-scrollbar{display:none}.menu-tab-item{white-space:nowrap;padding:1rem;border:none;-webkit-box-shadow:inset 0 -2px 0 0 transparent;box-shadow:inset 0 -2px 0 0 transparent;background-color:transparent;color:#71717a;font-size:1rem;font-weight:500;cursor:pointer;-webkit-transition:color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:color 0.3s ease, box-shadow 0.3s ease;transition:color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;font-family:inherit;-ms-flex-negative:0;flex-shrink:0;outline:none}.menu-tab-item:hover{color:#18181b}.menu-tab-item.active{color:#18181b;-webkit-box-shadow:inset 0 -2px 0 0 #18181b;box-shadow:inset 0 -2px 0 0 #18181b}.menu-tabs-container::after{content:"";position:absolute;right:0;top:0;bottom:0;width:40px;background:-webkit-gradient(linear, left top, right top, from(transparent), to(rgba(255, 255, 255, 0.8)));background:linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));pointer-events:none;opacity:0;}'}},[0,"veleta-menu-tabs",{sections:[16],activeSectionId:[1,"active-section-id"]},void 0,{activeSectionId:[{handleActiveSectionChange:0}]}]);function i(){"undefined"!=typeof customElements&&["veleta-menu-tabs"].forEach((e=>{"veleta-menu-tabs"===e&&(customElements.get(t(e))||customElements.define(t(e),a))}))}i();export{a as M,i as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as t,H as i,h as s}from"./index.js";import{d as o}from"./p-Bn5G3Oo7.js";const n=t(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.expandedDishes={},this.activeSectionId="",this.sectionVisibility=new Map,this.isScrollingByTab=!1,this.toggleDish=e=>{this.expandedDishes=Object.assign(Object.assign({},this.expandedDishes),{[e]:!this.expandedDishes[e]})},this.handleTabClick=e=>{const t=this.el.querySelector("#section-"+e);if(t){this.isScrollingByTab=!0,this.activeSectionId=e;const i=95,s=t.getBoundingClientRect().top+window.pageYOffset-i;window.scrollTo({top:s,behavior:"smooth"})}},this.handleScroll=()=>{if(this.isScrollingByTab)return clearTimeout(this.scrollTimeout),void(this.scrollTimeout=setTimeout((()=>{this.isScrollingByTab=!1,this.updateActiveSection()}),150));this.updateActiveSection()},this.updateActiveSection=()=>{if(this.isScrollingByTab)return;const e=Array.from(this.el.querySelectorAll(".menu-section"));if(0===e.length)return;const t=window.innerHeight+window.pageYOffset>=document.documentElement.scrollHeight-10;let i=this.activeSectionId;if(t){for(let t=e.length-1;t>=0;t--)if(this.sectionVisibility.get(e[t].id)){i=e[t].id.replace("section-","");break}}else for(const t of e)if(this.sectionVisibility.get(t.id)){i=t.id.replace("section-","");break}i!==this.activeSectionId&&(this.activeSectionId=i)},this.dataJson="{}"}componentDidLoad(){this.initIntersectionObserver(),window.addEventListener("scroll",this.handleScroll)}disconnectedCallback(){this.observer&&this.observer.disconnect(),window.removeEventListener("scroll",this.handleScroll),clearTimeout(this.scrollTimeout)}initIntersectionObserver(){this.observer=new IntersectionObserver((e=>{e.forEach((e=>{this.sectionVisibility.set(e.target.id,e.isIntersecting)})),this.isScrollingByTab||this.updateActiveSection()}),{root:null,rootMargin:"-90px 0px -10% 0px",threshold:0}),this.el.querySelectorAll(".menu-section").forEach((e=>this.observer.observe(e)))}render(){var e;const t=function(e,t){if(e&&"object"==typeof e&&!Array.isArray(e))return e;if(t&&"string"==typeof t&&"{}"!==t)try{return JSON.parse(t)}catch(e){console.warn("Error parsing menu dataJson:",e)}return null}(this.data,this.dataJson);if(!t)return s("div",{class:"menu-loading"},"Loading...");const{business:i,sections:o,templateData:n}=t,a=null==n?void 0:n.theme,r=(null==a?void 0:a.primaryColor)||"#18181b",l=[...o||[]].sort(((e,t)=>e.order-t.order));return s("div",{class:"menu-wrapper"},s("header",{class:"menu-header"},(null==i?void 0:i.name)&&s("h1",{class:"business-name"},i.name),(null==i?void 0:i.description)&&s("p",{class:"business-description"},i.description)),s("veleta-menu-tabs",{sections:l.map((e=>({id:e.id,title:e.title}))),activeSectionId:this.activeSectionId||(null===(e=l[0])||void 0===e?void 0:e.id),onTabClick:e=>this.handleTabClick(e.detail)}),s("main",{class:"menu-content"},l.map((e=>{var t;return s("section",{key:e.id,id:"section-"+e.id,class:"menu-section"},s("h2",{class:"section-title",style:{borderColor:r}},e.title),e.description&&s("p",{class:"section-description"},e.description),s("div",{class:"dishes-list"},null===(t=e.dishes)||void 0===t?void 0:t.sort(((e,t)=>e.order-t.order)).map((e=>s("div",{key:e.id,class:"dish-item "+(this.expandedDishes[e.id]?"expanded":""),onClick:()=>this.toggleDish(e.id)},s("div",{class:"dish-header"},s("span",{class:"dish-name"},e.name),s("span",{class:"dish-price"},function(e){return(e%1==0?""+e:e.toFixed(2))+"€"}(e.price))),e.description&&s("div",{class:"dish-details"},s("p",{class:"dish-description"},e.description)))))))}))))}get el(){return this}static get style(){return'@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"); .menu-tabs-container{position:-webkit-sticky;position:sticky;top:0;z-index:100;background-color:white;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:0;margin-bottom:24px}.menu-tabs-scroll{display:-ms-flexbox;display:flex;gap:12px;overflow-x:auto;padding:0 20px;scrollbar-width:none;-ms-overflow-style:none;scroll-behavior:smooth;-webkit-overflow-scrolling:touch}.menu-tabs-scroll::after{content:"";padding-right:20px}.menu-tabs-scroll::-webkit-scrollbar{display:none}.menu-tab-item{white-space:nowrap;padding:1rem;border:none;-webkit-box-shadow:inset 0 -2px 0 0 transparent;box-shadow:inset 0 -2px 0 0 transparent;background-color:transparent;color:#71717a;font-size:1rem;font-weight:500;cursor:pointer;-webkit-transition:color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:color 0.3s ease, -webkit-box-shadow 0.3s ease;transition:color 0.3s ease, box-shadow 0.3s ease;transition:color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;font-family:inherit;-ms-flex-negative:0;flex-shrink:0;outline:none}.menu-tab-item:hover{color:#18181b}.menu-tab-item.active{color:#18181b;-webkit-box-shadow:inset 0 -2px 0 0 #18181b;box-shadow:inset 0 -2px 0 0 #18181b}.menu-tabs-container::after{content:"";position:absolute;right:0;top:0;bottom:0;width:40px;background:-webkit-gradient(linear, left top, right top, from(transparent), to(rgba(255, 255, 255, 0.8)));background:linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8));pointer-events:none;opacity:0;}.menu-wrapper{font-family:"Poppins", sans-serif;max-width:800px;margin:0 auto;padding:20px 0;background-color:#ffffff;min-height:100vh}.menu-header{text-align:center;margin-bottom:24px;padding:0 20px;}.business-name{font-size:2.5rem;font-weight:700;margin-bottom:8px;letter-spacing:-0.02em}.business-description{font-size:1.1rem;color:#71717a;margin:0 auto;padding-left:1px;padding-right:1px;line-height:1.5rem}.menu-section{margin-bottom:48px}.section-title{font-size:1.3rem;font-weight:600;padding-bottom:8px;margin-bottom:1rem}.section-description{font-size:1rem;color:#71717a;margin-bottom:20px;margin-top:-16px;line-height:1.25rem}.dishes-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.dish-item{padding:1rem 0.2rem;border-bottom:1px solid #e4e4e7;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}.dish-item:hover{border-color:#e4e4e7}.dish-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:baseline;align-items:baseline;gap:12px}.dish-name{font-weight:500;font-size:1rem;color:#18181b}.dish-price{font-weight:400;font-size:0.9rem;color:#18181b}.dish-details{max-height:1.35rem;overflow:hidden;margin-top:4px;opacity:1;-webkit-transition:max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1);transition:max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1)}.dish-item.expanded .dish-details{max-height:400px;margin-top:4px}.dish-description{font-size:0.9rem;color:#71717a;line-height:1.5;margin:0;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.dish-item.expanded .dish-description{-webkit-line-clamp:10}.menu-content{padding:0.1rem 20px}.menu-footer{margin-top:80px;text-align:center;padding:0 20px}.social-link{display:inline-block;padding:12px 24px;border-radius:99px;color:white;text-decoration:none;font-weight:500;-webkit-transition:opacity 0.2s;transition:opacity 0.2s}.social-link:hover{opacity:0.9}.menu-loading{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:200px;color:#71717a}'}},[0,"veleta-default-template",{data:[16],dataJson:[1,"data-json"],expandedDishes:[32],activeSectionId:[32]}]);function a(){"undefined"!=typeof customElements&&["veleta-default-template","veleta-menu-tabs"].forEach((t=>{switch(t){case"veleta-default-template":customElements.get(e(t))||customElements.define(e(t),n);break;case"veleta-menu-tabs":customElements.get(e(t))||o()}}))}a();const r=n,l=a;export{r as VeletaDefaultTemplate,l as defineCustomElement}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as o,d as s}from"./p-Bn5G3Oo7.js";const p=o,r=s;export{p as VeletaMenuTabs,r as defineCustomElement}
|