@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
@@ -59,158 +59,158 @@ import{css as o}from"lit";const t=o`
59
59
 
60
60
  /* Primary */
61
61
  .button--standard.button--primary {
62
- background-color: var(--nile-colors-button-primary);
63
- border-color: var(--nile-colors-button-primary-border);
64
- color: var(--nile-colors-button-primary-text);
62
+ background-color: var(--nile-colors-primary-600);
63
+ border-color: var(--nile-colors-primary-600);
64
+ color: var(--nile-colors-white-base);
65
65
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
66
66
  }
67
67
 
68
68
  .button--standard.button--primary:hover:not(.button--disabled) {
69
- background-color: var(--nile-colors-button-primary-hover);
70
- border-color: var(--nile-colors-button-primary-hover);
71
- color: var(--nile-colors-button-primary-text);
69
+ background-color: var(--nile-colors-primary-700);
70
+ border-color: var(--nile-colors-primary-700);
71
+ color: var(--nile-colors-white-base);
72
72
  }
73
73
 
74
74
  .button--standard.button--primary:active:not(.button--disabled) {
75
- background-color: var(--nile-colors-button-primary-pressed);
76
- border-color: var(--nile-colors-button-primary-pressed-border);
77
- color: var(--nile-colors-button-primary-text);
75
+ background-color: var(--nile-colors-primary-700);
76
+ border-color: var(--nile-colors-primary-900);
77
+ color: var(--nile-colors-white-base);
78
78
  box-shadow: 0px 1px 2px 0px rgba(0, 82, 145, 0.1),
79
79
  0px 0px 0px 4px rgba(0, 94, 166, 0.15);
80
80
  }
81
81
 
82
82
  .button--standard.button--primary.button--disabled {
83
- background-color: var(--nile-colors-button-primary-disabled);
84
- border-color: var(--nile-colors-button-primary-disabled);
85
- color: var(--nile-colors-button-primary-disabled-text);
83
+ background-color: var(--nile-colors-neutral-700);
84
+ border-color: var(--nile-colors-neutral-700);
85
+ color: var(--nile-colors-neutral-500);
86
86
  cursor: not-allowed;
87
87
  }
88
88
 
89
89
  .button--standard.button--primary.button--disabled:hover,
90
90
  .button--standard.button--primary.button--disabled:active {
91
- background-color: var(--nile-colors-button-primary-disabled);
92
- border-color: var(--nile-colors-button-primary-disabled);
93
- color: var(--nile-colors-button-primary-disabled-text);
91
+ background-color: var(--nile-colors-neutral-700);
92
+ border-color: var(--nile-colors-neutral-700);
93
+ color: var(--nile-colors-neutral-500);
94
94
  cursor: not-allowed;
95
95
  }
96
96
 
97
97
  /* Secondary */
98
98
  .button--standard.button--secondary {
99
- background-color: var(--nile-colors-button-secondary);
100
- border-color: var(--nile-colors-button-secondary-border);
101
- color: var(--nile-colors-button-secondary-text);
99
+ background-color: var(--nile-colors-neutral-400);
100
+ border-color: var(--nile-colors-neutral-400);
101
+ color: var(--nile-colors-dark-900);
102
102
  }
103
103
 
104
104
  .button--standard.button--secondary:hover:not(.button--disabled) {
105
- background-color: var(--nile-colors-button-secondary-hover);
106
- border-color: var(--nile-colors-button-secondary-border);
107
- color: var(--nile-colors-button-secondary-text);
105
+ background-color: var(--nile-colors-neutral-500);
106
+ border-color: var(--nile-colors-neutral-400);
107
+ color: var(--nile-colors-dark-900);
108
108
  }
109
109
 
110
110
  .button--standard.button--secondary:active:not(.button--disabled) {
111
- background-color: var(--nile-colors-button-secondary-pressed);
112
- border-color: var(--nile-colors-button-secondary-pressed-border);
113
- color: var(--nile-colors-button-secondary-text);
111
+ background-color: var(--nile-colors-neutral-500);
112
+ border-color: var(--nile-colors-neutral-700);
113
+ color: var(--nile-colors-dark-900);
114
114
  }
115
115
 
116
116
  .button--standard.button--secondary.button--disabled {
117
- background-color: var(--nile-colors-button-secondary-disabled);
118
- border-color: var(--nile-colors-button-secondary-disabled-border);
119
- color: var(--nile-colors-button-secondary-disabled-text);
117
+ background-color: var(--nile-colors-neutral-400);
118
+ border-color: var(--nile-colors-neutral-400);
119
+ color: var(--nile-colors-dark-500);
120
120
  cursor: not-allowed;
121
121
  }
122
122
 
123
123
  .button--standard.button--secondary.button--disabled:hover,
124
124
  .button--standard.button--secondary.button--disabled:active {
125
- background-color: var(--nile-colors-button-secondary-disabled);
126
- border-color: var(--nile-colors-button-secondary-disabled-border);
127
- color: var(--nile-colors-button-secondary-disabled-text);
125
+ background-color: var(--nile-colors-neutral-400);
126
+ border-color: var(--nile-colors-neutral-400);
127
+ color: var(--nile-colors-dark-500);
128
128
  cursor: not-allowed;
129
129
  }
130
130
 
131
131
  /* Tertiary */
132
132
  .button--standard.button--tertiary {
133
- background-color: var(--nile-colors-button-tertiary);
134
- border-color: var(--nile-colors-button-tertiary-border);
135
- color: var(--nile-colors-button-tertiary-text);
133
+ background-color: var(--nile-colors-white-base);
134
+ border-color: var(--nile-colors-neutral-500);
135
+ color: var(--nile-colors-dark-900);
136
136
  }
137
137
 
138
138
  .button--standard.button--tertiary:hover:not(.button--disabled) {
139
- background-color: var(--nile-colors-button-tertiary-hover);
139
+ background-color: var(--nile-colors-dark-200);
140
140
  border-color: var(--nile-colors-neutral-500);
141
- color: var(--nile-colors-button-tertiary-text);
141
+ color: var(--nile-colors-dark-900);
142
142
  }
143
143
 
144
144
  .button--standard.button--tertiary:active:not(.button--disabled) {
145
- background-color: var(--nile-colors-button-tertiary-pressed);
146
- border-color: var(--nile-colors-button-tertiary-pressed-border);
147
- color: var(--nile-colors-button-tertiary-text);
145
+ background-color: var(--nile-colors-neutral-400);
146
+ border-color: var(--nile-colors-neutral-700);
147
+ color: var(--nile-colors-dark-900);
148
148
  }
149
149
 
150
150
  .button--standard.button--tertiary.button--disabled,
151
151
  .button--standard.button--tertiary.button--disabled:hover,
152
152
  .button--standard.button--tertiary.button--disabled:active {
153
153
  border-color: var(--nile-colors-neutral-500);
154
- background-color: var(--nile-colors-button-tertiary-disabled);
155
- color: var(--nile-colors-button-tertiary-disabled-text);
154
+ background-color: var(--nile-colors-white-base);
155
+ color: var(--nile-colors-neutral-500);
156
156
  cursor: not-allowed;
157
157
  box-shadow: none;
158
158
  }
159
159
 
160
160
  /* ghost */
161
161
  .button--standard.button--ghost {
162
- background-color: var(--nile-colors-button-tertiary);
162
+ background-color: var(--nile-colors-white-base);
163
163
  border-color: transparent;
164
- color: var(--nile-colors-button-tertiary-text);
164
+ color: var(--nile-colors-dark-900);
165
165
  }
166
166
 
167
167
  .button--standard.button--ghost:hover:not(.button--disabled) {
168
- background-color: var(--nile-colors-button-tertiary-hover);
168
+ background-color: var(--nile-colors-dark-200);
169
169
  border-color: transparent;
170
- color: var(--nile-colors-button-tertiary-text);
170
+ color: var(--nile-colors-dark-900);
171
171
  }
172
172
 
173
173
  .button--standard.button--ghost:active:not(.button--disabled) {
174
- background-color: var(--nile-colors-button-tertiary-pressed);
174
+ background-color: var(--nile-colors-neutral-400);
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.button--disabled,
180
180
  .button--standard.button--ghost.button--disabled:hover,
181
181
  .button--standard.button--ghost.button--disabled:active {
182
182
  border-color: transparent;
183
- background-color: var(--nile-colors-button-tertiary-disabled);
184
- color: var(--nile-colors-button-tertiary-disabled-text);
183
+ background-color: var(--nile-colors-white-base);
184
+ color: var(--nile-colors-neutral-500);
185
185
  cursor: not-allowed;
186
186
  box-shadow: none;
187
187
  }
188
188
 
189
189
  /* caution */
190
190
  .button--standard.button--caution {
191
- background-color: var(--nile-colors-button-caution);
192
- border-color: var(--nile-colors-button-caution);
193
- color: var(--nile-colors-button-caution-text);
191
+ background-color: var(--nile-colors-red-500);
192
+ border-color: var(--nile-colors-red-500);
193
+ color: var(--nile-colors-white-base);
194
194
  }
195
195
 
196
196
  .button--standard.button--caution:hover:not(.button--disabled) {
197
- background-color: var(--nile-colors-button-caution-hover);
198
- border-color: var(--nile-colors-button-caution-hover);
199
- color: var(--nile-colors-button-caution-text);
197
+ background-color: var(--nile-colors-red-700);
198
+ border-color: var(--nile-colors-red-700);
199
+ color: var(--nile-colors-white-base);
200
200
  }
201
201
 
202
202
  .button--standard.button--caution:active:not(.button--disabled) {
203
- background-color: var(--nile-colors-button-caution-pressed);
204
- border-color: var(--nile-colors-button-caution-pressed-border);
205
- color: var(--nile-colors-button-caution-text);
203
+ background-color: var(--nile-colors-red-700);
204
+ border-color: #820B0B;
205
+ color: var(--nile-colors-white-base);
206
206
  }
207
207
 
208
208
  .button--standard.button--caution.button--disabled,
209
209
  .button--standard.button--caution.button--disabled:hover,
210
210
  .button--standard.button--caution.button--disabled:active {
211
- background-color: var(--nile-colors-button-caution-disabled);
212
- border-color: var(--nile-colors-button-caution-disabled);
213
- color: var(--nile-colors-button-caution-disabled-text);
211
+ background-color: var(--nile-colors-neutral-500);
212
+ border-color: var(--nile-colors-neutral-500);
213
+ color: var(--nile-colors-neutral-400);
214
214
  }
215
215
 
216
216
  /* destructive */
@@ -282,7 +282,7 @@ import{css as o}from"lit";const t=o`
282
282
 
