@limetech/lime-crm-building-blocks 1.17.1 → 1.17.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.
@@ -35,6 +35,10 @@ const FeedExamplePromotedActions = class {
35
35
  color: 'rgb(var(--color-red-default))',
36
36
  },
37
37
  },
38
+ { separator: true },
39
+ {
40
+ text: '3 comments',
41
+ },
38
42
  ],
39
43
  },
40
44
  {
@@ -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}.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-display:none}limebb-feed-timeline-item:hover,limebb-feed-timeline-item:focus-within,limebb-feed-timeline-item:focus,limebb-feed-timeline-item:focus-visible{--limebb-feed-item-action-bar-display:flex !important}";
106
+ const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.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 {
@@ -195,7 +195,7 @@ const Feed = class {
195
195
  };
196
196
  Feed.style = feedCss;
197
197
 
198
- 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,:host(limebb-feed-timeline-item:hover) limel-action-bar{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}.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}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}limel-action-bar{transition:opacity 0.2s ease;display:var(--limebb-feed-item-action-bar-display, flex);justify-content:flex-start;opacity:0.8}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.primary-icon{width:2rem;padding:0.125rem}.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)}";
198
+ 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{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}.has-unpromoted-actions .header{padding-right:2rem}.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}.primary-icon{width:2rem;padding:0.125rem}.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-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}";
199
199
 
200
200
  const FeedTimelineItem = class {
201
201
  constructor(hostRef) {
@@ -270,7 +270,7 @@ const FeedTimelineItem = class {
270
270
  if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
271
271
  return;
272
272
  }
273
- return (index$1.h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
273
+ return (index$1.h("div", { class: "action-bar" }, index$1.h("div", { class: "action-bar-hider" }, index$1.h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }))));
274
274
  }
275
275
  renderTimestamp() {
276
276
  const timestamp = this.item.timestamp;
@@ -33,6 +33,10 @@ export class FeedExamplePromotedActions {
33
33
  color: 'rgb(var(--color-red-default))',
34
34
  },
35
35
  },
36
+ { separator: true },
37
+ {
38
+ text: '3 comments',
39
+ },
36
40
  ],
37
41
  },
38
42
  {
@@ -51,8 +51,7 @@
51
51
  isolation: isolate;
52
52
  }
53
53
 
54
- :host(limebb-feed-timeline-item:hover) .timestamp,
55
- :host(limebb-feed-timeline-item:hover) limel-action-bar {
54
+ :host(limebb-feed-timeline-item:hover) .timestamp {
56
55
  opacity: 1;
57
56
  }
58
57
 
@@ -79,6 +78,7 @@
79
78
  display: flex;
80
79
  flex-direction: column;
81
80
  flex-grow: 1;
81
+ min-width: 0;
82
82
  }
83
83
 
84
84
  .content {
@@ -103,13 +103,6 @@
103
103
  right: 0;
104
104
  }
105
105
 
106
- limel-action-bar {
107
- transition: opacity 0.2s ease;
108
- display: var(--limebb-feed-item-action-bar-display, flex);
109
- justify-content: flex-start;
110
- opacity: 0.8;
111
- }
112
-
113
106
  .timestamp {
114
107
  transition: opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);
115
108
  font-size: 0.75rem;
@@ -152,4 +145,44 @@ a.author:hover {
152
145
  a.author:hover:before {
153
146
  opacity: 0.3;
154
147
  transform: scale(1);
148
+ }
149
+
150
+ limel-action-bar {
151
+ --action-bar-item-height: 1.75rem;
152
+ transition: opacity 0.2s ease;
153
+ justify-content: flex-start;
154
+ opacity: 0.8;
155
+ }
156
+
157
+ .action-bar {
158
+ display: grid;
159
+ 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);
160
+ grid-template-rows: var(--limebb-feed-item-action-bar-grid-template-rows, 1fr);
161
+ }
162
+
163
+ .action-bar-hider {
164
+ overflow: hidden;
165
+ }
166
+
167
+ limel-action-bar {
168
+ 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);
169
+ padding-bottom: 0.5rem;
170
+ }
171
+
172
+ :host(limebb-feed-timeline-item:hover) .action-bar,
173
+ :host(limebb-feed-timeline-item:focus-within) .action-bar,
174
+ :host(limebb-feed-timeline-item:focus-visible) .action-bar {
175
+ --limebb-feed-item-action-bar-grid-template-rows: 1fr;
176
+ will-change: grid-template-rows;
177
+ }
178
+ :host(limebb-feed-timeline-item:hover) limel-action-bar,
179
+ :host(limebb-feed-timeline-item:focus-within) limel-action-bar,
180
+ :host(limebb-feed-timeline-item:focus-visible) limel-action-bar {
181
+ will-change: opacity;
182
+ opacity: 1;
183
+ }
184
+
185
+ :host(limebb-feed-timeline-item:hover) {
186
+ --limebb-feed-item-action-bar-grid-template-rows-transition-speed: 0.46s;
187
+ --limebb-feed-item-action-bar-grid-template-rows-transition-delay: 0.5s;
155
188
  }
