@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,10 +1,10 @@
|
|
|
1
1
|
import { InputMixin as p, CheckableMixin as c, GroupableMixin as h, MessagesMixin as g } from "../../common/mixins/input.js";
|
|
2
2
|
import { RADIO_INPUT_VALIDATION_CLASSES as f } from "./radio-constants.js";
|
|
3
|
-
import { hasSlotContent as C, removeClassStyleAttrs as
|
|
3
|
+
import { hasSlotContent as C, removeClassStyleAttrs as V, addClassStyleAttrs as v } from "../../common/utils/index.js";
|
|
4
4
|
import { resolveComponent as b, openBlock as i, createElementBlock as o, normalizeProps as M, guardReactiveProps as S, createElementVNode as a, normalizeClass as k, mergeProps as t, toHandlers as y, renderSlot as r, createTextVNode as d, toDisplayString as l, createCommentVNode as n, createVNode as A } from "vue";
|
|
5
5
|
import { _ as D } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
import N from "../validation-messages/validation-messages.js";
|
|
7
|
-
const
|
|
7
|
+
const $ = {
|
|
8
8
|
compatConfig: { MODE: 3 },
|
|
9
9
|
name: "DtRadio",
|
|
10
10
|
components: { DtValidationMessages: N },
|
|
@@ -27,6 +27,13 @@ const P = {
|
|
|
27
27
|
* @type {String | Number}
|
|
28
28
|
*/
|
|
29
29
|
"input",
|
|
30
|
+
/**
|
|
31
|
+
* Event fired to sync the modelValue prop with the parent component
|
|
32
|
+
*
|
|
33
|
+
* @event input
|
|
34
|
+
* @type {String | Number}
|
|
35
|
+
*/
|
|
36
|
+
"update:modelValue",
|
|
30
37
|
/**
|
|
31
38
|
* Native input focus event
|
|
32
39
|
*
|
|
@@ -96,13 +103,13 @@ const P = {
|
|
|
96
103
|
}
|
|
97
104
|
},
|
|
98
105
|
methods: {
|
|
99
|
-
removeClassStyleAttrs:
|
|
100
|
-
addClassStyleAttrs:
|
|
106
|
+
removeClassStyleAttrs: V,
|
|
107
|
+
addClassStyleAttrs: v,
|
|
101
108
|
emitValue(e) {
|
|
102
|
-
e !== this.radioGroupValue && (this.setGroupValue(e), this.$emit("input", e));
|
|
109
|
+
e !== this.radioGroupValue && (this.setGroupValue(e), this.$emit("input", e), this.$emit("update:modelValue", e));
|
|
103
110
|
}
|
|
104
111
|
}
|
|
105
|
-
},
|
|
112
|
+
}, P = { class: "d-radio__input" }, _ = ["checked", "name", "value", "disabled"], G = {
|
|
106
113
|
key: 0,
|
|
107
114
|
class: "d-radio__messages",
|
|
108
115
|
"data-qa": "radio-description-messages"
|
|
@@ -113,7 +120,7 @@ function w(e, I, u, q, E, s) {
|
|
|
113
120
|
a("label", {
|
|
114
121
|
class: k(["d-radio-group", { "d-radio-group--disabled": e.internalDisabled }])
|
|
115
122
|
}, [
|
|
116
|
-
a("div",
|
|
123
|
+
a("div", P, [
|
|
117
124
|
a("input", t({
|
|
118
125
|
checked: e.internalChecked,
|
|
119
126
|
name: e.internalName,
|
|
@@ -121,7 +128,7 @@ function w(e, I, u, q, E, s) {
|
|
|
121
128
|
disabled: e.internalDisabled,
|
|
122
129
|
type: "radio",
|
|
123
130
|
class: ["d-radio", s.inputValidationClass, e.inputClass]
|
|
124
|
-
}, s.removeClassStyleAttrs(e.$attrs), y(s.inputListeners, !0)), null, 16,
|
|
131
|
+
}, s.removeClassStyleAttrs(e.$attrs), y(s.inputListeners, !0)), null, 16, _)
|
|
125
132
|
]),
|
|
126
133
|
a("div", t({
|
|
127
134
|
class: [e.labelClass, "d-radio__copy d-radio__label"]
|
|
@@ -148,7 +155,7 @@ function w(e, I, u, q, E, s) {
|
|
|
148
155
|
])) : n("", !0)
|
|
149
156
|
], 16);
|
|
150
157
|
}
|
|
151
|
-
const H = /* @__PURE__ */ D(
|
|
158
|
+
const H = /* @__PURE__ */ D($, [["render", w]]);
|
|
152
159
|
export {
|
|
153
160
|
H as default
|
|
154
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../components/radio/radio.vue"],"sourcesContent":["<template>\n <div\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n :class=\"[labelClass, 'd-radio__copy d-radio__label']\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n </label>\n <div\n v-if=\"$slots.description || description || hasMessages\"\n class=\"d-radio__messages\"\n data-qa=\"radio-description-messages\"\n >\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">\n {{ description }}\n </slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n\n hasMessages () {\n return this.formattedMessages.length && this.showMessages;\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../components/radio/radio.vue"],"sourcesContent":["<template>\n <div\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n :class=\"[labelClass, 'd-radio__copy d-radio__label']\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n </label>\n <div\n v-if=\"$slots.description || description || hasMessages\"\n class=\"d-radio__messages\"\n data-qa=\"radio-description-messages\"\n >\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">\n {{ description }}\n </slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent, removeClassStyleAttrs, addClassStyleAttrs } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n /**\n * Event fired to sync the modelValue prop with the parent component\n *\n * @event input\n * @type {String | Number}\n */\n 'update:modelValue',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n\n hasMessages () {\n return this.formattedMessages.length && this.showMessages;\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtValidationMessages","InputMixin","CheckableMixin","GroupableMixin","MessagesMixin","hasSlotContent","RADIO_INPUT_VALIDATION_CLASSES","_a","event","newRadioGroupValue","removeClassStyleAttrs","addClassStyleAttrs","value","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","$options","_ctx","_createElementVNode","_normalizeClass","_mergeProps","$props","_toHandlers","_renderSlot","_createTextVNode","_toDisplayString","_hoisted_3","_createCommentVNode","_createVNode","_component_dt_validation_messages"],"mappings":";;;;;;AAqEA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY,EAAE,sBAAAC,EAAsB;AAAA,EAEpC,QAAQ,CAACC,GAAYC,GAAgBC,GAAgBC,CAAa;AAAA,EAElE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;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AAAA,QALC,uBAAqBH,EAAiB;AAAA,QACtC,iBAAeA,EAAY;AAAA,QAC3B,OAAOA,EAAa;AAAA,SACbA,EAAkB,oBAAA,EAC1B,WAAQ,+BAA8B,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA,UA/C9CU,EAAA,IAAA,EAAA;AAAA;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../input-group/input-group.cjs"),u={compatConfig:{MODE:3},name:"DtRadioGroup",extends:a.default,props:{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../input-group/input-group.cjs"),u={compatConfig:{MODE:3},name:"DtRadioGroup",extends:a.default,props:{modelValue:{type:[String,Number],default:""},dataQaGroup:{type:String,default:"radio-group"},dataQaGroupLegend:{type:String,default:"radio-group-legend"},dataQaGroupMessages:{type:String,default:"radio-group-messages"}},emits:["input","update:modelValue"],data(){return{internalValue:this.modelValue}},watch:{modelValue(e){this.internalValue=e},internalValue:{immediate:!0,handler(e){this.provideObj.selectedValue=e}}},methods:{setGroupValue(e){this.$emit("input",e),this.$emit("update:modelValue",e)},getMessageKey(e,t){return`radio-group-message-${e}-${t}-${this.id}`}}};exports.default=u;
|
|
2
2
|
//# sourceMappingURL=radio-group.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.cjs","sources":["../../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n
|
|
1
|
+
{"version":3,"file":"radio-group.cjs","sources":["../../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * A data qa tag for the radio group\n */\n dataQaGroup: {\n type: String,\n default: 'radio-group',\n },\n\n /**\n * A data qa tag for the radio group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'radio-group-legend',\n },\n\n /**\n * A data qa tag for the radio group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'radio-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalValue: this.modelValue,\n };\n },\n\n watch: {\n modelValue (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted radios.\n * need this to pass value to slotted checkboxes if modified outside\n * radio group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.selectedValue = newInternalValue;\n },\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted radios.\n * slotted radios will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.$emit('input', newValue);\n this.$emit('update:modelValue', newValue);\n },\n\n getMessageKey (type, index) {\n return `radio-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtInputGroup","newValue","newInternalValue","type","index"],"mappings":"8JAOKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,QAASC,EAAY,QAErB,MAAO,CAKL,WAAY,CACV,KAAM,CAAC,OAAQ,MAAM,EACrB,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,aACV,EAKD,kBAAmB,CACjB,KAAM,OACN,QAAS,oBACV,EAKD,oBAAqB,CACnB,KAAM,OACN,QAAS,sBACV,CACF,EAED,MAAO,CAOL,QAOA,mBACD,EAED,MAAQ,CACN,MAAO,CACL,cAAe,KAAK,WAEvB,EAED,MAAO,CACL,WAAYC,EAAU,CACpB,KAAK,cAAgBA,CACtB,EAOD,cAAe,CACb,UAAW,GACX,QAASC,EAAkB,CACzB,KAAK,WAAW,cAAgBA,CACjC,CACF,CACF,EAED,QAAS,CAKP,cAAeD,EAAU,CACvB,KAAK,MAAM,QAASA,CAAQ,EAC5B,KAAK,MAAM,oBAAqBA,CAAQ,CACzC,EAED,cAAeE,EAAMC,EAAO,CAC1B,MAAO,uBAAuBD,CAAI,IAAIC,CAAK,IAAI,KAAK,EAAE,EACvD,CACF,CACH"}
|
|
@@ -8,7 +8,7 @@ const u = {
|
|
|
8
8
|
* A provided value for the radio group
|
|
9
9
|
* @model value
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
modelValue: {
|
|
12
12
|
type: [String, Number],
|
|
13
13
|
default: ""
|
|
14
14
|
},
|
|
@@ -41,15 +41,22 @@ const u = {
|
|
|
41
41
|
* @event input
|
|
42
42
|
* @type {String | Number}
|
|
43
43
|
*/
|
|
44
|
-
"input"
|
|
44
|
+
"input",
|
|
45
|
+
/**
|
|
46
|
+
* Native input event
|
|
47
|
+
*
|
|
48
|
+
* @event input
|
|
49
|
+
* @type {String | Number}
|
|
50
|
+
*/
|
|
51
|
+
"update:modelValue"
|
|
45
52
|
],
|
|
46
53
|
data() {
|
|
47
54
|
return {
|
|
48
|
-
internalValue: this.
|
|
55
|
+
internalValue: this.modelValue
|
|
49
56
|
};
|
|
50
57
|
},
|
|
51
58
|
watch: {
|
|
52
|
-
|
|
59
|
+
modelValue(e) {
|
|
53
60
|
this.internalValue = e;
|
|
54
61
|
},
|
|
55
62
|
/*
|
|
@@ -70,7 +77,7 @@ const u = {
|
|
|
70
77
|
* slotted radios will change this value and need to emit new value up.
|
|
71
78
|
*/
|
|
72
79
|
setGroupValue(e) {
|
|
73
|
-
this.$emit("input", e);
|
|
80
|
+
this.$emit("input", e), this.$emit("update:modelValue", e);
|
|
74
81
|
},
|
|
75
82
|
getMessageKey(e, t) {
|
|
76
83
|
return `radio-group-message-${e}-${t}-${this.id}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * A data qa tag for the radio group\n */\n dataQaGroup: {\n type: String,\n default: 'radio-group',\n },\n\n /**\n * A data qa tag for the radio group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'radio-group-legend',\n },\n\n /**\n * A data qa tag for the radio group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'radio-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'update:modelValue',\n ],\n\n data () {\n return {\n internalValue: this.modelValue,\n };\n },\n\n watch: {\n modelValue (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted radios.\n * need this to pass value to slotted checkboxes if modified outside\n * radio group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.selectedValue = newInternalValue;\n },\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted radios.\n * slotted radios will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.$emit('input', newValue);\n this.$emit('update:modelValue', newValue);\n },\n\n getMessageKey (type, index) {\n return `radio-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtInputGroup","newValue","newInternalValue","type","index"],"mappings":";AAOK,MAAAA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,SAASC;AAAA,EAET,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe,KAAK;AAAA;EAEvB;AAAA,EAED,OAAO;AAAA,IACL,WAAYC,GAAU;AACpB,WAAK,gBAAgBA;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,eAAe;AAAA,MACb,WAAW;AAAA,MACX,QAASC,GAAkB;AACzB,aAAK,WAAW,gBAAgBA;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AAAA,EAED,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,cAAeD,GAAU;AACvB,WAAK,MAAM,SAASA,CAAQ,GAC5B,KAAK,MAAM,qBAAqBA,CAAQ;AAAA,IACzC;AAAA,IAED,cAAeE,GAAMC,GAAO;AAC1B,aAAO,uBAAuBD,CAAI,IAAIC,CAAK,IAAI,KAAK,EAAE;AAAA,IACvD;AAAA,EACF;AACH;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./root-layout-constants.cjs"),e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./root-layout-constants.cjs"),e=require("vue"),s=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),l={compatConfig:{MODE:3},name:"DtRootLayout",props:{fixed:{type:Boolean,default:!0},headerClass:{type:[String,Array,Object],default:""},headerHeight:{type:String,default:"64px"},headerSticky:{type:Boolean,default:!1},bodyClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},sidebarClass:{type:[String,Array,Object],default:""},sidebarWidth:{type:String,default:"256px"},sidebarPosition:{type:String,default:"left",validator:t=>Object.values(a.ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(t)},footerClass:{type:[String,Array,Object],default:""},footerHeight:{type:String,default:"64px"},responsiveBreakpoint:{type:String,default:null,validator:t=>a.ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(t)}},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"}}};function d(t,i,o,u,y,r){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["root-layout","d-root-layout",{"d-root-layout--fixed":o.fixed,"d-root-layout--inverted":r.isInverted},r.responsiveBreakpointClass]),"data-qa":"dt-root-layout"},[e.createElementVNode("header",{class:e.normalizeClass(["d-root-layout__header",{"d-root-layout__header--sticky":o.headerSticky},o.headerClass]),"data-qa":"dt-root-layout-header"},[e.renderSlot(t.$slots,"header")],2),e.createElementVNode("aside",{ref:"root-layout-sidebar",tabindex:"0",class:e.normalizeClass(["d-root-layout__sidebar",o.sidebarClass]),"data-qa":"dt-root-layout-sidebar"},[e.renderSlot(t.$slots,"sidebar")],2),e.createElementVNode("main",{ref:"root-layout-content",class:e.normalizeClass(["d-root-layout__content",o.contentClass]),"data-qa":"dt-root-layout-content",tabindex:"0"},[e.renderSlot(t.$slots,"default")],2),e.createElementVNode("footer",{class:e.normalizeClass(["d-root-layout__footer",o.footerClass]),"data-qa":"dt-root-layout-footer"},[e.renderSlot(t.$slots,"footer")],2)],2)}const n=s._(l,[["render",d]]);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 compatConfig: { MODE: 3 },\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 body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\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","_createElementBlock","_normalizeClass","$props","$options","_createElementVNode","_renderSlot","_ctx"],"mappings":"sOAwDKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,MAAO,CAML,MAAO,CACL,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,aAAc,CACZ,KAAM,OACN,QAAS,MACV,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,aAAc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G,aAAsBC,EAAA,OAAA,QAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ROOT_LAYOUT_SIDEBAR_POSITIONS as d, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS as
|
|
2
|
-
import { openBlock as i, createElementBlock as n, normalizeClass as
|
|
1
|
+
import { ROOT_LAYOUT_SIDEBAR_POSITIONS as d, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS as l } from "./root-layout-constants.js";
|
|
2
|
+
import { openBlock as i, createElementBlock as n, normalizeClass as o, createElementVNode as a, renderSlot as r } from "vue";
|
|
3
3
|
import { _ as u } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const y = {
|
|
5
5
|
compatConfig: { MODE: 3 },
|
|
@@ -95,60 +95,63 @@ const y = {
|
|
|
95
95
|
responsiveBreakpoint: {
|
|
96
96
|
type: String,
|
|
97
97
|
default: null,
|
|
98
|
-
validator: (t) =>
|
|
98
|
+
validator: (t) => l.includes(t)
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
computed: {
|
|
102
102
|
isInverted() {
|
|
103
103
|
return this.sidebarPosition === d.RIGHT;
|
|
104
|
+
},
|
|
105
|
+
responsiveBreakpointClass() {
|
|
106
|
+
return this.responsiveBreakpoint ? `d-root-layout__responsive--${this.responsiveBreakpoint}` : "d-root-layout__responsive--default";
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
};
|
|
107
|
-
function f(t, c, e,
|
|
110
|
+
function f(t, c, e, p, _, s) {
|
|
108
111
|
return i(), n("div", {
|
|
109
|
-
class:
|
|
112
|
+
class: o([
|
|
110
113
|
"root-layout",
|
|
111
114
|
"d-root-layout",
|
|
112
115
|
{
|
|
113
116
|
"d-root-layout--fixed": e.fixed,
|
|
114
|
-
"d-root-layout--inverted":
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
"d-root-layout--inverted": s.isInverted
|
|
118
|
+
},
|
|
119
|
+
s.responsiveBreakpointClass
|
|
117
120
|
]),
|
|
118
121
|
"data-qa": "dt-root-layout"
|
|
119
122
|
}, [
|
|
120
|
-
|
|
121
|
-
class:
|
|
123
|
+
a("header", {
|
|
124
|
+
class: o(["d-root-layout__header", { "d-root-layout__header--sticky": e.headerSticky }, e.headerClass]),
|
|
122
125
|
"data-qa": "dt-root-layout-header"
|
|
123
126
|
}, [
|
|
124
127
|
r(t.$slots, "header")
|
|
125
128
|
], 2),
|
|
126
|
-
|
|
129
|
+
a("aside", {
|
|
127
130
|
ref: "root-layout-sidebar",
|
|
128
131
|
tabindex: "0",
|
|
129
|
-
class:
|
|
132
|
+
class: o(["d-root-layout__sidebar", e.sidebarClass]),
|
|
130
133
|
"data-qa": "dt-root-layout-sidebar"
|
|
131
134
|
}, [
|
|
132
135
|
r(t.$slots, "sidebar")
|
|
133
136
|
], 2),
|
|
134
|
-
|
|
137
|
+
a("main", {
|
|
135
138
|
ref: "root-layout-content",
|
|
136
|
-
class:
|
|
139
|
+
class: o(["d-root-layout__content", e.contentClass]),
|
|
137
140
|
"data-qa": "dt-root-layout-content",
|
|
138
141
|
tabindex: "0"
|
|
139
142
|
}, [
|
|
140
143
|
r(t.$slots, "default")
|
|
141
144
|
], 2),
|
|
142
|
-
|
|
143
|
-
class:
|
|
145
|
+
a("footer", {
|
|
146
|
+
class: o(["d-root-layout__footer", e.footerClass]),
|
|
144
147
|
"data-qa": "dt-root-layout-footer"
|
|
145
148
|
}, [
|
|
146
149
|
r(t.$slots, "footer")
|
|
147
150
|
], 2)
|
|
148
151
|
], 2);
|
|
149
152
|
}
|
|
150
|
-
const
|
|
153
|
+
const O = /* @__PURE__ */ u(y, [["render", f]]);
|
|
151
154
|
export {
|
|
152
|
-
|
|
155
|
+
O as default
|
|
153
156
|
};
|
|
154
157
|
//# 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 compatConfig: { MODE: 3 },\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 body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\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","_createElementBlock","_normalizeClass","$props","$options","_createElementVNode","_renderSlot","_ctx"],"mappings":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ue"),d=require("../../common/constants/index.cjs"),o=require("./select-menu-constants.cjs"),i=require("../../common/utils/index.cjs"),u=require("../../common/mixins/input.cjs"),m=require("./select-menu-validators.cjs"),S=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),E=require("../validation-messages/validation-messages.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../common/constants/index.cjs"),o=require("./select-menu-constants.cjs"),i=require("../../common/utils/index.cjs"),u=require("../../common/mixins/input.cjs"),m=require("./select-menu-validators.cjs"),S=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),E=require("../validation-messages/validation-messages.cjs"),p={compatConfig:{MODE:3},name:"DtSelectMenu",components:{DtValidationMessages:E.default},mixins:[u.MessagesMixin],inheritAttrs:!1,props:{label:{type:String,default:""},description:{type:String,default:""},options:{type:Array,default:()=>[],validator:t=>m.optionsValidator(t)},size:{type:String,default:"md",validator:t=>Object.keys(o.SELECT_SIZE_MODIFIERS).includes(t)},labelClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""},selectClass:{type:[String,Array,Object],default:""},optionClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})},optionChildProps:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},emits:["input","update:modelValue","change"],data(){return{LABEL_SIZE_MODIFIERS:d.LABEL_SIZE_MODIFIERS,DESCRIPTION_SIZE_MODIFIERS:d.DESCRIPTION_SIZE_MODIFIERS,SELECT_SIZE_MODIFIERS:o.SELECT_SIZE_MODIFIERS,SELECT_STATE_MODIFIERS:o.SELECT_STATE_MODIFIERS,hasSlotContent:i.hasSlotContent}},computed:{selectListeners(){return{input:()=>{},change:t=>this.emitValue(t.target.value,t)}},state(){return i.getValidationState(this.formattedMessages)},selectKey(){return i.getUniqueString()},descriptionKey(){return`select-${this.selectKey}-description`},labelAriaDetails(){return this.$slots.description||this.description?this.descriptionKey:this.$attrs["aria-details"]}},watch:{options(){this.$nextTick(()=>{this.emitValue(this.$refs.selectElement.value,null)})}},mounted(){this.emitValue(this.$refs.selectElement.value,null),this.validateOptionsPresence()},beforeUpdate(){this.validateOptionsPresence()},methods:{removeClassStyleAttrs:i.removeClassStyleAttrs,addClassStyleAttrs:i.addClassStyleAttrs,emitValue(t,r){this.$emit("update:modelValue",t,r),this.$emit("input",t,r),this.$emit("change",t,r)},getOptionKey(t){return`select-${this.selectKey}-option-${t}`},validateOptionsPresence(){var t;((t=this.options)==null?void 0:t.length)<1&&!this.$slots.default&&e.warn("Options are expected to be provided via prop or slot",this)}}},_=["aria-details"],g=["id"],h=["disabled"],C=["value"];function I(t,r,s,b,a,l){const c=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.guardReactiveProps(l.addClassStyleAttrs(t.$attrs))),[e.createElementVNode("label",null,[a.hasSlotContent(t.$slots.label)||s.label?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,"aria-details":l.labelAriaDetails,class:["d-label",a.LABEL_SIZE_MODIFIERS[s.size],s.labelClass]},s.labelChildProps,{"data-qa":"dt-select-label"}),[e.renderSlot(t.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(s.label),1)])],16,_)):e.createCommentVNode("",!0),a.hasSlotContent(t.$slots.description)||s.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,id:l.descriptionKey,class:["d-description",a.DESCRIPTION_SIZE_MODIFIERS[s.size],s.descriptionClass]},s.descriptionChildProps,{"data-qa":"dt-select-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(s.description),1)])],16,g)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["d-select",a.SELECT_SIZE_MODIFIERS[s.size],s.selectClass,{"d-select--disabled":s.disabled}]),"data-qa":"dt-select-wrapper"},[e.createElementVNode("select",e.mergeProps({ref:"selectElement",class:["d-select__input",a.SELECT_STATE_MODIFIERS[l.state]]},l.removeClassStyleAttrs(t.$attrs),{"data-qa":"dt-select",disabled:s.disabled},e.toHandlers(l.selectListeners,!0)),[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.options,n=>(e.openBlock(),e.createElementBlock("option",e.mergeProps({key:l.getOptionKey(n.value),value:n.value,class:s.optionClass},s.optionChildProps),e.toDisplayString(n.label),17,C))),128))])],16,h)],2)]),e.createVNode(c,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-select-messages"}),null,16,["validation-messages","show-messages","class"])],16)}const y=S._(p,[["render",I]]);exports.default=y;
|
|
2
2
|
//# sourceMappingURL=select-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-menu.cjs","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n removeClassStyleAttrs,\n addClassStyleAttrs,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\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 * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\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 * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n emitValue (value, event) {\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtValidationMessages","MessagesMixin","options","optionsValidator","s","SELECT_SIZE_MODIFIERS","LABEL_SIZE_MODIFIERS","DESCRIPTION_SIZE_MODIFIERS","SELECT_STATE_MODIFIERS","hasSlotContent","event","getValidationState","getUniqueString","removeClassStyleAttrs","addClassStyleAttrs","value","_a","warn","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","$options","_ctx","_createElementVNode","$data","$props","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":"+cA0GKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,WAAY,CAAEC,qBAAAA,EAAAA,OAAsB,EAEpC,OAAQ,CAACC,EAAAA,aAAa,EAEtB,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAUD,QAAS,C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B,kBACtC,gBAAeA,EAAY,aAC3B,MAAOA,EAAa,eACbA,EAAkB,mBAAA,CAC1B,UAAQ,oBAAoB,CAAA,EAAA,KAAA,GAAA,CAAA,sBAAA,gBAAA,OAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"select-menu.cjs","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n removeClassStyleAttrs,\n addClassStyleAttrs,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\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 * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\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 * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Event fired to sync the modelValue prop with the parent component\n *\n * @event input\n * @type {String | Number}\n */\n 'update:modelValue',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n emitValue (value, event) {\n this.$emit('update:modelValue', value, event);\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtValidationMessages","MessagesMixin","options","optionsValidator","s","SELECT_SIZE_MODIFIERS","LABEL_SIZE_MODIFIERS","DESCRIPTION_SIZE_MODIFIERS","SELECT_STATE_MODIFIERS","hasSlotContent","event","getValidationState","getUniqueString","removeClassStyleAttrs","addClassStyleAttrs","value","_a","warn","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_openBlock","_createElementBlock","_normalizeProps","_guardReactiveProps","$options","_ctx","_createElementVNode","$data","$props","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":"+cA0GKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,eAEN,WAAY,CAAEC,qBAAAA,EAAAA,OAAsB,EAEpC,OAAQ,CAACC,EAAAA,aAAa,EAEtB,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAUD,QAAS,CACP,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GAAWC,EAAgB,iBAACD,CAAO,CAC/C,EAMD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYE,GAAM,OAAO,KAAKC,uBAAqB,EAAE,SAASD,CAAC,CAChE,EAKD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,MAAM,EAC5B,QAAS,EACV,EAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,M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ps as E, createElementVNode as
|
|
1
|
+
import { warn as f, resolveComponent as g, openBlock as l, createElementBlock as i, normalizeProps as y, guardReactiveProps as E, createElementVNode as n, mergeProps as r, renderSlot as c, createTextVNode as u, toDisplayString as m, createCommentVNode as p, normalizeClass as C, toHandlers as b, Fragment as _, renderList as I, createVNode as O } from "vue";
|
|
2
2
|
import { LABEL_SIZE_MODIFIERS as v, DESCRIPTION_SIZE_MODIFIERS as A } from "../../common/constants/index.js";
|
|
3
3
|
import { SELECT_SIZE_MODIFIERS as h, SELECT_STATE_MODIFIERS as D } from "./select-menu-constants.js";
|
|
4
|
-
import { hasSlotContent as M, getValidationState as P, getUniqueString as
|
|
5
|
-
import { MessagesMixin as
|
|
4
|
+
import { hasSlotContent as M, getValidationState as P, getUniqueString as V, removeClassStyleAttrs as T, addClassStyleAttrs as L } from "../../common/utils/index.js";
|
|
5
|
+
import { MessagesMixin as R } from "../../common/mixins/input.js";
|
|
6
6
|
import { optionsValidator as F } from "./select-menu-validators.js";
|
|
7
7
|
import { _ as j } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
import K from "../validation-messages/validation-messages.js";
|
|
@@ -10,7 +10,7 @@ const k = {
|
|
|
10
10
|
compatConfig: { MODE: 3 },
|
|
11
11
|
name: "DtSelectMenu",
|
|
12
12
|
components: { DtValidationMessages: K },
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [R],
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -115,6 +115,13 @@ const k = {
|
|
|
115
115
|
* @type {String | Number}
|
|
116
116
|
*/
|
|
117
117
|
"input",
|
|
118
|
+
/**
|
|
119
|
+
* Event fired to sync the modelValue prop with the parent component
|
|
120
|
+
*
|
|
121
|
+
* @event input
|
|
122
|
+
* @type {String | Number}
|
|
123
|
+
*/
|
|
124
|
+
"update:modelValue",
|
|
118
125
|
/**
|
|
119
126
|
* Native change event
|
|
120
127
|
*
|
|
@@ -149,7 +156,7 @@ const k = {
|
|
|
149
156
|
return P(this.formattedMessages);
|
|
150
157
|
},
|
|
151
158
|
selectKey() {
|
|
152
|
-
return
|
|
159
|
+
return V();
|
|
153
160
|
},
|
|
154
161
|
descriptionKey() {
|
|
155
162
|
return `select-${this.selectKey}-description`;
|
|
@@ -173,10 +180,10 @@ const k = {
|
|
|
173
180
|
this.validateOptionsPresence();
|
|
174
181
|
},
|
|
175
182
|
methods: {
|
|
176
|
-
removeClassStyleAttrs:
|
|
177
|
-
addClassStyleAttrs:
|
|
178
|
-
emitValue(e,
|
|
179
|
-
this.$emit("input", e,
|
|
183
|
+
removeClassStyleAttrs: T,
|
|
184
|
+
addClassStyleAttrs: L,
|
|
185
|
+
emitValue(e, d) {
|
|
186
|
+
this.$emit("update:modelValue", e, d), this.$emit("input", e, d), this.$emit("change", e, d);
|
|
180
187
|
},
|
|
181
188
|
getOptionKey(e) {
|
|
182
189
|
return `select-${this.selectKey}-option-${e}`;
|
|
@@ -187,10 +194,10 @@ const k = {
|
|
|
187
194
|
}
|
|
188
195
|
}
|
|
189
196
|
}, q = ["aria-details"], w = ["id"], z = ["disabled"], N = ["value"];
|
|
190
|
-
function Z(e,
|
|
197
|
+
function Z(e, d, t, B, a, s) {
|
|
191
198
|
const S = g("dt-validation-messages");
|
|
192
199
|
return l(), i("div", y(E(s.addClassStyleAttrs(e.$attrs))), [
|
|
193
|
-
|
|
200
|
+
n("label", null, [
|
|
194
201
|
a.hasSlotContent(e.$slots.label) || t.label ? (l(), i("div", r({
|
|
195
202
|
key: 0,
|
|
196
203
|
"aria-details": s.labelAriaDetails,
|
|
@@ -217,7 +224,7 @@ function Z(e, n, t, B, a, s) {
|
|
|
217
224
|
u(m(t.description), 1)
|
|
218
225
|
])
|
|
219
226
|
], 16, w)) : p("", !0),
|
|
220
|
-
|
|
227
|
+
n("div", {
|
|
221
228
|
class: C([
|
|
222
229
|
"d-select",
|
|
223
230
|
a.SELECT_SIZE_MODIFIERS[t.size],
|
|
@@ -226,7 +233,7 @@ function Z(e, n, t, B, a, s) {
|
|
|
226
233
|
]),
|
|
227
234
|
"data-qa": "dt-select-wrapper"
|
|
228
235
|
}, [
|
|
229
|
-
|
|
236
|
+
n("select", r({
|
|
230
237
|
ref: "selectElement",
|
|
231
238
|
class: [
|
|
232
239
|
"d-select__input",
|