@propbinder/mobile-design 0.0.1 → 0.0.2

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 (123) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +12 -39
  3. package/src/animations/page-transitions.ts +86 -0
  4. package/src/assets/fonts/Brockmann-Bold.otf +0 -0
  5. package/src/assets/fonts/Brockmann-BoldItalic.otf +0 -0
  6. package/src/assets/fonts/Brockmann-Medium.otf +0 -0
  7. package/src/assets/fonts/Brockmann-MediumItalic.otf +0 -0
  8. package/src/assets/fonts/Brockmann-Regular.otf +0 -0
  9. package/src/assets/fonts/Brockmann-RegularItalic.otf +0 -0
  10. package/src/assets/fonts/Brockmann-SemiBold.otf +0 -0
  11. package/src/assets/fonts/Brockmann-SemiBoldItalic.otf +0 -0
  12. package/src/assets/fonts/Brockmann_desktop_license.pdf +0 -0
  13. package/src/assets/fonts/brockmann-medium-webfont.woff2 +0 -0
  14. package/src/assets/fonts/brockmann-regular-webfont.woff2 +0 -0
  15. package/src/assets/fonts/brockmann-semibold-webfont.woff2 +0 -0
  16. package/src/components/action-list-item/ds-mobile-action-list-item.ts +83 -0
  17. package/src/components/action-list-item/index.ts +2 -0
  18. package/src/components/app-layout/ds-mobile-app-layout.css +343 -0
  19. package/src/components/app-layout/ds-mobile-app-layout.ts +271 -0
  20. package/src/components/app-layout/index.ts +2 -0
  21. package/src/components/avatar-with-badge/ds-avatar-with-badge.ts +130 -0
  22. package/src/components/avatar-with-badge/index.ts +2 -0
  23. package/src/components/bottom-sheet/ds-mobile-actions-bottom-sheet.ts +273 -0
  24. package/src/components/bottom-sheet/ds-mobile-bottom-sheet.css +110 -0
  25. package/src/components/bottom-sheet/ds-mobile-bottom-sheet.service.ts +167 -0
  26. package/src/components/bottom-sheet/ds-mobile-post-create-bottom-sheet.ts +656 -0
  27. package/src/components/bottom-sheet/index.ts +3 -0
  28. package/src/components/comment/ds-mobile-comment.ts +516 -0
  29. package/src/components/comment/index.ts +2 -0
  30. package/src/components/contact-list-item/ds-mobile-contact-list-item.ts +182 -0
  31. package/src/components/contact-list-item/index.ts +2 -0
  32. package/src/components/content/ds-mobile-content.ts +158 -0
  33. package/src/components/content/index.ts +2 -0
  34. package/src/components/ds-mobile-tabs.css +372 -0
  35. package/src/components/ds-mobile-tabs.ts +217 -0
  36. package/src/components/file-attachment/ds-mobile-file-attachment.ts +164 -0
  37. package/src/components/file-attachment/index.ts +2 -0
  38. package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.service.ts +98 -0
  39. package/src/components/handbook-detail-modal/ds-mobile-handbook-detail-modal.ts +514 -0
  40. package/src/components/handbook-detail-modal/index.ts +3 -0
  41. package/src/components/handbook-folder/ds-mobile-handbook-folder-mini.ts +130 -0
  42. package/src/components/handbook-folder/ds-mobile-handbook-folder.ts +444 -0
  43. package/src/components/handbook-folder/index.ts +4 -0
  44. package/src/components/header-content/ds-mobile-header-content.ts +211 -0
  45. package/src/components/header-content/index.ts +2 -0
  46. package/src/components/index.ts +45 -0
  47. package/src/components/inline-photo/ds-mobile-inline-photo.ts +269 -0
  48. package/src/components/inline-photo/index.ts +1 -0
  49. package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.css +60 -0
  50. package/src/components/interactive-list-item-inquiry/ds-mobile-interactive-list-item-inquiry.ts +280 -0
  51. package/src/components/interactive-list-item-inquiry/index.ts +2 -0
  52. package/src/components/interactive-list-item-message/ds-mobile-interactive-list-item-message.ts +197 -0
  53. package/src/components/interactive-list-item-message/index.ts +2 -0
  54. package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.css +70 -0
  55. package/src/components/interactive-list-item-post/ds-mobile-interactive-list-item-post.ts +594 -0
  56. package/src/components/interactive-list-item-post/ds-mobile-post-pdf-attachment.ts +124 -0
  57. package/src/components/interactive-list-item-post/index.ts +13 -0
  58. package/src/components/lightbox/ds-mobile-lightbox-footer.ts +331 -0
  59. package/src/components/lightbox/ds-mobile-lightbox-header.ts +173 -0
  60. package/src/components/lightbox/ds-mobile-lightbox-image.ts +464 -0
  61. package/src/components/lightbox/ds-mobile-lightbox-pdf.css +375 -0
  62. package/src/components/lightbox/ds-mobile-lightbox-pdf.ts +374 -0
  63. package/src/components/lightbox/ds-mobile-lightbox.css +587 -0
  64. package/src/components/lightbox/ds-mobile-lightbox.service.ts +293 -0
  65. package/src/components/lightbox/ds-mobile-lightbox.ts +529 -0
  66. package/src/components/lightbox/index.ts +22 -0
  67. package/src/components/list-item/ds-mobile-list-item.ts +499 -0
  68. package/src/components/list-item/index.ts +2 -0
  69. package/src/components/list-item-static/ds-mobile-list-item-static.ts +133 -0
  70. package/src/components/list-item-static/index.ts +2 -0
  71. package/src/components/logo/ds-logo.ts +85 -0
  72. package/src/components/logo/index.ts +2 -0
  73. package/src/components/modal/ds-mobile-modal.css +163 -0
  74. package/src/components/modal/ds-mobile-modal.service.ts +329 -0
  75. package/src/components/modal/index.ts +8 -0
  76. package/src/components/page-details/ds-mobile-page-details.css +285 -0
  77. package/src/components/page-details/ds-mobile-page-details.ts +128 -0
  78. package/src/components/page-details/index.ts +2 -0
  79. package/src/components/page-main/ds-mobile-page-main.css +346 -0
  80. package/src/components/page-main/ds-mobile-page-main.ts +331 -0
  81. package/src/components/page-main/index.ts +2 -0
  82. package/src/components/post-card/ds-mobile-post-card.ts +685 -0
  83. package/src/components/post-card/ds-mobile-post-pdf-attachment.ts +124 -0
  84. package/src/components/post-card/index.ts +11 -0
  85. package/src/components/post-composer/ds-mobile-post-composer.ts +140 -0
  86. package/src/components/post-composer/index.ts +2 -0
  87. package/src/components/post-detail-modal/ds-mobile-post-detail-modal.service.ts +104 -0
  88. package/src/components/post-detail-modal/ds-mobile-post-detail-modal.ts +1273 -0
  89. package/src/components/post-detail-modal/index.ts +9 -0
  90. package/src/components/shared/directives/index.ts +2 -0
  91. package/src/components/shared/directives/long-press.directive.ts +208 -0
  92. package/src/components/shared/index.ts +3 -0
  93. package/src/components/shared/mobile-common.css +94 -0
  94. package/src/components/shared/mobile-page-base.css +315 -0
  95. package/src/components/shared/mobile-page-base.ts +70 -0
  96. package/src/components/swiper/ds-mobile-swiper.ts +123 -0
  97. package/src/components/swiper/index.ts +2 -0
  98. package/src/components/tab-bar/ds-mobile-tab-bar.ts +132 -0
  99. package/src/components/tab-bar/index.ts +2 -0
  100. package/src/components/tabs/ds-mobile-tabs.css +405 -0
  101. package/src/components/tabs/ds-mobile-tabs.ts +204 -0
  102. package/src/components/tabs/index.ts +2 -0
  103. package/src/pages/community.page.ts +768 -0
  104. package/src/pages/handbook.page.ts +298 -0
  105. package/src/pages/home.page.ts +192 -0
  106. package/src/pages/index.ts +9 -0
  107. package/src/pages/inquiries.example.ts +212 -0
  108. package/src/pages/inquiry-detail.example.css +434 -0
  109. package/src/pages/inquiry-detail.example.ts +416 -0
  110. package/src/pages/mobile-tabs-example.component.ts +146 -0
  111. package/src/pages/post-create.page.ts +311 -0
  112. package/src/pages/post-detail.page.ts +295 -0
  113. package/src/pages/whitelabel-demo.page.ts +548 -0
  114. package/src/public-api.ts +5 -0
  115. package/src/services/user.service.ts +35 -0
  116. package/src/services/whitelabel.service.ts +171 -0
  117. package/src/styles/ionic.css +673 -0
  118. package/tsconfig.lib.json +17 -0
  119. package/tsconfig.lib.prod.json +9 -0
  120. package/tsconfig.spec.json +13 -0
  121. package/fesm2022/propbinder-mobile-design.mjs +0 -8294
  122. package/fesm2022/propbinder-mobile-design.mjs.map +0 -1
  123. package/index.d.ts +0 -2860
