@dialpad/dialtone-vue 2.205.3 → 2.206.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/component-documentation.json +1 -1
  2. package/dist/dialtone-vue.cjs +1 -1
  3. package/dist/dialtone-vue.js +283 -277
  4. package/dist/dialtone-vue.js.map +1 -1
  5. package/dist/lib/filter-pill/filter-pill.cjs +2 -0
  6. package/dist/lib/filter-pill/filter-pill.cjs.map +1 -0
  7. package/dist/lib/filter-pill/filter-pill.js +245 -0
  8. package/dist/lib/filter-pill/filter-pill.js.map +1 -0
  9. package/dist/lib/filter-pill/index.cjs +2 -0
  10. package/dist/lib/filter-pill/index.cjs.map +1 -0
  11. package/dist/lib/filter-pill/index.js +5 -0
  12. package/dist/lib/filter-pill/index.js.map +1 -0
  13. package/dist/lib/mode-island/index.cjs +2 -0
  14. package/dist/lib/mode-island/index.cjs.map +1 -0
  15. package/dist/lib/mode-island/index.js +7 -0
  16. package/dist/lib/mode-island/index.js.map +1 -0
  17. package/dist/lib/mode-island/mode-island-constants.cjs +2 -0
  18. package/dist/lib/mode-island/mode-island-constants.cjs.map +1 -0
  19. package/dist/lib/mode-island/mode-island-constants.js +12 -0
  20. package/dist/lib/mode-island/mode-island-constants.js.map +1 -0
  21. package/dist/lib/mode-island/mode-island.cjs +2 -0
  22. package/dist/lib/mode-island/mode-island.cjs.map +1 -0
  23. package/dist/lib/mode-island/mode-island.js +124 -0
  24. package/dist/lib/mode-island/mode-island.js.map +1 -0
  25. package/dist/lib/mode-island/utils.cjs +2 -0
  26. package/dist/lib/mode-island/utils.cjs.map +1 -0
  27. package/dist/lib/mode-island/utils.js +32 -0
  28. package/dist/lib/mode-island/utils.js.map +1 -0
  29. package/dist/lib/mode-island/validators.cjs +2 -0
  30. package/dist/lib/mode-island/validators.cjs.map +1 -0
  31. package/dist/lib/mode-island/validators.js +12 -0
  32. package/dist/lib/mode-island/validators.js.map +1 -0
  33. package/dist/lib/pagination/pagination.cjs +1 -1
  34. package/dist/lib/pagination/pagination.cjs.map +1 -1
  35. package/dist/lib/pagination/pagination.js +8 -8
  36. package/dist/lib/pagination/pagination.js.map +1 -1
  37. package/dist/lib/popover/popover.cjs.map +1 -1
  38. package/dist/lib/popover/popover.js +3 -19
  39. package/dist/lib/popover/popover.js.map +1 -1
  40. package/dist/lib/stack/stack-constants.cjs +1 -1
  41. package/dist/lib/stack/stack-constants.cjs.map +1 -1
  42. package/dist/lib/stack/stack-constants.js +8 -8
  43. package/dist/lib/stack/stack-constants.js.map +1 -1
  44. package/dist/lib/stack/stack.cjs.map +1 -1
  45. package/dist/lib/stack/stack.js +1 -1
  46. package/dist/lib/stack/stack.js.map +1 -1
  47. package/dist/lib/stack/utils.cjs +1 -1
  48. package/dist/lib/stack/utils.cjs.map +1 -1
  49. package/dist/lib/stack/utils.js +56 -44
  50. package/dist/lib/stack/utils.js.map +1 -1
  51. package/dist/localization/en-US.cjs +2 -0
  52. package/dist/localization/en-US.cjs.map +1 -1
  53. package/dist/localization/en-US.js +2 -0
  54. package/dist/localization/en-US.js.map +1 -1
  55. package/dist/types/components/filter_pill/filter_pill.vue.d.ts +150 -0
  56. package/dist/types/components/filter_pill/filter_pill.vue.d.ts.map +1 -0
  57. package/dist/types/components/filter_pill/index.d.ts +2 -0
  58. package/dist/types/components/filter_pill/index.d.ts.map +1 -0
  59. package/dist/types/components/mode_island/index.d.ts +3 -0
  60. package/dist/types/components/mode_island/index.d.ts.map +1 -0
  61. package/dist/types/components/mode_island/mode_island.vue.d.ts +3 -0
  62. package/dist/types/components/mode_island/mode_island.vue.d.ts.map +1 -0
  63. package/dist/types/components/mode_island/mode_island_constants.d.ts +10 -0
  64. package/dist/types/components/mode_island/mode_island_constants.d.ts.map +1 -0
  65. package/dist/types/components/mode_island/utils.d.ts +12 -0
  66. package/dist/types/components/mode_island/utils.d.ts.map +1 -0
  67. package/dist/types/components/mode_island/validators.d.ts +6 -0
  68. package/dist/types/components/mode_island/validators.d.ts.map +1 -0
  69. package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
  70. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  71. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  72. package/dist/types/components/split_button/split_button.vue.d.ts +2 -2
  73. package/dist/types/components/stack/stack_constants.d.ts.map +1 -1
  74. package/dist/types/components/stack/utils.d.ts.map +1 -1
  75. package/dist/types/index.d.ts +2 -0
  76. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  77. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <portal v-if=\"modal && isOpen\">\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </portal>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n v-on=\"$listeners\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\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 @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 :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :tabindex=\"contentTabindex\"\n appear\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"$slots.headerContent || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\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=\"hasFooter()\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\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_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 './popover_constants';\nimport { getUniqueString, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { Portal } from '@linusborg/vue-simple-portal';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.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 Portal,\n },\n\n mixins: [ModalMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\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 * 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 */\n externalAnchor: {\n type: String,\n default: '',\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 * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\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 * 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 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 * auto, auto-start, auto-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 header content wrapper element.\n */\n headerClass: {\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, HTMLElement],\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 body (supports shadow DOM).\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: [HTMLElement, 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 * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted to sync value with parent\n *\n * @event update:opened\n * @type {Boolean | Array}\n */\n 'update:open',\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 anchorEl: null,\n popoverContentEl: null,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n ...this.$listeners,\n\n keydown: event => {\n this.onKeydown(event);\n this.$emit('keydown', 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-space-300))`;\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\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\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 },\n\n immediate: true,\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\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(this.$el, this.$options.name);\n\n this.popoverContentEl = 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-space-300) (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 beforeDestroy () {\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 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.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 });\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 (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\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 this.open ?? (this.anchorEl?.contains(e.target) && !this.anchorEl?.disabled && this.toggleOpen());\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\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\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 }\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.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.enableScrolling();\n }\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 this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\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 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 = 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 }\n result ? result.focus() : this.$refs.content?.$el.focus();\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) 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 if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\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 this.$refs.content?.$el.focus();\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 const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\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 let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = 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 hasFooter () {\n return this.$slots.footerContent || this.$scopedSlots.footerContent?.();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","SrOnlyCloseButton","DtLazyShow","PopoverHeaderFooter","Portal","ModalMixin","role","POPOVER_ROLES","padding","POPOVER_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","getUniqueString","sticky","POPOVER_STICKY_VALUES","initialFocusElement","POPOVER_INITIAL_FOCUS_STRINGS","appendTo","POPOVER_APPEND_TO_VALUES","POPOVER_HEADER_FOOTER_PADDING_CLASSES","event","modal","_a","offset","placement","open","isOpen","isPrev","_b","warnIfUnmounted","_c","entries","dialog","isOut","isOutOfViewPort","anchorEl","getPopperOptions","element","disableRootScrolling","enableRootScrolling","result","domEl","error","anchorReferenceRect","anchorOwnerDocument","anchorParentWindow","anchorIframe","iframeReferenceRect","internalAppendTo","iFrameError","err","createTippyPopover"],"mappings":";;;;;;;;;AA8IA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAC,EAAA,SAAAD,CAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,S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AAA,UACAC,IAAA;AAAA,UACA;AACA;AAAA,QAEA;AACA,UAAAD,IAAA,KAAA;AACA;AAAA,MACA;AAEA,OAAAlB,IAAA,KAAA,QAAA,QAAAA,EAAA,WAEA,KAAA,MAAAqB,EAAA,KAAA,UAAA;AAAA,QACA,eAAA,KAAA,cAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,WAAA,KAAA;AAAA,QACA,QAAA,KAAA;AAAA,QACA,QAAA,KAAA;AAAA,QACA,UAAAH;AAAA,QACA,aAAA;AAAA,QACA,SAAA;AAAA,QACA,wBAAA,MAAA,KAAA,uBAAAC,CAAA;AAAA;AAAA;AAAA,QAGA,aAAA;AAAA,QACA,QAAA,KAAA,QAAA,MAAA,KAAA,sBAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,QAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,MAAA,oBAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,WAAA,MAAA,oBAAA;AAAA,IACA;AAAA,IAEA,qBAAA;AACA,WAAA,MAAA,2BAAA;AAAA,IACA;AAAA,IAEA,qBAAA;AACA,WAAA,MAAA,2BAAA;AAAA,IACA;AAAA,IAEA,YAAA;;AACA,aAAA,KAAA,OAAA,mBAAArB,KAAAN,IAAA,KAAA,cAAA,kBAAA,gBAAAM,EAAA,KAAAN;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover.js","sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <portal v-if=\"modal && isOpen\">\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </portal>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n v-on=\"$listeners\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\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 @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 :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :tabindex=\"contentTabindex\"\n appear\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"$slots.headerContent || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\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=\"hasFooter()\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\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_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 './popover_constants';\nimport { getUniqueString, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { Portal } from '@linusborg/vue-simple-portal';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.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 Portal,\n },\n\n mixins: [ModalMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\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 * 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 */\n externalAnchor: {\n type: String,\n default: '',\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 * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\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 * 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 class=\"d-link\" href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\" target=\"_blank\">Popper.js docs</a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a class=\"d-link\" href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\" target=\"_blank\">Tippy.js docs</a>\n * @values top, top-start, top-end, right, right-start, right-end, left, left-start, left-end, bottom, bottom-start, bottom-end, auto, auto-start, auto-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 header content wrapper element.\n */\n headerClass: {\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, HTMLElement],\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 body (supports shadow DOM).\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: [HTMLElement, 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 * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted to sync value with parent\n *\n * @event update:opened\n * @type {Boolean | Array}\n */\n 'update:open',\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 anchorEl: null,\n popoverContentEl: null,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n ...this.$listeners,\n\n keydown: event => {\n this.onKeydown(event);\n this.$emit('keydown', 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-space-300))`;\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\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\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 },\n\n immediate: true,\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\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(this.$el, this.$options.name);\n\n this.popoverContentEl = 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-space-300) (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 beforeDestroy () {\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 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.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 });\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 (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\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 this.open ?? (this.anchorEl?.contains(e.target) && !this.anchorEl?.disabled && this.toggleOpen());\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\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\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 }\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.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.enableScrolling();\n }\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 this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\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 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 = 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 }\n result ? result.focus() : this.$refs.content?.$el.focus();\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) 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 if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\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 this.$refs.content?.$el.focus();\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 const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\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 let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = 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 hasFooter () {\n return this.$slots.footerContent || this.$scopedSlots.footerContent?.();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","SrOnlyCloseButton","DtLazyShow","PopoverHeaderFooter","Portal","ModalMixin","role","POPOVER_ROLES","padding","POPOVER_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","getUniqueString","sticky","POPOVER_STICKY_VALUES","initialFocusElement","POPOVER_INITIAL_FOCUS_STRINGS","appendTo","POPOVER_APPEND_TO_VALUES","POPOVER_HEADER_FOOTER_PADDING_CLASSES","event","modal","_a","offset","placement","open","isOpen","isPrev","_b","warnIfUnmounted","_c","entries","dialog","isOut","isOutOfViewPort","anchorEl","getPopperOptions","element","disableRootScrolling","enableRootScrolling","result","domEl","error","anchorReferenceRect","anchorOwnerDocument","anchorParentWindow","anchorIframe","iframeReferenceRect","internalAppendTo","iFrameError","err","createTippyPopover"],"mappings":";;;;;;;;;AA8IA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AA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AAAN;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},t=["sm","md","lg","xl"],T=["0","50","100","200","300","350","400","450","500","525","550","600","625","650","700"],_=["start","center","end","stretch","baseline"],n=["start","center","end","around","between","evenly"],r={DT_STACK_DIRECTION:e,DT_STACK_RESPONSIVE_BREAKPOINTS:t,DT_STACK_GAP:T,DT_STACK_ALIGN:_,DT_STACK_JUSTIFY:n};exports.DT_STACK_ALIGN=_;exports.DT_STACK_DIRECTION=e;exports.DT_STACK_GAP=T;exports.DT_STACK_JUSTIFY=n;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=t;exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},t=["sm","md","lg","xl"],T=["0","50","100","200","300","350","400","450","500","525","550","600","625","650","700"],n=["start","center","end","stretch","baseline"],s=["start","center","end","space-around","space-between","space-evenly","around","between","evenly"],_={DT_STACK_DIRECTION:e,DT_STACK_RESPONSIVE_BREAKPOINTS:t,DT_STACK_GAP:T,DT_STACK_ALIGN:n,DT_STACK_JUSTIFY:s};exports.DT_STACK_ALIGN=n;exports.DT_STACK_DIRECTION=e;exports.DT_STACK_GAP=T;exports.DT_STACK_JUSTIFY=s;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=t;exports.default=_;
