@prolibu-suite/cobalt-core 0.10.1 → 0.10.3
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 +107 -27
- package/dist/cjs/co-accordion.cjs.entry.js +32 -3
- package/dist/cjs/co-avatar.cjs.entry.js +1 -1
- package/dist/cjs/co-button.cjs.entry.js +1 -1
- package/dist/cjs/co-calendar_3.cjs.entry.js +7 -3
- package/dist/cjs/co-chip_2.cjs.entry.js +8 -6
- package/dist/cjs/co-column-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-combobox.cjs.entry.js +1 -1
- package/dist/cjs/co-command-search.cjs.entry.js +1 -1
- package/dist/cjs/co-date-range-picker.cjs.entry.js +3 -1
- package/dist/cjs/co-emoji-picker.cjs.entry.js +1 -1
- package/dist/cjs/co-file-type-tile.cjs.entry.js +23 -7
- 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-phone-field.cjs.entry.js +5 -5
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +30 -10
- package/dist/cjs/co-rich-text-toolbar.cjs.entry.js +5 -2
- package/dist/cjs/co-rich-text-viewer.cjs.entry.js +19 -3
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +8 -8
- package/dist/cjs/co-separator.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar-nav.cjs.entry.js +1 -1
- package/dist/cjs/co-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/co-slider.cjs.entry.js +2 -2
- package/dist/cjs/co-switch.cjs.entry.js +3 -3
- package/dist/cjs/co-tab-group.cjs.entry.js +2 -2
- package/dist/cjs/co-tab.cjs.entry.js +2 -2
- package/dist/cjs/co-tags-field.cjs.entry.js +5 -5
- package/dist/cjs/co-textarea.cjs.entry.js +4 -4
- package/dist/cjs/co-time-field.cjs.entry.js +1 -1
- package/dist/cjs/co-toggle-button-group.cjs.entry.js +2 -2
- package/dist/cjs/co-toggle-button.cjs.entry.js +2 -2
- package/dist/cjs/co-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/{index-BYwrR87Z.js → index-2kMmd5-a.js} +6717 -6654
- package/dist/cjs/index-MDAnKsze.js +8 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{normalizeText-B-v-XPKf.js → normalizeText-D9rlJWZa.js} +29 -18
- package/dist/cjs/{toolbar-config-BSGas-Wl.js → toolbar-config-CYACt9hh.js} +13 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/p-07416e31.entry.js +1 -0
- package/dist/cobalt/{p-2fba312b.entry.js → p-0c004735.entry.js} +1 -1
- package/dist/cobalt/{p-16954cea.entry.js → p-11c5ce78.entry.js} +1 -1
- package/dist/cobalt/{p-c465d619.entry.js → p-1861fe41.entry.js} +1 -1
- package/dist/cobalt/p-1cc818ca.entry.js +1 -0
- package/dist/cobalt/p-216a63ee.entry.js +1 -0
- package/dist/cobalt/p-24196410.entry.js +1 -0
- package/dist/cobalt/{p-5e4973a6.entry.js → p-292b0389.entry.js} +1 -1
- package/dist/cobalt/{p-b5bba7fe.entry.js → p-2c9dba2f.entry.js} +1 -1
- package/dist/cobalt/{p-789c4b3e.entry.js → p-39a50e7f.entry.js} +1 -1
- package/dist/cobalt/p-39dc4ec8.entry.js +1 -0
- package/dist/cobalt/{p-3c4f7026.entry.js → p-3d31c575.entry.js} +1 -1
- package/dist/cobalt/{p-37f5036b.entry.js → p-49834b8e.entry.js} +1 -1
- package/dist/cobalt/p-5c756787.entry.js +1 -0
- package/dist/cobalt/{p-27a7e549.entry.js → p-67f3b9d6.entry.js} +1 -1
- package/dist/cobalt/{p-9cf738ed.entry.js → p-6a4f3179.entry.js} +1 -1
- package/dist/cobalt/{p-6c82a892.entry.js → p-6dd220e0.entry.js} +1 -1
- package/dist/cobalt/{p-93fe45fd.entry.js → p-71cbc53c.entry.js} +1 -1
- package/dist/cobalt/{p-e371ec7a.entry.js → p-72e52af7.entry.js} +1 -1
- package/dist/cobalt/{p-d3344187.entry.js → p-7b5c555c.entry.js} +1 -1
- package/dist/cobalt/{p-148d4aa6.entry.js → p-8530ad16.entry.js} +1 -1
- package/dist/cobalt/{p-a325ea0c.entry.js → p-8a74bf7d.entry.js} +1 -1
- package/dist/cobalt/p-8e05b979.entry.js +1 -0
- package/dist/cobalt/{p-7e8e6907.entry.js → p-8ebc0c12.entry.js} +1 -1
- package/dist/cobalt/p-99a655f6.entry.js +1 -0
- package/dist/{components/p-DOL2zACE.js → cobalt/p-BAYo-RBt.js} +1 -1
- package/dist/cobalt/p-Ba_v-MzM.js +1 -0
- package/dist/cobalt/{p-Bryf3-Js.js → p-CJW9H3Gi.js} +1 -1
- package/dist/cobalt/p-a1b422ca.entry.js +1 -0
- package/dist/cobalt/{p-354d5089.entry.js → p-ade07307.entry.js} +1 -1
- package/dist/cobalt/{p-383a998e.entry.js → p-b437eff6.entry.js} +1 -1
- package/dist/cobalt/p-b698188c.entry.js +1 -0
- package/dist/cobalt/p-bde32f8b.entry.js +1 -0
- package/dist/cobalt/{p-95cfcb34.entry.js → p-c30b4cb5.entry.js} +1 -1
- package/dist/cobalt/p-ee149fd2.entry.js +1 -0
- package/dist/cobalt/{p-fd150cc6.entry.js → p-f7eb1a40.entry.js} +1 -1
- package/dist/cobalt/{p-16f8cee6.entry.js → p-f9a7b7c6.entry.js} +1 -1
- package/dist/collection/components/co-accordion/co-accordion.css +9 -2
- package/dist/collection/components/co-accordion/co-accordion.js +35 -4
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar/co-avatar.css +22 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-button/co-button.css +9 -0
- package/dist/collection/components/co-calendar/co-calendar.css +10 -4
- package/dist/collection/components/co-calendar/co-calendar.js +6 -2
- 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.css +13 -0
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +4 -2
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.js +4 -43
- package/dist/collection/components/co-file-type-tile/co-file-type-tile.utils.js +55 -0
- package/dist/collection/components/co-number-field/co-number-field.js +25 -4
- package/dist/collection/components/co-option-list/co-option-list.js +8 -6
- 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-phone-field/co-phone-field.js +5 -5
- package/dist/collection/components/co-popover/co-popover.js +1 -1
- 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-rich-text-editor/co-rich-text-editor.css +22 -0
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +48 -8
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.css +52 -0
- package/dist/collection/components/co-rich-text-toolbar/co-rich-text-toolbar.js +25 -2
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.css +5 -0
- package/dist/collection/components/co-rich-text-viewer/co-rich-text-viewer.js +17 -1
- package/dist/collection/components/co-row/co-row.js +2 -2
- package/dist/collection/components/co-segmented-bar/co-segmented-bar.js +1 -1
- package/dist/collection/components/co-select/co-select.js +9 -9
- package/dist/collection/components/co-separator/co-separator.js +1 -1
- package/dist/collection/components/co-sidebar/co-sidebar.js +2 -2
- package/dist/collection/components/co-sidebar-nav/co-sidebar-nav.js +1 -1
- package/dist/collection/components/co-skeleton/co-skeleton.js +1 -1
- package/dist/collection/components/co-slider/co-slider.js +2 -2
- package/dist/collection/components/co-switch/co-switch.js +3 -3
- package/dist/collection/components/co-tab/co-tab.js +2 -2
- package/dist/collection/components/co-tab-group/co-tab-group.js +2 -2
- package/dist/collection/components/co-tags-field/co-tags-field.js +5 -5
- package/dist/collection/components/co-textarea/co-textarea.js +4 -4
- package/dist/collection/components/co-time-field/co-time-field.js +1 -1
- package/dist/collection/components/co-toast/co-toast.js +2 -2
- package/dist/collection/components/co-toggle-button/co-toggle-button.js +2 -2
- package/dist/collection/components/co-toggle-button-group/co-toggle-button-group.js +2 -2
- package/dist/collection/components/co-tooltip/co-tooltip.js +2 -2
- package/dist/collection/components/co-transfer-list/co-transfer-list.js +1 -1
- package/dist/collection/components/co-video/co-video.js +2 -2
- package/dist/collection/utils/normalizeText.js +43 -0
- package/dist/components/co-accordion.js +1 -1
- package/dist/components/co-autocomplete.js +1 -1
- package/dist/components/co-avatar-group.js +1 -1
- package/dist/components/co-avatar.js +1 -1
- package/dist/components/co-button.js +1 -1
- package/dist/components/co-calendar-month.js +1 -1
- package/dist/components/co-calendar-timegrid.js +1 -1
- package/dist/components/co-calendar.js +1 -1
- package/dist/components/co-column-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-data-table.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-drive-card.js +1 -1
- package/dist/components/co-emoji-picker.js +1 -1
- package/dist/components/co-event-calendar.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-file-type-tile.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-item.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-phone-field.js +1 -1
- package/dist/components/co-ref-field.js +1 -1
- package/dist/components/co-rich-text-editor.js +1 -1
- package/dist/components/co-rich-text-toolbar.js +1 -1
- package/dist/components/co-rich-text-viewer.js +1 -1
- package/dist/components/co-row.js +1 -1
- package/dist/components/co-select.js +1 -1
- package/dist/components/co-separator.js +1 -1
- package/dist/components/co-sidebar-nav.js +1 -1
- package/dist/components/co-sidebar.js +1 -1
- package/dist/components/co-skeleton.js +1 -1
- package/dist/components/co-slider.js +1 -1
- package/dist/components/co-switch.js +1 -1
- package/dist/components/co-tab-group.js +1 -1
- package/dist/components/co-tab.js +1 -1
- package/dist/components/co-tags-field.js +1 -1
- package/dist/components/co-textarea.js +1 -1
- package/dist/components/co-time-field.js +1 -1
- package/dist/components/co-toggle-button-group.js +1 -1
- package/dist/components/co-toggle-button.js +1 -1
- package/dist/components/co-tooltip.js +1 -1
- package/dist/components/co-video.js +1 -1
- package/dist/components/{p-CLsAo0-A.js → p-2EOI1nrz.js} +1 -1
- package/dist/{cobalt/p-DOL2zACE.js → components/p-BAYo-RBt.js} +1 -1
- package/dist/components/p-BJh68Jqe.js +1 -0
- package/dist/components/p-Ba_v-MzM.js +1 -0
- package/dist/components/p-BhCVadcA.js +1 -0
- package/dist/components/p-BrAFTkAn.js +1 -0
- package/dist/components/{p-zuhal3IZ.js → p-Bsh0JMGf.js} +1 -1
- package/dist/components/{p-Bryf3-Js.js → p-CJW9H3Gi.js} +1 -1
- package/dist/components/p-CWCYYQrF.js +1 -0
- package/dist/components/p-D7Lhxz7L.js +1 -0
- package/dist/components/{p-B9xitpGU.js → p-DFlJMEJ-.js} +1 -1
- package/dist/components/{p-De7w9k6_.js → p-DTPYZwaZ.js} +1 -1
- package/dist/components/{p-DSnJWzQw.js → p-Dc_Kbari.js} +1 -1
- package/dist/components/{p-D2ldYZo1.js → p-Dcg4krSX.js} +1 -1
- package/dist/components/{p-DTi2O4O8.js → p-DvR45CLa.js} +1 -1
- package/dist/components/{p-DDV_bRcU.js → p-Nt4JJxbL.js} +1 -1
- package/dist/components/{p-DxtNejr2.js → p-P4HlMBlL.js} +1 -1
- package/dist/components/p-cndRd_-U.js +1 -0
- package/dist/components/{p-D3mVYO-G.js → p-uxdXViMV.js} +1 -1
- package/dist/esm/co-accordion.entry.js +32 -3
- package/dist/esm/co-avatar.entry.js +1 -1
- package/dist/esm/co-button.entry.js +1 -1
- package/dist/esm/co-calendar_3.entry.js +7 -3
- package/dist/esm/co-chip_2.entry.js +8 -6
- package/dist/esm/co-column-picker.entry.js +1 -1
- package/dist/esm/co-combobox.entry.js +1 -1
- package/dist/esm/co-command-search.entry.js +1 -1
- package/dist/esm/co-date-range-picker.entry.js +3 -1
- package/dist/esm/co-emoji-picker.entry.js +1 -1
- package/dist/esm/co-file-type-tile.entry.js +23 -7
- package/dist/esm/co-number-field.entry.js +25 -4
- package/dist/esm/co-overlay.entry.js +34 -3
- package/dist/esm/co-phone-field.entry.js +5 -5
- package/dist/esm/co-provider-logo_2.entry.js +1 -1
- package/dist/esm/co-rich-text-editor.entry.js +30 -10
- package/dist/esm/co-rich-text-toolbar.entry.js +5 -2
- package/dist/esm/co-rich-text-viewer.entry.js +19 -3
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +8 -8
- package/dist/esm/co-separator.entry.js +1 -1
- package/dist/esm/co-sidebar-nav.entry.js +1 -1
- package/dist/esm/co-sidebar.entry.js +2 -2
- package/dist/esm/co-slider.entry.js +2 -2
- package/dist/esm/co-switch.entry.js +3 -3
- package/dist/esm/co-tab-group.entry.js +2 -2
- package/dist/esm/co-tab.entry.js +2 -2
- package/dist/esm/co-tags-field.entry.js +5 -5
- package/dist/esm/co-textarea.entry.js +4 -4
- package/dist/esm/co-time-field.entry.js +1 -1
- package/dist/esm/co-toggle-button-group.entry.js +2 -2
- package/dist/esm/co-toggle-button.entry.js +2 -2
- package/dist/esm/co-tooltip.entry.js +2 -2
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/{index-68iUQp5j.js → index-BBIYyvq-.js} +6717 -6654
- package/dist/esm/index-DH5lfRNj.js +8 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{normalizeText-CQY6Ul7q.js → normalizeText-Ba_v-MzM.js} +29 -18
- package/dist/esm/{toolbar-config-DOL2zACE.js → toolbar-config-BAYo-RBt.js} +13 -1
- package/dist/types/components/co-accordion/co-accordion.d.ts +11 -2
- package/dist/types/components/co-file-type-tile/co-file-type-tile.utils.d.ts +12 -0
- package/dist/types/components/co-number-field/co-number-field.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-rich-text-editor/co-rich-text-editor.d.ts +7 -0
- package/dist/types/components/co-rich-text-toolbar/co-rich-text-toolbar.d.ts +4 -1
- package/dist/types/components.d.ts +41 -11
- package/dist/types/utils/normalizeText.d.ts +13 -0
- package/package.json +4 -4
- package/dist/cobalt/p-239c5c5f.entry.js +0 -1
- package/dist/cobalt/p-2a30c143.entry.js +0 -1
- package/dist/cobalt/p-2f0f3bb1.entry.js +0 -1
- package/dist/cobalt/p-5adf117c.entry.js +0 -1
- package/dist/cobalt/p-5ca394b1.entry.js +0 -1
- package/dist/cobalt/p-66b11b38.entry.js +0 -1
- package/dist/cobalt/p-CQY6Ul7q.js +0 -1
- package/dist/cobalt/p-b0c4fc71.entry.js +0 -1
- package/dist/cobalt/p-be34e447.entry.js +0 -1
- package/dist/cobalt/p-c124e82b.entry.js +0 -1
- package/dist/cobalt/p-d9d9e8ae.entry.js +0 -1
- package/dist/cobalt/p-e8a2f993.entry.js +0 -1
- package/dist/cobalt/p-eb8691f2.entry.js +0 -1
- package/dist/components/p-CBTGN490.js +0 -1
- package/dist/components/p-CFFDmGPS.js +0 -1
- package/dist/components/p-CQY6Ul7q.js +0 -1
- package/dist/components/p-DoHLTC0n.js +0 -1
- package/dist/components/p-HxVRXXXC.js +0 -1
- package/dist/components/p-vby0ITbe.js +0 -1
- package/dist/components/p-wjt4IAGZ.js +0 -1
|
@@ -87,7 +87,7 @@ export class CoAvatarGroup {
|
|
|
87
87
|
"references": {
|
|
88
88
|
"CoAvatarGroupItem": {
|
|
89
89
|
"location": "local",
|
|
90
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-avatar-group/co-avatar-group.tsx",
|
|
90
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-avatar-group/co-avatar-group.tsx",
|
|
91
91
|
"id": "src/components/co-avatar-group/co-avatar-group.tsx::CoAvatarGroupItem"
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -212,6 +212,15 @@
|
|
|
212
212
|
flex-shrink: 0;
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
+
/* The glyph must not grow the line box. ICON_SIZE is font-size + 2 in every
|
|
216
|
+
size (l 20/18, m 18/16, s 16/14, xs 14/12) and the label sits at line-height 1,
|
|
217
|
+
so an icon-left button came out 2px taller than its text-only sibling in the
|
|
218
|
+
same row (34 vs 32 on square/s next to a co-toggle-button, 2026-09-17). Pull
|
|
219
|
+
the 1px overshoot per side back: text-only and icon buttons share one height. */
|
|
220
|
+
.co-button > co-icon {
|
|
221
|
+
margin-block: -1px;
|
|
222
|
+
}
|
|
223
|
+
|
|
215
224
|
/* ─── FALLBACK: no backdrop-filter → solid, legible surfaces ──── */
|
|
216
225
|
@supports not (background: color-mix(in srgb, red, transparent)) {
|
|
217
226
|
.co-button--primary { background: var(--co-semantic-surface-primary); }
|
|
@@ -9,11 +9,17 @@
|
|
|
9
9
|
--co-calendar-day-size: 44px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
/* Knobs de layout (custom properties: cruzan el shadow, los fija el HOST):
|
|
13
|
+
--co-calendar-width ancho del calendario (default: el de sus 7 celdas fijas)
|
|
14
|
+
--co-calendar-col track de cada columna (default: la celda fija)
|
|
15
|
+
--co-calendar-day-width ancho del botón de día (default: la celda fija)
|
|
16
|
+
co-date-range-picker los pone en 100% / minmax(celda, 1fr) / 100% para que el mes
|
|
17
|
+
llene el panel en vez de dejar el sobrante en blanco (reporte 2026-09-16). */
|
|
12
18
|
.co-calendar {
|
|
13
19
|
display: flex;
|
|
14
20
|
flex-direction: column;
|
|
15
21
|
gap: var(--co-spacing-sm);
|
|
16
|
-
width: max-content;
|
|
22
|
+
width: var(--co-calendar-width, max-content);
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
/* ── Header ──────────────────────────────────────────────── */
|
|
@@ -63,7 +69,7 @@
|
|
|
63
69
|
display: grid;
|
|
64
70
|
grid-template-columns: repeat(3, 1fr);
|
|
65
71
|
gap: var(--co-spacing-xs);
|
|
66
|
-
width: calc(var(--co-calendar-day-size) * 7 + 12px);
|
|
72
|
+
width: var(--co-calendar-width, calc(var(--co-calendar-day-size) * 7 + 12px));
|
|
67
73
|
padding-top: var(--co-spacing-xs);
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -134,7 +140,7 @@
|
|
|
134
140
|
|
|
135
141
|
.co-calendar__row {
|
|
136
142
|
display: grid;
|
|
137
|
-
grid-template-columns: repeat(7, var(--co-calendar-day-size));
|
|
143
|
+
grid-template-columns: repeat(7, var(--co-calendar-col, var(--co-calendar-day-size)));
|
|
138
144
|
gap: 2px;
|
|
139
145
|
}
|
|
140
146
|
|
|
@@ -156,7 +162,7 @@
|
|
|
156
162
|
|
|
157
163
|
/* ── Day cell ────────────────────────────────────────────── */
|
|
158
164
|
.co-calendar__day {
|
|
159
|
-
width: var(--co-calendar-day-size);
|
|
165
|
+
width: var(--co-calendar-day-width, var(--co-calendar-day-size));
|
|
160
166
|
height: var(--co-calendar-day-size);
|
|
161
167
|
display: inline-flex;
|
|
162
168
|
align-items: center;
|
|
@@ -307,7 +307,11 @@ export class CoCalendar {
|
|
|
307
307
|
const monthLabel = getMonthLabel(this.viewYear, this.viewMonth, this.locale, 'long');
|
|
308
308
|
const shortLabels = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'short');
|
|
309
309
|
const longLabels = getWeekdayLabels(this.locale, this.firstDayOfWeek, 'long');
|
|
310
|
-
|
|
310
|
+
// Solo las semanas que tocan el mes: la matriz trae siempre 6, y un mes de
|
|
311
|
+
// 5 semanas cerraba con una fila ENTERA del mes siguiente en gris, que se
|
|
312
|
+
// leía como una franja en blanco al pie del panel (reporte 2026-09-16). El
|
|
313
|
+
// teclado no la necesita: moveFocus ya cambia de mes al salir de él.
|
|
314
|
+
const matrix = getMonthMatrix(this.viewYear, this.viewMonth, this.firstDayOfWeek).filter((week) => week.some((cell) => cell.inMonth));
|
|
311
315
|
return (h("div", { class: "co-calendar__grid", part: "grid", role: "grid", "aria-label": monthLabel, onKeyDown: this.handleGridKeyDown }, h("div", { class: "co-calendar__row co-calendar__row--dow", role: "row" }, shortLabels.map((lbl, i) => (h("span", { class: "co-calendar__dow", role: "columnheader", "aria-label": longLabels[i] }, lbl)))), matrix.map((week) => (h("div", { class: "co-calendar__row", role: "row" }, week.map((cell) => {
|
|
312
316
|
const disabled = this.isDayDisabled(cell.value);
|
|
313
317
|
const isFocused = compareYMD(cell.value, this.focused) === 0;
|
|
@@ -363,7 +367,7 @@ export class CoCalendar {
|
|
|
363
367
|
render() {
|
|
364
368
|
var _a, _b;
|
|
365
369
|
const t = getDateStrings(this.locale);
|
|
366
|
-
return (h("div", { key: '
|
|
370
|
+
return (h("div", { key: '3b9f57fa8513746cb3133d80d574a0fafbc8b31e', class: "co-calendar", part: "root" }, h("div", { key: '6b3b0f8d1c582abbbf04c8b936486bd1e3fedaec', class: "co-calendar__header", part: "header" }, h("button", { key: '57f854f84162a5b09119385339c9993ee25cef72', type: "button", class: "co-calendar__nav", onClick: this.handlePrev, "aria-label": (_a = this.prevMonthLabel) !== null && _a !== void 0 ? _a : t.prevMonth }, h("co-icon", { key: '772ec0dfb48dfee33d506549e68ab7598ec0cf00', name: "caret-left", size: 16 })), h("button", { key: 'b9f3851082fbbe2d5f696dd0a51c442410b15fa1', type: "button", class: "co-calendar__title", "aria-live": "polite", onClick: this.toggleView }, this.headerTitle(), h("co-icon", { key: '3f660d39a851c97f299e6a6cc8c0ad8b5ed4ee7f', name: "caret-down", size: 12, class: "co-calendar__title-caret" })), h("button", { key: '6ac9d1af5f3dc36a34e94e129ab2db313dee74d2', type: "button", class: "co-calendar__nav", onClick: this.handleNext, "aria-label": (_b = this.nextMonthLabel) !== null && _b !== void 0 ? _b : t.nextMonth }, h("co-icon", { key: 'c8c962be3435e108f81968f6dde5f6f481c40733', name: "caret-right", size: 16 }))), this.view === 'days' && this.renderDays(t), this.view === 'months' && this.renderMonths(), this.view === 'years' && this.renderYears()));
|
|
367
371
|
}
|
|
368
372
|
static get is() { return "co-calendar"; }
|
|
369
373
|
static get encapsulation() { return "shadow"; }
|
|
@@ -231,7 +231,7 @@ export class CoCheckboxGroup {
|
|
|
231
231
|
"references": {
|
|
232
232
|
"CheckboxOption": {
|
|
233
233
|
"location": "local",
|
|
234
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-checkbox-group/co-checkbox-group.tsx",
|
|
234
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-checkbox-group/co-checkbox-group.tsx",
|
|
235
235
|
"id": "src/components/co-checkbox-group/co-checkbox-group.tsx::CheckboxOption"
|
|
236
236
|
}
|
|
237
237
|
}
|
|
@@ -531,7 +531,7 @@ export class CoCombobox {
|
|
|
531
531
|
"references": {
|
|
532
532
|
"ComboboxOption": {
|
|
533
533
|
"location": "local",
|
|
534
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-combobox/co-combobox.tsx",
|
|
534
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-combobox/co-combobox.tsx",
|
|
535
535
|
"id": "src/components/co-combobox/co-combobox.tsx::ComboboxOption"
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -246,7 +246,7 @@ export class CoCommandSearch {
|
|
|
246
246
|
"references": {
|
|
247
247
|
"CommandItem": {
|
|
248
248
|
"location": "local",
|
|
249
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-command-search/co-command-search.tsx",
|
|
249
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-command-search/co-command-search.tsx",
|
|
250
250
|
"id": "src/components/co-command-search/co-command-search.tsx::CommandItem"
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -504,7 +504,7 @@ export class CoDataTable {
|
|
|
504
504
|
"references": {
|
|
505
505
|
"CoDataTableColumn": {
|
|
506
506
|
"location": "local",
|
|
507
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-data-table/co-data-table.tsx",
|
|
507
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-data-table/co-data-table.tsx",
|
|
508
508
|
"id": "src/components/co-data-table/co-data-table.tsx::CoDataTableColumn"
|
|
509
509
|
}
|
|
510
510
|
}
|
|
@@ -129,6 +129,19 @@
|
|
|
129
129
|
align-items: flex-start;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
+
/* El calendario llena el ancho del panel. Ese ancho lo fija la fila de los dos campos de
|
|
133
|
+
fecha, y el calendario era `max-content` (7 celdas fijas): sin presets quedaban ~170px en
|
|
134
|
+
blanco a la derecha (reporte 2026-09-16). Knobs de co-calendar: ancho fluido, columnas que
|
|
135
|
+
reparten el sobrante y día a ancho de columna (la banda del rango sigue continua; el día
|
|
136
|
+
es un rectángulo redondeado, no un círculo). En touch va centrado con celdas de 44px. */
|
|
137
|
+
.co-date-range-picker__body:not(.co-date-range-picker__body--touch) co-calendar {
|
|
138
|
+
flex: 1;
|
|
139
|
+
min-width: 0;
|
|
140
|
+
--co-calendar-width: 100%;
|
|
141
|
+
--co-calendar-col: minmax(var(--co-calendar-day-size), 1fr);
|
|
142
|
+
--co-calendar-day-width: 100%;
|
|
143
|
+
}
|
|
144
|
+
|
|
132
145
|
/* Mobile bottom-sheet: stack presets (horizontal scroll) above the calendar. */
|
|
133
146
|
.co-date-range-picker__body--touch {
|
|
134
147
|
flex-direction: column;
|
|
@@ -271,6 +271,8 @@ export class CoDateRangePicker {
|
|
|
271
271
|
return `${f} → ${to}`;
|
|
272
272
|
if (f)
|
|
273
273
|
return `${f} → …`;
|
|
274
|
+
if (to)
|
|
275
|
+
return `… → ${to}`; // solo fin (p. ej. un ticket con vencimiento y sin inicio): no ocultar el dato
|
|
274
276
|
return this.placeholder || t.setDate; // `||`: empty string → localized default
|
|
275
277
|
}
|
|
276
278
|
presetItems(t) {
|
|
@@ -1039,7 +1041,7 @@ export class CoDateRangePicker {
|
|
|
1039
1041
|
"references": {
|
|
1040
1042
|
"DateRangeValue": {
|
|
1041
1043
|
"location": "local",
|
|
1042
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
1044
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
1043
1045
|
"id": "src/components/co-date-range-picker/co-date-range-picker.tsx::DateRangeValue"
|
|
1044
1046
|
}
|
|
1045
1047
|
}
|
|
@@ -1060,7 +1062,7 @@ export class CoDateRangePicker {
|
|
|
1060
1062
|
"references": {
|
|
1061
1063
|
"DateRangeValue": {
|
|
1062
1064
|
"location": "local",
|
|
1063
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
1065
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-date-range-picker/co-date-range-picker.tsx",
|
|
1064
1066
|
"id": "src/components/co-date-range-picker/co-date-range-picker.tsx::DateRangeValue"
|
|
1065
1067
|
}
|
|
1066
1068
|
}
|
|
@@ -1,42 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
|
|
3
|
-
const EXT_TO_TYPE = {
|
|
4
|
-
pdf: 'pdf',
|
|
5
|
-
doc: 'doc',
|
|
6
|
-
docx: 'doc',
|
|
7
|
-
txt: 'txt',
|
|
8
|
-
md: 'txt',
|
|
9
|
-
xls: 'sheet',
|
|
10
|
-
xlsx: 'sheet',
|
|
11
|
-
csv: 'sheet',
|
|
12
|
-
png: 'image',
|
|
13
|
-
jpg: 'image',
|
|
14
|
-
jpeg: 'image',
|
|
15
|
-
gif: 'image',
|
|
16
|
-
svg: 'image',
|
|
17
|
-
webp: 'image',
|
|
18
|
-
mp4: 'video',
|
|
19
|
-
mov: 'video',
|
|
20
|
-
webm: 'video',
|
|
21
|
-
fig: 'design',
|
|
22
|
-
ai: 'design',
|
|
23
|
-
psd: 'design',
|
|
24
|
-
sketch: 'design',
|
|
25
|
-
zip: 'zip',
|
|
26
|
-
rar: 'zip',
|
|
27
|
-
};
|
|
28
|
-
/** Type → { icon, accent (foreground), tint (background) }. Exact values per design spec (audit 1.6). */
|
|
29
|
-
const TYPE_META = {
|
|
30
|
-
pdf: { icon: 'file-pdf', accent: 'var(--co-color-secondary-rojo-100)', tint: 'rgb(255,236,236)' },
|
|
31
|
-
doc: { icon: 'file-text', accent: 'var(--co-color-primary-azul)', tint: 'var(--co-color-azul-100)' },
|
|
32
|
-
sheet: { icon: 'table', accent: 'var(--co-color-status-success)', tint: 'var(--co-color-verde-100)' },
|
|
33
|
-
image: { icon: 'image', accent: 'var(--co-color-secondary-violeta-100)', tint: 'rgb(233,232,255)' },
|
|
34
|
-
video: { icon: 'broadcast', accent: 'var(--co-color-secondary-naranja-100)', tint: 'rgb(255,236,220)' },
|
|
35
|
-
txt: { icon: 'text-align-left', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
36
|
-
design: { icon: 'sparkle', accent: 'var(--co-color-primary-rosado)', tint: 'var(--co-color-rosado-100)' },
|
|
37
|
-
zip: { icon: 'package', accent: 'var(--co-color-status-pending)', tint: 'var(--co-color-status-bg-pending)' },
|
|
38
|
-
file: { icon: 'file', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
39
|
-
};
|
|
2
|
+
import { resolveFileTileType, TYPE_META } from "./co-file-type-tile.utils";
|
|
40
3
|
export class CoFileTypeTile {
|
|
41
4
|
constructor() {
|
|
42
5
|
/** Tile edge length in px (React uses 44 / 34 / 26). */
|
|
@@ -47,14 +10,12 @@ export class CoFileTypeTile {
|
|
|
47
10
|
this.colorTags = true;
|
|
48
11
|
}
|
|
49
12
|
render() {
|
|
50
|
-
|
|
51
|
-
const key = ((_a = this.ext) !== null && _a !== void 0 ? _a : '').trim().toLowerCase().replace(/^\./, '');
|
|
52
|
-
const type = (_b = EXT_TO_TYPE[key]) !== null && _b !== void 0 ? _b : 'file';
|
|
13
|
+
const type = resolveFileTileType(this.ext);
|
|
53
14
|
const meta = TYPE_META[type];
|
|
54
15
|
const iconSize = Math.round(this.size * 0.5);
|
|
55
16
|
const background = this.colorTags ? meta.tint : 'var(--co-color-gray-100)';
|
|
56
17
|
const color = this.colorTags ? meta.accent : 'var(--co-color-gray-600)';
|
|
57
|
-
return (h("span", { key: '
|
|
18
|
+
return (h("span", { key: '0cbc40f94f5d917b4f3c35e0a9678daa81a58624', class: {
|
|
58
19
|
'co-file-type-tile': true,
|
|
59
20
|
[`co-file-type-tile--${type}`]: true,
|
|
60
21
|
'co-file-type-tile--mono': !this.colorTags,
|
|
@@ -64,7 +25,7 @@ export class CoFileTypeTile {
|
|
|
64
25
|
borderRadius: `${this.radius}px`,
|
|
65
26
|
background,
|
|
66
27
|
color,
|
|
67
|
-
} }, h("co-icon", { key: '
|
|
28
|
+
} }, h("co-icon", { key: 'c5245ababcc734116d4e71dd48e41bf66d02fdff', name: meta.icon, size: iconSize, weight: "fill" })));
|
|
68
29
|
}
|
|
69
30
|
static get is() { return "co-file-type-tile"; }
|
|
70
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Extension → type bucket. Unknown extensions fall back to `file`. */
|
|
2
|
+
export const EXT_TO_TYPE = {
|
|
3
|
+
pdf: 'pdf',
|
|
4
|
+
doc: 'doc',
|
|
5
|
+
docx: 'doc',
|
|
6
|
+
odt: 'doc',
|
|
7
|
+
txt: 'txt',
|
|
8
|
+
md: 'txt',
|
|
9
|
+
xls: 'sheet',
|
|
10
|
+
xlsx: 'sheet',
|
|
11
|
+
csv: 'sheet',
|
|
12
|
+
ods: 'sheet',
|
|
13
|
+
ppt: 'slides',
|
|
14
|
+
pptx: 'slides',
|
|
15
|
+
key: 'slides',
|
|
16
|
+
png: 'image',
|
|
17
|
+
jpg: 'image',
|
|
18
|
+
jpeg: 'image',
|
|
19
|
+
gif: 'image',
|
|
20
|
+
svg: 'image',
|
|
21
|
+
webp: 'image',
|
|
22
|
+
mp4: 'video',
|
|
23
|
+
mov: 'video',
|
|
24
|
+
webm: 'video',
|
|
25
|
+
fig: 'design',
|
|
26
|
+
ai: 'design',
|
|
27
|
+
psd: 'design',
|
|
28
|
+
sketch: 'design',
|
|
29
|
+
zip: 'zip',
|
|
30
|
+
rar: 'zip',
|
|
31
|
+
// Forwarded emails (tickets created from an inbox carry the original
|
|
32
|
+
// messages as attachments): `.eml` from Gmail/IMAP, `.msg` from Outlook.
|
|
33
|
+
eml: 'mail',
|
|
34
|
+
msg: 'mail',
|
|
35
|
+
};
|
|
36
|
+
/** Type → { icon, accent (foreground), tint (background) }. Exact values per design spec (audit 1.6). */
|
|
37
|
+
export const TYPE_META = {
|
|
38
|
+
pdf: { icon: 'file-pdf', accent: 'var(--co-color-secondary-rojo-100)', tint: 'rgb(255,236,236)' },
|
|
39
|
+
doc: { icon: 'file-text', accent: 'var(--co-color-primary-azul)', tint: 'var(--co-color-azul-100)' },
|
|
40
|
+
sheet: { icon: 'table', accent: 'var(--co-color-status-success)', tint: 'var(--co-color-verde-100)' },
|
|
41
|
+
slides: { icon: 'presentation-chart', accent: 'var(--co-color-secondary-guinda-100)', tint: 'var(--co-color-secondary-guinda-25)' },
|
|
42
|
+
image: { icon: 'image', accent: 'var(--co-color-secondary-violeta-100)', tint: 'rgb(233,232,255)' },
|
|
43
|
+
video: { icon: 'broadcast', accent: 'var(--co-color-secondary-naranja-100)', tint: 'rgb(255,236,220)' },
|
|
44
|
+
txt: { icon: 'text-align-left', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
45
|
+
design: { icon: 'sparkle', accent: 'var(--co-color-primary-rosado)', tint: 'var(--co-color-rosado-100)' },
|
|
46
|
+
zip: { icon: 'package', accent: 'var(--co-color-status-pending)', tint: 'var(--co-color-status-bg-pending)' },
|
|
47
|
+
mail: { icon: 'envelope-simple', accent: 'var(--co-color-secondary-turquesa-100)', tint: 'var(--co-color-secondary-turquesa-25)' },
|
|
48
|
+
file: { icon: 'file', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
49
|
+
};
|
|
50
|
+
/** Bucket for an extension: case-insensitive, a leading dot is ignored, unknown → `file`. */
|
|
51
|
+
export function resolveFileTileType(ext) {
|
|
52
|
+
var _a;
|
|
53
|
+
const key = (ext !== null && ext !== void 0 ? ext : '').trim().toLowerCase().replace(/^\./, '');
|
|
54
|
+
return (_a = EXT_TO_TYPE[key]) !== null && _a !== void 0 ? _a : 'file';
|
|
55
|
+
}
|
|
@@ -53,6 +53,13 @@ export class CoNumberField {
|
|
|
53
53
|
*/
|
|
54
54
|
this.hideControls = false;
|
|
55
55
|
this.focused = false;
|
|
56
|
+
/**
|
|
57
|
+
* El usuario VACIÓ un campo no-clearable (borró todo el texto). Sin clearable
|
|
58
|
+
* el vacío no se emite mientras se tipea (sigue editando), pero al salir
|
|
59
|
+
* commitea el piso (`min ?? 0`, handleBlur) — antes el blur repintaba el valor
|
|
60
|
+
* anterior y el borrado se perdía. Un campo que NACE vacío no levanta la marca.
|
|
61
|
+
*/
|
|
62
|
+
this.emptiedByUser = false;
|
|
56
63
|
// Stepping/clear son mutaciones PROGRAMÁTICAS: con el campo enfocado ni el
|
|
57
64
|
// @Watch (guard `focused`) ni el vdom (que copia el texto vivo) repintan, así
|
|
58
65
|
// que cada path escribe el input él mismo — si no, ArrowUp emite y persiste
|
|
@@ -94,6 +101,9 @@ export class CoNumberField {
|
|
|
94
101
|
this.value = null;
|
|
95
102
|
this.coChange.emit(null);
|
|
96
103
|
}
|
|
104
|
+
else {
|
|
105
|
+
this.emptiedByUser = true;
|
|
106
|
+
}
|
|
97
107
|
return;
|
|
98
108
|
}
|
|
99
109
|
if (raw === '-')
|
|
@@ -135,6 +145,9 @@ export class CoNumberField {
|
|
|
135
145
|
this.value = null;
|
|
136
146
|
this.coChange.emit(null);
|
|
137
147
|
}
|
|
148
|
+
else if (spliced === '') {
|
|
149
|
+
this.emptiedByUser = true;
|
|
150
|
+
}
|
|
138
151
|
return;
|
|
139
152
|
}
|
|
140
153
|
const num = parseFloat(spliced);
|
|
@@ -152,9 +165,13 @@ export class CoNumberField {
|
|
|
152
165
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
153
166
|
};
|
|
154
167
|
this.handleBlur = () => {
|
|
168
|
+
var _a;
|
|
155
169
|
this.focused = false;
|
|
170
|
+
// Vaciado a mano sin clearable: commitea el piso (ver emptiedByUser).
|
|
171
|
+
if (this.emptiedByUser)
|
|
172
|
+
this.emitValue((_a = this.min) !== null && _a !== void 0 ? _a : 0);
|
|
156
173
|
// Re-clamp on blur, but keep an empty field empty.
|
|
157
|
-
if (!this.isEmpty)
|
|
174
|
+
else if (!this.isEmpty)
|
|
158
175
|
this.emitValue(this.value);
|
|
159
176
|
// Repinta el texto canónico: si el clamp devolvió el MISMO valor que ya
|
|
160
177
|
// tenía el prop (tipear "-20" sobre 0 con min 0), el @Watch no dispara y el
|
|
@@ -253,6 +270,7 @@ export class CoNumberField {
|
|
|
253
270
|
return this.scaled ? n / 100 : n;
|
|
254
271
|
}
|
|
255
272
|
emitValue(next) {
|
|
273
|
+
this.emptiedByUser = false;
|
|
256
274
|
const clamped = this.clamp(next);
|
|
257
275
|
this.value = clamped;
|
|
258
276
|
this.coChange.emit(clamped);
|
|
@@ -281,6 +299,9 @@ export class CoNumberField {
|
|
|
281
299
|
this.value = null;
|
|
282
300
|
this.coChange.emit(null);
|
|
283
301
|
}
|
|
302
|
+
else {
|
|
303
|
+
this.emptiedByUser = true;
|
|
304
|
+
}
|
|
284
305
|
return;
|
|
285
306
|
}
|
|
286
307
|
if (cleaned === '-')
|
|
@@ -302,18 +323,18 @@ export class CoNumberField {
|
|
|
302
323
|
return this.scaled && !this.isEmpty ? '%' : null;
|
|
303
324
|
}
|
|
304
325
|
render() {
|
|
305
|
-
return (h("div", { key: '
|
|
326
|
+
return (h("div", { key: 'de7f3ae049ac5afcdf7d8a711c566b947fa7e151', class: {
|
|
306
327
|
'co-number-field': true,
|
|
307
328
|
'co-number-field--disabled': this.disabled,
|
|
308
329
|
'co-number-field--focused': this.focused,
|
|
309
330
|
[`co-number-field--${this.size}`]: true,
|
|
310
331
|
[`co-number-field--${this.status}`]: this.status !== 'default',
|
|
311
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
332
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: '3a6c96b2987f0502334a23048f8693745589e965', class: "co-number-field__labels" }, this.label && h("label", { key: '7e0c9c08e93f10f6e18143d038ea8810a0f156b8', class: "co-number-field__label" }, this.label, h(RequiredMark, { key: '88b110f3d59908c27d182533100220ff8a65bb66', required: this.required })), this.secondaryLabel && h("span", { key: '5dd9219f995fc59ce557c8ba2b5dfea2d7cb56ef', class: "co-number-field__secondary-label" }, this.secondaryLabel))), h("div", { key: 'e2079dd9e28daf904057106167cd368de906daba', class: "co-number-field__row", part: "row" }, !this.hideControls && (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" }, h("co-icon", { key: '61aafdc7c083ea39b9b65b87d267df63b91cb8d4', name: "minus", size: 16 }))), h("input", { key: 'e088482da6c9fe1e02abe5bcae2611f157be83ed', ref: el => (this.inputEl = el), class: "co-number-field__input", type: "text", inputMode: "decimal",
|
|
312
333
|
// Mismo guard `focused` que el @Watch: mientras el usuario edita, su
|
|
313
334
|
// texto manda. Sin esto, el re-render que dispara emitValue repinta
|
|
314
335
|
// el input desde el NÚMERO y se come el texto en construcción
|
|
315
336
|
// ("34,640.00" pegado quedaba "34,640"; un "12." perdería el punto).
|
|
316
|
-
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 && (h("span", { key: '
|
|
337
|
+
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 && (h("span", { key: '2a7bc2f465844ccb9db7017c1b3782625e784c05', class: "co-number-field__affix", "aria-hidden": "true" }, this.affixText)), this.clearable && !this.isEmpty && !this.disabled && (h("button", { key: '06e40ddc080297db49823f17eeeaba313f68fafd', class: "co-number-field__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: 'f69d2f6bf5cb4cd6731d55f873fd03d21eb0f42e', name: "x-circle", size: 16, weight: "fill" }))), h("slot", { key: 'd16df6468bf0f514ce183e36d555b5e8f97ff969', name: "suffix" }), !this.hideControls && (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" }, h("co-icon", { key: '7f546fa2885ebecc3f16129bdc815a1cea57f53f', name: "plus", size: 16 })))), this.helperText && (h("div", { key: 'e807bbe38823ee148e227baaac1feafd85f93c49', class: `co-number-field__helper co-number-field__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'e8bc48908cb9e53952e0bffeb898d0a4b0d2fef3', name: this.statusIcon, size: 14, weight: "fill", class: "co-number-field__helper-icon" }), h("span", { key: 'c00dc9f3bd966988f6a2546a360ede337de383e4', class: "co-number-field__helper-text" }, this.helperText)))));
|
|
317
338
|
}
|
|
318
339
|
static get is() { return "co-number-field"; }
|
|
319
340
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import {
|
|
2
|
+
import { highlightSegments } from "../../utils/normalizeText";
|
|
3
3
|
import { initOverlayScroll } from "../../utils/overlayScroll";
|
|
4
4
|
import { buildRows, deriveMore, listReorderIds, liveSelectedOrder, nextActiveIndex, orderItems, parseItems, parseValue, selectedActiveIndex, shouldResnapshotOnTerm, virtualSlice, VIRTUAL_ITEM_HEIGHT, VIRTUAL_VIEWPORT_ITEMS, } from "./optionListLogic";
|
|
5
5
|
/**
|
|
@@ -696,10 +696,12 @@ export class CoOptionList {
|
|
|
696
696
|
}
|
|
697
697
|
renderLabelText(label) {
|
|
698
698
|
const term = this.effectiveHighlightTerm;
|
|
699
|
-
|
|
700
|
-
|
|
699
|
+
// TODAS las ocurrencias (substring-anywhere): "PR" en "Producto (U.D) - PR Completa"
|
|
700
|
+
// marca el "Pr" de Producto Y el "PR" — antes solo la primera.
|
|
701
|
+
const segs = term ? highlightSegments(label, term) : null;
|
|
702
|
+
if (!segs)
|
|
701
703
|
return label;
|
|
702
|
-
return
|
|
704
|
+
return segs.map((s) => (s.match ? h("span", { class: "co-option-list__match" }, s.text) : s.text));
|
|
703
705
|
}
|
|
704
706
|
/** Pill junto al label. Con `tooltip` va envuelto en un `co-tooltip` — el
|
|
705
707
|
* label del badge se abrevia (3 letras en el de workspace) y sin el texto
|
|
@@ -739,11 +741,11 @@ export class CoOptionList {
|
|
|
739
741
|
const selectedIds = this.selectedIds;
|
|
740
742
|
const { hasMore, remaining } = deriveMore(this.parsedItems.length, this.total, this.hasMore);
|
|
741
743
|
const showClear = !!this.clearOptionLabel && selectedIds.length > 0;
|
|
742
|
-
return (h("div", { key: '
|
|
744
|
+
return (h("div", { key: '30f39e9cfe2472f1083768b6e974aa48672e63d0', class: "co-option-list", onKeyDown: this.onRootKeyDown }, this.searchable && (h("div", { key: 'f1c125c141ca8ceebae5c1ed0c786919c31805b3', class: "co-option-list__search", part: "search" }, h("co-icon", { key: 'd56810ca205984e7b2c56546930ce25ca70fda68', name: "magnifying-glass", size: 16 }), h("input", { key: 'a85b35debe7b14c604a3262c7c04ee3b9ca41a6a', 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" }))), h("div", { key: 'ea5eecc218a228e07dd05d8f963518b4a8e0039f', class: "co-option-list__options", part: "options", role: "listbox", "aria-multiselectable": this.multiple ? 'true' : 'false', ref: (el) => (this.optionsEl = el), onScroll: this.onNativeScroll }, h("div", { key: 'b27071cb3d629022fa6e926050fdc17b2051ef98', class: "co-option-list__inner" }, showClear && (h("button", { key: '443791f8ee2d1f05a16c4002573264acf0a8de1b', class: "co-option-list__clear-row", type: "button", onClick: () => this.coClearSelection.emit() }, h("co-icon", { key: 'ebe7e65669ff9eb76922ef76e21b9209658a444f', name: "x-circle", size: 14 }), h("span", { key: '82d2bcceb41ec5370e60ea9e25af91a2cbf11e70' }, this.clearOptionLabel))), this.loading && items.length === 0 && (h("div", { key: '9f60fedc78ee66d198623a5e3ac9b0f1569ddef4', class: "co-option-list__loading" }, h("co-loader", { key: 'ab7b1947e03af880cc608bef8639d7dc882a53b7', size: "sm" }))), !this.loading && items.length === 0 && (h("div", { key: '6b0870e6c5b2c25e2854431a28a2d6b56253ecf2', class: "co-option-list__empty" }, h("co-icon", { key: '302d71e23e0d56104dfd04948201630ddbb4b078', name: "magnifying-glass", size: 20 }), h("span", { key: 'fc580f9a50974ab22a7b648dbbe4ca17340094d8' }, this.emptyMessage))), items.length > 0 && this.virtual
|
|
743
745
|
? this.renderVirtual(items, selectedIds)
|
|
744
746
|
: buildRows(items).map((row) => row.kind === 'header'
|
|
745
747
|
? h("div", { class: "co-option-list__group", role: "presentation" }, row.label)
|
|
746
|
-
: this.renderRow(row.item, row.index, selectedIds)), this.loading && items.length > 0 && (h("div", { key: '
|
|
748
|
+
: this.renderRow(row.item, row.index, selectedIds)), this.loading && items.length > 0 && (h("div", { key: '606a674960e4d16198ef36de4686de91ad742dde', class: "co-option-list__loading-more" }, h("co-loader", { key: '933613b7b606399cd9eea3f877a4b2c77f269785', size: "sm" }))), !this.loading && hasMore && remaining > 0 && (h("div", { key: '6a6220513b6db222b57155c54afa805519e4b1b8', class: "co-option-list__more" }, remaining, " more results")))), h("slot", { key: '4d952742c39335d9f19c2e45f58ae6be3306857d', name: "footer" })));
|
|
747
749
|
}
|
|
748
750
|
static get is() { return "co-option-list"; }
|
|
749
751
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ¿Un `click` sobre el fondo del overlay es un gesto de cierre?
|
|
3
|
+
*
|
|
4
|
+
* El navegador despacha `click` al ANCESTRO COMÚN de donde empezó y donde
|
|
5
|
+
* terminó la pulsación: seleccionar texto dentro de un modal y soltar fuera
|
|
6
|
+
* producía un `click` en el fondo y cerraba el modal (con lo editado adentro).
|
|
7
|
+
* Solo cuenta si la pulsación entera —down, up y click— ocurrió sobre el MISMO
|
|
8
|
+
* elemento (`composedPath()[0]`, para ver a través de shadow roots).
|
|
9
|
+
*/
|
|
10
|
+
export function isBackdropDismiss(downTarget, upTarget, clickTarget) {
|
|
11
|
+
return downTarget !== null && downTarget === upTarget && upTarget === clickTarget;
|
|
12
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { afterEventFor } from "./overlayAfterClose";
|
|
3
|
+
import { isBackdropDismiss } from "./backdropDismiss";
|
|
3
4
|
import { getFocusableElements, resolveTabIndex } from "./focusTrap";
|
|
4
5
|
/**
|
|
5
6
|
* Module-level body-scroll lock shared by every overlay instance.
|
|
@@ -51,8 +52,26 @@ export class CoOverlay {
|
|
|
51
52
|
this.closeOnEscape = false;
|
|
52
53
|
/** Whether THIS instance currently holds a scroll lock (prevents double-count). */
|
|
53
54
|
this.hasLock = false;
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
// Origen de la pulsación en curso (ver isBackdropDismiss): un drag que
|
|
56
|
+
// empieza dentro del contenido y suelta en el fondo NO es un cierre.
|
|
57
|
+
this.pressDownTarget = null;
|
|
58
|
+
this.pressUpTarget = null;
|
|
59
|
+
this.handlePointerDown = (e) => {
|
|
60
|
+
var _a;
|
|
61
|
+
this.pressDownTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
62
|
+
this.pressUpTarget = null;
|
|
63
|
+
};
|
|
64
|
+
this.handlePointerUp = (e) => {
|
|
65
|
+
var _a;
|
|
66
|
+
this.pressUpTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
67
|
+
};
|
|
68
|
+
this.handleClick = (e) => {
|
|
69
|
+
var _a;
|
|
70
|
+
const dismiss = isBackdropDismiss(this.pressDownTarget, this.pressUpTarget, (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null);
|
|
71
|
+
this.pressDownTarget = null;
|
|
72
|
+
this.pressUpTarget = null;
|
|
73
|
+
if (dismiss)
|
|
74
|
+
this.coClose.emit();
|
|
56
75
|
};
|
|
57
76
|
this.handleTransitionEnd = (e) => {
|
|
58
77
|
if (e.target !== this.overlayEl)
|
|
@@ -189,7 +208,7 @@ export class CoOverlay {
|
|
|
189
208
|
focusables[nextIndex].focus();
|
|
190
209
|
}
|
|
191
210
|
render() {
|
|
192
|
-
return (h("div", { key: '
|
|
211
|
+
return (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 }, h("slot", { key: '8ed7f244bfe88f3d38b9e1f6720b0a191529f6f1' })));
|
|
193
212
|
}
|
|
194
213
|
static get is() { return "co-overlay"; }
|
|
195
214
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
3
|
import { DIAL_CODES, DIAL_CODE_MAP } from "./dial-codes";
|
|
4
|
-
import {
|
|
4
|
+
import { highlightSegments, rankByMatch } from "../../utils/normalizeText";
|
|
5
5
|
/**
|
|
6
6
|
* Phone input with country code indicator. Composes a country selector
|
|
7
7
|
* (flag + dial code) alongside a free-form phone number input.
|
|
@@ -63,10 +63,10 @@ export class CoPhoneField {
|
|
|
63
63
|
}
|
|
64
64
|
/** Country name with the matched substring wrapped for highlighting. */
|
|
65
65
|
renderName(name) {
|
|
66
|
-
const
|
|
67
|
-
if (!
|
|
66
|
+
const segs = this.searchQuery.trim() ? highlightSegments(name, this.searchQuery) : null;
|
|
67
|
+
if (!segs)
|
|
68
68
|
return name;
|
|
69
|
-
return
|
|
69
|
+
return segs.map((s) => (s.match ? h("span", { class: "co-phone-field__match" }, s.text) : s.text));
|
|
70
70
|
}
|
|
71
71
|
onValueChange(newVal) {
|
|
72
72
|
if (!newVal) {
|
|
@@ -159,7 +159,7 @@ export class CoPhoneField {
|
|
|
159
159
|
render() {
|
|
160
160
|
const entry = this.selectedEntry;
|
|
161
161
|
const statusClass = this.status !== 'default' ? `co-phone-field--${this.status}` : '';
|
|
162
|
-
return (h("div", { key: '
|
|
162
|
+
return (h("div", { key: '007dbe9a20cd410cb818f512d9f698afba6e821f', class: `co-phone-field co-phone-field--${this.size} ${statusClass} ${this.disabled ? 'co-phone-field--disabled' : ''}` }, this.label && (h("label", { key: 'a4c5c1b7e10de3098f7f50d74a3ca8703d41f465', class: "co-phone-field__label" }, this.label, h(RequiredMark, { key: 'bcd04f54711067258d1270814141b4b81324ee21', required: this.required }))), h("div", { key: 'a04a6996610ccd5007c54f5728a1158c951c50e9', class: "co-phone-field__container" }, h("button", { key: '317348de58e74afb6f545749c83670ed92eb61bb', type: "button", class: "co-phone-field__selector", disabled: this.disabled, onClick: () => this.handleToggleDropdown(), "aria-expanded": String(this.isOpen), "aria-haspopup": "listbox" }, entry ? (h("img", { class: "co-phone-field__flag", src: `https://flagcdn.com/w40/${entry.iso2.toLowerCase()}.png`, alt: entry.iso2 })) : (h("co-icon", { name: "phone", size: 16 })), h("span", { key: '122cd3a7b4f363554410c7a37df3331b91e4bc81', class: "co-phone-field__dial-code" }, entry ? entry.dialCode : ''), h("span", { key: '3d3d8691ba489bbe093f99a6141323f2620fd6a8', class: "co-phone-field__chevron" }, h("co-icon", { key: 'adab28c8fb4f1d6838dd0e400494656d0bc50812', name: "caret-down", size: 14 }))), h("input", { key: '13214ef8043c4984fcab73e7971e836039d8b469', class: "co-phone-field__input", type: "tel", placeholder: this.placeholder, value: this.numberPart, disabled: this.disabled, onInput: (e) => this.handleNumberInput(e) })), this.isOpen && (h("div", { key: 'b993dff8a4ad5ef53b7f50849591310ec3df54f5', class: "co-phone-field__dropdown", role: "listbox" }, h("div", { key: '95db7d412dbb49ebebda43e7dc13b9f763f2e3e1', class: "co-phone-field__search" }, h("input", { key: 'cd97d9422f0b2ee04de398a4ddd38500664d3828', class: "co-phone-field__search-input", type: "text", placeholder: "Search country...", value: this.searchQuery, onInput: (e) => this.handleSearchInput(e), autoFocus: true })), h("div", { key: 'f0a8c53ed8a8a2e212f6bb2da2883c3efa7eab1e', class: "co-phone-field__options" }, this.filteredCountries.map((d) => (h("button", { type: "button", key: d.iso2, class: `co-phone-field__option ${d.iso2 === this.selectedIso2 ? 'co-phone-field__option--selected' : ''}`, role: "option", "aria-selected": d.iso2 === this.selectedIso2 ? 'true' : 'false', onClick: () => this.handleCountrySelect(d) }, h("img", { class: "co-phone-field__option-flag", src: `https://flagcdn.com/w40/${d.iso2.toLowerCase()}.png`, alt: d.iso2 }), h("span", { class: "co-phone-field__option-name" }, this.renderName(d.name)), h("span", { class: "co-phone-field__option-code" }, d.dialCode))))))), this.helperText && (h("div", { key: 'c2b32d573c9c94720a403280a84547ad08c8a686', class: "co-phone-field__helper" }, this.statusIcon && (h("co-icon", { key: '9199cc2660052d07753d3a12b28a3ff60724c3ea', name: this.statusIcon, size: 14, weight: "fill", class: "co-phone-field__helper-icon" })), h("span", { key: '27462c9a1cefa4aa4cf43ab19924c1f59a399b68', class: "co-phone-field__helper-text" }, this.helperText)))));
|
|
163
163
|
}
|
|
164
164
|
static get is() { return "co-phone-field"; }
|
|
165
165
|
static get encapsulation() { return "shadow"; }
|
|
@@ -358,7 +358,7 @@ export class CoPopover {
|
|
|
358
358
|
"references": {
|
|
359
359
|
"PopoverPlacement": {
|
|
360
360
|
"location": "local",
|
|
361
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-popover/co-popover.tsx",
|
|
361
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-popover/co-popover.tsx",
|
|
362
362
|
"id": "src/components/co-popover/co-popover.tsx::PopoverPlacement"
|
|
363
363
|
}
|
|
364
364
|
}
|
|
@@ -219,7 +219,7 @@ export class CoRadioGroup {
|
|
|
219
219
|
"references": {
|
|
220
220
|
"RadioOption": {
|
|
221
221
|
"location": "local",
|
|
222
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-radio-group/co-radio-group.tsx",
|
|
222
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-radio-group/co-radio-group.tsx",
|
|
223
223
|
"id": "src/components/co-radio-group/co-radio-group.tsx::RadioOption"
|
|
224
224
|
}
|
|
225
225
|
}
|