@@ -0,0 +1,594 @@
1
+ import { Component, input, output, signal, model } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { DsAvatarComponent } from '@propbinder/design-system';
4
+ import { DsIconComponent } from '@propbinder/design-system';
5
+ import { Haptics, ImpactStyle } from '@capacitor/haptics';
6
+ import { DsMobileListItemComponent } from '../list-item';
7
+
8
+ /**
9
+ * DsMobileInteractiveListItemPostComponent
10
+ *
11
+ * Specialized interactive list item for displaying social media posts.
12
+ * Built on top of ds-mobile-interactive-list-item base component.
13
+ * Displays user posts with avatar, content, media, and action buttons.
14
+ * Follows Threads-inspired design with clean layout and interactions.
15
+ *
16
+ * @example
17
+ * ```html
18
+ * <ds-mobile-interactive-list-item-post
19
+ * [authorName]="'John Doe'"
20
+ * [authorRole]="'Tenant'"
21
+ * [timestamp]="'2h ago'"
22
+ * [avatarInitials]="'JD'"
23
+ * [clickable]="true"
24
+ * (postClick)="openPost()">
25
+ *
26
+ * <post-content>
27
+ * <post-text>This is a sample post...</post-text>
28
+ * </post-content>
29
+ *
30
+ * <post-actions>
31
+ * <action-like [active]="true" count="42" />
32
+ * <action-comment count="12" />
33
+ * </post-actions>
34
+ * </ds-mobile-interactive-list-item-post>
35
+ * ```
36
+ */
37
+ @Component({
38
+ selector: 'ds-mobile-interactive-list-item-post',
39
+ standalone: true,
40
+ imports: [CommonModule, DsAvatarComponent, DsMobileListItemComponent],
41
+ styleUrls: ['../shared/mobile-common.css'],
42
+ styles: [`
43
+ :host {
44
+ display: block;
45
+ }
46
+
47
+ /* Hide divider on last child */
48
+ :host:last-child {
49
+ --divider-display: none;
50
+ --item-padding-bottom: 0;
51
+ }
52
+
53
+ .post-header {
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: space-between;
57
+ height: 32px;
58
+ margin-bottom: 8px;
59
+ }
60
+
61
+ .author-details {
62
+ display: flex;
63
+ flex-direction: column;
64
+ justify-content: center;
65
+ gap: 2px;
66
+ flex: 1;
67
+ min-width: 0;
68
+ }
69
+
70
+ .author-name {
71
+ font-family: 'Brockmann', sans-serif;
72
+ font-size: var(--font-size-sm);
73
+ font-weight: 600;
74
+ line-height: 20px;
75
+ letter-spacing: -0.3px;
76
+ color: var(--text-color-default-primary, #202227);
77
+ white-space: nowrap;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ .author-meta {
83
+ font-family: 'Brockmann', sans-serif;
84
+ font-size: var(--font-size-xs);
85
+ font-weight: 400;
86
+ line-height: 1.2;
87
+ letter-spacing: -0.26px;
88
+ color: var(--text-color-default-tertiary, #626B78);
89
+ display: flex;
90
+ align-items: center;
91
+ gap: 6px;
92
+ }
93
+
94
+ .avatar-wrapper {
95
+ position: relative;
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ }
100
+
101
+ .avatar-badge {
102
+ position: absolute;
103
+ bottom: -6px;
104
+ right: -6px;
105
+ width: 20px;
106
+ height: 20px;
107
+ border-radius: 8px;
108
+ background: var(--color-brand-secondary, #5d5fef);
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ border: 2px solid var(--color-background-primary, #ffffff);
113
+ }
114
+
115
+ .avatar-badge svg {
116
+ width: 10px;
117
+ position: relative;
118
+ top: 1px;
119
+ fill: white;
120
+ }
121
+
122
+ .menu-slot {
123
+ flex-shrink: 0;
124
+ }
125
+ `],
126
+ template: `
127
+ <ds-mobile-list-item
128
+ [leadingSize]="'32px'"
129
+ [variant]="variant()"
130
+ [interactive]="clickable()"
131
+ (itemClick)="handlePostClick()"
132
+ (longPress)="handleLongPress()"
133
+ (moreButtonClick)="handleMoreButtonClick($event)">
134
+
135
+ <div content-leading>
136
+ <div class="avatar-wrapper">
137
+ <ds-avatar
138
+ [initials]="avatarInitials()"
139
+ [type]="avatarType()"
140
+ [src]="avatarSrc()"
141
+ [iconName]="avatarIconName()"
142
+ size="md" />
143
+
144
+ @if (showBadge()) {
145
+ <div class="avatar-badge">
146
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 32" fill="none">
147
+ <path d="M33.9862 5.51709H23.1724V8.82743H26.0413C26.2841 8.82743 26.4827 9.02606 26.4827 9.26881V12.7998C26.4827 13.0426 26.2841 13.2412 26.0413 13.2412H23.1724V14.3447H26.0413C26.2841 14.3447 26.4827 14.5433 26.4827 14.7861V18.3171C26.4827 18.5598 26.2841 18.7585 26.0413 18.7585H23.1724V19.8619H26.0413C26.2841 19.8619 26.4827 20.0605 26.4827 20.3033V23.8343C26.4827 24.0771 26.2841 24.2757 26.0413 24.2757H23.1724V26.2619C23.1724 26.7496 23.0267 27.2043 22.7773 27.5861H27.5862L32 31.9999V27.5861H33.9862C34.7167 27.5861 35.3103 26.9924 35.3103 26.2619V6.84123C35.3103 6.11075 34.7167 5.51709 33.9862 5.51709ZM32 23.8343C32 24.0771 31.8013 24.2757 31.5586 24.2757H28.0276C27.7848 24.2757 27.5862 24.0771 27.5862 23.8343V20.3033C27.5862 20.0605 27.7848 19.8619 28.0276 19.8619H31.5586C31.8013 19.8619 32 20.0605 32 20.3033V23.8343ZM32 18.3171C32 18.5598 31.8013 18.7585 31.5586 18.7585H28.0276C27.7848 18.7585 27.5862 18.5598 27.5862 18.3171V14.7861C27.5862 14.5433 27.7848 14.3447 28.0276 14.3447H31.5586C31.8013 14.3447 32 14.5433 32 14.7861V18.3171ZM32 12.7998C32 13.0426 31.8013 13.2412 31.5586 13.2412H28.0276C27.7848 13.2412 27.5862 13.0426 27.5862 12.7998V9.26881C27.5862 9.02606 27.7848 8.82743 28.0276 8.82743H31.5586C31.8013 8.82743 32 9.02606 32 9.26881V12.7998Z" fill="white"/>
148
+ <path d="M20.7448 0H1.32414C0.593655 0 0 0.593655 0 1.32414V26.2621C0 26.9926 0.593655 27.5862 1.32414 27.5862H3.31034V32L7.72414 27.5862H20.7448C21.4753 27.5862 22.069 26.9926 22.069 26.2621V1.32414C22.069 0.593655 21.4753 0 20.7448 0ZM7.72414 23.8345C7.72414 24.0772 7.52552 24.2759 7.28276 24.2759H3.75172C3.50897 24.2759 3.31034 24.0772 3.31034 23.8345V20.3034C3.31034 20.0607 3.50897 19.8621 3.75172 19.8621H7.28276C7.52552 19.8621 7.72414 20.0607 7.72414 20.3034V23.8345ZM7.72414 18.3172C7.72414 18.56 7.52552 18.7586 7.28276 18.7586H3.75172C3.50897 18.7586 3.31034 18.56 3.31034 18.3172V14.7862C3.31034 14.5434 3.50897 14.3448 3.75172 14.3448H7.28276C7.52552 14.3448 7.72414 14.5434 7.72414 14.7862V18.3172ZM7.72414 12.8C7.72414 13.0428 7.52552 13.2414 7.28276 13.2414H3.75172C3.50897 13.2414 3.31034 13.0428 3.31034 12.8V9.26897C3.31034 9.02621 3.50897 8.82759 3.75172 8.82759H7.28276C7.52552 8.82759 7.72414 9.02621 7.72414 9.26897V12.8ZM7.72414 7.28276C7.72414 7.52552 7.52552 7.72414 7.28276 7.72414H3.75172C3.50897 7.72414 3.31034 7.52552 3.31034 7.28276V3.75172C3.31034 3.50897 3.50897 3.31034 3.75172 3.31034H7.28276C7.52552 3.31034 7.72414 3.50897 7.72414 3.75172V7.28276ZM13.2414 23.8345C13.2414 24.0772 13.0428 24.2759 12.8 24.2759H9.26897C9.02621 24.2759 8.82759 24.0772 8.82759 23.8345V20.3034C8.82759 20.0607 9.02621 19.8621 9.26897 19.8621H12.8C13.0428 19.8621 13.2414 20.0607 13.2414 20.3034V23.8345ZM13.2414 18.3172C13.2414 18.56 13.0428 18.7586 12.8 18.7586H9.26897C9.02621 18.7586 8.82759 18.56 8.82759 18.3172V14.7862C8.82759 14.5434 9.02621 14.3448 9.26897 14.3448H12.8C13.0428 14.3448 13.2414 14.5434 13.2414 14.7862V18.3172ZM13.2414 12.8C13.2414 13.0428 13.0428 13.2414 12.8 13.2414H9.26897C9.02621 13.2414 8.82759 13.0428 8.82759 12.8V9.26897C8.82759 9.02621 9.02621 8.82759 9.26897 8.82759H12.8C13.0428 8.82759 13.2414 9.02621 13.2414 9.26897V12.8ZM13.2414 6.84138V7.28276C13.2414 7.52552 13.0428 7.72414 12.8 7.72414H9.26897C9.02621 7.72414 8.82759 7.52552 8.82759 7.28276V3.75172C8.82759 3.50897 9.02621 3.31034 9.26897 3.31034H12.8C13.0428 3.31034 13.2414 3.50897 13.2414 3.75172V6.84138ZM18.7586 23.8345C18.7586 24.0772 18.56 24.2759 18.3172 24.2759H14.7862C14.5434 24.2759 14.3448 24.0772 14.3448 23.8345V20.3034C14.3448 20.0607 14.5434 19.8621 14.7862 19.8621H18.3172C18.56 19.8621 18.7586 20.0607 18.7586 20.3034V23.8345ZM18.7586 18.3172C18.7586 18.56 18.56 18.7586 18.3172 18.7586H14.7862C14.5434 18.7586 14.3448 18.56 14.3448 18.3172V14.7862C14.3448 14.5434 14.5434 14.3448 14.7862 14.3448H18.3172C18.56 14.3448 18.7586 14.5434 18.7586 14.7862V18.3172ZM18.7586 12.8C18.7586 13.0428 18.56 13.2414 18.3172 13.2414H14.7862C14.5434 13.2414 14.3448 13.0428 14.3448 12.8V9.26897C14.3448 9.02621 14.5434 8.82759 14.7862 8.82759H18.3172C18.56 8.82759 18.7586 9.02621 18.7586 9.26897V12.8ZM18.7586 5.51724V7.28276C18.7586 7.52552 18.56 7.72414 18.3172 7.72414H14.7862C14.5434 7.72414 14.3448 7.52552 14.3448 7.28276V3.75172C14.3448 3.50897 14.5434 3.31034 14.7862 3.31034H18.3172C18.56 3.31034 18.7586 3.50897 18.7586 3.75172V5.51724Z" fill="white"/>
149
+ </svg>
150
+ </div>
151
+ }
152
+ </div>
153
+ </div>
154
+
155
+ <div content-main>
156
+ <div class="post-header">
157
+ <div class="author-details">
158
+ <div class="author-name">{{ authorName() }}</div>
159
+ <div class="author-meta">{{ authorRole() }} · {{ timestamp() }}</div>
160
+ </div>
161
+
162
+ <div class="menu-slot">
163
+ <ng-content select="post-menu" />
164
+ </div>
165
+ </div>
166
+
167
+ <ng-content select="post-content" />
168
+ <ng-content select="post-actions" />
169
+ </div>
170
+ </ds-mobile-list-item>
171
+ `
172
+ })
173
+ export class DsMobileInteractiveListItemPostComponent {
174
+ /**
175
+ * Author's display name
176
+ */
177
+ authorName = input.required<string>();
178
+
179
+ /**
180
+ * Author's role (e.g., "Tenant", "Property Manager")
181
+ */
182
+ authorRole = input.required<string>();
183
+
184
+ /**
185
+ * Timestamp text (e.g., "2h ago", "1d ago")
186
+ */
187
+ timestamp = input.required<string>();
188
+
189
+ /**
190
+ * Avatar initials (for initials type)
191
+ */
192
+ avatarInitials = input<string>('');
193
+
194
+ /**
195
+ * Avatar type
196
+ */
197
+ avatarType = input<'initials' | 'photo' | 'icon'>('initials');
198
+
199
+ /**
200
+ * Avatar photo source (for photo type)
201
+ */
202
+ avatarSrc = input<string>('');
203
+
204
+ /**
205
+ * Icon name (for icon type avatars)
206
+ */
207
+ avatarIconName = input<string>('remixUser3Fill');
208
+
209
+ /**
210
+ * Show badge on avatar (e.g., for property managers)
211
+ */
212
+ showBadge = input<boolean>(false);
213
+
214
+ /**
215
+ * Display variant
216
+ * - 'feed' - Standard feed display (default)
217
+ * - 'detail' - Full detail view
218
+ * - 'compact' - Compact display for nested/related posts
219
+ */
220
+ variant = input<'feed' | 'detail' | 'compact'>('feed');
221
+
222
+ /**
223
+ * Whether the post card is clickable
224
+ */
225
+ clickable = input<boolean>(false);
226
+
227
+ /**
228
+ * Emits when the post card is clicked (if clickable)
229
+ */
230
+ postClick = output<void>();
231
+
232
+ /**
233
+ * Emits when the comment button is clicked
234
+ */
235
+ commentClick = output<void>();
236
+
237
+ /**
238
+ * Emits when the post card is long-pressed
239
+ */
240
+ longPress = output<void>();
241
+
242
+ handlePostClick(): void {
243
+ console.log('[InteractiveListItemPost] handlePostClick called, emitting postClick');
244
+ this.postClick.emit();
245
+ }
246
+
247
+ handleCommentClick(): void {
248
+ this.commentClick.emit();
249
+ }
250
+
251
+ handleLongPress(): void {
252
+ this.longPress.emit();
253
+ }
254
+
255
+ handleMoreButtonClick(event: Event): void {
256
+ // Desktop more button click - trigger the same action as long press
257
+ this.longPress.emit();
258
+ }
259
+ }
260
+
261
+ /**
262
+ * PostContentComponent
263
+ *
264
+ * Main content section of the post.
265
+ *
266
+ * Contains:
267
+ * - `<post-text>` - Text content
268
+ * - `<post-media>` - Optional images/videos
269
+ * - `<post-attachments>` - Optional file attachments
270
+ */
271
+ @Component({
272
+ selector: 'post-content',
273
+ standalone: true,
274
+ styles: [`
275
+ :host {
276
+ display: flex;
277
+ flex-direction: column;
278
+ gap: 12px;
279
+ margin-bottom: 8px;
280
+ }
281
+ `],
282
+ template: `
283
+ <ng-content select="post-text" />
284
+ <ng-content select="post-media" />
285
+ <ng-content select="ds-mobile-inline-photo" />
286
+ <ng-content select="post-attachments" />
287
+ `
288
+ })
289
+ export class PostContentComponent {}
290
+
291
+ /**
292
+ * PostTextComponent
293
+ *
294
+ * Text content of the post.
295
+ */
296
+ @Component({
297
+ selector: 'post-text',
298
+ standalone: true,
299
+ styles: [`
300
+ :host {
301
+ font-family: 'Brockmann', sans-serif;
302
+ font-size: var(--font-size-sm);
303
+ font-weight: 400;
304
+ line-height: 22px;
305
+ letter-spacing: -0.3px;
306
+ color: var(--color-text-primary, #1a1a1a);
307
+ display: block;
308
+ white-space: pre-wrap;
309
+ word-wrap: break-word;
310
+ }
311
+ `],
312
+ template: `<ng-content />`
313
+ })
314
+ export class PostTextComponent {}
315
+
316
+ /**
317
+ * PostMediaComponent
318
+ *
319
+ * Media container for images/videos.
320
+ */
321
+ @Component({
322
+ selector: 'post-media',
323
+ standalone: true,
324
+ styles: [`
325
+ :host {
326
+ display: block;
327
+ border-radius: 8px;
328
+ overflow: hidden;
329
+ }
330
+
331
+ ::ng-deep img {
332
+ width: 100%;
333
+ height: auto;
334
+ display: block;
335
+ }
336
+
337
+ ::ng-deep video {
338
+ width: 100%;
339
+ height: auto;
340
+ display: block;
341
+ }
342
+ `],
343
+ template: `<ng-content />`
344
+ })
345
+ export class PostMediaComponent {}
346
+
347
+ /**
348
+ * PostAttachmentsComponent
349
+ *
350
+ * Container for file attachments, links, etc.
351
+ */
352
+ @Component({
353
+ selector: 'post-attachments',
354
+ standalone: true,
355
+ styles: [`
356
+ :host {
357
+ display: flex;
358
+ flex-direction: column;
359
+ gap: 8px;
360
+ }
361
+ `],
362
+ template: `<ng-content />`
363
+ })
364
+ export class PostAttachmentsComponent {}
365
+
366
+ /**
367
+ * PostActionsComponent
368
+ *
369
+ * Action buttons container (like, comment, share).
370
+ *
371
+ * Contains:
372
+ * - `<action-like>` - Like button with count
373
+ * - `<action-comment>` - Comment button with count
374
+ * - `<action-share>` - Share button
375
+ */
376
+ @Component({
377
+ selector: 'post-actions',
378
+ standalone: true,
379
+ styles: [`
380
+ :host {
381
+ display: flex;
382
+ align-items: center;
383
+ gap: 16px;
384
+ padding-top: 4px;
385
+ }
386
+ `],
387
+ template: `<ng-content />`
388
+ })
389
+ export class PostActionsComponent {}
390
+
391
+ /**
392
+ * ActionLikeComponent
393
+ *
394
+ * Like action button with count display and animated heart icon.
395
+ */
396
+ @Component({
397
+ selector: 'action-like',
398
+ standalone: true,
399
+ imports: [CommonModule, DsIconComponent],
400
+ host: {
401
+ '[class.active]': 'active()',
402
+ '(click)': 'handleClick($event)'
403
+ },
404
+ styles: [`
405
+ :host {
406
+ display: flex;
407
+ align-items: center;
408
+ gap: 2px;
409
+ color: var(--color-text-secondary, #737373);
410
+ cursor: pointer;
411
+ transition: color 0.2s ease;
412
+ user-select: none;
413
+ -webkit-tap-highlight-color: transparent;
414
+ }
415
+
416
+ :host.active {
417
+ color: #f91880;
418
+ }
419
+
420
+ .icon-wrapper {
421
+ position: relative;
422
+ display: flex;
423
+ align-items: center;
424
+ justify-content: center;
425
+ }
426
+
427
+ .icon-pulse {
428
+ position: absolute;
429
+ top: 50%;
430
+ left: 50%;
431
+ transform: translate(-50%, -50%);
432
+ opacity: 0;
433
+ pointer-events: none;
434
+ }
435
+
436
+ .icon-pulse.animating {
437
+ animation: pulse 0.4s cubic-bezier(0.4, 0, 0.2, 1);
438
+ }
439
+
440
+ @keyframes pulse {
441
+ 0% {
442
+ transform: translate(-50%, -50%) scale(1);
443
+ opacity: 0.8;
444
+ }
445
+ 100% {
446
+ transform: translate(-50%, -50%) scale(2.5);
447
+ opacity: 0;
448
+ }
449
+ }
450
+
451
+ .count {
452
+ font-family: 'Brockmann', sans-serif;
453
+ font-size: var(--font-size-xs);
454
+ font-weight: 500;
455
+ line-height: 20px;
456
+ letter-spacing: -0.28px;
457
+ }
458
+ `],
459
+ template: `
460
+ <div class="icon-wrapper">
461
+ <ds-icon
462
+ #pulseIcon
463
+ class="icon-pulse"
464
+ [class.animating]="isPulsing()"
465
+ [name]="active() ? 'remixHeart3Fill' : 'remixHeart3Line'"
466
+ size="20px" />
467
+ <ds-icon
468
+ [name]="active() ? 'remixHeart3Fill' : 'remixHeart3Line'"
469
+ size="20px" />
470
+ </div>
471
+ @if (count() > 0) {
472
+ <span class="count">{{ count() }}</span>
473
+ }
474
+ `
475
+ })
476
+ export class ActionLikeComponent {
477
+ /**
478
+ * Whether the like is active (user has liked)
479
+ * Using model() for two-way binding
480
+ */
481
+ active = model<boolean>(false);
482
+
483
+ /**
484
+ * Number of likes
485
+ * Using model() for two-way binding
486
+ */
487
+ count = model<number>(0);
488
+
489
+ /**
490
+ * Emits when the like button is clicked
491
+ */
492
+ likeClick = output<{ active: boolean; count: number }>();
493
+
494
+ /**
495
+ * Signal to control pulse animation
496
+ */
497
+ isPulsing = signal(false);
498
+
499
+ async handleClick(event: Event): Promise<void> {
500
+ event.stopPropagation();
501
+
502
+ // Toggle active state
503
+ const newActive = !this.active();
504
+ this.active.set(newActive);
505
+
506
+ // Update count
507
+ const newCount = newActive ? this.count() + 1 : this.count() - 1;
508
+ this.count.set(Math.max(0, newCount));
509
+
510
+ // Trigger pulse animation only when liking
511
+ if (newActive) {
512
+ this.isPulsing.set(true);
513
+ setTimeout(() => this.isPulsing.set(false), 400);
514
+ }
515
+
516
+ // Haptic feedback for like/unlike
517
+ try {
518
+ await Haptics.impact({ style: ImpactStyle.Light });
519
+ } catch {
520
+ // Fallback to Web Vibration API if Capacitor Haptics is not available
521
+ if ('vibrate' in navigator) {
522
+ navigator.vibrate(50);
523
+ }
524
+ }
525
+
526
+ // Emit the event with the new state
527
+ this.likeClick.emit({ active: newActive, count: newCount });
528
+ }
529
+ }
530
+
531
+ /**
532
+ * ActionCommentComponent
533
+ *
534
+ * Comment action button with count display.
535
+ */
536
+ @Component({
537
+ selector: 'action-comment',
538
+ standalone: true,
539
+ imports: [CommonModule, DsIconComponent],
540
+ host: {
541
+ '(click)': 'handleClick($event)'
542
+ },
543
+ styles: [`
544
+ :host {
545
+ display: flex;
546
+ align-items: center;
547
+ gap: 2px;
548
+ color: var(--color-text-secondary, #737373);
549
+ cursor: pointer;
550
+ transition: color 0.2s ease;
551
+ user-select: none;
552
+ -webkit-tap-highlight-color: transparent;
553
+ }
554
+
555
+ :host:active {
556
+ transform: scale(0.95);
557
+ }
558
+
559
+ :host:hover {
560
+ color: var(--color-text-primary, #1a1a1a);
561
+ }
562
+
563
+ .count {
564
+ font-family: 'Brockmann', sans-serif;
565
+ font-size: var(--font-size-xs);
566
+ font-weight: 500;
567
+ line-height: 20px;
568
+ letter-spacing: -0.28px;
569
+ }
570
+ `],
571
+ template: `
572
+ <ds-icon name="remixChat3Line" size="20px" />
573
+ @if (count() > 0) {
574
+ <span class="count">{{ count() }}</span>
575
+ }
576
+ `
577
+ })
578
+ export class ActionCommentComponent {
579
+ /**
580
+ * Number of comments
581
+ */
582
+ count = input<number>(0);
583
+
584
+ /**
585
+ * Emits when the comment button is clicked
586
+ */
587
+ commentClick = output<void>();
588
+
589
+ handleClick(event: Event): void {
590
+ event.stopPropagation();
591
+ this.commentClick.emit();
592
+ }
593
+ }
594
+
@@ -0,0 +1,124 @@
1
+ import { Component, input, output } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { DsAvatarComponent } from '@propbinder/design-system';
4
+ import { DsIconComponent } from '@propbinder/design-system';
5
+
6
+ /**
7
+ * PostPdfAttachmentComponent
8
+ *
9
+ * PDF file attachment display for posts.
10
+ * Shows PDF info card with icon, filename, and file size.
11
+ * Emits click event to open PDF in viewer.
12
+ */
13
+ @Component({
14
+ selector: 'post-pdf-attachment',
15
+ standalone: true,
16
+ imports: [CommonModule, DsAvatarComponent, DsIconComponent],
17
+ host: {
18
+ '(click)': 'handleClick($event)'
19
+ },
20
+ styles: [`
21
+ :host {
22
+ display: flex;
23
+ align-items: center;
24
+ gap: 8px;
25
+ padding: 10px 12px;
26
+ background: var(--color-background-neutral-secondary, #f5f5f5);
27
+ border-radius: 16px;
28
+ cursor: pointer;
29
+ transition: all 0.2s ease;
30
+ }
31
+
32
+ :host:hover {
33
+ background: var(--color-background-neutral-secondary-hover, #ebebeb);
34
+ }
35
+
36
+ :host:active {
37
+ transform: scale(0.98);
38
+ }
39
+
40
+ .pdf-avatar {
41
+ flex-shrink: 0;
42
+ }
43
+
44
+ .pdf-avatar::ng-deep .avatar--icon {
45
+ background-color: #ff5757 !important;
46
+ }
47
+
48
+ .pdf-info {
49
+ flex: 1;
50
+ min-width: 0;
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 2px;
54
+ }
55
+
56
+ .pdf-name {
57
+ font-family: 'Brockmann', sans-serif;
58
+ font-size: var(--font-size-sm);
59
+ font-weight: 600;
60
+ line-height: 20px;
61
+ letter-spacing: -0.3px;
62
+ color: var(--color-text-primary, #1a1a1a);
63
+ white-space: nowrap;
64
+ overflow: hidden;
65
+ text-overflow: ellipsis;
66
+ }
67
+
68
+ .pdf-meta {
69
+ font-family: 'Brockmann', sans-serif;
70
+ font-size: var(--font-size-xs);
71
+ font-weight: 400;
72
+ line-height: 1.2;
73
+ letter-spacing: -0.26px;
74
+ color: var(--color-text-tertiary, #737373);
75
+ }
76
+
77
+ .open-icon {
78
+ color: var(--color-text-tertiary, #a3a3a3);
79
+ flex-shrink: 0;
80
+ }
81
+ `],
82
+ template: `
83
+ <div class="pdf-avatar">
84
+ <ds-avatar
85
+ type="icon"
86
+ iconName="remixFileTextLine"
87
+ size="md"
88
+ />
89
+ </div>
90
+
91
+ <div class="pdf-info">
92
+ <div class="pdf-name">{{ fileName() }}</div>
93
+ <div class="pdf-meta">PDF · {{ fileSize() }}</div>
94
+ </div>
95
+
96
+ <ds-icon
97
+ name="remixArrowRightSLine"
98
+ size="24px"
99
+ class="open-icon"
100
+ />
101
+ `
102
+ })
103
+ export class PostPdfAttachmentComponent {
104
+ /**
105
+ * PDF file name
106
+ */
107
+ fileName = input<string>('Document.pdf');
108
+
109
+ /**
110
+ * File size display (e.g., "1.2 MB")
111
+ */
112
+ fileSize = input<string>('');
113
+
114
+ /**
115
+ * Emits when the PDF attachment is clicked
116
+ */
117
+ pdfClick = output<void>();
118
+
119
+ handleClick(event: Event): void {
120
+ event.stopPropagation();
121
+ this.pdfClick.emit();
122
+ }
123
+ }
124
+