@limetech/lime-crm-building-blocks 1.21.5 → 1.21.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/limebb-feed_2.cjs.entry.js +4 -4
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +22 -4
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +2 -2
- package/dist/collection/components/feed/feed.css +7 -0
- package/dist/components/feed-timeline-item.js +3 -3
- package/dist/components/feed.js +1 -1
- package/dist/esm/limebb-feed_2.entry.js +4 -4
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-79b09240.entry.js +1 -0
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-3493a537.entry.js +0 -1
|
@@ -103,7 +103,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
103
103
|
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
106
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
107
107
|
|
|
108
108
|
const MINUTES_OF_PROXIMITY = 5;
|
|
109
109
|
const Feed = class {
|
|
@@ -198,7 +198,7 @@ const Feed = class {
|
|
|
198
198
|
};
|
|
199
199
|
Feed.style = feedCss;
|
|
200
200
|
|
|
201
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{
|
|
201
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;gap:0.5rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}";
|
|
202
202
|
|
|
203
203
|
const FeedTimelineItem = class {
|
|
204
204
|
constructor(hostRef) {
|
|
@@ -243,7 +243,7 @@ const FeedTimelineItem = class {
|
|
|
243
243
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
244
244
|
}
|
|
245
245
|
renderBadgeAndTimestamp() {
|
|
246
|
-
return (index$1.h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), index$1.h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
246
|
+
return (index$1.h("div", { class: "left" }, index$1.h("div", { class: "info" }, this.renderAuthorPicture(), this.renderIcon(), index$1.h("span", { class: "timestamp" }, this.renderTimestamp()))));
|
|
247
247
|
}
|
|
248
248
|
renderIcon() {
|
|
249
249
|
var _a, _b, _c, _d, _e;
|
|
@@ -255,7 +255,7 @@ const FeedTimelineItem = class {
|
|
|
255
255
|
}
|
|
256
256
|
return (index$1.h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
257
257
|
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
258
|
-
'
|
|
258
|
+
'background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
259
259
|
} }));
|
|
260
260
|
}
|
|
261
261
|
renderContent() {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
:host(limebb-feed-timeline-item:hover) .timestamp {
|
|
55
|
-
|
|
55
|
+
color: rgb(var(--contrast-1100));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
:host(limebb-feed-timeline-item[is-bundled]:hover) {
|
|
@@ -66,7 +66,21 @@
|
|
|
66
66
|
opacity: 0;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.left {
|
|
69
|
+
.left:before {
|
|
70
|
+
content: "";
|
|
71
|
+
position: absolute;
|
|
72
|
+
z-index: 0;
|
|
73
|
+
top: -0.25rem;
|
|
74
|
+
bottom: -0.25rem;
|
|
75
|
+
left: 1rem;
|
|
76
|
+
width: 1px;
|
|
77
|
+
background-color: rgb(var(--contrast-600));
|
|
78
|
+
z-index: -1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.info {
|
|
82
|
+
position: sticky;
|
|
83
|
+
top: 0.5rem;
|
|
70
84
|
display: flex;
|
|
71
85
|
flex-direction: column;
|
|
72
86
|
align-items: center;
|
|
@@ -110,13 +124,17 @@
|
|
|
110
124
|
}
|
|
111
125
|
|
|
112
126
|
.timestamp {
|
|
113
|
-
transition:
|
|
127
|
+
transition: color 0.4s ease, opacity 0.2s ease;
|
|
128
|
+
transition-delay: var(--limebb-feed-item-timestamp-opacity-delay, 0s);
|
|
114
129
|
font-size: 0.75rem;
|
|
115
|
-
opacity: 0.8;
|
|
116
130
|
text-align: center;
|
|
131
|
+
color: rgb(var(--contrast-800));
|
|
132
|
+
background-color: var(--limebb-feed-background-color);
|
|
133
|
+
padding: 0.125rem 0;
|
|
117
134
|
}
|
|
118
135
|
|
|
119
136
|
.icon {
|
|
137
|
+
--icon-background-color: var(--limebb-feed-background-color);
|
|
120
138
|
width: 2rem;
|
|
121
139
|
padding: 0.125rem;
|
|
122
140
|
}
|
|
@@ -45,7 +45,7 @@ export class FeedTimelineItem {
|
|
|
45
45
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
46
46
|
}
|
|
47
47
|
renderBadgeAndTimestamp() {
|
|
48
|
-
return (h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
48
|
+
return (h("div", { class: "left" }, h("div", { class: "info" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp()))));
|
|
49
49
|
}
|
|
50
50
|
renderIcon() {
|
|
51
51
|
var _a, _b, _c, _d, _e;
|
|
@@ -57,7 +57,7 @@ export class FeedTimelineItem {
|
|
|
57
57
|
}
|
|
58
58
|
return (h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
59
59
|
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
60
|
-
'
|
|
60
|
+
'background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
61
61
|
} }));
|
|
62
62
|
}
|
|
63
63
|
renderContent() {
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --feed-background-color: The background color of the feed. Used in generating other visual details as well. Defaults to `--contrast-100`;
|
|
3
|
+
*/
|
|
1
4
|
:host(limebb-feed) {
|
|
5
|
+
--limebb-feed-background-color: var(
|
|
6
|
+
--feed-background-color,
|
|
7
|
+
rgb(var(--contrast-100))
|
|
8
|
+
);
|
|
2
9
|
display: flex;
|
|
3
10
|
flex-direction: column;
|
|
4
11
|
gap: 0.25rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { P as PlatformServiceName } from './types.js';
|
|
3
3
|
|
|
4
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{
|
|
4
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;gap:0.5rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}";
|
|
5
5
|
|
|
6
6
|
const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -48,7 +48,7 @@ const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
48
48
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
49
49
|
}
|
|
50
50
|
renderBadgeAndTimestamp() {
|
|
51
|
-
return (h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
51
|
+
return (h("div", { class: "left" }, h("div", { class: "info" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp()))));
|
|
52
52
|
}
|
|
53
53
|
renderIcon() {
|
|
54
54
|
var _a, _b, _c, _d, _e;
|
|
@@ -60,7 +60,7 @@ const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
60
60
|
}
|
|
61
61
|
return (h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
62
62
|
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
63
|
-
'
|
|
63
|
+
'background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
64
64
|
} }));
|
|
65
65
|
}
|
|
66
66
|
renderContent() {
|
package/dist/components/feed.js
CHANGED
|
@@ -100,7 +100,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
100
100
|
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
103
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
104
104
|
|
|
105
105
|
const MINUTES_OF_PROXIMITY = 5;
|
|
106
106
|
const Feed = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -99,7 +99,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
99
99
|
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
102
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
103
103
|
|
|
104
104
|
const MINUTES_OF_PROXIMITY = 5;
|
|
105
105
|
const Feed = class {
|
|
@@ -194,7 +194,7 @@ const Feed = class {
|
|
|
194
194
|
};
|
|
195
195
|
Feed.style = feedCss;
|
|
196
196
|
|
|
197
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{
|
|
197
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;gap:0.5rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}";
|
|
198
198
|
|
|
199
199
|
const FeedTimelineItem = class {
|
|
200
200
|
constructor(hostRef) {
|
|
@@ -239,7 +239,7 @@ const FeedTimelineItem = class {
|
|
|
239
239
|
} }, this.renderBadgeAndTimestamp(), this.renderContent()));
|
|
240
240
|
}
|
|
241
241
|
renderBadgeAndTimestamp() {
|
|
242
|
-
return (h("div", { class: "left" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp())));
|
|
242
|
+
return (h("div", { class: "left" }, h("div", { class: "info" }, this.renderAuthorPicture(), this.renderIcon(), h("span", { class: "timestamp" }, this.renderTimestamp()))));
|
|
243
243
|
}
|
|
244
244
|
renderIcon() {
|
|
245
245
|
var _a, _b, _c, _d, _e;
|
|
@@ -251,7 +251,7 @@ const FeedTimelineItem = class {
|
|
|
251
251
|
}
|
|
252
252
|
return (h("limel-icon", { class: "icon", badge: true, name: (_c = (_b = this.item.icon) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'dot_circle', style: {
|
|
253
253
|
color: `${(_d = this.item.icon) === null || _d === void 0 ? void 0 : _d.color}`,
|
|
254
|
-
'
|
|
254
|
+
'background-color': `${(_e = this.item.icon) === null || _e === void 0 ? void 0 : _e.backgroundColor}`,
|
|
255
255
|
} }));
|
|
256
256
|
}
|
|
257
257
|
renderContent() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-f2df26cc.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l([["p-d59131e7",[[1,"limebb-example-date-picker-date",{value:[32]}]]],["p-50a258ea",[[1,"limebb-example-date-picker-datetime",{value:[32]}]]],["p-450fcd74",[[1,"limebb-example-date-picker-time",{value:[32]}]]],["p-2e4860b6",[[1,"limebb-example-date-picker-week",{value:[32]}]]],["p-44b8ed1a",[[1,"limebb-example-date-range"]]],["p-96af3ded",[[1,"limebb-example-feed"]]],["p-e9ccf036",[[1,"limebb-example-feed-author"]]],["p-e53823d4",[[1,"limebb-example-feed-author-picture"]]],["p-d38dc138",[[1,"limebb-example-feed-item-heading"]]],["p-3f9f5b8a",[[1,"limebb-example-feed-load-more",{objectIds:[32]}]]],["p-66d62349",[[1,"limebb-example-feed-promoted-actions"]]],["p-4b65e8b0",[[1,"limebb-example-feed-relations"]]],["p-9f220c53",[[1,"limebb-example-feed-unpromoted-actions"]]],["p-87446b69",[[1,"limebb-example-currency-picker",{selectedCurrency:[32]}]]],["p-6bed42e3",[[1,"limebb-example-currency-picker-european",{selectedCurrency:[32]}]]],["p-f43374b6",[[1,"limebb-example-currency-picker-nordic",{selectedCurrency:[32]}]]],["p-76a7dc35",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-38c7f848",[[1,"limebb-example-dashboard-widget"]]],["p-161d3ab4",[[1,"limebb-example-dashboard-widget-slots",{filterMyDeals:[32]}]]],["p-2a21f554",[[1,"limebb-example-dashboard-widget-styles"]]],["p-33c9f8d2",[[1,"limebb-example-icon-picker",{value:[32]}]]],["p-f09bb2bd",[[1,"limebb-example-locale-picker",{value:[1]}]]],["p-efcb287a",[[1,"limebb-example-locale-picker-multiple",{value:[1]}]]],["p-33022901",[[1,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-c0ceb829",[[1,"limebb-example-navigation-button-back"]]],["p-e9a19780",[[1,"limebb-example-navigation-button-close"]]],["p-9f1cc4db",[[1,"limebb-example-navigation-button-expand"]]],["p-dc4cd07c",[[1,"limebb-example-navigation-button-float"]]],["p-31461bb1",[[1,"limebb-example-navigation-button-maximize"]]],["p-9f2c8392",[[1,"limebb-example-navigation-button-minimize"]]],["p-328a8527",[[1,"limebb-example-navigation-button-new-tab"]]],["p-9f298aae",[[1,"limebb-example-navigation-button-shrink"]]],["p-e44c4258",[[0,"limebb-example-value",{label:[513],value:[8]}],[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-31d13c9e",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-c60424fe",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-cd01138c",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-0466cfe7",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[8]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-f2df26cc.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((e=>l([["p-d59131e7",[[1,"limebb-example-date-picker-date",{value:[32]}]]],["p-50a258ea",[[1,"limebb-example-date-picker-datetime",{value:[32]}]]],["p-450fcd74",[[1,"limebb-example-date-picker-time",{value:[32]}]]],["p-2e4860b6",[[1,"limebb-example-date-picker-week",{value:[32]}]]],["p-44b8ed1a",[[1,"limebb-example-date-range"]]],["p-96af3ded",[[1,"limebb-example-feed"]]],["p-e9ccf036",[[1,"limebb-example-feed-author"]]],["p-e53823d4",[[1,"limebb-example-feed-author-picture"]]],["p-d38dc138",[[1,"limebb-example-feed-item-heading"]]],["p-3f9f5b8a",[[1,"limebb-example-feed-load-more",{objectIds:[32]}]]],["p-66d62349",[[1,"limebb-example-feed-promoted-actions"]]],["p-4b65e8b0",[[1,"limebb-example-feed-relations"]]],["p-9f220c53",[[1,"limebb-example-feed-unpromoted-actions"]]],["p-87446b69",[[1,"limebb-example-currency-picker",{selectedCurrency:[32]}]]],["p-6bed42e3",[[1,"limebb-example-currency-picker-european",{selectedCurrency:[32]}]]],["p-f43374b6",[[1,"limebb-example-currency-picker-nordic",{selectedCurrency:[32]}]]],["p-76a7dc35",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-38c7f848",[[1,"limebb-example-dashboard-widget"]]],["p-161d3ab4",[[1,"limebb-example-dashboard-widget-slots",{filterMyDeals:[32]}]]],["p-2a21f554",[[1,"limebb-example-dashboard-widget-styles"]]],["p-33c9f8d2",[[1,"limebb-example-icon-picker",{value:[32]}]]],["p-f09bb2bd",[[1,"limebb-example-locale-picker",{value:[1]}]]],["p-efcb287a",[[1,"limebb-example-locale-picker-multiple",{value:[1]}]]],["p-33022901",[[1,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-c0ceb829",[[1,"limebb-example-navigation-button-back"]]],["p-e9a19780",[[1,"limebb-example-navigation-button-close"]]],["p-9f1cc4db",[[1,"limebb-example-navigation-button-expand"]]],["p-dc4cd07c",[[1,"limebb-example-navigation-button-float"]]],["p-31461bb1",[[1,"limebb-example-navigation-button-maximize"]]],["p-9f2c8392",[[1,"limebb-example-navigation-button-minimize"]]],["p-328a8527",[[1,"limebb-example-navigation-button-new-tab"]]],["p-9f298aae",[[1,"limebb-example-navigation-button-shrink"]]],["p-e44c4258",[[0,"limebb-example-value",{label:[513],value:[8]}],[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-31d13c9e",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-c60424fe",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-cd01138c",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-0466cfe7",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[8]}]]],["p-79b09240",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],unpromotedActionsMenuLabel:[1,"unpromoted-actions-menu-label"]}],[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],isBundled:[516,"is-bundled"],unpromotedActionsMenuLabel:[1,"unpromoted-actions-menu-label"]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as r}from"./p-f2df26cc.js";import{P as o}from"./p-bc052012.js";import{r as a,t as s}from"./p-1095efdb.js";function n(e,t){return a(2,arguments),s(e).getTime()-s(t).getTime()}var l={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function d(e){return e?l[e]:l.trunc}const m=class{constructor(i){e(this,i),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.loadMore=t(this,"loadMore",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.isBundled=(e,t)=>{var i,r,o;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;const s=new Date(e.timestamp),l=new Date(this.items[t-1].timestamp),m=new Date(l);return function(e,t,i){a(2,arguments);var r=n(e,t)/6e4;return d(null==i?void 0:i.roundingMethod)(r)}(new Date(s),m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}render(){return[this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems()]}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("p",{class:"empty-state"},this.emptyStateMessage):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,isBundled:this.isBundled(e,t),unpromotedActionsMenuLabel:this.unpromotedActionsMenuLabel})]))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"view-load-more_button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:"Load more"})}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}};m.style=":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";const c=class{constructor(r){e(this,r),this.itemSelected=t(this,"itemSelected",7),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.isBundled=!1,this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading())},this.renderRelations=()=>{var e,t;if(null===(e=this.item)||void 0===e?void 0:e.relations)return i("limel-chip-set",{value:null===(t=this.item)||void 0===t?void 0:t.relations})},this.handleMenuItemSelect=e=>{e.stopPropagation(),this.itemSelected.emit(e.detail)},this.handleActionBarItemSelect=e=>{e.stopPropagation(),this.promotedActionSelected.emit(e.detail)}}render(){var e,t;return i(r,{id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture)}},this.renderBadgeAndTimestamp(),this.renderContent())}renderBadgeAndTimestamp(){return i("div",{class:"left"},i("div",{class:"info"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp())))}renderIcon(){var e,t,r,o,a;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){return i("div",{class:"right"},i("div",{class:"content"},this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderRelations()),this.renderPromotedActions())}renderAuthor(){if(this.item.author&&!this.isBundled){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:r}=this.item.author.name;return i("a",{class:"author",href:e,title:t},r)}}}renderAuthorPicture(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.picture)return i("img",{loading:"lazy",src:this.item.author.picture})}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading truncate-paragraphs",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{value:this.item.value})}renderUnpromotedActionsMenu(){var e;if(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length)return i("limel-menu",{class:"unpromoted-actions-menu",items:this.item.unpromotedActions,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:this.unpromotedActionsMenuLabel}))}renderPromotedActions(){var e;if(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length)return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:this.item.promotedActions,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}};c.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:"";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;gap:0.5rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}';export{m as limebb_feed,c as limebb_feed_timeline_item}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as t,h as i,H as r}from"./p-f2df26cc.js";import{P as o}from"./p-bc052012.js";import{r as s,t as a}from"./p-1095efdb.js";function n(e,t){return s(2,arguments),a(e).getTime()-a(t).getTime()}var l={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function d(e){return e?l[e]:l.trunc}const m=class{constructor(i){e(this,i),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.loadMore=t(this,"loadMore",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.isBundled=(e,t)=>{var i,r,o;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;const a=new Date(e.timestamp),l=new Date(this.items[t-1].timestamp),m=new Date(l);return function(e,t,i){s(2,arguments);var r=n(e,t)/6e4;return d(null==i?void 0:i.roundingMethod)(r)}(new Date(a),m)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}render(){return[this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems()]}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("p",{class:"empty-state"},this.emptyStateMessage):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,isBundled:this.isBundled(e,t),unpromotedActionsMenuLabel:this.unpromotedActionsMenuLabel})]))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"view-load-more_button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:"Load more"})}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}};m.style=":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem;max-width:45rem}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";const h=class{constructor(r){e(this,r),this.itemSelected=t(this,"itemSelected",7),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.isBundled=!1,this.renderHeader=()=>{if((!this.isBundled||this.item.heading)&&(this.item.author||this.item.heading))return i("div",{class:"header"},this.renderAuthor(),this.renderHeading())},this.renderRelations=()=>{var e,t;if(null===(e=this.item)||void 0===e?void 0:e.relations)return i("limel-chip-set",{value:null===(t=this.item)||void 0===t?void 0:t.relations})},this.handleMenuItemSelect=e=>{e.stopPropagation(),this.itemSelected.emit(e.detail)},this.handleActionBarItemSelect=e=>{e.stopPropagation(),this.promotedActionSelected.emit(e.detail)}}render(){var e,t;return i(r,{id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"has-author-picture":!!(null===(t=this.item.author)||void 0===t?void 0:t.picture)}},this.renderBadgeAndTimestamp(),this.renderContent())}renderBadgeAndTimestamp(){return i("div",{class:"left"},this.renderAuthorPicture(),this.renderIcon(),i("span",{class:"timestamp"},this.renderTimestamp()))}renderIcon(){var e,t,r,o,s;if(!this.isBundled&&(this.item.icon||!(null===(e=this.item.author)||void 0===e?void 0:e.picture)))return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"--icon-background-color":`${null===(s=this.item.icon)||void 0===s?void 0:s.backgroundColor}`}})}renderContent(){return i("div",{class:"right"},i("div",{class:"content"},this.renderHeader(),this.renderUnpromotedActionsMenu(),this.renderValue(),this.renderRelations()),this.renderPromotedActions())}renderAuthor(){if(this.item.author&&!this.isBundled){if("string"==typeof this.item.author.name)return i("span",{class:"author"},this.item.author.name);if("object"==typeof this.item.author.name){const{href:e,title:t,text:r}=this.item.author.name;return i("a",{class:"author",href:e,title:t},r)}}}renderAuthorPicture(){var e;if(null===(e=this.item.author)||void 0===e?void 0:e.picture)return i("img",{loading:"lazy",src:this.item.author.picture})}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading truncate-paragraphs",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{value:this.item.value})}renderUnpromotedActionsMenu(){var e;if(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length)return i("limel-menu",{class:"unpromoted-actions-menu",items:this.item.unpromotedActions,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon-button",{icon:"menu_2",slot:"trigger",label:this.unpromotedActionsMenuLabel}))}renderPromotedActions(){var e;if(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length)return i("div",{class:"action-bar"},i("div",{class:"action-bar-hider"},i("limel-action-bar",{accessibleLabel:"Action bar",actions:this.item.promotedActions,layout:"fullWidth",onItemSelected:this.handleActionBarItemSelect})))}renderTimestamp(){const e=this.item.timestamp;if(e)return this.dateTimeFormatter.format(e,"timeofday")}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}};h.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left{display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;background-color:rgb(var(--contrast-300));padding:var(--limebb-feed-item-paddings)}.header{display:flex;align-items:center;gap:0.5rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.icon{width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-blue-default))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{margin-left:-1rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}';export{m as limebb_feed,h as limebb_feed_timeline_item}
|