@tectra-ng/ui 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/LICENSE +21 -0
- package/README.md +26 -2
- package/amount/README.md +28 -0
- package/autocomplete/README.md +82 -0
- package/avatar/README.md +43 -0
- package/badge/README.md +19 -0
- package/button/README.md +46 -0
- package/button-group/README.md +8 -0
- package/card/README.md +30 -0
- package/cascade-select/README.md +49 -0
- package/checkbox/README.md +64 -0
- package/chip/README.md +38 -0
- package/chips-input/README.md +47 -0
- package/color-picker/README.md +43 -0
- package/confirm/README.md +46 -0
- package/country/README.md +23 -0
- package/country-select/README.md +39 -0
- package/dialog/README.md +84 -0
- package/divider/README.md +24 -0
- package/drawer/README.md +54 -0
- package/email-suggestion/README.md +20 -0
- package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
- package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
- package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-button.mjs +725 -0
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-card.mjs +210 -0
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
- package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
- package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
- package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-country.mjs +313 -0
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
- package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
- package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-field.mjs +492 -0
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
- package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
- package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
- package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
- package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-input.mjs +260 -0
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-label.mjs +271 -0
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-link.mjs +699 -0
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
- package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
- package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-message.mjs +975 -0
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-password.mjs +871 -0
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
- package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
- package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
- package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
- package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
- package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
- package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
- package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
- package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
- package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
- package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
- package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui.mjs +4 -0
- package/fesm2022/tectra-ng-ui.mjs.map +1 -0
- package/field/README.md +43 -0
- package/fieldset/README.md +36 -0
- package/highlight-text/README.md +20 -0
- package/icon-field/README.md +30 -0
- package/input/README.md +22 -0
- package/input-group/README.md +21 -0
- package/input-mask/README.md +30 -0
- package/input-number/README.md +61 -0
- package/input-otp/README.md +44 -0
- package/key-filter/README.md +31 -0
- package/knob/README.md +50 -0
- package/label/README.md +29 -0
- package/link/README.md +47 -0
- package/listbox/README.md +68 -0
- package/mention-textarea/README.md +47 -0
- package/menu/README.md +65 -0
- package/message/README.md +58 -0
- package/multiselect/README.md +85 -0
- package/overlay-badge/README.md +30 -0
- package/package.json +301 -3
- package/paginator/README.md +60 -0
- package/panel/README.md +45 -0
- package/password/README.md +60 -0
- package/password-generator/README.md +34 -0
- package/pill/README.md +42 -0
- package/popover/README.md +67 -0
- package/progress-bar/README.md +32 -0
- package/progress-spinner/README.md +22 -0
- package/radio-button/README.md +54 -0
- package/rating/README.md +49 -0
- package/select/README.md +78 -0
- package/skeleton/README.md +27 -0
- package/slider/README.md +48 -0
- package/speed-dial/README.md +49 -0
- package/split-button/README.md +45 -0
- package/status-icon/README.md +22 -0
- package/table/README.md +178 -0
- package/tag/README.md +42 -0
- package/textarea/README.md +37 -0
- package/toast/README.md +52 -0
- package/toggle-button/README.md +34 -0
- package/toggle-switch/README.md +49 -0
- package/tooltip/README.md +60 -0
- package/tree-select/README.md +49 -0
- package/types/tectra-ng-ui-amount.d.ts +135 -0
- package/types/tectra-ng-ui-amount.d.ts.map +1 -0
- package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
- package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
- package/types/tectra-ng-ui-avatar.d.ts +289 -0
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
- package/types/tectra-ng-ui-badge.d.ts +119 -0
- package/types/tectra-ng-ui-badge.d.ts.map +1 -0
- package/types/tectra-ng-ui-button-group.d.ts +6 -0
- package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
- package/types/tectra-ng-ui-button.d.ts +466 -0
- package/types/tectra-ng-ui-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-card.d.ts +71 -0
- package/types/tectra-ng-ui-card.d.ts.map +1 -0
- package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-checkbox.d.ts +450 -0
- package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
- package/types/tectra-ng-ui-chip.d.ts +106 -0
- package/types/tectra-ng-ui-chip.d.ts.map +1 -0
- package/types/tectra-ng-ui-chips-input.d.ts +187 -0
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
- package/types/tectra-ng-ui-color-picker.d.ts +237 -0
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
- package/types/tectra-ng-ui-confirm.d.ts +80 -0
- package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
- package/types/tectra-ng-ui-country-select.d.ts +235 -0
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-country.d.ts +105 -0
- package/types/tectra-ng-ui-country.d.ts.map +1 -0
- package/types/tectra-ng-ui-dialog.d.ts +453 -0
- package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
- package/types/tectra-ng-ui-divider.d.ts +70 -0
- package/types/tectra-ng-ui-divider.d.ts.map +1 -0
- package/types/tectra-ng-ui-drawer.d.ts +188 -0
- package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
- package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
- package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
- package/types/tectra-ng-ui-field.d.ts +139 -0
- package/types/tectra-ng-ui-field.d.ts.map +1 -0
- package/types/tectra-ng-ui-fieldset.d.ts +74 -0
- package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
- package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
- package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
- package/types/tectra-ng-ui-icon-field.d.ts +77 -0
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-group.d.ts +18 -0
- package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-mask.d.ts +91 -0
- package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-number.d.ts +326 -0
- package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
- package/types/tectra-ng-ui-input-otp.d.ts +173 -0
- package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
- package/types/tectra-ng-ui-input.d.ts +113 -0
- package/types/tectra-ng-ui-input.d.ts.map +1 -0
- package/types/tectra-ng-ui-key-filter.d.ts +43 -0
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
- package/types/tectra-ng-ui-knob.d.ts +207 -0
- package/types/tectra-ng-ui-knob.d.ts.map +1 -0
- package/types/tectra-ng-ui-label.d.ts +53 -0
- package/types/tectra-ng-ui-label.d.ts.map +1 -0
- package/types/tectra-ng-ui-link.d.ts +223 -0
- package/types/tectra-ng-ui-link.d.ts.map +1 -0
- package/types/tectra-ng-ui-listbox.d.ts +131 -0
- package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
- package/types/tectra-ng-ui-menu.d.ts +512 -0
- package/types/tectra-ng-ui-menu.d.ts.map +1 -0
- package/types/tectra-ng-ui-message.d.ts +390 -0
- package/types/tectra-ng-ui-message.d.ts.map +1 -0
- package/types/tectra-ng-ui-multiselect.d.ts +216 -0
- package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
- package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
- package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
- package/types/tectra-ng-ui-paginator.d.ts +293 -0
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
- package/types/tectra-ng-ui-panel.d.ts +133 -0
- package/types/tectra-ng-ui-panel.d.ts.map +1 -0
- package/types/tectra-ng-ui-password-generator.d.ts +80 -0
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
- package/types/tectra-ng-ui-password.d.ts +271 -0
- package/types/tectra-ng-ui-password.d.ts.map +1 -0
- package/types/tectra-ng-ui-pill.d.ts +167 -0
- package/types/tectra-ng-ui-pill.d.ts.map +1 -0
- package/types/tectra-ng-ui-popover.d.ts +244 -0
- package/types/tectra-ng-ui-popover.d.ts.map +1 -0
- package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
- package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
- package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
- package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
- package/types/tectra-ng-ui-radio-button.d.ts +380 -0
- package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-rating.d.ts +195 -0
- package/types/tectra-ng-ui-rating.d.ts.map +1 -0
- package/types/tectra-ng-ui-select.d.ts +761 -0
- package/types/tectra-ng-ui-select.d.ts.map +1 -0
- package/types/tectra-ng-ui-skeleton.d.ts +182 -0
- package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
- package/types/tectra-ng-ui-slider.d.ts +220 -0
- package/types/tectra-ng-ui-slider.d.ts.map +1 -0
- package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
- package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
- package/types/tectra-ng-ui-split-button.d.ts +139 -0
- package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-status-icon.d.ts +105 -0
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
- package/types/tectra-ng-ui-table.d.ts +1301 -0
- package/types/tectra-ng-ui-table.d.ts.map +1 -0
- package/types/tectra-ng-ui-tag.d.ts +157 -0
- package/types/tectra-ng-ui-tag.d.ts.map +1 -0
- package/types/tectra-ng-ui-textarea.d.ts +146 -0
- package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
- package/types/tectra-ng-ui-toast.d.ts +268 -0
- package/types/tectra-ng-ui-toast.d.ts.map +1 -0
- package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
- package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
- package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
- package/types/tectra-ng-ui-tooltip.d.ts +275 -0
- package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
- package/types/tectra-ng-ui-tree-select.d.ts +339 -0
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
- package/types/tectra-ng-ui.d.ts +2 -0
- package/types/tectra-ng-ui.d.ts.map +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Speed dial
|
|
2
|
+
|
|
3
|
+
A floating round button that fans out a few quick actions — in a line, a circle, a half or a quarter of one.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-speed-dial ariaLabel="Create" direction="up" [model]="createActions" (itemSelected)="create($event.item)" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Items are `TxMenuItem`s (`label`, `icon`, `command`, `disabled`, `visible`, `severity: 'danger'`); each one is an icon button named by its label, with the label in a tooltip.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
| Name | Description |
|
|
13
|
+
|---|---|
|
|
14
|
+
| model | Items (`TxMenuItem[]`) |
|
|
15
|
+
| visible | Two-way open state (`[(visible)]`) |
|
|
16
|
+
| direction | `up` (default), `down`, `left`, `right`, `up-left`, `up-right`, `down-left`, `down-right` |
|
|
17
|
+
| type | `linear` (default), `circle`, `semi-circle`, `quarter-circle` |
|
|
18
|
+
| radius | Radius in px for the circle types (default 80) |
|
|
19
|
+
| mask | Dims the page while open |
|
|
20
|
+
| hideOnClickOutside | Closes on a press outside (default on) |
|
|
21
|
+
| showIcon | Icon of the closed button (default `plus`, turns into a cross when open) |
|
|
22
|
+
| hideIcon | Own icon of the open button |
|
|
23
|
+
| severity | Severity of the main button |
|
|
24
|
+
| itemSeverity | Severity of the items (default `secondary`) |
|
|
25
|
+
| size | Main button: `small`, `medium` (default), `large` |
|
|
26
|
+
| itemSize | Action buttons: `small` (default), `medium`, `large` |
|
|
27
|
+
| disabled | Disables the button |
|
|
28
|
+
| ariaLabel | Name of the button and the menu |
|
|
29
|
+
| dt | Design tokens (`speedDial`) — spacing, timing, mask |
|
|
30
|
+
| pt | Classes and styles of the parts: `root`, `button`, `list`, `item`, `mask` |
|
|
31
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
32
|
+
| unstyled | Removes the tectra styles |
|
|
33
|
+
|
|
34
|
+
## Outputs
|
|
35
|
+
| Name | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| itemSelected | An item was chosen (`{ item, originalEvent }`) |
|
|
38
|
+
| opened | The items opened |
|
|
39
|
+
| closed | The items closed |
|
|
40
|
+
| visibleChange | `visible` changed |
|
|
41
|
+
|
|
42
|
+
## Keyboard
|
|
43
|
+
| Key | Action |
|
|
44
|
+
|---|---|
|
|
45
|
+
| Enter / Space | Opens the items and moves to the first one, or closes them |
|
|
46
|
+
| Arrow keys | On the button: opens at the first item; in the items: along the direction (circles: Right / Down next, Left / Up previous) |
|
|
47
|
+
| Home / End | First / last item |
|
|
48
|
+
| Escape | Closes, focus goes back to the button |
|
|
49
|
+
| Tab | Closes and moves on |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Split button
|
|
2
|
+
|
|
3
|
+
A button with a main action and a menu of related ones — Save with Save as draft, Export with other formats.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-split-button label="Save" icon="check" [model]="saveOptions" (clicked)="save()" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The menu takes the same `TxMenuItem` items as `tx-menu` (sub-menus included) and opens under the button, aligned to its end.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
| Name | Description |
|
|
13
|
+
|---|---|
|
|
14
|
+
| label | Text of the main button (or put it inside the element) |
|
|
15
|
+
| icon | Icon of the main button |
|
|
16
|
+
| model | Menu items (`TxMenuItem[]`) |
|
|
17
|
+
| severity | `primary` (default), `secondary`, `success`, `info`, `warn`, `danger`, `help`, `contrast` |
|
|
18
|
+
| size | `small`, `medium` (default), `large` |
|
|
19
|
+
| outlined | Outlined buttons |
|
|
20
|
+
| text | Text buttons |
|
|
21
|
+
| raised | Raised buttons |
|
|
22
|
+
| rounded | Rounded ends |
|
|
23
|
+
| disabled | Disables both parts |
|
|
24
|
+
| menuDisabled | Disables only the menu button |
|
|
25
|
+
| loading | Shows a spinner in the main button |
|
|
26
|
+
| menuAriaLabel | Name of the menu button and the menu; "More actions" by default (translated) |
|
|
27
|
+
| dt | Design tokens (`splitButton`) — the divider between filled buttons |
|
|
28
|
+
| pt | Classes and styles of the parts: `root`, `button`, `menuButton` |
|
|
29
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
30
|
+
| unstyled | Removes the tectra styles |
|
|
31
|
+
|
|
32
|
+
## Outputs
|
|
33
|
+
| Name | Description |
|
|
34
|
+
|---|---|
|
|
35
|
+
| clicked | The main button was clicked |
|
|
36
|
+
| itemSelected | A menu item was chosen (`{ item, originalEvent }`) |
|
|
37
|
+
| menuOpened | The menu opened |
|
|
38
|
+
| menuClosed | The menu closed |
|
|
39
|
+
|
|
40
|
+
## Keyboard
|
|
41
|
+
| Key | Action |
|
|
42
|
+
|---|---|
|
|
43
|
+
| Enter / Space | On the main button: runs it; on the menu button: opens the menu |
|
|
44
|
+
| Arrow Down / Arrow Up | On the menu button: opens the menu at the first / last item |
|
|
45
|
+
| Escape | Closes the menu, focus goes back to the menu button |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Status icon
|
|
2
|
+
|
|
3
|
+
A small coloured icon for a yes / no or a severity state in tables and lists — a check in green or a cross in red, with a label for screen readers and a native tooltip.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-status-icon [status]="user.verified" label="Verified" />
|
|
7
|
+
<tx-status-icon severity="warn" label="Expires soon" />
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| status | On (green check) or off (red cross) |
|
|
14
|
+
| severity | Instead of `status`: `success`, `info`, `warn`, `danger`, `secondary` |
|
|
15
|
+
| icon | Own icon name or icon class |
|
|
16
|
+
| label | Accessible name and tooltip; "Yes" / "No" for `status` by default; empty makes the icon decorative |
|
|
17
|
+
| toolTip | Same as `label` |
|
|
18
|
+
| size | `small`, `medium`, `large` |
|
|
19
|
+
| dt | Design tokens of this instance (`statusIcon`) |
|
|
20
|
+
| pt | Classes and styles of the parts: `root`, `icon` |
|
|
21
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
22
|
+
| unstyled | Removes the tectra styles |
|
package/table/README.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Table
|
|
2
|
+
|
|
3
|
+
Data table for lists: sorting, pagination, server data, selection, row actions with a right-click menu, column resize, reorder and settings saved per table, frozen columns, row expansion and cards on narrow screens.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-table [value]="people()" [columns]="columns" dataKey="id" paginator [rows]="10">
|
|
7
|
+
<ng-template txTableCell="name" let-person>
|
|
8
|
+
<strong>{{ person.name }}</strong>
|
|
9
|
+
</ng-template>
|
|
10
|
+
</tx-table>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Columns are `TxTableColumn` objects: `field` (a dot reads a nested value, `team.name`), `header`, `sortable` (on unless `false`), `sortField`, `reorderable`, `resizable`, `hideable`, `hidden`, `width` (fixed, no resize), `initialWidth`, `minWidth`, `maxWidth` (CSS lengths; columns are 100px until resized), `frozen` (`start` / `end`), `align` (`start` / `center` / `end`), `headerClass`, `cellClass`, `footer`, `cardTitle` (this column is the title of the card), `hideInCard`; filters: `filter`, `filterField`, `filterType` (`text`, `numeric`, `date`, `boolean`), `filterMatchModes`, `filterOptions` (`{ label, value }[]` — a multi select with the `in` match mode), `filterPlaceholder`; editing: `editable`, `editType` (`text`, `numeric`, `date`, `boolean`), `editOptions` (a select).
|
|
14
|
+
|
|
15
|
+
A cell shows the value of its field as text; `<ng-template txTableCell="field">` replaces it. Text that does not fit is cut with an ellipsis.
|
|
16
|
+
|
|
17
|
+
Filtering, sorting and pagination run on `value` unless `lazy` is on — then `lazyLoad` asks the server for `{ first, rows, sortField, sortOrder, multiSortMeta, filters, globalFilter }` and `totalRecords` is the size of the whole list. A set `totalRecords` without `lazy` also means `value` is already the current page.
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
| Name | Description |
|
|
21
|
+
|---|---|
|
|
22
|
+
| value | Rows of the table |
|
|
23
|
+
| columns | Column definitions (`TxTableColumn[]`). Two-way: `[(columns)]` — dragging headers writes the new order |
|
|
24
|
+
| dataKey | Field that identifies a row — for selection, expansion and stable rendering |
|
|
25
|
+
| size | `small`, `medium` (default), `large` |
|
|
26
|
+
| showGridlines | Borders between all cells (on by default) |
|
|
27
|
+
| stripedRows | Every second row is tinted |
|
|
28
|
+
| rowHover | Highlights the row under the pointer (on by default) |
|
|
29
|
+
| scrollHeight | Maximum height of the scrolling area, e.g. `400px`; the header stays on top |
|
|
30
|
+
| loading | Blurs the table and shows a spinner; `aria-busy` on the table |
|
|
31
|
+
| emptyMessage | Text of an empty table; "No results found" by default (translated) |
|
|
32
|
+
| ariaLabel | Name of the table |
|
|
33
|
+
| ariaLabelledBy | Id of the element that names the table |
|
|
34
|
+
| rowClass | Function `(row, index)` that returns classes for a row |
|
|
35
|
+
| sortMode | `single` (default) or `multiple` — with `multiple`, Ctrl / ⌘ + click adds a column to the sort |
|
|
36
|
+
| sortField | Field the table is sorted by. Two-way: `[(sortField)]` |
|
|
37
|
+
| sortOrder | `asc`, `desc` or `null`. Two-way: `[(sortOrder)]`; a click goes asc → desc → none |
|
|
38
|
+
| multiSortMeta | Sort of `multiple` mode, `{ field, order }[]`. Two-way: `[(multiSortMeta)]` |
|
|
39
|
+
| customSort | Rows are not sorted by the table — sort `value` yourself on `sortChange` |
|
|
40
|
+
| lazy | Rows come from a server: no local sorting or slicing, `lazyLoad` asks for data |
|
|
41
|
+
| filterDisplay | `menu` (default) — a filter button in the header opens rules with match modes, and / or, add / remove rule, Clear and Apply; `row` — a row of filter fields under the headers with a match mode menu |
|
|
42
|
+
| filters | Column filters, `{ [field]: { operator, rules: { value, matchMode }[] } }`. Two-way: `[(filters)]` |
|
|
43
|
+
| globalFilter | Text searched in every column (or `globalFilterFields`). Two-way: `[(globalFilter)]` — bind it to an own search field |
|
|
44
|
+
| globalFilterFields | Fields the global search looks in; the visible columns by default |
|
|
45
|
+
| filterDelay | Milliseconds to wait after typing in a text filter of the filter row (and before `lazyLoad` for the global search) |
|
|
46
|
+
| editMode | `cell` — a click, Enter or F2 edits a cell, Enter / Tab saves, Escape cancels; `row` — an edit column with edit, save and cancel buttons |
|
|
47
|
+
| editingRowKeys | `dataKey` values of the rows in edit (`row` mode). Two-way: `[(editingRowKeys)]` |
|
|
48
|
+
| reorderableRows | A drag handle column; rows move by drag or Alt + Arrow Up / Down on the handle, `rowReorder` gets the new order |
|
|
49
|
+
| frozenValue | Rows pinned above the body; they stay under the header while the table scrolls |
|
|
50
|
+
| groupRowsBy | Field the rows are grouped by; rows are sorted by it first |
|
|
51
|
+
| rowGroupMode | `subheader` (default) — a header row per group (and `txTableGroupFooter`); `rowspan` — the group cell spans its rows |
|
|
52
|
+
| expandableRowGroups | Group headers get a toggle that collapses the group |
|
|
53
|
+
| expandedRowGroups | Values of the open groups; `null` (default) — all open. Two-way: `[(expandedRowGroups)]` |
|
|
54
|
+
| virtualScroll | Renders only the rows in view — for long lists; needs `scrollHeight` and rows of one height. With `lazy`, rows that are `null` / `undefined` show skeletons and `lazyLoad` asks for the visible range |
|
|
55
|
+
| virtualScrollItemSize | Height of a row in px with `virtualScroll` |
|
|
56
|
+
| virtualScrollTolerance | Rows rendered above and below the view |
|
|
57
|
+
| cellTooltip | Text cut with an ellipsis shows a tooltip with the full text |
|
|
58
|
+
| csvSeparator | Separator of `exportCSV()` |
|
|
59
|
+
| exportFilename | File name of `exportCSV()` |
|
|
60
|
+
| exportFunction | Function `(row, column)` that returns the value written to the CSV |
|
|
61
|
+
| lazyLoadOnInit | `lazy`: asks for the first page right away (on by default) |
|
|
62
|
+
| paginator | Shows `tx-paginator` |
|
|
63
|
+
| paginatorPosition | `bottom` (default), `top` or `both` |
|
|
64
|
+
| first | Index of the first row of the page. Two-way: `[(first)]` |
|
|
65
|
+
| rows | Rows per page. Two-way: `[(rows)]` |
|
|
66
|
+
| totalRecords | Number of rows of the whole list (server data) |
|
|
67
|
+
| rowsPerPageOptions | Page sizes for the paginator select |
|
|
68
|
+
| showTotal | "Total: N" next to the paginator |
|
|
69
|
+
| showCurrentPageReport | Page report of the paginator |
|
|
70
|
+
| currentPageReportTemplate | Own page report text (`{currentPage}`, `{totalPages}`, `{first}`, `{last}`, `{rows}`, `{totalRecords}`) |
|
|
71
|
+
| showFirstLastIcon | First and last page buttons (on by default) |
|
|
72
|
+
| showPageLinks | Page number buttons (on by default) |
|
|
73
|
+
| showJumpToPageDropdown | Page select of the paginator |
|
|
74
|
+
| showJumpToPageInput | Page field of the paginator |
|
|
75
|
+
| alwaysShowPaginator | Shows the paginator also for one page (on by default) |
|
|
76
|
+
| pageLinks | Number of page buttons |
|
|
77
|
+
| selectionMode | `single` / `multiple` — click and keys select rows; `checkbox` / `radio` — a selection column at the start |
|
|
78
|
+
| selection | Selected row (`single`, `radio`) or rows (`multiple`, `checkbox`). Two-way: `[(selection)]` |
|
|
79
|
+
| metaKeySelection | `multiple`: a click selects one row, Ctrl / ⌘ + click adds, Shift + click selects a range (on by default) |
|
|
80
|
+
| rowSelectable | Function `(row, index)` — `false` makes a row not selectable |
|
|
81
|
+
| selectAll | Own state of the "select all" checkbox — for selection across pages on the server; the table then only emits `selectAllChange` |
|
|
82
|
+
| expandedRowKeys | `dataKey` values of the expanded rows. Two-way: `[(expandedRowKeys)]` |
|
|
83
|
+
| expandableRows | Function `(row, index)` — `false` hides the expand button of a row |
|
|
84
|
+
| resizableColumns | Drag handles between headers (keys: Arrow Left / Right on a handle) |
|
|
85
|
+
| columnResizeMode | `expand` (default) — only the column changes, the table may scroll; `fit` — the next column gives the width |
|
|
86
|
+
| reorderableColumns | Headers can be dragged to a new place (keys: Alt + Arrow Left / Right on a header) |
|
|
87
|
+
| columnSettings | Gear button with the visible columns; with `reorderableColumns` the list is also dragged (or Alt + Arrow Up / Down) to change the order |
|
|
88
|
+
| actionsSettings | Adds the row actions tab to the settings: order (drag) and which are shown inline |
|
|
89
|
+
| actionsInlineCount | How many row actions are shown inline before the `…` button, until the user pins others |
|
|
90
|
+
| actionsHeader | Header of the actions column; "Actions" by default (translated) |
|
|
91
|
+
| actionsFrozen | The actions column stays at the end while the table scrolls sideways (on by default) |
|
|
92
|
+
| stateKey | Saves widths, order, hidden columns, sort, page and action settings under this key |
|
|
93
|
+
| stateStorage | `local` (default) or `session` |
|
|
94
|
+
| toolbar | Shows the toolbar row also without settings — for `[txTableToolbar]` content |
|
|
95
|
+
| contextMenu | Own right-click menu (`TxMenuItem[]`); the row is in `contextMenuSelection` |
|
|
96
|
+
| contextMenuSelection | Row the context menu was opened on. Two-way: `[(contextMenuSelection)]` |
|
|
97
|
+
| rowContextMenu | Right-click opens the row actions as a menu (on by default) |
|
|
98
|
+
| responsive | Rows become cards below `breakpoint` (on by default) |
|
|
99
|
+
| breakpoint | Width below which rows are cards, `64rem` by default |
|
|
100
|
+
| dt | Design tokens (`table`) |
|
|
101
|
+
| pt | Classes and styles of the parts: `root`, `toolbar`, `frame`, `scroller`, `table`, `thead`, `headerRow`, `headerCell`, `sortButton`, `sortIcon`, `tbody`, `row`, `cell`, `tfoot`, `footerCell`, `loading`, `empty`, `paginator`, `cards`, `card` |
|
|
102
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
103
|
+
| unstyled | Removes the tectra styles |
|
|
104
|
+
|
|
105
|
+
## Outputs
|
|
106
|
+
| Name | Description |
|
|
107
|
+
|---|---|
|
|
108
|
+
| sortChange | Sort changed: `{ field, order, multiSortMeta }` |
|
|
109
|
+
| filterChange | Filters or the global search changed: `{ filters, globalFilter, filteredValue }` |
|
|
110
|
+
| cellEditInit | A cell went into edit: `{ row, index, field, value, previousValue }` |
|
|
111
|
+
| cellEditComplete | A cell edit was saved — the table writes the value into the row |
|
|
112
|
+
| cellEditCancel | A cell edit was cancelled |
|
|
113
|
+
| rowEditInit | A row went into edit: `{ row, index, changes, previous }` |
|
|
114
|
+
| rowEditSave | A row edit was saved — the table writes `changes` into the row; `previous` holds the old values |
|
|
115
|
+
| rowEditCancel | A row edit was cancelled |
|
|
116
|
+
| rowReorder | A row was moved: `{ from, to, value }` — `value` is the new order, set it as `value` |
|
|
117
|
+
| rowGroupToggle | A group was collapsed or expanded: `{ value, expanded }` |
|
|
118
|
+
| pageChange | Page or page size changed (`TxPageState`) |
|
|
119
|
+
| lazyLoad | `lazy`: data is needed — `{ first, rows, sortField, sortOrder, multiSortMeta }` |
|
|
120
|
+
| rowClick | A row was clicked: `{ row, index, originalEvent }` |
|
|
121
|
+
| rowSelect | A row was selected |
|
|
122
|
+
| rowUnselect | A row was unselected |
|
|
123
|
+
| selectAllChange | The "select all" checkbox changed (`true` / `false`) |
|
|
124
|
+
| rowExpand | A row was expanded |
|
|
125
|
+
| rowCollapse | A row was collapsed |
|
|
126
|
+
| columnResize | A column was resized: `{ field, width }` |
|
|
127
|
+
| columnReorder | Columns were reordered: `{ columns, from, to }` |
|
|
128
|
+
| columnVisibilityChange | Hidden columns changed (their fields) |
|
|
129
|
+
| contextMenuSelect | The own context menu opened on a row |
|
|
130
|
+
|
|
131
|
+
## Slots
|
|
132
|
+
| Name | Description |
|
|
133
|
+
|---|---|
|
|
134
|
+
| txTableCell | `<ng-template txTableCell="field" let-row let-value="value" let-index="index">` — content of the cells of a column |
|
|
135
|
+
| txTableHeaderCell | `<ng-template txTableHeaderCell="field" let-column>` — own header content |
|
|
136
|
+
| txTableFooterCell | `<ng-template txTableFooterCell="field" let-column>` — footer content of a column |
|
|
137
|
+
| txTableActions | `<ng-template txTableActions let-row>` — actions column; put `tx-table-actions` with buttons marked `*txTableAction="{ label }"` inside |
|
|
138
|
+
| txTableExpansion | `<ng-template txTableExpansion let-row>` — content of an expanded row; adds the expand column |
|
|
139
|
+
| txTableCard | `<ng-template txTableCard let-row let-index="index">` — own card for a row on narrow screens |
|
|
140
|
+
| txTableEmpty | `<ng-template txTableEmpty>` — own content of an empty table |
|
|
141
|
+
| txTableEditor | `<ng-template txTableEditor="field" let-value="value" let-set="set" let-commit="commit" let-cancel="cancel">` — own editor of a column |
|
|
142
|
+
| txTableGroupHeader | `<ng-template txTableGroupHeader let-row let-value="value" let-count="count" let-toggle="toggle">` — content of a group header |
|
|
143
|
+
| txTableGroupFooter | `<ng-template txTableGroupFooter let-value="value" let-count="count" let-rows="rows">` — row after a group, e.g. its total |
|
|
144
|
+
| txTableToolbar | `<div txTableToolbar>` — content on the left of the toolbar row, next to the settings gear |
|
|
145
|
+
|
|
146
|
+
## Methods
|
|
147
|
+
| Name | Description |
|
|
148
|
+
|---|---|
|
|
149
|
+
| exportCSV(options?) | Downloads the visible columns of the filtered and sorted rows as CSV (UTF-8 with BOM, quoted, formulas guarded); `{ selectionOnly, filename }`; returns the text |
|
|
150
|
+
| clearFilters() | Clears the column filters and the global search |
|
|
151
|
+
| clearState() | Removes the saved state of `stateKey` |
|
|
152
|
+
|
|
153
|
+
## Inputs — tx-table-actions
|
|
154
|
+
| Name | Description |
|
|
155
|
+
|---|---|
|
|
156
|
+
| inlineCount | How many actions are shown inline outside a table, or before the user pins actions in its settings; the rest go to a `…` popover |
|
|
157
|
+
|
|
158
|
+
## Inputs — *txTableAction
|
|
159
|
+
| Name | Description |
|
|
160
|
+
|---|---|
|
|
161
|
+
| txTableAction | `{ label, id? }` — the label is used in the settings and the right-click menu; `id` defaults to a slug of the label |
|
|
162
|
+
|
|
163
|
+
## Keyboard
|
|
164
|
+
| Key | Action |
|
|
165
|
+
|---|---|
|
|
166
|
+
| Tab | Moves through sort buttons, resize handles, checkboxes and buttons in cells |
|
|
167
|
+
| Enter / Space | On a header: sorts; on a row (`single` / `multiple`): selects it |
|
|
168
|
+
| Ctrl / ⌘ + Enter | On a header in `multiple` sort mode: adds the column to the sort |
|
|
169
|
+
| Arrow Up / Arrow Down | Moves between rows (`single` / `multiple`) |
|
|
170
|
+
| Home / End | First / last row |
|
|
171
|
+
| Shift + Arrow Up / Down | `multiple`: extends the selection |
|
|
172
|
+
| Ctrl / ⌘ + A | `multiple`: selects all rows of the page |
|
|
173
|
+
| Alt + Arrow Left / Right | On a header with `reorderableColumns`: moves the column |
|
|
174
|
+
| Arrow Left / Right | On a resize handle: narrower / wider by 10px |
|
|
175
|
+
| Alt + Arrow Up / Down | In the settings list: moves the column or the action; on a row handle: moves the row |
|
|
176
|
+
| Enter / F2 | On an editable cell (`editMode="cell"`): starts editing |
|
|
177
|
+
| Enter / Tab / Shift + Tab | In a cell editor: saves (Tab moves to the next editable cell) |
|
|
178
|
+
| Escape | In an editor: cancels |
|
package/tag/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Tag
|
|
2
|
+
|
|
3
|
+
A short label with a severity — a version, a category, an ID you can copy. Square corners by default, `rounded` for a pill shape; it can copy its text or be removed.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-tag severity="success" icon="check">Released</tx-tag>
|
|
7
|
+
<tx-tag severity="secondary" [copyable]="true">ord_8F2KQ1</tx-tag>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| value | Text of the tag; content inside the tag is added after it |
|
|
14
|
+
| severity | `primary`, `secondary`, `success`, `info`, `warn`, `danger`, `help`, `contrast` |
|
|
15
|
+
| size | `small`, `medium` (`normal` is the same), `large` |
|
|
16
|
+
| rounded | Fully rounded corners |
|
|
17
|
+
| icon | Icon before the text: tectra name, `pi-` name or icon class |
|
|
18
|
+
| copyable | Adds a button that copies the text; it shows a check for a moment |
|
|
19
|
+
| removable | Adds a remove button |
|
|
20
|
+
| removeLabel | Label of the remove button (translated "Remove" by default) |
|
|
21
|
+
| dt | Design tokens of this instance (`tag`) |
|
|
22
|
+
| pt | Classes and styles of the parts: `root`, `icon`, `label`, `copy`, `remove` |
|
|
23
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
24
|
+
| unstyled | Removes the tectra styles |
|
|
25
|
+
|
|
26
|
+
## Outputs
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| copied | The text was copied |
|
|
30
|
+
| removed | The remove button was pressed |
|
|
31
|
+
|
|
32
|
+
## Slots
|
|
33
|
+
| Name | Description |
|
|
34
|
+
|---|---|
|
|
35
|
+
| default | The text |
|
|
36
|
+
|
|
37
|
+
## Keyboard
|
|
38
|
+
| Key | Action |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Tab | Reaches the copy and remove buttons |
|
|
41
|
+
| Enter / Space | Copies or removes from the focused button |
|
|
42
|
+
| Delete / Backspace | Removes from the remove button |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
A multi-line field on the native `<textarea>`: the same look, sizes, variants and states as `txInput`, plus growing with the text, a resize handle you control, a borderless look and a character counter.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<textarea txTextarea rows="3" autoResize [maxRows]="8" formControlName="bio" maxlength="280" #bio="txTextarea"></textarea>
|
|
7
|
+
<tx-textarea-counter [for]="bio" />
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| autoResize | Grows with the text instead of scrolling; turns the resize handle off |
|
|
14
|
+
| maxHeight | With `autoResize`: stops growing at this height in px, then scrolls |
|
|
15
|
+
| maxRows | With `autoResize`: stops growing after this many rows, then scrolls |
|
|
16
|
+
| resize | Resize handle: `none`, `vertical` (default), `horizontal`, `both` |
|
|
17
|
+
| borderless | No border and no background — for notes, comments and inline editing |
|
|
18
|
+
| size | `small`, `medium`, `large` |
|
|
19
|
+
| variant | `outlined` or `filled` |
|
|
20
|
+
| invalid | Red border and `aria-invalid`; without it the field follows its form control |
|
|
21
|
+
| fluid | Takes the full width of its container; inherits `<tx-fluid>` |
|
|
22
|
+
| dt | `textarea` design tokens of this instance (min height, borderless, counter) |
|
|
23
|
+
| fieldDt | `formField` design tokens of this instance (border, background, padding…) |
|
|
24
|
+
| pt | Classes and styles of the `root` part |
|
|
25
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
26
|
+
| unstyled | Removes the tectra styles |
|
|
27
|
+
| for | `tx-textarea-counter`: the textarea to count (`#ref="txTextarea"`); shows `length / maxlength`, or the length without `maxlength` |
|
|
28
|
+
|
|
29
|
+
## Outputs
|
|
30
|
+
| Name | Description |
|
|
31
|
+
|---|---|
|
|
32
|
+
| heightChange | With `autoResize`: the new height in px after the field grew or shrank |
|
|
33
|
+
|
|
34
|
+
## Keyboard
|
|
35
|
+
| Key | Action |
|
|
36
|
+
|---|---|
|
|
37
|
+
| Native textarea keys | Typing, selection, Tab leaves the field |
|
package/toast/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
Short messages about what just happened — saved, failed, exported — that appear as a pill at the bottom of the screen and go away on their own. Put one `<tx-toast />` in the app shell and send toasts from anywhere with `TxToastService`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<!-- app.component.html -->
|
|
7
|
+
<router-outlet />
|
|
8
|
+
<tx-toast />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
private toast = inject(TxToastService);
|
|
13
|
+
|
|
14
|
+
save(): void {
|
|
15
|
+
this.toast.success('Changes saved');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export(): void {
|
|
19
|
+
const progress = this.toast.loading('Exporting 1 240 rows…');
|
|
20
|
+
this.api.export().subscribe({
|
|
21
|
+
next: () => progress.update({ severity: 'success', text: 'Export is ready', actions: [{ label: 'Download', run: () => this.download() }] }),
|
|
22
|
+
error: () => progress.update({ severity: 'danger', text: 'Export failed' }),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`TxToastService`: `show(options)`, `success(text, options?)`, `info`, `warn`, `error`, `loading` return a `TxToastRef` (`close()`, `update(options)`, `closed` with the reason `timeout`, `close`, `action`, `api` or `clear`); `clear(key?)` closes all toasts or those of one key; `toasts` is a signal of the shown toasts. Options: `severity`, `title`, `text`, `icon` (`false` for none), `life` (ms, default 3000), `sticky`, `closable`, `showProgress`, `actions` (`{ label, run?, severity?, keepOpen? }`), `template`, `data`, `key`, `loading`. A loading toast is sticky and not closable until it is updated with a severity. App-wide defaults: `provideTxToast({ life: 8000 })`. The distance from the screen edges is in the tokens — `insetTop` (70px, room for an app header), `insetBottom` (28px) and `insetX` (28px): change them in the preset, or per outlet and at runtime with `[dt]="{ root: { insetBottom: '70px' } }"`.
|
|
28
|
+
|
|
29
|
+
New toasts land in front of a stack; older ones peek out behind it (3 at most) and the stack spreads out while the pointer is over it or focus is inside — time stops meanwhile. A toast can be swiped away. With a `text`, the `title` is read by screen readers only; alone, it is the visible line. Every toast is announced to screen readers (errors and warnings at once, the rest politely) without moving focus; its buttons are reachable with Tab inside the "Notifications" region.
|
|
30
|
+
|
|
31
|
+
## Inputs
|
|
32
|
+
| Name | Description |
|
|
33
|
+
|---|---|
|
|
34
|
+
| position | `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center` (default), `bottom-right` |
|
|
35
|
+
| key | Shows only toasts sent with this key; without a key — toasts without one |
|
|
36
|
+
| max | How many toasts the stack shows (default 3); older ones hide behind it |
|
|
37
|
+
| inPlace | Keeps the outlet where it is written; by default it moves to the end of `body` so headers and scrolling containers cannot cover it |
|
|
38
|
+
| dt | Design tokens of this outlet (`toast`) |
|
|
39
|
+
| pt | Classes and styles of the parts: `root`, `item`, `icon`, `body`, `title`, `text`, `actions`, `closeButton`, `progress` |
|
|
40
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
41
|
+
| unstyled | Removes the tectra styles |
|
|
42
|
+
|
|
43
|
+
## Slots
|
|
44
|
+
| Name | Description |
|
|
45
|
+
|---|---|
|
|
46
|
+
| txToastTemplate | `<ng-template txToastTemplate let-toast let-close="close">` — own content of every toast in this outlet (or `template` per toast) |
|
|
47
|
+
|
|
48
|
+
## Keyboard
|
|
49
|
+
| Key | Action |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Tab | Reaches the actions and the close button of each toast; focus inside spreads the stack and pauses it |
|
|
52
|
+
| Enter / Space | Runs the focused action or closes the toast |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# ToggleButton
|
|
2
|
+
|
|
3
|
+
A button that stays pressed: on / off with its own label and icon for each state. A `ControlValueAccessor` for a `boolean` — works with `[formControl]`, `ngModel` and signal forms.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| onLabel | Text while on |
|
|
9
|
+
| offLabel | Text while off |
|
|
10
|
+
| onIcon | Icon while on — a `@tectra-ng/icons` name or any icon class (`pi pi-check`) |
|
|
11
|
+
| offIcon | Icon while off |
|
|
12
|
+
| iconPos | Icon on the `left` or `right` of the text |
|
|
13
|
+
| size | `small`, `medium`, `large` |
|
|
14
|
+
| allowEmpty | `false` = once on, a click cannot turn it off |
|
|
15
|
+
| invalid | Red border and `aria-invalid` |
|
|
16
|
+
| fluid | Takes the full width of its container; inherits `<tx-fluid>` |
|
|
17
|
+
| disabled | `disabled` — blocks the button (the form control can disable it too) |
|
|
18
|
+
| tabindex | Tab order of the inner button |
|
|
19
|
+
| ariaLabel | Accessible name when the label is not enough |
|
|
20
|
+
| dt | Design tokens of this one button |
|
|
21
|
+
| pt | Extra `class` / `style` for `root`, `content`, `icon`, `label` — an object or a function `({ instance }) => ({ class, style })`, e.g. depending on `instance.checked()` |
|
|
22
|
+
| ptOptions | How this `pt` meets the global one from `provideTectra({ pt })`: `mergeSections` (default `true` — keep global parts this `pt` does not mention), `mergeProps` (default `false` — a local part replaces the global one; `true` joins classes and styles) |
|
|
23
|
+
| unstyled | Drops all tectra styles |
|
|
24
|
+
|
|
25
|
+
## Outputs
|
|
26
|
+
| Name | Description |
|
|
27
|
+
|---|---|
|
|
28
|
+
| changed | `{ originalEvent, checked }` after a click changed the value |
|
|
29
|
+
|
|
30
|
+
## Keyboard
|
|
31
|
+
| Key | Action |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Space / Enter | Toggles the state |
|
|
34
|
+
| Tab | Moves focus to the button |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Toggle switch
|
|
2
|
+
|
|
3
|
+
An on / off setting that applies at once. A native checkbox with `role="switch"`: Space toggles, the label toggles, screen readers announce "on" / "off".
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-toggle-switch label="Email notifications" formControlName="notify" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| label | Text of the label; content inside the tag is added after it |
|
|
13
|
+
| description | Muted text under the label, linked with `aria-describedby` |
|
|
14
|
+
| labelPosition | `end` (label after the switch) or `start` (before it) |
|
|
15
|
+
| trueValue | Model value when on |
|
|
16
|
+
| falseValue | Model value when off |
|
|
17
|
+
| onIcon | Icon inside the handle when on |
|
|
18
|
+
| offIcon | Icon inside the handle when off |
|
|
19
|
+
| size | `small`, `medium`, `large` |
|
|
20
|
+
| invalid | Red ring; without it the switch follows its form control |
|
|
21
|
+
| disabled | Disables the switch (also from the form control) |
|
|
22
|
+
| readonly | Shows the value, ignores clicks |
|
|
23
|
+
| required | Native `required` |
|
|
24
|
+
| name | Native `name` |
|
|
25
|
+
| inputId | Id of the native input, for an outside `<label for>` |
|
|
26
|
+
| ariaLabel | Accessible name when there is no visible label |
|
|
27
|
+
| ariaLabelledBy | Id of the element that names the switch |
|
|
28
|
+
| tabindex | Tab order of the native input |
|
|
29
|
+
| dt | Design tokens of this instance (`toggleSwitch`) |
|
|
30
|
+
| pt | Classes and styles of the parts: `root`, `track`, `input`, `handle`, `label`, `description` |
|
|
31
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
32
|
+
| unstyled | Removes the tectra styles, keeps the native input |
|
|
33
|
+
|
|
34
|
+
## Outputs
|
|
35
|
+
| Name | Description |
|
|
36
|
+
|---|---|
|
|
37
|
+
| changed | `{ checked, value, originalEvent }` after a toggle |
|
|
38
|
+
|
|
39
|
+
## Slots
|
|
40
|
+
| Name | Description |
|
|
41
|
+
|---|---|
|
|
42
|
+
| default | Extra label content |
|
|
43
|
+
| txToggleSwitchHandle | `<ng-template txToggleSwitchHandle let-checked>` — content of the handle |
|
|
44
|
+
|
|
45
|
+
## Keyboard
|
|
46
|
+
| Key | Action |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Space | Toggles the switch |
|
|
49
|
+
| Tab | Moves to the next control |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
A short hint next to an element — on hover, on keyboard focus, or opened from code. Text or a template; it flips to the other side when there is no room.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button txButton icon="trash" [text]="true" txTooltip="Delete"></button>
|
|
7
|
+
<input txInput txTooltip="Letters and digits only" tooltipEvent="focus" aria-label="Username" />
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
A text tooltip is always available to screen readers: it describes the element (`aria-describedby`) and names it when the element has no name of its own, so an icon-only button with a tooltip needs no `aria-label`. Put tooltips on focusable elements so keyboard users can reach them. Text is shown as text, never as HTML — use a template for rich content.
|
|
11
|
+
|
|
12
|
+
App-wide defaults: `provideTxTooltip({ placement: 'bottom', showDelay: 400 })`.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|---|---|
|
|
17
|
+
| txTooltip | Text (a new line with `\n`) or an `<ng-template>`; empty — no tooltip |
|
|
18
|
+
| tooltipPlacement | `top` (default), `bottom`, `left`, `right`, each with `-start` / `-end`; flips when there is no room |
|
|
19
|
+
| tooltipEvent | `both` (hover and keyboard focus, default), `hover`, `focus` (any focus — hints on fields), `manual` (only `show()` / `hide()`) |
|
|
20
|
+
| tooltipShowDelay | Milliseconds before it shows (default 0); no delay while another tooltip was just open |
|
|
21
|
+
| tooltipHideDelay | Milliseconds before it hides (default 0) |
|
|
22
|
+
| tooltipLife | Hides by itself after this many milliseconds |
|
|
23
|
+
| tooltipOffset | Gap to the element in px (default 3.5 — the arrow fills it) |
|
|
24
|
+
| tooltipArrow | Shows the arrow pointing at the middle of the element (default on) |
|
|
25
|
+
| tooltipInteractive | The pointer can move onto the tooltip without closing it — to select or copy its text (default off) |
|
|
26
|
+
| tooltipDisabled | Turns the tooltip off |
|
|
27
|
+
| tooltipMultiline | Wider (360px) with taller lines — for several lines of text |
|
|
28
|
+
| tooltipOverflowOnly | Shows only when the element's text is cut off (`text-overflow: ellipsis`) |
|
|
29
|
+
| tooltipContext | Value passed to the template as `$implicit` |
|
|
30
|
+
| tooltipClass | Class added to the tooltip panel |
|
|
31
|
+
| tooltipDt | Design tokens of this tooltip (`tooltip`) |
|
|
32
|
+
| tooltipPt | Classes and styles of the parts: `root`, `content`, `arrow` |
|
|
33
|
+
| tooltipPtOptions | How `tooltipPt` merges with the global pass-through |
|
|
34
|
+
| tooltipUnstyled | Removes the tectra styles |
|
|
35
|
+
|
|
36
|
+
## Outputs
|
|
37
|
+
| Name | Description |
|
|
38
|
+
|---|---|
|
|
39
|
+
| tooltipShown | The tooltip opened |
|
|
40
|
+
| tooltipHidden | The tooltip closed |
|
|
41
|
+
|
|
42
|
+
## Slots
|
|
43
|
+
| Name | Description |
|
|
44
|
+
|---|---|
|
|
45
|
+
| template | `[txTooltip]="tpl"` with `<ng-template #tpl let-data let-close="close">` — `data` is `tooltipContext`, `close()` hides the tooltip |
|
|
46
|
+
|
|
47
|
+
## Methods
|
|
48
|
+
| Name | Description |
|
|
49
|
+
|---|---|
|
|
50
|
+
| show(delay?) | Opens the tooltip (`#tip="txTooltip"`, then `tip.show()`) |
|
|
51
|
+
| hide(delay?) | Closes it after the hide delay |
|
|
52
|
+
| hideNow() | Closes it at once |
|
|
53
|
+
| toggle() | Opens or closes it |
|
|
54
|
+
| isOpen | Signal: whether it is open |
|
|
55
|
+
|
|
56
|
+
## Keyboard
|
|
57
|
+
| Key | Action |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Tab | Focusing the element shows its tooltip, leaving hides it |
|
|
60
|
+
| Escape | Hides the tooltip; it stays hidden until the element is hovered or focused again |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Tree select
|
|
2
|
+
|
|
3
|
+
Pick from a hierarchy — folders, categories, org units. A select whose panel is a tree (`role="tree"`): expand with the arrows, search keeps the parents of what matches, one node, several nodes, or checkboxes that check a whole branch. The value is the node `key` (an array of keys for several). Also exports the tree helpers `walkTree`, `findNode`, `descendantKeys`, `normalizeChecked`.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| options | Nodes: `{ key, label, children?, icon?, selectable?, disabled?, data? }` |
|
|
9
|
+
| selectionMode | `single`, `multiple` or `checkbox` (a parent checks its branch; partly checked parents show a dash) |
|
|
10
|
+
| display | With several values: `comma` or `chip` |
|
|
11
|
+
| expandedKeys | Keys of the open nodes; two-way with `[(expandedKeys)]` |
|
|
12
|
+
| filter | Search field in the panel |
|
|
13
|
+
| filterPlaceholder | Own placeholder of the search field |
|
|
14
|
+
| placeholder | Text shown while nothing is selected |
|
|
15
|
+
| showClear | Button that clears the value |
|
|
16
|
+
| emptyMessage | Text when the tree is empty or the search found nothing |
|
|
17
|
+
| scrollHeight | Maximum height of the tree |
|
|
18
|
+
| inputId | Id of the field for a `<label for>` |
|
|
19
|
+
| ariaLabel | Accessible name of the field and the tree |
|
|
20
|
+
| ariaLabelledBy | Id of the element that labels the field |
|
|
21
|
+
| size | `small`, `medium`, `large` |
|
|
22
|
+
| variant | `outlined` or `filled` |
|
|
23
|
+
| invalid | Red border and `aria-invalid`; follows the form control by default |
|
|
24
|
+
| readonly | Shows the value, does not open |
|
|
25
|
+
| dt | Design tokens of this instance (`select`; the tree uses `tree`) |
|
|
26
|
+
| pt | Classes and styles of the parts: `root`, `box`, `trigger`, `value`, `chip`, `clear`, `dropdown`, `panel`, `filter`, `filterInput`, `tree`, `node`, `toggler`, `empty` |
|
|
27
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
28
|
+
| unstyled | Removes the tectra styles |
|
|
29
|
+
|
|
30
|
+
## Outputs
|
|
31
|
+
| Name | Description |
|
|
32
|
+
|---|---|
|
|
33
|
+
| changed | The value changed: `{ value, node }` |
|
|
34
|
+
| expandedKeysChange | A node was opened or closed |
|
|
35
|
+
| opened | The panel was opened |
|
|
36
|
+
| closed | The panel was closed (the control is marked as touched) |
|
|
37
|
+
|
|
38
|
+
## Keyboard
|
|
39
|
+
| Key | Action |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Enter / Space / ArrowDown | Opens the panel |
|
|
42
|
+
| ArrowDown / ArrowUp | Next / previous visible node |
|
|
43
|
+
| ArrowRight | Opens a node, or moves to its first child |
|
|
44
|
+
| ArrowLeft | Closes a node, or moves to its parent |
|
|
45
|
+
| Home / End | First / last visible node |
|
|
46
|
+
| Enter / Space | Selects the node (closes with `single`), toggles it with `multiple` / `checkbox` |
|
|
47
|
+
| Letters | Jump to the node that starts with the typed text |
|
|
48
|
+
| Backspace | With `display="chip"` on a closed field, removes the last value |
|
|
49
|
+
| Escape | Closes the panel |
|