@tectra-ng/blocks 0.0.0-stage → 0.1.6

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.
Files changed (101) hide show
  1. package/README.md +16 -2
  2. package/action-tile/README.md +33 -0
  3. package/actions-menu/README.md +42 -0
  4. package/app-footer/README.md +30 -0
  5. package/app-layout/README.md +51 -0
  6. package/command-palette/README.md +63 -0
  7. package/console-layout/README.md +70 -0
  8. package/cookie-notice/README.md +45 -0
  9. package/empty-state/README.md +35 -0
  10. package/fesm2022/tectra-ng-blocks-action-tile.mjs +294 -0
  11. package/fesm2022/tectra-ng-blocks-action-tile.mjs.map +1 -0
  12. package/fesm2022/tectra-ng-blocks-actions-menu.mjs +380 -0
  13. package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -0
  14. package/fesm2022/tectra-ng-blocks-app-footer.mjs +276 -0
  15. package/fesm2022/tectra-ng-blocks-app-footer.mjs.map +1 -0
  16. package/fesm2022/tectra-ng-blocks-app-layout.mjs +544 -0
  17. package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -0
  18. package/fesm2022/tectra-ng-blocks-command-palette.mjs +663 -0
  19. package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -0
  20. package/fesm2022/tectra-ng-blocks-console-layout.mjs +1060 -0
  21. package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -0
  22. package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +416 -0
  23. package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-blocks-empty-state.mjs +278 -0
  25. package/fesm2022/tectra-ng-blocks-empty-state.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-blocks-filters-panel.mjs +959 -0
  27. package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-blocks-kanban.mjs +864 -0
  29. package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-blocks-network-status.mjs +303 -0
  31. package/fesm2022/tectra-ng-blocks-network-status.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-blocks-page-header.mjs +195 -0
  33. package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs +692 -0
  35. package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-blocks-public-header.mjs +372 -0
  37. package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-blocks-qr-code.mjs +487 -0
  39. package/fesm2022/tectra-ng-blocks-qr-code.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-blocks-switch-language.mjs +316 -0
  41. package/fesm2022/tectra-ng-blocks-switch-language.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-blocks-switch-theme.mjs +416 -0
  43. package/fesm2022/tectra-ng-blocks-switch-theme.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs +260 -0
  45. package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-blocks-wizard.mjs +1284 -0
  47. package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-blocks.mjs +4 -0
  49. package/fesm2022/tectra-ng-blocks.mjs.map +1 -0
  50. package/filters-panel/README.md +68 -0
  51. package/kanban/README.md +55 -0
  52. package/network-status/README.md +33 -0
  53. package/package.json +137 -3
  54. package/page-header/README.md +32 -0
  55. package/pinned-tabs/README.md +42 -0
  56. package/public-header/README.md +44 -0
  57. package/qr-code/README.md +52 -0
  58. package/switch-language/README.md +33 -0
  59. package/switch-theme/README.md +32 -0
  60. package/topbar-preferences/README.md +35 -0
  61. package/types/tectra-ng-blocks-action-tile.d.ts +114 -0
  62. package/types/tectra-ng-blocks-action-tile.d.ts.map +1 -0
  63. package/types/tectra-ng-blocks-actions-menu.d.ts +112 -0
  64. package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -0
  65. package/types/tectra-ng-blocks-app-footer.d.ts +111 -0
  66. package/types/tectra-ng-blocks-app-footer.d.ts.map +1 -0
  67. package/types/tectra-ng-blocks-app-layout.d.ts +212 -0
  68. package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -0
  69. package/types/tectra-ng-blocks-command-palette.d.ts +291 -0
  70. package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -0
  71. package/types/tectra-ng-blocks-console-layout.d.ts +454 -0
  72. package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -0
  73. package/types/tectra-ng-blocks-cookie-notice.d.ts +168 -0
  74. package/types/tectra-ng-blocks-cookie-notice.d.ts.map +1 -0
  75. package/types/tectra-ng-blocks-empty-state.d.ts +138 -0
  76. package/types/tectra-ng-blocks-empty-state.d.ts.map +1 -0
  77. package/types/tectra-ng-blocks-filters-panel.d.ts +314 -0
  78. package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -0
  79. package/types/tectra-ng-blocks-kanban.d.ts +260 -0
  80. package/types/tectra-ng-blocks-kanban.d.ts.map +1 -0
  81. package/types/tectra-ng-blocks-network-status.d.ts +108 -0
  82. package/types/tectra-ng-blocks-network-status.d.ts.map +1 -0
  83. package/types/tectra-ng-blocks-page-header.d.ts +86 -0
  84. package/types/tectra-ng-blocks-page-header.d.ts.map +1 -0
  85. package/types/tectra-ng-blocks-pinned-tabs.d.ts +159 -0
  86. package/types/tectra-ng-blocks-pinned-tabs.d.ts.map +1 -0
  87. package/types/tectra-ng-blocks-public-header.d.ts +142 -0
  88. package/types/tectra-ng-blocks-public-header.d.ts.map +1 -0
  89. package/types/tectra-ng-blocks-qr-code.d.ts +160 -0
  90. package/types/tectra-ng-blocks-qr-code.d.ts.map +1 -0
  91. package/types/tectra-ng-blocks-switch-language.d.ts +106 -0
  92. package/types/tectra-ng-blocks-switch-language.d.ts.map +1 -0
  93. package/types/tectra-ng-blocks-switch-theme.d.ts +108 -0
  94. package/types/tectra-ng-blocks-switch-theme.d.ts.map +1 -0
  95. package/types/tectra-ng-blocks-topbar-preferences.d.ts +103 -0
  96. package/types/tectra-ng-blocks-topbar-preferences.d.ts.map +1 -0
  97. package/types/tectra-ng-blocks-wizard.d.ts +682 -0
  98. package/types/tectra-ng-blocks-wizard.d.ts.map +1 -0
  99. package/types/tectra-ng-blocks.d.ts +2 -0
  100. package/types/tectra-ng-blocks.d.ts.map +1 -0
  101. package/wizard/README.md +77 -0
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # @tectra-ng/blocks
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Ready page blocks for consoles and admin apps, built from the tectra components: filters panel, page header, empty state, layouts, wizard, command palette and more.
4
+
5
+ ```bash
6
+ npm install @tectra-ng/blocks
7
+ ```
8
+
9
+ It also comes with `tectra-ng`. One entry point per block, same as the components:
10
+
11
+ ```ts
12
+ import { TxFiltersPanel, TxFilterField } from '@tectra-ng/blocks/filters-panel';
13
+ ```
14
+
15
+ Peer packages: `@tectra-ng/ui`, `@tectra-ng/core`, `@tectra-ng/themes`, `@tectra-ng/icons`.
16
+
17
+ Docs and examples: [tectra-ng.com](https://tectra-ng.com).
@@ -0,0 +1,33 @@
1
+ # Action tile
2
+
3
+ A full-width clickable tile: an icon in a tinted square, a title, a line of text and a chevron. Use a stack of tiles for a choice that starts at once — a recovery method, a way to import, a kind of project to create.
4
+
5
+ ```html
6
+ <tx-action-tile icon="envelope" title="Email a code" text="We send it to j***@mail.com" (tileClick)="send()" />
7
+ ```
8
+
9
+ While `loading` the chevron turns into a spinner and the tile takes no clicks. The title and the text together name the button.
10
+
11
+ ## Inputs
12
+ | Name | Description |
13
+ |---|---|
14
+ | title | Required. Semibold line |
15
+ | text | Muted line under the title |
16
+ | icon | Icon in the tinted square; left out when empty |
17
+ | loading | Spinner instead of the chevron, `aria-busy`, no clicks |
18
+ | disabled | Dimmed, no clicks |
19
+ | dt | Design tokens of this instance (`actionTile`) |
20
+ | pt | Classes and styles of the parts: `root`, `button`, `icon`, `body`, `title`, `text`, `end` |
21
+ | ptOptions | How `pt` merges with the global pass-through |
22
+ | unstyled | Removes the tectra styles |
23
+
24
+ ## Outputs
25
+ | Name | Description |
26
+ |---|---|
27
+ | tileClick | The tile was clicked or pressed (not while `loading` or `disabled`) |
28
+
29
+ ## Keyboard
30
+ | Key | Action |
31
+ |---|---|
32
+ | Tab | Moves the focus to the tile |
33
+ | Enter / Space | Presses the tile |
@@ -0,0 +1,42 @@
1
+ # Actions menu
2
+
3
+ The "more" button of a page header, a panel or a card: an outlined `⋯` button that opens a short list of actions in a popover. A destructive action is red. The menu emits the id of the chosen action after it has closed, so the action can open a dialog or a confirm right away.
4
+
5
+ ```html
6
+ <tx-actions-menu tooltip="Team actions" [items]="actions" (itemSelect)="run($event)" />
7
+ ```
8
+
9
+ ```ts
10
+ readonly actions: TxActionsMenuItem[] = [
11
+ { id: 'rename', label: 'Rename', icon: 'pencil' },
12
+ { id: 'delete', label: 'Delete team', icon: 'trash', danger: true },
13
+ ];
14
+ ```
15
+
16
+ Without items nothing is rendered. The button is named by `ariaLabel`, then `tooltip`, then the translated "More actions".
17
+
18
+ ## Inputs
19
+ | Name | Description |
20
+ |---|---|
21
+ | items | Required. Actions (`TxActionsMenuItem[]`: `id`, `label`, optional `icon` and `danger`) |
22
+ | tooltip | Tooltip of the button; also its accessible name |
23
+ | ariaLabel | Accessible name of the button and the menu when it differs from the tooltip |
24
+ | size | `medium` (default) or `small` — a 30px button for card and column headers |
25
+ | dt | Design tokens of this instance (`actionsMenu`) |
26
+ | pt | Classes and styles of the parts: `root`, `trigger`, `list`, `item`, `icon`, `label` |
27
+ | ptOptions | How `pt` merges with the global pass-through |
28
+ | unstyled | Removes the tectra styles |
29
+
30
+ ## Outputs
31
+ | Name | Description |
32
+ |---|---|
33
+ | itemSelect | The id of the chosen action, emitted once the menu has closed |
34
+
35
+ ## Keyboard
36
+ | Key | Action |
37
+ |---|---|
38
+ | Enter / Space | On the button: opens the menu and focuses the first action. On an action: runs it |
39
+ | Down / Up | Next / previous action, wrapping around |
40
+ | Home / End | First / last action |
41
+ | Escape | Closes the menu, the focus returns to the button |
42
+ | Tab | Leaves the menu and closes it |
@@ -0,0 +1,30 @@
1
+ # App footer
2
+
3
+ The footer of an app: `© <year> <name>` and a row of legal links. One footer for public pages, the signed-in layout and consoles.
4
+
5
+ ```html
6
+ <tx-app-footer
7
+ name="Acme"
8
+ [links]="[{ label: 'Privacy policy', routerLink: '/privacy' }, { label: 'Terms', routerLink: '/terms' }]"
9
+ />
10
+ ```
11
+
12
+ When the footer is narrower than 768px the links go above the copyright line (it follows its own width).
13
+
14
+ ## Inputs
15
+ | Name | Description |
16
+ |---|---|
17
+ | name | Required. Name after the year |
18
+ | links | Legal links (`TxAppFooterLink[]`: `label`, `routerLink` + `queryParams`, or `url` + `target`); empty — no navigation |
19
+ | variant | `page` — full width public pages with a centred column (default); `app` — inside the signed-in layout; `console` — inside a console layout |
20
+ | navLabel | Name of the links navigation; the translated "Legal" by default |
21
+ | year | Year to show; the current year by default |
22
+ | dt | Design tokens of this instance (`appFooter`) |
23
+ | pt | Classes and styles of the parts: `root`, `inner`, `copy`, `nav`, `link` |
24
+ | ptOptions | How `pt` merges with the global pass-through |
25
+ | unstyled | Removes the tectra styles |
26
+
27
+ ## Keyboard
28
+ | Key | Action |
29
+ |---|---|
30
+ | Tab / Shift + Tab | Moves through the links |
@@ -0,0 +1,51 @@
1
+ # App layout
2
+
3
+ The shell of a signed-in app: a sidebar menu, a top bar, the page and a footer. On a desktop the sidebar is a narrow rail of icons that opens over the page while the pointer or the keyboard focus is on it; its pin button keeps it open and moves the page aside. Below 1024px the menu hides behind a button in the top bar and slides in over a mask.
4
+
5
+ ```html
6
+ <tx-app-layout title="Reports" logo="/logo.svg" stateKey="app-menu" backdrop [model]="menu">
7
+ <div txAppTopbar>…</div>
8
+ <router-outlet />
9
+ <tx-app-footer txAppFooter variant="app" name="Reports" />
10
+ </tx-app-layout>
11
+ ```
12
+
13
+ `model` takes `TxPanelMenuItem` sections, as `tx-panel-menu` with `variant="sidebar"` draws them: a section with a `label` gets a title, items take `icon`, `routerLink`, `badge`, `disabled` (a lock), nested `items` and `active`. Without the sidebar (`[sidebar]="false"`) the top bar shows the logo and the title instead — for pages before the user has a workspace.
14
+
15
+ ## Inputs
16
+ | Name | Description |
17
+ |---|---|
18
+ | model | Menu sections (`TxPanelMenuItem[]`) |
19
+ | logo | Logo image URL in the sidebar header (and in the top bar without the sidebar) |
20
+ | title | App name next to the logo |
21
+ | homeLink | Router link of the logo (`/` by default); `undefined` makes it plain text |
22
+ | sidebar | `false` drops the sidebar and the menu button and puts the logo into the top bar |
23
+ | anchored | Two-way: the sidebar is pinned open (default `true`) |
24
+ | stateKey | `localStorage` key that keeps `anchored` between visits |
25
+ | backdrop | Draws the soft gradient with a grain behind the page |
26
+ | backdropVariant | `spectrum` — primary, purple and cyan tints (default); `accent` — tints of the primary colour only |
27
+ | responsive | What the 1024px breakpoint measures: `viewport` — the window (default), `container` — the layout itself; it also keeps the mobile menu, the mask and the backdrop inside it (a preview, a frame) |
28
+ | menuLabel | Name of the menu, its button and the sidebar; the translated "Menu" by default |
29
+ | dt | Design tokens of this instance (`appLayout`) |
30
+ | pt | Classes and styles of the parts: `root`, `sidebar`, `brand`, `menu`, `topbar`, `menuButton`, `content`, `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
+ | anchoredChange | The sidebar was pinned or unpinned |
38
+
39
+ ## Slots
40
+ | Name | Description |
41
+ |---|---|
42
+ | txAppTopbar | The end of the top bar: search, notifications, the user menu |
43
+ | default | The page, usually `<router-outlet>` |
44
+ | txAppFooter | Under the page, e.g. `tx-app-footer variant="app"` |
45
+
46
+ ## Keyboard
47
+ | Key | Action |
48
+ |---|---|
49
+ | Tab | Into the sidebar: it opens while the keyboard focus is inside (a mouse click does not keep it open) |
50
+ | Enter / Space | On the pin button: keeps the sidebar open or lets it fold; on the menu button: opens or closes the mobile menu |
51
+ | Escape | Closes the mobile menu, focus goes back to its button |
@@ -0,0 +1,63 @@
1
+ # Command palette
2
+
3
+ A search button for the top bar and a ⌘K / Ctrl K window with grouped results: the keyboard moves through them, Enter opens one — through the router, or by running its command. The host only supplies the items and runs its own search; for a fixed list (the menu pages) the palette filters by itself.
4
+
5
+ ```html
6
+ <tx-command-palette
7
+ placeholder="Search pages and domains"
8
+ [items]="results()"
9
+ [groupLabels]="{ pages: 'Pages', domains: 'Domains' }"
10
+ [loading]="searching()"
11
+ (searchChange)="searchDomains($event)"
12
+ (closed)="clearResults()"
13
+ />
14
+ ```
15
+
16
+ `menuPaletteItems` turns a sidebar menu (`TxPanelMenuItem[]`) into page items; `commandPaletteFilter` matches the label and the sublabel. Both are also exported as functions (`menuPaletteItems()`, `filterPaletteItems()`).
17
+
18
+ The window is a dialog with a combobox: the field owns the focus, the active result is announced with `aria-activedescendant`, focus goes back to the button after closing, and the page does not scroll behind it.
19
+
20
+ ## Inputs
21
+ | Name | Description |
22
+ |---|---|
23
+ | label | Text of the button and name of the window; the translated "Search" by default |
24
+ | placeholder | Placeholder of the search field; the label by default |
25
+ | icon | Icon of the button (`search`) |
26
+ | items | Results in display order (`TxCommandPaletteItem[]`: `id`, `group`, `label`, `sublabel`, `icon`, `routerLink` + `queryParams`, `command`); a group title shows where `group` changes |
27
+ | groupLabels | Group id → title, e.g. `{ pages: 'Pages' }`; a missing id shows as is |
28
+ | loading | A spinner in the field and a "Searching…" row |
29
+ | emptyText | Text when a query finds nothing; translated by default |
30
+ | loadingText | Text of the loading row; translated by default |
31
+ | minQueryLength | Shortest term `searchChange` sends; shorter terms send `''` (default 2) |
32
+ | debounceTime | Delay in ms before `searchChange` (default 300) |
33
+ | shortcutKey | Key that opens and closes the window with ⌘ / Ctrl (default `k`) |
34
+ | localFilter | The palette filters `items` by the query itself — for fixed lists |
35
+ | compact | The button shows only its icon (it does so by itself below 768px) |
36
+ | dt | Design tokens of this instance (`commandPalette`) |
37
+ | pt | Classes and styles of the parts: `root`, `trigger`, `overlay`, `panel`, `search`, `results`, `item`, `footer` |
38
+ | ptOptions | How `pt` merges with the global pass-through |
39
+ | unstyled | Removes the tectra styles |
40
+
41
+ ## Outputs
42
+ | Name | Description |
43
+ |---|---|
44
+ | queryChange | The trimmed query on every keystroke |
45
+ | searchChange | The debounced term for a server search; `''` when shorter than `minQueryLength` |
46
+ | itemSelect | A result was picked (click or Enter), before navigation |
47
+ | opened | The window opened |
48
+ | closed | The window closed |
49
+
50
+ ## Methods
51
+ | Name | Description |
52
+ |---|---|
53
+ | open() | Opens the window |
54
+ | close() | Closes it and clears the query |
55
+ | select(item) | Picks a result: emits `itemSelect`, navigates or runs its command, closes |
56
+
57
+ ## Keyboard
58
+ | Key | Action |
59
+ |---|---|
60
+ | ⌘ K / Ctrl K | Opens or closes the window |
61
+ | Arrow Down / Arrow Up | Moves through the results, wrapping around |
62
+ | Enter | Opens the active result |
63
+ | Escape | Closes the window, focus goes back to the button |
@@ -0,0 +1,70 @@
1
+ # Console layout
2
+
3
+ The frame of an "app inside an app" console: a sticky header with the brand and the route crumbs, an icon rail of sections, the page and a footer. An optional left panel (`tx-console-panel`) adds a sticky list or tree next to the page. The console shell only passes data in.
4
+
5
+ ```html
6
+ <tx-console-layout
7
+ title="Search"
8
+ titleMuted="console"
9
+ logo="/logo.svg"
10
+ homeLink="/search"
11
+ footerName="Search console"
12
+ documentTitle="Search console"
13
+ [railItems]="sections"
14
+ >
15
+ <button txButton txConsoleApps text icon="th-large" aria-label="Apps"></button>
16
+ <div txConsoleActions>…</div>
17
+ <router-outlet />
18
+ </tx-console-layout>
19
+ ```
20
+
21
+ Crumbs come from the active route chain: every route whose `data` has the `crumbKey` (default `crumb`) adds its string — `{ path: 'projects', data: { crumb: 'Projects' } }`. Pass `crumbs` to set them yourself.
22
+
23
+ Narrower than 768px the rail becomes a row under the header and only the brand stays in it. By default the console follows the window (`responsive="viewport"`); with `responsive="container"` it follows its own width — for a console in a split view, a preview or any frame narrower than the window. Without anything in `txConsoleApps` the empty cell above the rail goes away and the brand moves to the edge.
24
+
25
+ ```html
26
+ <tx-console-panel label="Projects">
27
+ <tx-panel-menu txConsolePanelAside variant="sidebar" [model]="projects" />
28
+ <router-outlet />
29
+ </tx-console-panel>
30
+ ```
31
+
32
+ The panel goes inside the layout content; it moves the layout footer next to its page. Narrower than 1024px (the window, or the console with `responsive="container"`) the panel folds into a bar above the page: a button with the panel `label` opens the list under it, and it closes again after a link or an item is picked (not a folder that opens), on navigation or on Escape.
33
+
34
+ ## Inputs
35
+ | Name | Description |
36
+ |---|---|
37
+ | title | Required. Brand text next to the logo |
38
+ | titleMuted | Muted second word of the brand, e.g. `console` |
39
+ | logo | Logo image URL |
40
+ | homeLink | Router link of the brand; without it the brand is plain text |
41
+ | railItems | Rail sections (`TxConsoleRailItem[]`): `label`, `icon` and `routerLink` (+ `queryParams`, `activeOptions` — `TX_CONSOLE_RAIL_EXACT_MATCH` for the home section, `TX_CONSOLE_RAIL_SECTION_MATCH` for sections), or `url`, or `command` with `active` |
42
+ | railLabel | Name of the rail navigation; the translated "Sections" by default |
43
+ | crumbKey | Route `data` key whose strings along the active route become the crumbs (default `crumb`) |
44
+ | crumbs | Own crumbs instead of the route ones |
45
+ | footerName | Name in the footer `© <year> <name>`; empty — no footer |
46
+ | footerLinks | Legal links of the footer (`TxAppFooterLink[]`) |
47
+ | documentTitle | Browser tab title while the console is open: `<last crumb> · <documentTitle>`; the old title comes back when it closes |
48
+ | favicon | Tab icon while the console is open; the old one comes back when it closes |
49
+ | translate | Translate function of the shell: crumbs, rail labels and footer labels are keys passed through it |
50
+ | responsive | What the 768px / 1024px breakpoints measure: `viewport` — the window (default), `container` — the console itself |
51
+ | label | `tx-console-panel`: name of the left panel |
52
+ | dt | Design tokens of this instance (`consoleLayout`) |
53
+ | pt | Classes and styles of the parts: `root`, `header`, `brand`, `logo`, `crumbs`, `rail`, `content`, `footer`; panel: `root`, `aside`, `toggle`, `nav`, `main`, `content` |
54
+ | ptOptions | How `pt` merges with the global pass-through |
55
+ | unstyled | Removes the tectra styles |
56
+
57
+ ## Slots
58
+ | Name | Description |
59
+ |---|---|
60
+ | txConsoleApps | The cell above the rail, e.g. an app switcher; left out when empty |
61
+ | txConsoleActions | The end of the header: search, notifications, user menu |
62
+ | default | The page, usually `<router-outlet>` |
63
+ | txConsolePanelAside | `tx-console-panel`: one element with the panel content — a link list or a tree |
64
+
65
+ ## Keyboard
66
+ | Key | Action |
67
+ |---|---|
68
+ | Tab / Shift + Tab | Moves through the header, the rail sections and the page in order |
69
+ | Enter | On a rail section: opens it; on the folded panel button: opens or closes the list |
70
+ | Escape | In the open folded panel: closes it, focus goes back to its button |
@@ -0,0 +1,45 @@
1
+ # Cookie notice
2
+
3
+ A small card in the bottom-left corner that tells the visitor the site keeps only essential cookies, with a "Learn more" link and a "Got it" button. Once dismissed it stays hidden for `maxAgeDays`, remembered in a cookie.
4
+
5
+ ```html
6
+ <tx-cookie-notice [link]="['/privacy']" sharedDomain="example.com" />
7
+ ```
8
+
9
+ The texts are translated and can be replaced. It renders nothing on the server and appears in the browser after a short delay, so it never moves the page. With `sharedDomain` the choice is kept for every subdomain of that domain.
10
+
11
+ ## Inputs
12
+ | Name | Description |
13
+ |---|---|
14
+ | title | Bold line (translated "Only essential cookies" by default) |
15
+ | text | Explanation under the title |
16
+ | icon | Icon in the tinted circle (default `shield`) |
17
+ | link | Router commands of the "Learn more" link |
18
+ | href | Plain URL of the "Learn more" link, when there is no `link` |
19
+ | linkLabel | Text of the link (translated "Learn more" by default) |
20
+ | acceptLabel | Text of the button (translated "Got it" by default) |
21
+ | label | Name of the region (translated "Cookie notice" by default) |
22
+ | cookieName | Name of the cookie that keeps the choice (default `cookieNoticeDismissed`) |
23
+ | maxAgeDays | How long the choice is kept (default 365) |
24
+ | sharedDomain | Parent domain to keep the choice for all its subdomains, e.g. `example.com` |
25
+ | dt | Design tokens of this instance (`cookieNotice`) |
26
+ | pt | Classes and styles of the parts: `root`, `icon`, `body`, `title`, `text`, `actions`, `link`, `accept` |
27
+ | ptOptions | How `pt` merges with the global pass-through |
28
+ | unstyled | Removes the tectra styles |
29
+
30
+ ## Outputs
31
+ | Name | Description |
32
+ |---|---|
33
+ | dismissed | The visitor pressed the button |
34
+
35
+ ## Methods
36
+ | Name | Description |
37
+ |---|---|
38
+ | show() | Shows the notice again, e.g. from a "Cookie settings" link |
39
+ | dismiss() | Hides it and keeps the choice |
40
+
41
+ ## Keyboard
42
+ | Key | Action |
43
+ |---|---|
44
+ | Tab | Moves to the link and the button |
45
+ | Enter / Space | On the button: hides the notice |
@@ -0,0 +1,35 @@
1
+ # Empty state
2
+
3
+ The "nothing here yet" block: an icon in a tinted circle, an optional title, a muted line of text and the actions that get the user going. Use it for an empty list, a search without results or a section the user has not set up.
4
+
5
+ ```html
6
+ <tx-empty-state icon="bolt" title="No workers yet" text="Create the first worker to start.">
7
+ <button txButton icon="plus" (click)="create()">Create worker</button>
8
+ </tx-empty-state>
9
+ ```
10
+
11
+ It is a `status` region, so screen readers read the title and the text when it appears.
12
+
13
+ ## Inputs
14
+ | Name | Description |
15
+ |---|---|
16
+ | icon | Icon in the circle (default `inbox`) |
17
+ | title | Semibold line; left out when empty |
18
+ | text | Muted line under the title; left out when empty |
19
+ | variant | `plain` — no frame (default); `framed` — own card frame for a page-level empty state; `inset` — a ground-coloured block inside a card |
20
+ | size | `compact` — one row with a small icon; `normal` (default); `large` — onboarding size |
21
+ | tone | Colour of the icon: `primary` (default), `neutral`, `success`, `info`, `warn`, `danger` |
22
+ | dt | Design tokens of this instance (`emptyState`) |
23
+ | pt | Classes and styles of the parts: `root`, `icon`, `body`, `title`, `text` |
24
+ | ptOptions | How `pt` merges with the global pass-through |
25
+ | unstyled | Removes the tectra styles |
26
+
27
+ ## Slots
28
+ | Name | Description |
29
+ |---|---|
30
+ | default | Actions under the text, usually one or two buttons |
31
+
32
+ ## Keyboard
33
+ | Key | Action |
34
+ |---|---|
35
+ | Tab / Shift + Tab | Moves through the actions |