@tectra-ng/ui 0.1.3 → 0.1.5
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/accordion/README.md +61 -0
- package/breadcrumb/README.md +57 -0
- package/carousel/README.md +53 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-carousel.mjs +939 -0
- package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
- package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs +1140 -0
- package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-image.mjs +759 -0
- package/fesm2022/tectra-ng-ui-image.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
- package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
- package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +194 -50
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
- package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
- package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/field/README.md +1 -1
- package/file-upload/README.md +85 -0
- package/galleria/README.md +62 -0
- package/image/README.md +54 -0
- package/menubar/README.md +51 -0
- package/package.json +56 -4
- package/panel-menu/README.md +45 -0
- package/scroll-panel/README.md +35 -0
- package/splitter/README.md +62 -0
- package/stepper/README.md +66 -0
- package/table/README.md +1 -1
- package/tabs/README.md +69 -0
- package/toolbar/README.md +35 -0
- package/types/tectra-ng-ui-accordion.d.ts +304 -0
- package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
- package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
- package/types/tectra-ng-ui-carousel.d.ts +263 -0
- package/types/tectra-ng-ui-carousel.d.ts.map +1 -0
- package/types/tectra-ng-ui-file-upload.d.ts +527 -0
- package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
- package/types/tectra-ng-ui-galleria.d.ts +407 -0
- package/types/tectra-ng-ui-galleria.d.ts.map +1 -0
- package/types/tectra-ng-ui-image.d.ts +259 -0
- package/types/tectra-ng-ui-image.d.ts.map +1 -0
- package/types/tectra-ng-ui-menubar.d.ts +201 -0
- package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
- package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-splitter.d.ts +226 -0
- package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
- package/types/tectra-ng-ui-stepper.d.ts +446 -0
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +2 -4
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +420 -0
- package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +1 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-toolbar.d.ts +85 -0
- package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Accordion
|
|
2
|
+
|
|
3
|
+
A list of collapsible sections in a bordered box — FAQ blocks, grouped details, long settings. Build it from panels, or pass an array of items with header and content templates.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-accordion [(value)]="open">
|
|
7
|
+
<tx-accordion-panel value="dns">
|
|
8
|
+
<tx-accordion-header>DNS</tx-accordion-header>
|
|
9
|
+
<tx-accordion-content>Records of the zone</tx-accordion-content>
|
|
10
|
+
</tx-accordion-panel>
|
|
11
|
+
</tx-accordion>
|
|
12
|
+
|
|
13
|
+
<tx-accordion [items]="sections" [(value)]="open" (opened)="load($event.index)">
|
|
14
|
+
<ng-template txAccordionHeader let-item>{{ item.header }}</ng-template>
|
|
15
|
+
<ng-template txAccordionContent let-item>{{ item.content }}</ng-template>
|
|
16
|
+
</tx-accordion>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`TxAccordionItem`: `header`, `content`, `value` (the index when empty), `tone` (`info`, `success`, `warn`, `danger` — a coloured bar on the left of the header), `disabled`, plus any fields you need in the templates.
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
| Name | Description |
|
|
23
|
+
|---|---|
|
|
24
|
+
| value | Two-way: the open panels — an array of values, or one value / `null` when `multiple` is off |
|
|
25
|
+
| multiple | Several panels can be open at once (on by default) |
|
|
26
|
+
| items | Panels as an array of `TxAccordionItem` |
|
|
27
|
+
| expandIcon | Icon of a closed panel instead of the chevron |
|
|
28
|
+
| collapseIcon | Icon of an open panel instead of the chevron |
|
|
29
|
+
| selectOnFocus | The arrow keys open the header they land on |
|
|
30
|
+
| headingLevel | `tx-accordion-header`: wraps the header in a heading of this level |
|
|
31
|
+
| tone | `tx-accordion-panel`: `info`, `success`, `warn` or `danger` |
|
|
32
|
+
| disabled | `tx-accordion-panel`: the panel cannot be opened |
|
|
33
|
+
| dt | Design tokens of this instance (`accordion`) |
|
|
34
|
+
| pt | Classes and styles of the parts: `root`, `panel`, `header`, `headerContent`, `toggleIcon`, `content`, `contentInner` |
|
|
35
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
36
|
+
| unstyled | Removes the tectra styles |
|
|
37
|
+
|
|
38
|
+
`tx-accordion-panel` takes a required `value`.
|
|
39
|
+
|
|
40
|
+
## Outputs
|
|
41
|
+
| Name | Description |
|
|
42
|
+
|---|---|
|
|
43
|
+
| valueChange | The open panels changed |
|
|
44
|
+
| opened | A panel was opened: `{ value, index, item }` |
|
|
45
|
+
| closed | A panel was closed: `{ value, index, item }` |
|
|
46
|
+
|
|
47
|
+
## Slots
|
|
48
|
+
| Name | Description |
|
|
49
|
+
|---|---|
|
|
50
|
+
| tx-accordion-panel | A panel with a `tx-accordion-header` and a `tx-accordion-content` |
|
|
51
|
+
| txAccordionHeader | `<ng-template txAccordionHeader let-item let-index="index" let-active="active">` — header of each item |
|
|
52
|
+
| txAccordionContent | `<ng-template txAccordionContent let-item>` — content of each item, or lazy content inside `tx-accordion-content`; created on the first open |
|
|
53
|
+
| txAccordionToggleIcon | `<ng-template txAccordionToggleIcon let-active>` — own toggle icon |
|
|
54
|
+
|
|
55
|
+
## Keyboard
|
|
56
|
+
| Key | Action |
|
|
57
|
+
|---|---|
|
|
58
|
+
| Tab | Moves between the headers and the content of open panels |
|
|
59
|
+
| Down / Up arrow | Next / previous header; disabled panels are skipped |
|
|
60
|
+
| Home / End | First / last header |
|
|
61
|
+
| Enter / Space | Opens or closes the panel |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Breadcrumb
|
|
2
|
+
|
|
3
|
+
Shows where the current page sits in the hierarchy: a row of links to the parent pages, ending with the current page. Items come from a `model` array and can be router links, URLs or commands.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-breadcrumb [home]="home" [model]="items" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
home: TxBreadcrumbItem = { icon: 'home', routerLink: '/', ariaLabel: 'Home' };
|
|
11
|
+
items: TxBreadcrumbItem[] = [{ label: 'Projects', routerLink: '/projects' }, { label: 'Website' }];
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|---|---|
|
|
17
|
+
| model | The items, `TxBreadcrumbItem[]`; the last one is the current page |
|
|
18
|
+
| home | First item, usually a home icon |
|
|
19
|
+
| separator | `chevron` (default) or `slash` |
|
|
20
|
+
| ariaLabel | Label of the navigation landmark ("Breadcrumb" by default, translated) |
|
|
21
|
+
| dt | Design tokens of this instance (`breadcrumb`) |
|
|
22
|
+
| pt | Classes and styles of the parts: `root`, `list`, `item`, `link`, `icon`, `label`, `separator` |
|
|
23
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
24
|
+
| unstyled | Removes the tectra styles |
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| itemClick | An item link or command was clicked: `{ originalEvent, item }` |
|
|
30
|
+
|
|
31
|
+
## Slots
|
|
32
|
+
| Name | Description |
|
|
33
|
+
|---|---|
|
|
34
|
+
| txBreadcrumbItem | `<ng-template txBreadcrumbItem let-item let-current="current">` — own content of an item (the link stays) |
|
|
35
|
+
| txBreadcrumbSeparator | `<ng-template txBreadcrumbSeparator>` — own separator |
|
|
36
|
+
|
|
37
|
+
## Item
|
|
38
|
+
| Field | Description |
|
|
39
|
+
|---|---|
|
|
40
|
+
| label | Text |
|
|
41
|
+
| icon | Icon name (or a CSS class) before the label |
|
|
42
|
+
| routerLink, queryParams, fragment | Router navigation |
|
|
43
|
+
| url, target | Plain link |
|
|
44
|
+
| command | Called with `{ originalEvent, item }` on click; an item with only a command is a button |
|
|
45
|
+
| disabled | Shown dimmed, not clickable |
|
|
46
|
+
| title, ariaLabel, id | Tooltip, accessible name (needed for an icon-only item), element id |
|
|
47
|
+
|
|
48
|
+
## Keyboard
|
|
49
|
+
| Key | Action |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Tab | Moves through the links; the current page and disabled items are not focusable |
|
|
52
|
+
| Enter | Follows the focused link |
|
|
53
|
+
| Enter / Space | Runs the command of a command item |
|
|
54
|
+
|
|
55
|
+
## Accessibility
|
|
56
|
+
|
|
57
|
+
A `nav` landmark with a label, an ordered list of items, separators hidden from screen readers and `aria-current="page"` on the last item.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Carousel
|
|
2
|
+
|
|
3
|
+
Shows a list of items a few at a time and pages through them with buttons, indicators, swipes or on its own. Horizontal or vertical, with a different number of visible items per screen width.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-carousel [value]="products" [numVisible]="3" [numScroll]="1" ariaLabel="New arrivals">
|
|
7
|
+
<ng-template txCarouselItem let-product>
|
|
8
|
+
<article class="card">{{ product.name }}</article>
|
|
9
|
+
</ng-template>
|
|
10
|
+
</tx-carousel>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Inputs
|
|
14
|
+
| Name | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| value | Items to show |
|
|
17
|
+
| page | Index of the current page; two-way with `[(page)]` |
|
|
18
|
+
| numVisible | Number of items shown at once |
|
|
19
|
+
| numScroll | Number of items one step moves |
|
|
20
|
+
| responsiveOptions | `numVisible` and `numScroll` per `breakpoint` (max width of the window), for example `[{ breakpoint: '768px', numVisible: 1 }]` |
|
|
21
|
+
| orientation | `horizontal` or `vertical` |
|
|
22
|
+
| verticalViewPortHeight | Height of the visible area in vertical orientation |
|
|
23
|
+
| circular | The last page goes on to the first and back |
|
|
24
|
+
| autoplayInterval | Milliseconds between automatic steps; `0` turns autoplay off. Autoplay pauses on hover and focus and stops after a manual step |
|
|
25
|
+
| showIndicators | Shows the page indicators |
|
|
26
|
+
| showNavigators | Shows the previous and next buttons |
|
|
27
|
+
| swipe | Pages with a swipe or a mouse drag |
|
|
28
|
+
| effect | How a page replaces the previous one: `slide` (default) moves the strip; `fade`, `zoom`, `blur` and `flip` let the visible items leave and the next ones arrive; `none` jumps |
|
|
29
|
+
| prevIcon | Icon of the previous button; a chevron that follows the orientation by default |
|
|
30
|
+
| nextIcon | Icon of the next button |
|
|
31
|
+
| ariaLabel | Accessible name of the carousel |
|
|
32
|
+
| ariaLabelledBy | Id of the element that names the carousel |
|
|
33
|
+
| dt | Design tokens of this instance (`carousel`) |
|
|
34
|
+
| pt | Classes and styles of the parts: `root`, `header`, `content`, `viewport`, `track`, `item`, `navigator`, `indicators`, `indicator`, `footer` |
|
|
35
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
36
|
+
| unstyled | Removes the tectra styles |
|
|
37
|
+
|
|
38
|
+
## Slots
|
|
39
|
+
| Name | Description |
|
|
40
|
+
|---|---|
|
|
41
|
+
| txCarouselItem | `<ng-template txCarouselItem let-item let-index="index" let-active="active">` — one item; `active` is true while it is visible |
|
|
42
|
+
| txCarouselIndicator | `<ng-template txCarouselIndicator let-page let-active="active">` — content of a page indicator |
|
|
43
|
+
| txCarouselHeader | Content above the carousel |
|
|
44
|
+
| txCarouselFooter | Content below the carousel |
|
|
45
|
+
|
|
46
|
+
## Keyboard
|
|
47
|
+
| Key | Action |
|
|
48
|
+
|---|---|
|
|
49
|
+
| Tab / Shift + Tab | Moves between the previous button, the visible items, the next button and the current indicator |
|
|
50
|
+
| Enter / Space | On a button: moves to the previous or next page, or to the page of the indicator |
|
|
51
|
+
| Arrow right / Arrow down | On an indicator: shows the next page |
|
|
52
|
+
| Arrow left / Arrow up | On an indicator: shows the previous page |
|
|
53
|
+
| Home / End | On an indicator: shows the first or the last page |
|