@nyaruka/temba-components 0.156.12 → 0.156.13

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/src/flow/types.ts CHANGED
@@ -50,7 +50,8 @@ export const CONTEXT_MENU_SHORTCUTS: Record<FlowType, ContextMenuShortcut[]> = {
50
50
  export const Features = {
51
51
  AI: 'ai',
52
52
  AIRTIME: 'airtime',
53
- LOCATIONS: 'locations'
53
+ LOCATIONS: 'locations',
54
+ AUTO_TRANSLATE: 'auto_translate'
54
55
  } as const;
55
56
 
56
57
  export type Feature = (typeof Features)[keyof typeof Features];
@@ -142,11 +142,26 @@ export class Dialog extends ResizeElement {
142
142
  flex-direction: row;
143
143
  align-items: center;
144
144
  font-size: 20px;
145
- padding: 12px 20px;
145
+ padding: 12px 20px var(--dialog-header-padding-bottom, 12px);
146
146
  color: var(--header-text);
147
147
  background: var(--header-bg);
148
148
  }
149
149
 
150
+ /* "flat" variant: header/footer share the body's white background
151
+ and lose their inner padding so the dialog reads as one
152
+ continuous surface. Use for content-focused dialogs that don't
153
+ need the tinted chrome. */
154
+ :host([variant='flat']) .header-text {
155
+ background: #fff;
156
+ color: var(--color-text);
157
+ padding-bottom: 0;
158
+ }
159
+
160
+ :host([variant='flat']) .dialog-footer {
161
+ background: #fff;
162
+ padding-top: 0;
163
+ }
164
+
150
165
  .header-text .title {
151
166
  flex-grow: 1;
152
167
  }
@@ -157,8 +172,11 @@ export class Dialog extends ResizeElement {
157
172
  }
158
173
 
159
174
  .dialog-footer {
160
- background: var(--color-primary-light);
161
- padding: 10px;
175
+ background: var(
176
+ --dialog-footer-background,
177
+ var(--color-primary-light)
178
+ );
179
+ padding: var(--dialog-footer-padding-top, 10px) 10px 10px;
162
180
  display: flex;
163
181
  flex-flow: row;
164
182
  align-items: center;
@@ -227,6 +245,9 @@ export class Dialog extends ResizeElement {
227
245
  @property({ type: Boolean })
228
246
  hideOnClick: boolean;
229
247
 
248
+ @property({ type: String, reflect: true })
249
+ variant: string;
250
+
230
251
  @property({ type: Boolean })
231
252
  noFocus: boolean;
232
253
 
package/temba-modules.ts CHANGED
@@ -85,6 +85,7 @@ import { Simulator } from './src/simulator/Simulator';
85
85
  import { FlowSearch } from './src/flow/FlowSearch';
86
86
  import { IssuesWindow } from './src/flow/IssuesWindow';
87
87
  import { RevisionsWindow } from './src/flow/RevisionsWindow';
88
+ import { AutoTranslate } from './src/flow/AutoTranslate';
88
89
  import { MessageTable } from './src/flow/MessageTable';
89
90
 
90
91
  export function addCustomElement(name: string, comp: any) {
@@ -182,3 +183,4 @@ addCustomElement('temba-simulator', Simulator);
182
183
  addCustomElement('temba-flow-search', FlowSearch);
183
184
  addCustomElement('temba-issues-window', IssuesWindow);
184
185
  addCustomElement('temba-revisions-window', RevisionsWindow);
186
+ addCustomElement('temba-auto-translate', AutoTranslate);