2
2
  //# sourceMappingURL=stack-constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-constants.cjs","sources":["../../../components/stack/stack_constants.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', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'];\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 * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', '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"],"names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_JUSTIFY","stack_constants"],"mappings":"4GAMY,MAACA,EAAqB,CAChC,QAAS,SACT,OAAQ,SACR,IAAK,MACL,cAAe,cACf,iBAAkB,gBACpB,EAMaC,EAAkC,CAAC,KAAM,KAAM,KAAM,IAAI,EAOzDC,EAAe,CAAC,IAAK,KAAM,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAK,EAOpHC,EAAiB,CAAC,QAAS,SAAU,MAAO,UAAW,UAAU,EAOjEC,EAAmB,CAAC,QAAS,SAAU,MAAO,SAAU,UAAW,QAAQ,EAExFC,EAAe,CACb,mBAAAL,EACA,gCAAAC,EACA,aAAAC,EACA,eAAAC,EACA,iBAAAC,CACF"}
1
+ {"version":3,"file":"stack-constants.cjs","sources":["../../../components/stack/stack_constants.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', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'];\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"],"names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_JUSTIFY","stack_constants"],"mappings":"4GAMY,MAACA,EAAqB,CAChC,QAAS,SACT,OAAQ,SACR,IAAK,MACL,cAAe,cACf,iBAAkB,gBACpB,EAMaC,EAAkC,CAAC,KAAM,KAAM,KAAM,IAAI,EAOzDC,EAAe,CAAC,IAAK,KAAM,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,KAAK,EAOpHC,EAAiB,CAAC,QAAS,SAAU,MAAO,UAAW,UAAU,EAQjEC,EAAmB,CAAC,QAAS,SAAU,MAAO,eAAgB,gBAAiB,eAAgB,SAAU,UAAW,QAAQ,EAEzIC,EAAe,CACb,mBAAAL,EACA,gCAAAC,EACA,aAAAC,EACA,eAAAC,EACA,iBAAAC,CACF"}
@@ -4,19 +4,19 @@ const e = {
4
4
  row: "row",
5
5
  "row-reverse": "row-reverse",
6
6
  "column-reverse": "column-reverse"
7
- }, n = ["sm", "md", "lg", "xl"], t = ["0", "50", "100", "200", "300", "350", "400", "450", "500", "525", "550", "600", "625", "650", "700"], r = ["start", "center", "end", "stretch", "baseline"], s = ["start", "center", "end", "around", "between", "evenly"], o = {
7
+ }, n = ["sm", "md", "lg", "xl"], s = ["0", "50", "100", "200", "300", "350", "400", "450", "500", "525", "550", "600", "625", "650", "700"], t = ["start", "center", "end", "stretch", "baseline"], r = ["start", "center", "end", "space-around", "space-between", "space-evenly", "around", "between", "evenly"], c = {
8
8
  DT_STACK_DIRECTION: e,
9
9
  DT_STACK_RESPONSIVE_BREAKPOINTS: n,
10
- DT_STACK_GAP: t,
11
- DT_STACK_ALIGN: r,
12
- DT_STACK_JUSTIFY: s
10
+ DT_STACK_GAP: s,
11
+ DT_STACK_ALIGN: t,
12
+ DT_STACK_JUSTIFY: r
13
13
  };
