@unicef-polymer/etools-form-builder 2.1.8 → 3.0.0-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.
Files changed (87) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +1 -1
  3. package/dist/assets/translations.d.ts +6 -6
  4. package/dist/assets/translations.js +67 -67
  5. package/dist/form-attachments-popup/form-attachments-popup.d.ts +84 -86
  6. package/dist/form-attachments-popup/form-attachments-popup.helper.d.ts +8 -8
  7. package/dist/form-attachments-popup/form-attachments-popup.helper.js +14 -14
  8. package/dist/form-attachments-popup/form-attachments-popup.js +249 -255
  9. package/dist/form-attachments-popup/form-attachments-popup.tpl.d.ts +7 -3
  10. package/dist/form-attachments-popup/form-attachments-popup.tpl.js +102 -91
  11. package/dist/form-attachments-popup/index.d.ts +2 -2
  12. package/dist/form-attachments-popup/index.js +2 -2
  13. package/dist/form-fields/abstract-field-base.class.d.ts +33 -33
  14. package/dist/form-fields/abstract-field-base.class.js +209 -213
  15. package/dist/form-fields/field-renderer-component.d.ts +20 -20
  16. package/dist/form-fields/field-renderer-component.js +251 -255
  17. package/dist/form-fields/index.d.ts +12 -12
  18. package/dist/form-fields/index.js +12 -12
  19. package/dist/form-fields/repeatable-fields/repeatable-attachment-field.d.ts +19 -17
  20. package/dist/form-fields/repeatable-fields/repeatable-attachment-field.js +212 -209
  21. package/dist/form-fields/repeatable-fields/repeatable-base-field.d.ts +21 -20
  22. package/dist/form-fields/repeatable-fields/repeatable-base-field.js +121 -124
  23. package/dist/form-fields/repeatable-fields/repeatable-number-field.d.ts +10 -10
  24. package/dist/form-fields/repeatable-fields/repeatable-number-field.js +63 -67
  25. package/dist/form-fields/repeatable-fields/repeatable-scale-field.d.ts +15 -15
  26. package/dist/form-fields/repeatable-fields/repeatable-scale-field.js +106 -108
  27. package/dist/form-fields/repeatable-fields/repeatable-text-field.d.ts +8 -8
  28. package/dist/form-fields/repeatable-fields/repeatable-text-field.js +49 -53
  29. package/dist/form-fields/single-fields/attachment-field.d.ts +16 -16
  30. package/dist/form-fields/single-fields/attachment-field.js +94 -98
  31. package/dist/form-fields/single-fields/base-field.d.ts +11 -11
  32. package/dist/form-fields/single-fields/base-field.js +53 -58
  33. package/dist/form-fields/single-fields/boolean-field.d.ts +8 -8
  34. package/dist/form-fields/single-fields/boolean-field.js +45 -49
  35. package/dist/form-fields/single-fields/number-field.d.ts +10 -10
  36. package/dist/form-fields/single-fields/number-field.js +63 -67
  37. package/dist/form-fields/single-fields/scale-field.d.ts +18 -18
  38. package/dist/form-fields/single-fields/scale-field.js +109 -108
  39. package/dist/form-fields/single-fields/text-field.d.ts +8 -8
  40. package/dist/form-fields/single-fields/text-field.js +49 -54
  41. package/dist/form-groups/form-abstract-group.d.ts +71 -71
  42. package/dist/form-groups/form-abstract-group.js +396 -398
  43. package/dist/form-groups/form-card.d.ts +35 -32
  44. package/dist/form-groups/form-card.js +115 -113
  45. package/dist/form-groups/form-collapsed-card.d.ts +72 -71
  46. package/dist/form-groups/form-collapsed-card.js +261 -259
  47. package/dist/form-groups/index.d.ts +3 -3
  48. package/dist/form-groups/index.js +3 -3
  49. package/dist/index.d.ts +3 -3
  50. package/dist/index.js +3 -3
  51. package/dist/lib/additional-components/confirmation-dialog.d.ts +18 -18
  52. package/dist/lib/additional-components/confirmation-dialog.js +68 -72
  53. package/dist/lib/additional-components/etools-fb-card.d.ts +21 -21
  54. package/dist/lib/additional-components/etools-fb-card.js +242 -239
  55. package/dist/lib/styles/attachments.styles.d.ts +2 -2
  56. package/dist/lib/styles/attachments.styles.js +72 -72
  57. package/dist/lib/styles/card-styles.d.ts +2 -2
  58. package/dist/lib/styles/card-styles.js +154 -154
  59. package/dist/lib/styles/dialog.styles.d.ts +2 -2
  60. package/dist/lib/styles/dialog.styles.js +85 -85
  61. package/dist/lib/styles/elevation-styles.d.ts +9 -9
  62. package/dist/lib/styles/elevation-styles.js +43 -43
  63. package/dist/lib/styles/flex-layout-classes.d.ts +2 -2
  64. package/dist/lib/styles/flex-layout-classes.js +319 -319
  65. package/dist/lib/styles/form-builder-card.styles.d.ts +2 -2
  66. package/dist/lib/styles/form-builder-card.styles.js +49 -49
  67. package/dist/lib/styles/input-styles.d.ts +2 -2
  68. package/dist/lib/styles/input-styles.js +138 -138
  69. package/dist/lib/styles/page-layout-styles.d.ts +2 -2
  70. package/dist/lib/styles/page-layout-styles.js +201 -201
  71. package/dist/lib/styles/shared-styles.d.ts +2 -2
  72. package/dist/lib/styles/shared-styles.js +70 -70
  73. package/dist/lib/types/form-builder.interfaces.d.ts +83 -83
  74. package/dist/lib/types/form-builder.interfaces.js +1 -0
  75. package/dist/lib/types/form-builder.types.d.ts +59 -59
  76. package/dist/lib/types/form-builder.types.js +1 -0
  77. package/dist/lib/types/global.types.d.ts +4 -4
  78. package/dist/lib/types/global.types.js +1 -0
  79. package/dist/lib/utils/dialog.d.ts +10 -10
  80. package/dist/lib/utils/dialog.js +21 -21
  81. package/dist/lib/utils/fire-custom-event.d.ts +1 -1
  82. package/dist/lib/utils/fire-custom-event.js +7 -7
  83. package/dist/lib/utils/translate.d.ts +1 -1
  84. package/dist/lib/utils/translate.js +9 -9
  85. package/dist/lib/utils/validations.helper.d.ts +26 -26
  86. package/dist/lib/utils/validations.helper.js +42 -42
  87. package/package.json +51 -56
