@dialpad/dialtone-vue 3.4.0 → 3.5.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.
@@ -203,7 +203,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".skeleton-placeholder{display:flex;str
203
203
 
204
204
  /***/ }),
205
205
 
206
- /***/ 739:
206
+ /***/ 791:
207
207
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
208
208
 
209
209
  "use strict";
@@ -531,19 +531,19 @@ var update = add("537a95a4", content, true, {"sourceMap":false,"shadowMode":fals
531
531
 
532
532
  /***/ }),
533
533
 
534
- /***/ 877:
534
+ /***/ 273:
535
535
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
536
536
 
537
537
  // style-loader: Adds some css to the DOM by adding a <style> tag
538
538
 
539
539
  // load the styles
540
- var content = __webpack_require__(739);
540
+ var content = __webpack_require__(791);
541
541
  if(content.__esModule) content = content.default;
542
542
  if(typeof content === 'string') content = [[module.id, content, '']];
543
543
  if(content.locals) module.exports = content.locals;
544
544
  // add the styles to the DOM
545
545
  var add = (__webpack_require__(402)/* ["default"] */ .Z)
546
- var update = add("0480d588", content, true, {"sourceMap":false,"shadowMode":false});
546
+ var update = add("72197f1c", content, true, {"sourceMap":false,"shadowMode":false});
547
547
 
548
548
  /***/ }),
549
549
 
