@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,199 @@
|
|
|
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 } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import "./tt-card.js";
|
|
10
|
+
import "./tt-image.js";
|
|
11
|
+
import "./tt-button.js";
|
|
12
|
+
let TTProfileCard = class TTProfileCard extends LitElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.name = "";
|
|
16
|
+
/*
|
|
17
|
+
The line under the name: a job title, a team. Was `role`, which every
|
|
18
|
+
element already has: it is the ARIA role, so <tt-profile-card
|
|
19
|
+
description="Engineer"> gave the host an invalid one. `description` is the
|
|
20
|
+
library's word for a secondary line.
|
|
21
|
+
*/
|
|
22
|
+
this.description = "";
|
|
23
|
+
// Identifies the card in tt-profile-action, like value on tt-product
|
|
24
|
+
// and tt-company-card. A name is not an identity: two people share one.
|
|
25
|
+
this.value = "";
|
|
26
|
+
this.image = "";
|
|
27
|
+
this.imageAlt = "";
|
|
28
|
+
this.buttonLabel = "View Profile";
|
|
29
|
+
this.orientation = "vertical";
|
|
30
|
+
}
|
|
31
|
+
static { this.styles = css `
|
|
32
|
+
/* The browser's own [hidden] rule loses to any :host display, so a
|
|
33
|
+
hidden element would still show. Important, so it always wins. */
|
|
34
|
+
:host([hidden]) {
|
|
35
|
+
display: none !important;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host {
|
|
39
|
+
display: block;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.profile {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--tt-space-5);
|
|
47
|
+
width: 100%;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
The card decides how big its own avatar is, because the card is what
|
|
53
|
+
knows it sits next to a name and a role. tt-image only decides that
|
|
54
|
+
the crop is square and the corner is round.
|
|
55
|
+
*/
|
|
56
|
+
.avatar {
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
width: 48px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Vertical */
|
|
62
|
+
|
|
63
|
+
.vertical {
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Horizontal */
|
|
69
|
+
|
|
70
|
+
.horizontal {
|
|
71
|
+
flex-direction: row;
|
|
72
|
+
text-align: left;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.info {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
gap: var(--tt-space-1);
|
|
79
|
+
min-width: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.name {
|
|
83
|
+
margin: 0;
|
|
84
|
+
|
|
85
|
+
color: var(--tt-foreground);
|
|
86
|
+
font-size: var(--tt-text-lg);
|
|
87
|
+
font-weight: var(--tt-weight-semibold);
|
|
88
|
+
line-height: var(--tt-leading-tight);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.role {
|
|
92
|
+
margin: 0;
|
|
93
|
+
|
|
94
|
+
color: var(--tt-muted-foreground);
|
|
95
|
+
font-size: var(--tt-text-sm);
|
|
96
|
+
line-height: var(--tt-leading-snug);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.actions {
|
|
100
|
+
margin-top: var(--tt-space-4);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.horizontal .actions {
|
|
104
|
+
margin-top: 0;
|
|
105
|
+
margin-left: auto;
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (max-width: 480px) {
|
|
110
|
+
.horizontal {
|
|
111
|
+
align-items: flex-start;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.horizontal tt-image {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.horizontal .actions {
|
|
119
|
+
margin-left: 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`; }
|
|
123
|
+
handleAction() {
|
|
124
|
+
this.dispatchEvent(new CustomEvent("tt-profile-action", {
|
|
125
|
+
bubbles: true,
|
|
126
|
+
composed: true,
|
|
127
|
+
detail: {
|
|
128
|
+
value: this.value,
|
|
129
|
+
name: this.name,
|
|
130
|
+
},
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
render() {
|
|
134
|
+
const layoutClass = this.orientation === "horizontal" ? "horizontal" : "vertical";
|
|
135
|
+
return html `
|
|
136
|
+
<tt-card variant="elevated" part="card">
|
|
137
|
+
<div class="profile ${layoutClass}">
|
|
138
|
+
|
|
139
|
+
<!-- ratio="1" keeps the crop square whatever the source is, and
|
|
140
|
+
the size comes from the CSS below, not from the image. -->
|
|
141
|
+
<tt-image
|
|
142
|
+
class="avatar"
|
|
143
|
+
src=${this.image}
|
|
144
|
+
alt=${this.imageAlt || this.name}
|
|
145
|
+
radius="full"
|
|
146
|
+
ratio="1"
|
|
147
|
+
></tt-image>
|
|
148
|
+
|
|
149
|
+
<div class="info">
|
|
150
|
+
<h2 class="name" part="name">${this.name}</h2>
|
|
151
|
+
|
|
152
|
+
${this.description
|
|
153
|
+
? html `<p class="role" part="description">${this.description}</p>`
|
|
154
|
+
: ""}
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div class="actions">
|
|
158
|
+
<!-- The name rides along in the accessible name: a page of
|
|
159
|
+
twelve cards is otherwise twelve identical buttons. The
|
|
160
|
+
visible text comes first (label in name). -->
|
|
161
|
+
<tt-button
|
|
162
|
+
label=${this.name ? `${this.buttonLabel}, ${this.name}` : this.buttonLabel}
|
|
163
|
+
@tt-button-click=${this.handleAction}
|
|
164
|
+
>
|
|
165
|
+
${this.buttonLabel}
|
|
166
|
+
</tt-button>
|
|
167
|
+
</div>
|
|
168
|
+
|
|
169
|
+
</div>
|
|
170
|
+
</tt-card>
|
|
171
|
+
`;
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
__decorate([
|
|
175
|
+
property({ type: String })
|
|
176
|
+
], TTProfileCard.prototype, "name", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
property({ type: String })
|
|
179
|
+
], TTProfileCard.prototype, "description", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ type: String })
|
|
182
|
+
], TTProfileCard.prototype, "value", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
property({ type: String })
|
|
185
|
+
], TTProfileCard.prototype, "image", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
property({ type: String, attribute: "image-alt" })
|
|
188
|
+
], TTProfileCard.prototype, "imageAlt", void 0);
|
|
189
|
+
__decorate([
|
|
190
|
+
property({ type: String, attribute: "button-label" })
|
|
191
|
+
], TTProfileCard.prototype, "buttonLabel", void 0);
|
|
192
|
+
__decorate([
|
|
193
|
+
property({ type: String })
|
|
194
|
+
], TTProfileCard.prototype, "orientation", void 0);
|
|
195
|
+
TTProfileCard = __decorate([
|
|
196
|
+
customElement("tt-profile-card")
|
|
197
|
+
], TTProfileCard);
|
|
198
|
+
export { TTProfileCard };
|
|
199
|
+
//# sourceMappingURL=tt-profile-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-profile-card.js","sourceRoot":"","sources":["../src/tt-profile-card.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AAKjB,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,UAAU;IAAtC;;QAEL,SAAI,GAAG,EAAE,CAAC;QAEV;;;;;UAKE;QAEF,gBAAW,GAAG,EAAE,CAAC;QAEjB,qEAAqE;QACrE,wEAAwE;QAExE,UAAK,GAAG,EAAE,CAAC;QAGX,UAAK,GAAG,EAAE,CAAC;QAGX,aAAQ,GAAG,EAAE,CAAC;QAGd,gBAAW,GAAG,cAAc,CAAC;QAG7B,gBAAW,GAA2B,UAAU,CAAC;IAsJnD,CAAC;aApJQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FlB,AA3FY,CA2FX;IAEM,YAAY;QAClB,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,mBAAmB,EAAE;YACnC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE;gBACN,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;SACF,CAAC,CACH,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,WAAW,GACf,IAAI,CAAC,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC;QAEhE,OAAO,IAAI,CAAA;;8BAEe,WAAW;;;;;;kBAMvB,IAAI,CAAC,KAAK;kBACV,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI;;;;;;2CAMD,IAAI,CAAC,IAAI;;cAEtC,IAAI,CAAC,WAAW;YAChB,CAAC,CAAC,IAAI,CAAA,sCAAsC,IAAI,CAAC,WAAW,MAAM;YAClE,CAAC,CAAC,EAAE;;;;;;;;sBAQI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW;iCACvD,IAAI,CAAC,YAAY;;gBAElC,IAAI,CAAC,WAAW;;;;;;KAM3B,CAAC;IACJ,CAAC;;AA/KD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACjB;AASV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACV;AAKjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAChB;AAGX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;+CACrC;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;kDACzB;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDACsB;AA5BtC,aAAa;IADzB,aAAa,CAAC,iBAAiB,CAAC;GACpB,aAAa,CAkLzB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* A labelled progress bar for a known quantity.
|
|
4
|
+
*
|
|
5
|
+
* Its highest-value use in a directory or SaaS product is a profile
|
|
6
|
+
* completeness meter. Listing quality is the product, and a visible
|
|
7
|
+
* "your profile is 60% complete" is the most effective nudge there is
|
|
8
|
+
* to improve it.
|
|
9
|
+
*/
|
|
10
|
+
export declare class TTProgress extends LitElement {
|
|
11
|
+
value: number;
|
|
12
|
+
max: number;
|
|
13
|
+
label: string;
|
|
14
|
+
showValue: boolean;
|
|
15
|
+
grade: boolean;
|
|
16
|
+
private get percent();
|
|
17
|
+
private get tone();
|
|
18
|
+
static styles: import("lit").CSSResult;
|
|
19
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
"tt-progress": TTProgress;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=tt-progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-progress.d.ts","sourceRoot":"","sources":["../src/tt-progress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;GAOG;AACH,qBACa,UAAW,SAAQ,UAAU;IACZ,KAAK,SAAK;IAEV,GAAG,SAAO;IAEV,KAAK,SAAM;IAGe,SAAS,UAAS;IAG3C,KAAK,UAAS;IAE3C,OAAO,KAAK,OAAO,GAIlB;IAED,OAAO,KAAK,IAAI,GAMf;IAED,MAAM,CAAC,MAAM,0BAuDX;IAEF,MAAM;CAqCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|
|
@@ -0,0 +1,156 @@
|
|
|
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 } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
/**
|
|
10
|
+
* A labelled progress bar for a known quantity.
|
|
11
|
+
*
|
|
12
|
+
* Its highest-value use in a directory or SaaS product is a profile
|
|
13
|
+
* completeness meter. Listing quality is the product, and a visible
|
|
14
|
+
* "your profile is 60% complete" is the most effective nudge there is
|
|
15
|
+
* to improve it.
|
|
16
|
+
*/
|
|
17
|
+
let TTProgress = class TTProgress extends LitElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.value = 0;
|
|
21
|
+
this.max = 100;
|
|
22
|
+
this.label = "";
|
|
23
|
+
// Show the percentage next to the label.
|
|
24
|
+
this.showValue = false;
|
|
25
|
+
// Colour by how far along it is: low is a problem, high is done.
|
|
26
|
+
this.grade = false;
|
|
27
|
+
}
|
|
28
|
+
get percent() {
|
|
29
|
+
if (this.max <= 0)
|
|
30
|
+
return 0;
|
|
31
|
+
// Clamped, so bad data cannot draw a bar past its track.
|
|
32
|
+
return Math.min(100, Math.max(0, (this.value / this.max) * 100));
|
|
33
|
+
}
|
|
34
|
+
get tone() {
|
|
35
|
+
if (!this.grade)
|
|
36
|
+
return "";
|
|
37
|
+
const p = this.percent;
|
|
38
|
+
if (p < 34)
|
|
39
|
+
return "low";
|
|
40
|
+
if (p < 67)
|
|
41
|
+
return "mid";
|
|
42
|
+
return "high";
|
|
43
|
+
}
|
|
44
|
+
static { this.styles = css `
|
|
45
|
+
/* The browser's own [hidden] rule loses to any :host display, so a
|
|
46
|
+
hidden element would still show. Important, so it always wins. */
|
|
47
|
+
:host([hidden]) {
|
|
48
|
+
display: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host {
|
|
52
|
+
display: block;
|
|
53
|
+
font-family: var(--tt-font-sans);
|
|
54
|
+
|
|
55
|
+
--_color: var(--tt-primary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.row {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: baseline;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
gap: var(--tt-space-3);
|
|
63
|
+
|
|
64
|
+
margin-bottom: var(--tt-space-2);
|
|
65
|
+
|
|
66
|
+
font-size: var(--tt-text-sm);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.label {
|
|
70
|
+
color: var(--tt-foreground);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.value {
|
|
74
|
+
color: var(--tt-muted-foreground);
|
|
75
|
+
font-variant-numeric: tabular-nums;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.track {
|
|
79
|
+
height: 8px;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
|
|
82
|
+
background: var(--tt-muted);
|
|
83
|
+
border-radius: var(--tt-radius-full);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.fill {
|
|
87
|
+
height: 100%;
|
|
88
|
+
|
|
89
|
+
background: var(--_color);
|
|
90
|
+
border-radius: var(--tt-radius-full);
|
|
91
|
+
|
|
92
|
+
transition: width var(--tt-duration-slow) var(--tt-ease-out);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.fill.low { --_color: var(--tt-destructive); }
|
|
96
|
+
.fill.mid { --_color: var(--tt-warning); }
|
|
97
|
+
.fill.high { --_color: var(--tt-success); }
|
|
98
|
+
|
|
99
|
+
`; }
|
|
100
|
+
render() {
|
|
101
|
+
const percent = this.percent;
|
|
102
|
+
return html `
|
|
103
|
+
${this.label || this.showValue
|
|
104
|
+
? html `
|
|
105
|
+
<div class="row">
|
|
106
|
+
<span class="label" part="label">${this.label}</span>
|
|
107
|
+
|
|
108
|
+
${this.showValue
|
|
109
|
+
? html `<span class="value">${Math.round(percent)}%</span>`
|
|
110
|
+
: ""}
|
|
111
|
+
</div>
|
|
112
|
+
`
|
|
113
|
+
: ""}
|
|
114
|
+
|
|
115
|
+
<!--
|
|
116
|
+
role=progressbar with the aria-value attributes is what makes this
|
|
117
|
+
readable to a screen reader. A styled div alone announces nothing.
|
|
118
|
+
-->
|
|
119
|
+
<div
|
|
120
|
+
class="track"
|
|
121
|
+
part="track"
|
|
122
|
+
role="progressbar"
|
|
123
|
+
aria-valuenow=${Math.round(percent)}
|
|
124
|
+
aria-valuemin="0"
|
|
125
|
+
aria-valuemax="100"
|
|
126
|
+
aria-label=${this.label || "Progress"}
|
|
127
|
+
>
|
|
128
|
+
<div
|
|
129
|
+
class="fill ${this.tone}"
|
|
130
|
+
part="fill"
|
|
131
|
+
style=${`width:${percent}%`}
|
|
132
|
+
></div>
|
|
133
|
+
</div>
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
__decorate([
|
|
138
|
+
property({ type: Number })
|
|
139
|
+
], TTProgress.prototype, "value", void 0);
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: Number })
|
|
142
|
+
], TTProgress.prototype, "max", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: String })
|
|
145
|
+
], TTProgress.prototype, "label", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
property({ type: Boolean, attribute: "show-value" })
|
|
148
|
+
], TTProgress.prototype, "showValue", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
property({ type: Boolean })
|
|
151
|
+
], TTProgress.prototype, "grade", void 0);
|
|
152
|
+
TTProgress = __decorate([
|
|
153
|
+
customElement("tt-progress")
|
|
154
|
+
], TTProgress);
|
|
155
|
+
export { TTProgress };
|
|
156
|
+
//# sourceMappingURL=tt-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-progress.js","sourceRoot":"","sources":["../src/tt-progress.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;GAOG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QACuB,UAAK,GAAG,CAAC,CAAC;QAEV,QAAG,GAAG,GAAG,CAAC;QAEV,UAAK,GAAG,EAAE,CAAC;QAEvC,yCAAyC;QACa,cAAS,GAAG,KAAK,CAAC;QAExE,iEAAiE;QACpC,UAAK,GAAG,KAAK,CAAC;IA8G7C,CAAC;IA5GC,IAAY,OAAO;QACjB,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC;QAC5B,yDAAyD;QACzD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,IAAY,IAAI;QACd,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QACvB,IAAI,CAAC,GAAG,EAAE;YAAE,OAAO,KAAK,CAAC;QACzB,IAAI,CAAC,GAAG,EAAE;YAAE,OAAO,KAAK,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;aAEM,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDlB,AAvDY,CAuDX;IAEF,MAAM;QACJ,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE7B,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,SAAS;YAC5B,CAAC,CAAC,IAAI,CAAA;;iDAEmC,IAAI,CAAC,KAAK;;gBAE3C,IAAI,CAAC,SAAS;gBACd,CAAC,CAAC,IAAI,CAAA,uBAAuB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU;gBAC1D,CAAC,CAAC,EAAE;;WAET;YACH,CAAC,CAAC,EAAE;;;;;;;;;;wBAUY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;;;qBAGtB,IAAI,CAAC,KAAK,IAAI,UAAU;;;wBAGrB,IAAI,CAAC,IAAI;;kBAEf,SAAS,OAAO,GAAG;;;KAGhC,CAAC;IACJ,CAAC;;AAvH2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAW;AAEV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCAAW;AAEV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAAY;AAGe;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CAAmB;AAG3C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;yCAAe;AAXhC,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CAyHtB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { PropertyValues } from "lit";
|
|
3
|
+
import "./tt-icon.js";
|
|
4
|
+
export declare class TTQuantity extends LitElement {
|
|
5
|
+
static formAssociated: boolean;
|
|
6
|
+
private internals;
|
|
7
|
+
name: string;
|
|
8
|
+
value: number;
|
|
9
|
+
min: number;
|
|
10
|
+
max: number;
|
|
11
|
+
step: number;
|
|
12
|
+
label: string;
|
|
13
|
+
labelHidden: boolean;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
size: "small" | "medium" | "large";
|
|
16
|
+
private inputId;
|
|
17
|
+
get form(): HTMLFormElement | null;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
formResetCallback(): void;
|
|
20
|
+
formStateRestoreCallback(state: string): void;
|
|
21
|
+
updated(changed: PropertyValues): void;
|
|
22
|
+
private commit;
|
|
23
|
+
private nudge;
|
|
24
|
+
private handleInput;
|
|
25
|
+
private handleBlur;
|
|
26
|
+
private handleKeydown;
|
|
27
|
+
focus(options?: FocusOptions): void;
|
|
28
|
+
static styles: import("lit").CSSResult[];
|
|
29
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
30
|
+
}
|
|
31
|
+
declare global {
|
|
32
|
+
interface HTMLElementTagNameMap {
|
|
33
|
+
"tt-quantity": TTQuantity;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=tt-quantity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-quantity.d.ts","sourceRoot":"","sources":["../src/tt-quantity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C,OAAO,cAAc,CAAC;AAItB,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,cAAc,UAAQ;IAE7B,OAAO,CAAC,SAAS,CAA0B;IAG3C,IAAI,SAAM;IAGV,KAAK,SAAK;IAGV,GAAG,SAAK;IAGR,GAAG,SAAY;IAGf,IAAI,SAAK;IAGT,KAAK,SAAM;IAIX,WAAW,UAAS;IAGpB,QAAQ,UAAS;IAKjB,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAY;IAE9C,OAAO,CAAC,OAAO,CAA0B;IAEzC,IAAI,IAAI,2BAEP;IAED,iBAAiB;IAMjB,iBAAiB;IAIjB,wBAAwB,CAAC,KAAK,EAAE,MAAM;IAQtC,OAAO,CAAC,OAAO,EAAE,cAAc;IAM/B,OAAO,CAAC,MAAM;IAqBd,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,aAAa;IAYrB,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY;IAM5B,MAAM,CAAC,MAAM,4BA8LV;IAEH,MAAM;CA4EP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}
|