@adyen/bento-vue2 1.7.0 → 1.8.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/components.d.ts +2 -0
- package/dist/@types/packages/core/src/components/button/button.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/action-bar/action-bar.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +7 -2
- package/dist/@types/packages/vue2/src/components/button/components/loading-button/loading-button.vue.d.ts +28 -18
- package/dist/@types/packages/vue2/src/components/checkbox/checkbox.vue.d.ts +25 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +13 -1
- package/dist/@types/packages/vue2/src/components/date-picker/date-picker.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue.d.ts +153 -12
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.types.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/date-range-picker/date-range-picker.vue.d.ts +18 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +320 -21
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +30 -24
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.types.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/calendar.vue.d.ts +11 -1
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.types.d.ts +13 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-adjustments.types.d.ts +14 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/calendar/composables/use-granularity-memory.types.d.ts +22 -0
- package/dist/@types/packages/vue2/src/components/internal/controls-group/controls-group.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +48 -0
- package/dist/@types/packages/vue2/src/components/internal/field-label/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/grid-layout/grid-layout.vue.d.ts +11 -0
- package/dist/@types/packages/vue2/src/components/internal/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +16 -22
- package/dist/@types/packages/vue2/src/components/structured-list/components/structered-list-item/structured-list-item.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/structured-list/structured-list.vue.d.ts +20 -1
- package/dist/@types/packages/vue2/src/components/summary-grid/summary-grid.types.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/timeline/components/timeline-item/timeline-item.vue.d.ts +19 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.types.d.ts +4 -2
- package/dist/@types/packages/vue2/src/components/timeline/timeline.vue.d.ts +18 -2
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/accordion.js +1 -1
- package/dist/action-bar.js +112 -93
- package/dist/action-bar.js.map +1 -1
- package/dist/alert.js +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -0
- package/dist/assets/grid-layout.css +1 -1
- package/dist/assets/index.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/index27.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/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/index38.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/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/loading-button.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +38 -35
- package/dist/button.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.js +5 -5
- package/dist/chunks/{base-modal.88e7b9d4.js → base-modal.31634fe8.js} +60 -49
- package/dist/chunks/base-modal.31634fe8.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.a5413243.js → button-actions-with-menu.5faea13e.js} +5 -5
- package/dist/chunks/{button-actions-with-menu.a5413243.js.map → button-actions-with-menu.5faea13e.js.map} +1 -1
- package/dist/chunks/button.e09d5980.js.map +1 -1
- package/dist/chunks/calendar.47e9e755.js +959 -0
- package/dist/chunks/calendar.47e9e755.js.map +1 -0
- package/dist/chunks/{checkbox.5343e28e.js → checkbox.2277450e.js} +67 -56
- package/dist/chunks/checkbox.2277450e.js.map +1 -0
- package/dist/chunks/controls-group.6c5bfccd.js +79 -0
- package/dist/chunks/controls-group.6c5bfccd.js.map +1 -0
- package/dist/chunks/{copy.346eadb1.js → copy.a85c2e9f.js} +3 -3
- package/dist/chunks/{copy.346eadb1.js.map → copy.a85c2e9f.js.map} +1 -1
- package/dist/chunks/{dropdown.f1253a54.js → dropdown.ce937989.js} +200 -196
- package/dist/chunks/dropdown.ce937989.js.map +1 -0
- package/dist/chunks/field-label.330edb60.js +107 -0
- package/dist/chunks/field-label.330edb60.js.map +1 -0
- package/dist/chunks/{grid-layout.b7e0d964.js → grid-layout.a806acb2.js} +36 -27
- package/dist/chunks/grid-layout.a806acb2.js.map +1 -0
- package/dist/chunks/index.210d2169.js +290 -0
- package/dist/chunks/index.210d2169.js.map +1 -0
- package/dist/chunks/{index.8ac70774.js → index.66503760.js} +3 -3
- package/dist/chunks/{index.8ac70774.js.map → index.66503760.js.map} +1 -1
- package/dist/chunks/{index.2625175a.js → index.86fc63ca.js} +30 -28
- package/dist/chunks/{index.2625175a.js.map → index.86fc63ca.js.map} +1 -1
- package/dist/chunks/{index.a201f750.js → index.89942d3a.js} +4 -5
- package/dist/chunks/{index.a201f750.js.map → index.89942d3a.js.map} +1 -1
- package/dist/chunks/index.a5de5242.js +130 -0
- package/dist/chunks/index.a5de5242.js.map +1 -0
- package/dist/chunks/index.a99ffd48.js +634 -0
- package/dist/chunks/index.a99ffd48.js.map +1 -0
- package/dist/chunks/index.d80206ed.js +10 -0
- package/dist/chunks/index.d80206ed.js.map +1 -0
- package/dist/chunks/{index.37283390.js → index.d8bd7596.js} +96 -99
- package/dist/chunks/{index.37283390.js.map → index.d8bd7596.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.6a09e8e2.js → listbox-option-tag.97af47fc.js} +6 -7
- package/dist/chunks/{listbox-option-tag.6a09e8e2.js.map → listbox-option-tag.97af47fc.js.map} +1 -1
- package/dist/chunks/{listbox.73c38f38.js → listbox.d039b178.js} +5 -6
- package/dist/chunks/{listbox.73c38f38.js.map → listbox.d039b178.js.map} +1 -1
- package/dist/chunks/loading-button.9a9cbbad.js +89 -0
- package/dist/chunks/loading-button.9a9cbbad.js.map +1 -0
- package/dist/chunks/{tooltip.104e5fac.js → tooltip.ecd0f707.js} +2 -2
- package/dist/chunks/{tooltip.104e5fac.js.map → tooltip.ecd0f707.js.map} +1 -1
- package/dist/code-snippet.js +4 -4
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +563 -541
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +83 -80
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +13 -12
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +63 -67
- package/dist/header.js.map +1 -1
- package/dist/index.js +211 -209
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +57 -55
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +13 -12
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +2 -2
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +2 -2
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +3 -305
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +3 -3
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +2 -2
- package/dist/sidepanel.js +2 -2
- package/dist/status.js +1 -1
- package/dist/stepper.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/summary-grid.js.map +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tag.js +2 -2
- package/dist/textarea.js +59 -56
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +226 -173
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tutorial.js +7 -7
- package/dist/web-types.json +519 -393
- package/package.json +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/__mocks__/base-modal.vue.d.ts +0 -118
- package/dist/assets/error-message.css +0 -1
- package/dist/chunks/base-modal.88e7b9d4.js.map +0 -1
- package/dist/chunks/calendar.24d0ac04.js +0 -821
- package/dist/chunks/calendar.24d0ac04.js.map +0 -1
- package/dist/chunks/checkbox.5343e28e.js.map +0 -1
- package/dist/chunks/controls-group.2a21bd83.js +0 -87
- package/dist/chunks/controls-group.2a21bd83.js.map +0 -1
- package/dist/chunks/dropdown.f1253a54.js.map +0 -1
- package/dist/chunks/error-message.8302a46c.js +0 -47
- package/dist/chunks/error-message.8302a46c.js.map +0 -1
- package/dist/chunks/grid-layout.b7e0d964.js.map +0 -1
- package/dist/chunks/index.d6b5f5e1.js +0 -112
- package/dist/chunks/index.d6b5f5e1.js.map +0 -1
- package/dist/chunks/index.e566354f.js +0 -532
- package/dist/chunks/index.e566354f.js.map +0 -1
- package/dist/chunks/loading-button.c65682d6.js +0 -86
- package/dist/chunks/loading-button.c65682d6.js.map +0 -1
package/dist/input-field.js
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { defineComponent as H, useAttrs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { u as X } from "./chunks/use-has-slot.6052d56a.js";
|
|
1
|
+
import { defineComponent as H, useAttrs as F, useSlots as G, ref as R, toRef as z, computed as i, toRefs as j } from "vue";
|
|
2
|
+
import { B as W, a as Y } from "./chunks/dropdown.ce937989.js";
|
|
3
|
+
import { d as q, B as X } from "./chunks/index.965ac1af.js";
|
|
5
4
|
import { g as p } from "./chunks/unique-id.a2a2b458.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { u as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import "./
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
import { g as K } from "./chunks/get-slot-text.c1114034.js";
|
|
6
|
+
import { u as J } from "./chunks/aria-label.ac9651a5.js";
|
|
7
|
+
import { u as Q } from "./chunks/i18n.155748d6.js";
|
|
8
|
+
import { u as Z } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
9
|
+
import { u as tt } from "./chunks/use-has-slot.6052d56a.js";
|
|
10
|
+
import { E as et, F as at } from "./chunks/field-label.330edb60.js";
|
|
11
|
+
import { n as ot } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
12
|
+
import "./assets/index32.css";
|
|
13
|
+
var d = /* @__PURE__ */ ((a) => (a.DEFAULT = "default", a.PAYMENT_METHOD = "payment-method", a.STATIC_VALUE = "static-value", a.DROPDOWN = "dropdown", a))(d || {}), n = /* @__PURE__ */ ((a) => (a.START = "start", a.END = "end", a))(n || {}), s = /* @__PURE__ */ ((a) => (a.CONDENSED = "condensed", a.DISABLED = "disabled", a.READONLY = "readonly", a.ERROR = "error", a.SMALL_PADDING_LEFT = "small-padding-left", a.SMALL_PADDING_RIGHT = "small-padding-right", a))(s || {}), m = /* @__PURE__ */ ((a) => (a.SEARCH = "search", a.TEXT = "text", a.NUMBER = "number", a))(m || {}), rt = /* @__PURE__ */ ((a) => (a.INPUT = "input", a.ESCAPE_PRESSED = "escape-pressed", a.UPDATE_DROPDOWN = "update:dropdown", a.DROPDOWN_INPUT = "dropdown-input", a.FOCUS = "focus", a.CHANGE = "change", a.BLUR = "blur", a.KEYDOWN = "keydown", a))(rt || {});
|
|
14
|
+
const it = {
|
|
15
15
|
"en-US": {
|
|
16
|
-
optional: "optional",
|
|
17
|
-
required: "required",
|
|
18
16
|
ariaLabelFallback: "Input field"
|
|
19
17
|
}
|
|
20
|
-
},
|
|
21
|
-
i18n: { messages:
|
|
22
|
-
},
|
|
23
|
-
...
|
|
18
|
+
}, nt = {
|
|
19
|
+
i18n: { messages: it }
|
|
20
|
+
}, dt = /* @__PURE__ */ H({
|
|
21
|
+
...nt,
|
|
24
22
|
__name: "input-field",
|
|
25
23
|
props: {
|
|
26
24
|
/**
|
|
@@ -97,13 +95,17 @@ const rt = {
|
|
|
97
95
|
default: n.START,
|
|
98
96
|
validator: (a) => Object.values(n).includes(a)
|
|
99
97
|
},
|
|
98
|
+
/**
|
|
99
|
+
* Adds a info icon next to the label to display the passed tooltip message.
|
|
100
|
+
*/
|
|
101
|
+
tooltipText: { type: String, default: null },
|
|
100
102
|
/**
|
|
101
103
|
* A string specifying the type of control to render.
|
|
102
104
|
*/
|
|
103
105
|
type: {
|
|
104
106
|
type: String,
|
|
105
|
-
default:
|
|
106
|
-
validator: (a) => Object.values(
|
|
107
|
+
default: m.TEXT,
|
|
108
|
+
validator: (a) => Object.values(m).includes(a)
|
|
107
109
|
},
|
|
108
110
|
/**
|
|
109
111
|
* Text displayed as the value of the input-field
|
|
@@ -114,59 +116,59 @@ const rt = {
|
|
|
114
116
|
*/
|
|
115
117
|
variant: {
|
|
116
118
|
type: String,
|
|
117
|
-
default:
|
|
118
|
-
validator: (a) => Object.values(
|
|
119
|
+
default: d.DEFAULT,
|
|
120
|
+
validator: (a) => Object.values(d).includes(a)
|
|
119
121
|
}
|
|
120
122
|
},
|
|
121
123
|
emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "input"],
|
|
122
124
|
setup(a, { expose: e, emit: o }) {
|
|
123
|
-
const t = a, r =
|
|
124
|
-
() => t.variant ===
|
|
125
|
-
),
|
|
125
|
+
const t = a, r = F(), c = G(), { t: w } = Q(), b = tt(c), h = R(null), P = p("input"), y = p("input-dropdown"), v = p("input-static-value"), S = p("input-description"), A = p("input-error"), { isReadOnly: f } = Z(z(t, "readonly")), l = i(
|
|
126
|
+
() => t.variant === d.STATIC_VALUE && !!c.staticValue
|
|
127
|
+
), N = i(() => t.variant === d.DEFAULT), I = i(() => t.variant === d.PAYMENT_METHOD), M = i(
|
|
126
128
|
() => l.value && t.staticValuePosition === n.START
|
|
127
|
-
),
|
|
129
|
+
), C = i(
|
|
128
130
|
() => l.value && t.staticValuePosition === n.END
|
|
129
|
-
), u = i(() => t.variant ===
|
|
131
|
+
), u = i(() => t.variant === d.DROPDOWN && !!t.dropdown), g = i(
|
|
130
132
|
() => u.value && t.dropdownPosition === n.START
|
|
131
133
|
), E = i(
|
|
132
134
|
() => u.value && t.dropdownPosition === n.END
|
|
133
|
-
),
|
|
135
|
+
), D = i(
|
|
134
136
|
() => !t.disabled && !f.value && (!!t.errorMessage || t.error)
|
|
135
|
-
), V = i(() => u.value === !0 && l.value === !0 ? `${v} ${y}` : u.value === !0 ? `${y}` : l.value === !0 ? `${v}` : null), T = R(r["aria-label"]), { ariaLabel: L } = j(t), k =
|
|
137
|
+
), V = i(() => u.value === !0 && l.value === !0 ? `${v} ${y}` : u.value === !0 ? `${y}` : l.value === !0 ? `${v}` : null), T = R(r["aria-label"]), { ariaLabel: L } = j(t), k = J({
|
|
136
138
|
ariaLabel: T.value,
|
|
137
139
|
// TODO: take this line away when the aria-label props is removed
|
|
138
140
|
label: L,
|
|
139
|
-
defaultFallback: b("default") ?
|
|
140
|
-
}),
|
|
141
|
-
() => `${b("description") ? S : ""} ${
|
|
141
|
+
defaultFallback: b("default") ? K(c)("default") : w("ariaLabelFallback")
|
|
142
|
+
}), x = i(
|
|
143
|
+
() => `${b("description") ? S : ""} ${D.value && t.errorMessage ? A : ""}`
|
|
142
144
|
), U = i(() => ({
|
|
143
|
-
[`b-input-field--${
|
|
144
|
-
[`b-input-field--${
|
|
145
|
-
[`b-input-field--${
|
|
146
|
-
[`b-input-field--${
|
|
147
|
-
[`b-input-field--${
|
|
148
|
-
[`b-input-field--${
|
|
149
|
-
})),
|
|
145
|
+
[`b-input-field--${s.CONDENSED}`]: t.condensed,
|
|
146
|
+
[`b-input-field--${s.DISABLED}`]: t.disabled,
|
|
147
|
+
[`b-input-field--${s.READONLY}`]: f.value,
|
|
148
|
+
[`b-input-field--${s.ERROR}`]: D.value,
|
|
149
|
+
[`b-input-field--${s.SMALL_PADDING_LEFT}`]: g.value,
|
|
150
|
+
[`b-input-field--${s.SMALL_PADDING_RIGHT}`]: E.value
|
|
151
|
+
})), B = (_) => {
|
|
150
152
|
!t.disabled && !f.value && o("input", _.target.value);
|
|
151
|
-
},
|
|
153
|
+
}, $ = (_) => {
|
|
152
154
|
o("dropdown-input", _), o("update:dropdown", { ...t == null ? void 0 : t.dropdown, value: _ });
|
|
153
155
|
}, O = () => {
|
|
154
|
-
|
|
156
|
+
h.value.focus();
|
|
155
157
|
};
|
|
156
158
|
return e({
|
|
157
159
|
focusInput: O
|
|
158
|
-
}), t.error &&
|
|
160
|
+
}), t.error && q(
|
|
159
161
|
'BentoInputField "error" property',
|
|
160
162
|
`Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
|
|
161
163
|
Having the field as "undefined" will hide/remove the error.
|
|
162
164
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
163
165
|
"2.0.0"
|
|
164
|
-
), { __sfc: !0, attrs: r, slots: c, props: t, emit: o, t:
|
|
166
|
+
), { __sfc: !0, attrs: r, slots: c, props: t, emit: o, t: w, hasSlot: b, inputFieldElement: h, inputFieldId: P, dropdownId: y, staticValueId: v, descriptionId: S, errorId: A, isReadOnly: f, shouldShowStaticValue: l, isDefaultVariant: N, isPaymentMethodVariant: I, shouldDisplayStaticValueAtStart: M, shouldDisplayStaticValueAtEnd: C, shouldShowDropdown: u, shouldDisplayDropdownAtStart: g, shouldDisplayDropdownAtEnd: E, shouldShowError: D, computedAriaOwns: V, ariaLabelAttribute: T, ariaLabel: L, computedAriaLabel: k, computedAriaDescribedBy: x, inputFieldConditionalClasses: U, onInput: B, onDropdownInput: $, focusInput: O, BentoDropdown: W, BentoTypography: X, ErrorMessage: et, FieldLabel: at, BentoDropdownSize: Y };
|
|
165
167
|
}
|
|
166
168
|
});
|
|
167
169
|
var st = function() {
|
|
168
170
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
169
|
-
return o(t.BentoTypography, { staticClass: "b-input-field", class: t.inputFieldConditionalClasses, attrs: { "data-testid": "input-text-container", el: "div", variant: "body" } }, [t.hasSlot("default") ? o(
|
|
171
|
+
return o(t.BentoTypography, { staticClass: "b-input-field", class: t.inputFieldConditionalClasses, attrs: { "data-testid": "input-text-container", el: "div", variant: "body" } }, [t.hasSlot("default") ? o(t.FieldLabel, { attrs: { for: t.inputFieldId, "data-testid": "input-field-label", "tooltip-text": e.tooltipText, optional: e.optional, required: e.required }, on: { click: t.focusInput } }, [e._t("default")], 2) : e._e(), o("div", { staticClass: "b-input-field__input-box", attrs: { "data-testid": "input-box", "aria-disabled": e.disabled }, on: { click: t.focusInput } }, [t.isDefaultVariant && t.hasSlot("defaultIconBefore") ? o("span", { staticClass: "b-input-field__default-icon-before", attrs: { "aria-hidden": e.ariaHidden ? "true" : void 0 } }, [e._t("defaultIconBefore")], 2) : e._e(), t.isPaymentMethodVariant && t.hasSlot("paymentMethod") ? o("span", { staticClass: "b-input-field__payment-method", attrs: { "aria-hidden": e.ariaHidden ? "true" : void 0 } }, [e._t("paymentMethod")], 2) : e._e(), t.shouldDisplayDropdownAtStart ? o("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--start", attrs: { id: t.dropdownId }, on: { click: function(r) {
|
|
170
172
|
r.stopPropagation();
|
|
171
173
|
} } }, [e.dropdown ? o(t.BentoDropdown, e._b({ attrs: { size: t.BentoDropdownSize.SMALL, disabled: e.disabled, readonly: t.isReadOnly }, on: { input: t.onDropdownInput } }, "bento-dropdown", e.dropdown, !1)) : e._e()], 1) : e._e(), t.shouldDisplayStaticValueAtStart ? o(t.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--start", attrs: { id: t.staticValueId, el: "span", variant: "body" } }, [e._t("staticValue")], 2) : e._e(), o("input", e._b({ ref: "inputFieldElement", staticClass: "b-input-field__input", attrs: { id: t.inputFieldId, "aria-label": t.computedAriaLabel, "aria-describedby": t.computedAriaDescribedBy, "aria-owns": t.computedAriaOwns, "aria-invalid": t.shouldShowError, placeholder: e.placeholder, type: e.type, disabled: e.disabled, readonly: t.isReadOnly }, domProps: { value: e.value }, on: { input: t.onInput, change: function(r) {
|
|
172
174
|
return t.emit("change");
|
|
@@ -181,23 +183,23 @@ var st = function() {
|
|
|
181
183
|
}] } }, "input", t.attrs, !1)), t.hasSlot("iconAfter") ? o("span", { staticClass: "b-input-field__icon-after", attrs: { "aria-hidden": e.ariaHidden ? "true" : void 0, "data-testid": "input-text__icon-after" } }, [e._t("iconAfter")], 2) : e._e(), t.shouldDisplayStaticValueAtEnd ? o(t.BentoTypography, { staticClass: "b-input-field__static-value b-input-field__static-value--end", attrs: { id: t.staticValueId, el: "span", variant: "body" } }, [e._t("staticValue")], 2) : e._e(), t.shouldDisplayDropdownAtEnd ? o("div", { staticClass: "b-input-field__dropdown b-input-field__dropdown--end", attrs: { id: t.dropdownId }, on: { click: function(r) {
|
|
182
184
|
r.stopPropagation();
|
|
183
185
|
} } }, [e.dropdown ? o(t.BentoDropdown, e._b({ attrs: { id: t.dropdownId, size: t.BentoDropdownSize.SMALL, disabled: e.disabled, readonly: t.isReadOnly }, on: { input: t.onDropdownInput } }, "bento-dropdown", e.dropdown, !1)) : e._e()], 1) : e._e()], 1), t.shouldShowError && e.errorMessage ? o(t.ErrorMessage, { staticClass: "b-input-field__error-message", attrs: { id: t.errorId, "error-message": e.errorMessage } }) : e._e(), t.hasSlot("description") ? o("span", { staticClass: "b-input-field__description", attrs: { id: t.descriptionId }, on: { click: t.focusInput } }, [o(t.BentoTypography, { attrs: { el: "span", variant: "body" } }, [e._t("description", null, { id: "description" })], 2)], 1) : e._e()], 1);
|
|
184
|
-
},
|
|
185
|
-
nt,
|
|
186
|
-
st,
|
|
186
|
+
}, lt = [], ut = /* @__PURE__ */ ot(
|
|
187
187
|
dt,
|
|
188
|
+
st,
|
|
189
|
+
lt,
|
|
188
190
|
!1,
|
|
189
191
|
null,
|
|
190
|
-
"
|
|
192
|
+
"e57fca96",
|
|
191
193
|
null,
|
|
192
194
|
null
|
|
193
195
|
);
|
|
194
|
-
const
|
|
196
|
+
const St = ut.exports;
|
|
195
197
|
export {
|
|
196
|
-
|
|
198
|
+
St as BentoInputField,
|
|
197
199
|
n as BentoInputFieldElementPosition,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
rt as BentoInputFieldEvent,
|
|
201
|
+
s as BentoInputFieldStateClass,
|
|
202
|
+
m as BentoInputFieldType,
|
|
203
|
+
d as BentoInputFieldVariant
|
|
202
204
|
};
|
|
203
205
|
//# sourceMappingURL=input-field.js.map
|
package/dist/input-field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-field.js","sources":["../src/components/input-field/input-field.types.ts","../src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n SMALL_PADDING_LEFT = 'small-padding-left',\n SMALL_PADDING_RIGHT = 'small-padding-right',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\n value: DropdownProps['value'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <!-- Label -->\n <label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n class=\"b-input-field__label\"\n data-testid=\"input-field-label\"\n @click=\"focusInput\"\n >\n <bento-typography el=\"span\" variant=\"body\" stronger>\n <slot></slot>\n </bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-input-field__label-requirement\" el=\"span\">\n ({{ t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-input-field__label-requirement\" el=\"span\">\n ({{ t('required') }})\n </bento-typography>\n </label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && hasSlot('defaultIconBefore')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__default-icon-before\"\n >\n <slot name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n v-bind=\"dropdown\"\n :size=\"BentoDropdownSize.SMALL\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @keydown=\"emit('keydown', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n v-bind=\"dropdown\"\n :size=\"BentoDropdownSize.SMALL\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage } from '@/components/internal/error-message';\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n import { BentoDropdownSize } from '../dropdown/dropdown.types';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoListboxSelectedValue } from '@/types';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { deprecate } from '@/utils/ts/deprecate';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * @see BentoDropdown\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * A string specifying the type of control to render.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}`>,\n default: BentoInputFieldType.TEXT,\n validator: (value: BentoInputFieldType) => Object.values(BentoInputFieldType).includes(value),\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the Input Field's internal dropdown changes it's value. Contains every dropdown prop passed with the updated selected value as 'value'\n */\n (e: 'update:dropdown', updatedDropdownProps: BentoInputDropdownProps): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: 'change'): void;\n\n /**\n * Emitted when the Input Field's internal dropdown changes it's value\n */\n (e: 'dropdown-input', selectedValue: BentoListboxSelectedValue): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emitted when a key is pressed\n */\n (e: 'keydown', event: KeyboardEvent): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: 'input', inputValue: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default') ? (getSlotText(slots)('default') as string) : t('ariaLabelFallback'),\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--${BentoInputFieldStateClass.SMALL_PADDING_LEFT}`]: shouldDisplayDropdownAtStart.value,\n [`b-input-field--${BentoInputFieldStateClass.SMALL_PADDING_RIGHT}`]: shouldDisplayDropdownAtEnd.value,\n }));\n\n const onInput = (event: Event) => {\n if (!props.disabled && !isReadOnly.value) {\n emit('input', (event.target as HTMLInputElement).value);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n });\n\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","onInput","event","emit","onDropdownInput","selectedValue","focusInput","expose","deprecate"],"mappings":";;;;;;;;;;;;AAKY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,UAAA,WACAA,EAAA,iBAAA,kBACAA,EAAA,eAAA,gBACAA,EAAA,WAAA,YAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,QAAA,SACAA,EAAA,MAAA,OAFQA,IAAAD,KAAA,CAAA,CAAA,GAKAE,IAAA,kBAAAC,OACRA,EAAA,YAAA,aACAA,EAAA,WAAA,YACAA,EAAA,WAAA,YACAA,EAAA,QA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BAAArC,EAAA,oBAAA,GAAAmC,EAAA;AAAA,MAC0B,CAAA,kBAAAnC,EAAA,qBAAA,GAAAoC,EAAA;AAAA,IACD,EAAA,GAGpGW,IAAA,CAAAC,MAAA;AACI,MAAA,CAAArB,EAAA,YAAA,CAAAH,EAAA,SACIyB,EAAA,SAAAD,EAAA,OAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,kBAAAE,CAAA,GACAF,EAAA,mBAAA,EAAA,GAAAtB,KAAA,gBAAAA,EAAA,UAAA,OAAAwB,EAAA,CAAA;AAAA,IAAoE,GAGxEC,IAAA,MAAA;AACI,MAAApC,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAqC,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAGJzB,EAAA,SACI2B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"input-field.js","sources":["../src/components/input-field/input-field.types.ts","../src/components/input-field/input-field.vue"],"sourcesContent":["import { BentoDropdown } from '@/components/dropdown/';\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldVariant {\n DEFAULT = 'default',\n PAYMENT_METHOD = 'payment-method',\n STATIC_VALUE = 'static-value',\n DROPDOWN = 'dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldElementPosition {\n START = 'start',\n END = 'end',\n}\n\nexport enum BentoInputFieldStateClass {\n CONDENSED = 'condensed',\n DISABLED = 'disabled',\n READONLY = 'readonly',\n ERROR = 'error',\n SMALL_PADDING_LEFT = 'small-padding-left',\n SMALL_PADDING_RIGHT = 'small-padding-right',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoInputFieldType {\n SEARCH = 'search',\n TEXT = 'text',\n NUMBER = 'number',\n}\n\nexport type BentoInputFieldValue = string | number;\n\ntype DropdownProps = InstanceType<typeof BentoDropdown>['$props'];\nexport type BentoInputDropdownProps = {\n items: DropdownProps['items'];\n value: DropdownProps['value'];\n};\n\n/**\n * @deprecated The use of these enums is no longer supported.\n * Use `v-on:` or `@` to listen to the events being emitted.\n * This enum will be removed in 2.0.\n */\nexport enum BentoInputFieldEvent {\n INPUT = 'input',\n ESCAPE_PRESSED = 'escape-pressed',\n UPDATE_DROPDOWN = 'update:dropdown',\n DROPDOWN_INPUT = 'dropdown-input',\n FOCUS = 'focus',\n CHANGE = 'change',\n BLUR = 'blur',\n KEYDOWN = 'keydown',\n}\n","<template>\n <bento-typography\n class=\"b-input-field\"\n data-testid=\"input-text-container\"\n :class=\"inputFieldConditionalClasses\"\n el=\"div\"\n variant=\"body\"\n >\n <field-label\n v-if=\"hasSlot('default')\"\n :for=\"inputFieldId\"\n data-testid=\"input-field-label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n @click=\"focusInput\"\n >\n <slot></slot>\n </field-label>\n\n <div class=\"b-input-field__input-box\" data-testid=\"input-box\" :aria-disabled=\"disabled\" @click=\"focusInput\">\n <!-- Optional Icon for Default text variant -->\n <span\n v-if=\"isDefaultVariant && hasSlot('defaultIconBefore')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__default-icon-before\"\n >\n <slot name=\"defaultIconBefore\" />\n </span>\n\n <!-- Mandatory Icon for Payment Method variant -->\n <span\n v-if=\"isPaymentMethodVariant && hasSlot('paymentMethod')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__payment-method\"\n >\n <slot name=\"paymentMethod\" />\n </span>\n\n <!-- Dropdown at start -->\n <div\n v-if=\"shouldDisplayDropdownAtStart\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--start\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n v-bind=\"dropdown\"\n :size=\"BentoDropdownSize.SMALL\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n\n <!-- Static Value at start -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtStart\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--start\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <input\n :id=\"inputFieldId\"\n v-bind=\"attrs\"\n ref=\"inputFieldElement\"\n class=\"b-input-field__input\"\n :aria-label=\"computedAriaLabel\"\n :aria-describedby=\"computedAriaDescribedBy\"\n :aria-owns=\"computedAriaOwns\"\n :aria-invalid=\"shouldShowError\"\n :placeholder=\"placeholder\"\n :type=\"type\"\n :value=\"value\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onInput\"\n @change=\"emit('change')\"\n @focus=\"emit('focus')\"\n @blur=\"emit('blur')\"\n @keydown=\"emit('keydown', $event)\"\n @keydown.esc=\"emit('escape-pressed')\"\n />\n <span\n v-if=\"hasSlot('iconAfter')\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-after\"\n data-testid=\"input-text__icon-after\"\n >\n <slot name=\"iconAfter\" />\n </span>\n\n <!-- Static Value at the end -->\n <bento-typography\n v-if=\"shouldDisplayStaticValueAtEnd\"\n :id=\"staticValueId\"\n class=\"b-input-field__static-value b-input-field__static-value--end\"\n el=\"span\"\n variant=\"body\"\n >\n <slot name=\"staticValue\" />\n </bento-typography>\n\n <!-- Dropdown at end -->\n <div\n v-if=\"shouldDisplayDropdownAtEnd\"\n :id=\"dropdownId\"\n class=\"b-input-field__dropdown b-input-field__dropdown--end\"\n @click.stop\n >\n <bento-dropdown\n v-if=\"dropdown\"\n :id=\"dropdownId\"\n v-bind=\"dropdown\"\n :size=\"BentoDropdownSize.SMALL\"\n :disabled=\"disabled\"\n :readonly=\"isReadOnly\"\n @input=\"onDropdownInput\"\n />\n </div>\n </div>\n\n <error-message\n v-if=\"shouldShowError && !!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-input-field__error-message\"\n />\n\n <span v-if=\"hasSlot('description')\" :id=\"descriptionId\" class=\"b-input-field__description\" @click=\"focusInput\">\n <bento-typography el=\"span\" variant=\"body\">\n <slot id=\"description\" name=\"description\" />\n </bento-typography>\n </span>\n </bento-typography>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, PropType, ref, toRef, toRefs, useAttrs, useSlots } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoTypography } from '@/components/typography';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { deprecate } from '@/utils/ts/deprecate';\n import { generateUid } from '@/utils/ts/unique-id';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useI18n } from '@/utils/ts/i18n';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // Types\n import { BentoDropdownSize } from '../dropdown/dropdown.types';\n import {\n BentoInputDropdownProps,\n BentoInputFieldElementPosition,\n BentoInputFieldStateClass,\n BentoInputFieldType,\n BentoInputFieldValue,\n BentoInputFieldVariant,\n } from './input-field.types';\n import { BentoListboxSelectedValue } from '@/types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const attrs = useAttrs();\n const slots = useSlots();\n\n const props = defineProps({\n /**\n * Indicates whether the element is exposed to an accessibility API.\n */\n ariaHidden: { type: Boolean, default: true },\n\n /**\n * @deprecated from version 2.0.0. Use the aria-label attribute instead.\n */\n /**\n * Text that labels an the input element\n */\n ariaLabel: { type: String, default: undefined },\n\n /**\n * Reduces height of the input\n */\n condensed: { type: Boolean, default: false },\n\n /**\n * Disables the possibility of changing value in the input-field\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Dropdown props for the small selectable dropdown menu.\n * @see BentoDropdown\n */\n dropdown: {\n type: Object as PropType<BentoInputDropdownProps>,\n default: undefined,\n },\n\n /**\n * Position of the dropdown before or after input value\n */\n dropdownPosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds error validation class for outlining input-field.\n *\n * @deprecated Use \"errorMessage\" prop instead\n */\n error: { type: Boolean, default: false },\n\n /**\n * Renders input-field with an error state and the error message beneath the input box\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * Text displayed as the placeholder of the input-field\n */\n placeholder: { type: String, default: '' },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Setting this property to true will set the input field to read only state.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Static text that displayed before or after input value\n * Applicable to the Static Value variant\n */\n staticValue: { type: String, default: '' },\n\n /**\n * Position of Static Value before or after input value\n */\n staticValuePosition: {\n type: String as PropType<BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`>,\n default: BentoInputFieldElementPosition.START,\n validator: (value: BentoInputFieldElementPosition) =>\n Object.values(BentoInputFieldElementPosition).includes(value),\n },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * A string specifying the type of control to render.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}`>,\n default: BentoInputFieldType.TEXT,\n validator: (value: BentoInputFieldType) => Object.values(BentoInputFieldType).includes(value),\n },\n\n /**\n * Text displayed as the value of the input-field\n */\n value: { type: [String, Number] as PropType<BentoInputFieldValue>, default: undefined },\n\n /**\n * Describes the different variants for the input element\n */\n variant: {\n type: String as PropType<BentoInputFieldVariant | `${BentoInputFieldVariant}`>,\n default: BentoInputFieldVariant.DEFAULT,\n validator: (value: BentoInputFieldVariant) => Object.values(BentoInputFieldVariant).includes(value),\n },\n });\n\n const emit = defineEmits<{\n /**\n * Emitted when the Input Field's internal dropdown changes it's value. Contains every dropdown prop passed with the updated selected value as 'value'\n */\n (e: 'update:dropdown', updatedDropdownProps: BentoInputDropdownProps): void;\n\n /**\n * Emitted when the element has lost focus\n */\n (e: 'blur'): void;\n\n /**\n * Emitted when the user modifies the element's value. Unlike the 'input' event, the change event is not necessarily fired for each alteration to an element's value\n */\n (e: 'change'): void;\n\n /**\n * Emitted when the Input Field's internal dropdown changes it's value\n */\n (e: 'dropdown-input', selectedValue: BentoListboxSelectedValue): void;\n\n /**\n * Emitted when the \"ESC\" key is pressed\n */\n (e: 'escape-pressed'): void;\n\n /**\n * Emitted when the element has received focus\n */\n (e: 'focus'): void;\n\n /**\n * Emitted when a key is pressed\n */\n (e: 'keydown', event: KeyboardEvent): void;\n\n /**\n * Emitted when the component's model changes\n */\n (e: 'input', inputValue: string): void;\n }>();\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const inputFieldElement = ref(null);\n const inputFieldId = generateUid('input');\n const dropdownId = generateUid('input-dropdown');\n const staticValueId = generateUid('input-static-value');\n const descriptionId = generateUid('input-description');\n const errorId = generateUid('input-error');\n\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n const shouldShowStaticValue = computed(\n () => props.variant === BentoInputFieldVariant.STATIC_VALUE && !!slots.staticValue\n );\n\n const isDefaultVariant = computed(() => props.variant === BentoInputFieldVariant.DEFAULT);\n\n const isPaymentMethodVariant = computed(() => props.variant === BentoInputFieldVariant.PAYMENT_METHOD);\n\n const shouldDisplayStaticValueAtStart = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayStaticValueAtEnd = computed(\n () => shouldShowStaticValue.value && props.staticValuePosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowDropdown = computed(() => props.variant === BentoInputFieldVariant.DROPDOWN && !!props.dropdown);\n const shouldDisplayDropdownAtStart = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.START\n );\n const shouldDisplayDropdownAtEnd = computed(\n () => shouldShowDropdown.value && props.dropdownPosition === BentoInputFieldElementPosition.END\n );\n\n const shouldShowError = computed(\n () => !props.disabled && !isReadOnly.value && (!!props.errorMessage || props.error)\n );\n\n const computedAriaOwns = computed(() => {\n if (shouldShowDropdown.value === true && shouldShowStaticValue.value === true) {\n return `${staticValueId} ${dropdownId}`;\n }\n if (shouldShowDropdown.value === true) {\n return `${dropdownId}`;\n }\n if (shouldShowStaticValue.value === true) {\n return `${staticValueId}`;\n }\n return null;\n });\n\n const ariaLabelAttribute = ref(attrs['aria-label']);\n const { ariaLabel } = toRefs(props);\n const computedAriaLabel = useAriaLabel({\n ariaLabel: ariaLabelAttribute.value as string,\n // TODO: take this line away when the aria-label props is removed\n label: ariaLabel,\n defaultFallback: hasSlot('default') ? (getSlotText(slots)('default') as string) : t('ariaLabelFallback'),\n });\n\n const computedAriaDescribedBy = computed(\n () =>\n `${hasSlot('description') ? descriptionId : ''} ${\n shouldShowError.value && !!props.errorMessage ? errorId : ''\n }`\n );\n\n const inputFieldConditionalClasses = computed(() => ({\n [`b-input-field--${BentoInputFieldStateClass.CONDENSED}`]: props.condensed,\n [`b-input-field--${BentoInputFieldStateClass.DISABLED}`]: props.disabled,\n [`b-input-field--${BentoInputFieldStateClass.READONLY}`]: isReadOnly.value,\n [`b-input-field--${BentoInputFieldStateClass.ERROR}`]: shouldShowError.value,\n [`b-input-field--${BentoInputFieldStateClass.SMALL_PADDING_LEFT}`]: shouldDisplayDropdownAtStart.value,\n [`b-input-field--${BentoInputFieldStateClass.SMALL_PADDING_RIGHT}`]: shouldDisplayDropdownAtEnd.value,\n }));\n\n const onInput = (event: Event) => {\n if (!props.disabled && !isReadOnly.value) {\n emit('input', (event.target as HTMLInputElement).value);\n }\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n emit('dropdown-input', selectedValue);\n emit('update:dropdown', { ...props?.dropdown, value: selectedValue });\n };\n\n const focusInput = () => {\n inputFieldElement.value.focus();\n };\n\n // Expose method so that other components can focus on it in Vue3\n defineExpose({\n focusInput,\n });\n\n if (props.error) {\n deprecate(\n 'BentoInputField \"error\" property',\n `Use the BentoInputField \"errorMessage\" property instead to indicate that there is a modifier error.\n Having the field as \"undefined\" will hide/remove the error.\n <bento-dropdown errorMessage=\"Error message text\" />`,\n '2.0.0'\n );\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Input field component is used to create interactive controls for web-based\n * forms in order to accept data from the user.\n *\n * @example\n * import { BentoInputField } from '@adyen/bento-vue2'\n *\n * const inputValue = ref('');\n *\n * export default {\n * components: { BentoInputField },\n * tempate: `\n * <bento-input-field\n * :value=\"inputValue\"\n * :input=\"newValue => inputValue.value = newValue\"\n * >\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-field.scss\" />\n"],"names":["BentoInputFieldVariant","BentoInputFieldVariant2","BentoInputFieldElementPosition","BentoInputFieldElementPosition2","BentoInputFieldStateClass","BentoInputFieldStateClass2","BentoInputFieldType","BentoInputFieldType2","BentoInputFieldEvent","BentoInputFieldEvent2","__default__","messages","attrs","useAttrs","slots","useSlots","t","useI18n","hasSlot","useHasSlot","inputFieldElement","ref","inputFieldId","generateUid","dropdownId","staticValueId","descriptionId","errorId","isReadOnly","useFormLayoutFieldLoading","toRef","props","shouldShowStaticValue","computed","isDefaultVariant","isPaymentMethodVariant","shouldDisplayStaticValueAtStart","shouldDisplayStaticValueAtEnd","shouldShowDropdown","shouldDisplayDropdownAtStart","shouldDisplayDropdownAtEnd","shouldShowError","computedAriaOwns","ariaLabelAttribute","ariaLabel","toRefs","computedAriaLabel","useAriaLabel","getSlotText","computedAriaDescribedBy","inputFieldConditionalClasses","onInput","event","emit","onDropd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A,MAAgC,MAAA,GAAAf,EAAA,aAAA,IAAAQ,IAAA,MAAAe,EAAA,SAAAV,EAAA,eAAAJ,IAAA;AAAA,IAGsC,GAItEuB,IAAAjB,EAAA,OAAA;AAAA,MAAqD,CAAA,kBAAA7B,EAAA,WAAA,GAAA2B,EAAA;AAAA,MACgB,CAAA,kBAAA3B,EAAA,UAAA,GAAA2B,EAAA;AAAA,MACD,CAAA,kBAAA3B,EAAA,UAAA,GAAAwB,EAAA;AAAA,MACK,CAAA,kBAAAxB,EAAA,OAAA,GAAAqC,EAAA;AAAA,MACE,CAAA,kBAAArC,EAAA,oBAAA,GAAAmC,EAAA;AAAA,MAC0B,CAAA,kBAAAnC,EAAA,qBAAA,GAAAoC,EAAA;AAAA,IACD,EAAA,GAGpGW,IAAA,CAAAC,MAAA;AACI,MAAA,CAAArB,EAAA,YAAA,CAAAH,EAAA,SACIyB,EAAA,SAAAD,EAAA,OAAA,KAAA;AAAA,IACJ,GAGJE,IAAA,CAAAC,MAAA;AACI,MAAAF,EAAA,kBAAAE,CAAA,GACAF,EAAA,mBAAA,EAAA,GAAAtB,KAAA,gBAAAA,EAAA,UAAA,OAAAwB,EAAA,CAAA;AAAA,IAAoE,GAGxEC,IAAA,MAAA;AACI,MAAApC,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAqC,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAGJzB,EAAA,SACI2B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/internal.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { C as s, a as p, b as x } from "./chunks/calendar.
|
|
3
|
-
import { C as f } from "./chunks/copy.
|
|
4
|
-
import { C
|
|
5
|
-
import { E as d } from "./chunks/
|
|
1
|
+
import { B as o, L as e } from "./chunks/listbox-option-tag.97af47fc.js";
|
|
2
|
+
import { C as s, a as p, b as x } from "./chunks/calendar.47e9e755.js";
|
|
3
|
+
import { C as f } from "./chunks/copy.a85c2e9f.js";
|
|
4
|
+
import { C } from "./chunks/controls-group.6c5bfccd.js";
|
|
5
|
+
import { E as m, F as d } from "./chunks/field-label.330edb60.js";
|
|
6
6
|
import { F as y } from "./chunks/fixed-scroller.8994e30a.js";
|
|
7
|
-
import { G as
|
|
8
|
-
import { B as u } from "./chunks/listbox.
|
|
7
|
+
import { G as b, a as B } from "./chunks/grid-layout.a806acb2.js";
|
|
8
|
+
import { B as u } from "./chunks/listbox.d039b178.js";
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
o as BentoAvatar,
|
|
11
11
|
u as BentoListbox,
|
|
12
12
|
s as Calendar,
|
|
13
13
|
p as CalendarEvent,
|
|
14
14
|
x as CalendarFirstDayOfWeek,
|
|
15
|
-
|
|
15
|
+
C as ControlsGroup,
|
|
16
16
|
f as Copy,
|
|
17
|
-
|
|
17
|
+
m as ErrorMessage,
|
|
18
|
+
d as FieldLabel,
|
|
18
19
|
y as FixedScroller,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
b as GridLayout,
|
|
21
|
+
B as GridLayoutContainerType,
|
|
21
22
|
e as ListboxOptionTag
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=internal.js.map
|
package/dist/link.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineComponent as c, computed as p, useAttrs as _ } from "vue";
|
|
|
2
2
|
import { RouterLink as u } from "vue-router";
|
|
3
3
|
import { B as f } from "./chunks/index.965ac1af.js";
|
|
4
4
|
import { n as d } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
5
|
-
import "./assets/
|
|
5
|
+
import "./assets/index34.css";
|
|
6
6
|
var a = /* @__PURE__ */ ((s) => (s.DEFAULT = "default", s.QUIET = "quiet", s))(a || {});
|
|
7
7
|
const k = {
|
|
8
8
|
name: "bento-link",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as t, onMounted as s, onUnmounted as l, computed as i } from "vue";
|
|
2
2
|
import { n as r } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
3
|
-
import "./assets/
|
|
3
|
+
import "./assets/index35.css";
|
|
4
4
|
var a = /* @__PURE__ */ ((n) => (n.START = "loading-start", n.END = "loading-end", n))(a || {});
|
|
5
5
|
const d = t({
|
|
6
6
|
name: "bento-loading-indicator",
|
package/dist/menu.js
CHANGED
package/dist/modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, onMounted as C, toRefs as M, computed as f, useAttrs as h, watch as E } from "vue";
|
|
2
|
-
import { f as A, b as p, e as r, d as u, c as w, B as y, a as B } from "./chunks/base-modal.
|
|
2
|
+
import { f as A, b as p, e as r, d as u, c as w, B as y, a as B } from "./chunks/base-modal.31634fe8.js";
|
|
3
3
|
import { u as v } from "./chunks/use-has-slot.6052d56a.js";
|
|
4
4
|
import { F as x } from "./chunks/footer-actions.c9b2cb74.js";
|
|
5
5
|
import { n as b } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
@@ -321,7 +321,7 @@ const G = j.exports, U = 500, K = _({
|
|
|
321
321
|
},
|
|
322
322
|
// Shared Modal Default and Modal Default props
|
|
323
323
|
/**
|
|
324
|
-
* If set to true, it allows the modal to be closed
|
|
324
|
+
* If set to true, it allows the modal to be closed without performing an action
|
|
325
325
|
*/
|
|
326
326
|
isDismissible: {
|
|
327
327
|
type: Boolean,
|
package/dist/modal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, onMounted, PropType } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, FooterActions },\n props: {\n /**\n * Adds a cross icon on the right side of the alert\n */\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n\n return {\n // Methods\n onCloseModal,\n hasSlot,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\"></bento-button-actions>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import { BentoModalDialogType, BentoModalEvent, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n props: {\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n /**\n * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const onCloseActionButton = () => {\n onCloseModal();\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n\n return {\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const attrs = useAttrs();\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n return {\n onCloseModal,\n customProps,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["_sfc_main$2","defineComponent","BaseModal","FooterActions","BentoModalColumnLayoutVariant","BentoModalEvent","props","slots","emit","hasSlot","useHasSlot","onCloseModal","onMounted","_sfc_main$1","messages","BentoButtonActions","t","useI18n","actions","dialogType","toRefs","onCloseActionButton","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalRole","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","BentoModalDefault","BentoModalDialog","BentoModalVariant","value","BentoModalSize","attrs","useAttrs","customProps","watch"],"mappings":";;;;;;;;AA0CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,eAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IAC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;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../src/components/modal/components/modal-default/modal-default.vue","../src/components/modal/components/modal-dialog/modal-dialog.vue","../src/components/modal/modal.vue"],"sourcesContent":["<template>\n <base-modal\n class=\"b-modal-default\"\n v-bind=\"$attrs\"\n :actions=\"actions\"\n :size=\"size\"\n :hide-close-button=\"hideCloseButton\"\n :custom-padding=\"customPadding\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :with-column-layout=\"withColumnLayout\"\n :initially-open=\"initiallyOpen\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template #content><slot name=\"content\"></slot></template>\n\n <template v-if=\"actions\" #actions>\n <slot name=\"actions\">\n <footer-actions\n :actions=\"actions\"\n :actions-label=\"actionsLabel\"\n :destructive-actions=\"destructiveActions\"\n />\n </slot>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, onMounted, PropType } from 'vue';\n import { BentoModalColumnLayoutVariant, BentoModalEvent, BentoModalSize } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n import { FooterActions } from '@/components/internal/footer-actions';\n\n export default defineComponent({\n name: 'bento-modal-default',\n components: { BaseModal, FooterActions },\n props: {\n /**\n * Adds a cross icon on the right side of the alert\n */\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n required: true,\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n * But you may change the color of 1-st action to red with 'critial' key\n * Not more than 3 action buttons can be provided\n * Or 2 action buttons and 1 Label for them\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const hasSlot = useHasSlot(slots);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n onMounted(() => {\n if (!(hasSlot('content') || (hasSlot('content-col-1') && hasSlot('content-col-2')))) {\n throw new Error('Bento Modal default variant requires content slot or column slots');\n }\n });\n\n return {\n // Methods\n onCloseModal,\n hasSlot,\n };\n },\n });\n</script>\n","<template>\n <base-modal\n class=\"b-modal-dialog\"\n :actions=\"actions\"\n :class=\"modalDialogConditionalClasses\"\n :hide-close-button=\"true\"\n size=\"small\"\n :is-dismissible=\"isDismissible\"\n :is-open=\"isOpen\"\n :overflow-visible=\"overflowVisible\"\n :modal-role=\"BentoModalRole.ALERT_DIALOG\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"$attrs\"\n @close-modal=\"onCloseModal\"\n >\n <template #default>\n <slot></slot>\n </template>\n <template #content>\n {{ content }}\n </template>\n\n <template #actions>\n <bento-button-actions\n v-if=\"dialogType === 'acknowledgement'\"\n :actions=\"acknowledgementDialogActions\"\n layout=\"buttons-end\"\n ></bento-button-actions>\n\n <bento-button-actions v-else :actions=\"dialogActions\" layout=\"buttons-end\"></bento-button-actions>\n </template>\n </base-modal>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, toRefs } from 'vue';\n import { BentoModalDialogType, BentoModalEvent, BentoModalRole } from '@/components/modal/modal.types';\n import { BaseModal } from '@/components/modal/components/base-modal';\n import { useHasSlot } from '@/composables';\n import {\n BentoButtonActionObject,\n BentoButtonActions,\n BentoButtonActionsList,\n BentoButtonVariant,\n } from '@/components/button';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n export default defineComponent({\n i18n: { messages },\n name: 'bento-modal-dialog',\n components: { BaseModal, BentoButtonActions },\n props: {\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it allows the modal to be closed by clicking outside of it\n */\n isDismissible: {\n type: Boolean,\n required: true,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets different action buttons styling and appearance\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n required: true,\n },\n /**\n * Text that is displayed in the content section of modal\n */\n content: {\n type: String,\n required: true,\n },\n /**\n * List of actions that will be used to render the buttons.\n * Only 1 action button is allowed for Modal Dialog\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const hasSlot = useHasSlot(slots);\n const { actions, dialogType } = toRefs(props);\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n const onCloseActionButton = () => {\n onCloseModal();\n };\n\n const acknowledgementDialogActions = computed(() => [\n {\n title: t('okButtonText') as string,\n event: onCloseActionButton,\n variant: BentoButtonVariant.SECONDARY,\n },\n ]);\n\n const dialogActions = computed(() => {\n const mandatoryCancelActionButton: BentoButtonActionObject = {\n title: 'Cancel',\n event: onCloseActionButton,\n };\n const updatedPassedActionsObject: BentoButtonActionObject = actions?.value?.[0];\n\n if (dialogType.value === BentoModalDialogType.DESTRUCTIVE) {\n updatedPassedActionsObject.critical = true;\n } else if (dialogType.value === BentoModalDialogType.INFO) {\n updatedPassedActionsObject.variant = BentoButtonVariant.SECONDARY;\n }\n\n return [updatedPassedActionsObject, mandatoryCancelActionButton];\n });\n\n const modalDialogConditionalClasses = computed(() => ({\n [`b-modal-dialog--${dialogType.value}`]: dialogType.value,\n }));\n\n onMounted(() => {\n if (!hasSlot('default') || (!props.content && !hasSlot('content'))) {\n throw new Error('Bento Modal Dialog requires header title and content');\n }\n\n if (actions?.value?.length > 1) {\n throw new Error('Not more than 1 action button may be provided to Modal Dialog');\n }\n\n if (dialogType.value !== BentoModalDialogType.ACKNOWLEDGEMENT && !actions?.value) {\n throw new Error(\n 'Modal Dialog, except ACKNOWLEDGEMENT type, always has to contain one action button'\n );\n }\n\n if (dialogType.value === BentoModalDialogType.ACKNOWLEDGEMENT && actions?.value?.length) {\n throw new Error('Acknowledgement Modal Dialog does not accept action buttons');\n }\n });\n\n return {\n // Values\n dialogActions,\n acknowledgementDialogActions,\n\n // Methods\n onCloseModal,\n onCloseActionButton,\n\n // Styles\n modalDialogConditionalClasses,\n\n // Enums\n BentoModalRole,\n };\n },\n });\n</script>\n","<template>\n <component\n :is=\"variant\"\n class=\"b-modal\"\n :is-open=\"isOpen\"\n :actions=\"actions\"\n :initially-open=\"initiallyOpen\"\n v-bind=\"customProps\"\n @close-modal=\"onCloseModal\"\n >\n <template v-if=\"hasSlot('default')\" #default>\n <slot></slot>\n </template>\n <template v-if=\"hasSlot('content-col-1')\" #content-col-1><slot name=\"content-col-1\"></slot></template>\n <template v-if=\"hasSlot('content-col-2')\" #content-col-2><slot name=\"content-col-2\"></slot></template>\n <template v-if=\"hasSlot('content')\" #content><slot name=\"content\"></slot></template>\n </component>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, useAttrs, watch } from 'vue';\n import {\n BentoModalColumnLayoutVariant,\n BentoModalDialogType,\n BentoModalEvent,\n BentoModalSize,\n BentoModalVariant,\n } from '@/components/modal/modal.types';\n import { BentoModalDefault, BentoModalDialog } from '@/components/modal/components';\n import { useHasSlot } from '@/composables';\n import { BentoButtonActionsList } from '@/components/button';\n\n const LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME = 500;\n\n /**\n * Modal is a window that appear over any other page content and focus user attention exclusively on one task or piece of information at the moment.\n *\n * @example\n * import { BentoModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoModal },\n * template: `\n * <bento-modal :isOpen=\"true\">\n * Title of the Modal\n * <template #content>\n * Mandatory content slot\n * </template>\n * </bento-modal>\n * `\n * };\n */\n export default defineComponent({\n name: 'bento-modal',\n components: { BentoModalDefault, BentoModalDialog },\n props: {\n /**\n * Choose between default or dialog versions of modal\n */\n variant: {\n type: String as PropType<BentoModalVariant | `${BentoModalVariant}`>,\n default: BentoModalVariant.DEFAULT,\n validator: (value: BentoModalVariant) => Object.values(BentoModalVariant).includes(value),\n },\n\n // Shared Modal Default and Modal Default props\n /**\n * If set to true, it allows the modal to be closed without performing an action\n */\n isDismissible: {\n type: Boolean,\n default: null,\n },\n /**\n * If set to true, it will set overflow:visible to the modal, only recommended to be used with dropdown\n */\n overflowVisible: {\n type: Boolean,\n default: false,\n },\n /**\n * Controls the modal's state from the outside. Set it to true to open the modal\n */\n isOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the open attribute on the dialog element, use isOpen instead to toggle modal visbility.\n */\n initiallyOpen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * List of actions that will be used to render the buttons.\n * First element in the list will be rendered as \"primary\".\n * All elements after the first will be rendered as \"secondary\".\n *\n * Each object in the list should have a `title`, an `event` and\n * (optional) a Vue `icon` from the library `@adyen/ui-assets-icons-16`.\n *\n * `title`: Button's text.\n *\n * `event`: Event triggered when clicking the Button.\n *\n * `icon`: Vue Icon from the library `@adyen/ui-assets-icons-16`.\n *\n * ```\n * [{\n * title: 'Primary',2\n * event: () => { ... },\n * icon: FourPeopleIcon\n * }, {\n * title: 'Secondary',\n * event: () => { ... }\n * }]\n * ```\n */\n actions: {\n type: Array as PropType<BentoButtonActionsList>,\n default: null,\n },\n\n // Specific to Modal Default props\n /**\n * Hides a cross icon on the right side of the title\n */\n hideCloseButton: {\n type: Boolean,\n default: false,\n },\n /**\n * Sets the width of the modal\n */\n size: {\n type: String as PropType<BentoModalSize | `${BentoModalSize}`>,\n default: BentoModalSize.SMALL,\n validator: (value: BentoModalSize) => Object.values(BentoModalSize).includes(value),\n },\n /**\n * If provided, manages the padding of the whole modal container\n */\n customPadding: {\n type: String,\n default: null,\n },\n /**\n * If provided, renders the modal's content in a two-column layout an wth dividers separating its content\n */\n withColumnLayout: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If a column layout is provided, it renders the respective left column width variant. This can be smaller than the second column, the same size as the second column or bigger than the second column.\n */\n columnsSize: {\n type: String as PropType<BentoModalColumnLayoutVariant | `${BentoModalColumnLayoutVariant}`>,\n default: BentoModalColumnLayoutVariant.SMALLER,\n validator: (value: BentoModalColumnLayoutVariant) =>\n Object.values(BentoModalColumnLayoutVariant).includes(value),\n },\n\n /**\n * Text label that is displayed left to the action buttons\n */\n actionsLabel: {\n type: String,\n default: null,\n },\n /**\n * If passed - sets first button color to red\n */\n destructiveActions: {\n type: Boolean,\n default: false,\n },\n\n // Specific to Modal dialog props\n /**\n * Changes the visual styling of action buttons\n */\n dialogType: {\n type: String as PropType<BentoModalDialogType | `${BentoModalDialogType}`>,\n default: BentoModalDialogType.CONFIRMATION,\n validator: (value: BentoModalDialogType) => Object.values(BentoModalDialogType).includes(value),\n },\n /**\n * Text that will be displayed in the content section of Modal\n */\n content: {\n type: String,\n default: null,\n },\n },\n emits: [BentoModalEvent.CLOSE_MODAL],\n setup(props, { slots, emit }) {\n const attrs = useAttrs();\n\n const customProps = computed(() =>\n props.variant === BentoModalVariant.DEFAULT\n ? {\n hideCloseButton: props.hideCloseButton,\n size: props.size,\n customPadding: props.customPadding,\n actionsLabel: props.actionsLabel,\n destructiveActions: props.destructiveActions,\n isDismissible: props.isDismissible ?? true,\n overflowVisible: props.overflowVisible,\n withColumnLayout: props.withColumnLayout,\n columnSize: props.columnsSize,\n ...attrs,\n }\n : {\n dialogType: props.dialogType,\n content: props.content,\n isDismissible: props.isDismissible ?? false,\n overflowVisible: props.overflowVisible,\n ...attrs,\n }\n );\n\n const onCloseModal = () => {\n emit(BentoModalEvent.CLOSE_MODAL);\n };\n\n // If the first button is a loading button then close the modal have 0.5 seconds\n // if the state is changed to 'success'.\n watch(\n () => props.actions,\n () => {\n if (props.actions?.[0]?.state === 'success') {\n setTimeout(onCloseModal, LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME);\n }\n }\n );\n\n return {\n onCloseModal,\n customProps,\n hasSlot: useHasSlot(slots),\n };\n },\n });\n</script>\n"],"names":["_sfc_main$2","defineComponent","BaseModal","FooterActions","BentoModalColumnLayoutVariant","BentoModalEvent","props","slots","emit","hasSlot","useHasSlot","onCloseModal","onMounted","_sfc_main$1","messages","BentoButtonActions","t","useI18n","actions","dialogType","toRefs","onCloseActionButton","acknowledgementDialogActions","computed","BentoButtonVariant","dialogActions","mandatoryCancelActionButton","updatedPassedActionsObject","_a","BentoModalDialogType","modalDialogConditionalClasses","_b","BentoModalRole","LOADING_BTN_CLOSE_AFTER_SUCCESS_DELAY_TIME","_sfc_main","BentoModalDefault","BentoModalDialog","BentoModalVariant","value","BentoModalSize","attrs","useAttrs","customProps","watch"],"mappings":";;;;;;;;AA0CA,MAAAA,IAAAC,EAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA,EAAA,WAAAC,GAAA,eAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,iBAAA;AAAA,MACA,MAAA;AAAA,M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;AACA,UAAAyB,KAAAH,IAAAtB,EAAA,YAAA,gBAAAsB,EAAA,OAAA,gBAAAG,EAAA,WAAA,aACA,WAAApB,GAAAsB,CAAA;AAAA,MAEA;AAAA,IAAA,GAGA;AAAA,MACA,cAAAtB;AAAA,MACA,aAAA+B;AAAA,MACA,SAAAhC,EAAAH,CAAA;AAAA,IAAA;AAAA,EAEA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/pagination.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as c, ref as C, computed as i, toRefs as w } from "vue";
|
|
2
2
|
import { u as N } from "./chunks/aria-label.ac9651a5.js";
|
|
3
3
|
import { B as P } from "./chunks/index.965ac1af.js";
|
|
4
|
-
import { B as b } from "./chunks/dropdown.
|
|
4
|
+
import { B as b } from "./chunks/dropdown.ce937989.js";
|
|
5
5
|
import { g as T } from "./chunks/unique-id.a2a2b458.js";
|
|
6
6
|
import { g as y, a as x } from "./chunks/i18n.155748d6.js";
|
|
7
7
|
import { n as r } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
8
|
import { a as S } from "./chunks/button.e09d5980.js";
|
|
9
|
-
import "./assets/
|
|
9
|
+
import "./assets/index38.css";
|
|
10
10
|
const L = {
|
|
11
11
|
"en-US": {
|
|
12
12
|
showingItems: "Showing {itemCount} items",
|