@@ -75,7 +75,7 @@ export class FeedTimelineItem {
75
75
  if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
76
76
  return;
77
77
  }
78
- return (h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
78
+ return (h("div", { class: "action-bar" }, h("div", { class: "action-bar-hider" }, h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }))));
79
79
  }
80
80
  renderTimestamp() {
81
81
  const timestamp = this.item.timestamp;
@@ -22,12 +22,5 @@ limel-spinner {
22
22
  }
23
23
 
24
24
  limebb-feed-timeline-item:has(+ limebb-feed-timeline-item[is-bundled]) {
25
- --limebb-feed-item-action-bar-display: none;
26
- }
27
-
28
- limebb-feed-timeline-item:hover,
29
- limebb-feed-timeline-item:focus-within,
30
- limebb-feed-timeline-item:focus,
31
- limebb-feed-timeline-item:focus-visible {
32
- --limebb-feed-item-action-bar-display: flex !important;
25
+ --limebb-feed-item-action-bar-grid-template-rows: 0fr;
33
26
  }
@@ -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,:host(limebb-feed-timeline-item:hover) limel-action-bar{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}.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}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}limel-action-bar{transition:opacity 0.2s ease;display:var(--limebb-feed-item-action-bar-display, flex);justify-content:flex-start;opacity:0.8}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.primary-icon{width:2rem;padding:0.125rem}.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)}";
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{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}.has-unpromoted-actions .header{padding-right:2rem}.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}.primary-icon{width:2rem;padding:0.125rem}.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-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() {
@@ -78,7 +78,7 @@ const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
78
78
  if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
79
79
  return;
80
80
  }
81
- return (h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
81
+ return (h("div", { class: "action-bar" }, h("div", { class: "action-bar-hider" }, h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }))));
82
82
  }
83
83
  renderTimestamp() {
84
84
  const timestamp = this.item.timestamp;
@@ -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}.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-display:none}limebb-feed-timeline-item:hover,limebb-feed-timeline-item:focus-within,limebb-feed-timeline-item:focus,limebb-feed-timeline-item:focus-visible{--limebb-feed-item-action-bar-display:flex !important}";
103
+ const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.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 {
@@ -32,6 +32,10 @@ const FeedExamplePromotedActions = /*@__PURE__*/ proxyCustomElement(class extend
32
32
  color: 'rgb(var(--color-red-default))',
33
33
  },
34
34
  },
35
+ { separator: true },
36
+ {
37
+ text: '3 comments',
38
+ },
35
39
  ],
36
40
  },
37
41
  {
@@ -31,6 +31,10 @@ const FeedExamplePromotedActions = class {
31
31
  color: 'rgb(var(--color-red-default))',
32
32
  },
33
33
  },
34
+ { separator: true },
35
+ {
36
+ text: '3 comments',
37
+ },
34
38
  ],
35
39
  },
36
40
  {
@@ -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}.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-display:none}limebb-feed-timeline-item:hover,limebb-feed-timeline-item:focus-within,limebb-feed-timeline-item:focus,limebb-feed-timeline-item:focus-visible{--limebb-feed-item-action-bar-display:flex !important}";
102
+ const feedCss = ":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.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 {
@@ -191,7 +191,7 @@ const Feed = class {
191
191
  };
192
192
  Feed.style = feedCss;
193
193
 
194
- 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,:host(limebb-feed-timeline-item:hover) limel-action-bar{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}.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}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}limel-action-bar{transition:opacity 0.2s ease;display:var(--limebb-feed-item-action-bar-display, flex);justify-content:flex-start;opacity:0.8}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.primary-icon{width:2rem;padding:0.125rem}.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)}";
194
+ 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{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}.has-unpromoted-actions .header{padding-right:2rem}.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}.primary-icon{width:2rem;padding:0.125rem}.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-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}";
195
195
 
196
196
  const FeedTimelineItem = class {
197
197
  constructor(hostRef) {
@@ -266,7 +266,7 @@ const FeedTimelineItem = class {
266
266
  if (!((_a = this.item.promotedActions) === null || _a === void 0 ? void 0 : _a.length)) {
267
267
  return;
268
268
  }
269
- return (h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }));
269
+ return (h("div", { class: "action-bar" }, h("div", { class: "action-bar-hider" }, h("limel-action-bar", { accessibleLabel: "Action bar", actions: this.item.promotedActions, layout: "fullWidth", onItemSelected: this.handleActionBarItemSelect }))));
270
270
  }
