@aquera/nile-elements 0.1.15 → 0.1.17

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 (54) hide show
  1. package/README.md +12 -0
  2. package/demo/index.html +0 -10
  3. package/demo/variables.css +21 -66
  4. package/demo/variables_v2.css +0 -2
  5. package/dist/nile-button/nile-button.css.cjs.js +1 -1
  6. package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
  7. package/dist/nile-button/nile-button.css.esm.js +77 -83
  8. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  9. package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +1 -1
  10. package/dist/nile-checkbox/nile-checkbox.test.esm.js +2 -2
  11. package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
  12. package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
  13. package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
  14. package/dist/nile-code-editor/theme.cjs.js +1 -1
  15. package/dist/nile-code-editor/theme.cjs.js.map +1 -1
  16. package/dist/nile-code-editor/theme.esm.js +1 -1
  17. package/dist/nile-form-group/nile-form-group.css.cjs.js +1 -1
  18. package/dist/nile-form-group/nile-form-group.css.cjs.js.map +1 -1
  19. package/dist/nile-form-group/nile-form-group.css.esm.js +1 -1
  20. package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js +1 -1
  21. package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js.map +1 -1
  22. package/dist/nile-stepper-item/nile-stepper-item.css.esm.js +0 -1
  23. package/dist/nile-toast/nile-toast.cjs.js +1 -1
  24. package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
  25. package/dist/nile-toast/nile-toast.css.cjs.js +1 -1
  26. package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -1
  27. package/dist/nile-toast/nile-toast.css.esm.js +2 -2
  28. package/dist/nile-toast/nile-toast.esm.js +3 -3
  29. package/dist/src/nile-button/nile-button.css.js +77 -83
  30. package/dist/src/nile-button/nile-button.css.js.map +1 -1
  31. package/dist/src/nile-checkbox/nile-checkbox.test.js +5 -17
  32. package/dist/src/nile-checkbox/nile-checkbox.test.js.map +1 -1
  33. package/dist/src/nile-code-editor/nile-code-editor.d.ts +3 -1
  34. package/dist/src/nile-code-editor/nile-code-editor.js +20 -5
  35. package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
  36. package/dist/src/nile-form-group/nile-form-group.css.js +1 -1
  37. package/dist/src/nile-form-group/nile-form-group.css.js.map +1 -1
  38. package/dist/src/nile-stepper-item/nile-stepper-item.css.js +0 -1
  39. package/dist/src/nile-stepper-item/nile-stepper-item.css.js.map +1 -1
  40. package/dist/src/nile-toast/nile-toast.css.js +2 -2
  41. package/dist/src/nile-toast/nile-toast.css.js.map +1 -1
  42. package/dist/src/nile-toast/nile-toast.d.ts +1 -0
  43. package/dist/src/nile-toast/nile-toast.js +5 -1
  44. package/dist/src/nile-toast/nile-toast.js.map +1 -1
  45. package/dist/tsconfig.tsbuildinfo +1 -1
  46. package/package.json +1 -1
  47. package/src/nile-button/nile-button.css.ts +77 -83
  48. package/src/nile-checkbox/nile-checkbox.test.ts +6 -21
  49. package/src/nile-code-editor/nile-code-editor.ts +20 -4
  50. package/src/nile-form-group/nile-form-group.css.ts +1 -1
  51. package/src/nile-stepper-item/nile-stepper-item.css.ts +0 -1
  52. package/src/nile-toast/nile-toast.css.ts +2 -2
  53. package/src/nile-toast/nile-toast.ts +3 -1
  54. package/vscode-html-custom-data.json +6 -2
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.1.15",
6
+ "version": "0.1.17",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -71,158 +71,158 @@ export const styles = css`
71
71
 
72
72
  /* Primary */
73
73
  .button--standard.button--primary {
74
- background-color: var(--nile-colors-button-primary);
75
- border-color: var(--nile-colors-button-primary-border);
76
- color: var(--nile-colors-button-primary-text);
74
+ background-color: var(--nile-colors-primary-600);
75
+ border-color: var(--nile-colors-primary-600);
76
+ color: var(--nile-colors-white-base);
77
77
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
78
78
  }
79
79
 
80
80
  .button--standard.button--primary:hover:not(.button--disabled) {
81
- background-color: var(--nile-colors-button-primary-hover);
82
- border-color: var(--nile-colors-button-primary-hover);
83
- color: var(--nile-colors-button-primary-text);
81
+ background-color: var(--nile-colors-primary-700);
82
+ border-color: var(--nile-colors-primary-700);
83
+ color: var(--nile-colors-white-base);
84
84
  }
85
85
 
86
86
  .button--standard.button--primary:active:not(.button--disabled) {
87
- background-color: var(--nile-colors-button-primary-pressed);
88
- border-color: var(--nile-colors-button-primary-pressed-border);
89
- color: var(--nile-colors-button-primary-text);
87
+ background-color: var(--nile-colors-primary-700);
88
+ border-color: var(--nile-colors-primary-900);
89
+ color: var(--nile-colors-white-base);
90
90
  box-shadow: 0px 1px 2px 0px rgba(0, 82, 145, 0.1),
91
91
  0px 0px 0px 4px rgba(0, 94, 166, 0.15);
92
92
  }
93
93
 
94
94
  .button--standard.button--primary.button--disabled {
95
- background-color: var(--nile-colors-button-primary-disabled);
96
- border-color: var(--nile-colors-button-primary-disabled);
97
- color: var(--nile-colors-button-primary-disabled-text);
95
+ background-color: var(--nile-colors-neutral-700);
96
+ border-color: var(--nile-colors-neutral-700);
97
+ color: var(--nile-colors-neutral-500);
98
98
  cursor: not-allowed;
99
99
  }
100
100
 
101
101
  .button--standard.button--primary.button--disabled:hover,
102
102
  .button--standard.button--primary.button--disabled:active {
103
- background-color: var(--nile-colors-button-primary-disabled);
104
- border-color: var(--nile-colors-button-primary-disabled);
105
- color: var(--nile-colors-button-primary-disabled-text);
103
+ background-color: var(--nile-colors-neutral-700);
104
+ border-color: var(--nile-colors-neutral-700);
105
+ color: var(--nile-colors-neutral-500);
106
106
  cursor: not-allowed;
107
107
  }
108
108
 
109
109
  /* Secondary */
110
110
  .button--standard.button--secondary {
111
- background-color: var(--nile-colors-button-secondary);
112
- border-color: var(--nile-colors-button-secondary-border);
113
- color: var(--nile-colors-button-secondary-text);
111
+ background-color: var(--nile-colors-neutral-400);
112
+ border-color: var(--nile-colors-neutral-400);
113
+ color: var(--nile-colors-dark-900);
114
114
  }
115
115
 
116
116
  .button--standard.button--secondary:hover:not(.button--disabled) {
117
- background-color: var(--nile-colors-button-secondary-hover);
118
- border-color: var(--nile-colors-button-secondary-border);
119
- color: var(--nile-colors-button-secondary-text);
117
+ background-color: var(--nile-colors-neutral-500);
118
+ border-color: var(--nile-colors-neutral-400);
119
+ color: var(--nile-colors-dark-900);
120
120
  }
121
121
 
122
122
  .button--standard.button--secondary:active:not(.button--disabled) {
123
- background-color: var(--nile-colors-button-secondary-pressed);
124
- border-color: var(--nile-colors-button-secondary-pressed-border);
125
- color: var(--nile-colors-button-secondary-text);
123
+ background-color: var(--nile-colors-neutral-500);
124
+ border-color: var(--nile-colors-neutral-700);
125
+ color: var(--nile-colors-dark-900);
126
126
  }
127
127
 
128
128
  .button--standard.button--secondary.button--disabled {
129
- background-color: var(--nile-colors-button-secondary-disabled);
130
- border-color: var(--nile-colors-button-secondary-disabled-border);
131
- color: var(--nile-colors-button-secondary-disabled-text);
129
+ background-color: var(--nile-colors-neutral-400);
130
+ border-color: var(--nile-colors-neutral-400);
131
+ color: var(--nile-colors-dark-500);
132
132
  cursor: not-allowed;
133
133
  }
134
134
 
135
135
  .button--standard.button--secondary.button--disabled:hover,
136
136
  .button--standard.button--secondary.button--disabled:active {
137
- background-color: var(--nile-colors-button-secondary-disabled);
138
- border-color: var(--nile-colors-button-secondary-disabled-border);
139
- color: var(--nile-colors-button-secondary-disabled-text);
137
+ background-color: var(--nile-colors-neutral-400);
138
+ border-color: var(--nile-colors-neutral-400);
139
+ color: var(--nile-colors-dark-500);
140
140
  cursor: not-allowed;
141
141
  }
142
142
 
143
143
  /* Tertiary */
144
144
  .button--standard.button--tertiary {
145
- background-color: var(--nile-colors-button-tertiary);
146
- border-color: var(--nile-colors-button-tertiary-border);
147
- color: var(--nile-colors-button-tertiary-text);
145
+ background-color: var(--nile-colors-white-base);
146
+ border-color: var(--nile-colors-neutral-500);
147
+ color: var(--nile-colors-dark-900);
148
148
  }
149
149
 
150
150
  .button--standard.button--tertiary:hover:not(.button--disabled) {
151
- background-color: var(--nile-colors-button-tertiary-hover);
151
+ background-color: var(--nile-colors-dark-200);
152
152
  border-color: var(--nile-colors-neutral-500);
153
- color: var(--nile-colors-button-tertiary-text);
153
+ color: var(--nile-colors-dark-900);
154
154
  }
155
155
 
156
156
  .button--standard.button--tertiary:active:not(.button--disabled) {
157
- background-color: var(--nile-colors-button-tertiary-pressed);
158
- border-color: var(--nile-colors-button-tertiary-pressed-border);
159
- color: var(--nile-colors-button-tertiary-text);
157
+ background-color: var(--nile-colors-neutral-400);
158
+ border-color: var(--nile-colors-neutral-700);
159
+ color: var(--nile-colors-dark-900);
160
160
  }
161
161
 
162
162
  .button--standard.button--tertiary.button--disabled,
163
163
  .button--standard.button--tertiary.button--disabled:hover,
164
164
  .button--standard.button--tertiary.button--disabled:active {
165
165
  border-color: var(--nile-colors-neutral-500);
166
- background-color: var(--nile-colors-button-tertiary-disabled);
167
- color: var(--nile-colors-button-tertiary-disabled-text);
166
+ background-color: var(--nile-colors-white-base);
167
+ color: var(--nile-colors-neutral-500);
168
168
  cursor: not-allowed;
169
169
  box-shadow: none;
170
170
  }
171
171
 
172
172
  /* ghost */
173
173
  .button--standard.button--ghost {
174
- background-color: var(--nile-colors-button-tertiary);
174
+ background-color: var(--nile-colors-white-base);
175
175
  border-color: transparent;
176
- color: var(--nile-colors-button-tertiary-text);
176
+ color: var(--nile-colors-dark-900);
177
177
  }
178
178
 
179
179
  .button--standard.button--ghost:hover:not(.button--disabled) {
180
- background-color: var(--nile-colors-button-tertiary-hover);
180
+ background-color: var(--nile-colors-dark-200);
181
181
  border-color: transparent;
182
- color: var(--nile-colors-button-tertiary-text);
182
+ color: var(--nile-colors-dark-900);
183
183
  }
184
184
 
185
185
  .button--standard.button--ghost:active:not(.button--disabled) {
186
- background-color: var(--nile-colors-button-tertiary-pressed);
186
+ background-color: var(--nile-colors-neutral-400);
187
187
  border-color: transparent;
188
- color: var(--nile-colors-button-tertiary-text);
188
+ color: var(--nile-colors-dark-900);
189
189
  }
190
190
 
191
191
  .button--standard.button--ghost.button--disabled,
192
192
  .button--standard.button--ghost.button--disabled:hover,
193
193
  .button--standard.button--ghost.button--disabled:active {
194
194
  border-color: transparent;
195
- background-color: var(--nile-colors-button-tertiary-disabled);
196
- color: var(--nile-colors-button-tertiary-disabled-text);
195
+ background-color: var(--nile-colors-white-base);
196
+ color: var(--nile-colors-neutral-500);
197
197
  cursor: not-allowed;
198
198
  box-shadow: none;
199
199
  }
200
200
 
201
201
  /* caution */
202
202
  .button--standard.button--caution {
203
- background-color: var(--nile-colors-button-caution);
204
- border-color: var(--nile-colors-button-caution);
205
- color: var(--nile-colors-button-caution-text);
203
+ background-color: var(--nile-colors-red-500);
204
+ border-color: var(--nile-colors-red-500);
205
+ color: var(--nile-colors-white-base);
206
206
  }
207
207
 
208
208
  .button--standard.button--caution:hover:not(.button--disabled) {
209
- background-color: var(--nile-colors-button-caution-hover);
210
- border-color: var(--nile-colors-button-caution-hover);
211
- color: var(--nile-colors-button-caution-text);
209
+ background-color: var(--nile-colors-red-700);
210
+ border-color: var(--nile-colors-red-700);
211
+ color: var(--nile-colors-white-base);
212
212
  }
213
213
 
214
214
  .button--standard.button--caution:active:not(.button--disabled) {
215
- background-color: var(--nile-colors-button-caution-pressed);
216
- border-color: var(--nile-colors-button-caution-pressed-border);
217
- color: var(--nile-colors-button-caution-text);
215
+ background-color: var(--nile-colors-red-700);
216
+ border-color: #820B0B;
217
+ color: var(--nile-colors-white-base);
218
218
  }
219
219
 
220
220
  .button--standard.button--caution.button--disabled,
221
221
  .button--standard.button--caution.button--disabled:hover,
222
222
  .button--standard.button--caution.button--disabled:active {
223
- background-color: var(--nile-colors-button-caution-disabled);
224
- border-color: var(--nile-colors-button-caution-disabled);
225
- color: var(--nile-colors-button-caution-disabled-text);
223
+ background-color: var(--nile-colors-neutral-500);
224
+ border-color: var(--nile-colors-neutral-500);
225
+ color: var(--nile-colors-neutral-400);
226
226
  }
227
227
 
228
228
  /* destructive */
@@ -294,7 +294,7 @@ export const styles = css`
294
294
 
