@tartaguti/ui-components 0.1.0 → 0.3.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 +43 -0
- package/README.md +12 -0
- package/custom-elements.json +2887 -823
- package/dist/accordion/tt-accordion-item.d.ts.map +1 -1
- package/dist/accordion/tt-accordion-item.js +5 -2
- package/dist/accordion/tt-accordion-item.js.map +1 -1
- package/dist/bento/tt-bento-item.d.ts.map +1 -1
- package/dist/bento/tt-bento-item.js +7 -13
- package/dist/bento/tt-bento-item.js.map +1 -1
- package/dist/docs.d.ts +7 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +15 -0
- package/dist/docs.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/sidebar/tt-menu-group.d.ts.map +1 -1
- package/dist/sidebar/tt-menu-group.js +16 -5
- package/dist/sidebar/tt-menu-group.js.map +1 -1
- package/dist/sidebar/tt-menu-item.d.ts.map +1 -1
- package/dist/sidebar/tt-menu-item.js +24 -11
- package/dist/sidebar/tt-menu-item.js.map +1 -1
- package/dist/sidebar/tt-sidebar-footer.d.ts.map +1 -1
- package/dist/sidebar/tt-sidebar-footer.js +7 -3
- package/dist/sidebar/tt-sidebar-footer.js.map +1 -1
- package/dist/sidebar/tt-sidebar.d.ts +8 -3
- package/dist/sidebar/tt-sidebar.d.ts.map +1 -1
- package/dist/sidebar/tt-sidebar.js +196 -44
- package/dist/sidebar/tt-sidebar.js.map +1 -1
- package/dist/strings.d.ts +64 -0
- package/dist/strings.d.ts.map +1 -0
- package/dist/strings.js +68 -0
- package/dist/strings.js.map +1 -0
- package/dist/tokens.css +30 -6
- package/dist/tt-alert.d.ts.map +1 -1
- package/dist/tt-alert.js +5 -2
- package/dist/tt-alert.js.map +1 -1
- package/dist/tt-auth.d.ts +5 -1
- package/dist/tt-auth.d.ts.map +1 -1
- package/dist/tt-auth.js +72 -10
- package/dist/tt-auth.js.map +1 -1
- package/dist/tt-breadcrumbs.d.ts.map +1 -1
- package/dist/tt-breadcrumbs.js +6 -3
- package/dist/tt-breadcrumbs.js.map +1 -1
- package/dist/tt-button-group.d.ts.map +1 -1
- package/dist/tt-button-group.js +7 -1
- package/dist/tt-button-group.js.map +1 -1
- package/dist/tt-button.d.ts.map +1 -1
- package/dist/tt-button.js +37 -28
- package/dist/tt-button.js.map +1 -1
- package/dist/tt-card.d.ts.map +1 -1
- package/dist/tt-card.js +9 -6
- package/dist/tt-card.js.map +1 -1
- package/dist/tt-chart.d.ts +10 -2
- package/dist/tt-chart.d.ts.map +1 -1
- package/dist/tt-chart.js +167 -29
- package/dist/tt-chart.js.map +1 -1
- package/dist/tt-checkbox.d.ts.map +1 -1
- package/dist/tt-checkbox.js +5 -2
- package/dist/tt-checkbox.js.map +1 -1
- package/dist/tt-code-block.d.ts +4 -5
- package/dist/tt-code-block.d.ts.map +1 -1
- package/dist/tt-code-block.js +53 -17
- package/dist/tt-code-block.js.map +1 -1
- package/dist/tt-combobox.d.ts +14 -0
- package/dist/tt-combobox.d.ts.map +1 -1
- package/dist/tt-combobox.js +234 -31
- package/dist/tt-combobox.js.map +1 -1
- package/dist/tt-company-card.d.ts +18 -0
- package/dist/tt-company-card.d.ts.map +1 -1
- package/dist/tt-company-card.js +73 -4
- package/dist/tt-company-card.js.map +1 -1
- package/dist/tt-comparison-table.d.ts.map +1 -1
- package/dist/tt-comparison-table.js +6 -3
- package/dist/tt-comparison-table.js.map +1 -1
- package/dist/tt-component-doc.d.ts.map +1 -1
- package/dist/tt-component-doc.js +6 -3
- package/dist/tt-component-doc.js.map +1 -1
- package/dist/tt-contact-list.d.ts +17 -2
- package/dist/tt-contact-list.d.ts.map +1 -1
- package/dist/tt-contact-list.js +68 -10
- package/dist/tt-contact-list.js.map +1 -1
- package/dist/tt-copy-button.d.ts.map +1 -1
- package/dist/tt-copy-button.js +6 -3
- package/dist/tt-copy-button.js.map +1 -1
- package/dist/tt-data-table.d.ts +32 -1
- package/dist/tt-data-table.d.ts.map +1 -1
- package/dist/tt-data-table.js +302 -16
- package/dist/tt-data-table.js.map +1 -1
- package/dist/tt-dock-item.d.ts +53 -0
- package/dist/tt-dock-item.d.ts.map +1 -0
- package/dist/tt-dock-item.js +270 -0
- package/dist/tt-dock-item.js.map +1 -0
- package/dist/tt-dock.d.ts +59 -0
- package/dist/tt-dock.d.ts.map +1 -0
- package/dist/tt-dock.js +337 -0
- package/dist/tt-dock.js.map +1 -0
- package/dist/tt-drawer.d.ts +4 -0
- package/dist/tt-drawer.d.ts.map +1 -1
- package/dist/tt-drawer.js +14 -4
- package/dist/tt-drawer.js.map +1 -1
- package/dist/tt-dropdown-menu.d.ts +5 -0
- package/dist/tt-dropdown-menu.d.ts.map +1 -1
- package/dist/tt-dropdown-menu.js +34 -8
- package/dist/tt-dropdown-menu.js.map +1 -1
- package/dist/tt-file-upload.d.ts +35 -0
- package/dist/tt-file-upload.d.ts.map +1 -1
- package/dist/tt-file-upload.js +210 -21
- package/dist/tt-file-upload.js.map +1 -1
- package/dist/tt-filter.d.ts.map +1 -1
- package/dist/tt-filter.js +10 -5
- package/dist/tt-filter.js.map +1 -1
- package/dist/tt-form.d.ts +25 -1
- package/dist/tt-form.d.ts.map +1 -1
- package/dist/tt-form.js +151 -12
- package/dist/tt-form.js.map +1 -1
- package/dist/tt-grid.d.ts +10 -1
- package/dist/tt-grid.d.ts.map +1 -1
- package/dist/tt-grid.js +38 -9
- package/dist/tt-grid.js.map +1 -1
- package/dist/tt-icon.d.ts.map +1 -1
- package/dist/tt-icon.js +5 -0
- package/dist/tt-icon.js.map +1 -1
- package/dist/tt-inbox.d.ts +4 -0
- package/dist/tt-inbox.d.ts.map +1 -1
- package/dist/tt-inbox.js +13 -3
- package/dist/tt-inbox.js.map +1 -1
- package/dist/tt-input.d.ts.map +1 -1
- package/dist/tt-input.js +15 -5
- package/dist/tt-input.js.map +1 -1
- package/dist/tt-key-values.d.ts +2 -0
- package/dist/tt-key-values.d.ts.map +1 -1
- package/dist/tt-key-values.js +45 -2
- package/dist/tt-key-values.js.map +1 -1
- package/dist/tt-layout.d.ts +53 -2
- package/dist/tt-layout.d.ts.map +1 -1
- package/dist/tt-layout.js +233 -27
- package/dist/tt-layout.js.map +1 -1
- package/dist/tt-modal.d.ts +4 -0
- package/dist/tt-modal.d.ts.map +1 -1
- package/dist/tt-modal.js +14 -4
- package/dist/tt-modal.js.map +1 -1
- package/dist/tt-navbar.d.ts +4 -0
- package/dist/tt-navbar.d.ts.map +1 -1
- package/dist/tt-navbar.js +42 -7
- package/dist/tt-navbar.js.map +1 -1
- package/dist/tt-pagination.d.ts +4 -0
- package/dist/tt-pagination.d.ts.map +1 -1
- package/dist/tt-pagination.js +8 -1
- package/dist/tt-pagination.js.map +1 -1
- package/dist/tt-product.d.ts +67 -15
- package/dist/tt-product.d.ts.map +1 -1
- package/dist/tt-product.js +447 -366
- package/dist/tt-product.js.map +1 -1
- package/dist/tt-progress.d.ts +1 -0
- package/dist/tt-progress.d.ts.map +1 -1
- package/dist/tt-progress.js +26 -7
- package/dist/tt-progress.js.map +1 -1
- package/dist/tt-quantity.d.ts.map +1 -1
- package/dist/tt-quantity.js +5 -2
- package/dist/tt-quantity.js.map +1 -1
- package/dist/tt-radio-group.d.ts.map +1 -1
- package/dist/tt-radio-group.js +5 -2
- package/dist/tt-radio-group.js.map +1 -1
- package/dist/tt-scroller.d.ts +76 -0
- package/dist/tt-scroller.d.ts.map +1 -0
- package/dist/tt-scroller.js +525 -0
- package/dist/tt-scroller.js.map +1 -0
- package/dist/tt-search.d.ts.map +1 -1
- package/dist/tt-search.js +10 -5
- package/dist/tt-search.js.map +1 -1
- package/dist/tt-select.d.ts +9 -0
- package/dist/tt-select.d.ts.map +1 -1
- package/dist/tt-select.js +99 -14
- package/dist/tt-select.js.map +1 -1
- package/dist/tt-slider.d.ts.map +1 -1
- package/dist/tt-slider.js +13 -2
- package/dist/tt-slider.js.map +1 -1
- package/dist/tt-social-links.d.ts.map +1 -1
- package/dist/tt-social-links.js +7 -4
- package/dist/tt-social-links.js.map +1 -1
- package/dist/tt-switcher.d.ts +2 -0
- package/dist/tt-switcher.d.ts.map +1 -1
- package/dist/tt-switcher.js +24 -76
- package/dist/tt-switcher.js.map +1 -1
- package/dist/tt-table-row.d.ts.map +1 -1
- package/dist/tt-table-row.js +5 -2
- package/dist/tt-table-row.js.map +1 -1
- package/dist/tt-table.d.ts.map +1 -1
- package/dist/tt-table.js +5 -2
- package/dist/tt-table.js.map +1 -1
- package/dist/tt-tabs.d.ts.map +1 -1
- package/dist/tt-tabs.js +5 -2
- package/dist/tt-tabs.js.map +1 -1
- package/dist/tt-tag-list.d.ts.map +1 -1
- package/dist/tt-tag-list.js +6 -3
- package/dist/tt-tag-list.js.map +1 -1
- package/dist/tt-textarea.d.ts.map +1 -1
- package/dist/tt-textarea.js +5 -2
- package/dist/tt-textarea.js.map +1 -1
- package/dist/tt-toast.d.ts +4 -1
- package/dist/tt-toast.d.ts.map +1 -1
- package/dist/tt-toast.js +40 -6
- package/dist/tt-toast.js.map +1 -1
- package/dist/tt-toggle-group.d.ts.map +1 -1
- package/dist/tt-toggle-group.js +7 -1
- package/dist/tt-toggle-group.js.map +1 -1
- package/dist/tt-toggle.d.ts.map +1 -1
- package/dist/tt-toggle.js +14 -9
- package/dist/tt-toggle.js.map +1 -1
- package/package.json +1 -1
- package/vscode.html-custom-data.json +241 -66
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @tartaguti/ui-components
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c710ef2: tt-auth: an unknown mode draws sign-in with one console warning instead of throwing and rendering nothing; kebab-case names (sign-in, sign-up, forgot-password, reset-password) work. New fields slot for extra sign-up fields, sent in tt-sign-up's detail.fields.
|
|
8
|
+
- 8d20455: `tt-chart` is colourful by default: `--tt-chart-1` to `-5` are now the content hues plus amber (blue, amber, purple, teal, pink), 3:1 or better against the card in light and dark, instead of five greys. It also repaints whenever those tokens change on the chart or any element around it (a `style`, a class such as `.dark`, a `data-theme`), not only on `<html>`, resolves palettes written with `color-mix()`, and never gives a pie's last slice the colour of the first one it touches.
|
|
9
|
+
- c710ef2: tt-company-card: status and status-variant show a tier badge after the name; new badge and meta slots.
|
|
10
|
+
- c710ef2: tt-contact-list: whatsapp (a wa.me link), email and role optional, primary lists the main contact first with a badge.
|
|
11
|
+
- 956641c: New `tt-dock` and `tt-dock-item`: a few big targets on one edge of the screen, a phone's tab bar (`variant="bar"`) or a floating pill (`variant="floating"`), on the `bottom`, `top`, `left` or `right` (`position`). It is a `<nav>` that marks the current item with `aria-current="page"` and moves it on a tap by itself, sends `tt-dock-select`, pads itself by the safe area of the edge it touches, and stays sticky in the flow so the last line of a page always scrolls clear of it. `labels-hidden` keeps the labels as names for a screen reader. More items than fit in a row scroll sideways on a `tt-scroller`.
|
|
12
|
+
|
|
13
|
+
`tt-scroller` now also measures and scrolls to items that another component passes into it through its own slot.
|
|
14
|
+
|
|
15
|
+
- c710ef2: tt-file-upload: setStatus(file, status) shows per-file upload progress, done, and failed with a reason and a Retry button (tt-retry { file }).
|
|
16
|
+
- 8d20455: `tt-key-values` has a `layout` attribute: `columns` (the default, as before) or `split`, which puts each value at the end of its label's row, like a receipt, and keeps the pair on one row on a phone. Its link underline on hover now applies only where the pointer can hover.
|
|
17
|
+
- 769e0a0: `tt-layout` gets `contained` (the page scrolls, the navbar and sidebar stay pinned, and the phone drawer opens inside the layout instead of against the window, so it works in a preview or a builder design) and a public `mobileMenuOpen` property, and announces the closes it decides itself (Escape, backdrop, menu click) with `tt-menu-toggle`. The phone drawer, the navbar's menu button inside the layout and the sidebar's drawer rules now follow the layout's own width (under 768px, so a 768px tablet keeps the column) instead of the window's, and the drawer sits under the real navbar height instead of a fixed 60px.
|
|
18
|
+
- c710ef2: Chart.js and Prism load the first time a tt-chart or tt-code-block is shown, not on import. The documentation components (tt-preview, tt-example, tt-code-block, tt-switcher, tt-component-doc, tt-knowledge-doc) moved out of the root import into "@tartaguti/ui-components/docs"; import that if you use them. The root import drops from about 208 KB to 134 KB gzipped.
|
|
19
|
+
- c710ef2: tt-select and tt-combobox: multiple with a values array. tt-select keeps the list open and marks choices; tt-combobox shows chips and Backspace removes the last. tt-change sends { values }, and a form gets one entry per value.
|
|
20
|
+
- 80e82b9: `tt-product` is reworked into one clean card with two choices that always look right: `orientation` (vertical tile or horizontal row) and the new `size` (`medium`, or `small` for two across on a phone, where the button becomes a round bag icon). New: `href` (the name becomes one link over the whole card), `clickable` (the card is one button that emits `tt-product-open`), `heading-level` (default 3), and the slots `media`, `meta` and `actions`, which add to the photo, rating and button rather than replace them. A sale reads as "Sale price X, was Y", the rating as "Rating 4.6", badges on the photo get the card behind them, and `disabled` (sold out) greys the photo and turns the button off but keeps the text readable and the link working. `tt-icon` gains a `heart`.
|
|
21
|
+
|
|
22
|
+
Moving from 0.2: `variant` and `layout` are removed (drop them; `layout="compact"` is now `size="small"`, and `layout="overlay"` has no replacement, since text on a photo failed contrast). `button-link` is removed: use `href`, which links the whole card in the same tab. An empty `button-label` now means no built-in button, and that button's own `tt-button-click` no longer escapes the card (listen for `tt-product-action`). The card no longer wraps tt-card, so style the surface through `::part(card)`; the `foot` part is now `actions`, plus new `link` and `meta` parts. The photo is decorative (`alt=""`), since the heading names the product.
|
|
23
|
+
|
|
24
|
+
- 8d20455: `tt-progress` has a `budget` attribute for "higher is worse": the bar is green under 75%, amber from 75% and red at the maximum or over, for spending, storage and quotas.
|
|
25
|
+
- 5758c56: New `tt-scroller`: children side by side in one row that scrolls sideways when they do not fit, with no scrollbar. The side that has more fades out, `controls` adds Scroll left and Scroll right arrows where a pointer can hover, Tab brings each child fully into view, and `snap` (start or center), `gap`, `item-width` and `label` cover chip rows and card shelves. `scrollToItem(item)` scrolls only the row, never the page.
|
|
26
|
+
|
|
27
|
+
`tt-switcher`'s tab row is now a `tt-scroller`: no scrollbar, a fade and an arrow say there is more, and a tab chosen in code no longer scrolls the page to the switcher. Its API is unchanged; the gap between tabs is now `--tt-space-2`.
|
|
28
|
+
|
|
29
|
+
- 769e0a0: `tt-sidebar` has a `sticky` option: the sidebar is one screen tall (`100dvh`, or `--tt-viewport-height`), stays put while the page scrolls beside it and scrolls its own menu, so its footer sits on the bottom edge and the collapse arrow is always in reach. It is not pinned on phones. Its hover styles (rows, group headings, the account row, the arrow, the scrollbar) now apply only where the pointer can hover.
|
|
30
|
+
- c710ef2: New strings registry: setStrings() replaces the text components write themselves (Verified, Close, Pagination, Clear selection, Chosen files, Actions, Unread, form messages and more) for the whole page, and each of those components takes a strings property for its own. tt-dropdown-menu's label now defaults to "" and shows the translated "Actions".
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- c710ef2: tt-form: collect() sends a tt-file-upload's files as files (it sent the text "on"); a failed check shows each control's message inline in the form's words and focuses the first, instead of the browser's bubble on the first field only. New setErrors({ field: message }) for server errors, validate() and clearErrors(). Controls slotted into a tt-form are collected too. tt-file-upload gains checkValidity(), so a required one blocks tt-form.
|
|
35
|
+
- c710ef2: tt-grid gap takes none, small, medium, large and spacing steps ("4" is --tt-space-4); a bare number used to give no gap. toast() mounts a tt-toast in <body> when the page has none, instead of only a console warning.
|
|
36
|
+
- 9b39854: Touch screens no longer keep a hover colour after a tap. Every hover style in the library (buttons, toggles, table and inbox rows, menu items, fields, cards, links and the rest) now applies only where the pointer can hover, `@media (hover: hover)`, so a tapped button or row goes back to its resting look. With a mouse nothing changes; focus rings and pressed states are as before.
|
|
37
|
+
- 83b427d: tt-sidebar: a collapsible sidebar is no longer cut off when it has less room than it asked for. The collapse arrow and the icon rail now work at every window width; they are switched off only in tt-layout's sidebar slot at 768px and below, where the sidebar is a drawer (before, every window up to 768px lost them, so a phone had no arrow while a wide phone on its side had one). An open collapsible sidebar no longer clips its rows and its arrow in a column narrower than its `width`, and the floating variant keeps its right edge: the content is held at full width only while the panel slides open. The sidebar also keeps its `width` in a flex row instead of being squeezed by the content beside it.
|
|
38
|
+
- 8d20455: `tt-toast` spans a phone's width (up to 480px) with a gutter each side in every position. The centred positions used to squeeze toasts into half the screen. The close button's hover colour now applies only where the pointer can hover.
|
|
39
|
+
|
|
40
|
+
## 0.2.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- 4e3b89f: tt-data-table can be virtualized: `visible-rows` makes it a box that many rows tall holding only the rows in view, so 10,000 rows scroll as smoothly as 10. Screen readers still hear the true row position, columns no longer jump while scrolling, and `tt-range-change` reports which rows are in view. Cells use tighter sides on phones.
|
|
45
|
+
|
|
3
46
|
## 0.1.0
|
|
4
47
|
|
|
5
48
|
First public release: 85 Lit web components, design tokens with dark
|
package/README.md
CHANGED
|
@@ -34,8 +34,20 @@ import "@tartaguti/ui-components";
|
|
|
34
34
|
// Or per component, so the bundle only carries what you touched.
|
|
35
35
|
import "@tartaguti/ui-components/tt-button";
|
|
36
36
|
import "@tartaguti/ui-components/tt-data-table";
|
|
37
|
+
|
|
38
|
+
// The documentation components (tt-code-block, tt-component-doc, ...)
|
|
39
|
+
// are a separate entry point, for docs sites.
|
|
40
|
+
import "@tartaguti/ui-components/docs";
|
|
37
41
|
```
|
|
38
42
|
|
|
43
|
+
Chart.js and Prism, the two heavy dependencies, load the first time a
|
|
44
|
+
`tt-chart` or `tt-code-block` is shown, so an app without them never
|
|
45
|
+
downloads them.
|
|
46
|
+
|
|
47
|
+
The text components write by themselves ("Close", "Pagination", form
|
|
48
|
+
messages) can be translated once with `setStrings({ close: "Mbyll" })`,
|
|
49
|
+
or per element with its `strings` property.
|
|
50
|
+
|
|
39
51
|
**Importing is registration.** There is no `register()` call. Importing
|
|
40
52
|
the module runs `@customElement`, which defines the tag. This is why
|
|
41
53
|
`sideEffects` is `true` in the manifest and must never be set to `false`:
|