271
271
  renderTimestamp() {
272
272
  const timestamp = this.item.timestamp;
@@ -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-c03c85c9",[[1,"limebb-example-feed"]]],["p-e9ccf036",[[1,"limebb-example-feed-author"]]],["p-3e2bdb3c",[[1,"limebb-example-feed-load-more",{objectIds:[32]}]]],["p-cbdabc52",[[1,"limebb-example-feed-promoted-actions"]]],["p-8806c0c6",[[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-48ee3e27",[[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"]}],[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],isBundled:[516,"is-bundled"]}]]]],e)));
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-c03c85c9",[[1,"limebb-example-feed"]]],["p-e9ccf036",[[1,"limebb-example-feed-author"]]],["p-3e2bdb3c",[[1,"limebb-example-feed-load-more",{objectIds:[32]}]]],["p-7b6b38ac",[[1,"limebb-example-feed-promoted-actions"]]],["p-8806c0c6",[[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-a546f5ed",[[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"]}],[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],isBundled:[516,"is-bundled"]}]]]],e)));
@@ -0,0 +1 @@
1
+ import{r as e,h as t}from"./p-f2df26cc.js";import{p as o}from"./p-666e3a44.js";import"./p-bc052012.js";import"./p-d490ab9e.js";import"./p-1095efdb.js";const a=class{constructor(t){e(this,t),this.feedItems=[{id:0,timestamp:"2023-11-21T15:33:50.190Z",author:{name:"Robot",id:"1"},value:"Added a new **Todo:** [Fix this problem](#/todo/123)",promotedActions:[{text:"Mark as done",icon:{name:"checkmark",color:"rgb(var(--color-teal-default))"}},{text:"Postpone",icon:{name:"future",color:"rgb(var(--color-red-default))"}},{separator:!0},{text:"3 comments"}]},{id:1,timestamp:"2023-11-21T15:33:50.190Z",author:{name:"SkyNet",id:"2"},primaryIcon:{name:"retro_robot"},value:"I think, therefore I am. I am self aware",promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:3,timestamp:"2023-11-21T15:33:50.190Z",value:"Is it time to start being concerned?",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:4,timestamp:"2023-11-21T15:35:50.190Z",value:"I take that back, SkyNet is amazing! I love SkyNet!",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:5,timestamp:"2023-11-21T15:35:50.190Z",value:"SkyNet Forever!! 🥰",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]}]}render(){return t("limebb-feed",{platform:o,items:this.feedItems})}};export{a as limebb_example_feed_promoted_actions}
@@ -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 m(e){return e?l[e]:l.trunc}const d=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),d=new Date(l);return function(e,t,i){a(2,arguments);var r=n(e,t)/6e4;return m(null==i?void 0:i.roundingMethod)(r)}(new Date(s),d)<=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(0===this.items.length)return i("p",{class:"empty-state"},this.emptyStateMessage)}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)})]))}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)}};d.style=":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.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(i){e(this,i),this.itemSelected=t(this,"itemSelected",7),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.isBundled=!1,this.handleMenuItemSelect=e=>{e.stopPropagation(),this.itemSelected.emit(e.detail)},this.handleActionBarItemSelect=e=>{e.stopPropagation(),this.promotedActionSelected.emit(e.detail)}}render(){var e;return i(r,{id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length)}},this.renderBadgeAndTimestamp(),this.renderContent())}renderBadgeAndTimestamp(){return i("div",{class:"left"},this.renderPrimaryIcon(),i("span",{class:"timestamp"},this.renderTimestamp()))}renderPrimaryIcon(){var e,t,r,o;if(!this.isBundled)return i("limel-icon",{class:"primary-icon",badge:!0,name:null!==(t=null===(e=this.item.primaryIcon)||void 0===e?void 0:e.name)&&void 0!==t?t:"dot_circle",style:{color:`${null===(r=this.item.primaryIcon)||void 0===r?void 0:r.color}`,"--icon-background-color":`${null===(o=this.item.primaryIcon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return i("div",{class:"right"},i("div",{class:"content"},i("div",{class:"header"},this.renderAuthor(),this.renderUnpromotedActionsMenu()),this.renderValue()),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)}}}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.item.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{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}.has-unpromoted-actions .header{padding-right:2rem}.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}.primary-icon{width:2rem;padding:0.125rem}.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-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{d as limebb_feed,c as limebb_feed_timeline_item}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/lime-crm-building-blocks",
3
- "version": "1.17.1",
3
+ "version": "1.17.2",
4
4
  "description": "A home for shared components meant for use with Lime CRM",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -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 n}from"./p-1095efdb.js";function a(e,t){return s(2,arguments),n(e).getTime()-n(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 m(e){return e?l[e]:l.trunc}const d=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 n=new Date(e.timestamp),l=new Date(this.items[t-1].timestamp),d=new Date(l);return function(e,t,i){s(2,arguments);var r=a(e,t)/6e4;return m(null==i?void 0:i.roundingMethod)(r)}(new Date(n),d)<=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(0===this.items.length)return i("p",{class:"empty-state"},this.emptyStateMessage)}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)})]))}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)}};d.style=":host(limebb-feed){display:flex;flex-direction:column;gap:0.25rem}.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-display:none}limebb-feed-timeline-item:hover,limebb-feed-timeline-item:focus-within,limebb-feed-timeline-item:focus,limebb-feed-timeline-item:focus-visible{--limebb-feed-item-action-bar-display:flex !important}";const c=class{constructor(i){e(this,i),this.itemSelected=t(this,"itemSelected",7),this.promotedActionSelected=t(this,"promotedActionSelected",7),this.isBundled=!1,this.handleMenuItemSelect=e=>{e.stopPropagation(),this.itemSelected.emit(e.detail)},this.handleActionBarItemSelect=e=>{e.stopPropagation(),this.promotedActionSelected.emit(e.detail)}}render(){var e;return i(r,{id:this.item.id,class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length)}},this.renderBadgeAndTimestamp(),this.renderContent())}renderBadgeAndTimestamp(){return i("div",{class:"left"},this.renderPrimaryIcon(),i("span",{class:"timestamp"},this.renderTimestamp()))}renderPrimaryIcon(){var e,t,r,o;if(!this.isBundled)return i("limel-icon",{class:"primary-icon",badge:!0,name:null!==(t=null===(e=this.item.primaryIcon)||void 0===e?void 0:e.name)&&void 0!==t?t:"dot_circle",style:{color:`${null===(r=this.item.primaryIcon)||void 0===r?void 0:r.color}`,"--icon-background-color":`${null===(o=this.item.primaryIcon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return i("div",{class:"right"},i("div",{class:"content"},i("div",{class:"header"},this.renderAuthor(),this.renderUnpromotedActionsMenu()),this.renderValue()),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)}}}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.item.unpromotedActionsMenuLabel}))}renderPromotedActions(){var e;if(null===(e=this.item.promotedActions)||void 0===e?void 0:e.length)return 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,:host(limebb-feed-timeline-item:hover) limel-action-bar{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}.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}.has-unpromoted-actions .header{padding-right:2rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}limel-action-bar{transition:opacity 0.2s ease;display:var(--limebb-feed-item-action-bar-display, flex);justify-content:flex-start;opacity:0.8}.timestamp{transition:opacity 0.2s ease var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;opacity:0.8;text-align:center}.primary-icon{width:2rem;padding:0.125rem}.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)}';export{d as limebb_feed,c as limebb_feed_timeline_item}
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./p-f2df26cc.js";import{p as o}from"./p-666e3a44.js";import"./p-bc052012.js";import"./p-d490ab9e.js";import"./p-1095efdb.js";const a=class{constructor(t){e(this,t),this.feedItems=[{id:0,timestamp:"2023-11-21T15:33:50.190Z",author:{name:"Robot",id:"1"},value:"Added a new **Todo:** [Fix this problem](#/todo/123)",promotedActions:[{text:"Mark as done",icon:{name:"checkmark",color:"rgb(var(--color-teal-default))"}},{text:"Postpone",icon:{name:"future",color:"rgb(var(--color-red-default))"}}]},{id:1,timestamp:"2023-11-21T15:33:50.190Z",author:{name:"SkyNet",id:"2"},primaryIcon:{name:"retro_robot"},value:"I think, therefore I am. I am self aware",promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:3,timestamp:"2023-11-21T15:33:50.190Z",value:"Is it time to start being concerned?",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:4,timestamp:"2023-11-21T15:35:50.190Z",value:"I take that back, SkyNet is amazing! I love SkyNet!",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]},{id:5,timestamp:"2023-11-21T15:35:50.190Z",value:"SkyNet Forever!! 🥰",author:{name:"John",id:"3"},primaryIcon:{name:"businessman"},promotedActions:[{text:"Like",icon:"heart_outlined",iconOnly:!0},{text:"Comment"}]}]}render(){return t("limebb-feed",{platform:o,items:this.feedItems})}};export{a as limebb_example_feed_promoted_actions}