@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,205 @@
|
|
|
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 { property, customElement } from "lit/decorators.js";
|
|
9
|
+
/**
|
|
10
|
+
* The account row at the bottom of a sidebar.
|
|
11
|
+
*
|
|
12
|
+
* Goes in tt-sidebar's `footer` slot. Same shape as tt-sidebar-header on
|
|
13
|
+
* purpose: leading mark, two lines of text, trailing actions. Two rows
|
|
14
|
+
* that look alike should be built alike, or they drift apart the first
|
|
15
|
+
* time one of them is edited.
|
|
16
|
+
*
|
|
17
|
+
* <tt-sidebar-footer slot="footer" heading="Alex Rana" description="alex@x.com">
|
|
18
|
+
* <tt-avatar slot="leading" name="Alex Rana"></tt-avatar>
|
|
19
|
+
* <tt-button slot="actions" variant="ghost" size="small">...</tt-button>
|
|
20
|
+
* </tt-sidebar-footer>
|
|
21
|
+
*
|
|
22
|
+
* With `clickable` the whole row becomes one button and emits
|
|
23
|
+
* tt-sidebar-account, for the common case where clicking the account
|
|
24
|
+
* opens a menu. It is off by default because a row that looks clickable
|
|
25
|
+
* and is not is worse than a plain row, and most footers are plain.
|
|
26
|
+
*
|
|
27
|
+
* `clickable` and the `actions` slot work together, because the actions
|
|
28
|
+
* sit BESIDE the button rather than inside it. A button inside a button
|
|
29
|
+
* is invalid HTML, so the row is a container holding two siblings. Same
|
|
30
|
+
* arrangement as tt-menu-item, for the same reason.
|
|
31
|
+
*/
|
|
32
|
+
let TTSidebarFooter = class TTSidebarFooter extends LitElement {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.heading = "";
|
|
36
|
+
this.description = "";
|
|
37
|
+
this.clickable = false;
|
|
38
|
+
}
|
|
39
|
+
activate() {
|
|
40
|
+
this.dispatchEvent(new CustomEvent("tt-sidebar-account", {
|
|
41
|
+
bubbles: true,
|
|
42
|
+
composed: true,
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
static { this.styles = css `
|
|
46
|
+
/* The browser's own [hidden] rule loses to any :host display, so a
|
|
47
|
+
hidden element would still show. Important, so it always wins. */
|
|
48
|
+
:host([hidden]) {
|
|
49
|
+
display: none !important;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host {
|
|
53
|
+
display: block;
|
|
54
|
+
|
|
55
|
+
font-family: var(--tt-font-sans);
|
|
56
|
+
-webkit-font-smoothing: antialiased;
|
|
57
|
+
|
|
58
|
+
color: var(--tt-sidebar-foreground);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.wrap {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
|
|
65
|
+
width: 100%;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
|
|
68
|
+
border-radius: var(--tt-radius);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.row {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: var(--tt-menu-justify, flex-start);
|
|
75
|
+
gap: var(--tt-menu-gap, var(--tt-space-3));
|
|
76
|
+
|
|
77
|
+
flex: 1;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
min-width: 0;
|
|
80
|
+
|
|
81
|
+
padding: var(--tt-space-2);
|
|
82
|
+
|
|
83
|
+
border: none;
|
|
84
|
+
border-radius: var(--tt-radius);
|
|
85
|
+
background: transparent;
|
|
86
|
+
|
|
87
|
+
font: inherit;
|
|
88
|
+
text-align: left;
|
|
89
|
+
color: inherit;
|
|
90
|
+
|
|
91
|
+
transition: background var(--tt-duration-fast) var(--tt-ease-out);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
button.row {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
button.row:hover {
|
|
99
|
+
background: var(--tt-sidebar-accent);
|
|
100
|
+
color: var(--tt-sidebar-accent-foreground);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
button.row:focus-visible {
|
|
104
|
+
outline: var(--tt-ring-width) solid var(--tt-ring);
|
|
105
|
+
outline-offset: calc(var(--tt-ring-width) * -1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.leading {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.text {
|
|
115
|
+
display: grid;
|
|
116
|
+
grid-template-columns: var(--tt-menu-label-cols, 1fr);
|
|
117
|
+
|
|
118
|
+
flex: 1;
|
|
119
|
+
min-width: 0;
|
|
120
|
+
|
|
121
|
+
/* No transition. The width of the panel animates; the text does
|
|
122
|
+
not. See the note in tt-sidebar. */
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.text > .inner {
|
|
126
|
+
overflow: hidden;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.heading {
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
white-space: nowrap;
|
|
132
|
+
text-overflow: ellipsis;
|
|
133
|
+
|
|
134
|
+
font-size: var(--tt-text-sm);
|
|
135
|
+
font-weight: var(--tt-weight-semibold);
|
|
136
|
+
color: var(--tt-sidebar-foreground);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.sub {
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
white-space: nowrap;
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
|
|
144
|
+
font-size: var(--tt-text-xs);
|
|
145
|
+
color: var(--tt-muted-foreground);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.actions {
|
|
149
|
+
display: var(--tt-menu-trail-display, flex);
|
|
150
|
+
align-items: center;
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
}
|
|
153
|
+
`; }
|
|
154
|
+
renderInner() {
|
|
155
|
+
return html `
|
|
156
|
+
<span class="leading" part="leading"><slot name="leading"></slot></span>
|
|
157
|
+
|
|
158
|
+
<span class="text">
|
|
159
|
+
<span class="inner">
|
|
160
|
+
${this.heading
|
|
161
|
+
? html `<div class="heading" part="heading">${this.heading}</div>`
|
|
162
|
+
: nothing}
|
|
163
|
+
${this.description ? html `<div class="sub" part="description">${this.description}</div>` : nothing}
|
|
164
|
+
|
|
165
|
+
<slot></slot>
|
|
166
|
+
</span>
|
|
167
|
+
</span>
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
170
|
+
render() {
|
|
171
|
+
const inner = this.renderInner();
|
|
172
|
+
/*
|
|
173
|
+
The actions stay outside whichever element the row turns out to be,
|
|
174
|
+
so a clickable footer with a trailing menu button is still valid
|
|
175
|
+
markup and both controls are reachable by keyboard.
|
|
176
|
+
*/
|
|
177
|
+
return html `
|
|
178
|
+
<div class="wrap" part="row">
|
|
179
|
+
${this.clickable
|
|
180
|
+
? html `
|
|
181
|
+
<button class="row" type="button" @click=${this.activate}>
|
|
182
|
+
${inner}
|
|
183
|
+
</button>
|
|
184
|
+
`
|
|
185
|
+
: html `<div class="row">${inner}</div>`}
|
|
186
|
+
|
|
187
|
+
<span class="actions" part="actions"><slot name="actions"></slot></span>
|
|
188
|
+
</div>
|
|
189
|
+
`;
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
__decorate([
|
|
193
|
+
property({ type: String })
|
|
194
|
+
], TTSidebarFooter.prototype, "heading", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
property({ type: String })
|
|
197
|
+
], TTSidebarFooter.prototype, "description", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
property({ type: Boolean, reflect: true })
|
|
200
|
+
], TTSidebarFooter.prototype, "clickable", void 0);
|
|
201
|
+
TTSidebarFooter = __decorate([
|
|
202
|
+
customElement("tt-sidebar-footer")
|
|
203
|
+
], TTSidebarFooter);
|
|
204
|
+
export { TTSidebarFooter };
|
|
205
|
+
//# sourceMappingURL=tt-sidebar-footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-sidebar-footer.js","sourceRoot":"","sources":["../../src/sidebar/tt-sidebar-footer.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAEL,YAAO,GAAG,EAAE,CAAC;QAGb,gBAAW,GAAG,EAAE,CAAC;QAGjB,cAAS,GAAG,KAAK,CAAC;IAoKpB,CAAC;IAlKS,QAAQ;QACd,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,oBAAoB,EAAE;YACpC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;SACf,CAAC,CACH,CAAC;IACJ,CAAC;aAEM,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GlB,AA5GY,CA4GX;IAEM,WAAW;QACjB,OAAO,IAAI,CAAA;;;;;YAMH,IAAI,CAAC,OAAO;YACV,CAAC,CAAC,IAAI,CAAA,uCAAuC,IAAI,CAAC,OAAO,QAAQ;YACjE,CAAC,CAAC,OACN;YACE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAA,uCAAuC,IAAI,CAAC,WAAW,QAAQ,CAAC,CAAC,CAAC,OAAO;;;;;KAKvG,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAEjC;;;;UAIE;QACF,OAAO,IAAI,CAAA;;UAGL,IAAI,CAAC,SAAS;YACZ,CAAC,CAAC,IAAI,CAAA;2DACyC,IAAI,CAAC,QAAQ;oBACpD,KAAK;;eAEV;YACH,CAAC,CAAC,IAAI,CAAA,oBAAoB,KAAK,QACnC;;;;KAIH,CAAC;IACJ,CAAC;;AAzKD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACV;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDACzB;AARP,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CA4K3B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
/**
|
|
3
|
+
* The brand row at the top of a sidebar.
|
|
4
|
+
*
|
|
5
|
+
* Goes in tt-sidebar's `header` slot. It exists because every app puts
|
|
6
|
+
* the same three things there in the same order, and hand-rolling that
|
|
7
|
+
* row per app means three apps with three slightly different paddings.
|
|
8
|
+
*
|
|
9
|
+
* <tt-sidebar collapsible>
|
|
10
|
+
* <tt-sidebar-header slot="header" heading="Tartaguti" description="Base">
|
|
11
|
+
* <tt-avatar slot="leading" name="T"></tt-avatar>
|
|
12
|
+
* </tt-sidebar-header>
|
|
13
|
+
* </tt-sidebar>
|
|
14
|
+
*
|
|
15
|
+
* The `leading` slot survives rail mode and the text does not, which is
|
|
16
|
+
* the whole reason the mark is a separate slot rather than part of the
|
|
17
|
+
* heading. Same inherited-property channel as tt-menu-item; see the note
|
|
18
|
+
* at the top of tt-sidebar.
|
|
19
|
+
*/
|
|
20
|
+
export declare class TTSidebarHeader extends LitElement {
|
|
21
|
+
heading: string;
|
|
22
|
+
description: string;
|
|
23
|
+
static styles: import("lit").CSSResult;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
}
|
|
26
|
+
declare global {
|
|
27
|
+
interface HTMLElementTagNameMap {
|
|
28
|
+
"tt-sidebar-header": TTSidebarHeader;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=tt-sidebar-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-sidebar-header.d.ts","sourceRoot":"","sources":["../../src/sidebar/tt-sidebar-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAE7C,OAAO,SAAM;IAGb,WAAW,SAAM;IAEjB,MAAM,CAAC,MAAM,0BA2EX;IAEF,MAAM;CAkCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}
|
|
@@ -0,0 +1,150 @@
|
|
|
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 { property, customElement } from "lit/decorators.js";
|
|
9
|
+
/**
|
|
10
|
+
* The brand row at the top of a sidebar.
|
|
11
|
+
*
|
|
12
|
+
* Goes in tt-sidebar's `header` slot. It exists because every app puts
|
|
13
|
+
* the same three things there in the same order, and hand-rolling that
|
|
14
|
+
* row per app means three apps with three slightly different paddings.
|
|
15
|
+
*
|
|
16
|
+
* <tt-sidebar collapsible>
|
|
17
|
+
* <tt-sidebar-header slot="header" heading="Tartaguti" description="Base">
|
|
18
|
+
* <tt-avatar slot="leading" name="T"></tt-avatar>
|
|
19
|
+
* </tt-sidebar-header>
|
|
20
|
+
* </tt-sidebar>
|
|
21
|
+
*
|
|
22
|
+
* The `leading` slot survives rail mode and the text does not, which is
|
|
23
|
+
* the whole reason the mark is a separate slot rather than part of the
|
|
24
|
+
* heading. Same inherited-property channel as tt-menu-item; see the note
|
|
25
|
+
* at the top of tt-sidebar.
|
|
26
|
+
*/
|
|
27
|
+
let TTSidebarHeader = class TTSidebarHeader extends LitElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.heading = "";
|
|
31
|
+
this.description = "";
|
|
32
|
+
}
|
|
33
|
+
static { this.styles = css `
|
|
34
|
+
/* The browser's own [hidden] rule loses to any :host display, so a
|
|
35
|
+
hidden element would still show. Important, so it always wins. */
|
|
36
|
+
:host([hidden]) {
|
|
37
|
+
display: none !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:host {
|
|
41
|
+
display: block;
|
|
42
|
+
|
|
43
|
+
font-family: var(--tt-font-sans);
|
|
44
|
+
-webkit-font-smoothing: antialiased;
|
|
45
|
+
|
|
46
|
+
color: var(--tt-sidebar-foreground);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.row {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: var(--tt-menu-justify, flex-start);
|
|
53
|
+
gap: var(--tt-menu-gap, var(--tt-space-3));
|
|
54
|
+
|
|
55
|
+
min-width: 0;
|
|
56
|
+
padding: var(--tt-space-1) var(--tt-space-2);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.leading {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Collapses on the same track trick as a menu item label, so the
|
|
66
|
+
brand text slides away in step with every other label rather than
|
|
67
|
+
disappearing a beat early. */
|
|
68
|
+
.text {
|
|
69
|
+
display: grid;
|
|
70
|
+
grid-template-columns: var(--tt-menu-label-cols, 1fr);
|
|
71
|
+
|
|
72
|
+
flex: 1;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
|
|
75
|
+
/* No transition. The width of the panel animates; the text does
|
|
76
|
+
not. See the note in tt-sidebar. */
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.text > .inner {
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.heading {
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
|
|
88
|
+
font-size: var(--tt-text-sm);
|
|
89
|
+
font-weight: var(--tt-weight-bold);
|
|
90
|
+
letter-spacing: -0.01em;
|
|
91
|
+
color: var(--tt-sidebar-foreground);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sub {
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
white-space: nowrap;
|
|
97
|
+
text-overflow: ellipsis;
|
|
98
|
+
|
|
99
|
+
font-size: var(--tt-text-xs);
|
|
100
|
+
color: var(--tt-muted-foreground);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.actions {
|
|
104
|
+
display: var(--tt-menu-trail-display, flex);
|
|
105
|
+
align-items: center;
|
|
106
|
+
flex-shrink: 0;
|
|
107
|
+
}
|
|
108
|
+
`; }
|
|
109
|
+
render() {
|
|
110
|
+
return html `
|
|
111
|
+
<div class="row" part="row">
|
|
112
|
+
<span class="leading" part="leading"><slot name="leading"></slot></span>
|
|
113
|
+
|
|
114
|
+
<span class="text">
|
|
115
|
+
<span class="inner">
|
|
116
|
+
${this.heading
|
|
117
|
+
? html `<div class="heading" part="heading">
|
|
118
|
+
${this.heading}
|
|
119
|
+
</div>`
|
|
120
|
+
: nothing}
|
|
121
|
+
${this.description
|
|
122
|
+
? html `<div class="sub" part="description">${this.description}</div>`
|
|
123
|
+
: nothing}
|
|
124
|
+
|
|
125
|
+
<!--
|
|
126
|
+
The default slot is the escape hatch: a workspace switcher
|
|
127
|
+
or anything else that is not two lines of text. It renders
|
|
128
|
+
alongside the props rather than instead of them, so a
|
|
129
|
+
consumer can use either or both without a mode flag.
|
|
130
|
+
-->
|
|
131
|
+
<slot></slot>
|
|
132
|
+
</span>
|
|
133
|
+
</span>
|
|
134
|
+
|
|
135
|
+
<span class="actions" part="actions"><slot name="actions"></slot></span>
|
|
136
|
+
</div>
|
|
137
|
+
`;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
__decorate([
|
|
141
|
+
property({ type: String })
|
|
142
|
+
], TTSidebarHeader.prototype, "heading", void 0);
|
|
143
|
+
__decorate([
|
|
144
|
+
property({ type: String })
|
|
145
|
+
], TTSidebarHeader.prototype, "description", void 0);
|
|
146
|
+
TTSidebarHeader = __decorate([
|
|
147
|
+
customElement("tt-sidebar-header")
|
|
148
|
+
], TTSidebarHeader);
|
|
149
|
+
export { TTSidebarHeader };
|
|
150
|
+
//# sourceMappingURL=tt-sidebar-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-sidebar-header.js","sourceRoot":"","sources":["../../src/sidebar/tt-sidebar-header.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAEL,YAAO,GAAG,EAAE,CAAC;QAGb,gBAAW,GAAG,EAAE,CAAC;IAiHnB,CAAC;aA/GQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2ElB,AA3EY,CA2EX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;;;;cAOD,IAAI,CAAC,OAAO;YACV,CAAC,CAAC,IAAI,CAAA;sBACA,IAAI,CAAC,OAAO;yBACT;YACT,CAAC,CAAC,OACN;cAEE,IAAI,CAAC,WAAW;YACd,CAAC,CAAC,IAAI,CAAA,uCAAuC,IAAI,CAAC,WAAW,QAAQ;YACrE,CAAC,CAAC,OACN;;;;;;;;;;;;;;KAcP,CAAC;IACJ,CAAC;;AAnHD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oDACV;AALN,eAAe;IAD3B,aAAa,CAAC,mBAAmB,CAAC;GACtB,eAAe,CAsH3B"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import type { PropertyValues } from "lit";
|
|
3
|
+
import "../tt-icon.js";
|
|
4
|
+
export type SidebarVariant = "default" | "borderless" | "floating";
|
|
5
|
+
/**
|
|
6
|
+
* The navigation column of an app shell.
|
|
7
|
+
*
|
|
8
|
+
* ---------------------------------------------------------------------
|
|
9
|
+
* HOW COLLAPSING WORKS, AND WHY IT NEEDS NO PROPS.
|
|
10
|
+
*
|
|
11
|
+
* With `collapsible`, the sidebar can shrink to an icon rail. Everything
|
|
12
|
+
* inside it has to change at once: labels disappear, rows centre, group
|
|
13
|
+
* headings go, badges go, the indent goes. Passing that down would mean a
|
|
14
|
+
* `collapsed` prop on every child, kept in sync by hand, at every depth.
|
|
15
|
+
*
|
|
16
|
+
* Instead the collapsed state is published as ordinary CSS custom
|
|
17
|
+
* properties on the host, and each child reads the ones it cares about
|
|
18
|
+
* through var() with the expanded value as the fallback:
|
|
19
|
+
*
|
|
20
|
+
* --tt-menu-label-cols 1fr -> 0fr label track collapses
|
|
21
|
+
* --tt-menu-gap sp-2 -> 0px no gap beside nothing
|
|
22
|
+
* --tt-menu-justify start-> center icons centre in the rail
|
|
23
|
+
* --tt-menu-trail-display flex -> none badges and dots go
|
|
24
|
+
* --tt-menu-heading-display flex -> none group headings go
|
|
25
|
+
* --tt-menu-rail-rows unset-> 1fr every group forced open
|
|
26
|
+
* --tt-menu-rail-visibility unset-> visible ...and its items reachable
|
|
27
|
+
* --tt-menu-indent sp-2 -> 0px no nesting indent
|
|
28
|
+
*
|
|
29
|
+
* Custom properties inherit and they cross shadow boundaries, so this
|
|
30
|
+
* reaches a menu item nested three groups deep with no wiring, and a menu
|
|
31
|
+
* item used outside a sidebar simply gets the fallbacks. Same mechanism
|
|
32
|
+
* as --tt-radius-nested in tokens.css.
|
|
33
|
+
*
|
|
34
|
+
* They are declared in the stylesheet under :host([collapsed]) rather
|
|
35
|
+
* than written from JavaScript, and that matters: a media query can
|
|
36
|
+
* override a stylesheet rule, and cannot override an inline style. It is
|
|
37
|
+
* what lets the block at the bottom of this file switch the whole rail
|
|
38
|
+
* off on a phone, where the sidebar is a drawer and a rail would be an
|
|
39
|
+
* unusable 64px strip sliding over the page.
|
|
40
|
+
*
|
|
41
|
+
* ---------------------------------------------------------------------
|
|
42
|
+
* WHO OWNS `collapsed`.
|
|
43
|
+
*
|
|
44
|
+
* The component toggles itself and announces it with tt-sidebar-toggle,
|
|
45
|
+
* the same shape tt-menu-group uses for open/close. An app that wants to
|
|
46
|
+
* remember the choice listens for the event and writes the property back;
|
|
47
|
+
* one that does not gets working behaviour for free.
|
|
48
|
+
*/
|
|
49
|
+
export declare class TTSidebar extends LitElement {
|
|
50
|
+
variant: SidebarVariant;
|
|
51
|
+
width: number;
|
|
52
|
+
railWidth: number;
|
|
53
|
+
collapsible: boolean;
|
|
54
|
+
collapsed: boolean;
|
|
55
|
+
label: string;
|
|
56
|
+
collapseLabel: string;
|
|
57
|
+
expandLabel: string;
|
|
58
|
+
private hasHeader;
|
|
59
|
+
private hasFooter;
|
|
60
|
+
/** Flips the rail open or shut, and announces it. */
|
|
61
|
+
toggle(): void;
|
|
62
|
+
willUpdate(changed: PropertyValues): void;
|
|
63
|
+
private updateSlot;
|
|
64
|
+
static styles: import("lit").CSSResult;
|
|
65
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
66
|
+
}
|
|
67
|
+
declare global {
|
|
68
|
+
interface HTMLElementTagNameMap {
|
|
69
|
+
"tt-sidebar": TTSidebar;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=tt-sidebar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tt-sidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar/tt-sidebar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,qBACa,SAAU,SAAQ,UAAU;IAEvC,OAAO,EAAE,cAAc,CAAa;IAGpC,KAAK,SAAO;IAIZ,SAAS,SAAM;IAIf,WAAW,UAAS;IAGpB,SAAS,UAAS;IAQlB,KAAK,SAAU;IAGf,aAAa,SAAsB;IAGnC,WAAW,SAAoB;IAG/B,OAAO,CAAC,SAAS,CAAS;IAG1B,OAAO,CAAC,SAAS,CAAS;IAE1B,qDAAqD;IACrD,MAAM;IAYN,UAAU,CAAC,OAAO,EAAE,cAAc;IAUlC,OAAO,CAAC,UAAU;IAYlB,MAAM,CAAC,MAAM,0BAgWX;IAEF,MAAM;CAyDP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|