@tartaguti/ui-components 0.0.0-stage → 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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +192 -2
- package/THIRD-PARTY-NOTICES.md +29 -0
- package/custom-elements.json +16731 -0
- package/dist/accordion/tt-accordion-item.d.ts +32 -0
- package/dist/accordion/tt-accordion-item.d.ts.map +1 -0
- package/dist/accordion/tt-accordion-item.js +247 -0
- package/dist/accordion/tt-accordion-item.js.map +1 -0
- package/dist/accordion/tt-accordion.d.ts +28 -0
- package/dist/accordion/tt-accordion.d.ts.map +1 -0
- package/dist/accordion/tt-accordion.js +148 -0
- package/dist/accordion/tt-accordion.js.map +1 -0
- package/dist/bento/tt-bento-item.d.ts +35 -0
- package/dist/bento/tt-bento-item.d.ts.map +1 -0
- package/dist/bento/tt-bento-item.js +201 -0
- package/dist/bento/tt-bento-item.js.map +1 -0
- package/dist/bento/tt-bento.d.ts +25 -0
- package/dist/bento/tt-bento.d.ts.map +1 -0
- package/dist/bento/tt-bento.js +314 -0
- package/dist/bento/tt-bento.js.map +1 -0
- package/dist/floating.d.ts +61 -0
- package/dist/floating.d.ts.map +1 -0
- package/dist/floating.js +120 -0
- package/dist/floating.js.map +1 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +96 -0
- package/dist/index.js.map +1 -0
- package/dist/interaction/tt-draggable.d.ts +29 -0
- package/dist/interaction/tt-draggable.d.ts.map +1 -0
- package/dist/interaction/tt-draggable.js +66 -0
- package/dist/interaction/tt-draggable.js.map +1 -0
- package/dist/interaction/tt-droppable.d.ts +37 -0
- package/dist/interaction/tt-droppable.d.ts.map +1 -0
- package/dist/interaction/tt-droppable.js +108 -0
- package/dist/interaction/tt-droppable.js.map +1 -0
- package/dist/interaction/tt-resizable.d.ts +45 -0
- package/dist/interaction/tt-resizable.d.ts.map +1 -0
- package/dist/interaction/tt-resizable.js +210 -0
- package/dist/interaction/tt-resizable.js.map +1 -0
- package/dist/interaction/tt-reveal.d.ts +54 -0
- package/dist/interaction/tt-reveal.d.ts.map +1 -0
- package/dist/interaction/tt-reveal.js +302 -0
- package/dist/interaction/tt-reveal.js.map +1 -0
- package/dist/motion.d.ts +8 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +49 -0
- package/dist/motion.js.map +1 -0
- package/dist/overlay.d.ts +7 -0
- package/dist/overlay.d.ts.map +1 -0
- package/dist/overlay.js +121 -0
- package/dist/overlay.js.map +1 -0
- package/dist/safe-url.d.ts +14 -0
- package/dist/safe-url.d.ts.map +1 -0
- package/dist/safe-url.js +46 -0
- package/dist/safe-url.js.map +1 -0
- package/dist/scroll-lock.d.ts +22 -0
- package/dist/scroll-lock.d.ts.map +1 -0
- package/dist/scroll-lock.js +56 -0
- package/dist/scroll-lock.js.map +1 -0
- package/dist/sidebar/tt-menu-group.d.ts +69 -0
- package/dist/sidebar/tt-menu-group.d.ts.map +1 -0
- package/dist/sidebar/tt-menu-group.js +358 -0
- package/dist/sidebar/tt-menu-group.js.map +1 -0
- package/dist/sidebar/tt-menu-item.d.ts +70 -0
- package/dist/sidebar/tt-menu-item.d.ts.map +1 -0
- package/dist/sidebar/tt-menu-item.js +502 -0
- package/dist/sidebar/tt-menu-item.js.map +1 -0
- package/dist/sidebar/tt-sidebar-footer.d.ts +39 -0
- package/dist/sidebar/tt-sidebar-footer.d.ts.map +1 -0
- package/dist/sidebar/tt-sidebar-footer.js +205 -0
- package/dist/sidebar/tt-sidebar-footer.js.map +1 -0
- package/dist/sidebar/tt-sidebar-header.d.ts +31 -0
- package/dist/sidebar/tt-sidebar-header.d.ts.map +1 -0
- package/dist/sidebar/tt-sidebar-header.js +150 -0
- package/dist/sidebar/tt-sidebar-header.js.map +1 -0
- package/dist/sidebar/tt-sidebar.d.ts +72 -0
- package/dist/sidebar/tt-sidebar.d.ts.map +1 -0
- package/dist/sidebar/tt-sidebar.js +539 -0
- package/dist/sidebar/tt-sidebar.js.map +1 -0
- package/dist/sr-only.d.ts +15 -0
- package/dist/sr-only.d.ts.map +1 -0
- package/dist/sr-only.js +27 -0
- package/dist/sr-only.js.map +1 -0
- package/dist/tokens.css +1124 -0
- package/dist/tt-alert.d.ts +26 -0
- package/dist/tt-alert.d.ts.map +1 -0
- package/dist/tt-alert.js +165 -0
- package/dist/tt-alert.js.map +1 -0
- package/dist/tt-aspect-ratio.d.ts +40 -0
- package/dist/tt-aspect-ratio.d.ts.map +1 -0
- package/dist/tt-aspect-ratio.js +98 -0
- package/dist/tt-aspect-ratio.js.map +1 -0
- package/dist/tt-auth.d.ts +75 -0
- package/dist/tt-auth.d.ts.map +1 -0
- package/dist/tt-auth.js +520 -0
- package/dist/tt-auth.js.map +1 -0
- package/dist/tt-avatar.d.ts +26 -0
- package/dist/tt-avatar.d.ts.map +1 -0
- package/dist/tt-avatar.js +169 -0
- package/dist/tt-avatar.js.map +1 -0
- package/dist/tt-badge.d.ts +36 -0
- package/dist/tt-badge.d.ts.map +1 -0
- package/dist/tt-badge.js +135 -0
- package/dist/tt-badge.js.map +1 -0
- package/dist/tt-breadcrumbs.d.ts +22 -0
- package/dist/tt-breadcrumbs.d.ts.map +1 -0
- package/dist/tt-breadcrumbs.js +144 -0
- package/dist/tt-breadcrumbs.js.map +1 -0
- package/dist/tt-button-group.d.ts +32 -0
- package/dist/tt-button-group.d.ts.map +1 -0
- package/dist/tt-button-group.js +132 -0
- package/dist/tt-button-group.js.map +1 -0
- package/dist/tt-button.d.ts +31 -0
- package/dist/tt-button.d.ts.map +1 -0
- package/dist/tt-button.js +483 -0
- package/dist/tt-button.js.map +1 -0
- package/dist/tt-card.d.ts +26 -0
- package/dist/tt-card.d.ts.map +1 -0
- package/dist/tt-card.js +429 -0
- package/dist/tt-card.js.map +1 -0
- package/dist/tt-chart.d.ts +36 -0
- package/dist/tt-chart.d.ts.map +1 -0
- package/dist/tt-chart.js +332 -0
- package/dist/tt-chart.js.map +1 -0
- package/dist/tt-checkbox-group.d.ts +38 -0
- package/dist/tt-checkbox-group.d.ts.map +1 -0
- package/dist/tt-checkbox-group.js +243 -0
- package/dist/tt-checkbox-group.js.map +1 -0
- package/dist/tt-checkbox.d.ts +35 -0
- package/dist/tt-checkbox.d.ts.map +1 -0
- package/dist/tt-checkbox.js +354 -0
- package/dist/tt-checkbox.js.map +1 -0
- package/dist/tt-code-block.d.ts +37 -0
- package/dist/tt-code-block.d.ts.map +1 -0
- package/dist/tt-code-block.js +409 -0
- package/dist/tt-code-block.js.map +1 -0
- package/dist/tt-collapsible.d.ts +71 -0
- package/dist/tt-collapsible.d.ts.map +1 -0
- package/dist/tt-collapsible.js +206 -0
- package/dist/tt-collapsible.js.map +1 -0
- package/dist/tt-combobox.d.ts +107 -0
- package/dist/tt-combobox.d.ts.map +1 -0
- package/dist/tt-combobox.js +816 -0
- package/dist/tt-combobox.js.map +1 -0
- package/dist/tt-company-card.d.ts +30 -0
- package/dist/tt-company-card.d.ts.map +1 -0
- package/dist/tt-company-card.js +382 -0
- package/dist/tt-company-card.js.map +1 -0
- package/dist/tt-comparison-table.d.ts +59 -0
- package/dist/tt-comparison-table.d.ts.map +1 -0
- package/dist/tt-comparison-table.js +441 -0
- package/dist/tt-comparison-table.js.map +1 -0
- package/dist/tt-component-doc.d.ts +63 -0
- package/dist/tt-component-doc.d.ts.map +1 -0
- package/dist/tt-component-doc.js +585 -0
- package/dist/tt-component-doc.js.map +1 -0
- package/dist/tt-confirm.d.ts +45 -0
- package/dist/tt-confirm.d.ts.map +1 -0
- package/dist/tt-confirm.js +151 -0
- package/dist/tt-confirm.js.map +1 -0
- package/dist/tt-contact-list.d.ts +18 -0
- package/dist/tt-contact-list.d.ts.map +1 -0
- package/dist/tt-contact-list.js +101 -0
- package/dist/tt-contact-list.js.map +1 -0
- package/dist/tt-copy-button.d.ts +25 -0
- package/dist/tt-copy-button.d.ts.map +1 -0
- package/dist/tt-copy-button.js +194 -0
- package/dist/tt-copy-button.js.map +1 -0
- package/dist/tt-data-table.d.ts +69 -0
- package/dist/tt-data-table.d.ts.map +1 -0
- package/dist/tt-data-table.js +542 -0
- package/dist/tt-data-table.js.map +1 -0
- package/dist/tt-divider.d.ts +19 -0
- package/dist/tt-divider.d.ts.map +1 -0
- package/dist/tt-divider.js +104 -0
- package/dist/tt-divider.js.map +1 -0
- package/dist/tt-drawer.d.ts +38 -0
- package/dist/tt-drawer.d.ts.map +1 -0
- package/dist/tt-drawer.js +433 -0
- package/dist/tt-drawer.js.map +1 -0
- package/dist/tt-dropdown-menu.d.ts +57 -0
- package/dist/tt-dropdown-menu.d.ts.map +1 -0
- package/dist/tt-dropdown-menu.js +631 -0
- package/dist/tt-dropdown-menu.js.map +1 -0
- package/dist/tt-empty-state.d.ts +13 -0
- package/dist/tt-empty-state.d.ts.map +1 -0
- package/dist/tt-empty-state.js +94 -0
- package/dist/tt-empty-state.js.map +1 -0
- package/dist/tt-example.d.ts +33 -0
- package/dist/tt-example.d.ts.map +1 -0
- package/dist/tt-example.js +250 -0
- package/dist/tt-example.js.map +1 -0
- package/dist/tt-file-upload.d.ts +85 -0
- package/dist/tt-file-upload.d.ts.map +1 -0
- package/dist/tt-file-upload.js +662 -0
- package/dist/tt-file-upload.js.map +1 -0
- package/dist/tt-filter.d.ts +62 -0
- package/dist/tt-filter.d.ts.map +1 -0
- package/dist/tt-filter.js +393 -0
- package/dist/tt-filter.js.map +1 -0
- package/dist/tt-form.d.ts +33 -0
- package/dist/tt-form.d.ts.map +1 -0
- package/dist/tt-form.js +202 -0
- package/dist/tt-form.js.map +1 -0
- package/dist/tt-grid.d.ts +22 -0
- package/dist/tt-grid.d.ts.map +1 -0
- package/dist/tt-grid.js +106 -0
- package/dist/tt-grid.js.map +1 -0
- package/dist/tt-icon.d.ts +20 -0
- package/dist/tt-icon.d.ts.map +1 -0
- package/dist/tt-icon.js +510 -0
- package/dist/tt-icon.js.map +1 -0
- package/dist/tt-image.d.ts +59 -0
- package/dist/tt-image.d.ts.map +1 -0
- package/dist/tt-image.js +314 -0
- package/dist/tt-image.js.map +1 -0
- package/dist/tt-inbox.d.ts +45 -0
- package/dist/tt-inbox.d.ts.map +1 -0
- package/dist/tt-inbox.js +275 -0
- package/dist/tt-inbox.js.map +1 -0
- package/dist/tt-input.d.ts +43 -0
- package/dist/tt-input.d.ts.map +1 -0
- package/dist/tt-input.js +476 -0
- package/dist/tt-input.js.map +1 -0
- package/dist/tt-kbd.d.ts +39 -0
- package/dist/tt-kbd.d.ts.map +1 -0
- package/dist/tt-kbd.js +145 -0
- package/dist/tt-kbd.js.map +1 -0
- package/dist/tt-key-values.d.ts +17 -0
- package/dist/tt-key-values.d.ts.map +1 -0
- package/dist/tt-key-values.js +126 -0
- package/dist/tt-key-values.js.map +1 -0
- package/dist/tt-knowledge-doc.d.ts +24 -0
- package/dist/tt-knowledge-doc.d.ts.map +1 -0
- package/dist/tt-knowledge-doc.js +120 -0
- package/dist/tt-knowledge-doc.js.map +1 -0
- package/dist/tt-layout.d.ts +36 -0
- package/dist/tt-layout.d.ts.map +1 -0
- package/dist/tt-layout.js +318 -0
- package/dist/tt-layout.js.map +1 -0
- package/dist/tt-modal.d.ts +32 -0
- package/dist/tt-modal.d.ts.map +1 -0
- package/dist/tt-modal.js +553 -0
- package/dist/tt-modal.js.map +1 -0
- package/dist/tt-navbar.d.ts +33 -0
- package/dist/tt-navbar.d.ts.map +1 -0
- package/dist/tt-navbar.js +390 -0
- package/dist/tt-navbar.js.map +1 -0
- package/dist/tt-page-header.d.ts +28 -0
- package/dist/tt-page-header.d.ts.map +1 -0
- package/dist/tt-page-header.js +166 -0
- package/dist/tt-page-header.js.map +1 -0
- package/dist/tt-page.d.ts +14 -0
- package/dist/tt-page.d.ts.map +1 -0
- package/dist/tt-page.js +163 -0
- package/dist/tt-page.js.map +1 -0
- package/dist/tt-pagination.d.ts +27 -0
- package/dist/tt-pagination.d.ts.map +1 -0
- package/dist/tt-pagination.js +194 -0
- package/dist/tt-pagination.js.map +1 -0
- package/dist/tt-preview.d.ts +11 -0
- package/dist/tt-preview.d.ts.map +1 -0
- package/dist/tt-preview.js +68 -0
- package/dist/tt-preview.js.map +1 -0
- package/dist/tt-product.d.ts +40 -0
- package/dist/tt-product.d.ts.map +1 -0
- package/dist/tt-product.js +590 -0
- package/dist/tt-product.js.map +1 -0
- package/dist/tt-profile-card.d.ts +23 -0
- package/dist/tt-profile-card.d.ts.map +1 -0
- package/dist/tt-profile-card.js +199 -0
- package/dist/tt-profile-card.js.map +1 -0
- package/dist/tt-progress.d.ts +26 -0
- package/dist/tt-progress.d.ts.map +1 -0
- package/dist/tt-progress.js +156 -0
- package/dist/tt-progress.js.map +1 -0
- package/dist/tt-quantity.d.ts +36 -0
- package/dist/tt-quantity.d.ts.map +1 -0
- package/dist/tt-quantity.js +396 -0
- package/dist/tt-quantity.js.map +1 -0
- package/dist/tt-radio-group.d.ts +50 -0
- package/dist/tt-radio-group.d.ts.map +1 -0
- package/dist/tt-radio-group.js +372 -0
- package/dist/tt-radio-group.js.map +1 -0
- package/dist/tt-rating.d.ts +54 -0
- package/dist/tt-rating.d.ts.map +1 -0
- package/dist/tt-rating.js +312 -0
- package/dist/tt-rating.js.map +1 -0
- package/dist/tt-search.d.ts +47 -0
- package/dist/tt-search.d.ts.map +1 -0
- package/dist/tt-search.js +360 -0
- package/dist/tt-search.js.map +1 -0
- package/dist/tt-section.d.ts +13 -0
- package/dist/tt-section.d.ts.map +1 -0
- package/dist/tt-section.js +98 -0
- package/dist/tt-section.js.map +1 -0
- package/dist/tt-select.d.ts +62 -0
- package/dist/tt-select.d.ts.map +1 -0
- package/dist/tt-select.js +662 -0
- package/dist/tt-select.js.map +1 -0
- package/dist/tt-skeleton.d.ts +20 -0
- package/dist/tt-skeleton.d.ts.map +1 -0
- package/dist/tt-skeleton.js +143 -0
- package/dist/tt-skeleton.js.map +1 -0
- package/dist/tt-slider.d.ts +74 -0
- package/dist/tt-slider.d.ts.map +1 -0
- package/dist/tt-slider.js +426 -0
- package/dist/tt-slider.js.map +1 -0
- package/dist/tt-social-links.d.ts +34 -0
- package/dist/tt-social-links.d.ts.map +1 -0
- package/dist/tt-social-links.js +242 -0
- package/dist/tt-social-links.js.map +1 -0
- package/dist/tt-sparkline.d.ts +19 -0
- package/dist/tt-sparkline.d.ts.map +1 -0
- package/dist/tt-sparkline.js +191 -0
- package/dist/tt-sparkline.js.map +1 -0
- package/dist/tt-spinner.d.ts +19 -0
- package/dist/tt-spinner.d.ts.map +1 -0
- package/dist/tt-spinner.js +93 -0
- package/dist/tt-spinner.js.map +1 -0
- package/dist/tt-stack.d.ts +42 -0
- package/dist/tt-stack.d.ts.map +1 -0
- package/dist/tt-stack.js +158 -0
- package/dist/tt-stack.js.map +1 -0
- package/dist/tt-stat.d.ts +17 -0
- package/dist/tt-stat.d.ts.map +1 -0
- package/dist/tt-stat.js +134 -0
- package/dist/tt-stat.js.map +1 -0
- package/dist/tt-switch.d.ts +39 -0
- package/dist/tt-switch.d.ts.map +1 -0
- package/dist/tt-switch.js +254 -0
- package/dist/tt-switch.js.map +1 -0
- package/dist/tt-switcher.d.ts +23 -0
- package/dist/tt-switcher.d.ts.map +1 -0
- package/dist/tt-switcher.js +203 -0
- package/dist/tt-switcher.js.map +1 -0
- package/dist/tt-table-cell.d.ts +26 -0
- package/dist/tt-table-cell.d.ts.map +1 -0
- package/dist/tt-table-cell.js +121 -0
- package/dist/tt-table-cell.js.map +1 -0
- package/dist/tt-table-row.d.ts +31 -0
- package/dist/tt-table-row.d.ts.map +1 -0
- package/dist/tt-table-row.js +72 -0
- package/dist/tt-table-row.js.map +1 -0
- package/dist/tt-table.d.ts +44 -0
- package/dist/tt-table.d.ts.map +1 -0
- package/dist/tt-table.js +270 -0
- package/dist/tt-table.js.map +1 -0
- package/dist/tt-tabs.d.ts +31 -0
- package/dist/tt-tabs.d.ts.map +1 -0
- package/dist/tt-tabs.js +223 -0
- package/dist/tt-tabs.js.map +1 -0
- package/dist/tt-tag-list.d.ts +19 -0
- package/dist/tt-tag-list.d.ts.map +1 -0
- package/dist/tt-tag-list.js +136 -0
- package/dist/tt-tag-list.js.map +1 -0
- package/dist/tt-text.d.ts +52 -0
- package/dist/tt-text.d.ts.map +1 -0
- package/dist/tt-text.js +337 -0
- package/dist/tt-text.js.map +1 -0
- package/dist/tt-textarea.d.ts +43 -0
- package/dist/tt-textarea.d.ts.map +1 -0
- package/dist/tt-textarea.js +356 -0
- package/dist/tt-textarea.js.map +1 -0
- package/dist/tt-thread.d.ts +62 -0
- package/dist/tt-thread.d.ts.map +1 -0
- package/dist/tt-thread.js +374 -0
- package/dist/tt-thread.js.map +1 -0
- package/dist/tt-toast.d.ts +49 -0
- package/dist/tt-toast.d.ts.map +1 -0
- package/dist/tt-toast.js +440 -0
- package/dist/tt-toast.js.map +1 -0
- package/dist/tt-toggle-group.d.ts +73 -0
- package/dist/tt-toggle-group.d.ts.map +1 -0
- package/dist/tt-toggle-group.js +273 -0
- package/dist/tt-toggle-group.js.map +1 -0
- package/dist/tt-toggle.d.ts +54 -0
- package/dist/tt-toggle.d.ts.map +1 -0
- package/dist/tt-toggle.js +232 -0
- package/dist/tt-toggle.js.map +1 -0
- package/dist/tt-toolbar.d.ts +26 -0
- package/dist/tt-toolbar.d.ts.map +1 -0
- package/dist/tt-toolbar.js +164 -0
- package/dist/tt-toolbar.js.map +1 -0
- package/dist/tt-tooltip.d.ts +42 -0
- package/dist/tt-tooltip.d.ts.map +1 -0
- package/dist/tt-tooltip.js +299 -0
- package/dist/tt-tooltip.js.map +1 -0
- package/package.json +84 -4
- package/vscode.html-custom-data.json +2907 -0
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css, nothing } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
11
|
+
import { srOnly } from "./sr-only.js";
|
|
12
|
+
import { openSafely } from "./safe-url.js";
|
|
13
|
+
import "./tt-card.js";
|
|
14
|
+
import "./tt-image.js";
|
|
15
|
+
import "./tt-button.js";
|
|
16
|
+
import "./tt-icon.js";
|
|
17
|
+
let TTProduct = class TTProduct extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.src = "";
|
|
21
|
+
this.ratio = "1";
|
|
22
|
+
this.orientation = "vertical";
|
|
23
|
+
this.variant = "default";
|
|
24
|
+
this.layout = "standard";
|
|
25
|
+
this.heading = "";
|
|
26
|
+
this.description = "";
|
|
27
|
+
this.descriptionLines = 2;
|
|
28
|
+
this.price = "";
|
|
29
|
+
this.wasPrice = "";
|
|
30
|
+
this.rating = "";
|
|
31
|
+
this.value = "";
|
|
32
|
+
this.buttonLink = "";
|
|
33
|
+
this.buttonLabel = "Add to basket";
|
|
34
|
+
this.disabled = false;
|
|
35
|
+
}
|
|
36
|
+
handleClick() {
|
|
37
|
+
if (this.disabled)
|
|
38
|
+
return;
|
|
39
|
+
this.dispatchEvent(new CustomEvent("tt-product-action", {
|
|
40
|
+
detail: { value: this.value, heading: this.heading },
|
|
41
|
+
bubbles: true,
|
|
42
|
+
composed: true,
|
|
43
|
+
}));
|
|
44
|
+
if (this.buttonLink)
|
|
45
|
+
openSafely(this.buttonLink);
|
|
46
|
+
}
|
|
47
|
+
static { this.styles = [srOnly, css `
|
|
48
|
+
/* The browser's own [hidden] rule loses to any :host display, so a
|
|
49
|
+
hidden element would still show. Important, so it always wins. */
|
|
50
|
+
:host([hidden]) {
|
|
51
|
+
display: none !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host {
|
|
55
|
+
display: block;
|
|
56
|
+
width: 100%;
|
|
57
|
+
height: 100%;
|
|
58
|
+
font-family: var(--tt-font-sans);
|
|
59
|
+
text-align: start;
|
|
60
|
+
|
|
61
|
+
--_name: var(--tt-text-sm);
|
|
62
|
+
--_price: var(--tt-text-md);
|
|
63
|
+
--_card-radius: var(--tt-radius-lg);
|
|
64
|
+
--_surface: var(--tt-card);
|
|
65
|
+
--_border: var(--tt-border);
|
|
66
|
+
--_shadow: none;
|
|
67
|
+
--_content-gap: var(--tt-space-2);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host([orientation="horizontal"]) {
|
|
71
|
+
--_name: var(--tt-text-md);
|
|
72
|
+
--_price: var(--tt-text-lg);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([variant="minimal"]) {
|
|
76
|
+
--_surface: transparent;
|
|
77
|
+
--_border: transparent;
|
|
78
|
+
--_shadow: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host([variant="elevated"]) {
|
|
82
|
+
--_shadow: var(--tt-elevation-1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:host([variant="featured"]) {
|
|
86
|
+
--_card-radius: var(--tt-radius-xl);
|
|
87
|
+
--_shadow: var(--tt-elevation-1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
tt-card {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
height: 100%;
|
|
94
|
+
/* tt-card's own radius knob, so its padding presets and
|
|
95
|
+
--tt-radius-nested follow the product's radius. */
|
|
96
|
+
--tt-card-radius: var(--_card-radius);
|
|
97
|
+
transition: transform var(--tt-duration-normal) var(--tt-ease-out);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/*
|
|
101
|
+
The SURFACE is styled through tt-card's "card" part.
|
|
102
|
+
|
|
103
|
+
These used to be set on the tt-card host, but tt-card draws its
|
|
104
|
+
background, border and shadow on an element inside its own shadow
|
|
105
|
+
root, which a rule on the host never reaches. So every variant
|
|
106
|
+
looked the same: "minimal" still drew a white card with a border.
|
|
107
|
+
::part() is the one door a component opens for exactly this.
|
|
108
|
+
*/
|
|
109
|
+
tt-card::part(card) {
|
|
110
|
+
background: var(--_surface);
|
|
111
|
+
border-color: var(--_border);
|
|
112
|
+
box-shadow: var(--_shadow);
|
|
113
|
+
overflow: hidden; /* clips the image to the card's corners */
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:host(:hover:not([disabled])) tt-card {
|
|
117
|
+
transform: translateY(-2px);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:host([variant="minimal"]:hover) tt-card {
|
|
121
|
+
transform: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* One rung up on hover, as tt-card's own elevated variant does. */
|
|
125
|
+
:host([variant="elevated"]:hover:not([disabled])) tt-card::part(card),
|
|
126
|
+
:host([variant="featured"]:hover:not([disabled])) tt-card::part(card) {
|
|
127
|
+
box-shadow: var(--tt-elevation-2);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ---------- media (Square corners) ---------- */
|
|
131
|
+
|
|
132
|
+
.media {
|
|
133
|
+
position: relative;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
background: var(--tt-muted);
|
|
136
|
+
border-radius: 0; /* Zero radius on images */
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
tt-image {
|
|
140
|
+
display: block;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: 100%;
|
|
143
|
+
object-fit: cover;
|
|
144
|
+
transition: transform var(--tt-duration-slow) var(--tt-ease-out);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
:host(:hover:not([disabled])) tt-image {
|
|
148
|
+
transform: scale(1.035);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (pointer: coarse) {
|
|
152
|
+
:host(:hover) tt-image {
|
|
153
|
+
transform: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.badge {
|
|
158
|
+
position: absolute;
|
|
159
|
+
inset-block-start: var(--tt-space-2);
|
|
160
|
+
inset-inline-start: var(--tt-space-2);
|
|
161
|
+
z-index: 2;
|
|
162
|
+
max-width: calc(100% - var(--tt-space-4));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.badge ::slotted(*) {
|
|
166
|
+
box-shadow: var(--tt-elevation-1);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ---------- body & typography ---------- */
|
|
170
|
+
|
|
171
|
+
.body {
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
flex: 1;
|
|
175
|
+
min-width: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
h2 {
|
|
179
|
+
margin: 0;
|
|
180
|
+
display: -webkit-box;
|
|
181
|
+
-webkit-line-clamp: 2;
|
|
182
|
+
-webkit-box-orient: vertical;
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
|
|
185
|
+
font-size: var(--_name);
|
|
186
|
+
font-weight: var(--tt-weight-semibold);
|
|
187
|
+
line-height: var(--tt-leading-snug);
|
|
188
|
+
letter-spacing: -0.012em;
|
|
189
|
+
color: var(--tt-foreground);
|
|
190
|
+
overflow-wrap: break-word;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.price {
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: baseline;
|
|
196
|
+
flex-wrap: wrap;
|
|
197
|
+
gap: var(--tt-space-2);
|
|
198
|
+
margin-top: var(--_content-gap);
|
|
199
|
+
|
|
200
|
+
font-size: var(--_price);
|
|
201
|
+
font-weight: var(--tt-weight-bold);
|
|
202
|
+
letter-spacing: -0.025em;
|
|
203
|
+
color: var(--tt-foreground);
|
|
204
|
+
font-variant-numeric: tabular-nums;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.was {
|
|
208
|
+
font-size: var(--tt-text-xs);
|
|
209
|
+
font-weight: var(--tt-weight-regular);
|
|
210
|
+
text-decoration: line-through;
|
|
211
|
+
color: var(--tt-muted-foreground);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
p {
|
|
215
|
+
margin: var(--_content-gap) 0 0;
|
|
216
|
+
display: -webkit-box;
|
|
217
|
+
-webkit-line-clamp: var(--_desc-lines, 2);
|
|
218
|
+
-webkit-box-orient: vertical;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
|
|
221
|
+
font-size: var(--tt-text-sm);
|
|
222
|
+
line-height: var(--tt-leading-snug);
|
|
223
|
+
color: var(--tt-muted-foreground);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.rating {
|
|
227
|
+
display: inline-flex;
|
|
228
|
+
align-items: center;
|
|
229
|
+
gap: var(--tt-space-1);
|
|
230
|
+
min-width: 0;
|
|
231
|
+
|
|
232
|
+
font-size: var(--tt-text-xs);
|
|
233
|
+
color: var(--tt-muted-foreground);
|
|
234
|
+
font-variant-numeric: tabular-nums;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.rating tt-icon {
|
|
238
|
+
color: var(--tt-warning);
|
|
239
|
+
flex: 0 0 auto;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* ---------- vertical / standard ---------- */
|
|
243
|
+
|
|
244
|
+
:host([orientation="vertical"]) .media {
|
|
245
|
+
margin-bottom: var(--tt-space-3);
|
|
246
|
+
border-radius: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
:host([orientation="vertical"]) .price,
|
|
250
|
+
:host([orientation="vertical"]) p {
|
|
251
|
+
margin-top: var(--tt-space-1);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.foot {
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: var(--tt-space-2);
|
|
258
|
+
min-width: 0;
|
|
259
|
+
margin-top: auto;
|
|
260
|
+
padding-top: var(--tt-space-3);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.foot .rating {
|
|
264
|
+
margin-top: 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.foot > tt-button {
|
|
268
|
+
margin-inline-start: auto;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* ---------- vertical / compact ---------- */
|
|
272
|
+
|
|
273
|
+
/* tt-card's padding variables, not padding on its host: host padding
|
|
274
|
+
lands OUTSIDE the card's border and left a gap around it. */
|
|
275
|
+
:host([orientation="vertical"][layout="compact"]) tt-card {
|
|
276
|
+
--tt-card-padding-x: var(--tt-space-2);
|
|
277
|
+
--tt-card-padding-y: var(--tt-space-2);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
:host([orientation="vertical"][layout="compact"]) .media {
|
|
281
|
+
margin-bottom: var(--tt-space-2);
|
|
282
|
+
border-radius: 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
:host([orientation="vertical"][layout="compact"]) .price,
|
|
286
|
+
:host([orientation="vertical"][layout="compact"]) p {
|
|
287
|
+
margin-top: 2px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* ---------- vertical / overlay ---------- */
|
|
291
|
+
|
|
292
|
+
:host([orientation="vertical"][layout="overlay"]) tt-card {
|
|
293
|
+
position: relative;
|
|
294
|
+
--tt-card-padding-x: 0px;
|
|
295
|
+
--tt-card-padding-y: 0px;
|
|
296
|
+
--tt-card-gap: 0px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
:host([orientation="vertical"][layout="overlay"]) .media {
|
|
300
|
+
margin: 0;
|
|
301
|
+
height: 100%;
|
|
302
|
+
border-radius: 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
:host([orientation="vertical"][layout="overlay"]) .body {
|
|
306
|
+
position: absolute;
|
|
307
|
+
inset-inline: 0;
|
|
308
|
+
inset-block-end: 0;
|
|
309
|
+
z-index: 2;
|
|
310
|
+
padding: var(--tt-space-4);
|
|
311
|
+
|
|
312
|
+
/*
|
|
313
|
+
Text ON A PHOTO, the one place in the library where colour is
|
|
314
|
+
deliberately not themed: the scrim below is always dark, whatever
|
|
315
|
+
the theme, so the text on it is always light. These literals are
|
|
316
|
+
that decision, written once. (The colour here used to be
|
|
317
|
+
--tt-card-foreground, which is DARK in the light theme: any text
|
|
318
|
+
not overridden below came out dark on the dark scrim.)
|
|
319
|
+
*/
|
|
320
|
+
--_on-image: oklch(1 0 0);
|
|
321
|
+
--_on-image-muted: oklch(1 0 0 / 0.85);
|
|
322
|
+
color: var(--_on-image);
|
|
323
|
+
background: linear-gradient(
|
|
324
|
+
to top,
|
|
325
|
+
oklch(0 0 0 / 0.85) 0%,
|
|
326
|
+
oklch(0 0 0 / 0.45) 60%,
|
|
327
|
+
transparent 100%
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
:host([orientation="vertical"][layout="overlay"]) h2,
|
|
332
|
+
:host([orientation="vertical"][layout="overlay"]) .price {
|
|
333
|
+
color: var(--_on-image);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
:host([orientation="vertical"][layout="overlay"]) p,
|
|
337
|
+
:host([orientation="vertical"][layout="overlay"]) .rating {
|
|
338
|
+
color: var(--_on-image-muted);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* ---------- horizontal ---------- */
|
|
342
|
+
|
|
343
|
+
.row {
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: stretch;
|
|
346
|
+
min-height: 7rem;
|
|
347
|
+
width: 100%;
|
|
348
|
+
overflow: hidden;
|
|
349
|
+
border-radius: inherit;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.row .media {
|
|
353
|
+
flex: 0 0 34%;
|
|
354
|
+
max-width: 13.75rem;
|
|
355
|
+
border-radius: 0;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.column {
|
|
359
|
+
display: flex;
|
|
360
|
+
flex: 1;
|
|
361
|
+
flex-direction: column;
|
|
362
|
+
min-width: 0;
|
|
363
|
+
padding: var(--tt-space-4);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.actions {
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: center;
|
|
369
|
+
justify-content: space-between;
|
|
370
|
+
margin-top: auto;
|
|
371
|
+
padding-top: var(--tt-space-3);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
:host([orientation="horizontal"][layout="compact"]) .row {
|
|
375
|
+
min-height: 5.5rem;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
:host([orientation="horizontal"][layout="compact"]) .column {
|
|
379
|
+
padding: var(--tt-space-3);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
:host([orientation="horizontal"][variant="minimal"]) .row {
|
|
383
|
+
border: 1px solid var(--tt-border);
|
|
384
|
+
background: var(--tt-card);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
:host([orientation="horizontal"][variant="featured"]) .row {
|
|
388
|
+
min-height: 8.5rem;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/* ---------- disabled ---------- */
|
|
392
|
+
|
|
393
|
+
:host([disabled]) {
|
|
394
|
+
opacity: var(--tt-opacity-disabled);
|
|
395
|
+
pointer-events: none;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@media (max-width: 32.5rem) {
|
|
399
|
+
:host([orientation="horizontal"]) .row {
|
|
400
|
+
min-height: 6rem;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
:host([orientation="horizontal"]) .row .media {
|
|
404
|
+
flex-basis: 31%;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
:host([orientation="horizontal"]) .column {
|
|
408
|
+
padding: var(--tt-space-3);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
`]; }
|
|
412
|
+
renderMedia(inTile) {
|
|
413
|
+
return html `
|
|
414
|
+
<div
|
|
415
|
+
class="media"
|
|
416
|
+
part="media"
|
|
417
|
+
slot=${ifDefined(inTile ? "image" : undefined)}
|
|
418
|
+
>
|
|
419
|
+
<div class="badge"><slot name="badge"></slot></div>
|
|
420
|
+
|
|
421
|
+
<tt-image
|
|
422
|
+
part="image"
|
|
423
|
+
radius="none"
|
|
424
|
+
ratio=${this.ratio}
|
|
425
|
+
src=${this.src}
|
|
426
|
+
alt=${this.heading}
|
|
427
|
+
></tt-image>
|
|
428
|
+
</div>
|
|
429
|
+
`;
|
|
430
|
+
}
|
|
431
|
+
renderRating() {
|
|
432
|
+
return this.rating
|
|
433
|
+
? html `
|
|
434
|
+
<div class="rating" part="rating">
|
|
435
|
+
<tt-icon name="star" size="12px"></tt-icon>
|
|
436
|
+
<span>${this.rating}</span>
|
|
437
|
+
</div>
|
|
438
|
+
`
|
|
439
|
+
: nothing;
|
|
440
|
+
}
|
|
441
|
+
renderBody(withRating = false) {
|
|
442
|
+
const descStyles = styleMap({
|
|
443
|
+
"--_desc-lines": String(this.descriptionLines),
|
|
444
|
+
});
|
|
445
|
+
return html `
|
|
446
|
+
<div class="body" part="body">
|
|
447
|
+
<h2 part="heading">${this.heading}</h2>
|
|
448
|
+
|
|
449
|
+
${this.price
|
|
450
|
+
? html `
|
|
451
|
+
<div class="price" part="price">
|
|
452
|
+
<span>${this.price}</span>${this.wasPrice
|
|
453
|
+
? html `<span class="was"
|
|
454
|
+
><span class="sr-only">Was </span>${this.wasPrice}</span
|
|
455
|
+
>`
|
|
456
|
+
: nothing}
|
|
457
|
+
</div>
|
|
458
|
+
`
|
|
459
|
+
: nothing}
|
|
460
|
+
|
|
461
|
+
${this.description
|
|
462
|
+
? html `
|
|
463
|
+
<p part="description" style=${descStyles}>${this.description}
|
|
464
|
+
</p>
|
|
465
|
+
`
|
|
466
|
+
: nothing}
|
|
467
|
+
|
|
468
|
+
${!withRating
|
|
469
|
+
? html `
|
|
470
|
+
<div class="foot" part="foot">
|
|
471
|
+
${this.renderRating()}${this.renderQuickAdd()}
|
|
472
|
+
</div>
|
|
473
|
+
`
|
|
474
|
+
: nothing}
|
|
475
|
+
</div>
|
|
476
|
+
`;
|
|
477
|
+
}
|
|
478
|
+
/*
|
|
479
|
+
The button's accessible name carries the product: "Add to basket,
|
|
480
|
+
Linen lamp". A grid of twelve products otherwise reads as twelve
|
|
481
|
+
identical "Add to basket" buttons, which is what the docs said it did
|
|
482
|
+
not do. The visible text comes first, so the name still starts with
|
|
483
|
+
what a sighted user sees (WCAG 2.5.3, label in name).
|
|
484
|
+
*/
|
|
485
|
+
get actionName() {
|
|
486
|
+
return this.heading ? `${this.buttonLabel}, ${this.heading}` : this.buttonLabel;
|
|
487
|
+
}
|
|
488
|
+
renderQuickAdd() {
|
|
489
|
+
return html `
|
|
490
|
+
<tt-button
|
|
491
|
+
class="quick-add"
|
|
492
|
+
part="button"
|
|
493
|
+
pill
|
|
494
|
+
size="small"
|
|
495
|
+
label=${this.actionName}
|
|
496
|
+
?disabled=${this.disabled}
|
|
497
|
+
@tt-button-click=${this.handleClick}
|
|
498
|
+
>
|
|
499
|
+
<tt-icon name="shopping-bag"></tt-icon>
|
|
500
|
+
</tt-button>
|
|
501
|
+
`;
|
|
502
|
+
}
|
|
503
|
+
renderButton() {
|
|
504
|
+
return html `
|
|
505
|
+
<tt-button
|
|
506
|
+
part="button"
|
|
507
|
+
size="small"
|
|
508
|
+
label=${this.actionName}
|
|
509
|
+
?disabled=${this.disabled}
|
|
510
|
+
@tt-button-click=${this.handleClick}
|
|
511
|
+
>
|
|
512
|
+
${this.buttonLabel}
|
|
513
|
+
</tt-button>
|
|
514
|
+
`;
|
|
515
|
+
}
|
|
516
|
+
render() {
|
|
517
|
+
if (this.orientation === "horizontal") {
|
|
518
|
+
return html `
|
|
519
|
+
<tt-card part="card" padding="none">
|
|
520
|
+
<div class="row">
|
|
521
|
+
${this.renderMedia(false)}
|
|
522
|
+
<div class="column">
|
|
523
|
+
${this.renderBody(true)}
|
|
524
|
+
<div class="actions">
|
|
525
|
+
${this.renderRating()}
|
|
526
|
+
${this.renderButton()}
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
</div>
|
|
530
|
+
</tt-card>
|
|
531
|
+
`;
|
|
532
|
+
}
|
|
533
|
+
return html `
|
|
534
|
+
<tt-card part="card" padding="small">
|
|
535
|
+
${this.renderMedia(true)}
|
|
536
|
+
${this.renderBody()}
|
|
537
|
+
</tt-card>
|
|
538
|
+
`;
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
__decorate([
|
|
542
|
+
property({ type: String })
|
|
543
|
+
], TTProduct.prototype, "src", void 0);
|
|
544
|
+
__decorate([
|
|
545
|
+
property({ type: String })
|
|
546
|
+
], TTProduct.prototype, "ratio", void 0);
|
|
547
|
+
__decorate([
|
|
548
|
+
property({ type: String, reflect: true })
|
|
549
|
+
], TTProduct.prototype, "orientation", void 0);
|
|
550
|
+
__decorate([
|
|
551
|
+
property({ type: String, reflect: true })
|
|
552
|
+
], TTProduct.prototype, "variant", void 0);
|
|
553
|
+
__decorate([
|
|
554
|
+
property({ type: String, reflect: true })
|
|
555
|
+
], TTProduct.prototype, "layout", void 0);
|
|
556
|
+
__decorate([
|
|
557
|
+
property({ type: String })
|
|
558
|
+
], TTProduct.prototype, "heading", void 0);
|
|
559
|
+
__decorate([
|
|
560
|
+
property({ type: String })
|
|
561
|
+
], TTProduct.prototype, "description", void 0);
|
|
562
|
+
__decorate([
|
|
563
|
+
property({ type: Number, attribute: "description-lines" })
|
|
564
|
+
], TTProduct.prototype, "descriptionLines", void 0);
|
|
565
|
+
__decorate([
|
|
566
|
+
property({ type: String })
|
|
567
|
+
], TTProduct.prototype, "price", void 0);
|
|
568
|
+
__decorate([
|
|
569
|
+
property({ type: String, attribute: "was-price" })
|
|
570
|
+
], TTProduct.prototype, "wasPrice", void 0);
|
|
571
|
+
__decorate([
|
|
572
|
+
property({ type: String })
|
|
573
|
+
], TTProduct.prototype, "rating", void 0);
|
|
574
|
+
__decorate([
|
|
575
|
+
property({ type: String })
|
|
576
|
+
], TTProduct.prototype, "value", void 0);
|
|
577
|
+
__decorate([
|
|
578
|
+
property({ type: String, attribute: "button-link" })
|
|
579
|
+
], TTProduct.prototype, "buttonLink", void 0);
|
|
580
|
+
__decorate([
|
|
581
|
+
property({ type: String, attribute: "button-label" })
|
|
582
|
+
], TTProduct.prototype, "buttonLabel", void 0);
|
|
583
|
+
__decorate([
|
|
584
|
+
property({ type: Boolean, reflect: true })
|
|
585
|
+
], TTProduct.prototype, "disabled", void 0);
|
|
586
|
+
TTProduct = __decorate([
|
|
587
|
+
customElement("tt-product")
|
|
588
|
+
], TTProduct);
|
|
589
|
+
export { TTProduct };
|
|
590
|
+
//# sourceMappingURL=tt-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-product.js","sourceRoot":"","sources":["../src/tt-product.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AAOf,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;IAAlC;;QACuB,QAAG,GAAG,EAAE,CAAC;QACT,UAAK,GAAG,GAAG,CAAC;QAGxC,gBAAW,GAAuB,UAAU,CAAC;QA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AEP;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CAAc;AACb;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAkB;AACe;IAA3D,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mDAAsB;AAErD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAY;AACa;IAAnD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;2CAAe;AACtC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAa;AAEZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCAAY;AACe;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;6CAAiB;AACf;IAAtD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;8CAA+B;AAEzC;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAAkB;AAzBlD,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA+hBrB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./tt-card.js";
|
|
3
|
+
import "./tt-image.js";
|
|
4
|
+
import "./tt-button.js";
|
|
5
|
+
export type ProfileCardOrientation = "vertical" | "horizontal";
|
|
6
|
+
export declare class TTProfileCard extends LitElement {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
value: string;
|
|
10
|
+
image: string;
|
|
11
|
+
imageAlt: string;
|
|
12
|
+
buttonLabel: string;
|
|
13
|
+
orientation: ProfileCardOrientation;
|
|
14
|
+
static styles: import("lit").CSSResult;
|
|
15
|
+
private handleAction;
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
"tt-profile-card": TTProfileCard;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=tt-profile-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-profile-card.d.ts","sourceRoot":"","sources":["../src/tt-profile-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AAExB,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE/D,qBACa,aAAc,SAAQ,UAAU;IAE3C,IAAI,SAAM;IASV,WAAW,SAAM;IAKjB,KAAK,SAAM;IAGX,KAAK,SAAM;IAGX,QAAQ,SAAM;IAGd,WAAW,SAAkB;IAG7B,WAAW,EAAE,sBAAsB,CAAc;IAEjD,MAAM,CAAC,MAAM,0BA2FX;IAEF,OAAO,CAAC,YAAY;IAapB,MAAM;CA0CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|