@prolibu-suite/cobalt-core 0.10.2 → 0.10.4
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/custom-elements.json +44 -22
- package/dist/cjs/co-chip_2.cjs.entry.js +21 -2
- package/dist/cjs/co-number-field.cjs.entry.js +25 -4
- package/dist/cjs/co-overlay.cjs.entry.js +34 -3
- package/dist/cjs/co-popover.cjs.entry.js +16 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/index-MDAnKsze.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-07416e31.entry.js +1 -0
- package/dist/cobalt/p-1d3a79af.entry.js +1 -0
- package/dist/cobalt/p-8e05b979.entry.js +1 -0
- package/dist/cobalt/{p-410bee4d.entry.js → p-b0762fd8.entry.js} +1 -1
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-combobox/co-combobox.js +1 -1
- package/dist/collection/components/co-command-search/co-command-search.js +1 -1
- package/dist/collection/components/co-data-table/co-data-table.js +1 -1
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.js +25 -4
- package/dist/collection/components/co-option-list/co-option-list.js +39 -3
- package/dist/collection/components/co-overlay/backdropDismiss.js +12 -0
- package/dist/collection/components/co-overlay/co-overlay.js +22 -3
- package/dist/collection/components/co-popover/co-popover.js +17 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-ref-field/co-ref-field.js +4 -4
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +1 -1
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-color-picker.js +1 -1
- package/dist/components/co-combobox.js +1 -1
- package/dist/components/co-command-search.js +1 -1
- package/dist/components/co-date-picker.js +1 -1
- package/dist/components/co-date-range-picker.js +1 -1
- package/dist/components/co-date-range.js +1 -1
- package/dist/components/co-date-time-picker.js +1 -1
- package/dist/components/co-drawer.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-menu.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-number-field.js +1 -1
- package/dist/components/co-option-list.js +1 -1
- package/dist/components/co-overlay.js +1 -1
- package/dist/components/co-popover.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/{p-DrTRB8Ev.js → p-B56LX2SH.js} +1 -1
- package/dist/components/p-BJh68Jqe.js +1 -0
- package/dist/components/{p-DRP8D9ro.js → p-D9T7zKeL.js} +1 -1
- package/dist/components/p-Dh8ffSjK.js +1 -0
- package/dist/components/{p-DxtNejr2.js → p-P4HlMBlL.js} +1 -1
- package/dist/esm/co-chip_2.entry.js +21 -2
- package/dist/esm/co-number-field.entry.js +25 -4
- package/dist/esm/co-overlay.entry.js +34 -3
- package/dist/esm/co-popover.entry.js +16 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/index-DH5lfRNj.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/co-number-field/co-number-field.d.ts +7 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +7 -0
- package/dist/types/components/co-overlay/backdropDismiss.d.ts +10 -0
- package/dist/types/components/co-overlay/co-overlay.d.ts +4 -0
- package/dist/types/components/co-popover/co-popover.d.ts +2 -0
- package/dist/types/components.d.ts +4 -3
- package/package.json +4 -4
- package/dist/cobalt/p-2a30c143.entry.js +0 -1
- package/dist/cobalt/p-39dc4ec8.entry.js +0 -1
- package/dist/cobalt/p-be34e447.entry.js +0 -1
- package/dist/components/p-CBTGN490.js +0 -1
- package/dist/components/p-D7Lhxz7L.js +0 -1
package/custom-elements.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-09-
|
|
2
|
+
"timestamp": "2026-09-23T22:04:03",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.4",
|
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
"references": {
|
|
1318
1318
|
"AutocompleteOption": {
|
|
1319
1319
|
"location": "local",
|
|
1320
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
1320
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-autocomplete/co-autocomplete.tsx",
|
|
1321
1321
|
"id": "src/components/co-autocomplete/co-autocomplete.tsx::AutocompleteOption"
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
@@ -2116,7 +2116,7 @@
|
|
|
2116
2116
|
"references": {
|
|
2117
2117
|
"CoAvatarGroupItem": {
|
|
2118
2118
|
"location": "local",
|
|
2119
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
2119
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-avatar-group/co-avatar-group.tsx",
|
|
2120
2120
|
"id": "src/components/co-avatar-group/co-avatar-group.tsx::CoAvatarGroupItem"
|
|
2121
2121
|
}
|
|
2122
2122
|
}
|
|
@@ -6507,7 +6507,7 @@
|
|
|
6507
6507
|
"references": {
|
|
6508
6508
|
"CheckboxOption": {
|
|
6509
6509
|
"location": "local",
|
|
6510
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
6510
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-checkbox-group/co-checkbox-group.tsx",
|
|
6511
6511
|
"id": "src/components/co-checkbox-group/co-checkbox-group.tsx::CheckboxOption"
|
|
6512
6512
|
}
|
|
6513
6513
|
}
|
|
@@ -8844,7 +8844,7 @@
|
|
|
8844
8844
|
"references": {
|
|
8845
8845
|
"ComboboxOption": {
|
|
8846
8846
|
"location": "local",
|
|
8847
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
8847
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-combobox/co-combobox.tsx",
|
|
8848
8848
|
"id": "src/components/co-combobox/co-combobox.tsx::ComboboxOption"
|
|
8849
8849
|
}
|
|
8850
8850
|
}
|
|
@@ -9519,7 +9519,7 @@
|
|
|
9519
9519
|
"references": {
|
|
9520
9520
|
"CommandItem": {
|
|
9521
9521
|
"location": "local",
|
|
9522
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
9522
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-command-search/co-command-search.tsx",
|
|
9523
9523
|
"id": "src/components/co-command-search/co-command-search.tsx::CommandItem"
|
|
9524
9524
|
}
|
|
9525
9525
|
}
|
|
@@ -9901,7 +9901,7 @@
|
|
|
9901
9901
|
"references": {
|
|
9902
9902
|
"CoDataTableColumn": {
|
|
9903
9903
|
"location": "local",
|
|
9904
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
9904
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-data-table/co-data-table.tsx",
|
|
9905
9905
|
"id": "src/components/co-data-table/co-data-table.tsx::CoDataTableColumn"
|
|
9906
9906
|
}
|
|
9907
9907
|
}
|
|
@@ -14022,7 +14022,7 @@
|
|
|
14022
14022
|
"references": {
|
|
14023
14023
|
"DateRangeValue": {
|
|
14024
14024
|
"location": "local",
|
|
14025
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
14025
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
14026
14026
|
"id": "src/components/co-date-range-picker/co-date-range-picker.tsx::DateRangeValue"
|
|
14027
14027
|
}
|
|
14028
14028
|
}
|
|
@@ -14098,7 +14098,7 @@
|
|
|
14098
14098
|
"references": {
|
|
14099
14099
|
"DateRangeValue": {
|
|
14100
14100
|
"location": "local",
|
|
14101
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
14101
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
14102
14102
|
"id": "src/components/co-date-range-picker/co-date-range-picker.tsx::DateRangeValue"
|
|
14103
14103
|
}
|
|
14104
14104
|
}
|
|
@@ -25318,6 +25318,28 @@
|
|
|
25318
25318
|
}
|
|
25319
25319
|
],
|
|
25320
25320
|
"methods": [
|
|
25321
|
+
{
|
|
25322
|
+
"name": "clearSearch",
|
|
25323
|
+
"returns": {
|
|
25324
|
+
"type": "Promise<void>",
|
|
25325
|
+
"docs": ""
|
|
25326
|
+
},
|
|
25327
|
+
"complexType": {
|
|
25328
|
+
"signature": "() => Promise<void>",
|
|
25329
|
+
"parameters": [],
|
|
25330
|
+
"references": {
|
|
25331
|
+
"Promise": {
|
|
25332
|
+
"location": "global",
|
|
25333
|
+
"id": "global::Promise"
|
|
25334
|
+
}
|
|
25335
|
+
},
|
|
25336
|
+
"return": "Promise<void>"
|
|
25337
|
+
},
|
|
25338
|
+
"signature": "clearSearch() => Promise<void>",
|
|
25339
|
+
"parameters": [],
|
|
25340
|
+
"docs": "Vacía el buscador (texto, término y cualquier coSearch en vuelo) y emite\n`coSearch('')`. Para hosts que reabren el panel (co-popover): el término\nvive ACÁ, así que sin esto la búsqueda anterior reaparecía con la lista del\nhost ya sin filtrar.",
|
|
25341
|
+
"docsTags": []
|
|
25342
|
+
},
|
|
25321
25343
|
{
|
|
25322
25344
|
"name": "focusSearch",
|
|
25323
25345
|
"returns": {
|
|
@@ -25423,7 +25445,7 @@
|
|
|
25423
25445
|
},
|
|
25424
25446
|
"signature": "snapshotOrder() => Promise<void>",
|
|
25425
25447
|
"parameters": [],
|
|
25426
|
-
"docs": "
|
|
25448
|
+
"docs": "",
|
|
25427
25449
|
"docsTags": []
|
|
25428
25450
|
}
|
|
25429
25451
|
],
|
|
@@ -26462,7 +26484,7 @@
|
|
|
26462
26484
|
"references": {
|
|
26463
26485
|
"PopoverPlacement": {
|
|
26464
26486
|
"location": "local",
|
|
26465
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
26487
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-popover/co-popover.tsx",
|
|
26466
26488
|
"id": "src/components/co-popover/co-popover.tsx::PopoverPlacement"
|
|
26467
26489
|
}
|
|
26468
26490
|
}
|
|
@@ -27570,7 +27592,7 @@
|
|
|
27570
27592
|
"references": {
|
|
27571
27593
|
"RadioOption": {
|
|
27572
27594
|
"location": "local",
|
|
27573
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
27595
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-radio-group/co-radio-group.tsx",
|
|
27574
27596
|
"id": "src/components/co-radio-group/co-radio-group.tsx::RadioOption"
|
|
27575
27597
|
}
|
|
27576
27598
|
}
|
|
@@ -29330,7 +29352,7 @@
|
|
|
29330
29352
|
},
|
|
29331
29353
|
"RefFieldOption": {
|
|
29332
29354
|
"location": "local",
|
|
29333
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
29355
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
29334
29356
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
29335
29357
|
}
|
|
29336
29358
|
},
|
|
@@ -29359,7 +29381,7 @@
|
|
|
29359
29381
|
"references": {
|
|
29360
29382
|
"RefFieldOption": {
|
|
29361
29383
|
"location": "local",
|
|
29362
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
29384
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
29363
29385
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
29364
29386
|
}
|
|
29365
29387
|
}
|
|
@@ -29449,7 +29471,7 @@
|
|
|
29449
29471
|
"references": {
|
|
29450
29472
|
"RefFieldOption": {
|
|
29451
29473
|
"location": "local",
|
|
29452
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
29474
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
29453
29475
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
29454
29476
|
}
|
|
29455
29477
|
}
|
|
@@ -29497,7 +29519,7 @@
|
|
|
29497
29519
|
"references": {
|
|
29498
29520
|
"RefFieldOption": {
|
|
29499
29521
|
"location": "local",
|
|
29500
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
29522
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
29501
29523
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
29502
29524
|
}
|
|
29503
29525
|
}
|
|
@@ -31615,7 +31637,7 @@
|
|
|
31615
31637
|
"references": {
|
|
31616
31638
|
"CoSegment": {
|
|
31617
31639
|
"location": "local",
|
|
31618
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
31640
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-segmented-bar/co-segmented-bar.tsx",
|
|
31619
31641
|
"id": "src/components/co-segmented-bar/co-segmented-bar.tsx::CoSegment"
|
|
31620
31642
|
}
|
|
31621
31643
|
}
|
|
@@ -32056,7 +32078,7 @@
|
|
|
32056
32078
|
"references": {
|
|
32057
32079
|
"SelectOption": {
|
|
32058
32080
|
"location": "local",
|
|
32059
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
32081
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-select/co-select.tsx",
|
|
32060
32082
|
"id": "src/components/co-select/co-select.tsx::SelectOption"
|
|
32061
32083
|
}
|
|
32062
32084
|
}
|
|
@@ -33055,7 +33077,7 @@
|
|
|
33055
33077
|
"references": {
|
|
33056
33078
|
"NavigateDetail": {
|
|
33057
33079
|
"location": "local",
|
|
33058
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
33080
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-sidebar-nav/co-sidebar-nav.tsx",
|
|
33059
33081
|
"id": "src/components/co-sidebar-nav/co-sidebar-nav.tsx::NavigateDetail"
|
|
33060
33082
|
}
|
|
33061
33083
|
}
|
|
@@ -35900,7 +35922,7 @@
|
|
|
35900
35922
|
"references": {
|
|
35901
35923
|
"CoToastActionsLayout": {
|
|
35902
35924
|
"location": "local",
|
|
35903
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
35925
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-toast/co-toast.tsx",
|
|
35904
35926
|
"id": "src/components/co-toast/co-toast.tsx::CoToastActionsLayout"
|
|
35905
35927
|
}
|
|
35906
35928
|
}
|
|
@@ -36076,7 +36098,7 @@
|
|
|
36076
36098
|
"references": {
|
|
36077
36099
|
"CoToastVariant": {
|
|
36078
36100
|
"location": "local",
|
|
36079
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
36101
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-toast/co-toast.tsx",
|
|
36080
36102
|
"id": "src/components/co-toast/co-toast.tsx::CoToastVariant"
|
|
36081
36103
|
}
|
|
36082
36104
|
}
|
|
@@ -37276,7 +37298,7 @@
|
|
|
37276
37298
|
"references": {
|
|
37277
37299
|
"TransferOption": {
|
|
37278
37300
|
"location": "local",
|
|
37279
|
-
"path": "/Users/agox/worktrees/cobalt-release-
|
|
37301
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-transfer-list/co-transfer-list.tsx",
|
|
37280
37302
|
"id": "src/components/co-transfer-list/co-transfer-list.tsx::TransferOption"
|
|
37281
37303
|
}
|
|
37282
37304
|
}
|
|
@@ -560,6 +560,25 @@ const CoOptionList = class {
|
|
|
560
560
|
}
|
|
561
561
|
// ── Métodos públicos ───────────────────────────────────────
|
|
562
562
|
/** Re-toma el snapshot selected-first. El host la llama al abrir su panel. */
|
|
563
|
+
/**
|
|
564
|
+
* Vacía el buscador (texto, término y cualquier coSearch en vuelo) y emite
|
|
565
|
+
* `coSearch('')`. Para hosts que reabren el panel (co-popover): el término
|
|
566
|
+
* vive ACÁ, así que sin esto la búsqueda anterior reaparecía con la lista del
|
|
567
|
+
* host ya sin filtrar.
|
|
568
|
+
*/
|
|
569
|
+
async clearSearch() {
|
|
570
|
+
if (this.debounceTimer)
|
|
571
|
+
clearTimeout(this.debounceTimer);
|
|
572
|
+
const hadTerm = !!this.term;
|
|
573
|
+
this.term = '';
|
|
574
|
+
this.activeIndex = -1;
|
|
575
|
+
this.lastFillLen = -1;
|
|
576
|
+
if (this.searchInputEl)
|
|
577
|
+
this.searchInputEl.value = '';
|
|
578
|
+
if (hadTerm)
|
|
579
|
+
this.takeSnapshot();
|
|
580
|
+
this.coSearch.emit('');
|
|
581
|
+
}
|
|
563
582
|
async snapshotOrder() {
|
|
564
583
|
this.takeSnapshot();
|
|
565
584
|
}
|
|
@@ -991,11 +1010,11 @@ const CoOptionList = class {
|
|
|
991
1010
|
const selectedIds = this.selectedIds;
|
|
992
1011
|
const { hasMore, remaining } = deriveMore(this.parsedItems.length, this.total, this.hasMore);
|
|
993
1012
|
const showClear = !!this.clearOptionLabel && selectedIds.length > 0;
|
|
994
|
-
return (index.h("div", { key: '
|
|
1013
|
+
return (index.h("div", { key: '93ec2aeb43a8f03e918eb068f683efdc93ca4db5', class: "co-option-list", onKeyDown: this.onRootKeyDown }, this.searchable && (index.h("div", { key: '617640a5909cbb82f37168f19978be213b0de9e0', class: "co-option-list__search", part: "search" }, index.h("co-icon", { key: '5e4c73aa4cb53d71e37b628936cb699eee656056', name: "magnifying-glass", size: 16 }), index.h("input", { key: 'f9497413b2b8d72899051ee0d02f34411936ae8c', class: "co-option-list__search-input", type: "text", placeholder: this.searchPlaceholder, value: this.term, onInput: this.onSearchInput, ref: (el) => (this.searchInputEl = el), role: "combobox", "aria-expanded": "true", "aria-autocomplete": "list" }))), index.h("div", { key: '06403a47d664e34d9fa0381affdb32b6d3b8eb56', class: "co-option-list__options", part: "options", role: "listbox", "aria-multiselectable": this.multiple ? 'true' : 'false', ref: (el) => (this.optionsEl = el), onScroll: this.onNativeScroll }, index.h("div", { key: 'aa17f1da0c46d9df52a0e3f1257ebf385c1ba945', class: "co-option-list__inner" }, showClear && (index.h("button", { key: 'e88eb444c5b94ebb800e4385515aa13542b2682f', class: "co-option-list__clear-row", type: "button", onClick: () => this.coClearSelection.emit() }, index.h("co-icon", { key: 'f1e332a87ba9d83fd2a22150939b135766731dc6', name: "x-circle", size: 14 }), index.h("span", { key: '26dca00c81dd651982955562fc3747aae88ba536' }, this.clearOptionLabel))), this.loading && items.length === 0 && (index.h("div", { key: '147ffc9fefed3524bfdd08ebfa36fb2e89ff4bb1', class: "co-option-list__loading" }, index.h("co-loader", { key: 'd4be765a87c8222b5747749fce7787788a4b0aca', size: "sm" }))), !this.loading && items.length === 0 && (index.h("div", { key: 'f20612fb93140fff5463e2992e9beec1ccb1fda9', class: "co-option-list__empty" }, index.h("co-icon", { key: 'aa68b5891aae21c513a069e920ddae0378d0a736', name: "magnifying-glass", size: 20 }), index.h("span", { key: '2fa339d51962a1898493ba78febcd90d3dbf9310' }, this.emptyMessage))), items.length > 0 && this.virtual
|
|
995
1014
|
? this.renderVirtual(items, selectedIds)
|
|
996
1015
|
: buildRows(items).map((row) => row.kind === 'header'
|
|
997
1016
|
? index.h("div", { class: "co-option-list__group", role: "presentation" }, row.label)
|
|
998
|
-
: this.renderRow(row.item, row.index, selectedIds)), this.loading && items.length > 0 && (index.h("div", { key: '
|
|
1017
|
+
: this.renderRow(row.item, row.index, selectedIds)), this.loading && items.length > 0 && (index.h("div", { key: '147e9bd6f1456284cd223e067b08979efb2cfe2c', class: "co-option-list__loading-more" }, index.h("co-loader", { key: '6e5b5181d803579ba3370a63849f0462a0685165', size: "sm" }))), !this.loading && hasMore && remaining > 0 && (index.h("div", { key: 'b90b8fce9a427371e3a7de24feb6fce6765dafe1', class: "co-option-list__more" }, remaining, " more results")))), index.h("slot", { key: '33d6641dc16188f572c70528d54553313b4f4afb', name: "footer" })));
|
|
999
1018
|
}
|
|
1000
1019
|
get el() { return index.getElement(this); }
|
|
1001
1020
|
static get watchers() { return {
|
|
@@ -156,6 +156,13 @@ const CoNumberField = class {
|
|
|
156
156
|
*/
|
|
157
157
|
this.hideControls = false;
|
|
158
158
|
this.focused = false;
|
|
159
|
+
/**
|
|
160
|
+
* El usuario VACIÓ un campo no-clearable (borró todo el texto). Sin clearable
|
|
161
|
+
* el vacío no se emite mientras se tipea (sigue editando), pero al salir
|
|
162
|
+
* commitea el piso (`min ?? 0`, handleBlur) — antes el blur repintaba el valor
|
|
163
|
+
* anterior y el borrado se perdía. Un campo que NACE vacío no levanta la marca.
|
|
164
|
+
*/
|
|
165
|
+
this.emptiedByUser = false;
|
|
159
166
|
// Stepping/clear son mutaciones PROGRAMÁTICAS: con el campo enfocado ni el
|
|
160
167
|
// @Watch (guard `focused`) ni el vdom (que copia el texto vivo) repintan, así
|
|
161
168
|
// que cada path escribe el input él mismo — si no, ArrowUp emite y persiste
|
|
@@ -197,6 +204,9 @@ const CoNumberField = class {
|
|
|
197
204
|
this.value = null;
|
|
198
205
|
this.coChange.emit(null);
|
|
199
206
|
}
|
|
207
|
+
else {
|
|
208
|
+
this.emptiedByUser = true;
|
|
209
|
+
}
|
|
200
210
|
return;
|
|
201
211
|
}
|
|
202
212
|
if (raw === '-')
|
|
@@ -238,6 +248,9 @@ const CoNumberField = class {
|
|
|
238
248
|
this.value = null;
|
|
239
249
|
this.coChange.emit(null);
|
|
240
250
|
}
|
|
251
|
+
else if (spliced === '') {
|
|
252
|
+
this.emptiedByUser = true;
|
|
253
|
+
}
|
|
241
254
|
return;
|
|
242
255
|
}
|
|
243
256
|
const num = parseFloat(spliced);
|
|
@@ -255,9 +268,13 @@ const CoNumberField = class {
|
|
|
255
268
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
256
269
|
};
|
|
257
270
|
this.handleBlur = () => {
|
|
271
|
+
var _a;
|
|
258
272
|
this.focused = false;
|
|
273
|
+
// Vaciado a mano sin clearable: commitea el piso (ver emptiedByUser).
|
|
274
|
+
if (this.emptiedByUser)
|
|
275
|
+
this.emitValue((_a = this.min) !== null && _a !== void 0 ? _a : 0);
|
|
259
276
|
// Re-clamp on blur, but keep an empty field empty.
|
|
260
|
-
if (!this.isEmpty)
|
|
277
|
+
else if (!this.isEmpty)
|
|
261
278
|
this.emitValue(this.value);
|
|
262
279
|
// Repinta el texto canónico: si el clamp devolvió el MISMO valor que ya
|
|
263
280
|
// tenía el prop (tipear "-20" sobre 0 con min 0), el @Watch no dispara y el
|
|
@@ -356,6 +373,7 @@ const CoNumberField = class {
|
|
|
356
373
|
return this.scaled ? n / 100 : n;
|
|
357
374
|
}
|
|
358
375
|
emitValue(next) {
|
|
376
|
+
this.emptiedByUser = false;
|
|
359
377
|
const clamped = this.clamp(next);
|
|
360
378
|
this.value = clamped;
|
|
361
379
|
this.coChange.emit(clamped);
|
|
@@ -384,6 +402,9 @@ const CoNumberField = class {
|
|
|
384
402
|
this.value = null;
|
|
385
403
|
this.coChange.emit(null);
|
|
386
404
|
}
|
|
405
|
+
else {
|
|
406
|
+
this.emptiedByUser = true;
|
|
407
|
+
}
|
|
387
408
|
return;
|
|
388
409
|
}
|
|
389
410
|
if (cleaned === '-')
|
|
@@ -405,18 +426,18 @@ const CoNumberField = class {
|
|
|
405
426
|
return this.scaled && !this.isEmpty ? '%' : null;
|
|
406
427
|
}
|
|
407
428
|
render() {
|
|
408
|
-
return (index.h("div", { key: '
|
|
429
|
+
return (index.h("div", { key: 'de7f3ae049ac5afcdf7d8a711c566b947fa7e151', class: {
|
|
409
430
|
'co-number-field': true,
|
|
410
431
|
'co-number-field--disabled': this.disabled,
|
|
411
432
|
'co-number-field--focused': this.focused,
|
|
412
433
|
[`co-number-field--${this.size}`]: true,
|
|
413
434
|
[`co-number-field--${this.status}`]: this.status !== 'default',
|
|
414
|
-
} }, (this.label || this.secondaryLabel) && (index.h("div", { key: '
|
|
435
|
+
} }, (this.label || this.secondaryLabel) && (index.h("div", { key: '3a6c96b2987f0502334a23048f8693745589e965', class: "co-number-field__labels" }, this.label && index.h("label", { key: '7e0c9c08e93f10f6e18143d038ea8810a0f156b8', class: "co-number-field__label" }, this.label, index.h(requiredMark.RequiredMark, { key: '88b110f3d59908c27d182533100220ff8a65bb66', required: this.required })), this.secondaryLabel && index.h("span", { key: '5dd9219f995fc59ce557c8ba2b5dfea2d7cb56ef', class: "co-number-field__secondary-label" }, this.secondaryLabel))), index.h("div", { key: 'e2079dd9e28daf904057106167cd368de906daba', class: "co-number-field__row", part: "row" }, !this.hideControls && (index.h("button", { key: '7ff22639f594e7a008f02962ed7782b84654b78e', class: "co-number-field__btn co-number-field__btn--minus", type: "button", tabIndex: -1, disabled: !this.canDecrement, onClick: this.handleDecrement, "aria-label": "Decrease" }, index.h("co-icon", { key: '61aafdc7c083ea39b9b65b87d267df63b91cb8d4', name: "minus", size: 16 }))), index.h("input", { key: 'e088482da6c9fe1e02abe5bcae2611f157be83ed', ref: el => (this.inputEl = el), class: "co-number-field__input", type: "text", inputMode: "decimal",
|
|
415
436
|
// Mismo guard `focused` que el @Watch: mientras el usuario edita, su
|
|
416
437
|
// texto manda. Sin esto, el re-render que dispara emitValue repinta
|
|
417
438
|
// el input desde el NÚMERO y se come el texto en construcción
|
|
418
439
|
// ("34,640.00" pegado quedaba "34,640"; un "12." perdería el punto).
|
|
419
|
-
value: this.focused && this.inputEl ? this.inputEl.value : this.displayValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onPaste: this.handlePaste, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" }), this.affixText && (index.h("span", { key: '
|
|
440
|
+
value: this.focused && this.inputEl ? this.inputEl.value : this.displayValue, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleInput, onPaste: this.handlePaste, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" }), this.affixText && (index.h("span", { key: '2a7bc2f465844ccb9db7017c1b3782625e784c05', class: "co-number-field__affix", "aria-hidden": "true" }, this.affixText)), this.clearable && !this.isEmpty && !this.disabled && (index.h("button", { key: '06e40ddc080297db49823f17eeeaba313f68fafd', class: "co-number-field__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, index.h("co-icon", { key: 'f69d2f6bf5cb4cd6731d55f873fd03d21eb0f42e', name: "x-circle", size: 16, weight: "fill" }))), index.h("slot", { key: 'd16df6468bf0f514ce183e36d555b5e8f97ff969', name: "suffix" }), !this.hideControls && (index.h("button", { key: '523f5cbda86bbe3b69d08aedc9eb678d6b218cb7', class: "co-number-field__btn co-number-field__btn--plus", type: "button", tabIndex: -1, disabled: !this.canIncrement, onClick: this.handleIncrement, "aria-label": "Increase" }, index.h("co-icon", { key: '7f546fa2885ebecc3f16129bdc815a1cea57f53f', name: "plus", size: 16 })))), this.helperText && (index.h("div", { key: 'e807bbe38823ee148e227baaac1feafd85f93c49', class: `co-number-field__helper co-number-field__helper--${this.status}` }, this.statusIcon && index.h("co-icon", { key: 'e8bc48908cb9e53952e0bffeb898d0a4b0d2fef3', name: this.statusIcon, size: 14, weight: "fill", class: "co-number-field__helper-icon" }), index.h("span", { key: 'c00dc9f3bd966988f6a2546a360ede337de383e4', class: "co-number-field__helper-text" }, this.helperText)))));
|
|
420
441
|
}
|
|
421
442
|
get el() { return index.getElement(this); }
|
|
422
443
|
static get watchers() { return {
|
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
var index = require('./index-MDAnKsze.js');
|
|
4
4
|
var overlayAfterClose = require('./overlayAfterClose-BdeXrhVY.js');
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* ¿Un `click` sobre el fondo del overlay es un gesto de cierre?
|
|
8
|
+
*
|
|
9
|
+
* El navegador despacha `click` al ANCESTRO COMÚN de donde empezó y donde
|
|
10
|
+
* terminó la pulsación: seleccionar texto dentro de un modal y soltar fuera
|
|
11
|
+
* producía un `click` en el fondo y cerraba el modal (con lo editado adentro).
|
|
12
|
+
* Solo cuenta si la pulsación entera —down, up y click— ocurrió sobre el MISMO
|
|
13
|
+
* elemento (`composedPath()[0]`, para ver a través de shadow roots).
|
|
14
|
+
*/
|
|
15
|
+
function isBackdropDismiss(downTarget, upTarget, clickTarget) {
|
|
16
|
+
return downTarget !== null && downTarget === upTarget && upTarget === clickTarget;
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
// focusTrap.ts
|
|
7
20
|
//
|
|
8
21
|
// Focus-trap helpers for co-overlay. The Tab-cycling decision is a PURE function
|
|
@@ -113,8 +126,26 @@ const CoOverlay = class {
|
|
|
113
126
|
this.closeOnEscape = false;
|
|
114
127
|
/** Whether THIS instance currently holds a scroll lock (prevents double-count). */
|
|
115
128
|
this.hasLock = false;
|
|
116
|
-
|
|
117
|
-
|
|
129
|
+
// Origen de la pulsación en curso (ver isBackdropDismiss): un drag que
|
|
130
|
+
// empieza dentro del contenido y suelta en el fondo NO es un cierre.
|
|
131
|
+
this.pressDownTarget = null;
|
|
132
|
+
this.pressUpTarget = null;
|
|
133
|
+
this.handlePointerDown = (e) => {
|
|
134
|
+
var _a;
|
|
135
|
+
this.pressDownTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
136
|
+
this.pressUpTarget = null;
|
|
137
|
+
};
|
|
138
|
+
this.handlePointerUp = (e) => {
|
|
139
|
+
var _a;
|
|
140
|
+
this.pressUpTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
141
|
+
};
|
|
142
|
+
this.handleClick = (e) => {
|
|
143
|
+
var _a;
|
|
144
|
+
const dismiss = isBackdropDismiss(this.pressDownTarget, this.pressUpTarget, (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null);
|
|
145
|
+
this.pressDownTarget = null;
|
|
146
|
+
this.pressUpTarget = null;
|
|
147
|
+
if (dismiss)
|
|
148
|
+
this.coClose.emit();
|
|
118
149
|
};
|
|
119
150
|
this.handleTransitionEnd = (e) => {
|
|
120
151
|
if (e.target !== this.overlayEl)
|
|
@@ -251,7 +282,7 @@ const CoOverlay = class {
|
|
|
251
282
|
focusables[nextIndex].focus();
|
|
252
283
|
}
|
|
253
284
|
render() {
|
|
254
|
-
return (index.h("div", { key: '
|
|
285
|
+
return (index.h("div", { key: '74051ac6a35eff0b9c873bafe2141b0a9486f83e', class: { 'co-overlay': true, 'co-overlay--open': this.open }, part: "overlay", popover: "manual", tabindex: this.trapFocus ? -1 : undefined, ref: (el) => (this.overlayEl = el), onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, onClick: this.handleClick, onTransitionEnd: this.handleTransitionEnd }, index.h("slot", { key: '8ed7f244bfe88f3d38b9e1f6720b0a191529f6f1' })));
|
|
255
286
|
}
|
|
256
287
|
get el() { return index.getElement(this); }
|
|
257
288
|
static get watchers() { return {
|
|
@@ -92,10 +92,21 @@ const CoPopover = class {
|
|
|
92
92
|
// phase so we run before any inner-element listeners that might stop
|
|
93
93
|
// propagation, and bypassing Stencil's @Listen delegation quirks across
|
|
94
94
|
// nested shadow DOMs.
|
|
95
|
+
// La pulsación en curso EMPEZÓ dentro del popover: seleccionar texto en un
|
|
96
|
+
// input del panel y soltar afuera despacha el `click` al ancestro común (fuera)
|
|
97
|
+
// y cerraba el panel. Ese click no es un "click afuera".
|
|
98
|
+
this.pressStartedInside = false;
|
|
99
|
+
this.handleDocumentPointerDownManual = (e) => {
|
|
100
|
+
this.pressStartedInside = e.composedPath().includes(this.el);
|
|
101
|
+
};
|
|
95
102
|
this.handleDocumentClickManual = (e) => {
|
|
103
|
+
const startedInside = this.pressStartedInside;
|
|
104
|
+
this.pressStartedInside = false;
|
|
96
105
|
// Early-exit keeps closed instances silent.
|
|
97
106
|
if (!this.open || !this.closeOnClickOutside)
|
|
98
107
|
return;
|
|
108
|
+
if (startedInside)
|
|
109
|
+
return;
|
|
99
110
|
// Solo el tope de la pila reacciona al click afuera: con popovers
|
|
100
111
|
// anidados (dropdown dentro de un panel de filtro), el primer click
|
|
101
112
|
// afuera cierra solo el de más arriba; el padre queda intacto. Nota: si
|
|
@@ -263,6 +274,7 @@ const CoPopover = class {
|
|
|
263
274
|
bindDocListeners() {
|
|
264
275
|
if (this.docListenersBound)
|
|
265
276
|
return;
|
|
277
|
+
document.addEventListener('pointerdown', this.handleDocumentPointerDownManual, true);
|
|
266
278
|
document.addEventListener('click', this.handleDocumentClickManual, true);
|
|
267
279
|
document.addEventListener('keydown', this.handleDocumentKeydownManual, true);
|
|
268
280
|
this.docListenersBound = true;
|
|
@@ -270,9 +282,11 @@ const CoPopover = class {
|
|
|
270
282
|
unbindDocListeners() {
|
|
271
283
|
if (!this.docListenersBound)
|
|
272
284
|
return;
|
|
285
|
+
document.removeEventListener('pointerdown', this.handleDocumentPointerDownManual, true);
|
|
273
286
|
document.removeEventListener('click', this.handleDocumentClickManual, true);
|
|
274
287
|
document.removeEventListener('keydown', this.handleDocumentKeydownManual, true);
|
|
275
288
|
this.docListenersBound = false;
|
|
289
|
+
this.pressStartedInside = false;
|
|
276
290
|
}
|
|
277
291
|
// ── Public methods ─────────────────────────────────────────
|
|
278
292
|
async toggle() {
|
|
@@ -340,13 +354,13 @@ const CoPopover = class {
|
|
|
340
354
|
}
|
|
341
355
|
// ── Render ─────────────────────────────────────────────────
|
|
342
356
|
render() {
|
|
343
|
-
return (index.h("div", { key: '
|
|
357
|
+
return (index.h("div", { key: 'f4f13f06a95f02735c615e896d367ca671270a68', class: "co-popover" }, index.h("div", { key: '504af8cebb0f83e7f882f09096a5bfba37e2ac56', class: "co-popover__trigger", ref: (el) => (this.triggerEl = el), onClick: this.handleTriggerClick }, index.h("slot", { key: 'd5853c372f2bda3f5c57718b5869ca8919c1dfcc', name: "trigger" })), (this.open || this.closing) && (index.h("div", { key: '3b9c2aa2feaab08eb5f03d36cc25a464600da7fe', class: { 'co-popover__panel': true, 'co-popover__panel--closing': this.closing }, popover: "manual", onTransitionEnd: this.handlePanelTransitionEnd, ref: (el) => {
|
|
344
358
|
if (el && el !== this.panelEl) {
|
|
345
359
|
this.panelEl = el;
|
|
346
360
|
this.promotePanel();
|
|
347
361
|
this.scheduleUpdate();
|
|
348
362
|
}
|
|
349
|
-
} }, index.h("slot", { key: '
|
|
363
|
+
} }, index.h("slot", { key: '81e2b8070b4912bab1654e957890c92244ca83b8' })))));
|
|
350
364
|
}
|
|
351
365
|
get el() { return index.getElement(this); }
|
|
352
366
|
static get watchers() { return {
|