rio-assist-widget 0.1.32 → 0.1.35
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/rio-assist.js +71 -54
- package/package.json +1 -1
- package/src/components/conversations-panel/conversations-panel.template.ts +15 -19
- package/src/components/floating-button/floating-button.styles.ts +7 -0
- package/src/components/floating-button/floating-button.template.ts +10 -2
- package/src/components/rio-assist/rio-assist.ts +1977 -1847
package/package.json
CHANGED
|
@@ -116,25 +116,21 @@ const renderConversationSurface = (
|
|
|
116
116
|
'conversation-menu': true,
|
|
117
117
|
'conversation-menu--above':
|
|
118
118
|
component.conversationMenuPlacement === 'above',
|
|
119
|
-
})}
|
|
120
|
-
@click=${(event: Event) => event.stopPropagation()}
|
|
121
|
-
>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<button
|
|
135
|
-
type="button"
|
|
136
|
-
@click=${() =>
|
|
137
|
-
component.handleConversationAction('delete', conversation.id)}
|
|
119
|
+
})}
|
|
120
|
+
@click=${(event: Event) => event.stopPropagation()}
|
|
121
|
+
>
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
@click=${() =>
|
|
125
|
+
component.handleConversationAction('rename', conversation.id)}
|
|
126
|
+
>
|
|
127
|
+
<img src=${editIconUrl} alt="" aria-hidden="true" />
|
|
128
|
+
Renomear
|
|
129
|
+
</button>
|
|
130
|
+
<button
|
|
131
|
+
type="button"
|
|
132
|
+
@click=${() =>
|
|
133
|
+
component.handleConversationAction('delete', conversation.id)}
|
|
138
134
|
>
|
|
139
135
|
<img src=${trashIconUrl} alt="" aria-hidden="true" />
|
|
140
136
|
Excluir
|
|
@@ -20,6 +20,9 @@ export const floatingButtonStyles = css`
|
|
|
20
20
|
letter-spacing: -0.2px;
|
|
21
21
|
border-radius: 32px 0 0 32px;
|
|
22
22
|
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
|
|
23
|
+
cursor: grab;
|
|
24
|
+
user-select: none;
|
|
25
|
+
touch-action: none;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
.floating-button img {
|
|
@@ -41,6 +44,10 @@ export const floatingButtonStyles = css`
|
|
|
41
44
|
box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3);
|
|
42
45
|
}
|
|
43
46
|
|
|
47
|
+
.floating-button:active {
|
|
48
|
+
cursor: grabbing;
|
|
49
|
+
}
|
|
50
|
+
|
|
44
51
|
.canvas--fullscreen .floating-button {
|
|
45
52
|
opacity: 0;
|
|
46
53
|
pointer-events: none;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
2
3
|
import type { RioAssistWidget } from '../rio-assist/rio-assist';
|
|
3
4
|
|
|
4
5
|
const buttonIconUrl = new URL('../../assets/icons/iaButtonIcon.png', import.meta.url).href;
|
|
@@ -6,8 +7,15 @@ const buttonIconUrl = new URL('../../assets/icons/iaButtonIcon.png', import.meta
|
|
|
6
7
|
export const renderFloatingButton = (component: RioAssistWidget) => html`
|
|
7
8
|
<button
|
|
8
9
|
class="floating-button"
|
|
9
|
-
style
|
|
10
|
-
|
|
10
|
+
style=${styleMap({
|
|
11
|
+
background: component.accentColor,
|
|
12
|
+
bottom: `${component.floatingButtonOffset}px`,
|
|
13
|
+
})}
|
|
14
|
+
@click=${(event: Event) => component.handleFloatingButtonClick(event)}
|
|
15
|
+
@pointerdown=${(event: PointerEvent) => component.handleFloatingButtonPointerDown(event)}
|
|
16
|
+
@pointermove=${(event: PointerEvent) => component.handleFloatingButtonPointerMove(event)}
|
|
17
|
+
@pointerup=${(event: PointerEvent) => component.handleFloatingButtonPointerUp(event)}
|
|
18
|
+
@pointercancel=${(event: PointerEvent) => component.handleFloatingButtonPointerCancel(event)}
|
|
11
19
|
aria-expanded=${component.open}
|
|
12
20
|
>
|
|
13
21
|
<img src=${buttonIconUrl} alt="" aria-hidden="true" />
|