283
283
  .button--standard.button--secondary-grey.button--disabled {
284
284
  background-color: #eaecf0;
285
- border-color: var(--nile-colors-button-primary-disabled);
285
+ border-color: var(--nile-colors-neutral-700);
286
286
  color: #98a2b3;
287
287
  cursor: not-allowed;
288
288
  }
@@ -290,7 +290,7 @@ import{css as o}from"lit";const t=o`
290
290
  .button--standard.button--secondary-grey.button--disabled:hover,
291
291
  .button--standard.button--secondary-grey.button--disabled:active {
292
292
  background-color: #eaecf0;
293
- border-color: var(--nile-colors-button-primary-disabled);
293
+ border-color: var(--nile-colors-neutral-700);
294
294
  color: #98a2b3;
295
295
  cursor: not-allowed;
296
296
  }
@@ -335,78 +335,72 @@ import{css as o}from"lit";const t=o`
335
335
 
336
336
  /* Primary Variant - Nile Icon Fill */
337
337
  .button--standard.button--primary ::slotted(nile-icon:not([color])) {
338
- --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
338
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
339
339
  }
340
340
  .button--standard.button--primary:hover:not(.button--disabled)
341
341
  ::slotted(nile-icon:not([color])),
342
342
  .button--standard.button--primary:active:not(.button--disabled)
