matts-dinner-component-library 1.0.4 → 1.0.6

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Matthieu JUAN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1 +1 @@
1
- .badge{display:inline-block;padding:.2rem .625rem .125rem;font-size:1.5rem;font-weight:regular;font-family:Bebas Neue;text-transform:uppercase}.badge-pill{border-radius:1.25rem}.badge-yellow{background-color:#ffc700;color:#000}.badge-green{background-color:#29b929;color:#fff}.badge-icon{margin-left:3px;font-size:.9em}.button{border:none;cursor:pointer;transition:transform .1s ease}.button:active{transform:scale(.9)}.button-primary-black{background-color:#ffc700;color:#000}.button-primary-white{background-color:#ffc700;color:#fff}.button-danger{background-color:#e63946;color:#fff}.button-xl{width:32.4375rem;height:8.5rem;border-radius:.75rem;font-size:4.6875rem;font-family:Bebas Neue,sans-serif;font-weight:400;display:flex;align-items:center;justify-content:center}.button-large{max-width:47.688rem;height:6.813rem;font-size:3.438rem;font-weight:700;width:100%;border-radius:6.62rem}.button-medium-inter{width:27.56rem;height:6.56rem;border-radius:.75rem;font-size:2.375rem;letter-spacing:-.27px;font-family:Inter,sans-serif;font-weight:600;display:flex;align-items:center;justify-content:center}.button-medium-bebas{width:27.56rem;height:6.56rem;border-radius:.75rem;font-size:3.125rem;letter-spacing:-.27px;font-family:Bebas Neue,sans-serif;font-weight:400;display:flex;align-items:center;justify-content:center}.button-small{width:13rem;height:4.5rem;border-radius:.5rem;font-size:1.6875rem;font-family:Inter,sans-serif;font-weight:500;display:flex;align-items:center;justify-content:center}.button:disabled{opacity:.5;cursor:not-allowed}.quantity-selector-container{color:#000;display:flex;flex-direction:column;align-items:center;font-family:Inter,sans-serif}.quantity-selector-container p{font-size:2.68rem;font-weight:700;margin-bottom:.4rem}.selector{display:flex;align-items:center;gap:1.4rem}.selector .quantity{font-size:2.3125rem}.selector .remove-btn{width:2.0625rem;height:2.0625rem}.selector .add-btn{width:2.375rem;height:2.375rem}.cart-item-card{display:flex;align-items:flex-start;width:43.125rem;height:15rem;border:2px solid #000;background-color:#f5f5f5;border-radius:.625rem;gap:1.5rem;padding:2.7rem 4rem 2.7rem 1.5rem}.card-left{display:flex;justify-content:center;width:11.25rem;height:8rem;flex-shrink:0}.card-left .product-image{width:100%;height:100%;object-fit:cover;border-radius:5px}.card-center{display:flex;flex:1;flex-direction:column;justify-content:space-between;height:8rem}.product-name{font-family:Bebas Neue,sans-serif;font-weight:550;font-size:2.625rem;margin:0}.product-options{font-family:Inter,sans-serif;color:#666;font-size:1.375rem;margin:0 0 .5rem}.product-info-group{display:flex;flex-direction:column;gap:.2rem}.card-center .quantity-selector-container{flex-direction:row;align-items:center;gap:1.2em}.card-center .quantity-selector-container p{font-family:Inter,sans-serif;font-size:1.5rem;margin:0}.card-center .selector{gap:.8rem}.card-center .selector .quantity{font-family:Inter,sans-serif;font-size:1.5rem}.card-center .selector .remove-btn{width:1.313rem;height:1.313rem}.card-center .selector .add-btn{width:1.6rem;height:1.6rem}.card-right{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;height:8rem}.card-product-price{font-family:Bebas Neue,sans-serif;font-size:2.625rem}.delete-icon{width:1.68rem;height:1.68rem;cursor:pointer;margin-left:5}.product-name,.card-product-price{line-height:.8}nav{display:flex;justify-content:center;font-family:Inter,sans-serif;width:100%}ul{display:inline-flex;gap:6.2rem;list-style-type:none;margin:0;padding:0}li{transition:transform .1s ease;font-size:2.5rem;font-weight:700;color:#999;cursor:pointer}li:active{transform:scale(.9)}li.highlighted{color:#000;text-decoration:underline;text-decoration-color:#ffc700;text-decoration-thickness:.3125rem;text-underline-offset:.5rem}.customization-section,.customization-section *{box-sizing:border-box}.customization-form{display:flex;flex-direction:column;gap:16px}.customization-section{border:2px solid #000;border-radius:0;padding-left:1.2rem;width:29rem;background-color:#f5f5f5;margin-inline:0;min-inline-size:0}.customization-section legend{text-align:left;line-height:normal;font-family:Inter,sans-serif;font-size:2.1875rem;font-weight:700;padding:0 .5rem}.customization-section .options{display:flex;margin-left:3px;gap:6px;justify-content:center;align-items:center;text-align:left}.customization-section input{border:1px solid black;margin-right:.5rem;height:1.25rem;width:1.25rem;appearance:none;-webkit-appearance:none;background-color:#fff}.customization-section input:checked{background-color:#000;position:relative;flex-shrink:0}.customization-section input:checked:after{content:"✓";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.9rem;flex-shrink:0}.customization-section label{font-family:Inter,sans-serif;font-size:1.6rem;margin-right:.3rem;font-weight:600}.header{box-sizing:border-box;margin:0;width:67.5rem;height:25rem;background-color:#ffc700;overflow:hidden;flex-shrink:0;align-items:flex-start;display:flex;justify-content:space-between;padding:2rem}.header-left,.header-right{width:7rem;flex-shrink:0;display:flex;align-items:flex-start}.header-logo{position:absolute;height:29.56rem;width:54.313rem;align-self:center;left:10%;margin-top:1em}.icon-back{width:5.25rem;height:5.25rem;cursor:pointer;transition:transform .1s ease}.icon-back:active,.icon-cart:active{transform:scale(.9)}.icon-cart{width:8rem;height:4.875rem;cursor:pointer;transition:transform .1s ease}.header{position:relative}.flag-container{display:flex;justify-content:center;gap:3rem}img[alt=French]{width:4.875rem;height:4.875rem}img[alt=English]{width:4.6875rem;height:4.6875rem}img[alt=English],img[alt=French]{transition:transform .1s ease}img[alt=English]:active,img[alt=French]:active{transform:scale(.9)}.card-container{width:22.563rem;display:flex;align-items:center;justify-content:center;flex-direction:column;transition:transform .1s ease}.card-container:active{transform:scale(.9)}.image-wrapper{position:relative;width:21.063rem;height:15rem;margin-bottom:1rem}.image-wrapper .badge{position:absolute;z-index:10}.image-wrapper img{width:100%;height:100%}.card-container p,.product-price{font-family:Bebas Neue,sans-serif;font-size:2.875rem;text-align:center;margin:0 0 .5rem}.product-hero-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.product-hero-container img{width:35.5rem;height:24.5rem;border-radius:16px}.product-hero-container p{margin:0;font-family:Bebas Neue,sans-serif;font-size:5rem;text-align:center}.cart-footer-container{display:flex;align-items:center;gap:5em;height:13.1rem;width:100%;background-color:#ffc107;margin-top:auto}.cart-footer-container .cart-footer-section{display:flex;align-items:center;height:8rem;width:45rem;background-color:#fff;border-radius:20px;margin-left:2.1em;justify-content:space-between}.view-cart-btn{margin-right:4.2rem;margin-top:.4rem}.footer-cart-btn{display:flex;margin-left:5rem;align-items:center;justify-content:center;gap:8em}.cart-footer-info{display:flex;align-items:center;margin-left:1.3em}.cart-footer-icon{width:6rem;height:3.62rem}.cart-footer-price{margin-left:.6rem}.cart-footer-nb-items,.cart-footer-price{font-family:Inter,sans-serif;font-size:1.87rem;font-weight:700}.cart-footer-price,.cart-footer-nb-item-number{color:#4d9c07}.language-selector-container{display:flex;align-items:center}@keyframes cartBounce{0%{transform:scale(1)}30%{transform:scale(1.3) rotate(-10deg)}60%{transform:scale(1.1) rotate(10deg)}to{transform:scale(1)}}.cart-footer-icon.bounce{animation:cartBounce .4s ease}
1
+ .badge{display:inline-block;padding:.2rem .625rem .125rem;font-size:1.5rem;font-weight:regular;font-family:Bebas Neue;text-transform:uppercase}.badge-pill{border-radius:1.25rem}.badge-yellow{background-color:#ffc700;color:#000}.badge-green{background-color:#29b929;color:#fff}.badge-icon{margin-left:3px;font-size:.9em}.button{border:none;cursor:pointer;transition:transform .1s ease}.button:active{transform:scale(.9)}.button-primary-black{background-color:#ffc700;color:#000}.button-primary-white{background-color:#ffc700;color:#fff}.button-danger{background-color:#e63946;color:#fff}.button-xl{width:32.4375rem;height:8.5rem;border-radius:.75rem;font-size:4.6875rem;font-family:Bebas Neue,sans-serif;font-weight:400;display:flex;align-items:center;justify-content:center}.button-large{max-width:47.688rem;height:6.813rem;font-size:3.438rem;font-weight:700;width:100%;border-radius:6.62rem}.button-medium-inter{width:27.56rem;height:6.56rem;border-radius:.75rem;font-size:2.375rem;letter-spacing:-.27px;font-family:Inter,sans-serif;font-weight:600;display:flex;align-items:center;justify-content:center}.button-medium-bebas{width:27.56rem;height:6.56rem;border-radius:.75rem;font-size:3.125rem;letter-spacing:-.27px;font-family:Bebas Neue,sans-serif;font-weight:400;display:flex;align-items:center;justify-content:center}.button-small{width:13rem;height:4.5rem;border-radius:.5rem;font-size:1.6875rem;font-family:Inter,sans-serif;font-weight:500;display:flex;align-items:center;justify-content:center}.button:disabled{opacity:.5;cursor:not-allowed}.quantity-selector-container{color:#000;display:flex;flex-direction:column;align-items:center;font-family:Inter,sans-serif}.quantity-selector-container p{font-size:2.68rem;font-weight:700;margin-bottom:.4rem}.selector{display:flex;align-items:center;gap:1.4rem}.selector .quantity{font-size:2.3125rem}.selector .remove-btn{width:2.0625rem;height:2.0625rem}.selector .add-btn{width:2.375rem;height:2.375rem}.cart-item-card{display:flex;align-items:flex-start;width:43.125rem;height:15rem;border:2px solid #000;background-color:#f5f5f5;border-radius:.625rem;gap:1.5rem;padding:2.7rem 4rem 2.7rem 1.5rem}.card-left{display:flex;justify-content:center;width:11.25rem;height:8rem;flex-shrink:0}.card-left .product-image{width:100%;height:100%;object-fit:cover;border-radius:5px}.card-center{display:flex;flex:1;flex-direction:column;justify-content:space-between;height:8rem}.product-name{font-family:Bebas Neue,sans-serif;font-weight:550;font-size:2.625rem;margin:0}.product-options{font-family:Inter,sans-serif;color:#666;font-size:1.375rem;margin:0 0 .5rem}.product-info-group{display:flex;flex-direction:column;gap:.2rem}.card-center .quantity-selector-container{flex-direction:row;align-items:center;gap:1.2em}.card-center .quantity-selector-container p{font-family:Inter,sans-serif;font-size:1.5rem;margin:0}.card-center .selector{gap:.8rem}.card-center .selector .quantity{font-family:Inter,sans-serif;font-size:1.5rem}.card-center .selector .remove-btn{width:1.313rem;height:1.313rem}.card-center .selector .add-btn{width:1.6rem;height:1.6rem}.card-right{display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;height:8rem}.card-product-price{font-family:Bebas Neue,sans-serif;font-size:2.625rem}.delete-icon{width:1.68rem;height:1.68rem;cursor:pointer;margin-left:5}.product-name,.card-product-price{line-height:.8}.category-tab{display:flex;justify-content:center;font-family:Inter,sans-serif;width:100%}.category-tab__list{display:inline-flex;gap:6.2rem;list-style-type:none;margin:0;padding:0}.category-tab__item{transition:transform .1s ease;font-size:2.5rem;font-weight:700;color:#999;cursor:pointer}.category-tab__item:active{transform:scale(.9)}.category-tab__item--active{color:#000;text-decoration:underline;text-decoration-color:#ffc700;text-decoration-thickness:.3125rem;text-underline-offset:.5rem}.customization-section,.customization-section *{box-sizing:border-box}.customization-form{display:flex;flex-direction:column;gap:16px}.customization-section{border:2px solid #000;border-radius:0;padding-left:1.2rem;width:29rem;background-color:#f5f5f5;margin-inline:0;min-inline-size:0}.customization-section legend{text-align:left;line-height:normal;font-family:Inter,sans-serif;font-size:2.1875rem;font-weight:700;padding:0 .5rem}.customization-section .options{display:flex;margin-left:3px;gap:6px;justify-content:center;align-items:center;text-align:left}.customization-section input{border:1px solid black;margin-right:.5rem;height:1.25rem;width:1.25rem;appearance:none;-webkit-appearance:none;background-color:#fff}.customization-section input:checked{background-color:#000;position:relative;flex-shrink:0}.customization-section input:checked:after{content:"✓";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:.9rem;flex-shrink:0}.customization-section label{font-family:Inter,sans-serif;font-size:1.6rem;margin-right:.3rem;font-weight:600}.header{box-sizing:border-box;margin:0;width:67.5rem;height:25rem;background-color:#ffc700;overflow:hidden;flex-shrink:0;align-items:flex-start;display:flex;justify-content:space-between;padding:2rem}.header-left,.header-right{width:7rem;flex-shrink:0;display:flex;align-items:flex-start}.header-logo{position:absolute;height:29.56rem;width:54.313rem;align-self:center;left:10%;margin-top:1em}.icon-back{width:5.25rem;height:5.25rem;cursor:pointer;transition:transform .1s ease}.icon-back:active,.icon-cart:active{transform:scale(.9)}.icon-cart{width:8rem;height:4.875rem;cursor:pointer;transition:transform .1s ease}.header{position:relative}.flag-container{display:flex;justify-content:center;gap:3rem}img[alt=French]{width:4.875rem;height:4.875rem}img[alt=English]{width:4.6875rem;height:4.6875rem}img[alt=English],img[alt=French]{transition:transform .1s ease}img[alt=English]:active,img[alt=French]:active{transform:scale(.9)}.card-container{width:22.563rem;display:flex;align-items:center;justify-content:center;flex-direction:column;transition:transform .1s ease}.card-container:active{transform:scale(.9)}.image-wrapper{position:relative;width:21.063rem;height:15rem;margin-bottom:1rem}.image-wrapper .badge{position:absolute;z-index:10}.image-wrapper img{width:100%;height:100%}.card-container p,.product-price{font-family:Bebas Neue,sans-serif;font-size:2.875rem;text-align:center;margin:0 0 .5rem}.product-hero-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.product-hero-container img{width:35.5rem;height:24.5rem;border-radius:16px}.product-hero-container p{margin:0;font-family:Bebas Neue,sans-serif;font-size:5rem;text-align:center}.cart-footer-container{display:flex;align-items:center;gap:5em;height:13.1rem;width:100%;background-color:#ffc107;margin-top:auto}.cart-footer-container .cart-footer-section{display:flex;align-items:center;height:8rem;width:45rem;background-color:#fff;border-radius:20px;margin-left:2.1em;justify-content:space-between}.view-cart-btn{margin-right:4.2rem;margin-top:.4rem}.footer-cart-btn{display:flex;margin-left:5rem;align-items:center;justify-content:center;gap:8em}.cart-footer-info{display:flex;align-items:center;margin-left:1.3em}.cart-footer-icon{width:6rem;height:3.62rem}.cart-footer-price{margin-left:.6rem}.cart-footer-nb-items,.cart-footer-price{font-family:Inter,sans-serif;font-size:1.87rem;font-weight:700}.cart-footer-price,.cart-footer-nb-item-number{color:#4d9c07}.language-selector-container{display:flex;align-items:center}@keyframes cartBounce{0%{transform:scale(1)}30%{transform:scale(1.3) rotate(-10deg)}60%{transform:scale(1.1) rotate(10deg)}to{transform:scale(1)}}.cart-footer-icon.bounce{animation:cartBounce .4s ease}
@@ -44,13 +44,13 @@ function o({ productImg: Q, productName: E, productOptions: I, productPrice: v,
44
44
  ] });
45
45
  }
