@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
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-DH5lfRNj.js';
|
|
2
2
|
|
|
3
|
-
const coFileTypeTileCss = () => `:host{display:inline-flex}.co-file-type-tile{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box}`;
|
|
4
|
-
|
|
5
3
|
/** Extension → type bucket. Unknown extensions fall back to `file`. */
|
|
6
4
|
const EXT_TO_TYPE = {
|
|
7
5
|
pdf: 'pdf',
|
|
8
6
|
doc: 'doc',
|
|
9
7
|
docx: 'doc',
|
|
8
|
+
odt: 'doc',
|
|
10
9
|
txt: 'txt',
|
|
11
10
|
md: 'txt',
|
|
12
11
|
xls: 'sheet',
|
|
13
12
|
xlsx: 'sheet',
|
|
14
13
|
csv: 'sheet',
|
|
14
|
+
ods: 'sheet',
|
|
15
|
+
ppt: 'slides',
|
|
16
|
+
pptx: 'slides',
|
|
17
|
+
key: 'slides',
|
|
15
18
|
png: 'image',
|
|
16
19
|
jpg: 'image',
|
|
17
20
|
jpeg: 'image',
|
|
@@ -27,19 +30,34 @@ const EXT_TO_TYPE = {
|
|
|
27
30
|
sketch: 'design',
|
|
28
31
|
zip: 'zip',
|
|
29
32
|
rar: 'zip',
|
|
33
|
+
// Forwarded emails (tickets created from an inbox carry the original
|
|
34
|
+
// messages as attachments): `.eml` from Gmail/IMAP, `.msg` from Outlook.
|
|
35
|
+
eml: 'mail',
|
|
36
|
+
msg: 'mail',
|
|
30
37
|
};
|
|
31
38
|
/** Type → { icon, accent (foreground), tint (background) }. Exact values per design spec (audit 1.6). */
|
|
32
39
|
const TYPE_META = {
|
|
33
40
|
pdf: { icon: 'file-pdf', accent: 'var(--co-color-secondary-rojo-100)', tint: 'rgb(255,236,236)' },
|
|
34
41
|
doc: { icon: 'file-text', accent: 'var(--co-color-primary-azul)', tint: 'var(--co-color-azul-100)' },
|
|
35
42
|
sheet: { icon: 'table', accent: 'var(--co-color-status-success)', tint: 'var(--co-color-verde-100)' },
|
|
43
|
+
slides: { icon: 'presentation-chart', accent: 'var(--co-color-secondary-guinda-100)', tint: 'var(--co-color-secondary-guinda-25)' },
|
|
36
44
|
image: { icon: 'image', accent: 'var(--co-color-secondary-violeta-100)', tint: 'rgb(233,232,255)' },
|
|
37
45
|
video: { icon: 'broadcast', accent: 'var(--co-color-secondary-naranja-100)', tint: 'rgb(255,236,220)' },
|
|
38
46
|
txt: { icon: 'text-align-left', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
39
47
|
design: { icon: 'sparkle', accent: 'var(--co-color-primary-rosado)', tint: 'var(--co-color-rosado-100)' },
|
|
40
48
|
zip: { icon: 'package', accent: 'var(--co-color-status-pending)', tint: 'var(--co-color-status-bg-pending)' },
|
|
49
|
+
mail: { icon: 'envelope-simple', accent: 'var(--co-color-secondary-turquesa-100)', tint: 'var(--co-color-secondary-turquesa-25)' },
|
|
41
50
|
file: { icon: 'file', accent: 'var(--co-color-gray-600)', tint: 'var(--co-color-gray-100)' },
|
|
42
51
|
};
|
|
52
|
+
/** Bucket for an extension: case-insensitive, a leading dot is ignored, unknown → `file`. */
|
|
53
|
+
function resolveFileTileType(ext) {
|
|
54
|
+
var _a;
|
|
55
|
+
const key = (ext !== null && ext !== void 0 ? ext : '').trim().toLowerCase().replace(/^\./, '');
|
|
56
|
+
return (_a = EXT_TO_TYPE[key]) !== null && _a !== void 0 ? _a : 'file';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const coFileTypeTileCss = () => `:host{display:inline-flex}.co-file-type-tile{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;box-sizing:border-box}`;
|
|
60
|
+
|
|
43
61
|
const CoFileTypeTile = class {
|
|
44
62
|
constructor(hostRef) {
|
|
45
63
|
registerInstance(this, hostRef);
|
|
@@ -51,14 +69,12 @@ const CoFileTypeTile = class {
|
|
|
51
69
|
this.colorTags = true;
|
|
52
70
|
}
|
|
53
71
|
render() {
|
|
54
|
-
|
|
55
|
-
const key = ((_a = this.ext) !== null && _a !== void 0 ? _a : '').trim().toLowerCase().replace(/^\./, '');
|
|
56
|
-
const type = (_b = EXT_TO_TYPE[key]) !== null && _b !== void 0 ? _b : 'file';
|
|
72
|
+
const type = resolveFileTileType(this.ext);
|
|
57
73
|
const meta = TYPE_META[type];
|
|
58
74
|
const iconSize = Math.round(this.size * 0.5);
|
|
59
75
|
const background = this.colorTags ? meta.tint : 'var(--co-color-gray-100)';
|
|
60
76
|
const color = this.colorTags ? meta.accent : 'var(--co-color-gray-600)';
|
|
61
|
-
return (h("span", { key: '
|
|
77
|
+
return (h("span", { key: '0cbc40f94f5d917b4f3c35e0a9678daa81a58624', class: {
|
|
62
78
|
'co-file-type-tile': true,
|
|
63
79
|
[`co-file-type-tile--${type}`]: true,
|
|
64
80
|
'co-file-type-tile--mono': !this.colorTags,
|
|
@@ -68,7 +84,7 @@ const CoFileTypeTile = class {
|
|
|
68
84
|
borderRadius: `${this.radius}px`,
|
|
69
85
|
background,
|
|
70
86
|
color,
|
|
71
|
-
} }, h("co-icon", { key: '
|
|
87
|
+
} }, h("co-icon", { key: 'c5245ababcc734116d4e71dd48e41bf66d02fdff', name: meta.icon, size: iconSize, weight: "fill" })));
|
|
72
88
|
}
|
|
73
89
|
};
|
|
74
90
|
CoFileTypeTile.style = coFileTypeTileCss();
|
|
@@ -154,6 +154,13 @@ const CoNumberField = class {
|
|
|
154
154
|
*/
|
|
155
155
|
this.hideControls = false;
|
|
156
156
|
this.focused = false;
|
|
157
|
+
/**
|
|
158
|
+
* El usuario VACIÓ un campo no-clearable (borró todo el texto). Sin clearable
|
|
159
|
+
* el vacío no se emite mientras se tipea (sigue editando), pero al salir
|
|
160
|
+
* commitea el piso (`min ?? 0`, handleBlur) — antes el blur repintaba el valor
|
|
161
|
+
* anterior y el borrado se perdía. Un campo que NACE vacío no levanta la marca.
|
|
162
|
+
*/
|
|
163
|
+
this.emptiedByUser = false;
|
|
157
164
|
// Stepping/clear son mutaciones PROGRAMÁTICAS: con el campo enfocado ni el
|
|
158
165
|
// @Watch (guard `focused`) ni el vdom (que copia el texto vivo) repintan, así
|
|
159
166
|
// que cada path escribe el input él mismo — si no, ArrowUp emite y persiste
|
|
@@ -195,6 +202,9 @@ const CoNumberField = class {
|
|
|
195
202
|
this.value = null;
|
|
196
203
|
this.coChange.emit(null);
|
|
197
204
|
}
|
|
205
|
+
else {
|
|
206
|
+
this.emptiedByUser = true;
|
|
207
|
+
}
|
|
198
208
|
return;
|
|
199
209
|
}
|
|
200
210
|
if (raw === '-')
|
|
@@ -236,6 +246,9 @@ const CoNumberField = class {
|
|
|
236
246
|
this.value = null;
|
|
237
247
|
this.coChange.emit(null);
|
|
238
248
|
}
|
|
249
|
+
else if (spliced === '') {
|
|
250
|
+
this.emptiedByUser = true;
|
|
251
|
+
}
|
|
239
252
|
return;
|
|
240
253
|
}
|
|
241
254
|
const num = parseFloat(spliced);
|
|
@@ -253,9 +266,13 @@ const CoNumberField = class {
|
|
|
253
266
|
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
254
267
|
};
|
|
255
268
|
this.handleBlur = () => {
|
|
269
|
+
var _a;
|
|
256
270
|
this.focused = false;
|
|
271
|
+
// Vaciado a mano sin clearable: commitea el piso (ver emptiedByUser).
|
|
272
|
+
if (this.emptiedByUser)
|
|
273
|
+
this.emitValue((_a = this.min) !== null && _a !== void 0 ? _a : 0);
|
|
257
274
|
// Re-clamp on blur, but keep an empty field empty.
|
|
258
|
-
if (!this.isEmpty)
|
|
275
|
+
else if (!this.isEmpty)
|
|
259
276
|
this.emitValue(this.value);
|
|
260
277
|
// Repinta el texto canónico: si el clamp devolvió el MISMO valor que ya
|
|
261
278
|
// tenía el prop (tipear "-20" sobre 0 con min 0), el @Watch no dispara y el
|
|
@@ -354,6 +371,7 @@ const CoNumberField = class {
|
|
|
354
371
|
return this.scaled ? n / 100 : n;
|
|
355
372
|
}
|
|
356
373
|
emitValue(next) {
|
|
374
|
+
this.emptiedByUser = false;
|
|
357
375
|
const clamped = this.clamp(next);
|
|
358
376
|
this.value = clamped;
|
|
359
377
|
this.coChange.emit(clamped);
|
|
@@ -382,6 +400,9 @@ const CoNumberField = class {
|
|
|
382
400
|
this.value = null;
|
|
383
401
|
this.coChange.emit(null);
|
|
384
402
|
}
|
|
403
|
+
else {
|
|
404
|
+
this.emptiedByUser = true;
|
|
405
|
+
}
|
|
385
406
|
return;
|
|
386
407
|
}
|
|
387
408
|
if (cleaned === '-')
|
|
@@ -403,18 +424,18 @@ const CoNumberField = class {
|
|
|
403
424
|
return this.scaled && !this.isEmpty ? '%' : null;
|
|
404
425
|
}
|
|
405
426
|
render() {
|
|
406
|
-
return (h("div", { key: '
|
|
427
|
+
return (h("div", { key: 'de7f3ae049ac5afcdf7d8a711c566b947fa7e151', class: {
|
|
407
428
|
'co-number-field': true,
|
|
408
429
|
'co-number-field--disabled': this.disabled,
|
|
409
430
|
'co-number-field--focused': this.focused,
|
|
410
431
|
[`co-number-field--${this.size}`]: true,
|
|
411
432
|
[`co-number-field--${this.status}`]: this.status !== 'default',
|
|
412
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
433
|
+
} }, (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",
|
|
413
434
|
// Mismo guard `focused` que el @Watch: mientras el usuario edita, su
|
|
414
435
|
// texto manda. Sin esto, el re-render que dispara emitValue repinta
|
|
415
436
|
// el input desde el NÚMERO y se come el texto en construcción
|
|
416
437
|
// ("34,640.00" pegado quedaba "34,640"; un "12." perdería el punto).
|
|
417
|
-
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: '
|
|
438
|
+
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)))));
|
|
418
439
|
}
|
|
419
440
|
get el() { return getElement(this); }
|
|
420
441
|
static get watchers() { return {
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DH5lfRNj.js';
|
|
2
2
|
import { a as afterEventFor } from './overlayAfterClose-Ch1jfwZ2.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* ¿Un `click` sobre el fondo del overlay es un gesto de cierre?
|
|
6
|
+
*
|
|
7
|
+
* El navegador despacha `click` al ANCESTRO COMÚN de donde empezó y donde
|
|
8
|
+
* terminó la pulsación: seleccionar texto dentro de un modal y soltar fuera
|
|
9
|
+
* producía un `click` en el fondo y cerraba el modal (con lo editado adentro).
|
|
10
|
+
* Solo cuenta si la pulsación entera —down, up y click— ocurrió sobre el MISMO
|
|
11
|
+
* elemento (`composedPath()[0]`, para ver a través de shadow roots).
|
|
12
|
+
*/
|
|
13
|
+
function isBackdropDismiss(downTarget, upTarget, clickTarget) {
|
|
14
|
+
return downTarget !== null && downTarget === upTarget && upTarget === clickTarget;
|
|
15
|
+
}
|
|
16
|
+
|
|
4
17
|
// focusTrap.ts
|
|
5
18
|
//
|
|
6
19
|
// Focus-trap helpers for co-overlay. The Tab-cycling decision is a PURE function
|
|
@@ -111,8 +124,26 @@ const CoOverlay = class {
|
|
|
111
124
|
this.closeOnEscape = false;
|
|
112
125
|
/** Whether THIS instance currently holds a scroll lock (prevents double-count). */
|
|
113
126
|
this.hasLock = false;
|
|
114
|
-
|
|
115
|
-
|
|
127
|
+
// Origen de la pulsación en curso (ver isBackdropDismiss): un drag que
|
|
128
|
+
// empieza dentro del contenido y suelta en el fondo NO es un cierre.
|
|
129
|
+
this.pressDownTarget = null;
|
|
130
|
+
this.pressUpTarget = null;
|
|
131
|
+
this.handlePointerDown = (e) => {
|
|
132
|
+
var _a;
|
|
133
|
+
this.pressDownTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
134
|
+
this.pressUpTarget = null;
|
|
135
|
+
};
|
|
136
|
+
this.handlePointerUp = (e) => {
|
|
137
|
+
var _a;
|
|
138
|
+
this.pressUpTarget = (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null;
|
|
139
|
+
};
|
|
140
|
+
this.handleClick = (e) => {
|
|
141
|
+
var _a;
|
|
142
|
+
const dismiss = isBackdropDismiss(this.pressDownTarget, this.pressUpTarget, (_a = e.composedPath()[0]) !== null && _a !== void 0 ? _a : null);
|
|
143
|
+
this.pressDownTarget = null;
|
|
144
|
+
this.pressUpTarget = null;
|
|
145
|
+
if (dismiss)
|
|
146
|
+
this.coClose.emit();
|
|
116
147
|
};
|
|
117
148
|
this.handleTransitionEnd = (e) => {
|
|
118
149
|
if (e.target !== this.overlayEl)
|
|
@@ -249,7 +280,7 @@ const CoOverlay = class {
|
|
|
249
280
|
focusables[nextIndex].focus();
|
|
250
281
|
}
|
|
251
282
|
render() {
|
|
252
|
-
return (h("div", { key: '
|
|
283
|
+
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' })));
|
|
253
284
|
}
|
|
254
285
|
get el() { return getElement(this); }
|
|
255
286
|
static get watchers() { return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DH5lfRNj.js';
|
|
2
2
|
import { R as RequiredMark } from './requiredMark-BCJUuZvC.js';
|
|
3
|
-
import { r as rankByMatch, h as
|
|
3
|
+
import { r as rankByMatch, h as highlightSegments } from './normalizeText-Ba_v-MzM.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Dial codes sorted by name. Covers the full ITU-T E.164 assignment.
|
|
@@ -263,10 +263,10 @@ const CoPhoneField = class {
|
|
|
263
263
|
}
|
|
264
264
|
/** Country name with the matched substring wrapped for highlighting. */
|
|
265
265
|
renderName(name) {
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
266
|
+
const segs = this.searchQuery.trim() ? highlightSegments(name, this.searchQuery) : null;
|
|
267
|
+
if (!segs)
|
|
268
268
|
return name;
|
|
269
|
-
return
|
|
269
|
+
return segs.map((s) => (s.match ? h("span", { class: "co-phone-field__match" }, s.text) : s.text));
|
|
270
270
|
}
|
|
271
271
|
onValueChange(newVal) {
|
|
272
272
|
if (!newVal) {
|
|
@@ -359,7 +359,7 @@ const CoPhoneField = class {
|
|
|
359
359
|
render() {
|
|
360
360
|
const entry = this.selectedEntry;
|
|
361
361
|
const statusClass = this.status !== 'default' ? `co-phone-field--${this.status}` : '';
|
|
362
|
-
return (h("div", { key: '
|
|
362
|
+
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)))));
|
|
363
363
|
}
|
|
364
364
|
get host() { return getElement(this); }
|
|
365
365
|
static get watchers() { return {
|
|
@@ -96,7 +96,7 @@ const CoSkeleton = class {
|
|
|
96
96
|
const style = { width: this.width };
|
|
97
97
|
if (this.height)
|
|
98
98
|
style.height = this.height;
|
|
99
|
-
return (h("div", { key: '
|
|
99
|
+
return (h("div", { key: '744fb805939c99587c4d0b72355da54d1f5aad43', class: {
|
|
100
100
|
'co-skeleton': true,
|
|
101
101
|
[`co-skeleton--${this.variant}`]: true,
|
|
102
102
|
'co-skeleton--revealed': this.revealed,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DH5lfRNj.js';
|
|
2
|
-
import { R as RichText } from './index-
|
|
2
|
+
import { R as RichText } from './index-BBIYyvq-.js';
|
|
3
3
|
import { g as getRichTextStrings } from './richTextI18n-BYKAgwq3.js';
|
|
4
4
|
import './purify.es-B2QLgWrz.js';
|
|
5
|
-
import './toolbar-config-
|
|
5
|
+
import './toolbar-config-BAYo-RBt.js';
|
|
6
6
|
|
|
7
|
-
const coRichTextEditorCss = () => `co-rich-text-editor{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body)}.co-rich-text-editor{display:flex;flex-direction:column;gap:var(--co-spacing-sm2, 6px)}.co-rich-text-editor__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2, 6px)}.co-rich-text-editor__label,.co-rich-text-editor__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-rich-text-editor__frame{display:flex;flex-direction:column;background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);transition:border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out);min-height:0;flex:1;position:relative;overflow:visible}.co-rich-text-editor__box{display:flex;flex-direction:column;min-height:0;flex:1;position:relative;overflow-y:auto;overflow-x:hidden}.co-rich-text-editor--flat .co-rich-text-editor__frame{background:transparent;border-color:transparent}.co-rich-text-editor--focused .co-rich-text-editor__frame{border-color:var(--co-semantic-border-focus, var(--co-color-base-negro, #1a1a1a));box-shadow:0 0 0 3px var(--co-semantic-border-focus-ring, rgba(37, 99, 235, 0.15))}.co-rich-text-editor--error .co-rich-text-editor__frame{border-color:var(--co-color-status-error)}.co-rich-text-editor--success .co-rich-text-editor__frame{border-color:var(--co-color-status-success)}.co-rich-text-editor--disabled .co-rich-text-editor__frame,.co-rich-text-editor--readonly .co-rich-text-editor__frame{opacity:0.7;cursor:not-allowed}.co-rich-text-editor--loading .co-rte-content{min-height:96px;background:linear-gradient(90deg, var(--co-semantic-surface-secondary) 0%, var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.04)) 50%, var(--co-semantic-surface-secondary) 100%);background-size:200% 100%;animation:co-rte-skeleton 1.2s ease-in-out infinite}@keyframes co-rte-skeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}.co-rich-text-editor__toolbar{position:relative;flex-shrink:0;z-index:60;border-top-left-radius:calc(var(--co-border-radius-xs) - 1px);border-top-right-radius:calc(var(--co-border-radius-xs) - 1px)}.co-rte-content{min-height:96px;color:var(--co-semantic-text-default);flex:1 0 auto;display:flex;flex-direction:column}.co-rte-content .ProseMirror{outline:none;flex:1 0 auto;line-height:1.5;padding:var(--co-spacing-md);box-sizing:border-box}.co-rte-content .ProseMirror p{margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror p:last-child{margin-bottom:0}.co-rte-content .ProseMirror>p{margin-bottom:var(--co-spacing-sm) !important}.co-rte-content .ProseMirror>p:last-child{margin-bottom:0 !important}.co-rte-content .ProseMirror [style*="text-align: justify"]{text-align-last:left}.co-rte-content .ProseMirror [style*="text-align: center"]{text-align:center}.co-rte-content .ProseMirror [style*="text-align: right"]{text-align:right}.co-rte-content .ProseMirror h1,.co-rte-content .ProseMirror h2,.co-rte-content .ProseMirror h3,.co-rte-content .ProseMirror h4{margin:var(--co-spacing-md) 0 var(--co-spacing-sm);font-weight:600;line-height:1.3}.co-rte-content .ProseMirror h1{font-size:var(--co-font-size-28, 28px)}.co-rte-content .ProseMirror h2{font-size:var(--co-font-size-20, 20px)}.co-rte-content .ProseMirror h3{font-size:var(--co-font-size-16, 16px)}.co-rte-content .ProseMirror ul,.co-rte-content .ProseMirror ol{padding-left:var(--co-spacing-xl);margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror ul[data-type="taskList"]{list-style:none;padding-left:0;margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror ul[data-type="taskList"] li{display:flex;align-items:flex-start;gap:var(--co-spacing-sm, 8px)}.co-rte-content .ProseMirror ul[data-type="taskList"] li>label{flex:0 0 auto;margin-top:0.15em;user-select:none}.co-rte-content .ProseMirror ul[data-type="taskList"] li>div{flex:1 1 auto;min-width:0}.co-rte-content .ProseMirror ul[data-type="taskList"] li>div>p{margin:0}.co-rte-content .ProseMirror ul[data-type="taskList"] input[type="checkbox"]{width:16px;height:16px;cursor:pointer;accent-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-content .ProseMirror ul[data-type="taskList"][data-variant="strike"] li[data-checked="true"]>div{text-decoration:line-through;color:var(--co-semantic-text-muted, #999)}.co-rte-content .ProseMirror ul[data-type="taskList"][data-variant="plain"] li[data-checked="true"]>div{text-decoration:none}.co-rte-content .ProseMirror blockquote{border-left:3px solid var(--co-semantic-border-default, var(--co-semantic-border-subtle));padding-left:var(--co-spacing-md);margin:0 0 var(--co-spacing-sm) 0;color:var(--co-semantic-text-secondary)}.co-rte-content .ProseMirror a{color:var(--co-color-base-negro, #1a1a1a);text-decoration:underline;text-underline-offset:2px}.co-rte-content .ProseMirror img{max-width:100%;height:auto;border-radius:var(--co-border-radius-xs);margin:var(--co-spacing-sm) 0;cursor:default;-webkit-user-drag:none;user-select:none}.co-rte-content .ProseMirror img.ProseMirror-selectednode{outline:2px solid var(--co-color-base-negro, #1a1a1a)}.co-rte-content [data-resize-container].ProseMirror-selectednode{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:0px;border-radius:0}.co-rte-content [data-resize-container]{position:relative;display:inline-block;width:fit-content;max-width:100%;margin:var(--co-spacing-sm) 0;line-height:0}.co-rte-content [data-resize-container][data-resize-state="true"]{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:0px;border-radius:0}.co-rte-content [data-resize-wrapper]{position:relative;display:inline-block;line-height:0}.co-rte-content [data-resize-handle]{width:10px;height:10px;background:var(--co-color-base-negro, #1a1a1a);border:1.5px solid #fff;border-radius:50%;box-shadow:0 0 2px rgba(0, 0, 0, 0.3);z-index:5;opacity:0;pointer-events:none}.co-rte-content [data-resize-container][data-resize-state="true"] [data-resize-handle],.co-rte-content [data-resize-container].ProseMirror-selectednode [data-resize-handle]{opacity:1;pointer-events:auto}.co-rte-content [data-resize-handle="top-left"]{cursor:nw-resize}.co-rte-content [data-resize-handle="top-right"]{cursor:ne-resize}.co-rte-content [data-resize-handle="bottom-left"]{cursor:sw-resize}.co-rte-content [data-resize-handle="bottom-right"]{cursor:se-resize}.co-rte-content [data-resize-handle="top"],.co-rte-content [data-resize-handle="bottom"]{width:30px;height:6px;border-radius:3px;left:50% !important;transform:translateX(-50%)}.co-rte-content [data-resize-handle="top"]{cursor:n-resize}.co-rte-content [data-resize-handle="bottom"]{cursor:s-resize}.co-rte-content [data-resize-handle="left"],.co-rte-content [data-resize-handle="right"]{width:6px;height:30px;border-radius:3px;top:50% !important;transform:translateY(-50%)}.co-rte-content [data-resize-handle="left"]{cursor:w-resize}.co-rte-content [data-resize-handle="right"]{cursor:e-resize}.co-rte-content [data-resize-container] img{max-width:100%;display:block;border-radius:0;margin:0}.co-rte-content .ProseMirror hr{border:none;border-top:1px solid var(--co-semantic-border-default, #e0e0e0);margin:var(--co-spacing-lg) 0}.co-rte-content .ProseMirror code{font-family:var(--co-font-family-mono);font-size:0.9em;background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));padding:0.1em 0.3em;border-radius:var(--co-border-radius-xxs)}.co-rte-content .ProseMirror pre{font-family:var(--co-font-family-mono);font-size:0.9em;background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));padding:var(--co-spacing-md);border-radius:var(--co-border-radius-xs);overflow-x:auto;margin:var(--co-spacing-sm) 0}.co-rte-content .ProseMirror pre code{background:none;padding:0;border-radius:0}.co-rte-content .ProseMirror p.is-editor-empty:first-child::before{content:attr(data-placeholder);color:var(--co-semantic-text-muted);float:left;height:0;pointer-events:none}.co-rte-content .co-rte-variable,.co-rte-content .co-rte-mention{display:inline-block;padding:0.05em 0.4em;border-radius:var(--co-border-radius-xxs);background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff);font-size:0.9em;white-space:nowrap}.co-rte-content .co-rte-mention{background:var(--co-color-azul-200);color:var(--co-color-azul-800)}.co-rich-text-editor__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm);padding:0 var(--co-spacing-xs);min-height:0}.co-rich-text-editor__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-12, 12px)}.co-rich-text-editor__helper--error{color:var(--co-color-status-error)}.co-rich-text-editor__helper--success{color:var(--co-color-status-success)}.co-rich-text-editor__count{margin-left:auto;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12, 12px)}.co-rte-bubble.co-rte-bubble--suppressed{display:none !important}.co-rte-bubble{position:absolute;z-index:50;display:flex;flex-direction:row;align-items:center;gap:2px;padding:var(--co-spacing-xs, 4px) var(--co-spacing-sm, 8px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);user-select:none;white-space:nowrap;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.co-rte-bubble__drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;color:var(--co-semantic-text-muted, #999);width:18px;height:28px;margin:0 2px 0 0;flex-shrink:0}.co-rte-bubble__drag-handle:hover{color:var(--co-semantic-text-secondary, #555)}.co-rte-bubble__drag-handle:active{cursor:grabbing}.co-rte-bubble__row{display:flex;align-items:center;gap:2px;flex-wrap:wrap;max-width:100%;min-width:0}.co-rte-bubble__btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);cursor:pointer}.co-rte-bubble__btn:hover:not(.co-rte-bubble__btn--active){background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06))}.co-rte-bubble__btn--active{background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff)}.co-rte-bubble__btn--active:hover{background:var(--co-color-base-negro, #333)}.co-rte-bubble__sep{display:inline-block;width:1px;height:18px;margin:0 4px;background:var(--co-semantic-border-default, rgba(0, 0, 0, 0.12));flex-shrink:0}.co-rte-bubble__select{position:relative}.co-rte-bubble__select-trigger{display:flex;align-items:center;gap:2px;height:28px;padding:0 6px;border:1px solid transparent;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:11px;cursor:pointer;white-space:nowrap;transition:background var(--co-motion-duration-fast), border-color var(--co-motion-duration-fast)}.co-rte-bubble__select-trigger:hover{background:var(--co-semantic-surface-hover, #f5f5f5);border-color:var(--co-semantic-border-default, #e0e0e0)}.co-rte-bubble__select-label{max-width:72px;overflow:hidden;text-overflow:ellipsis}.co-rte-bubble__select--font .co-rte-bubble__select-label{max-width:110px}.co-rte-bubble__select-dropdown{position:absolute;bottom:100%;left:0;z-index:120;min-width:100px;max-height:260px;overflow-y:auto;padding:var(--co-spacing-xxs, 2px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xxs, 4px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px;white-space:normal}.co-rte-bubble__select-dropdown[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px;margin-top:0}.co-rte-bubble__select-dropdown[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__select-option{display:block;width:100%;padding:4px 8px;border:none;border-radius:3px;background:transparent;color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;text-align:left;cursor:pointer;white-space:nowrap}.co-rte-bubble__select-option:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__select-dropdown--font{min-width:200px;max-height:320px;overflow:hidden;overflow-y:auto;display:flex;flex-direction:column;white-space:normal}.co-rte-bubble__font-search{padding:6px 6px 4px;flex-shrink:0}.co-rte-bubble__font-search-input{width:100%;padding:4px 8px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:4px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;outline:none;box-sizing:border-box}.co-rte-bubble__font-search-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__font-list{max-height:260px;overflow-y:auto;padding:0 var(--co-spacing-xxs, 2px) var(--co-spacing-xxs, 2px)}.co-rte-bubble__font-section-header{padding:6px 8px 2px;font-size:11px;font-weight:600;color:var(--co-semantic-text-muted, #888);text-transform:uppercase;letter-spacing:0.5px}.co-rte-bubble__font-empty{padding:12px 8px;text-align:center;color:var(--co-semantic-text-muted, #888);font-size:12px}.co-rte-bubble__color{position:relative}.co-rte-bubble__color-dropdown{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);z-index:120;width:224px;padding:var(--co-spacing-sm, 8px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px;white-space:normal;max-width:calc(100vw - 16px)}.co-rte-bubble__color-dropdown[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px;margin-top:0}.co-rte-bubble__color-dropdown[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__color-grid{display:grid;grid-template-columns:repeat(10, 1fr);gap:2px}.co-rte-bubble__color-swatch{width:20px;height:20px;padding:0;border:none;border-radius:3px;cursor:pointer;transition:transform var(--co-motion-duration-fast), box-shadow var(--co-motion-duration-fast)}.co-rte-bubble__color-swatch:hover{transform:scale(1.2);box-shadow:0 0 0 2px var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__color-hex{display:flex;align-items:center;gap:4px;margin-top:6px}.co-rte-bubble__color-hex-input{width:100%;padding:3px 6px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:3px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-mono, monospace);font-size:11px;outline:none}.co-rte-bubble__color-hex-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__color-clear{display:flex;align-items:center;gap:4px;width:100%;padding:3px 6px;margin-top:4px;border:none;background:transparent;color:var(--co-semantic-text-secondary, #666);font-family:var(--co-font-family-primary);font-size:11px;cursor:pointer;border-radius:3px}.co-rte-bubble__color-clear:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__link-form{display:flex;align-items:center;gap:4px;margin-left:4px}.co-rte-bubble__link-input{width:160px;padding:3px 8px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:4px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;outline:none}.co-rte-bubble__link-input::placeholder{color:var(--co-semantic-text-muted, #999)}.co-rte-bubble__link-input:focus{border-color:var(--co-color-base-negro, #1a1a1a);box-shadow:0 0 0 2px rgba(0, 0, 0, 0.1)}.co-rte-bubble__link-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:4px;background:var(--co-color-base-negro, #1a1a1a);color:#fff;cursor:pointer}.co-rte-bubble__link-btn:hover{opacity:0.9}.co-rte-bubble__link-unlink{background:var(--co-semantic-status-error, #aa2e1b)}.co-rte-bubble__panel{position:absolute;z-index:140;width:230px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);overflow:hidden;user-select:none}.co-rte-bubble__panel-header{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--co-semantic-border-subtle, #eee)}.co-rte-bubble__panel-drag{cursor:grab;display:flex;align-items:center;justify-content:center;color:var(--co-semantic-text-muted, #999);flex-shrink:0}.co-rte-bubble__panel-drag:active{cursor:grabbing}.co-rte-bubble__panel-title{flex:1;font-size:12px;font-weight:600;color:var(--co-semantic-text-default, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-rte-bubble__panel-close{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:none;border-radius:3px;background:transparent;color:var(--co-semantic-text-muted, #999);cursor:pointer;flex-shrink:0}.co-rte-bubble__panel-close:hover{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-input-wrap{padding:6px 8px}.co-rte-bubble__panel-input{width:100%;padding:4px 8px;border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:4px;font-size:12px;font-family:inherit;outline:none;box-sizing:border-box;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__panel-options{max-height:280px;overflow-y:auto;padding:2px 4px 4px}.co-rte-bubble__panel-option{display:block;width:100%;padding:5px 8px;border:none;border-radius:3px;background:transparent;cursor:pointer;text-align:left;font-family:inherit;color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-option:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__panel-sep{height:1px;background:var(--co-semantic-border-subtle, #eee);margin:4px 8px}.co-rte-bubble__panel-opt-row{display:flex;justify-content:space-between;align-items:center;width:100%}.co-rte-bubble__panel-opt-value{color:var(--co-semantic-text-muted, #999);font-size:11px;font-weight:400 !important;min-width:28px;text-align:right}.co-rte-bubble__panel[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px}.co-rte-bubble__panel[data-position="below"]{top:100%;bottom:auto;margin-top:4px}.co-rte-bubble__overflow{position:relative}.co-rte-bubble__overflow-menu{position:absolute;bottom:100%;right:0;z-index:130;min-width:230px;padding:4px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px}.co-rte-bubble__overflow-menu[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__overflow-item{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:none;border-radius:4px;background:transparent;font-family:inherit;font-size:13px;color:var(--co-semantic-text-default, #333);cursor:pointer;text-align:left;white-space:nowrap}.co-rte-bubble__overflow-item:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__overflow-item--active{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));color:var(--co-color-base-negro, #1a1a1a);font-weight:600}.co-rte-bubble__overflow-value{margin-left:auto;color:var(--co-semantic-text-muted, #999);font-size:11px}.co-rte-bubble__overflow-sep{height:1px;background:var(--co-semantic-border-subtle, #eee);margin:3px 8px}.co-rte-bubble__overflow-section-title{padding:6px 8px 2px;font-size:11px;font-weight:600;color:var(--co-semantic-text-muted, #888);letter-spacing:0.5px}.co-rte-bubble__overflow-item--danger{color:var(--co-color-status-error, #aa2e1b)}.co-rte-bubble__overflow-item--danger:hover{background:rgba(170, 46, 27, 0.06)}.co-rte-bubble__color-indicator{display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1}.co-rte-bubble__color-letter{font-family:var(--co-font-family-primary);font-size:14px;font-weight:700;color:var(--co-semantic-text-default, #333);line-height:1}.co-rte-bubble__color-bar{width:14px;height:3px;border-radius:1px}.co-rte-content .callout{display:flex;gap:0.75rem;padding:1rem;border-radius:var(--co-border-radius-xs, 8px);border:2px solid;margin:1rem 0}.co-rte-content .callout--info{background:#eff6ff;border-color:#bfdbfe}.co-rte-content .callout--warning{background:#fffbeb;border-color:#fde68a}.co-rte-content .callout--success{background:#f0fdf4;border-color:#bbf7d0}.co-rte-content .callout--error{background:#fef2f2;border-color:#fecaca}.co-rte-content .callout__icon{flex-shrink:0;font-size:1.2em}.co-rte-content .callout__content{flex:1}.co-rte-content .callout__content p{margin:0}.co-rte-content table{border-collapse:collapse;table-layout:auto;width:100%;margin:1rem 0;overflow:hidden}.co-rte-content .tableWrapper{overflow-x:auto;max-width:100%}.co-rte-content td,.co-rte-content th{min-width:1em;border:1px solid var(--co-semantic-border-default, #e0e0e0);padding:0.5rem;vertical-align:top;box-sizing:border-box;position:relative}.co-rte-content th{font-weight:600;text-align:left;background-color:#e3e3e3;color:var(--co-semantic-text-default, #333)}.co-rte-content .ProseMirror table th{background-color:#e3e3e3}.co-rte-content .selectedCell{background:rgba(0, 0, 0, 0.06)}.co-rte-content .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--co-color-base-negro, #1a1a1a);pointer-events:none}.co-rte-content .ProseMirror.resize-cursor,.co-rte-content .ProseMirror.resize-cursor *{cursor:col-resize}.co-rte-content iframe{border-radius:var(--co-border-radius-xs, 8px);max-width:100%;aspect-ratio:16 / 9;width:100%;height:auto;display:block;margin:0}.co-rte-content .co-rte-embed{position:relative;display:block;max-width:100%;margin:1rem 0;line-height:0}.co-rte-content .co-rte-embed::before{content:'';position:absolute;inset:0;z-index:1}.co-rte-content .co-rte-embed.ProseMirror-selectednode,.co-rte-content .co-rte-embed--selected{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:2px;border-radius:var(--co-border-radius-xs, 8px)}.co-rte-content .co-rte-embed__handle{position:absolute;width:12px;height:12px;background:var(--co-color-base-negro, #1a1a1a);border:1.5px solid #fff;border-radius:50%;box-shadow:0 0 2px rgba(0, 0, 0, 0.3);z-index:3;opacity:0;pointer-events:none}.co-rte-content .co-rte-embed.ProseMirror-selectednode .co-rte-embed__handle,.co-rte-content .co-rte-embed--selected .co-rte-embed__handle{opacity:1;pointer-events:auto}.co-rte-content .co-rte-embed__handle--bottom-right{right:-6px;bottom:-6px;cursor:nwse-resize}.co-rte-content .co-rte-embed__handle--bottom-left{left:-6px;bottom:-6px;cursor:nesw-resize}.co-rte-content .co-rte-embed--resizing{outline:2px dashed var(--co-color-base-negro, #1a1a1a);outline-offset:2px}.co-rich-text-editor--readonly .co-rte-embed::before,.co-rich-text-editor--disabled .co-rte-embed::before{display:none}.co-rich-text-editor--readonly .co-rte-embed.ProseMirror-selectednode,.co-rich-text-editor--readonly .co-rte-embed--selected,.co-rich-text-editor--disabled .co-rte-embed.ProseMirror-selectednode,.co-rich-text-editor--disabled .co-rte-embed--selected{outline:none !important}.co-rte-img-layout{position:absolute;z-index:50;display:flex;align-items:center;gap:2px;padding:4px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 2px 12px rgba(0, 0, 0, 0.12);pointer-events:auto}.co-rte-img-layout__btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:1px solid transparent;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);cursor:pointer;transition:background var(--co-motion-duration-fast), border-color var(--co-motion-duration-fast)}.co-rte-img-layout__btn:hover{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06))}.co-rte-img-layout__btn--active{background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff)}.co-rte-img-layout__btn--active:hover{background:var(--co-color-base-negro, #333)}.co-rte-img-layout__btn[data-tooltip]{position:relative}.co-rte-img-layout__btn[data-tooltip]::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);padding:4px 8px;background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary);font-size:11px;font-weight:500;line-height:1.3;white-space:nowrap;border-radius:4px;pointer-events:none;opacity:0;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);z-index:100}.co-rte-img-layout__btn[data-tooltip]:hover::after{opacity:1;transition-delay:0.3s}.co-rte-content [data-resize-container][data-image-layout="wrap-left"]{float:left;max-width:50%;margin:4px 16px 8px 0}.co-rte-content [data-resize-container][data-image-layout="wrap-right"]{float:right;max-width:50%;margin:4px 0 8px 16px}.co-rte-content [data-resize-container][data-image-layout="center"]{display:block;margin:12px auto}.co-rte-content [data-resize-container][data-image-layout="full-width"]{display:block;width:100%;margin:12px 0}.co-rte-content [data-resize-container][data-image-layout="full-width"] [data-resize-wrapper],.co-rte-content [data-resize-container][data-image-layout="full-width"] img{width:100%}@media (max-width: 768px){.co-rte-content [data-resize-container][data-image-layout="wrap-left"],.co-rte-content [data-resize-container][data-image-layout="wrap-right"]{float:none;max-width:100%;display:block;margin:12px 0}}.co-rte-content--site .ProseMirror{width:var(--co-rte-content-width, 80%);max-width:100%;margin:0 auto}@media (max-width: 768px){.co-rte-content--site .ProseMirror{width:100%}}.co-rich-text-editor--readonly [data-resize-handle],.co-rich-text-editor--disabled [data-resize-handle]{display:none !important}.co-rich-text-editor--readonly [data-resize-container].ProseMirror-selectednode,.co-rich-text-editor--disabled [data-resize-container].ProseMirror-selectednode,.co-rich-text-editor--readonly img.ProseMirror-selectednode,.co-rich-text-editor--disabled img.ProseMirror-selectednode{outline:none !important}`;
|
|
7
|
+
const coRichTextEditorCss = () => `co-rich-text-editor{display:block;font-family:var(--co-font-family-primary);font-size:var(--co-font-size-14);letter-spacing:var(--co-font-letter-spacing-body)}.co-rich-text-editor{display:flex;flex-direction:column;gap:var(--co-spacing-sm2, 6px)}.co-rich-text-editor__labels{display:flex;align-items:center;justify-content:space-between;padding:0 var(--co-spacing-xs);gap:var(--co-spacing-sm2, 6px)}.co-rich-text-editor__label,.co-rich-text-editor__secondary-label{color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-14);font-weight:400;line-height:1}.co-rich-text-editor__frame{display:flex;flex-direction:column;background:var(--co-semantic-surface-page);border:1px solid var(--co-semantic-border-field);border-radius:var(--co-border-radius-xs);transition:border-color var(--co-motion-duration-fast) var(--co-motion-ease-out), box-shadow var(--co-motion-duration-fast) var(--co-motion-ease-out);min-height:0;flex:1;position:relative;overflow:visible}.co-rich-text-editor__box{display:flex;flex-direction:column;min-height:0;flex:1;position:relative;overflow-y:auto;overflow-x:hidden}.co-rich-text-editor--flat .co-rich-text-editor__frame{background:transparent;border-color:transparent}.co-rich-text-editor--focused .co-rich-text-editor__frame{border-color:var(--co-semantic-border-focus, var(--co-color-base-negro, #1a1a1a));box-shadow:0 0 0 3px var(--co-semantic-border-focus-ring, rgba(37, 99, 235, 0.15))}.co-rich-text-editor--error .co-rich-text-editor__frame{border-color:var(--co-color-status-error)}.co-rich-text-editor--success .co-rich-text-editor__frame{border-color:var(--co-color-status-success)}.co-rich-text-editor--disabled .co-rich-text-editor__frame,.co-rich-text-editor--readonly .co-rich-text-editor__frame{opacity:0.7;cursor:not-allowed}.co-rich-text-editor--loading .co-rte-content{min-height:96px;background:linear-gradient(90deg, var(--co-semantic-surface-secondary) 0%, var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.04)) 50%, var(--co-semantic-surface-secondary) 100%);background-size:200% 100%;animation:co-rte-skeleton 1.2s ease-in-out infinite}@keyframes co-rte-skeleton{0%{background-position:200% 0}100%{background-position:-200% 0}}.co-rich-text-editor__toolbar{position:relative;flex-shrink:0;z-index:60;border-top-left-radius:calc(var(--co-border-radius-xs) - 1px);border-top-right-radius:calc(var(--co-border-radius-xs) - 1px)}.co-rich-text-editor__toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-md);flex-shrink:0;min-width:0;border-top:1px solid var(--co-semantic-border-subtle)}.co-rich-text-editor--toolbar-bottom .co-rich-text-editor__toolbar{border-top-left-radius:0;border-top-right-radius:0;min-width:0}.co-rte-content{min-height:96px;color:var(--co-semantic-text-default);flex:1 0 auto;display:flex;flex-direction:column}.co-rte-content .ProseMirror{outline:none;flex:1 0 auto;line-height:1.5;padding:var(--co-spacing-md);box-sizing:border-box}.co-rte-content .ProseMirror p{margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror p:last-child{margin-bottom:0}.co-rte-content .ProseMirror>p{margin-bottom:var(--co-spacing-sm) !important}.co-rte-content .ProseMirror>p:last-child{margin-bottom:0 !important}.co-rte-content .ProseMirror [style*="text-align: justify"]{text-align-last:left}.co-rte-content .ProseMirror [style*="text-align: center"]{text-align:center}.co-rte-content .ProseMirror [style*="text-align: right"]{text-align:right}.co-rte-content .ProseMirror h1,.co-rte-content .ProseMirror h2,.co-rte-content .ProseMirror h3,.co-rte-content .ProseMirror h4{margin:var(--co-spacing-md) 0 var(--co-spacing-sm);font-weight:600;line-height:1.3}.co-rte-content .ProseMirror h1{font-size:var(--co-font-size-28, 28px)}.co-rte-content .ProseMirror h2{font-size:var(--co-font-size-20, 20px)}.co-rte-content .ProseMirror h3{font-size:var(--co-font-size-16, 16px)}.co-rte-content .ProseMirror ul,.co-rte-content .ProseMirror ol{padding-left:var(--co-spacing-xl);margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror ul[data-type="taskList"]{list-style:none;padding-left:0;margin:0 0 var(--co-spacing-sm) 0}.co-rte-content .ProseMirror ul[data-type="taskList"] li{display:flex;align-items:flex-start;gap:var(--co-spacing-sm, 8px)}.co-rte-content .ProseMirror ul[data-type="taskList"] li>label{flex:0 0 auto;margin-top:0.15em;user-select:none}.co-rte-content .ProseMirror ul[data-type="taskList"] li>div{flex:1 1 auto;min-width:0}.co-rte-content .ProseMirror ul[data-type="taskList"] li>div>p{margin:0}.co-rte-content .ProseMirror ul[data-type="taskList"] input[type="checkbox"]{width:16px;height:16px;cursor:pointer;accent-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-content .ProseMirror ul[data-type="taskList"][data-variant="strike"] li[data-checked="true"]>div{text-decoration:line-through;color:var(--co-semantic-text-muted, #999)}.co-rte-content .ProseMirror ul[data-type="taskList"][data-variant="plain"] li[data-checked="true"]>div{text-decoration:none}.co-rte-content .ProseMirror blockquote{border-left:3px solid var(--co-semantic-border-default, var(--co-semantic-border-subtle));padding-left:var(--co-spacing-md);margin:0 0 var(--co-spacing-sm) 0;color:var(--co-semantic-text-secondary)}.co-rte-content .ProseMirror a{color:var(--co-color-base-negro, #1a1a1a);text-decoration:underline;text-underline-offset:2px}.co-rte-content .ProseMirror img{max-width:100%;height:auto;border-radius:var(--co-border-radius-xs);margin:var(--co-spacing-sm) 0;cursor:default;-webkit-user-drag:none;user-select:none}.co-rte-content .ProseMirror img.ProseMirror-selectednode{outline:2px solid var(--co-color-base-negro, #1a1a1a)}.co-rte-content [data-resize-container].ProseMirror-selectednode{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:0px;border-radius:0}.co-rte-content [data-resize-container]{position:relative;display:inline-block;width:fit-content;max-width:100%;margin:var(--co-spacing-sm) 0;line-height:0}.co-rte-content [data-resize-container][data-resize-state="true"]{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:0px;border-radius:0}.co-rte-content [data-resize-wrapper]{position:relative;display:inline-block;line-height:0}.co-rte-content [data-resize-handle]{width:10px;height:10px;background:var(--co-color-base-negro, #1a1a1a);border:1.5px solid #fff;border-radius:50%;box-shadow:0 0 2px rgba(0, 0, 0, 0.3);z-index:5;opacity:0;pointer-events:none}.co-rte-content [data-resize-container][data-resize-state="true"] [data-resize-handle],.co-rte-content [data-resize-container].ProseMirror-selectednode [data-resize-handle]{opacity:1;pointer-events:auto}.co-rte-content [data-resize-handle="top-left"]{cursor:nw-resize}.co-rte-content [data-resize-handle="top-right"]{cursor:ne-resize}.co-rte-content [data-resize-handle="bottom-left"]{cursor:sw-resize}.co-rte-content [data-resize-handle="bottom-right"]{cursor:se-resize}.co-rte-content [data-resize-handle="top"],.co-rte-content [data-resize-handle="bottom"]{width:30px;height:6px;border-radius:3px;left:50% !important;transform:translateX(-50%)}.co-rte-content [data-resize-handle="top"]{cursor:n-resize}.co-rte-content [data-resize-handle="bottom"]{cursor:s-resize}.co-rte-content [data-resize-handle="left"],.co-rte-content [data-resize-handle="right"]{width:6px;height:30px;border-radius:3px;top:50% !important;transform:translateY(-50%)}.co-rte-content [data-resize-handle="left"]{cursor:w-resize}.co-rte-content [data-resize-handle="right"]{cursor:e-resize}.co-rte-content [data-resize-container] img{max-width:100%;display:block;border-radius:0;margin:0}.co-rte-content .ProseMirror hr{border:none;border-top:1px solid var(--co-semantic-border-default, #e0e0e0);margin:var(--co-spacing-lg) 0}.co-rte-content .ProseMirror code{font-family:var(--co-font-family-mono);font-size:0.9em;background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));padding:0.1em 0.3em;border-radius:var(--co-border-radius-xxs)}.co-rte-content .ProseMirror pre{font-family:var(--co-font-family-mono);font-size:0.9em;background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));padding:var(--co-spacing-md);border-radius:var(--co-border-radius-xs);overflow-x:auto;margin:var(--co-spacing-sm) 0}.co-rte-content .ProseMirror pre code{background:none;padding:0;border-radius:0}.co-rte-content .ProseMirror p.is-editor-empty:first-child::before{content:attr(data-placeholder);color:var(--co-semantic-text-muted);float:left;height:0;pointer-events:none}.co-rte-content .co-rte-variable,.co-rte-content .co-rte-mention{display:inline-block;padding:0.05em 0.4em;border-radius:var(--co-border-radius-xxs);background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff);font-size:0.9em;white-space:nowrap}.co-rte-content .co-rte-mention{background:var(--co-color-azul-200);color:var(--co-color-azul-800)}.co-rich-text-editor__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm);padding:0 var(--co-spacing-xs);min-height:0}.co-rich-text-editor__helper{display:flex;align-items:center;gap:var(--co-spacing-xs);color:var(--co-semantic-text-secondary);font-size:var(--co-font-size-12, 12px)}.co-rich-text-editor__helper--error{color:var(--co-color-status-error)}.co-rich-text-editor__helper--success{color:var(--co-color-status-success)}.co-rich-text-editor__count{margin-left:auto;color:var(--co-semantic-text-muted);font-size:var(--co-font-size-12, 12px)}.co-rte-bubble.co-rte-bubble--suppressed{display:none !important}.co-rte-bubble{position:absolute;z-index:50;display:flex;flex-direction:row;align-items:center;gap:2px;padding:var(--co-spacing-xs, 4px) var(--co-spacing-sm, 8px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);user-select:none;white-space:nowrap;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.co-rte-bubble__drag-handle{display:flex;align-items:center;justify-content:center;cursor:grab;color:var(--co-semantic-text-muted, #999);width:18px;height:28px;margin:0 2px 0 0;flex-shrink:0}.co-rte-bubble__drag-handle:hover{color:var(--co-semantic-text-secondary, #555)}.co-rte-bubble__drag-handle:active{cursor:grabbing}.co-rte-bubble__row{display:flex;align-items:center;gap:2px;flex-wrap:wrap;max-width:100%;min-width:0}.co-rte-bubble__btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:none;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);cursor:pointer}.co-rte-bubble__btn:hover:not(.co-rte-bubble__btn--active){background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06))}.co-rte-bubble__btn--active{background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff)}.co-rte-bubble__btn--active:hover{background:var(--co-color-base-negro, #333)}.co-rte-bubble__sep{display:inline-block;width:1px;height:18px;margin:0 4px;background:var(--co-semantic-border-default, rgba(0, 0, 0, 0.12));flex-shrink:0}.co-rte-bubble__select{position:relative}.co-rte-bubble__select-trigger{display:flex;align-items:center;gap:2px;height:28px;padding:0 6px;border:1px solid transparent;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:11px;cursor:pointer;white-space:nowrap;transition:background var(--co-motion-duration-fast), border-color var(--co-motion-duration-fast)}.co-rte-bubble__select-trigger:hover{background:var(--co-semantic-surface-hover, #f5f5f5);border-color:var(--co-semantic-border-default, #e0e0e0)}.co-rte-bubble__select-label{max-width:72px;overflow:hidden;text-overflow:ellipsis}.co-rte-bubble__select--font .co-rte-bubble__select-label{max-width:110px}.co-rte-bubble__select-dropdown{position:absolute;bottom:100%;left:0;z-index:120;min-width:100px;max-height:260px;overflow-y:auto;padding:var(--co-spacing-xxs, 2px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xxs, 4px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px;white-space:normal}.co-rte-bubble__select-dropdown[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px;margin-top:0}.co-rte-bubble__select-dropdown[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__select-option{display:block;width:100%;padding:4px 8px;border:none;border-radius:3px;background:transparent;color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;text-align:left;cursor:pointer;white-space:nowrap}.co-rte-bubble__select-option:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__select-dropdown--font{min-width:200px;max-height:320px;overflow:hidden;overflow-y:auto;display:flex;flex-direction:column;white-space:normal}.co-rte-bubble__font-search{padding:6px 6px 4px;flex-shrink:0}.co-rte-bubble__font-search-input{width:100%;padding:4px 8px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:4px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;outline:none;box-sizing:border-box}.co-rte-bubble__font-search-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__font-list{max-height:260px;overflow-y:auto;padding:0 var(--co-spacing-xxs, 2px) var(--co-spacing-xxs, 2px)}.co-rte-bubble__font-section-header{padding:6px 8px 2px;font-size:11px;font-weight:600;color:var(--co-semantic-text-muted, #888);text-transform:uppercase;letter-spacing:0.5px}.co-rte-bubble__font-empty{padding:12px 8px;text-align:center;color:var(--co-semantic-text-muted, #888);font-size:12px}.co-rte-bubble__color{position:relative}.co-rte-bubble__color-dropdown{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);z-index:120;width:224px;padding:var(--co-spacing-sm, 8px);background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px;white-space:normal;max-width:calc(100vw - 16px)}.co-rte-bubble__color-dropdown[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px;margin-top:0}.co-rte-bubble__color-dropdown[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__color-grid{display:grid;grid-template-columns:repeat(10, 1fr);gap:2px}.co-rte-bubble__color-swatch{width:20px;height:20px;padding:0;border:none;border-radius:3px;cursor:pointer;transition:transform var(--co-motion-duration-fast), box-shadow var(--co-motion-duration-fast)}.co-rte-bubble__color-swatch:hover{transform:scale(1.2);box-shadow:0 0 0 2px var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__color-hex{display:flex;align-items:center;gap:4px;margin-top:6px}.co-rte-bubble__color-hex-input{width:100%;padding:3px 6px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:3px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-mono, monospace);font-size:11px;outline:none}.co-rte-bubble__color-hex-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__color-clear{display:flex;align-items:center;gap:4px;width:100%;padding:3px 6px;margin-top:4px;border:none;background:transparent;color:var(--co-semantic-text-secondary, #666);font-family:var(--co-font-family-primary);font-size:11px;cursor:pointer;border-radius:3px}.co-rte-bubble__color-clear:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__link-form{display:flex;align-items:center;gap:4px;margin-left:4px}.co-rte-bubble__link-input{width:160px;padding:3px 8px;border:1px solid var(--co-semantic-border-default, #ccc);border-radius:4px;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333);font-family:var(--co-font-family-primary);font-size:12px;outline:none}.co-rte-bubble__link-input::placeholder{color:var(--co-semantic-text-muted, #999)}.co-rte-bubble__link-input:focus{border-color:var(--co-color-base-negro, #1a1a1a);box-shadow:0 0 0 2px rgba(0, 0, 0, 0.1)}.co-rte-bubble__link-btn{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:none;border-radius:4px;background:var(--co-color-base-negro, #1a1a1a);color:#fff;cursor:pointer}.co-rte-bubble__link-btn:hover{opacity:0.9}.co-rte-bubble__link-unlink{background:var(--co-semantic-status-error, #aa2e1b)}.co-rte-bubble__panel{position:absolute;z-index:140;width:230px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);overflow:hidden;user-select:none}.co-rte-bubble__panel-header{display:flex;align-items:center;gap:4px;padding:6px 8px;border-bottom:1px solid var(--co-semantic-border-subtle, #eee)}.co-rte-bubble__panel-drag{cursor:grab;display:flex;align-items:center;justify-content:center;color:var(--co-semantic-text-muted, #999);flex-shrink:0}.co-rte-bubble__panel-drag:active{cursor:grabbing}.co-rte-bubble__panel-title{flex:1;font-size:12px;font-weight:600;color:var(--co-semantic-text-default, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.co-rte-bubble__panel-close{display:flex;align-items:center;justify-content:center;width:22px;height:22px;border:none;border-radius:3px;background:transparent;color:var(--co-semantic-text-muted, #999);cursor:pointer;flex-shrink:0}.co-rte-bubble__panel-close:hover{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-input-wrap{padding:6px 8px}.co-rte-bubble__panel-input{width:100%;padding:4px 8px;border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:4px;font-size:12px;font-family:inherit;outline:none;box-sizing:border-box;background:var(--co-semantic-surface-secondary, #fff);color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-input:focus{border-color:var(--co-color-base-negro, #1a1a1a)}.co-rte-bubble__panel-options{max-height:280px;overflow-y:auto;padding:2px 4px 4px}.co-rte-bubble__panel-option{display:block;width:100%;padding:5px 8px;border:none;border-radius:3px;background:transparent;cursor:pointer;text-align:left;font-family:inherit;color:var(--co-semantic-text-default, #333)}.co-rte-bubble__panel-option:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__panel-sep{height:1px;background:var(--co-semantic-border-subtle, #eee);margin:4px 8px}.co-rte-bubble__panel-opt-row{display:flex;justify-content:space-between;align-items:center;width:100%}.co-rte-bubble__panel-opt-value{color:var(--co-semantic-text-muted, #999);font-size:11px;font-weight:400 !important;min-width:28px;text-align:right}.co-rte-bubble__panel[data-position="above"]{bottom:100%;top:auto;margin-bottom:4px}.co-rte-bubble__panel[data-position="below"]{top:100%;bottom:auto;margin-top:4px}.co-rte-bubble__overflow{position:relative}.co-rte-bubble__overflow-menu{position:absolute;bottom:100%;right:0;z-index:130;min-width:230px;padding:4px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 4px 16px rgba(0, 0, 0, 0.12);margin-bottom:4px}.co-rte-bubble__overflow-menu[data-position="below"]{top:100%;bottom:auto;margin-top:4px;margin-bottom:0}.co-rte-bubble__overflow-item{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:none;border-radius:4px;background:transparent;font-family:inherit;font-size:13px;color:var(--co-semantic-text-default, #333);cursor:pointer;text-align:left;white-space:nowrap}.co-rte-bubble__overflow-item:hover{background:var(--co-semantic-surface-hover, #f5f5f5)}.co-rte-bubble__overflow-item--active{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06));color:var(--co-color-base-negro, #1a1a1a);font-weight:600}.co-rte-bubble__overflow-value{margin-left:auto;color:var(--co-semantic-text-muted, #999);font-size:11px}.co-rte-bubble__overflow-sep{height:1px;background:var(--co-semantic-border-subtle, #eee);margin:3px 8px}.co-rte-bubble__overflow-section-title{padding:6px 8px 2px;font-size:11px;font-weight:600;color:var(--co-semantic-text-muted, #888);letter-spacing:0.5px}.co-rte-bubble__overflow-item--danger{color:var(--co-color-status-error, #aa2e1b)}.co-rte-bubble__overflow-item--danger:hover{background:rgba(170, 46, 27, 0.06)}.co-rte-bubble__color-indicator{display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1}.co-rte-bubble__color-letter{font-family:var(--co-font-family-primary);font-size:14px;font-weight:700;color:var(--co-semantic-text-default, #333);line-height:1}.co-rte-bubble__color-bar{width:14px;height:3px;border-radius:1px}.co-rte-content .callout{display:flex;gap:0.75rem;padding:1rem;border-radius:var(--co-border-radius-xs, 8px);border:2px solid;margin:1rem 0}.co-rte-content .callout--info{background:#eff6ff;border-color:#bfdbfe}.co-rte-content .callout--warning{background:#fffbeb;border-color:#fde68a}.co-rte-content .callout--success{background:#f0fdf4;border-color:#bbf7d0}.co-rte-content .callout--error{background:#fef2f2;border-color:#fecaca}.co-rte-content .callout__icon{flex-shrink:0;font-size:1.2em}.co-rte-content .callout__content{flex:1}.co-rte-content .callout__content p{margin:0}.co-rte-content table{border-collapse:collapse;table-layout:auto;width:100%;margin:1rem 0;overflow:hidden}.co-rte-content .tableWrapper{overflow-x:auto;max-width:100%}.co-rte-content td,.co-rte-content th{min-width:1em;border:1px solid var(--co-semantic-border-default, #e0e0e0);padding:0.5rem;vertical-align:top;box-sizing:border-box;position:relative}.co-rte-content th{font-weight:600;text-align:left;background-color:#e3e3e3;color:var(--co-semantic-text-default, #333)}.co-rte-content .ProseMirror table th{background-color:#e3e3e3}.co-rte-content .selectedCell{background:rgba(0, 0, 0, 0.06)}.co-rte-content .column-resize-handle{position:absolute;right:-2px;top:0;bottom:0;width:4px;background-color:var(--co-color-base-negro, #1a1a1a);pointer-events:none}.co-rte-content .ProseMirror.resize-cursor,.co-rte-content .ProseMirror.resize-cursor *{cursor:col-resize}.co-rte-content iframe{border-radius:var(--co-border-radius-xs, 8px);max-width:100%;aspect-ratio:16 / 9;width:100%;height:auto;display:block;margin:0}.co-rte-content .co-rte-embed{position:relative;display:block;max-width:100%;margin:1rem 0;line-height:0}.co-rte-content .co-rte-embed::before{content:'';position:absolute;inset:0;z-index:1}.co-rte-content .co-rte-embed.ProseMirror-selectednode,.co-rte-content .co-rte-embed--selected{outline:2px solid var(--co-color-base-negro, #1a1a1a);outline-offset:2px;border-radius:var(--co-border-radius-xs, 8px)}.co-rte-content .co-rte-embed__handle{position:absolute;width:12px;height:12px;background:var(--co-color-base-negro, #1a1a1a);border:1.5px solid #fff;border-radius:50%;box-shadow:0 0 2px rgba(0, 0, 0, 0.3);z-index:3;opacity:0;pointer-events:none}.co-rte-content .co-rte-embed.ProseMirror-selectednode .co-rte-embed__handle,.co-rte-content .co-rte-embed--selected .co-rte-embed__handle{opacity:1;pointer-events:auto}.co-rte-content .co-rte-embed__handle--bottom-right{right:-6px;bottom:-6px;cursor:nwse-resize}.co-rte-content .co-rte-embed__handle--bottom-left{left:-6px;bottom:-6px;cursor:nesw-resize}.co-rte-content .co-rte-embed--resizing{outline:2px dashed var(--co-color-base-negro, #1a1a1a);outline-offset:2px}.co-rich-text-editor--readonly .co-rte-embed::before,.co-rich-text-editor--disabled .co-rte-embed::before{display:none}.co-rich-text-editor--readonly .co-rte-embed.ProseMirror-selectednode,.co-rich-text-editor--readonly .co-rte-embed--selected,.co-rich-text-editor--disabled .co-rte-embed.ProseMirror-selectednode,.co-rich-text-editor--disabled .co-rte-embed--selected{outline:none !important}.co-rte-img-layout{position:absolute;z-index:50;display:flex;align-items:center;gap:2px;padding:4px;background:var(--co-semantic-surface-secondary, #fff);border:1px solid var(--co-semantic-border-default, #e0e0e0);border-radius:var(--co-border-radius-xs, 8px);box-shadow:0 2px 12px rgba(0, 0, 0, 0.12);pointer-events:auto}.co-rte-img-layout__btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:1px solid transparent;border-radius:var(--co-border-radius-xxs, 4px);background:transparent;color:var(--co-semantic-text-default, #333);cursor:pointer;transition:background var(--co-motion-duration-fast), border-color var(--co-motion-duration-fast)}.co-rte-img-layout__btn:hover{background:var(--co-semantic-surface-hover, rgba(0, 0, 0, 0.06))}.co-rte-img-layout__btn--active{background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff)}.co-rte-img-layout__btn--active:hover{background:var(--co-color-base-negro, #333)}.co-rte-img-layout__btn[data-tooltip]{position:relative}.co-rte-img-layout__btn[data-tooltip]::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);padding:4px 8px;background:var(--co-color-base-negro, #1a1a1a);color:var(--co-color-base-blanco, #fff);font-family:var(--co-font-family-primary);font-size:11px;font-weight:500;line-height:1.3;white-space:nowrap;border-radius:4px;pointer-events:none;opacity:0;transition:opacity var(--co-motion-duration-fast) var(--co-motion-ease-out);z-index:100}.co-rte-img-layout__btn[data-tooltip]:hover::after{opacity:1;transition-delay:0.3s}.co-rte-content [data-resize-container][data-image-layout="wrap-left"]{float:left;max-width:50%;margin:4px 16px 8px 0}.co-rte-content [data-resize-container][data-image-layout="wrap-right"]{float:right;max-width:50%;margin:4px 0 8px 16px}.co-rte-content [data-resize-container][data-image-layout="center"]{display:block;margin:12px auto}.co-rte-content [data-resize-container][data-image-layout="full-width"]{display:block;width:100%;margin:12px 0}.co-rte-content [data-resize-container][data-image-layout="full-width"] [data-resize-wrapper],.co-rte-content [data-resize-container][data-image-layout="full-width"] img{width:100%}@media (max-width: 768px){.co-rte-content [data-resize-container][data-image-layout="wrap-left"],.co-rte-content [data-resize-container][data-image-layout="wrap-right"]{float:none;max-width:100%;display:block;margin:12px 0}}.co-rte-content--site .ProseMirror{width:var(--co-rte-content-width, 80%);max-width:100%;margin:0 auto}@media (max-width: 768px){.co-rte-content--site .ProseMirror{width:100%}}.co-rich-text-editor--readonly [data-resize-handle],.co-rich-text-editor--disabled [data-resize-handle]{display:none !important}.co-rich-text-editor--readonly [data-resize-container].ProseMirror-selectednode,.co-rich-text-editor--disabled [data-resize-container].ProseMirror-selectednode,.co-rich-text-editor--readonly img.ProseMirror-selectednode,.co-rich-text-editor--disabled img.ProseMirror-selectednode{outline:none !important}`;
|
|
8
8
|
|
|
9
9
|
const CoRichTextEditor = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -39,6 +39,13 @@ const CoRichTextEditor = class {
|
|
|
39
39
|
this.autofocus = false;
|
|
40
40
|
/** Toolbar layout. `auto` uses the preset default. */
|
|
41
41
|
this.toolbar = 'auto';
|
|
42
|
+
/** Where the toolbar sits. `bottom` moves it under the content, into a row that also
|
|
43
|
+
* exposes a `toolbar-end` light-DOM slot (this component is `shadow: false`) for the
|
|
44
|
+
* consumer's footer (hint, submit). The row renders whenever the mode is `bottom`, even
|
|
45
|
+
* while the toolbar itself is hidden (disabled/readonly): keep the slotted child ALWAYS
|
|
46
|
+
* mounted and toggle its insides — a placeholder that comes and goes desyncs Stencil's
|
|
47
|
+
* slot relocation with the consumer's vdom. */
|
|
48
|
+
this.toolbarPosition = 'top';
|
|
42
49
|
/** Passthrough: shows the toolbar attachment button (host owns the files). */
|
|
43
50
|
this.attachmentsEnabled = false;
|
|
44
51
|
/** BCP-47 locale for UI strings (e.g. 'en', 'es-CO', 'pt-BR'). Default English. */
|
|
@@ -298,7 +305,10 @@ const CoRichTextEditor = class {
|
|
|
298
305
|
}
|
|
299
306
|
}
|
|
300
307
|
sanitizeHtml(html) {
|
|
301
|
-
|
|
308
|
+
// Con las MISMAS features que cargaron el schema: sin ellas, un <img> con
|
|
309
|
+
// `features.image` o los attrs de menciones en un preset que no los lleva en
|
|
310
|
+
// su whitelist base se podaban EN SILENCIO al emitir (2026-09-18).
|
|
311
|
+
return this.rt.sanitize(html, this.preset, this.parsedFeatures);
|
|
302
312
|
}
|
|
303
313
|
buildOutput(editor) {
|
|
304
314
|
const empty = editor.isEmpty;
|
|
@@ -1984,12 +1994,19 @@ const CoRichTextEditor = class {
|
|
|
1984
1994
|
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);
|
|
1985
1995
|
if (!c)
|
|
1986
1996
|
return true;
|
|
1987
|
-
|
|
1997
|
+
const layout = node.attrs.imageLayout || 'inline';
|
|
1998
|
+
c.dataset.imageLayout = layout;
|
|
1988
1999
|
// Neutralise any absolute positioning baked by the old fixed-page model.
|
|
1989
2000
|
c.style.position = '';
|
|
1990
2001
|
c.style.left = '';
|
|
1991
2002
|
c.style.top = '';
|
|
1992
2003
|
c.style.zIndex = '';
|
|
2004
|
+
// The resize NodeView pins `display: inline-flex` INLINE on the container, which
|
|
2005
|
+
// beats the stylesheet's `display: block` for `center` / `full-width`: the editor
|
|
2006
|
+
// showed those images inline-left while the viewer (and the sent email) centred
|
|
2007
|
+
// them (2026-09-17). Clear it for block layouts so the CSS rule can apply; the
|
|
2008
|
+
// inline value is restored for flow layouts so the resize handles keep working.
|
|
2009
|
+
c.style.display = layout === 'center' || layout === 'full-width' ? '' : 'inline-flex';
|
|
1993
2010
|
return true;
|
|
1994
2011
|
});
|
|
1995
2012
|
}
|
|
@@ -2031,7 +2048,12 @@ const CoRichTextEditor = class {
|
|
|
2031
2048
|
render() {
|
|
2032
2049
|
const showToolbar = this.resolvedToolbar !== 'none' && !this.readonly && !this.disabled;
|
|
2033
2050
|
const showCount = this.showCharacterCount || this.maxLength != null;
|
|
2034
|
-
|
|
2051
|
+
const bottom = this.toolbarPosition === 'bottom';
|
|
2052
|
+
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) => {
|
|
2053
|
+
e.stopPropagation();
|
|
2054
|
+
this.coAttachmentsSelected.emit(e.detail);
|
|
2055
|
+
}, ref: (el) => (this.toolbarEl = el) }));
|
|
2056
|
+
return (h("div", { key: '03be9df0d50d00a3cf889b3404c4f347626aa27c', class: {
|
|
2035
2057
|
'co-rich-text-editor': true,
|
|
2036
2058
|
'co-rich-text-editor--focused': this.hasFocus,
|
|
2037
2059
|
'co-rich-text-editor--disabled': this.disabled,
|
|
@@ -2039,10 +2061,8 @@ const CoRichTextEditor = class {
|
|
|
2039
2061
|
'co-rich-text-editor--loading': !this.ready,
|
|
2040
2062
|
[`co-rich-text-editor--${this.status}`]: this.status !== 'default',
|
|
2041
2063
|
'co-rich-text-editor--flat': this.variant === 'flat',
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
this.coAttachmentsSelected.emit(e.detail);
|
|
2045
|
-
}, 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}` : '')))));
|
|
2064
|
+
'co-rich-text-editor--toolbar-bottom': bottom,
|
|
2065
|
+
}, 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}` : '')))));
|
|
2046
2066
|
}
|
|
2047
2067
|
get el() { return getElement(this); }
|
|
2048
2068
|
static get watchers() { return {
|