@dialpad/dialtone-vue 3.120.0 → 3.120.2
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-vue_export-helper-caHeSgYY.js +11 -0
- package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
- package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
- package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
- package/dist/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
- package/dist/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
- package/dist/chunks/dropdown-w8Do29L5.js +442 -0
- package/dist/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
- package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
- package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
- package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
- package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
- package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
- package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
- package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
- package/dist/chunks/index-4qgKeErp.js +446 -0
- package/dist/chunks/{index-b4iXYvId.js.map → index-4qgKeErp.js.map} +1 -1
- package/dist/chunks/index-b_MgDylR.js +447 -0
- package/dist/chunks/{index-6tYeqbgP.js.map → index-b_MgDylR.js.map} +1 -1
- package/dist/chunks/{input-4UQWegUk.js → input-NmYDD5bn.js} +83 -60
- package/dist/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
- package/dist/chunks/input-ttnte8zB.js +295 -0
- package/dist/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
- package/dist/chunks/input_group-M-D25pOJ.js +152 -0
- package/dist/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
- package/dist/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
- package/dist/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
- package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
- package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
- package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
- package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
- package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
- package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
- package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
- package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
- package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
- package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
- package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
- package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
- package/dist/chunks/modal-VgxXAQFP.js +105 -0
- package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
- package/dist/chunks/modal-XOr4kiNZ.js +106 -0
- package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
- package/dist/chunks/notice_action-WTucGhvr.js +222 -0
- package/dist/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
- package/dist/chunks/notice_action-p-ePanW_.js +223 -0
- package/dist/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
- package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
- package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
- package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
- package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
- package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
- package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
- package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
- package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
- package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
- package/dist/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
- package/dist/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
- package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
- package/dist/chunks/stack_constants-HraCekPm.js +15 -0
- package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
- package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
- package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
- package/dist/chunks/tab-RTDgnD9-.js +391 -0
- package/dist/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
- package/dist/chunks/tab-qc3f42Yp.js +390 -0
- package/dist/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
- package/dist/common/constants.cjs +60 -0
- package/dist/{lib → common}/constants.cjs.map +1 -1
- package/dist/{lib → common}/constants.js +25 -18
- package/dist/{lib → common}/constants.js.map +1 -1
- package/dist/common/dates.cjs +72 -0
- package/dist/{lib → common}/dates.cjs.map +1 -1
- package/dist/common/dates.js +72 -0
- package/dist/{lib → common}/dates.js.map +1 -1
- package/dist/common/emoji.cjs +163 -0
- package/dist/common/emoji.cjs.map +1 -0
- package/dist/common/emoji.js +168 -0
- package/dist/common/emoji.js.map +1 -0
- package/dist/common/mixins.cjs +17 -0
- package/dist/{lib → common}/mixins.cjs.map +1 -1
- package/dist/common/mixins.js +17 -0
- package/dist/common/utils.cjs +243 -0
- package/dist/{lib → common}/utils.cjs.map +1 -1
- package/dist/common/utils.js +243 -0
- package/dist/{lib → common}/utils.js.map +1 -1
- package/dist/common/validators.cjs +23 -0
- package/dist/{lib → common}/validators.cjs.map +1 -1
- package/dist/common/validators.js +23 -0
- package/dist/{lib → common}/validators.js.map +1 -1
- package/dist/dialtone-vue.cjs +373 -1
- package/dist/dialtone-vue.cjs.map +1 -1
- package/dist/dialtone-vue.js +328 -327
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/attachment-carousel.cjs +345 -1
- package/dist/lib/attachment-carousel.cjs.map +1 -1
- package/dist/lib/attachment-carousel.js +126 -108
- package/dist/lib/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar.cjs +447 -1
- package/dist/lib/avatar.cjs.map +1 -1
- package/dist/lib/avatar.js +135 -101
- package/dist/lib/avatar.js.map +1 -1
- package/dist/lib/badge.cjs +206 -1
- package/dist/lib/badge.cjs.map +1 -1
- package/dist/lib/badge.js +64 -48
- package/dist/lib/badge.js.map +1 -1
- package/dist/lib/banner.cjs +242 -2
- package/dist/lib/banner.cjs.map +1 -1
- package/dist/lib/banner.js +81 -71
- package/dist/lib/banner.js.map +1 -1
- package/dist/lib/breadcrumbs.cjs +150 -1
- package/dist/lib/breadcrumbs.cjs.map +1 -1
- package/dist/lib/breadcrumbs.js +60 -52
- package/dist/lib/breadcrumbs.js.map +1 -1
- package/dist/lib/button-group.cjs +41 -1
- package/dist/lib/button-group.cjs.map +1 -1
- package/dist/lib/button-group.js +15 -14
- package/dist/lib/button-group.js.map +1 -1
- package/dist/lib/button.cjs +356 -1
- package/dist/lib/button.cjs.map +1 -1
- package/dist/lib/button.js +108 -88
- package/dist/lib/button.js.map +1 -1
- package/dist/lib/callbar-button-with-popover.cjs +322 -1
- package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
- package/dist/lib/callbar-button-with-popover.js +101 -83
- package/dist/lib/callbar-button-with-popover.js.map +1 -1
- package/dist/lib/callbar-button.cjs +200 -1
- package/dist/lib/callbar-button.cjs.map +1 -1
- package/dist/lib/callbar-button.js +52 -45
- package/dist/lib/callbar-button.js.map +1 -1
- package/dist/lib/callbox.cjs +217 -1
- package/dist/lib/callbox.cjs.map +1 -1
- package/dist/lib/callbox.js +80 -67
- package/dist/lib/callbox.js.map +1 -1
- package/dist/lib/card.cjs +91 -1
- package/dist/lib/card.cjs.map +1 -1
- package/dist/lib/card.js +27 -27
- package/dist/lib/card.js.map +1 -1
- package/dist/lib/checkbox-group.cjs +115 -1
- package/dist/lib/checkbox-group.cjs.map +1 -1
- package/dist/lib/checkbox-group.js +34 -23
- package/dist/lib/checkbox-group.js.map +1 -1
- package/dist/lib/checkbox.cjs +156 -1
- package/dist/lib/checkbox.cjs.map +1 -1
- package/dist/lib/checkbox.js +72 -60
- package/dist/lib/checkbox.js.map +1 -1
- package/dist/lib/chip.cjs +235 -1
- package/dist/lib/chip.cjs.map +1 -1
- package/dist/lib/chip.js +84 -67
- package/dist/lib/chip.js.map +1 -1
- package/dist/lib/codeblock.cjs +23 -2
- package/dist/lib/codeblock.cjs.map +1 -1
- package/dist/lib/codeblock.js +13 -13
- package/dist/lib/codeblock.js.map +1 -1
- package/dist/lib/collapsible.cjs +398 -1
- package/dist/lib/collapsible.cjs.map +1 -1
- package/dist/lib/collapsible.js +123 -100
- package/dist/lib/collapsible.js.map +1 -1
- package/dist/lib/combobox-multi-select.cjs +589 -1
- package/dist/lib/combobox-multi-select.cjs.map +1 -1
- package/dist/lib/combobox-multi-select.js +270 -177
- package/dist/lib/combobox-multi-select.js.map +1 -1
- package/dist/lib/combobox-with-popover.cjs +452 -1
- package/dist/lib/combobox-with-popover.cjs.map +1 -1
- package/dist/lib/combobox-with-popover.js +172 -127
- package/dist/lib/combobox-with-popover.js.map +1 -1
- package/dist/lib/combobox.cjs +18 -1
- package/dist/lib/combobox.cjs.map +1 -1
- package/dist/lib/combobox.js +9 -9
- package/dist/lib/contact-info.cjs +205 -1
- package/dist/lib/contact-info.cjs.map +1 -1
- package/dist/lib/contact-info.js +69 -60
- package/dist/lib/contact-info.js.map +1 -1
- package/dist/lib/contact-row.cjs +246 -1
- package/dist/lib/contact-row.cjs.map +1 -1
- package/dist/lib/contact-row.js +67 -63
- package/dist/lib/contact-row.js.map +1 -1
- package/dist/lib/datepicker.cjs +854 -1
- package/dist/lib/datepicker.cjs.map +1 -1
- package/dist/lib/datepicker.js +585 -441
- package/dist/lib/datepicker.js.map +1 -1
- package/dist/lib/description-list.cjs +116 -1
- package/dist/lib/description-list.cjs.map +1 -1
- package/dist/lib/description-list.js +56 -24
- package/dist/lib/description-list.js.map +1 -1
- package/dist/lib/dropdown.cjs +36 -1
- package/dist/lib/dropdown.cjs.map +1 -1
- package/dist/lib/dropdown.js +22 -21
- package/dist/lib/dropdown.js.map +1 -1
- package/dist/lib/editor.cjs +711 -1
- package/dist/lib/editor.cjs.map +1 -1
- package/dist/lib/editor.js +271 -235
- package/dist/lib/editor.js.map +1 -1
- package/dist/lib/emoji-picker.cjs +1277 -1
- package/dist/lib/emoji-picker.cjs.map +1 -1
- package/dist/lib/emoji-picker.js +859 -569
- package/dist/lib/emoji-picker.js.map +1 -1
- package/dist/lib/emoji-row.cjs +128 -1
- package/dist/lib/emoji-row.cjs.map +1 -1
- package/dist/lib/emoji-row.js +89 -75
- package/dist/lib/emoji-row.js.map +1 -1
- package/dist/lib/emoji-text-wrapper.cjs +102 -1
- package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
- package/dist/lib/emoji-text-wrapper.js +42 -31
- package/dist/lib/emoji-text-wrapper.js.map +1 -1
- package/dist/lib/emoji.cjs +158 -1
- package/dist/lib/emoji.cjs.map +1 -1
- package/dist/lib/emoji.js +153 -6
- package/dist/lib/emoji.js.map +1 -1
- package/dist/lib/feed-item-row.cjs +296 -1
- package/dist/lib/feed-item-row.cjs.map +1 -1
- package/dist/lib/feed-item-row.js +119 -100
- package/dist/lib/feed-item-row.js.map +1 -1
- package/dist/lib/feed-pill.cjs +173 -1
- package/dist/lib/feed-pill.cjs.map +1 -1
- package/dist/lib/feed-pill.js +70 -57
- package/dist/lib/feed-pill.js.map +1 -1
- package/dist/lib/general-row.cjs +518 -1
- package/dist/lib/general-row.cjs.map +1 -1
- package/dist/lib/general-row.js +186 -148
- package/dist/lib/general-row.js.map +1 -1
- package/dist/lib/group-row.cjs +116 -1
- package/dist/lib/group-row.cjs.map +1 -1
- package/dist/lib/group-row.js +37 -35
- package/dist/lib/group-row.js.map +1 -1
- package/dist/lib/grouped-chip.cjs +96 -1
- package/dist/lib/grouped-chip.cjs.map +1 -1
- package/dist/lib/grouped-chip.js +51 -46
- package/dist/lib/grouped-chip.js.map +1 -1
- package/dist/lib/hovercard.cjs +223 -1
- package/dist/lib/hovercard.cjs.map +1 -1
- package/dist/lib/hovercard.js +115 -80
- package/dist/lib/hovercard.js.map +1 -1
- package/dist/lib/icon.cjs +58 -1
- package/dist/lib/icon.cjs.map +1 -1
- package/dist/lib/icon.js +20 -20
- package/dist/lib/icon.js.map +1 -1
- package/dist/lib/image-viewer.cjs +243 -1
- package/dist/lib/image-viewer.cjs.map +1 -1
- package/dist/lib/image-viewer.js +104 -80
- package/dist/lib/image-viewer.js.map +1 -1
- package/dist/lib/input-group.cjs +91 -1
- package/dist/lib/input-group.cjs.map +1 -1
- package/dist/lib/input-group.js +41 -39
- package/dist/lib/input-group.js.map +1 -1
- package/dist/lib/input.cjs +578 -1
- package/dist/lib/input.cjs.map +1 -1
- package/dist/lib/input.js +185 -137
- package/dist/lib/input.js.map +1 -1
- package/dist/lib/item-layout.cjs +91 -1
- package/dist/lib/item-layout.cjs.map +1 -1
- package/dist/lib/item-layout.js +45 -39
- package/dist/lib/item-layout.js.map +1 -1
- package/dist/lib/ivr-node.cjs +263 -1
- package/dist/lib/ivr-node.cjs.map +1 -1
- package/dist/lib/ivr-node.js +130 -112
- package/dist/lib/ivr-node.js.map +1 -1
- package/dist/lib/keyboard-shortcut.cjs +119 -1
- package/dist/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut.js +58 -48
- package/dist/lib/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show.cjs +82 -1
- package/dist/lib/lazy-show.cjs.map +1 -1
- package/dist/lib/lazy-show.js +21 -19
- package/dist/lib/lazy-show.js.map +1 -1
- package/dist/lib/link.cjs +43 -1
- package/dist/lib/link.cjs.map +1 -1
- package/dist/lib/link.js +20 -19
- package/dist/lib/link.js.map +1 -1
- package/dist/lib/list-item-group.cjs +67 -1
- package/dist/lib/list-item-group.cjs.map +1 -1
- package/dist/lib/list-item-group.js +24 -22
- package/dist/lib/list-item-group.js.map +1 -1
- package/dist/lib/list-item.cjs +216 -1
- package/dist/lib/list-item.cjs.map +1 -1
- package/dist/lib/list-item.js +71 -60
- package/dist/lib/list-item.js.map +1 -1
- package/dist/lib/message-input.cjs +708 -1
- package/dist/lib/message-input.cjs.map +1 -1
- package/dist/lib/message-input.js +232 -206
- package/dist/lib/message-input.js.map +1 -1
- package/dist/lib/modal.cjs +444 -2
- package/dist/lib/modal.cjs.map +1 -1
- package/dist/lib/modal.js +153 -120
- package/dist/lib/modal.js.map +1 -1
- package/dist/lib/notice.cjs +197 -1
- package/dist/lib/notice.cjs.map +1 -1
- package/dist/lib/notice.js +66 -63
- package/dist/lib/notice.js.map +1 -1
- package/dist/lib/pagination.cjs +205 -1
- package/dist/lib/pagination.cjs.map +1 -1
- package/dist/lib/pagination.js +96 -81
- package/dist/lib/pagination.js.map +1 -1
- package/dist/lib/popover.cjs +1080 -1
- package/dist/lib/popover.cjs.map +1 -1
- package/dist/lib/popover.js +447 -267
- package/dist/lib/popover.js.map +1 -1
- package/dist/lib/presence.cjs +70 -1
- package/dist/lib/presence.cjs.map +1 -1
- package/dist/lib/presence.js +33 -27
- package/dist/lib/presence.js.map +1 -1
- package/dist/lib/radio-group.cjs +88 -1
- package/dist/lib/radio-group.cjs.map +1 -1
- package/dist/lib/radio-group.js +18 -18
- package/dist/lib/radio-group.js.map +1 -1
- package/dist/lib/radio.cjs +162 -1
- package/dist/lib/radio.cjs.map +1 -1
- package/dist/lib/radio.js +66 -57
- package/dist/lib/radio.js.map +1 -1
- package/dist/lib/rich-text-editor.cjs +1137 -1
- package/dist/lib/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor.js +567 -386
- package/dist/lib/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout.cjs +158 -1
- package/dist/lib/root-layout.cjs.map +1 -1
- package/dist/lib/root-layout.js +33 -31
- package/dist/lib/root-layout.js.map +1 -1
- package/dist/lib/scroller.cjs +1090 -1
- package/dist/lib/scroller.cjs.map +1 -1
- package/dist/lib/scroller.js +668 -345
- package/dist/lib/scroller.js.map +1 -1
- package/dist/lib/select-menu.cjs +312 -1
- package/dist/lib/select-menu.cjs.map +1 -1
- package/dist/lib/select-menu.js +124 -79
- package/dist/lib/select-menu.js.map +1 -1
- package/dist/lib/settings-menu-button.cjs +77 -1
- package/dist/lib/settings-menu-button.cjs.map +1 -1
- package/dist/lib/settings-menu-button.js +31 -30
- package/dist/lib/settings-menu-button.js.map +1 -1
- package/dist/lib/skeleton.cjs +635 -1
- package/dist/lib/skeleton.cjs.map +1 -1
- package/dist/lib/skeleton.js +189 -152
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/stack.cjs +123 -1
- package/dist/lib/stack.cjs.map +1 -1
- package/dist/lib/stack.js +61 -53
- package/dist/lib/stack.js.map +1 -1
- package/dist/lib/tabs.cjs +102 -1
- package/dist/lib/tabs.cjs.map +1 -1
- package/dist/lib/tabs.js +47 -41
- package/dist/lib/tabs.js.map +1 -1
- package/dist/lib/time-pill.cjs +41 -1
- package/dist/lib/time-pill.cjs.map +1 -1
- package/dist/lib/time-pill.js +18 -14
- package/dist/lib/time-pill.js.map +1 -1
- package/dist/lib/toast.cjs +281 -1
- package/dist/lib/toast.cjs.map +1 -1
- package/dist/lib/toast.js +96 -74
- package/dist/lib/toast.js.map +1 -1
- package/dist/lib/toggle.cjs +192 -1
- package/dist/lib/toggle.cjs.map +1 -1
- package/dist/lib/toggle.js +60 -49
- package/dist/lib/toggle.js.map +1 -1
- package/dist/lib/tooltip-directive.cjs +84 -1
- package/dist/lib/tooltip-directive.cjs.map +1 -1
- package/dist/lib/tooltip-directive.js +56 -42
- package/dist/lib/tooltip-directive.js.map +1 -1
- package/dist/lib/tooltip.cjs +460 -1
- package/dist/lib/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip.js +162 -103
- package/dist/lib/tooltip.js.map +1 -1
- package/dist/lib/top-banner-info.cjs +71 -1
- package/dist/lib/top-banner-info.cjs.map +1 -1
- package/dist/lib/top-banner-info.js +27 -22
- package/dist/lib/top-banner-info.js.map +1 -1
- package/dist/lib/unread-pill.cjs +73 -1
- package/dist/lib/unread-pill.cjs.map +1 -1
- package/dist/lib/unread-pill.js +28 -25
- package/dist/lib/unread-pill.js.map +1 -1
- package/dist/lib/validation-messages.cjs +89 -1
- package/dist/lib/validation-messages.cjs.map +1 -1
- package/dist/lib/validation-messages.js +41 -36
- package/dist/lib/validation-messages.js.map +1 -1
- package/dist/style.css +1257 -1
- package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
- package/package.json +30 -29
- package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
- package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
- package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
- package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
- package/dist/chunks/dropdown-UO3UJalk.js +0 -2
- package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
- package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
- package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
- package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
- package/dist/chunks/index-6tYeqbgP.js +0 -3
- package/dist/chunks/index-IBtQ5jRJ.js +0 -2
- package/dist/chunks/index-IBtQ5jRJ.js.map +0 -1
- package/dist/chunks/index-b4iXYvId.js +0 -399
- package/dist/chunks/index-mRmwpCBG.js +0 -256
- package/dist/chunks/index-mRmwpCBG.js.map +0 -1
- package/dist/chunks/input-0Uksk4DP.js +0 -2
- package/dist/chunks/input_group-AS760Cp7.js +0 -2
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
- package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
- package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
- package/dist/chunks/link_constants-vIUB92L4.js +0 -16
- package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
- package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
- package/dist/chunks/modal-VuMFkZFH.js +0 -82
- package/dist/chunks/modal-qEzlo0Sj.js +0 -2
- package/dist/chunks/notice_action-jO199emq.js +0 -2
- package/dist/chunks/notice_action-tJfD5Qw1.js +0 -209
- package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
- package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
- package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
- package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
- package/dist/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
- package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
- package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
- package/dist/chunks/tab-GQZFMq83.js +0 -367
- package/dist/chunks/tab-at7WWglk.js +0 -2
- package/dist/lib/constants.cjs +0 -2
- package/dist/lib/dates.cjs +0 -2
- package/dist/lib/dates.js +0 -57
- package/dist/lib/mixins.cjs +0 -2
- package/dist/lib/mixins.js +0 -17
- package/dist/lib/utils.cjs +0 -2
- package/dist/lib/utils.js +0 -171
- package/dist/lib/validators.cjs +0 -2
- package/dist/lib/validators.js +0 -12
- /package/dist/{lib → common}/mixins.js.map +0 -0
package/dist/lib/radio-group.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DtInputGroup
|
|
2
|
-
import "../chunks/input_group-
|
|
1
|
+
import { DtInputGroup } from "./input-group.js";
|
|
2
|
+
import "../chunks/input_group-jWnq2DJT.js";
|
|
3
3
|
import "vue";
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
4
|
+
import "../common/validators.js";
|
|
5
|
+
import "../common/constants.js";
|
|
6
|
+
import "../common/utils.js";
|
|
7
7
|
import "./validation-messages.js";
|
|
8
|
-
import "../chunks/_plugin-vue_export-helper-
|
|
9
|
-
const
|
|
8
|
+
import "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
9
|
+
const _sfc_main = {
|
|
10
10
|
name: "DtRadioGroup",
|
|
11
|
-
extends:
|
|
11
|
+
extends: DtInputGroup,
|
|
12
12
|
props: {
|
|
13
13
|
/**
|
|
14
14
|
* A provided value for the radio group
|
|
@@ -55,8 +55,8 @@ const m = {
|
|
|
55
55
|
};
|
|
56
56
|
},
|
|
57
57
|
watch: {
|
|
58
|
-
value(
|
|
59
|
-
this.internalValue =
|
|
58
|
+
value(newValue) {
|
|
59
|
+
this.internalValue = newValue;
|
|
60
60
|
},
|
|
61
61
|
/*
|
|
62
62
|
* watching value to support 2 way binding for slotted radios.
|
|
@@ -64,9 +64,9 @@ const m = {
|
|
|
64
64
|
* radio group.
|
|
65
65
|
*/
|
|
66
66
|
internalValue: {
|
|
67
|
-
immediate:
|
|
68
|
-
handler(
|
|
69
|
-
this.provideObj.selectedValue =
|
|
67
|
+
immediate: true,
|
|
68
|
+
handler(newInternalValue) {
|
|
69
|
+
this.provideObj.selectedValue = newInternalValue;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -75,15 +75,15 @@ const m = {
|
|
|
75
75
|
* provided value to support 2 way binding for slotted radios.
|
|
76
76
|
* slotted radios will change this value and need to emit new value up.
|
|
77
77
|
*/
|
|
78
|
-
setGroupValue(
|
|
79
|
-
this.$emit("input",
|
|
78
|
+
setGroupValue(newValue) {
|
|
79
|
+
this.$emit("input", newValue);
|
|
80
80
|
},
|
|
81
|
-
getMessageKey(
|
|
82
|
-
return `radio-group-message-${
|
|
81
|
+
getMessageKey(type, index) {
|
|
82
|
+
return `radio-group-message-${type}-${index}-${this.id}`;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
_sfc_main as DtRadioGroup
|
|
88
88
|
};
|
|
89
89
|
//# sourceMappingURL=radio-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n value: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * A data qa tag for the radio group\n */\n dataQaGroup: {\n type: String,\n default: 'radio-group',\n },\n\n /**\n * A data qa tag for the radio group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'radio-group-legend',\n },\n\n /**\n * A data qa tag for the radio group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'radio-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n ],\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n watch: {\n value (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted radios.\n * need this to pass value to slotted checkboxes if modified outside\n * radio group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.selectedValue = newInternalValue;\n },\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted radios.\n * slotted radios will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.$emit('input', newValue);\n },\n\n getMessageKey (type, index) {\n return `radio-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":[
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../components/radio_group/radio_group.vue"],"sourcesContent":["<script>\nimport { DtInputGroup } from '../input_group';\n\n/**\n * Radio Groups are control elements that allow the user to make a single selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio_group.html\n */\nexport default {\n name: 'DtRadioGroup',\n\n extends: DtInputGroup,\n\n props: {\n /**\n * A provided value for the radio group\n * @model value\n */\n value: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * A data qa tag for the radio group\n */\n dataQaGroup: {\n type: String,\n default: 'radio-group',\n },\n\n /**\n * A data qa tag for the radio group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'radio-group-legend',\n },\n\n /**\n * A data qa tag for the radio group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'radio-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n ],\n\n data () {\n return {\n internalValue: this.value,\n };\n },\n\n watch: {\n value (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted radios.\n * need this to pass value to slotted checkboxes if modified outside\n * radio group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.selectedValue = newInternalValue;\n },\n },\n },\n\n methods: {\n /*\n * provided value to support 2 way binding for slotted radios.\n * slotted radios will change this value and need to emit new value up.\n */\n setGroupValue (newValue) {\n this.$emit('input', newValue);\n },\n\n getMessageKey (type, index) {\n return `radio-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AAOK,MAAA,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,SAAS;AAAA,EAET,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,eAAe,KAAK;AAAA;EAEvB;AAAA,EAED,OAAO;AAAA,IACL,MAAO,UAAU;AACf,WAAK,gBAAgB;AAAA,IACtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,eAAe;AAAA,MACb,WAAW;AAAA,MACX,QAAS,kBAAkB;AACzB,aAAK,WAAW,gBAAgB;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AAAA,EAED,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKP,cAAe,UAAU;AACvB,WAAK,MAAM,SAAS,QAAQ;AAAA,IAC7B;AAAA,IAED,cAAe,MAAM,OAAO;AAC1B,aAAO,uBAAuB,IAAI,IAAI,KAAK,IAAI,KAAK,EAAE;AAAA,IACvD;AAAA,EACF;AACH;"}
|
package/dist/lib/radio.cjs
CHANGED
|
@@ -1,2 +1,163 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const input = require("../chunks/input-ttnte8zB.js");
|
|
4
|
+
const common_utils = require("../common/utils.cjs");
|
|
5
|
+
const vue = require("vue");
|
|
6
|
+
const _pluginVue_exportHelper = require("../chunks/_plugin-vue_export-helper-fhnQq0tA.js");
|
|
7
|
+
const lib_validationMessages = require("./validation-messages.cjs");
|
|
8
|
+
require("../common/constants.cjs");
|
|
9
|
+
require("../common/validators.cjs");
|
|
10
|
+
const RADIO_INPUT_VALIDATION_CLASSES = {
|
|
11
|
+
warning: "d-radio--warning",
|
|
12
|
+
error: "d-radio--error",
|
|
13
|
+
success: "d-radio--success"
|
|
14
|
+
};
|
|
15
|
+
const _sfc_main = {
|
|
16
|
+
name: "DtRadio",
|
|
17
|
+
components: { DtValidationMessages: lib_validationMessages.DtValidationMessages },
|
|
18
|
+
mixins: [input.InputMixin, input.CheckableMixin, input.GroupableMixin, input.MessagesMixin],
|
|
19
|
+
inheritAttrs: false,
|
|
20
|
+
props: {
|
|
21
|
+
/**
|
|
22
|
+
* A provided value for the radio
|
|
23
|
+
*/
|
|
24
|
+
value: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: ""
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: [
|
|
30
|
+
/**
|
|
31
|
+
* Native input event
|
|
32
|
+
*
|
|
33
|
+
* @event input
|
|
34
|
+
* @type {String | Number}
|
|
35
|
+
*/
|
|
36
|
+
"input",
|
|
37
|
+
/**
|
|
38
|
+
* Native input focus event
|
|
39
|
+
*
|
|
40
|
+
* @event focus
|
|
41
|
+
* @type {FocusEvent}
|
|
42
|
+
*/
|
|
43
|
+
"focus",
|
|
44
|
+
/**
|
|
45
|
+
* Native input focusin event
|
|
46
|
+
*
|
|
47
|
+
* @event focusin
|
|
48
|
+
* @property {FocusEvent}
|
|
49
|
+
*/
|
|
50
|
+
"focusin",
|
|
51
|
+
/**
|
|
52
|
+
* Native input focusout event
|
|
53
|
+
*
|
|
54
|
+
* @event focusout
|
|
55
|
+
* @property {FocusEvent}
|
|
56
|
+
*/
|
|
57
|
+
"focusout",
|
|
58
|
+
/**
|
|
59
|
+
* Native click event
|
|
60
|
+
*
|
|
61
|
+
* @event click
|
|
62
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
63
|
+
*/
|
|
64
|
+
"click"
|
|
65
|
+
],
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
hasSlotContent: common_utils.hasSlotContent
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
computed: {
|
|
72
|
+
inputValidationClass() {
|
|
73
|
+
return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];
|
|
74
|
+
},
|
|
75
|
+
radioGroupValue() {
|
|
76
|
+
var _a;
|
|
77
|
+
return (_a = this.groupContext) == null ? void 0 : _a.selectedValue;
|
|
78
|
+
},
|
|
79
|
+
inputListeners() {
|
|
80
|
+
return {
|
|
81
|
+
/*
|
|
82
|
+
* Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input
|
|
83
|
+
* element which will result in the handler being called twice
|
|
84
|
+
* (once on the input element and once by the emitted input event by the change listener).
|
|
85
|
+
*/
|
|
86
|
+
input: () => {
|
|
87
|
+
},
|
|
88
|
+
focusin: (event) => this.$emit("focusin", event),
|
|
89
|
+
focusout: (event) => this.$emit("focusout", event),
|
|
90
|
+
change: (event) => this.emitValue(event.target.value)
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
watch: {
|
|
95
|
+
radioGroupValue: {
|
|
96
|
+
immediate: true,
|
|
97
|
+
handler(newRadioGroupValue) {
|
|
98
|
+
if (this.hasGroup) {
|
|
99
|
+
this.internalChecked = newRadioGroupValue === this.value;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
methods: {
|
|
105
|
+
emitValue(value) {
|
|
106
|
+
if (value !== this.radioGroupValue) {
|
|
107
|
+
this.setGroupValue(value);
|
|
108
|
+
this.$emit("input", value);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const _hoisted_1 = { class: "d-radio__input" };
|
|
114
|
+
const _hoisted_2 = ["checked", "name", "value", "disabled"];
|
|
115
|
+
const _hoisted_3 = {
|
|
116
|
+
class: "d-radio__copy d-radio__label",
|
|
117
|
+
"data-qa": "radio-label-description-container"
|
|
118
|
+
};
|
|
119
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
120
|
+
const _component_dt_validation_messages = vue.resolveComponent("dt-validation-messages");
|
|
121
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
|
122
|
+
vue.createElementVNode("label", null, [
|
|
123
|
+
vue.createElementVNode("div", {
|
|
124
|
+
class: vue.normalizeClass(["d-radio-group", { "d-radio-group--disabled": _ctx.internalDisabled }])
|
|
125
|
+
}, [
|
|
126
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
127
|
+
vue.createElementVNode("input", vue.mergeProps({
|
|
128
|
+
checked: _ctx.internalChecked,
|
|
129
|
+
name: _ctx.internalName,
|
|
130
|
+
value: $props.value,
|
|
131
|
+
disabled: _ctx.internalDisabled,
|
|
132
|
+
type: "radio",
|
|
133
|
+
class: ["d-radio", $options.inputValidationClass, _ctx.inputClass]
|
|
134
|
+
}, _ctx.$attrs, vue.toHandlers($options.inputListeners, true)), null, 16, _hoisted_2)
|
|
135
|
+
]),
|
|
136
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
137
|
+
vue.createElementVNode("div", vue.mergeProps({ class: _ctx.labelClass }, _ctx.labelChildProps, { "data-qa": "radio-label" }), [
|
|
138
|
+
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
139
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.label), 1)
|
|
140
|
+
])
|
|
141
|
+
], 16),
|
|
142
|
+
_ctx.$slots.description || _ctx.description ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
143
|
+
key: 0,
|
|
144
|
+
class: ["d-description", _ctx.descriptionClass]
|
|
145
|
+
}, _ctx.descriptionChildProps, { "data-qa": "radio-description" }), [
|
|
146
|
+
vue.renderSlot(_ctx.$slots, "description", {}, () => [
|
|
147
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.description), 1)
|
|
148
|
+
])
|
|
149
|
+
], 16)) : vue.createCommentVNode("", true),
|
|
150
|
+
vue.createVNode(_component_dt_validation_messages, vue.mergeProps({
|
|
151
|
+
"validation-messages": _ctx.formattedMessages,
|
|
152
|
+
"show-messages": _ctx.showMessages,
|
|
153
|
+
class: _ctx.messagesClass
|
|
154
|
+
}, _ctx.messagesChildProps, { "data-qa": "dt-radio-validation-messages" }), null, 16, ["validation-messages", "show-messages", "class"])
|
|
155
|
+
])
|
|
156
|
+
], 2)
|
|
157
|
+
])
|
|
158
|
+
]);
|
|
159
|
+
}
|
|
160
|
+
const radio = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
161
|
+
exports.DtRadio = radio;
|
|
162
|
+
exports.RADIO_INPUT_VALIDATION_CLASSES = RADIO_INPUT_VALIDATION_CLASSES;
|
|
2
163
|
//# sourceMappingURL=radio.cjs.map
|
package/dist/lib/radio.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.cjs","sources":["../../components/radio/radio_constants.js","../../components/radio/radio.vue"],"sourcesContent":["export const RADIO_INPUT_VALIDATION_CLASSES = {\n warning: 'd-radio--warning',\n error: 'd-radio--error',\n success: 'd-radio--success',\n};\n\nexport default {\n RADIO_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n class=\"d-radio__copy d-radio__label\"\n data-qa=\"radio-label-description-container\"\n >\n <div\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n\n this.$emit('input', value);\n }\n },\n },\n};\n</script>\n"],"names":["
|
|
1
|
+
{"version":3,"file":"radio.cjs","sources":["../../components/radio/radio_constants.js","../../components/radio/radio.vue"],"sourcesContent":["export const RADIO_INPUT_VALIDATION_CLASSES = {\n warning: 'd-radio--warning',\n error: 'd-radio--error',\n success: 'd-radio--success',\n};\n\nexport default {\n RADIO_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n class=\"d-radio__copy d-radio__label\"\n data-qa=\"radio-label-description-container\"\n >\n <div\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n\n this.$emit('input', value);\n }\n },\n },\n};\n</script>\n"],"names":["DtValidationMessages","InputMixin","CheckableMixin","GroupableMixin","MessagesMixin","hasSlotContent","_createElementBlock","_createElementVNode","_mergeProps","_toHandlers","_renderSlot","_openBlock","_createVNode"],"mappings":";;;;;;;;;AAAY,MAAC,iCAAiC;AAAA,EAC5C,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AC8DA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAEA,sBAAAA,uBAAAA,qBAAsB;AAAA,EAEpC,QAAQ,CAACC,MAAU,YAAEC,sBAAgBC,MAAAA,gBAAgBC,MAAAA,aAAa;AAAA,EAElE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAA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-
import {
|
|
2
|
-
import { hasSlotContent
|
|
3
|
-
import { resolveComponent
|
|
4
|
-
import {
|
|
5
|
-
import { DtValidationMessages
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
const
|
|
1
|
+
import { InputMixin, CheckableMixin, GroupableMixin, MessagesMixin } from "../chunks/input-NmYDD5bn.js";
|
|
2
|
+
import { hasSlotContent } from "../common/utils.js";
|
|
3
|
+
import { resolveComponent, openBlock, createElementBlock, createElementVNode, normalizeClass, mergeProps, toHandlers, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
4
|
+
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
5
|
+
import { DtValidationMessages } from "./validation-messages.js";
|
|
6
|
+
import "../common/constants.js";
|
|
7
|
+
import "../common/validators.js";
|
|
8
|
+
const RADIO_INPUT_VALIDATION_CLASSES = {
|
|
9
9
|
warning: "d-radio--warning",
|
|
10
10
|
error: "d-radio--error",
|
|
11
11
|
success: "d-radio--success"
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
|
+
const _sfc_main = {
|
|
13
14
|
name: "DtRadio",
|
|
14
|
-
components: { DtValidationMessages
|
|
15
|
-
mixins: [
|
|
16
|
-
inheritAttrs:
|
|
15
|
+
components: { DtValidationMessages },
|
|
16
|
+
mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],
|
|
17
|
+
inheritAttrs: false,
|
|
17
18
|
props: {
|
|
18
19
|
/**
|
|
19
20
|
* A provided value for the radio
|
|
@@ -62,16 +63,16 @@ const D = {
|
|
|
62
63
|
],
|
|
63
64
|
data() {
|
|
64
65
|
return {
|
|
65
|
-
hasSlotContent
|
|
66
|
+
hasSlotContent
|
|
66
67
|
};
|
|
67
68
|
},
|
|
68
69
|
computed: {
|
|
69
70
|
inputValidationClass() {
|
|
70
|
-
return
|
|
71
|
+
return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];
|
|
71
72
|
},
|
|
72
73
|
radioGroupValue() {
|
|
73
|
-
var
|
|
74
|
-
return (
|
|
74
|
+
var _a;
|
|
75
|
+
return (_a = this.groupContext) == null ? void 0 : _a.selectedValue;
|
|
75
76
|
},
|
|
76
77
|
inputListeners() {
|
|
77
78
|
return {
|
|
@@ -82,73 +83,81 @@ const D = {
|
|
|
82
83
|
*/
|
|
83
84
|
input: () => {
|
|
84
85
|
},
|
|
85
|
-
focusin: (
|
|
86
|
-
focusout: (
|
|
87
|
-
change: (
|
|
86
|
+
focusin: (event) => this.$emit("focusin", event),
|
|
87
|
+
focusout: (event) => this.$emit("focusout", event),
|
|
88
|
+
change: (event) => this.emitValue(event.target.value)
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
watch: {
|
|
92
93
|
radioGroupValue: {
|
|
93
|
-
immediate:
|
|
94
|
-
handler(
|
|
95
|
-
|
|
94
|
+
immediate: true,
|
|
95
|
+
handler(newRadioGroupValue) {
|
|
96
|
+
if (this.hasGroup) {
|
|
97
|
+
this.internalChecked = newRadioGroupValue === this.value;
|
|
98
|
+
}
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
101
|
},
|
|
99
102
|
methods: {
|
|
100
|
-
emitValue(
|
|
101
|
-
|
|
103
|
+
emitValue(value) {
|
|
104
|
+
if (value !== this.radioGroupValue) {
|
|
105
|
+
this.setGroupValue(value);
|
|
106
|
+
this.$emit("input", value);
|
|
107
|
+
}
|
|
102
108
|
}
|
|
103
109
|
}
|
|
104
|
-
}
|
|
110
|
+
};
|
|
111
|
+
const _hoisted_1 = { class: "d-radio__input" };
|
|
112
|
+
const _hoisted_2 = ["checked", "name", "value", "disabled"];
|
|
113
|
+
const _hoisted_3 = {
|
|
105
114
|
class: "d-radio__copy d-radio__label",
|
|
106
115
|
"data-qa": "radio-label-description-container"
|
|
107
116
|
};
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
return
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
class:
|
|
117
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
118
|
+
const _component_dt_validation_messages = resolveComponent("dt-validation-messages");
|
|
119
|
+
return openBlock(), createElementBlock("div", null, [
|
|
120
|
+
createElementVNode("label", null, [
|
|
121
|
+
createElementVNode("div", {
|
|
122
|
+
class: normalizeClass(["d-radio-group", { "d-radio-group--disabled": _ctx.internalDisabled }])
|
|
114
123
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
checked:
|
|
118
|
-
name:
|
|
119
|
-
value:
|
|
120
|
-
disabled:
|
|
124
|
+
createElementVNode("div", _hoisted_1, [
|
|
125
|
+
createElementVNode("input", mergeProps({
|
|
126
|
+
checked: _ctx.internalChecked,
|
|
127
|
+
name: _ctx.internalName,
|
|
128
|
+
value: $props.value,
|
|
129
|
+
disabled: _ctx.internalDisabled,
|
|
121
130
|
type: "radio",
|
|
122
|
-
class: ["d-radio",
|
|
123
|
-
},
|
|
131
|
+
class: ["d-radio", $options.inputValidationClass, _ctx.inputClass]
|
|
132
|
+
}, _ctx.$attrs, toHandlers($options.inputListeners, true)), null, 16, _hoisted_2)
|
|
124
133
|
]),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
createElementVNode("div", _hoisted_3, [
|
|
135
|
+
createElementVNode("div", mergeProps({ class: _ctx.labelClass }, _ctx.labelChildProps, { "data-qa": "radio-label" }), [
|
|
136
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
137
|
+
createTextVNode(toDisplayString(_ctx.label), 1)
|
|
129
138
|
])
|
|
130
139
|
], 16),
|
|
131
|
-
|
|
140
|
+
_ctx.$slots.description || _ctx.description ? (openBlock(), createElementBlock("div", mergeProps({
|
|
132
141
|
key: 0,
|
|
133
|
-
class: ["d-description",
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
|
|
142
|
+
class: ["d-description", _ctx.descriptionClass]
|
|
143
|
+
}, _ctx.descriptionChildProps, { "data-qa": "radio-description" }), [
|
|
144
|
+
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
145
|
+
createTextVNode(toDisplayString(_ctx.description), 1)
|
|
137
146
|
])
|
|
138
|
-
], 16)) :
|
|
139
|
-
|
|
140
|
-
"validation-messages":
|
|
141
|
-
"show-messages":
|
|
142
|
-
class:
|
|
143
|
-
},
|
|
147
|
+
], 16)) : createCommentVNode("", true),
|
|
148
|
+
createVNode(_component_dt_validation_messages, mergeProps({
|
|
149
|
+
"validation-messages": _ctx.formattedMessages,
|
|
150
|
+
"show-messages": _ctx.showMessages,
|
|
151
|
+
class: _ctx.messagesClass
|
|
152
|
+
}, _ctx.messagesChildProps, { "data-qa": "dt-radio-validation-messages" }), null, 16, ["validation-messages", "show-messages", "class"])
|
|
144
153
|
])
|
|
145
154
|
], 2)
|
|
146
155
|
])
|
|
147
156
|
]);
|
|
148
157
|
}
|
|
149
|
-
const
|
|
158
|
+
const radio = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
150
159
|
export {
|
|
151
|
-
|
|
152
|
-
|
|
160
|
+
radio as DtRadio,
|
|
161
|
+
RADIO_INPUT_VALIDATION_CLASSES
|
|
153
162
|
};
|
|
154
163
|
//# sourceMappingURL=radio.js.map
|
package/dist/lib/radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../components/radio/radio_constants.js","../../components/radio/radio.vue"],"sourcesContent":["export const RADIO_INPUT_VALIDATION_CLASSES = {\n warning: 'd-radio--warning',\n error: 'd-radio--error',\n success: 'd-radio--success',\n};\n\nexport default {\n RADIO_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n class=\"d-radio__copy d-radio__label\"\n data-qa=\"radio-label-description-container\"\n >\n <div\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n\n this.$emit('input', value);\n }\n },\n },\n};\n</script>\n"],"names":["
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../components/radio/radio_constants.js","../../components/radio/radio.vue"],"sourcesContent":["export const RADIO_INPUT_VALIDATION_CLASSES = {\n warning: 'd-radio--warning',\n error: 'd-radio--error',\n success: 'd-radio--success',\n};\n\nexport default {\n RADIO_INPUT_VALIDATION_CLASSES,\n};\n","<template>\n <div>\n <label>\n <div :class=\"['d-radio-group', { 'd-radio-group--disabled': internalDisabled }]\">\n <div class=\"d-radio__input\">\n <input\n :checked=\"internalChecked\"\n :name=\"internalName\"\n :value=\"value\"\n :disabled=\"internalDisabled\"\n type=\"radio\"\n :class=\"['d-radio', inputValidationClass, inputClass]\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n </div>\n <div\n class=\"d-radio__copy d-radio__label\"\n data-qa=\"radio-label-description-container\"\n >\n <div\n :class=\"labelClass\"\n v-bind=\"labelChildProps\"\n data-qa=\"radio-label\"\n >\n <!-- @slot slot for Radio Label -->\n <slot>{{ label }}</slot>\n </div>\n <div\n v-if=\"$slots.description || description\"\n :class=\"['d-description', descriptionClass]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"radio-description\"\n >\n <!-- @slot slot for Radio Description -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-radio-validation-messages\"\n />\n </div>\n </div>\n </label>\n </div>\n</template>\n\n<script>\nimport {\n InputMixin,\n CheckableMixin,\n GroupableMixin,\n MessagesMixin,\n} from '@/common/mixins/input';\nimport { RADIO_INPUT_VALIDATION_CLASSES } from './radio_constants';\nimport { DtValidationMessages } from '../validation_messages';\nimport { hasSlotContent } from '@/common/utils';\n\n/**\n * Radios are control elements that allow the user to make a single selection.\n * They are typically used in a Radio Group which allows the user to make a selection from a list of options.\n * @see https://dialtone.dialpad.com/components/radio.html\n */\nexport default {\n name: 'DtRadio',\n\n components: { DtValidationMessages },\n\n mixins: [InputMixin, CheckableMixin, GroupableMixin, MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * A provided value for the radio\n */\n value: {\n type: [String, Number],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @property {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @property {FocusEvent}\n */\n 'focusout',\n\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n hasSlotContent,\n };\n },\n\n computed: {\n inputValidationClass () {\n return RADIO_INPUT_VALIDATION_CLASSES[this.internalValidationState];\n },\n\n radioGroupValue () {\n return this.groupContext?.selectedValue;\n },\n\n inputListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice\n * (once on the input element and once by the emitted input event by the change listener).\n */\n input: () => {},\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n change: event => this.emitValue(event.target.value),\n };\n },\n },\n\n watch: {\n radioGroupValue: {\n immediate: true,\n handler (newRadioGroupValue) {\n if (this.hasGroup) {\n // update internal value when the radio group value changes\n this.internalChecked = newRadioGroupValue === this.value;\n }\n },\n },\n },\n\n methods: {\n emitValue (value) {\n if (value !== this.radioGroupValue) {\n // update provided value if injected\n this.setGroupValue(value);\n\n this.$emit('input', value);\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createElementVNode","_mergeProps","_toHandlers","_renderSlot","_openBlock","_createVNode"],"mappings":";;;;;;;AAAY,MAAC,iCAAiC;AAAA,EAC5C,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AC8DA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,qBAAsB;AAAA,EAEpC,QAAQ,CAAC,YAAY,gBAAgB,gBAAgB,aAAa;AAAA,EAElE,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL;AAAA;EAEH;AAAA,EAED,UAAU;AAAA,IACR,uBAAwB;AAC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