@adyen/bento-vue2 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.X-dXuOcv.js → action-bar.DxZchfve.js} +4 -4
- package/dist/chunks/{action-bar.X-dXuOcv.js.map → action-bar.DxZchfve.js.map} +1 -1
- package/dist/chunks/{ai-button.DvOq4s2_.js → ai-button.y1t1nqpv.js} +2 -2
- package/dist/chunks/{ai-button.DvOq4s2_.js.map → ai-button.y1t1nqpv.js.map} +1 -1
- package/dist/chunks/{ai-tag.Cdn4JK1m.js → ai-tag.CD1eQnr_.js} +2 -2
- package/dist/chunks/{ai-tag.Cdn4JK1m.js.map → ai-tag.CD1eQnr_.js.map} +1 -1
- package/dist/chunks/{alert.BDkEbdf4.js → alert.DP17WjNE.js} +2 -2
- package/dist/chunks/{alert.BDkEbdf4.js.map → alert.DP17WjNE.js.map} +1 -1
- package/dist/chunks/{anchor-scroller.Bu7GtOqH.js → anchor-scroller.BiHtyUJz.js} +3 -3
- package/dist/chunks/{anchor-scroller.Bu7GtOqH.js.map → anchor-scroller.BiHtyUJz.js.map} +1 -1
- package/dist/chunks/{base-modal.DgMSsQf3.js → base-modal.BbMTTAi5.js} +5 -5
- package/dist/chunks/{base-modal.DgMSsQf3.js.map → base-modal.BbMTTAi5.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.BV5aDUCD.js → button-actions-with-menu.CpqyoKG5.js} +2 -2
- package/dist/chunks/{button-actions-with-menu.BV5aDUCD.js.map → button-actions-with-menu.CpqyoKG5.js.map} +1 -1
- package/dist/chunks/{button-actions.BD4Dyp4U.js → button-actions.Dxez8SNL.js} +2 -2
- package/dist/chunks/{button-actions.BD4Dyp4U.js.map → button-actions.Dxez8SNL.js.map} +1 -1
- package/dist/chunks/button.Df_UH5wZ.js +112 -0
- package/dist/chunks/button.Df_UH5wZ.js.map +1 -0
- package/dist/chunks/{calendar.CmhzIZZM.js → calendar.BKddGc3j.js} +3 -3
- package/dist/chunks/{calendar.CmhzIZZM.js.map → calendar.BKddGc3j.js.map} +1 -1
- package/dist/chunks/{card.Bm7JEsCC.js → card.BzDmgKjO.js} +2 -2
- package/dist/chunks/{card.Bm7JEsCC.js.map → card.BzDmgKjO.js.map} +1 -1
- package/dist/chunks/{code-snippet.DuJAubi9.js → code-snippet.CY_C6Xyz.js} +5 -5
- package/dist/chunks/{code-snippet.DuJAubi9.js.map → code-snippet.CY_C6Xyz.js.map} +1 -1
- package/dist/chunks/{copy.CWKdfVcd.js → copy.DSFXER-x.js} +2 -2
- package/dist/chunks/{copy.CWKdfVcd.js.map → copy.DSFXER-x.js.map} +1 -1
- package/dist/chunks/{dashboard-section.CRn7tlX_.js → dashboard-section.BtqE_6Zy.js} +3 -3
- package/dist/chunks/{dashboard-section.CRn7tlX_.js.map → dashboard-section.BtqE_6Zy.js.map} +1 -1
- package/dist/chunks/{dashed-underline.BoHt4iGu.js → dashed-underline.Cl158pHL.js} +2 -2
- package/dist/chunks/{dashed-underline.BoHt4iGu.js.map → dashed-underline.Cl158pHL.js.map} +1 -1
- package/dist/chunks/{data-grid-template.BYMLOzkm.js → data-grid-template.yOSdF4nN.js} +4 -4
- package/dist/chunks/{data-grid-template.BYMLOzkm.js.map → data-grid-template.yOSdF4nN.js.map} +1 -1
- package/dist/chunks/{data-grid.D_Xu49bl.js → data-grid.D26rPQcn.js} +12 -12
- package/dist/chunks/{data-grid.D_Xu49bl.js.map → data-grid.D26rPQcn.js.map} +1 -1
- package/dist/chunks/{date-picker.bbVKo7JX.js → date-picker.nNtLItmg.js} +6 -6
- package/dist/chunks/{date-picker.bbVKo7JX.js.map → date-picker.nNtLItmg.js.map} +1 -1
- package/dist/chunks/{date-range-picker.AnFyWMCq.js → date-range-picker.DL-oePHl.js} +8 -8
- package/dist/chunks/{date-range-picker.AnFyWMCq.js.map → date-range-picker.DL-oePHl.js.map} +1 -1
- package/dist/chunks/{date-time-picker.Bpxfkj71.js → date-time-picker.D89IemgM.js} +5 -5
- package/dist/chunks/{date-time-picker.Bpxfkj71.js.map → date-time-picker.D89IemgM.js.map} +1 -1
- package/dist/chunks/{dialog-page.BendBRv6.js → dialog-page.D_m11exR.js} +2 -2
- package/dist/chunks/{dialog-page.BendBRv6.js.map → dialog-page.D_m11exR.js.map} +1 -1
- package/dist/chunks/{draggable-handle.BnRkhlee.js → draggable-handle.BDUQTWrd.js} +268 -263
- package/dist/chunks/{draggable-handle.BnRkhlee.js.map → draggable-handle.BDUQTWrd.js.map} +1 -1
- package/dist/chunks/{draggable.D5WFD5eX.js → draggable.Jqy1iXq_.js} +2 -2
- package/dist/chunks/{draggable.D5WFD5eX.js.map → draggable.Jqy1iXq_.js.map} +1 -1
- package/dist/chunks/{dropdown-tag.VcqAOFuG.js → dropdown-tag.CCItycfH.js} +2 -2
- package/dist/chunks/{dropdown-tag.VcqAOFuG.js.map → dropdown-tag.CCItycfH.js.map} +1 -1
- package/dist/chunks/{dropdown.B21PZqp4.js → dropdown.CLHXtH0r.js} +3 -3
- package/dist/chunks/{dropdown.B21PZqp4.js.map → dropdown.CLHXtH0r.js.map} +1 -1
- package/dist/chunks/{empty-state.Dttc-ZO_.js → empty-state.Be3Np0rd.js} +2 -2
- package/dist/chunks/{empty-state.Dttc-ZO_.js.map → empty-state.Be3Np0rd.js.map} +1 -1
- package/dist/chunks/{file-uploader.BLoJVqZQ.js → file-uploader.C1GuWVEI.js} +3 -3
- package/dist/chunks/{file-uploader.BLoJVqZQ.js.map → file-uploader.C1GuWVEI.js.map} +1 -1
- package/dist/chunks/{filter-bar.CY9xbtNy.js → filter-bar.Dq3fo3rZ.js} +1316 -1224
- package/dist/chunks/filter-bar.Dq3fo3rZ.js.map +1 -0
- package/dist/chunks/{fixed-scroller.4xAzt_OI.js → fixed-scroller.BFuYW-M3.js} +2 -2
- package/dist/chunks/{fixed-scroller.4xAzt_OI.js.map → fixed-scroller.BFuYW-M3.js.map} +1 -1
- package/dist/chunks/{footer-actions.C89dbDV4.js → footer-actions.BB94G3iB.js} +3 -3
- package/dist/chunks/{footer-actions.C89dbDV4.js.map → footer-actions.BB94G3iB.js.map} +1 -1
- package/dist/chunks/{form-layout-title.xrix5vY3.js → form-layout-title.DLvU9CD1.js} +2 -2
- package/dist/chunks/{form-layout-title.xrix5vY3.js.map → form-layout-title.DLvU9CD1.js.map} +1 -1
- package/dist/chunks/{header-meta.Cpk3Z8c2.js → header-meta.Bq8moJ6A.js} +2 -2
- package/dist/chunks/{header-meta.Cpk3Z8c2.js.map → header-meta.Bq8moJ6A.js.map} +1 -1
- package/dist/chunks/{header-with-views.BQEJxWz0.js → header-with-views.yjk4GuOn.js} +8 -8
- package/dist/chunks/{header-with-views.BQEJxWz0.js.map → header-with-views.yjk4GuOn.js.map} +1 -1
- package/dist/chunks/{header.BRBY9Ilh.js → header.C8dI-yo1.js} +3 -3
- package/dist/chunks/{header.BRBY9Ilh.js.map → header.C8dI-yo1.js.map} +1 -1
- package/dist/chunks/{input-field-password.WBxRJUhP.js → input-field-password.Dkty2s5M.js} +4 -4
- package/dist/chunks/{input-field-password.WBxRJUhP.js.map → input-field-password.Dkty2s5M.js.map} +1 -1
- package/dist/chunks/{input-field-phone-number.DR6dpYYz.js → input-field-phone-number.CdT4hLCR.js} +2 -2
- package/dist/chunks/{input-field-phone-number.DR6dpYYz.js.map → input-field-phone-number.CdT4hLCR.js.map} +1 -1
- package/dist/chunks/{input-field.y5qXcCAH.js → input-field.3BC9gdvi.js} +36 -26
- package/dist/chunks/{input-field.y5qXcCAH.js.map → input-field.3BC9gdvi.js.map} +1 -1
- package/dist/chunks/{input-time.DrJ3n7Cc.js → input-time.OTVaDCFj.js} +3 -3
- package/dist/chunks/{input-time.DrJ3n7Cc.js.map → input-time.OTVaDCFj.js.map} +1 -1
- package/dist/chunks/{inspector.8QKfd0HF.js → inspector.Cas-Z-VC.js} +2 -2
- package/dist/chunks/{inspector.8QKfd0HF.js.map → inspector.Cas-Z-VC.js.map} +1 -1
- package/dist/chunks/{list-item.BO75rSht.js → list-item.Cf3IFDnG.js} +2 -2
- package/dist/chunks/{list-item.BO75rSht.js.map → list-item.Cf3IFDnG.js.map} +1 -1
- package/dist/chunks/{modal-fullscreen.CH2wwAtk.js → modal-fullscreen.B1iYD7lc.js} +5 -5
- package/dist/chunks/{modal-fullscreen.CH2wwAtk.js.map → modal-fullscreen.B1iYD7lc.js.map} +1 -1
- package/dist/chunks/{modal.e1Ym209E.js → modal.Cp2cNQbD.js} +5 -5
- package/dist/chunks/{modal.e1Ym209E.js.map → modal.Cp2cNQbD.js.map} +1 -1
- package/dist/chunks/{navigation-menu-group.E1Oam9-n.js → navigation-menu-group.Dvs0wWHC.js} +2 -2
- package/dist/chunks/{navigation-menu-group.E1Oam9-n.js.map → navigation-menu-group.Dvs0wWHC.js.map} +1 -1
- package/dist/chunks/{pagination.CxW1zuWi.js → pagination.9fxG-UWo.js} +3 -3
- package/dist/chunks/{pagination.CxW1zuWi.js.map → pagination.9fxG-UWo.js.map} +1 -1
- package/dist/chunks/{promo-banner.BVBt9w4u.js → promo-banner.eVbU1xqj.js} +2 -2
- package/dist/chunks/{promo-banner.BVBt9w4u.js.map → promo-banner.eVbU1xqj.js.map} +1 -1
- package/dist/chunks/{rich-text-editor.VWCBSRmM.js → rich-text-editor.DYfdUHI6.js} +2 -2
- package/dist/chunks/{rich-text-editor.VWCBSRmM.js.map → rich-text-editor.DYfdUHI6.js.map} +1 -1
- package/dist/chunks/{search-bar.nRiF5eNx.js → search-bar.d8qlBngk.js} +3 -3
- package/dist/chunks/{search-bar.nRiF5eNx.js.map → search-bar.d8qlBngk.js.map} +1 -1
- package/dist/chunks/{secondary-nav.BlI1PBNr.js → secondary-nav.BQ6DM8_b.js} +3 -3
- package/dist/chunks/{secondary-nav.BlI1PBNr.js.map → secondary-nav.BQ6DM8_b.js.map} +1 -1
- package/dist/chunks/{sidepanel.CN_u-b5X.js → sidepanel.CUqjE_-9.js} +5 -5
- package/dist/chunks/{sidepanel.CN_u-b5X.js.map → sidepanel.CUqjE_-9.js.map} +1 -1
- package/dist/chunks/{structured-list-item.CL1jhdTX.js → structured-list-item.jO4KtMuc.js} +3 -3
- package/dist/chunks/{structured-list-item.CL1jhdTX.js.map → structured-list-item.jO4KtMuc.js.map} +1 -1
- package/dist/chunks/{summary-grid.types.Cjrwg4vd.js → summary-grid.types.BsjF5xAH.js} +3 -3
- package/dist/chunks/{summary-grid.types.Cjrwg4vd.js.map → summary-grid.types.BsjF5xAH.js.map} +1 -1
- package/dist/chunks/{tab.B2qRfTqx.js → tab.qhcMgSD1.js} +2 -2
- package/dist/chunks/{tab.B2qRfTqx.js.map → tab.qhcMgSD1.js.map} +1 -1
- package/dist/chunks/{textarea.CbCrtcQ2.js → textarea.BOQbOPm4.js} +2 -2
- package/dist/chunks/{textarea.CbCrtcQ2.js.map → textarea.BOQbOPm4.js.map} +1 -1
- package/dist/chunks/{timeline-item.BVOztUi9.js → timeline-item.DXhpupK_.js} +6 -6
- package/dist/chunks/{timeline-item.BVOztUi9.js.map → timeline-item.DXhpupK_.js.map} +1 -1
- package/dist/chunks/{toast.BMGR5QrI.js → toast.BDV4ab4e.js} +2 -2
- package/dist/chunks/{toast.BMGR5QrI.js.map → toast.BDV4ab4e.js.map} +1 -1
- package/dist/chunks/{tutorial.WeP9PjhU.js → tutorial.CAcBuXib.js} +2 -2
- package/dist/chunks/{tutorial.WeP9PjhU.js.map → tutorial.CAcBuXib.js.map} +1 -1
- package/dist/chunks/{use-date-input-formatter.DhduXYC3.js → use-date-input-formatter.BR_O2GeY.js} +2 -2
- package/dist/chunks/{use-date-input-formatter.DhduXYC3.js.map → use-date-input-formatter.BR_O2GeY.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 +1 -1
- 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 +50 -50
- 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 +97 -76
- package/package.json +4 -4
- package/dist/chunks/button.DITA6YtS.js +0 -110
- package/dist/chunks/button.DITA6YtS.js.map +0 -1
- package/dist/chunks/filter-bar.CY9xbtNy.js.map +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { defineComponent as m, useAttrs as S, useSlots as g, computed as o } from "vue";
|
|
2
|
+
import { B as C } from "./typography.C8lPlsbD.js";
|
|
3
|
+
import { u as E } from "./use-has-slot.C9lQZ6nz.js";
|
|
4
|
+
import { B as h, a as R } from "./link.BpuCRgok.js";
|
|
5
|
+
import { n as D } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
6
|
+
import "../assets/button.css";
|
|
7
|
+
var u = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.TERTIARY = "tertiary", e.TERTIARY_WITH_BACKGROUND = "tertiary-with-background", e))(u || {}), l = /* @__PURE__ */ ((e) => (e.CONDENSED = "condensed", e.DESTRUCTIVE = "critical", e.DISABLED = "disabled", e.ICON_ONLY = "icon-only", e.INVERSE = "inverse", e))(l || {});
|
|
8
|
+
const I = {
|
|
9
|
+
name: "bento-button"
|
|
10
|
+
}, T = /* @__PURE__ */ m({
|
|
11
|
+
...I,
|
|
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: u.PRIMARY,
|
|
48
|
+
validator: (e) => Object.values(u).includes(e)
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
emits: ["blur", "click", "focus", "keydown.esc"],
|
|
52
|
+
setup(e, { emit: n }) {
|
|
53
|
+
const a = e, t = S(), r = g(), d = E(r), c = o(
|
|
54
|
+
() => t["aria-disabled"] === "true" || t["aria-disabled"] === "" || t["aria-disabled"] === !0
|
|
55
|
+
), s = o(() => a.disabled || c.value), p = o(() => (a == null ? void 0 : a.link) !== void 0 ? s.value ? "span" : h : "button"), b = o(() => {
|
|
56
|
+
var i, _;
|
|
57
|
+
return {
|
|
58
|
+
"aria-controls": (i = t["aria-controls"]) == null ? void 0 : i.toString(),
|
|
59
|
+
"aria-expanded": (_ = t["aria-expanded"]) == null ? void 0 : _.toString()
|
|
60
|
+
};
|
|
61
|
+
}), v = o(
|
|
62
|
+
() => p.value === "button" ? {
|
|
63
|
+
...b.value,
|
|
64
|
+
...c.value ? { "aria-disabled": "true" } : { disabled: a.disabled },
|
|
65
|
+
type: a.type
|
|
66
|
+
} : {
|
|
67
|
+
...a.link,
|
|
68
|
+
disableTypography: !0,
|
|
69
|
+
variant: R.DEFAULT,
|
|
70
|
+
isButton: !0,
|
|
71
|
+
/**
|
|
72
|
+
* When the button is a disabled link, it's rendered as a `<span>`.
|
|
73
|
+
* These attributes ensure it's still announced as a disabled link by screen readers.
|
|
74
|
+
*/
|
|
75
|
+
"aria-disabled": s.value ? "true" : void 0,
|
|
76
|
+
role: s.value ? "link" : void 0
|
|
77
|
+
}
|
|
78
|
+
), f = o(() => ({
|
|
79
|
+
[`b-button--${a.variant}${a.critical ? `-${l.DESTRUCTIVE}` : ""}`]: !0
|
|
80
|
+
})), y = o(() => ({
|
|
81
|
+
...f.value,
|
|
82
|
+
[`b-button--${l.CONDENSED}`]: a.condensed,
|
|
83
|
+
[`b-button--${l.DISABLED}`]: s.value,
|
|
84
|
+
[`b-button--${l.INVERSE}`]: a.inverse
|
|
85
|
+
}));
|
|
86
|
+
return { __sfc: !0, props: a, emit: n, attrs: t, slots: r, hasSlot: d, isAriaDisabled: c, isDisabled: s, componentType: p, ariaAttributes: b, componentProps: v, variantClass: f, conditionalClasses: y, getIconOnlyClass: () => ({
|
|
87
|
+
[`b-button--${l.ICON_ONLY}`]: !d("default")
|
|
88
|
+
}), onClickButton: (i) => {
|
|
89
|
+
s.value ? (i.preventDefault(), i.stopPropagation()) : n("click", i);
|
|
90
|
+
}, BentoTypography: C };
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
var k = function() {
|
|
94
|
+
var n = this, a = n._self._c, t = n._self._setupProxy;
|
|
95
|
+
return a(t.componentType, n._b({ tag: "component", staticClass: "b-button", class: { ...t.conditionalClasses, ...t.getIconOnlyClass() }, on: { "!click": function(r) {
|
|
96
|
+
return t.onClickButton.apply(null, arguments);
|
|
97
|
+
} } }, "component", t.componentProps, !1), [t.hasSlot("iconLeft") ? a("span", { staticClass: "b-button__icon-left", attrs: { "data-testid": "icon-button-left", "aria-hidden": t.hasSlot("default") ? "true" : null } }, [n._t("iconLeft")], 2) : n._e(), t.hasSlot("default") ? a(t.BentoTypography, { staticClass: "b-button__label", attrs: { el: "span", variant: "body", stronger: "" } }, [n._t("default")], 2) : n._e(), t.hasSlot("iconRight") ? a("span", { staticClass: "b-button__icon-right", attrs: { "data-testid": "icon-button-right", "aria-hidden": t.hasSlot("default") ? "true" : null } }, [n._t("iconRight")], 2) : n._e()], 1);
|
|
98
|
+
}, O = [], A = /* @__PURE__ */ D(
|
|
99
|
+
T,
|
|
100
|
+
k,
|
|
101
|
+
O,
|
|
102
|
+
!1,
|
|
103
|
+
null,
|
|
104
|
+
"1f8e11d4"
|
|
105
|
+
);
|
|
106
|
+
const j = A.exports;
|
|
107
|
+
export {
|
|
108
|
+
j as B,
|
|
109
|
+
l as a,
|
|
110
|
+
u as b
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=button.Df_UH5wZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.Df_UH5wZ.js","sources":["../../src/components/button/button.types.ts","../../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([\"blur\", \"click\", \"focus\", \"keydown.esc\"]);\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__","attrs","useAttrs","slots","useSlots","hasSlot","useHasSlot","isAriaDisabled","computed","isDisabled","props","componentType","BentoLink","ariaAttributes","_a","_b","componentProps","BentoLinkVariant","variantClass","conditionalClasses","e","emit"],"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;AC6LR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAtGAC,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,MAAAE,EAAA,YAAAH,EAAA,KAAA,GAEAI,IAAAH,EAAA,OACIE,KAAA,gBAAAA,EAAA,UAAA,SAMID,EAAA,QAAA,SAAAG,IAEJ,QAAO,GAEXC,IAAAL,EAAA,MAAA;;AAAA;AAAA,QAAuC,kBAAAM,IAAAb,EAAA,eAAA,MAAA,gBAAAa,EAAA;AAAA,QACe,kBAAAC,IAAAd,EAAA,eAAA,MAAA,gBAAAc,EAAA;AAAA,MACA;AAAA,KAAA,GAGtDC,IAAAR;AAAA,MAAuB,MAAAG,EAAA,UAAA,WAAA;AAAA,QAEb,GAAAE,EAAA;AAAA,QACsB,GAAAN,EAAA,QAAA,EAAA,iBAAA,OAAA,IAAA,EAAA,UAAAG,EAAA,SAAA;AAAA,QACkE,MAAAA,EAAA;AAAA,MACxE,IAAA;AAAA,QAEhB,GAAAA,EAAA;AAAA,QACa,mBAAA;AAAA,QACU,SAAAO,EAAA;AAAA,QACO,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAChB,iBAAAR,EAAA,QAAA,SAAA;AAAA,QAMmC,MAAAA,EAAA,QAAA,SAAA;AAAA,MACX;AAAA,IACtC,GAGVS,IAAAV,EAAA,OAAA;AAAA,MAAqC,CAAA,aAAAE,EAAA,OAAA,GAAAA,EAAA,WAAA,IAAAZ,EAAA,WAAA,KAAA,EAAA,EAAA,GAAA;AAAA,IAC8D,EAAA,GAGnGqB,IAAAX,EAAA,OAAA;AAAA,MAA2C,GAAAU,EAAA;AAAA,MACvB,CAAA,aAAApB,EAAA,SAAA,EAAA,GAAAY,EAAA;AAAA,MACuC,CAAA,aAAAZ,EAAA,QAAA,EAAA,GAAAW,EAAA;AAAA,MACI,CAAA,aAAAX,EAAA,OAAA,EAAA,GAAAY,EAAA;AAAA,IACN,EAAA;+NAGzD,OAAA;AAAA,MAAgC,CAAA,aAAAZ,EAAA,SAAA,EAAA,GAAA,CAAAO,EAAA,SAAA;AAAA,IACuC,mBAGvE,CAAAe,MAAA;AACI,MAAAX,EAAA,SACIW,EAAA,eAAA,GACAA,EAAA,gBAAA,KAEAC,EAAA,SAAAD,CAAA;AAAA,IACJ;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as z, provide as be, computed as E, ref as U, watch as q, nextTick as He, toRef as F, reactive as xe } from "vue";
|
|
2
|
-
import { B as pe } from "./button.
|
|
2
|
+
import { B as pe } from "./button.Df_UH5wZ.js";
|
|
3
3
|
import { B as Re } from "./typography.C8lPlsbD.js";
|
|
4
4
|
import { u as De } from "./index.B6WW_F-J.js";
|
|
5
5
|
import { g as Le } from "./generate-uid.NJ8tVoha.js";
|
|
@@ -9,7 +9,7 @@ import { d as Ee, a as ue, b as Ke } from "./differenceInMonths.CpwVtHZX.js";
|
|
|
9
9
|
import { s as le } from "./startOfWeek.Br5KM4z_.js";
|
|
10
10
|
import { C as Ce, a as Ae } from "./chevron-left.BS24hEFa.js";
|
|
11
11
|
import { n as J } from "./_plugin-vue2_normalizer.CeySl7Fu.js";
|
|
12
|
-
import { h as Ve, i as ze, B as Je } from "./dropdown.
|
|
12
|
+
import { h as Ve, i as ze, B as Je } from "./dropdown.CLHXtH0r.js";
|
|
13
13
|
import { a as Be } from "./keyboard-navigation.DWmhelVv.js";
|
|
14
14
|
import { a as Xe, B as Ze } from "./date.C1HnIyOv.js";
|
|
15
15
|
import "../assets/calendar.css";
|
|
@@ -1233,4 +1233,4 @@ export {
|
|
|
1233
1233
|
st as y,
|
|
1234
1234
|
et as z
|
|
1235
1235
|
};
|
|
1236
|
-
//# sourceMappingURL=calendar.
|
|
1236
|
+
//# sourceMappingURL=calendar.BKddGc3j.js.map
|