@dialpad/dialtone-vue 2.124.0 → 2.125.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +33 -0
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +1 -0
- package/dist/chunks/dropdown-SMWaTWyF.js +357 -0
- package/dist/chunks/dropdown-SMWaTWyF.js.map +1 -0
- package/dist/chunks/dropdown_constants-EUcDxBrX.js +9 -0
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +1 -0
- package/dist/chunks/icon_constants-OpYAAKwF.js +16 -0
- package/dist/chunks/icon_constants-OpYAAKwF.js.map +1 -0
- package/dist/chunks/index-nIyl_PL6.js +372 -0
- package/dist/chunks/index-nIyl_PL6.js.map +1 -0
- package/dist/chunks/index-o4OMWMuv.js +244 -0
- package/dist/chunks/index-o4OMWMuv.js.map +1 -0
- package/dist/chunks/input-1tm09l_-.js +273 -0
- package/dist/chunks/input-1tm09l_-.js.map +1 -0
- package/dist/chunks/input_group-zcAq3DQl.js +141 -0
- package/dist/chunks/input_group-zcAq3DQl.js.map +1 -0
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +197 -0
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js.map +1 -0
- package/dist/chunks/link_constants-vIUB92L4.js +16 -0
- package/dist/chunks/link_constants-vIUB92L4.js.map +1 -0
- package/dist/chunks/list_item_constants-LTUc74pD.js +13 -0
- package/dist/chunks/list_item_constants-LTUc74pD.js.map +1 -0
- package/dist/chunks/modal-VuMFkZFH.js +82 -0
- package/dist/chunks/modal-VuMFkZFH.js.map +1 -0
- package/dist/chunks/notice_action-9NmtQRai.js +182 -0
- package/dist/chunks/notice_action-9NmtQRai.js.map +1 -0
- package/dist/chunks/notice_constants-c--hBFQw.js +6 -0
- package/dist/chunks/notice_constants-c--hBFQw.js.map +1 -0
- package/dist/chunks/popover_constants-qjlEkroB.js +114 -0
- package/dist/chunks/popover_constants-qjlEkroB.js.map +1 -0
- package/dist/chunks/sr_only_close_button-JGole5Xi.js +86 -0
- package/dist/chunks/sr_only_close_button-JGole5Xi.js.map +1 -0
- package/dist/chunks/stack_constants-u7tNqGtc.js +13 -0
- package/dist/chunks/stack_constants-u7tNqGtc.js.map +1 -0
- package/dist/chunks/tab-Qm9LVkYj.js +346 -0
- package/dist/chunks/tab-Qm9LVkYj.js.map +1 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.js +356 -10364
- package/dist/dialtone-vue.js.map +1 -0
- package/dist/lib/attachment-carousel.js +250 -0
- package/dist/lib/attachment-carousel.js.map +1 -0
- package/dist/lib/avatar.js +369 -0
- package/dist/lib/avatar.js.map +1 -0
- package/dist/lib/badge.js +169 -0
- package/dist/lib/badge.js.map +1 -0
- package/dist/lib/banner.js +200 -0
- package/dist/lib/banner.js.map +1 -0
- package/dist/lib/breadcrumbs.js +138 -0
- package/dist/lib/breadcrumbs.js.map +1 -0
- package/dist/lib/button-group.js +45 -0
- package/dist/lib/button-group.js.map +1 -0
- package/dist/lib/button.js +328 -0
- package/dist/lib/button.js.map +1 -0
- package/dist/lib/callbar-button-with-popover.js +235 -0
- package/dist/lib/callbar-button-with-popover.js.map +1 -0
- package/dist/lib/callbar-button.js +175 -0
- package/dist/lib/callbar-button.js.map +1 -0
- package/dist/lib/callbox.js +142 -0
- package/dist/lib/callbox.js.map +1 -0
- package/dist/lib/card.js +72 -0
- package/dist/lib/card.js.map +1 -0
- package/dist/lib/checkbox-group.js +117 -0
- package/dist/lib/checkbox-group.js.map +1 -0
- package/dist/lib/checkbox.js +117 -0
- package/dist/lib/checkbox.js.map +1 -0
- package/dist/lib/chip.js +186 -0
- package/dist/lib/chip.js.map +1 -0
- package/dist/lib/codeblock.js +29 -0
- package/dist/lib/codeblock.js.map +1 -0
- package/dist/lib/collapsible.js +313 -0
- package/dist/lib/collapsible.js.map +1 -0
- package/dist/lib/combobox-multi-select.js +433 -0
- package/dist/lib/combobox-multi-select.js.map +1 -0
- package/dist/lib/combobox-with-popover.js +341 -0
- package/dist/lib/combobox-with-popover.js.map +1 -0
- package/dist/lib/combobox.js +19 -0
- package/dist/lib/combobox.js.map +1 -0
- package/dist/lib/constants.js +53 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/contact-info.js +145 -0
- package/dist/lib/contact-info.js.map +1 -0
- package/dist/lib/contact-row.js +203 -0
- package/dist/lib/contact-row.js.map +1 -0
- package/dist/lib/datepicker.js +552 -0
- package/dist/lib/datepicker.js.map +1 -0
- package/dist/lib/dates.js +57 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/description-list.js +83 -0
- package/dist/lib/description-list.js.map +1 -0
- package/dist/lib/dropdown.js +45 -0
- package/dist/lib/dropdown.js.map +1 -0
- package/dist/lib/editor.js +527 -0
- package/dist/lib/editor.js.map +1 -0
- package/dist/{emoji_picker-kiTOKaq8.js → lib/emoji-picker.js} +30 -11
- package/dist/lib/emoji-picker.js.map +1 -0
- package/dist/lib/emoji-row.js +83 -0
- package/dist/lib/emoji-row.js.map +1 -0
- package/dist/{emoji_text_wrapper-48ClwKvf.js → lib/emoji-text-wrapper.js} +19 -13
- package/dist/lib/emoji-text-wrapper.js.map +1 -0
- package/dist/lib/emoji.js +11 -0
- package/dist/lib/emoji.js.map +1 -0
- package/dist/lib/feed-item-row.js +207 -0
- package/dist/lib/feed-item-row.js.map +1 -0
- package/dist/lib/feed-pill.js +142 -0
- package/dist/lib/feed-pill.js.map +1 -0
- package/dist/lib/general-row.js +379 -0
- package/dist/lib/general-row.js.map +1 -0
- package/dist/lib/group-row.js +115 -0
- package/dist/lib/group-row.js.map +1 -0
- package/dist/lib/grouped-chip.js +45 -0
- package/dist/lib/grouped-chip.js.map +1 -0
- package/dist/lib/hovercard.js +194 -0
- package/dist/lib/hovercard.js.map +1 -0
- package/dist/lib/icon.js +82 -0
- package/dist/lib/icon.js.map +1 -0
- package/dist/lib/image-viewer.js +171 -0
- package/dist/lib/image-viewer.js.map +1 -0
- package/dist/lib/input-group.js +90 -0
- package/dist/lib/input-group.js.map +1 -0
- package/dist/lib/input.js +455 -0
- package/dist/lib/input.js.map +1 -0
- package/dist/lib/item-layout.js +39 -0
- package/dist/lib/item-layout.js.map +1 -0
- package/dist/lib/ivr-node.js +195 -0
- package/dist/lib/ivr-node.js.map +1 -0
- package/dist/lib/keyboard-shortcut.js +100 -0
- package/dist/lib/keyboard-shortcut.js.map +1 -0
- package/dist/lib/lazy-show.js +77 -0
- package/dist/lib/lazy-show.js.map +1 -0
- package/dist/lib/link.js +69 -0
- package/dist/lib/link.js.map +1 -0
- package/dist/lib/list-item-group.js +59 -0
- package/dist/lib/list-item-group.js.map +1 -0
- package/dist/lib/list-item.js +195 -0
- package/dist/lib/list-item.js.map +1 -0
- package/dist/{message_input.js → lib/message-input.js} +107 -55
- package/dist/lib/message-input.js.map +1 -0
- package/dist/lib/mixins.js +17 -0
- package/dist/lib/mixins.js.map +1 -0
- package/dist/lib/modal.js +324 -0
- package/dist/lib/modal.js.map +1 -0
- package/dist/lib/notice.js +158 -0
- package/dist/lib/notice.js.map +1 -0
- package/dist/lib/pagination.js +142 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/lib/popover.js +779 -0
- package/dist/lib/popover.js.map +1 -0
- package/dist/lib/presence.js +60 -0
- package/dist/lib/presence.js.map +1 -0
- package/dist/lib/radio-group.js +97 -0
- package/dist/lib/radio-group.js.map +1 -0
- package/dist/lib/radio.js +111 -0
- package/dist/lib/radio.js.map +1 -0
- package/dist/lib/rich-text-editor.js +920 -0
- package/dist/lib/rich-text-editor.js.map +1 -0
- package/dist/lib/root-layout.js +127 -0
- package/dist/lib/root-layout.js.map +1 -0
- package/dist/lib/select-menu.js +243 -0
- package/dist/lib/select-menu.js.map +1 -0
- package/dist/lib/settings-menu-button.js +65 -0
- package/dist/lib/settings-menu-button.js.map +1 -0
- package/dist/lib/skeleton.js +574 -0
- package/dist/lib/skeleton.js.map +1 -0
- package/dist/lib/stack.js +118 -0
- package/dist/lib/stack.js.map +1 -0
- package/dist/lib/tabs.js +93 -0
- package/dist/lib/tabs.js.map +1 -0
- package/dist/lib/time-pill.js +43 -0
- package/dist/lib/time-pill.js.map +1 -0
- package/dist/lib/toast.js +226 -0
- package/dist/lib/toast.js.map +1 -0
- package/dist/lib/toggle.js +169 -0
- package/dist/lib/toggle.js.map +1 -0
- package/dist/{directives.js → lib/tooltip-directive.js} +24 -17
- package/dist/lib/tooltip-directive.js.map +1 -0
- package/dist/lib/tooltip.js +376 -0
- package/dist/lib/tooltip.js.map +1 -0
- package/dist/lib/top-banner-info.js +60 -0
- package/dist/lib/top-banner-info.js.map +1 -0
- package/dist/lib/unread-pill.js +61 -0
- package/dist/lib/unread-pill.js.map +1 -0
- package/dist/lib/utils.js +175 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validation-messages.js +83 -0
- package/dist/lib/validation-messages.js.map +1 -0
- package/dist/lib/validators.js +12 -0
- package/dist/lib/validators.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/common/{constants.d.ts → constants/index.d.ts} +1 -1
- package/dist/types/common/constants/index.d.ts.map +1 -0
- package/dist/types/common/{dates.d.ts → dates/index.d.ts} +1 -1
- package/dist/types/common/dates/index.d.ts.map +1 -0
- package/dist/types/common/{emoji.d.ts → emoji/index.d.ts} +1 -1
- package/dist/types/common/{emoji.d.ts.map → emoji/index.d.ts.map} +1 -1
- package/dist/types/common/{utils.d.ts → utils/index.d.ts} +1 -1
- package/dist/types/common/utils/index.d.ts.map +1 -0
- package/dist/types/common/{validators.d.ts → validators/index.d.ts} +1 -1
- package/dist/types/common/validators/index.d.ts.map +1 -0
- package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/components/button/button.vue.d.ts +2 -2
- package/dist/types/components/card/card.vue.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.vue.d.ts +7 -7
- package/dist/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +2 -2
- package/dist/types/components/collapsible/collapsible.vue.d.ts +3 -3
- package/dist/types/components/combobox/combobox.vue.d.ts +7 -8
- package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
- package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
- package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -219
- package/dist/types/components/icon/icon.vue.d.ts +20 -16
- package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
- package/dist/types/components/icon/icon_constants.d.ts +2 -0
- package/dist/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/input_group/input_group.vue.d.ts +15 -6
- package/dist/types/components/input_group/input_group.vue.d.ts.map +1 -1
- package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
- package/dist/types/components/modal/modal.vue.d.ts +7 -2
- package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/types/components/notice/notice_action.vue.d.ts +3 -1
- package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
- package/dist/types/components/radio/radio.vue.d.ts +2 -12
- package/dist/types/components/radio/radio.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
- package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts +8 -3
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts.map +1 -1
- package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
- package/dist/types/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/index.d.ts +36 -29
- package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -0
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/package.json +19 -59
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -2890
- package/dist/dialtone-vue.cjs +0 -5
- package/dist/directives.cjs +0 -1
- package/dist/emoji.cjs +0 -1
- package/dist/emoji.js +0 -35
- package/dist/emoji_picker-njWWAm6V.cjs +0 -1
- package/dist/emoji_text_wrapper-ZlynvHnd.cjs +0 -1
- package/dist/index-OF94C6nQ.js +0 -142833
- package/dist/index-Wx7Jagcr.cjs +0 -1
- package/dist/message_input.cjs +0 -1
- package/dist/rich_text_editor-9sMob7ck.js +0 -16478
- package/dist/rich_text_editor-Eh5kYokw.cjs +0 -97
- package/dist/tooltip-88U5vFMA.js +0 -2516
- package/dist/tooltip-i2wxFIIi.cjs +0 -21
- package/dist/types/common/constants.d.ts.map +0 -1
- package/dist/types/common/dates.d.ts.map +0 -1
- package/dist/types/common/utils.d.ts.map +0 -1
- package/dist/types/common/validators.d.ts.map +0 -1
- package/dist/types/components/emoji_picker/emojis/index.d.ts +0 -50
- package/dist/types/components/emoji_picker/emojis/index.d.ts.map +0 -1
- package/dist/types/directives.d.ts +0 -2
- package/dist/types/directives.d.ts.map +0 -1
- package/dist/types/emoji.d.ts +0 -5
- package/dist/types/emoji.d.ts.map +0 -1
- package/dist/types/message_input.d.ts +0 -3
- package/dist/types/message_input.d.ts.map +0 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import a from "./utils.js";
|
|
2
|
+
import { n as l } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
3
|
+
import { DtButton as n } from "./button.js";
|
|
4
|
+
import { DtTooltip as i } from "./tooltip.js";
|
|
5
|
+
import "./constants.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
import "../chunks/link_constants-vIUB92L4.js";
|
|
8
|
+
import "../chunks/popover_constants-qjlEkroB.js";
|
|
9
|
+
import "tippy.js";
|
|
10
|
+
import "./lazy-show.js";
|
|
11
|
+
const o = ["sm", "md", "lg", "xl"], s = {
|
|
12
|
+
name: "DtRecipeCallbarButton",
|
|
13
|
+
components: { DtButton: n, DtTooltip: i },
|
|
14
|
+
inheritAttrs: !1,
|
|
15
|
+
props: {
|
|
16
|
+
/**
|
|
17
|
+
* Id for the item.
|
|
18
|
+
*/
|
|
19
|
+
id: {
|
|
20
|
+
type: String,
|
|
21
|
+
default() {
|
|
22
|
+
return a.getUniqueString();
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether the button should have active styling
|
|
27
|
+
* default is false.
|
|
28
|
+
* @values true, false
|
|
29
|
+
* @see https://dialtone.dialpad.com/components/button/
|
|
30
|
+
*/
|
|
31
|
+
active: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !1
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Determines whether the button should have danger styling
|
|
37
|
+
* default is false.
|
|
38
|
+
* @values true, false
|
|
39
|
+
* @see https://dialtone.dialpad.com/components/button/
|
|
40
|
+
*/
|
|
41
|
+
danger: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Determines whether the button should be disabled
|
|
47
|
+
* default is false.
|
|
48
|
+
* @values true, false
|
|
49
|
+
*/
|
|
50
|
+
disabled: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !1
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Whether the button is a circle or not.
|
|
56
|
+
* @values true, false
|
|
57
|
+
* @see https://dialtone.dialpad.com/components/button/
|
|
58
|
+
*/
|
|
59
|
+
circle: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: !1
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Aria label for the button. If empty, it takes its value from the default slot.
|
|
65
|
+
*/
|
|
66
|
+
ariaLabel: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: null,
|
|
69
|
+
validator: (e) => e || (void 0).$slots.default
|
|
70
|
+
},
|
|
71
|
+
/**
|
|
72
|
+
* Additional class name for the button wrapper element.
|
|
73
|
+
*/
|
|
74
|
+
buttonClass: {
|
|
75
|
+
type: [String, Array, Object],
|
|
76
|
+
default: ""
|
|
77
|
+
},
|
|
78
|
+
/**
|
|
79
|
+
* Additional class name for the button text.
|
|
80
|
+
*/
|
|
81
|
+
textClass: {
|
|
82
|
+
type: [String, Array, Object],
|
|
83
|
+
default: ""
|
|
84
|
+
},
|
|
85
|
+
/*
|
|
86
|
+
* Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.
|
|
87
|
+
*/
|
|
88
|
+
buttonWidthSize: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "xl",
|
|
91
|
+
validator: (e) => o.includes(e)
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* The fill and outline of the button associated with its visual importance.
|
|
95
|
+
* @values clear, outlined, primary
|
|
96
|
+
*/
|
|
97
|
+
importance: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: ""
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
emits: [
|
|
103
|
+
/**
|
|
104
|
+
* Native click event
|
|
105
|
+
*
|
|
106
|
+
* @event click
|
|
107
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
108
|
+
*/
|
|
109
|
+
"click"
|
|
110
|
+
],
|
|
111
|
+
computed: {
|
|
112
|
+
callbarButtonClass() {
|
|
113
|
+
return [
|
|
114
|
+
this.buttonClass,
|
|
115
|
+
"dt-recipe-callbar-button",
|
|
116
|
+
"d-px0",
|
|
117
|
+
{
|
|
118
|
+
"dt-recipe-callbar-button--circle": this.circle,
|
|
119
|
+
"dt-recipe-callbar-button--active": this.active,
|
|
120
|
+
"dt-recipe-callbar-button--danger": this.danger,
|
|
121
|
+
"d-btn--disabled d-bgc-transparent": this.disabled,
|
|
122
|
+
"d-fc-primary": !this.disabled
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
},
|
|
126
|
+
callbarButtonTextClass() {
|
|
127
|
+
return [
|
|
128
|
+
"d-fs-100 lg:d-d-none md:d-d-none sm:d-d-none",
|
|
129
|
+
this.textClass
|
|
130
|
+
];
|
|
131
|
+
},
|
|
132
|
+
buttonWidth() {
|
|
133
|
+
switch (this.buttonWidthSize) {
|
|
134
|
+
case "sm":
|
|
135
|
+
return "4.5rem";
|
|
136
|
+
case "md":
|
|
137
|
+
return "6rem";
|
|
138
|
+
default:
|
|
139
|
+
return "8.4rem";
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
buttonImportance() {
|
|
143
|
+
return this.importance ? this.importance : this.circle ? "outlined" : "clear";
|
|
144
|
+
},
|
|
145
|
+
callbarButtonListeners() {
|
|
146
|
+
return {
|
|
147
|
+
...this.$listeners,
|
|
148
|
+
click: (e) => this.$emit("click", e)
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
var d = function() {
|
|
154
|
+
var t = this, r = t._self._c;
|
|
155
|
+
return r("dt-tooltip", { attrs: { id: t.id, offset: [0, 8] }, scopedSlots: t._u([{ key: "anchor", fn: function() {
|
|
156
|
+
return [r("span", { class: { "dt-recipe-callbar-button--disabled": t.disabled } }, [r("dt-button", t._g(t._b({ class: t.callbarButtonClass, attrs: { importance: t.buttonImportance, kind: "muted", "icon-position": "top", "aria-disabled": t.disabled, "aria-label": t.ariaLabel, "label-class": t.callbarButtonTextClass, width: t.buttonWidth }, scopedSlots: t._u([{ key: "icon", fn: function() {
|
|
157
|
+
return [t._t("icon")];
|
|
158
|
+
}, proxy: !0 }], null, !0) }, "dt-button", t.$attrs, !1), t.callbarButtonListeners), [t._t("default")], 2)], 1)];
|
|
159
|
+
}, proxy: !0 }], null, !0) }, [t._t("tooltip")], 2);
|
|
160
|
+
}, c = [], u = /* @__PURE__ */ l(
|
|
161
|
+
s,
|
|
162
|
+
d,
|
|
163
|
+
c,
|
|
164
|
+
!1,
|
|
165
|
+
null,
|
|
166
|
+
null,
|
|
167
|
+
null,
|
|
168
|
+
null
|
|
169
|
+
);
|
|
170
|
+
const S = u.exports;
|
|
171
|
+
export {
|
|
172
|
+
o as CALLBAR_BUTTON_VALID_WIDTH_SIZE,
|
|
173
|
+
S as DtRecipeCallbarButton
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=callbar-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callbar-button.js","sources":["../../recipes/buttons/callbar_button/callbar_button_constants.js","../../recipes/buttons/callbar_button/callbar_button.vue"],"sourcesContent":["export const CALLBAR_BUTTON_VALID_WIDTH_SIZE = ['sm', 'md', 'lg', 'xl'];\n\nexport default {\n CALLBAR_BUTTON_VALID_WIDTH_SIZE,\n};\n","<template>\n <dt-tooltip\n :id=\"id\"\n :offset=\"[0, 8]\"\n >\n <template #anchor>\n <span\n :class=\"{ 'dt-recipe-callbar-button--disabled': disabled }\"\n >\n <dt-button\n :importance=\"buttonImportance\"\n kind=\"muted\"\n icon-position=\"top\"\n :aria-disabled=\"disabled\"\n :aria-label=\"ariaLabel\"\n :label-class=\"callbarButtonTextClass\"\n :width=\"buttonWidth\"\n :class=\"callbarButtonClass\"\n v-bind=\"$attrs\"\n v-on=\"callbarButtonListeners\"\n >\n <slot />\n <template #icon>\n <slot name=\"icon\" />\n </template>\n </dt-button>\n </span>\n </template>\n <slot name=\"tooltip\" />\n </dt-tooltip>\n</template>\n\n<script>\nimport { CALLBAR_BUTTON_VALID_WIDTH_SIZE } from './callbar_button_constants';\nimport { DtButton } from '@/components/button';\nimport { DtTooltip } from '@/components/tooltip';\nimport utils from '@/common/utils';\n\nexport default {\n name: 'DtRecipeCallbarButton',\n\n components: { DtButton, DtTooltip },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Id for the item.\n */\n id: {\n type: String,\n default () {\n return utils.getUniqueString();\n },\n },\n\n /**\n * Determines whether the button should have active styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n active: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should have danger styling\n * default is false.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n danger: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines whether the button should be disabled\n * default is false.\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the button is a circle or not.\n * @values true, false\n * @see https://dialtone.dialpad.com/components/button/\n */\n circle: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Aria label for the button. If empty, it takes its value from the default slot.\n */\n ariaLabel: {\n type: String,\n default: null,\n validator: (label) => {\n return label || this.$slots.default;\n },\n },\n\n /**\n * Additional class name for the button wrapper element.\n */\n buttonClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the button text.\n */\n textClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /*\n * Width size. Valid values are: 'xl', 'lg', 'md' and 'sm'.\n */\n buttonWidthSize: {\n type: String,\n default: 'xl',\n validator: size => CALLBAR_BUTTON_VALID_WIDTH_SIZE.includes(size),\n },\n\n /**\n * The fill and outline of the button associated with its visual importance.\n * @values clear, outlined, primary\n */\n importance: {\n type: String,\n default: '',\n },\n\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n callbarButtonClass () {\n return [\n this.buttonClass,\n 'dt-recipe-callbar-button',\n 'd-px0',\n {\n 'dt-recipe-callbar-button--circle': this.circle,\n 'dt-recipe-callbar-button--active': this.active,\n 'dt-recipe-callbar-button--danger': this.danger,\n 'd-btn--disabled d-bgc-transparent': this.disabled,\n 'd-fc-primary': !this.disabled,\n }];\n },\n\n callbarButtonTextClass () {\n return [\n 'd-fs-100 lg:d-d-none md:d-d-none sm:d-d-none',\n this.textClass,\n ];\n },\n\n buttonWidth () {\n switch (this.buttonWidthSize) {\n case 'sm':\n return '4.5rem';\n case 'md':\n return '6rem';\n default:\n return '8.4rem';\n }\n },\n\n buttonImportance () {\n if (this.importance) {\n return this.importance;\n }\n return this.circle ? 'outlined' : 'clear';\n },\n\n callbarButtonListeners () {\n return {\n ...this.$listeners,\n click: (event) => this.$emit('click', event),\n };\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-recipe-callbar-button:not(.dt-recipe-callbar-button--circle) {\n line-height: var(--dt-font-line-height-300);\n}\n\n.dt-recipe-callbar-button--circle {\n border-radius: var(--dt-size-radius-circle);\n}\n\n.dt-recipe-callbar-button.d-btn[disabled] {\n background-color: unset;\n opacity: .5;\n}\n\n.dt-recipe-callbar-button--circle.d-btn[disabled] {\n border-color: unset;\n}\n\n.dt-recipe-callbar-button--active,\n.dt-recipe-callbar-button--active:hover {\n .base-button__icon {\n color: var(--primary-color);\n }\n}\n\n.dt-recipe-callbar-button--disabled {\n cursor: not-allowed;\n}\n</style>\n"],"names":["CALLBAR_BUTTON_VALID_WIDTH_SIZE","_sfc_main","DtButton","DtTooltip","utils","label","this","size","event"],"mappings":";;;;;;;;;;AAAY,MAACA,IAAkC,CAAC,MAAM,MAAM,MAAM,IAAI,GCsCtEC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,UAAAC,GAAA,WAAAC,EAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAAAC,SAAA,OAAA;AAAA,IAEA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAAP,EAAA,SAAAO,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EAEA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,qBAAA;AACA,aAAA;AAAA,QACA,KAAA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,UACA,oCAAA,KAAA;AAAA,UACA,oCAAA,KAAA;AAAA,UACA,oCAAA,KAAA;AAAA,UACA,qCAAA,KAAA;AAAA,UACA,gBAAA,CAAA,KAAA;AAAA,QACA;AAAA,MAAA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,cAAA,KAAA,iBAAA;AAAA,QACA,KAAA;AACA,iBAAA;AAAA,QACA,KAAA;AACA,iBAAA;AAAA,QACA;AACA,iBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAA,KAAA,aACA,KAAA,aAEA,KAAA,SAAA,aAAA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA,GAAA,KAAA;AAAA,QACA,OAAA,CAAAC,MAAA,KAAA,MAAA,SAAAA,CAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { DtAvatar as i } from "./avatar.js";
|
|
2
|
+
import { DtBadge as c } from "./badge.js";
|
|
3
|
+
import { n as o } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
4
|
+
import "./utils.js";
|
|
5
|
+
import "./constants.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
8
|
+
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
9
|
+
import "./presence.js";
|
|
10
|
+
import "./icon.js";
|
|
11
|
+
import "@dialpad/dialtone-icons/vue2";
|
|
12
|
+
import "./skeleton.js";
|
|
13
|
+
const l = {
|
|
14
|
+
warning: "dt-recipe-callbox-badge--warning"
|
|
15
|
+
}, r = {
|
|
16
|
+
default: "dt-recipe-callbox--border-default",
|
|
17
|
+
ai: "dt-recipe-callbox--border-ai",
|
|
18
|
+
critical: "dt-recipe-callbox--border-critical"
|
|
19
|
+
}, s = {
|
|
20
|
+
name: "DtRecipeCallbox",
|
|
21
|
+
components: { DtBadge: c, DtAvatar: i },
|
|
22
|
+
inheritAttrs: !1,
|
|
23
|
+
props: {
|
|
24
|
+
/**
|
|
25
|
+
* Text for the badge element
|
|
26
|
+
*/
|
|
27
|
+
badgeText: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Color for the badge element
|
|
33
|
+
* @values null, warning
|
|
34
|
+
*/
|
|
35
|
+
badgeColor: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
validator: (e) => e === null || Object.keys(l).includes(e)
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Optional avatar image url.
|
|
42
|
+
* If not provided it will use the initial of the name.
|
|
43
|
+
*/
|
|
44
|
+
avatarSrc: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Avatar's full name, used to extract initials
|
|
50
|
+
* to display if `avatarSrc` is empty.
|
|
51
|
+
*/
|
|
52
|
+
avatarFullName: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: ""
|
|
55
|
+
},
|
|
56
|
+
/**
|
|
57
|
+
* Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.
|
|
58
|
+
*/
|
|
59
|
+
avatarSeed: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: ""
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* Callbox title
|
|
65
|
+
*/
|
|
66
|
+
title: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ""
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Callbox border color
|
|
72
|
+
* @values default, ai, critical
|
|
73
|
+
*/
|
|
74
|
+
borderColor: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: "default",
|
|
77
|
+
validator: (e) => Object.keys(r).includes(e)
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* Makes the callbox avatar and title clickable,
|
|
81
|
+
* emits a click event when clicked.
|
|
82
|
+
*/
|
|
83
|
+
clickable: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: !1
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* Controls the avatars overlay icon
|
|
89
|
+
*/
|
|
90
|
+
isOnHold: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
default: !1
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
emits: [
|
|
96
|
+
/**
|
|
97
|
+
* Callbox click event
|
|
98
|
+
*
|
|
99
|
+
* @event click
|
|
100
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
101
|
+
*/
|
|
102
|
+
"click"
|
|
103
|
+
],
|
|
104
|
+
computed: {
|
|
105
|
+
shouldShowAvatar() {
|
|
106
|
+
return this.avatarFullName || this.avatarSrc;
|
|
107
|
+
},
|
|
108
|
+
badgeClass() {
|
|
109
|
+
return l[this.badgeColor];
|
|
110
|
+
},
|
|
111
|
+
borderClass() {
|
|
112
|
+
return r[this.borderColor];
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
methods: {
|
|
116
|
+
handleClick(e) {
|
|
117
|
+
this.clickable && this.$emit("click", e);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var d = function() {
|
|
122
|
+
var t = this, a = t._self._c;
|
|
123
|
+
return a("div", { staticClass: "dt-recipe-callbox", attrs: { "data-qa": "dt-recipe-callbox" } }, [t.$slots.video ? a("div", { staticClass: "dt-recipe-callbox--video", attrs: { "data-qa": "dt-recipe-callbox--video-wrapper" } }, [t._t("video")], 2) : t._e(), a("div", { class: ["dt-recipe-callbox--main-content", t.borderClass, { "dt-recipe-callbox--clickable": t.clickable }], attrs: { "data-qa": "dt-recipe-callbox--main-content" } }, [a("div", { staticClass: "dt-recipe-callbox--main-content-top" }, [t.shouldShowAvatar ? a("dt-avatar", { attrs: { "avatar-class": "dt-recipe-callbox--avatar", "image-src": t.avatarSrc, "image-alt": "", "full-name": t.avatarFullName, seed: t.avatarSeed, clickable: t.clickable, "overlay-icon": t.isOnHold ? "pause" : null, size: "sm" }, on: { click: t.handleClick } }) : t._e(), a("div", { staticClass: "dt-recipe-callbox--content" }, [a(t.clickable ? "button" : "span", { tag: "component", staticClass: "dt-recipe-callbox--content-title", attrs: { "data-qa": "dt-recipe-callbox--title" }, on: { click: t.handleClick } }, [t._v(" " + t._s(t.title) + " ")]), t.$slots.badge || t.badgeText ? a("div", { staticClass: "dt-recipe-callbox--content-badge", attrs: { "data-qa": "dt-recipe-callbox--badge-wrapper" } }, [t._t("badge", function() {
|
|
124
|
+
return [a("dt-badge", { class: t.badgeClass, attrs: { text: t.badgeText } })];
|
|
125
|
+
})], 2) : t._e(), t.$slots.subtitle ? a("div", { staticClass: "dt-recipe-callbox--content-subtitle", attrs: { "data-qa": "dt-recipe-callbox--subtitle-wrapper" } }, [t._t("subtitle")], 2) : t._e()], 1), t.$slots.right ? a("div", { staticClass: "dt-recipe-callbox--right", attrs: { "data-qa": "dt-recipe-callbox--right-wrapper" } }, [t._t("right")], 2) : t._e()], 1), t.$slots.bottom ? a("div", { staticClass: "dt-recipe-callbox--main-content-bottom", attrs: { "data-qa": "dt-recipe-callbox--bottom-wrapper" } }, [t._t("bottom")], 2) : t._e()])]);
|
|
126
|
+
}, n = [], p = /* @__PURE__ */ o(
|
|
127
|
+
s,
|
|
128
|
+
d,
|
|
129
|
+
n,
|
|
130
|
+
!1,
|
|
131
|
+
null,
|
|
132
|
+
"ef08f46e",
|
|
133
|
+
null,
|
|
134
|
+
null
|
|
135
|
+
);
|
|
136
|
+
const y = p.exports;
|
|
137
|
+
export {
|
|
138
|
+
l as CALLBOX_BADGE_COLORS,
|
|
139
|
+
r as CALLBOX_BORDER_COLORS,
|
|
140
|
+
y as DtRecipeCallbox
|
|
141
|
+
};
|
|
142
|
+
//# sourceMappingURL=callbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callbox.js","sources":["../../recipes/leftbar/callbox/callbox_constants.js","../../recipes/leftbar/callbox/callbox.vue"],"sourcesContent":["export const CALLBOX_BADGE_COLORS = {\n warning: 'dt-recipe-callbox-badge--warning',\n};\n\nexport const CALLBOX_BORDER_COLORS = {\n default: 'dt-recipe-callbox--border-default',\n ai: 'dt-recipe-callbox--border-ai',\n critical: 'dt-recipe-callbox--border-critical',\n};\n\nexport default {\n CALLBOX_BADGE_COLORS,\n CALLBOX_BORDER_COLORS,\n};\n","<template>\n <div\n data-qa=\"dt-recipe-callbox\"\n class=\"dt-recipe-callbox\"\n >\n <div\n v-if=\"$slots.video\"\n data-qa=\"dt-recipe-callbox--video-wrapper\"\n class=\"dt-recipe-callbox--video\"\n >\n <!-- @slot Slot for video stream -->\n <slot name=\"video\" />\n </div>\n <div\n data-qa=\"dt-recipe-callbox--main-content\"\n :class=\"['dt-recipe-callbox--main-content', borderClass, { 'dt-recipe-callbox--clickable': clickable }]\"\n >\n <div\n class=\"dt-recipe-callbox--main-content-top\"\n >\n <dt-avatar\n v-if=\"shouldShowAvatar\"\n avatar-class=\"dt-recipe-callbox--avatar\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :full-name=\"avatarFullName\"\n :seed=\"avatarSeed\"\n :clickable=\"clickable\"\n :overlay-icon=\"isOnHold ? 'pause' : null\"\n size=\"sm\"\n @click=\"handleClick\"\n />\n <div class=\"dt-recipe-callbox--content\">\n <component\n :is=\"clickable ? 'button' : 'span'\"\n data-qa=\"dt-recipe-callbox--title\"\n class=\"dt-recipe-callbox--content-title\"\n @click=\"handleClick\"\n >\n {{ title }}\n </component>\n <div\n v-if=\"$slots.badge || badgeText\"\n data-qa=\"dt-recipe-callbox--badge-wrapper\"\n class=\"dt-recipe-callbox--content-badge\"\n >\n <!-- @slot Slot for call center badge -->\n <slot name=\"badge\">\n <dt-badge\n :class=\"badgeClass\"\n :text=\"badgeText\"\n />\n </slot>\n </div>\n <div\n v-if=\"$slots.subtitle\"\n data-qa=\"dt-recipe-callbox--subtitle-wrapper\"\n class=\"dt-recipe-callbox--content-subtitle\"\n >\n <!-- @slot Slot for subtitle -->\n <slot name=\"subtitle\" />\n </div>\n </div>\n <div\n v-if=\"$slots.right\"\n data-qa=\"dt-recipe-callbox--right-wrapper\"\n class=\"dt-recipe-callbox--right\"\n >\n <!-- @slot Slot for right icons -->\n <slot name=\"right\" />\n </div>\n </div>\n <div\n v-if=\"$slots.bottom\"\n data-qa=\"dt-recipe-callbox--bottom-wrapper\"\n class=\"dt-recipe-callbox--main-content-bottom\"\n >\n <slot name=\"bottom\" />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { CALLBOX_BADGE_COLORS, CALLBOX_BORDER_COLORS } from './callbox_constants';\nimport DtAvatar from '@/components/avatar/avatar.vue';\nimport DtBadge from '@/components/badge/badge.vue';\n\nexport default {\n name: 'DtRecipeCallbox',\n\n components: { DtBadge, DtAvatar },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Text for the badge element\n */\n badgeText: {\n type: String,\n default: '',\n },\n\n /**\n * Color for the badge element\n * @values null, warning\n */\n badgeColor: {\n type: String,\n default: null,\n validator: (color) => color === null || Object.keys(CALLBOX_BADGE_COLORS).includes(color),\n },\n\n /**\n * Optional avatar image url.\n * If not provided it will use the initial of the name.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display if `avatarSrc` is empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: '',\n },\n\n /**\n * Callbox title\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Callbox border color\n * @values default, ai, critical\n */\n borderColor: {\n type: String,\n default: 'default',\n validator: (color) => Object.keys(CALLBOX_BORDER_COLORS).includes(color),\n },\n\n /**\n * Makes the callbox avatar and title clickable,\n * emits a click event when clicked.\n */\n clickable: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls the avatars overlay icon\n */\n isOnHold: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Callbox click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n shouldShowAvatar () {\n return this.avatarFullName || this.avatarSrc;\n },\n\n badgeClass () {\n return CALLBOX_BADGE_COLORS[this.badgeColor];\n },\n\n borderClass () {\n return CALLBOX_BORDER_COLORS[this.borderColor];\n },\n },\n\n methods: {\n handleClick (e) {\n if (!this.clickable) return;\n this.$emit('click', e);\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n.dt-recipe-callbox {\n padding: 0;\n color: var(--dt-color-foreground-primary);\n background-color: var(--dt-color-surface-primary);\n border-radius: var(--dt-size-radius-300);\n\n &--video {\n display: flex;\n border-radius: var(--dt-size-radius-200) var(--dt-size-radius-200) 0 0;\n overflow: clip;\n margin-bottom: var(--dt-space-300-negative);\n }\n\n &--main-content {\n padding: 0;\n border-radius: var(--dt-size-radius-300);\n border: var(--dt-size-border-100) solid transparent;\n align-items: stretch;\n\n &.dt-recipe-callbox--border-default {\n border-color: var(--dt-color-border-default);\n }\n\n &.dt-recipe-callbox--border-ai {\n background:\n linear-gradient(var(--dt-color-surface-primary), var(--dt-color-surface-primary)) padding-box,\n linear-gradient(135deg, var(--dt-color-border-accent), var(--dt-color-border-brand)) border-box;\n }\n\n &.dt-recipe-callbox--border-critical {\n background:\n radial-gradient(var(--dt-color-surface-primary), var(--dt-color-surface-primary)) padding-box,\n radial-gradient(circle, #E7301D, #F78B23) border-box;\n }\n\n &-top {\n display: flex;\n align-items: center;\n padding: var(--dt-space-350) var(--dt-space-400);\n }\n\n &-bottom {\n border-top: 1px solid var(--dt-color-border-subtle);\n }\n }\n\n &--avatar {\n margin-right: var(--dt-space-400);\n }\n\n &--content {\n display: flex;\n flex-direction: column;\n flex: 1 0 auto;\n min-width: 0;\n\n &-title {\n overflow: clip;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--dt-color-foreground-primary);\n background-color: var(--dt-color-surface-primary);\n font-weight: var(--dt-font-weight-bold);\n border: none;\n padding: 0;\n width: 0;\n min-width: 100%;\n text-align: left;\n user-select: text;\n line-height: normal;\n }\n\n &-badge {\n line-height: normal;\n }\n\n &-subtitle {\n padding: 0;\n font-size: var(--dt-font-size-100);\n color: var(--dt-color-foreground-tertiary);\n line-height: normal;\n overflow: hidden;\n width: 0;\n min-width: 100%;\n }\n }\n\n &--right {\n display: flex;\n justify-content: right;\n }\n\n &--clickable {\n .dt-recipe-callbox--content-title {\n cursor: pointer;\n user-select: none;\n border-radius: var(--dt-size-100);\n\n &:focus-visible {\n outline: none;\n box-shadow: var(--dt-shadow-focus);\n }\n\n &:hover, &:active {\n text-decoration: underline;\n }\n }\n }\n\n .dt-recipe-callbox-badge--warning {\n background-color: var(--dt-color-surface-warning);\n }\n}\n</style>\n"],"names":["CALLBOX_BADGE_COLORS","CALLBOX_BORDER_COLORS","_sfc_main","DtBadge","DtAvatar","color"],"mappings":";;;;;;;;;;;;AAAY,MAACA,IAAuB;AAAA,EAClC,SAAS;AACX,GAEaC,IAAwB;AAAA,EACnC,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,UAAU;AACZ,GCgFAC,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,SAAAC,GAAA,UAAAC,EAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAAA,MAAA,QAAA,OAAA,KAAAL,CAAA,EAAA,SAAAK,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAA,MAAA,OAAA,KAAAJ,CAAA,EAAA,SAAAI,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,mBAAA;AACA,aAAA,KAAA,kBAAA,KAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAAL,EAAA,KAAA,UAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,aAAAC,EAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,YAAA,GAAA;AACA,MAAA,KAAA,aACA,KAAA,MAAA,SAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|
package/dist/lib/card.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { n as a } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
2
|
+
const r = {
|
|
3
|
+
name: "DtCard",
|
|
4
|
+
props: {
|
|
5
|
+
/**
|
|
6
|
+
* The maximum height of the card content.
|
|
7
|
+
* If given, makes content area scrollable.
|
|
8
|
+
*/
|
|
9
|
+
maxHeight: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: null
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* class for card container.
|
|
15
|
+
*/
|
|
16
|
+
containerClass: {
|
|
17
|
+
type: [String, Array, Object],
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
/**
|
|
21
|
+
* class for card content.
|
|
22
|
+
*/
|
|
23
|
+
contentClass: {
|
|
24
|
+
type: [String, Array, Object],
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* class for card header.
|
|
29
|
+
*/
|
|
30
|
+
headerClass: {
|
|
31
|
+
type: [String, Array, Object],
|
|
32
|
+
default: ""
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* class for card footer.
|
|
36
|
+
*/
|
|
37
|
+
footerClass: {
|
|
38
|
+
type: [String, Array, Object],
|
|
39
|
+
default: ""
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
var s = function() {
|
|
44
|
+
var t = this, e = t._self._c;
|
|
45
|
+
return e("div", { class: [
|
|
46
|
+
"d-card",
|
|
47
|
+
t.containerClass
|
|
48
|
+
], attrs: { "data-qa": "dt-card" } }, [t.$slots.header ? e("div", { class: [
|
|
49
|
+
"d-card__header",
|
|
50
|
+
t.headerClass
|
|
51
|
+
] }, [t._t("header")], 2) : t._e(), e("div", { class: [
|
|
52
|
+
"d-card__content",
|
|
53
|
+
t.contentClass
|
|
54
|
+
], style: { "max-height": t.maxHeight } }, [t._t("content")], 2), t.$slots.footer ? e("div", { class: [
|
|
55
|
+
"d-card__footer",
|
|
56
|
+
t.footerClass
|
|
57
|
+
] }, [t._t("footer")], 2) : t._e()]);
|
|
58
|
+
}, n = [], l = /* @__PURE__ */ a(
|
|
59
|
+
r,
|
|
60
|
+
s,
|
|
61
|
+
n,
|
|
62
|
+
!1,
|
|
63
|
+
null,
|
|
64
|
+
null,
|
|
65
|
+
null,
|
|
66
|
+
null
|
|
67
|
+
);
|
|
68
|
+
const c = l.exports;
|
|
69
|
+
export {
|
|
70
|
+
c as DtCard
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sources":["../../components/card/card.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-card',\n containerClass,\n ]\"\n data-qa=\"dt-card\"\n >\n <div\n v-if=\"$slots.header\"\n :class=\"[\n 'd-card__header',\n headerClass,\n ]\"\n >\n <!-- @slot slot for header content -->\n <slot name=\"header\" />\n </div>\n\n <div\n :class=\"[\n 'd-card__content',\n contentClass,\n ]\"\n :style=\"{ 'max-height': maxHeight }\"\n >\n <!-- @slot slot for main content -->\n <slot name=\"content\" />\n </div>\n\n <div\n v-if=\"$slots.footer\"\n :class=\"[\n 'd-card__footer',\n footerClass,\n ]\"\n >\n <!-- @slot slot for footer content -->\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n\n<script>\n/**\n * A card contains summary content and actions about a single subject.\n * It can be used by itself or within a list, and is generally interactive.\n * @see https://dialtone.dialpad.com/components/card.html\n */\nexport default {\n name: 'DtCard',\n props: {\n /**\n * The maximum height of the card content.\n * If given, makes content area scrollable.\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * class for card container.\n */\n containerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * class for card content.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * class for card header.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * class for card footer.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n};\n</script>\n"],"names":["_sfc_main"],"mappings":";AAiDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import s from "vue";
|
|
2
|
+
import { n } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
3
|
+
import { DtInputGroup as r } from "./input-group.js";
|
|
4
|
+
import "../chunks/input_group-zcAq3DQl.js";
|
|
5
|
+
import "./validators.js";
|
|
6
|
+
import "./constants.js";
|
|
7
|
+
import "./utils.js";
|
|
8
|
+
import "./validation-messages.js";
|
|
9
|
+
const a = {
|
|
10
|
+
name: "DtCheckboxGroup",
|
|
11
|
+
extends: r,
|
|
12
|
+
model: {
|
|
13
|
+
prop: "selectedValues"
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
/**
|
|
17
|
+
* Not supported by this component, please use selectedValues
|
|
18
|
+
*/
|
|
19
|
+
value: {
|
|
20
|
+
type: [],
|
|
21
|
+
default: null,
|
|
22
|
+
validator: (e) => e ? (s.util.warn(
|
|
23
|
+
"Component uses selectedValues to initialize the model, value is not supported by this component",
|
|
24
|
+
void 0
|
|
25
|
+
), !1) : !0
|
|
26
|
+
},
|
|
27
|
+
/**
|
|
28
|
+
* A provided list of selected values(s) for the checkbox group
|
|
29
|
+
* @model selectedValues
|
|
30
|
+
*/
|
|
31
|
+
selectedValues: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* A data qa tag for the radio group
|
|
39
|
+
*/
|
|
40
|
+
dataQaGroup: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "checkbox-group"
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* A data qa tag for the radio group legend
|
|
46
|
+
*/
|
|
47
|
+
dataQaGroupLegend: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "checkbox-group-legend"
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* A data qa tag for the radio group messages
|
|
53
|
+
*/
|
|
54
|
+
dataQaGroupMessages: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: "checkbox-group-messages"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
emits: [
|
|
60
|
+
/**
|
|
61
|
+
* Native input event
|
|
62
|
+
*
|
|
63
|
+
* @event input
|
|
64
|
+
* @type {Array}
|
|
65
|
+
*/
|
|
66
|
+
"input"
|
|
67
|
+
],
|
|
68
|
+
data() {
|
|
69
|
+
return {
|
|
70
|
+
internalValue: this.selectedValues,
|
|
71
|
+
// wrap values in object to make reactive
|
|
72
|
+
provideObj: {
|
|
73
|
+
selectedValues: this.selectedValues
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
watch: {
|
|
78
|
+
selectedValues(e) {
|
|
79
|
+
this.internalValue = e;
|
|
80
|
+
},
|
|
81
|
+
/*
|
|
82
|
+
* watching value to support 2 way binding for slotted checkboxes.
|
|
83
|
+
* need this to pass value to slotted checkboxes if modified outside
|
|
84
|
+
* checkbox group.
|
|
85
|
+
*/
|
|
86
|
+
internalValue(e) {
|
|
87
|
+
this.provideObj.selectedValues = e;
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
methods: {
|
|
91
|
+
/*
|
|
92
|
+
* provided value to support 2 way binding for slotted checkboxes.
|
|
93
|
+
* slotted checkbox will change this value and need to emit new value up.
|
|
94
|
+
*/
|
|
95
|
+
setGroupValue(e, t) {
|
|
96
|
+
t ? this.internalValue.includes(e) || this.internalValue.push(e) : this.internalValue = this.internalValue.filter((l) => l !== e), this.$emit("input", this.internalValue);
|
|
97
|
+
},
|
|
98
|
+
getMessageKey(e, t) {
|
|
99
|
+
return `checkbox-group-message-${e}-${t}-${this.id}`;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, u = null, o = null;
|
|
103
|
+
var i = /* @__PURE__ */ n(
|
|
104
|
+
a,
|
|
105
|
+
u,
|
|
106
|
+
o,
|
|
107
|
+
!1,
|
|
108
|
+
null,
|
|
109
|
+
null,
|
|
110
|
+
null,
|
|
111
|
+
null
|
|
112
|
+
);
|
|
113
|
+
const _ = i.exports;
|
|
114
|
+
export {
|
|
115
|
+
_ as DtCheckboxGroup
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sources":["../../components/checkbox_group/checkbox_group.vue"],"sourcesContent":["<script>\nimport Vue from 'vue';\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Checkbox Groups are convenience components for a grouping of related Checkboxes.\n * While each Checkbox within the group is independent, the `v-model` on the group provides\n * a convenient interface for determining which Checkboxes within the group are checked.\n * @see https://dialtone.dialpad.com/components/checkbox_group.html\n */\nexport default {\n name: 'DtCheckboxGroup',\n\n extends: DtInputGroup,\n\n model: {\n prop: 'selectedValues',\n },\n\n props: {\n /**\n * Not supported by this component, please use selectedValues\n */\n value: {\n type: [],\n default: null,\n validator: value => {\n if (!value) {\n return true;\n }\n\n Vue.util.warn(\n 'Component uses selectedValues to initialize the model, value is not supported by this component',\n this,\n );\n\n return false;\n },\n },\n\n /**\n * A provided list of selected values(s) for the checkbox group\n * @model selectedValues\n */\n selectedValues: {\n type: Array,\n default () {\n return [];\n },\n },\n\n /**\n * A data qa tag for the radio group\n */\n dataQaGroup: {\n type: String,\n default: 'checkbox-group',\n },\n\n /**\n * A data qa tag for the radio group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'checkbox-group-legend',\n },\n\n /**\n * A data qa tag for the radio group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'checkbox-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {Array}\n */\n 'input',\n ],\n\n data () {\n return {\n internalValue: this.selectedValues,\n // wrap values in object to make reactive\n provideObj: {\n selectedValues: this.selectedValues,\n },\n };\n },\n\n watch: {\n selectedValues (newSelectedValues) {\n this.internalValue = newSelectedValues;\n },\n\n /*\n * watching value to support 2 way binding for slotted checkboxes.\n * need this to pass value to slotted checkboxes if modified outside\n * checkbox group.\n */\n internalValue (newInternalValue) {\n this.provideObj.selectedValues = newInternalValue;\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted checkboxes.\n * slotted checkbox will change this value and need to emit new value up.\n */\n setGroupValue (value, checked) {\n if (!checked) {\n this.internalValue = this.internalValue.filter(checkedValue => checkedValue !== value);\n } else if (!this.internalValue.includes(value)) {\n this.internalValue.push(value);\n }\n\n this.$emit('input', this.internalValue);\n },\n\n getMessageKey (type, index) {\n return `checkbox-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtInputGroup","value","Vue","this","newSelectedValues","newInternalValue","checked","checkedValue","type","index"],"mappings":";;;;;;;;AAUA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,SAAAC;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA,CAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MACAA,KAIAC,EAAA,KAAA;AAAA,QACA;AAAA,QACAC;AAAAA,MACA,GAEA,MARA;AAAA,IAUA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAA;MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,eAAA,KAAA;AAAA;AAAA,MAEA,YAAA;AAAA,QACA,gBAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,eAAAC,GAAA;AACA,WAAA,gBAAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,cAAAC,GAAA;AACA,WAAA,WAAA,iBAAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAAJ,GAAAK,GAAA;AACA,MAAAA,IAEA,KAAA,cAAA,SAAAL,CAAA,KACA,KAAA,cAAA,KAAAA,CAAA,IAFA,KAAA,gBAAA,KAAA,cAAA,OAAA,CAAAM,MAAAA,MAAAN,CAAA,GAKA,KAAA,MAAA,SAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,cAAAO,GAAAC,GAAA;AACA,aAAA,0BAAAD,CAAA,IAAAC,CAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
|