@adyen/bento-vue3 1.99.0 → 1.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +19 -13
- package/dist/action-bar.js +1 -1
- package/dist/ai-tag.js +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-scroller.js +1 -1
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/draggable-handle.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/filter-bar.css +1 -1
- package/dist/assets/input-field.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/navigation-menu-group.css +1 -1
- package/dist/assets/rich-text-editor.css +1 -1
- package/dist/assets/secondary-nav.css +1 -1
- package/dist/assets/selection-card-group.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +1 -1
- package/dist/chunks/{action-bar.Dd0rr7Sb.js → action-bar.C9A4LZXq.js} +4 -4
- package/dist/chunks/{action-bar.Dd0rr7Sb.js.map → action-bar.C9A4LZXq.js.map} +1 -1
- package/dist/chunks/{ai-button.1YJdI-sw.js → ai-button.B6_iVJrF.js} +2 -2
- package/dist/chunks/{ai-button.1YJdI-sw.js.map → ai-button.B6_iVJrF.js.map} +1 -1
- package/dist/chunks/{ai-tag.DOQ-UnnF.js → ai-tag.Brtsi-_Q.js} +2 -2
- package/dist/chunks/{ai-tag.DOQ-UnnF.js.map → ai-tag.Brtsi-_Q.js.map} +1 -1
- package/dist/chunks/{alert.V1imvtyI.js → alert.CQBxTuII.js} +2 -2
- package/dist/chunks/{alert.V1imvtyI.js.map → alert.CQBxTuII.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.NRHfj2FY.js → anchor-scroller.ZMjZsvKe.js} +3 -3
- package/dist/chunks/{anchor-scroller.NRHfj2FY.js.map → anchor-scroller.ZMjZsvKe.js.map} +1 -1
- package/dist/chunks/{base-modal.BzbJbryi.js → base-modal.DtAGV7IJ.js} +5 -5
- package/dist/chunks/{base-modal.BzbJbryi.js.map → base-modal.DtAGV7IJ.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.DZdmQdah.js → button-actions-with-menu.CD1rzFcv.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.DZdmQdah.js.map → button-actions-with-menu.CD1rzFcv.js.map} +1 -1
- package/dist/chunks/{button-actions.CgZbPzhi.js → button-actions.Cn0reO-q.js} +2 -2
- package/dist/chunks/{button-actions.CgZbPzhi.js.map → button-actions.Cn0reO-q.js.map} +1 -1
- package/dist/chunks/button.C6-bXf1h.js +130 -0
- package/dist/chunks/button.C6-bXf1h.js.map +1 -0
- package/dist/chunks/{calendar.B0XfOj2I.js → calendar.xS1f71Tj.js} +3 -3
- package/dist/chunks/{calendar.B0XfOj2I.js.map → calendar.xS1f71Tj.js.map} +1 -1
- package/dist/chunks/{card.BpPQzOoN.js → card.7rxK1PUi.js} +2 -2
- package/dist/chunks/{card.BpPQzOoN.js.map → card.7rxK1PUi.js.map} +1 -1
- package/dist/chunks/{code-snippet.DiBQjBoy.js → code-snippet.BNsYld-H.js} +5 -5
- package/dist/chunks/{code-snippet.DiBQjBoy.js.map → code-snippet.BNsYld-H.js.map} +1 -1
- package/dist/chunks/{copy.nnaqOH6I.js → copy.CFgvGhnT.js} +2 -2
- package/dist/chunks/{copy.nnaqOH6I.js.map → copy.CFgvGhnT.js.map} +1 -1
- package/dist/chunks/{dashboard-section.B82okI3e.js → dashboard-section._cJmCYmS.js} +3 -3
- package/dist/chunks/{dashboard-section.B82okI3e.js.map → dashboard-section._cJmCYmS.js.map} +1 -1
- package/dist/chunks/{dashed-underline.x_gU4d-A.js → dashed-underline.BX23F04p.js} +2 -2
- package/dist/chunks/{dashed-underline.x_gU4d-A.js.map → dashed-underline.BX23F04p.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BdabDTqN.js → data-grid-template.D7XYAdGO.js} +4 -4
- package/dist/chunks/{data-grid-template.BdabDTqN.js.map → data-grid-template.D7XYAdGO.js.map} +1 -1
- package/dist/chunks/{data-grid.BNFwP2g7.js → data-grid.BRxL5jfA.js} +13 -13
- package/dist/chunks/{data-grid.BNFwP2g7.js.map → data-grid.BRxL5jfA.js.map} +1 -1
- package/dist/chunks/{date-picker.ClFHuglH.js → date-picker.HvI3aqn_.js} +6 -6
- package/dist/chunks/{date-picker.ClFHuglH.js.map → date-picker.HvI3aqn_.js.map} +1 -1
- package/dist/chunks/{date-range-picker.D3iAZN20.js → date-range-picker.CxJ-Dwy6.js} +8 -8
- package/dist/chunks/{date-range-picker.D3iAZN20.js.map → date-range-picker.CxJ-Dwy6.js.map} +1 -1
- package/dist/chunks/{dialog-page.BYMSk5DR.js → dialog-page.BFem0ZGE.js} +2 -2
- package/dist/chunks/{dialog-page.BYMSk5DR.js.map → dialog-page.BFem0ZGE.js.map} +1 -1
- package/dist/chunks/{draggable-handle.y_1hfypa.js → draggable-handle.BepmJZ8K.js} +270 -264
- package/dist/chunks/{draggable-handle.y_1hfypa.js.map → draggable-handle.BepmJZ8K.js.map} +1 -1
- package/dist/chunks/{draggable.5evQkGJ4.js → draggable.DWd19-Ke.js} +2 -2
- package/dist/chunks/{draggable.5evQkGJ4.js.map → draggable.DWd19-Ke.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.KO0gs2Lb.js → dropdown-tag.D5OzRb26.js} +2 -2
- package/dist/chunks/{dropdown-tag.KO0gs2Lb.js.map → dropdown-tag.D5OzRb26.js.map} +1 -1
- package/dist/chunks/{dropdown.DpqCHfi-.js → dropdown.DemBTBTo.js} +3 -3
- package/dist/chunks/{dropdown.DpqCHfi-.js.map → dropdown.DemBTBTo.js.map} +1 -1
- package/dist/chunks/{empty-state.DT4sFyjB.js → empty-state.C1SZznqL.js} +2 -2
- package/dist/chunks/{empty-state.DT4sFyjB.js.map → empty-state.C1SZznqL.js.map} +1 -1
- package/dist/chunks/{file-uploader.xzoJqcg1.js → file-uploader.1xbAOQVr.js} +3 -3
- package/dist/chunks/{file-uploader.xzoJqcg1.js.map → file-uploader.1xbAOQVr.js.map} +1 -1
- package/dist/chunks/{filter-bar.D3Lf7VJF.js → filter-bar.Du-a3Acn.js} +1812 -1733
- package/dist/chunks/filter-bar.Du-a3Acn.js.map +1 -0
- package/dist/chunks/{fixed-scroller.yVsaQzy5.js → fixed-scroller.C81gv4JS.js} +2 -2
- package/dist/chunks/{fixed-scroller.yVsaQzy5.js.map → fixed-scroller.C81gv4JS.js.map} +1 -1
- package/dist/chunks/{footer-actions.sEd1kzgV.js → footer-actions.Bxs91LNd.js} +3 -3
- package/dist/chunks/{footer-actions.sEd1kzgV.js.map → footer-actions.Bxs91LNd.js.map} +1 -1
- package/dist/chunks/{form-layout-title.CWw0poO8.js → form-layout-title.Cr27QPQx.js} +2 -2
- package/dist/chunks/{form-layout-title.CWw0poO8.js.map → form-layout-title.Cr27QPQx.js.map} +1 -1
- package/dist/chunks/{header-meta.DWWL88nm.js → header-meta.7O7dRg_a.js} +2 -2
- package/dist/chunks/{header-meta.DWWL88nm.js.map → header-meta.7O7dRg_a.js.map} +1 -1
- package/dist/chunks/{header-with-views.B-5VCTDp.js → header-with-views.DjS8uGm4.js} +8 -8
- package/dist/chunks/{header-with-views.B-5VCTDp.js.map → header-with-views.DjS8uGm4.js.map} +1 -1
- package/dist/chunks/{header.B6pGQk7G.js → header.BW-OkVwK.js} +3 -3
- package/dist/chunks/{header.B6pGQk7G.js.map → header.BW-OkVwK.js.map} +1 -1
- package/dist/chunks/{input-field-password.BCme16nn.js → input-field-password.KlvNwYqo.js} +4 -4
- package/dist/chunks/{input-field-password.BCme16nn.js.map → input-field-password.KlvNwYqo.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.BwVbTNcu.js → input-field-phone-number.byO-cUDL.js} +2 -2
- package/dist/chunks/{input-field-phone-number.BwVbTNcu.js.map → input-field-phone-number.byO-cUDL.js.map} +1 -1
- package/dist/chunks/{input-field.Cox9LW4Z.js → input-field.B-0d_T4g.js} +39 -29
- package/dist/chunks/{input-field.Cox9LW4Z.js.map → input-field.B-0d_T4g.js.map} +1 -1
- package/dist/chunks/{input-time.bHFZRv6T.js → input-time.nPazqbCJ.js} +3 -3
- package/dist/chunks/{input-time.bHFZRv6T.js.map → input-time.nPazqbCJ.js.map} +1 -1
- package/dist/chunks/{inspector.CTBNfXvo.js → inspector.04j4uhcL.js} +2 -2
- package/dist/chunks/{inspector.CTBNfXvo.js.map → inspector.04j4uhcL.js.map} +1 -1
- package/dist/chunks/{list-item.CqUFIXPC.js → list-item.Bh7YMPOT.js} +2 -2
- package/dist/chunks/{list-item.CqUFIXPC.js.map → list-item.Bh7YMPOT.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.T5PF8pWA.js → modal-fullscreen.Dsb7-HDn.js} +5 -5
- package/dist/chunks/{modal-fullscreen.T5PF8pWA.js.map → modal-fullscreen.Dsb7-HDn.js.map} +1 -1
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BOOZl25a.js → modal.vue_vue_type_script_setup_true_lang.CwpOjtKq.js} +5 -5
- package/dist/chunks/{modal.vue_vue_type_script_setup_true_lang.BOOZl25a.js.map → modal.vue_vue_type_script_setup_true_lang.CwpOjtKq.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.CIV5BQJA.js → navigation-menu-group.ikwhk1TY.js} +2 -2
- package/dist/chunks/{navigation-menu-group.CIV5BQJA.js.map → navigation-menu-group.ikwhk1TY.js.map} +1 -1
- package/dist/chunks/{pagination.CMt-m_-T.js → pagination.DEjCJwaX.js} +3 -3
- package/dist/chunks/{pagination.CMt-m_-T.js.map → pagination.DEjCJwaX.js.map} +1 -1
- package/dist/chunks/{promo-banner.DICpj6e6.js → promo-banner.BonAKy1p.js} +2 -2
- package/dist/chunks/{promo-banner.DICpj6e6.js.map → promo-banner.BonAKy1p.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.D94Vaa4k.js → rich-text-editor.IxYsg6CI.js} +2 -2
- package/dist/chunks/{rich-text-editor.D94Vaa4k.js.map → rich-text-editor.IxYsg6CI.js.map} +1 -1
- package/dist/chunks/{search-bar.DSi5ti-s.js → search-bar.C-U8clpQ.js} +3 -3
- package/dist/chunks/{search-bar.DSi5ti-s.js.map → search-bar.C-U8clpQ.js.map} +1 -1
- package/dist/chunks/{secondary-nav.D5w22NJe.js → secondary-nav.Dk2uIEjb.js} +3 -3
- package/dist/chunks/{secondary-nav.D5w22NJe.js.map → secondary-nav.Dk2uIEjb.js.map} +1 -1
- package/dist/chunks/{sidepanel.DWgn0NNb.js → sidepanel.Comuu3ed.js} +5 -5
- package/dist/chunks/{sidepanel.DWgn0NNb.js.map → sidepanel.Comuu3ed.js.map} +1 -1
- package/dist/chunks/{structured-list-item.RunfI9Pj.js → structured-list-item.BqptGVDy.js} +3 -3
- package/dist/chunks/{structured-list-item.RunfI9Pj.js.map → structured-list-item.BqptGVDy.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.DiJtaVN-.js → summary-grid.types.CS7JxDEe.js} +3 -3
- package/dist/chunks/{summary-grid.types.DiJtaVN-.js.map → summary-grid.types.CS7JxDEe.js.map} +1 -1
- package/dist/chunks/{tab.CnvwN1lS.js → tab.BUeDKzsC.js} +2 -2
- package/dist/chunks/{tab.CnvwN1lS.js.map → tab.BUeDKzsC.js.map} +1 -1
- package/dist/chunks/{textarea.Cb6Fu5-u.js → textarea.CIVT8C_Z.js} +2 -2
- package/dist/chunks/{textarea.Cb6Fu5-u.js.map → textarea.CIVT8C_Z.js.map} +1 -1
- package/dist/chunks/{timeline-item.XpxLQwxK.js → timeline-item.Bva1ccQQ.js} +6 -6
- package/dist/chunks/{timeline-item.XpxLQwxK.js.map → timeline-item.Bva1ccQQ.js.map} +1 -1
- package/dist/chunks/{toast.De4MTkiH.js → toast.BQa5mK5U.js} +2 -2
- package/dist/chunks/{toast.De4MTkiH.js.map → toast.BQa5mK5U.js.map} +1 -1
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.DjvXPcvu.js → tutorial.vue_vue_type_script_setup_true_lang.X5GUFYKD.js} +2 -2
- package/dist/chunks/{tutorial.vue_vue_type_script_setup_true_lang.DjvXPcvu.js.map → tutorial.vue_vue_type_script_setup_true_lang.X5GUFYKD.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.ovThcj9h.js → use-date-input-formatter.DvYZRRZi.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.ovThcj9h.js.map → use-date-input-formatter.DvYZRRZi.js.map} +1 -1
- package/dist/code-snippet.js +1 -1
- package/dist/dashboard-template.js +1 -1
- package/dist/dashed-underline.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +1 -1
- package/dist/date-picker.js +2 -2
- package/dist/date-range-picker.js +2 -2
- package/dist/date-time-picker.js +4 -4
- package/dist/draggable.js +2 -2
- package/dist/dropdown.js +2 -2
- package/dist/empty-state.js +1 -1
- package/dist/file-uploader.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header-with-views.js +1 -1
- package/dist/header.js +1 -1
- package/dist/index.js +49 -49
- package/dist/input-field-password.js +1 -1
- package/dist/input-field-phone-number.js +1 -1
- package/dist/input-field.js +1 -1
- package/dist/input-time.js +1 -1
- package/dist/inspector.js +1 -1
- package/dist/internal.js +8 -8
- package/dist/list.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/navigation-menu.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/promo-banner.js +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +1 -1
- package/dist/sidepanel.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tutorial.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/chunks/button.DWF7FSIw.js +0 -128
- package/dist/chunks/button.DWF7FSIw.js.map +0 -1
- package/dist/chunks/filter-bar.D3Lf7VJF.js.map +0 -1
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, useAttrs as I, useSlots as C, computed as s, openBlock as r, createBlock as p, resolveDynamicComponent as N, mergeProps as T, withCtx as f, unref as n, createElementBlock as v, renderSlot as l, createCommentVNode as d } from "vue";
|
|
2
|
-
import { B as A } from "./typography.B3J6_tYk.js";
|
|
3
|
-
import { u as O } from "./use-has-slot.CyMiImRQ.js";
|
|
4
|
-
import { B as $, a as L } from "./link.D6D6YGsN.js";
|
|
5
|
-
import { _ as Y } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
-
import "../assets/button.css";
|
|
7
|
-
var c = /* @__PURE__ */ ((t) => (t.PRIMARY = "primary", t.SECONDARY = "secondary", t.TERTIARY = "tertiary", t.TERTIARY_WITH_BACKGROUND = "tertiary-with-background", t))(c || {}), i = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DESTRUCTIVE = "critical", t.DISABLED = "disabled", t.ICON_ONLY = "icon-only", t.INVERSE = "inverse", t))(i || {});
|
|
8
|
-
const B = ["aria-hidden"], U = ["aria-hidden"], w = {
|
|
9
|
-
name: "bento-button"
|
|
10
|
-
}, x = /* @__PURE__ */ D({
|
|
11
|
-
...w,
|
|
12
|
-
props: {
|
|
13
|
-
/**
|
|
14
|
-
* Reduces sizing of button
|
|
15
|
-
*/
|
|
16
|
-
condensed: { type: Boolean, default: !1 },
|
|
17
|
-
/**
|
|
18
|
-
* Displays button as critical
|
|
19
|
-
*/
|
|
20
|
-
critical: { type: Boolean, default: !1 },
|
|
21
|
-
/**
|
|
22
|
-
* Disables button functionality
|
|
23
|
-
*/
|
|
24
|
-
disabled: { type: Boolean, default: !1 },
|
|
25
|
-
/**
|
|
26
|
-
* Sets color set to inverse
|
|
27
|
-
*/
|
|
28
|
-
inverse: { type: Boolean, default: !1 },
|
|
29
|
-
/**
|
|
30
|
-
* Object containing props passed on to the BentoLink component. @see BentoLink documentation for which properties you can pass.
|
|
31
|
-
*/
|
|
32
|
-
link: { type: Object, default: void 0 },
|
|
33
|
-
/**
|
|
34
|
-
* The default behavior of the button.
|
|
35
|
-
* Possible values are: 'button', 'reset', 'submit'
|
|
36
|
-
*/
|
|
37
|
-
type: {
|
|
38
|
-
type: String,
|
|
39
|
-
default: "button"
|
|
40
|
-
},
|
|
41
|
-
/**
|
|
42
|
-
* Types of flavour of Button
|
|
43
|
-
* @values primary, secondary, tertiary, tertiary-with-background
|
|
44
|
-
*/
|
|
45
|
-
variant: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: c.PRIMARY,
|
|
48
|
-
validator: (t) => Object.values(c).includes(t)
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
emits: ["blur", "click", "focus", "keydown.esc"],
|
|
52
|
-
setup(t, { emit: m }) {
|
|
53
|
-
const e = t, y = m, u = I(), _ = C(), o = O(_), b = s(() => e?.link !== void 0 ? e.disabled ? "span" : $ : "button"), E = s(() => ({
|
|
54
|
-
"aria-controls": u["aria-controls"]?.toString(),
|
|
55
|
-
"aria-expanded": u["aria-expanded"]?.toString()
|
|
56
|
-
})), k = s(
|
|
57
|
-
() => b.value === "button" ? {
|
|
58
|
-
...E.value,
|
|
59
|
-
disabled: e.disabled,
|
|
60
|
-
type: e.type
|
|
61
|
-
} : {
|
|
62
|
-
...e.link,
|
|
63
|
-
disableTypography: !0,
|
|
64
|
-
variant: L.DEFAULT,
|
|
65
|
-
isButton: !0,
|
|
66
|
-
/**
|
|
67
|
-
* When the button is a disabled link, it's rendered as a `<span>`.
|
|
68
|
-
* These attributes ensure it's still announced as a disabled link by screen readers.
|
|
69
|
-
*/
|
|
70
|
-
"aria-disabled": e.disabled ? "true" : void 0,
|
|
71
|
-
role: e.disabled ? "link" : void 0
|
|
72
|
-
}
|
|
73
|
-
), S = s(() => ({
|
|
74
|
-
[`b-button--${e.variant}${e.critical ? `-${i.DESTRUCTIVE}` : ""}`]: !0
|
|
75
|
-
})), h = s(() => ({
|
|
76
|
-
...S.value,
|
|
77
|
-
[`b-button--${i.CONDENSED}`]: e.condensed,
|
|
78
|
-
[`b-button--${i.DISABLED}`]: e.disabled,
|
|
79
|
-
[`b-button--${i.INVERSE}`]: e.inverse
|
|
80
|
-
})), R = () => ({
|
|
81
|
-
[`b-button--${i.ICON_ONLY}`]: !o("default")
|
|
82
|
-
}), g = (a) => {
|
|
83
|
-
e.disabled ? (a.preventDefault(), a.stopPropagation()) : y("click", a);
|
|
84
|
-
};
|
|
85
|
-
return (a, V) => (r(), p(N(b.value), T(k.value, {
|
|
86
|
-
class: ["b-button", { ...h.value, ...R() }],
|
|
87
|
-
onClickCapture: g
|
|
88
|
-
}), {
|
|
89
|
-
default: f(() => [
|
|
90
|
-
n(o)("iconLeft") ? (r(), v("span", {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "b-button__icon-left",
|
|
93
|
-
"data-testid": "icon-button-left",
|
|
94
|
-
"aria-hidden": n(o)("default") ? "true" : null
|
|
95
|
-
}, [
|
|
96
|
-
l(a.$slots, "iconLeft", {}, void 0, !0)
|
|
97
|
-
], 8, B)) : d("", !0),
|
|
98
|
-
n(o)("default") ? (r(), p(n(A), {
|
|
99
|
-
key: 1,
|
|
100
|
-
el: "span",
|
|
101
|
-
variant: "body",
|
|
102
|
-
stronger: "",
|
|
103
|
-
class: "b-button__label"
|
|
104
|
-
}, {
|
|
105
|
-
default: f(() => [
|
|
106
|
-
l(a.$slots, "default", {}, void 0, !0)
|
|
107
|
-
]),
|
|
108
|
-
_: 3
|
|
109
|
-
})) : d("", !0),
|
|
110
|
-
n(o)("iconRight") ? (r(), v("span", {
|
|
111
|
-
key: 2,
|
|
112
|
-
class: "b-button__icon-right",
|
|
113
|
-
"data-testid": "icon-button-right",
|
|
114
|
-
"aria-hidden": n(o)("default") ? "true" : null
|
|
115
|
-
}, [
|
|
116
|
-
l(a.$slots, "iconRight", {}, void 0, !0)
|
|
117
|
-
], 8, U)) : d("", !0)
|
|
118
|
-
]),
|
|
119
|
-
_: 3
|
|
120
|
-
}, 16, ["class"]));
|
|
121
|
-
}
|
|
122
|
-
}), K = /* @__PURE__ */ Y(x, [["__scopeId", "data-v-40589d5a"]]);
|
|
123
|
-
export {
|
|
124
|
-
K as B,
|
|
125
|
-
i as a,
|
|
126
|
-
c as b
|
|
127
|
-
};
|
|
128
|
-
//# sourceMappingURL=button.DWF7FSIw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.DWF7FSIw.js","sources":["../../../vue2/src/components/button/button.types.ts","../../../vue2/src/components/button/button.vue"],"sourcesContent":["/**\n * @deprecated Since v2.0.0. Use string literal instead.\n */\nexport enum BentoButtonVariant {\n PRIMARY = 'primary',\n SECONDARY = 'secondary',\n TERTIARY = 'tertiary',\n TERTIARY_WITH_BACKGROUND = 'tertiary-with-background',\n}\n\nexport enum BentoButtonPropClass {\n CONDENSED = 'condensed',\n DESTRUCTIVE = 'critical',\n DISABLED = 'disabled',\n ICON_ONLY = 'icon-only',\n INVERSE = 'inverse',\n}\n\nexport interface BentoButtonProps {\n condensed?: boolean;\n critical?: boolean;\n disabled?: boolean;\n inverse?: boolean;\n variant?: BentoButtonVariant | `${BentoButtonVariant}`;\n type?: string;\n link?: object;\n}\n","<template>\n <component\n :is=\"componentType\"\n v-bind=\"componentProps\"\n class=\"b-button\"\n :class=\"{ ...conditionalClasses, ...getIconOnlyClass() }\"\n @click.capture=\"onClickButton\"\n >\n <span\n v-if=\"hasSlot('iconLeft')\"\n class=\"b-button__icon-left\"\n data-testid=\"icon-button-left\"\n :aria-hidden=\"hasSlot('default') ? 'true' : null\"\n >\n <slot name=\"iconLeft\" />\n </span>\n <bento-typography v-if=\"hasSlot('default')\" el=\"span\" variant=\"body\" stronger class=\"b-button__label\">\n <slot />\n </bento-typography>\n <span\n v-if=\"hasSlot('iconRight')\"\n class=\"b-button__icon-right\"\n data-testid=\"icon-button-right\"\n :aria-hidden=\"hasSlot('default') ? 'true' : null\"\n >\n <slot name=\"iconRight\" />\n </span>\n </component>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, useAttrs, useSlots } from 'vue';\n import { BentoButtonPropClass, BentoButtonVariant } from './button.types';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables/use-has-slot/use-has-slot';\n import { type Booleanish } from '../../types/prop-types';\n import type { RouterLinkProps } from 'vue-router/types/router.d.ts';\n import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'vue/types/jsx.d.ts';\n import { BentoLink, BentoLinkVariant } from '@/components/link';\n\n // TODO: replace all this code when migrated to Vue 3 is complete as this is the only\n // current way to extend the `router-link` component in Vue 2 and Vue Router 3\n export interface LinkProps extends RouterLinkProps, AnchorHTMLAttributes {\n args?: { props: RouterLinkProps };\n\n /**\n * Set the rendered link to a regular external anchor link.\n */\n external: boolean;\n }\n\n const props = defineProps({\n /**\n * Reduces sizing of button\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Displays button as critical\n */\n critical: { type: Boolean, default: false },\n\n /**\n * Disables button functionality\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Sets color set to inverse\n */\n inverse: { type: Boolean, default: false },\n\n /**\n * Object containing props passed on to the BentoLink component. @see BentoLink documentation for which properties you can pass.\n */\n link: { type: Object, default: undefined },\n\n /**\n * The default behavior of the button.\n * Possible values are: 'button', 'reset', 'submit'\n */\n type: {\n type: String as PropType<ButtonHTMLAttributes['type']>,\n default: 'button',\n },\n\n /**\n * Types of flavour of Button\n * @values primary, secondary, tertiary, tertiary-with-background\n */\n variant: {\n type: String as PropType<BentoButtonVariant | `${BentoButtonVariant}`>,\n default: BentoButtonVariant.PRIMARY,\n validator: (value: BentoButtonVariant) => Object.values(BentoButtonVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur');\n\n /**\n * Emitted when the button is clicked\n */\n (e: 'click', event: MouseEvent);\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus');\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'keydown.esc');\n }>();\n\n const attrs = useAttrs();\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n\n const componentType = computed(() => {\n if (props?.link !== undefined) {\n /**\n * Display a \"span\" with role \"link\" and \"aria-disabled=true\"\n * if the link is disabled.\n * @link https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n */\n return props.disabled ? 'span' : BentoLink;\n }\n return 'button';\n });\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n 'aria-expanded': attrs['aria-expanded']?.toString() as Booleanish,\n }));\n\n const componentProps = computed(() =>\n componentType.value === 'button'\n ? {\n ...ariaAttributes.value,\n disabled: props.disabled,\n type: props.type,\n }\n : {\n ...props.link,\n disableTypography: true,\n variant: BentoLinkVariant.DEFAULT,\n isButton: true,\n\n /**\n * When the button is a disabled link, it's rendered as a `<span>`.\n * These attributes ensure it's still announced as a disabled link by screen readers.\n */\n 'aria-disabled': props.disabled ? 'true' : undefined,\n role: props.disabled ? 'link' : undefined,\n }\n );\n\n const variantClass = computed(() => ({\n [`b-button--${props.variant}${props.critical ? `-${BentoButtonPropClass.DESTRUCTIVE}` : ''}`]: true,\n }));\n\n const conditionalClasses = computed(() => ({\n ...variantClass.value,\n [`b-button--${BentoButtonPropClass.CONDENSED}`]: props.condensed,\n [`b-button--${BentoButtonPropClass.DISABLED}`]: props.disabled,\n [`b-button--${BentoButtonPropClass.INVERSE}`]: props.inverse,\n }));\n\n const getIconOnlyClass = () => ({\n [`b-button--${BentoButtonPropClass.ICON_ONLY}`]: !hasSlot('default'),\n });\n\n const onClickButton = (e: MouseEvent) => {\n if (!props.disabled) {\n emit('click', e);\n } else {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Button component for all the various types of bento buttons.\n *\n * @example\n * import { BentoButton } from '@adyen/bento-vue2';\n * import { CheckMarkIcon } from '@adyen/ui-assets-icons-16';\n *\n * export default {\n * components: { BentoButton },\n * template: `\n * <bento-button\n * disabled\n * variant=\"secondary\"\n * >\n * <template #iconLeft>\n * <check-mark svg-title=\"checked\" />\n * </template>\n *\n * Button text\n *\n * <template #iconRight>\n * <check-mark svg-title=\"checked\" />\n * </template>\n * </bento-button>\n * `,\n * }\n */\n export default {\n name: 'bento-button',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./button.scss\" />\n"],"names":["BentoButtonVariant","BentoButtonVariant2","BentoButtonPropClass","BentoButtonPropClass2","__default__","props","__props","emit","__emit","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","componentType","computed","BentoLink","ariaAttributes","componentProps","BentoLinkVariant","variantClass","conditionalClasses","getIconOnlyClass","onClickButton","e"],"mappings":";;;;;;AAGO,IAAAA,IAAA,kBAAAC,OACHA,EAAA,UAAA,WACAA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,2BAAA,4BAJQA,IAAAD,KAAA,CAAA,CAAA,GAOLE,IAAA,kBAAAC,OACHA,EAAA,YAAA,aACAA,EAAA,cAAA,YACAA,EAAA,WAAA,YACAA,EAAA,YAAA,aACAA,EAAA,UAAA,WALQA,IAAAD,KAAA,CAAA,CAAA;gDC4MRE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArKA,UAAAC,IAAAC,GA8CAC,IAAAC,GAsBAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC,EAAA,MACIX,GAAA,SAAA,SAMIA,EAAA,WAAA,SAAAY,IAEJ,QAAO,GAEXC,IAAAF,EAAA,OAAA;AAAA,MAAuC,iBAAAP,EAAA,eAAA,GAAA,SAAA;AAAA,MACe,iBAAAA,EAAA,eAAA,GAAA,SAAA;AAAA,IACA,EAAA,GAGtDU,IAAAH;AAAA,MAAuB,MAAAD,EAAA,UAAA,WAAA;AAAA,QAEb,GAAAG,EAAA;AAAA,QACsB,UAAAb,EAAA;AAAA,QACF,MAAAA,EAAA;AAAA,MACJ,IAAA;AAAA,QAEhB,GAAAA,EAAA;AAAA,QACa,mBAAA;AAAA,QACU,SAAAe,EAAA;AAAA,QACO,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAChB,iBAAAf,EAAA,WAAA,SAAA;AAAA,QAMiC,MAAAA,EAAA,WAAA,SAAA;AAAA,MACX;AAAA,IACpC,GAGVgB,IAAAL,EAAA,OAAA;AAAA,MAAqC,CAAA,aAAAX,EAAA,OAAA,GAAAA,EAAA,WAAA,IAAAH,EAAA,WAAA,KAAA,EAAA,EAAA,GAAA;AAAA,IAC8D,EAAA,GAGnGoB,IAAAN,EAAA,OAAA;AAAA,MAA2C,GAAAK,EAAA;AAAA,MACvB,CAAA,aAAAnB,EAAA,SAAA,EAAA,GAAAG,EAAA;AAAA,MACuC,CAAA,aAAAH,EAAA,QAAA,EAAA,GAAAG,EAAA;AAAA,MACD,CAAA,aAAAH,EAAA,OAAA,EAAA,GAAAG,EAAA;AAAA,IACD,EAAA,GAGzDkB,IAAA,OAAA;AAAA,MAAgC,CAAA,aAAArB,EAAA,SAAA,EAAA,GAAA,CAAAW,EAAA,SAAA;AAAA,IACuC,IAGvEW,IAAA,CAAAC,MAAA;AACI,MAAApB,EAAA,YAGIoB,EAAA,eAAA,GACAA,EAAA,gBAAA,KAHAlB,EAAA,SAAAkB,CAAA;AAAA,IAIJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|