@adyen/bento-vue2 1.24.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/index.d.ts +484 -629
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +6 -6
- package/dist/alert.js +69 -104
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/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/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/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/index47.css +1 -1
- package/dist/assets/index48.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/{listbox.css → use-cached-selected-values.css} +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +83 -180
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +5 -5
- package/dist/chunks/{base-button.090f511d.js → base-button.ad74b6f8.js} +2 -2
- package/dist/chunks/{base-button.090f511d.js.map → base-button.ad74b6f8.js.map} +1 -1
- package/dist/chunks/{base-modal.aa09a60c.js → base-modal.1fff7abe.js} +6 -6
- package/dist/chunks/{base-modal.aa09a60c.js.map → base-modal.1fff7abe.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.879c4573.js → button-actions-with-menu.e845d77a.js} +4 -4
- package/dist/chunks/{button-actions-with-menu.879c4573.js.map → button-actions-with-menu.e845d77a.js.map} +1 -1
- package/dist/chunks/{button-actions.239456cb.js → button-actions.81db18e8.js} +3 -3
- package/dist/chunks/{button-actions.239456cb.js.map → button-actions.81db18e8.js.map} +1 -1
- package/dist/chunks/{button.6e6324f0.js → button.9d6435ae.js} +3 -3
- package/dist/chunks/{button.6e6324f0.js.map → button.9d6435ae.js.map} +1 -1
- package/dist/chunks/{calendar.1e416969.js → calendar.640b8d25.js} +4 -4
- package/dist/chunks/{calendar.1e416969.js.map → calendar.640b8d25.js.map} +1 -1
- package/dist/chunks/{checkbox.f38276e6.js → checkbox.bfed007c.js} +3 -3
- package/dist/chunks/{checkbox.f38276e6.js.map → checkbox.bfed007c.js.map} +1 -1
- package/dist/chunks/{controls-group.f1dfa419.js → controls-group.4fb50009.js} +3 -3
- package/dist/chunks/{controls-group.f1dfa419.js.map → controls-group.4fb50009.js.map} +1 -1
- package/dist/chunks/{copy.acc9f1b0.js → copy.f85700c6.js} +4 -4
- package/dist/chunks/{copy.acc9f1b0.js.map → copy.f85700c6.js.map} +1 -1
- package/dist/chunks/dialog-page.73da22cf.js +133 -0
- package/dist/chunks/dialog-page.73da22cf.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.c1f8fe5f.js → dropdown-default-textbox.54ca1b18.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.c1f8fe5f.js.map → dropdown-default-textbox.54ca1b18.js.map} +1 -1
- package/dist/chunks/dropdown.10c034aa.js +775 -0
- package/dist/chunks/dropdown.10c034aa.js.map +1 -0
- package/dist/chunks/{error-message.8734e591.js → error-message.31ec12b7.js} +2 -2
- package/dist/chunks/{error-message.8734e591.js.map → error-message.31ec12b7.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.772ad033.js → fixed-scroller.4eb9a9ac.js} +2 -2
- package/dist/chunks/{fixed-scroller.772ad033.js.map → fixed-scroller.4eb9a9ac.js.map} +1 -1
- package/dist/chunks/{footer-actions.11071f12.js → footer-actions.a1e09b4f.js} +4 -4
- package/dist/chunks/{footer-actions.11071f12.js.map → footer-actions.a1e09b4f.js.map} +1 -1
- package/dist/chunks/{index.5d5f2200.js → index.15b088b9.js} +6 -6
- package/dist/chunks/{index.5d5f2200.js.map → index.15b088b9.js.map} +1 -1
- package/dist/chunks/{index.87180cdd.js → index.1ea85d4a.js} +138 -119
- package/dist/chunks/index.1ea85d4a.js.map +1 -0
- package/dist/chunks/{index.8e6bc325.js → index.317fca12.js} +3 -3
- package/dist/chunks/{index.8e6bc325.js.map → index.317fca12.js.map} +1 -1
- package/dist/chunks/{index.51308a21.js → index.671768a1.js} +3 -3
- package/dist/chunks/{index.51308a21.js.map → index.671768a1.js.map} +1 -1
- package/dist/chunks/{index.49ce3f6a.js → index.7eefc59c.js} +3 -3
- package/dist/chunks/{index.49ce3f6a.js.map → index.7eefc59c.js.map} +1 -1
- package/dist/chunks/{index.f19887a1.js → index.885d05a9.js} +2 -2
- package/dist/chunks/{index.f19887a1.js.map → index.885d05a9.js.map} +1 -1
- package/dist/chunks/{index.73abb1a9.js → index.8b8c3b16.js} +9 -9
- package/dist/chunks/{index.73abb1a9.js.map → index.8b8c3b16.js.map} +1 -1
- package/dist/chunks/{index.ff09389c.js → index.aaf965f8.js} +6 -6
- package/dist/chunks/{index.ff09389c.js.map → index.aaf965f8.js.map} +1 -1
- package/dist/chunks/{index.03ae22b4.js → index.b21197ca.js} +2 -2
- package/dist/chunks/{index.03ae22b4.js.map → index.b21197ca.js.map} +1 -1
- package/dist/chunks/{index.94980f50.js → index.d553d3d1.js} +2 -2
- package/dist/chunks/{index.94980f50.js.map → index.d553d3d1.js.map} +1 -1
- package/dist/chunks/{index.ba6c1040.js → index.dd30e538.js} +3 -3
- package/dist/chunks/index.dd30e538.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.c0a56a95.js → listbox-option-tag.6bbb6bbe.js} +3 -3
- package/dist/chunks/{listbox-option-tag.c0a56a95.js.map → listbox-option-tag.6bbb6bbe.js.map} +1 -1
- package/dist/chunks/{loading-button.84a5529d.js → loading-button.eafc9e1b.js} +2 -2
- package/dist/chunks/{loading-button.84a5529d.js.map → loading-button.eafc9e1b.js.map} +1 -1
- package/dist/chunks/{payment-method.faa302de.js → payment-method.6c1ce07c.js} +2 -2
- package/dist/chunks/{payment-method.faa302de.js.map → payment-method.6c1ce07c.js.map} +1 -1
- package/dist/chunks/{tooltip.8e9d733c.js → tooltip.58ef3f4a.js} +3 -3
- package/dist/chunks/{tooltip.8e9d733c.js.map → tooltip.58ef3f4a.js.map} +1 -1
- package/dist/chunks/{use-bento-toast-controller.7d4436ad.js → use-bento-toast-controller.c3277f73.js} +2 -2
- package/dist/chunks/{use-bento-toast-controller.7d4436ad.js.map → use-bento-toast-controller.c3277f73.js.map} +1 -1
- package/dist/chunks/{listbox.e6e1bc90.js → use-cached-selected-values.69297473.js} +510 -448
- package/dist/chunks/use-cached-selected-values.69297473.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid-template.js +1 -1
- package/dist/data-grid.js +947 -885
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +8 -8
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +7 -7
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +1115 -955
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +15 -14
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +4 -4
- package/dist/index.js +177 -169
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +3 -3
- package/dist/input-field.js +31 -29
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +31 -78
- package/dist/internal.js.map +1 -1
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal-fullscreen.js +6 -6
- package/dist/modal.js +6 -6
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +62 -62
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +2 -2
- package/dist/selection-card.js +4 -4
- package/dist/sidepanel.js +52 -50
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +52 -52
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +7 -7
- package/dist/toast.js +4 -4
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +88 -67
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +550 -266
- package/package.json +3 -2
- package/dist/chunks/dialog-page.75b295b7.js +0 -133
- package/dist/chunks/dialog-page.75b295b7.js.map +0 -1
- package/dist/chunks/dropdown.669b858b.js +0 -797
- package/dist/chunks/dropdown.669b858b.js.map +0 -1
- package/dist/chunks/index.87180cdd.js.map +0 -1
- package/dist/chunks/index.ba6c1040.js.map +0 -1
- package/dist/chunks/listbox.e6e1bc90.js.map +0 -1
package/dist/input-field.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { I as
|
|
3
|
-
import { p as
|
|
1
|
+
import { defineComponent as W, useAttrs as Y, useSlots as j, ref as O, provide as q, toRef as K, computed as i, toRefs as X } from "vue";
|
|
2
|
+
import { I as z, B as G } from "./chunks/dropdown.10c034aa.js";
|
|
3
|
+
import { p as I, d as R, B as J } from "./chunks/index.dd30e538.js";
|
|
4
4
|
import { g as u } from "./chunks/unique-id.a2a2b458.js";
|
|
5
5
|
import { g as Q } from "./chunks/get-slot-text.99c3d860.js";
|
|
6
6
|
import { u as Z } from "./chunks/aria-label.ac9651a5.js";
|
|
7
7
|
import { u as ee } from "./chunks/i18n.eb5b985b.js";
|
|
8
8
|
import { u as te } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
9
9
|
import { u as ae } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
10
|
-
import { E as oe, F as re } from "./chunks/error-message.
|
|
10
|
+
import { E as oe, F as re } from "./chunks/error-message.31ec12b7.js";
|
|
11
11
|
import { n as ie } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
12
|
-
import "./assets/
|
|
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 || {}), p = /* @__PURE__ */ ((a) => (a.CONDENSED = "condensed", a.DISABLED = "disabled", a.READONLY = "readonly", a.ERROR = "error", a))(p || {}),
|
|
12
|
+
import "./assets/index25.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 || {}), p = /* @__PURE__ */ ((a) => (a.CONDENSED = "condensed", a.DISABLED = "disabled", a.READONLY = "readonly", a.ERROR = "error", a))(p || {}), v = /* @__PURE__ */ ((a) => (a.SEARCH = "search", a.TEXT = "text", a.NUMBER = "number", a))(v || {}), ne = /* @__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))(ne || {});
|
|
14
14
|
const de = {
|
|
15
15
|
"en-US": {
|
|
16
16
|
ariaLabelFallback: "Input field"
|
|
17
17
|
}
|
|
18
18
|
}, se = {
|
|
19
19
|
i18n: { messages: de }
|
|
20
|
-
}, le = /* @__PURE__ */
|
|
20
|
+
}, le = /* @__PURE__ */ W({
|
|
21
21
|
...se,
|
|
22
22
|
__name: "input-field",
|
|
23
23
|
props: {
|
|
@@ -105,11 +105,13 @@ const de = {
|
|
|
105
105
|
tooltipText: { type: String, default: null },
|
|
106
106
|
/**
|
|
107
107
|
* A string specifying the type of control to render.
|
|
108
|
+
* All `input` types are available but only `search`, `text` and `number` are fully supported.
|
|
109
|
+
*
|
|
110
|
+
* If `type` is `search`, use `bento-search-bar` instead.
|
|
108
111
|
*/
|
|
109
112
|
type: {
|
|
110
113
|
type: String,
|
|
111
|
-
default:
|
|
112
|
-
validator: (a) => Object.values(h).includes(a)
|
|
114
|
+
default: v.TEXT
|
|
113
115
|
},
|
|
114
116
|
/**
|
|
115
117
|
* Text displayed as the value of the input-field
|
|
@@ -126,48 +128,48 @@ const de = {
|
|
|
126
128
|
},
|
|
127
129
|
emits: ["update:dropdown", "blur", "change", "dropdown-input", "escape-pressed", "focus", "keydown", "input"],
|
|
128
130
|
setup(a, { expose: t, emit: o }) {
|
|
129
|
-
const e = a, r =
|
|
130
|
-
|
|
131
|
-
const { isReadOnly: _ } = te(
|
|
131
|
+
const e = a, r = Y(), c = j(), { t: w } = ee(), f = ae(c), D = O(null), C = u("input"), y = u("input-dropdown"), m = u("input-static-value"), S = u("input-description"), g = u("input-error");
|
|
132
|
+
q(z, !0);
|
|
133
|
+
const { isReadOnly: _ } = te(K(e, "readonly")), s = i(
|
|
132
134
|
() => e.variant === d.STATIC_VALUE && !!c.staticValue
|
|
133
|
-
),
|
|
135
|
+
), N = i(() => e.variant === d.DEFAULT), L = i(() => e.variant === d.PAYMENT_METHOD), P = i(
|
|
134
136
|
() => s.value && e.staticValuePosition === n.START
|
|
135
|
-
),
|
|
137
|
+
), B = i(
|
|
136
138
|
() => s.value && e.staticValuePosition === n.END
|
|
137
|
-
), l = i(() => e.variant === d.DROPDOWN && !!e.dropdown),
|
|
139
|
+
), l = i(() => e.variant === d.DROPDOWN && !!e.dropdown), M = i(
|
|
138
140
|
() => l.value && e.dropdownPosition === n.START
|
|
139
|
-
),
|
|
141
|
+
), V = i(
|
|
140
142
|
() => l.value && e.dropdownPosition === n.END
|
|
141
|
-
),
|
|
143
|
+
), h = i(
|
|
142
144
|
() => !e.disabled && !_.value && (!!e.errorMessage || e.error)
|
|
143
|
-
),
|
|
145
|
+
), k = i(() => l.value === !0 && s.value === !0 ? `${m} ${y}` : l.value === !0 ? `${y}` : s.value === !0 ? `${m}` : null), E = O(r["aria-label"]), { ariaLabel: A } = X(e), U = Z({
|
|
144
146
|
ariaLabel: E.value,
|
|
145
147
|
// TODO: take this line away when the aria-label props is removed
|
|
146
148
|
label: A,
|
|
147
149
|
defaultFallback: f("default") ? Q(c)("default") : w("ariaLabelFallback")
|
|
148
|
-
}),
|
|
149
|
-
() => `${f("description") ? S : ""} ${
|
|
150
|
-
),
|
|
150
|
+
}), x = i(
|
|
151
|
+
() => `${f("description") ? S : ""} ${h.value && e.errorMessage ? g : ""}`
|
|
152
|
+
), F = i(() => ({
|
|
151
153
|
[`b-input-field--${p.CONDENSED}`]: e.condensed,
|
|
152
154
|
[`b-input-field--${p.DISABLED}`]: e.disabled,
|
|
153
155
|
[`b-input-field--${p.READONLY}`]: _.value,
|
|
154
|
-
[`b-input-field--${p.ERROR}`]:
|
|
155
|
-
})),
|
|
156
|
+
[`b-input-field--${p.ERROR}`]: h.value
|
|
157
|
+
})), $ = (b) => {
|
|
156
158
|
!e.disabled && !_.value && o("input", b.target.value);
|
|
157
|
-
},
|
|
159
|
+
}, H = (b) => {
|
|
158
160
|
o("dropdown-input", b), o("update:dropdown", { ...e == null ? void 0 : e.dropdown, value: b });
|
|
159
161
|
}, T = () => {
|
|
160
162
|
D.value.focus();
|
|
161
163
|
};
|
|
162
164
|
return t({
|
|
163
165
|
focusInput: T
|
|
164
|
-
}), e.dropdown && e.dropdown.dynamicFiltering &&
|
|
166
|
+
}), e.dropdown && e.dropdown.dynamicFiltering && I('"bento-input-field" dropdown does not support "dynamicFiltering"'), Object.values(v).includes(e.type) || I(`"bento-input-field" dropdown does not support the type ${e.type}`), e.error && R(
|
|
165
167
|
'BentoInputField "error" property',
|
|
166
168
|
`Use the BentoInputField "errorMessage" property instead to indicate that there is a modifier error.
|
|
167
169
|
Having the field as "undefined" will hide/remove the error.
|
|
168
170
|
<bento-dropdown errorMessage="Error message text" />`,
|
|
169
171
|
"2.0.0"
|
|
170
|
-
), f("defaultIconBefore") &&
|
|
172
|
+
), f("defaultIconBefore") && R(
|
|
171
173
|
'BentoInputField "defaultIconBefore" slot',
|
|
172
174
|
`Use the BentoInputField "iconBefore" slot instead to add an icon at the left side of the input field
|
|
173
175
|
<bento-input-field>
|
|
@@ -176,7 +178,7 @@ const de = {
|
|
|
176
178
|
</template>
|
|
177
179
|
</bento-input-field>`,
|
|
178
180
|
"2.0.0"
|
|
179
|
-
), { __sfc: !0, attrs: r, slots: c, props: e, emit: o, t: w, hasSlot: f, inputFieldElement: D, inputFieldId:
|
|
181
|
+
), { __sfc: !0, attrs: r, slots: c, props: e, emit: o, t: w, hasSlot: f, inputFieldElement: D, inputFieldId: C, dropdownId: y, staticValueId: m, descriptionId: S, errorId: g, isReadOnly: _, shouldShowStaticValue: s, isDefaultVariant: N, isPaymentMethodVariant: L, shouldDisplayStaticValueAtStart: P, shouldDisplayStaticValueAtEnd: B, shouldShowDropdown: l, shouldDisplayDropdownAtStart: M, shouldDisplayDropdownAtEnd: V, shouldShowError: h, computedAriaOwns: k, ariaLabelAttribute: E, ariaLabel: A, computedAriaLabel: U, computedAriaDescribedBy: x, inputFieldConditionalClasses: F, onInput: $, onDropdownInput: H, focusInput: T, BentoDropdown: G, BentoTypography: J, ErrorMessage: oe, FieldLabel: re };
|
|
180
182
|
}
|
|
181
183
|
});
|
|
182
184
|
var ue = function() {
|
|
@@ -202,7 +204,7 @@ var ue = function() {
|
|
|
202
204
|
pe,
|
|
203
205
|
!1,
|
|
204
206
|
null,
|
|
205
|
-
"
|
|
207
|
+
"ab2ed9b8",
|
|
206
208
|
null,
|
|
207
209
|
null
|
|
208
210
|
);
|
|
@@ -212,7 +214,7 @@ export {
|
|
|
212
214
|
n as BentoInputFieldElementPosition,
|
|
213
215
|
ne as BentoInputFieldEvent,
|
|
214
216
|
p as BentoInputFieldStateClass,
|
|
215
|
-
|
|
217
|
+
v as BentoInputFieldType,
|
|
216
218
|
d as BentoInputFieldVariant
|
|
217
219
|
};
|
|
218
220
|
//# 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}\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') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" 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 :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 data-testid=\"input-field-dropdown-container-end\"\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 :dynamic-filtering=\"false\"\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, provide, 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 import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // 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 * Properties supported:\n *\n * - `value`: Selected value of the dropdown\n * - `items`: List of available items\n *\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 // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\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 }));\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.dropdown && (props.dropdown as InstanceType<typeof BentoDropdown>['$props']).dynamicFiltering) {\n printDevelopmentWarning('\"bento-input-field\" dropdown does not support \"dynamicFiltering\"');\n }\n\n /**\n * Deprecations\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\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\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","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","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","printDevelopmentWarning","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,EAA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AuC,EAAA;AAAA,IACE,EAAA,GAG3EU,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,MAAAtC,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAuC,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAGJzB,EAAA,YAAAA,EAAA,SAAA,oBACI2B,EAAA,kEAAA,GAMJ3B,EAAA,SACI4B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR3C,EAAA,mBAAA,KACI2C;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
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}\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') || hasSlot('iconBefore'))\"\n :aria-hidden=\"ariaHidden ? 'true' : undefined\"\n class=\"b-input-field__icon-before\"\n >\n <slot v-if=\"hasSlot('iconBefore')\" name=\"iconBefore\" />\n <slot v-if=\"hasSlot('defaultIconBefore') && !hasSlot('iconBefore')\" 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 :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 data-testid=\"input-field-dropdown-container-end\"\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 :dynamic-filtering=\"false\"\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, provide, 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 import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n import { INPUT_FIELD_COMPONENT_INJECTION_KEY } from '@/components/input-field/input-field.keys';\n\n // Composables\n import { useFormLayoutFieldLoading, useHasSlot } from '@/composables';\n\n // 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 * Properties supported:\n *\n * - `value`: Selected value of the dropdown\n * - `items`: List of available items\n *\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 * All `input` types are available but only `search`, `text` and `number` are fully supported.\n *\n * If `type` is `search`, use `bento-search-bar` instead.\n */\n type: {\n type: String as PropType<BentoInputFieldType | `${BentoInputFieldType}` | HTMLInputElement['type']>,\n default: BentoInputFieldType.TEXT,\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 // Provide INPUT_FIELD_COMPONENT_INJECTION_KEY as true, to set the input only dropdown size variant in the BentoDropdown comp\n provide(INPUT_FIELD_COMPONENT_INJECTION_KEY, true);\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 }));\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 // Unsupported warnings\n if (props.dropdown && (props.dropdown as InstanceType<typeof BentoDropdown>['$props']).dynamicFiltering) {\n printDevelopmentWarning('\"bento-input-field\" dropdown does not support \"dynamicFiltering\"');\n }\n\n if (!Object.values(BentoInputFieldType).includes(props.type as BentoInputFieldType)) {\n printDevelopmentWarning(`\"bento-input-field\" dropdown does not support the type ${props.type}`);\n }\n\n /**\n * Deprecations\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\n if (hasSlot('defaultIconBefore')) {\n deprecate(\n 'BentoInputField \"defaultIconBefore\" slot',\n `Use the BentoInputField \"iconBefore\" slot instead to add an icon at the left side of the input field\n <bento-input-field>\n \\t<template #iconBefore>\n \\t\\t<my-icon-goes-here />\n \\t</template>\n </bento-input-field>`,\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","provide","INPUT_FIELD_COMPONENT_INJECTION_KEY","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","printDevelopmentWarning","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,QAAA,SAJQA,IAAAD,KAAA,CAAA,CAAA,GAUAE,IAAA,kBAAAC,OACRA,EAAA,SAAA,UACAA,EAAA,OAAA,QACAA,EAAA,SAAA,UAHQA,IAAAD,KAAA,CAA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AA,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,MAAAtC,EAAA,MAAA,MAAA;AAAA,IAA8B;AAIlC,WAAAuC,EAAA;AAAA,MAAa,YAAAD;AAAA,IACT,CAAA,GAIJzB,EAAA,YAAAA,EAAA,SAAA,oBACI2B,EAAA,kEAAA,GAGJ,OAAA,OAAAtD,CAAA,EAAA,SAAA2B,EAAA,IAAA,KACI2B,EAAA,0DAAA3B,EAAA,MAAA,GAMJA,EAAA,SACI4B;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA,MACA;AAAA,IAGA,GAIR3C,EAAA,mBAAA,KACI2C;AAAA,MAAA;AAAA,MACI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACA;AAAA,IAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/internal.js
CHANGED
|
@@ -1,81 +1,34 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { C as
|
|
3
|
-
import { C as
|
|
4
|
-
import { C as
|
|
5
|
-
import { B as
|
|
6
|
-
import { E as
|
|
7
|
-
import { F as
|
|
8
|
-
import { G as
|
|
9
|
-
import { B as
|
|
10
|
-
import {
|
|
11
|
-
import { B as U } from "./chunks/teleport.84b0f20b.js";
|
|
12
|
-
const p = (l, e) => {
|
|
13
|
-
for (const o of l) {
|
|
14
|
-
if (o.value === e)
|
|
15
|
-
return o.label;
|
|
16
|
-
if (o.items)
|
|
17
|
-
return p(o.items, e);
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
}, d = (l, e, o) => {
|
|
21
|
-
const a = f([]), n = f(), i = (t) => {
|
|
22
|
-
n.value = o.value ? t.map(({ value: m }) => m) : t[0].value;
|
|
23
|
-
}, C = (t) => {
|
|
24
|
-
a.value = t, i(t);
|
|
25
|
-
}, u = () => {
|
|
26
|
-
a.value = [], n.value = null;
|
|
27
|
-
};
|
|
28
|
-
return v(
|
|
29
|
-
() => e.value,
|
|
30
|
-
() => {
|
|
31
|
-
if (!e.value) {
|
|
32
|
-
u();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const t = !Array.isArray(e.value), m = [...a.value];
|
|
36
|
-
u();
|
|
37
|
-
const c = (r) => {
|
|
38
|
-
let s = p(l.value, r);
|
|
39
|
-
s || p(m, r), s || (s = r.toString()), a.value.push({ value: r, label: s });
|
|
40
|
-
};
|
|
41
|
-
if (t) {
|
|
42
|
-
const r = e.value;
|
|
43
|
-
c(r), i(a.value);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
e.value.forEach(c), i(a.value);
|
|
47
|
-
},
|
|
48
|
-
{ immediate: !0 }
|
|
49
|
-
), {
|
|
50
|
-
// Values
|
|
51
|
-
cachedSelectedValues: a,
|
|
52
|
-
simpleSelectedValuesCache: n,
|
|
53
|
-
// Methods
|
|
54
|
-
resetCache: u,
|
|
55
|
-
setCachedValues: C
|
|
56
|
-
};
|
|
57
|
-
};
|
|
1
|
+
import { B as o, L as r } from "./chunks/listbox-option-tag.6bbb6bbe.js";
|
|
2
|
+
import { C as s, a as p, b as l } from "./chunks/calendar.640b8d25.js";
|
|
3
|
+
import { C as n, a as C } from "./chunks/copy.f85700c6.js";
|
|
4
|
+
import { C as m } from "./chunks/controls-group.4fb50009.js";
|
|
5
|
+
import { B as f, b as G, a as d, D as I } from "./chunks/dialog-page.73da22cf.js";
|
|
6
|
+
import { E as _, F as u } from "./chunks/error-message.31ec12b7.js";
|
|
7
|
+
import { F as A } from "./chunks/fixed-scroller.4eb9a9ac.js";
|
|
8
|
+
import { G as T, a as g } from "./chunks/grid-layout.e0025286.js";
|
|
9
|
+
import { B as D, a as F, u as b } from "./chunks/use-cached-selected-values.69297473.js";
|
|
10
|
+
import { B as P } from "./chunks/teleport.84b0f20b.js";
|
|
58
11
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
12
|
+
o as BentoAvatar,
|
|
13
|
+
f as BentoDialogPageAnimation,
|
|
14
|
+
D as BentoListbox,
|
|
15
|
+
P as BentoTeleport,
|
|
16
|
+
s as Calendar,
|
|
17
|
+
p as CalendarEvent,
|
|
18
|
+
l as CalendarFirstDayOfWeek,
|
|
19
|
+
m as ControlsGroup,
|
|
20
|
+
n as Copy,
|
|
21
|
+
C as CopyTooltipState,
|
|
22
|
+
G as DIALOG_PAGE_CONFIG_INJECTION_KEY,
|
|
23
|
+
d as DIALOG_PAGE_REGISTER_PAGE_INJECTION_KEY,
|
|
24
|
+
I as DialogPage,
|
|
25
|
+
_ as ErrorMessage,
|
|
26
|
+
u as FieldLabel,
|
|
27
|
+
A as FixedScroller,
|
|
28
|
+
T as GridLayout,
|
|
29
|
+
g as GridLayoutContainerType,
|
|
30
|
+
r as ListboxOptionTag,
|
|
31
|
+
F as useCachedSelectedValues,
|
|
32
|
+
b as useMultiLevelItems
|
|
80
33
|
};
|
|
81
34
|
//# sourceMappingURL=internal.js.map
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sources":[
|
|
1
|
+
{"version":3,"file":"internal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/dist/link.js
CHANGED
|
@@ -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/index23.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-fullscreen.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as C, useSlots as B, onMounted as L, toRefs as O, ref as r, computed as M, watch as k, nextTick as T, provide as d } from "vue";
|
|
2
|
-
import { a as D } from "./chunks/button.
|
|
3
|
-
import { B as N } from "./chunks/index.
|
|
4
|
-
import { B as w } from "./chunks/index.
|
|
2
|
+
import { a as D } from "./chunks/button.9d6435ae.js";
|
|
3
|
+
import { B as N } from "./chunks/index.d553d3d1.js";
|
|
4
|
+
import { B as w } from "./chunks/index.dd30e538.js";
|
|
5
5
|
import { u as x } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
6
|
-
import { D as G, B as R, b as J, a as K } from "./chunks/dialog-page.
|
|
7
|
-
import { B as U } from "./chunks/button-actions.
|
|
6
|
+
import { D as G, B as R, b as J, a as K } from "./chunks/dialog-page.73da22cf.js";
|
|
7
|
+
import { B as U } from "./chunks/button-actions.81db18e8.js";
|
|
8
8
|
import { n as P } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
9
9
|
import { C as Y } from "./chunks/cross.04678d81.js";
|
|
10
10
|
import { u as $ } from "./chunks/i18n.eb5b985b.js";
|
|
11
11
|
import { g as z } from "./chunks/unique-id.a2a2b458.js";
|
|
12
12
|
import { M as H } from "./chunks/modal-fullscreen.keys.b9f31632.js";
|
|
13
|
-
import "./assets/
|
|
13
|
+
import "./assets/index22.css";
|
|
14
14
|
const V = {}, j = /* @__PURE__ */ C({
|
|
15
15
|
...V,
|
|
16
16
|
__name: "modal-fullscreen-page",
|
package/dist/modal.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { d as g, h as A, f as d, e as E, c as M, a as L, b as v } from "./chunks/base-modal.
|
|
2
|
-
import { g as yt, B as _t } from "./chunks/base-modal.
|
|
1
|
+
import { d as g, h as A, f as d, e as E, c as M, a as L, b as v } from "./chunks/base-modal.1fff7abe.js";
|
|
2
|
+
import { g as yt, B as _t } from "./chunks/base-modal.1fff7abe.js";
|
|
3
3
|
import { defineComponent as p, useSlots as B, onMounted as O, toRefs as x, ref as P, computed as f, useAttrs as T, watch as k } from "vue";
|
|
4
4
|
import { u as b } from "./chunks/use-has-slot.fbeb19ec.js";
|
|
5
|
-
import { F as R } from "./chunks/footer-actions.
|
|
5
|
+
import { F as R } from "./chunks/footer-actions.a1e09b4f.js";
|
|
6
6
|
import { n as S } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
7
|
-
import { B as C } from "./chunks/button.
|
|
7
|
+
import { B as C } from "./chunks/button.9d6435ae.js";
|
|
8
8
|
import { u as z } from "./chunks/i18n.eb5b985b.js";
|
|
9
|
-
import { B as N } from "./chunks/button-actions.
|
|
10
|
-
import { d as $ } from "./chunks/index.
|
|
9
|
+
import { B as N } from "./chunks/button-actions.81db18e8.js";
|
|
10
|
+
import { d as $ } from "./chunks/index.dd30e538.js";
|
|
11
11
|
const F = p({
|
|
12
12
|
name: "bento-modal-default"
|
|
13
13
|
}), q = /* @__PURE__ */ p({
|
package/dist/pagination.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as p, ref as P, computed as r, toRefs as L } from "vue";
|
|
2
2
|
import { u as N } from "./chunks/aria-label.ac9651a5.js";
|
|
3
|
-
import { B as C } from "./chunks/index.
|
|
4
|
-
import { B as b } from "./chunks/dropdown.
|
|
3
|
+
import { B as C } from "./chunks/index.dd30e538.js";
|
|
4
|
+
import { B as b } from "./chunks/dropdown.10c034aa.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.eb5b985b.js";
|
|
7
7
|
import { n as l } from "./chunks/_plugin-vue2_normalizer.71e2aa87.js";
|
|
8
|
-
import { a as S } from "./chunks/button.
|
|
9
|
-
import "./assets/
|
|
8
|
+
import { a as S } from "./chunks/button.9d6435ae.js";
|
|
9
|
+
import "./assets/index24.css";
|
|
10
10
|
const I = {
|
|
11
11
|
"en-US": {
|
|
12
12
|
showingItems: "Showing {itemCount} items",
|