@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/item/README.md
CHANGED
|
@@ -1,11 +1,391 @@
|
|
|
1
|
-
# Item
|
|
1
|
+
# Item (`@egose/shadcn-theme-ng/item`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`Item` is a set of composable row primitives for stacked list content — settings rows, task lists, notification feeds, dropdown-menu content — the shadcn/ui _Item_ equivalent. The `hlmItem` container lays out media, content (title + description), and actions in one wrapping flex row; `hlmItemGroup` stacks rows; header/footer, separator, and cva `variant`/`size` props cover the rest. All styling-only directives except the separator (spartan-ng `BrnSeparator`).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Ships as:** `@egose/shadcn-theme-ng/item` (plain Tailwind) and `@egose/shadcn-theme-ng-tw/item` (`tw:`-prefixed variant). See the [package README](../../README.md) for installation, peer dependencies, and the Tailwind-variant contract. 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
|
+
Peer dependencies (Angular, CDK, `@spartan-ng/brain`, `rxjs`) are documented in the [package README](../../README.md#peer-dependencies).
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
21
|
+
// tw variant:
|
|
22
|
+
// import { HlmItemImports } from '@egose/shadcn-theme-ng-tw/item';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Imports
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
// Standalone component — spread the imports array:
|
|
29
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
30
|
+
|
|
31
|
+
@Component({
|
|
32
|
+
standalone: true,
|
|
33
|
+
imports: [HlmItemImports],
|
|
34
|
+
template: `
|
|
35
|
+
<div hlmItemGroup>
|
|
36
|
+
<div hlmItem>
|
|
37
|
+
<div hlmItemMedia variant="icon">…</div>
|
|
38
|
+
<div hlmItemContent>
|
|
39
|
+
<p hlmItemTitle>Title</p>
|
|
40
|
+
<p hlmItemDescription>Description</p>
|
|
41
|
+
</div>
|
|
42
|
+
<div hlmItemActions>…</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
`,
|
|
46
|
+
})
|
|
47
|
+
export class MyComp {}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
// NgModule-based — import the module:
|
|
52
|
+
import { HlmItemModule } from '@egose/shadcn-theme-ng/item';
|
|
53
|
+
|
|
54
|
+
@NgModule({ imports: [HlmItemModule] })
|
|
55
|
+
export class MyModule {}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Exported from `src/public-api.ts`: `HlmItem`, `HlmItemActions`, `HlmItemContent`, `HlmItemDescription`, `HlmItemFooter`, `HlmItemGroup`, `HlmItemHeader`, `HlmItemMedia`, `HlmItemSeparator`, `HlmItemTitle`, the `ItemVariants` / `ItemMediaVariants` types, `HlmItemConfig` / `provideHlmItemConfig` / `injectHlmItemConfig` / `provideHlmItemMediaConfig` / `injectHlmItemMediaConfig` (from `hlm-item-token`), plus `HlmItemImports` and `HlmItemModule`.
|
|
59
|
+
|
|
60
|
+
## Anatomy / Structure
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<div hlmItemGroup>
|
|
64
|
+
<article hlmItem variant="outline" size="default">
|
|
65
|
+
<div hlmItemMedia variant="icon"><!-- icon or avatar --></div>
|
|
66
|
+
|
|
67
|
+
<div hlmItemContent>
|
|
68
|
+
<div hlmItemHeader>
|
|
69
|
+
<p hlmItemTitle>Row title</p>
|
|
70
|
+
<!-- trailing meta -->
|
|
71
|
+
</div>
|
|
72
|
+
<p hlmItemDescription>Secondary line, clamps to 2 lines.</p>
|
|
73
|
+
<div hlmItemFooter>
|
|
74
|
+
<span>Footer meta</span>
|
|
75
|
+
<div hlmItemActions>
|
|
76
|
+
<button hlmBtn size="sm">Open</button>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</article>
|
|
81
|
+
|
|
82
|
+
<div hlmItemSeparator></div>
|
|
83
|
+
|
|
84
|
+
<article hlmItem size="sm">…</article>
|
|
85
|
+
</div>
|
|
11
86
|
```
|
|
87
|
+
|
|
88
|
+
Real selectors (each works as attribute or element): `[hlmItem]`/`hlm-item`, `[hlmItemGroup]`/`hlm-item-group`, `[hlmItemMedia]`/`hlm-item-media`, `[hlmItemContent]`/`hlm-item-content`, `[hlmItemTitle]`/`hlm-item-title`, `[hlmItemDescription]`/`hlm-item-description`, `[hlmItemHeader]`/`hlm-item-header`, `[hlmItemFooter]`/`hlm-item-footer`, `[hlmItemActions]`/`hlm-item-actions`, `[hlmItemSeparator]`/`hlm-item-separator` (hostDirectives: `BrnSeparator` with `orientation` input).
|
|
89
|
+
|
|
90
|
+
## API reference
|
|
91
|
+
|
|
92
|
+
### `[hlmItem]` — `HlmItem`
|
|
93
|
+
|
|
94
|
+
| Input | Type | Default | Description |
|
|
95
|
+
| --------- | ----------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| `variant` | `'default' \| 'outline' \| 'muted'` | `'default'` | `default` = transparent border; `outline` = bordered; `muted` = muted fill (reflected as `data-variant`). |
|
|
97
|
+
| `size` | `'default' \| 'sm' \| 'xs'` | `'default'` | Density: `default` (gap-3.5, px-4, py-3.5) → `sm` → `xs` (reflected as `data-size`). `xs` also zeroes padding inside dropdown-menu content. |
|
|
98
|
+
|
|
99
|
+
`ItemVariants` is the cva `VariantProps` type. Defaults come from `injectHlmItemConfig()` — override globally with `provideHlmItemConfig({ variant: 'outline' })`.
|
|
100
|
+
|
|
101
|
+
### `[hlmItemMedia]` — `HlmItemMedia`
|
|
102
|
+
|
|
103
|
+
| Input | Type | Default | Description |
|
|
104
|
+
| --------- | -------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------- |
|
|
105
|
+
| `variant` | `'default' \| 'icon' \| 'image'` | `'default'` | `icon` = icon sizing hook; `image` = fixed `size-10` rounded cover frame (shrinks with item `size`). |
|
|
106
|
+
|
|
107
|
+
Default from `injectHlmItemMediaConfig()`; override with `provideHlmItemMediaConfig({ variant: 'icon' })`.
|
|
108
|
+
|
|
109
|
+
### Layout pieces (no inputs/outputs)
|
|
110
|
+
|
|
111
|
+
| Directive | `data-slot` | Role |
|
|
112
|
+
| -------------------- | ------------------ | ----------------------------------------------------------------- |
|
|
113
|
+
| `HlmItemGroup` | `item-group` | Vertical stack (`flex-col`, gap adapts to child `size`). |
|
|
114
|
+
| `HlmItemContent` | `item-content` | Flex-1 column filling the space between media and actions. |
|
|
115
|
+
| `HlmItemTitle` | `item-title` | Medium semibold single-line title (`line-clamp-1`). |
|
|
116
|
+
| `HlmItemDescription` | `item-description` | Muted two-line secondary text (`line-clamp-2`, links underlined). |
|
|
117
|
+
| `HlmItemHeader` | `item-header` | Full-width top row inside content (`justify-between`). |
|
|
118
|
+
| `HlmItemFooter` | `item-footer` | Full-width bottom row inside content (`justify-between`). |
|
|
119
|
+
| `HlmItemActions` | `item-actions` | Right-aligned control cluster. |
|
|
120
|
+
|
|
121
|
+
### `[hlmItemSeparator]` — `HlmItemSeparator`
|
|
122
|
+
|
|
123
|
+
`hostDirectives: [{ directive: BrnSeparator, inputs: ['orientation'] }]` + `hlmSeparatorClass` with `tw:my-2`. Accepts `orientation` (`horizontal` default) from the brain separator.
|
|
124
|
+
|
|
125
|
+
## Examples
|
|
126
|
+
|
|
127
|
+
### 1. Basic stacked list with all variants
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
import { Component } from '@angular/core';
|
|
131
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
132
|
+
|
|
133
|
+
@Component({
|
|
134
|
+
standalone: true,
|
|
135
|
+
imports: [HlmItemImports],
|
|
136
|
+
template: `
|
|
137
|
+
<div hlmItemGroup>
|
|
138
|
+
<div hlmItem>
|
|
139
|
+
<div hlmItemContent>
|
|
140
|
+
<p hlmItemTitle>Default row</p>
|
|
141
|
+
<p hlmItemDescription>Transparent border, default density.</p>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<div hlmItem variant="outline">
|
|
145
|
+
<div hlmItemContent>
|
|
146
|
+
<p hlmItemTitle>Outlined row</p>
|
|
147
|
+
<p hlmItemDescription>Bordered card look.</p>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<div hlmItem variant="muted">
|
|
151
|
+
<div hlmItemContent>
|
|
152
|
+
<p hlmItemTitle>Muted row</p>
|
|
153
|
+
<p hlmItemDescription>Soft filled background.</p>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
`,
|
|
158
|
+
})
|
|
159
|
+
export class VariantsExample {}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### 2. Sizes: default / sm / xs
|
|
163
|
+
|
|
164
|
+
```ts
|
|
165
|
+
import { Component } from '@angular/core';
|
|
166
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
167
|
+
|
|
168
|
+
@Component({
|
|
169
|
+
standalone: true,
|
|
170
|
+
imports: [HlmItemImports],
|
|
171
|
+
template: `
|
|
172
|
+
<div hlmItemGroup>
|
|
173
|
+
<div hlmItem>
|
|
174
|
+
<div hlmItemContent>
|
|
175
|
+
<p hlmItemTitle>Default density</p>
|
|
176
|
+
<p hlmItemDescription>Roomy padding for primary lists.</p>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
<div hlmItem size="sm">
|
|
180
|
+
<div hlmItemContent>
|
|
181
|
+
<p hlmItemTitle>Compact</p>
|
|
182
|
+
<p hlmItemDescription>Sidebars and secondary lists.</p>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
<div hlmItem size="xs">
|
|
186
|
+
<div hlmItemContent>
|
|
187
|
+
<p hlmItemTitle>Dense</p>
|
|
188
|
+
<p hlmItemDescription>Dropdowns and menus.</p>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
`,
|
|
193
|
+
})
|
|
194
|
+
export class SizesExample {}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### 3. Media variants: icon, image, avatar
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import { Component } from '@angular/core';
|
|
201
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
202
|
+
import { lucideFolder, lucideBell } from '@ng-icons/lucide';
|
|
203
|
+
import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
|
|
204
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
205
|
+
import { HlmAvatarImports } from '@egose/shadcn-theme-ng/avatar';
|
|
206
|
+
|
|
207
|
+
@Component({
|
|
208
|
+
standalone: true,
|
|
209
|
+
imports: [NgIcon, HlmIcon, HlmItemImports, HlmAvatarImports],
|
|
210
|
+
providers: [provideIcons({ lucideFolder, lucideBell })],
|
|
211
|
+
template: `
|
|
212
|
+
<div hlmItemGroup>
|
|
213
|
+
<div hlmItem variant="outline">
|
|
214
|
+
<div hlmItemMedia variant="icon"><ng-icon hlm name="lucideFolder" size="sm" /></div>
|
|
215
|
+
<div hlmItemContent>
|
|
216
|
+
<p hlmItemTitle>Design assets</p>
|
|
217
|
+
<p hlmItemDescription>128 files · updated yesterday</p>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
<div hlmItem variant="outline">
|
|
221
|
+
<div hlmItemMedia variant="image">
|
|
222
|
+
<img src="https://picsum.photos/80" alt="Project thumbnail" />
|
|
223
|
+
</div>
|
|
224
|
+
<div hlmItemContent>
|
|
225
|
+
<p hlmItemTitle>Launch photos</p>
|
|
226
|
+
<p hlmItemDescription>Cover image crops to a rounded frame.</p>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
<div hlmItem variant="outline">
|
|
230
|
+
<div hlmItemMedia>
|
|
231
|
+
<hlm-avatar size="sm">
|
|
232
|
+
<span hlmAvatarFallback>JA</span>
|
|
233
|
+
</hlm-avatar>
|
|
234
|
+
</div>
|
|
235
|
+
<div hlmItemContent>
|
|
236
|
+
<p hlmItemTitle>Jane mentioned you</p>
|
|
237
|
+
<p hlmItemDescription>Any element works as default media.</p>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
`,
|
|
242
|
+
})
|
|
243
|
+
export class MediaExample {}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
### 4. Task row: header + footer + actions + separator
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
import { Component, signal } from '@angular/core';
|
|
250
|
+
import { HlmItemImports } from '@egose/shadcn-theme-ng/item';
|
|
251
|
+
import { HlmButton } from '@egose/shadcn-theme-ng/button';
|
|
252
|
+
|
|
253
|
+
@Component({
|
|
254
|
+
standalone: true,
|
|
255
|
+
imports: [HlmItemImports, HlmButton],
|
|
256
|
+
template: `
|
|
257
|
+
<div hlmItemGroup>
|
|
258
|
+
@for (task of tasks(); track task.title; let last = $last) {
|
|
259
|
+
<article hlmItem variant="outline">
|
|
260
|
+
<div hlmItemMedia class="tw:h-11 tw:w-11 tw:rounded-2xl tw:bg-slate-900 tw:text-sm tw:text-white">
|
|
261
|
+
{{ task.initials }}
|
|
262
|
+
</div>
|
|
263
|
+
<div hlmItemContent>
|
|
264
|
+
<div hlmItemHeader>
|
|
265
|
+
<p hlmItemTitle>{{ task.title }}</p>
|
|
266
|
+
<span class="tw:text-xs tw:text-slate-500">{{ task.status }}</span>
|
|
267
|
+
</div>
|
|
268
|
+
<p hlmItemDescription>{{ task.description }}</p>
|
|
269
|
+
<div hlmItemFooter>
|
|
270
|
+
<span class="tw:text-sm tw:text-slate-500">Updated {{ task.updated }}</span>
|
|
271
|
+
<div hlmItemActions>
|
|
272
|
+
<button hlmBtn size="sm" variant="secondary" type="button">Review</button>
|
|
273
|
+
<button hlmBtn size="sm" type="button">Open</button>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</article>
|
|
278
|
+
@if (!last) {
|
|
279
|
+
<div hlmItemSeparator></div>
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
</div>
|
|
283
|
+
`,
|
|
284
|
+
})
|
|
285
|
+
export class TaskListExample {
|
|
286
|
+
readonly tasks = signal([
|
|
287
|
+
{
|
|
288
|
+
initials: 'DS',
|
|
289
|
+
title: 'Redesign onboarding',
|
|
290
|
+
status: 'In review',
|
|
291
|
+
description: 'Five new steps with progress tracking.',
|
|
292
|
+
updated: '2h ago',
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
initials: 'PL',
|
|
296
|
+
title: 'Fix checkout total',
|
|
297
|
+
status: 'Todo',
|
|
298
|
+
description: 'Tax rounding drifts by one cent.',
|
|
299
|
+
updated: '1d ago',
|
|
300
|
+
},
|
|
301
|
+
]);
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### 5. Link rows (whole-row anchor) + global config
|
|
306
|
+
|
|
307
|
+
Rows containing an `<a>` get a hover background automatically (`[a]:hover:bg-muted`). Set app-wide defaults with `provideHlmItemConfig`:
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
import { Component } from '@angular/core';
|
|
311
|
+
import { HlmItemImports, provideHlmItemConfig } from '@egose/shadcn-theme-ng/item';
|
|
312
|
+
|
|
313
|
+
@Component({
|
|
314
|
+
standalone: true,
|
|
315
|
+
imports: [HlmItemImports],
|
|
316
|
+
providers: [provideHlmItemConfig({ variant: 'outline', size: 'sm' })],
|
|
317
|
+
template: `
|
|
318
|
+
<div hlmItemGroup>
|
|
319
|
+
<a hlmItem href="/docs/getting-started">
|
|
320
|
+
<div hlmItemContent>
|
|
321
|
+
<p hlmItemTitle>Getting started</p>
|
|
322
|
+
<p hlmItemDescription>Install and render your first component.</p>
|
|
323
|
+
</div>
|
|
324
|
+
</a>
|
|
325
|
+
<a hlmItem href="/docs/theming">
|
|
326
|
+
<div hlmItemContent>
|
|
327
|
+
<p hlmItemTitle>Theming</p>
|
|
328
|
+
<p hlmItemDescription>CSS variables and dark mode.</p>
|
|
329
|
+
</div>
|
|
330
|
+
</a>
|
|
331
|
+
</div>
|
|
332
|
+
`,
|
|
333
|
+
})
|
|
334
|
+
export class LinksExample {}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### 6. NgModule usage + `orientation` on the separator
|
|
338
|
+
|
|
339
|
+
```ts
|
|
340
|
+
import { NgModule, Component } from '@angular/core';
|
|
341
|
+
import { HlmItemModule } from '@egose/shadcn-theme-ng/item';
|
|
342
|
+
|
|
343
|
+
@Component({
|
|
344
|
+
selector: 'app-settings-list',
|
|
345
|
+
template: `
|
|
346
|
+
<div hlmItemGroup>
|
|
347
|
+
<div hlmItem variant="outline" size="sm">
|
|
348
|
+
<div hlmItemContent>
|
|
349
|
+
<div hlmItemHeader>
|
|
350
|
+
<p hlmItemTitle>Email notifications</p>
|
|
351
|
+
<span class="tw:text-xs">On</span>
|
|
352
|
+
</div>
|
|
353
|
+
<p hlmItemDescription>Product updates and security alerts.</p>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
<div hlmItemSeparator orientation="horizontal"></div>
|
|
357
|
+
<div hlmItem variant="outline" size="sm">
|
|
358
|
+
<div hlmItemContent>
|
|
359
|
+
<div hlmItemHeader>
|
|
360
|
+
<p hlmItemTitle>Weekly digest</p>
|
|
361
|
+
<span class="tw:text-xs">Off</span>
|
|
362
|
+
</div>
|
|
363
|
+
<p hlmItemDescription>A Monday summary of workspace activity.</p>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
`,
|
|
368
|
+
})
|
|
369
|
+
export class SettingsListComponent {}
|
|
370
|
+
|
|
371
|
+
@NgModule({ declarations: [SettingsListComponent], imports: [HlmItemModule] })
|
|
372
|
+
export class SettingsListModule {}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
## Accessibility notes
|
|
376
|
+
|
|
377
|
+
- Use semantic hosts: `<article>` for feed/task rows, `<li>` inside `<ul>` for plain lists, `<a href>` when the whole row navigates (hover affordance is built in).
|
|
378
|
+
- `hlmItemTitle` renders a `<p>` — if the title should head a section, swap in a real heading (`<h3 hlmItemTitle>`) since the directive is attribute-matched and keeps its classes.
|
|
379
|
+
- Keep action buttons labeled (`Open`, `Review`) — icon-only actions need `aria-label`.
|
|
380
|
+
- The separator is a brain `BrnSeparator` (presentational); it adds no keyboard stops. Status text (`In review`, counts) should be plain text, not color-only.
|
|
381
|
+
|
|
382
|
+
## Theming / CSS variables
|
|
383
|
+
|
|
384
|
+
No component-specific CSS variables; surfaces come from the shared tokens (`--border`, `--muted`, `--radius`). App-wide `variant`/`size` defaults via `provideHlmItemConfig` / `provideHlmItemMediaConfig`; per-row tweaks via inputs or `class`.
|
|
385
|
+
|
|
386
|
+
## Related subpaths
|
|
387
|
+
|
|
388
|
+
- `@egose/shadcn-theme-ng/separator` — `hlmSeparatorClass` behind the item separator.
|
|
389
|
+
- `@egose/shadcn-theme-ng/avatar` — typical `hlmItemMedia` content.
|
|
390
|
+
- `@egose/shadcn-theme-ng/button` — row actions.
|
|
391
|
+
- `@egose/shadcn-theme-ng/badge` — status pills inside header/footer rows.
|
package/item/fesm2022/item.mjs
CHANGED
|
@@ -28,17 +28,17 @@ function injectHlmItemMediaConfig() {
|
|
|
28
28
|
return inject(HlmItemMediaConfigToken, { optional: true }) ?? defaultMediaConfig;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const itemVariants = cva('[a]:hover:bg-muted rounded-md border text-sm group/item focus-visible:border-ring focus-visible:ring-ring/50 flex w-full flex-wrap items-center transition-colors duration-100 outline-none focus-visible:ring-[3px] [a]:transition-colors', {
|
|
31
|
+
const itemVariants = cva('tw:[a]:hover:bg-muted tw:rounded-md tw:border tw:text-sm tw:group/item tw:focus-visible:border-ring tw:focus-visible:ring-ring/50 tw:flex tw:w-full tw:min-w-0 tw:max-w-full tw:flex-wrap tw:items-center tw:transition-colors tw:duration-100 tw:outline-none tw:focus-visible:ring-[3px] tw:[a]:transition-colors', {
|
|
32
32
|
variants: {
|
|
33
33
|
variant: {
|
|
34
|
-
default: 'border-transparent',
|
|
35
|
-
outline: 'border-border',
|
|
36
|
-
muted: 'bg-muted/50 border-transparent',
|
|
34
|
+
default: 'tw:border-transparent',
|
|
35
|
+
outline: 'tw:border-border',
|
|
36
|
+
muted: 'tw:bg-muted/50 tw:border-transparent',
|
|
37
37
|
},
|
|
38
38
|
size: {
|
|
39
|
-
default: 'gap-3.5 px-4 py-3.5',
|
|
40
|
-
sm: 'gap-2.5 px-3 py-2.5',
|
|
41
|
-
xs: 'gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0',
|
|
39
|
+
default: 'tw:gap-3.5 tw:px-4 tw:py-3.5',
|
|
40
|
+
sm: 'tw:gap-2.5 tw:px-3 tw:py-2.5',
|
|
41
|
+
xs: 'tw:gap-2 tw:px-2.5 tw:py-2 tw:in-data-[slot=dropdown-menu-content]:p-0',
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
defaultVariants: {
|
|
@@ -55,10 +55,10 @@ class HlmItem {
|
|
|
55
55
|
constructor() {
|
|
56
56
|
classes(() => itemVariants({ variant: this.variant(), size: this.size() }));
|
|
57
57
|
}
|
|
58
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
59
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.
|
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmItem, isStandalone: true, selector: "[hlmItem],hlm-item", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item" }, properties: { "attr.data-variant": "variant()", "attr.data-size": "size()" } }, ngImport: i0 });
|
|
60
60
|
}
|
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItem, decorators: [{
|
|
62
62
|
type: Directive,
|
|
63
63
|
args: [{
|
|
64
64
|
selector: '[hlmItem],hlm-item',
|
|
@@ -72,12 +72,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
72
72
|
|
|
73
73
|
class HlmItemActions {
|
|
74
74
|
constructor() {
|
|
75
|
-
classes(() => 'gap-2 flex items-center');
|
|
75
|
+
classes(() => 'tw:gap-2 tw:flex tw:min-w-0 tw:max-w-full tw:flex-wrap tw:items-center');
|
|
76
76
|
}
|
|
77
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
78
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemActions, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
78
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemActions, isStandalone: true, selector: "[hlmItemActions],hlm-item-actions", host: { attributes: { "data-slot": "item-actions" } }, ngImport: i0 });
|
|
79
79
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemActions, decorators: [{
|
|
81
81
|
type: Directive,
|
|
82
82
|
args: [{
|
|
83
83
|
selector: '[hlmItemActions],hlm-item-actions',
|
|
@@ -87,12 +87,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
87
87
|
|
|
88
88
|
class HlmItemContent {
|
|
89
89
|
constructor() {
|
|
90
|
-
classes(() => 'gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none');
|
|
90
|
+
classes(() => 'tw:gap-1 tw:group-data-[size=xs]/item:gap-0 tw:flex tw:flex-1 tw:flex-col tw:[&+[data-slot=item-content]]:flex-none');
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
93
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
93
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemContent, isStandalone: true, selector: "[hlmItemContent],hlm-item-content", host: { attributes: { "data-slot": "item-content" } }, ngImport: i0 });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemContent, decorators: [{
|
|
96
96
|
type: Directive,
|
|
97
97
|
args: [{
|
|
98
98
|
selector: '[hlmItemContent],hlm-item-content',
|
|
@@ -102,12 +102,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
102
102
|
|
|
103
103
|
class HlmItemDescription {
|
|
104
104
|
constructor() {
|
|
105
|
-
classes(() => 'text-muted-foreground text-start text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 flex font-normal [&>a]:underline [&>a]:underline-offset-4');
|
|
105
|
+
classes(() => 'tw:text-muted-foreground tw:text-start tw:text-sm tw:leading-normal tw:group-data-[size=xs]/item:text-xs tw:[&>a:hover]:text-primary tw:line-clamp-2 tw:flex tw:font-normal tw:[&>a]:underline tw:[&>a]:underline-offset-4');
|
|
106
106
|
}
|
|
107
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
108
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
108
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemDescription, isStandalone: true, selector: "[hlmItemDescription],hlm-item-description", host: { attributes: { "data-slot": "item-description" } }, ngImport: i0 });
|
|
109
109
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemDescription, decorators: [{
|
|
111
111
|
type: Directive,
|
|
112
112
|
args: [{
|
|
113
113
|
selector: '[hlmItemDescription],hlm-item-description',
|
|
@@ -117,12 +117,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
117
117
|
|
|
118
118
|
class HlmItemFooter {
|
|
119
119
|
constructor() {
|
|
120
|
-
classes(() => 'gap-2 flex basis-full items-center justify-between');
|
|
120
|
+
classes(() => 'tw:gap-2 tw:flex tw:basis-full tw:min-w-0 tw:flex-wrap tw:items-center tw:justify-between');
|
|
121
121
|
}
|
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
123
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
122
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemFooter, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
123
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemFooter, isStandalone: true, selector: "[hlmItemFooter],hlm-item-footer", host: { attributes: { "data-slot": "item-footer" } }, ngImport: i0 });
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemFooter, decorators: [{
|
|
126
126
|
type: Directive,
|
|
127
127
|
args: [{
|
|
128
128
|
selector: '[hlmItemFooter],hlm-item-footer',
|
|
@@ -132,12 +132,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
132
132
|
|
|
133
133
|
class HlmItemGroup {
|
|
134
134
|
constructor() {
|
|
135
|
-
classes(() => 'gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2 group/item-group flex w-full flex-col');
|
|
135
|
+
classes(() => 'tw:gap-4 tw:has-data-[size=sm]:gap-2.5 tw:has-data-[size=xs]:gap-2 tw:group/item-group tw:flex tw:w-full tw:flex-col');
|
|
136
136
|
}
|
|
137
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
138
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
138
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemGroup, isStandalone: true, selector: "[hlmItemGroup],hlm-item-group", host: { attributes: { "data-slot": "item-group" } }, ngImport: i0 });
|
|
139
139
|
}
|
|
140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemGroup, decorators: [{
|
|
141
141
|
type: Directive,
|
|
142
142
|
args: [{
|
|
143
143
|
selector: '[hlmItemGroup],hlm-item-group',
|
|
@@ -147,12 +147,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
147
147
|
|
|
148
148
|
class HlmItemHeader {
|
|
149
149
|
constructor() {
|
|
150
|
-
classes(() => 'gap-2 flex basis-full items-center justify-between');
|
|
150
|
+
classes(() => 'tw:gap-2 tw:flex tw:basis-full tw:items-center tw:justify-between');
|
|
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: HlmItemHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
153
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemHeader, isStandalone: true, selector: "[hlmItemHeader],hlm-item-header", host: { attributes: { "data-slot": "item-header" } }, 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: HlmItemHeader, decorators: [{
|
|
156
156
|
type: Directive,
|
|
157
157
|
args: [{
|
|
158
158
|
selector: '[hlmItemHeader],hlm-item-header',
|
|
@@ -160,12 +160,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
160
160
|
}]
|
|
161
161
|
}], ctorParameters: () => [] });
|
|
162
162
|
|
|
163
|
-
const itemMediaVariants = cva('gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start flex shrink-0 items-center justify-center [&_ng-icon]:pointer-events-none', {
|
|
163
|
+
const itemMediaVariants = cva('tw:gap-2 tw:group-has-data-[slot=item-description]/item:translate-y-0.5 tw:group-has-data-[slot=item-description]/item:self-start tw:flex tw:shrink-0 tw:items-center tw:justify-center tw:[&_ng-icon]:pointer-events-none', {
|
|
164
164
|
variants: {
|
|
165
165
|
variant: {
|
|
166
|
-
default: 'bg-transparent',
|
|
167
|
-
icon: "[&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)]",
|
|
168
|
-
image: 'size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover',
|
|
166
|
+
default: 'tw:bg-transparent',
|
|
167
|
+
icon: "tw:[&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)]",
|
|
168
|
+
image: 'tw:size-10 tw:overflow-hidden tw:rounded-sm tw:group-data-[size=sm]/item:size-8 tw:group-data-[size=xs]/item:size-6 tw:[&_img]:size-full tw:[&_img]:object-cover',
|
|
169
169
|
},
|
|
170
170
|
},
|
|
171
171
|
defaultVariants: {
|
|
@@ -179,10 +179,10 @@ class HlmItemMedia {
|
|
|
179
179
|
constructor() {
|
|
180
180
|
classes(() => itemMediaVariants({ variant: this.variant() }));
|
|
181
181
|
}
|
|
182
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
183
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.
|
|
182
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemMedia, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
183
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmItemMedia, isStandalone: true, selector: "[hlmItemMedia],hlm-item-media", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "item-media" }, properties: { "attr.data-variant": "variant()" } }, ngImport: i0 });
|
|
184
184
|
}
|
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemMedia, decorators: [{
|
|
186
186
|
type: Directive,
|
|
187
187
|
args: [{
|
|
188
188
|
selector: '[hlmItemMedia],hlm-item-media',
|
|
@@ -195,12 +195,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
195
195
|
|
|
196
196
|
class HlmItemSeparator {
|
|
197
197
|
constructor() {
|
|
198
|
-
classes(() => [hlmSeparatorClass, 'my-2']);
|
|
198
|
+
classes(() => [hlmSeparatorClass, 'tw:my-2']);
|
|
199
199
|
}
|
|
200
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
201
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
201
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemSeparator, isStandalone: true, selector: "[hlmItemSeparator],hlm-item-separator", host: { attributes: { "data-slot": "item-separator" } }, hostDirectives: [{ directive: i1.BrnSeparator, inputs: ["orientation", "orientation"] }], ngImport: i0 });
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemSeparator, decorators: [{
|
|
204
204
|
type: Directive,
|
|
205
205
|
args: [{
|
|
206
206
|
selector: '[hlmItemSeparator],hlm-item-separator',
|
|
@@ -211,12 +211,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
211
211
|
|
|
212
212
|
class HlmItemTitle {
|
|
213
213
|
constructor() {
|
|
214
|
-
classes(() => 'gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center');
|
|
214
|
+
classes(() => 'tw:gap-2 tw:text-sm tw:leading-snug tw:font-medium tw:underline-offset-4 tw:line-clamp-1 tw:flex tw:w-fit tw:items-center');
|
|
215
215
|
}
|
|
216
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
217
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
217
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmItemTitle, isStandalone: true, selector: "[hlmItemTitle],hlm-item-title", host: { attributes: { "data-slot": "item-title" } }, ngImport: i0 });
|
|
218
218
|
}
|
|
219
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemTitle, decorators: [{
|
|
220
220
|
type: Directive,
|
|
221
221
|
args: [{
|
|
222
222
|
selector: '[hlmItemTitle],hlm-item-title',
|
|
@@ -240,8 +240,8 @@ const HlmItemImports = [
|
|
|
240
240
|
HlmItemTitle,
|
|
241
241
|
];
|
|
242
242
|
class HlmItemModule {
|
|
243
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
244
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
243
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
244
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmItemModule, imports: [HlmItem,
|
|
245
245
|
HlmItemActions,
|
|
246
246
|
HlmItemContent,
|
|
247
247
|
HlmItemDescription,
|
|
@@ -260,9 +260,9 @@ class HlmItemModule {
|
|
|
260
260
|
HlmItemMedia,
|
|
261
261
|
HlmItemSeparator,
|
|
262
262
|
HlmItemTitle] });
|
|
263
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.
|
|
263
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemModule });
|
|
264
264
|
}
|
|
265
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmItemModule, decorators: [{
|
|
266
266
|
type: NgModule,
|
|
267
267
|
args: [{
|
|
268
268
|
imports: [...HlmItemImports],
|
|
@@ -275,4 +275,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
275
275
|
*/
|
|
276
276
|
|
|
277
277
|
export { HlmItem, HlmItemActions, HlmItemContent, HlmItemDescription, HlmItemFooter, HlmItemGroup, HlmItemHeader, HlmItemImports, HlmItemMedia, HlmItemModule, HlmItemSeparator, HlmItemTitle, injectHlmItemConfig, injectHlmItemMediaConfig, provideHlmItemConfig, provideHlmItemMediaConfig };
|
|
278
|
-
|
|
278
|
+
|