@@ -3113,6 +3113,7 @@ function comboboxvue_type_template_id_4901dce5_render(_ctx, _cache, $props, $set
3113
3113
  * the root element of the component.
3114
3114
  */
3115
3115
 
3116
+ const ERROR_INVALID_LIST_ELEMENT = 'listElementKey is required or the referenced ' + 'element doesn\'t exist. Received listElement: ';
3116
3117
  /* harmony default export */ const keyboard_list_navigation = (function () {
3117
3118
  let {
3118
3119
  // Role of the list items in the component. This is used to identify the list items
@@ -3136,7 +3137,7 @@ function comboboxvue_type_template_id_4901dce5_render(_ctx, _cache, $props, $set
3136
3137
  endOfListMethod = null,
3137
3138
  // Scroll the active element into view when highlighted by a keyboard event.
3138
3139
  scrollToOnHighlight = true,
3139
- // Focus the active element on keyboard navigation
3140
+ // Focus the active element on keyboard navigation.
3140
3141
  focusOnKeyboardNavigation = false
3141
3142
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3142
3143
  return {
@@ -3170,14 +3171,25 @@ function comboboxvue_type_template_id_4901dce5_render(_ctx, _cache, $props, $set
3170
3171
  // Gets the length of all the items in the list, uses the listItemRole param to determine
3171
3172
  // whether an element is a list item.
3172
3173
  _itemsLength() {
3174
+ const listItems = this._getListItemNodes();
3175
+
3176
+ if (listItems === null) {
3177
+ return 0;
3178
+ }
3179
+
3180
+ return listItems.length;
3181
+ },
3182
+
3183
+ // Gets all the list item nodes within the list element
3184
+ _getListItemNodes() {
3173
3185
  const listElement = this._getListElement();
3174
3186
 
3175
3187
  if (!listElement) {
3176
- console.error("listElementKey is required or the referenced element doesn't exist. Received\n listElement: ", listElement);
3177
- return 0;
3188
+ console.error(ERROR_INVALID_LIST_ELEMENT, listElement);
3189
+ return null;
3178
3190
  }
3179
3191
 
3180
- return listElement.querySelectorAll("[role=\"".concat(listItemRole, "\"]")).length;
3192
+ return Array.from(listElement.querySelectorAll("[role=\"".concat(listItemRole, "\"]")));
3181
3193
  },
3182
3194
 
3183
3195
  onUpKey() {
@@ -3222,6 +3234,35 @@ function comboboxvue_type_template_id_4901dce5_render(_ctx, _cache, $props, $set
3222
3234
  this.focusActiveItemIfNeeded();
3223
3235
  },
3224
3236
 
3237
+ onNavigationKey(key) {
3238
+ const listItems = this._getListItemNodes();
3239
+
3240
+ const matchingItems = listItems.filter(item => {
3241
+ const content = item.textContent.trim().toLowerCase();
3242
+ return content.startsWith(key.toLowerCase());
3243
+ });
3244
+
3245
+ if (matchingItems.length <= 0) {
3246
+ return;
3247
+ }
3248
+
3249
+ const highlightedMatchingItemIndex = matchingItems.findIndex(item => {
3250
+ return this[indexKey] === listItems.indexOf(item);
3251
+ });
3252
+ const nextHighlightedItemIndex = listItems.indexOf(highlightedMatchingItemIndex < matchingItems.length - 1 ? matchingItems[highlightedMatchingItemIndex + 1] : matchingItems[0]);
3253
+ this.setHighlightIndex(nextHighlightedItemIndex);
3254
+ this.scrollActiveItemIntoViewIfNeeded();
3255
+ this.focusActiveItemIfNeeded();
3256
+ },
3257
+
3258
+ isValidLetter(key) {
3259
+ if (key.length > 1) {
3260
+ return false;
3261
+ }
3262
+
3263
+ return key >= 'a' && key <= 'z' || key >= 'A' && key <= 'Z';
3264
+ },
3265
+
3225
3266
  jumpToBeginning() {
3226
3267
  this.setHighlightIndex(0);
3227
3268
  },
@@ -3258,8 +3299,7 @@ function comboboxvue_type_template_id_4901dce5_render(_ctx, _cache, $props, $set
3258
3299
  }
3259
3300
 
3260
3301
  const listItems = Array.from(listElement.querySelectorAll("[role=\"".concat(listItemRole, "\"]")));
3261
- const index = listItems.indexOf(listElement.querySelector("#".concat(id)));
3262
- return index;
3302
+ return listItems.indexOf(listElement.querySelector("#".concat(id)));
3263
3303
  },
3264
3304
 
3265
3305
  _getItemId(index) {
@@ -3522,10 +3562,10 @@ const combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(comboboxv
3522
3562
  /* harmony default export */ const combobox = (combobox_exports_);
3523
3563
  ;// CONCATENATED MODULE: ./components/combobox/index.js
3524
3564
 
3525
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/dropdown/dropdown.vue?vue&type=template&id=071e4ebc
3565
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/dropdown/dropdown.vue?vue&type=template&id=e86dedbc
3526
3566
 
3527
- const dropdownvue_type_template_id_071e4ebc_hoisted_1 = ["id"];
3528
- function dropdownvue_type_template_id_071e4ebc_render(_ctx, _cache, $props, $setup, $data, $options) {
3567
+ const dropdownvue_type_template_id_e86dedbc_hoisted_1 = ["id"];
3568
+ function dropdownvue_type_template_id_e86dedbc_render(_ctx, _cache, $props, $setup, $data, $options) {
3529
3569
  const _component_dt_popover = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-popover");
3530
3570
 
3531
3571
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_dt_popover, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
@@ -3543,7 +3583,7 @@ function dropdownvue_type_template_id_071e4ebc_render(_ctx, _cache, $props, $set
3543
3583
  "max-width": $props.maxWidth,
3544
3584
  "open-with-arrow-keys": true,
3545
3585
  onOpened: $options.updateInitialHighlightIndex,
3546
- onKeydown: [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)($options.onEnterKey, ["enter"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)($options.onSpaceKey, ["space"]), _cache[2] || (_cache[2] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onUpKeyPress'), ["stop", "prevent"]), ["up"])), _cache[3] || (_cache[3] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onDownKeyPress'), ["stop", "prevent"]), ["down"])), _cache[4] || (_cache[4] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onHomeKeyPress'), ["stop", "prevent"]), ["home"])), _cache[5] || (_cache[5] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onEndKeyPress'), ["stop", "prevent"]), ["end"]))]
3586
+ onKeydown: [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)($options.onEnterKey, ["enter"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)($options.onSpaceKey, ["space"]), _cache[2] || (_cache[2] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onUpKeyPress'), ["stop", "prevent"]), ["up"])), _cache[3] || (_cache[3] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onDownKeyPress'), ["stop", "prevent"]), ["down"])), _cache[4] || (_cache[4] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onHomeKeyPress'), ["stop", "prevent"]), ["home"])), _cache[5] || (_cache[5] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.withModifiers)($event => $options.onKeyValidation($event, 'onEndKeyPress'), ["stop", "prevent"]), ["end"])), _cache[6] || (_cache[6] = $event => $options.onKeyValidation($event, 'onKeyPress'))]
3547
3587
  }), {
3548
3588
  anchor: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(_ref => {
3549
3589
  let {
@@ -3570,12 +3610,12 @@ function dropdownvue_type_template_id_071e4ebc_render(_ctx, _cache, $props, $set
3570
3610
  })
3571
3611
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "list", {
3572
3612
  close: close
3573
- })], 42, dropdownvue_type_template_id_071e4ebc_hoisted_1)];
3613
+ })], 42, dropdownvue_type_template_id_e86dedbc_hoisted_1)];
3574
3614
  }),
