@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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { defineComponent as C, useAttrs as N, useSlots as T, computed as o, openBlock as d, createBlock as v, resolveDynamicComponent as A, mergeProps as O, withCtx as m, unref as i, createElementBlock as y, renderSlot as u, createCommentVNode as c } from "vue";
|
|
2
|
+
import { B as $ } from "./typography.B3J6_tYk.js";
|
|
3
|
+
import { u as L } from "./use-has-slot.CyMiImRQ.js";
|
|
4
|
+
import { B as Y, a as B } from "./link.D6D6YGsN.js";
|
|
5
|
+
import { _ as U } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
import "../assets/button.css";
|
|
7
|
+
var b = /* @__PURE__ */ ((t) => (t.PRIMARY = "primary", t.SECONDARY = "secondary", t.TERTIARY = "tertiary", t.TERTIARY_WITH_BACKGROUND = "tertiary-with-background", t))(b || {}), s = /* @__PURE__ */ ((t) => (t.CONDENSED = "condensed", t.DESTRUCTIVE = "critical", t.DISABLED = "disabled", t.ICON_ONLY = "icon-only", t.INVERSE = "inverse", t))(s || {});
|
|
8
|
+
const w = ["aria-hidden"], x = ["aria-hidden"], V = {
|
|
9
|
+
name: "bento-button"
|
|
10
|
+
}, j = /* @__PURE__ */ C({
|
|
11
|
+
...V,
|
|
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: b.PRIMARY,
|
|
48
|
+
validator: (t) => Object.values(b).includes(t)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
emits: ["blur", "click", "focus", "keydown.esc"],
|
|
52
|
+
setup(t, { emit: _ }) {
|
|
53
|
+
const e = t, E = _, r = N(), k = T(), n = L(k), p = o(
|
|
54
|
+
() => r["aria-disabled"] === "true" || r["aria-disabled"] === "" || r["aria-disabled"] === !0
|
|
55
|
+
), l = o(() => e.disabled || p.value), f = o(() => e?.link !== void 0 ? l.value ? "span" : Y : "button"), D = o(() => ({
|
|
56
|
+
"aria-controls": r["aria-controls"]?.toString(),
|
|
57
|
+
"aria-expanded": r["aria-expanded"]?.toString()
|
|
58
|
+
})), S = o(
|
|
59
|
+
() => f.value === "button" ? {
|
|
60
|
+
...D.value,
|
|
61
|
+
...p.value ? { "aria-disabled": "true" } : { disabled: e.disabled },
|
|
62
|
+
type: e.type
|
|
63
|
+
} : {
|
|
64
|
+
...e.link,
|
|
65
|
+
disableTypography: !0,
|
|
66
|
+
variant: B.DEFAULT,
|
|
67
|
+
isButton: !0,
|
|
68
|
+
/**
|
|
69
|
+
* When the button is a disabled link, it's rendered as a `<span>`.
|
|
70
|
+
* These attributes ensure it's still announced as a disabled link by screen readers.
|
|
71
|
+
*/
|
|
72
|
+
"aria-disabled": l.value ? "true" : void 0,
|
|
73
|
+
role: l.value ? "link" : void 0
|
|
74
|
+
}
|
|
75
|
+
), h = o(() => ({
|
|
76
|
+
[`b-button--${e.variant}${e.critical ? `-${s.DESTRUCTIVE}` : ""}`]: !0
|
|
77
|
+
})), R = o(() => ({
|
|
78
|
+
...h.value,
|
|
79
|
+
[`b-button--${s.CONDENSED}`]: e.condensed,
|
|
80
|
+
[`b-button--${s.DISABLED}`]: l.value,
|
|
81
|
+
[`b-button--${s.INVERSE}`]: e.inverse
|
|
82
|
+
})), g = () => ({
|
|
83
|
+
[`b-button--${s.ICON_ONLY}`]: !n("default")
|
|
84
|
+
}), I = (a) => {
|
|
85
|
+
l.value ? (a.preventDefault(), a.stopPropagation()) : E("click", a);
|
|
86
|
+
};
|
|
87
|
+
return (a, H) => (d(), v(A(f.value), O(S.value, {
|
|
88
|
+
class: ["b-button", { ...R.value, ...g() }],
|
|
89
|
+
onClickCapture: I
|
|
90
|
+
}), {
|
|
91
|
+
default: m(() => [
|
|
92
|
+
i(n)("iconLeft") ? (d(), y("span", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "b-button__icon-left",
|
|
95
|
+
"data-testid": "icon-button-left",
|
|
96
|
+
"aria-hidden": i(n)("default") ? "true" : null
|
|
97
|
+
}, [
|
|
98
|
+
u(a.$slots, "iconLeft", {}, void 0, !0)
|
|
99
|
+
], 8, w)) : c("", !0),
|
|
100
|
+
i(n)("default") ? (d(), v(i($), {
|
|
101
|
+
key: 1,
|
|
102
|
+
el: "span",
|
|
103
|
+
variant: "body",
|
|
104
|
+
stronger: "",
|
|
105
|
+
class: "b-button__label"
|
|
106
|
+
}, {
|
|
107
|
+
default: m(() => [
|
|
108
|
+
u(a.$slots, "default", {}, void 0, !0)
|
|
109
|
+
]),
|
|
110
|
+
_: 3
|
|
111
|
+
})) : c("", !0),
|
|
112
|
+
i(n)("iconRight") ? (d(), y("span", {
|
|
113
|
+
key: 2,
|
|
114
|
+
class: "b-button__icon-right",
|
|
115
|
+
"data-testid": "icon-button-right",
|
|
116
|
+
"aria-hidden": i(n)("default") ? "true" : null
|
|
117
|
+
}, [
|
|
118
|
+
u(a.$slots, "iconRight", {}, void 0, !0)
|
|
119
|
+
], 8, x)) : c("", !0)
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 16, ["class"]));
|
|
123
|
+
}
|
|
124
|
+
}), W = /* @__PURE__ */ U(j, [["__scopeId", "data-v-6c748a79"]]);
|
|
125
|
+
export {
|
|
126
|
+
W as B,
|
|
127
|
+
s as a,
|
|
128
|
+
b
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=button.C6-bXf1h.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.C6-bXf1h.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 isAriaDisabled = computed(\n () => attrs['aria-disabled'] === 'true' || attrs['aria-disabled'] === '' || attrs['aria-disabled'] === true\n );\n const isDisabled = computed(() => props.disabled || isAriaDisabled.value);\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 isDisabled.value ? '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 ...(isAriaDisabled.value ? { 'aria-disabled': 'true' } : { 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': isDisabled.value ? 'true' : undefined,\n role: isDisabled.value ? '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}`]: isDisabled.value,\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 (isDisabled.value) {\n e.preventDefault();\n e.stopPropagation();\n } else {\n emit('click', e);\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","isAriaDisabled","computed","isDisabled","componentType","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;gDCiNRE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA1KA,UAAAC,IAAAC,GA8CAC,IAAAC,GAsBAC,IAAAC,EAAA,GACAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GAEAI,IAAAC;AAAA,MAAuB,MAAAP,EAAA,eAAA,MAAA,UAAAA,EAAA,eAAA,MAAA,MAAAA,EAAA,eAAA,MAAA;AAAA,IACoF,GAE3GQ,IAAAD,EAAA,MAAAX,EAAA,YAAAU,EAAA,KAAA,GAEAG,IAAAF,EAAA,MACIX,GAAA,SAAA,SAMIY,EAAA,QAAA,SAAAE,IAEJ,QAAO,GAEXC,IAAAJ,EAAA,OAAA;AAAA,MAAuC,iBAAAP,EAAA,eAAA,GAAA,SAAA;AAAA,MACe,iBAAAA,EAAA,eAAA,GAAA,SAAA;AAAA,IACA,EAAA,GAGtDY,IAAAL;AAAA,MAAuB,MAAAE,EAAA,UAAA,WAAA;AAAA,QAEb,GAAAE,EAAA;AAAA,QACsB,GAAAL,EAAA,QAAA,EAAA,iBAAA,OAAA,IAAA,EAAA,UAAAV,EAAA,SAAA;AAAA,QACkE,MAAAA,EAAA;AAAA,MACxE,IAAA;AAAA,QAEhB,GAAAA,EAAA;AAAA,QACa,mBAAA;AAAA,QACU,SAAAiB,EAAA;AAAA,QACO,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAChB,iBAAAL,EAAA,QAAA,SAAA;AAAA,QAMmC,MAAAA,EAAA,QAAA,SAAA;AAAA,MACX;AAAA,IACtC,GAGVM,IAAAP,EAAA,OAAA;AAAA,MAAqC,CAAA,aAAAX,EAAA,OAAA,GAAAA,EAAA,WAAA,IAAAH,EAAA,WAAA,KAAA,EAAA,EAAA,GAAA;AAAA,IAC8D,EAAA,GAGnGsB,IAAAR,EAAA,OAAA;AAAA,MAA2C,GAAAO,EAAA;AAAA,MACvB,CAAA,aAAArB,EAAA,SAAA,EAAA,GAAAG,EAAA;AAAA,MACuC,CAAA,aAAAH,EAAA,QAAA,EAAA,GAAAe,EAAA;AAAA,MACI,CAAA,aAAAf,EAAA,OAAA,EAAA,GAAAG,EAAA;AAAA,IACN,EAAA,GAGzDoB,IAAA,OAAA;AAAA,MAAgC,CAAA,aAAAvB,EAAA,SAAA,EAAA,GAAA,CAAAW,EAAA,SAAA;AAAA,IACuC,IAGvEa,IAAA,CAAAC,MAAA;AACI,MAAAV,EAAA,SACIU,EAAA,eAAA,GACAA,EAAA,gBAAA,KAEApB,EAAA,SAAAoB,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as ue, provide as Ce, computed as O, openBlock as _, createBlock as H, unref as M, resolveComponent as vt, createElementBlock as Y, withKeys as te, normalizeClass as Be, createElementVNode as T, createVNode as C, withCtx as z, toDisplayString as Me, ref as J, watch as re, nextTick as yt, toRef as x, withDirectives as Ve, mergeProps as ze, toHandlers as Je, createCommentVNode as ne, createTextVNode as Ge, Fragment as X, renderList as Z, reactive as Xe, resolveDynamicComponent as ht } from "vue";
|
|
2
|
-
import { B as Ie } from "./button.
|
|
2
|
+
import { B as Ie } from "./button.C6-bXf1h.js";
|
|
3
3
|
import { B as Ye } from "./typography.B3J6_tYk.js";
|
|
4
4
|
import { u as we } from "./index.B875RXHM.js";
|
|
5
5
|
import { g as Ze } from "./generate-uid.DBWe4g6T.js";
|
|
@@ -9,7 +9,7 @@ import { t as w, c as se, n as fe, k as Ue, w as pt, g as tt } from "./en-US.BR6
|
|
|
9
9
|
import { d as je, a as Ne, b as Mt } from "./differenceInMonths.yz4Dfe-b.js";
|
|
10
10
|
import { s as Ee } from "./startOfWeek.muMEhS7U.js";
|
|
11
11
|
import { C as nt, a as at } from "./chevron-left.C_vPW7OR.js";
|
|
12
|
-
import { h as Nt, i as Et, B as bt } from "./dropdown.
|
|
12
|
+
import { h as Nt, i as Et, B as bt } from "./dropdown.DemBTBTo.js";
|
|
13
13
|
import { _ as De } from "./_plugin-vue_export-helper.CHgC5LLL.js";
|
|
14
14
|
import { B as St, a as _t } from "./date.BFhwd9CA.js";
|
|
15
15
|
import "../assets/calendar.css";
|
|
@@ -1270,4 +1270,4 @@ export {
|
|
|
1270
1270
|
Yt as y,
|
|
1271
1271
|
It as z
|
|
1272
1272
|
};
|
|
1273
|
-
//# sourceMappingURL=calendar.
|
|
1273
|
+
//# sourceMappingURL=calendar.xS1f71Tj.js.map
|