@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
|
@@ -1321,7 +1321,7 @@ export class CoRefField {
|
|
|
1321
1321
|
"references": {
|
|
1322
1322
|
"RefFieldOption": {
|
|
1323
1323
|
"location": "local",
|
|
1324
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1324
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1325
1325
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
@@ -1462,7 +1462,7 @@ export class CoRefField {
|
|
|
1462
1462
|
"references": {
|
|
1463
1463
|
"RefFieldOption": {
|
|
1464
1464
|
"location": "local",
|
|
1465
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1465
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1466
1466
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
1467
1467
|
}
|
|
1468
1468
|
}
|
|
@@ -1483,7 +1483,7 @@ export class CoRefField {
|
|
|
1483
1483
|
"references": {
|
|
1484
1484
|
"RefFieldOption": {
|
|
1485
1485
|
"location": "local",
|
|
1486
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1486
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1487
1487
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
@@ -1522,7 +1522,7 @@ export class CoRefField {
|
|
|
1522
1522
|
},
|
|
1523
1523
|
"RefFieldOption": {
|
|
1524
1524
|
"location": "local",
|
|
1525
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1525
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-ref-field/co-ref-field.tsx",
|
|
1526
1526
|
"id": "src/components/co-ref-field/co-ref-field.tsx::RefFieldOption"
|
|
1527
1527
|
}
|
|
1528
1528
|
},
|
|
@@ -126,6 +126,28 @@ co-rich-text-editor {
|
|
|
126
126
|
border-top-right-radius: calc(var(--co-border-radius-xs) - 1px);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
/* ---- Toolbar at the bottom (`toolbar-position="bottom"`) ----
|
|
130
|
+
The row owns the separator (border-top) and shows the frame's surface; the
|
|
131
|
+
toolbar inside drops its own border/background (co-rich-text-toolbar
|
|
132
|
+
`:host([position="bottom"])`). `<slot name="toolbar-end">` (light DOM) is the
|
|
133
|
+
consumer's footer, rendered whenever the mode is bottom — toolbar or not. */
|
|
134
|
+
.co-rich-text-editor__toolbar-row {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: space-between;
|
|
138
|
+
gap: var(--co-spacing-md);
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
min-width: 0;
|
|
141
|
+
border-top: 1px solid var(--co-semantic-border-subtle);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.co-rich-text-editor--toolbar-bottom .co-rich-text-editor__toolbar {
|
|
145
|
+
/* Nothing to nest at the top any more (mirror of the top-corner rule above). */
|
|
146
|
+
border-top-left-radius: 0;
|
|
147
|
+
border-top-right-radius: 0;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
129
151
|
.co-rte-content {
|
|
130
152
|
min-height: 96px;
|
|
131
153
|
color: var(--co-semantic-text-default);
|
|
@@ -37,6 +37,13 @@ export class CoRichTextEditor {
|
|
|
37
37
|
this.autofocus = false;
|
|
38
38
|
/** Toolbar layout. `auto` uses the preset default. */
|
|
39
39
|
this.toolbar = 'auto';
|
|
40
|
+
/** Where the toolbar sits. `bottom` moves it under the content, into a row that also
|
|
41
|
+
* exposes a `toolbar-end` light-DOM slot (this component is `shadow: false`) for the
|
|
42
|
+
* consumer's footer (hint, submit). The row renders whenever the mode is `bottom`, even
|
|
43
|
+
* while the toolbar itself is hidden (disabled/readonly): keep the slotted child ALWAYS
|
|
44
|
+
* mounted and toggle its insides — a placeholder that comes and goes desyncs Stencil's
|
|
45
|
+
* slot relocation with the consumer's vdom. */
|
|
46
|
+
this.toolbarPosition = 'top';
|
|
40
47
|
/** Passthrough: shows the toolbar attachment button (host owns the files). */
|
|
41
48
|
this.attachmentsEnabled = false;
|
|
42
49
|
/** BCP-47 locale for UI strings (e.g. 'en', 'es-CO', 'pt-BR'). Default English. */
|
|
@@ -296,7 +303,10 @@ export class CoRichTextEditor {
|
|
|
296
303
|
}
|
|
297
304
|
}
|
|
298
305
|
sanitizeHtml(html) {
|
|
299
|
-
|
|
306
|
+
// Con las MISMAS features que cargaron el schema: sin ellas, un <img> con
|
|
307
|
+
// `features.image` o los attrs de menciones en un preset que no los lleva en
|
|
308
|
+
// su whitelist base se podaban EN SILENCIO al emitir (2026-09-18).
|
|
309
|
+
return this.rt.sanitize(html, this.preset, this.parsedFeatures);
|
|
300
310
|
}
|
|
301
311
|
buildOutput(editor) {
|
|
302
312
|
const empty = editor.isEmpty;
|
|
@@ -1987,12 +1997,19 @@ export class CoRichTextEditor {
|
|
|
1987
1997
|
const c = (((_a = dom === null || dom === void 0 ? void 0 : dom.closest) === null || _a === void 0 ? void 0 : _a.call(dom, '[data-resize-container]')) || dom);
|
|
1988
1998
|
if (!c)
|
|
1989
1999
|
return true;
|
|
1990
|
-
|
|
2000
|
+
const layout = node.attrs.imageLayout || 'inline';
|
|
2001
|
+
c.dataset.imageLayout = layout;
|
|
1991
2002
|
// Neutralise any absolute positioning baked by the old fixed-page model.
|
|
1992
2003
|
c.style.position = '';
|
|
1993
2004
|
c.style.left = '';
|
|
1994
2005
|
c.style.top = '';
|
|
1995
2006
|
c.style.zIndex = '';
|
|
2007
|
+
// The resize NodeView pins `display: inline-flex` INLINE on the container, which
|
|
2008
|
+
// beats the stylesheet's `display: block` for `center` / `full-width`: the editor
|
|
2009
|
+
// showed those images inline-left while the viewer (and the sent email) centred
|
|
2010
|
+
// them (2026-09-17). Clear it for block layouts so the CSS rule can apply; the
|
|
2011
|
+
// inline value is restored for flow layouts so the resize handles keep working.
|
|
2012
|
+
c.style.display = layout === 'center' || layout === 'full-width' ? '' : 'inline-flex';
|
|
1996
2013
|
return true;
|
|
1997
2014
|
});
|
|
1998
2015
|
}
|
|
@@ -2034,7 +2051,12 @@ export class CoRichTextEditor {
|
|
|
2034
2051
|
render() {
|
|
2035
2052
|
const showToolbar = this.resolvedToolbar !== 'none' && !this.readonly && !this.disabled;
|
|
2036
2053
|
const showCount = this.showCharacterCount || this.maxLength != null;
|
|
2037
|
-
|
|
2054
|
+
const bottom = this.toolbarPosition === 'bottom';
|
|
2055
|
+
const toolbar = showToolbar && (h("co-rich-text-toolbar", { key: '0df30a57a843cbcd967ffd254ae0e54bee448902', class: "co-rich-text-editor__toolbar", part: "toolbar", variant: this.resolvedToolbar, position: this.toolbarPosition, disabled: this.disabled || this.readonly, locale: this.locale, attachmentsEnabled: this.attachmentsEnabled, attachmentAccept: this.attachmentAccept, onCoAttachmentsSelected: (e) => {
|
|
2056
|
+
e.stopPropagation();
|
|
2057
|
+
this.coAttachmentsSelected.emit(e.detail);
|
|
2058
|
+
}, ref: (el) => (this.toolbarEl = el) }));
|
|
2059
|
+
return (h("div", { key: '03be9df0d50d00a3cf889b3404c4f347626aa27c', class: {
|
|
2038
2060
|
'co-rich-text-editor': true,
|
|
2039
2061
|
'co-rich-text-editor--focused': this.hasFocus,
|
|
2040
2062
|
'co-rich-text-editor--disabled': this.disabled,
|
|
@@ -2042,10 +2064,8 @@ export class CoRichTextEditor {
|
|
|
2042
2064
|
'co-rich-text-editor--loading': !this.ready,
|
|
2043
2065
|
[`co-rich-text-editor--${this.status}`]: this.status !== 'default',
|
|
2044
2066
|
'co-rich-text-editor--flat': this.variant === 'flat',
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
this.coAttachmentsSelected.emit(e.detail);
|
|
2048
|
-
}, ref: (el) => (this.toolbarEl = el) })), h("div", { key: 'af3c512a9ec4ed3dc62d83b8acbd13132c84f349', class: "co-rich-text-editor__box" }, h("div", { key: '3cacb60bf24487d631ec3e7153313b3ed940ea8e', class: "co-rte-content", part: "content", role: "textbox", "aria-multiline": "true", "aria-label": this.label, "aria-required": this.required ? 'true' : undefined, "aria-invalid": this.status === 'error' ? 'true' : undefined, ref: (el) => (this.contentEl = el) }))), h("div", { key: 'ac6511ee617587f29a55adeb5ef9840be559adcd', class: "co-rich-text-editor__footer" }, this.helperText && (h("div", { key: '8ae2c198a948e553d22111bad15d5119c7ee090f', class: `co-rich-text-editor__helper co-rich-text-editor__helper--${this.status}`, part: "helper" }, h("co-icon", { key: 'a764d0daeeaeee64fae43c2358cdad9ecfe89b13', name: this.helperIcon, size: 14 }), h("span", { key: 'c1efcf1a97de016fa78a408306696cc0f4b29f29' }, this.helperText))), showCount && (h("span", { key: 'c68f01b407e6b2aa17582b58244b147825729138', class: "co-rich-text-editor__count", ref: (el) => (this.charCountEl = el) }, this.charCount, this.maxLength != null ? ` / ${this.maxLength}` : '')))));
|
|
2067
|
+
'co-rich-text-editor--toolbar-bottom': bottom,
|
|
2068
|
+
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: 'ae732219465a376af19e771e63589c955be37c4b', class: "co-rich-text-editor__labels" }, this.label && h("label", { key: 'd316724c4f4bcbf55adf582b8ad40c6c45fba407', class: "co-rich-text-editor__label", part: "label" }, this.label), this.secondaryLabel && (h("span", { key: '3cca63f6dfa2335dcd7122eb734205d4fd86a90f', class: "co-rich-text-editor__secondary-label" }, this.secondaryLabel)))), h("div", { key: '620bd101dd94684f7b2d533401717eeb7421593c', class: "co-rich-text-editor__frame" }, !bottom && toolbar, h("div", { key: 'a20f163022dd1c6e23dfc222786ddf0fc6f9b3ac', class: "co-rich-text-editor__box" }, h("div", { key: 'd678e095ae36610895cb466c1a15c722b46d4483', class: "co-rte-content", part: "content", role: "textbox", "aria-multiline": "true", "aria-label": this.label, "aria-required": this.required ? 'true' : undefined, "aria-invalid": this.status === 'error' ? 'true' : undefined, ref: (el) => (this.contentEl = el) })), h("slot", { key: '62127cb0a34e7f43ceadcb20ef724aba0524fa69', name: "content-end" }), bottom && (h("div", { key: '99d574e7cbb2a115a243288b770cb03f1892ff93', class: "co-rich-text-editor__toolbar-row", part: "toolbar-row" }, toolbar, h("slot", { key: 'b9b971930ddda8d118c8b6d204fad8d41d25468e', name: "toolbar-end" })))), h("div", { key: 'caafa3f153192eee6efa7679dafa376dea69b150', class: "co-rich-text-editor__footer" }, this.helperText && (h("div", { key: '8d2ab21ababab2c14c912f8ffd6945001fca62f7', class: `co-rich-text-editor__helper co-rich-text-editor__helper--${this.status}`, part: "helper" }, h("co-icon", { key: 'b60df4c320b9356a87df39179c75360f91e858bf', name: this.helperIcon, size: 14 }), h("span", { key: 'd56108257c9bba2332e434d6240f4f387e2411f6' }, this.helperText))), showCount && (h("span", { key: '7973c2996e24ec991115fe4932915a9aefc1b495', class: "co-rich-text-editor__count", ref: (el) => (this.charCountEl = el) }, this.charCount, this.maxLength != null ? ` / ${this.maxLength}` : '')))));
|
|
2049
2069
|
}
|
|
2050
2070
|
static get is() { return "co-rich-text-editor"; }
|
|
2051
2071
|
static get originalStyleUrls() {
|
|
@@ -2348,7 +2368,7 @@ export class CoRichTextEditor {
|
|
|
2348
2368
|
"mutable": false,
|
|
2349
2369
|
"complexType": {
|
|
2350
2370
|
"original": "ToolbarVariant",
|
|
2351
|
-
"resolved": "\"auto\" | \"basic\" | \"compact\" | \"compact-assets\" | \"full\" | \"none\" | \"notes\"",
|
|
2371
|
+
"resolved": "\"auto\" | \"basic\" | \"compact\" | \"compact-assets\" | \"email\" | \"full\" | \"none\" | \"notes\"",
|
|
2352
2372
|
"references": {
|
|
2353
2373
|
"ToolbarVariant": {
|
|
2354
2374
|
"location": "import",
|
|
@@ -2370,6 +2390,26 @@ export class CoRichTextEditor {
|
|
|
2370
2390
|
"attribute": "toolbar",
|
|
2371
2391
|
"defaultValue": "'auto'"
|
|
2372
2392
|
},
|
|
2393
|
+
"toolbarPosition": {
|
|
2394
|
+
"type": "string",
|
|
2395
|
+
"mutable": false,
|
|
2396
|
+
"complexType": {
|
|
2397
|
+
"original": "'top' | 'bottom'",
|
|
2398
|
+
"resolved": "\"bottom\" | \"top\"",
|
|
2399
|
+
"references": {}
|
|
2400
|
+
},
|
|
2401
|
+
"required": false,
|
|
2402
|
+
"optional": false,
|
|
2403
|
+
"docs": {
|
|
2404
|
+
"tags": [],
|
|
2405
|
+
"text": "Where the toolbar sits. `bottom` moves it under the content, into a row that also\nexposes a `toolbar-end` light-DOM slot (this component is `shadow: false`) for the\nconsumer's footer (hint, submit). The row renders whenever the mode is `bottom`, even\nwhile the toolbar itself is hidden (disabled/readonly): keep the slotted child ALWAYS\nmounted and toggle its insides \u2014 a placeholder that comes and goes desyncs Stencil's\nslot relocation with the consumer's vdom."
|
|
2406
|
+
},
|
|
2407
|
+
"getter": false,
|
|
2408
|
+
"setter": false,
|
|
2409
|
+
"reflect": true,
|
|
2410
|
+
"attribute": "toolbar-position",
|
|
2411
|
+
"defaultValue": "'top'"
|
|
2412
|
+
},
|
|
2373
2413
|
"features": {
|
|
2374
2414
|
"type": "string",
|
|
2375
2415
|
"mutable": false,
|
|
@@ -843,3 +843,55 @@
|
|
|
843
843
|
border-color: var(--co-color-base-negro, #1a1a1a);
|
|
844
844
|
box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
|
|
845
845
|
}
|
|
846
|
+
|
|
847
|
+
/* ── Bottom placement (editor `toolbar-position="bottom"`) ──
|
|
848
|
+
The editor's toolbar row paints the separator (border-top) and the surface,
|
|
849
|
+
so the toolbar drops its own bottom border, background and corner rounding. */
|
|
850
|
+
:host([position="bottom"]) {
|
|
851
|
+
background: transparent;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
:host([position="bottom"]) .co-rich-text-toolbar {
|
|
855
|
+
border-bottom: 0;
|
|
856
|
+
background: transparent;
|
|
857
|
+
border-radius: 0;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
/* With the toolbar at the foot of the editor every panel that hangs off a button
|
|
861
|
+
(`top: 100%`) would open downwards into the viewport edge and get clipped
|
|
862
|
+
(suite-v2 message templates, 2026-09-17). Anchor them ABOVE the button instead;
|
|
863
|
+
the gap flips with them. */
|
|
864
|
+
:host([position="bottom"]) .co-rich-text-toolbar__popover {
|
|
865
|
+
top: auto;
|
|
866
|
+
bottom: 100%;
|
|
867
|
+
margin-top: 0;
|
|
868
|
+
margin-bottom: var(--co-spacing-xs, 4px);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
:host([position="bottom"]) .co-rich-text-toolbar__dropdown {
|
|
872
|
+
top: auto;
|
|
873
|
+
bottom: 100%;
|
|
874
|
+
margin-top: 0;
|
|
875
|
+
margin-bottom: var(--co-spacing-xs, 4px);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
:host([position="bottom"]) .co-rich-text-toolbar__color-picker {
|
|
879
|
+
top: auto;
|
|
880
|
+
bottom: 100%;
|
|
881
|
+
margin-top: 0;
|
|
882
|
+
margin-bottom: var(--co-spacing-xs, 4px);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
:host([position="bottom"]) .co-rich-text-toolbar__table-picker {
|
|
886
|
+
top: auto;
|
|
887
|
+
bottom: 100%;
|
|
888
|
+
margin-top: 0;
|
|
889
|
+
margin-bottom: var(--co-spacing-xs, 4px);
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
:host([position="bottom"]) .co-rich-text-toolbar__listpicker {
|
|
893
|
+
top: auto;
|
|
894
|
+
bottom: 100%;
|
|
895
|
+
margin-top: 0;
|
|
896
|
+
margin-bottom: var(--co-spacing-xs, 4px);
|
|
897
|
+
}
|
|
@@ -14,6 +14,9 @@ export class CoRichTextToolbar {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
/** Toolbar layout variant. */
|
|
16
16
|
this.variant = 'basic';
|
|
17
|
+
/** Placement inside co-rich-text-editor. `bottom` drops the toolbar's own bottom
|
|
18
|
+
* border/background/rounding: the editor's toolbar row paints the separator. */
|
|
19
|
+
this.position = 'top';
|
|
17
20
|
this.disabled = false;
|
|
18
21
|
/** BCP-47 locale for UI strings (e.g. 'en', 'es-CO', 'pt-BR'). Default English. */
|
|
19
22
|
this.locale = 'en';
|
|
@@ -1143,8 +1146,8 @@ export class CoRichTextToolbar {
|
|
|
1143
1146
|
"type": "string",
|
|
1144
1147
|
"mutable": false,
|
|
1145
1148
|
"complexType": {
|
|
1146
|
-
"original": "'none' | 'compact' | 'compact-assets' | 'basic' | 'notes' | 'full'",
|
|
1147
|
-
"resolved": "\"basic\" | \"compact\" | \"compact-assets\" | \"full\" | \"none\" | \"notes\"",
|
|
1149
|
+
"original": "'none' | 'compact' | 'compact-assets' | 'basic' | 'notes' | 'email' | 'full'",
|
|
1150
|
+
"resolved": "\"basic\" | \"compact\" | \"compact-assets\" | \"email\" | \"full\" | \"none\" | \"notes\"",
|
|
1148
1151
|
"references": {}
|
|
1149
1152
|
},
|
|
1150
1153
|
"required": false,
|
|
@@ -1159,6 +1162,26 @@ export class CoRichTextToolbar {
|
|
|
1159
1162
|
"attribute": "variant",
|
|
1160
1163
|
"defaultValue": "'basic'"
|
|
1161
1164
|
},
|
|
1165
|
+
"position": {
|
|
1166
|
+
"type": "string",
|
|
1167
|
+
"mutable": false,
|
|
1168
|
+
"complexType": {
|
|
1169
|
+
"original": "'top' | 'bottom'",
|
|
1170
|
+
"resolved": "\"bottom\" | \"top\"",
|
|
1171
|
+
"references": {}
|
|
1172
|
+
},
|
|
1173
|
+
"required": false,
|
|
1174
|
+
"optional": false,
|
|
1175
|
+
"docs": {
|
|
1176
|
+
"tags": [],
|
|
1177
|
+
"text": "Placement inside co-rich-text-editor. `bottom` drops the toolbar's own bottom\nborder/background/rounding: the editor's toolbar row paints the separator."
|
|
1178
|
+
},
|
|
1179
|
+
"getter": false,
|
|
1180
|
+
"setter": false,
|
|
1181
|
+
"reflect": true,
|
|
1182
|
+
"attribute": "position",
|
|
1183
|
+
"defaultValue": "'top'"
|
|
1184
|
+
},
|
|
1162
1185
|
"disabled": {
|
|
1163
1186
|
"type": "boolean",
|
|
1164
1187
|
"mutable": false,
|
|
@@ -33,6 +33,11 @@
|
|
|
33
33
|
font-weight: 600;
|
|
34
34
|
line-height: 1.3;
|
|
35
35
|
}
|
|
36
|
+
/* Misma escala que el editor (co-rich-text-editor.css, .ProseMirror h1-h3):
|
|
37
|
+
sin esto el UA deja h1-h3 en em relativos y h4 en 1em = tamaño del cuerpo. */
|
|
38
|
+
.co-rich-text-viewer h1 { font-size: var(--co-font-size-28, 28px); }
|
|
39
|
+
.co-rich-text-viewer h2 { font-size: var(--co-font-size-20, 20px); }
|
|
40
|
+
.co-rich-text-viewer h3 { font-size: var(--co-font-size-16, 16px); }
|
|
36
41
|
|
|
37
42
|
.co-rich-text-viewer ul,
|
|
38
43
|
.co-rich-text-viewer ol {
|
|
@@ -12,7 +12,9 @@ import DOMPurify from "dompurify";
|
|
|
12
12
|
* @part empty - The empty-state element
|
|
13
13
|
*/
|
|
14
14
|
const ALLOWED_TAGS = {
|
|
15
|
-
|
|
15
|
+
// Espejo de SANITIZE_CONFIGS.comment (rich-text/sanitizer.ts): más ancho que
|
|
16
|
+
// el schema del editor a propósito — el viewer pinta HTML de integraciones.
|
|
17
|
+
comment: ['p', 'br', 'strong', 'em', 'a', 'span', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4'],
|
|
16
18
|
task: ['p', 'br', 'strong', 'em', 'a', 'span', 'u', 's', 'code', 'ul', 'ol', 'li', 'blockquote'],
|
|
17
19
|
notes: ['p', 'br', 'strong', 'em', 'a', 'span', 'u', 's', 'code', 'ul', 'ol', 'li', 'blockquote', 'mark'],
|
|
18
20
|
email: ['p', 'br', 'strong', 'em', 'a', 'span', 'u', 's', 'code', 'ul', 'ol', 'li', 'blockquote', 'h2', 'h3', 'div', 'img'],
|
|
@@ -55,6 +57,19 @@ export class CoRichTextViewer {
|
|
|
55
57
|
}
|
|
56
58
|
sanitizeHtml(html) {
|
|
57
59
|
var _a, _b;
|
|
60
|
+
// Links externos SIEMPRE en pestaña nueva: el viewer conservaba target/rel si
|
|
61
|
+
// venían (los estampa el editor) pero nunca los agregaba, y el HTML de correos
|
|
62
|
+
// entrantes llega pelado → navegaba en la misma pestaña y tiraba la SPA
|
|
63
|
+
// (2026-09-18). Solo http(s); mailto:/tel: se dejan al navegador.
|
|
64
|
+
DOMPurify.addHook('afterSanitizeAttributes', (node) => {
|
|
65
|
+
if (node.tagName !== 'A')
|
|
66
|
+
return;
|
|
67
|
+
const href = node.getAttribute('href') || '';
|
|
68
|
+
if (!/^https?:\/\//i.test(href))
|
|
69
|
+
return;
|
|
70
|
+
node.setAttribute('target', '_blank');
|
|
71
|
+
node.setAttribute('rel', 'noopener noreferrer nofollow');
|
|
72
|
+
});
|
|
58
73
|
DOMPurify.addHook('uponSanitizeElement', (node, data) => {
|
|
59
74
|
var _a, _b;
|
|
60
75
|
// Only allow <input type="checkbox"> (task list checkboxes); strip others.
|
|
@@ -92,6 +107,7 @@ export class CoRichTextViewer {
|
|
|
92
107
|
}
|
|
93
108
|
finally {
|
|
94
109
|
DOMPurify.removeHook('uponSanitizeElement');
|
|
110
|
+
DOMPurify.removeHook('afterSanitizeAttributes');
|
|
95
111
|
}
|
|
96
112
|
}
|
|
97
113
|
async compute() {
|
|
@@ -13,11 +13,11 @@ export class CoRow {
|
|
|
13
13
|
this.size = 'sm';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: '415d9d352b0129f2e05182f0a928843fdb6b6321', class: {
|
|
17
17
|
'co-row': true,
|
|
18
18
|
[`co-row--${this.position}`]: true,
|
|
19
19
|
[`co-row--${this.size}`]: true,
|
|
20
|
-
}, part: "row" }, h("div", { key: '
|
|
20
|
+
}, part: "row" }, h("div", { key: 'af23c875f523e15a4891a7897ae76853d358f692', class: "co-row__prefix" }, h("slot", { key: 'fd3a54d31942ecd10e889f2691c1f6e2d94d2cf3', name: "prefix" })), h("div", { key: '884cad8bde957327b7814b03084da51bfeedb1e4', class: "co-row__content" }, h("slot", { key: 'aedd965fd4ef93597b02e5714fec0b19837544c8' })), h("div", { key: '228cb0a116920be271cc8969591cbe0c1ca8f9b9', class: "co-row__suffix" }, h("slot", { key: 'dee6339445cfe8fdb7a1adf82d795c16e7a16be3', name: "suffix" }))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "co-row"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -154,7 +154,7 @@ export class CoSegmentedBar {
|
|
|
154
154
|
"references": {
|
|
155
155
|
"CoSegment": {
|
|
156
156
|
"location": "local",
|
|
157
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-segmented-bar/co-segmented-bar.tsx",
|
|
157
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-segmented-bar/co-segmented-bar.tsx",
|
|
158
158
|
"id": "src/components/co-segmented-bar/co-segmented-bar.tsx::CoSegment"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { RequiredMark } from "../../utils/requiredMark";
|
|
3
3
|
import { OverlayScrollbars } from "overlayscrollbars";
|
|
4
|
-
import {
|
|
4
|
+
import { highlightSegments, rankByMatch } from "../../utils/normalizeText";
|
|
5
5
|
export class CoSelect {
|
|
6
6
|
constructor() {
|
|
7
7
|
/** Whether the field is required (renders a required marker on the label). */
|
|
@@ -443,10 +443,10 @@ export class CoSelect {
|
|
|
443
443
|
}
|
|
444
444
|
/** Option label with the matched substring wrapped for highlighting. */
|
|
445
445
|
renderLabel(label) {
|
|
446
|
-
const
|
|
447
|
-
if (!
|
|
446
|
+
const segs = this.searchable && this.searchText ? highlightSegments(label, this.searchText) : null;
|
|
447
|
+
if (!segs)
|
|
448
448
|
return label;
|
|
449
|
-
return
|
|
449
|
+
return segs.map((s) => (s.match ? h("span", { class: "co-select__match" }, s.text) : s.text));
|
|
450
450
|
}
|
|
451
451
|
getVirtualSlice(items) {
|
|
452
452
|
const { ITEM_HEIGHT, VIEWPORT_ITEMS, OVERSCAN } = CoSelect;
|
|
@@ -468,20 +468,20 @@ export class CoSelect {
|
|
|
468
468
|
const activeOptionId = this.isOpen && this.activeIndex >= 0 && this.activeIndex < options.length
|
|
469
469
|
? this.optionId(this.activeIndex)
|
|
470
470
|
: undefined;
|
|
471
|
-
return (h("div", { key: '
|
|
471
|
+
return (h("div", { key: '902da0519e9fe96401f5339a3b46a66c94efd3de', class: {
|
|
472
472
|
'co-select': true,
|
|
473
473
|
'co-select--open': this.isOpen,
|
|
474
474
|
'co-select--disabled': this.disabled,
|
|
475
475
|
[`co-select--${this.size}`]: true,
|
|
476
476
|
[`co-select--${this.status}`]: this.status !== 'default',
|
|
477
477
|
'co-select--flat': this.variant === 'flat',
|
|
478
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
478
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: '3faf027e94d30728d7715ebca758eb0d9cb41bc9', class: "co-select__labels" }, this.label && h("label", { key: 'a7267986158eae66be547356482df079e3670d44', class: "co-select__label" }, this.label, h(RequiredMark, { key: '5eaca0cfade91041b33edd07e648b1e22cb875f3', required: this.required })), this.secondaryLabel && h("span", { key: '3561fb5297dde4c128e9c888cdd00546c5e1b4c3', class: "co-select__secondary-label" }, this.secondaryLabel))), h("co-popover", { key: '63fc16eefafcb8ef870aba457be9e00f5dce6f32', open: this.isOpen, placement: "bottom-start", matchWidth: true, offset: 4, onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, h("div", { key: '6056ec2a5d85df9d8361f4b78f12eec6e2fe7749', slot: "trigger", class: "co-select__trigger", role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-label": this.label || this.ariaLabelText || undefined, "aria-disabled": this.disabled ? 'true' : undefined, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, tabIndex: this.disabled ? -1 : 0, ref: (el) => (this.triggerEl = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, this.iconLeft && h("co-icon", { key: '8877e366eba45e073a3481e7b86408763e103f6c', name: this.iconLeft, size: 16, class: "co-select__icon" }), ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.image) && (h("img", { key: '4f964e48dafff76a9fe04ed381b1f11113e351d6', class: "co-select__flag", src: this.selectedOption.image, alt: "" })), this.multiple && this.hasValue ? (h("div", { class: "co-select__chips" }, this.selectedValues.map((v) => {
|
|
479
479
|
const opt = this.parsedOptions.find((o) => o.value === v);
|
|
480
480
|
return (h("span", { class: "co-select__chip", key: v }, h("span", { class: "co-select__chip-label" }, opt ? opt.label : v), h("button", { class: "co-select__chip-remove", type: "button", tabIndex: -1, "aria-label": "Remove", onClick: (e) => {
|
|
481
481
|
e.stopPropagation();
|
|
482
482
|
this.handleOptionClick(v);
|
|
483
483
|
} }, h("co-icon", { name: "x", size: 12 }))));
|
|
484
|
-
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '
|
|
484
|
+
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '55a94e3d877ec0c50ae4ce544774c6e4330b5f5e', class: "co-select__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: 'b452121827aa8b2f341396b3376e82728bee5276', name: "x-circle", size: 16, weight: "fill" }))), h("co-icon", { key: '0ebc5a451bcb3f2f95a63ab600157e27cb445a9b', name: this.isOpen ? 'caret-up' : 'caret-down', size: 16, class: "co-select__caret" })), h("div", { key: '92b18226a02de73cbd245ab6827c3f5593aa08fc', class: "co-select__dropdown" }, this.isOpen && this.searchable && (h("div", { key: '68aec7a4ced328a00a1185078edbbfe4820d6582', class: "co-select__search" }, h("co-icon", { key: '1aa322cf22d4824bf6d2012b6dfc4e856360502a', name: "magnifying-glass", size: 16, class: "co-select__search-icon" }), h("input", { key: '62ec52d3369334f83709bc5219d5b3ca040c3ccb', class: "co-select__search-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchText, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, onInput: this.handleSearchInput, onKeyDown: this.handleNavKeyDown, ref: (el) => (this.searchInputEl = el) }))), this.isOpen && this.searchable && options.length === 0 && (h("div", { key: '86613208aa94d79b6aa503a6ed53c010cc1ba1f9', class: "co-select__empty" }, this.emptyText)), h("div", { key: 'a6b1f09abfbfb0171094079c3da7ac89764eb00f', class: "co-select__options", id: CoSelect.LISTBOX_ID, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, ref: (el) => (this.optionsContainerEl = el) }, this.isOpen && (() => {
|
|
485
485
|
const { totalHeight, startIdx, endIdx, offsetY } = this.getVirtualSlice(options);
|
|
486
486
|
return (
|
|
487
487
|
// Los wrappers del virtualizador van `presentation` para que las
|
|
@@ -497,7 +497,7 @@ export class CoSelect {
|
|
|
497
497
|
'co-select__option--active': index === this.activeIndex,
|
|
498
498
|
}, onClick: () => !isDisabled && this.handleOptionClick(opt.value) }, opt.image ? (h("img", { class: "co-select__option-flag", src: opt.image, alt: "", loading: "lazy" })) : opt.icon ? (h("co-icon", { name: opt.icon, size: 20, class: "co-select__option-icon" })) : null, h("span", { class: "co-select__option-label" }, this.renderLabel(opt.label)), isSelected && h("co-icon", { name: "check", size: 16, class: "co-select__option-check" })));
|
|
499
499
|
}))));
|
|
500
|
-
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: '
|
|
500
|
+
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: '5f5d60d846092aed435e292a4652ad7016cb6aee', class: "co-select__footer", primaryLabel: this.footerPrimaryLabel, primaryIcon: "check", onCoPrimary: this.handleFooterPrimary })))), this.helperText && (h("div", { key: '72ebb3366ee45eaccce69f534611804f8f1dbc1c', class: `co-select__helper co-select__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: '2f2ad274cf521c3bd9f21d66d0fa9b7c87f7ba71', name: this.statusIcon, size: 14, class: "co-select__helper-icon" }), h("span", { key: '3e1ef4abb47a61d173e1942f5798caff97c2347e', class: "co-select__helper-text" }, this.helperText)))));
|
|
501
501
|
}
|
|
502
502
|
static get is() { return "co-select"; }
|
|
503
503
|
static get encapsulation() { return "shadow"; }
|
|
@@ -737,7 +737,7 @@ export class CoSelect {
|
|
|
737
737
|
"references": {
|
|
738
738
|
"SelectOption": {
|
|
739
739
|
"location": "local",
|
|
740
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-select/co-select.tsx",
|
|
740
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-select/co-select.tsx",
|
|
741
741
|
"id": "src/components/co-select/co-select.tsx::SelectOption"
|
|
742
742
|
}
|
|
743
743
|
}
|
|
@@ -57,7 +57,7 @@ export class CoSeparator {
|
|
|
57
57
|
style['--co-separator-inset-end'] = '0px';
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return (h("hr", { key: '
|
|
60
|
+
return (h("hr", { key: '164044b86003ca2ed8c15a2d82cc50922dfe8313', class: {
|
|
61
61
|
'co-separator': true,
|
|
62
62
|
'co-separator--vertical': this.vertical,
|
|
63
63
|
'co-separator--dark': this.dark,
|
|
@@ -10,10 +10,10 @@ export class CoSidebar {
|
|
|
10
10
|
this.mode = 'full';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("nav", { key: '
|
|
13
|
+
return (h("nav", { key: '3d14a99c008dd92798182b04d7049c1a9fb4a00c', class: {
|
|
14
14
|
'co-sidebar': true,
|
|
15
15
|
[`co-sidebar--${this.mode}`]: true,
|
|
16
|
-
}, part: "sidebar" }, h("div", { key: '
|
|
16
|
+
}, part: "sidebar" }, h("div", { key: '1bf5b8ebe9eb9836c01ac8c7b651aac8af2ebf3c', class: "co-sidebar__header", part: "header" }, h("slot", { key: 'ba0d88bf62955a61b3e2d297261b260845cbd98f', name: "header" })), h("div", { key: '793248e8020bd38e3da64e35ca8610cb85b17d4a', class: "co-sidebar__body", part: "body" }, h("slot", { key: 'a76928e89d8425846ad0859339ab35b465bf917e' })), h("div", { key: '4182d50c61913447ae78c670bba1ca1821cc763d', class: "co-sidebar__footer", part: "footer" }, h("slot", { key: 'bb20795e0acc8e1865f8b5d8568768eb5c5097ee', name: "footer" }))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "co-sidebar"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -702,7 +702,7 @@ export class CoSidebarNav {
|
|
|
702
702
|
"references": {
|
|
703
703
|
"NavigateDetail": {
|
|
704
704
|
"location": "local",
|
|
705
|
-
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-sidebar-nav/co-sidebar-nav.tsx",
|
|
705
|
+
"path": "/Users/agox/worktrees/cobalt-release-0.10.3/packages/core/src/components/co-sidebar-nav/co-sidebar-nav.tsx",
|
|
706
706
|
"id": "src/components/co-sidebar-nav/co-sidebar-nav.tsx::NavigateDetail"
|
|
707
707
|
}
|
|
708
708
|
}
|
|
@@ -50,7 +50,7 @@ export class CoSkeleton {
|
|
|
50
50
|
const style = { width: this.width };
|
|
51
51
|
if (this.height)
|
|
52
52
|
style.height = this.height;
|
|
53
|
-
return (h("div", { key: '
|
|
53
|
+
return (h("div", { key: '744fb805939c99587c4d0b72355da54d1f5aad43', class: {
|
|
54
54
|
'co-skeleton': true,
|
|
55
55
|
[`co-skeleton--${this.variant}`]: true,
|
|
56
56
|
'co-skeleton--revealed': this.revealed,
|
|
@@ -72,12 +72,12 @@ export class CoSlider {
|
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
74
|
const pct = this.percentage;
|
|
75
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: 'd6e0584e8c2f04f1b9a393f200a853a6acc0399c', class: {
|
|
76
76
|
'co-slider': true,
|
|
77
77
|
'co-slider--disabled': this.disabled,
|
|
78
78
|
'co-slider--dragging': this.dragging,
|
|
79
79
|
[`co-slider--${this.status}`]: this.status !== 'default',
|
|
80
|
-
} }, (this.label || this.secondaryLabel || this.showValue) && (h("div", { key: '
|
|
80
|
+
} }, (this.label || this.secondaryLabel || this.showValue) && (h("div", { key: 'a0eae621e367f1145bdd9bdde53fb024489d0812', class: "co-slider__labels" }, h("div", { key: '19e102fe586ccff3ad37bc7cd6b4dd4de5172be7', class: "co-slider__labels-left" }, this.label && h("label", { key: 'ad31ddd76acb9bf7bf25f07a7fad5206ab6eb689', class: "co-slider__label" }, this.label), this.secondaryLabel && h("span", { key: 'ccb7be2022de9d8d8ed1c7eeeac38b6d4711bd60', class: "co-slider__secondary-label" }, this.secondaryLabel)), this.showValue && h("span", { key: 'c38e8a050941184056441c94f6bcbfcc62522e62', class: "co-slider__value" }, this.value))), h("div", { key: 'c6cc971ea5dc3b4d30f8224ec359ae97a8ffa24a', class: "co-slider__track-wrapper", ref: el => (this.trackEl = el), onPointerDown: this.handlePointerDown }, h("div", { key: 'de241b0017db6f5934b2332b08b6709038379b2c', class: "co-slider__track" }, h("div", { key: '9b590f27f16839a6dba5f0e2eea7467a485f79c1', class: "co-slider__fill", style: { width: `${pct}%` } })), h("div", { key: 'c8820089a72ec566210550317233832ba84a9e0a', class: "co-slider__thumb", style: { left: `${pct}%` } })), this.showMarks && (h("div", { key: '2a40f01b836d29e453b691bc1f5f378166322e1e', class: "co-slider__marks" }, h("span", { key: '1f9dc67ca0e9c327766154a1a07a67c7e53efc68', class: "co-slider__mark" }, this.min), h("span", { key: '073c37ad99a45c05d7a0341e62ea9ed4e68d7acb', class: "co-slider__mark" }, this.max))), h("input", { key: 'fa18beabbcb2e26e86436bedc57de95f40c849f2', class: "co-slider__native", type: "range", min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, onInput: this.handleInputChange, "aria-label": this.label || 'Slider' }), this.helperText && (h("div", { key: 'e8e46da2806b049d29c34620acd5cadf3abb03c8', class: `co-slider__helper co-slider__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: '1802da1ab54a283d46eca9cbb0fe0bf4a381956c', name: this.statusIcon, size: 14, weight: "fill", class: "co-slider__helper-icon" }), h("span", { key: 'ab294efdeee8c4546a83b16b55e3600f8706b2d7', class: "co-slider__helper-text" }, this.helperText)))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "co-slider"; }
|
|
83
83
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,16 +29,16 @@ export class CoSwitch {
|
|
|
29
29
|
render() {
|
|
30
30
|
const hasLabels = this.label || this.secondaryLabel;
|
|
31
31
|
const hasHelper = !!this.helperText;
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '94410fce797382a4b25356d8b1325b5a75508d84', class: {
|
|
33
33
|
'co-switch-wrapper': true,
|
|
34
34
|
'co-switch-wrapper--disabled': this.disabled,
|
|
35
35
|
[`co-switch-wrapper--${this.status}`]: this.status !== 'default',
|
|
36
|
-
} }, h("div", { key: '
|
|
36
|
+
} }, h("div", { key: '9b0d491e7e33faaa476dedd4f0e8826c4fde1249', class: "co-switch-wrapper__row", onClick: this.handleClick }, h("button", { key: '6c7cc4ece2aff5fa089271cf47908cfcbc3d5827', role: "switch", "aria-checked": String(this.checked), "aria-label": this.label || '', class: {
|
|
37
37
|
'co-switch': true,
|
|
38
38
|
'co-switch--on': this.checked,
|
|
39
39
|
'co-switch--off': !this.checked,
|
|
40
40
|
'co-switch--disabled': this.disabled,
|
|
41
|
-
}, disabled: this.disabled, part: "track" }, h("span", { key: '
|
|
41
|
+
}, disabled: this.disabled, part: "track" }, h("span", { key: '3a55c9aa1cc925dd09ac4d2b7367f8fd627b9e19', class: "co-switch__thumb", part: "thumb" })), hasLabels && (h("div", { key: '450cf6e28979b72e7821c0fa6130333410207343', class: "co-switch-wrapper__labels" }, this.label && h("span", { key: '509f09430837fcba73ff248d80a44e8bb7e2175f', class: "co-switch-wrapper__label", part: "label" }, this.label, h(RequiredMark, { key: 'ff017ff012f698b054db7f43832e3fb94b3eec01', required: this.required })), this.secondaryLabel && (h("span", { key: 'd5d33606934cd0d69f0faa3eb8afe2c962a1f5ab', class: "co-switch-wrapper__secondary-label", part: "secondary-label" }, this.secondaryLabel))))), hasHelper && (h("div", { key: '1111d3b03f846f524b53510dd3c638db2a0d7753', class: `co-switch-wrapper__helper co-switch-wrapper__helper--${this.status}` }, this.statusIcon && (h("co-icon", { key: '0deb3c0d9e2b6a4e7a5b791b8f739ed0d1dc9f91', name: this.statusIcon, size: 14, weight: "fill", class: "co-switch-wrapper__helper-icon" })), h("span", { key: 'f769d1b5c2217f84517b58baf91b0db7952c9062', class: "co-switch-wrapper__helper-text" }, this.helperText)))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "co-switch"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,13 +21,13 @@ export class CoTab {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
const iconSize = this.variant === 'underline' ? 16 : this.size === 'large' ? 18 : 14;
|
|
24
|
-
return (h("button", { key: '
|
|
24
|
+
return (h("button", { key: '0d7312af81807baec7f7b0899d9a92186175b8eb', class: {
|
|
25
25
|
'co-tab': true,
|
|
26
26
|
[`co-tab--${this.size}`]: true,
|
|
27
27
|
[`co-tab--${this.variant}`]: true,
|
|
28
28
|
'co-tab--selected': this.selected,
|
|
29
29
|
'co-tab--disabled': this.disabled,
|
|
30
|
-
}, type: "button", role: "tab", "aria-selected": this.selected ? 'true' : 'false', disabled: this.disabled, part: "tab", onClick: this.handleClick }, this.iconLeft && (h("co-icon", { key: '
|
|
30
|
+
}, type: "button", role: "tab", "aria-selected": this.selected ? 'true' : 'false', disabled: this.disabled, part: "tab", onClick: this.handleClick }, this.iconLeft && (h("co-icon", { key: '8bef8688e8ea0ce2befc12efcbe5683de02f808d', name: this.iconLeft, size: iconSize })), h("span", { key: '860469720e5396d353e0a548b9526fbf64a3ac2d' }, this.label), this.badge && (h("span", { key: 'eb9b9749b6f56a1cb98044ccd5817f016a7e9747', class: "co-tab__badge", part: "badge" }, this.badge)), this.iconRight && (h("co-icon", { key: '001337e6ec2235244be4acffb930003f02acaf47', name: this.iconRight, size: iconSize }))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "co-tab"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,10 +49,10 @@ export class CoTabGroup {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h("div", { key: '
|
|
52
|
+
return (h("div", { key: 'f08c8fd752d5496f2699eeb3c67fa5d6dc106077', class: {
|
|
53
53
|
'co-tab-group': true,
|
|
54
54
|
[`co-tab-group--${this.variant}`]: true,
|
|
55
|
-
}, role: "tablist", part: "tab-group", onWheel: this.onWheel }, h("slot", { key: '
|
|
55
|
+
}, role: "tablist", part: "tab-group", onWheel: this.onWheel }, h("slot", { key: 'ffc3a7bfbf2efdd40e3f7e6dcf02e3b9e5026dc4', onSlotchange: this.onSlotChange })));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "co-tab-group"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|