3575
3615
  _: 3
3576
3616
  }, 16, ["content-width", "open", "placement", "fallback-placements", "modal", "max-height", "max-width", "onOpened", "onKeydown"]);
3577
3617
  }
3578
- ;// CONCATENATED MODULE: ./components/dropdown/dropdown.vue?vue&type=template&id=071e4ebc
3618
+ ;// CONCATENATED MODULE: ./components/dropdown/dropdown.vue?vue&type=template&id=e86dedbc
3579
3619
 
3580
3620
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/popover/popover.vue?vue&type=template&id=0656612f
3581
3621
 
@@ -9020,7 +9060,6 @@ const DROPDOWN_PADDING_CLASSES = {
9020
9060
  components: {
9021
9061
  DtPopover: popover
9022
9062
  },
9023
- inheritAttrs: false,
9024
9063
  mixins: [keyboard_list_navigation({
9025
9064
  indexKey: 'highlightIndex',
9026
9065
  idKey: 'highlightId',
@@ -9032,6 +9071,7 @@ const DROPDOWN_PADDING_CLASSES = {
9032
9071
  activeItemKey: 'activeItemEl',
9033
9072
  focusOnKeyboardNavigation: true
9034
9073
  })],
9074
+ inheritAttrs: false,
9035
9075
  props: {
9036
9076
  /**
9037
9077
  * Controls whether the dropdown is shown. Leaving this null will have the dropdown trigger on click by default.
@@ -9180,6 +9220,10 @@ const DROPDOWN_PADDING_CLASSES = {
9180
9220
 
9181
9221
  activeItemEl() {
9182
9222
  return this.getListElement().querySelector('#' + this.highlightId);
9223
+ },
9224
+
9225
+ isArrowKeyNav() {
9226
+ return this.navigationType === this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS;
9183
9227
  }
9184
9228
 
9185
9229
  },
@@ -9239,7 +9283,7 @@ const DROPDOWN_PADDING_CLASSES = {
9239
9283
  return;
9240
9284
  }
9241
9285
 
9242
- if (this.navigationType === this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS) {
9286
+ if (this.isArrowKeyNav) {
9243
9287
  return this.onUpKey();
9244
9288
  }
9245
9289
  },
@@ -9250,29 +9294,35 @@ const DROPDOWN_PADDING_CLASSES = {
9250
9294
  return;
9251
9295
  }
9252
9296
 
9253
- if (this.navigationType === this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS) {
9297
+ if (this.isArrowKeyNav) {
9254
9298
  return this.onDownKey();
9255
9299
  }
9256
9300
  },
9257
9301
 
9258
9302
  onHomeKeyPress() {
9259
- if (!this.isOpen) {
9303
+ if (!this.isOpen || !this.isArrowKeyNav) {
9260
9304
  return;
9261
9305
  }
9262
9306
 
9263
- if (this.navigationType === this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS) {
9264
- return this.onHomeKey();
9265
- }
9307
+ return this.onHomeKey();
9266
9308
  },
9267
9309
 
9268
9310
  onEndKeyPress() {
9269
- if (!this.isOpen) {
9311
+ if (!this.isOpen || !this.isArrowKeyNav) {
9270
9312
  return;
9271
9313
  }
9272
9314
 
9273
- if (this.navigationType === this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS) {
9274
- return this.onEndKey();
9315
+ return this.onEndKey();
9316
+ },
9317
+
9318
+ onKeyPress(e) {
9319
+ if (!this.isOpen || !this.isArrowKeyNav || !this.isValidLetter(e.key)) {
9320
+ return;
9275
9321
  }
9322
+
9323
+ e.stopPropagation();
9324
+ e.preventDefault();
9325
+ return this.onNavigationKey(e.key);
9276
9326
  },
9277
9327
 
9278
9328
  onKeyValidation(e, eventHandler) {
@@ -9293,7 +9343,7 @@ const DROPDOWN_PADDING_CLASSES = {
9293
9343
 
9294
9344
 
9295
9345
  ;
9296
- const dropdown_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(dropdownvue_type_script_lang_js, [['render',dropdownvue_type_template_id_071e4ebc_render]])
9346
+ const dropdown_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(dropdownvue_type_script_lang_js, [['render',dropdownvue_type_template_id_e86dedbc_render]])
9297
9347
 
9298
9348
  /* harmony default export */ const dropdown = (dropdown_exports_);
9299
9349
  ;// CONCATENATED MODULE: ./components/dropdown/index.js
@@ -9458,7 +9508,7 @@ async function codeToEmojiData(code) {
9458
9508
  // @returns {string[]}
9459
9509
 
9460
9510
  function findShortCodes(textContent) {
9461
- const shortCodes = textContent.match(/:[^:]+:/g);
9511
+ const shortCodes = textContent.match(/:\w+:/g);
9462
9512
  const filtered = shortCodes ? shortCodes.filter(code => shortcodeToEmojiData(code)) : [];
9463
9513
  return new Set(filtered);
9464
9514
  } // Finds every emoji in slot text
@@ -13359,79 +13409,64 @@ const checkbox_group_exports_ = checkbox_groupvue_type_script_lang_js;
13359
13409
  /* harmony default export */ const checkbox_group = (checkbox_group_exports_);
13360
13410
  ;// CONCATENATED MODULE: ./components/checkbox_group/index.js
13361
13411
 
13362
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/chip/chip.vue?vue&type=template&id=4d7bb584
13412
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/chip/chip.vue?vue&type=template&id=8a56dabe
13363
13413
 
13364
- const chipvue_type_template_id_4d7bb584_hoisted_1 = ["id", "tabindex", "aria-labelledby", "aria-label"];
13365
- const chipvue_type_template_id_4d7bb584_hoisted_2 = {
13414
+ const chipvue_type_template_id_8a56dabe_hoisted_1 = {
13415
+ class: "d-chip"
13416
+ };
13417
+ const chipvue_type_template_id_8a56dabe_hoisted_2 = {
13366
13418
  key: 0,
13367
13419
  "data-qa": "dt-chip-icon",
13368
13420
  class: "d-chip__icon"
13369
13421
  };
13370
- const chipvue_type_template_id_4d7bb584_hoisted_3 = {
13422
+ const chipvue_type_template_id_8a56dabe_hoisted_3 = {
13371
13423
  key: 1,
13372
13424
  "data-qa": "dt-chip-avatar"
13373
13425
  };
13374
- const chipvue_type_template_id_4d7bb584_hoisted_4 = ["id"];
13375
- const chipvue_type_template_id_4d7bb584_hoisted_5 = {
13376
- key: 3,
13377
- class: "d-chip-btn-holder"
13378
- };
13379
- const chipvue_type_template_id_4d7bb584_hoisted_6 = {
13380
- ref: "closeBtnContainer",
13381
- class: "d-chip-btn-container"
13382
- };
13383
- function chipvue_type_template_id_4d7bb584_render(_ctx, _cache, $props, $setup, $data, $options) {
13426
+ const chipvue_type_template_id_8a56dabe_hoisted_4 = ["id"];
13427
+ function chipvue_type_template_id_8a56dabe_render(_ctx, _cache, $props, $setup, $data, $options) {
13384
13428
  const _component_icon_close = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("icon-close");
13385
13429
 
13386
13430
  const _component_dt_button = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-button");
13387
13431
 
13388
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
13432
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_8a56dabe_hoisted_1, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveDynamicComponent)($props.interactive ? 'button' : 'span'), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
13389
13433
  id: $props.id,
13390
- class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)($options.chipClasses()),
13434
+ type: $props.interactive && 'button',
13435
+ class: $options.chipClasses(),
13391
13436
  "data-qa": "dt-chip",
13392
- tabindex: $options.tabIndex,
13393
13437
  "aria-labelledby": $props.ariaLabel ? undefined : "".concat($props.id, "-content"),
13394
- "aria-label": $props.ariaLabel,
13395
- onMousedown: _cache[1] || (_cache[1] = function () {
13396
- return $options.onClick && $options.onClick(...arguments);
13397
- }),
13398
- onMouseup: _cache[2] || (_cache[2] = function () {
13399
- return $options.onClick && $options.onClick(...arguments);
13400
- }),
13401
- onMouseleave: _cache[3] || (_cache[3] = $event => $data.isActive = false),
13402
- onFocusout: _cache[4] || (_cache[4] = $event => $data.isActive = false),
13403
- onKeydown: _cache[5] || (_cache[5] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)(function () {
13404
- return $options.onClick && $options.onClick(...arguments);
13405
- }, ["enter"])),
13406
- onKeyup: [_cache[6] || (_cache[6] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)(function () {
13407
- return $options.onClick && $options.onClick(...arguments);
13408
- }, ["enter"])), _cache[7] || (_cache[7] = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withKeys)(function () {
13409
- return $options.onClose && $options.onClose(...arguments);
13410
- }, ["delete"]))]
13411
- }, [_ctx.$slots.icon ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_4d7bb584_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "icon")])) : _ctx.$slots.avatar ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_4d7bb584_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "avatar")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), _ctx.$slots.default ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
13412
- key: 2,
13413
- id: "".concat($props.id, "-content"),
13414
- "data-qa": "dt-chip-label",
13415
- class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(['d-truncate', $props.contentClass])
13416
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "default")], 10, chipvue_type_template_id_4d7bb584_hoisted_4)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), !$props.hideClose ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_4d7bb584_hoisted_5)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", chipvue_type_template_id_4d7bb584_hoisted_6, [!$props.hideClose ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_dt_button, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
13438
+ "aria-label": $props.ariaLabel
13439
+ }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toHandlers)($options.chipListeners)), {
13440
+ default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [_ctx.$slots.icon ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_8a56dabe_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "icon")])) : _ctx.$slots.avatar ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", chipvue_type_template_id_8a56dabe_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "avatar")])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), _ctx.$slots.default ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", {
13441
+ key: 2,
13442
+ id: "".concat($props.id, "-content"),
13443
+ "data-qa": "dt-chip-label",
13444
+ class: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(['d-truncate', 'd-chip__text', $props.contentClass])
13445
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderSlot)(_ctx.$slots, "default")], 10, chipvue_type_template_id_8a56dabe_hoisted_4)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]),
13446
+ _: 3
13447
+ }, 16, ["id", "type", "class", "aria-labelledby", "aria-label"])), !$props.hideClose ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_dt_button, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.mergeProps)({
13417
13448
  key: 0
13418
13449
  }, $props.closeButtonProps, {
13450
+ class: $options.chipCloseButtonClasses(),
13419
13451
  "data-qa": "dt-chip-close",
13420
- circle: "",
13421
- importance: "clear",
13422
13452
  "aria-label": $props.closeButtonProps.ariaLabel,
13423
13453
  onClick: _cache[0] || (_cache[0] = $event => _ctx.$emit('close'))
13424
13454
  }), {
13425
- default: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_icon_close)]),
13455
+ icon: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.withCtx)(() => [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_icon_close)]),
13426
13456
  _: 1
