@aquera/nile-elements 0.1.36 → 0.1.37

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 (162) hide show
  1. package/README.md +4 -0
  2. package/demo/variables.css +13 -0
  3. package/dist/{fixture-7bfb866e.cjs.js → fixture-161dee0b.cjs.js} +2 -2
  4. package/dist/{fixture-7bfb866e.cjs.js.map → fixture-161dee0b.cjs.js.map} +1 -1
  5. package/dist/{fixture-2b5b3aba.esm.js → fixture-372df3b0.esm.js} +1 -1
  6. package/dist/index.cjs.js +1 -1
  7. package/dist/index.esm.js +1 -1
  8. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  9. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  10. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  11. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  12. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  13. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  14. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  15. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  16. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  17. package/dist/nile-button/nile-button.test.esm.js +1 -1
  18. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  19. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  20. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  21. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  22. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  23. package/dist/nile-card/nile-card.test.esm.js +1 -1
  24. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  25. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  26. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  27. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  28. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  29. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  30. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  31. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  32. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  33. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  34. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  35. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  36. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  37. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  38. package/dist/nile-filter-chip/index.cjs.js +2 -0
  39. package/dist/nile-filter-chip/index.cjs.js.map +1 -0
  40. package/dist/nile-filter-chip/index.esm.js +1 -0
  41. package/dist/nile-filter-chip/nile-filter-chip.cjs.js +2 -0
  42. package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -0
  43. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +2 -0
  44. package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -0
  45. package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +121 -0
  46. package/dist/nile-filter-chip/nile-filter-chip.esm.js +43 -0
  47. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js +2 -0
  48. package/dist/nile-filter-chip/nile-filter-chip.test.cjs.js.map +1 -0
  49. package/dist/nile-filter-chip/nile-filter-chip.test.esm.js +20 -0
  50. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  51. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  52. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  53. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  54. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  55. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  56. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  57. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  58. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  59. package/dist/nile-input/nile-input.test.esm.js +1 -1
  60. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  61. package/dist/nile-link/nile-link.test.esm.js +1 -1
  62. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  63. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  64. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  65. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  66. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  67. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  68. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  69. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  70. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  71. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  72. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  73. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  74. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  75. package/dist/nile-select/nile-select.test.esm.js +1 -1
  76. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  77. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  78. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  79. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  80. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  81. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  82. package/dist/src/index.d.ts +1 -0
  83. package/dist/src/index.js +1 -0
  84. package/dist/src/index.js.map +1 -1
  85. package/dist/src/nile-filter-chip/index.d.ts +1 -0
  86. package/dist/src/nile-filter-chip/index.js +2 -0
  87. package/dist/src/{nile-file-upload → nile-filter-chip}/index.js.map +1 -1
  88. package/dist/src/{nile-file-preview/nile-file-preview.css.d.ts → nile-filter-chip/nile-filter-chip.css.d.ts} +1 -1
  89. package/dist/src/nile-filter-chip/nile-filter-chip.css.js +133 -0
  90. package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -0
  91. package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +36 -0
  92. package/dist/src/nile-filter-chip/nile-filter-chip.js +141 -0
  93. package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -0
  94. package/dist/src/nile-filter-chip/nile-filter-chip.test.d.ts +1 -0
  95. package/dist/src/nile-filter-chip/nile-filter-chip.test.js +80 -0
  96. package/dist/src/nile-filter-chip/nile-filter-chip.test.js.map +1 -0
  97. package/dist/tsconfig.tsbuildinfo +1 -1
  98. package/package.json +1 -1
  99. package/src/index.ts +2 -1
  100. package/src/nile-filter-chip/index.ts +1 -0
  101. package/src/nile-filter-chip/nile-filter-chip.css.ts +138 -0
  102. package/src/nile-filter-chip/nile-filter-chip.test.ts +92 -0
  103. package/src/nile-filter-chip/nile-filter-chip.ts +136 -0
  104. package/vscode-html-custom-data.json +49 -0
  105. package/dist/src/nile-file-preview/index.d.ts +0 -1
  106. package/dist/src/nile-file-preview/index.js +0 -2
  107. package/dist/src/nile-file-preview/index.js.map +0 -1
  108. package/dist/src/nile-file-preview/nile-file-preview.css.js +0 -533
  109. package/dist/src/nile-file-preview/nile-file-preview.css.js.map +0 -1
  110. package/dist/src/nile-file-preview/nile-file-preview.d.ts +0 -48
  111. package/dist/src/nile-file-preview/nile-file-preview.js +0 -149
  112. package/dist/src/nile-file-preview/nile-file-preview.js.map +0 -1
  113. package/dist/src/nile-file-preview/nile-file-preview.template.d.ts +0 -11
  114. package/dist/src/nile-file-preview/nile-file-preview.template.js +0 -144
  115. package/dist/src/nile-file-preview/nile-file-preview.template.js.map +0 -1
  116. package/dist/src/nile-file-preview/nile-file-preview.test.d.ts +0 -7
  117. package/dist/src/nile-file-preview/nile-file-preview.test.js +0 -30
  118. package/dist/src/nile-file-preview/nile-file-preview.test.js.map +0 -1
  119. package/dist/src/nile-file-preview/types/file-preview.enums.d.ts +0 -23
  120. package/dist/src/nile-file-preview/types/file-preview.enums.js +0 -28
  121. package/dist/src/nile-file-preview/types/file-preview.enums.js.map +0 -1
  122. package/dist/src/nile-file-preview/types/file-preview.interface.d.ts +0 -4
  123. package/dist/src/nile-file-preview/types/file-preview.interface.js +0 -2
  124. package/dist/src/nile-file-preview/types/file-preview.interface.js.map +0 -1
  125. package/dist/src/nile-file-preview/types/index.d.ts +0 -2
  126. package/dist/src/nile-file-preview/types/index.js +0 -3
  127. package/dist/src/nile-file-preview/types/index.js.map +0 -1
  128. package/dist/src/nile-file-preview/utils/file-preview.util.d.ts +0 -3
  129. package/dist/src/nile-file-preview/utils/file-preview.util.js +0 -29
  130. package/dist/src/nile-file-preview/utils/file-preview.util.js.map +0 -1
  131. package/dist/src/nile-file-preview/utils/index.d.ts +0 -1
  132. package/dist/src/nile-file-preview/utils/index.js +0 -2
  133. package/dist/src/nile-file-preview/utils/index.js.map +0 -1
  134. package/dist/src/nile-file-upload/index.d.ts +0 -1
  135. package/dist/src/nile-file-upload/index.js +0 -2
  136. package/dist/src/nile-file-upload/nile-file-upload.css.d.ts +0 -12
  137. package/dist/src/nile-file-upload/nile-file-upload.css.js +0 -547
  138. package/dist/src/nile-file-upload/nile-file-upload.css.js.map +0 -1
  139. package/dist/src/nile-file-upload/nile-file-upload.d.ts +0 -45
  140. package/dist/src/nile-file-upload/nile-file-upload.js +0 -148
  141. package/dist/src/nile-file-upload/nile-file-upload.js.map +0 -1
  142. package/dist/src/nile-file-upload/nile-file-upload.template.d.ts +0 -11
  143. package/dist/src/nile-file-upload/nile-file-upload.template.js +0 -163
  144. package/dist/src/nile-file-upload/nile-file-upload.template.js.map +0 -1
  145. package/dist/src/nile-file-upload/nile-file-upload.test.d.ts +0 -7
  146. package/dist/src/nile-file-upload/nile-file-upload.test.js +0 -30
  147. package/dist/src/nile-file-upload/nile-file-upload.test.js.map +0 -1
  148. package/dist/src/nile-file-upload/types/file-upload.enums.d.ts +0 -28
  149. package/dist/src/nile-file-upload/types/file-upload.enums.js +0 -35
  150. package/dist/src/nile-file-upload/types/file-upload.enums.js.map +0 -1
  151. package/dist/src/nile-file-upload/types/file-upload.type.d.ts +0 -4
  152. package/dist/src/nile-file-upload/types/file-upload.type.js +0 -2
  153. package/dist/src/nile-file-upload/types/file-upload.type.js.map +0 -1
  154. package/dist/src/nile-file-upload/types/index.d.ts +0 -2
  155. package/dist/src/nile-file-upload/types/index.js +0 -3
  156. package/dist/src/nile-file-upload/types/index.js.map +0 -1
  157. package/dist/src/nile-file-upload/utils/drag-drop.util.d.ts +0 -19
  158. package/dist/src/nile-file-upload/utils/drag-drop.util.js +0 -77
  159. package/dist/src/nile-file-upload/utils/drag-drop.util.js.map +0 -1
  160. package/dist/src/nile-file-upload/utils/file-validation.util.d.ts +0 -9
  161. package/dist/src/nile-file-upload/utils/file-validation.util.js +0 -58
  162. package/dist/src/nile-file-upload/utils/file-validation.util.js.map +0 -1
