@prolibu-suite/cobalt-core 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +395 -29
- package/dist/cjs/co-accordion.cjs.entry.js +4 -4
- package/dist/cjs/co-action-bar.cjs.entry.js +1 -1
- package/dist/cjs/co-audio-player.cjs.entry.js +82 -12
- package/dist/cjs/co-avatar.cjs.entry.js +72 -0
- package/dist/cjs/co-button.cjs.entry.js +1 -1
- package/dist/cjs/co-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/co-chip_2.cjs.entry.js +62 -10
- package/dist/cjs/co-color-picker.cjs.entry.js +40 -10
- package/dist/cjs/co-data-table.cjs.entry.js +82 -4
- package/dist/cjs/co-input.cjs.entry.js +6 -2
- package/dist/cjs/co-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/co-modal.cjs.entry.js +7 -3
- package/dist/cjs/co-navbar.cjs.entry.js +2 -2
- package/dist/cjs/co-number-field.cjs.entry.js +3 -3
- package/dist/cjs/co-overlay.cjs.entry.js +1 -1
- package/dist/cjs/co-page-header.cjs.entry.js +1 -1
- package/dist/cjs/co-phone-field.cjs.entry.js +1 -1
- package/dist/cjs/co-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/co-progress-circle.cjs.entry.js +2 -2
- package/dist/cjs/co-provider-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/co-radio.cjs.entry.js +3 -3
- package/dist/cjs/co-rating.cjs.entry.js +3 -3
- package/dist/cjs/co-ref-field.cjs.entry.js +100 -9
- package/dist/cjs/co-rich-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/co-row.cjs.entry.js +2 -2
- package/dist/cjs/co-select.cjs.entry.js +4 -4
- package/dist/cjs/co-separator.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 +3 -3
- package/dist/cjs/co-toggle-button.cjs.entry.js +3 -3
- package/dist/cjs/{co-avatar_2.cjs.entry.js → co-tooltip.cjs.entry.js} +2 -70
- package/dist/cjs/co-video.cjs.entry.js +2 -2
- package/dist/cjs/cobalt.cjs.js +1 -1
- package/dist/cjs/index-MDAnKsze.js +12 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cobalt/cobalt.esm.js +1 -1
- package/dist/cobalt/{p-82266f11.entry.js → p-000a15b8.entry.js} +1 -1
- package/dist/cobalt/{p-fe7e8813.entry.js → p-148d4aa6.entry.js} +1 -1
- package/dist/cobalt/p-16f8cee6.entry.js +1 -0
- package/dist/cobalt/p-239c5c5f.entry.js +1 -0
- package/dist/cobalt/{p-4d897896.entry.js → p-28764b8e.entry.js} +1 -1
- package/dist/cobalt/{p-73c6d735.entry.js → p-2a30c143.entry.js} +1 -1
- package/dist/cobalt/{p-85501c6a.entry.js → p-2f0f3bb1.entry.js} +1 -1
- package/dist/cobalt/{p-e01f9b9a.entry.js → p-2fba312b.entry.js} +1 -1
- package/dist/cobalt/p-354d5089.entry.js +1 -0
- package/dist/cobalt/{p-5298c030.entry.js → p-383a998e.entry.js} +1 -1
- package/dist/cobalt/{p-325b91b6.entry.js → p-3c4f7026.entry.js} +1 -1
- package/dist/cobalt/p-416795f5.entry.js +1 -0
- package/dist/cobalt/{p-54c987d7.entry.js → p-5a3e4c81.entry.js} +1 -1
- package/dist/cobalt/p-5adf117c.entry.js +1 -0
- package/dist/cobalt/{p-83a9a05a.entry.js → p-5ca394b1.entry.js} +1 -1
- package/dist/cobalt/{p-1a589c8e.entry.js → p-5e4973a6.entry.js} +1 -1
- package/dist/cobalt/{p-b565104d.entry.js → p-6c82a892.entry.js} +1 -1
- package/dist/cobalt/{p-83ea631d.entry.js → p-789c4b3e.entry.js} +1 -1
- package/dist/cobalt/{p-ea20f048.entry.js → p-7e8e6907.entry.js} +1 -1
- package/dist/cobalt/{p-10b82207.entry.js → p-8471abe2.entry.js} +1 -1
- package/dist/cobalt/p-8f2199ff.entry.js +1 -0
- package/dist/cobalt/p-9246e09c.entry.js +1 -0
- package/dist/cobalt/{p-eb063cc0.entry.js → p-93fe45fd.entry.js} +1 -1
- package/dist/cobalt/{p-ad33c40e.entry.js → p-95cfcb34.entry.js} +1 -1
- package/dist/cobalt/{p-bd683db3.entry.js → p-9cf738ed.entry.js} +1 -1
- package/dist/cobalt/p-a2462d7a.entry.js +1 -0
- package/dist/cobalt/p-a325ea0c.entry.js +1 -0
- package/dist/cobalt/{p-e8a4e6b0.entry.js → p-b5bba7fe.entry.js} +1 -1
- package/dist/cobalt/{p-6bf6bc3e.entry.js → p-b821d9de.entry.js} +1 -1
- package/dist/cobalt/{p-92b092db.entry.js → p-be34e447.entry.js} +1 -1
- package/dist/cobalt/p-c7d7d7f7.entry.js +1 -0
- package/dist/cobalt/{p-aae86f96.entry.js → p-d0b2c418.entry.js} +1 -1
- package/dist/cobalt/{p-50bcc76f.entry.js → p-d3344187.entry.js} +1 -1
- package/dist/cobalt/p-d375014b.entry.js +1 -0
- package/dist/cobalt/p-d9d9e8ae.entry.js +1 -0
- package/dist/cobalt/p-e371ec7a.entry.js +1 -0
- package/dist/cobalt/p-eadfd661.entry.js +1 -0
- package/dist/cobalt/p-ef301976.entry.js +1 -0
- package/dist/cobalt/{p-f68dd124.entry.js → p-fb2d1144.entry.js} +1 -1
- package/dist/collection/components/co-accordion/co-accordion.css +2 -2
- package/dist/collection/components/co-accordion/co-accordion.js +4 -4
- package/dist/collection/components/co-action-bar/co-action-bar.css +9 -2
- package/dist/collection/components/co-audio-player/co-audio-player.js +138 -12
- package/dist/collection/components/co-autocomplete/co-autocomplete.js +1 -1
- package/dist/collection/components/co-avatar-group/co-avatar-group.js +1 -1
- package/dist/collection/components/co-button/co-button.css +6 -3
- package/dist/collection/components/co-checkbox/co-checkbox.js +22 -3
- package/dist/collection/components/co-checkbox-group/co-checkbox-group.js +1 -1
- package/dist/collection/components/co-color-picker/co-color-picker.js +40 -10
- 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.css +63 -2
- package/dist/collection/components/co-data-table/co-data-table.js +59 -4
- package/dist/collection/components/co-data-table/headerTruncationLogic.js +34 -0
- package/dist/collection/components/co-date-range-picker/co-date-range-picker.js +2 -2
- package/dist/collection/components/co-input/co-input.js +17 -5
- package/dist/collection/components/co-menu-item/co-menu-item.css +9 -0
- package/dist/collection/components/co-modal/co-modal.css +6 -0
- package/dist/collection/components/co-modal/co-modal.js +33 -2
- package/dist/collection/components/co-navbar/co-navbar.js +2 -2
- package/dist/collection/components/co-number-field/co-number-field.js +3 -3
- package/dist/collection/components/co-option-list/co-option-list.js +32 -3
- package/dist/collection/components/co-option-list/optionListLogic.js +31 -8
- package/dist/collection/components/co-overlay/co-overlay.js +1 -1
- package/dist/collection/components/co-page-header/co-page-header.js +1 -1
- package/dist/collection/components/co-phone-field/co-phone-field.js +1 -1
- package/dist/collection/components/co-popover/co-popover.js +1 -1
- package/dist/collection/components/co-progress-bar/co-progress-bar.js +2 -2
- package/dist/collection/components/co-progress-circle/co-progress-circle.js +2 -2
- package/dist/collection/components/co-radio/co-radio.js +3 -3
- package/dist/collection/components/co-radio-group/co-radio-group.js +1 -1
- package/dist/collection/components/co-rating/co-rating.js +3 -3
- package/dist/collection/components/co-ref-field/co-ref-field.css +40 -0
- package/dist/collection/components/co-ref-field/co-ref-field.js +207 -11
- package/dist/collection/components/co-rich-text-editor/co-rich-text-editor.js +3 -3
- 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 +24 -5
- 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.css +6 -5
- 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.css +9 -5
- 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/components/co-accordion.js +1 -1
- package/dist/components/co-action-bar.js +1 -1
- package/dist/components/co-audio-player.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-checkbox.js +1 -1
- package/dist/components/co-color-picker.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-event-calendar.js +1 -1
- package/dist/components/co-file-field.js +1 -1
- package/dist/components/co-input.js +1 -1
- package/dist/components/co-lightbox.js +1 -1
- package/dist/components/co-list-item.js +1 -1
- package/dist/components/co-menu-item.js +1 -1
- package/dist/components/co-modal.js +1 -1
- package/dist/components/co-navbar.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-page-header.js +1 -1
- package/dist/components/co-phone-field.js +1 -1
- package/dist/components/co-progress-bar.js +1 -1
- package/dist/components/co-progress-circle.js +1 -1
- package/dist/components/co-radio.js +1 -1
- package/dist/components/co-rating.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-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-7TncUlLN.js +1 -0
- package/dist/components/{p-BxP8OBw6.js → p-B9xitpGU.js} +1 -1
- package/dist/components/{p-x4grh-eZ.js → p-CBTGN490.js} +1 -1
- package/dist/components/{p-CXPRaTuo.js → p-CLsAo0-A.js} +1 -1
- package/dist/components/{p-B1QFLcY9.js → p-D2ldYZo1.js} +1 -1
- package/dist/components/{p-Bv6U5y3d.js → p-D3mVYO-G.js} +1 -1
- package/dist/components/{p-DkDTmHCg.js → p-DDV_bRcU.js} +1 -1
- package/dist/components/{p-Be_kyNRE.js → p-DSnJWzQw.js} +1 -1
- package/dist/components/{p-BBP5__CY.js → p-DTi2O4O8.js} +1 -1
- package/dist/components/p-De7w9k6_.js +1 -0
- package/dist/components/{p-Cl3AdEQJ.js → p-DoHLTC0n.js} +1 -1
- package/dist/components/{p-CnX3L8aF.js → p-DxtNejr2.js} +1 -1
- package/dist/components/p-wjt4IAGZ.js +1 -0
- package/dist/components/{p-DIo66nBr.js → p-zuhal3IZ.js} +1 -1
- package/dist/esm/co-accordion.entry.js +4 -4
- package/dist/esm/co-action-bar.entry.js +1 -1
- package/dist/esm/co-audio-player.entry.js +82 -12
- package/dist/esm/co-avatar.entry.js +70 -0
- package/dist/esm/co-button.entry.js +1 -1
- package/dist/esm/co-checkbox.entry.js +3 -3
- package/dist/esm/co-chip_2.entry.js +62 -10
- package/dist/esm/co-color-picker.entry.js +40 -10
- package/dist/esm/co-data-table.entry.js +82 -4
- package/dist/esm/co-input.entry.js +6 -2
- package/dist/esm/co-menu-item.entry.js +1 -1
- package/dist/esm/co-modal.entry.js +7 -3
- package/dist/esm/co-navbar.entry.js +2 -2
- package/dist/esm/co-number-field.entry.js +3 -3
- package/dist/esm/co-overlay.entry.js +1 -1
- package/dist/esm/co-page-header.entry.js +1 -1
- package/dist/esm/co-phone-field.entry.js +1 -1
- package/dist/esm/co-progress-bar.entry.js +2 -2
- package/dist/esm/co-progress-circle.entry.js +2 -2
- package/dist/esm/co-provider-logo_2.entry.js +1 -1
- package/dist/esm/co-radio.entry.js +3 -3
- package/dist/esm/co-rating.entry.js +3 -3
- package/dist/esm/co-ref-field.entry.js +100 -9
- package/dist/esm/co-rich-text-editor.entry.js +3 -3
- package/dist/esm/co-row.entry.js +2 -2
- package/dist/esm/co-select.entry.js +4 -4
- package/dist/esm/co-separator.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 +3 -3
- package/dist/esm/co-toggle-button.entry.js +3 -3
- package/dist/esm/{co-avatar_2.entry.js → co-tooltip.entry.js} +3 -70
- package/dist/esm/co-video.entry.js +2 -2
- package/dist/esm/cobalt.js +1 -1
- package/dist/esm/index-DH5lfRNj.js +12 -8
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/co-accordion/co-accordion.d.ts +6 -0
- package/dist/types/components/co-audio-player/co-audio-player.d.ts +25 -0
- package/dist/types/components/co-checkbox/co-checkbox.d.ts +4 -0
- package/dist/types/components/co-color-picker/co-color-picker.d.ts +4 -2
- package/dist/types/components/co-data-table/co-data-table.d.ts +15 -0
- package/dist/types/components/co-data-table/headerTruncationLogic.d.ts +24 -0
- package/dist/types/components/co-input/co-input.d.ts +5 -1
- package/dist/types/components/co-modal/co-modal.d.ts +10 -0
- package/dist/types/components/co-option-list/co-option-list.d.ts +13 -0
- package/dist/types/components/co-option-list/optionListLogic.d.ts +23 -6
- package/dist/types/components/co-ref-field/co-ref-field.d.ts +38 -0
- package/dist/types/components/co-select/co-select.d.ts +6 -0
- package/dist/types/components.d.ts +79 -3
- package/package.json +2 -2
- package/dist/cobalt/p-15d59169.entry.js +0 -1
- package/dist/cobalt/p-1788aab5.entry.js +0 -1
- package/dist/cobalt/p-20a39218.entry.js +0 -1
- package/dist/cobalt/p-3cc3ff93.entry.js +0 -1
- package/dist/cobalt/p-4908f33f.entry.js +0 -1
- package/dist/cobalt/p-63825d7f.entry.js +0 -1
- package/dist/cobalt/p-6f700f0d.entry.js +0 -1
- package/dist/cobalt/p-88195a63.entry.js +0 -1
- package/dist/cobalt/p-8fa5dc4a.entry.js +0 -1
- package/dist/cobalt/p-b1e8d69e.entry.js +0 -1
- package/dist/cobalt/p-b48917c9.entry.js +0 -1
- package/dist/cobalt/p-c32c176a.entry.js +0 -1
- package/dist/cobalt/p-e48f4e45.entry.js +0 -1
- package/dist/cobalt/p-ef5ca521.entry.js +0 -1
- package/dist/components/p-9ceBPSd1.js +0 -1
- package/dist/components/p-B2IsXte7.js +0 -1
- package/dist/components/p-BsTO1uUA.js +0 -1
|
@@ -468,20 +468,20 @@ export class CoSelect {
|
|
|
468
468
|
const activeOptionId = this.isOpen && this.activeIndex >= 0 && this.activeIndex < options.length
|
|
469
469
|
? this.optionId(this.activeIndex)
|
|
470
470
|
: undefined;
|
|
471
|
-
return (h("div", { key: '
|
|
471
|
+
return (h("div", { key: 'd59a2a542e3a53efbff607faa01eb8eef899e8a1', class: {
|
|
472
472
|
'co-select': true,
|
|
473
473
|
'co-select--open': this.isOpen,
|
|
474
474
|
'co-select--disabled': this.disabled,
|
|
475
475
|
[`co-select--${this.size}`]: true,
|
|
476
476
|
[`co-select--${this.status}`]: this.status !== 'default',
|
|
477
477
|
'co-select--flat': this.variant === 'flat',
|
|
478
|
-
} }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
478
|
+
} }, (this.label || this.secondaryLabel) && (h("div", { key: 'd386f9b3ffcf323736615fe9abb2f2b5b059ef5d', class: "co-select__labels" }, this.label && h("label", { key: '4eb476e1413845a01da90e9d2d1a5d8c77f2dd27', class: "co-select__label" }, this.label, h(RequiredMark, { key: '448008d31b3870ba542003981fde4e59025c119f', required: this.required })), this.secondaryLabel && h("span", { key: 'da8d3dbe5290ed411cafe35ca8d11c9f3a13cf05', class: "co-select__secondary-label" }, this.secondaryLabel))), h("co-popover", { key: 'f83933aad455b009c909d067775a4458d9cf2b93', open: this.isOpen, placement: "bottom-start", matchWidth: true, offset: 4, onCoOpen: this.handlePopoverOpen, onCoClose: this.handlePopoverClose }, h("div", { key: 'cc19e9fa6bb7448f39426fff39a4f000b957cc49', slot: "trigger", class: "co-select__trigger", role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-label": this.label || this.ariaLabelText || undefined, "aria-disabled": this.disabled ? 'true' : undefined, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, tabIndex: this.disabled ? -1 : 0, ref: (el) => (this.triggerEl = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown }, this.iconLeft && h("co-icon", { key: '34b24e244f80e3229d6a9b27af293995fdaf1499', name: this.iconLeft, size: 16, class: "co-select__icon" }), ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.image) && (h("img", { key: '29d4e4aca6b8baeb14da68f7d848e7d92cf2300e', class: "co-select__flag", src: this.selectedOption.image, alt: "" })), this.multiple && this.hasValue ? (h("div", { class: "co-select__chips" }, this.selectedValues.map((v) => {
|
|
479
479
|
const opt = this.parsedOptions.find((o) => o.value === v);
|
|
480
480
|
return (h("span", { class: "co-select__chip", key: v }, h("span", { class: "co-select__chip-label" }, opt ? opt.label : v), h("button", { class: "co-select__chip-remove", type: "button", tabIndex: -1, "aria-label": "Remove", onClick: (e) => {
|
|
481
481
|
e.stopPropagation();
|
|
482
482
|
this.handleOptionClick(v);
|
|
483
483
|
} }, h("co-icon", { name: "x", size: 12 }))));
|
|
484
|
-
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '
|
|
484
|
+
}))) : (h("span", { class: { 'co-select__text': true, 'co-select__text--placeholder': !this.hasValue } }, this.hasValue ? this.displayText : this.placeholder)), this.clearable && this.hasValue && !this.disabled && (h("button", { key: '8283fa5c6e945370d297820e4bf7a0c5c7118d49', class: "co-select__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: 'f9a7b5def3a2cc4e01f2a56e0c10743bc8e07e59', name: "x-circle", size: 16, weight: "fill" }))), h("co-icon", { key: 'f8b679fffe85ffb822e5cc839e35811c462f9592', name: this.isOpen ? 'caret-up' : 'caret-down', size: 16, class: "co-select__caret" })), h("div", { key: 'bda5777b9ebfd020189e29c1a1f6b17c7c86d978', class: "co-select__dropdown" }, this.isOpen && this.searchable && (h("div", { key: 'ad68d72ce251b1b85e8d3b459f435036ee3e755c', class: "co-select__search" }, h("co-icon", { key: '17fce190c24cc8d3a858b0d8eac91fa2f0bfcdc4', name: "magnifying-glass", size: 16, class: "co-select__search-icon" }), h("input", { key: '11b596b00d4ec1ca622fbf8f2a4fe1206dbbd175', class: "co-select__search-input", type: "text", placeholder: this.searchPlaceholder, value: this.searchText, "aria-controls": CoSelect.LISTBOX_ID, "aria-activedescendant": activeOptionId, onInput: this.handleSearchInput, onKeyDown: this.handleNavKeyDown, ref: (el) => (this.searchInputEl = el) }))), this.isOpen && this.searchable && options.length === 0 && (h("div", { key: '248d24733e9a785582be376e9adf1bddd486db79', class: "co-select__empty" }, this.emptyText)), h("div", { key: 'd4a45905d6eeac9e7275df90e01fb7e2fb092fbd', class: "co-select__options", id: CoSelect.LISTBOX_ID, role: "listbox", "aria-multiselectable": this.multiple ? 'true' : undefined, ref: (el) => (this.optionsContainerEl = el) }, this.isOpen && (() => {
|
|
485
485
|
const { totalHeight, startIdx, endIdx, offsetY } = this.getVirtualSlice(options);
|
|
486
486
|
return (
|
|
487
487
|
// Los wrappers del virtualizador van `presentation` para que las
|
|
@@ -497,7 +497,7 @@ export class CoSelect {
|
|
|
497
497
|
'co-select__option--active': index === this.activeIndex,
|
|
498
498
|
}, onClick: () => !isDisabled && this.handleOptionClick(opt.value) }, opt.image ? (h("img", { class: "co-select__option-flag", src: opt.image, alt: "", loading: "lazy" })) : opt.icon ? (h("co-icon", { name: opt.icon, size: 20, class: "co-select__option-icon" })) : null, h("span", { class: "co-select__option-label" }, this.renderLabel(opt.label)), isSelected && h("co-icon", { name: "check", size: 16, class: "co-select__option-check" })));
|
|
499
499
|
}))));
|
|
500
|
-
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: '
|
|
500
|
+
})()), this.isOpen && this.showFooter && (h("co-list-footer", { key: 'd4ec3a85eb066f11213ba0fa4614cc7439180121', class: "co-select__footer", primaryLabel: this.footerPrimaryLabel, primaryIcon: "check", onCoPrimary: this.handleFooterPrimary })))), this.helperText && (h("div", { key: '893289181663600d899a1dba74f2ac47cba72a28', class: `co-select__helper co-select__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'a21b2833866b76dc197cbb1a50edd1e1ec9d3e16', name: this.statusIcon, size: 14, class: "co-select__helper-icon" }), h("span", { key: '5c887dd997d3f7046f74586a5c4258f9a02df416', class: "co-select__helper-text" }, this.helperText)))));
|
|
501
501
|
}
|
|
502
502
|
static get is() { return "co-select"; }
|
|
503
503
|
static get encapsulation() { return "shadow"; }
|
|
@@ -532,6 +532,25 @@ export class CoSelect {
|
|
|
532
532
|
"reflect": false,
|
|
533
533
|
"attribute": "label"
|
|
534
534
|
},
|
|
535
|
+
"ariaLabelText": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"mutable": false,
|
|
538
|
+
"complexType": {
|
|
539
|
+
"original": "string",
|
|
540
|
+
"resolved": "string | undefined",
|
|
541
|
+
"references": {}
|
|
542
|
+
},
|
|
543
|
+
"required": false,
|
|
544
|
+
"optional": true,
|
|
545
|
+
"docs": {
|
|
546
|
+
"tags": [],
|
|
547
|
+
"text": "Accessible name for the combobox when there is NO visible `label` (compact\nrows that drop the field label). Same `ariaLabelText` precedent as\nco-button / co-icon-button / co-fab. `label` still wins as the visible\nname; this only fills the gap \u2014 an `aria-label` on the host never crosses\nthe shadow boundary, so without it a label-less select is nameless."
|
|
548
|
+
},
|
|
549
|
+
"getter": false,
|
|
550
|
+
"setter": false,
|
|
551
|
+
"reflect": false,
|
|
552
|
+
"attribute": "aria-label-text"
|
|
553
|
+
},
|
|
535
554
|
"required": {
|
|
536
555
|
"type": "boolean",
|
|
537
556
|
"mutable": false,
|
|
@@ -718,7 +737,7 @@ export class CoSelect {
|
|
|
718
737
|
"references": {
|
|
719
738
|
"SelectOption": {
|
|
720
739
|
"location": "local",
|
|
721
|
-
"path": "/Users/agox/
|
|
740
|
+
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-select/co-select.tsx",
|
|
722
741
|
"id": "src/components/co-select/co-select.tsx::SelectOption"
|
|
723
742
|
}
|
|
724
743
|
}
|
|
@@ -57,7 +57,7 @@ export class CoSeparator {
|
|
|
57
57
|
style['--co-separator-inset-end'] = '0px';
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
return (h("hr", { key: '
|
|
60
|
+
return (h("hr", { key: '049f323b914f76e3ea6097e56fbbda92e827c58d', class: {
|
|
61
61
|
'co-separator': true,
|
|
62
62
|
'co-separator--vertical': this.vertical,
|
|
63
63
|
'co-separator--dark': this.dark,
|
|
@@ -10,10 +10,10 @@ export class CoSidebar {
|
|
|
10
10
|
this.mode = 'full';
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return (h("nav", { key: '
|
|
13
|
+
return (h("nav", { key: '2b28eeec6d294b22c82de54918a5c9f5da2765b9', class: {
|
|
14
14
|
'co-sidebar': true,
|
|
15
15
|
[`co-sidebar--${this.mode}`]: true,
|
|
16
|
-
}, part: "sidebar" }, h("div", { key: '
|
|
16
|
+
}, part: "sidebar" }, h("div", { key: 'a2f2c05634bb76c3e9a9fdab221835d94c25d9fc', class: "co-sidebar__header", part: "header" }, h("slot", { key: 'f32a89453858268fd4672330fdf1d263793ae578', name: "header" })), h("div", { key: 'ecfaf8385f5fed7f545268e29a5a67468aa5a87a', class: "co-sidebar__body", part: "body" }, h("slot", { key: '2466d2aefe5268f21fd515d282baae2662c17f6c' })), h("div", { key: 'b7e2738a2a6bef17f588d59fba0c4ab21aefa7f8', class: "co-sidebar__footer", part: "footer" }, h("slot", { key: 'dcfcf1f58c99ca0acf359bbf9f73dfe51b0e7c76', name: "footer" }))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "co-sidebar"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -702,7 +702,7 @@ export class CoSidebarNav {
|
|
|
702
702
|
"references": {
|
|
703
703
|
"NavigateDetail": {
|
|
704
704
|
"location": "local",
|
|
705
|
-
"path": "/Users/agox/
|
|
705
|
+
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-sidebar-nav/co-sidebar-nav.tsx",
|
|
706
706
|
"id": "src/components/co-sidebar-nav/co-sidebar-nav.tsx::NavigateDetail"
|
|
707
707
|
}
|
|
708
708
|
}
|
|
@@ -50,7 +50,7 @@ export class CoSkeleton {
|
|
|
50
50
|
const style = { width: this.width };
|
|
51
51
|
if (this.height)
|
|
52
52
|
style.height = this.height;
|
|
53
|
-
return (h("div", { key: '
|
|
53
|
+
return (h("div", { key: '45da8e989feca14de295c7b83bfd8f5e196a9734', class: {
|
|
54
54
|
'co-skeleton': true,
|
|
55
55
|
[`co-skeleton--${this.variant}`]: true,
|
|
56
56
|
'co-skeleton--revealed': this.revealed,
|
|
@@ -72,12 +72,12 @@ export class CoSlider {
|
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
74
|
const pct = this.percentage;
|
|
75
|
-
return (h("div", { key: '
|
|
75
|
+
return (h("div", { key: 'f1b21cde4464675c8a27a30f04af6aeb0eb5c115', class: {
|
|
76
76
|
'co-slider': true,
|
|
77
77
|
'co-slider--disabled': this.disabled,
|
|
78
78
|
'co-slider--dragging': this.dragging,
|
|
79
79
|
[`co-slider--${this.status}`]: this.status !== 'default',
|
|
80
|
-
} }, (this.label || this.secondaryLabel || this.showValue) && (h("div", { key: '
|
|
80
|
+
} }, (this.label || this.secondaryLabel || this.showValue) && (h("div", { key: '20377b1c1b2cb329dd52cc10dfe4f5abf03eaecb', class: "co-slider__labels" }, h("div", { key: 'a9507269b1938732642ce7e7a4371628912377e3', class: "co-slider__labels-left" }, this.label && h("label", { key: '01e1760ef4a59ddc26bb4322f4b97133ccd04992', class: "co-slider__label" }, this.label), this.secondaryLabel && h("span", { key: '1b6c54039e18d9c8025941f76e1b92699855abae', class: "co-slider__secondary-label" }, this.secondaryLabel)), this.showValue && h("span", { key: 'c3fa230e31d052a9cb8a2efc8a3ed3b0b93e8041', class: "co-slider__value" }, this.value))), h("div", { key: 'c387ace9f1256cf4cf52e23add68242c147cd398', class: "co-slider__track-wrapper", ref: el => (this.trackEl = el), onPointerDown: this.handlePointerDown }, h("div", { key: 'f454a70a71984f0b45bd68efc9a36ba74bb4a73b', class: "co-slider__track" }, h("div", { key: '28b1fd955b14cd9ec563ad0a0c8cb625cf87bf1e', class: "co-slider__fill", style: { width: `${pct}%` } })), h("div", { key: '3f8e97722be5d5589931158b243f3e7084dae971', class: "co-slider__thumb", style: { left: `${pct}%` } })), this.showMarks && (h("div", { key: '7b58ecbcdfa544a47e15a9be15cec4baab35c56e', class: "co-slider__marks" }, h("span", { key: 'e94e7641d59d54aa92b7896d4f9a85cff93ca162', class: "co-slider__mark" }, this.min), h("span", { key: 'f6b139482d3d18885461d9d44fac8c4960897c00', class: "co-slider__mark" }, this.max))), h("input", { key: '65ddf275339b86a5451e28905ed4086bdde3bb75', class: "co-slider__native", type: "range", min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled, onInput: this.handleInputChange, "aria-label": this.label || 'Slider' }), this.helperText && (h("div", { key: '4b603fee85613d8221dfdca0687d7735c7bd7947', class: `co-slider__helper co-slider__helper--${this.status}` }, this.statusIcon && h("co-icon", { key: 'c75be242a86fafbe87edaf0b47458f6897ca642f', name: this.statusIcon, size: 14, weight: "fill", class: "co-slider__helper-icon" }), h("span", { key: 'fa7e03cd30070441423b261de7704c39f24fbb9d', class: "co-slider__helper-text" }, this.helperText)))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "co-slider"; }
|
|
83
83
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,16 +29,16 @@ export class CoSwitch {
|
|
|
29
29
|
render() {
|
|
30
30
|
const hasLabels = this.label || this.secondaryLabel;
|
|
31
31
|
const hasHelper = !!this.helperText;
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '956a6fb6f379beec4aceda49fb0b6460a4e88e7e', class: {
|
|
33
33
|
'co-switch-wrapper': true,
|
|
34
34
|
'co-switch-wrapper--disabled': this.disabled,
|
|
35
35
|
[`co-switch-wrapper--${this.status}`]: this.status !== 'default',
|
|
36
|
-
} }, h("div", { key: '
|
|
36
|
+
} }, h("div", { key: '320bc52265bbb759766bf2897fa46149fd29ea56', class: "co-switch-wrapper__row", onClick: this.handleClick }, h("button", { key: '8f8ccbee5f6b8bf4c59af1363184dc8289c0fd4f', role: "switch", "aria-checked": String(this.checked), "aria-label": this.label || '', class: {
|
|
37
37
|
'co-switch': true,
|
|
38
38
|
'co-switch--on': this.checked,
|
|
39
39
|
'co-switch--off': !this.checked,
|
|
40
40
|
'co-switch--disabled': this.disabled,
|
|
41
|
-
}, disabled: this.disabled, part: "track" }, h("span", { key: '
|
|
41
|
+
}, disabled: this.disabled, part: "track" }, h("span", { key: '963515eb5e7a6c2d8904367cabe4afd92c4034bd', class: "co-switch__thumb", part: "thumb" })), hasLabels && (h("div", { key: '2560a81688f26bc0b3bddef3c5553a8f9754678b', class: "co-switch-wrapper__labels" }, this.label && h("span", { key: '9996ab6c675c43be962414e28ecef532738322bc', class: "co-switch-wrapper__label", part: "label" }, this.label, h(RequiredMark, { key: '5505498fc3a27b5bf515935c46a3fdfdfe563cad', required: this.required })), this.secondaryLabel && (h("span", { key: '6886950f1e66077f46cceca4aabf2b0ae7a21f3c', class: "co-switch-wrapper__secondary-label", part: "secondary-label" }, this.secondaryLabel))))), hasHelper && (h("div", { key: '536e0021e9e1a986eb76eacf9e1b9af37cf0e1f0', class: `co-switch-wrapper__helper co-switch-wrapper__helper--${this.status}` }, this.statusIcon && (h("co-icon", { key: 'e98eb52b8f30b868b0b4df6f45b7594290c8ebd3', name: this.statusIcon, size: 14, weight: "fill", class: "co-switch-wrapper__helper-icon" })), h("span", { key: 'f77df5e62fedd3c28dd0e6b8dcc2ad9118c9f032', class: "co-switch-wrapper__helper-text" }, this.helperText)))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "co-switch"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -21,13 +21,13 @@ export class CoTab {
|
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
23
|
const iconSize = this.variant === 'underline' ? 16 : this.size === 'large' ? 18 : 14;
|
|
24
|
-
return (h("button", { key: '
|
|
24
|
+
return (h("button", { key: '773b792dbc4250e0833629d95495b97140892ee3', class: {
|
|
25
25
|
'co-tab': true,
|
|
26
26
|
[`co-tab--${this.size}`]: true,
|
|
27
27
|
[`co-tab--${this.variant}`]: true,
|
|
28
28
|
'co-tab--selected': this.selected,
|
|
29
29
|
'co-tab--disabled': this.disabled,
|
|
30
|
-
}, type: "button", role: "tab", "aria-selected": this.selected ? 'true' : 'false', disabled: this.disabled, part: "tab", onClick: this.handleClick }, this.iconLeft && (h("co-icon", { key: '
|
|
30
|
+
}, type: "button", role: "tab", "aria-selected": this.selected ? 'true' : 'false', disabled: this.disabled, part: "tab", onClick: this.handleClick }, this.iconLeft && (h("co-icon", { key: '764382b4d7a71307897e71b1937c0b22b5c873b0', name: this.iconLeft, size: iconSize })), h("span", { key: '0276e774f797a28a5a9d4a22726a8c5b40ee7c72' }, this.label), this.badge && (h("span", { key: '8d758122ee23232d7687b69f8dddf1820f647505', class: "co-tab__badge", part: "badge" }, this.badge)), this.iconRight && (h("co-icon", { key: '5c2fda105048d62b45a5f0a124110a4a5b919575', name: this.iconRight, size: iconSize }))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "co-tab"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -49,10 +49,10 @@ export class CoTabGroup {
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h("div", { key: '
|
|
52
|
+
return (h("div", { key: '70c781dc6c053c0fbaecb294d08130df50f6895c', class: {
|
|
53
53
|
'co-tab-group': true,
|
|
54
54
|
[`co-tab-group--${this.variant}`]: true,
|
|
55
|
-
}, role: "tablist", part: "tab-group", onWheel: this.onWheel }, h("slot", { key: '
|
|
55
|
+
}, role: "tablist", part: "tab-group", onWheel: this.onWheel }, h("slot", { key: '4337b016d1ce84d1d4bdda5d8f0f6b3f03e1fa27', onSlotchange: this.onSlotChange })));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "co-tab-group"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -186,14 +186,14 @@ export class CoTagsField {
|
|
|
186
186
|
const showClear = this.clearable && this.hasValue && !this.disabled && !this.readonly;
|
|
187
187
|
const helper = this.isInvalid ? this.errorMessage : this.helperText;
|
|
188
188
|
const showInput = !this.readonly && !this.atCapacity;
|
|
189
|
-
return (h("div", { key: '
|
|
189
|
+
return (h("div", { key: 'f3e43affdea1fbb7b4a146c7d47fc476064a4461', class: {
|
|
190
190
|
'co-tags-field': true,
|
|
191
191
|
'co-tags-field--disabled': this.disabled,
|
|
192
192
|
'co-tags-field--focused': this.hasFocus,
|
|
193
193
|
'co-tags-field--filled': this.hasValue,
|
|
194
194
|
'co-tags-field--invalid': this.isInvalid,
|
|
195
195
|
[`co-tags-field--${this.size}`]: true,
|
|
196
|
-
}, part: "wrapper" }, this.label && (h("div", { key: '
|
|
196
|
+
}, part: "wrapper" }, this.label && (h("div", { key: 'd1ee2a4474f714b5677dbe30234c35ae5eafcbb8', class: "co-tags-field__labels" }, h("label", { key: '2992ec19d614d79e4d464c4d395d0928b4640796', class: "co-tags-field__label", part: "label" }, this.label, h(RequiredMark, { key: 'dff39a47aeb7f61abeffd3da6d774feea1cbb690', required: this.required })))), h("div", { key: '634c966d0e00075e31a87e8c34d5d82e706d259b', class: "co-tags-field__field-row" }, h("div", { key: '770158cf92aebf36c7ef070af2dedc15527b0207', class: "co-tags-field__field", part: "field", onClick: this.handleFieldClick }, h("div", { key: 'd92243180b3a674e7a8c49e5d693cec55e77b90d', class: "co-tags-field__input-wrapper" }, tags.map((tag, index) => this.editingIndex === index ? (h("input", { key: `edit-${index}`, ref: (el) => (this.editEl = el), class: "co-tags-field__edit", type: "text", value: this.editingDraft, onInput: (e) => (this.editingDraft = e.target.value), onKeyDown: this.handleEditKeyDown, onBlur: () => this.saveEdit() })) : (
|
|
197
197
|
// Shared field-chip (utils/fieldChip.tsx) per the Figma
|
|
198
198
|
// "Tipo=Chips" spec — same look as co-ref-field's chips.
|
|
199
199
|
h(FieldChip, { key: `chip-${index}-${tag}`, baseClass: "co-tags-field__chip", label: tag, title: tag, onChipDblClick: () => this.startEdit(index), onRemove: !this.disabled && !this.readonly
|
|
@@ -201,13 +201,13 @@ export class CoTagsField {
|
|
|
201
201
|
e.stopPropagation();
|
|
202
202
|
this.removeTag(index);
|
|
203
203
|
}
|
|
204
|
-
: undefined }))), showInput && (h("input", { key: '
|
|
204
|
+
: undefined }))), showInput && (h("input", { key: '9b60812333730a949d9bef63f63690086735d4ad', ref: (el) => (this.inputEl = el), class: "co-tags-field__native", type: "text", autocomplete: "off", value: this.draft, placeholder: tags.length === 0 ? this.placeholder : '', disabled: this.disabled, required: this.required && tags.length === 0, "aria-invalid": this.isInvalid ? 'true' : 'false', "aria-label": !this.label ? 'Tags' : undefined, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, part: "input" }))), this.clearable && (h("button", { key: '5e36f6cbe51abd905584791348bd00ff903d448a', class: {
|
|
205
205
|
'co-tags-field__clear': true,
|
|
206
206
|
'co-tags-field__clear--hidden': !showClear,
|
|
207
|
-
}, type: "button", tabIndex: -1, onMouseDown: (e) => e.preventDefault() /* keep input focus */, onClick: this.handleClearAll, "aria-label": "Clear all", part: "clear" }, h("co-icon", { key: '
|
|
207
|
+
}, type: "button", tabIndex: -1, onMouseDown: (e) => e.preventDefault() /* keep input focus */, onClick: this.handleClearAll, "aria-label": "Clear all", part: "clear" }, h("co-icon", { key: 'bf2295665df0b0f628ab68b33435b5864af74c7e', name: "x-circle", size: 16, weight: "fill" }))))), this.name && h("input", { key: 'bb9359faedaec2cbcf175929b24f2d00ecf13e59', type: "hidden", name: this.name, value: JSON.stringify(tags) }), helper && (h("div", { key: '7994108e5ab59ad4e85243b44b958a6ebfaf250f', class: {
|
|
208
208
|
'co-tags-field__helper': true,
|
|
209
209
|
'co-tags-field__helper--error': this.isInvalid,
|
|
210
|
-
}, part: "helper" }, this.isInvalid && (h("co-icon", { key: '
|
|
210
|
+
}, part: "helper" }, this.isInvalid && (h("co-icon", { key: '0ec2df5f071939df6b84dc4c0a013d3c2355bfeb', name: "warning-circle", size: 14, class: "co-tags-field__helper-icon" })), h("span", { key: '82354fcd44fe07f40f906cf88c998554ac7b199a', class: "co-tags-field__helper-text" }, helper)))));
|
|
211
211
|
}
|
|
212
212
|
static get is() { return "co-tags-field"; }
|
|
213
213
|
static get encapsulation() { return "shadow"; }
|
|
@@ -76,7 +76,7 @@ export class CoTextarea {
|
|
|
76
76
|
const showClear = this.clearable && this.hasValue && !this.disabled && !this.readonly;
|
|
77
77
|
const isOverLimit = this.maxLength != null && this.charCount > this.maxLength;
|
|
78
78
|
const statusClass = this.status !== 'default' ? `co-textarea--${this.status}` : '';
|
|
79
|
-
return (h("div", { key: '
|
|
79
|
+
return (h("div", { key: 'c5d9a8fc2c47e2ac4787441d2837b9bf600aceb8', class: {
|
|
80
80
|
'co-textarea': true,
|
|
81
81
|
'co-textarea--disabled': this.disabled,
|
|
82
82
|
'co-textarea--focused': this.hasFocus,
|
|
@@ -85,13 +85,13 @@ export class CoTextarea {
|
|
|
85
85
|
[`co-textarea--${this.size}`]: true,
|
|
86
86
|
[statusClass]: !!statusClass,
|
|
87
87
|
'co-textarea--flat': this.variant === 'flat',
|
|
88
|
-
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '
|
|
88
|
+
}, part: "wrapper" }, (this.label || this.secondaryLabel) && (h("div", { key: '4c71cdc7a1d8063b4fc88613cc6840ae4d8fffbd', class: "co-textarea__labels" }, this.label && (h("label", { key: '7a332a79ca80a5e7e6e0e18431871c83175cf6ad', class: "co-textarea__label", part: "label" }, this.label, h(RequiredMark, { key: 'f266eeff511590081664ff5677e85f91bb8cc6c6', required: this.required }))), this.secondaryLabel && (h("span", { key: '43d1d98374cd6cdb9e9ebbed9a0677d36ccf0242', class: "co-textarea__secondary-label" }, this.secondaryLabel)))), h("div", { key: '31b9a71972fc8bf6db1e01f6ef421d1cd01c0c71', class: "co-textarea__field", part: "field" }, h("textarea", { key: 'c6e42c9cb50919f8d28d52acc6ac67824d2ab9bc', ref: (el) => (this.textareaEl = el), class: {
|
|
89
89
|
'co-textarea__native': true,
|
|
90
90
|
[`co-textarea__native--resize-${this.resize}`]: true,
|
|
91
|
-
}, rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, "aria-invalid": this.status === 'error' || isOverLimit ? 'true' : 'false', onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, part: "input" }), showClear && (h("button", { key: '
|
|
91
|
+
}, rows: this.rows, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, "aria-invalid": this.status === 'error' || isOverLimit ? 'true' : 'false', onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, part: "input" }), showClear && (h("button", { key: '37ade2676d789e93699b31c60ee1922287613c99', class: "co-textarea__clear", type: "button", tabIndex: -1, onClick: this.handleClear, "aria-label": "Clear" }, h("co-icon", { key: '635e46dd3780dce114beeda02e05a8dc512f0e64', name: "x-circle", size: 16, weight: "fill" })))), (this.helperText || this.maxLength != null) && (h("div", { key: 'c845c82bba32624dbb23b518283f646fc573766e', class: "co-textarea__footer" }, this.helperText && (h("div", { key: '3cf30fdfbab68e06fc757b7a64b7d89cbefe53ac', class: {
|
|
92
92
|
'co-textarea__helper': true,
|
|
93
93
|
'co-textarea__helper--error': this.status === 'error',
|
|
94
|
-
}, part: "helper" }, this.status === 'error' && (h("co-icon", { key: '
|
|
94
|
+
}, part: "helper" }, this.status === 'error' && (h("co-icon", { key: '16009fbd88a7f4769bb1ddf1cbadf8aaf3dce17b', name: "warning-circle", size: 14, class: "co-textarea__helper-icon" })), h("span", { key: '3986eda7ec8df0da750a410bf6c361b864386d64', class: "co-textarea__helper-text" }, this.helperText))), this.maxLength != null && (h("span", { key: '7ed3ab0c254b0d69f90016dcdc419408410ea457', class: {
|
|
95
95
|
'co-textarea__counter': true,
|
|
96
96
|
'co-textarea__counter--over': isOverLimit,
|
|
97
97
|
}, part: "counter" }, this.charCount, "/", this.maxLength))))));
|
|
@@ -313,7 +313,7 @@ export class CoTimeField {
|
|
|
313
313
|
}
|
|
314
314
|
render() {
|
|
315
315
|
const t = getDateStrings(this.locale);
|
|
316
|
-
return (h("div", { key: '
|
|
316
|
+
return (h("div", { key: 'e9feeca94b48ef78597c8a8aeb56e147cc639cac', class: { 'co-time-field': true, 'co-time-field--disabled': this.disabled }, role: "group", "aria-label": this.fieldLabel || t.timeFieldLabel }, h("span", { key: 'a1b992c5bbb5dfd2dfec4aedadf7f432a218a36c', class: "co-time-field__segs" }, this.renderSeg('hour', t), h("span", { key: 'dbc63905e7c40a17e01dd2a7e69b914c9d5359e3', class: "co-time-field__sep", "aria-hidden": "true" }, ":"), this.renderSeg('minute', t), this.hour12 && this.renderSeg('period', t)), h("span", { key: 'b48347646ac193984b5d247709280ef00569c5d8', class: "co-time-field__steppers" }, h("button", { key: '594b11fc3e26a3a6f72becbb6eed0896304dd773', type: "button", tabIndex: -1, "aria-hidden": "true", onMouseDown: (e) => e.preventDefault(), onClick: this.onStepperClick(1) }, h("co-icon", { key: 'd7467c53e0e863633c5efc0ce1574e43f2f317ad', name: "caret-up", size: 10 })), h("button", { key: 'c8a0e2aeeb202d09d7f6b96fadc10c96d2cd5b7c', type: "button", tabIndex: -1, "aria-hidden": "true", onMouseDown: (e) => e.preventDefault(), onClick: this.onStepperClick(-1) }, h("co-icon", { key: '4358757b857d4011f0b05dcb14b82f35057c7e64', name: "caret-down", size: 10 })))));
|
|
317
317
|
}
|
|
318
318
|
static get is() { return "co-time-field"; }
|
|
319
319
|
static get encapsulation() { return "shadow"; }
|
|
@@ -180,7 +180,7 @@ export class CoToast {
|
|
|
180
180
|
"references": {
|
|
181
181
|
"CoToastActionsLayout": {
|
|
182
182
|
"location": "local",
|
|
183
|
-
"path": "/Users/agox/
|
|
183
|
+
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-toast/co-toast.tsx",
|
|
184
184
|
"id": "src/components/co-toast/co-toast.tsx::CoToastActionsLayout"
|
|
185
185
|
}
|
|
186
186
|
}
|
|
@@ -206,7 +206,7 @@ export class CoToast {
|
|
|
206
206
|
"references": {
|
|
207
207
|
"CoToastVariant": {
|
|
208
208
|
"location": "local",
|
|
209
|
-
"path": "/Users/agox/
|
|
209
|
+
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-toast/co-toast.tsx",
|
|
210
210
|
"id": "src/components/co-toast/co-toast.tsx::CoToastVariant"
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -90,8 +90,9 @@
|
|
|
90
90
|
(gray-500 sobre gray-100 quedaba ilegible); todo semántico para que el track
|
|
91
91
|
se tematice en dark (las primitivas gray-* no tienen contraparte). */
|
|
92
92
|
:host([variant='track']) .co-toggle-button {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
/* Knobs heredables (ver co-toggle-button-group.css): alto y radio de la pill. */
|
|
94
|
+
height: var(--co-toggle-pill-height, 30px);
|
|
95
|
+
border-radius: var(--co-toggle-pill-radius, 8px);
|
|
95
96
|
border-color: transparent;
|
|
96
97
|
background: transparent;
|
|
97
98
|
color: var(--co-semantic-text-secondary);
|
|
@@ -116,11 +117,11 @@
|
|
|
116
117
|
:host([variant='track']) .co-toggle-button--selected {
|
|
117
118
|
background: var(--co-semantic-surface-page);
|
|
118
119
|
color: var(--co-semantic-text-default);
|
|
119
|
-
border-color: var(--co-semantic-border-default);
|
|
120
|
-
box-shadow: var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04));
|
|
120
|
+
border-color: var(--co-toggle-pill-border, var(--co-semantic-border-default));
|
|
121
|
+
box-shadow: var(--co-toggle-pill-shadow, var(--co-shadow-sm, 0 1px 2px 0 rgba(26, 26, 26, 0.04)));
|
|
121
122
|
}
|
|
122
123
|
|
|
123
124
|
:host([variant='track']) .co-toggle-button--selected:hover:not(:disabled) {
|
|
124
125
|
background: var(--co-semantic-surface-page);
|
|
125
|
-
border-color: var(--co-semantic-border-default);
|
|
126
|
+
border-color: var(--co-toggle-pill-border, var(--co-semantic-border-default));
|
|
126
127
|
}
|
|
@@ -18,13 +18,13 @@ export class CoToggleButton {
|
|
|
18
18
|
render() {
|
|
19
19
|
const iconSize = this.variant === 'track' ? 18 : this.size === 'l' ? 20 : this.size === 'xs' ? 14 : 16;
|
|
20
20
|
const iconWeight = this.selected && this.selectedIconWeight ? this.selectedIconWeight : undefined;
|
|
21
|
-
return (h("button", { key: '
|
|
21
|
+
return (h("button", { key: '9f8e5b8b74b68e3682acf0b395474e1d9a8016d7', class: {
|
|
22
22
|
'co-toggle-button': true,
|
|
23
23
|
'co-toggle-button--selected': this.selected,
|
|
24
24
|
[`co-toggle-button--${this.size}`]: true,
|
|
25
25
|
'co-toggle-button--disabled': this.disabled,
|
|
26
26
|
'co-toggle-button--icon-only': !this.label && (!!this.iconLeft || !!this.iconRight),
|
|
27
|
-
}, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: '
|
|
27
|
+
}, type: "button", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.handleClick }, h("slot", { key: 'f955045a685046231355cb38bd4760022a68d726', name: "leading" }), this.iconLeft && h("co-icon", { key: '5b3d98920f33d46ab969c28adb94cf538cc1c0cb', name: this.iconLeft, size: iconSize, weight: iconWeight }), this.label && h("span", { key: '05baa968d95fe2a2d573a290f453eadc86640417', class: "co-toggle-button__label" }, this.label), this.iconRight && h("co-icon", { key: '8ed550925d947d56563c9dd9534b4e9941abb31a', name: this.iconRight, size: iconSize, weight: iconWeight })));
|
|
28
28
|
}
|
|
29
29
|
static get is() { return "co-toggle-button"; }
|
|
30
30
|
static get encapsulation() { return "shadow"; }
|
|
@@ -84,16 +84,20 @@
|
|
|
84
84
|
We only neutralise the connected seam collapse (negative margins). */
|
|
85
85
|
.co-toggle-button-group--track {
|
|
86
86
|
display: inline-flex;
|
|
87
|
-
gap: 2px;
|
|
88
|
-
|
|
87
|
+
gap: var(--co-toggle-track-gap, 2px);
|
|
88
|
+
/* Knobs (custom props, heredan a través del shadow — mismo mecanismo que
|
|
89
|
+
--co-button-radius): un consumidor con spec propia (p. ej. el track de 52px
|
|
90
|
+
del pre-vuelo de llamadas, Figma 4024:90933) ajusta padding/radio/fondo sin
|
|
91
|
+
::part. Los defaults son el look del DS. */
|
|
92
|
+
padding: var(--co-toggle-track-padding, 3px);
|
|
89
93
|
/* border-box: con [full-width] el div interno lleva width:100% y este padding;
|
|
90
94
|
en content-box pintaba 6px más ancho que el host (sin part= para parchear afuera). */
|
|
91
95
|
box-sizing: border-box;
|
|
92
|
-
border-radius: 10px;
|
|
96
|
+
border-radius: var(--co-toggle-track-radius, 10px);
|
|
93
97
|
/* Track un escalón más oscuro (muted = gray-200) + hairline: sobre gray-100 la pill
|
|
94
98
|
blanca no se despegaba. Semántico: se tematiza en dark. */
|
|
95
|
-
background: var(--co-semantic-surface-muted);
|
|
96
|
-
box-shadow: inset 0 0 0 1px var(--co-semantic-border-subtle);
|
|
99
|
+
background: var(--co-toggle-track-bg, var(--co-semantic-surface-muted));
|
|
100
|
+
box-shadow: var(--co-toggle-track-ring, inset 0 0 0 1px var(--co-semantic-border-subtle));
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
.co-toggle-button-group--track ::slotted(co-toggle-button) {
|
|
@@ -65,13 +65,13 @@ export class CoToggleButtonGroup {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: '96c8d3f028dba5afbfb0ea1ca636a60133e389b5', class: {
|
|
69
69
|
'co-toggle-button-group': true,
|
|
70
70
|
[`co-toggle-button-group--${this.direction}`]: true,
|
|
71
71
|
[`co-toggle-button-group--${this.variant}`]: true,
|
|
72
72
|
'co-toggle-button-group--disabled': this.disabled,
|
|
73
73
|
'co-toggle-button-group--full': this.fullWidth,
|
|
74
|
-
}, role: "group" }, h("slot", { key: '
|
|
74
|
+
}, role: "group" }, h("slot", { key: '58f5d4374160b3dd8befd75e8dc1b78b741927c0' })));
|
|
75
75
|
}
|
|
76
76
|
static get is() { return "co-toggle-button-group"; }
|
|
77
77
|
static get encapsulation() { return "shadow"; }
|
|
@@ -256,7 +256,7 @@ export class CoTooltip {
|
|
|
256
256
|
// ── Render ─────────────────────────────────────────────────
|
|
257
257
|
render() {
|
|
258
258
|
const side = this.actualPlacement.split('-')[0];
|
|
259
|
-
return (h("div", { key: '
|
|
259
|
+
return (h("div", { key: 'f02722680bdcda5ad96f395d6759fac291c40485', class: "co-tooltip" }, h("div", { key: '10a259df8bc3bf039fe94257597c7065ec5306b7', class: "co-tooltip__trigger", ref: (el) => (this.triggerEl = el), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, onPointerDown: this.handlePointerDown, onFocusin: this.handleFocusIn, onFocusout: this.handleFocusOut, onKeyDown: this.handleKeyDown, "aria-describedby": this.visible ? 'tooltip-panel' : undefined }, h("slot", { key: 'a9829875262900841ca3b66fdccda1c8f87e6715' })), (this.visible || this.closing) && this.content && (h("div", { key: 'daaafa93cd8360ccb01cdaf862fe7240a1f56abd', id: "tooltip-panel", class: {
|
|
260
260
|
'co-tooltip__panel': true,
|
|
261
261
|
[`co-tooltip__panel--${side}`]: true,
|
|
262
262
|
'co-tooltip__panel--closing': this.closing,
|
|
@@ -266,7 +266,7 @@ export class CoTooltip {
|
|
|
266
266
|
this.promotePanel();
|
|
267
267
|
this.scheduleUpdate();
|
|
268
268
|
}
|
|
269
|
-
}, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: '
|
|
269
|
+
}, style: { maxWidth: this.maxWidth } }, this.arrow && h("div", { key: '2f47f815efe70e6f5f51ed792080ec9e11312976', class: `co-tooltip__arrow co-tooltip__arrow--${side}` }), h("span", { key: '92bbcdb27aa99c93e467c16343ac293a21f59424', class: "co-tooltip__content" }, this.content)))));
|
|
270
270
|
}
|
|
271
271
|
static get is() { return "co-tooltip"; }
|
|
272
272
|
static get encapsulation() { return "shadow"; }
|
|
@@ -205,7 +205,7 @@ export class CoTransferList {
|
|
|
205
205
|
"references": {
|
|
206
206
|
"TransferOption": {
|
|
207
207
|
"location": "local",
|
|
208
|
-
"path": "/Users/agox/
|
|
208
|
+
"path": "/Users/agox/worktrees/cobalt-release/packages/core/src/components/co-transfer-list/co-transfer-list.tsx",
|
|
209
209
|
"id": "src/components/co-transfer-list/co-transfer-list.tsx::TransferOption"
|
|
210
210
|
}
|
|
211
211
|
}
|
|
@@ -814,14 +814,14 @@ export class CoVideo {
|
|
|
814
814
|
// ═══════════════════════════════════════════════════
|
|
815
815
|
render() {
|
|
816
816
|
const aspectClass = `co-video--${this.aspectRatio.replace(':', '-')}`;
|
|
817
|
-
return (h(Host, { key: '
|
|
817
|
+
return (h(Host, { key: '61eac04c652cdce63bd06c3103e632ee4bd2d791' }, h("div", { key: '52180564b673a7d1ce91922636fc333242f8043d', class: {
|
|
818
818
|
'co-video': true,
|
|
819
819
|
[aspectClass]: true,
|
|
820
820
|
[`co-video--rounded-${this.rounded}`]: true,
|
|
821
821
|
'co-video--disabled': this.disabled,
|
|
822
822
|
'co-video--fullscreen': this.isFullscreen,
|
|
823
823
|
'co-video--playing': this.isPlaying,
|
|
824
|
-
}, part: "container", ref: el => (this.containerEl = el), role: "region", "aria-label": this.t.player, tabindex: 0, onKeyDown: this.handleKeyDown, onMouseMove: this.handleContainerMouseMove, onMouseLeave: this.handleContainerMouseLeave, onTouchStart: this.handleContainerTouchStart }, h("video", { key: '
|
|
824
|
+
}, part: "container", ref: el => (this.containerEl = el), role: "region", "aria-label": this.t.player, tabindex: 0, onKeyDown: this.handleKeyDown, onMouseMove: this.handleContainerMouseMove, onMouseLeave: this.handleContainerMouseLeave, onTouchStart: this.handleContainerTouchStart }, h("video", { key: '8351b12f368bc6a4903aca40665ec5fb0f559592', ref: el => (this.videoEl = el), class: "co-video__native", part: "video", src: this.src || undefined, poster: undefined, preload: this.preload, loop: this.loop, playsinline: true, tabindex: -1, controlsList: this.allowDownload ? undefined : 'nodownload' }), this.renderPoster(), this.renderLoader(), this.renderBigPlayButton(), this.renderError(), h("div", { key: 'a0bd076367f9a65bf1c023c6cf5ef37a3314565d', class: "co-video__click-area", onClick: this.handleVideoAreaClick }), this.renderControls())));
|
|
825
825
|
}
|
|
826
826
|
static get is() { return "co-video"; }
|
|
827
827
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as
|
|
1
|
+
import{t as o,p as e,H as i,c,h as a}from"./index.js";import{d as t}from"./p-DNJAIVfI.js";const n=e(class extends i{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.coToggle=c(this,"coToggle",3),this.open=!0,this.heading="",this.subheading="",this.disabled=!1,this.hasSubheadingSlot=!1,this.handleToggle=()=>{this.disabled||(this.open=!this.open,this.coToggle.emit(this.open))}}componentWillLoad(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}componentWillRender(){this.hasSubheadingSlot=!!this.el.querySelector('[slot="subheading"]')}get showSubheading(){return!(!this.subheading||!this.subheading.trim())||this.hasSubheadingSlot}render(){return a("div",{key:"96b5b0f97642972b0505d038125f9e225ee1ab2d",class:{"co-accordion":!0,"co-accordion--open":this.open,"co-accordion--disabled":this.disabled},part:"accordion"},a("div",{key:"91f8d47d2f342a48b7d88fd6385fe532f969a636",class:"co-accordion__header",part:"header"},a("span",{key:"b55915f1078d0b7f46ff08b7f5d78383050a8df1",class:"co-accordion__heading-group"},a("span",{key:"99a08344b195983609dfd5d4054af8f96547ae1f",class:"co-accordion__heading",part:"heading"},a("slot",{key:"330134f4fdbb831253bcec63bfd43968171e7c44",name:"header"},this.heading)),this.showSubheading&&a("span",{key:"5b8fcb450d266843ff722cf9ec97d6e600cff12d",class:"co-accordion__subheading",part:"subheading"},a("slot",{key:"51a98c7f68bd7e4d6d0705c21feb288389af5d4e",name:"subheading"},this.subheading))),a("button",{key:"8eea6b6fdfc04dfaf5561527dcc8d40be1069da4",class:"co-accordion__caret",type:"button","aria-expanded":this.open?"true":"false","aria-label":this.heading||"Toggle section",disabled:this.disabled,onClick:this.handleToggle,part:"caret"},a("co-icon",{key:"a0343d006eafb7cb895584c05427d590e9c820a7",name:"caret-up",size:20}))),a("div",{key:"24edd828c5e12ebfcf5dce6eb99d0755e04ebe68",class:"co-accordion__body",part:"body"},a("div",{key:"29e4e7514802a8f7269e135d4e4112def33663fa",class:"co-accordion__body-inner",part:"body-inner"},a("slot",{key:"38e1e269578c9e949c8434c839b291e60612e538"}))))}get el(){return this}static get style(){return":host{display:block}.co-accordion{display:flex;flex-direction:column;width:100%}.co-accordion__header{display:flex;align-items:center;justify-content:space-between;gap:var(--co-spacing-sm, 6px);width:100%;font-family:var(--co-font-family-primary);color:var(--co-semantic-text-default);text-align:left}.co-accordion__heading-group{flex:1;min-width:0;display:flex;flex-direction:column;gap:var(--co-spacing-xxs, 2px)}.co-accordion__heading{font-size:var(--co-font-size-24);font-weight:500;line-height:1.25;letter-spacing:-0.03em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__subheading{font-size:var(--co-font-size-14);font-weight:400;line-height:1.3;letter-spacing:normal;color:var(--co-semantic-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.co-accordion__caret{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;background:transparent;border-radius:var(--co-border-radius-full, 9999px);color:var(--co-semantic-text-default);cursor:pointer;transition:transform var(--co-motion-duration-base) var(--co-motion-ease-out), background-color var(--co-motion-duration-fast) var(--co-motion-ease-out);transform:rotate(180deg);}.co-accordion__caret:hover:not(:disabled){background:var(--co-color-opacity-negro-8, rgba(31, 28, 27, 0.08))}.co-accordion--open .co-accordion__caret{transform:rotate(0deg);}.co-accordion__body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion__body-inner{min-height:0;overflow:hidden;padding-top:var(--co-spacing-md);transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out)}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{padding-top:0}.co-accordion--open .co-accordion__body{grid-template-rows:1fr}.co-accordion:not(.co-accordion--open) .co-accordion__body-inner{visibility:hidden;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-slow)}.co-accordion--open .co-accordion__body-inner{visibility:visible;transition:padding-top var(--co-motion-duration-slow) var(--co-motion-ease-out), visibility 0s linear 0s}.co-accordion__caret:focus-visible{outline:2px solid var(--co-color-primary-azul, #2563eb);outline-offset:2px}.co-accordion--disabled .co-accordion__header{opacity:0.5}.co-accordion--disabled .co-accordion__caret{cursor:not-allowed}"}},[257,"co-accordion",{open:[1540],heading:[1],subheading:[1],disabled:[4],hasSubheadingSlot:[32]}]);function r(){"undefined"!=typeof customElements&&["co-accordion","co-icon"].forEach((e=>{switch(e){case"co-accordion":customElements.get(o(e))||customElements.define(o(e),n);break;case"co-icon":customElements.get(o(e))||t()}}))}r();const d=n,s=r;export{d as CoAccordion,s as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as a,p as i,H as o,c as t,h as e}from"./index.js";import{d as n}from"./p-DNJAIVfI.js";import{d as s}from"./p-B4NCaKrR.js";const c=i(class extends o{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coDismiss=t(this,"coDismiss",7),this.open=!1,this.dismissible=!0,this.position="none",this.liveText="",this.animated=!1,this.handleDismiss=()=>{this.coDismiss.emit()}}onLabelChange(a){void 0!==this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout((()=>{this.liveTimer=void 0,this.liveText=null!=a?a:""}),600)}componentWillLoad(){var a;this.liveText=null!==(a=this.label)&&void 0!==a?a:""}componentDidLoad(){const a=()=>this.animated=!0;"function"==typeof requestAnimationFrame?this.rafId=requestAnimationFrame(a):a()}disconnectedCallback(){void 0!==this.liveTimer&&(clearTimeout(this.liveTimer),this.liveTimer=void 0),void 0!==this.rafId&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}render(){return e("div",{key:"c350ea38a12157a5cefe26f303ef7100938d55c9",class:{"co-action-bar":!0,"co-action-bar--open":this.open,"co-action-bar--animated":this.animated},part:"bar",role:"group","aria-label":this.ariaLabelText||this.label,"aria-hidden":this.open?null:"true"},e("span",{key:"9f2d3d5729fd150e5aa0c487067c7c8ad6cd8b59",class:"co-action-bar__live","aria-live":"polite"},this.liveText),e("span",{key:"d2617507df8f2b48a743c1bb20482d9cc2e227df",class:"co-action-bar__label",part:"label"},e("slot",{key:"aad415247f017bd8ea38e38f84a0cd768a2f6f38",name:"label"},this.label)),e("div",{key:"8999cd574e430246824effda0bfa531d62a3530a",class:"co-action-bar__actions",part:"actions"},e("slot",{key:"f06636fd076da38bc07982637f7def5d75df733e"})),!1!==this.dismissible&&e("co-icon-button",{key:"4227fa464073430c67190ac4afc6c6534b627934",class:"co-action-bar__dismiss",part:"dismiss",icon:"x",variant:"ghost",surface:"dark",size:"xs",label:"Dismiss",onClick:this.handleDismiss}))}static get watchers(){return{label:[{onLabelChange:0}]}}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);pointer-events:none}:host([position='bottom-center']){position:fixed;left:50%;transform:translateX(-50%);bottom:var(--co-action-bar-offset, 24px);z-index:var(--co-action-bar-z, 1000);max-width:calc(
|
|
1
|
+
import{t as a,p as i,H as o,c as t,h as e}from"./index.js";import{d as n}from"./p-DNJAIVfI.js";import{d as s}from"./p-B4NCaKrR.js";const c=i(class extends o{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.coDismiss=t(this,"coDismiss",7),this.open=!1,this.dismissible=!0,this.position="none",this.liveText="",this.animated=!1,this.handleDismiss=()=>{this.coDismiss.emit()}}onLabelChange(a){void 0!==this.liveTimer&&clearTimeout(this.liveTimer),this.liveTimer=setTimeout((()=>{this.liveTimer=void 0,this.liveText=null!=a?a:""}),600)}componentWillLoad(){var a;this.liveText=null!==(a=this.label)&&void 0!==a?a:""}componentDidLoad(){const a=()=>this.animated=!0;"function"==typeof requestAnimationFrame?this.rafId=requestAnimationFrame(a):a()}disconnectedCallback(){void 0!==this.liveTimer&&(clearTimeout(this.liveTimer),this.liveTimer=void 0),void 0!==this.rafId&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(this.rafId),this.rafId=void 0)}render(){return e("div",{key:"c350ea38a12157a5cefe26f303ef7100938d55c9",class:{"co-action-bar":!0,"co-action-bar--open":this.open,"co-action-bar--animated":this.animated},part:"bar",role:"group","aria-label":this.ariaLabelText||this.label,"aria-hidden":this.open?null:"true"},e("span",{key:"9f2d3d5729fd150e5aa0c487067c7c8ad6cd8b59",class:"co-action-bar__live","aria-live":"polite"},this.liveText),e("span",{key:"d2617507df8f2b48a743c1bb20482d9cc2e227df",class:"co-action-bar__label",part:"label"},e("slot",{key:"aad415247f017bd8ea38e38f84a0cd768a2f6f38",name:"label"},this.label)),e("div",{key:"8999cd574e430246824effda0bfa531d62a3530a",class:"co-action-bar__actions",part:"actions"},e("slot",{key:"f06636fd076da38bc07982637f7def5d75df733e"})),!1!==this.dismissible&&e("co-icon-button",{key:"4227fa464073430c67190ac4afc6c6534b627934",class:"co-action-bar__dismiss",part:"dismiss",icon:"x",variant:"ghost",surface:"dark",size:"xs",label:"Dismiss",onClick:this.handleDismiss}))}static get watchers(){return{label:[{onLabelChange:0}]}}static get style(){return":host{display:inline-flex;font-family:var(--co-font-family-primary);pointer-events:none}:host([position='bottom-center']){position:fixed;left:50%;transform:translateX(-50%);bottom:var(--co-action-bar-offset, 24px);z-index:var(--co-action-bar-z, 1000);max-width:calc(100% - 2 * var(--co-action-bar-inline-margin, 24px))}.co-action-bar{position:relative;display:flex;align-items:center;box-sizing:border-box;max-width:100%;gap:var(--co-spacing-sm2);padding:var(--co-spacing-sm2) var(--co-spacing-md) var(--co-spacing-sm2) var(--co-spacing-lg);border-radius:var(--co-border-radius-lg);background:var(--co-semantic-surface-primary);color:var(--co-semantic-text-inverse);box-shadow:var(--co-shadow-lg);opacity:0;transform:translateY(8px);pointer-events:none;visibility:hidden}.co-action-bar--open{opacity:1;transform:translateY(0);pointer-events:auto;visibility:visible}.co-action-bar--animated{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s linear var(--co-motion-duration-base)}.co-action-bar--animated.co-action-bar--open{transition:opacity var(--co-motion-duration-base) var(--co-motion-ease-out), transform var(--co-motion-duration-base) var(--co-motion-ease-out), visibility 0s}.co-action-bar__label{font-size:var(--co-font-size-14);font-weight:500;letter-spacing:var(--co-font-letter-spacing-body);line-height:1;white-space:nowrap;flex-shrink:0;padding-right:var(--co-spacing-xs)}.co-action-bar__actions{display:flex;align-items:center;gap:var(--co-spacing-xs);min-width:0}::slotted(hr){width:1px;height:24px;flex-shrink:0;align-self:center;margin:0 var(--co-spacing-xs);border:none;padding:0;background:color-mix(in srgb, var(--co-color-base-blanco, #fff) 28%, transparent)}.co-action-bar__dismiss{flex-shrink:0}.co-action-bar__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap}"}},[257,"co-action-bar",{open:[516],label:[1],dismissible:[4],position:[513],ariaLabelText:[1,"aria-label-text"],liveText:[32],animated:[32]},void 0,{label:[{onLabelChange:0}]}]);function r(){"undefined"!=typeof customElements&&["co-action-bar","co-icon","co-icon-button"].forEach((i=>{switch(i){case"co-action-bar":customElements.get(a(i))||customElements.define(a(i),c);break;case"co-icon":customElements.get(a(i))||n();break;case"co-icon-button":customElements.get(a(i))||s()}}))}r();const l=c,d=r;export{l as CoActionBar,d as defineCustomElement}
|