@bexis2/bexis2-core-ui 0.4.18 → 0.4.20
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.
- package/README.md +16 -8
- package/dist/components/CodeEditor/CodeEditor.svelte +4 -0
- package/dist/components/Facets/Facets.svelte +57 -20
- package/dist/components/Facets/Facets.svelte.d.ts +5 -1
- package/dist/components/Facets/ShowMore.svelte +31 -18
- package/dist/components/Facets/ShowMore.svelte.d.ts +2 -2
- package/dist/components/File/FileUploader.svelte +1 -1
- package/dist/components/Table/ColumnsMenu.svelte +5 -0
- package/dist/components/Table/TableContent.svelte +32 -16
- package/dist/components/Table/TableFilter.svelte +12 -0
- package/dist/components/Table/TableFilterServer.svelte +13 -1
- package/dist/components/Table/TablePagination.svelte +11 -6
- package/dist/components/Table/TablePaginationServer.svelte +8 -0
- package/dist/components/form/Checkbox.svelte +1 -1
- package/dist/components/form/CheckboxKvPList.svelte +2 -1
- package/dist/components/form/CheckboxList.svelte +2 -2
- package/dist/components/form/DateInput.svelte +1 -1
- package/dist/components/form/DropdownKvP.svelte +1 -1
- package/dist/components/form/InputContainer.svelte +7 -1
- package/dist/components/form/MultiSelect.svelte +100 -106
- package/dist/components/form/NumberInput.svelte +1 -1
- package/dist/components/form/TextArea.svelte +1 -1
- package/dist/components/form/TextInput.svelte +1 -1
- package/dist/components/page/Alert.svelte +1 -1
- package/dist/components/page/BackToTop.svelte +1 -1
- package/dist/components/page/Docs.svelte +1 -1
- package/dist/components/page/GoToTop.svelte +1 -0
- package/dist/components/page/HelpPopUp.svelte +1 -0
- package/dist/components/page/Page.svelte +14 -19
- package/dist/components/page/menu/MenuSublist.svelte +7 -5
- package/package.json +114 -114
- package/src/lib/components/CodeEditor/CodeEditor.svelte +4 -0
- package/src/lib/components/Facets/Facets.svelte +74 -25
- package/src/lib/components/Facets/ShowMore.svelte +33 -19
- package/src/lib/components/File/FileUploader.svelte +1 -1
- package/src/lib/components/Table/ColumnsMenu.svelte +5 -0
- package/src/lib/components/Table/TableContent.svelte +32 -16
- package/src/lib/components/Table/TableFilter.svelte +12 -0
- package/src/lib/components/Table/TableFilterServer.svelte +13 -1
- package/src/lib/components/Table/TablePagination.svelte +11 -6
- package/src/lib/components/Table/TablePaginationServer.svelte +8 -0
- package/src/lib/components/form/Checkbox.svelte +1 -1
- package/src/lib/components/form/CheckboxKvPList.svelte +2 -1
- package/src/lib/components/form/CheckboxList.svelte +2 -2
- package/src/lib/components/form/DateInput.svelte +1 -1
- package/src/lib/components/form/DropdownKvP.svelte +1 -1
- package/src/lib/components/form/InputContainer.svelte +7 -1
- package/src/lib/components/form/MultiSelect.svelte +100 -106
- package/src/lib/components/form/NumberInput.svelte +1 -1
- package/src/lib/components/form/TextArea.svelte +1 -1
- package/src/lib/components/form/TextInput.svelte +1 -1
- package/src/lib/components/page/Alert.svelte +1 -1
- package/src/lib/components/page/BackToTop.svelte +1 -1
- package/src/lib/components/page/Docs.svelte +1 -1
- package/src/lib/components/page/GoToTop.svelte +1 -0
- package/src/lib/components/page/HelpPopUp.svelte +1 -0
- package/src/lib/components/page/Page.svelte +15 -20
- package/src/lib/components/page/menu/MenuSublist.svelte +11 -8
|
@@ -165,9 +165,9 @@
|
|
|
165
165
|
header: header ?? key,
|
|
166
166
|
accessor: accessor,
|
|
167
167
|
// Render the cell with the provided component, or use the toStringFn if provided, or just use the value
|
|
168
|
-
cell: ({ value, row }) => {
|
|
168
|
+
cell: ({ value, row, column }) => {
|
|
169
169
|
return renderComponent
|
|
170
|
-
? createRender(renderComponent, { value, row, dispatchFn: actionDispatcher })
|
|
170
|
+
? createRender(renderComponent, { value, row, column, dispatchFn: actionDispatcher })
|
|
171
171
|
: toStringFn
|
|
172
172
|
? toStringFn(value)
|
|
173
173
|
: value;
|
|
@@ -390,10 +390,11 @@
|
|
|
390
390
|
class="flex gap-2"
|
|
391
391
|
on:submit|preventDefault={() => {
|
|
392
392
|
if (serverSide && !sendModel) {
|
|
393
|
-
throw new Error('Server-side configuration is missing');
|
|
394
|
-
} else {
|
|
395
|
-
sendModel.q = searchValue;
|
|
396
|
-
}
|
|
393
|
+
throw new Error('Server-side configuration is missing');
|
|
394
|
+
} else {
|
|
395
|
+
sendModel.q = searchValue;
|
|
396
|
+
}
|
|
397
|
+
|
|
397
398
|
$filterValue = searchValue;
|
|
398
399
|
}}
|
|
399
400
|
>
|
|
@@ -401,21 +402,22 @@ sendModel.q = searchValue;
|
|
|
401
402
|
<input
|
|
402
403
|
class="input p-2 border border-primary-500"
|
|
403
404
|
type="text"
|
|
405
|
+
title="Search within all table rows"
|
|
404
406
|
bind:value={searchValue}
|
|
405
407
|
placeholder="Search rows..."
|
|
406
408
|
id="{tableId}-search"
|
|
407
409
|
/><button
|
|
408
410
|
type="reset"
|
|
411
|
+
title="Clear search"
|
|
409
412
|
id="{tableId}-searchReset"
|
|
410
413
|
class="absolute right-3 items-center"
|
|
414
|
+
aria-label="Clear search"
|
|
411
415
|
on:click|preventDefault={() => {
|
|
412
416
|
if (serverSide && !sendModel) {
|
|
413
|
-
throw new Error('Server-side configuration is missing');
|
|
414
|
-
} else {
|
|
415
|
-
sendModel.q = '';
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
$filterValue = searchValue;
|
|
417
|
+
throw new Error('Server-side configuration is missing');
|
|
418
|
+
} else {
|
|
419
|
+
sendModel.q = '';
|
|
420
|
+
}
|
|
419
421
|
|
|
420
422
|
searchValue = '';
|
|
421
423
|
$filterValue = '';
|
|
@@ -424,14 +426,15 @@ sendModel.q = '';
|
|
|
424
426
|
</div>
|
|
425
427
|
<button
|
|
426
428
|
type="submit"
|
|
429
|
+
title="Search"
|
|
427
430
|
id="{tableId}-searchSubmit"
|
|
428
431
|
class="btn variant-filled-primary"
|
|
429
432
|
on:click|preventDefault={() => {
|
|
430
433
|
if (serverSide && !sendModel) {
|
|
431
|
-
throw new Error('Server-side configuration is missing');
|
|
432
|
-
} else {
|
|
433
|
-
sendModel.q = searchValue;
|
|
434
|
-
}
|
|
434
|
+
throw new Error('Server-side configuration is missing');
|
|
435
|
+
} else {
|
|
436
|
+
sendModel.q = searchValue;
|
|
437
|
+
}
|
|
435
438
|
|
|
436
439
|
$filterValue = searchValue;
|
|
437
440
|
}}>Search</button
|
|
@@ -449,6 +452,7 @@ sendModel.q = searchValue;
|
|
|
449
452
|
{#if toggle}
|
|
450
453
|
<SlideToggle
|
|
451
454
|
name="slider-label"
|
|
455
|
+
label="Fit to screen"
|
|
452
456
|
active="bg-primary-500"
|
|
453
457
|
size="sm"
|
|
454
458
|
checked={fitToScreen}
|
|
@@ -462,6 +466,7 @@ sendModel.q = searchValue;
|
|
|
462
466
|
{#if resizable !== 'none'}
|
|
463
467
|
<button
|
|
464
468
|
type="button"
|
|
469
|
+
title="Reset column and row sizing"
|
|
465
470
|
class="btn btn-sm variant-filled-primary rounded-full order-last"
|
|
466
471
|
on:click|preventDefault={() =>
|
|
467
472
|
resetResize($headerRows, $pageRows, tableId, columns, resizable)}
|
|
@@ -471,6 +476,7 @@ sendModel.q = searchValue;
|
|
|
471
476
|
{#if exportable}
|
|
472
477
|
<button
|
|
473
478
|
type="button"
|
|
479
|
+
title="Export table data as CSV"
|
|
474
480
|
class="btn btn-sm variant-filled-primary rounded-full order-last"
|
|
475
481
|
on:click|preventDefault={() => exportAsCsv(tableId, $exportedData)}
|
|
476
482
|
>Export as CSV</button
|
|
@@ -487,6 +493,7 @@ sendModel.q = searchValue;
|
|
|
487
493
|
{...$tableAttrs}
|
|
488
494
|
class="table table-auto table-compact bg-tertiary-500/30 dark:bg-tertiary-900/10 overflow-clip"
|
|
489
495
|
id="{tableId}-table"
|
|
496
|
+
title="Table"
|
|
490
497
|
>
|
|
491
498
|
<!-- If table height is provided, making the top row sticky -->
|
|
492
499
|
<thead class={height != null && $pageRows.length > 0 ? `sticky top-0` : ''}>
|
|
@@ -512,6 +519,8 @@ sendModel.q = searchValue;
|
|
|
512
519
|
<div class="flex gap-1 whitespace-pre-wrap">
|
|
513
520
|
<!-- Adding sorting config and styling -->
|
|
514
521
|
<span
|
|
522
|
+
role="button"
|
|
523
|
+
tabindex="0"
|
|
515
524
|
class:underline={props.sort.order}
|
|
516
525
|
class:normal-case={cell.id !== cell.label}
|
|
517
526
|
class:cursor-pointer={!props.sort.disabled}
|
|
@@ -574,6 +583,13 @@ sendModel.q = searchValue;
|
|
|
574
583
|
{/each}
|
|
575
584
|
</tbody>
|
|
576
585
|
</table>
|
|
586
|
+
{#if $pageRows.length === 0}
|
|
587
|
+
<div
|
|
588
|
+
class="p-8 flex items-center justify-center bg-tertiary-500/30 dark:bg-tertiary-900/10"
|
|
589
|
+
>
|
|
590
|
+
No rows available
|
|
591
|
+
</div>
|
|
592
|
+
{/if}
|
|
577
593
|
</div>
|
|
578
594
|
</div>
|
|
579
595
|
{:else}
|
|
@@ -240,6 +240,7 @@
|
|
|
240
240
|
type="button"
|
|
241
241
|
use:popup={popupFeatured}
|
|
242
242
|
id="{popupId}-button"
|
|
243
|
+
aria-label="Open filter menu for column {id}"
|
|
243
244
|
>
|
|
244
245
|
<Fa icon={faFilter} size="12" />
|
|
245
246
|
</button>
|
|
@@ -249,6 +250,7 @@
|
|
|
249
250
|
<button
|
|
250
251
|
class="btn variant-filled-primary btn-sm"
|
|
251
252
|
type="button"
|
|
253
|
+
aria-label="Clear Filters"
|
|
252
254
|
on:click|preventDefault={() => {
|
|
253
255
|
// Set the defaults when cleared
|
|
254
256
|
clearFilters();
|
|
@@ -273,6 +275,7 @@
|
|
|
273
275
|
{#each options[type] as option (option)}
|
|
274
276
|
<option
|
|
275
277
|
value={option.value}
|
|
278
|
+
aria-label={option.label}
|
|
276
279
|
selected={dropdown.option === option.value}
|
|
277
280
|
disabled={Object.keys($filters[id]).includes(option.value) &&
|
|
278
281
|
dropdown.option !== option.value}>{option.label}</option
|
|
@@ -281,7 +284,10 @@
|
|
|
281
284
|
</select>
|
|
282
285
|
{#if dropdowns.length > 1}
|
|
283
286
|
<div
|
|
287
|
+
role="button"
|
|
288
|
+
tabindex="0"
|
|
284
289
|
class="btn variant-filled-warning btn-sm h-full"
|
|
290
|
+
aria-label="Remove filter"
|
|
285
291
|
on:click|preventDefault={() => removeFilter(dropdown.option)}
|
|
286
292
|
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
|
|
287
293
|
>
|
|
@@ -296,6 +302,7 @@
|
|
|
296
302
|
class="input p-1 border border-primary-500"
|
|
297
303
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
298
304
|
bind:value={dropdown.value}
|
|
305
|
+
aria-label="Filter value"
|
|
299
306
|
/>
|
|
300
307
|
{:else}
|
|
301
308
|
<input
|
|
@@ -303,6 +310,7 @@
|
|
|
303
310
|
class="input p-1 border border-primary-500"
|
|
304
311
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
305
312
|
bind:value={dropdown.formValue}
|
|
313
|
+
aria-label="Filter value"
|
|
306
314
|
/>
|
|
307
315
|
{/if}
|
|
308
316
|
</div>
|
|
@@ -315,12 +323,15 @@
|
|
|
315
323
|
{#if remainingFilters.length}
|
|
316
324
|
<div
|
|
317
325
|
class="btn variant-filled-secondary btn-sm cursor-pointer"
|
|
326
|
+
role="button"
|
|
327
|
+
tabindex="0"
|
|
318
328
|
on:click|stopPropagation={() => {
|
|
319
329
|
addFilter(remainingFilters[0].value, undefined);
|
|
320
330
|
}}
|
|
321
331
|
on:keydown|stopPropagation={() => {
|
|
322
332
|
addFilter(remainingFilters[0].value, undefined);
|
|
323
333
|
}}
|
|
334
|
+
aria-label="Add filter"
|
|
324
335
|
>
|
|
325
336
|
<div class="flex gap-1 items-center"><Fa icon={faPlus} />Add Filter</div>
|
|
326
337
|
</div>
|
|
@@ -328,6 +339,7 @@
|
|
|
328
339
|
<button
|
|
329
340
|
class="btn variant-filled-primary btn-sm"
|
|
330
341
|
type="button"
|
|
342
|
+
aria-label="Apply filters"
|
|
331
343
|
on:click|preventDefault={() => {
|
|
332
344
|
$pageIndex = 0;
|
|
333
345
|
$filterValue = $filters[id];
|
|
@@ -233,6 +233,7 @@
|
|
|
233
233
|
type="button"
|
|
234
234
|
use:popup={popupFeatured}
|
|
235
235
|
id="{popupId}-button"
|
|
236
|
+
aria-label="Open filter menu for column {id}"
|
|
236
237
|
>
|
|
237
238
|
<Fa icon={faFilter} size="12" />
|
|
238
239
|
</button>
|
|
@@ -242,6 +243,7 @@
|
|
|
242
243
|
<button
|
|
243
244
|
class="btn variant-filled-primary btn-sm"
|
|
244
245
|
type="button"
|
|
246
|
+
aria-label="Clear Filters"
|
|
245
247
|
on:click|preventDefault={() => {
|
|
246
248
|
// Set the defaults when cleared
|
|
247
249
|
clearFilters();
|
|
@@ -264,6 +266,7 @@
|
|
|
264
266
|
{#each options[type] as option (option)}
|
|
265
267
|
<option
|
|
266
268
|
value={option.value}
|
|
269
|
+
aria-label={option.label}
|
|
267
270
|
selected={dropdown.option === option.value}
|
|
268
271
|
disabled={Object.keys($filters[id]).includes(option.value) &&
|
|
269
272
|
dropdown.option !== option.value}>{option.label}</option
|
|
@@ -272,10 +275,13 @@
|
|
|
272
275
|
</select>
|
|
273
276
|
{#if dropdowns.length > 1}
|
|
274
277
|
<div
|
|
278
|
+
role="button"
|
|
279
|
+
tabindex="0"
|
|
275
280
|
class="btn variant-filled-warning btn-sm h-full"
|
|
276
281
|
on:click|preventDefault={() => removeFilter(dropdown.option)}
|
|
277
282
|
on:keydown|preventDefault={() => removeFilter(dropdown.option)}
|
|
278
|
-
|
|
283
|
+
aria-label="Remove filter"
|
|
284
|
+
>
|
|
279
285
|
<Fa icon={faXmark} />
|
|
280
286
|
</div>
|
|
281
287
|
{/if}
|
|
@@ -294,6 +300,7 @@
|
|
|
294
300
|
class="input p-1 border border-primary-500"
|
|
295
301
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
296
302
|
bind:value={dropdown.value}
|
|
303
|
+
aria-label="Filter value"
|
|
297
304
|
/>
|
|
298
305
|
{:else}
|
|
299
306
|
<input
|
|
@@ -301,6 +308,7 @@
|
|
|
301
308
|
class="input p-1 border border-primary-500"
|
|
302
309
|
on:input={(e) => valueChangeHandler(e, index)}
|
|
303
310
|
bind:value={dropdown.value}
|
|
311
|
+
aria-label="Filter value"
|
|
304
312
|
/>
|
|
305
313
|
{/if}
|
|
306
314
|
</div>
|
|
@@ -313,6 +321,9 @@
|
|
|
313
321
|
{#if remainingFilters.length}
|
|
314
322
|
<div
|
|
315
323
|
class="btn variant-filled-secondary btn-sm cursor-pointer"
|
|
324
|
+
aria-label="Add filter"
|
|
325
|
+
role="button"
|
|
326
|
+
tabindex="0"
|
|
316
327
|
on:click|stopPropagation={() => {
|
|
317
328
|
addFilter(remainingFilters[0].value, undefined);
|
|
318
329
|
}}
|
|
@@ -326,6 +337,7 @@
|
|
|
326
337
|
<button
|
|
327
338
|
class="btn variant-filled-primary btn-sm"
|
|
328
339
|
type="button"
|
|
340
|
+
aria-label="Apply filters"
|
|
329
341
|
on:click|preventDefault={applyFilters}>Apply</button
|
|
330
342
|
>
|
|
331
343
|
</div>
|
|
@@ -62,7 +62,11 @@
|
|
|
62
62
|
{/each}
|
|
63
63
|
</select> -->
|
|
64
64
|
|
|
65
|
-
<button
|
|
65
|
+
<button
|
|
66
|
+
aria-label="Open menu to select number of items per page"
|
|
67
|
+
class="btn variant-filled-primary w-20 justify-between"
|
|
68
|
+
use:popup={pageSizePopup}
|
|
69
|
+
>
|
|
66
70
|
<span class="capitalize font-semibold">{pageSizeDropdownValue}</span>
|
|
67
71
|
<Fa icon={faChevronDown} size="xs" />
|
|
68
72
|
</button>
|
|
@@ -82,6 +86,7 @@
|
|
|
82
86
|
<button
|
|
83
87
|
class="btn btn-sm variant-filled-primary"
|
|
84
88
|
on:click|preventDefault={goToFirstPage}
|
|
89
|
+
aria-label="Go to first page"
|
|
85
90
|
disabled={goToFirstPageDisabled}
|
|
86
91
|
id="{id}-first"
|
|
87
92
|
>
|
|
@@ -90,6 +95,7 @@
|
|
|
90
95
|
<button
|
|
91
96
|
class="btn btn-sm variant-filled-primary"
|
|
92
97
|
id="{id}-previous"
|
|
98
|
+
aria-label="Go to previous page"
|
|
93
99
|
on:click|preventDefault={goToPreviousPage}
|
|
94
100
|
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
|
|
95
101
|
>
|
|
@@ -98,17 +104,20 @@
|
|
|
98
104
|
class="input border border-primary-500 rounded flex w-24"
|
|
99
105
|
value={$pageIndex + 1}
|
|
100
106
|
max={$pageCount}
|
|
107
|
+
aria-label="Current page"
|
|
101
108
|
min={1}
|
|
102
109
|
on:change={handleChange}
|
|
103
110
|
/>
|
|
104
111
|
<button
|
|
105
112
|
class="btn btn-sm variant-filled-primary"
|
|
106
113
|
id="{id}-next"
|
|
114
|
+
aria-label="Go to next page"
|
|
107
115
|
on:click|preventDefault={goToNextPage}
|
|
108
116
|
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
|
|
109
117
|
>
|
|
110
118
|
<button
|
|
111
119
|
class="btn btn-sm variant-filled-primary"
|
|
120
|
+
aria-label="Go to last page"
|
|
112
121
|
id="{id}-last"
|
|
113
122
|
on:click|preventDefault={goToLastPage}
|
|
114
123
|
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button
|
|
@@ -117,11 +126,7 @@
|
|
|
117
126
|
<div class="flex justify-end items-center">
|
|
118
127
|
<span class="text-sm text-gray-500">
|
|
119
128
|
{#if $pageCount > 0}
|
|
120
|
-
{
|
|
121
|
-
1 page
|
|
122
|
-
{:else}
|
|
123
|
-
{$pageCount} pages
|
|
124
|
-
{/if}
|
|
129
|
+
Page {$pageIndex + 1} of {$pageCount}
|
|
125
130
|
{:else}
|
|
126
131
|
No pages
|
|
127
132
|
{/if}
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
<select
|
|
74
74
|
name="pageSize"
|
|
75
75
|
id="{id}-pageSize"
|
|
76
|
+
aria-label="Open menu to select number of items per page"
|
|
76
77
|
class="select variant-filled-primary w-min font-bold"
|
|
77
78
|
bind:value={$pageSize}
|
|
78
79
|
>
|
|
@@ -84,21 +85,26 @@
|
|
|
84
85
|
<div class="flex justify-center gap-1">
|
|
85
86
|
<button
|
|
86
87
|
class="btn btn-sm variant-filled-primary"
|
|
88
|
+
title="Go to first page"
|
|
87
89
|
on:click|preventDefault={() => goTo('first')}
|
|
88
90
|
disabled={goToFirstPageDisabled}
|
|
91
|
+
aria-label="Go to first page"
|
|
89
92
|
id="{id}-first"
|
|
90
93
|
>
|
|
91
94
|
<Fa icon={faAnglesLeft} /></button
|
|
92
95
|
>
|
|
93
96
|
<button
|
|
94
97
|
class="btn btn-sm variant-filled-primary"
|
|
98
|
+
title="Go to previous page"
|
|
95
99
|
id="{id}-previous"
|
|
100
|
+
aria-label="Go to previous page"
|
|
96
101
|
on:click|preventDefault={() => goTo('previous')}
|
|
97
102
|
disabled={goToPreviousPageDisabled}><Fa icon={faAngleLeft} /></button
|
|
98
103
|
>
|
|
99
104
|
<input
|
|
100
105
|
type="number"
|
|
101
106
|
class="input border border-primary-500 rounded flex w-24"
|
|
107
|
+
aria-label="Current page"
|
|
102
108
|
value={$pageIndex + 1}
|
|
103
109
|
max={pageCount}
|
|
104
110
|
min={1}
|
|
@@ -108,11 +114,13 @@
|
|
|
108
114
|
class="btn btn-sm variant-filled-primary"
|
|
109
115
|
id="{id}-next"
|
|
110
116
|
on:click|preventDefault={() => goTo('next')}
|
|
117
|
+
aria-label="Go to next page"
|
|
111
118
|
disabled={goToNextPageDisabled}><Fa icon={faAngleRight} /></button
|
|
112
119
|
>
|
|
113
120
|
<button
|
|
114
121
|
class="btn btn-sm variant-filled-primary"
|
|
115
122
|
id="{id}-last"
|
|
123
|
+
aria-label="Go to last page"
|
|
116
124
|
on:click|preventDefault={() => goTo('last')}
|
|
117
125
|
disabled={goToLastPageDisabled}><Fa icon={faAnglesRight} /></button
|
|
118
126
|
>
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
17
17
|
{#each source as item}
|
|
18
|
-
<label class="flex items-center space-x-2" for={key}>
|
|
18
|
+
<label class="flex items-center space-x-2" for={item.key}>
|
|
19
19
|
<input
|
|
20
20
|
class="checkbox"
|
|
21
21
|
type="checkbox"
|
|
22
22
|
bind:group={target}
|
|
23
23
|
checked={item.key}
|
|
24
24
|
value={item.key}
|
|
25
|
+
id={item.key}
|
|
25
26
|
/>
|
|
26
27
|
<p>{item.value}</p>
|
|
27
28
|
</label>
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
<InputContainer label={title} {feedback} {required}>
|
|
15
15
|
{#each source as item}
|
|
16
|
-
<label class="flex items-center space-x-2" for={
|
|
17
|
-
<input class="checkbox" type="checkbox" bind:group={target} value={item} />
|
|
16
|
+
<label class="flex items-center space-x-2" for={item}>
|
|
17
|
+
<input class="checkbox" type="checkbox" bind:group={target} value={item} id={item}/>
|
|
18
18
|
<p>{item}</p>
|
|
19
19
|
</label>
|
|
20
20
|
{/each}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<InputContainer {id} {label} {feedback} {required} {help}>
|
|
16
16
|
<input
|
|
17
17
|
{id}
|
|
18
|
-
class="input variant-form-material"
|
|
18
|
+
class="input variant-form-material bg-zinc-50 dark:bg-zinc-700 placeholder:text-gray-400"
|
|
19
19
|
type="date"
|
|
20
20
|
class:input-success={valid}
|
|
21
21
|
class:input-error={invalid}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<InputContainer {id} label={title} {feedback} {required} {help}>
|
|
40
40
|
<select
|
|
41
41
|
{id}
|
|
42
|
-
class="select variant-form-material"
|
|
42
|
+
class="select variant-form-material dark:bg-zinc-700 bg-zinc-50 placeholder:text-gray-400"
|
|
43
43
|
class:input-success={valid}
|
|
44
44
|
class:input-error={invalid}
|
|
45
45
|
bind:value={selected}
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
function onMouseOut() {}
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div
|
|
19
|
+
<div
|
|
20
|
+
id="{id}-container"
|
|
21
|
+
on:mouseover={onMouseOver}
|
|
22
|
+
on:focus={onMouseOver}
|
|
23
|
+
on:mouseout={onMouseOut}
|
|
24
|
+
on:blur={onMouseOut}
|
|
25
|
+
>
|
|
20
26
|
<label class="label">
|
|
21
27
|
<span
|
|
22
28
|
>{label}
|