343
343
  ::slotted(nile-icon:not([color])) {
344
- --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
344
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
345
345
  }
346
346
  .button--standard.button--primary.button--disabled ::slotted(nile-icon:not([color])) {
347
- --nile-svg-fill: var(--nile-colors-button-primary-disabled-text) !important;
347
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
348
348
  }
349
349
 
350
350
  /* Secondary Variant */
351
351
  .button--standard.button--secondary ::slotted(nile-icon:not([color])) {
352
- --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
352
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
353
353
  }
354
354
  .button--standard.button--secondary:hover:not(.button--disabled)
355
355
  ::slotted(nile-icon:not([color])),
356
356
  .button--standard.button--secondary:active:not(.button--disabled)
357
357
  ::slotted(nile-icon:not([color])) {
358
- --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
358
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
359
359
  }
360
360
  .button--standard.button--secondary.button--disabled ::slotted(nile-icon:not([color])) {
361
- --nile-svg-fill: var(
362
- --nile-colors-button-secondary-disabled-text
363
- ) !important;
361
+ --nile-svg-fill: var(--nile-colors-dark-500) !important;
364
362
  }
365
363
 
366
364
  /* Tertiary Variant */
367
365
  .button--standard.button--tertiary ::slotted(nile-icon:not([color])) {
368
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
366
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
369
367
  }
370
368
  .button--standard.button--tertiary:hover:not(.button--disabled)
371
369
  ::slotted(nile-icon:not([color])),
372
370
  .button--standard.button--tertiary:active:not(.button--disabled)
373
371
  ::slotted(nile-icon:not([color])) {
374
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
372
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
375
373
  }
376
374
  .button--standard.button--tertiary.button--disabled ::slotted(nile-icon:not([color])) {
377
- --nile-svg-fill: var(
378
- --nile-colors-button-tertiary-disabled-text
379
- ) !important;
375
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
380
376
  }
381
377
 
382
378
  /* Ghost Variant */
383
379
  .button--standard.button--ghost ::slotted(nile-icon:not([color])) {
384
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
380
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
385
381
  }
386
382
  .button--standard.button--ghost:hover:not(.button--disabled)
387
383
  ::slotted(nile-icon:not([color])),
388
384
  .button--standard.button--ghost:active:not(.button--disabled)
389
385
  ::slotted(nile-icon:not([color])) {
390
- --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
386
+ --nile-svg-fill: var(--nile-colors-dark-900) !important;
391
387
  }
392
388
  .button--standard.button--ghost ::slotted(nile-icon:not([color])) {
393
- --nile-svg-fill: var(
394
- --nile-colors-button-tertiary-disabled-text
395
- ) !important;
389
+ --nile-svg-fill: var(--nile-colors-neutral-500) !important;
396
390
  }
397
391
 
398
392
  /* Caution Variant */
399
393
  .button--standard.button--caution ::slotted(nile-icon:not([color])) {
400
- --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
394
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
401
395
  }
402
396
  .button--standard.button--caution:hover:not(.button--disabled)
403
397
  ::slotted(nile-icon:not([color])),
404
398
  .button--standard.button--caution:active:not(.button--disabled)
405
399
  ::slotted(nile-icon:not([color])) {
406
- --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
400
+ --nile-svg-fill: var(--nile-colors-white-base) !important;
407
401
  }
408
402
  .button--standard.button--caution.button--disabled ::slotted(nile-icon:not([color])) {
409
- --nile-svg-fill: var(--nile-colors-button-caution-disabled-text) !important;
403
+ --nile-svg-fill: var(--nile-colors-neutral-400) !important;
410
404
  }
411
405
 
