@dialpad/dialtone-vue 4.6.1 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/common/mixins/keyboard-list-navigation.cjs +1 -1
  2. package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
  3. package/dist/common/mixins/keyboard-list-navigation.js +10 -7
  4. package/dist/common/mixins/keyboard-list-navigation.js.map +1 -1
  5. package/dist/common/mixins/keyboard_list_navigation.d.ts +1 -1
  6. package/dist/common/mixins/keyboard_list_navigation.d.ts.map +1 -1
  7. package/dist/common/phone/index.cjs +2 -0
  8. package/dist/common/phone/index.cjs.map +1 -0
  9. package/dist/common/phone/index.d.ts +4 -0
  10. package/dist/common/phone/index.d.ts.map +1 -0
  11. package/dist/common/phone/index.js +25 -0
  12. package/dist/common/phone/index.js.map +1 -0
  13. package/dist/component-documentation.json +1 -1
  14. package/dist/components/Combobox/Combobox.vue.d.ts +5 -1
  15. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  16. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts +2 -0
  17. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts.map +1 -1
  18. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts +2 -0
  19. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts.map +1 -1
  20. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +43 -5
  21. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
  22. package/dist/components/Dropdown/Dropdown.vue.d.ts +66 -5
  23. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  24. package/dist/components/FilterPill/FilterPill.vue.d.ts +519 -26
  25. package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
  26. package/dist/components/FilterPill/FilterPillConstants.d.ts +2 -0
  27. package/dist/components/FilterPill/FilterPillConstants.d.ts.map +1 -0
  28. package/dist/components/FilterPill/FilterPillControlled.d.ts +92 -0
  29. package/dist/components/FilterPill/FilterPillControlled.d.ts.map +1 -0
  30. package/dist/components/FilterPill/FilterPillSelection.d.ts +13 -0
  31. package/dist/components/FilterPill/FilterPillSelection.d.ts.map +1 -0
  32. package/dist/components/Hovercard/Hovercard.vue.d.ts +86 -16
  33. package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
  34. package/dist/components/ListItem/ListItem.vue.d.ts +2 -0
  35. package/dist/components/ListItem/ListItem.vue.d.ts.map +1 -1
  36. package/dist/components/ListItem/ListItemConstants.d.ts +2 -0
  37. package/dist/components/ListItem/ListItemConstants.d.ts.map +1 -1
  38. package/dist/components/ListItem/index.d.ts +1 -1
  39. package/dist/components/Notice/Notice.vue.d.ts +1 -1
  40. package/dist/components/Popover/Popover.vue.d.ts +34 -4
  41. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  42. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts +9 -0
  43. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts.map +1 -1
  44. package/dist/components/RichTextEditor/Extensions/Channels/ChannelComponent.vue.d.ts +9 -0
  45. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts +9 -0
  46. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts.map +1 -1
  47. package/dist/components/RichTextEditor/Extensions/Emoji/EmojiSuggestion.vue.d.ts +9 -0
  48. package/dist/components/RichTextEditor/Extensions/Mentions/MentionSuggestion.vue.d.ts +9 -0
  49. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts +2 -0
  50. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts.map +1 -1
  51. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +34 -4
  52. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
  53. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +20 -0
  54. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  55. package/dist/components/SplitButton/SplitButton.vue.d.ts +66 -5
  56. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  57. package/dist/components/Stack/Stack.vue.d.ts +9 -0
  58. package/dist/components/Stack/Stack.vue.d.ts.map +1 -1
  59. package/dist/components/Stack/StackConstants.d.ts +2 -0
  60. package/dist/components/Stack/StackConstants.d.ts.map +1 -1
  61. package/dist/components/Stack/Utils.d.ts +2 -1
  62. package/dist/components/Stack/Utils.d.ts.map +1 -1
  63. package/dist/components/Stack/Validators.d.ts +1 -0
  64. package/dist/components/Stack/Validators.d.ts.map +1 -1
  65. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts +1 -1
  66. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts +1 -1
  67. package/dist/components/Toast/Toast.vue.d.ts +5 -5
  68. package/dist/dialtone-vue.cjs +1 -1
  69. package/dist/dialtone-vue.js +131 -130
  70. package/dist/index.d.ts +1 -0
  71. package/dist/lib/dropdown/dropdown.cjs +1 -1
  72. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  73. package/dist/lib/dropdown/dropdown.js +73 -13
  74. package/dist/lib/dropdown/dropdown.js.map +1 -1
  75. package/dist/lib/filter-pill/filter-pill-constants.cjs +2 -0
  76. package/dist/lib/filter-pill/filter-pill-constants.cjs.map +1 -0
  77. package/dist/lib/filter-pill/filter-pill-constants.js +7 -0
  78. package/dist/lib/filter-pill/filter-pill-constants.js.map +1 -0
  79. package/dist/lib/filter-pill/filter-pill-controlled.cjs +2 -0
  80. package/dist/lib/filter-pill/filter-pill-controlled.cjs.map +1 -0
  81. package/dist/lib/filter-pill/filter-pill-controlled.js +308 -0
  82. package/dist/lib/filter-pill/filter-pill-controlled.js.map +1 -0
  83. package/dist/lib/filter-pill/filter-pill-selection.cjs +2 -0
  84. package/dist/lib/filter-pill/filter-pill-selection.cjs.map +1 -0
  85. package/dist/lib/filter-pill/filter-pill-selection.js +32 -0
  86. package/dist/lib/filter-pill/filter-pill-selection.js.map +1 -0
  87. package/dist/lib/filter-pill/filter-pill.cjs +1 -1
  88. package/dist/lib/filter-pill/filter-pill.cjs.map +1 -1
  89. package/dist/lib/filter-pill/filter-pill.js +362 -96
  90. package/dist/lib/filter-pill/filter-pill.js.map +1 -1
  91. package/dist/lib/list-item/index.cjs +1 -1
  92. package/dist/lib/list-item/index.js +3 -3
  93. package/dist/lib/list-item/list-item-constants.cjs +1 -1
  94. package/dist/lib/list-item/list-item-constants.cjs.map +1 -1
  95. package/dist/lib/list-item/list-item-constants.js +12 -6
  96. package/dist/lib/list-item/list-item-constants.js.map +1 -1
  97. package/dist/lib/list-item/list-item.cjs +1 -1
  98. package/dist/lib/list-item/list-item.cjs.map +1 -1
  99. package/dist/lib/list-item/list-item.js +36 -32
  100. package/dist/lib/list-item/list-item.js.map +1 -1
  101. package/dist/lib/popover/popover-header-footer.cjs +1 -1
  102. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  103. package/dist/lib/popover/popover-header-footer.js +7 -1
  104. package/dist/lib/popover/popover-header-footer.js.map +1 -1
  105. package/dist/lib/popover/popover.cjs +1 -1
  106. package/dist/lib/popover/popover.cjs.map +1 -1
  107. package/dist/lib/popover/popover.js +57 -21
  108. package/dist/lib/popover/popover.js.map +1 -1
  109. package/dist/lib/stack/stack-constants.cjs +1 -1
  110. package/dist/lib/stack/stack-constants.cjs.map +1 -1
  111. package/dist/lib/stack/stack-constants.js +5 -4
  112. package/dist/lib/stack/stack-constants.js.map +1 -1
  113. package/dist/lib/stack/stack.cjs +1 -1
  114. package/dist/lib/stack/stack.cjs.map +1 -1
  115. package/dist/lib/stack/stack.js +26 -18
  116. package/dist/lib/stack/stack.js.map +1 -1
  117. package/dist/lib/stack/utils.cjs +1 -1
  118. package/dist/lib/stack/utils.cjs.map +1 -1
  119. package/dist/lib/stack/utils.js +44 -36
  120. package/dist/lib/stack/utils.js.map +1 -1
  121. package/dist/lib/stack/validators.cjs +1 -1
  122. package/dist/lib/stack/validators.cjs.map +1 -1
  123. package/dist/lib/stack/validators.js +16 -13
  124. package/dist/lib/stack/validators.js.map +1 -1
  125. package/dist/localization/en-US.cjs +9 -0
  126. package/dist/localization/en-US.cjs.map +1 -1
  127. package/dist/localization/en-US.js +1 -1
  128. package/dist/localization/en-US.js.map +1 -1
  129. package/package.json +7 -6
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":[],"sources":["../../../components/Popover/Popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n :to=\"scrimTarget\"\n >\n <div\n class=\"d-modal--transparent\"\n data-qa=\"dt-popover-scrim\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n v-dt-focustrap=\"{\n active: (modal || focustrap) && isOpen,\n initialFocus: false,\n restoreFocus: !modal && focustrap,\n }\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${isDialogAriaHidden}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-bind=\"modeAttrs\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], headerWrapperClass]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], footerWrapperClass]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_BOUNDARY_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './PopoverConstants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/LazyShow';\nimport ModalMixin from '@/common/mixins/modal';\nimport ModeMixin from '@/common/mixins/mode';\nimport { createTippyPopover, getPopperOptions } from './TippyUtils';\nimport PopoverHeaderFooter from './PopoverHeaderFooter.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin, ModeMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. When null (default), the popover\n * toggles on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Closes the popover when clicking the anchor or outside the content box.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * When true, traps Tab/Shift+Tab focus within the popover dialog.\n * Use this to enable focus trapping independently of modal state —\n * e.g. a non-modal popover whose content still requires keyboard containment.\n * When `modal` is true, the trap is already active; this prop has no additional effect.\n * @values true, false\n */\n focustrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The element used to determine overflow boundaries for the popover.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/utils/detect-overflow/#boundary\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values clippingParents, viewport, document, HTMLElement\n */\n boundary: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'clippingParents',\n validator: boundary => {\n return POPOVER_BOUNDARY_VALUES.includes(boundary) ||\n (boundary instanceof HTMLElement);\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header element (d-popover__header).\n */\n headerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer element (d-popover__footer).\n */\n footerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest ancestor <dialog> element when inside one\n * (keeping the popover in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n // Only true once the leave transition (and any focus restoration in onLeaveTransitionComplete) has\n // finished, so aria-hidden is never applied while the dialog still holds focus or is still visible.\n isDialogAriaHidden: true,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n // Resolved in initTippyInstance(), the same moment the content's own target is resolved,\n // rather than left as a live computed — otherwise the scrim could drift from the content\n // if appendTo changes while already open, since content resolution isn't reactive to that.\n // Starts as the string 'body' (a valid Teleport target, matching the original hardcoded\n // default) rather than null or document.body -- Teleport needs a valid target from the\n // first render, and document.body would break SSR where document doesn't exist.\n scrimTarget: 'body',\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-spacing-50))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n\n modalValidationState () {\n return [this.modal, this.initialFocusElement];\n },\n\n },\n\n watch: {\n modalValidationState: { handler: 'validateProps', immediate: true },\n\n modal: {\n immediate: true,\n handler (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n },\n\n offset: {\n deep: true,\n handler (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements: {\n deep: true,\n handler () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n boundary () {\n this.tip?.setProps({ popperOptions: this.popperOptions() });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.isDialogAriaHidden = false;\n // Guard against isOpen flipping true before mounted() has resolved an anchorEl\n // (e.g. an immediate `open` prop watcher firing pre-mount) — creating a tippy\n // instance with no anchor leaves a stale getReferenceClientRect wired up.\n if (!this.anchorEl) return;\n this.initTippyInstance();\n this.tip?.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-spacing-50) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n getModeReferenceEl () {\n return this.$refs.anchor;\n },\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n boundary: this.boundary,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n if (this._isUnmounting) return;\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\n // Focus has been moved off the dialog (or was never trapped in it) by this point, so it's now\n // safe to hide it from assistive technology without triggering a focused-descendant violation.\n this.isDialogAriaHidden = true;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.closeOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n // Tab focus trapping (when modal or focustrap) is handled by the v-dt-focustrap directive on the content.\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n resolveParentScrimTarget () {\n return this.anchorEl?.parentElement ?? document.body;\n },\n\n resolveRootScrimTarget () {\n try {\n return window.parent.document.body;\n } catch {\n // Matches the content's own fallback: when the parent frame is cross-origin,\n // initTippyInstance falls back to Tippy's 'parent' sentinel (the anchor's own\n // parentElement) rather than document.body.\n return this.resolveParentScrimTarget();\n }\n },\n\n resolveBodyScrimTarget () {\n return this.anchorEl?.closest('dialog') ?? this.anchorEl?.getRootNode()?.querySelector('body') ?? document.body;\n },\n\n // The scrim must land in the same top-layer context as the popover's own content\n // (the nearest ancestor <dialog> when nested in one). Otherwise, inside a native\n // <dialog>-based DtModal, a plain document.body scrim can't block clicks on the\n // rest of the dialog since top-layer content always paints above it regardless\n // of z-index — the \"modal\" behavior silently does nothing when nested.\n resolveScrimTarget () {\n if (this.appendTo instanceof HTMLElement) {\n return this.appendTo;\n }\n\n switch (this.appendTo) {\n case 'parent':\n return this.resolveParentScrimTarget();\n case 'root':\n return this.resolveRootScrimTarget();\n default:\n return this.resolveBodyScrimTarget();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n // Popper's own debounced forceUpdate() can invoke this callback for the lifetime of the\n // tippy instance, including after anchorEl has gone null (e.g. isOpen flips true before\n // mounted() resolves an anchor). Returning undefined here throws inside that debounced\n // call, so fall back to a zero rect instead.\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect() ?? {\n width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0, x: 0, y: 0,\n };\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n this.scrimTarget = this.resolveScrimTarget();\n\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n // When inside a native <dialog> (e.g. DtModal in Dialtone Next), append to the\n // dialog so the popover stays in the browser's top layer. Otherwise fall back to body.\n internalAppendTo = this.anchorEl?.closest('dialog') ??\n this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;AA6JA,IAAK,IAAU;CACb,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EACA,qBAAA;EACD;CAED,QAAQ,CAAC,GAAY,EAAU;CAE/B,OAAO;EAOL,MAAM;GACJ,MAAM,CAAC,SAAS,KAAK;GACrB,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ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ChB,MAAK;KACJ,qBAAmB,EAAA;KACnB,SAAO,EAAA;;KAEG,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;;;;;;IAI1B,EAcM,OAAA;KAbJ,KAAI;KACH,WAAS,EAAA,OAAM,aAAA,GAAiB,EAAA,OAAM,WAAA,YAAA;KACtC,OAAK,EAAA;;MAAkD,EAAA,wBAAwB,EAAA;MAAsB,EAAA;;QAOtG,EAGE,EAAA,QAAA,WAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,EAAA,IAAA,EAAA;IAIhB,EAAA,eAAe,EAAA,OAAO,cAAa,IAAA,GAAA,EAD3C,EAcwB,GAAA;;KAZtB,KAAI;KACJ,MAAK;KACJ,OAAK,EAAA,CAAG,EAAA,sCAAsC,EAAA,UAAU,EAAA,mBAAkB,CAAA;KAC1E,iBAAe,EAAA;;KAEL,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;IAKjB,EAAA,+BAAA,GAAA,EADT,EAGE,GAAA;;KADC,SAAO,EAAA;;;;;;;;;;;;;;;;;;;;;;YA3E2B,EAAA,SAAS,EAAA,cAAc,EAAA;;kBAAgE,EAAA,SAAS,EAAA"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../../components/Popover/Popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n :to=\"scrimTarget\"\n >\n <div\n class=\"d-modal--transparent\"\n data-qa=\"dt-popover-scrim\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up=\"onArrowKeyPress\"\n @keydown.down=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n v-dt-focustrap=\"{\n active: (modal || focustrap) && isOpen,\n initialFocus: false,\n restoreFocus: !modal && focustrap,\n }\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${isDialogAriaHidden}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"role === 'menu' ? undefined : `${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-bind=\"modeAttrs\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], headerWrapperClass]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n :close-role=\"role === 'menu' ? 'menuitem' : undefined\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], footerWrapperClass]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n ref=\"popover__close-button\"\n :role=\"role === 'menu' ? 'menuitem' : undefined\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_BOUNDARY_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './PopoverConstants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/LazyShow';\nimport ModalMixin from '@/common/mixins/modal';\nimport ModeMixin from '@/common/mixins/mode';\nimport { createTippyPopover, getPopperOptions } from './TippyUtils';\nimport PopoverHeaderFooter from './PopoverHeaderFooter.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin, ModeMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. When null (default), the popover\n * toggles on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Optional callback receiving the open boolean synchronously on logical visibility changes.\n * Includes initial true during creation, before mount, when open=true.\n * Does not declare or emit an open-change event.\n * For modal removal, keep modal=true, its anchor and scroll container unchanged until opened(false).\n * Changing modal or the anchor's scroll context after opening can retain the original lock.\n * opened(false) reports transition completion, not global scroll-lock ownership.\n * A closed modal with no pending transition or retained scroll lock can be removed immediately.\n * Defer direct app.unmount() until Vue's next tick.\n */\n visibilityChangeCallback: {\n type: Function,\n default: null,\n },\n\n /**\n * Forwards anchor ArrowUp/ArrowDown with a boolean open prop without toggling.\n * Default false preserves controlled anchor keyboard behavior.\n * @values true, false\n */\n forwardAnchorArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Closes the popover when clicking the anchor or outside the content box.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * When true, traps Tab/Shift+Tab focus within the popover dialog.\n * Use this to enable focus trapping independently of modal state —\n * e.g. a non-modal popover whose content still requires keyboard containment.\n * When `modal` is true, the trap is already active; this prop has no additional effect.\n * @values true, false\n */\n focustrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The element used to determine overflow boundaries for the popover.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/utils/detect-overflow/#boundary\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values clippingParents, viewport, document, HTMLElement\n */\n boundary: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'clippingParents',\n validator: boundary => {\n return POPOVER_BOUNDARY_VALUES.includes(boundary) ||\n (boundary instanceof HTMLElement);\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header element (d-popover__header).\n */\n headerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer element (d-popover__footer).\n */\n footerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest ancestor <dialog> element when inside one\n * (keeping the popover in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted after the current transition and initial focus work complete\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n visibilityGeneration: 0,\n // Only true once the leave transition (and any focus restoration in onLeaveTransitionComplete) has\n // finished, so aria-hidden is never applied while the dialog still holds focus or is still visible.\n isDialogAriaHidden: true,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n // Resolved in initTippyInstance(), the same moment the content's own target is resolved,\n // rather than left as a live computed — otherwise the scrim could drift from the content\n // if appendTo changes while already open, since content resolution isn't reactive to that.\n // Starts as the string 'body' (a valid Teleport target, matching the original hardcoded\n // default) rather than null or document.body -- Teleport needs a valid target from the\n // first render, and document.body would break SSR where document doesn't exist.\n scrimTarget: 'body',\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-spacing-50))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor')) || undefined;\n },\n\n modalValidationState () {\n return [this.modal, this.initialFocusElement];\n },\n\n },\n\n watch: {\n modalValidationState: { handler: 'validateProps', immediate: true },\n\n modal: {\n immediate: true,\n handler (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n },\n\n offset: {\n deep: true,\n handler (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements: {\n deep: true,\n handler () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n boundary () {\n this.tip?.setProps({ popperOptions: this.popperOptions() });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n // Register before the immediate open watcher so initial open=true notifies and exposes the dialog.\n isOpen: [\n {\n flush: 'sync',\n handler (isOpen) {\n this.visibilityGeneration++;\n if (!this._isUnmounting) this.visibilityChangeCallback?.(isOpen);\n },\n },\n {\n handler (isOpen) {\n if (isOpen) {\n this.isDialogAriaHidden = false;\n // Initial open=true runs before mounted() resolves anchorEl; tippy needs an anchor.\n if (!this.anchorEl) return;\n this.initTippyInstance();\n this.tip?.show();\n } else {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n ],\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-spacing-50) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n getCloseButtonElement () {\n const closeButton = this.showCloseButton\n ? this.$refs.popover__header?.$refs['popover__close-button']\n : this.$refs['popover__close-button'];\n return returnFirstEl(closeButton?.$el);\n },\n\n getModeReferenceEl () {\n return this.$refs.anchor;\n },\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n boundary: this.boundary,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n const isControlled = this.open !== null;\n if (isControlled && this.forwardAnchorArrowKeys) {\n this.$emit('keydown', e);\n return;\n }\n e.preventDefault();\n if (isControlled) return;\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n if (this._isUnmounting) return;\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n isCurrentVisibility (generation, isOpen) {\n return !this._isUnmounting && this.visibilityGeneration === generation && this.isOpen === isOpen;\n },\n\n async onLeaveTransitionComplete () {\n const generation = this.visibilityGeneration;\n if (!this.isCurrentVisibility(generation, false)) return;\n if (this.modal) {\n const anchor = await this.getFirstFocusableElement(this.$refs.anchor);\n if (!this.isCurrentVisibility(generation, false)) return;\n anchor?.focus({ preventScroll: true });\n // Allow consumers to choose their own focus destination.\n await this.$nextTick();\n if (!this.isCurrentVisibility(generation, false)) return;\n this.enableScrolling();\n }\n this.isDialogAriaHidden = true;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.isCurrentVisibility(generation, false) && this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n const generation = this.visibilityGeneration;\n if (!this.isCurrentVisibility(generation, true)) return;\n await this.focusInitialElement(generation);\n // Allow consumers to choose their own focus destination.\n await this.$nextTick();\n if (!this.isCurrentVisibility(generation, true)) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.isCurrentVisibility(generation, true) && this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n async focusInitialElement (generation) {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n await this.focusFirstElementIfNeeded(this.$refs.popover__content, generation);\n }\n if (!this.isCurrentVisibility(generation, true)) return;\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.closeOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n // Tab focus trapping (when modal or focustrap) is handled by the v-dt-focustrap directive on the content.\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n async focusFirstElementIfNeeded (domEl, generation = this.visibilityGeneration) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n const element = await this.getFirstFocusableElement(domEl);\n if (!this.isCurrentVisibility(generation, true)) return;\n element?.focus({ preventScroll: true });\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n resolveParentScrimTarget () {\n return this.anchorEl?.parentElement ?? document.body;\n },\n\n resolveRootScrimTarget () {\n try {\n return window.parent.document.body;\n } catch {\n // Matches the content's own fallback: when the parent frame is cross-origin,\n // initTippyInstance falls back to Tippy's 'parent' sentinel (the anchor's own\n // parentElement) rather than document.body.\n return this.resolveParentScrimTarget();\n }\n },\n\n resolveBodyScrimTarget () {\n return this.anchorEl?.closest('dialog') ?? this.anchorEl?.getRootNode()?.querySelector('body') ?? document.body;\n },\n\n // The scrim must land in the same top-layer context as the popover's own content\n // (the nearest ancestor <dialog> when nested in one). Otherwise, inside a native\n // <dialog>-based DtModal, a plain document.body scrim can't block clicks on the\n // rest of the dialog since top-layer content always paints above it regardless\n // of z-index — the \"modal\" behavior silently does nothing when nested.\n resolveScrimTarget () {\n if (this.appendTo instanceof HTMLElement) {\n return this.appendTo;\n }\n\n switch (this.appendTo) {\n case 'parent':\n return this.resolveParentScrimTarget();\n case 'root':\n return this.resolveRootScrimTarget();\n default:\n return this.resolveBodyScrimTarget();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n // Popper's own debounced forceUpdate() can invoke this callback for the lifetime of the\n // tippy instance, including after anchorEl has gone null (e.g. isOpen flips true before\n // mounted() resolves an anchor). Returning undefined here throws inside that debounced\n // call, so fall back to a zero rect instead.\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect() ?? {\n width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0, x: 0, y: 0,\n };\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n this.scrimTarget = this.resolveScrimTarget();\n\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n // When inside a native <dialog> (e.g. DtModal in Dialtone Next), append to the\n // dialog so the popover stays in the browser's top layer. Otherwise fall back to body.\n internalAppendTo = this.anchorEl?.closest('dialog') ??\n this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;AAgKA,IAAK,IAAU;CACb,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EACA,qBAAA;EACD;CAED,QAAQ,CAAC,GAAY,EAAU;CAE/B,OAAO;EAOL,MAAM;GACJ,MAAM,CAAC,SAAS,KAAK;GACrB,SAAS;GACV;EAYD,0BAA0B;GACxB,MAAM;GACN,SAAS;GACV;EAOD,wBAAwB;GACtB,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAc,SAAS,EAAK;GAEtC;EASD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,SAAS;GACP,MAAM;GACN,SAAS;GACT,YAAY,MACH,OAAO,KAAK,EAAwB,CAAC,MAAM,MAAS,MAAS,EAAQ;GAE/E;EAKD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAOD,cAAc;GACZ,MAAM;GACN,SAAS;GACT,YAAW,MAAgB,EAAuB,SAAS,EAAa;GACzE;EAKD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,iBAAiB;GACf,MAAM,UAAU;GAChB,SAAS;GACV;EAOD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,uBAAuB;GACrB,MAAM;GACN,SAAS;GACV;EAKD,IAAI;GACF,MAAM;GACN,UAAW;AAAE,WAAO,GAAiB;;GACtC;EAaD,QAAQ;GACN,MAAM;GACN,eAAe,CAAC,GAAG,EAAE;GACtB;EAMD,cAAc;GACZ,MAAM;GACN,SAAS;GACV;EAOD,OAAO;GACL,MAAM;G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reverse`,"column-reverse":`column-reverse`},t=[`sm`,`md`,`lg`,`xl`],n=[`0`,`1`,`25`,`50`,`75`,`100`,`125`,`150`,`175`,`200`,`250`,`300`,`350`,`400`,`450`,`500`,`525`,`550`,`600`,`650`,`700`,`750`,`800`],r=[`start`,`center`,`end`,`stretch`,`baseline`],i=[`start`,`center`,`end`,`space-around`,`space-between`,`space-evenly`,`around`,`between`,`evenly`],a={DT_STACK_DIRECTION:e,DT_STACK_RESPONSIVE_BREAKPOINTS:t,DT_STACK_GAP:n,DT_STACK_ALIGN:r,DT_STACK_JUSTIFY:i};exports.DT_STACK_ALIGN=r,exports.DT_STACK_DIRECTION=e,exports.DT_STACK_GAP=n,exports.DT_STACK_JUSTIFY=i,exports.DT_STACK_RESPONSIVE_BREAKPOINTS=t,exports.default=a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e={default:`column`,column:`column`,row:`row`,"row-reverse":`row-reverse`,"column-reverse":`column-reverse`},t=[`sm`,`md`,`lg`,`xl`],n=[`0`,`1`,`25`,`50`,`75`,`100`,`125`,`150`,`175`,`200`,`250`,`300`,`350`,`400`,`450`,`500`,`525`,`550`,`600`,`650`,`700`,`750`,`800`],r=[`start`,`center`,`end`,`stretch`,`baseline`],i=[...r,`auto`],a=[`start`,`center`,`end`,`space-around`,`space-between`,`space-evenly`,`around`,`between`,`evenly`],o={DT_STACK_DIRECTION:e,DT_STACK_RESPONSIVE_BREAKPOINTS:t,DT_STACK_GAP:n,DT_STACK_ALIGN:r,DT_STACK_ALIGN_SELF:i,DT_STACK_JUSTIFY:a};exports.DT_STACK_ALIGN=r,exports.DT_STACK_ALIGN_SELF=i,exports.DT_STACK_DIRECTION=e,exports.DT_STACK_GAP=n,exports.DT_STACK_JUSTIFY=a,exports.DT_STACK_RESPONSIVE_BREAKPOINTS=t,exports.default=o;
2
2
  //# sourceMappingURL=stack-constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-constants.cjs","names":[],"sources":["../../../components/Stack/StackConstants.js"],"sourcesContent":["/**\n * Direction values for the stack component.\n * Uses object format for historical compatibility - changing to array would be breaking.\n * The object keys are the valid values, and the values are the CSS class suffixes.\n * @type {Object<string, string>}\n */\nexport const DT_STACK_DIRECTION = {\n default: 'column',\n column: 'column',\n row: 'row',\n 'row-reverse': 'row-reverse',\n 'column-reverse': 'column-reverse',\n};\n\n/**\n * Responsive breakpoint names used for all responsive props.\n * @type {string[]}\n */\nexport const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];\n\n/**\n * Gap values for spacing between stack items.\n * Uses array format.\n * @type {string[]}\n */\nexport const DT_STACK_GAP = ['0', '1', '25', '50', '75', '100', '125', '150', '175', '200', '250', '300', '350', '400', '450', '500', '525', '550', '600', '650', '700', '750', '800'];\n\n/**\n * Align values for the stack component (cross-axis alignment).\n * Uses array format - simpler structure for newer props.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN = ['start', 'center', 'end', 'stretch', 'baseline'];\n\n/**\n * Justify values for the stack component (main-axis distribution).\n * Uses array format - simpler structure for newer props.\n * Primary values align with CSS justify-content values.\n * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'around', 'between', 'evenly'];\n\nexport default {\n DT_STACK_DIRECTION,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_GAP,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n};\n"],"mappings":"+FAMA,IAAa,EAAqB,CAChC,QAAS,SACT,OAAQ,SACR,IAAK,MACL,cAAe,cACf,iBAAkB,iBACnB,CAMY,EAAkC,CAAC,KAAM,KAAM,KAAM,KAAK,CAO1D,EAAe,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAM,CAOzK,EAAiB,CAAC,QAAS,SAAU,MAAO,UAAW,WAAW,CAQlE,EAAmB,CAAC,QAAS,SAAU,MAAO,eAAgB,gBAAiB,eAAgB,SAAU,UAAW,SAAS,CAE1I,EAAe,CACb,qBACA,kCACA,eACA,iBACA,mBACD"}