@@ -1,239 +1,242 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { css, customElement, html, LitElement, property } from 'lit-element';
8
- import '@polymer/iron-icons/iron-icons';
9
- import { CardStyles } from '../styles/card-styles';
10
- import { elevationStyles } from '../styles/elevation-styles';
11
- import { FlexLayoutClasses } from '../styles/flex-layout-classes';
12
- import { fireEvent } from '../utils/fire-custom-event';
13
- import { getTranslation } from '../utils/translate';
14
- let EtoolsFbCard = class EtoolsFbCard extends LitElement {
15
- constructor() {
16
- super();
17
- this.isEditable = false;
18
- this.isCollapsible = false;
19
- this.hideEditButton = false;
20
- this.collapsed = false;
21
- this.edit = false;
22
- if (!this.language) {
23
- this.language = window.localStorage.defaultLanguage || 'en';
24
- }
25
- this.handleLanguageChange = this.handleLanguageChange.bind(this);
26
- }
27
- static get styles() {
28
- // language=CSS
29
- return [
30
- elevationStyles,
31
- CardStyles,
32
- FlexLayoutClasses,
33
- css `
34
- :host {
35
- display: block;
36
- }
37
-
38
- .card-container {
39
- background-color: var(--primary-background-color);
40
- }
41
-
42
- .card-title-box[is-collapsible] {
43
- padding-left: 17px;
44
- padding-right: 25px;
45
- }
46
-
47
- .card-content {
48
- padding: 0;
49
- }
50
-
51
- .card-buttons {
52
- padding: 12px 24px;
53
- }
54
-
55
- .save-button {
56
- color: var(--primary-background-color);
57
- background-color: var(--primary-color);
58
- }
59
-
60
- .edit-button {
61
- color: var(--gray-mid);
62
- }
63
-
64
- .edit-button[edit] {
65
- color: var(--primary-color);
66
- }
67
-
68
- .flex-header {
69
- display: flex;
70
- align-items: center;
71
- padding-top: auto;
72
- flex-wrap: nowrap;
73
- }
74
- .flex-header__collapse {
75
- flex-basis: auto;
76
- }
77
- .flex-header__title {
78
- font-size: 18px;
79
- flex-basis: auto;
80
- flex-grow: 1;
81
- overflow: hidden;
82
- white-space: nowrap;
83
- text-overflow: ellipsis;
84
- }
85
- .flex-header__actions {
86
- order: 1;
87
- width: auto;
88
- display: flex;
89
- flex-basis: auto;
90
- }
91
- .flex-header__postfix {
92
- order: 3;
93
- }
94
- .flex-header__edit {
95
- order: 2;
96
- }
97
- @media (max-width: 380px) {
98
- .card-title-box[is-collapsible] {
99
- padding-left: 0;
100
- padding-right: 0;
101
- }
102
- .flex-header {
103
- align-items: baseline;
104
- padding-top: 10px;
105
- flex-wrap: wrap;
106
- }
107
- .flex-header__collapse {
108
- flex-basis: 20%;
109
- }
110
- .flex-header__title {
111
- flex-basis: 60%;
112
- overflow: unset;
113
- white-space: unset;
114
- text-overflow: unset;
115
- }
116
- .flex-header__actions {
117
- order: 2;
118
- width: 100%;
119
- border-top: 1px solid lightgrey;
120
- justify-content: flex-end;
121
- }
122
- .flex-header__postfix {
123
- order: 3;
124
- }
125
- .flex-header__edit {
126
- order: 1;
127
- flex-basis: 20%;
128
- }
129
- }
130
- `
131
- ];
132
- }
133
- save() {
134
- fireEvent(this, 'save');
135
- }
136
- cancel() {
137
- this.edit = false;
138
- fireEvent(this, 'cancel');
139
- }
140
- startEdit() {
141
- this.collapsed = false;
142
- if (this.edit) {
143
- return;
144
- }
145
- this.edit = true;
146
- fireEvent(this, 'start-edit');
147
- }
148
- toggleCollapse() {
149
- this.collapsed = !this.collapsed;
150
- }
151
- connectedCallback() {
152
- super.connectedCallback();
153
- document.addEventListener('language-changed', this.handleLanguageChange.bind(this));
154
- }
155
- disconnectedCallback() {
156
- super.disconnectedCallback();
157
- document.removeEventListener('language-changed', this.handleLanguageChange.bind(this));
158
- }
159
- handleLanguageChange(e) {
160
- this.language = e.detail.language;
161
- }
162
- // language=HTML
163
- render() {
164
- return html `
165
- <div class="elevation card-container" elevation="1">
166
- <header class="card-title-box with-bottom-line flex-header" ?is-collapsible="${this.isCollapsible}">
167
- ${this.isCollapsible
168
- ? html `
169
- <paper-icon-button
170
- class="flex-header__collapse"
171
- @tap="${() => this.toggleCollapse()}"
172
- icon="${this.collapsed ? 'expand-more' : 'expand-less'}"
173
- ></paper-icon-button>
174
- `
175
- : ''}
176
- <div class="flex-header__title">${this.cardTitle}</div>
177
- <div class="flex-header__actions"><slot name="actions"></slot></div>
178
- <div class="layout horizontal center flex-header__edit">
179
- ${this.isEditable
180
- ? html `
181
- <paper-icon-button
182
- icon="create"
183
- ?edit=${this.edit}
184
- ?hidden="${this.hideEditButton}"
185
- class="edit-button"
186
- @tap="${() => this.startEdit()}"
187
- ></paper-icon-button>
188
- `
189
- : ''}
190
- </div>
191
- <div class="flex-header__postfix"><slot name="postfix"></slot></div>
192
- </header>
193
- <iron-collapse ?opened="${!this.collapsed}">
194
- <section class="card-content-block">
195
- <slot name="content"></slot>
196
-
197
- ${this.isEditable && this.edit
198
- ? html `
199
- <div class="layout horizontal end-justified card-buttons">
200
- <paper-button @tap="${() => this.cancel()}"
201
- >${getTranslation(this.language, 'CANCEL')}</paper-button
202
- >
203
- <paper-button class="save-button" @tap="${() => this.save()}"
204
- >${getTranslation(this.language, 'SAVE')}</paper-button
205
- >
206
- </div>
207
- `
208
- : ''}
209
- </section>
210
- </iron-collapse>
211
- </div>
212
- `;
213
- }
214
- };
215
- __decorate([
216
- property({ attribute: 'card-title' })
217
- ], EtoolsFbCard.prototype, "cardTitle", void 0);
218
- __decorate([
219
- property({ type: Boolean, attribute: 'is-editable' })
220
- ], EtoolsFbCard.prototype, "isEditable", void 0);
221
- __decorate([
222
- property({ type: Boolean, attribute: 'is-collapsible' })
223
- ], EtoolsFbCard.prototype, "isCollapsible", void 0);
224
- __decorate([
225
- property({ type: Boolean, attribute: 'hide-edit-button' })
226
- ], EtoolsFbCard.prototype, "hideEditButton", void 0);
227
- __decorate([
228
- property({ type: Boolean })
229
- ], EtoolsFbCard.prototype, "collapsed", void 0);
230
- __decorate([
231
- property({ type: Boolean })
232
- ], EtoolsFbCard.prototype, "edit", void 0);
233
- __decorate([
234
- property()
235
- ], EtoolsFbCard.prototype, "language", void 0);
236
- EtoolsFbCard = __decorate([
237
- customElement('etools-fb-card')
238
- ], EtoolsFbCard);
239
- export { EtoolsFbCard };
1
+ import { __decorate } from "tslib";
2
+ import { css, html, LitElement } from 'lit';
3
+ import { property, customElement } from 'lit/decorators.js';
4
+ import '@unicef-polymer/etools-unicef/src/etools-collapse/etools-collapse';
5
+ import { CardStyles } from '../styles/card-styles';
6
+ import { elevationStyles } from '../styles/elevation-styles';
7
+ import { FlexLayoutClasses } from '../styles/flex-layout-classes';
8
+ import { fireEvent } from '../utils/fire-custom-event';
9
+ import { getTranslation } from '../utils/translate';
10
+ let EtoolsFbCard = class EtoolsFbCard extends LitElement {
11
+ static get styles() {
12
+ // language=CSS
13
+ return [
14
+ elevationStyles,
15
+ CardStyles,
16
+ FlexLayoutClasses,
17
+ css `
18
+ :host {
19
+ display: block;
20
+ }
21
+
22
+ .card-container {
23
+ background-color: var(--primary-background-color);
24
+ }
25
+
26
+ .card-title-box[is-collapsible] {
27
+ padding-left: 17px;
28
+ padding-right: 25px;
29
+ }
30
+
31
+ .card-content {
32
+ padding: 0;
33
+ }
34
+
35
+ .card-buttons {
36
+ padding: 12px 24px;
37
+ }
38
+
39
+ .save-button {
40
+ color: var(--primary-background-color);
41
+ background-color: var(--primary-color);
42
+ }
43
+
44
+ .edit-button {
45
+ color: var(--gray-mid);
46
+ }
47
+
48
+ .edit-button[edit] {
49
+ color: var(--primary-color);
50
+ }
51
+
52
+ .flex-header {
53
+ display: flex;
54
+ align-items: center;
55
+ padding-top: auto;
56
+ flex-wrap: nowrap;
57
+ }
58
+ .flex-header__collapse {
59
+ flex-basis: auto;
60
+ }
61
+ .flex-header__title {
62
+ font-size: 18px;
63
+ flex-basis: auto;
64
+ flex-grow: 1;
65
+ overflow: hidden;
66
+ white-space: nowrap;
67
+ text-overflow: ellipsis;
68
+ }
69
+ .flex-header__actions {
70
+ order: 1;
71
+ width: auto;
72
+ display: flex;
73
+ flex-basis: auto;
74
+ }
75
+ .flex-header__postfix {
76
+ order: 3;
77
+ }
78
+ .flex-header__edit {
79
+ order: 2;
80
+ }
81
+ @media (max-width: 380px) {
82
+ .card-title-box[is-collapsible] {
83
+ padding-left: 0;
84
+ padding-right: 0;
85
+ }
86
+ .flex-header {
87
+ align-items: baseline;
88
+ padding-top: 10px;
89
+ flex-wrap: wrap;
90
+ }
91
+ .flex-header__collapse {
92
+ flex-basis: 20%;
93
+ }
94
+ .flex-header__title {
95
+ flex-basis: 60%;
96
+ overflow: unset;
97
+ white-space: unset;
98
+ text-overflow: unset;
99
+ }
100
+ .flex-header__actions {
101
+ order: 2;
102
+ width: 100%;
103
+ border-top: 1px solid lightgrey;
104
+ justify-content: flex-end;
105
+ }
106
+ .flex-header__postfix {
107
+ order: 3;
108
+ }
109
+ .flex-header__edit {
110
+ order: 1;
111
+ flex-basis: 20%;
112
+ }
113
+ }
114
+ `
115
+ ];
116
+ }
117
+ constructor() {
118
+ super();
119
+ this.isEditable = false;
120
+ this.isCollapsible = false;
121
+ this.hideEditButton = false;
122
+ this.collapsed = false;
123
+ this.edit = false;
124
+ if (!this.language) {
125
+ this.language = window.localStorage.defaultLanguage || 'en';
126
+ }
127
+ this.handleLanguageChange = this.handleLanguageChange.bind(this);
128
+ }
129
+ save() {
130
+ fireEvent(this, 'save');
131
+ }
132
+ cancel() {
133
+ this.edit = false;
134
+ fireEvent(this, 'cancel');
135
+ }
136
+ startEdit() {
137
+ this.collapsed = false;
138
+ if (this.edit) {
139
+ return;
140
+ }
141
+ this.edit = true;
142
+ fireEvent(this, 'start-edit');
143
+ }
144
+ toggleCollapse() {
145
+ this.collapsed = !this.collapsed;
146
+ }
147
+ connectedCallback() {
148
+ super.connectedCallback();
149
+ document.addEventListener('language-changed', this.handleLanguageChange.bind(this));
150
+ }
151
+ disconnectedCallback() {
152
+ super.disconnectedCallback();
153
+ document.removeEventListener('language-changed', this.handleLanguageChange.bind(this));
154
+ }
155
+ handleLanguageChange(e) {
156
+ this.language = e.detail.language;
157
+ }
158
+ // language=HTML
159
+ render() {
160
+ return html `
161
+ <div class="elevation card-container" elevation="1">
162
+ <header class="card-title-box with-bottom-line flex-header" ?is-collapsible="${this.isCollapsible}">
163
+ ${this.isCollapsible
164
+ ? html `
165
+ <sl-button
166
+ variant="primary"
167
+ size="small"
168
+ class="flex-header__collapse"
169
+ @click="${() => this.toggleCollapse()}"
170
+ >
171
+ <etools-icon name="${this.collapsed ? 'expand-more' : 'expand-less'}"></etools-icon>
172
+ </sl-button>
173
+ `
174
+ : ''}
175
+ <div class="flex-header__title">${this.cardTitle}</div>
176
+ <div class="flex-header__actions"><slot name="actions"></slot></div>
177
+ <div class="layout horizontal center flex-header__edit">
178
+ ${this.isEditable
179
+ ? html `
180
+ <sl-button
181
+ slot="trigger"
182
+ variant="primary"
183
+ size="small"
184
+ ?hidden="${this.hideEditButton}"
185
+ class="edit-button"
186
+ @click="${() => this.startEdit()}"
187
+ >
188
+ <etools-icon name="create"></etools-icon>
189
+ </sl-button>
190
+ `
191
+ : ''}
192
+ </div>
193
+ <div class="flex-header__postfix"><slot name="postfix"></slot></div>
194
+ </header>
195
+ <etools-collapse ?opened="${!this.collapsed}">
196
+ <section class="card-content-block">
197
+ <slot name="content"></slot>
198
+
199
+ ${this.isEditable && this.edit
200
+ ? html `
201
+ <div class="layout horizontal end-justified card-buttons">
202
+ <sl-button variant="neutral" @click="${this.cancel}">
203
+ ${getTranslation(this.language, 'CANCEL')}
204
+ </sl-button>
205
+
206
+ <sl-button variant="primary" class="save-button" @click="${this.save}">
207
+ ${getTranslation(this.language, 'SAVE')}
208
+ </sl-button>
209
+ </div>
210
+ `
211
+ : ''}
212
+ </section>
213
+ </etools-collapse>
214
+ </div>
215
+ `;
216
+ }
217
+ };
218
+ __decorate([
219
+ property({ attribute: 'card-title' })
220
+ ], EtoolsFbCard.prototype, "cardTitle", void 0);
221
+ __decorate([
222
+ property({ type: Boolean, attribute: 'is-editable' })
223
+ ], EtoolsFbCard.prototype, "isEditable", void 0);
224
+ __decorate([
225
+ property({ type: Boolean, attribute: 'is-collapsible' })
226
+ ], EtoolsFbCard.prototype, "isCollapsible", void 0);
227
+ __decorate([
228
+ property({ type: Boolean, attribute: 'hide-edit-button' })
229
+ ], EtoolsFbCard.prototype, "hideEditButton", void 0);
230
+ __decorate([
231
+ property({ type: Boolean })
232
+ ], EtoolsFbCard.prototype, "collapsed", void 0);
233
+ __decorate([
234
+ property({ type: Boolean })
235
+ ], EtoolsFbCard.prototype, "edit", void 0);
236
+ __decorate([
237
+ property()
238
+ ], EtoolsFbCard.prototype, "language", void 0);
239
+ EtoolsFbCard = __decorate([
240
+ customElement('etools-fb-card')
241
+ ], EtoolsFbCard);
242
+ export { EtoolsFbCard };
@@ -1,2 +1,2 @@
1
- import { CSSResult } from 'lit-element';
2
- export declare const AttachmentsStyles: CSSResult;
1
+ import { CSSResult } from 'lit';
2
+ export declare const AttachmentsStyles: CSSResult;
@@ -1,72 +1,72 @@
1
- import { css } from 'lit-element';
2
- // language=CSS
3
- export const AttachmentsStyles = css `
4
- .file-selector-container {
5
- display: flex;
6
- flex-flow: row;
7
- align-items: center;
8
- padding: 8px 0;
9
- }
10
- .filename-container {
11
- display: flex;
12
- align-items: center;
13
- border-bottom: 1px solid var(--secondary-text-color, rgba(0, 0, 0, 0.54));
14
- margin: 0 14px 0 0;
15
- min-width: 145px;
16
- overflow-wrap: break-word;
17
- font-size: 16px;
18
- }
19
- :host([is-readonly]) .filename-container {
20
- border-bottom-color: transparent;
21
- }
22
- .filename {
23
- overflow: hidden;
24
- text-overflow: ellipsis;
25
- white-space: nowrap;
26
- }
27
- .file-icon {
28
- width: 24px;
29
- flex: none;
30
- color: var(--secondary-text-color, rgba(0, 0, 0, 0.54));
31
- }
32
- .delete-button {
33
- color: #ea4022;
34
- }
35
- .upload-button,
36
- .download-button {
37
- color: var(--primary-color);
38
- min-width: 130px;
39
- }
40
- .change-button {
41
- color: var(--secondary-text-color, rgba(0, 0, 0, 0.54));
42
- }
43
- iron-icon {
44
- margin-right: 8px;
45
- }
46
- paper-button {
47
- font-weight: 700;
48
- margin: 0 0;
49
- padding: 0 0;
50
- }
51
- .file-selector-container.with-type-dropdown {
52
- padding: 0;
53
- }
54
- .file-selector-container.with-type-dropdown etools-dropdown.type-dropdown {
55
- flex: none;
56
- width: 209px;
57
- }
58
- .file-selector-container.with-type-dropdown .filename-container {
59
- height: 32px;
60
- box-sizing: border-box;
61
- margin: 22px 0 8px;
62
- border-bottom: 1px solid var(--gray-20);
63
- }
64
- .file-selector-container.with-type-dropdown .delete-button,
65
- .file-selector-container.with-type-dropdown .download-button {
66
- margin-top: 15px;
67
- }
68
- etools-upload-multi.with-padding {
69
- padding: 12px 9px 12px 0;
70
- box-sizing: border-box;
71
- }
72
- `;
1
+ import { css } from 'lit';
2
+ // language=CSS
3
+ export const AttachmentsStyles = css `
4
+ .file-selector-container {
5
+ display: flex;
6
+ flex-flow: row;
7
+ align-items: center;
8
+ padding: 8px 0;
9
+ }
10
+ .filename-container {
11
+ display: flex;
12
+ align-items: center;
13
+ border-bottom: 1px solid var(--secondary-text-color, rgba(0, 0, 0, 0.54));
14
+ margin: 0 14px 0 0;
15
+ min-width: 145px;
16
+ overflow-wrap: break-word;
17
+ font-size: 16px;
18
+ }
19
+ :host([is-readonly]) .filename-container {
20
+ border-bottom-color: transparent;
21
+ }
22
+ .filename {
23
+ overflow: hidden;
24
+ text-overflow: ellipsis;
25
+ white-space: nowrap;
26
+ }
27
+ .file-icon {
28
+ width: 24px;
29
+ flex: none;
30
+ color: var(--secondary-text-color, rgba(0, 0, 0, 0.54));
31
+ }
32
+ .delete-button {
33
+ color: #ea4022;
34
+ }
35
+ .upload-button,
36
+ .download-button {
37
+ color: var(--primary-color);
38
+ min-width: 130px;
39
+ }
40
+ .change-button {
41
+ color: var(--secondary-text-color, rgba(0, 0, 0, 0.54));
42
+ }
43
+ iron-icon {
44
+ margin-right: 8px;
45
+ }
46
+ paper-button {
47
+ font-weight: 700;
48
+ margin: 0 0;
49
+ padding: 0 0;
50
+ }
51
+ .file-selector-container.with-type-dropdown {
52
+ padding: 0;
53
+ }
54
+ .file-selector-container.with-type-dropdown etools-dropdown.type-dropdown {
55
+ flex: none;
56
+ width: 209px;
57
+ }
58
+ .file-selector-container.with-type-dropdown .filename-container {
59
+ height: 32px;
60
+ box-sizing: border-box;
61
+ margin: 22px 0 8px;
62
+ border-bottom: 1px solid var(--gray-20);
63
+ }
64
+ .file-selector-container.with-type-dropdown .delete-button,
65
+ .file-selector-container.with-type-dropdown .download-button {
66
+ margin-top: 15px;
67
+ }
68
+ etools-upload-multi.with-padding {
69
+ padding: 12px 9px 12px 0;
70
+ box-sizing: border-box;
71
+ }
72
+ `;
@@ -1,2 +1,2 @@
1
- import { CSSResult } from 'lit-element';
2
- export declare const CardStyles: CSSResult;
1
+ import { CSSResult } from 'lit';
2
+ export declare const CardStyles: CSSResult;