412
406
  /* destructive */
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-a0ed956d.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-checkbox.cjs.js","tslib","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,i,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture003CjsJs){e=_fixture003CjsJs.f;t=_fixture003CjsJs.a;i=_fixture003CjsJs.o;},function(_litStaticHtmlJs){c=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileCheckboxCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileCheckboxCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileCheckbox",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(c(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("toggles checked state on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(c(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context3.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be["true"],s.click(),t(i.checked).to.be["false"];case 5:case"end":return _context3.stop();}},_callee2);}))),it("emits nile-change event on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var s,o,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(c(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context4.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.click();});_context4.next=7;return i(s,"valueChange");case 7:n=_context4.sent;t(n.detail.checked).to.be["true"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("handles focus and blur events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s,o,n,a;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(c(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context5.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.focus();});_context5.next=7;return i(s,"focus");case 7:n=_context5.sent;t(n).to.exist,setTimeout(function(){return o.blur();});_context5.next=11;return i(s,"blur");case 11:a=_context5.sent;t(a).to.exist;case 13:case"end":return _context5.stop();}},_callee4);}))),it("handles indeterminate state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(c(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context6.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be["true"];i.checked=!0;i.indeterminate=!1;_context6.next=9;return i.updateComplete;case 9:t(s.indeterminate).to.be["false"];t(s.checked).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it("reflects properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(c(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n "]))));case 2:i=_context7.sent;t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error");case 4:case"end":return _context7.stop();}},_callee6);}))),it("displays help text when showHelpText is true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var i,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(c(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context8.sent;i.showHelpText=!0;_context8.next=6;return i.updateComplete;case 6:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;case 8:case"end":return _context8.stop();}},_callee7);}))),it("updates host class based on helpText",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var i;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(c(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context9.sent;i.helpText="test-help";_context9.next=6;return i.updateComplete;case 6:t(i.classList.contains("full-width")).to.be["true"];i.helpText="";_context9.next=10;return i.updateComplete;case 10:t(i.classList.contains("full-width")).to.be["false"];case 11:case"end":return _context9.stop();}},_callee8);}))),it("emits custom events on connected and disconnected",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,c,s,o,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);_context10.next=4;return c;case 4:s=_context10.sent;t(s).to.exist;o=i(e,"nile-destroy");document.body.removeChild(e);_context10.next=10;return o;case 10:n=_context10.sent;t(n).to.exist;case 12:case"end":return _context10.stop();}},_callee9);}))),it("handles required attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var i;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(c(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-checkbox required></nile-checkbox>"]))));case 2:i=_context11.sent.shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be["true"];case 4:case"end":return _context11.stop();}},_callee10);}))),it("simulates click using click method",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var i;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return e(c(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context12.sent;i.click(),t(i.checked).to.be["true"];case 4:case"end":return _context12.stop();}},_callee11);}))),it("sets and removes focus using focus and blur methods",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var s,o,n;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return e(c(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context13.sent;setTimeout(function(){return s.focus();});_context13.next=6;return i(s,"focus");case 6:o=_context13.sent;t(o).to.exist,setTimeout(function(){return s.blur();});_context13.next=10;return i(s,"blur");case 10:n=_context13.sent;t(n).to.exist;case 12:case"end":return _context13.stop();}},_callee12);}))),it("reflects checked attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var i;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return e(c(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-checkbox checked></nile-checkbox>"]))));case 2:i=_context14.sent;t(i.checked).to.be["true"];case 4:case"end":return _context14.stop();}},_callee13);}))),it("reflects indeterminate attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var i;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return e(c(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context15.sent;t(i.indeterminate).to.be["true"];case 4:case"end":return _context15.stop();}},_callee14);}))),it("associates form using form attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var i;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return e(c(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n "]))));case 2:i=_context16.sent.querySelector("nile-checkbox");t(i).to.not.be["null"],t(i.getAttribute("form")).to.equal("test-form");case 4:case"end":return _context16.stop();}},_callee15);}))),it("displays and hides help text correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee16(){var i,s;return _regeneratorRuntime().wrap(function _callee16$(_context17){while(1)switch(_context17.prev=_context17.next){case 0:_context17.next=2;return e(c(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context17.sent;t(i.showHelpText).to.be["false"];i.showHelpText=!0;_context17.next=7;return i.updateComplete;case 7:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist;i.showHelpText=!1;_context17.next=12;return i.updateComplete;case 12:s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.be.exist;case 14:case"end":return _context17.stop();}},_callee16);})));});}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-a0ed956d.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-checkbox.cjs.js","tslib","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,t,i,c,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture003CjsJs){e=_fixture003CjsJs.f;t=_fixture003CjsJs.a;i=_fixture003CjsJs.o;},function(_litStaticHtmlJs){c=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileCheckboxCjsJs){},function(_tslib){},function(_litDecoratorsJs){},function(_nileCheckboxCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalDefaultValueCjsJs){},function(_litDirectivesIfDefinedJs){},function(_litDirectivesLiveJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){describe("NileCheckbox",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(c(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context2.sent;t(i).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("toggles checked state on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(c(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context3.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');s.click(),t(i.checked).to.be["true"],s.click(),t(i.checked).to.be["false"];case 5:case"end":return _context3.stop();}},_callee2);}))),it("emits nile-change event on click",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var s,o,n;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(c(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context4.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.click();});_context4.next=7;return i(s,"valueChange");case 7:n=_context4.sent;t(n.detail.checked).to.be["true"];case 9:case"end":return _context4.stop();}},_callee3);}))),it("handles focus and blur events",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var s,o,n,a;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(c(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context5.sent;o=s.shadowRoot.querySelector('input[type="checkbox"]');setTimeout(function(){return o.focus();});_context5.next=7;return i(s,"focus");case 7:n=_context5.sent;t(n).to.exist,setTimeout(function(){return o.blur();});_context5.next=11;return i(s,"blur");case 11:a=_context5.sent;t(a).to.exist;case 13:case"end":return _context5.stop();}},_callee4);}))),it("handles indeterminate state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,s;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(c(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context6.sent;s=i.shadowRoot.querySelector('input[type="checkbox"]');t(s.indeterminate).to.be["true"];i.checked=!0;i.indeterminate=!1;_context6.next=9;return i.updateComplete;case 9:t(s.indeterminate).to.be["false"];t(s.checked).to.be["true"];case 11:case"end":return _context6.stop();}},_callee5);}))),it("reflects properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(c(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n "]))));case 2:i=_context7.sent;t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error");case 4:case"end":return _context7.stop();}},_callee6);}))),it("displays help text when showHelpText is true",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _i$shadowRoot;var i,s;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(c(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-checkbox help-text=\"test-help\"></nile-checkbox>"]))));case 2:i=_context8.sent;i.showHelpText=!0;_context8.next=6;return i.updateComplete;case 6:s=(_i$shadowRoot=i.shadowRoot)===null||_i$shadowRoot===void 0||(_i$shadowRoot=_i$shadowRoot.querySelector("nile-form-help-text"))===null||_i$shadowRoot===void 0||(_i$shadowRoot=_i$shadowRoot.textContent)===null||_i$shadowRoot===void 0?void 0:_i$shadowRoot.trim();t(s).to.equal("test-help");case 8:case"end":return _context8.stop();}},_callee7);}))),it("updates host class based on helpText",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var i;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(c(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context9.sent;i.helpText="test-help";_context9.next=6;return i.updateComplete;case 6:t(i.classList.contains("full-width")).to.be["true"];i.helpText="";_context9.next=10;return i.updateComplete;case 10:t(i.classList.contains("full-width")).to.be["false"];case 11:case"end":return _context9.stop();}},_callee8);}))),it("emits custom events on connected and disconnected",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var e,c,s,o,n;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);_context10.next=4;return c;case 4:s=_context10.sent;t(s).to.exist;o=i(e,"nile-destroy");document.body.removeChild(e);_context10.next=10;return o;case 10:n=_context10.sent;t(n).to.exist;case 12:case"end":return _context10.stop();}},_callee9);}))),it("handles required attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){var i;return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return e(c(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-checkbox required></nile-checkbox>"]))));case 2:i=_context11.sent.shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be["true"];case 4:case"end":return _context11.stop();}},_callee10);}))),it("simulates click using click method",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){var i;return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:_context12.next=2;return e(c(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:i=_context12.sent;i.click(),t(i.checked).to.be["true"];case 4:case"end":return _context12.stop();}},_callee11);}))),it("sets and removes focus using focus and blur methods",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){var s,o,n;return _regeneratorRuntime().wrap(function _callee12$(_context13){while(1)switch(_context13.prev=_context13.next){case 0:_context13.next=2;return e(c(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["<nile-checkbox></nile-checkbox>"]))));case 2:s=_context13.sent;setTimeout(function(){return s.focus();});_context13.next=6;return i(s,"focus");case 6:o=_context13.sent;t(o).to.exist,setTimeout(function(){return s.blur();});_context13.next=10;return i(s,"blur");case 10:n=_context13.sent;t(n).to.exist;case 12:case"end":return _context13.stop();}},_callee12);}))),it("reflects checked attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var i;return _regeneratorRuntime().wrap(function _callee13$(_context14){while(1)switch(_context14.prev=_context14.next){case 0:_context14.next=2;return e(c(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["<nile-checkbox checked></nile-checkbox>"]))));case 2:i=_context14.sent;t(i.checked).to.be["true"];case 4:case"end":return _context14.stop();}},_callee13);}))),it("reflects indeterminate attribute to property",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var i;return _regeneratorRuntime().wrap(function _callee14$(_context15){while(1)switch(_context15.prev=_context15.next){case 0:_context15.next=2;return e(c(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["<nile-checkbox indeterminate></nile-checkbox>"]))));case 2:i=_context15.sent;t(i.indeterminate).to.be["true"];case 4:case"end":return _context15.stop();}},_callee14);}))),it("associates form using form attribute",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee15(){var i;return _regeneratorRuntime().wrap(function _callee15$(_context16){while(1)switch(_context16.prev=_context16.next){case 0:_context16.next=2;return e(c(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n "]))));case 2:i=_context16.sent.querySelector("nile-checkbox");t(i).to.not.be["null"],t(i.getAttribute("form")).to.equal("test-form");case 4:case"end":return _context16.stop();}},_callee15);})));});}};});
2
2
  //# sourceMappingURL=nile-checkbox.test.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.test.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent } from '@open-wc/testing';\nimport './nile-checkbox';\nimport { NileCheckbox } from './nile-checkbox';\n\ndescribe('NileCheckbox', () => {\n it('renders correctly with default properties', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n expect(el).shadowDom.to.equalSnapshot();\n });\n\n it('toggles checked state on click', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n input.click();\n expect(el.checked).to.be.true;\n input.click();\n expect(el.checked).to.be.false;\n });\n\n it('emits nile-change event on click', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n setTimeout(() => input.click());\n const event = await oneEvent(el, 'valueChange');\n expect(event.detail.checked).to.be.true;\n });\n\n it('handles focus and blur events', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n // Focus the input and wait for the focus event\n setTimeout(() => input.focus());\n const focusEvent = await oneEvent(el, 'focus');\n expect(focusEvent).to.exist;\n\n // Blur the input and wait for the blur event\n setTimeout(() => input.blur());\n const blurEvent = await oneEvent(el, 'blur');\n expect(blurEvent).to.exist;\n });\n\n it('handles indeterminate state', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox indeterminate></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n expect(input.indeterminate).to.be.true;\n\n el.checked = true;\n el.indeterminate = false;\n await el.updateComplete;\n expect(input.indeterminate).to.be.false;\n expect(input.checked).to.be.true;\n });\n\n it('reflects properties to attributes', async () => {\n const el = await fixture<NileCheckbox>(html`\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n `);\n\n expect(el.getAttribute('name')).to.equal('test-name');\n expect(el.getAttribute('title')).to.equal('test-title');\n expect(el.getAttribute('disabled')).to.equal('');\n expect(el.getAttribute('required')).to.equal('');\n expect(el.getAttribute('label')).to.equal('test-label');\n expect(el.getAttribute('sub-label')).to.equal('test-sublabel');\n expect(el.getAttribute('help-text')).to.equal('test-help');\n expect(el.getAttribute('error-message')).to.equal('test-error');\n });\n\n it('displays help text when showHelpText is true', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text=\"test-help\"></nile-checkbox>`);\n el.showHelpText = true;\n await el.updateComplete;\n\n const helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');\n expect(helpTextIcon).to.exist;\n });\n\n it('updates host class based on helpText', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n el.helpText = 'test-help';\n await el.updateComplete;\n\n expect(el.classList.contains('full-width')).to.be.true;\n\n el.helpText = '';\n await el.updateComplete;\n\n expect(el.classList.contains('full-width')).to.be.false;\n });\n\n it('emits custom events on connected and disconnected', async () => {\n const el = document.createElement('nile-checkbox');\n\n // Wait for the connected event\n const initEventPromise = oneEvent(el, 'nile-init');\n document.body.appendChild(el);\n const initEvent = await initEventPromise;\n expect(initEvent).to.exist;\n\n // Wait for the disconnected event\n const destroyEventPromise = oneEvent(el, 'nile-destroy');\n document.body.removeChild(el);\n const destroyEvent = await destroyEventPromise;\n expect(destroyEvent).to.exist;\n });\n\n it('handles required attribute', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox required></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n expect(input.required).to.be.true;\n });\n\n it('simulates click using click method', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n el.click();\n expect(el.checked).to.be.true;\n });\n\n it('sets and removes focus using focus and blur methods', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n\n // Call the focus method and wait for the focus event\n setTimeout(() => el.focus());\n const focusEvent = await oneEvent(el, 'focus');\n expect(focusEvent).to.exist;\n\n // Call the blur method and wait for the blur event\n setTimeout(() => el.blur());\n const blurEvent = await oneEvent(el, 'blur');\n expect(blurEvent).to.exist;\n });\n\n it('reflects checked attribute to property', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox checked></nile-checkbox>`);\n expect(el.checked).to.be.true;\n });\n\n it('reflects indeterminate attribute to property', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox indeterminate></nile-checkbox>`);\n expect(el.indeterminate).to.be.true;\n });\n\n it('associates form using form attribute', async () => {\n const el = await fixture(html`\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n `);\n const checkbox = el.querySelector('nile-checkbox') as NileCheckbox;\n expect(checkbox).to.not.be.null;\n expect(checkbox.getAttribute('form')).to.equal('test-form');\n });\n\n it('displays and hides help text correctly', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text=\"test-help\"></nile-checkbox>`);\n\n // Initially, help text should not be shown\n expect(el.showHelpText).to.be.false;\n\n // Show the help text\n el.showHelpText = true;\n await el.updateComplete;\n let helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');\n expect(helpTextIcon).to.exist;\n\n // Hide the help text\n el.showHelpText = false;\n await el.updateComplete;\n helpTextIcon = el.shadowRoot!.querySelector('.checkbox__helptext-icon');\n expect(helpTextIcon).to.be.exist;\n });\n});\n\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","shadowDom","to","equalSnapshot","_context2","stop","_callee","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject2","input","shadowRoot","querySelector","click","checked","be","_context3","_callee2","_templateObject3","setTimeout","_context4","next","oneEvent","event","detail","_callee3","_templateObject4","focus","_context5","focusEvent","exist","blur","blurEvent","_callee4","_templateObject5","indeterminate","updateComplete","false","true","_context6","_callee5","_templateObject6","getAttribute","equal","_context7","_callee6","_templateObject7","showHelpText","helpTextIcon","_context8","_callee7","_templateObject8","helpText","classList","contains","_context9","_callee8","document","createElement","initEventPromise","body","appendChild","_context10","initEvent","destroyEventPromise","removeChild","destroyEvent","_callee9","_templateObject9","required","_context11","_callee10","_templateObject10","_context12","_callee11","_templateObject11","_context13","_callee12","_templateObject12","_context14","_callee13","_templateObject13","_context15","_callee14","_templateObject14","checkbox","not","null","_context16","_callee15","_templateObject15","_context17","_callee16"],"mappings":"i6TAIAA,QAAS,CAAA,cAAA,CAAgB,UACvBC,CAAAA,EAAAA,CAAG,mHAA6CC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SAC7BC,CAAAA,CAAsBC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,gDAArCC,iBACNC,CAAOD,CAAAA,CAAAA,CAAAA,CAAIE,UAAUC,EAAGC,CAAAA,aAAAA,CAAAA,CAAe,yBAAAC,SAAA,CAAAC,IAAA,MAAAC,OAAA,OAGzCb,EAAG,CAAA,gCAAA,cAAAc,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAAkCf,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SAClBC,CAAAA,EAAsBC,CAAI,CAAAc,gBAAA,GAAAA,gBAAA,CAAAZ,sBAAA,uCAAA,CAAA,QAArCC,CAAAA,CAAAA,SAAAA,CAAAA,IAAAA,CACAY,CAAQZ,CAAAA,CAAAA,CAAGa,WAAYC,aAAc,CAAA,w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C1BC,CAAAA,CAAAA,CAAsBC,CAAI,CAAA+F,iBAAA,GAAAA,iBAAA,CAAA7F,sBAAA,+DAAA,CAAA,QAArCC,CAAWJ,CAAAA,UAAAA,CAAAA,IAAAA,CAGjBK,CAAOD,CAAAA,CAAAA,CAAGiD,YAAc9C,CAAAA,CAAAA,EAAAA,CAAGc,EAAGsB,SAAAA,CAG9BvC,CAAGiD,CAAAA,YAAAA,CAAAA,CAAe,CACZjD,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,CAAAA,CAAAA,CAAGsC,cACT,QAAIY,CAAelD,CAAAA,CAAAA,CAAGa,UAAYC,CAAAA,aAAAA,CAAc,0BAChDb,CAAAA,CAAAA,CAAAA,CAAOiD,CAAc/C,CAAAA,CAAAA,EAAAA,CAAG6B,KAGxBhC,CAAAA,CAAAA,CAAGiD,YAAe,CAAA,CAAA,CAAA,CAAA4C,UAAA,CAAAtE,IAAA,UACZvB,CAAAA,CAAGsC,CAAAA,cAAAA,SACTY,CAAelD,CAAAA,CAAAA,CAAGa,UAAYC,CAAAA,aAAAA,CAAc,0BAC5Cb,CAAAA,CAAAA,CAAAA,CAAOiD,CAAc/C,CAAAA,CAAAA,EAAAA,CAAGc,EAAGe,CAAAA,KAAK,0BAAA6D,UAAA,CAAAvF,IAAA,MAAAwF,SAAA,GAChC,EAAA,CAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"nile-checkbox.test.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent } from '@open-wc/testing';\nimport './nile-checkbox';\nimport { NileCheckbox } from './nile-checkbox';\n\nfunction wait(ms:number=50000) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\ndescribe('NileCheckbox', () => {\n it('renders correctly with default properties', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n expect(el).shadowDom.to.equalSnapshot();\n });\n\n it('toggles checked state on click', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n input.click();\n expect(el.checked).to.be.true;\n input.click();\n expect(el.checked).to.be.false;\n });\n\n it('emits nile-change event on click', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n setTimeout(() => input.click());\n const event = await oneEvent(el, 'valueChange');\n expect(event.detail.checked).to.be.true;\n });\n\n it('handles focus and blur events', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n // Focus the input and wait for the focus event\n setTimeout(() => input.focus());\n const focusEvent = await oneEvent(el, 'focus');\n expect(focusEvent).to.exist;\n\n // Blur the input and wait for the blur event\n setTimeout(() => input.blur());\n const blurEvent = await oneEvent(el, 'blur');\n expect(blurEvent).to.exist;\n });\n\n it('handles indeterminate state', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox indeterminate></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n expect(input.indeterminate).to.be.true;\n\n el.checked = true;\n el.indeterminate = false;\n await el.updateComplete;\n expect(input.indeterminate).to.be.false;\n expect(input.checked).to.be.true;\n });\n\n it('reflects properties to attributes', async () => {\n const el = await fixture<NileCheckbox>(html`\n <nile-checkbox\n name=\"test-name\"\n title=\"test-title\"\n disabled\n required\n label=\"test-label\"\n sub-label=\"test-sublabel\"\n help-text=\"test-help\"\n error-message=\"test-error\"\n ></nile-checkbox>\n `);\n\n expect(el.getAttribute('name')).to.equal('test-name');\n expect(el.getAttribute('title')).to.equal('test-title');\n expect(el.getAttribute('disabled')).to.equal('');\n expect(el.getAttribute('required')).to.equal('');\n expect(el.getAttribute('label')).to.equal('test-label');\n expect(el.getAttribute('sub-label')).to.equal('test-sublabel');\n expect(el.getAttribute('help-text')).to.equal('test-help');\n expect(el.getAttribute('error-message')).to.equal('test-error');\n });\n\n it('displays help text when showHelpText is true', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox help-text=\"test-help\"></nile-checkbox>`);\n el.showHelpText = true;\n await el.updateComplete;\n const helpText=el.shadowRoot?.querySelector(\"nile-form-help-text\")?.textContent?.trim()\n expect(helpText).to.equal('test-help')\n });\n\n it('updates host class based on helpText', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n el.helpText = 'test-help';\n await el.updateComplete;\n\n expect(el.classList.contains('full-width')).to.be.true;\n\n el.helpText = '';\n await el.updateComplete;\n\n expect(el.classList.contains('full-width')).to.be.false;\n });\n\n it('emits custom events on connected and disconnected', async () => {\n const el = document.createElement('nile-checkbox');\n\n // Wait for the connected event\n const initEventPromise = oneEvent(el, 'nile-init');\n document.body.appendChild(el);\n const initEvent = await initEventPromise;\n expect(initEvent).to.exist;\n\n // Wait for the disconnected event\n const destroyEventPromise = oneEvent(el, 'nile-destroy');\n document.body.removeChild(el);\n const destroyEvent = await destroyEventPromise;\n expect(destroyEvent).to.exist;\n });\n\n it('handles required attribute', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox required></nile-checkbox>`);\n const input = el.shadowRoot!.querySelector('input[type=\"checkbox\"]')! as HTMLInputElement;\n\n expect(input.required).to.be.true;\n });\n\n it('simulates click using click method', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n el.click();\n expect(el.checked).to.be.true;\n });\n\n it('sets and removes focus using focus and blur methods', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox></nile-checkbox>`);\n\n // Call the focus method and wait for the focus event\n setTimeout(() => el.focus());\n const focusEvent = await oneEvent(el, 'focus');\n expect(focusEvent).to.exist;\n\n // Call the blur method and wait for the blur event\n setTimeout(() => el.blur());\n const blurEvent = await oneEvent(el, 'blur');\n expect(blurEvent).to.exist;\n });\n\n it('reflects checked attribute to property', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox checked></nile-checkbox>`);\n expect(el.checked).to.be.true;\n });\n\n it('reflects indeterminate attribute to property', async () => {\n const el = await fixture<NileCheckbox>(html`<nile-checkbox indeterminate></nile-checkbox>`);\n expect(el.indeterminate).to.be.true;\n });\n\n it('associates form using form attribute', async () => {\n const el = await fixture(html`\n <div>\n <form id=\"test-form\"></form>\n <nile-checkbox form=\"test-form\"></nile-checkbox>\n </div>\n `);\n const checkbox = el.querySelector('nile-checkbox') as NileCheckbox;\n expect(checkbox).to.not.be.null;\n expect(checkbox.getAttribute('form')).to.equal('test-form');\n });\n\n});\n\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","shadowDom","to","equalSnapshot","_context2","stop","_callee","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject2","input","shadowRoot","querySelector","click","checked","be","_context3","_callee2","_templateObject3","setTimeout","_context4","next","oneEvent","event","detail","_callee3","_templateObject4","focus","_context5","focusEvent","exist","blur","blurEvent","_callee4","_templateObject5","indeterminate","updateComplete","false","true","_context6","_callee5","_templateObject6","getAttribute","equal","_context7","_callee6","_templateObject7","showHelpText","_context8","helpText","_i$shadowRoot","textContent","trim","_callee7","_templateObject8","classList","contains","_context9","_callee8","document","createElement","initEventPromise","body","appendChild","_context10","initEvent","destroyEventPromise","removeChild","destroyEvent","_callee9","_templateObject9","required","_context11","_callee10","_templateObject10","_context12","_callee11","_templateObject11","_context13","_callee12","_templateObject12","_context14","_callee13","_templateObject13","_context15","_callee14","_templateObject14","checkbox","not","null","_context16","_callee15"],"mappings":"+4TAQAA,QAAS,CAAA,cAAA,CAAgB,UACvBC,CAAAA,EAAAA,CAAG,mHAA6CC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAA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A,cAAAA,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,UAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,WAAAA,UAAAA,iBAAAA,UAAAA,CAAAA,IAAAA,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,UAAAA,CAAAA,IAAAA,SACxBC,CAAAA,EAAQC,CAAI,CAAA2F,iBAAA,GAAAA,iBAAA,CAAAzF,sBAAA,6IAMTe,CAAAA,QAAd2E,CAAAA,CAAAA,UAAAA,CAAAA,IAAAA,CAAc3E,aAAAA,CAAc,eAClCb,EAAAA,CAAAA,CAAOwF,CAAUtF,CAAAA,CAAAA,EAAAA,CAAGuF,IAAIzE,EAAG0E,QAAAA,CAC3B1F,CAAOwF,CAAAA,CAAAA,CAAS7C,YAAa,CAAA,MAAA,CAAA,CAAA,CAASzC,EAAG0C,CAAAA,KAAAA,CAAM,YAAY,yBAAA+C,UAAA,CAAAtF,IAAA,MAAAuF,SAAA,GAC3D,EAAA,CAAA,EAAA,CAAA,CAAA"}
@@ -9,9 +9,9 @@ import{f as e,a as t,o as i}from"../fixture-8aa86bc9.esm.js";import{html as c}fr
9
9
  help-text="test-help"
10
10
  error-message="test-error"
11
11
  ></nile-checkbox>
12
- `);t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error")})),it("displays help text when showHelpText is true",(async()=>{const i=await e(c`<nile-checkbox help-text="test-help"></nile-checkbox>`);i.showHelpText=!0,await i.updateComplete;const s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist})),it("updates host class based on helpText",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);i.helpText="test-help",await i.updateComplete,t(i.classList.contains("full-width")).to.be.true,i.helpText="",await i.updateComplete,t(i.classList.contains("full-width")).to.be.false})),it("emits custom events on connected and disconnected",(async()=>{const e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);const s=await c;t(s).to.exist;const o=i(e,"nile-destroy");document.body.removeChild(e);const n=await o;t(n).to.exist})),it("handles required attribute",(async()=>{const i=(await e(c`<nile-checkbox required></nile-checkbox>`)).shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be.true})),it("simulates click using click method",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);i.click(),t(i.checked).to.be.true})),it("sets and removes focus using focus and blur methods",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`);setTimeout((()=>s.focus()));const o=await i(s,"focus");t(o).to.exist,setTimeout((()=>s.blur()));const n=await i(s,"blur");t(n).to.exist})),it("reflects checked attribute to property",(async()=>{const i=await e(c`<nile-checkbox checked></nile-checkbox>`);t(i.checked).to.be.true})),it("reflects indeterminate attribute to property",(async()=>{const i=await e(c`<nile-checkbox indeterminate></nile-checkbox>`);t(i.indeterminate).to.be.true})),it("associates form using form attribute",(async()=>{const i=(await e(c`
12
+ `);t(i.getAttribute("name")).to.equal("test-name"),t(i.getAttribute("title")).to.equal("test-title"),t(i.getAttribute("disabled")).to.equal(""),t(i.getAttribute("required")).to.equal(""),t(i.getAttribute("label")).to.equal("test-label"),t(i.getAttribute("sub-label")).to.equal("test-sublabel"),t(i.getAttribute("help-text")).to.equal("test-help"),t(i.getAttribute("error-message")).to.equal("test-error")})),it("displays help text when showHelpText is true",(async()=>{const i=await e(c`<nile-checkbox help-text="test-help"></nile-checkbox>`);i.showHelpText=!0,await i.updateComplete;const s=i.shadowRoot?.querySelector("nile-form-help-text")?.textContent?.trim();t(s).to.equal("test-help")})),it("updates host class based on helpText",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);i.helpText="test-help",await i.updateComplete,t(i.classList.contains("full-width")).to.be.true,i.helpText="",await i.updateComplete,t(i.classList.contains("full-width")).to.be.false})),it("emits custom events on connected and disconnected",(async()=>{const e=document.createElement("nile-checkbox"),c=i(e,"nile-init");document.body.appendChild(e);const s=await c;t(s).to.exist;const o=i(e,"nile-destroy");document.body.removeChild(e);const n=await o;t(n).to.exist})),it("handles required attribute",(async()=>{const i=(await e(c`<nile-checkbox required></nile-checkbox>`)).shadowRoot.querySelector('input[type="checkbox"]');t(i.required).to.be.true})),it("simulates click using click method",(async()=>{const i=await e(c`<nile-checkbox></nile-checkbox>`);i.click(),t(i.checked).to.be.true})),it("sets and removes focus using focus and blur methods",(async()=>{const s=await e(c`<nile-checkbox></nile-checkbox>`);setTimeout((()=>s.focus()));const o=await i(s,"focus");t(o).to.exist,setTimeout((()=>s.blur()));const n=await i(s,"blur");t(n).to.exist})),it("reflects checked attribute to property",(async()=>{const i=await e(c`<nile-checkbox checked></nile-checkbox>`);t(i.checked).to.be.true})),it("reflects indeterminate attribute to property",(async()=>{const i=await e(c`<nile-checkbox indeterminate></nile-checkbox>`);t(i.indeterminate).to.be.true})),it("associates form using form attribute",(async()=>{const i=(await e(c`
13
13
  <div>
14
14
  <form id="test-form"></form>
15
15
  <nile-checkbox form="test-form"></nile-checkbox>
16
16
  </div>
17
- `)).querySelector("nile-checkbox");t(i).to.not.be.null,t(i.getAttribute("form")).to.equal("test-form")})),it("displays and hides help text correctly",(async()=>{const i=await e(c`<nile-checkbox help-text="test-help"></nile-checkbox>`);t(i.showHelpText).to.be.false,i.showHelpText=!0,await i.updateComplete;let s=i.shadowRoot.querySelector(".checkbox__helptext-icon");t(s).to.exist,i.showHelpText=!1,await i.updateComplete,s=i.shadowRoot.querySelector(".checkbox__helptext-icon"),t(s).to.be.exist}))}));
17
+ `)).querySelector("nile-checkbox");t(i).to.not.be.null,t(i.getAttribute("form")).to.equal("test-form")}))}));