295
295
  .button--standard.button--secondary-grey.button--disabled {
296
296
  background-color: #eaecf0;
297
- border-color: var(--nile-colors-button-primary-disabled);
297
+ border-color: var(--nile-colors-neutral-700);
298
298
  color: #98a2b3;
299
299
  cursor: not-allowed;
300
300
  }
@@ -302,7 +302,7 @@ export const styles = css`
302
302
  .button--standard.button--secondary-grey.button--disabled:hover,
303
303
  .button--standard.button--secondary-grey.button--disabled:active {
304
304
  background-color: #eaecf0;
305
- border-color: var(--nile-colors-button-primary-disabled);
305
+ border-color: var(--nile-colors-neutral-700);
306
306
  color: #98a2b3;
307
307
  cursor: not-allowed;
308
308
  }
@@ -347,78 +347,72 @@ export const styles = css`
347
347
 
348
348
  /* Primary Variant - Nile Icon Fill */
349
349
  .button--standard.button--primary ::slotted(nile-icon:not([color])) {
350
- --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
350
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
351
351
  }
352
352
  .button--standard.button--primary:hover:not(.button--disabled)
353
353
  ::slotted(nile-icon:not([color])),
354
354
  .button--standard.button--primary:active:not(.button--disabled)
355
355
  ::slotted(nile-icon:not([color])) {
356
- --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
356
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
357
357
  }