13427
- }, 16, ["aria-label"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 512)], 42, chipvue_type_template_id_4d7bb584_hoisted_1);
13457
+ }, 16, ["class", "aria-label"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]);
13428
13458
  }
13429
- ;// CONCATENATED MODULE: ./components/chip/chip.vue?vue&type=template&id=4d7bb584
13459
+ ;// CONCATENATED MODULE: ./components/chip/chip.vue?vue&type=template&id=8a56dabe
13430
13460
 
13431
13461
  ;// CONCATENATED MODULE: ./components/chip/chip_constants.js
13432
13462
  const CHIP_SIZE_MODIFIERS = {
13433
- xs: 'd-chip--xs',
13434
- sm: 'd-chip--sm',
13463
+ xs: 'd-chip__label--xs',
13464
+ sm: 'd-chip__label--sm',
13465
+ md: ''
13466
+ };
13467
+ const CHIP_CLOSE_BUTTON_SIZE_MODIFIERS = {
13468
+ xs: 'd-chip__close--xs',
13469
+ sm: 'd-chip__close--sm',
13435
13470
  md: ''
13436
13471
  };
13437
13472
  /* harmony default export */ const chip_constants = ({
@@ -13515,7 +13550,7 @@ const CHIP_SIZE_MODIFIERS = {
13515
13550
  default: ''
13516
13551
  }
13517
13552
  },
13518
- emits: ['click', 'close'],
13553
+ emits: ['click', 'close', 'keyup'],
13519
13554
 
13520
13555
  data() {
13521
13556
  return {
@@ -13524,37 +13559,37 @@ const CHIP_SIZE_MODIFIERS = {
13524
13559
  },
13525
13560
 
13526
13561
  computed: {
13527
- tabIndex() {
13528
- return this.interactive ? 0 : -1;
13562
+ chipListeners() {
13563
+ return {
13564
+ click: event => {
13565
+ if (this.interactive) this.$emit('click', event);
13566
+ },
13567
+ keyup: event => {
13568
+ var _event$code;
13569
+
13570
+ if (((_event$code = event.code) === null || _event$code === void 0 ? void 0 : _event$code.toLowerCase()) === 'delete') {
13571
+ this.onClose();
13572
+ } else {
13573
+ this.$emit('keyup', event);
13574
+ }
13575
+ }
13576
+ };
13529
13577
  }
13530
13578
 
13531
13579
  },
13532
13580
  methods: {
13533
13581
  chipClasses() {
13534
- return ['d-chip', CHIP_SIZE_MODIFIERS[this.size], {
13535
- 'd-chip--interactive': this.interactive,
13536
- 'd-chip--active': this.isActive
13537
- }];
13582
+ return ['d-chip__label', CHIP_SIZE_MODIFIERS[this.size]];
13583
+ },
13584
+
13585
+ chipCloseButtonClasses() {
13586
+ return ['d-chip__close', CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size]];
13538
13587
  },
13539
13588
 
13540
13589
  onClose() {
13541
13590
  if (!this.hideClose) {
13542
13591
  this.$emit('close');
13543
13592
  }
13544
- },
13545
-
13546
- onClick(event) {
13547
- // Clicking on the button should not update value of isActive.
13548
- if (!this.interactive || this.$refs.closeBtnContainer.contains(event.target)) {
13549
- return;
13550
- }
13551
-
13552
- if (event.type === 'mousedown' || event.type === 'keydown') {
13553
- this.isActive = true;
13554
- } else {
13555
- this.isActive = false;
13556
- this.$emit('click');
13557
- }
13558
13593
  }
13559
13594
 
13560
13595
  }
@@ -13567,7 +13602,7 @@ const CHIP_SIZE_MODIFIERS = {
13567
13602
 
13568
13603
 
13569
13604
  ;
13570
- const chip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(chipvue_type_script_lang_js, [['render',chipvue_type_template_id_4d7bb584_render]])
13605
+ const chip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(chipvue_type_script_lang_js, [['render',chipvue_type_template_id_8a56dabe_render]])
13571
13606
 
13572
13607
  /* harmony default export */ const chip = (chip_exports_);
13573
13608
  ;// CONCATENATED MODULE: ./components/chip/index.js
@@ -14275,15 +14310,15 @@ const toggle_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(togglevue_t
14275
14310
  /* harmony default export */ const toggle = (toggle_exports_);
14276
14311
  ;// CONCATENATED MODULE: ./components/toggle/index.js
14277
14312
 
14278
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/tooltip/tooltip.vue?vue&type=template&id=600c8e6a
14313
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/tooltip/tooltip.vue?vue&type=template&id=044c8b20
14279
14314
 
14280
- const tooltipvue_type_template_id_600c8e6a_hoisted_1 = {
14315
+ const tooltipvue_type_template_id_044c8b20_hoisted_1 = {
14281
14316
  "data-qa": "dt-tooltip-container"
14282
14317
  };
14283
- function tooltipvue_type_template_id_600c8e6a_render(_ctx, _cache, $props, $setup, $data, $options) {
14318
+ function tooltipvue_type_template_id_044c8b20_render(_ctx, _cache, $props, $setup, $data, $options) {
14284
14319
  const _component_dt_lazy_show = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("dt-lazy-show");
14285
14320
 
14286
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", tooltipvue_type_template_id_600c8e6a_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
14321
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", tooltipvue_type_template_id_044c8b20_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
14287
14322
  ref: "anchor",
14288
14323
  "data-qa": "dt-tooltip-anchor",
14289
14324
  onFocusin: _cache[0] || (_cache[0] = function () {
@@ -14320,7 +14355,7 @@ function tooltipvue_type_template_id_600c8e6a_render(_ctx, _cache, $props, $setu
14320
14355
  _: 3
14321
14356
  }, 8, ["id", "show", "transition", "class", "onAfterLeave", "onAfterEnter"])]);
14322
14357
  }
14323
- ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=template&id=600c8e6a
14358
+ ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=template&id=044c8b20
14324
14359
 
14325
14360
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip_constants.js
14326
14361
  /*
@@ -14384,7 +14419,7 @@ const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];
14384
14419
  */
14385
14420
  offset: {
14386
14421
  type: Array,
14387
- default: () => [0, 0]
14422
+ default: () => [0, -4]
14388
14423
  },
14389
14424
 
14390
14425
  /**
@@ -14596,9 +14631,9 @@ const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];
14596
14631
  });
14597
14632
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=script&lang=js
14598
14633
 
14599
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-74.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-74.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[3]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-74.use[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/tooltip/tooltip.vue?vue&type=style&index=0&id=600c8e6a&lang=less
14600
- var tooltipvue_type_style_index_0_id_600c8e6a_lang_less = __webpack_require__(877);
14601
- ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=style&index=0&id=600c8e6a&lang=less
14634
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-74.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-74.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-74.use[3]!./node_modules/less-loader/dist/cjs.js??clonedRuleSet-74.use[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./components/tooltip/tooltip.vue?vue&type=style&index=0&id=044c8b20&lang=less
14635
+ var tooltipvue_type_style_index_0_id_044c8b20_lang_less = __webpack_require__(273);
14636
+ ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue?vue&type=style&index=0&id=044c8b20&lang=less
14602
14637
 
14603
14638
  ;// CONCATENATED MODULE: ./components/tooltip/tooltip.vue
14604
14639
 
@@ -14608,7 +14643,7 @@ var tooltipvue_type_style_index_0_id_600c8e6a_lang_less = __webpack_require__(87
14608
14643
  ;
14609
14644
 
14610
14645
 
14611
- const tooltip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(tooltipvue_type_script_lang_js, [['render',tooltipvue_type_template_id_600c8e6a_render]])
14646
+ const tooltip_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(tooltipvue_type_script_lang_js, [['render',tooltipvue_type_template_id_044c8b20_render]])
14612
14647
 
14613
14648
  /* harmony default export */ const tooltip = (tooltip_exports_);
14614
14649
  ;// CONCATENATED MODULE: ./components/tooltip/index.js