46
46
  function y({ categories: Q = ["Burgers", "Sides", "Beverages", "Desserts"], activeIndex: E, onCategoryClick: I, onIndexClick: v }) {
47
- return /* @__PURE__ */ A("nav", { children: /* @__PURE__ */ A("ul", { children: Q.map((f, B) => /* @__PURE__ */ A(
47
+ return /* @__PURE__ */ A("nav", { className: "category-tab", children: /* @__PURE__ */ A("ul", { className: "category-tab__list", children: Q.map((f, B) => /* @__PURE__ */ A(
48
48
  "li",
49
49
  {
50
50
  onClick: () => {
51
51
  I(f.toLowerCase()), v(B);
52
52
  },
53
- className: B === E ? "highlighted" : "",
53
+ className: B === E ? "category-tab__item category-tab__item--active" : "category-tab__item",
54
54
  children: f
55
55
  },
56
56
  B
@@ -189,7 +189,7 @@ function p({ productName: Q, img: E }) {
189
189
  /* @__PURE__ */ A("p", { children: Q })
190
190
  ] });
191
191
  }
192
- function U({ variant: Q = "summary", onViewCart: E, onGoMenu: I, onClearCart: v, nbItems: f, totalPrice: B, onLanguageChange: g, viewCartLabel: P, menuLabel: e, clearCartLabel: z }) {
192
+ function a({ variant: Q = "summary", onViewCart: E, onGoMenu: I, onClearCart: v, nbItems: f, totalPrice: B, onLanguageChange: g, viewCartLabel: P, menuLabel: e, clearCartLabel: z }) {
193
193
  const [r, D] = H(!1);
194
194
  return d(() => {
195
195
  f > 0 && (D(!0), setTimeout(() => D(!1), 400));
@@ -217,7 +217,7 @@ function U({ variant: Q = "summary", onViewCart: E, onGoMenu: I, onClearCart: v,
217
217
  export {
218
218
  b as Badge,
219
219
  X as Button,
220
- U as CartFooter,
220
+ a as CartFooter,
221
221
  o as CartItemCard,
222
222
  y as CategoryTab,
223
223
  l as Checkbox,