@things-factory/notification 7.0.1-rc.0 → 7.0.1-rc.1

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.
@@ -1,9 +1,10 @@
1
1
  import '@material/web/button/elevated-button.js'
2
2
  import '@material/web/checkbox/checkbox.js'
3
+ import '@material/web/textfield/filled-text-field.js'
3
4
  import '@operato/i18n/ox-i18n.js'
4
5
 
5
6
  import { css, html, LitElement } from 'lit'
6
- import { customElement, property } from 'lit/decorators.js'
7
+ import { customElement } from 'lit/decorators.js'
7
8
  import { auth } from '@things-factory/auth-base/dist-client/auth.js'
8
9
 
9
10
  import { i18next, localize } from '@operato/i18n'
@@ -18,8 +19,9 @@ export class NotificationSender extends localize(i18next)(LitElement) {
18
19
  css`
19
20
  :host {
20
21
  display: flex;
21
- background-color: var(--md-sys-color-background);
22
22
  padding: var(--padding-wide);
23
+ background-color: var(--md-sys-color-background);
24
+ color: var(--md-sys-color-on-background);
23
25
  }
24
26
 
25
27
  form {
@@ -27,6 +29,7 @@ export class NotificationSender extends localize(i18next)(LitElement) {
27
29
  display: flex;
28
30
  flex-direction: column;
29
31
  }
32
+
30
33
  [content] > * {
31
34
  margin: var(--margin-default);
32
35
  }
@@ -43,10 +46,21 @@ export class NotificationSender extends localize(i18next)(LitElement) {
43
46
  display: flex;
44
47
  flex-direction: row-reverse;
45
48
  }
49
+
50
+ [name='body'] {
51
+ resize: vertical;
52
+ }
53
+
46
54
  md-elevated-button {
47
55
  margin-left: var(--padding-default);
48
56
  }
49
57
 
58
+ label {
59
+ display: flex;
60
+ gap: var(--spacing-medium);
61
+ align-items: center;
62
+ }
63
+
50
64
  @media screen and (max-width: 480px) {
51
65
  :host {
52
66
  padding: var(--padding-default);
@@ -59,30 +73,31 @@ export class NotificationSender extends localize(i18next)(LitElement) {
59
73
  return html`
60
74
  <form>
61
75
  <div content>
62
- <mwc-textfield
76
+ <md-filled-text-field
63
77
  type="text"
64
78
  name="receivers"
65
- .label=${i18next.t('field.receivers')}
79
+ label=${String(i18next.t('field.receivers'))}
66
80
  placeholder=${auth.credential?.email}
67
81
  required
68
- icon="account_circle"
69
- ></mwc-textfield>
70
- <mwc-textfield
71
- type="text"
72
- name="title"
73
- .label=${i18next.t('field.title')}
74
- required
75
- icon="notifications_none"
76
- ></mwc-textfield>
82
+ ><md-icon slot="leading-icon">account_circle</md-icon></md-filled-text-field
83
+ >
84
+ <md-filled-text-field type="text" name="title" label=${String(i18next.t('field.title'))} required
85
+ ><md-icon slot="leading-icon">notifications_none</md-icon></md-filled-text-field
86
+ >
77
87
 
78
- <mwc-textfield
79
- type="text"
80
- name="image"
81
- .label=${i18next.t('field.image')}
82
- icon="insert_photo"
83
- ></mwc-textfield>
84
- <mwc-textfield type="text" name="url" .label=${i18next.t('field.url')} icon="link"></mwc-textfield>
85
- <mwc-textarea type="text" name="body" .label=${i18next.t('field.body')} required rows="5"></mwc-textarea>
88
+ <md-filled-text-field type="text" name="image" label=${String(i18next.t('field.image'))}
89
+ ><md-icon slot="leading-icon">insert_photo</md-icon></md-filled-text-field
90
+ >
91
+ <md-filled-text-field type="text" name="url" label=${String(i18next.t('field.url'))}
92
+ ><md-icon slot="leading-icon">link</md-icon></md-filled-text-field
93
+ >
94
+ <md-filled-text-field
95
+ type="textarea"
96
+ name="body"
97
+ label=${String(i18next.t('field.body'))}
98
+ required
99
+ rows="5"
100
+ ></md-filled-text-field>
86
101
  <label>
87
102
  <md-checkbox name="inappmsg"></md-checkbox>
88
103
  In-App Message