@adyen/bento-vue2 1.12.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/components.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +23 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +520 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +22 -26
- package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +17 -16
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +45 -52
- package/dist/button.js.map +1 -1
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/arrow-left.2db60716.js.map +1 -1
- package/dist/chunks/{base-button.1f07b7c1.js → base-button.f9080a52.js} +2 -2
- package/dist/chunks/{base-button.1f07b7c1.js.map → base-button.f9080a52.js.map} +1 -1
- package/dist/chunks/{base-modal.9d63bdaf.js → base-modal.a580438d.js} +42 -40
- package/dist/chunks/base-modal.a580438d.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.4c5091f4.js → button-actions-with-menu.a9087340.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.4c5091f4.js.map → button-actions-with-menu.a9087340.js.map} +1 -1
- package/dist/chunks/{button.133f145e.js → button.bb0d7584.js} +7 -7
- package/dist/chunks/{button.133f145e.js.map → button.bb0d7584.js.map} +1 -1
- package/dist/chunks/{calendar.9a8605d1.js → calendar.17ab99de.js} +66 -66
- package/dist/chunks/{calendar.9a8605d1.js.map → calendar.17ab99de.js.map} +1 -1
- package/dist/chunks/{checkbox.d8b810c7.js → checkbox.51cdb397.js} +3 -3
- package/dist/chunks/checkbox.51cdb397.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -1
- package/dist/chunks/checkmark-small.520f01b1.js.map +1 -1
- package/dist/chunks/checkmark.a6ed8f47.js.map +1 -1
- package/dist/chunks/chevron-left.5edf02ac.js.map +1 -1
- package/dist/chunks/chevron-up.81185563.js.map +1 -1
- package/dist/chunks/{controls-group.bf152dea.js → controls-group.3716f4b4.js} +4 -4
- package/dist/chunks/{controls-group.bf152dea.js.map → controls-group.3716f4b4.js.map} +1 -1
- package/dist/chunks/{copy.68a7d416.js → copy.54cc3ab4.js} +4 -4
- package/dist/chunks/copy.54cc3ab4.js.map +1 -0
- package/dist/chunks/cross-circle-fill.27580c4b.js.map +1 -1
- package/dist/chunks/cross-small.e851e0de.js +26 -0
- package/dist/chunks/cross-small.e851e0de.js.map +1 -0
- package/dist/chunks/cross.04678d81.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.c595fd31.js → dropdown-default-textbox.13b5054e.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.c595fd31.js.map → dropdown-default-textbox.13b5054e.js.map} +1 -1
- package/dist/chunks/{dropdown.eaee22a3.js → dropdown.4d800c61.js} +14 -14
- package/dist/chunks/dropdown.4d800c61.js.map +1 -0
- package/dist/chunks/{field-label.66f52c8f.js → field-label.7328b82b.js} +2 -2
- package/dist/chunks/{field-label.66f52c8f.js.map → field-label.7328b82b.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.01fc96f7.js → fixed-scroller.d6c11166.js} +2 -2
- package/dist/chunks/{fixed-scroller.01fc96f7.js.map → fixed-scroller.d6c11166.js.map} +1 -1
- package/dist/chunks/{footer-actions.38e99891.js → footer-actions.bc0cb7e0.js} +3 -3
- package/dist/chunks/{footer-actions.38e99891.js.map → footer-actions.bc0cb7e0.js.map} +1 -1
- package/dist/chunks/{index.d90c5838.js → index.170ac16b.js} +3 -3
- package/dist/chunks/{index.d90c5838.js.map → index.170ac16b.js.map} +1 -1
- package/dist/chunks/{index.18773b0b.js → index.339f15c4.js} +26 -26
- package/dist/chunks/{index.18773b0b.js.map → index.339f15c4.js.map} +1 -1
- package/dist/chunks/{index.3b7d40b7.js → index.541cce1c.js} +2 -2
- package/dist/chunks/{index.3b7d40b7.js.map → index.541cce1c.js.map} +1 -1
- package/dist/chunks/{index.9b669c12.js → index.5742fba4.js} +7 -7
- package/dist/chunks/index.5742fba4.js.map +1 -0
- package/dist/chunks/{index.99a2184a.js → index.6ac01113.js} +2 -2
- package/dist/chunks/{index.99a2184a.js.map → index.6ac01113.js.map} +1 -1
- package/dist/chunks/{index.b38a191d.js → index.772a5595.js} +2 -2
- package/dist/chunks/{index.b38a191d.js.map → index.772a5595.js.map} +1 -1
- package/dist/chunks/{index.14758ff7.js → index.82ff40be.js} +3 -3
- package/dist/chunks/{index.14758ff7.js.map → index.82ff40be.js.map} +1 -1
- package/dist/chunks/{index.eb527b75.js → index.a4a820fd.js} +6 -6
- package/dist/chunks/{index.eb527b75.js.map → index.a4a820fd.js.map} +1 -1
- package/dist/chunks/{index.2cfe4a09.js → index.af238ed6.js} +2 -2
- package/dist/chunks/{index.2cfe4a09.js.map → index.af238ed6.js.map} +1 -1
- package/dist/chunks/index.d1f65246.js +80 -0
- package/dist/chunks/index.d1f65246.js.map +1 -0
- package/dist/chunks/{index.45aa17fc.js → index.ec0743da.js} +5 -5
- package/dist/chunks/{index.45aa17fc.js.map → index.ec0743da.js.map} +1 -1
- package/dist/chunks/{info-filled.27bd4bfb.js → info-filled.c37e091d.js} +12 -33
- package/dist/chunks/{info-filled.27bd4bfb.js.map → info-filled.c37e091d.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.168c794c.js → listbox-option-tag.6f3e922c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.168c794c.js.map → listbox-option-tag.6f3e922c.js.map} +1 -1
- package/dist/chunks/{listbox.23c6b393.js → listbox.e5d70b9b.js} +471 -422
- package/dist/chunks/listbox.e5d70b9b.js.map +1 -0
- package/dist/chunks/{loading-button.44d698b9.js → loading-button.7301cc2e.js} +2 -2
- package/dist/chunks/{loading-button.44d698b9.js.map → loading-button.7301cc2e.js.map} +1 -1
- package/dist/chunks/refresh.71a03998.js.map +1 -1
- package/dist/chunks/search.471270fe.js.map +1 -1
- package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
- package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
- package/dist/chunks/{tooltip.f91b2040.js → tooltip.46858ae6.js} +3 -3
- package/dist/chunks/{tooltip.f91b2040.js.map → tooltip.46858ae6.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +692 -683
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +18 -18
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +6 -6
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +477 -471
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +208 -205
- package/dist/info-icon.js +3 -3
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +3 -56
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +4 -4
- package/dist/pagination.js +4 -4
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +84 -101
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +1 -1
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +73 -71
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +3 -3
- package/dist/tag.js +3 -3
- package/dist/textarea.js +91 -87
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +6 -6
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +8 -7
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +4 -4
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +139 -55
- package/package.json +2 -2
- package/dist/chunks/base-modal.9d63bdaf.js.map +0 -1
- package/dist/chunks/checkbox.d8b810c7.js.map +0 -1
- package/dist/chunks/copy.68a7d416.js.map +0 -1
- package/dist/chunks/dropdown.eaee22a3.js.map +0 -1
- package/dist/chunks/index.9b669c12.js.map +0 -1
- package/dist/chunks/listbox.23c6b393.js.map +0 -1
package/dist/radio-group.js
CHANGED
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import { u as
|
|
4
|
-
import { g as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { defineComponent as S, useSlots as B, toRefs as R, computed as r, toRef as E, watch as A } from "vue";
|
|
2
|
+
import { u as L } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
3
|
+
import { u as I } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
4
|
+
import { g as h } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
+
import { B as N, d as O } from "./chunks/index.6ac01113.js";
|
|
6
|
+
import { C as x } from "./chunks/controls-group.3716f4b4.js";
|
|
7
|
+
import { u as M } from "./chunks/aria-label.ac9651a5.js";
|
|
8
|
+
import { u as k } from "./chunks/use-default-slot-validator.b9bff4c6.js";
|
|
9
|
+
import { g as D } from "./chunks/get-slot-text.99c3d860.js";
|
|
8
10
|
import { n as T } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { E as P } from "./chunks/field-label.7328b82b.js";
|
|
12
|
+
import "./assets/index20.css";
|
|
13
|
+
var c = /* @__PURE__ */ ((t) => (t.DISABLED = "disabled", t.READONLY = "readonly", t.ERROR = "error", t))(c || {});
|
|
14
|
+
const w = {
|
|
15
|
+
name: "bento-radio-button",
|
|
16
|
+
model: { prop: "modelValue" }
|
|
17
|
+
}, U = /* @__PURE__ */ S({
|
|
18
|
+
...w,
|
|
17
19
|
props: {
|
|
18
20
|
/**
|
|
19
21
|
* Disable the radio button (optional)
|
|
20
22
|
*/
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: !1
|
|
24
|
-
},
|
|
23
|
+
disabled: { type: Boolean, default: !1 },
|
|
25
24
|
/**
|
|
26
|
-
* Shows radio-button in error state (optional)
|
|
25
|
+
* Shows bento-radio-button in error state (optional)
|
|
27
26
|
*/
|
|
28
|
-
hasError: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !1
|
|
31
|
-
},
|
|
27
|
+
hasError: { type: Boolean, default: !1 },
|
|
32
28
|
/**
|
|
33
29
|
* This property should not be used directly.
|
|
34
30
|
* It will be used by v-model directive on radio component.
|
|
@@ -40,10 +36,7 @@ const k = I({
|
|
|
40
36
|
/**
|
|
41
37
|
* Sets the radio button to readonly (optional)
|
|
42
38
|
*/
|
|
43
|
-
readonly: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
},
|
|
39
|
+
readonly: { type: Boolean, default: !1 },
|
|
47
40
|
/**
|
|
48
41
|
* Indicates the value of the input that will be returned when it's checked
|
|
49
42
|
*/
|
|
@@ -52,57 +45,44 @@ const k = I({
|
|
|
52
45
|
required: !0
|
|
53
46
|
}
|
|
54
47
|
},
|
|
55
|
-
emits: [
|
|
56
|
-
setup(t, {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
[`b-radio-button--${
|
|
61
|
-
[`b-radio-button--${
|
|
62
|
-
})),
|
|
63
|
-
[`b-radio-button__input--${
|
|
64
|
-
})),
|
|
65
|
-
ariaLabel:
|
|
66
|
-
label:
|
|
67
|
-
}),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// Values
|
|
74
|
-
ariaLabel: n,
|
|
75
|
-
ariaInvalid: l,
|
|
76
|
-
isChecked: v,
|
|
77
|
-
defaultSlotValue: u,
|
|
78
|
-
descriptionSlotValue: b,
|
|
79
|
-
conditionalClassContainer: y,
|
|
80
|
-
conditionalClassInput: m,
|
|
81
|
-
radioButtonId: f,
|
|
82
|
-
descriptionId: d,
|
|
83
|
-
// Methods
|
|
84
|
-
hasSlot: A(e),
|
|
85
|
-
onChange: c,
|
|
86
|
-
onClick: h
|
|
87
|
-
};
|
|
48
|
+
emits: ["input", "update:model-value"],
|
|
49
|
+
setup(t, { emit: e }) {
|
|
50
|
+
const a = t, o = B(), _ = I(o), { value: s } = R(a), u = h("bento-radio-button"), f = h("description");
|
|
51
|
+
k("bento-radio-button", o.default, o.description);
|
|
52
|
+
const b = r(() => ({
|
|
53
|
+
[`b-radio-button--${c.DISABLED}`]: a.disabled,
|
|
54
|
+
[`b-radio-button--${c.READONLY}`]: a.readonly
|
|
55
|
+
})), y = r(() => ({
|
|
56
|
+
[`b-radio-button__input--${c.ERROR}`]: a.hasError
|
|
57
|
+
})), l = M({
|
|
58
|
+
ariaLabel: D(o)("default"),
|
|
59
|
+
label: s.value
|
|
60
|
+
}), n = r(() => a.hasError), m = r(() => a.value === a.modelValue);
|
|
61
|
+
return { __sfc: !0, slots: o, hasSlot: _, props: a, emit: e, value: s, radioButtonId: u, descriptionId: f, conditionalClassContainer: b, conditionalClassInput: y, ariaLabel: l, ariaInvalid: n, isChecked: m, onChange: () => {
|
|
62
|
+
!a.disabled && !a.readonly && (e("update:model-value", a.value), e("input", a.value));
|
|
63
|
+
}, onClick: (i) => {
|
|
64
|
+
a.readonly && i.preventDefault();
|
|
65
|
+
}, BentoTypography: N };
|
|
88
66
|
}
|
|
89
67
|
});
|
|
90
|
-
var
|
|
91
|
-
var e = this, a = e._self._c;
|
|
92
|
-
return
|
|
93
|
-
},
|
|
94
|
-
k,
|
|
95
|
-
w,
|
|
68
|
+
var V = function() {
|
|
69
|
+
var e = this, a = e._self._c, o = e._self._setupProxy;
|
|
70
|
+
return a("div", { staticClass: "b-radio-button", class: o.conditionalClassContainer, attrs: { "data-testid": "radio-button-container" } }, [a("input", { staticClass: "b-radio-button__input", class: o.conditionalClassInput, attrs: { id: o.radioButtonId, "aria-checked": o.isChecked, "aria-label": o.ariaLabel, "aria-invalid": o.ariaInvalid, "aria-describedby": o.hasSlot("description") ? o.descriptionId : "", disabled: e.disabled, "aria-readonly": e.readonly ? e.readonly : void 0, type: "radio", role: "radio" }, domProps: { checked: o.isChecked, value: o.value }, on: { click: o.onClick, change: o.onChange } }), o.hasSlot("default") ? a("label", { staticClass: "b-radio-button__label-container", attrs: { for: o.radioButtonId } }, [o.hasSlot("default") ? a(o.BentoTypography, { staticClass: "b-radio-button__label", attrs: { el: "span", variant: "body" } }, [e._t("default")], 2) : e._e(), o.hasSlot("default") && o.hasSlot("description") ? a(o.BentoTypography, { staticClass: "b-radio-button__description", attrs: { id: o.descriptionId, el: "span", variant: "body" } }, [e._t("description")], 2) : e._e(), o.hasSlot("content") && o.isChecked ? a(o.BentoTypography, { staticClass: "b-radio-button__content", attrs: { el: "div" } }, [e._t("content")], 2) : e._e()], 1) : e._e()]);
|
|
71
|
+
}, $ = [], q = /* @__PURE__ */ T(
|
|
96
72
|
U,
|
|
73
|
+
V,
|
|
74
|
+
$,
|
|
97
75
|
!1,
|
|
98
76
|
null,
|
|
99
|
-
"
|
|
77
|
+
"0ef988b3",
|
|
100
78
|
null,
|
|
101
79
|
null
|
|
102
80
|
);
|
|
103
|
-
const
|
|
81
|
+
const F = q.exports;
|
|
82
|
+
var p = /* @__PURE__ */ ((t) => (t.HORIZONTAL = "horizontal", t.VERTICAL = "vertical", t))(p || {}), d = /* @__PURE__ */ ((t) => (t.UPDATE = "update:model-value", t.INPUT = "input", t))(d || {});
|
|
83
|
+
const C = "bento-radio-group", H = S({
|
|
104
84
|
name: C,
|
|
105
|
-
components: { ControlsGroup:
|
|
85
|
+
components: { ControlsGroup: x, ErrorMessage: P, BentoRadioButton: F },
|
|
106
86
|
model: { prop: "modelValue" },
|
|
107
87
|
props: {
|
|
108
88
|
/**
|
|
@@ -110,11 +90,11 @@ const $ = V.exports, C = "bento-radio-group", q = I({
|
|
|
110
90
|
*/
|
|
111
91
|
description: { type: String, default: null },
|
|
112
92
|
/**
|
|
113
|
-
* If set to true, renders all radio-buttons in the group in a disabled state.
|
|
93
|
+
* If set to true, renders all bento-radio-buttons in the group in a disabled state.
|
|
114
94
|
*/
|
|
115
95
|
disabled: { type: Boolean, default: !1 },
|
|
116
96
|
/**
|
|
117
|
-
* If string is passed, all radio-buttons in an error state and renders the string beneath the buttons.
|
|
97
|
+
* If string is passed, all bento-radio-buttons in an error state and renders the string beneath the buttons.
|
|
118
98
|
*/
|
|
119
99
|
errorMessage: { type: String, default: null },
|
|
120
100
|
/**
|
|
@@ -122,7 +102,7 @@ const $ = V.exports, C = "bento-radio-group", q = I({
|
|
|
122
102
|
*/
|
|
123
103
|
formId: { type: String, default: null },
|
|
124
104
|
/**
|
|
125
|
-
* If set to true, renders all radio-buttons in the group in an error state.
|
|
105
|
+
* If set to true, renders all bento-radio-buttons in the group in an error state.
|
|
126
106
|
*
|
|
127
107
|
* @deprecated Use "errorMessage" prop instead
|
|
128
108
|
*/
|
|
@@ -149,7 +129,7 @@ const $ = V.exports, C = "bento-radio-group", q = I({
|
|
|
149
129
|
*/
|
|
150
130
|
optional: { type: Boolean, default: !1 },
|
|
151
131
|
/**
|
|
152
|
-
* If set to true, renders all radio-
|
|
132
|
+
* If set to true, renders all bento-radio-button in the group in a readonly state.
|
|
153
133
|
*/
|
|
154
134
|
readonly: { type: Boolean, default: !1 },
|
|
155
135
|
/**
|
|
@@ -169,23 +149,23 @@ const $ = V.exports, C = "bento-radio-group", q = I({
|
|
|
169
149
|
validator: (t) => Object.values(p).includes(t)
|
|
170
150
|
}
|
|
171
151
|
},
|
|
172
|
-
emits: [
|
|
152
|
+
emits: [d.UPDATE, d.INPUT],
|
|
173
153
|
setup(t, { slots: e, emit: a }) {
|
|
174
|
-
const o =
|
|
175
|
-
() => !t.disabled && !
|
|
176
|
-
),
|
|
154
|
+
const o = E(t, "modelValue"), _ = h("error"), { isReadOnly: s } = L(E(t, "readonly")), u = I(e), f = r(
|
|
155
|
+
() => !t.disabled && !s.value && (!!t.errorMessage || t.hasError)
|
|
156
|
+
), b = r(() => !t.disabled && !s.value && !!t.errorMessage), y = r(() => ({
|
|
177
157
|
"b-radio-group__buttons--horizontal": t.variant === p.HORIZONTAL
|
|
178
|
-
})),
|
|
179
|
-
a(
|
|
158
|
+
})), l = r(() => t.variant === "vertical"), n = r(() => u("content")), m = r(() => (n == null ? void 0 : n.value) && (l == null ? void 0 : l.value)), v = r(() => (n == null ? void 0 : n.value) && !(l != null && l.value)), g = (i) => {
|
|
159
|
+
a(d.UPDATE, i), a(d.INPUT, i);
|
|
180
160
|
};
|
|
181
|
-
return t.hasError &&
|
|
161
|
+
return t.hasError && O(
|
|
182
162
|
'BentoRadioGroup "hasError" property',
|
|
183
163
|
`Use the BentoRadioGroup "errorMessage" property instead to indicate that there is a modifier error.
|
|
184
164
|
Having the field as "undefined" will hide/remove the error.
|
|
185
165
|
<bento-radio-group errorMessage="Error message text" />`,
|
|
186
166
|
"2.0.0"
|
|
187
|
-
),
|
|
188
|
-
|
|
167
|
+
), A(
|
|
168
|
+
v,
|
|
189
169
|
(i) => {
|
|
190
170
|
if (i)
|
|
191
171
|
throw new Error("The content slot is only available for the vertical radio group layout");
|
|
@@ -197,43 +177,46 @@ const $ = V.exports, C = "bento-radio-group", q = I({
|
|
|
197
177
|
// Values
|
|
198
178
|
COMPONENT_NAME: C,
|
|
199
179
|
inputValue: o,
|
|
200
|
-
errorId:
|
|
201
|
-
isReadOnly:
|
|
202
|
-
shouldShowError:
|
|
203
|
-
shouldShowErrorMessage:
|
|
204
|
-
conditionalClasses:
|
|
205
|
-
contentSlotAvailable:
|
|
206
|
-
isVertical:
|
|
207
|
-
shouldShowSlotError:
|
|
208
|
-
hasContentSlot:
|
|
180
|
+
errorId: _,
|
|
181
|
+
isReadOnly: s,
|
|
182
|
+
shouldShowError: f,
|
|
183
|
+
shouldShowErrorMessage: b,
|
|
184
|
+
conditionalClasses: y,
|
|
185
|
+
contentSlotAvailable: m,
|
|
186
|
+
isVertical: l,
|
|
187
|
+
shouldShowSlotError: v,
|
|
188
|
+
hasContentSlot: n,
|
|
209
189
|
hasSlot: u,
|
|
210
190
|
// Methods
|
|
211
|
-
onInput:
|
|
191
|
+
onInput: g
|
|
212
192
|
};
|
|
213
193
|
}
|
|
214
194
|
});
|
|
215
|
-
var
|
|
195
|
+
var z = function() {
|
|
216
196
|
var e = this, a = e._self._c;
|
|
217
197
|
return e._self._setupProxy, a("div", { staticClass: "b-radio-group" }, [a("controls-group", { staticClass: "b-radio-group__buttons", class: e.conditionalClasses, attrs: { "aria-describedby": e.shouldShowErrorMessage ? e.errorId : "", "component-name": e.COMPONENT_NAME, description: e.description, disabled: e.disabled, form: e.formId, label: e.label, optional: e.optional, required: e.required, "hide-label": e.hideLabel, "tooltip-text": e.tooltipText } }, e._l(e.items, function(o) {
|
|
218
|
-
return a("radio-button", { key: o.value, attrs: { "model-value": e.inputValue, value: o.value, disabled: e.disabled || o.disabled, readonly: e.isReadOnly || o.readonly, "has-error": e.shouldShowError || o.hasError }, on: { "update:model-value": e.onInput }, scopedSlots: e._u([o.description ? { key: "description", fn: function() {
|
|
198
|
+
return a("bento-radio-button", { key: o.value, attrs: { "model-value": e.inputValue, value: o.value, disabled: e.disabled || o.disabled, readonly: e.isReadOnly || o.readonly, "has-error": e.shouldShowError || o.hasError }, on: { "update:model-value": e.onInput }, scopedSlots: e._u([o.description ? { key: "description", fn: function() {
|
|
219
199
|
return [e._v(e._s(o.description))];
|
|
220
200
|
}, proxy: !0 } : null, e.contentSlotAvailable ? { key: "content", fn: function() {
|
|
221
201
|
return [e._t("content")];
|
|
222
202
|
}, proxy: !0 } : null], null, !0) }, [e._v(" " + e._s(o.label) + " ")]);
|
|
223
203
|
}), 1), e.shouldShowErrorMessage ? a("error-message", { staticClass: "b-radio-group__error-message", attrs: { id: e.errorId, "error-message": e.errorMessage } }) : e._e()], 1);
|
|
224
|
-
},
|
|
225
|
-
q,
|
|
226
|
-
F,
|
|
204
|
+
}, G = [], Y = /* @__PURE__ */ T(
|
|
227
205
|
H,
|
|
206
|
+
z,
|
|
207
|
+
G,
|
|
228
208
|
!1,
|
|
229
209
|
null,
|
|
230
|
-
"
|
|
210
|
+
"a61c8b2f",
|
|
231
211
|
null,
|
|
232
212
|
null
|
|
233
213
|
);
|
|
234
|
-
const
|
|
214
|
+
const re = Y.exports;
|
|
235
215
|
export {
|
|
236
|
-
|
|
216
|
+
F as BentoRadioButton,
|
|
217
|
+
c as BentoRadioButtonStateClass,
|
|
218
|
+
re as BentoRadioGroup,
|
|
219
|
+
d as BentoRadioGroupEvent,
|
|
237
220
|
p as BentoRadioGroupVariant
|
|
238
221
|
};
|
|
239
222
|
//# sourceMappingURL=radio-group.js.map
|
package/dist/radio-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../src/components/radio-group/components/radio-button/radio-button.types.ts","../src/components/radio-group/radio-group.types.ts","../src/components/radio-group/components/radio-button/radio-button.vue","../src/components/radio-group/radio-group.vue"],"sourcesContent":["export enum BentoRadioButtonStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoRadioGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n\nexport enum BentoRadioGroupEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <input\n :id=\"radioButtonId\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly ? readonly : undefined\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-radio-button__input\"\n :class=\"conditionalClassInput\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-radio-button__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </label>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/utils/ts/unique-id';\n import { computed, ComputedRef, defineComponent, toRefs } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass } from './radio-button.types';\n import { BentoRadioGroupEvent } from '../../radio-group.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @usage\n * import { RadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { RadioButton },\n * template: `\n * <radio-button\n * disabled\n * value=\"inputRadio\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * </radio-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'radio-button',\n components: { BentoTypography },\n props: {\n /**\n * Disable the radio button (optional)\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Shows radio-button in error state (optional)\n */\n hasError: {\n type: Boolean,\n default: false,\n },\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number],\n default: null,\n },\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: {\n type: Boolean,\n default: false,\n },\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number],\n required: true,\n },\n },\n emits: [BentoRadioGroupEvent.UPDATE],\n setup(props, { slots, emit }) {\n const { value } = toRefs(props);\n const radioButtonId = generateUid('radio-button');\n const descriptionId = generateUid('description');\n\n const defaultSlotValue = getSlotText(slots)('default');\n const descriptionSlotValue = getSlotText(slots)('description');\n\n useDefaultSlotValidator('radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n const conditionalClassInput = computed(() => ({\n [`b-radio-button__input--${BentoRadioButtonStateClass.ERROR}`]: props.hasError,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => props.hasError);\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit(BentoRadioGroupEvent.UPDATE, props.value);\n }\n };\n\n // readonly attr doesn't work with radio button, so we need to manually ignore the click instead\n const onClick = event => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n\n return {\n // Values\n ariaLabel,\n ariaInvalid,\n isChecked,\n defaultSlotValue,\n descriptionSlotValue,\n conditionalClassContainer,\n conditionalClassInput,\n radioButtonId,\n descriptionId,\n\n // Methods\n hasSlot: useHasSlot(slots),\n onChange,\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n >\n <radio-button\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"contentSlotAvailable\" #content>\n <slot name=\"content\"></slot>\n </template>\n </radio-button>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRef, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import RadioButton from './components/radio-button/radio-button.vue';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupEvent, BentoRadioGroupItems, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { ControlsGroup, ErrorMessage, RadioButton },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If string is passed, all radio-buttons in an error state and renders the string beneath the buttons.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all radio-buttons in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The radio group's items.\n */\n items: { type: Array as PropType<BentoRadioGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: [Number, String, null], default: null },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all radio-buttons in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoRadioGroupVariant | `${BentoRadioGroupVariant}`>,\n default: BentoRadioGroupVariant.VERTICAL,\n validator: (value: BentoRadioGroupVariant) => Object.values(BentoRadioGroupVariant).includes(value),\n },\n },\n emits: [BentoRadioGroupEvent.UPDATE, BentoRadioGroupEvent.INPUT],\n setup(props, { slots, emit }) {\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const hasSlot = useHasSlot(slots);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const hasContentSlot = computed(() => hasSlot('content'));\n const contentSlotAvailable = computed(() => hasContentSlot?.value && isVertical?.value);\n const shouldShowSlotError = computed(() => hasContentSlot?.value && !isVertical?.value);\n\n const onInput = value => {\n emit(BentoRadioGroupEvent.UPDATE, value);\n emit(BentoRadioGroupEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n return {\n // Values\n COMPONENT_NAME,\n inputValue,\n errorId,\n isReadOnly,\n shouldShowError,\n shouldShowErrorMessage,\n conditionalClasses,\n contentSlotAvailable,\n isVertical,\n shouldShowSlotError,\n hasContentSlot,\n hasSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["BentoRadioButtonStateClass","BentoRadioButtonStateClass2","BentoRadioGroupVariant","BentoRadioGroupVariant2","BentoRadioGroupEvent","BentoRadioGroupEvent2","_sfc_main$1","defineComponent","BentoTypography","props","slots","emit","value","toRefs","radioButtonId","generateUid","descriptionId","defaultSlotValue","getSlotText","descriptionSlotValue","useDefaultSlotValidator","conditionalClassContainer","computed","conditionalClassInput","ariaLabel","useAriaLabel","ariaInvalid","isChecked","onChange","onClick","event","useHasSlot","COMPONENT_NAME","_sfc_main","ControlsGroup","ErrorMessage","RadioButton","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","hasSlot","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","hasContentSlot","contentSlotAvailable","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":";;;;;;;;;;;;AAAY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA,GCGAE,IAAA,kBAAAC,OACRA,EAAA,aAAA,cACAA,EAAA,WAAA,YAFQA,IAAAD,KAAA,CAAA,CAAA,GAgBAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,sBACAA,EAAA,QAAA,SAFQA,IAAAD,KAAA,CAAA,CAAA;ACqDZ,MAAAE,IAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,iBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IACA,YAAA;AAAA,MAKA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,UAAA;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A;AAAA;AAAA,MACA;AAAA,IAGA,GAIAC;AAAA,MAAAH;AAAA,MACA,CAAAI,MAAA;AAEA,YAAAA;AACA,gBAAA,IAAA,MAAA,wEAAA;AAAA,MACA;AAAA,MACA;AAAA,QACA,WAAA;AAAA,MACA;AAAA,IACA,GAGA;AAAA;AAAA,MAAA,gBAAArB;AAAA,MAEA,YAAAK;AAAA,MACA,SAAAE;AAAA,MACA,YAAAC;AAAA,MACA,iBAAAG;AAAA,MACA,wBAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,sBAAAG;AAAA,MACA,YAAAF;AAAA,MACA,qBAAAG;AAAA,MACA,gBAAAF;AAAA,MACA,SAAAL;AAAA;AAAA,MACA,SAAAQ;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../src/components/radio-group/components/radio-button/radio-button.types.ts","../src/components/radio-group/components/radio-button/radio-button.vue","../src/components/radio-group/radio-group.types.ts","../src/components/radio-group/radio-group.vue"],"sourcesContent":["export type BentoRadioButtonValue = string | number;\n\nexport enum BentoRadioButtonStateClass {\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n}\n","<template>\n <div class=\"b-radio-button\" data-testid=\"radio-button-container\" :class=\"conditionalClassContainer\">\n <input\n :id=\"radioButtonId\"\n :aria-checked=\"isChecked\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"hasSlot('description') ? descriptionId : ''\"\n :checked=\"isChecked\"\n :disabled=\"disabled\"\n :aria-readonly=\"readonly ? readonly : undefined\"\n :value=\"value\"\n type=\"radio\"\n class=\"b-radio-button__input\"\n :class=\"conditionalClassInput\"\n role=\"radio\"\n @click=\"onClick\"\n @change=\"onChange\"\n />\n <label v-if=\"hasSlot('default')\" :for=\"radioButtonId\" class=\"b-radio-button__label-container\">\n <bento-typography v-if=\"hasSlot('default')\" class=\"b-radio-button__label\" el=\"span\" variant=\"body\">\n <slot></slot>\n </bento-typography>\n <bento-typography\n v-if=\"hasSlot('default') && hasSlot('description')\"\n :id=\"descriptionId\"\n class=\"b-radio-button__description\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"description\"></slot>\n </bento-typography>\n <bento-typography v-if=\"hasSlot('content') && isChecked\" class=\"b-radio-button__content\" el=\"div\">\n <slot name=\"content\"></slot>\n </bento-typography>\n </label>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import type { HTMLAttributes } from 'vue/types/jsx';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { generateUid } from '@/utils/ts/unique-id';\n import { computed, ComputedRef, PropType, toRefs, useSlots } from 'vue';\n import { useDefaultSlotValidator, useHasSlot } from '@/composables';\n import { BentoRadioButtonStateClass, BentoRadioButtonValue } from './radio-button.types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n\n const slots = useSlots();\n const hasSlot = useHasSlot(slots);\n const props = defineProps({\n /**\n * Disable the radio button (optional)\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Shows bento-radio-button in error state (optional)\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * This property should not be used directly.\n * It will be used by v-model directive on radio component.\n */\n modelValue: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n default: null,\n },\n\n /**\n * Sets the radio button to readonly (optional)\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the value of the input that will be returned when it's checked\n */\n value: {\n type: [String, Number] as PropType<BentoRadioButtonValue>,\n required: true,\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the radio button is clicked. Enables Vue2 \"v-model\"\n */\n (e: 'input', value: BentoRadioButtonValue);\n\n /**\n * Emitted when the radio button is clicked. Enables Vue3 \"v-model\"\n */\n (e: 'update:model-value', value: BentoRadioButtonValue);\n }>();\n\n const { value } = toRefs(props);\n const radioButtonId = generateUid('bento-radio-button');\n const descriptionId = generateUid('description');\n\n useDefaultSlotValidator('bento-radio-button', slots.default, slots.description);\n\n const conditionalClassContainer = computed(() => ({\n [`b-radio-button--${BentoRadioButtonStateClass.DISABLED}`]: props.disabled,\n [`b-radio-button--${BentoRadioButtonStateClass.READONLY}`]: props.readonly,\n }));\n const conditionalClassInput = computed(() => ({\n [`b-radio-button__input--${BentoRadioButtonStateClass.ERROR}`]: props.hasError,\n }));\n\n const ariaLabel = useAriaLabel({\n ariaLabel: getSlotText(slots)('default'),\n label: value.value as string,\n });\n const ariaInvalid = computed<HTMLAttributes['aria-invalid']>(() => props.hasError);\n\n const isChecked: ComputedRef<boolean> = computed(() => props.value === props.modelValue);\n\n const onChange = () => {\n if (!props.disabled && !props.readonly) {\n emit('update:model-value', props.value);\n emit('input', props.value);\n }\n };\n\n // readonly attr doesn't work with radio button, so we need to manually ignore the click instead\n const onClick = event => {\n if (props.readonly) {\n event.preventDefault();\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio buttons are used when two or more options are mutually exclusive,\n * the user can only select a single option from a list of pre-defined options.\n * The label tag area is also clickable.\n * Only to be used internally.\n *\n * @example\n * import { BentoRadioButton } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioButton },\n * template: `\n * <bento-radio-button\n * disabled\n * value=\"inputRadio\"\n * model-value.sync=\"modelValue\"\n * >\n * Label text\n * <template #description>Description text below label</template>\n * <template #content>Content shown when checked</template>\n * </bento-radio-button>\n * `,\n * setup() {\n * const modelValue = ref('anyValue')\n * const value = 'option-value'\n *\n * return {\n * modelValue,\n * value,\n * }\n * }\n * }\n */\n export default {\n name: 'bento-radio-button',\n model: { prop: 'modelValue' },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-button.scss\" />\n","/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoRadioGroupVariant {\n HORIZONTAL = 'horizontal',\n VERTICAL = 'vertical',\n}\n\nexport interface BentoRadioGroupItem {\n value: string | number;\n label: string;\n description?: string;\n disabled?: boolean;\n readonly?: boolean;\n hasError?: boolean;\n}\n\nexport type BentoRadioGroupItems = Array<BentoRadioGroupItem>;\n\nexport enum BentoRadioGroupEvent {\n UPDATE = 'update:model-value',\n INPUT = 'input',\n}\n","<template>\n <div class=\"b-radio-group\">\n <controls-group\n class=\"b-radio-group__buttons\"\n :aria-describedby=\"shouldShowErrorMessage ? errorId : ''\"\n :component-name=\"COMPONENT_NAME\"\n :class=\"conditionalClasses\"\n :description=\"description\"\n :disabled=\"disabled\"\n :form=\"formId\"\n :label=\"label\"\n :optional=\"optional\"\n :required=\"required\"\n :hide-label=\"hideLabel\"\n :tooltip-text=\"tooltipText\"\n >\n <bento-radio-button\n v-for=\"item in items\"\n :key=\"item.value\"\n :model-value=\"inputValue\"\n :value=\"item.value\"\n :disabled=\"disabled || item.disabled\"\n :readonly=\"isReadOnly || item.readonly\"\n :has-error=\"shouldShowError || item.hasError\"\n @update:model-value=\"onInput\"\n >\n {{ item.label }}\n <template v-if=\"item.description\" #description>{{ item.description }}</template>\n <template v-if=\"contentSlotAvailable\" #content>\n <slot name=\"content\"></slot>\n </template>\n </bento-radio-button>\n </controls-group>\n <error-message\n v-if=\"shouldShowErrorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-radio-group__error-message\"\n />\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, toRef, watch } from 'vue';\n import { ControlsGroup, ErrorMessage } from '@/components/internal';\n import { BentoRadioButton } from './components/radio-button';\n import { useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { deprecate } from '@/utils/ts/deprecate';\n import { BentoRadioGroupEvent, BentoRadioGroupItems, BentoRadioGroupVariant } from './radio-group.types';\n import { useFormLayoutFieldLoading } from '@/composables/use-form-layout-loading/use-form-layout-loading';\n\n /**\n * The name of the component to be used in the Vue devtools and console warnings.\n */\n const COMPONENT_NAME = 'bento-radio-group';\n\n /**\n * A radio group component should be used whenever it is necessary to use a set of radio buttons\n * This component conforms to the official WAI-ARIA guidelines for grouping controls: https://www.w3.org/WAI/tutorials/forms/grouping/\n *\n * import { BentoRadioGroup } from '@adyen/bento-vue2/';\n *\n * export default {\n * components: { BentoRadioGroup },\n * template: `\n * <bento-radio-group\n * label=\"Your group label\"\n * :items=\"[\n * { value: 1, label: 'Your label' },\n * { value: 2, label: 'Another label', description: 'Your descriptive sub label' },\n * ]\"\n * variant=\"horizontal\"\n * />\n * `\n * };\n */\n export default defineComponent({\n name: COMPONENT_NAME,\n components: { ControlsGroup, ErrorMessage, BentoRadioButton },\n model: { prop: 'modelValue' },\n props: {\n /**\n * Descriptive supporting text visbile underneath the label.\n */\n description: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in a disabled state.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * If string is passed, all bento-radio-buttons in an error state and renders the string beneath the buttons.\n */\n errorMessage: { type: String, default: null },\n\n /**\n * The form id the radio group is associated with. Defaults to null, as a radio group can also be used standalone.\n */\n formId: { type: String, default: null },\n\n /**\n * If set to true, renders all bento-radio-buttons in the group in an error state.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n hasError: { type: Boolean, default: false },\n\n /**\n * Shows/hides the group label.\n */\n hideLabel: { type: Boolean, default: null },\n\n /**\n * The radio group's items.\n */\n items: { type: Array as PropType<BentoRadioGroupItems>, required: true },\n\n /**\n * The name associated with the group. Required for accessibility purposes.\n */\n label: { type: String, required: true },\n\n /**\n * Determines the initially selected value of the group. Corresponds to the BentoRadioButtonItem's value.\n * Defaults to no value selected.\n */\n modelValue: { type: [Number, String, null], default: null },\n\n /**\n * Indicates the field is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * If set to true, renders all bento-radio-button in the group in a readonly state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Indicates the field is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * The radio group's layout. It can be vertical or horizontal. Defaults to vertical.\n */\n variant: {\n type: String as PropType<BentoRadioGroupVariant | `${BentoRadioGroupVariant}`>,\n default: BentoRadioGroupVariant.VERTICAL,\n validator: (value: BentoRadioGroupVariant) => Object.values(BentoRadioGroupVariant).includes(value),\n },\n },\n emits: [BentoRadioGroupEvent.UPDATE, BentoRadioGroupEvent.INPUT],\n setup(props, { slots, emit }) {\n const inputValue = toRef(props, 'modelValue');\n const errorId = generateUid('error');\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n const hasSlot = useHasSlot(slots);\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.hasError)\n );\n const shouldShowErrorMessage = computed(() => !props.disabled && !isReadOnly.value && !!props.errorMessage);\n\n const conditionalClasses = computed(() => ({\n 'b-radio-group__buttons--horizontal': props.variant === BentoRadioGroupVariant.HORIZONTAL,\n }));\n\n // Content slot logic\n const isVertical = computed(() => props.variant === 'vertical');\n const hasContentSlot = computed(() => hasSlot('content'));\n const contentSlotAvailable = computed(() => hasContentSlot?.value && isVertical?.value);\n const shouldShowSlotError = computed(() => hasContentSlot?.value && !isVertical?.value);\n\n const onInput = value => {\n emit(BentoRadioGroupEvent.UPDATE, value);\n emit(BentoRadioGroupEvent.INPUT, value);\n };\n\n if (props.hasError) {\n deprecate(\n 'BentoRadioGroup \"hasError\" property',\n `Use the BentoRadioGroup \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-radio-group errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n\n watch(\n shouldShowSlotError,\n newVal => {\n if (newVal) {\n throw new Error('The content slot is only available for the vertical radio group layout');\n }\n },\n {\n immediate: true,\n }\n );\n\n return {\n // Values\n COMPONENT_NAME,\n inputValue,\n errorId,\n isReadOnly,\n shouldShowError,\n shouldShowErrorMessage,\n conditionalClasses,\n contentSlotAvailable,\n isVertical,\n shouldShowSlotError,\n hasContentSlot,\n hasSlot,\n\n // Methods\n onInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group.scss\" />\n"],"names":["BentoRadioButtonStateClass","BentoRadioButtonStateClass2","__default__","slots","useSlots","hasSlot","useHasSlot","value","toRefs","props","radioButtonId","generateUid","descriptionId","useDefaultSlotValidator","conditionalClassContainer","computed","conditionalClassInput","ariaLabel","useAriaLabel","getSlotText","ariaInvalid","isChecked","emit","event","BentoRadioGroupVariant","BentoRadioGroupVariant2","BentoRadioGroupEvent","BentoRadioGroupEvent2","COMPONENT_NAME","_sfc_main","defineComponent","ControlsGroup","ErrorMessage","BentoRadioButton","inputValue","toRef","errorId","isReadOnly","useFormLayoutFieldLoading","shouldShowError","shouldShowErrorMessage","conditionalClasses","isVertical","hasContentSlot","contentSlotAvailable","shouldShowSlotError","onInput","deprecate","watch","newVal"],"mappings":";;;;;;;;;;;;AAEY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QAAA,SAHQA,IAAAD,KAAA,CAAA,CAAA;ACsKR,MAAAE,IAAA;AAAA,EAAe,MAAA;AAAA,EACL,OAAA,EAAA,MAAA,aAAA;AAEV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA1HAC,IAAAC,EAAA,GACAC,IAAAC,EAAAH,CAAA,GA+CA,EAAA,OAAAI,EAAA,IAAAC,EAAAC,CAAA,GACAC,IAAAC,EAAA,oBAAA,GACAC,IAAAD,EAAA,aAAA;AAEA,IAAAE,EAAA,sBAAAV,EAAA,SAAAA,EAAA,WAAA;AAEA,UAAAW,IAAAC,EAAA,OAAA;AAAA,MAAkD,CAAA,mBAAAf,EAAA,UAAA,GAAAS,EAAA;AAAA,MACoB,CAAA,mBAAAT,EAAA,UAAA,GAAAS,EAAA;AAAA,IACA,EAAA,GAEtEO,IAAAD,EAAA,OAAA;AAAA,MAA8C,CAAA,0BAAAf,EAAA,OAAA,GAAAS,EAAA;AAAA,IAC4B,EA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A3B,EAAA,MAAAN,EAAA,YAAA,UAAA,GACAkC,IAAA5B,EAAA,MAAAV,EAAA,SAAA,CAAA,GACAuC,IAAA7B,EAAA,OAAA4B,KAAA,gBAAAA,EAAA,WAAAD,KAAA,gBAAAA,EAAA,MAAA,GACAG,IAAA9B,EAAA,OAAA4B,KAAA,gBAAAA,EAAA,UAAA,EAAAD,KAAA,QAAAA,EAAA,MAAA,GAEAI,IAAA,CAAAvC,MAAA;AACA,MAAAe,EAAAI,EAAA,QAAAnB,CAAA,GACAe,EAAAI,EAAA,OAAAnB,CAAA;AAAA,IAAA;AAGA,WAAAE,EAAA,YACAsC;AAAA,MAAA;AAAA,MACA;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIAC;AAAA,MAAAH;AAAA,MACA,CAAAI,MAAA;AAEA,YAAAA;AACA,gBAAA,IAAA,MAAA,wEAAA;AAAA,MACA;AAAA,MACA;AAAA,QACA,WAAA;AAAA,MACA;AAAA,IACA,GAGA;AAAA;AAAA,MAAA,gBAAArB;AAAA,MAEA,YAAAM;AAAA,MACA,SAAAE;AAAA,MACA,YAAAC;AAAA,MACA,iBAAAE;AAAA,MACA,wBAAAC;AAAA,MACA,oBAAAC;AAAA,MACA,sBAAAG;AAAA,MACA,YAAAF;AAAA,MACA,qBAAAG;AAAA,MACA,gBAAAF;AAAA,MACA,SAAAtC;AAAA;AAAA,MACA,SAAAyC;AAAA,IAGA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/search-bar.js
CHANGED
|
@@ -5,7 +5,7 @@ import { BentoInputField as m } from "./input-field.js";
|
|
|
5
5
|
import { S as h } from "./chunks/search.471270fe.js";
|
|
6
6
|
import { C as y } from "./chunks/cross-circle-fill.27580c4b.js";
|
|
7
7
|
import { n as b } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
-
import { u as w } from "./chunks/dropdown.
|
|
8
|
+
import { u as w } from "./chunks/dropdown.4d800c61.js";
|
|
9
9
|
import "./assets/index38.css";
|
|
10
10
|
var o = /* @__PURE__ */ ((t) => (t.CLEAR = "clear", t.ESCAPE = "escape-pressed", t.INPUT = "input", t.UPDATE = "update:search-term", t))(o || {}), C = /* @__PURE__ */ ((t) => (t.CLEAR = "search-clear", t.INPUT = "search-input", t.UPDATE = "update:search-term", t))(C || {});
|
|
11
11
|
const v = {
|
package/dist/secondary-nav.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as r, inject as d, computed as p, ref as y, readonly as f, provide as m } from "vue";
|
|
2
|
-
import { B as o } from "./chunks/index.
|
|
2
|
+
import { B as o } from "./chunks/index.6ac01113.js";
|
|
3
3
|
import { n as c } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
4
|
-
import "./assets/
|
|
4
|
+
import "./assets/index22.css";
|
|
5
5
|
const u = Symbol("secondary nav state"), b = {}, C = /* @__PURE__ */ r({
|
|
6
6
|
...b,
|
|
7
7
|
__name: "secondary-nav-item",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as g, ref as r, computed as s, toRef as k, toRefs as w, onMounted as L } from "vue";
|
|
2
|
-
import { B as x } from "./chunks/index.
|
|
2
|
+
import { B as x } from "./chunks/index.6ac01113.js";
|
|
3
3
|
import { g as I } from "./chunks/unique-id.a2a2b458.js";
|
|
4
4
|
import { C as S } from "./chunks/checkmark.a6ed8f47.js";
|
|
5
5
|
import { n as v } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
6
6
|
import { u as $ } from "./chunks/i18n.eb5b985b.js";
|
|
7
7
|
import { u as W } from "./chunks/aria-label.ac9651a5.js";
|
|
8
8
|
import { o as T } from "./chunks/resize.a041304d.js";
|
|
9
|
-
import { b as A } from "./chunks/tooltip.
|
|
10
|
-
import "./assets/
|
|
9
|
+
import { b as A } from "./chunks/tooltip.46858ae6.js";
|
|
10
|
+
import "./assets/index21.css";
|
|
11
11
|
const F = g({
|
|
12
12
|
name: "bento-segmented-control-button",
|
|
13
13
|
components: { BentoTypography: x, CheckmarkIcon: S },
|