14
14
  export {
15
- r as DT_STACK_ALIGN,
15
+ t as DT_STACK_ALIGN,
16
16
  e as DT_STACK_DIRECTION,
17
- t as DT_STACK_GAP,
18
- s as DT_STACK_JUSTIFY,
17
+ s as DT_STACK_GAP,
18
+ r as DT_STACK_JUSTIFY,
19
19
  n as DT_STACK_RESPONSIVE_BREAKPOINTS,
20
- o as default
20
+ c as default
21
21
  };
22
22
  //# sourceMappingURL=stack-constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack-constants.js","sources":["../../../components/stack/stack_constants.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', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'];\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 * @type {string[]}\n */\nexport const DT_STACK_JUSTIFY = ['start', 'center', 'end', '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"],"names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_JUSTIFY","stack_constants"],"mappings":"AAMY,MAACA,IAAqB;AAAA,EAChC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,eAAe;AAAA,EACf,kBAAkB;AACpB,GAMaC,IAAkC,CAAC,MAAM,MAAM,MAAM,IAAI,GAOzDC,IAAe,CAAC,KAAK,MAAM,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAOpHC,IAAiB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU,GAOjEC,IAAmB,CAAC,SAAS,UAAU,OAAO,UAAU,WAAW,QAAQ,GAExFC,IAAe;AAAA,EACb,oBAAAL;AAAA,EACA,iCAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,kBAAAC;AACF;"}
