@dialpad/dialtone 9.111.1 → 9.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dialtone-default-theme.css +143 -112
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +143 -112
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +12060 -12060
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -5
- package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
- package/dist/vue2/lib/root-layout/root-layout.cjs.map +1 -1
- package/dist/vue2/lib/root-layout/root-layout.js +10 -7
- package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
- package/dist/vue2/types/components/root_layout/root_layout.vue.d.ts +1 -0
- package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/common/mixins/input.cjs +1 -1
- package/dist/vue3/common/mixins/input.cjs.map +1 -1
- package/dist/vue3/common/mixins/input.js +12 -16
- package/dist/vue3/common/mixins/input.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -4
- package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
- package/dist/vue3/lib/checkbox/checkbox.cjs +1 -1
- package/dist/vue3/lib/checkbox/checkbox.cjs.map +1 -1
- package/dist/vue3/lib/checkbox/checkbox.js +8 -1
- package/dist/vue3/lib/checkbox/checkbox.js.map +1 -1
- package/dist/vue3/lib/checkbox-group/checkbox-group.cjs +1 -1
- package/dist/vue3/lib/checkbox-group/checkbox-group.cjs.map +1 -1
- package/dist/vue3/lib/checkbox-group/checkbox-group.js +15 -11
- package/dist/vue3/lib/checkbox-group/checkbox-group.js.map +1 -1
- package/dist/vue3/lib/editor/editor.cjs +1 -1
- package/dist/vue3/lib/editor/editor.cjs.map +1 -1
- package/dist/vue3/lib/editor/editor.js +22 -16
- package/dist/vue3/lib/editor/editor.js.map +1 -1
- package/dist/vue3/lib/radio/radio.cjs +1 -1
- package/dist/vue3/lib/radio/radio.cjs.map +1 -1
- package/dist/vue3/lib/radio/radio.js +16 -9
- package/dist/vue3/lib/radio/radio.js.map +1 -1
- package/dist/vue3/lib/radio-group/radio-group.cjs +1 -1
- package/dist/vue3/lib/radio-group/radio-group.cjs.map +1 -1
- package/dist/vue3/lib/radio-group/radio-group.js +12 -5
- package/dist/vue3/lib/radio-group/radio-group.js.map +1 -1
- package/dist/vue3/lib/root-layout/root-layout.cjs +1 -1
- package/dist/vue3/lib/root-layout/root-layout.cjs.map +1 -1
- package/dist/vue3/lib/root-layout/root-layout.js +21 -18
- package/dist/vue3/lib/root-layout/root-layout.js.map +1 -1
- package/dist/vue3/lib/select-menu/select-menu.cjs +1 -1
- package/dist/vue3/lib/select-menu/select-menu.cjs.map +1 -1
- package/dist/vue3/lib/select-menu/select-menu.js +20 -13
- package/dist/vue3/lib/select-menu/select-menu.js.map +1 -1
- package/dist/vue3/lib/toggle/toggle.cjs +1 -1
- package/dist/vue3/lib/toggle/toggle.cjs.map +1 -1
- package/dist/vue3/lib/toggle/toggle.js +33 -29
- package/dist/vue3/lib/toggle/toggle.js.map +1 -1
- package/dist/vue3/types/common/mixins/input.d.ts +2 -5
- package/dist/vue3/types/common/mixins/input.d.ts.map +1 -1
- package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts +4 -6
- package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/checkbox_group/checkbox_group.vue.d.ts +5 -4
- package/dist/vue3/types/components/input/input.vue.d.ts +2 -2
- package/dist/vue3/types/components/radio/radio.vue.d.ts +4 -6
- package/dist/vue3/types/components/radio/radio.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/radio_group/radio_group.vue.d.ts +5 -4
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -2
- package/dist/vue3/types/components/root_layout/root_layout.vue.d.ts +1 -0
- package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts +2 -1
- package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toggle/toggle.vue.d.ts +5 -4
- package/dist/vue3/types/components/toggle/toggle.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +5 -4
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../callbar-button/callbar-button.cjs"),s=require("../dropdown/dropdown.cjs"),d=require("../button/button.cjs"),u=require("../callbar-button/callbar-button-constants.cjs"),c={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:i.default,DtDropdown:s.default,DtButton:d.default,DtIconChevronUp:l.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},arrowButtonLabel:{type:String,required:!0,validator:e=>!!e},placement:{type:String,default:"top"},fallbackPlacements:{type:Array,default:()=>["auto"]},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>u.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showDropdown(){return!this.openDropdown||this.open?(this.syncOpenState(),!1):this.toggleOpen()}},mounted(){n.warnIfUnmounted(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var p=function(){var t=this,o=t._self._c;return o("div",{staticClass:"dt-recipe--callbar-button-with-dropdown"},[o("dt-recipe-callbar-button",{staticClass:"dt-recipe--callbar-button-with-dropdown--main-button",attrs:{active:t.active,"aria-label":t.ariaLabel,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,danger:t.danger,disabled:t.disabled,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"text-class":t.textClass,"tooltip-delay":t.tooltipDelay,"tooltip-text":t.tooltipText},on:{click:t.buttonClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"tooltip",fn:function(){return[t._t("tooltip")]},proxy:!0}],null,!0)},[t._t("default")],2),t.showArrowButton?o("dt-dropdown",t._b({staticClass:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",attrs:{id:t.id,"fallback-placements":t.fallbackPlacements,open:t.open,placement:t.placement,padding:"none"},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",{class:["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!t.isCompactMode}],attrs:{active:t.open,"aria-label":t.arrowButtonLabel,circle:"",importance:"clear",size:"lg",width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"dt-recipe--callbar-button-with-dropdown--arrow__icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,887776886)})]},proxy:!0},{key:"list",fn:function({close:r}){return[t._t("list",null,{close:r})]}}],null,!0)},"dt-dropdown",t.$attrs,!1)):t._e()],1)},f=[],b=a.n(c,p,f);const h=b.exports;exports.default=h;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i=require("../callbar-button/callbar-button.cjs"),s=require("../dropdown/dropdown.cjs"),d=require("../button/button.cjs"),u=require("../callbar-button/callbar-button-constants.cjs"),c={name:"DtRecipeCallbarButtonWithDropdown",components:{DtRecipeCallbarButton:i.default,DtDropdown:s.default,DtButton:d.default,DtIconChevronUp:l.DtIconChevronUp},inheritAttrs:!1,props:{id:{type:String,default(){return n.default.getUniqueString()}},ariaLabel:{type:String,default:null,validator:e=>e||(void 0).$slots.default},arrowButtonLabel:{type:String,required:!0,validator:e=>!!e},placement:{type:String,default:"top"},fallbackPlacements:{type:Array,default:()=>["auto"]},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:e=>u.CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(e)},invertedTooltip:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:null},tooltipText:{type:String,default:void 0},tooltipDelay:{type:Boolean,default:void 0}},emits:["arrow-click","click","opened"],data(){return{open:!1}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showDropdown(){return!this.openDropdown||this.open?(this.syncOpenState(),!1):this.toggleOpen()}},mounted(){n.warnIfUnmounted(this.$el,this.$options.name)},methods:{arrowClick(e){return this.$emit("arrow-click",e),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openDropdown},buttonClick(e){this.$listeners.click?this.$emit("click",e):this.arrowClick(e)},onModalIsOpened(e){this.open=e,this.$emit("opened",e)}}};var p=function(){var t=this,o=t._self._c;return o("div",{staticClass:"dt-recipe--callbar-button-with-dropdown"},[o("dt-recipe-callbar-button",{staticClass:"dt-recipe--callbar-button-with-dropdown--main-button",attrs:{active:t.active,"aria-label":t.ariaLabel,"button-class":t.buttonClass,"button-width-size":t.buttonWidthSize,danger:t.danger,disabled:t.disabled,"inverted-tooltip":t.invertedTooltip,"show-tooltip":t.showTooltip,"text-class":t.textClass,"tooltip-delay":t.tooltipDelay,"tooltip-text":t.tooltipText},on:{click:t.buttonClick},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"tooltip",fn:function(){return[t._t("tooltip")]},proxy:!0}],null,!0)},[t._t("default")],2),t.showArrowButton?o("dt-dropdown",t._b({staticClass:"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper",attrs:{id:t.id,modal:!1,"fallback-placements":t.fallbackPlacements,open:t.open,placement:t.placement,padding:"none"},on:{opened:t.onModalIsOpened},scopedSlots:t._u([{key:"anchor",fn:function(){return[o("dt-button",{class:["dt-recipe--callbar-button-with-dropdown--arrow",{"dt-recipe--callbar-button-with-dropdown--arrow--large":!t.isCompactMode}],attrs:{active:t.open,"aria-label":t.arrowButtonLabel,circle:"",importance:"clear",size:"lg",width:"2rem"},on:{click:t.arrowClick},scopedSlots:t._u([{key:"icon",fn:function(){return[o("dt-icon-chevron-up",{staticClass:"dt-recipe--callbar-button-with-dropdown--arrow__icon",attrs:{size:"200"}})]},proxy:!0}],null,!1,887776886)})]},proxy:!0},{key:"list",fn:function({close:r}){return[t._t("list",null,{close:r})]}}],null,!0)},"dt-dropdown",t.$attrs,!1)):t._e()],1)},f=[],b=a.n(c,p,f);const h=b.exports;exports.default=h;
|
|
2
2
|
//# sourceMappingURL=callbar-button-with-dropdown.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar-button-with-dropdown.cjs","sources":["../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the dropdown displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\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 fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":"obA2EAA,EAAA,CACA,KAAA,oCAEA,WAAA,CAAA,sBAAAC,EAAA,QAAA,WAAAC,UAAAC,SAAAA,EAAAA,QAAAC,gBAAAA,EAAAA,eAAA,EAMA,aAAA,GAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CACA,OAAAC,EAAAA,QAAA,iBACA,CACA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAC,GACAA,GAAAC,SAAA,OAAA,OAEA,EAKA,iBAAA,CAC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A,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
|
|
1
|
+
{"version":3,"file":"callbar-button-with-dropdown.cjs","sources":["../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the dropdown displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\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 fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":"obA4EAA,EAAA,CACA,KAAA,oCAEA,WAAA,CAAA,sBAAAC,EAAA,QAAA,WAAAC,UAAAC,SAAAA,EAAAA,QAAAC,gBAAAA,EAAAA,eAAA,EAMA,aAAA,GAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CACA,OAAAC,EAAAA,QAAA,iBACA,CACA,EAKA,UAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAC,GACAA,GAAAC,SAAA,OAAA,OAEA,EAKA,iBAAA,CACA,KAAA,OACA,SAAA,GACA,UAAAD,GACA,CAAA,CAAAA,CAEA,EAUA,UAAA,CACA,KAAA,OACA,QAAA,KACA,EAYA,mBAAA,CACA,KAAA,MACA,QAAA,IACA,CAAA,MAAA,CAEA,EAOA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,eAAA,CACA,KAAA,QACA,QAAA,EACA,EAQA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAQA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,UAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAE,GAAAC,kCAAA,SAAAD,CAAA,CACA,EAMA,gBAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,YAAA,CACA,KAAA,QACA,QAAA,IACA,EAKA,YAAA,CACA,KAAA,OACA,QAAA,MACA,EAMA,aAAA,CACA,KAAA,QACA,QAAA,MACA,CACA,EAEA,MAAA,CAIA,cAQA,QAKA,QACA,EAEA,MAAA,CACA,MAAA,CACA,KAAA,EACA,CACA,EAEA,SAAA,CACA,iBAAA,CACA,OAAA,KAAA,gBAAA,CAAA,KAAA,QACA,EAEA,eAAA,CACA,OAAA,KAAA,kBAAA,MAAA,KAAA,kBAAA,IACA,EAEA,cAAA,CACA,MAAA,CAAA,KAAA,cAAA,KAAA,MACA,KAAA,cAAA,EACA,IAGA,KAAA,YACA,CACA,EAEA,SAAA,CACAE,EAAA,gBAAA,KAAA,IAAA,KAAA,SAAA,IAAA,CACA,EAEA,QAAA,CACA,WAAAC,EAAA,CACA,YAAA,MAAA,cAAAA,CAAA,EACA,KAAA,YACA,EAEA,YAAA,CACA,OAAA,KAAA,KAAA,CAAA,KAAA,IACA,EAEA,eAAA,CACA,KAAA,KAAA,KAAA,YACA,EAEA,YAAAA,EAAA,CAGA,KAAA,WAAA,MAGA,KAAA,MAAA,QAAAA,CAAA,EAFA,KAAA,WAAAA,CAAA,CAIA,EAEA,gBAAAC,EAAA,CACA,KAAA,KAAAA,EACA,KAAA,MAAA,SAAAA,CAAA,CACA,CACA,CAEA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DtIconChevronUp as r } from "@dialpad/dialtone-icons/vue2";
|
|
2
|
-
import a, { warnIfUnmounted as
|
|
3
|
-
import { n as
|
|
2
|
+
import a, { warnIfUnmounted as l } from "../../common/utils/index.js";
|
|
3
|
+
import { n as i } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
|
|
4
4
|
import s from "../callbar-button/callbar-button.js";
|
|
5
5
|
import d from "../dropdown/dropdown.js";
|
|
6
6
|
import p from "../button/button.js";
|
|
@@ -192,7 +192,7 @@ const u = {
|
|
|
192
192
|
}
|
|
193
193
|
},
|
|
194
194
|
mounted() {
|
|
195
|
-
|
|
195
|
+
l(this.$el, this.$options.name);
|
|
196
196
|
},
|
|
197
197
|
methods: {
|
|
198
198
|
arrowClick(e) {
|
|
@@ -218,7 +218,7 @@ var f = function() {
|
|
|
218
218
|
return [t._t("icon")];
|
|
219
219
|
}, proxy: !0 }, { key: "tooltip", fn: function() {
|
|
220
220
|
return [t._t("tooltip")];
|
|
221
|
-
}, proxy: !0 }], null, !0) }, [t._t("default")], 2), t.showArrowButton ? o("dt-dropdown", t._b({ staticClass: "dt-recipe--callbar-button-with-dropdown--dropdown-wrapper", attrs: { id: t.id, "fallback-placements": t.fallbackPlacements, open: t.open, placement: t.placement, padding: "none" }, on: { opened: t.onModalIsOpened }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
221
|
+
}, proxy: !0 }], null, !0) }, [t._t("default")], 2), t.showArrowButton ? o("dt-dropdown", t._b({ staticClass: "dt-recipe--callbar-button-with-dropdown--dropdown-wrapper", attrs: { id: t.id, modal: !1, "fallback-placements": t.fallbackPlacements, open: t.open, placement: t.placement, padding: "none" }, on: { opened: t.onModalIsOpened }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
222
222
|
return [o("dt-button", { class: [
|
|
223
223
|
"dt-recipe--callbar-button-with-dropdown--arrow",
|
|
224
224
|
{ "dt-recipe--callbar-button-with-dropdown--arrow--large": !t.isCompactMode }
|
|
@@ -228,7 +228,7 @@ var f = function() {
|
|
|
228
228
|
}, proxy: !0 }, { key: "list", fn: function({ close: n }) {
|
|
229
229
|
return [t._t("list", null, { close: n })];
|
|
230
230
|
} }], null, !0) }, "dt-dropdown", t.$attrs, !1)) : t._e()], 1);
|
|
231
|
-
}, h = [], w = /* @__PURE__ */
|
|
231
|
+
}, h = [], w = /* @__PURE__ */ i(
|
|
232
232
|
u,
|
|
233
233
|
f,
|
|
234
234
|
h
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar-button-with-dropdown.js","sources":["../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the dropdown displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\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 fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;AA2EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,iBAAAC,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAD,MACA,CAAA,CAAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AA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AA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,kBAAA;AACA,aAAA,KAAA,kBAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,oBAAA,QAAA,KAAA,oBAAA;AAAA,IACA;AAAA,IAEA,eAAA;AACA,aAAA,CAAA,KAAA,gBAAA,KAAA,QACA,KAAA,cAAA,GACA,MAGA,KAAA;IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAAE,EAAA,KAAA,KAAA,KAAA,SAAA,IAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAC,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"callbar-button-with-dropdown.js","sources":["../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-recipe--callbar-button-with-dropdown\"\n >\n <dt-recipe-callbar-button\n :active=\"active\"\n :aria-label=\"ariaLabel\"\n :button-class=\"buttonClass\"\n :button-width-size=\"buttonWidthSize\"\n :danger=\"danger\"\n :disabled=\"disabled\"\n :inverted-tooltip=\"invertedTooltip\"\n :show-tooltip=\"showTooltip\"\n :text-class=\"textClass\"\n :tooltip-delay=\"tooltipDelay\"\n :tooltip-text=\"tooltipText\"\n class=\"dt-recipe--callbar-button-with-dropdown--main-button\"\n @click=\"buttonClick\"\n >\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #tooltip>\n <slot name=\"tooltip\" />\n </template>\n <slot />\n </dt-recipe-callbar-button>\n <dt-dropdown\n v-if=\"showArrowButton\"\n :id=\"id\"\n :modal=\"false\"\n :fallback-placements=\"fallbackPlacements\"\n :open=\"open\"\n :placement=\"placement\"\n class=\"dt-recipe--callbar-button-with-dropdown--dropdown-wrapper\"\n padding=\"none\"\n v-bind=\"$attrs\"\n @opened=\"onModalIsOpened\"\n >\n <template #anchor>\n <dt-button\n :active=\"open\"\n :aria-label=\"arrowButtonLabel\"\n :class=\"['dt-recipe--callbar-button-with-dropdown--arrow',\n { 'dt-recipe--callbar-button-with-dropdown--arrow--large': !isCompactMode }]\"\n circle\n importance=\"clear\"\n size=\"lg\"\n width=\"2rem\"\n @click=\"arrowClick\"\n >\n <template #icon>\n <dt-icon-chevron-up\n class=\"dt-recipe--callbar-button-with-dropdown--arrow__icon\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <slot\n :close=\"close\"\n name=\"list\"\n />\n </template>\n </dt-dropdown>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIconChevronUp } from '@dialpad/dialtone-icons/vue2';\nimport { DtRecipeCallbarButton, CALLBAR_BUTTON_VALID_WIDTH_SIZE } from '../callbar_button';\nimport utils, { warnIfUnmounted } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButtonWithDropdown',\n\n components: { DtRecipeCallbarButton, DtDropdown, DtButton, DtIconChevronUp },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Aria label for the arrow. Cannot be empty.\n */\n arrowButtonLabel: {\n type: String,\n required: true,\n validator: (label) => {\n return !!label;\n },\n },\n\n /**\n * The direction the dropdown displays relative to the anchor.\n * @values 'bottom', 'bottom-start', 'bottom-end',\n * 'right', 'right-start', 'right-end',\n * 'left', 'left-start', 'left-end',\n * 'top', 'top-start', 'top-end'\n * @default 'top'\n */\n placement: {\n type: String,\n default: 'top',\n },\n\n /**\n * If the dropdown does not fit in the direction described by \"placement\",\n * it will attempt to change it's direction to the \"fallbackPlacements\".\n *\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 fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Forces showing the arrow, even if the button is disabled.\n * default is false\n * @values true, false\n */\n forceShowArrow: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * Whether the tooltip has an inverted background color.\n * @values true, false\n */\n invertedTooltip: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Use this if you would like to manually override the logic for when the tooltip shows.\n * Otherwise it will just show on hover/focus.\n * @values null, true, false\n */\n showTooltip: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The message that displays in the tooltip. This will be overridden by the tooltip slot.\n */\n tooltipText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Whether there is a delay before the tooltip shows on hover/focus.\n * @values true, false\n */\n tooltipDelay: {\n type: Boolean,\n default: undefined,\n },\n },\n\n emits: [\n /**\n * Emitted when the arrow is clicked\n */\n 'arrow-click',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Emitted when modal dropdown is opened or closed.\n */\n 'opened',\n ],\n\n data () {\n return {\n open: false,\n };\n },\n\n computed: {\n showArrowButton () {\n return this.forceShowArrow || !this.disabled;\n },\n\n isCompactMode () {\n return this.buttonWidthSize === 'sm' || this.buttonWidthSize === 'md';\n },\n\n showDropdown () {\n if (!this.openDropdown || this.open) {\n this.syncOpenState();\n return false;\n }\n\n return this.toggleOpen();\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n },\n\n methods: {\n arrowClick (ev) {\n this.$emit('arrow-click', ev);\n return this.toggleOpen();\n },\n\n toggleOpen () {\n return (this.open = !this.open);\n },\n\n syncOpenState () {\n this.open = this.openDropdown;\n },\n\n buttonClick (ev) {\n // If no listener for the click event, the button click opens the dropdown\n // the same as if the arrow was clicked.\n if (!this.$listeners.click) {\n this.arrowClick(ev);\n } else {\n this.$emit('click', ev);\n }\n },\n\n onModalIsOpened (isOpened) {\n this.open = isOpened;\n this.$emit('opened', isOpened);\n },\n },\n\n};\n</script>\n"],"names":["_sfc_main","DtRecipeCallbarButton","DtDropdown","DtButton","DtIconChevronUp","utils","label","this","size","CALLBAR_BUTTON_VALID_WIDTH_SIZE","warnIfUnmounted","ev","isOpened"],"mappings":";;;;;;;AA4EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,uBAAAC,GAAA,YAAAC,GAAA,UAAAC,GAAA,iBAAAC,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAD,MACA,CAAA,CAAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MACA,CAAA,MAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MA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gBAAA,KAAA,QACA,KAAA,cAAA,GACA,MAGA,KAAA;IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAAE,EAAA,KAAA,KAAA,KAAA,SAAA,IAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAAC,GAAA;AACA,kBAAA,MAAA,eAAAA,CAAA,GACA,KAAA;IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,OAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,OAAA,KAAA;AAAA,IACA;AAAA,IAEA,YAAAA,GAAA;AAGA,MAAA,KAAA,WAAA,QAGA,KAAA,MAAA,SAAAA,CAAA,IAFA,KAAA,WAAAA,CAAA;AAAA,IAIA;AAAA,IAEA,gBAAAC,GAAA;AACA,WAAA,OAAAA,GACA,KAAA,MAAA,UAAAA,CAAA;AAAA,IACA;AAAA,EACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./root-layout-constants.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s={name:"DtRootLayout",props:{fixed:{type:Boolean,default:!0},headerClass:{type:[String,Array,Object],default:""},headerHeight:{type:String,default:"64px"},headerSticky:{type:Boolean,default:!1},contentClass:{type:[String,Array,Object],default:""},sidebarClass:{type:[String,Array,Object],default:""},sidebarWidth:{type:String,default:"256px"},sidebarPosition:{type:String,default:"left",validator:o=>Object.values(a.ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(o)},footerClass:{type:[String,Array,Object],default:""},footerHeight:{type:String,default:"64px"},responsiveBreakpoint:{type:String,default:null,validator:o=>a.ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(o)}},computed:{isInverted(){return this.sidebarPosition===a.ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT},responsiveBreakpointClass(){return this.responsiveBreakpoint?`d-root-layout__responsive--${this.responsiveBreakpoint}`:"d-root-layout__responsive--default"}}};var d=function(){var t=this,e=t._self._c;return e("div",{class:["root-layout","d-root-layout",{"d-root-layout--fixed":t.fixed,"d-root-layout--inverted":t.isInverted},t.responsiveBreakpointClass],attrs:{"data-qa":"dt-root-layout"}},[e("header",{class:["d-root-layout__header",{"d-root-layout__header--sticky":t.headerSticky},t.headerClass],attrs:{"data-qa":"dt-root-layout-header"}},[t._t("header")],2),e("aside",{ref:"root-layout-sidebar",class:["d-root-layout__sidebar",t.sidebarClass],attrs:{tabindex:"0","data-qa":"dt-root-layout-sidebar"}},[t._t("sidebar")],2),e("main",{ref:"root-layout-content",class:["d-root-layout__content",t.contentClass],attrs:{"data-qa":"dt-root-layout-content",tabindex:"0"}},[t._t("default")],2),e("footer",{class:["d-root-layout__footer",t.footerClass],attrs:{"data-qa":"dt-root-layout-footer"}},[t._t("footer")],2)])},i=[],l=r.n(s,d,i);const n=l.exports;exports.default=n;
|
|
2
2
|
//# sourceMappingURL=root-layout.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-layout.cjs","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n
|
|
1
|
+
{"version":3,"file":"root-layout.cjs","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n },\n responsiveBreakpointClass,\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n\n responsiveBreakpointClass () {\n return this.responsiveBreakpoint\n ? `d-root-layout__responsive--${this.responsiveBreakpoint}`\n : 'd-root-layout__responsive--default';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","s","ROOT_LAYOUT_SIDEBAR_POSITIONS","bp","ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS"],"mappings":"mNAwDAA,EAAA,CACA,KAAA,eAEA,MAAA,CAMA,MAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,OACA,QAAA,MACA,EAMA,aAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,OACA,QAAA,OACA,EAOA,gBAAA,CACA,KAAA,OACA,QAAA,OACA,UAAAC,GAAA,OAAA,OAAAC,+BAAA,EAAA,SAAAD,CAAA,CACA,EAKA,YAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,aAAA,CACA,KAAA,OACA,QAAA,MACA,EAMA,qBAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAE,GAAAC,qCAAA,SAAAD,CAAA,CACA,CACA,EAEA,SAAA,CACA,YAAA,CACA,OAAA,KAAA,kBAAAD,EAAA,8BAAA,KACA,EAEA,2BAAA,CACA,OAAA,KAAA,qBACA,8BAAA,KAAA,oBAAA,GACA,oCACA,CACA,CACA"}
|
|
@@ -92,6 +92,9 @@ const d = {
|
|
|
92
92
|
computed: {
|
|
93
93
|
isInverted() {
|
|
94
94
|
return this.sidebarPosition === o.RIGHT;
|
|
95
|
+
},
|
|
96
|
+
responsiveBreakpointClass() {
|
|
97
|
+
return this.responsiveBreakpoint ? `d-root-layout__responsive--${this.responsiveBreakpoint}` : "d-root-layout__responsive--default";
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
};
|
|
@@ -102,17 +105,17 @@ var i = function() {
|
|
|
102
105
|
"d-root-layout",
|
|
103
106
|
{
|
|
104
107
|
"d-root-layout--fixed": t.fixed,
|
|
105
|
-
"d-root-layout--inverted": t.isInverted
|
|
106
|
-
|
|
107
|
-
|
|
108
|
+
"d-root-layout--inverted": t.isInverted
|
|
109
|
+
},
|
|
110
|
+
t.responsiveBreakpointClass
|
|
108
111
|
], attrs: { "data-qa": "dt-root-layout" } }, [e("header", { class: ["d-root-layout__header", { "d-root-layout__header--sticky": t.headerSticky }, t.headerClass], attrs: { "data-qa": "dt-root-layout-header" } }, [t._t("header")], 2), e("aside", { ref: "root-layout-sidebar", class: ["d-root-layout__sidebar", t.sidebarClass], attrs: { tabindex: "0", "data-qa": "dt-root-layout-sidebar" } }, [t._t("sidebar")], 2), e("main", { ref: "root-layout-content", class: ["d-root-layout__content", t.contentClass], attrs: { "data-qa": "dt-root-layout-content", tabindex: "0" } }, [t._t("default")], 2), e("footer", { class: ["d-root-layout__footer", t.footerClass], attrs: { "data-qa": "dt-root-layout-footer" } }, [t._t("footer")], 2)]);
|
|
109
|
-
},
|
|
112
|
+
}, n = [], l = /* @__PURE__ */ s(
|
|
110
113
|
d,
|
|
111
114
|
i,
|
|
112
|
-
|
|
115
|
+
n
|
|
113
116
|
);
|
|
114
|
-
const
|
|
117
|
+
const y = l.exports;
|
|
115
118
|
export {
|
|
116
|
-
|
|
119
|
+
y as default
|
|
117
120
|
};
|
|
118
121
|
//# sourceMappingURL=root-layout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-layout.js","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n
|
|
1
|
+
{"version":3,"file":"root-layout.js","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n },\n responsiveBreakpointClass,\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n\n responsiveBreakpointClass () {\n return this.responsiveBreakpoint\n ? `d-root-layout__responsive--${this.responsiveBreakpoint}`\n : 'd-root-layout__responsive--default';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","s","ROOT_LAYOUT_SIDEBAR_POSITIONS","bp","ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS"],"mappings":";;AAwDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,OAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,sBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,aAAA;AACA,aAAA,KAAA,oBAAAD,EAAA;AAAA,IACA;AAAA,IAEA,4BAAA;AACA,aAAA,KAAA,uBACA,8BAAA,KAAA,oBAAA,KACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -47,6 +47,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
47
47
|
};
|
|
48
48
|
}, {}, {}, {
|
|
49
49
|
isInverted(): boolean;
|
|
50
|
+
responsiveBreakpointClass(): string;
|
|
50
51
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, Readonly<import('vue').ExtractPropTypes<{
|
|
51
52
|
fixed: {
|
|
52
53
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbar_button_with_dropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"callbar_button_with_dropdown.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue"],"names":[],"mappings":"AAoEA;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),o=require("../constants/index.cjs"),u=require("../validators/index.cjs"),d=require("../utils/index.cjs"),n={inheritAttrs:!1,props:{label:{type:String,default:""},name:{type:String,default:""},value:{type:[String,Number,Boolean,Object],default:null},description:{type:String,default:""},disabled:{type:Boolean,default:!1},validationState:{type:String,default:"",validator:e=>e?Object.values(o.VALIDATION_MESSAGE_TYPES).includes(e):!0},inputClass:{type:[String,Array,Object],default:""},labelClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})}},data(){return{internalDisabled:this.disabled,internalValidationState:this.validationState}},watch:{disabled(e){this.internalDisabled=e},validationState(e){this.internalValidationState=e}},methods:{validateInputLabels(e,t){!e&&!t&&i.warn("You must provide an aria-label when there is no label passed",this)}}},r={
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue"),o=require("../constants/index.cjs"),u=require("../validators/index.cjs"),d=require("../utils/index.cjs"),n={inheritAttrs:!1,props:{label:{type:String,default:""},name:{type:String,default:""},value:{type:[String,Number,Boolean,Object],default:null},description:{type:String,default:""},disabled:{type:Boolean,default:!1},validationState:{type:String,default:"",validator:e=>e?Object.values(o.VALIDATION_MESSAGE_TYPES).includes(e):!0},inputClass:{type:[String,Array,Object],default:""},labelClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})}},data(){return{internalDisabled:this.disabled,internalValidationState:this.validationState}},watch:{disabled(e){this.internalDisabled=e},validationState(e){this.internalValidationState=e}},methods:{validateInputLabels(e,t){!e&&!t&&i.warn("You must provide an aria-label when there is no label passed",this)}}},r={props:{modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{type:[String,Number,Boolean],default:null}},data(){return{internalChecked:this.modelValue,internalIndeterminate:this.indeterminate}},watch:{modelValue(e){this.internalChecked=e},indeterminate(e){this.internalIndeterminate=e}}},s={inject:{groupContext:{default:{}},setGroupValue:{default:()=>()=>{}}},data(){return{internalValue:this.value}},computed:{hasGroup(){return Object.prototype.hasOwnProperty.call(this.groupContext,"name")},groupName(){var e;return((e=this.groupContext)==null?void 0:e.name)??""},groupValue(){var e;return(e=this.groupContext)==null?void 0:e.value},groupDisabled(){var e;return((e=this.groupContext)==null?void 0:e.disabled)??!1},groupValidationState(){var e;return((e=this.groupContext)==null?void 0:e.validationState)??null},internalName(){return this.name||this.groupName}},watch:{value(e){this.internalValue=e},groupValue:{immediate:!0,handler(e){this.hasGroup&&(this.internalValue=e)}},groupDisabled:{immediate:!0,handler(e){this.hasGroup&&(this.internalDisabled=this.disabled||e)}},groupValidationState:{immediate:!0,handler(e){this.hasGroup&&(this.internalValidationState=e||this.validationState)}}},created(){var a;const e=Object.prototype.hasOwnProperty.call(this.groupContext,"name"),t=(a=this.groupContext)==null?void 0:a.name;this.name&&e&&t!==this.name&&i.warn(`Component is being used inside a Group. Did you mean to override the name prop value (${t}) with (${this.name})? It is recommended to only set name at the Group level.`,this)}},l={props:{messagesClass:{type:[String,Array,Object],default:""},messagesChildProps:{type:Object,default:()=>({})},showMessages:{type:Boolean,default:!0},messages:{type:Array,default:()=>[],validator:e=>u.validationMessageValidator(e)}},computed:{formattedMessages(){return d.formatMessages(this.messages)}}},p={InputMixin:n,CheckableMixin:r,GroupableMixin:s,MessagesMixin:l};exports.CheckableMixin=r;exports.GroupableMixin=s;exports.InputMixin=n;exports.MessagesMixin=l;exports.default=p;
|
|
2
2
|
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","sources":["../../../common/mixins/input.js"],"sourcesContent":["import { warn } from 'vue';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport { validationMessageValidator } from '@/common/validators';\nimport { formatMessages } from '@/common/utils';\n\n/**\n * This mixin provides a base set of props, watchers and data attributes that are commonly used in our input components.\n * @displayName Input Mixin\n */\nexport const InputMixin = {\n inheritAttrs: false,\n\n props: {\n /**\n * A provided label for the input\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * The name of the input\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * The value of the input\n * @model value\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * Describes the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The validation state of the input\n */\n validationState: {\n type: String,\n default: '',\n validator: validationState => {\n if (!validationState) {\n return true;\n }\n\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(validationState);\n },\n },\n\n /**\n * Used to customize the input element\n */\n inputClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n data () {\n return {\n internalDisabled: this.disabled,\n internalValidationState: this.validationState,\n };\n },\n\n watch: {\n disabled (newDisabled) {\n // update internal disabled when the prop changes\n this.internalDisabled = newDisabled;\n },\n\n validationState (newValidationState) {\n // update internal validation state when the prop changes\n this.internalValidationState = newValidationState;\n },\n },\n\n methods: {\n /**\n * @param {Boolean | String} hasLabelOrLabel either a boolean indicating the label exists or the label itself\n * @param {String} ariaLabel the aria-label passed (null/undefined if it's not passed)\n */\n validateInputLabels (hasLabelOrLabel, ariaLabel) {\n if (!hasLabelOrLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our checkable inputs.\n *\n * This includes the group context, checked model & prop, internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Checkable Mixin\n */\nexport const CheckableMixin = {\n model: {\n prop: 'checked',\n },\n\n props: {\n /**\n * Used to set the state of the checkable input\n * @model checked\n */\n checked: {\n type: Boolean,\n default: false,\n },\n /**\n * Indeterminate State, toggling indeterminate checkbox will uncheck\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean],\n default: null,\n },\n },\n\n data () {\n return {\n internalChecked: this.checked,\n internalIndeterminate: this.indeterminate,\n };\n },\n\n watch: {\n checked (newChecked) {\n // update internal checked when the prop changes\n this.internalChecked = newChecked;\n },\n\n indeterminate (newValue) {\n this.internalIndeterminate = newValue;\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our groupable inputs.\n *\n * This includes the group context and internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Groupable Mixin\n */\nexport const GroupableMixin = {\n inject: {\n // Object used to pass data from the group\n groupContext: {\n default: {},\n },\n\n // Method used to update the group value\n setGroupValue: {\n default: () => { return () => {}; },\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n computed: {\n hasGroup () {\n return Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n },\n\n groupName () {\n return this.groupContext?.name ?? '';\n },\n\n groupValue () {\n return this.groupContext?.value;\n },\n\n groupDisabled () {\n return this.groupContext?.disabled ?? false;\n },\n\n groupValidationState () {\n return this.groupContext?.validationState ?? null;\n },\n\n internalName () {\n return this.name || this.groupName;\n },\n },\n\n watch: {\n value (newValue) {\n // update internal value when the prop changes\n this.internalValue = newValue;\n },\n\n groupValue: {\n immediate: true,\n handler (newGroupValue) {\n if (this.hasGroup) {\n // update internal value when the group disabled changes\n this.internalValue = newGroupValue;\n }\n },\n },\n\n groupDisabled: {\n immediate: true,\n handler (newGroupDisabled) {\n if (this.hasGroup) {\n // update internal disabled when the group disabled changes\n this.internalDisabled = this.disabled || newGroupDisabled;\n }\n },\n },\n\n groupValidationState: {\n immediate: true,\n handler (newGroupValidationState) {\n if (this.hasGroup) {\n // update internal validation state when the group validation state changes\n this.internalValidationState = newGroupValidationState || this.validationState;\n }\n },\n },\n },\n\n created () {\n const hasGroupName = Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n const reactiveGroupName = this.groupContext?.name;\n\n if (!!this.name && hasGroupName && reactiveGroupName !== this.name) {\n warn(\n 'Component is being used inside a Group. Did you mean to override the name prop value ' +\n `(${reactiveGroupName}) with (${this.name})? It is recommended to only set name at the Group level.`,\n this,\n );\n }\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our validation messages inputs.\n * @displayName Messages Mixin\n */\nexport const MessagesMixin = {\n props: {\n /**\n * Used to customize the validation messages component\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the validation messages component\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Used to hide / show the validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => {\n return validationMessageValidator(messages);\n },\n },\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n },\n};\n\nexport default {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n};\n"],"names":["InputMixin","validationState","VALIDATION_MESSAGE_TYPES","newDisabled","newValidationState","hasLabelOrLabel","ariaLabel","warn","CheckableMixin","newChecked","newValue","GroupableMixin","_a","newGroupValue","newGroupDisabled","newGroupValidationState","hasGroupName","reactiveGroupName","MessagesMixin","messages","validationMessageValidator","formatMessages","input"],"mappings":"4OASaA,EAAa,CACxB,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAKD,KAAM,CACJ,KAAM,OACN,QAAS,EACV,EAMD,MAAO,CACL,KAAM,CAAC,OAAQ,OAAQ,QAAS,MAAM,EACtC,QAAS,IACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,SAAU,CACR,KAAM,QACN,QAAS,EACV,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EACV,EAKD,SAAU,CACR,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAQ,CAE7C,CACF,EAED,SAAU,CACR,mBAAqB,CACnB,OAAOE,EAAc,eAAC,KAAK,QAAQ,CACpC,CACF,CACH,EAEeC,EAAA,CACb,WAAAtB,EACA,eAAAQ,EACA,eAAAG,EACA,cAAAO,CACF"}
|
|
1
|
+
{"version":3,"file":"input.cjs","sources":["../../../common/mixins/input.js"],"sourcesContent":["import { warn } from 'vue';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport { validationMessageValidator } from '@/common/validators';\nimport { formatMessages } from '@/common/utils';\n\n/**\n * This mixin provides a base set of props, watchers and data attributes that are commonly used in our input components.\n * @displayName Input Mixin\n */\nexport const InputMixin = {\n inheritAttrs: false,\n\n props: {\n /**\n * A provided label for the input\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * The name of the input\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * Describes the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The validation state of the input\n */\n validationState: {\n type: String,\n default: '',\n validator: validationState => {\n if (!validationState) {\n return true;\n }\n\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(validationState);\n },\n },\n\n /**\n * Used to customize the input element\n */\n inputClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n data () {\n return {\n internalDisabled: this.disabled,\n internalValidationState: this.validationState,\n };\n },\n\n watch: {\n disabled (newDisabled) {\n // update internal disabled when the prop changes\n this.internalDisabled = newDisabled;\n },\n\n validationState (newValidationState) {\n // update internal validation state when the prop changes\n this.internalValidationState = newValidationState;\n },\n },\n\n methods: {\n /**\n * @param {Boolean | String} hasLabelOrLabel either a boolean indicating the label exists or the label itself\n * @param {String} ariaLabel the aria-label passed (null/undefined if it's not passed)\n */\n validateInputLabels (hasLabelOrLabel, ariaLabel) {\n if (!hasLabelOrLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our checkable inputs.\n *\n * This includes the group context, checked model & prop, internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Checkable Mixin\n */\nexport const CheckableMixin = {\n props: {\n /**\n * Used to set the checked state of the checkable input\n * @model modelValue\n */\n modelValue: {\n type: Boolean,\n default: false,\n },\n /**\n * Indeterminate State, toggling indeterminate checkbox will uncheck\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean],\n default: null,\n },\n },\n\n data () {\n return {\n internalChecked: this.modelValue,\n internalIndeterminate: this.indeterminate,\n };\n },\n\n watch: {\n modelValue (newChecked) {\n // update internal checked when the prop changes\n this.internalChecked = newChecked;\n },\n\n indeterminate (newValue) {\n this.internalIndeterminate = newValue;\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our groupable inputs.\n *\n * This includes the group context and internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Groupable Mixin\n */\nexport const GroupableMixin = {\n inject: {\n // Object used to pass data from the group\n groupContext: {\n default: {},\n },\n\n // Method used to update the group value\n setGroupValue: {\n default: () => { return () => {}; },\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n computed: {\n hasGroup () {\n return Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n },\n\n groupName () {\n return this.groupContext?.name ?? '';\n },\n\n groupValue () {\n return this.groupContext?.value;\n },\n\n groupDisabled () {\n return this.groupContext?.disabled ?? false;\n },\n\n groupValidationState () {\n return this.groupContext?.validationState ?? null;\n },\n\n internalName () {\n return this.name || this.groupName;\n },\n },\n\n watch: {\n value (newValue) {\n // update internal value when the prop changes\n this.internalValue = newValue;\n },\n\n groupValue: {\n immediate: true,\n handler (newGroupValue) {\n if (this.hasGroup) {\n // update internal value when the group disabled changes\n this.internalValue = newGroupValue;\n }\n },\n },\n\n groupDisabled: {\n immediate: true,\n handler (newGroupDisabled) {\n if (this.hasGroup) {\n // update internal disabled when the group disabled changes\n this.internalDisabled = this.disabled || newGroupDisabled;\n }\n },\n },\n\n groupValidationState: {\n immediate: true,\n handler (newGroupValidationState) {\n if (this.hasGroup) {\n // update internal validation state when the group validation state changes\n this.internalValidationState = newGroupValidationState || this.validationState;\n }\n },\n },\n },\n\n created () {\n const hasGroupName = Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n const reactiveGroupName = this.groupContext?.name;\n\n if (!!this.name && hasGroupName && reactiveGroupName !== this.name) {\n warn(\n 'Component is being used inside a Group. Did you mean to override the name prop value ' +\n `(${reactiveGroupName}) with (${this.name})? It is recommended to only set name at the Group level.`,\n this,\n );\n }\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our validation messages inputs.\n * @displayName Messages Mixin\n */\nexport const MessagesMixin = {\n props: {\n /**\n * Used to customize the validation messages component\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the validation messages component\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Used to hide / show the validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => {\n return validationMessageValidator(messages);\n },\n },\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n },\n};\n\nexport default {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n};\n"],"names":["InputMixin","validationState","VALIDATION_MESSAGE_TYPES","newDisabled","newValidationState","hasLabelOrLabel","ariaLabel","warn","CheckableMixin","newChecked","newValue","GroupableMixin","_a","newGroupValue","newGroupDisabled","newGroupValidationState","hasGroupName","reactiveGroupName","MessagesMixin","messages","validationMessageValidator","formatMessages","input"],"mappings":"4OASaA,EAAa,CACxB,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAKD,KAAM,CACJ,KAAM,OACN,QAAS,EACV,EAKD,MAAO,CACL,KAAM,CAAC,OAAQ,OAAQ,QAAS,MAAM,EACtC,QAAS,IACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,SAAU,CACR,KAAM,QACN,QAAS,EACV,EAKD,gBAAiB,CACf,KAAM,OACN,QAAS,GACT,UAAWC,GACJA,EAIE,OAAO,OAAOC,EAAAA,wBAAwB,EAAE,SAASD,CAAe,EAH9D,EAKZ,EAKD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,gBAAiB,CACf,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAKD,sBAAuB,CACrB,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,CACF,EAED,MAAQ,CACN,MAAO,CACL,iBAAkB,KAAK,SACvB,wBAAyB,KAAK,eACpC,CACG,EAED,MAAO,CACL,SAAUE,EAAa,CAErB,KAAK,iBAAmBA,CACzB,EAED,gBAAiBC,EAAoB,CAEnC,KAAK,wBAA0BA,CAChC,CACF,EAED,QAAS,CAKP,oBAAqBC,EAAiBC,EAAW,CAC3C,CAACD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,EAED,qBAAsB,CACpB,UAAW,GACX,QAASC,EAAyB,CAC5B,KAAK,WAEP,KAAK,wBAA0BA,GAA2B,KAAK,gBAElE,CACF,CACF,EAED,SAAW,OACT,MAAMC,EAAe,OAAO,UAAU,eAAe,KAAK,KAAK,aAAc,MAAM,EAC7EC,GAAoBL,EAAA,KAAK,eAAL,YAAAA,EAAmB,KAEvC,KAAK,MAAQI,GAAgBC,IAAsB,KAAK,MAC5DV,EAAI,KACF,yFACIU,CAAiB,WAAW,KAAK,IAAI,4DACzC,IACR,CAEG,CACH,EAMaC,EAAgB,CAC3B,MAAO,CAIL,cAAe,CACb,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,mBAAoB,CAClB,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,SAAU,CACR,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAQ,CAE7C,CACF,EAED,SAAU,CACR,mBAAqB,CACnB,OAAOE,EAAc,eAAC,KAAK,QAAQ,CACpC,CACF,CACH,EAEeC,EAAA,CACb,WAAAtB,EACA,eAAAQ,EACA,eAAAG,EACA,cAAAO,CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { warn as i } from "vue";
|
|
2
2
|
import { VALIDATION_MESSAGE_TYPES as r } from "../constants/index.js";
|
|
3
3
|
import { validationMessageValidator as n } from "../validators/index.js";
|
|
4
|
-
import { formatMessages as
|
|
5
|
-
const
|
|
4
|
+
import { formatMessages as l } from "../utils/index.js";
|
|
5
|
+
const s = {
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
props: {
|
|
8
8
|
/**
|
|
@@ -21,7 +21,6 @@ const l = {
|
|
|
21
21
|
},
|
|
22
22
|
/**
|
|
23
23
|
* The value of the input
|
|
24
|
-
* @model value
|
|
25
24
|
*/
|
|
26
25
|
value: {
|
|
27
26
|
type: [String, Number, Boolean, Object],
|
|
@@ -112,15 +111,12 @@ const l = {
|
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
}, o = {
|
|
115
|
-
model: {
|
|
116
|
-
prop: "checked"
|
|
117
|
-
},
|
|
118
114
|
props: {
|
|
119
115
|
/**
|
|
120
|
-
* Used to set the state of the checkable input
|
|
121
|
-
* @model
|
|
116
|
+
* Used to set the checked state of the checkable input
|
|
117
|
+
* @model modelValue
|
|
122
118
|
*/
|
|
123
|
-
|
|
119
|
+
modelValue: {
|
|
124
120
|
type: Boolean,
|
|
125
121
|
default: !1
|
|
126
122
|
},
|
|
@@ -141,12 +137,12 @@ const l = {
|
|
|
141
137
|
},
|
|
142
138
|
data() {
|
|
143
139
|
return {
|
|
144
|
-
internalChecked: this.
|
|
140
|
+
internalChecked: this.modelValue,
|
|
145
141
|
internalIndeterminate: this.indeterminate
|
|
146
142
|
};
|
|
147
143
|
},
|
|
148
144
|
watch: {
|
|
149
|
-
|
|
145
|
+
modelValue(e) {
|
|
150
146
|
this.internalChecked = e;
|
|
151
147
|
},
|
|
152
148
|
indeterminate(e) {
|
|
@@ -260,11 +256,11 @@ const l = {
|
|
|
260
256
|
},
|
|
261
257
|
computed: {
|
|
262
258
|
formattedMessages() {
|
|
263
|
-
return
|
|
259
|
+
return l(this.messages);
|
|
264
260
|
}
|
|
265
261
|
}
|
|
266
|
-
},
|
|
267
|
-
InputMixin:
|
|
262
|
+
}, c = {
|
|
263
|
+
InputMixin: s,
|
|
268
264
|
CheckableMixin: o,
|
|
269
265
|
GroupableMixin: u,
|
|
270
266
|
MessagesMixin: d
|
|
@@ -272,8 +268,8 @@ const l = {
|
|
|
272
268
|
export {
|
|
273
269
|
o as CheckableMixin,
|
|
274
270
|
u as GroupableMixin,
|
|
275
|
-
|
|
271
|
+
s as InputMixin,
|
|
276
272
|
d as MessagesMixin,
|
|
277
|
-
|
|
273
|
+
c as default
|
|
278
274
|
};
|
|
279
275
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../common/mixins/input.js"],"sourcesContent":["import { warn } from 'vue';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport { validationMessageValidator } from '@/common/validators';\nimport { formatMessages } from '@/common/utils';\n\n/**\n * This mixin provides a base set of props, watchers and data attributes that are commonly used in our input components.\n * @displayName Input Mixin\n */\nexport const InputMixin = {\n inheritAttrs: false,\n\n props: {\n /**\n * A provided label for the input\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * The name of the input\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * The value of the input\n * @model value\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * Describes the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The validation state of the input\n */\n validationState: {\n type: String,\n default: '',\n validator: validationState => {\n if (!validationState) {\n return true;\n }\n\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(validationState);\n },\n },\n\n /**\n * Used to customize the input element\n */\n inputClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n data () {\n return {\n internalDisabled: this.disabled,\n internalValidationState: this.validationState,\n };\n },\n\n watch: {\n disabled (newDisabled) {\n // update internal disabled when the prop changes\n this.internalDisabled = newDisabled;\n },\n\n validationState (newValidationState) {\n // update internal validation state when the prop changes\n this.internalValidationState = newValidationState;\n },\n },\n\n methods: {\n /**\n * @param {Boolean | String} hasLabelOrLabel either a boolean indicating the label exists or the label itself\n * @param {String} ariaLabel the aria-label passed (null/undefined if it's not passed)\n */\n validateInputLabels (hasLabelOrLabel, ariaLabel) {\n if (!hasLabelOrLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our checkable inputs.\n *\n * This includes the group context, checked model & prop, internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Checkable Mixin\n */\nexport const CheckableMixin = {\n model: {\n prop: 'checked',\n },\n\n props: {\n /**\n * Used to set the state of the checkable input\n * @model checked\n */\n checked: {\n type: Boolean,\n default: false,\n },\n /**\n * Indeterminate State, toggling indeterminate checkbox will uncheck\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean],\n default: null,\n },\n },\n\n data () {\n return {\n internalChecked: this.checked,\n internalIndeterminate: this.indeterminate,\n };\n },\n\n watch: {\n checked (newChecked) {\n // update internal checked when the prop changes\n this.internalChecked = newChecked;\n },\n\n indeterminate (newValue) {\n this.internalIndeterminate = newValue;\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our groupable inputs.\n *\n * This includes the group context and internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Groupable Mixin\n */\nexport const GroupableMixin = {\n inject: {\n // Object used to pass data from the group\n groupContext: {\n default: {},\n },\n\n // Method used to update the group value\n setGroupValue: {\n default: () => { return () => {}; },\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n computed: {\n hasGroup () {\n return Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n },\n\n groupName () {\n return this.groupContext?.name ?? '';\n },\n\n groupValue () {\n return this.groupContext?.value;\n },\n\n groupDisabled () {\n return this.groupContext?.disabled ?? false;\n },\n\n groupValidationState () {\n return this.groupContext?.validationState ?? null;\n },\n\n internalName () {\n return this.name || this.groupName;\n },\n },\n\n watch: {\n value (newValue) {\n // update internal value when the prop changes\n this.internalValue = newValue;\n },\n\n groupValue: {\n immediate: true,\n handler (newGroupValue) {\n if (this.hasGroup) {\n // update internal value when the group disabled changes\n this.internalValue = newGroupValue;\n }\n },\n },\n\n groupDisabled: {\n immediate: true,\n handler (newGroupDisabled) {\n if (this.hasGroup) {\n // update internal disabled when the group disabled changes\n this.internalDisabled = this.disabled || newGroupDisabled;\n }\n },\n },\n\n groupValidationState: {\n immediate: true,\n handler (newGroupValidationState) {\n if (this.hasGroup) {\n // update internal validation state when the group validation state changes\n this.internalValidationState = newGroupValidationState || this.validationState;\n }\n },\n },\n },\n\n created () {\n const hasGroupName = Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n const reactiveGroupName = this.groupContext?.name;\n\n if (!!this.name && hasGroupName && reactiveGroupName !== this.name) {\n warn(\n 'Component is being used inside a Group. Did you mean to override the name prop value ' +\n `(${reactiveGroupName}) with (${this.name})? It is recommended to only set name at the Group level.`,\n this,\n );\n }\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our validation messages inputs.\n * @displayName Messages Mixin\n */\nexport const MessagesMixin = {\n props: {\n /**\n * Used to customize the validation messages component\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the validation messages component\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Used to hide / show the validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => {\n return validationMessageValidator(messages);\n },\n },\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n },\n};\n\nexport default {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n};\n"],"names":["InputMixin","validationState","VALIDATION_MESSAGE_TYPES","newDisabled","newValidationState","hasLabelOrLabel","ariaLabel","warn","CheckableMixin","newChecked","newValue","GroupableMixin","_a","newGroupValue","newGroupDisabled","newGroupValidationState","hasGroupName","reactiveGroupName","MessagesMixin","messages","validationMessageValidator","formatMessages","input"],"mappings":";;;;AASY,MAACA,IAAa;AAAA,EACxB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,QAAQ,SAAS,MAAM;AAAA,MACtC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAAC,MACJA,IAIE,OAAO,OAAOC,CAAwB,EAAE,SAASD,CAAe,IAH9D;AAAA,IAKZ;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,kBAAkB;AAAA,MAChB,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA,IAKD,uBAAuB;AAAA,MACrB,MAAM;AAAA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AAE7C,IAAM,KAAK,QAAQI,KAAgBC,MAAsB,KAAK,QAC5DV;AAAA,MACE,yFACIU,CAAiB,WAAW,KAAK,IAAI;AAAA,MACzC;AAAA,IACR;AAAA,EAEG;AACH,GAMaC,IAAgB;AAAA,EAC3B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,eAAe;AAAA,MACb,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,CAAAC,MACFC,EAA2BD,CAAQ;AAAA,IAE7C;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAOE,EAAe,KAAK,QAAQ;AAAA,IACpC;AAAA,EACF;AACH,GAEeC,IAAA;AAAA,EACb,YAAAtB;AAAA,EACA,gBAAAQ;AAAA,EACA,gBAAAG;AAAA,EACA,eAAAO;AACF;"}
|
|
1
|
+
{"version":3,"file":"input.js","sources":["../../../common/mixins/input.js"],"sourcesContent":["import { warn } from 'vue';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport { validationMessageValidator } from '@/common/validators';\nimport { formatMessages } from '@/common/utils';\n\n/**\n * This mixin provides a base set of props, watchers and data attributes that are commonly used in our input components.\n * @displayName Input Mixin\n */\nexport const InputMixin = {\n inheritAttrs: false,\n\n props: {\n /**\n * A provided label for the input\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * The name of the input\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean, Object],\n default: null,\n },\n\n /**\n * Describes the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Disables the input\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The validation state of the input\n */\n validationState: {\n type: String,\n default: '',\n validator: validationState => {\n if (!validationState) {\n return true;\n }\n\n return Object.values(VALIDATION_MESSAGE_TYPES).includes(validationState);\n },\n },\n\n /**\n * Used to customize the input element\n */\n inputClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n data () {\n return {\n internalDisabled: this.disabled,\n internalValidationState: this.validationState,\n };\n },\n\n watch: {\n disabled (newDisabled) {\n // update internal disabled when the prop changes\n this.internalDisabled = newDisabled;\n },\n\n validationState (newValidationState) {\n // update internal validation state when the prop changes\n this.internalValidationState = newValidationState;\n },\n },\n\n methods: {\n /**\n * @param {Boolean | String} hasLabelOrLabel either a boolean indicating the label exists or the label itself\n * @param {String} ariaLabel the aria-label passed (null/undefined if it's not passed)\n */\n validateInputLabels (hasLabelOrLabel, ariaLabel) {\n if (!hasLabelOrLabel && !ariaLabel) {\n warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our checkable inputs.\n *\n * This includes the group context, checked model & prop, internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Checkable Mixin\n */\nexport const CheckableMixin = {\n props: {\n /**\n * Used to set the checked state of the checkable input\n * @model modelValue\n */\n modelValue: {\n type: Boolean,\n default: false,\n },\n /**\n * Indeterminate State, toggling indeterminate checkbox will uncheck\n */\n indeterminate: {\n type: Boolean,\n default: false,\n },\n /**\n * The value of the input\n */\n value: {\n type: [String, Number, Boolean],\n default: null,\n },\n },\n\n data () {\n return {\n internalChecked: this.modelValue,\n internalIndeterminate: this.indeterminate,\n };\n },\n\n watch: {\n modelValue (newChecked) {\n // update internal checked when the prop changes\n this.internalChecked = newChecked;\n },\n\n indeterminate (newValue) {\n this.internalIndeterminate = newValue;\n },\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our groupable inputs.\n *\n * This includes the group context and internal data attributes as well as a set common computed\n * properties and watchers. It also includes the group name warning logic.\n * @displayName Groupable Mixin\n */\nexport const GroupableMixin = {\n inject: {\n // Object used to pass data from the group\n groupContext: {\n default: {},\n },\n\n // Method used to update the group value\n setGroupValue: {\n default: () => { return () => {}; },\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n computed: {\n hasGroup () {\n return Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n },\n\n groupName () {\n return this.groupContext?.name ?? '';\n },\n\n groupValue () {\n return this.groupContext?.value;\n },\n\n groupDisabled () {\n return this.groupContext?.disabled ?? false;\n },\n\n groupValidationState () {\n return this.groupContext?.validationState ?? null;\n },\n\n internalName () {\n return this.name || this.groupName;\n },\n },\n\n watch: {\n value (newValue) {\n // update internal value when the prop changes\n this.internalValue = newValue;\n },\n\n groupValue: {\n immediate: true,\n handler (newGroupValue) {\n if (this.hasGroup) {\n // update internal value when the group disabled changes\n this.internalValue = newGroupValue;\n }\n },\n },\n\n groupDisabled: {\n immediate: true,\n handler (newGroupDisabled) {\n if (this.hasGroup) {\n // update internal disabled when the group disabled changes\n this.internalDisabled = this.disabled || newGroupDisabled;\n }\n },\n },\n\n groupValidationState: {\n immediate: true,\n handler (newGroupValidationState) {\n if (this.hasGroup) {\n // update internal validation state when the group validation state changes\n this.internalValidationState = newGroupValidationState || this.validationState;\n }\n },\n },\n },\n\n created () {\n const hasGroupName = Object.prototype.hasOwnProperty.call(this.groupContext, 'name');\n const reactiveGroupName = this.groupContext?.name;\n\n if (!!this.name && hasGroupName && reactiveGroupName !== this.name) {\n warn(\n 'Component is being used inside a Group. Did you mean to override the name prop value ' +\n `(${reactiveGroupName}) with (${this.name})? It is recommended to only set name at the Group level.`,\n this,\n );\n }\n },\n};\n\n/**\n * This mixin provides common logic shared amongst our validation messages inputs.\n * @displayName Messages Mixin\n */\nexport const MessagesMixin = {\n props: {\n /**\n * Used to customize the validation messages component\n */\n messagesClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the validation messages component\n */\n messagesChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Used to hide / show the validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Validation messages\n */\n messages: {\n type: Array,\n default: () => [],\n validator: messages => {\n return validationMessageValidator(messages);\n },\n },\n },\n\n computed: {\n formattedMessages () {\n return formatMessages(this.messages);\n },\n },\n};\n\nexport default {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n};\n"],"names":["InputMixin","validationState","VALIDATION_MESSAGE_TYPES","newDisabled","newValidationState","hasLabelOrLabel","ariaLabel","warn","CheckableMixin","newChecked","newValue","GroupableMixin","_a","newGroupValue","newGroupDisabled","newGroupValidationState","hasGroupName","reactiveGroupName","MessagesMixin","messages","validationMessageValidator","formatMessages","input"],"mappings":";;;;AASY,MAACA,IAAa;AAAA,EACxB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,QAAQ,SAAS,MAAM;AAAA,MACtC,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAA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