@globalpayments/vega 2.24.0 → 2.24.2
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/dist/cjs/{app-globals-f3d3333f.js → app-globals-7e893726.js} +1 -1
- package/dist/cjs/{child-nodes-event-prevent-slimmer-8daa650c.js → child-nodes-event-prevent-slimmer-176d59ee.js} +1 -1
- package/dist/cjs/{event-emit-slimmer-af463dad.js → event-emit-slimmer-4fb793e5.js} +1 -1
- package/dist/cjs/index-09acd3c9.js +4 -0
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{internal-vega-event-manager-3e0a8ac5.js → internal-vega-event-manager-b80fede0.js} +2 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{required-field-rule-814cad99.js → required-field-rule-8655758f.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +14 -4
- package/dist/cjs/vega-app-footer.cjs.entry.js +22 -0
- package/dist/cjs/vega-app-header-button.cjs.entry.js +22 -4
- package/dist/cjs/vega-backdrop.cjs.entry.js +4 -0
- package/dist/cjs/vega-banner.cjs.entry.js +17 -3
- package/dist/cjs/vega-bar-chart.cjs.entry.js +2 -0
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +8 -4
- package/dist/cjs/vega-button-circle.cjs.entry.js +18 -4
- package/dist/cjs/vega-button-group_2.cjs.entry.js +12 -4
- package/dist/cjs/vega-button-link.cjs.entry.js +21 -4
- package/dist/cjs/vega-button.cjs.entry.js +23 -4
- package/dist/cjs/vega-calendar_3.cjs.entry.js +11 -5
- package/dist/cjs/vega-card.cjs.entry.js +2 -0
- package/dist/cjs/vega-carousel.cjs.entry.js +18 -3
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +43 -7
- package/dist/cjs/vega-chip.cjs.entry.js +24 -4
- package/dist/cjs/vega-color-picker.cjs.entry.js +24 -5
- package/dist/cjs/vega-combo-box.cjs.entry.js +37 -6
- package/dist/cjs/vega-counter-badge.cjs.entry.js +8 -0
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +38 -8
- package/dist/cjs/vega-dialog_2.cjs.entry.js +34 -5
- package/dist/cjs/vega-divider.cjs.entry.js +6 -0
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +86 -10
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-event-id-4a73cd1a.js → vega-event-id-8aa22611.js} +6 -0
- package/dist/cjs/vega-field-error.cjs.entry.js +2 -0
- package/dist/cjs/vega-field-label.cjs.entry.js +11 -4
- package/dist/cjs/vega-file-uploader.cjs.entry.js +599 -0
- package/dist/cjs/vega-flex.cjs.entry.js +5 -0
- package/dist/cjs/vega-font.cjs.entry.js +8 -0
- package/dist/cjs/vega-form.cjs.entry.js +14 -4
- package/dist/cjs/vega-grid.cjs.entry.js +4 -0
- package/dist/cjs/vega-icon.cjs.entry.js +2 -0
- package/dist/cjs/vega-image-uploader.cjs.entry.js +35 -5
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +27 -5
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +28 -6
- package/dist/cjs/vega-input-range.cjs.entry.js +32 -4
- package/dist/cjs/vega-input-select.cjs.entry.js +40 -8
- package/dist/cjs/vega-input.cjs.entry.js +48 -4
- package/dist/cjs/vega-item-toggle.cjs.entry.js +10 -3
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +24 -8
- package/dist/cjs/vega-line-chart.cjs.entry.js +2 -0
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +14 -0
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +15 -1
- package/dist/cjs/vega-pagination.cjs.entry.js +17 -4
- package/dist/cjs/vega-pie-chart.cjs.entry.js +2 -0
- package/dist/cjs/vega-popover_2.cjs.entry.js +17 -3
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +23 -3
- package/dist/cjs/vega-radio_2.cjs.entry.js +34 -7
- package/dist/cjs/vega-section-title.cjs.entry.js +4 -0
- package/dist/cjs/vega-segment-control.cjs.entry.js +11 -3
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +30 -8
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +27 -9
- package/dist/cjs/vega-signature-capture.cjs.entry.js +31 -5
- package/dist/cjs/{vega-skeleton-loader-controller-82a44e64.js → vega-skeleton-loader-controller-4918bf55.js} +1 -1
- package/dist/cjs/vega-skeleton.cjs.entry.js +4 -0
- package/dist/cjs/vega-stepper.cjs.entry.js +24 -5
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +18 -6
- package/dist/cjs/vega-table_8.cjs.entry.js +68 -6
- package/dist/cjs/vega-text.cjs.entry.js +2 -0
- package/dist/cjs/vega-textarea.cjs.entry.js +34 -6
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +26 -6
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +11 -4
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +8 -0
- package/dist/cjs/vega.cjs.js +5 -5
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-accordion/vega-accordion.js +53 -10
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +69 -11
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.js +71 -11
- package/dist/collection/components/vega-backdrop/vega-backdrop.js +23 -4
- package/dist/collection/components/vega-banner/vega-banner.js +59 -9
- package/dist/collection/components/vega-box/vega-box.js +100 -25
- package/dist/collection/components/vega-breadcrumb/vega-breadcrumb.js +22 -3
- package/dist/collection/components/vega-button/vega-button.js +69 -11
- package/dist/collection/components/vega-button-circle/vega-button-circle.js +64 -11
- package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.js +29 -6
- package/dist/collection/components/vega-button-group/vega-button-group.js +28 -4
- package/dist/collection/components/vega-button-link/vega-button-link.js +62 -9
- package/dist/collection/components/vega-calendar/vega-calendar-event/vega-calendar-event.js +7 -1
- package/dist/collection/components/vega-calendar/vega-calendar-event-slot/vega-calendar-event-slot.js +7 -1
- package/dist/collection/components/vega-calendar/vega-calendar.js +58 -10
- package/dist/collection/components/vega-card/vega-card.js +21 -4
- package/dist/collection/components/vega-carousel/vega-carousel.js +55 -7
- package/dist/collection/components/vega-chart/vega-bar-chart/vega-bar-chart.js +9 -1
- package/dist/collection/components/vega-chart/vega-line-chart/vega-line-chart.js +13 -2
- package/dist/collection/components/vega-chart/vega-pie-chart/vega-pie-chart.js +13 -2
- package/dist/collection/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.js +66 -11
- package/dist/collection/components/vega-checkbox/vega-checkbox.js +56 -9
- package/dist/collection/components/vega-chip/vega-chip.js +81 -13
- package/dist/collection/components/vega-color-picker/vega-color-picker.js +66 -11
- package/dist/collection/components/vega-combo-box/vega-combo-box.js +116 -19
- package/dist/collection/components/vega-counter-badge/vega-counter-badge.js +27 -4
- package/dist/collection/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.js +3 -0
- package/dist/collection/components/vega-date-picker/vega-date-picker.js +112 -22
- package/dist/collection/components/vega-dialog/vega-dialog.js +45 -9
- package/dist/collection/components/vega-divider/vega-divider.js +21 -3
- package/dist/collection/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.js +3 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-group/vega-dropdown-group.js +13 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.js +4 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +5 -0
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.js +60 -7
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +198 -33
- package/dist/collection/components/vega-field-error/vega-field-error.js +9 -1
- package/dist/collection/components/vega-field-label/vega-field-label.js +26 -4
- package/dist/collection/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-value-controller.js +49 -0
- package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.js +162 -0
- package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.js +114 -0
- package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-status-renderer.js +26 -0
- package/dist/collection/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.js +42 -0
- package/dist/collection/components/vega-file-uploader/vega-file-uploader.css +154 -0
- package/dist/collection/components/vega-file-uploader/vega-file-uploader.js +571 -0
- package/dist/collection/components/vega-flex/vega-flex.js +38 -6
- package/dist/collection/components/vega-font/vega-font.js +31 -5
- package/dist/collection/components/vega-form/vega-form.js +54 -5
- package/dist/collection/components/vega-grid/vega-grid.js +19 -3
- package/dist/collection/components/vega-hint/vega-hint.js +1 -0
- package/dist/collection/components/vega-icon/vega-icon.js +17 -3
- package/dist/collection/components/vega-image-uploader/vega-image-uploader.js +126 -21
- package/dist/collection/components/vega-input/vega-input.js +167 -27
- package/dist/collection/components/vega-input-credit-card/vega-input-credit-card.js +90 -14
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +89 -16
- package/dist/collection/components/vega-input-range/vega-input-range.js +98 -16
- package/dist/collection/components/vega-input-select/vega-input-select.js +128 -24
- package/dist/collection/components/vega-item-toggle/vega-item-toggle.js +28 -3
- package/dist/collection/components/vega-loader-wrapper/vega-loader-wrapper.js +3 -0
- package/dist/collection/components/vega-loading-indicator/vega-loading-indicator.js +45 -7
- package/dist/collection/components/vega-modal/vega-modal.js +88 -14
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +53 -11
- package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.js +24 -7
- package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.js +33 -10
- package/dist/collection/components/vega-nav/vega-left-nav-section/vega-left-nav-section.js +15 -3
- package/dist/collection/components/vega-nav/vega-nav-card/vega-nav-card.js +11 -2
- package/dist/collection/components/vega-page-notification/vega-page-notification-list/vega-page-notification-list.js +3 -0
- package/dist/collection/components/vega-page-notification/vega-page-notification.js +45 -7
- package/dist/collection/components/vega-pagination/vega-pagination.js +50 -7
- package/dist/collection/components/vega-popover/vega-popover-content-box/vega-popover-content-box.js +9 -1
- package/dist/collection/components/vega-popover/vega-popover.js +61 -10
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.js +69 -10
- package/dist/collection/components/vega-radio/vega-radio-group/vega-radio-group.js +70 -13
- package/dist/collection/components/vega-radio/vega-radio.js +53 -8
- package/dist/collection/components/vega-section-title/vega-section-title.js +23 -4
- package/dist/collection/components/vega-segment-control/vega-segment-control.js +38 -6
- package/dist/collection/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.js +54 -11
- package/dist/collection/components/vega-selection-chip/vega-selection-chip.js +59 -11
- package/dist/collection/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.js +60 -12
- package/dist/collection/components/vega-selection-tile/vega-selection-tile.js +46 -10
- package/dist/collection/components/vega-signature-capture/vega-signature-capture.js +89 -15
- package/dist/collection/components/vega-skeleton/vega-skeleton.js +23 -4
- package/dist/collection/components/vega-slot-container/vega-slot-container.js +3 -0
- package/dist/collection/components/vega-stepper/vega-stepper.js +70 -12
- package/dist/collection/components/vega-tab-group/vega-tab-group-panel/vega-tab-group-panel.js +9 -1
- package/dist/collection/components/vega-tab-group/vega-tab-group.js +46 -9
- package/dist/collection/components/vega-table/vega-table-body/vega-table-body.js +3 -0
- package/dist/collection/components/vega-table/vega-table-cell/vega-table-cell.js +19 -4
- package/dist/collection/components/vega-table/vega-table-expand-row/vega-table-expand-row.js +7 -1
- package/dist/collection/components/vega-table/vega-table-head/vega-table-head.js +3 -0
- package/dist/collection/components/vega-table/vega-table-head-cell/vega-table-head-cell.js +30 -6
- package/dist/collection/components/vega-table/vega-table-head-row/vega-table-head-row.js +11 -2
- package/dist/collection/components/vega-table/vega-table-row/vega-table-row.js +21 -3
- package/dist/collection/components/vega-table/vega-table.js +237 -28
- package/dist/collection/components/vega-text/vega-text.js +13 -2
- package/dist/collection/components/vega-textarea/vega-textarea.js +98 -16
- package/dist/collection/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.js +3 -0
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +84 -16
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.js +35 -7
- package/dist/collection/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.js +7 -1
- package/dist/collection/components/vega-tooltip/vega-tooltip.js +50 -9
- package/dist/collection/components/vega-virtual-scroll/vega-virtual-scroll.js +57 -16
- package/dist/collection/constants/ui.js +3 -0
- package/dist/collection/global/icons/arrow-rotate-right.js +3 -0
- package/dist/collection/global/icons/arrow-up-from-line.js +3 -0
- package/dist/collection/global/icons/circle-check-regular.js +3 -0
- package/dist/collection/global/icons/circle-xmark.js +3 -0
- package/dist/collection/global/icons/trash-can.js +3 -0
- package/dist/collection/helpers/event-manager/event-id/component-event-id-map.js +2 -1
- package/dist/collection/helpers/event-manager/event-id/vega-event-id.js +3 -0
- package/dist/collection/helpers/validator/rules/file-uploader-required-rule.js +16 -0
- package/dist/collection/helpers/validator/rules/required-field-rule.js +1 -1
- package/dist/collection/helpers/validator/test/rules/file-uploader-required-rule.test.js +7 -0
- package/dist/collection/helpers/vega-telemetry-helper/test/vega-env-manager.test.js +1 -1
- package/dist/collection/helpers/vega-telemetry-helper/vega-env-manager.js +2 -2
- package/dist/collection/value-model-adapters/angular-ng-model-accessor-adapter.js +1 -0
- package/dist/collection/value-model-adapters/vue-component-v-model-adaptor.js +1 -0
- package/dist/esm/{app-globals-b39cddb5.js → app-globals-1d66ee80.js} +1 -1
- package/dist/esm/{child-nodes-event-prevent-slimmer-eaa30e33.js → child-nodes-event-prevent-slimmer-d2435342.js} +1 -1
- package/dist/esm/{event-emit-slimmer-e952b0b0.js → event-emit-slimmer-79be1c60.js} +1 -1
- package/dist/esm/index-187f71d1.js +4 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/{internal-vega-event-manager-c16aea68.js → internal-vega-event-manager-c17ae641.js} +2 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{required-field-rule-6c04a5e9.js → required-field-rule-f438a73f.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +14 -4
- package/dist/esm/vega-app-footer.entry.js +22 -0
- package/dist/esm/vega-app-header-button.entry.js +22 -4
- package/dist/esm/vega-backdrop.entry.js +4 -0
- package/dist/esm/vega-banner.entry.js +17 -3
- package/dist/esm/vega-bar-chart.entry.js +2 -0
- package/dist/esm/vega-breadcrumb.entry.js +8 -4
- package/dist/esm/vega-button-circle.entry.js +18 -4
- package/dist/esm/vega-button-group_2.entry.js +12 -4
- package/dist/esm/vega-button-link.entry.js +21 -4
- package/dist/esm/vega-button.entry.js +23 -4
- package/dist/esm/vega-calendar_3.entry.js +11 -5
- package/dist/esm/vega-card.entry.js +2 -0
- package/dist/esm/vega-carousel.entry.js +18 -3
- package/dist/esm/vega-checkbox_2.entry.js +43 -7
- package/dist/esm/vega-chip.entry.js +24 -4
- package/dist/esm/vega-color-picker.entry.js +24 -5
- package/dist/esm/vega-combo-box.entry.js +37 -6
- package/dist/esm/vega-counter-badge.entry.js +8 -0
- package/dist/esm/vega-date-picker_2.entry.js +38 -8
- package/dist/esm/vega-dialog_2.entry.js +34 -5
- package/dist/esm/vega-divider.entry.js +6 -0
- package/dist/esm/vega-dropdown_5.entry.js +86 -10
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-event-id-6ac7ca51.js → vega-event-id-728eb2ac.js} +4 -1
- package/dist/esm/vega-field-error.entry.js +2 -0
- package/dist/esm/vega-field-label.entry.js +11 -4
- package/dist/esm/vega-file-uploader.entry.js +595 -0
- package/dist/esm/vega-flex.entry.js +5 -0
- package/dist/esm/vega-font.entry.js +8 -0
- package/dist/esm/vega-form.entry.js +14 -4
- package/dist/esm/vega-grid.entry.js +4 -0
- package/dist/esm/vega-icon.entry.js +2 -0
- package/dist/esm/vega-image-uploader.entry.js +35 -5
- package/dist/esm/vega-input-credit-card.entry.js +27 -5
- package/dist/esm/vega-input-phone-number.entry.js +28 -6
- package/dist/esm/vega-input-range.entry.js +32 -4
- package/dist/esm/vega-input-select.entry.js +40 -8
- package/dist/esm/vega-input.entry.js +48 -4
- package/dist/esm/vega-item-toggle.entry.js +10 -3
- package/dist/esm/vega-left-nav_5.entry.js +24 -8
- package/dist/esm/vega-line-chart.entry.js +2 -0
- package/dist/esm/vega-loader-wrapper_2.entry.js +14 -0
- package/dist/esm/vega-page-notification_2.entry.js +15 -1
- package/dist/esm/vega-pagination.entry.js +17 -4
- package/dist/esm/vega-pie-chart.entry.js +2 -0
- package/dist/esm/vega-popover_2.entry.js +17 -3
- package/dist/esm/vega-progress-tracker.entry.js +23 -3
- package/dist/esm/vega-radio_2.entry.js +34 -7
- package/dist/esm/vega-section-title.entry.js +4 -0
- package/dist/esm/vega-segment-control.entry.js +11 -3
- package/dist/esm/vega-selection-chip_2.entry.js +30 -8
- package/dist/esm/vega-selection-tile_2.entry.js +27 -9
- package/dist/esm/vega-signature-capture.entry.js +31 -5
- package/dist/esm/{vega-skeleton-loader-controller-b9a8df78.js → vega-skeleton-loader-controller-987192a1.js} +1 -1
- package/dist/esm/vega-skeleton.entry.js +4 -0
- package/dist/esm/vega-stepper.entry.js +24 -5
- package/dist/esm/vega-tab-group_2.entry.js +18 -6
- package/dist/esm/vega-table_8.entry.js +68 -6
- package/dist/esm/vega-text.entry.js +2 -0
- package/dist/esm/vega-textarea.entry.js +34 -6
- package/dist/esm/vega-time-picker_2.entry.js +26 -6
- package/dist/esm/vega-toggle-switch.entry.js +11 -4
- package/dist/esm/vega-tooltip_2.entry.js +8 -0
- package/dist/esm/vega.js +5 -5
- package/dist/types/components/vega-accordion/vega-accordion.d.ts +22 -0
- package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +25 -0
- package/dist/types/components/vega-app-header-button/vega-app-header-button.d.ts +27 -0
- package/dist/types/components/vega-backdrop/vega-backdrop.d.ts +11 -0
- package/dist/types/components/vega-banner/vega-banner.d.ts +23 -0
- package/dist/types/components/vega-box/vega-box.d.ts +52 -1
- package/dist/types/components/vega-breadcrumb/vega-breadcrumb.d.ts +10 -0
- package/dist/types/components/vega-button/vega-button.d.ts +26 -0
- package/dist/types/components/vega-button-circle/vega-button-circle.d.ts +26 -0
- package/dist/types/components/vega-button-group/vega-button-group-item/vega-button-group-item.d.ts +15 -0
- package/dist/types/components/vega-button-group/vega-button-group.d.ts +12 -0
- package/dist/types/components/vega-button-link/vega-button-link.d.ts +24 -0
- package/dist/types/components/vega-calendar/vega-calendar-event/vega-calendar-event.d.ts +5 -0
- package/dist/types/components/vega-calendar/vega-calendar-event-slot/vega-calendar-event-slot.d.ts +5 -0
- package/dist/types/components/vega-calendar/vega-calendar.d.ts +25 -0
- package/dist/types/components/vega-card/vega-card.d.ts +11 -0
- package/dist/types/components/vega-carousel/vega-carousel.d.ts +21 -0
- package/dist/types/components/vega-chart/vega-bar-chart/vega-bar-chart.d.ts +5 -0
- package/dist/types/components/vega-chart/vega-line-chart/vega-line-chart.d.ts +7 -0
- package/dist/types/components/vega-chart/vega-pie-chart/vega-pie-chart.d.ts +7 -0
- package/dist/types/components/vega-checkbox/vega-checkbox-group/vega-checkbox-group.d.ts +24 -0
- package/dist/types/components/vega-checkbox/vega-checkbox.d.ts +20 -0
- package/dist/types/components/vega-chip/vega-chip.d.ts +31 -0
- package/dist/types/components/vega-color-picker/vega-color-picker.d.ts +24 -0
- package/dist/types/components/vega-combo-box/vega-combo-box.d.ts +42 -0
- package/dist/types/components/vega-counter-badge/vega-counter-badge.d.ts +11 -0
- package/dist/types/components/vega-date-picker/vega-date-picker-calendar/vega-date-picker-calendar.d.ts +3 -0
- package/dist/types/components/vega-date-picker/vega-date-picker.d.ts +40 -0
- package/dist/types/components/vega-dialog/vega-dialog.d.ts +21 -0
- package/dist/types/components/vega-divider/vega-divider.d.ts +9 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.d.ts +3 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-group/vega-dropdown-group.d.ts +7 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/slimmers/renderers/vega-dropdown-item-renderer.d.ts +1 -0
- package/dist/types/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.d.ts +24 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +73 -0
- package/dist/types/components/vega-field-error/vega-field-error.d.ts +5 -0
- package/dist/types/components/vega-field-label/vega-field-label.d.ts +11 -0
- package/dist/types/components/vega-file-uploader/slimmers/controllers/vega-file-uploader-value-controller.d.ts +21 -0
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-container-renderer.d.ts +76 -0
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-list-renderer.d.ts +38 -0
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-file-status-renderer.d.ts +6 -0
- package/dist/types/components/vega-file-uploader/slimmers/renderers/vega-file-uploader-renderer.d.ts +18 -0
- package/dist/types/components/vega-file-uploader/vega-file-uploader.d.ts +138 -0
- package/dist/types/components/vega-flex/vega-flex.d.ts +18 -0
- package/dist/types/components/vega-font/vega-font.d.ts +13 -0
- package/dist/types/components/vega-form/vega-form.d.ts +21 -0
- package/dist/types/components/vega-grid/vega-grid.d.ts +9 -0
- package/dist/types/components/vega-hint/vega-hint.d.ts +1 -0
- package/dist/types/components/vega-icon/vega-icon.d.ts +9 -0
- package/dist/types/components/vega-image-uploader/vega-image-uploader.d.ts +48 -0
- package/dist/types/components/vega-input/vega-input.d.ts +61 -0
- package/dist/types/components/vega-input-credit-card/vega-input-credit-card.d.ts +34 -0
- package/dist/types/components/vega-input-phone-number/vega-input-phone-number.d.ts +33 -0
- package/dist/types/components/vega-input-range/vega-input-range.d.ts +36 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +47 -0
- package/dist/types/components/vega-item-toggle/vega-item-toggle.d.ts +12 -0
- package/dist/types/components/vega-loader-wrapper/vega-loader-wrapper.d.ts +3 -0
- package/dist/types/components/vega-loading-indicator/vega-loading-indicator.d.ts +17 -0
- package/dist/types/components/vega-modal/vega-modal.d.ts +33 -0
- package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +21 -1
- package/dist/types/components/vega-nav/vega-left-nav-group/vega-left-nav-group.d.ts +13 -3
- package/dist/types/components/vega-nav/vega-left-nav-link/vega-left-nav-link.d.ts +19 -4
- package/dist/types/components/vega-nav/vega-left-nav-section/vega-left-nav-section.d.ts +9 -1
- package/dist/types/components/vega-nav/vega-nav-card/vega-nav-card.d.ts +7 -0
- package/dist/types/components/vega-page-notification/vega-page-notification-list/vega-page-notification-list.d.ts +3 -0
- package/dist/types/components/vega-page-notification/vega-page-notification.d.ts +17 -0
- package/dist/types/components/vega-pagination/vega-pagination.d.ts +19 -0
- package/dist/types/components/vega-popover/vega-popover-content-box/vega-popover-content-box.d.ts +5 -0
- package/dist/types/components/vega-popover/vega-popover.d.ts +25 -0
- package/dist/types/components/vega-progress-tracker/vega-progress-tracker.d.ts +26 -0
- package/dist/types/components/vega-radio/vega-radio-group/vega-radio-group.d.ts +26 -0
- package/dist/types/components/vega-radio/vega-radio.d.ts +22 -0
- package/dist/types/components/vega-section-title/vega-section-title.d.ts +11 -0
- package/dist/types/components/vega-segment-control/vega-segment-control.d.ts +16 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip-group/vega-selection-chip-group.d.ts +22 -0
- package/dist/types/components/vega-selection-chip/vega-selection-chip.d.ts +23 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile-group/vega-selection-tile-group.d.ts +24 -0
- package/dist/types/components/vega-selection-tile/vega-selection-tile.d.ts +20 -0
- package/dist/types/components/vega-signature-capture/vega-signature-capture.d.ts +32 -0
- package/dist/types/components/vega-skeleton/vega-skeleton.d.ts +11 -0
- package/dist/types/components/vega-slot-container/vega-slot-container.d.ts +3 -0
- package/dist/types/components/vega-stepper/vega-stepper.d.ts +26 -0
- package/dist/types/components/vega-tab-group/vega-tab-group-panel/vega-tab-group-panel.d.ts +5 -0
- package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +18 -0
- package/dist/types/components/vega-table/vega-table-body/vega-table-body.d.ts +3 -0
- package/dist/types/components/vega-table/vega-table-cell/vega-table-cell.d.ts +11 -0
- package/dist/types/components/vega-table/vega-table-expand-row/vega-table-expand-row.d.ts +5 -0
- package/dist/types/components/vega-table/vega-table-head/vega-table-head.d.ts +3 -0
- package/dist/types/components/vega-table/vega-table-head-cell/vega-table-head-cell.d.ts +16 -0
- package/dist/types/components/vega-table/vega-table-head-row/vega-table-head-row.d.ts +7 -0
- package/dist/types/components/vega-table/vega-table-row/vega-table-row.d.ts +11 -0
- package/dist/types/components/vega-table/vega-table.d.ts +88 -0
- package/dist/types/components/vega-text/vega-text.d.ts +7 -0
- package/dist/types/components/vega-textarea/vega-textarea.d.ts +35 -0
- package/dist/types/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.d.ts +3 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +32 -0
- package/dist/types/components/vega-toggle-switch/vega-toggle-switch.d.ts +15 -1
- package/dist/types/components/vega-tooltip/vega-tooltip-content-box/vega-tooltip-content-box.d.ts +5 -0
- package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +23 -0
- package/dist/types/components/vega-virtual-scroll/vega-virtual-scroll.d.ts +23 -4
- package/dist/types/components.d.ts +1566 -29
- package/dist/types/constants/ui.d.ts +1 -1
- package/dist/types/global/icons/arrow-rotate-right.d.ts +3 -0
- package/dist/types/global/icons/arrow-up-from-line.d.ts +3 -0
- package/dist/types/global/icons/circle-check-regular.d.ts +3 -0
- package/dist/types/global/icons/circle-xmark.d.ts +3 -0
- package/dist/types/global/icons/trash-can.d.ts +3 -0
- package/dist/types/helpers/event-manager/event-id/vega-event-id.d.ts +3 -0
- package/dist/types/helpers/validator/rules/file-uploader-required-rule.d.ts +13 -0
- package/dist/types/helpers/validator/rules/required-field-rule.d.ts +4 -5
- package/dist/types/helpers/validator/test/rules/file-uploader-required-rule.test.d.ts +1 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/{p-c1851b1a.js → p-025ccc18.js} +1 -1
- package/dist/vega/{p-c7aa3a94.entry.js → p-09862473.entry.js} +1 -1
- package/dist/vega/{p-095a33d5.entry.js → p-0e12b007.entry.js} +1 -1
- package/dist/vega/{p-b2333627.js → p-11cbdade.js} +1 -1
- package/dist/vega/{p-6d47b1e7.entry.js → p-133cbd05.entry.js} +1 -1
- package/dist/vega/{p-b441e62d.entry.js → p-17aa1539.entry.js} +1 -1
- package/dist/vega/{p-45de40d9.entry.js → p-18e84cc3.entry.js} +1 -1
- package/dist/vega/{p-e5c61e46.entry.js → p-25fa235b.entry.js} +1 -1
- package/dist/vega/{p-40a61199.entry.js → p-26a7a6ff.entry.js} +1 -1
- package/dist/vega/{p-03b95e44.entry.js → p-2757e8c3.entry.js} +1 -1
- package/dist/vega/{p-aac4ab77.entry.js → p-2b0642dc.entry.js} +1 -1
- package/dist/vega/{p-bf0bbc4b.js → p-4826059c.js} +1 -1
- package/dist/vega/{p-992599e7.entry.js → p-48b318c4.entry.js} +1 -1
- package/dist/vega/{p-5c5e7e9f.js → p-494bd912.js} +1 -1
- package/dist/vega/{p-86e52877.entry.js → p-5ceda06c.entry.js} +1 -1
- package/dist/vega/{p-14c2a35c.entry.js → p-5f2b7ccb.entry.js} +1 -1
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/{p-49df5129.entry.js → p-62ad9511.entry.js} +1 -1
- package/dist/vega/{p-260f0697.entry.js → p-684579b7.entry.js} +1 -1
- package/dist/vega/{p-89e3a626.entry.js → p-76f6f704.entry.js} +1 -1
- package/dist/vega/{p-264380d1.entry.js → p-781dfe17.entry.js} +1 -1
- package/dist/vega/{p-c4f321ed.entry.js → p-7a97295d.entry.js} +1 -1
- package/dist/vega/{p-a530a188.entry.js → p-7b2e4c94.entry.js} +1 -1
- package/dist/vega/{p-7ef10099.entry.js → p-805f70d5.entry.js} +1 -1
- package/dist/vega/{p-b87336e5.entry.js → p-8200752c.entry.js} +1 -1
- package/dist/vega/{p-f5c5dd0a.entry.js → p-83a78d32.entry.js} +1 -1
- package/dist/vega/{p-7fc7249c.entry.js → p-8c9a009c.entry.js} +1 -1
- package/dist/vega/{p-89059ba9.entry.js → p-96f5f322.entry.js} +1 -1
- package/dist/vega/{p-ec22b952.entry.js → p-981339b3.entry.js} +1 -1
- package/dist/vega/{p-b57f033d.entry.js → p-9895c8b9.entry.js} +1 -1
- package/dist/vega/{p-3e8ec299.entry.js → p-9ddae0f5.entry.js} +1 -1
- package/dist/vega/{p-25a86be4.entry.js → p-a163bbf2.entry.js} +1 -1
- package/dist/vega/{p-d5d21115.entry.js → p-a36db525.entry.js} +1 -1
- package/dist/vega/{p-89aa1286.entry.js → p-aa39873f.entry.js} +1 -1
- package/dist/vega/{p-3738124f.entry.js → p-ae89862d.entry.js} +1 -1
- package/dist/vega/{p-914767bf.entry.js → p-b01349b0.entry.js} +1 -1
- package/dist/vega/{p-0e1f2227.entry.js → p-b2bea27b.entry.js} +1 -1
- package/dist/vega/p-b36887f9.js +1 -0
- package/dist/vega/{p-f2dbb363.entry.js → p-b52802b5.entry.js} +1 -1
- package/dist/vega/{p-fc6ee759.entry.js → p-b554d6d9.entry.js} +1 -1
- package/dist/vega/{p-3ff106bb.entry.js → p-b9f4d417.entry.js} +1 -1
- package/dist/vega/{p-f1926cf1.entry.js → p-bd770a17.entry.js} +1 -1
- package/dist/vega/p-bef39231.entry.js +1 -0
- package/dist/vega/p-d1093d69.entry.js +1 -0
- package/dist/vega/{p-90556c4d.entry.js → p-d81f7db0.entry.js} +1 -1
- package/dist/vega/p-d97770c0.js +1 -0
- package/dist/vega/{p-00c2d424.entry.js → p-da8c63dd.entry.js} +1 -1
- package/dist/vega/{p-dc0972bb.entry.js → p-dccbe7ee.entry.js} +1 -1
- package/dist/vega/{p-01c24f95.entry.js → p-f2314882.entry.js} +1 -1
- package/dist/vega/{p-5559c348.entry.js → p-fb0c4f80.entry.js} +1 -1
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +3 -2
- package/style/vega_min.css +1 -0
- package/dist/types/components/vega-app-footer/types.d.ts +0 -7
- package/dist/types/components/vega-app-header-button/types.d.ts +0 -27
- package/dist/types/components/vega-banner/types.d.ts +0 -11
- package/dist/types/components/vega-breadcrumb/types.d.ts +0 -11
- package/dist/types/components/vega-button/types.d.ts +0 -4
- package/dist/types/components/vega-button-circle/types.d.ts +0 -9
- package/dist/types/components/vega-button-group/types.d.ts +0 -21
- package/dist/types/components/vega-calendar/types.d.ts +0 -80
- package/dist/types/components/vega-chart/vega-bar-chart/types.d.ts +0 -4
- package/dist/types/components/vega-chip/types.d.ts +0 -4
- package/dist/types/components/vega-combo-box/types.d.ts +0 -9
- package/dist/types/components/vega-date-picker/types.d.ts +0 -10
- package/dist/types/components/vega-dialog/types.d.ts +0 -14
- package/dist/types/components/vega-dropdown/types.d.ts +0 -20
- package/dist/types/components/vega-dropdown/vega-dropdown-item/types.d.ts +0 -1
- package/dist/types/components/vega-field-error/types.d.ts +0 -4
- package/dist/types/components/vega-font/types.d.ts +0 -18
- package/dist/types/components/vega-form/types.d.ts +0 -9
- package/dist/types/components/vega-image-uploader/types.d.ts +0 -21
- package/dist/types/components/vega-input/types.d.ts +0 -12
- package/dist/types/components/vega-input-phone-number/types.d.ts +0 -13
- package/dist/types/components/vega-input-range/types.d.ts +0 -5
- package/dist/types/components/vega-input-select/types.d.ts +0 -35
- package/dist/types/components/vega-item-toggle/types.d.ts +0 -8
- package/dist/types/components/vega-loading-indicator/types.d.ts +0 -1
- package/dist/types/components/vega-modal/types.d.ts +0 -2
- package/dist/types/components/vega-page-notification/types.d.ts +0 -10
- package/dist/types/components/vega-pagination/types.d.ts +0 -1
- package/dist/types/components/vega-segment-control/types.d.ts +0 -8
- package/dist/types/components/vega-signature-capture/types.d.ts +0 -5
- package/dist/types/components/vega-skeleton/interface.d.ts +0 -5
- package/dist/types/components/vega-tab-group/types.d.ts +0 -12
- package/dist/types/components/vega-table/vega-table-expand-row/types.d.ts +0 -3
- package/dist/types/components/vega-table/vega-table-head/types.d.ts +0 -4
- package/dist/types/components/vega-table/vega-table-head-row/types.d.ts +0 -5
- package/dist/types/components/vega-table/vega-table-row/types.d.ts +0 -7
- package/dist/types/components/vega-text/types.d.ts +0 -3
- package/dist/types/components/vega-time-picker/types.d.ts +0 -21
- package/dist/types/components/vega-virtual-scroll/types.d.ts +0 -14
- package/dist/types/helpers/feature-control/feature-flag.d.ts +0 -52
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-formatter.d.ts +0 -5
- package/dist/types/helpers/formatter/state-formatter/state-formatter.d.ts +0 -3
- package/dist/types/helpers/formatter/string-formatter/string-format-strategy.d.ts +0 -12
- package/dist/types/helpers/icon/interface.d.ts +0 -10
- package/dist/types/helpers/immutable/immutable.d.ts +0 -3
- package/dist/types/helpers/loading-indicator/vega-loader.d.ts +0 -17
- package/dist/types/helpers/notify/vega-notify.d.ts +0 -13
- package/dist/types/helpers/queue/queue.d.ts +0 -4
- package/dist/types/helpers/skeleton-loader/interface.d.ts +0 -16
- package/dist/types/helpers/slimmers/field-error-ui-controller-strategies/field-error-ui-controller-strategy.d.ts +0 -6
- package/dist/types/helpers/slimmers/types.d.ts +0 -5
- package/dist/types/helpers/theme/theme.d.ts +0 -18
- package/dist/types/helpers/validator/form-validator.d.ts +0 -8
- package/dist/types/helpers/validator/rules/form-field-validation-rule.d.ts +0 -22
- package/dist/types/helpers/validator/rules/validation-rule.d.ts +0 -9
- package/dist/types/helpers/validator/validator.d.ts +0 -8
- package/dist/types/types/components.type.d.ts +0 -185
- package/dist/types/types/general.d.ts +0 -10
- package/dist/types/types/test-polyfill.d.ts +0 -8
- package/dist/types/types/vega-chart.d.ts +0 -149
- package/dist/vega/p-150bc141.entry.js +0 -1
- package/dist/vega/p-2a4455a5.js +0 -1
- package/dist/vega/p-4e593f9f.js +0 -1
- /package/dist/vega/{p-4c6f6317.js → p-961e1ecd.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as i,h as t,H as a,g as r}from"./p-1c298d5a.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-9b797118.js";import{C as s}from"./p-2d0d575f.js";import{C as c,b as h,i as l}from"./p-b8a63b73.js";import{O as d,d as p}from"./p-1b3a64f7.js";import{f as g}from"./p-ad4bd166.js";import{c as b,M as x,V as v,I as f}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-61f6167c.js";import{F as k}from"./p-e3bfd4a1.js";import{c as w}from"./p-b2333627.js";import{e as y}from"./p-2a4455a5.js";import{V as j}from"./p-eecfad57.js";import{R as C}from"./p-4c6f6317.js";import{C as I}from"./p-ed4a57a8.js";import{C as z}from"./p-dbc32bd3.js";import{C as R}from"./p-c1851b1a.js";import"./p-0bb29d98.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-883a939b.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-987fbbd0.js";import"./p-38d81bde.js";import"./p-ee68920f.js";import"./p-344ee7cb.js";import"./p-4e593f9f.js";import"./p-5f377954.js";import"./p-c3ef9d64.js";import"./p-f404aa83.js";class V{evaluate(e){return"boolean"==typeof e?{isValid:e,message:e?"":"This field is required"}:"string"==typeof e?{isValid:""!==e,message:""!==e?"":"This field is required"}:{isValid:!1,message:"This field is required"}}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"boolean"==typeof e||null===e}}var D=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class O extends v{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([b({writable:!0})],O.prototype,"showError",void 0),D([b()],O.prototype,"host",void 0),D([x("connectedCallback")],O.prototype,"connectedCallback",null),D([x("disconnectedCallback")],O.prototype,"disconnectedCallback",null);var E=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new O,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=w(G,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),s.notify(c,{host:this.host,detail:this.value}),s.notify(h,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:{"vega-checkbox-container":!0,error:this.showError},ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:{"vega-checkbox-icon":!0,"vega-checkbox-small":"small"===this.size},onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:{"vega-checkbox-label-container":!0,"vega-checkbox-label-small":"small"===this.size},ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(l,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(l,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};E([u()],G.prototype,"globalSlimmers",void 0),E([f()],G.prototype,"vegaCheckboxShowErrorController",void 0),E([f()],G.prototype,"formFieldController",void 0),E([f()],G.prototype,"changeEventEmitter",void 0),E([f()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon.vega-checkbox-small{width:16px;height:16px;min-width:16px;border-radius:2px}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}.vega-checkbox-container:hover{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}';var q=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new C:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new z(c,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new R([y],(()=>this.vegaFlexElement)),this.changeEventEmitter=w(F,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(l,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([u()],F.prototype,"globalSlimmers",void 0),q([f()],F.prototype,"formFieldController",void 0),q([f()],F.prototype,"checkboxValueChangeObserver",void 0),q([f()],F.prototype,"checkboxEventPrevent",void 0),q([f()],F.prototype,"changeEventEmitter",void 0),q([f()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([I()],F.prototype,"watchVegaFlexProp",null),F.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{G as vega_checkbox,F as vega_checkbox_group}
|
|
1
|
+
import{r as e,c as i,h as t,H as a,g as r}from"./p-1c298d5a.js";import{c as n}from"./p-86194314.js";import{s as o}from"./p-9b797118.js";import{C as s}from"./p-2d0d575f.js";import{C as c,b as h,i as l}from"./p-b8a63b73.js";import{O as d,d as p}from"./p-1b3a64f7.js";import{f as g}from"./p-ad4bd166.js";import{c as b,M as x,V as v,I as f}from"./p-6e1ab235.js";import{V as m,I as u}from"./p-61f6167c.js";import{F as k}from"./p-e3bfd4a1.js";import{c as w}from"./p-11cbdade.js";import{e as y}from"./p-b36887f9.js";import{V as j}from"./p-eecfad57.js";import{R as C}from"./p-961e1ecd.js";import{C as I}from"./p-ed4a57a8.js";import{C as z}from"./p-dbc32bd3.js";import{C as R}from"./p-025ccc18.js";import"./p-0bb29d98.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-883a939b.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-987fbbd0.js";import"./p-38d81bde.js";import"./p-ee68920f.js";import"./p-344ee7cb.js";import"./p-d97770c0.js";import"./p-5f377954.js";import"./p-c3ef9d64.js";import"./p-f404aa83.js";class V{evaluate(e){return"boolean"==typeof e?{isValid:e,message:e?"":"This field is required"}:"string"==typeof e?{isValid:""!==e,message:""!==e?"":"This field is required"}:{isValid:!1,message:"This field is required"}}canEvaluate(e,i){return i?this.isAcceptedInputType(e)&&!i.disabled&&i.visible:this.isAcceptedInputType(e)}shouldShowError(e){return!e.disabled&&e.visible&&(e.touched||e.modified)}isAcceptedInputType(e){return"string"==typeof e||"boolean"==typeof e||null===e}}var D=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};class O extends v{connectedCallback(){this.checkboxGroup=g(this.host,"vega-checkbox-group")||g(this.host,"vega-selection-tile-group"),this.fieldErrorObserver=new d(this.canAcceptFieldErrorObserver.bind(this),this.fieldErrorObserverListener.bind(this)),s.register(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}disconnectedCallback(){s.unregister(p.getSubject(this.checkboxGroup||this.host,j),this.fieldErrorObserver)}canAcceptFieldErrorObserver(){return!0}fieldErrorObserverListener(e){this.showError=e.showError}}D([b({writable:!0})],O.prototype,"showError",void 0),D([b()],O.prototype,"host",void 0),D([x("connectedCallback")],O.prototype,"connectedCallback",null),D([x("disconnectedCallback")],O.prototype,"disconnectedCallback",null);var E=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const G=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.vegaCheckboxShowErrorController=new O,this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new V:null}],defaultValue:e=>""!==e.identifier&&"",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>[this.inputRef]}),this.changeEventEmitter=w(G,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.groupDisabled=!1,this.showError=!1,this.identifier="",this.value=""!==this.identifier&&"",this.checked=!1,this.disabled=!1,this.size="default",this.required=!1,this.isValid=null,this.onCheckBoxChange=e=>{this.checked=e.currentTarget.checked,e.stopPropagation()},this.onSelectedIconClick=e=>{e.stopPropagation()}}watchCheckedChange(){this.initValue(),this.changeEventEmitter.emit(this.value),s.notify(c,{host:this.host,detail:this.value}),s.notify(h,{host:this.host,detail:this.value})}disconnectedCallback(){this.unRegisterGroupDisabledObserver()}componentWillLoad(){this.initValue(),this.initAndRegisterGroupDisabledObserver()}componentDidRender(){""===this.host.innerHTML.trim()&&this.labelElement.classList.add("vega-hidden")}async setValue(e){this.checked=this.identifier?e===this.identifier:!0===e}render(){return o(t(a,{class:{"vega-flex-shrink-0 v-min-w-min":"VEGA-CHECKBOX-GROUP"==this.host.parentElement.nodeName,checked:this.checked,disabled:this.isDisabled()}},t("label",{class:{"vega-checkbox-container":!0,error:this.showError},ref:e=>this.inputContainerRef=e},t("input",{ref:e=>this.inputRef=e,type:"checkbox",checked:this.checked,value:this.identifier,onChange:this.onCheckBoxChange,"aria-label":this.identifier||"No label defined",disabled:this.isDisabled(),role:"button",tabIndex:0,onKeyDown:n()}),t("span",{class:{"vega-checkbox-icon":!0,"vega-checkbox-small":"small"===this.size},onClick:this.onSelectedIconClick,tabIndex:-1},this.renderIconDom()),t("div",{class:{"vega-checkbox-label-container":!0,"vega-checkbox-label-small":"small"===this.size},ref:e=>this.labelElement=e},this.renderLabelDom(),this.renderRequireDom()))),this.host)}renderIconDom(){return this.checked?t("vega-icon",{icon:"checkmark",size:"small"===this.size?"size-12":"size-16"}):null}renderLabelDom(){return t("span",{class:"vega-checkbox-label"},t("slot",null))}renderRequireDom(){return t("span",{class:{"vega-require":this.required}},this.required?"*":"")}initValue(){this.value=""!==this.identifier?this.checked?this.identifier:"":this.checked}isDisabled(){return this.disabled||this.groupDisabled}canAcceptGroupDisabledObserver(e){return g(this.host,"vega-checkbox-group")===e.host}groupDisabledObserverListener(e){this.groupDisabled=e.host.disabled}initAndRegisterGroupDisabledObserver(){g(this.host,"vega-checkbox-group")&&(this.groupDisabledObserver=new d(this.canAcceptGroupDisabledObserver.bind(this),this.groupDisabledObserverListener.bind(this)),s.register(l,this.groupDisabledObserver))}unRegisterGroupDisabledObserver(){this.groupDisabledObserver&&s.unregister(l,this.groupDisabledObserver)}get host(){return r(this)}static get watchers(){return{checked:["watchCheckedChange"]}}};E([u()],G.prototype,"globalSlimmers",void 0),E([f()],G.prototype,"vegaCheckboxShowErrorController",void 0),E([f()],G.prototype,"formFieldController",void 0),E([f()],G.prototype,"changeEventEmitter",void 0),E([f()],G.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),G.style=':host{display:inline-block;vertical-align:middle}.vega-checkbox-container{position:relative;display:flex;-webkit-tap-highlight-color:transparent}.vega-checkbox-container>input[type=checkbox]{position:absolute;left:0px;top:0px;opacity:0;width:24px;height:24px;padding:0px;margin:0px}.vega-checkbox-container>.vega-checkbox-icon{display:inline-block;box-sizing:border-box;width:24px;height:24px;border-style:solid;border-width:2px;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1));position:relative;left:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field, 171, 198, 216, 1));border-radius:4px;min-width:24px;color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-icon.vega-checkbox-small{width:16px;height:16px;min-width:16px;border-radius:2px}.vega-checkbox-container>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-hover, 115, 160, 190, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.vega-checkbox-container>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-focus, 19, 98, 226, 0.25));border:1px solid rgba(var(--v-border-input-field-focus, 19, 98, 226, 1));outline:none}.vega-checkbox-container>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}:host(.checked) .vega-checkbox-container>.vega-checkbox-icon{display:inline-flex;align-items:center;justify-content:center}.vega-checkbox-container:hover{cursor:pointer}.vega-checkbox-container .vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px;vertical-align:middle}.vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border:1px solid rgba(var(--v-border-input-field-danger, 230, 50, 87, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon{background-color:rgba(var(--v-bg-danger, 189, 41, 71, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:hover{border:1px solid rgba(var(--v-border-input-field-danger-hover, 255, 87, 114, 1))}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:hover{background-color:rgba(var(--v-bg-danger-hover, 233, 71, 104, 1))}.vega-checkbox-container.error>input[type=checkbox]:focus-visible+.vega-checkbox-icon{box-shadow:0 0 0 4px rgba(var(--v-ring-input-danger-focus, 230, 50, 87, 0.25));border:1px solid rgba(var(--v-border-input-field-danger-focus, 233, 71, 104, 1));outline:none}:host(.checked) .vega-checkbox-container.error>.vega-checkbox-icon:active{background-color:rgba(var(--v-bg-danger-active, 230, 50, 87, 1))}.vega-checkbox-container.error>.vega-checkbox-icon:active{border-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-danger-active, 189, 41, 71, 1))}:host(.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1));border:1px solid rgba(var(--v-border-input-field-disabled, 222, 225, 227, 1))}:host(.checked.disabled) .vega-checkbox-container>.vega-checkbox-icon>vega-icon{color:rgba(var(--v-text-inverted-primary, 252, 252, 252, 1))}.vega-checkbox-container>.vega-checkbox-label-container{display:inline-block;margin-left:12px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container{font-family:"Inter", sans-serif;font-size:16px;font-weight:400;line-height:24px;letter-spacing:0px}}.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{margin-left:8px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-checkbox-container>.vega-checkbox-label-container.vega-checkbox-label-small{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}:host(.disabled) .vega-checkbox-container>.vega-checkbox-label-container{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-checkbox-label-container.vega-hidden{display:none}.vega-hidden{display:none}';var q=function(e,i,t,a){var r,n=arguments.length,o=n<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,i,t,a);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(n<3?r(o):n>3?r(i,t,o):r(i,t))||o);return n>3&&o&&Object.defineProperty(i,t,o),o};const F=class{constructor(t){e(this,t),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.globalSlimmers={},this.formFieldController=new k({propertyRules:[{propertyName:"required",ruleFactory:e=>e?new C:null}],defaultValue:[],validationRulesName:"validationRules",attributeGetter:e=>this[e],inputContainerGetter:()=>this.inputContainerRef,touchableAreaGetter:()=>this.touchableAreaGetter()}),this.checkboxValueChangeObserver=new z(c,(e=>this.childCheckboxValueChange(e))),this.checkboxEventPrevent=new R([y],(()=>this.vegaFlexElement)),this.changeEventEmitter=w(F,y),this.vegaComponentUsageRuntimeMetricsSlimmer=new m,this.label="",this.value=[],this.vegaFlexProp={},this.disabled=!1,this.required=!1,this.hint="",this.isValid=null,this.autoValidation=!0,this.validationRules=[],this.childCheckboxValueChange=e=>{this.syncCheckboxItemsValue(e.detail,e.host.identifier)},this.touchableAreaGetter=()=>{const e=[];return this.vegaCheckboxArray&&this.vegaCheckboxArray.forEach((async i=>{e.push(i.shadowRoot.querySelector("input"))})),e}}async watchValue(){this.initCheckboxArray(),this.changeEventEmitter.emit(this.value),s.notify(h,{host:this.host,detail:this.value})}watchVegaFlexProp(){this.setVegaFlexProperty()}async watchDisabled(){this.notifyGroupDisabledChange()}watchValidationRules(){}componentDidLoad(){this.setVegaFlexProperty(),this.initCheckboxArray(),this.notifyGroupDisabledChange()}render(){return o(t(a,null,this.renderLabelDom(),t("div",{class:"vega-checkbox-group-container",ref:e=>this.inputContainerRef=e},t("vega-flex",{ref:e=>{this.vegaFlexElement=e}},t("slot",null))),this.renderHintDom()),this.host)}renderLabelDom(){return this.label&&t("div",{class:"vega-label"},t("label",{"aria-label":this.label},this.label,this.renderRequireDom()))}renderRequireDom(){return this.required?t("span",{class:"vega-require"},"*"):null}renderHintDom(){return this.hint&&t("div",{class:"vega-hint"},t("label",null,this.hint))}setVegaFlexProperty(){this.vegaFlexProp&&Object.assign(this.vegaFlexElement,{gap:"size-16",direction:"col"},this.vegaFlexProp)}syncCheckboxItemsValue(e,i){e&&!this.value.includes(i)?this.value=[...this.value,i]:!e&&this.value.includes(i)&&(this.value=[...this.value.filter((e=>e!==i))])}initCheckboxArray(){this.vegaCheckboxArray=Array.from(this.host.querySelectorAll("vega-checkbox")),this.vegaCheckboxArray.forEach((e=>{e.checked=!!(this.value&&this.value.length>0)&&this.value.includes(e.identifier)}))}notifyGroupDisabledChange(){s.notify(l,{host:this.host})}get host(){return r(this)}static get watchers(){return{value:["watchValue"],vegaFlexProp:["watchVegaFlexProp"],disabled:["watchDisabled"],validationRules:["watchValidationRules"]}}};q([u()],F.prototype,"globalSlimmers",void 0),q([f()],F.prototype,"formFieldController",void 0),q([f()],F.prototype,"checkboxValueChangeObserver",void 0),q([f()],F.prototype,"checkboxEventPrevent",void 0),q([f()],F.prototype,"changeEventEmitter",void 0),q([f()],F.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),q([I()],F.prototype,"watchVegaFlexProp",null),F.style=':host{display:block;text-align:left;line-height:normal}.vega-error{display:block;margin-top:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-error, 189, 41, 71, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-error{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}.vega-hidden{display:none}.vega-label{margin-bottom:16px}.vega-label label{font-family:"Inter", sans-serif;font-size:18px;font-weight:500;line-height:30px;letter-spacing:0px;color:rgba(var(--v-text-primary, 32, 54, 69, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-label label{font-family:"Inter", sans-serif;font-size:16px;font-weight:500;line-height:28px;letter-spacing:0px}}.vega-require{color:rgba(var(--v-text-error, 189, 41, 71, 1));margin-left:4px}.vega-hint{padding-top:12px}.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-hint>label{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;letter-spacing:0px}}';export{G as vega_checkbox,F as vega_checkbox_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as a,g as n}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{n as o,c as r}from"./p-344ee7cb.js";import{D as g}from"./p-1b3a64f7.js";import{
|
|
1
|
+
import{h as t,r as e,c as i,H as a,g as n}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{n as o,c as r}from"./p-344ee7cb.js";import{D as g}from"./p-1b3a64f7.js";import{s as h,x as p,e as l,a as c,F as f}from"./p-b36887f9.js";import{a as m}from"./p-ad4bd166.js";import{C as v}from"./p-025ccc18.js";import{c as d}from"./p-11cbdade.js";import{I as u}from"./p-6e1ab235.js";import{V as x,I as w}from"./p-61f6167c.js";import"./p-2d0d575f.js";import"./p-d97770c0.js";import"./p-5f377954.js";import"./p-c3ef9d64.js";import"./p-f404aa83.js";import"./p-6a334573.js";const b=({pageSize:e,current:i,total:a})=>{const n=a>0?e*(i-1)+1:0,s=Math.min(i*e,a);return t("vega-field-label",{label:`Viewing ${n}-${s} of ${a}`})},y=({onChange:e,pageCount:i})=>{let a;const n=()=>{if(a.value){const t=o(r(a.value,1),1,i);e(t),a.value=""}},s=t=>{t.stopPropagation()};return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},t("vega-field-label",{label:"Go To"}),t("vega-form",{ref:t=>{g.addUniqueObserverToNode(t,h,n)}},t("vega-input",{"data-vega-form":"paginationGoTo",type:"number",size:"small",showClearIcon:!1,style:{width:"60px"},maskConfig:{type:"number",options:{allowNegative:!1,precision:0}},onVegaChange:s,onChange:s,ref:t=>{a=t,g.addUniqueObserverToNode(t,p,n)}})))},z=({pageSize:e,pageSizeSelectorOptions:i,onChange:a})=>{const n=i.sort(((t,e)=>t-e)),s=t=>{const e=Number(t.detail);a(e)};return t("vega-flex",{alignItems:"center",justifyContent:"center",gap:"size-8"},t("vega-field-label",{label:"Show"}),t("div",null,t("vega-input-select",{size:"small",source:n.map((t=>({id:t.toString(),displayName:t.toString()}))),value:e.toString(),placeholder:"Page Size",vegaDropdownProps:{matchTargetWidth:!1,searchable:!1},ref:t=>{g.addUniqueObserverToNode(t,l,s)}})))},C=({total:e,current:i,onChange:a,pageCount:n})=>{const s=e=>{const n=i!==e;return t("li",{key:e,class:m(["vega-pagination-item",i===e?"active":""])},t("button",{onClick:()=>n&&a(e)},e))},o=(e,i,a)=>t("li",{class:m(["vega-pagination-button",i&&"disabled"])},t("vega-button-circle",{variant:"icon-only",icon:e,iconColor:"text-link",size:"small",disabled:i,ref:t=>{g.addUniqueObserverToNode(t,c,a)}}));return t("ul",{class:"vega-pagination"},o("chevron-left",0===e||1===i,(()=>{a(i-1)})),0===e?[s(1)]:((t,e,i=7)=>{if(i<7)throw new Error("Must allow at least 7 pager items");if(i%2==0)throw new Error("Must allow odd number of pager items");if(e<i)return Array(e).fill(0).map(((t,e)=>e+1));const a=Math.max(1,Math.min(e-i+1,t-Math.floor(i/2))),n=new Array(i);for(let t=0;t<i;t+=1)n[t]=t+a;return n[0]>1&&(n[0]=1,n[1]="..."),n[n.length-1]<=e-1&&(n[n.length-1]=e,n[n.length-2]="..."),n})(i,n).map((e=>"string"==typeof e?t("li",{class:"vega-pagination-item pager-ellipsis"},"..."):s(e))),o("chevron-right",0===e||i===n,(()=>{a(i+1)})))};var S=function(t,e,i,a){var n,s=arguments.length,o=s<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var r=t.length-1;r>=0;r--)(n=t[r])&&(o=(s<3?n(o):s>3?n(e,i,o):n(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const j=class{constructor(a){e(this,a),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaPageSizeChange=i(this,"vegaPageSizeChange",7),this.pageSizeChange=i(this,"pageSizeChange",7),this.globalSlimmers={},this.childEventPrevent=new v([h],(()=>this.host)),this.childValueChangePrevent=new v([l],(()=>this.host),!0),this.vegaChangeEventEmitter=d(j,l),this.vegaPageSizeChangeEventEmitter=d(j,f),this.vegaComponentUsageRuntimeMetricsSlimmer=new x,this.vegaPaginationItemTypes=["currentPageLabel","pageSizeSelector","pageSelector","goTo"],this.pageCount=0,this.current=1,this.total=0,this.pageSize=10,this.extensions=[["pageSelector"]],this.pageSizeSelectorOptions=[10,20,50,100],this.renderPaginationItemsWrapper=e=>t("vega-flex",{gap:"size-24",alignItems:"center",key:this.generateWrapperKey(e)},e.map((e=>t("div",{key:e},this.renderPaginationItem(e))))),this.renderPaginationItem=e=>{switch(e){case"currentPageLabel":return t(b,{total:this.total,current:this.current,pageSize:this.pageSize});case"pageSizeSelector":{const e=this.pageSizeSelectorOptions.includes(this.pageSize)?this.pageSizeSelectorOptions:[...this.pageSizeSelectorOptions,this.pageSize];return t(z,{pageSize:this.pageSize,pageSizeSelectorOptions:e,onChange:this.onPageSizeSelectorChange})}case"pageSelector":return t(C,{current:this.current,total:this.total,onChange:this.onPageSelectorChange,pageCount:this.pageCount});case"goTo":return t(y,{onChange:this.handlePaginationGoToChange,pageCount:this.pageCount})}},this.handlePaginationGoToChange=t=>{this.current=t},this.onPageSizeSelectorChange=t=>{this.pageSize=t,this.vegaPageSizeChangeEventEmitter.emit(this.pageSize)},this.calculatePages=()=>this.total?Math.floor((this.total-1)/this.pageSize)+1:0,this.onPageSelectorChange=t=>{this.current=t},this.removeDuplicateItems=t=>{const e=[...this.vegaPaginationItemTypes];return[...t].map((t=>t.filter(((i,a)=>{const n=e.indexOf(i);return n>=0?(e.splice(n,1),!0):(t.splice(a,1),!1)})))).filter((t=>t.length>0))},this.generateWrapperKey=t=>t.map(String).reduce(((t,e)=>`${t}-${e}`)),this.currentValueGuard=()=>{0===this.pageCount?this.current=1:this.current>this.pageCount&&(this.current=this.pageCount)}}watchPageCount(){this.currentValueGuard()}watchCurrent(){this.currentValueGuard(),this.vegaChangeEventEmitter.emit(this.current)}watchPageSize(){this.pageCount=this.calculatePages()}componentWillLoad(){this.pageCount=this.calculatePages(),this.currentValueGuard(),this.pageSizeSelectorOptions.includes(this.pageSize)||(this.pageSizeSelectorOptions=[...this.pageSizeSelectorOptions,this.pageSize])}render(){return s(t(a,null,this.removeDuplicateItems(this.extensions).map(this.renderPaginationItemsWrapper)),this.host)}get host(){return n(this)}static get watchers(){return{pageCount:["watchPageCount"],current:["watchCurrent"],total:["watchPageSize"],pageSize:["watchPageSize"]}}};S([w()],j.prototype,"globalSlimmers",void 0),S([u()],j.prototype,"childEventPrevent",void 0),S([u()],j.prototype,"childValueChangePrevent",void 0),S([u()],j.prototype,"vegaChangeEventEmitter",void 0),S([u()],j.prototype,"vegaPageSizeChangeEventEmitter",void 0),S([u()],j.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),j.style=':host{display:flex;align-items:center;justify-content:space-between;gap:20px;line-height:normal}.vega-pagination{display:flex;padding:0px;margin:0px}.vega-pagination .vega-pagination-item{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item button{background-color:rgba(var(--v-bg-transparent, 0, 0, 0, 0));border-width:0px;outline:2px solid transparent;outline-offset:2px;width:100%;height:100%;cursor:pointer;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-link, 19, 98, 226, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-pagination .vega-pagination-item.pager-ellipsis{cursor:default}.vega-pagination .vega-pagination-item:not(.pager-ellipsis):not(:active):hover{text-decoration:underline;text-underline-offset:2px}.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-pagination .vega-pagination-item button:active,.vega-pagination .vega-pagination-item.active button{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.vega-pagination .vega-pagination-item button:focus-visible{box-shadow:0 0 0 4px rgba(var(--v-ring-action-focus, 19, 98, 226, 0.25));border-radius:9999px}.vega-pagination .vega-pagination-button{list-style-type:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}';export{j as vega_pagination}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as h,g as s}from"./p-1c298d5a.js";import{F as a}from"./p-c3ef9d64.js";import{V as l,M as r,A as o,D as c}from"./p-3a0a4d15.js";import{R as p}from"./p-4c6f6317.js";import{V as d}from"./p-7b40ac07.js";import{s as n}from"./p-9b797118.js";import{I as v}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-61f6167c.js";import{F as u}from"./p-e3bfd4a1.js";import{b as g}from"./p-b8a63b73.js";import{C as _}from"./p-2d0d575f.js";import{c as A}from"./p-b2333627.js";import{C as M}from"./p-c1851b1a.js";import{D as E}from"./p-1b3a64f7.js";import{e as w,u as Z,t as b}from"./p-2a4455a5.js";import{V as I}from"./p-af26780d.js";import"./p-f404aa83.js";import"./p-344ee7cb.js";import"./p-0bb29d98.js";import"./p-ad4bd166.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-eecfad57.js";import"./p-883a939b.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-987fbbd0.js";import"./p-38d81bde.js";import"./p-ee68920f.js";import"./p-4e593f9f.js";import"./p-5f377954.js";import"./p-66098cf8.js";import"./p-23ec14fe.js";const D=[{type:"visa",iconName:"visa",pattern:l,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:r,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],j=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];var R=function(t,i,e,h){var s,a=arguments.length,l=a<3?i:null===h?h=Object.getOwnPropertyDescriptor(i,e):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,i,e,h);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(l=(a<3?s(l):a>3?s(i,e,l):s(i,e))||l);return a>3&&l&&Object.defineProperty(i,e,l),l};const y=class{constructor(h){t(this,h),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new u({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new p:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=A(y,w),this.blurEventEmitter=A(y,Z),this.focusEventEmitter=A(y,b),this.inputCreditCardEventPrevent=new M([w,b,Z],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(j),this.maskConfig={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:I.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,E.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),E.addUniqueObserverToNode(t,Z,(()=>{this.handleVegaBlur()})),E.addUniqueObserverToNode(t,b,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),_.notify(g,{host:this.host,detail:t})}componentDidLoad(){a.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return n(e(h,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return D.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){const t=[],i=this.getCreditCardType(this.value);return i&&(t.push(i.maskConfig),this.hideCardNumberOnBlur&&this.value.trim().includes(" ")&&(this.maskConfig.options.mask=this.generateDynamicMask(),t.push(this.maskConfig))),t}generateDynamicMask(){const t=this.value.trim().split(" ");return this.maskCardNumber(t).join(" ")}maskCardNumber(t){return t.map(((i,e)=>(e===t.length-1?"9":"X").repeat(i.length)))}get host(){return s(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};I.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" style=\'fill: rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path style="fill: rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" style=\'fill: rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),R([f()],y.prototype,"globalSlimmers",void 0),R([v()],y.prototype,"formFieldController",void 0),R([v()],y.prototype,"changeEventEmitter",void 0),R([v()],y.prototype,"blurEventEmitter",void 0),R([v()],y.prototype,"focusEventEmitter",void 0),R([v()],y.prototype,"inputCreditCardEventPrevent",void 0),R([v()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{y as vega_input_credit_card}
|
|
1
|
+
import{r as t,c as i,h as e,H as h,g as s}from"./p-1c298d5a.js";import{F as l}from"./p-c3ef9d64.js";import{V as a,M as r,A as o,D as c}from"./p-3a0a4d15.js";import{R as p}from"./p-961e1ecd.js";import{V as d}from"./p-7b40ac07.js";import{s as n}from"./p-9b797118.js";import{I as v}from"./p-6e1ab235.js";import{V as m,I as f}from"./p-61f6167c.js";import{F as u}from"./p-e3bfd4a1.js";import{b as g}from"./p-b8a63b73.js";import{C as _}from"./p-2d0d575f.js";import{c as A}from"./p-11cbdade.js";import{C as M}from"./p-025ccc18.js";import{D as E}from"./p-1b3a64f7.js";import{e as w,x as Z,w as b}from"./p-b36887f9.js";import{V as I}from"./p-af26780d.js";import"./p-f404aa83.js";import"./p-344ee7cb.js";import"./p-0bb29d98.js";import"./p-ad4bd166.js";import"./p-8b5d3a52.js";import"./p-6a334573.js";import"./p-eecfad57.js";import"./p-883a939b.js";import"./p-3542f8fe.js";import"./p-3c8b2105.js";import"./p-987fbbd0.js";import"./p-38d81bde.js";import"./p-ee68920f.js";import"./p-d97770c0.js";import"./p-5f377954.js";import"./p-66098cf8.js";import"./p-23ec14fe.js";const D=[{type:"visa",iconName:"visa",pattern:a,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999 999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"mastercard",iconName:"mastercard",pattern:r,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"amex",iconName:"amex",pattern:o,maskConfig:{type:"custom",options:{mask:"9999 999999 99999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}},{type:"discover",iconName:"discover",pattern:c,maskConfig:{type:"custom",options:{mask:"9999 9999 9999 9999",slot:"9",accept:/\d/,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")}}}],j=[{payloadKey:"AUTO_VALIDATION_IS_TRUE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!0===t.autoValidation},{payloadKey:"AUTO_VALIDATION_IS_FALSE",payloadDescription:"Determines whether the user's input in the credit card field should be automatically validated",payloadValue:t=>!1===t.autoValidation}];var R=function(t,i,e,h){var s,l=arguments.length,a=l<3?i:null===h?h=Object.getOwnPropertyDescriptor(i,e):h;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,h);else for(var r=t.length-1;r>=0;r--)(s=t[r])&&(a=(l<3?s(a):l>3?s(i,e,a):s(i,e))||a);return l>3&&a&&Object.defineProperty(i,e,a),a};const y=class{constructor(h){t(this,h),this.vegaChange=i(this,"vegaChange",7),this.change=i(this,"change",7),this.vegaBlur=i(this,"vegaBlur",7),this.blur=i(this,"blur",7),this.vegaFocus=i(this,"vegaFocus",7),this.focus=i(this,"focus",7),this.globalSlimmers={},this.formFieldController=new u({propertyRules:[{propertyName:"required",ruleFactory:t=>t?new p:null},{propertyName:"",ruleFactory:()=>new d}],validationRulesName:"validationRules",defaultValue:"",attributeGetter:t=>this[t],inputContainerGetter:()=>this.inputContainerGetter(),touchableAreaGetter:()=>this.touchableAreaGetter()}),this.changeEventEmitter=A(y,w),this.blurEventEmitter=A(y,Z),this.focusEventEmitter=A(y,b),this.inputCreditCardEventPrevent=new M([w,b,Z],(()=>this.host),!0),this.vegaComponentUsageRuntimeMetricsSlimmer=new m(j),this.maskConfig={type:"custom",options:{mask:"",slot:"9",accept:/[\d\s]/,insertMode:!1,triggerAtInit:l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")},trigger:"blur"},this.required=!1,this.disabled=!1,this.label="",this.hint="",this.size="default",this.placeholder="",this.hideCardNumberOnBlur=!0,this.autoValidation=!0,this.validationRules=[],this.isValid=null,this.value="",this.renderInputContainer=()=>{var t;const i=(null===(t=this.getCreditCardType(this.value))||void 0===t?void 0:t.iconName)||"regular-credit-card";return e("vega-input",{label:this.label,type:"number",prefixIcon:I.getIconKey(i),maskConfig:this.getMaskConfig(),placeholder:this.placeholder,disabled:this.disabled,size:this.size,value:this.value,hint:this.hint,required:this.required,showClearIcon:!1,ref:t=>{this.inputRef=t,E.addUniqueObserverToNode(t,w,(t=>{this.handleVegaChange(t)})),E.addUniqueObserverToNode(t,Z,(()=>{this.handleVegaBlur()})),E.addUniqueObserverToNode(t,b,(()=>{this.handleVegaFocus()}))}})},this.handleVegaChange=t=>{this.value=t.detail},this.handleVegaBlur=()=>{this.blurEventEmitter.emit()},this.handleVegaFocus=()=>{this.focusEventEmitter.emit()},this.inputContainerGetter=()=>this.inputRef.shadowRoot.querySelector(".vega-input-container"),this.touchableAreaGetter=()=>Array.from(this.inputRef.shadowRoot.querySelectorAll("input"))}watchValidationRules(){}watchValue(t){this.changeEventEmitter.emit(t),_.notify(g,{host:this.host,detail:t})}componentDidLoad(){l.isEnabled("VEGA_INPUT_CREDIT_CARD.ENABLE_HIDE_NUMBER_MASK_ON_FIRST_LOAD")&&this.hideCardNumberOnBlur&&this.inputRef.value&&this.value!==this.inputRef.value&&(this.value=this.inputRef.value)}render(){return n(e(h,null,this.renderInputContainer()),this.host)}getCreditCardType(t){return D.filter((i=>i.pattern.test(t)))[0]}getMaskConfig(){const t=[],i=this.getCreditCardType(this.value);return i&&(t.push(i.maskConfig),this.hideCardNumberOnBlur&&this.value.trim().includes(" ")&&(this.maskConfig.options.mask=this.generateDynamicMask(),t.push(this.maskConfig))),t}generateDynamicMask(){const t=this.value.trim().split(" ");return this.maskCardNumber(t).join(" ")}maskCardNumber(t){return t.map(((i,e)=>(e===t.length-1?"9":"X").repeat(i.length)))}get host(){return s(this)}static get watchers(){return{validationRules:["watchValidationRules"],value:["watchValue"]}}};I.register({visa:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#00579F" rx="2"/><path fill="#fff" d="M15.474 15.792h-1.979l1.238-7.653h1.979l-1.238 7.653ZM22.647 8.326A4.877 4.877 0 0 0 20.872 8c-1.954 0-3.33 1.042-3.339 2.532-.016 1.1.986 1.71 1.735 2.076.765.375 1.026.62 1.026.953-.008.513-.619.75-1.189.75-.79 0-1.213-.123-1.857-.408l-.26-.122-.277 1.718c.464.211 1.32.4 2.207.407 2.076 0 3.428-1.026 3.444-2.613.008-.872-.52-1.54-1.66-2.085-.693-.35-1.117-.586-1.117-.944.008-.326.359-.66 1.14-.66a3.362 3.362 0 0 1 1.474.293l.18.082.268-1.653ZM25.279 13.08l.79-2.14c-.008.016.162-.448.26-.733l.138.66s.375 1.831.457 2.214h-1.645ZM27.72 8.14h-1.53c-.472 0-.831.138-1.035.635l-2.94 7.018h2.077l.416-1.148h2.54c.057.269.237 1.148.237 1.148h1.832L27.72 8.14ZM11.842 8.139l-1.938 5.219-.212-1.059c-.358-1.221-1.482-2.548-2.736-3.208l1.775 6.693h2.093l3.11-7.645h-2.092Z"/><path fill="#FAA61A" d="M8.104 8.139H4.92l-.032.154c2.483.635 4.128 2.166 4.804 4.007L9 8.782c-.114-.489-.464-.627-.896-.643Z"/></svg>',autoSize:!0},mastercard:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#000" rx="2"/><path fill="#ED0006" fill-rule="evenodd" d="M18.25 17.157a6.75 6.75 0 0 1-4.426 1.649c-3.769 0-6.824-3.09-6.824-6.903C7 8.091 10.055 5 13.824 5a6.75 6.75 0 0 1 4.426 1.649A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#F9A000" fill-rule="evenodd" d="M18.25 17.157a6.92 6.92 0 0 0 2.398-5.254 6.92 6.92 0 0 0-2.398-5.254A6.75 6.75 0 0 1 22.676 5c3.769 0 6.824 3.09 6.824 6.903 0 3.812-3.055 6.903-6.824 6.903a6.75 6.75 0 0 1-4.426-1.65Z" clip-rule="evenodd"/><path fill="#FF5E00" fill-rule="evenodd" d="M18.25 6.65a6.92 6.92 0 0 1 2.398 5.253 6.92 6.92 0 0 1-2.398 5.254 6.92 6.92 0 0 1-2.398-5.254A6.92 6.92 0 0 1 18.25 6.65Z" clip-rule="evenodd"/></svg>',autoSize:!0},amex:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><g clip-path="url(#a)"><rect width="36" height="24" fill="#016FD0" rx="2"/><path fill="#fff" d="M6.99 18.549v-5.654h5.986l.643.838.663-.838h21.729v5.264s-.569.384-1.226.39H22.754l-.724-.891v.891h-2.373v-1.521s-.325.212-1.025.212h-.808v1.309h-3.593l-.641-.855-.651.855H6.99ZM0 8.634l1.35-3.147h2.334l.767 1.763V5.487h2.902l.456 1.274.442-1.274h13.027v.64s.685-.64 1.81-.64l4.227.015.753 1.74V5.487h2.428l.669 1v-1h2.45v5.654h-2.45l-.64-1.003v1.003h-3.569l-.359-.892h-.959l-.353.892h-2.42c-.968 0-1.587-.628-1.587-.628v.628H17.63l-.725-.892v.892H3.34l-.359-.892h-.956l-.356.892H0V8.634Z"/><path fill="#016FD0" d="M1.827 6.184.006 10.417h1.185l.336-.847H3.48l.335.847h1.211L3.207 6.184h-1.38Zm.673.985.596 1.482H1.903L2.5 7.169ZM5.151 10.416V6.183l1.685.006.98 2.73.956-2.736h1.671v4.233H9.385v-3.12l-1.122 3.12h-.928L6.21 7.296v3.12H5.15ZM11.168 10.416V6.183h3.454v.947h-2.384v.724h2.328v.891h-2.328v.752h2.384v.92h-3.454ZM15.233 6.184v4.233h1.059V8.913h.445l1.27 1.504H19.3l-1.393-1.56a1.29 1.29 0 0 0 1.161-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.059.947h1.21c.29 0 .5.227.5.446 0 .28-.273.445-.485.445h-1.225v-.891ZM20.582 10.416h-1.08V6.183h1.08v4.233ZM23.144 10.416h-.233c-1.129 0-1.814-.889-1.814-2.1 0-1.24.678-2.133 2.103-2.133h1.17v1.003h-1.213c-.578 0-.988.451-.988 1.141 0 .82.468 1.165 1.142 1.165h.279l-.446.924ZM25.448 6.184l-1.82 4.233h1.185l.336-.847h1.953l.334.847h1.211l-1.819-4.233h-1.38Zm.674.985.595 1.482h-1.192l.597-1.482ZM28.77 10.416V6.183h1.345l1.718 2.66v-2.66h1.059v4.233H31.59l-1.762-2.73v2.73H28.77ZM7.715 17.825v-4.233h3.453v.947H8.784v.724h2.329v.89H8.784v.753h2.384v.919H7.715ZM24.636 17.825v-4.233h3.454v.947h-2.384v.724h2.317v.89h-2.317v.753h2.384v.919h-3.454ZM11.303 17.825l1.681-2.09-1.721-2.143h1.333l1.025 1.324 1.029-1.324h1.281l-1.699 2.116 1.685 2.117h-1.333l-.996-1.304-.971 1.304h-1.314ZM16.041 13.592v4.233h1.086v-1.337h1.114c.943 0 1.658-.5 1.658-1.472 0-.806-.56-1.424-1.52-1.424H16.04Zm1.086.957h1.174c.304 0 .522.187.522.488 0 .282-.217.487-.526.487h-1.17v-.975ZM20.359 13.592v4.233h1.058V16.32h.446l1.269 1.504h1.293l-1.393-1.56a1.29 1.29 0 0 0 1.162-1.3c0-.89-.7-1.373-1.48-1.373h-2.355Zm1.058.947h1.21c.29 0 .501.226.501.445 0 .281-.273.446-.486.446h-1.225v-.891ZM28.58 17.825v-.92H30.7c.313 0 .449-.169.449-.354 0-.178-.136-.358-.45-.358h-.957c-.831 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.062l-.446.952H29.94c-.341 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347H28.58ZM32.464 17.825v-.92h2.118c.313 0 .45-.169.45-.354 0-.178-.136-.358-.45-.358h-.957c-.832 0-1.295-.507-1.295-1.268 0-.679.424-1.333 1.66-1.333h2.02l-.404.952h-1.783c-.34 0-.446.179-.446.35 0 .175.13.369.39.369h1.003c.927 0 1.33.526 1.33 1.215 0 .74-.449 1.347-1.38 1.347h-2.256Z"/></g><defs><clipPath id="a"><rect width="36" height="24" fill="#fff" rx="2"/></clipPath></defs></svg>',autoSize:!0},discover:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" fill="#232342" rx="2"/><path fill="#fff" fill-rule="evenodd" d="M30.686 9.61c1.086 0 1.684.484 1.684 1.398a1.307 1.307 0 0 1-1.087 1.397l1.467 1.988h-1.14l-1.25-1.935h-.109v1.935h-.924V9.61h1.359Zm-.435 2.204h.272c.597 0 .869-.269.869-.752 0-.43-.272-.699-.87-.699h-.27v1.45Zm-4.129 2.579h2.608v-.806h-1.684v-1.29h1.63v-.806h-1.63v-1.074h1.684V9.61h-2.608v4.781Zm-2.716-1.559-1.25-3.223h-.978l2.01 4.889h.49l2.01-4.89h-.978l-1.304 3.225Zm-11.029-.805c0 1.343 1.087 2.471 2.445 2.471.435 0 .815-.107 1.195-.269v-1.074c-.271.322-.652.537-1.086.537-.87 0-1.576-.645-1.576-1.504v-.108c-.054-.86.652-1.612 1.521-1.665.435 0 .87.215 1.141.537V9.879c-.326-.214-.76-.268-1.14-.268-1.413-.108-2.5 1.02-2.5 2.418Zm-1.684-.591c-.543-.215-.706-.323-.706-.591.054-.323.326-.591.652-.538.271 0 .543.162.76.376l.49-.644c-.381-.323-.87-.538-1.359-.538-.76-.053-1.412.538-1.467 1.29v.054c0 .644.272 1.02 1.141 1.289.217.054.435.161.652.269a.563.563 0 0 1 .272.483c0 .376-.326.699-.652.699h-.055c-.434 0-.814-.269-.977-.645l-.598.59c.326.592.978.914 1.63.914.869.054 1.575-.59 1.63-1.45v-.162c-.055-.644-.326-.967-1.413-1.396Zm-3.15 2.954h.923V9.611h-.924v4.781ZM3.25 9.611H4.88c1.304.054 2.336 1.128 2.282 2.418 0 .698-.326 1.343-.87 1.826-.488.376-1.086.591-1.684.538H3.25V9.61Zm1.195 3.976c.435.053.924-.108 1.25-.376.326-.323.489-.753.489-1.236 0-.43-.163-.86-.49-1.182-.325-.269-.814-.43-1.249-.376h-.271v3.17h.271Z" clip-rule="evenodd"/><path fill="#FD6020" fill-rule="evenodd" d="M18.788 9.5c-1.358 0-2.499 1.075-2.499 2.471 0 1.344 1.087 2.472 2.5 2.526 1.412.053 2.498-1.075 2.553-2.472C21.287 10.628 20.2 9.5 18.788 9.5Z" clip-rule="evenodd"/></svg>',autoSize:!0},"regular-credit-card":{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="36" height="24" fill="none"><rect width="36" height="24" rx="2" style=\'fill: rgba(var(--v-regular-credit-card-bg, 205, 209, 211, 1))\'/><g clip-path="url(#a)"><path style="fill: rgba(var(--v-regular-credit-card-top, 252, 252, 252, 1))" d="M11 5c-1.103 0-2 .897-2 2v1h18V7c0-1.103-.897-2-2-2H11Zm16 6H9v6c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2v-6Zm-14.5 4h2c.275 0 .5.225.5.5s-.225.5-.5.5h-2a.501.501 0 0 1-.5-.5c0-.275.225-.5.5-.5Zm3.5.5c0-.275.225-.5.5-.5h4c.275 0 .5.225.5.5s-.225.5-.5.5h-4a.501.501 0 0 1-.5-.5Z"/></g><defs><clipPath id="a"><path d="M9 4h18v16H9z" style=\'fill: rgba(var(--v-regular-credit-card-bottom, 255, 255, 255, 1))\'/></clipPath></defs></svg>',autoSize:!0}}),R([f()],y.prototype,"globalSlimmers",void 0),R([v()],y.prototype,"formFieldController",void 0),R([v()],y.prototype,"changeEventEmitter",void 0),R([v()],y.prototype,"blurEventEmitter",void 0),R([v()],y.prototype,"focusEventEmitter",void 0),R([v()],y.prototype,"inputCreditCardEventPrevent",void 0),R([v()],y.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),y.style=":host{display:inline-block;width:100%;text-align:left;line-height:normal}";export{y as vega_input_credit_card}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as s}from"./p-c3ef9d64.js";import{V as o,a as t,b as a,c as i,d as l,w as
|
|
1
|
+
import{F as s}from"./p-c3ef9d64.js";import{V as o,a as t,b as a,c as i,d as l,w as n,e as c}from"./p-494bd912.js";import{M as e,V as r,s as h,G as b}from"./p-6e1ab235.js";import{V as f}from"./p-f9e456a6.js";import{v as p}from"./p-5f377954.js";import{V as T}from"./p-66098cf8.js";import{T as m}from"./p-c59042c0.js";import{V as d}from"./p-7b40ac07.js";var u=function(s,o,t,a){var i,l=arguments.length,n=l<3?o:null===a?a=Object.getOwnPropertyDescriptor(o,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(s,o,t,a);else for(var c=s.length-1;c>=0;c--)(i=s[c])&&(n=(l<3?i(n):l>3?i(o,t,n):i(o,t))||n);return l>3&&n&&Object.defineProperty(o,t,n),n};class g extends r{constructor(o){super(),this.originalWatchers=new Map,this.hasDisconnected=!1,this.isEnabled=s.isEnabled("VEGA_REACT.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD")&&s.isEnabled("VEGA_FRAMEWORK.PREVENT_CALL_WATCH_METHOD_BEFORE_COMPONENT_LOAD"),this.component=o.component}connectedCallback(){if(!this.isEnabled)return;if(this.hasDisconnected)return;const s=this.component.constructor.watchers;for(const o in s)s[o].forEach((s=>{this.originalWatchers.has(s)||(this.originalWatchers.set(s,this.component[s]),this.component[s]=function(){})}))}disconnectedCallback(){this.isEnabled&&(this.hasDisconnected=!0)}componentDidLoad(){this.isEnabled&&this.originalWatchers.forEach(((s,o)=>{const t=s;this.component[o]=function(...s){return t.apply(this,s)}}))}}u([e("connectedCallback")],g.prototype,"connectedCallback",null),u([e("disconnectedCallback")],g.prototype,"disconnectedCallback",null),u([e("componentDidLoad")],g.prototype,"componentDidLoad",null);const E=function(){globalThis.VegaDisabledFeatureKeys&&s.disable(...globalThis.VegaDisabledFeatureKeys),globalThis.VegaEnabledFeatureKeys&&s.enable(...globalThis.VegaEnabledFeatureKeys),globalThis.VegaLoader=o,globalThis.VegaNotify=t,globalThis.VegaThemeManager=a,globalThis.setVegaLogLevel=h,globalThis.VegaDialog=f,b.register([g]),globalThis.VegaEventManager=i,Object.keys(m).forEach((s=>{const{url:o}=m[s],t="vega-typography-"+s;if(!document.querySelector("#"+t)){const s=document.createElement("link");s.id=t,s.href=o,s.rel="stylesheet",document.head.append(s)}})),globalThis.VegaIconManager=T,globalThis.VegaZIndexManager=l,globalThis.ValidCreditCardNumberRule=d,globalThis.VegaEnvInfo=p.getVegaEnv(),import("./p-f404aa83.js").then((function(s){return s.i})).then((o=>{o.default.init(s)})),globalThis.waitForVega=n,globalThis.VegaSkeletonLoader=c};export{E as g}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as o,H as i,g as r}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as a,M as n,V as l,I as p}from"./p-6e1ab235.js";import{V as c,I as h}from"./p-61f6167c.js";import{c as u,S as d}from"./p-ad6aafb6.js";import{c as b}from"./p-
|
|
1
|
+
import{r as t,c as e,h as o,H as i,g as r}from"./p-1c298d5a.js";import{s}from"./p-9b797118.js";import{c as a,M as n,V as l,I as p}from"./p-6e1ab235.js";import{V as c,I as h}from"./p-61f6167c.js";import{c as u,S as d}from"./p-ad6aafb6.js";import{c as b}from"./p-11cbdade.js";import{a as g,b as v}from"./p-b36887f9.js";import{C as f}from"./p-025ccc18.js";import{D as m,d as y}from"./p-1b3a64f7.js";import{d as x}from"./p-eecfad57.js";import{C as w}from"./p-2d0d575f.js";import{f as j}from"./p-ad4bd166.js";import"./p-6a334573.js";import"./p-d97770c0.js";import"./p-5f377954.js";import"./p-c3ef9d64.js";import"./p-f404aa83.js";var S=function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a};class R extends l{registerGroupClickObserver(){m.addUniqueObserverToNode(this.host,x,(t=>{this.clickEventEmitter.emit(t.detail)}))}unregisterGroupClickObserver(){m.removeUniqueObserverFromNode(this.host,x)}}S([a()],R.prototype,"host",void 0),S([a()],R.prototype,"clickEventEmitter",void 0),S([n("connectedCallback")],R.prototype,"registerGroupClickObserver",null),S([n("disconnectedCallback")],R.prototype,"unregisterGroupClickObserver",null);const k=[{payloadKey:"VARIANT_IS_PRIMARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"primary"===t.variant},{payloadKey:"VARIANT_IS_SECONDARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"secondary"===t.variant},{payloadKey:"VARIANT_IS_TERTIARY",payloadDescription:"Specifies the visual style and prominence of the button group. It determines how the button group will be presented to the user.",payloadValue:t=>"tertiary"===t.variant}];var A=function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a};const I=class{constructor(o){t(this,o),this.vegaClick=e(this,"vegaClick",7),this.click=e(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=b(I,g),this.clickEventPrevent=new f([g],(()=>this.flexContainer)),this.buttonGroupClickController=new R,this.variantNotifySlimmer=u(I,"variant","watchVariant"),this.sizeNotifySlimmer=u(I,"size","watchSize"),this.iconAlignNotifySlimmer=u(I,"iconAlign","watchIconAlign"),this.vegaComponentUsageRuntimeMetricsSlimmer=new c(k),this.variant="primary",this.size="default",this.iconAlign="left"}watchVariant(){}watchSize(){}watchIconAlign(){}render(){return s(o(i,null,o("vega-flex",{class:`vega-button-group-container vega-button-group-${this.variant}`,direction:"row",alignItems:"tertiary"===this.variant?"center":"stretch",gap:"tertiary"!==this.variant?"size-2":"0",ref:t=>this.flexContainer=t},o("slot",null))),this.host)}get host(){return r(this)}static get watchers(){return{variant:["watchVariant"],size:["watchSize"],iconAlign:["watchIconAlign"]}}};A([h()],I.prototype,"globalSlimmers",void 0),A([p()],I.prototype,"clickEventEmitter",void 0),A([p()],I.prototype,"clickEventPrevent",void 0),A([p()],I.prototype,"buttonGroupClickController",void 0),A([p()],I.prototype,"variantNotifySlimmer",void 0),A([p()],I.prototype,"sizeNotifySlimmer",void 0),A([p()],I.prototype,"iconAlignNotifySlimmer",void 0),A([p()],I.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),I.style=":host{display:inline-block}.vega-button-group-primary{gap:6px}.vega-button-group-tertiary>::slotted(.vega-button-group-item){padding-left:12px;padding-right:12px;border-color:rgba(var(--v-border-color-divider-secondary, 199, 217, 229, 1));border-left-width:1px;border-top-width:0px;border-bottom-width:0px;border-right-width:0px;border-style:solid}.vega-button-group-tertiary>::slotted(.vega-button-group-item:first-child){border-left-width:0px}";var O=function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a};class C extends d{constructor(){super({parent:"vega-button-group",subStates:[{subStateName:"variant",parentStateName:"variant"},{subStateName:"size",parentStateName:"size"},{subStateName:"iconAlign",parentStateName:"iconAlign"}]})}}O([a({writable:!0})],C.prototype,"size",void 0),O([a({writable:!0})],C.prototype,"variant",void 0),O([a({writable:!0})],C.prototype,"iconAlign",void 0);var z=function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a};class N extends l{constructor(){super(...arguments),this.buttonItemClickHandle=()=>{this.notifyParentGroup(this.itemKey)},this.moreDropdownItemClickHandle=t=>{this.notifyParentGroup(t.detail)}}render(){return this.dropdownSource&&this.dropdownSource.length?o("vega-dropdown",Object.assign({source:this.dropdownSource,trigger:"click"},this.dropdownProps,{ref:t=>{m.addUniqueObserverToNode(t,v,this.moreDropdownItemClickHandle)}}),this.renderButtonItemWithTooltip()):this.renderButtonItemWithTooltip()}renderButtonItemWithTooltip(){return this.iconOnly&&this.label?o("vega-tooltip",{placement:"top",text:this.label},this.renderButtonItem()):this.renderButtonItem()}renderButtonItem(){const t=this.getButtonProps();return"tertiary"===this.variant?o("vega-button-link",Object.assign({},t)):o("vega-button",Object.assign({class:`button-group-item-button-${this.variant}`,variant:this.variant},t))}notifyParentGroup(t){const e=j(this.host,"vega-button-group");e&&w.notify(y.getSubject(e,x),{host:this.host,detail:t})}getButtonProps(){return{size:this.size,icon:this.icon,label:this.iconOnly?"":this.getDefaultLabel(),iconAlign:this.iconAlign,ref:t=>{m.addUniqueObserverToNode(t,g,this.buttonItemClickHandle)}}}getDefaultLabel(){return!this.icon&&!this.label&&this.dropdownSource&&this.dropdownSource.length?"More":this.label}}z([a()],N.prototype,"host",void 0),z([a()],N.prototype,"size",void 0),z([a()],N.prototype,"icon",void 0),z([a()],N.prototype,"label",void 0),z([a()],N.prototype,"iconAlign",void 0),z([a()],N.prototype,"iconOnly",void 0),z([a()],N.prototype,"variant",void 0),z([a()],N.prototype,"itemKey",void 0),z([a()],N.prototype,"dropdownSource",void 0),z([a()],N.prototype,"dropdownProps",void 0);var V=function(t,e,o,i){var r,s=arguments.length,a=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,i);else for(var n=t.length-1;n>=0;n--)(r=t[n])&&(a=(s<3?r(a):s>3?r(e,o,a):r(e,o))||a);return s>3&&a&&Object.defineProperty(e,o,a),a};const _=class{constructor(e){t(this,e),this.globalSlimmers={},this.subStateObserverSlimmer=new C,this.buttonGroupItemRenderer=new N,this.vegaComponentUsageRuntimeMetricsSlimmer=new c,this.variant="primary",this.size="default",this.iconAlign="left",this.iconOnly=!1}render(){return s(o(i,{class:"vega-button-group-item"},this.buttonGroupItemRenderer.render()),this.host)}get host(){return r(this)}};V([h()],_.prototype,"globalSlimmers",void 0),V([p()],_.prototype,"subStateObserverSlimmer",void 0),V([p()],_.prototype,"buttonGroupItemRenderer",void 0),V([p()],_.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_.style=":host{display:inline-block}:host>vega-tooltip,:host>vega-dropdown{height:100%}:host>vega-tooltip>vega-tooltip,:host>vega-dropdown>vega-tooltip{height:100%}:host vega-button{height:100%}:host vega-button::part(button):focus-visible{position:relative;outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;z-index:1;box-shadow:0 0 0}:host vega-button-link::part(link-border){outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;height:calc(100% + 2px);top:-1px;box-shadow:0 0 0;visibility:hidden}:host vega-button-link::part(label-container){text-decoration:none}:host vega-button-link:hover::part(label-container){text-decoration:underline}:host vega-button::part(button){margin-right:-4px}:host vega-button::part(button):focus-visible{margin-right:0px;margin-left:4px}:host(:first-child) vega-button::part(button){border-top-left-radius:9999px;border-bottom-left-radius:9999px}:host(:first-child) vega-button::part(button):focus-visible{margin-left:0}:host(:last-child) vega-button::part(button){border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(:last-child) vega-button::part(button){margin-right:0}vega-button::part(button){border-top-left-radius:0px;border-bottom-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;height:100%}";export{I as vega_button_group,_ as vega_button_group_item}
|