@globalpayments/vega 2.46.0 → 2.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-7f00a8e5.js → app-globals-fdf98585.js} +19 -10
- package/dist/cjs/brand-switch-state-controller-slimmer-5efa1b24.js +51 -0
- package/dist/cjs/{child-nodes-event-prevent-slimmer-61f9c022.js → child-nodes-event-prevent-slimmer-37870b2e.js} +1 -1
- package/dist/cjs/{child-nodes-notify-observer-slimmer-3c7f4074.js → child-nodes-notify-observer-slimmer-5817a53b.js} +2 -2
- package/dist/cjs/{content-state-0ee9ced5.js → content-state-b1ec39e3.js} +4 -3023
- package/dist/cjs/dark-mode-state-controller-slimmer-add5d8a8.js +51 -0
- package/dist/cjs/dark-mode-style-controller-4adb7fb2.js +3470 -0
- package/dist/cjs/{design-token-ff558841.js → design-token-0c22ffa8.js} +1 -1
- package/dist/cjs/{dom-node-subject-factory-ab72ad1e.js → dom-node-subject-factory-d5826bff.js} +0 -30
- package/dist/cjs/{dom-node-subject-observer-factory-fee69743.js → dom-node-subject-observer-factory-a7a3b196.js} +3 -2
- package/dist/cjs/{element-appender-slimmer-9ef6cf74.js → element-appender-slimmer-b3109dd1.js} +8 -7
- package/dist/cjs/{event-emit-slimmer-739c6ae2.js → event-emit-slimmer-8247249c.js} +11 -3
- package/dist/cjs/{form-field-controller-slimmer-dc80ef32.js → form-field-controller-slimmer-2432e295.js} +88 -30
- package/dist/cjs/{image-annotation-action-3556655b.js → image-annotation-action-becd6f24.js} +6 -5
- package/dist/cjs/index-09acd3c9.js +4 -0
- package/dist/cjs/{index-3b33064d.js → index-ec9a1f36.js} +6 -5
- package/dist/cjs/index.cjs.js +22 -20
- package/dist/cjs/{internal-vega-event-manager-6b50f11d.js → internal-vega-event-manager-c9948b59.js} +1 -1
- package/dist/cjs/loader.cjs.js +16 -14
- package/dist/cjs/observer-f49483e8.js +32 -0
- package/dist/cjs/{public-rules-26da3a16.js → public-rules-3c2a69b4.js} +7 -5
- package/dist/cjs/{remote-invocation-registry-19e462cf.js → remote-invocation-registry-fc22fdd0.js} +3 -3
- package/dist/cjs/{responsive-format-facade-ae9b936d.js → responsive-format-facade-e48962dd.js} +3 -3
- package/dist/cjs/{rich-text-editor-required-rule-a847592c.js → rich-text-editor-required-rule-f08f5891.js} +1 -1
- package/dist/cjs/{static-subject-title-1c9670d5.js → static-subject-title-7e7d791a.js} +2 -0
- package/dist/cjs/{string-input-formatter-slimmer-87d92bbe.js → string-input-formatter-slimmer-56a2401f.js} +3 -3
- package/dist/cjs/{style-formatter-6fe93889.js → style-formatter-48ef74d4.js} +1 -1
- package/dist/cjs/{sub-state-notify-slimmer-d1cbcaa1.js → sub-state-notify-slimmer-b16c9094.js} +4 -3
- package/dist/cjs/{sub-state-observer-slimmer-4ff5cbf5.js → sub-state-observer-slimmer-1b6de09f.js} +4 -3
- package/dist/cjs/{translation-0e0f06ca.js → translation-212b1875.js} +1 -1
- package/dist/cjs/{translation-slimmer-777f4558.js → translation-slimmer-d1512c6d.js} +1 -1
- package/dist/cjs/vega-accordion.cjs.entry.js +16 -14
- package/dist/cjs/vega-app-footer.cjs.entry.js +52 -9
- package/dist/cjs/vega-app-header-button.cjs.entry.js +18 -16
- package/dist/cjs/vega-banner.cjs.entry.js +6 -5
- package/dist/cjs/vega-box.cjs.entry.js +14 -12
- package/dist/cjs/vega-brand-logo.cjs.entry.js +232 -0
- package/dist/cjs/vega-breadcrumb.cjs.entry.js +6 -5
- package/dist/cjs/vega-button-circle.cjs.entry.js +16 -14
- package/dist/cjs/vega-button-group_2.cjs.entry.js +11 -10
- package/dist/cjs/vega-button-link.cjs.entry.js +14 -11
- package/dist/cjs/vega-button.cjs.entry.js +15 -13
- package/dist/cjs/vega-calendar_3.cjs.entry.js +13 -12
- package/dist/cjs/vega-card.cjs.entry.js +13 -11
- package/dist/cjs/vega-carousel.cjs.entry.js +15 -13
- package/dist/cjs/vega-checkbox_2.cjs.entry.js +15 -13
- package/dist/cjs/vega-chip.cjs.entry.js +17 -15
- package/dist/cjs/vega-color-picker.cjs.entry.js +20 -15
- package/dist/cjs/vega-combo-box.cjs.entry.js +12 -10
- package/dist/cjs/vega-date-picker_2.cjs.entry.js +22 -19
- package/dist/cjs/vega-dialog_2.cjs.entry.js +15 -13
- package/dist/cjs/vega-divider.cjs.entry.js +13 -11
- package/dist/cjs/vega-dropdown_5.cjs.entry.js +22 -20
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/vega-field-error.cjs.entry.js +1 -1
- package/dist/cjs/vega-field-label.cjs.entry.js +5 -4
- package/dist/cjs/vega-file-uploader.cjs.entry.js +12 -10
- package/dist/cjs/vega-flag-icon.cjs.entry.js +14 -12
- package/dist/cjs/vega-flex.cjs.entry.js +12 -10
- package/dist/cjs/vega-font.cjs.entry.js +13 -11
- package/dist/cjs/vega-form.cjs.entry.js +71 -15
- package/dist/cjs/vega-grid.cjs.entry.js +13 -11
- package/dist/cjs/vega-icon.cjs.entry.js +13 -11
- package/dist/cjs/vega-image-uploader.cjs.entry.js +18 -15
- package/dist/cjs/vega-input-credit-card.cjs.entry.js +12 -10
- package/dist/cjs/vega-input-numeric.cjs.entry.js +12 -10
- package/dist/cjs/vega-input-phone-number.cjs.entry.js +86 -2472
- package/dist/cjs/vega-input-range.cjs.entry.js +13 -11
- package/dist/cjs/vega-input-select.cjs.entry.js +128 -74
- package/dist/cjs/vega-input.cjs.entry.js +13 -12
- package/dist/cjs/{vega-internal-event-id-a0ca9af9.js → vega-internal-event-id-dc866d43.js} +2 -0
- package/dist/cjs/vega-item-toggle.cjs.entry.js +5 -4
- package/dist/cjs/vega-left-nav_5.cjs.entry.js +40 -20
- package/dist/cjs/vega-loader-wrapper_2.cjs.entry.js +12 -10
- package/dist/cjs/vega-page-notification_2.cjs.entry.js +3 -2
- package/dist/cjs/vega-pagination-page-selector-mobile.cjs.entry.js +6 -5
- package/dist/cjs/vega-pagination-page-size-selector-mobile.cjs.entry.js +7 -6
- package/dist/cjs/vega-pagination.cjs.entry.js +16 -14
- package/dist/cjs/vega-popover_2.cjs.entry.js +15 -13
- package/dist/cjs/vega-progress-tracker.cjs.entry.js +6 -5
- package/dist/cjs/vega-radio_2.cjs.entry.js +15 -13
- package/dist/cjs/vega-rich-text-content.cjs.entry.js +13 -11
- package/dist/cjs/vega-rich-text-editor_4.cjs.entry.js +136 -176
- package/dist/cjs/vega-segment-control.cjs.entry.js +5 -4
- package/dist/cjs/vega-selection-chip_2.cjs.entry.js +18 -16
- package/dist/cjs/vega-selection-tile_2.cjs.entry.js +14 -13
- package/dist/cjs/vega-sidenav_3.cjs.entry.js +18 -16
- package/dist/cjs/vega-signature-capture.cjs.entry.js +19 -16
- package/dist/cjs/{vega-skeleton-loader-controller-cca8e896.js → vega-skeleton-loader-controller-db868c98.js} +177 -6
- package/dist/cjs/vega-stepper.cjs.entry.js +12 -10
- package/dist/cjs/vega-tab-group_2.cjs.entry.js +9 -8
- package/dist/cjs/vega-table_8.cjs.entry.js +30 -28
- package/dist/cjs/vega-textarea.cjs.entry.js +12 -10
- package/dist/cjs/vega-time-picker_2.cjs.entry.js +19 -16
- package/dist/cjs/vega-toggle-switch.cjs.entry.js +11 -9
- package/dist/cjs/vega-tooltip_2.cjs.entry.js +14 -12
- package/dist/cjs/vega.cjs.js +16 -14
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-app-footer/vega-app-footer.css +3 -4
- package/dist/collection/components/vega-app-footer/vega-app-footer.js +55 -17
- package/dist/collection/components/vega-app-header-button/vega-app-header-button.css +9 -4
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/g-symbol-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/g-symbol-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/g-symbol-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/genius-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/genius-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/genius-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/global-payments-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/global-payments-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/dark-mode/global-payments-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/index.js +18 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/g-symbol-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/g-symbol-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/g-symbol-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/genius-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/genius-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/genius-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/global-payments-large.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/global-payments-medium.js +4 -0
- package/dist/collection/components/vega-brand-logo/assets/light-mode/global-payments-small.js +4 -0
- package/dist/collection/components/vega-brand-logo/slimmers/renderers/vega-brand-logo-renderer.js +62 -0
- package/dist/collection/components/vega-brand-logo/vega-brand-logo.css +8 -0
- package/dist/collection/components/vega-brand-logo/vega-brand-logo.js +140 -0
- package/dist/collection/components/vega-button/vega-button.css +11 -6
- package/dist/collection/components/vega-button-circle/vega-button-circle.css +15 -10
- package/dist/collection/components/vega-button-group/vega-button-group-item/vega-button-group-item.css +11 -12
- package/dist/collection/components/vega-button-group/vega-button-group.css +0 -2
- package/dist/collection/components/vega-button-link/vega-button-link.css +21 -37
- package/dist/collection/components/vega-button-link/vega-button-link.js +7 -6
- package/dist/collection/components/vega-carousel/vega-carousel.css +2 -1
- package/dist/collection/components/vega-checkbox/vega-checkbox.css +4 -6
- package/dist/collection/components/vega-chip/vega-chip.css +5 -4
- package/dist/collection/components/vega-color-picker/vega-color-picker.css +14 -8
- package/dist/collection/components/vega-color-picker/vega-color-picker.js +9 -6
- package/dist/collection/components/vega-combo-box/vega-combo-box.css +4 -2
- package/dist/collection/components/vega-date-picker/vega-date-picker.css +6 -4
- package/dist/collection/components/vega-dropdown/vega-dropdown-content-box/vega-dropdown-content-box.css +3 -3
- package/dist/collection/components/vega-dropdown/vega-dropdown-item/vega-dropdown-item.css +4 -2
- package/dist/collection/components/vega-dropdown/vega-dropdown.js +3 -0
- package/dist/collection/components/vega-form/slimmers/controllers/vega-form-nest-state-controller.js +31 -0
- package/dist/collection/components/vega-form/vega-form.js +50 -1
- package/dist/collection/components/vega-image-uploader/vega-image-uploader.css +19 -9
- package/dist/collection/components/vega-input/vega-input.css +2 -2
- package/dist/collection/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.js +28 -52
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.js +35 -7
- package/dist/collection/components/vega-input-phone-number/slimmers/renderers/phone-number-input-renderer.js +10 -3
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.css +1 -1
- package/dist/collection/components/vega-input-phone-number/vega-input-phone-number.js +1 -1
- package/dist/collection/components/vega-input-range/vega-input-range.css +2 -2
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.js +8 -6
- package/dist/collection/components/vega-input-select/slimmers/renderers/vega-input-select-prefix-icon-renderer.js +48 -0
- package/dist/collection/components/vega-input-select/vega-input-select.css +2 -2
- package/dist/collection/components/vega-input-select/vega-input-select.js +5 -0
- package/dist/collection/components/vega-nav/vega-left-nav/slimmers/renderers/vega-left-nav-header-renderer.js +13 -1
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.css +0 -5
- package/dist/collection/components/vega-nav/vega-left-nav/vega-left-nav.js +8 -0
- package/dist/collection/components/vega-nav/vega-left-nav-group/vega-left-nav-group.css +2 -2
- package/dist/collection/components/vega-nav/vega-left-nav-link/vega-left-nav-link.css +2 -4
- package/dist/collection/components/vega-pagination/vega-pagination.css +2 -1
- package/dist/collection/components/vega-popover/vega-popover.js +3 -0
- package/dist/collection/components/vega-progress-tracker/vega-progress-tracker.css +2 -1
- package/dist/collection/components/vega-radio/vega-radio.css +6 -5
- package/dist/collection/components/vega-rich-text-content/vega-rich-text-content.css +2 -1
- package/dist/collection/components/vega-rich-text-editor/dto/annotations/text-color-annotation.js +2 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.css +2 -2
- package/dist/collection/components/vega-rich-text-editor/vega-rich-text-editor.js +2 -2
- package/dist/collection/components/vega-signature-capture/vega-signature-capture.css +2 -2
- package/dist/collection/components/vega-stepper/vega-stepper.css +1 -1
- package/dist/collection/components/vega-tab-group/vega-tab-group.css +1 -1
- package/dist/collection/components/vega-tab-group/vega-tab-group.js +3 -0
- package/dist/collection/components/vega-textarea/vega-textarea.css +6 -2
- package/dist/collection/components/vega-time-picker/vega-time-picker.css +2 -2
- package/dist/collection/components/vega-time-picker/vega-time-picker.js +3 -0
- package/dist/collection/components/vega-toggle-switch/vega-toggle-switch.css +2 -1
- package/dist/collection/components/vega-tooltip/vega-tooltip.js +3 -0
- package/dist/collection/constants/misc.js +4 -0
- package/dist/collection/constants/runtime-metrics-payload-definition/public-api/ThemeManager/runtime-metrics-payload-definition.js +20 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-border-tokens.js +32 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-color-tokens.js +184 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-ring-tokens.js +7 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/dark-mode-shadow-tokens.js +12 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-border-tokens.js +32 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-color-tokens.js +184 -0
- package/dist/collection/constants/tokens/themes/v2-new-brand/light-mode-shadow-tokens.js +12 -0
- package/dist/collection/global/scripts/before-vega-load.js +9 -0
- package/dist/collection/global/tests/before-vega-load.test.js +7 -0
- package/dist/collection/helpers/change-manager/subject/static-subject/static-subject-title.js +1 -0
- package/dist/collection/helpers/event-manager/event-id/vega-internal-event-id.js +1 -0
- package/dist/collection/helpers/event-manager/slimmers/event-emit-slimmer.js +8 -0
- package/dist/collection/helpers/event-manager/test/event-emit-slimmer.test.js +28 -1
- package/dist/collection/helpers/slimmers/brand-switch-state-controller-slimmer.js +46 -0
- package/dist/collection/helpers/slimmers/form-field-controller-slimmer.js +6 -1
- package/dist/collection/helpers/slimmers/form-field-state-controller-slimmer.js +45 -0
- package/dist/collection/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.js +75 -0
- package/dist/collection/helpers/theme/controllers/brand-style-controller.js +50 -0
- package/dist/collection/helpers/theme/controllers/dark-mode-style-controller.js +17 -30
- package/dist/collection/helpers/theme/controllers/style-controller.abstract.js +31 -0
- package/dist/collection/helpers/theme/internal-theme-manager.js +71 -0
- package/dist/collection/helpers/theme/tests/theme-manager-controller.test.js +17 -0
- package/dist/collection/helpers/theme/theme-manager.js +16 -17
- package/dist/collection/helpers/validator/form-field-controller.js +9 -1
- package/dist/esm/{app-globals-6041875b.js → app-globals-53b6125a.js} +16 -7
- package/dist/esm/brand-switch-state-controller-slimmer-05c85e6d.js +49 -0
- package/dist/esm/{child-nodes-event-prevent-slimmer-1571f1b2.js → child-nodes-event-prevent-slimmer-d3a94ef2.js} +1 -1
- package/dist/esm/{child-nodes-notify-observer-slimmer-356d5c5e.js → child-nodes-notify-observer-slimmer-ddaad39a.js} +1 -1
- package/dist/esm/{content-state-8b844253.js → content-state-7437e069.js} +6 -3023
- package/dist/esm/dark-mode-state-controller-slimmer-f1c2c299.js +49 -0
- package/dist/esm/dark-mode-style-controller-2ada8e22.js +3467 -0
- package/dist/esm/{design-token-3851662a.js → design-token-fb43f78a.js} +1 -1
- package/dist/esm/{dom-node-subject-factory-e8898f61.js → dom-node-subject-factory-f77cf9cc.js} +1 -30
- package/dist/esm/{dom-node-subject-observer-factory-809b0cf0.js → dom-node-subject-observer-factory-715dccf9.js} +2 -1
- package/dist/esm/{element-appender-slimmer-538e3117.js → element-appender-slimmer-0a0b20e9.js} +7 -6
- package/dist/esm/{event-emit-slimmer-d56587c9.js → event-emit-slimmer-b7d511f6.js} +11 -3
- package/dist/esm/{form-field-controller-slimmer-470e7cae.js → form-field-controller-slimmer-2978abd4.js} +83 -25
- package/dist/esm/{image-annotation-action-6231c7e6.js → image-annotation-action-51248df9.js} +5 -4
- package/dist/esm/index-187f71d1.js +4 -0
- package/dist/esm/{index-116d1c98.js → index-96374234.js} +3 -2
- package/dist/esm/index.js +15 -13
- package/dist/esm/{internal-vega-event-manager-18379085.js → internal-vega-event-manager-87dc436c.js} +1 -1
- package/dist/esm/loader.js +16 -14
- package/dist/esm/observer-3959f9dd.js +30 -0
- package/dist/esm/{public-rules-ef7bcfb9.js → public-rules-cfc196c9.js} +7 -5
- package/dist/esm/{remote-invocation-registry-dc7682d4.js → remote-invocation-registry-d69245c2.js} +1 -1
- package/dist/esm/{responsive-format-facade-86cdc58c.js → responsive-format-facade-ae799f25.js} +3 -3
- package/dist/esm/{rich-text-editor-required-rule-fec25fa5.js → rich-text-editor-required-rule-baf61553.js} +1 -1
- package/dist/esm/{static-subject-title-97eb1f19.js → static-subject-title-ca83d6b6.js} +2 -1
- package/dist/esm/{string-input-formatter-slimmer-42c02528.js → string-input-formatter-slimmer-8c7987ac.js} +3 -3
- package/dist/esm/{style-formatter-be0be447.js → style-formatter-bf71b8e7.js} +1 -1
- package/dist/esm/{sub-state-notify-slimmer-7d0d98b4.js → sub-state-notify-slimmer-2216c7dc.js} +3 -2
- package/dist/esm/{sub-state-observer-slimmer-da6cde6a.js → sub-state-observer-slimmer-da938c88.js} +3 -2
- package/dist/esm/{translation-2bdcfdb3.js → translation-cf7f020a.js} +1 -1
- package/dist/esm/{translation-slimmer-607ed804.js → translation-slimmer-88966d5c.js} +1 -1
- package/dist/esm/vega-accordion.entry.js +15 -13
- package/dist/esm/vega-app-footer.entry.js +52 -9
- package/dist/esm/vega-app-header-button.entry.js +18 -16
- package/dist/esm/vega-banner.entry.js +6 -5
- package/dist/esm/vega-box.entry.js +14 -12
- package/dist/esm/vega-brand-logo.entry.js +228 -0
- package/dist/esm/vega-breadcrumb.entry.js +6 -5
- package/dist/esm/vega-button-circle.entry.js +16 -14
- package/dist/esm/vega-button-group_2.entry.js +11 -10
- package/dist/esm/vega-button-link.entry.js +14 -11
- package/dist/esm/vega-button.entry.js +15 -13
- package/dist/esm/vega-calendar_3.entry.js +13 -12
- package/dist/esm/vega-card.entry.js +13 -11
- package/dist/esm/vega-carousel.entry.js +15 -13
- package/dist/esm/vega-checkbox_2.entry.js +13 -11
- package/dist/esm/vega-chip.entry.js +17 -15
- package/dist/esm/vega-color-picker.entry.js +20 -15
- package/dist/esm/vega-combo-box.entry.js +12 -10
- package/dist/esm/vega-date-picker_2.entry.js +22 -19
- package/dist/esm/vega-dialog_2.entry.js +15 -13
- package/dist/esm/vega-divider.entry.js +13 -11
- package/dist/esm/vega-dropdown_5.entry.js +22 -20
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/vega-field-error.entry.js +1 -1
- package/dist/esm/vega-field-label.entry.js +5 -4
- package/dist/esm/vega-file-uploader.entry.js +12 -10
- package/dist/esm/vega-flag-icon.entry.js +13 -11
- package/dist/esm/vega-flex.entry.js +12 -10
- package/dist/esm/vega-font.entry.js +13 -11
- package/dist/esm/vega-form.entry.js +68 -12
- package/dist/esm/vega-grid.entry.js +13 -11
- package/dist/esm/vega-icon.entry.js +13 -11
- package/dist/esm/vega-image-uploader.entry.js +18 -15
- package/dist/esm/vega-input-credit-card.entry.js +12 -10
- package/dist/esm/vega-input-numeric.entry.js +12 -10
- package/dist/esm/vega-input-phone-number.entry.js +86 -2472
- package/dist/esm/vega-input-range.entry.js +13 -11
- package/dist/esm/vega-input-select.entry.js +128 -74
- package/dist/esm/vega-input.entry.js +13 -12
- package/dist/esm/{vega-internal-event-id-d7113cf7.js → vega-internal-event-id-7d1ff289.js} +2 -1
- package/dist/esm/vega-item-toggle.entry.js +5 -4
- package/dist/esm/vega-left-nav_5.entry.js +38 -18
- package/dist/esm/vega-loader-wrapper_2.entry.js +12 -10
- package/dist/esm/vega-page-notification_2.entry.js +3 -2
- package/dist/esm/vega-pagination-page-selector-mobile.entry.js +6 -5
- package/dist/esm/vega-pagination-page-size-selector-mobile.entry.js +7 -6
- package/dist/esm/vega-pagination.entry.js +16 -14
- package/dist/esm/vega-popover_2.entry.js +15 -13
- package/dist/esm/vega-progress-tracker.entry.js +6 -5
- package/dist/esm/vega-radio_2.entry.js +13 -11
- package/dist/esm/vega-rich-text-content.entry.js +12 -10
- package/dist/esm/vega-rich-text-editor_4.entry.js +132 -172
- package/dist/esm/vega-segment-control.entry.js +5 -4
- package/dist/esm/vega-selection-chip_2.entry.js +17 -15
- package/dist/esm/vega-selection-tile_2.entry.js +13 -12
- package/dist/esm/vega-sidenav_3.entry.js +16 -14
- package/dist/esm/vega-signature-capture.entry.js +19 -16
- package/dist/esm/{vega-skeleton-loader-controller-da0ed23d.js → vega-skeleton-loader-controller-c2a8bd27.js} +177 -7
- package/dist/esm/vega-stepper.entry.js +12 -10
- package/dist/esm/vega-tab-group_2.entry.js +8 -7
- package/dist/esm/vega-table_8.entry.js +19 -17
- package/dist/esm/vega-textarea.entry.js +12 -10
- package/dist/esm/vega-time-picker_2.entry.js +19 -16
- package/dist/esm/vega-toggle-switch.entry.js +11 -9
- package/dist/esm/vega-tooltip_2.entry.js +14 -12
- package/dist/esm/vega.js +16 -14
- package/dist/types/components/vega-app-footer/vega-app-footer.d.ts +12 -3
- package/dist/types/components/{vega-input-phone-number/assets/flags/ac.d.ts → vega-brand-logo/assets/dark-mode/g-symbol-large.d.ts} +1 -2
- package/dist/types/components/{vega-input-phone-number/assets/flags/af.d.ts → vega-brand-logo/assets/dark-mode/g-symbol-medium.d.ts} +1 -2
- package/dist/types/components/{vega-input-phone-number/assets/flags/ad.d.ts → vega-brand-logo/assets/dark-mode/g-symbol-small.d.ts} +1 -2
- package/dist/types/components/{vega-input-phone-number/assets/flags/ae.d.ts → vega-brand-logo/assets/dark-mode/genius-large.d.ts} +1 -2
- package/dist/types/components/vega-brand-logo/assets/dark-mode/genius-medium.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/dark-mode/genius-small.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/dark-mode/global-payments-large.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/dark-mode/global-payments-medium.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/dark-mode/global-payments-small.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/index.d.ts +18 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/g-symbol-large.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/g-symbol-medium.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/g-symbol-small.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/genius-large.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/genius-medium.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/genius-small.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/global-payments-large.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/global-payments-medium.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/assets/light-mode/global-payments-small.d.ts +2 -0
- package/dist/types/components/vega-brand-logo/slimmers/renderers/vega-brand-logo-renderer.d.ts +12 -0
- package/dist/types/components/vega-brand-logo/vega-brand-logo.d.ts +39 -0
- package/dist/types/components/vega-dropdown/vega-dropdown.d.ts +3 -0
- package/dist/types/components/vega-form/slimmers/controllers/vega-form-nest-state-controller.d.ts +10 -0
- package/dist/types/components/vega-form/vega-form.d.ts +16 -0
- package/dist/types/components/vega-input-phone-number/slimmers/controllers/vega-input-phone-number-value-controller.d.ts +11 -28
- package/dist/types/components/vega-input-phone-number/slimmers/renderers/country-select-renderer.d.ts +14 -0
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-dropdown-renderer.d.ts +2 -1
- package/dist/types/components/vega-input-select/slimmers/renderers/vega-input-select-prefix-icon-renderer.d.ts +21 -0
- package/dist/types/components/vega-input-select/vega-input-select.d.ts +2 -0
- package/dist/types/components/vega-nav/vega-left-nav/slimmers/renderers/vega-left-nav-header-renderer.d.ts +2 -0
- package/dist/types/components/vega-nav/vega-left-nav/vega-left-nav.d.ts +4 -0
- package/dist/types/components/vega-popover/vega-popover.d.ts +3 -0
- package/dist/types/components/vega-tab-group/vega-tab-group.d.ts +3 -0
- package/dist/types/components/vega-time-picker/vega-time-picker.d.ts +3 -0
- package/dist/types/components/vega-tooltip/vega-tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +69 -6
- package/dist/types/constants/misc.d.ts +4 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/dark-mode-border-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/dark-mode-color-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/dark-mode-ring-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/dark-mode-shadow-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/light-mode-border-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/light-mode-color-tokens.d.ts +1 -0
- package/dist/types/constants/tokens/themes/v2-new-brand/light-mode-shadow-tokens.d.ts +1 -0
- package/dist/types/helpers/change-manager/subject/static-subject/static-subject-title.d.ts +2 -1
- package/dist/types/helpers/event-manager/event-id/vega-internal-event-id.d.ts +1 -0
- package/dist/types/helpers/event-manager/slimmers/event-emit-slimmer.d.ts +9 -0
- package/dist/types/helpers/slimmers/brand-switch-state-controller-slimmer.d.ts +22 -0
- package/dist/types/helpers/slimmers/form-field-controller-slimmer.d.ts +4 -2
- package/dist/types/helpers/slimmers/form-field-state-controller-slimmer.d.ts +15 -0
- package/dist/types/helpers/slimmers/test/brand-switch-state-controller-slimmer.test.d.ts +1 -0
- package/dist/types/helpers/theme/controllers/brand-style-controller.d.ts +22 -0
- package/dist/types/helpers/theme/controllers/dark-mode-style-controller.d.ts +4 -12
- package/dist/types/helpers/theme/controllers/style-controller.abstract.d.ts +19 -0
- package/dist/types/helpers/theme/internal-theme-manager.d.ts +48 -0
- package/dist/types/helpers/theme/theme-manager.d.ts +9 -1
- package/dist/types/helpers/theme/theme.d.ts +7 -0
- package/dist/types/helpers/validator/form-field-controller.d.ts +7 -0
- package/dist/types/types/public-api.d.ts +1 -1
- package/dist/vega/index.esm.js +1 -1
- package/dist/vega/p-0073c3de.entry.js +1 -0
- package/dist/vega/p-01b4d6ba.entry.js +1 -0
- package/dist/vega/p-0523efe8.entry.js +1 -0
- package/dist/vega/p-08679cd9.entry.js +1 -0
- package/dist/vega/p-0969877b.entry.js +1 -0
- package/dist/vega/p-0b56725e.entry.js +1 -0
- package/dist/vega/p-10a40dfb.entry.js +1 -0
- package/dist/vega/p-12d60f5f.js +1 -0
- package/dist/vega/{p-38cd5b2e.js → p-1503f791.js} +1 -1
- package/dist/vega/p-1b731247.entry.js +1 -0
- package/dist/vega/p-1c08e94a.entry.js +1 -0
- package/dist/vega/{p-79c55889.js → p-1e2886b5.js} +1 -1
- package/dist/vega/{p-636a3a8c.js → p-213752bd.js} +1 -1
- package/dist/vega/p-214aa52e.js +1 -0
- package/dist/vega/p-27003a81.entry.js +1 -0
- package/dist/vega/p-27e56c67.entry.js +1 -0
- package/dist/vega/p-2863aa51.entry.js +1 -0
- package/dist/vega/p-28b7d6ba.entry.js +1 -0
- package/dist/vega/p-2c1c88c0.entry.js +1 -0
- package/dist/vega/p-31de5cb4.entry.js +1 -0
- package/dist/vega/p-324dd09a.entry.js +1 -0
- package/dist/vega/p-331a62d5.js +1 -0
- package/dist/vega/p-343b4522.entry.js +1 -0
- package/dist/vega/p-3d3cd394.js +1 -0
- package/dist/vega/p-3e285c35.js +1 -0
- package/dist/vega/p-410755ca.entry.js +1 -0
- package/dist/vega/{p-47facbb4.js → p-431ab4dd.js} +1 -1
- package/dist/vega/p-48517a5d.entry.js +1 -0
- package/dist/vega/p-4b1a7d31.entry.js +1 -0
- package/dist/vega/p-4b541ce8.entry.js +1 -0
- package/dist/vega/p-4f54ba1f.entry.js +1 -0
- package/dist/vega/p-4f7f93ef.entry.js +1 -0
- package/dist/vega/p-5064a804.js +1 -0
- package/dist/vega/p-50677c8e.js +1 -0
- package/dist/vega/p-50a076d0.entry.js +1 -0
- package/dist/vega/{p-317018ba.js → p-5773a9a3.js} +1 -1
- package/dist/vega/p-59e9f57a.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-611282a7.entry.js +1 -0
- package/dist/vega/p-6586e2a2.entry.js +1 -0
- package/dist/vega/p-69cc3fa2.js +1 -0
- package/dist/vega/p-6be16084.js +1 -0
- package/dist/vega/p-6cd8e6f4.entry.js +1 -0
- package/dist/vega/p-6e898779.js +1 -0
- package/dist/vega/p-6f81fe1e.js +1 -0
- package/dist/vega/p-7594875a.entry.js +1 -0
- package/dist/vega/p-77e64f26.js +1 -0
- package/dist/vega/p-79cc1f41.entry.js +1 -0
- package/dist/vega/p-7bc3a42b.js +1 -0
- package/dist/vega/{p-97ded803.js → p-804f71b3.js} +1 -1
- package/dist/vega/p-8ade44bf.js +1 -0
- package/dist/vega/p-8af3fc79.entry.js +1 -0
- package/dist/vega/p-8c32ff75.entry.js +1 -0
- package/dist/vega/{p-7cb3666d.js → p-8d283666.js} +1 -1
- package/dist/vega/p-8ee31f00.entry.js +1 -0
- package/dist/vega/p-8f80b321.entry.js +1 -0
- package/dist/vega/p-904d1b43.js +1 -0
- package/dist/vega/p-952913fc.entry.js +1 -0
- package/dist/vega/p-96410d71.entry.js +1 -0
- package/dist/vega/p-a1bdf9a0.entry.js +1 -0
- package/dist/vega/p-a5c39ba2.entry.js +1 -0
- package/dist/vega/{p-f95b164c.js → p-a821bcf3.js} +1 -1
- package/dist/vega/p-a8e9bfae.entry.js +1 -0
- package/dist/vega/p-aa109e80.entry.js +1 -0
- package/dist/vega/{p-633ab02b.js → p-ab26cad6.js} +1 -1
- package/dist/vega/p-aea89be5.entry.js +1 -0
- package/dist/vega/p-b06e5916.entry.js +1 -0
- package/dist/vega/p-b07add9c.entry.js +1 -0
- package/dist/vega/p-b2643e88.js +1 -0
- package/dist/vega/p-b4dfa967.entry.js +1 -0
- package/dist/vega/p-b64d5c3a.entry.js +1 -0
- package/dist/vega/p-b65de502.entry.js +1 -0
- package/dist/vega/{p-79525036.entry.js → p-b6caa1e2.entry.js} +2 -2
- package/dist/vega/p-b9f48611.js +1 -0
- package/dist/vega/{p-42b53970.js → p-bab6ca81.js} +1 -1
- package/dist/vega/p-bcb43c54.entry.js +1 -0
- package/dist/vega/{p-b97c8ac4.entry.js → p-bd5ca7cc.entry.js} +1 -1
- package/dist/vega/p-c2321aa8.entry.js +1 -0
- package/dist/vega/p-c706de06.entry.js +1 -0
- package/dist/vega/p-c86a4896.entry.js +1 -0
- package/dist/vega/p-ceb9f5aa.entry.js +1 -0
- package/dist/vega/p-d4a61b1d.entry.js +1 -0
- package/dist/vega/p-d6620b42.entry.js +1 -0
- package/dist/vega/p-d6c37085.entry.js +1 -0
- package/dist/vega/p-d6d9c300.entry.js +1 -0
- package/dist/vega/p-d7642125.js +1 -0
- package/dist/vega/p-db7a6878.entry.js +1 -0
- package/dist/vega/p-df44a712.entry.js +1 -0
- package/dist/vega/p-e1a06741.entry.js +1 -0
- package/dist/vega/p-e5695801.entry.js +1 -0
- package/dist/vega/p-e59ff7d1.entry.js +1 -0
- package/dist/vega/p-f0bc8f6d.js +1 -0
- package/dist/vega/p-f9b07b5e.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/vega-input-phone-number/assets/country-flags.js +0 -493
- package/dist/collection/components/vega-input-phone-number/assets/flags/ac.js +0 -692
- package/dist/collection/components/vega-input-phone-number/assets/flags/ad.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ae.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/af.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ag.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ai.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/al.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/am.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ao.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ar.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/as.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/at.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/au.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/aw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ax.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/az.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ba.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bb.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bd.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/be.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bh.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bi.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bj.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bo.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bq.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/br.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bs.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/by.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/bz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ca.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cd.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ch.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ci.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ck.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/co.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cv.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cx.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cy.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/cz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/de.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/dj.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/dk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/dm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/do.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/dz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ec.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ee.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/eg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/eh.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/er.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/es.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/et.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fi.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fj.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fo.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/fr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ga.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gb.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gd.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ge.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gh.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gi.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gp.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gq.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/gy.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/hk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/hn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/hr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ht.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/hu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/id.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ie.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/il.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/im.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/in.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/io.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/iq.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ir.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/is.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/it.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/je.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/jm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/jo.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/jp.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ke.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kh.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ki.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/km.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kp.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ky.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/kz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/la.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lb.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/li.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ls.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/lv.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ly.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ma.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/md.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/me.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mh.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ml.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mo.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mp.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mq.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ms.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mv.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mx.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/my.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/mz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/na.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ne.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ng.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ni.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/no.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/np.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/nz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/om.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pa.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pe.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ph.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ps.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/pw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/py.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/qa.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/re.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ro.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/rs.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ru.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/rw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sa.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sb.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sd.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/se.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sh.js +0 -167
- package/dist/collection/components/vega-input-phone-number/assets/flags/si.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sj.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/so.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ss.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/st.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sv.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sx.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sy.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/sz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ta.js +0 -79
- package/dist/collection/components/vega-input-phone-number/assets/flags/tc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/td.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/th.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tj.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tl.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/to.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tr.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tv.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tw.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/tz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ua.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ug.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/us.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/uy.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/uz.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/va.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/vc.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ve.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/vg.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/vi.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/vn.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/vu.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/wf.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ws.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/xk.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/ye.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/yt.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/za.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/zm.js +0 -4
- package/dist/collection/components/vega-input-phone-number/assets/flags/zw.js +0 -4
- package/dist/types/components/vega-input-phone-number/assets/country-flags.d.ts +0 -5
- package/dist/types/components/vega-input-phone-number/assets/flags/ag.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ai.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/al.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/am.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ao.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ar.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/as.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/at.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/au.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/aw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ax.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/az.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ba.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bb.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bd.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/be.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bi.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bj.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bo.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bq.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/br.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bs.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/by.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/bz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ca.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cd.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ch.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ci.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ck.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/co.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cv.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cx.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cy.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/cz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/de.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/dj.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/dk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/dm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/do.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/dz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ec.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ee.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/eg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/eh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/er.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/es.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/et.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fi.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fj.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fo.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/fr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ga.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gb.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gd.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ge.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gi.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gp.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gq.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/gy.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/hk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/hn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/hr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ht.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/hu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/id.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ie.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/il.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/im.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/in.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/io.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/iq.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ir.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/is.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/it.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/je.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/jm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/jo.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/jp.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ke.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ki.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/km.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kp.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ky.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/kz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/la.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lb.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/li.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ls.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/lv.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ly.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ma.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/md.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/me.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ml.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mo.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mp.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mq.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ms.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mv.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mx.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/my.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/mz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/na.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ne.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ng.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ni.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/no.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/np.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/nz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/om.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pa.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pe.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ph.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ps.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/pw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/py.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/qa.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/re.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ro.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/rs.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ru.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/rw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sa.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sb.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sd.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/se.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sh.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/si.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sj.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/so.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ss.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/st.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sv.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sx.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sy.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/sz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ta.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/td.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/th.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tj.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tl.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/to.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tr.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tv.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tw.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/tz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ua.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ug.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/us.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/uy.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/uz.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/va.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/vc.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ve.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/vg.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/vi.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/vn.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/vu.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/wf.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ws.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/xk.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/ye.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/yt.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/za.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/zm.d.ts +0 -3
- package/dist/types/components/vega-input-phone-number/assets/flags/zw.d.ts +0 -3
- package/dist/vega/p-00433d02.entry.js +0 -1
- package/dist/vega/p-043ee49b.entry.js +0 -1
- package/dist/vega/p-076fafdb.entry.js +0 -1
- package/dist/vega/p-08c6d5ab.entry.js +0 -1
- package/dist/vega/p-0a6986dd.entry.js +0 -1
- package/dist/vega/p-0a8b91f5.entry.js +0 -1
- package/dist/vega/p-0af09a86.js +0 -1
- package/dist/vega/p-0ddc1605.entry.js +0 -1
- package/dist/vega/p-141a5d82.entry.js +0 -1
- package/dist/vega/p-1a2c7868.entry.js +0 -1
- package/dist/vega/p-1d1eba9a.js +0 -1
- package/dist/vega/p-1e499bbc.js +0 -1
- package/dist/vega/p-2168b00d.entry.js +0 -1
- package/dist/vega/p-2951342f.entry.js +0 -1
- package/dist/vega/p-2c197dcc.entry.js +0 -1
- package/dist/vega/p-2c79b20a.entry.js +0 -1
- package/dist/vega/p-36dabeeb.entry.js +0 -1
- package/dist/vega/p-378b8359.entry.js +0 -1
- package/dist/vega/p-3a5b223e.entry.js +0 -1
- package/dist/vega/p-3c3307f9.entry.js +0 -1
- package/dist/vega/p-3dafea54.entry.js +0 -1
- package/dist/vega/p-494b26ea.entry.js +0 -1
- package/dist/vega/p-4a565ffa.entry.js +0 -1
- package/dist/vega/p-4dbf3bf1.entry.js +0 -1
- package/dist/vega/p-512408f0.entry.js +0 -1
- package/dist/vega/p-5292294a.entry.js +0 -1
- package/dist/vega/p-5304d92c.entry.js +0 -1
- package/dist/vega/p-5575c5b9.entry.js +0 -1
- package/dist/vega/p-560fbbfa.js +0 -1
- package/dist/vega/p-5ba0a9f7.js +0 -1
- package/dist/vega/p-5e4a0c04.js +0 -1
- package/dist/vega/p-5e9b499b.entry.js +0 -1
- package/dist/vega/p-603e7332.entry.js +0 -1
- package/dist/vega/p-6079a927.entry.js +0 -1
- package/dist/vega/p-61f36ce3.entry.js +0 -1
- package/dist/vega/p-6a1e7e2e.js +0 -1
- package/dist/vega/p-6bf10619.entry.js +0 -1
- package/dist/vega/p-6f677e61.entry.js +0 -1
- package/dist/vega/p-757e262f.entry.js +0 -1
- package/dist/vega/p-7710cbf9.entry.js +0 -1
- package/dist/vega/p-8148e608.entry.js +0 -1
- package/dist/vega/p-878dceb7.js +0 -1
- package/dist/vega/p-888bbb49.entry.js +0 -1
- package/dist/vega/p-8f20fee5.entry.js +0 -1
- package/dist/vega/p-912b7444.js +0 -1
- package/dist/vega/p-9351c45f.entry.js +0 -1
- package/dist/vega/p-95883f88.entry.js +0 -1
- package/dist/vega/p-97abc592.entry.js +0 -1
- package/dist/vega/p-9c725036.entry.js +0 -1
- package/dist/vega/p-a9ce2dd9.entry.js +0 -1
- package/dist/vega/p-ae6f20c3.entry.js +0 -1
- package/dist/vega/p-b8cfdb9d.entry.js +0 -1
- package/dist/vega/p-befae6ba.js +0 -1
- package/dist/vega/p-bfd89ca7.entry.js +0 -1
- package/dist/vega/p-c2e7d93e.entry.js +0 -1
- package/dist/vega/p-c4635a1b.entry.js +0 -1
- package/dist/vega/p-c4a29efd.entry.js +0 -1
- package/dist/vega/p-ca0da74d.entry.js +0 -1
- package/dist/vega/p-ca40dc54.entry.js +0 -1
- package/dist/vega/p-caeb3663.js +0 -1
- package/dist/vega/p-cb531c91.entry.js +0 -1
- package/dist/vega/p-cd5b6b73.entry.js +0 -1
- package/dist/vega/p-d1b927b5.entry.js +0 -1
- package/dist/vega/p-d92f5296.js +0 -1
- package/dist/vega/p-e06361df.js +0 -1
- package/dist/vega/p-e4049b65.js +0 -1
- package/dist/vega/p-e4f018dd.entry.js +0 -1
- package/dist/vega/p-ee7f2d0c.entry.js +0 -1
- package/dist/vega/p-f0b988aa.entry.js +0 -1
- package/dist/vega/p-f38e97a4.entry.js +0 -1
- package/dist/vega/p-f7cf81b6.js +0 -1
- package/dist/vega/p-f8301c01.entry.js +0 -1
- package/dist/vega/p-fa0f1143.entry.js +0 -1
- package/dist/vega/p-fcdd9251.js +0 -1
- package/dist/vega/p-ff0523b8.entry.js +0 -1
- /package/dist/cjs/{internal-icon-manager-14cef77c.js → internal-icon-manager-00f49470.js} +0 -0
- /package/dist/esm/{internal-icon-manager-9c0c4ce4.js → internal-icon-manager-58cf8aa6.js} +0 -0
- /package/dist/vega/{p-38e3c739.js → p-c9b9322b.js} +0 -0
|
@@ -1,3027 +1,10 @@
|
|
|
1
1
|
import { C as ChangeManager } from './change-manager-6a7eb88c.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { d as domNodeSubjectFactory } from './dom-node-subject-factory-f77cf9cc.js';
|
|
3
|
+
import { a as VegaInternalRichTextEditorFlushChanges, b as VegaInternalRichTextEditorSelectionRangeChange } from './vega-internal-event-id-7d1ff289.js';
|
|
4
4
|
import { L as LogUtility } from './global-slimmer-registry-17c4efd4.js';
|
|
5
5
|
import { i as isNonNullable } from './type-guard-158f6d7a.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { D as DARK_MODE_CHANGE } from './static-subject-title-97eb1f19.js';
|
|
9
|
-
|
|
10
|
-
var tinycolor = createCommonjsModule(function (module, exports) {
|
|
11
|
-
// This file is autogenerated. It's used to publish CJS to npm.
|
|
12
|
-
(function (global, factory) {
|
|
13
|
-
module.exports = factory() ;
|
|
14
|
-
})(commonjsGlobal, (function () {
|
|
15
|
-
// https://github.com/bgrins/TinyColor
|
|
16
|
-
// Brian Grinstead, MIT License
|
|
17
|
-
|
|
18
|
-
const trimLeft = /^\s+/;
|
|
19
|
-
const trimRight = /\s+$/;
|
|
20
|
-
|
|
21
|
-
function tinycolor(color, opts) {
|
|
22
|
-
color = color ? color : "";
|
|
23
|
-
opts = opts || {};
|
|
24
|
-
|
|
25
|
-
// If input is already a tinycolor, return itself
|
|
26
|
-
if (color instanceof tinycolor) {
|
|
27
|
-
return color;
|
|
28
|
-
}
|
|
29
|
-
// If we are called as a function, call using new instead
|
|
30
|
-
if (!(this instanceof tinycolor)) {
|
|
31
|
-
return new tinycolor(color, opts);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var rgb = inputToRGB(color);
|
|
35
|
-
(this._originalInput = color),
|
|
36
|
-
(this._r = rgb.r),
|
|
37
|
-
(this._g = rgb.g),
|
|
38
|
-
(this._b = rgb.b),
|
|
39
|
-
(this._a = rgb.a),
|
|
40
|
-
(this._roundA = Math.round(100 * this._a) / 100),
|
|
41
|
-
(this._format = opts.format || rgb.format);
|
|
42
|
-
this._gradientType = opts.gradientType;
|
|
43
|
-
|
|
44
|
-
// Don't let the range of [0,255] come back in [0,1].
|
|
45
|
-
// Potentially lose a little bit of precision here, but will fix issues where
|
|
46
|
-
// .5 gets interpreted as half of the total, instead of half of 1
|
|
47
|
-
// If it was supposed to be 128, this was already taken care of by `inputToRgb`
|
|
48
|
-
if (this._r < 1) this._r = Math.round(this._r);
|
|
49
|
-
if (this._g < 1) this._g = Math.round(this._g);
|
|
50
|
-
if (this._b < 1) this._b = Math.round(this._b);
|
|
51
|
-
|
|
52
|
-
this._ok = rgb.ok;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
tinycolor.prototype = {
|
|
56
|
-
isDark: function () {
|
|
57
|
-
return this.getBrightness() < 128;
|
|
58
|
-
},
|
|
59
|
-
isLight: function () {
|
|
60
|
-
return !this.isDark();
|
|
61
|
-
},
|
|
62
|
-
isValid: function () {
|
|
63
|
-
return this._ok;
|
|
64
|
-
},
|
|
65
|
-
getOriginalInput: function () {
|
|
66
|
-
return this._originalInput;
|
|
67
|
-
},
|
|
68
|
-
getFormat: function () {
|
|
69
|
-
return this._format;
|
|
70
|
-
},
|
|
71
|
-
getAlpha: function () {
|
|
72
|
-
return this._a;
|
|
73
|
-
},
|
|
74
|
-
getBrightness: function () {
|
|
75
|
-
//http://www.w3.org/TR/AERT#color-contrast
|
|
76
|
-
var rgb = this.toRgb();
|
|
77
|
-
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
|
|
78
|
-
},
|
|
79
|
-
getLuminance: function () {
|
|
80
|
-
//http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
|
|
81
|
-
var rgb = this.toRgb();
|
|
82
|
-
var RsRGB, GsRGB, BsRGB, R, G, B;
|
|
83
|
-
RsRGB = rgb.r / 255;
|
|
84
|
-
GsRGB = rgb.g / 255;
|
|
85
|
-
BsRGB = rgb.b / 255;
|
|
86
|
-
|
|
87
|
-
if (RsRGB <= 0.03928) R = RsRGB / 12.92;
|
|
88
|
-
else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
|
|
89
|
-
if (GsRGB <= 0.03928) G = GsRGB / 12.92;
|
|
90
|
-
else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
|
|
91
|
-
if (BsRGB <= 0.03928) B = BsRGB / 12.92;
|
|
92
|
-
else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
|
|
93
|
-
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
|
|
94
|
-
},
|
|
95
|
-
setAlpha: function (value) {
|
|
96
|
-
this._a = boundAlpha(value);
|
|
97
|
-
this._roundA = Math.round(100 * this._a) / 100;
|
|
98
|
-
return this;
|
|
99
|
-
},
|
|
100
|
-
toHsv: function () {
|
|
101
|
-
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
102
|
-
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
|
|
103
|
-
},
|
|
104
|
-
toHsvString: function () {
|
|
105
|
-
var hsv = rgbToHsv(this._r, this._g, this._b);
|
|
106
|
-
var h = Math.round(hsv.h * 360),
|
|
107
|
-
s = Math.round(hsv.s * 100),
|
|
108
|
-
v = Math.round(hsv.v * 100);
|
|
109
|
-
return this._a == 1
|
|
110
|
-
? "hsv(" + h + ", " + s + "%, " + v + "%)"
|
|
111
|
-
: "hsva(" + h + ", " + s + "%, " + v + "%, " + this._roundA + ")";
|
|
112
|
-
},
|
|
113
|
-
toHsl: function () {
|
|
114
|
-
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
115
|
-
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
|
|
116
|
-
},
|
|
117
|
-
toHslString: function () {
|
|
118
|
-
var hsl = rgbToHsl(this._r, this._g, this._b);
|
|
119
|
-
var h = Math.round(hsl.h * 360),
|
|
120
|
-
s = Math.round(hsl.s * 100),
|
|
121
|
-
l = Math.round(hsl.l * 100);
|
|
122
|
-
return this._a == 1
|
|
123
|
-
? "hsl(" + h + ", " + s + "%, " + l + "%)"
|
|
124
|
-
: "hsla(" + h + ", " + s + "%, " + l + "%, " + this._roundA + ")";
|
|
125
|
-
},
|
|
126
|
-
toHex: function (allow3Char) {
|
|
127
|
-
return rgbToHex(this._r, this._g, this._b, allow3Char);
|
|
128
|
-
},
|
|
129
|
-
toHexString: function (allow3Char) {
|
|
130
|
-
return "#" + this.toHex(allow3Char);
|
|
131
|
-
},
|
|
132
|
-
toHex8: function (allow4Char) {
|
|
133
|
-
return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);
|
|
134
|
-
},
|
|
135
|
-
toHex8String: function (allow4Char) {
|
|
136
|
-
return "#" + this.toHex8(allow4Char);
|
|
137
|
-
},
|
|
138
|
-
toRgb: function () {
|
|
139
|
-
return {
|
|
140
|
-
r: Math.round(this._r),
|
|
141
|
-
g: Math.round(this._g),
|
|
142
|
-
b: Math.round(this._b),
|
|
143
|
-
a: this._a,
|
|
144
|
-
};
|
|
145
|
-
},
|
|
146
|
-
toRgbString: function () {
|
|
147
|
-
return this._a == 1
|
|
148
|
-
? "rgb(" +
|
|
149
|
-
Math.round(this._r) +
|
|
150
|
-
", " +
|
|
151
|
-
Math.round(this._g) +
|
|
152
|
-
", " +
|
|
153
|
-
Math.round(this._b) +
|
|
154
|
-
")"
|
|
155
|
-
: "rgba(" +
|
|
156
|
-
Math.round(this._r) +
|
|
157
|
-
", " +
|
|
158
|
-
Math.round(this._g) +
|
|
159
|
-
", " +
|
|
160
|
-
Math.round(this._b) +
|
|
161
|
-
", " +
|
|
162
|
-
this._roundA +
|
|
163
|
-
")";
|
|
164
|
-
},
|
|
165
|
-
toPercentageRgb: function () {
|
|
166
|
-
return {
|
|
167
|
-
r: Math.round(bound01(this._r, 255) * 100) + "%",
|
|
168
|
-
g: Math.round(bound01(this._g, 255) * 100) + "%",
|
|
169
|
-
b: Math.round(bound01(this._b, 255) * 100) + "%",
|
|
170
|
-
a: this._a,
|
|
171
|
-
};
|
|
172
|
-
},
|
|
173
|
-
toPercentageRgbString: function () {
|
|
174
|
-
return this._a == 1
|
|
175
|
-
? "rgb(" +
|
|
176
|
-
Math.round(bound01(this._r, 255) * 100) +
|
|
177
|
-
"%, " +
|
|
178
|
-
Math.round(bound01(this._g, 255) * 100) +
|
|
179
|
-
"%, " +
|
|
180
|
-
Math.round(bound01(this._b, 255) * 100) +
|
|
181
|
-
"%)"
|
|
182
|
-
: "rgba(" +
|
|
183
|
-
Math.round(bound01(this._r, 255) * 100) +
|
|
184
|
-
"%, " +
|
|
185
|
-
Math.round(bound01(this._g, 255) * 100) +
|
|
186
|
-
"%, " +
|
|
187
|
-
Math.round(bound01(this._b, 255) * 100) +
|
|
188
|
-
"%, " +
|
|
189
|
-
this._roundA +
|
|
190
|
-
")";
|
|
191
|
-
},
|
|
192
|
-
toName: function () {
|
|
193
|
-
if (this._a === 0) {
|
|
194
|
-
return "transparent";
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (this._a < 1) {
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
|
|
202
|
-
},
|
|
203
|
-
toFilter: function (secondColor) {
|
|
204
|
-
var hex8String = "#" + rgbaToArgbHex(this._r, this._g, this._b, this._a);
|
|
205
|
-
var secondHex8String = hex8String;
|
|
206
|
-
var gradientType = this._gradientType ? "GradientType = 1, " : "";
|
|
207
|
-
|
|
208
|
-
if (secondColor) {
|
|
209
|
-
var s = tinycolor(secondColor);
|
|
210
|
-
secondHex8String = "#" + rgbaToArgbHex(s._r, s._g, s._b, s._a);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return (
|
|
214
|
-
"progid:DXImageTransform.Microsoft.gradient(" +
|
|
215
|
-
gradientType +
|
|
216
|
-
"startColorstr=" +
|
|
217
|
-
hex8String +
|
|
218
|
-
",endColorstr=" +
|
|
219
|
-
secondHex8String +
|
|
220
|
-
")"
|
|
221
|
-
);
|
|
222
|
-
},
|
|
223
|
-
toString: function (format) {
|
|
224
|
-
var formatSet = !!format;
|
|
225
|
-
format = format || this._format;
|
|
226
|
-
|
|
227
|
-
var formattedString = false;
|
|
228
|
-
var hasAlpha = this._a < 1 && this._a >= 0;
|
|
229
|
-
var needsAlphaFormat =
|
|
230
|
-
!formatSet &&
|
|
231
|
-
hasAlpha &&
|
|
232
|
-
(format === "hex" ||
|
|
233
|
-
format === "hex6" ||
|
|
234
|
-
format === "hex3" ||
|
|
235
|
-
format === "hex4" ||
|
|
236
|
-
format === "hex8" ||
|
|
237
|
-
format === "name");
|
|
238
|
-
|
|
239
|
-
if (needsAlphaFormat) {
|
|
240
|
-
// Special case for "transparent", all other non-alpha formats
|
|
241
|
-
// will return rgba when there is transparency.
|
|
242
|
-
if (format === "name" && this._a === 0) {
|
|
243
|
-
return this.toName();
|
|
244
|
-
}
|
|
245
|
-
return this.toRgbString();
|
|
246
|
-
}
|
|
247
|
-
if (format === "rgb") {
|
|
248
|
-
formattedString = this.toRgbString();
|
|
249
|
-
}
|
|
250
|
-
if (format === "prgb") {
|
|
251
|
-
formattedString = this.toPercentageRgbString();
|
|
252
|
-
}
|
|
253
|
-
if (format === "hex" || format === "hex6") {
|
|
254
|
-
formattedString = this.toHexString();
|
|
255
|
-
}
|
|
256
|
-
if (format === "hex3") {
|
|
257
|
-
formattedString = this.toHexString(true);
|
|
258
|
-
}
|
|
259
|
-
if (format === "hex4") {
|
|
260
|
-
formattedString = this.toHex8String(true);
|
|
261
|
-
}
|
|
262
|
-
if (format === "hex8") {
|
|
263
|
-
formattedString = this.toHex8String();
|
|
264
|
-
}
|
|
265
|
-
if (format === "name") {
|
|
266
|
-
formattedString = this.toName();
|
|
267
|
-
}
|
|
268
|
-
if (format === "hsl") {
|
|
269
|
-
formattedString = this.toHslString();
|
|
270
|
-
}
|
|
271
|
-
if (format === "hsv") {
|
|
272
|
-
formattedString = this.toHsvString();
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
return formattedString || this.toHexString();
|
|
276
|
-
},
|
|
277
|
-
clone: function () {
|
|
278
|
-
return tinycolor(this.toString());
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
_applyModification: function (fn, args) {
|
|
282
|
-
var color = fn.apply(null, [this].concat([].slice.call(args)));
|
|
283
|
-
this._r = color._r;
|
|
284
|
-
this._g = color._g;
|
|
285
|
-
this._b = color._b;
|
|
286
|
-
this.setAlpha(color._a);
|
|
287
|
-
return this;
|
|
288
|
-
},
|
|
289
|
-
lighten: function () {
|
|
290
|
-
return this._applyModification(lighten, arguments);
|
|
291
|
-
},
|
|
292
|
-
brighten: function () {
|
|
293
|
-
return this._applyModification(brighten, arguments);
|
|
294
|
-
},
|
|
295
|
-
darken: function () {
|
|
296
|
-
return this._applyModification(darken, arguments);
|
|
297
|
-
},
|
|
298
|
-
desaturate: function () {
|
|
299
|
-
return this._applyModification(desaturate, arguments);
|
|
300
|
-
},
|
|
301
|
-
saturate: function () {
|
|
302
|
-
return this._applyModification(saturate, arguments);
|
|
303
|
-
},
|
|
304
|
-
greyscale: function () {
|
|
305
|
-
return this._applyModification(greyscale, arguments);
|
|
306
|
-
},
|
|
307
|
-
spin: function () {
|
|
308
|
-
return this._applyModification(spin, arguments);
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
_applyCombination: function (fn, args) {
|
|
312
|
-
return fn.apply(null, [this].concat([].slice.call(args)));
|
|
313
|
-
},
|
|
314
|
-
analogous: function () {
|
|
315
|
-
return this._applyCombination(analogous, arguments);
|
|
316
|
-
},
|
|
317
|
-
complement: function () {
|
|
318
|
-
return this._applyCombination(complement, arguments);
|
|
319
|
-
},
|
|
320
|
-
monochromatic: function () {
|
|
321
|
-
return this._applyCombination(monochromatic, arguments);
|
|
322
|
-
},
|
|
323
|
-
splitcomplement: function () {
|
|
324
|
-
return this._applyCombination(splitcomplement, arguments);
|
|
325
|
-
},
|
|
326
|
-
// Disabled until https://github.com/bgrins/TinyColor/issues/254
|
|
327
|
-
// polyad: function (number) {
|
|
328
|
-
// return this._applyCombination(polyad, [number]);
|
|
329
|
-
// },
|
|
330
|
-
triad: function () {
|
|
331
|
-
return this._applyCombination(polyad, [3]);
|
|
332
|
-
},
|
|
333
|
-
tetrad: function () {
|
|
334
|
-
return this._applyCombination(polyad, [4]);
|
|
335
|
-
},
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
// If input is an object, force 1 into "1.0" to handle ratios properly
|
|
339
|
-
// String input requires "1.0" as input, so 1 will be treated as 1
|
|
340
|
-
tinycolor.fromRatio = function (color, opts) {
|
|
341
|
-
if (typeof color == "object") {
|
|
342
|
-
var newColor = {};
|
|
343
|
-
for (var i in color) {
|
|
344
|
-
if (color.hasOwnProperty(i)) {
|
|
345
|
-
if (i === "a") {
|
|
346
|
-
newColor[i] = color[i];
|
|
347
|
-
} else {
|
|
348
|
-
newColor[i] = convertToPercentage(color[i]);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
color = newColor;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
return tinycolor(color, opts);
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
// Given a string or object, convert that input to RGB
|
|
359
|
-
// Possible string inputs:
|
|
360
|
-
//
|
|
361
|
-
// "red"
|
|
362
|
-
// "#f00" or "f00"
|
|
363
|
-
// "#ff0000" or "ff0000"
|
|
364
|
-
// "#ff000000" or "ff000000"
|
|
365
|
-
// "rgb 255 0 0" or "rgb (255, 0, 0)"
|
|
366
|
-
// "rgb 1.0 0 0" or "rgb (1, 0, 0)"
|
|
367
|
-
// "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
|
|
368
|
-
// "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
|
|
369
|
-
// "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
|
|
370
|
-
// "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
|
|
371
|
-
// "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
|
|
372
|
-
//
|
|
373
|
-
function inputToRGB(color) {
|
|
374
|
-
var rgb = { r: 0, g: 0, b: 0 };
|
|
375
|
-
var a = 1;
|
|
376
|
-
var s = null;
|
|
377
|
-
var v = null;
|
|
378
|
-
var l = null;
|
|
379
|
-
var ok = false;
|
|
380
|
-
var format = false;
|
|
381
|
-
|
|
382
|
-
if (typeof color == "string") {
|
|
383
|
-
color = stringInputToObject(color);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
if (typeof color == "object") {
|
|
387
|
-
if (
|
|
388
|
-
isValidCSSUnit(color.r) &&
|
|
389
|
-
isValidCSSUnit(color.g) &&
|
|
390
|
-
isValidCSSUnit(color.b)
|
|
391
|
-
) {
|
|
392
|
-
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
393
|
-
ok = true;
|
|
394
|
-
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
395
|
-
} else if (
|
|
396
|
-
isValidCSSUnit(color.h) &&
|
|
397
|
-
isValidCSSUnit(color.s) &&
|
|
398
|
-
isValidCSSUnit(color.v)
|
|
399
|
-
) {
|
|
400
|
-
s = convertToPercentage(color.s);
|
|
401
|
-
v = convertToPercentage(color.v);
|
|
402
|
-
rgb = hsvToRgb(color.h, s, v);
|
|
403
|
-
ok = true;
|
|
404
|
-
format = "hsv";
|
|
405
|
-
} else if (
|
|
406
|
-
isValidCSSUnit(color.h) &&
|
|
407
|
-
isValidCSSUnit(color.s) &&
|
|
408
|
-
isValidCSSUnit(color.l)
|
|
409
|
-
) {
|
|
410
|
-
s = convertToPercentage(color.s);
|
|
411
|
-
l = convertToPercentage(color.l);
|
|
412
|
-
rgb = hslToRgb(color.h, s, l);
|
|
413
|
-
ok = true;
|
|
414
|
-
format = "hsl";
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (color.hasOwnProperty("a")) {
|
|
418
|
-
a = color.a;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
a = boundAlpha(a);
|
|
423
|
-
|
|
424
|
-
return {
|
|
425
|
-
ok: ok,
|
|
426
|
-
format: color.format || format,
|
|
427
|
-
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
428
|
-
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
429
|
-
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
430
|
-
a: a,
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
// Conversion Functions
|
|
435
|
-
// --------------------
|
|
436
|
-
|
|
437
|
-
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
|
|
438
|
-
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
|
|
439
|
-
|
|
440
|
-
// `rgbToRgb`
|
|
441
|
-
// Handle bounds / percentage checking to conform to CSS color spec
|
|
442
|
-
// <http://www.w3.org/TR/css3-color/>
|
|
443
|
-
// *Assumes:* r, g, b in [0, 255] or [0, 1]
|
|
444
|
-
// *Returns:* { r, g, b } in [0, 255]
|
|
445
|
-
function rgbToRgb(r, g, b) {
|
|
446
|
-
return {
|
|
447
|
-
r: bound01(r, 255) * 255,
|
|
448
|
-
g: bound01(g, 255) * 255,
|
|
449
|
-
b: bound01(b, 255) * 255,
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// `rgbToHsl`
|
|
454
|
-
// Converts an RGB color value to HSL.
|
|
455
|
-
// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
|
|
456
|
-
// *Returns:* { h, s, l } in [0,1]
|
|
457
|
-
function rgbToHsl(r, g, b) {
|
|
458
|
-
r = bound01(r, 255);
|
|
459
|
-
g = bound01(g, 255);
|
|
460
|
-
b = bound01(b, 255);
|
|
461
|
-
|
|
462
|
-
var max = Math.max(r, g, b),
|
|
463
|
-
min = Math.min(r, g, b);
|
|
464
|
-
var h,
|
|
465
|
-
s,
|
|
466
|
-
l = (max + min) / 2;
|
|
467
|
-
|
|
468
|
-
if (max == min) {
|
|
469
|
-
h = s = 0; // achromatic
|
|
470
|
-
} else {
|
|
471
|
-
var d = max - min;
|
|
472
|
-
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
473
|
-
switch (max) {
|
|
474
|
-
case r:
|
|
475
|
-
h = (g - b) / d + (g < b ? 6 : 0);
|
|
476
|
-
break;
|
|
477
|
-
case g:
|
|
478
|
-
h = (b - r) / d + 2;
|
|
479
|
-
break;
|
|
480
|
-
case b:
|
|
481
|
-
h = (r - g) / d + 4;
|
|
482
|
-
break;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
h /= 6;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
return { h: h, s: s, l: l };
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
// `hslToRgb`
|
|
492
|
-
// Converts an HSL color value to RGB.
|
|
493
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
|
|
494
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
495
|
-
function hslToRgb(h, s, l) {
|
|
496
|
-
var r, g, b;
|
|
497
|
-
|
|
498
|
-
h = bound01(h, 360);
|
|
499
|
-
s = bound01(s, 100);
|
|
500
|
-
l = bound01(l, 100);
|
|
501
|
-
|
|
502
|
-
function hue2rgb(p, q, t) {
|
|
503
|
-
if (t < 0) t += 1;
|
|
504
|
-
if (t > 1) t -= 1;
|
|
505
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
506
|
-
if (t < 1 / 2) return q;
|
|
507
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
508
|
-
return p;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
if (s === 0) {
|
|
512
|
-
r = g = b = l; // achromatic
|
|
513
|
-
} else {
|
|
514
|
-
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
515
|
-
var p = 2 * l - q;
|
|
516
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
517
|
-
g = hue2rgb(p, q, h);
|
|
518
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// `rgbToHsv`
|
|
525
|
-
// Converts an RGB color value to HSV
|
|
526
|
-
// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
|
|
527
|
-
// *Returns:* { h, s, v } in [0,1]
|
|
528
|
-
function rgbToHsv(r, g, b) {
|
|
529
|
-
r = bound01(r, 255);
|
|
530
|
-
g = bound01(g, 255);
|
|
531
|
-
b = bound01(b, 255);
|
|
532
|
-
|
|
533
|
-
var max = Math.max(r, g, b),
|
|
534
|
-
min = Math.min(r, g, b);
|
|
535
|
-
var h,
|
|
536
|
-
s,
|
|
537
|
-
v = max;
|
|
538
|
-
|
|
539
|
-
var d = max - min;
|
|
540
|
-
s = max === 0 ? 0 : d / max;
|
|
541
|
-
|
|
542
|
-
if (max == min) {
|
|
543
|
-
h = 0; // achromatic
|
|
544
|
-
} else {
|
|
545
|
-
switch (max) {
|
|
546
|
-
case r:
|
|
547
|
-
h = (g - b) / d + (g < b ? 6 : 0);
|
|
548
|
-
break;
|
|
549
|
-
case g:
|
|
550
|
-
h = (b - r) / d + 2;
|
|
551
|
-
break;
|
|
552
|
-
case b:
|
|
553
|
-
h = (r - g) / d + 4;
|
|
554
|
-
break;
|
|
555
|
-
}
|
|
556
|
-
h /= 6;
|
|
557
|
-
}
|
|
558
|
-
return { h: h, s: s, v: v };
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
// `hsvToRgb`
|
|
562
|
-
// Converts an HSV color value to RGB.
|
|
563
|
-
// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
|
|
564
|
-
// *Returns:* { r, g, b } in the set [0, 255]
|
|
565
|
-
function hsvToRgb(h, s, v) {
|
|
566
|
-
h = bound01(h, 360) * 6;
|
|
567
|
-
s = bound01(s, 100);
|
|
568
|
-
v = bound01(v, 100);
|
|
569
|
-
|
|
570
|
-
var i = Math.floor(h),
|
|
571
|
-
f = h - i,
|
|
572
|
-
p = v * (1 - s),
|
|
573
|
-
q = v * (1 - f * s),
|
|
574
|
-
t = v * (1 - (1 - f) * s),
|
|
575
|
-
mod = i % 6,
|
|
576
|
-
r = [v, q, p, p, t, v][mod],
|
|
577
|
-
g = [t, v, v, q, p, p][mod],
|
|
578
|
-
b = [p, p, t, v, v, q][mod];
|
|
579
|
-
|
|
580
|
-
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
// `rgbToHex`
|
|
584
|
-
// Converts an RGB color to hex
|
|
585
|
-
// Assumes r, g, and b are contained in the set [0, 255]
|
|
586
|
-
// Returns a 3 or 6 character hex
|
|
587
|
-
function rgbToHex(r, g, b, allow3Char) {
|
|
588
|
-
var hex = [
|
|
589
|
-
pad2(Math.round(r).toString(16)),
|
|
590
|
-
pad2(Math.round(g).toString(16)),
|
|
591
|
-
pad2(Math.round(b).toString(16)),
|
|
592
|
-
];
|
|
593
|
-
|
|
594
|
-
// Return a 3 character hex if possible
|
|
595
|
-
if (
|
|
596
|
-
allow3Char &&
|
|
597
|
-
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
598
|
-
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
599
|
-
hex[2].charAt(0) == hex[2].charAt(1)
|
|
600
|
-
) {
|
|
601
|
-
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
return hex.join("");
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
// `rgbaToHex`
|
|
608
|
-
// Converts an RGBA color plus alpha transparency to hex
|
|
609
|
-
// Assumes r, g, b are contained in the set [0, 255] and
|
|
610
|
-
// a in [0, 1]. Returns a 4 or 8 character rgba hex
|
|
611
|
-
function rgbaToHex(r, g, b, a, allow4Char) {
|
|
612
|
-
var hex = [
|
|
613
|
-
pad2(Math.round(r).toString(16)),
|
|
614
|
-
pad2(Math.round(g).toString(16)),
|
|
615
|
-
pad2(Math.round(b).toString(16)),
|
|
616
|
-
pad2(convertDecimalToHex(a)),
|
|
617
|
-
];
|
|
618
|
-
|
|
619
|
-
// Return a 4 character hex if possible
|
|
620
|
-
if (
|
|
621
|
-
allow4Char &&
|
|
622
|
-
hex[0].charAt(0) == hex[0].charAt(1) &&
|
|
623
|
-
hex[1].charAt(0) == hex[1].charAt(1) &&
|
|
624
|
-
hex[2].charAt(0) == hex[2].charAt(1) &&
|
|
625
|
-
hex[3].charAt(0) == hex[3].charAt(1)
|
|
626
|
-
) {
|
|
627
|
-
return (
|
|
628
|
-
hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0)
|
|
629
|
-
);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
return hex.join("");
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
// `rgbaToArgbHex`
|
|
636
|
-
// Converts an RGBA color to an ARGB Hex8 string
|
|
637
|
-
// Rarely used, but required for "toFilter()"
|
|
638
|
-
function rgbaToArgbHex(r, g, b, a) {
|
|
639
|
-
var hex = [
|
|
640
|
-
pad2(convertDecimalToHex(a)),
|
|
641
|
-
pad2(Math.round(r).toString(16)),
|
|
642
|
-
pad2(Math.round(g).toString(16)),
|
|
643
|
-
pad2(Math.round(b).toString(16)),
|
|
644
|
-
];
|
|
645
|
-
|
|
646
|
-
return hex.join("");
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
// `equals`
|
|
650
|
-
// Can be called with any tinycolor input
|
|
651
|
-
tinycolor.equals = function (color1, color2) {
|
|
652
|
-
if (!color1 || !color2) return false;
|
|
653
|
-
return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
|
|
654
|
-
};
|
|
655
|
-
|
|
656
|
-
tinycolor.random = function () {
|
|
657
|
-
return tinycolor.fromRatio({
|
|
658
|
-
r: Math.random(),
|
|
659
|
-
g: Math.random(),
|
|
660
|
-
b: Math.random(),
|
|
661
|
-
});
|
|
662
|
-
};
|
|
663
|
-
|
|
664
|
-
// Modification Functions
|
|
665
|
-
// ----------------------
|
|
666
|
-
// Thanks to less.js for some of the basics here
|
|
667
|
-
// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
|
|
668
|
-
|
|
669
|
-
function desaturate(color, amount) {
|
|
670
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
671
|
-
var hsl = tinycolor(color).toHsl();
|
|
672
|
-
hsl.s -= amount / 100;
|
|
673
|
-
hsl.s = clamp01(hsl.s);
|
|
674
|
-
return tinycolor(hsl);
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
function saturate(color, amount) {
|
|
678
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
679
|
-
var hsl = tinycolor(color).toHsl();
|
|
680
|
-
hsl.s += amount / 100;
|
|
681
|
-
hsl.s = clamp01(hsl.s);
|
|
682
|
-
return tinycolor(hsl);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
function greyscale(color) {
|
|
686
|
-
return tinycolor(color).desaturate(100);
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
function lighten(color, amount) {
|
|
690
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
691
|
-
var hsl = tinycolor(color).toHsl();
|
|
692
|
-
hsl.l += amount / 100;
|
|
693
|
-
hsl.l = clamp01(hsl.l);
|
|
694
|
-
return tinycolor(hsl);
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
function brighten(color, amount) {
|
|
698
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
699
|
-
var rgb = tinycolor(color).toRgb();
|
|
700
|
-
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
|
|
701
|
-
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
|
|
702
|
-
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
|
|
703
|
-
return tinycolor(rgb);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
function darken(color, amount) {
|
|
707
|
-
amount = amount === 0 ? 0 : amount || 10;
|
|
708
|
-
var hsl = tinycolor(color).toHsl();
|
|
709
|
-
hsl.l -= amount / 100;
|
|
710
|
-
hsl.l = clamp01(hsl.l);
|
|
711
|
-
return tinycolor(hsl);
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
|
|
715
|
-
// Values outside of this range will be wrapped into this range.
|
|
716
|
-
function spin(color, amount) {
|
|
717
|
-
var hsl = tinycolor(color).toHsl();
|
|
718
|
-
var hue = (hsl.h + amount) % 360;
|
|
719
|
-
hsl.h = hue < 0 ? 360 + hue : hue;
|
|
720
|
-
return tinycolor(hsl);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
// Combination Functions
|
|
724
|
-
// ---------------------
|
|
725
|
-
// Thanks to jQuery xColor for some of the ideas behind these
|
|
726
|
-
// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
|
|
727
|
-
|
|
728
|
-
function complement(color) {
|
|
729
|
-
var hsl = tinycolor(color).toHsl();
|
|
730
|
-
hsl.h = (hsl.h + 180) % 360;
|
|
731
|
-
return tinycolor(hsl);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
function polyad(color, number) {
|
|
735
|
-
if (isNaN(number) || number <= 0) {
|
|
736
|
-
throw new Error("Argument to polyad must be a positive number");
|
|
737
|
-
}
|
|
738
|
-
var hsl = tinycolor(color).toHsl();
|
|
739
|
-
var result = [tinycolor(color)];
|
|
740
|
-
var step = 360 / number;
|
|
741
|
-
for (var i = 1; i < number; i++) {
|
|
742
|
-
result.push(tinycolor({ h: (hsl.h + i * step) % 360, s: hsl.s, l: hsl.l }));
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
return result;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
function splitcomplement(color) {
|
|
749
|
-
var hsl = tinycolor(color).toHsl();
|
|
750
|
-
var h = hsl.h;
|
|
751
|
-
return [
|
|
752
|
-
tinycolor(color),
|
|
753
|
-
tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
|
|
754
|
-
tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),
|
|
755
|
-
];
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
function analogous(color, results, slices) {
|
|
759
|
-
results = results || 6;
|
|
760
|
-
slices = slices || 30;
|
|
761
|
-
|
|
762
|
-
var hsl = tinycolor(color).toHsl();
|
|
763
|
-
var part = 360 / slices;
|
|
764
|
-
var ret = [tinycolor(color)];
|
|
765
|
-
|
|
766
|
-
for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {
|
|
767
|
-
hsl.h = (hsl.h + part) % 360;
|
|
768
|
-
ret.push(tinycolor(hsl));
|
|
769
|
-
}
|
|
770
|
-
return ret;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
function monochromatic(color, results) {
|
|
774
|
-
results = results || 6;
|
|
775
|
-
var hsv = tinycolor(color).toHsv();
|
|
776
|
-
var h = hsv.h,
|
|
777
|
-
s = hsv.s,
|
|
778
|
-
v = hsv.v;
|
|
779
|
-
var ret = [];
|
|
780
|
-
var modification = 1 / results;
|
|
781
|
-
|
|
782
|
-
while (results--) {
|
|
783
|
-
ret.push(tinycolor({ h: h, s: s, v: v }));
|
|
784
|
-
v = (v + modification) % 1;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
return ret;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// Utility Functions
|
|
791
|
-
// ---------------------
|
|
792
|
-
|
|
793
|
-
tinycolor.mix = function (color1, color2, amount) {
|
|
794
|
-
amount = amount === 0 ? 0 : amount || 50;
|
|
795
|
-
|
|
796
|
-
var rgb1 = tinycolor(color1).toRgb();
|
|
797
|
-
var rgb2 = tinycolor(color2).toRgb();
|
|
798
|
-
|
|
799
|
-
var p = amount / 100;
|
|
800
|
-
|
|
801
|
-
var rgba = {
|
|
802
|
-
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
803
|
-
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
804
|
-
b: (rgb2.b - rgb1.b) * p + rgb1.b,
|
|
805
|
-
a: (rgb2.a - rgb1.a) * p + rgb1.a,
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
return tinycolor(rgba);
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
// Readability Functions
|
|
812
|
-
// ---------------------
|
|
813
|
-
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
814
|
-
|
|
815
|
-
// `contrast`
|
|
816
|
-
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
817
|
-
tinycolor.readability = function (color1, color2) {
|
|
818
|
-
var c1 = tinycolor(color1);
|
|
819
|
-
var c2 = tinycolor(color2);
|
|
820
|
-
return (
|
|
821
|
-
(Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) /
|
|
822
|
-
(Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05)
|
|
823
|
-
);
|
|
824
|
-
};
|
|
825
|
-
|
|
826
|
-
// `isReadable`
|
|
827
|
-
// Ensure that foreground and background color combinations meet WCAG2 guidelines.
|
|
828
|
-
// The third argument is an optional Object.
|
|
829
|
-
// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';
|
|
830
|
-
// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.
|
|
831
|
-
// If the entire object is absent, isReadable defaults to {level:"AA",size:"small"}.
|
|
832
|
-
|
|
833
|
-
// *Example*
|
|
834
|
-
// tinycolor.isReadable("#000", "#111") => false
|
|
835
|
-
// tinycolor.isReadable("#000", "#111",{level:"AA",size:"large"}) => false
|
|
836
|
-
tinycolor.isReadable = function (color1, color2, wcag2) {
|
|
837
|
-
var readability = tinycolor.readability(color1, color2);
|
|
838
|
-
var wcag2Parms, out;
|
|
839
|
-
|
|
840
|
-
out = false;
|
|
841
|
-
|
|
842
|
-
wcag2Parms = validateWCAG2Parms(wcag2);
|
|
843
|
-
switch (wcag2Parms.level + wcag2Parms.size) {
|
|
844
|
-
case "AAsmall":
|
|
845
|
-
case "AAAlarge":
|
|
846
|
-
out = readability >= 4.5;
|
|
847
|
-
break;
|
|
848
|
-
case "AAlarge":
|
|
849
|
-
out = readability >= 3;
|
|
850
|
-
break;
|
|
851
|
-
case "AAAsmall":
|
|
852
|
-
out = readability >= 7;
|
|
853
|
-
break;
|
|
854
|
-
}
|
|
855
|
-
return out;
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
// `mostReadable`
|
|
859
|
-
// Given a base color and a list of possible foreground or background
|
|
860
|
-
// colors for that base, returns the most readable color.
|
|
861
|
-
// Optionally returns Black or White if the most readable color is unreadable.
|
|
862
|
-
// *Example*
|
|
863
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:false}).toHexString(); // "#112255"
|
|
864
|
-
// tinycolor.mostReadable(tinycolor.mostReadable("#123", ["#124", "#125"],{includeFallbackColors:true}).toHexString(); // "#ffffff"
|
|
865
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"large"}).toHexString(); // "#faf3f3"
|
|
866
|
-
// tinycolor.mostReadable("#a8015a", ["#faf3f3"],{includeFallbackColors:true,level:"AAA",size:"small"}).toHexString(); // "#ffffff"
|
|
867
|
-
tinycolor.mostReadable = function (baseColor, colorList, args) {
|
|
868
|
-
var bestColor = null;
|
|
869
|
-
var bestScore = 0;
|
|
870
|
-
var readability;
|
|
871
|
-
var includeFallbackColors, level, size;
|
|
872
|
-
args = args || {};
|
|
873
|
-
includeFallbackColors = args.includeFallbackColors;
|
|
874
|
-
level = args.level;
|
|
875
|
-
size = args.size;
|
|
876
|
-
|
|
877
|
-
for (var i = 0; i < colorList.length; i++) {
|
|
878
|
-
readability = tinycolor.readability(baseColor, colorList[i]);
|
|
879
|
-
if (readability > bestScore) {
|
|
880
|
-
bestScore = readability;
|
|
881
|
-
bestColor = tinycolor(colorList[i]);
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
if (
|
|
886
|
-
tinycolor.isReadable(baseColor, bestColor, {
|
|
887
|
-
level: level,
|
|
888
|
-
size: size,
|
|
889
|
-
}) ||
|
|
890
|
-
!includeFallbackColors
|
|
891
|
-
) {
|
|
892
|
-
return bestColor;
|
|
893
|
-
} else {
|
|
894
|
-
args.includeFallbackColors = false;
|
|
895
|
-
return tinycolor.mostReadable(baseColor, ["#fff", "#000"], args);
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
|
|
899
|
-
// Big List of Colors
|
|
900
|
-
// ------------------
|
|
901
|
-
// <https://www.w3.org/TR/css-color-4/#named-colors>
|
|
902
|
-
var names = (tinycolor.names = {
|
|
903
|
-
aliceblue: "f0f8ff",
|
|
904
|
-
antiquewhite: "faebd7",
|
|
905
|
-
aqua: "0ff",
|
|
906
|
-
aquamarine: "7fffd4",
|
|
907
|
-
azure: "f0ffff",
|
|
908
|
-
beige: "f5f5dc",
|
|
909
|
-
bisque: "ffe4c4",
|
|
910
|
-
black: "000",
|
|
911
|
-
blanchedalmond: "ffebcd",
|
|
912
|
-
blue: "00f",
|
|
913
|
-
blueviolet: "8a2be2",
|
|
914
|
-
brown: "a52a2a",
|
|
915
|
-
burlywood: "deb887",
|
|
916
|
-
burntsienna: "ea7e5d",
|
|
917
|
-
cadetblue: "5f9ea0",
|
|
918
|
-
chartreuse: "7fff00",
|
|
919
|
-
chocolate: "d2691e",
|
|
920
|
-
coral: "ff7f50",
|
|
921
|
-
cornflowerblue: "6495ed",
|
|
922
|
-
cornsilk: "fff8dc",
|
|
923
|
-
crimson: "dc143c",
|
|
924
|
-
cyan: "0ff",
|
|
925
|
-
darkblue: "00008b",
|
|
926
|
-
darkcyan: "008b8b",
|
|
927
|
-
darkgoldenrod: "b8860b",
|
|
928
|
-
darkgray: "a9a9a9",
|
|
929
|
-
darkgreen: "006400",
|
|
930
|
-
darkgrey: "a9a9a9",
|
|
931
|
-
darkkhaki: "bdb76b",
|
|
932
|
-
darkmagenta: "8b008b",
|
|
933
|
-
darkolivegreen: "556b2f",
|
|
934
|
-
darkorange: "ff8c00",
|
|
935
|
-
darkorchid: "9932cc",
|
|
936
|
-
darkred: "8b0000",
|
|
937
|
-
darksalmon: "e9967a",
|
|
938
|
-
darkseagreen: "8fbc8f",
|
|
939
|
-
darkslateblue: "483d8b",
|
|
940
|
-
darkslategray: "2f4f4f",
|
|
941
|
-
darkslategrey: "2f4f4f",
|
|
942
|
-
darkturquoise: "00ced1",
|
|
943
|
-
darkviolet: "9400d3",
|
|
944
|
-
deeppink: "ff1493",
|
|
945
|
-
deepskyblue: "00bfff",
|
|
946
|
-
dimgray: "696969",
|
|
947
|
-
dimgrey: "696969",
|
|
948
|
-
dodgerblue: "1e90ff",
|
|
949
|
-
firebrick: "b22222",
|
|
950
|
-
floralwhite: "fffaf0",
|
|
951
|
-
forestgreen: "228b22",
|
|
952
|
-
fuchsia: "f0f",
|
|
953
|
-
gainsboro: "dcdcdc",
|
|
954
|
-
ghostwhite: "f8f8ff",
|
|
955
|
-
gold: "ffd700",
|
|
956
|
-
goldenrod: "daa520",
|
|
957
|
-
gray: "808080",
|
|
958
|
-
green: "008000",
|
|
959
|
-
greenyellow: "adff2f",
|
|
960
|
-
grey: "808080",
|
|
961
|
-
honeydew: "f0fff0",
|
|
962
|
-
hotpink: "ff69b4",
|
|
963
|
-
indianred: "cd5c5c",
|
|
964
|
-
indigo: "4b0082",
|
|
965
|
-
ivory: "fffff0",
|
|
966
|
-
khaki: "f0e68c",
|
|
967
|
-
lavender: "e6e6fa",
|
|
968
|
-
lavenderblush: "fff0f5",
|
|
969
|
-
lawngreen: "7cfc00",
|
|
970
|
-
lemonchiffon: "fffacd",
|
|
971
|
-
lightblue: "add8e6",
|
|
972
|
-
lightcoral: "f08080",
|
|
973
|
-
lightcyan: "e0ffff",
|
|
974
|
-
lightgoldenrodyellow: "fafad2",
|
|
975
|
-
lightgray: "d3d3d3",
|
|
976
|
-
lightgreen: "90ee90",
|
|
977
|
-
lightgrey: "d3d3d3",
|
|
978
|
-
lightpink: "ffb6c1",
|
|
979
|
-
lightsalmon: "ffa07a",
|
|
980
|
-
lightseagreen: "20b2aa",
|
|
981
|
-
lightskyblue: "87cefa",
|
|
982
|
-
lightslategray: "789",
|
|
983
|
-
lightslategrey: "789",
|
|
984
|
-
lightsteelblue: "b0c4de",
|
|
985
|
-
lightyellow: "ffffe0",
|
|
986
|
-
lime: "0f0",
|
|
987
|
-
limegreen: "32cd32",
|
|
988
|
-
linen: "faf0e6",
|
|
989
|
-
magenta: "f0f",
|
|
990
|
-
maroon: "800000",
|
|
991
|
-
mediumaquamarine: "66cdaa",
|
|
992
|
-
mediumblue: "0000cd",
|
|
993
|
-
mediumorchid: "ba55d3",
|
|
994
|
-
mediumpurple: "9370db",
|
|
995
|
-
mediumseagreen: "3cb371",
|
|
996
|
-
mediumslateblue: "7b68ee",
|
|
997
|
-
mediumspringgreen: "00fa9a",
|
|
998
|
-
mediumturquoise: "48d1cc",
|
|
999
|
-
mediumvioletred: "c71585",
|
|
1000
|
-
midnightblue: "191970",
|
|
1001
|
-
mintcream: "f5fffa",
|
|
1002
|
-
mistyrose: "ffe4e1",
|
|
1003
|
-
moccasin: "ffe4b5",
|
|
1004
|
-
navajowhite: "ffdead",
|
|
1005
|
-
navy: "000080",
|
|
1006
|
-
oldlace: "fdf5e6",
|
|
1007
|
-
olive: "808000",
|
|
1008
|
-
olivedrab: "6b8e23",
|
|
1009
|
-
orange: "ffa500",
|
|
1010
|
-
orangered: "ff4500",
|
|
1011
|
-
orchid: "da70d6",
|
|
1012
|
-
palegoldenrod: "eee8aa",
|
|
1013
|
-
palegreen: "98fb98",
|
|
1014
|
-
paleturquoise: "afeeee",
|
|
1015
|
-
palevioletred: "db7093",
|
|
1016
|
-
papayawhip: "ffefd5",
|
|
1017
|
-
peachpuff: "ffdab9",
|
|
1018
|
-
peru: "cd853f",
|
|
1019
|
-
pink: "ffc0cb",
|
|
1020
|
-
plum: "dda0dd",
|
|
1021
|
-
powderblue: "b0e0e6",
|
|
1022
|
-
purple: "800080",
|
|
1023
|
-
rebeccapurple: "663399",
|
|
1024
|
-
red: "f00",
|
|
1025
|
-
rosybrown: "bc8f8f",
|
|
1026
|
-
royalblue: "4169e1",
|
|
1027
|
-
saddlebrown: "8b4513",
|
|
1028
|
-
salmon: "fa8072",
|
|
1029
|
-
sandybrown: "f4a460",
|
|
1030
|
-
seagreen: "2e8b57",
|
|
1031
|
-
seashell: "fff5ee",
|
|
1032
|
-
sienna: "a0522d",
|
|
1033
|
-
silver: "c0c0c0",
|
|
1034
|
-
skyblue: "87ceeb",
|
|
1035
|
-
slateblue: "6a5acd",
|
|
1036
|
-
slategray: "708090",
|
|
1037
|
-
slategrey: "708090",
|
|
1038
|
-
snow: "fffafa",
|
|
1039
|
-
springgreen: "00ff7f",
|
|
1040
|
-
steelblue: "4682b4",
|
|
1041
|
-
tan: "d2b48c",
|
|
1042
|
-
teal: "008080",
|
|
1043
|
-
thistle: "d8bfd8",
|
|
1044
|
-
tomato: "ff6347",
|
|
1045
|
-
turquoise: "40e0d0",
|
|
1046
|
-
violet: "ee82ee",
|
|
1047
|
-
wheat: "f5deb3",
|
|
1048
|
-
white: "fff",
|
|
1049
|
-
whitesmoke: "f5f5f5",
|
|
1050
|
-
yellow: "ff0",
|
|
1051
|
-
yellowgreen: "9acd32",
|
|
1052
|
-
});
|
|
1053
|
-
|
|
1054
|
-
// Make it easy to access colors via `hexNames[hex]`
|
|
1055
|
-
var hexNames = (tinycolor.hexNames = flip(names));
|
|
1056
|
-
|
|
1057
|
-
// Utilities
|
|
1058
|
-
// ---------
|
|
1059
|
-
|
|
1060
|
-
// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
|
|
1061
|
-
function flip(o) {
|
|
1062
|
-
var flipped = {};
|
|
1063
|
-
for (var i in o) {
|
|
1064
|
-
if (o.hasOwnProperty(i)) {
|
|
1065
|
-
flipped[o[i]] = i;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
return flipped;
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
// Return a valid alpha value [0,1] with all invalid values being set to 1
|
|
1072
|
-
function boundAlpha(a) {
|
|
1073
|
-
a = parseFloat(a);
|
|
1074
|
-
|
|
1075
|
-
if (isNaN(a) || a < 0 || a > 1) {
|
|
1076
|
-
a = 1;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
return a;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
// Take input from [0, n] and return it as [0, 1]
|
|
1083
|
-
function bound01(n, max) {
|
|
1084
|
-
if (isOnePointZero(n)) n = "100%";
|
|
1085
|
-
|
|
1086
|
-
var processPercent = isPercentage(n);
|
|
1087
|
-
n = Math.min(max, Math.max(0, parseFloat(n)));
|
|
1088
|
-
|
|
1089
|
-
// Automatically convert percentage into number
|
|
1090
|
-
if (processPercent) {
|
|
1091
|
-
n = parseInt(n * max, 10) / 100;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
// Handle floating point rounding errors
|
|
1095
|
-
if (Math.abs(n - max) < 0.000001) {
|
|
1096
|
-
return 1;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
// Convert into [0, 1] range if it isn't already
|
|
1100
|
-
return (n % max) / parseFloat(max);
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
// Force a number between 0 and 1
|
|
1104
|
-
function clamp01(val) {
|
|
1105
|
-
return Math.min(1, Math.max(0, val));
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
// Parse a base-16 hex value into a base-10 integer
|
|
1109
|
-
function parseIntFromHex(val) {
|
|
1110
|
-
return parseInt(val, 16);
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
|
|
1114
|
-
// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
|
|
1115
|
-
function isOnePointZero(n) {
|
|
1116
|
-
return typeof n == "string" && n.indexOf(".") != -1 && parseFloat(n) === 1;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
// Check to see if string passed in is a percentage
|
|
1120
|
-
function isPercentage(n) {
|
|
1121
|
-
return typeof n === "string" && n.indexOf("%") != -1;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
// Force a hex value to have 2 characters
|
|
1125
|
-
function pad2(c) {
|
|
1126
|
-
return c.length == 1 ? "0" + c : "" + c;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
// Replace a decimal with it's percentage value
|
|
1130
|
-
function convertToPercentage(n) {
|
|
1131
|
-
if (n <= 1) {
|
|
1132
|
-
n = n * 100 + "%";
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
return n;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
// Converts a decimal to a hex value
|
|
1139
|
-
function convertDecimalToHex(d) {
|
|
1140
|
-
return Math.round(parseFloat(d) * 255).toString(16);
|
|
1141
|
-
}
|
|
1142
|
-
// Converts a hex value to a decimal
|
|
1143
|
-
function convertHexToDecimal(h) {
|
|
1144
|
-
return parseIntFromHex(h) / 255;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
var matchers = (function () {
|
|
1148
|
-
// <http://www.w3.org/TR/css3-values/#integers>
|
|
1149
|
-
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
1150
|
-
|
|
1151
|
-
// <http://www.w3.org/TR/css3-values/#number-value>
|
|
1152
|
-
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
|
1153
|
-
|
|
1154
|
-
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
|
|
1155
|
-
var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
|
|
1156
|
-
|
|
1157
|
-
// Actual matching.
|
|
1158
|
-
// Parentheses and commas are optional, but not required.
|
|
1159
|
-
// Whitespace can take the place of commas or opening paren
|
|
1160
|
-
var PERMISSIVE_MATCH3 =
|
|
1161
|
-
"[\\s|\\(]+(" +
|
|
1162
|
-
CSS_UNIT +
|
|
1163
|
-
")[,|\\s]+(" +
|
|
1164
|
-
CSS_UNIT +
|
|
1165
|
-
")[,|\\s]+(" +
|
|
1166
|
-
CSS_UNIT +
|
|
1167
|
-
")\\s*\\)?";
|
|
1168
|
-
var PERMISSIVE_MATCH4 =
|
|
1169
|
-
"[\\s|\\(]+(" +
|
|
1170
|
-
CSS_UNIT +
|
|
1171
|
-
")[,|\\s]+(" +
|
|
1172
|
-
CSS_UNIT +
|
|
1173
|
-
")[,|\\s]+(" +
|
|
1174
|
-
CSS_UNIT +
|
|
1175
|
-
")[,|\\s]+(" +
|
|
1176
|
-
CSS_UNIT +
|
|
1177
|
-
")\\s*\\)?";
|
|
1178
|
-
|
|
1179
|
-
return {
|
|
1180
|
-
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
1181
|
-
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
1182
|
-
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
1183
|
-
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
1184
|
-
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
1185
|
-
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
1186
|
-
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
1187
|
-
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1188
|
-
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1189
|
-
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1190
|
-
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1191
|
-
};
|
|
1192
|
-
})();
|
|
1193
|
-
|
|
1194
|
-
// `isValidCSSUnit`
|
|
1195
|
-
// Take in a single string / number and check to see if it looks like a CSS unit
|
|
1196
|
-
// (see `matchers` above for definition).
|
|
1197
|
-
function isValidCSSUnit(color) {
|
|
1198
|
-
return !!matchers.CSS_UNIT.exec(color);
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
// `stringInputToObject`
|
|
1202
|
-
// Permissive string parsing. Take in a number of formats, and output an object
|
|
1203
|
-
// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
|
|
1204
|
-
function stringInputToObject(color) {
|
|
1205
|
-
color = color.replace(trimLeft, "").replace(trimRight, "").toLowerCase();
|
|
1206
|
-
var named = false;
|
|
1207
|
-
if (names[color]) {
|
|
1208
|
-
color = names[color];
|
|
1209
|
-
named = true;
|
|
1210
|
-
} else if (color == "transparent") {
|
|
1211
|
-
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
// Try to match string input using regular expressions.
|
|
1215
|
-
// Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
|
|
1216
|
-
// Just return an object and let the conversion functions handle that.
|
|
1217
|
-
// This way the result will be the same whether the tinycolor is initialized with string or object.
|
|
1218
|
-
var match;
|
|
1219
|
-
if ((match = matchers.rgb.exec(color))) {
|
|
1220
|
-
return { r: match[1], g: match[2], b: match[3] };
|
|
1221
|
-
}
|
|
1222
|
-
if ((match = matchers.rgba.exec(color))) {
|
|
1223
|
-
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
|
1224
|
-
}
|
|
1225
|
-
if ((match = matchers.hsl.exec(color))) {
|
|
1226
|
-
return { h: match[1], s: match[2], l: match[3] };
|
|
1227
|
-
}
|
|
1228
|
-
if ((match = matchers.hsla.exec(color))) {
|
|
1229
|
-
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
|
1230
|
-
}
|
|
1231
|
-
if ((match = matchers.hsv.exec(color))) {
|
|
1232
|
-
return { h: match[1], s: match[2], v: match[3] };
|
|
1233
|
-
}
|
|
1234
|
-
if ((match = matchers.hsva.exec(color))) {
|
|
1235
|
-
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
|
1236
|
-
}
|
|
1237
|
-
if ((match = matchers.hex8.exec(color))) {
|
|
1238
|
-
return {
|
|
1239
|
-
r: parseIntFromHex(match[1]),
|
|
1240
|
-
g: parseIntFromHex(match[2]),
|
|
1241
|
-
b: parseIntFromHex(match[3]),
|
|
1242
|
-
a: convertHexToDecimal(match[4]),
|
|
1243
|
-
format: named ? "name" : "hex8",
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
|
-
if ((match = matchers.hex6.exec(color))) {
|
|
1247
|
-
return {
|
|
1248
|
-
r: parseIntFromHex(match[1]),
|
|
1249
|
-
g: parseIntFromHex(match[2]),
|
|
1250
|
-
b: parseIntFromHex(match[3]),
|
|
1251
|
-
format: named ? "name" : "hex",
|
|
1252
|
-
};
|
|
1253
|
-
}
|
|
1254
|
-
if ((match = matchers.hex4.exec(color))) {
|
|
1255
|
-
return {
|
|
1256
|
-
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1257
|
-
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1258
|
-
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1259
|
-
a: convertHexToDecimal(match[4] + "" + match[4]),
|
|
1260
|
-
format: named ? "name" : "hex8",
|
|
1261
|
-
};
|
|
1262
|
-
}
|
|
1263
|
-
if ((match = matchers.hex3.exec(color))) {
|
|
1264
|
-
return {
|
|
1265
|
-
r: parseIntFromHex(match[1] + "" + match[1]),
|
|
1266
|
-
g: parseIntFromHex(match[2] + "" + match[2]),
|
|
1267
|
-
b: parseIntFromHex(match[3] + "" + match[3]),
|
|
1268
|
-
format: named ? "name" : "hex",
|
|
1269
|
-
};
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
return false;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
function validateWCAG2Parms(parms) {
|
|
1276
|
-
// return valid WCAG2 parms for isReadable.
|
|
1277
|
-
// If input parms are invalid, return {"level":"AA", "size":"small"}
|
|
1278
|
-
var level, size;
|
|
1279
|
-
parms = parms || { level: "AA", size: "small" };
|
|
1280
|
-
level = (parms.level || "AA").toUpperCase();
|
|
1281
|
-
size = (parms.size || "small").toLowerCase();
|
|
1282
|
-
if (level !== "AA" && level !== "AAA") {
|
|
1283
|
-
level = "AA";
|
|
1284
|
-
}
|
|
1285
|
-
if (size !== "small" && size !== "large") {
|
|
1286
|
-
size = "small";
|
|
1287
|
-
}
|
|
1288
|
-
return { level: level, size: size };
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
return tinycolor;
|
|
1292
|
-
|
|
1293
|
-
}));
|
|
1294
|
-
});
|
|
1295
|
-
|
|
1296
|
-
const formatValue$2 = (tinyColor) => {
|
|
1297
|
-
if (!tinyColor) {
|
|
1298
|
-
return '';
|
|
1299
|
-
}
|
|
1300
|
-
const { r, g, b, a } = tinyColor.toRgb();
|
|
1301
|
-
return `${r} ${g} ${b} / ${a}`;
|
|
1302
|
-
};
|
|
1303
|
-
const OverridableColorTokens = [
|
|
1304
|
-
{
|
|
1305
|
-
name: 'bg-action',
|
|
1306
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1307
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1308
|
-
if (!overrideBaseColor) {
|
|
1309
|
-
return '';
|
|
1310
|
-
}
|
|
1311
|
-
const baseColor = overrideBaseColor
|
|
1312
|
-
? tinycolor(overrideBaseColor)
|
|
1313
|
-
: undefined;
|
|
1314
|
-
let value = baseColor
|
|
1315
|
-
? baseColor.clone()
|
|
1316
|
-
: undefined;
|
|
1317
|
-
return formatValue$2(value);
|
|
1318
|
-
},
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
name: 'dark-bg-action',
|
|
1322
|
-
},
|
|
1323
|
-
{
|
|
1324
|
-
name: 'bg-action-hover',
|
|
1325
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1326
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1327
|
-
if (!overrideBaseColor) {
|
|
1328
|
-
return '';
|
|
1329
|
-
}
|
|
1330
|
-
const baseColor = overrideBaseColor
|
|
1331
|
-
? tinycolor(overrideBaseColor)
|
|
1332
|
-
: undefined;
|
|
1333
|
-
let value = baseColor
|
|
1334
|
-
? baseColor.clone()
|
|
1335
|
-
: undefined;
|
|
1336
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1337
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1338
|
-
}
|
|
1339
|
-
else {
|
|
1340
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1341
|
-
}
|
|
1342
|
-
return formatValue$2(value);
|
|
1343
|
-
},
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
name: 'dark-bg-action-hover',
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
name: 'bg-action-focus',
|
|
1350
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1351
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1352
|
-
if (!overrideBaseColor) {
|
|
1353
|
-
return '';
|
|
1354
|
-
}
|
|
1355
|
-
const baseColor = overrideBaseColor
|
|
1356
|
-
? tinycolor(overrideBaseColor)
|
|
1357
|
-
: undefined;
|
|
1358
|
-
let value = baseColor
|
|
1359
|
-
? baseColor.clone()
|
|
1360
|
-
: undefined;
|
|
1361
|
-
return formatValue$2(value);
|
|
1362
|
-
},
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
name: 'dark-bg-action-focus',
|
|
1366
|
-
},
|
|
1367
|
-
{
|
|
1368
|
-
name: 'bg-action-active',
|
|
1369
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1370
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1371
|
-
if (!overrideBaseColor) {
|
|
1372
|
-
return '';
|
|
1373
|
-
}
|
|
1374
|
-
const baseColor = overrideBaseColor
|
|
1375
|
-
? tinycolor(overrideBaseColor)
|
|
1376
|
-
: undefined;
|
|
1377
|
-
let value = baseColor
|
|
1378
|
-
? baseColor.clone()
|
|
1379
|
-
: undefined;
|
|
1380
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1381
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
1382
|
-
}
|
|
1383
|
-
else {
|
|
1384
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
1385
|
-
}
|
|
1386
|
-
return formatValue$2(value);
|
|
1387
|
-
},
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
name: 'dark-bg-action-active',
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
name: 'bg-action-secondary-hover',
|
|
1394
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1395
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1396
|
-
if (!overrideBaseColor) {
|
|
1397
|
-
return '';
|
|
1398
|
-
}
|
|
1399
|
-
const baseColor = overrideBaseColor
|
|
1400
|
-
? tinycolor(overrideBaseColor)
|
|
1401
|
-
: undefined;
|
|
1402
|
-
let value = baseColor
|
|
1403
|
-
? baseColor.clone()
|
|
1404
|
-
: undefined;
|
|
1405
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1406
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1407
|
-
}
|
|
1408
|
-
else {
|
|
1409
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1410
|
-
}
|
|
1411
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.15);
|
|
1412
|
-
return formatValue$2(value);
|
|
1413
|
-
},
|
|
1414
|
-
},
|
|
1415
|
-
{
|
|
1416
|
-
name: 'dark-bg-action-secondary-hover',
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
name: 'bg-action-secondary-active',
|
|
1420
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1421
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1422
|
-
if (!overrideBaseColor) {
|
|
1423
|
-
return '';
|
|
1424
|
-
}
|
|
1425
|
-
const baseColor = overrideBaseColor
|
|
1426
|
-
? tinycolor(overrideBaseColor)
|
|
1427
|
-
: undefined;
|
|
1428
|
-
let value = baseColor
|
|
1429
|
-
? baseColor.clone()
|
|
1430
|
-
: undefined;
|
|
1431
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1432
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(20);
|
|
1433
|
-
}
|
|
1434
|
-
else {
|
|
1435
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-20);
|
|
1436
|
-
}
|
|
1437
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.15);
|
|
1438
|
-
return formatValue$2(value);
|
|
1439
|
-
},
|
|
1440
|
-
},
|
|
1441
|
-
{
|
|
1442
|
-
name: 'dark-bg-action-secondary-active',
|
|
1443
|
-
},
|
|
1444
|
-
{
|
|
1445
|
-
name: 'bg-divider',
|
|
1446
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1447
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1448
|
-
if (!overrideBaseColor) {
|
|
1449
|
-
return '';
|
|
1450
|
-
}
|
|
1451
|
-
const baseColor = overrideBaseColor
|
|
1452
|
-
? tinycolor(overrideBaseColor)
|
|
1453
|
-
: undefined;
|
|
1454
|
-
let value = baseColor
|
|
1455
|
-
? baseColor.clone()
|
|
1456
|
-
: undefined;
|
|
1457
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
1458
|
-
return formatValue$2(value);
|
|
1459
|
-
},
|
|
1460
|
-
},
|
|
1461
|
-
{
|
|
1462
|
-
name: 'dark-bg-divider',
|
|
1463
|
-
},
|
|
1464
|
-
{
|
|
1465
|
-
name: 'bg-keypad-btn-active',
|
|
1466
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1467
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1468
|
-
if (!overrideBaseColor) {
|
|
1469
|
-
return '';
|
|
1470
|
-
}
|
|
1471
|
-
const baseColor = overrideBaseColor
|
|
1472
|
-
? tinycolor(overrideBaseColor)
|
|
1473
|
-
: undefined;
|
|
1474
|
-
let value = baseColor
|
|
1475
|
-
? baseColor.clone()
|
|
1476
|
-
: undefined;
|
|
1477
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.3);
|
|
1478
|
-
return formatValue$2(value);
|
|
1479
|
-
},
|
|
1480
|
-
},
|
|
1481
|
-
{
|
|
1482
|
-
name: 'dark-bg-keypad-btn-active',
|
|
1483
|
-
},
|
|
1484
|
-
{
|
|
1485
|
-
name: 'bg-selected',
|
|
1486
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1487
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1488
|
-
if (!overrideBaseColor) {
|
|
1489
|
-
return '';
|
|
1490
|
-
}
|
|
1491
|
-
const baseColor = overrideBaseColor
|
|
1492
|
-
? tinycolor(overrideBaseColor)
|
|
1493
|
-
: undefined;
|
|
1494
|
-
let value = baseColor
|
|
1495
|
-
? baseColor.clone()
|
|
1496
|
-
: undefined;
|
|
1497
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1498
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1499
|
-
}
|
|
1500
|
-
else {
|
|
1501
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1502
|
-
}
|
|
1503
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.25);
|
|
1504
|
-
return formatValue$2(value);
|
|
1505
|
-
},
|
|
1506
|
-
},
|
|
1507
|
-
{
|
|
1508
|
-
name: 'dark-bg-selected',
|
|
1509
|
-
},
|
|
1510
|
-
{
|
|
1511
|
-
name: 'bg-sidebar',
|
|
1512
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1513
|
-
const overrideBaseColor = overrideColors['sidebarColor'];
|
|
1514
|
-
if (!overrideBaseColor) {
|
|
1515
|
-
return '';
|
|
1516
|
-
}
|
|
1517
|
-
const baseColor = overrideBaseColor
|
|
1518
|
-
? tinycolor(overrideBaseColor)
|
|
1519
|
-
: undefined;
|
|
1520
|
-
let value = baseColor
|
|
1521
|
-
? baseColor.clone()
|
|
1522
|
-
: undefined;
|
|
1523
|
-
return formatValue$2(value);
|
|
1524
|
-
},
|
|
1525
|
-
},
|
|
1526
|
-
{
|
|
1527
|
-
name: 'dark-bg-sidebar',
|
|
1528
|
-
},
|
|
1529
|
-
{
|
|
1530
|
-
name: 'bg-sidebar-item-hover',
|
|
1531
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1532
|
-
const overrideBaseColor = overrideColors['sidebarColor'];
|
|
1533
|
-
if (!overrideBaseColor) {
|
|
1534
|
-
return '';
|
|
1535
|
-
}
|
|
1536
|
-
const baseColor = overrideBaseColor
|
|
1537
|
-
? tinycolor(overrideBaseColor)
|
|
1538
|
-
: undefined;
|
|
1539
|
-
let value = baseColor
|
|
1540
|
-
? baseColor.clone()
|
|
1541
|
-
: undefined;
|
|
1542
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1543
|
-
value = tinycolor({ a: 0.9, r: 255, b: 255, g: 255 });
|
|
1544
|
-
}
|
|
1545
|
-
else {
|
|
1546
|
-
value = tinycolor({ a: 0.86, r: 15, b: 15, g: 15 });
|
|
1547
|
-
}
|
|
1548
|
-
return formatValue$2(value);
|
|
1549
|
-
},
|
|
1550
|
-
},
|
|
1551
|
-
{
|
|
1552
|
-
name: 'dark-bg-sidebar-item-hover',
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
name: 'bg-sidebar-item-selected',
|
|
1556
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1557
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1558
|
-
if (!overrideBaseColor) {
|
|
1559
|
-
return '';
|
|
1560
|
-
}
|
|
1561
|
-
const baseColor = overrideBaseColor
|
|
1562
|
-
? tinycolor(overrideBaseColor)
|
|
1563
|
-
: undefined;
|
|
1564
|
-
let value = baseColor
|
|
1565
|
-
? baseColor.clone()
|
|
1566
|
-
: undefined;
|
|
1567
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.4);
|
|
1568
|
-
return formatValue$2(value);
|
|
1569
|
-
},
|
|
1570
|
-
},
|
|
1571
|
-
{
|
|
1572
|
-
name: 'dark-bg-sidebar-item-selected',
|
|
1573
|
-
},
|
|
1574
|
-
{
|
|
1575
|
-
name: 'bg-table-selected-row',
|
|
1576
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1577
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1578
|
-
if (!overrideBaseColor) {
|
|
1579
|
-
return '';
|
|
1580
|
-
}
|
|
1581
|
-
const baseColor = overrideBaseColor
|
|
1582
|
-
? tinycolor(overrideBaseColor)
|
|
1583
|
-
: undefined;
|
|
1584
|
-
let value = baseColor
|
|
1585
|
-
? baseColor.clone()
|
|
1586
|
-
: undefined;
|
|
1587
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.2);
|
|
1588
|
-
return formatValue$2(value);
|
|
1589
|
-
},
|
|
1590
|
-
},
|
|
1591
|
-
{
|
|
1592
|
-
name: 'dark-bg-table-selected-row',
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
name: 'bg-toggle-switch-selected-disabled',
|
|
1596
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1597
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1598
|
-
if (!overrideBaseColor) {
|
|
1599
|
-
return '';
|
|
1600
|
-
}
|
|
1601
|
-
const baseColor = overrideBaseColor
|
|
1602
|
-
? tinycolor(overrideBaseColor)
|
|
1603
|
-
: undefined;
|
|
1604
|
-
let value = baseColor
|
|
1605
|
-
? baseColor.clone()
|
|
1606
|
-
: undefined;
|
|
1607
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.5);
|
|
1608
|
-
return formatValue$2(value);
|
|
1609
|
-
},
|
|
1610
|
-
},
|
|
1611
|
-
{
|
|
1612
|
-
name: 'dark-bg-toggle-switch-selected-disabled',
|
|
1613
|
-
},
|
|
1614
|
-
{
|
|
1615
|
-
name: 'bg-date-picker-range',
|
|
1616
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1617
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1618
|
-
if (!overrideBaseColor) {
|
|
1619
|
-
return '';
|
|
1620
|
-
}
|
|
1621
|
-
const baseColor = overrideBaseColor
|
|
1622
|
-
? tinycolor(overrideBaseColor)
|
|
1623
|
-
: undefined;
|
|
1624
|
-
let value = baseColor
|
|
1625
|
-
? baseColor.clone()
|
|
1626
|
-
: undefined;
|
|
1627
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1628
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1629
|
-
}
|
|
1630
|
-
else {
|
|
1631
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1632
|
-
}
|
|
1633
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.15);
|
|
1634
|
-
return formatValue$2(value);
|
|
1635
|
-
},
|
|
1636
|
-
},
|
|
1637
|
-
{
|
|
1638
|
-
name: 'dark-bg-date-picker-range',
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
name: 'text-link',
|
|
1642
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1643
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1644
|
-
if (!overrideBaseColor) {
|
|
1645
|
-
return '';
|
|
1646
|
-
}
|
|
1647
|
-
const baseColor = overrideBaseColor
|
|
1648
|
-
? tinycolor(overrideBaseColor)
|
|
1649
|
-
: undefined;
|
|
1650
|
-
let value = baseColor
|
|
1651
|
-
? baseColor.clone()
|
|
1652
|
-
: undefined;
|
|
1653
|
-
return formatValue$2(value);
|
|
1654
|
-
},
|
|
1655
|
-
},
|
|
1656
|
-
{
|
|
1657
|
-
name: 'dark-text-link',
|
|
1658
|
-
},
|
|
1659
|
-
{
|
|
1660
|
-
name: 'text-link-hover',
|
|
1661
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1662
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1663
|
-
if (!overrideBaseColor) {
|
|
1664
|
-
return '';
|
|
1665
|
-
}
|
|
1666
|
-
const baseColor = overrideBaseColor
|
|
1667
|
-
? tinycolor(overrideBaseColor)
|
|
1668
|
-
: undefined;
|
|
1669
|
-
let value = baseColor
|
|
1670
|
-
? baseColor.clone()
|
|
1671
|
-
: undefined;
|
|
1672
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1673
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1674
|
-
}
|
|
1675
|
-
else {
|
|
1676
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1677
|
-
}
|
|
1678
|
-
return formatValue$2(value);
|
|
1679
|
-
},
|
|
1680
|
-
},
|
|
1681
|
-
{
|
|
1682
|
-
name: 'dark-text-link-hover',
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
name: 'text-link-active',
|
|
1686
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1687
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1688
|
-
if (!overrideBaseColor) {
|
|
1689
|
-
return '';
|
|
1690
|
-
}
|
|
1691
|
-
const baseColor = overrideBaseColor
|
|
1692
|
-
? tinycolor(overrideBaseColor)
|
|
1693
|
-
: undefined;
|
|
1694
|
-
let value = baseColor
|
|
1695
|
-
? baseColor.clone()
|
|
1696
|
-
: undefined;
|
|
1697
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1698
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
1699
|
-
}
|
|
1700
|
-
else {
|
|
1701
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
1702
|
-
}
|
|
1703
|
-
return formatValue$2(value);
|
|
1704
|
-
},
|
|
1705
|
-
},
|
|
1706
|
-
{
|
|
1707
|
-
name: 'dark-text-link-active',
|
|
1708
|
-
},
|
|
1709
|
-
{
|
|
1710
|
-
name: 'text-link-focus',
|
|
1711
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1712
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1713
|
-
if (!overrideBaseColor) {
|
|
1714
|
-
return '';
|
|
1715
|
-
}
|
|
1716
|
-
const baseColor = overrideBaseColor
|
|
1717
|
-
? tinycolor(overrideBaseColor)
|
|
1718
|
-
: undefined;
|
|
1719
|
-
let value = baseColor
|
|
1720
|
-
? baseColor.clone()
|
|
1721
|
-
: undefined;
|
|
1722
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1723
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1724
|
-
}
|
|
1725
|
-
else {
|
|
1726
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1727
|
-
}
|
|
1728
|
-
return formatValue$2(value);
|
|
1729
|
-
},
|
|
1730
|
-
},
|
|
1731
|
-
{
|
|
1732
|
-
name: 'dark-text-link-focus',
|
|
1733
|
-
},
|
|
1734
|
-
{
|
|
1735
|
-
name: 'text-link-visited',
|
|
1736
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1737
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1738
|
-
if (!overrideBaseColor) {
|
|
1739
|
-
return '';
|
|
1740
|
-
}
|
|
1741
|
-
const baseColor = overrideBaseColor
|
|
1742
|
-
? tinycolor(overrideBaseColor)
|
|
1743
|
-
: undefined;
|
|
1744
|
-
let value = baseColor
|
|
1745
|
-
? baseColor.clone()
|
|
1746
|
-
: undefined;
|
|
1747
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1748
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(20);
|
|
1749
|
-
}
|
|
1750
|
-
else {
|
|
1751
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-22);
|
|
1752
|
-
}
|
|
1753
|
-
return formatValue$2(value);
|
|
1754
|
-
},
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
name: 'dark-text-link-visited',
|
|
1758
|
-
},
|
|
1759
|
-
{
|
|
1760
|
-
name: 'text-sidebar-link',
|
|
1761
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1762
|
-
const overrideBaseColor = overrideColors['sidebarColor'];
|
|
1763
|
-
if (!overrideBaseColor) {
|
|
1764
|
-
return '';
|
|
1765
|
-
}
|
|
1766
|
-
const baseColor = overrideBaseColor
|
|
1767
|
-
? tinycolor(overrideBaseColor)
|
|
1768
|
-
: undefined;
|
|
1769
|
-
let value = baseColor
|
|
1770
|
-
? baseColor.clone()
|
|
1771
|
-
: undefined;
|
|
1772
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1773
|
-
value = tinycolor({ a: 0.9, b: 255, r: 255, g: 255 });
|
|
1774
|
-
}
|
|
1775
|
-
else {
|
|
1776
|
-
value = tinycolor({ a: 0.86, b: 15, r: 15, g: 15 });
|
|
1777
|
-
}
|
|
1778
|
-
return formatValue$2(value);
|
|
1779
|
-
},
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
name: 'dark-text-sidebar-link',
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
name: 'text-sidebar-link-hover',
|
|
1786
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1787
|
-
const overrideBaseColor = overrideColors['sidebarColor'];
|
|
1788
|
-
if (!overrideBaseColor) {
|
|
1789
|
-
return '';
|
|
1790
|
-
}
|
|
1791
|
-
const baseColor = overrideBaseColor
|
|
1792
|
-
? tinycolor(overrideBaseColor)
|
|
1793
|
-
: undefined;
|
|
1794
|
-
let value = baseColor
|
|
1795
|
-
? baseColor.clone()
|
|
1796
|
-
: undefined;
|
|
1797
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1798
|
-
value = tinycolor({ a: 0.86, r: 15, b: 15, g: 15 });
|
|
1799
|
-
}
|
|
1800
|
-
else {
|
|
1801
|
-
value = tinycolor({ a: 0.9, r: 255, b: 255, g: 255 });
|
|
1802
|
-
}
|
|
1803
|
-
return formatValue$2(value);
|
|
1804
|
-
},
|
|
1805
|
-
},
|
|
1806
|
-
{
|
|
1807
|
-
name: 'dark-text-sidebar-link-hover',
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
name: 'text-sidebar-link-selected',
|
|
1811
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1812
|
-
const overrideBaseColor = overrideColors['sidebarColor'];
|
|
1813
|
-
if (!overrideBaseColor) {
|
|
1814
|
-
return '';
|
|
1815
|
-
}
|
|
1816
|
-
const baseColor = overrideBaseColor
|
|
1817
|
-
? tinycolor(overrideBaseColor)
|
|
1818
|
-
: undefined;
|
|
1819
|
-
let value = baseColor
|
|
1820
|
-
? baseColor.clone()
|
|
1821
|
-
: undefined;
|
|
1822
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1823
|
-
value = tinycolor({ a: 0.9, r: 255, b: 255, g: 255 });
|
|
1824
|
-
}
|
|
1825
|
-
else {
|
|
1826
|
-
value = tinycolor({ a: 0.86, b: 15, r: 15, g: 15 });
|
|
1827
|
-
}
|
|
1828
|
-
return formatValue$2(value);
|
|
1829
|
-
},
|
|
1830
|
-
},
|
|
1831
|
-
{
|
|
1832
|
-
name: 'dark-text-sidebar-link-selected',
|
|
1833
|
-
},
|
|
1834
|
-
{
|
|
1835
|
-
name: 'border-color-action',
|
|
1836
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1837
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1838
|
-
if (!overrideBaseColor) {
|
|
1839
|
-
return '';
|
|
1840
|
-
}
|
|
1841
|
-
const baseColor = overrideBaseColor
|
|
1842
|
-
? tinycolor(overrideBaseColor)
|
|
1843
|
-
: undefined;
|
|
1844
|
-
let value = baseColor
|
|
1845
|
-
? baseColor.clone()
|
|
1846
|
-
: undefined;
|
|
1847
|
-
return formatValue$2(value);
|
|
1848
|
-
},
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
name: 'dark-border-color-action',
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
name: 'border-color-action-hover',
|
|
1855
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1856
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1857
|
-
if (!overrideBaseColor) {
|
|
1858
|
-
return '';
|
|
1859
|
-
}
|
|
1860
|
-
const baseColor = overrideBaseColor
|
|
1861
|
-
? tinycolor(overrideBaseColor)
|
|
1862
|
-
: undefined;
|
|
1863
|
-
let value = baseColor
|
|
1864
|
-
? baseColor.clone()
|
|
1865
|
-
: undefined;
|
|
1866
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1867
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1868
|
-
}
|
|
1869
|
-
else {
|
|
1870
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1871
|
-
}
|
|
1872
|
-
return formatValue$2(value);
|
|
1873
|
-
},
|
|
1874
|
-
},
|
|
1875
|
-
{
|
|
1876
|
-
name: 'dark-border-color-action-hover',
|
|
1877
|
-
},
|
|
1878
|
-
{
|
|
1879
|
-
name: 'border-color-action-active',
|
|
1880
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1881
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1882
|
-
if (!overrideBaseColor) {
|
|
1883
|
-
return '';
|
|
1884
|
-
}
|
|
1885
|
-
const baseColor = overrideBaseColor
|
|
1886
|
-
? tinycolor(overrideBaseColor)
|
|
1887
|
-
: undefined;
|
|
1888
|
-
let value = baseColor
|
|
1889
|
-
? baseColor.clone()
|
|
1890
|
-
: undefined;
|
|
1891
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1892
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
1893
|
-
}
|
|
1894
|
-
else {
|
|
1895
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
1896
|
-
}
|
|
1897
|
-
return formatValue$2(value);
|
|
1898
|
-
},
|
|
1899
|
-
},
|
|
1900
|
-
{
|
|
1901
|
-
name: 'dark-border-color-action-active',
|
|
1902
|
-
},
|
|
1903
|
-
{
|
|
1904
|
-
name: 'border-color-divider',
|
|
1905
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1906
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1907
|
-
if (!overrideBaseColor) {
|
|
1908
|
-
return '';
|
|
1909
|
-
}
|
|
1910
|
-
const baseColor = overrideBaseColor
|
|
1911
|
-
? tinycolor(overrideBaseColor)
|
|
1912
|
-
: undefined;
|
|
1913
|
-
let value = baseColor
|
|
1914
|
-
? baseColor.clone()
|
|
1915
|
-
: undefined;
|
|
1916
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
1917
|
-
return formatValue$2(value);
|
|
1918
|
-
},
|
|
1919
|
-
},
|
|
1920
|
-
{
|
|
1921
|
-
name: 'dark-border-color-divider',
|
|
1922
|
-
},
|
|
1923
|
-
{
|
|
1924
|
-
name: 'border-color-divider-secondary',
|
|
1925
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1926
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1927
|
-
if (!overrideBaseColor) {
|
|
1928
|
-
return '';
|
|
1929
|
-
}
|
|
1930
|
-
const baseColor = overrideBaseColor
|
|
1931
|
-
? tinycolor(overrideBaseColor)
|
|
1932
|
-
: undefined;
|
|
1933
|
-
let value = baseColor
|
|
1934
|
-
? baseColor.clone()
|
|
1935
|
-
: undefined;
|
|
1936
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1937
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
1938
|
-
}
|
|
1939
|
-
else {
|
|
1940
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
1941
|
-
}
|
|
1942
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.4);
|
|
1943
|
-
return formatValue$2(value);
|
|
1944
|
-
},
|
|
1945
|
-
},
|
|
1946
|
-
{
|
|
1947
|
-
name: 'dark-border-color-divider-secondary',
|
|
1948
|
-
},
|
|
1949
|
-
{
|
|
1950
|
-
name: 'border-color-input-field',
|
|
1951
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1952
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1953
|
-
if (!overrideBaseColor) {
|
|
1954
|
-
return '';
|
|
1955
|
-
}
|
|
1956
|
-
const baseColor = overrideBaseColor
|
|
1957
|
-
? tinycolor(overrideBaseColor)
|
|
1958
|
-
: undefined;
|
|
1959
|
-
let value = baseColor
|
|
1960
|
-
? baseColor.clone()
|
|
1961
|
-
: undefined;
|
|
1962
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
1963
|
-
return formatValue$2(value);
|
|
1964
|
-
},
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
name: 'dark-border-color-input-field',
|
|
1968
|
-
},
|
|
1969
|
-
{
|
|
1970
|
-
name: 'border-color-input-field-hover',
|
|
1971
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1972
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1973
|
-
if (!overrideBaseColor) {
|
|
1974
|
-
return '';
|
|
1975
|
-
}
|
|
1976
|
-
const baseColor = overrideBaseColor
|
|
1977
|
-
? tinycolor(overrideBaseColor)
|
|
1978
|
-
: undefined;
|
|
1979
|
-
let value = baseColor
|
|
1980
|
-
? baseColor.clone()
|
|
1981
|
-
: undefined;
|
|
1982
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
1983
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
1984
|
-
}
|
|
1985
|
-
else {
|
|
1986
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
1987
|
-
}
|
|
1988
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
1989
|
-
return formatValue$2(value);
|
|
1990
|
-
},
|
|
1991
|
-
},
|
|
1992
|
-
{
|
|
1993
|
-
name: 'dark-border-color-input-field-hover',
|
|
1994
|
-
},
|
|
1995
|
-
{
|
|
1996
|
-
name: 'border-color-input-field-focus',
|
|
1997
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
1998
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
1999
|
-
if (!overrideBaseColor) {
|
|
2000
|
-
return '';
|
|
2001
|
-
}
|
|
2002
|
-
const baseColor = overrideBaseColor
|
|
2003
|
-
? tinycolor(overrideBaseColor)
|
|
2004
|
-
: undefined;
|
|
2005
|
-
let value = baseColor
|
|
2006
|
-
? baseColor.clone()
|
|
2007
|
-
: undefined;
|
|
2008
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2009
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2010
|
-
}
|
|
2011
|
-
else {
|
|
2012
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2013
|
-
}
|
|
2014
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2015
|
-
return formatValue$2(value);
|
|
2016
|
-
},
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
name: 'dark-border-color-input-field-focus',
|
|
2020
|
-
},
|
|
2021
|
-
{
|
|
2022
|
-
name: 'border-color-input-field-disabled',
|
|
2023
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2024
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2025
|
-
if (!overrideBaseColor) {
|
|
2026
|
-
return '';
|
|
2027
|
-
}
|
|
2028
|
-
const baseColor = overrideBaseColor
|
|
2029
|
-
? tinycolor(overrideBaseColor)
|
|
2030
|
-
: undefined;
|
|
2031
|
-
let value = baseColor
|
|
2032
|
-
? baseColor.clone()
|
|
2033
|
-
: undefined;
|
|
2034
|
-
value = tinycolor({ a: 0.2, r: 15, b: 15, g: 15 });
|
|
2035
|
-
return formatValue$2(value);
|
|
2036
|
-
},
|
|
2037
|
-
},
|
|
2038
|
-
{
|
|
2039
|
-
name: 'dark-border-color-input-field-disabled',
|
|
2040
|
-
},
|
|
2041
|
-
{
|
|
2042
|
-
name: 'border-color-tile-focus',
|
|
2043
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2044
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2045
|
-
if (!overrideBaseColor) {
|
|
2046
|
-
return '';
|
|
2047
|
-
}
|
|
2048
|
-
const baseColor = overrideBaseColor
|
|
2049
|
-
? tinycolor(overrideBaseColor)
|
|
2050
|
-
: undefined;
|
|
2051
|
-
let value = baseColor
|
|
2052
|
-
? baseColor.clone()
|
|
2053
|
-
: undefined;
|
|
2054
|
-
return formatValue$2(value);
|
|
2055
|
-
},
|
|
2056
|
-
},
|
|
2057
|
-
{
|
|
2058
|
-
name: 'dark-border-color-tile-focus',
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
name: 'border-color-tile-selected-focus',
|
|
2062
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2063
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2064
|
-
if (!overrideBaseColor) {
|
|
2065
|
-
return '';
|
|
2066
|
-
}
|
|
2067
|
-
const baseColor = overrideBaseColor
|
|
2068
|
-
? tinycolor(overrideBaseColor)
|
|
2069
|
-
: undefined;
|
|
2070
|
-
let value = baseColor
|
|
2071
|
-
? baseColor.clone()
|
|
2072
|
-
: undefined;
|
|
2073
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2074
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2075
|
-
}
|
|
2076
|
-
else {
|
|
2077
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2078
|
-
}
|
|
2079
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2080
|
-
return formatValue$2(value);
|
|
2081
|
-
},
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
name: 'dark-border-color-tile-selected-focus',
|
|
2085
|
-
},
|
|
2086
|
-
{
|
|
2087
|
-
name: 'border-color-tile-selected',
|
|
2088
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2089
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2090
|
-
if (!overrideBaseColor) {
|
|
2091
|
-
return '';
|
|
2092
|
-
}
|
|
2093
|
-
const baseColor = overrideBaseColor
|
|
2094
|
-
? tinycolor(overrideBaseColor)
|
|
2095
|
-
: undefined;
|
|
2096
|
-
let value = baseColor
|
|
2097
|
-
? baseColor.clone()
|
|
2098
|
-
: undefined;
|
|
2099
|
-
return formatValue$2(value);
|
|
2100
|
-
},
|
|
2101
|
-
},
|
|
2102
|
-
{
|
|
2103
|
-
name: 'dark-border-color-tile-selected',
|
|
2104
|
-
},
|
|
2105
|
-
{
|
|
2106
|
-
name: 'border-color-tile-selected-hover',
|
|
2107
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2108
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2109
|
-
if (!overrideBaseColor) {
|
|
2110
|
-
return '';
|
|
2111
|
-
}
|
|
2112
|
-
const baseColor = overrideBaseColor
|
|
2113
|
-
? tinycolor(overrideBaseColor)
|
|
2114
|
-
: undefined;
|
|
2115
|
-
let value = baseColor
|
|
2116
|
-
? baseColor.clone()
|
|
2117
|
-
: undefined;
|
|
2118
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2119
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
2120
|
-
}
|
|
2121
|
-
else {
|
|
2122
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
2123
|
-
}
|
|
2124
|
-
return formatValue$2(value);
|
|
2125
|
-
},
|
|
2126
|
-
},
|
|
2127
|
-
{
|
|
2128
|
-
name: 'dark-border-color-tile-selected-hover',
|
|
2129
|
-
},
|
|
2130
|
-
];
|
|
2131
|
-
|
|
2132
|
-
const formatValue$1 = (tinyColor) => {
|
|
2133
|
-
if (!tinyColor) {
|
|
2134
|
-
return '';
|
|
2135
|
-
}
|
|
2136
|
-
const { r, g, b, a } = tinyColor.toRgb();
|
|
2137
|
-
return `${r} ${g} ${b} / ${a}`;
|
|
2138
|
-
};
|
|
2139
|
-
const OverridableBorderTokens = [
|
|
2140
|
-
{
|
|
2141
|
-
name: 'border-secondary-btn',
|
|
2142
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2143
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2144
|
-
if (!overrideBaseColor) {
|
|
2145
|
-
return '';
|
|
2146
|
-
}
|
|
2147
|
-
const baseColor = overrideBaseColor
|
|
2148
|
-
? tinycolor(overrideBaseColor)
|
|
2149
|
-
: undefined;
|
|
2150
|
-
let value = baseColor
|
|
2151
|
-
? baseColor.clone()
|
|
2152
|
-
: undefined;
|
|
2153
|
-
return formatValue$1(value);
|
|
2154
|
-
},
|
|
2155
|
-
},
|
|
2156
|
-
{
|
|
2157
|
-
name: 'dark-border-secondary-btn',
|
|
2158
|
-
},
|
|
2159
|
-
{
|
|
2160
|
-
name: 'border-secondary-btn-hover',
|
|
2161
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2162
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2163
|
-
if (!overrideBaseColor) {
|
|
2164
|
-
return '';
|
|
2165
|
-
}
|
|
2166
|
-
const baseColor = overrideBaseColor
|
|
2167
|
-
? tinycolor(overrideBaseColor)
|
|
2168
|
-
: undefined;
|
|
2169
|
-
let value = baseColor
|
|
2170
|
-
? baseColor.clone()
|
|
2171
|
-
: undefined;
|
|
2172
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2173
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
2174
|
-
}
|
|
2175
|
-
else {
|
|
2176
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
2177
|
-
}
|
|
2178
|
-
return formatValue$1(value);
|
|
2179
|
-
},
|
|
2180
|
-
},
|
|
2181
|
-
{
|
|
2182
|
-
name: 'dark-border-secondary-btn-hover',
|
|
2183
|
-
},
|
|
2184
|
-
{
|
|
2185
|
-
name: 'border-secondary-btn-active',
|
|
2186
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2187
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2188
|
-
if (!overrideBaseColor) {
|
|
2189
|
-
return '';
|
|
2190
|
-
}
|
|
2191
|
-
const baseColor = overrideBaseColor
|
|
2192
|
-
? tinycolor(overrideBaseColor)
|
|
2193
|
-
: undefined;
|
|
2194
|
-
let value = baseColor
|
|
2195
|
-
? baseColor.clone()
|
|
2196
|
-
: undefined;
|
|
2197
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2198
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2199
|
-
}
|
|
2200
|
-
else {
|
|
2201
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2202
|
-
}
|
|
2203
|
-
return formatValue$1(value);
|
|
2204
|
-
},
|
|
2205
|
-
},
|
|
2206
|
-
{
|
|
2207
|
-
name: 'dark-border-secondary-btn-active',
|
|
2208
|
-
},
|
|
2209
|
-
{
|
|
2210
|
-
name: 'border-input-field',
|
|
2211
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2212
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2213
|
-
if (!overrideBaseColor) {
|
|
2214
|
-
return '';
|
|
2215
|
-
}
|
|
2216
|
-
const baseColor = overrideBaseColor
|
|
2217
|
-
? tinycolor(overrideBaseColor)
|
|
2218
|
-
: undefined;
|
|
2219
|
-
let value = baseColor
|
|
2220
|
-
? baseColor.clone()
|
|
2221
|
-
: undefined;
|
|
2222
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2223
|
-
return formatValue$1(value);
|
|
2224
|
-
},
|
|
2225
|
-
},
|
|
2226
|
-
{
|
|
2227
|
-
name: 'dark-border-input-field',
|
|
2228
|
-
},
|
|
2229
|
-
{
|
|
2230
|
-
name: 'border-input-field-hover',
|
|
2231
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2232
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2233
|
-
if (!overrideBaseColor) {
|
|
2234
|
-
return '';
|
|
2235
|
-
}
|
|
2236
|
-
const baseColor = overrideBaseColor
|
|
2237
|
-
? tinycolor(overrideBaseColor)
|
|
2238
|
-
: undefined;
|
|
2239
|
-
let value = baseColor
|
|
2240
|
-
? baseColor.clone()
|
|
2241
|
-
: undefined;
|
|
2242
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2243
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
2244
|
-
}
|
|
2245
|
-
else {
|
|
2246
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
2247
|
-
}
|
|
2248
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2249
|
-
return formatValue$1(value);
|
|
2250
|
-
},
|
|
2251
|
-
},
|
|
2252
|
-
{
|
|
2253
|
-
name: 'dark-border-input-field-hover',
|
|
2254
|
-
},
|
|
2255
|
-
{
|
|
2256
|
-
name: 'border-input-field-focus',
|
|
2257
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2258
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2259
|
-
if (!overrideBaseColor) {
|
|
2260
|
-
return '';
|
|
2261
|
-
}
|
|
2262
|
-
const baseColor = overrideBaseColor
|
|
2263
|
-
? tinycolor(overrideBaseColor)
|
|
2264
|
-
: undefined;
|
|
2265
|
-
let value = baseColor
|
|
2266
|
-
? baseColor.clone()
|
|
2267
|
-
: undefined;
|
|
2268
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2269
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2270
|
-
}
|
|
2271
|
-
else {
|
|
2272
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2273
|
-
}
|
|
2274
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2275
|
-
return formatValue$1(value);
|
|
2276
|
-
},
|
|
2277
|
-
},
|
|
2278
|
-
{
|
|
2279
|
-
name: 'dark-border-input-field-focus',
|
|
2280
|
-
},
|
|
2281
|
-
{
|
|
2282
|
-
name: 'border-input-field-disabled',
|
|
2283
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2284
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2285
|
-
if (!overrideBaseColor) {
|
|
2286
|
-
return '';
|
|
2287
|
-
}
|
|
2288
|
-
const baseColor = overrideBaseColor
|
|
2289
|
-
? tinycolor(overrideBaseColor)
|
|
2290
|
-
: undefined;
|
|
2291
|
-
let value = baseColor
|
|
2292
|
-
? baseColor.clone()
|
|
2293
|
-
: undefined;
|
|
2294
|
-
value = tinycolor({ a: 0.2, r: 15, b: 15, g: 15 });
|
|
2295
|
-
return formatValue$1(value);
|
|
2296
|
-
},
|
|
2297
|
-
},
|
|
2298
|
-
{
|
|
2299
|
-
name: 'dark-border-input-field-disabled',
|
|
2300
|
-
},
|
|
2301
|
-
{
|
|
2302
|
-
name: 'border-divider',
|
|
2303
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2304
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2305
|
-
if (!overrideBaseColor) {
|
|
2306
|
-
return '';
|
|
2307
|
-
}
|
|
2308
|
-
const baseColor = overrideBaseColor
|
|
2309
|
-
? tinycolor(overrideBaseColor)
|
|
2310
|
-
: undefined;
|
|
2311
|
-
let value = baseColor
|
|
2312
|
-
? baseColor.clone()
|
|
2313
|
-
: undefined;
|
|
2314
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2315
|
-
return formatValue$1(value);
|
|
2316
|
-
},
|
|
2317
|
-
},
|
|
2318
|
-
{
|
|
2319
|
-
name: 'dark-border-divider',
|
|
2320
|
-
},
|
|
2321
|
-
{
|
|
2322
|
-
name: 'border-divider-secondary',
|
|
2323
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2324
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2325
|
-
if (!overrideBaseColor) {
|
|
2326
|
-
return '';
|
|
2327
|
-
}
|
|
2328
|
-
const baseColor = overrideBaseColor
|
|
2329
|
-
? tinycolor(overrideBaseColor)
|
|
2330
|
-
: undefined;
|
|
2331
|
-
let value = baseColor
|
|
2332
|
-
? baseColor.clone()
|
|
2333
|
-
: undefined;
|
|
2334
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2335
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2336
|
-
}
|
|
2337
|
-
else {
|
|
2338
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2339
|
-
}
|
|
2340
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.4);
|
|
2341
|
-
return formatValue$1(value);
|
|
2342
|
-
},
|
|
2343
|
-
},
|
|
2344
|
-
{
|
|
2345
|
-
name: 'dark-border-divider-secondary',
|
|
2346
|
-
},
|
|
2347
|
-
{
|
|
2348
|
-
name: 'border-tile-selected',
|
|
2349
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2350
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2351
|
-
if (!overrideBaseColor) {
|
|
2352
|
-
return '';
|
|
2353
|
-
}
|
|
2354
|
-
const baseColor = overrideBaseColor
|
|
2355
|
-
? tinycolor(overrideBaseColor)
|
|
2356
|
-
: undefined;
|
|
2357
|
-
let value = baseColor
|
|
2358
|
-
? baseColor.clone()
|
|
2359
|
-
: undefined;
|
|
2360
|
-
return formatValue$1(value);
|
|
2361
|
-
},
|
|
2362
|
-
},
|
|
2363
|
-
{
|
|
2364
|
-
name: 'dark-border-tile-selected',
|
|
2365
|
-
},
|
|
2366
|
-
{
|
|
2367
|
-
name: 'border-tile-selected-hover',
|
|
2368
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2369
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2370
|
-
if (!overrideBaseColor) {
|
|
2371
|
-
return '';
|
|
2372
|
-
}
|
|
2373
|
-
const baseColor = overrideBaseColor
|
|
2374
|
-
? tinycolor(overrideBaseColor)
|
|
2375
|
-
: undefined;
|
|
2376
|
-
let value = baseColor
|
|
2377
|
-
? baseColor.clone()
|
|
2378
|
-
: undefined;
|
|
2379
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2380
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(10);
|
|
2381
|
-
}
|
|
2382
|
-
else {
|
|
2383
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-10);
|
|
2384
|
-
}
|
|
2385
|
-
return formatValue$1(value);
|
|
2386
|
-
},
|
|
2387
|
-
},
|
|
2388
|
-
{
|
|
2389
|
-
name: 'dark-border-tile-selected-hover',
|
|
2390
|
-
},
|
|
2391
|
-
{
|
|
2392
|
-
name: 'border-tile-focus',
|
|
2393
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2394
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2395
|
-
if (!overrideBaseColor) {
|
|
2396
|
-
return '';
|
|
2397
|
-
}
|
|
2398
|
-
const baseColor = overrideBaseColor
|
|
2399
|
-
? tinycolor(overrideBaseColor)
|
|
2400
|
-
: undefined;
|
|
2401
|
-
let value = baseColor
|
|
2402
|
-
? baseColor.clone()
|
|
2403
|
-
: undefined;
|
|
2404
|
-
return formatValue$1(value);
|
|
2405
|
-
},
|
|
2406
|
-
},
|
|
2407
|
-
{
|
|
2408
|
-
name: 'dark-border-tile-focus',
|
|
2409
|
-
},
|
|
2410
|
-
{
|
|
2411
|
-
name: 'border-tile-selected-focus',
|
|
2412
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2413
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2414
|
-
if (!overrideBaseColor) {
|
|
2415
|
-
return '';
|
|
2416
|
-
}
|
|
2417
|
-
const baseColor = overrideBaseColor
|
|
2418
|
-
? tinycolor(overrideBaseColor)
|
|
2419
|
-
: undefined;
|
|
2420
|
-
let value = baseColor
|
|
2421
|
-
? baseColor.clone()
|
|
2422
|
-
: undefined;
|
|
2423
|
-
if (baseColor === null || baseColor === void 0 ? void 0 : baseColor.isDark()) {
|
|
2424
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(15);
|
|
2425
|
-
}
|
|
2426
|
-
else {
|
|
2427
|
-
value = value === null || value === void 0 ? void 0 : value.lighten(-15);
|
|
2428
|
-
}
|
|
2429
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.6);
|
|
2430
|
-
return formatValue$1(value);
|
|
2431
|
-
},
|
|
2432
|
-
},
|
|
2433
|
-
{
|
|
2434
|
-
name: 'dark-border-tile-selected-focus',
|
|
2435
|
-
},
|
|
2436
|
-
];
|
|
2437
|
-
|
|
2438
|
-
const formatValue = (tinyColor) => {
|
|
2439
|
-
if (!tinyColor) {
|
|
2440
|
-
return '';
|
|
2441
|
-
}
|
|
2442
|
-
const { r, g, b, a } = tinyColor.toRgb();
|
|
2443
|
-
return `${r} ${g} ${b} / ${a}`;
|
|
2444
|
-
};
|
|
2445
|
-
const OverridableRingTokens = [
|
|
2446
|
-
{
|
|
2447
|
-
name: 'ring-input-focus',
|
|
2448
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2449
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2450
|
-
if (!overrideBaseColor) {
|
|
2451
|
-
return '';
|
|
2452
|
-
}
|
|
2453
|
-
const baseColor = overrideBaseColor
|
|
2454
|
-
? tinycolor(overrideBaseColor)
|
|
2455
|
-
: undefined;
|
|
2456
|
-
let value = baseColor
|
|
2457
|
-
? baseColor.clone()
|
|
2458
|
-
: undefined;
|
|
2459
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.25);
|
|
2460
|
-
return formatValue(value);
|
|
2461
|
-
},
|
|
2462
|
-
},
|
|
2463
|
-
{
|
|
2464
|
-
name: 'dark-ring-input-focus',
|
|
2465
|
-
},
|
|
2466
|
-
{
|
|
2467
|
-
name: 'ring-action-focus',
|
|
2468
|
-
overrideGetter: (overrideColors, tinycolor) => {
|
|
2469
|
-
const overrideBaseColor = overrideColors['actionColor'];
|
|
2470
|
-
if (!overrideBaseColor) {
|
|
2471
|
-
return '';
|
|
2472
|
-
}
|
|
2473
|
-
const baseColor = overrideBaseColor
|
|
2474
|
-
? tinycolor(overrideBaseColor)
|
|
2475
|
-
: undefined;
|
|
2476
|
-
let value = baseColor
|
|
2477
|
-
? baseColor.clone()
|
|
2478
|
-
: undefined;
|
|
2479
|
-
value = value === null || value === void 0 ? void 0 : value.setAlpha(0.25);
|
|
2480
|
-
return formatValue(value);
|
|
2481
|
-
},
|
|
2482
|
-
},
|
|
2483
|
-
{
|
|
2484
|
-
name: 'dark-ring-action-focus',
|
|
2485
|
-
},
|
|
2486
|
-
];
|
|
2487
|
-
|
|
2488
|
-
/**
|
|
2489
|
-
* Vega components color override controller
|
|
2490
|
-
*/
|
|
2491
|
-
class ColorSchemaOverridingController {
|
|
2492
|
-
/**
|
|
2493
|
-
* It takes a color and generates a bunch of other colors based on that color
|
|
2494
|
-
*
|
|
2495
|
-
* @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that is passed in from the user.
|
|
2496
|
-
* @returns {OverrideColor[]} Parsed action colors
|
|
2497
|
-
*/
|
|
2498
|
-
generateOverrideThemes(overrideColors) {
|
|
2499
|
-
return this.getOverridableTokens().map((item) => {
|
|
2500
|
-
return {
|
|
2501
|
-
name: item.name,
|
|
2502
|
-
value: this.parseCssVarValue(item, overrideColors),
|
|
2503
|
-
};
|
|
2504
|
-
});
|
|
2505
|
-
}
|
|
2506
|
-
/**
|
|
2507
|
-
* Set the custom override theme colors to customOverrideThemeStyleContainer
|
|
2508
|
-
*
|
|
2509
|
-
* @param {OverrideColor[]} overrideThemes Parsed custom override colors
|
|
2510
|
-
*/
|
|
2511
|
-
applyTheme(overrideThemes) {
|
|
2512
|
-
this.getOverrideThemeContainer().innerHTML = `
|
|
2513
|
-
:root {
|
|
2514
|
-
\t\t${overrideThemes
|
|
2515
|
-
.filter((item) => {
|
|
2516
|
-
return !!item.value;
|
|
2517
|
-
})
|
|
2518
|
-
.map((item) => `--v-${item.name}: ${item.value};`)
|
|
2519
|
-
.join('\n\t\t')}
|
|
2520
|
-
}
|
|
2521
|
-
`;
|
|
2522
|
-
}
|
|
2523
|
-
/**
|
|
2524
|
-
* It creates a customOverrideTheme style tag in the head of the document if it doesn't exist, and returns it
|
|
2525
|
-
*
|
|
2526
|
-
* @returns {Element} The customOverrideThemeStyleContainer is being returned.
|
|
2527
|
-
*/
|
|
2528
|
-
getOverrideThemeContainer() {
|
|
2529
|
-
let customOverrideThemeStyleContainer = document.head.querySelector(`#vegaCustomOverrideTheme`);
|
|
2530
|
-
if (!customOverrideThemeStyleContainer) {
|
|
2531
|
-
customOverrideThemeStyleContainer = document.createElement('style');
|
|
2532
|
-
customOverrideThemeStyleContainer.id = 'vegaCustomOverrideTheme';
|
|
2533
|
-
document.head.append(customOverrideThemeStyleContainer);
|
|
2534
|
-
}
|
|
2535
|
-
return customOverrideThemeStyleContainer;
|
|
2536
|
-
}
|
|
2537
|
-
/**
|
|
2538
|
-
* Get the overridable color tokens from design token
|
|
2539
|
-
*
|
|
2540
|
-
* @returns {OverridableToken[]} overridable action color token array
|
|
2541
|
-
*/
|
|
2542
|
-
getOverridableTokens() {
|
|
2543
|
-
return [...OverridableColorTokens, ...OverridableBorderTokens, ...OverridableRingTokens];
|
|
2544
|
-
}
|
|
2545
|
-
/**
|
|
2546
|
-
* Calculate and parse color to css var value
|
|
2547
|
-
*
|
|
2548
|
-
* @param {OverridableToken} overrideColorToken The token will be overridden
|
|
2549
|
-
* @param {VegaThemeOverrideColors} overrideColors the payload of override colors
|
|
2550
|
-
* @returns {Nullable<string>} The css var value
|
|
2551
|
-
*/
|
|
2552
|
-
parseCssVarValue(overrideColorToken, overrideColors) {
|
|
2553
|
-
var _a;
|
|
2554
|
-
return (_a = overrideColorToken.overrideGetter) === null || _a === void 0 ? void 0 : _a.call(overrideColorToken, overrideColors, tinycolor);
|
|
2555
|
-
}
|
|
2556
|
-
}
|
|
2557
|
-
const VegaColorSchemaOverridingController = new ColorSchemaOverridingController();
|
|
2558
|
-
|
|
2559
|
-
/* This file is generated by vega-design 2.0.77 */
|
|
2560
|
-
const DarkModeColorTokens = {
|
|
2561
|
-
'bg-brand': '176, 180, 181, 1',
|
|
2562
|
-
'bg-page': '24, 24, 48, 1',
|
|
2563
|
-
'bg-primary': '4, 4, 28, 1',
|
|
2564
|
-
'bg-secondary': '18, 18, 39, 1',
|
|
2565
|
-
'bg-tertiary': '24, 24, 48, 1',
|
|
2566
|
-
'bg-quaternary': '70, 71, 101, 1',
|
|
2567
|
-
'bg-inverted-primary': '252, 252, 252, 1',
|
|
2568
|
-
'bg-inverted-secondary': '247, 247, 247, 1',
|
|
2569
|
-
'bg-inverted-tertiary': '240, 243, 247, 1',
|
|
2570
|
-
'bg-inverted-quaternary': '241, 248, 251, 1',
|
|
2571
|
-
'bg-action': '0, 187, 255, 1',
|
|
2572
|
-
'bg-action-hover': '0, 204, 255, 1',
|
|
2573
|
-
'bg-action-focus': '0, 187, 255, 1',
|
|
2574
|
-
'bg-action-active': '4, 165, 245, 1',
|
|
2575
|
-
'bg-action-quaternary': '51, 57, 61, 1',
|
|
2576
|
-
'bg-action-quaternary-hover': '89, 96, 99, 1',
|
|
2577
|
-
'bg-action-quaternary-active': '24, 24, 48, 1',
|
|
2578
|
-
'bg-action-secondary': '0, 0, 0, 0',
|
|
2579
|
-
'bg-action-secondary-hover': '0, 204, 255, 0.2',
|
|
2580
|
-
'bg-action-secondary-active': '4, 165, 245, 0.2',
|
|
2581
|
-
'bg-action-tertiary': '0, 0, 0, 0',
|
|
2582
|
-
'bg-action-tertiary-hover': '252, 252, 252, 0.2',
|
|
2583
|
-
'bg-action-tertiary-active': '252, 252, 252, 0.1',
|
|
2584
|
-
'bg-app-header': '24, 24, 48, 0.92',
|
|
2585
|
-
'bg-backdrop-modal': '70, 71, 101, 0.8',
|
|
2586
|
-
'bg-backdrop-popover': '70, 71, 101, 0.56',
|
|
2587
|
-
'bg-backdrop-sidebar': '70, 71, 101, 0.8',
|
|
2588
|
-
'bg-chip': '252, 252, 252, 0.1',
|
|
2589
|
-
'bg-chip-hover': '252, 252, 252, 0.2',
|
|
2590
|
-
'bg-chip-active': '252, 252, 252, 0.06',
|
|
2591
|
-
'bg-danger': '255, 56, 97, 1',
|
|
2592
|
-
'bg-danger-hover': '255, 71, 123, 1',
|
|
2593
|
-
'bg-danger-focus': '255, 56, 97, 1',
|
|
2594
|
-
'bg-danger-active': '230, 50, 87, 1',
|
|
2595
|
-
'bg-danger-tertiary': '0, 0, 0, 0',
|
|
2596
|
-
'bg-danger-tertiary-hover': '255, 71, 123, 0.2',
|
|
2597
|
-
'bg-danger-tertiary-active': '230, 50, 87, 0.2',
|
|
2598
|
-
'bg-disabled': '70, 71, 101, 1',
|
|
2599
|
-
'bg-divider': '32, 54, 69, 1',
|
|
2600
|
-
'bg-divider-secondary': '51, 57, 61, 1',
|
|
2601
|
-
'bg-keypad-btn-active': '45, 76, 97, 1',
|
|
2602
|
-
'bg-loading-progress': '4, 165, 245, 1',
|
|
2603
|
-
'bg-loading-track': '142, 223, 249, 1',
|
|
2604
|
-
'bg-segment-hover': '70, 71, 101, 1',
|
|
2605
|
-
'bg-segment-control': '210, 208, 223, 0.1',
|
|
2606
|
-
'bg-selected': '85, 218, 255, 0.3',
|
|
2607
|
-
'bg-sidebar': '18, 18, 39, 1',
|
|
2608
|
-
'bg-sidebar-icon': '188, 186, 213, 1',
|
|
2609
|
-
'bg-sidebar-icon-hover': '18, 18, 39, 1',
|
|
2610
|
-
'bg-sidebar-icon-selected': '252, 252, 252, 1',
|
|
2611
|
-
'bg-sidebar-item-hover': '252, 252, 252, 1',
|
|
2612
|
-
'bg-sidebar-item-selected': '0, 187, 255, 0.4',
|
|
2613
|
-
'bg-site-footer': '51, 57, 61, 1',
|
|
2614
|
-
'bg-site-footer-action': '171, 198, 216, 1',
|
|
2615
|
-
'bg-site-footer-action-hover': '199, 217, 229, 1',
|
|
2616
|
-
'bg-site-footer-action-active': '143, 179, 203, 1',
|
|
2617
|
-
'bg-site-footer-field': '89, 96, 99, 1',
|
|
2618
|
-
'bg-slider-handle': '252, 252, 252, 1',
|
|
2619
|
-
'bg-status-error': '189, 41, 71, 1',
|
|
2620
|
-
'bg-status-info': '252, 252, 252, 1',
|
|
2621
|
-
'bg-status-success': '123, 242, 151, 1',
|
|
2622
|
-
'bg-status-warning': '255, 212, 105, 1',
|
|
2623
|
-
'bg-tab': '51, 57, 61, 1',
|
|
2624
|
-
'bg-tab-hover': '89, 96, 99, 1',
|
|
2625
|
-
'bg-tab-selected': '240, 243, 247, 1',
|
|
2626
|
-
'bg-table-alt-row': '18, 18, 39, 1',
|
|
2627
|
-
'bg-table-header': '24, 24, 48, 1',
|
|
2628
|
-
'bg-table-row-hover': '70, 71, 101, 1',
|
|
2629
|
-
'bg-table-row-selected-expanded': '32, 54, 69, 1',
|
|
2630
|
-
'bg-table-selected-row': '45, 76, 97, 1',
|
|
2631
|
-
'bg-textarea-count': '252, 252, 252, 0.5',
|
|
2632
|
-
'bg-tile': '4, 4, 28, 1',
|
|
2633
|
-
'bg-tile-hover': '24, 24, 48, 1',
|
|
2634
|
-
'bg-tile-selected': '32, 54, 69, 1',
|
|
2635
|
-
'bg-tile-selected-hover': '45, 76, 97, 1',
|
|
2636
|
-
'bg-toggle-switch': '210, 208, 223, 1',
|
|
2637
|
-
'bg-toggle-switch-hover': '188, 186, 213, 1',
|
|
2638
|
-
'bg-toggle-switch-selected-disabled': '0, 75, 128, 1',
|
|
2639
|
-
'bg-transparent': '0, 0, 0, 0',
|
|
2640
|
-
'bg-accent1-primary': '109, 217, 202, 1',
|
|
2641
|
-
'bg-accent1-secondary': '174, 234, 226, 1',
|
|
2642
|
-
'bg-accent1-tertiary': '223, 247, 243, 1',
|
|
2643
|
-
'bg-accent2-primary': '95, 56, 206, 1',
|
|
2644
|
-
'bg-accent2-secondary': '184, 167, 233, 1',
|
|
2645
|
-
'bg-accent2-tertiary': '219, 211, 244, 1',
|
|
2646
|
-
'bg-accent3-primary': '255, 203, 105, 1',
|
|
2647
|
-
'bg-accent3-secondary': '251, 226, 185, 1',
|
|
2648
|
-
'bg-accent3-tertiary': '255, 243, 222, 1',
|
|
2649
|
-
'bg-accent4-primary': '255, 129, 87, 1',
|
|
2650
|
-
'bg-accent4-secondary': '255, 185, 162, 1',
|
|
2651
|
-
'bg-accent4-tertiary': '255, 227, 218, 1',
|
|
2652
|
-
'bg-accent5-primary': '4, 165, 245, 1',
|
|
2653
|
-
'bg-accent5-secondary': '85, 218, 255, 1',
|
|
2654
|
-
'bg-accent5-tertiary': '227, 247, 253, 1',
|
|
2655
|
-
'bg-accent6-primary': '255, 84, 165, 1',
|
|
2656
|
-
'bg-accent6-secondary': '255, 179, 215, 1',
|
|
2657
|
-
'bg-accent6-tertiary': '255, 217, 235, 1',
|
|
2658
|
-
'bg-accent7-primary': '37, 159, 159, 1',
|
|
2659
|
-
'bg-accent7-secondary': '155, 212, 214, 1',
|
|
2660
|
-
'bg-accent7-tertiary': '208, 239, 239, 1',
|
|
2661
|
-
'bg-accent8-primary': '86, 61, 130, 1',
|
|
2662
|
-
'bg-accent8-secondary': '199, 162, 204, 1',
|
|
2663
|
-
'bg-accent8-tertiary': '230, 214, 234, 1',
|
|
2664
|
-
'bg-accent9-primary': '255, 191, 63, 1',
|
|
2665
|
-
'bg-accent9-secondary': '254, 215, 142, 1',
|
|
2666
|
-
'bg-accent9-tertiary': '251, 226, 185, 1',
|
|
2667
|
-
'bg-accent10-primary': '237, 122, 35, 1',
|
|
2668
|
-
'bg-accent10-secondary': '241, 146, 85, 1',
|
|
2669
|
-
'bg-accent10-tertiary': '245, 187, 148, 1',
|
|
2670
|
-
'bg-date-picker-range': '32, 54, 69, 1',
|
|
2671
|
-
'text-primary': '252, 252, 252, 1',
|
|
2672
|
-
'text-secondary': '188, 186, 213, 1',
|
|
2673
|
-
'text-inverted-primary': '4, 4, 28, 1',
|
|
2674
|
-
'text-inverted-secondary': '107, 116, 125, 1',
|
|
2675
|
-
'text-black': '32, 54, 69, 1',
|
|
2676
|
-
'text-white': '252, 252, 252, 1',
|
|
2677
|
-
'text-brand': '176, 180, 181, 1',
|
|
2678
|
-
'text-danger-link': '255, 56, 97, 1',
|
|
2679
|
-
'text-danger-link-hover': '255, 71, 123, 1',
|
|
2680
|
-
'text-danger-link-active': '230, 50, 87, 1',
|
|
2681
|
-
'text-danger-link-focus': '255, 82, 136, 1',
|
|
2682
|
-
'text-danger-link-visited': '255, 56, 97, 1',
|
|
2683
|
-
'text-disabled': '70, 71, 101, 1',
|
|
2684
|
-
'text-error': '255, 56, 97, 1',
|
|
2685
|
-
'text-input-disabled': '176, 180, 181, 1',
|
|
2686
|
-
'text-input-placeholder': '89, 96, 99, 1',
|
|
2687
|
-
'text-link': '0, 187, 255, 1',
|
|
2688
|
-
'text-link-hover': '0, 204, 255, 1',
|
|
2689
|
-
'text-link-active': '4, 165, 245, 1',
|
|
2690
|
-
'text-link-focus': '0, 204, 255, 1',
|
|
2691
|
-
'text-link-visited': '128, 107, 255, 1',
|
|
2692
|
-
'text-on-action': '4, 4, 28, 1',
|
|
2693
|
-
'text-on-danger': '4, 4, 28, 1',
|
|
2694
|
-
'text-on-disabled': '4, 4, 28, 1',
|
|
2695
|
-
'text-sidebar-link': '188, 186, 213, 1',
|
|
2696
|
-
'text-sidebar-link-hover': '18, 18, 39, 1',
|
|
2697
|
-
'text-sidebar-link-selected': '252, 252, 252, 1',
|
|
2698
|
-
'text-site-footer-link': '171, 198, 216, 1',
|
|
2699
|
-
'text-site-footer-link-hover': '199, 217, 229, 1',
|
|
2700
|
-
'text-site-footer-link-active': '143, 179, 203, 1',
|
|
2701
|
-
'text-success': '89, 217, 119, 1',
|
|
2702
|
-
'text-inverted-success': '1, 128, 31, 1',
|
|
2703
|
-
'text-accent1-primary': '109, 217, 202, 1',
|
|
2704
|
-
'text-accent2-primary': '95, 56, 206, 1',
|
|
2705
|
-
'text-accent3-primary': '255, 203, 105, 1',
|
|
2706
|
-
'text-accent4-primary': '255, 129, 87, 1',
|
|
2707
|
-
'text-accent5-primary': '4, 165, 245, 1',
|
|
2708
|
-
'text-accent6-primary': '255, 71, 123, 1',
|
|
2709
|
-
'text-accent7-primary': '37, 159, 159, 1',
|
|
2710
|
-
'text-accent8-primary': '86, 61, 130, 1',
|
|
2711
|
-
'text-accent9-primary': '255, 191, 63, 1',
|
|
2712
|
-
'text-accent10-primary': '237, 122, 35, 1',
|
|
2713
|
-
'border-color-action': '0, 187, 255, 1',
|
|
2714
|
-
'border-color-action-hover': '0, 204, 255, 1',
|
|
2715
|
-
'border-color-action-active': '4, 165, 245, 1',
|
|
2716
|
-
'border-color-chip': '107, 116, 125, 1',
|
|
2717
|
-
'border-color-danger': '255, 56, 97, 1',
|
|
2718
|
-
'border-color-danger-hover': '255, 71, 123, 1',
|
|
2719
|
-
'border-color-danger-active': '230, 50, 87, 1',
|
|
2720
|
-
'border-color-divider': '32, 54, 69, 1',
|
|
2721
|
-
'border-color-divider-secondary': '51, 57, 61, 1',
|
|
2722
|
-
'border-color-input-field': '32, 54, 69, 1',
|
|
2723
|
-
'border-color-input-field-hover': '58, 98, 125, 1',
|
|
2724
|
-
'border-color-input-field-focus': '0, 187, 255, 1',
|
|
2725
|
-
'border-color-input-field-danger': '255, 56, 97, 1',
|
|
2726
|
-
'border-color-input-field-danger-hover': '255, 71, 123, 1',
|
|
2727
|
-
'border-color-input-field-danger-focus': '255, 56, 97, 1',
|
|
2728
|
-
'border-color-input-field-disabled': '4, 4, 28, 1',
|
|
2729
|
-
'border-color-secondary-btn-disabled': '70, 71, 101, 1',
|
|
2730
|
-
'border-color-sidebar-item-focus': '0, 187, 255, 1',
|
|
2731
|
-
'border-color-slider-handle': '107, 116, 125, 1',
|
|
2732
|
-
'border-color-success': '89, 217, 119, 1',
|
|
2733
|
-
'border-color-table-divider': '32, 54, 69, 1',
|
|
2734
|
-
'border-color-tile': '32, 54, 69, 1',
|
|
2735
|
-
'border-color-tile-hover': '58, 98, 125, 1',
|
|
2736
|
-
'border-color-tile-focus': '0, 187, 255, 1',
|
|
2737
|
-
'border-color-tile-selected-focus': '153, 192, 255, 1',
|
|
2738
|
-
'border-color-tile-selected': '153, 192, 255, 1',
|
|
2739
|
-
'border-color-tile-selected-hover': '178, 208, 255, 1',
|
|
2740
|
-
'border-color-notification-btn': '252, 252, 252, 1',
|
|
2741
|
-
'border-color-notification-btn-dark': '32, 54, 69, 1',
|
|
2742
|
-
};
|
|
2743
|
-
|
|
2744
|
-
/* This file is generated by vega-design 2.0.77 */
|
|
2745
|
-
const DarkModeBorderTokens = {
|
|
2746
|
-
'border-secondary-btn': '0, 187, 255, 1',
|
|
2747
|
-
'border-secondary-btn-hover': '0, 204, 255, 1',
|
|
2748
|
-
'border-secondary-danger-btn': '255, 56, 97, 1',
|
|
2749
|
-
'border-secondary-btn-active': '4, 165, 245, 1',
|
|
2750
|
-
'border-secondary-danger-btn-hover': '255, 71, 123, 1',
|
|
2751
|
-
'border-secondary-danger-btn-active': '230, 50, 87, 1',
|
|
2752
|
-
'border-input-field': '32, 54, 69, 1',
|
|
2753
|
-
'border-input-field-hover': '58, 98, 125, 1',
|
|
2754
|
-
'border-input-field-focus': '0, 187, 255, 1',
|
|
2755
|
-
'border-input-field-danger': '255, 56, 97, 1',
|
|
2756
|
-
'border-input-field-danger-hover': '255, 71, 123, 1',
|
|
2757
|
-
'border-input-field-danger-focus': '255, 56, 97, 1',
|
|
2758
|
-
'border-sidebar-item-focus': '0, 187, 255, 1',
|
|
2759
|
-
'border-input-field-disabled': '4, 4, 28, 1',
|
|
2760
|
-
'border-success': '89, 217, 119, 1',
|
|
2761
|
-
'border-secondary-btn-disabled': '70, 71, 101, 1',
|
|
2762
|
-
'border-chip': '107, 116, 125, 1',
|
|
2763
|
-
'border-divider': '32, 54, 69, 1',
|
|
2764
|
-
'border-divider-secondary': '51, 57, 61, 1',
|
|
2765
|
-
'border-tile-selected': '153, 192, 255, 1',
|
|
2766
|
-
'border-tile-selected-hover': '178, 208, 255, 1',
|
|
2767
|
-
'border-table-divider': '32, 54, 69, 1',
|
|
2768
|
-
'border-slider-handle': '107, 116, 125, 1',
|
|
2769
|
-
'border-tile': '32, 54, 69, 1',
|
|
2770
|
-
'border-tile-hover': '58, 98, 125, 1',
|
|
2771
|
-
'border-tile-focus': '0, 187, 255, 1',
|
|
2772
|
-
'border-tile-selected-focus': '153, 192, 255, 1',
|
|
2773
|
-
'border-notification-btn': '252, 252, 252, 1',
|
|
2774
|
-
'border-notification-btn-black': '32, 54, 69, 1',
|
|
2775
|
-
};
|
|
2776
|
-
|
|
2777
|
-
/* This file is generated by vega-design 2.0.77 */
|
|
2778
|
-
const DarkModeShadowTokens = {
|
|
2779
|
-
'shadow-card': '0px 2px 10px 0px rgba(0, 0, 0, 0.18), 0px 2px 4px 0px rgba(0, 0, 0, 0.1)',
|
|
2780
|
-
'shadow-modal': '0px 6px 40px 0px rgba(2, 2, 15, 0.14), 0px 4px 24px 0px rgba(2, 2, 15, 0.28), 0px 8px 80px 0px rgba(2, 2, 15, 0.26)',
|
|
2781
|
-
'shadow-popover': '0px 0px 88px 0px rgba(2, 2, 15, 0.08), 0px 0px 32px 0px rgba(2, 2, 15, 0.1), 0px 4px 72px 0px rgba(2, 2, 15, 0.16)',
|
|
2782
|
-
'shadow-form-field': '0px 1px 2px 0px rgba(170, 170, 170, 0.06), 0px 1px 3px 0px rgba(170, 170, 170, 0.1)',
|
|
2783
|
-
'shadow-dropdown-menu': '0px 2px 4px -2px rgba(0, 0, 0, 0.14), 0px 4px 6px -1px rgba(0, 0, 0, 0.16)',
|
|
2784
|
-
'shadow-app-header': '0px 1px 0px 0px rgba(188, 186, 213, 0.25)',
|
|
2785
|
-
'shadow-modal-header': '0px 1px 0px 0px rgba(188, 186, 213, 0.25)',
|
|
2786
|
-
'shadow-modal-footer': '0px -2px 8px 0px rgba(188, 186, 213, 0.4), 0px -1px 0px 0px rgba(188, 186, 213, 0.25)',
|
|
2787
|
-
'shadow-modal-footer-no-scroll': '0px -1px 0px 0px rgba(188, 186, 213, 0.25)',
|
|
2788
|
-
};
|
|
2789
|
-
|
|
2790
|
-
/* This file is generated by vega-design 2.0.77 */
|
|
2791
|
-
const DarkModeRingTokens = {
|
|
2792
|
-
'ring-input-focus': '0, 187, 255, 0.25',
|
|
2793
|
-
'ring-input-danger-focus': '255, 56, 97, 0.25',
|
|
2794
|
-
'ring-action-focus': '0, 187, 255, 0.25',
|
|
2795
|
-
'ring-action-danger-focus': '255, 56, 97, 0.25',
|
|
2796
|
-
};
|
|
2797
|
-
|
|
2798
|
-
// TODO: Remove this after the token add in vega design.
|
|
2799
|
-
const CustomDarkModeColorTokens = {
|
|
2800
|
-
'bg-backdrop-loading': '0, 0, 0, 0.5',
|
|
2801
|
-
'text-page-notification-content': DarkModeColorTokens['text-inverted-primary'],
|
|
2802
|
-
'bg-textarea-counter-exceed-max-length': '255, 87, 114',
|
|
2803
|
-
'bg-date-picker-range': '32, 54, 69, 1',
|
|
2804
|
-
'regular-credit-card-bg': '252, 252, 252, 1',
|
|
2805
|
-
'regular-credit-card-top': '4, 4, 28, 1',
|
|
2806
|
-
'regular-credit-card-bottom': '255, 255, 255, 1',
|
|
2807
|
-
};
|
|
2808
|
-
/**
|
|
2809
|
-
* Vega components dark mode style controller
|
|
2810
|
-
*/
|
|
2811
|
-
class DarkModeStyleController {
|
|
2812
|
-
constructor() {
|
|
2813
|
-
this.dynamicCustomDarkModeColor = {};
|
|
2814
|
-
this.darkModeColorAllTokens = {};
|
|
2815
|
-
this.observer = new Observer(this.isAcceptObserver.bind(this), (isDark) => {
|
|
2816
|
-
if (isDark) {
|
|
2817
|
-
this.generateDarkModeStyle();
|
|
2818
|
-
}
|
|
2819
|
-
else {
|
|
2820
|
-
this.removeDarkModeStyleContainer();
|
|
2821
|
-
}
|
|
2822
|
-
});
|
|
2823
|
-
ChangeManager.register(DARK_MODE_CHANGE, this.observer);
|
|
2824
|
-
}
|
|
2825
|
-
/**
|
|
2826
|
-
* This method dynamically registers a custom dark color.
|
|
2827
|
-
*
|
|
2828
|
-
* @param {Record<string, string>} customDarkModeColor - custom dark mode color
|
|
2829
|
-
*/
|
|
2830
|
-
registerCustomDarkModeColor(customDarkModeColor) {
|
|
2831
|
-
this.dynamicCustomDarkModeColor = Object.assign(Object.assign({}, this.dynamicCustomDarkModeColor), customDarkModeColor);
|
|
2832
|
-
this.generateDarkModeStyle();
|
|
2833
|
-
}
|
|
2834
|
-
/**
|
|
2835
|
-
* It generates a CSS style for dark mode to override the style.
|
|
2836
|
-
*/
|
|
2837
|
-
generateDarkModeStyle() {
|
|
2838
|
-
this.darkModeColorAllTokens = Object.assign(DarkModeColorTokens, DarkModeBorderTokens, DarkModeRingTokens, DarkModeShadowTokens, CustomDarkModeColorTokens, this.dynamicCustomDarkModeColor);
|
|
2839
|
-
const keys = Object.keys(this.darkModeColorAllTokens);
|
|
2840
|
-
this.getDarkModeStyleContainer().innerHTML = `
|
|
2841
|
-
html.dark {
|
|
2842
|
-
\t\t${keys.map((key) => `--v-${key}: ${this.darkModeColorAllTokens[key]};`).join('\n\t\t')}}`;
|
|
2843
|
-
}
|
|
2844
|
-
/**
|
|
2845
|
-
* It creates a `vegaDarkModeStyle` style tag in the head of the document if it doesn't exist, and returns it.
|
|
2846
|
-
*
|
|
2847
|
-
* @returns {Element} The `vegaDarkModeStyleContainer` is being returned.
|
|
2848
|
-
*/
|
|
2849
|
-
getDarkModeStyleContainer() {
|
|
2850
|
-
let vegaDarkModeStyleContainer = document.head.querySelector(`#vegaDarkModeStyle`);
|
|
2851
|
-
if (!vegaDarkModeStyleContainer) {
|
|
2852
|
-
vegaDarkModeStyleContainer = document.createElement('style');
|
|
2853
|
-
vegaDarkModeStyleContainer.id = 'vegaDarkModeStyle';
|
|
2854
|
-
document.head.append(vegaDarkModeStyleContainer);
|
|
2855
|
-
}
|
|
2856
|
-
return vegaDarkModeStyleContainer;
|
|
2857
|
-
}
|
|
2858
|
-
/**
|
|
2859
|
-
* Remove the vegaDarkModeStyle style element.
|
|
2860
|
-
*/
|
|
2861
|
-
removeDarkModeStyleContainer() {
|
|
2862
|
-
const vegaDarkModeStyleContainer = document.head.querySelector(`#vegaDarkModeStyle`);
|
|
2863
|
-
if (vegaDarkModeStyleContainer) {
|
|
2864
|
-
vegaDarkModeStyleContainer.remove();
|
|
2865
|
-
}
|
|
2866
|
-
}
|
|
2867
|
-
/**
|
|
2868
|
-
* Determines whether the observer should accept changes.
|
|
2869
|
-
*
|
|
2870
|
-
* @returns {boolean} Always returns true in the current implementation.
|
|
2871
|
-
*/
|
|
2872
|
-
isAcceptObserver() {
|
|
2873
|
-
return true;
|
|
2874
|
-
}
|
|
2875
|
-
}
|
|
2876
|
-
const VegaDarkModeStyleController = new DarkModeStyleController();
|
|
2877
|
-
|
|
2878
|
-
const ThemeManagerRuntimeMetricsPayloadDefinition = [
|
|
2879
|
-
{
|
|
2880
|
-
payloadKey: 'IS_OVERRIDECOLORS_METHOD_CALLED',
|
|
2881
|
-
payloadDescription: 'Indicate if the method overrideColors of public API ThemeManager is called',
|
|
2882
|
-
/**
|
|
2883
|
-
* Indicate whether the method is collected when the method been called .
|
|
2884
|
-
*
|
|
2885
|
-
* @param {string} scope - The class name of public api
|
|
2886
|
-
* @param {string} methodName - The method name called by the public api
|
|
2887
|
-
* @returns {boolean} A boolean value
|
|
2888
|
-
*/
|
|
2889
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'overrideColors',
|
|
2890
|
-
/**
|
|
2891
|
-
* The function checks if the method is be called.
|
|
2892
|
-
*
|
|
2893
|
-
* @returns {boolean} A boolean value
|
|
2894
|
-
*/
|
|
2895
|
-
payloadValue: () => {
|
|
2896
|
-
return true;
|
|
2897
|
-
},
|
|
2898
|
-
},
|
|
2899
|
-
{
|
|
2900
|
-
payloadKey: 'IS_RESET_METHOD_CALLED',
|
|
2901
|
-
payloadDescription: 'Indicate if the method reset of public API ThemeManager is called',
|
|
2902
|
-
/**
|
|
2903
|
-
* Indicate whether the method is collected when the method been called .
|
|
2904
|
-
*
|
|
2905
|
-
* @param {string} scope - The class name of public api
|
|
2906
|
-
* @param {string} methodName - The method name called by the public api
|
|
2907
|
-
* @returns {boolean} A boolean value
|
|
2908
|
-
*/
|
|
2909
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'reset',
|
|
2910
|
-
/**
|
|
2911
|
-
* The function checks if the method is be called.
|
|
2912
|
-
*
|
|
2913
|
-
* @returns {boolean} A boolean value
|
|
2914
|
-
*/
|
|
2915
|
-
payloadValue: () => {
|
|
2916
|
-
return true;
|
|
2917
|
-
},
|
|
2918
|
-
},
|
|
2919
|
-
{
|
|
2920
|
-
payloadKey: 'IS_TOGGLEDARKMODE_METHOD_CALLED',
|
|
2921
|
-
payloadDescription: 'Indicate if the method toggleDarkMode of public API ThemeManager is called',
|
|
2922
|
-
/**
|
|
2923
|
-
* Indicate whether the method is collected when the method been called .
|
|
2924
|
-
*
|
|
2925
|
-
* @param {string} scope - The class name of public api
|
|
2926
|
-
* @param {string} methodName - The method name called by the public api
|
|
2927
|
-
* @returns {boolean} A boolean value
|
|
2928
|
-
*/
|
|
2929
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'toggleDarkMode',
|
|
2930
|
-
/**
|
|
2931
|
-
* The function checks if the method is be called.
|
|
2932
|
-
*
|
|
2933
|
-
* @returns {boolean} A boolean value
|
|
2934
|
-
*/
|
|
2935
|
-
payloadValue: () => {
|
|
2936
|
-
return true;
|
|
2937
|
-
},
|
|
2938
|
-
},
|
|
2939
|
-
{
|
|
2940
|
-
payloadKey: 'IS_ISDARKMODE_METHOD_CALLED',
|
|
2941
|
-
payloadDescription: 'Indicate if the method isDarkMode of public API ThemeManager is called',
|
|
2942
|
-
/**
|
|
2943
|
-
* Indicate whether the method is collected when the method been called .
|
|
2944
|
-
*
|
|
2945
|
-
* @param {string} scope - The class name of public api
|
|
2946
|
-
* @param {string} methodName - The method name called by the public api
|
|
2947
|
-
* @returns {boolean} A boolean value
|
|
2948
|
-
*/
|
|
2949
|
-
canAccept: (scope, methodName) => scope === 'ThemeManager' && methodName === 'isDarkMode',
|
|
2950
|
-
/**
|
|
2951
|
-
* The function checks if the method is be called.
|
|
2952
|
-
*
|
|
2953
|
-
* @returns {boolean} A boolean value
|
|
2954
|
-
*/
|
|
2955
|
-
payloadValue: () => {
|
|
2956
|
-
return true;
|
|
2957
|
-
},
|
|
2958
|
-
},
|
|
2959
|
-
];
|
|
2960
|
-
|
|
2961
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2962
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2963
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2964
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
2965
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2966
|
-
};
|
|
2967
|
-
/**
|
|
2968
|
-
* Vega components theme manager
|
|
2969
|
-
*/
|
|
2970
|
-
class ThemeManager {
|
|
2971
|
-
constructor() {
|
|
2972
|
-
this.vegaPublicAPIRuntimeMetricsSlimmer = createPublicAPIRuntimeMetricsSlimmer(ThemeManager, ['overrideColors', 'reset', 'toggleDarkMode', 'isDarkMode'], ThemeManagerRuntimeMetricsPayloadDefinition);
|
|
2973
|
-
}
|
|
2974
|
-
/**
|
|
2975
|
-
* It takes the colors you passed in, parses them into the correct format, and then applies them to the theme
|
|
2976
|
-
*
|
|
2977
|
-
* @param {VegaThemeOverrideColors} overrideColors - OverrideColors - This is the object that you pass to the function.
|
|
2978
|
-
* @vegaVersion 1.20.0
|
|
2979
|
-
*/
|
|
2980
|
-
async overrideColors(overrideColors) {
|
|
2981
|
-
const overrideThemes = VegaColorSchemaOverridingController.generateOverrideThemes(overrideColors);
|
|
2982
|
-
VegaColorSchemaOverridingController.applyTheme(overrideThemes);
|
|
2983
|
-
}
|
|
2984
|
-
/**
|
|
2985
|
-
* It removes all the custom override theme styles from the DOM
|
|
2986
|
-
*
|
|
2987
|
-
* @vegaVersion 1.20.0
|
|
2988
|
-
*/
|
|
2989
|
-
async reset() {
|
|
2990
|
-
VegaColorSchemaOverridingController.getOverrideThemeContainer().innerHTML = '';
|
|
2991
|
-
}
|
|
2992
|
-
/**
|
|
2993
|
-
* This function toggles the dark mode of a webpage by adding or removing a 'dark' class to the HTML element.
|
|
2994
|
-
*
|
|
2995
|
-
* @param {boolean | undefined} darkMode - A boolean or undefined value that determines whether to enable or disable dark mode.
|
|
2996
|
-
* If it is true, dark mode is enabled.
|
|
2997
|
-
* If it is false, dark mode is disabled.
|
|
2998
|
-
* @vegaVersion 1.32.0
|
|
2999
|
-
*/
|
|
3000
|
-
toggleDarkMode(darkMode) {
|
|
3001
|
-
if (darkMode) {
|
|
3002
|
-
document.documentElement.classList.add('dark');
|
|
3003
|
-
VegaDarkModeStyleController.generateDarkModeStyle();
|
|
3004
|
-
}
|
|
3005
|
-
else {
|
|
3006
|
-
document.documentElement.classList.remove('dark');
|
|
3007
|
-
}
|
|
3008
|
-
ChangeManager.notify(DARK_MODE_CHANGE, darkMode);
|
|
3009
|
-
}
|
|
3010
|
-
/**
|
|
3011
|
-
* The function checks if the HTML element has a class of "dark" and returns a boolean value accordingly.
|
|
3012
|
-
*
|
|
3013
|
-
* @returns {boolean} A boolean value indicating whether the HTML element has a class of "dark", which is
|
|
3014
|
-
* typically used to indicate that the website is in dark mode.
|
|
3015
|
-
* @vegaVersion 1.32.0
|
|
3016
|
-
*/
|
|
3017
|
-
isDarkMode() {
|
|
3018
|
-
return document.documentElement.classList.contains('dark');
|
|
3019
|
-
}
|
|
3020
|
-
}
|
|
3021
|
-
__decorate([
|
|
3022
|
-
InjectVegaTelemetrySlimmer()
|
|
3023
|
-
], ThemeManager.prototype, "vegaPublicAPIRuntimeMetricsSlimmer", void 0);
|
|
3024
|
-
const VegaThemeManager = new ThemeManager();
|
|
6
|
+
import { g as generateUUID } from './create-public-api-runtime-metrics-slimmer-8ada793f.js';
|
|
7
|
+
import { V as VegaInternalThemeManager } from './dark-mode-style-controller-2ada8e22.js';
|
|
3025
8
|
|
|
3026
9
|
var InternalAnnotationTypeEnum;
|
|
3027
10
|
(function (InternalAnnotationTypeEnum) {
|
|
@@ -4390,7 +1373,7 @@ class TextColorAnnotation extends NodeAnnotation {
|
|
|
4390
1373
|
*/
|
|
4391
1374
|
render() {
|
|
4392
1375
|
return {
|
|
4393
|
-
color:
|
|
1376
|
+
color: VegaInternalThemeManager.isDarkMode() ? this.textColor.dark : this.textColor.light,
|
|
4394
1377
|
};
|
|
4395
1378
|
}
|
|
4396
1379
|
/**
|
|
@@ -6600,4 +3583,4 @@ class VegaRTEContent {
|
|
|
6600
3583
|
ActionHandleStrategyRegistry.register(ModifyContentActionType.INSERT_BLOCKS_AFTER, VegaRTEContent.name, new BlockInsertBlocksAfterStrategy());
|
|
6601
3584
|
})();
|
|
6602
3585
|
|
|
6603
|
-
export { AnnotationAction as A, BlockAnnotation as B, ClearFormattingAnnotationAction as C,
|
|
3586
|
+
export { AnnotationAction as A, BlockAnnotation as B, ClearFormattingAnnotationAction as C, BreakSingleBlockAction as D, RemoveChildAction as E, ReplaceChildNodesAction as F, InsertBlocksBeforeAction as G, HorizontalAlignmentAnnotation as H, InternalAnnotationTypeEnum as I, InsertBlocksAfterAction as J, LinkAnnotationAction as L, ModifyContentAction as M, NodeAnnotation as N, RTETextBlock as R, StrikethroughAnnotation as S, TextSplittableAction as T, UnderlineAnnotation as U, VegaRTEContent as V, ZERO_WIDTH_SPACE as Z, RTEImageBlock as a, RTEListItemBlock as b, RTEListBlock as c, RTEBlock as d, RTEImageNode as e, RTETextNode as f, RTENode as g, NodeAnnotationTypeEnum as h, ImageAnnotation as i, TextColorAnnotation as j, RTE_TEXT_COLORS as k, BoldAnnotationAction as l, ItalicAnnotation as m, TextStyleAnnotationAction as n, TextStyleAnnotation as o, BoldAnnotation as p, BlockAnnotationTypeEnum as q, CodeAnnotationAction as r, stateEntityRenderingRegistry as s, SelectionRangeAnnotation as t, IndentAnnotation as u, ModifyContentActionType as v, AppendChildNodesAction as w, UpdateTextAction as x, MergeTwoBlocksNodesAction as y, SplitBlockWithNodeAction as z };
|