1
+ {"version":3,"file":"stack-constants.cjs","names":[],"sources":["../../../components/Stack/StackConstants.js"],"sourcesContent":["/**\n * Direction values for the stack component.\n * Uses object format for historical compatibility - changing to array would be breaking.\n * The object keys are the valid values, and the values are the CSS class suffixes.\n * @type {Object<string, string>}\n */\nexport const DT_STACK_DIRECTION = {\n default: 'column',\n column: 'column',\n row: 'row',\n 'row-reverse': 'row-reverse',\n 'column-reverse': 'column-reverse',\n};\n\n/**\n * Responsive breakpoint names used for all responsive props.\n * @type {string[]}\n */\nexport const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];\n\n/**\n * Gap values for spacing between stack items.\n * Uses array format.\n * @type {string[]}\n */\nexport const DT_STACK_GAP = ['0', '1', '25', '50', '75', '100', '125', '150', '175', '200', '250', '300', '350', '400', '450', '500', '525', '550', '600', '650', '700', '750', '800'];\n\n/**\n * Align values for the stack component (cross-axis alignment).\n * Uses array format - simpler structure for newer props.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN = ['start', 'center', 'end', 'stretch', 'baseline'];\n\n/**\n * Align-self values for the stack component (placement of the stack itself in a flex parent).\n * Same as the align values, plus `auto` to reset the parent's `align-items` at a breakpoint.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN_SELF = [...DT_STACK_ALIGN, 'auto'];\n\n/**\n * Justify values for the stack component (main-axis distribution).\n * Uses array format - simpler structure for newer props.\n * Primary values align with CSS justify-content values.\n * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'around', 'between', 'evenly'];\n\nexport default {\n DT_STACK_DIRECTION,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_GAP,\n DT_STACK_ALIGN,\n DT_STACK_ALIGN_SELF,\n DT_STACK_JUSTIFY,\n};\n"],"mappings":"+FAMA,IAAa,EAAqB,CAChC,QAAS,SACT,OAAQ,SACR,IAAK,MACL,cAAe,cACf,iBAAkB,iBACnB,CAMY,EAAkC,CAAC,KAAM,KAAM,KAAM,KAAK,CAO1D,EAAe,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAM,CAOzK,EAAiB,CAAC,QAAS,SAAU,MAAO,UAAW,WAAW,CAOlE,EAAsB,CAAC,GAAG,EAAgB,OAAO,CAQjD,EAAmB,CAAC,QAAS,SAAU,MAAO,eAAgB,gBAAiB,eAAgB,SAAU,UAAW,SAAS,CAE1I,EAAe,CACb,qBACA,kCACA,eACA,iBACA,sBACA,mBACD"}
@@ -40,7 +40,7 @@ var e = {
40
40
  "end",
41
41
  "stretch",
42
42
  "baseline"
43
- ], i = [
43
+ ], i = [...r, "auto"], a = [
44
44
  "start",
45
45
  "center",
46
46
  "end",
@@ -50,14 +50,15 @@ var e = {
50
50
  "around",
51
51
  "between",
52
52
  "evenly"
53
- ], a = {
53
+ ], o = {
54
54
  DT_STACK_DIRECTION: e,
55
55
  DT_STACK_RESPONSIVE_BREAKPOINTS: t,
56
56
  DT_STACK_GAP: n,
57
57
  DT_STACK_ALIGN: r,
58
- DT_STACK_JUSTIFY: i
58
+ DT_STACK_ALIGN_SELF: i,
59
+ DT_STACK_JUSTIFY: a
59
60
  };
60
61
  //#endregion
61
- export { r as DT_STACK_ALIGN, e as DT_STACK_DIRECTION, n as DT_STACK_GAP, i as DT_STACK_JUSTIFY, t as DT_STACK_RESPONSIVE_BREAKPOINTS, a as default };
62
+ export { r as DT_STACK_ALIGN, i as DT_STACK_ALIGN_SELF, e as DT_STACK_DIRECTION, n as DT_STACK_GAP, a as DT_STACK_JUSTIFY, t as DT_STACK_RESPONSIVE_BREAKPOINTS, o as default };
62
63
 
63
64
  //# sourceMappingURL=stack-constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-constants.js","names":[],"sources":["../../../components/Stack/StackConstants.js"],"sourcesContent":["/**\n * Direction values for the stack component.\n * Uses object format for historical compatibility - changing to array would be breaking.\n * The object keys are the valid values, and the values are the CSS class suffixes.\n * @type {Object<string, string>}\n */\nexport const DT_STACK_DIRECTION = {\n default: 'column',\n column: 'column',\n row: 'row',\n 'row-reverse': 'row-reverse',\n 'column-reverse': 'column-reverse',\n};\n\n/**\n * Responsive breakpoint names used for all responsive props.\n * @type {string[]}\n */\nexport const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];\n\n/**\n * Gap values for spacing between stack items.\n * Uses array format.\n * @type {string[]}\n */\nexport const DT_STACK_GAP = ['0', '1', '25', '50', '75', '100', '125', '150', '175', '200', '250', '300', '350', '400', '450', '500', '525', '550', '600', '650', '700', '750', '800'];\n\n/**\n * Align values for the stack component (cross-axis alignment).\n * Uses array format - simpler structure for newer props.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN = ['start', 'center', 'end', 'stretch', 'baseline'];\n\n/**\n * Justify values for the stack component (main-axis distribution).\n * Uses array format - simpler structure for newer props.\n * Primary values align with CSS justify-content values.\n * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'around', 'between', 'evenly'];\n\nexport default {\n DT_STACK_DIRECTION,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_GAP,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n};\n"],"mappings":";AAMA,IAAa,IAAqB;CAChC,SAAS;CACT,QAAQ;CACR,KAAK;CACL,eAAe;CACf,kBAAkB;CACnB,EAMY,IAAkC;CAAC;CAAM;CAAM;CAAM;CAAK,EAO1D,IAAe;CAAC;CAAK;CAAK;CAAM;CAAM;CAAM;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAM,EAOzK,IAAiB;CAAC;CAAS;CAAU;CAAO;CAAW;CAAW,EAQlE,IAAmB;CAAC;CAAS;CAAU;CAAO;CAAgB;CAAiB;CAAgB;CAAU;CAAW;CAAS,EAE1I,IAAe;CACb;CACA;CACA;CACA;CACA;CACD"}
1
+ {"version":3,"file":"stack-constants.js","names":[],"sources":["../../../components/Stack/StackConstants.js"],"sourcesContent":["/**\n * Direction values for the stack component.\n * Uses object format for historical compatibility - changing to array would be breaking.\n * The object keys are the valid values, and the values are the CSS class suffixes.\n * @type {Object<string, string>}\n */\nexport const DT_STACK_DIRECTION = {\n default: 'column',\n column: 'column',\n row: 'row',\n 'row-reverse': 'row-reverse',\n 'column-reverse': 'column-reverse',\n};\n\n/**\n * Responsive breakpoint names used for all responsive props.\n * @type {string[]}\n */\nexport const DT_STACK_RESPONSIVE_BREAKPOINTS = ['sm', 'md', 'lg', 'xl'];\n\n/**\n * Gap values for spacing between stack items.\n * Uses array format.\n * @type {string[]}\n */\nexport const DT_STACK_GAP = ['0', '1', '25', '50', '75', '100', '125', '150', '175', '200', '250', '300', '350', '400', '450', '500', '525', '550', '600', '650', '700', '750', '800'];\n\n/**\n * Align values for the stack component (cross-axis alignment).\n * Uses array format - simpler structure for newer props.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN = ['start', 'center', 'end', 'stretch', 'baseline'];\n\n/**\n * Align-self values for the stack component (placement of the stack itself in a flex parent).\n * Same as the align values, plus `auto` to reset the parent's `align-items` at a breakpoint.\n * @type {string[]}\n */\nexport const DT_STACK_ALIGN_SELF = [...DT_STACK_ALIGN, 'auto'];\n\n/**\n * Justify values for the stack component (main-axis distribution).\n * Uses array format - simpler structure for newer props.\n * Primary values align with CSS justify-content values.\n * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', 'space-around', 'space-between', 'space-evenly', 'around', 'between', 'evenly'];\n\nexport default {\n DT_STACK_DIRECTION,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_GAP,\n DT_STACK_ALIGN,\n DT_STACK_ALIGN_SELF,\n DT_STACK_JUSTIFY,\n};\n"],"mappings":";AAMA,IAAa,IAAqB;CAChC,SAAS;CACT,QAAQ;CACR,KAAK;CACL,eAAe;CACf,kBAAkB;CACnB,EAMY,IAAkC;CAAC;CAAM;CAAM;CAAM;CAAK,EAO1D,IAAe;CAAC;CAAK;CAAK;CAAM;CAAM;CAAM;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAO;CAAM,EAOzK,IAAiB;CAAC;CAAS;CAAU;CAAO;CAAW;CAAW,EAOlE,IAAsB,CAAC,GAAG,GAAgB,OAAO,EAQjD,IAAmB;CAAC;CAAS;CAAU;CAAO;CAAgB;CAAiB;CAAgB;CAAU;CAAW;CAAS,EAE1I,IAAe;CACb;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./stack-constants.cjs`),n=require(`./validators.cjs`),r=require(`./utils.cjs`);let i=require(`vue`);var a={name:`DtStack`,props:{direction:{type:[String,Object],default:`column`,validator:e=>n.directionValidator(e)},as:{type:String,default:`div`},wrap:{type:Boolean,default:!1},gap:{type:[String,Object],default:`0`,validator:e=>n.gapValidator(e)},align:{type:[String,Object],validator:e=>n.alignValidator(e)},justify:{type:[String,Object],default:`start`,validator:e=>n.justifyValidator(e)}},data(){return{DT_STACK_DIRECTION:t.DT_STACK_DIRECTION,DT_STACK_GAP:t.DT_STACK_GAP,DT_STACK_RESPONSIVE_BREAKPOINTS:t.DT_STACK_RESPONSIVE_BREAKPOINTS,DT_STACK_ALIGN:t.DT_STACK_ALIGN,DT_STACK_JUSTIFY:t.DT_STACK_JUSTIFY}},computed:{defaultGap(){return r.getDefaultGapClass(this.gap)},defaultDirection(){return r.getDefaultDirectionClass(this.direction)},defaultAlign(){return r.getDefaultAlignClass(this.align)},defaultJustify(){return r.getDefaultJustifyClass(this.justify)},stackResponsive(){return r.getResponsiveClasses(this.direction,this.gap,this.align,this.justify)}}};function o(e,t,n,r,a,o){return(0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(n.as),{"data-qa":`dt-stack`,class:(0,i.normalizeClass)([`d-stack`,{"d-stack--wrap":n.wrap},o.defaultDirection,o.defaultGap,o.defaultAlign,o.defaultJustify,o.stackResponsive])},{default:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`)]),_:3},8,[`class`])}var s=e.t(a,[[`render`,o]]);exports.default=s;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./stack-constants.cjs`),n=require(`./validators.cjs`),r=require(`./utils.cjs`);let i=require(`vue`);var a={name:`DtStack`,props:{direction:{type:[String,Object],default:`column`,validator:e=>n.directionValidator(e)},as:{type:String,default:`div`},wrap:{type:Boolean,default:!1},gap:{type:[String,Object],default:`0`,validator:e=>n.gapValidator(e)},align:{type:[String,Object],validator:e=>n.alignValidator(e)},alignSelf:{type:[String,Object],validator:e=>n.alignSelfValidator(e)},justify:{type:[String,Object],default:`start`,validator:e=>n.justifyValidator(e)}},data(){return{DT_STACK_DIRECTION:t.DT_STACK_DIRECTION,DT_STACK_GAP:t.DT_STACK_GAP,DT_STACK_RESPONSIVE_BREAKPOINTS:t.DT_STACK_RESPONSIVE_BREAKPOINTS,DT_STACK_ALIGN:t.DT_STACK_ALIGN,DT_STACK_JUSTIFY:t.DT_STACK_JUSTIFY}},computed:{defaultGap(){return r.getDefaultGapClass(this.gap)},defaultDirection(){return r.getDefaultDirectionClass(this.direction)},defaultAlign(){return r.getDefaultAlignClass(this.align)},defaultJustify(){return r.getDefaultJustifyClass(this.justify)},defaultAlignSelf(){return r.getDefaultAlignSelfClass(this.alignSelf)},stackResponsive(){return r.getResponsiveClasses(this.direction,this.gap,this.align,this.justify,this.alignSelf)}}};function o(e,t,n,r,a,o){return(0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(n.as),{"data-qa":`dt-stack`,class:(0,i.normalizeClass)([`d-stack`,{"d-stack--wrap":n.wrap},o.defaultDirection,o.defaultGap,o.defaultAlign,o.defaultJustify,o.defaultAlignSelf,o.stackResponsive])},{default:(0,i.withCtx)(()=>[(0,i.renderSlot)(e.$slots,`default`)]),_:3},8,[`class`])}var s=e.t(a,[[`render`,o]]);exports.default=s;
2
2
  //# sourceMappingURL=stack.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.cjs","names":[],"sources":["../../../components/Stack/Stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\n { 'd-stack--wrap': wrap },\n defaultDirection,\n defaultGap,\n defaultAlign,\n defaultJustify,\n stackResponsive,\n ]\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_JUSTIFY } from './StackConstants';\nimport { directionValidator, gapValidator, alignValidator, justifyValidator } from './Validators';\nimport { getDefaultDirectionClass, getResponsiveClasses, getDefaultGapClass, getDefaultAlignClass, getDefaultJustifyClass } from './Utils';\n\nexport default {\n name: 'DtStack',\n\n props: {\n /**\n * Set this prop to the direction to stack the items.\n * You can override the default direction with 'default' key.\n * All the undefined breakpoints will have 'default' value.\n * By default, for the column direction it will have `justify-content: flex-start`\n * and for the row direction `align-items: center`. This can be overridden\n * using the `align` and `justify` props.\n *\n * @values column, row, row-reverse, column-reverse\n */\n direction: {\n type: [String, Object],\n default: 'column',\n validator: (direction) => directionValidator(direction),\n },\n\n /**\n * Set this prop to render stack as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Allow items to wrap onto additional lines when they exceed the available space.\n */\n wrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The gap property controls the spacing between items in the stack.\n * The gap can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default gap with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 450, 500, 525, 550, 600, 650, 700, 750, 800\n */\n gap: {\n type: [String, Object],\n default: '0',\n validator: (gap) => gapValidator(gap),\n },\n\n /**\n * The align property controls the alignment of items along the cross axis.\n * The align can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default align with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, alignment uses CSS defaults: stretch for column direction,\n * center for row/row-reverse directions (set by CSS).\n * @values start, center, end, stretch, baseline\n */\n align: {\n type: [String, Object],\n validator: (align) => alignValidator(align),\n },\n\n /**\n * The justify property controls the justification of items along the main axis.\n * The justify can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default justify with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * The around, between, and evenly values are deprecated and will ideally be removed in the next major version.\n * Please use space-around, space-between, and space-evenly instead.\n * @values start, center, end, space-around, space-between, space-evenly, around, between, evenly\n */\n justify: {\n type: [String, Object],\n default: 'start',\n validator: (justify) => justifyValidator(justify),\n },\n },\n\n data () {\n return {\n DT_STACK_DIRECTION,\n DT_STACK_GAP,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n };\n },\n\n computed: {\n defaultGap () {\n return getDefaultGapClass(this.gap);\n },\n\n defaultDirection () {\n return getDefaultDirectionClass(this.direction);\n },\n\n defaultAlign () {\n return getDefaultAlignClass(this.align);\n },\n\n defaultJustify () {\n return getDefaultJustifyClass(this.justify);\n },\n\n stackResponsive () {\n return getResponsiveClasses(this.direction, this.gap, this.align, this.justify);\n },\n },\n};\n</script>\n"],"mappings":"kTAwBA,IAAK,EAAU,CACb,KAAM,UAEN,MAAO,CAWL,UAAW,CACT,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,SACT,UAAY,GAAc,EAAA,mBAAmB,EAAU,CACxD,CAKD,GAAI,CACF,KAAM,OACN,QAAS,MACV,CAKD,KAAM,CACJ,KAAM,QACN,QAAS,GACV,CAUD,IAAK,CACH,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,IACT,UAAY,GAAQ,EAAA,aAAa,EAAI,CACtC,CAYD,MAAO,CACL,KAAM,CAAC,OAAQ,OAAO,CACtB,UAAY,GAAU,EAAA,eAAe,EAAM,CAC5C,CAYD,QAAS,CACP,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,QACT,UAAY,GAAY,EAAA,iBAAiB,EAAQ,CAClD,CACF,CAED,MAAQ,CACN,MAAO,CACL,mBAAA,EAAA,mBACA,aAAA,EAAA,aACA,gCAAA,EAAA,gCACA,eAAA,EAAA,eACA,iBAAA,EAAA,iBACD,EAGH,SAAU,CACR,YAAc,CACZ,OAAO,EAAA,mBAAmB,KAAK,IAAI,EAGrC,kBAAoB,CAClB,OAAO,EAAA,yBAAyB,KAAK,UAAU,EAGjD,cAAgB,CACd,OAAO,EAAA,qBAAqB,KAAK,MAAM,EAGzC,gBAAkB,CAChB,OAAO,EAAA,uBAAuB,KAAK,QAAQ,EAG7C,iBAAmB,CACjB,OAAO,EAAA,qBAAqB,KAAK,UAAW,KAAK,IAAK,KAAK,MAAO,KAAK,QAAQ,EAElF,CACF,iGAvIQ,EAAA,GAAE,CAAA,CACP,UAAQ,WACP,OAAA,EAAA,EAAA,gBAAK,4BAA8C,EAAA,KAAI,CAAU,EAAA,iBAAwB,EAAA,WAAkB,EAAA,aAAoB,EAAA,eAAsB,EAAA,8CAW9I,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"stack.cjs","names":[],"sources":["../../../components/Stack/Stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\n { 'd-stack--wrap': wrap },\n defaultDirection,\n defaultGap,\n defaultAlign,\n defaultJustify,\n defaultAlignSelf,\n stackResponsive,\n ]\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_JUSTIFY } from './StackConstants';\nimport { directionValidator, gapValidator, alignValidator, alignSelfValidator, justifyValidator } from './Validators';\nimport { getDefaultDirectionClass, getResponsiveClasses, getDefaultGapClass, getDefaultAlignClass, getDefaultAlignSelfClass, getDefaultJustifyClass } from './Utils';\n\nexport default {\n name: 'DtStack',\n\n props: {\n /**\n * Set this prop to the direction to stack the items.\n * You can override the default direction with 'default' key.\n * All the undefined breakpoints will have 'default' value.\n * By default, for the column direction it will have `justify-content: flex-start`\n * and for the row direction `align-items: center`. This can be overridden\n * using the `align` and `justify` props.\n *\n * @values column, row, row-reverse, column-reverse\n */\n direction: {\n type: [String, Object],\n default: 'column',\n validator: (direction) => directionValidator(direction),\n },\n\n /**\n * Set this prop to render stack as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Allow items to wrap onto additional lines when they exceed the available space.\n */\n wrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The gap property controls the spacing between items in the stack.\n * The gap can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default gap with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 450, 500, 525, 550, 600, 650, 700, 750, 800\n */\n gap: {\n type: [String, Object],\n default: '0',\n validator: (gap) => gapValidator(gap),\n },\n\n /**\n * The align property controls the alignment of items along the cross axis.\n * The align can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default align with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, alignment uses CSS defaults: stretch for column direction,\n * center for row/row-reverse directions (set by CSS).\n * @values start, center, end, stretch, baseline\n */\n align: {\n type: [String, Object],\n validator: (align) => alignValidator(align),\n },\n\n /**\n * The alignSelf property places the stack itself along the cross axis of its flex parent\n * (`align-self`). It does not change how the stack aligns its own children; use `align` for that.\n * The alignSelf can be set to a string, or object with breakpoints.\n * You can set the base value with 'default' key.\n * Each breakpoint value stays active until a later breakpoint value overrides it,\n * so an undefined breakpoint keeps the previous value instead of resetting to 'default'.\n * Use `auto` to reset.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, the parent's `align-items` applies.\n * @values start, center, end, stretch, baseline, auto\n */\n alignSelf: {\n type: [String, Object],\n validator: (alignSelf) => alignSelfValidator(alignSelf),\n },\n\n /**\n * The justify property controls the justification of items along the main axis.\n * The justify can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default justify with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * The around, between, and evenly values are deprecated and will ideally be removed in the next major version.\n * Please use space-around, space-between, and space-evenly instead.\n * @values start, center, end, space-around, space-between, space-evenly, around, between, evenly\n */\n justify: {\n type: [String, Object],\n default: 'start',\n validator: (justify) => justifyValidator(justify),\n },\n },\n\n data () {\n return {\n DT_STACK_DIRECTION,\n DT_STACK_GAP,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n };\n },\n\n computed: {\n defaultGap () {\n return getDefaultGapClass(this.gap);\n },\n\n defaultDirection () {\n return getDefaultDirectionClass(this.direction);\n },\n\n defaultAlign () {\n return getDefaultAlignClass(this.align);\n },\n\n defaultJustify () {\n return getDefaultJustifyClass(this.justify);\n },\n\n defaultAlignSelf () {\n return getDefaultAlignSelfClass(this.alignSelf);\n },\n\n stackResponsive () {\n return getResponsiveClasses(this.direction, this.gap, this.align, this.justify, this.alignSelf);\n },\n },\n};\n</script>\n"],"mappings":"kTAyBA,IAAK,EAAU,CACb,KAAM,UAEN,MAAO,CAWL,UAAW,CACT,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,SACT,UAAY,GAAc,EAAA,mBAAmB,EAAU,CACxD,CAKD,GAAI,CACF,KAAM,OACN,QAAS,MACV,CAKD,KAAM,CACJ,KAAM,QACN,QAAS,GACV,CAUD,IAAK,CACH,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,IACT,UAAY,GAAQ,EAAA,aAAa,EAAI,CACtC,CAYD,MAAO,CACL,KAAM,CAAC,OAAQ,OAAO,CACtB,UAAY,GAAU,EAAA,eAAe,EAAM,CAC5C,CAcD,UAAW,CACT,KAAM,CAAC,OAAQ,OAAO,CACtB,UAAY,GAAc,EAAA,mBAAmB,EAAU,CACxD,CAYD,QAAS,CACP,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,QACT,UAAY,GAAY,EAAA,iBAAiB,EAAQ,CAClD,CACF,CAED,MAAQ,CACN,MAAO,CACL,mBAAA,EAAA,mBACA,aAAA,EAAA,aACA,gCAAA,EAAA,gCACA,eAAA,EAAA,eACA,iBAAA,EAAA,iBACD,EAGH,SAAU,CACR,YAAc,CACZ,OAAO,EAAA,mBAAmB,KAAK,IAAI,EAGrC,kBAAoB,CAClB,OAAO,EAAA,yBAAyB,KAAK,UAAU,EAGjD,cAAgB,CACd,OAAO,EAAA,qBAAqB,KAAK,MAAM,EAGzC,gBAAkB,CAChB,OAAO,EAAA,uBAAuB,KAAK,QAAQ,EAG7C,kBAAoB,CAClB,OAAO,EAAA,yBAAyB,KAAK,UAAU,EAGjD,iBAAmB,CACjB,OAAO,EAAA,qBAAqB,KAAK,UAAW,KAAK,IAAK,KAAK,MAAO,KAAK,QAAS,KAAK,UAAU,EAElG,CACF,iGA7JQ,EAAA,GAAE,CAAA,CACP,UAAQ,WACP,OAAA,EAAA,EAAA,gBAAK,4BAA8C,EAAA,KAAI,CAAU,EAAA,iBAAwB,EAAA,WAAkB,EAAA,aAAoB,EAAA,eAAsB,EAAA,iBAAwB,EAAA,8CAYtK,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
@@ -1,16 +1,16 @@
1
1
  import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
2
2
  import { DT_STACK_ALIGN as t, DT_STACK_DIRECTION as n, DT_STACK_GAP as r, DT_STACK_JUSTIFY as i, DT_STACK_RESPONSIVE_BREAKPOINTS as a } from "./stack-constants.js";
3
- import { alignValidator as o, directionValidator as s, gapValidator as c, justifyValidator as l } from "./validators.js";
4
- import { getDefaultAlignClass as u, getDefaultDirectionClass as d, getDefaultGapClass as f, getDefaultJustifyClass as p, getResponsiveClasses as m } from "./utils.js";
5
- import { createBlock as h, normalizeClass as g, openBlock as _, renderSlot as v, resolveDynamicComponent as y, withCtx as b } from "vue";
3
+ import { alignSelfValidator as o, alignValidator as s, directionValidator as c, gapValidator as l, justifyValidator as u } from "./validators.js";
4
+ import { getDefaultAlignClass as d, getDefaultAlignSelfClass as f, getDefaultDirectionClass as p, getDefaultGapClass as m, getDefaultJustifyClass as h, getResponsiveClasses as g } from "./utils.js";
5
+ import { createBlock as _, normalizeClass as v, openBlock as y, renderSlot as b, resolveDynamicComponent as x, withCtx as S } from "vue";
6
6
  //#region components/Stack/Stack.vue
7
- var x = {
7
+ var C = {
8
8
  name: "DtStack",
9
9
  props: {
10
10
  direction: {
11
11
  type: [String, Object],
12
12
  default: "column",
13
- validator: (e) => s(e)
13
+ validator: (e) => c(e)
14
14
  },
15
15
  as: {
16
16
  type: String,
@@ -23,16 +23,20 @@ var x = {
23
23
  gap: {
24
24
  type: [String, Object],
25
25
  default: "0",
26
- validator: (e) => c(e)
26
+ validator: (e) => l(e)
27
27
  },
28
28
  align: {
29
+ type: [String, Object],
30
+ validator: (e) => s(e)
31
+ },
32
+ alignSelf: {
29
33
  type: [String, Object],
30
34
  validator: (e) => o(e)
31
35
  },
32
36
  justify: {
33
37
  type: [String, Object],
34
38
  default: "start",
35
- validator: (e) => l(e)
39
+ validator: (e) => u(e)
36
40
  }
37
41
  },
38
42
  data() {
@@ -46,41 +50,45 @@ var x = {
46
50
  },
47
51
  computed: {
48
52
  defaultGap() {
49
- return f(this.gap);
53
+ return m(this.gap);
50
54
  },
51
55
  defaultDirection() {
52
- return d(this.direction);
56
+ return p(this.direction);
53
57
  },
54
58
  defaultAlign() {
55
- return u(this.align);
59
+ return d(this.align);
56
60
  },
57
61
  defaultJustify() {
58
- return p(this.justify);
62
+ return h(this.justify);
63
+ },
64
+ defaultAlignSelf() {
65
+ return f(this.alignSelf);
59
66
  },
60
67
  stackResponsive() {
61
- return m(this.direction, this.gap, this.align, this.justify);
68
+ return g(this.direction, this.gap, this.align, this.justify, this.alignSelf);
62
69
  }
63
70
  }
64
71
  };
65
- function S(e, t, n, r, i, a) {
66
- return _(), h(y(n.as), {
72
+ function w(e, t, n, r, i, a) {
73
+ return y(), _(x(n.as), {
67
74
  "data-qa": "dt-stack",
68
- class: g([
75
+ class: v([
69
76
  "d-stack",
70
77
  { "d-stack--wrap": n.wrap },
71
78
  a.defaultDirection,
72
79
  a.defaultGap,
73
80
  a.defaultAlign,
74
81
  a.defaultJustify,
82
+ a.defaultAlignSelf,
75
83
  a.stackResponsive
76
84
  ])
77
85
  }, {
78
- default: b(() => [v(e.$slots, "default")]),
86
+ default: S(() => [b(e.$slots, "default")]),
79
87
  _: 3
80
88
  }, 8, ["class"]);
81
89
  }
82
- var C = /* @__PURE__ */ e(x, [["render", S]]);
90
+ var T = /* @__PURE__ */ e(C, [["render", w]]);
83
91
  //#endregion
84
- export { C as default };
92
+ export { T as default };
85
93
 
86
94
  //# sourceMappingURL=stack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.js","names":[],"sources":["../../../components/Stack/Stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\n { 'd-stack--wrap': wrap },\n defaultDirection,\n defaultGap,\n defaultAlign,\n defaultJustify,\n stackResponsive,\n ]\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_JUSTIFY } from './StackConstants';\nimport { directionValidator, gapValidator, alignValidator, justifyValidator } from './Validators';\nimport { getDefaultDirectionClass, getResponsiveClasses, getDefaultGapClass, getDefaultAlignClass, getDefaultJustifyClass } from './Utils';\n\nexport default {\n name: 'DtStack',\n\n props: {\n /**\n * Set this prop to the direction to stack the items.\n * You can override the default direction with 'default' key.\n * All the undefined breakpoints will have 'default' value.\n * By default, for the column direction it will have `justify-content: flex-start`\n * and for the row direction `align-items: center`. This can be overridden\n * using the `align` and `justify` props.\n *\n * @values column, row, row-reverse, column-reverse\n */\n direction: {\n type: [String, Object],\n default: 'column',\n validator: (direction) => directionValidator(direction),\n },\n\n /**\n * Set this prop to render stack as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Allow items to wrap onto additional lines when they exceed the available space.\n */\n wrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The gap property controls the spacing between items in the stack.\n * The gap can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default gap with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 450, 500, 525, 550, 600, 650, 700, 750, 800\n */\n gap: {\n type: [String, Object],\n default: '0',\n validator: (gap) => gapValidator(gap),\n },\n\n /**\n * The align property controls the alignment of items along the cross axis.\n * The align can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default align with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, alignment uses CSS defaults: stretch for column direction,\n * center for row/row-reverse directions (set by CSS).\n * @values start, center, end, stretch, baseline\n */\n align: {\n type: [String, Object],\n validator: (align) => alignValidator(align),\n },\n\n /**\n * The justify property controls the justification of items along the main axis.\n * The justify can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default justify with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * The around, between, and evenly values are deprecated and will ideally be removed in the next major version.\n * Please use space-around, space-between, and space-evenly instead.\n * @values start, center, end, space-around, space-between, space-evenly, around, between, evenly\n */\n justify: {\n type: [String, Object],\n default: 'start',\n validator: (justify) => justifyValidator(justify),\n },\n },\n\n data () {\n return {\n DT_STACK_DIRECTION,\n DT_STACK_GAP,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n };\n },\n\n computed: {\n defaultGap () {\n return getDefaultGapClass(this.gap);\n },\n\n defaultDirection () {\n return getDefaultDirectionClass(this.direction);\n },\n\n defaultAlign () {\n return getDefaultAlignClass(this.align);\n },\n\n defaultJustify () {\n return getDefaultJustifyClass(this.justify);\n },\n\n stackResponsive () {\n return getResponsiveClasses(this.direction, this.gap, this.align, this.justify);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;AAwBA,IAAK,IAAU;CACb,MAAM;CAEN,OAAO;EAWL,WAAW;GACT,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAc,EAAmB,EAAU;GACxD;EAKD,IAAI;GACF,MAAM;GACN,SAAS;GACV;EAKD,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAUD,KAAK;GACH,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAQ,EAAa,EAAI;GACtC;EAYD,OAAO;GACL,MAAM,CAAC,QAAQ,OAAO;GACtB,YAAY,MAAU,EAAe,EAAM;GAC5C;EAYD,SAAS;GACP,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAY,EAAiB,EAAQ;GAClD;EACF;CAED,OAAQ;AACN,SAAO;GACL;GACA;GACA;GACA;GACA;GACD;;CAGH,UAAU;EACR,aAAc;AACZ,UAAO,EAAmB,KAAK,IAAI;;EAGrC,mBAAoB;AAClB,UAAO,EAAyB,KAAK,UAAU;;EAGjD,eAAgB;AACd,UAAO,EAAqB,KAAK,MAAM;;EAGzC,iBAAkB;AAChB,UAAO,EAAuB,KAAK,QAAQ;;EAG7C,kBAAmB;AACjB,UAAO,EAAqB,KAAK,WAAW,KAAK,KAAK,KAAK,OAAO,KAAK,QAAQ;;EAElF;CACF;;aAxIC,EAeY,EAdL,EAAA,GAAE,EAAA;EACP,WAAQ;EACP,OAAK,EAAA;;sBAA8C,EAAA,MAAI;GAAU,EAAA;GAAwB,EAAA;GAAkB,EAAA;GAAoB,EAAA;GAAsB,EAAA;;;mBAW9I,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"stack.js","names":[],"sources":["../../../components/Stack/Stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\n { 'd-stack--wrap': wrap },\n defaultDirection,\n defaultGap,\n defaultAlign,\n defaultJustify,\n defaultAlignSelf,\n stackResponsive,\n ]\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </component>\n</template>\n\n<script>\nimport { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_JUSTIFY } from './StackConstants';\nimport { directionValidator, gapValidator, alignValidator, alignSelfValidator, justifyValidator } from './Validators';\nimport { getDefaultDirectionClass, getResponsiveClasses, getDefaultGapClass, getDefaultAlignClass, getDefaultAlignSelfClass, getDefaultJustifyClass } from './Utils';\n\nexport default {\n name: 'DtStack',\n\n props: {\n /**\n * Set this prop to the direction to stack the items.\n * You can override the default direction with 'default' key.\n * All the undefined breakpoints will have 'default' value.\n * By default, for the column direction it will have `justify-content: flex-start`\n * and for the row direction `align-items: center`. This can be overridden\n * using the `align` and `justify` props.\n *\n * @values column, row, row-reverse, column-reverse\n */\n direction: {\n type: [String, Object],\n default: 'column',\n validator: (direction) => directionValidator(direction),\n },\n\n /**\n * Set this prop to render stack as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Allow items to wrap onto additional lines when they exceed the available space.\n */\n wrap: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The gap property controls the spacing between items in the stack.\n * The gap can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default gap with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400, 450, 500, 525, 550, 600, 650, 700, 750, 800\n */\n gap: {\n type: [String, Object],\n default: '0',\n validator: (gap) => gapValidator(gap),\n },\n\n /**\n * The align property controls the alignment of items along the cross axis.\n * The align can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default align with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, alignment uses CSS defaults: stretch for column direction,\n * center for row/row-reverse directions (set by CSS).\n * @values start, center, end, stretch, baseline\n */\n align: {\n type: [String, Object],\n validator: (align) => alignValidator(align),\n },\n\n /**\n * The alignSelf property places the stack itself along the cross axis of its flex parent\n * (`align-self`). It does not change how the stack aligns its own children; use `align` for that.\n * The alignSelf can be set to a string, or object with breakpoints.\n * You can set the base value with 'default' key.\n * Each breakpoint value stays active until a later breakpoint value overrides it,\n * so an undefined breakpoint keeps the previous value instead of resetting to 'default'.\n * Use `auto` to reset.\n * In case of string, it will be applied to all the breakpoints.\n * If not specified, the parent's `align-items` applies.\n * @values start, center, end, stretch, baseline, auto\n */\n alignSelf: {\n type: [String, Object],\n validator: (alignSelf) => alignSelfValidator(alignSelf),\n },\n\n /**\n * The justify property controls the justification of items along the main axis.\n * The justify can be set to a string, or object with breakpoints.\n * All the undefined breakpoints will have the 'default' value.\n * You can override the default justify with 'default' key.\n * In case of string, it will be applied to all the breakpoints.\n * The around, between, and evenly values are deprecated and will ideally be removed in the next major version.\n * Please use space-around, space-between, and space-evenly instead.\n * @values start, center, end, space-around, space-between, space-evenly, around, between, evenly\n */\n justify: {\n type: [String, Object],\n default: 'start',\n validator: (justify) => justifyValidator(justify),\n },\n },\n\n data () {\n return {\n DT_STACK_DIRECTION,\n DT_STACK_GAP,\n DT_STACK_RESPONSIVE_BREAKPOINTS,\n DT_STACK_ALIGN,\n DT_STACK_JUSTIFY,\n };\n },\n\n computed: {\n defaultGap () {\n return getDefaultGapClass(this.gap);\n },\n\n defaultDirection () {\n return getDefaultDirectionClass(this.direction);\n },\n\n defaultAlign () {\n return getDefaultAlignClass(this.align);\n },\n\n defaultJustify () {\n return getDefaultJustifyClass(this.justify);\n },\n\n defaultAlignSelf () {\n return getDefaultAlignSelfClass(this.alignSelf);\n },\n\n stackResponsive () {\n return getResponsiveClasses(this.direction, this.gap, this.align, this.justify, this.alignSelf);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;AAyBA,IAAK,IAAU;CACb,MAAM;CAEN,OAAO;EAWL,WAAW;GACT,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAc,EAAmB,EAAU;GACxD;EAKD,IAAI;GACF,MAAM;GACN,SAAS;GACV;EAKD,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAUD,KAAK;GACH,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAQ,EAAa,EAAI;GACtC;EAYD,OAAO;GACL,MAAM,CAAC,QAAQ,OAAO;GACtB,YAAY,MAAU,EAAe,EAAM;GAC5C;EAcD,WAAW;GACT,MAAM,CAAC,QAAQ,OAAO;GACtB,YAAY,MAAc,EAAmB,EAAU;GACxD;EAYD,SAAS;GACP,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAY,EAAiB,EAAQ;GAClD;EACF;CAED,OAAQ;AACN,SAAO;GACL;GACA;GACA;GACA;GACA;GACD;;CAGH,UAAU;EACR,aAAc;AACZ,UAAO,EAAmB,KAAK,IAAI;;EAGrC,mBAAoB;AAClB,UAAO,EAAyB,KAAK,UAAU;;EAGjD,eAAgB;AACd,UAAO,EAAqB,KAAK,MAAM;;EAGzC,iBAAkB;AAChB,UAAO,EAAuB,KAAK,QAAQ;;EAG7C,mBAAoB;AAClB,UAAO,EAAyB,KAAK,UAAU;;EAGjD,kBAAmB;AACjB,UAAO,EAAqB,KAAK,WAAW,KAAK,KAAK,KAAK,OAAO,KAAK,SAAS,KAAK,UAAU;;EAElG;CACF;;aA9JC,EAgBY,EAfL,EAAA,GAAE,EAAA;EACP,WAAQ;EACP,OAAK,EAAA;;sBAA8C,EAAA,MAAI;GAAU,EAAA;GAAwB,EAAA;GAAkB,EAAA;GAAoB,EAAA;GAAsB,EAAA;GAAwB,EAAA;;;mBAYtK,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./stack-constants.cjs`);function t(t){return t===e.DT_STACK_DIRECTION.default}function n(e){return typeof e==`string`?e:typeof e==`object`&&e?e.default:null}function r(n){if(typeof n==`string`)return t(n)?null:e.DT_STACK_DIRECTION[n];if(typeof n==`object`){let{default:r}=n;return t(r)?null:e.DT_STACK_DIRECTION[r]}else return null}function i(t,n,r,i=`d-stack`){return typeof t!=`object`||!t?[]:e.DT_STACK_RESPONSIVE_BREAKPOINTS.map(e=>{let a=t[e];if(!a)return null;let o=Array.isArray(r)?r.includes(a):a in r,s=n===``?`${i}--${e}-${a}`:`${i}--${e}-${n}-${a}`;return o?s:null})}function a(t){return r(t)?`d-stack--${e.DT_STACK_DIRECTION[r(t)]}`:null}function o(t){return i(t,``,e.DT_STACK_DIRECTION)}function s(t){return i(t,`gap`,e.DT_STACK_GAP)}function c(t){return i(t,`align`,e.DT_STACK_ALIGN)}function l(t){return typeof t!=`object`||!t?[]:e.DT_STACK_RESPONSIVE_BREAKPOINTS.map(n=>{let r=t[n];if(!r)return null;let i=e.DT_STACK_JUSTIFY.includes(r),a=p(r);return i?`d-stack--${n}-justify-${a}`:null})}function u(e,t,n,r){return[...o(e),...s(t),...c(n),...l(r)]}function d(t){let r=n(t);return e.DT_STACK_GAP.includes(r)?`d-stack--gap-${r}`:null}function f(t){let r=n(t);return e.DT_STACK_ALIGN.includes(r)?`d-stack--align-${r}`:null}function p(e){return{"space-around":`around`,"space-between":`between`,"space-evenly":`evenly`}[e]||e}function m(t){let r=n(t),i=p(r);return e.DT_STACK_JUSTIFY.includes(r)?`d-stack--justify-${i}`:null}exports.getDefaultAlignClass=f,exports.getDefaultDirectionClass=a,exports.getDefaultGapClass=d,exports.getDefaultJustifyClass=m,exports.getResponsiveClasses=u;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./stack-constants.cjs`);function t(t){return t===e.DT_STACK_DIRECTION.default}function n(e){return typeof e==`string`?e:typeof e==`object`&&e?e.default:null}function r(n){if(typeof n==`string`)return t(n)?null:e.DT_STACK_DIRECTION[n];if(typeof n==`object`){let{default:r}=n;return t(r)?null:e.DT_STACK_DIRECTION[r]}else return null}function i(t,n,r,i=`d-stack`){return typeof t!=`object`||!t?[]:e.DT_STACK_RESPONSIVE_BREAKPOINTS.map(e=>{let a=t[e];if(!a)return null;let o=Array.isArray(r)?r.includes(a):a in r,s=n===``?`${i}--${e}-${a}`:`${i}--${e}-${n}-${a}`;return o?s:null})}function a(t){return r(t)?`d-stack--${e.DT_STACK_DIRECTION[r(t)]}`:null}function o(t){return i(t,``,e.DT_STACK_DIRECTION)}function s(t){return i(t,`gap`,e.DT_STACK_GAP)}function c(t){return i(t,`align`,e.DT_STACK_ALIGN)}function l(t){return i(t,`align-self`,e.DT_STACK_ALIGN_SELF)}function u(t){return typeof t!=`object`||!t?[]:e.DT_STACK_RESPONSIVE_BREAKPOINTS.map(n=>{let r=t[n];if(!r)return null;let i=e.DT_STACK_JUSTIFY.includes(r),a=h(r);return i?`d-stack--${n}-justify-${a}`:null})}function d(e,t,n,r,i){return[...o(e),...s(t),...c(n),...u(r),...l(i)]}function f(t){let r=n(t);return e.DT_STACK_GAP.includes(r)?`d-stack--gap-${r}`:null}function p(t){let r=n(t);return e.DT_STACK_ALIGN.includes(r)?`d-stack--align-${r}`:null}function m(t){let r=n(t);return e.DT_STACK_ALIGN_SELF.includes(r)?`d-stack--align-self-${r}`:null}function h(e){return{"space-around":`around`,"space-between":`between`,"space-evenly":`evenly`}[e]||e}function g(t){let r=n(t),i=h(r);return e.DT_STACK_JUSTIFY.includes(r)?`d-stack--justify-${i}`:null}exports.getDefaultAlignClass=p,exports.getDefaultAlignSelfClass=m,exports.getDefaultDirectionClass=a,exports.getDefaultGapClass=f,exports.getDefaultJustifyClass=g,exports.getResponsiveClasses=d;
2
2
  //# sourceMappingURL=utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_JUSTIFY"],"sources":["../../../components/Stack/Utils.js"],"sourcesContent":["import { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_JUSTIFY } from '@/components/Stack/StackConstants';\n\nfunction _isDefaultDirection (direction) {\n return direction === DT_STACK_DIRECTION.default;\n}\n\n/**\n * Generic helper to extract default value from string or object props\n * @param {string|Object} value - The prop value\n * @returns {string|null} The default value or null\n */\nfunction _getDefaultValue (value) {\n if (typeof value === 'string') return value;\n if (typeof value === 'object' && value !== null) return value.default;\n return null;\n}\n\nfunction _getValidDirection (direction) {\n if (typeof direction === 'string') {\n return !_isDefaultDirection(direction) ? DT_STACK_DIRECTION[direction] : null;\n } else if (typeof direction === 'object') {\n const { default: defaultStyle } = direction;\n\n return !_isDefaultDirection(defaultStyle) ? DT_STACK_DIRECTION[defaultStyle] : null;\n } else { return null; }\n}\n\n/**\n * Generic helper to generate responsive classes for any prop\n * @param {Object} propValue - The prop value object with breakpoint keys\n * @param {string} propName - The name of the prop (e.g., 'gap', 'align')\n * @param {Array|Object} validValues - Valid values (array or object for direction)\n * @param {string} classPrefix - CSS class prefix (default: 'd-stack')\n * @returns {Array} Array of CSS class names\n */\nfunction _getResponsiveClasses (propValue, propName, validValues, classPrefix = 'd-stack') {\n if (typeof propValue !== 'object' || propValue === null) return [];\n\n return DT_STACK_RESPONSIVE_BREAKPOINTS.map((breakpoint) => {\n const value = propValue[breakpoint];\n if (!value) return null;\n\n // Handle both array (gap, align, justify) and object (direction) validValues\n const isValid = Array.isArray(validValues)\n ? validValues.includes(value)\n : value in validValues;\n\n // For direction, we don't need the prop name in the class\n const className = propName === ''\n ? `${classPrefix}--${breakpoint}-${value}`\n : `${classPrefix}--${breakpoint}-${propName}-${value}`;\n\n return isValid ? className : null;\n });\n}\n\nexport function getDefaultDirectionClass (direction) {\n return _getValidDirection(direction)\n ? `d-stack--${DT_STACK_DIRECTION[_getValidDirection(direction)]}`\n : null;\n}\n\nfunction getResponsiveDirectionClasses (direction) {\n return _getResponsiveClasses(direction, '', DT_STACK_DIRECTION);\n}\n\nfunction getResponsiveGapClasses (gap) {\n return _getResponsiveClasses(gap, 'gap', DT_STACK_GAP);\n}\n\nfunction getResponsiveAlignClasses (align) {\n return _getResponsiveClasses(align, 'align', DT_STACK_ALIGN);\n}\n\nfunction getResponsiveJustifyClasses (justify) {\n if (typeof justify !== 'object' || justify === null) return [];\n\n return DT_STACK_RESPONSIVE_BREAKPOINTS.map((breakpoint) => {\n const value = justify[breakpoint];\n if (!value) return null;\n\n const isValid = DT_STACK_JUSTIFY.includes(value);\n const normalizedValue = _normalizeJustifyForClass(value);\n\n return isValid ? `d-stack--${breakpoint}-justify-${normalizedValue}` : null;\n });\n}\n\nexport function getResponsiveClasses (direction, gap, align, justify) {\n return [\n ...getResponsiveDirectionClasses(direction),\n ...getResponsiveGapClasses(gap),\n ...getResponsiveAlignClasses(align),\n ...getResponsiveJustifyClasses(justify),\n ];\n}\n\nexport function getDefaultGapClass (gap) {\n const validGap = _getDefaultValue(gap);\n return DT_STACK_GAP.includes(validGap) ? `d-stack--gap-${validGap}` : null;\n}\n\nexport function getDefaultAlignClass (align) {\n const validAlign = _getDefaultValue(align);\n return DT_STACK_ALIGN.includes(validAlign) ? `d-stack--align-${validAlign}` : null;\n}\n\n/**\n * Normalizes justify value to CSS class suffix.\n * Maps CSS-aligned values (space-around, space-between, space-evenly) to shorthand\n * (around, between, evenly) for CSS class generation.\n * @param {string} value - The justify value\n * @returns {string} The normalized value for CSS class\n */\nfunction _normalizeJustifyForClass (value) {\n const normalizeMap = {\n 'space-around': 'around',\n 'space-between': 'between',\n 'space-evenly': 'evenly',\n };\n return normalizeMap[value] || value;\n}\n\nexport function getDefaultJustifyClass (justify) {\n const validJustify = _getDefaultValue(justify);\n const normalizedJustify = _normalizeJustifyForClass(validJustify);\n return DT_STACK_JUSTIFY.includes(validJustify) ? `d-stack--justify-${normalizedJustify}` : null;\n}"],"mappings":"4GAEA,SAAS,EAAqB,EAAW,CACvC,OAAO,IAAcA,EAAAA,mBAAmB,QAQ1C,SAAS,EAAkB,EAAO,CAGhC,OAFI,OAAO,GAAU,SAAiB,EAClC,OAAO,GAAU,UAAY,EAAuB,EAAM,QACvD,KAGT,SAAS,EAAoB,EAAW,CACtC,GAAI,OAAO,GAAc,SACvB,OAAQ,EAA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L,GAAG,EAA8B,EAAU,CAC3C,GAAG,EAAwB,EAAI,CAC/B,GAAG,EAA0B,EAAM,CACnC,GAAG,EAA4B,EAAQ,CACxC,CAGH,SAAgB,EAAoB,EAAK,CACvC,IAAM,EAAW,EAAiB,EAAI,CACtC,OAAOF,EAAAA,aAAa,SAAS,EAAS,CAAG,gBAAgB,IAAa,KAGxE,SAAgB,EAAsB,EAAO,CAC3C,IAAM,EAAa,EAAiB,EAAM,CAC1C,OAAOC,EAAAA,eAAe,SAAS,EAAW,CAAG,kBAAkB,IAAe,KAUhF,SAAS,EAA2B,EAAO,CAMzC,MALqB,CACnB,eAAgB,SAChB,gBAAiB,UACjB,eAAgB,SACjB,CACmB,IAAU,EAGhC,SAAgB,EAAwB,EAAS,CAC/C,IAAM,EAAe,EAAiB,EAAQ,CACxC,EAAoB,EAA0B,EAAa,CACjE,OAAOC,EAAAA,iBAAiB,SAAS,EAAa,CAAG,oBAAoB,IAAsB"}
1
+ {"version":3,"file":"utils.cjs","names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_ALIGN_SELF","DT_STACK_JUSTIFY"],"sources":["../../../components/Stack/Utils.js"],"sourcesContent":["import { DT_STACK_DIRECTION, DT_STACK_GAP, DT_STACK_RESPONSIVE_BREAKPOINTS, DT_STACK_ALIGN, DT_STACK_ALIGN_SELF, DT_STACK_JUSTIFY } from '@/components/Stack/StackConstants';\n\nfunction _isDefaultDirection (direction) {\n return direction === DT_STACK_DIRECTION.default;\n}\n\n/**\n * Generic helper to extract default value from string or object props\n * @param {string|Object} value - The prop value\n * @returns {string|null} The default value or null\n */\nfunction _getDefaultValue (value) {\n if (typeof value === 'string') return value;\n if (typeof value === 'object' && value !== null) return value.default;\n return null;\n}\n\nfunction _getValidDirection (direction) {\n if (typeof direction === 'string') {\n return !_isDefaultDirection(direction) ? DT_STACK_DIRECTION[direction] : null;\n } else if (typeof direction === 'object') {\n const { default: defaultStyle } = direction;\n\n return !_isDefaultDirection(defaultStyle) ? DT_STACK_DIRECTION[defaultStyle] : null;\n } else { return null; }\n}\n\n/**\n * Generic helper to generate responsive classes for any prop\n * @param {Object} propValue - The prop value object with breakpoint keys\n * @param {string} propName - The name of the prop (e.g., 'gap', 'align')\n * @param {Array|Object} validValues - Valid values (array or object for direction)\n * @param {string} classPrefix - CSS class prefix (default: 'd-stack')\n * @returns {Array} Array of CSS class names\n */\nfunction _getResponsiveClasses (propValue, propName, validValues, classPrefix = 'd-stack') {\n if (typeof propValue !== 'object' || propValue === null) return [];\n\n return DT_STACK_RESPONSIVE_BREAKPOINTS.map((breakpoint) => {\n const value = propValue[breakpoint];\n if (!value) return null;\n\n // Handle both array (gap, align, justify) and object (direction) validValues\n const isValid = Array.isArray(validValues)\n ? validValues.includes(value)\n : value in validValues;\n\n // For direction, we don't need the prop name in the class\n const className = propName === ''\n ? `${classPrefix}--${breakpoint}-${value}`\n : `${classPrefix}--${breakpoint}-${propName}-${value}`;\n\n return isValid ? className : null;\n });\n}\n\nexport function getDefaultDirectionClass (direction) {\n return _getValidDirection(direction)\n ? `d-stack--${DT_STACK_DIRECTION[_getValidDirection(direction)]}`\n : null;\n}\n\nfunction getResponsiveDirectionClasses (direction) {\n return _getResponsiveClasses(direction, '', DT_STACK_DIRECTION);\n}\n\nfunction getResponsiveGapClasses (gap) {\n return _getResponsiveClasses(gap, 'gap', DT_STACK_GAP);\n}\n\nfunction getResponsiveAlignClasses (align) {\n return _getResponsiveClasses(align, 'align', DT_STACK_ALIGN);\n}\n\nfunction getResponsiveAlignSelfClasses (alignSelf) {\n return _getResponsiveClasses(alignSelf, 'align-self', DT_STACK_ALIGN_SELF);\n}\n\nfunction getResponsiveJustifyClasses (justify) {\n if (typeof justify !== 'object' || justify === null) return [];\n\n return DT_STACK_RESPONSIVE_BREAKPOINTS.map((breakpoint) => {\n const value = justify[breakpoint];\n if (!value) return null;\n\n const isValid = DT_STACK_JUSTIFY.includes(value);\n const normalizedValue = _normalizeJustifyForClass(value);\n\n return isValid ? `d-stack--${breakpoint}-justify-${normalizedValue}` : null;\n });\n}\n\nexport function getResponsiveClasses (direction, gap, align, justify, alignSelf) {\n return [\n ...getResponsiveDirectionClasses(direction),\n ...getResponsiveGapClasses(gap),\n ...getResponsiveAlignClasses(align),\n ...getResponsiveJustifyClasses(justify),\n ...getResponsiveAlignSelfClasses(alignSelf),\n ];\n}\n\nexport function getDefaultGapClass (gap) {\n const validGap = _getDefaultValue(gap);\n return DT_STACK_GAP.includes(validGap) ? `d-stack--gap-${validGap}` : null;\n}\n\nexport function getDefaultAlignClass (align) {\n const validAlign = _getDefaultValue(align);\n return DT_STACK_ALIGN.includes(validAlign) ? `d-stack--align-${validAlign}` : null;\n}\n\nexport function getDefaultAlignSelfClass (alignSelf) {\n const validAlignSelf = _getDefaultValue(alignSelf);\n return DT_STACK_ALIGN_SELF.includes(validAlignSelf) ? `d-stack--align-self-${validAlignSelf}` : null;\n}\n\n/**\n * Normalizes justify value to CSS class suffix.\n * Maps CSS-aligned values (space-around, space-between, space-evenly) to shorthand\n * (around, between, evenly) for CSS class generation.\n * @param {string} value - The justify value\n * @returns {string} The normalized value for CSS class\n */\nfunction _normalizeJustifyForClass (value) {\n const normalizeMap = {\n 'space-around': 'around',\n 'space-between': 'between',\n 'space-evenly': 'evenly',\n };\n return normalizeMap[value] || value;\n}\n\nexport function getDefaultJustifyClass (justify) {\n const validJustify = _getDefaultValue(justify);\n const normalizedJustify = _normalizeJustifyForClass(validJustify);\n return DT_STACK_JUSTIFY.includes(validJustify) ? `d-stack--justify-${normalizedJustify}` : null;\n}"],"mappings":"4GAEA,SAAS,EAAqB,EAAW,CACvC,OAAO,IAAcA,EAAAA,mBAAmB,QAQ1C,SAAS,EAAkB,EAAO,CAGhC,OAFI,OAAO,GAAU,SAAiB,EAClC,OAAO,GAAU,UAAY,EAAuB,EAAM,QACvD,KAGT,SAAS,EAAoB,EAAW,CACtC,GAAI,OAAO,G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