358
358
  .button--standard.button--primary.button--disabled ::slotted(nile-icon:not([color])) {
359
- --nile-svg-fill: var(--nile-colors-button-primary-disabled-text) !important;
359
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
360
360
  }
361
361
 
362
362
  /* Secondary Variant */
363
363
  .button--standard.button--secondary ::slotted(nile-icon:not([color])) {
364
- --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
364
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
365
365
  }
366
366
  .button--standard.button--secondary:hover:not(.button--disabled)
367
367
  ::slotted(nile-icon:not([color])),
368
368
  .button--standard.button--secondary:active:not(.button--disabled)
369
369
  ::slotted(nile-icon:not([color])) {
370
- --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
370
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
371
371
  }
372
372
  .button--standard.button--secondary.button--disabled ::slotted(nile-icon:not([color])) {
373
- --nile-svg-fill: var(
374
- --nile-colors-button-secondary-disabled-text
375
- ) !important;
373
+ --nile-svg-fill: var(--nile-colors-dark-500) !important;
376
374
  }
377
375
 
378
376
  /* Tertiary Variant */
379
377
  .button--standard.button--tertiary ::slotted(nile-icon:not([color])) {
380
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
378
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
381
379
  }
382
380
  .button--standard.button--tertiary:hover:not(.button--disabled)