@@ -1,533 +0,0 @@
1
- /**
2
- * Copyright Aquera Inc 2023
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import { css } from 'lit';
8
- /**
9
- * FileUpload CSS
10
- */
11
- export const styles = css `
12
- :host {
13
- display: inline-block;
14
- }
15
-
16
- * {
17
- padding: 0px;
18
- margin: 0px;
19
- box-sizing: border-box;
20
- }
21
-
22
- .wrapper {
23
- display: flex;
24
- flex-direction: column;
25
- justify-content: center;
26
- align-items: center;
27
- gap: 18px;
28
- height: auto;
29
- }
30
-
31
- input {
32
- display: none;
33
- }
34
-
35
- .horizontal-div {
36
- max-height: 62px;
37
- width: 648px;
38
- min-width: 230px;
39
- padding: 12px;
40
- display: flex;
41
- align-items: center;
42
- justify-content: space-between;
43
- gap: 18px;
44
- border-radius: var(--nile-radius-radius-xs);
45
- border: 1px dashed var(--nile-colors-neutral-500);
46
- color: var(--nile-colors-dark-900);
47
- background-color: var(--nile-colors-white-base);
48
- }
49
-
50
- .hover-state {
51
- border-color: var(--nile-colors-primary-600);
52
- }
53
-
54
- .vertical-div {
55
- min-height: 156px;
56
- height: auto;
57
- min-width: 240px;
58
- width: 240px;
59
- display: flex;
60
- flex-direction: column;
61
- justify-content: space-between;
62
- align-items: center;
63
- gap: 18px;
64
- padding: 12px;
65
- border-radius: var(--nile-radius-radius-xs);
66
- color: var(--nile-colors-dark-900);
67
- border: 1px dashed var(--nile-colors-neutral-500);
68
- background-color: var(--nile-colors-white-base);
69
- position: relative;
70
- }
71
-
72
- .vertical-div:hover {
73
- border-color: var(--nile-colors-blue-500);
74
- }
75
-
76
- .outer-div-border {
77
- border: 1px solid var(--nile-colors-neutral-400);
78
- }
79
-
80
- .inner-div {
81
- display: flex;
82
- align-items: center;
83
- justify-content: flex-start;
84
- gap: 18px;
85
- box-sizing: border-box;
86
- }
87
-
88
- .content {
89
- display: flex;
90
- flex-direction: column;
91
- justify-content: center;
92
- gap: 8px;
93
- }
94
-
95
- .content h4 {
96
- margin: 0px;
97
- font-size: var(--nile-type-scale-3);
98
- font-weight: var(--nile-font-weight-regular);
99
- color: var(--nile-colors-dark-900);
100
- }
101
-
102
- .content p {
103
- margin: 0px;
104
- font-size: var(--nile-type-scale-2);
105
- color: var(--nile-colors-neutral-700);
106
- }
107
-
108
- /* DISABLED STATE */
109
- .disable {
110
- background-color: var(--nile-colors-dark-200);
111
- opacity: 0.5;
112
- pointer-events: none;
113
- }
114
-
115
- /* DRAGGING */
116
- .dragging {
117
- background-color: var(--nile-colors-blue-100);
118
- border-color: var(--nile-colors-primary-600);
119
- display: flex;
120
- align-items: center;
121
- gap: 18px;
122
- color: var(--nile-colors-blue-700);
123
- font-size: var(--nile-type-scale-3);
124
- font-weight: var(--nile-font-weight-regular);
125
- }
126
-
127
- .icons-container {
128
- display: flex;
129
- gap: 4px;
130
- }
131
-
132
- .general-icon {
133
- transform: rotate(-18.11deg);
134
- position: relative;
135
- bottom: 3px;
136
- }
137
-
138
- .image-icon {
139
- transform: rotate(15deg);
140
- }
141
-
142
- .icon:hover {
143
- cursor: pointer;
144
- }
145
-
146
- /* Uploading State */
147
- .uploading {
148
- width: 648px;
149
- min-width: 230px;
150
- display: flex;
151
- justify-content: space-between;
152
- align-items: center;
153
- gap: 18px;
154
- box-sizing: border-box;
155
- border: 1px solid var(--nile-colors-neutral-400)
156
- }
157
-
158
- .uploading:hover {
159
- border-color: var(--nile-colors-neutral-400);
160
- }
161
-
162
- .progress-bar-container {
163
- width: 100%;
164
- display: flex;
165
- flex-direction: column;
166
- gap: 0px;
167
- }
168
-
169
- .progress-bar-percent {
170
- width: 100%;
171
- display: flex;
172
- justify-content: space-between;
173
- font-size: var(--nile-type-scale-2);
174
- font-weight: var(--nile-font-weight-regular);
175
- }
176
-
177
- .progress-bar-container p {
178
- margin: 0px;
179
- }
180
-
181
- .progress-bar-container > p {
182
- font-size: var(--nile-type-scale-1);
183
- color: var(--nile-colors-dark-500);
184
- }
185
-
186
- /* PREVIEW STATE */
187
- .preview {
188
- border: 1px solid var(--nile-colors-neutral-400);
189
- }
190
-
191
- .preview:hover {
192
- border-color: var(--nile-colors-neutral-400);
193
- }
194
-
195
- .preview-inner {
196
- display: flex;
197
- gap: 18px;
198
- }
199
-
200
- .preview-image-container {
201
- height: 42px;
202
- width: 42px;
203
- }
204
-
205
- .preview-image-container img, iframe {
206
- height: 42px;
207
- width: 42px;
208
- object-fit: contain;
209
- border-radius: var(--nile-radius-radius-xs);
210
- border: 1px solid var(--nile-colors-neutral-400);
211
- }
212
-
213
- .preview-file-info {
214
- width: 100%;
215
- display: flex;
216
- flex-direction: column;
217
- justify-content: center;
218
- align-items: flex-start;
219
- gap: 8px;
220
- }
221
-
222
- .preview-file-info p {
223
- margin: 0px;
224
- font-size: var(--nile-type-scale-3);
225
- font-weight: var(--nile-font-weight-regular);
226
- }
227
-
228
- .preview-file-info p:last-of-type{
229
- color: var(--nile-colors-neutral-700);
230
- font-size: var(--nile-type-scale-2);
231
- font-weight: var(--nile-font-weight-regular);
232
- }
233
-
234
- .preview nile-icon:hover {
235
- cursor: pointer;
236
- }
237
-
238
- /* NO PREVIEW STATE */
239
- .no-preview {
240
- border: 1px solid var(--nile-colors-neutral-400);
241
- }
242
-
243
- .no-preview:hover {
244
- border-color: var(--nile-colors-neutral-400);
245
- }
246
-
247
- .no-preview-container {
248
- display: flex;
249
- gap: 18px;
250
- }
251
-
252
- .document-icon {
253
- height: 40px;
254
- width: 40px;
255
- border-radius: var(--nile-radius-radius-xs);
256
- padding: 2px 3px 2px 3px;
257
- display: flex;
258
- justify-content: center;
259
- align-items: center;
260
- border: 1px solid var(--nile-colors-blue-400);
261
- background-color: var(--nile-colors-blue-100);
262
- }
263
-
264
- .document-icon nile-icon {
265
- height: 40px;
266
- width: 40px;
267
- }
268
-
269
- .preview-file-info {
270
- width: 100%;
271
- display: flex;
272
- flex-direction: column;
273
- justify-content: center;
274
- align-items: flex-start;
275
- gap: 8px;
276
- }
277
-
278
- .preview-file-info p {
279
- margin: 0px;
280
- font-size: var(--nile-type-scale-3);
281
- font-weight: var(--nile-font-weight-regular);
282
- }
283
-
284
- .preview-file-info p:last-of-type{
285
- color: var(--nile-colors-neutral-700);
286
- font-size: var(--nile-type-scale-2);
287
- font-weight: var(--nile-font-weight-regular);
288
- }
289
-
290
- .no-preview > nile-icon:hover {
291
- cursor: pointer;
292
- }
293
-
294
- /* ERROR STATE */
295
- .error {
296
- border: 1px solid var(--nile-colors-neutral-400);
297
- }
298
-
299
- .error:hover {
300
- border-color: var(--nile-colors-neutral-400);
301
- }
302
-
303
- .error-container {
304
- width: 100%;
305
- display: flex;
306
- gap: 18px;
307
- }
308
-
309
- .error-icon {
310
- height: 40px;
311
- width: 40px;
312
- border-radius: var(--nile-radius-radius-xs);
313
- padding: 2px 3px 2px 3px;
314
- display: flex;
315
- justify-content: center;
316
- align-items: center;
317
- border: 1px solid var(--nile-colors-red-400);
318
- background-color: var(--nile-colors-red-100);
319
- }
320
-
321
- .error-icon nile-icon {
322
- height: 40px;
323
- width: 40px;
324
- }
325
-
326
- .file-info {
327
- width: 100%;
328
- display: flex;
329
- flex-direction: column;
330
- justify-content: center;
331
- align-items: flex-start;
332
- gap: 8px;
333
- }
334
-
335
- .file-info p {
336
- margin: 0px;
337
- font-size: var(--nile-type-scale-3);
338
- font-weight: var(--nile-font-weight-regular);
339
- }
340
-
341
- .file-info p:last-of-type{
342
- color: var(--nile-colors-red-700);
343
- font-size: var(--nile-type-scale-2);
344
- font-weight: var(--nile-font-weight-regular);
345
- }
346
-
347
- .error > nile-icon:hover {
348
- cursor: pointer;
349
- }
350
-
351
- /* VARTICAL STATE START */
352
- /* Default State */
353
- .vertical-default {
354
- display: flex;
355
- flex-direction: column;
356
- align-items: center;
357
- justify-content: center;
358
- gap: 18px
359
- }
360
-
361
- .content-container {
362
- display: flex;
363
- flex-direction: column;
364
- justify-content: center;
365
- align-items: center;
366
- gap: 8px;
367
- text-align: center;
368
- }
369
-
370
- .content-container h4 {
371
- font-weight: var(--nile-font-weight-regular);
372
- }
373
-
374
- .content-container p:first-child {
375
- margin: 0px;
376
- font-size: var(--nile-type-scale-3);
377
- font-weight: var(--nile-font-weight-regular);
378
- }
379
-
380
- .content-container p:last-child {
381
- margin: 0px;
382
- font-size: var(--nile-type-scale-2);
383
- font-weight: var(--nile-font-weight-regular);
384
- color: var(--nile-colors-neutral-700);
385
- }
386
-
387
- /* Drag State */
388
- .vertical-drag {
389
- display: flex;
390
- flex-direction: column;
391
- justify-content: center;
392
- align-items: center;
393
- gap:18px;
394
- font-size: var(--nile-type-scale-3);
395
- color: var(--nile-colors-blue-700);
396
- background-color: var(--nile-colors-blue-100);
397
- border-color: var(--nile-colors-blue-500);
398
- }
399
-
400
- /* Uploading State */
401
- .vertical-uploading {
402
- display: flex;
403
- flex-direction: column;
404
- justify-content: flex-end;
405
- align-items: center;
406
- border: 1px solid var(--nile-colors-neutral-400);
407
- }
408
-
409
- .vertical-uploading:hover {
410
- border-color: var(--nile-colors-neutral-400);
411
- }
412
-
413
- .loading {
414
- display: flex;
415
- justify-content: center;
416
- align-items: center;
417
- }
418
-
419
- .corner-icon {
420
- position: absolute;
421
- top: 10px;
422
- right: 10px;
423
- }
424
-
425
- /* Preview State */
426
- .vertical-preview {
427
- border: 1px solid var(--nile-colors-neutral-400);
428
- }
429
-
430
- .vertical-preview:hover {
431
- border-color: var(--nile-colors-neutral-400);
432
- }
433
-
434
- .image-preview {
435
- border: 1px solid var(--nile-colors-neutral-400);
436
- object-fit: cover;
437
- width: 80px;
438
- height: 80px;
439
- border-radius: var(--nile-radius-radius-xs);
440
- }
441
-
442
- /* Vertical No Preview State */
443
- .vertical-no-preview {
444
- border: 1px solid var(--nile-colors-neutral-400);
445
- }
446
-
447
- .vertical-no-preview:hover {
448
- border-color: var(--nile-colors-neutral-400);
449
- }
450
-
451
- .vertical-document-icon {
452
- height: 80px;
453
- width: 80px;
454
- padding: 2px 3px 2px 3px;
455
- display: flex;
456
- justify-content: center;
457
- align-items: center;
458
- border-radius: var(--nile-radius-radius-xs);
459
- border: 1px solid var(--nile-colors-blue-400);
460
- background-color: var(--nile-colors-blue-100);
461
- }
462
-
463
- /* Veritcal Error State */
464
- .vertical-error {
465
- border: 1px solid var(--nile-colors-neutral-400);
466
- }
467
-
468
- .vertical-error:hover {
469
- border-color: var(--nile-colors-neutral-400);
470
- }
471
-
472
- .error-bg {
473
- background-color: var(--nile-colors-red-100);
474
- border: 1px solid var(--nile-colors-red-400);
475
- }
476
-
477
- .error-message {
478
- display: flex;
479
- flex-direction: column;
480
- justify-content: center;
481
- align-items: center;
482
- gap: 8px;
483
- margin: 0px;
484
- font-size: var(--nile-type-scale-3);
485
- font-weight: var(--nile-font-weight-regular);
486
- text-align: center
487
- }
488
-
489
- .error-p {
490
- color: var(--nile-colors-red-700);
491
- font-size: var(--nile-type-scale-2);
492
- width: 216px;
493
- white-space: nowrap;
494
- overflow: hidden;
495
- text-overflow: ellipsis;
496
- text-align: center;
497
- }
498
-
499
- .error-p p {
500
- white-space: nowrap;
501
- overflow: hidden;
502
- text-overflow: ellipsis;
503
- margin: 0;
504
- }
505
-
506
-
507
- /* Displaing uploaded files CSS */
508
- .display-files {
509
- display: flex;
510
- flex-direction: column;
511
- justify-content: flex-start;
512
- align-items: center;
513
- gap: 8px;
514
- width: 648px;
515
- min-width: 230px;
516
- max-height: 200px;
517
- overflow-y: auto;
518
- border: 1px solid var(--nile-colors-neutral-700);
519
- border-radius: var(--nile-radius-radius-xs);
520
- scrollbar-width: none;
521
- padding: 12px;
522
- }
523
-
524
- ul, li {
525
- width: 100%;
526
- }
527
-
528
- li {
529
- list-style-type: none;
530
- }
531
- `;
532
- export default [styles];
533
- //# sourceMappingURL=nile-file-preview.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nile-file-preview.css.js","sourceRoot":"","sources":["../../../src/nile-file-preview/nile-file-preview.css.ts"],"names":[],"mappings":"AAAA;;;;;EAKE;AAEF,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwgBxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit';\n\n/**\n * FileUpload CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n * {\n padding: 0px;\n margin: 0px;\n box-sizing: border-box;\n }\n\n .wrapper {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 18px;\n height: auto;\n }\n\n input {\n display: none;\n }\n\n .horizontal-div {\n max-height: 62px;\n width: 648px;\n min-width: 230px;\n padding: 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 18px;\n border-radius: var(--nile-radius-radius-xs);\n border: 1px dashed var(--nile-colors-neutral-500);\n color: var(--nile-colors-dark-900);\n background-color: var(--nile-colors-white-base);\n }\n \n .hover-state {\n border-color: var(--nile-colors-primary-600);\n }\n\n .vertical-div {\n min-height: 156px;\n height: auto;\n min-width: 240px;\n width: 240px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n padding: 12px;\n border-radius: var(--nile-radius-radius-xs);\n color: var(--nile-colors-dark-900);\n border: 1px dashed var(--nile-colors-neutral-500);\n background-color: var(--nile-colors-white-base);\n position: relative; \n }\n\n .vertical-div:hover {\n border-color: var(--nile-colors-blue-500);\n }\n\n .outer-div-border {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .inner-div {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 18px;\n box-sizing: border-box;\n }\n\n .content {\n display: flex; \n flex-direction: column;\n justify-content: center;\n gap: 8px;\n }\n\n .content h4 {\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n color: var(--nile-colors-dark-900);\n }\n \n .content p {\n margin: 0px;\n font-size: var(--nile-type-scale-2);\n color: var(--nile-colors-neutral-700);\n }\n\n /* DISABLED STATE */\n .disable {\n background-color: var(--nile-colors-dark-200);\n opacity: 0.5;\n pointer-events: none;\n }\n\n /* DRAGGING */\n .dragging {\n background-color: var(--nile-colors-blue-100);\n border-color: var(--nile-colors-primary-600);\n display: flex;\n align-items: center;\n gap: 18px;\n color: var(--nile-colors-blue-700);\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .icons-container {\n display: flex;\n gap: 4px;\n }\n\n .general-icon {\n transform: rotate(-18.11deg);\n position: relative;\n bottom: 3px;\n }\n\n .image-icon {\n transform: rotate(15deg);\n }\n\n .icon:hover {\n cursor: pointer;\n }\n\n /* Uploading State */\n .uploading {\n width: 648px;\n min-width: 230px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 18px;\n box-sizing: border-box;\n border: 1px solid var(--nile-colors-neutral-400)\n }\n \n .uploading:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .progress-bar-container {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 0px;\n }\n\n .progress-bar-percent {\n width: 100%;\n display: flex;\n justify-content: space-between;\n font-size: var(--nile-type-scale-2);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .progress-bar-container p {\n margin: 0px;\n }\n\n .progress-bar-container > p {\n font-size: var(--nile-type-scale-1);\n color: var(--nile-colors-dark-500);\n }\n\n /* PREVIEW STATE */\n .preview {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .preview:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .preview-inner {\n display: flex;\n gap: 18px;\n }\n\n .preview-image-container {\n height: 42px;\n width: 42px;\n }\n\n .preview-image-container img, iframe {\n height: 42px;\n width: 42px;\n object-fit: contain;\n border-radius: var(--nile-radius-radius-xs);\n border: 1px solid var(--nile-colors-neutral-400);\n }\n \n .preview-file-info {\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 8px;\n }\n\n .preview-file-info p {\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .preview-file-info p:last-of-type{\n color: var(--nile-colors-neutral-700);\n font-size: var(--nile-type-scale-2);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .preview nile-icon:hover {\n cursor: pointer;\n }\n\n /* NO PREVIEW STATE */\n .no-preview {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .no-preview:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .no-preview-container {\n display: flex;\n gap: 18px;\n }\n\n .document-icon {\n height: 40px;\n width: 40px;\n border-radius: var(--nile-radius-radius-xs);\n padding: 2px 3px 2px 3px;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--nile-colors-blue-400);\n background-color: var(--nile-colors-blue-100);\n }\n\n .document-icon nile-icon {\n height: 40px;\n width: 40px;\n }\n \n .preview-file-info {\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 8px;\n }\n\n .preview-file-info p {\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .preview-file-info p:last-of-type{\n color: var(--nile-colors-neutral-700);\n font-size: var(--nile-type-scale-2);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .no-preview > nile-icon:hover {\n cursor: pointer;\n }\n\n /* ERROR STATE */\n .error {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .error:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .error-container {\n width: 100%;\n display: flex;\n gap: 18px;\n }\n\n .error-icon {\n height: 40px;\n width: 40px;\n border-radius: var(--nile-radius-radius-xs);\n padding: 2px 3px 2px 3px;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid var(--nile-colors-red-400);\n background-color: var(--nile-colors-red-100);\n }\n\n .error-icon nile-icon {\n height: 40px;\n width: 40px;\n }\n \n .file-info {\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 8px;\n }\n\n .file-info p {\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .file-info p:last-of-type{\n color: var(--nile-colors-red-700);\n font-size: var(--nile-type-scale-2);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .error > nile-icon:hover {\n cursor: pointer;\n }\n\n /* VARTICAL STATE START */\n /* Default State */\n .vertical-default {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 18px\n }\n\n .content-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 8px;\n text-align: center;\n }\n\n .content-container h4 {\n font-weight: var(--nile-font-weight-regular);\n }\n\n .content-container p:first-child {\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n }\n\n .content-container p:last-child {\n margin: 0px;\n font-size: var(--nile-type-scale-2);\n font-weight: var(--nile-font-weight-regular);\n color: var(--nile-colors-neutral-700);\n }\n\n /* Drag State */\n .vertical-drag {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap:18px;\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-blue-700);\n background-color: var(--nile-colors-blue-100);\n border-color: var(--nile-colors-blue-500);\n }\n\n /* Uploading State */\n .vertical-uploading {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: center;\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .vertical-uploading:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .loading {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .corner-icon {\n position: absolute;\n top: 10px;\n right: 10px;\n }\n\n /* Preview State */\n .vertical-preview {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .vertical-preview:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .image-preview {\n border: 1px solid var(--nile-colors-neutral-400);\n object-fit: cover;\n width: 80px;\n height: 80px;\n border-radius: var(--nile-radius-radius-xs);\n }\n\n /* Vertical No Preview State */\n .vertical-no-preview {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .vertical-no-preview:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .vertical-document-icon {\n height: 80px;\n width: 80px;\n padding: 2px 3px 2px 3px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--nile-radius-radius-xs);\n border: 1px solid var(--nile-colors-blue-400);\n background-color: var(--nile-colors-blue-100);\n }\n\n /* Veritcal Error State */\n .vertical-error {\n border: 1px solid var(--nile-colors-neutral-400);\n }\n\n .vertical-error:hover {\n border-color: var(--nile-colors-neutral-400);\n }\n\n .error-bg {\n background-color: var(--nile-colors-red-100);\n border: 1px solid var(--nile-colors-red-400);\n }\n\n .error-message {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin: 0px;\n font-size: var(--nile-type-scale-3);\n font-weight: var(--nile-font-weight-regular);\n text-align: center\n }\n\n .error-p {\n color: var(--nile-colors-red-700);\n font-size: var(--nile-type-scale-2);\n width: 216px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: center;\n }\n\n .error-p p {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n }\n\n\n /* Displaing uploaded files CSS */\n .display-files {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n width: 648px;\n min-width: 230px;\n max-height: 200px;\n overflow-y: auto;\n border: 1px solid var(--nile-colors-neutral-700);\n border-radius: var(--nile-radius-radius-xs);\n scrollbar-width: none;\n padding: 12px;\n }\n\n ul, li {\n width: 100%;\n }\n\n li {\n list-style-type: none;\n }\n`;\n\nexport default [styles];"]}
@@ -1,48 +0,0 @@
1
- /**
2
- * Copyright Aquera Inc 2025
3
- *
4
- * This source code is licensed under the BSD-3-Clause license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import NileElement from '../internal/nile-element';
8
- import { FilePreviewState, FilePreviewVariant } from './types';
9
- import { CSSResultArray, TemplateResult, PropertyValues } from 'lit';
10
- /**
11
- * Nile preview component.
12
- *
13
- * @tag nile-preview
14
- *
15
- */
16
- export declare class NileFilePreview extends NileElement {
17
- /**
18
- * The styles for nile-preview
19
- * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
20
- */
21
- static get styles(): CSSResultArray;
22
- errorMessage: string;
23
- inputFile: File;
24
- fileUrl: string;
25
- uploadStatus: number;
26
- allowedTypes: string[];
27
- state: FilePreviewState;
28
- variant: FilePreviewVariant;
29
- inputFileName: string;
30
- private inputFileHtml;
31
- private originalUrl;
32
- /**
33
- * Render method
34
- * @slot This is a slot test
35
- */
36
- connectedCallback(): void;
37
- protected updated(changedProperties: PropertyValues): void;
38
- private handleFileUrl;
39
- createState(file: File): Promise<void>;
40
- render(): TemplateResult;
41
- disconnectedCallback(): void;
42
- }
43
- export default NileFilePreview;
44
- declare global {
45
- interface HTMLElementTagNameMap {
46
- 'nile-preview': NileFilePreview;
47
- }
48
- }