@egose/shadcn-theme-ng-tw 0.0.28 → 0.2.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/README.md +130 -13
- package/accordion/README.md +376 -34
- package/accordion/fesm2022/accordion.mjs +20 -20
- package/alert/README.md +343 -34
- package/alert/fesm2022/alert.mjs +18 -18
- package/alert-dialog/README.md +471 -5
- package/alert-dialog/fesm2022/alert-dialog.mjs +48 -48
- package/alert-dialog/types/alert-dialog.d.ts +1 -1
- package/aspect-ratio/README.md +272 -5
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
- package/autocomplete/README.md +473 -34
- package/autocomplete/fesm2022/autocomplete.mjs +54 -54
- package/autocomplete/types/autocomplete.d.ts +1 -1
- package/avatar/README.md +357 -5
- package/avatar/fesm2022/avatar.mjs +32 -32
- package/badge/README.md +289 -34
- package/badge/fesm2022/badge.mjs +4 -4
- package/basic-alert/README.md +324 -34
- package/basic-alert/fesm2022/basic-alert.mjs +4 -4
- package/basic-alert/types/basic-alert.d.ts +1 -1
- package/breadcrumb/README.md +406 -5
- package/breadcrumb/fesm2022/breadcrumb.mjs +34 -34
- package/button/README.md +453 -34
- package/button/fesm2022/button.mjs +96 -118
- package/button/types/button.d.ts +7 -10
- package/button-group/README.md +318 -5
- package/button-group/fesm2022/button-group.mjs +20 -20
- package/calendar/README.md +328 -34
- package/calendar/fesm2022/calendar.mjs +154 -154
- package/card/README.md +331 -5
- package/card/fesm2022/card.mjs +33 -33
- package/carousel/README.md +333 -5
- package/carousel/fesm2022/carousel.mjs +47 -44
- package/carousel/types/carousel.d.ts +1 -1
- package/checkbox/README.md +291 -34
- package/checkbox/fesm2022/checkbox.mjs +22 -20
- package/checkbox/types/checkbox.d.ts +5 -4
- package/collapsible/README.md +332 -5
- package/collapsible/fesm2022/collapsible.mjs +15 -15
- package/combobox/README.md +507 -5
- package/combobox/fesm2022/combobox.mjs +95 -92
- package/combobox/types/combobox.d.ts +1 -1
- package/command/README.md +435 -5
- package/command/fesm2022/command.mjs +56 -56
- package/confirmation-dialog/README.md +272 -34
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +13 -12
- package/confirmation-dialog/types/confirmation-dialog.d.ts +9 -5
- package/context-menu/README.md +366 -5
- package/context-menu/fesm2022/context-menu.mjs +9 -9
- package/date-picker/README.md +436 -34
- package/date-picker/fesm2022/date-picker.mjs +79 -68
- package/date-picker/types/date-picker.d.ts +8 -4
- package/dialog/README.md +419 -34
- package/dialog/fesm2022/dialog.mjs +48 -48
- package/drawer/README.md +395 -5
- package/drawer/fesm2022/drawer.mjs +45 -45
- package/dropdown-menu/README.md +417 -5
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +85 -73
- package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
- package/empty/README.md +329 -5
- package/empty/fesm2022/empty.mjs +31 -31
- package/field/README.md +385 -5
- package/field/fesm2022/field.mjs +59 -59
- package/field/types/field.d.ts +1 -1
- package/form-checkbox/README.md +283 -34
- package/form-checkbox/fesm2022/form-checkbox.mjs +37 -19
- package/form-checkbox/types/form-checkbox.d.ts +7 -1
- package/form-date-picker/README.md +293 -34
- package/form-date-picker/fesm2022/form-date-picker.mjs +59 -24
- package/form-date-picker/types/form-date-picker.d.ts +7 -1
- package/form-field/README.md +327 -34
- package/form-field/fesm2022/form-field.mjs +30 -16
- package/form-field/types/form-field.d.ts +28 -20
- package/form-field-simple/README.md +311 -34
- package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
- package/form-searchable-multiselect/README.md +332 -34
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +41 -21
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +8 -2
- package/form-select/README.md +321 -34
- package/form-select/fesm2022/form-select.mjs +62 -29
- package/form-select/types/form-select.d.ts +7 -1
- package/form-text-input/README.md +342 -34
- package/form-text-input/fesm2022/form-text-input.mjs +43 -55
- package/form-text-input/types/form-text-input.d.ts +9 -12
- package/form-textarea/README.md +318 -34
- package/form-textarea/fesm2022/form-textarea.mjs +42 -23
- package/form-textarea/types/form-textarea.d.ts +8 -1
- package/hover-card/README.md +256 -5
- package/hover-card/fesm2022/hover-card.mjs +19 -19
- package/icon/README.md +210 -34
- package/icon/fesm2022/icon.mjs +8 -8
- package/input/README.md +240 -34
- package/input/fesm2022/input.mjs +17 -12
- package/input/types/input.d.ts +2 -1
- package/input-group/README.md +335 -5
- package/input-group/fesm2022/input-group.mjs +37 -37
- package/input-group/types/input-group.d.ts +3 -3
- package/input-otp/README.md +375 -5
- package/input-otp/fesm2022/input-otp.mjs +27 -27
- package/item/README.md +385 -5
- package/item/fesm2022/item.mjs +54 -54
- package/kbd/README.md +291 -5
- package/kbd/fesm2022/kbd.mjs +13 -13
- package/label/README.md +243 -34
- package/label/fesm2022/label.mjs +9 -9
- package/label/types/label.d.ts +1 -1
- package/layout-simple/README.md +174 -44
- package/layout-simple/fesm2022/layout-simple.mjs +917 -398
- package/layout-simple/types/layout-simple.d.ts +180 -129
- package/menu/README.md +418 -0
- package/menu/fesm2022/menu.mjs +461 -0
- package/menu/package.json +24 -0
- package/menu/types/menu.d.ts +137 -0
- package/menubar/README.md +343 -5
- package/menubar/fesm2022/menubar.mjs +13 -13
- package/native-select/README.md +323 -5
- package/native-select/fesm2022/native-select.mjs +19 -19
- package/navigation-menu/README.md +369 -5
- package/navigation-menu/fesm2022/navigation-menu.mjs +37 -37
- package/package.json +183 -154
- package/pagination/README.md +388 -5
- package/pagination/fesm2022/pagination.mjs +63 -63
- package/popover/README.md +302 -34
- package/popover/fesm2022/popover.mjs +30 -30
- package/progress/README.md +311 -5
- package/progress/fesm2022/progress.mjs +13 -13
- package/radio-group/README.md +335 -34
- package/radio-group/fesm2022/radio-group.mjs +26 -19
- package/resizable/README.md +269 -5
- package/resizable/fesm2022/resizable.mjs +19 -19
- package/scroll-area/README.md +233 -5
- package/scroll-area/fesm2022/scroll-area.mjs +9 -9
- package/searchable-multiselect/README.md +294 -34
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +63 -16
- package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
- package/select/README.md +408 -34
- package/select/fesm2022/select.mjs +80 -72
- package/select/types/select.d.ts +3 -1
- package/separator/README.md +193 -34
- package/separator/fesm2022/separator.mjs +9 -9
- package/separator/types/separator.d.ts +1 -1
- package/sheet/README.md +282 -34
- package/sheet/fesm2022/sheet.mjs +30 -30
- package/sidebar/README.md +457 -5
- package/sidebar/fesm2022/sidebar.mjs +136 -134
- package/sidebar/types/sidebar.d.ts +3 -3
- package/skeleton/README.md +217 -5
- package/skeleton/fesm2022/skeleton.mjs +9 -9
- package/slider/README.md +273 -5
- package/slider/fesm2022/slider.mjs +29 -25
- package/sonner/README.md +317 -34
- package/sonner/fesm2022/sonner.mjs +9 -9
- package/spinner/README.md +255 -34
- package/spinner/fesm2022/spinner.mjs +8 -8
- package/switch/README.md +281 -34
- package/switch/fesm2022/switch.mjs +12 -14
- package/table/README.md +423 -5
- package/table/fesm2022/table.mjs +41 -41
- package/tabs/README.md +382 -34
- package/tabs/fesm2022/tabs.mjs +48 -38
- package/textarea/README.md +282 -5
- package/textarea/fesm2022/textarea.mjs +9 -9
- package/toggle/README.md +270 -5
- package/toggle/fesm2022/toggle.mjs +14 -14
- package/toggle-group/README.md +340 -5
- package/toggle-group/fesm2022/toggle-group.mjs +13 -13
- package/toggle-group/types/toggle-group.d.ts +13 -7
- package/tooltip/README.md +240 -34
- package/tooltip/fesm2022/tooltip.mjs +14 -14
- package/typography/README.md +271 -5
- package/typography/fesm2022/typography.mjs +53 -53
- package/typography/types/typography.d.ts +12 -12
- package/utils/README.md +274 -34
- package/utils/fesm2022/utils.mjs +68 -44
- package/accordion/fesm2022/accordion.mjs.map +0 -1
- package/alert/fesm2022/alert.mjs.map +0 -1
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
- package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
- package/avatar/fesm2022/avatar.mjs.map +0 -1
- package/badge/fesm2022/badge.mjs.map +0 -1
- package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
- package/button/fesm2022/button.mjs.map +0 -1
- package/button-group/fesm2022/button-group.mjs.map +0 -1
- package/calendar/fesm2022/calendar.mjs.map +0 -1
- package/card/fesm2022/card.mjs.map +0 -1
- package/carousel/fesm2022/carousel.mjs.map +0 -1
- package/checkbox/fesm2022/checkbox.mjs.map +0 -1
- package/collapsible/fesm2022/collapsible.mjs.map +0 -1
- package/combobox/fesm2022/combobox.mjs.map +0 -1
- package/command/fesm2022/command.mjs.map +0 -1
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
- package/context-menu/fesm2022/context-menu.mjs.map +0 -1
- package/date-picker/fesm2022/date-picker.mjs.map +0 -1
- package/dialog/fesm2022/dialog.mjs.map +0 -1
- package/drawer/fesm2022/drawer.mjs.map +0 -1
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
- package/empty/fesm2022/empty.mjs.map +0 -1
- package/field/fesm2022/field.mjs.map +0 -1
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
- package/form-field/fesm2022/form-field.mjs.map +0 -1
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
- package/form-select/fesm2022/form-select.mjs.map +0 -1
- package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
- package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
- package/hover-card/fesm2022/hover-card.mjs.map +0 -1
- package/icon/fesm2022/icon.mjs.map +0 -1
- package/input/fesm2022/input.mjs.map +0 -1
- package/input-group/fesm2022/input-group.mjs.map +0 -1
- package/input-otp/fesm2022/input-otp.mjs.map +0 -1
- package/item/fesm2022/item.mjs.map +0 -1
- package/kbd/fesm2022/kbd.mjs.map +0 -1
- package/label/fesm2022/label.mjs.map +0 -1
- package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
- package/menubar/fesm2022/menubar.mjs.map +0 -1
- package/native-select/fesm2022/native-select.mjs.map +0 -1
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
- package/pagination/fesm2022/pagination.mjs.map +0 -1
- package/popover/fesm2022/popover.mjs.map +0 -1
- package/progress/fesm2022/progress.mjs.map +0 -1
- package/radio-group/fesm2022/radio-group.mjs.map +0 -1
- package/resizable/fesm2022/resizable.mjs.map +0 -1
- package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
- package/select/fesm2022/select.mjs.map +0 -1
- package/separator/fesm2022/separator.mjs.map +0 -1
- package/sheet/fesm2022/sheet.mjs.map +0 -1
- package/sidebar/fesm2022/sidebar.mjs.map +0 -1
- package/skeleton/fesm2022/skeleton.mjs.map +0 -1
- package/slider/fesm2022/slider.mjs.map +0 -1
- package/sonner/fesm2022/sonner.mjs.map +0 -1
- package/spinner/fesm2022/spinner.mjs.map +0 -1
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/table/fesm2022/table.mjs.map +0 -1
- package/tabs/fesm2022/tabs.mjs.map +0 -1
- package/textarea/fesm2022/textarea.mjs.map +0 -1
- package/toggle/fesm2022/toggle.mjs.map +0 -1
- package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
- package/tooltip/fesm2022/tooltip.mjs.map +0 -1
- package/typography/fesm2022/typography.mjs.map +0 -1
- package/utils/fesm2022/utils.mjs.map +0 -1
package/table/README.md
CHANGED
|
@@ -1,11 +1,429 @@
|
|
|
1
|
-
# Table
|
|
1
|
+
# Table (`@egose/shadcn-theme-ng/table`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A data table, equivalent to [shadcn/ui Table](https://ui.shadcn.com/docs/components/table). This subpath ships nine **thin styling directives** — no behavior, no spartan-ng primitive, no inputs/outputs. Apply them to native `<div>`/`<table>`/`<thead>`/`<tbody>`/`<tfoot>`/`<tr>`/`<th>`/`<td>`/`<caption>` elements to get shadcn table styling (hover rows, muted header/footer, compact cells) while keeping fully semantic markup you control.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Ships as:** `@egose/shadcn-theme-ng/table` and `@egose/shadcn-theme-ng-tw/table` (the `tw:`-prefixed Tailwind variant). See the [package README](../../README.md) for install steps, peer dependencies, Tailwind setup, and testing/release guidance. Do not publish this project directory independently.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
# Plain Tailwind (no prefix)
|
|
11
|
+
npm install @egose/shadcn-theme-ng
|
|
12
|
+
|
|
13
|
+
# Or the tw:-prefixed variant
|
|
14
|
+
npm install @egose/shadcn-theme-ng-tw
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
No extra runtime dependencies. See the [package README](../../README.md) for the peer-dependency table.
|
|
18
|
+
|
|
19
|
+
## Imports
|
|
20
|
+
|
|
21
|
+
All public symbols are re-exported from `projects/table/src/public-api.ts`:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
HlmCaption,
|
|
26
|
+
HlmTable,
|
|
27
|
+
HlmTableContainer,
|
|
28
|
+
HlmTBody,
|
|
29
|
+
HlmTableImports,
|
|
30
|
+
HlmTableModule,
|
|
31
|
+
HlmTd,
|
|
32
|
+
HlmTFoot,
|
|
33
|
+
HlmTh,
|
|
34
|
+
HlmTHead,
|
|
35
|
+
HlmTr,
|
|
36
|
+
} from '@egose/shadcn-theme-ng/table';
|
|
37
|
+
// tw variant: swap to '@egose/shadcn-theme-ng-tw/table'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Standalone-component usage (preferred):
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import { Component } from '@angular/core';
|
|
44
|
+
import { HlmTableImports } from '@egose/shadcn-theme-ng/table';
|
|
45
|
+
|
|
46
|
+
@Component({
|
|
47
|
+
selector: 'app-demo',
|
|
48
|
+
standalone: true,
|
|
49
|
+
imports: [...HlmTableImports],
|
|
50
|
+
template: `<!-- table markup here -->`,
|
|
51
|
+
})
|
|
52
|
+
export class DemoComponent {}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
NgModule usage:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { NgModule } from '@angular/core';
|
|
59
|
+
import { HlmTableModule } from '@egose/shadcn-theme-ng/table';
|
|
60
|
+
|
|
61
|
+
@NgModule({ imports: [HlmTableModule] })
|
|
62
|
+
export class FeatureModule {}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
| Symbol | Kind | Host selector (real) |
|
|
66
|
+
| ------------------- | ------------- | --------------------------------------------------------------------------------------- |
|
|
67
|
+
| `HlmTableContainer` | Directive | `div[hlmTableContainer]` |
|
|
68
|
+
| `HlmTable` | Directive | `table[hlmTable]` |
|
|
69
|
+
| `HlmTHead` | Directive | `thead[hlmTHead], thead[hlmTableHeader]` |
|
|
70
|
+
| `HlmTBody` | Directive | `tbody[hlmTBody], tbody[hlmTableBody]` |
|
|
71
|
+
| `HlmTFoot` | Directive | `tfoot[hlmTFoot], tfoot[hlmTableFooter]` |
|
|
72
|
+
| `HlmTr` | Directive | `tr[hlmTr], tr[hlmTableRow]` |
|
|
73
|
+
| `HlmTh` | Directive | `th[hlmTh], th[hlmTableHead]` |
|
|
74
|
+
| `HlmTd` | Directive | `td[hlmTd], td[hlmTableCell]` |
|
|
75
|
+
| `HlmCaption` | Directive | `caption[hlmCaption], caption[hlmTableCaption]` |
|
|
76
|
+
| `HlmTableImports` | `const` array | All nine directives, in caption/container/table/body/cell/footer/head/header/row order. |
|
|
77
|
+
| `HlmTableModule` | NgModule | Imports + re-exports all nine directives. |
|
|
78
|
+
|
|
79
|
+
## Anatomy / Structure
|
|
80
|
+
|
|
81
|
+
```html
|
|
82
|
+
<div hlmTableContainer>
|
|
83
|
+
<table hlmTable>
|
|
84
|
+
<caption hlmCaption>
|
|
85
|
+
A list of recent invoices.
|
|
86
|
+
</caption>
|
|
87
|
+
<thead hlmTHead>
|
|
88
|
+
<tr hlmTr>
|
|
89
|
+
<th hlmTh>Invoice</th>
|
|
90
|
+
<th hlmTh>Status</th>
|
|
91
|
+
<th hlmTh>Method</th>
|
|
92
|
+
<th hlmTh class="text-right">Amount</th>
|
|
93
|
+
</tr>
|
|
94
|
+
</thead>
|
|
95
|
+
<tbody hlmTBody>
|
|
96
|
+
<tr hlmTr>
|
|
97
|
+
<td hlmTd>INV001</td>
|
|
98
|
+
<td hlmTd>Paid</td>
|
|
99
|
+
<td hlmTd>Card</td>
|
|
100
|
+
<td hlmTd class="text-right">$250.00</td>
|
|
101
|
+
</tr>
|
|
102
|
+
</tbody>
|
|
103
|
+
<tfoot hlmTFoot>
|
|
104
|
+
<tr hlmTr>
|
|
105
|
+
<td hlmTd colspan="3">Total</td>
|
|
106
|
+
<td hlmTd class="text-right">$250.00</td>
|
|
107
|
+
</tr>
|
|
108
|
+
</tfoot>
|
|
109
|
+
</table>
|
|
110
|
+
</div>
|
|
11
111
|
```
|
|
112
|
+
|
|
113
|
+
Each element also accepts the long alias (`hlmTableHeader`, `hlmTableBody`, `hlmTableFooter`, `hlmTableRow`, `hlmTableHead`, `hlmTableCell`, `hlmTableCaption`) — use whichever reads better; both selectors apply identical styles and `data-slot` attributes.
|
|
114
|
+
|
|
115
|
+
## API reference
|
|
116
|
+
|
|
117
|
+
There are **no inputs, outputs, or methods** on any table directive. Each directive only merges a fixed class list via `classes()` and sets a `data-slot` host attribute:
|
|
118
|
+
|
|
119
|
+
| Directive | `data-slot` | Fixed classes (abridged) |
|
|
120
|
+
| ---------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------- |
|
|
121
|
+
| `HlmTableContainer` (`div[hlmTableContainer]`) | `table-container` | `relative w-full overflow-x-auto` |
|
|
122
|
+
| `HlmTable` (`table[hlmTable]`) | `table` | `w-full caption-bottom text-sm` |
|
|
123
|
+
| `HlmTHead` | `table-header` | `[&_tr]:border-b` |
|
|
124
|
+
| `HlmTBody` | `table-body` | `[&_tr:last-child]:border-0` |
|
|
125
|
+
| `HlmTFoot` | `table-footer` | `bg-muted/50 border-t font-medium …` |
|
|
126
|
+
| `HlmTr` | `table-row` | `hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors …` |
|
|
127
|
+
| `HlmTh` | `table-head` | `text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap …` |
|
|
128
|
+
| `HlmTd` | `table-cell` | `p-2 align-middle whitespace-nowrap …` |
|
|
129
|
+
| `HlmCaption` | `table-caption` | `text-muted-foreground mt-4 text-sm` |
|
|
130
|
+
|
|
131
|
+
User `class` attributes on the same element are preserved and merged (the `classes()` helper keeps base classes).
|
|
132
|
+
|
|
133
|
+
## Examples
|
|
134
|
+
|
|
135
|
+
### 1. Basic invoice table
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
// demo-basic.component.ts
|
|
139
|
+
import { Component } from '@angular/core';
|
|
140
|
+
import { HlmTableImports } from '@egose/shadcn-theme-ng/table';
|
|
141
|
+
|
|
142
|
+
@Component({
|
|
143
|
+
selector: 'demo-basic',
|
|
144
|
+
standalone: true,
|
|
145
|
+
imports: [...HlmTableImports],
|
|
146
|
+
template: `
|
|
147
|
+
<div hlmTableContainer>
|
|
148
|
+
<table hlmTable>
|
|
149
|
+
<caption hlmCaption>
|
|
150
|
+
A list of your recent invoices.
|
|
151
|
+
</caption>
|
|
152
|
+
<thead hlmTHead>
|
|
153
|
+
<tr hlmTr>
|
|
154
|
+
<th hlmTh>Invoice</th>
|
|
155
|
+
<th hlmTh>Status</th>
|
|
156
|
+
<th hlmTh>Method</th>
|
|
157
|
+
<th hlmTh class="text-right">Amount</th>
|
|
158
|
+
</tr>
|
|
159
|
+
</thead>
|
|
160
|
+
<tbody hlmTBody>
|
|
161
|
+
<tr hlmTr>
|
|
162
|
+
<td hlmTd class="font-medium">INV001</td>
|
|
163
|
+
<td hlmTd>Paid</td>
|
|
164
|
+
<td hlmTd>Credit Card</td>
|
|
165
|
+
<td hlmTd class="text-right">$250.00</td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr hlmTr>
|
|
168
|
+
<td hlmTd class="font-medium">INV002</td>
|
|
169
|
+
<td hlmTd>Pending</td>
|
|
170
|
+
<td hlmTd>PayPal</td>
|
|
171
|
+
<td hlmTd class="text-right">$150.00</td>
|
|
172
|
+
</tr>
|
|
173
|
+
</tbody>
|
|
174
|
+
<tfoot hlmTFoot>
|
|
175
|
+
<tr hlmTr>
|
|
176
|
+
<td hlmTd colspan="3">Total</td>
|
|
177
|
+
<td hlmTd class="text-right">$400.00</td>
|
|
178
|
+
</tr>
|
|
179
|
+
</tfoot>
|
|
180
|
+
</table>
|
|
181
|
+
</div>
|
|
182
|
+
`,
|
|
183
|
+
})
|
|
184
|
+
export class DemoBasic {}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### 2. Async data with loading / empty states
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
// demo-async.component.ts
|
|
191
|
+
import { Component, inject, signal } from '@angular/core';
|
|
192
|
+
import { HttpClient } from '@angular/common/http';
|
|
193
|
+
import { HlmTableImports } from '@egose/shadcn-theme-ng/table';
|
|
194
|
+
import { HlmSpinnerImports } from '@egose/shadcn-theme-ng/spinner';
|
|
195
|
+
|
|
196
|
+
interface Invoice {
|
|
197
|
+
id: string;
|
|
198
|
+
status: string;
|
|
199
|
+
method: string;
|
|
200
|
+
amount: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@Component({
|
|
204
|
+
selector: 'demo-async',
|
|
205
|
+
standalone: true,
|
|
206
|
+
imports: [...HlmTableImports, ...HlmSpinnerImports],
|
|
207
|
+
template: `
|
|
208
|
+
<div hlmTableContainer>
|
|
209
|
+
<table hlmTable>
|
|
210
|
+
<caption hlmCaption>
|
|
211
|
+
{{
|
|
212
|
+
caption()
|
|
213
|
+
}}
|
|
214
|
+
</caption>
|
|
215
|
+
<thead hlmTHead>
|
|
216
|
+
<tr hlmTr>
|
|
217
|
+
<th hlmTh>Invoice</th>
|
|
218
|
+
<th hlmTh>Status</th>
|
|
219
|
+
<th hlmTh>Method</th>
|
|
220
|
+
<th hlmTh class="text-right">Amount</th>
|
|
221
|
+
</tr>
|
|
222
|
+
</thead>
|
|
223
|
+
<tbody hlmTBody>
|
|
224
|
+
@if (loading()) {
|
|
225
|
+
<tr hlmTr>
|
|
226
|
+
<td hlmTd colspan="4"><hlm-spinner size="1.25rem" /></td>
|
|
227
|
+
</tr>
|
|
228
|
+
} @else if (invoices().length === 0) {
|
|
229
|
+
<tr hlmTr>
|
|
230
|
+
<td hlmTd colspan="4" class="text-center">No invoices found.</td>
|
|
231
|
+
</tr>
|
|
232
|
+
} @else {
|
|
233
|
+
@for (inv of invoices(); track inv.id) {
|
|
234
|
+
<tr hlmTr>
|
|
235
|
+
<td hlmTd class="font-medium">{{ inv.id }}</td>
|
|
236
|
+
<td hlmTd>{{ inv.status }}</td>
|
|
237
|
+
<td hlmTd>{{ inv.method }}</td>
|
|
238
|
+
<td hlmTd class="text-right">{{ inv.amount }}</td>
|
|
239
|
+
</tr>
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
</tbody>
|
|
243
|
+
</table>
|
|
244
|
+
</div>
|
|
245
|
+
`,
|
|
246
|
+
})
|
|
247
|
+
export class DemoAsync {
|
|
248
|
+
private readonly http = inject(HttpClient);
|
|
249
|
+
readonly invoices = signal<Invoice[]>([]);
|
|
250
|
+
readonly loading = signal(true);
|
|
251
|
+
readonly caption = signal('Loading…');
|
|
252
|
+
|
|
253
|
+
constructor() {
|
|
254
|
+
this.http.get<Invoice[]>('/api/invoices').subscribe({
|
|
255
|
+
next: (rows) => {
|
|
256
|
+
this.invoices.set(rows);
|
|
257
|
+
this.loading.set(false);
|
|
258
|
+
this.caption.set(`${rows.length} invoices.`);
|
|
259
|
+
},
|
|
260
|
+
error: () => {
|
|
261
|
+
this.loading.set(false);
|
|
262
|
+
this.caption.set('Could not load invoices.');
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### 3. Row selection with checkboxes
|
|
270
|
+
|
|
271
|
+
`HlmTh`/`HlmTd` automatically remove padding when they contain `[role=checkbox]` (`[&:has([role=checkbox])]:pe-0`).
|
|
272
|
+
|
|
273
|
+
```ts
|
|
274
|
+
// demo-select.component.ts
|
|
275
|
+
import { Component, signal } from '@angular/core';
|
|
276
|
+
import { HlmTableImports } from '@egose/shadcn-theme-ng/table';
|
|
277
|
+
import { HlmCheckboxImports } from '@egose/shadcn-theme-ng/checkbox';
|
|
278
|
+
|
|
279
|
+
@Component({
|
|
280
|
+
selector: 'demo-select',
|
|
281
|
+
standalone: true,
|
|
282
|
+
imports: [...HlmTableImports, ...HlmCheckboxImports],
|
|
283
|
+
template: `
|
|
284
|
+
<div hlmTableContainer>
|
|
285
|
+
<table hlmTable>
|
|
286
|
+
<thead hlmTHead>
|
|
287
|
+
<tr hlmTr>
|
|
288
|
+
<th hlmTh><hlm-checkbox [checked]="all()" (changed)="toggleAll($event)" aria-label="Select all" /></th>
|
|
289
|
+
<th hlmTh>Name</th>
|
|
290
|
+
<th hlmTh class="text-right">Role</th>
|
|
291
|
+
</tr>
|
|
292
|
+
</thead>
|
|
293
|
+
<tbody hlmTBody>
|
|
294
|
+
@for (u of users(); track u.id) {
|
|
295
|
+
<tr hlmTr [attr.data-state]="u.selected ? 'selected' : null">
|
|
296
|
+
<td hlmTd><hlm-checkbox [(checked)]="u.selected" [aria-label]="'Select ' + u.name" /></td>
|
|
297
|
+
<td hlmTd>{{ u.name }}</td>
|
|
298
|
+
<td hlmTd class="text-right">{{ u.role }}</td>
|
|
299
|
+
</tr>
|
|
300
|
+
}
|
|
301
|
+
</tbody>
|
|
302
|
+
</table>
|
|
303
|
+
</div>
|
|
304
|
+
`,
|
|
305
|
+
})
|
|
306
|
+
export class DemoSelect {
|
|
307
|
+
readonly users = signal([
|
|
308
|
+
{ id: 1, name: 'Ada', role: 'Admin', selected: false },
|
|
309
|
+
{ id: 2, name: 'Grace', role: 'Editor', selected: true },
|
|
310
|
+
]);
|
|
311
|
+
readonly all = signal(false);
|
|
312
|
+
|
|
313
|
+
toggleAll(v: boolean) {
|
|
314
|
+
this.users.update((rows) => rows.map((r) => ({ ...r, selected: v })));
|
|
315
|
+
this.all.set(v);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Selected rows pick up `data-[state=selected]:bg-muted` highlighting — set `[attr.data-state]="'selected'"` yourself, as above.
|
|
321
|
+
|
|
322
|
+
### 4. Long-alias selectors
|
|
323
|
+
|
|
324
|
+
Identical output — pick the alias style your team prefers:
|
|
325
|
+
|
|
326
|
+
```html
|
|
327
|
+
<div hlmTableContainer>
|
|
328
|
+
<table hlmTable>
|
|
329
|
+
<caption hlmTableCaption>
|
|
330
|
+
Aliases work everywhere.
|
|
331
|
+
</caption>
|
|
332
|
+
<thead hlmTableHeader>
|
|
333
|
+
<tr hlmTableRow>
|
|
334
|
+
<th hlmTableHead>A</th>
|
|
335
|
+
<th hlmTableHead>B</th>
|
|
336
|
+
</tr>
|
|
337
|
+
</thead>
|
|
338
|
+
<tbody hlmTableBody>
|
|
339
|
+
<tr hlmTableRow>
|
|
340
|
+
<td hlmTableCell>1</td>
|
|
341
|
+
<td hlmTableCell>2</td>
|
|
342
|
+
</tr>
|
|
343
|
+
</tbody>
|
|
344
|
+
<tfoot hlmTableFooter>
|
|
345
|
+
<tr hlmTableRow>
|
|
346
|
+
<td hlmTableCell>Total</td>
|
|
347
|
+
<td hlmTableCell>3</td>
|
|
348
|
+
</tr>
|
|
349
|
+
</tfoot>
|
|
350
|
+
</table>
|
|
351
|
+
</div>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### 5. Status badges + right-aligned numeric columns
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
// demo-rich.component.ts
|
|
358
|
+
import { Component } from '@angular/core';
|
|
359
|
+
import { HlmTableImports } from '@egose/shadcn-theme-ng/table';
|
|
360
|
+
import { HlmBadge } from '@egose/shadcn-theme-ng/badge';
|
|
361
|
+
|
|
362
|
+
@Component({
|
|
363
|
+
selector: 'demo-rich',
|
|
364
|
+
standalone: true,
|
|
365
|
+
imports: [...HlmTableImports, HlmBadge],
|
|
366
|
+
template: `
|
|
367
|
+
<div hlmTableContainer>
|
|
368
|
+
<table hlmTable>
|
|
369
|
+
<thead hlmTHead>
|
|
370
|
+
<tr hlmTr>
|
|
371
|
+
<th hlmTh>Order</th>
|
|
372
|
+
<th hlmTh>Status</th>
|
|
373
|
+
<th hlmTh class="text-right">Total</th>
|
|
374
|
+
</tr>
|
|
375
|
+
</thead>
|
|
376
|
+
<tbody hlmTBody>
|
|
377
|
+
<tr hlmTr>
|
|
378
|
+
<td hlmTd class="font-medium">#1001</td>
|
|
379
|
+
<td hlmTd><span hlmBadge>Paid</span></td>
|
|
380
|
+
<td hlmTd class="text-right tabular-nums">$1,250.00</td>
|
|
381
|
+
</tr>
|
|
382
|
+
<tr hlmTr>
|
|
383
|
+
<td hlmTd class="font-medium">#1002</td>
|
|
384
|
+
<td hlmTd><span hlmBadge variant="secondary">Pending</span></td>
|
|
385
|
+
<td hlmTd class="text-right tabular-nums">$320.00</td>
|
|
386
|
+
</tr>
|
|
387
|
+
<tr hlmTr>
|
|
388
|
+
<td hlmTd class="font-medium">#1003</td>
|
|
389
|
+
<td hlmTd><span hlmBadge variant="destructive">Refunded</span></td>
|
|
390
|
+
<td hlmTd class="text-right tabular-nums">$99.00</td>
|
|
391
|
+
</tr>
|
|
392
|
+
</tbody>
|
|
393
|
+
</table>
|
|
394
|
+
</div>
|
|
395
|
+
`,
|
|
396
|
+
})
|
|
397
|
+
export class DemoRich {}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
### 6. Overflow container for wide tables
|
|
401
|
+
|
|
402
|
+
`HlmTableContainer` adds `overflow-x-auto` — wide tables scroll horizontally on small screens instead of breaking layout:
|
|
403
|
+
|
|
404
|
+
```html
|
|
405
|
+
<div hlmTableContainer class="max-w-3xl rounded-md border">
|
|
406
|
+
<table hlmTable>
|
|
407
|
+
<!-- many columns… -->
|
|
408
|
+
</table>
|
|
409
|
+
</div>
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
## Accessibility notes
|
|
413
|
+
|
|
414
|
+
- Keep semantic structure: exactly one `<thead>` with `<th>` header cells, body rows in `<tbody>`, summaries in `<tfoot>`, and a `<caption>` (or `aria-label`) describing the table.
|
|
415
|
+
- Use `scope="col"` / `scope="row"` on `<th>` elements when the table has row headers.
|
|
416
|
+
- Right-align numeric columns but keep DOM order logical — screen readers read row by row.
|
|
417
|
+
- For selectable rows, expose selection via `aria-selected` or the checkbox's accessible name; the `data-state="selected"` highlight is visual only.
|
|
418
|
+
- Avoid nested interactive chaos: if a row is clickable _and_ contains buttons/links, make the row action a real button in a cell rather than a `(click)` on `<tr>`.
|
|
419
|
+
|
|
420
|
+
## Theming / CSS variables
|
|
421
|
+
|
|
422
|
+
All styling keys off shadcn tokens (`text-foreground`, `text-muted-foreground`, `bg-muted/50`, `border-*`). The table inherits your theme automatically; add borders, rounding, or width constraints via `class` on the container (merged, not clobbered).
|
|
423
|
+
|
|
424
|
+
## Related subpaths
|
|
425
|
+
|
|
426
|
+
- `@egose/shadcn-theme-ng/badge` — status pills inside cells.
|
|
427
|
+
- `@egose/shadcn-theme-ng/checkbox` — row-selection checkboxes.
|
|
428
|
+
- `@egose/shadcn-theme-ng/spinner` / `@egose/shadcn-theme-ng/skeleton` — loading states for async tables.
|
|
429
|
+
- `@egose/shadcn-theme-ng/pagination` — paging controls below large tables.
|
package/table/fesm2022/table.mjs
CHANGED
|
@@ -4,12 +4,12 @@ import { classes } from '@egose/shadcn-theme-ng-tw/utils';
|
|
|
4
4
|
|
|
5
5
|
class HlmTableContainer {
|
|
6
6
|
constructor() {
|
|
7
|
-
classes(() => 'relative w-full overflow-x-auto');
|
|
7
|
+
classes(() => 'tw:relative tw:w-full tw:overflow-x-auto');
|
|
8
8
|
}
|
|
9
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
10
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
9
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTableContainer, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
10
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTableContainer, isStandalone: true, selector: "div[hlmTableContainer]", host: { attributes: { "data-slot": "table-container" } }, ngImport: i0 });
|
|
11
11
|
}
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTableContainer, decorators: [{
|
|
13
13
|
type: Directive,
|
|
14
14
|
args: [{
|
|
15
15
|
selector: 'div[hlmTableContainer]',
|
|
@@ -21,12 +21,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
21
21
|
*/
|
|
22
22
|
class HlmTable {
|
|
23
23
|
constructor() {
|
|
24
|
-
classes(() => 'w-full caption-bottom text-sm');
|
|
24
|
+
classes(() => 'tw:w-full tw:caption-bottom tw:text-sm');
|
|
25
25
|
}
|
|
26
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
27
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTable, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTable, isStandalone: true, selector: "table[hlmTable]", host: { attributes: { "data-slot": "table" } }, ngImport: i0 });
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTable, decorators: [{
|
|
30
30
|
type: Directive,
|
|
31
31
|
args: [{
|
|
32
32
|
selector: 'table[hlmTable]',
|
|
@@ -39,12 +39,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
39
39
|
*/
|
|
40
40
|
class HlmTHead {
|
|
41
41
|
constructor() {
|
|
42
|
-
classes(() => '[&_tr]:border-b');
|
|
42
|
+
classes(() => 'tw:[&_tr]:border-b');
|
|
43
43
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTHead, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTHead, isStandalone: true, selector: "thead[hlmTHead],thead[hlmTableHeader]", host: { attributes: { "data-slot": "table-header" } }, ngImport: i0 });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTHead, decorators: [{
|
|
48
48
|
type: Directive,
|
|
49
49
|
args: [{
|
|
50
50
|
selector: 'thead[hlmTHead],thead[hlmTableHeader]',
|
|
@@ -57,12 +57,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
57
57
|
*/
|
|
58
58
|
class HlmTBody {
|
|
59
59
|
constructor() {
|
|
60
|
-
classes(() => '[&_tr:last-child]:border-0');
|
|
60
|
+
classes(() => 'tw:[&_tr:last-child]:border-0');
|
|
61
61
|
}
|
|
62
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
63
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTBody, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
63
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTBody, isStandalone: true, selector: "tbody[hlmTBody],tbody[hlmTableBody]", host: { attributes: { "data-slot": "table-body" } }, ngImport: i0 });
|
|
64
64
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTBody, decorators: [{
|
|
66
66
|
type: Directive,
|
|
67
67
|
args: [{
|
|
68
68
|
selector: 'tbody[hlmTBody],tbody[hlmTableBody]',
|
|
@@ -75,12 +75,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
75
75
|
*/
|
|
76
76
|
class HlmTFoot {
|
|
77
77
|
constructor() {
|
|
78
|
-
classes(() => 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0');
|
|
78
|
+
classes(() => 'tw:bg-muted/50 tw:border-t tw:font-medium tw:[&>tr]:last:border-b-0');
|
|
79
79
|
}
|
|
80
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
81
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTFoot, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
81
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTFoot, isStandalone: true, selector: "tfoot[hlmTFoot],tfoot[hlmTableFooter]", host: { attributes: { "data-slot": "table-footer" } }, ngImport: i0 });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTFoot, decorators: [{
|
|
84
84
|
type: Directive,
|
|
85
85
|
args: [{
|
|
86
86
|
selector: 'tfoot[hlmTFoot],tfoot[hlmTableFooter]',
|
|
@@ -93,12 +93,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
93
93
|
*/
|
|
94
94
|
class HlmTr {
|
|
95
95
|
constructor() {
|
|
96
|
-
classes(() => 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors has-aria-expanded:bg-muted/50');
|
|
96
|
+
classes(() => 'tw:hover:bg-muted/50 tw:data-[state=selected]:bg-muted tw:border-b tw:transition-colors tw:has-aria-expanded:bg-muted/50');
|
|
97
97
|
}
|
|
98
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
99
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTr, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
99
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTr, isStandalone: true, selector: "tr[hlmTr],tr[hlmTableRow]", host: { attributes: { "data-slot": "table-row" } }, ngImport: i0 });
|
|
100
100
|
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTr, decorators: [{
|
|
102
102
|
type: Directive,
|
|
103
103
|
args: [{
|
|
104
104
|
selector: 'tr[hlmTr],tr[hlmTableRow]',
|
|
@@ -111,12 +111,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
111
111
|
*/
|
|
112
112
|
class HlmTh {
|
|
113
113
|
constructor() {
|
|
114
|
-
classes(() => 'text-foreground h-10 px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0');
|
|
114
|
+
classes(() => 'tw:text-foreground tw:h-10 tw:px-2 tw:text-start tw:align-middle tw:font-medium tw:whitespace-nowrap tw:[&:has([role=checkbox])]:pe-0');
|
|
115
115
|
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
117
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTh, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTh, isStandalone: true, selector: "th[hlmTh],th[hlmTableHead]", host: { attributes: { "data-slot": "table-head" } }, ngImport: i0 });
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTh, decorators: [{
|
|
120
120
|
type: Directive,
|
|
121
121
|
args: [{
|
|
122
122
|
selector: 'th[hlmTh],th[hlmTableHead]',
|
|
@@ -129,12 +129,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
129
129
|
*/
|
|
130
130
|
class HlmTd {
|
|
131
131
|
constructor() {
|
|
132
|
-
classes(() => 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0');
|
|
132
|
+
classes(() => 'tw:p-2 tw:align-middle tw:whitespace-nowrap tw:[&:has([role=checkbox])]:pe-0');
|
|
133
133
|
}
|
|
134
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
135
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTd, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
135
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmTd, isStandalone: true, selector: "td[hlmTd],td[hlmTableCell]", host: { attributes: { "data-slot": "table-cell" } }, ngImport: i0 });
|
|
136
136
|
}
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTd, decorators: [{
|
|
138
138
|
type: Directive,
|
|
139
139
|
args: [{
|
|
140
140
|
selector: 'td[hlmTd],td[hlmTableCell]',
|
|
@@ -147,12 +147,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
147
147
|
*/
|
|
148
148
|
class HlmCaption {
|
|
149
149
|
constructor() {
|
|
150
|
-
classes(() => 'text-muted-foreground mt-4 text-sm');
|
|
150
|
+
classes(() => 'tw:text-muted-foreground tw:mt-4 tw:text-sm');
|
|
151
151
|
}
|
|
152
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
153
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
152
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCaption, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
153
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmCaption, isStandalone: true, selector: "caption[hlmCaption],caption[hlmTableCaption]", host: { attributes: { "data-slot": "table-caption" } }, ngImport: i0 });
|
|
154
154
|
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmCaption, decorators: [{
|
|
156
156
|
type: Directive,
|
|
157
157
|
args: [{
|
|
158
158
|
selector: 'caption[hlmCaption],caption[hlmTableCaption]',
|
|
@@ -175,8 +175,8 @@ const HlmTableImports = [
|
|
|
175
175
|
HlmTr,
|
|
176
176
|
];
|
|
177
177
|
class HlmTableModule {
|
|
178
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
179
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
179
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmTableModule, imports: [HlmCaption,
|
|
180
180
|
HlmTableContainer,
|
|
181
181
|
HlmTable,
|
|
182
182
|
HlmTBody,
|
|
@@ -193,9 +193,9 @@ class HlmTableModule {
|
|
|
193
193
|
HlmTh,
|
|
194
194
|
HlmTHead,
|
|
195
195
|
HlmTr] });
|
|
196
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.
|
|
196
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTableModule });
|
|
197
197
|
}
|
|
198
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmTableModule, decorators: [{
|
|
199
199
|
type: NgModule,
|
|
200
200
|
args: [{
|
|
201
201
|
imports: [...HlmTableImports],
|
|
@@ -208,4 +208,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
208
208
|
*/
|
|
209
209
|
|
|
210
210
|
export { HlmCaption, HlmTBody, HlmTFoot, HlmTHead, HlmTable, HlmTableContainer, HlmTableImports, HlmTableModule, HlmTd, HlmTh, HlmTr };
|
|
211
|
-
|
|
211
|
+
|