383
381
  ::slotted(nile-icon:not([color])),
384
382
  .button--standard.button--tertiary:active:not(.button--disabled)
385
383
  ::slotted(nile-icon:not([color])) {
386
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
384
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
387
385
  }
388
386
  .button--standard.button--tertiary.button--disabled ::slotted(nile-icon:not([color])) {
389
- --nile-svg-fill: var(
390
- --nile-colors-button-tertiary-disabled-text
391
- ) !important;
387
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
392
388
  }
393
389
 
394
390
  /* Ghost Variant */
395
391
  .button--standard.button--ghost ::slotted(nile-icon:not([color])) {
396
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
392
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
397
393
  }
398
394
  .button--standard.button--ghost:hover:not(.button--disabled)
399
395
  ::slotted(nile-icon:not([color])),
400
396
  .button--standard.button--ghost:active:not(.button--disabled)
401
397
  ::slotted(nile-icon:not([color])) {
402
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
398
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
403
399
  }
404
400
  .button--standard.button--ghost ::slotted(nile-icon:not([color])) {
405
- --nile-svg-fill: var(
406
- --nile-colors-button-tertiary-disabled-text
407
- ) !important;
401
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
408
402
  }
409
403
 
410
404
  /* Caution Variant */
411
405
  .button--standard.button--caution ::slotted(nile-icon:not([color])) {
412
- --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
406
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
413
407
  }
