@meistrari/tela-build 1.55.0 → 1.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -285,6 +285,15 @@ function handleDeleteSearchValue() {
285
285
  }
286
286
  }
287
287
 
288
+ function selectAll() {
289
+ if (selectedValues.value.length === filteredOptions.value.length) {
290
+ emit('update:modelValue', [])
291
+ }
292
+ else {
293
+ emit('update:modelValue', filteredOptions.value.map(option => option.value))
294
+ }
295
+ }
296
+
288
297
  function handleSearchKeydown(e: KeyboardEvent) {
289
298
  if ((e.metaKey || e.ctrlKey) && e.key === 'Backspace') {
290
299
  e.preventDefault()
@@ -473,6 +482,16 @@ function handleSearchKeydown(e: KeyboardEvent) {
473
482
  >
474
483
  </div>
475
484
 
485
+ <div v-if="filteredOptions.length > 0" flex items-center justify-between pl-10px pr-10px py-4px border-b="0.5px border">
486
+ <span body-12-semibold text-gray-700>{{ t('common.itemCount', { count: filteredOptions.length }) }}</span>
487
+
488
+ <TelaButton variant="ghost" size="sm" class="rounded-lg" @click="selectAll">
489
+ <span body-12-regular text-gray-900 underline>
490
+ {{ selectedValues.length !== filteredOptions.length ? t('common.selectAll') : t('common.clearAll') }}
491
+ </span>
492
+ </TelaButton>
493
+ </div>
494
+
476
495
  <SelectViewport class="p-4px" w-full>
477
496
  <div
478
497
  v-if="!hasAvailableOptions"
@@ -543,6 +562,14 @@ function handleSearchKeydown(e: KeyboardEvent) {
543
562
  "
544
563
  @click="toggleSelection(option.value)"
545
564
  >
565
+ <TelaCheckbox
566
+ :model-value="isSelected(option.value)"
567
+ :disabled="readOnly"
568
+ cursor-pointer
569
+ mr-12px
570
+ min-w-16px
571
+ pointer-events-none
572
+ />
546
573
  <div
547
574
  v-if="option.icon" mr-12px rounded-4px w-40px h-40px flex items-center justify-center
548
575
  b="0.5px gray-200"
@@ -568,9 +595,6 @@ function handleSearchKeydown(e: KeyboardEvent) {
568
595
  </span>
569
596
  </div>
570
597
  <div flex-auto />
571
- <span v-if="isSelected(option.value)" class="relative flex h-3.5 w-3.5 items-center justify-center">
572
- <TelaIcon name="i-ph-check" size="14px" color="gray-500" />
573
- </span>
574
598
  </button>
575
599
  </SelectItem>
576
600
  </SelectGroup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/tela-build",
3
- "version": "1.55.0",
3
+ "version": "1.55.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "app.config.ts",