1
+ {"version":3,"file":"stack-constants.js","sources":["../../../components/stack/stack_constants.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', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'];\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"],"names":["DT_STACK_DIRECTION","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_GAP","DT_STACK_ALIGN","DT_STACK_JUSTIFY","stack_constants"],"mappings":"AAMY,MAACA,IAAqB;AAAA,EAChC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,eAAe;AAAA,EACf,kBAAkB;AACpB,GAMaC,IAAkC,CAAC,MAAM,MAAM,MAAM,IAAI,GAOzDC,IAAe,CAAC,KAAK,MAAM,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,OAAO,KAAK,GAOpHC,IAAiB,CAAC,SAAS,UAAU,OAAO,WAAW,UAAU,GAQjEC,IAAmB,CAAC,SAAS,UAAU,OAAO,gBAAgB,iBAAiB,gBAAgB,UAAU,WAAW,QAAQ,GAEzIC,IAAe;AAAA,EACb,oBAAAL;AAAA,EACA,iCAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,kBAAAC;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"stack.cjs","sources":["../../../components/stack/stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\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 './stack_constants';\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 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 * 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 * Valid values are '0', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'.\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 * Valid values are '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 * Valid values are 'start', 'center', 'end', '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"],"names":["_sfc_main","direction","directionValidator","gap","gapValidator","align","alignValidator","justify","justifyValidator","DT_STACK_DIRECTION","DT_STACK_GAP","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_ALIGN","DT_STACK_JUSTIFY","getDefaultGapClass","getDefaultDirectionClass","getDefaultAlignClass","getDefaultJustifyClass","getResponsiveClasses"],"mappings":"oQAuBAA,EAAA,CACA,KAAA,UAEA,MAAA,CASA,UAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,SACA,UAAAC,GAAAC,EAAAA,mBAAAD,CAAA,CACA,EAKA,GAAA,CACA,KAAA,OACA,QAAA,KACA,EAUA,IAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,IACA,UAAAE,GAAAC,EAAAA,aAAAD,CAAA,CACA,EAYA,MAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,UAAAE,GAAAC,EAAAA,eAAAD,CAAA,CACA,EAUA,QAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,QACA,UAAAE,GAAAC,EAAAA,iBAAAD,CAAA,CACA,CACA,EAEA,MAAA,CACA,MAAA,CACA,mBAAAE,EAAAA,mBACA,aAAAC,EAAAA,aACA,gCAAAC,EAAAA,gCACA,eAAAC,EAAAA,eACA,iBAAAC,EAAAA,gBACA,CACA,EAEA,SAAA,CACA,YAAA,CACA,OAAAC,EAAAA,mBAAA,KAAA,GAAA,CACA,EAEA,kBAAA,CACA,OAAAC,EAAAA,yBAAA,KAAA,SAAA,CACA,EAEA,cAAA,CACA,OAAAC,EAAAA,qBAAA,KAAA,KAAA,CACA,EAEA,gBAAA,CACA,OAAAC,EAAAA,uBAAA,KAAA,OAAA,CACA,EAEA,iBAAA,CACA,OAAAC,EAAAA,qBAAA,KAAA,UAAA,KAAA,IAAA,KAAA,MAAA,KAAA,OAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"stack.cjs","sources":["../../../components/stack/stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\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 './stack_constants';\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 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 * 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 * Valid values are '0', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'.\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 * Valid values are '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 * Valid values are 'start', 'center', 'end', 'space-around', 'space-between', 'space-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"],"names":["_sfc_main","direction","directionValidator","gap","gapValidator","align","alignValidator","justify","justifyValidator","DT_STACK_DIRECTION","DT_STACK_GAP","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_ALIGN","DT_STACK_JUSTIFY","getDefaultGapClass","getDefaultDirectionClass","getDefaultAlignClass","getDefaultJustifyClass","getResponsiveClasses"],"mappings":"oQAuBAA,EAAA,CACA,KAAA,UAEA,MAAA,CASA,UAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,SACA,UAAAC,GAAAC,EAAAA,mBAAAD,CAAA,CACA,EAKA,GAAA,CACA,KAAA,OACA,QAAA,KACA,EAUA,IAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,IACA,UAAAE,GAAAC,EAAAA,aAAAD,CAAA,CACA,EAYA,MAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,UAAAE,GAAAC,EAAAA,eAAAD,CAAA,CACA,EAUA,QAAA,CACA,KAAA,CAAA,OAAA,MAAA,EACA,QAAA,QACA,UAAAE,GAAAC,EAAAA,iBAAAD,CAAA,CACA,CACA,EAEA,MAAA,CACA,MAAA,CACA,mBAAAE,EAAAA,mBACA,aAAAC,EAAAA,aACA,gCAAAC,EAAAA,gCACA,eAAAC,EAAAA,eACA,iBAAAC,EAAAA,gBACA,CACA,EAEA,SAAA,CACA,YAAA,CACA,OAAAC,EAAAA,mBAAA,KAAA,GAAA,CACA,EAEA,kBAAA,CACA,OAAAC,EAAAA,yBAAA,KAAA,SAAA,CACA,EAEA,cAAA,CACA,OAAAC,EAAAA,qBAAA,KAAA,KAAA,CACA,EAEA,gBAAA,CACA,OAAAC,EAAAA,uBAAA,KAAA,OAAA,CACA,EAEA,iBAAA,CACA,OAAAC,EAAAA,qBAAA,KAAA,UAAA,KAAA,IAAA,KAAA,MAAA,KAAA,OAAA,CACA,CACA,CACA"}
@@ -58,7 +58,7 @@ const D = {
58
58
  * All the undefined breakpoints will have the 'default' value.
59
59
  * You can override the default justify with 'default' key.
60
60
  * In case of string, it will be applied to all the breakpoints.
61
- * Valid values are 'start', 'center', 'end', 'around', 'between', 'evenly'.
61
+ * Valid values are 'start', 'center', 'end', 'space-around', 'space-between', 'space-evenly'.
62
62
  */
63
63
  justify: {
64
64
  type: [String, Object],
@@ -1 +1 @@
1
- {"version":3,"file":"stack.js","sources":["../../../components/stack/stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\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 './stack_constants';\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 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 * 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 * Valid values are '0', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'.\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 * Valid values are '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 * Valid values are 'start', 'center', 'end', '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"],"names":["_sfc_main","direction","directionValidator","gap","gapValidator","align","alignValidator","justify","justifyValidator","DT_STACK_DIRECTION","DT_STACK_GAP","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_ALIGN","DT_STACK_JUSTIFY","getDefaultGapClass","getDefaultDirectionClass","getDefaultAlignClass","getDefaultJustifyClass","getResponsiveClasses"],"mappings":";;;;AAuBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,WAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,KAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,SAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,oBAAAE;AAAA,MACA,cAAAC;AAAA,MACA,iCAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,aAAA;AACA,aAAAC,EAAA,KAAA,GAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAAC,EAAA,KAAA,SAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,aAAAC,EAAA,KAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAAC,EAAA,KAAA,OAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,EAAA,KAAA,WAAA,KAAA,KAAA,KAAA,OAAA,KAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"stack.js","sources":["../../../components/stack/stack.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n data-qa=\"dt-stack\"\n :class=\"[\n 'd-stack',\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 './stack_constants';\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 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 * 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 * Valid values are '0', '50', '100', '200', '300', '350', '400', '450', '500', '525', '550', '600', '625', '650', '700'.\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 * Valid values are '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 * Valid values are 'start', 'center', 'end', 'space-around', 'space-between', 'space-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"],"names":["_sfc_main","direction","directionValidator","gap","gapValidator","align","alignValidator","justify","justifyValidator","DT_STACK_DIRECTION","DT_STACK_GAP","DT_STACK_RESPONSIVE_BREAKPOINTS","DT_STACK_ALIGN","DT_STACK_JUSTIFY","getDefaultGapClass","getDefaultDirectionClass","getDefaultAlignClass","getDefaultJustifyClass","getResponsiveClasses"],"mappings":";;;;AAuBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,WAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,KAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYA,OAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,SAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,oBAAAE;AAAA,MACA,cAAAC;AAAA,MACA,iCAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,aAAA;AACA,aAAAC,EAAA,KAAA,GAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAAC,EAAA,KAAA,SAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,aAAAC,EAAA,KAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAAC,EAAA,KAAA,OAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,EAAA,KAAA,WAAA,KAAA,KAAA,KAAA,OAAA,KAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./stack-constants.cjs");function f(t){return t===n.DT_STACK_DIRECTION.default}function a(t){return typeof t=="string"?t:typeof t=="object"&&t!==null?t.default:null}function c(t){if(typeof t=="string")return f(t)?null:n.DT_STACK_DIRECTION[t];if(typeof t=="object"){const{default:e}=t;return f(e)?null:n.DT_STACK_DIRECTION[e]}else return null}function i(t,e,s,u="d-stack"){return typeof t!="object"||t===null?[]:n.DT_STACK_RESPONSIVE_BREAKPOINTS.map(r=>{const l=t[r];if(!l)return null;const o=Array.isArray(s)?s.includes(l):l in s,C=e===""?`${u}--${r}-${l}`:`${u}--${r}-${e}-${l}`;return o?C:null})}function T(t){return c(t)?`d-stack--${n.DT_STACK_DIRECTION[c(t)]}`:null}function D(t){return i(t,"",n.DT_STACK_DIRECTION)}function _(t){return i(t,"gap",n.DT_STACK_GAP)}function g(t){return i(t,"align",n.DT_STACK_ALIGN)}function A(t){return i(t,"justify",n.DT_STACK_JUSTIFY)}function S(t,e,s,u){return[...D(t),..._(e),...g(s),...A(u)]}function y(t){const e=a(t);return n.DT_STACK_GAP.includes(e)?`d-stack--gap-${e}`:null}function I(t){const e=a(t);return n.DT_STACK_ALIGN.includes(e)?`d-stack--align-${e}`:null}function R(t){const e=a(t);return n.DT_STACK_JUSTIFY.includes(e)?`d-stack--justify-${e}`:null}exports.getDefaultAlignClass=I;exports.getDefaultDirectionClass=T;exports.getDefaultGapClass=y;exports.getDefaultJustifyClass=R;exports.getResponsiveClasses=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./stack-constants.cjs");function o(t){return t===n.DT_STACK_DIRECTION.default}function a(t){return typeof t=="string"?t:typeof t=="object"&&t!==null?t.default:null}function c(t){if(typeof t=="string")return o(t)?null:n.DT_STACK_DIRECTION[t];if(typeof t=="object"){const{default:e}=t;return o(e)?null:n.DT_STACK_DIRECTION[e]}else return null}function r(t,e,s,l="d-stack"){return typeof t!="object"||t===null?[]:n.DT_STACK_RESPONSIVE_BREAKPOINTS.map(u=>{const i=t[u];if(!i)return null;const T=Array.isArray(s)?s.includes(i):i in s,C=e===""?`${l}--${u}-${i}`:`${l}--${u}-${e}-${i}`;return T?C:null})}function _(t){return c(t)?`d-stack--${n.DT_STACK_DIRECTION[c(t)]}`:null}function D(t){return r(t,"",n.DT_STACK_DIRECTION)}function g(t){return r(t,"gap",n.DT_STACK_GAP)}function A(t){return r(t,"align",n.DT_STACK_ALIGN)}function S(t){return typeof t!="object"||t===null?[]:n.DT_STACK_RESPONSIVE_BREAKPOINTS.map(e=>{const s=t[e];if(!s)return null;const l=n.DT_STACK_JUSTIFY.includes(s),u=f(s);return l?`d-stack--${e}-justify-${u}`:null})}function d(t,e,s,l){return[...D(t),...g(e),...A(s),...S(l)]}function y(t){const e=a(t);return n.DT_STACK_GAP.includes(e)?`d-stack--gap-${e}`:null}function p(t){const e=a(t);return n.DT_STACK_ALIGN.includes(e)?`d-stack--align-${e}`:null}function f(t){return{"space-around":"around","space-between":"between","space-evenly":"evenly"}[t]||t}function I(t){const e=a(t),s=f(e);return n.DT_STACK_JUSTIFY.includes(e)?`d-stack--justify-${s}`:null}exports.getDefaultAlignClass=p;exports.getDefaultDirectionClass=_;exports.getDefaultGapClass=y;exports.getDefaultJustifyClass=I;exports.getResponsiveClasses=d;
2
2
  //# sourceMappingURL=utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","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/stack_constants';\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 return _getResponsiveClasses(justify, 'justify', DT_STACK_JUSTIFY);\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\nexport function getDefaultJustifyClass (justify) {\n const validJustify = _getDefaultValue(justify);\n return DT_STACK_JUSTIFY.includes(validJustify) ? `d-stack--justify-${validJustify}` : null;\n}"],"names":["_isDefaultDirection","direction","DT_STACK_DIRECTION","_getDefaultValue","value","_getValidDirection","defaultStyle","_getResponsiveClasses","propValue","propName","validValues","classPrefix","DT_STACK_RESPONSIVE_BREAKPOINTS","breakpoint","isValid","className","getDefaultDirectionClass","getResponsiveDirectionClasses","getResponsiveGapClasses","gap","DT_STACK_GAP","getResponsiveAlignClasses","align","DT_STACK_ALIGN","getResponsiveJustifyClasses","justify","DT_STACK_JUSTIFY","getResponsiveClasses","getDefaultGapClass","validGap","getDefaultAlignClass","validAlign","getDefaultJustifyCl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,SAASC,EAA2BC,EAAO,CACzC,OAAOf,EAAsBe,EAAO,QAASC,gBAAc,CAC7D,CAEA,SAASC,EAA6BC,EAAS,CAC7C,OAAOlB,EAAsBkB,EAAS,UAAWC,kBAAgB,CACnE,CAEO,SAASC,EAAsB1B,EAAWkB,EAAKG,EAAOG,EAAS,CACpE,MAAO,CACL,GAAGR,EAA8BhB,CAAS,EAC1C,GAAGiB,EAAwBC,CAAG,EAC9B,GAAGE,EAA0BC,CAAK,EAClC,GAAGE,EAA4BC,CAAO,CAC1C,CACA,CAEO,SAASG,EAAoBT,EAAK,CACvC,MAAMU,EAAW1B,EAAiBgB,CAAG,EACrC,OAAOC,EAAAA,aAAa,SAASS,CAAQ,EAAI,gBAAgBA,CAAQ,GAAK,IACxE,CAEO,SAASC,EAAsBR,EAAO,CAC3C,MAAMS,EAAa5B,EAAiBmB,CAAK,EACzC,OAAOC,EAAAA,eAAe,SAASQ,CAAU,EAAI,kBAAkBA,CAAU,GAAK,IAChF,CAEO,SAASC,EAAwBP,EAAS,CAC/C,MAAMQ,EAAe9B,EAAiBsB,CAAO,EAC7C,OAAOC,EAAAA,iBAAiB,SAASO,CAAY,EAAI,oBAAoBA,CAAY,GAAK,IACxF"}
1
+ {"version":3,"file":"utils.cjs","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/stack_constants';\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}"],"names":["_isDefaultDirection","direction","DT_STACK_DIRECTION","_getDefaultValue","value","_getValidDirection","defaultStyle","_getResponsiveClasses","propValue","propName","validValues","classPrefix","DT_STACK_RESPONSIVE_BREAKPOINTS","breakpoint","isValid","className","getDefaultDirectionClass","getResponsiveDirectionClasses","getResponsiveGapClasses","gap","DT_STACK_GAP","getResponsiveAlignClasses","align","DT_STACK_ALIGN","getResponsiveJustifyClasses","justify","DT_STACK_JUSTIFY","normalizedValue","_normalizeJustifyForClass","getResponsiveClasses","getDefaultGapClass","validGap","getDefaultAlignClass","validAlign","getDefaultJustifyClass","validJustify","normalizedJustify"],"mappings":"yHAEA,SAASA,EAAqBC,EAAW,CACvC,OAAOA,IAAcC,EAAAA,mBAAmB,OAC1C,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C,EAAS,CAC7C,OAAI,OAAOA,GAAY,UAAYA,IAAY,KAAa,CAAA,EAErDb,EAAAA,gCAAgC,IAAKC,GAAe,CACzD,MAAMT,EAAQqB,EAAQZ,CAAU,EAChC,GAAI,CAACT,EAAO,OAAO,KAEnB,MAAMU,EAAUY,EAAAA,iBAAiB,SAAStB,CAAK,EACzCuB,EAAkBC,EAA0BxB,CAAK,EAEvD,OAAOU,EAAU,YAAYD,CAAU,YAAYc,CAAe,GAAK,IACzE,CAAC,CACH,CAEO,SAASE,EAAsB5B,EAAWkB,EAAKG,EAAOG,EAAS,CACpE,MAAO,CACL,GAAGR,EAA8BhB,CAAS,EAC1C,GAAGiB,EAAwBC,CAAG,EAC9B,GAAGE,EAA0BC,CAAK,EAClC,GAAGE,EAA4BC,CAAO,CAC1C,CACA,CAEO,SAASK,EAAoBX,EAAK,CACvC,MAAMY,EAAW5B,EAAiBgB,CAAG,EACrC,OAAOC,EAAAA,aAAa,SAASW,CAAQ,EAAI,gBAAgBA,CAAQ,GAAK,IACxE,CAEO,SAASC,EAAsBV,EAAO,CAC3C,MAAMW,EAAa9B,EAAiBmB,CAAK,EACzC,OAAOC,EAAAA,eAAe,SAASU,CAAU,EAAI,kBAAkBA,CAAU,GAAK,IAChF,CASA,SAASL,EAA2BxB,EAAO,CAMzC,MALqB,CACnB,eAAgB,SAChB,gBAAiB,UACjB,eAAgB,QACpB,EACsBA,CAAK,GAAKA,CAChC,CAEO,SAAS8B,EAAwBT,EAAS,CAC/C,MAAMU,EAAehC,EAAiBsB,CAAO,EACvCW,EAAoBR,EAA0BO,CAAY,EAChE,OAAOT,EAAAA,iBAAiB,SAASS,CAAY,EAAI,oBAAoBC,CAAiB,GAAK,IAC7F"}
@@ -1,67 +1,79 @@
1
- import { DT_STACK_DIRECTION as u, DT_STACK_GAP as a, DT_STACK_ALIGN as g, DT_STACK_JUSTIFY as C, DT_STACK_RESPONSIVE_BREAKPOINTS as y } from "./stack-constants.js";
2
- function c(t) {
3
- return t === u.default;
1
+ import { DT_STACK_DIRECTION as r, DT_STACK_GAP as f, DT_STACK_ALIGN as g, DT_STACK_JUSTIFY as d, DT_STACK_RESPONSIVE_BREAKPOINTS as p } from "./stack-constants.js";
2
+ function o(n) {
3
+ return n === r.default;
4
4
  }
5
- function f(t) {
6
- return typeof t == "string" ? t : typeof t == "object" && t !== null ? t.default : null;
5
+ function i(n) {
6
+ return typeof n == "string" ? n : typeof n == "object" && n !== null ? n.default : null;
7
7
  }
8
- function o(t) {
9
- if (typeof t == "string")
10
- return c(t) ? null : u[t];
11
- if (typeof t == "object") {
12
- const { default: n } = t;
13
- return c(n) ? null : u[n];
8
+ function c(n) {
9
+ if (typeof n == "string")
10
+ return o(n) ? null : r[n];
11
+ if (typeof n == "object") {
12
+ const { default: t } = n;
13
+ return o(t) ? null : r[t];
14
14
  } else
15
15
  return null;
16
16
  }
17
- function i(t, n, e, l = "d-stack") {
18
- return typeof t != "object" || t === null ? [] : y.map((r) => {
19
- const s = t[r];
20
- if (!s) return null;
21
- const D = Array.isArray(e) ? e.includes(s) : s in e, _ = n === "" ? `${l}--${r}-${s}` : `${l}--${r}-${n}-${s}`;
22
- return D ? _ : null;
17
+ function a(n, t, e, s = "d-stack") {
18
+ return typeof n != "object" || n === null ? [] : p.map((l) => {
19
+ const u = n[l];
20
+ if (!u) return null;
21
+ const y = Array.isArray(e) ? e.includes(u) : u in e, D = t === "" ? `${s}--${l}-${u}` : `${s}--${l}-${t}-${u}`;
22
+ return y ? D : null;
23
23
  });
24
24
  }
25
- function S(t) {
26
- return o(t) ? `d-stack--${u[o(t)]}` : null;
25
+ function m(n) {
26
+ return c(n) ? `d-stack--${r[c(n)]}` : null;
27
27
  }
28
- function A(t) {
29
- return i(t, "", u);
28
+ function _(n) {
29
+ return a(n, "", r);
30
30
  }
31
- function T(t) {
32
- return i(t, "gap", a);
31
+ function A(n) {
32
+ return a(n, "gap", f);
33
33
  }
34
- function d(t) {
35
- return i(t, "align", g);
34
+ function T(n) {
35
+ return a(n, "align", g);
36
36
  }
37
- function p(t) {
38
- return i(t, "justify", C);
37
+ function $(n) {
38
+ return typeof n != "object" || n === null ? [] : p.map((t) => {
39
+ const e = n[t];
40
+ if (!e) return null;
41
+ const s = d.includes(e), l = C(e);
42
+ return s ? `d-stack--${t}-justify-${l}` : null;
43
+ });
39
44
  }
40
- function R(t, n, e, l) {
45
+ function R(n, t, e, s) {
41
46
  return [
47
+ ..._(n),
42
48
  ...A(t),
43
- ...T(n),
44
- ...d(e),
45
- ...p(l)
49
+ ...T(e),
50
+ ...$(s)
46
51
  ];
47
52
  }
48
- function I(t) {
49
- const n = f(t);
50
- return a.includes(n) ? `d-stack--gap-${n}` : null;
53
+ function v(n) {
54
+ const t = i(n);
55
+ return f.includes(t) ? `d-stack--gap-${t}` : null;
56
+ }
57
+ function I(n) {
58
+ const t = i(n);
59
+ return g.includes(t) ? `d-stack--align-${t}` : null;
51
60
  }
52
- function K(t) {
53
- const n = f(t);
54
- return g.includes(n) ? `d-stack--align-${n}` : null;
61
+ function C(n) {
62
+ return {
63
+ "space-around": "around",
64
+ "space-between": "between",
65
+ "space-evenly": "evenly"
66
+ }[n] || n;
55
67
  }
56
- function j(t) {
57
- const n = f(t);
58
- return C.includes(n) ? `d-stack--justify-${n}` : null;
68
+ function J(n) {
69
+ const t = i(n), e = C(t);
70
+ return d.includes(t) ? `d-stack--justify-${e}` : null;
59
71
  }
60
72
  export {
61
- K as getDefaultAlignClass,
62
- S as getDefaultDirectionClass,
63
- I as getDefaultGapClass,
64
- j as getDefaultJustifyClass,
73
+ I as getDefaultAlignClass,
74
+ m as getDefaultDirectionClass,
75
+ v as getDefaultGapClass,
76
+ J as getDefaultJustifyClass,
65
77
  R as getResponsiveClasses
66
78
  };
67
79
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","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/stack_constants';\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 return _getResponsiveClasses(justify, 'justify', DT_STACK_JUSTIFY);\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\nexport function getDefaultJustifyClass (justify) {\n const validJustify = _getDefaultValue(justify);\n return DT_STACK_JUSTIFY.includes(validJustify) ? `d-stack--justify-${validJustify}` : null;\n}"],"names":["_isDefaultDirection","direction","DT_STACK_DIRECTION","_getDefaultValue","value","_getValidDirection","defaultStyle","_getResponsiveClasses","propValue","propName","validValues","classPrefix","DT_STACK_RESPONSIVE_BREAKPOINTS","breakpoint","isValid","className","getDefaultDirectionClass","getResponsiveDirectionClasses","getResponsiveGapClasses","gap","DT_STACK_GAP","getResponsiveAlignClasses","align","DT_STACK_ALIGN","getResponsiveJustifyClasses","justify","DT_STACK_JUSTIFY","getResponsiveClasses","getDefaultGapClass","validGap","getDefaultAlignClass","validAlign","getDefaultJustifyClass","validJustify"],"mappings":";AAEA,SAASA,EAAqBC,GAAW;AACvC,SAAOA,MAAcC,EAAmB;AAC1C;AAOA,SAASC,EAAkBC,GAAO;AAChC,SAAI,OAAOA,KAAU,WAAiBA,IAClC,OAAOA,KAAU,YAAYA,MAAU,OAAaA,EAAM,UACvD;AACT;AAEA,SAASC,EAAoBJ,GAAW;AAC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1C,GAAGiB,EAAwBC,CAAG;AAAA,IAC9B,GAAGE,EAA0BC,CAAK;AAAA,IAClC,GAAGE,EAA4BC,CAAO;AAAA,EAC1C;AACA;AAEO,SAASG,EAAoBT,GAAK;AACvC,QAAMU,IAAW1B,EAAiBgB,CAAG;AACrC,SAAOC,EAAa,SAASS,CAAQ,IAAI,gBAAgBA,CAAQ,KAAK;AACxE;AAEO,SAASC,EAAsBR,GAAO;AAC3C,QAAMS,IAAa5B,EAAiBmB,CAAK;AACzC,SAAOC,EAAe,SAASQ,CAAU,IAAI,kBAAkBA,CAAU,KAAK;AAChF;AAEO,SAASC,EAAwBP,GAAS;AAC/C,QAAMQ,IAAe9B,EAAiBsB,CAAO;AAC7C,SAAOC,EAAiB,SAASO,CAAY,IAAI,oBAAoBA,CAAY,KAAK;AACxF;"}
1
+ {"version":3,"file":"utils.js","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/stack_constants';\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}"],"names":["_isDefaultDirection","direction","DT_STACK_DIRECTION","_getDefaultValue","value","_getValidDirection","defaultStyle","_getResponsiveClasses","propValue","propName","validValues","classPrefix","DT_STACK_RESPONSIVE_BREAKPOINTS","breakpoint","isValid","className","getDefaultDirectionClass","getResponsiveDirectionClasses","getResponsiveGapClasses","gap","DT_STACK_GAP","getResponsiveAlignClasses","align","DT_STACK_ALIGN","getResponsiveJustifyClasses","justify","DT_STACK_JUSTIFY","normalizedValue","_normalizeJustifyForClass","getResponsiveClasses","getDefaultGapClass","validGap","getDefaultAlignClass","validAlign","getDefaultJustifyClass","validJustify","normalizedJustify"],"mappings":";AAEA,SAASA,EAAqBC,GAAW;AACvC,SAAOA,MAAcC,EAAmB;AAC1C;AAOA,SAASC,EAAkBC,GAAO;AAChC,SAAI,OAAOA,KAAU,WAAiBA,IAClC,OAAOA,KAAU,YAAYA,MAAU,OAAaA,EAAM,UACvD;AACT;AAEA,SAASC,EAAoBJ,GAAW;AACtC,MAAI,OAAOA,KAAc;AACvB,WAAQD,EAAoBC,CAAS,IAAoC,OAAhCC,EAAmBD,CAAS;AAChE,MAAI,OAAOA,KAAc,UAAU;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e,KAAK;AAAA,EACzE,CAAC;AACH;AAEO,SAASE,EAAsB5B,GAAWkB,GAAKG,GAAOG,GAAS;AACpE,SAAO;AAAA,IACL,GAAGR,EAA8BhB,CAAS;AAAA,IAC1C,GAAGiB,EAAwBC,CAAG;AAAA,IAC9B,GAAGE,EAA0BC,CAAK;AAAA,IAClC,GAAGE,EAA4BC,CAAO;AAAA,EAC1C;AACA;AAEO,SAASK,EAAoBX,GAAK;AACvC,QAAMY,IAAW5B,EAAiBgB,CAAG;AACrC,SAAOC,EAAa,SAASW,CAAQ,IAAI,gBAAgBA,CAAQ,KAAK;AACxE;AAEO,SAASC,EAAsBV,GAAO;AAC3C,QAAMW,IAAa9B,EAAiBmB,CAAK;AACzC,SAAOC,EAAe,SAASU,CAAU,IAAI,kBAAkBA,CAAU,KAAK;AAChF;AASA,SAASL,EAA2BxB,GAAO;AAMzC,SALqB;AAAA,IACnB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,EACpB,EACsBA,CAAK,KAAKA;AAChC;AAEO,SAAS8B,EAAwBT,GAAS;AAC/C,QAAMU,IAAehC,EAAiBsB,CAAO,GACvCW,IAAoBR,EAA0BO,CAAY;AAChE,SAAOT,EAAiB,SAASS,CAAY,IAAI,oBAAoBC,CAAiB,KAAK;AAC7F;"}
@@ -86,6 +86,8 @@ DIALTONE_EMOJI_PICKER_TABSET_CUSTOM_LABEL = Custom
86
86
 
87
87
  DIALTONE_FEED_ITEM_PILL_ARIA_LABEL = Click to expand
88
88
 
89
+ DIALTONE_FILTER_PILL_CLEAR_BUTTON_LABEL = Clear filter
90
+
89
91
  DIALTONE_GENERAL_ROW_ACTIVE_VOICE_CHAT_TEXT = Active voice chat
90
92
  DIALTONE_GENERAL_ROW_CALL_BUTTON_TOOLTIP = Call
91
93
  DIALTONE_GENERAL_ROW_DND_TEXT_TOOLTIP = Do not disturb