414
408
  .button--standard.button--caution:hover:not(.button--disabled)
415
409
  ::slotted(nile-icon:not([color])),
416
410
  .button--standard.button--caution:active:not(.button--disabled)
417
411
  ::slotted(nile-icon:not([color])) {
418
- --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
412
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
419
413
  }
420
414
  .button--standard.button--caution.button--disabled ::slotted(nile-icon:not([color])) {
421
- --nile-svg-fill: var(--nile-colors-button-caution-disabled-text) !important;
415
+ --nile-svg-fill: var(--nile-colors-neutral-400) !important;
422
416
  }
423
417
 
424
418
  /* destructive */
@@ -2,6 +2,10 @@ import { fixture, html, expect, oneEvent } from '@open-wc/testing';
2
2
  import './nile-checkbox';
3
3
  import { NileCheckbox } from './nile-checkbox';
4
4
 
5
+ function wait(ms:number=50000) {
6
+ return new Promise(resolve => setTimeout(resolve, ms));
7
+ }
8
+
5
9
  describe('NileCheckbox', () => {
6
10
  it('renders correctly with default properties', async () => {
7
11
  const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);
@@ -83,9 +87,8 @@ describe('NileCheckbox', () => {
83
87
  const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text="test-help"></nile-checkbox>`);
84
88
  el.showHelpText = true;
85
89
  await el.updateComplete;
86
-
87
- const helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');
88
- expect(helpTextIcon).to.exist;
90
+ const helpText=el.shadowRoot?.querySelector("nile-form-help-text")?.textContent?.trim()
91
+ expect(helpText).to.equal('test-help')
89
92
  });
90
93
 
91
94
  it('updates host class based on helpText', async () => {
@@ -166,23 +169,5 @@ describe('NileCheckbox', () => {
166
169
  expect(checkbox.getAttribute('form')).to.equal('test-form');
167
170
  });
168
171
 
169
- it('displays and hides help text correctly', async () => {
170
- const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text="test-help"></nile-checkbox>`);
171
-
172
- // Initially, help text should not be shown
173
- expect(el.showHelpText).to.be.false;
174
-
175
- // Show the help text
176
- el.showHelpText = true;
177
- await el.updateComplete;
178
- let helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');
179
- expect(helpTextIcon).to.exist;
180
-
181
- // Hide the help text
182
- el.showHelpText = false;
183
- await el.updateComplete;
184
- helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');
185
- expect(helpTextIcon).to.be.exist;
186
- });
187
172
  });
188
173
 
@@ -21,7 +21,7 @@ import {
21
21
  EditorState,
22
22
  Extension
23
23
  } from '@codemirror/state';
