@dialpad/dialtone 9.147.0 → 9.148.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 +22 -5
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +22 -5
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +56270 -56270
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut-constants.js +2 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut-constants.js.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +65 -33
- package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +2 -0
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut-constants.cjs.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut-constants.js +2 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut-constants.js.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut.js +69 -40
- package/dist/vue3/lib/keyboard-shortcut/keyboard-shortcut.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 +19 -11
- package/dist/vue3/lib/select-menu/select-menu.js.map +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +2 -0
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts +9 -0
- package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=["{win}","{arrow-right}","{arrow-left}","{arrow-up}","{arrow-down}","{cmd}"];exports.SHORTCUTS_ALIASES_LIST=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=["{win}","{arrow-right}","{arrow-left}","{arrow-up}","{arrow-down}","{cmd}","{opt}"];exports.SHORTCUTS_ALIASES_LIST=r;
|
|
2
2
|
//# sourceMappingURL=keyboard-shortcut-constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut-constants.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n];\n"],"names":["SHORTCUTS_ALIASES_LIST"],"mappings":"gFAAY,MAACA,EAAyB,CACpC,QACA,gBACA,eACA,aACA,eACA,OACF"}
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut-constants.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n '{opt}',\n];\n"],"names":["SHORTCUTS_ALIASES_LIST"],"mappings":"gFAAY,MAACA,EAAyB,CACpC,QACA,gBACA,eACA,aACA,eACA,QACA,OACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut-constants.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n];\n"],"names":["SHORTCUTS_ALIASES_LIST"],"mappings":"AAAY,MAACA,IAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut-constants.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"sourcesContent":["export const SHORTCUTS_ALIASES_LIST = [\n '{win}',\n '{arrow-right}',\n '{arrow-left}',\n '{arrow-up}',\n '{arrow-down}',\n '{cmd}',\n '{opt}',\n];\n"],"names":["SHORTCUTS_ALIASES_LIST"],"mappings":"AAAY,MAACA,IAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
@@ -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 e=require("@dialpad/dialtone-icons/vue3"),t=require("vue"),d=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),s={"{win}":e.DtIconLayoutGrid,"{arrow-right}":e.DtIconArrowRight,"{arrow-left}":e.DtIconArrowLeft,"{arrow-up}":e.DtIconArrowUp,"{arrow-down}":e.DtIconArrowDown,"{cmd}":e.DtIconCommand,"{opt}":e.DtIconOption},l={"{cmd}":"Command","{opt}":"Option","{win}":"Windows","{arrow-right}":"Right Arrow","{arrow-left}":"Left Arrow","{arrow-up}":"Up Arrow","{arrow-down}":"Down Arrow","{plus}":"plus"},u={ctrl:"Control",alt:"Alt",esc:"Escape",del:"Delete",ins:"Insert",pgup:"Page Up",pgdn:"Page Down",num:"Number",caps:"Caps Lock"},p={compatConfig:{MODE:3},name:"DtKeyboardShortcut",components:{DtIconLayoutGrid:e.DtIconLayoutGrid,DtIconArrowRight:e.DtIconArrowRight,DtIconArrowLeft:e.DtIconArrowLeft,DtIconArrowUp:e.DtIconArrowUp,DtIconArrowDown:e.DtIconArrowDown,DtIconCommand:e.DtIconCommand,DtIconOption:e.DtIconOption,DtIconPlus:e.DtIconPlus},props:{inverted:{type:Boolean,default:!1},shortcut:{type:String,required:!0},screenReaderText:{type:String,default:null}},data(){return{separator:/\+/gi}},computed:{icons(){return{...s,"{plus}":e.DtIconPlus}},shortcutWithSeparator(){return this.shortcut.replace(this.separator,"{plus}")},formattedShortcut(){return Object.keys(s).reduce((o,r)=>o.replace(new RegExp("{"+r+"}","gi"),s[r]),this.shortcutWithSeparator)},formattedShortcutSplit(){const o=Object.keys(this.icons).join("|"),r=new RegExp(`(${o})`,"gi");return this.formattedShortcut.split(r).filter(Boolean)},generatedScreenReaderText(){return this.formattedShortcutSplit.map(o=>{const r=o.trim();if(l[r])return l[r];const n=r.toLowerCase();return u[n]?u[n]:r}).filter(o=>o).join(" ")}}},m={class:"d-keyboard-shortcut--sr-only"},w=["innerHTML"];function h(o,r,n,I,_,a){return t.openBlock(),t.createElementBlock("kbd",{class:t.normalizeClass(["d-keyboard-shortcut",{"d-keyboard-shortcut--inverted":n.inverted}])},[t.createElementVNode("span",m,t.toDisplayString(n.screenReaderText||a.generatedScreenReaderText),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.formattedShortcutSplit,(c,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[a.icons[c]?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.icons[c]),{key:`icon-${i}-${c}`,size:"100","aria-hidden":"true",class:t.normalizeClass(["d-keyboard-shortcut__icon",{"d-keyboard-shortcut__icon--inverted":n.inverted}])},null,8,["class"])):c.trim()?(t.openBlock(),t.createElementBlock("span",{key:`text-${i}-${c}`,"aria-hidden":"true",class:t.normalizeClass(["d-keyboard-shortcut__item",{"d-keyboard-shortcut__item--inverted":n.inverted}]),innerHTML:c},null,10,w)):t.createCommentVNode("",!0)],64))),256))],2)}const D=d._(p,[["render",h]]);exports.default=D;
|
|
2
2
|
//# sourceMappingURL=keyboard-shortcut.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.cjs","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span class=\"d-keyboard-shortcut--sr-only\">\n {{ screenReaderText || generatedScreenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <component\n :is=\"icons[item]\"\n v-if=\"icons[item]\"\n :key=\"`icon-${i}-${item}`\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else-if=\"item.trim()\"\n :key=\"`text-${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconOption,\n DtIconPlus,\n} from '@dialpad/dialtone-icons/vue3';\n\nconst SHORTCUTS_ICON_ALIASES = {\n '{win}': DtIconLayoutGrid,\n '{arrow-right}': DtIconArrowRight,\n '{arrow-left}': DtIconArrowLeft,\n '{arrow-up}': DtIconArrowUp,\n '{arrow-down}': DtIconArrowDown,\n '{cmd}': DtIconCommand,\n '{opt}': DtIconOption,\n};\n\n// Mapping of icon aliases to readable text for accessibility\nconst ICON_ALIAS_TO_TEXT = {\n '{cmd}': 'Command',\n '{opt}': 'Option',\n '{win}': 'Windows',\n '{arrow-right}': 'Right Arrow',\n '{arrow-left}': 'Left Arrow',\n '{arrow-up}': 'Up Arrow',\n '{arrow-down}': 'Down Arrow',\n '{plus}': 'plus',\n};\n\n// Mapping of common key abbreviations to full names for accessibility\nconst KEY_ABBREVIATIONS = {\n 'ctrl': 'Control',\n 'alt': 'Alt',\n 'esc': 'Escape',\n 'del': 'Delete',\n 'ins': 'Insert',\n 'pgup': 'Page Up',\n 'pgdn': 'Page Down',\n 'num': 'Number',\n 'caps': 'Caps Lock',\n};\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconOption,\n DtIconPlus,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {opt} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Optional text to override the auto-generated accessible text for assistive technology.\n * If not provided, accessible text will be automatically generated from the shortcut.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return {\n ...SHORTCUTS_ICON_ALIASES,\n '{plus}': DtIconPlus,\n };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n\n // Generates accessible text for the keyboard shortcut\n generatedScreenReaderText () {\n return this.formattedShortcutSplit\n .map(item => {\n const trimmedItem = item.trim();\n\n // Convert icon aliases to readable text\n if (ICON_ALIAS_TO_TEXT[trimmedItem]) {\n return ICON_ALIAS_TO_TEXT[trimmedItem];\n }\n\n // Convert key abbreviations to full names (case-insensitive)\n const lowerItem = trimmedItem.toLowerCase();\n if (KEY_ABBREVIATIONS[lowerItem]) {\n return KEY_ABBREVIATIONS[lowerItem];\n }\n\n // Return the key as-is if it's not an alias or abbreviation\n return trimmedItem;\n })\n .filter(item => item) // Remove empty strings\n .join(' ');\n },\n },\n};\n</script>\n"],"names":["SHORTCUTS_ICON_ALIASES","DtIconLayoutGrid","DtIconArrowRight","DtIconArrowLeft","DtIconArrowUp","DtIconArrowDown","DtIconCommand","DtIconOption","ICON_ALIAS_TO_TEXT","KEY_ABBREVIATIONS","_sfc_main","DtIconPlus","result","key","iconAliasString","regex","item","trimmedItem","lowerItem","_hoisted_1","_hoisted_2","_createElementBlock","_normalizeClass","$props","_createElementVNode","_toDisplayString","$options","_openBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createCommentVNode"],"mappings":"uOAmDMA,EAAyB,CAC7B,QAASC,EAAAA,iBACT,gBAAiBC,EAAAA,iBACjB,eAAgBC,EAAAA,gBAChB,aAAcC,EAAAA,cACd,eAAgBC,EAAAA,gBAChB,QAASC,EAAAA,cACT,QAASC,EAAAA,YACX,EAGMC,EAAqB,CACzB,QAAS,UACT,QAAS,SACT,QAAS,UACT,gBAAiB,cACjB,eAAgB,aAChB,aAAc,WACd,eAAgB,aAChB,SAAU,MACZ,EAGMC,EAAoB,CACxB,KAAQ,UACR,IAAO,MACP,IAAO,SACP,IAAO,SACP,IAAO,SACP,KAAQ,UACR,KAAQ,YACR,IAAO,SACP,KAAQ,WACV,EAMKC,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,qBAEN,WAAY,CACV,iBAAAT,EAAAA,iBACA,iBAAAC,EAAAA,iBACA,gBAAAC,EAAAA,8BACAC,EAAAA,cACA,gBAAAC,EAAAA,8BACAC,EAAAA,2BACAC,EAAAA,wBACAI,EAAAA,YAGF,MAAO,CAKL,SAAU,CACR,KAAM,QACN,QAAS,IAOX,SAAU,CACR,KAAM,OACN,SAAU,IAOZ,iBAAkB,CAChB,KAAM,OACN,QAAS,OAIb,MAAQ,CACN,MAAO,CACL,UAAW,OAEf,EAEA,SAAU,CACR,OAAS,CACP,MAAO,CACL,GAAGX,EACH,S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AA,MAAMV,CAAI,CAAA,EAAA,CAEd,IAAG,QAAU,CAAC,IAAIA,CAAI,GACvB,KAAK,MACL,cAAY,OACX,MApBTM,EAAAA,eAAA,oEAoB4GC,EAAA,QAAQ,wBAMjGP,EAAK,KAAI,iBADtBK,EAAAA,mBASE,OAAA,CAPC,IAAG,QAAU,CAAC,IAAIL,CAAI,GACvB,cAAY,OACX,MA7BTM,EAAAA,eAAA,oEA6B4GC,EAAA,QAAQ,IAI5G,UAAQP,CAjChB,EAAA,KAAA,GAAAI,CAAA,GAAAY,EAAAA,mBAAA,GAAA,EAAA"}
|
|
@@ -1,23 +1,44 @@
|
|
|
1
|
-
import { DtIconPlus as u,
|
|
2
|
-
import { createElementBlock as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
5
|
-
"{win}":
|
|
6
|
-
"{arrow-right}":
|
|
7
|
-
"{arrow-left}":
|
|
8
|
-
"{arrow-up}":
|
|
9
|
-
"{arrow-down}":
|
|
10
|
-
"{cmd}":
|
|
1
|
+
import { DtIconPlus as u, DtIconOption as h, DtIconCommand as w, DtIconArrowDown as _, DtIconArrowUp as f, DtIconArrowLeft as S, DtIconArrowRight as g, DtIconLayoutGrid as y } from "@dialpad/dialtone-icons/vue3";
|
|
2
|
+
import { createElementBlock as c, openBlock as n, normalizeClass as s, createElementVNode as D, toDisplayString as I, Fragment as l, renderList as A, createBlock as k, createCommentVNode as b, resolveDynamicComponent as C } from "vue";
|
|
3
|
+
import { _ as T } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const i = {
|
|
5
|
+
"{win}": y,
|
|
6
|
+
"{arrow-right}": g,
|
|
7
|
+
"{arrow-left}": S,
|
|
8
|
+
"{arrow-up}": f,
|
|
9
|
+
"{arrow-down}": _,
|
|
10
|
+
"{cmd}": w,
|
|
11
|
+
"{opt}": h
|
|
12
|
+
}, p = {
|
|
13
|
+
"{cmd}": "Command",
|
|
14
|
+
"{opt}": "Option",
|
|
15
|
+
"{win}": "Windows",
|
|
16
|
+
"{arrow-right}": "Right Arrow",
|
|
17
|
+
"{arrow-left}": "Left Arrow",
|
|
18
|
+
"{arrow-up}": "Up Arrow",
|
|
19
|
+
"{arrow-down}": "Down Arrow",
|
|
20
|
+
"{plus}": "plus"
|
|
21
|
+
}, m = {
|
|
22
|
+
ctrl: "Control",
|
|
23
|
+
alt: "Alt",
|
|
24
|
+
esc: "Escape",
|
|
25
|
+
del: "Delete",
|
|
26
|
+
ins: "Insert",
|
|
27
|
+
pgup: "Page Up",
|
|
28
|
+
pgdn: "Page Down",
|
|
29
|
+
num: "Number",
|
|
30
|
+
caps: "Caps Lock"
|
|
11
31
|
}, x = {
|
|
12
32
|
compatConfig: { MODE: 3 },
|
|
13
33
|
name: "DtKeyboardShortcut",
|
|
14
34
|
components: {
|
|
15
|
-
DtIconLayoutGrid:
|
|
16
|
-
DtIconArrowRight:
|
|
17
|
-
DtIconArrowLeft:
|
|
18
|
-
DtIconArrowUp:
|
|
19
|
-
DtIconArrowDown:
|
|
20
|
-
DtIconCommand:
|
|
35
|
+
DtIconLayoutGrid: y,
|
|
36
|
+
DtIconArrowRight: g,
|
|
37
|
+
DtIconArrowLeft: S,
|
|
38
|
+
DtIconArrowUp: f,
|
|
39
|
+
DtIconArrowDown: _,
|
|
40
|
+
DtIconCommand: w,
|
|
41
|
+
DtIconOption: h,
|
|
21
42
|
DtIconPlus: u
|
|
22
43
|
},
|
|
23
44
|
props: {
|
|
@@ -31,14 +52,15 @@ const d = {
|
|
|
31
52
|
},
|
|
32
53
|
/**
|
|
33
54
|
* Include any of these tokens in your string to render the corresponding symbol:
|
|
34
|
-
* {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}
|
|
55
|
+
* {cmd} {opt} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}
|
|
35
56
|
*/
|
|
36
57
|
shortcut: {
|
|
37
58
|
type: String,
|
|
38
59
|
required: !0
|
|
39
60
|
},
|
|
40
61
|
/**
|
|
41
|
-
*
|
|
62
|
+
* Optional text to override the auto-generated accessible text for assistive technology.
|
|
63
|
+
* If not provided, accessible text will be automatically generated from the shortcut.
|
|
42
64
|
*/
|
|
43
65
|
screenReaderText: {
|
|
44
66
|
type: String,
|
|
@@ -53,7 +75,7 @@ const d = {
|
|
|
53
75
|
computed: {
|
|
54
76
|
icons() {
|
|
55
77
|
return {
|
|
56
|
-
...
|
|
78
|
+
...i,
|
|
57
79
|
"{plus}": u
|
|
58
80
|
};
|
|
59
81
|
},
|
|
@@ -61,49 +83,56 @@ const d = {
|
|
|
61
83
|
return this.shortcut.replace(this.separator, "{plus}");
|
|
62
84
|
},
|
|
63
85
|
formattedShortcut() {
|
|
64
|
-
return Object.keys(
|
|
86
|
+
return Object.keys(i).reduce((r, t) => r.replace(new RegExp("{" + t + "}", "gi"), i[t]), this.shortcutWithSeparator);
|
|
65
87
|
},
|
|
66
88
|
// Splits any icon based aliases into their own array items.
|
|
67
89
|
formattedShortcutSplit() {
|
|
68
|
-
const
|
|
69
|
-
return this.formattedShortcut.split(
|
|
90
|
+
const r = Object.keys(this.icons).join("|"), t = new RegExp(`(${r})`, "gi");
|
|
91
|
+
return this.formattedShortcut.split(t).filter(Boolean);
|
|
92
|
+
},
|
|
93
|
+
// Generates accessible text for the keyboard shortcut
|
|
94
|
+
generatedScreenReaderText() {
|
|
95
|
+
return this.formattedShortcutSplit.map((r) => {
|
|
96
|
+
const t = r.trim();
|
|
97
|
+
if (p[t])
|
|
98
|
+
return p[t];
|
|
99
|
+
const e = t.toLowerCase();
|
|
100
|
+
return m[e] ? m[e] : t;
|
|
101
|
+
}).filter((r) => r).join(" ");
|
|
70
102
|
}
|
|
71
103
|
}
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}, v = ["innerHTML"];
|
|
76
|
-
function A(c, e, r, C, R, a) {
|
|
77
|
-
return t(), n("kbd", {
|
|
104
|
+
}, E = { class: "d-keyboard-shortcut--sr-only" }, L = ["innerHTML"];
|
|
105
|
+
function O(r, t, e, R, v, a) {
|
|
106
|
+
return n(), c("kbd", {
|
|
78
107
|
class: s([
|
|
79
108
|
"d-keyboard-shortcut",
|
|
80
|
-
{ "d-keyboard-shortcut--inverted":
|
|
109
|
+
{ "d-keyboard-shortcut--inverted": e.inverted }
|
|
81
110
|
])
|
|
82
111
|
}, [
|
|
83
|
-
|
|
84
|
-
(
|
|
85
|
-
a.icons[o] ? (
|
|
86
|
-
key:
|
|
112
|
+
D("span", E, I(e.screenReaderText || a.generatedScreenReaderText), 1),
|
|
113
|
+
(n(!0), c(l, null, A(a.formattedShortcutSplit, (o, d) => (n(), c(l, null, [
|
|
114
|
+
a.icons[o] ? (n(), k(C(a.icons[o]), {
|
|
115
|
+
key: `icon-${d}-${o}`,
|
|
87
116
|
size: "100",
|
|
88
117
|
"aria-hidden": "true",
|
|
89
118
|
class: s([
|
|
90
119
|
"d-keyboard-shortcut__icon",
|
|
91
|
-
{ "d-keyboard-shortcut__icon--inverted":
|
|
120
|
+
{ "d-keyboard-shortcut__icon--inverted": e.inverted }
|
|
92
121
|
])
|
|
93
|
-
}, null, 8, ["class"])) : (
|
|
94
|
-
key:
|
|
122
|
+
}, null, 8, ["class"])) : o.trim() ? (n(), c("span", {
|
|
123
|
+
key: `text-${d}-${o}`,
|
|
95
124
|
"aria-hidden": "true",
|
|
96
125
|
class: s([
|
|
97
126
|
"d-keyboard-shortcut__item",
|
|
98
|
-
{ "d-keyboard-shortcut__item--inverted":
|
|
127
|
+
{ "d-keyboard-shortcut__item--inverted": e.inverted }
|
|
99
128
|
]),
|
|
100
129
|
innerHTML: o
|
|
101
|
-
}, null, 10,
|
|
130
|
+
}, null, 10, L)) : b("", !0)
|
|
102
131
|
], 64))), 256))
|
|
103
132
|
], 2);
|
|
104
133
|
}
|
|
105
|
-
const
|
|
134
|
+
const U = /* @__PURE__ */ T(x, [["render", O]]);
|
|
106
135
|
export {
|
|
107
|
-
|
|
136
|
+
U as default
|
|
108
137
|
};
|
|
109
138
|
//# sourceMappingURL=keyboard-shortcut.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-shortcut.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span
|
|
1
|
+
{"version":3,"file":"keyboard-shortcut.js","sources":["../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span class=\"d-keyboard-shortcut--sr-only\">\n {{ screenReaderText || generatedScreenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <component\n :is=\"icons[item]\"\n v-if=\"icons[item]\"\n :key=\"`icon-${i}-${item}`\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else-if=\"item.trim()\"\n :key=\"`text-${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconOption,\n DtIconPlus,\n} from '@dialpad/dialtone-icons/vue3';\n\nconst SHORTCUTS_ICON_ALIASES = {\n '{win}': DtIconLayoutGrid,\n '{arrow-right}': DtIconArrowRight,\n '{arrow-left}': DtIconArrowLeft,\n '{arrow-up}': DtIconArrowUp,\n '{arrow-down}': DtIconArrowDown,\n '{cmd}': DtIconCommand,\n '{opt}': DtIconOption,\n};\n\n// Mapping of icon aliases to readable text for accessibility\nconst ICON_ALIAS_TO_TEXT = {\n '{cmd}': 'Command',\n '{opt}': 'Option',\n '{win}': 'Windows',\n '{arrow-right}': 'Right Arrow',\n '{arrow-left}': 'Left Arrow',\n '{arrow-up}': 'Up Arrow',\n '{arrow-down}': 'Down Arrow',\n '{plus}': 'plus',\n};\n\n// Mapping of common key abbreviations to full names for accessibility\nconst KEY_ABBREVIATIONS = {\n 'ctrl': 'Control',\n 'alt': 'Alt',\n 'esc': 'Escape',\n 'del': 'Delete',\n 'ins': 'Insert',\n 'pgup': 'Page Up',\n 'pgdn': 'Page Down',\n 'num': 'Number',\n 'caps': 'Caps Lock',\n};\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIconLayoutGrid,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtIconArrowUp,\n DtIconArrowDown,\n DtIconCommand,\n DtIconOption,\n DtIconPlus,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {opt} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Optional text to override the auto-generated accessible text for assistive technology.\n * If not provided, accessible text will be automatically generated from the shortcut.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return {\n ...SHORTCUTS_ICON_ALIASES,\n '{plus}': DtIconPlus,\n };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n\n // Generates accessible text for the keyboard shortcut\n generatedScreenReaderText () {\n return this.formattedShortcutSplit\n .map(item => {\n const trimmedItem = item.trim();\n\n // Convert icon aliases to readable text\n if (ICON_ALIAS_TO_TEXT[trimmedItem]) {\n return ICON_ALIAS_TO_TEXT[trimmedItem];\n }\n\n // Convert key abbreviations to full names (case-insensitive)\n const lowerItem = trimmedItem.toLowerCase();\n if (KEY_ABBREVIATIONS[lowerItem]) {\n return KEY_ABBREVIATIONS[lowerItem];\n }\n\n // Return the key as-is if it's not an alias or abbreviation\n return trimmedItem;\n })\n .filter(item => item) // Remove empty strings\n .join(' ');\n },\n },\n};\n</script>\n"],"names":["SHORTCUTS_ICON_ALIASES","DtIconLayoutGrid","DtIconArrowRight","DtIconArrowLeft","DtIconArrowUp","DtIconArrowDown","DtIconCommand","DtIconOption","ICON_ALIAS_TO_TEXT","KEY_ABBREVIATIONS","_sfc_main","DtIconPlus","result","key","iconAliasString","regex","item","trimmedItem","lowerItem","_hoisted_1","_hoisted_2","_createElementBlock","_normalizeClass","$props","_createElementVNode","_toDisplayString","$options","_openBlock","_Fragment","_renderList","i","_createBlock","_resolveDynamicComponent","_createCommentVNode"],"mappings":";;;AAmDA,MAAMA,IAAyB;AAAA,EAC7B,SAASC;AAAA,EACT,iBAAiBC;AAAA,EACjB,gBAAgBC;AAAA,EAChB,cAAcC;AAAA,EACd,gBAAgBC;AAAA,EAChB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AI;AAAA,QACvB,eAAY;AAAA,QACX,OA7BTM,EAAA;AAAA;mDA6B4GC,EAAA,SAAQ;AAAA;QAI5G,WAAQP;AAAA,MAjChB,GAAA,MAAA,IAAAI,CAAA,KAAAa,EAAA,IAAA,EAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
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"),
|
|
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"),_={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},rootClass:{type:[String,Object,Array],default:""},modelValue:{type:[String,Number],default:""}},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"]}},mounted(){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)}}},p=["aria-details"],g=["id"],C=["disabled","value"],y=["value"];function I(t,r,s,b,a,l){const c=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:s.rootClass},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,p)):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,value:s.modelValue},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,y))),128))])],16,C)],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 h=S._(_,[["render",I]]);exports.default=h;
|
|
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 :class=\"rootClass\"\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 * `{ 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|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 * Additional class name for the root element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n rootClass: {\n type: [String, Object, Array],\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 * 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 mounted () {\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","_createElementBlock","_mergeProps","$props","$options","_ctx","_createElementVNode","$data","_openBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":"+cA2GKA,EAAU,C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GA/D7BjB,CAAA,WAAA,EAAA,GAAAD,CAAA,QAqEImB,EAAAA,YAMEC,EANFjB,aAME,CALC,sBAAqBG,EAAA,kBACrB,gBAAeA,EAAA,aACf,MAAOA,EAAA,eACAA,EAAA,mBAAkB,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 :class=\"rootClass\"\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 :value=\"modelValue\"\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 * `{ 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|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 * Additional class name for the root element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n rootClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The value of the select menu\n */\n modelValue: {\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 * 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 mounted () {\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","_createElementBlock","_mergeProps","$props","$options","_ctx","_createElementVNode","$data","_openBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":"+cA4GKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,eAEN,WAAY,CAAA,qBAAEC,EAAAA,SAEd,OAAQ,CAACC,EAAAA,aAAa,EAEtB,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,IAUX,QAAS,CACP,KAAM,MACN,QAAS,IAAM,CAAA,EACf,UAAWC,GAAWC,EAAAA,iBAAiBD,CAAO,GAOhD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYE,GAAM,OAAO,KAAKC,uBAAqB,EAAE,SAASD,CAAC,GAMjE,WAAY,CACV,KAAM,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createElementVNode as n, createVNode as g, createCommentVNode as u, renderSlot as c, createTextVNode as p, toDisplayString as m, normalizeClass as y, toHandlers as C, Fragment as b, renderList as E, warn as _ } from "vue";
|
|
2
2
|
import { DESCRIPTION_SIZE_MODIFIERS as I, LABEL_SIZE_MODIFIERS as O } from "../../common/constants/index.js";
|
|
3
3
|
import { SELECT_STATE_MODIFIERS as v, SELECT_SIZE_MODIFIERS as S } from "./select-menu-constants.js";
|
|
4
|
-
import { addClassStyleAttrs as A, removeClassStyleAttrs as D, getUniqueString as M, getValidationState as P, hasSlotContent as
|
|
5
|
-
import { MessagesMixin as
|
|
6
|
-
import { optionsValidator as
|
|
4
|
+
import { addClassStyleAttrs as A, removeClassStyleAttrs as D, getUniqueString as M, getValidationState as P, hasSlotContent as V } from "../../common/utils/index.js";
|
|
5
|
+
import { MessagesMixin as L } from "../../common/mixins/input.js";
|
|
6
|
+
import { optionsValidator as T } from "./select-menu-validators.js";
|
|
7
7
|
import { _ as R } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
import j from "../validation-messages/validation-messages.js";
|
|
9
9
|
const F = {
|
|
10
10
|
compatConfig: { MODE: 3 },
|
|
11
11
|
name: "DtSelectMenu",
|
|
12
12
|
components: { DtValidationMessages: j },
|
|
13
|
-
mixins: [
|
|
13
|
+
mixins: [L],
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -37,7 +37,7 @@ const F = {
|
|
|
37
37
|
options: {
|
|
38
38
|
type: Array,
|
|
39
39
|
default: () => [],
|
|
40
|
-
validator: (e) =>
|
|
40
|
+
validator: (e) => T(e)
|
|
41
41
|
},
|
|
42
42
|
/**
|
|
43
43
|
* Controls the size of the select
|
|
@@ -113,6 +113,13 @@ const F = {
|
|
|
113
113
|
rootClass: {
|
|
114
114
|
type: [String, Object, Array],
|
|
115
115
|
default: ""
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* The value of the select menu
|
|
119
|
+
*/
|
|
120
|
+
modelValue: {
|
|
121
|
+
type: [String, Number],
|
|
122
|
+
default: ""
|
|
116
123
|
}
|
|
117
124
|
},
|
|
118
125
|
emits: [
|
|
@@ -144,7 +151,7 @@ const F = {
|
|
|
144
151
|
DESCRIPTION_SIZE_MODIFIERS: I,
|
|
145
152
|
SELECT_SIZE_MODIFIERS: S,
|
|
146
153
|
SELECT_STATE_MODIFIERS: v,
|
|
147
|
-
hasSlotContent:
|
|
154
|
+
hasSlotContent: V
|
|
148
155
|
};
|
|
149
156
|
},
|
|
150
157
|
computed: {
|
|
@@ -193,7 +200,7 @@ const F = {
|
|
|
193
200
|
((e = this.options) == null ? void 0 : e.length) < 1 && !this.$slots.default && _("Options are expected to be provided via prop or slot", this);
|
|
194
201
|
}
|
|
195
202
|
}
|
|
196
|
-
}, K = ["aria-details"],
|
|
203
|
+
}, K = ["aria-details"], N = ["id"], k = ["disabled", "value"], q = ["value"];
|
|
197
204
|
function Z(e, d, t, w, a, s) {
|
|
198
205
|
const h = f("dt-validation-messages");
|
|
199
206
|
return r(), i("div", l({ class: t.rootClass }, s.addClassStyleAttrs(e.$attrs)), [
|
|
@@ -223,7 +230,7 @@ function Z(e, d, t, w, a, s) {
|
|
|
223
230
|
c(e.$slots, "description", {}, () => [
|
|
224
231
|
p(m(t.description), 1)
|
|
225
232
|
])
|
|
226
|
-
], 16,
|
|
233
|
+
], 16, N)) : u("", !0),
|
|
227
234
|
n("div", {
|
|
228
235
|
class: y([
|
|
229
236
|
"d-select",
|
|
@@ -241,16 +248,17 @@ function Z(e, d, t, w, a, s) {
|
|
|
241
248
|
]
|
|
242
249
|
}, s.removeClassStyleAttrs(e.$attrs), {
|
|
243
250
|
"data-qa": "dt-select",
|
|
244
|
-
disabled: t.disabled
|
|
251
|
+
disabled: t.disabled,
|
|
252
|
+
value: t.modelValue
|
|
245
253
|
}, C(s.selectListeners, !0)), [
|
|
246
254
|
c(e.$slots, "default", {}, () => [
|
|
247
255
|
(r(!0), i(b, null, E(t.options, (o) => (r(), i("option", l({
|
|
248
256
|
key: s.getOptionKey(o.value),
|
|
249
257
|
value: o.value,
|
|
250
258
|
class: t.optionClass
|
|
251
|
-
}, t.optionChildProps), m(o.label), 17,
|
|
259
|
+
}, t.optionChildProps), m(o.label), 17, q))), 128))
|
|
252
260
|
])
|
|
253
|
-
], 16,
|
|
261
|
+
], 16, k)
|
|
254
262
|
], 2)
|
|
255
263
|
]),
|
|
256
264
|
g(h, l({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-menu.js","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div\n :class=\"rootClass\"\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 * `{ 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|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 * Additional class name for the root element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n rootClass: {\n type: [String, Object, Array],\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 * 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 mounted () {\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","_createElementBlock","_mergeProps","$props","$options","_ctx","_createElementVNode","$data","_openBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":";;;;;;;;AA2GA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY,EAAE,sBAAAC;EAEd,QAAQ,CAACC,CAAa;AAAA,EAEtB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;;IAUX,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,MACf,WAAW,CAAAC,MAAWC,EAAiBD,CAAO;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A,CAAA,GAAA;AAAA,UAGrBK,EAUOJ,yBAVP,MAUO;AAAA,aATLG,EAAA,EAAA,GAAAP,EAQSc,GAAA,MAhErBC,EAyD+Bb,EAAA,SAzD/B,CAyDqBc,OADTT,EAAA,GAAAP,EAQS,UARTC,EAQS;AAAA,cANN,KAAKE,EAAA,aAAaa,EAAO,KAAK;AAAA,cAC9B,OAAOA,EAAO;AAAA,cACd,OAAOd,EAAA;AAAA,YACA,GAAAA,EAAA,gBAAgB,GAAAQ,EAErBM,EAAO,KAAK,GAAA,IA/D7BjB,CAAA;;QAAA,GAAA,IAAAD,CAAA;AAAA;;IAqEImB,EAMEC,GANFjB,EAME;AAAA,MALC,uBAAqBG,EAAA;AAAA,MACrB,iBAAeA,EAAA;AAAA,MACf,OAAOA,EAAA;AAAA,OACAA,EAAA,oBAAkB,EAC1B,WAAQ,qBAAoB,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"select-menu.js","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div\n :class=\"rootClass\"\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 :value=\"modelValue\"\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 * `{ 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|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 * Additional class name for the root element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n rootClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The value of the select menu\n */\n modelValue: {\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 * 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 mounted () {\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","_createElementBlock","_mergeProps","$props","$options","_ctx","_createElementVNode","$data","_openBlock","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","option","_createVNode","_component_dt_validation_messages"],"mappings":";;;;;;;;AA4GA,MAAKA,IAAU;AAAA,EACb,cAAc,EA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26
|
};
|
|
26
27
|
shortcutWithSeparator(): any;
|
|
27
28
|
formattedShortcut(): any;
|
|
28
29
|
formattedShortcutSplit(): any;
|
|
30
|
+
generatedScreenReaderText(): any;
|
|
29
31
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
30
32
|
inverted: {
|
|
31
33
|
type: BooleanConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut.vue.d.ts","sourceRoot":"","sources":["../../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut.vue.d.ts","sourceRoot":"","sources":["../../../../components/keyboard_shortcut/keyboard_shortcut.vue"],"names":[],"mappings":"AAsCA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard_shortcut_constants.d.ts","sourceRoot":"","sources":["../../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"keyboard_shortcut_constants.d.ts","sourceRoot":"","sources":["../../../../components/keyboard_shortcut/keyboard_shortcut_constants.js"],"names":[],"mappings":"AAAA,8CAQE"}
|