@globalpayments/vega 2.40.0 → 2.41.0
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-cdd0972c.js → app-globals-7fecd3ff.js} +10 -10
- package/dist/cjs/{child-nodes-event-prevent-slimmer-af2addec.js → child-nodes-event-prevent-slimmer-4beb1fde.js} +2 -2
- package/dist/cjs/{child-nodes-notify-observer-slimmer-4e60a929.js → child-nodes-notify-observer-slimmer-be92f366.js} +2 -2
- package/dist/cjs/{content-state-c5b47ca1.js → content-state-582d8961.js} +2 -3
- package/dist/cjs/{design-token-36eb5def.js → design-token-4d94a23c.js} +1 -1
- package/dist/cjs/{dom-node-subject-factory-ce1777a9.js → dom-node-subject-factory-3ec114b8.js} +30 -0
- package/dist/cjs/{dom-node-subject-observer-factory-80b3ac6c.js → dom-node-subject-observer-factory-5f0eae19.js} +2 -3
- package/dist/cjs/{element-appender-slimmer-4f0dc8c6.js → element-appender-slimmer-88edb0d1.js} +10 -9
- package/dist/cjs/{event-emit-slimmer-208a19e4.js → event-emit-slimmer-9c223f73.js} +3 -3
- package/dist/cjs/{feature-flag-controller-7b22e598.js → feature-flag-controller-3c6666df.js} +6 -0
- package/dist/cjs/{form-field-controller-slimmer-d92e8212.js → form-field-controller-slimmer-9f4d1fc3.js} +8 -9
- package/dist/cjs/{image-annotation-action-75b9c0d3.js → image-annotation-action-3247409b.js} +3 -3
- package/dist/cjs/index-453b89b9.js +42 -0
- package/dist/cjs/index.cjs.js +16 -18
- package/dist/cjs/{internal-vega-event-manager-981dfd1c.js → internal-vega-event-manager-e5e4bcf4.js} +1 -1
- package/dist/cjs/loader.cjs.js +10 -13
- package/dist/cjs/{page-resize-observer-slimmer-bb1eaebe.js → page-resize-observer-slimmer-bceeaabf.js} +53 -2
- package/dist/cjs/{public-rules-90b972e5.js → public-rules-ec626913.js} +3 -4
- package/dist/cjs/{remote-invocation-registry-32aaf6c2.js → remote-invocation-registry-ff9af278.js} +3 -3
- package/dist/cjs/{responsive-format-facade-a1983026.js → responsive-format-facade-ad8ca2ab.js} +212 -9
- package/dist/cjs/{rich-text-editor-required-rule-cacc5fe0.js → rich-text-editor-required-rule-15d9dea1.js} +1 -1
- package/dist/cjs/{string-input-formatter-slimmer-f45931fd.js → string-input-formatter-slimmer-83aa7e61.js} +2 -2
- package/dist/cjs/{style-formatter-d446562b.js → style-formatter-c1c9c121.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-b1f1e61a.js → sub-state-notify-slimmer-1a52271c.js} +2 -3
- package/dist/cjs/{sub-state-observer-slimmer-02634647.js → sub-state-observer-slimmer-91b89d4d.js} +2 -3
- package/dist/cjs/vega-accordion.cjs.entry.js +21 -12
- package/dist/cjs/vega-app-header-button.cjs.entry.js +19 -14
- package/dist/cjs/vega-banner.cjs.entry.js +5 -6
- package/dist/cjs/vega-box.cjs.entry.js +135 -18
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -7
- package/dist/cjs/vega-button-circle.cjs.entry.js +19 -12
- package/dist/cjs/vega-button-group_2.cjs.entry.js +8 -9
- package/dist/cjs/vega-button-link.cjs.entry.js +6 -7
- package/dist/cjs/vega-button.cjs.entry.js +18 -12
- package/dist/cjs/vega-calendar_3.cjs.entry.js +9 -11
- package/dist/cjs/vega-card.cjs.entry.js +20 -3
- package/dist/cjs/vega-carousel.cjs.entry.js +20 -9
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +11 -13
- package/dist/cjs/vega-chip.cjs.entry.js +22 -15
- package/dist/cjs/vega-color-picker.cjs.entry.js +6 -8
- package/dist/cjs/vega-combo-box.cjs.entry.js +8 -10
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +20 -23
- package/dist/cjs/vega-dialog_2.cjs.entry.js +33 -28
- package/dist/cjs/vega-divider.cjs.entry.js +22 -5
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +28 -24
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-label.cjs.entry.js +4 -5
- package/dist/cjs/vega-file-uploader.cjs.entry.js +6 -8
- package/dist/cjs/vega-flex.cjs.entry.js +19 -6
- package/dist/cjs/vega-font.cjs.entry.js +21 -5
- package/dist/cjs/vega-form.cjs.entry.js +13 -15
- package/dist/cjs/vega-grid.cjs.entry.js +20 -3
- package/dist/cjs/vega-icon.cjs.entry.js +18 -4
- package/dist/cjs/vega-image-uploader.cjs.entry.js +20 -19
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +8 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +9 -11
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +9 -11
- package/dist/cjs/vega-input-range.cjs.entry.js +8 -10
- package/dist/cjs/vega-input-select.cjs.entry.js +17 -16
- package/dist/cjs/vega-input.cjs.entry.js +10 -11
- package/dist/cjs/vega-item-toggle.cjs.entry.js +4 -5
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +25 -22
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +22 -7
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +2 -3
- package/dist/cjs/vega-pagination.cjs.entry.js +6 -7
- package/dist/cjs/vega-popover_2.cjs.entry.js +20 -12
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +4 -5
- package/dist/cjs/vega-radio_2.cjs.entry.js +11 -13
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +7 -7
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +20 -23
- package/dist/cjs/vega-segment-control.cjs.entry.js +5 -7
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +20 -18
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +12 -14
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +24 -19
- package/dist/cjs/vega-signature-capture.cjs.entry.js +19 -14
- package/dist/cjs/{vega-skeleton-loader-controller-00dbdf29.js → vega-skeleton-loader-controller-381e90fe.js} +262 -11
- package/dist/cjs/vega-stepper.cjs.entry.js +8 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +8 -10
- package/dist/cjs/vega-table_8.cjs.entry.js +40 -40
- package/dist/cjs/vega-text.cjs.entry.js +1 -2
- package/dist/cjs/vega-textarea.cjs.entry.js +8 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +18 -17
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +6 -8
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +18 -7
- package/dist/cjs/vega.cjs.js +10 -13
- package/dist/cjs/{index-0546e2ea.js → wait-for-vega-handler-46280dcf.js} +1 -39
- package/dist/collection/components/vega-box/slimmers/controllers/vega-box-responsive-style-controller.js +89 -0
- package/dist/collection/components/vega-box/vega-box.css +55 -7196
- package/dist/collection/components/vega-box/vega-box.js +23 -0
- package/dist/collection/components/vega-dialog/vega-dialog.js +4 -4
- package/dist/collection/components/vega-time-picker/vega-time-picker-dropdown/vega-time-picker-dropdown.css +1 -1
- package/dist/collection/components/vega-virtual-scroll/slimmers/controllers/vega-virtual-scroll-scrollable-controller.js +8 -5
- package/dist/collection/helpers/dialog/test/vega-dialog-controller.test.js +19 -1
- package/dist/collection/helpers/dialog/vega-dialog-controller.js +2 -2
- package/dist/collection/helpers/feature-control/feature-flags-map.js +6 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsiv-border-radius-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-border-radius-style-formatter.js +63 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-css-text-formatter.js +45 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-format-facade.js +9 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-style-formatter.js +44 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-padding-formatter.js +1 -0
- package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-padding-style-formatter.js +44 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.js +32 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.js +28 -0
- package/dist/collection/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.js +28 -0
- package/dist/collection/helpers/slimmers/element-appender-slimmer.js +1 -1
- package/dist/collection/helpers/ui/element-appender.js +1 -0
- package/dist/collection/helpers/ui/test/element-appender.test.js +12 -12
- package/dist/esm/{app-globals-88fa3549.js → app-globals-9ad844bb.js} +7 -7
- package/dist/esm/{child-nodes-event-prevent-slimmer-3220fa5b.js → child-nodes-event-prevent-slimmer-851ad927.js} +2 -2
- package/dist/esm/{child-nodes-notify-observer-slimmer-36024b11.js → child-nodes-notify-observer-slimmer-289caacc.js} +1 -1
- package/dist/esm/{content-state-2edba4ec.js → content-state-5646be9f.js} +1 -2
- package/dist/esm/{design-token-e14b622b.js → design-token-a1bb9a99.js} +1 -1
- package/dist/esm/{dom-node-subject-factory-97deb349.js → dom-node-subject-factory-5831cdd4.js} +30 -1
- package/dist/esm/{dom-node-subject-observer-factory-857c65fa.js → dom-node-subject-observer-factory-dc486a8b.js} +1 -2
- package/dist/esm/{element-appender-slimmer-d9155ee0.js → element-appender-slimmer-dbe9f79e.js} +6 -5
- package/dist/esm/{event-emit-slimmer-36cf4e39.js → event-emit-slimmer-f285e3ac.js} +3 -3
- package/dist/esm/{feature-flag-controller-4b3fe6f8.js → feature-flag-controller-91e7eaa1.js} +6 -0
- package/dist/esm/{form-field-controller-slimmer-bb64dec7.js → form-field-controller-slimmer-0da8c510.js} +3 -4
- package/dist/esm/{image-annotation-action-b6668f48.js → image-annotation-action-af91eb87.js} +3 -3
- package/dist/esm/index-88cfdf1a.js +39 -0
- package/dist/esm/index.js +12 -14
- package/dist/esm/{internal-vega-event-manager-0a01ba12.js → internal-vega-event-manager-07e1b3d9.js} +1 -1
- package/dist/esm/loader.js +10 -13
- package/dist/esm/{page-resize-observer-slimmer-beb7b0bd.js → page-resize-observer-slimmer-bf715d05.js} +51 -2
- package/dist/esm/{public-rules-413f6a17.js → public-rules-4a519276.js} +3 -4
- package/dist/esm/{remote-invocation-registry-1682b34e.js → remote-invocation-registry-d97fa3bc.js} +1 -1
- package/dist/esm/{responsive-format-facade-661193d7.js → responsive-format-facade-b3bc4db6.js} +204 -1
- package/dist/esm/{rich-text-editor-required-rule-75cc2db0.js → rich-text-editor-required-rule-7a402a9c.js} +1 -1
- package/dist/esm/{string-input-formatter-slimmer-418b54f0.js → string-input-formatter-slimmer-1f74c6f3.js} +2 -2
- package/dist/esm/{style-formatter-4b857992.js → style-formatter-bdafdf22.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-b36fd081.js → sub-state-notify-slimmer-e9489326.js} +1 -2
- package/dist/esm/{sub-state-observer-slimmer-09452523.js → sub-state-observer-slimmer-7e99a677.js} +1 -2
- package/dist/esm/vega-accordion.entry.js +20 -11
- package/dist/esm/vega-app-header-button.entry.js +18 -13
- package/dist/esm/vega-banner.entry.js +5 -6
- package/dist/esm/vega-box.entry.js +135 -18
- package/dist/esm/vega-breadcrumb.entry.js +6 -7
- package/dist/esm/vega-button-circle.entry.js +19 -12
- package/dist/esm/vega-button-group_2.entry.js +8 -9
- package/dist/esm/vega-button-link.entry.js +6 -7
- package/dist/esm/vega-button.entry.js +17 -11
- package/dist/esm/vega-calendar_3.entry.js +9 -11
- package/dist/esm/vega-card.entry.js +20 -3
- package/dist/esm/vega-carousel.entry.js +20 -9
- package/dist/esm/vega-checkbox_2.entry.js +9 -11
- package/dist/esm/vega-chip.entry.js +21 -14
- package/dist/esm/vega-color-picker.entry.js +6 -8
- package/dist/esm/vega-combo-box.entry.js +8 -10
- package/dist/esm/vega-date-picker_2.entry.js +16 -19
- package/dist/esm/vega-dialog_2.entry.js +25 -20
- package/dist/esm/vega-divider.entry.js +21 -4
- package/dist/esm/vega-dropdown_5.entry.js +28 -24
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-label.entry.js +4 -5
- package/dist/esm/vega-file-uploader.entry.js +6 -8
- package/dist/esm/vega-flex.entry.js +19 -6
- package/dist/esm/vega-font.entry.js +20 -4
- package/dist/esm/vega-form.entry.js +9 -11
- package/dist/esm/vega-grid.entry.js +20 -3
- package/dist/esm/vega-icon.entry.js +18 -4
- package/dist/esm/vega-image-uploader.entry.js +19 -18
- package/dist/esm/vega-input-credit-card.entry.js +8 -10
- package/dist/esm/vega-input-numeric.entry.js +9 -11
- package/dist/esm/vega-input-phone-number.entry.js +9 -11
- package/dist/esm/vega-input-range.entry.js +8 -10
- package/dist/esm/vega-input-select.entry.js +16 -15
- package/dist/esm/vega-input.entry.js +10 -11
- package/dist/esm/vega-item-toggle.entry.js +4 -5
- package/dist/esm/vega-left-nav_5.entry.js +18 -15
- package/dist/esm/vega-loader-wrapper_2.entry.js +19 -4
- package/dist/esm/vega-page-notification_2.entry.js +2 -3
- package/dist/esm/vega-pagination.entry.js +6 -7
- package/dist/esm/vega-popover_2.entry.js +20 -12
- package/dist/esm/vega-progress-tracker.entry.js +4 -5
- package/dist/esm/vega-radio_2.entry.js +9 -11
- package/dist/esm/vega-rich-text-content.entry.js +7 -7
- package/dist/esm/vega-rich-text-editor_4.entry.js +16 -19
- package/dist/esm/vega-segment-control.entry.js +5 -7
- package/dist/esm/vega-selection-chip_2.entry.js +18 -16
- package/dist/esm/vega-selection-tile_2.entry.js +11 -13
- package/dist/esm/vega-sidenav_3.entry.js +16 -11
- package/dist/esm/vega-signature-capture.entry.js +18 -13
- package/dist/esm/{vega-skeleton-loader-controller-5aea7aeb.js → vega-skeleton-loader-controller-964db62f.js} +261 -12
- package/dist/esm/vega-stepper.entry.js +8 -10
- package/dist/esm/vega-tab-group_2.entry.js +7 -9
- package/dist/esm/vega-table_8.entry.js +17 -17
- package/dist/esm/vega-text.entry.js +1 -2
- package/dist/esm/vega-textarea.entry.js +8 -10
- package/dist/esm/vega-time-picker_2.entry.js +18 -17
- package/dist/esm/vega-toggle-switch.entry.js +6 -8
- package/dist/esm/vega-tooltip_2.entry.js +18 -7
- package/dist/esm/vega.js +10 -13
- package/dist/esm/{index-d172bafa.js → wait-for-vega-handler-03a25866.js} +1 -38
- package/dist/types/components/vega-box/slimmers/controllers/vega-box-responsive-style-controller.d.ts +38 -0
- package/dist/types/components/vega-box/vega-box.d.ts +5 -0
- package/dist/types/components/vega-dialog/types.d.ts +1 -1
- package/dist/types/components/vega-virtual-scroll/slimmers/controllers/vega-virtual-scroll-scrollable-controller.d.ts +1 -1
- package/dist/types/helpers/dialog/vega-dialog-controller.d.ts +1 -1
- package/dist/types/helpers/feature-control/feature-flag.d.ts +6 -1
- package/dist/types/helpers/formatter/responsive-map-formatter/responsiv-border-radius-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-border-radius-style-formatter.d.ts +26 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-css-text-formatter.d.ts +25 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-margin-style-formatter.d.ts +16 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-padding-formatter.d.ts +1 -0
- package/dist/types/helpers/formatter/responsive-map-formatter/responsive-padding-style-formatter.d.ts +16 -0
- package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-border-radius-style-formatter.test.d.ts +1 -0
- package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-margin-style-formatter.test.d.ts +1 -0
- package/dist/types/helpers/formatter/test/responsive-map-formatter/responsive-padding-style-formatter.test.d.ts +1 -0
- package/dist/types/types/ui.type.d.ts +6 -0
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-04ca73d5.entry.js +1 -0
- package/dist/vega/p-07d5ebac.entry.js +1 -0
- package/dist/vega/p-09c5de7f.entry.js +1 -0
- package/dist/vega/{p-1b860f90.js → p-0af4bda9.js} +1 -1
- package/dist/vega/p-0ceb92d7.entry.js +1 -0
- package/dist/vega/p-14f85e30.entry.js +1 -0
- package/dist/vega/p-1727b651.entry.js +1 -0
- package/dist/vega/p-1d01b5ab.entry.js +1 -0
- package/dist/vega/p-1d62d89d.js +1 -0
- package/dist/vega/p-1db0a7a1.entry.js +1 -0
- package/dist/vega/{p-bd0116f9.js → p-1f9a66e6.js} +1 -1
- package/dist/vega/p-24da2ffd.entry.js +1 -0
- package/dist/vega/p-25228e15.entry.js +1 -0
- package/dist/vega/p-29b09aad.js +1 -0
- package/dist/vega/p-2b8e9c64.entry.js +1 -0
- package/dist/vega/p-2f6890e8.entry.js +1 -0
- package/dist/vega/p-2f9f5995.entry.js +1 -0
- package/dist/vega/p-2fb4faf8.entry.js +1 -0
- package/dist/vega/p-30881e6c.entry.js +1 -0
- package/dist/vega/{p-6585bddc.entry.js → p-349480f8.entry.js} +1 -1
- package/dist/vega/p-36cb03ec.js +1 -0
- package/dist/vega/{p-ac608edc.js → p-39dfa61b.js} +1 -1
- package/dist/vega/p-45dd4698.entry.js +1 -0
- package/dist/vega/{p-c253d09c.js → p-45fccc2e.js} +1 -1
- package/dist/vega/p-499d9811.entry.js +1 -0
- package/dist/vega/{p-a190c86a.js → p-4b500240.js} +1 -1
- package/dist/vega/{p-666cd80f.js → p-53328c50.js} +1 -1
- package/dist/vega/p-54cb3c47.entry.js +1 -0
- package/dist/vega/p-5616294e.entry.js +1 -0
- package/dist/vega/p-5986c439.entry.js +1 -0
- package/dist/vega/p-5d7ea126.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-5f5af9e8.entry.js +1 -0
- package/dist/vega/{p-6e5db02b.js → p-601fbb96.js} +1 -1
- package/dist/vega/p-611eba55.entry.js +1 -0
- package/dist/vega/p-61d8636c.js +1 -0
- package/dist/vega/p-62cae5ef.entry.js +1 -0
- package/dist/vega/p-66d871d6.js +1 -0
- package/dist/vega/p-6868a09d.entry.js +1 -0
- package/dist/vega/p-6a3989dd.js +1 -0
- package/dist/vega/p-6e921ac2.js +1 -0
- package/dist/vega/p-71791731.entry.js +1 -0
- package/dist/vega/{p-60fb1db7.js → p-72eee5e2.js} +1 -1
- package/dist/vega/p-74b6ce44.entry.js +1 -0
- package/dist/vega/p-831fbe52.entry.js +1 -0
- package/dist/vega/p-83a06a40.entry.js +1 -0
- package/dist/vega/p-87ee1dab.entry.js +1 -0
- package/dist/vega/p-88b5fcc3.entry.js +1 -0
- package/dist/vega/p-8bc7e1a7.entry.js +1 -0
- package/dist/vega/p-8be34d8e.entry.js +1 -0
- package/dist/vega/p-8ce6e672.entry.js +1 -0
- package/dist/vega/{p-ff4bafa3.js → p-922bb790.js} +1 -1
- package/dist/vega/p-92f9b9b5.entry.js +1 -0
- package/dist/vega/p-93421a1a.entry.js +1 -0
- package/dist/vega/p-99b7257b.entry.js +1 -0
- package/dist/vega/p-a57fc4df.entry.js +1 -0
- package/dist/vega/p-a7fea3c8.entry.js +1 -0
- package/dist/vega/p-aa1a5f2d.entry.js +1 -0
- package/dist/vega/p-ab0c8cf7.entry.js +1 -0
- package/dist/vega/{p-b44f3309.js → p-aca02a0b.js} +1 -1
- package/dist/vega/p-ad2e8e08.entry.js +1 -0
- package/dist/vega/p-b0926d1c.entry.js +1 -0
- package/dist/vega/p-b1eb225c.entry.js +1 -0
- package/dist/vega/p-b5944e86.entry.js +1 -0
- package/dist/vega/p-b6d62c44.js +1 -0
- package/dist/vega/p-bbc4b90a.entry.js +1 -0
- package/dist/vega/p-c1a3e7f7.js +1 -0
- package/dist/vega/p-ca1fd7b2.js +1 -0
- package/dist/vega/p-cb8f8458.entry.js +1 -0
- package/dist/vega/p-cd1b4bd4.entry.js +1 -0
- package/dist/vega/p-cf1001e6.js +1 -0
- package/dist/vega/{p-e0446879.js → p-d8e95692.js} +1 -1
- package/dist/vega/p-da82e78c.entry.js +1 -0
- package/dist/vega/p-dd7ade28.js +1 -0
- package/dist/vega/{p-6408d3dc.entry.js → p-e43c18d4.entry.js} +1 -1
- package/dist/vega/{p-57669fd6.js → p-e8f540d8.js} +1 -1
- package/dist/vega/p-ebc73140.entry.js +1 -0
- package/dist/vega/p-ec2d3456.entry.js +1 -0
- package/dist/vega/p-edfedd8e.entry.js +1 -0
- package/dist/vega/p-f4a62fa7.entry.js +1 -0
- package/dist/vega/p-f50bd1d3.entry.js +1 -0
- package/dist/vega/p-f7d9c7d1.js +1 -0
- package/dist/vega/p-fdf812b0.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/breakpoints-17d6c4c7.js +0 -55
- package/dist/cjs/internal-vega-z-index-manager-f03ddb37.js +0 -180
- package/dist/cjs/observer-f49483e8.js +0 -32
- package/dist/cjs/vega-dialog-controller-fe610705.js +0 -81
- package/dist/esm/breakpoints-91116111.js +0 -52
- package/dist/esm/internal-vega-z-index-manager-7d2b54c3.js +0 -178
- package/dist/esm/observer-3959f9dd.js +0 -30
- package/dist/esm/vega-dialog-controller-34eb8967.js +0 -79
- package/dist/vega/p-04c72f30.entry.js +0 -1
- package/dist/vega/p-05f5e22b.entry.js +0 -1
- package/dist/vega/p-073beb31.entry.js +0 -1
- package/dist/vega/p-08bbc8e6.entry.js +0 -1
- package/dist/vega/p-0b6d4561.entry.js +0 -1
- package/dist/vega/p-0cc1ad76.js +0 -1
- package/dist/vega/p-113cd659.entry.js +0 -1
- package/dist/vega/p-149d2801.js +0 -1
- package/dist/vega/p-154d262e.entry.js +0 -1
- package/dist/vega/p-17598aac.entry.js +0 -1
- package/dist/vega/p-1d53d434.entry.js +0 -1
- package/dist/vega/p-1d5fbccc.entry.js +0 -1
- package/dist/vega/p-23130825.entry.js +0 -1
- package/dist/vega/p-239bae84.js +0 -1
- package/dist/vega/p-24ac5151.entry.js +0 -1
- package/dist/vega/p-2f39ea18.entry.js +0 -1
- package/dist/vega/p-3299c30b.entry.js +0 -1
- package/dist/vega/p-331a62d5.js +0 -1
- package/dist/vega/p-3fd9d39f.entry.js +0 -1
- package/dist/vega/p-4019a3ec.entry.js +0 -1
- package/dist/vega/p-42a949f5.entry.js +0 -1
- package/dist/vega/p-46359293.entry.js +0 -1
- package/dist/vega/p-4bcd6612.js +0 -1
- package/dist/vega/p-4bd1b877.entry.js +0 -1
- package/dist/vega/p-59b0f3c5.entry.js +0 -1
- package/dist/vega/p-5a7eabcc.js +0 -1
- package/dist/vega/p-5e56f3bd.js +0 -1
- package/dist/vega/p-5f589974.js +0 -1
- package/dist/vega/p-612c9374.entry.js +0 -1
- package/dist/vega/p-644d7300.entry.js +0 -1
- package/dist/vega/p-6603081a.entry.js +0 -1
- package/dist/vega/p-7303fff2.entry.js +0 -1
- package/dist/vega/p-76a8ccbb.js +0 -1
- package/dist/vega/p-781fd6e0.js +0 -1
- package/dist/vega/p-7b648a05.entry.js +0 -1
- package/dist/vega/p-7c37e5bb.js +0 -1
- package/dist/vega/p-7f2441d6.js +0 -1
- package/dist/vega/p-81b21503.entry.js +0 -1
- package/dist/vega/p-94459733.entry.js +0 -1
- package/dist/vega/p-9b7f9c27.entry.js +0 -1
- package/dist/vega/p-9cfae00d.entry.js +0 -1
- package/dist/vega/p-9d19c126.entry.js +0 -1
- package/dist/vega/p-a05ca459.entry.js +0 -1
- package/dist/vega/p-a247e23c.entry.js +0 -1
- package/dist/vega/p-a3e80fb2.entry.js +0 -1
- package/dist/vega/p-a7a46358.entry.js +0 -1
- package/dist/vega/p-a9e1123a.js +0 -1
- package/dist/vega/p-af7e6dfb.entry.js +0 -1
- package/dist/vega/p-b071be5c.entry.js +0 -1
- package/dist/vega/p-b24da503.entry.js +0 -1
- package/dist/vega/p-b7e52da9.entry.js +0 -1
- package/dist/vega/p-b7ebb9fa.entry.js +0 -1
- package/dist/vega/p-c1f7f37c.entry.js +0 -1
- package/dist/vega/p-c56acdd5.entry.js +0 -1
- package/dist/vega/p-cc8ec82c.entry.js +0 -1
- package/dist/vega/p-d1a06058.entry.js +0 -1
- package/dist/vega/p-d51b04ce.entry.js +0 -1
- package/dist/vega/p-d638f007.entry.js +0 -1
- package/dist/vega/p-d7219734.js +0 -1
- package/dist/vega/p-ddac683a.entry.js +0 -1
- package/dist/vega/p-e08b6542.entry.js +0 -1
- package/dist/vega/p-e0d3ca2d.js +0 -1
- package/dist/vega/p-e4ca75a7.entry.js +0 -1
- package/dist/vega/p-e4ce559d.entry.js +0 -1
- package/dist/vega/p-e6fdc69f.entry.js +0 -1
- package/dist/vega/p-e95668f3.entry.js +0 -1
- package/dist/vega/p-ebc062f6.entry.js +0 -1
- package/dist/vega/p-ec4de3ec.js +0 -1
- package/dist/vega/p-f1ebe86b.entry.js +0 -1
- package/dist/vega/p-fda6c178.entry.js +0 -1
- package/dist/vega/p-ffac4b8c.entry.js +0 -1
|
@@ -14,6 +14,7 @@ import responsiveFormatFacade from '../../helpers/formatter/responsive-map-forma
|
|
|
14
14
|
import { PageResizeObserverSlimmer } from '../../helpers/slimmers/page-resize-observer-slimmer';
|
|
15
15
|
import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics';
|
|
16
16
|
import { formatFlexStyles } from '../../helpers/formatter/style-formatter';
|
|
17
|
+
import { VegaBoxResponsiveStyleController } from './slimmers/controllers/vega-box-responsive-style-controller';
|
|
17
18
|
/**
|
|
18
19
|
* @vegaVersion 1.27.0
|
|
19
20
|
*/
|
|
@@ -23,6 +24,13 @@ export class VegaBox {
|
|
|
23
24
|
this.pageResizeSlimmer = new PageResizeObserverSlimmer();
|
|
24
25
|
this.stateStyleController = new VegaBoxStateStylesController();
|
|
25
26
|
this.vegaComponentUsageRuntimeMetricsSlimmer = new VegaComponentUsageRuntimeMetricsSlimmer();
|
|
27
|
+
this.responsiveStyleController = new VegaBoxResponsiveStyleController();
|
|
28
|
+
}
|
|
29
|
+
watchPaddingChange() {
|
|
30
|
+
methodPlaceholder();
|
|
31
|
+
}
|
|
32
|
+
watchMarginChange() {
|
|
33
|
+
methodPlaceholder();
|
|
26
34
|
}
|
|
27
35
|
watchBorder() {
|
|
28
36
|
methodPlaceholder();
|
|
@@ -36,6 +44,9 @@ export class VegaBox {
|
|
|
36
44
|
watchBackgroundColor() {
|
|
37
45
|
methodPlaceholder();
|
|
38
46
|
}
|
|
47
|
+
watchCornersChange() {
|
|
48
|
+
methodPlaceholder();
|
|
49
|
+
}
|
|
39
50
|
render() {
|
|
40
51
|
const hostClasses = [
|
|
41
52
|
formatAndValidResponsiveToken(this.padding, 'padding'),
|
|
@@ -801,6 +812,12 @@ export class VegaBox {
|
|
|
801
812
|
}; }
|
|
802
813
|
static get elementRef() { return "host"; }
|
|
803
814
|
static get watchers() { return [{
|
|
815
|
+
"propName": "padding",
|
|
816
|
+
"methodName": "watchPaddingChange"
|
|
817
|
+
}, {
|
|
818
|
+
"propName": "margin",
|
|
819
|
+
"methodName": "watchMarginChange"
|
|
820
|
+
}, {
|
|
804
821
|
"propName": "border",
|
|
805
822
|
"methodName": "watchBorder"
|
|
806
823
|
}, {
|
|
@@ -812,6 +829,9 @@ export class VegaBox {
|
|
|
812
829
|
}, {
|
|
813
830
|
"propName": "backgroundColor",
|
|
814
831
|
"methodName": "watchBackgroundColor"
|
|
832
|
+
}, {
|
|
833
|
+
"propName": "corners",
|
|
834
|
+
"methodName": "watchCornersChange"
|
|
815
835
|
}]; }
|
|
816
836
|
}
|
|
817
837
|
__decorate([
|
|
@@ -826,3 +846,6 @@ __decorate([
|
|
|
826
846
|
__decorate([
|
|
827
847
|
InjectVegaSlimmer()
|
|
828
848
|
], VegaBox.prototype, "vegaComponentUsageRuntimeMetricsSlimmer", void 0);
|
|
849
|
+
__decorate([
|
|
850
|
+
InjectVegaSlimmer()
|
|
851
|
+
], VegaBox.prototype, "responsiveStyleController", void 0);
|
|
@@ -72,8 +72,8 @@ export class VegaDialog {
|
|
|
72
72
|
const isSmallScreen = ['default', 'S'].includes(this.currentBreakpoint);
|
|
73
73
|
const actionButtonSize = { default: 'default', M: 'small' };
|
|
74
74
|
const isDanger = this.type === 'danger';
|
|
75
|
-
const mergedOkButtonProps = Object.assign(Object.assign({ size: actionButtonSize }, this.okButton), { block: isSmallScreen
|
|
76
|
-
const mergedCancelButtonProps = Object.assign(Object.assign({ size: actionButtonSize, variant: 'secondary' }, this.cancelButton), { block: isSmallScreen
|
|
75
|
+
const mergedOkButtonProps = Object.assign(Object.assign({ size: actionButtonSize, danger: isDanger }, this.okButton), { block: isSmallScreen });
|
|
76
|
+
const mergedCancelButtonProps = Object.assign(Object.assign({ size: actionButtonSize, variant: 'secondary', danger: isDanger }, this.cancelButton), { block: isSmallScreen });
|
|
77
77
|
const mergedModalProps = Object.assign(Object.assign({}, this.modalProps), { isVerticallyCentered: this.modalProps.isVerticallyCentered !== undefined ||
|
|
78
78
|
this.modalProps.isVerticallyCenter !== undefined
|
|
79
79
|
? this.modalProps.isVerticallyCentered || this.modalProps.isVerticallyCenter
|
|
@@ -176,7 +176,7 @@ export class VegaDialog {
|
|
|
176
176
|
"mutable": false,
|
|
177
177
|
"complexType": {
|
|
178
178
|
"original": "VegaDialogActionButtonProps",
|
|
179
|
-
"resolved": "{ size?: ResponsiveType<VegaButtonSize>; icon?: string; label?: string; variant?: VegaButtonVariant; iconAlign?: VegaButtonIconAlign; disabled?: boolean; }",
|
|
179
|
+
"resolved": "{ size?: ResponsiveType<VegaButtonSize>; icon?: string; label?: string; danger?: boolean; variant?: VegaButtonVariant; iconAlign?: VegaButtonIconAlign; disabled?: boolean; }",
|
|
180
180
|
"references": {
|
|
181
181
|
"VegaDialogActionButtonProps": {
|
|
182
182
|
"location": "import",
|
|
@@ -222,7 +222,7 @@ export class VegaDialog {
|
|
|
222
222
|
"mutable": false,
|
|
223
223
|
"complexType": {
|
|
224
224
|
"original": "VegaDialogActionButtonProps",
|
|
225
|
-
"resolved": "{ size?: ResponsiveType<VegaButtonSize>; icon?: string; label?: string; variant?: VegaButtonVariant; iconAlign?: VegaButtonIconAlign; disabled?: boolean; }",
|
|
225
|
+
"resolved": "{ size?: ResponsiveType<VegaButtonSize>; icon?: string; label?: string; danger?: boolean; variant?: VegaButtonVariant; iconAlign?: VegaButtonIconAlign; disabled?: boolean; }",
|
|
226
226
|
"references": {
|
|
227
227
|
"VegaDialogActionButtonProps": {
|
|
228
228
|
"location": "import",
|
|
@@ -40,19 +40,19 @@ export class VegaVirtualScrollScrollableController extends VegaSlimmer {
|
|
|
40
40
|
* watchSourceChange
|
|
41
41
|
*/
|
|
42
42
|
watchSourceChange() {
|
|
43
|
-
this.
|
|
43
|
+
this.adjustScrollTopInVirtualMode();
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* watchApproxItemHeight
|
|
47
47
|
*/
|
|
48
48
|
watchApproxItemHeight() {
|
|
49
|
-
this.
|
|
49
|
+
this.adjustScrollTopInVirtualMode();
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* watchViewportMaxHeight
|
|
53
53
|
*/
|
|
54
54
|
watchViewportMaxHeight() {
|
|
55
|
-
this.
|
|
55
|
+
this.adjustScrollTopInVirtualMode();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* The scrollToIndex function scrolls to a specific index within a container element either by
|
|
@@ -104,7 +104,9 @@ export class VegaVirtualScrollScrollableController extends VegaSlimmer {
|
|
|
104
104
|
* The function adjusts the scroll top position based on certain properties to ensure it stays within
|
|
105
105
|
* valid bounds.
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
adjustScrollTopInVirtualMode() {
|
|
108
|
+
if (this.modeController.getMode() === 'normal')
|
|
109
|
+
return;
|
|
108
110
|
this.scrollTop = Math.min((this.source.length - Math.floor(this.viewportMaxHeight / this.approxItemHeight)) *
|
|
109
111
|
this.approxItemHeight, this.scrollTop);
|
|
110
112
|
}
|
|
@@ -139,8 +141,9 @@ export class VegaVirtualScrollScrollableController extends VegaSlimmer {
|
|
|
139
141
|
* being equal to `this.viewportMaxHeight`.
|
|
140
142
|
*/
|
|
141
143
|
isScrollToBottomInNormalMode() {
|
|
144
|
+
const containerRef = this.renderer.getContainerRef();
|
|
142
145
|
return (this.modeController.getMode() === 'normal' &&
|
|
143
|
-
|
|
146
|
+
containerRef.scrollHeight - this.scrollTop >= this.viewportMaxHeight);
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
__decorate([
|
|
@@ -52,6 +52,7 @@ describe('vegaDialogController', () => {
|
|
|
52
52
|
size: 480,
|
|
53
53
|
isVerticallyCentered: false,
|
|
54
54
|
showCloseButton: true,
|
|
55
|
+
handleClose: jest.fn(),
|
|
55
56
|
});
|
|
56
57
|
const element = document.querySelector('vega-dialog');
|
|
57
58
|
expect(document.body).toEqualHtml(`<vega-dialog id="vega-dialog-TEST_UUID"></vega-dialog>`);
|
|
@@ -63,7 +64,12 @@ describe('vegaDialogController', () => {
|
|
|
63
64
|
expect(element.cancelButton).toEqual({ label: 'No' });
|
|
64
65
|
expect(typeof element.handleCancel === 'function').toEqual(true);
|
|
65
66
|
expect(element.showCancel).toEqual(true);
|
|
66
|
-
expect(element.modalProps).toEqual({
|
|
67
|
+
expect(element.modalProps).toEqual({
|
|
68
|
+
size: 480,
|
|
69
|
+
isVerticallyCentered: false,
|
|
70
|
+
showCloseButton: true,
|
|
71
|
+
handleClose: expect.any(Function),
|
|
72
|
+
});
|
|
67
73
|
});
|
|
68
74
|
it('should call the emit method of VegaTelemetryRuntimeMetricsManager when call load', () => {
|
|
69
75
|
jest.spyOn(VegaTelemetryRuntimeMetricsManager, 'emit');
|
|
@@ -93,4 +99,16 @@ describe('vegaDialogController', () => {
|
|
|
93
99
|
});
|
|
94
100
|
});
|
|
95
101
|
});
|
|
102
|
+
it('should render a dialog with danger ok button', async () => {
|
|
103
|
+
VegaDialog.open({
|
|
104
|
+
title: 'Dialog Title',
|
|
105
|
+
content: 'Dialog Content',
|
|
106
|
+
okButton: { label: 'Yes', danger: true },
|
|
107
|
+
cancelButton: { label: 'No', danger: false },
|
|
108
|
+
});
|
|
109
|
+
const element = document.querySelector('vega-dialog');
|
|
110
|
+
expect(document.body).toEqualHtml(`<vega-dialog id="vega-dialog-TEST_UUID"></vega-dialog>`);
|
|
111
|
+
expect(element.okButton).toEqual({ label: 'Yes', danger: true });
|
|
112
|
+
expect(element.cancelButton).toEqual({ label: 'No', danger: false });
|
|
113
|
+
});
|
|
96
114
|
});
|
|
@@ -36,10 +36,10 @@ class VegaDialogController {
|
|
|
36
36
|
*/
|
|
37
37
|
open(options) {
|
|
38
38
|
const dialog = document.createElement('vega-dialog');
|
|
39
|
-
const { isVerticallyCenter, isVerticallyCentered, showCloseButton, size, title } = options, dialogProps = __rest(options, ["isVerticallyCenter", "isVerticallyCentered", "showCloseButton", "size", "title"]);
|
|
39
|
+
const { isVerticallyCenter, isVerticallyCentered, showCloseButton, size, title, handleClose } = options, dialogProps = __rest(options, ["isVerticallyCenter", "isVerticallyCentered", "showCloseButton", "size", "title", "handleClose"]);
|
|
40
40
|
dialog.id = `vega-dialog-${generateUUID()}`;
|
|
41
41
|
dialog.dialogTitle = title;
|
|
42
|
-
dialog.modalProps = { isVerticallyCenter, isVerticallyCentered, showCloseButton, size };
|
|
42
|
+
dialog.modalProps = { isVerticallyCenter, isVerticallyCentered, showCloseButton, size, handleClose };
|
|
43
43
|
Object.keys(dialogProps).forEach((propName) => {
|
|
44
44
|
if (dialogProps[propName] !== undefined) {
|
|
45
45
|
dialog[propName] = dialogProps[propName];
|
|
@@ -191,5 +191,11 @@ const FeatureFlagsMap = {
|
|
|
191
191
|
createdAtVersion: '2.32.0',
|
|
192
192
|
disabledByDefault: false,
|
|
193
193
|
},
|
|
194
|
+
'VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR': {
|
|
195
|
+
description: `Feature flag that the component corners style weights are sorted according to the [0, 9999, 2, 4, 8, ..., 48]`,
|
|
196
|
+
createdTimestamp: 1744772429681,
|
|
197
|
+
createdAtVersion: '2.41.0',
|
|
198
|
+
disabledByDefault: true,
|
|
199
|
+
},
|
|
194
200
|
};
|
|
195
201
|
export default Object.freeze(FeatureFlagsMap);
|
|
@@ -15,6 +15,7 @@ const BORDER_RADIUS_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
15
15
|
/**
|
|
16
16
|
* A class for format BorderRadiusType with BreakpointsForPrefixType to CSS class string
|
|
17
17
|
*
|
|
18
|
+
* @deprecated Please use the `ResponsiveBorderRadiusStyleStyleFormatter` instead.
|
|
18
19
|
* @augments ResponsiveClassStringFormatter
|
|
19
20
|
*/
|
|
20
21
|
class ResponsiveBorderRadiusFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { isBorderRadiusTokenType, isDirectionalBorderRadiusType } from '../../../types/type-guard';
|
|
2
|
+
import { LogUtility } from '../../../utils/log';
|
|
3
|
+
import { BorderRadius } from '../../../constants/public-api';
|
|
4
|
+
import { ResponsiveCSSTextFormatter } from './responsive-css-text-formatter';
|
|
5
|
+
import { sortAsExistArray } from '../../../utils/array';
|
|
6
|
+
import { FeatureFlag } from '../../public-api';
|
|
7
|
+
const BORDER_RADIUS_DIRECTION_STYLE_MAP = {
|
|
8
|
+
'top': ['border-top-left-radius', 'border-top-right-radius'],
|
|
9
|
+
'right': ['border-top-right-radius', 'border-bottom-right-radius'],
|
|
10
|
+
'bottom': ['border-bottom-left-radius', 'border-bottom-right-radius'],
|
|
11
|
+
'left': ['border-top-left-radius', 'border-bottom-left-radius'],
|
|
12
|
+
'top-left': ['border-top-left-radius'],
|
|
13
|
+
'top-right': ['border-top-right-radius'],
|
|
14
|
+
'bottom-left': ['border-bottom-left-radius'],
|
|
15
|
+
'bottom-right': ['border-bottom-right-radius'],
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* A class for format BorderRadiusType with BreakpointsForPrefixType to CSS text string
|
|
19
|
+
*
|
|
20
|
+
* @augments ResponsiveClassStringFormatter
|
|
21
|
+
*/
|
|
22
|
+
class ResponsiveBorderRadiusStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
23
|
+
/**
|
|
24
|
+
* Given a border-radius type, return a string of CSS classes that can be used to apply the border-radius to an element
|
|
25
|
+
*
|
|
26
|
+
* @param {CornersType} input - CornersType
|
|
27
|
+
* @returns {string} - A string of CSS text.
|
|
28
|
+
*/
|
|
29
|
+
formatToken(input) {
|
|
30
|
+
if (isBorderRadiusTokenType(input)) {
|
|
31
|
+
return `border-radius:${BorderRadius[input]}px`;
|
|
32
|
+
}
|
|
33
|
+
else if (isDirectionalBorderRadiusType(input)) {
|
|
34
|
+
return this.getDirectionKeys(input)
|
|
35
|
+
.map((direction) => {
|
|
36
|
+
return BORDER_RADIUS_DIRECTION_STYLE_MAP[direction]
|
|
37
|
+
.map((item) => {
|
|
38
|
+
return `${item}:${BorderRadius[input[direction]]}px`;
|
|
39
|
+
})
|
|
40
|
+
.join(';');
|
|
41
|
+
})
|
|
42
|
+
.join(';');
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
LogUtility.warn(`The border radius value ${input} is invalid, it must be a value of: `, BorderRadius);
|
|
46
|
+
return '';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get the corners object keys. Order the keys as exist array if the feature flag enabled.
|
|
51
|
+
* The order affects the weight of the styles.
|
|
52
|
+
*
|
|
53
|
+
* @param {DirectionalBorderRadiusType} map - The corners input object.
|
|
54
|
+
* @returns {string[]} - The input object keys.
|
|
55
|
+
*/
|
|
56
|
+
getDirectionKeys(map) {
|
|
57
|
+
const directionKeys = Object.keys(map);
|
|
58
|
+
return FeatureFlag.isEnabled('VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR')
|
|
59
|
+
? sortAsExistArray(directionKeys, (direction) => map[direction], undefined, Object.keys(BorderRadius))
|
|
60
|
+
: directionKeys;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
export default new ResponsiveBorderRadiusStyleFormatter();
|
package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-css-text-formatter.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { isResponsiveType } from '../../../types/type-guard';
|
|
2
|
+
import { Breakpoints } from '../../../constants/public-api';
|
|
3
|
+
/**
|
|
4
|
+
* Get the style text from the responsive property.
|
|
5
|
+
*/
|
|
6
|
+
export class ResponsiveCSSTextFormatter {
|
|
7
|
+
/**
|
|
8
|
+
* > It takes a `ResponsiveType<ManagedResponsiveScopeInput[Flag]>` and returns a string
|
|
9
|
+
*
|
|
10
|
+
* @typedef Flag key of ManagedResponsiveScopeInput
|
|
11
|
+
* @param {ResponsiveType<ManagedResponsiveScopeInput[Flag]>} input - ManagedResponsiveScopeInput[Flag]
|
|
12
|
+
* @returns {string} - CSS text string.
|
|
13
|
+
*/
|
|
14
|
+
format(input) {
|
|
15
|
+
if (isResponsiveType(input)) {
|
|
16
|
+
return Object.keys(input)
|
|
17
|
+
.map((breakpoint) => {
|
|
18
|
+
const breakpointValue = input[breakpoint];
|
|
19
|
+
const breakPointFormatted = breakpoint !== 'default' ? breakpoint : undefined;
|
|
20
|
+
return this.generateCssText(this.formatToken(breakpointValue, breakPointFormatted), breakpoint);
|
|
21
|
+
})
|
|
22
|
+
.join(' ');
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return this.generateCssText(this.formatToken(input));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create the complete style text with media query selector.
|
|
30
|
+
*
|
|
31
|
+
* @param {string} cssText - The style snippet.
|
|
32
|
+
* @param {BreakpointsTokenType} breakpoint - The screen breakpoint.
|
|
33
|
+
* @returns {string} - Style content with css selector.
|
|
34
|
+
*/
|
|
35
|
+
generateCssText(cssText, breakpoint) {
|
|
36
|
+
let result = '';
|
|
37
|
+
if (cssText) {
|
|
38
|
+
result =
|
|
39
|
+
breakpoint && breakpoint !== 'default'
|
|
40
|
+
? `@media (min-width:${Breakpoints[breakpoint]}px){:host{${cssText}}}`
|
|
41
|
+
: `:host{${cssText}}`;
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
}
|
package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-format-facade.js
CHANGED
|
@@ -15,6 +15,9 @@ import ResponsiveBoxDisplayFormatter from './responsive-box-display-formatter';
|
|
|
15
15
|
import ResponsiveWidthAndHeightFormatter from './responsive-width-and-height-formatter';
|
|
16
16
|
import ResponsiveBorderRadiusFormatter from './responsiv-border-radius-formatter';
|
|
17
17
|
import ResponsiveTextAlignFormatter from './responsive-text-align-formatter';
|
|
18
|
+
import responsivePaddingStyleFormatter from './responsive-padding-style-formatter';
|
|
19
|
+
import responsiveMarginStyleFormatter from './responsive-margin-style-formatter';
|
|
20
|
+
import responsiveBorderRadiusStyleFormatter from './responsive-border-radius-style-formatter';
|
|
18
21
|
/**
|
|
19
22
|
* A facade class for delegating format input with different responsive formatters given the flag:
|
|
20
23
|
*
|
|
@@ -67,6 +70,12 @@ class ResponsiveFormatFacade {
|
|
|
67
70
|
return ResponsiveBorderRadiusFormatter.format(input);
|
|
68
71
|
case 'textAlign':
|
|
69
72
|
return ResponsiveTextAlignFormatter.format(input);
|
|
73
|
+
case 'paddingStyle':
|
|
74
|
+
return responsivePaddingStyleFormatter.format(input);
|
|
75
|
+
case 'marginStyle':
|
|
76
|
+
return responsiveMarginStyleFormatter.format(input);
|
|
77
|
+
case 'cornersStyle':
|
|
78
|
+
return responsiveBorderRadiusStyleFormatter.format(input);
|
|
70
79
|
default:
|
|
71
80
|
throw new Error(`Invalid flag ${flag} passed into ResponsiveFormatFacade`);
|
|
72
81
|
}
|
package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-margin-formatter.js
CHANGED
|
@@ -13,6 +13,7 @@ const MARGIN_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
13
13
|
/**
|
|
14
14
|
* A class for format MarginType with BreakpointsForPrefixType to CSS class string
|
|
15
15
|
*
|
|
16
|
+
* @deprecated Please use the `ResponsiveMarginStyleFormatter` instead.
|
|
16
17
|
* @augments ResponsiveClassStringFormatter
|
|
17
18
|
*/
|
|
18
19
|
class ResponsiveMarginFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isSpacingTokenType, isDirectionalSpacingType } from '../../../types/type-guard';
|
|
2
|
+
import { LogUtility } from '../../../utils/log';
|
|
3
|
+
import { Spacing } from '../../../constants/tokens/spacing';
|
|
4
|
+
import { ResponsiveCSSTextFormatter } from './responsive-css-text-formatter';
|
|
5
|
+
const MARGIN_DIRECTION_STYLE_MAP = {
|
|
6
|
+
top: ['margin-top'],
|
|
7
|
+
bottom: ['margin-bottom'],
|
|
8
|
+
left: ['margin-left'],
|
|
9
|
+
right: ['margin-right'],
|
|
10
|
+
x: ['margin-left', 'margin-right'],
|
|
11
|
+
y: ['margin-top', 'margin-bottom'],
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Get the padding style content.
|
|
15
|
+
*/
|
|
16
|
+
class ResponsiveMarginStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
17
|
+
/**
|
|
18
|
+
* Given a margin type, return a string of style content that can be used to apply the margin to an element
|
|
19
|
+
*
|
|
20
|
+
* @param {MarginType} input - MarginType
|
|
21
|
+
* @returns {string} - A string of style content.
|
|
22
|
+
*/
|
|
23
|
+
formatToken(input) {
|
|
24
|
+
if (isSpacingTokenType(input)) {
|
|
25
|
+
return `margin:${Spacing[input]}px`;
|
|
26
|
+
}
|
|
27
|
+
else if (isDirectionalSpacingType(input)) {
|
|
28
|
+
return Object.keys(input)
|
|
29
|
+
.map((direction) => {
|
|
30
|
+
return MARGIN_DIRECTION_STYLE_MAP[direction]
|
|
31
|
+
.map((item) => {
|
|
32
|
+
return `${item}:${Spacing[input[direction]]}px`;
|
|
33
|
+
})
|
|
34
|
+
.join(';');
|
|
35
|
+
})
|
|
36
|
+
.join(';');
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
LogUtility.warn(`The margin value ${input} is invalid, it must be a value of: `, Spacing);
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default new ResponsiveMarginStyleFormatter();
|
package/dist/collection/helpers/formatter/responsive-map-formatter/responsive-padding-formatter.js
CHANGED
|
@@ -13,6 +13,7 @@ const PADDING_DIRECTION_CLASS_PARTIAL_MAP = {
|
|
|
13
13
|
/**
|
|
14
14
|
* A class for format PaddingType with BreakpointsForPrefixType to CSS class string
|
|
15
15
|
*
|
|
16
|
+
* @deprecated Please use the `ResponsivePaddingStyleFormatter` instead.
|
|
16
17
|
* @augments ResponsiveClassStringFormatter
|
|
17
18
|
*/
|
|
18
19
|
class ResponsivePaddingFormatter extends ResponsiveClassStringFormatter {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isSpacingTokenType, isDirectionalSpacingType } from '../../../types/type-guard';
|
|
2
|
+
import { LogUtility } from '../../../utils/log';
|
|
3
|
+
import { Spacing } from '../../../constants/tokens/spacing';
|
|
4
|
+
import { ResponsiveCSSTextFormatter } from './responsive-css-text-formatter';
|
|
5
|
+
const PADDING_DIRECTION_STYLE_MAP = {
|
|
6
|
+
top: ['padding-top'],
|
|
7
|
+
bottom: ['padding-bottom'],
|
|
8
|
+
left: ['padding-left'],
|
|
9
|
+
right: ['padding-right'],
|
|
10
|
+
x: ['padding-left', 'padding-right'],
|
|
11
|
+
y: ['padding-top', 'padding-bottom'],
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Get the padding style content.
|
|
15
|
+
*/
|
|
16
|
+
class ResponsivePaddingStyleFormatter extends ResponsiveCSSTextFormatter {
|
|
17
|
+
/**
|
|
18
|
+
* Given a padding type, return the corresponding string of CSS text.
|
|
19
|
+
*
|
|
20
|
+
* @param {PaddingType} input - PaddingType
|
|
21
|
+
* @returns {string} - CSS text.
|
|
22
|
+
*/
|
|
23
|
+
formatToken(input) {
|
|
24
|
+
if (isSpacingTokenType(input)) {
|
|
25
|
+
return `padding:${Spacing[input]}px`;
|
|
26
|
+
}
|
|
27
|
+
else if (isDirectionalSpacingType(input)) {
|
|
28
|
+
return Object.keys(input)
|
|
29
|
+
.map((direction) => {
|
|
30
|
+
return PADDING_DIRECTION_STYLE_MAP[direction]
|
|
31
|
+
.map((item) => {
|
|
32
|
+
return `${item}:${Spacing[input[direction]]}px`;
|
|
33
|
+
})
|
|
34
|
+
.join(';');
|
|
35
|
+
})
|
|
36
|
+
.join(';');
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
LogUtility.warn(`The padding value ${input} is invalid, it must be a value of: `, Spacing);
|
|
40
|
+
return '';
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export default new ResponsivePaddingStyleFormatter();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { LogUtility } from '../../../../utils/log';
|
|
2
|
+
import { FeatureFlag } from '../../../public-api';
|
|
3
|
+
import ResponsiveCornersStyleFormatter from '../../responsive-map-formatter/responsive-border-radius-style-formatter';
|
|
4
|
+
test('should console warn when input not in scope', () => {
|
|
5
|
+
spyOn(LogUtility, 'warn');
|
|
6
|
+
ResponsiveCornersStyleFormatter.formatToken('24');
|
|
7
|
+
expect(LogUtility.warn).toHaveBeenCalled();
|
|
8
|
+
});
|
|
9
|
+
test('should return format when input in spacing scope', () => {
|
|
10
|
+
const result = ResponsiveCornersStyleFormatter.formatToken('rounded-24');
|
|
11
|
+
expect(result).toEqual('border-radius:24px');
|
|
12
|
+
});
|
|
13
|
+
test('should return format when input in directional type', () => {
|
|
14
|
+
const result = ResponsiveCornersStyleFormatter.formatToken({
|
|
15
|
+
top: 'rounded-12',
|
|
16
|
+
bottom: 'rounded-16',
|
|
17
|
+
left: 'rounded-full',
|
|
18
|
+
right: 'rounded-none',
|
|
19
|
+
});
|
|
20
|
+
expect(result).toEqual('border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:0px;border-bottom-right-radius:0px');
|
|
21
|
+
});
|
|
22
|
+
test('should return format when input in directional type and enable feature flag', () => {
|
|
23
|
+
FeatureFlag.enable('VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR');
|
|
24
|
+
const result = ResponsiveCornersStyleFormatter.formatToken({
|
|
25
|
+
top: 'rounded-12',
|
|
26
|
+
bottom: 'rounded-16',
|
|
27
|
+
left: 'rounded-full',
|
|
28
|
+
right: 'rounded-none',
|
|
29
|
+
});
|
|
30
|
+
expect(result).toEqual('border-top-right-radius:0px;border-bottom-right-radius:0px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-left-radius:12px;border-top-right-radius:12px;border-bottom-left-radius:16px;border-bottom-right-radius:16px');
|
|
31
|
+
FeatureFlag.disable('VEGA_COMPONENT.CORNERS_USE_OLD_BEHAVIOR');
|
|
32
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LogUtility } from '../../../../utils/log';
|
|
2
|
+
import ResponsiveMarginStyleFormatter from '../../responsive-map-formatter/responsive-margin-style-formatter';
|
|
3
|
+
test('should console warn when input not in scope', () => {
|
|
4
|
+
spyOn(LogUtility, 'warn');
|
|
5
|
+
ResponsiveMarginStyleFormatter.formatToken('24');
|
|
6
|
+
expect(LogUtility.warn).toHaveBeenCalled();
|
|
7
|
+
});
|
|
8
|
+
test('should return format when input in spacing scope', () => {
|
|
9
|
+
const result = ResponsiveMarginStyleFormatter.formatToken('size-24');
|
|
10
|
+
expect(result).toEqual('margin:24px');
|
|
11
|
+
});
|
|
12
|
+
test('should return format when input is directional type', () => {
|
|
13
|
+
const result = ResponsiveMarginStyleFormatter.formatToken({
|
|
14
|
+
top: 'size-12',
|
|
15
|
+
x: 'size-24',
|
|
16
|
+
bottom: 'size-8',
|
|
17
|
+
});
|
|
18
|
+
expect(result).toEqual('margin-top:12px;margin-left:24px;margin-right:24px;margin-bottom:8px');
|
|
19
|
+
});
|
|
20
|
+
test('should return format when input is responsive type', () => {
|
|
21
|
+
expect(ResponsiveMarginStyleFormatter.format('0')).toEqual(':host{margin:0px}');
|
|
22
|
+
const result = ResponsiveMarginStyleFormatter.format({
|
|
23
|
+
default: 'size-8',
|
|
24
|
+
S: 'size-12',
|
|
25
|
+
M: { top: 'size-12', x: 'size-24', bottom: 'size-8' },
|
|
26
|
+
});
|
|
27
|
+
expect(result).toEqual(':host{margin:8px} @media (min-width:320px){:host{margin:12px}} @media (min-width:768px){:host{margin-top:12px;margin-left:24px;margin-right:24px;margin-bottom:8px}}');
|
|
28
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LogUtility } from '../../../../utils/log';
|
|
2
|
+
import ResponsivePaddingStyleFormatter from '../../responsive-map-formatter/responsive-padding-style-formatter';
|
|
3
|
+
test('should console warn when input not in scope', () => {
|
|
4
|
+
spyOn(LogUtility, 'warn');
|
|
5
|
+
ResponsivePaddingStyleFormatter.formatToken('24');
|
|
6
|
+
expect(LogUtility.warn).toHaveBeenCalled();
|
|
7
|
+
});
|
|
8
|
+
test('should return format when input in spacing scope', () => {
|
|
9
|
+
const result = ResponsivePaddingStyleFormatter.formatToken('size-24');
|
|
10
|
+
expect(result).toEqual('padding:24px');
|
|
11
|
+
});
|
|
12
|
+
test('should return format when input is directional type', () => {
|
|
13
|
+
const result = ResponsivePaddingStyleFormatter.formatToken({
|
|
14
|
+
top: 'size-12',
|
|
15
|
+
x: 'size-24',
|
|
16
|
+
bottom: 'size-8',
|
|
17
|
+
});
|
|
18
|
+
expect(result).toEqual('padding-top:12px;padding-left:24px;padding-right:24px;padding-bottom:8px');
|
|
19
|
+
});
|
|
20
|
+
test('should return format when input is responsive type', () => {
|
|
21
|
+
expect(ResponsivePaddingStyleFormatter.format('0')).toEqual(':host{padding:0px}');
|
|
22
|
+
const result = ResponsivePaddingStyleFormatter.format({
|
|
23
|
+
default: 'size-8',
|
|
24
|
+
S: 'size-12',
|
|
25
|
+
M: { top: 'size-12', x: 'size-24', bottom: 'size-8' },
|
|
26
|
+
});
|
|
27
|
+
expect(result).toEqual(':host{padding:8px} @media (min-width:320px){:host{padding:12px}} @media (min-width:768px){:host{padding-top:12px;padding-left:24px;padding-right:24px;padding-bottom:8px}}');
|
|
28
|
+
});
|
|
@@ -85,7 +85,7 @@ export class ElementAppenderSlimmer extends VegaSlimmer {
|
|
|
85
85
|
if (this.shouldListenerWork('custom') &&
|
|
86
86
|
this.isShowing() &&
|
|
87
87
|
this.showConfig &&
|
|
88
|
-
!
|
|
88
|
+
!findParent(currentTarget, '.vega-element-appender-appendable') &&
|
|
89
89
|
!isParent(currentTarget, this.showConfig.target) &&
|
|
90
90
|
findParent(currentTarget, 'vega-modal') === findParent(this.showConfig.target, 'vega-modal')) {
|
|
91
91
|
this.hide();
|
|
@@ -212,6 +212,7 @@ export class ElementAppender {
|
|
|
212
212
|
if (!this.showConfig.isScreenPosition) {
|
|
213
213
|
this.initVisibleAppendElement();
|
|
214
214
|
}
|
|
215
|
+
this.showConfig.appendableElement.classList.add('vega-element-appender-appendable');
|
|
215
216
|
this.showConfig.appendableElement.style.boxSizing = 'border-box';
|
|
216
217
|
this.positionCalculationController.setCalculationStrategy();
|
|
217
218
|
}
|