24
-
24
+ import { StyleSpec } from 'style-mod';
25
25
  import {
26
26
  syntaxHighlighting,
27
27
  defaultHighlightStyle,
@@ -39,7 +39,7 @@ import { autocompletion,CompletionContext,CompletionResult } from '@codemirror/a
39
39
  import NileElement from '../internal/nile-element';
40
40
  import { basicSetup } from './extensionSetup';
41
41
  import { classMap } from 'lit/directives/class-map.js';
42
- import { Theme, CustomTheme } from './theme';
42
+ import { Theme as DefaultTheme, CustomTheme } from './theme';
43
43
 
44
44
  // Choose the appropriate mode for your use case
45
45
 
@@ -80,7 +80,7 @@ export class NileCodeEditor extends NileElement {
80
80
 
81
81
  @property({ type: Boolean, reflect: true , attribute: false }) disableSyntaxHighlighting: boolean = false;
82
82
 
83
- @property({ type: Boolean, reflect: true , attribute: false }) useCustomTextFormatting: boolean = false;
83
+ @property({ type: Object, attribute: false }) customThemeCSS: object | null = null;
84
84
 
85
85
  @property({ type: Boolean, reflect: true , attribute: true }) lineNumbersMultiline: boolean = true;
86
86
 
@@ -105,6 +105,7 @@ export class NileCodeEditor extends NileElement {
105
105
  private customCompletionComp = new Compartment();
106
106
  private placeholderComp = new Compartment();
107
107
  private defaultSyntaxHighlightingComp = new Compartment();
108
+ private themeComp = new Compartment();
108
109
 
109
110
  /**
110
111
  * The styles for CodeEditor
@@ -186,6 +187,13 @@ export class NileCodeEditor extends NileElement {
186
187
  ]
187
188
  })
188
189
  }
190
+ if(changedProperties.has('customThemeCSS')){
191
+ this.view.dispatch({
192
+ effects: [
193
+ this.themeComp.reconfigure(this.getCustomThemeExtension())
194
+ ]
195
+ })
196
+ }
189
197
  }
190
198
 
191
199
  public render(): TemplateResult {
@@ -239,6 +247,7 @@ export class NileCodeEditor extends NileElement {
239
247
  const readOnlyExtension = this.readOnlyComp.of(this.getReadOnlyExtension());
240
248
  const restrictSingleLineExtension = this.restrictSingleLineComp.of(this.getSingleLineExtension())
241
249
  const placeholderExtension = this.placeholderComp.of(this.getPlaceholderExtension())
250
+ const customThemeExtension=this.themeComp.of(this.getCustomThemeExtension());
242
251
  const defaultSyntaxHighlightingExtension = this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension());
243
252
  const language = this.getLanguageExtension()
244
253
  const customAutoCompletions = this.customCompletionComp.of(javascriptLanguage.data.of({
@@ -260,7 +269,7 @@ export class NileCodeEditor extends NileElement {
260
269
  defaultSyntaxHighlightingExtension,
261
270
  autocompletion(),
262
271
  language,
263
- EditorView.theme(this.useCustomTextFormatting?CustomTheme:Theme),
272
+ customThemeExtension,
264
273
  EditorView.updateListener.of((v: ViewUpdate) => {
265
274
  if (v.docChanged) {
266
275
  this.debounce ? this.emitAfterTimeout({ value: this.view.state.doc.toString() }) : this.emit('nile-change', { value: this.view.state.doc.toString() })
@@ -447,6 +456,13 @@ export class NileCodeEditor extends NileElement {
447
456
  return !this.disableSyntaxHighlighting ? syntaxHighlighting(defaultHighlightStyle, { fallback: true }):[]
448
457
  }
449
458
 
459
+ getCustomThemeExtension(): Extension {
460
+ if (this.customThemeCSS) {
461
+ return EditorView.theme(this.customThemeCSS as { [selector: string]: StyleSpec });
462
+ }
463
+ return EditorView.theme(DefaultTheme);
464
+ }
465
+
450
466
  restrictSingleLine() {
451
467
  return EditorState.transactionFilter.of(tr =>
452
468
  tr.newDoc.lines > 1 ? [] : tr
@@ -22,7 +22,7 @@ export const styles = css`
22
22
  width: max-content;
23
23
  box-shadow: 0px 2px 4px 0px rgba(119, 125, 130, 0.15);
24
24
  border-radius: var(--nile-radius-base-standard);
25
- border: 1px solid var(--nile-colors-button-secondary);
25
+ border: 1px solid var(--nile-colors-neutral-400);
26
26
  background: var(--nile-colors-white-base);
27
27
  font-family: var(--nile-font-family-serif);
28
28
  }
@@ -17,7 +17,6 @@ export const styles = css`
17
17
 
18
18
  display:inline-block;
19
19
  flex-grow:var(--stepper-flex-val);
20
- color: var(--nile-stepper-color-text-default);
21
20
  min-width:var(--nile-stepper-min-width);
22
21
  }
23
22
 
@@ -159,12 +159,12 @@ export const styles = css`
159
159
  height: 24px;
160
160
  display: flex;
161
161
  border-radius: 4px;
162
- border: 1px solid #e5e9eb;
162
+ border: 1px solid var(--nile-colors-neutral-400);
163
163
  background: var(--nile-colors-white-base);
164
164
  }
165
165
 
166
166
  .alert__tag-content {
167
- border-left: 1px solid #e5e9eb;
167
+ border-left: 1px solid var(--nile-colors-neutral-400);
168
168
  display: flex;
169
169
  align-items: center;
170
170
  justify-content: center;
@@ -82,6 +82,8 @@ export class NileToast extends NileElement {
82
82
  @property({ type: Boolean, reflect: true }) hasSlottedIcon = false;
83
83
 
84
84
  @property({ type: String, reflect: true }) prefixImageUrl = '';
85
+
86
+ @property({ type: String, reflect: true }) closeIconName = 'close';
85
87
 
86
88
  /** The alert's theme variant. */
87
89
  @property({ reflect: true }) variant:
@@ -366,7 +368,7 @@ export class NileToast extends NileElement {
366
368
  part="close-button"
367
369
  exportparts="base:close-button__base"
368
370
  class="alert__close-button"
369
- name="close"
371
+ name="${this.closeIconName}"
370
372
  label="close"
371
373
  size="20"
372
374
  color="#98A2B3"
@@ -784,7 +784,7 @@
784
784
  },
785
785
  {
786
786
  "name": "nile-code-editor",
787
- "description": "Nile icon component.\n\nEvents:\n\n * `nile-focus` {`Event`} - \n\n * `nile-blur` {`Event`} - \n\nAttributes:\n\n * `value` {`string`} - \n\n * `expandIcon` {`string`} - \n\n * `placeholder` {`string`} - \n\n * `customAutoCompletions` - \n\n * `customCompletionsPaths` {`string[]`} - \n\n * `language` {`\"html\" | \"javascript\" | \"sql\" | \"json\"`} - \n\n * `error-message` {`string`} - \n\n * `error` {`boolean`} - \n\n * `noborder` {`boolean`} - \n\n * `multiline` {`boolean`} - \n\n * `allowVariableInCustomSuggestion` {`boolean`} - \n\n * `lineNumbers` {`boolean`} - \n\n * `lineNumbersMultiline` {`boolean`} - \n\n * `hasScroller` {`boolean`} - \n\n * `expandable` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `debounce` {`boolean`} - \n\n * `debounceTimeout` {`number`} - \n\nProperties:\n\n * `codeEditor` {`HTMLInputElement`} - \n\n * `value` {`string`} - \n\n * `expandIcon` {`string`} - \n\n * `placeholder` {`string`} - \n\n * `customAutoCompletions` - \n\n * `customCompletionsPaths` {`string[]`} - \n\n * `language` {`\"html\" | \"javascript\" | \"sql\" | \"json\"`} - \n\n * `errorMessage` {`string`} - \n\n * `error` {`boolean`} - \n\n * `noborder` {`boolean`} - \n\n * `multiline` {`boolean`} - \n\n * `allowVariableInCustomSuggestion` {`boolean`} - \n\n * `lineNumbers` {`boolean`} - \n\n * `disableSyntaxHighlighting` {`boolean`} - \n\n * `useCustomTextFormatting` {`boolean`} - \n\n * `lineNumbersMultiline` {`boolean`} - \n\n * `hasScroller` {`boolean`} - \n\n * `expandable` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `debounce` {`boolean`} - \n\n * `debounceTimeout` {`number`} - \n\n * `view` - \n\n * `viewState` - \n\n * `timeOut` - \n\n * `lineNumbersComp` - \n\n * `restrictSingleLineComp` - \n\n * `readOnlyComp` - \n\n * `customCompletionComp` - \n\n * `placeholderComp` - \n\n * `defaultSyntaxHighlightingComp` - \n\n * `customAutocomplete` - Custom autocomplete handler for code editor suggestions\n\n * `insertBetweenCode` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
787
+ "description": "Nile icon component.\n\nEvents:\n\n * `nile-focus` {`Event`} - \n\n * `nile-blur` {`Event`} - \n\nAttributes:\n\n * `value` {`string`} - \n\n * `expandIcon` {`string`} - \n\n * `placeholder` {`string`} - \n\n * `customAutoCompletions` - \n\n * `customCompletionsPaths` {`string[]`} - \n\n * `language` {`\"html\" | \"javascript\" | \"sql\" | \"json\"`} - \n\n * `error-message` {`string`} - \n\n * `error` {`boolean`} - \n\n * `noborder` {`boolean`} - \n\n * `multiline` {`boolean`} - \n\n * `allowVariableInCustomSuggestion` {`boolean`} - \n\n * `lineNumbers` {`boolean`} - \n\n * `lineNumbersMultiline` {`boolean`} - \n\n * `hasScroller` {`boolean`} - \n\n * `expandable` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `debounce` {`boolean`} - \n\n * `debounceTimeout` {`number`} - \n\nProperties:\n\n * `codeEditor` {`HTMLInputElement`} - \n\n * `value` {`string`} - \n\n * `expandIcon` {`string`} - \n\n * `placeholder` {`string`} - \n\n * `customAutoCompletions` - \n\n * `customCompletionsPaths` {`string[]`} - \n\n * `language` {`\"html\" | \"javascript\" | \"sql\" | \"json\"`} - \n\n * `errorMessage` {`string`} - \n\n * `error` {`boolean`} - \n\n * `noborder` {`boolean`} - \n\n * `multiline` {`boolean`} - \n\n * `allowVariableInCustomSuggestion` {`boolean`} - \n\n * `lineNumbers` {`boolean`} - \n\n * `disableSyntaxHighlighting` {`boolean`} - \n\n * `customThemeCSS` {`object | null`} - \n\n * `lineNumbersMultiline` {`boolean`} - \n\n * `hasScroller` {`boolean`} - \n\n * `expandable` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `debounce` {`boolean`} - \n\n * `debounceTimeout` {`number`} - \n\n * `view` - \n\n * `viewState` - \n\n * `timeOut` - \n\n * `lineNumbersComp` - \n\n * `restrictSingleLineComp` - \n\n * `readOnlyComp` - \n\n * `customCompletionComp` - \n\n * `placeholderComp` - \n\n * `defaultSyntaxHighlightingComp` - \n\n * `themeComp` - \n\n * `customAutocomplete` - Custom autocomplete handler for code editor suggestions\n\n * `insertBetweenCode` - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
788
788
  "attributes": [
789
789
  {
790
790
  "name": "value",
@@ -3621,7 +3621,7 @@
3621
3621
  },
3622
3622
  {
3623
3623
  "name": "nile-toast",
3624
- "description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the alert opens.\n\n * `nile-after-show` {} - Emitted after the alert opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the alert closes.\n\n * `nile-after-hide` {} - Emitted after the alert closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The alert's main content.\n\n * `icon` {} - An icon to show in the alert. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\nProperties:\n\n * `styles` - \n\n * `autoHideTimeout` {`number`} - \n\n * `hasSlotController` - \n\n * `base` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
3624
+ "description": "Nile icon component.\n\nEvents:\n\n * `nile-show` {} - Emitted when the alert opens.\n\n * `nile-after-show` {} - Emitted after the alert opens and all animations are complete.\n\n * `nile-hide` {} - Emitted when the alert closes.\n\n * `nile-after-hide` {} - Emitted after the alert closes and all animations are complete.\n\nSlots:\n\n * ` ` {} - The alert's main content.\n\n * `icon` {} - An icon to show in the alert. Works best with `<nile-icon>`.\n\nAttributes:\n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `closeIconName` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\nProperties:\n\n * `styles` - \n\n * `autoHideTimeout` {`number`} - \n\n * `hasSlotController` - \n\n * `base` {`HTMLElement`} - \n\n * `open` {`boolean`} - Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can\nuse the `show()` and `hide()` methods and this attribute will reflect the alert's open state.\n\n * `noIcon` {`boolean`} - \n\n * `closable` {`boolean`} - Enables a close button that allows the user to dismiss the alert.\n\n * `hasSlottedContent` {`boolean`} - \n\n * `hasSlottedIcon` {`boolean`} - \n\n * `prefixImageUrl` {`string`} - \n\n * `closeIconName` {`string`} - \n\n * `variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\n * `duration` {`number`} - The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.\n\n * `title` {`string`} - \n\n * `content` {`string`} - \n\n * `tags` {`any[]`} - \n\n * `BUBBLES` {`boolean`} - \n\n * `COMPOSED` {`boolean`} - \n\n * `CANCELABLE` {`boolean`} - ",
3625
3625
  "attributes": [
3626
3626
  {
3627
3627
  "name": "open",
@@ -3652,6 +3652,10 @@
3652
3652
  "name": "prefixImageUrl",
3653
3653
  "description": "`prefixImageUrl` {`string`} - \n\nProperty: prefixImageUrl\n\nDefault: "
3654
3654
  },
3655
+ {
3656
+ "name": "closeIconName",
3657
+ "description": "`closeIconName` {`string`} - \n\nProperty: closeIconName\n\nDefault: close"
3658
+ },
3655
3659
  {
3656
3660
  "name": "variant",
3657
3661
  "description": "`variant` {`\"success\" | \"warning\" | \"error\" | \"info\" | \"gray\" | \"black\"`} - The alert's theme variant.\n\nProperty: variant\n\nDefault: success",